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

68 lines
309 KiB
JavaScript
Raw Normal View History

(()=>{var dv=Object.create;var Un=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;var No=(t,e,n)=>e in t?Un(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e)=>{for(var n in e||(e={}))Nl.call(e,n)&&No(t,n,e[n]);if(kl)for(var n of kl(e))bv.call(e,n)&&No(t,n,e[n]);return t},Yi=(t,e)=>hv(t,mv(e)),Pl=t=>Un(t,"__esModule",{value:!0});var C=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),yv=(t,e)=>{Pl(t);for(var n in e)Un(t,n,{get:e[n],enumerable:!0})},Ev=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of gv(e))!Nl.call(t,i)&&i!=="default"&&Un(t,i,{get:()=>e[i],enumerable:!(n=pv(e,i))||n.enumerable});return t},Oe=t=>Ev(Pl(Un(t!=null?dv(vv(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var G=(t,e,n)=>(No(t,typeof e!="symbol"?e+"":e,n),n);var ke=(t,e,n)=>new Promise((i,o)=>{var s=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())});var pe=C((gk,gu)=>{var br=function(t){return t&&t.Math==Math&&t};gu.exports=br(typeof globalThis=="object"&&globalThis)||br(typeof window=="object"&&window)||br(typeof self=="object"&&self)||br(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var me=C((vk,vu)=>{vu.exports=function(t){try{return!!t()}catch(e){return!0}}});var It=C((bk,bu)=>{var b_=me();bu.exports=!b_(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var ms=C(_u=>{"use strict";var yu={}.propertyIsEnumerable,Eu=Object.getOwnPropertyDescriptor,y_=Eu&&!yu.call({1:2},1);_u.f=y_?function(e){var n=Eu(this,e);return!!n&&n.enumerable}:yu});var yr=C((Ek,Su)=>{Su.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var Dn=C((_k,wu)=>{var E_={}.toString;wu.exports=function(t){return E_.call(t).slice(8,-1)}});var vi=C((Sk,Tu)=>{var __=me(),S_=Dn(),w_="".split;Tu.exports=__(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return S_(t)=="String"?w_.call(t,""):Object(t)}:Object});var rn=C((wk,xu)=>{xu.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}});var bi=C((Tk,Ou)=>{var T_=vi(),x_=rn();Ou.exports=function(t){return T_(x_(t))}});var Be=C((xk,Au)=>{Au.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}});var gs=C((Ok,Cu)=>{var Er=Be();Cu.exports=function(t,e){if(!Er(t))return t;var n,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)))return i;throw TypeError("Can't convert object to primitive value")}});var on=C((Ak,Lu)=>{var O_=rn();Lu.exports=function(t){return Object(O_(t))}});var Fe=C((Ck,Du)=>{var A_=on(),C_={}.hasOwnProperty;Du.exports=Object.hasOwn||function(e,n){return C_.call(A_(e),n)}});var bs=C((Lk,Iu)=>{var L_=pe(),Mu=Be(),vs=L_.document,D_=Mu(vs)&&Mu(vs.createElement);Iu.exports=function(t){return D_?vs.createElement(t):{}}});var ys=C((Dk,ku)=>{var M_=It(),I_=me(),k_=bs();ku.exports=!M_&&!I_(function(){return Object.defineProperty(k_("div"),"a",{get:function(){return 7}}).a!=7})});var Es=C(Pu=>{var N_=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{return Nu(e,n)}catch(i){}if(q_(e,n))return R_(!P_.f.call(e,n),e[n])}});var ze=C((Ik,Ru)=>{var B_=Be();Ru.exports=function(t){if(!B_(t))throw TypeError(String(t)+" is not an object");return t}});var kt=C(qu=>{var F_=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{return Hu(e,n,i)}catch(o){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[n]=i.v
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var ah=C((YN,sh)=>{var ix=rn(),rx=ca(),Br="["+rx+"]",ox=RegExp("^"+Br+Br+"*"),sx=RegExp(Br+Br+"*$"),ua=function(t){return function(e){var n=String(ix(e));return t&1&&(n=n.replace(ox,"")),t&2&&(n=n.replace(sx,"")),n}};sh.exports={start:ua(1),end:ua(2),trim:ua(3)}});var uh=C((UN,ch)=>{var ax=pe(),lx=ah().trim,lh=ca(),Fr=ax.parseInt,cx=/^[+-]?0[Xx]/,ux=Fr(lh+"08")!==8||Fr(lh+"0x16")!==22;ch.exports=ux?function(e,n){var i=lx(String(e));return Fr(i,n>>>0||(cx.test(i)?16:10))}:Fr});var fa=C((GN,hh)=>{var dx=_i(),hx=rn(),dh=function(t){return function(e,n){var i=String(hx(e)),o=dx(n),s=i.length,a,c;return o<0||o>=s?t?"":void 0:(a=i.charCodeAt(o),a<55296||a>56319||o+1===s||(c=i.charCodeAt(o+1))<56320||c>57343?t?i.charAt(o):a:t?i.slice(o,o+2):(a-55296<<10)+(c-56320)+65536)}};hh.exports={codeAt:dh(!1),charAt:dh(!0)}});var da=C((QN,gh)=>{var bx=ln();gh.exports=function(t,e,n){for(var i in e)bx(t,i,e[i],n);return t}});var bh=C((JN,vh)=>{var yx=me();vh.exports=!yx(function(){return Object.isExtensible(Object.preventExtensions({}))})});var zr=C((ZN,yh)=>{var Ex=yi(),_x=Be(),ha=Fe(),Sx=kt().f,wx=xr(),Tx=bh(),fn=wx("meta"),xx=0,pa=Object.isExtensible||function(){return!0},ma=function(t){Sx(t,fn,{value:{objectID:"O"+ ++xx,weakData:{}}})},Ox=function(t,e){if(!_x(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!ha(t,fn)){if(!pa(t))return"F";if(!e)return"E";ma(t)}return t[fn].objectID},Ax=function(t,e){if(!ha(t,fn)){if(!pa(t))return!0;if(!e)return!1;ma(t)}return t[fn].weakData},Cx=function(t){return Tx&&Lx.REQUIRED&&pa(t)&&!ha(t,fn)&&ma(t),t},Lx=yh.exports={REQUIRED:!1,fastKey:Ox,getWeakData:Ax,onFreeze:Cx};Ex[fn]=!0});var _h=C((eP,Eh)=>{var Dx=Te(),Mx=Mn(),Ix=Dx("iterator"),kx=Array.prototype;Eh.exports=function(t){return t!==void 0&&(Mx.Array===t||kx[Ix]===t)}});var wh=C((tP,Sh)=>{var Nx=la(),Px=Mn(),Rx=Te(),jx=Rx("iterator");Sh.exports=function(t){if(t!=null)return t[jx]||t["@@iterator"]||Px[Nx(t)]}});var xh=C((nP,Th)=>{var Hx=ze();Th.exports=function(t){var e=t.return;if(e!==void 0)return Hx(e.call(t)).value}});var ga=C((iP,Ah)=>{var qx=ze(),$x=_h(),Bx=cn(),Fx=Ps(),zx=wh(),Oh=xh(),Ai=function(t,e){this.stopped=t,this.result=e};Ah.exports=function(t,e,n){var i=n&&n.that,o=!!(n&&n.AS_ENTRIES),s=!!(n&&n.IS_ITERATOR),a=!!(n&&n.INTERRUPTED),c=Fx(e,i,1+o+a),f,u,l,m,d,p,v,y=function(b){return f&&Oh(f),new Ai(!0,b)},h=function(b){return o?(qx(b),a?c(b[0],b[1],y):c(b[0],b[1])):a?c(b,y):c(b)};if(s)f=t;else{if(u=zx(t),typeof u!="function")throw TypeError("Target is not iterable");if($x(u)){for(l=0,m=Bx(t.length);m>l;l++)if(d=h(t[l]),d&&d instanceof Ai)return d;return new Ai(!1)}f=u.call(t)}for(p=f.next;!(v=p.call(f)).done;){try{d=h(v.value)}catch(b){throw Oh(f),b}if(typeof d=="object"&&d&&d instanceof Ai)return d}return new Ai(!1)}});var va=C((rP,Ch)=>{Ch.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}});var kh=C((oP,Ih)=>{var Wx=Te(),Lh=Wx("iterator"),Dh=!1;try{Mh=0,ba={next:function(){return{done:!!Mh++}},return:function(){Dh=!0}},ba[Lh]=function(){return this},Array.from(ba,function(){throw 2})}catch(t){}var Mh,ba;Ih.exports=function(t,e){if(!e&&!Dh)return!1;var n=!1;try{var i={};i[Lh]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(o){}return n}});var Rh=C((sP,Ph)=>{var Vx=Be(),Nh=ta();Ph.exports=function(t,e,n){var i,o;return Nh&&typeof(i=e.constructor)=="function"&&i!==n&&Vx(o=i.prototype)&&o!==n.prototype&&Nh(t,o),t}});var qh=C((aP,Hh)=>{"use strict";var Yx=Et(),Ux=pe(),jh=Is(),Kx=ln(),Gx=zr(),Xx=ga(),Qx=va(),ya=Be(),Ea=me(),Jx=kh(),Zx=Rr(),eO=Rh();Hh.exports=function(t,e,n){var i=t.indexOf("Map")!==-1,o=t.indexOf("Weak")!==-1,s=i?"set":"add",a=Ux[t],c=a&&a.prototype,f=a,u={},l=function(b){var S=c[b];Kx(c,b,b=="add"?function(O){return S.call(this,O===0?0:O),this}:b=="delete"?function(A){return o&&!ya(A)?!1:S.call(this,A===0?0:A)}:b=="get"?function(O){return o&&!ya(O)?void 0:S.call(this,O===0?0:O)}:b=="has"?function(O){retu
`)&&t.flags==="s")})});var Qp=C((MR,Xp)=>{var r0=me();Xp.exports=r0(function(){var t=RegExp("(?<a>b)","string".charAt(5));return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"})});var so=C((IR,em)=>{"use strict";var o0=Wp(),Jp=Up(),s0=Tr(),a0=Pr(),l0=an().get,c0=Gp(),u0=Qp(),oo=RegExp.prototype.exec,f0=s0("native-string-replace",String.prototype.replace),Ga=oo,Xa=function(){var t=/a/,e=/b*/g;return oo.call(t,"a"),oo.call(e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),Zp=Jp.UNSUPPORTED_Y||Jp.BROKEN_CARET,Qa=/()??/.exec("")[1]!==void 0,d0=Xa||Qa||Zp||c0||u0;d0&&(Ga=function(e){var n=this,i=l0(n),o=i.raw,s,a,c,f,u,l,m;if(o)return o.lastIndex=n.lastIndex,s=Ga.call(o,e),n.lastIndex=o.lastIndex,s;var d=i.groups,p=Zp&&n.sticky,v=o0.call(n),y=n.source,h=0,b=e;if(p&&(v=v.replace("y",""),v.indexOf("g")===-1&&(v+="g"),b=String(e).slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&e[n.lastIndex-1]!==`
`)&&(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){var a=n+t.length,c=i.length,f=L0;return o!==void 0&&(o=x0(o),f=C0),A0.call(s,f,function(u,l){var m;switch(l.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,n);case"'":return e.slice(a);case"<":m=o[l.slice(1,-1)];break;default:var d=+l;if(d===0)return u;if(d>c){var p=O0(d/10);return p===0?u:p<=c?i[p-1]===void 0?l.charAt(1):i[p-1]+l.charAt(1):u}m=i[d-1]}return m===void 0?"":m})}});var mm=C(sl=>{"use strict";sl.parse=K0;sl.serialize=G0;var V0=decodeURIComponent,Y0=encodeURIComponent,U0=/; */,uo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function K0(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var n={},i=e||{},o=t.split(U0),s=i.decode||V0,a=0;a<o.length;a++){var c=o[a],f=c.indexOf("=");if(!(f<0)){var u=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))}}return n}function G0(t,e,n){var i=n||{},o=i.encode||Y0;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!uo.test(t))throw new TypeError("argument name is invalid");var s=o(e);if(s&&!uo.test(s))throw new TypeError("argument val is invalid");var a=t+"="+s;if(i.maxAge!=null){var c=i.maxAge-0;if(isNaN(c)||!isFinite(c))throw new TypeError("option maxAge is invalid");a+="; Max-Age="+Math.floor(c)}if(i.domain){if(!uo.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!uo.test(i.path))throw new TypeError("option path is invalid");a+="; Path="+i.path}if(i.expires){if(typeof i.expires.toUTCString!="function")throw new TypeError("option expires is invalid");a+="; Expires="+i.expires.toUTCString()}if(i.httpOnly&&(a+="; HttpOnly"),i.secure&&(a+="; Secure"),i.sameSite){var f=typeof i.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:throw new TypeError("option sameSite is invalid")}}return a}function X0(t,e){try{return e(t)}catch(n){return t}}});var fl=C((Am,ho)=>{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof ho=="object"&&ho.exports?ho.expo
<span class='flatpickr-weekday'>
`+E.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function Yg(){r.calendarContainer.classList.add("hasWeeks");var g=u("div","flatpickr-weekwrapper");g.appendChild(u("span","flatpickr-weekday",r.l10n.weekAbbreviation));var E=u("div","flatpickr-weeks");return g.appendChild(E),{weekWrapper:g,weekNumbers:E}}function Oo(g,E){E===void 0&&(E=!0);var w=E?g:g-r.currentMonth;w<0&&r._hidePrevMonthArrow===!0||w>0&&r._hideNextMonthArrow===!0||(r.currentMonth+=w,(r.currentMonth<0||r.currentMonth>11)&&(r.currentYear+=r.currentMonth>11?1:-1,r.currentMonth=(r.currentMonth+12)%12,Z("onYearChange"),Fn()),qi(),Z("onMonthChange"),zi())}function Ug(g,E){g===void 0&&(g=!0),E===void 0&&(E=!0),r.input.value="",r.altInput!==void 0&&(r.altInput.value=""),r.mobileInput!==void 0&&(r.mobileInput.value=""),r.selectedDates=[],r.latestSelectedDateObj=void 0,E===!0&&(r.currentYear=r._initialDate.getFullYear(),r.currentMonth=r._initialDate.getMonth()),r.showTimeInput=!1,r.config.enableTime===!0&&ye(),r.redraw(),g&&Z("onChange")}function Kg(){r.isOpen=!1,r.isMobile||(r.calendarContainer!==void 0&&r.calendarContainer.classList.remove("open"),r._input!==void 0&&r._input.classList.remove("active")),Z("onClose")}function Gg(){r.config!==void 0&&Z("onDestroy");for(var g=r._handlers.length;g--;){var E=r._handlers[g];E.element.removeEventListener(E.event,E.handler,E.options)}if(r._handlers=[],r.mobileInput)r.mobileInput.parentNode&&r.mobileInput.parentNode.removeChild(r.mobileInput),r.mobileInput=void 0;else if(r.calendarContainer&&r.calendarContainer.parentNode)if(r.config.static&&r.calendarContainer.parentNode){var w=r.calendarContainer.parentNode;if(w.lastChild&&w.removeChild(w.lastChild),w.parentNode){for(;w.firstChild;)w.parentNode.insertBefore(w.firstChild,w);w.parentNode.removeChild(w)}}else r.calendarContainer.parentNode.removeChild(r.calendarContainer);r.altInput&&(r.input.type="text",r.altInput.parentNode&&r.altInput.parentNode.removeChild(r.altInput),delete r.altInput),r.input&&(r.input.type=r.input._type,r.input.classList.remove("flatpickr-input"),r.input.removeAttribute("readonly"),r.input.value=""),["_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(I){try{delete r[I]}catch(R){}})}function zn(g){return r.config.appendTo&&r.config.appendTo.contains(g)?!0:r.calendarContainer.contains(g)}function Ao(g){if(r.isOpen&&!r.config.inline){var E=p(g),w=zn(E),I=E===r.input||E===r.altInput||r.element.contains(E)||g.path&&g.path.indexOf&&(~g.path.indexOf(r.input)||~g.path.indexOf(r.altInput)),R=g.type==="blur"?I&&g.relatedTarget&&!zn(g.relatedTarget):!I&&!w&&!zn(g.relatedTarget),P=!r.config.ignoredFocusElements.some(function(q){return q.contains(E)});R&&P&&(r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0&&ee(),r.close(),r.config.mode==="range"&&r.selectedDates.length===1&&(r.clear(!1),r.redraw()))}}function $i(g){if(!(!g||r.config.minDate&&g<r.config.minDate.getFullYear()||r.config.maxDate&&g>r.config.maxDate.getFullYear())){var E=g,w=r.currentYear!==E;r.currentYear=E||r.currentYear,r.config.maxDate&&r.currentYear===r.config.maxDate.getFullYear()?r.currentMonth=Math.min(r.config.maxDate.getMonth(),r.currentMonth):r.config.minDate&&r.currentYear===r.config.minDate.getFullYear()&&(r.currentMonth=Math.max(r.config.minDate.getMonth(),r.currentMonth)),w&&(r.redraw(),Z("onYearChange"),Fn())}}function Ht(g,E){E===void 0&&(E=!0);var w=r.parseDate(g,void 0,E);if(r.config.minDate&&w&&k(w,r.config.minDate,E!==void 0?E:!r.minDateHasTime)<0||r.config.maxDate&&w&&k(w,r.config.maxDate,E!==void 0?E:!r.maxDateHasTime)>0)return!1;if(r.config.enable.length===0&&r.config.disable.length===0)return!0;if(w===void 0)return!1;for(var I=r.
`)}:!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
div.ss-values div.ss-value[data-id="${n}"],
div.ss-list div.ss-option:not(.ss-disabled)[data-id="${n}"]
{
background-color: ${s} !important;
color: ${a} !important;
}
`.replaceAll(`
`,"").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
/* flatpickr v4.6.3, @license MIT */
/*!
* 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
*/
/*!
* clipboard.js v2.0.6
* https://clipboardjs.com/
*
* Licensed MIT © Zeno Rocha
*/
/*!
* cookie
* Copyright(c) 2012-2014 Roman Shtylman
* Copyright(c) 2015 Douglas Christopher Wilson
* MIT Licensed
*/
/*!
* getSize v2.0.3
* measure size of elements
* MIT license
*/
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
//# sourceMappingURL=netbox.js.map