(()=>{vargr=Object.create;varae=Object.defineProperty,_r=Object.defineProperties,Er=Object.getOwnPropertyDescriptor,vr=Object.getOwnPropertyDescriptors,yr=Object.getOwnPropertyNames,mn=Object.getOwnPropertySymbols,Tr=Object.getPrototypeOf,gn=Object.prototype.hasOwnProperty,br=Object.prototype.propertyIsEnumerable;var_n=(i,t,e)=>tini?ae(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t)=>{for(vareint||(t={}))gn.call(t,e)&&_n(i,e,t[e]);if(mn)for(vareofmn(t))br.call(t,e)&&_n(i,e,t[e]);returni},Me=(i,t)=>_r(i,vr(t)),En=i=>ae(i,"__esModule",{value:!0});varmt=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Ar=(i,t)=>{En(i);for(vareint)ae(i,e,{get:t[e],enumerable:!0})},Sr=(i,t,e)=>{if(t&&typeoft=="object"||typeoft=="function")for(letnofyr(t))!gn.call(i,n)&&n!=="default"&&ae(i,n,{get:()=>t[n],enumerable:!(e=Er(t,n))||e.enumerable});returni},vn=i=>Sr(En(ae(i!=null?gr(Tr(i)):{},"default",i&&i.__esModule&&"default"ini?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);varbi=(i,t,e)=>newPromise((n,o)=>{varr=u=>{try{l(e.next(u))}catch(p){o(p)}},s=u=>{try{l(e.throw(u))}catch(p){o(p)}},l=u=>u.done?n(u.value):Promise.resolve(u.value).then(r,s);l((e=e.apply(i,t)).next())});varon=mt((er,li)=>{(function(i,t){typeofdefine=="function"&&define.amd?define(t):typeofli=="object"&&li.exports?li.exports=t():i.EvEmitter=t()})(typeofwindow!="undefined"?window:er,function(){"use strict";functioni(){}vart=i.prototype;returnt.on=function(e,n){if(!(!e||!n)){varo=this._events=this._events||{},r=o[e]=o[e]||[];returnr.indexOf(n)==-1&&r.push(n),this}},t.once=function(e,n){if(!(!e||!n)){this.on(e,n);varo=this._onceEvents=this._onceEvents||{},r=o[e]=o[e]||{};returnr[n]=!0,this}},t.off=function(e,n){varo=this._events&&this._events[e];if(!(!o||!o.length)){varr=o.indexOf(n);returnr!=-1&&o.splice(r,1),this}},t.emitEvent=function(e,n){varo=this._events&&this._events[e];if(!(!o||!o.length)){o=o.slice(0),n=n||[];for(varr=this._onceEvents&&this._onceEvents[e],s=0;s<o.length;s++){varl=o[s],u=r&&r[l];u&&(this.off(e,l),deleter[l]),l.apply(this,n)}returnthis}},t.allOff=function(){deletethis._events,deletethis._onceEvents},i})});varui=mt((kh,ci)=>{(function(i,t){typeofdefine=="function"&&define.amd?define(t):typeofci=="object"&&ci.exports?ci.exports=t():i.getSize=t()})(window,function(){"use strict";functiont(d){varv=parseFloat(d),E=d.indexOf("%")==-1&&!isNaN(v);returnE&&v}functione(){}varn=typeofconsole=="undefined"?e:function(d){console.error(d)},o=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],r=o.length;functions(){for(vard={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},v=0;v<r;v++){varE=o[v];d[E]=0}returnd}functionl(d){varv=getComputedStyle(d);returnv||n("Style returned "+v+". Are you running this code in a hidden iframe on Firefox? See https://bit.ly/getsizebug1"),v}varu=!1,p;functionf(){if(!u){u=!0;vard=document.createElement("div");d.style.width="200px",d.style.padding="1px 2px 3px 4px",d.style.borderStyle="solid",d.style.borderWidth="1px 2px 3px 4px",d.style.boxSizing="border-box";varv=document.body||document.documentElement;v.appendChild(d);varE=l(d);p=Math.round(t(E.width))==200,_.isBoxSizeOuter=p,v.removeChild(d)}}function_(d){if(f(),typeofd=="string"&&(d=document.querySelector(d)),!(!d||typeofd!="object"||!d.nodeType)){varv=l(d);if(v.display=="none")returns();varE={};E.width=d.offsetWidth,E.height=d.offsetHeight;for(varh=E.isBorderBox=v.boxSizing=="border-box",a=0;a<r;a++){varc=o[a],m=v[c],T=parseFloat(m);E[c]=isNaN(T)?0:T}vary=E.paddingLeft+E.paddingRight,S=E.paddingTop+E.paddingBottom,A=E.marginLeft+E.marginRight,C=E.marginTop+E.marginBottom,w=E.borderLeftWidth+E.borderRightWidth,N=E.borderTopWidth+E.borderBottomWidth,L=h&&p,M=t(v.width);M!==!1&&(E.width=M+(L?0:y+w));varq=t(v.height);returnq!==!1&&(E.height=q+(L?0:S+N)),E.innerWidth=E.width-(y+w),E.innerHeight=E.height-(S+N)
`)}:!s.ok&&"detail"in u?{error:u.detail}:u})}function ur(i){return bi(this,null,function*(){return yield xc(i,"GET")})}function*sn(...i){for(let t of i)for(let e of document.querySelectorAll(t))e!==null&&(yield e)}function fr(i){i.startsWith("data-")||(i=`data-${i}`);for(let t of sn("body > div#netbox-data > *")){let e=t.getAttribute(i);if(De(e))return e}return null}function Dc(i,t){i!==null&&(typeof t=="undefined"?window.getComputedStyle(i).display==="none"?i.style.display="":i.style.display="none":t==="show"?i.style.display="":i.style.display="none")}function _i(i){for(let t of sn("div.card-overlay"))Dc(t,i)}window.Collapse=J;window.Modal=Bt;window.Toast=Ft;window.Tooltip=ht;function dr(i,t,e,n){let o="mdi-alert";switch(i){case"warning":o="mdi-alert";break;case"success":o="mdi-check-circle";break;case"info":o="mdi-information";break;case"danger":o="mdi-alert";break}let r=document.createElement("div");r.setAttribute("class","toast-container position-fixed bottom-0 end-0 m-3");let s=document.createElement("div");s.setAttribute("class",`toastbg-${i}`),s.setAttribute("role","alert"),s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true");let l=document.createElement("div");l.setAttribute("class",`toast-headerbg-${i}text-body`);let u=document.createElement("i");u.setAttribute("class",`mdi${o}`);let p=document.createElement("strong");p.setAttribute("class","me-auto ms-1"),p.innerText=t;let f=document.createElement("button");f.setAttribute("type","button"),f.setAttribute("class","btn-close"),f.setAttribute("data-bs-dismiss","toast"),f.setAttribute("aria-label","Close");let _=document.createElement("div");if(_.setAttribute("class","toast-body"),l.appendChild(u),l.appendChild(p),typeof n!="undefined"){let v=document.createElement("small");v.setAttribute("class","text-muted"),l.appendChild(v)}return l.appendChild(f),_.innerText=e.trim(),s.appendChild(l),s.appendChild(_),r.appendChild(s),document.body.appendChild(r),new Ft(s)}function an(i,t,e){var n,o;return(o=(n=i.querySelector(t))==null?void 0:n.getAttribute(e))!=null?o:null}function Pc(i){var t,e;for(let[n,o]of Object.entries(i.get_lldp_neighbors_detail)){let[r]=n.split("."),s=document.getElementById(r);if(s!==null)for(let l of o){let u=s.querySelector("td.device"),p=s.querySelector("td.interface"),f=an(s,"td.configured_device","data"),_=an(s,"td.configured_chassis","data-chassis"),d=an(s,"td.configured_interface","data"),v=null;De(d)&&(v=d.replace(/^([A-Z][a-z])[^0-9]*([0-9/]+)$/,"$1$2"));let E=(t=l.remote_system_name)!=null?t:"",h=(e=l.remote_port)!=null?e:"",[a]=E.split("."),[c]=h.split(".");u!==null&&(u.innerText=a),p!==null&&(p.innerText=c),!De(f)&&De(a)?s.classList.add("info"):(f===a||_===a)&&v===c||f===a||_===a?s.classList.add("success"):s.classList.add("danger")}}}function hr(){_i("show");let i=fr("object-url");i!==null&&ur(i).then(t=>{if(cr(t)){dr("danger","Error Retrieving LLDP Neighbor Information",t.error).show(),_i("hide");return}else Pc(t)}).finally(()=>{_i("hide")})}document.readyState!=="loading"?hr():document.addEventListener("DOMContentLoaded",hr);})();