1
0
mirror of https://github.com/netbox-community/netbox.git synced 2024-05-10 07:54:54 +00:00
Files
netbox-community-netbox/netbox/project-static/dist/netbox.js

46 lines
372 KiB
JavaScript
Raw Normal View History

2022-10-04 15:02:37 +02:00
"use strict";(()=>{var A_=Object.create;var Hs=Object.defineProperty,C_=Object.defineProperties,L_=Object.getOwnPropertyDescriptor,D_=Object.getOwnPropertyDescriptors,M_=Object.getOwnPropertyNames,Sd=Object.getOwnPropertySymbols,I_=Object.getPrototypeOf,xd=Object.prototype.hasOwnProperty,N_=Object.prototype.propertyIsEnumerable;var Lc=(tn,nn,en)=>nn in tn?Hs(tn,nn,{enumerable:!0,configurable:!0,writable:!0,value:en}):tn[nn]=en,Un=(tn,nn)=>{for(var en in nn||(nn={}))xd.call(nn,en)&&Lc(tn,en,nn[en]);if(Sd)for(var en of Sd(nn))N_.call(nn,en)&&Lc(tn,en,nn[en]);return tn},qs=(tn,nn)=>C_(tn,D_(nn));var On=(tn,nn)=>()=>(nn||tn((nn={exports:{}}).exports,nn),nn.exports),P_=(tn,nn)=>{for(var en in nn)Hs(tn,en,{get:nn[en],enumerable:!0})},k_=(tn,nn,en,rn)=>{if(nn&&typeof nn=="object"||typeof nn=="function")for(let on of M_(nn))!xd.call(tn,on)&&on!==en&&Hs(tn,on,{get:()=>nn[on],enumerable:!(rn=L_(nn,on))||rn.enumerable});return tn};var yi=(tn,nn,en)=>(en=tn!=null?A_(I_(tn)):{},k_(nn||!tn||!tn.__esModule?Hs(en,"default",{value:tn,enumerable:!0}):en,tn));var Xn=(tn,nn,en)=>(Lc(tn,typeof nn!="symbol"?nn+"":nn,en),en);var Xr=(tn,nn,en)=>new Promise((rn,on)=>{var an=un=>{try{ln(en.next(un))}catch(fn){on(fn)}},sn=un=>{try{ln(en.throw(un))}catch(fn){on(fn)}},ln=un=>un.done?rn(un.value):Promise.resolve(un.value).then(an,sn);ln((en=en.apply(tn,nn)).next())});var op=On((exports,module)=>{(function(tn,nn){typeof define=="function"&&define.amd?define([],nn):tn.htmx=tn.htmx||nn()})(typeof self!="undefined"?self:exports,function(){return function(){"use strict";var U={onLoad:t,process:vt,on:X,off:F,trigger:$,ajax:nr,find:R,findAll:O,closest:N,values:function(tn,nn){var en=Pt(tn,nn||"post");return en.values},remove:q,addClass:L,removeClass:T,toggleClass:A,takeClass:H,defineExtension:fr,removeExtension:cr,logAll:C,logger:null,config:{historyEnabled:!0,historyCacheSize:10,refreshOnHistoryMiss:!1,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:!0,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:!0,inlineScriptNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:!1,timeout:0,wsReconnectDelay:"full-jitter",disableSelector:"[hx-disable], [data-hx-disable]",useTemplateFragments:!1,scrollBehavior:"smooth",defaultFocusScroll:!1},parseInterval:v,_:e,createEventSource:function(tn){return new EventSource(tn,{withCredentials:!0})},createWebSocket:function(tn){return new WebSocket(tn,[])},version:"1.8.0"},r={addTriggerHandler:st,bodyContains:K,canAccessLocalStorage:E,filterValues:Ut,hasAttribute:o,getAttributeValue:V,getClosestMatch:h,getExpressionVars:Qt,getHeaders:Bt,getInputValues:Pt,getInternalData:W,getSwapSpecification:_t,getTriggerSpecs:Me,getTarget:re,makeFragment:g,mergeObjects:Y,makeSettleInfo:Gt,oobSwap:ae,selectAndSwap:Ee,settleImmediately:Lt,shouldCancel:je,triggerEvent:$,triggerErrorEvent:J,withExtensions:xt},n=["get","post","put","delete","patch"],i=n.map(function(tn){return"[hx-"+tn+"], [data-hx-"+tn+"]"}).join(", ");function v(tn){if(tn!=null)return tn.slice(-2)=="ms"?parseFloat(tn.slice(0,-2))||void 0:tn.slice(-1)=="s"?parseFloat(tn.slice(0,-1))*1e3||void 0:tn.slice(-1)=="m"?parseFloat(tn.slice(0,-1))*1e3*60||void 0:parseFloat(tn)||void 0}function f(tn,nn){return tn.getAttribute&&tn.getAttribute(nn)}function o(tn,nn){return tn.hasAttribute&&(tn.hasAttribute(nn)||tn.hasAttribute("data-"+nn))}function V(tn,nn){return f(tn,nn)||f(tn,"data-"+nn)}function u(tn){return tn.parentElement}function _(){return document}function h(tn,nn){for(;tn&&!nn(tn);)tn=u(tn);return tn||null}function a(tn,nn,en){var rn=V(nn,en),on=V(nn,"hx-disinherit");return tn!==nn&&on&&(on==="*"||on.split(" ").indexOf(en)>=0)?"unset":rn}function z(tn,nn){var en=null;if(h(tn,function(rn){return en=a(tn,rn,nn)}),en!=="unset")return en}function d(tn,nn){var en=tn.matches||tn.matchesSelector||tn.msMatchesSelector||tn.mozMatchesSelector||tn.webkitMatchesSelector||tn.oMatchesSelector;return en&&en.call(tn,nn)}fun
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var cg=On((dq,lg)=>{var hA=ko(),pA=co(),mA=qu(),Tl="["+mA+"]",gA=RegExp("^"+Tl+Tl+"*"),vA=RegExp(Tl+Tl+"*$"),$u=function(tn){return function(nn){var en=pA(hA(nn));return tn&1&&(en=en.replace(gA,"")),tn&2&&(en=en.replace(vA,"")),en}};lg.exports={start:$u(1),end:$u(2),trim:$u(3)}});var dg=On((hq,fg)=>{var bA=Ir(),yA=co(),EA=cg().trim,ug=qu(),Ol=bA.parseInt,_A=/^[+-]?0[Xx]/,SA=Ol(ug+"08")!==8||Ol(ug+"0x16")!==22;fg.exports=SA?function(nn,en){var rn=EA(yA(nn));return Ol(rn,en>>>0||(_A.test(rn)?16:10))}:Ol});var ju=On((pq,pg)=>{var wA=Pu(),TA=xl();pg.exports=Object.keys||function(nn){return wA(nn,TA)}});var bg=On((mq,vg)=>{"use strict";var mg=oo(),OA=jr(),Fu=ju(),AA=ku(),CA=Mu(),LA=Ro(),DA=as(),ga=Object.assign,gg=Object.defineProperty;vg.exports=!ga||OA(function(){if(mg&&ga({b:1},ga(gg({},"a",{enumerable:!0,get:function(){gg(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var tn={},nn={},en=Symbol(),rn="abcdefghijklmnopqrst";return tn[en]=7,rn.split("").forEach(function(on){nn[on]=on}),ga({},tn)[en]!=7||Fu(ga({},nn)).join("")!=rn})?function(nn,en){for(var rn=LA(nn),on=arguments.length,an=1,sn=AA.f,ln=CA.f;on>an;)for(var un=DA(arguments[an++]),fn=sn?Fu(un).concat(sn(un)):Fu(un),cn=fn.length,pn=0,dn;cn>pn;)dn=fn[pn++],(!mg||ln.call(un,dn))&&(rn[dn]=un[dn]);return rn}:ga});var _g=On((gq,Eg)=>{var IA=jr(),NA=Ur(),PA=pl(),kA=NA("species");Eg.exports=function(tn){return PA>=51||!IA(function(){var nn=[],en=nn.constructor={};return en[kA]=function(){return{foo:1}},nn[tn](Boolean).foo!==1})}});var xg=On((vq,Sg)=>{var jA=oo(),FA=ao(),BA=ui(),zA=ju();Sg.exports=jA?Object.defineProperties:function(nn,en){BA(nn);for(var rn=zA(en),on=rn.length,an=0,sn;on>an;)FA.f(nn,sn=rn[an++],en[sn]);return nn}});var Tg=On((bq,wg)=>{var WA=ts();wg.exports=WA("document","documentElement")});var Ll=On((yq,Ig)=>{var VA=ui(),UA=xg(),Og=xl(),YA=is(),GA=Tg(),KA=pu(),XA=bl(),Ag=">",Cg="<",zu="prototype",Wu="script",Dg=XA("IE_PROTO"),Bu=function(){},Mg=function(tn){return Cg+Wu+Ag+tn+Cg+"/"+Wu+Ag},Lg=function(tn){tn.write(Mg("")),tn.close();var nn=tn.parentWindow.Object;return tn=null,nn},JA=function(){var tn=KA("iframe"),nn="java"+Wu+":",en;return tn.style.display="none",GA.appendChild(tn),tn.src=String(nn),en=tn.contentWindow.document,en.open(),en.write(Mg("document.F=Object")),en.close(),en.F},Al,Cl=function(){try{Al=new ActiveXObject("htmlfile")}catch(nn){}Cl=typeof document!="undefined"?document.domain&&Al?Lg(Al):JA():Lg(Al);for(var tn=Og.length;tn--;)delete Cl[zu][Og[tn]];return Cl()};YA[Dg]=!0;Ig.exports=Object.create||function(nn,en){var rn;return nn!==null?(Bu[zu]=VA(nn),rn=new Bu,Bu[zu]=null,rn[Dg]=nn):rn=Cl(),en===void 0?rn:UA(rn,en)}});var Pg=On((Eq,Ng)=>{var QA=Ur(),ZA=Ll(),eC=ao(),Vu=QA("unscopables"),Uu=Array.prototype;Uu[Vu]==null&&eC.f(Uu,Vu,{configurable:!0,value:ZA(null)});Ng.exports=function(tn){Uu[Vu][tn]=!0}});var va=On((_q,kg)=>{kg.exports={}});var Hg=On((Sq,Rg)=>{var tC=jr();Rg.exports=!tC(function(){function tn(){}return tn.prototype.constructor=null,Object.getPrototypeOf(new tn)!==tn.prototype})});var Yu=On((xq,$g)=>{var nC=mi(),rC=Ro(),iC=bl(),oC=Hg(),qg=iC("IE_PROTO"),aC=Object.prototype;$g.exports=oC?Object.getPrototypeOf:function(tn){return tn=rC(tn),nC(tn,qg)?tn[qg]:typeof tn.constructor=="function"&&tn instanceof tn.constructor?tn.constructor.prototype:tn instanceof Object?aC:null}});var Ju=On((wq,zg)=>{"use strict";var sC=jr(),jg=Yu(),lC=Vi(),cC=mi(),uC=Ur(),fC=ll(),Xu=uC("iterator"),Fg=!1,dC=function(){return this},Fo,Gu,Ku;[].keys&&(Ku=[].keys(),"next"in Ku?(Gu=jg(jg(Ku)),Gu!==Object.prototype&&(Fo=Gu)):Fg=!0);var Bg=Fo==null||sC(function(){var tn={};return Fo[Xu].call(tn)!==tn});Bg&&(Fo={});(!fC||Bg)&&!cC(Fo,Xu)&&lC(Fo,Xu,dC);zg.exports={IteratorPrototype:Fo,BUGGY_SAFARI_ITERATORS:Fg}});var Dl=On((Tq,Vg)=>{var hC=ao().f,pC=mi(),mC=Ur(),Wg=mC("toStringTag");Vg.exports=function(tn,nn,en){tn&&!pC(tn=en?tn:tn.prototype,Wg)&&hC(tn,Wg,{configurable:!0,value:nn})}});var Yg=On((Oq,Ug)=>{"use strict";
`)&&tn.flags==="s")})});var ny=On((fj,ty)=>{var kM=jr(),RM=Ir(),HM=RM.RegExp;ty.exports=kM(function(){var tn=HM("(?<a>b)","g");return tn.exec("b").groups.a!=="b"||"b".replace(tn,"$<a>c")!=="bc"})});var Jl=On((dj,oy)=>{"use strict";var qM=co(),$M=Kb(),ry=Qb(),jM=fl(),FM=Ll(),BM=qo().get,zM=ey(),WM=ny(),Xl=RegExp.prototype.exec,VM=jM("native-string-replace",String.prototype.replace),Bf=Xl,zf=function(){var tn=/a/,nn=/b*/g;return Xl.call(tn,"a"),Xl.call(nn,"a"),tn.lastIndex!==0||nn.lastIndex!==0}(),iy=ry.UNSUPPORTED_Y||ry.BROKEN_CARET,Wf=/()??/.exec("")[1]!==void 0,UM=zf||Wf||iy||zM||WM;UM&&(Bf=function(nn){var en=this,rn=BM(en),on=qM(nn),an=rn.raw,sn,ln,un,fn,cn,pn,dn;if(an)return an.lastIndex=en.lastIndex,sn=Bf.call(an,on),en.lastIndex=an.lastIndex,sn;var hn=rn.groups,bn=iy&&en.sticky,gn=$M.call(en),mn=en.source,vn=0,_n=on;if(bn&&(gn=gn.replace("y",""),gn.indexOf("g")===-1&&(gn+="g"),_n=on.slice(en.lastIndex),en.lastIndex>0&&(!en.multiline||en.multiline&&on.charAt(en.lastIndex-1)!==`
`)&&(mn="(?: "+mn+")",_n=" "+_n,vn++),ln=new RegExp("^(?:"+mn+")",gn)),Wf&&(ln=new RegExp("^"+mn+"$(?!\\s)",gn)),zf&&(un=en.lastIndex),fn=Xl.call(bn?ln:en,_n),bn?fn?(fn.input=fn.input.slice(vn),fn[0]=fn[0].slice(vn),fn.index=en.lastIndex,en.lastIndex+=fn[0].length):en.lastIndex=0:zf&&fn&&(en.lastIndex=en.global?fn.index+fn[0].length:un),Wf&&fn&&fn.length>1&&VM.call(fn[0],ln,function(){for(cn=1;cn<arguments.length-2;cn++)arguments[cn]===void 0&&(fn[cn]=void 0)}),fn&&hn)for(fn.groups=pn=FM(null),cn=0;cn<hn.length;cn++)dn=hn[cn],pn[dn[0]]=fn[dn[1]];return fn});oy.exports=Bf});var Vf=On(()=>{"use strict";var YM=Ui(),ay=Jl();YM({target:"RegExp",proto:!0,forced:/./.exec!==ay},{exec:ay})});var Yf=On((mj,uy)=>{"use strict";Vf();var sy=$o(),GM=Jl(),ly=jr(),cy=Ur(),KM=Vi(),XM=cy("species"),Uf=RegExp.prototype;uy.exports=function(tn,nn,en,rn){var on=cy(tn),an=!ly(function(){var fn={};return fn[on]=function(){return 7},""[tn](fn)!=7}),sn=an&&!ly(function(){var fn=!1,cn=/a/;return tn==="split"&&(cn={},cn.constructor={},cn.constructor[XM]=function(){return cn},cn.flags="",cn[on]=/./[on]),cn.exec=function(){return fn=!0,null},cn[on](""),!fn});if(!an||!sn||en){var ln=/./[on],un=nn(on,""[tn],function(fn,cn,pn,dn,hn){var bn=cn.exec;return bn===GM||bn===Uf.exec?an&&!hn?{done:!0,value:ln.call(cn,pn,dn)}:{done:!0,value:fn.call(pn,cn,dn)}:{done:!1}});sy(String.prototype,tn,un[0]),sy(Uf,on,un[1])}rn&&KM(Uf[on],"sham",!0)}});var Gf=On((gj,fy)=>{"use strict";var JM=of().charAt;fy.exports=function(tn,nn,en){return nn+(en?JM(tn,nn).length:1)}});var Kf=On((vj,dy)=>{var QM=pa(),ZM=Jl();dy.exports=function(tn,nn){var en=tn.exec;if(typeof en=="function"){var rn=en.call(tn,nn);if(typeof rn!="object")throw TypeError("RegExp exec method returned something other than an Object or null");return rn}if(QM(tn)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return ZM.call(tn,nn)}});var gy=On((bj,my)=>{var cI=Ro(),uI=Math.floor,fI="".replace,dI=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,hI=/\$([$&'`]|\d{1,2})/g;my.exports=function(tn,nn,en,rn,on,an){var sn=en+tn.length,ln=rn.length,un=hI;return on!==void 0&&(on=cI(on),un=dI),fI.call(an,un,function(fn,cn){var pn;switch(cn.charAt(0)){case"$":return"$";case"&":return tn;case"`":return nn.slice(0,en);case"'":return nn.slice(sn);case"<":pn=on[cn.slice(1,-1)];break;default:var dn=+cn;if(dn===0)return fn;if(dn>ln){var hn=uI(dn/10);return hn===0?fn:hn<=ln?rn[hn-1]===void 0?cn.charAt(1):rn[hn-1]+cn.charAt(1):fn}pn=rn[dn-1]}return pn===void 0?"":pn})}});var rd=On((Hy,nc)=>{(function(tn,nn){typeof define=="function"&&define.amd?define(nn):typeof nc=="object"&&nc.exports?nc.exports=nn():tn.EvEmitter=nn()})(typeof window!="undefined"?window:Hy,function(){"use strict";function tn(){}var nn=tn.prototype;return nn.on=function(en,rn){if(!(!en||!rn)){var on=this._events=this._events||{},an=on[en]=on[en]||[];return an.indexOf(rn)==-1&&an.push(rn),this}},nn.once=function(en,rn){if(!(!en||!rn)){this.on(en,rn);var on=this._onceEvents=this._onceEvents||{},an=on[en]=on[en]||{};return an[rn]=!0,this}},nn.off=function(en,rn){var on=this._events&&this._events[en];if(!(!on||!on.length)){var an=on.indexOf(rn);return an!=-1&&on.splice(an,1),this}},nn.emitEvent=function(en,rn){var on=this._events&&this._events[en];if(!(!on||!on.length)){on=on.slice(0),rn=rn||[];for(var an=this._onceEvents&&this._onceEvents[en],sn=0;sn<on.length;sn++){var ln=on[sn],un=an&&an[ln];un&&(this.off(en,ln),delete an[ln]),ln.apply(this,rn)}return this}},nn.allOff=function(){delete this._events,delete this._onceEvents},tn})});var ic=On((Xj,rc)=>{(function(tn,nn){typeof define=="function"&&define.amd?define(nn):typeof rc=="object"&&rc.exports?rc.exports=nn():tn.getSize=nn()})(window,function(){"use strict";function nn(dn){var hn=parseFloat(dn),bn=dn.indexOf("%")==-1&&!isNaN(hn);return bn&&hn}function en(){}var rn=typeof console=="undefined"?en:function(dn){console.error(dn)},on=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBotto
`)}:!sn.ok&&"detail"in un?{error:un.detail}:un})}function tc(tn,nn){return Xr(this,null,function*(){return yield xy(tn,"PATCH",nn)})}function LI(tn){return Xr(this,null,function*(){return yield xy(tn,"GET")})}function wy(tn){return Xr(this,null,function*(){return yield LI(tn)})}function*Nn(...tn){for(let nn of tn)for(let en of document.querySelectorAll(nn))en!==null&&(yield en)}function Rr(tn){return document.getElementById(tn)}function Ty(tn,nn=0){let en=nn,rn=document.getElementById("content-title");rn!==null&&(en+=rn.getBoundingClientRect().bottom);let on=tn.getBoundingClientRect().top+window.pageYOffset+en;window.scrollTo({top:on,behavior:"smooth"})}function Oy(tn,nn="select"){let en=[];for(let rn of tn.querySelectorAll(nn))if(rn!==null){let on={name:rn.name,options:[]};for(let an of rn.options)an.selected&&on.options.push(an.value);en=[...en,on]}return en}function Es(tn,nn){tn!==null&&(typeof nn=="undefined"?window.getComputedStyle(tn).display==="none"?tn.style.display="":tn.style.display="none":nn==="show"?tn.style.display="":tn.style.display="none")}function Ni(tn,nn,en){function rn(an){return!!(typeof en=="string"&&an!==null&&an.matches(en))}function on(an){if(an!==null&&an.parentElement!==null&&!rn(an)){for(let sn of an.parentElement.querySelectorAll(nn))if(sn!==null)return sn;return on(an.parentElement.parentElement)}return null}return on(tn)}function xa(tn,nn,en=null,rn=[]){let on=document.createElement(tn);if(nn!==null)for(let an of Object.keys(nn)){let sn=an,ln=nn[sn];sn in on&&(on[sn]=ln)}en!==null&&en.length>0&&on.classList.add(...en);for(let an of rn)on.appendChild(an);return on}function Ay(tn,nn){let en=new Map;for(let rn of tn){let on=rn[nn];en.has(on)||en.set(on,rn)}return Array.from(en.values())}function fo(tn,nn,en){if(typeof tn!="string")throw new TypeError("replaceAll 'input' argument must be a string");if(typeof nn!="string"&&!(nn instanceof RegExp))throw new TypeError("replaceAll 'pattern' argument must be a string or RegExp instance");switch(typeof en){case"boolean":en=String(en);break;case"number":en=String(en);break;case"string":break;default:throw new TypeError("replaceAll 'replacement' argument must be stringifyable")}if(nn instanceof RegExp){let rn=Array.from(new Set([...nn.flags.split(""),"g"])).join("");nn=new RegExp(nn.source,rn)}else nn=new RegExp(nn,"g");return tn.replace(nn,en)}function DI(tn,nn){let en=new Set;for(let rn of nn.querySelectorAll("*[name]"))rn.validity.valid?rn.classList.contains("is-invalid")&&rn.classList.remove("is-invalid"):(en.add(rn.name),rn.classList.contains("is-invalid")||rn.classList.add("is-invalid"));if(en.size!==0){let rn=nn.elements.namedItem(Array.from(en)[0]);Ty(rn),tn.preventDefault()}}function Cy(){for(let tn of Nn("form")){let nn=tn.querySelectorAll("button[type=submit]");for(let en of nn)en.addEventListener("click",rn=>DI(rn,tn))}}function Ly(){for(let nn of Nn("a.set_speed"))if(nn!==null){let en=function(rn){rn.preventDefault();let on=nn.getAttribute("data"),an=document.getElementById(nn.target);an!==null&&on!==null&&(an.value=on)};var tn=en;nn.addEventListener("click",en)}}var Dy={vlangroup:{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_region","id_sitegroup","id_site","id_location","id_rack","id_clustergroup","id_cluster"],show:[]}}},Iy={vlangroup_add:"vlangroup",vlangr
div.ss-values div.ss-value[data-id="${en}"],
div.ss-list div.ss-option:not(.ss-disabled)[data-id="${en}"]
{
2021-12-14 15:55:40 -05:00
background-color: ${an} !important;
2022-10-04 15:02:37 +02:00
color: ${sn} !important;
}
`,`
2022-10-04 15:02:37 +02:00
`,"").trim(),document.head.appendChild(on)}}resetClasses(){let nn=this.slim.slim;if(nn)for(let en of this.base.classList)nn.container.classList.remove(en)}initResetButton(){let nn=Ni(this.base,"button[data-reset-select]");nn!==null&&nn.addEventListener("click",()=>{window.location.assign(window.location.origin+window.location.pathname)})}initRefreshButton(){if(this.allowRefresh){let nn=xa("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[xa("i",null,["mdi","mdi-reload"])]);nn.addEventListener("click",()=>this.loadData()),nn.type="button",this.slim.slim.search.container.appendChild(nn)}}};function xE(){for(let tn of Nn(".netbox-api-select"))new dc(tn)}function TE(tn){return typeof tn.value=="string"&&tn.value!==""}function wE(tn,nn){if(tn.slim.singleSelected!==null)if(TE(nn)){let en=`#${nn.value}`,rn=xs(en);tn.slim.singleSelected.container.style.backgroundColor=en,tn.slim.singleSelected.container.style.color=rn}else tn.slim.singleSelected.container.removeAttribute("style")}function OE(){for(let tn of Nn("select.netbox-color-select")){for(let en of tn.options)if(TE(en)){let rn=`#${en.value}`,on=xs(rn);en.style.backgroundColor=rn,en.style.color=on}let nn=new wa({select:tn,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle" style="color: currentColor;"></i>'});for(let en of nn.data.data)if("selected"in en&&en.selected){wE(nn,en);break}for(let en of tn.classList)nn.slim.container.classList.remove(en);nn.onChange=en=>wE(nn,en)}}function AE(){for(let tn of Nn(".netbox-static-select"))if(tn!==null){let nn=document.querySelector(`label[for="${tn.id}"]`),en;nn!==null&&(en=`Select ${nn.innerText.trim()}`);let rn=new wa({select:tn,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle"></i>',placeholder:en});for(let on of tn.classList)rn.slim.container.classList.remove(on)}}function CE(){for(let tn of[xE,OE,AE])tn()}function pN(tn){let nn=tn.getAttribute("data-url"),en=tn.classList.contains("connected"),rn=en?"planned":"connected";_r(nn)&&tc(nn,{status:rn}).then(on=>{var an;if(Yo(on)){ho("danger","Error",on.error).show();return}else{let sn=(an=tn.parentElement)==null?void 0:an.parentElement,ln=tn.querySelector("i.mdi, span.mdi");en?(sn.classList.remove("success"),sn.classList.add("info"),tn.classList.remove("connected","btn-warning"),tn.classList.add("btn-info"),tn.title="Mark Installed",ln.classList.remove("mdi-lan-disconnect"),ln.classList.add("mdi-lan-connect")):(sn.classList.remove("info"),sn.classList.add("success"),tn.classList.remove("btn-success"),tn.classList.add("connected","btn-warning"),tn.title="Mark Installed",ln.classList.remove("mdi-lan-connect"),ln.classList.add("mdi-lan-disconnect"))}})}function LE(){for(let tn of Nn("button.cable-toggle"))tn.addEventListener("click",()=>pN(tn))}var ld=class{set(nn,en,rn){return nn[en]=rn,!0}get(nn,en){return nn[en]}has(nn,en){return en in nn}},ws=class{constructor(nn,en){Xn(this,"handlers");Xn(this,"proxy");Xn(this,"options");Xn(this,"key","");if(this.options=en,typeof this.options.key=="string"?this.key=this.options.key:this.key=this.generateStateKey(nn),this.options.persist){let rn=this.retrieve();rn!==null&&(nn=Un(Un({},nn),rn))}this.handlers=new ld,this.proxy=new Proxy(nn,this.handlers),this.options.persist&&this.save()}generateStateKey(nn){return`netbox-${window.btoa(Object.keys(nn).join("---"))}`}get(nn){return this.handlers.get(this.proxy,nn)}set(nn,en){this.handlers.set(this.proxy,nn,en),this.options.persist&&this.save()}all(){return this.proxy}keys(){return Object.keys(this.proxy)}values(){return Object.values(this.proxy)}save(){let nn=JSON.stringify(this.proxy);localStorage.setItem(this.key,nn)}retrieve(){let nn=localStorage.getItem(this.key);return nn!==null?JSON.parse(nn):null}};function Ta(tn,nn={}){return new ws(tn,nn)}var cd=Ta({hidden:!1},{persist:!0,key:"netbox-object-depth"});var ud=Ta({view:"images-and-labels"},{persist:!0});var DE=Ta({element:null},{persist:!1});function ME(tn,nn){nn.setAttribute("data-depth-indicators",tn?"hidden":"shown"),nn.innerText=tn?"Show Depth Indicators":"Hide Depth Indicators"}function IE(){for(let tn of
<span class='flatpickr-weekday'>
`+En.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function Fn(){en.calendarContainer.classList.add("hasWeeks");var yn=Qn("div","flatpickr-weekwrapper");yn.appendChild(Qn("span","flatpickr-weekday",en.l10n.weekAbbreviation));var En=Qn("div","flatpickr-weeks");return yn.appendChild(En),{weekWrapper:yn,weekNumbers:En}}function Hn(yn,En){En===void 0&&(En=!0);var Sn=En?yn:yn-en.currentMonth;Sn<0&&en._hidePrevMonthArrow===!0||Sn>0&&en._hideNextMonthArrow===!0||(en.currentMonth+=Sn,(en.currentMonth<0||en.currentMonth>11)&&(en.currentYear+=en.currentMonth>11?1:-1,en.currentMonth=(en.currentMonth+12)%12,wr("onYearChange"),yr()),br(),wr("onMonthChange"),Rs())}function kn(yn,En){if(yn===void 0&&(yn=!0),En===void 0&&(En=!0),en.input.value="",en.altInput!==void 0&&(en.altInput.value=""),en.mobileInput!==void 0&&(en.mobileInput.value=""),en.selectedDates=[],en.latestSelectedDateObj=void 0,En===!0&&(en.currentYear=en._initialDate.getFullYear(),en.currentMonth=en._initialDate.getMonth()),en.config.enableTime===!0){var Sn=Ec(en.config),Tn=Sn.hours,Dn=Sn.minutes,Pn=Sn.seconds;hn(Tn,Dn,Pn)}en.redraw(),yn&&wr("onChange")}function zn(){en.isOpen=!1,en.isMobile||(en.calendarContainer!==void 0&&en.calendarContainer.classList.remove("open"),en._input!==void 0&&en._input.classList.remove("active")),wr("onClose")}function Rn(){en.config!==void 0&&wr("onDestroy");for(var yn=en._handlers.length;yn--;)en._handlers[yn].remove();if(en._handlers=[],en.mobileInput)en.mobileInput.parentNode&&en.mobileInput.parentNode.removeChild(en.mobileInput),en.mobileInput=void 0;else if(en.calendarContainer&&en.calendarContainer.parentNode)if(en.config.static&&en.calendarContainer.parentNode){var En=en.calendarContainer.parentNode;if(En.lastChild&&En.removeChild(En.lastChild),En.parentNode){for(;En.firstChild;)En.parentNode.insertBefore(En.firstChild,En);En.parentNode.removeChild(En)}}else en.calendarContainer.parentNode.removeChild(en.calendarContainer);en.altInput&&(en.input.type="text",en.altInput.parentNode&&en.altInput.parentNode.removeChild(en.altInput),delete en.altInput),en.input&&(en.input.type=en.input._type,en.input.classList.remove("flatpickr-input"),en.input.removeAttribute("readonly")),["_showTimeInput","latestSelectedDateObj","_hideNextMonthArrow","_hidePrevMonthArrow","__hideNextMonthArrow","__hidePrevMonthArrow","isMobile","isOpen","selectedDateElem","minDateHasTime","maxDateHasTime","days","daysContainer","_input","_positionElement","innerContainer","rContainer","monthNav","todayDateElem","calendarContainer","weekdayContainer","prevMonthNav","nextMonthNav","monthsDropdownContainer","currentMonthElement","currentYearElement","navigationCurrentMonth","selectedDateElem","config"].forEach(function(Sn){try{delete en[Sn]}catch(Tn){}})}function Bn(yn){return en.calendarContainer.contains(yn)}function mr(yn){if(en.isOpen&&!en.config.inline){var En=ri(yn),Sn=Bn(En),Tn=En===en.input||En===en.altInput||en.element.contains(En)||yn.path&&yn.path.indexOf&&(~yn.path.indexOf(en.input)||~yn.path.indexOf(en.altInput)),Dn=!Tn&&!Sn&&!Bn(yn.relatedTarget),Pn=!en.config.ignoredFocusElements.some(function(Kn){return Kn.contains(En)});Dn&&Pn&&(en.config.allowInput&&en.setDate(en._input.value,!1,en.config.altInput?en.config.altFormat:en.config.dateFormat),en.timeContainer!==void 0&&en.minuteElement!==void 0&&en.hourElement!==void 0&&en.input.value!==""&&en.input.value!==void 0&&un(),en.close(),en.config&&en.config.mode==="range"&&en.selectedDates.length===1&&en.clear(!1))}}function Sr(yn){if(!(!yn||en.config.minDate&&yn<en.config.minDate.getFullYear()||en.config.maxDate&&yn>en.config.maxDate.getFullYear())){var En=yn,Sn=en.currentYear!==En;en.currentYear=En||en.currentYear,en.config.maxDate&&en.currentYear===en.config.maxDate.getFullYear()?en.currentMonth=Math.min(en.config.maxDate.getMonth(),en.currentMonth):en.config.minDate&&en.currentYear===en.config.minDate.getFullYear()&&(en.currentMonth=Math.max(en.config.minDate.getMonth(),en.currentMonth)),Sn&&(en.redraw(),wr("onYearChange"),yr())}}function xr(yn,En){var Sn;En===void 0&&(En=!0);var Tn=en.parseDate(yn,void 0,En);if(en.config.minDate&&Tn&&ii(Tn,en.config.m
/*!
2021-08-30 11:02:47 -07:00
* Bootstrap v5.0.2 (https://getbootstrap.com/)
* Copyright 2011-2021 The Bootstrap Authors (https://github.com/twbs/bootstrap/graphs/contributors)
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)
*/
/*!
* Masonry v4.2.2
* Cascading grid layout library
* https://masonry.desandro.com
* MIT License
* by David DeSandro
*/
/*!
* Outlayer v2.1.1
* the brains and guts of a layout library
* MIT license
*/
/*!
2022-10-04 15:02:37 +02:00
* clipboard.js v2.0.11
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
/*!
* getSize v2.0.3
* measure size of elements
* MIT license
*/