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

67 lines
315 KiB
JavaScript
Raw Normal View History

(()=>{var ib=Object.create;var ei=Object.defineProperty,rb=Object.defineProperties,ob=Object.getOwnPropertyDescriptor,sb=Object.getOwnPropertyDescriptors,ab=Object.getOwnPropertyNames,Ul=Object.getOwnPropertySymbols,lb=Object.getPrototypeOf,Kl=Object.prototype.hasOwnProperty,cb=Object.prototype.propertyIsEnumerable;var Wo=(t,e,n)=>e in t?ei(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,K=(t,e)=>{for(var n in e||(e={}))Kl.call(e,n)&&Wo(t,n,e[n]);if(Ul)for(var n of Ul(e))cb.call(e,n)&&Wo(t,n,e[n]);return t},tr=(t,e)=>rb(t,sb(e)),Gl=t=>ei(t,"__esModule",{value:!0});var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),ub=(t,e)=>{Gl(t);for(var n in e)ei(t,n,{get:e[n],enumerable:!0})},db=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of ab(e))!Kl.call(t,i)&&i!=="default"&&ei(t,i,{get:()=>e[i],enumerable:!(n=ob(e,i))||n.enumerable});return t},Le=t=>db(Gl(ei(t!=null?ib(lb(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var Q=(t,e,n)=>(Wo(t,typeof e!="symbol"?e+"":e,n),n);var Pe=(t,e,n)=>new Promise((i,o)=>{var s=d=>{try{c(n.next(d))}catch(u){o(u)}},a=d=>{try{c(n.throw(d))}catch(u){o(u)}},c=d=>d.done?i(d.value):Promise.resolve(d.value).then(s,a);c((n=n.apply(t,e)).next())});var de=x((xP,Du)=>{var Or=function(t){return t&&t.Math==Math&&t};Du.exports=Or(typeof globalThis=="object"&&globalThis)||Or(typeof window=="object"&&window)||Or(typeof self=="object"&&self)||Or(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var ye=x((OP,Mu)=>{Mu.exports=function(t){try{return!!t()}catch(e){return!0}}});var Rt=x((AP,Iu)=>{var uS=ye();Iu.exports=!uS(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var xs=x(Nu=>{"use strict";var ku={}.propertyIsEnumerable,Pu=Object.getOwnPropertyDescriptor,dS=Pu&&!ku.call({1:2},1);Nu.f=dS?function(e){var n=Pu(this,e);return!!n&&n.enumerable}:ku});var Ar=x((LP,Ru)=>{Ru.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var Nn=x((DP,ju)=>{var fS={}.toString;ju.exports=function(t){return fS.call(t).slice(8,-1)}});var Ti=x((MP,Hu)=>{var hS=ye(),pS=Nn(),mS="".split;Hu.exports=hS(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return pS(t)=="String"?mS.call(t,""):Object(t)}:Object});var un=x((IP,qu)=>{qu.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}});var Rn=x((kP,$u)=>{var gS=Ti(),vS=un();$u.exports=function(t){return gS(vS(t))}});var je=x((PP,Fu)=>{Fu.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}});var xi=x((NP,Bu)=>{var Os=de(),bS=function(t){return typeof t=="function"?t:void 0};Bu.exports=function(t,e){return arguments.length<2?bS(Os[t]):Os[t]&&Os[t][e]}});var Wu=x((RP,zu)=>{var yS=xi();zu.exports=yS("navigator","userAgent")||""});var Lr=x((jP,Xu)=>{var Vu=de(),As=Wu(),Yu=Vu.process,Uu=Vu.Deno,Ku=Yu&&Yu.versions||Uu&&Uu.version,Gu=Ku&&Ku.v8,nt,Cr;Gu?(nt=Gu.split("."),Cr=nt[0]<4?1:nt[0]+nt[1]):As&&(nt=As.match(/Edge\/(\d+)/),(!nt||nt[1]>=74)&&(nt=As.match(/Chrome\/(\d+)/),nt&&(Cr=nt[1])));Xu.exports=Cr&&+Cr});var Cs=x((HP,Ju)=>{var Qu=Lr(),ES=ye();Ju.exports=!!Object.getOwnPropertySymbols&&!ES(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Qu&&Qu<41})});var Ls=x((qP,Zu)=>{var _S=Cs();Zu.exports=_S&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Dr=x(($P,ed)=>{var SS=xi(),wS=Ls();ed.exports=wS?function(t){return typeof t=="symbol"}:function(t){var e=SS("Symbol");return typeof e=="function"&&Object(t)instanceof e}});var nd=x((FP,td)=>{var Ds=je();td.exports=function(t,e){var n,i;if(e==="string"&&typeof(n=t.toString)=="function"&&!Ds(i=n.call(t))||typeof(n=t.valueOf)=="function"&&!Ds(i=n.call(t))||e!=="string"&&typeof(n=t.toString)=="function"&&!Ds(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}});var Mr=x((BP,id)=>{id.exports=!1});var Ir=x((zP,od)=>{var rd=de();od.exports=function(t,e){try{Object.defineProperty(rd,t,{value
\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var Dh=x((oR,Lh)=>{var eO=un(),tO=$t(),nO=ya(),Xr="["+nO+"]",iO=RegExp("^"+Xr+Xr+"*"),rO=RegExp(Xr+Xr+"*$"),Ea=function(t){return function(e){var n=tO(eO(e));return t&1&&(n=n.replace(iO,"")),t&2&&(n=n.replace(rO,"")),n}};Lh.exports={start:Ea(1),end:Ea(2),trim:Ea(3)}});var kh=x((sR,Ih)=>{var oO=de(),sO=$t(),aO=Dh().trim,Mh=ya(),Qr=oO.parseInt,lO=/^[+-]?0[Xx]/,cO=Qr(Mh+"08")!==8||Qr(Mh+"0x16")!==22;Ih.exports=cO?function(e,n){var i=aO(sO(e));return Qr(i,n>>>0||(lO.test(i)?16:10))}:Qr});var _a=x((lR,Rh)=>{var dO=Di(),fO=$t(),hO=un(),Nh=function(t){return function(e,n){var i=fO(hO(e)),o=dO(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)}};Rh.exports={codeAt:Nh(!1),charAt:Nh(!0)}});var Sa=x((uR,qh)=>{var yO=pn();qh.exports=function(t,e,n){for(var i in e)yO(t,i,e[i],n);return t}});var zh=x((dR,Bh)=>{var EO=Rn(),$h=$r().f,_O={}.toString,Fh=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],SO=function(t){try{return $h(t)}catch(e){return Fh.slice()}};Bh.exports.f=function(e){return Fh&&_O.call(e)=="[object Window]"?SO(e):$h(EO(e))}});var Vh=x((fR,Wh)=>{var wO=ye();Wh.exports=!wO(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Jr=x((hR,Kh)=>{var TO=it(),xO=Ci(),OO=je(),wa=ze(),AO=jt().f,Yh=$r(),CO=zh(),LO=Nr(),DO=Vh(),Uh=!1,wt=LO("meta"),MO=0,Ta=Object.isExtensible||function(){return!0},xa=function(t){AO(t,wt,{value:{objectID:"O"+MO++,weakData:{}}})},IO=function(t,e){if(!OO(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!wa(t,wt)){if(!Ta(t))return"F";if(!e)return"E";xa(t)}return t[wt].objectID},kO=function(t,e){if(!wa(t,wt)){if(!Ta(t))return!0;if(!e)return!1;xa(t)}return t[wt].weakData},PO=function(t){return DO&&Uh&&Ta(t)&&!wa(t,wt)&&xa(t),t},NO=function(){RO.enable=function(){},Uh=!0;var t=Yh.f,e=[].splice,n={};n[wt]=1,t(n).length&&(Yh.f=function(i){for(var o=t(i),s=0,a=o.length;s<a;s++)if(o[s]===wt){e.call(o,s,1);break}return o},TO({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:CO.f}))},RO=Kh.exports={enable:NO,fastKey:IO,getWeakData:kO,onFreeze:PO};xO[wt]=!0});var Xh=x((pR,Gh)=>{var jO=Se(),HO=jn(),qO=jO("iterator"),$O=Array.prototype;Gh.exports=function(t){return t!==void 0&&(HO.Array===t||$O[qO]===t)}});var Oa=x((mR,Qh)=>{var FO=ba(),BO=jn(),zO=Se(),WO=zO("iterator");Qh.exports=function(t){if(t!=null)return t[WO]||t["@@iterator"]||BO[FO(t)]}});var Zh=x((gR,Jh)=>{var VO=He(),YO=Oa();Jh.exports=function(t,e){var n=arguments.length<2?YO(t):e;if(typeof n!="function")throw TypeError(String(t)+" is not iterable");return VO(n.call(t))}});var np=x((vR,tp)=>{var ep=He();tp.exports=function(t,e,n){var i,o;ep(t);try{if(i=t.return,i===void 0){if(e==="throw")throw n;return n}i=i.call(t)}catch(s){o=!0,i=s}if(e==="throw")throw n;if(o)throw i;return ep(i),n}});var Aa=x((bR,rp)=>{var UO=He(),KO=Xh(),GO=mn(),XO=Ks(),QO=Zh(),JO=Oa(),ip=np(),Pi=function(t,e){this.stopped=t,this.result=e};rp.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=XO(e,i,1+o+a),d,u,l,m,f,p,g,v=function(y){return d&&ip(d,"return",y),new Pi(!0,y)},h=function(y){return o?(UO(y),a?c(y[0],y[1],v):c(y[0],y[1])):a?c(y,v):c(y)};if(s)d=t;else{if(u=JO(t),typeof u!="function")throw TypeError("Target is not iterable");if(KO(u)){for(l=0,m=GO(t.length);m>l;l++)if(f=h(t[l]),f&&f instanceof Pi)return f;return new Pi(!1)}d=QO(t,u)}for(p=d.next;!(g=p.call(d)).done;){try{f=h(g.value)}catch(y){ip(d,"throw",y)}if(typeof f=="object"&&f&&f instanceof Pi)return f}return new Pi(!1)}});var Ca=x((yR,op)=>{op.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}});var up=x((ER,cp)=>{var ZO=Se(),sp=ZO("iterator"),ap=!1;try{lp=0,La={next:function(){return{done:!!lp++}},return:function(){ap=!0}},La[sp]=function(){retur
`)&&t.flags==="s")})});var Cm=x((Yj,Am)=>{var gC=ye(),vC=de(),bC=vC.RegExp;Am.exports=gC(function(){var t=bC("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"})});var vo=x((Uj,Mm)=>{"use strict";var yC=$t(),EC=_m(),Lm=Tm(),_C=Pr(),SC=Wr(),wC=hn().get,TC=Om(),xC=Cm(),go=RegExp.prototype.exec,OC=_C("native-string-replace",String.prototype.replace),ol=go,sl=function(){var t=/a/,e=/b*/g;return go.call(t,"a"),go.call(e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),Dm=Lm.UNSUPPORTED_Y||Lm.BROKEN_CARET,al=/()??/.exec("")[1]!==void 0,AC=sl||al||Dm||TC||xC;AC&&(ol=function(e){var n=this,i=wC(n),o=yC(e),s=i.raw,a,c,d,u,l,m,f;if(s)return s.lastIndex=n.lastIndex,a=ol.call(s,o),n.lastIndex=s.lastIndex,a;var p=i.groups,g=Dm&&n.sticky,v=EC.call(n),h=n.source,y=0,_=o;if(g&&(v=v.replace("y",""),v.indexOf("g")===-1&&(v+="g"),_=o.slice(n.lastIndex),n.lastIndex>0&&(!n.multiline||n.multiline&&o.charAt(n.lastIndex-1)!==`
`)&&(h="(?: "+h+")",_=" "+_,y++),c=new RegExp("^(?:"+h+")",v)),al&&(c=new RegExp("^"+h+"$(?!\\s)",v)),sl&&(d=n.lastIndex),u=go.call(g?c:n,_),g?u?(u.input=u.input.slice(y),u[0]=u[0].slice(y),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:sl&&u&&(n.lastIndex=n.global?u.index+u[0].length:d),al&&u&&u.length>1&&OC.call(u[0],c,function(){for(l=1;l<arguments.length-2;l++)arguments[l]===void 0&&(u[l]=void 0)}),u&&p)for(u.groups=m=SC(null),l=0;l<p.length;l++)f=p[l],m[f[0]]=u[f[1]];return u});Mm.exports=ol});var ll=x(()=>{"use strict";var CC=it(),Im=vo();CC({target:"RegExp",proto:!0,forced:/./.exec!==Im},{exec:Im})});var ul=x((Xj,Rm)=>{"use strict";ll();var km=pn(),LC=vo(),Pm=ye(),Nm=Se(),DC=St(),MC=Nm("species"),cl=RegExp.prototype;Rm.exports=function(t,e,n,i){var o=Nm(t),s=!Pm(function(){var u={};return u[o]=function(){return 7},""[t](u)!=7}),a=s&&!Pm(function(){var u=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[MC]=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],d=e(o,""[t],function(u,l,m,f,p){var g=l.exec;return g===LC||g===cl.exec?s&&!p?{done:!0,value:c.call(l,m,f)}:{done:!0,value:u.call(m,l,f)}:{done:!1}});km(String.prototype,t,d[0]),km(cl,o,d[1])}i&&DC(cl[o],"sham",!0)}});var dl=x((Qj,jm)=>{"use strict";var IC=_a().charAt;jm.exports=function(t,e,n){return e+(n?IC(t,e).length:1)}});var fl=x((Jj,Hm)=>{var kC=Nn(),PC=vo();Hm.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(kC(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return PC.call(t,e)}});var Fm=x((e1,$m)=>{var $C=dn(),FC=Math.floor,BC="".replace,zC=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,WC=/\$([$&'`]|\d{1,2})/g;$m.exports=function(t,e,n,i,o,s){var a=n+t.length,c=i.length,d=WC;return o!==void 0&&(o=$C(o),d=zC),BC.call(s,d,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 f=+l;if(f===0)return u;if(f>c){var p=FC(f/10);return p===0?u:p<=c?i[p-1]===void 0?l.charAt(1):i[p-1]+l.charAt(1):u}m=i[f-1]}return m===void 0?"":m})}});var Ym=x(vl=>{"use strict";vl.parse=cL;vl.serialize=uL;var sL=decodeURIComponent,aL=encodeURIComponent,lL=/; */,_o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function cL(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var n={},i=e||{},o=t.split(lL),s=i.decode||sL,a=0;a<o.length;a++){var c=o[a],d=c.indexOf("=");if(!(d<0)){var u=c.substr(0,d).trim(),l=c.substr(++d,c.length).trim();l[0]=='"'&&(l=l.slice(1,-1)),n[u]==null&&(n[u]=dL(l,s))}}return n}function uL(t,e,n){var i=n||{},o=i.encode||aL;if(typeof o!="function")throw new TypeError("option encode is invalid");if(!_o.test(t))throw new TypeError("argument name is invalid");var s=o(e);if(s&&!_o.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(!_o.test(i.domain))throw new TypeError("option domain is invalid");a+="; Domain="+i.domain}if(i.path){if(!_o.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 d=typeof i.sameSite=="string"?i.sameSite.toLowerCase():i.sameSite;switch(d){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 dL(t,e){try{return e(t)}catch(n){return t}}});var _l=x((cg,wo)=>{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof wo=="object"&&wo.exports?wo.expo
<span class='flatpickr-weekday'>
`+E.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function jv(){r.calendarContainer.classList.add("hasWeeks");var b=u("div","flatpickr-weekwrapper");b.appendChild(u("span","flatpickr-weekday",r.l10n.weekAbbreviation));var E=u("div","flatpickr-weeks");return b.appendChild(E),{weekWrapper:b,weekNumbers:E}}function Ro(b,E){E===void 0&&(E=!0);var w=E?b:b-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,ie("onYearChange"),Gn()),Ki(),ie("onMonthChange"),Ji())}function Hv(b,E){b===void 0&&(b=!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&&Te(),r.redraw(),b&&ie("onChange")}function qv(){r.isOpen=!1,r.isMobile||(r.calendarContainer!==void 0&&r.calendarContainer.classList.remove("open"),r._input!==void 0&&r._input.classList.remove("active")),ie("onClose")}function $v(){r.config!==void 0&&ie("onDestroy");for(var b=r._handlers.length;b--;){var E=r._handlers[b];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(D){try{delete r[D]}catch(R){}})}function Xn(b){return r.config.appendTo&&r.config.appendTo.contains(b)?!0:r.calendarContainer.contains(b)}function jo(b){if(r.isOpen&&!r.config.inline){var E=p(b),w=Xn(E),D=E===r.input||E===r.altInput||r.element.contains(E)||b.path&&b.path.indexOf&&(~b.path.indexOf(r.input)||~b.path.indexOf(r.altInput)),R=b.type==="blur"?D&&b.relatedTarget&&!Xn(b.relatedTarget):!D&&!w&&!Xn(b.relatedTarget),P=!r.config.ignoredFocusElements.some(function(F){return F.contains(E)});R&&P&&(r.timeContainer!==void 0&&r.minuteElement!==void 0&&r.hourElement!==void 0&&q(),r.close(),r.config.mode==="range"&&r.selectedDates.length===1&&(r.clear(!1),r.redraw()))}}function Gi(b){if(!(!b||r.config.minDate&&b<r.config.minDate.getFullYear()||r.config.maxDate&&b>r.config.maxDate.getFullYear())){var E=b,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(),ie("onYearChange"),Gn())}}function zt(b,E){E===void 0&&(E=!0);var w=r.parseDate(b,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
`)}:!a.ok&&"detail"in d?{error:d.detail}:d})}function So(t,e){return Pe(this,null,function*(){return yield Xm(t,"PATCH",e)})}function hL(t){return Pe(this,null,function*(){return yield Xm(t,"GET")})}function Qm(t){return Pe(this,null,function*(){return yield hL(t)})}function*j(...t){for(let e of t)for(let n of document.querySelectorAll(e))n!==null&&(yield n)}function ae(t){return document.getElementById(t)}function Jm(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 Zm(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 zi(t,e){t!==null&&(typeof e=="undefined"?window.getComputedStyle(t).display==="none"?t.style.display="":t.style.display="none":e==="show"?t.style.display="":t.style.display="none")}function*eg(t){for(let e of t.querySelectorAll("td"))e!==null&&re(e.innerText)&&e.innerText!=="\u2014"&&(yield e.innerText.replaceAll(/[\n\r]/g,"").trim())}function Ve(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 Vn(t,e,n=null,i=[]){let o=document.createElement(t);if(e!==null)for(let s of Object.keys(e)){let a=s,c=e[a];a in o&&(o[a]=c)}n!==null&&n.length>0&&o.classList.add(...n);for(let s of i)o.appendChild(s);return o}function tg(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 pL(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]);Jm(i),t.preventDefault()}}function ng(){for(let t of j("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>pL(i,t))}}function ig(){for(let t of j("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)}}var yl={vlangroup_edit:{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:[]}}};function El(t,e){var n;for(let i of j(t)){let o=(n=i.parentElement)==null?void 0:n.parentElement;o!==null&&(e==="show"?zi(o,"show"):zi(o,"hide"))}}function rg(t,e){let n=e.options[e.selectedIndex].innerText.toLowerCase();for(let[i,o]of Object.entries(yl[t]))if(n.endsWith(i)){for(let s of o.hide)El(`#${s}`,"hide");for(let s of o.show)El(`#${s}`,"show");break}else for(let s of yl[t].default.hide)El(`#${s}`,"hide")}function og(){for(let t of Object.keys(yl))for(let e of j(`html[data-netbox-url-name="${t}"] #id_scope_type`))rg(t,e),e.addEven
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=Ve(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=Vn("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[Vn("i",null,["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),e.type="button",this.slim.slim.search.container.appendChild(e)}}};function Gg(){for(let t of j(".netbox-api-select"))new Al(t)}function Xg(t){return typeof t.value=="string"&&t.value!==""}function Qg(t,e){if(t.slim.singleSelected!==null)if(Xg(e)){let n=`#${e.value}`,i=Vi(n);t.slim.singleSelected.container.style.backgroundColor=n,t.slim.singleSelected.container.style.color=i}else t.slim.singleSelected.container.removeAttribute("style")}function Jg(){for(let t of j("select.netbox-color-select")){for(let n of t.options)if(Xg(n)){let i=`#${n.value}`,o=Vi(i);n.style.backgroundColor=i,n.style.color=o}let e=new Un({select:t,allowDeselect:!0,deselectLabel:'<i class="mdi mdi-close-circle" style="color: currentColor;"></i>'});for(let n of e.data.data)if("selected"in n&&n.selected){Qg(e,n);break}for(let n of t.classList)e.slim.container.classList.remove(n);e.onChange=n=>Qg(e,n)}}function Zg(){for(let t of j(".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 Un({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 ev(){for(let t of[Gg,Jg,Zg])t()}function QL(t){let e=t.getAttribute("data-url"),n=t.classList.contains("connected"),i=n?"planned":"connected";re(e)&&So(e,{status:i}).then(o=>{var s;if(Wn(o)){Sn("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 tv(){for(let t of j("button.cable-toggle"))t.addEventListener("click",()=>QL(t))}var nv=class{set(e,n,i){return e[n]=i,!0}get(e,n){return e[n]}has(e,n){return n in e}},Io=class{constructor(e,n){Q(this,"handlers");Q(this,"proxy");Q(this,"options");Q(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=K(K({},e),i))}this.handlers=new nv,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);return e!==null?JSON.parse(e):null}};function ko(t,e={}){return new Io(t,e)}var Cl=ko({hidden:!1},{persist:!0,key:"netbox-object-depth"});var Ll=ko({view:"images-and-labels"},{persist:!0});function iv(t,e){e.setAttribute("data-depth-indicators",t?"hidden":"shown"),e.innerText=t?"Show Depth Indicators":"Hide Depth Indicators"}function rv(){for(let t of j(".record-depth"))t.style.display=""}function ov(){for(let t of j(".record-depth"))t.style.display="none"}function JL(t,e){let n=t.get("hidden");t.set("hidden",!n);let i=t.get("hidden");i?ov():rv(),iv(i,e)}fun
/* flatpickr v4.6.3, @license MIT */
/*!
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
*/
/*!
* clipboard.js v2.0.8
* 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.
***************************************************************************** */