(()=>{varWo=Object.create;varue=Object.defineProperty,Bo=Object.defineProperties,Vo=Object.getOwnPropertyDescriptor,Fo=Object.getOwnPropertyDescriptors,zo=Object.getOwnPropertyNames,yn=Object.getOwnPropertySymbols,Uo=Object.getPrototypeOf,bn=Object.prototype.hasOwnProperty,Yo=Object.prototype.propertyIsEnumerable;varTn=(i,t,e)=>tini?ue(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,O=(i,t)=>{for(vareint||(t={}))bn.call(t,e)&&Tn(i,e,t[e]);if(yn)for(vareofyn(t))Yo.call(t,e)&&Tn(i,e,t[e]);returni},We=(i,t)=>Bo(i,Fo(t)),An=i=>ue(i,"__esModule",{value:!0});varq=(i,t)=>()=>(t||i((t={exports:{}}).exports,t),t.exports),Ko=(i,t)=>{An(i);for(vareint)ue(i,e,{get:t[e],enumerable:!0})},qo=(i,t,e)=>{if(t&&typeoft=="object"||typeoft=="function")for(letnofzo(t))!bn.call(i,n)&&n!=="default"&&ue(i,n,{get:()=>t[n],enumerable:!(e=Vo(t,n))||e.enumerable});returni},Oi=i=>qo(An(ue(i!=null?Wo(Uo(i)):{},"default",i&&i.__esModule&&"default"ini?{get:()=>i.default,enumerable:!0}:{value:i,enumerable:!0})),i);varwi=(i,t,e)=>newPromise((n,r)=>{varo=f=>{try{a(e.next(f))}catch(h){r(h)}},s=f=>{try{a(e.throw(f))}catch(h){r(h)}},a=f=>f.done?n(f.value):Promise.resolve(f.value).then(o,s);a((e=e.apply(i,t)).next())});varln=q((ro,ui)=>{(function(i,t){typeofdefine=="function"&&define.amd?define(t):typeofui=="object"&&ui.exports?ui.exports=t():i.EvEmitter=t()})(typeofwindow!="undefined"?window:ro,function(){"use strict";functioni(){}vart=i.prototype;returnt.on=function(e,n){if(!(!e||!n)){varr=this._events=this._events||{},o=r[e]=r[e]||[];returno.indexOf(n)==-1&&o.push(n),this}},t.once=function(e,n){if(!(!e||!n)){this.on(e,n);varr=this._onceEvents=this._onceEvents||{},o=r[e]=r[e]||{};returno[n]=!0,this}},t.off=function(e,n){varr=this._events&&this._events[e];if(!(!r||!r.length)){varo=r.indexOf(n);returno!=-1&&r.splice(o,1),this}},t.emitEvent=function(e,n){varr=this._events&&this._events[e];if(!(!r||!r.length)){r=r.slice(0),n=n||[];for(varo=this._onceEvents&&this._onceEvents[e],s=0;s<r.length;s++){vara=r[s],f=o&&o[a];f&&(this.off(e,a),deleteo[a]),a.apply(this,n)}returnthis}},t.allOff=function(){deletethis._events,deletethis._onceEvents},i})});varhi=q((yp,di)=>{(function(i,t){typeofdefine=="function"&&define.amd?define(t):typeofdi=="object"&&di.exports?di.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)},r=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],o=r.length;functions(){for(vard={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},v=0;v<o;v++){varE=r[v];d[E]=0}returnd}functiona(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}varf=!1,h;functionu(){if(!f){f=!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=a(d);h=Math.round(t(E.width))==200,_.isBoxSizeOuter=h,v.removeChild(d)}}function_(d){if(u(),typeofd=="string"&&(d=document.querySelector(d)),!(!d||typeofd!="object"||!d.nodeType)){varv=a(d);if(v.display=="none")returns();varE={};E.width=d.offsetWidth,E.height=d.offsetHeight;for(varp=E.isBorderBox=v.boxSizing=="border-box",l=0;l<o;l++){varc=r[l],m=v[c],b=parseFloat(m);E[c]=isNaN(b)?0:b}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=p&&h,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),E.
`)}:!a.ok&&"detail"in h?{error:h.detail}:h})}function Ro(i){return wi(this,null,function*(){return yield hf(i,"GET")})}function*un(...i){for(let t of i)for(let e of document.querySelectorAll(t))e!==null&&(yield e)}function $o(i){i.startsWith("data-")||(i=`data-${i}`);for(let t of un("body > div#netbox-data > *")){let e=t.getAttribute(i);if($e(e))return e}return null}function pf(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 yi(i){for(let t of un("div.card-overlay"))pf(t,i)}window.Collapse=it;window.Modal=Ft;window.Popover=le;window.Toast=Yt;window.Tooltip=gt;function Mo(i,t,e,n){let r="mdi-alert";switch(i){case"warning":r="mdi-alert";break;case"success":r="mdi-check-circle";break;case"info":r="mdi-information";break;case"danger":r="mdi-alert";break}let o=document.createElement("div");o.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 a=document.createElement("div");a.setAttribute("class",`toast-headerbg-${i}text-body`);let f=document.createElement("i");f.setAttribute("class",`mdi${r}`);let h=document.createElement("strong");h.setAttribute("class","me-auto ms-1"),h.innerText=t;let u=document.createElement("button");u.setAttribute("type","button"),u.setAttribute("class","btn-close"),u.setAttribute("data-bs-dismiss","toast"),u.setAttribute("aria-label","Close");let _=document.createElement("div");if(_.setAttribute("class","toast-body"),a.appendChild(f),a.appendChild(h),typeof n!="undefined"){let v=document.createElement("small");v.setAttribute("class","text-muted"),a.appendChild(v)}return a.appendChild(u),_.innerText=e.trim(),s.appendChild(a),s.appendChild(_),o.appendChild(s),document.body.appendChild(o),new Yt(s)}function dn(i,t,e){var n,r;return(r=(n=i.querySelector(t))==null?void 0:n.getAttribute(e))!=null?r:null}function gf(i){var t,e;for(let[n,r]of Object.entries(i.get_lldp_neighbors_detail)){let[o]=n.split("."),s=document.getElementById(o);if(s!==null)for(let a of r){let f=s.querySelector("td.device"),h=s.querySelector("td.interface"),u=dn(s,"td.configured_device","data"),_=dn(s,"td.configured_chassis","data-chassis"),d=dn(s,"td.configured_interface","data"),v=null;$e(d)&&(v=d.replace(/^([A-Z][a-z])[^0-9]*([0-9/]+)$/,"$1$2"));let E=(t=a.remote_system_name)!=null?t:"",p=(e=a.remote_port)!=null?e:"",[l]=E.split("."),[c]=p.split(".");f!==null&&(f.innerText=l),h!==null&&(h.innerText=c),!$e(u)&&$e(l)?s.classList.add("info"):(u===l||_===l)&&v===c||u===l||_===l?s.classList.add("success"):s.classList.add("danger")}}}function jo(){yi("show");let i=$o("object-url");i!==null&&Ro(i).then(t=>{if(Po(t)){Mo("danger","Error Retrieving LLDP Neighbor Information",t.error).show(),yi("hide");return}else gf(t)}).finally(()=>{yi("hide")})}document.readyState!=="loading"?jo():document.addEventListener("DOMContentLoaded",jo);})();