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}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,W4n=/^[a-z0-9_-]{21}$/i,j4n=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,$4n=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+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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]))$/,nBn=/^(([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])$/,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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(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&>(R)),rn!==n?ht=he(Kt):(Pe=ht,ht=n)):(Pe=ht,ht=n)),Ee--,ht===n&&(Kt=n,Ee===0&>(k)),ht}function Wt(){let ht,Kt,rn,Lt;return ht=Pe,Kt=t.charAt(Pe),m.test(Kt)?Pe++:(Kt=n,Ee===0&>(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&>(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&>(U)),ht}function An(){let ht;return ht=t.charAt(Pe),I.test(ht)?Pe++:(ht=n,Ee===0&>(Y)),ht}ke=r();const kn=ke!==n&&Pe===t.length;function $n(){throw ke!==n&&Pe<t.length&>(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,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),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,"""],[38,"&"],[160," "]])),ZDn=Qlt(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]])),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,""")}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$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Ioo=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,Coo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,yoo=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/,xoo=/^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-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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,"&").replace(/'/g,"'").replace(/"/g,""").replace(/</g,"<").replace(/>/g,">")},$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/AGADf398AGAAAGABfAF8YAAB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ggDEIANwNIIAxCgICAgICAgPg/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/AFQ6AOgEAkACQCADLQDpBCADLQDoBHFFDQAgAy0A6gRBAXFFDQAgAy0A7AQgAy0A6wRxRQ0AIAMtAO0EQQFxRQ0AIAMtAO8EIAMtAO4EcUUNACADLQDwBEEBcUUNACADLQDyBCADLQDxBHFFDQAgAy0A8wRBAXENAQsgCEEBECwMAQsgCCALKALIATYCyAEgCCALRwRAIAsoAswBIQYgC0HQAWohEiMAQRBrIg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AEgCCACNgLcASACRQ0AIAggAkEEdCICECciBDYC2AEgAkUNACAEIAsoAtgBIAL8CgAACyAIIAsrAzA5AzAgCCALKwM4OQM4IAggCygCQDYCQCAIQYgBaiIOIAtBiAFqEJICIAggC0Ew/AoAACAIQdgAaiIJIAtB2ABqIg8Q7QIgCEHoAGoiByALQegAahDtAiAIQfgAaiIKIAtB+ABqEO0CIAsoArwBIQIgA0IANwOABCADQgA3A4gEIANCADcDkAQgA0IANwOYBCADIAMpA4AENwOgAiADIAMpA4gENwOoAiADIAMpA5AENwOwAiADIAMpA5gENwO4AiAIQbgBaiACIANBoAJqENoEIAhBfzYCyAEgCCgCzAEiAiAIQdABaiIERwRAA0AgAisDICEVIAIrAyghFCACKwMwIRcgAisDOCEbIAIrA0AhGCACKwNIIRYgAisDUCEZIAIrA1ghGiACKwNgIR4gAisDaCEfIAIrA3AhHCACKwN4ISAgA0KAgICAgICA+D83A+AFIAMgIDkD2AUgAyAcOQPQBSADIB85A8gFIANCADcDwAUgAyAeOQO4BSADIBo5A7AFIAMgGTkDqAUgA0IANwOgBSADIBY5A5gFIAMgGDkDkAUgAyAbOQOIBSADQgA3A4AFIAMgFzkD+AQgAyAUOQPwBCADIBU5A+gEIANBoANqIgYgBSADQegEahDwASACQSBqIAZB4AD8CgAAAkAgAigCBCIGBEADQCAGIgIoAgAiBg0ADAILAAsDQCACIAIoAggiAigCAEcNAAsLIAIgBEcNAAsLIAsoAkwhAiADQgA3A5gDIANCADcDkAMgA0IANwOIAyADQgA3A4gCIANCADcDkAIgA0IANwOYAiAIQcgAaiACIANBiAJqEGcgCygCrAEhAiADQgA3A/ACIANCADcD+AIgA0IANwOAAyADIAMpA/ACNwPwASADIAMpA/gCNwP4ASADIAMpA4ADNwOAAiAIQagBaiACIANB8AFqEGcgCygCnAEhAiADQgA3A9gCIANCADcD4AIgA0IANwPoAiADIAMpA9gCNwPYASADIAMpA+ACNwPgASADIAMpA+gCNwPoASAIQZgBaiACIANB2AFqEGcgBSs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wAIgAiADQcACahC2BCADKALIAiICBEAgAhAiCyADKALoBCICRQ0AIAIQIgsgA0HABmokAEGoAhAjIgJB2JMCNgIAIAJCADcCBCACQRBqIAwQowEhBCAMIAI2ApwCIAwgBDYCmAIgAUEMaiAMQZgCahBOAkAgDCgCnAIiAkUNACACIAIoAgQiBEEBazYCBCAEDQAgAiACKAIAKAIIEQAAIAIQJAsgDBA6GiABQgA3AyAgAUKAgICAgICA+D83AxggAUIANwMoIAFCADcDMCABQgA3A0AgAUKAgICAgICA+D83AzggAUIANwNIIAFCADcDUCABQgA3A2AgAUKAgICAgICA+D83A1ggAUIANwNoIAFCADcDcAsgACABKAIMNgIAIAAgASgCECIANgIEIAAEQCAAIAAoAgRBAWo2AgQLIAxBsAJqJAAL9QEBBH8jAEEQayIDJAAgACgCABogAQRAIAAoAggiAiACKAIAKAIMEQQAIQIgAUEANgIMIAFBADYCBCABIAIgAkEAR2siAjYCACABIAJBC2w2AggLAkAgACgCCCICIAIoAgAoAggRBABBA0YNACADQQhqIgIgAEEIaiIEKAIAIgUgASAFKAIAKAIAEQMAIAQgAhBOIAMoAgwiAUUNACABIAEoAgQiAkEBazYCBCACDQAgASABKAIAKAIIEQAAIAEQJAsgACgCCAJAIAAoAgwiAEUNACAAKAIEQX9HDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EQaiQAC7EEAQZ/IwBBIGsiAiQAIABBADYCTCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQcgAahBxIABB2ABqIgMQOCAAQegAahA4IABB+ABqEDggAxDvAiAAQQA2ApwBIABBmAFqEHEgAEEANgKsASAAQagBahBxIABBADYCvAEgAEG4AWoQkwEgAkIANwIIIAJBfzYCACACQgA3AhggAkIANwIQIAIgAkEIaiIENgIEIABBfzYCyAEgAEHMAWogACgC0AEQbyAAIAIoAgQ2AswBIAAgAigCCCIFNgLQASAAIAIoAgwiBjYC1AEgAEHQAWohAyAAQcgBaiEHAkAgBkUEQCAAIAM2AswBDAELIAUgAzYCCCACQgA3AgggAiAENgIECyACQQRqAkAgAiAHRwRAIAAoAtgBIgQEQCAEECILIAAgAigCEDYC2AEgACACKAIUNgLcASAAIAIoAhg2AuABDAELIAIoAhAiBEUNACAEECILIAJBADYCGCACQgA3AhAgAigCCBBvIAAoAugBIgMEQCADECILIABBADYC8AEgAEIANwPoASAAKAL4ASIDBEAgAxAiCyAAQQA2AoACIABCADcD+AEgACgCiAIiAwRAIAMQIgsgAEEANgKQAiAAQgA3A4gCIAAgATYCRCACQSBqJAALUgEEfyAAKAIAIQECQCAAKAIEIgNFBEAMAQsgA0ECdCIEECchAiAERQ0AIAIgASAE/AoAAAsgACABBH8gARAiIAAoAgQFIAMLNgIIIAAgAjYCAAuQAQECfyMAQRBrIgMkAEEkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcCCCAAIAI2AgQgACACQQxqNgIAIABCADcCECABKAIAGiAAQQhqIAFBCGoQXiADQQhqIAFBEGoQfyADIAMpAgg3AwAgAEEQaiADEOcCIANBEGokACAACzcBAn8CQCAAKAIEIgFFDQAgASABKAIEIgJBAWs2AgQgAg0AIAEgASgCACgCCBEAACABECQLIAALBgAgABAiC3IBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARAlIAEgACgCBCIEayIDQQBMDQAgACgCACAEQQJ0aiEEA0AgBCACNgIAIARBBGohBCADQQFLIANBAWshAw0ACwsgACABNgIEBEAgABAtCwtgACAAIAM2AhBBACEDIABBADYCDAJAIAEEQCABQYCAgIABTw0BIAFBBHQQIyEDCyAAIAM2AgAgACADIAJBBHRqIgI2AgggACADIAFBBHRqNgIMIAAgAjYCBCAADwsQcgALVwEDfyAAKAIIIAFJBEAgAUEYbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBGGwiA0UNACAEIAIgA/wK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IQQgAEEANgKQAiAAQgA3A4gCIAAgAzYCgAIgACADNgL8ASAAIAI2AvgBIAEoAowCIgIEQCABKAKIAiIBIAJBA3QiA2ohBSADECciBCEGA0AgBiABKAIANgIAIAYgASgCBDYCBCAGQQhqIQYgAUEIaiIBIAVHDQALCyAAIAI2ApACIAAgAjYCjAIgACAENgKIAiAAC40CAQR/IwBBEGsiAiQAIAAoAgwoAgBBAk4EQCAAKAIAIQQgACgCBCEBIAJBADYCAEEEECMiA0EBNgIAIAIgATYCCCACIAE2AgQgAiADNgIMAkAgAUUNACACIAFBAnQiARAnIgM2AgAgAUUNACADIAQgAfwKAAALIAAgAkcEQAJAIAAoAgwiAUUNACABIAEoAgAiAUEBazYCACABQQFKDQAgACgCDCIBBEAgARAiCyAAQQA2AgwgACgCACIBRQ0AIAEQIgsgACACKAIMNgIMIAJBADYCDCAAIAIoAgA2AgAgACACKAIENgIEIAAgAigCCDYCCCACQQA2AgggAkIANwIACyACEEkLIAJBEGokAAtXAQN/IAAoAgggAUkEQCABQQR0ECchBCAAKAIAIQICQCAAKAIEIgNFDQAgA0EEdCIDRQ0AIAQgAiAD/AoAAAsgAgRAIAIQIgsgACABNgIIIAAgBDYCAAsLogIBAX8gACgCiAIiAQRAIAEQIgsgAEEANgKQAiAAQgA3A4gCIAAoAvgBIgEEQCABECILIABBADYCgAIgAEIANwP4ASAAKALoASIBBEAgARAiCyAAKALYASIBBEAgARAiCyAAQQA2AuABIABCADcD2AEgAEHMAWogACgC0AEQbyAAKAK4ASIBBEAgARAiCyAAQQA2AsABIABCADcDuAEgACgCqAEiAQRAIAEQIgsgAEEANgKwASAAQgA3A6gBIAAoApgBIgEEQCABECILIABBADYCoAEgAEIANwOYASAAKAKIASIBBEAgARAiCyAAQQA2ApABIABCADcDiAEgAEH4AGoQSSAAQegAahBJIABB2ABqEEkgACgCSCIBBEAgARAiCyAAC7kCACAAQgA3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMASAAC1UBAn8gAEEANgIIIABCADcCACABKAIEIgIgASgCACIDRwRAIAAgAiADayIBQQR1EI8DIAAoAgQhAiABBEAgAiADIAH8CgAACyAAIAEgAmo2AgQLIAALoAIBBX8jAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABKAIANgIAIAJBBGohAQwBCyACIAAoAgAiBGtBAnUiBkEBaiICQYCAgIAETw0BIAVBDGpB/////wMgAyAEayIDQQF1IgQgAiACIARJGyADQfz///8HTxsgBiAAEEoiAigCCCIDIAEoAgA2AgAgAiADQQRqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFrIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACEFMLIAAgATYCBCAFQSBqJAAPCxAmAAvQAQIBfAF/IwBBEGsiAiQARAAAAAAAAPh/IQECQCAAvUL///////////8Ag0L/////////9/8AVg0ARAAAAAAAAAAAIQEgAEQAAAAAAAAAAGMEQCAAmhA+miEBDAELIACZRAAAAAAAgFZAIAJBDGoQpQNEGC1EVPshCUCiRAAAAAAAgGZAoyEAAkACQAJAAkAgAigCDEEEbw4EAAECAwQLIAAQqAEhAQwDCyAAEJcBIQEMAgsgABCoAZohAQwBCyAAEJcBmiEBCyACQRBqJAAgAQspACAAIAEoAgQgAhASIgEQGzYCBCAAQZygAjYCACABQQlPBEAgARABCwujAQEBf0EkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcDGCAAQoCAgICAgID4PzcDECAAQgA3AwggACACNgIEIAAgAkEMajYCACAAQgA3AyAgAEIANwMwIABCgICAgICAgPg/NwMoIABCADcDOCABKAIAGiAAQQhqIAFBCGoQXiAAQRBqIAFBEGpBMPwKAAAgAAsOACAAQQhqEC8aIAAQLwsCAAtyAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACAAIAEoAgA2AgggACABKAIEIgI2AgwgAgRAIAIgAigCBEEBajYCBAsgAEIANwIQIAEQLxoLVwEDfyAAKAIIIAFJBEAgAUEDdBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBA3QiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy0BAX8gACgCACIBBEAgACABNgIEIAAoAggaIAEQIiAAQQA2AgggAEIANwIACwuLAQEDfyMAQRBrIgMkAEGoAhAjIgJBoJACNgIAIAJCADcCBCACQRBqEDshBCACIAE2AlQgAyACNgIMIAMgBDYCCCACIAIoAgRBAWo2AgQgAyADKQIINwMAIAAgAxBIGiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANBEGokAAs+ACADBEAgACADEKMCIAAoAgQhAyABIAJHBEADQCADIAEQPEEMaiEDIAFBDGoiASACRw0ACwsgACADNgIECwt5AQJ/IwBBEGsiAyQAQSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACADQQRqIAEQWSAAIAMoAgQ2AgggACADKAIINgIMIABCADcCECABEC8aIANBEGokACAAC1gBAX8CQCAAKAIMIgFFDQAgASABKAIAIgFBAWs2AgAgAUEBSg0AIAAoAgwiAQRAIAEQIgsgAE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ACIAIgBWMbIQIgBiADIAMgBmMbIQMgBCABIAEgBGMbIQELIAdBGGoiByAJRw0ACwwBCyAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDAEQAAAAAAADw/yECRAAAAAAAAPD/IQNEAAAAAAAA8P8hAQsgACACOQMoIAAgAzkDICAAIAE5AxhBACEHAkAgACkDAEL///////////8Ag0L/////////9/8AVg0AIAApAwhC////////////AINCgICAgICAgPj/AFoNACAAKQMQQv///////////wCDQoCAgICAgID4/wBaDQAgACkDGEL///////////8Ag0KAgICAgICA+P8AVCAAKQMgQv///////////wCDQoCAgICAgID4/wBUcSAAKQMoQv///////////wCDQoCAgICAgID4/wBUcSEHCyAHRQRAIABBABAsCwuDAQECf0GgARAjIQMjAEEQayICJAAgA0IANwIEIANBgJQCNgIAIAIgASgCADYCCCACIAEoAgQiATYCDCABBEAgASABKAIEQQFqNgIECyACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgAkEQaiQAIAAgAzYCBCAAIAE2AgAgACADQRRqIAEQjwELwAoCC38GfCMAQUBqIgMkACAAKAJcIQQgA0IANwM4IANCADcDMCADQgA3AyggA0IANwMAIANCADcDCCADQgA3AxAgAEGoAWogBEEDbiIGIAMQZwJAAkACQCAEQQJNBEAgBkEEdCEBDAELIAZBBHQQJyEIA0AgAkEEdCILIAAoAtgBakF/NgIMAkAgACgCWCACQQxsaiIFKAIAIglBAEgEQEQAAAAAAAAAACEMDAELIAAoAqgBIAJBGGxqIgEgACgCSCIHIAUoAgRBGGxqIgorAwAgByAJQRhsaiIJKwMAIgyhIg4gByAFKAIIQRhsaiIFKwMIIAkrAwgiDaEiD6IgCisDCCANoSINIAUrAwAgDKEiEKKhIgwgDCAMoiANIAUrAxAgCSsDECIMoSIRoiAKKwMQIAyhIgwgD6KhIg0gDaIgDCAQoiAOIBGioSIOIA6ioKAiDJ8iD6M5AxAgASAOIA+jOQMIIAEgDSAPoyINOQMAIA0gDWENACABQgA3Aw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DIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARAzIAEgACgCBCIDa0EYbCIEQQBMDQAgBEEYbiEEIAAoAgAgA0EYbGohAwNAIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGohAyAEQQFLIARBAWshBA0ACwsgACABNgIEBEAgABBxCwuKAwEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACQQA2AgggAkIANwIAIAIgASgCADYCACACIAEoAgQ2AgQgAiABKAIINgIIIAFBADYCCCABQgA3AgAgAkEMaiEBDAELIAIgACgCACIEa0EMbSIGQQFqIgJB1qrVqgFPDQEgBUEMakHVqtWqASADIARrQQxtIgNBAXQiBCACIAIgBEkbIANBqtWq1QBPGyAGIAAQYSICKAIIIgNBADYCCCADQgA3AgAgAyABKAIANgIAIAMgASgCBDYCBCADIAEoAgg2AgggAUEANgIIIAFCADcCACACIANBDGo2AgggAigCBCAAKAIEIAAoAgAiA2siAUF0bUEMbGohBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCBCAAIAIoAggiATYCBCACIAM2AgggACgCCCEEIAAgAigCDDYCCCACIAM2AgAgAiAENgIMIAIQ1QELIAAgATYCBCAFQSBqJAAPCxAmAAvcAgEEfyMAQRBrIgMkACAAQZCcAjYCACAAEN4BIABBJGogACgCJBC9AyAAIAAoAjQiASAAKAI4IgJHBH8DQCABKAIAIgQEQCAEECILIAFBBGoiASACRw0ACyAAKAI0BSABCzYCOCAAQQA6AHwgAEEAOgAYIAAgACgCJDYCMCAAKAKAASIBBEAgACABNgKEASAAKAKIARogARAiCyAAKAJoIgEEQCAAIAE2AmwgACgCcBogARAiCyAAKAJcIgEEQCAAIAE2AmAgACgCZBogARAiCyAAKAJQIgEEQCAAIAE2AlQgACgCWBogARAiCyAAKAJAIgEEQCAAIAE2AkQgACgCSBogARAiCyAAKAI0IgEEQCAAIAE2AjggACgCPBogARAiCyADIABBJGo2AgwgAygCDCIBKAIAIgIEQCABIAIQvQMgAygCDCIBKAIAIAEoAggaECILIANBEGokACAAC40BAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgAEIANwMYIABCgICAgICAgPg/NwMQIABCADcDCCAAIAI2AgQgACACQQxqNgIAIABCADcDICAAQgA3AzAgAEKAgICAgICA+D83AyggAEIANwM4IABBCGogARBeIAEQLxoLBwAgABEOAAsYAQF/QQwQIyIAQQA2AgggAEIANwIAIAALIAAgACgCBCABEBIiACACKAIEEBUgAEEJTwRAIAAQAQsLSgECfyAAKAIEIgIgACgCCCIBRwRAA0AgACABQQhrIgE2AgggARAvGiACIAAoAggiAUcNAAsLIAAoAgAiAQRAIAAoAgwaIAEQIgsLHQAgAQRAIAAgASgCABBvIAAgASgCBBBvIAEQIgsL+wMBB38CQAJ/QQIgAUEBRg0AGiABIAEgAUEBa3FFDQAaIAEQ9gELIgMgACgCBCIBTQRAIAEgA00NASAAKAIMsyAAKgIQlY38ASECIAEgAyABQQNJIAFpQQFLcgR/IAIQ9gEFIAJBAUEgIAJBAWtna3QgAkECSRsLIgIgAiADSRsiA00NAQsgACEBAkACQCADBEAgA0GAgICABE8NASADQQJ0IgAQIyEFIAEoAgAhAiABIAU2AgAgAgRAIAEoAgQaIAIQIiABKAIAIQULIAEgAzYCBCAABEAgBUEAIAD8CwALIAEoAggiAEUNAiABQQhqIQEgACgCBCECAkAgA2kiBEEBTQRAIAIgA0EBa3EhAgwBCyACIANJDQAgAiADcCECCyAFIAJBAnRqIAE2AgAgACgCACIBRQ0CIANBAWshByAEQQFLIQgDQCABKAIEIQQCQCAIRQRAIAQgB3EhBAwBCyADIARLDQAgBCADcCEECwJAIAIgBEYEQCABIQAMAQsgBSAEQQJ0aiIGKAIARQRAIAYgADYCACABIQAgBCECDAELIAAgASgCADYCACABIAYoAgAoAgA2AgAgBigCACABNgIACyAAKAIAIgENAAsMAgsgASgCACEAIAFBADYCACAABEAgASgCBBogABAiCyABQQA2AgQMAQsQcgAL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oAmAIgAEEAOgAACyADQaACaiQAC5UCAQN/IAACfwJAIAEoAgQiBEUEQCABQQRqIgUhAgwBCyACKAIAIQYDQCAEIgIoAhAiBSAGSgRAIAQhBSAEKAIAIgQNAQwCC0EAIAUgBk4NAhogAigCBCIEDQALIAJBBGohBQtBiAEQIyIEIAMoAgAoAgA2AhAgBEEYakEAQfAA/AsAIARCADcDKCAEQoCAgICAgID4PzcDICAEQX82AhggBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQQA7AYABIAEgAiAFIAQQggFBAQs6AAQgACAENgIAC1YBBX8gACgCACICKAIAIgEEQCABIQMgAiEEIAIoAgQiBSABRwRAA0AgASAFQRhrECgiBUcNAAsgACgCACIEKAIAIQMLIAIgATYCBCAEKAIIGiADECILC0oBA38gACgCBCICIAFHBEADQCACQQxrIgQoAgAiAwRAIAJBCGsgAzYCACACQQRrKAIAGiADECILIAQiAiABRw0ACwsgACABNgIECwwAIAEgACgCABEEAAvzAgEFfyAAKAIEIAAoAgAiAmtBAnUiAyABSQRAIwBBIGsiBSQAAkACQAJAIAEgA2siAyAAKAIIIgQgACgCBCICa0ECdU0EQCAAIAMEfyADQQJ0IgAEQCACQQAgAPwLAAsgACACagUgAgs2AgQMAQsgAiAAKAIAIgJrQQJ1IgYgA2oiAUGAgICABE8NASAFQQxqQf////8DIAQgAmsiAkEBdSIEIAEgASAESRsgAkH8////B08bIAYgABBKIgEoAgghAiADQQJ0IgMEQCACQQAgA/wLAAsgASACIANqNgIIIAEoAgQgACgCBCAAKAIAIgRrIgJrIQMgAgRAIAMgBCAC/AoAAAsgACgCACECIAAgAzYCACABIAI2AgQgACABKAIINgIEIAEgAjYCCCAAKAIIIQMgACABKAIMNgIIIAEgAjYCACABIAM2AgwgARBTCyAFQSBqJAAMAQsQJgALDwsgASADSQRAIAAgAiABQQJ0ajYCBAsLSQE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UgBBBLIgIoAgQgBCgCBCAEKAIAIghrIgVrIQcgBQRAIAcgCCAF/AoAAAsgBCgCACEFIAQgBzYCACACIAU2AgQgBCACKAIINgIEIAIgBTYCCCAEKAIIIQcgBCACKAIMNgIIIAIgBTYCACACIAc2AgwgAhBuCyAGQSBqJAAMAQsQJgALIAEoAgAiAiABKAIEIgdGDQIDQCADQRRqIAIQigECQCADKAIgIgEgAygCJCIESQRAIAEgAygCFDYCACABIAMoAhg2AgQgAUEIaiEBDAELIAEgAygCHCIFa0EDdSIGQQFqIgFBgICAgAJPDQMgA0EsakH/////ASAEIAVrIgRBAnUiBSABIAEgBUkbIARB+P///wdPGyAGIANBHGoQSyEEIAMoAjQiASADKAIUNgIAIAEgAygCGDYCBCADIAFBCGo2AjQgAygCMCADKAIgIAMoAhwiBmsiAWshBSABBEAgBSAGIAH8CgAACyADIAMoAhwiBjYCMCADIAU2AhwgAygCNCEBIAMgBjYCNCADIAE2AiAgAygCJCEFIAMgAygCODYCJCADIAU2AjggBCAGNgIAIAQQbgsgAyABNgIgIAJBGGoiAiAHRw0ACwwCCyAAEOsBGgwCCxAmAAsgA0EsaiADQRxqIANBK2oQgAMgAyADKQIsIgk3AgwgA0IANwIsIAMgCTcDACAAIAMQQwJAIAMoAjAiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAyADQRxqNgIsIANBLGoQZQsgA0FAayQACwsAIAAEQCAAECILCzAAIAEoAgAaIAAgASgCCDYCACAAIAEoAgwiADYCBCAABEAgACAAKAIEQQFqNgIECwtVACAAIAEoAgA2AgAgACABKAIENgIEIAFCADcCACAAIAEoAgg2AgggACABKAIMNgIMIAFCADcCCCAAIAEoAhA2AhAgACABKAIUNgIUIAFCADcCECAAC0UBAn8gACgCBCICIAAoAggiAUcEQCAAIAEgASACa0EYayICQRhwIAJrakEYazYCCAsgACgCACIBBEAgACgCDBogARAiCwuNAQECfCAAIAAQogFEEeotgZmXcT2iIgJEAAAAAAAA8L8gAkQAAAAAAADwv2QbIgJEAAAAAAAA8L8gAr1C////////////AINCgICAgICAgPj/AFQbIgI5AzAgAQRAIAAQogFEAAAAAAAAgD6iIgMgAiACIANjGyECCyAAIAIgACsDOCIDIAIgA2QbOQM4C4sDAQZ/IwBBIGsiAiQAQZiVAiIDIAMoAgAiA0EBajYCACACIAM2AgwgACADNgLIASAAKALcASEBIABB2AFqIgQgACgCXEEDbiIFEDkgACAFNgLcASABQRFJIAEgBUEBdE1yRQRAIAQQgwELIAAoAlwiAUEDbiEFIAFBA08EQCAEKAIAIQZBACEBA0AgBiABQQR0aiIEQX82AgggBCADNgIEIAQgAzYCACABQQFqIgEgBUcNAAsLIAAQ7gIhASAAQcwBaiIEIAAoAtABEG8gACAAQdABajYCzAEgAEIANwPQASACIAJBDGoiADYCFCACQRhqIAQgACACQRRqEHkgAigCGCIAQgA3AyggAEKAgICAgICA+D83AyAgACADNgIYIABCADcDMCAAQgA3AzggAEIANwNIIABCgICAgICAgPg/NwNAIABCADcDUCAAQgA3A1ggAEIANwNoIABCgICAgICAgPg/NwNgIABCADcDcCAAQgA3A3ggAEEAOgCAASAAIAE6AIEBIAJBIGokAAuLAQEBfwJAIAFFDQAgASgCBCIDBEAgAygCBEF/Rw0BCyAAKAIEIgAEQCAAIAAoAgRBAWo2AgQgACAAKAIIQQFqNgIIIAEoAgQhAwsgASAANgIEIAEgAjYCACADBEAgAxAkCyAARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwvHAwIBfwx8IwBB0ABrIgIkACABKwNAIQMgASsDECEEIAErAyghBSABKwMwIQYgASsDOCEHIAIgASsDICIIIAErAwAiCaIgASsDCCIKIAErAxgiC6KhOQNIIAIgCiAGoiAHIAmioTkDQCACIAcgC6IgCCAGoqE5AzggAiAEIAuiIAUgCaKhOQMwIAIgAyAJoiAEIAaioTkDKCACIAUgBqIgAyALoqE5AyAgAiAFIAqiIAggBKKhOQMYIAIgByAEoiADIAqioTkDECACIAggA6IgByAFoqE5AwggAisDCCEEIAIrAxAhBSACKwMYIQYgAisDICEHIAIrAyghCCACKwMwIQkgAisDOCEKIAIrA0AhCyAAIAIrA0ggASsDECABKwM4IgMgASsDGCINoiABKwMgIgwgASsDMCIOoqGiIAErAwAgDCABKwNAIgyiIAMgASsDKCIDoqGiIAErAwggAyAOoiAMIA2ioaKgoCIDozkDQCAAIAsgA6M5AzggACAKIAOjOQMwIAAgCSADozkDKCAAIAggA6M5AyAgACAHIAOjOQMYIAAgBiADozkDECAAIAUgA6M5AwggACAEIAOjOQMAIAJB0ABqJAALkgMBBn8gAyEEAkAgASACRg0AIAIgBEYEQCABIQQMAQsgAiABQQRqIgRGBEAgASgCACEFIAMgAmsiAgRAIAEgBCAC/AoAAAsgASACaiIEIAU2AgAMAQsgAyACQQRqRgRAIAMgA0EEayICIAFrIgVrIQQgAigCACEGIAVFIAEgAkZyRQRAIAQgASAF/AoAAAsgASAGNgIADAELAn8gAiABIgRrIgdBAnUiBiADIAJrIghBAnUiAUcEQCAGIQIDQCACIAEiAm8iAQ0ACyAEIAJBAnRqIQUDQCAFQQRrIgUgB2ohAiAFKAIAIQkgBSEBA0AgASACIgEoAgA2AgAgAiAHaiAEIAYgAyACa0ECdSICa0ECdGogAiAGShsiAiAFRw0ACyABIAk2AgAgBCAFRw0ACyAEIAhqDAELAkAgAiAERiACIANGcg0AIAIhAQNAIAQoAgAhBSAEIAEoAgA2AgAgASAFNgIAIARBBGoiBCACRg0BIAFBBGoiASADRw0ACwsgAgshBAsgACADNgIEIAAgBDYCAAuhAgEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACIAEpAwA3AwAgAkEIaiEBDAELIAIgACgCACIEa0EDdSIGQQFqIgJBgICAgAJPDQEgBUEMakH/////ASADIARrIgNBAnUiBCACIAIgBEkbIANB+P///wdPGyAGIAAQSyICKAIIIgMgASkDADcDACACIANBCGo2AgggAigCBCAAKAIEIAAoAgAiA2siAWshBCABBE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ADKAI0IgAEQCAAECILIANB0ABqJAALVwEDfyAAKAIIIAFJBEAgAUEwbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBMGwiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy4AIAApAwggASkDCFQgACgCACgCDCgCTCIAIAEoAgAoAgwoAkwiAUkgACABRhsLsAEBDHwgASsDSCEHIAErAzAhCCABKwMAIQkgASsDGCEKIAErA1AhCyABKwM4IQwgASsDCCENIAErAyAhDiAAIAIrAwAiAyABKwMQoiACKwMIIgQgASsDKKKgIAIrAxAiBSABKwNAoqAgAisDGCIGIAErA1iioDkDECAAIAMgDaIgBCAOoqAgBSAMoqAgBiALoqA5AwggACADIAmiIAQgCqKgIAUgCKKgIAYgB6KgOQMAC1oBA3wgACsDKJkiAiAAKwMQmSIBIAEgAmMbIgIgACsDIJkiASAAKwMImSIDIAEgA2QbIgEgASACYxsiAiAAKwMYmSIBIAArAwCZIgMgASADZBsiASABIAJjGwu9BwEDfyAAIAFByAD8CgAAIABBADYCUCAAQgA3A0ggACABKAJINgJIIAAgASgCTDYCTCAAIAEoAlA2AlAgAUEANgJQIAFCADcDSCAAQQA2AmAgAEIANwNYIAAgASgCZDYCZCABQQA2AmQgACABKAJYNgJYIAAgASgCXDYCXCAAIAEoAmA2AmAgAUEANgJgIAFCADcDWCAAQQA2AnAgAEIANwNoIAAgASgCdDYCdCABQQA2AnQgACABKAJoNgJoIAAgASgCbDYCbCAAIAEoAnA2AnAgAUEANgJwIAFCADcDaCAAQQA2AoABIABCADcDeCAAIAEoAoQBNgKEASABQQA2AoQBIAAgASgCeDYCeCAAIAEoAnw2AnwgACABKAKAATYCgAEgAUEANgKAASABQgA3A3ggAEEANgKQASAAQgA3A4gBIAAgASgCiAE2AogBIAAgASgCjAE2AowBIAAgASgCkAE2ApABIAFBADYCkAEgAUIANwOIASAAQQA2AqABIABCADcDmAEgACABKAKYATYCmAEgACABKAKcATYCnAEgACABKAKgATYCoAEgAUEANgKgASABQgA3A5gBIABBADYCsAEgAEIANwOoASAAIAEoAqgBNgKoASAAIAEoAqwBNgKsASAAIAEoArABNgKwASABQQA2ArABIAFCADcDqAEgAEEANgLAASAAQgA3A7gBIAAgASgCuAE2ArgBIAAgASgCvAE2ArwBIAAgASgCwAE2AsABIAFBADYCwAEgAUIANwO4ASAAIAEoAsgBNgLIASAAIAEoAswBNgLMASAAIAEoAtABIgM2AtABIAAgASgC1AEiBDYC1AEgAEHQAWohAgJAIARFBEAgACACNgLMAQwBCyADIAI2AgggAUIANwPQASABIAFB0AFqNgLMAQsgAEEANgLgASAAQgA3A9gBIAAgASgC2AE2AtgBIAAgASgC3AE2AtwBIAAgASgC4AE2AuABIAFBADYC4AEgAUIANwPYASAAQQA2AvABIABCADcD6AEgACABKALoATYC6AEgACABKALsATYC7AEgACABKALwATYC8AEgAUEANgLwASABQgA3A+gBIABBADYCgAIgAEIANwP4ASAAIAEoAvgBNgL4ASAAIAEoAvwBNgL8ASAAIAEoAoACNgKAAiABQQA2AoACIAFCADcD+AEgAEEANgKQAiAAQgA3A4gCIAAgASgCiAI2AogCIAAgASgCjAI2AowCIAAgASgCkAI2ApACIAFBADYCkAIgAUIANwOIAiAAC44BAgJ/AXwjAEEQayICJABB6J4CLQAAQQFxRQRAQQJByIsCQQMQBiEDQeieAkEBOgAAQeSeAiADNgIACyACIAEpAgA3AwggAkEANgIEQeSeAigCAEEAQQAgAkEEaiACQQhqEAUhBCACKAIEIQEgACAE/AM2AgQgAEGcoAI2AgAgAQRAIAEQBAsgAkEQaiQAC5oBAQV/IABCADcCBCAAKAIAIQMgAEEANgIAIAAgASgCBCIEEDMgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQUgASgCACEGA0AgBSACQRhsaiIAIAMgBiACQQJ0aigCAEEYbGoiASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAJBAWoiAiAERw0ACwwBCyADRQ0BCyADECILC4EBAQR/IABCADcCBCAAKAIAIQIgAEEANgIAIAAgASgCBCIEECUgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQAgASgCACEBA0AgACADQQJ0IgVqIAIgASAFaigCAEECdGooAgA2AgAgA0EBaiIDIARHDQALDAELIAJFDQELIAIQIgsL0gQBBH8gASAAIAFGIgM6AAwCQCADDQADQCABKAIIIgMtAAwNAQJAAkAgAygCCCICKAIAIgQgA0YEQAJAIAIoAgQiBUUNACAFLQAMDQAgA0EBOgAMIAIgACACRjoADCAFQQE6AAwMAgsCQCADKAIAIAFGBEAgAyEBDAELIAMgAygCBCIBKAIAIgA2AgQCQAJAAkAgAEUEQCABIAI2AggMAQsgACADNgIIIAMoAggiAigCACABIAI2AgggA0cNAQsgAiABNgIADAELIAIgATYCBAsgASADNgIAIAMgATYCCCABKAIIIgIoAgAhBAsgAUEBOgAMIAJBADoADCACIAQoAgQiADYCACAABEAgACACNgIICyAEIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAQ2AgAMAQsgACAENgIECyAEIAI2AgQgAiAENgIIDwsgBEUNASAELQAMDQEgA0EBOgAMIAIgACACRjoADCAEQQE6AAwLIAIhASAAIAJHDQEMAgsLAkAgAygCACIEIAFHBEAgAyEEDAELIAMgBCgCBCIANgIAIAAEQCAAIAM2AgggAygCCCECCyAEIAI2AggCQCACKAIAIANGBEAgAiAENgIADAELIAIgBDYCBAsgBCADNgIEIAMgBDYCCCAEKAIIIQILIARBAToADCACQQA6AAwgAiACKAIEIgEoAgAiADYCBCAABEAgACACNgIICyABIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAE2AgAMAQsgACABNgIECyABIAI2AgAgAiABNgIICwvgBQIFfAJ/IwBBEGsiBiQAAkAgAL1CIIinQf////8HcSIHQfvDpP8DTQRAIAdBgIDA8gNJDQEgACAAIAAgAKIiAKIgACAAIAAgAKKiIABEfNXPWjrZ5T2iROucK4rm5Vq+oKIgACAARH3+sVfjHcc+okTVYcEZoAEqv6CiRKb4EBEREYE/oKCiRElVVVVVVcW/oKKgIQAM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AQQRrIgQoAgAiBygCACICKQMIIgsgCCgCACIFKQMIIgxSBEAgCyAMUw0BDAILIAIpAwAgBSkDAFcNAQsgACgCACEFIAAhAiAEIQAMAQsLIAAoAgAhAiAAIAg2AgAgAkUNACACECILIAFBBGoiBSAGRw0ACwwBCyAAIANBAXYiBkECdCIIaiEHIAMgBUwEQCAAIAcgAiAGIAQQtQMgByABIAIgAyAGayAEIAhqIgIQtQMgCSADNgIMIAQgA0ECdGohBQJAIAQiASACIgNHBEADQCACIAVGBEAgASADRg0DA0AgASgCACEFIAFBADYCACAAKAIAIQIgACAFNgIAIAIEQCACECILIABBBGohACABQQRqIgEgA0cNAAsMAwsCQAJAAkAgASgCACIHKAIAIgYpAwgiCyACKAIAIggoAgAiCikDCCIMUgRAIAsgDFMNAQwCCyAGKQMAIAopAwBXDQELIAJBADYCACAAKAIAIQYgACAINgIAIAYEQCAGECILIAJBBGohAgwBCyABQQA2AgAgACgCACEGIAAgBzYCACAGBEAgBhAiCyABQQRqIQELIABBBGohACABIANHDQALCyACIAVGDQADQCACKAIAIQMgAkEANgIAIAAoAgAhASAAIAM2AgAgAQRAIAEQIgsgAEEEaiEAIAJBBGoiAiAFRw0ACwsgCUEMaiAEELQDDAELIAAgByACIAYgBCAFELABIAcgASACIAMgBmsiAyAEIAUQsAEgACAHIAEgAiAGIAMgBCAFELkCCyAJQRBqJAALHQECfyAAKAIEIAAoAgAiAmtBDG0EQCAAIAIQewsLFwAgAEHomgI2AgAgAEEEaiABENEEIAALNQEBfyABIAAoAgQiAkEBdWohASAAKAIAIQAgASACQQFxBH8gASgCACAAaigCAAUgAAsRBAALSgAgACABKAIANgIAIAAgASgCBDYCBCABQgA3AwAgACABKAIINgIIIAAgASgCDDYCDCABQgA3AwggAEEQaiABQRBqQTD8CgAAIAALvAUCBX8CfCMAQSBrIgUkAAJAAkACQCACDgMCAgABCyABQRBrKwMAIAArAwhjRQ0BIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAg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AXwBfiMAQRBrIgYkAAJAAkACQCACDgMCAgABCyABQRBrIgErAwAgACsDAGRFDQEgBiAAKQMINwMIIAYgACkDADcDACAAIAEpAwg3AwggACABKQMANwMAIAEgBikDCDcDCCABIAYpAwA3AwAMAQsgAkGAAUwEQCAAIAFGDQEgAEEQaiIDIAFGDQEgACEEA0AgAyEFIAQrAxAiCiAEKwMAZARAIAQpAxghCyADIQIDQAJAIAIgBCIDKQMINwMIIAIgAykDADcDACAAIANGBEAgACEDDAELIAMhAiAKIANBEGsiBCsDAGQNAQsLIAMgCzcDCCADIAo5AwALIAEgBSIEQRBqIgNHDQALDAELIAIgAkEBdiIHayEIIAAgB0EEdCIJaiEFAkAgAiAETARAIAAgBSAHIAMQrwQgBSABIAggAyAJaiIBEK8EIAMgAkEEdGohBCABIQIDQCACIARGBEAgASADRg0EA0AgACADKQMINwMIIAAgAykDADcDACAAQRBqIQAgA0EQaiIDIAFHDQALDAQLAkAgAisDACADKwMAZARAIAAgAikDCDcDCCAAIAIpAwA3AwAgAkEQaiECDAELIAAgAykDCDcDCCAAIAMpAwA3AwAgA0EQaiEDCyAAQRBqIQAgASADRw0ACwwBCyAAIAUgByADIAQQxQEgBSABIAggAyAEEMUBIAAgBSABIAcgCCADIAQQ6wIMAQsgAiAERg0AA0AgACACKQMINwMIIAAgAikDADcDACAAQRBqIQAgAkEQaiICIARHDQALCyAGQRBqJAALvQQCBH8BfgJAAkACQCADDgMCAgABCyACKAIAKAIAIgIgAUEEayIBKAIAIgNBA3RqKQMAIAIgACgCACIEQQN0aikDAFoNASAAIAM2AgAgASAENgIADwsgA0GAAUwEQCAAIAFGDQEgAEEEaiIEIAFGDQEgAigCACgCACEGIAAhAwNAIAQiByECIAYgAygCBCIIQQN0aikDACIKIAYgAygCACIFQQN0aikDAFQEQANAAkAgAiAFNgIAIAAgAyIERgRAIAAhBAwBCyAEIQIgCiAGIARBBGsiAygCACIFQQN0aikDAFQNAQsLIAQgCDYCAAsgByIDQQRqIgQgAU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cNAAsMBAsCQAJAIAIrAwAiCiADKwMAIgtjRQRAIAogC2INASACKAIMIAMoAgxODQELIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBGGohAgwBCyAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADQRhqIQMLIABBGGohACABIANHDQALDAELIAAgBSAHIAMgBBDLASAFIAEgCCADIAQQywEgACAFIAEgByAIIAMgBBCCAwwBCyACIARGDQADQCAAIAIpAxA3AxAgACACKQMINwMIIAAgAikDADcDACAAQRhqIQAgAkEYaiICIARHDQALCyAGQSBqJAALVgEDfyABIABrIgJBGG0hAwJAIAJBgRhOBEAgAyECA0AgAkEYbBBQIgQNAiACQQF2IgINAAsLIAAgASADQQBBABDLAQ8LIAAgASADIAQgAhDLASAEECILOAEBfyAABEAgACgCABDNASAAKAIEEM0BIAAoAhQiAQRAIAAgATYCGCAAKAIcGiABECILIAAQIgsL8gECCHwCfyABKwMAIQYgAisDACEHIAAgASsDCCIFIAMrAwgiCCACKwMIIgkgBaEiC5kgBCsDCCIKIAihIgyZYyIOGyAJIAogDhsgCCAFoSIFmSAKIAmhIgiZYyINGyALIAwgDhsgBSAIIA0bIAUgCKGjIgVEAAAAAAAAAAAgBb1C////////////AINCgICAgICAgPj/AFQbIgWioDkDCCAAIAYgByANGyAHIAahIAWioDkDACAAIAErAxAiBiACKwMQIgcgDRsgBSAHIAahoqA5AxAgACADKwMQIgYgBCsDECIHIA0bIAUgByAGoaKgOQMYC4UEAgZ/An0gAigCACEGIAACfwJAIAEoAgQiBEUNACABKAIAAn8gBEEBayAGcSAEaSIFQQFNDQAaIAYgBCAGSw0AGiAGIARwCyIHQQJ0aigCACICRQ0AIAIoAgAiAkUNACAEQQFrIQggBUEBSyEJA0ACQCAGIAIoAgQiBUcEQAJAIAlFBEAgBSAIcSEFDAELIAQgBUsNACAFIARwIQULIAUgB0cNAwwBCyACKAIIIAZHDQBBAAwDCyACKAIAIgINAAsLQQwQIyICIAY2AgQgAkEANg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XIAsgDllyRQRAQQEgBmshBgwDCyAIIAIgBRCHASIIDQELIAkhAgwFC0EBIAZrIAYgByAIQQBOc0EBcRshBiAFKQMIIQwLIAdBAXMhBwwBCwtBASECIAlBAUYNAwwBC0ECIQIgCUECRw0AQQAhAgwCCyAFKAIQIgUgAEcNAAsgA0EUaiAAELsDIANBCGogARC7A0EAIQICQCADKAIUIgQgAygCGCIBRg0AQQAhBQJAA0ACQAJAAkAgBCADQQhqELoDIgBBAWsOAgEAAgtBACECIAVBAkYNBCAAIQUgBEEQaiIEIAFHDQIMBAtBASECIAVBAUYNAyAAIQUgBEEQaiIEIAFHDQEMAgsgBEEQaiIEIAFHDQALQQAhAiAFQQFHDQELAn4gAygCFCICIAMoAhgiAEYEQEIAIQtCAAwBC0KAgICAgICAgIB/IQtC////////////ACENQv///////////wAhDEKAgICAgICAgIB/IQ8DQCACKQMIIgogCyAKIAtVGyELIAogDCAKIAxTGyEMIAIpAwAiCiAPIAogD1UbIQ8gCiANIAogDVMbIQ0gAkEQaiICIABHDQALIAsgDHxCAn8hCyANIA98QgJ/CyEKIAMgCzcDKCADIAo3AyAgA0EgaiADQQhqELoDQQFGIQILIAMoAggiAARAIAMgADYCDCADKAIQGiAAECILIAMoAhQiAEUNACADIAA2AhggAygCHBogABAiCyADQTBqJAAgAgvdAgEGfyMAQSBrIgYkAEHQABAjIgRBAEHQAPwLACAEIAAoAoQBIgEgACgCgAEiA2tBAnUiAjYCAAJAAkAgACgCiAEiBSABSwRAIAEgBDYCACABQQRqIQMMAQsgAkEBaiIBQYCAgIAETw0BIAZBDGpB/////wMgBSADayIDQQF1IgUgASABIAVJGyADQfz///8HTxsgAiAAQYABahBKIgEoAggiAiAENgIAIAEgAkEEajYCCCABKAIEIAAoAoQBIAAoAoABIgVrIgJrIQMgAgRAIAMgBSAC/AoAAAsgACgCgAEhAiAAIAM2AoABIAEgAjYCBCAAIAEoAggiAzYChAEgASACNgIIIAAoAogBIQUgACABKAIMNgKIASABIAI2AgAg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AgASADbEYNASAAIANBCmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBDGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBEGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBEmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBFmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBHGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBHmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBJGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBKGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBKmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBLmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBNGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBOmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBPGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBwgBqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQcYAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HIAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBzgBqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQdIAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HYAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANB4ABqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQeQAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HmAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANB6gBqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQewAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HwAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANB+ABqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQf4AaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0GCAWoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBiAFqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQYoBaiIBbiICIAF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AAAGADoiEAQfBoIAEgAUHwaE0bQZIPaiEBCyAAIAFB/wdqrUI0hr+iCwoAIAAgABCnA6ILQwAgACAAIAGlIAG9Qv///////////wCDQoCAgICAgID4/wBWGyABIAC9Qv///////////wCDQoCAgICAgID4/wBYGwtNAgF/AXwjAEEQayIFJAAgBSAENgIIIAUgAzYCDCAAKAIQIgBFBEAQZgALIAAgASACIAVBDGogBUEIaiAAKAIAKAIYERgAIAVBEGokAAukAgICfwV+AkAgASgCEEUNAAJAIAEpAzggASkDKFUEQCABKQMwIAEpAyBVDQELIAAgARC9AiABKAIQIgNFDQEgAyAALQB1QQAgAUFAaxD9AUUNAUL///////////8AIQdCgICAgICAgICAfyEIAkAgASgCQCICIAEoAkQiAEYEQEKAgICAgICAgIB/IQVC////////////ACEGDAELQv///////////wAhBkKAgICAgICAgIB/IQUDQCACKQMIIgQgCCAEIAhVGyEIIAQgBiAEIAZTGyEGIAIpAwAiBCAFIAQgBVUbIQUgBCAHIAQgB1MbIQcgAkEQaiICIABHDQALCyABIAg3AzggASAFNwMwIAEgBjcDKCABIAc3AyALQQEhAgsgAgvtBgIGfwR+IwBBIGsiCCQAAkAgAEUNACAAKAIQIgQgAEYNACACRQRAIAQgACgCFEYNAQsgAxC2AyABBH8gAEEUagUgACgCECIAQRBqCygCACEGIAApAwAhCiAAKQMIIQsCQAJAAkAgAygCBCIEIAMoAggiBUkEQCAEIAs3AwggBCAKNwMAIARBEGohBAwBCyAEIAMoAgAiCWtBBHUiB0EBaiIEQYCAgIABTw0BIAhBDGpB/////wAgBSAJayIFQQN1IgkgBCAEIAlJGyAFQfD///8HTxsgByADEDIiBSgCCCIEIAs3AwggBCAKNwMAIAUgBEEQajYCCCAFKAIEIAMoAgQgAygCACIJayIEayEHIAQEQCAHIAkgBPwKAAALIAMoAgAhCSADIAc2AgAgBSAJNgIEIAMgBSgCCCIENgIEIAUgCTYCCCADKAIIIQcgAyAFKAIMNgIIIAUgCTYCACAFIAc2AgwgBRA2CyADIAQ2AgQgACAGRwRAQRRBECABGyEJA0AgCiAGKQMAIg1RIAYpAwgiDCALUXFFBEACQCADKAIIIgUgBEsEQCAEIAw3AwggBCANNwMAIARBEGohBAwBCyAEIAMoAgAiBGtBBHUiB0EBaiIBQYCAgIABTw0EIAhBDGpB/////wAgBSAEayIEQQN1IgUgASABIAVJGyAEQfD///8HTxsgByADEDIhBSAIKAIUIgEgDDcDCCABIA03AwAgCCABQRBqNgIUIAgoAhAgAygCBCADKAIAIgdrIgFrIQQgAQRAIAQgByAB/AoAAAsgAygCACEBIAMgBDYCACAIIAE2AhAgAyAIKAIUIgQ2AgQgCCABNgIUIAMoAgghByADIAgoAhg2AgggCCAHNgIYIAUgATYCACAFEDYLIAMgBDYCBCAMIQsgDSEKCyAGIAlqKAIAIgYgAEcNAAsLAkAgAg0AIAQgAygCAGtBMEcNACAGKAIUIgAgBigCECIBKAIQRw0AIAApAwAiCiABKQMAIgt9QgF8QgJYBEAgACkDCCABKQMIfUIBfEIDVA0DCyAGKQMAQgF8IgwgC31CAlgEQCAGKQMIIAEpAwh9QgF8QgNUDQMLIAwgCn1CAlYNACAGKQMIIAApAwh9QgF8QgNUDQILQQEhBgwCCxAmAAtBACEGCyAIQSBqJAAgBgvDBAIEfgZ/IwBBEGsiCSQAIAEgASkDGCIDNwMIIAEgASkDECIFNwMAIAEgASgCVEEQQRQgASgCMEEAShtqKAIAIgY2AlQgBikDACEEIAYpAwghAiABIAU3AyAgASACNwMYIAEgBDcDECABAnwgAiADUgRAIAEpAxAgBX25IAIgA325owwBC0T////////v/0T////////vfyABKQMQIAVVGws5AyggASgCYARAIAAgASABEH4gASkDCCEDIAEpAxghAgsCQCACIANRBEAgASgCWC0ACA0BQQAhBkEQQRQgASgCMEEAShsiCCABKAJUaigCACIHKQMIIANSDQEgASkDACEFIAEpABAhBCAALQB0QQFxIQACQANAIABBACAHKQMAIgIgBFMgBCAFV0YbRQRAIAEgAjcDECABIAc2AlQgBy0AGEEEcQ0CQQEhBiACI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DCCACIAIpAwAiEjcDICACIAQoAgAoAhQiATYCVCACIAEpAwg3AxggASkDACEQIAIgBDYCWCACIBA3AxAgAgJ8IAIpAxgiESACKQMIIhBSBEAgAikDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAIpAxAgElUbCzkDKCAEKAIALQAYQQJxRQRAIAIhBgwCC0EAIQYMAgtBACEGQQAhAiABQQJxDQELQegAECMiAUEAQegA/AsAIAFBATYCMCABQTRqQQBBKfwLACABIAQoAgAiAikDADcDACACKQMIIRAgAUEBNgIwIAEgEDcDCCABIAEpAwAiEjcDICABIAQoAgAoAhAiAjYCVCABIAIpAwg3AxggAikDACEQIAEgBDYCWCABIBA3AxAgAQJ8IAEpAxgiESABKQMIIhBSBEAgASkDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAEpAxAgElUbCyIcOQMoAkAgBkUEQEEAIQYMAQsCQCAGKQMYIAYpAwhRBEAgBisDKET////////v/2ENAgwBCyAQIBFRBEAgHET////////vf2ENAgwBCyAGKwMoIBxjDQELIAYhAiABIQYMAQsgASECCyACQQE6AFwgAEEcaiEEAkAgACgCHCIBRQRAIAJCADcDQCAAIAI2AhwMAQsgASACEL8CBEADQAJAIAQoAgAiAUHEAGohBCABKAJEIgVFDQAgBSACEL8CDQELCwJAIAEoAmBBAkYEQCABKAJEIgFFDQELIAIgASgCRCIENgJEIAQEQCAEIAI2AkALIAIgATYCQCABIAI2AkQLDAELIAJBADYCQCACIAAoAhwiATYCRCABIAI2AkAgACACNgIcCwJAIAIoAlgtAAhBAUYEQEEAIQUgACgCHCEBAkAgACgCCARAIAEgAkcEQCACKAI4IQQgAigCNCEFA0ACQCABKAJYIgcoAgRBAUYEQCACIAQgASgCMGoiBDYCOAwBCyAHLQAIDQAgAiAFIAEoAjBqIgU2AjQLIAEoAkQiASACRw0ACwsMAQtBACEEAkAgASACRgRAQQAhAQwBCwNAAkAgASgCWCIHKAIEQQFGBEAgBEEBaiEEDAELIAUgBy0ACEEBc2ohBQsgAS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Ig6jRAAAAAAAAAAAIBAgDqMiEL1C////////////AINCgICAgICAgPj/AFQiBBs5AxAgASASIA6jRAAAAAAAAAAAIAQbOQMIIAEgEEQAAAAAAAAAACAEGzkDAAsgAkEBaiICIAlHDQALCyAGKAIAIgAEQCAGIAA2AgQgBigCCBogABAiCyAFQUBrJAALgAEBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARA5IAEgACgCBCIDayIEQQBMDQAgACgCACADQQR0aiEDA0AgAyACKQIINwIIIAMgAikCADcCACADQRBqIQMgBEEBSyAEQQFrIQQNAAsLIAAgATYCBARAIAAQgwELCz4AIAMEQCAAIAMQ8gEgACgCBCEDIAEgAkcEQANAIAMgARAuQRhqIQMgAUEYaiIBIAJHDQALCyAAIAM2AgQLC4gBAQl8IAErAzAhBiABKwMAIQcgASsDGCEIIAErAzghCSABKwMIIQogASsDICELIAAgAisDACIDIAErAxCiIAIrAwgiBCABKwMooqAgAisDECIFIAErA0CioDkDECAAIAMgCqIgBCALoqAgBSAJoqA5AwggACADIAeiIAQgCKKgIAUgBqKgOQMAC0oBAn8gACgCBCICIAAoAggiAUcEQANAIAAgAUEQayIBNgIIIAEQLxogAiAAKAIIIgFHDQALCyAAKAIAIgEEQCAAKAIMGiABECILCzABAn8jAEGgAmsiASQAIAFBCGoQOyICQQ42AkQgACACEO8BIAIQOhogAUGgAmokAAt3AQF/IwBBMGsiAyQAIANBGGogASACEJcCIAMgASACQRhqEJcCIABBMGogASACQTBqEJcCIAAgAykDKDcDECAAIAMpAyA3AwggACADKQMYNwMAIAAgAykDADcDGCAAIAMpAwg3AyAgACADKQMQNwMoIANBMGokAAuMAQECfyAAIAEoAgA2AgACQAJAIAEoAgQiAkUEQCAAQQA2AgQMAQsgAigCBCEBA0ACQCABQX9GBEBBACECDAELIAIgAUEBaiACKAIEIgMgASADRiIBGzYCBCABDQAgAyEBDAELCyAAIAI2AgQgAg0BC0EEEHQiAEG05gE2AgAgAEHA5gFBvQMQCwALIA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QCABIARLBEAgBCAIKQMINwMIIAQgCCkDADcDACAEQRBqIQEMAQsgBCAHKAIAIgRrQQR1IgVBAWoiBkGAgICAAU8NAiAJQQxqQf////8AIAEgBGsiBEEDdSIBIAYgASAGSxsgBEHw////B08bIAUgBxAyIgYoAggiASAIKQMINwMIIAEgCCkDADcDACAGIAYoAghBEGo2AgggBigCBCAAKAJIIAAoAkQiAWsiBWshBCAFBEAgBCABIAX8CgAACyAAKAJEIQUgACAENgJEIAYgBTYCBCAAIAYoAggiATYCSCAGIAU2AgggACgCTCEEIAAgBigCDDYCTCAGIAU2AgAgBiAENgIMIAYQNgsgACABNgJIIANBBHQiBCAAKAI4aiIDKwMIIAArAxAiC6IgAigCACAEaiICKQMIuaAQNPwGIRIgCyADKwMAoiACKQMAuaAQNPwGIRECQCAAKAJMIgIgAUsEQCABIBI3AwggASARNwMAIAFBEGohAgwBCyABIAcoAgAiAWtBBHUiA0EBaiIEQYCAgIABTw0CIAlBDGpB/////wAgAiABayICQQN1IgEgBCABIARLGyACQfD///8HTxsgAyAHEDIiBCgCCCIBIBI3AwggASARNwMAIAQgAUEQajYCCCAEKAIEIAAoAkggACgCRCIBayIDayECIAMEQCACIAEgA/wKAAALIAAoAkQhAyAAIAI2AkQgBCADNgIEIAAgBCgCCCICNgJIIAQgAzYCCCAAKAJMIQEgACAEKAIMNgJMIAQgAzYCACAEIAE2AgwgBBA2CyAAIAI2AkgMAwsgACgCZCIBQQJHIAtEK4cW2c737z9kcQ0BAkACQAJAAkAgAUEBaw4DAwIAAQsgCyAAKwMYRAAAAAAAAPC/oGQNBAsgACACIAMgBBC2AgwECyAAIAIgAyAEAnwgCiALoCAKvUL///////////8Ag0KBgICAgICA+P8AVCALvUL///////////8Ag0KAgICAgICA+P8AWHFFDQAaIAu9IhFCIIinIgJBgIDA/wNrIBGnIgFyRQRAIAoQqQMMAQsgAkEedkECcSIAIAq9IhFCP4inciEEAkAgEUIgiKdB/////wdxIgMgEadyRQRAAkACQCAEQQJr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IQQgASgCBCIAIAEoAggiAk8NASAAIAM2AgAgAEEEaiECDAILIAIoAhAiAARAIAAQIgsgAhAiDAILIAAgASgCACIHa0ECdSIJQQFqIgBBgICAgARPDQIgBkEMakH/////AyACIAdrIgJBAXUiByAAIAAgB0kbIAJB/P///wdPGyAJIAEQSiIAKAIIIgIgAzYCACAAIAJBBGo2AgggACgCBCAEKAIAIAEoAgAiA2siAmshByACBEAgByADIAL8CgAACyABKAIAIQMgASAHNgIAIAAgAzYCBCAEIAAoAggiAjYCACAAIAM2AgggASgCCCEHIAEgACgCDDYCCCAAIAM2AgAgACAHNgIMIAAQUwsgBCACNgIACyAGQSBqJAAMAQsQJgALIAUoAhAiA0UNAyADKAIUIgYgAygCECICKAIQIgRHDQIMAwsgASADRg0CIAIoAhAhBCABKAIUIQYgASEADAALAAsACwsPCwNAIAMoAhAgAxAiIgMNAAsgAUEANgIQC8MCARF+IAIpAwggASkDCCIEfSINIA1CP4ciDoUgDn0iBUL/////D4MiBiABKQMAIgcgACkDAH0iDyAPQj+HIhCFIBB9IghC/////w+DIgl+IgNCIIggBiAIQiCIIgh+fCIRQv////8PgyAJIAVCIIgiCX58IhJCIIYgA0L/////D4OEIAIpAwAgB30iBSAFQj+HIgaFIAZ9IgNC/////w+DIgogBCAAKQMIfSIEIARCP4ciB4UgB30iC0L/////D4MiDH4iE0IgiCAKIAtCIIgiC358IgpC/////w+DIANCIIgiAyAMfnwiDEIghiATQv////8Pg4RRIAggCX4gEUIgiHwgEkIgiHwgAyALfiAKQiCIfCAMQiCIfFFxIA6nIA1CAFVqIBCnIA9CAFVqbCAGpyAFQgBVaiAHpyAEQgBVamxGcQuJAwIEfwJ+An8gASkDICIHIAApAyAiBlIEQCAGIAdTDAELIABBEGoiBSABIAFBEGoiAxCHASICBEAgAkEfdgwBCwJAIAAoAlQiBC0AGEEEcQ0AIAApAxggASkDGFcNACABIAUgBEEQQRQgACgCMEEAShtqKAIAEIcBQQBMDAELAkAgASgCVCICLQAYQQRx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ADcDYCADQQI2AlwgA0IANwJUIANB7ABqQQBBMPwLACADQaABakEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIEIAEQmwEgBCADQThqIgUQ4QEgA0EANgL8ASADQgA3AvQBIARBA0ECIAJBAUYbQQIgA0EsaiICIANB9AFqIgEQ4gEgAyABNgIkIANBJGoQKSAEEGkaQRgQIyIBQbSaAjYCACABQgA3AgQgAUEMaiIGIAIQWyADIAE2AhggAyAGNgIUIAMgAykCFDcDCCAAIANBCGoQaiADIAI2AlAgBBApDAELIANBADYCQCADQgA3AjggA0E4aiADKAJEIgIoAgAiBSACKAIEIgIgAiAFa0EMbRBHIAEoAgQgASgCACIEa0HBAE8EQCADQaABaiEGIANB7ABqIQcgA0HoAGohCEEBIQkDQCADQSRqIAQgCUEGdGoQTSADQQA2AjQgA0IANwIsIAMoAiQhBCAIQQBB6AD8CwAgA0IANwNgIANBAjYCXCADQgA3AlQgB0EAQTD8CwAgBkEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIFIANBOGoiAhCbASAFIAQQ4QEgA0EANgL8ASADQgA3AvQBIAVBAUECIANBLGoiBCADQfQBaiIKEOIBIAMgCjYCTCADQcwAahApIAUQaRogAigCACIKBEAgAiAKEHsgAigCCBogAigCABAiIAJBADYCCCACQgA3AgALIAMgAygCLDYCOCADKQIwIRAgA0EANgI0IAMgEDcCPCADQgA3AiwgAyAENgJQIAUQKQJAIAMoAigiAkUNACACIAIoAgQiBUEBazYCBCAFDQAgAiACKAIAKAIIEQAAIAIQJAsgCUEBaiIJIAEoAgQgASgCACIEa0EGdUkNAAsLQRgQIyIBQbSaAjYCACABQgA3AgQgA0HQAGohBCABQQxqIgIgA0E4aiIFEFsgAyABNgIgIA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DyAEIAmioKIgBCAPIAmiIAQgDaKgIhGioCIJoiAEIA8gEaIgBCAEIA8gDaKgoqAiDaKgIhFEAAAAAAAAAABiBEAgGyARoyEbIBwgEaMhHCAaIBGjIRoLIA1EAAAAAAAAAABiBEAgCyANoyELIAogDaMhCiAIIA2jIQgLIAlEAAAAAAAAAABiBEAgDiAJoyEOIBQgCaMhFCAMIAmjIQwLAkAgCiAUoSIJIAkgCaIgCCAMoSIIIAiioCALIA6hIgkgCaKgnyILoyIMvUL///////////8Ag0L/////////9/8AWARAIAYgDDkD+AEgBiAJIAujOQOIAiAGIAggC6M5A4ACDAELIAZCADcDiAIgBkIANwOAAiAGQgA3A/gBC0QAAAAAAAAAACEOIBKaIBUgFaIgFiAWoqAgEiASoqCfIhGjISQgFSARoyIVvUL///////////8Ag0KAgICAgICA+P8AVCECIAUrAxAhISAFKwMIISIgBSsDACEjIAMrAxAiCSAQIBcgF6IgEyAToqAgECAQoqCfIgijRAAAAAAAAAAAIBcgCKMiC71C////////////AINCgICAgICAgPj/AFQiBRsiECALRAAAAAAAAAAAIAUbIhIgAysDACIKokQAAAAAAAAAAKAgEyAIo0QAAAAAAAAAACAFGyITIAMrAwgiDaKgIBAgCaKgIgiioSIMIAyiIAogEiAIoqEiCyALoiANIBMgCKKhIgggCKKgoCIUIAogCqIgDSANoqAgCSAJoqBEEeotgZmXcT2iYwRAICEgGKEiCCAQIBIgIyAfoSIJokQAAAAAAAAAAKAgEyAiIBmhIgqioCAQIAiioCIIoqEiDCAMoiAJIBIgCKKhIgsgC6IgCiATIAiioSIIIAiioKAhFAtEAAAAAAAAAAAhDUQAAAAAAAAAACEJIAsgFJ8iCqMiC71C////////////AINC//////////f/AFgEQCAIIAqjIQ0gDCAKoyEOIAshCQtEAAAAAAAAAAAhCyADKwMwIgggJEQAAAAAAAAAgCACGyIUIBWaRAAAAAAAAACAIAIbIhcgAysDICIMokQAAAAAAAAAAKAgFpogEaNEAAAAAAAAAIAgAhsiFiADKwMoIhiioC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AAAAKAgHEQAAAAAAADwPyAcoaIiF6AhIiAYIAQrA/gHokQAAAAAAAAAAKAgFyAEKwOwBaKgISMgGCAEKwPwB6JEAAAAAAAAAACgIBcgBCsDqAWioCEkIBggBCsD6AeiRAAAAAAAAAAAoCAXIAQrA6AFoqAhIAsgIkQAAAAAAAAAAGIEQCAjICKjISMgJCAioyEkICAgIqMhIAsgCiAjOQMQIAogJDkDCCAKICA5AwAgIL1C////////////AINC//////////f/AFYgJL1C////////////AINC//////////f/AFZyRSAjvUL///////////8Ag0L/////////9/8AWHENACAKIAQpA5AINwMQIAogBCkDiAg3AwggCiAEKQOACDcDAAsgFkEBaiIWIA9HDQALCyAAQQA2ArwBIABBuAFqEJMBAkAgDSgCvAEgDSgCXEYEQCAAEFogABBYDAELIAAQlAILIAAgAxBUIABBfzYCyAELIAQoAhgiAARAIAAQIgsgDRA6GgsgBEHwCGokAAsfACABBEAgACABKAIAENICIAAgASgCBBDSAiABECILCzoAIAEEQCAAIAEoAgAQ0wIgACABKAIEENMCIAEoAhQiAARAIAEgADYCGCABKAIcGiAAECILIAEQIgsLghMCCn8afCMAQYABayICJAAgASgCBCILBEADQAJAIAEoAgAgCGotAABBAUcNACAAKAK4ASEKIAAoArwBBEAgCiAIQQV0aisDGEQAAAAAAAAAAGMNAQtBACEDIAJBADYCeCACQgA3AnAgAkEANgJoIAJCADcCYEQAAAAAAAAAACEVIAAoAkgiBSAAKAJYIAhBAnRqIgRBeEEEIAhBA3BBAkYbaigCAEEYbGoiCSsDACAFIAQoAgBBGGwiBGoiBSsDACIfoSIOIA4gDqIgCSsDCCAFKwMIIiChIgwgDKKgIAkrAxAgBSsDECIhoSIPIA+ioJ8iE6MiDkQAAAAAAAAAACAOvUL///////////8Ag0KAgICAgICA+P8AVCIFGyEOIAwgE6NEAAAAAAAAAAAgBRshDCAPIBOjRAAAAAAAAAAAIAUbIRMgACgCmAEgBGoiBCsDECEiIAQrAwghIyAEKwMAISRBACEHIAogCEEFdGoiBCsDEC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IEIQULIAUhASACIANHBEADQCABIAMoAgg2AgggASADKQIANwIAIAFBDGohASADQQxqIgMgAkcNAAsLIAAgBSABIAVrajYCBA8LIAIgAWsiA0UgASACRnJFBEAgBCABIAP8CgAACyAAIAMgBGo2AgQPCyAAEEUgA0HWqtWqAUkEQCAAQdWq1aoBIAAoAgggACgCAGtBDG0iBUEBdCIEIAMgAyAESRsgBUGq1arVAE8bEKMCIAAoAgQhAyABIAJHBEADQCADIAEoAgg2AgggAyABKQIANwIAIANBDGohAyABQQxqIgEgAkcNAAsLIAAgAzYCBA8LECYAC9gCAQN/IAAoAgggACgCACIEa0EYbSADTwRAIAAoAgQiBSAEayIGQRhtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACABQRhqIQEgA0EYaiIDIAJHDQALCyAAIAUgASAFa2o2AgQPCyACIAFrIgNFIAEgAkZyRQRAIAQgASAD/AoAAAsgACADIARqNgIEDwsgABBFIANBq9Wq1QBJBEAgAEGq1arVACAAKAIIIAAoAgBrQRhtIgVBAXQiBCADIAMgBEkbIAVB1arVKk8bEPIBIAAoAgQhAyABIAJHBEADQCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACADQRhqIQMgAUEYaiIBIAJHDQALCyAAIAM2AgQPCxAmAAsfACABBEAgACABKAIAEPICIAAgASgCBBDyAiABECILC2EBAn8CQCABKAIEIgNFBEAgASECA0AgAiACKAIIIgIoAgBHDQALDAELA0AgAyICKAIAIgMNAAsLIAEgACgCAEYEQCAAIAI2AgALIAAgACgCCEEBazYCCCAAKAIEIAEQxAQL1AMBCn8jAEEgayIEJAAgBEIANwIYIAQgBEEYaiIKNgIUIAEgAkcEQCABIQUDQCAEIAUoAgA2AgggBCAFIAFrQQR1NgIMQRgQIyIIIAQoAggiDTYCECAIIAQoAgw2AhQCQCAEQRRqIgsoAgQiCUUEQCALQQRqIgYhBw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BGogAmooAgBBBHRqIhAoAgRBGGwiDmorAwCaZCAOIBZqIg4rAwAiCCAGYyAGIAhhGyAKIBUgECgCCEEYbCITaisDAJpkIBMgFmoiEysDACIJIAZjIAYgCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBAoAgAhGCAOKwMQIQcgDisDCCEFAkAgBiAIoSILIAYgCaEiDCALmSAMmWMiDhsgCSAIoaMiCL1C////////////AINC//////////f/AFYNACATKwMIIgkgBaEiC71C////////////AINCgICAgICAgPj/AFoNACATKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgDhsgCCANoqAhByAFIAkgDhsgCCALoqAhBQsgGUEAIBEoAqgBIg4gGEEDbUEYbGorAwggDiARKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAUgFCsDCCIIYyAFIAhhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AIA5BACAOayAQLQAMGyASaiESIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIQIAc5AxAgECAHOQMIIBAgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyASRQRARAAAAAAAAPh/IQVBAAwBCyASQQAgESgCqAEgA0EYbGorAxBEAAAAAAAAAABkIA8rAyAiBSAPKwM4IgYgFCsDCCIHIA8rAxAiCKEiCZkgByAPKwMoIgehIgqZYyIBGyAGIAWhIgYgCSAKIAEbIAcgCKGjIgeioCAFIAa9Qv///////////wCDQoCAgICAgID4/wBUGyAFIA8rAzAgDysDGKG9Qv///////////wCDQoCAgICAgID4/wBUGyAFIAe9Qv///////////wCDQoCAgICAgID4/wBUGyIFIBQrAxAiBmMgBSAGYRsbCyEBIAAgBTkDCCAAIAE2AgALsgkBDn8jAEEQayIRJAACQCAFRQ0AA0ACQAJAIAUgB0wgBCAHTHJFBEAgBEUNBCADKAIAKAIAIg0gASgCACILQQN0aiIIQQEgA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iADIAQgBSAGIAcQhwMgCiEFIAwhBCAIIQIgCQshASAFDQEMAgsLIAEgAkYNACAGIQQgASEIA0AgBCAIKAIANgIAIARBBGohBCAIQQRqIgggAkcNAAsgAygCBCELIAMoAgAhCQNAIAAgASIDRgRAA0AgAkEEayICIARBBGsiBCgCADYCACAEIAZHDQAMAwsACwJAIAkoAgAiCiAEQQRrIgcoAgAiCEEDdGoiDCALKAIAIg1BAnQiAWooAgAiDiABIAogA0EEayIBKAIAIgVBA3RqIgpqKAIAIg9IDQAgDiAPRgRAIAxBASANa0ECdCINaigCACAKIA1qKAIASA0BCyAIIQUgAyEBIAchBAsgAkEEayICIAU2AgAgBCAGRw0ACwsgEUEQaiQAC5QHAgl8DH8jAEFAaiIPQRBqQQBBMPwLACAPQQI2AgwgD0KAgICAEDcCBCACQRhsIgIgASgCACIOKAKYAWorAwAhCiAOKAJIIAJqIhQrAwAhBiABKAIEIhEoApgBIRUgESgCSCEWQQAhAUEAIQIDQAJ/IBUgBCAPQQRqIAJqKAIAQQR0aiIQKAIEQRhsIg5qKwMAIApjIA4gFmoiDisDACIIIAZjIAYgCGEbIBUgECgCCEEYbCITaisDACAKYyATIBZqIhMrAwAiCSAGYyAGIAlhG2siGUUEQEQAAAAAAAD4fyEFRAAAAAAAAPh/IQdBAAwBCyAQKAIAIRggDisDECEHIA4rAwghBQJAIAYgCKEiCyAGIAmhIgwgC5kgDJljIg4bIAkgCKGjIgi9Qv///////////wCDQv/////////3/wBWDQAgEysDCCIJIAWhIgu9Qv///////////wCDQoCAgICAgID4/wBaDQAgEysDECIMIAehIg29Qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIA4bIAggDaKgIQcgBSAJIA4bIAggC6KgIQULIBlBACARKAKoASIOIBhBA21BGGxqKwMIIA4gESgCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAYyAFIBQrAwgiCGMgBSAIYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNACAOQQAgDmsgEC0ADBsg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hFSASKAJIIRZBACEBQQAhAgNAAn8gFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwAgC2QgCCAOIBZqIg4rAwAiBmMgBiAIYRsgFSARKAIEQRhsIhBqKwMAIAtkIAggECAWaiIQKwMAIgljIAggCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBEoAgAhGCAQKwMQIQcgECsDCCEFAkAgCCAJoSIKIAggBqEiDCAKmSAMmWMiEBsgBiAJoaMiBr1C////////////AINC//////////f/AFYNACAOKwMIIgkgBaEiCr1C////////////AINCgICAgICAgPj/AFoNACAOKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgEBsgBiANoqAhByAFIAkgEBsgBiAKoqAhBQsgGUEAIBIoAqgBIg4gGEEDbUEYbGorAwggDiASKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIBQrAwgiBiAFYyAFIAZhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AQQAgDmsgDiARLQAMGyATaiETIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIRIAc5AxAgESAHOQMIIBEgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyATRQRARAAAAAAAAPh/IQVBAAwBCyATQQAgEigCqAEgA0EYbGorAxBEAAAAAAAAAABkIBQrAxAiCCAPKwMgIgUgDysDOCIHIBQrAwgiBiAPKwMQIgmhIguZIAYgDysDKCIGoSIKmWMiARsgByAFoSIHIAsgCiABGyAGIAmhoyIGoqAgBSAHvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAPKwMwIA8rAxihvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAGvUL///////////8Ag0KAgICAgICA+P8AVBsiBWMgBSAIYRsbCyEBIAAgBTkDCCAAIAE2AgALsgkBDn8jAEEQayIRJAACQCAFRQ0AA0ACQAJAIAUgB0wgBCAHTHJFBEAg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IAMgDCAKIAYgBxCLAyAIIQAgCwwBCyAIIAsgAiADIAQgBSAGIAcQiwMgCiEFIAwhBCAIIQIgCQshASAFDQEMAgsLIAEgAkYNACAGIQQgASEIA0AgBCAIKAIANgIAIARBBGohBCAIQQRqIgggAkcNAAsgAygCBCELIAMoAgAhCQNAIAAgASIDRgRAA0AgAkEEayICIARBBGsiBCgCADYCACAEIAZHDQAMAwsACwJAIAkoAgAiCiAEQQRrIgcoAgAiCEEDdGoiDCALKAIAIg1BAnQiAWooAgAiDiABIAogA0EEayIBKAIAIgVBA3RqIgpqKAIAIg9IDQAgDiAPRgRAIAxBASANa0ECdCINaigCACAKIA1qKAIASA0BCyAIIQUgAyEBIAchBAsgAkEEayICIAU2AgAgBCAGRw0ACwsgEUEQaiQAC5QHAgl8DH8jAEFAaiIPQRBqQQBBMPwLACAPQQI2AgwgD0KAgICAEDcCBCACQRhsIgIgASgCACIOKAKYAWorAwAhCyAOKAJIIAJqIhQrAwAhCCABKAIEIhIoApgBIRUgEigCSCEWQQAhAUEAIQIDQAJ/IAsgFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwBjIAggDiAWaiIOKwMAIgZjIAYgCGEbIAsgFSARKAIEQRhsIhBqKwMAYyAIIBAgFmoiECsDACIJYyAIIAlhG2siGUUEQEQAAAAAAAD4fyEFRAAAAAAAAPh/IQdBAAwBCyARKAIAIRggECsDECEHIBArAwghBQJAIAggCaEiCiAIIAahIgwgCpkgDJljIhAbIAYgCaGjIga9Qv///////////wCDQv/////////3/wBWDQAgDisDCCIJIAWhIgq9Qv///////////wCDQoCAgICAgID4/wBaDQAgDisDECIMIAehIg29Qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIBAbIAYgDaKgIQcgBSAJIBAbIAYgCqKgIQULIBlBACASKAKoASIOIBhBA21BGGxqKwMIIA4gEigCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAUKwMIIgYgBWMgBSAGYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNAEEAIA5rIA4gES0ADBsgE2ohEyABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiESAHOQMQIBEgBzkDCCARIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gE0UEQEQAAAAAAAD4fyEFQQAMAQsgE0EAIBIoAqgBIANBGGxqKwMQRAAAAAAAAAAAZCAUKwMQIgggDysDICIFIA8rAzgiByAUKwMIIgYgDysDECIJoSILmSAGIA8rAygiBqEiCpljIgEbIAcgBaEiByALIAogARsgBiAJoaMiBqKgIAUgB71C////////////AINCgICAgICAgPj/AFQbIAUgDysDMCAPKwMYob1C////////////AINCgICAgICAgPj/AFQbIAUgBr1C////////////AINCgICAgICAgPj/AFQbIgVjIAUgCGEbGwshASAAIAU5AwggACABNgIAC/wHAw9/A3wDfiMAQdABayIEJAAgBEGgAWpBAEEw/AsAIARB8ABqQQBBMPwLACABKAIAIhAoAlggAkECdGoiBUF4QQQgAkEDb0ECRhtqKAIAIQ8gBSgCACEMIAEoAgQhBSAEQQI2AhAgBEKAgICAEDcCCCAFKAJYIg0gA0EDbCIOQQJ0aiERIAUoAmghEgNAQQEhCQJAIA0gBEEIaiAGaigCACIKIA5qIgtBAnQiB2ooAgAiBSARQQRBCCAKQQFGG0EAIAobQYzpAGooAgBBAnRqKAIAIghIBEAgBSEHIAghBQwBCyAHIBJqKAIAIQtBACEJIAghBwsgBEFAayAKQQR0aiIIIAk6AAwgCCAFNgIIIAggBzYCBCAIIAs2AgAgBkEEaiIGQQxHDQALIAQgDzYCOCAEIAw2AjQgAUEIaiENQQAhBkEAIQdBACEIQQAhCQNAIARBCGogDSAEQTRqIAhqKAIAIgsgAyAEQUBrEIoDAkAgBCsDECITvUL///////////8Ag0L/////////9/8AVg0AIAQoAggiCkEAIAprIAsgDEYbIAlqIQkgBkEBSgRAQQIhBgwBCyAGRSAHIApFc0EBcUVyRQRAQQEhBgwBCyAGQ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CABNgIEIAwoAggaIAEQIgsgBkGQAWokACAVIAsQgQUgBSgCRCIBRQ0AIAEQIgsgBUGwAWokACAACzQBAX8gAUGAgICAAU8EQBAmAAsgACABQQR0IgIQIyIBNgIEIAAgATYCACAAIAEgAmo2AggLNAEBfyABQYCAgIACTwRAECYACyAAIAFBA3QiAhAjIgE2AgQgACABNgIAIAAgASACajYCCAtIAQF/IABBADYCCCAAQgA3AgAgAQRAIAAgARDyASAAKAIEIgIgAUEYbGohAQNAIAIQ6wFBGGoiAiABRw0ACyAAIAE2AgQLIAALRAEBfyAAQQA2AgggAEIANwIAIAEEQCAAIAEQjwMgACgCBCECIAFBBHQiAQRAIAJBACAB/AsACyAAIAEgAmo2AgQLIAAL5SEDFH8BfAx9IwBBgAFrIgQkACAAQgA3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMAQJAAkAgAkUNACACLQAQQQFHDQAgAEEOECwMAQsgASgCFCABKAIQa0ECdSIRQQNuIg8gASgCCCIHIAEoAgQiBWtBAnUgASgCACIDbiINckUEQCAAQQAQLAwBCyARQQtLIA1BBE9xRQRAIABBAhAsDAELIANBAk0EQCAAQQUQLAwBCyABKAIgIgwgASgCHCIKayABKAIsIAEoAihrRwRAIABBBhAsDAELAkAgASgCTCIDIAEoAlAiBkYEQCABKAJEIQggASgCQCEJDAELIAEoAkQiCCABKAJAI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wBBEGsiAiQAIAJBCGoiAyABQfgQED8gAigCDCADEKoCIQMgAigCDCIEQQlPBEAgBBABCyAAQQA2AgggAEIANwIAIAAgAxB9IAIgACgCADYCBCACIAM2AgAgAkEIaiACEI0CIAIoAgwgASgCBBAUIAIoAgwiAEEJTwRAIAAQAQsgAkEQaiQAC1sBA38jAEEgayIDJAAgASAAKAIEIgVBAXVqIQEgACgCACEAIANBCGoiBCABIAIgBUEBcQR/IAEoAgAgAGooAgAFIAALEQMAQRgQIyAEEC4gBBAoGiADQSBqJAALMwEDf0EEECMiAiABNgIAQZjxASAAQQNBACEAQdSGAiAAQbncAGpBsgIgAkEAQQBBABAAC0sBAn8gACgCBCIGQQh1IQcgACgCACIAIAEgAiAGQQFxBH8gAygCACAHaigCAAUgBwsgA2ogBEECIAZBAnEbIAUgACgCACgCFBEIAAtRAQF/AkAgAUUNACABQdjoARBiIgFFDQAgASgCCCAAKAIIQX9zcQ0AIAAoAgwoAgQgASgCDCgCBEcNACAAKAIQKAIEIAEoAhAoAgRGIQILIAILewEDfyAAKAIEIgRBAXEhBgJ/IAEtADdBAUYEQCAEQQh1IgUgBkUNARogAigCACAFaigCAAwBCyAEQQh1IAZFDQAaIAEgACgCACgCBDYCOEEAIQJBAAshBSAAKAIAIgAgASACIAVqIANBAiAEQQJxGyAAKAIAKAIcEQUACwsAIAEgAiAAEQEACw0AIAAoAgQgASgCBEYLQAECfyMAQRBrIgIkACMAQRBrIgEkACABIAA2AgwgAUEMakEEEPcBIAFBEGokACACQRBqJABBH3FBAnRB0JwCagtoAQN/IwBBEGsiAyQAIANBADoADiABIABrQQJ1IQEgAigCACEEA0AgAQRAIAEgAUEBdiICQX9zaiACIAAgAkECdGoiAigCACAESSIFGyEBIAJBBGogACAFGyEADAELCyADQRBqJAAgAAvsBAMEfwV+AXwgAkEANgIAAkAgAb1C////////////AINCgICAgICAgPj/AFYgAUQAAAAAAAAAAGFyRQRAIAC9IglCNIinQf8PcSIDQf8PRw0BCyAAIAGiIgAgAKMPCwJAIABEAAAAAAAAAABhDQAgAb0iCkI0iKdB/w9xIQQCfiADRQRAQQAhAyAJQgyGIgdCAFkEQANAIANBAWshAyAHQgGGIgdCAFkNAAsLIAlBASADa62GDAELIAlC/////////weDQoCAgICAgIAIhAshBwJ+IARFBEBBACEEIApCDIYiCEIAWQRAA0AgBEEBayEEIAhCAYYiCEIAWQ0ACwsgCkEBIARrrYYMAQsgCkL/////////B4NCgICAgICAgAiECyEIAn4CQAJAIAMgBE4EQCADIARKBEADQCAHIAh9IgsgByALQgBZIgYbQgGGIQcgBSAGckEBdCEFIANBAWsiAyAESg0ACyAEIQMLIAUgByAIfSIIQgBZIgZyIQUgCCAHIAYbIgdQBEBBRCEDQgAhBwwDCyAHQv////////8HVg0BA0AgA0EBayEDIAciCEIBhiEHIAhCgICAgICAgARUDQALDAELIANBAWogBEcNAwsgA0EATA0AIAdCgICAgICAgAh9IAOtQjSGhAwBCyAHQQEgA2utiAsgAZkhAL8hAQJAAkAgAyAERg0AIANBAWogBEcNASABIAGgIgwgAGQNACAFQQFxRSAAIAxicg0BCyAFQQFqIQUgASAAoSEBCyACQQAgBUH/////B3EiAmsgAiAJIAqFQgBTGzYCACABmiABIAlCAFMbIQALIAALGwAgAEIBhkKAgICAgICAEHxCgYCAgICAgBBUCxUBAX8jAEEQayIBIAA5AwggASsDCAvaFgMSfwR8AX4jAEEwayIJJAACQAJAAkAgAL0iGEIgiKciA0H/////B3EiBkH61L2ABE0EQCADQf//P3FB+8MkRg0BIAZB/LKLgARNBEAgGEIAWQRAIAEgAEQAAEBU+yH5v6AiAEQxY2IaYbTQvaAiFDkDACABIAAgFKFEMWNiGmG00L2gOQMIQQEhAwwFCyABIABEAABAVPsh+T+gIgBEMWNiGmG00D2gIhQ5AwAgASAAIBShRDFjYhphtNA9oDkDCEF/IQMMBAsgGEIAWQRAIAEgAEQAAEBU+yEJwKAiAEQxY2IaYbTgvaAiFDkDACABIAAgFKFEMWNiGmG04L2gOQMIQQIh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6IgBiAHfbkiBSAFoqCfoyIEIAOaoiEDIAQgBaILIQQgACADOQMIIAAgBDkDAAuACAMIfwF8Bn4jAEEQayIGJAAgAEEANgIIIABCADcCACAAIAEoAgAiAyABKAIEIgEgASADa0EMbRBHIABBADYCHCAAIAI2AhggAEEAOgAUIABBADoAECAAQQA6AAwCQCAAKAIAIgIgACgCBCIHRwR/A0ACQAJAAkAgAigCACIBIAIoAgQiBEYNAANAIAEiA0EQaiIBIARGDQEgAykDACADKQMQUg0AIAMpAwggAykDGFINAAsMAQsgASIDIARHDQAgBiAENgIIIAYgBDYCBAwBCyAEIANBIGoiAUcEQCADQRBqIQUDQAJAIAMpAwAgASkDAFEEQCADKQMIIAUpAxhRDQELIAMgASkDCDcDGCADIAEpAwA3AxAgA0EQaiEDCyABIQUgAUEQaiIBIARHDQALCyAGIAQ2AgggBiADQRBqNgIECyAGKAIEIgMgAigCBCIBRwRAIAEgAyABIANraiIFayIERSABIAVGckUEQCADIAUgBPwKAAALIAIgAyAEaiIBNgIECwJAIAEgAigCACIFa0ERSQ0AIAUpAwAhDANAIAFBEGsiAykDACAMUg0BIAFBCGspAwAgBSkDCFINASACIAM2AgQgAyIBIAVrQRBLDQALCyACQQxqIgIgB0cNAAsgACgCHAVBAAtFBEBBACEFIAAtABBBAUYEQCAAQQA6ABALIAAoAgQiAiAAKAIAIgRHBEBC////////////ACEOQoCAgICAgICAgH8hDQNARP///////+9/IQsgBCAFQQxsIglqIgEoAgAiAyABKAIEIgpHBEACQANAAkAgAykDCCIMIA1TDQAgDCANUQRAIAMpAwAgDlkNAQsgC0T////////vf2EEQCAAKAIAIgQgCWoiASgCBCIHIAEoAgAiAWsiCEEhSQ0DAkAgB0EQayICIAcgCEEQcSIHGyIIIAFGBEBEAAAAAAAAAAAhCwwBCyACKQMAIQxEAAAAAAAAAAAhCwNAIAEpAwgiDyABKQMYfLkgASkDACIQIAEpAxAiEX25oiAPIAIpAwh8uSAMIBB9uaIgC6CgIQsgAUEQaiECIB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QNwMIIAEgAykDCDcDACAEIAAgAigCABECAEUNBCADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAQpAxA3AxAgACAEKQMINwMIIAAgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDAAwECyAFBEAgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMBAsgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAEKQMQNwMQIAAgBCkDCDcDCCAAIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAEIAIoAgARAgBFDQMgAyAEKQMQNwMYIAMgBCkDCDcDECADIAQpAwA3AwggBCABKQMQNwMQIAQgASkDCDcDCCAEIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAwsgAUEYayEFIABBGGoiASAAIAIoAgARAgAhCCAAQTBqIgQgASACKAIAEQIAIQYCQCAIRQRAIAZFDQEgAyABKQMQNwMYIAMgASkDCDcDECADIAEpAwA3AwggASAEKQMQNwMQIAEgBCkDCDcDCCABIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAAIAIoAgARAgBFDQEgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAQsgBgRAIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgBCkDEDcDECAAIAQpAwg3AwggACAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMADAELIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgAykDGDcDECABIAMpAxA3AwggASADKQMINwMAIAQgASACKAIAEQIARQ0AIAMgASkDEDcDGCADIAEpAwg3AxAgAyABKQMANwMIIAEgBCkDEDcDECABIAQpAwg3AwggASAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMACyAFIAQgAigCABECAEUNAiADIAQpAxA3AxggAyAEKQMINwMQIAMgBCkDADcDCCAEIAUpAxA3AxAgBCAFKQMINwMIIAQgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDACAEIAEgAigCABECAEUNAiADIAEpAxA3AxggAyABKQMINwMQIAMgASkDADcDCCABIAQpAxA3AxAgASAEKQMINwMIIAEgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACABIAAgAigCABECAEUNAiADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAMpAxg3AxAgASADKQMQNwMIIAEgAykDCDcDAAwCCyAAIABBGGogAEEwaiAAQcgAaiABQRhrIAIQsgMMAQsgAEEYaiIFIAAgAigCABECACEIIABBMGoiBCAFIAIoAgARAgAhBgJAIAhFBEAgBkUNASADIAUpAxA3AxggAyAFKQMINwMQIAMgBSkDADcDCCAFIAQpAxA3AxAgBSAEKQMINwMIIAUgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACAFIAAgAigCABECAEUNASADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAUpAxA3AxAgACAFKQMINwMIIAAgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDAAwBCyAGBEAgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAEKQMQNwMQIAAgBCkDCDcDCCAAIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAMAQsgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAFKQMQNwMQIAAgBSkDCD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g3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMACwJAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMACwJAIAQgAyAFKAIAEQIARQ0AIAYgAykDEDcDGCAGIAMpAwg3AxAgBiADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBikDGDcDECAEIAYpAxA3AwggBCAGKQMINwMAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMI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ADYCACAEIAM2AgAgAEEEaiEACyAEQQRqIQQgACACRw0ACwsgASAFRg0AA0AgBSgCACEAIAVBADYCACAEIAA2AgAgBEEEaiEEIAVBBGoiBSABRw0ACwsLDwsgAEEANgIAIAQgAjYCACABKAIAIQAgAUEANgIAIAQgADYCBAseAQJ/IAAoAgQgACgCACICa0EEdQRAIAAgAjYCBAsLjzMBCn8jAEEgayIFJAADQCABQcgAayEKIAFBMGshDCABQRhrIQkCQANAAkACQAJAAkACQCABIABrIghBGG0iBg4GBgYAAQIDBAsgAUEYayIBIAAgAigCABECAEUNBSAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAAQRhqIgMgACACKAIAEQIAIAFBGGsiASADIAIoAgARAgAhBEUEQCAERQ0FIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgASkDEDcDECADIAEpAwg3AwggAyABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3AwggASAFKQMINwMAIAMgACACKAIAEQIARQ0FIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMADAULIAQEQCAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAMgAigCABECAEUNBCAFIAMpAxA3AxggBSADKQMINwMQIAUgAykDADcDCCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwECyABQRhrIQQgAEEYaiIBIAAgAigCABECACEIIABBMGoiAyABIAIoAgARAgAhBgJAIAhFBEAgBkUNASAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAAgAigCABECAEUNASAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCyAGBEAgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACADKQMQNwMQIAAgAykDCDcDCCAAIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwAMAQsgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAFKQMYNwMQIAEgBSkDEDcDCCABIAUpAwg3AwAgAyABIAIoAgARAgBFDQAgBSABKQMQNwMYIAUgASkDCDcDECAFIAEpAwA3AwggASADKQMQNwMQIAEgAykDCDcDCCABIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwALIAQgAyACKAIAEQIARQ0DIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBSkDGDcDECAEIAUpAxA3AwggBCAFKQMINwMAIAMgASACKAIAEQIARQ0DIAUgASkDEDcDGCAFIAEpAwg3AxAgBSABKQMANwMIIAEgAykDEDcDECABIAMpAwg3AwggASADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMAIAEgACACKAIAEQIARQ0DIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwM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BiQAIAZCADcDECAGQgA3AwggASgCMCEDIAEoAlQiAikDCCEQAkAgASgCWC0ACCIOQQFGBEAgA0EASgRAA0AgAiIDKAIQIgIpAwggEFINAyADLQAYQQZxRQ0ADAMLAAsDQCACIgMoAhQiAikDCCAQUg0CIAMtABhBBnFFDQALDAELIANBAEoEQANAIAIiAygCECICKQMIIBBRDQAMAgsACwNAIAIiAygCFCICKQMIIBBRDQALCyADKAIYQR10QR91IANxIQkgASkDICEQAn4CQCABKQMQIhIgASkDAFEEQCABIQIDQCACKAJEIgJBAEchAyACRQ0CIAIoAlQgCUcNAAsMAQsgECASIBAgElUbIRUgECASIBAgElMiAxsMAQsgECEVIBALIRICQAJAIAEoAjxFDQAgBiABKQMINwMgIAYgEDcDGCABIAZBGGoQYyIHKAIYLQBMDQACQCAAKAJgIgIgACgCZCIFSQRAIAJBAToACCACQQA2AgQgAiAHNgIAIAJBDGohBQwBCyACIABB3ABqIgQoAgAiCmtBDG0iDEEBaiICQdaq1aoBTw0CIAZBGGpB1arVqgEgBSAKa0EMbSIFQQF0IgogAiACIApJGyAFQarVqtUATxsgDCAEEGEiAigCCCIFQQE6AAggBUEANgIEIAUgBzYCACACIAVBDGo2AgggAigCBCAAKAJgIAAoAlwiB2siBUF0bUEMbGohBCAFBEAgBCAHIAX8CgAACyAAKAJcIQcgACAENgJcIAIgBzYCBCAAIAIoAggiBTYCYCACIAc2AgggACgCZCEEIAAgAigCDDYCZCACIAc2AgAgAiAENgIMIAIQ1gELIAAgBTYCYAsgAUEQaiEHIABB3ABqIQogAUFAayEMIAFBxABqIQ0DQAJAAkACQCANIAwgAxsoAgAiAkUNAANAIAkgAigCVEYEQAJAIAEoAjxFDQAgAigCYARAIAAgAiACQRBqEH4gASgCPEUNAQsgCSABKAJURwRAA0AgASAHEGMaIAAgARD+ASABKAJUIAlHDQALCyADBEAgACABIAIgBxCGAQwBCyAAIAIgASAHEIYBCwJAIAIoAkQiAyACKAJAIgVyRQRAIAIgACgCHCIHRw0BCwJAIAUEQCAFIAM2AkQMAQsgACADNgIcCyADBEAgAyAFNgJACyACECIgACgCHCEHCyABKAJEIgIgASgCQCIDckUgASAHR3ENAwJAIAMEQCADIAI2AkQMAQsgACACNgIcCyACBEAgAiADNgJACyABECIMAwsCfwJAAkACQAJAIAkgASgCVCIERw0AIAQtABhBA3ENACACKQMgIRQMAQsgAikDICEUAkAgAwRAIBQgFVcNAQwHCyASIBRVDQYLIBQgBykDAFINACACKQMYIhEgAikDCFENACACQSBqIQUgBiAEQRBBFCABKAIwQQBKG2ooAgAiBCkDCDcDECAGIAQpAwA3AwggAigCWCIELQAIIQgCQCADBEACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFUNCAwCCyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIUw0BDAcLAkACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFkNAQwICyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIVw0HCyAGIAEpAwg3AxAgBiAUNwMIDAMLIAYgASkDCDcDECAGIBQ3AwgMAQsgBiABKQMINwMQIAYgFDcDCCACQSBqIQUgA0UNAQsgACABIAIgBkEIahDcASACKAJEIgQEQCAEIAE2AkALIAwoAgAiCARAIAggAjYCRAsgAiABNgJEIAIgCDYCQCABIAQ2AkQgASACNgJAIAIoAkBFBEAgACACNgIcCyAAIAIgBkE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IAAkAgACgCBCIBIAAoAggiAkkEQCABIAM2AgAgAUEEaiEDDAELIAEgACgCACIEa0ECdSIFQQFqIgFBgICAgARPDQIgBkEMakH/////AyACIARrIgJBAXUiBCABIAEgBEkbIAJB/P///wdPGyAFIAAQSiIBKAIIIgIgAzYCACABIAJBBGo2AgggASgCBCAAKAIEIAAoAgAiBGsiAmshAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAggiAzYCBCABIAI2AgggACgCCCEEIAAgASgCDDYCCCABIAI2AgAgASAENgIMIAEoAgQiBSABKAIIIgJHBEADQCABIAJBBGsiAjYCCCACKAIAIQQgAkEANgIAIAQEQCAEECIgASgCCCECCyACIAVHDQALCyABKAIAIgIEQCABKAIMGiACECILCyAAIAM2AgQLIAZBIGokAA8LECYAC3gBAn8gACgCPCICIAEoAjwiA0YEQCACIAIpAwhCIIk3AwgPCwJAIAJFDQAgAigCCCAARgRAIAIgATYCCAwBCyACIAE2AgwLAkAgA0UNACADKAIIIAFGBEAgAyAANgIIDAELIAMgADYCDAsgACADNgI8IAEgAjYCPAtqAQJ/IwBBEGsiBCQAIAIEQCADIAJBDGxqIQIDQCAEIAA2AgwgBCABEDwhBSADEEUgAyAFKAIANgIAIAMgBCgCBDYCBCADIAQoAgg2AgggAUEMaiEBIANBDGoiAyACRw0ACwsgBEEQaiQAC/wBAQR/IwBBEGsiByQAIAAoAgQiBiEEIAIgASAGIANraiIFSwRAIAUhAwNAIARBADYCCCAEQgA3AgAgBCADKAIANgIAIAQgAygCBDYCBCAEIAMoAgg2AgggA0EANgIIIANCADcCACAEQQxqIQQgA0EMaiIDIAJJDQALCyAAIAQ2AgQgBiEAIAEiAyAFIgZHBEADQCAAIgFBDGsiABBFIAAgBUEMayICKAIANgIAIAFBCGsgBUEIaygCADYCACABQQRrIAVBBGsiASgCADYCACABQQA2AgAgAkIANwIAIAIiBSADRw0ACwsgByAANgIMIAcgBjYCCCAHQRBqJAAL9QMBBn8jA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QCAERQ0EIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDACACKAIAIQEgAyAAKQMYNwOYAiADIAApAxA3A5ACIAMgACkDADcDgAIgAyAAKQMINwOIAiADQZACaiADQYACaiABEQIARQ0EIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDEAwECyAEBEAgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQPYBDcDCCABIAMpA9AENwMADAQLIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDECACKAIAIQIgAyABKQMINwP4ASADIAEpAwA3A/ABIAMgACkDEDcD4AEgAyAAKQMYNwPoASADQfABaiADQeABaiACEQIARQ0DIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDAAwDCyACKAIAIQQgAyAAKQMYNwO4BCADIAApAxA3A7AEIAMgACkDADcDoAQgAyAAKQMINwOoBCADQbAEaiADQaAEaiAEEQIAIQUgAigCACEEIAMgACkDKDcDmAQgAyAAKQMgNwOQBCADIAApAxA3A4AEIAMgACkDGDcDiAQgAUEQayEBIANBkARqIANBgARqIAQRAgAhBAJAIAVFBEAgBEUNASADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyAgAigCACEEIAMgACkDGDcD+AMgAyAAKQMQNwPwAyADIAApAwA3A+ADIAMgACkDCDcD6AMgA0HwA2ogA0HgA2ogBBECAEUNASADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAMAQsgBARAIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAyg3AwggACAAKQMgNwMAIAAgAykD2AQ3AyggACADKQPQBDcDIAwBCyADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAgAigCACEEIAMgACkDKDcD2AMgAyAAKQMgNwPQAyADIAApAxA3A8ADIAMgACkDGDcDyAMgA0HQA2ogA0HAA2ogBBECAEUNACADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyALIAIoAgAhBCADIAEpAwg3A7gDIAMgASkDADcDsAMgAyAAKQMgNwOgAyADIAApAyg3A6gDIANBsANqIANBoANqIAQRAgBFDQIgAyAAKQMoNwPYBCADIAApAyA3A9AEIAAgASkDCDcDKCAAIAEpAwA3AyAgASADKQPYBDcDCCABIAMpA9AENwMAIAIoAgAhASADIAApAyg3A5gDIAMgACkDIDcDkAMgAyAAKQMQNwOAAyADIAApAxg3A4gDIANBkANqIANBgANqIAERAgBFDQIgAyAAKQMYNwPYBCADIAApAxA3A9AEIAAgACkDKDcDGCAAIAApAyA3AxAgACADKQPYBDcDKCAAIAMpA9AENwMgIAIoAgAhASADIAApAxg3A/gCIAMgACkDEDcD8AIgAyAAKQMANwPgAiADIAApAwg3A+gCIANB8AJqIANB4AJqIAERAgBFDQIgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgACkDGDcDCCAAIAApAxA3AwAgACADKQPYBDcDGCAAIAMpA9AENwMQDAILIAAgAEEQaiAAQSBqIABBMGogAUEQayACEMQDDAELIAIoAgAhBCADIAApAxg3A7gBIAMgACkDEDcDsAEgAyAAKQMANwOgASADIAApAwg3A6gBIANBsAFqIANBoAFqIAQRAgAhByACKAIAIQUgAyAAKQMoNwOYASADIAApAyA3A5ABIAMgACkDEDcDgAEgAyAAKQMYNwOIASAAQSBqIQQgA0GQAWogA0GAAWogBRECACEFAkAg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DyAIgBkHQAmogBkHAAmogBxECACEIIAUoAgAhByAGIAIpAwg3A7gCIAYgAikDADcDsAIgBiABKQMANwOgAiAGIAEpAwg3A6gCIAZBsAJqIAZBoAJqIAcRAgAhBwJAIAhFBEAgB0UNASAGIAEpAwg3A+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+IwBB0AhrIgUkAANAIAFBMGshCiABQSBrIQsgAUEQayEJAkADQAJAAkACQAJAAkAgASAAa0EEdSIIDgYGBgABAgMECyABQRBrIgEpAwghDyACKAIAIQIgBSABKQMAIhA3A7AFIAUgDzcDuAggBSAQNwOwCCAFIA83A7gFIAUgACkDADcDoAUgBSAAKQMINwOoBSAFQbAFaiAFQaAFaiACEQIARQ0FIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAEpAwg3AwggACABKQMANwMAIAEgBSkDy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AAKQMgNwMQIAAgBSkDyAg3AyggACAFKQPACDcDICACKAIAIQMgBSAAKQMYNwPYByAFIAApAxA3A9AHIAUgACkDADcDwAcgBSAAKQMINwPIByAFQdAHaiAFQcAHaiADEQIARQ0BIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAApAxg3AwggACAAKQMQNwMAIAAgBSkDyAg3AxggACAFKQPACDcDEAwBCyADBEAgBSAAKQMINwPICCAFIAApAwA3A8AIIAAgACkDKDcDCCAAIAApAyA3AwAgACAFKQPICDcDKCAAIAUpA8AINwMgDAELIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAApAxg3AwggACAAKQMQNwMAIAAgBSkDyAg3AxggACAFKQPACDcDECACKAIAIQMgBSAAKQMoNwO4ByAFIAApAyA3A7AHIAUgACkDEDcDoAcgBSAAKQMYNwOoByAFQbAHaiAFQaAHaiADEQIARQ0AIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAApAyg3AxggACAAKQMgNwMQIAAgBSkDyAg3AyggACAFKQPACDcDIAsgAigCACEDIAUgASkDCDcDmAcgBSABKQMANwOQByAFIAApAyA3A4AHIAUgACkDKDcDiAcgBUGQB2ogBUGAB2ogAxECAEUNAyAFIAApAyg3A8gIIAUgACkDIDcDwAggACABKQMINwMoIAAgASkDADcDICABIAUpA8gINwMIIAEgBSkDwAg3AwAgAigCACEBIAUgACkDKDcD+AYgBSAAKQMgNwPwBiAFIAApAxA3A+AGIAUgACkDGDcD6AYgBUHwBmogBUHgBmogARECAEUNAyAFIAApAxg3A8gIIAUgACkDEDcDwAggACAAKQMoNwMYIAAgACkDIDcDECAAIAUpA8gINwMoIAAgBSkDwAg3AyAgAigCACEBIAUgACkDGDcD2AYgBSAAKQMQNwPQBiAFIAApAwA3A8AGIAUgACkDCDcDyAYgBUHQBmogBUHABmogARECAEUNAyAFIAApAwg3A8gIIAUgACkDADcDwAggACAAKQMYNwMIIAAgACkDEDcDACAAIAUpA8gINwMYIAAgBSkDwAg3AxAMAwsgACAAQRBqIABBIGogAEEwaiABQRBrIAIQxAMMAgsgCEEXTARAIARBAXEEQCACIQYjAEHQAGsiByQAAkAgACICIAEiCEYNACAAQRBqIgEgCEYNAANAIAYoAgAhBCAHIAEiAykDCDcDOCAHIAEpAwA3AzAgByAAKQMANwMgIAcgACkDCDcDKCAHQTBqIAdBIGogBBECAARAIAcgASkDCDcDSCAHIAEpAwA3A0AgASEEA0ACQCAEIAAiASkDCDcDCCAEIAApAwA3AwAgACACRgRAIAIhAQwBCyAGKAIAIQkgByAHKQNINwMYIAcgBykDQDcDECAHIAFBEGsiACkDADcDACAHIAApAwg3AwggASEEIAdBEGogByAJEQIADQELCyABIAcpA0g3AwggASAHKQNANwMACyADIgBBEGoiASAIRw0ACwsgB0HQAGokAAwDCyACIQMjAEHQAGsiCCQAAkAgASIEIABGDQAgASAAQRBqIgFGDQADQCADKAIAIQYgCCABIgIpAwg3AzggCCABKQMANwMwIAggACkDADcDICAIIAApAwg3AyggCEEwaiAIQSBqIAYRAgAEQCAIIAEpAwg3A0ggCCABKQMANwNAA0AgASIGIAAiASkDCDcDCCAGIAApAwA3AwAgAygCACEGIAggCCkDSDcDGCAIIAgpA0A3AxAgCCAAQRBrIgApAwg3AwggCCAAKQMANwMAIAhBEGogCCAGEQIADQALIAEgCCkDSDcDCCABIAgpA0A3AwALIAIiAEEQaiIBIARHDQALCyAIQdAAaiQADAILIANFBEAgACABRg0CIwBBMGsiCSQAIAEgACIDRwRAIAEgAGtBBHUiBkECTgRAIAZBAmtBAXYhAANAIAMgAiAGIAMgACIEQQR0ahDCAyAAQQFrIQAgBA0ACwsgASIAIABHBEADQCACKAIAIQQgCSAAKQMINwMYIAkgACkDADcDECAJIAMpAwA3AwAgCSADKQMINwMIIAlBEGogCSAEEQIABEAgCSAAKQMINwMoIAkgACkDADcDICAAIAMpAwg3AwggACADKQMANwMAIAMgCSkDKDcDCCADIAkpAyA3AwAgAyACIAYgAxDCAwsgAEEQaiIAIAFHDQALCyAGQQJOBEADQCA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DcDGCAAIAspAwA3AxAgCyAFKQPICDcDCCALIAUpA8AINwMADAELIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAgpAwg3AxggACAIKQMANwMQIAggBSkDyAg3AwggCCAFKQPACDcDACACKAIAIQcgBSALKQMINwO4AiAFIAspAwA3A7ACIAUgCCkDADcDoAIgBSAIKQMINwOoAiAFQbACaiAFQaACaiAHEQIARQ0AIAUgCCkDCDcDyAggBSAIKQMANwPACCAIIAspAwg3AwggCCALKQMANwMAIAsgBSkDyAg3AwggCyAFKQPACDcDAAsgAigCACEHIAUgBikDGDcDmAIgBSAGKQMQNwOQAiAFIAApAyA3A4ACIAUgACkDKDcDiAIgBUGQAmogBUGAAmogBxECACEMIAIoAgAhByAFIAopAwg3A/gBIAUgCikDADcD8AEgBSAGKQMQNwPgASAFIAYpAxg3A+gBIAVB8AFqIAVB4AFqIAcRAgAhBwJAIAxFBEAgB0UNASAFIAYpAxg3A8gIIAUgBikDEDcDwAggBiAKKQMINwMYIAYgCikDADcDECAKIAUpA8gINwMIIAogBSkDwAg3AwAgAigCACEHIAUgBikDGDcD2AEgBSAGKQMQNwPQASAFIAApAyA3A8ABIAUgACkDKDcDyAEgBUHQAWogBUHAAWogBxECAEUNASAFIAApAyg3A8gIIAUgACkDIDcDwAggACAGKQMYNwMoIAAgBikDEDcDICAGIAUpA8gINwMYIAYgBSkDwAg3AxAMAQsgBwRAIAUgACkDKDcDyAggBSAAKQMgNwPACCAAIAopAwg3AyggACAKKQMANwMgIAogBSkDyAg3AwggCiAFKQPACDcDAAwBCyAFIAApAyg3A8gIIAUgACkDIDcDwAggACAGKQMYNwMoIAAgBikDEDcDICAGIAUpA8gINwMYIAYgBSkDwAg3AxAgAigCACEHIAUgCikDCDcDuAEgBSAKKQMANwOwASAFIAYpAxA3A6ABIAUgBikDGDcDqAEgBUGwAWogBUGgAWogBxECAEUNACAFIAYpAxg3A8gIIAUgBikDEDcDwAggBiAKKQMINwMYIAYgCikDADcDECAKIAUpA8g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IIAMgAikDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgAikDEDcDKCADIAIpAwg3AyAgAyACKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQIDQCAEIQUgAkEYaiEGAkAgACsDICACKwMIYwRAIAYgAikDEDcDECAGIAIpAwg3AwggBiACKQMANwMAAn8gAyACIANGDQAaA0AgAiAAKwMgIAJBEGsrAwBjRQ0BGiACIAJBGGsiBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADCyIEIAUoAhA2AhAgBCAFKQMINwMIIAQgBSkDADcDAAwBCyAGIAUpAxA3AxAgBiAFKQMINwMIIAYgBSkDADcDAAsgBiECIAUiAEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgVBGGwiBmoiBCAFIAMgBRC1ASAEIAEgAiAFayICIAMgBmogAhC1ASAEIQIDQCABIAJGBEAgACAERg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAERw0ACwwECwJAIAIrAwggACsDCGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAERw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwudBQEIfyMAQSBrIgUkACADIQQCQCABIAJGDQAgAiAERgRAIAEhBAwBCyACIAFBGGoiBEYEQCAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCADIAJrIgJBBGsiBwRAIAEgBCAH/AoAAAsgASACaiIEIAUoAhg2AhAgBCAFKQMQNwMIIAQgBSkDCDcDAAwBCyADIAJBGGpGBEAgBSADQRhrIgIpAxA3AxggBSACKQMINwMQIAUgAikDADcDCCADIAIgAWsiB0FobUEYbGohBAJAIAEgAkYNACAHQQRrIgJFDQAgBCABIAL8CgAACyABIAUoAhg2AhAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCwJ/IwBBIGshBiACIAEiBGsiCUEYbSIHIAMgAmsiC0EYbSIBRwRAIAchAgNAIAIgASICbyIBDQALIAQgAkEYbGohAgNAIAYgAkEYayICKQMQNwMYIAYgAikDCDcDECAGIAIpAwA3AwggAiAJaiEIIAIhAQNAIAEiCiAIIgEoAhA2AhAgCiABKQMINwMIIAogASkDADcDACABIAlqIAQgByADIAFrQRhtIghrQRhsaiAHIAhIGyIIIAJHDQALIAEgBigCGDYCECABIAYpAxA3AwggASAGKQMINwMAIAIgBEcNAAsgBCALagwBCwJAIAIgBEYgAiADRnINACACIQEDQCAGIAQpAxA3AxggBiAEKQMINwMQIAYgBCkDADcDCCAEIAEoAhA2AhAgBCABKQMINwMIIAQgASkDADcDACABIAYoAhg2AhAgASAGKQMQNwMIIAEgBikDCDcDACAEQRhqIgQgAkYNASABQRhqIgEgA0cNAAsLIAILIQQLIAAgAzYCBCAAIAQ2AgAgBUEgaiQAC4IGAQN/AkACQAJAAkACQCACDgMEAgABCyABQRhrIgErAwAgACsDAGMEQCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgASkDEDcDKCADIAEpAwg3AyAgAyABKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQADQCAAQRhqIQUCQCAEKwMAIAArAwBjBEAgBSAAKQMQNwMQIAUgACkDCDcDCCAFIAApAwA3AwACfyADIAAgA0YNABoDQCAAIAQrAwAgAEEYayICKwMAY0UNARogACACKAIQNgIQIAAgAikDCDcDCCAAIAIpAwA3AwAgAiIAIANHDQALIAMLIgIgBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMADAELIAUgBCkDEDcDECAFIAQpAwg3AwggBSAEKQMANwMACyAFIQAgBEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgRBGGwiBmoiBSAEIAMgBBC2ASAFIAEgAiAEayICIAMgBmogAhC2ASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAFRw0ACwwECwJAIAIrAwAgACsDAGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAFRw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwuLCwEQfyMAQSBrIgckACAHQQA2AhggB0IANwIQIAdBEGogASgCJBAlIAEoAgwhDyABKAIIIQogASgCBCELIAEoAgAhBgJAAkACQCACKAIMQQBOBEBBASERDAELQQEhESALQQRBCCAGQQFGG0EAIAYbQZSVAWooAgBHDQELIAohDCAGIQoMAQtBASESIAQgBC0AA0EBczoAAyAEIAQtAAJBAXM6AAIgBCAELQABQQFzOgABIAQgBC0AAEEBczoAAEEAIREgCyEMIAYhCwsgAUEEaiETIAdCgoCAgDA3AgggB0KAgICAEDcCACACQQRqIRADQCAKIQYCQAJAAkACQCAHIAhqKAIAIg0OAwMAAQILIAshBgwCCyAMIQYMAQsgDyEGCyACIQkCQAJAAkAgBg4CAgABCyAQIQkMAQsgAkEIQQwgBkECRhtqIQkLIAkoAgBBAE4EQCAKIQYCQAJAAkACQCANDgMDAAECCyALIQYMAgsgDCEGDAELIA8hBgsgAiEJAk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vwKAAALIAQgBTYCqAcgBCAFNgKkByAEIAY2AqAHDAELIARBADYCqAcgBEIANwOgByAEQfAGakEAQSz8CwAgBCARNgKIByAEIAo2AoQHIAQgCTYCgAcgBCAQNgKMByASQYABEFUgBCgCkAciCCAEKAKUByIGQQV0aiICQgA3AwggAkKAgICAgICA+D83AwAgAkIANwMQIAJCADcDGCAEIAZBAWoiAjYClAcgBCgCmAchBQJAIBBBAEoEQCAEAn8gAiAFTwRAIBIgBUEBdEGAASAFGxBVIAQoApAHIgggBCgClAciBkEFdGoiAkIANwMQIAJCgICAgICAgPg/NwMIIAJCADcDACACQgA3AxggBCgCmAchBSAGQQFqDAELIAggAkEFdGoiAkIANwMQIAJCgICAgICAgPg/NwMIIAJCADcDACACQgA3AxggBkECagsiBzYClAcCQCAFIAdNBEAgEiAFQQF0QYABIAUbEFUgBCgCkAciCCAEKAKUByIHQQV0aiICQgA3AwggAkIANwMAIAJCADcDGCACQoCAgICAgID4PzcDECAEKAKYByEFDAELIAggB0EFdGoiAkIANwMIIAJCADcDACACQgA3AxggAkKAgICAgICA+D83AxALIAQgB0EBaiICNgKUBwJ/IAIgBU8EQCASIAVBAXRBgAEgBRsQVSAEKAKUByICQQFqIQYgBCgCkAciCCACQQV0agwBCyAHQQJqIQYgCCACQQV0agsiAkIANwMQIAJCADcDCCACQgA3AwAgAkKAgICAgICA+D83AxggBCAGNgKUByAEQoKAgIAwNwLgBSAEQoCAgIAQNwLYBUEAIQ9BACENQQAhBUEAIQ4DQAJAAkAgBEHYBWogDmooAgAiGUEATA0AQQQhByAJIQsCQAJAAkAgGUEBayIMDgICAAELIAUhByAKIQsMAQsgESAQIAxBAkYiAhshCyANIA8gAhshBwsgByALakEBayECAkACQCAMDgIDAQALIAIhDwwBCyACIQ0LIAUhAgsgESAQIBlBAkYbIQxBASEHIAggGUEBakEDcUEFdGoiBSsDGCElIAUrAxAhJiAFKwMIIScgBSsDACEoA0AgCSEFAkACQAJAIBkOAgIAAQsgCiEFDAELI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AIQFBgPABIgIgAUH0JmpBASEFQcUBIAMgAiABQfgmaiAFQcUBaiAEEAogAAugAQEDfyAAAn8CQCABKAIEIgRFBEAgAUEEaiIFIQIMAQsgAigCACEGA0AgBCICKAIQIgQgBkoEQCACIQUgAigCACIEDQEMAgsgBCAGTgRAIAIhBEEADAMLIAIoAgQiBA0ACyACQQRqIQULQeAAECMiBCADKAIAKAIANgIQIARBGGpBAEHIAPwLACABIAIgBSAEEIIBQQELOgAEIAAgBDYCAAvUAQIEfAJ/IAEoAgQiBygCWEF4QQQgAigCACICIAJBA20iCEEDbGtBAkYbaiACQQJ0aigCACECIAAgCDYCACAHKAJIIAJBGGxqIgIrAwAgASgCCCIBKwMAoSIDIAMgA6IgAisDCCABKwMIoSIDIAOioCACKwMQIAErAxChIgQgBKKgnyIFoyIGvUL///////////8Ag0L/////////9/8AWARAIAAgBjkDCCAAIAQgBaM5AxggACADIAWjOQMQDwsgAEIANwMYIABCADcDECAAQgA3AwgLpgUCB38JfCMAQeAAayIDJAAgAyACNgJMIAEoAgQhBwJAAkAgASgCACIGKAIEIgRFDQAgBkEEaiIIIQUDQCAFIAQgBCgCECACSCIJGyEFIARBBEEAIAkbaigCACIEDQALIAUgCEYNACACIAUoAhBODQELIAMgA0HMAGoiBTYCWCADIAdBzAFqIAUgA0HYAGoiBhB5IAMoAgAhBCMAQaACayICJAAgAiAEKQNINwNwIAIgBCkDQDcDaCACIAQpAzg3A2AgAiAEKQNQNwN4IAIgBCkDWDcDgAEgAiAEKQNgNwOIASACIAQpAyA3A0ggAiAEKQMoNwNQIAIgBCkDMDcDWCACQZABaiACQcgAahCQASACIAIrA9ABOQOYAiACIAIrA7gBOQOQAiACIAIrA6ABOQOIAiACIAIrA8gBOQOAAiACIAIrA7ABOQP4ASACIAIrA5gBOQPwASACIAIrA8ABOQPoASACIAIrA6gBOQPgASACIAIrA5ABOQPYASACIAJB2AFqEJABIAIrAwAhCyACKwMIIQwgAisDECENIAIrAxghDiACKwMgIQ8gA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AKAIMIgIEQCACECILIABBADYCDCAAKAIAIgIEQCACECILIABBADYCCCAAQgA3AgALIAAgASgCDDYCDCABQQA2AgwgACABKAIANgIAIAAgASgCBDYCBCAAIAEoAgg2AgggAUEANgIIIAFCADcCAAJAIAAoAhwiAkUNACACIAIoAgAiAkEBazYCACACQQFKDQAgACgCHCICBEAgAhAiCyAAQQA2AhwgACgCECICBEAgAhAiCyAAQQA2AhggAEIANwIQCyAAIAEoAhw2AhwgAUEANgIcIAAgASgCEDYCECAAIAEoAhQ2AhQgACABKAIYNgIYIAFBADYCGCABQgA3AhACQCAAKAIsIgJFDQAgAiACKAIAIgJBAWs2AgAgAkEBSg0AIAAoAiwiAgRAIAIQIgsgAEEANgIsIAAoAiAiAgRAIAIQIgsgAEEANgIoIABCADcCIAsgACABKAIsNgIsIAFBADYCLCAAIAEoAiA2AiAgACABKAIkNgIkIAAgASgCKDYCKCABQQA2AiggAUIANwIgCwujTgIefxB8IwBBgANrIgokAAJAIAEoAgQiBUUNAAJAIAJFDQAgAi0AEEEBRw0AIABBDhAsDAELIAEoAgAhASAKIAU2AkwgCiABNgJIIApB0ABqIgNCADcCLCADQQA2AiQgA0IANwIcIAMgCigCSDYCLCADIAooAkw2AjAgA0IANwJEIANCADcCPCADQgA3AjRBBBAjIgFBATYCACADQQA2AogBIANCADcCgAEgA0EANgJ4IANCADcCcCADQQA2AmggA0IANwJgIANBADYCWCADQgA3AlAgAyABNgJMIANBADYC9AEgA0IANwLsASADQQA2AuQBIANCADcC3AEgA0EANgLUASADQgA3AswBIANBADYCxAEgA0IANwK8ASADQgA3A6gBIANCADcDsAEgA0H8AWpBAEEw/AsAIApBADYCQCAKQgA3AjhBACEFIwBBkAFrIgYkAAJAIAMoAjBFBEBBBBAjIgFBATYCACAKIAE2AgwgBkEANgKEASAKQQA2AgggCkIANwIAIAZBADYCgAEgBkIANwJ4IApBADYCGCAKQgA3AhAMAQsgBkEANgKMASAGQgA3AoQBIAZCADcCfCADKAIwIhRBAk8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gCACIBa0EEdUkNAAsLIAVBEGokACAEQRhqEMcBIAQoAgAiAARAIAQgADYCBCAEKAIIGiAAECILIARBMGokAAtFAQF/IAAoAgwEQCAAKAIIEMUEIABBADYCCAJAIAAoAgQiAUUNACABQQJ0IgFFDQAgACgCAEEAIAH8CwALIABBADYCDAsLxAECAn8CfCABKAI4IgIgASgCPCIDNgI8IAMgAjYCOCACIAMrAyAgAisDIKEiBCADKwMYIAIrAxihIgUgBaIgBCAEoqCfIgSjRAAAAAAAAAAAIAUgBKMiBL1C////////////AINCgICAgICAgPj/AFQiAxs5AzAgAiAERAAAAAAAAAAAIAMbOQMoAkAgASgCOCgCACICIAEoAgAiA0YNACADIAEoAjwoAgAiAUYgASACRnINACAAQcgAaiACIAMgARCOBAsLZQECfwJAIAEoAgQiA0UEQCABIQIDQCACIAIoAggiAigCAEcNAAsMAQsDQCADIgIoAgAiAw0ACwsgASAAKAIARgRAIAAgAjYCAAsgACAAKAIIQQFrNgIIIAAoAgQgARDEBCABECILWgEDfyAAKAIIIAFJBEAgAUEYbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBGGxBBGsiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALC74BAQR/IAAQiQQgASgCACEDIAFBADYCACAAKAIAIQIgACADNgIAIAIEQCAAKAIEGiACECILIAAgASgCBDYCBCABQQA2AgQgACABKAIMIgI2AgwgACABKgIQOAIQIAAgASgCCCIDNgIIIAIEQCAAQQhqIQQgAygCBCECAkAgACgCBCIDIANBAWsiBXFFBEAgAiAFcSECDAELIAIgA0kNACACIANwIQILIAAoAgAgAkECdGogBDYCACABQgA3AggLCx0AIAAgASACEIoCIAAgAiADEIoCIAAgAyABEIoCCyoAIAAgACgCDCABQQNsahBcIABBGGogACgCJCABarMgACoCKJWN/AEQcAv+AQEFfyABKAIAIgMgASgCBCIFRwRAA0AgAygCBCADKAIAa0EYbSACaiECIANBDGoiAyAFRw0ACwsgACAAKAIEIAAoAgBrQ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gASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQpAILIARBIGokAA8LECYAC4whAxJ/FXwBfiMAQZADayIFJAACQAJAAkAgBEUNACAELQAQQQFHDQBBqAIQIyIBQaCQAjYCACABQgA3AgQgAUEQahA7IQIgAUEONgJUIAUgATYCjAEgBSACNgKIASABIAEoAgRBAWo2AgQgBSAFKQKIATcDKCAAIAVBKGoQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgARCFBCEHAn8gAhCFBCILIAdFckUEQCABIQZBAQwBCyACIQYgASECIAchCSALCyEMIAYoAlxBAk0EQEGoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAIQNyECIAUgATYChAEgBSACNgKAASABIAEoAgRBAWo2AgQgBSAFKQKAATcDACAAIAUQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgAigCXCEIQagCECMiD0GgkAI2AgAgD0IANwIEIA9BEGohAQJAIAhBAk0EQCABIAYQNyEBIAUgDzYCfCAFIAE2AnggDyAPKAIEQQFqNgIEIAUgBSkCeDcDCCAAIAVBCGoQSBoMAQsgASACEDchASAFIA82AlwgBSABNgJYIA8gDygCBEEBajYCBCAFIAUpAlg3AyAgBUHgAGogBUEgahBIIRMgBUEANgJUIAVCADcCTCAFQcwAaiIBIAIoAlxBA25B5wdqQegHbkEBahCTBCABAn8gASgCBCIIIAEoAghJBEAgCCATEC5BGGoMAQsjAEEgayINJAAgASgCBCABKAIAIgprQRhtIg5BAWoiCEGr1arVAE8EQBAmAAsgDUEMakGq1arVACABKAIIIAprQRhtIgpBAXQiECAIIAggEEkbIApB1arVKk8bIA4gARBkIggoAgggExAuGiAIIAgoAghBGGo2AgggASgCACIKIAEoAgQiDiAIKAIEIA4gCmtBaG1BGGxqIg4QpQIgASgCACEKIAEgDjYCACAIIAo2AgQgASAIKAIIIg42AgQgCCAKNgIIIAEoAgghECABIAgoAgw2Ag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AGBEBBEBAjIgQgBjYCDCAEQeyXAjYCACAEQgA3AgQLIAIgBDYCDCABQQA2AgAgAiACKQIINwMAIAUgAhD+AiACQRBqJAAgACADNgIEIAAgBTYCACAAIANBFGogBRCPASAHQRBqJAAL0gQBAn8jAEGQBGsiAyQAIANBhARqIAFBABArECogA0H8A2ogAkEAECsQKiADQcgAaiIBIANB6AJqIAMoAoQEIAMoAvwDQQFBABCOAyICQQIQnwIgA0GYAhAjIAEQowE2AiAgA0HgAmogA0EgahCXBCADKAIgIQEgA0EANgIgIAEEQCABEDoQIgsgA0HIAGoiARA6GiABIAJBARCfAiADQZgCECMgARCjATYCICADQUBrIANBIGoQlwQgAygCICEBIANBADYCICABBEAgARA6ECILIANByABqEDoaIAMgAygC4AI2AjggAyADKALkAiIBNgI8IAEEQCABIAEoAgRBAWo2AgQLIAMgAykCODcDECADQcgAaiADQRBqEEMgAyADKAJANgIYIAMgAygCRCIBNgIcIAEEQCABIAEoAgRBAWo2AgQLIAMgAykCGDcDCCADQSBqIgEgA0EIahBDIAAgA0HIAGoiBBCLARogAEEYaiABEIsBGiABECgaIAQQKBoCQCADKAJEIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygC5AIiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAhD8AgJAIAMoAoAEIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCiAQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0GQBGokAAtKAQd/QQQQIyIDIAI2AgBBBBAjIgQgAjYCAEHw7wEgAUGQ6wEiAUEAIQJB7SRBASEFQbsBIAMgASACQfEkaiAFQbsBaiAEEAogAAviAwICfwV8IwBBgAFrIgMkACADQfgAaiABQQAQKxAqAkAgAygCeCgCRCIEBEAgACAEEEYMAQsgAisDACIHIAeiIAIrAwgiBiAGoqAgAisDECIFIAWioCIIRAAAAAAAAAAAYQRAIAAQ6wEaDAELIANCADcDcCADQgA3A2ggA0IANwNgIANEAAAAAAAA8D8gBSAInyIIoyIFIAWiIgkgCaChOQNYIANEAAAAAAAAAAAgBSAGIAijIgaiIgkgCaChIgk5A1AgA0QAAAAAAAAAACAHIAijIgcgBaIiBSAFoKEiBTkDSCADIAk5A0AgA0QAAAAAAADwPyAGIAaiIgggCKChOQM4IANEAAAAAAAAAAAgByAGoiIGIAagoSIGOQMwIAMgBTkDKCADIAY5AyAgA0QAAAAAAADwPyAHIAeiIgUgBaChOQMYIANBCGogARCKASADQRBqIAMoAggiASADQRhqIAEoAgAoAgQRAwAgAyADKQIQNwMAIAAgAxBDIAMoAgwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsCQCADKAJ8IgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIANBgAFqJAALlQUCA38DfCMAQSBrIgUkACAFQRBqIAEQigEgBSgCECEGIwBB0ANrIgEkACACRAAAAAAAgFZAoCIIED4hCSACED4hCiACED4hAiAIED4hCCABQgA3A5ADIAFCgICAgICAgPg/NwOIAyABQgA3A5gDIAFCADcDoAMgASAIOQPIAyABIAKaOQPAAyABQgA3A7gDIAEgCjkDsAMgASAJOQOoAyADRAAAAAAAgFZAoCICED4hCCADED4hCSADED4hAyABIAIQPjkDgAMgAUIANwP4AiABIAM5A/ACIAFCADcD6AIgAUKAgICAgICA+D83A+ACIAFCADcD2AIgASAJmjkD0AIgAUIANwPIAiABIAg5A8ACIAREAAAAAACAVkCgIgIQPiEDIAQQPiEIIAQQPiEEIAIQPiECIAFCADcDoAIgASACOQOYAiABIASaOQOQAiABQgA3A4gCIAEgCDkDgAIgASADOQP4ASABQgA3A6gCIAFCADcDsAIgAUKAgICAgICA+D83A7gCIAFBCGoiByABQfgBaiABQcACahCaAiABQdAAaiAHIAFBiANqEJoCIAFCADcD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IQAgAiADRg0AA0AgBCsDACACQRBrIgArAwBkRQRAIAIhAAwCCyACIAApAwg3AwggAiAAKQMANwMAIAAiAiADRw0ACyADIQALIAAgBCkDCDcDCCAAIAQpAwA3AwAgBEEQaiIEIAFHDQALDAMLIAAgACACQQF2IgRBBHQiBmoiBSAEIAMgBBDFASAFIAEgAiAEayICIAMgBmogAhDFASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMINwMIIAMgACkDADcDACADQRBqIQMgAEEQaiIAIAVHDQALDAQLAkAgAisDACAAKwMAZARAIAMgAikDCDcDCCADIAIpAwA3AwAgAkEQaiECDAELIAMgACkDCDcDCCADIAApAwA3AwAgAEEQaiEACyADQRBqIQMgACAFRw0ACwwBCyADIAApAwg3AwggAyAAKQMANwMADAELIAEgAkYNAANAIAMgAikDCDcDCCADIAIpAwA3AwAgA0EQaiEDIAJBEGoiAiABRw0ACwsLbAEBfyAAKAIIIgFFBEBBAA8LAkAgACABKAIAIgBGBEAgAUEANgIAA0AgASgCBCIARQ0CA0AgACIBKAIAIgANAAsMAAsACyABQQA2AgQgAEUNAANAIAAiASgCACIADQAgASgCBCIADQALCyABC6ICAQV/IwBBIGsiBSQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkCADcCACACQQhqIQEMAQsgAiAAKAIAIgRrQQN1IgZBAWoiAkGAgICAAk8NASAFQQxqQf////8BIAMgBGsiA0ECdSIEIAIgAiAESRsgA0H4////B08bIAYgABBLIgIoAgggASkCADcCACACIAIoAghBCGo2AgggAigCBCAAKAIEIAAoAgAiA2siAWshBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCBCAAIAIoAggiATYCBCACIAM2AgggACgCCCEEIAAgAigCDDYCCCACIAM2AgAgAiAENgIMIAIQmQELIAAgATYCBCAFQSBqJAAPCxAmAAtTAQF/IABBADYCCCAAQgA3AgAgAQRAIAAgARDxASAAKAIEIgMgAUECdGohASACKAIAIQIDQCADIAI2AgAgA0EEaiIDI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KAIEIgFFDQELIAEtAAxBAUYNACACIQMMAQsgA0EBOgAMIAJBADoADCACIAMoAgQiADYCACAABEAgACACNgIICyADIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAM2AgAMAQsgACADNgIECyADIAI2AgQgAiADNgIIIAIhAQsgAyADKAIIIgAtAAw6AAwgAEEBOgAMIAFBAToADCAAIAAoAgQiASgCACICNgIEIAIEQCACIAA2AggLIAEgACgCCCICNgIIAkAgAigCACAARgRAIAIgATYCAAwBCyACIAE2AgQLIAEgADYCACAAIAE2AggPCyAEQQFxRQRAIAJBAToADCABQQA6AAwgASADKAIEIgQ2AgAgBARAIAQgATYCCAsgAyABKAIIIgQ2AggCQCAEKAIAIAFGBEAgBCADNgIADAELIAQgAzYCBAsgAyABNgIEIAEgAzYCCCACIAAgACACKAIEIgFGGyEAIAEoAgAhAgsgAigCACIBBEAgAS0ADEEBRw0FCwJAIAIoAgQiAwRAIAMtAAxBAUcNAQsgAkEAOgAMIAIoAggiAi0ADEEBRiAAIAJHcQ0BIAJBAToADA8LIAEEQCABLQAMQQFHDQUgAigCBCEDCyADQQE6AAwgAkEAOgAMIAIgAygCACIANgIEIAAEQCAAIAI2AggLIAMgAigCCCIANgIIAkAgACgCACACRgRAIAAgAzYCAAwBCyAAIAM2AgQLIAMgAjYCACACIAM2AgggAiEBDAULIAIoAggiAUEEQQAgAiABKAIARhtqKAIAIQIMAAsACyAEQQE6AAwLDwsgAiEDCyADIAMoAggiAC0ADDoADCAAQQE6AAwgAUEBOgAMIAAgACgCACIBKAIEIgI2AgAgAgRAIAIgADYCCAsgASAAKAIIIgI2AggCQCACKAIAIABGBEAgAiABNgIADAELIAIgATYCBAsgASAANgIEIAAgATYCCAs0AQJ/IAAEQANAIAAoAgAgACgCECIBBEAgACABNgIUIAAoAhgaIAEQIgsgABAiIgANAAsLC+cDAQ1/IwBB4ABrIgdBGGpBAEHIAPwLACADQQNsIQwgACgCECENIAAoAiAhDiAAKAIAIQ8gAigCACEQQQAh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IQkgACsDOCEKIAArAzAhCyAAKwMoIQwgACsDICENIAArAxghDiAAKwMQIQ8gACsDCCEQA0AgAkQAAAAAAAAAACAOIAMrAwAiBKIgCyADKwMIIgWioCAIIAMrAxAiBqKgIgcgByAHoiAQIASiIA0gBaKgIAogBqKgIgcgB6IgDyAEoiAMIAWioCAJIAaioCIEIASioKCfIgWjIAcgBaMiBiAGYiIAGzkDECACRAAAAAAAAAAAIAQgBaMgABs5AwggAkQAAAAAAAAAACAGIAAbOQMAIAJBGGohAiADQRhqIgMgAUcNAAsLC5QBAQR/IAAoAgQiAyABQQF0SyADQRBLcQJAIAEgA00NACAAIAEQVSABIAAoAgQiA2siBEEATA0AIAAoAgAgA0EFdGohAwNAIAMgAikDGDcDGCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQSBqIQMgBEEBSyAEQQFrIQQNAAsLIAAgATYCBARAIAAQkwELC5ECAgJ/BnwjAEHQAGsiAyQAIAMgASsDADkDGCADIAErAwg5AyAgASsDECEFIANCgICAgICAgPg/NwMwIAMgBTkDKCADQThqIAIgA0EYaiIEEKEBIAMgASsDGDkDGCADIAErAyA5AyAgASsDKCEFIANCgICAgICAgPg/NwMwIAMgBTkDKCADIAIgBBChASADKwM4IQUgAysDACEGIAMrA0AhByADKwMIIQggACADKwMQIgkgAysDSCIKIAkgCmQiARs5AyggACAIIAcgByAIYyICGzkDICAAIAYgBSAFIAZjIgQbOQMYIAAgCiAJIAEbOQMQIAAgByAIIAIbOQMIIAAgBSAGIAQbOQMAIANB0ABqJAALdAECfyMAQRBrIgIkAEGgARAjIgNBgJQCNgIAIANCADcCBCACIAEoAgA2AgggAiABKAIENgIMIAFCADcCACACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgACADNgIEIAAgATYCACAAIANBFGogARCPASACQRBqJAAL9AQCDn8GfCMAQYABayICJAAgASgCDCEDIAJCADcDICACQoCAgICAgID4PzcDGCACQgA3AyggAkIANwMwIAJCADcDQCACQoCAgICAgID4PzcDOCACQgA3A0ggAkIANwNQIAJCADcDYCACQoCAgICAgID4PzcDWCACQgA3A2ggAkIANwNwIAIgAUEYaiIHIAJBGGoQygECQCACKwMAIAIrAwhhBEAgACADQTD8CgAADAELIAIgASkDcDcDKCACIAEpA2g3AyAgAiABKQNgNwMYIAIgASkDcDcDECACIAEpA2g3AwggAiABKQNgNwMAIAFByABqIQggAUEwaiEJIANBGGohCgNAIAhBCEEQIAVBAUYbQQAgBRsiBGohCyAEIAdqIQwgBCAJaiENIAIgBGoiDisDACERIAJBGGogBGoiDysDACESQQAhAQNAIBECfwJAAkACQCABDgIAAQILIAwrAwAgAysDAKIhEEEAIQYgBwwCCyANKwMAIAMrAwiiIRBBCCEGIAkMAQsgCysDACADKwMQoiEQQRAhBiAICyAEaisDACAGIApqKwMAoiITIBAgECATYxugIREgEiATIBAgECATZBugIRIgAUEBaiIBQQNHDQALIA8gEjkDACAOIBE5AwAgBUEBaiIFQQNHDQALIAIrAwAhECACKwMYIREgAisDCCESIAIrAyAhEyAAIAIrAxAiFCACKwMoIhUgFCAVZCIBGzkDKCAAIBIgEyASIBNkIgMbOQMgIAAgECARIBAgEWQiBBs5AxggACAVIBQgARs5AxAgACATIBIgAxs5AwggACARIBAgBBs5AwALIAJBgAFqJAAL/AMCBX8MfCMAQfABayIDJAAgASsDGCEIIAErAyAhCSABKwMoIQogASsDMCELIAErAzghDCABKwNAIQ0gASsDSCEOIAErA1AhDyABKwNYIRAgASsDYCERIAErA2ghEiABKwNwIRMgA0KAgICAgICA+D83A3ggAyATOQNwIAMgEjkDaCADIBE5A2AgA0IANwNYIAMgEDkDUCADIA85A0ggAyAOOQNAIANCADcDOCADIA05AzAgAyAMOQMoIAMgCzkDICADQgA3AxggAyAKOQMQIAMgCTkDCCADIAg5AwAgA0GAAWoiBCACIAMQ8AEjAEHwAGsiAiQAQaABECMiBUGAlAI2AgAgBUIANwIEIAIgASgCDDYCaCACIAEoAhAiATYCbCABBEAgASABKAIEQQFqNgIECyADQeQB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IAUiBCAHIAhiDQEaIAQgBigCJCACKAIMTg0BGgsgBSACKQMQNwMQIAUgAikDCDcDCCAFIAIpAwA3AwAgAyACIANGDQAaAkADQCAAKwMAIgcgAkEYayIEKwMAIghjRQRAIAcgCGINAiAGKAIkIAJBDGsoAgBODQILIAIgBCkDEDcDECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADDAELIAILIgQgACkDEDcDECAEIAApAwg3AwggBCAAKQMANwMAIABBGGoiAiABRw0ACwwCCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyAAIAAgAkEBdiIFQRhsIgZqIgQgBSADIAUQywEgBCABIAIgBWsiAiADIAZqIAIQywEgBCECA0AgASACRgRAIAAgBEYNAgNAIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIANBGGohAyAAQRhqIgAgBEcNAAsMAgsCQAJAIAIrAwAiByAAKwMAIghjRQRAIAcgCGINASACKAIMIAAoAgxODQELIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAJBGGohAgwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIQALIANBGGohAyAAIARHDQALIAEgAkYNAANAIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGohAyACQRhqIgIgAUcNAAsLC4sBAQV/IwBBEGsiA0KAgICAEDcCBCADQQI2AgwgACgCACgCACABQQxsaiEEIAAoAgQgAUECdGoiBSgCACEBIAAoAgwhBkEAIQADQCAFIAEgBiAEIANBBGogAGooAgBBAnRqKAIAQQJ0aigCACICIAJBH3UiAnMgAmtqIgE2AgAgAEEEaiIAQQxHDQALCwIAC7cCAQV/IwBBIGsiBSQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkCCDcCCCACIAEpAgA3AgAgAkEQaiEBDAELIAIgACgCACIEa0EEdSIGQQFqIgJBgICAgAFPDQEgBUEMakH/////ACADIARrIgNBA3UiBCACIAIgBEkbIANB8P///wdPGyAGIAAQMiICK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BBkAFrIhQkACAUQeAAakEAQTD8CwAgFEEwakEAQTD8CwAgFCAENgIsIBQgAzYCKCAUQoCAgIAQNwIAIAEoAgQiGigCSCIfIAdBGGwiFWoiICsDACILIB8gBkEYbCIXaiIhKwMAIgyhIQ4gBUEDbSEiIBooApgBIiMgFWorAwAhDyAXICNqKwMAIRAgASgCACIbKAKYASEcIBsoAkghHUEAIQFBACEXA0ACfyAPIBwgFEEoaiAUIBdqKAIAIh5BAnRqKAIAQRhsIhVqKwMAmiIJZCAVIB1qIhgrAwAiCCALYyAIIAthGyAJIBBjIAggDGMgCCAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAmiEPIAMgHGorAwCaIRBBACEXA0ACfyAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJIBBkIAwgAyAfaiIDKwMAIghjIAggDGEbIAkgD2QgCCALZCAIIAthG2siHEUEQEQAAAAAAAD4fyEJRAAAAAAAAPh/IQpBAAwBCyAGKwMQIQogBisDCCEJAkAgCCAMoSINIAggC6EiCCANmSAImWMiFRsgDqMiCL1C////////////AINC//////////f/AFYNACAEKwMIIg0gCaEiEb1C////////////AINCgICAgICAgPj/AFoNACAEKwMQIhIgCqEiE71C////////////AINCgICAgICAgPj/AFoNACAKIBIgFRsgCCAToqAhCiAJIA0gFRsgCCARoqAhCQsgHEEAIBsoAqgBIhUgB0EYbGorAwggFSAbKAJoIAJBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAkgAysDCCIIYyAIIAlhGxsLIRUCQCAJvUL///////////8Ag0L/////////9/8AVg0AIBVBACAVayAYGyAZaiEZIAFBAUoEQEECIQEMAQsgAUUgFUUgFnNFckUEQEEBIQEMAQsgAUEYbCIYIBRBMGpqIhYgAykDACIlNwMAIBYgAykDEDcDECAWIAMpAwg3AwggFEHgAGogGGoiAyAJOQMIIAMgCjkDECADICU3AwAgAUEBaiEBIBVBAEchFgsgF0EEaiIXQQhHDQALAn8gGUUEQEQAAAAAAAD4fyEIRAAAAAAAAPh/IQtEAAAAAAAA+H8hCkQAAAAAAAD4fyEJQQAMAQsgFCAUQeAAaiAUQfgAaiAUQTBqIBRByABqEM4BIBQrAwghCyAUKwMAIQggGUEAIBsoAqgBIgEgB0EYbGorAxAgASAbKAJoIAJBAnRqKAIAQQNtQRhsaisDEKCaIBooAqgBIgEgIkEYbGorAxAgASAaKAJoIAVBAnRqKAIAQQNtQRhsaisDEKBjIBQrAxAiCiAUKwMYIgljIAkgCmEbGwshASAAIAk5AyAgACAKOQMYIAAgCzkDECAAIAg5AwggACABNgIAIBRBkAFqJAAL8QMBA38jAEEgayIGJAACQCAAKAIEIAJBMGxqIgcrAwAgASsDGGVFDQAgBysDCCABKwMgZUUNACAHKwMQIAErAyhlRQ0AIAcrAxggASsD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w0DIAkgC0ECdCIIaigCACAIIAxqKAIATg0DCyAAIAo2AgAgAyIAIARHDQALIAQMAgsgAiADNgIADAILIAALIAYoAgA2AgALIAIhACAGQQRqIgYgAUcNAAsMAgsgBCAAKAIANgIADAELIAAgACADQQF2IgdBAnQiBWoiBiACIAcgBCAHENMBIAYgASACIAMgB2siAyAEIAVqIAMQ0wEgAigCBCEHIAIoAgAhAiAGIQMDQCABIANGBEAgACAGRg0CA0AgBCAAKAIANgIAIARBBGohBCAAQQRqIgAgBkcNAAsMAgsCQAJAIAIoAgAiBSADKAIAIgtBA3RqIgkgBygCACIIQQJ0IgpqKAIAIgwgCiAFIAAoAgAiCkEDdGoiBWooAgAiDU4EQCAMIA1HDQEgCUEBIAhrQQJ0IghqKAIAIAUgCGooAgBODQELIAQgCzYCACADQQRqIQMMAQsgBCAKNgIAIABBBGohAAsgBEEEaiEEIAAgBkcNAAsgASADRg0AA0AgBCADKAIANgIAIARBBGohBCADQQRqIgMgAUcNAAsLC+YMAwx8EX8BfiMAQZABayIUJAAgFEHgAGpBAEEw/AsAIBRBMGpBAEEw/AsAIBQgBDYCLCAUIAM2AiggFEKAgICAEDcCACABKAIEIhooAkgiHyAHQRhsIhVqIiArAwAiCyAfIAZBGGwiF2oiISsDACIMoSEOIAVBA20hIiAaKAKYASIjIBVqKwMAIQ8gFyAjaisDACEQIAEoAgAiGygCmAEhHCAbKAJIIR1BACEBQQAhFwNAAn8gHCAUQShqIBQgF2ooAgAiHkECdGooAgBBGGwiFWorAwAiCSAPYyAVIB1qIhgrAwAiCCALYyAIIAthGyAJIBBjIAggDGMgCCAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAIQ8gAyAcaisDACEQQQAhFwNAAn8gECAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJYyAMIAMgH2oiAysDACIIYyAIIAxhGyAJIA9kIAggC2QgCCALYRtrIhxFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgBisDECEKIAYrAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgBCsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgBCsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLIBxBACAbKAKoASIVIAdBGGxqKwMIIBUgGygCaCACQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAYyAJIAMrAwgiCGMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgGBsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiGCAUQTBqaiIWIAMpAwAiJ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AaAkAgCkEBcQ0AIAgoAgQoAgAgFWooAgAhCyAIKAIAIg4oAgQhACACQQI2AogCIAJCgICAgBA3AoACIAAoAlgiDyAKQQF1IhAgCmoiEUECdGohEiAAKAJoIRNBACEBA0BBASEMAkAgDyACQYACaiABaigCACIHIBFqIg1BAnQiBGooAgAiACASQQRBCCAHQQFGG0EAIAcbQYzpAGooAgBBAnRqKAIAIgNIBEAgACEEIAMhAAwBCyAEIBNqKAIAIQ1BACEMIAMhBAsgAkGQAmoiFCAHQQR0aiIDIAw6AAwgAyAANgIIIAMgBDYCBCADIA02AgAgAUEEaiIBQQxHDQALIAJBgAJqIA4gCyAQIBQQigMgAikDiAJC////////////AINC//////////f/AFYNACAIKAIIKAIAIAtBAnRqIgAgACgCACACKAKAAmo2AgALIApBgYCAgHhxQQFGCyEHAkAgGSAWIAVBMGxqIgArAxhlRQ0AIBkgACsDAGZFDQAgGCAAKwMgZUUNACAYIAArAwhmRQ0AAkAgBUEBcQ0AIAgoAgQoAgAgFWooAgAhCyAIKAIAIg4oAgQhACACQQI2AogCIAJCgICAgBA3AoACIAAoAlgiDyAFQQF1IhAgBWoiEUECdGohEiAAKAJoIRNBACEBA0BBASEMAkAgDyACQYACaiABaigCACIGIBFqIg1BAnQiBGooAgAiACASQQRBCCAGQQFGG0EAIAYbQYzpAGooAgBBAnRqKAIAIgNIBEAgACEEIAMhAAwBCyAEIBNqKAIAIQ1BACEMIAMhBAsgAkGQAmoiFCAGQQR0aiIDIAw6AAwgAyAANgIIIAMgBDYCBCADIA02AgAgAUEEaiIBQQxHDQALIAJBgAJqIA4gCyAQIBQQigMgAikDiAJC////////////AINC//////////f/AFYNACAIKAIIKAIAIAtBAnRqIgAgACgCACACKAKAAmo2AgALIAVBgYCAgHhxQQFGIQYLAkAgBiAHckUEQCAJQQBIDQEgAiAJQQJ0aigCACEAIAlBAWshCQwCCyAKIAUgBxshACAHRSAGRXINASACIAlBAWoiCUECdGogBTYCAAwBCwsgAkHAAmokAAtUAQ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hqQQBBOPwLACAFIAFBAEc6ADsgBUF/NgIQIAUgAzYCDCAFIAA2AgQgBUEBNgI0IAAgBUEEaiABQQEgACgCACgCHBEFACAFKAIcIgBBAUYEQCACIAUoAhRBACABGzYCAAsgAEEBRiEECyAFQUBrJAAgBAtyAQJ/IAAoAgQgASgCCCgCBEYEQCABIAIgAxCtAg8LIAAoAgwhBCAAQRBqIgUgASACIAMQoAMCQCAEQQJJDQAgBSAEQQN0aiEEIABBGGohAANAIAAgASACIAMQoAMgAS0ANg0BIABBCGoiACAESQ0ACwsLNQAgACgCBCABKAIIKAIERgRAIAEgAiADEK0CDwsgACgCCCIAIAEgAiADIAAoAgAoAhwRBQALHAAgACgCBCABKAIIKAIERgRAIAEgAiADEK0CCwvEAQECfyMAQdAAayIDJAACQAJ/QQEgACgCBCABKAIERg0AGkEAIAFBlOcBEGIiAUUNABogAigCACIERQ0BIANBGGpBAEE4/AsAIANBAToASyADQX82AiAgAyAANgIcIAMgATYCFCADQQE2AkQgASADQRRqIARBASABKAIAKAIcEQUAIAMoAiwiAEEBRgRAIAIgAygCJDYCAAsgAEEBRgsgA0HQAGokAA8LIANByBk2AgggA0HnAzYCBCADQccONgIAEK4CAAsFAEHkDQsrAQF/IwBBQGoiAiQAIAIgASAAEQEAQcAAECMgAhBAIAIQQRogAkFAayQACwUAQZsQCy0BAX8jAEFAaiIDJAAgAyABIAIgABEWAEHAABAjIAMQQCADEEEaIANBQGskAAsEAEEAC0gBAX8jAEHQAGsiAyQAIAMgASkDADcDACADIAEpAwg3AwggA0EQaiIBIAMgAiAAEQMAQcAAECMgARBAIAEQQRogA0HQAGokAAsEAEEAC1UBAn8jAEFAaiICJAAgASAAKAIEIgNBAXVqIQEgACgCACEAIAIgASADQQFxBH8gASgCACAAaigCAAUgAAsRAQBBwAAQIyACEEAgAhBBGiACQUBrJAALdQECfyMAQSBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEgECMiACACKQMYNwMYIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBIGokACAAC7oBAQN/IwBBEGsiAyQAIAAoAgAhAiADIAEgACgCBCIAQQF1aiIBIABBAXEEfyABKAIAIAJqKAIABSACCxEBAEEMECMiAEEANgIIIABCADcCACADKAIEIgIhBCACIAMoAgAiAWtBBnUiAgRAIAAgAhCVAyAAKAIEIQIgASAERwRAA0AgAiABEEBBQGshAiABQUBrIgEgBEcNAAsLIAAgAjYCBAsgAyADNgIMIANBDGoQmAMgA0EQaiQAIAALVwECfyMAQUBqIgMkACABIAAoAgQiBEEBdWohASAAKAIAIQAgAyABIAIgBEEBcQR/IAEoAgAgAGooAgAFIAALEQsAQcAAECMgAxBAIAMQQRogA0FAayQACwsAIAAQaRogABAiC3MBAn8jAEHQAGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACAEQQFxBEAgASgCACAAaigCACEACyADIAIpAwg3AwggAyACKQMANwMAIANBEGoiAiABIAMgABEDAEHAABAjIAIQQCACEEEaIANB0ABqJAALJAECfiAAKQMAIAEpAwBTIAApAwgiAiABKQMIIgNVIAIgA1EbCwYAQYCcAgsUACAAQQRqQQAgASgCBEGhmAFGGwtPAQJ/AkAgASgCBCICBEAgASgCACIBIAJBBHRqIQMDQCAAKAIEKAIQIgJFDQIgAiABIAIoAgAoAhgRAQAgAUEQaiIBIANHDQALCw8LEGYACxUAIAFByJsCNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQcibAjYCACABIAAoAgQ2AgQgAQsQACAAKAIMIAAoAghrQQJ1CwoAIABBCGoQhAILZwEDfyAAKAIEIgMgACgCCCIBRwRAA0AgACABQQRrIgE2AgggASgCACECIAFBADYCACACBEAgAiACKAIAKAIEEQAAIAAoAgghAQsgASADRw0ACwsgACgCACIBBEAgACgCDBogARAiCwviBAMGfwF8AX4jAEEgayIGJAACf0EwECMhAyMAQSBrIgIkACADQQA2AiggA0IANwMgIANBADYCECADQgA3AwggAyAANgIEIANBmJsCNgIAAkACQCAARQRAIANCgICAgICAgPg/NwMYIAJBADYCDCACQgA3AgREAAAAAAAA8D8hCAwBCyADIAArAxgiCDkDGCACQQA2AgwgAkIANwIEIAhEAAAAAAAAAABhDQELIAJBBGogASgCBCABKAIAa0EEdRBcIAEoAgAiBCABKAIEIgFHBEADQCAEKQMAIQkgAiAIIAQpAwi5ojkDGCACIAggCbmiOQMQIAJBBGogAkEQahBMIARBEGoiBCABRw0ACwsgA0EgahBFIAMgAigCBDYCICADIAIoAgg2AiQgAyACKAIMNgIoIAJBIGokACADDAELQQIQggIACyEDAkACQCAAKAIMIgEgACgCECICSQRAIAEgAzYCACABQQRqIQMMAQsgASAAQQhqIgQoAgAiBWtBAnUiB0EBaiIBQYCAgIAETw0BIAZBDGpB/////wMgAiAFayICQQF1IgUgASABIAVJGyACQfz///8HTxsgByAEEEoiASgCCCICIAM2AgAgASACQQRqNgIIIAEoAgQgACgCDCAAKAIIIgJrIgNrIQQgAwRAIAQgAiAD/AoAAAsgACgCCCECIAAgBDYCCCABIAI2AgQgACABKAIIIgM2AgwgASACNgIIIAAoAhAhBCAAIAEoAgw2AhAgASACNgIAIAEgBDYCDCABEMwFCyAAIAM2AgwgA0EEaygCACAGQSBqJAAPCxAmAAsJACAAEIMCECILcQEDfyMAQeAAayIDJAAgA0EANgIUIANCADcCDCADQQxqIgQgASgCACIFIAEoAgQiASABIAVrQQxtEEcgA0EYaiIBIAQgAiAAEQMAQcAAECMgARC0ASABEEEaIAMgBDYCXCADQdwAahApIANB4ABqJAALFQAgACgCBCAAQQRqIAAsAA9BAEgbCycAIABB6JoCNgIAIAAsAA9BAEgEQCAAKAIMGiAAKAIEECILIAAQIgslACAAQeiaAjYCACAALAAPQQBIBEAgACgCDBogACgCBBAiCyAACyUBAX8jAEEQayIBJAAgASAAQQxqNgIMIAFBDGoQKSABQRBqJAALDwAgAEG0mgI2AgAgABAiCw0AIABBtJoCNgIAIAALDQAgAARAIAAQQRAiCwuvAQICf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AWoQKSABEGkaIAIgAzYCWCABECkCQCACKAIkIgFFDQAgASABKAIEIgNBAWs2AgQgAw0AIAEgASgCACgCCBEAACABECQLIAJBADYCHCACQgA3AhQgAkEoaiACQRRqQQAQxAIgAEEANgIIIABCADcCACACKAIYIAIoAhRrQQxtIQEjAEEgayIDJAACQAJAIAAoAgggACgCACIEa0EGdSABSQRAIAFBgICAIE8NASAAIANBDGogASAAKAIEIARrQQZ1IAAQqQEiARCnAiABEKYCCyADQSBqJAAMAQsQJgALIAIoAhgiAyACKAIURwRAA0BBGBAjIgFBtJoCNgIAIAFCADcCBCABQQxqIgQgA0EMayIDEFsgAiABNgIQIAIgBDYCDCACIAIpAgw3AwAgAkHYAGoiBCACEGoCQCAAKAIEIgEgACgCCCIFSQRAIAEgBBC0ARogAUFAayEBDAELIAEgACgCACIEa0EGdSIGQQFqIgFBgICAIE8NBCACQfwBakH///8fIAUgBGsiBEEFdSIFIAEgASAFSRsgBEHA////B08bIAYgABCpASEEIAIoAoQCIAJB2ABqELQBGiACIAIoAoQCQUBrNgKEAiAAIAQQpwIgACgCBCEBIAQQpgILIAAgATYCBCACQdgAahBBGiADIAIoAhRHDQALCyACIAJBFGo2AlgjAEEQayIFJAAgAigCWCIBKAIAIgAEQCAAIQMgASEEIAEoAgQiBiAARwRAA0AgBSAGQQxrIgY2AgwgBUEMahApIAAgBkcNAAsgAigCWCIEKAIAIQMLIAEgADYCBCAEKAIIGiADECILIAVBEGokACACQShqEIMCGgsgAkGQAmokAA8LECYAC9oCAgV/A3wjAEFAaiIDJAACQCABRAAAAAAAAAAAZQRAIAAQ4wEMAQsgAkECTARAIAEQwgEhAgsgA0EwaiACEJIDIQUgAkEASgRARAAAAAAAgHZAIAK3oyEJA0AgCSAEuKIiCEQAAAAAAIBWQKAQPiEKIAgQPiEIIAUoAgAgBEEEdGoiBiABIAiiOQMIIAYgASAKojkDACAEQQFqIgQgAkcNAAsLIANBEGogBRA8IQIgA0EANgIkIANCADcCHCADQRxqIgY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A0ACQCAHIAggCCACQQJ0IglqKAIAIgpBAnRqKAIAQQNtQRhsaisDEEQAAAAAAAAAAGZFDQAgByAKQQNtQRhsaisDEEQAAAAAAAAAAGNFDQAgCSANaiIFQXhBBCACQQNvQQJGG2ooAgAhDyAFKAIAIRAgDiAEQQR0aiIFIAkgDGooAgA2AgwgBSAKNgIIIAUgDzYCBCAFIBA2AgAgBEEBaiEECyACQQFqIgIgC0cNAAsLIAFCADcDmAEgAUIANwOQASABQgA3AzAgAUIANwM4IAFBoAFqIAQgAUEwahCVAiABQfgAaiICIAEoAqABIgQgBCABKAKkAUEEdGpBABD0AiABQgA3A0ggAUKAgICAgICA+D83A0AgAUIANwNQIAFCADcDYCABQoCAgICAgID4PzcDWCABQgA3A2ggASABKQKgATcCcCABIAFBQGtBMPwKAAAgAUGEAWogAiABQfAAaiIEIANByABqIAEQxwQgASACNgJwIAQQKSAAQQA2AgggAEIANwIAIAEoAoQBIgMgASgCiAEiBEcEQANAIAFBADYCgAEgAUIANwJ4IAMoAgAiAiADKAIEIgVHBEADQCABQfgAaiACEEwgAkEYaiICIAVHDQALCyAAIAFB+ABqEHYgASgCeCICBEAgASACNgJ8IAEoAoABGiACECILIANBDGoiAyAERw0ACwsgASABQYQBajYCeCABQfgAahApIAEoAqABIgAEQCAAECILIAFBsAFqJAACQCAGKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIAZBEGokAAuODgMPfwl8An4jAEEQayILJAAgC0EIaiABQQAQKxAqIAsoAgghBiMAQcACayIBJAAgASAGKQMINwM4IAEgBikDADcDMCABIAYpAyA3AxAgASAGKQMYNwMIIAFBADYCKCABQgA3AiAgAUEgakGAARCfASABIAEoAiQiA0EBajYCJCABKQMwIRsgASkDOCEcIAEoAiAgA0EwbGoiAyACOQMQIAMgHDcDCCADIBs3AwAgAyABKQMQNwMgIAMgASkDCDcDGCADIAI5AyggAUIANwMQIAFCADcDCCABQYCAgPwDNgIYAkACQC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AIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBASADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC5UCAQF/IwBBIGsiAyQAIANBGGogAUEQahB/IANBEGogASADKAIYECsQKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBACADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC3EBA38jAEGQAWsiBCQAIARByABqIgUgARDkAiAEQRhqIgYgBUEw/AoAACAEIAIpAxA3AxAgBCACKQMINwMIIAQgAikDADcDACAEQfgAaiICIAYgBCADEJYEIAAgASACQQIQ6AEgAhAoGiAEQZABaiQAC8oDAgN/AX4jAEHQAGsiAyQAIANBxABqIAFBEGoQfyADQTxqIAEgAygCRBArECoCQCADKAI8IgQoAkQiAQRAIAAgARBGDAELQagCECMiAUGgkAI2AgAgAUIANwIEIAFBEGogBBA3IQQgAyABNgI4IAMgBDYCNAJAIAEoAswBRQ0AIAMgApk5AyAgA0GslwI2AhggAyADQRhqIgU2AiggBCAFQQEgAygCRBDRAiAFIAMoAigiAUYEf0EQBSABRQ0BQRQLIQQgASABKAIAIARqKAIAEQAACyADQQhqIANBNGoQWSADIAMpAggiBjcCECADQgA3AgggAyAGNwMAIAAgAxBDAkAgAyg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AAKAIEIgBGDQAgCCAAIAAgCGtBBnVnQQF0QT5zQQEQ/AQLIAMQOhoLIAFBwAZqJAACQCACKAI8IgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIAJBQGskACAHQTBqJAALsQMBBH8jAEGAAWsiBCQAIAQgAikDADcDCCAEIAIpAwg3AxAgBCACKQMQNwMYIARB0ABqIQYjAEGwAWsiAiQAIAJBqAFqIAFBABArECoCQCACKAKoASgCRCIFBEAgAkGQAWoiASAFEEYgBiABEC4aIAZBGGogARAuGiABECgaDAELIAEQwAEEQCACQZABaiIBEOsBGiACQfgAaiIFEOsBGiAGIAEQiwEaIAZBGGogBRCLARogBRAoGiABECgaDAELIAJByABqIgUgARDkAiACQRhqIgcgBUEw/AoAACACIAQpAxg3AxAgAiAEKQMQNwMIIAIgBCkDCDcDACACQZABaiIFIAcgAiADEJYEIAYgASAFEJgEIAUQKBoLAkAgAigCrAEiAUUNACABIAEoAgQiBUEBazYCBCAFDQAgASABKAIAKAIIEQAAIAEQJAsgAkGwAWokACAEQSBqIAYQLiIBQRhqIARB6ABqIgYQLhogAEEANgIIIABCADcCACAAIAEgAUEwaiICQQIQlgIDQCACQRhrECgiAiABRw0ACyAGECgaIARB0ABqECgaIARBgAFqJAALDwAgAEH4lAI2AgAgABAiCw0AIABB+JQCNgIAIAALKAEBfyAAKAIAIgAoAggiAUUEQEQAAAAAAADwPw8LIAAoAgy3IAG3owsXACAAKAIAIgAEfyAALQAQBUEAC0EBcQsMACAAKAIAQQE6ABALdgECfyMAQeAAayIDJAAgA0EwaiIEIAEgAhCYBCADIAQQLiIBQRhqIANByABqIgQQLhogAEEANgIIIABCADcCACAAIAEgAUEwaiICQQIQlgIDQCACQRhrECgiAiABRw0ACyAEECgaIANBMGoQKBogA0HgAGokAAu1AQEDfyAAIwBBEGsiACQAIAAgAUEQahB/IABBCGogASAAKAIAECsQKiAAKAIIKAJEAkAgACgCDCIBRQ0AIAEgASgCBCICQQ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ARQ0AIAAgACgCBEEBajYCBAsgBCAEQfABajYCACAEEGULIARBoAJqJAAPCxAmAAsQJgALwwQCBH8MfCMAQfABayIDJABBmAEQIyIGQbCTAjYCACAGQgA3AgQjAEEQayIFJAAgBkEQaiIEQgA3AgQgBEG0kgI2AgAgBUEANgIIIAVCADcCACAEQQxqIAUQ0wQgBSAFNgIMIAVBDGoQZSAEQgA3AyggBEKAgICAgICA+D83AyAgBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQgA3A4ABIAVBEGokACADQegBaiIFIAY2AgQgBSAENgIAIAUgBkEUaiAEEI8BIAMoAugBQQxqIgQgAUEMaiIFRwRAIAQgBRBeIARBCGogBUEIahBeCyABKwMgIQcgASsDKCEIIAErAzAhCSABKwM4IQogASsDQCELIAErA0ghDCABKwNQIQ0gASsDWCEOIAErA2AhDyABKwNoIRAgASsDcCERIAErA3ghEiADQoCAgICAgID4PzcDgAEgAyASOQN4IAMgETkDcCADIBA5A2ggA0IANwNgIAMgDzkDWCADIA45A1AgAyANOQNIIANCADcDQCADIAw5AzggAyALOQMwIAMgCjkDKCADQgA3AyAgAyAJOQMYIAMgCDkDECADIAc5AwggA0GIAWoiBCACIANBCGoQ8AEgAygC6AEiAkEgaiAEQeAA/AoAACACIAEtABw6ABwgACACNgIAIAAgAygC7AE2AgQgA0HwAWokAAtnAQJ/IwBBgAFrIgQkACAEIAIQ3wEjAEEQayICJAAgASgCACIFQgA3AgAgBUIONwIIIAJBCGogBCADIAEoAgAQkwUgAiACKQIINwMAIAAgAhDmAiACQRBqJAAgBBCqASAEQYABaiQAC44BAQJ/IwBBgAFrIgQkACAEIAIQ3wEjAEEQayICJAAgASgCACIDQgA3AgAgA0IHNwIIIAEoAgAhA0GoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAQgAxCTAyEDIAIgATYCDCACIAM2AgggAiACKQ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gaiAHEFchBiMAQSBrIgEkACABIAY2AgwgAUGklQI2AgggASABQQhqIgU2AhggBCAFELsEAkAgBSABKAIYIgRGBH9BEAUgBEUNAUEUCyEFIAQgBCgCACAFaigCABEAAAsgAUEgaiQAAkAgBiAGKAIQIgFHBEBBFCEIIAFFDQELIAEgASgCACAIaigCABEAAAsgAkEQaiACQTxqEFkgAiACKQIQIgk3AhggAkIANwIQIAIgCTcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAigCQCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAIoAkgiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkHQAGokAAJAIAcgAygCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIANBIGokAAsGAEGIkgILFAAgAEEEakEAIAEoAgRB5PAARhsLCwAgAUHYkQI2AgALEQBBCBAjIgBB2JECNgIAIAALBgBByJECCxQAIABBBGpBACABKAIEQfvrAEYbCwsAIAFBkJECNgIACxEAQQgQIyIAQZCRAjYCACAAC5sDAgl/AXwjAEGQAWsiAyQAIANBhAFqIAIQlgUgA0EgakEAQeAA/AsAIANCgoCAgDA3AhggA0KAgICAEDcCECADQThqIQggAygChAEhCQNAIANBEGogBmooAgAhBCADQoCAgIAQNwIEIAkgBEEFdGohCiADQQI2AgwgA0EgakEwQcgAIARBAkYbaiELQQAhAgNAIAogA0EEaiACaigCACIHQQN0aisDACEMIANBIGohBQJAAkACQCAEDgICAAELIAghBQwBCyALIQULIAVBCEEQIAdBAUYbQQAgBxtqIAw5AwAgAkEEaiICQQxHDQALIAZBBGoiBkEQRw0ACyMAQSBrIgIkACACQRBqIAEQigEgAkEYaiACKAIQIgEgA0EgaiABKAIAKAIEEQMAIAIgAikCGDcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkEgaiQAIAMoAoQBIgAEQCADIAA2AogBIAMoAowBGiAAECILIANBkAFqJAALCwAgACABQQIQiAELCwAgACABQQEQiAELCwAgACABQQAQiAELDQAgACABIAJBAhDoAQsNACAAIAEgAkEBEOgBCw0AIAAgASACQQAQ6AELBgBBgJECCxQAIABBBGpBACABKAIEQefoAEYbC/0BAQN/IwBBgAFrIgMkACADIAEQ3wEjAEEgayIBJABBJBAjIgJCADcCDCACQYSWAjYCACACQgA3AgQgAkIANwIUIAJCADcCHCAAIAI2AgQgACACQQxqNgIAQagCECMiAkGgkAI2AgAgAkIANwIEIAJBEGogA0EAEJMDIQQgASACNgIQIAEgBDYCDCABQRRqIAFBDGoQ3AQgACABKAIUNgIIIAAgASgCGDYCDCABQgA3AhQCQCABKAIQIgJFDQAgAiACKAIEIgRBAWs2AgQgBA0AIAIgAigCACgCCBEAACACECQLIABCADcCECABQSBqJAAgAxCqASADQYABaiQACxUAIAFByJACNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQciQAjYCACABIAAoAgQ2AgQgAQsPACAAQaCQAjYCACAAECILDQAgAEGgkAI2AgAgAAvwEAITfwJ+IwBB0AFrIgMkACADQcgBaiICIAFBABArECoCQCADKALIASgCRCIEBEAgA0GwAWoiASAEEEYgAEEANgIIIABCADcCACAAIAEgAkEBEJYCIAEQKBoMAQsgA0GkAWogARCQAiICEJYBIQ0gAgRAIAKtIRYDQCANKAIAIBWnQQN0aiAVNwMAIBVCAXwiFSAWUg0ACwsgAygCyAEiBCgCXARAQQAhAgNAIAQoAlggAkECdGoiBSgCACIGIAVBeEEEIAJBA29BAkYbaigCACIFSARAIA0gBiAFEF8gAygCyAEhBAsgAkEBaiICIAQoAlxJDQALCyADQQA2AqABIANCADcCmAECQCANIANBmAFqEIwFIhNBAUYEQCAAQQEQkQMoAgAgARCjBAwBCwJAIAMoApwBIgQgAygCmAEiAkYNACAEIAJrIgQQJyEOIARFDQAgDiACIAT8CgAACyABEJACIQ8gAEEANgIIIABCADcCACATQQBKBEADQEGoAhAjIghBoJACNgIAIAhCADcCBCAIQRBqEDshBiAIIAMoAsgBIgIrAzA5A0AgCCACKwM4OQNIQQAhAiADQQA2ApABIANCADcCiAEgA0GIAWogDxAlIAMgDzYCjAEgAygCiAEiBSEEIA8EQANAIBAgDiACQQJ0aigCAEYEQCAEIAI2AgAgBEEEaiEECyACQQFqIgIgD0cNAAsLIANCADcDgAEgA0IANwN4IANCADcDcCADQgA3AyggA0IANwMwIANCADcDOCAIQdgAaiAEIAVrQQJ1IgQgA0EoahBnIANCADcDaCADQgA3A2AgA0IANwNYIANCADcDECADQgA3AxggA0IANwMgIAhBqAFqIAQgA0EQahBnQQAhAiADQYgBaiAEQQAQMSADKAKMASIEBEAgCCgCWCEKIAMoAsgBIgsoAkghDCADKAKIASEFA0AgCiACQRhsaiIHIAwgBSACQQJ0aigCAEEYbGoiCSkDEDcDECAHIAkpAwg3AwggByAJKQMANwMAIAJBAWoiAiAERw0ACyAIKAKoASEKIAsoApgBIQtBACECA0AgCiACQRhsaiIHIAsgBSACQQJ0aigCAEEYbGoiCSkDEDcDECAHIAkpAwg3AwggByAJKQMANwMAIAJBAWoiAiAERw0ACwtBACECIANBADYCUCADQgA3AkggA0HIAGogARC/ARAlIAMoAsgBIQcgARC/AQRAA0AgECAOIAcoAlggAkEMbGooAgBBAnRqKAIARgRAAkAgAygCTCIEIAMoAlAiBU8EQCADQcgAaiAFQQF0QYABIAUbECUgAygCSCADKAJMIgRBAnRqIAI2AgAMAQsgAygCSCAEQQJ0aiACNgIACyADIARBAWo2AkwLIAEQvwEgAkEBaiICSw0ACwsgAygCTARAIAMoAsgBIQcjAEFAaiIFJAAgBigC3AEhAiAGQdgBaiIEIAMoAkwiCRA5IAYgCTYC3AEgAkERSSACIAlBAXQiCk1yRQRAIAQQgwELIAMoAkwiCwRAIAQoAgAhBCAHKALYASEMIAMoAkghEUEAIQIDQCAE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0EBSwRAQQAhBgNAIAcgCiANIAEgBhC0AiABIgZBAWoiASADRw0ACwsgBygCOCEIIAMEQCADIQEDQCAIIAFBAWsiBkEEdGoiDysDACECIAggAUEEdGoiASAPKwMImjkDCCABIAKaOQMAIAYiAQ0ACwsgCCAIIANBBHRqIgEpAwg3AwggCCABKQMANwMAAkAgBygCmAFFBEAgBysDECECDAELIAcgCyANIAdBOGogAyADEPsBIgI5AxALAkAgAplEEeotgZmXcT1lBEAgDSgCACADQQR0aiEGAkAgBygCSCIBIAcoAkwiCEkEQCABIAYpAwg3AwggASAGKQMANwMAIAFBEGohBgwBCyABIAdBxABqIgsoAgAiD2tBBHUiFEEBaiIBQYCAgIABTw0MIAlBDGpB/////wAgCCAPayIIQQN1Ig8gASABIA9JGyAIQfD///8HTxsgFCALEDIiASgCCCIIIAYpAwg3AwggCCAGKQMANwMAIAEgASgCCEEQajYCCCABKAIEIAcoAkggBygCRCIIayIGayELIAYEQCALIAggBvwKAAALIAcoAkQhCCAHIAs2AkQgASAINgIEIAcgASgCCCIGNgJIIAEgCDYCCCAHKAJMIQsgByABKAIMNgJMIAEgCDYCACABIAs2AgwgARA2CyAHIAY2AkgMAQsCQAJAAkAgBygCaEECaw4DAAIBAgsgByANIAMgAxC3AgwCCyAHIA0gAyADRBgtRFT7IQlAELUCDAELIAcgDSADIAMQtgILIBFBAmsiAQRAA0AgByAKIA0gASADELQCIAEiA0EBayIBDQALCyAHKAJQIAdBxABqEHYgCUEgaiQADAALCyANQQxqIg0gCigCBEcNAAsLIA5BMGokACAHKAIABEAgBygCUCIBIAEoAgAQewsgCkEgaiIKIAcoAlxHDQALCyAHKAJQIgEoAgQgASgCAEYNAAJ/QQAgBygCWCIKIAcoAlwiA0YNABoCQANAIAooAhxFDQEgCkEgaiIKIANHDQALQQAMAQsgCi0AFAshAyAMQQA7ARggDEIANwMQIAxBAjYCDCAMQgA3AgQgDEEcakEAQTD8CwAgDEHQAGpBAEEk/AsAIAxBADYCiAEgDEIANwO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CRCACQdwAakEAQTD8CwAgAkGQAWpBAEEk/AsAIAJBADYCyAEgAkIANwPAASACQQE6AL0BIAJBAToAtAEgAkKAgICAgICAoD43A9gBIAJCgICAgICAgNDBADcD0AEgAkH8mgI2AkAgAkFAayIBIAJBKGoiBxCbASACQQA2AugBIAJCADcC4AEgAUECQQIgAkEMaiIEIAJB4AFqIgMQ4gEgAiADNgLsASACQewBahApIAEQaRpBGBAjIgNBtJoCNgIAIANCADcCBCADQQxqIgggBBBbIAIgAzYCHCACIAg2AhggAiACKQIYNwMAIAAgAhBqIAIgBDYCQCABECkgAiAHNgJAIAEQKSACKAI0IgAEQCACIAA2AjggAigCPBogABAiCyACQfABaiQADAELEGYACwJAIAkgBigCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAZBIGokAAJAIAogBSgCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAVBIGokAAsMACABIAAoAgQREAALFQAgAUGMjwI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBjI8CNgIAIAEgACgCBDYCBCABCwYAQeyOAgsUACAAQQRqQQAgASgCBEGL5QBGGwtRAQF/IwBBIGsiBCQAIAMoAgAhAyABKAIAIAAoAgQhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQQhqIAMgABEDACAEQSBqJAALFQAgAUG0jgI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBtI4CNgIAIAEgACgCBDYCBCABCwYAQaSOAgsUACAAQQRqQQAgASgCBEHj4wBGGwuCAgEGfyMAQRBrIgIkACABKAIAIQcgASgCBCEEQQAhASACQQA2AgwgAkIANwIEIAJBBGogBEEDbBDUASACKAIEIQUgBARAA0AgBSABQRhsIgZqIgMgBiAHaiIGKwMAOQMAIAMgBisDCDkDCCADIAYrAxA5AxAgAUEBaiIBIARHDQALCyAFIAQgACgCBCgCABEBACACKAIEIQACQAJAIAQEQEEAIQEDQCAHIAFBGGwiA2oiBSAAIANqIgMrAw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ADYCWCADKAJcGiAAECILIANB4ABqJAALNgECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgACgCABEFAEEYECMgBRAuIAUQKBogBEEgaiQACyoBAX8jAEEQayIDJAAgA0EIaiABIAIgACgCABEDACADKAIMIANBEGokAAthAQF/IwBBMGsiBCQAIAAoAgAhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQSBqIgIgASAEQQhqIAMgABEPACACEJQDIAQgAjYCLCAEQSxqEHogBEEwaiQACzUBAX8jAEEQayIDJAAgAyABIAIgACgCABEDACADEJQDIAMgAzYCDCADQQxqEHogA0EQaiQACzYBAX8jAEFAaiIGJAAgBiABIAIgAyAEIAUgACgCABEqAEHAABAjIAYQQCAGEEEaIAZBQGskAAsLACAAIAFBAhDFAgtfAQF/IwBB0ABrIgMkACAAKAIAIQAgAyACNgIMIANBnKACNgIIIANBEGoiAiABIANBCGogABEDAEHAABAjIAIQQCACEEEaIAMoAgwiAEEJTwRAIAAQAQsgA0HQAGokAAuBAgICfwF8IwBB4ABrIgMkACADQQhqIgQgASACIAAoAgARAwAgA0EwaiAEQSj8CgAAQQIhACADLQBQQQFGBEAjAEEQayIAJABB2J4CLQAAQQFxRQRAQQJBmIQCQQMQBiEBQdieAkEBOgAAQdSeAiABNgIAC0EgECMiASADKQNINwMYIAEgAykDQDcDECABIAMpAzg3AwggASADKQMwNwMAIAAgATYCCCAAQQA2AgRB1J4CKAIAQQBBACAAQQRqIABBCGoQBSEFIAAoAgQhASADIAX8AzYCXCADQZygAjYCWCABBEAgARAECyAAQRBqJAAgAygCXCEACyADQeAAaiQAIAALTAEBfyMAQSBrIgMkACAAKAIAIQAgAyACKQMYNwMYIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAEgAyAAEQEAIANBIGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgiBDcDMCADIAMpAxA3AyggAyADKQMINwMgQQIhACAEp0EBcQRAIwBBEGs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EAjAEEQayIAJABBqJ4CLQAAQQFxRQRAQQJB6PwBQQMQBiEBQaieAkEBOgAAQaSeAiABNgIACyAAIAMrAxg5AwggAEEANgIEQaSeAigCAEEAQQAgAEEEaiAAQQhqEAUhBSAAKAIEIQEgAyAF/AM2AiwgA0GcoAI2AiggAQRAIAEQBAsgAEEQaiQAIAMoAiwhAAsgA0EwaiQAIAALMAEBfyMAQRBrIgQkACAAKAIAIQAgBCADOQMIIAEgAiAEQQhqIAARAwAgBEEQaiQACy4BAX8jAEEQayIDJAAgACgCACEAIAMgAjkDCCABIANBCGogABEBACADQRBqJAAL8wECAn8BfCMAQSBrIgMkACADQQhqIgQgASACIAAoAgARAwBBAiEAAkAgAy0AFEEBRw0AIwBBEGsiACQAQZyeAi0AAEEBcUUEQEECQfj6AUEDEAYhAUGcngJBAToAAEGYngIgATYCAAsgAEEMECMgBBA8NgIIIABBADYCBEGYngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgIcIANBnKACNgIYIAEEQCABEAQLIABBEGokACADKAIcIQAgAy0AFEEBRw0AIAMoAggiAUUNACADIAE2AgwgAygCEBogARAiCyADQSBqJAAgAAsNACAAIAEgAkECEMYCC0gBAX8jAEEQayIDJAAgACgCACEAIAEgA0EEaiACEDwiASAAEQEAIAEoAgAiAARAIAEgADYCBCABKAIIGiAAECILIANBEGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgiBDcDMCADIAMpAxA3AyggAyADKQMINwMgQQIhACAEp0EBcQRAIwBBEGsiACQAQZCeAi0AAEEBcUUEQEECQYj5AUEDEAYhAUGQngJBAToAAEGMngIgATYCAAtBEBAjIgEgAykDKDcDCCABIAMpAyA3AwAgACABNgIIIABBADYCBEGMngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgI8IANBnKACNgI4IAEEQCABEAQLIABBEGokACADKAI8IQALIANBQGskACAAC5ICAwF/AX4BfCMAQ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KcASADQZygAjYCmAEgAQRAIAEQBAsgAEEQaiQAIAMoApwBIQALIANBoAFqJAAgAAsNACAAIAEgAkEAEMYCCy8BAX8jAEFAaiIDJAAgACgCACEAIAMgAkHAAPwKAAAgASADIAARAQAgA0FAayQAC1EBAn8jAEHQAGsiByQAIAAoAgAhACAHQQhqIgggA0Ew/AoAACAHQThqIgMgASACIAggBCAFIAYgABEoAEEYECMgAxAuIAMQKBogB0HQAGokAAtbAQF/IwBBIGsiBCQAIAAoAgAhACAEIAI2AgQgBEGcoAI2AgAgBEEIaiICIAEgBCADIAARBQBBGBAjIAIQLiACECgaIAQoAgQiAEEJTwRAIAAQAQsgBEEgaiQACzcAIAAoAgAgAUEFdGoiACACKQMYNwMYIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAQQELmgYCB38BfCMAQdABayIDJABBJBAjIgRCADcCDCAEQYSWAjYCACAEQgA3AgQgBEIANwIUIARCADcCHCAAQgA3AxggAEKAgICAgICA+D83AxAgAEIANwMIIAAgBDYCBCAAIARBDGo2AgAgAEIANwMgIABCADcDMCAAQoCAgICAgID4PzcDKCAAQgA3AzggA0EANgIcIANCADcCFCADQRRqIAEoAgQgASgCAGtBDG0QViABKAIAIgcgASgCBCIIRwRAA0AgA0EgaiAHEDwiCSEBIwBBEGsiBCQAIANBwAFqIgVBADYCCCAFQgA3AgAgBSABKAIEIAEoAgBrQQR1EFwgASgCACIGIAEoAgQiAUcEQANAIAYrAwAhCiAEIAYrAwg5AwggBCAKOQMAIAUgBBBMIAZBEGoiBiABRw0ACwsgBEEQaiQAIANBFGogBRBoIAMoAsABIgEEQCADIAE2AsQBIAMoAsgBGiABECILIAkoAgAiAQRAIAMgATYCJCADKAIoGiABECILIAdBDGoiByAIRw0ACwsgA0EANgIQIANCADcCCCADQThqQQBB6AD8CwAgA0IANwMwIANBAjYCLCADQgA3AiQgA0E8akEAQTD8CwAgA0HwAGpBAEEk/AsAIANBADYCqAEgA0IANwOgASADQQE6AJ0BIANBAToAlAEgA0KAgICAgICAoD43A7gBIANCgICAgICAgNDBADcDsAEgA0H8mgI2AiAgA0EgaiIBIANBFGoQmwEgA0EANgLIASADQgA3AsABIAFBAkEDIAIgAkEDTxsiAkEAIAJBAWtBA0kbIANBCGoiBCADQcABaiICEOIBIAMgAjYCzAEgA0HMAWoQKSABEGkaQRgQIyICQbSaAjYCACACQgA3AgQgAkEMaiIFIAQQWyADIAI2AiQgAyAFNgIgIABBCGogARBOAkAgAygCJCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCyADIANBCGo2AsABIANBwAFqECkgAyADQRRqNgIgIANBIGoQKSADQdABaiQAC10AIAACfyABKAIEIAEoAgAiAWtBBXUgAksEQCAAIAEgAkEFdGoiASkDGDcDGCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDAEEBDAELIABBADoAAEEACzoAIAsQACAAKAIEIAAoAgBrQQV1C8cDAQV/AkAgACgCBCAAKAIAIgNrQQV1IgQgAUkEQCMAQSBrIgYkAAJAAkAgASAEayIEIAAoAggiBSAAKAIEIgNrQQV1TQRAIAAgBAR/IAMgBEEFdGohAANAIAMgAikDGDcDGCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQSBqIgMgAEcNAAsgAAUgAws2AgQMAQsgAyAAKAIAIgNrQQV1IgcgBGoiAUGAgIDAAE8NASAGQQxqQf///z8gBSADayIDQQR1IgUgASABIAVJGyADQeD///8HTxsgByAAEJYDIgEoAggiAyAEQQV0aiEEA0AgAyACKQMYNwMYIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBIGoiAyAERw0ACyABIAQ2AgggASgCBCAAKAIEIAAoAgAiBGsiAmshAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAgg2AgQgASACNgIIIAAoAgghAyAAIAEoAgw2AgggASACNgIAIAEgAzYCDCABEJoFCyAGQSBqJAAMAgsQJgALIAEgBEkEQCAAIAMg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AACQAJAIAEgBGsiASAAKAIIIgYgACgCBCIDa0EGdU0EQCAAIAEEfyADIAFBBnRqIQADQCADIAIQQEFAayIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIEa0EGdSIHIAFqIgNBgICAIE8NASAFQQxqQf///x8gBiAEayIEQQV1IgYgAyADIAZJGyAEQcD///8HTxsgByAAEKkBIgQoAggiAyABQQZ0aiEBA0AgAyACEEBBQGsiAyABRw0ACyAEIAE2AgggACAEEKcCIAQQpgILIAVBIGokAAwCCxAmAAsgASAESQRAIAMgBSABQQZ0aiIBRwRAA0AgASADQUBqEEEiA0cNAAsLIAAgATYCBAsLC78BAQV/AkAjAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABELQBQUBrIQEMAQsgAiAAKAIAIgRrQQZ1IgZBAWoiAkGAgIAgTw0BIAVBDGpB////HyADIARrIgNBBXUiBCACIAIgBEkbIANBwP///wdPGyAGIAAQqQEiAigCCCABELQBGiACIAIoAghBQGs2AgggACACEKcCIAAoAgQhASACEKYCCyAAIAE2AgQgBUEgaiQADAELECYACwssAQF/IwBBEGsiASQAIAAEQCABIAA2AgwgAUEMahCYAyAAECILIAFBEGokAAsGAEGE/gELFwAgACgCACABQQN0aiACKwMAOQMAQQELPQAgAAJ/IAEoAgQgASgCACIBa0EDdSACSwRAIAAgASACQQN0aisDADkDAEEBDAELIABBADoAAEEACzoACAvtGgQVfwZ8A30CfiMAQZABayINJAAgABAaNgIEIABBnKACNgIAIA1BEGoiCCABEN8BIwBBkARrIgIkACACQgA3AogCIAIgAkGIAmoiCjYChAIgAkH4AWogCCgCCCAIKAIEa0ECdSAIKAIAbhDsASIQKAIAIgYgECgCBCIFRwRAIAYhBANAIAQgAzYCACADQQFqIQMgBEEEaiIEIAVHDQALCyAIKAIgIgMgCCgCHCIERwRAIAMgBGtBAnUhBSAIKAIoIQdBACEDA0AgBiAEIANBAnQiCWooAgBBAnRqIAcgCWooAgA2AgAgA0EBaiIDIAVHDQALCy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AMgBEEDdGohACACKwMAIQgDQCADIAg5AwAgA0EIaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EDdSIHIARqIgFBgICAgAJPDQEgBkEMakH/////ASAFIANrIgNBAnUiBSABIAEgBUkbIANB+P///wdPGyAHIAAQSyIBKAIIIgMgBEEDdGohBCACKwMAIQgDQCADIAg5AwAgA0EIaiIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICayEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQmQELIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQQN0ajYCBAsLCwkAIAAgARCoAgsGAEGM/AELMgAgAiAAKAIAIAFBDGxqIgBHBEAgACACKAIAIgAgAigCBCIBIAEgAGtBBHUQmQMLQQELOgAgAAJ/IAEoAgQgASgCACIBa0EMbSACSwRAIAAgASACQQxsahA8GkEBDAELIABBADoAAEEACzoADAuHAwEFfwJAIAAoAgQgACgCACIDa0EMbSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EMbU0EQCAAIAQEfyADIARBDGxqIQADQCADIAIQPEEMaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EMbSIHIARqIgFB1qrVqgFPDQEgBkEMakHVqtWqASAFIANrQQxtIgNBAXQiBSABIAEgBUkbIANBqtWq1QBPGyAHIAAQYSIBKAIIIgMgBEEMbGohBANAIAMgAhA8QQxqIgMgBEcNAAsgASAENgIIIAEoAgQgACgCBCAAKAIAIgRrIgJBdG1BDGxqIQMgAgRAIAMgBCAC/AoAAAsgACgCACECIAAgAzYCACABIAI2AgQgACABKAIINgIEIAEgAjYCCCAAKAIIIQMgACABKAIMNgIIIAEgAjYCACABIAM2AgwgARDVAQsgBkEgaiQADAILECYACyABIARJBEAgACADIAFBDGxqEHsLCwsIACAA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CiAEgBCgCECAMQQxsaiEFIAcoAlggC0EMbGohCUEAIQIDQCAFIANBiAFqIAJqKAIAQQJ0IgtqIAkgC2ooAgA2AgAgAkEEaiICQQxHDQALIAEgAygCACILRwRAIANCgICAgICAgPg/NwOQASADQX82AogBIANCADcDqAEgA0IANwOgASADQgA3A5gBIANCgICAgICAgPg/NwOwASADQgA3A8gBIANCADcDwAEgA0IANwO4ASADQoCAgICAgID4PzcD0AEgA0EAOwHwASADQgA3A+gBIANCADcD4AEgA0IANwPYASAGIQECQCADKAKAAiIFRQ0AA0AgASICIAUiCSAFKAIQIAtIIggbIQEgBUEEQQAgCBtqKAIAIgUNAAsgASAGRg0AIAsgAiAJIAgbKAIQSA0AIANBiAFqIAFBGGpB6gD8CgAACyADQYsCaiAEIAwgA0GIAWoQoQQgA0H8AWogAxCzBCADKAIAIQELIAxBAWoiDCANRw0ACwsgBiADKAL8ASICRwRAA0AgA0GLAmogBCANIAJBGGoQoQQCQCACKAIEIgEEQANAIAEiAigCACIBDQAMAgsACwNAIAIgAigCCCICKAIARw0ACwsgAiAGRw0ACwsgAyAVNgKIASAEQTRqIANBiAFqED0CQCARRQRAIAogDkEDbBB9IA5BAEwNASAKKAIAIQYgBygCSCEJQQAhAgNAIAkgAkEYbGoiASsDACEdIAErAwghHiAGIAJBDGxqIgUgASsDELY4AgggBSAetjgCBCAFIB22OAIAIAJBAWoiAiAORw0ACwwBCyAHKAJMIQEgA0F/NgKIASADQfwAaiABIANBiAFqELIEIQ0gA0HwAGogBygCTBCcAiELIAQoAgAgDmwhASMAQSBrIgUkAAJAAkAgCigCCCAKKAIAIgJrQQJ1IAFJBEAgAUGAgICABE8NASAFQQxqIAEgCigCBCACa0ECdSAKEEoiASgCBCAKKAIEIAooAgAiCWsiAmshBiACBEAgBiAJIAL8CgAACyAKKAIAIQIgCiAGNgIAIAEgAjYCBCAKIAEoAgg2AgQgASACNgIIIAooAgghBiAKIAEoAgw2AgggASACNgIAIAEgBjYCDCABEFMLIAV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8CQCAAKAIEIAAoAgAiA2tBGG0iBCABSQRAIwBBIGsiBiQAAkACQCABIARrIgQgACgCCCIFIAAoAgQiA2tBGG1NBEAgACAEBH8gAyAEQRhsaiEAA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EYbSIHIARqIgFBq9Wq1QBPDQEgBkEMakGq1arVACAFIANrQRhtIgNBAXQiBSABIAEgBUkbIANB1arVKk8bIAcgABBkIgEoAggiAyAEQRhsaiEEA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICQWhtQRhsaiEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQjAELIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQRhsajYCBAsLCwkAIAAgARDEAQsGAEG89gELIwAgACgCACABQQxsaiIAIAIoAgg2AgggACACKQIANwIAQQELSQAgAAJ/IAEoAgQgASgCACIBa0EMbSACSwRAIAAgASACQQxsaiIBKAIINgIIIAAgASkCADcCAEEBDAELIABBADoAAEEACzoADAuoAwEFfwJAIAAoAgQgACgCACIDa0EMbSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EMbU0EQCAAIAQEfyADIARBDGxqIQADQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBDG0iByAEaiIBQdaq1aoBTw0BIAZBDGpB1arVqgEgBSADa0EMbSIDQQF0IgUgASABIAVJGyADQarVqtUATxsgByAAEGEiASgCCCIDIARBDGxqIQQDQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAERw0ACyABIAQ2AgggASgCBCAAKAIEIAAoAgAiBGsiAkF0bUEMbGohAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAgg2AgQgASACNgIIIAAoAgghAyAAIAEoAgw2AgggASACNgIAIAEgAzYCDCABENYBCyAGQSBqJAAMAgsQJgALIAEgBEkEQCAAIAMgAUEMbGo2AgQLCwsJACAAIAEQnQULBgBBzPQBCxgAIAAoAgAgAUEGdGogAkHAAPwKAABBAQs+ACAAAn8gASgCBCABKAIAIgFrQQZ1IAJLBEAgACABIAJBBnRqQcAA/AoAAEEBDAELIABBADoAAEEACzoAQAuMAwEFfwJAIAAoAgQgACgCACIDa0EGdSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EGdU0EQCAAIAQEfyADIARBBnRqIQADQCADIAJBwAD8CgAAIANBQGsiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBBnUiByAEaiIBQYCAgCBPDQEgBkEMakH///8fIAUgA2siA0EFdSIFIAEgASAFSRsgA0HA////B08bIAcgABCpASIBKAIIIgMgBEEGdGohBANAIAMgAkHAAPwKAAAgA0FAayIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICayEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQqQILIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQQZ0ajYCBAsLCwkAIAAgARCaAwsGAEHo8gELDwAgASAAKAIAaiACNwMACw0AIAEgACgCAGopAwALHgAgASAAKAIAaiIAIAIpAwg3AwggACACKQMANwMACyoBAX8gACgCACECQRAQIyIAIAEgAmoiASkDCDcDCCAAIAEpAwA3AwAgAAsHACAAEQwACwkAIAEgABEZAAsJACABIAARAAALCQAgASAAERsACwkAIAEgABEEAAtNAQF/IwBBEGsiAiQAIAIgATYCBCACQZygAjYCACACQQhqIAIg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IFIAEgAiADIAZBAXEEfyABKAIAIABqKAIABSAACxEFAEEYECMgBRAuIAUQKBogBEEgaiQACzkBAX8gASAAKAIEIgRBAXVqIQEgACgCACEAIAEgAiADIARBAXEEfyABKAIAIABqKAIABSAACxEmAAtXAQJ/IwBBMGsiAiQAIAEgACgCBCIDQQF1aiEBIAAoAgAhACACIAEgA0EBcQR/IAEoAgAgAGooAgAFIAALEQEAQTAQIyIAIAJBMPwKAAAgAkEwaiQAIAALWgECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBACACEJQDIAIgAjYCDCACQQxqEHogAkEQaiQAC18BA38jAEEgayIFJAAgASAAKAIEIgdBAXVqIQEgACgCACEAIAVBCGoiBiABIAIgAyAEIAdBAXEEfyABKAIAIABqKAIABSAACxEiAEEYECMgBhAuIAYQKBogBUEgaiQAC3oBAn8jAEEwayIDJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIARBAXEEQCABKAIAIABqKAIAIQALIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGoiAiABIAMgABEDAEEYECMgAhAuIAIQKBogA0EwaiQAC10BA38jAEEgayIEJAAgASAAKAIEIgZBAXVqIQEgACgCACEAIARBCGoiBSABIAIgAyAGQQFxBH8gASgCACAAaigCAAUgAAsRJwBBGBAjIAUQLiAFECgaIARBIGokAAtbAQN/IwBBIGsiAyQAIAEgACgCBCIFQQF1aiEBIAAoAgAhACADQQhqIgQgASACIAVBAXEEfyABKAIAIABqKAIABSAACxELAEEYECMgBBAuIAQQKBogA0EgaiQAC1kBA38jAEEgayICJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIAJBCGoiAyABIARBAXEEfyABKAIAIABqKAIABSAACxEBAEEYECMgAxAuIAMQKBogAkEgaiQAC1wBAn8jAEEQayIDJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIAMgASACIARBAXEEfyABKAIAIABqKAIABSAACxELACADEJgFIAMgA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hwPCyAAIAEoAgAgBBBzBEACQCABKAIQIAJHBEAgAiABKAIURw0BCyADQQFHDQIgAUEBNgIgDwsgASADNgIgAkAgASgCLEEERg0AIAFBADsBNCAAKAIIIgAgASACIAJBASAEIAAoAgAoAhQRCAAgAS0ANUEBRgRAIAFBAzYCLCABLQA0RQ0BDAMLIAFBBDYCLAsgASACNgIUIAEgASgCKEEBajYCKCABKAIkQQFHDQEgASgCGEECRw0BIAFBAToANg8LIAAoAggiACABIAIgAyAEIAAoAgAoAhgRBwALC1YBA38jAEHQAGsiAiQAIAJBEGoiAyACQQRqIAEQPCIBIAARAQBBwAAQIyADEEAgAxBBGiABKAIAIgAEQCABIAA2AgQgASgCCBogABAiCyACQdAAaiQAC6gEAQV/IAAoAgQiAhCvAkEBaiIBECciAAR/An8gAUGABE8EQCABBEAgACACIAH8CgAACyAADAELIAAgAWohAwJAIAAgAnNBA3FFBEACQCAAQQNxRQRAIAAhAQwBCyABRQRAIAAhAQwBCyAAIQEDQCABIAItAAA6AAAgAkEBaiECIAFBAWoiAUEDcUUNASABIANJDQALCyADQXxxIQQCQCADQcAASQ0AIAEgBEFAaiIFSw0AA0AgASACKAIANgIAIAEgAigCBDYCBCABIAIoAgg2AgggASACKAIMNgIMIAEgAigCEDYCECABIAIoAhQ2AhQgASACKAIYNgIYIAEgAigCHDYCHCABIAIoAiA2AiAgASACKAIkNgIkIAEgAigCKDYCKCABIAIoAiw2AiwgASACKAIwNgIwIAEgAigCNDYCNCABIAIoAjg2AjggASACKAI8NgI8IAJBQGshAiABQUBrIgEgBU0NAAsLIAEgBE8NAQNAIAEgAigCADYCACACQQRqIQIgAUEEaiIBIARJDQALDAELIANBBEkEQCAAIQEMAQsgAUEESQRAIAAhAQwBCyADQQRrIQUgACEBA0AgASACLQAAOgAAIAEgAi0AAToAASABIAItAAI6AAIgASACLQADOgADIAJBBGohAiABQQRqIgEgBU0NAAsLIAEgA0kEQANAIAEgAi0AADoAACACQQFqIQIgAUEBaiIBIANHDQ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lbmd0aEVkRTMkXzAATlN0M19fMjEwX19mdW5jdGlvbjZfX2Z1bmNJWk5LOG1hbmlmb2xkOE1hbmlmb2xkMTdSZWZpbmVUb1RvbGVyYW5jZUVkRTMkXzBGaU42bGluYWxnM3ZlY0lkTGkzRUVFTlM2X0lkTGk0RUVFUzhfRUVFAFpOSzhtYW5pZm9sZDhNYW5pZm9sZDE3UmVmaW5lVG9Ub2xlcmFuY2VFZEUzJF8wAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGxFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTM19FRU5TXzlhbGxvY2F0b3JJUzNfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGxFRUUAAAAAABgtRFT7Iek/GC1EVPsh6b/SITN/fNkCQNIhM3982QLAAEHHhgELEYAYLURU+yEJQBgtRFT7IQnAAEHshgELBQEAAAABAEGEhwELAQEAQZiHAQslAQAAAAAAAAD/////AAAAAAAAAAABAAAAAAAAAP////8AAAAAAQBByIcBCxz/////AQAAAP///////////////wEAAAD/////AEH0hwELBP////8AQYiIAQtJ/////wAAAAAAAAAA//////////8BAAAA/////wAAAAD/////AQAAAP//////////AAAAAAEAAAACAAAAAAAAAAEAAAABAAAAAgBB4IgBC7AR////////////////AAAAAAMAAAAEAAAAAAAAAAEAAAAFAAAAAQAAAAUAAAADAAAAAQAAAAQAAAACAAAAAQAAAAAAAAADAAAAAgAAAAUAAAAAAAAABQAAAAMAAAACAAAAAgAAAAMAAAAFAAAAAAAAAAUAAAACAAAAAwAAAAAAAAABAAAAAgAAAAQAAAABAAAAAwAAAAUAAAABAAAABQAAAAEAAAAAAAAABAAAAAMAAAAAAAAA////////////////////////////////////////////////////////////////AwAAAAQAAAABAAAA////////////////AwAAAAIAAAABAAAAAAAAAAQAAAACAAAA////////////////////////////////AgAAAAQAAAAAAAAAAQA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CAAAsAgAALQIAAC4CAAAvAgAAMAIAADR2AAD4SAAAHI0AAAx2AACSSQAADHYAAP5JAAAAAAAASI0AADUCAAA2AgAANwIAAKABAAA4AgAANHYAAKBKAAD0cgAANHYAAOlKAAAUdwAAAAAAAFSNAAAzAgAAOQIAADoCAAAAAAAAhI0AADsCAAA8AgAANHYAAAxLAAAYjgAAAAAAAKyNAAA9AgAAPgIAAD8CAABAAgAAQQIAADR2AAAlSwAAuI0AAAx2AAA/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 ge(),vp(),R?e=n:e=new Promise((ot,rt)=>{f=ot,I=rt}),e}const Tmo="AGFzbQEAAAABlwRFYAF/AGACf38AYAJ/fwF/YAN/f38AYAF/AX9gBH9/f38AYAN/f38Bf2AFf39/f38AYAZ/f39/f38AYAR/f39/AX9gCH9/f39/f39/AGADf398AGAAAGABfAF8YAABf2AEf39/fABgAX8BfGACf38BfGAHf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AIAxCADcDUCAMQgA3A1ggDEGYAmogAUEYaiIFIAwQygEgDCsDmAIgDCsDoAJiBEAgASgCDCELIwBBwAZrIgMkACADQgA3A/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/AFQ6AOgEAkACQCADLQDpBCADLQDoBHFFDQAgAy0A6gRBAXFFDQAgAy0A7AQgAy0A6wRxRQ0AIAMtAO0EQQFxRQ0AIAMtAO8EIAMtAO4EcUUNACADLQDwBEEBcUUNACADLQDyBCADLQDxBHFFDQAgAy0A8wRBAXENAQsgCEEBECwMAQsgCCALKALIATYCyAEgCCALRwRAIAsoAswBIQYgC0HQAWohEiMAQRBrIg0kACAIQcwBaiIKKAIIBEAgDSAK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CICECciBDYC2AEgAkUNACAEIAsoAtgBIAL8CgAACyAIIAsrAzA5AzAgCCALKwM4OQM4IAggCygCQDYCQCAIQYgBaiIOIAtBiAFqEJICIAggC0Ew/AoAACAIQdgAaiIJIAtB2ABqIg8Q7QIgCEHoAGoiByALQegAahDtAiAIQfgAaiIKIAtB+ABqEO0CIAsoArwBIQIgA0IANwOABCADQgA3A4gEIANCADcDkAQgA0IANwOYBCADIAMpA4AENwOgAiADIAMpA4gENwOoAiADIAMpA5AENwOwAiADIAMpA5gENwO4AiAIQbgBaiACIANBoAJqENoEIAhBfzYCyAEgCCgCzAEiAiAIQdABaiIERwRAA0AgAisDICEVIAIrAyghFCACKwMwIRcgAisDOCEbIAIrA0AhGCACKwNIIRYgAisDUCEZIAIrA1ghGiACKwNgIR4gAisDaCEfIAIrA3AhHCACKwN4ISAgA0KAgICAgICA+D83A+AFIAMgIDkD2AUgAyAcOQPQBSADIB85A8gFIANCADcDwAUgAyAeOQO4BSADIBo5A7AFIAMgGTkDqAUgA0IANwOgBSADIBY5A5gFIAMgGDkDkAUgAyAbOQOIBSADQgA3A4AFIAMgFzkD+AQgAyAUOQPwBCADIBU5A+gEIANBoANqIgYgBSADQegEahDwASACQSBqIAZB4AD8CgAAAkAgAigCBCIGBEADQCAGIgIoAgAiBg0ADAILAAsDQCACIAIoAggiAigCAEcNAAsLIAIgBEcNAAsLIAsoAkwhAiADQgA3A5gDIANCADcDkAMgA0IANwOIAyADQgA3A4gCIANCADcDkAIgA0IANwOYAiAIQcgAaiACIANBiAJqEGcgCygCrAEhAiADQgA3A/ACIANCADcD+AIgA0IANwOAAyADIAMpA/ACNwPwASADIAMpA/gCNwP4ASADIAMpA4ADNwOAAiAIQagBaiACIANB8AFqEGcgCygCnAEhAiADQgA3A9gCIANCADcD4AIgA0IANwPoAiADIAMpA9gCNwPYASADIAMpA+ACNwPgASADIAMpA+gCNwPoASAIQZgBaiACIANB2AFqEGcgBSsDQCEeIAUrAzghFSAFKwMwIRQgB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gAhAiCyADKALoBCICRQ0AIAIQIgsgA0HABmokAEGoAhAjIgJB2JMCNgIAIAJCADcCBCACQRBqIAwQowEhBCAMIAI2ApwCIAwgBDYCmAIgAUEMaiAMQZgCahBOAkAgDCgCnAIiAkUNACACIAIoAgQiBEEBazYCBCAEDQAgAiACKAIAKAIIEQAAIAIQJAsgDBA6GiABQgA3AyAgAUKAgICAgICA+D83AxggAUIANwMoIAFCADcDMCABQgA3A0AgAUKAgICAgICA+D83AzggAUIANwNIIAFCADcDUCABQgA3A2AgAUKAgICAgICA+D83A1ggAUIANwNoIAFCADcDcAsgACABKAIMNgIAIAAgASgCECIANgIEIAAEQCAAIAAoAgRBAWo2AgQLIAxBsAJqJAAL9QEBBH8jAEEQayIDJAAgACgCABogAQRAIAAoAggiAiACKAIAKAIMEQQAIQIgAUEANgIMIAFBADYCBCABIAIgAkEAR2siAjYCACABIAJBC2w2AggLAkAgACgCCCICIAIoAgAoAggRBABBA0YNACADQQhqIgIgAEEIaiIEKAIAIgUgASAFKAIAKAIAEQMAIAQgAhBOIAMoAgwiAUUNACABIAEoAgQiAkEBazYCBCACDQAgASABKAIAKAIIEQAAIAEQJAsgACgCCAJAIAAoAgwiAEUNACAAKAIEQX9HDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EQaiQAC7EEAQZ/IwBBIGsiAiQAIABBADYCTCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQcgAahBxIABB2ABqIgMQOCAAQegAahA4IABB+ABqEDggAxDvAiAAQQA2ApwBIABBmAFqEHEgAEEANgKsASAAQagBahBxIABBADYCvAEgAEG4AWoQkwEgAkIANwIIIAJBfzYCACACQgA3AhggAkIANwIQIAIgAkEIaiIENgIEIABBfzYCyAEgAEHMAWogACgC0AEQbyAAIAIoAgQ2AswBIAAgAigCCCIFNgLQASAAIAIoAgwiBjYC1AEgAEHQAWohAyAAQcgBaiEHAkAgBkUEQCAAIAM2AswBDAELIAUgAzYCCCACQgA3AgggAiAENgIECyACQQRqAkAgAiAHRwRAIAAoAtgBIgQEQCAEECILIAAgAigCEDYC2AEgACACKAIUNgLcASAAIAIoAhg2AuABDAELIAIoAhAiBEUNACAEECILIAJBADYCGCACQgA3AhAgAigCCBBvIAAoAugBIgMEQCADECILIABBADYC8AEgAEIANwPoASAAKAL4ASIDBEAgAxAiCyAAQQA2AoACIABCADcD+AEgACgCiAIiAwRAIAMQIgsgAEEANgKQAiAAQgA3A4gCIAAgATYCRCACQSBqJAALUgEEfyAAKAIAIQECQCAAKAIEIgNFBEAMAQsgA0ECdCIEECchAiAERQ0AIAIgASAE/AoAAAsgACABBH8gARAiIAAoAgQFIAMLNgIIIAAgAjYCAAuQAQECfyMAQRBrIgMkAEEkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcCCCAAIAI2AgQgACACQQxqNgIAIABCADcCECABKAIAGiAAQQhqIAFBCGoQXiADQQhqIAFBEGoQfyADIAMpAgg3AwAgAEEQaiADEOcCIANBEGokACAACzcBAn8CQCAAKAIEIgFFDQAgASABKAIEIgJBAWs2AgQgAg0AIAEgASgCACgCCBEAACABECQLIAALBgAgABAiC3IBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARAlIAEgACgCBCIEayIDQQBMDQAgACgCACAEQQJ0aiEEA0AgBCACNgIAIARBBGohBCADQQFLIANBAWshAw0ACwsgACABNgIEBEAgABAtCwtgACAAIAM2AhBBACEDIABBADYCDAJAIAEEQCABQYCAgIABTw0BIAFBBHQQIyEDCyAAIAM2AgAgACADIAJBBHRqIgI2AgggACADIAFBBHRqNgIMIAAgAjYCBCAADwsQcgALVwEDfyAAKAIIIAFJBEAgAUEYbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBGGwiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIA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AgAzYCgAIgACADNgL8ASAAIAI2AvgBIAEoAowCIgIEQCABKAKIAiIBIAJBA3QiA2ohBSADECciBCEGA0AgBiABKAIANgIAIAYgASgCBDYCBCAGQQhqIQYgAUEIaiIBIAVHDQALCyAAIAI2ApACIAAgAjYCjAIgACAENgKIAiAAC40CAQR/IwBBEGsiAiQAIAAoAgwoAgBBAk4EQCAAKAIAIQQgACgCBCEBIAJBADYCAEEEECMiA0EBNgIAIAIgATYCCCACIAE2AgQgAiADNgIMAkAgAUUNACACIAFBAnQiARAnIgM2AgAgAUUNACADIAQgAfwKAAALIAAgAkcEQAJAIAAoAgwiAUUNACABIAEoAgAiAUEBazYCACABQQFKDQAgACgCDCIBBEAgARAiCyAAQQA2AgwgACgCACIBRQ0AIAEQIgsgACACKAIMNgIMIAJBADYCDCAAIAIoAgA2AgAgACACKAIENgIEIAAgAigCCDYCCCACQQA2AgggAkIANwIACyACEEkLIAJBEGokAAtXAQN/IAAoAgggAUkEQCABQQR0ECchBCAAKAIAIQICQCAAKAIEIgNFDQAgA0EEdCIDRQ0AIAQgAiAD/AoAAAsgAgRAIAIQIgsgACABNgIIIAAgBDYCAAsLogIBAX8gACgCiAIiAQRAIAEQIgsgAEEANgKQAiAAQgA3A4gCIAAoAvgBIgEEQCABECILIABBADYCgAIgAEIANwP4ASAAKALoASIBBEAgARAiCyAAKALYASIBBEAgARAiCyAAQQA2AuABIABCADcD2AEgAEHMAWogACgC0AEQbyAAKAK4ASIBBEAgARAiCyAAQQA2AsABIABCADcDuAEgACgCqAEiAQRAIAEQIgsgAEEANgKwASAAQgA3A6gBIAAoApgBIgEEQCABECILIABBADYCoAEgAEIANwOYASAAKAKIASIBBEAgARAiCyAAQQA2ApABIABCADcDiAEgAEH4AGoQSSAAQegAahBJIABB2ABqEEkgACgCSCIBBEAgARAiCyAAC7kCACAAQgA3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMASAAC1UBAn8gAEEANgIIIABCADcCACABKAIEIgIgASgCACIDRwRAIAAgAiADayIBQQR1EI8DIAAoAgQhAiABBEAgAiADIAH8CgAACyAAIAEgAmo2AgQLIAALoAIBBX8jAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABKAIANgIAIAJBBGohAQwBCyACIAAoAgAiBGtBAnUiBkEBaiICQYCAgIAETw0BIAVBDGpB/////wMgAyAEayIDQQF1IgQgAiACIARJGyADQfz///8HTxsgBiAAEEoiAigCCCIDIAEoAgA2AgAgAiADQQRqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFrIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACEFMLIAAgATYCBCAFQSBqJAAPCxAmAAvQAQIBfAF/IwBBEGsiAiQARAAAAAAAAPh/IQECQCAAvUL///////////8Ag0L/////////9/8AVg0ARAAAAAAAAAAAIQEgAEQAAAAAAAAAAGMEQCAAmhA+miEBDAELIACZRAAAAAAAgFZAIAJBDGoQpQNEGC1EVPshCUCiRAAAAAAAgGZAoyEAAkACQAJAAkAgAigCDEEEbw4EAAECAwQLIAAQqAEhAQwDCyAAEJcBIQEMAgsgABCoAZohAQwBCyAAEJcBmiEBCyACQRBqJAAgAQspACAAIAEoAgQgAhASIgEQGzYCBCAAQZygAjYCACABQQlPBEAgARABCwujAQEBf0EkECMiAkIANwIMIAJBhJYCNgIAIAJCADcCBCACQgA3AhQgAkIANwIcIABCADcDGCAAQoCAgICAgID4PzcDECAAQgA3AwggACACNgIEIAAgAkEMajYCACAAQgA3AyAgAEIANwMwIABCgICAgICAgPg/NwMoIABCADcDOCABKAIAGiAAQQhqIAFBCGoQXiAAQRBqIAFBEGpBMPwKAAAgAAsOACAAQQhqEC8aIAAQLwsCAAtyAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACAAIAEoAgA2AgggACABKAIEIgI2AgwgAgRAIAIgAigCBEEBajYCBAsgAEIANwIQIAEQLxoLVwEDfyAAKAIIIAFJBEAgAUEDdBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBA3QiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy0BAX8gACgCACIBBEAgACABNgIEIAAoAggaIAEQIiAAQQA2AgggAEIANwIACwuLAQEDfyMAQRBrIgMkAEGoAhAjIgJBoJACNgIAIAJCADcCBCACQRBqEDshBCACIAE2AlQgAyACNgIMIAMgBDYCCCACIAIoAgRBAWo2AgQgAyADKQIINwMAIAAgAxBIGiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANBEGokAAs+ACADBEAgACADEKMCIAAoAgQhAyABIAJHBEADQCADIAEQPEEMaiEDIAFBDGoiASACRw0ACwsgACADNgIECwt5AQJ/IwBBEGsiAyQAQSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgACACNgIEIAAgAkEMajYCACADQQRqIAEQWSAAIAMoAgQ2AgggACADKAIINgIMIABCADcCECABEC8aIANBEGokACAAC1gBAX8CQCAAKAIMIgFFDQAgASABKAIAIgFBAWs2AgAgAUEBSg0AIAAoAgwiAQRAIAEQIgsgAEEANgIMIAAoAgAiAQRAIAEQIgsg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QMgBCABIAEgBGMbIQELIAdBGGoiByAJRw0ACwwBCyAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDAEQAAAAAAADw/yECRAAAAAAAAPD/IQNEAAAAAAAA8P8hAQsgACACOQMoIAAgAzkDICAAIAE5AxhBACEHAkAgACkDAEL///////////8Ag0L/////////9/8AVg0AIAApAwhC////////////AINCgICAgICAgPj/AFoNACAAKQMQQv///////////wCDQoCAgICAgID4/wBaDQAgACkDGEL///////////8Ag0KAgICAgICA+P8AVCAAKQMgQv///////////wCDQoCAgICAgID4/wBUcSAAKQMoQv///////////wCDQoCAgICAgID4/wBUcSEHCyAHRQRAIABBABAsCwuDAQECf0GgARAjIQMjAEEQayICJAAgA0IANwIEIANBgJQCNgIAIAIgASgCADYCCCACIAEoAgQiATYCDCABBEAgASABKAIEQQFqNgIECyACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgAkEQaiQAIAAgAzYCBCAAIAE2AgAgACADQRRqIAEQjwELwAoCC38GfCMAQUBqIgMkACAAKAJcIQQgA0IANwM4IANCADcDMCADQgA3AyggA0IANwMAIANCADcDCCADQgA3AxAgAEGoAWogBEEDbiIGIAMQZwJAAkACQCAEQQJNBEAgBkEEdCEBDAELIAZBBHQQJyEIA0AgAkEEdCILIAAoAtgBakF/NgIMAkAgACgCWCACQQxsaiIFKAIAIglBAEgEQEQAAAAAAAAAACEMDAELIAAoAqgBIAJBGGxqIgEgACgCSCIHIAUoAgRBGGxqIgorAwAgByAJQRhsaiIJKwMAIgyhIg4gByAFKAIIQRhsaiIFKwMIIAkrAwgiDaEiD6IgCisDCCANoSINIAUrAwAgDKEiEKKhIgwgDCAMoiANIAUrAxAgCSsDECIMoSIRoiAKKwMQIAyhIgwgD6KhIg0gDaIgDCAQoiAOIBGioSIOIA6ioKAiDJ8iD6M5AxAgASAOIA+jOQMIIAEgDSAPoyINOQMAIA0gDWENACABQgA3AwggAUIANwMAIAFCgICAgICAgPg/NwM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0AIAAgARAzIAEgACgCBCIDa0EYbCIEQQBMDQAgBEEYbiEEIAAoAgAgA0EYbGohAwNAIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGohAyAEQQFLIARBAWshBA0ACwsgACABNgIEBEAgABBxCwuKAwEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACQQA2AgggAkIANwIAIAIgASgCADYCACACIAEoAgQ2AgQgAiABKAIINgIIIAFBADYCCCABQgA3AgAgAkEMaiEBDAELIAIgACgCACIEa0EMbSIGQQFqIgJB1qrVqgFPDQEgBUEMakHVqtWqASADIARrQQxtIgNBAXQiBCACIAIgBEkbIANBqtWq1QBPGyAGIAAQYSICKAIIIgNBADYCCCADQgA3AgAgAyABKAIANgIAIAMgASgCBDYCBCADIAEoAgg2AgggAUEANgIIIAFCADcCACACIANBDGo2AgggAigCBCAAKAIEIAAoAgAiA2siAUF0bUEMbGohBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCBCAAIAIoAggiATYCBCACIAM2AgggACgCCCEEIAAgAigCDDYCCCACIAM2AgAgAiAENgIMIAIQ1QELIAAgATYCBCAFQSBqJAAPCxAmAAvcAgEEfyMAQRBrIgMkACAAQZCcAjYCACAAEN4BIABBJGogACgCJBC9AyAAIAAoAjQiASAAKAI4IgJHBH8DQCABKAIAIgQEQCAEECILIAFBBGoiASACRw0ACyAAKAI0BSABCzYCOCAAQQA6AHwgAEEAOgAYIAAgACgCJDYCMCAAKAKAASIBBEAgACABNgKEASAAKAKIARogARAiCyAAKAJoIgEEQCAAIAE2AmwgACgCcBogARAiCyAAKAJcIgEEQCAAIAE2AmAgACgCZBogARAiCyAAKAJQIgEEQCAAIAE2AlQgACgCWBogARAiCyAAKAJAIgEEQCAAIAE2AkQgACgCSBogARAiCyAAKAI0IgEEQCAAIAE2AjggACgCPBogARAiCyADIABBJGo2AgwgAygCDCIBKAIAIgIEQCABIAIQvQMgAygCDCIBKAIAIAEoAggaECILIANBEGokACAAC40BAQF/QSQQIyICQgA3AgwgAkGElgI2AgAgAkIANwIEIAJCADcCFCACQgA3AhwgAEIANwMYIABCgICAgICAgPg/NwMQIABCADcDCCAAIAI2AgQgACACQQxqNgIAIABCADcDICAAQgA3AzAgAEKAgICAgICA+D83AyggAEIANwM4IABBCGogARBeIAEQLxoLBwAgABEOAAsYAQF/QQwQIyIAQQA2AgggAEIANwIAIAALIAAgACgCBCABEBIiACACKAIEEBUgAEEJTwRAIAAQAQsLSgECfyAAKAIEIgIgACgCCCIBRwRAA0AgACABQQhrIgE2AgggARAvGiACIAAoAggiAUcNAAsLIAAoAgAiAQRAIAAoAgwaIAEQIgsLHQAgAQRAIAAgASgCABBvIAAgASgCBBBvIAEQIgsL+wMBB38CQAJ/QQIgAUEBRg0AGiABIAEgAUEBa3FFDQAaIAEQ9gELIgMgACgCBCIBTQRAIAEgA00NASAAKAIMsyAAKgIQlY38ASECIAEgAyABQQNJIAFpQQFLcgR/IAIQ9gEFIAJBAUEgIAJBAWtna3QgAkECSRsLIgIgAiADSRsiA00NAQsgACEBAkACQCADBEAgA0GAgICABE8NASADQQJ0IgAQIyEFIAEoAgAhAiABIAU2AgAgAgRAIAEoAgQaIAIQIiABKAIAIQULIAEgAzYCBCAABEAgBUEAIAD8CwALIAEoAggiAEUNAiABQQhqIQEgACgCBCECAkAgA2kiBEEBTQRAIAIgA0EBa3EhAgwBCyACIANJDQAgAiADcCECCyAFIAJBAnRqIAE2AgAgACgCACIBRQ0CIANBAWshByAEQQFLIQgDQCABKAIEIQQCQCAIRQRAIAQgB3EhBAwBCyADIARLDQAgBCADcCEECwJAIAIgBEYEQCABIQAMAQsgBSAEQQJ0aiIGKAIARQRAIAYgADYCACABIQAgBCECDAELIAAgASgCADYCACABIAYoAgAoAgA2AgAgBigCACABNgIACyAAKAIAIgENAAsMAgsgASgCACEAIAFBADYCACAABEAgASgCBBogABAiCyABQQA2AgQMAQsQcgALCwtSAQR/IAAoAgAhAQJAIAAoAgQiA0UEQAwBCyADQRhsIgQQJyECIARFDQAgAiABIAT8CgAACyAAIAEEfyABECIgACgCBAUgAws2AgggACACNgIACx0BAX9BBBB0IgBBiO4BNgIAIABByO4BQe0CEAsAC3EBAX8gAkUEQCAAKAIEIAEoAgRGDwsgACABRgRAQQEPCwJAIAAoAgQiAi0AACIARSAAIAEoAgQiAS0AACIDR3INAANAIAEtAAEhAyACLQABIgBFDQEgAUEBaiEBIAJBAWohAiAAIANGDQALCyAAIANGCw4AIABB0ABqECdB0ABqCxsBAX8gAARAIAAoAgAiAQRAIAEQIgsgABAiCwuiAgEFfyMAQSBrIgUkAAJAAkAgACgCBCICIAAoAggiA0kEQCACIAEQPEEMaiEBDAELIAIgACgCACIEa0EMbSIGQQFqIgJB1qrVqgFPDQEgBUEMakHVqtWqASADIARrQQxtIgNBAXQiBCACIAIgBEkbIANBqtWq1QBPGyAGIAAQYSICKAIIIAEQPBogAiACKAIIQQxqNgIIIAIoAgQgACgCBCAAKAIAIgNrIgFBdG1BDGxqIQQgAQRAIAQgAyAB/AoAAAsgACgCACEDIAAgBDYCACACIAM2AgQgACACKAIIIgE2AgQgAiADNgIIIAAoAgghBCAAIAIoAgw2AgggAiADNgIAIAIgBDYCDCACENUBCyAAIAE2AgQgBUEgaiQADwsQJgALgQECAn8BfCMAQRBrIgMkAEHwngItAABBAXFFBEBBAUHYiwJBARAGIQRB8J4CQQE6AABB7J4CIAQ2AgALIANBADYCDEHsngIoAgAgASACIANBDGpBABAFIQUgAygCDCEBIAAgBfwDNgIEIABBnKACNgIAIAEEQCABEAQLIANBEGokAAuoAQEDfyMAQaACayIDJAACQAJAIAEoAgAiBCgCkAEiAkUEQCABKAIEIgEgASgCBEEBajYCBAwBCyACIAIoAgxBAWo2AgwgBCgCkAEhAiABKAIEIgEgASgCBEEBajYCBCACRQ0AIAItABBBAUcNACADQQhqEDsiAUEONgJEIAAgARCjAUEBOgCYAiABEDoaDAELIABBADoAmAIgAEEAOgAACyADQaACaiQAC5UCAQN/IAACfwJAIAEoAgQiBEUEQCABQQRqIgUhAgwBCyACKAIAIQYDQCAEIgIoAhAiBSAGSgRAIAQhBSAEKAIAIgQNAQwCC0EAIAUgBk4NAhogAigCBCIEDQALIAJBBGohBQtBiAEQIyIEIAMoAgAoAgA2AhAgBEEYakEAQfAA/AsAIARCADcDKCAEQoCAgICAgID4PzcDICAEQX82AhggBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQQA7AYABIAEgAiAFIAQQggFBAQs6AAQgACAENgIAC1YBBX8gACgCACICKAIAIgEEQCABIQMgAiEEIAIoAgQiBSABRwRAA0AgASAFQRhrECgiBUcNAAsgACgCACIEKAIAIQMLIAIgATYCBCAEKAIIGiADECILC0oBA38gACgCBCICIAFHBEADQCACQQxrIgQoAgAiAwRAIAJBCGsgAzYCACACQQRrKAIAGiADECILIAQiAiABRw0ACwsgACABNgIECwwAIAEgACgCABEEAAvzAgEFfyAAKAIEIAAoAgAiAmtBAnUiAyABSQRAIwBBIGsiBSQAAkACQAJAIAEgA2siAyAAKAIIIgQgACgCBCICa0ECdU0EQCAAIAMEfyADQQJ0IgAEQCACQQAgAPwLAAsgACACagUgAgs2AgQMAQsgAiAAKAIAIgJrQQJ1IgYgA2oiAUGAgICABE8NASAFQQxqQf////8DIAQgAmsiAkEBdSIEIAEgASAESRsgAkH8////B08bIAYgABBKIgEoAgghAiADQQJ0IgMEQCACQQAgA/wLAAsgASACIANqNgIIIAEoAgQgACgCBCAAKAIAIgRrIgJrIQMgAgRAIAMgBCAC/AoAAAsgACgCACECIAAgAzYCACABIAI2AgQgACABKAIINgIEIAEgAjYCCCAAKAIIIQMgACABKAIMNgIIIAEgAjYCACABIAM2AgwgARBTCyAFQSBqJAAMAQsQJgALDwsgASADSQRAIAAgAiABQQJ0ajYCBAsLSQEBfyABKAJgIAFBADYCYEECRgRAIAE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AIghrIgVrIQcgBQRAIAcgCCAF/AoAAAsgBCgCACEFIAQgBzYCACACIAU2AgQgBCACKAIINgIEIAIgBTYCCCAEKAIIIQcgBCACKAIMNgIIIAIgBTYCACACIAc2AgwgAhBuCyAGQSBqJAAMAQsQJgALIAEoAgAiAiABKAIEIgdGDQIDQCADQRRqIAIQigECQCADKAIgIgEgAygCJCIESQRAIAEgAygCFDYCACABIAMoAhg2AgQgAUEIaiEBDAELIAEgAygCHCIFa0EDdSIGQQFqIgFBgICAgAJPDQMgA0EsakH/////ASAEIAVrIgRBAnUiBSABIAEgBUkbIARB+P///wdPGyAGIANBHGoQSyEEIAMoAjQiASADKAIUNgIAIAEgAygCGDYCBCADIAFBCGo2AjQgAygCMCADKAIgIAMoAhwiBmsiAWshBSABBEAgBSAGIAH8CgAACyADIAMoAhwiBjYCMCADIAU2AhwgAygCNCEBIAMgBjYCNCADIAE2AiAgAygCJCEFIAMgAygCODYCJCADIAU2AjggBCAGNgIAIAQQbgsgAyABNgIgIAJBGGoiAiAHRw0ACwwCCyAAEOsBGgwCCxAmAAsgA0EsaiADQRxqIANBK2oQgAMgAyADKQIsIgk3AgwgA0IANwIsIAMgCTcDACAAIAMQQwJAIAMoAjAiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAyADQRxqNgIsIANBLGoQZQsgA0FAayQACwsAIAAEQCAAECILCzAAIAEoAgAaIAAgASgCCDYCACAAIAEoAgwiADYCBCAABEAgACAAKAIEQQFqNgIECwtVACAAIAEoAgA2AgAgACABKAIENgIEIAFCADcCACAAIAEoAgg2AgggACABKAIMNgIMIAFCADcCCCAAIAEoAhA2AhAgACABKAIUNgIUIAFCADcCECAAC0UBAn8gACgCBCICIAAoAggiAUcEQCAAIAEgASACa0EYayICQRhwIAJrakEYazYCCAsgACgCACIBBEAgACgCDBogARAiCwuNAQECfCAAIAAQogFEEeotgZmXcT2iIgJEAAAAAAAA8L8gAkQAAAAAAADwv2QbIgJEAAAAAAAA8L8gAr1C////////////AINCgICAgICAgPj/AFQbIgI5AzAgAQRAIAAQogFEAAAAAAAAgD6iIgMgAiACIANjGyECCyAAIAIgACsDOCIDIAIgA2QbOQM4C4sDAQZ/IwBBIGsiAiQAQZiVAiIDIAMoAgAiA0EBajYCACACIAM2AgwgACADNgLIASAAKALcASEBIABB2AFqIgQgACgCXEEDbiIFEDkgACAFNgLcASABQRFJIAEgBUEBdE1yRQRAIAQQgwELIAAoAlwiAUEDbiEFIAFBA08EQCAEKAIAIQZBACEBA0AgBiABQQR0aiIEQX82AgggBCADNgIEIAQgAzYCACABQQFqIgEgBUcNAAsLIAAQ7gIhASAAQcwBaiIEIAAoAtABEG8gACAAQdABajYCzAEgAEIANwPQASACIAJBDGoiADYCFCACQRhqIAQgACACQRRqEHkgAigCGCIAQgA3AyggAEKAgICAgICA+D83AyAgACADNgIYIABCADcDMCAAQgA3AzggAEIANwNIIABCgICAgICAgPg/NwNAIABCADcDUCAAQgA3A1ggAEIANwNoIABCgICAgICAgPg/NwNgIABCADcDcCAAQgA3A3ggAEEAOgCAASAAIAE6AIEBIAJBIGokAAuLAQEBfwJAIAFFDQAgASgCBCIDBEAgAygCBEF/Rw0BCyAAKAIEIgAEQCAAIAAoAgRBAWo2AgQgACAAKAIIQQFqNgIIIAEoAgQhAwsgASAANgIEIAEgAjYCACADBEAgAxAkCyAARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwvHAwIBfwx8IwBB0ABrIgIkACABKwNAIQMgASsDECEEIAErAyghBSABKwMwIQYgASsDOCEHIAIgASsDICIIIAErAwAiCaIgASsDCCIKIAErAxgiC6KhOQNIIAIgCiAGoiAHIAmioTkDQCACIAcgC6IgCCAGoqE5AzggAiAEIAuiIAUgCaKhOQMwIAIgAyAJoiAEIAaioTkDKCACIAUgBqIgAyALoqE5AyAgAiAFIAqiIAggBKKhOQMYIAIgByAEoiADIAqioTkDECACIAggA6IgByAFoqE5AwggAisD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VwEDfyAAKAIIIAFJBEAgAUEwbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBMGwiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALCy4AIAApAwggASkDCFQgACgCACgCDCgCTCIAIAEoAgAoAgwoAkwiAUkgACABRhsLsAEBDHwgASsDSCEHIAErAzAhCCABKwMAIQkgASsDGCEKIAErA1AhCyABKwM4IQwgASsDCCENIAErAyAhDiAAIAIrAwAiAyABKwMQoiACKwMIIgQgASsDKKKgIAIrAxAiBSABKwNAoqAgAisDGCIGIAErA1iioDkDECAAIAMgDaIgBCAOoqAgBSAMoqAgBiALoqA5AwggACADIAmiIAQgCqKgIAUgCKKgIAYgB6KgOQMAC1oBA3wgACsDKJkiAiAAKwMQmSIBIAEgAmMbIgIgACsDIJkiASAAKwMImSIDIAEgA2QbIgEgASACYxsiAiAAKwMYmSIBIAArAwCZIgMgASADZBsiASABIAJjGwu9BwEDfyAAIAFByAD8CgAAIABBADYCUCAAQgA3A0ggACABKAJINgJIIAAgASgCTDYCTCAAIAEoAlA2AlAgAUEANgJQIAFCADcDSCAAQQA2AmAgAEIANwNYIAAgASgCZDYCZCABQQA2AmQgACABKAJYNgJYIAAgASgCXDYCXCAAIAEoAmA2AmAgAUEANgJgIAFCADcDWCAAQQA2AnAgAEIANwNoIAAgASgCdDYCdCABQQA2AnQgACABKAJoNgJoIAAgASgCbDYCbCAAIAEoAnA2AnAgAUEANgJwIAFCADcDaCAAQQA2AoABIABCADcDeCAAIAEoAoQBNgKEASABQQA2AoQBIAAgASgCeDYCeCAAIAEoAnw2AnwgACABKAKAATYCgAEgAUEANgKAASABQgA3A3ggAEEANgKQASAAQgA3A4gBIAAgASgCiAE2AogBIAAgASgCjAE2AowBIAAgASgCkAE2ApABIAFBADYCkAEgAUIANwOIASAAQQA2AqABIABCADcDmAEgACABKAKYATYCmAEgACABKAKcATYCnAEgACABKAKgATYCoAEgAUEANgKgASABQgA3A5gBIABBADYCsAEgAEIANwOoASAAIAEoAqgBNgKoASAAIAEoAqwBNgKsASAAIAEoArABNgKwASABQQA2ArABIAFCADcDqAEgAEEANgLAASAAQgA3A7gBIAAgASgCuAE2ArgBIAAgASgCvAE2ArwBIAAgASgCwAE2AsABIAFBADYCwAEgAUIANwO4ASAAIAEoAsgBNgLIASAAIAEoAswBNgLMASAAIAEoAtABIgM2AtABIAAgASgC1AEiBDYC1AEgAEHQAWohAgJAIARFBEAgACACNgLMAQwBCyADIAI2AgggAUIANwPQASABIAFB0AFqNgLMAQsgAEEANgLgASAAQgA3A9gBIAAgASgC2AE2AtgBIAAgASgC3AE2AtwBIAAgASgC4AE2AuABIAFBADYC4AEgAUIANwPYASAAQQA2AvABIABCADcD6AEgACABKALoATYC6AEgACABKALsATYC7AEgACABKALwATYC8AEgAUEANgLwASABQgA3A+gBIABBADYCgAIgAEIANwP4ASAAIAEoAvgBNgL4ASAAIAEoAvwBNgL8ASAAIAEoAoACNgKAAiABQQA2AoACIAFCADcD+AEgAEEANgKQAiAAQgA3A4gCIAAgASgCiAI2AogCIAAgASgCjAI2AowCIAAgASgCkAI2ApACIAFBADYCkAIgAUIANwOIAiAAC44BAgJ/AXwjAEEQayICJABB6J4CLQAAQQFxRQRAQQJByIsCQQMQBiEDQeieAkEBOgAAQeSeAiADNgIACyACIAEpAgA3AwggAkEANgIEQeSeAigCAEEAQQAgAkEEaiACQQhqEAUhBCACKAIEIQEgACAE/AM2AgQgAEGcoAI2AgAgAQRAIAEQBAsgAkEQaiQAC5oBAQV/IABCADcCBCAAKAIAIQMgAEEANgIAIAAgASgCBCIEEDMgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQUgASgCACEGA0AgBSACQRhsaiIAIAMgBiACQQJ0aigCAEEYbGoiASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAJBAWoiAiAERw0ACwwBCyADRQ0BCyADECILC4EBAQR/IABCADcCBCAAKAIAIQIgAEEANgIAIAAgASgCBCIEECUgACAENgIEAkACQCABKAIEIgQEQCAAKAIAIQAgASgCACEBA0AgACADQQJ0IgVqIAIgASAFaigCAEECdGooAgA2AgAgA0EBaiIDIARHDQALDAELIAJFDQELIAIQIgsL0gQBBH8gASAAIAFGIgM6AAwCQCADDQADQCABKAIIIgMtAAwNAQJAAkAgAygCCCICKAIAIgQgA0YEQAJAIAIoAgQiBUUNACAFLQAMDQAgA0EBOgAMIAIgACACRjoADCAFQQE6AAwMAgsCQCADKAIAIAFGBEAgAyEBDAELIAMgAygCBCIBKAIAIgA2AgQCQAJAAkAgAEUEQCABIAI2AggMAQsgACADNgIIIAMoAggiAigCACABIAI2AgggA0cNAQsgAiABNgIADAELIAIgATYCBAsgASADNgIAIAMgATYCCCABKAIIIgIoAgAhBAsgAUEBOgAMIAJBADoADCACIAQoAgQiADYCACAABEAgACACNgIICyAEIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAQ2AgAMAQsgACAENgIECyAEIAI2AgQgAiAENgIIDwsgBEUNASAELQAMDQEgA0EBOgAMIAIgACACRjoADCAEQQE6AAwLIAIhASAAIAJHDQEMAgsLAkAgAygCACIEIAFHBEAgAyEEDAELIAMgBCgCBCIANgIAIAAEQCAAIAM2AgggAygCCCECCyAEIAI2AggCQCACKAIAIANGBEAgAiAENgIADAELIAIgBDYCBAsgBCADNgIEIAMgBDYCCCAEKAIIIQILIARBAToADCACQQA6AAwgAiACKAIEIgEoAgAiADYCBCAABEAgACACNgIICyABIAIoAggiADYCCAJAIAAoAgAgAkYEQCAAIAE2AgAMAQsgACABNgIECyABIAI2AgAgAiABNgIICwvgBQIFfAJ/IwBBEGsiBiQAAkAgAL1CIIinQf////8HcSIHQfvDpP8DTQRAIAdBgIDA8gNJDQEgACAAIAAgAKIiAKIgACAAIAAgAKKiIABEfNXPWjrZ5T2iROucK4rm5Vq+oKIgACAARH3+sVfjHcc+okTVYcEZoAEqv6CiRKb4EBEREYE/oKCiRElVVVVVVcW/oKKgIQAMAQsgB0GAgMD/B08EQCAAIAChIQA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gCCgCACIFKQMIIgxSBEAgCyAMUw0BDAILIAIpAwAgBSkDAFcNAQsgACgCACEFIAAhAiAEIQAMAQsLIAAoAgAhAiAAIAg2AgAgAkUNACACECILIAFBBGoiBSAGRw0ACwwBCyAAIANBAXYiBkECdCIIaiEHIAMgBUwEQCAAIAcgAiAGIAQQtQMgByABIAIgAyAGayAEIAhqIgIQtQMgCSADNgIMIAQgA0ECdGohBQJAIAQiASACIgNHBEADQCACIAVGBEAgASADRg0DA0AgASgCACEFIAFBADYCACAAKAIAIQIgACAFNgIAIAIEQCACECILIABBBGohACABQQRqIgEgA0cNAAsMAwsCQAJAAkAgASgCACIHKAIAIgYpAwgiCyACKAIAIggoAgAiCikDCCIMUgRAIAsgDFMNAQwCCyAGKQMAIAopAwBXDQELIAJBADYCACAAKAIAIQYgACAINgIAIAYEQCAGECILIAJBBGohAgwBCyABQQA2AgAgACgCACEGIAAgBzYCACAGBEAgBhAiCyABQQRqIQELIABBBGohACABIANHDQALCyACIAVGDQADQCACKAIAIQMgAkEANgIAIAAoAgAhASAAIAM2AgAgAQRAIAEQIgsgAEEEaiEAIAJBBGoiAiAFRw0ACwsgCUEMaiAEELQDDAELIAAgByACIAYgBCAFELABIAcgASACIAMgBmsiAyAEIAUQsAEgACAHIAEgAiAGIAMgBCAFELkCCyAJQRBqJAALHQECfyAAKAIEIAAoAgAiAmtBDG0EQCAAIAIQewsLFwAgAEHomgI2AgAgAEEEaiABENEEIAALNQEBfyABIAAoAgQiAkEBdWohASAAKAIAIQAgASACQQFxBH8gASgCACAAaigCAAUgAAsRBAALSgAgACABKAIANgIAIAAgASgCBDYCBCABQgA3AwAgACABKAIINgIIIAAgASgCDDYCDCABQgA3AwggAEEQaiABQRBqQTD8CgAAIAALvAUCBX8CfCMAQSBrIgUkAAJAAkACQCACDgMCAgABCyABQRBrKwMAIAArAwhjRQ0BIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgAUEYayIBKAIQNgIQIAAgASkDCDc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ACDgMCAgABCyABQRBrIgErAwAgACsDAGRFDQEgBiAAKQMINwMIIAYgACkDADcDACAAIAEpAwg3AwggACABKQMANwMAIAEgBikDCDcDCCABIAYpAwA3AwAMAQsgAkGAAUwEQCAAIAFGDQEgAEEQaiIDIAFGDQEgACEEA0AgAyEFIAQrAxAiCiAEKwMAZARAIAQpAxghCyADIQIDQAJAIAIgBCIDKQMINwMIIAIgAykDADcDACAAIANGBEAgACEDDAELIAMhAiAKIANBEGsiBCsDAGQNAQsLIAMgCzcDCCADIAo5AwALIAEgBSIEQRBqIgNHDQALDAELIAIgAkEBdiIHayEIIAAgB0EEdCIJaiEFAkAgAiAETARAIAAgBSAHIAMQrwQgBSABIAggAyAJaiIBEK8EIAMgAkEEdGohBCABIQIDQCACIARGBEAgASADRg0EA0AgACADKQMINwMIIAAgAykDADcDACAAQRBqIQAgA0EQaiIDIAFHDQALDAQLAkAgAisDACADKwMAZARAIAAgAikDCDcDCCAAIAIpAwA3AwAgAkEQaiECDAELIAAgAykDCDcDCCAAIAMpAwA3AwAgA0EQaiEDCyAAQRBqIQAgASADRw0ACwwBCyAAIAUgByADIAQQxQEgBSABIAggAyAEEMUBIAAgBSABIAcgCCADIAQQ6wIMAQsgAiAERg0AA0AgACACKQMINwMIIAAgAikDADcDACAAQRBqIQAgAkEQaiICIARHDQALCyAGQRBqJAALvQQCBH8BfgJAAkACQCADDgMCAgABCyACKAIAKAIAIgIgAUEEayIBKAIAIgNBA3RqKQMAIAIgACgCACIEQQN0aikDAFoNASAAIAM2AgAgASAENgIADwsgA0GAAUwEQCAAIAFGDQEgAEEEaiIEIAFGDQEgAigCACgCACEGIAAhAwNAIAQiByECIAYgAygCBCIIQQN0aikDACIKIAYgAygCACIFQQN0aikDAFQEQANAAkAgAiAFNgIAIAAgAyIERgRAIAAhBAwBCyAEIQIgCiAGIARBBGsiAygCACIFQQN0aikDAFQNAQsLIAQgCDYCAAsgByIDQQRqIgQgAUcNAAsMAQsgAyADQQF2IgZrIQggAC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KwMAIgtjRQRAIAogC2INASACKAIMIAMoAgxODQELIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBGGohAgwBCyAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADQRhqIQMLIABBGGohACABIANHDQALDAELIAAgBSAHIAMgBBDLASAFIAEgCCADIAQQywEgACAFIAEgByAIIAMgBBCCAwwBCyACIARGDQADQCAAIAIpAxA3AxAgACACKQMINwMIIAAgAikDADcDACAAQRhqIQAgAkEYaiICIARHDQALCyAGQSBqJAALVgEDfyABIABrIgJBGG0hAwJAIAJBgRhOBEAgAyECA0AgAkEYbBBQIgQNAiACQQF2IgINAAsLIAAgASADQQBBABDLAQ8LIAAgASADIAQgAhDLASAEECILOAEBfyAABEAgACgCABDNASAAKAIEEM0BIAAoAhQiAQRAIAAgATYCGCAAKAIcGiABECILIAAQIgsL8gECCHwCfyABKwMAIQYgAisDACEHIAAgASsDCCIFIAMrAwgiCCACKwMIIgkgBaEiC5kgBCsDCCIKIAihIgyZYyIOGyAJIAogDhsgCCAFoSIFmSAKIAmhIgiZYyINGyALIAwgDhsgBSAIIA0bIAUgCKGjIgVEAAAAAAAAAAAgBb1C////////////AINCgICAgICAgPj/AFQbIgWioDkDCCAAIAYgByANGyAHIAahIAWioDkDACAAIAErAxAiBiACKwMQIgcgDRsgBSAHIAahoqA5AxAgACADKwMQIgYgBCsDECIHIA0bIAUgByAGoaKgOQMYC4UEAgZ/An0gAigCACEGIAACfwJAIAEoAgQiBEUNACABKAIAAn8gBEEBayAGcSAEaSIFQQFNDQAaIAYgBCAGSw0AGiAGIARwCyIHQQJ0aigCACICRQ0AIAIoAgAiAkUNACAEQQFrIQggBUEBSyEJA0ACQCAGIAIoAgQiBUcEQAJAIAlFBEAgBSAIcSEFDAELIAQgBUsNACAFIARwIQULIAUgB0cNAwwBCyACKAIIIAZHDQBBAAwDCyACKAIAIgINAAsLQQwQIyICIAY2AgQgAkEANgIAIAIgAygCADYCCAJAQQAgBCABKA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AIIAIgBRCHASIIDQELIAkhAgwFC0EBIAZrIAYgByAIQQBOc0EBcRshBiAFKQMIIQwLIAdBAXMhBwwBCwtBASECIAlBAUYNAwwBC0ECIQIgCUECRw0AQQAhAgwCCyAFKAIQIgUgAEcNAAsgA0EUaiAAELsDIANBCGogARC7A0EAIQICQCADKAIUIgQgAygCGCIBRg0AQQAhBQJAA0ACQAJAAkAgBCADQQhqELoDIgBBAWsOAgEAAgtBACECIAVBAkYNBCAAIQUgBEEQaiIEIAFHDQIMBAtBASECIAVBAUYNAyAAIQUgBEEQaiIEIAFHDQEMAgsgBEEQaiIEIAFHDQALQQAhAiAFQQFHDQELAn4gAygCFCICIAMoAhgiAEYEQEIAIQtCAAwBC0KAgICAgICAgIB/IQtC////////////ACENQv///////////wAhDEKAgICAgICAgIB/IQ8DQCACKQMIIgogCyAKIAtVGyELIAogDCAKIAxTGyEMIAIpAwAiCiAPIAogD1UbIQ8gCiANIAogDVMbIQ0gAkEQaiICIABHDQALIAsgDHxCAn8hCyANIA98QgJ/CyEKIAMgCzcDKCADIAo3AyAgA0EgaiADQQhqELoDQQFGIQILIAMoAggiAARAIAMgADYCDCADKAIQGiAAECILIAMoAhQiAEUNACADIAA2AhggAygCHBogABAiCyADQTBqJAAgAgvdAgEGfyMAQSBrIgYkAEHQABAjIgRBAEHQAPwLACAEIAAoAoQBIgEgACgCgAEiA2tBAnUiAjYCAAJAAkAgACgCiAEiBSABSwRAIAEgBDYCACABQQRqIQMMAQsgAkEBaiIBQYCAgIAETw0BIAZBDGpB/////wMgBSADayIDQQF1IgUgASABIAVJGyADQfz///8HTxsgAiAAQYABahBKIgEoAggiAiAENgIAIAEgAkEEajYCCCABKAIEIAAoAoQBIAAoAoABIgVrIgJrIQMgAgRAIAMgBSAC/AoAAAsgACgCgAEhAiAAIAM2AoABIAEgAjYCBCAAIAEoAggiAzYChAEgASACNgIIIAAoAogBIQUgACABKAIMNgKIASABIAI2AgAgASAFNgIMIAEQUwsgACADNgKEASAEQ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SQ0DIAAgASACbEYNASAAIANBDGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBEGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBEmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBFmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBHGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBHmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBJGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBKGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBKmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBLmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBNGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBOmoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBPGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBwgBqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQcYAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HIAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBzgBqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQdIAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HYAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANB4ABqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQeQAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HmAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANB6gBqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQewAaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0HwAGoiAW4iAiABSQ0DIAAgASACbEYNASAAIANB+ABqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQf4AaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0GCAWoiAW4iAiABSQ0DIAAgASACbEYNASAAIANBiAFqIgFuIgIgAUkNAyAAIAEgAmxGDQEgACADQYoBaiIBbiICIAFJDQMgACABIAJsRg0BIAAgA0GOAW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QZIPaiEBCyAAIAFB/wdqrUI0hr+iCwoAIAAgABCnA6ILQwAgACAAIAGlIAG9Qv///////////wCDQoCAgICAgID4/wBWGyABIAC9Qv///////////wCDQoCAgICAgID4/wBYGwtNAgF/AXwjAEEQayIFJAAgBSAENgIIIAUgAzYCDCAAKAIQIgBFBEAQZgALIAAgASACIAVBDGogBUEIaiAAKAIAKAIYERgAIAVBEGokAAukAgICfwV+AkAgASgCEEUNAAJAIAEpAzggASkDKFUEQCABKQMwIAEpAyBVDQELIAAgARC9AiABKAIQIgNFDQEgAyAALQB1QQAgAUFAaxD9AUUNAUL///////////8AIQdCgICAgICAgICAfyEIAkAgASgCQCICIAEoAkQiAEYEQEKAgICAgICAgIB/IQVC////////////ACEGDAELQv///////////wAhBkKAgICAgICAgIB/IQUDQCACKQMIIgQgCCAEIAhVGyEIIAQgBiAEIAZTGyEGIAIpAwAiBCAFIAQgBVUbIQUgBCAHIAQgB1MbIQcgAkEQaiICIABHDQALCyABIAg3AzggASAFNwMwIAEgBjcDKCABIAc3AyALQQEhAgsgAgvtBgIGfwR+IwBBIGsiCCQAAkAgAEUNACAAKAIQIgQgAEYNACACRQRAIAQgACgCFEYNAQsgAxC2AyABBH8gAEEUagUgACgCECIAQRBqCygCACEGIAApAwAhCiAAKQMIIQsCQAJAAkAgAygCBCIEIAMoAggiBUkEQCAEIAs3AwggBCAKNwMAIARBEGohBAwBCyAEIAMoAgAiCWtBBHUiB0EBaiIEQYCAgIABTw0BIAhBDGpB/////wAgBSAJayIFQQN1IgkgBCAEIAlJGyAFQfD///8HTxsgByADEDIiBSgCCCIEIAs3AwggBCAKNwMAIAUgBEEQajYCCCAFKAIEIAMoAgQgAygCACIJayIEayEHIAQEQCAHIAkgBPwKAAALIAMoAgAhCSADIAc2AgAgBSAJNgIEIAMgBSgCCCIENgIEIAUgCTYCCCADKAIIIQcgAyAFKAIMNgIIIAUgCTYCACAFIAc2AgwgBRA2CyADIAQ2AgQgACAGRwRAQRRBECABGyEJA0AgCiAGKQMAIg1RIAYpAwgiDCALUXFFBEACQCADKAIIIgUgBEsEQCAEIAw3AwggBCANNwMAIARBEGohBAwBCyAEIAMoAgAiBGtBBHUiB0EBaiIBQYCAgIABTw0EIAhBDGpB/////wAgBSAEayIEQQN1IgUgASABIAVJGyAEQfD///8HTxsgByADEDIhBSAIKAIUIgEgDDcDCCABIA03AwAgCCABQRBqNgIUIAgoAhAgAygCBCADKAIAIgdrIgFrIQQgAQRAIAQgByAB/AoAAAsgAygCACEBIAMgBDYCACAIIAE2AhAgAyAIKAIUIgQ2AgQgCCABNgIUIAMoAgghByADIAgoAhg2AgggCCAHNgIYIAUgATYCACAFEDYLIAMgBDYCBCAMIQsgDSEKCyAGIAlqKAIAIgYgAEcNAAsLAkAgAg0AIAQgAygCAGtBMEcNACAGKAIUIgAgBigCECIBKAIQRw0AIAApAwAiCiABKQMAIgt9QgF8QgJYBEAgACkDCCABKQMIfUIBfEIDVA0DCyAGKQMAQgF8IgwgC31CAlgEQCAGKQMIIAEpAwh9QgF8QgNUDQMLIAwgCn1CAlYNACAGKQMIIAApAwh9QgF8QgNUDQILQQEhBgwCCxAmAAtBACEGCyAIQSBqJAAgBgvDBAIEfgZ/IwBBEGsiCSQAIAEgASkDGCIDNwMIIAEgASkDECIFNwMAIAEgASgCVEEQQRQgASgCMEEAShtqKAIAIgY2AlQgBikDACEEIAYpAwghAiABIAU3AyAgASACNwMYIAEgBDcDECABAnwgAiADUgRAIAEpAxAgBX25IAIgA325owwBC0T////////v/0T////////vfyABKQMQIAVVGws5AyggASgCYARAIAAgASABEH4gASkDCCEDIAEpAxghAgsCQCACIANRBEAgASgCWC0ACA0BQQAhBkEQQRQgASgCMEEAShsiCCABKAJUaigCACIHKQMIIANSDQEgASkDACEFIAEpABAhBCAALQB0QQFxIQACQANAIABBACAHKQMAIgIgBFMgBCAFV0YbRQRAIAEgAjcDECABIAc2AlQgBy0AGEEEcQ0CQQEhBiACIQQgAyAHIAhqKAIAIgcpAwhRDQ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oAhQiATYCVCACIAEpAwg3AxggASkDACEQIAIgBDYCWCACIBA3AxAgAgJ8IAIpAxgiESACKQMIIhBSBEAgAikDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAIpAxAgElUbCzkDKCAEKAIALQAYQQJxRQRAIAIhBgwCC0EAIQYMAgtBACEGQQAhAiABQQJxDQELQegAECMiAUEAQegA/AsAIAFBATYCMCABQTRqQQBBKfwLACABIAQoAgAiAikDADcDACACKQMIIRAgAUEBNgIwIAEgEDcDCCABIAEpAwAiEjcDICABIAQoAgAoAhAiAjYCVCABIAIpAwg3AxggAikDACEQIAEgBDYCWCABIBA3AxAgAQJ8IAEpAxgiESABKQMIIhBSBEAgASkDECASfbkgESAQfbmjDAELRP///////+//RP///////+9/IAEpAxAgElUbCyIcOQMoAkAgBkUEQEEAIQYMAQsCQCAGKQMYIAYpAwhRBEAgBisDKET////////v/2ENAgwBCyAQIBFRBEAgHET////////vf2ENAgwBCyAGKwMoIBxjDQELIAYhAiABIQYMAQsgASECCyACQQE6AFwgAEEcaiEEAkAgACgCHCIBRQRAIAJCADcDQCAAIAI2AhwMAQsgASACEL8CBEADQAJAIAQoAgAiAUHEAGohBCABKAJEIgVFDQAgBSACEL8CDQELCwJAIAEoAmBBAkYEQCABKAJEIgFFDQELIAIgASgCRCIENgJEIAQEQCAEIAI2AkALIAIgATYCQCABIAI2AkQLDAELIAJBADYCQCACIAAoAhwiATYCRCABIAI2AkAgACACNgIcCwJAIAIoAlgtAAhBAUYEQEEAIQUgACgCHCEBAkAgACgCCARAIAEgAkcEQCACKAI4IQQgAigCNCEFA0ACQCABKAJYIgcoAgRBAUYEQCACIAQgASgCMGoiBDYCOAwBCyAHLQAIDQAgAiAFIAEoAjBqIgU2AjQLIAEoAkQiASACRw0ACwsMAQtBACEEAkAgASACRgRAQQAhAQwBCwNAAkAgASgCWCIHKAIEQQFGBEAgBEEBaiEEDAELIAUgBy0ACEEBc2ohBQsgASgCRCIBIAJHDQALIARBAXEhASAFQQ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L1C////////////AINCgICAgICAgPj/AFQiBBs5AxAgASASIA6jRAAAAAAAAAAAIAQbOQMIIAEgEEQAAAAAAAAAACAEGzkDAAsgAkEBaiICIAlHDQALCyAGKAIAIgAEQCAGIAA2AgQgBigCCBogABAiCyAFQUBrJAALgAEBBH8gACgCBCIDIAFBAXRLIANBEEtxAkAgASADTQ0AIAAgARA5IAEgACgCBCIDayIEQQBMDQAgACgCACADQQR0aiEDA0AgAyACKQIINwIIIAMgAikCADcCACADQRBqIQMgBEEBSyAEQQFrIQQNAAsLIAAgATYCBARAIAAQgwELCz4AIAMEQCAAIAMQ8gEgACgCBCEDIAEgAkcEQANAIAMgARAuQRhqIQMgAUEYaiIBIAJHDQALCyAAIAM2AgQLC4gBAQl8IAErAzAhBiABKwMAIQcgASsDGCEIIAErAzghCSABKwMIIQogASsDICELIAAgAisDACIDIAErAxCiIAIrAwgiBCABKwMooqAgAisDECIFIAErA0CioDkDECAAIAMgCqIgBCALoqAgBSAJoqA5AwggACADIAeiIAQgCKKgIAUgBqKgOQMAC0oBAn8gACgCBCICIAAoAggiAUcEQANAIAAgAUEQayIBNgIIIAEQLxogAiAAKAIIIgFHDQALCyAAKAIAIgEEQCAAKAIMGiABECILCzABAn8jAEGgAmsiASQAIAFBCGoQOyICQQ42AkQgACACEO8BIAIQOhogAUGgAmokAAt3AQF/IwBBMGsiAyQAIANBGGogASACEJcCIAMgASACQRhqEJcCIABBMGogASACQTBqEJcCIAAgAykDKDcDECAAIAMpAyA3AwggACADKQMYNwMAIAAgAykDADcDGCAAIAMpAwg3AyAgACADKQMQNwMoIANBMGokAAuMAQECfyAAIAEoAgA2AgACQAJAIAEoAgQiAkUEQCAAQQA2AgQMAQsgAigCBCEBA0ACQCABQX9GBEBBACECDAELIAIgAUEBaiACKAIEIgMgASADRiIBGzYCBCABDQAgAyEBDAELCyAAIAI2AgQgAg0BC0EEEHQiAEG05gE2AgAgAEHA5gFBvQMQCwALIAALUgEBfyAAQQA2AgggAEIANwIAIA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CCkDADcDACAEQRBqIQEMAQsgBCAHKAIAIgRrQQR1IgVBAWoiBkGAgICAAU8NAiAJQQxqQf////8AIAEgBGsiBEEDdSIBIAYgASAGSxsgBEHw////B08bIAUgBxAyIgYoAggiASAIKQMINwMIIAEgCCkDADcDACAGIAYoAghBEGo2AgggBigCBCAAKAJIIAAoAkQiAWsiBWshBCAFBEAgBCABIAX8CgAACyAAKAJEIQUgACAENgJEIAYgBTYCBCAAIAYoAggiATYCSCAGIAU2AgggACgCTCEEIAAgBigCDDYCTCAGIAU2AgAgBiAENgIMIAYQNgsgACABNgJIIANBBHQiBCAAKAI4aiIDKwMIIAArAxAiC6IgAigCACAEaiICKQMIuaAQNPwGIRIgCyADKwMAoiACKQMAuaAQNPwGIRECQCAAKAJMIgIgAUsEQCABIBI3AwggASARNwMAIAFBEGohAgwBCyABIAcoAgAiAWtBBHUiA0EBaiIEQYCAgIABTw0CIAlBDGpB/////wAgAiABayICQQN1IgEgBCABIARLGyACQfD///8HTxsgAyAHEDIiBCgCCCIBIBI3AwggASARNwMAIAQgAUEQajYCCCAEKAIEIAAoAkggACgCRCIBayIDayECIAMEQCACIAEgA/wKAAALIAAoAkQhAyAAIAI2AkQgBCADNgIEIAAgBCgCCCICNgJIIAQgAzYCCCAAKAJMIQEgACAEKAIMNgJMIAQgAzYCACAEIAE2AgwgBBA2CyAAIAI2AkgMAwsgACgCZCIBQQJHIAtEK4cW2c737z9kcQ0BAkACQAJAAkAgAUEBaw4DAwIAAQsgCyAAKwMYRAAAAAAAAPC/oGQNBAsgACACIAMgBBC2AgwECyAAIAIgAyAEAnwgCiALoCAKvUL///////////8Ag0KBgICAgICA+P8AVCALvUL///////////8Ag0KAgICAgICA+P8AWHFFDQAaIAu9IhFCIIinIgJBgIDA/wNrIBGnIgFyRQRAIAoQqQMMAQsgAkEedkECcSIAIAq9IhFCP4inciEEAkAgEUIgiKdB/////wdxIgMgEadyRQRAAkACQCAEQQJrDgIAAQMLRBgtRFT7IQlADAMLRB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NAIAEoAgAhAyABQQA2AgAgACADNgIAIABBBGohACAIQQFqIQggAUEEaiIBIAlHDQALCyAKIAg2AgwjAEEQayIDJAACQCAAIAYiAUYNAANAIAIgCUYEQCAAIAFHBEADQCABKAIAIQQgAUEANgIAIAcoAgAhAiAHIAQ2AgAgAgRAIAIQIgsgB0EEaiEHIAFBBGoiASAARw0ACyAAIQELIAMgBzYCDCADIAE2AggMAgsCQAJAAkAgASgCACIFKAIAIgQpAwgiESAJKAIAIggoAgAiCykDCCISUgRAIBEgElMNAQwCCyAEKQMAIAspAwBXDQELIAlBADYCACAHKAIAIQQgByAINgIAIAQEQCAEECILIAlBBGohCQwBCyABQQA2AgAgBygCACEEIAcgBTYCACAEBEAgBBAiCyABQQRqIQELIAdBBGohByAAIAFHDQALCyADQRBqJAAMAgsgBiEAA0AgASgCACEEIAFBADYCACAAIAQ2AgAgAEEEaiEAIAhBAWohCCABQQRqIgEgAkcNAAsLIAogCDYCDCAKIAM2AgggCSEBIAIhBAJAIAYgACICRg0AA0AgASAHRgRAA0AgAkEEayICKAIAIQEgAkEANgIAIARBBGsiBCgCACEAIAQgATYCACAABEAgABAiCyACIAZHDQAMAwsACwJAAkACQCABQQRrIgAoAgAiCSgCACIFKQMIIhEgAkEEayIDKAIAIggoAgAiCykDCCISUgRAIBEgElMNAQwCCyAFKQMAIAspAwBXDQELIABBADYCACAEQQRrIgEoAgAhBSABIAk2AgAgACEBDAELIANBADYCACAEQQRrIgAoAgAhBSAAIAg2AgAgASEAIAMhAgsgBQRAIAUQIiAAIQELIARBBGshBCACIAZHDQALCwsgBgRAIApBDGogBhC0AwsgCkEQaiQADAILAkAgBCAFSARAIAEgBUECbSINQQJ0aiEKIAEgACIJRwRAIAEgAGtBAnUhCCAKKAIAKAIAIgwpAwghEQNAAn8CQAJAIBEgCSAIQQF2IgtBAnRqIg4oAgAoAgAiDykDCCISUgRAIBEgElcNAQwCCyAPKQMAIAwpAwBVDQELIA5BBGohCSAIIAtBf3NqDAELIA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IAM2AgAgAEEEaiECDAILIAIoAhAiAARAIAAQIgsgAhAiDAILIAAgASgCACIHa0ECdSIJQQFqIgBBgICAgARPDQIgBkEMakH/////AyACIAdrIgJBAXUiByAAIAAgB0kbIAJB/P///wdPGyAJIAEQSiIAKAIIIgIgAzYCACAAIAJBBGo2AgggACgCBCAEKAIAIAEoAgAiA2siAmshByACBEAgByADIAL8CgAACyABKAIAIQMgASAHNgIAIAAgAzYCBCAEIAAoAggiAjYCACAAIAM2AgggASgCCCEHIAEgACgCDDYCCCAAIAM2AgAgACAHNgIMIAAQUwsgBCACNgIACyAGQSBqJAAMAQsQJgALIAUoAhAiA0UNAyADKAIUIgYgAygCECICKAIQIgRHDQIMAwsgASADRg0CIAIoAhAhBCABKAIUIQYgASEADAALAAsACwsPCwNAIAMoAhAgAxAiIgMNAAsgAUEANgIQC8MCARF+IAIpAwggASkDCCIEfSINIA1CP4ciDoUgDn0iBUL/////D4MiBiABKQMAIgcgACkDAH0iDyAPQj+HIhCFIBB9IghC/////w+DIgl+IgNCIIggBiAIQiCIIgh+fCIRQv////8PgyAJIAVCIIgiCX58IhJCIIYgA0L/////D4OEIAIpAwAgB30iBSAFQj+HIgaFIAZ9IgNC/////w+DIgogBCAAKQMIfSIEIARCP4ciB4UgB30iC0L/////D4MiDH4iE0IgiCAKIAtCIIgiC358IgpC/////w+DIANCIIgiAyAMfnwiDEIghiATQv////8Pg4RRIAggCX4gEUIgiHwgEkIgiHwgAyALfiAKQiCIfCAMQiCIfFFxIA6nIA1CAFVqIBCnIA9CAFVqbCAGpyAFQgBVaiAHpyAEQgBVamxGcQuJAwIEfwJ+An8gASkDICIHIAApAyAiBlIEQCAGIAdTDAELIABBEGoiBSABIAFBEGoiAxCHASICBEAgAkEfdgwBCwJAIAAoAlQiBC0AGEEEcQ0AIAApAxggASkDGFcNACABIAUgBEEQQRQgACgCMEEAShtqKAIAEIcBQQBMDAELAkAgASgCVCICLQAYQQRxDQAgASkDGCAAKQMYVw0AIAEgAy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ABqQQBBMPwLACADQaABakEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIEIAEQmwEgBCADQThqIgUQ4QEgA0EANgL8ASADQgA3AvQBIARBA0ECIAJBAUYbQQIgA0EsaiICIANB9AFqIgEQ4gEgAyABNgIkIANBJGoQKSAEEGkaQRgQIyIBQbSaAjYCACABQgA3AgQgAUEMaiIGIAIQWyADIAE2AhggAyAGNgIUIAMgAykCFDcDCCAAIANBCGoQaiADIAI2AlAgBBApDAELIANBADYCQCADQgA3AjggA0E4aiADKAJEIgIoAgAiBSACKAIEIgIgAiAFa0EMbRBHIAEoAgQgASgCACIEa0HBAE8EQCADQaABaiEGIANB7ABqIQcgA0HoAGohCEEBIQkDQCADQSRqIAQgCUEGdGoQTSADQQA2AjQgA0IANwIsIAMoAiQhBCAIQQBB6AD8CwAgA0IANwNgIANBAjYCXCADQgA3AlQgB0EAQTD8CwAgBkEAQST8CwAgA0EANgLYASADQgA3A9ABIANBAToAzQEgA0EBOgDEASADQoCAgICAgICgPjcD6AEgA0KAgICAgICA0MEANwPgASADQfyaAjYCUCADQdAAaiIFIANBOGoiAhCbASAFIAQQ4QEgA0EANgL8ASADQgA3AvQBIAVBAUECIANBLGoiBCADQfQBaiIKEOIBIAMgCjYCTCADQcwAahApIAUQaRogAigCACIKBEAgAiAKEHsgAigCCBogAigCABAiIAJBADYCCCACQgA3AgALIAMgAygCLDYCOCADKQIwIRAgA0EANgI0IAMgEDcCPCADQgA3AiwgAyAENgJQIAUQKQJAIAMoAigiAkUNACACIAIoAgQiBUEBazYCBCAFDQAgAiACKAIAKAIIEQAAIAIQJAsgCUEBaiIJIAEoAgQgASgCACIEa0EGdUkNAAsLQRgQIyIBQbSaAjYCACABQgA3AgQgA0HQAGohBCABQQxqIgIgA0E4aiIFEFsgAyABNgIgIAMgAjYCHCADIAMpAhw3AwAgACADEG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AHKQMQNwMQIAMgBykDCDcDCCADIAcpAwA3AwAgA0EYaiEDIAdBGGoiByABRw0ACwNAIAEgAkYEQCADIAVrQQRrIgFFDQUgACAFIAH8CgAADAULAkAgASsDACAFKwMAYwRAIAAgASgCEDYCECAAIAEpAwg3AwggACABKQMANwMAIAFBGGohAQwBCyAAIAUoAhA2AhAgACAFKQMINwMIIAAgBSkDADcDACAFQRhqIQULIABBGGohACADIAVHDQALDAMLAkAgAyAESARAIAEgBEECbSILQRhsaiEIAkAgACABRgRAIAAhBwwBCyABIABrQRhtIQkgCCsDACEOIAAhBwNAIAcgByAJQQF2IgxBGGxqIgdBGGogDiAHKwMAYyINGyEHIAwgCSAMQX9zaiANGyIJDQALCyAHIABrQRhtIQwMAQsgA0EBRgRAIAogACkDEDcDGCAKIAApAwg3AxAgCiAAKQMANwMIIAAgASgCEDYCECAAIAEpAwg3AwggACABKQMANwMAIAEgCigCGDYCECABIAopAxA3AwggASAKKQMINwMADAQLIAAgA0ECbSIMQRhsaiEHAkAgASACRgRAIAEhCAwBCyACIAFrQRhtIQkgBysDACEOIAEhCANAIAggCUEBdiILQRhsaiINQRhqIAggDSsDACAOYyINGyEIIAkgC0F/c2ogCyANGyIJDQALCyAIIAFrQRhtIQsLIApBCGogByABIAgQ0AMgCigCCCEJAn8gCyAMaiAEIAtrIgQgAyAMayIDakgEQCAAIAcgCSAMIAsgBSAGEMgCIAkhACAIDAELIAkgCCACIAMgBCAFIAYQyAIgCyEEIAwhAyAJIQIgBwshASAEDQEMAgsLIAEgAkYNACAFIQMgASEHA0AgAyAHKQMQNwMQIAMgBykDCDcDCCADIAcpAwA3AwAgA0EYaiEDIAdBGGoiByACRw0ACwNAIAAgAUcEQCACQRhrIgIgAUEYayIEIANBGGsiBiAGKwMAIAQrAwBjIgcbIggoAhA2AhAgAiAIKQMINwMIIAIgCCkDADcDACAEIAEgBxshASAFIAMgBiAHGyIDRw0BDAILCwNAIAJBGGsiAiADQRhrIgMoAhA2AhAgAiADK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KgIhGioCIJoiAEIA8gEaIgBCAEIA8gDaKgoqAiDaKgIhFEAAAAAAAAAABiBEAgGyARoyEbIBwgEaMhHCAaIBGjIRoLIA1EAAAAAAAAAABiBEAgCyANoyELIAogDaMhCiAIIA2jIQgLIAlEAAAAAAAAAABiBEAgDiAJoyEOIBQgCaMhFCAMIAmjIQwLAkAgCiAUoSIJIAkgCaIgCCAMoSIIIAiioCALIA6hIgkgCaKgnyILoyIMvUL///////////8Ag0L/////////9/8AWARAIAYgDDkD+AEgBiAJIAujOQOIAiAGIAggC6M5A4ACDAELIAZCADcDiAIgBkIANwOAAiAGQgA3A/gBC0QAAAAAAAAAACEOIBKaIBUgFaIgFiAWoqAgEiASoqCfIhGjISQgFSARoyIVvUL///////////8Ag0KAgICAgICA+P8AVCECIAUrAxAhISAFKwMIISIgBSsDACEjIAMrAxAiCSAQIBcgF6IgEyAToqAgECAQoqCfIgijRAAAAAAAAAAAIBcgCKMiC71C////////////AINCgICAgICAgPj/AFQiBRsiECALRAAAAAAAAAAAIAUbIhIgAysDACIKokQAAAAAAAAAAKAgEyAIo0QAAAAAAAAAACAFGyITIAMrAwgiDaKgIBAgCaKgIgiioSIMIAyiIAogEiAIoqEiCyALoiANIBMgCKKhIgggCKKgoCIUIAogCqIgDSANoqAgCSAJoqBEEeotgZmXcT2iYwRAICEgGKEiCCAQIBIgIyAfoSIJokQAAAAAAAAAAKAgEyAiIBmhIgqioCAQIAiioCIIoqEiDCAMoiAJIBIgCKKhIgsgC6IgCiATIAiioSIIIAiioKAhFAtEAAAAAAAAAAAhDUQAAAAAAAAAACEJIAsgFJ8iCqMiC71C////////////AINC//////////f/AFgEQCAIIAqjIQ0gDCAKoyEOIAshCQtEAAAAAAAAAAAhCyADKwMwIgggJEQAAAAAAAAAgCACGyIUIBWaRAAAAAAAAACAIAIbIhcgAysDICIMokQAAAAAAAAAAKAgFpogEaNEAAAAAAAAAIAgAhsiFiADKwMoIhiioCAUIAiioCIRoqEiFSAVoiAMIBcg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iF6AhIiAYIAQrA/gHokQAAAAAAAAAAKAgFyAEKwOwBaKgISMgGCAEKwPwB6JEAAAAAAAAAACgIBcgBCsDqAWioCEkIBggBCsD6AeiRAAAAAAAAAAAoCAXIAQrA6AFoqAhIAsgIkQAAAAAAAAAAGIEQCAjICKjISMgJCAioyEkICAgIqMhIAsgCiAjOQMQIAogJDkDCCAKICA5AwAgIL1C////////////AINC//////////f/AFYgJL1C////////////AINC//////////f/AFZyRSAjvUL///////////8Ag0L/////////9/8AWHENACAKIAQpA5AINwMQIAogBCkDiAg3AwggCiAEKQOACDcDAAsgFkEBaiIWIA9HDQALCyAAQQA2ArwBIABBuAFqEJMBAkAgDSgCvAEgDSgCXEYEQCAAEFogABBYDAELIAAQlAILIAAgAxBUIABBfzYCyAELIAQoAhgiAARAIAAQIgsgDRA6GgsgBEHwCGokAAsfACABBEAgACABKAIAENICIAAgASgCBBDSAiABECILCzoAIAEEQCAAIAEoAgAQ0wIgACABKAIEENMCIAEoAhQiAARAIAEgADYCGCABKAIcGiAAECILIAEQIgsLghMCCn8afCMAQYABayICJAAgASgCBCILBEADQAJAIAEoAgAgCGotAABBAUcNACAAKAK4ASEKIAAoArwBBEAgCiAIQQV0aisDGEQAAAAAAAAAAGMNAQtBACEDIAJBADYCeCACQgA3AnAgAkEANgJoIAJCADcCYEQAAAAAAAAAACEVIAAoAkgiBSAAKAJYIAhBAnRqIgRBeEEEIAhBA3BBAkYbaigCAEEYbGoiCSsDACAFIAQoAgBBGGwiBGoiBSsDACIfoSIOIA4gDqIgCSsDCCAFKwMIIiChIgwgDKKgIAkrAxAgBSsDECIhoSIPIA+ioJ8iE6MiDkQAAAAAAAAAACAOvUL///////////8Ag0KAgICAgICA+P8AVCIFGyEOIAwgE6NEAAAAAAAAAAAgBRshDCAPIBOjRAAAAAAAAAAAIAUbIRMgACgCmAEgBGoiBCsDECEiIAQrAwghIyAEKwMAISRBACEHIAogCEEFdGoiBCsDECIPIAQrAwAiECAQoiAEKwMIIg0g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wg3AwggByAKKQMANwMAIAkgDEcNAAsgCSASaiEHDAELIAEhBwsCfyANIA5qIAMgBGpIBEAgACAJIAcgDiANIAUgBhDrAiAHIQAgCwwBCyAHIAsgAiADIAQgBSAGEOsCIA0hBCAOIQMgByECIAkLIQEgBA0BDAILCyABIAJGDQAgBSEHIAEhCANAIAcgCCkDCDcDCCAHIAgpAwA3AwAgB0EQaiEHIAhBEGoiCCACRw0ACwNAIAAgAUcEQCACQRBrIgIgAUEQayIJIAdBEGsiBiAGKwMAIAkrAwBkIgQbIgMpAwg3AwggAiADKQMANwMAIAkgASAEGyEBIAUgByAGIAQbIgdHDQEMAgsLA0AgAkEQayICIAdBEGsiBykDCDcDCCACIAcpAwA3AwAgBSAHRw0ACwsgCkEQaiQAC3MBBH8gACgCBCICIAFBAXRLIAJBEEtxAkAgASACTQ0AIAAgARBEIAEgACgCBCIDayICQQBMDQAgACgCACADQQN0aiEDA0AgA0J/NwMAIANBCGohAyACQQFLIAJBAWshAg0ACwsgACABNgIEBEAgABCUAQsLmgEBAX8gACABRwRAAkAgACgCDCICRQ0AIAIgAigCACICQQFrNgIAIAJBAUoNACAAKAIMIgIEQCACECILIABBADYCDCAAKAIAIgIEQCACECILIABBADYCCCAAQgA3AgALIAEoAgwiAiACKAIAQQFqNgIAIAAgASgCDDYCDCAAIAEoAgA2AgAgACABKAIENgIEIAAgASgCCDYCCAsLcgEDfyAAKALUAUUEQEEADwsgACgCzAEiASAAQdABaiICRgRAQQEPCwNAIAEtAIEBIgNBAUYEQAJAIAEoAgQiAARAA0AgACIBKAIAIgANAAwCCwALA0AgASABKAIIIgEoAgBHDQALCyABIAJHDQELCyADCykAIABBADYCBCAAEC0gAEEANgIUIABBEGoQLSAAQQA2AiQgAEEgahAtC8UCAQN/IAAoAgggACgCACIEa0EMbSADTwRAIAAoAgQiBSAEayIGQQxtIANJBEAgASAGaiEDIAQgBUcEQCAGBEAgBCABIAb8CgAACyAAKAIEIQULIAUhASACIANHBEADQCABIAMoA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iDmorAwCaZCAOIBZqIg4rAwAiCCAGYyAGIAhhGyAKIBUgECgCCEEYbCITaisDAJpkIBMgFmoiEysDACIJIAZjIAYgCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBAoAgAhGCAOKwMQIQcgDisDCCEFAkAgBiAIoSILIAYgCaEiDCALmSAMmWMiDhsgCSAIoaMiCL1C////////////AINC//////////f/AFYNACATKwMIIgkgBaEiC71C////////////AINCgICAgICAgPj/AFoNACATKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgDhsgCCANoqAhByAFIAkgDhsgCCALoqAhBQsgGUEAIBEoAqgBIg4gGEEDbUEYbGorAwggDiARKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAUgFCsDCCIIYyAFIAhhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AIA5BACAOayAQLQAMGyASaiESIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIQIAc5AxAgECAHOQMIIBAgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyASRQRARAAAAAAAAPh/IQVBAAwBCyASQQAgESgCqAEgA0EYbGorAxBEAAAAAAAAAABkIA8rAyAiBSAPKwM4IgYgFCsDCCIHIA8rAxAiCKEiCZkgByAPKwMoIgehIgqZYyIBGyAGIAWhIgYgCSAKIAEbIAcgCKGjIgeioCAFIAa9Qv///////////wCDQoCAgICAgID4/wBUGyAFIA8rAzAgDysDGKG9Qv///////////wCDQoCAgICAgID4/wBUGyAFIAe9Qv///////////wCDQoCAgICAgID4/wBUGyIFIBQrAxAiBmMgBSAGYRsbCyEBIAAgBTkDCCAAIAE2AgALsgkBDn8jAEEQayIRJAACQCAFRQ0AA0ACQAJAIAUgB0wgBCAHTHJFBEAgBEUNBCADKAIAKAIAIg0gASgCACILQQN0aiIIQQEgAygCBCgCACIJa0ECdCIOaiEKIAggC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hBCAIIQIgCQshASAFDQEMAgsLIAEgAkYNACAGIQQgASEIA0AgBCAIKAIANgIAIARBBGohBCAIQQRqIgggAkcNAAsgAygCBCELIAMoAgAhCQNAIAAgASIDRgRAA0AgAkEEayICIARBBGsiBCgCADYCACAEIAZHDQAMAwsACwJAIAkoAgAiCiAEQQRrIgcoAgAiCEEDdGoiDCALKAIAIg1BAnQiAWooAgAiDiABIAogA0EEayIBKAIAIgVBA3RqIgpqKAIAIg9IDQAgDiAPRgRAIAxBASANa0ECdCINaigCACAKIA1qKAIASA0BCyAIIQUgAyEBIAchBAsgAkEEayICIAU2AgAgBCAGRw0ACwsgEUEQaiQAC5QHAgl8DH8jAEFAaiIPQRBqQQBBMPwLACAPQQI2AgwgD0KAgICAEDcCBCACQRhsIgIgASgCACIOKAKYAWorAwAhCiAOKAJIIAJqIhQrAwAhBiABKAIEIhEoApgBIRUgESgCSCEWQQAhAUEAIQIDQAJ/IBUgBCAPQQRqIAJqKAIAQQR0aiIQKAIEQRhsIg5qKwMAIApjIA4gFmoiDisDACIIIAZjIAYgCGEbIBUgECgCCEEYbCITaisDACAKYyATIBZqIhMrAwAiCSAGYyAGIAlhG2siGUUEQEQAAAAAAAD4fyEFRAAAAAAAAPh/IQdBAAwBCyAQKAIAIRggDisDECEHIA4rAwghBQJAIAYgCKEiCyAGIAmhIgwgC5kgDJljIg4bIAkgCKGjIgi9Qv///////////wCDQv/////////3/wBWDQAgEysDCCIJIAWhIgu9Qv///////////wCDQoCAgICAgID4/wBaDQAgEysDECIMIAehIg29Qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIA4bIAggDaKgIQcgBSAJIA4bIAggC6KgIQULIBlBACARKAKoASIOIBhBA21BGGxqKwMIIA4gESgCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAYyAFIBQrAwgiCGMgBSAIYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNACAOQQAgDmsgEC0ADBsgEmohEiABQQFKBEBBAiEBDAELIAFF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8gFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwAgC2QgCCAOIBZqIg4rAwAiBmMgBiAIYRsgFSARKAIEQRhsIhBqKwMAIAtkIAggECAWaiIQKwMAIgljIAggCWEbayIZRQRARAAAAAAAAPh/IQVEAAAAAAAA+H8hB0EADAELIBEoAgAhGCAQKwMQIQcgECsDCCEFAkAgCCAJoSIKIAggBqEiDCAKmSAMmWMiEBsgBiAJoaMiBr1C////////////AINC//////////f/AFYNACAOKwMIIgkgBaEiCr1C////////////AINCgICAgICAgPj/AFoNACAOKwMQIgwgB6EiDb1C////////////AINCgICAgICAgPj/AFoNACAHIAwgEBsgBiANoqAhByAFIAkgEBsgBiAKoqAhBQsgGUEAIBIoAqgBIg4gGEEDbUEYbGorAwggDiASKAJoIBhBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIBQrAwgiBiAFYyAFIAZhGxsLIQ4CQCAFvUL///////////8Ag0L/////////9/8AVg0AQQAgDmsgDiARLQAMGyATaiETIAFBAUoEQEECIQEMAQsgAUUgDkUgF3NFckUEQEEBIQEMAQsgD0EQaiABQRhsaiIRIAc5AxAgESAHOQMIIBEgBTkDACABQQFqIQEgDkEARyEXCyACQQRqIgJBDEcNAAsCfyATRQRARAAAAAAAAPh/IQVBAAwBCyATQQAgEigCqAEgA0EYbGorAxBEAAAAAAAAAABkIBQrAxAiCCAPKwMgIgUgDysDOCIHIBQrAwgiBiAPKwMQIgmhIguZIAYgDysDKCIGoSIKmWMiARsgByAFoSIHIAsgCiABGyAGIAmhoyIGoqAgBSAHvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAPKwMwIA8rAxihvUL///////////8Ag0KAgICAgICA+P8AVBsgBSAGvUL///////////8Ag0KAgICAgICA+P8AVBsiBWMgBSAIYRsbCyEBIAAgBTkDCCAAIAE2AgALsgkBDn8jAEEQayIRJAACQCAFRQ0AA0ACQAJAIAUgB0wgBCAHTHJFBEAgBEUNBCADKAIAKAIAIg0gASgCACILQ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wwBCyAIIAsgAiADIAQgBSAGIAcQiwMgCiEFIAwhBCAIIQIgCQshASAFDQEMAgsLIAEgAkYNACAGIQQgASEIA0AgBCAIKAIANgIAIARBBGohBCAIQQRqIgggAkcNAAsgAygCBCELIAMoAgAhCQNAIAAgASIDRgRAA0AgAkEEayICIARBBGsiBCgCADYCACAEIAZHDQAMAwsACwJAIAkoAgAiCiAEQQRrIgcoAgAiCEEDdGoiDCALKAIAIg1BAnQiAWooAgAiDiABIAogA0EEayIBKAIAIgVBA3RqIgpqKAIAIg9IDQAgDiAPRgRAIAxBASANa0ECdCINaigCACAKIA1qKAIASA0BCyAIIQUgAyEBIAchBAsgAkEEayICIAU2AgAgBCAGRw0ACwsgEUEQaiQAC5QHAgl8DH8jAEFAaiIPQRBqQQBBMPwLACAPQQI2AgwgD0KAgICAEDcCBCACQRhsIgIgASgCACIOKAKYAWorAwAhCyAOKAJIIAJqIhQrAwAhCCABKAIEIhIoApgBIRUgEigCSCEWQQAhAUEAIQIDQAJ/IAsgFSAEIA9BBGogAmooAgBBBHRqIhEoAghBGGwiDmorAwBjIAggDiAWaiIOKwMAIgZjIAYgCGEbIAsgFSARKAIEQRhsIhBqKwMAYyAIIBAgFmoiECsDACIJYyAIIAlhG2siGUUEQEQAAAAAAAD4fyEFRAAAAAAAAPh/IQdBAAwBCyARKAIAIRggECsDECEHIBArAwghBQJAIAggCaEiCiAIIAahIgwgCpkgDJljIhAbIAYgCaGjIga9Qv///////////wCDQv/////////3/wBWDQAgDisDCCIJIAWhIgq9Qv///////////wCDQoCAgICAgID4/wBaDQAgDisDECIMIAehIg29Qv///////////wCDQoCAgICAgID4/wBaDQAgByAMIBAbIAYgDaKgIQcgBSAJIBAbIAYgCqKgIQULIBlBACASKAKoASIOIBhBA21BGGxqKwMIIA4gEigCaCAYQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAUKwMIIgYgBWMgBSAGYRsbCyEOAkAgBb1C////////////AINC//////////f/AFYNAEEAIA5rIA4gES0ADBsgE2ohEyABQQFKBEBBAiEBDAELIAFFIA5FIBdzRXJFBEBBASEBDAELIA9BEGogAUEYbGoiESAHOQMQIBEgBzkDCCARIAU5AwAgAUEBaiEBIA5BAEchFwsgAkEEaiICQQxHDQALAn8gE0UEQEQAAAAAAAD4fyEFQQAMAQsgE0EAIBIoAqgBIANBGGxqKwMQRAAAAAAAAAAAZCAUKwMQIgggDysDICIFIA8rAzgiByAUKwMIIgYgDysDECIJoSILmSAGIA8rAygiBqEiCpljIgEbIAcgBaEiByALIAogARsgBiAJoaMiBqKgIAUgB71C////////////AINCgICAgICAgPj/AFQbIAUgDysDMCAPKwMYob1C////////////AINCgICAgICAgPj/AFQbIAUgBr1C////////////AINCgICAgICAgPj/AFQbIgVjIAUgCGEbGwshASAAIAU5AwggACABNgIAC/wHAw9/A3wDfiMAQdABayIEJAAgBEGgAWpBAEEw/AsAIARB8ABqQQBBMPwLACABKAIAIhAoAlggAkECdGoiBUF4QQQgAkEDb0ECRhtqKAIAIQ8gBSgCACEMIAEoAgQhBSAEQQI2AhAgBEKAgICAEDcCCCAFKAJYIg0gA0EDbCIOQQJ0aiERIAUoAmghEgNAQQEhCQJAIA0gBEEIaiAGaigCACIKIA5qIgtBAnQiB2ooAgAiBSARQQRBCCAKQQFGG0EAIAobQYzpAGooAgBBAnRqKAIAIghIBEAgBSEHIAghBQwBCyAHIBJqKAIAIQtBACEJIAghBwsgBEFAayAKQQR0aiIIIAk6AAwgCCAFNgIIIAggBzYCBCAIIAs2AgAgBkEEaiIGQQxHDQALIAQgDzYCOCAEIAw2AjQgAUEIaiENQQAhBkEAIQdBACEIQQAhCQNAIARBCGogDSAEQTRqIAhqKAIAIgsgAyAEQUBrEIoDAkAgBCsDECITvUL///////////8Ag0L/////////9/8AVg0AIAQoAggiCkEAIAprIAsgDEYbIAlqIQkgBkEBSgRAQQIhBgwBCyAGRSAHIApFc0EBcUVyRQRAQQEhBgwBCyAGQRhsIg4gBEGgAWpqIgUgECgCSCAL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AWokACAVIAsQgQUgBSgCRCIBRQ0AIAEQIgsgBUGwAWokACAACzQBAX8gAUGAgICAAU8EQBAmAAsgACABQQR0IgIQIyIBNgIEIAAgATYCACAAIAEgAmo2AggLNAEBfyABQYCAgIACTwRAECYACyAAIAFBA3QiAhAjIgE2AgQgACABNgIAIAAgASACajYCCAtIAQF/IABBADYCCCAAQgA3AgAgAQRAIAAgARDyASAAKAIEIgIgAUEYbGohAQNAIAIQ6wFBGGoiAiABRw0ACyAAIAE2AgQLIAALRAEBfyAAQQA2AgggAEIANwIAIAEEQCAAIAEQjwMgACgCBCECIAFBBHQiAQRAIAJBACAB/AsACyAAIAEgAmo2AgQLIAAL5SEDFH8BfAx9IwBBgAFrIgQkACAAQgA3A0AgAEKAgICAgICA+L9/NwM4IABCgICAgICAgPi/fzcDMCAAQoCAgICAgIB4NwMoIABCgICAgICAgHg3AyAgAEKAgICAgICAeDcDGCAAQoCAgICAgID4/wA3AxAgAEKAgICAgICA+P8ANwMIIABCgICAgICAgPj/ADcDACAAQgA3A0ggAEEANgJQIABB2ABqEKECGiAAQgA3A9ABIABBfzYCyAEgAEEANgLAASAAQgA3A7gBIABBADYCsAEgAEIANwOoASAAQQA2AqABIABCADcDmAEgAEEANgKQASAAQgA3A4gBIABBADYCkAIgAEIANwOIAiAAQQA2AoACIABCADcD+AEgAEEANgLwASAAQgA3A+gBIABBADYC4AEgAEIANwPYASAAIABB0AFqNgLMAQJAAkAgAkUNACACLQAQQQFHDQAgAEEOECwMAQsgASgCFCABKAIQa0ECdSIRQQNuIg8gASgCCCIHIAEoAgQiBWtBAnUgASgCACIDbiINckUEQCAAQQAQLAwBCyARQQtLIA1BBE9xRQRAIABBAhAsDAELIANBAk0EQCAAQQUQLAwBCyABKAIgIgwgASgCHCIKayABKAIsIAEoAihrRwRAIABBBhAsDAELAkAgASgCTCIDIAEoAlAiBkYEQCABKAJEIQggASgCQCEJDAELIAEoAkQiCCABKAJAIglrQQJ2QQxsIAYgA2tBAnVGDQ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QED8gAigCDCADEKoCIQMgAigCDCIEQQlPBEAgBBABCyAAQQA2AgggAEIANwIAIAAgAxB9IAIgACgCADYCBCACIAM2AgAgAkEIaiACEI0CIAIoAgwgASgCBBAUIAIoAgwiAEEJTwRAIAAQAQsgAkEQaiQAC1sBA38jAEEgayIDJAAgASAAKAIEIgVBAXVqIQEgACgCACEAIANBCGoiBCABIAIgBUEBcQR/IAEoAgAgAGooAgAFIAALEQMAQRgQIyAEEC4gBBAoGiADQSBqJAALMwEDf0EEECMiAiABNgIAQZjxASAAQQNBACEAQdSGAiAAQbncAGpBsgIgAkEAQQBBABAAC0sBAn8gACgCBCIGQQh1IQcgACgCACIAIAEgAiAGQQFxBH8gAygCACAHaigCAAUgBwsgA2ogBEECIAZBAnEbIAUgACgCACgCFBEIAAtRAQF/AkAgAUUNACABQdjoARBiIgFFDQAgASgCCCAAKAIIQX9zcQ0AIAAoAgwoAgQgASgCDCgCBEcNACAAKAIQKAIEIAEoAhAoAgRGIQILIAILewEDfyAAKAIEIgRBAXEhBgJ/IAEtADdBAUYEQCAEQQh1IgUgBkUNARogAigCACAFaigCAAwBCyAEQQh1IAZFDQAaIAEgACgCACgCBDYCOEEAIQJBAAshBSAAKAIAIgAgASACIAVqIANBAiAEQQJxGyAAKAIAKAIcEQUACwsAIAEgAiAAEQEACw0AIAAoAgQgASgCBEYLQAECfyMAQRBrIgIkACMAQRBrIgEkACABIAA2AgwgAUEMakEEEPcBIAFBEGokACACQRBqJABBH3FBAnRB0JwCagtoAQN/IwBBEGsiAyQAIANBADoADiABIABrQQJ1IQEgAigCACEEA0AgAQRAIAEgAUEBdiICQX9zaiACIAAgAkECdGoiAigCACAESSIFGyEBIAJBBGogACAFGyEADAELCyADQRBqJAAgAAvsBAMEfwV+AXwgAkEANgIAAkAgAb1C////////////AINCgICAgICAgPj/AFYgAUQAAAAAAAAAAGFyRQRAIAC9IglCNIinQf8PcSIDQf8PRw0BCyAAIAGiIgAgAKMPCwJAIABEAAAAAAAAAABhDQAgAb0iCkI0iKdB/w9xIQQCfiADRQRAQQAhAyAJQgyGIgdCAFkEQANAIANBAWshAyAHQgGGIgdCAFkNAAsLIAlBASADa62GDAELIAlC/////////weDQoCAgICAgIAIhAshBwJ+IARFBEBBACEEIApCDIYiCEIAWQRAA0AgBEEBayEEIAhCAYYiCEIAWQ0ACwsgCkEBIARrrYYMAQsgCkL/////////B4NCgICAgICAgAiECyEIAn4CQAJAIAMgBE4EQCADIARKBEADQCAHIAh9IgsgByALQgBZIgYbQgGGIQcgBSAGckEBdCEFIANBAWsiAyAESg0ACyAEIQMLIAUgByAIfSIIQgBZIgZyIQUgCCAHIAYbIgdQBEBBRCEDQgAhBwwDCyAHQv////////8HVg0BA0AgA0EBayEDIAciCEIBhiEHIAhCgICAgICAgARUDQALDAELIANBAWogBEcNAwsgA0EATA0AIAdCgICAgICAgAh9IAOtQjSGhAwBCyAHQQEgA2utiAsgAZkhAL8hAQJAAkAgAyAERg0AIANBAWogBEcNASABIAGgIgwgAGQNACAFQQFxRSAAIAxicg0BCyAFQQFqIQUgASAAoSEBCyACQQAgBUH/////B3EiAmsgAiAJIAqFQgBTGzYCACABmiABIAlCAFMbIQALIAALGwAgAEIBhkKAgICAgICAEHxCgYCAgICAgBBUCxUBAX8jAEEQayIBIAA5AwggASsDCAvaFgMSfwR8AX4jAEEwayIJJAACQAJAAkAgAL0iGEIgiKciA0H/////B3EiBkH61L2ABE0EQCADQf//P3FB+8MkRg0BIAZB/LKLgARNBEAgGEIAWQRAIAEgAEQAAEBU+yH5v6AiAEQxY2IaYbTQvaAiFDkDACABIAAgFKFEMWNiGmG00L2gOQMIQQEhAwwFCyABIABEAABAVPsh+T+gIgBEMWNiGmG00D2gIhQ5AwAgASAAIBShRDFjYhphtNA9oDkDCEF/IQMMBAsgGEIAWQRAIAEgAEQAAEBU+yEJwKAiAEQxY2IaYbTgvaAiFDkDACABIAAgFKFEMWNiGmG04L2gOQMIQQIhAwwECyABIABEAABAVPshCUCgIgBEMW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OaoiEDIAQgBaILIQQgACADOQMIIAAgBDkDAAuACAMIfwF8Bn4jAEEQayIGJAAgAEEANgIIIABCADcCACAAIAEoAgAiAyABKAIEIgEgASADa0EMbRBHIABBADYCHCAAIAI2AhggAEEAOgAUIABBADoAECAAQQA6AAwCQCAAKAIAIgIgACgCBCIHRwR/A0ACQAJAAkAgAigCACIBIAIoAgQiBEYNAANAIAEiA0EQaiIBIARGDQEgAykDACADKQMQUg0AIAMpAwggAykDGFINAAsMAQsgASIDIARHDQAgBiAENgIIIAYgBDYCBAwBCyAEIANBIGoiAUcEQCADQRBqIQUDQAJAIAMpAwAgASkDAFEEQCADKQMIIAUpAxhRDQELIAMgASkDCDcDGCADIAEpAwA3AxAgA0EQaiEDCyABIQUgAUEQaiIBIARHDQALCyAGIAQ2AgggBiADQRBqNgIECyAGKAIEIgMgAigCBCIBRwRAIAEgAyABIANraiIFayIERSABIAVGckUEQCADIAUgBPwKAAALIAIgAyAEaiIBNgIECwJAIAEgAigCACIFa0ERSQ0AIAUpAwAhDANAIAFBEGsiAykDACAMUg0BIAFBCGspAwAgBSkDCFINASACIAM2AgQgAyIBIAVrQRBLDQALCyACQQxqIgIgB0cNAAsgACgCHAVBAAtFBEBBACEFIAAtABBBAUYEQCAAQQA6ABALIAAoAgQiAiAAKAIAIgRHBEBC////////////ACEOQoCAgICAgICAgH8hDQNARP///////+9/IQsgBCAFQQxsIglqIgEoAgAiAyABKAIEIgpHBEACQANAAkAgAykDCCIMIA1TDQAgDCANUQRAIAMpAwAgDlkNAQsgC0T////////vf2EEQCAAKAIAIgQgCWoiASgCBCIHIAEoAgAiAWsiCEEhSQ0DAkAgB0EQayICIAcgCEEQcSIHGyIIIAFGBEBEAAAAAAAAAAAhCwwBCyACKQMAIQxEAAAAAAAAAAAhCwNAIAEpAwgiDyABKQMYfLkgASkDACIQIAEpAxAiEX25oiAPIAIpAwh8uSAMIBB9uaIgC6CgIQsgAUEQaiECIBEhDCABQSBqIgEgCEcNAAsLIAcE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CABECAEUNBCADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAQpAxA3AxAgACAEKQMINwMIIAAgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDAAwECyAFBEAgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMBAsgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAEKQMQNwMQIAAgBCkDCDcDCCAAIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAEIAIoAgARAgBFDQMgAyAEKQMQNwMYIAMgBCkDCDcDECADIAQpAwA3AwggBCABKQMQNwMQIAQgASkDCDcDCCAEIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAwsgAUEYayEFIABBGGoiASAAIAIoAgARAgAhCCAAQTBqIgQgASACKAIAEQIAIQYCQCAIRQRAIAZFDQEgAyABKQMQNwMYIAMgASkDCDcDECADIAEpAwA3AwggASAEKQMQNwMQIAEgBCkDCDcDCCABIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAgASAAIAIoAgARAgBFDQEgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQMYNwMQIAEgAykDEDcDCCABIAMpAwg3AwAMAQsgBgRAIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgBCkDEDcDECAAIAQpAwg3AwggACAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMADAELIAMgACkDEDcDGCADIAApAwg3AxAgAyAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgAykDGDcDECABIAMpAxA3AwggASADKQMINwMAIAQgASACKAIAEQIARQ0AIAMgASkDEDcDGCADIAEpAwg3AxAgAyABKQMANwMIIAEgBCkDEDcDECABIAQpAwg3AwggASAEKQMANwMAIAQgAykDGDcDECAEIAMpAxA3AwggBCADKQMINwMACyAFIAQgAigCABECAEUNAiADIAQpAxA3AxggAyAEKQMINwMQIAMgBCkDADcDCCAEIAUpAxA3AxAgBCAFKQMINwMIIAQgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDACAEIAEgAigCABECAEUNAiADIAEpAxA3AxggAyABKQMINwMQIAMgASkDADcDCCABIAQpAxA3AxAgASAEKQMINwMIIAEgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACABIAAgAigCABECAEUNAiADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAMpAxg3AxAgASADKQMQNwMIIAEgAykDCDcDAAwCCyAAIABBGGogAEEwaiAAQcgAaiABQRhrIAIQsgMMAQsgAEEYaiIFIAAgAigCABECACEIIABBMGoiBCAFIAIoAgARAgAhBgJAIAhFBEAgBkUNASADIAUpAxA3AxggAyAFKQMINwMQIAMgBSkDADcDCCAFIAQpAxA3AxAgBSAEKQMINwMIIAUgBCkDADcDACAEIAMpAxg3AxAgBCADKQMQNwMIIAQgAykDCDcDACAFIAAgAigCABECAEUNASADIAApAxA3AxggAyAAKQMINwMQIAMgACkDADcDCCAAIAUpAxA3AxAgACAFKQMINwMIIAAgBSkDADcDACAFIAMpAxg3AxAgBSADKQMQNwMIIAUgAykDCDcDAAwBCyAGBEAgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAEKQMQNwMQIAAgBCkDCDcDCCAAIAQpAwA3AwAgBCADKQMYNwMQIAQgAykDEDcDCCAEIAMpAwg3AwAMAQsgAyAAKQMQNwMYIAMgACkDCDcDECADIAApAwA3AwggACAFKQMQNwMQIAAgBSkDCDcDCCAAIAUpAwA3AwAgBSADKQMY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DcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMACwJAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBikDGDcDECABIAYpAxA3AwggASAGKQMINwMACwJAIAQgAyAFKAIAEQIARQ0AIAYgAykDEDcDGCAGIAMpAwg3AxAgBiADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBikDGDcDECAEIAYpAxA3AwggBCAGKQMINwMAIAMgAiAFKAIAEQIARQ0AIAYgAikDEDcDGCAGIAIpAwg3AxAgBiACKQMANwMIIAIgAykDEDcDECACIAMpAwg3AwggAiADKQMANwMAIAMgBikDGDcDECADIAYpAxA3AwggAyAGKQMINwMAIAIgASAFKAIAEQIARQ0AIAYgASkDEDcDGCAGIAEpAwg3AxAgBiABKQMANwMIIAEgAikDEDcDECABIAIpAwg3AwggASACKQMANwMAIAIgBikDGDcDECACIAYpAxA3AwggAiAGKQMINwMAIAEgACAFKAIAEQIARQ0AIAYgACkDEDcDGCAGIAApAwg3AxAgBiAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3Awgg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QQRqIQQgACACRw0ACwsgASAFRg0AA0AgBSgCACEAIAVBADYCACAEIAA2AgAgBEEEaiEEIAVBBGoiBSABRw0ACwsLDwsgAEEANgIAIAQgAjYCACABKAIAIQAgAUEANgIAIAQgADYCBAseAQJ/IAAoAgQgACgCACICa0EEdQRAIAAgAjYCBAsLjzMBCn8jAEEgayIFJAADQCABQcgAayEKIAFBMGshDCABQRhrIQkCQANAAkACQAJAAkACQCABIABrIghBGG0iBg4GBgYAAQIDBAsgAUEYayIBIAAgAigCABECAEUNBSAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAAQRhqIgMgACACKAIAEQIAIAFBGGsiASADIAIoAgARAgAhBEUEQCAERQ0FIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgASkDEDcDECADIAEpAwg3AwggAyABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3AwggASAFKQMINwMAIAMgACACKAIAEQIARQ0FIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgAykDEDcDECAAIAMpAwg3AwggACADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMADAULIAQEQCAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwFCyAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAMpAxA3AxAgACADKQMINwMIIAAgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAMgAigCABECAEUNBCAFIAMpAxA3AxggBSADKQMINwMQIAUgAykDADcDCCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwECyABQRhrIQQgAEEYaiIBIAAgAigCABECACEIIABBMGoiAyABIAIoAgARAgAhBgJAIAhFBEAgBkUNASAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCABIAMpAxA3AxAgASADKQMINwMIIAEgAykDADcDACADIAUpAxg3AxAgAyAFKQMQNwMIIAMgBSkDCDcDACABIAAgAigCABECAEUNASAFIAApAxA3AxggBSAAKQMINwMQIAUgACkDADcDCCAAIAEpAxA3AxAgACABKQMINwMIIAAgASkDADcDACABIAUpAxg3AxAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCyAGBEAgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACADKQMQNwMQIAAgAykDCDcDCCAAIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwAMAQsgBSAAKQMQNwMYIAUgACkDCDcDECAFIAApAwA3AwggACABKQMQNwMQIAAgASkDCDcDCCAAIAEpAwA3AwAgASAFKQMYNwMQIAEgBSkDEDcDCCABIAUpAwg3AwAgAyABIAIoAgARAgBFDQAgBSABKQMQNwMYIAUgASkDCDcDECAFIAEpAwA3AwggASADKQMQNwMQIAEgAykDCDcDCCABIAMpAwA3AwAgAyAFKQMYNwMQIAMgBSkDEDcDCCADIAUpAwg3AwALIAQgAyACKAIAEQIARQ0DIAUgAykDEDcDGCAFIAMpAwg3AxAgBSADKQMANwMIIAMgBCkDEDcDECADIAQpAwg3AwggAyAEKQMANwMAIAQgBSkDGDcDECAEIAUpAxA3AwggBCAFKQMINwMAIAMgASACKAIAEQIARQ0DIAUgASkDEDcDGCAFIAEpAwg3AxAgBSABKQMANwMIIAEgAykDEDcDECABIAMpAwg3AwggASADKQMANwMAIAMgBSkDGDcDECADIAUpAxA3AwggAyAFKQMINwMAIAEgACACKAIAEQIARQ0DIAUgACkDEDcDGCAFIAApAwg3AxAgBSAAKQMANwMIIAAgASkDEDcDECAAIAEpAwg3AwggACABKQMANwMAIAEgBSkDGDcDECABIAUpAxA3Aw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ACADNgIcCyADBEAgAyAFNgJACyACECIgACgCHCEHCyABKAJEIgIgASgCQCIDckUgASAHR3ENAwJAIAMEQCADIAI2AkQMAQsgACACNgIcCyACBEAgAiADNgJACyABECIMAwsCfwJAAkACQAJAIAkgASgCVCIERw0AIAQtABhBA3ENACACKQMgIRQMAQsgAikDICEUAkAgAwRAIBQgFVcNAQwHCyASIBRVDQYLIBQgBykDAFINACACKQMYIhEgAikDCFENACACQSBqIQUgBiAEQRBBFCABKAIwQQBKG2ooAgAiBCkDCDcDECAGIAQpAwA3AwggAigCWCIELQAIIQgCQCADBEACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFUNCAwCCyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIUw0BDAcLAkACQCAIQQFxRQ0AIAQoAgQgASgCWCgCBEYNACACKAI8DQAgAikDECEQAkAgBikDECITIBFRDQAgECACKQMAIhFRDQAgAikDCCIQIBNRBEAgESEQDAELIBEgAisDKCATIBB9uaKe/AZ8IRALIBAgBikDCFkNAQwICyACKQMQIRACQCAGKQMQIhMgEVENACAQIAIpAwAiEVENACACKQMIIhAgE1EEQCARIRAMAQsgESACKwMoIBMgEH25op78BnwhEAsgECAGKQMIVw0HCyAGIAEpAwg3AxAgBiAUNwMIDAMLIAYgASkDCDcDECAGIBQ3AwgMAQsgBiABKQMINwMQIAYgFDcDCCACQSBqIQUgA0UNAQsgACABIAIgBkEIahDcASACKAJEIgQEQCAEIAE2AkALIAwoAgAiCARAIAggAjYCRAsgAiABNgJEIAIgCDYCQCABIAQ2AkQgASACNgJAIAIoAkBFBEAgACACNgIcCyAAIAIgBkEIakEAEIECIA0MAQsgACACIAEgBkEI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AAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDACACKAIAIQEgAyAAKQMYNwOYAiADIAApAxA3A5ACIAMgACkDADcDgAIgAyAAKQMINwOIAiADQZACaiADQYACaiABEQIARQ0EIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDEAwECyAEBEAgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgASkDCDcDCCAAIAEpAwA3AwAgASADKQPYBDcDCCABIAMpA9AENwMADAQLIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAxg3AwggACAAKQMQNwMAIAAgAykD2AQ3AxggACADKQPQBDcDECACKAIAIQIgAyABKQMINwP4ASADIAEpAwA3A/ABIAMgACkDEDcD4AEgAyAAKQMYNwPoASADQfABaiADQeABaiACEQIARQ0DIAMgACkDGDcD2AQgAyAAKQMQNwPQBCAAIAEpAwg3AxggACABKQMANwMQIAEgAykD2AQ3AwggASADKQPQBDcDAAwDCyACKAIAIQQgAyAAKQMYNwO4BCADIAApAxA3A7AEIAMgACkDADcDoAQgAyAAKQMINwOoBCADQbAEaiADQaAEaiAEEQIAIQUgAigCACEEIAMgACkDKDcDmAQgAyAAKQMgNwOQBCADIAApAxA3A4AEIAMgACkDGDcDiAQgAUEQayEBIANBkARqIANBgARqIAQRAgAhBAJAIAVFBEAgBEUNASADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyAgAigCACEEIAMgACkDGDcD+AMgAyAAKQMQNwPwAyADIAApAwA3A+ADIAMgACkDCDcD6AMgA0HwA2ogA0HgA2ogBBECAEUNASADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAMAQsgBARAIAMgACkDCDcD2AQgAyAAKQMANwPQBCAAIAApAyg3AwggACAAKQMgNwMAIAAgAykD2AQ3AyggACADKQPQBDcDIAwBCyADIAApAwg3A9gEIAMgACkDADcD0AQgACAAKQMYNwMIIAAgACkDEDcDACAAIAMpA9gENwMYIAAgAykD0AQ3AxAgAigCACEEIAMgACkDKDcD2AMgAyAAKQMgNwPQAyADIAApAxA3A8ADIAMgACkDGDcDyAMgA0HQA2ogA0HAA2ogBBECAEUNACADIAApAxg3A9gEIAMgACkDEDcD0AQgACAAKQMoNwMYIAAgACkDIDcDECAAIAMpA9gENwMoIAAgAykD0AQ3AyALIAIoAgAhBCADIAEpAwg3A7gDIAMgASkDADcDsAMgAyAAKQMgNwOgAyADIAApAyg3A6gDIANBsANqIANBoANqIAQRAgBFDQIgAyAAKQMoNwPYBCADIAApAyA3A9AEIAAgASkDCDcDKCAAIAEpAwA3AyAgASADKQPYBDcDCCABIAMpA9AENwMAIAIoAgAhASADIAApAyg3A5gDIAMgACkDIDcDkAMgAyAAKQMQNwOAAyADIAApAxg3A4gDIANBkANqIANBgANqIAERAgBFDQIgAyAAKQMYNwPYBCADIAApAxA3A9AEIAAgACkDKDcDGCAAIAApAyA3AxAgACADKQPYBDcDKCAAIAMpA9AENwMgIAIoAgAhASADIAApAxg3A/gCIAMgACkDEDcD8AIgAyAAKQMANwPgAiADIAApAwg3A+gCIANB8AJqIANB4AJqIAERAgBFDQIgAyAAKQMINwPYBCADIAApAwA3A9AEIAAgACkDGDcDCCAAIAApAxA3AwAgACADKQPYBDcDGCAAIAMpA9AENwMQDAILIAAgAEEQaiAAQSBqIABBMGogAUEQayACEMQDDAELIAIoAgAhBCADIAApAxg3A7gBIAMgACkDEDcDsAEgAyAAKQMANwOgASADIAApAwg3A6gBIANBsAFqIANBoAFqIAQRAgAhByACKAIAIQUgAyAAKQMoNwOYASADIAApAyA3A5ABIAMgACkDEDcDgAEgAyAAKQMYNwOIASAAQSBqIQQgA0GQAWogA0GAAWogBRECACEFAkAgB0UEQCAFRQ0BIAMgACkDGDcD2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IAUoAgAhByAGIAIpAwg3A7gCIAYgAikDADcDsAIgBiABKQMANwOgAiAGIAEpAwg3A6gCIAZBsAJqIAZBoAJqIAcRAgAhBwJAIAhFBEAgB0UNASAGIAEpAwg3A+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+IwBB0AhrIgUkAANAIAFBMGshCiABQSBrIQsgAUEQayEJAkADQAJAAkACQAJAAkAgASAAa0EEdSIIDgYGBgABAgMECyABQRBrIgEpAwghDyACKAIAIQIgBSABKQMAIhA3A7AFIAUgDzcDuAggBSAQNwOwCCAFIA83A7gFIAUgACkDADcDoAUgBSAAKQMINwOoBSAFQbAFaiAFQaAFaiACEQIARQ0FIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAEpAwg3AwggACABKQMANwMAIAEgBSkDyAg3AwggASAFKQPACDcDAAwFCyACKA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ACAFKQPACDcDICACKAIAIQMgBSAAKQMYNwPYByAFIAApAxA3A9AHIAUgACkDADcDwAcgBSAAKQMINwPIByAFQdAHaiAFQcAHaiADEQIARQ0BIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAApAxg3AwggACAAKQMQNwMAIAAgBSkDyAg3AxggACAFKQPACDcDEAwBCyADBEAgBSAAKQMINwPICCAFIAApAwA3A8AIIAAgACkDKDcDCCAAIAApAyA3AwAgACAFKQPICDcDKCAAIAUpA8AINwMgDAELIAUgACkDCDcDyAggBSAAKQMANwPACCAAIAApAxg3AwggACAAKQMQNwMAIAAgBSkDyAg3AxggACAFKQPACDcDECACKAIAIQMgBSAAKQMoNwO4ByAFIAApAyA3A7AHIAUgACkDEDcDoAcgBSAAKQMYNwOoByAFQbAHaiAFQaAHaiADEQIARQ0AIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAApAyg3AxggACAAKQMgNwMQIAAgBSkDyAg3AyggACAFKQPACDcDIAsgAigCACEDIAUgASkDCDcDmAcgBSABKQMANwOQByAFIAApAyA3A4AHIAUgACkDKDcDiAcgBUGQB2ogBUGAB2ogAxECAEUNAyAFIAApAyg3A8gIIAUgACkDIDcDwAggACABKQMINwMoIAAgASkDADcDICABIAUpA8gINwMIIAEgBSkDwAg3AwAgAigCACEBIAUgACkDKDcD+AYgBSAAKQMgNwPwBiAFIAApAxA3A+AGIAUgACkDGDcD6AYgBUHwBmogBUHgBmogARECAEUNAyAFIAApAxg3A8gIIAUgACkDEDcDwAggACAAKQMoNwMYIAAgACkDIDcDECAAIAUpA8gINwMoIAAgBSkDwAg3AyAgAigCACEBIAUgACkDGDcD2AYgBSAAKQMQNwPQBiAFIAApAwA3A8AGIAUgACkDCDcDyAYgBUHQBmogBUHABmogARECAEUNAyAFIAApAwg3A8gIIAUgACkDADcDwAggACAAKQMYNwMIIAAgACkDEDcDACAAIAUpA8gINwMYIAAgBSkDwAg3AxAMAwsgACAAQRBqIABBIGogAEEwaiABQRBrIAIQxAMMAgsgCEEXTARAIARBAXEEQCACIQYjAEHQAGsiByQAAkAgACICIAEiCEYNACAAQRBqIgEgCEYNAANAIAYoAgAhBCAHIAEiAykDCDcDOCAHIAEpAwA3AzAgByAAKQMANwMgIAcgACkDCDcDKCAHQTBqIAdBIGogBBECAARAIAcgASkDCDcDSCAHIAEpAwA3A0AgASEEA0ACQCAEIAAiASkDCDcDCCAEIAApAwA3AwAgACACRgRAIAIhAQwBCyAGKAIAIQkgByAHKQNINwMYIAcgBykDQDcDECAHIAFBEGsiACkDADcDACAHIAApAwg3AwggASEEIAdBEGogByAJEQIADQELCyABIAcpA0g3AwggASAHKQNANwMACyADIgBBEGoiASAIRw0ACwsgB0HQAGokAAwDCyACIQMjAEHQAGsiCCQAAkAgASIEIABGDQAgASAAQRBqIgFGDQADQCADKAIAIQYgCCABIgIpAwg3AzggCCABKQMANwMwIAggACkDADcDICAIIAApAwg3AyggCEEwaiAIQSBqIAYRAgAEQCAIIAEpAwg3A0ggCCABKQMANwNAA0AgASIGIAAiASkDCDcDCCAGIAApAwA3AwAgAygCACEGIAggCCkDSDcDGCAIIAgpA0A3AxAgCCAAQRBrIgApAwg3AwggCCAAKQMANwMAIAhBEGogCCAGEQIADQALIAEgCCkDSDcDCCABIAgpA0A3AwALIAIiAEEQaiIBIARHDQALCyAIQdAAaiQADAILIANFBEAgACABRg0CIwBBMGsiCSQAIAEgACIDRwRAIAEgAGtBBHUiBkECTgRAIAZBAmtBAXYhAANAIAMgAiAGIAMgACIEQQR0ahDCAyAAQQFrIQAgBA0ACwsgASIAIABHBEADQCACKAIAIQQgCSAAKQMINwMYIAkgACkDADcDECAJIAMpAwA3AwAgCSADKQMINwMIIAlBEGogCSAEEQIABEAgCSAAKQMINwMoIAkgACkDADcDICAAIAMpAwg3AwggACADKQMANwMAIAMgCSkDKDcDCCADIAkpAyA3AwAgAyACIAYgAxDCAwsgAEEQaiIAIAFHDQALCyAGQQJOBEADQCAJIAMpAwg3AyggCSADKQMANwMgIAM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ICDcDCCALIAUpA8AINwMADAELIAUgACkDGDcDyAggBSAAKQMQNwPACCAAIAgpAwg3AxggACAIKQMANwMQIAggBSkDyAg3AwggCCAFKQPACDcDACACKAIAIQcgBSALKQMINwO4AiAFIAspAwA3A7ACIAUgCCkDADcDoAIgBSAIKQMINwOoAiAFQbACaiAFQaACaiAHEQIARQ0AIAUgCCkDCDcDyAggBSAIKQMANwPACCAIIAspAwg3AwggCCALKQMANwMAIAsgBSkDyAg3AwggCyAFKQPACDcDAAsgAigCACEHIAUgBikDGDcDmAIgBSAGKQMQNwOQAiAFIAApAyA3A4ACIAUgACkDKDcDiAIgBUGQAmogBUGAAmogBxECACEMIAIoAgAhByAFIAopAwg3A/gBIAUgCikDADcD8AEgBSAGKQMQNwPgASAFIAYpAxg3A+gBIAVB8AFqIAVB4AFqIAcRAgAhBwJAIAxFBEAgB0UNASAFIAYpAxg3A8gIIAUgBikDEDcDwAggBiAKKQMINwMYIAYgCikDADcDECAKIAUpA8gINwMIIAogBSkDwAg3AwAgAigCACEHIAUgBikDGDcD2AEgBSAGKQMQNwPQASAFIAApAyA3A8ABIAUgACkDKDcDyAEgBUHQAWogBUHAAWogBxECAEUNASAFIAApAyg3A8gIIAUgACkDIDcDwAggACAGKQMYNwMoIAAgBikDEDcDICAGIAUpA8gINwMYIAYgBSkDwAg3AxAMAQsgBwRAIAUgACkDKDcDyAggBSAAKQMgNwPACCAAIAopAwg3AyggACAKKQMANwMgIAogBSkDyAg3AwggCiAFKQPACDcDAAwBCyAFIAApAyg3A8gIIAUgACkDIDcDwAggACAGKQMYNwMoIAAgBikDEDcDICAGIAUpA8gINwMYIAYgBSkDwAg3AxAgAigCACEHIAUgCikDCDcDuAEgBSAKKQMANwOwASAFIAYpAxA3A6ABIAUgBikDGDcDqAEgBUGwAWogBUGgAWogBxECAEUNACAFIAYpAxg3A8gIIAUgBikDEDcDwAggBiAKKQMINwMYIAYgCikDADcDECAKIAUpA8gINwMIIAogBSkDwAg3AwALIAIoAgA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AAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgAikDEDcDKCADIAIpAwg3AyAgAyACKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQIDQCAEIQUgAkEYaiEGAkAgACsDICACKwMIYwRAIAYgAikDEDcDECAGIAIpAwg3AwggBiACKQMANwMAAn8gAyACIANGDQAaA0AgAiAAKwMgIAJBEGsrAwBjRQ0BGiACIAJBGGsiBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADCyIEIAUoAhA2AhAgBCAFKQMINwMIIAQgBSkDADcDAAwBCyAGIAUpAxA3AxAgBiAFKQMINwMIIAYgBSkDADcDAAsgBiECIAUiAEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgVBGGwiBmoiBCAFIAMgBRC1ASAEIAEgAiAFayICIAMgBmogAhC1ASAEIQIDQCABIAJGBEAgACAERg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAERw0ACwwECwJAIAIrAwggACsDCGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAERw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwudBQEIfyMAQSBrIgUkACADIQQCQCABIAJGDQAgAiAERgRAIAEhBAwBCyACIAFBGGoiBEYEQCAFIAEpAxA3AxggBSABKQMINwMQIAUgASkDADcDCCADIAJrIgJBBGsiBwRAIAEgBCAH/AoAAAsgASACaiIEIAUoAhg2AhAgBCAFKQMQNwMIIAQgBSkDCDcDAAwBCyADIAJBGGpGBEAgBSADQRhrIgIpAxA3AxggBSACKQMINwMQIAUgAikDADcDCCADIAIgAWsiB0FobUEYbGohBAJAIAEgAkYNACAHQQRrIgJFDQAgBCABIAL8CgAACyABIAUoAhg2AhAgASAFKQMQNwMIIAEgBSkDCDcDAAwBCwJ/IwBBIGshBiACIAEiBGsiCUEYbSIHIAMgAmsiC0EYbSIBRwRAIAchAgNAIAIgASICbyIBDQALIAQgAkEYbGohAgNAIAYgAkEYayICKQMQNwMYIAYgAikDCDcDECAGIAIpAwA3AwggAiAJaiEIIAIhAQNAIAEiCiAIIgEoAhA2AhAgCiABKQMINwMIIAogASkDADcDACABIAlqIAQgByADIAFrQRhtIghrQRhsaiAHIAhIGyIIIAJHDQALIAEgBigCGDYCECABIAYpAxA3AwggASAGKQMINwMAIAIgBEcNAAsgBCALagwBCwJAIAIgBEYgAiADRnINACACIQEDQCAGIAQpAxA3AxggBiAEKQMINwMQIAYgBCkDADcDCCAEIAEoAhA2AhAgBCABKQMINwMIIAQgASkDADcDACABIAYoAhg2AhAgASAGKQMQNwMIIAEgBikDCDcDACAEQRhqIgQgAkYNASABQRhqIgEgA0cNAAsLIAILIQQLIAAgAzYCBCAAIAQ2AgAgBUEgaiQAC4IGAQN/AkACQAJAAkACQCACDgMEAgABCyABQRhrIgErAwAgACsDAGMEQCADIAEpAxA3AxAgAyABKQMINwMIIAMgASkDADcDACADIAApAxA3AyggAyAAKQMINwMgIAMgACkDADcDGA8LIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIAMgASkDEDcDKCADIAEpAwg3AyAgAyABKQMANwMYDwsgAkEITARAIAAgAUYNAyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIgQgAUYNAyADIQADQCAAQRhqIQUCQCAEKwMAIAArAwBjBEAgBSAAKQMQNwMQIAUgACkDCDcDCCAFIAApAwA3AwACfyADIAAgA0YNABoDQCAAIAQrAwAgAEEYayICKwMAY0UNARogACACKAIQNgIQIAAgAikDCDcDCCAAIAIpAwA3AwAgAiIAIANHDQALIAMLIgIgBCgCEDYCECACIAQpAwg3AwggAiAEKQMANwMADAELIAUgBCkDEDcDECAFIAQpAwg3AwggBSAEKQMANwMACyAFIQAgBEEYaiIEIAFHDQALDAMLIAAgACACQQF2IgRBGGwiBmoiBSAEIAMgBBC2ASAFIAEgAiAEayICIAMgBmogAhC2ASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgA0EYaiEDIABBGGoiACAFRw0ACwwECwJAIAIrAwAgACsDAGMEQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACACQRhqIQIMAQsgAyAAKQMQNwMQIAMgACkDCDcDCCADIAApAwA3AwAgAEEYaiEACyADQRhqIQMgACAFRw0ACwwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyABIAJGDQADQCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQRhqIQMgAkEYaiICIAFHDQALCwuLCwEQfyMAQSBrIgckACAHQQA2AhggB0IANwIQIAdBEGogASgCJBAlIAEoAgwhDyABKAIIIQogASgCBCELIAEoAgAhBgJAAkACQCACKAIMQQBOBEBBASERDAELQQEhESALQQRBCCAGQQFGG0EAIAYbQZSVAWooAgBHDQELIAohDCAGIQoMAQtBASESIAQgBC0AA0EBczoAAyAEIAQtAAJBAXM6AAIgBCAELQABQQFzOgABIAQgBC0AAEEBczoAAEEAIREgCyEMIAYhCwsgAUEEaiETIAdCgoCAgDA3AgggB0KAgICAEDcCACACQQRqIRADQCAKIQYCQAJAAkACQCAHIAhqKAIAIg0OAwMAAQILIAshBgwCCyAMIQYMAQsgDyEGCyACIQkCQAJAAkAgBg4CAgABCyAQIQkMAQsgAkEIQQwgBkECRhtqIQkLIAkoAgBBAE4EQCAKIQYCQAJAAkACQCANDgMDAAECCyALIQYMAgsgDCEGDAELIA8hBgsgAiEJAkACQAJAIAYOAgIAAQsgECEJDAELIA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kByAEIAY2AqAHDAELIARBADYCqAcgBEIANwOgByAEQfAGakEAQSz8CwAgBCARNgKIByAEIAo2AoQHIAQgCTYCgAcgBCAQNgKMByASQYABEFUgBCgCkAciCCAEKAKUByIGQQV0aiICQgA3AwggAkKAgICAgICA+D83AwAgAkIANwMQIAJCADcDGCAEIAZBAWoiAjYClAcgBCgCmAchBQJAIBBBAEoEQCAEAn8gAiAFTwRAIBIgBUEBdEGAASAFGxBVIAQoApAHIgggBCgClAciBkEFdGoiAkIANwMQIAJCgICAgICAgPg/NwMIIAJCADcDACACQgA3AxggBCgCmAchBSAGQQFqDAELIAggAkEFdGoiAkIANwMQIAJCgICAgICAgPg/NwMIIAJCADcDACACQgA3AxggBkECagsiBzYClAcCQCAFIAdNBEAgEiAFQQF0QYABIAUbEFUgBCgCkAciCCAEKAKUByIHQQV0aiICQgA3AwggAkIANwMAIAJCADcDGCACQoCAgICAgID4PzcDECAEKAKYByEFDAELIAggB0EFdGoiAkIANwMIIAJCADcDACACQgA3AxggAkKAgICAgICA+D83AxALIAQgB0EBaiICNgKUBwJ/IAIgBU8EQCASIAVBAXRBgAEgBRsQVSAEKAKUByICQQFqIQYgBCgCkAciCCACQQV0agwBCyAHQQJqIQYgCCACQQV0agsiAkIANwMQIAJCADcDCCACQgA3AwAgAkKAgICAgICA+D83AxggBCAGNgKUByAEQoKAgIAwNwLgBSAEQoCAgIAQNwLYBUEAIQ9BACENQQAhBUEAIQ4DQAJAAkAgBEHYBWogDmooAgAiGUEATA0AQQQhByAJIQsCQAJAAkAgGUEBayIMDgICAAELIAUhByAKIQsMAQsgESAQIAxBAkYiAhshCyANIA8gAhshBwsgByALakEBayECAkACQCAMDgIDAQALIAIhDwwBCyACIQ0LIAUhAgsgESAQIBlBAkYbIQxBASEHIAggGUEBakEDcUEFdGoiBSsDGCElIAUrAxAhJiAFKwMIIScgBSsDACEoA0AgCSEFAkACQAJAIBkOAgIAAQsgCiEFDAELIAwhBQsgBSAHTARAIAIhBSAOQQR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UBIAMgAiABQfgmaiAFQcUBaiAEEAogAAugAQEDfyAAAn8CQCABKAIEIgRFBEAgAUEEaiIFIQIMAQsgAigCACEGA0AgBCICKAIQIgQgBkoEQCACIQUgAigCACIEDQEMAgsgBCAGTgRAIAIhBEEADAMLIAIoAgQiBA0ACyACQQRqIQULQeAAECMiBCADKAIAKAIANgIQIARBGGpBAEHIAPwLACABIAIgBSAEEIIBQQELOgAEIAAgBDYCAAvUAQIEfAJ/IAEoAgQiBygCWEF4QQQgAigCACICIAJBA20iCEEDbGtBAkYbaiACQQJ0aigCACECIAAgCDYCACAHKAJIIAJBGGxqIgIrAwAgASgCCCIBKwMAoSIDIAMgA6IgAisDCCABKwMIoSIDIAOioCACKwMQIAErAxChIgQgBKKgnyIFoyIGvUL///////////8Ag0L/////////9/8AWARAIAAgBjkDCCAAIAQgBaM5AxggACADIAWjOQMQDwsgAEIANwMYIABCADcDECAAQgA3AwgLpgUCB38JfCMAQeAAayIDJAAgAyACNgJMIAEoAgQhBwJAAkAgASgCACIGKAIEIgRFDQAgBkEEaiIIIQUDQCAFIAQgBCgCECACSCIJGyEFIARBBEEAIAkbaigCACIEDQALIAUgCEYNACACIAUoAhBODQELIAMgA0HMAGoiBTYCWCADIAdBzAFqIAUgA0HYAGoiBhB5IAMoAgAhBCMAQaACayICJAAgAiAEKQNINwNwIAIgBCkDQDcDaCACIAQpAzg3A2AgAiAEKQNQNwN4IAIgBCkDWDcDgAEgAiAEKQNgNwOIASACIAQpAyA3A0ggAiAEKQMoNwNQIAIgBCkDMDcDWCACQZABaiACQcgAahCQASACIAIrA9ABOQOYAiACIAIrA7gBOQOQAiACIAIrA6ABOQOIAiACIAIrA8gBOQOAAiACIAIrA7ABOQP4ASACIAIrA5gBOQPwASACIAIrA8ABOQPoASACIAIrA6gBOQPgASACIAIrA5ABOQPYASACIAJB2AFqEJABIAIrAwAhCyACKwMIIQwgAisDECENIAIrAxghDiACKwMgIQ8gAisDKCEQIAIrAzAhESACKwM4IRIgA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AIAIgIEQCACECILIABBADYCCCAAQgA3AgALIAAgASgCDDYCDCABQQA2AgwgACABKAIANgIAIAAgASgCBDYCBCAAIAEoAgg2AgggAUEANgIIIAFCADcCAAJAIAAoAhwiAkUNACACIAIoAgAiAkEBazYCACACQQFKDQAgACgCHCICBEAgAhAiCyAAQQA2AhwgACgCECICBEAgAhAiCyAAQQA2AhggAEIANwIQCyAAIAEoAhw2AhwgAUEANgIcIAAgASgCEDYCECAAIAEoAhQ2AhQgACABKAIYNgIYIAFBADYCGCABQgA3AhACQCAAKAIsIgJFDQAgAiACKAIAIgJBAWs2AgAgAkEBSg0AIAAoAiwiAgRAIAIQIgsgAEEANgIsIAAoAiAiAgRAIAIQIgsgAEEANgIoIABCADcCIAsgACABKAIsNgIsIAFBADYCLCAAIAEoAiA2AiAgACABKAIkNgIkIAAgASgCKDYCKCABQQA2AiggAUIANwIgCwujTgIefxB8IwBBgANrIgokAAJAIAEoAgQiBUUNAAJAIAJFDQAgAi0AEEEBRw0AIABBDhAsDAELIAEoAgAhASAKIAU2AkwgCiABNgJIIApB0ABqIgNCADcCLCADQQA2AiQgA0IANwIcIAMgCigCSDYCLCADIAooAkw2AjAgA0IANwJEIANCADcCPCADQgA3AjRBBBAjIgFBATYCACADQQA2AogBIANCADcCgAEgA0EANgJ4IANCADcCcCADQQA2AmggA0IANwJgIANBADYCWCADQgA3AlAgAyABNgJMIANBADYC9AEgA0IANwLsASADQQA2AuQBIANCADcC3AEgA0EANgLUASADQgA3AswBIANBADYCxAEgA0IANwK8ASADQgA3A6gBIANCADcDsAEgA0H8AWpBAEEw/AsAIApBADYCQCAKQgA3AjhBACEFIwBBkAFrIgYkAAJAIAMoAjBFBEBBBBAjIgFBATYCACAKIAE2AgwgBkEANgKEASAKQQA2AgggCkIANwIAIAZBADYCgAEgBkIANwJ4IApBADYCGCAKQgA3AhAMAQsgBkEANgKMASAGQgA3AoQBIAZCADcCfCADKAIwIhRBAk8EQEEBIQEgAygCLCIJKwMQIiMhJ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wMQIicgJKEiJCAEKwMgICGhIiiioSIhICIgBCsDMCIioSIpICiiICMgBCsDGCAioSIjoqEiIiAioiAhICGiICQgI6IgKSAloqEiISAhoqCgnyIjoyIkoqEgJiAhICOjIiGioSAnICIgI6MiIqKhIAQrA1ggIqIgBCsDUCAhoiAEKwNIICSiRAAAAAAAAAAAoKCgoEQAAAAAAAAAAGYiASABRUECQQMQiAIMAQsgA0GQAWohCSADKAIsIQggAysDCCIiISEDQCABIgRBAWohASAEQQRNBEAgCCAJIARBAnRqKAIAIhFBGGxqIgQrAxAhIyAEKwMIISYgBCsDACEkIAEhBANAICQgCCAJIARBAnRqKAIAIhVBGGxqIg4rAwChIiUgJaIgJiAOKwMIoSIlICWioCAjIA4rAxChIiUgJaKgIiUgISAhICVjIg4bISEgFSALIA4bIQsgESAMIA4bIQwgBEEBaiIEQQZHDQALCyABQQZHDQALICEgImEEQCADQTRqQQBBAUECQQMQiAIMAQtEAAAAAAAA8D8gCCALQRhsaiIBKwMAIisgCCAMQRhsaiIEKwMAIiOhIiYgJqIgASsDCCItIAQrAwgiJKEiJSAloqAgASsDECIuIAQrAxAiJ6EiKCAooqCjIS9BACEEQX8hCSAiISEDQCAIIARBGGxqIgErAwAgI6EiKSApoiABKwMIICShIiwgLKKgIAErAxAgJ6EiKiAqoqAgLyAmICmiRAAAAAAAAAAAoCAlICyioCAoICqioCIpICmioqEiKSAhICEgKWMiARshISAEIAkgARshCSAEQQFqIgQgBUcNAAsgISAiYQRAQQAhAQNAIAEiBUEBaiEBIAUgDEYgBSALRnINAAsgBSEBA0AgAUEBaiIBIAxGIAEgC0ZyDQALIANBNGogDCALIAUgARCIAgwBC0QAAAAAAAAAACAjICQgCCAJQRhsaiIBKwMIIiKhIiogLiABKwMQIimhIi6iIC0gIqEiLSAnICmhIi+ioSIhICMgASsDACIsoSIwIC2iICsgLKEiKyAqoqEiKiAqoiAhICGiICsgL6IgMCAuoqEiISAhoqCgnyIroyItoqEgJCAhICujIi6ioSAnICogK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AEQRhqEMcBIAQoAgAiAARAIAQgADYCBCAEKAIIGiAAECILIARBMGokAAtFAQF/IAAoAgwEQCAAKAIIEMUEIABBADYCCAJAIAAoAgQiAUUNACABQQJ0IgFFDQAgACgCAEEAIAH8CwALIABBADYCDAsLxAECAn8CfCABKAI4IgIgASgCPCIDNgI8IAMgAjYCOCACIAMrAyAgAisDIKEiBCADKwMYIAIrAxihIgUgBaIgBCAEoqCfIgSjRAAAAAAAAAAAIAUgBKMiBL1C////////////AINCgICAgICAgPj/AFQiAxs5AzAgAiAERAAAAAAAAAAAIAMbOQMoAkAgASgCOCgCACICIAEoAgAiA0YNACADIAEoAjwoAgAiAUYgASACRnINACAAQcgAaiACIAMgARCOBAsLZQECfwJAIAEoAgQiA0UEQCABIQIDQCACIAIoAggiAigCAEcNAAsMAQsDQCADIgIoAgAiAw0ACwsgASAAKAIARgRAIAAgAjYCAAsgACAAKAIIQQFrNgIIIAAoAgQgARDEBCABECILWgEDfyAAKAIIIAFJBEAgAUEYbBAnIQQgACgCACECAkAgACgCBCIDRQ0AIANBGGxBBGsiA0UNACAEIAIgA/wKAAALIAIEQCACECILIAAgATYCCCAAIAQ2AgALC74BAQR/IAAQiQQgASgCACEDIAFBADYCACAAKAIAIQIgACADNgIAIAIEQCAAKAIEGiACECILIAAgASgCBDYCBCABQQA2AgQgACABKAIMIgI2AgwgACABKgIQOAIQIAAgASgCCCIDNgIIIAIEQCAAQQhqIQQgAygCBCECAkAgACgCBCIDIANBAWsiBXFFBEAgAiAFcSECDAELIAIgA0kNACACIANwIQILIAAoAgAgAkECdGogBDYCACABQgA3AggLCx0AIAAgASACEIoCIAAgAiADEIoCIAAgAyABEIoCCyoAIAAgACgCDCABQQNsahBcIABBGGogACgCJCABarMgACoCKJWN/AEQcAv+AQEFfyABKAIAIgMgASgCBCIFRwRAA0AgAygCBCADKAIAa0EYbSACaiECIANBDGoiAyAFRw0ACwsgACAAKAIEIAAoAgBrQQR1IAJqEFwgAEEYaiAAKAIkIA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IAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQpAILIARBIGokAA8LECYAC4whAxJ/FXwBfiMAQZADayIFJAACQAJAAkAgBEUNACAELQAQQQFHDQBBqAIQIyIBQaCQAjYCACABQgA3AgQgAUEQahA7IQIgAUEONgJUIAUgATYCjAEgBSACNgKIASABIAEoAgRBAWo2AgQgBSAFKQKIATcDKCAAIAVBKGoQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgARCFBCEHAn8gAhCFBCILIAdFckUEQCABIQZBAQwBCyACIQYgASECIAchCSALCyEMIAYoAlxBAk0EQEGoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAIQNyECIAUgATYChAEgBSACNgKAASABIAEoAgRBAWo2AgQgBSAFKQKAATcDACAAIAUQSBogASABKAIEIgBBAWs2AgQgAA0BIAEgASgCACgCCBEAACABECQMAQsgAigCXCEIQagCECMiD0GgkAI2AgAgD0IANwIEIA9BEGohAQJAIAhBAk0EQCABIAYQNyEBIAUgDzYCfCAFIAE2AnggDyAPKAIEQQFqNgIEIAUgBSkCeDcDCCAAIAVBCGoQSBoMAQsgASACEDchASAFIA82AlwgBSABNgJYIA8gDygCBEEBajYCBCAFIAUpAlg3AyAgBUHgAGogBUEgahBIIRMgBUEANgJUIAVCADcCTCAFQcwAaiIBIAIoAlxBA25B5wdqQegHbkEBahCTBCABAn8gASgCBCIIIAEoAghJBEAgCCATEC5BGGoMAQsjAEEgayINJAAgASgCBCABKAIAIgprQRhtIg5BAWoiCEGr1arVAE8EQBAmAAsgDUEMakGq1arVACABKAIIIAprQRhtIgpBAXQiECAIIAggEEkbIApB1arVKk8bIA4gARBkIggoAgggExAuGiAIIAgoAghBGGo2AgggASgCACIKIAEoAgQiDiAIKAIEIA4gCmtBaG1BGGxqIg4QpQIgASgCACEKIAEgDjYCACAIIAo2AgQgASAIKAIIIg42AgQgCCAKNgIIIAEoAgghECABIAgoAgw2AgggCCAKNgIAIAggEDYCDCAIEKQCI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XAjYCACAEQgA3AgQLIAIgBDYCDCABQQA2AgAgAiACKQIINwMAIAUgAhD+AiACQRBqJAAgACADNgIEIAAgBTYCACAAIANBFGogBRCPASAHQRBqJAAL0gQBAn8jAEGQBGsiAyQAIANBhARqIAFBABArECogA0H8A2ogAkEAECsQKiADQcgAaiIBIANB6AJqIAMoAoQEIAMoAvwDQQFBABCOAyICQQIQnwIgA0GYAhAjIAEQowE2AiAgA0HgAmogA0EgahCXBCADKAIgIQEgA0EANgIgIAEEQCABEDoQIgsgA0HIAGoiARA6GiABIAJBARCfAiADQZgCECMgARCjATYCICADQUBrIANBIGoQlwQgAygCICEBIANBADYCICABBEAgARA6ECILIANByABqEDoaIAMgAygC4AI2AjggAyADKALkAiIBNgI8IAEEQCABIAEoAgRBAWo2AgQLIAMgAykCODcDECADQcgAaiADQRBqEEMgAyADKAJANgIYIAMgAygCRCIBNgIcIAEEQCABIAEoAgRBAWo2AgQLIAMgAykCGDcDCCADQSBqIgEgA0EIahBDIAAgA0HIAGoiBBCLARogAEEYaiABEIsBGiABECgaIAQQKBoCQCADKAJEIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygC5AIiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAhD8AgJAIAMoAoAEIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCiAQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0GQBGokAAtKAQd/QQQQIyIDIAI2AgBBBBAjIgQgAjYCAEHw7wEgAUGQ6wEiAUEAIQJB7SRBASEFQbsBIAMgASACQfEkaiAFQbsBaiAEEAogAAviAwICfwV8IwBBgAFrIgMkACADQfgAaiABQQAQKxAqAkAgAygCeCgCRCIEBEAgACAEEEYMAQsgAisDACIHIAeiIAIrAwgiBiAGoqAgAisDECIFIAWioCIIRAAAAAAAAAAAYQRAIAAQ6wEaDAELIANCADcDcCADQgA3A2ggA0IANwNgIANEAAAAAAAA8D8gBSAInyIIoyIFIAWiIgkgCaChOQNYIANEAAAAAAAAAAAgBSAGIAijIgaiIgkgCaChIgk5A1AgA0QAAAAAAAAAACAHIAijIgcgBaIiBSAFoKEiBTkDSCADIAk5A0AgA0QAAAAAAADwPyAGIAaiIgggCKChOQM4IANEAAAAAAAAAAAgByAGoiIGIAagoSIGOQMwIAMgBTkDKCADIAY5AyAgA0QAAAAAAADwPyAHIAeiIgUgBaChOQMYIANBCGogARCKASADQRBqIAMoAggiASADQRhqIAEoAgAoAgQRAwAgAyADKQIQNwMAIAAgAxBDIAMoAgwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsCQCADKAJ8IgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIANBgAFqJAALlQUCA38DfCMAQSBrIgUkACAFQRBqIAEQigEgBSgCECEGIwBB0ANrIgEkACACRAAAAAAAgFZAoCIIED4hCSACED4hCiACED4hAiAIED4hCCABQgA3A5ADIAFCgICAgICAgPg/NwOIAyABQgA3A5gDIAFCADcDoAMgASAIOQPIAyABIAKaOQPAAyABQgA3A7gDIAEgCjkDsAMgASAJOQOoAyADRAAAAAAAgFZAoCICED4hCCADED4hCSADED4hAyABIAIQPjkDgAMgAUIANwP4AiABIAM5A/ACIAFCADcD6AIgAUKAgICAgICA+D83A+ACIAFCADcD2AIgASAJmjkD0AIgAUIANwPIAiABIAg5A8ACIAREAAAAAACAVkCgIgIQPiEDIAQQPiEIIAQQPiEEIAIQPiECIAFCADcDoAIgASACOQOYAiABIASaOQOQAiABQgA3A4gCIAEgCDkDgAIgASADOQP4ASABQgA3A6gCIAFCADcDsAIgAUKAgICAgICA+D83A7gCIAFBCGoiByABQfgBaiABQcACahCaAiABQdAAaiAHIAFBiANqEJoCIAFCADcD8AEgAUIANwPoASABQgA3A+ABIAEg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IgArAwBkRQRAIAIhAAwCCyACIAApAwg3AwggAiAAKQMANwMAIAAiAiADRw0ACyADIQALIAAgBCkDCDcDCCAAIAQpAwA3AwAgBEEQaiIEIAFHDQALDAMLIAAgACACQQF2IgRBBHQiBmoiBSAEIAMgBBDFASAFIAEgAiAEayICIAMgBmogAhDFASAFIQIDQCABIAJGBEAgACAFRg0EA0AgAyAAKQMINwMIIAMgACkDADcDACADQRBqIQMgAEEQaiIAIAVHDQALDAQLAkAgAisDACAAKwMAZARAIAMgAikDCDcDCCADIAIpAwA3AwAgAkEQaiECDAELIAMgACkDCDcDCCADIAApAwA3AwAgAEEQaiEACyADQRBqIQMgACAFRw0ACwwBCyADIAApAwg3AwggAyAAKQMANwMADAELIAEgAkYNAANAIAMgAikDCDcDCCADIAIpAwA3AwAgA0EQaiEDIAJBEGoiAiABRw0ACwsLbAEBfyAAKAIIIgFFBEBBAA8LAkAgACABKAIAIgBGBEAgAUEANgIAA0AgASgCBCIARQ0CA0AgACIBKAIAIgANAAsMAAsACyABQQA2AgQgAEUNAANAIAAiASgCACIADQAgASgCBCIADQALCyABC6ICAQV/IwBBIGsiBSQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkCADcCACACQQhqIQEMAQsgAiAAKAIAIgRrQQN1IgZBAWoiAkGAgICAAk8NASAFQQxqQf////8BIAMgBGsiA0ECdSIEIAIgAiAESRsgA0H4////B08bIAYgABBLIgIoAgggASkCADcCACACIAIoAghBCGo2AgggAigCBCAAKAIEIAAoAgAiA2siAWshBCABBEAgBCADIAH8CgAACyAAKAIAIQMgACAENgIAIAIgAzYCBCAAIAIoAggiATYCBCACIAM2AgggACgCCCEEIAAgAigCDDYCCCACIAM2AgAgAiAENgIMIAIQmQELIAAgATYCBCAFQSBqJAAPCxAmAAtTAQF/IABBADYCCCAAQgA3AgAgAQRAIAAgARDxASAAKAIEIgMgAUECdGohASACKAIAIQIDQCADIAI2AgAgA0EEaiIDIAFHDQALIAAgATYCBAsgAAtkAQR/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oIQwgACsDICENIAArAxghDiAAKwMQIQ8gACsDCCEQA0AgAkQAAAAAAAAAACAOIAMrAwAiBKIgCyADKwMIIgWioCAIIAMrAxAiBqKgIgcgByAHoiAQIASiIA0gBaKgIAogBqKgIgcgB6IgDyAEoiAMIAWioCAJIAaioCIEIASioKCfIgWjIAcgBaMiBiAGYiIAGzkDECACRAAAAAAAAAAAIAQgBaMgABs5AwggAkQAAAAAAAAAACAGIAAbOQMAIAJBGGohAiADQRhqIgMgAUcNAAsLC5QBAQR/IAAoAgQiAyABQQF0SyADQRBLcQJAIAEgA00NACAAIAEQVSABIAAoAgQiA2siBEEATA0AIAAoAgAgA0EFdGohAwNAIAMgAikDGDcDGCADIAIpAxA3AxAgAyACKQMINwMIIAMgAikDADcDACADQSBqIQMgBEEBSyAEQQFrIQQNAAsLIAAgATYCBARAIAAQkwELC5ECAgJ/BnwjAEHQAGsiAyQAIAMgASsDADkDGCADIAErAwg5AyAgASsDECEFIANCgICAgICAgPg/NwMwIAMgBTkDKCADQThqIAIgA0EYaiIEEKEBIAMgASsDGDkDGCADIAErAyA5AyAgASsDKCEFIANCgICAgICAgPg/NwMwIAMgBTkDKCADIAIgBBChASADKwM4IQUgAysDACEGIAMrA0AhByADKwMIIQggACADKwMQIgkgAysDSCIKIAkgCmQiARs5AyggACAIIAcgByAIYyICGzkDICAAIAYgBSAFIAZjIgQbOQMYIAAgCiAJIAEbOQMQIAAgByAIIAIbOQMIIAAgBSAGIAQbOQMAIANB0ABqJAALdAECfyMAQRBrIgIkAEGgARAjIgNBgJQCNgIAIANCADcCBCACIAEoAgA2AgggAiABKAIENgIMIAFCADcCACACIAIpAgg3AwAgA0EQaiIBIAIQ/gIgACADNgIEIAAgATYCACAAIANBFGogARCPASACQRBqJAAL9AQCDn8GfCMAQYABayICJAAgASgCDCEDIAJCADcDICACQoCAgICAgID4PzcDGCACQgA3AyggAkIANwMwIAJCADcDQCACQoCAgICAgID4PzcDOCACQgA3A0ggAkIANwNQIAJCADcDYCACQoCAgICAgID4PzcDWCACQgA3A2ggAkIANwNwIAIgAUEYaiIHIAJBGGoQygECQCACKwMAIAIrAwhhBEAgACADQTD8CgAADAELIAIgASkDcDcDKCACIAEpA2g3AyAgAiABKQNgNwMYIAIgASkDcDcDECACIAEpA2g3AwggAiABKQNgNwMAIAFByABqIQggAUEwaiEJIANBGGohCgNAIAhBCEEQIAVBAUYbQQAgBRsiBGohCyAEIAdqIQwgBCAJaiENIAIgBGoiDisDACERIAJBGGogBGoiDysDACESQQAhAQNAIBECfwJAAkACQCABDgIAAQILIAwrAwAgAysDAKIhEEEAIQYgBwwCCyANKwMAIAMrAwiiIRBBCCEGIAkMAQsgCysDACADKwMQoiEQQRAhBiAICyAEaisDACAGIApqKwMAoiITIBAgECATYxugIREgEiATIBAgECATZBugIRIgAUEBaiIBQQNHDQALIA8gEjkDACAOIBE5AwAgBUEBaiIFQQNHDQALIAIrAwAhECACKwMYIREgAisDCCESIAIrAyAhEyAAIAIrAxAiFCACKwMoIhUgFCAVZCIBGzkDKCAAIBIgEyASIBNkIgMbOQMgIAAgECARIBAgEWQiBBs5AxggACAVIBQgARs5AxAgACATIBIgAxs5AwggACARIBAgBBs5AwALIAJBgAFqJAAL/AMCBX8MfCMAQfABayIDJAAgASsDGCEIIAErAyAhCSABKwMoIQogASsDMCELIAErAzghDCABKwNAIQ0gASsDSCEOIAErA1AhDyABKwNYIRAgASsDYCERIAErA2ghEiABKwNwIRMgA0KAgICAgICA+D83A3ggAyATOQNwIAMgEjkDaCADIBE5A2AgA0IANwNYIAMgEDkDUCADIA85A0ggAyAOOQNAIANCADcDOCADIA05AzAgAyAMOQMoIAMgCzkDICADQgA3AxggAyAKOQMQIAMgCTkDCCADIAg5AwAgA0GAAWoiBCACIAMQ8AEjAEHwAGsiAiQAQaABECMiBUGAlAI2AgAgBUIANwIEIAIgASgCDDYCaCACIAEoAhAiATYCbCABBEAgASABKAIEQQFqNgIECyADQeQBaiEGIAIgAikCaDcDYCACIARB4AD8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ACKAIMTg0BGgsgBSACKQMQNwMQIAUgAikDCDcDCCAFIAIpAwA3AwAgAyACIANGDQAaAkADQCAAKwMAIgcgAkEYayIEKwMAIghjRQRAIAcgCGINAiAGKAIkIAJBDGsoAgBODQILIAIgBCkDEDcDECACIAQpAwg3AwggAiAEKQMANwMAIAQiAiADRw0ACyADDAELIAILIgQgACkDEDcDECAEIAApAwg3AwggBCAAKQMANwMAIABBGGoiAiABRw0ACwwCCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDAAwBCyAAIAAgAkEBdiIFQRhsIgZqIgQgBSADIAUQywEgBCABIAIgBWsiAiADIAZqIAIQywEgBCECA0AgASACRgRAIAAgBEYNAgNAIAMgACkDEDcDECADIAApAwg3AwggAyAAKQMANwMAIANBGGohAyAAQRhqIgAgBEcNAAsMAgsCQAJAIAIrAwAiByAAKwMAIghjRQRAIAcgCGINASACKAIMIAAoAgxODQELIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAJBGGohAgwBCyADIAApAxA3AxAgAyAAKQMINwMIIAMgACkDADcDACAAQRhqIQALIANBGGohAyAAIARHDQALIAEgAkYNAANAIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGohAyACQRhqIgIgAUcNAAsLC4sBAQV/IwBBEGsiA0KAgICAEDcCBCADQQI2AgwgACgCACgCACABQQxsaiEEIAAoAgQgAUECdGoiBSgCACEBIAAoAgwhBkEAIQADQCAFIAEgBiAEIANBBGogAGooAgBBAnRqKAIAQQJ0aigCACICIAJBH3UiAnMgAmtqIgE2AgAgAEEEaiIAQQxHDQALCwIAC7cCAQV/IwBBIGsiBSQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkCCDcCCCACIAEpAgA3AgAgAkEQaiEBDAELIAIgACgCACIEa0EEdSIGQQFqIgJBgICAgAFPDQEgBUEMakH/////ACADIARrIgNBA3UiBCACIAIgBEkbIANB8P///wdPGyAGIAAQMiICKAIIIgMgASkCCDcCCCADIAEpAgA3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IAggAygCECAGaigCACICQQJ0aigCACEIIAAoAjQiAyAKQQJ0aigCAEECdCEGIAMgAkEDbSIJQQJ0aigCAEECdCEOA0AgACgCECAGaiICIAIoAgAiA0EBajYCACAAKAIQIA5qIgIgAigCACIFQQFqNgIAIAAoAgAiDyADQQR0IhBqIgIgDTYCDCACIAU2AgggAiABNgIEIAIgBDYCACAPIAVBBHQiBWoiAiAINgIMIAIgAzYCCCACIAQ2AgQgAiABNgIAIAAoAggiAyAQaiICQX82AgwgAiAKNgIIIAJBfzYCBCACIAc2AgAgAyAFaiICQX82AgwgAiAJNgIIIAJBfzYCBCACIAc2AgAgAUEBaiEBIARBAWohBCALQQFqIgsgDEcNAAsLC8cCAQV/IwBBIGsiBiQAAkACQCAAKAIEIgIgACgCCCIDSQRAIAIgASkDEDcDECACIAEpAwg3AwggAiABKQMANwMAIAJBGGohAQwBCyACIAAoAgAiBGtBGG0iBUEBaiICQavVqtUATw0BIAZBDGpBqtWq1QAgAyAEa0EYbSIDQQF0IgQgAiACIARJGyADQdWq1SpPGyAFIAAQZCICKAIIIgMgASkDEDcDECADIAEpAwg3AwggAyABKQMANwMAIAIoAgQgACgCBCAAKAIAIgRrIgFBaG1BGGxqIQUgAQRAIAUgBCAB/AoAAAsgACgCACEEIAAgBTYCACACIAQ2AgQgACADQRhqIgE2AgQgAiAENgIIIAAoAgghAyAAIAIoAgw2AgggAiAENgIAIAIgAzYCDCACEIwBCyAAIAE2AgQgBkEgaiQADwsQJgALkwEBA38gACgCGCgCACABQQN0aiICKAIEIQMgACgCCCACKAIAQQJ0aiICIAAoAhAgAUECdGooAgAiASABQR91IgFzIAFrIgEgAigCAGo2AgAgACgCACICIANBA21BAnRqIgQgBCgCACABajYCACACIAAoAhwoAhAgA0ECdGooAgBBA21BAnRqIgAgACgCACABajYCAAuTAQEDfyAAKAIYKAIAIAFBA3RqIgIoAgAhAyAAKAIIIAIoAgRBAnRqIgIgACgCECABQQJ0aigCACIBIAFBH3UiAXMgAWsiASAC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wAgFEEwakEAQTD8CwAgFCAENgIsIBQgAzYCKCAUQoCAgIAQNwIAIAEoAgQiGigCSCIfIAdBGGwiFWoiICsDACILIB8gBkEYbCIXaiIhKwMAIgyhIQ4gBUEDbSEiIBooApgBIiMgFWorAwAhDyAXICNqKwMAIRAgASgCACIbKAKYASEcIBsoAkghHUEAIQFBACEXA0ACfyAPIBwgFEEoaiAUIBdqKAIAIh5BAnRqKAIAQRhsIhVqKwMAmiIJZCAVIB1qIhgrAwAiCCALYyAIIAthGyAJIBBjIAggDGMgCCAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAmiEPIAMgHGorAwCaIRBBACEXA0ACfyAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJIBBkIAwgAyAfaiIDKwMAIghjIAggDGEbIAkgD2QgCCALZCAIIAthG2siHEUEQEQAAAAAAAD4fyEJRAAAAAAAAPh/IQpBAAwBCyAGKwMQIQogBisDCCEJAkAgCCAMoSINIAggC6EiCCANmSAImWMiFRsgDqMiCL1C////////////AINC//////////f/AFYNACAEKwMIIg0gCaEiEb1C////////////AINCgICAgICAgPj/AFoNACAEKwMQIhIgCqEiE71C////////////AINCgICAgICAgPj/AFoNACAKIBIgFRsgCCAToqAhCiAJIA0gFRsgCCARoqAhCQsgHEEAIBsoAqgBIhUgB0EYbGorAwggFSAbKAJoIAJBAnRqKAIAQQNtQRhsaisDCKBEAAAAAAAAAABkIAkgAysDCCIIYyAIIAlhGxsLIRUCQCAJvUL///////////8Ag0L/////////9/8AVg0AIBVBACAVayAYGyAZaiEZIAFBAUoEQEECIQEMAQsgAUUgFUUgFnNFckUEQEEBIQEMAQsgAUEYbCIYIBRBMGpqIhYgAykDACIlNwMAIBYgAykDEDcDECAWIAMpAwg3AwggFEHgAGogGGoiAyAJOQMIIAMgCjkDECADICU3AwAgAUEBaiEBIBVBAEchFgsgF0EEaiIXQQhHDQALAn8gGUUEQEQAAAAAAAD4fyEIRAAAAAAAAPh/IQtEAAAAAAAA+H8hCkQAAAAAAAD4fyEJQQAMAQsgFCAUQeAAaiAUQfgAaiAUQTBqIBRByABqEM4BIBQrAwghCyAUKwMAIQggGUEAIBsoAqgBIgEgB0EYbGorAxAgASAbKAJoIAJBAnRqKAIAQQNtQRhsaisDEKCaIBooAqgBIgEgIkEYbGorAxAgASAaKAJoIAVBAnRqKAIAQQNtQRhsaisDEKBjIBQrAxAiCiAUKwMYIgljIAkgCmEbGwshASAAIAk5AyAgACAKOQMYIAAgCzkDECAAIAg5AwggACABNgIAIBRBkAFqJAAL8QMBA38jAEEgayIGJAACQCAAKAIEIAJBMGxqIgcrAwAgASsDGGVFDQAgBysDCCABKwMgZUUNACAHKwMQIAErAyhlRQ0AIAcrAxggASsDAGZFDQAgBysDICABKwMIZkUNACAHK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KAIATg0DCyAAIAo2AgAgAyIAIARHDQALIAQMAgsgAiADNgIADAILIAALIAYoAgA2AgALIAIhACAGQQRqIgYgAUcNAAsMAgsgBCAAKAIANgIADAELIAAgACADQQF2IgdBAnQiBWoiBiACIAcgBCAHENMBIAYgASACIAMgB2siAyAEIAVqIAMQ0wEgAigCBCEHIAIoAgAhAiAGIQMDQCABIANGBEAgACAGRg0CA0AgBCAAKAIANgIAIARBBGohBCAAQQRqIgAgBkcNAAsMAgsCQAJAIAIoAgAiBSADKAIAIgtBA3RqIgkgBygCACIIQQJ0IgpqKAIAIgwgCiAFIAAoAgAiCkEDdGoiBWooAgAiDU4EQCAMIA1HDQEgCUEBIAhrQQJ0IghqKAIAIAUgCGooAgBODQELIAQgCzYCACADQQRqIQMMAQsgBCAKNgIAIABBBGohAAsgBEEEaiEEIAAgBkcNAAsgASADRg0AA0AgBCADKAIANgIAIARBBGohBCADQQRqIgMgAUcNAAsLC+YMAwx8EX8BfiMAQZABayIUJAAgFEHgAGpBAEEw/AsAIBRBMGpBAEEw/AsAIBQgBDYCLCAUIAM2AiggFEKAgICAEDcCACABKAIEIhooAkgiHyAHQRhsIhVqIiArAwAiCyAfIAZBGGwiF2oiISsDACIMoSEOIAVBA20hIiAaKAKYASIjIBVqKwMAIQ8gFyAjaisDACEQIAEoAgAiGygCmAEhHCAbKAJIIR1BACEBQQAhFwNAAn8gHCAUQShqIBQgF2ooAgAiHkECdGooAgBBGGwiFWorAwAiCSAPYyAVIB1qIhgrAwAiCCALYyAIIAthGyAJIBBjIAggDGMgCCAMYRtrIiRFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgISsDECEKICErAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgICsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgICsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLICRBACAaKAKoASIVICJBGGxqKwMIIBUgGigCaCAFQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAZCAYKwMIIgggCWMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgHhsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiHiAUQeAAamoiFiAYKQMAIiU3AwAgFiAYKQMQNwMQIBYgGCkDCDcDCCAUQTBqIB5qIhYgCTkDCCAWIAo5AxAgFiAlNwMAIAFBAWohASAVQQBHIRYLIBdBBGoiF0EIRw0ACyAUIAc2AiQgFCAGNgIgIBRCgICAgBA3AgAgHSAEQRhsIhVqIgQrAwAiCyAdIANBGGwiA2oiBisDACIMoSEOIAJBA20hByAVIBxqKwMAIQ8gAyAcaisDACEQQQAhFwNAAn8gECAjIBRBIGogFCAXaigCACIYQQJ0aigCAEEYbCIDaisDACIJYyAMIAMgH2oiAysDACIIYyAIIAxhGyAJIA9kIAggC2QgCCALYRtrIhxFBEBEAAAAAAAA+H8hCUQAAAAAAAD4fyEKQQAMAQsgBisDECEKIAYrAwghCQJAIAggDKEiDSAIIAuhIgggDZkgCJljIhUbIA6jIgi9Qv///////////wCDQv/////////3/wBWDQAgBCsDCCINIAmhIhG9Qv///////////wCDQoCAgICAgID4/wBaDQAgBCsDECISIAqhIhO9Qv///////////wCDQoCAgICAgID4/wBaDQAgCiASIBUbIAggE6KgIQogCSANIBUbIAggEaKgIQkLIBxBACAbKAKoASIVIAdBGGxqKwMIIBUgGygCaCACQQJ0aigCAEEDbUEYbGorAwigRAAAAAAAAAAAYyAJIAMrAwgiCGMgCCAJYRsbCyEVAkAgCb1C////////////AINC//////////f/AFYNACAVQQAgFWsgGBsgGWohGSABQQFKBEBBAiEBDAELIAFFIBVFIBZzRXJFBEBBASEBDAELIAFBGGwiGCAUQTBqaiIWIAMpAwAiJTcDACAWIAMpAxA3AxAgFiADKQMIN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AgFWooAgAhCyAIKAIAIg4oAgQhACACQQI2AogCIAJCgICAgBA3AoACIAAoAlgiDyAKQQF1IhAgCmoiEUECdGohEiAAKAJoIRNBACEBA0BBASEMAkAgDyACQYACaiABaigCACIHIBFqIg1BAnQiBGooAgAiACASQQRBCCAHQQFGG0EAIAcbQYzpAGooAgBBAnRqKAIAIgNIBEAgACEEIAMhAAwBCyAEIBNqKAIAIQ1BACEMIAMhBAsgAkGQAmoiFCAHQQR0aiIDIAw6AAwgAyAANgIIIAMgBDYCBCADIA02AgAgAUEEaiIBQQxHDQALIAJBgAJqIA4gCyAQIBQQigMgAikDiAJC////////////AINC//////////f/AFYNACAIKAIIKAIAIAtBAnRqIgAgACgCACACKAKAAmo2AgALIApBgYCAgHhxQQFGCyEHAkAgGSAWIAVBMGxqIgArAxhlRQ0AIBkgACsDAGZFDQAgGCAAKwMgZUUNACAYIAArAwhmRQ0AAkAgBUEBcQ0AIAgoAgQoAgAgFWooAgAhCyAIKAIAIg4oAgQhACACQQI2AogCIAJCgICAgBA3AoACIAAoAlgiDyAFQQF1IhAgBWoiEUECdGohEiAAKAJoIRNBACEBA0BBASEMAkAgDyACQYACaiABaigCACIGIBFqIg1BAnQiBGooAgAiACASQQRBCCAGQQFGG0EAIAYbQYzpAGooAgBBAnRqKAIAIgNIBEAgACEEIAMhAAwBCyAEIBNqKAIAIQ1BACEMIAMhBAsgAkGQAmoiFCAGQQR0aiIDIAw6AAwgAyAANgIIIAMgBDYCBCADIA02AgAgAUEEaiIBQQxHDQALIAJBgAJqIA4gCyAQIBQQigMgAikDiAJC////////////AINC//////////f/AFYNACAIKAIIKAIAIAtBAnRqIgAgACgCACACKAKAAmo2AgALIAVBgYCAgHhxQQFGIQYLAkAgBiAHckUEQCAJQQBIDQEgAiAJQQJ0aigCACEAIAlBAWshCQwCCyAKIAUgBxshACAHRSAGRXINASACIAlBAWoiCUECdGogBTYCAAwBCwsgAkHAAmokAAtUAQF/IAAgAUcEQCAAKAIAIgIEQCAC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BUF/NgIQIAUgAzYCDCAFIAA2AgQgBUEBNgI0IAAgBUEEaiABQQEgACgCACgCHBEFACAFKAIcIgBBAUYEQCACIAUoAhRBACABGzYCAAsgAEEBRiEECyAFQUBrJAAgBAtyAQJ/IAAoAgQgASgCCCgCBEYEQCABIAIgAxCtAg8LIAAoAgwhBCAAQRBqIgUgASACIAMQoAMCQCAEQQJJDQAgBSAEQQN0aiEEIABBGGohAANAIAAgASACIAMQoAMgAS0ANg0BIABBCGoiACAESQ0ACwsLNQAgACgCBCABKAIIKAIERgRAIAEgAiADEK0CDwsgACgCCCIAIAEgAiADIAAoAgAoAhwRBQALHAAgACgCBCABKAIIKAIERgRAIAEgAiADEK0CCwvEAQECfyMAQdAAayIDJAACQAJ/QQEgACgCBCABKAIERg0AGkEAIAFBlOcBEGIiAUUNABogAigCACIERQ0BIANBGGpBAEE4/AsAIANBAToASyADQX82AiAgAyAANgIcIAMgATYCFCADQQE2AkQgASADQRRqIARBASABKAIAKAIcEQUAIAMoAiwiAEEBRgRAIAIgAygCJDYCAAsgAEEBRgsgA0HQAGokAA8LIANByBk2AgggA0HnAzYCBCADQccONgIAEK4CAAsFAEHkDQsrAQF/IwBBQGoiAiQAIAIgASAAEQEAQcAAECMgAhBAIAIQQRogAkFAayQACwUAQZsQCy0BAX8jAEFAaiIDJAAgAyABIAIgABEWAEHAABAjIAMQQCADEEEaIANBQGskAAsEAEEAC0gBAX8jAEHQAGsiAyQAIAMgASkDADcDACADIAEpAwg3AwggA0EQaiIBIAMgAiAAEQMAQcAAECMgARBAIAEQQRogA0HQAGokAAsEAEEAC1UBAn8jAEFAaiICJAAgASAAKAIEIgNBAXVqIQEgACgCACEAIAIgASADQQFxBH8gASgCACAAaigCAAUgAAsRAQBBwAAQIyACEEAgAhBBGiACQUBrJAALdQECfyMAQSBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBAEEgECMiACACKQMYNwMYIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAIAJBIGokACAAC7oBAQN/IwBBEGsiAyQAIAAoAgAhAiADIAEgACgCBCIAQQF1aiIBIABBAXEEfyABKAIAIAJqKAIABSACCxEBAEEMECMiAEEANgIIIABCADcCACADKAIEIgIhBCACIAMoAgAiAWtBBnUiAgRAIAAgAhCVAyAAKAIEIQIgASAERwRAA0AgAiABEEBBQGshAiABQUBrIgEgBEcNAAsLIAAgAjYCBAsgAyADNgIMIANBDGoQmAMgA0EQaiQAIAALVwECfyMAQUBqIgMkACABIAAoAgQiBEEBdWohASAAKAIAIQAgAyABIAIgBEEBcQR/IAEoAgAgAGooAgAFIAALEQsAQcAAECMgAxBAIAMQQRogA0FAayQACwsAIAAQaRogABAiC3MBAn8jAEHQAGsiAyQAIAEgACgCBCIEQQF1aiEBIAAoAgAhACAEQQFxBEAgASgCACAAaigCACEACyADIAIpAwg3AwggAyACKQMANwMAIANBEGoiAiABIAMgABEDAEHAABAjIAIQQCACEEEaIANB0ABqJAALJAECfiAAKQMAIAEpAwBTIAApAwgiAiABKQMIIgNVIAIgA1EbCwYAQYCcAgsUACAAQQRqQQAgASgCBEGhmAFGGwtPAQJ/AkAgASgCBCICBEAgASgCACIBIAJBBHRqIQMDQCAAKAIEKAIQIgJFDQIgAiABIAIoAgAoAhgRAQAgAUEQaiIBIANHDQALCw8LEGYACxUAIAFByJsCNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQcibAjYCACABIAAoAgQ2AgQgAQsQACAAKAIMIAAoAghrQQJ1CwoAIABBCGoQhAILZwEDfyAAKAIEIgMgACgCCCIBRwRAA0AgACABQQRrIgE2AgggASgCACECIAFBADYCACACBEAgAiACKAIAKAIEEQAAIAAoAgghAQsgASADRw0ACwsgACgCACIBBEAgACgCDBogARAiCwviBAMGfwF8AX4jAEEgayIGJAACf0EwECMhAyMAQSBrIgIkACADQQA2AiggA0IANwMgIANBADYCECADQgA3AwggAyAANgIEIANBmJsCNgIAAkACQCAARQRAIANCgICAgICAgPg/NwMYIAJBADYCDCACQgA3AgREAAAAAAAA8D8hCAwBCyADIAArAxgiCDkDGCACQQA2AgwgAkIANwIEIAhEAAAAAAAAAABhDQELIAJBBGogASgCBCABKAIAa0EEdRBcIAEoAgAiBCABKAIEIgFHBEADQCAEKQMAIQkgAiAIIAQpAwi5ojkDGCACIAggCbmiOQMQIAJBBGogAkEQahBMIARBEGoiBCABRw0ACwsgA0EgahBFIAMgAigCBDYCICADIAIoAgg2AiQgAyACKAIMNgIoIAJBIGokACADDAELQQIQggIACyEDAkACQCAAKAIMIgEgACgCECICSQRAIAEgAzYCACABQQRqIQMMAQsgASAAQQhqIgQoAgAiBWtBAnUiB0EBaiIBQYCAgIAETw0BIAZBDGpB/////wMgAiAFayICQQF1IgUgASABIAVJGyACQfz///8HTxsgByAEEEoiASgCCCICIAM2AgAgASACQQRqNgIIIAEoAgQgACgCDCAAKAIIIgJrIgNrIQQgAwRAIAQgAiAD/AoAAAsgACgCCCECIAAgBDYCCCABIAI2AgQgACABKAIIIgM2AgwgASACNgIIIAAoAhAhBCAAIAEoAgw2AhAgASACNgIAIAEgBDYCDCABEMwFCyAAIAM2AgwgA0EEaygCACAGQSBqJAAPCxAmAAsJACAAEIMCECILcQEDfyMAQeAAayIDJAAgA0EANgIUIANCADcCDCADQQxqIgQgASgCACIFIAEoAgQiASABIAVrQQxtEEcgA0EYaiIBIAQgAiAAEQMAQcAAECMgARC0ASABEEEaIAMgBDYCXCADQdwAahApIANB4ABqJAALFQAgACgCBCAAQQRqIAAsAA9BAEgbCycAIABB6JoCNgIAIAAsAA9BAEgEQCAAKAIMGiAAKAIEECILIAAQIgslACAAQeiaAjYCACAALAAPQQBIBEAgACgCDBogACgCBBAiCyAACyUBAX8jAEEQayIBJAAgASAAQQxqNgIMIAFBDGoQKSABQRBqJAALDwAgAEG0mgI2AgAgABAiCw0AIABBtJoCNgIAIAALDQAgAARAIAAQQRAiCwuvAQICfwR8IwBBMGsiAiQAIAJBCGogARBN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AIgpBAnRqKAIAQQNtQRhsaisDEEQAAAAAAAAAAGZFDQAgByAKQQNtQRhsaisDEEQAAAAAAAAAAGNFDQAgCSANaiIFQXhBBCACQQNvQQJGG2ooAgAhDyAFKAIAIRAgDiAEQQR0aiIFIAkgDGooAgA2AgwgBSAKNgIIIAUgDzYCBCAFIBA2AgAgBEEBaiEECyACQQFqIgIgC0cNAAsLIAFCADcDmAEgAUIANwOQASABQgA3AzAgAUIANwM4IAFBoAFqIAQgAUEwahCVAiABQfgAaiICIAEoAqABIgQgBCABKAKkAUEEdGpBABD0AiABQgA3A0ggAUKAgICAgICA+D83A0AgAUIANwNQIAFCADcDYCABQoCAgICAgID4PzcDWCABQgA3A2ggASABKQKgATcCcCABIAFBQGtBMPwKAAAgAUGEAWogAiABQfAAaiIEIANByABqIAEQxwQgASACNgJwIAQQKSAAQQA2AgggAEIANwIAIAEoAoQBIgMgASgCiAEiBEcEQANAIAFBADYCgAEgAUIANwJ4IAMoAgAiAiADKAIEIgVHBEADQCABQfgAaiACEEwgAkEYaiICIAVHDQALCyAAIAFB+ABqEHYgASgCeCICBEAgASACNgJ8IAEoAoABGiACECILIANBDGoiAyAERw0ACwsgASABQYQBajYCeCABQfgAahApIAEoAqABIgAEQCAAECILIAFBsAFqJAACQCAGKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIAZBEGokAAuODgMPfwl8An4jAEEQayILJAAgC0EIaiABQQAQKxAqIAsoAgghBiMAQcACayIBJAAgASAGKQMINwM4IAEgBikDADcDMCABIAYpAyA3AxAgASAGKQMYNwMIIAFBADYCKCABQgA3AiAgAUEgakGAARCfASABIAEoAiQiA0EBajYCJCABKQMwIRsgASkDOCEcIAEoAiAgA0EwbGoiAyACOQMQIAMgHDcDCCADIBs3AwAgAyABKQMQNwMgIAMgASkDCDcDGCADIAI5AyggAUIANwMQIAFCADcDCCABQYCAgPwDNgIYAkACQCAGKAKMAkUNACABKAIkIg9FDQAgAS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QsgACADKAIQIAFBASADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC5UCAQF/IwBBIGsiAyQAIANBGGogAUEQahB/IANBEGogASADKAIYECsQKgJAIAMoAhAoAkQiAQRAIAAgARBGDAELIANBCGogAiADKAIYECsQKgJAIAMoAggiASgCRCICBEAgACACEEYMAQsgACADKAIQIAFBACADKAIYEJQECyADKAIMIgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLAkAgAygCFCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAMoAhwiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgA0EgaiQAC3EBA38jAEGQAWsiBCQAIARByABqIgUgARDkAiAEQRhqIgYgBUEw/AoAACAEIAIpAxA3AxAgBCACKQMINwMIIAQgAikDADcDACAEQfgAaiICIAYgBCADEJYEIAAgASACQQIQ6AEgAhAoGiAEQZABaiQAC8oDAgN/AX4jAEHQAGsiAyQAIANBxABqIAFBEGoQfyADQTxqIAEgAygCRBArECoCQCADKAI8IgQoAkQiAQRAIAAgARBGDAELQagCECMiAUGgkAI2AgAgAUIANwIEIAFBEGogBBA3IQQgAyABNgI4IAMgBDYCNAJAIAEoAswBRQ0AIAMgApk5AyAgA0GslwI2AhggAyADQRhqIgU2AiggBCAFQQEgAygCRBDRAiAFIAMoAigiAUYEf0EQBSABRQ0BQRQLIQQgASABKAIAIARqKAIAEQAACyADQQhqIANBNGoQWSADIAMpAggiBjcCECADQgA3AgggAyAGNwMAIAAgAxBDAkAgAygCDCIARQ0AIAAgACgCBCIBQQFrN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EGIwBBwAZrIgEkAAJAIAgoAlxBAk0EQCAAQQA2AgggAEIANwIADAELIAYrAwAhEiACKwMIIRUgBisDCCETIAIrAxAhFiABIAIrAxgiFCAGKwMQIhehIhE5A9gDIAEgFiAToSIYOQPQAyABIBUgEqEiGTkDyAMgGSAZoiAYIBiioCARIBGioEQAAAAAAAAAAGEEQCAAQQA2AgggAEIANwIADAELIAFBsAFqEDshAyABQgA3A6gBIAFCADcDoAEgAUIANwOYASABQgA3AzggAUIANwNAIAFCADcDSCADQcgAakECIAFBOGoQZyADKAJIIgUgBikDEDcDECAFIAYpAwg3AwggBSAGKQMANwMAIAMoAkgiBSACKQMQNwMgIAUgAikDGDcDKCAFIAIpAwg3AxggAUIANwOAASABQgA3A5ABIAFCADcDiAEgAUIANwMoIAFCADcDMCABIAEpA4ABNwMgIANBmAFqQQIgAUEgahBnIAMoApgBQQBBMPwLACADQdgAaiIFQQNBfxAxIAVBEGpBA0F/EDEgBUEgakEDQX8QMSADKAJYIgVBADYCACADKAJoIgRBATYCACADKAJ4IglBADYCACAFQQE2AgQgBEEANgIEIAlBADYCBCAFQX82AgggBEF/NgIIIAlBADYCCCABQgA3A3ggAUIANwNwIAFCADcDaCABQgA3AwggAUIANwMQIAFCADcDGCADQagBakEBIAFBCGoQZyADKAKoASIFQgA3AxAgBUIANwMIIAVCADcDACABIAg2AmQgASADNgJgIAEgCDYCXCABIAM2AlggASAINgJUIAEgAzYCUCAAQQA2AgggAEIANwIAAkAgCCgCjAJFDQAgEiAVIBIgFWMiBRsiGiAVIBIgBRsiEiASIBpkIgUbIhVEAAAAAAAA8H9hDQAgFCAXIBQgF2QiBBsiGyAXIBQgBBsiFCAUIBtjIgQbIRcgFiATIBMgFmMiCRsiHCATIBYgCRsiEyATIBxjIgkbIRYgEiAaIAUbIRIgFCAbIAQbIRQgEyAcIAkbIRMgCCgCiAIhECAIKALoASEMQQhBECAYmSIYIBGZIhFkG0EAIBggGZkiGWNFIBEgGWNFchsiBSABQagGamohD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BBnVnQQF0QT5zQQEQ/AQLIAMQOhoLIAFBwAZqJAACQCACKAI8IgBFDQAgACAAKAIEIgFBAWs2AgQgAQ0AIAAgACgCACgCCBEAACAAECQLIAJBQGskACAHQTBqJAALsQMBBH8jAEGAAWsiBCQAIAQgAikDADcDCCAEIAIpAwg3AxAgBCACKQMQNwMYIARB0ABqIQYjAEGwAWsiAiQAIAJBqAFqIAFBABArECoCQCACKAKoASgCRCIFBEAgAkGQAWoiASAFEEYgBiABEC4aIAZBGGogARAuGiABECgaDAELIAEQwAEEQCACQZABaiIBEOsBGiACQfgAaiIFEOsBGiAGIAEQiwEaIAZBGGogBRCLARogBRAoGiABECgaDAELIAJByABqIgUgARDkAiACQRhqIgcgBUEw/AoAACACIAQpAxg3AxAgAiAEKQMQNwMIIAIgBCkDCDcDACACQZABaiIFIAcgAiADEJYEIAYgASAFEJgEIAUQKBoLAkAgAigCrAEiAUUNACABIAEoAgQiBUEBazYCBCAFDQAgASABKAIAKAIIEQAAIAEQJAsgAkGwAWokACAEQSBqIAYQLiIBQRhqIARB6ABqIgYQLhogAEEANgIIIABCADcCACAAIAEgAUEwaiICQQIQlgIDQCACQRhrECgiAiABRw0ACyAGECgaIARB0ABqECgaIARBgAFqJAALDwAgAEH4lAI2AgAgABAiCw0AIABB+JQCNgIAIAALKAEBfyAAKAIAIgAoAggiAUUEQEQAAAAAAADwPw8LIAAoAgy3IAG3owsXACAAKAIAIgAEfyAALQAQBUEAC0EBcQsMACAAKAIAQQE6ABALdgECfyMAQeAAayIDJAAgA0EwaiIEIAEgAhCYBCADIAQQLiIBQRhqIANByABqIgQQLhogAEEANgIIIABCADcCACAAIAEgAUEwaiICQQIQlgIDQCACQRhrECgiAiABRw0ACyAEECgaIANBMGoQKBogA0HgAGokAAu1AQEDfyAAIwBBEGsiACQAIAAgAUEQahB/IABBCGogASAAKAIAECsQKiAAKAIIKAJEAkAgACgCDCIBRQ0AIAEgASgCBCICQQFrNgIEIAINACABIAEoAgAoAggRAAA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EgASgCACAJaigCABEAAAsgAyACNgJEIAMgCjYCQCACIAIoAgRBAWo2AgQgAyADKQJANwMIIAAgA0EIahDmAiACIAIoAgQiAEEBazYCBCAARQRAIAIgAigCACgCCBEAACACECQLIANB4ABqJAACQCAMIAcoAkgiAEYEf0EQBSAARQ0BQRQLIQEgACAAKAIAIAFqKAIAEQAACyAHQdAAaiQAC1YBAn8jAEEQayICJAAjAEEQayIBJAAgASAAQRBqIgBBhAFqNgIIIAFBCGoQZSABIABB+ABqNgIMIAFBDGoQZSAAQfAAahAvGiABQRBqJAAgAkEQaiQACw8AIABBiJMCNgIAIAAQIgsNACAAQYiTAjYCACAACwQAQQELkgIBBH8jAEEQayIBJABBASEDAkAgACgCgAENAEEAIQMgAUEANgIMIAFCADcCBCABIAA2AgAgAUEEaiABED0gASgCBCICIAEoAggiAEcEQANAIABBBGsiACgCACEEIAEgADYCCAJAIAQoAoABBEAgA0EBaiEDDAELIAQoAhQaIAQoAgwiAigCACIAIAIoAgQiAkcEQANAAkAgACgCACIEIAQoAgAoAggRBABBA0YEQCADQQFqIQMMAQsgASAAKAIANgIAIAFBBGogARA9CyAAQQhqIgAgAkcNAAsLIAEoAgghACABKAIEIQILIAAgAkcNAAsLIAJFDQAgASACNgIIIAEoAgwaIAIQIgsgAUEQaiQAIAMLJQEBf0EDIQEgAC0AHCIAQQJNBH8gAEECdEGM+ABqKAIABSABCwvFIgMVfwF+DHwjAEGgAmsiBCQAIAEoAhQaAkACQAJAIAEoAoABIgUEQCAAIAU2AgAgACABKAKEASIANgIEIAAEQCAAIAAoAgRBAWo2AgQLDAELIARBADYC+AEgBEIANwLwASAEQQA6AOABIARBADYCgAIgBEEANgLoASAEIARBjAJqIAFBBGoQmwIiBygCADYCgAEgBCAHKAIEIgU2AoQBIAUEQCAFIAUoAgRBAWo2AgQLQaABECMiBUGIkwI2AgAgBUIANwIEIAQoAoQBIQMgBC0A4AEhBiABLQAcIQ0gBEEANgKEASAEKAKAASEIIARBADYCgAEgB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AEQfABajYCACAEEGULIARBoAJqJAAPCxAmAAsQJgALwwQCBH8MfCMAQfABayIDJABBmAEQIyIGQbCTAjYCACAGQgA3AgQjAEEQayIFJAAgBkEQaiIEQgA3AgQgBEG0kgI2AgAgBUEANgIIIAVCADcCACAEQQxqIAUQ0wQgBSAFNgIMIAVBDGoQZSAEQgA3AyggBEKAgICAgICA+D83AyAgBEIANwMwIARCADcDOCAEQgA3A0ggBEKAgICAgICA+D83A0AgBEIANwNQIARCADcDWCAEQgA3A2ggBEKAgICAgICA+D83A2AgBEIANwNwIARCADcDeCAEQgA3A4ABIAVBEGokACADQegBaiIFIAY2AgQgBSAENgIAIAUgBkEUaiAEEI8BIAMoAugBQQxqIgQgAUEMaiIFRwRAIAQgBRBeIARBCGogBUEIahBeCyABKwMgIQcgASsDKCEIIAErAzAhCSABKwM4IQogASsDQCELIAErA0ghDCABKwNQIQ0gASsDWCEOIAErA2AhDyABKwNoIRAgASsDcCERIAErA3ghEiADQoCAgICAgID4PzcDgAEgAyASOQN4IAMgETkDcCADIBA5A2ggA0IANwNgIAMgDzkDWCADIA45A1AgAyANOQNIIANCADcDQCADIAw5AzggAyALOQMwIAMgCjkDKCADQgA3AyAgAyAJOQMYIAMgCDkDECADIAc5AwggA0GIAWoiBCACIANBCGoQ8AEgAygC6AEiAkEgaiAEQeAA/AoAACACIAEtABw6ABwgACACNgIAIAAgAygC7AE2AgQgA0HwAWokAAtnAQJ/IwBBgAFrIgQkACAEIAIQ3wEjAEEQayICJAAgASgCACIFQgA3AgAgBUIONwIIIAJBCGogBCADIAEoAgAQkwUgAiACKQIINwMAIAAgAhDmAiACQRBqJAAgBBCqASAEQYABaiQAC44BAQJ/IwBBgAFrIgQkACAEIAIQ3wEjAEEQayICJAAgASgCACIDQgA3AgAgA0IHNwIIIAEoAgAhA0GoAhAjIgFBoJACNgIAIAFCADcCBCABQRBqIAQgAxCTAyEDIAIgATYCDCACIAM2AgggAiACKQIINwMAIAAgAhDmAiACQRBqJAAgB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2AgwgAUGklQI2AgggASABQQhqIgU2AhggBCAFELsEAkAgBSABKAIYIgRGBH9BEAUgBEUNAUEUCyEFIAQgBCgCACAFaigCABEAAAsgAUEgaiQAAkAgBiAGKAIQIgFHBEBBFCEIIAFFDQELIAEgASgCACAIaigCABEAAAsgAkEQaiACQTxqEFkgAiACKQIQIgk3AhggAkIANwIQIAIgCTcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAigCQCIARQ0AIAAgACgCBCIBQQFrNgIEIAENACAAIAAoAgAoAggRAAAgABAkCwJAIAIoAkgiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkHQAGokAAJAIAcgAygCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIANBIGokAAsGAEGIkgILFAAgAEEEakEAIAEoAgRB5PAARhsLCwAgAUHYkQI2AgALEQBBCBAjIgBB2JECNgIAIAALBgBByJECCxQAIABBBGpBACABKAIEQfvrAEYbCwsAIAFBkJECNgIACxEAQQgQIyIAQZCRAjYCACAAC5sDAgl/AXwjAEGQAWsiAyQAIANBhAFqIAIQlgUgA0EgakEAQeAA/AsAIANCgoCAgDA3AhggA0KAgICAEDcCECADQThqIQggAygChAEhCQNAIANBEGogBmooAgAhBCADQoCAgIAQNwIEIAkgBEEFdGohCiADQQI2AgwgA0EgakEwQcgAIARBAkYbaiELQQAhAgNAIAogA0EEaiACaigCACIHQQN0aisDACEMIANBIGohBQJAAkACQCAEDgICAAELIAghBQwBCyALIQULIAVBCEEQIAdBAUYbQQAgBxtqIAw5AwAgAkEEaiICQQxHDQALIAZBBGoiBkEQRw0ACyMAQSBrIgIkACACQRBqIAEQigEgAkEYaiACKAIQIgEgA0EgaiABKAIAKAIEEQMAIAIgAikCGDcDCCAAIAJBCGoQQwJAIAIoAhQiAEUNACAAIAAoAgQiAUEBazYCBCABDQAgACAAKAIAKAIIEQAAIAAQJAsgAkEgaiQAIAMoAoQBIgAEQCADIAA2AogBIAMoAowBGiAAECILIANBkAFqJAALCwAgACABQQIQiAELCwAgACABQQEQiAELCwAgACABQQAQiAELDQAgACABIAJBAhDoAQsNACAAIAEgAkEBEOgBCw0AIAAgASACQQAQ6AELBgBBgJECCxQAIABBBGpBACABKAIEQefoAEYbC/0BAQN/IwBBgAFrIgMkACADIAEQ3wEjAEEgayIBJABBJBAjIgJCADcCDCACQYSWAjYCACACQgA3AgQgAkIANwIUIAJCADcCHCAAIAI2AgQgACACQQxqNgIAQagCECMiAkGgkAI2AgAgAkIANwIEIAJBEGogA0EAEJMDIQQgASACNgIQIAEgBDYCDCABQRRqIAFBDGoQ3AQgACABKAIUNgIIIAAgASgCGDYCDCABQgA3AhQCQCABKAIQIgJFDQAgAiACKAIEIgRBAWs2AgQgBA0AIAIgAigCACgCCBEAACACECQLIABCADcCECABQSBqJAAgAxCqASADQYABaiQACxUAIAFByJACNgIAIAEgACgCBDYCBAsdAQF/QQgQIyIBQciQAjYCACABIAAoAgQ2AgQgAQsPACAAQaCQAjYCACAAECILDQAgAEGgkAI2AgAgAAvwEAITfwJ+IwBB0AFrIgMkACADQcgBaiICIAFBABArECoCQCADKALIASgCRCIEBEAgA0GwAWoiASAEEEYgAEEANgIIIABCADcCACAAIAEgAkEBEJYCIAEQKBoMAQsgA0GkAWogARCQAiICEJYBIQ0gAgRAIAKtIRYDQCANKAIAIBWnQQN0aiAVNwMAIBVCAXwiFSAWUg0ACwsgAygCyAEiBCgCXARAQQAhAgNAIAQoAlggAkECdGoiBSgCACIGIAVBeEEEIAJBA29BAkYbaigCACIFSARAIA0gBiAFEF8gAygCyAEhBAsgAkEBaiICIAQoAlxJDQALCyADQQA2AqABIANCADcCmAECQCANIANBmAFqEIwFIhNBAUYEQCAAQQEQkQMoAgAgARCjBAwBCwJAIAMoApwBIgQgAygCmAEiAkYNACAEIAJrIgQQJyEOIARFDQAgDiACIAT8CgAACyABEJ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DACABIAEoAiRBEGo2AiQgASgCICAHKAI8IAcoAjgiCWsiA2shDyADBEAgDyAJIAP8CgAACyAHKAI4IQkgByAPNgI4IAEgCTYCICAHIAEoAiQiAzYCPCABIAk2AiQgBygCQCEPIAcgASgCKDYCQCABIA82AiggESAJNgIAIBEQNgsgByADNgI8IAYgC0cNAAsgDSgCACEGCyABQQhqIAsgBhCtAwJAIAcoAkAiBiADSwRAIAMgASkDEDcDCCADIAEpAwg3AwAgA0EQaiEGDAELIAMgCCgCACIJa0EEdSILQQFqIgNBgICAgAFPDQsgAUEcakH/////ACAGIAlrIgZBA3UiCSADIAMgCUkbIAZB8P///wdPGyALIAgQMiIDKAIIIgYgASkDEDcDCCAGIAEpAwg3AwAgAyADKAIIQRBqNgIIIAMoAgQgBygCPCAHKAI4IghrIgZrIQkgBgRAIAkgCCAG/AoAAAsgBygCOCEIIAcgCTYCOCADIAg2AgQgByADKAIIIgY2AjwgAyAINgIIIAcoAkAhCSAHIAMoAgw2AkAgAyAINgIAIAMgCTYCDCADEDYLIAcgBjYCPAsgAUEwaiQADAALAkACQAJAIAcoAmgOAgABAgsgByAKIA0QswIMAgsjAEEwayIIJAAgByAKIA0QswICQCAIQQxqIA0QPCIJKAIAIgEgCSgCBCIDRg0AIAEgA0EQayIDTw0AA0AgCCABKQMINwMgIAggASkDADcDGCABIAMpAwg3AwggASADKQMANwMAIAMgCCkDIDcDCCADIAgpAxg3AwAgAUEQaiIBIANBEGsiA0kNAAsLAkAgBygCOCIBIAcoAjwiBkYNACABIAZBEGsiA08NAANAIAggASkDCDcDICAIIAEpAwA3AxggASADKQMINwMIIAEgAykDADcDACADIAgpAyA3AwggAyAIKQMYNwMAIAFBEGoiASADQRBrIgNJDQALIAcoAjwhBiAHKAI4IQELIAdBOGohEQJAAkAgBygCQCILIAZLBEAgBiABKQMINwMIIAYgASkDADcDACAGQRBqIQYMAQsgBiABa0EEdSIGQQFqIgNBgICAgAFPDQsgCEEYakH/////ACALIAFrIgtBA3Ui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gBhC0AiABIgZBAWoiASADRw0ACwsgBygCOCEIIAMEQCADIQEDQCAIIAFBAWsiBkEEdGoiDysDACECIAggAUEEdGoiASAPKwMImjkDCCABIAKaOQMAIAYiAQ0ACwsgCCAIIANBBHRqIgEpAwg3AwggCCABKQMANwMAAkAgBygCmAFFBEAgBysDECECDAELIAcgCyANIAdBOGogAyADEPsBIgI5AxALAkAgAplEEeotgZmXcT1lBEAgDSgCACADQQR0aiEGAkAgBygCSCIBIAcoAkwiCEkEQCABIAYpAwg3AwggASAGKQMANwMAIAFBEGohBgwBCyABIAdBxABqIgsoAgAiD2tBBHUiFEEBaiIBQYCAgIABTw0MIAlBDGpB/////wAgCCAPayIIQQN1Ig8gASABIA9JGyAIQfD///8HTxsgFCALEDIiASgCCCIIIAYpAwg3AwggCCAGKQMANwMAIAEgASgCCEEQajYCCCABKAIEIAcoAkggBygCRCIIayIGayELIAYEQCALIAggBvwKAAALIAcoAkQhCCAHIAs2AkQgASAINgIEIAcgASgCCCIGNgJIIAEgCDYCCCAHKAJMIQsgByABKAIMNgJMIAEgCDYCACABIAs2AgwgARA2CyAHIAY2AkgMAQsCQAJAAkAgBygCaEECaw4DAAIBAgsgByANIAMgAxC3AgwCCyAHIA0gAyADRBgtRFT7IQlAELUCDAELIAcgDSADIAMQtgILIBFBAmsiAQRAA0AgByAKIA0gASADELQCIAEiA0EBayIBDQALCyAHKAJQIAdBxABqEHYgCUEgaiQADAALCyANQQxqIg0gCigCBEcNAAsLIA5BMGokACAHKAIABEAgBygCUCIBIAEoAgAQewsgCkEgaiIKIAcoAlxHDQALCyAHKAJQIgEoAgQgASgCAEYNAAJ/QQAgBygCWCIKIAcoAlwiA0YNABoCQANAIAooAhxFDQEgCkEgaiIKIANHDQALQQAMAQsgCi0AFAshAyAMQQA7ARggDEIANwMQIAxBAjYCDCAMQgA3AgQgDEEcakEAQTD8CwAgDEHQAGpBAEEk/AsAIAxBADYCiAEgDEIANwOAASAMQYACOwF8IAxBADYCeCAMQaic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pBAEEk/AsAIAJBADYCyAEgAkIANwPAASACQQE6AL0BIAJBAToAtAEgAkKAgICAgICAoD43A9gBIAJCgICAgICAgNDBADcD0AEgAkH8mgI2AkAgAkFAayIBIAJBKGoiBxCbASACQQA2AugBIAJCADcC4AEgAUECQQIgAkEMaiIEIAJB4AFqIgMQ4gEgAiADNgLsASACQewBahApIAEQaRpBGBAjIgNBtJoCNgIAIANCADcCBCADQQxqIgggBBBbIAIgAzYCHCACIAg2AhggAiACKQIYNwMAIAAgAhBqIAIgBDYCQCABECkgAiAHNgJAIAEQKSACKAI0IgAEQCACIAA2AjggAigCPBogABAiCyACQfABaiQADAELEGYACwJAIAkgBigCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAZBIGokAAJAIAogBSgCGCIARgR/QRAFIABFDQFBFAshASAAIAAoAgAgAWooAgARAAALIAVBIGokAAsMACABIAAoAgQREAALFQAgAUGMjwI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBjI8CNgIAIAEgACgCBDYCBCABCwYAQeyOAgsUACAAQQRqQQAgASgCBEGL5QBGGwtRAQF/IwBBIGsiBCQAIAMoAgAhAyABKAIAIAAoAgQhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQQhqIAMgABEDACAEQSBqJAALFQAgAUG0jgI2AgAgASAAKAIENgIECx0BAX9BCBAjIgFBtI4CNgIAIAEgACgCBDYCBCABCwYAQaSOAgsUACAAQQRqQQAgASgCBEHj4wBGGwuCAgEGfyMAQRBrIgIkACABKAIAIQcgASgCBCEEQQAhASACQQA2AgwgAkIANwIEIAJBBGogBEEDbBDUASACKAIEIQUgBARAA0AgBSABQRhsIgZqIgMgBiAHaiIGKwMAOQMAIAMgBisDCDkDCCADIAYrAxA5AxAgAUEBaiIBIARHDQALCyAFIAQgACgCBCgCABEBACACKAIEIQACQAJAIAQEQEEAIQEDQCAHIAFBGGwiA2oiBSAAIANqIgMrAwA5AwAgBSADKwMIOQMIIAUgAysDE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ALNgECfyMAQSBrIgQkACAEQQhqIgUgASACIAMgACgCABEFAEEYECMgBRAuIAUQKBogBEEgaiQACyoBAX8jAEEQayIDJAAgA0EIaiABIAIgACgCABEDACADKAIMIANBEGokAAthAQF/IwBBMGsiBCQAIAAoAgAhACAEIAIpAxA3AxggBCACKQMINwMQIAQgAikDADcDCCAEQSBqIgIgASAEQQhqIAMgABEPACACEJQDIAQgAjYCLCAEQSxqEHogBEEwaiQACzUBAX8jAEEQayIDJAAgAyABIAIgACgCABEDACADEJQDIAMgAzYCDCADQQxqEHogA0EQaiQACzYBAX8jAEFAaiIGJAAgBiABIAIgAyAEIAUgACgCABEqAEHAABAjIAYQQCAGEEEaIAZBQGskAAsLACAAIAFBAhDFAgtfAQF/IwBB0ABrIgMkACAAKAIAIQAgAyACNgIMIANBnKACNgIIIANBEGoiAiABIANBCGogABEDAEHAABAjIAIQQCACEEEaIAMoAgwiAEEJTwRAIAAQAQsgA0HQAGokAAuBAgICfwF8IwBB4ABrIgMkACADQQhqIgQgASACIAAoAgARAwAgA0EwaiAEQSj8CgAAQQIhACADLQBQQQFGBEAjAEEQayIAJABB2J4CLQAAQQFxRQRAQQJBmIQCQQMQBiEBQdieAkEBOgAAQdSeAiABNgIAC0EgECMiASADKQNINwMYIAEgAykDQDcDECABIAMpAzg3AwggASADKQMwNwMAIAAgATYCCCAAQQA2AgRB1J4CKAIAQQBBACAAQQRqIABBCGoQBSEFIAAoAgQhASADIAX8AzYCXCADQZygAjYCWCABBEAgARAECyAAQRBqJAAgAygCXCEACyADQeAAaiQAIAALTAEBfyMAQSBrIgMkACAAKAIAIQAgAyACKQMYNwMYIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIAEgAyAAEQEAIANBIGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgiBDcDMCADIAMpAxA3AyggAyADKQMINwMgQQIhACAEp0EBcQRAIwBBEGsiACQAQcyeAi0AAEEBcUUEQEECQa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xRQRAQQJB6PwBQQMQBiEBQaieAkEBOgAAQaSeAiABNgIACyAAIAMrAxg5AwggAEEANgIEQaSeAigCAEEAQQAgAEEEaiAAQQhqEAUhBSAAKAIEIQEgAyAF/AM2AiwgA0GcoAI2AiggAQRAIAEQBAsgAEEQaiQAIAMoAiwhAAsgA0EwaiQAIAALMAEBfyMAQRBrIgQkACAAKAIAIQAgBCADOQMIIAEgAiAEQQhqIAARAwAgBEEQaiQACy4BAX8jAEEQayIDJAAgACgCACEAIAMgAjkDCCABIANBCGogABEBACADQRBqJAAL8wECAn8BfCMAQSBrIgMkACADQQhqIgQgASACIAAoAgARAwBBAiEAAkAgAy0AFEEBRw0AIwBBEGsiACQAQZyeAi0AAEEBcUUEQEECQfj6AUEDEAYhAUGcngJBAToAAEGYngIgATYCAAsgAEEMECMgBBA8NgIIIABBADYCBEGYngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgIcIANBnKACNgIYIAEEQCABEAQLIABBEGokACADKAIcIQAgAy0AFEEBRw0AIAMoAggiAUUNACADIAE2AgwgAygCEBogARAiCyADQSBqJAAgAAsNACAAIAEgAkECEMYCC0gBAX8jAEEQayIDJAAgACgCACEAIAEgA0EEaiACEDwiASAAEQEAIAEoAgAiAARAIAEgADYCBCABKAIIGiAAECILIANBEGokAAv8AQMBfwF+AXwjAEFAaiIDJAAgA0EIaiABIAIgACgCABEDACADIAMpAxgiBDcDMCADIAMpAxA3AyggAyADKQMINwMgQQIhACAEp0EBcQRAIwBBEGsiACQAQZCeAi0AAEEBcUUEQEECQYj5AUEDEAYhAUGQngJBAToAAEGMngIgATYCAAtBEBAjIgEgAykDKDcDCCABIAMpAyA3AwAgACABNgIIIABBADYCBEGMngIoAgBBAEEAIABBBGogAEEIahAFIQUgACgCBCEBIAMgBfwDNgI8IANBnKACNgI4IAEEQCABEAQLIABBEGokACADKAI8IQALIANBQGskACAAC5ICAwF/AX4BfCMAQdAAayIDJAAgA0EIaiABIAIgACgCAB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sgAEEQaiQAIAMoApwBIQALIANBoAFqJAAgAAsNACAAIAEgAkEAEMYCCy8BAX8jAEFAaiIDJAAgACgCACEAIAMgAkHAAPwKAAAgASADIAARAQAgA0FAayQAC1EBAn8jAEHQAGsiByQAIAAoAgAhACAHQQhqIgggA0Ew/AoAACAHQThqIgMgASACIAggBCAFIAYgABEoAEEYECMgAxAuIAMQKBogB0HQAGokAAtbAQF/IwBBIGsiBCQAIAAoAgAhACAEIAI2AgQgBEGcoAI2AgAgBEEIaiICIAEgBCADIAARBQBBGBAjIAIQLiACECgaIAQoAgQiAEEJTwRAIAAQAQsgBEEgaiQACzcAIAAoAgAgAUEFdGoiACACKQMYNwMYIAAgAikDEDcDECAAIAIpAwg3AwggACACKQMANwMAQQELmgYCB38BfCMAQdABayIDJABBJBAjIgRCADcCDCAEQYSWAjYCACAEQgA3AgQgBEIANwIUIARCADcCHCAAQgA3AxggAEKAgICAgICA+D83AxAgAEIANwMIIAAgBDYCBCAAIARBDGo2AgAgAEIANwMgIABCADcDMCAAQoCAgICAgID4PzcDKCAAQgA3AzggA0EANgIcIANCADcCFCADQRRqIAEoAgQgASgCAGtBDG0QViABKAIAIgcgASgCBCIIRwRAA0AgA0EgaiAHEDwiCSEBIwBBEGsiBCQAIANBwAFqIgVBADYCCCAFQgA3AgAgBSABKAIEIAEoAgBrQQR1EFwgASgCACIGIAEoAgQiAUcEQANAIAYrAwAhCiAEIAYrAwg5AwggBCAKOQMAIAUgBBBMIAZBEGoiBiABRw0ACwsgBEEQaiQAIANBFGogBRBoIAMoAsABIgEEQCADIAE2AsQBIAMoAsgBGiABECILIAkoAgAiAQRAIAMgATYCJCADKAIoGiABECILIAdBDGoiByAIRw0ACwsgA0EANgIQIANCADcCCCADQThqQQBB6AD8CwAgA0IANwMwIANBAjYCLCADQgA3AiQgA0E8akEAQTD8CwAgA0HwAGpBAEEk/AsAIANBADYCqAEgA0IANwOgASADQQE6AJ0BIANBAToAlAEgA0KAgICAgICAoD43A7gBIANC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ACgCBCIDa0EGdU0EQCAAIAEEfyADIAFBBnRqIQADQCADIAIQQEFAayIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIEa0EGdSIHIAFqIgNBgICAIE8NASAFQQxqQf///x8gBiAEayIEQQV1IgYgAyADIAZJGyAEQcD///8HTxsgByAAEKkBIgQoAggiAyABQQZ0aiEBA0AgAyACEEBBQGsiAyABRw0ACyAEIAE2AgggACAEEKcCIAQQpgILIAVBIGokAAwCCxAmAAsgASAESQRAIAMgBSABQQZ0aiIBRwRAA0AgASADQUBqEEEiA0cNAAsLIAAgATYCBAsLC78BAQV/AkAjAEEgayIFJAACQAJAIAAoAgQiAiAAKAIIIgNJBEAgAiABELQBQUBrIQEMAQsgAiAAKAIAIgRrQQZ1IgZBAWoiAkGAgIAgTw0BIAVBDGpB////HyADIARrIgNBBXUiBCACIAIgBEkbIANBwP///wdPGyAGIAAQqQEiAigCCCABELQBGiACIAIoAghBQGs2AgggACACEKcCIAAoAgQhASACEKYCCyAAIAE2AgQgBUEgaiQADAELECYACwssAQF/IwBBEGsiASQAIAAEQCABIAA2AgwgAUEMahCYAyAAECILIAFBEGokAAsGAEGE/gELFwAgACgCACABQQN0aiACKwMAOQMAQQELPQAgAAJ/IAEoAgQgASgCACIBa0EDdSACSwRAIAAgASACQQN0aisDADkDAEEBDAELIABBADoAAEEACzoACAvtGgQVfwZ8A30CfiMAQZABayINJAAgABAaNgIEIABBnKACNgIAIA1BEGoiCCABEN8BIwBBkARrIgIkACACQgA3AogCIAIgAkGIAmoiCjYChAIgAkH4AWogCCgCCCAIKAIEa0ECdSAIKAIAbhDsASIQKAIAIgYgECgCBCIFRwRAIAYhBANAIAQgAzYCACADQQFqIQMgBEEEaiIEIAVHDQALCyAIKAIgIgMgCCgCHCIERwRAIAMgBGtBAnUhBSAIKAIoIQdBACEDA0AgBiAEIANBAnQiCWooAgBBAnRqIAcgCWooAgA2AgAgA0EBaiIDIAVHDQALCyAIKAIUIAgoAhBrQQJ1IgZBA24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g5AwAgA0EIaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EDdSIHIARqIgFBgICAgAJPDQEgBkEMakH/////ASAFIANrIgNBAnUiBSABIAEgBUkbIANB+P///wdPGyAHIAAQSyIBKAIIIgMgBEEDdGohBCACKwMAIQgDQCADIAg5AwAgA0EIaiIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICayEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQmQELIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQQN0ajYCBAsLCwkAIAAgARCoAgsGAEGM/AELMgAgAiAAKAIAIAFBDGxqIgBHBEAgACACKAIAIgAgAigCBCIBIAEgAGtBBHUQmQMLQQELOgAgAAJ/IAEoAgQgASgCACIBa0EMbSACSwRAIAAgASACQQxsahA8GkEBDAELIABBADoAAEEACzoADAuHAwEFfwJAIAAoAgQgACgCACIDa0EMbSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EMbU0EQCAAIAQEfyADIARBDGxqIQADQCADIAIQPEEMaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EMbSIHIARqIgFB1qrVqgFPDQEgBkEMakHVqtWqASAFIANrQQxtIgNBAXQiBSABIAEgBUkbIANBqtWq1QBPGyAHIAAQYSIBKAIIIgMgBEEMbGohBANAIAMgAhA8QQxqIgMgBEcNAAsgASAENgIIIAEoAgQgACgCBCAAKAIAIgRrIgJBdG1BDGxqIQMgAgRAIAMgBCAC/AoAAAsgACgCACECIAAgAzYCACABIAI2AgQgACABKAIINgIEIAEgAjYCCCAAKAIIIQMgACABKAIMNgIIIAEgAjYCACABIAM2AgwgARDVAQsgBkEgaiQADAILECYACyABIARJBEAgACADIAFBDGxqEHsLCwsIACAAIAEQaAsrAQF/IwBBEGsiASQAIA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lggC0EMbGohCUEAIQIDQCAFIANBiAFqIAJqKAIAQQJ0IgtqIAkgC2ooAgA2AgAgAkEEaiICQQxHDQALIAEgAygCACILRwRAIANCgICAgICAgPg/NwOQASADQX82AogBIANCADcDqAEgA0IANwOgASADQgA3A5gBIANCgICAgICAgPg/NwOwASADQgA3A8gBIANCADcDwAEgA0IANwO4ASADQoCAgICAgID4PzcD0AEgA0EAOwHwASADQgA3A+gBIANCADcD4AEgA0IANwPYASAGIQECQCADKAKAAiIFRQ0AA0AgASICIAUiCSAFKAIQIAtIIggbIQEgBUEEQQAgCBtqKAIAIgUNAAsgASAGRg0AIAsgAiAJIAgbKAIQSA0AIANBiAFqIAFBGGpB6gD8CgAACyADQYsCaiAEIAwgA0GIAWoQoQQgA0H8AWogAxCzBCADKAIAIQELIAxBAWoiDCANRw0ACwsgBiADKAL8ASICRwRAA0AgA0GLAmogBCANIAJBGGoQoQQCQCACKAIEIgEEQANAIAEiAigCACIBDQAMAgsACwNAIAIgAigCCCICKAIARw0ACwsgAiAGRw0ACwsgAyAVNgKIASAEQTRqIANBiAFqED0CQCARRQRAIAogDkEDbBB9IA5BAEwNASAKKAIAIQYgBygCSCEJQQAhAgNAIAkgAkEYbGoiASsDACEdIAErAwghHiAGIAJBDGxqIgUgASsDELY4AgggBSAetjgCBCAFIB22OAIAIAJBAWoiAiAORw0ACwwBCyAHKAJMIQEgA0F/NgKIASADQfwAaiABIANBiAFqELIEIQ0gA0HwAGogBygCTBCcAiELIAQoAgAgDmwhASMAQSBrIgUkAAJAAkAgCigCCCAKKAIAIgJrQQJ1IAFJBEAgAUGAgICABE8NASAFQQxqIAEgCigCBCACa0ECdSAKEEoiASgCBCAKKAIEIAooAgAiCWsiAmshBiACBEAgBiAJIAL8CgAACyAKKAIAIQIgCiAGNgIAIAEgAjYCBCAKIAEoAgg2AgQgASACNgIIIAooAgghBiAKIAEoAgw2AgggASACNgIAIAEgBjYCDCABEFMLIAVBIGokAAwBCxAmAAsgBCgCRCIBI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iBCABSQRAIwBBIGsiBiQAAkACQCABIARrIgQgACgCCCIFIAAoAgQiA2tBGG1NBEAgACAEBH8gAyAEQRhsaiEAA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIABHDQALIAAFIAMLNgIEDAELIAMgACgCACIDa0EYbSIHIARqIgFBq9Wq1QBPDQEgBkEMakGq1arVACAFIANrQRhtIgNBAXQiBSABIAEgBUkbIANB1arVKk8bIAcgABBkIgEoAggiAyAEQRhsaiEEA0AgAyACKQMQNwMQIAMgAikDCDcDCCADIAIpAwA3AwAgA0EYaiIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICQWhtQRhsaiEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQjAELIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQRhsajYCBAsLCwkAIAAgARDEAQsGAEG89gELIwAgACgCACABQQxsaiIAIAIoAgg2AgggACACKQIANwIAQQELSQAgAAJ/IAEoAgQgASgCACIBa0EMbSACSwRAIAAgASACQQxsaiIBKAIINgIIIAAgASkCADcCAEEBDAELIABBADoAAEEACzoADAuoAwEFfwJAIAAoAgQgACgCACIDa0EMbSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EMbU0EQCAAIAQEfyADIARBDGxqIQADQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBDG0iByAEaiIBQdaq1aoBTw0BIAZBDGpB1arVqgEgBSADa0EMbSIDQQF0IgUgASABIAVJGyADQarVqtUATxsgByAAEGEiASgCCCIDIARBDGxqIQQDQCADIAIoAgg2AgggAyACKQIANwIAIANBDGoiAyAERw0ACyABIAQ2AgggASgCBCAAKAIEIAAoAgAiBGsiAkF0bUEMbGohAyACBEAgAyAEIAL8CgAACyAAKAIAIQIgACADNgIAIAEgAjYCBCAAIAEoAgg2AgQgASACNgIIIAAoAgghAyAAIAEoAgw2AgggASACNgIAIAEgAzYCDCABENYBCyAGQSBqJAAMAgsQJgALIAEgBEkEQCAAIAMgAUEMbGo2AgQLCwsJACAAIAEQnQULBgBBzPQBCxgAIAAoAgAgAUEGdGogAkHAAPwKAABBAQs+ACAAAn8gASgCBCABKAIAIgFrQQZ1IAJLBEAgACABIAJBBnRqQcAA/AoAAEEBDAELIABBADoAAEEACzoAQAuMAwEFfwJAIAAoAgQgACgCACIDa0EGdSIEIAFJBEAjAEEgayIGJAACQAJAIAEgBGsiBCAAKAIIIgUgACgCBCIDa0EGdU0EQCAAIAQEfyADIARBBnRqIQADQCADIAJBwAD8CgAAIANBQGsiAyAARw0ACyAABSADCzYCBAwBCyADIAAoAgAiA2tBBnUiByAEaiIBQYCAgCBPDQEgBkEMakH///8fIAUgA2siA0EFdSIFIAEgASAFSRsgA0HA////B08bIAcgABCpASIBKAIIIgMgBEEGdGohBANAIAMgAkHAAPwKAAAgA0FAayIDIARHDQALIAEgBDYCCCABKAIEIAAoAgQgACgCACIEayICayEDIAIEQCADIAQgAvwKAAALIAAoAgAhAiAAIAM2AgAgASACNgIEIAAgASgCCDYCBCABIAI2AgggACgCCCEDIAAgASgCDDYCCCABIAI2AgAgASADNgIMIAEQqQILIAZBIGokAAwCCxAmAAsgASAESQRAIAAgAyABQQZ0ajYCBAsLCwkAIAAgARCaAwsGAEHo8gELDwAgASAAKAIAaiACNwMACw0AIAEgACgCAGopAwALHgAgASAAKAIAaiIAIAIpAwg3AwggACACKQMANwMACyoBAX8gACgCACECQRAQIyIAIAEgAmoiASkDCDcDCCAAIAEpAwA3AwAgAAsHACAAEQwACwkAIAEgABEZAAsJACABIAARAAALCQAgASAAERsACwkAIAEgABEEAAtNAQF/IwBBEGsiAiQAIAIgATYCBCACQZygAjYCACACQQhqIAIgABEBACACKAIMIAJBADYCDCACKAIEIg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ABqKAIABSAACxEFAEEYECMgBRAuIAUQKBogBEEgaiQACzkBAX8gASAAKAIEIgRBAXVqIQEgACgCACEAIAEgAiADIARBAXEEfyABKAIAIABqKAIABSAACxEmAAtXAQJ/IwBBMGsiAiQAIAEgACgCBCIDQQF1aiEBIAAoAgAhACACIAEgA0EBcQR/IAEoAgAgAGooAgAFIAALEQEAQTAQIyIAIAJBMPwKAAAgAkEwaiQAIAALWgECfyMAQRBrIgIkACABIAAoAgQiA0EBdWohASAAKAIAIQAgAiABIANBAXEEfyABKAIAIABqKAIABSAACxEBACACEJQDIAIgAjYCDCACQQxqEHogAkEQaiQAC18BA38jAEEgayIFJAAgASAAKAIEIgdBAXVqIQEgACgCACEAIAVBCGoiBiABIAIgAyAEIAdBAXEEfyABKAIAIABqKAIABSAACxEiAEEYECMgBhAuIAYQKBogBUEgaiQAC3oBAn8jAEEwayIDJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIARBAXEEQCABKAIAIABqKAIAIQALIAMgAikDEDcDECADIAIpAwg3AwggAyACKQMANwMAIANBGGoiAiABIAMgABEDAEEYECMgAhAuIAIQKBogA0EwaiQAC10BA38jAEEgayIEJAAgASAAKAIEIgZBAXVqIQEgACgCACEAIARBCGoiBSABIAIgAyAGQQFxBH8gASgCACAAaigCAAUgAAsRJwBBGBAjIAUQLiAFECgaIARBIGokAAtbAQN/IwBBIGsiAyQAIAEgACgCBCIFQQF1aiEBIAAoAgAhACADQQhqIgQgASACIAVBAXEEfyABKAIAIABqKAIABSAACxELAEEYECMgBBAuIAQQKBogA0EgaiQAC1kBA38jAEEgayICJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIAJBCGoiAyABIARBAXEEfyABKAIAIABqKAIABSAACxEBAEEYECMgAxAuIAMQKBogAkEgaiQAC1wBAn8jAEEQayIDJAAgASAAKAIEIgRBAXVqIQEgACgCACEAIAMgASACIARBAXEEfyABKAIAIABqKAIABSAACxELACADEJgFIAMgAzYCDCADQQxqECkgA0EQaiQAC3wB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KAIQIAJHBEAgAiABKAIURw0BCyADQQFHDQIgAUEBNgIgDwsgASADNgIgAkAgASgCLEEERg0AIAFBADsBNCAAKAIIIgAgASACIAJBASAEIAAoAgAoAhQRCAAgAS0ANUEBRgRAIAFBAzYCLCABLQA0RQ0BDAMLIAFBBDYCLAsgASACNgIUIAEgASgCKEEBajYCKCABKAIkQQFHDQEgASgCGEECRw0BIAFBAToANg8LIAAoAggiACABIAIgAyAEIAAoAgAoAhgRBwALC1YBA38jAEHQAGsiAiQAIAJBEGoiAyACQQRqIAEQPCIBIAARAQBBwAAQIyADEEAgAxBBGiABKAIAIgAEQCABIAA2AgQgASgCCBogABAiCyACQdAAaiQAC6gEAQV/IAAoAgQiAhCvAkEBaiIBECciAAR/An8gAUGABE8EQCABBEAgACACIAH8CgAACyAADAELIAAgAWohAwJAIAAgAnNBA3FFBEACQCAAQQNxRQRAIAAhAQwBCyABRQRAIAAhAQwBCyAAIQEDQCABIAItAAA6AAAgAkEBaiECIAFBAWoiAUEDcUUNASABIANJDQALCyADQXxxIQQCQCADQcAASQ0AIAEgBEFAaiIFSw0AA0AgASACKAIANgIAIAEgAigCBDYCBCABIAIoAgg2AgggASACKAIMNgIMIAEgAigCEDYCECABIAIoAhQ2AhQgASACKAIYNgIYIAEgAigCHDYCHCABIAIoAiA2AiAgASACKAIkNgIkIAEgAigCKDYCKCABIAIoAiw2AiwgASACKAIwNgIwIAEgAigCNDYCNCABIAIoAjg2AjggASACKAI8NgI8IAJBQGshAiABQUBrIgEgBU0NAAsLIAEgBE8NAQNAIAEgAigCADYCACACQQRqIQIgAUEEaiIBIARJDQALDAELIANBBEkEQCAAIQEMAQsgAUEESQRAIAAhAQwBCyADQQRrIQUgACEBA0AgASACLQAAOgAAIAEgAi0AAToAASABIAItAAI6AAIgASACLQADOgADIAJBBGohAiABQQRqIgEgBU0NAAsLIAEgA0kEQANAIAEgAi0AADoAACACQQFqIQIgAUEBaiIBIANHDQALCyAACwVBAAsLtgEAQdSdAkEBN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EwX19mdW5jdGlvbjZfX2Z1bmNJWk5LOG1hbmlmb2xkOE1hbmlmb2xkMTdSZWZpbmVUb1RvbGVyYW5jZUVkRTMkXzBGaU42bGluYWxnM3ZlY0lkTGkzRUVFTlM2X0lkTGk0RUVFUzhfRUVFAFpOSzhtYW5pZm9sZDhNYW5pZm9sZDE3UmVmaW5lVG9Ub2xlcmFuY2VFZEUzJF8wAE5TdDNfXzIyMF9fc2hhcmVkX3B0cl9wb2ludGVySVBOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGxFTlNfMTRkZWZhdWx0X2RlbGV0ZUlTM19FRU5TXzlhbGxvY2F0b3JJUzNfRUVFRQBOU3QzX18yMTRkZWZhdWx0X2RlbGV0ZUlOOG1hbmlmb2xkOE1hbmlmb2xkNEltcGxFRUUAAAAAABgtRFT7Iek/GC1EVPsh6b/SITN/fNkCQNIhM3982QLAAEHHhgELEYAYLURU+yEJQBgtRFT7IQnAAEHshgELBQEAAAABAEGEhwELAQEAQZiHAQslAQAAAAAAAAD/////AAAAAAAAAAABAAAAAAAAAP////8AAAAAAQBByIcBCxz/////AQAAAP///////////////wEAAAD/////AEH0hwELBP////8AQYiIAQtJ/////wAAAAAAAAAA//////////8BAAAA/////wAAAAD/////AQAAAP//////////AAAAAAEAAAACAAAAAAAAAAEAAAABAAAAAgBB4IgBC7AR////////////////AAAAAAMAAAAEAAAAAAAAAAEAAAAFAAAAAQAAAAUAAAADAAAAAQAAAAQAAAACAAAAAQAAAAAAAAADAAAAAgAAAAUAAAAAAAAABQAAAAMAAAACAAAAAgAAAAMAAAAFAAAAAAAAAAUAAAACAAAAAwAAAAAAAAABAAAAAgAAAAQAAAABAAAAAwAAAAUAAAABAAAABQAAAAEAAAAAAAAABAAAAAMAAAAAAAAA////////////////////////////////////////////////////////////////AwAAAAQAAAABAAAA////////////////AwAAAAIAAAABAAAAAAAAAAQAAAACAAAA////////////////////////////////AgAAAAQAAAAAAAAAAQAAAAIAAAADAAAA////////////////AQAAAAQAA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AIAADR2AAD4SAAAHI0AAAx2AACSSQAADHYAAP5JAAAAAAAASI0AADUCAAA2AgAANwIAAKABAAA4AgAANHYAAKBKAAD0cgAANHYAAOlKAAAUdwAAAAAAAFSNAAAzAgAAOQIAADoCAAAAAAAAhI0AADsCAAA8AgAANHYAAAxLAAAYjgAAAAAAAKyNAAA9AgAAPgIAAD8CAABAAgAAQQIAADR2AAAlSwAAuI0AAAx2AAA/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&>(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&>(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/AABAAAAAAAEABkASAABAAAAAAAFAAsA2wABAAAAAAAGABgAkwABAAAAAAAHAAEAWQABAAAAAAAIAAEAWQABAAAAAAAJAAEAWQABAAAAAAAKAAEAWQABAAAAAAALAAEAWQABAAAAAAAMAAEAWQABAAAAAAANAAEAWQABAAAAAAAOAAEAWQABAAAAAAAQABEAAAABAAAAAAARAAcAMwADAAEECQAAAAIAgwADAAEECQABACIAEQADAAEECQACAA4AOgADAAEECQADADYBFwADAAEECQAEADIAYQADAAEECQAFABYA5gADAAEECQAGADAAqwADAAEECQAHAAIAgwADAAEECQAIAAIAgwADAAEECQAJAAIAgwAD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fAWNewWGewX7gfxMBYuKBYqJBT37EQWGhQWGhgU9TAWEiAWGhwU8bAWLiwWLiwUO+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<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)&<.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],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()<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"