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
316 KiB
JavaScript
Raw Normal View History

(()=>{var ob=Object.create;var ei=Object.defineProperty,sb=Object.defineProperties,ab=Object.getOwnPropertyDescriptor,lb=Object.getOwnPropertyDescriptors,cb=Object.getOwnPropertyNames,Yl=Object.getOwnPropertySymbols,ub=Object.getPrototypeOf,Ul=Object.prototype.hasOwnProperty,db=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={}))Ul.call(e,n)&&Wo(t,n,e[n]);if(Yl)for(var n of Yl(e))db.call(e,n)&&Wo(t,n,e[n]);return t},tr=(t,e)=>sb(t,lb(e)),Kl=t=>ei(t,"__esModule",{value:!0});var x=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),fb=(t,e)=>{Kl(t);for(var n in e)ei(t,n,{get:e[n],enumerable:!0})},hb=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of cb(e))!Ul.call(t,i)&&i!=="default"&&ei(t,i,{get:()=>e[i],enumerable:!(n=ab(e,i))||n.enumerable});return t},Oe=t=>hb(Kl(ei(t!=null?ob(ub(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 Ne=(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((DP,Lu)=>{var Or=function(t){return t&&t.Math==Math&&t};Lu.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((MP,Du)=>{Du.exports=function(t){try{return!!t()}catch(e){return!0}}});var Rt=x((IP,Mu)=>{var fS=ye();Mu.exports=!fS(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var xs=x(Pu=>{"use strict";var Iu={}.propertyIsEnumerable,ku=Object.getOwnPropertyDescriptor,hS=ku&&!Iu.call({1:2},1);Pu.f=hS?function(e){var n=ku(this,e);return!!n&&n.enumerable}:Iu});var Ar=x((PP,Nu)=>{Nu.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var Pn=x((NP,Ru)=>{var pS={}.toString;Ru.exports=function(t){return pS.call(t).slice(8,-1)}});var Ti=x((RP,ju)=>{var mS=ye(),gS=Pn(),vS="".split;ju.exports=mS(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return gS(t)=="String"?vS.call(t,""):Object(t)}:Object});var un=x((jP,Hu)=>{Hu.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}});var Nn=x((HP,qu)=>{var bS=Ti(),yS=un();qu.exports=function(t){return bS(yS(t))}});var He=x((qP,$u)=>{$u.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}});var xi=x(($P,Bu)=>{var Os=de(),ES=function(t){return typeof t=="function"?t:void 0};Bu.exports=function(t,e){return arguments.length<2?ES(Os[t]):Os[t]&&Os[t][e]}});var zu=x((BP,Fu)=>{var _S=xi();Fu.exports=_S("navigator","userAgent")||""});var Lr=x((FP,Gu)=>{var Wu=de(),As=zu(),Vu=Wu.process,Yu=Wu.Deno,Uu=Vu&&Vu.versions||Yu&&Yu.version,Ku=Uu&&Uu.v8,nt,Cr;Ku?(nt=Ku.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])));Gu.exports=Cr&&+Cr});var Cs=x((zP,Qu)=>{var Xu=Lr(),SS=ye();Qu.exports=!!Object.getOwnPropertySymbols&&!SS(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&Xu&&Xu<41})});var Ls=x((WP,Ju)=>{var wS=Cs();Ju.exports=wS&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var Dr=x((VP,Zu)=>{var TS=xi(),xS=Ls();Zu.exports=xS?function(t){return typeof t=="symbol"}:function(t){var e=TS("Symbol");return typeof e=="function"&&Object(t)instanceof e}});var td=x((YP,ed)=>{var Ds=He();ed.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((UP,nd)=>{nd.exports=!1});var Ir=x((KP,rd)=>{var id=de();rd.exports=function(t,e){try{Object.defineProperty(id,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 Lh=x((uR,Ch)=>{var nO=un(),iO=$t(),rO=ya(),Xr="["+rO+"]",oO=RegExp("^"+Xr+Xr+"*"),sO=RegExp(Xr+Xr+"*$"),Ea=function(t){return function(e){var n=iO(nO(e));return t&1&&(n=n.replace(oO,"")),t&2&&(n=n.replace(sO,"")),n}};Ch.exports={start:Ea(1),end:Ea(2),trim:Ea(3)}});var Ih=x((dR,Mh)=>{var aO=de(),lO=$t(),cO=Lh().trim,Dh=ya(),Qr=aO.parseInt,uO=/^[+-]?0[Xx]/,dO=Qr(Dh+"08")!==8||Qr(Dh+"0x16")!==22;Mh.exports=dO?function(e,n){var i=cO(lO(e));return Qr(i,n>>>0||(uO.test(i)?16:10))}:Qr});var _a=x((hR,Nh)=>{var hO=Di(),pO=$t(),mO=un(),Ph=function(t){return function(e,n){var i=pO(mO(e)),o=hO(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)}};Nh.exports={codeAt:Ph(!1),charAt:Ph(!0)}});var Sa=x((mR,Hh)=>{var _O=pn();Hh.exports=function(t,e,n){for(var i in e)_O(t,i,e[i],n);return t}});var Fh=x((gR,Bh)=>{var SO=Nn(),qh=$r().f,wO={}.toString,$h=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],TO=function(t){try{return qh(t)}catch(e){return $h.slice()}};Bh.exports.f=function(e){return $h&&wO.call(e)=="[object Window]"?TO(e):qh(SO(e))}});var Wh=x((vR,zh)=>{var xO=ye();zh.exports=!xO(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Jr=x((bR,Uh)=>{var OO=it(),AO=Ci(),CO=He(),wa=We(),LO=jt().f,Vh=$r(),DO=Fh(),MO=Nr(),IO=Wh(),Yh=!1,wt=MO("meta"),kO=0,Ta=Object.isExtensible||function(){return!0},xa=function(t){LO(t,wt,{value:{objectID:"O"+kO++,weakData:{}}})},PO=function(t,e){if(!CO(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},NO=function(t,e){if(!wa(t,wt)){if(!Ta(t))return!0;if(!e)return!1;xa(t)}return t[wt].weakData},RO=function(t){return IO&&Yh&&Ta(t)&&!wa(t,wt)&&xa(t),t},jO=function(){HO.enable=function(){},Yh=!0;var t=Vh.f,e=[].splice,n={};n[wt]=1,t(n).length&&(Vh.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},OO({target:"Object",stat:!0,forced:!0},{getOwnPropertyNames:DO.f}))},HO=Uh.exports={enable:jO,fastKey:PO,getWeakData:NO,onFreeze:RO};AO[wt]=!0});var Gh=x((yR,Kh)=>{var qO=Se(),$O=Rn(),BO=qO("iterator"),FO=Array.prototype;Kh.exports=function(t){return t!==void 0&&($O.Array===t||FO[BO]===t)}});var Oa=x((ER,Xh)=>{var zO=ba(),WO=Rn(),VO=Se(),YO=VO("iterator");Xh.exports=function(t){if(t!=null)return t[YO]||t["@@iterator"]||WO[zO(t)]}});var Jh=x((_R,Qh)=>{var UO=qe(),KO=Oa();Qh.exports=function(t,e){var n=arguments.length<2?KO(t):e;if(typeof n!="function")throw TypeError(String(t)+" is not iterable");return UO(n.call(t))}});var tp=x((SR,ep)=>{var Zh=qe();ep.exports=function(t,e,n){var i,o;Zh(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 Zh(i),n}});var Aa=x((wR,ip)=>{var GO=qe(),XO=Gh(),QO=mn(),JO=Ks(),ZO=Jh(),eA=Oa(),np=tp(),Pi=function(t,e){this.stopped=t,this.result=e};ip.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=JO(e,i,1+o+a),d,u,l,m,f,p,g,v=function(y){return d&&np(d,"return",y),new Pi(!0,y)},h=function(y){return o?(GO(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=eA(t),typeof u!="function")throw TypeError("Target is not iterable");if(XO(u)){for(l=0,m=QO(t.length);m>l;l++)if(f=h(t[l]),f&&f instanceof Pi)return f;return new Pi(!1)}d=ZO(t,u)}for(p=d.next;!(g=p.call(d)).done;){try{f=h(g.value)}catch(y){np(d,"throw",y)}if(typeof f=="object"&&f&&f instanceof Pi)return f}return new Pi(!1)}});var Ca=x((TR,rp)=>{rp.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}});var cp=x((xR,lp)=>{var tA=Se(),op=tA("iterator"),sp=!1;try{ap=0,La={next:function(){return{done:!!ap++}},return:function(){sp=!0}},La[op]=function(){retur
`)&&t.flags==="s")})});var Am=x((Qj,Om)=>{var bC=ye(),yC=de(),EC=yC.RegExp;Om.exports=bC(function(){var t=EC("(?<a>b)","g");return t.exec("b").groups.a!=="b"||"b".replace(t,"$<a>c")!=="bc"})});var vo=x((Jj,Dm)=>{"use strict";var _C=$t(),SC=Em(),Cm=wm(),wC=Pr(),TC=Wr(),xC=hn().get,OC=xm(),AC=Am(),go=RegExp.prototype.exec,CC=wC("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}(),Lm=Cm.UNSUPPORTED_Y||Cm.BROKEN_CARET,al=/()??/.exec("")[1]!==void 0,LC=sl||al||Lm||OC||AC;LC&&(ol=function(e){var n=this,i=xC(n),o=_C(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=Lm&&n.sticky,v=SC.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&&CC.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=TC(null),l=0;l<p.length;l++)f=p[l],m[f[0]]=u[f[1]];return u});Dm.exports=ol});var ll=x(()=>{"use strict";var DC=it(),Mm=vo();DC({target:"RegExp",proto:!0,forced:/./.exec!==Mm},{exec:Mm})});var ul=x((t1,Nm)=>{"use strict";ll();var Im=pn(),MC=vo(),km=ye(),Pm=Se(),IC=St(),kC=Pm("species"),cl=RegExp.prototype;Nm.exports=function(t,e,n,i){var o=Pm(t),s=!km(function(){var u={};return u[o]=function(){return 7},""[t](u)!=7}),a=s&&!km(function(){var u=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[kC]=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===MC||g===cl.exec?s&&!p?{done:!0,value:c.call(l,m,f)}:{done:!0,value:u.call(m,l,f)}:{done:!1}});Im(String.prototype,t,d[0]),Im(cl,o,d[1])}i&&IC(cl[o],"sham",!0)}});var dl=x((n1,Rm)=>{"use strict";var PC=_a().charAt;Rm.exports=function(t,e,n){return e+(n?PC(t,e).length:1)}});var fl=x((i1,jm)=>{var NC=Pn(),RC=vo();jm.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(NC(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return RC.call(t,e)}});var $m=x((o1,qm)=>{var FC=dn(),zC=Math.floor,WC="".replace,VC=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,YC=/\$([$&'`]|\d{1,2})/g;qm.exports=function(t,e,n,i,o,s){var a=n+t.length,c=i.length,d=YC;return o!==void 0&&(o=FC(o),d=VC),WC.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=zC(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 Vm=x(vl=>{"use strict";vl.parse=dL;vl.serialize=fL;var lL=decodeURIComponent,cL=encodeURIComponent,uL=/; */,_o=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function dL(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var n={},i=e||{},o=t.split(uL),s=i.decode||lL,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]=hL(l,s))}}return n}function fL(t,e,n){var i=n||{},o=i.encode||cL;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 hL(t,e){try{return e(t)}catch(n){return t}}});var Um=x((x1,Ym)=>{"use strict";Ym.exports=t=>encodeURIComponent(t).replace(/[!'()*]/g,e=>`%${e.charCodeAt(0).toString(16
<span class='flatpickr-weekday'>
`+E.join("</span><span class='flatpickr-weekday'>")+`
</span>
`}}function qv(){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,re("onYearChange"),Gn()),Ki(),re("onMonthChange"),Ji())}function $v(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&&re("onChange")}function Bv(){r.isOpen=!1,r.isMobile||(r.calendarContainer!==void 0&&r.calendarContainer.classList.remove("open"),r._input!==void 0&&r._input.classList.remove("active")),re("onClose")}function Fv(){r.config!==void 0&&re("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(j){}})}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)),j=b.type==="blur"?D&&b.relatedTarget&&!Xn(b.relatedTarget):!D&&!w&&!Xn(b.relatedTarget),P=!r.config.ignoredFocusElements.some(function(B){return B.contains(E)});j&&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(),re("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
`)}:!c.ok&&"detail"in u?{error:u.detail}:u})}function So(t,e){return Ne(this,null,function*(){return yield pg(t,"PATCH",e)})}function AL(t){return Ne(this,null,function*(){return yield pg(t,"GET")})}function mg(t){return Ne(this,null,function*(){return yield AL(t)})}function*R(...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 gg(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 vg(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*bg(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 ke(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 Wn(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 yg(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 CL(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=ke(e,"form"),i=e.getAttribute("href");n!==null&&ie(i)&&(n.setAttribute("action",i),n.submit())}}function Eg(){for(let t of R("a.formaction"))t.addEventListener("click",CL)}function LL(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]);gg(i),t.preventDefault()}}function _g(){for(let t of R("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>LL(i,t))}}function Sg(){for(let t of R("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 _l={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 Sl(t,e){var n;for(let i of R(t)){let o=(n=i.parentElement)==null?void 0:n.parentElement;o!==null&&(e==="show"?zi(o,"show"):zi(o,"hide"))}}function wg(t,e){let n=e.options[e.selectedIndex].innerText.toLowerCase();for(let[i,o]of Object.entries(_l[t]))if(n.endsWith(i)){for(let s of o.hide)
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=ke(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=Wn("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[Wn("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 R(".netbox-api-select"))new Cl(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 R("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 R(".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 nD(t){let e=t.getAttribute("data"),n=t.classList.contains("connected"),i=n?"planned":"connected";ie(e)&&So(`/api/dcim/cables/${e}/`,{status:i}).then(o=>{var s;if(zn(o)){Vn("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 R("button.cable-toggle"))t.addEventListener("click",()=>nD(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 Ll=ko({hidden:!1},{persist:!0,key:"netbox-object-depth"});var Dl=ko({hidden:!1},{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 R(".record-depth"))t.style.display=""}function ov(){for(let t of R(".record-depth"))t.style.display="none"}function iD(t,e){let n=t.get("hidden");t.set("hidden",!n);let i=t.get("hidden");i?ov():rv(),iv(i,e)
/* 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.
***************************************************************************** */