(()=>{varlv=Object.create;varUn=Object.defineProperty,cv=Object.defineProperties,uv=Object.getOwnPropertyDescriptor,fv=Object.getOwnPropertyDescriptors,dv=Object.getOwnPropertyNames,Ml=Object.getOwnPropertySymbols,hv=Object.getPrototypeOf,Il=Object.prototype.hasOwnProperty,pv=Object.prototype.propertyIsEnumerable;varIo=(t,e,n)=>eint?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e)=>{for(varnine||(e={}))Il.call(e,n)&&Io(t,n,e[n]);if(Ml)for(varnofMl(e))pv.call(e,n)&&Io(t,n,e[n]);returnt},Vi=(t,e)=>cv(t,fv(e)),kl=t=>Un(t,"__esModule",{value:!0});varC=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),mv=(t,e)=>{kl(t);for(varnine)Un(t,n,{get:e[n],enumerable:!0})},gv=(t,e,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofdv(e))!Il.call(t,i)&&i!=="default"&&Un(t,i,{get:()=>e[i],enumerable:!(n=uv(e,i))||n.enumerable});returnt},Oe=t=>gv(kl(Un(t!=null?lv(hv(t)):{},"default",t&&t.__esModule&&"default"int?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);varG=(t,e,n)=>(Io(t,typeofe!="symbol"?e+"":e,n),n);varke=(t,e,n)=>newPromise((i,o)=>{vars=f=>{try{c(n.next(f))}catch(u){o(u)}},a=f=>{try{c(n.throw(f))}catch(u){o(u)}},c=f=>f.done?i(f.value):Promise.resolve(f.value).then(s,a);c((n=n.apply(t,e)).next())});varpe=C((ck,pu)=>{varvr=function(t){returnt&&t.Math==Math&&t};pu.exports=vr(typeofglobalThis=="object"&&globalThis)||vr(typeofwindow=="object"&&window)||vr(typeofself=="object"&&self)||vr(typeofglobal=="object"&&global)||function(){returnthis}()||Function("return this")()});varme=C((uk,mu)=>{mu.exports=function(t){try{return!!t()}catch(e){return!0}}});varIt=C((fk,gu)=>{varp_=me();gu.exports=!p_(function(){returnObject.defineProperty({},1,{get:function(){return7}})[1]!=7})});varhs=C(yu=>{"use strict";varvu={}.propertyIsEnumerable,bu=Object.getOwnPropertyDescriptor,m_=bu&&!vu.call({1:2},1);yu.f=m_?function(e){varn=bu(this,e);return!!n&&n.enumerable}:vu});varbr=C((hk,Eu)=>{Eu.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});varDn=C((pk,_u)=>{varg_={}.toString;_u.exports=function(t){returng_.call(t).slice(8,-1)}});varvi=C((mk,Su)=>{varv_=me(),b_=Dn(),y_="".split;Su.exports=v_(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){returnb_(t)=="String"?y_.call(t,""):Object(t)}:Object});varrn=C((gk,wu)=>{wu.exports=function(t){if(t==null)throwTypeError("Can't call method on "+t);returnt}});varbi=C((vk,Tu)=>{varE_=vi(),__=rn();Tu.exports=function(t){returnE_(__(t))}});varBe=C((bk,xu)=>{xu.exports=function(t){returntypeoft=="object"?t!==null:typeoft=="function"}});varps=C((yk,Ou)=>{varyr=Be();Ou.exports=function(t,e){if(!yr(t))returnt;varn,i;if(e&&typeof(n=t.toString)=="function"&&!yr(i=n.call(t))||typeof(n=t.valueOf)=="function"&&!yr(i=n.call(t))||!e&&typeof(n=t.toString)=="function"&&!yr(i=n.call(t)))returni;throwTypeError("Can't convert object to primitive value")}});varon=C((Ek,Au)=>{varS_=rn();Au.exports=function(t){returnObject(S_(t))}});varFe=C((_k,Cu)=>{varw_=on(),T_={}.hasOwnProperty;Cu.exports=Object.hasOwn||function(e,n){returnT_.call(w_(e),n)}});vargs=C((Sk,Du)=>{varx_=pe(),Lu=Be(),ms=x_.document,O_=Lu(ms)&&Lu(ms.createElement);Du.exports=function(t){returnO_?ms.createElement(t):{}}});varvs=C((wk,Mu)=>{varA_=It(),C_=me(),L_=gs();Mu.exports=!A_&&!C_(function(){returnObject.defineProperty(L_("div"),"a",{get:function(){return7}}).a!=7})});varbs=C(ku=>{varD_=It(),M_=hs(),I_=br(),k_=bi(),N_=ps(),P_=Fe(),R_=vs(),Iu=Object.getOwnPropertyDescriptor;ku.f=D_?Iu:function(e,n){if(e=k_(e),n=N_(n,!0),R_)try{returnIu(e,n)}catch(i){}if(P_(e,n))returnI_(!M_.f.call(e,n),e[n])}});varze=C((xk,Nu)=>{varj_=Be();Nu.exports=function(t){if(!j_(t))throwTypeError(String(t)+" is not an object");returnt}});varkt=C(ju=>{varH_=It(),q_=vs(),Pu=ze(),$_=ps(),Ru=Object.defineProperty;ju.f=H_?Ru:function(e,n,i){if(Pu(e),n=$_(n,!0),Pu(i),q_)try{returnRu(e,n,i)}catch(o){}if("get"ini||"set"ini)throwTypeError("Accessors not supported");return"value"ini&&(e[n]=i.v
`)&&(y="(?: "+y+")",v=" "+v,h++),a=new RegExp("^(?:"+y+")",b)),Ga&&(a=new RegExp("^"+y+"$(?!\\s)",b)),Ka&&(c=n.lastIndex),f=ro.call(p?a:n,v),p?f?(f.input=f.input.slice(h),f[0]=f[0].slice(h),f.index=n.lastIndex,n.lastIndex+=f[0].length):n.lastIndex=0:Ka&&f&&(n.lastIndex=n.global?f.index+f[0].length:c),Ga&&f&&f.length>1&&a0.call(f[0],a,function(){for(u=1;u<arguments.length-2;u++)arguments[u]===void 0&&(f[u]=void 0)}),f&&d)for(f.groups=l=i0(null),u=0;u<d.length;u++)m=d[u],l[m[0]]=f[m[1]];return f});Jp.exports=Ua});var Xa=C(()=>{"use strict";var c0=Et(),Zp=oo();c0({target:"RegExp",proto:!0,forced:/./.exec!==Zp},{exec:Zp})});var Ja=C((CR,im)=>{"use strict";Xa();var em=ln(),u0=oo(),tm=me(),nm=Te(),f0=tt(),d0=nm("species"),Qa=RegExp.prototype;im.exports=function(t,e,n,i){var o=nm(t),s=!tm(function(){var u={};return u[o]=function(){return 7},""[t](u)!=7}),a=s&&!tm(function(){var u=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[d0]=function(){return l},l.flags="",l[o]=/./[o]),l.exec=function(){return u=!0,null},l[o](""),!u});if(!s||!a||n){var c=/./[o],f=e(o,""[t],function(u,l,m,d,p){var b=l.exec;return b===u0||b===Qa.exec?s&&!p?{done:!0,value:c.call(l,m,d)}:{done:!0,value:u.call(m,l,d)}:{done:!1}});em(String.prototype,t,f[0]),em(Qa,o,f[1])}i&&f0(Qa[o],"sham",!0)}});var Za=C((LR,rm)=>{"use strict";var h0=ca().charAt;rm.exports=function(t,e,n){return e+(n?h0(t,e).length:1)}});var el=C((DR,om)=>{var p0=Dn(),m0=oo();om.exports=function(t,e){var n=t.exec;if(typeof n=="function"){var i=n.call(t,e);if(typeof i!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return i}if(p0(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return m0.call(t,e)}});var lm=C((IR,am)=>{var _0=on(),S0=Math.floor,w0="".replace,T0=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,x0=/\$([$&'`]|\d{1,2})/g;am.exports=function(t,e,n,i,o,s){vara=n+t.length,c=i.length,f=x0;returno!==void0&&(o=_0(o),f=T0),w0.call(s,f,function(u,l){varm;switch(l.charAt(0)){case"$":return"$";case"&":returnt;case"`":returne.slice(0,n);case"'":returne.slice(a);case"<":m=o[l.slice(1,-1)];break;default:vard=+l;if(d===0)returnu;if(d>c){varp=S0(d/10);returnp===0?u:p<=c?i[p-1]===void0?l.charAt(1):i[p-1]+l.charAt(1):u}m=i[d-1]}returnm===void0?"":m})}});varhm=C(rl=>{"use strict";rl.parse=W0;rl.serialize=V0;varB0=decodeURIComponent,F0=encodeURIComponent,z0=/; */,co=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;functionW0(t,e){if(typeoft!="string")thrownewTypeError("argument str must be a string");for(varn={},i=e||{},o=t.split(z0),s=i.decode||B0,a=0;a<o.length;a++){varc=o[a],f=c.indexOf("=");if(!(f<0)){varu=c.substr(0,f).trim(),l=c.substr(++f,c.length).trim();l[0]=='"'&&(l=l.slice(1,-1)),n[u]==null&&(n[u]=Y0(l,s))}}returnn}functionV0(t,e,n){vari=n||{},o=i.encode||F0;if(typeofo!="function")thrownewTypeError("option encode is invalid");if(!co.test(t))thrownewTypeError("argument name is invalid");vars=o(e);if(s&&!co.test(s))thrownewTypeError("argument val is invalid");vara=t+"="+s;if(i.maxAge!=null){varc=i.maxAge-0;if(isNaN(c)||!isFinite(c))thrownewTypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(c)}if(i.domain){if(!co.test(i.domain))thrownewTypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!co.test(i.path))thrownewTypeError("option path is invalid");a+="; Path="+i.path}if(i.expires){if(typeofi.expires.toUTCString!="function")thrownewTypeError("option expires is invalid");a+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){varf=typeofi.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(f){case!0:a+="; SameSite=Strict";break;case"lax":a+="; SameSite=Lax";break;case"strict":a+="; SameSite=Strict";break;case"none":a+="; SameSite=None";break;default:thrownewTypeError("option sameSite is invalid")}}returna}functionY0(t,e){try{returne(t)}catch(n){returnt}}});varcl=C((xm,fo)=>{(function(t,e){typeofdefine=="function"&&define.amd?define(e):typeoffo=="object"&&fo.exports?fo.expo
`)}:!a.ok&&"detail"in f?{error:f.detail}:f})}function uo(t,e){return ke(this,null,function*(){return yield vm(t,"PATCH",e)})}function K0(t){return ke(this,null,function*(){return yield vm(t,"GET")})}function bm(t){return ke(this,null,function*(){return yield K0(t)})}function*H(...t){for(let e of t)for(let n of document.querySelectorAll(e))n!==null&&(yield n)}function vn(t){return document.getElementById(t)}function ym(t,e=0){let n=e,i=document.getElementById("content-title");i!==null&&(n+=i.getBoundingClientRect().bottom);let o=t.getBoundingClientRect().top+window.pageYOffset+n;window.scrollTo({top:o,behavior:"smooth"})}function Em(t){let e=[];for(let n of t.querySelectorAll("select"))if(n!==null){let i={name:n.name,options:[]};for(let o of n.options)o.selected&&i.options.push(o.value);e=[...e,i]}return e}function*_m(t){for(let e of t.querySelectorAll("td"))e!==null&&ie(e.innerText)&&e.innerText!=="\u2014"&&(yield e.innerText.replaceAll(/[\n\r]/g,"").trim())}function Le(t,e,n){function i(s){return!!(typeof n=="string"&&s!==null&&s.matches(n))}function o(s){if(s!==null&&s.parentElement!==null&&!i(s)){for(let a of s.parentElement.querySelectorAll(e))if(a!==null)return a;return o(s.parentElement.parentElement)}return null}return o(t)}function al(t,e,n,i=[]){let o=document.createElement(t);for(let s of Object.keys(e)){let a=s,c=e[a];a in o&&(o[a]=c)}o.classList.add(...n);for(let s of i)o.appendChild(s);return o}function Sm(t,e){let n=new Map;for(let i of t){let o=i[e];n.has(o)||n.set(o,i)}return Array.from(n.values())}function G0(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=Le(e,"form"),i=e.getAttribute("href");n!==null&&ie(i)&&(n.setAttribute("action",i),n.submit())}}function X0(){for(let t of H("a.formaction"))t.addEventListener("click",G0)}function Q0(){for(let t of H("a.set_speed"))if(t!==null){let e=function(n){n.preventDefault();let i=t.getAttribute("data"),o=document.getElementById(t.target);o!==null&&i!==null&&(o.value=i)};t.addEventListener("click",e)}}function J0(t,e){let n=new Set;for(let i of e.querySelectorAll("*[name]"))i.validity.valid?(i.classList.contains("is-invalid")&&i.classList.remove("is-invalid"),i.classList.contains("is-valid")||i.classList.add("is-valid")):(n.add(i.name),i.classList.contains("is-valid")&&i.classList.remove("is-valid"),i.classList.contains("is-invalid")||i.classList.add("is-invalid"));if(n.size!==0){let i=e.elements.namedItem(Array.from(n)[0]);ym(i),t.preventDefault()}}function Z0(){for(let t of H("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>J0(i,t))}}function eC(t){let e=Array.from(t.options);for(let n=1;n<e.length;n++){let i=e[n];i.selected&&(t.removeChild(i),t.insertBefore(i,t.options[n-1]))}}function tC(t){let e=Array.from(t.options);for(let n=e.length-2;n>=0;n--){let i=e[n];if(i.selected){let o=t.options[n+1];i=t.removeChild(i),o=t.replaceChild(i,o),t.insertBefore(o,i)}}}function nC(){for(let t of H("#move-option-up")){let e=t.getAttribute("data-target");if(e!==null)for(let n of H(`#${e}`))t.addEventListener("click",()=>eC(n))}for(let t of H("#move-option-down")){let e=t.getAttribute("data-target");if(e!==null)for(let n of H(`#${e}`))t.addEventListener("click",()=>tC(n))}}var wm={region:{hide:["id_sitegroup","id_site","id_location","id_rack","id_clustergroup","id_cluster"],show:["id_region"]},"site group":{hide:["id_region","id_site","id_location","id_rack","id_clustergroup","id_cluster"],show:["id_sitegroup"]},site:{hide:["id_location","id_rack","id_clustergroup","id_cluster"],show:["id_region","id_sitegroup","id_site"]},location:{hide:["id_rack","id_clustergroup","id_cluster"],show:["id_region","id_sitegroup","id_site","id_location"]},rack:{hide:["id_clustergroup","id_cluster"],show:["id_region","id_sitegroup","id_site","id_location","id_rack"]},"cluster group":{hide:["id_region","id_sitegroup","id_site","id_location","id_rack","id_cluster"],show:["id_clustergroup"]},cluster:{hide:["id_region","id_sitegroup","id_site","id_location","id_rack"],show:["id_clustergroup","id_cluster"]},default:{hide:["id_reg
`,"").trim(),document.head.appendChild(o)}}resetClasses(){let e=this.slim.slim;if(e)for(let n of this.base.classList)e.container.classList.remove(n)}initResetButton(){let e=Le(this.base,"button[data-reset-select]");e!==null&&e.addEventListener("click",()=>{window.location.assign(window.location.origin+window.location.pathname)})}initRefreshButton(){if(this.allowRefresh){let e=al("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[al("i",{},["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),this.slim.slim.search.container.appendChild(e)}}};function cg(){for(let t of H(".netbox-api-select"))new lg(t)}function ug(t){return typeof t.value=="string"&&t.value!==""}function fg(){for(let t of H("select.netbox-color-select")){let n=function(i){if(e.slim.singleSelected!==null)if(ug(i)){let o=`#${i.value}`,s=Pi(o);e.slim.singleSelected.container.style.backgroundColor=o,e.slim.singleSelected.container.style.color=s}else e.slim.singleSelected.container.removeAttribute("style")};for(let i of t.options)if(ug(i)){let o=`#${i.value}`,s=Pi(o);i.style.backgroundColor=o,i.style.color=s}let e=new $n({select:t,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle" style="color: currentColor;"></i>'});for(let i of e.data.data)if("selected"in i&&i.selected){n(i);break}for(let i of t.classList)e.slim.container.classList.remove(i);e.onChange=n}}function dg(){for(let t of H(".netbox-static-select"))if(t!==null){let e=document.querySelector(`label[for=${t.id}]`),n;e!==null&&(n=`Select${e.innerText.trim()}`);let i=new $n({select:t,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle"></i>',placeholder:n});for(let o of t.classList)i.slim.container.classList.remove(o)}}function hg(){for(let t of[cg,fg,dg])t()}var Bn="netbox-color-mode",PC="Light Mode",RC="Dark Mode",pg="mdi-lightbulb-on",mg="mdi-lightbulb";function jC(t){return t==="dark"||t==="light"}function HC(t){return localStorage.setItem(Bn,t)}function qC(t){var e,n;document.documentElement.setAttribute(`data-${Bn}`,t);for(let i of H("span.color-mode-text"))t==="light"?i.innerText=RC:t==="dark"&&(i.innerText=PC);for(let i of H("i.color-mode-icon","span.color-mode-icon"))t==="light"?(i.classList.remove(pg),i.classList.add(mg)):t==="dark"&&(i.classList.remove(mg),i.classList.add(pg));for(let i of H(".rack_elevation")){let o=(n=(e=i.contentDocument)==null?void 0:e.querySelector("svg"))!=null?n:null;o!==null&&o.setAttribute(`data-${Bn}`,t)}}function Ue(t){for(let e of[HC,qC])e(t)}function $C(){let t=localStorage.getItem(Bn);t==="light"?Ue("dark"):t==="dark"?Ue("light"):console.warn("Unable to determine the current color mode")}function BC(){let t=localStorage.getItem(Bn),e=document.documentElement.getAttribute(`data-${Bn}`);if(ie(e)&&ie(t))return Ue(t);let n="none";for(let i of["dark","light"])if(window.matchMedia(`(prefers-color-scheme:${i})`).matches){n=i;break}if(ie(t)&&!ie(e)&&jC(t))return Ue(t);switch(n){case"dark":return Ue("dark");case"light":return Ue("light");case"none":return Ue("light");default:return Ue("light")}}function FC(){for(let t of H("button.color-mode-toggle"))t.addEventListener("click",$C)}function gg(){window.addEventListener("load",BC);for(let t of[FC])t()}function zC(t){let e=t.getAttribute("data"),n=t.classList.contains("connected"),i=n?"planned":"connected";ie(e)&&uo(`/api/dcim/cables/${e}/`,{status:i}).then(o=>{var s;if(jn(o)){Hn("danger","Error",o.error).show();return}else{let a=(s=t.parentElement)==null?void 0:s.parentElement,c=t.querySelector("i.mdi, span.mdi");n?(a.classList.remove("success"),a.classList.add("info"),t.classList.remove("connected","btn-warning"),t.classList.add("btn-info"),t.title="Mark Installed",c.classList.remove("mdi-lan-disconnect"),c.classList.add("mdi-lan-connect")):(a.classList.remove("info"),a.classList.add("success"),t.classList.remove("btn-success"),t.classList.add("connected","btn-warning"),t.title="Mark Installed",c.classList.remove("mdi-lan-connect"),c.classList.add("mdi-lan-disconnect"))}})}function WC(){for(let t of H("button.cable-toggle"))t.addEventListener("click",()=>zC(t))}function