(()=>{vardv=Object.create;varUn=Object.defineProperty,hv=Object.defineProperties,pv=Object.getOwnPropertyDescriptor,mv=Object.getOwnPropertyDescriptors,gv=Object.getOwnPropertyNames,kl=Object.getOwnPropertySymbols,vv=Object.getPrototypeOf,Nl=Object.prototype.hasOwnProperty,bv=Object.prototype.propertyIsEnumerable;varNo=(t,e,n)=>eint?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e)=>{for(varnine||(e={}))Nl.call(e,n)&&No(t,n,e[n]);if(kl)for(varnofkl(e))bv.call(e,n)&&No(t,n,e[n]);returnt},Yi=(t,e)=>hv(t,mv(e)),Pl=t=>Un(t,"__esModule",{value:!0});varC=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),yv=(t,e)=>{Pl(t);for(varnine)Un(t,n,{get:e[n],enumerable:!0})},Ev=(t,e,n)=>{if(e&&typeofe=="object"||typeofe=="function")for(letiofgv(e))!Nl.call(t,i)&&i!=="default"&&Un(t,i,{get:()=>e[i],enumerable:!(n=pv(e,i))||n.enumerable});returnt},Oe=t=>Ev(Pl(Un(t!=null?dv(vv(t)):{},"default",t&&t.__esModule&&"default"int?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);varG=(t,e,n)=>(No(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((gk,gu)=>{varbr=function(t){returnt&&t.Math==Math&&t};gu.exports=br(typeofglobalThis=="object"&&globalThis)||br(typeofwindow=="object"&&window)||br(typeofself=="object"&&self)||br(typeofglobal=="object"&&global)||function(){returnthis}()||Function("return this")()});varme=C((vk,vu)=>{vu.exports=function(t){try{return!!t()}catch(e){return!0}}});varIt=C((bk,bu)=>{varb_=me();bu.exports=!b_(function(){returnObject.defineProperty({},1,{get:function(){return7}})[1]!=7})});varms=C(_u=>{"use strict";varyu={}.propertyIsEnumerable,Eu=Object.getOwnPropertyDescriptor,y_=Eu&&!yu.call({1:2},1);_u.f=y_?function(e){varn=Eu(this,e);return!!n&&n.enumerable}:yu});varyr=C((Ek,Su)=>{Su.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});varDn=C((_k,wu)=>{varE_={}.toString;wu.exports=function(t){returnE_.call(t).slice(8,-1)}});varvi=C((Sk,Tu)=>{var__=me(),S_=Dn(),w_="".split;Tu.exports=__(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){returnS_(t)=="String"?w_.call(t,""):Object(t)}:Object});varrn=C((wk,xu)=>{xu.exports=function(t){if(t==null)throwTypeError("Can't call method on "+t);returnt}});varbi=C((Tk,Ou)=>{varT_=vi(),x_=rn();Ou.exports=function(t){returnT_(x_(t))}});varBe=C((xk,Au)=>{Au.exports=function(t){returntypeoft=="object"?t!==null:typeoft=="function"}});vargs=C((Ok,Cu)=>{varEr=Be();Cu.exports=function(t,e){if(!Er(t))returnt;varn,i;if(e&&typeof(n=t.toString)=="function"&&!Er(i=n.call(t))||typeof(n=t.valueOf)=="function"&&!Er(i=n.call(t))||!e&&typeof(n=t.toString)=="function"&&!Er(i=n.call(t)))returni;throwTypeError("Can't convert object to primitive value")}});varon=C((Ak,Lu)=>{varO_=rn();Lu.exports=function(t){returnObject(O_(t))}});varFe=C((Ck,Du)=>{varA_=on(),C_={}.hasOwnProperty;Du.exports=Object.hasOwn||function(e,n){returnC_.call(A_(e),n)}});varbs=C((Lk,Iu)=>{varL_=pe(),Mu=Be(),vs=L_.document,D_=Mu(vs)&&Mu(vs.createElement);Iu.exports=function(t){returnD_?vs.createElement(t):{}}});varys=C((Dk,ku)=>{varM_=It(),I_=me(),k_=bs();ku.exports=!M_&&!I_(function(){returnObject.defineProperty(k_("div"),"a",{get:function(){return7}}).a!=7})});varEs=C(Pu=>{varN_=It(),P_=ms(),R_=yr(),j_=bi(),H_=gs(),q_=Fe(),$_=ys(),Nu=Object.getOwnPropertyDescriptor;Pu.f=N_?Nu:function(e,n){if(e=j_(e),n=H_(n,!0),$_)try{returnNu(e,n)}catch(i){}if(q_(e,n))returnR_(!P_.f.call(e,n),e[n])}});varze=C((Ik,Ru)=>{varB_=Be();Ru.exports=function(t){if(!B_(t))throwTypeError(String(t)+" is not an object");returnt}});varkt=C(qu=>{varF_=It(),z_=ys(),ju=ze(),W_=gs(),Hu=Object.defineProperty;qu.f=F_?Hu:function(e,n,i){if(ju(e),n=W_(n,!0),ju(i),z_)try{returnHu(e,n,i)}catch(o){}if("get"ini||"set"ini)throwTypeError("Accessors not supported");return"value"ini&&(e[n]=i.v
`)&&(y="(?: "+y+")",b=" "+b,h++),a=new RegExp("^(?:"+y+")",v)),Qa&&(a=new RegExp("^"+y+"$(?!\\s)",v)),Xa&&(c=n.lastIndex),f=oo.call(p?a:n,b),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:Xa&&f&&(n.lastIndex=n.global?f.index+f[0].length:c),Qa&&f&&f.length>1&&f0.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=a0(null),u=0;u<d.length;u++)m=d[u],l[m[0]]=f[m[1]];return f});em.exports=Ga});var Ja=C(()=>{"use strict";var h0=Et(),tm=so();h0({target:"RegExp",proto:!0,forced:/./.exec!==tm},{exec:tm})});var el=C((PR,om)=>{"use strict";Ja();var nm=ln(),p0=so(),im=me(),rm=Te(),m0=tt(),g0=rm("species"),Za=RegExp.prototype;om.exports=function(t,e,n,i){var o=rm(t),s=!im(function(){var u={};return u[o]=function(){return 7},""[t](u)!=7}),a=s&&!im(function(){var u=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[g0]=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 v=l.exec;return v===p0||v===Za.exec?s&&!p?{done:!0,value:c.call(l,m,d)}:{done:!0,value:u.call(m,l,d)}:{done:!1}});nm(String.prototype,t,f[0]),nm(Za,o,f[1])}i&&m0(Za[o],"sham",!0)}});var tl=C((RR,sm)=>{"use strict";var v0=fa().charAt;sm.exports=function(t,e,n){return e+(n?v0(t,e).length:1)}});var nl=C((jR,am)=>{var b0=Dn(),y0=so();am.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(b0(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return y0.call(t,e)}});var um=C((qR,cm)=>{var x0=on(),O0=Math.floor,A0="".replace,C0=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,L0=/\$([$&'`]|\d{1,2})/g;cm.exports=function(t,e,n,i,o,s){vara=n+t.length,c=i.length,f=L0;returno!==void0&&(o=x0(o),f=C0),A0.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=O0(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})}});varmm=C(sl=>{"use strict";sl.parse=K0;sl.serialize=G0;varV0=decodeURIComponent,Y0=encodeURIComponent,U0=/; */,uo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;functionK0(t,e){if(typeoft!="string")thrownewTypeError("argument str must be a string");for(varn={},i=e||{},o=t.split(U0),s=i.decode||V0,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]=X0(l,s))}}returnn}functionG0(t,e,n){vari=n||{},o=i.encode||Y0;if(typeofo!="function")thrownewTypeError("option encode is invalid");if(!uo.test(t))thrownewTypeError("argument name is invalid");vars=o(e);if(s&&!uo.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(!uo.test(i.domain))thrownewTypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!uo.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}functionX0(t,e){try{returne(t)}catch(n){returnt}}});varfl=C((Am,ho)=>{(function(t,e){typeofdefine=="function"&&define.amd?define(e):typeofho=="object"&&ho.exports?ho.expo
`)}:!a.ok&&"detail"in f?{error:f.detail}:f})}function fo(t,e){return ke(this,null,function*(){return yield ym(t,"PATCH",e)})}function J0(t){return ke(this,null,function*(){return yield ym(t,"GET")})}function Em(t){return ke(this,null,function*(){return yield J0(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 _m(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 Sm(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*wm(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 cl(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 Tm(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 Z0(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 eC(){for(let t of H("a.formaction"))t.addEventListener("click",Z0)}function tC(){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 nC(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]);_m(i),t.preventDefault()}}function iC(){for(let t of H("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>nC(i,t))}}function rC(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 oC(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 sC(){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",()=>rC(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",()=>oC(n))}}var xm={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=cl("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[cl("i",{},["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),this.slim.slim.search.container.appendChild(e)}}};function fg(){for(let t of H(".netbox-api-select"))new ug(t)}function dg(t){return typeof t.value=="string"&&t.value!==""}function hg(){for(let t of H("select.netbox-color-select")){let n=function(i){if(e.slim.singleSelected!==null)if(dg(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(dg(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 pg(){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 mg(){for(let t of[fg,hg,pg])t()}var Bn="netbox-color-mode",qC="Light Mode",$C="Dark Mode",gg="mdi-lightbulb-on",vg="mdi-lightbulb";function BC(t){return t==="dark"||t==="light"}function FC(t){return localStorage.setItem(Bn,t)}function zC(t){var e,n;document.documentElement.setAttribute(`data-${Bn}`,t);for(let i of H("span.color-mode-text"))t==="light"?i.innerText=$C:t==="dark"&&(i.innerText=qC);for(let i of H("i.color-mode-icon","span.color-mode-icon"))t==="light"?(i.classList.remove(gg),i.classList.add(vg)):t==="dark"&&(i.classList.remove(vg),i.classList.add(gg));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[FC,zC])e(t)}function WC(){let t=localStorage.getItem(Bn);t==="light"?Ue("dark"):t==="dark"?Ue("light"):console.warn("Unable to determine the current color mode")}function VC(){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)&&BC(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 YC(){for(let t of H("button.color-mode-toggle"))t.addEventListener("click",WC)}function bg(){window.addEventListener("load",VC);for(let t of[YC])t()}var yg=class{set(e,n,i){return e[n]=i,!0}get(e,n){return e[n]}has(e,n){return n in e}},So=class{constructor(e,n){G(this,"handlers");G(this,"proxy");G(this,"options");G(this,"key","");if(this.options=n,typeof this.options.key=="string"?this.key=this.options.key:this.key=this.generateStateKey(e),this.options.persist){let i=this.retrieve();i!==null&&(e=V(V({},e),i))}this.handlers=new yg,this.proxy=new Proxy(e,this.handlers),this.options.persist&&this.save()}generateStateKey(e){return`netbox-${window.btoa(Object.keys(e).join("---"))}`}get(e){return this.handlers.get(this.proxy,e)}set(e,n){this.handlers.set(this.proxy,e,n),this.options.persist&&this.save()}all(){return this.proxy}keys(){return Object.keys(this.proxy)}values(){return Object.values(this.proxy)}save(){let e=JSON.stringify(this.proxy);localStorage.setItem(this.key,e)}retrieve(){let e=localStorage.getItem(this.key);r