diff --git a/docs/release-notes/version-3.0.md b/docs/release-notes/version-3.0.md index 7fe4bcacfdd..34f9c15d151 100644 --- a/docs/release-notes/version-3.0.md +++ b/docs/release-notes/version-3.0.md @@ -14,6 +14,7 @@ * [#6982](https://github.com/netbox-community/netbox/issues/6982) - Fix styling of empty dropdown list under dark mode * [#6996](https://github.com/netbox-community/netbox/issues/6996) - Global search bar should be full width on mobile * [#7001](https://github.com/netbox-community/netbox/issues/7001) - Fix page focus on load +* [#7034](https://github.com/netbox-community/netbox/issues/7034) - Fix toggling of VLAN group scope selector fields --- diff --git a/netbox/project-static/dist/netbox.js b/netbox/project-static/dist/netbox.js index 1e5b6dd64a8..cebccc35f83 100644 --- a/netbox/project-static/dist/netbox.js +++ b/netbox/project-static/dist/netbox.js @@ -1,12 +1,12 @@ -(()=>{var Dv=Object.create;var Gn=Object.defineProperty,Mv=Object.defineProperties,Iv=Object.getOwnPropertyDescriptor,kv=Object.getOwnPropertyDescriptors,Nv=Object.getOwnPropertyNames,Rl=Object.getOwnPropertySymbols,Pv=Object.getPrototypeOf,jl=Object.prototype.hasOwnProperty,Rv=Object.prototype.propertyIsEnumerable;var Ho=(t,e,n)=>e in t?Gn(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,V=(t,e)=>{for(var n in e||(e={}))jl.call(e,n)&&Ho(t,n,e[n]);if(Rl)for(var n of Rl(e))Rv.call(e,n)&&Ho(t,n,e[n]);return t},Xi=(t,e)=>Mv(t,kv(e)),Hl=t=>Gn(t,"__esModule",{value:!0});var L=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),jv=(t,e)=>{Hl(t);for(var n in e)Gn(t,n,{get:e[n],enumerable:!0})},Hv=(t,e,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of Nv(e))!jl.call(t,i)&&i!=="default"&&Gn(t,i,{get:()=>e[i],enumerable:!(n=Iv(e,i))||n.enumerable});return t},Ae=t=>Hv(Hl(Gn(t!=null?Dv(Pv(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t);var G=(t,e,n)=>(Ho(t,typeof e!="symbol"?e+"":e,n),n);var Ne=(t,e,n)=>new Promise((i,o)=>{var s=u=>{try{c(n.next(u))}catch(d){o(d)}},a=u=>{try{c(n.throw(u))}catch(d){o(d)}},c=u=>u.done?i(u.value):Promise.resolve(u.value).then(s,a);c((n=n.apply(t,e)).next())});var me=L((Ak,yu)=>{var Sr=function(t){return t&&t.Math==Math&&t};yu.exports=Sr(typeof globalThis=="object"&&globalThis)||Sr(typeof window=="object"&&window)||Sr(typeof self=="object"&&self)||Sr(typeof global=="object"&&global)||function(){return this}()||Function("return this")()});var ge=L((Lk,Eu)=>{Eu.exports=function(t){try{return!!t()}catch(e){return!0}}});var Pt=L((Ck,_u)=>{var R_=ge();_u.exports=!R_(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!=7})});var ys=L(Tu=>{"use strict";var Su={}.propertyIsEnumerable,wu=Object.getOwnPropertyDescriptor,j_=wu&&!Su.call({1:2},1);Tu.f=j_?function(e){var n=wu(this,e);return!!n&&n.enumerable}:Su});var wr=L((Mk,xu)=>{xu.exports=function(t,e){return{enumerable:!(t&1),configurable:!(t&2),writable:!(t&4),value:e}}});var In=L((Ik,Ou)=>{var H_={}.toString;Ou.exports=function(t){return H_.call(t).slice(8,-1)}});var yi=L((kk,Au)=>{var q_=ge(),$_=In(),B_="".split;Au.exports=q_(function(){return!Object("z").propertyIsEnumerable(0)})?function(t){return $_(t)=="String"?B_.call(t,""):Object(t)}:Object});var an=L((Nk,Lu)=>{Lu.exports=function(t){if(t==null)throw TypeError("Can't call method on "+t);return t}});var Ei=L((Pk,Cu)=>{var F_=yi(),z_=an();Cu.exports=function(t){return F_(z_(t))}});var Fe=L((Rk,Du)=>{Du.exports=function(t){return typeof t=="object"?t!==null:typeof t=="function"}});var Es=L((jk,Mu)=>{var Tr=Fe();Mu.exports=function(t,e){if(!Tr(t))return t;var n,i;if(e&&typeof(n=t.toString)=="function"&&!Tr(i=n.call(t))||typeof(n=t.valueOf)=="function"&&!Tr(i=n.call(t))||!e&&typeof(n=t.toString)=="function"&&!Tr(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}});var ln=L((Hk,Iu)=>{var W_=an();Iu.exports=function(t){return Object(W_(t))}});var ze=L((qk,ku)=>{var V_=ln(),Y_={}.hasOwnProperty;ku.exports=Object.hasOwn||function(e,n){return Y_.call(V_(e),n)}});var Ss=L(($k,Pu)=>{var U_=me(),Nu=Fe(),_s=U_.document,K_=Nu(_s)&&Nu(_s.createElement);Pu.exports=function(t){return K_?_s.createElement(t):{}}});var ws=L((Bk,Ru)=>{var G_=Pt(),X_=ge(),Q_=Ss();Ru.exports=!G_&&!X_(function(){return Object.defineProperty(Q_("div"),"a",{get:function(){return 7}}).a!=7})});var Ts=L(Hu=>{var J_=Pt(),Z_=ys(),eS=wr(),tS=Ei(),nS=Es(),iS=ze(),rS=ws(),ju=Object.getOwnPropertyDescriptor;Hu.f=J_?ju:function(e,n){if(e=tS(e),n=nS(n,!0),rS)try{return ju(e,n)}catch(i){}if(iS(e,n))return eS(!Z_.f.call(e,n),e[n])}});var We=L((zk,qu)=>{var oS=Fe();qu.exports=function(t){if(!oS(t))throw TypeError(String(t)+" is not an object");return t}});var Rt=L(Fu=>{var sS=Pt(),aS=ws(),$u=We(),lS=Es(),Bu=Object.defineProperty;Fu.f=sS?Bu:function(e,n,i){if($u(e),n=lS(n,!0),$u(i),aS)try{return Bu(e,n,i)}catch(o){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(e[n]=i.value),e}});var it=L((Vk,zu)=>{var cS=Pt(),uS=Rt(),dS=wr();zu.exports=cS?function(t,e,n){return uS.f(t,e,dS(1,n))}:function(t,e,n){return t[e]=n,t}});var xr=L((Yk,Vu)=>{var Wu=me(),fS=it();Vu.exports=function(t,e){try{fS(Wu,t,e)}catch(n){Wu[t]=e}return e}});var Or=L((Uk,Uu)=>{var hS=me(),pS=xr(),Yu="__core-js_shared__",mS=hS[Yu]||pS(Yu,{});Uu.exports=mS});var Os=L((Kk,Ku)=>{var xs=Or(),gS=Function.toString;typeof xs.inspectSource!="function"&&(xs.inspectSource=function(t){return gS.call(t)});Ku.exports=xs.inspectSource});var As=L((Gk,Xu)=>{var vS=me(),bS=Os(),Gu=vS.WeakMap;Xu.exports=typeof Gu=="function"&&/native code/.test(bS(Gu))});var Ar=L((Xk,Qu)=>{Qu.exports=!1});var Lr=L((Qk,Zu)=>{var yS=Ar(),Ju=Or();(Zu.exports=function(t,e){return Ju[t]||(Ju[t]=e!==void 0?e:{})})("versions",[]).push({version:"3.15.1",mode:yS?"pure":"global",copyright:"\xA9 2021 Denis Pushkarev (zloirock.ru)"})});var Cr=L((Jk,ed)=>{var ES=0,_S=Math.random();ed.exports=function(t){return"Symbol("+String(t===void 0?"":t)+")_"+(++ES+_S).toString(36)}});var Dr=L((Zk,nd)=>{var SS=Lr(),wS=Cr(),td=SS("keys");nd.exports=function(t){return td[t]||(td[t]=wS(t))}});var _i=L((eN,id)=>{id.exports={}});var un=L((tN,ad)=>{var TS=As(),xS=me(),OS=Fe(),AS=it(),Ls=ze(),Cs=Or(),LS=Dr(),CS=_i(),rd="Object already initialized",DS=xS.WeakMap,Mr,Si,Ir,MS=function(t){return Ir(t)?Si(t):Mr(t,{})},IS=function(t){return function(e){var n;if(!OS(e)||(n=Si(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}};TS||Cs.state?(jt=Cs.state||(Cs.state=new DS),od=jt.get,Ds=jt.has,sd=jt.set,Mr=function(t,e){if(Ds.call(jt,t))throw new TypeError(rd);return e.facade=t,sd.call(jt,t,e),e},Si=function(t){return od.call(jt,t)||{}},Ir=function(t){return Ds.call(jt,t)}):(cn=LS("state"),CS[cn]=!0,Mr=function(t,e){if(Ls(t,cn))throw new TypeError(rd);return e.facade=t,AS(t,cn,e),e},Si=function(t){return Ls(t,cn)?t[cn]:{}},Ir=function(t){return Ls(t,cn)});var jt,od,Ds,sd,cn;ad.exports={set:Mr,get:Si,has:Ir,enforce:MS,getterFor:IS}});var dn=L((nN,ud)=>{var kS=me(),ld=it(),NS=ze(),PS=xr(),RS=Os(),cd=un(),jS=cd.get,HS=cd.enforce,qS=String(String).split("String");(ud.exports=function(t,e,n,i){var o=i?!!i.unsafe:!1,s=i?!!i.enumerable:!1,a=i?!!i.noTargetGet:!1,c;if(typeof n=="function"&&(typeof e=="string"&&!NS(n,"name")&&ld(n,"name",e),c=HS(n),c.source||(c.source=qS.join(typeof e=="string"?e:""))),t===kS){s?t[e]=n:PS(e,n);return}else o?!a&&t[e]&&(s=!0):delete t[e];s?t[e]=n:ld(t,e,n)})(Function.prototype,"toString",function(){return typeof this=="function"&&jS(this).source||RS(this)})});var fd=L((iN,dd)=>{var $S=me();dd.exports=$S});var kr=L((rN,pd)=>{var Ms=fd(),Is=me(),hd=function(t){return typeof t=="function"?t:void 0};pd.exports=function(t,e){return arguments.length<2?hd(Ms[t])||hd(Is[t]):Ms[t]&&Ms[t][e]||Is[t]&&Is[t][e]}});var wi=L((oN,md)=>{var BS=Math.ceil,FS=Math.floor;md.exports=function(t){return isNaN(t=+t)?0:(t>0?FS:BS)(t)}});var fn=L((sN,gd)=>{var zS=wi(),WS=Math.min;gd.exports=function(t){return t>0?WS(zS(t),9007199254740991):0}});var bd=L((aN,vd)=>{var VS=wi(),YS=Math.max,US=Math.min;vd.exports=function(t,e){var n=VS(t);return n<0?YS(n+e,0):US(n,e)}});var _d=L((lN,Ed)=>{var KS=Ei(),GS=fn(),XS=bd(),yd=function(t){return function(e,n,i){var o=KS(e),s=GS(o.length),a=XS(i,s),c;if(t&&n!=n){for(;s>a;)if(c=o[a++],c!=c)return!0}else for(;s>a;a++)if((t||a in o)&&o[a]===n)return t||a||0;return!t&&-1}};Ed.exports={includes:yd(!0),indexOf:yd(!1)}});var Ns=L((cN,Sd)=>{var ks=ze(),QS=Ei(),JS=_d().indexOf,ZS=_i();Sd.exports=function(t,e){var n=QS(t),i=0,o=[],s;for(s in n)!ks(ZS,s)&&ks(n,s)&&o.push(s);for(;e.length>i;)ks(n,s=e[i++])&&(~JS(o,s)||o.push(s));return o}});var Nr=L((uN,wd)=>{wd.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]});var xd=L(Td=>{var ew=Ns(),tw=Nr(),nw=tw.concat("length","prototype");Td.f=Object.getOwnPropertyNames||function(e){return ew(e,nw)}});var Ps=L(Od=>{Od.f=Object.getOwnPropertySymbols});var Ld=L((hN,Ad)=>{var iw=kr(),rw=xd(),ow=Ps(),sw=We();Ad.exports=iw("Reflect","ownKeys")||function(e){var n=rw.f(sw(e)),i=ow.f;return i?n.concat(i(e)):n}});var Dd=L((pN,Cd)=>{var aw=ze(),lw=Ld(),cw=Ts(),uw=Rt();Cd.exports=function(t,e){for(var n=lw(e),i=uw.f,o=cw.f,s=0;s{var dw=ge(),fw=/#|\.prototype\./,Ti=function(t,e){var n=pw[hw(t)];return n==gw?!0:n==mw?!1:typeof e=="function"?dw(e):!!e},hw=Ti.normalize=function(t){return String(t).replace(fw,".").toLowerCase()},pw=Ti.data={},mw=Ti.NATIVE="N",gw=Ti.POLYFILL="P";Md.exports=Ti});var wt=L((gN,Id)=>{var js=me(),vw=Ts().f,bw=it(),yw=dn(),Ew=xr(),_w=Dd(),Sw=Rs();Id.exports=function(t,e){var n=t.target,i=t.global,o=t.stat,s,a,c,u,d,l;if(i?a=js:o?a=js[n]||Ew(n,{}):a=(js[n]||{}).prototype,a)for(c in e){if(d=e[c],t.noTargetGet?(l=vw(a,c),u=l&&l.value):u=a[c],s=Sw(i?c:n+(o?".":"#")+c,t.forced),!s&&u!==void 0){if(typeof d==typeof u)continue;_w(d,u)}(t.sham||u&&u.sham)&&bw(d,"sham",!0),yw(a,c,d,t)}}});var Hs=L((vN,kd)=>{kd.exports=function(t){if(typeof t!="function")throw TypeError(String(t)+" is not a function");return t}});var qs=L((bN,Nd)=>{var ww=Hs();Nd.exports=function(t,e,n){if(ww(t),e===void 0)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,o){return t.call(e,i,o)};case 3:return function(i,o,s){return t.call(e,i,o,s)}}return function(){return t.apply(e,arguments)}}});var Rd=L((yN,Pd)=>{var Tw=In();Pd.exports=Array.isArray||function(e){return Tw(e)=="Array"}});var Hd=L((EN,jd)=>{var xw=kr();jd.exports=xw("navigator","userAgent")||""});var Rr=L((_N,Fd)=>{var Ow=me(),$s=Hd(),qd=Ow.process,$d=qd&&qd.versions,Bd=$d&&$d.v8,rt,Pr;Bd?(rt=Bd.split("."),Pr=rt[0]<4?1:rt[0]+rt[1]):$s&&(rt=$s.match(/Edge\/(\d+)/),(!rt||rt[1]>=74)&&(rt=$s.match(/Chrome\/(\d+)/),rt&&(Pr=rt[1])));Fd.exports=Pr&&+Pr});var Bs=L((SN,Wd)=>{var zd=Rr(),Aw=ge();Wd.exports=!!Object.getOwnPropertySymbols&&!Aw(function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&zd&&zd<41})});var Yd=L((wN,Vd)=>{var Lw=Bs();Vd.exports=Lw&&!Symbol.sham&&typeof Symbol.iterator=="symbol"});var xe=L((TN,Gd)=>{var Cw=me(),Dw=Lr(),Ud=ze(),Mw=Cr(),Kd=Bs(),Iw=Yd(),xi=Dw("wks"),Oi=Cw.Symbol,kw=Iw?Oi:Oi&&Oi.withoutSetter||Mw;Gd.exports=function(t){return(!Ud(xi,t)||!(Kd||typeof xi[t]=="string"))&&(Kd&&Ud(Oi,t)?xi[t]=Oi[t]:xi[t]=kw("Symbol."+t)),xi[t]}});var Jd=L((xN,Qd)=>{var Nw=Fe(),Xd=Rd(),Pw=xe(),Rw=Pw("species");Qd.exports=function(t,e){var n;return Xd(t)&&(n=t.constructor,typeof n=="function"&&(n===Array||Xd(n.prototype))?n=void 0:Nw(n)&&(n=n[Rw],n===null&&(n=void 0))),new(n===void 0?Array:n)(e===0?0:e)}});var jr=L((ON,ef)=>{var jw=qs(),Hw=yi(),qw=ln(),$w=fn(),Bw=Jd(),Zd=[].push,Ht=function(t){var e=t==1,n=t==2,i=t==3,o=t==4,s=t==6,a=t==7,c=t==5||s;return function(u,d,l,m){for(var f=qw(u),p=Hw(f),v=jw(d,l,3),y=$w(p.length),h=0,b=m||Bw,S=e?b(u,y):n||a?b(u,0):void 0,A,O;y>h;h++)if((c||h in p)&&(A=p[h],O=v(A,h,f),t))if(e)S[h]=O;else if(O)switch(t){case 3:return!0;case 5:return A;case 6:return h;case 2:Zd.call(S,A)}else switch(t){case 4:return!1;case 7:Zd.call(S,A)}return s?-1:i||o?o:S}};ef.exports={forEach:Ht(0),map:Ht(1),filter:Ht(2),some:Ht(3),every:Ht(4),find:Ht(5),findIndex:Ht(6),filterOut:Ht(7)}});var Fs=L((AN,tf)=>{"use strict";var Fw=ge();tf.exports=function(t,e){var n=[][t];return!!n&&Fw(function(){n.call(null,e||function(){throw 1},1)})}});var zs=L((LN,nf)=>{"use strict";var zw=jr().forEach,Ww=Fs(),Vw=Ww("forEach");nf.exports=Vw?[].forEach:function(e){return zw(this,e,arguments.length>1?arguments[1]:void 0)}});var Ws=L((DN,of)=>{of.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}});var af=L((IN,sf)=>{var Qw=!!(typeof window!="undefined"&&window.document&&window.document.createElement);sf.exports=Qw});var cf=L((kN,lf)=>{var Jw=ge(),Zw=xe(),eT=Rr(),tT=Zw("species");lf.exports=function(t){return eT>=51||!Jw(function(){var e=[],n=e.constructor={};return n[tT]=function(){return{foo:1}},e[t](Boolean).foo!==1})}});var Us=L((PN,uf)=>{var sT=Ns(),aT=Nr();uf.exports=Object.keys||function(e){return sT(e,aT)}});var ff=L((RN,df)=>{var lT=Pt(),cT=Rt(),uT=We(),dT=Us();df.exports=lT?Object.defineProperties:function(e,n){uT(e);for(var i=dT(n),o=i.length,s=0,a;o>s;)cT.f(e,a=i[s++],n[a]);return e}});var pf=L((jN,hf)=>{var fT=kr();hf.exports=fT("document","documentElement")});var qr=L((HN,Ef)=>{var hT=We(),pT=ff(),mf=Nr(),mT=_i(),gT=pf(),vT=Ss(),bT=Dr(),gf=">",vf="<",Ks="prototype",Gs="script",bf=bT("IE_PROTO"),Xs=function(){},yf=function(t){return vf+Gs+gf+t+vf+"/"+Gs+gf},yT=function(t){t.write(yf("")),t.close();var e=t.parentWindow.Object;return t=null,e},ET=function(){var t=vT("iframe"),e="java"+Gs+":",n;return t.style.display="none",gT.appendChild(t),t.src=String(e),n=t.contentWindow.document,n.open(),n.write(yf("document.F=Object")),n.close(),n.F},Qs,Hr=function(){try{Qs=document.domain&&new ActiveXObject("htmlfile")}catch(e){}Hr=Qs?yT(Qs):ET();for(var t=mf.length;t--;)delete Hr[Ks][mf[t]];return Hr()};mT[bf]=!0;Ef.exports=Object.create||function(e,n){var i;return e!==null?(Xs[Ks]=hT(e),i=new Xs,Xs[Ks]=null,i[bf]=e):i=Hr(),n===void 0?i:pT(i,n)}});var Sf=L((qN,_f)=>{var _T=xe(),ST=qr(),wT=Rt(),Js=_T("unscopables"),Zs=Array.prototype;Zs[Js]==null&&wT.f(Zs,Js,{configurable:!0,value:ST(null)});_f.exports=function(t){Zs[Js][t]=!0}});var kn=L(($N,wf)=>{wf.exports={}});var xf=L((BN,Tf)=>{var TT=ge();Tf.exports=!TT(function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype})});var ea=L((FN,Af)=>{var xT=ze(),OT=ln(),AT=Dr(),LT=xf(),Of=AT("IE_PROTO"),CT=Object.prototype;Af.exports=LT?Object.getPrototypeOf:function(t){return t=OT(t),xT(t,Of)?t[Of]:typeof t.constructor=="function"&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?CT:null}});var ra=L((zN,Mf)=>{"use strict";var DT=ge(),Lf=ea(),MT=it(),IT=ze(),kT=xe(),NT=Ar(),ta=kT("iterator"),Cf=!1,PT=function(){return this},hn,na,ia;[].keys&&(ia=[].keys(),"next"in ia?(na=Lf(Lf(ia)),na!==Object.prototype&&(hn=na)):Cf=!0);var Df=hn==null||DT(function(){var t={};return hn[ta].call(t)!==t});Df&&(hn={});(!NT||Df)&&!IT(hn,ta)&&MT(hn,ta,PT);Mf.exports={IteratorPrototype:hn,BUGGY_SAFARI_ITERATORS:Cf}});var $r=L((WN,kf)=>{var RT=Rt().f,jT=ze(),HT=xe(),If=HT("toStringTag");kf.exports=function(t,e,n){t&&!jT(t=n?t:t.prototype,If)&&RT(t,If,{configurable:!0,value:e})}});var Pf=L((VN,Nf)=>{"use strict";var qT=ra().IteratorPrototype,$T=qr(),BT=wr(),FT=$r(),zT=kn(),WT=function(){return this};Nf.exports=function(t,e,n){var i=e+" Iterator";return t.prototype=$T(qT,{next:BT(1,n)}),FT(t,i,!1,!0),zT[i]=WT,t}});var jf=L((YN,Rf)=>{var VT=Fe();Rf.exports=function(t){if(!VT(t)&&t!==null)throw TypeError("Can't set "+String(t)+" as a prototype");return t}});var oa=L((UN,Hf)=>{var YT=We(),UT=jf();Hf.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t=!1,e={},n;try{n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,n.call(e,[]),t=e instanceof Array}catch(i){}return function(o,s){return YT(o),UT(s),t?n.call(o,s):o.__proto__=s,o}}():void 0)});var la=L((KN,Uf)=>{"use strict";var KT=wt(),GT=Pf(),qf=ea(),$f=oa(),XT=$r(),Bf=it(),QT=dn(),JT=xe(),sa=Ar(),Ff=kn(),zf=ra(),aa=zf.IteratorPrototype,Br=zf.BUGGY_SAFARI_ITERATORS,Li=JT("iterator"),Wf="keys",Fr="values",Vf="entries",Yf=function(){return this};Uf.exports=function(t,e,n,i,o,s,a){GT(n,e,i);var c=function(b){if(b===o&&f)return f;if(!Br&&b in l)return l[b];switch(b){case Wf:return function(){return new n(this,b)};case Fr:return function(){return new n(this,b)};case Vf:return function(){return new n(this,b)}}return function(){return new n(this)}},u=e+" Iterator",d=!1,l=t.prototype,m=l[Li]||l["@@iterator"]||o&&l[o],f=!Br&&m||c(o),p=e=="Array"&&l.entries||m,v,y,h;if(p&&(v=qf(p.call(new t)),aa!==Object.prototype&&v.next&&(!sa&&qf(v)!==aa&&($f?$f(v,aa):typeof v[Li]!="function"&&Bf(v,Li,Yf)),XT(v,u,!0,!0),sa&&(Ff[u]=Yf))),o==Fr&&m&&m.name!==Fr&&(d=!0,f=function(){return m.call(this)}),(!sa||a)&&l[Li]!==f&&Bf(l,Li,f),Ff[e]=f,o)if(y={values:c(Fr),keys:s?f:c(Wf),entries:c(Vf)},a)for(h in y)(Br||d||!(h in l))&&QT(l,h,y[h]);else KT({target:e,proto:!0,forced:Br||d},y);return y}});var ua=L((GN,Qf)=>{"use strict";var ZT=Ei(),ca=Sf(),Kf=kn(),Gf=un(),ex=la(),Xf="Array Iterator",tx=Gf.set,nx=Gf.getterFor(Xf);Qf.exports=ex(Array,"Array",function(t,e){tx(this,{type:Xf,target:ZT(t),index:0,kind:e})},function(){var t=nx(this),e=t.target,n=t.kind,i=t.index++;return!e||i>=e.length?(t.target=void 0,{value:void 0,done:!0}):n=="keys"?{value:i,done:!1}:n=="values"?{value:e[i],done:!1}:{value:[i,e[i]],done:!1}},"values");Kf.Arguments=Kf.Array;ca("keys");ca("values");ca("entries")});var th=L((XN,eh)=>{"use strict";var Jf=Pt(),ix=ge(),da=Us(),rx=Ps(),ox=ys(),sx=ln(),ax=yi(),Nn=Object.assign,Zf=Object.defineProperty;eh.exports=!Nn||ix(function(){if(Jf&&Nn({b:1},Nn(Zf({},"a",{enumerable:!0,get:function(){Zf(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var t={},e={},n=Symbol(),i="abcdefghijklmnopqrst";return t[n]=7,i.split("").forEach(function(o){e[o]=o}),Nn({},t)[n]!=7||da(Nn({},e)).join("")!=i})?function(e,n){for(var i=sx(e),o=arguments.length,s=1,a=rx.f,c=ox.f;o>s;)for(var u=ax(arguments[s++]),d=a?da(u).concat(a(u)):da(u),l=d.length,m=0,f;l>m;)f=d[m++],(!Jf||c.call(u,f))&&(i[f]=u[f]);return i}:Nn});var zr=L((JN,rh)=>{var cx=xe(),ux=cx("toStringTag"),ih={};ih[ux]="z";rh.exports=String(ih)==="[object z]"});var fa=L((ZN,oh)=>{var dx=zr(),Wr=In(),fx=xe(),hx=fx("toStringTag"),px=Wr(function(){return arguments}())=="Arguments",mx=function(t,e){try{return t[e]}catch(n){}};oh.exports=dx?Wr:function(t){var e,n,i;return t===void 0?"Undefined":t===null?"Null":typeof(n=mx(e=Object(t),hx))=="string"?n:px?Wr(e):(i=Wr(e))=="Object"&&typeof e.callee=="function"?"Arguments":i}});var ah=L((eP,sh)=>{"use strict";var gx=zr(),vx=fa();sh.exports=gx?{}.toString:function(){return"[object "+vx(this)+"]"}});var ha=L((nP,lh)=>{lh.exports=` -\v\f\r \xA0\u1680\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF`});var uh=L((iP,ch)=>{var _x=an(),Sx=ha(),Vr="["+Sx+"]",wx=RegExp("^"+Vr+Vr+"*"),Tx=RegExp(Vr+Vr+"*$"),pa=function(t){return function(e){var n=String(_x(e));return t&1&&(n=n.replace(wx,"")),t&2&&(n=n.replace(Tx,"")),n}};ch.exports={start:pa(1),end:pa(2),trim:pa(3)}});var hh=L((rP,fh)=>{var xx=me(),Ox=uh().trim,dh=ha(),Yr=xx.parseInt,Ax=/^[+-]?0[Xx]/,Lx=Yr(dh+"08")!==8||Yr(dh+"0x16")!==22;fh.exports=Lx?function(e,n){var i=Ox(String(e));return Yr(i,n>>>0||(Ax.test(i)?16:10))}:Yr});var ma=L((sP,gh)=>{var Dx=wi(),Mx=an(),mh=function(t){return function(e,n){var i=String(Mx(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)}};gh.exports={codeAt:mh(!1),charAt:mh(!0)}});var ga=L((lP,yh)=>{var Rx=dn();yh.exports=function(t,e,n){for(var i in e)Rx(t,i,e[i],n);return t}});var _h=L((cP,Eh)=>{var jx=ge();Eh.exports=!jx(function(){return Object.isExtensible(Object.preventExtensions({}))})});var Ur=L((uP,Sh)=>{var Hx=_i(),qx=Fe(),va=ze(),$x=Rt().f,Bx=Cr(),Fx=_h(),pn=Bx("meta"),zx=0,ba=Object.isExtensible||function(){return!0},ya=function(t){$x(t,pn,{value:{objectID:"O"+ ++zx,weakData:{}}})},Wx=function(t,e){if(!qx(t))return typeof t=="symbol"?t:(typeof t=="string"?"S":"P")+t;if(!va(t,pn)){if(!ba(t))return"F";if(!e)return"E";ya(t)}return t[pn].objectID},Vx=function(t,e){if(!va(t,pn)){if(!ba(t))return!0;if(!e)return!1;ya(t)}return t[pn].weakData},Yx=function(t){return Fx&&Ux.REQUIRED&&ba(t)&&!va(t,pn)&&ya(t),t},Ux=Sh.exports={REQUIRED:!1,fastKey:Wx,getWeakData:Vx,onFreeze:Yx};Hx[pn]=!0});var Th=L((dP,wh)=>{var Kx=xe(),Gx=kn(),Xx=Kx("iterator"),Qx=Array.prototype;wh.exports=function(t){return t!==void 0&&(Gx.Array===t||Qx[Xx]===t)}});var Oh=L((fP,xh)=>{var Jx=fa(),Zx=kn(),eO=xe(),tO=eO("iterator");xh.exports=function(t){if(t!=null)return t[tO]||t["@@iterator"]||Zx[Jx(t)]}});var Lh=L((hP,Ah)=>{var nO=We();Ah.exports=function(t){var e=t.return;if(e!==void 0)return nO(e.call(t)).value}});var Ea=L((pP,Dh)=>{var iO=We(),rO=Th(),oO=fn(),sO=qs(),aO=Oh(),Ch=Lh(),Ci=function(t,e){this.stopped=t,this.result=e};Dh.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=sO(e,i,1+o+a),u,d,l,m,f,p,v,y=function(b){return u&&Ch(u),new Ci(!0,b)},h=function(b){return o?(iO(b),a?c(b[0],b[1],y):c(b[0],b[1])):a?c(b,y):c(b)};if(s)u=t;else{if(d=aO(t),typeof d!="function")throw TypeError("Target is not iterable");if(rO(d)){for(l=0,m=oO(t.length);m>l;l++)if(f=h(t[l]),f&&f instanceof Ci)return f;return new Ci(!1)}u=d.call(t)}for(p=u.next;!(v=p.call(u)).done;){try{f=h(v.value)}catch(b){throw Ch(u),b}if(typeof f=="object"&&f&&f instanceof Ci)return f}return new Ci(!1)}});var _a=L((mP,Mh)=>{Mh.exports=function(t,e,n){if(!(t instanceof e))throw TypeError("Incorrect "+(n?n+" ":"")+"invocation");return t}});var Rh=L((gP,Ph)=>{var lO=xe(),Ih=lO("iterator"),kh=!1;try{Nh=0,Sa={next:function(){return{done:!!Nh++}},return:function(){kh=!0}},Sa[Ih]=function(){return this},Array.from(Sa,function(){throw 2})}catch(t){}var Nh,Sa;Ph.exports=function(t,e){if(!e&&!kh)return!1;var n=!1;try{var i={};i[Ih]=function(){return{next:function(){return{done:n=!0}}}},t(i)}catch(o){}return n}});var qh=L((vP,Hh)=>{var cO=Fe(),jh=oa();Hh.exports=function(t,e,n){var i,o;return jh&&typeof(i=e.constructor)=="function"&&i!==n&&cO(o=i.prototype)&&o!==n.prototype&&jh(t,o),t}});var Fh=L((bP,Bh)=>{"use strict";var uO=wt(),dO=me(),$h=Rs(),fO=dn(),hO=Ur(),pO=Ea(),mO=_a(),wa=Fe(),Ta=ge(),gO=Rh(),vO=$r(),bO=qh();Bh.exports=function(t,e,n){var i=t.indexOf("Map")!==-1,o=t.indexOf("Weak")!==-1,s=i?"set":"add",a=dO[t],c=a&&a.prototype,u=a,d={},l=function(b){var S=c[b];fO(c,b,b=="add"?function(O){return S.call(this,O===0?0:O),this}:b=="delete"?function(A){return o&&!wa(A)?!1:S.call(this,A===0?0:A)}:b=="get"?function(O){return o&&!wa(O)?void 0:S.call(this,O===0?0:O)}:b=="has"?function(O){return o&&!wa(O)?!1:S.call(this,O===0?0:O)}:function(O,k){return S.call(this,O===0?0:O,k),this})},m=$h(t,typeof a!="function"||!(o||c.forEach&&!Ta(function(){new a().entries().next()})));if(m)u=n.getConstructor(e,t,i,s),hO.REQUIRED=!0;else if($h(t,!0)){var f=new u,p=f[s](o?{}:-0,1)!=f,v=Ta(function(){f.has(1)}),y=gO(function(b){new a(b)}),h=!o&&Ta(function(){for(var b=new a,S=5;S--;)b[s](S,S);return!b.has(-0)});y||(u=e(function(b,S){mO(b,u,t);var A=bO(new a,b,u);return S!=null&&pO(S,A[s],{that:A,AS_ENTRIES:i}),A}),u.prototype=c,c.constructor=u),(v||h)&&(l("delete"),l("has"),i&&l("get")),(h||p)&&l(s),o&&c.clear&&delete c.clear}return d[t]=u,uO({global:!0,forced:u!=a},d),vO(u,t),o||n.setStrong(u,t,i),u}});var Gh=L((yP,Kh)=>{"use strict";var zh=ga(),Kr=Ur().getWeakData,yO=We(),xa=Fe(),EO=_a(),_O=Ea(),Wh=jr(),Vh=ze(),Yh=un(),SO=Yh.set,wO=Yh.getterFor,TO=Wh.find,xO=Wh.findIndex,OO=0,Gr=function(t){return t.frozen||(t.frozen=new Uh)},Uh=function(){this.entries=[]},Oa=function(t,e){return TO(t.entries,function(n){return n[0]===e})};Uh.prototype={get:function(t){var e=Oa(this,t);if(e)return e[1]},has:function(t){return!!Oa(this,t)},set:function(t,e){var n=Oa(this,t);n?n[1]=e:this.entries.push([t,e])},delete:function(t){var e=xO(this.entries,function(n){return n[0]===t});return~e&&this.entries.splice(e,1),!!~e}};Kh.exports={getConstructor:function(t,e,n,i){var o=t(function(c,u){EO(c,o,e),SO(c,{type:e,id:OO++,frozen:void 0}),u!=null&&_O(u,c[i],{that:c,AS_ENTRIES:n})}),s=wO(e),a=function(c,u,d){var l=s(c),m=Kr(yO(u),!0);return m===!0?Gr(l).set(u,d):m[l.id]=d,c};return zh(o.prototype,{delete:function(c){var u=s(this);if(!xa(c))return!1;var d=Kr(c);return d===!0?Gr(u).delete(c):d&&Vh(d,u.id)&&delete d[u.id]},has:function(u){var d=s(this);if(!xa(u))return!1;var l=Kr(u);return l===!0?Gr(d).has(u):l&&Vh(l,d.id)}}),zh(o.prototype,n?{get:function(u){var d=s(this);if(xa(u)){var l=Kr(u);return l===!0?Gr(d).get(u):l?l[d.id]:void 0}},set:function(u,d){return a(this,u,d)}}:{add:function(u){return a(this,u,!0)}}),o}}});var ep=L((EP,Zh)=>{"use strict";var Xh=me(),AO=ga(),LO=Ur(),CO=Fh(),Qh=Gh(),Xr=Fe(),Qr=un().enforce,DO=As(),MO=!Xh.ActiveXObject&&"ActiveXObject"in Xh,Jr=Object.isExtensible,Di,Jh=function(t){return function(){return t(this,arguments.length?arguments[0]:void 0)}},IO=Zh.exports=CO("WeakMap",Jh,Qh);DO&&MO&&(Di=Qh.getConstructor(Jh,"WeakMap",!0),LO.REQUIRED=!0,Pn=IO.prototype,Aa=Pn.delete,Mi=Pn.has,La=Pn.get,Ca=Pn.set,AO(Pn,{delete:function(t){if(Xr(t)&&!Jr(t)){var e=Qr(this);return e.frozen||(e.frozen=new Di),Aa.call(this,t)||e.frozen.delete(t)}return Aa.call(this,t)},has:function(e){if(Xr(e)&&!Jr(e)){var n=Qr(this);return n.frozen||(n.frozen=new Di),Mi.call(this,e)||n.frozen.has(e)}return Mi.call(this,e)},get:function(e){if(Xr(e)&&!Jr(e)){var n=Qr(this);return n.frozen||(n.frozen=new Di),Mi.call(this,e)?La.call(this,e):n.frozen.get(e)}return La.call(this,e)},set:function(e,n){if(Xr(e)&&!Jr(e)){var i=Qr(this);i.frozen||(i.frozen=new Di),Mi.call(this,e)?Ca.call(this,e,n):i.frozen.set(e,n)}else Ca.call(this,e,n);return this}}));var Pn,Aa,Mi,La,Ca});var lp=L((SP,ap)=>{var rp="Expected a function",op=0/0,NO="[object Symbol]",PO=/^\s+|\s+$/g,RO=/^[-+]0x[0-9a-f]+$/i,jO=/^0b[01]+$/i,HO=/^0o[0-7]+$/i,qO=parseInt,$O=typeof global=="object"&&global&&global.Object===Object&&global,BO=typeof self=="object"&&self&&self.Object===Object&&self,FO=$O||BO||Function("return this")(),zO=Object.prototype,WO=zO.toString,VO=Math.max,YO=Math.min,Pa=function(){return FO.Date.now()};function UO(t,e,n){var i,o,s,a,c,u,d=0,l=!1,m=!1,f=!0;if(typeof t!="function")throw new TypeError(rp);e=sp(e)||0,Zr(n)&&(l=!!n.leading,m="maxWait"in n,s=m?VO(sp(n.maxWait)||0,e):s,f="trailing"in n?!!n.trailing:f);function p(T){var C=i,D=o;return i=o=void 0,d=T,a=t.apply(D,C),a}function v(T){return d=T,c=setTimeout(b,e),l?p(T):a}function y(T){var C=T-u,D=T-d,N=e-C;return m?YO(N,s-D):N}function h(T){var C=T-u,D=T-d;return u===void 0||C>=e||C<0||m&&D>=s}function b(){var T=Pa();if(h(T))return S(T);c=setTimeout(b,y(T))}function S(T){return c=void 0,f&&i?p(T):(i=o=void 0,a)}function A(){c!==void 0&&clearTimeout(c),d=0,i=u=o=c=void 0}function O(){return c===void 0?a:S(Pa())}function k(){var T=Pa(),C=h(T);if(i=arguments,o=this,u=T,C){if(c===void 0)return v(u);if(m)return c=setTimeout(b,e),p(u)}return c===void 0&&(c=setTimeout(b,e)),a}return k.cancel=A,k.flush=O,k}function KO(t,e,n){var i=!0,o=!0;if(typeof t!="function")throw new TypeError(rp);return Zr(n)&&(i="leading"in n?!!n.leading:i,o="trailing"in n?!!n.trailing:o),UO(t,e,{leading:i,maxWait:e,trailing:o})}function Zr(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function GO(t){return!!t&&typeof t=="object"}function XO(t){return typeof t=="symbol"||GO(t)&&WO.call(t)==NO}function sp(t){if(typeof t=="number")return t;if(XO(t))return op;if(Zr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Zr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(PO,"");var n=jO.test(t);return n||HO.test(t)?qO(t.slice(2),n?2:8):RO.test(t)?op:+t}ap.exports=KO});var fp=L((wP,dp)=>{var QO="Expected a function",cp=0/0,JO="[object Symbol]",ZO=/^\s+|\s+$/g,eA=/^[-+]0x[0-9a-f]+$/i,tA=/^0b[01]+$/i,nA=/^0o[0-7]+$/i,iA=parseInt,rA=typeof global=="object"&&global&&global.Object===Object&&global,oA=typeof self=="object"&&self&&self.Object===Object&&self,sA=rA||oA||Function("return this")(),aA=Object.prototype,lA=aA.toString,cA=Math.max,uA=Math.min,Ra=function(){return sA.Date.now()};function dA(t,e,n){var i,o,s,a,c,u,d=0,l=!1,m=!1,f=!0;if(typeof t!="function")throw new TypeError(QO);e=up(e)||0,ja(n)&&(l=!!n.leading,m="maxWait"in n,s=m?cA(up(n.maxWait)||0,e):s,f="trailing"in n?!!n.trailing:f);function p(T){var C=i,D=o;return i=o=void 0,d=T,a=t.apply(D,C),a}function v(T){return d=T,c=setTimeout(b,e),l?p(T):a}function y(T){var C=T-u,D=T-d,N=e-C;return m?uA(N,s-D):N}function h(T){var C=T-u,D=T-d;return u===void 0||C>=e||C<0||m&&D>=s}function b(){var T=Ra();if(h(T))return S(T);c=setTimeout(b,y(T))}function S(T){return c=void 0,f&&i?p(T):(i=o=void 0,a)}function A(){c!==void 0&&clearTimeout(c),d=0,i=u=o=c=void 0}function O(){return c===void 0?a:S(Ra())}function k(){var T=Ra(),C=h(T);if(i=arguments,o=this,u=T,C){if(c===void 0)return v(u);if(m)return c=setTimeout(b,e),p(u)}return c===void 0&&(c=setTimeout(b,e)),a}return k.cancel=A,k.flush=O,k}function ja(t){var e=typeof t;return!!t&&(e=="object"||e=="function")}function fA(t){return!!t&&typeof t=="object"}function hA(t){return typeof t=="symbol"||fA(t)&&lA.call(t)==JO}function up(t){if(typeof t=="number")return t;if(hA(t))return cp;if(ja(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ja(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=t.replace(ZO,"");var n=tA.test(t);return n||nA.test(t)?iA(t.slice(2),n?2:8):eA.test(t)?cp:+t}dp.exports=dA});var _p=L((TP,Ep)=>{var pA="Expected a function",hp="__lodash_hash_undefined__",mA="[object Function]",gA="[object GeneratorFunction]",vA=/[\\^$.*+?()[\]{}|]/g,bA=/^\[object .+?Constructor\]$/,yA=typeof global=="object"&&global&&global.Object===Object&&global,EA=typeof self=="object"&&self&&self.Object===Object&&self,pp=yA||EA||Function("return this")();function _A(t,e){return t==null?void 0:t[e]}function SA(t){var e=!1;if(t!=null&&typeof t.toString!="function")try{e=!!(t+"")}catch(n){}return e}var wA=Array.prototype,TA=Function.prototype,mp=Object.prototype,Ha=pp["__core-js_shared__"],gp=function(){var t=/[^.]+$/.exec(Ha&&Ha.keys&&Ha.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}(),vp=TA.toString,qa=mp.hasOwnProperty,xA=mp.toString,OA=RegExp("^"+vp.call(qa).replace(vA,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),AA=wA.splice,LA=bp(pp,"Map"),ki=bp(Object,"create");function gn(t){var e=-1,n=t?t.length:0;for(this.clear();++e-1}function HA(t,e){var n=this.__data__,i=eo(n,t);return i<0?n.push([t,e]):n[i][1]=e,this}Rn.prototype.clear=NA;Rn.prototype.delete=PA;Rn.prototype.get=RA;Rn.prototype.has=jA;Rn.prototype.set=HA;function vn(t){var e=-1,n=t?t.length:0;for(this.clear();++e{var r0=Hs(),o0=ln(),s0=yi(),a0=fn(),qp=function(t){return function(e,n,i,o){r0(n);var s=o0(e),a=s0(s),c=a0(s.length),u=t?c-1:0,d=t?-1:1;if(i<2)for(;;){if(u in a){o=a[u],u+=d;break}if(u+=d,t?u<0:c<=u)throw TypeError("Reduce of empty array with no initial value")}for(;t?u>=0:c>u;u+=d)u in a&&(o=n(o,a[u],u,s));return o}};$p.exports={left:qp(!1),right:qp(!0)}});var zp=L((RR,Fp)=>{var l0=In(),c0=me();Fp.exports=l0(c0.process)=="process"});var Up=L((qR,Yp)=>{"use strict";var E0=We();Yp.exports=function(){var t=E0(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}});var Xp=L(Ja=>{var Kp=ge(),Gp=function(t,e){return RegExp(t,e)};Ja.UNSUPPORTED_Y=Kp(function(){var t=Gp("a","y");return t.lastIndex=2,t.exec("abcd")!=null});Ja.BROKEN_CARET=Kp(function(){var t=Gp("^r","gy");return t.lastIndex=2,t.exec("str")!=null})});var Jp=L((BR,Qp)=>{var _0=ge();Qp.exports=_0(function(){var t=RegExp(".","string".charAt(0));return!(t.dotAll&&t.exec(` -`)&&t.flags==="s")})});var em=L((FR,Zp)=>{var S0=ge();Zp.exports=S0(function(){var t=RegExp("(?b)","string".charAt(5));return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"})});var uo=L((zR,im)=>{"use strict";var w0=Up(),tm=Xp(),T0=Lr(),x0=qr(),O0=un().get,A0=Jp(),L0=em(),co=RegExp.prototype.exec,C0=T0("native-string-replace",String.prototype.replace),Za=co,el=function(){var t=/a/,e=/b*/g;return co.call(t,"a"),co.call(e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),nm=tm.UNSUPPORTED_Y||tm.BROKEN_CARET,tl=/()??/.exec("")[1]!==void 0,D0=el||tl||nm||A0||L0;D0&&(Za=function(e){var n=this,i=O0(n),o=i.raw,s,a,c,u,d,l,m;if(o)return o.lastIndex=n.lastIndex,s=Za.call(o,e),n.lastIndex=o.lastIndex,s;var f=i.groups,p=nm&&n.sticky,v=w0.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)),tl&&(a=new RegExp("^"+y+"$(?!\\s)",v)),el&&(c=n.lastIndex),u=co.call(p?a:n,b),p?u?(u.input=u.input.slice(h),u[0]=u[0].slice(h),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:el&&u&&(n.lastIndex=n.global?u.index+u[0].length:c),tl&&u&&u.length>1&&C0.call(u[0],a,function(){for(d=1;d{"use strict";var M0=wt(),rm=uo();M0({target:"RegExp",proto:!0,forced:/./.exec!==rm},{exec:rm})});var rl=L((YR,lm)=>{"use strict";nl();var om=dn(),I0=uo(),sm=ge(),am=xe(),k0=it(),N0=am("species"),il=RegExp.prototype;lm.exports=function(t,e,n,i){var o=am(t),s=!sm(function(){var d={};return d[o]=function(){return 7},""[t](d)!=7}),a=s&&!sm(function(){var d=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[N0]=function(){return l},l.flags="",l[o]=/./[o]),l.exec=function(){return d=!0,null},l[o](""),!d});if(!s||!a||n){var c=/./[o],u=e(o,""[t],function(d,l,m,f,p){var v=l.exec;return v===I0||v===il.exec?s&&!p?{done:!0,value:c.call(l,m,f)}:{done:!0,value:d.call(m,l,f)}:{done:!1}});om(String.prototype,t,u[0]),om(il,o,u[1])}i&&k0(il[o],"sham",!0)}});var ol=L((UR,cm)=>{"use strict";var P0=ma().charAt;cm.exports=function(t,e,n){return e+(n?P0(t,e).length:1)}});var sl=L((KR,um)=>{var R0=In(),j0=uo();um.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(R0(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return j0.call(t,e)}});var hm=L((XR,fm)=>{var z0=ln(),W0=Math.floor,V0="".replace,Y0=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,U0=/\$([$&'`]|\d{1,2})/g;fm.exports=function(t,e,n,i,o,s){var a=n+t.length,c=i.length,u=U0;return o!==void 0&&(o=z0(o),u=Y0),V0.call(s,u,function(d,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 d;if(f>c){var p=W0(f/10);return p===0?d:p<=c?i[p-1]===void 0?l.charAt(1):i[p-1]+l.charAt(1):d}m=i[f-1]}return m===void 0?"":m})}});var bm=L(ul=>{"use strict";ul.parse=fL;ul.serialize=hL;var cL=decodeURIComponent,uL=encodeURIComponent,dL=/; */,mo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function fL(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var n={},i=e||{},o=t.split(dL),s=i.decode||cL,a=0;a{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof vo=="object"&&vo.exports?vo.exports=e():t.EvEmitter=e()})(typeof window!="undefined"?window:Rm,function(){"use strict";function t(){}var e=t.prototype;return e.on=function(n,i){if(!(!n||!i)){var o=this._events=this._events||{},s=o[n]=o[n]||[];return s.indexOf(i)==-1&&s.push(i),this}},e.once=function(n,i){if(!(!n||!i)){this.on(n,i);var o=this._onceEvents=this._onceEvents||{},s=o[n]=o[n]||{};return s[i]=!0,this}},e.off=function(n,i){var o=this._events&&this._events[n];if(!(!o||!o.length)){var s=o.indexOf(i);return s!=-1&&o.splice(s,1),this}},e.emitEvent=function(n,i){var o=this._events&&this._events[n];if(!(!o||!o.length)){o=o.slice(0),i=i||[];for(var s=this._onceEvents&&this._onceEvents[n],a=0;a{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof bo=="object"&&bo.exports?bo.exports=e():t.getSize=e()})(window,function(){"use strict";function e(f){var p=parseFloat(f),v=f.indexOf("%")==-1&&!isNaN(p);return v&&p}function n(){}var i=typeof console=="undefined"?n:function(f){console.error(f)},o=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],s=o.length;function a(){for(var f={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},p=0;pb)","string".charAt(5));return t.exec("b").groups.a!=="b"||"b".replace(t,"$c")!=="bc"})});var uo=C((zR,im)=>{"use strict";var T0=Up(),tm=Xp(),x0=Cr(),O0=qr(),A0=un().get,C0=Jp(),L0=em(),co=RegExp.prototype.exec,D0=x0("native-string-replace",String.prototype.replace),Za=co,el=function(){var t=/a/,e=/b*/g;return co.call(t,"a"),co.call(e,"a"),t.lastIndex!==0||e.lastIndex!==0}(),nm=tm.UNSUPPORTED_Y||tm.BROKEN_CARET,tl=/()??/.exec("")[1]!==void 0,M0=el||tl||nm||C0||L0;M0&&(Za=function(e){var n=this,i=A0(n),o=i.raw,s,a,c,u,d,l,m;if(o)return o.lastIndex=n.lastIndex,s=Za.call(o,e),n.lastIndex=o.lastIndex,s;var f=i.groups,p=nm&&n.sticky,v=T0.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)),tl&&(a=new RegExp("^"+y+"$(?!\\s)",v)),el&&(c=n.lastIndex),u=co.call(p?a:n,b),p?u?(u.input=u.input.slice(h),u[0]=u[0].slice(h),u.index=n.lastIndex,n.lastIndex+=u[0].length):n.lastIndex=0:el&&u&&(n.lastIndex=n.global?u.index+u[0].length:c),tl&&u&&u.length>1&&D0.call(u[0],a,function(){for(d=1;d{"use strict";var I0=wt(),rm=uo();I0({target:"RegExp",proto:!0,forced:/./.exec!==rm},{exec:rm})});var rl=C((YR,lm)=>{"use strict";nl();var om=dn(),k0=uo(),sm=ge(),am=xe(),N0=it(),P0=am("species"),il=RegExp.prototype;lm.exports=function(t,e,n,i){var o=am(t),s=!sm(function(){var d={};return d[o]=function(){return 7},""[t](d)!=7}),a=s&&!sm(function(){var d=!1,l=/a/;return t==="split"&&(l={},l.constructor={},l.constructor[P0]=function(){return l},l.flags="",l[o]=/./[o]),l.exec=function(){return d=!0,null},l[o](""),!d});if(!s||!a||n){var c=/./[o],u=e(o,""[t],function(d,l,m,f,p){var v=l.exec;return v===k0||v===il.exec?s&&!p?{done:!0,value:c.call(l,m,f)}:{done:!0,value:d.call(m,l,f)}:{done:!1}});om(String.prototype,t,u[0]),om(il,o,u[1])}i&&N0(il[o],"sham",!0)}});var ol=C((UR,cm)=>{"use strict";var R0=ma().charAt;cm.exports=function(t,e,n){return e+(n?R0(t,e).length:1)}});var sl=C((KR,um)=>{var j0=In(),H0=uo();um.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(j0(t)!=="RegExp")throw TypeError("RegExp#exec called on incompatible receiver");return H0.call(t,e)}});var hm=C((XR,fm)=>{var W0=ln(),V0=Math.floor,Y0="".replace,U0=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,K0=/\$([$&'`]|\d{1,2})/g;fm.exports=function(t,e,n,i,o,s){var a=n+t.length,c=i.length,u=K0;return o!==void 0&&(o=W0(o),u=U0),Y0.call(s,u,function(d,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 d;if(f>c){var p=V0(f/10);return p===0?d:p<=c?i[p-1]===void 0?l.charAt(1):i[p-1]+l.charAt(1):d}m=i[f-1]}return m===void 0?"":m})}});var bm=C(ul=>{"use strict";ul.parse=hC;ul.serialize=pC;var uC=decodeURIComponent,dC=encodeURIComponent,fC=/; */,mo=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/;function hC(t,e){if(typeof t!="string")throw new TypeError("argument str must be a string");for(var n={},i=e||{},o=t.split(fC),s=i.decode||uC,a=0;a{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof vo=="object"&&vo.exports?vo.exports=e():t.EvEmitter=e()})(typeof window!="undefined"?window:jm,function(){"use strict";function t(){}var e=t.prototype;return e.on=function(n,i){if(!(!n||!i)){var o=this._events=this._events||{},s=o[n]=o[n]||[];return s.indexOf(i)==-1&&s.push(i),this}},e.once=function(n,i){if(!(!n||!i)){this.on(n,i);var o=this._onceEvents=this._onceEvents||{},s=o[n]=o[n]||{};return s[i]=!0,this}},e.off=function(n,i){var o=this._events&&this._events[n];if(!(!o||!o.length)){var s=o.indexOf(i);return s!=-1&&o.splice(s,1),this}},e.emitEvent=function(n,i){var o=this._events&&this._events[n];if(!(!o||!o.length)){o=o.slice(0),i=i||[];for(var s=this._onceEvents&&this._onceEvents[n],a=0;a{(function(t,e){typeof define=="function"&&define.amd?define(e):typeof bo=="object"&&bo.exports?bo.exports=e():t.getSize=e()})(window,function(){"use strict";function e(f){var p=parseFloat(f),v=f.indexOf("%")==-1&&!isNaN(p);return v&&p}function n(){}var i=typeof console=="undefined"?n:function(f){console.error(f)},o=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"],s=o.length;function a(){for(var f={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},p=0;p")!=="7"});K0("replace",function(t,e,n){var i=pm?"$":"$0";return[function(s,a){var c=Z0(this),u=s==null?void 0:s[al];return u!==void 0?u.call(s,c,a):e.call(String(c),s,a)},function(o,s){if(typeof s=="string"&&s.indexOf(i)===-1&&s.indexOf("$<")===-1){var a=n(e,this,o,s);if(a.done)return a.value}var c=X0(this),u=String(o),d=typeof s=="function";d||(s=String(s));var l=c.global;if(l){var m=c.unicode;c.lastIndex=0}for(var f=[];;){var p=nL(c,u);if(p===null||(f.push(p),!l))break;var v=String(p[0]);v===""&&(c.lastIndex=eL(u,Q0(c.lastIndex),m))}for(var y="",h=0,b=0;b=h&&(y+=u.slice(h,A)+D,h=A+S.length)}return y+u.slice(h)}]},!lL||!aL||pm);var ho=function(e){var n=Array.prototype.reduce.call(e,function(i,o){var s=o.name.match(/data-simplebar-(.+)/);if(s){var a=s[1].replace(/\W+(.)/g,function(c,u){return u.toUpperCase()});switch(o.value){case"true":i[a]=!0;break;case"false":i[a]=!1;break;case void 0:i[a]=!0;break;default:i[a]=o.value}}return i},{});return n};function qt(t){return!t||!t.ownerDocument||!t.ownerDocument.defaultView?window:t.ownerDocument.defaultView}function po(t){return!t||!t.ownerDocument?document:t.ownerDocument}var Hn=null,gm=null;fo.default&&window.addEventListener("resize",function(){gm!==window.devicePixelRatio&&(gm=window.devicePixelRatio,Hn=null)});function vm(t){if(Hn===null){var e=po(t);if(typeof e=="undefined")return Hn=0,Hn;var n=e.body,i=e.createElement("div");i.classList.add("simplebar-hide-scrollbar"),n.appendChild(i);var o=i.getBoundingClientRect().right;n.removeChild(i),Hn=o}return Hn}var ce=function(){function t(n,i){var o=this;this.onScroll=function(){var s=qt(o.el);o.scrollXTicking||(s.requestAnimationFrame(o.scrollX),o.scrollXTicking=!0),o.scrollYTicking||(s.requestAnimationFrame(o.scrollY),o.scrollYTicking=!0)},this.scrollX=function(){o.axis.x.isOverflowing&&(o.showScrollbar("x"),o.positionScrollbar("x")),o.scrollXTicking=!1},this.scrollY=function(){o.axis.y.isOverflowing&&(o.showScrollbar("y"),o.positionScrollbar("y")),o.scrollYTicking=!1},this.onMouseEnter=function(){o.showScrollbar("x"),o.showScrollbar("y")},this.onMouseMove=function(s){o.mouseX=s.clientX,o.mouseY=s.clientY,(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseMoveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseMoveForAxis("y")},this.onMouseLeave=function(){o.onMouseMove.cancel(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseLeaveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseLeaveForAxis("y"),o.mouseX=-1,o.mouseY=-1},this.onWindowResize=function(){o.scrollbarWidth=o.getScrollbarWidth(),o.hideNativeScrollbar()},this.hideScrollbars=function(){o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.track.rect)||(o.axis.y.scrollbar.el.classList.remove(o.classNames.visible),o.axis.y.isVisible=!1),o.isWithinBounds(o.axis.x.track.rect)||(o.axis.x.scrollbar.el.classList.remove(o.classNames.visible),o.axis.x.isVisible=!1)},this.onPointerEvent=function(s){var a,c;o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&(a=o.isWithinBounds(o.axis.x.track.rect)),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&(c=o.isWithinBounds(o.axis.y.track.rect)),(a||c)&&(s.preventDefault(),s.stopPropagation(),s.type==="mousedown"&&(a&&(o.axis.x.scrollbar.rect=o.axis.x.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.x.scrollbar.rect)?o.onDragStart(s,"x"):o.onTrackClick(s,"x")),c&&(o.axis.y.scrollbar.rect=o.axis.y.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.scrollbar.rect)?o.onDragStart(s,"y"):o.onTrackClick(s,"y"))))},this.drag=function(s){var a,c=o.axis[o.draggedAxis].track,u=c.rect[o.axis[o.draggedAxis].sizeAttr],d=o.axis[o.draggedAxis].scrollbar,l=o.contentWrapperEl[o.axis[o.draggedAxis].scrollSizeAttr],m=parseInt(o.elStyles[o.axis[o.draggedAxis].sizeAttr],10);s.preventDefault(),s.stopPropagation(),o.draggedAxis==="y"?a=s.pageY:a=s.pageX;var f=a-c.rect[o.axis[o.draggedAxis].offsetAttr]-o.axis[o.draggedAxis].dragOffset,p=f/(u-d.size),v=p*(l-m);o.draggedAxis==="x"&&(v=o.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?v-(u+d.size):v,v=o.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-v:v),o.contentWrapperEl[o.axis[o.draggedAxis].scrollOffsetAttr]=v},this.onEndDrag=function(s){var a=po(o.el),c=qt(o.el);s.preventDefault(),s.stopPropagation(),o.el.classList.remove(o.classNames.dragging),a.removeEventListener("mousemove",o.drag,!0),a.removeEventListener("mouseup",o.onEndDrag,!0),o.removePreventClickId=c.setTimeout(function(){a.removeEventListener("click",o.preventClick,!0),a.removeEventListener("dblclick",o.preventClick,!0),o.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=n,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},i),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,!t.instances.has(this.el)&&(this.recalculate=(0,ll.default)(this.recalculate.bind(this),64),this.onMouseMove=(0,ll.default)(this.onMouseMove.bind(this),64),this.hideScrollbars=(0,cl.default)(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=(0,cl.default)(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=(0,mm.default)(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var i=document.createElement("div");i.innerHTML='
';var o=i.firstElementChild;document.body.appendChild(o);var s=o.firstElementChild;o.scrollLeft=0;var a=t.getOffset(o),c=t.getOffset(s);o.scrollLeft=999;var u=t.getOffset(s);return{isRtlScrollingInverted:a.left!==c.left&&c.left-u.left!=0,isRtlScrollbarInverted:a.left!==c.left}},t.getOffset=function(i){var o=i.getBoundingClientRect(),s=po(i),a=qt(i);return{top:o.top+(a.pageYOffset||s.documentElement.scrollTop),left:o.left+(a.pageXOffset||s.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),fo.default&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var i=this;if(Array.prototype.filter.call(this.el.children,function(a){return a.classList.contains(i.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),s=document.createElement("div");o.classList.add(this.classNames.track),s.classList.add(this.classNames.scrollbar),o.appendChild(s),this.axis.x.track.el=o.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var i=this,o=qt(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(c){i.el.addEventListener(c,i.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(c){i.el.addEventListener(c,i.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),o.addEventListener("resize",this.onWindowResize);var s=!1,a=o.ResizeObserver||Xa;this.resizeObserver=new a(function(){!s||i.recalculate()}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),o.requestAnimationFrame(function(){s=!0}),this.mutationObserver=new o.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var i=qt(this.el);this.elStyles=i.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var o=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1,a=this.contentEl.offsetWidth,c=this.contentWrapperEl.offsetWidth,u=this.elStyles.overflowX,d=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var l=this.contentEl.scrollHeight,m=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=o?"auto":"100%",this.placeholderEl.style.width=s?a+"px":"auto",this.placeholderEl.style.height=l+"px";var f=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=m>a,this.axis.y.isOverflowing=l>f,this.axis.x.isOverflowing=u==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=d==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var p=this.axis.x.isOverflowing?this.scrollbarWidth:0,v=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&m>c-v,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>f-p,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(i){if(i===void 0&&(i="y"),!this.axis[i].isOverflowing)return 0;var o=this.contentEl[this.axis[i].scrollSizeAttr],s=this.axis[i].track.el[this.axis[i].offsetSizeAttr],a,c=s/o;return a=Math.max(~~(c*s),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},e.positionScrollbar=function(i){if(i===void 0&&(i="y"),!!this.axis[i].isOverflowing){var o=this.contentWrapperEl[this.axis[i].scrollSizeAttr],s=this.axis[i].track.el[this.axis[i].offsetSizeAttr],a=parseInt(this.elStyles[this.axis[i].sizeAttr],10),c=this.axis[i].scrollbar,u=this.contentWrapperEl[this.axis[i].scrollOffsetAttr];u=i==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-u:u;var d=u/(o-a),l=~~((s-c.size)*d);l=i==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?l+(s-c.size):l,c.el.style.transform=i==="x"?"translate3d("+l+"px, 0, 0)":"translate3d(0, "+l+"px, 0)"}},e.toggleTrackVisibility=function(i){i===void 0&&(i="y");var o=this.axis[i].track.el,s=this.axis[i].scrollbar.el;this.axis[i].isOverflowing||this.axis[i].forceVisible?(o.style.visibility="visible",this.contentWrapperEl.style[this.axis[i].overflowAttr]="scroll"):(o.style.visibility="hidden",this.contentWrapperEl.style[this.axis[i].overflowAttr]="hidden"),this.axis[i].isOverflowing?s.style.display="block":s.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(i){i===void 0&&(i="y"),this.axis[i].track.rect=this.axis[i].track.el.getBoundingClientRect(),this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var o=this.isWithinBounds(this.axis[i].scrollbar.rect);o?this.axis[i].scrollbar.el.classList.add(this.classNames.hover):this.axis[i].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[i].track.rect)?(this.showScrollbar(i),this.axis[i].track.el.classList.add(this.classNames.hover)):this.axis[i].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(i){i===void 0&&(i="y"),this.axis[i].track.el.classList.remove(this.classNames.hover),this.axis[i].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(i){i===void 0&&(i="y");var o=this.axis[i].scrollbar.el;this.axis[i].isVisible||(o.classList.add(this.classNames.visible),this.axis[i].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(i,o){o===void 0&&(o="y");var s=po(this.el),a=qt(this.el),c=this.axis[o].scrollbar,u=o==="y"?i.pageY:i.pageX;this.axis[o].dragOffset=u-c.rect[this.axis[o].offsetAttr],this.draggedAxis=o,this.el.classList.add(this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(i,o){var s=this;if(o===void 0&&(o="y"),!!this.options.clickOnTrack){var a=qt(this.el);this.axis[o].scrollbar.rect=this.axis[o].scrollbar.el.getBoundingClientRect();var c=this.axis[o].scrollbar,u=c.rect[this.axis[o].offsetAttr],d=parseInt(this.elStyles[this.axis[o].sizeAttr],10),l=this.contentWrapperEl[this.axis[o].scrollOffsetAttr],m=o==="y"?this.mouseY-u:this.mouseX-u,f=m<0?-1:1,p=f===-1?l-d:l+d,v=function y(){if(f===-1){if(l>p){var h;l-=s.options.clickOnTrackSpeed,s.contentWrapperEl.scrollTo((h={},h[s.axis[o].offsetAttr]=l,h)),a.requestAnimationFrame(y)}}else if(l=i.left&&this.mouseX<=i.left+i.width&&this.mouseY>=i.top&&this.mouseY<=i.top+i.height},e.findChild=function(i,o){var s=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector;return Array.prototype.filter.call(i.children,function(a){return s.call(a,o)})[0]},t}();ce.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};ce.instances=new WeakMap;ce.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(t){t.getAttribute("data-simplebar")!=="init"&&!ce.instances.has(t)&&new ce(t,ho(t.attributes))})};ce.removeObserver=function(){this.globalObserver.disconnect()};ce.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver!="undefined"&&(this.globalObserver=new MutationObserver(ce.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))};ce.handleMutations=function(t){t.forEach(function(e){Array.prototype.forEach.call(e.addedNodes,function(n){n.nodeType===1&&(n.hasAttribute("data-simplebar")?!ce.instances.has(n)&&new ce(n,ho(n.attributes)):Array.prototype.forEach.call(n.querySelectorAll("[data-simplebar]"),function(i){i.getAttribute("data-simplebar")!=="init"&&!ce.instances.has(i)&&new ce(i,ho(i.attributes))}))}),Array.prototype.forEach.call(e.removedNodes,function(n){n.nodeType===1&&(n.hasAttribute('[data-simplebar="init"]')?ce.instances.has(n)&&ce.instances.get(n).unMount():Array.prototype.forEach.call(n.querySelectorAll('[data-simplebar="init"]'),function(i){ce.instances.has(i)&&ce.instances.get(i).unMount()}))})})};ce.getOptions=ho;fo.default&&ce.initHtmlApi();var ym=Ae(bm());function Em(t){return"error"in t&&"exception"in t}function qn(t){return"error"in t}function _m(t){return typeof t.next=="string"}function ae(t){let e=["","null","undefined"];return Array.isArray(t)?t.length>0:typeof t=="string"&&!e.includes(t)||typeof t=="number"?!0:typeof t=="boolean"}function Ri(t){return t.every(e=>typeof e!="undefined"&&e!==null)}function ji(t){for(let e of t.options)e.selected&&(e.selected=!1);t.value=""}function dl(t){return typeof t!==null&&typeof t!="undefined"}function mL(){let{csrftoken:t}=ym.default.parse(document.cookie);if(typeof t=="undefined")throw new Error("Invalid or missing CSRF token");return t}function Sm(t,e,n){return Ne(this,null,function*(){let i=mL(),o=new Headers({"X-CSRFToken":i}),s;typeof n!="undefined"&&(s=JSON.stringify(n),o.set("content-type","application/json"));let a=yield fetch(t,{method:e,body:s,headers:o,credentials:"same-origin"}),c=a.headers.get("Content-Type");if(typeof c=="string"&&c.includes("text"))return{error:yield a.text()};let u=yield a.json();return!a.ok&&Array.isArray(u)?{error:u.join(` -`)}:!a.ok&&"detail"in u?{error:u.detail}:u})}function go(t,e){return Ne(this,null,function*(){return yield Sm(t,"PATCH",e)})}function gL(t){return Ne(this,null,function*(){return yield Sm(t,"GET")})}function wm(t){return Ne(this,null,function*(){return yield gL(t)})}function*j(...t){for(let e of t)for(let n of document.querySelectorAll(e))n!==null&&(yield n)}function te(t){return document.getElementById(t)}function Tm(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 xm(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 Ke(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*Om(t){for(let e of t.querySelectorAll("td"))e!==null&&ae(e.innerText)&&e.innerText!=="\u2014"&&(yield e.innerText.replaceAll(/[\n\r]/g,"").trim())}function De(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 fl(t,e,n,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)}o.classList.add(...n);for(let s of i)o.appendChild(s);return o}function Am(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 vL(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=De(e,"form"),i=e.getAttribute("href");n!==null&&ae(i)&&(n.setAttribute("action",i),n.submit())}}function Lm(){for(let t of j("a.formaction"))t.addEventListener("click",vL)}function bL(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]);Tm(i),t.preventDefault()}}function Cm(){for(let t of j("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>bL(i,t))}}function Dm(){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 Mm={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 hl(t,e){var n,i;for(let o of j(t))e==="show"?(n=o.parentElement)==null||n.classList.remove("d-none","invisible"):(i=o.parentElement)==null||i.classList.add("d-none","invisible")}function yL(t){let e=t.currentTarget,n=e.options[e.selectedIndex].innerText.toLowerCase();for(let[i,o]of Object.entries(Mm))if(n.endsWith(i)){for(let s of o.hide)hl(`#${s}`,"hide");for(let s of o.show)hl(`#${s}`,"show");break}else for(let s of Mm.default.hide)hl(`#${s}`,"hide")}function Im(){for(let t of j("#id_scope_type"))t.addEventListener("change",yL)}function at(t){var n,i;let e=(i=(n=t==null?void 0:t.parentElement)==null?void 0:n.parentElement)!=null?i:null;return e!==null&&e.classList.contains("row")?e:null}function EL(){let t=[te("id_tagged_vlans"),te("id_untagged_vlan"),te("id_vlan_group")];if(Ri(t)){let[e,n]=t;ji(n),ji(e);for(let i of t)Ke(at(i),"hide")}}function _L(){let t=[te("id_tagged_vlans"),te("id_untagged_vlan"),te("id_vlan_group")];if(Ri(t)){let[e,n,i]=t;ji(e),Ke(at(i),"show"),Ke(at(n),"show"),Ke(at(e),"hide")}}function SL(){let t=[te("id_tagged_vlans"),te("id_untagged_vlan"),te("id_vlan_group")];if(Ri(t)){let[e,n,i]=t;Ke(at(e),"show"),Ke(at(i),"show"),Ke(at(n),"show")}}function wL(){let t=[te("id_tagged_vlans"),te("id_untagged_vlan"),te("id_vlan_group")];if(Ri(t)){let[e,n,i]=t;ji(e),Ke(at(i),"show"),Ke(at(n),"show"),Ke(at(e),"hide")}}function km(t){switch(t.value){case"access":_L();break;case"tagged":SL();break;case"tagged-all":wL();break;case"":EL();break}}function Nm(){let t=te("id_mode");t!==null&&(t.addEventListener("change",()=>km(t)),km(t))}function Pm(){for(let t of[Lm,Cm,Dm,Im,Nm])t()}var Fm=Ae(Bm());window.Collapse=Ce;window.Modal=Nt;window.Toast=St;window.Tooltip=tt;function TL(){for(let t of j(".masonry"))new Fm.default(t,{itemSelector:".masonry-item",percentPosition:!0})}function xL(){for(let t of j('[data-bs-toggle="tooltip"]'))new tt(t,{container:"body"})}function OL(){for(let t of j('[data-bs-toggle="modal"]'))new Nt(t)}function $n(t,e,n,i){let o="mdi-alert";switch(t){case"warning":o="mdi-alert";break;case"success":o="mdi-check-circle";break;case"info":o="mdi-information";break;case"danger":o="mdi-alert";break}let s=document.createElement("div");s.setAttribute("class","toast-container position-fixed bottom-0 end-0 m-3");let a=document.createElement("div");a.setAttribute("class",`toast bg-${t}`),a.setAttribute("role","alert"),a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true");let c=document.createElement("div");c.setAttribute("class",`toast-header bg-${t} text-body`);let u=document.createElement("i");u.setAttribute("class",`mdi ${o}`);let d=document.createElement("strong");d.setAttribute("class","me-auto ms-1"),d.innerText=e;let l=document.createElement("button");l.setAttribute("type","button"),l.setAttribute("class","btn-close"),l.setAttribute("data-bs-dismiss","toast"),l.setAttribute("aria-label","Close");let m=document.createElement("div");if(m.setAttribute("class","toast-body"),c.appendChild(u),c.appendChild(d),typeof i!="undefined"){let p=document.createElement("small");p.setAttribute("class","text-muted"),c.appendChild(p)}return c.appendChild(l),m.innerText=n.trim(),a.appendChild(c),a.appendChild(m),s.appendChild(a),document.body.appendChild(s),new St(a)}function AL(){let{hash:t}=location;if(t&&t.match(/^#tab_.+$/)){let e=t.replace("tab_","");for(let n of j(`ul.nav.nav-tabs .nav-link[data-bs-target="${e}"]`))new sn(n).show()}}function LL(){let t=document.querySelectorAll(".sidebar .accordion-item");function e(n){for(let i of t)i!==n?i.classList.remove("is-open"):i.classList.toggle("is-open")}for(let n of t)for(let i of n.querySelectorAll(".accordion-button"))i.addEventListener("click",()=>{e(n)})}function zm(){for(let t of[xL,OL,TL,AL,LL])t()}var gl=Ae(ml());function DL(t,e){var c;let n=t.currentTarget,i=De(n,"span.search-obj-selected"),o=De(n,"input.search-obj-type"),s=n.getAttribute("data-search-value"),a="";i!==null&&o!==null&&(ae(s)&&a!==s?(a=s,i.innerHTML=(c=e.textContent)!=null?c:"Error",o.value=s):(a="",i.innerHTML="All Objects",o.value=""))}function ML(){for(let t of j(".search-obj-selector"))for(let e of t.querySelectorAll("li > button.dropdown-item"))e.addEventListener("click",n=>DL(n,e))}function IL(){var t;for(let e of j("input.interface-filter")){let o=function(s){let a=s.target,c=new RegExp(a.value.toLowerCase().trim());for(let u of i){let d=u.querySelector('input[type="checkbox"][name="pk"]');d!==null&&(d.checked=!1);let l=u.getAttribute("data-name");typeof l=="string"&&(c.test(l.toLowerCase().trim())?u.classList.contains("d-none")&&u.classList.remove("d-none"):u.classList.add("d-none"))}},n=De(e,"table"),i=Array.from((t=n==null?void 0:n.querySelectorAll("tbody > tr"))!=null?t:[]).filter(s=>s!==null);e.addEventListener("keyup",(0,gl.default)(o,300))}}function kL(){var t;for(let e of j("input.object-filter")){let o=function(s){let a=s.target,c=new RegExp(a.value.toLowerCase().trim());for(let u of i){let d=u.querySelector('input[type="checkbox"][name="pk"]');d!==null&&(d.checked=!1);for(let l of Om(u))if(c.test(l.toLowerCase())){u.classList.remove("d-none");break}else u.classList.add("d-none")}},n=De(e,"table"),i=Array.from((t=n==null?void 0:n.querySelectorAll("tbody > tr"))!=null?t:[]).filter(s=>s!==null);e.addEventListener("keyup",(0,gl.default)(o,300))}}function Vm(){for(let t of[ML,kL,IL])t()}var bl=Ae(ug()),vg=Ae(ml());function dg(t,e,n){return Math.min(Math.max(t,n),e)}var Bn=class extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}};function zL(t){if(typeof t!="string")throw new Bn(t);if(t.trim().toLowerCase()==="transparent")return[0,0,0,0];let e=t.trim();e=GL.test(t)?function(a){let c=a.toLowerCase().trim(),u=WL[function(d){let l=5381,m=d.length;for(;m;)l=33*l^d.charCodeAt(--m);return(l>>>0)%2341}(c)];if(!u)throw new Bn(a);return`#${u}`}(t):t;let n=VL.exec(e);if(n){let a=Array.from(n).slice(1);return[...a.slice(0,3).map(c=>parseInt(Hi(c,2),16)),parseInt(Hi(a[3]||"f",2),16)/255]}let i=YL.exec(e);if(i){let a=Array.from(i).slice(1);return[...a.slice(0,3).map(c=>parseInt(c,16)),parseInt(a[3]||"ff",16)/255]}let o=UL.exec(e);if(o){let a=Array.from(o).slice(1);return[...a.slice(0,3).map(c=>parseInt(c,10)),parseFloat(a[3]||"1")]}let s=KL.exec(e);if(s){let[a,c,u,d]=Array.from(s).slice(1).map(parseFloat);if(dg(0,100,c)!==c)throw new Bn(t);if(dg(0,100,u)!==u)throw new Bn(t);return[...XL(a,c,u),d||1]}throw new Bn(t)}var fg=t=>parseInt(t.replace(/_/g,""),36),WL="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,e)=>{let n=fg(e.substring(0,3)),i=fg(e.substring(3)).toString(16),o="";for(let s=0;s<6-i.length;s++)o+="0";return t[n]=`${o}${i}`,t},{}),Hi=(t,e)=>Array.from(Array(e)).map(()=>t).join(""),VL=new RegExp(`^#${Hi("([a-f0-9])",3)}([a-f0-9])?$`,"i"),YL=new RegExp(`^#${Hi("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),UL=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Hi(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),KL=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,GL=/^[a-z]+$/i,hg=t=>Math.round(255*t),XL=(t,e,n)=>{let i=n/100;if(e===0)return[i,i,i].map(hg);let o=(t%360+360)%360/60,s=(1-Math.abs(2*i-1))*(e/100),a=s*(1-Math.abs(o%2-1)),c=0,u=0,d=0;o>=0&&o<1?(c=s,u=a):o>=1&&o<2?(c=a,u=s):o>=2&&o<3?(u=s,d=a):o>=3&&o<4?(u=a,d=s):o>=4&&o<5?(c=a,d=s):o>=5&&o<6&&(c=s,d=a);let l=i-s/2;return[c+l,u+l,d+l].map(hg)};function QL(t){if(t==="transparent")return 0;function e(s){let a=s/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}let[n,i,o]=zL(t);return .2126*e(n)+.7152*e(i)+.0722*e(o)}function JL(t){return QL(t)>.179}function qi(t){return JL(t)?"#000":"#fff"}var xo={};(function(t,e){typeof xo=="object"&&typeof module=="object"?module.exports=e():typeof define=="function"&&define.amd?define([],e):typeof xo=="object"?xo.SlimSelect=e():t.SlimSelect=e()})(window,function(){return n={},t.m=e=[function(i,o,s){"use strict";function a(u,d){d=d||{bubbles:!1,cancelable:!1,detail:void 0};var l=document.createEvent("CustomEvent");return l.initCustomEvent(u,d.bubbles,d.cancelable,d.detail),l}var c;o.__esModule=!0,o.hasClassInTree=function(u,d){function l(m,f){return f&&m&&m.classList&&m.classList.contains(f)?m:null}return l(u,d)||function m(f,p){return f&&f!==document?l(f,p)?f:m(f.parentNode,p):null}(u,d)},o.ensureElementInView=function(u,d){var l=u.scrollTop+u.offsetTop,m=l+u.clientHeight,f=d.offsetTop,p=f+d.clientHeight;f=window.innerHeight?"above":l?d:"below"},o.debounce=function(u,d,l){var m;return d===void 0&&(d=100),l===void 0&&(l=!1),function(){for(var f=[],p=0;p[^<>]*'+y+"")},o.kebabCase=function(u){var d=u.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,function(l){return"-"+l.toLowerCase()});return u[0]===u[0].toUpperCase()?d.substring(1):d},typeof(c=window).CustomEvent!="function"&&(a.prototype=c.Event.prototype,c.CustomEvent=a)},function(i,o,s){"use strict";o.__esModule=!0;var a=(c.prototype.newOption=function(d){return{id:d.id?d.id:String(Math.floor(1e8*Math.random())),value:d.value?d.value:"",text:d.text?d.text:"",innerHTML:d.innerHTML?d.innerHTML:"",selected:!!d.selected&&d.selected,display:d.display===void 0||d.display,disabled:!!d.disabled&&d.disabled,placeholder:!!d.placeholder&&d.placeholder,class:d.class?d.class:void 0,data:d.data?d.data:{},mandatory:!!d.mandatory&&d.mandatory}},c.prototype.add=function(d){this.data.push({id:String(Math.floor(1e8*Math.random())),value:d.value,text:d.text,innerHTML:"",selected:!1,display:!0,disabled:!1,placeholder:!1,class:void 0,mandatory:d.mandatory,data:{}})},c.prototype.parseSelectData=function(){this.data=[];for(var d=0,l=this.main.select.element.childNodes;d',placeholder:this.placeholder,searchPlaceholder:"Filter",onChange:()=>this.handleSlimChange()}),this.getFilteredBy(),this.getPathKeys();for(let o of this.filterParams.keys())this.updateQueryParams(o);for(let[o,s]of this.filterParams.entries())ae(s)&&this.queryParams.set(o,s);for(let o of this.pathValues.keys())this.updatePathValues(o);this.queryParams.set("brief",[!0]),this.updateQueryUrl(),this.resetClasses(),this.setSlimStyles(),this.initResetButton(),this.initRefreshButton(),this.addEventListeners();let n=this.base.getAttribute("data-fetch-trigger"),i=this.base.closest(".content-container .collapse");switch(gg(n)?this.trigger=n:i!==null?this.trigger="collapse":this.trigger="load",this.trigger){case"collapse":i!==null&&(i.addEventListener("show.bs.collapse",()=>this.loadData()),i.addEventListener("hide.bs.collapse",()=>this.resetOptions()));break;case"open":this.slim.beforeOpen=()=>this.loadData();break;case"load":Promise.all([this.loadData()]);break}}get options(){return this._options}set options(e){let n=e;this.preSorted||(n=e.sort((a,c)=>a.text.toLowerCase()>c.text.toLowerCase()?1:-1));let i=Am(n,"value"),o=typeof i.find(a=>a.value==="")!="undefined",s=i.findIndex(a=>a.value==="");o&&s<0&&(i.splice(s),i=[$i,...i]),o||(i=[$i,...i]),this._options=i,this.slim.setData(i)}resetOptions(){this.options=[$i]}disable(){this.slim.slim.singleSelected!==null?this.slim.slim.singleSelected.container.hasAttribute("disabled")||this.slim.slim.singleSelected.container.setAttribute("disabled",""):this.slim.slim.multiSelected!==null&&(this.slim.slim.multiSelected.container.hasAttribute("disabled")||this.slim.slim.multiSelected.container.setAttribute("disabled",""))}enable(){this.slim.slim.singleSelected!==null?this.slim.slim.singleSelected.container.hasAttribute("disabled")&&this.slim.slim.singleSelected.container.removeAttribute("disabled"):this.slim.slim.multiSelected!==null&&this.slim.slim.multiSelected.container.hasAttribute("disabled")&&this.slim.slim.multiSelected.container.removeAttribute("disabled")}addEventListeners(){let e=(0,vg.default)(i=>this.handleSearch(i),300,!1);this.slim.slim.search.input.addEventListener("keyup",i=>e(i)),this.slim.slim.search.input.addEventListener("paste",i=>e(i)),this.slim.slim.list.addEventListener("scroll",()=>this.handleScroll()),this.base.addEventListener(`netbox.select.atbottom.${this.name}`,()=>this.fetchOptions(this.more,"merge"));let n=new Set([...this.filterParams.keys(),...this.pathValues.keys()]);for(let i of n){let o=document.querySelector(`[name="${i}"]`);o!==null&&o.addEventListener("change",s=>this.handleEvent(s)),this.base.addEventListener(`netbox.select.onload.${i}`,s=>this.handleEvent(s))}}loadData(){return Ne(this,null,function*(){try{this.disable(),yield this.getOptions("replace")}catch(e){console.error(e)}finally{this.setOptionStyles(),this.enable(),this.base.dispatchEvent(this.loadEvent)}})}processOptions(e,n="merge"){return Ne(this,null,function*(){let i=Array.from(this.base.options).filter(s=>s.selected).map(s=>s.getAttribute("value")).filter(ae),o=[];for(let s of e.results){let a=s.display;typeof s._depth=="number"&&(this.preSorted||(this.preSorted=!0),a=`${"\u2500".repeat(s._depth)} ${a}`);let c={},u=s.id.toString(),d,l,m;for(let[p,v]of Object.entries(s)){if(!["id","slug"].includes(p)&&["string","number","boolean"].includes(typeof v)){let y=p.replaceAll("_","-");c[y]=String(v)}this.disabledAttributes.some(y=>y.toLowerCase()===p.toLowerCase())&&(typeof v=="string"&&v.toLowerCase()!=="false"||typeof v=="boolean"&&v===!0||typeof v=="number"&&v>0)&&(m=!0)}i.some(p=>this.disabledOptions.includes(p))&&(m=!0),i.includes(u)&&(l=!0,m=!1);let f={value:u,text:a,data:c,style:d,selected:l,disabled:m};o=[...o,f]}switch(n){case"merge":this.options=[...this.options,...o];break;case"replace":this.options=o}_m(e)?this.more=e.next:this.more=null})}fetchOptions(e,n="merge"){return Ne(this,null,function*(){if(typeof e=="string"){let i=yield wm(e);if(qn(i))return Em(i)?this.handleError(i.exception,i.error):this.handleError(`Error Fetching Options for field '${this.name}'`,i.error);yield this.processOptions(i,n)}})}getOptions(e="merge"){return Ne(this,null,function*(){if(this.queryUrl.includes("{{")){this.options=[$i];return}yield this.fetchOptions(this.queryUrl,e)})}handleSearch(e){return Ne(this,null,function*(){let{value:n}=e.target,i=bl.default.stringifyUrl({url:this.queryUrl,query:{q:n}});yield this.fetchOptions(i,"merge"),this.slim.data.search(n),this.slim.render()})}handleScroll(){let e=this.slim.slim.list.scrollTop+this.slim.slim.list.offsetHeight===this.slim.slim.list.scrollHeight;this.atBottom&&!e?(this.atBottom=!1,this.base.dispatchEvent(this.bottomEvent)):!this.atBottom&&e&&(this.atBottom=!0,this.base.dispatchEvent(this.bottomEvent))}handleEvent(e){let n=e.target;this.updateQueryParams(n.name),this.updatePathValues(n.name),this.updateQueryUrl(),Promise.all([this.loadData()])}handleError(e,n){$n("danger",e,n).show(),this.resetOptions()}handleSlimChange(){let e=this.slim.slim;e&&(e.container.classList.contains("is-invalid")||this.base.classList.contains("is-invalid"))&&(e.container.classList.remove("is-invalid"),this.base.classList.remove("is-invalid")),this.base.dispatchEvent(this.loadEvent)}updateQueryUrl(){let e={};for(let[o,s]of this.queryParams.entries())e[o]=s;let n=this.url;for(let[o,s]of this.pathValues.entries())for(let a of this.url.matchAll(new RegExp(`({{${o}}})`,"g")))ae(s)&&(n=n.replaceAll(a[1],s.toString()));let i=bl.default.stringifyUrl({url:n,query:e});this.queryUrl!==i&&(this.queryUrl=i,this.base.setAttribute("data-url",i))}updateQueryParams(e){let n=e.replaceAll(/^id_/gi,""),i=te(`id_${n}`);if(i!==null){for(let[s,a]of ZL)if(n.match(s)){n=n.replaceAll(s,a);break}n.substring(n.length-3)!=="_id"&&(n=`${n}_id`);let o=[];i.multiple?o=Array.from(i.options).filter(s=>s.selected).map(s=>s.value):i.value!==""&&(o=[i.value]),o.length>0?this.filterParams.has(e)&&this.queryParams.set(n,o):this.queryParams.delete(n)}}updatePathValues(e){let n=e.replaceAll(/^id_/gi,""),i=te(`id_${n}`);i!==null&&this.url.includes("{{")&&Boolean(this.url.match(new RegExp(`({{(${e})}})`,"g")))&&(ae(i.value)?this.pathValues.set(e,i.value):this.pathValues.set(e,""))}getPlaceholder(){let e=this.name;if(this.base.id){let n=document.querySelector(`label[for=${this.base.id}]`);n!==null&&(e=`Select ${n.innerText.trim()}`)}return e}getDisabledOptions(){var n;let e=[];if(mg(this.base))try{let i=JSON.parse((n=this.base.getAttribute("data-query-param-exclude"))!=null?n:"[]");e=[...e,...i]}catch(i){console.group(`Unable to parse data-query-param-exclude value on select element '${this.name}'`),console.warn(i),console.groupEnd()}return e}getDisabledAttributes(){let e=[...bg],n=this.base.getAttribute("disabled-indicator");return ae(n)&&(e=[...e,n]),e}getPathKeys(){for(let e of this.url.matchAll(new RegExp("{{(.+)}}","g")))this.pathValues.set(e[1],"")}getFilteredBy(){let e=new RegExp(/\[|\]|"|\$/g),n=new RegExp(/data-query-param-/g),i=Object.values(this.base.attributes).map(s=>s.name).filter(s=>s.includes("data")),o=(s,a)=>{let c=this.filterParams.get(s);if(typeof c!="undefined"){let u=Array.from(new Set([...c,a]));this.filterParams.set(s,u)}else a===""?this.filterParams.set(s,[]):this.filterParams.set(s,[a])};for(let s of i)if(s.match(n)&&s!=="data-query-param-exclude"){let a=this.base.getAttribute(s);if(a!==null)try{let c=JSON.parse(a);if(Array.isArray(c))for(let u of c)u.match(/^\$.+$/g)?o(u.replaceAll(e,""),""):o(s.replaceAll(n,""),u);else c.match(/^\$.+$/g)?o(c.replaceAll(e,""),""):o(s.replaceAll(n,""),c)}catch(c){console.warn(c),a.match(/^\$.+$/g)?o(a.replaceAll(e,""),""):o(s.replaceAll(n,""),a)}}}setSlimStyles(){let{width:e,height:n}=this.slim.slim.container.getBoundingClientRect();this.base.style.opacity="0",this.base.style.width=`${e}px`,this.base.style.height=`${n}px`,this.base.style.display="block",this.base.style.position="absolute",this.base.style.pointerEvents="none"}setOptionStyles(){for(let e of this.options)if("data"in e&&"id"in e&&typeof e.data!="undefined"&&typeof e.id!="undefined"&&"color"in e.data){let n=e.id,i=e.data,o=document.createElement("style"),s=`#${i.color}`,a=qi(s);o.setAttribute("data-netbox",n),o.innerHTML=` + `}}function dv(){r.calendarContainer.classList.add("hasWeeks");var g=d("div","flatpickr-weekwrapper");g.appendChild(d("span","flatpickr-weekday",r.l10n.weekAbbreviation));var E=d("div","flatpickr-weeks");return g.appendChild(E),{weekWrapper:g,weekNumbers:E}}function Do(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"),Wn()),zi(),Z("onMonthChange"),Ui())}function fv(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&&Ee(),r.redraw(),g&&Z("onChange")}function hv(){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 pv(){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 Vn(g){return r.config.appendTo&&r.config.appendTo.contains(g)?!0:r.calendarContainer.contains(g)}function Mo(g){if(r.isOpen&&!r.config.inline){var E=p(g),w=Vn(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&&!Vn(g.relatedTarget):!I&&!w&&!Vn(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 Wi(g){if(!(!g||r.config.minDate&&gr.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"),Wn())}}function Bt(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.config.enable.length>0,R=I?r.config.enable:r.config.disable,P=0,q=void 0;P=q.from.getTime()&&w.getTime()<=q.to.getTime())return I}return!I}function Vi(g){return r.daysContainer!==void 0?g.className.indexOf("hidden")===-1&&r.daysContainer.contains(g):!1}function mv(g){var E=g.target===r._input,w=r.config.allowInput,I=r.isOpen&&(!w||!E),R=r.config.inline&&E&&!w;if(g.keyCode===13&&E){if(w)return r.setDate(r._input.value,!0,g.target===r.altInput?r.config.altFormat:r.config.dateFormat),g.target.blur();r.open()}else if(Vn(g.target)||I||R){var P=!!r.timeContainer&&r.timeContainer.contains(g.target);switch(g.keyCode){case 13:P?(g.preventDefault(),ee(),ko()):Il(g);break;case 27:g.preventDefault(),ko();break;case 8:case 46:E&&!r.config.allowInput&&(g.preventDefault(),r.clear());break;case 37:case 39:if(!P&&!E){if(g.preventDefault(),r.daysContainer!==void 0&&(w===!1||document.activeElement&&Vi(document.activeElement))){var q=g.keyCode===39?1:-1;g.ctrlKey?(g.stopPropagation(),Do(q),At(ut(1),0)):At(void 0,q)}}else r.hourElement&&r.hourElement.focus();break;case 38:case 40:g.preventDefault();var z=g.keyCode===40?1:-1;r.daysContainer&&g.target.$i!==void 0||g.target===r.input||g.target===r.altInput?g.ctrlKey?(g.stopPropagation(),Wi(r.currentYear-z),At(ut(1),0)):P||At(void 0,z*7):g.target===r.currentYearElement?Wi(r.currentYear-z):r.config.enableTime&&(!P&&r.hourElement&&r.hourElement.focus(),ee(g),r._debouncedChange());break;case 9:if(P){var W=[r.hourElement,r.minuteElement,r.secondElement,r.amPM].concat(r.pluginElements).filter(function(_e){return _e}),U=W.indexOf(g.target);if(U!==-1){var K=W[U+(g.shiftKey?-1:1)];g.preventDefault(),(K||r._input).focus()}}else!r.config.noCalendar&&r.daysContainer&&r.daysContainer.contains(g.target)&&g.shiftKey&&(g.preventDefault(),r._input.focus());break;default:break}}if(r.amPM!==void 0&&g.target===r.amPM)switch(g.key){case r.l10n.amPM[0].charAt(0):case r.l10n.amPM[0].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[0],J(),dt();break;case r.l10n.amPM[1].charAt(0):case r.l10n.amPM[1].charAt(0).toLowerCase():r.amPM.textContent=r.l10n.amPM[1],J(),dt();break}(E||Vn(g.target))&&Z("onKeyDown",g)}function Io(g){if(!(r.selectedDates.length!==1||g&&(!g.classList.contains("flatpickr-day")||g.classList.contains("flatpickr-disabled")))){for(var E=g?g.dateObj.getTime():r.days.firstElementChild.dateObj.getTime(),w=r.parseDate(r.selectedDates[0],void 0,!0).getTime(),I=Math.min(E,r.selectedDates[0].getTime()),R=Math.max(E,r.selectedDates[0].getTime()),P=!1,q=0,z=0,W=I;WI&&Wq)?q=W:W>w&&(!z||W0&&pt0&&pt>z;if(Gi)return ht.classList.add("notAllowed"),["inRange","startRange","endRange"].forEach(function(Kn){ht.classList.remove(Kn)}),"continue";if(P&&!Gi)return"continue";["startRange","inRange","endRange","notAllowed"].forEach(function(Kn){ht.classList.remove(Kn)}),g!==void 0&&(g.classList.add(E<=r.selectedDates[0].getTime()?"startRange":"endRange"),wE&&pt===w&&ht.classList.add("endRange"),pt>=q&&(z===0||pt<=z)&&T(pt,w,E)&&ht.classList.add("inRange"))},ft=0,Un=K.children.length;ft0||w.getMinutes()>0||w.getSeconds()>0),r.selectedDates&&(r.selectedDates=r.selectedDates.filter(function(R){return Bt(R)}),!r.selectedDates.length&&g==="min"&&ke(w),dt()),r.daysContainer&&(Ml(),w!==void 0?r.currentYearElement[g]=w.getFullYear().toString():r.currentYearElement.removeAttribute(g),r.currentYearElement.disabled=!!I&&w!==void 0&&I.getFullYear()===w.getFullYear())}}function bv(){var g=["wrap","weekNumbers","allowInput","clickOpens","time_24hr","enableTime","noCalendar","altInput","shorthandCurrentMonth","inline","static","enableSeconds","disableMobile"],E=t({},x,JSON.parse(JSON.stringify(_.dataset||{}))),w={};r.config.parseDate=E.parseDate,r.config.formatDate=E.formatDate,Object.defineProperty(r.config,"enable",{get:function(){return r.config._enable},set:function(K){r.config._enable=Nl(K)}}),Object.defineProperty(r.config,"disable",{get:function(){return r.config._disable},set:function(K){r.config._disable=Nl(K)}});var I=E.mode==="time";if(!E.dateFormat&&(E.enableTime||I)){var R=$.defaultConfig.dateFormat||n.dateFormat;w.dateFormat=E.noCalendar||I?"H:i"+(E.enableSeconds?":S":""):R+" H:i"+(E.enableSeconds?":S":"")}if(E.altInput&&(E.enableTime||I)&&!E.altFormat){var P=$.defaultConfig.altFormat||n.altFormat;w.altFormat=E.noCalendar||I?"h:i"+(E.enableSeconds?":S K":" K"):P+(" h:i"+(E.enableSeconds?":S":"")+" K")}E.altInputClass||(r.config.altInputClass=r.input.className+" "+r.config.altInputClass),Object.defineProperty(r.config,"minDate",{get:function(){return r.config._minDate},set:Ll("min")}),Object.defineProperty(r.config,"maxDate",{get:function(){return r.config._maxDate},set:Ll("max")});var q=function(K){return function(_e){r.config[K==="min"?"_minTime":"_maxTime"]=r.parseDate(_e,"H:i:S")}};Object.defineProperty(r.config,"minTime",{get:function(){return r.config._minTime},set:q("min")}),Object.defineProperty(r.config,"maxTime",{get:function(){return r.config._maxTime},set:q("max")}),E.mode==="time"&&(r.config.noCalendar=!0,r.config.enableTime=!0),Object.assign(r.config,w,E);for(var z=0;z-1?r.config[U]=c(W[U]).map(F).concat(r.config[U]):typeof E[U]=="undefined"&&(r.config[U]=W[U])}Z("onParseConfig")}function Dl(){typeof r.config.locale!="object"&&typeof $.l10ns[r.config.locale]=="undefined"&&r.config.errorHandler(new Error("flatpickr: invalid locale "+r.config.locale)),r.l10n=t({},$.l10ns.default,typeof r.config.locale=="object"?r.config.locale:r.config.locale!=="default"?$.l10ns[r.config.locale]:void 0),b.K="("+r.l10n.amPM[0]+"|"+r.l10n.amPM[1]+"|"+r.l10n.amPM[0].toLowerCase()+"|"+r.l10n.amPM[1].toLowerCase()+")";var g=t({},x,JSON.parse(JSON.stringify(_.dataset||{})));g.time_24hr===void 0&&$.defaultConfig.time_24hr===void 0&&(r.config.time_24hr=r.l10n.time_24hr),r.formatDate=A(r),r.parseDate=O({config:r.config,l10n:r.l10n})}function Yn(g){if(r.calendarContainer!==void 0){Z("onPreCalendarPosition");var E=g||r._positionElement,w=Array.prototype.reduce.call(r.calendarContainer.children,function(Lv,Dv){return Lv+Dv.offsetHeight},0),I=r.calendarContainer.offsetWidth,R=r.config.position.split(" "),P=R[0],q=R.length>1?R[1]:null,z=E.getBoundingClientRect(),W=window.innerHeight-z.bottom,U=P==="above"||P!=="below"&&Ww,K=window.pageYOffset+z.top+(U?-w-2:E.offsetHeight+2);if(u(r.calendarContainer,"arrowTop",!U),u(r.calendarContainer,"arrowBottom",U),!r.config.inline){var _e=window.pageXOffset+z.left-(q!=null&&q==="center"?(I-z.width)/2:0),ft=window.document.body.offsetWidth-(window.pageXOffset+z.right),Un=_e+I>window.document.body.offsetWidth,Ro=ft+I>window.document.body.offsetWidth;if(u(r.calendarContainer,"rightMost",Un),!r.config.static)if(r.calendarContainer.style.top=K+"px",!Un)r.calendarContainer.style.left=_e+"px",r.calendarContainer.style.right="auto";else if(!Ro)r.calendarContainer.style.left="auto",r.calendarContainer.style.right=ft+"px";else{var Ki=document.styleSheets[0];if(Ki===void 0)return;var ht=window.document.body.offsetWidth,jo=Math.max(0,ht/2-I/2),pt=".flatpickr-calendar.centerMost:before",Gi=".flatpickr-calendar.centerMost:after",Kn=Ki.cssRules.length,Cv="{left:"+z.left+"px;right:auto;}";u(r.calendarContainer,"rightMost",!1),u(r.calendarContainer,"centerMost",!0),Ki.insertRule(pt+","+Gi+Cv,Kn),r.calendarContainer.style.left=jo+"px",r.calendarContainer.style.right="auto"}}}}function Ml(){r.config.noCalendar||r.isMobile||(Ui(),zi())}function ko(){r._input.focus(),window.navigator.userAgent.indexOf("MSIE")!==-1||navigator.msMaxTouchPoints!==void 0?setTimeout(r.close,0):r.close()}function Il(g){g.preventDefault(),g.stopPropagation();var E=function(K){return K.classList&&K.classList.contains("flatpickr-day")&&!K.classList.contains("flatpickr-disabled")&&!K.classList.contains("notAllowed")},w=m(g.target,E);if(w!==void 0){var I=w,R=r.latestSelectedDateObj=new Date(I.dateObj.getTime()),P=(R.getMonth()r.currentMonth+r.config.showMonths-1)&&r.config.mode!=="range";if(r.selectedDateElem=I,r.config.mode==="single")r.selectedDates=[R];else if(r.config.mode==="multiple"){var q=Po(R);q?r.selectedDates.splice(parseInt(q),1):r.selectedDates.push(R)}else r.config.mode==="range"&&(r.selectedDates.length===2&&r.clear(!1,!1),r.latestSelectedDateObj=R,r.selectedDates.push(R),k(R,r.selectedDates[0],!0)!==0&&r.selectedDates.sort(function(K,_e){return K.getTime()-_e.getTime()}));if(J(),P){var z=r.currentYear!==R.getFullYear();r.currentYear=R.getFullYear(),r.currentMonth=R.getMonth(),z&&(Z("onYearChange"),Wn()),Z("onMonthChange")}if(Ui(),zi(),dt(),r.config.enableTime&&setTimeout(function(){return r.showTimeInput=!0},50),!P&&r.config.mode!=="range"&&r.config.showMonths===1?Xe(I):r.selectedDateElem!==void 0&&r.hourElement===void 0&&r.selectedDateElem&&r.selectedDateElem.focus(),r.hourElement!==void 0&&r.hourElement!==void 0&&r.hourElement.focus(),r.config.closeOnSelect){var W=r.config.mode==="single"&&!r.config.enableTime,U=r.config.mode==="range"&&r.selectedDates.length===2&&!r.config.enableTime;(W||U)&&ko()}ct()}}var Yi={locale:[Dl,Al],showMonths:[xl,re,Ol],minDate:[Ne],maxDate:[Ne]};function yv(g,E){if(g!==null&&typeof g=="object"){Object.assign(r.config,g);for(var w in g)Yi[w]!==void 0&&Yi[w].forEach(function(I){return I()})}else r.config[g]=E,Yi[g]!==void 0?Yi[g].forEach(function(I){return I()}):e.indexOf(g)>-1&&(r.config[g]=c(E));r.redraw(),dt(!1)}function kl(g,E){var w=[];if(g instanceof Array)w=g.map(function(I){return r.parseDate(I,E)});else if(g instanceof Date||typeof g=="number")w=[r.parseDate(g,E)];else if(typeof g=="string")switch(r.config.mode){case"single":case"time":w=[r.parseDate(g,E)];break;case"multiple":w=g.split(r.config.conjunction).map(function(I){return r.parseDate(I,E)});break;case"range":w=g.split(r.l10n.rangeSeparator).map(function(I){return r.parseDate(I,E)});break;default:break}else r.config.errorHandler(new Error("Invalid date supplied: "+JSON.stringify(g)));r.selectedDates=w.filter(function(I){return I instanceof Date&&Bt(I,!1)}),r.config.mode==="range"&&r.selectedDates.sort(function(I,R){return I.getTime()-R.getTime()})}function Ev(g,E,w){if(E===void 0&&(E=!1),w===void 0&&(w=r.config.dateFormat),g!==0&&!g||g instanceof Array&&g.length===0)return r.clear(E);kl(g,w),r.showTimeInput=r.selectedDates.length>0,r.latestSelectedDateObj=r.selectedDates[r.selectedDates.length-1],r.redraw(),Ne(),ke(),r.selectedDates.length===0&&r.clear(!1),dt(E),E&&Z("onChange")}function Nl(g){return g.slice().map(function(E){return typeof E=="string"||typeof E=="number"||E instanceof Date?r.parseDate(E,void 0,!0):E&&typeof E=="object"&&E.from&&E.to?{from:r.parseDate(E.from,void 0),to:r.parseDate(E.to,void 0)}:E}).filter(function(E){return E})}function _v(){r.selectedDates=[],r.now=r.parseDate(r.config.now)||new Date;var g=r.config.defaultDate||((r.input.nodeName==="INPUT"||r.input.nodeName==="TEXTAREA")&&r.input.placeholder&&r.input.value===r.input.placeholder?null:r.input.value);g&&kl(g,r.config.dateFormat),r._initialDate=r.selectedDates.length>0?r.selectedDates[0]:r.config.minDate&&r.config.minDate.getTime()>r.now.getTime()?r.config.minDate:r.config.maxDate&&r.config.maxDate.getTime()0&&(r.latestSelectedDateObj=r.selectedDates[0]),r.config.minTime!==void 0&&(r.config.minTime=r.parseDate(r.config.minTime,"H:i")),r.config.maxTime!==void 0&&(r.config.maxTime=r.parseDate(r.config.maxTime,"H:i")),r.minDateHasTime=!!r.config.minDate&&(r.config.minDate.getHours()>0||r.config.minDate.getMinutes()>0||r.config.minDate.getSeconds()>0),r.maxDateHasTime=!!r.config.maxDate&&(r.config.maxDate.getHours()>0||r.config.maxDate.getMinutes()>0||r.config.maxDate.getSeconds()>0),Object.defineProperty(r,"showTimeInput",{get:function(){return r._showTimeInput},set:function(E){r._showTimeInput=E,r.calendarContainer&&u(r.calendarContainer,"showTimeInput",E),r.isOpen&&Yn()}})}function Sv(){if(r.input=r.config.wrap?_.querySelector("[data-input]"):_,!r.input){r.config.errorHandler(new Error("Invalid input element specified"));return}r.input._type=r.input.type,r.input.type="text",r.input.classList.add("flatpickr-input"),r._input=r.input,r.config.altInput&&(r.altInput=d(r.input.nodeName,r.config.altInputClass),r._input=r.altInput,r.altInput.placeholder=r.input.placeholder,r.altInput.disabled=r.input.disabled,r.altInput.required=r.input.required,r.altInput.tabIndex=r.input.tabIndex,r.altInput.type="text",r.input.setAttribute("type","hidden"),!r.config.static&&r.input.parentNode&&r.input.parentNode.insertBefore(r.altInput,r.input.nextSibling)),r.config.allowInput||r._input.setAttribute("readonly","readonly"),r._positionElement=r.config.positionElement||r._input}function wv(){var g=r.config.enableTime?r.config.noCalendar?"time":"datetime-local":"date";r.mobileInput=d("input",r.input.className+" flatpickr-mobile"),r.mobileInput.step=r.input.getAttribute("step")||"any",r.mobileInput.tabIndex=1,r.mobileInput.type=g,r.mobileInput.disabled=r.input.disabled,r.mobileInput.required=r.input.required,r.mobileInput.placeholder=r.input.placeholder,r.mobileFormatStr=g==="datetime-local"?"Y-m-d\\TH:i:S":g==="date"?"Y-m-d":"H:i:S",r.selectedDates.length>0&&(r.mobileInput.defaultValue=r.mobileInput.value=r.formatDate(r.selectedDates[0],r.mobileFormatStr)),r.config.minDate&&(r.mobileInput.min=r.formatDate(r.config.minDate,"Y-m-d")),r.config.maxDate&&(r.mobileInput.max=r.formatDate(r.config.maxDate,"Y-m-d")),r.input.type="hidden",r.altInput!==void 0&&(r.altInput.type="hidden");try{r.input.parentNode&&r.input.parentNode.insertBefore(r.mobileInput,r.input.nextSibling)}catch(E){}Q(r.mobileInput,"change",function(E){r.setDate(E.target.value,!1,r.mobileFormatStr),Z("onChange"),Z("onClose")})}function Tv(g){if(r.isOpen===!0)return r.close();r.open(g)}function Z(g,E){if(r.config!==void 0){var w=r.config[g];if(w!==void 0&&w.length>0)for(var I=0;w[I]&&I=0&&k(g,r.selectedDates[1])<=0}function Ui(){r.config.noCalendar||r.isMobile||!r.monthNav||(r.yearElements.forEach(function(g,E){var w=new Date(r.currentYear,r.currentMonth,1);w.setMonth(r.currentMonth+E),r.config.showMonths>1||r.config.monthSelectorType==="static"?r.monthElements[E].textContent=y(w.getMonth(),r.config.shorthandCurrentMonth,r.l10n)+" ":r.monthsDropdownContainer.value=w.getMonth().toString(),g.value=w.getFullYear().toString()}),r._hidePrevMonthArrow=r.config.minDate!==void 0&&(r.currentYear===r.config.minDate.getFullYear()?r.currentMonth<=r.config.minDate.getMonth():r.currentYearr.config.maxDate.getMonth():r.currentYear>r.config.maxDate.getFullYear()))}function Pl(g){return r.selectedDates.map(function(E){return r.formatDate(E,g)}).filter(function(E,w,I){return r.config.mode!=="range"||r.config.enableTime||I.indexOf(E)===w}).join(r.config.mode!=="range"?r.config.conjunction:r.l10n.rangeSeparator)}function dt(g){g===void 0&&(g=!0),r.mobileInput!==void 0&&r.mobileFormatStr&&(r.mobileInput.value=r.latestSelectedDateObj!==void 0?r.formatDate(r.latestSelectedDateObj,r.mobileFormatStr):""),r.input.value=Pl(r.config.dateFormat),r.altInput!==void 0&&(r.altInput.value=Pl(r.config.altFormat)),g!==!1&&Z("onValueUpdate")}function Ov(g){var E=r.prevMonthNav.contains(g.target),w=r.nextMonthNav.contains(g.target);E||w?Do(E?-1:1):r.yearElements.indexOf(g.target)>=0?g.target.select():g.target.classList.contains("arrowUp")?r.changeYear(r.currentYear+1):g.target.classList.contains("arrowDown")&&r.changeYear(r.currentYear-1)}function Av(g){g.preventDefault();var E=g.type==="keydown",w=g.target;r.amPM!==void 0&&g.target===r.amPM&&(r.amPM.textContent=r.l10n.amPM[s(r.amPM.textContent===r.l10n.amPM[0])]);var I=parseFloat(w.getAttribute("min")),R=parseFloat(w.getAttribute("max")),P=parseFloat(w.getAttribute("step")),q=parseInt(w.value,10),z=g.delta||(E?g.which===38?1:-1:0),W=q+P*z;if(typeof w.value!="undefined"&&w.value.length===2){var U=w===r.hourElement,K=w===r.minuteElement;WR&&(W=w===r.hourElement?W-R-s(!r.amPM):I,K&&xt(void 0,1,r.hourElement)),r.amPM&&U&&(P===1?W+q===23:Math.abs(W-q)>P)&&(r.amPM.textContent=r.l10n.amPM[s(r.amPM.textContent===r.l10n.amPM[0])]),w.value=o(W)}}return X(),r}function H(_,x){for(var r=Array.prototype.slice.call(_).filter(function(re){return re instanceof HTMLElement}),Y=[],X=0;XWl,afterRead:()=>Bl,afterWrite:()=>Ul,applyStyles:()=>Sn,arrow:()=>Zi,auto:()=>Xn,basePlacements:()=>mt,beforeMain:()=>Fl,beforeRead:()=>ql,beforeWrite:()=>Vl,bottom:()=>le,clippingParents:()=>qo,computeStyles:()=>wn,createPopper:()=>ar,createPopperBase:()=>tc,createPopperLite:()=>nc,detectOverflow:()=>we,end:()=>Qn,eventListeners:()=>Tn,flip:()=>ir,hide:()=>rr,left:()=>se,main:()=>zl,modifierPhases:()=>Bo,offset:()=>or,placements:()=>Zn,popper:()=>Ft,popperGenerator:()=>Gt,popperOffsets:()=>An,preventOverflow:()=>sr,read:()=>$l,reference:()=>$o,right:()=>oe,start:()=>Qe,top:()=>ne,variationPlacements:()=>Qi,viewport:()=>Jn,write:()=>Yl});var ne="top",le="bottom",oe="right",se="left",Xn="auto",mt=[ne,le,oe,se],Qe="start",Qn="end",qo="clippingParents",Jn="viewport",Ft="popper",$o="reference",Qi=mt.reduce(function(t,e){return t.concat([e+"-"+Qe,e+"-"+Qn])},[]),Zn=[].concat(mt,[Xn]).reduce(function(t,e){return t.concat([e,e+"-"+Qe,e+"-"+Qn])},[]),ql="beforeRead",$l="read",Bl="afterRead",Fl="beforeMain",zl="main",Wl="afterMain",Vl="beforeWrite",Yl="write",Ul="afterWrite",Bo=[ql,$l,Bl,Fl,zl,Wl,Vl,Yl,Ul];function fe(t){return t?(t.nodeName||"").toLowerCase():null}function ie(t){if(t==null)return window;if(t.toString()!=="[object Window]"){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function gt(t){var e=ie(t).Element;return t instanceof e||t instanceof Element}function ve(t){var e=ie(t).HTMLElement;return t instanceof e||t instanceof HTMLElement}function Ji(t){if(typeof ShadowRoot=="undefined")return!1;var e=ie(t).ShadowRoot;return t instanceof e||t instanceof ShadowRoot}function $v(t){var e=t.state;Object.keys(e.elements).forEach(function(n){var i=e.styles[n]||{},o=e.attributes[n]||{},s=e.elements[n];!ve(s)||!fe(s)||(Object.assign(s.style,i),Object.keys(o).forEach(function(a){var c=o[a];c===!1?s.removeAttribute(a):s.setAttribute(a,c===!0?"":c)}))})}function Bv(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(i){var o=e.elements[i],s=e.attributes[i]||{},a=Object.keys(e.styles.hasOwnProperty(i)?e.styles[i]:n[i]),c=a.reduce(function(u,d){return u[d]="",u},{});!ve(o)||!fe(o)||(Object.assign(o.style,c),Object.keys(s).forEach(function(u){o.removeAttribute(u)}))})}}var Sn={name:"applyStyles",enabled:!0,phase:"write",fn:$v,effect:Bv,requires:["computeStyles"]};function he(t){return t.split("-")[0]}function qe(t){var e=t.getBoundingClientRect();return{width:e.width,height:e.height,top:e.top,right:e.right,bottom:e.bottom,left:e.left,x:e.left,y:e.top}}function zt(t){var e=qe(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function ei(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Ji(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Se(t){return ie(t).getComputedStyle(t)}function Fo(t){return["table","td","th"].indexOf(fe(t))>=0}function be(t){return((gt(t)?t.ownerDocument:t.document)||window.document).documentElement}function vt(t){return fe(t)==="html"?t:t.assignedSlot||t.parentNode||(Ji(t)?t.host:null)||be(t)}function Kl(t){return!ve(t)||Se(t).position==="fixed"?null:t.offsetParent}function Fv(t){var e=navigator.userAgent.toLowerCase().indexOf("firefox")!==-1,n=navigator.userAgent.indexOf("Trident")!==-1;if(n&&ve(t)){var i=Se(t);if(i.position==="fixed")return null}for(var o=vt(t);ve(o)&&["html","body"].indexOf(fe(o))<0;){var s=Se(o);if(s.transform!=="none"||s.perspective!=="none"||s.contain==="paint"||["transform","perspective"].indexOf(s.willChange)!==-1||e&&s.willChange==="filter"||e&&s.filter&&s.filter!=="none")return o;o=o.parentNode}return null}function Ue(t){for(var e=ie(t),n=Kl(t);n&&Fo(n)&&Se(n).position==="static";)n=Kl(n);return n&&(fe(n)==="html"||fe(n)==="body"&&Se(n).position==="static")?e:n||Fv(t)||e}function Wt(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}var $e=Math.max,Ct=Math.min,ti=Math.round;function Vt(t,e,n){return $e(t,Ct(e,n))}function ni(){return{top:0,right:0,bottom:0,left:0}}function ii(t){return Object.assign({},ni(),t)}function ri(t,e){return e.reduce(function(n,i){return n[i]=t,n},{})}var zv=function(e,n){return e=typeof e=="function"?e(Object.assign({},n.rects,{placement:n.placement})):e,ii(typeof e!="number"?e:ri(e,mt))};function Wv(t){var e,n=t.state,i=t.name,o=t.options,s=n.elements.arrow,a=n.modifiersData.popperOffsets,c=he(n.placement),u=Wt(c),d=[se,oe].indexOf(c)>=0,l=d?"height":"width";if(!(!s||!a)){var m=zv(o.padding,n),f=zt(s),p=u==="y"?ne:se,v=u==="y"?le:oe,y=n.rects.reference[l]+n.rects.reference[u]-a[u]-n.rects.popper[l],h=a[u]-n.rects.reference[u],b=Ue(s),S=b?u==="y"?b.clientHeight||0:b.clientWidth||0:0,A=y/2-h/2,O=m[p],k=S-f[l]-m[v],T=S/2-f[l]/2+A,L=Vt(O,T,k),D=u;n.modifiersData[i]=(e={},e[D]=L,e.centerOffset=L-T,e)}}function Vv(t){var e=t.state,n=t.options,i=n.element,o=i===void 0?"[data-popper-arrow]":i;o!=null&&(typeof o=="string"&&(o=e.elements.popper.querySelector(o),!o)||!ei(e.elements.popper,o)||(e.elements.arrow=o))}var Zi={name:"arrow",enabled:!0,phase:"main",fn:Wv,effect:Vv,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};var Yv={top:"auto",right:"auto",bottom:"auto",left:"auto"};function Uv(t){var e=t.x,n=t.y,i=window,o=i.devicePixelRatio||1;return{x:ti(ti(e*o)/o)||0,y:ti(ti(n*o)/o)||0}}function Gl(t){var e,n=t.popper,i=t.popperRect,o=t.placement,s=t.offsets,a=t.position,c=t.gpuAcceleration,u=t.adaptive,d=t.roundOffsets,l=d===!0?Uv(s):typeof d=="function"?d(s):s,m=l.x,f=m===void 0?0:m,p=l.y,v=p===void 0?0:p,y=s.hasOwnProperty("x"),h=s.hasOwnProperty("y"),b=se,S=ne,A=window;if(u){var O=Ue(n),k="clientHeight",T="clientWidth";O===ie(n)&&(O=be(n),Se(O).position!=="static"&&(k="scrollHeight",T="scrollWidth")),O=O,o===ne&&(S=le,v-=O[k]-i.height,v*=c?1:-1),o===se&&(b=oe,f-=O[T]-i.width,f*=c?1:-1)}var L=Object.assign({position:a},u&&Yv);if(c){var D;return Object.assign({},L,(D={},D[S]=h?"0":"",D[b]=y?"0":"",D.transform=(A.devicePixelRatio||1)<2?"translate("+f+"px, "+v+"px)":"translate3d("+f+"px, "+v+"px, 0)",D))}return Object.assign({},L,(e={},e[S]=h?v+"px":"",e[b]=y?f+"px":"",e.transform="",e))}function Kv(t){var e=t.state,n=t.options,i=n.gpuAcceleration,o=i===void 0?!0:i,s=n.adaptive,a=s===void 0?!0:s,c=n.roundOffsets,u=c===void 0?!0:c;if(!1)var d;var l={placement:he(e.placement),popper:e.elements.popper,popperRect:e.rects.popper,gpuAcceleration:o};e.modifiersData.popperOffsets!=null&&(e.styles.popper=Object.assign({},e.styles.popper,Gl(Object.assign({},l,{offsets:e.modifiersData.popperOffsets,position:e.options.strategy,adaptive:a,roundOffsets:u})))),e.modifiersData.arrow!=null&&(e.styles.arrow=Object.assign({},e.styles.arrow,Gl(Object.assign({},l,{offsets:e.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-placement":e.placement})}var wn={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:Kv,data:{}};var er={passive:!0};function Gv(t){var e=t.state,n=t.instance,i=t.options,o=i.scroll,s=o===void 0?!0:o,a=i.resize,c=a===void 0?!0:a,u=ie(e.elements.popper),d=[].concat(e.scrollParents.reference,e.scrollParents.popper);return s&&d.forEach(function(l){l.addEventListener("scroll",n.update,er)}),c&&u.addEventListener("resize",n.update,er),function(){s&&d.forEach(function(l){l.removeEventListener("scroll",n.update,er)}),c&&u.removeEventListener("resize",n.update,er)}}var Tn={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:Gv,data:{}};var Xv={left:"right",right:"left",bottom:"top",top:"bottom"};function xn(t){return t.replace(/left|right|bottom|top/g,function(e){return Xv[e]})}var Qv={start:"end",end:"start"};function tr(t){return t.replace(/start|end/g,function(e){return Qv[e]})}function Yt(t){var e=ie(t),n=e.pageXOffset,i=e.pageYOffset;return{scrollLeft:n,scrollTop:i}}function Ut(t){return qe(be(t)).left+Yt(t).scrollLeft}function zo(t){var e=ie(t),n=be(t),i=e.visualViewport,o=n.clientWidth,s=n.clientHeight,a=0,c=0;return i&&(o=i.width,s=i.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(a=i.offsetLeft,c=i.offsetTop)),{width:o,height:s,x:a+Ut(t),y:c}}function Wo(t){var e,n=be(t),i=Yt(t),o=(e=t.ownerDocument)==null?void 0:e.body,s=$e(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),a=$e(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),c=-i.scrollLeft+Ut(t),u=-i.scrollTop;return Se(o||n).direction==="rtl"&&(c+=$e(n.clientWidth,o?o.clientWidth:0)-s),{width:s,height:a,x:c,y:u}}function Kt(t){var e=Se(t),n=e.overflow,i=e.overflowX,o=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+i)}function nr(t){return["html","body","#document"].indexOf(fe(t))>=0?t.ownerDocument.body:ve(t)&&Kt(t)?t:nr(vt(t))}function Lt(t,e){var n;e===void 0&&(e=[]);var i=nr(t),o=i===((n=t.ownerDocument)==null?void 0:n.body),s=ie(i),a=o?[s].concat(s.visualViewport||[],Kt(i)?i:[]):i,c=e.concat(a);return o?c:c.concat(Lt(vt(a)))}function On(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function Jv(t){var e=qe(t);return e.top=e.top+t.clientTop,e.left=e.left+t.clientLeft,e.bottom=e.top+t.clientHeight,e.right=e.left+t.clientWidth,e.width=t.clientWidth,e.height=t.clientHeight,e.x=e.left,e.y=e.top,e}function Xl(t,e){return e===Jn?On(zo(t)):ve(e)?Jv(e):On(Wo(be(t)))}function Zv(t){var e=Lt(vt(t)),n=["absolute","fixed"].indexOf(Se(t).position)>=0,i=n&&ve(t)?Ue(t):t;return gt(i)?e.filter(function(o){return gt(o)&&ei(o,i)&&fe(o)!=="body"}):[]}function Vo(t,e,n){var i=e==="clippingParents"?Zv(t):[].concat(e),o=[].concat(i,[n]),s=o[0],a=o.reduce(function(c,u){var d=Xl(t,u);return c.top=$e(d.top,c.top),c.right=Ct(d.right,c.right),c.bottom=Ct(d.bottom,c.bottom),c.left=$e(d.left,c.left),c},Xl(t,s));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Je(t){return t.split("-")[1]}function oi(t){var e=t.reference,n=t.element,i=t.placement,o=i?he(i):null,s=i?Je(i):null,a=e.x+e.width/2-n.width/2,c=e.y+e.height/2-n.height/2,u;switch(o){case ne:u={x:a,y:e.y-n.height};break;case le:u={x:a,y:e.y+e.height};break;case oe:u={x:e.x+e.width,y:c};break;case se:u={x:e.x-n.width,y:c};break;default:u={x:e.x,y:e.y}}var d=o?Wt(o):null;if(d!=null){var l=d==="y"?"height":"width";switch(s){case Qe:u[d]=u[d]-(e[l]/2-n[l]/2);break;case Qn:u[d]=u[d]+(e[l]/2-n[l]/2);break;default:}}return u}function we(t,e){e===void 0&&(e={});var n=e,i=n.placement,o=i===void 0?t.placement:i,s=n.boundary,a=s===void 0?qo:s,c=n.rootBoundary,u=c===void 0?Jn:c,d=n.elementContext,l=d===void 0?Ft:d,m=n.altBoundary,f=m===void 0?!1:m,p=n.padding,v=p===void 0?0:p,y=ii(typeof v!="number"?v:ri(v,mt)),h=l===Ft?$o:Ft,b=t.elements.reference,S=t.rects.popper,A=t.elements[f?h:l],O=Vo(gt(A)?A:A.contextElement||be(t.elements.popper),a,u),k=qe(b),T=oi({reference:k,element:S,strategy:"absolute",placement:o}),L=On(Object.assign({},S,T)),D=l===Ft?L:k,N={top:O.top-D.top+y.top,bottom:D.bottom-O.bottom+y.bottom,left:O.left-D.left+y.left,right:D.right-O.right+y.right},H=t.modifiersData.offset;if(l===Ft&&H){var $=H[o];Object.keys(N).forEach(function(_){var x=[oe,le].indexOf(_)>=0?1:-1,r=[ne,le].indexOf(_)>=0?"y":"x";N[_]+=$[r]*x})}return N}function Yo(t,e){e===void 0&&(e={});var n=e,i=n.placement,o=n.boundary,s=n.rootBoundary,a=n.padding,c=n.flipVariations,u=n.allowedAutoPlacements,d=u===void 0?Zn:u,l=Je(i),m=l?c?Qi:Qi.filter(function(v){return Je(v)===l}):mt,f=m.filter(function(v){return d.indexOf(v)>=0});f.length===0&&(f=m);var p=f.reduce(function(v,y){return v[y]=we(t,{placement:y,boundary:o,rootBoundary:s,padding:a})[he(y)],v},{});return Object.keys(p).sort(function(v,y){return p[v]-p[y]})}function eb(t){if(he(t)===Xn)return[];var e=xn(t);return[tr(t),e,tr(e)]}function tb(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var o=n.mainAxis,s=o===void 0?!0:o,a=n.altAxis,c=a===void 0?!0:a,u=n.fallbackPlacements,d=n.padding,l=n.boundary,m=n.rootBoundary,f=n.altBoundary,p=n.flipVariations,v=p===void 0?!0:p,y=n.allowedAutoPlacements,h=e.options.placement,b=he(h),S=b===h,A=u||(S||!v?[xn(h)]:eb(h)),O=[h].concat(A).reduce(function(Ee,ue){return Ee.concat(he(ue)===Xn?Yo(e,{placement:ue,boundary:l,rootBoundary:m,padding:d,flipVariations:v,allowedAutoPlacements:y}):ue)},[]),k=e.rects.reference,T=e.rects.popper,L=new Map,D=!0,N=O[0],H=0;H=0,Y=r?"width":"height",X=we(e,{placement:$,boundary:l,rootBoundary:m,altBoundary:f,padding:d}),F=r?x?oe:se:x?le:ne;k[Y]>T[Y]&&(F=xn(F));var re=xn(F),ee=[];if(s&&ee.push(X[_]<=0),c&&ee.push(X[F]<=0,X[re]<=0),ee.every(function(Ee){return Ee})){N=$,D=!1;break}L.set($,ee)}if(D)for(var Oe=v?3:1,He=function(ue){var lt=O.find(function(Q){var de=L.get(Q);if(de)return de.slice(0,ue).every(function(ct){return ct})});if(lt)return N=lt,"break"},J=Oe;J>0;J--){var ke=He(J);if(ke==="break")break}e.placement!==N&&(e.modifiersData[i]._skip=!0,e.placement=N,e.reset=!0)}}var ir={name:"flip",enabled:!0,phase:"main",fn:tb,requiresIfExists:["offset"],data:{_skip:!1}};function Ql(t,e,n){return n===void 0&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Jl(t){return[ne,oe,le,se].some(function(e){return t[e]>=0})}function nb(t){var e=t.state,n=t.name,i=e.rects.reference,o=e.rects.popper,s=e.modifiersData.preventOverflow,a=we(e,{elementContext:"reference"}),c=we(e,{altBoundary:!0}),u=Ql(a,i),d=Ql(c,o,s),l=Jl(u),m=Jl(d);e.modifiersData[n]={referenceClippingOffsets:u,popperEscapeOffsets:d,isReferenceHidden:l,hasPopperEscaped:m},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":l,"data-popper-escaped":m})}var rr={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:nb};function ib(t,e,n){var i=he(t),o=[se,ne].indexOf(i)>=0?-1:1,s=typeof n=="function"?n(Object.assign({},e,{placement:t})):n,a=s[0],c=s[1];return a=a||0,c=(c||0)*o,[se,oe].indexOf(i)>=0?{x:c,y:a}:{x:a,y:c}}function rb(t){var e=t.state,n=t.options,i=t.name,o=n.offset,s=o===void 0?[0,0]:o,a=Zn.reduce(function(l,m){return l[m]=ib(m,e.rects,s),l},{}),c=a[e.placement],u=c.x,d=c.y;e.modifiersData.popperOffsets!=null&&(e.modifiersData.popperOffsets.x+=u,e.modifiersData.popperOffsets.y+=d),e.modifiersData[i]=a}var or={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:rb};function ob(t){var e=t.state,n=t.name;e.modifiersData[n]=oi({reference:e.rects.reference,element:e.rects.popper,strategy:"absolute",placement:e.placement})}var An={name:"popperOffsets",enabled:!0,phase:"read",fn:ob,data:{}};function Uo(t){return t==="x"?"y":"x"}function sb(t){var e=t.state,n=t.options,i=t.name,o=n.mainAxis,s=o===void 0?!0:o,a=n.altAxis,c=a===void 0?!1:a,u=n.boundary,d=n.rootBoundary,l=n.altBoundary,m=n.padding,f=n.tether,p=f===void 0?!0:f,v=n.tetherOffset,y=v===void 0?0:v,h=we(e,{boundary:u,rootBoundary:d,padding:m,altBoundary:l}),b=he(e.placement),S=Je(e.placement),A=!S,O=Wt(b),k=Uo(O),T=e.modifiersData.popperOffsets,L=e.rects.reference,D=e.rects.popper,N=typeof y=="function"?y(Object.assign({},e.rects,{placement:e.placement})):y,H={x:0,y:0};if(!!T){if(s||c){var $=O==="y"?ne:se,_=O==="y"?le:oe,x=O==="y"?"height":"width",r=T[O],Y=T[O]+h[$],X=T[O]-h[_],F=p?-D[x]/2:0,re=S===Qe?L[x]:D[x],ee=S===Qe?-D[x]:-L[x],Oe=e.elements.arrow,He=p&&Oe?zt(Oe):{width:0,height:0},J=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:ni(),ke=J[$],Ee=J[_],ue=Vt(0,L[x],He[x]),lt=A?L[x]/2-F-ue-ke-N:re-ue-ke-N,Q=A?-L[x]/2+F+ue+Ee+N:ee+ue+Ee+N,de=e.elements.arrow&&Ue(e.elements.arrow),ct=de?O==="y"?de.clientTop||0:de.clientLeft||0:0,Tt=e.modifiersData.offset?e.modifiersData.offset[e.placement][O]:0,Ne=T[O]+lt-Tt-ct,$t=T[O]+Q-Tt;if(s){var xt=Vt(p?Ct(Y,Ne):Y,r,p?$e(X,$t):X);T[O]=xt,H[O]=xt-r}if(c){var _n=O==="x"?ne:se,Ot=O==="x"?le:oe,Xe=T[k],ut=Xe+h[_n],Fi=Xe-h[Ot],At=Vt(p?Ct(ut,Ne):ut,Xe,p?$e(Fi,$t):Fi);T[k]=At,H[k]=At-Xe}}e.modifiersData[i]=H}}var sr={name:"preventOverflow",enabled:!0,phase:"main",fn:sb,requiresIfExists:["offset"]};function Ko(t){return{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}}function Go(t){return t===ie(t)||!ve(t)?Yt(t):Ko(t)}function Xo(t,e,n){n===void 0&&(n=!1);var i=be(e),o=qe(t),s=ve(e),a={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(s||!s&&!n)&&((fe(e)!=="body"||Kt(i))&&(a=Go(e)),ve(e)?(c=qe(e),c.x+=e.clientLeft,c.y+=e.clientTop):i&&(c.x=Ut(i))),{x:o.left+a.scrollLeft-c.x,y:o.top+a.scrollTop-c.y,width:o.width,height:o.height}}function ab(t){var e=new Map,n=new Set,i=[];t.forEach(function(s){e.set(s.name,s)});function o(s){n.add(s.name);var a=[].concat(s.requires||[],s.requiresIfExists||[]);a.forEach(function(c){if(!n.has(c)){var u=e.get(c);u&&o(u)}}),i.push(s)}return t.forEach(function(s){n.has(s.name)||o(s)}),i}function Qo(t){var e=ab(t);return Bo.reduce(function(n,i){return n.concat(e.filter(function(o){return o.phase===i}))},[])}function Jo(t){var e;return function(){return e||(e=new Promise(function(n){Promise.resolve().then(function(){e=void 0,n(t())})})),e}}function Zo(t){var e=t.reduce(function(n,i){var o=n[i.name];return n[i.name]=o?Object.assign({},o,i,{options:Object.assign({},o.options,i.options),data:Object.assign({},o.data,i.data)}):i,n},{});return Object.keys(e).map(function(n){return e[n]})}var Zl={placement:"bottom",modifiers:[],strategy:"absolute"};function ec(){for(var t=arguments.length,e=new Array(t),n=0;nn.matches(e))},parents(t,e){let n=[],i=t.parentNode;for(;i&&i.nodeType===Node.ELEMENT_NODE&&i.nodeType!==ub;)i.matches(e)&&n.push(i),i=i.parentNode;return n},prev(t,e){let n=t.previousElementSibling;for(;n;){if(n.matches(e))return[n];n=n.previousElementSibling}return[]},next(t,e){let n=t.nextElementSibling;for(;n;){if(n.matches(e))return[n];n=n.nextElementSibling}return[]}},db=1e6,fb=1e3,es="transitionend",hb=t=>t==null?`${t}`:{}.toString.call(t).match(/\s([a-z]+)/i)[1].toLowerCase(),ic=t=>{do t+=Math.floor(Math.random()*db);while(document.getElementById(t));return t},rc=t=>{let e=t.getAttribute("data-bs-target");if(!e||e==="#"){let n=t.getAttribute("href");if(!n||!n.includes("#")&&!n.startsWith("."))return null;n.includes("#")&&!n.startsWith("#")&&(n=`#${n.split("#")[1]}`),e=n&&n!=="#"?n.trim():null}return e},ts=t=>{let e=rc(t);return e&&document.querySelector(e)?e:null},Dt=t=>{let e=rc(t);return e?document.querySelector(e):null},pb=t=>{if(!t)return 0;let{transitionDuration:e,transitionDelay:n}=window.getComputedStyle(t),i=Number.parseFloat(e),o=Number.parseFloat(n);return!i&&!o?0:(e=e.split(",")[0],n=n.split(",")[0],(Number.parseFloat(e)+Number.parseFloat(n))*fb)},oc=t=>{t.dispatchEvent(new Event(es))},Mt=t=>!t||typeof t!="object"?!1:(typeof t.jquery!="undefined"&&(t=t[0]),typeof t.nodeType!="undefined"),Cn=t=>Mt(t)?t.jquery?t[0]:t:typeof t=="string"&&t.length>0?B.findOne(t):null,bt=(t,e,n)=>{Object.keys(n).forEach(i=>{let o=n[i],s=e[i],a=s&&Mt(s)?"element":hb(s);if(!new RegExp(o).test(a))throw new TypeError(`${t.toUpperCase()}: Option "${i}" provided type "${a}" but expected type "${o}".`)})},cr=t=>!Mt(t)||t.getClientRects().length===0?!1:getComputedStyle(t).getPropertyValue("visibility")==="visible",Ln=t=>!t||t.nodeType!==Node.ELEMENT_NODE||t.classList.contains("disabled")?!0:typeof t.disabled!="undefined"?t.disabled:t.hasAttribute("disabled")&&t.getAttribute("disabled")!=="false",sc=t=>{if(!document.documentElement.attachShadow)return null;if(typeof t.getRootNode=="function"){let e=t.getRootNode();return e instanceof ShadowRoot?e:null}return t instanceof ShadowRoot?t:t.parentNode?sc(t.parentNode):null},ur=()=>{},Dn=t=>t.offsetHeight,ac=()=>{let{jQuery:t}=window;return t&&!document.body.hasAttribute("data-bs-no-jquery")?t:null},ns=[],mb=t=>{document.readyState==="loading"?(ns.length||document.addEventListener("DOMContentLoaded",()=>{ns.forEach(e=>e())}),ns.push(t)):t()},Ce=()=>document.documentElement.dir==="rtl",Be=t=>{mb(()=>{let e=ac();if(e){let n=t.NAME,i=e.fn[n];e.fn[n]=t.jQueryInterface,e.fn[n].Constructor=t,e.fn[n].noConflict=()=>(e.fn[n]=i,t.jQueryInterface)}})},Xt=t=>{typeof t=="function"&&t()},lc=(t,e,n=!0)=>{if(!n){Xt(t);return}let i=5,o=pb(e)+i,s=!1,a=({target:c})=>{c===e&&(s=!0,e.removeEventListener(es,a),Xt(t))};e.addEventListener(es,a),setTimeout(()=>{s||oc(e)},o)},cc=(t,e,n,i)=>{let o=t.indexOf(e);if(o===-1)return t[!n&&i?t.length-1:0];let s=t.length;return o+=n?1:-1,i&&(o=(o+s)%s),t[Math.max(0,Math.min(o,s-1))]},gb=/[^.]*(?=\..*)\.|.*/,vb=/\..*/,bb=/::\d+$/,is={},uc=1,yb={mouseenter:"mouseover",mouseleave:"mouseout"},Eb=/^(mouseenter|mouseleave)/i,dc=new Set(["click","dblclick","mouseup","mousedown","contextmenu","mousewheel","DOMMouseScroll","mouseover","mouseout","mousemove","selectstart","selectend","keydown","keypress","keyup","orientationchange","touchstart","touchmove","touchend","touchcancel","pointerdown","pointermove","pointerup","pointerleave","pointercancel","gesturestart","gesturechange","gestureend","focus","blur","change","reset","select","submit","focusin","focusout","load","unload","beforeunload","resize","move","DOMContentLoaded","readystatechange","error","abort","scroll"]);function fc(t,e){return e&&`${e}::${uc++}`||t.uidEvent||uc++}function hc(t){let e=fc(t);return t.uidEvent=e,is[e]=is[e]||{},is[e]}function _b(t,e){return function n(i){return i.delegateTarget=t,n.oneOff&&M.off(t,i.type,e),e.apply(t,[i])}}function Sb(t,e,n){return function i(o){let s=t.querySelectorAll(e);for(let{target:a}=o;a&&a!==this;a=a.parentNode)for(let c=s.length;c--;)if(s[c]===a)return o.delegateTarget=a,i.oneOff&&M.off(t,o.type,e,n),n.apply(a,[o]);return null}}function pc(t,e,n=null){let i=Object.keys(t);for(let o=0,s=i.length;ofunction(y){if(!y.relatedTarget||y.relatedTarget!==y.delegateTarget&&!y.delegateTarget.contains(y.relatedTarget))return v.call(this,y)};i?i=p(i):n=p(n)}let[s,a,c]=mc(e,n,i),u=hc(t),d=u[c]||(u[c]={}),l=pc(d,a,s?n:null);if(l){l.oneOff=l.oneOff&&o;return}let m=fc(a,e.replace(gb,"")),f=s?Sb(t,n,i):_b(t,n);f.delegationSelector=s?n:null,f.originalHandler=a,f.oneOff=o,f.uidEvent=m,d[m]=f,t.addEventListener(c,f,s)}function rs(t,e,n,i,o){let s=pc(e[n],i,o);!s||(t.removeEventListener(n,s,Boolean(o)),delete e[n][s.uidEvent])}function wb(t,e,n,i){let o=e[n]||{};Object.keys(o).forEach(s=>{if(s.includes(i)){let a=o[s];rs(t,e,n,a.originalHandler,a.delegationSelector)}})}function vc(t){return t=t.replace(vb,""),yb[t]||t}var M={on(t,e,n,i){gc(t,e,n,i,!1)},one(t,e,n,i){gc(t,e,n,i,!0)},off(t,e,n,i){if(typeof e!="string"||!t)return;let[o,s,a]=mc(e,n,i),c=a!==e,u=hc(t),d=e.startsWith(".");if(typeof s!="undefined"){if(!u||!u[a])return;rs(t,u,a,s,o?n:null);return}d&&Object.keys(u).forEach(m=>{wb(t,u,m,e.slice(1))});let l=u[a]||{};Object.keys(l).forEach(m=>{let f=m.replace(bb,"");if(!c||e.includes(f)){let p=l[m];rs(t,u,a,p.originalHandler,p.delegationSelector)}})},trigger(t,e,n){if(typeof e!="string"||!t)return null;let i=ac(),o=vc(e),s=e!==o,a=dc.has(o),c,u=!0,d=!0,l=!1,m=null;return s&&i&&(c=i.Event(e,n),i(t).trigger(c),u=!c.isPropagationStopped(),d=!c.isImmediatePropagationStopped(),l=c.isDefaultPrevented()),a?(m=document.createEvent("HTMLEvents"),m.initEvent(o,u,!0)):m=new CustomEvent(e,{bubbles:u,cancelable:!0}),typeof n!="undefined"&&Object.keys(n).forEach(f=>{Object.defineProperty(m,f,{get(){return n[f]}})}),l&&m.preventDefault(),d&&t.dispatchEvent(m),m.defaultPrevented&&typeof c!="undefined"&&c.preventDefault(),m}},It=new Map,Qt={set(t,e,n){It.has(t)||It.set(t,new Map);let i=It.get(t);if(!i.has(e)&&i.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(i.keys())[0]}.`);return}i.set(e,n)},get(t,e){return It.has(t)&&It.get(t).get(e)||null},remove(t,e){if(!It.has(t))return;let n=It.get(t);n.delete(e),n.size===0&&It.delete(t)}},Tb="5.0.2",Fe=class{constructor(e){e=Cn(e),!!e&&(this._element=e,Qt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){Qt.remove(this._element,this.constructor.DATA_KEY),M.off(this._element,this.constructor.EVENT_KEY),Object.getOwnPropertyNames(this).forEach(e=>{this[e]=null})}_queueCallback(e,n,i=!0){lc(e,n,i)}static getInstance(e){return Qt.get(e,this.DATA_KEY)}static getOrCreateInstance(e,n={}){return this.getInstance(e)||new this(e,typeof n=="object"?n:null)}static get VERSION(){return Tb}static get NAME(){throw new Error('You have to implement the static method "NAME", for each component!')}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}},xb="alert",Ob="bs.alert",os=`.${Ob}`,Ab=".data-api",Cb='[data-bs-dismiss="alert"]',Lb=`close${os}`,Db=`closed${os}`,Mb=`click${os}${Ab}`,Ib="alert",kb="fade",Nb="show",Mn=class extends Fe{static get NAME(){return xb}close(e){let n=e?this._getRootElement(e):this._element,i=this._triggerCloseEvent(n);i===null||i.defaultPrevented||this._removeElement(n)}_getRootElement(e){return Dt(e)||e.closest(`.${Ib}`)}_triggerCloseEvent(e){return M.trigger(e,Lb)}_removeElement(e){e.classList.remove(Nb);let n=e.classList.contains(kb);this._queueCallback(()=>this._destroyElement(e),e,n)}_destroyElement(e){e.remove(),M.trigger(e,Db)}static jQueryInterface(e){return this.each(function(){let n=Mn.getOrCreateInstance(this);e==="close"&&n[e](this)})}static handleDismiss(e){return function(n){n&&n.preventDefault(),e.close(this)}}};M.on(document,Mb,Cb,Mn.handleDismiss(new Mn));Be(Mn);var Pb="button",Rb="bs.button",jb=`.${Rb}`,Hb=".data-api",qb="active",bc='[data-bs-toggle="button"]',$b=`click${jb}${Hb}`,si=class extends Fe{static get NAME(){return Pb}toggle(){this._element.setAttribute("aria-pressed",this._element.classList.toggle(qb))}static jQueryInterface(e){return this.each(function(){let n=si.getOrCreateInstance(this);e==="toggle"&&n[e]()})}};M.on(document,$b,bc,t=>{t.preventDefault();let e=t.target.closest(bc);si.getOrCreateInstance(e).toggle()});Be(si);function yc(t){return t==="true"?!0:t==="false"?!1:t===Number(t).toString()?Number(t):t===""||t==="null"?null:t}function ss(t){return t.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var pe={setDataAttribute(t,e,n){t.setAttribute(`data-bs-${ss(e)}`,n)},removeDataAttribute(t,e){t.removeAttribute(`data-bs-${ss(e)}`)},getDataAttributes(t){if(!t)return{};let e={};return Object.keys(t.dataset).filter(n=>n.startsWith("bs")).forEach(n=>{let i=n.replace(/^bs/,"");i=i.charAt(0).toLowerCase()+i.slice(1,i.length),e[i]=yc(t.dataset[n])}),e},getDataAttribute(t,e){return yc(t.getAttribute(`data-bs-${ss(e)}`))},offset(t){let e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}},position(t){return{top:t.offsetTop,left:t.offsetLeft}}},Ec="carousel",Bb="bs.carousel",Re=`.${Bb}`,_c=".data-api",Fb="ArrowLeft",zb="ArrowRight",Wb=500,Vb=40,Sc={interval:5e3,keyboard:!0,slide:!1,pause:"hover",wrap:!0,touch:!0},Yb={interval:"(number|boolean)",keyboard:"boolean",slide:"(boolean|string)",pause:"(string|boolean)",wrap:"boolean",touch:"boolean"},Jt="next",Zt="prev",en="left",ai="right",Ub={[Fb]:ai,[zb]:en},Kb=`slide${Re}`,wc=`slid${Re}`,Gb=`keydown${Re}`,Xb=`mouseenter${Re}`,Qb=`mouseleave${Re}`,Jb=`touchstart${Re}`,Zb=`touchmove${Re}`,ey=`touchend${Re}`,ty=`pointerdown${Re}`,ny=`pointerup${Re}`,iy=`dragstart${Re}`,ry=`load${Re}${_c}`,oy=`click${Re}${_c}`,sy="carousel",tn="active",ay="slide",ly="carousel-item-end",cy="carousel-item-start",uy="carousel-item-next",dy="carousel-item-prev",fy="pointer-event",hy=".active",dr=".active.carousel-item",py=".carousel-item",my=".carousel-item img",gy=".carousel-item-next, .carousel-item-prev",vy=".carousel-indicators",by="[data-bs-target]",yy="[data-bs-slide], [data-bs-slide-to]",Ey='[data-bs-ride="carousel"]',Tc="touch",xc="pen",Ze=class extends Fe{constructor(e,n){super(e);this._items=null,this._interval=null,this._activeElement=null,this._isPaused=!1,this._isSliding=!1,this.touchTimeout=null,this.touchStartX=0,this.touchDeltaX=0,this._config=this._getConfig(n),this._indicatorsElement=B.findOne(vy,this._element),this._touchSupported="ontouchstart"in document.documentElement||navigator.maxTouchPoints>0,this._pointerEvent=Boolean(window.PointerEvent),this._addEventListeners()}static get Default(){return Sc}static get NAME(){return Ec}next(){this._slide(Jt)}nextWhenVisible(){!document.hidden&&cr(this._element)&&this.next()}prev(){this._slide(Zt)}pause(e){e||(this._isPaused=!0),B.findOne(gy,this._element)&&(oc(this._element),this.cycle(!0)),clearInterval(this._interval),this._interval=null}cycle(e){e||(this._isPaused=!1),this._interval&&(clearInterval(this._interval),this._interval=null),this._config&&this._config.interval&&!this._isPaused&&(this._updateInterval(),this._interval=setInterval((document.visibilityState?this.nextWhenVisible:this.next).bind(this),this._config.interval))}to(e){this._activeElement=B.findOne(dr,this._element);let n=this._getItemIndex(this._activeElement);if(e>this._items.length-1||e<0)return;if(this._isSliding){M.one(this._element,wc,()=>this.to(e));return}if(n===e){this.pause(),this.cycle();return}let i=e>n?Jt:Zt;this._slide(i,this._items[e])}_getConfig(e){return e=V(V(V({},Sc),pe.getDataAttributes(this._element)),typeof e=="object"?e:{}),bt(Ec,e,Yb),e}_handleSwipe(){let e=Math.abs(this.touchDeltaX);if(e<=Vb)return;let n=e/this.touchDeltaX;this.touchDeltaX=0,!!n&&this._slide(n>0?ai:en)}_addEventListeners(){this._config.keyboard&&M.on(this._element,Gb,e=>this._keydown(e)),this._config.pause==="hover"&&(M.on(this._element,Xb,e=>this.pause(e)),M.on(this._element,Qb,e=>this.cycle(e))),this._config.touch&&this._touchSupported&&this._addTouchEventListeners()}_addTouchEventListeners(){let e=o=>{this._pointerEvent&&(o.pointerType===xc||o.pointerType===Tc)?this.touchStartX=o.clientX:this._pointerEvent||(this.touchStartX=o.touches[0].clientX)},n=o=>{this.touchDeltaX=o.touches&&o.touches.length>1?0:o.touches[0].clientX-this.touchStartX},i=o=>{this._pointerEvent&&(o.pointerType===xc||o.pointerType===Tc)&&(this.touchDeltaX=o.clientX-this.touchStartX),this._handleSwipe(),this._config.pause==="hover"&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(s=>this.cycle(s),Wb+this._config.interval))};B.find(my,this._element).forEach(o=>{M.on(o,iy,s=>s.preventDefault())}),this._pointerEvent?(M.on(this._element,ty,o=>e(o)),M.on(this._element,ny,o=>i(o)),this._element.classList.add(fy)):(M.on(this._element,Jb,o=>e(o)),M.on(this._element,Zb,o=>n(o)),M.on(this._element,ey,o=>i(o)))}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;let n=Ub[e.key];n&&(e.preventDefault(),this._slide(n))}_getItemIndex(e){return this._items=e&&e.parentNode?B.find(py,e.parentNode):[],this._items.indexOf(e)}_getItemByOrder(e,n){let i=e===Jt;return cc(this._items,n,i,this._config.wrap)}_triggerSlideEvent(e,n){let i=this._getItemIndex(e),o=this._getItemIndex(B.findOne(dr,this._element));return M.trigger(this._element,Kb,{relatedTarget:e,direction:n,from:o,to:i})}_setActiveIndicatorElement(e){if(this._indicatorsElement){let n=B.findOne(hy,this._indicatorsElement);n.classList.remove(tn),n.removeAttribute("aria-current");let i=B.find(by,this._indicatorsElement);for(let o=0;o{M.trigger(this._element,wc,{relatedTarget:a,direction:f,from:s,to:c})};if(this._element.classList.contains(ay)){a.classList.add(m),Dn(a),o.classList.add(l),a.classList.add(l);let y=()=>{a.classList.remove(l,m),a.classList.add(tn),o.classList.remove(tn,m,l),this._isSliding=!1,setTimeout(v,0)};this._queueCallback(y,o,!0)}else o.classList.remove(tn),a.classList.add(tn),this._isSliding=!1,v();u&&this.cycle()}_directionToOrder(e){return[ai,en].includes(e)?Ce()?e===en?Zt:Jt:e===en?Jt:Zt:e}_orderToDirection(e){return[Jt,Zt].includes(e)?Ce()?e===Zt?en:ai:e===Zt?ai:en:e}static carouselInterface(e,n){let i=Ze.getOrCreateInstance(e,n),{_config:o}=i;typeof n=="object"&&(o=V(V({},o),n));let s=typeof n=="string"?n:o.slide;if(typeof n=="number")i.to(n);else if(typeof s=="string"){if(typeof i[s]=="undefined")throw new TypeError(`No method named "${s}"`);i[s]()}else o.interval&&o.ride&&(i.pause(),i.cycle())}static jQueryInterface(e){return this.each(function(){Ze.carouselInterface(this,e)})}static dataApiClickHandler(e){let n=Dt(this);if(!n||!n.classList.contains(sy))return;let i=V(V({},pe.getDataAttributes(n)),pe.getDataAttributes(this)),o=this.getAttribute("data-bs-slide-to");o&&(i.interval=!1),Ze.carouselInterface(n,i),o&&Ze.getInstance(n).to(o),e.preventDefault()}};M.on(document,oy,yy,Ze.dataApiClickHandler);M.on(window,ry,()=>{let t=B.find(Ey);for(let e=0,n=t.length;ed===this._element);c!==null&&u.length&&(this._selector=c,this._triggerArray.push(a))}this._parent=this._config.parent?this._getParent():null,this._config.parent||this._addAriaAndCollapsedClass(this._element,this._triggerArray),this._config.toggle&&this.toggle()}static get Default(){return as}static get NAME(){return Oc}toggle(){this._element.classList.contains(nn)?this.hide():this.show()}show(){if(this._isTransitioning||this._element.classList.contains(nn))return;let e,n;this._parent&&(e=B.find(Ly,this._parent).filter(d=>typeof this._config.parent=="string"?d.getAttribute("data-bs-parent")===this._config.parent:d.classList.contains(ci)),e.length===0&&(e=null));let i=B.findOne(this._selector);if(e){let d=e.find(l=>i!==l);if(n=d?Le.getInstance(d):null,n&&n._isTransitioning)return}if(M.trigger(this._element,wy).defaultPrevented)return;e&&e.forEach(d=>{i!==d&&Le.collapseInterface(d,"hide"),n||Qt.set(d,Ac,null)});let s=this._getDimension();this._element.classList.remove(ci),this._element.classList.add(fr),this._element.style[s]=0,this._triggerArray.length&&this._triggerArray.forEach(d=>{d.classList.remove(hr),d.setAttribute("aria-expanded",!0)}),this.setTransitioning(!0);let a=()=>{this._element.classList.remove(fr),this._element.classList.add(ci,nn),this._element.style[s]="",this.setTransitioning(!1),M.trigger(this._element,Ty)},u=`scroll${s[0].toUpperCase()+s.slice(1)}`;this._queueCallback(a,this._element,!0),this._element.style[s]=`${this._element[u]}px`}hide(){if(this._isTransitioning||!this._element.classList.contains(nn)||M.trigger(this._element,xy).defaultPrevented)return;let n=this._getDimension();this._element.style[n]=`${this._element.getBoundingClientRect()[n]}px`,Dn(this._element),this._element.classList.add(fr),this._element.classList.remove(ci,nn);let i=this._triggerArray.length;if(i>0)for(let s=0;s{this.setTransitioning(!1),this._element.classList.remove(fr),this._element.classList.add(ci),M.trigger(this._element,Oy)};this._element.style[n]="",this._queueCallback(o,this._element,!0)}setTransitioning(e){this._isTransitioning=e}_getConfig(e){return e=V(V({},as),e),e.toggle=Boolean(e.toggle),bt(Oc,e,Sy),e}_getDimension(){return this._element.classList.contains(Cc)?Cc:Cy}_getParent(){let{parent:e}=this._config;e=Cn(e);let n=`${ui}[data-bs-parent="${e}"]`;return B.find(n,e).forEach(i=>{let o=Dt(i);this._addAriaAndCollapsedClass(o,[i])}),e}_addAriaAndCollapsedClass(e,n){if(!e||!n.length)return;let i=e.classList.contains(nn);n.forEach(o=>{i?o.classList.remove(hr):o.classList.add(hr),o.setAttribute("aria-expanded",i)})}static collapseInterface(e,n){let i=Le.getInstance(e),o=V(V(V({},as),pe.getDataAttributes(e)),typeof n=="object"&&n?n:{});if(!i&&o.toggle&&typeof n=="string"&&/show|hide/.test(n)&&(o.toggle=!1),i||(i=new Le(e,o)),typeof n=="string"){if(typeof i[n]=="undefined")throw new TypeError(`No method named "${n}"`);i[n]()}}static jQueryInterface(e){return this.each(function(){Le.collapseInterface(this,e)})}};M.on(document,Ay,ui,function(t){(t.target.tagName==="A"||t.delegateTarget&&t.delegateTarget.tagName==="A")&&t.preventDefault();let e=pe.getDataAttributes(this),n=ts(this);B.find(n).forEach(o=>{let s=Le.getInstance(o),a;s?(s._parent===null&&typeof e.parent=="string"&&(s._config.parent=e.parent,s._parent=s._getParent()),a="toggle"):a=e,Le.collapseInterface(o,a)})});Be(Le);var ls="dropdown",Dy="bs.dropdown",kt=`.${Dy}`,cs=".data-api",pr="Escape",Lc="Space",Dc="Tab",us="ArrowUp",mr="ArrowDown",My=2,Iy=new RegExp(`${us}|${mr}|${pr}`),ky=`hide${kt}`,Ny=`hidden${kt}`,Py=`show${kt}`,Ry=`shown${kt}`,jy=`click${kt}`,Mc=`click${kt}${cs}`,Ic=`keydown${kt}${cs}`,Hy=`keyup${kt}${cs}`,yt="show",qy="dropup",$y="dropend",By="dropstart",Fy="navbar",di='[data-bs-toggle="dropdown"]',ds=".dropdown-menu",zy=".navbar-nav",Wy=".dropdown-menu .dropdown-item:not(.disabled):not(:disabled)",Vy=Ce()?"top-end":"top-start",Yy=Ce()?"top-start":"top-end",Uy=Ce()?"bottom-end":"bottom-start",Ky=Ce()?"bottom-start":"bottom-end",Gy=Ce()?"left-start":"right-start",Xy=Ce()?"right-start":"left-start",Qy={offset:[0,2],boundary:"clippingParents",reference:"toggle",display:"dynamic",popperConfig:null,autoClose:!0},Jy={offset:"(array|string|function)",boundary:"(string|element)",reference:"(string|element|object)",display:"string",popperConfig:"(null|object|function)",autoClose:"(boolean|string)"},Te=class extends Fe{constructor(e,n){super(e);this._popper=null,this._config=this._getConfig(n),this._menu=this._getMenuElement(),this._inNavbar=this._detectNavbar(),this._addEventListeners()}static get Default(){return Qy}static get DefaultType(){return Jy}static get NAME(){return ls}toggle(){if(Ln(this._element))return;if(this._element.classList.contains(yt)){this.hide();return}this.show()}show(){if(Ln(this._element)||this._menu.classList.contains(yt))return;let e=Te.getParentFromElement(this._element),n={relatedTarget:this._element};if(!M.trigger(this._element,Py,n).defaultPrevented){if(this._inNavbar)pe.setDataAttribute(this._menu,"popper","none");else{if(typeof lr=="undefined")throw new TypeError("Bootstrap's dropdowns require Popper (https://popper.js.org)");let o=this._element;this._config.reference==="parent"?o=e:Mt(this._config.reference)?o=Cn(this._config.reference):typeof this._config.reference=="object"&&(o=this._config.reference);let s=this._getPopperConfig(),a=s.modifiers.find(c=>c.name==="applyStyles"&&c.enabled===!1);this._popper=ar(o,this._menu,s),a&&pe.setDataAttribute(this._menu,"popper","static")}"ontouchstart"in document.documentElement&&!e.closest(zy)&&[].concat(...document.body.children).forEach(o=>M.on(o,"mouseover",ur)),this._element.focus(),this._element.setAttribute("aria-expanded",!0),this._menu.classList.toggle(yt),this._element.classList.toggle(yt),M.trigger(this._element,Ry,n)}}hide(){if(Ln(this._element)||!this._menu.classList.contains(yt))return;let e={relatedTarget:this._element};this._completeHide(e)}dispose(){this._popper&&this._popper.destroy(),super.dispose()}update(){this._inNavbar=this._detectNavbar(),this._popper&&this._popper.update()}_addEventListeners(){M.on(this._element,jy,e=>{e.preventDefault(),this.toggle()})}_completeHide(e){M.trigger(this._element,ky,e).defaultPrevented||("ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(i=>M.off(i,"mouseover",ur)),this._popper&&this._popper.destroy(),this._menu.classList.remove(yt),this._element.classList.remove(yt),this._element.setAttribute("aria-expanded","false"),pe.removeDataAttribute(this._menu,"popper"),M.trigger(this._element,Ny,e))}_getConfig(e){if(e=V(V(V({},this.constructor.Default),pe.getDataAttributes(this._element)),e),bt(ls,e,this.constructor.DefaultType),typeof e.reference=="object"&&!Mt(e.reference)&&typeof e.reference.getBoundingClientRect!="function")throw new TypeError(`${ls.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_getMenuElement(){return B.next(this._element,ds)[0]}_getPlacement(){let e=this._element.parentNode;if(e.classList.contains($y))return Gy;if(e.classList.contains(By))return Xy;let n=getComputedStyle(this._menu).getPropertyValue("--bs-position").trim()==="end";return e.classList.contains(qy)?n?Yy:Vy:n?Ky:Uy}_detectNavbar(){return this._element.closest(`.${Fy}`)!==null}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_getPopperConfig(){let e={placement:this._getPlacement(),modifiers:[{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"offset",options:{offset:this._getOffset()}}]};return this._config.display==="static"&&(e.modifiers=[{name:"applyStyles",enabled:!1}]),V(V({},e),typeof this._config.popperConfig=="function"?this._config.popperConfig(e):this._config.popperConfig)}_selectMenuItem({key:e,target:n}){let i=B.find(Wy,this._menu).filter(cr);!i.length||cc(i,n,e===mr,!i.includes(n)).focus()}static dropdownInterface(e,n){let i=Te.getOrCreateInstance(e,n);if(typeof n=="string"){if(typeof i[n]=="undefined")throw new TypeError(`No method named "${n}"`);i[n]()}}static jQueryInterface(e){return this.each(function(){Te.dropdownInterface(this,e)})}static clearMenus(e){if(e&&(e.button===My||e.type==="keyup"&&e.key!==Dc))return;let n=B.find(di);for(let i=0,o=n.length;ithis.matches(di)?this:B.prev(this,di)[0];if(e.key===pr){i().focus(),Te.clearMenus();return}if(e.key===us||e.key===mr){n||i().click(),Te.getInstance(i())._selectMenuItem(e);return}(!n||e.key===Lc)&&Te.clearMenus()}};M.on(document,Ic,di,Te.dataApiKeydownHandler);M.on(document,Ic,ds,Te.dataApiKeydownHandler);M.on(document,Mc,Te.clearMenus);M.on(document,Hy,Te.clearMenus);M.on(document,Mc,di,function(t){t.preventDefault(),Te.dropdownInterface(this)});Be(Te);var kc=".fixed-top, .fixed-bottom, .is-fixed, .sticky-top",Nc=".sticky-top",gr=class{constructor(){this._element=document.body}getWidth(){let e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}hide(){let e=this.getWidth();this._disableOverFlow(),this._setElementAttributes(this._element,"paddingRight",n=>n+e),this._setElementAttributes(kc,"paddingRight",n=>n+e),this._setElementAttributes(Nc,"marginRight",n=>n-e)}_disableOverFlow(){this._saveInitialAttribute(this._element,"overflow"),this._element.style.overflow="hidden"}_setElementAttributes(e,n,i){let o=this.getWidth(),s=a=>{if(a!==this._element&&window.innerWidth>a.clientWidth+o)return;this._saveInitialAttribute(a,n);let c=window.getComputedStyle(a)[n];a.style[n]=`${i(Number.parseFloat(c))}px`};this._applyManipulationCallback(e,s)}reset(){this._resetElementAttributes(this._element,"overflow"),this._resetElementAttributes(this._element,"paddingRight"),this._resetElementAttributes(kc,"paddingRight"),this._resetElementAttributes(Nc,"marginRight")}_saveInitialAttribute(e,n){let i=e.style[n];i&&pe.setDataAttribute(e,n,i)}_resetElementAttributes(e,n){let i=o=>{let s=pe.getDataAttribute(o,n);typeof s=="undefined"?o.style.removeProperty(n):(pe.removeDataAttribute(o,n),o.style[n]=s)};this._applyManipulationCallback(e,i)}_applyManipulationCallback(e,n){Mt(e)?n(e):B.find(e,this._element).forEach(n)}isOverflowing(){return this.getWidth()>0}},Zy={isVisible:!0,isAnimated:!1,rootElement:"body",clickCallback:null},eE={isVisible:"boolean",isAnimated:"boolean",rootElement:"(element|string)",clickCallback:"(function|null)"},Pc="backdrop",tE="modal-backdrop",nE="fade",Rc="show",jc=`mousedown.bs.${Pc}`,fs=class{constructor(e){this._config=this._getConfig(e),this._isAppended=!1,this._element=null}show(e){if(!this._config.isVisible){Xt(e);return}this._append(),this._config.isAnimated&&Dn(this._getElement()),this._getElement().classList.add(Rc),this._emulateAnimation(()=>{Xt(e)})}hide(e){if(!this._config.isVisible){Xt(e);return}this._getElement().classList.remove(Rc),this._emulateAnimation(()=>{this.dispose(),Xt(e)})}_getElement(){if(!this._element){let e=document.createElement("div");e.className=tE,this._config.isAnimated&&e.classList.add(nE),this._element=e}return this._element}_getConfig(e){return e=V(V({},Zy),typeof e=="object"?e:{}),e.rootElement=Cn(e.rootElement),bt(Pc,e,eE),e}_append(){this._isAppended||(this._config.rootElement.appendChild(this._getElement()),M.on(this._getElement(),jc,()=>{Xt(this._config.clickCallback)}),this._isAppended=!0)}dispose(){!this._isAppended||(M.off(this._element,jc),this._element.remove(),this._isAppended=!1)}_emulateAnimation(e){lc(e,this._getElement(),this._config.isAnimated)}},Hc="modal",iE="bs.modal",je=`.${iE}`,rE=".data-api",qc="Escape",$c={backdrop:!0,keyboard:!0,focus:!0},oE={backdrop:"(boolean|string)",keyboard:"boolean",focus:"boolean"},sE=`hide${je}`,aE=`hidePrevented${je}`,Bc=`hidden${je}`,Fc=`show${je}`,lE=`shown${je}`,vr=`focusin${je}`,zc=`resize${je}`,hs=`click.dismiss${je}`,Wc=`keydown.dismiss${je}`,cE=`mouseup.dismiss${je}`,Vc=`mousedown.dismiss${je}`,uE=`click${je}${rE}`,Yc="modal-open",dE="fade",Uc="show",ps="modal-static",fE=".modal-dialog",hE=".modal-body",pE='[data-bs-toggle="modal"]',mE='[data-bs-dismiss="modal"]',Nt=class extends Fe{constructor(e,n){super(e);this._config=this._getConfig(n),this._dialog=B.findOne(fE,this._element),this._backdrop=this._initializeBackDrop(),this._isShown=!1,this._ignoreBackdropClick=!1,this._isTransitioning=!1,this._scrollBar=new gr}static get Default(){return $c}static get NAME(){return Hc}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||M.trigger(this._element,Fc,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isAnimated()&&(this._isTransitioning=!0),this._scrollBar.hide(),document.body.classList.add(Yc),this._adjustDialog(),this._setEscapeEvent(),this._setResizeEvent(),M.on(this._element,hs,mE,i=>this.hide(i)),M.on(this._dialog,Vc,()=>{M.one(this._element,cE,i=>{i.target===this._element&&(this._ignoreBackdropClick=!0)})}),this._showBackdrop(()=>this._showElement(e)))}hide(e){if(e&&["A","AREA"].includes(e.target.tagName)&&e.preventDefault(),!this._isShown||this._isTransitioning||M.trigger(this._element,sE).defaultPrevented)return;this._isShown=!1;let i=this._isAnimated();i&&(this._isTransitioning=!0),this._setEscapeEvent(),this._setResizeEvent(),M.off(document,vr),this._element.classList.remove(Uc),M.off(this._element,hs),M.off(this._dialog,Vc),this._queueCallback(()=>this._hideModal(),this._element,i)}dispose(){[window,this._dialog].forEach(e=>M.off(e,je)),this._backdrop.dispose(),super.dispose(),M.off(document,vr)}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new fs({isVisible:Boolean(this._config.backdrop),isAnimated:this._isAnimated()})}_getConfig(e){return e=V(V(V({},$c),pe.getDataAttributes(this._element)),typeof e=="object"?e:{}),bt(Hc,e,oE),e}_showElement(e){let n=this._isAnimated(),i=B.findOne(hE,this._dialog);(!this._element.parentNode||this._element.parentNode.nodeType!==Node.ELEMENT_NODE)&&document.body.appendChild(this._element),this._element.style.display="block",this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.scrollTop=0,i&&(i.scrollTop=0),n&&Dn(this._element),this._element.classList.add(Uc),this._config.focus&&this._enforceFocus();let o=()=>{this._config.focus&&this._element.focus(),this._isTransitioning=!1,M.trigger(this._element,lE,{relatedTarget:e})};this._queueCallback(o,this._dialog,n)}_enforceFocus(){M.off(document,vr),M.on(document,vr,e=>{document!==e.target&&this._element!==e.target&&!this._element.contains(e.target)&&this._element.focus()})}_setEscapeEvent(){this._isShown?M.on(this._element,Wc,e=>{this._config.keyboard&&e.key===qc?(e.preventDefault(),this.hide()):!this._config.keyboard&&e.key===qc&&this._triggerBackdropTransition()}):M.off(this._element,Wc)}_setResizeEvent(){this._isShown?M.on(window,zc,()=>this._adjustDialog()):M.off(window,zc)}_hideModal(){this._element.style.display="none",this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._isTransitioning=!1,this._backdrop.hide(()=>{document.body.classList.remove(Yc),this._resetAdjustments(),this._scrollBar.reset(),M.trigger(this._element,Bc)})}_showBackdrop(e){M.on(this._element,hs,n=>{if(this._ignoreBackdropClick){this._ignoreBackdropClick=!1;return}n.target===n.currentTarget&&(this._config.backdrop===!0?this.hide():this._config.backdrop==="static"&&this._triggerBackdropTransition())}),this._backdrop.show(e)}_isAnimated(){return this._element.classList.contains(dE)}_triggerBackdropTransition(){if(M.trigger(this._element,aE).defaultPrevented)return;let{classList:n,scrollHeight:i,style:o}=this._element,s=i>document.documentElement.clientHeight;!s&&o.overflowY==="hidden"||n.contains(ps)||(s||(o.overflowY="hidden"),n.add(ps),this._queueCallback(()=>{n.remove(ps),s||this._queueCallback(()=>{o.overflowY=""},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){let e=this._element.scrollHeight>document.documentElement.clientHeight,n=this._scrollBar.getWidth(),i=n>0;(!i&&e&&!Ce()||i&&!e&&Ce())&&(this._element.style.paddingLeft=`${n}px`),(i&&!e&&!Ce()||!i&&e&&Ce())&&(this._element.style.paddingRight=`${n}px`)}_resetAdjustments(){this._element.style.paddingLeft="",this._element.style.paddingRight=""}static jQueryInterface(e,n){return this.each(function(){let i=Nt.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof i[e]=="undefined")throw new TypeError(`No method named "${e}"`);i[e](n)}})}};M.on(document,uE,pE,function(t){let e=Dt(this);["A","AREA"].includes(this.tagName)&&t.preventDefault(),M.one(e,Fc,i=>{i.defaultPrevented||M.one(e,Bc,()=>{cr(this)&&this.focus()})}),Nt.getOrCreateInstance(e).toggle(this)});Be(Nt);var Kc="offcanvas",gE="bs.offcanvas",Et=`.${gE}`,Gc=".data-api",vE=`load${Et}${Gc}`,bE="Escape",Xc={backdrop:!0,keyboard:!0,scroll:!1},yE={backdrop:"boolean",keyboard:"boolean",scroll:"boolean"},Qc="show",Jc=".offcanvas.show",EE=`show${Et}`,_E=`shown${Et}`,SE=`hide${Et}`,Zc=`hidden${Et}`,br=`focusin${Et}`,wE=`click${Et}${Gc}`,TE=`click.dismiss${Et}`,xE=`keydown.dismiss${Et}`,OE='[data-bs-dismiss="offcanvas"]',AE='[data-bs-toggle="offcanvas"]',rn=class extends Fe{constructor(e,n){super(e);this._config=this._getConfig(n),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._addEventListeners()}static get NAME(){return Kc}static get Default(){return Xc}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){if(this._isShown||M.trigger(this._element,EE,{relatedTarget:e}).defaultPrevented)return;this._isShown=!0,this._element.style.visibility="visible",this._backdrop.show(),this._config.scroll||(new gr().hide(),this._enforceFocusOnElement(this._element)),this._element.removeAttribute("aria-hidden"),this._element.setAttribute("aria-modal",!0),this._element.setAttribute("role","dialog"),this._element.classList.add(Qc);let i=()=>{M.trigger(this._element,_E,{relatedTarget:e})};this._queueCallback(i,this._element,!0)}hide(){if(!this._isShown||M.trigger(this._element,SE).defaultPrevented)return;M.off(document,br),this._element.blur(),this._isShown=!1,this._element.classList.remove(Qc),this._backdrop.hide();let n=()=>{this._element.setAttribute("aria-hidden",!0),this._element.removeAttribute("aria-modal"),this._element.removeAttribute("role"),this._element.style.visibility="hidden",this._config.scroll||new gr().reset(),M.trigger(this._element,Zc)};this._queueCallback(n,this._element,!0)}dispose(){this._backdrop.dispose(),super.dispose(),M.off(document,br)}_getConfig(e){return e=V(V(V({},Xc),pe.getDataAttributes(this._element)),typeof e=="object"?e:{}),bt(Kc,e,yE),e}_initializeBackDrop(){return new fs({isVisible:this._config.backdrop,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:()=>this.hide()})}_enforceFocusOnElement(e){M.off(document,br),M.on(document,br,n=>{document!==n.target&&e!==n.target&&!e.contains(n.target)&&e.focus()}),e.focus()}_addEventListeners(){M.on(this._element,TE,OE,()=>this.hide()),M.on(this._element,xE,e=>{this._config.keyboard&&e.key===bE&&this.hide()})}static jQueryInterface(e){return this.each(function(){let n=rn.getOrCreateInstance(this,e);if(typeof e=="string"){if(n[e]===void 0||e.startsWith("_")||e==="constructor")throw new TypeError(`No method named "${e}"`);n[e](this)}})}};M.on(document,wE,AE,function(t){let e=Dt(this);if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Ln(this))return;M.one(e,Zc,()=>{cr(this)&&this.focus()});let n=B.findOne(Jc);n&&n!==e&&rn.getInstance(n).hide(),rn.getOrCreateInstance(e).toggle(this)});M.on(window,vE,()=>B.find(Jc).forEach(t=>rn.getOrCreateInstance(t).show()));Be(rn);var CE=new Set(["background","cite","href","itemtype","longdesc","poster","src","xlink:href"]),LE=/^aria-[\w-]*$/i,DE=/^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i,ME=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[\d+/a-z]+=*$/i,IE=(t,e)=>{let n=t.nodeName.toLowerCase();if(e.includes(n))return CE.has(n)?Boolean(DE.test(t.nodeValue)||ME.test(t.nodeValue)):!0;let i=e.filter(o=>o instanceof RegExp);for(let o=0,s=i.length;o{IE(p,f)||d.removeAttribute(p.nodeName)})}return o.body.innerHTML}var tu="tooltip",NE="bs.tooltip",et=`.${NE}`,nu="bs-tooltip",PE=new RegExp(`(^|\\s)${nu}\\S+`,"g"),RE=new Set(["sanitize","allowList","sanitizeFn"]),jE={animation:"boolean",template:"string",title:"(string|element|function)",trigger:"string",delay:"(number|object)",html:"boolean",selector:"(string|boolean)",placement:"(string|function)",offset:"(array|string|function)",container:"(string|element|boolean)",fallbackPlacements:"array",boundary:"(string|element)",customClass:"(string|function)",sanitize:"boolean",sanitizeFn:"(null|function)",allowList:"object",popperConfig:"(null|object|function)"},HE={AUTO:"auto",TOP:"top",RIGHT:Ce()?"left":"right",BOTTOM:"bottom",LEFT:Ce()?"right":"left"},qE={animation:!0,template:'',trigger:"hover focus",title:"",delay:0,html:!1,selector:!1,placement:"top",offset:[0,0],container:!1,fallbackPlacements:["top","right","bottom","left"],boundary:"clippingParents",customClass:"",sanitize:!0,sanitizeFn:null,allowList:kE,popperConfig:null},$E={HIDE:`hide${et}`,HIDDEN:`hidden${et}`,SHOW:`show${et}`,SHOWN:`shown${et}`,INSERTED:`inserted${et}`,CLICK:`click${et}`,FOCUSIN:`focusin${et}`,FOCUSOUT:`focusout${et}`,MOUSEENTER:`mouseenter${et}`,MOUSELEAVE:`mouseleave${et}`},yr="fade",iu="modal",fi="show",hi="show",ms="out",BE=".tooltip-inner",pi="hover",gs="focus",FE="click",zE="manual",tt=class extends Fe{constructor(e,n){if(typeof lr=="undefined")throw new TypeError("Bootstrap's tooltips require Popper (https://popper.js.org)");super(e);this._isEnabled=!0,this._timeout=0,this._hoverState="",this._activeTrigger={},this._popper=null,this._config=this._getConfig(n),this.tip=null,this._setListeners()}static get Default(){return qE}static get NAME(){return tu}static get Event(){return $E}static get DefaultType(){return jE}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(e){if(!!this._isEnabled)if(e){let n=this._initializeOnDelegatedTarget(e);n._activeTrigger.click=!n._activeTrigger.click,n._isWithActiveTrigger()?n._enter(null,n):n._leave(null,n)}else{if(this.getTipElement().classList.contains(fi)){this._leave(null,this);return}this._enter(null,this)}}dispose(){clearTimeout(this._timeout),M.off(this._element.closest(`.${iu}`),"hide.bs.modal",this._hideModalHandler),this.tip&&this.tip.remove(),this._popper&&this._popper.destroy(),super.dispose()}show(){if(this._element.style.display==="none")throw new Error("Please use show on visible elements");if(!(this.isWithContent()&&this._isEnabled))return;let e=M.trigger(this._element,this.constructor.Event.SHOW),n=sc(this._element),i=n===null?this._element.ownerDocument.documentElement.contains(this._element):n.contains(this._element);if(e.defaultPrevented||!i)return;let o=this.getTipElement(),s=ic(this.constructor.NAME);o.setAttribute("id",s),this._element.setAttribute("aria-describedby",s),this.setContent(),this._config.animation&&o.classList.add(yr);let a=typeof this._config.placement=="function"?this._config.placement.call(this,o,this._element):this._config.placement,c=this._getAttachment(a);this._addAttachmentClass(c);let{container:u}=this._config;Qt.set(o,this.constructor.DATA_KEY,this),this._element.ownerDocument.documentElement.contains(this.tip)||(u.appendChild(o),M.trigger(this._element,this.constructor.Event.INSERTED)),this._popper?this._popper.update():this._popper=ar(this._element,o,this._getPopperConfig(c)),o.classList.add(fi);let d=typeof this._config.customClass=="function"?this._config.customClass():this._config.customClass;d&&o.classList.add(...d.split(" ")),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(f=>{M.on(f,"mouseover",ur)});let l=()=>{let f=this._hoverState;this._hoverState=null,M.trigger(this._element,this.constructor.Event.SHOWN),f===ms&&this._leave(null,this)},m=this.tip.classList.contains(yr);this._queueCallback(l,this.tip,m)}hide(){if(!this._popper)return;let e=this.getTipElement(),n=()=>{this._isWithActiveTrigger()||(this._hoverState!==hi&&e.remove(),this._cleanTipClass(),this._element.removeAttribute("aria-describedby"),M.trigger(this._element,this.constructor.Event.HIDDEN),this._popper&&(this._popper.destroy(),this._popper=null))};if(M.trigger(this._element,this.constructor.Event.HIDE).defaultPrevented)return;e.classList.remove(fi),"ontouchstart"in document.documentElement&&[].concat(...document.body.children).forEach(s=>M.off(s,"mouseover",ur)),this._activeTrigger[FE]=!1,this._activeTrigger[gs]=!1,this._activeTrigger[pi]=!1;let o=this.tip.classList.contains(yr);this._queueCallback(n,this.tip,o),this._hoverState=""}update(){this._popper!==null&&this._popper.update()}isWithContent(){return Boolean(this.getTitle())}getTipElement(){if(this.tip)return this.tip;let e=document.createElement("div");return e.innerHTML=this._config.template,this.tip=e.children[0],this.tip}setContent(){let e=this.getTipElement();this.setElementContent(B.findOne(BE,e),this.getTitle()),e.classList.remove(yr,fi)}setElementContent(e,n){if(e!==null){if(Mt(n)){n=Cn(n),this._config.html?n.parentNode!==e&&(e.innerHTML="",e.appendChild(n)):e.textContent=n.textContent;return}this._config.html?(this._config.sanitize&&(n=eu(n,this._config.allowList,this._config.sanitizeFn)),e.innerHTML=n):e.textContent=n}}getTitle(){let e=this._element.getAttribute("data-bs-original-title");return e||(e=typeof this._config.title=="function"?this._config.title.call(this._element):this._config.title),e}updateAttachment(e){return e==="right"?"end":e==="left"?"start":e}_initializeOnDelegatedTarget(e,n){let i=this.constructor.DATA_KEY;return n=n||Qt.get(e.delegateTarget,i),n||(n=new this.constructor(e.delegateTarget,this._getDelegateConfig()),Qt.set(e.delegateTarget,i,n)),n}_getOffset(){let{offset:e}=this._config;return typeof e=="string"?e.split(",").map(n=>Number.parseInt(n,10)):typeof e=="function"?n=>e(n,this._element):e}_getPopperConfig(e){let n={placement:e,modifiers:[{name:"flip",options:{fallbackPlacements:this._config.fallbackPlacements}},{name:"offset",options:{offset:this._getOffset()}},{name:"preventOverflow",options:{boundary:this._config.boundary}},{name:"arrow",options:{element:`.${this.constructor.NAME}-arrow`}},{name:"onChange",enabled:!0,phase:"afterWrite",fn:i=>this._handlePopperPlacementChange(i)}],onFirstUpdate:i=>{i.options.placement!==i.placement&&this._handlePopperPlacementChange(i)}};return V(V({},n),typeof this._config.popperConfig=="function"?this._config.popperConfig(n):this._config.popperConfig)}_addAttachmentClass(e){this.getTipElement().classList.add(`${nu}-${this.updateAttachment(e)}`)}_getAttachment(e){return HE[e.toUpperCase()]}_setListeners(){this._config.trigger.split(" ").forEach(n=>{if(n==="click")M.on(this._element,this.constructor.Event.CLICK,this._config.selector,i=>this.toggle(i));else if(n!==zE){let i=n===pi?this.constructor.Event.MOUSEENTER:this.constructor.Event.FOCUSIN,o=n===pi?this.constructor.Event.MOUSELEAVE:this.constructor.Event.FOCUSOUT;M.on(this._element,i,this._config.selector,s=>this._enter(s)),M.on(this._element,o,this._config.selector,s=>this._leave(s))}}),this._hideModalHandler=()=>{this._element&&this.hide()},M.on(this._element.closest(`.${iu}`),"hide.bs.modal",this._hideModalHandler),this._config.selector?this._config=Xi(V({},this._config),{trigger:"manual",selector:""}):this._fixTitle()}_fixTitle(){let e=this._element.getAttribute("title"),n=typeof this._element.getAttribute("data-bs-original-title");(e||n!=="string")&&(this._element.setAttribute("data-bs-original-title",e||""),e&&!this._element.getAttribute("aria-label")&&!this._element.textContent&&this._element.setAttribute("aria-label",e),this._element.setAttribute("title",""))}_enter(e,n){if(n=this._initializeOnDelegatedTarget(e,n),e&&(n._activeTrigger[e.type==="focusin"?gs:pi]=!0),n.getTipElement().classList.contains(fi)||n._hoverState===hi){n._hoverState=hi;return}if(clearTimeout(n._timeout),n._hoverState=hi,!n._config.delay||!n._config.delay.show){n.show();return}n._timeout=setTimeout(()=>{n._hoverState===hi&&n.show()},n._config.delay.show)}_leave(e,n){if(n=this._initializeOnDelegatedTarget(e,n),e&&(n._activeTrigger[e.type==="focusout"?gs:pi]=n._element.contains(e.relatedTarget)),!n._isWithActiveTrigger()){if(clearTimeout(n._timeout),n._hoverState=ms,!n._config.delay||!n._config.delay.hide){n.hide();return}n._timeout=setTimeout(()=>{n._hoverState===ms&&n.hide()},n._config.delay.hide)}}_isWithActiveTrigger(){for(let e in this._activeTrigger)if(this._activeTrigger[e])return!0;return!1}_getConfig(e){let n=pe.getDataAttributes(this._element);return Object.keys(n).forEach(i=>{RE.has(i)&&delete n[i]}),e=V(V(V({},this.constructor.Default),n),typeof e=="object"&&e?e:{}),e.container=e.container===!1?document.body:Cn(e.container),typeof e.delay=="number"&&(e.delay={show:e.delay,hide:e.delay}),typeof e.title=="number"&&(e.title=e.title.toString()),typeof e.content=="number"&&(e.content=e.content.toString()),bt(tu,e,this.constructor.DefaultType),e.sanitize&&(e.template=eu(e.template,e.allowList,e.sanitizeFn)),e}_getDelegateConfig(){let e={};if(this._config)for(let n in this._config)this.constructor.Default[n]!==this._config[n]&&(e[n]=this._config[n]);return e}_cleanTipClass(){let e=this.getTipElement(),n=e.getAttribute("class").match(PE);n!==null&&n.length>0&&n.map(i=>i.trim()).forEach(i=>e.classList.remove(i))}_handlePopperPlacementChange(e){let{state:n}=e;!n||(this.tip=n.elements.popper,this._cleanTipClass(),this._addAttachmentClass(this._getAttachment(n.placement)))}static jQueryInterface(e){return this.each(function(){let n=tt.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}};Be(tt);var WE="popover",VE="bs.popover",nt=`.${VE}`,ru="bs-popover",YE=new RegExp(`(^|\\s)${ru}\\S+`,"g"),UE=Xi(V({},tt.Default),{placement:"right",offset:[0,8],trigger:"click",content:"",template:''}),KE=Xi(V({},tt.DefaultType),{content:"(string|element|function)"}),GE={HIDE:`hide${nt}`,HIDDEN:`hidden${nt}`,SHOW:`show${nt}`,SHOWN:`shown${nt}`,INSERTED:`inserted${nt}`,CLICK:`click${nt}`,FOCUSIN:`focusin${nt}`,FOCUSOUT:`focusout${nt}`,MOUSEENTER:`mouseenter${nt}`,MOUSELEAVE:`mouseleave${nt}`},XE="fade",QE="show",ou=".popover-header",su=".popover-body",Er=class extends tt{static get Default(){return UE}static get NAME(){return WE}static get Event(){return GE}static get DefaultType(){return KE}isWithContent(){return this.getTitle()||this._getContent()}getTipElement(){return this.tip?this.tip:(this.tip=super.getTipElement(),this.getTitle()||B.findOne(ou,this.tip).remove(),this._getContent()||B.findOne(su,this.tip).remove(),this.tip)}setContent(){let e=this.getTipElement();this.setElementContent(B.findOne(ou,e),this.getTitle());let n=this._getContent();typeof n=="function"&&(n=n.call(this._element)),this.setElementContent(B.findOne(su,e),n),e.classList.remove(XE,QE)}_addAttachmentClass(e){this.getTipElement().classList.add(`${ru}-${this.updateAttachment(e)}`)}_getContent(){return this._element.getAttribute("data-bs-content")||this._config.content}_cleanTipClass(){let e=this.getTipElement(),n=e.getAttribute("class").match(YE);n!==null&&n.length>0&&n.map(i=>i.trim()).forEach(i=>e.classList.remove(i))}static jQueryInterface(e){return this.each(function(){let n=Er.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}};Be(Er);var vs="scrollspy",JE="bs.scrollspy",_r=`.${JE}`,ZE=".data-api",au={offset:10,method:"auto",target:""},e_={offset:"number",method:"string",target:"(string|element)"},t_=`activate${_r}`,n_=`scroll${_r}`,i_=`load${_r}${ZE}`,lu="dropdown-item",on="active",r_='[data-bs-spy="scroll"]',o_=".nav, .list-group",bs=".nav-link",s_=".nav-item",cu=".list-group-item",a_=".dropdown",l_=".dropdown-toggle",c_="offset",uu="position",mi=class extends Fe{constructor(e,n){super(e);this._scrollElement=this._element.tagName==="BODY"?window:this._element,this._config=this._getConfig(n),this._selector=`${this._config.target} ${bs}, ${this._config.target} ${cu}, ${this._config.target} .${lu}`,this._offsets=[],this._targets=[],this._activeTarget=null,this._scrollHeight=0,M.on(this._scrollElement,n_,()=>this._process()),this.refresh(),this._process()}static get Default(){return au}static get NAME(){return vs}refresh(){let e=this._scrollElement===this._scrollElement.window?c_:uu,n=this._config.method==="auto"?e:this._config.method,i=n===uu?this._getScrollTop():0;this._offsets=[],this._targets=[],this._scrollHeight=this._getScrollHeight(),B.find(this._selector).map(s=>{let a=ts(s),c=a?B.findOne(a):null;if(c){let u=c.getBoundingClientRect();if(u.width||u.height)return[pe[n](c).top+i,a]}return null}).filter(s=>s).sort((s,a)=>s[0]-a[0]).forEach(s=>{this._offsets.push(s[0]),this._targets.push(s[1])})}dispose(){M.off(this._scrollElement,_r),super.dispose()}_getConfig(e){if(e=V(V(V({},au),pe.getDataAttributes(this._element)),typeof e=="object"&&e?e:{}),typeof e.target!="string"&&Mt(e.target)){let{id:n}=e.target;n||(n=ic(vs),e.target.id=n),e.target=`#${n}`}return bt(vs,e,e_),e}_getScrollTop(){return this._scrollElement===window?this._scrollElement.pageYOffset:this._scrollElement.scrollTop}_getScrollHeight(){return this._scrollElement.scrollHeight||Math.max(document.body.scrollHeight,document.documentElement.scrollHeight)}_getOffsetHeight(){return this._scrollElement===window?window.innerHeight:this._scrollElement.getBoundingClientRect().height}_process(){let e=this._getScrollTop()+this._config.offset,n=this._getScrollHeight(),i=this._config.offset+n-this._getOffsetHeight();if(this._scrollHeight!==n&&this.refresh(),e>=i){let o=this._targets[this._targets.length-1];this._activeTarget!==o&&this._activate(o);return}if(this._activeTarget&&e0){this._activeTarget=null,this._clear();return}for(let o=this._offsets.length;o--;)this._activeTarget!==this._targets[o]&&e>=this._offsets[o]&&(typeof this._offsets[o+1]=="undefined"||e`${o}[data-bs-target="${e}"],${o}[href="${e}"]`),i=B.findOne(n.join(","));i.classList.contains(lu)?(B.findOne(l_,i.closest(a_)).classList.add(on),i.classList.add(on)):(i.classList.add(on),B.parents(i,o_).forEach(o=>{B.prev(o,`${bs}, ${cu}`).forEach(s=>s.classList.add(on)),B.prev(o,s_).forEach(s=>{B.children(s,bs).forEach(a=>a.classList.add(on))})})),M.trigger(this._scrollElement,t_,{relatedTarget:e})}_clear(){B.find(this._selector).filter(e=>e.classList.contains(on)).forEach(e=>e.classList.remove(on))}static jQueryInterface(e){return this.each(function(){let n=mi.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}};M.on(window,i_,()=>{B.find(r_).forEach(t=>new mi(t))});Be(mi);var u_="tab",d_="bs.tab",gi=`.${d_}`,f_=".data-api",h_=`hide${gi}`,p_=`hidden${gi}`,m_=`show${gi}`,g_=`shown${gi}`,v_=`click${gi}${f_}`,b_="dropdown-menu",vi="active",du="fade",fu="show",y_=".dropdown",E_=".nav, .list-group",hu=".active",pu=":scope > li > .active",__='[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]',S_=".dropdown-toggle",w_=":scope > .dropdown-menu .active",sn=class extends Fe{static get NAME(){return u_}show(){if(this._element.parentNode&&this._element.parentNode.nodeType===Node.ELEMENT_NODE&&this._element.classList.contains(vi))return;let e,n=Dt(this._element),i=this._element.closest(E_);if(i){let c=i.nodeName==="UL"||i.nodeName==="OL"?pu:hu;e=B.find(c,i),e=e[e.length-1]}let o=e?M.trigger(e,h_,{relatedTarget:this._element}):null;if(M.trigger(this._element,m_,{relatedTarget:e}).defaultPrevented||o!==null&&o.defaultPrevented)return;this._activate(this._element,i);let a=()=>{M.trigger(e,p_,{relatedTarget:this._element}),M.trigger(this._element,g_,{relatedTarget:e})};n?this._activate(n,n.parentNode,a):a()}_activate(e,n,i){let s=(n&&(n.nodeName==="UL"||n.nodeName==="OL")?B.find(pu,n):B.children(n,hu))[0],a=i&&s&&s.classList.contains(du),c=()=>this._transitionComplete(e,s,i);s&&a?(s.classList.remove(fu),this._queueCallback(c,e,!0)):c()}_transitionComplete(e,n,i){if(n){n.classList.remove(vi);let s=B.findOne(w_,n.parentNode);s&&s.classList.remove(vi),n.getAttribute("role")==="tab"&&n.setAttribute("aria-selected",!1)}e.classList.add(vi),e.getAttribute("role")==="tab"&&e.setAttribute("aria-selected",!0),Dn(e),e.classList.contains(du)&&e.classList.add(fu);let o=e.parentNode;if(o&&o.nodeName==="LI"&&(o=o.parentNode),o&&o.classList.contains(b_)){let s=e.closest(y_);s&&B.find(S_,s).forEach(a=>a.classList.add(vi)),e.setAttribute("aria-expanded",!0)}i&&i()}static jQueryInterface(e){return this.each(function(){let n=sn.getOrCreateInstance(this);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e]()}})}};M.on(document,v_,__,function(t){if(["A","AREA"].includes(this.tagName)&&t.preventDefault(),Ln(this))return;sn.getOrCreateInstance(this).show()});Be(sn);var mu="toast",T_="bs.toast",_t=`.${T_}`,x_=`click.dismiss${_t}`,O_=`mouseover${_t}`,A_=`mouseout${_t}`,C_=`focusin${_t}`,L_=`focusout${_t}`,D_=`hide${_t}`,M_=`hidden${_t}`,I_=`show${_t}`,k_=`shown${_t}`,N_="fade",gu="hide",bi="show",vu="showing",P_={animation:"boolean",autohide:"boolean",delay:"number"},bu={animation:!0,autohide:!0,delay:5e3},R_='[data-bs-dismiss="toast"]',St=class extends Fe{constructor(e,n){super(e);this._config=this._getConfig(n),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get DefaultType(){return P_}static get Default(){return bu}static get NAME(){return mu}show(){if(M.trigger(this._element,I_).defaultPrevented)return;this._clearTimeout(),this._config.animation&&this._element.classList.add(N_);let n=()=>{this._element.classList.remove(vu),this._element.classList.add(bi),M.trigger(this._element,k_),this._maybeScheduleHide()};this._element.classList.remove(gu),Dn(this._element),this._element.classList.add(vu),this._queueCallback(n,this._element,this._config.animation)}hide(){if(!this._element.classList.contains(bi)||M.trigger(this._element,D_).defaultPrevented)return;let n=()=>{this._element.classList.add(gu),M.trigger(this._element,M_)};this._element.classList.remove(bi),this._queueCallback(n,this._element,this._config.animation)}dispose(){this._clearTimeout(),this._element.classList.contains(bi)&&this._element.classList.remove(bi),super.dispose()}_getConfig(e){return e=V(V(V({},bu),pe.getDataAttributes(this._element)),typeof e=="object"&&e?e:{}),bt(mu,e,this.constructor.DefaultType),e}_maybeScheduleHide(){!this._config.autohide||this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay))}_onInteraction(e,n){switch(e.type){case"mouseover":case"mouseout":this._hasMouseInteraction=n;break;case"focusin":case"focusout":this._hasKeyboardInteraction=n;break}if(n){this._clearTimeout();return}let i=e.relatedTarget;this._element===i||this._element.contains(i)||this._maybeScheduleHide()}_setListeners(){M.on(this._element,x_,R_,()=>this.hide()),M.on(this._element,O_,e=>this._onInteraction(e,!0)),M.on(this._element,A_,e=>this._onInteraction(e,!1)),M.on(this._element,C_,e=>this._onInteraction(e,!0)),M.on(this._element,L_,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(e){return this.each(function(){let n=St.getOrCreateInstance(this,e);if(typeof e=="string"){if(typeof n[e]=="undefined")throw new TypeError(`No method named "${e}"`);n[e](this)}})}};Be(St);"use strict";var Uw=wt(),rf=zs();Uw({target:"Array",proto:!0,forced:[].forEach!=rf},{forEach:rf});var Kw=me(),Gw=Ws(),Vs=zs(),Xw=it();for(var Qw in Gw)if(Ys=Kw[Qw],Ai=Ys&&Ys.prototype,Ai&&Ai.forEach!==Vs)try{Xw(Ai,"forEach",Vs)}catch(t){Ai.forEach=Vs}var Ys,Ai;var fo=Ae(af());"use strict";var iT=wt(),rT=jr().filter,oT=cf(),sT=oT("filter");iT({target:"Array",proto:!0,forced:!sT},{filter:function(e){return rT(this,e,arguments.length>1?arguments[1]:void 0)}});var tj=Ae(ua());var cx=wt(),nh=th();cx({target:"Object",stat:!0,forced:Object.assign!==nh},{assign:nh});var yx=zr(),Ex=dn(),_x=ah();yx||Ex(Object.prototype,"toString",_x,{unsafe:!0});var Dx=wt(),ph=hh();Dx({global:!0,forced:parseInt!=ph},{parseInt:ph});"use strict";var kx=ma().charAt,vh=un(),Nx=la(),bh="String Iterator",Px=vh.set,Rx=vh.getterFor(bh);Nx(String,"String",function(t){Px(this,{type:bh,string:String(t),index:0})},function(){var e=Rx(this),n=e.string,i=e.index,o;return i>=n.length?{value:void 0,done:!0}:(o=kx(n,i),e.index+=o.length,{value:o,done:!1})});var sj=Ae(ep());var NO=me(),tp=Ws(),Ii=ua(),Da=it(),np=xe(),Ma=np("iterator"),ip=np("toStringTag"),Ia=Ii.values;for(var ka in tp)if(Na=NO[ka],ot=Na&&Na.prototype,ot){if(ot[Ma]!==Ia)try{Da(ot,Ma,Ia)}catch(t){ot[Ma]=Ia}if(ot[ip]||Da(ot,ip,ka),tp[ka]){for(mn in Ii)if(ot[mn]!==Ii[mn])try{Da(ot,mn,Ii[mn])}catch(t){ot[mn]=Ii[mn]}}}var Na,ot,mn;var ll=Ae(lp()),cl=Ae(fp()),mm=Ae(_p());var Ye=[];var Sp=function(){return Ye.some(function(t){return t.activeTargets.length>0})};var wp=function(){return Ye.some(function(t){return t.skippedTargets.length>0})};var Tp="ResizeObserver loop completed with undelivered notifications.",xp=function(){var t;typeof ErrorEvent=="function"?t=new ErrorEvent("error",{message:Tp}):(t=document.createEvent("Event"),t.initEvent("error",!1,!1),t.message=Tp),window.dispatchEvent(t)};var bn;(function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"})(bn||(bn={}));var Ke=function(t){return Object.freeze(t)};var Ba=function(){function t(e,n){this.inlineSize=e,this.blockSize=n,Ke(this)}return t}();var Fa=function(){function t(e,n,i,o){return this.x=e,this.y=n,this.width=i,this.height=o,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,Ke(this)}return t.prototype.toJSON=function(){var e=this,n=e.x,i=e.y,o=e.top,s=e.right,a=e.bottom,c=e.left,u=e.width,d=e.height;return{x:n,y:i,top:o,right:s,bottom:a,left:c,width:u,height:d}},t.fromRect=function(e){return new t(e.x,e.y,e.width,e.height)},t}();var Ni=function(t){return t instanceof SVGElement&&"getBBox"in t},no=function(t){if(Ni(t)){var e=t.getBBox(),n=e.width,i=e.height;return!n&&!i}var o=t,s=o.offsetWidth,a=o.offsetHeight;return!(s||a||t.getClientRects().length)},za=function(t){var e,n;if(t instanceof Element)return!0;var i=(n=(e=t)===null||e===void 0?void 0:e.ownerDocument)===null||n===void 0?void 0:n.defaultView;return!!(i&&t instanceof i.Element)},Op=function(t){switch(t.tagName){case"INPUT":if(t.type!=="image")break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1};var yn=typeof window!="undefined"?window:{};var io=new WeakMap,Ap=/auto|scroll/,QA=/^tb|vertical/,JA=/msie|trident/i.test(yn.navigator&&yn.navigator.userAgent),st=function(t){return parseFloat(t||"0")},jn=function(t,e,n){return t===void 0&&(t=0),e===void 0&&(e=0),n===void 0&&(n=!1),new Ba((n?e:t)||0,(n?t:e)||0)},Cp=Ke({devicePixelContentBoxSize:jn(),borderBoxSize:jn(),contentBoxSize:jn(),contentRect:new Fa(0,0,0,0)}),Wa=function(t,e){if(e===void 0&&(e=!1),io.has(t)&&!e)return io.get(t);if(no(t))return io.set(t,Cp),Cp;var n=getComputedStyle(t),i=Ni(t)&&t.ownerSVGElement&&t.getBBox(),o=!JA&&n.boxSizing==="border-box",s=QA.test(n.writingMode||""),a=!i&&Ap.test(n.overflowY||""),c=!i&&Ap.test(n.overflowX||""),u=i?0:st(n.paddingTop),d=i?0:st(n.paddingRight),l=i?0:st(n.paddingBottom),m=i?0:st(n.paddingLeft),f=i?0:st(n.borderTopWidth),p=i?0:st(n.borderRightWidth),v=i?0:st(n.borderBottomWidth),y=i?0:st(n.borderLeftWidth),h=m+d,b=u+l,S=y+p,A=f+v,O=c?t.offsetHeight-A-t.clientHeight:0,k=a?t.offsetWidth-S-t.clientWidth:0,T=o?h+S:0,L=o?b+A:0,D=i?i.width:st(n.width)-T-k,N=i?i.height:st(n.height)-L-O,H=D+h+k+S,$=N+b+O+A,_=Ke({devicePixelContentBoxSize:jn(Math.round(D*devicePixelRatio),Math.round(N*devicePixelRatio),s),borderBoxSize:jn(H,$,s),contentBoxSize:jn(D,N,s),contentRect:new Fa(m,u,D,N)});return io.set(t,_),_},ro=function(t,e,n){var i=Wa(t,n),o=i.borderBoxSize,s=i.contentBoxSize,a=i.devicePixelContentBoxSize;switch(e){case bn.DEVICE_PIXEL_CONTENT_BOX:return a;case bn.BORDER_BOX:return o;default:return s}};var Va=function(){function t(e){var n=Wa(e);this.target=e,this.contentRect=n.contentRect,this.borderBoxSize=Ke([n.borderBoxSize]),this.contentBoxSize=Ke([n.contentBoxSize]),this.devicePixelContentBoxSize=Ke([n.devicePixelContentBoxSize])}return t}();var oo=function(t){if(no(t))return 1/0;for(var e=0,n=t.parentNode;n;)e+=1,n=n.parentNode;return e};var Lp=function(){var t=1/0,e=[];Ye.forEach(function(a){if(a.activeTargets.length!==0){var c=[];a.activeTargets.forEach(function(d){var l=new Va(d.target),m=oo(d.target);c.push(l),d.lastReportedSize=ro(d.target,d.observedBox),mt?n.activeTargets.push(o):n.skippedTargets.push(o))})})};var Dp=function(){var t=0;for(Ya(t);Sp();)t=Lp(),Ya(t);return wp()&&xp(),t>0};var Ua,Mp=[],ZA=function(){return Mp.splice(0).forEach(function(t){return t()})},Ip=function(t){if(!Ua){var e=0,n=document.createTextNode(""),i={characterData:!0};new MutationObserver(function(){return ZA()}).observe(n,i),Ua=function(){n.textContent=""+(e?e--:e++)}}Mp.push(t),Ua()};var kp=function(t){Ip(function(){requestAnimationFrame(t)})};var so=0,e0=function(){return!!so},t0=250,n0={attributes:!0,characterData:!0,childList:!0,subtree:!0},Np=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],Pp=function(t){return t===void 0&&(t=0),Date.now()+t},Ka=!1,i0=function(){function t(){var e=this;this.stopped=!0,this.listener=function(){return e.schedule()}}return t.prototype.run=function(e){var n=this;if(e===void 0&&(e=t0),!Ka){Ka=!0;var i=Pp(e);kp(function(){var o=!1;try{o=Dp()}finally{if(Ka=!1,e=i-Pp(),!e0())return;o?n.run(1e3):e>0?n.run(e):n.start()}})}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var e=this,n=function(){return e.observer&&e.observer.observe(document.body,n0)};document.body?n():yn.addEventListener("DOMContentLoaded",n)},t.prototype.start=function(){var e=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),Np.forEach(function(n){return yn.addEventListener(n,e.listener,!0)}))},t.prototype.stop=function(){var e=this;this.stopped||(this.observer&&this.observer.disconnect(),Np.forEach(function(n){return yn.removeEventListener(n,e.listener,!0)}),this.stopped=!0)},t}(),ao=new i0,Ga=function(t){!so&&t>0&&ao.start(),so+=t,!so&&ao.stop()};var r0=function(t){return!Ni(t)&&!Op(t)&&getComputedStyle(t).display==="inline"},Rp=function(){function t(e,n){this.target=e,this.observedBox=n||bn.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var e=ro(this.target,this.observedBox,!0);return r0(this.target)&&(this.lastReportedSize=e),this.lastReportedSize.inlineSize!==e.inlineSize||this.lastReportedSize.blockSize!==e.blockSize},t}();var jp=function(){function t(e,n){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=e,this.callback=n}return t}();var lo=new WeakMap,Hp=function(t,e){for(var n=0;n=0&&(s&&Ye.splice(Ye.indexOf(i),1),i.observationTargets.splice(o,1),Ga(-1))},t.disconnect=function(e){var n=this,i=lo.get(e);i.observationTargets.slice().forEach(function(o){return n.unobserve(e,o.target)}),i.activeTargets.splice(0,i.activeTargets.length)},t}();var Xa=function(){function t(e){if(arguments.length===0)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if(typeof e!="function")throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");Pi.connect(this,e)}return t.prototype.observe=function(e,n){if(arguments.length===0)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!za(e))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");Pi.observe(this,e,n)},t.prototype.unobserve=function(e){if(arguments.length===0)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!za(e))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");Pi.unobserve(this,e)},t.prototype.disconnect=function(){Pi.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();"use strict";var d0=wt(),f0=Bp().left,h0=Fs(),Wp=Rr(),p0=zp(),m0=h0("reduce"),g0=!p0&&Wp>79&&Wp<83;d0({target:"Array",proto:!0,forced:!m0||g0},{reduce:function(e){return f0(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var v0=Pt(),b0=Rt().f,Qa=Function.prototype,y0=Qa.toString,E0=/^\s*function ([^ (]*)/,Vp="name";v0&&!(Vp in Qa)&&b0(Qa,Vp,{configurable:!0,get:function(){try{return y0.call(this).match(E0)[1]}catch(t){return""}}});var dj=Ae(nl());"use strict";var q0=rl(),$0=Ve(),B0=fn(),F0=an(),z0=ol(),dm=sl();q0("match",function(t,e,n){return[function(o){var s=F0(this),a=o==null?void 0:o[t];return a!==void 0?a.call(o,s):new RegExp(o)[t](String(s))},function(i){var o=n(e,this,i);if(o.done)return o.value;var s=$0(this),a=String(i);if(!s.global)return dm(s,a);var c=s.unicode;s.lastIndex=0;for(var u=[],d=0,l;(l=dm(s,a))!==null;){var m=String(l[0]);u[d]=m,m===""&&(s.lastIndex=z0(a,B0(s.lastIndex),c)),d++}return d===0?null:u}]});"use strict";var G0=rl(),X0=ge(),Q0=Ve(),J0=fn(),Z0=wi(),eC=an(),tC=ol(),nC=hm(),iC=sl(),rC=xe(),al=rC("replace"),oC=Math.max,sC=Math.min,aC=function(t){return t===void 0?t:String(t)},lC=function(){return"a".replace(/./,"$0")==="$0"}(),pm=function(){return/./[al]?/./[al]("a","$0")==="":!1}(),cC=!X0(function(){var t=/./;return t.exec=function(){var e=[];return e.groups={a:"7"},e},"".replace(t,"$
")!=="7"});G0("replace",function(t,e,n){var i=pm?"$":"$0";return[function(s,a){var c=eC(this),u=s==null?void 0:s[al];return u!==void 0?u.call(s,c,a):e.call(String(c),s,a)},function(o,s){if(typeof s=="string"&&s.indexOf(i)===-1&&s.indexOf("$<")===-1){var a=n(e,this,o,s);if(a.done)return a.value}var c=Q0(this),u=String(o),d=typeof s=="function";d||(s=String(s));var l=c.global;if(l){var m=c.unicode;c.lastIndex=0}for(var f=[];;){var p=iC(c,u);if(p===null||(f.push(p),!l))break;var v=String(p[0]);v===""&&(c.lastIndex=tC(u,J0(c.lastIndex),m))}for(var y="",h=0,b=0;b=h&&(y+=u.slice(h,A)+D,h=A+S.length)}return y+u.slice(h)}]},!cC||!lC||pm);var ho=function(e){var n=Array.prototype.reduce.call(e,function(i,o){var s=o.name.match(/data-simplebar-(.+)/);if(s){var a=s[1].replace(/\W+(.)/g,function(c,u){return u.toUpperCase()});switch(o.value){case"true":i[a]=!0;break;case"false":i[a]=!1;break;case void 0:i[a]=!0;break;default:i[a]=o.value}}return i},{});return n};function qt(t){return!t||!t.ownerDocument||!t.ownerDocument.defaultView?window:t.ownerDocument.defaultView}function po(t){return!t||!t.ownerDocument?document:t.ownerDocument}var Hn=null,gm=null;fo.default&&window.addEventListener("resize",function(){gm!==window.devicePixelRatio&&(gm=window.devicePixelRatio,Hn=null)});function vm(t){if(Hn===null){var e=po(t);if(typeof e=="undefined")return Hn=0,Hn;var n=e.body,i=e.createElement("div");i.classList.add("simplebar-hide-scrollbar"),n.appendChild(i);var o=i.getBoundingClientRect().right;n.removeChild(i),Hn=o}return Hn}var ce=function(){function t(n,i){var o=this;this.onScroll=function(){var s=qt(o.el);o.scrollXTicking||(s.requestAnimationFrame(o.scrollX),o.scrollXTicking=!0),o.scrollYTicking||(s.requestAnimationFrame(o.scrollY),o.scrollYTicking=!0)},this.scrollX=function(){o.axis.x.isOverflowing&&(o.showScrollbar("x"),o.positionScrollbar("x")),o.scrollXTicking=!1},this.scrollY=function(){o.axis.y.isOverflowing&&(o.showScrollbar("y"),o.positionScrollbar("y")),o.scrollYTicking=!1},this.onMouseEnter=function(){o.showScrollbar("x"),o.showScrollbar("y")},this.onMouseMove=function(s){o.mouseX=s.clientX,o.mouseY=s.clientY,(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseMoveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseMoveForAxis("y")},this.onMouseLeave=function(){o.onMouseMove.cancel(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&o.onMouseLeaveForAxis("x"),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&o.onMouseLeaveForAxis("y"),o.mouseX=-1,o.mouseY=-1},this.onWindowResize=function(){o.scrollbarWidth=o.getScrollbarWidth(),o.hideNativeScrollbar()},this.hideScrollbars=function(){o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.track.rect)||(o.axis.y.scrollbar.el.classList.remove(o.classNames.visible),o.axis.y.isVisible=!1),o.isWithinBounds(o.axis.x.track.rect)||(o.axis.x.scrollbar.el.classList.remove(o.classNames.visible),o.axis.x.isVisible=!1)},this.onPointerEvent=function(s){var a,c;o.axis.x.track.rect=o.axis.x.track.el.getBoundingClientRect(),o.axis.y.track.rect=o.axis.y.track.el.getBoundingClientRect(),(o.axis.x.isOverflowing||o.axis.x.forceVisible)&&(a=o.isWithinBounds(o.axis.x.track.rect)),(o.axis.y.isOverflowing||o.axis.y.forceVisible)&&(c=o.isWithinBounds(o.axis.y.track.rect)),(a||c)&&(s.preventDefault(),s.stopPropagation(),s.type==="mousedown"&&(a&&(o.axis.x.scrollbar.rect=o.axis.x.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.x.scrollbar.rect)?o.onDragStart(s,"x"):o.onTrackClick(s,"x")),c&&(o.axis.y.scrollbar.rect=o.axis.y.scrollbar.el.getBoundingClientRect(),o.isWithinBounds(o.axis.y.scrollbar.rect)?o.onDragStart(s,"y"):o.onTrackClick(s,"y"))))},this.drag=function(s){var a,c=o.axis[o.draggedAxis].track,u=c.rect[o.axis[o.draggedAxis].sizeAttr],d=o.axis[o.draggedAxis].scrollbar,l=o.contentWrapperEl[o.axis[o.draggedAxis].scrollSizeAttr],m=parseInt(o.elStyles[o.axis[o.draggedAxis].sizeAttr],10);s.preventDefault(),s.stopPropagation(),o.draggedAxis==="y"?a=s.pageY:a=s.pageX;var f=a-c.rect[o.axis[o.draggedAxis].offsetAttr]-o.axis[o.draggedAxis].dragOffset,p=f/(u-d.size),v=p*(l-m);o.draggedAxis==="x"&&(v=o.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?v-(u+d.size):v,v=o.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-v:v),o.contentWrapperEl[o.axis[o.draggedAxis].scrollOffsetAttr]=v},this.onEndDrag=function(s){var a=po(o.el),c=qt(o.el);s.preventDefault(),s.stopPropagation(),o.el.classList.remove(o.classNames.dragging),a.removeEventListener("mousemove",o.drag,!0),a.removeEventListener("mouseup",o.onEndDrag,!0),o.removePreventClickId=c.setTimeout(function(){a.removeEventListener("click",o.preventClick,!0),a.removeEventListener("dblclick",o.preventClick,!0),o.removePreventClickId=null})},this.preventClick=function(s){s.preventDefault(),s.stopPropagation()},this.el=n,this.minScrollbarWidth=20,this.options=Object.assign({},t.defaultOptions,{},i),this.classNames=Object.assign({},t.defaultOptions.classNames,{},this.options.classNames),this.axis={x:{scrollOffsetAttr:"scrollLeft",sizeAttr:"width",scrollSizeAttr:"scrollWidth",offsetSizeAttr:"offsetWidth",offsetAttr:"left",overflowAttr:"overflowX",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}},y:{scrollOffsetAttr:"scrollTop",sizeAttr:"height",scrollSizeAttr:"scrollHeight",offsetSizeAttr:"offsetHeight",offsetAttr:"top",overflowAttr:"overflowY",dragOffset:0,isOverflowing:!0,isVisible:!1,forceVisible:!1,track:{},scrollbar:{}}},this.removePreventClickId=null,!t.instances.has(this.el)&&(this.recalculate=(0,ll.default)(this.recalculate.bind(this),64),this.onMouseMove=(0,ll.default)(this.onMouseMove.bind(this),64),this.hideScrollbars=(0,cl.default)(this.hideScrollbars.bind(this),this.options.timeout),this.onWindowResize=(0,cl.default)(this.onWindowResize.bind(this),64,{leading:!0}),t.getRtlHelpers=(0,mm.default)(t.getRtlHelpers),this.init())}t.getRtlHelpers=function(){var i=document.createElement("div");i.innerHTML='
';var o=i.firstElementChild;document.body.appendChild(o);var s=o.firstElementChild;o.scrollLeft=0;var a=t.getOffset(o),c=t.getOffset(s);o.scrollLeft=999;var u=t.getOffset(s);return{isRtlScrollingInverted:a.left!==c.left&&c.left-u.left!=0,isRtlScrollbarInverted:a.left!==c.left}},t.getOffset=function(i){var o=i.getBoundingClientRect(),s=po(i),a=qt(i);return{top:o.top+(a.pageYOffset||s.documentElement.scrollTop),left:o.left+(a.pageXOffset||s.documentElement.scrollLeft)}};var e=t.prototype;return e.init=function(){t.instances.set(this.el,this),fo.default&&(this.initDOM(),this.scrollbarWidth=this.getScrollbarWidth(),this.recalculate(),this.initListeners())},e.initDOM=function(){var i=this;if(Array.prototype.filter.call(this.el.children,function(a){return a.classList.contains(i.classNames.wrapper)}).length)this.wrapperEl=this.el.querySelector("."+this.classNames.wrapper),this.contentWrapperEl=this.options.scrollableNode||this.el.querySelector("."+this.classNames.contentWrapper),this.contentEl=this.options.contentNode||this.el.querySelector("."+this.classNames.contentEl),this.offsetEl=this.el.querySelector("."+this.classNames.offset),this.maskEl=this.el.querySelector("."+this.classNames.mask),this.placeholderEl=this.findChild(this.wrapperEl,"."+this.classNames.placeholder),this.heightAutoObserverWrapperEl=this.el.querySelector("."+this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl=this.el.querySelector("."+this.classNames.heightAutoObserverEl),this.axis.x.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.horizontal),this.axis.y.track.el=this.findChild(this.el,"."+this.classNames.track+"."+this.classNames.vertical);else{for(this.wrapperEl=document.createElement("div"),this.contentWrapperEl=document.createElement("div"),this.offsetEl=document.createElement("div"),this.maskEl=document.createElement("div"),this.contentEl=document.createElement("div"),this.placeholderEl=document.createElement("div"),this.heightAutoObserverWrapperEl=document.createElement("div"),this.heightAutoObserverEl=document.createElement("div"),this.wrapperEl.classList.add(this.classNames.wrapper),this.contentWrapperEl.classList.add(this.classNames.contentWrapper),this.offsetEl.classList.add(this.classNames.offset),this.maskEl.classList.add(this.classNames.mask),this.contentEl.classList.add(this.classNames.contentEl),this.placeholderEl.classList.add(this.classNames.placeholder),this.heightAutoObserverWrapperEl.classList.add(this.classNames.heightAutoObserverWrapperEl),this.heightAutoObserverEl.classList.add(this.classNames.heightAutoObserverEl);this.el.firstChild;)this.contentEl.appendChild(this.el.firstChild);this.contentWrapperEl.appendChild(this.contentEl),this.offsetEl.appendChild(this.contentWrapperEl),this.maskEl.appendChild(this.offsetEl),this.heightAutoObserverWrapperEl.appendChild(this.heightAutoObserverEl),this.wrapperEl.appendChild(this.heightAutoObserverWrapperEl),this.wrapperEl.appendChild(this.maskEl),this.wrapperEl.appendChild(this.placeholderEl),this.el.appendChild(this.wrapperEl)}if(!this.axis.x.track.el||!this.axis.y.track.el){var o=document.createElement("div"),s=document.createElement("div");o.classList.add(this.classNames.track),s.classList.add(this.classNames.scrollbar),o.appendChild(s),this.axis.x.track.el=o.cloneNode(!0),this.axis.x.track.el.classList.add(this.classNames.horizontal),this.axis.y.track.el=o.cloneNode(!0),this.axis.y.track.el.classList.add(this.classNames.vertical),this.el.appendChild(this.axis.x.track.el),this.el.appendChild(this.axis.y.track.el)}this.axis.x.scrollbar.el=this.axis.x.track.el.querySelector("."+this.classNames.scrollbar),this.axis.y.scrollbar.el=this.axis.y.track.el.querySelector("."+this.classNames.scrollbar),this.options.autoHide||(this.axis.x.scrollbar.el.classList.add(this.classNames.visible),this.axis.y.scrollbar.el.classList.add(this.classNames.visible)),this.el.setAttribute("data-simplebar","init")},e.initListeners=function(){var i=this,o=qt(this.el);this.options.autoHide&&this.el.addEventListener("mouseenter",this.onMouseEnter),["mousedown","click","dblclick"].forEach(function(c){i.el.addEventListener(c,i.onPointerEvent,!0)}),["touchstart","touchend","touchmove"].forEach(function(c){i.el.addEventListener(c,i.onPointerEvent,{capture:!0,passive:!0})}),this.el.addEventListener("mousemove",this.onMouseMove),this.el.addEventListener("mouseleave",this.onMouseLeave),this.contentWrapperEl.addEventListener("scroll",this.onScroll),o.addEventListener("resize",this.onWindowResize);var s=!1,a=o.ResizeObserver||Xa;this.resizeObserver=new a(function(){!s||i.recalculate()}),this.resizeObserver.observe(this.el),this.resizeObserver.observe(this.contentEl),o.requestAnimationFrame(function(){s=!0}),this.mutationObserver=new o.MutationObserver(this.recalculate),this.mutationObserver.observe(this.contentEl,{childList:!0,subtree:!0,characterData:!0})},e.recalculate=function(){var i=qt(this.el);this.elStyles=i.getComputedStyle(this.el),this.isRtl=this.elStyles.direction==="rtl";var o=this.heightAutoObserverEl.offsetHeight<=1,s=this.heightAutoObserverEl.offsetWidth<=1,a=this.contentEl.offsetWidth,c=this.contentWrapperEl.offsetWidth,u=this.elStyles.overflowX,d=this.elStyles.overflowY;this.contentEl.style.padding=this.elStyles.paddingTop+" "+this.elStyles.paddingRight+" "+this.elStyles.paddingBottom+" "+this.elStyles.paddingLeft,this.wrapperEl.style.margin="-"+this.elStyles.paddingTop+" -"+this.elStyles.paddingRight+" -"+this.elStyles.paddingBottom+" -"+this.elStyles.paddingLeft;var l=this.contentEl.scrollHeight,m=this.contentEl.scrollWidth;this.contentWrapperEl.style.height=o?"auto":"100%",this.placeholderEl.style.width=s?a+"px":"auto",this.placeholderEl.style.height=l+"px";var f=this.contentWrapperEl.offsetHeight;this.axis.x.isOverflowing=m>a,this.axis.y.isOverflowing=l>f,this.axis.x.isOverflowing=u==="hidden"?!1:this.axis.x.isOverflowing,this.axis.y.isOverflowing=d==="hidden"?!1:this.axis.y.isOverflowing,this.axis.x.forceVisible=this.options.forceVisible==="x"||this.options.forceVisible===!0,this.axis.y.forceVisible=this.options.forceVisible==="y"||this.options.forceVisible===!0,this.hideNativeScrollbar();var p=this.axis.x.isOverflowing?this.scrollbarWidth:0,v=this.axis.y.isOverflowing?this.scrollbarWidth:0;this.axis.x.isOverflowing=this.axis.x.isOverflowing&&m>c-v,this.axis.y.isOverflowing=this.axis.y.isOverflowing&&l>f-p,this.axis.x.scrollbar.size=this.getScrollbarSize("x"),this.axis.y.scrollbar.size=this.getScrollbarSize("y"),this.axis.x.scrollbar.el.style.width=this.axis.x.scrollbar.size+"px",this.axis.y.scrollbar.el.style.height=this.axis.y.scrollbar.size+"px",this.positionScrollbar("x"),this.positionScrollbar("y"),this.toggleTrackVisibility("x"),this.toggleTrackVisibility("y")},e.getScrollbarSize=function(i){if(i===void 0&&(i="y"),!this.axis[i].isOverflowing)return 0;var o=this.contentEl[this.axis[i].scrollSizeAttr],s=this.axis[i].track.el[this.axis[i].offsetSizeAttr],a,c=s/o;return a=Math.max(~~(c*s),this.options.scrollbarMinSize),this.options.scrollbarMaxSize&&(a=Math.min(a,this.options.scrollbarMaxSize)),a},e.positionScrollbar=function(i){if(i===void 0&&(i="y"),!!this.axis[i].isOverflowing){var o=this.contentWrapperEl[this.axis[i].scrollSizeAttr],s=this.axis[i].track.el[this.axis[i].offsetSizeAttr],a=parseInt(this.elStyles[this.axis[i].sizeAttr],10),c=this.axis[i].scrollbar,u=this.contentWrapperEl[this.axis[i].scrollOffsetAttr];u=i==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollingInverted?-u:u;var d=u/(o-a),l=~~((s-c.size)*d);l=i==="x"&&this.isRtl&&t.getRtlHelpers().isRtlScrollbarInverted?l+(s-c.size):l,c.el.style.transform=i==="x"?"translate3d("+l+"px, 0, 0)":"translate3d(0, "+l+"px, 0)"}},e.toggleTrackVisibility=function(i){i===void 0&&(i="y");var o=this.axis[i].track.el,s=this.axis[i].scrollbar.el;this.axis[i].isOverflowing||this.axis[i].forceVisible?(o.style.visibility="visible",this.contentWrapperEl.style[this.axis[i].overflowAttr]="scroll"):(o.style.visibility="hidden",this.contentWrapperEl.style[this.axis[i].overflowAttr]="hidden"),this.axis[i].isOverflowing?s.style.display="block":s.style.display="none"},e.hideNativeScrollbar=function(){this.offsetEl.style[this.isRtl?"left":"right"]=this.axis.y.isOverflowing||this.axis.y.forceVisible?"-"+this.scrollbarWidth+"px":0,this.offsetEl.style.bottom=this.axis.x.isOverflowing||this.axis.x.forceVisible?"-"+this.scrollbarWidth+"px":0},e.onMouseMoveForAxis=function(i){i===void 0&&(i="y"),this.axis[i].track.rect=this.axis[i].track.el.getBoundingClientRect(),this.axis[i].scrollbar.rect=this.axis[i].scrollbar.el.getBoundingClientRect();var o=this.isWithinBounds(this.axis[i].scrollbar.rect);o?this.axis[i].scrollbar.el.classList.add(this.classNames.hover):this.axis[i].scrollbar.el.classList.remove(this.classNames.hover),this.isWithinBounds(this.axis[i].track.rect)?(this.showScrollbar(i),this.axis[i].track.el.classList.add(this.classNames.hover)):this.axis[i].track.el.classList.remove(this.classNames.hover)},e.onMouseLeaveForAxis=function(i){i===void 0&&(i="y"),this.axis[i].track.el.classList.remove(this.classNames.hover),this.axis[i].scrollbar.el.classList.remove(this.classNames.hover)},e.showScrollbar=function(i){i===void 0&&(i="y");var o=this.axis[i].scrollbar.el;this.axis[i].isVisible||(o.classList.add(this.classNames.visible),this.axis[i].isVisible=!0),this.options.autoHide&&this.hideScrollbars()},e.onDragStart=function(i,o){o===void 0&&(o="y");var s=po(this.el),a=qt(this.el),c=this.axis[o].scrollbar,u=o==="y"?i.pageY:i.pageX;this.axis[o].dragOffset=u-c.rect[this.axis[o].offsetAttr],this.draggedAxis=o,this.el.classList.add(this.classNames.dragging),s.addEventListener("mousemove",this.drag,!0),s.addEventListener("mouseup",this.onEndDrag,!0),this.removePreventClickId===null?(s.addEventListener("click",this.preventClick,!0),s.addEventListener("dblclick",this.preventClick,!0)):(a.clearTimeout(this.removePreventClickId),this.removePreventClickId=null)},e.onTrackClick=function(i,o){var s=this;if(o===void 0&&(o="y"),!!this.options.clickOnTrack){var a=qt(this.el);this.axis[o].scrollbar.rect=this.axis[o].scrollbar.el.getBoundingClientRect();var c=this.axis[o].scrollbar,u=c.rect[this.axis[o].offsetAttr],d=parseInt(this.elStyles[this.axis[o].sizeAttr],10),l=this.contentWrapperEl[this.axis[o].scrollOffsetAttr],m=o==="y"?this.mouseY-u:this.mouseX-u,f=m<0?-1:1,p=f===-1?l-d:l+d,v=function y(){if(f===-1){if(l>p){var h;l-=s.options.clickOnTrackSpeed,s.contentWrapperEl.scrollTo((h={},h[s.axis[o].offsetAttr]=l,h)),a.requestAnimationFrame(y)}}else if(l=i.left&&this.mouseX<=i.left+i.width&&this.mouseY>=i.top&&this.mouseY<=i.top+i.height},e.findChild=function(i,o){var s=i.matches||i.webkitMatchesSelector||i.mozMatchesSelector||i.msMatchesSelector;return Array.prototype.filter.call(i.children,function(a){return s.call(a,o)})[0]},t}();ce.defaultOptions={autoHide:!0,forceVisible:!1,clickOnTrack:!0,clickOnTrackSpeed:40,classNames:{contentEl:"simplebar-content",contentWrapper:"simplebar-content-wrapper",offset:"simplebar-offset",mask:"simplebar-mask",wrapper:"simplebar-wrapper",placeholder:"simplebar-placeholder",scrollbar:"simplebar-scrollbar",track:"simplebar-track",heightAutoObserverWrapperEl:"simplebar-height-auto-observer-wrapper",heightAutoObserverEl:"simplebar-height-auto-observer",visible:"simplebar-visible",horizontal:"simplebar-horizontal",vertical:"simplebar-vertical",hover:"simplebar-hover",dragging:"simplebar-dragging"},scrollbarMinSize:25,scrollbarMaxSize:0,timeout:1e3};ce.instances=new WeakMap;ce.initDOMLoadedElements=function(){document.removeEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.removeEventListener("load",this.initDOMLoadedElements),Array.prototype.forEach.call(document.querySelectorAll("[data-simplebar]"),function(t){t.getAttribute("data-simplebar")!=="init"&&!ce.instances.has(t)&&new ce(t,ho(t.attributes))})};ce.removeObserver=function(){this.globalObserver.disconnect()};ce.initHtmlApi=function(){this.initDOMLoadedElements=this.initDOMLoadedElements.bind(this),typeof MutationObserver!="undefined"&&(this.globalObserver=new MutationObserver(ce.handleMutations),this.globalObserver.observe(document,{childList:!0,subtree:!0})),document.readyState==="complete"||document.readyState!=="loading"&&!document.documentElement.doScroll?window.setTimeout(this.initDOMLoadedElements):(document.addEventListener("DOMContentLoaded",this.initDOMLoadedElements),window.addEventListener("load",this.initDOMLoadedElements))};ce.handleMutations=function(t){t.forEach(function(e){Array.prototype.forEach.call(e.addedNodes,function(n){n.nodeType===1&&(n.hasAttribute("data-simplebar")?!ce.instances.has(n)&&new ce(n,ho(n.attributes)):Array.prototype.forEach.call(n.querySelectorAll("[data-simplebar]"),function(i){i.getAttribute("data-simplebar")!=="init"&&!ce.instances.has(i)&&new ce(i,ho(i.attributes))}))}),Array.prototype.forEach.call(e.removedNodes,function(n){n.nodeType===1&&(n.hasAttribute('[data-simplebar="init"]')?ce.instances.has(n)&&ce.instances.get(n).unMount():Array.prototype.forEach.call(n.querySelectorAll('[data-simplebar="init"]'),function(i){ce.instances.has(i)&&ce.instances.get(i).unMount()}))})})};ce.getOptions=ho;fo.default&&ce.initHtmlApi();var ym=Ae(bm());function Em(t){return"error"in t&&"exception"in t}function qn(t){return"error"in t}function _m(t){return typeof t.next=="string"}function ae(t){let e=["","null","undefined"];return Array.isArray(t)?t.length>0:typeof t=="string"&&!e.includes(t)||typeof t=="number"?!0:typeof t=="boolean"}function Ri(t){return t.every(e=>typeof e!="undefined"&&e!==null)}function ji(t){for(let e of t.options)e.selected&&(e.selected=!1);t.value=""}function dl(t){return typeof t!==null&&typeof t!="undefined"}function gC(){let{csrftoken:t}=ym.default.parse(document.cookie);if(typeof t=="undefined")throw new Error("Invalid or missing CSRF token");return t}function Sm(t,e,n){return Pe(this,null,function*(){let i=gC(),o=new Headers({"X-CSRFToken":i}),s;typeof n!="undefined"&&(s=JSON.stringify(n),o.set("content-type","application/json"));let a=yield fetch(t,{method:e,body:s,headers:o,credentials:"same-origin"}),c=a.headers.get("Content-Type");if(typeof c=="string"&&c.includes("text"))return{error:yield a.text()};let u=yield a.json();return!a.ok&&Array.isArray(u)?{error:u.join(` +`)}:!a.ok&&"detail"in u?{error:u.detail}:u})}function go(t,e){return Pe(this,null,function*(){return yield Sm(t,"PATCH",e)})}function vC(t){return Pe(this,null,function*(){return yield Sm(t,"GET")})}function wm(t){return Pe(this,null,function*(){return yield vC(t)})}function*j(...t){for(let e of t)for(let n of document.querySelectorAll(e))n!==null&&(yield n)}function te(t){return document.getElementById(t)}function Tm(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 xm(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 De(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*Om(t){for(let e of t.querySelectorAll("td"))e!==null&&ae(e.innerText)&&e.innerText!=="\u2014"&&(yield e.innerText.replaceAll(/[\n\r]/g,"").trim())}function Me(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 fl(t,e,n,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)}o.classList.add(...n);for(let s of i)o.appendChild(s);return o}function Am(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 bC(t){t.preventDefault();let e=t.currentTarget;if(e!==null){let n=Me(e,"form"),i=e.getAttribute("href");n!==null&&ae(i)&&(n.setAttribute("action",i),n.submit())}}function Cm(){for(let t of j("a.formaction"))t.addEventListener("click",bC)}function yC(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]);Tm(i),t.preventDefault()}}function Lm(){for(let t of j("form")){let e=t.querySelectorAll("button[type=submit]");for(let n of e)n.addEventListener("click",i=>yC(i,t))}}function Dm(){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 Mm={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 hl(t,e){var n;for(let i of j(t)){let o=(n=i.parentElement)==null?void 0:n.parentElement;o!==null&&(e==="show"?De(o,"show"):De(o,"hide"))}}function Im(t){let e=t.options[t.selectedIndex].innerText.toLowerCase();for(let[n,i]of Object.entries(Mm))if(e.endsWith(n)){for(let o of i.hide)hl(`#${o}`,"hide");for(let o of i.show)hl(`#${o}`,"show");break}else for(let o of Mm.default.hide)hl(`#${o}`,"hide")}function km(){for(let t of j("#id_scope_type"))Im(t),t.addEventListener("change",()=>Im(t))}function at(t){var n,i;let e=(i=(n=t==null?void 0:t.parentElement)==null?void 0:n.parentElement)!=null?i:null;return e!==null&&e.classList.contains("row")?e:null}function EC(){let t=[te("id_tagged_vlans"),te("id_untagged_vlan"),te("id_vlan_group")];if(Ri(t)){let[e,n]=t;ji(n),ji(e);for(let i of t)De(at(i),"hide")}}function _C(){let t=[te("id_tagged_vlans"),te("id_untagged_vlan"),te("id_vlan_group")];if(Ri(t)){let[e,n,i]=t;ji(e),De(at(i),"show"),De(at(n),"show"),De(at(e),"hide")}}function SC(){let t=[te("id_tagged_vlans"),te("id_untagged_vlan"),te("id_vlan_group")];if(Ri(t)){let[e,n,i]=t;De(at(e),"show"),De(at(i),"show"),De(at(n),"show")}}function wC(){let t=[te("id_tagged_vlans"),te("id_untagged_vlan"),te("id_vlan_group")];if(Ri(t)){let[e,n,i]=t;ji(e),De(at(i),"show"),De(at(n),"show"),De(at(e),"hide")}}function Nm(t){switch(t.value){case"access":_C();break;case"tagged":SC();break;case"tagged-all":wC();break;case"":EC();break}}function Pm(){let t=te("id_mode");t!==null&&(t.addEventListener("change",()=>Nm(t)),Nm(t))}function Rm(){for(let t of[Cm,Lm,Dm,km,Pm])t()}var zm=Ae(Fm());window.Collapse=Le;window.Modal=Nt;window.Toast=St;window.Tooltip=tt;function TC(){for(let t of j(".masonry"))new zm.default(t,{itemSelector:".masonry-item",percentPosition:!0})}function xC(){for(let t of j('[data-bs-toggle="tooltip"]'))new tt(t,{container:"body"})}function OC(){for(let t of j('[data-bs-toggle="modal"]'))new Nt(t)}function $n(t,e,n,i){let o="mdi-alert";switch(t){case"warning":o="mdi-alert";break;case"success":o="mdi-check-circle";break;case"info":o="mdi-information";break;case"danger":o="mdi-alert";break}let s=document.createElement("div");s.setAttribute("class","toast-container position-fixed bottom-0 end-0 m-3");let a=document.createElement("div");a.setAttribute("class",`toast bg-${t}`),a.setAttribute("role","alert"),a.setAttribute("aria-live","assertive"),a.setAttribute("aria-atomic","true");let c=document.createElement("div");c.setAttribute("class",`toast-header bg-${t} text-body`);let u=document.createElement("i");u.setAttribute("class",`mdi ${o}`);let d=document.createElement("strong");d.setAttribute("class","me-auto ms-1"),d.innerText=e;let l=document.createElement("button");l.setAttribute("type","button"),l.setAttribute("class","btn-close"),l.setAttribute("data-bs-dismiss","toast"),l.setAttribute("aria-label","Close");let m=document.createElement("div");if(m.setAttribute("class","toast-body"),c.appendChild(u),c.appendChild(d),typeof i!="undefined"){let p=document.createElement("small");p.setAttribute("class","text-muted"),c.appendChild(p)}return c.appendChild(l),m.innerText=n.trim(),a.appendChild(c),a.appendChild(m),s.appendChild(a),document.body.appendChild(s),new St(a)}function AC(){let{hash:t}=location;if(t&&t.match(/^#tab_.+$/)){let e=t.replace("tab_","");for(let n of j(`ul.nav.nav-tabs .nav-link[data-bs-target="${e}"]`))new sn(n).show()}}function CC(){let t=document.querySelectorAll(".sidebar .accordion-item");function e(n){for(let i of t)i!==n?i.classList.remove("is-open"):i.classList.toggle("is-open")}for(let n of t)for(let i of n.querySelectorAll(".accordion-button"))i.addEventListener("click",()=>{e(n)})}function Wm(){for(let t of[xC,OC,TC,AC,CC])t()}var gl=Ae(ml());function DC(t,e){var c;let n=t.currentTarget,i=Me(n,"span.search-obj-selected"),o=Me(n,"input.search-obj-type"),s=n.getAttribute("data-search-value"),a="";i!==null&&o!==null&&(ae(s)&&a!==s?(a=s,i.innerHTML=(c=e.textContent)!=null?c:"Error",o.value=s):(a="",i.innerHTML="All Objects",o.value=""))}function MC(){for(let t of j(".search-obj-selector"))for(let e of t.querySelectorAll("li > button.dropdown-item"))e.addEventListener("click",n=>DC(n,e))}function IC(){var t;for(let e of j("input.interface-filter")){let o=function(s){let a=s.target,c=new RegExp(a.value.toLowerCase().trim());for(let u of i){let d=u.querySelector('input[type="checkbox"][name="pk"]');d!==null&&(d.checked=!1);let l=u.getAttribute("data-name");typeof l=="string"&&(c.test(l.toLowerCase().trim())?u.classList.contains("d-none")&&u.classList.remove("d-none"):u.classList.add("d-none"))}},n=Me(e,"table"),i=Array.from((t=n==null?void 0:n.querySelectorAll("tbody > tr"))!=null?t:[]).filter(s=>s!==null);e.addEventListener("keyup",(0,gl.default)(o,300))}}function kC(){var t;for(let e of j("input.object-filter")){let o=function(s){let a=s.target,c=new RegExp(a.value.toLowerCase().trim());for(let u of i){let d=u.querySelector('input[type="checkbox"][name="pk"]');d!==null&&(d.checked=!1);for(let l of Om(u))if(c.test(l.toLowerCase())){u.classList.remove("d-none");break}else u.classList.add("d-none")}},n=Me(e,"table"),i=Array.from((t=n==null?void 0:n.querySelectorAll("tbody > tr"))!=null?t:[]).filter(s=>s!==null);e.addEventListener("keyup",(0,gl.default)(o,300))}}function Ym(){for(let t of[MC,kC,IC])t()}var bl=Ae(dg()),bg=Ae(ml());function fg(t,e,n){return Math.min(Math.max(t,n),e)}var Bn=class extends Error{constructor(e){super(`Failed to parse color: "${e}"`)}};function zC(t){if(typeof t!="string")throw new Bn(t);if(t.trim().toLowerCase()==="transparent")return[0,0,0,0];let e=t.trim();e=GC.test(t)?function(a){let c=a.toLowerCase().trim(),u=WC[function(d){let l=5381,m=d.length;for(;m;)l=33*l^d.charCodeAt(--m);return(l>>>0)%2341}(c)];if(!u)throw new Bn(a);return`#${u}`}(t):t;let n=VC.exec(e);if(n){let a=Array.from(n).slice(1);return[...a.slice(0,3).map(c=>parseInt(Hi(c,2),16)),parseInt(Hi(a[3]||"f",2),16)/255]}let i=YC.exec(e);if(i){let a=Array.from(i).slice(1);return[...a.slice(0,3).map(c=>parseInt(c,16)),parseInt(a[3]||"ff",16)/255]}let o=UC.exec(e);if(o){let a=Array.from(o).slice(1);return[...a.slice(0,3).map(c=>parseInt(c,10)),parseFloat(a[3]||"1")]}let s=KC.exec(e);if(s){let[a,c,u,d]=Array.from(s).slice(1).map(parseFloat);if(fg(0,100,c)!==c)throw new Bn(t);if(fg(0,100,u)!==u)throw new Bn(t);return[...XC(a,c,u),d||1]}throw new Bn(t)}var hg=t=>parseInt(t.replace(/_/g,""),36),WC="1q29ehhb 1n09sgk7 1kl1ekf_ _yl4zsno 16z9eiv3 1p29lhp8 _bd9zg04 17u0____ _iw9zhe5 _to73___ _r45e31e _7l6g016 _jh8ouiv _zn3qba8 1jy4zshs 11u87k0u 1ro9yvyo 1aj3xael 1gz9zjz0 _3w8l4xo 1bf1ekf_ _ke3v___ _4rrkb__ 13j776yz _646mbhl _nrjr4__ _le6mbhl 1n37ehkb _m75f91n _qj3bzfz 1939yygw 11i5z6x8 _1k5f8xs 1509441m 15t5lwgf _ae2th1n _tg1ugcv 1lp1ugcv 16e14up_ _h55rw7n _ny9yavn _7a11xb_ 1ih442g9 _pv442g9 1mv16xof 14e6y7tu 1oo9zkds 17d1cisi _4v9y70f _y98m8kc 1019pq0v 12o9zda8 _348j4f4 1et50i2o _8epa8__ _ts6senj 1o350i2o 1mi9eiuo 1259yrp0 1ln80gnw _632xcoy 1cn9zldc _f29edu4 1n490c8q _9f9ziet 1b94vk74 _m49zkct 1kz6s73a 1eu9dtog _q58s1rz 1dy9sjiq __u89jo3 _aj5nkwg _ld89jo3 13h9z6wx _qa9z2ii _l119xgq _bs5arju 1hj4nwk9 1qt4nwk9 1ge6wau6 14j9zlcw 11p1edc_ _ms1zcxe _439shk6 _jt9y70f _754zsow 1la40eju _oq5p___ _x279qkz 1fa5r3rv _yd2d9ip _424tcku _8y1di2_ _zi2uabw _yy7rn9h 12yz980_ __39ljp6 1b59zg0x _n39zfzp 1fy9zest _b33k___ _hp9wq92 1il50hz4 _io472ub _lj9z3eo 19z9ykg0 _8t8iu3a 12b9bl4a 1ak5yw0o _896v4ku _tb8k8lv _s59zi6t _c09ze0p 1lg80oqn 1id9z8wb _238nba5 1kq6wgdi _154zssg _tn3zk49 _da9y6tc 1sg7cv4f _r12jvtt 1gq5fmkz 1cs9rvci _lp9jn1c _xw1tdnb 13f9zje6 16f6973h _vo7ir40 _bt5arjf _rc45e4t _hr4e100 10v4e100 _hc9zke2 _w91egv_ _sj2r1kk 13c87yx8 _vqpds__ _ni8ggk8 _tj9yqfb 1ia2j4r4 _7x9b10u 1fc9ld4j 1eq9zldr _5j9lhpx _ez9zl6o _md61fzm".split(" ").reduce((t,e)=>{let n=hg(e.substring(0,3)),i=hg(e.substring(3)).toString(16),o="";for(let s=0;s<6-i.length;s++)o+="0";return t[n]=`${o}${i}`,t},{}),Hi=(t,e)=>Array.from(Array(e)).map(()=>t).join(""),VC=new RegExp(`^#${Hi("([a-f0-9])",3)}([a-f0-9])?$`,"i"),YC=new RegExp(`^#${Hi("([a-f0-9]{2})",3)}([a-f0-9]{2})?$`,"i"),UC=new RegExp(`^rgba?\\(\\s*(\\d+)\\s*${Hi(",\\s*(\\d+)\\s*",2)}(?:,\\s*([\\d.]+))?\\s*\\)$`,"i"),KC=/^hsla?\(\s*([\d.]+)\s*,\s*([\d.]+)%\s*,\s*([\d.]+)%(?:\s*,\s*([\d.]+))?\s*\)$/i,GC=/^[a-z]+$/i,pg=t=>Math.round(255*t),XC=(t,e,n)=>{let i=n/100;if(e===0)return[i,i,i].map(pg);let o=(t%360+360)%360/60,s=(1-Math.abs(2*i-1))*(e/100),a=s*(1-Math.abs(o%2-1)),c=0,u=0,d=0;o>=0&&o<1?(c=s,u=a):o>=1&&o<2?(c=a,u=s):o>=2&&o<3?(u=s,d=a):o>=3&&o<4?(u=a,d=s):o>=4&&o<5?(c=a,d=s):o>=5&&o<6&&(c=s,d=a);let l=i-s/2;return[c+l,u+l,d+l].map(pg)};function QC(t){if(t==="transparent")return 0;function e(s){let a=s/255;return a<=.03928?a/12.92:Math.pow((a+.055)/1.055,2.4)}let[n,i,o]=zC(t);return .2126*e(n)+.7152*e(i)+.0722*e(o)}function JC(t){return QC(t)>.179}function qi(t){return JC(t)?"#000":"#fff"}var xo={};(function(t,e){typeof xo=="object"&&typeof module=="object"?module.exports=e():typeof define=="function"&&define.amd?define([],e):typeof xo=="object"?xo.SlimSelect=e():t.SlimSelect=e()})(window,function(){return n={},t.m=e=[function(i,o,s){"use strict";function a(u,d){d=d||{bubbles:!1,cancelable:!1,detail:void 0};var l=document.createEvent("CustomEvent");return l.initCustomEvent(u,d.bubbles,d.cancelable,d.detail),l}var c;o.__esModule=!0,o.hasClassInTree=function(u,d){function l(m,f){return f&&m&&m.classList&&m.classList.contains(f)?m:null}return l(u,d)||function m(f,p){return f&&f!==document?l(f,p)?f:m(f.parentNode,p):null}(u,d)},o.ensureElementInView=function(u,d){var l=u.scrollTop+u.offsetTop,m=l+u.clientHeight,f=d.offsetTop,p=f+d.clientHeight;f=window.innerHeight?"above":l?d:"below"},o.debounce=function(u,d,l){var m;return d===void 0&&(d=100),l===void 0&&(l=!1),function(){for(var f=[],p=0;p[^<>]*'+y+"")},o.kebabCase=function(u){var d=u.replace(/[A-Z\u00C0-\u00D6\u00D8-\u00DE]/g,function(l){return"-"+l.toLowerCase()});return u[0]===u[0].toUpperCase()?d.substring(1):d},typeof(c=window).CustomEvent!="function"&&(a.prototype=c.Event.prototype,c.CustomEvent=a)},function(i,o,s){"use strict";o.__esModule=!0;var a=(c.prototype.newOption=function(d){return{id:d.id?d.id:String(Math.floor(1e8*Math.random())),value:d.value?d.value:"",text:d.text?d.text:"",innerHTML:d.innerHTML?d.innerHTML:"",selected:!!d.selected&&d.selected,display:d.display===void 0||d.display,disabled:!!d.disabled&&d.disabled,placeholder:!!d.placeholder&&d.placeholder,class:d.class?d.class:void 0,data:d.data?d.data:{},mandatory:!!d.mandatory&&d.mandatory}},c.prototype.add=function(d){this.data.push({id:String(Math.floor(1e8*Math.random())),value:d.value,text:d.text,innerHTML:"",selected:!1,display:!0,disabled:!1,placeholder:!1,class:void 0,mandatory:d.mandatory,data:{}})},c.prototype.parseSelectData=function(){this.data=[];for(var d=0,l=this.main.select.element.childNodes;d',placeholder:this.placeholder,searchPlaceholder:"Filter",onChange:()=>this.handleSlimChange()}),this.getFilteredBy(),this.getPathKeys();for(let o of this.filterParams.keys())this.updateQueryParams(o);for(let[o,s]of this.filterParams.entries())ae(s)&&this.queryParams.set(o,s);for(let o of this.pathValues.keys())this.updatePathValues(o);this.queryParams.set("brief",[!0]),this.updateQueryUrl(),this.resetClasses(),this.setSlimStyles(),this.initResetButton(),this.initRefreshButton(),this.addEventListeners();let n=this.base.getAttribute("data-fetch-trigger"),i=this.base.closest(".content-container .collapse");switch(vg(n)?this.trigger=n:i!==null?this.trigger="collapse":this.trigger="load",this.trigger){case"collapse":i!==null&&(i.addEventListener("show.bs.collapse",()=>this.loadData()),i.addEventListener("hide.bs.collapse",()=>this.resetOptions()));break;case"open":this.slim.beforeOpen=()=>this.loadData();break;case"load":Promise.all([this.loadData()]);break}}get options(){return this._options}set options(e){let n=e;this.preSorted||(n=e.sort((a,c)=>a.text.toLowerCase()>c.text.toLowerCase()?1:-1));let i=Am(n,"value"),o=typeof i.find(a=>a.value==="")!="undefined",s=i.findIndex(a=>a.value==="");o&&s<0&&(i.splice(s),i=[$i,...i]),o||(i=[$i,...i]),this._options=i,this.slim.setData(i)}resetOptions(){this.options=[$i]}disable(){this.slim.slim.singleSelected!==null?this.slim.slim.singleSelected.container.hasAttribute("disabled")||this.slim.slim.singleSelected.container.setAttribute("disabled",""):this.slim.slim.multiSelected!==null&&(this.slim.slim.multiSelected.container.hasAttribute("disabled")||this.slim.slim.multiSelected.container.setAttribute("disabled",""))}enable(){this.slim.slim.singleSelected!==null?this.slim.slim.singleSelected.container.hasAttribute("disabled")&&this.slim.slim.singleSelected.container.removeAttribute("disabled"):this.slim.slim.multiSelected!==null&&this.slim.slim.multiSelected.container.hasAttribute("disabled")&&this.slim.slim.multiSelected.container.removeAttribute("disabled")}addEventListeners(){let e=(0,bg.default)(i=>this.handleSearch(i),300,!1);this.slim.slim.search.input.addEventListener("keyup",i=>e(i)),this.slim.slim.search.input.addEventListener("paste",i=>e(i)),this.slim.slim.list.addEventListener("scroll",()=>this.handleScroll()),this.base.addEventListener(`netbox.select.atbottom.${this.name}`,()=>this.fetchOptions(this.more,"merge"));let n=new Set([...this.filterParams.keys(),...this.pathValues.keys()]);for(let i of n){let o=document.querySelector(`[name="${i}"]`);o!==null&&o.addEventListener("change",s=>this.handleEvent(s)),this.base.addEventListener(`netbox.select.onload.${i}`,s=>this.handleEvent(s))}}loadData(){return Pe(this,null,function*(){try{this.disable(),yield this.getOptions("replace")}catch(e){console.error(e)}finally{this.setOptionStyles(),this.enable(),this.base.dispatchEvent(this.loadEvent)}})}processOptions(e,n="merge"){return Pe(this,null,function*(){let i=Array.from(this.base.options).filter(s=>s.selected).map(s=>s.getAttribute("value")).filter(ae),o=[];for(let s of e.results){let a=s.display;typeof s._depth=="number"&&(this.preSorted||(this.preSorted=!0),a=`${"\u2500".repeat(s._depth)} ${a}`);let c={},u=s.id.toString(),d,l,m;for(let[p,v]of Object.entries(s)){if(!["id","slug"].includes(p)&&["string","number","boolean"].includes(typeof v)){let y=p.replaceAll("_","-");c[y]=String(v)}this.disabledAttributes.some(y=>y.toLowerCase()===p.toLowerCase())&&(typeof v=="string"&&v.toLowerCase()!=="false"||typeof v=="boolean"&&v===!0||typeof v=="number"&&v>0)&&(m=!0)}i.some(p=>this.disabledOptions.includes(p))&&(m=!0),i.includes(u)&&(l=!0,m=!1);let f={value:u,text:a,data:c,style:d,selected:l,disabled:m};o=[...o,f]}switch(n){case"merge":this.options=[...this.options,...o];break;case"replace":this.options=o}_m(e)?this.more=e.next:this.more=null})}fetchOptions(e,n="merge"){return Pe(this,null,function*(){if(typeof e=="string"){let i=yield wm(e);if(qn(i))return Em(i)?this.handleError(i.exception,i.error):this.handleError(`Error Fetching Options for field '${this.name}'`,i.error);yield this.processOptions(i,n)}})}getOptions(e="merge"){return Pe(this,null,function*(){if(this.queryUrl.includes("{{")){this.options=[$i];return}yield this.fetchOptions(this.queryUrl,e)})}handleSearch(e){return Pe(this,null,function*(){let{value:n}=e.target,i=bl.default.stringifyUrl({url:this.queryUrl,query:{q:n}});yield this.fetchOptions(i,"merge"),this.slim.data.search(n),this.slim.render()})}handleScroll(){let e=this.slim.slim.list.scrollTop+this.slim.slim.list.offsetHeight===this.slim.slim.list.scrollHeight;this.atBottom&&!e?(this.atBottom=!1,this.base.dispatchEvent(this.bottomEvent)):!this.atBottom&&e&&(this.atBottom=!0,this.base.dispatchEvent(this.bottomEvent))}handleEvent(e){let n=e.target;this.updateQueryParams(n.name),this.updatePathValues(n.name),this.updateQueryUrl(),Promise.all([this.loadData()])}handleError(e,n){$n("danger",e,n).show(),this.resetOptions()}handleSlimChange(){let e=this.slim.slim;e&&(e.container.classList.contains("is-invalid")||this.base.classList.contains("is-invalid"))&&(e.container.classList.remove("is-invalid"),this.base.classList.remove("is-invalid")),this.base.dispatchEvent(this.loadEvent)}updateQueryUrl(){let e={};for(let[o,s]of this.queryParams.entries())e[o]=s;let n=this.url;for(let[o,s]of this.pathValues.entries())for(let a of this.url.matchAll(new RegExp(`({{${o}}})`,"g")))ae(s)&&(n=n.replaceAll(a[1],s.toString()));let i=bl.default.stringifyUrl({url:n,query:e});this.queryUrl!==i&&(this.queryUrl=i,this.base.setAttribute("data-url",i))}updateQueryParams(e){let n=e.replaceAll(/^id_/gi,""),i=te(`id_${n}`);if(i!==null){for(let[s,a]of ZC)if(n.match(s)){n=n.replaceAll(s,a);break}n.substring(n.length-3)!=="_id"&&(n=`${n}_id`);let o=[];i.multiple?o=Array.from(i.options).filter(s=>s.selected).map(s=>s.value):i.value!==""&&(o=[i.value]),o.length>0?this.filterParams.has(e)&&this.queryParams.set(n,o):this.queryParams.delete(n)}}updatePathValues(e){let n=e.replaceAll(/^id_/gi,""),i=te(`id_${n}`);i!==null&&this.url.includes("{{")&&Boolean(this.url.match(new RegExp(`({{(${e})}})`,"g")))&&(ae(i.value)?this.pathValues.set(e,i.value):this.pathValues.set(e,""))}getPlaceholder(){let e=this.name;if(this.base.id){let n=document.querySelector(`label[for=${this.base.id}]`);n!==null&&(e=`Select ${n.innerText.trim()}`)}return e}getDisabledOptions(){var n;let e=[];if(gg(this.base))try{let i=JSON.parse((n=this.base.getAttribute("data-query-param-exclude"))!=null?n:"[]");e=[...e,...i]}catch(i){console.group(`Unable to parse data-query-param-exclude value on select element '${this.name}'`),console.warn(i),console.groupEnd()}return e}getDisabledAttributes(){let e=[...yg],n=this.base.getAttribute("disabled-indicator");return ae(n)&&(e=[...e,n]),e}getPathKeys(){for(let e of this.url.matchAll(new RegExp("{{(.+)}}","g")))this.pathValues.set(e[1],"")}getFilteredBy(){let e=new RegExp(/\[|\]|"|\$/g),n=new RegExp(/data-query-param-/g),i=Object.values(this.base.attributes).map(s=>s.name).filter(s=>s.includes("data")),o=(s,a)=>{let c=this.filterParams.get(s);if(typeof c!="undefined"){let u=Array.from(new Set([...c,a]));this.filterParams.set(s,u)}else a===""?this.filterParams.set(s,[]):this.filterParams.set(s,[a])};for(let s of i)if(s.match(n)&&s!=="data-query-param-exclude"){let a=this.base.getAttribute(s);if(a!==null)try{let c=JSON.parse(a);if(Array.isArray(c))for(let u of c)u.match(/^\$.+$/g)?o(u.replaceAll(e,""),""):o(s.replaceAll(n,""),u);else c.match(/^\$.+$/g)?o(c.replaceAll(e,""),""):o(s.replaceAll(n,""),c)}catch(c){console.warn(c),a.match(/^\$.+$/g)?o(a.replaceAll(e,""),""):o(s.replaceAll(n,""),a)}}}setSlimStyles(){let{width:e,height:n}=this.slim.slim.container.getBoundingClientRect();this.base.style.opacity="0",this.base.style.width=`${e}px`,this.base.style.height=`${n}px`,this.base.style.display="block",this.base.style.position="absolute",this.base.style.pointerEvents="none"}setOptionStyles(){for(let e of this.options)if("data"in e&&"id"in e&&typeof e.data!="undefined"&&typeof e.id!="undefined"&&"color"in e.data){let n=e.id,i=e.data,o=document.createElement("style"),s=`#${i.color}`,a=qi(s);o.setAttribute("data-netbox",n),o.innerHTML=` div.ss-values div.ss-value[data-id="${n}"], div.ss-list div.ss-option:not(.ss-disabled)[data-id="${n}"] { @@ -14,7 +14,7 @@ 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=De(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=fl("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[fl("i",null,["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),e.type="button",this.slim.slim.search.container.appendChild(e)}}};function Eg(){for(let t of j(".netbox-api-select"))new yg(t)}function _g(t){return typeof t.value=="string"&&t.value!==""}function Sg(t,e){if(t.slim.singleSelected!==null)if(_g(e)){let n=`#${e.value}`,i=qi(n);t.slim.singleSelected.container.style.backgroundColor=n,t.slim.singleSelected.container.style.color=i}else t.slim.singleSelected.container.removeAttribute("style")}function wg(){for(let t of j("select.netbox-color-select")){for(let n of t.options)if(_g(n)){let i=`#${n.value}`,o=qi(i);n.style.backgroundColor=i,n.style.color=o}let e=new Fn({select:t,allowDeselect:!0,deselectLabel:''});for(let n of e.data.data)if("selected"in n&&n.selected){Sg(e,n);break}for(let n of t.classList)e.slim.container.classList.remove(n);e.onChange=n=>Sg(e,n)}}function Tg(){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 Fn({select:t,allowDeselect:!0,deselectLabel:'',placeholder:n});for(let o of t.classList)i.slim.container.classList.remove(o)}}function xg(){for(let t of[Eg,wg,Tg])t()}function eC(t){let e=t.getAttribute("data"),n=t.classList.contains("connected"),i=n?"planned":"connected";ae(e)&&go(`/api/dcim/cables/${e}/`,{status:i}).then(o=>{var s;if(qn(o)){$n("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 Og(){for(let t of j("button.cable-toggle"))t.addEventListener("click",()=>eC(t))}var Ag=class{set(e,n,i){return e[n]=i,!0}get(e,n){return e[n]}has(e,n){return n in e}},Oo=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 Ag,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 Ao(t,e={}){return new Oo(t,e)}var yl=Ao({hidden:!1},{persist:!0,key:"netbox-object-depth"});var El=Ao({hidden:!1},{persist:!0});function Lg(t,e){e.setAttribute("data-depth-indicators",t?"hidden":"shown"),e.innerText=t?"Show Depth Indicators":"Hide Depth Indicators"}function Cg(){for(let t of j(".record-depth"))t.style.display=""}function Dg(){for(let t of j(".record-depth"))t.style.display="none"}function tC(t,e){let n=t.get("hidden");t.set("hidden",!n);let i=t.get("hidden");i?Dg():Cg(),Lg(i,e)}function Mg(){let t=yl.get("hidden");for(let e of j("button.toggle-depth"))Lg(t,e),e.addEventListener("click",n=>{tC(yl,n.currentTarget)},!1);t?Dg():t||Cg()}function nC(t){let e=Array.from(t.options);for(let n=1;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 Ig(){for(let t of j("#move-option-up")){let e=t.getAttribute("data-target");if(e!==null)for(let n of j(`#${e}`))t.addEventListener("click",()=>nC(n))}for(let t of j("#move-option-down")){let e=t.getAttribute("data-target");if(e!==null)for(let n of j(`#${e}`))t.addEventListener("click",()=>iC(n))}}function rC(t){let e=t.currentTarget;e.form!==null&&e.form.submit()}function kg(){for(let t of j("select.per-page"))t.addEventListener("change",rC)}var zn="netbox-color-mode",oC="Light Mode",sC="Dark Mode",Ng="mdi-lightbulb-on",Pg="mdi-lightbulb";function aC(t){return t==="dark"||t==="light"}function lC(t){return localStorage.setItem(zn,t)}function cC(t){var e,n;document.documentElement.setAttribute(`data-${zn}`,t);for(let i of j("span.color-mode-text"))t==="light"?i.innerText=sC:t==="dark"&&(i.innerText=oC);for(let i of j("i.color-mode-icon","span.color-mode-icon"))t==="light"?(i.classList.remove(Ng),i.classList.add(Pg)):t==="dark"&&(i.classList.remove(Pg),i.classList.add(Ng));for(let i of j(".rack_elevation")){let o=(n=(e=i.contentDocument)==null?void 0:e.querySelector("svg"))!=null?n:null;o!==null&&o.setAttribute(`data-${zn}`,t)}}function Ge(t){for(let e of[lC,cC])e(t)}function uC(){let t=localStorage.getItem(zn);t==="light"?Ge("dark"):t==="dark"?Ge("light"):console.warn("Unable to determine the current color mode")}function dC(){let t=localStorage.getItem(zn),e=document.documentElement.getAttribute(`data-${zn}`);if(ae(e)&&ae(t))return Ge(t);let n="none";for(let i of["dark","light"])if(window.matchMedia(`(prefers-color-scheme: ${i})`).matches){n=i;break}if(ae(t)&&!ae(e)&&aC(t))return Ge(t);switch(n){case"dark":return Ge("dark");case"light":return Ge("light");case"none":return Ge("light");default:return Ge("light")}}function fC(){for(let t of j("button.color-mode-toggle"))t.addEventListener("click",uC)}function Rg(){window.addEventListener("load",dC);for(let t of[fC])t()}function hC(t){let e=t.currentTarget,n=new FormData(e);n.get("ui.colormode")==="dark"?Ge("dark"):n.get("ui.colormode")==="light"&&Ge("light")}function jg(){let t=te("preferences-update");t!==null&&t.addEventListener("submit",hC)}function Hg(t,e){return t.replace(/[^\-.\w\s]/g,"").replace(/^[\s.]+|[\s.]+$/g,"").replace(/[-.\s]+/g,"-").toLowerCase().substring(0,e)}function qg(){let t=document.getElementById("id_slug"),e=document.getElementById("reslug");if(t===null||e===null)return;let n=t.getAttribute("slug-source"),i=document.getElementById(`id_${n}`);if(i===null){console.error("Unable to find field for slug field.");return}let o=t.getAttribute("maxlength"),s=50;o&&(s=Number(o)),i.addEventListener("blur",()=>{t.value=Hg(i.value,s)}),e.addEventListener("click",()=>{t.value=Hg(i.value,s)})}function pC(t){if(!t.currentTarget.checked)for(let n of j('input[type="checkbox"].toggle',"input#select-all"))n.checked=!1}function mC(t){let e=t.currentTarget,n=De(e,"table"),i=document.getElementById("select-all-box"),o=document.getElementById("select-all");if(n!==null){for(let s of n.querySelectorAll('input[type="checkbox"][name="pk"]'))e.checked?s.checked=!0:s.checked=!1;i!==null&&(e.checked?i.classList.remove("d-none"):(i.classList.add("d-none"),o!==null&&(o.checked=!1)))}}function gC(t){let e=t.currentTarget,n=te("select-all-box");if(n!==null)for(let i of n.querySelectorAll('button[type="submit"]'))e.checked?i.disabled=!1:i.disabled=!0}function $g(){for(let e of j('table tr th > input[type="checkbox"].toggle'))e.addEventListener("change",mC);for(let e of j('input[type="checkbox"][name="pk"]'))e.addEventListener("change",pC);let t=te("select-all");t!==null&&t.addEventListener("change",gC)}function Bg(){for(let t of[Mg,Og,qg,$g,jg,kg,Ig])t()}function Fg(){let t=document.querySelectorAll("body > div#django-messages > div.django-message.toast");for(let e of t)e!==null&&new St(e).show()}var Wg=Ae(zg());function Vg(){for(let t of j("a.copy-token","button.copy-secret"))new Wg.default(t)}var Lo=Ae(Yg());function Ug(){(0,Lo.default)(".date-picker",{allowInput:!0}),(0,Lo.default)(".datetime-picker",{allowInput:!0,enableSeconds:!0,enableTime:!0,time_24hr:!0}),(0,Lo.default)(".time-picker",{allowInput:!0,enableSeconds:!0,enableTime:!0,noCalendar:!0,time_24hr:!0})}function vC(){for(let t of j('select[name="columns"] option'))t.selected=!0}function bC(){for(let t of j('select[name="columns"]'))t.value=""}function yC(t){for(let e of j("#id_available_columns > option"))if(e.selected){for(let n of j("#id_columns"))n.appendChild(e.cloneNode(!0));e.remove()}t.preventDefault()}function EC(t){for(let e of j("#id_columns > option"))if(e.selected){for(let n of j("#id_available_columns"))n.appendChild(e.cloneNode(!0));e.remove()}t.preventDefault()}function _C(t){return Ne(this,null,function*(){return yield go("/api/users/config/",t)})}function SC(t){var a,c;t.preventDefault();let e=t.currentTarget,n=xm(e),i=Object.assign({},...n.map(u=>({[u.name]:u.options}))),s=((c=(a=e.getAttribute("data-config-root"))==null?void 0:a.split("."))!=null?c:[]).reduceRight((u,d)=>({[d]:u}),i);_C(s).then(u=>{qn(u)?$n("danger","Error Updating Table Configuration",u.error).show():location.reload()})}function Kg(){for(let t of j("#save_tableconfig"))t.addEventListener("click",vC);for(let t of j("#reset_tableconfig"))t.addEventListener("click",bC);for(let t of j("#add_columns"))t.addEventListener("click",yC);for(let t of j("#remove_columns"))t.addEventListener("click",EC);for(let t of j("form.userconfigform"))t.addEventListener("submit",SC)}function Gg(t){return typeof t=="string"&&["show","hide"].includes(t)}var Co=class extends Error{constructor(e,n){super(e);G(this,"table");this.table=n}},Tl=class{constructor(e,n){G(this,"button");G(this,"enabledRows");G(this,"disabledRows");this.button=e,this.enabledRows=n.querySelectorAll('tr[data-enabled="enabled"]'),this.disabledRows=n.querySelectorAll('tr[data-enabled="disabled"]')}get directive(){if(this.button.classList.contains("toggle-disabled"))return"disabled";if(this.button.classList.contains("toggle-enabled"))return"enabled";throw console.warn(this.button),new Error("Toggle button does not contain expected class")}toggleEnabledRows(){for(let e of this.enabledRows)e.classList.toggle("d-none")}toggleDisabledRows(){for(let e of this.disabledRows)e.classList.toggle("d-none")}set buttonState(e){Gg(e)&&this.button.setAttribute("data-state",e)}get buttonState(){let e=this.button.getAttribute("data-state");return Gg(e)?e:null}toggleButton(){this.buttonState==="show"?this.button.innerText=this.button.innerText.replaceAll("Show","Hide"):this.buttonState==="hide"&&(this.button.innerText=this.button.innerText.replaceAll("Hide","Show"))}toggleRows(){this.directive==="enabled"?this.toggleEnabledRows():this.directive==="disabled"&&this.toggleDisabledRows()}toggleState(){this.buttonState==="show"?this.buttonState="hide":this.buttonState==="hide"&&(this.buttonState="show")}toggle(){this.toggleState(),this.toggleButton(),this.toggleRows()}handleClick(e){e.currentTarget.isEqualNode(this.button)&&this.toggle()}},Xg=class{constructor(e){G(this,"table");G(this,"enabledButton");G(this,"disabledButton");G(this,"caption",null);this.table=e;try{let n=De(this.table,"button.toggle-enabled"),i=De(this.table,"button.toggle-disabled"),o=this.table.querySelector("caption");if(this.caption=o,n===null)throw new Co("Table is missing a 'toggle-enabled' button.",e);if(i===null)throw new Co("Table is missing a 'toggle-disabled' button.",e);n.addEventListener("click",s=>this.handleClick(s,this)),i.addEventListener("click",s=>this.handleClick(s,this)),this.enabledButton=new Tl(n,this.table),this.disabledButton=new Tl(i,this.table)}catch(n){if(n instanceof Co){console.debug("Table does not contain enable/disable toggle buttons");return}else throw n}}get captionText(){return this.caption!==null?this.caption.innerText:""}set captionText(e){this.caption!==null&&(this.caption.innerText=e)}toggleCaption(){let e=this.enabledButton.buttonState==="show",n=this.disabledButton.buttonState==="show";e&&!n?this.captionText="Showing Enabled Interfaces":e&&n?this.captionText="Showing Enabled & Disabled Interfaces":!e&&n?this.captionText="Showing Disabled Interfaces":!e&&!n?this.captionText="Hiding Enabled & Disabled Interfaces":this.captionText=""}handleClick(e,n){let i=e.currentTarget,o=i.isEqualNode(n.enabledButton.button),s=i.isEqualNode(n.disabledButton.button);o?n.enabledButton.handleClick(e):s&&n.disabledButton.handleClick(e),n.toggleCaption()}};function Qg(){for(let t of j("table"))new Xg(t)}var Jg=class{constructor(e){G(this,"base");G(this,"state");G(this,"activeLink",null);G(this,"sections",[]);this.base=e,this.state=new Oo({pinned:!0},{persist:!0,key:"netbox-sidenav"}),this.init(),this.initSectionLinks(),this.initLinks()}bodyHas(e){return document.body.hasAttribute(`data-sidenav-${e}`)}bodyRemove(...e){for(let n of e)document.body.removeAttribute(`data-sidenav-${n}`)}bodyAdd(...e){for(let n of e)document.body.setAttribute(`data-sidenav-${n}`,"")}init(){for(let e of this.base.querySelectorAll(".sidenav-toggle"))e.addEventListener("click",n=>this.onToggle(n));for(let e of j(".sidenav-toggle-mobile"))e.addEventListener("click",n=>this.onMobileToggle(n));window.innerWidth>1200&&(this.state.get("pinned")&&this.pin(),this.state.get("pinned")||this.unpin(),window.addEventListener("resize",()=>this.onResize())),window.innerWidth<1200&&(this.bodyRemove("hide"),this.bodyAdd("hidden"),window.addEventListener("resize",()=>this.onResize())),this.base.addEventListener("mouseenter",()=>this.onEnter()),this.base.addEventListener("mouseleave",()=>this.onLeave())}initLinks(){for(let e of this.getActiveLinks())this.bodyHas("show")?this.activateLink(e,"expand"):this.bodyHas("hidden")&&this.activateLink(e,"collapse")}show(){this.bodyAdd("show"),this.bodyRemove("hidden","hide")}hide(){this.bodyAdd("hidden"),this.bodyRemove("pinned","show");for(let e of this.base.querySelectorAll(".collapse"))e.classList.remove("show")}pin(){this.bodyAdd("show","pinned"),this.bodyRemove("hidden"),this.state.set("pinned",!0)}unpin(){this.bodyRemove("pinned","show"),this.bodyAdd("hidden");for(let e of this.base.querySelectorAll(".collapse"))e.classList.remove("show");this.state.set("pinned",!1)}handleSectionClick(e){e.preventDefault();let n=e.target;this.activeLink=n,this.closeInactiveSections()}closeInactiveSections(){for(let[e,n]of this.sections)e!==this.activeLink&&(e.classList.add("collapsed"),e.setAttribute("aria-expanded","false"),n.hide())}initSectionLinks(){for(let e of j(".navbar-nav .nav-item .nav-link[data-bs-toggle]"))if(e.parentElement!==null){let n=e.parentElement.querySelector(".collapse");if(n!==null){let i=new Ce(n,{toggle:!1});this.sections.push([e,i]),e.addEventListener("click",o=>this.handleSectionClick(o))}}}activateLink(e,n){var o;let i=e.closest(".collapse");if(dl(i)){let s=(o=i.parentElement)==null?void 0:o.querySelector(".nav-link");if(dl(s))switch(s.classList.add("active"),n){case"expand":s.setAttribute("aria-expanded","true"),i.classList.add("show"),e.classList.add("active");break;case"collapse":s.setAttribute("aria-expanded","false"),i.classList.remove("show"),e.classList.remove("active");break}}}*getActiveLinks(){for(let e of this.base.querySelectorAll(".navbar-nav .nav .nav-item a.nav-link")){let n=new RegExp(e.href,"gi");window.location.href.match(n)&&(yield e)}}onEnter(){if(!this.bodyHas("pinned")){this.bodyRemove("hide","hidden"),this.bodyAdd("show");for(let e of this.getActiveLinks())this.activateLink(e,"expand")}}onLeave(){if(!this.bodyHas("pinned")){this.bodyRemove("show"),this.bodyAdd("hide");for(let e of this.getActiveLinks())this.activateLink(e,"collapse");setTimeout(()=>{this.bodyRemove("hide"),this.bodyAdd("hidden")},300)}}onResize(){this.bodyHas("show")&&!this.bodyHas("pinned")&&(this.bodyRemove("show"),this.bodyAdd("hidden"))}onToggle(e){e.preventDefault(),this.state.get("pinned")?this.unpin():this.pin()}onMobileToggle(e){e.preventDefault(),this.bodyHas("hidden")?this.show():this.hide()}};function Zg(){for(let t of j(".sidenav"))new Jg(t)}function ev(t,e){let n=t?"Show Images":"Hide Images",i=t?"":"selected";e.setAttribute("selected",i),e.innerHTML=` ${n}`}function tv(){var t,e;for(let n of j(".rack_elevation")){let i=(e=(t=n.contentDocument)==null?void 0:t.querySelectorAll("image.device-image"))!=null?e:[];for(let o of i)o.classList.remove("hidden")}}function nv(){var t,e;for(let n of j(".rack_elevation")){let i=(e=(t=n.contentDocument)==null?void 0:t.querySelectorAll("image.device-image"))!=null?e:[];for(let o of i)o.classList.add("hidden")}}function wC(t,e){let n=e.get("hidden");e.set("hidden",!n);let i=e.get("hidden");i?nv():tv(),ev(i,t)}function iv(){let t=El.get("hidden");for(let e of j("button.toggle-images"))ev(t,e),e.addEventListener("click",n=>{wC(n.currentTarget,El)},!1);for(let e of j(".rack_elevation"))e.addEventListener("load",()=>{t?nv():t||tv()})}function rv(){for(let t of j("*[data-href]")){let e=t.getAttribute("data-href");ae(e)&&t.addEventListener("click",()=>{window.location.assign(e)})}}function ov(){for(let t of[zm,Rg,Fg,Pm,Vm,xg,Ug,Bg,Vg,Kg,Qg,Zg,iv,rv])t()}function TC(){let t=document.querySelector(".content-container");t!==null&&t.focus()}window.addEventListener("load",TC);document.readyState!=="loading"?ov():document.addEventListener("DOMContentLoaded",ov);})(); +`,"").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=Me(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=fl("button",{type:"button"},["btn","btn-sm","btn-ghost-dark"],[fl("i",null,["mdi","mdi-reload"])]);e.addEventListener("click",()=>this.loadData()),e.type="button",this.slim.slim.search.container.appendChild(e)}}};function _g(){for(let t of j(".netbox-api-select"))new Eg(t)}function Sg(t){return typeof t.value=="string"&&t.value!==""}function wg(t,e){if(t.slim.singleSelected!==null)if(Sg(e)){let n=`#${e.value}`,i=qi(n);t.slim.singleSelected.container.style.backgroundColor=n,t.slim.singleSelected.container.style.color=i}else t.slim.singleSelected.container.removeAttribute("style")}function Tg(){for(let t of j("select.netbox-color-select")){for(let n of t.options)if(Sg(n)){let i=`#${n.value}`,o=qi(i);n.style.backgroundColor=i,n.style.color=o}let e=new Fn({select:t,allowDeselect:!0,deselectLabel:''});for(let n of e.data.data)if("selected"in n&&n.selected){wg(e,n);break}for(let n of t.classList)e.slim.container.classList.remove(n);e.onChange=n=>wg(e,n)}}function xg(){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 Fn({select:t,allowDeselect:!0,deselectLabel:'',placeholder:n});for(let o of t.classList)i.slim.container.classList.remove(o)}}function Og(){for(let t of[_g,Tg,xg])t()}function eL(t){let e=t.getAttribute("data"),n=t.classList.contains("connected"),i=n?"planned":"connected";ae(e)&&go(`/api/dcim/cables/${e}/`,{status:i}).then(o=>{var s;if(qn(o)){$n("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 Ag(){for(let t of j("button.cable-toggle"))t.addEventListener("click",()=>eL(t))}var Cg=class{set(e,n,i){return e[n]=i,!0}get(e,n){return e[n]}has(e,n){return n in e}},Oo=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 Cg,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 Ao(t,e={}){return new Oo(t,e)}var yl=Ao({hidden:!1},{persist:!0,key:"netbox-object-depth"});var El=Ao({hidden:!1},{persist:!0});function Lg(t,e){e.setAttribute("data-depth-indicators",t?"hidden":"shown"),e.innerText=t?"Show Depth Indicators":"Hide Depth Indicators"}function Dg(){for(let t of j(".record-depth"))t.style.display=""}function Mg(){for(let t of j(".record-depth"))t.style.display="none"}function tL(t,e){let n=t.get("hidden");t.set("hidden",!n);let i=t.get("hidden");i?Mg():Dg(),Lg(i,e)}function Ig(){let t=yl.get("hidden");for(let e of j("button.toggle-depth"))Lg(t,e),e.addEventListener("click",n=>{tL(yl,n.currentTarget)},!1);t?Mg():t||Dg()}function nL(t){let e=Array.from(t.options);for(let n=1;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 kg(){for(let t of j("#move-option-up")){let e=t.getAttribute("data-target");if(e!==null)for(let n of j(`#${e}`))t.addEventListener("click",()=>nL(n))}for(let t of j("#move-option-down")){let e=t.getAttribute("data-target");if(e!==null)for(let n of j(`#${e}`))t.addEventListener("click",()=>iL(n))}}function rL(t){let e=t.currentTarget;e.form!==null&&e.form.submit()}function Ng(){for(let t of j("select.per-page"))t.addEventListener("change",rL)}var zn="netbox-color-mode",oL="Light Mode",sL="Dark Mode",Pg="mdi-lightbulb-on",Rg="mdi-lightbulb";function aL(t){return t==="dark"||t==="light"}function lL(t){return localStorage.setItem(zn,t)}function cL(t){var e,n;document.documentElement.setAttribute(`data-${zn}`,t);for(let i of j("span.color-mode-text"))t==="light"?i.innerText=sL:t==="dark"&&(i.innerText=oL);for(let i of j("i.color-mode-icon","span.color-mode-icon"))t==="light"?(i.classList.remove(Pg),i.classList.add(Rg)):t==="dark"&&(i.classList.remove(Rg),i.classList.add(Pg));for(let i of j(".rack_elevation")){let o=(n=(e=i.contentDocument)==null?void 0:e.querySelector("svg"))!=null?n:null;o!==null&&o.setAttribute(`data-${zn}`,t)}}function Ge(t){for(let e of[lL,cL])e(t)}function uL(){let t=localStorage.getItem(zn);t==="light"?Ge("dark"):t==="dark"?Ge("light"):console.warn("Unable to determine the current color mode")}function dL(){let t=localStorage.getItem(zn),e=document.documentElement.getAttribute(`data-${zn}`);if(ae(e)&&ae(t))return Ge(t);let n="none";for(let i of["dark","light"])if(window.matchMedia(`(prefers-color-scheme: ${i})`).matches){n=i;break}if(ae(t)&&!ae(e)&&aL(t))return Ge(t);switch(n){case"dark":return Ge("dark");case"light":return Ge("light");case"none":return Ge("light");default:return Ge("light")}}function fL(){for(let t of j("button.color-mode-toggle"))t.addEventListener("click",uL)}function jg(){window.addEventListener("load",dL);for(let t of[fL])t()}function hL(t){let e=t.currentTarget,n=new FormData(e);n.get("ui.colormode")==="dark"?Ge("dark"):n.get("ui.colormode")==="light"&&Ge("light")}function Hg(){let t=te("preferences-update");t!==null&&t.addEventListener("submit",hL)}function qg(t,e){return t.replace(/[^\-.\w\s]/g,"").replace(/^[\s.]+|[\s.]+$/g,"").replace(/[-.\s]+/g,"-").toLowerCase().substring(0,e)}function $g(){let t=document.getElementById("id_slug"),e=document.getElementById("reslug");if(t===null||e===null)return;let n=t.getAttribute("slug-source"),i=document.getElementById(`id_${n}`);if(i===null){console.error("Unable to find field for slug field.");return}let o=t.getAttribute("maxlength"),s=50;o&&(s=Number(o)),i.addEventListener("blur",()=>{t.value=qg(i.value,s)}),e.addEventListener("click",()=>{t.value=qg(i.value,s)})}function pL(t){if(!t.currentTarget.checked)for(let n of j('input[type="checkbox"].toggle',"input#select-all"))n.checked=!1}function mL(t){let e=t.currentTarget,n=Me(e,"table"),i=document.getElementById("select-all-box"),o=document.getElementById("select-all");if(n!==null){for(let s of n.querySelectorAll('input[type="checkbox"][name="pk"]'))e.checked?s.checked=!0:s.checked=!1;i!==null&&(e.checked?i.classList.remove("d-none"):(i.classList.add("d-none"),o!==null&&(o.checked=!1)))}}function gL(t){let e=t.currentTarget,n=te("select-all-box");if(n!==null)for(let i of n.querySelectorAll('button[type="submit"]'))e.checked?i.disabled=!1:i.disabled=!0}function Bg(){for(let e of j('table tr th > input[type="checkbox"].toggle'))e.addEventListener("change",mL);for(let e of j('input[type="checkbox"][name="pk"]'))e.addEventListener("change",pL);let t=te("select-all");t!==null&&t.addEventListener("change",gL)}function Fg(){for(let t of[Ig,Ag,$g,Bg,Hg,Ng,kg])t()}function zg(){let t=document.querySelectorAll("body > div#django-messages > div.django-message.toast");for(let e of t)e!==null&&new St(e).show()}var Vg=Ae(Wg());function Yg(){for(let t of j("a.copy-token","button.copy-secret"))new Vg.default(t)}var Co=Ae(Ug());function Kg(){(0,Co.default)(".date-picker",{allowInput:!0}),(0,Co.default)(".datetime-picker",{allowInput:!0,enableSeconds:!0,enableTime:!0,time_24hr:!0}),(0,Co.default)(".time-picker",{allowInput:!0,enableSeconds:!0,enableTime:!0,noCalendar:!0,time_24hr:!0})}function vL(){for(let t of j('select[name="columns"] option'))t.selected=!0}function bL(){for(let t of j('select[name="columns"]'))t.value=""}function yL(t){for(let e of j("#id_available_columns > option"))if(e.selected){for(let n of j("#id_columns"))n.appendChild(e.cloneNode(!0));e.remove()}t.preventDefault()}function EL(t){for(let e of j("#id_columns > option"))if(e.selected){for(let n of j("#id_available_columns"))n.appendChild(e.cloneNode(!0));e.remove()}t.preventDefault()}function _L(t){return Pe(this,null,function*(){return yield go("/api/users/config/",t)})}function SL(t){var a,c;t.preventDefault();let e=t.currentTarget,n=xm(e),i=Object.assign({},...n.map(u=>({[u.name]:u.options}))),s=((c=(a=e.getAttribute("data-config-root"))==null?void 0:a.split("."))!=null?c:[]).reduceRight((u,d)=>({[d]:u}),i);_L(s).then(u=>{qn(u)?$n("danger","Error Updating Table Configuration",u.error).show():location.reload()})}function Gg(){for(let t of j("#save_tableconfig"))t.addEventListener("click",vL);for(let t of j("#reset_tableconfig"))t.addEventListener("click",bL);for(let t of j("#add_columns"))t.addEventListener("click",yL);for(let t of j("#remove_columns"))t.addEventListener("click",EL);for(let t of j("form.userconfigform"))t.addEventListener("submit",SL)}function Xg(t){return typeof t=="string"&&["show","hide"].includes(t)}var Lo=class extends Error{constructor(e,n){super(e);G(this,"table");this.table=n}},Tl=class{constructor(e,n){G(this,"button");G(this,"enabledRows");G(this,"disabledRows");this.button=e,this.enabledRows=n.querySelectorAll('tr[data-enabled="enabled"]'),this.disabledRows=n.querySelectorAll('tr[data-enabled="disabled"]')}get directive(){if(this.button.classList.contains("toggle-disabled"))return"disabled";if(this.button.classList.contains("toggle-enabled"))return"enabled";throw console.warn(this.button),new Error("Toggle button does not contain expected class")}toggleEnabledRows(){for(let e of this.enabledRows)e.classList.toggle("d-none")}toggleDisabledRows(){for(let e of this.disabledRows)e.classList.toggle("d-none")}set buttonState(e){Xg(e)&&this.button.setAttribute("data-state",e)}get buttonState(){let e=this.button.getAttribute("data-state");return Xg(e)?e:null}toggleButton(){this.buttonState==="show"?this.button.innerText=this.button.innerText.replaceAll("Show","Hide"):this.buttonState==="hide"&&(this.button.innerText=this.button.innerText.replaceAll("Hide","Show"))}toggleRows(){this.directive==="enabled"?this.toggleEnabledRows():this.directive==="disabled"&&this.toggleDisabledRows()}toggleState(){this.buttonState==="show"?this.buttonState="hide":this.buttonState==="hide"&&(this.buttonState="show")}toggle(){this.toggleState(),this.toggleButton(),this.toggleRows()}handleClick(e){e.currentTarget.isEqualNode(this.button)&&this.toggle()}},Qg=class{constructor(e){G(this,"table");G(this,"enabledButton");G(this,"disabledButton");G(this,"caption",null);this.table=e;try{let n=Me(this.table,"button.toggle-enabled"),i=Me(this.table,"button.toggle-disabled"),o=this.table.querySelector("caption");if(this.caption=o,n===null)throw new Lo("Table is missing a 'toggle-enabled' button.",e);if(i===null)throw new Lo("Table is missing a 'toggle-disabled' button.",e);n.addEventListener("click",s=>this.handleClick(s,this)),i.addEventListener("click",s=>this.handleClick(s,this)),this.enabledButton=new Tl(n,this.table),this.disabledButton=new Tl(i,this.table)}catch(n){if(n instanceof Lo){console.debug("Table does not contain enable/disable toggle buttons");return}else throw n}}get captionText(){return this.caption!==null?this.caption.innerText:""}set captionText(e){this.caption!==null&&(this.caption.innerText=e)}toggleCaption(){let e=this.enabledButton.buttonState==="show",n=this.disabledButton.buttonState==="show";e&&!n?this.captionText="Showing Enabled Interfaces":e&&n?this.captionText="Showing Enabled & Disabled Interfaces":!e&&n?this.captionText="Showing Disabled Interfaces":!e&&!n?this.captionText="Hiding Enabled & Disabled Interfaces":this.captionText=""}handleClick(e,n){let i=e.currentTarget,o=i.isEqualNode(n.enabledButton.button),s=i.isEqualNode(n.disabledButton.button);o?n.enabledButton.handleClick(e):s&&n.disabledButton.handleClick(e),n.toggleCaption()}};function Jg(){for(let t of j("table"))new Qg(t)}var Zg=class{constructor(e){G(this,"base");G(this,"state");G(this,"activeLink",null);G(this,"sections",[]);this.base=e,this.state=new Oo({pinned:!0},{persist:!0,key:"netbox-sidenav"}),this.init(),this.initSectionLinks(),this.initLinks()}bodyHas(e){return document.body.hasAttribute(`data-sidenav-${e}`)}bodyRemove(...e){for(let n of e)document.body.removeAttribute(`data-sidenav-${n}`)}bodyAdd(...e){for(let n of e)document.body.setAttribute(`data-sidenav-${n}`,"")}init(){for(let e of this.base.querySelectorAll(".sidenav-toggle"))e.addEventListener("click",n=>this.onToggle(n));for(let e of j(".sidenav-toggle-mobile"))e.addEventListener("click",n=>this.onMobileToggle(n));window.innerWidth>1200&&(this.state.get("pinned")&&this.pin(),this.state.get("pinned")||this.unpin(),window.addEventListener("resize",()=>this.onResize())),window.innerWidth<1200&&(this.bodyRemove("hide"),this.bodyAdd("hidden"),window.addEventListener("resize",()=>this.onResize())),this.base.addEventListener("mouseenter",()=>this.onEnter()),this.base.addEventListener("mouseleave",()=>this.onLeave())}initLinks(){for(let e of this.getActiveLinks())this.bodyHas("show")?this.activateLink(e,"expand"):this.bodyHas("hidden")&&this.activateLink(e,"collapse")}show(){this.bodyAdd("show"),this.bodyRemove("hidden","hide")}hide(){this.bodyAdd("hidden"),this.bodyRemove("pinned","show");for(let e of this.base.querySelectorAll(".collapse"))e.classList.remove("show")}pin(){this.bodyAdd("show","pinned"),this.bodyRemove("hidden"),this.state.set("pinned",!0)}unpin(){this.bodyRemove("pinned","show"),this.bodyAdd("hidden");for(let e of this.base.querySelectorAll(".collapse"))e.classList.remove("show");this.state.set("pinned",!1)}handleSectionClick(e){e.preventDefault();let n=e.target;this.activeLink=n,this.closeInactiveSections()}closeInactiveSections(){for(let[e,n]of this.sections)e!==this.activeLink&&(e.classList.add("collapsed"),e.setAttribute("aria-expanded","false"),n.hide())}initSectionLinks(){for(let e of j(".navbar-nav .nav-item .nav-link[data-bs-toggle]"))if(e.parentElement!==null){let n=e.parentElement.querySelector(".collapse");if(n!==null){let i=new Le(n,{toggle:!1});this.sections.push([e,i]),e.addEventListener("click",o=>this.handleSectionClick(o))}}}activateLink(e,n){var o;let i=e.closest(".collapse");if(dl(i)){let s=(o=i.parentElement)==null?void 0:o.querySelector(".nav-link");if(dl(s))switch(s.classList.add("active"),n){case"expand":s.setAttribute("aria-expanded","true"),i.classList.add("show"),e.classList.add("active");break;case"collapse":s.setAttribute("aria-expanded","false"),i.classList.remove("show"),e.classList.remove("active");break}}}*getActiveLinks(){for(let e of this.base.querySelectorAll(".navbar-nav .nav .nav-item a.nav-link")){let n=new RegExp(e.href,"gi");window.location.href.match(n)&&(yield e)}}onEnter(){if(!this.bodyHas("pinned")){this.bodyRemove("hide","hidden"),this.bodyAdd("show");for(let e of this.getActiveLinks())this.activateLink(e,"expand")}}onLeave(){if(!this.bodyHas("pinned")){this.bodyRemove("show"),this.bodyAdd("hide");for(let e of this.getActiveLinks())this.activateLink(e,"collapse");setTimeout(()=>{this.bodyRemove("hide"),this.bodyAdd("hidden")},300)}}onResize(){this.bodyHas("show")&&!this.bodyHas("pinned")&&(this.bodyRemove("show"),this.bodyAdd("hidden"))}onToggle(e){e.preventDefault(),this.state.get("pinned")?this.unpin():this.pin()}onMobileToggle(e){e.preventDefault(),this.bodyHas("hidden")?this.show():this.hide()}};function ev(){for(let t of j(".sidenav"))new Zg(t)}function tv(t,e){let n=t?"Show Images":"Hide Images",i=t?"":"selected";e.setAttribute("selected",i),e.innerHTML=` ${n}`}function nv(){var t,e;for(let n of j(".rack_elevation")){let i=(e=(t=n.contentDocument)==null?void 0:t.querySelectorAll("image.device-image"))!=null?e:[];for(let o of i)o.classList.remove("hidden")}}function iv(){var t,e;for(let n of j(".rack_elevation")){let i=(e=(t=n.contentDocument)==null?void 0:t.querySelectorAll("image.device-image"))!=null?e:[];for(let o of i)o.classList.add("hidden")}}function wL(t,e){let n=e.get("hidden");e.set("hidden",!n);let i=e.get("hidden");i?iv():nv(),tv(i,t)}function rv(){let t=El.get("hidden");for(let e of j("button.toggle-images"))tv(t,e),e.addEventListener("click",n=>{wL(n.currentTarget,El)},!1);for(let e of j(".rack_elevation"))e.addEventListener("load",()=>{t?iv():t||nv()})}function ov(){for(let t of j("*[data-href]")){let e=t.getAttribute("data-href");ae(e)&&t.addEventListener("click",()=>{window.location.assign(e)})}}function sv(){for(let t of[Wm,jg,zg,Rm,Ym,Og,Kg,Fg,Yg,Gg,Jg,ev,rv,ov])t()}function TL(){let t=document.querySelector(".content-container");t!==null&&t.focus()}window.addEventListener("load",TL);document.readyState!=="loading"?sv():document.addEventListener("DOMContentLoaded",sv);})(); /* flatpickr v4.6.3, @license MIT */ /*! * Bootstrap v5.0.2 (https://getbootstrap.com/) diff --git a/netbox/project-static/dist/netbox.js.map b/netbox/project-static/dist/netbox.js.map index acb54704c78..66ab8533212 100644 --- a/netbox/project-static/dist/netbox.js.map +++ b/netbox/project-static/dist/netbox.js.map @@ -1,7 +1,7 @@ { "version": 3, "sources": ["../node_modules/core-js/internals/global.js", "../node_modules/core-js/internals/fails.js", "../node_modules/core-js/internals/descriptors.js", "../node_modules/core-js/internals/object-property-is-enumerable.js", "../node_modules/core-js/internals/create-property-descriptor.js", "../node_modules/core-js/internals/classof-raw.js", "../node_modules/core-js/internals/indexed-object.js", "../node_modules/core-js/internals/require-object-coercible.js", "../node_modules/core-js/internals/to-indexed-object.js", "../node_modules/core-js/internals/is-object.js", "../node_modules/core-js/internals/to-primitive.js", "../node_modules/core-js/internals/to-object.js", "../node_modules/core-js/internals/has.js", "../node_modules/core-js/internals/document-create-element.js", "../node_modules/core-js/internals/ie8-dom-define.js", "../node_modules/core-js/internals/object-get-own-property-descriptor.js", "../node_modules/core-js/internals/an-object.js", "../node_modules/core-js/internals/object-define-property.js", "../node_modules/core-js/internals/create-non-enumerable-property.js", "../node_modules/core-js/internals/set-global.js", "../node_modules/core-js/internals/shared-store.js", "../node_modules/core-js/internals/inspect-source.js", "../node_modules/core-js/internals/native-weak-map.js", "../node_modules/core-js/internals/is-pure.js", "../node_modules/core-js/internals/shared.js", "../node_modules/core-js/internals/uid.js", "../node_modules/core-js/internals/shared-key.js", "../node_modules/core-js/internals/hidden-keys.js", "../node_modules/core-js/internals/internal-state.js", "../node_modules/core-js/internals/redefine.js", "../node_modules/core-js/internals/path.js", "../node_modules/core-js/internals/get-built-in.js", "../node_modules/core-js/internals/to-integer.js", "../node_modules/core-js/internals/to-length.js", "../node_modules/core-js/internals/to-absolute-index.js", "../node_modules/core-js/internals/array-includes.js", "../node_modules/core-js/internals/object-keys-internal.js", "../node_modules/core-js/internals/enum-bug-keys.js", "../node_modules/core-js/internals/object-get-own-property-names.js", "../node_modules/core-js/internals/object-get-own-property-symbols.js", "../node_modules/core-js/internals/own-keys.js", "../node_modules/core-js/internals/copy-constructor-properties.js", "../node_modules/core-js/internals/is-forced.js", "../node_modules/core-js/internals/export.js", "../node_modules/core-js/internals/a-function.js", "../node_modules/core-js/internals/function-bind-context.js", "../node_modules/core-js/internals/is-array.js", "../node_modules/core-js/internals/engine-user-agent.js", "../node_modules/core-js/internals/engine-v8-version.js", "../node_modules/core-js/internals/native-symbol.js", "../node_modules/core-js/internals/use-symbol-as-uid.js", "../node_modules/core-js/internals/well-known-symbol.js", "../node_modules/core-js/internals/array-species-create.js", "../node_modules/core-js/internals/array-iteration.js", "../node_modules/core-js/internals/array-method-is-strict.js", "../node_modules/core-js/internals/array-for-each.js", "../node_modules/core-js/internals/dom-iterables.js", "../node_modules/can-use-dom/index.js", "../node_modules/core-js/internals/array-method-has-species-support.js", "../node_modules/core-js/internals/object-keys.js", "../node_modules/core-js/internals/object-define-properties.js", "../node_modules/core-js/internals/html.js", "../node_modules/core-js/internals/object-create.js", "../node_modules/core-js/internals/add-to-unscopables.js", "../node_modules/core-js/internals/iterators.js", "../node_modules/core-js/internals/correct-prototype-getter.js", "../node_modules/core-js/internals/object-get-prototype-of.js", "../node_modules/core-js/internals/iterators-core.js", "../node_modules/core-js/internals/set-to-string-tag.js", "../node_modules/core-js/internals/create-iterator-constructor.js", "../node_modules/core-js/internals/a-possible-prototype.js", "../node_modules/core-js/internals/object-set-prototype-of.js", "../node_modules/core-js/internals/define-iterator.js", "../node_modules/core-js/modules/es.array.iterator.js", "../node_modules/core-js/internals/object-assign.js", "../node_modules/core-js/internals/to-string-tag-support.js", "../node_modules/core-js/internals/classof.js", "../node_modules/core-js/internals/object-to-string.js", "../node_modules/core-js/internals/whitespaces.js", "../node_modules/core-js/internals/string-trim.js", "../node_modules/core-js/internals/number-parse-int.js", "../node_modules/core-js/internals/string-multibyte.js", "../node_modules/core-js/internals/redefine-all.js", "../node_modules/core-js/internals/freezing.js", "../node_modules/core-js/internals/internal-metadata.js", "../node_modules/core-js/internals/is-array-iterator-method.js", "../node_modules/core-js/internals/get-iterator-method.js", "../node_modules/core-js/internals/iterator-close.js", "../node_modules/core-js/internals/iterate.js", "../node_modules/core-js/internals/an-instance.js", "../node_modules/core-js/internals/check-correctness-of-iteration.js", "../node_modules/core-js/internals/inherit-if-required.js", "../node_modules/core-js/internals/collection.js", "../node_modules/core-js/internals/collection-weak.js", "../node_modules/core-js/modules/es.weak-map.js", "../node_modules/lodash.throttle/index.js", "../node_modules/lodash.debounce/index.js", "../node_modules/lodash.memoize/index.js", "../node_modules/core-js/internals/array-reduce.js", "../node_modules/core-js/internals/engine-is-node.js", "../node_modules/core-js/internals/regexp-flags.js", "../node_modules/core-js/internals/regexp-sticky-helpers.js", "../node_modules/core-js/internals/regexp-unsupported-dot-all.js", "../node_modules/core-js/internals/regexp-unsupported-ncg.js", "../node_modules/core-js/internals/regexp-exec.js", "../node_modules/core-js/modules/es.regexp.exec.js", "../node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js", "../node_modules/core-js/internals/advance-string-index.js", "../node_modules/core-js/internals/regexp-exec-abstract.js", "../node_modules/core-js/internals/get-substitution.js", "../node_modules/cookie/index.js", "../node_modules/ev-emitter/ev-emitter.js", "../node_modules/get-size/get-size.js", "../node_modules/desandro-matches-selector/matches-selector.js", "../node_modules/fizzy-ui-utils/utils.js", "../node_modules/outlayer/item.js", "../node_modules/outlayer/outlayer.js", "../node_modules/masonry-layout/masonry.js", "../node_modules/just-debounce-it/index.js", "../node_modules/strict-uri-encode/index.js", "../node_modules/decode-uri-component/index.js", "../node_modules/split-on-first/index.js", "../node_modules/filter-obj/index.js", "../node_modules/query-string/index.js", "../node_modules/clipboard/dist/clipboard.js", "../node_modules/flatpickr/dist/flatpickr.js", "../node_modules/@popperjs/core/lib/index.js", "../node_modules/@popperjs/core/lib/enums.js", "../node_modules/@popperjs/core/lib/dom-utils/getNodeName.js", "../node_modules/@popperjs/core/lib/dom-utils/getWindow.js", "../node_modules/@popperjs/core/lib/dom-utils/instanceOf.js", "../node_modules/@popperjs/core/lib/modifiers/applyStyles.js", "../node_modules/@popperjs/core/lib/utils/getBasePlacement.js", "../node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js", "../node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js", "../node_modules/@popperjs/core/lib/dom-utils/contains.js", "../node_modules/@popperjs/core/lib/dom-utils/getComputedStyle.js", "../node_modules/@popperjs/core/lib/dom-utils/isTableElement.js", "../node_modules/@popperjs/core/lib/dom-utils/getDocumentElement.js", "../node_modules/@popperjs/core/lib/dom-utils/getParentNode.js", "../node_modules/@popperjs/core/lib/dom-utils/getOffsetParent.js", "../node_modules/@popperjs/core/lib/utils/getMainAxisFromPlacement.js", "../node_modules/@popperjs/core/lib/utils/math.js", "../node_modules/@popperjs/core/lib/utils/within.js", "../node_modules/@popperjs/core/lib/utils/getFreshSideObject.js", "../node_modules/@popperjs/core/lib/utils/mergePaddingObject.js", "../node_modules/@popperjs/core/lib/utils/expandToHashMap.js", "../node_modules/@popperjs/core/lib/modifiers/arrow.js", "../node_modules/@popperjs/core/lib/modifiers/computeStyles.js", "../node_modules/@popperjs/core/lib/modifiers/eventListeners.js", "../node_modules/@popperjs/core/lib/utils/getOppositePlacement.js", "../node_modules/@popperjs/core/lib/utils/getOppositeVariationPlacement.js", "../node_modules/@popperjs/core/lib/dom-utils/getWindowScroll.js", "../node_modules/@popperjs/core/lib/dom-utils/getWindowScrollBarX.js", "../node_modules/@popperjs/core/lib/dom-utils/getViewportRect.js", "../node_modules/@popperjs/core/lib/dom-utils/getDocumentRect.js", "../node_modules/@popperjs/core/lib/dom-utils/isScrollParent.js", "../node_modules/@popperjs/core/lib/dom-utils/getScrollParent.js", "../node_modules/@popperjs/core/lib/dom-utils/listScrollParents.js", "../node_modules/@popperjs/core/lib/utils/rectToClientRect.js", "../node_modules/@popperjs/core/lib/dom-utils/getClippingRect.js", "../node_modules/@popperjs/core/lib/utils/getVariation.js", "../node_modules/@popperjs/core/lib/utils/computeOffsets.js", "../node_modules/@popperjs/core/lib/utils/detectOverflow.js", "../node_modules/@popperjs/core/lib/utils/computeAutoPlacement.js", "../node_modules/@popperjs/core/lib/modifiers/flip.js", "../node_modules/@popperjs/core/lib/modifiers/hide.js", "../node_modules/@popperjs/core/lib/modifiers/offset.js", "../node_modules/@popperjs/core/lib/modifiers/popperOffsets.js", "../node_modules/@popperjs/core/lib/utils/getAltAxis.js", "../node_modules/@popperjs/core/lib/modifiers/preventOverflow.js", "../node_modules/@popperjs/core/lib/dom-utils/getHTMLElementScroll.js", "../node_modules/@popperjs/core/lib/dom-utils/getNodeScroll.js", "../node_modules/@popperjs/core/lib/dom-utils/getCompositeRect.js", "../node_modules/@popperjs/core/lib/utils/orderModifiers.js", "../node_modules/@popperjs/core/lib/utils/debounce.js", "../node_modules/@popperjs/core/lib/utils/mergeByName.js", "../node_modules/@popperjs/core/lib/createPopper.js", "../node_modules/@popperjs/core/lib/popper-lite.js", "../node_modules/@popperjs/core/lib/popper.js", "../node_modules/bootstrap/js/src/dom/selector-engine.js", "../node_modules/bootstrap/js/src/util/index.js", "../node_modules/bootstrap/js/src/dom/event-handler.js", "../node_modules/bootstrap/js/src/dom/data.js", "../node_modules/bootstrap/js/src/base-component.js", "../node_modules/bootstrap/js/src/alert.js", "../node_modules/bootstrap/js/src/button.js", "../node_modules/bootstrap/js/src/dom/manipulator.js", "../node_modules/bootstrap/js/src/carousel.js", "../node_modules/bootstrap/js/src/collapse.js", "../node_modules/bootstrap/js/src/dropdown.js", "../node_modules/bootstrap/js/src/util/scrollbar.js", "../node_modules/bootstrap/js/src/util/backdrop.js", "../node_modules/bootstrap/js/src/modal.js", "../node_modules/bootstrap/js/src/offcanvas.js", "../node_modules/bootstrap/js/src/util/sanitizer.js", "../node_modules/bootstrap/js/src/tooltip.js", "../node_modules/bootstrap/js/src/popover.js", "../node_modules/bootstrap/js/src/scrollspy.js", "../node_modules/bootstrap/js/src/tab.js", "../node_modules/bootstrap/js/src/toast.js", "../node_modules/core-js/modules/es.array.for-each.js", "../node_modules/core-js/modules/web.dom-collections.for-each.js", "../node_modules/core-js/modules/es.array.filter.js", "../node_modules/core-js/modules/es.object.assign.js", "../node_modules/core-js/modules/es.object.to-string.js", "../node_modules/core-js/modules/es.parse-int.js", "../node_modules/core-js/modules/es.string.iterator.js", "../node_modules/core-js/modules/web.dom-collections.iterator.js", "../node_modules/@juggle/resize-observer/lib/utils/resizeObservers.js", "../node_modules/@juggle/resize-observer/lib/algorithms/hasActiveObservations.js", "../node_modules/@juggle/resize-observer/lib/algorithms/hasSkippedObservations.js", "../node_modules/@juggle/resize-observer/lib/algorithms/deliverResizeLoopError.js", "../node_modules/@juggle/resize-observer/lib/ResizeObserverBoxOptions.js", "../node_modules/@juggle/resize-observer/lib/utils/freeze.js", "../node_modules/@juggle/resize-observer/lib/ResizeObserverSize.js", "../node_modules/@juggle/resize-observer/lib/DOMRectReadOnly.js", "../node_modules/@juggle/resize-observer/lib/utils/element.js", "../node_modules/@juggle/resize-observer/lib/utils/global.js", "../node_modules/@juggle/resize-observer/lib/algorithms/calculateBoxSize.js", "../node_modules/@juggle/resize-observer/lib/ResizeObserverEntry.js", "../node_modules/@juggle/resize-observer/lib/algorithms/calculateDepthForNode.js", "../node_modules/@juggle/resize-observer/lib/algorithms/broadcastActiveObservations.js", "../node_modules/@juggle/resize-observer/lib/algorithms/gatherActiveObservationsAtDepth.js", "../node_modules/@juggle/resize-observer/lib/utils/process.js", "../node_modules/@juggle/resize-observer/lib/utils/queueMicroTask.js", "../node_modules/@juggle/resize-observer/lib/utils/queueResizeObserver.js", "../node_modules/@juggle/resize-observer/lib/utils/scheduler.js", "../node_modules/@juggle/resize-observer/lib/ResizeObservation.js", "../node_modules/@juggle/resize-observer/lib/ResizeObserverDetail.js", "../node_modules/@juggle/resize-observer/lib/ResizeObserverController.js", "../node_modules/@juggle/resize-observer/lib/ResizeObserver.js", "../node_modules/core-js/modules/es.array.reduce.js", "../node_modules/core-js/modules/es.function.name.js", "../node_modules/core-js/modules/es.string.match.js", "../node_modules/core-js/modules/es.string.replace.js", "../node_modules/simplebar/src/helpers.js", "../node_modules/simplebar/src/scrollbar-width.js", "../node_modules/simplebar/src/simplebar.js", "../node_modules/simplebar/src/index.js", "../src/util.ts", "../src/forms/actions.ts", "../src/forms/elements.ts", "../src/forms/speedSelector.ts", "../src/forms/scopeSelector.ts", "../src/forms/vlanTags.ts", "../src/forms/index.ts", "../src/bs.ts", "../src/search.ts", "../src/select/api.ts", "../node_modules/color2k/src/guard.ts", "../node_modules/color2k/src/ColorError.ts", "../node_modules/color2k/src/parseToRgba.ts", "../node_modules/color2k/src/parseToHsla.ts", "../node_modules/color2k/src/hsla.ts", "../node_modules/color2k/src/adjustHue.ts", "../node_modules/color2k/src/darken.ts", "../node_modules/color2k/src/desaturate.ts", "../node_modules/color2k/src/getLuminance.ts", "../node_modules/color2k/src/getContrast.ts", "../node_modules/color2k/src/rgba.ts", "../node_modules/color2k/src/mix.ts", "../node_modules/color2k/src/getScale.ts", "../node_modules/color2k/src/hasBadContrast.ts", "../node_modules/color2k/src/lighten.ts", "../node_modules/color2k/src/transparentize.ts", "../node_modules/color2k/src/opacify.ts", "../node_modules/color2k/src/readableColorIsBlack.ts", "../node_modules/color2k/src/readableColor.ts", "../node_modules/color2k/src/saturate.ts", "../node_modules/color2k/src/toHex.ts", "../node_modules/color2k/src/toRgba.ts", "../node_modules/color2k/src/toHsla.ts", "../node_modules/slim-select/dist/slimselect.min.mjs", "../src/select/util.ts", "../src/select/color.ts", "../src/select/static.ts", "../src/select/index.ts", "../src/buttons/connectionToggle.ts", "../src/state/index.ts", "../src/stores/objectDepth.ts", "../src/stores/rackImages.ts", "../src/buttons/depthToggle.ts", "../src/buttons/moveOptions.ts", "../src/buttons/pagination.ts", "../src/colorMode.ts", "../src/buttons/preferences.ts", "../src/buttons/reslug.ts", "../src/buttons/selectAll.ts", "../src/buttons/index.ts", "../src/messages.ts", "../src/clipboard.ts", "../src/dateSelector.ts", "../src/tableConfig.ts", "../src/tables/interfaceTable.ts", "../src/sidenav.ts", "../src/racks.ts", "../src/links.ts", "../src/netbox.ts"], - "sourcesContent": ["var check = function (it) {\n return it && it.Math == Math && it;\n};\n\n// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028\nmodule.exports =\n // eslint-disable-next-line es/no-global-this -- safe\n check(typeof globalThis == 'object' && globalThis) ||\n check(typeof window == 'object' && window) ||\n // eslint-disable-next-line no-restricted-globals -- safe\n check(typeof self == 'object' && self) ||\n check(typeof global == 'object' && global) ||\n // eslint-disable-next-line no-new-func -- fallback\n (function () { return this; })() || Function('return this')();\n", "module.exports = function (exec) {\n try {\n return !!exec();\n } catch (error) {\n return true;\n }\n};\n", "var fails = require('../internals/fails');\n\n// Detect IE8's incomplete defineProperty implementation\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- required for testing\n return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7;\n});\n", "'use strict';\nvar $propertyIsEnumerable = {}.propertyIsEnumerable;\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// Nashorn ~ JDK8 bug\nvar NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1);\n\n// `Object.prototype.propertyIsEnumerable` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable\nexports.f = NASHORN_BUG ? function propertyIsEnumerable(V) {\n var descriptor = getOwnPropertyDescriptor(this, V);\n return !!descriptor && descriptor.enumerable;\n} : $propertyIsEnumerable;\n", "module.exports = function (bitmap, value) {\n return {\n enumerable: !(bitmap & 1),\n configurable: !(bitmap & 2),\n writable: !(bitmap & 4),\n value: value\n };\n};\n", "var toString = {}.toString;\n\nmodule.exports = function (it) {\n return toString.call(it).slice(8, -1);\n};\n", "var fails = require('../internals/fails');\nvar classof = require('../internals/classof-raw');\n\nvar split = ''.split;\n\n// fallback for non-array-like ES3 and non-enumerable old V8 strings\nmodule.exports = fails(function () {\n // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346\n // eslint-disable-next-line no-prototype-builtins -- safe\n return !Object('z').propertyIsEnumerable(0);\n}) ? function (it) {\n return classof(it) == 'String' ? split.call(it, '') : Object(it);\n} : Object;\n", "// `RequireObjectCoercible` abstract operation\n// https://tc39.es/ecma262/#sec-requireobjectcoercible\nmodule.exports = function (it) {\n if (it == undefined) throw TypeError(\"Can't call method on \" + it);\n return it;\n};\n", "// toObject with fallback for non-array-like ES3 strings\nvar IndexedObject = require('../internals/indexed-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\nmodule.exports = function (it) {\n return IndexedObject(requireObjectCoercible(it));\n};\n", "module.exports = function (it) {\n return typeof it === 'object' ? it !== null : typeof it === 'function';\n};\n", "var isObject = require('../internals/is-object');\n\n// `ToPrimitive` abstract operation\n// https://tc39.es/ecma262/#sec-toprimitive\n// instead of the ES6 spec version, we didn't implement @@toPrimitive case\n// and the second argument - flag - preferred type is a string\nmodule.exports = function (input, PREFERRED_STRING) {\n if (!isObject(input)) return input;\n var fn, val;\n if (PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n if (typeof (fn = input.valueOf) == 'function' && !isObject(val = fn.call(input))) return val;\n if (!PREFERRED_STRING && typeof (fn = input.toString) == 'function' && !isObject(val = fn.call(input))) return val;\n throw TypeError(\"Can't convert object to primitive value\");\n};\n", "var requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `ToObject` abstract operation\n// https://tc39.es/ecma262/#sec-toobject\nmodule.exports = function (argument) {\n return Object(requireObjectCoercible(argument));\n};\n", "var toObject = require('../internals/to-object');\n\nvar hasOwnProperty = {}.hasOwnProperty;\n\nmodule.exports = Object.hasOwn || function hasOwn(it, key) {\n return hasOwnProperty.call(toObject(it), key);\n};\n", "var global = require('../internals/global');\nvar isObject = require('../internals/is-object');\n\nvar document = global.document;\n// typeof document.createElement is 'object' in old IE\nvar EXISTS = isObject(document) && isObject(document.createElement);\n\nmodule.exports = function (it) {\n return EXISTS ? document.createElement(it) : {};\n};\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar createElement = require('../internals/document-create-element');\n\n// Thank's IE8 for his funny defineProperty\nmodule.exports = !DESCRIPTORS && !fails(function () {\n // eslint-disable-next-line es/no-object-defineproperty -- requied for testing\n return Object.defineProperty(createElement('div'), 'a', {\n get: function () { return 7; }\n }).a != 7;\n});\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar toPrimitive = require('../internals/to-primitive');\nvar has = require('../internals/has');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\n\n// eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\nvar $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n\n// `Object.getOwnPropertyDescriptor` method\n// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor\nexports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) {\n O = toIndexedObject(O);\n P = toPrimitive(P, true);\n if (IE8_DOM_DEFINE) try {\n return $getOwnPropertyDescriptor(O, P);\n } catch (error) { /* empty */ }\n if (has(O, P)) return createPropertyDescriptor(!propertyIsEnumerableModule.f.call(O, P), O[P]);\n};\n", "var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it)) {\n throw TypeError(String(it) + ' is not an object');\n } return it;\n};\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar IE8_DOM_DEFINE = require('../internals/ie8-dom-define');\nvar anObject = require('../internals/an-object');\nvar toPrimitive = require('../internals/to-primitive');\n\n// eslint-disable-next-line es/no-object-defineproperty -- safe\nvar $defineProperty = Object.defineProperty;\n\n// `Object.defineProperty` method\n// https://tc39.es/ecma262/#sec-object.defineproperty\nexports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) {\n anObject(O);\n P = toPrimitive(P, true);\n anObject(Attributes);\n if (IE8_DOM_DEFINE) try {\n return $defineProperty(O, P, Attributes);\n } catch (error) { /* empty */ }\n if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported');\n if ('value' in Attributes) O[P] = Attributes.value;\n return O;\n};\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\n\nmodule.exports = DESCRIPTORS ? function (object, key, value) {\n return definePropertyModule.f(object, key, createPropertyDescriptor(1, value));\n} : function (object, key, value) {\n object[key] = value;\n return object;\n};\n", "var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nmodule.exports = function (key, value) {\n try {\n createNonEnumerableProperty(global, key, value);\n } catch (error) {\n global[key] = value;\n } return value;\n};\n", "var global = require('../internals/global');\nvar setGlobal = require('../internals/set-global');\n\nvar SHARED = '__core-js_shared__';\nvar store = global[SHARED] || setGlobal(SHARED, {});\n\nmodule.exports = store;\n", "var store = require('../internals/shared-store');\n\nvar functionToString = Function.toString;\n\n// this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper\nif (typeof store.inspectSource != 'function') {\n store.inspectSource = function (it) {\n return functionToString.call(it);\n };\n}\n\nmodule.exports = store.inspectSource;\n", "var global = require('../internals/global');\nvar inspectSource = require('../internals/inspect-source');\n\nvar WeakMap = global.WeakMap;\n\nmodule.exports = typeof WeakMap === 'function' && /native code/.test(inspectSource(WeakMap));\n", "module.exports = false;\n", "var IS_PURE = require('../internals/is-pure');\nvar store = require('../internals/shared-store');\n\n(module.exports = function (key, value) {\n return store[key] || (store[key] = value !== undefined ? value : {});\n})('versions', []).push({\n version: '3.15.1',\n mode: IS_PURE ? 'pure' : 'global',\n copyright: '\u00A9 2021 Denis Pushkarev (zloirock.ru)'\n});\n", "var id = 0;\nvar postfix = Math.random();\n\nmodule.exports = function (key) {\n return 'Symbol(' + String(key === undefined ? '' : key) + ')_' + (++id + postfix).toString(36);\n};\n", "var shared = require('../internals/shared');\nvar uid = require('../internals/uid');\n\nvar keys = shared('keys');\n\nmodule.exports = function (key) {\n return keys[key] || (keys[key] = uid(key));\n};\n", "module.exports = {};\n", "var NATIVE_WEAK_MAP = require('../internals/native-weak-map');\nvar global = require('../internals/global');\nvar isObject = require('../internals/is-object');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar objectHas = require('../internals/has');\nvar shared = require('../internals/shared-store');\nvar sharedKey = require('../internals/shared-key');\nvar hiddenKeys = require('../internals/hidden-keys');\n\nvar OBJECT_ALREADY_INITIALIZED = 'Object already initialized';\nvar WeakMap = global.WeakMap;\nvar set, get, has;\n\nvar enforce = function (it) {\n return has(it) ? get(it) : set(it, {});\n};\n\nvar getterFor = function (TYPE) {\n return function (it) {\n var state;\n if (!isObject(it) || (state = get(it)).type !== TYPE) {\n throw TypeError('Incompatible receiver, ' + TYPE + ' required');\n } return state;\n };\n};\n\nif (NATIVE_WEAK_MAP || shared.state) {\n var store = shared.state || (shared.state = new WeakMap());\n var wmget = store.get;\n var wmhas = store.has;\n var wmset = store.set;\n set = function (it, metadata) {\n if (wmhas.call(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n wmset.call(store, it, metadata);\n return metadata;\n };\n get = function (it) {\n return wmget.call(store, it) || {};\n };\n has = function (it) {\n return wmhas.call(store, it);\n };\n} else {\n var STATE = sharedKey('state');\n hiddenKeys[STATE] = true;\n set = function (it, metadata) {\n if (objectHas(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED);\n metadata.facade = it;\n createNonEnumerableProperty(it, STATE, metadata);\n return metadata;\n };\n get = function (it) {\n return objectHas(it, STATE) ? it[STATE] : {};\n };\n has = function (it) {\n return objectHas(it, STATE);\n };\n}\n\nmodule.exports = {\n set: set,\n get: get,\n has: has,\n enforce: enforce,\n getterFor: getterFor\n};\n", "var global = require('../internals/global');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar setGlobal = require('../internals/set-global');\nvar inspectSource = require('../internals/inspect-source');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar getInternalState = InternalStateModule.get;\nvar enforceInternalState = InternalStateModule.enforce;\nvar TEMPLATE = String(String).split('String');\n\n(module.exports = function (O, key, value, options) {\n var unsafe = options ? !!options.unsafe : false;\n var simple = options ? !!options.enumerable : false;\n var noTargetGet = options ? !!options.noTargetGet : false;\n var state;\n if (typeof value == 'function') {\n if (typeof key == 'string' && !has(value, 'name')) {\n createNonEnumerableProperty(value, 'name', key);\n }\n state = enforceInternalState(value);\n if (!state.source) {\n state.source = TEMPLATE.join(typeof key == 'string' ? key : '');\n }\n }\n if (O === global) {\n if (simple) O[key] = value;\n else setGlobal(key, value);\n return;\n } else if (!unsafe) {\n delete O[key];\n } else if (!noTargetGet && O[key]) {\n simple = true;\n }\n if (simple) O[key] = value;\n else createNonEnumerableProperty(O, key, value);\n// add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative\n})(Function.prototype, 'toString', function toString() {\n return typeof this == 'function' && getInternalState(this).source || inspectSource(this);\n});\n", "var global = require('../internals/global');\n\nmodule.exports = global;\n", "var path = require('../internals/path');\nvar global = require('../internals/global');\n\nvar aFunction = function (variable) {\n return typeof variable == 'function' ? variable : undefined;\n};\n\nmodule.exports = function (namespace, method) {\n return arguments.length < 2 ? aFunction(path[namespace]) || aFunction(global[namespace])\n : path[namespace] && path[namespace][method] || global[namespace] && global[namespace][method];\n};\n", "var ceil = Math.ceil;\nvar floor = Math.floor;\n\n// `ToInteger` abstract operation\n// https://tc39.es/ecma262/#sec-tointeger\nmodule.exports = function (argument) {\n return isNaN(argument = +argument) ? 0 : (argument > 0 ? floor : ceil)(argument);\n};\n", "var toInteger = require('../internals/to-integer');\n\nvar min = Math.min;\n\n// `ToLength` abstract operation\n// https://tc39.es/ecma262/#sec-tolength\nmodule.exports = function (argument) {\n return argument > 0 ? min(toInteger(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991\n};\n", "var toInteger = require('../internals/to-integer');\n\nvar max = Math.max;\nvar min = Math.min;\n\n// Helper for a popular repeating case of the spec:\n// Let integer be ? ToInteger(index).\n// If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length).\nmodule.exports = function (index, length) {\n var integer = toInteger(index);\n return integer < 0 ? max(integer + length, 0) : min(integer, length);\n};\n", "var toIndexedObject = require('../internals/to-indexed-object');\nvar toLength = require('../internals/to-length');\nvar toAbsoluteIndex = require('../internals/to-absolute-index');\n\n// `Array.prototype.{ indexOf, includes }` methods implementation\nvar createMethod = function (IS_INCLUDES) {\n return function ($this, el, fromIndex) {\n var O = toIndexedObject($this);\n var length = toLength(O.length);\n var index = toAbsoluteIndex(fromIndex, length);\n var value;\n // Array#includes uses SameValueZero equality algorithm\n // eslint-disable-next-line no-self-compare -- NaN check\n if (IS_INCLUDES && el != el) while (length > index) {\n value = O[index++];\n // eslint-disable-next-line no-self-compare -- NaN check\n if (value != value) return true;\n // Array#indexOf ignores holes, Array#includes - not\n } else for (;length > index; index++) {\n if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0;\n } return !IS_INCLUDES && -1;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.includes` method\n // https://tc39.es/ecma262/#sec-array.prototype.includes\n includes: createMethod(true),\n // `Array.prototype.indexOf` method\n // https://tc39.es/ecma262/#sec-array.prototype.indexof\n indexOf: createMethod(false)\n};\n", "var has = require('../internals/has');\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar indexOf = require('../internals/array-includes').indexOf;\nvar hiddenKeys = require('../internals/hidden-keys');\n\nmodule.exports = function (object, names) {\n var O = toIndexedObject(object);\n var i = 0;\n var result = [];\n var key;\n for (key in O) !has(hiddenKeys, key) && has(O, key) && result.push(key);\n // Don't enum bug & hidden keys\n while (names.length > i) if (has(O, key = names[i++])) {\n ~indexOf(result, key) || result.push(key);\n }\n return result;\n};\n", "// IE8- don't enum bug keys\nmodule.exports = [\n 'constructor',\n 'hasOwnProperty',\n 'isPrototypeOf',\n 'propertyIsEnumerable',\n 'toLocaleString',\n 'toString',\n 'valueOf'\n];\n", "var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\nvar hiddenKeys = enumBugKeys.concat('length', 'prototype');\n\n// `Object.getOwnPropertyNames` method\n// https://tc39.es/ecma262/#sec-object.getownpropertynames\n// eslint-disable-next-line es/no-object-getownpropertynames -- safe\nexports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {\n return internalObjectKeys(O, hiddenKeys);\n};\n", "// eslint-disable-next-line es/no-object-getownpropertysymbols -- safe\nexports.f = Object.getOwnPropertySymbols;\n", "var getBuiltIn = require('../internals/get-built-in');\nvar getOwnPropertyNamesModule = require('../internals/object-get-own-property-names');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar anObject = require('../internals/an-object');\n\n// all object keys, includes non-enumerable and symbols\nmodule.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) {\n var keys = getOwnPropertyNamesModule.f(anObject(it));\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n return getOwnPropertySymbols ? keys.concat(getOwnPropertySymbols(it)) : keys;\n};\n", "var has = require('../internals/has');\nvar ownKeys = require('../internals/own-keys');\nvar getOwnPropertyDescriptorModule = require('../internals/object-get-own-property-descriptor');\nvar definePropertyModule = require('../internals/object-define-property');\n\nmodule.exports = function (target, source) {\n var keys = ownKeys(source);\n var defineProperty = definePropertyModule.f;\n var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n if (!has(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key));\n }\n};\n", "var fails = require('../internals/fails');\n\nvar replacement = /#|\\.prototype\\./;\n\nvar isForced = function (feature, detection) {\n var value = data[normalize(feature)];\n return value == POLYFILL ? true\n : value == NATIVE ? false\n : typeof detection == 'function' ? fails(detection)\n : !!detection;\n};\n\nvar normalize = isForced.normalize = function (string) {\n return String(string).replace(replacement, '.').toLowerCase();\n};\n\nvar data = isForced.data = {};\nvar NATIVE = isForced.NATIVE = 'N';\nvar POLYFILL = isForced.POLYFILL = 'P';\n\nmodule.exports = isForced;\n", "var global = require('../internals/global');\nvar getOwnPropertyDescriptor = require('../internals/object-get-own-property-descriptor').f;\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar setGlobal = require('../internals/set-global');\nvar copyConstructorProperties = require('../internals/copy-constructor-properties');\nvar isForced = require('../internals/is-forced');\n\n/*\n options.target - name of the target object\n options.global - target is the global object\n options.stat - export as static methods of target\n options.proto - export as prototype methods of target\n options.real - real prototype method for the `pure` version\n options.forced - export even if the native feature is available\n options.bind - bind methods to the target, required for the `pure` version\n options.wrap - wrap constructors to preventing global pollution, required for the `pure` version\n options.unsafe - use the simple assignment of property instead of delete + defineProperty\n options.sham - add a flag to not completely full polyfills\n options.enumerable - export as enumerable property\n options.noTargetGet - prevent calling a getter on target\n*/\nmodule.exports = function (options, source) {\n var TARGET = options.target;\n var GLOBAL = options.global;\n var STATIC = options.stat;\n var FORCED, target, key, targetProperty, sourceProperty, descriptor;\n if (GLOBAL) {\n target = global;\n } else if (STATIC) {\n target = global[TARGET] || setGlobal(TARGET, {});\n } else {\n target = (global[TARGET] || {}).prototype;\n }\n if (target) for (key in source) {\n sourceProperty = source[key];\n if (options.noTargetGet) {\n descriptor = getOwnPropertyDescriptor(target, key);\n targetProperty = descriptor && descriptor.value;\n } else targetProperty = target[key];\n FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced);\n // contained in target\n if (!FORCED && targetProperty !== undefined) {\n if (typeof sourceProperty === typeof targetProperty) continue;\n copyConstructorProperties(sourceProperty, targetProperty);\n }\n // add a flag to not completely full polyfills\n if (options.sham || (targetProperty && targetProperty.sham)) {\n createNonEnumerableProperty(sourceProperty, 'sham', true);\n }\n // extend global\n redefine(target, key, sourceProperty, options);\n }\n};\n", "module.exports = function (it) {\n if (typeof it != 'function') {\n throw TypeError(String(it) + ' is not a function');\n } return it;\n};\n", "var aFunction = require('../internals/a-function');\n\n// optional / simple context binding\nmodule.exports = function (fn, that, length) {\n aFunction(fn);\n if (that === undefined) return fn;\n switch (length) {\n case 0: return function () {\n return fn.call(that);\n };\n case 1: return function (a) {\n return fn.call(that, a);\n };\n case 2: return function (a, b) {\n return fn.call(that, a, b);\n };\n case 3: return function (a, b, c) {\n return fn.call(that, a, b, c);\n };\n }\n return function (/* ...args */) {\n return fn.apply(that, arguments);\n };\n};\n", "var classof = require('../internals/classof-raw');\n\n// `IsArray` abstract operation\n// https://tc39.es/ecma262/#sec-isarray\n// eslint-disable-next-line es/no-array-isarray -- safe\nmodule.exports = Array.isArray || function isArray(arg) {\n return classof(arg) == 'Array';\n};\n", "var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('navigator', 'userAgent') || '';\n", "var global = require('../internals/global');\nvar userAgent = require('../internals/engine-user-agent');\n\nvar process = global.process;\nvar versions = process && process.versions;\nvar v8 = versions && versions.v8;\nvar match, version;\n\nif (v8) {\n match = v8.split('.');\n version = match[0] < 4 ? 1 : match[0] + match[1];\n} else if (userAgent) {\n match = userAgent.match(/Edge\\/(\\d+)/);\n if (!match || match[1] >= 74) {\n match = userAgent.match(/Chrome\\/(\\d+)/);\n if (match) version = match[1];\n }\n}\n\nmodule.exports = version && +version;\n", "/* eslint-disable es/no-symbol -- required for testing */\nvar V8_VERSION = require('../internals/engine-v8-version');\nvar fails = require('../internals/fails');\n\n// eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing\nmodule.exports = !!Object.getOwnPropertySymbols && !fails(function () {\n var symbol = Symbol();\n // Chrome 38 Symbol has incorrect toString conversion\n // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances\n return !String(symbol) || !(Object(symbol) instanceof Symbol) ||\n // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances\n !Symbol.sham && V8_VERSION && V8_VERSION < 41;\n});\n", "/* eslint-disable es/no-symbol -- required for testing */\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\n\nmodule.exports = NATIVE_SYMBOL\n && !Symbol.sham\n && typeof Symbol.iterator == 'symbol';\n", "var global = require('../internals/global');\nvar shared = require('../internals/shared');\nvar has = require('../internals/has');\nvar uid = require('../internals/uid');\nvar NATIVE_SYMBOL = require('../internals/native-symbol');\nvar USE_SYMBOL_AS_UID = require('../internals/use-symbol-as-uid');\n\nvar WellKnownSymbolsStore = shared('wks');\nvar Symbol = global.Symbol;\nvar createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid;\n\nmodule.exports = function (name) {\n if (!has(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) {\n if (NATIVE_SYMBOL && has(Symbol, name)) {\n WellKnownSymbolsStore[name] = Symbol[name];\n } else {\n WellKnownSymbolsStore[name] = createWellKnownSymbol('Symbol.' + name);\n }\n } return WellKnownSymbolsStore[name];\n};\n", "var isObject = require('../internals/is-object');\nvar isArray = require('../internals/is-array');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar SPECIES = wellKnownSymbol('species');\n\n// `ArraySpeciesCreate` abstract operation\n// https://tc39.es/ecma262/#sec-arrayspeciescreate\nmodule.exports = function (originalArray, length) {\n var C;\n if (isArray(originalArray)) {\n C = originalArray.constructor;\n // cross-realm fallback\n if (typeof C == 'function' && (C === Array || isArray(C.prototype))) C = undefined;\n else if (isObject(C)) {\n C = C[SPECIES];\n if (C === null) C = undefined;\n }\n } return new (C === undefined ? Array : C)(length === 0 ? 0 : length);\n};\n", "var bind = require('../internals/function-bind-context');\nvar IndexedObject = require('../internals/indexed-object');\nvar toObject = require('../internals/to-object');\nvar toLength = require('../internals/to-length');\nvar arraySpeciesCreate = require('../internals/array-species-create');\n\nvar push = [].push;\n\n// `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterOut }` methods implementation\nvar createMethod = function (TYPE) {\n var IS_MAP = TYPE == 1;\n var IS_FILTER = TYPE == 2;\n var IS_SOME = TYPE == 3;\n var IS_EVERY = TYPE == 4;\n var IS_FIND_INDEX = TYPE == 6;\n var IS_FILTER_OUT = TYPE == 7;\n var NO_HOLES = TYPE == 5 || IS_FIND_INDEX;\n return function ($this, callbackfn, that, specificCreate) {\n var O = toObject($this);\n var self = IndexedObject(O);\n var boundFunction = bind(callbackfn, that, 3);\n var length = toLength(self.length);\n var index = 0;\n var create = specificCreate || arraySpeciesCreate;\n var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_OUT ? create($this, 0) : undefined;\n var value, result;\n for (;length > index; index++) if (NO_HOLES || index in self) {\n value = self[index];\n result = boundFunction(value, index, O);\n if (TYPE) {\n if (IS_MAP) target[index] = result; // map\n else if (result) switch (TYPE) {\n case 3: return true; // some\n case 5: return value; // find\n case 6: return index; // findIndex\n case 2: push.call(target, value); // filter\n } else switch (TYPE) {\n case 4: return false; // every\n case 7: push.call(target, value); // filterOut\n }\n }\n }\n return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.forEach` method\n // https://tc39.es/ecma262/#sec-array.prototype.foreach\n forEach: createMethod(0),\n // `Array.prototype.map` method\n // https://tc39.es/ecma262/#sec-array.prototype.map\n map: createMethod(1),\n // `Array.prototype.filter` method\n // https://tc39.es/ecma262/#sec-array.prototype.filter\n filter: createMethod(2),\n // `Array.prototype.some` method\n // https://tc39.es/ecma262/#sec-array.prototype.some\n some: createMethod(3),\n // `Array.prototype.every` method\n // https://tc39.es/ecma262/#sec-array.prototype.every\n every: createMethod(4),\n // `Array.prototype.find` method\n // https://tc39.es/ecma262/#sec-array.prototype.find\n find: createMethod(5),\n // `Array.prototype.findIndex` method\n // https://tc39.es/ecma262/#sec-array.prototype.findIndex\n findIndex: createMethod(6),\n // `Array.prototype.filterOut` method\n // https://github.com/tc39/proposal-array-filtering\n filterOut: createMethod(7)\n};\n", "'use strict';\nvar fails = require('../internals/fails');\n\nmodule.exports = function (METHOD_NAME, argument) {\n var method = [][METHOD_NAME];\n return !!method && fails(function () {\n // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing\n method.call(null, argument || function () { throw 1; }, 1);\n });\n};\n", "'use strict';\nvar $forEach = require('../internals/array-iteration').forEach;\nvar arrayMethodIsStrict = require('../internals/array-method-is-strict');\n\nvar STRICT_METHOD = arrayMethodIsStrict('forEach');\n\n// `Array.prototype.forEach` method implementation\n// https://tc39.es/ecma262/#sec-array.prototype.foreach\nmodule.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {\n return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);\n// eslint-disable-next-line es/no-array-prototype-foreach -- safe\n} : [].forEach;\n", "// iterable DOM collections\n// flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods\nmodule.exports = {\n CSSRuleList: 0,\n CSSStyleDeclaration: 0,\n CSSValueList: 0,\n ClientRectList: 0,\n DOMRectList: 0,\n DOMStringList: 0,\n DOMTokenList: 1,\n DataTransferItemList: 0,\n FileList: 0,\n HTMLAllCollection: 0,\n HTMLCollection: 0,\n HTMLFormElement: 0,\n HTMLSelectElement: 0,\n MediaList: 0,\n MimeTypeArray: 0,\n NamedNodeMap: 0,\n NodeList: 1,\n PaintRequestList: 0,\n Plugin: 0,\n PluginArray: 0,\n SVGLengthList: 0,\n SVGNumberList: 0,\n SVGPathSegList: 0,\n SVGPointList: 0,\n SVGStringList: 0,\n SVGTransformList: 0,\n SourceBufferList: 0,\n StyleSheetList: 0,\n TextTrackCueList: 0,\n TextTrackList: 0,\n TouchList: 0\n};\n", "var canUseDOM = !!(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nmodule.exports = canUseDOM;", "var fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar V8_VERSION = require('../internals/engine-v8-version');\n\nvar SPECIES = wellKnownSymbol('species');\n\nmodule.exports = function (METHOD_NAME) {\n // We can't use this feature detection in V8 since it causes\n // deoptimization and serious performance degradation\n // https://github.com/zloirock/core-js/issues/677\n return V8_VERSION >= 51 || !fails(function () {\n var array = [];\n var constructor = array.constructor = {};\n constructor[SPECIES] = function () {\n return { foo: 1 };\n };\n return array[METHOD_NAME](Boolean).foo !== 1;\n });\n};\n", "var internalObjectKeys = require('../internals/object-keys-internal');\nvar enumBugKeys = require('../internals/enum-bug-keys');\n\n// `Object.keys` method\n// https://tc39.es/ecma262/#sec-object.keys\n// eslint-disable-next-line es/no-object-keys -- safe\nmodule.exports = Object.keys || function keys(O) {\n return internalObjectKeys(O, enumBugKeys);\n};\n", "var DESCRIPTORS = require('../internals/descriptors');\nvar definePropertyModule = require('../internals/object-define-property');\nvar anObject = require('../internals/an-object');\nvar objectKeys = require('../internals/object-keys');\n\n// `Object.defineProperties` method\n// https://tc39.es/ecma262/#sec-object.defineproperties\n// eslint-disable-next-line es/no-object-defineproperties -- safe\nmodule.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) {\n anObject(O);\n var keys = objectKeys(Properties);\n var length = keys.length;\n var index = 0;\n var key;\n while (length > index) definePropertyModule.f(O, key = keys[index++], Properties[key]);\n return O;\n};\n", "var getBuiltIn = require('../internals/get-built-in');\n\nmodule.exports = getBuiltIn('document', 'documentElement');\n", "var anObject = require('../internals/an-object');\nvar defineProperties = require('../internals/object-define-properties');\nvar enumBugKeys = require('../internals/enum-bug-keys');\nvar hiddenKeys = require('../internals/hidden-keys');\nvar html = require('../internals/html');\nvar documentCreateElement = require('../internals/document-create-element');\nvar sharedKey = require('../internals/shared-key');\n\nvar GT = '>';\nvar LT = '<';\nvar PROTOTYPE = 'prototype';\nvar SCRIPT = 'script';\nvar IE_PROTO = sharedKey('IE_PROTO');\n\nvar EmptyConstructor = function () { /* empty */ };\n\nvar scriptTag = function (content) {\n return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT;\n};\n\n// Create object with fake `null` prototype: use ActiveX Object with cleared prototype\nvar NullProtoObjectViaActiveX = function (activeXDocument) {\n activeXDocument.write(scriptTag(''));\n activeXDocument.close();\n var temp = activeXDocument.parentWindow.Object;\n activeXDocument = null; // avoid memory leak\n return temp;\n};\n\n// Create object with fake `null` prototype: use iframe Object with cleared prototype\nvar NullProtoObjectViaIFrame = function () {\n // Thrash, waste and sodomy: IE GC bug\n var iframe = documentCreateElement('iframe');\n var JS = 'java' + SCRIPT + ':';\n var iframeDocument;\n iframe.style.display = 'none';\n html.appendChild(iframe);\n // https://github.com/zloirock/core-js/issues/475\n iframe.src = String(JS);\n iframeDocument = iframe.contentWindow.document;\n iframeDocument.open();\n iframeDocument.write(scriptTag('document.F=Object'));\n iframeDocument.close();\n return iframeDocument.F;\n};\n\n// Check for document.domain and active x support\n// No need to use active x approach when document.domain is not set\n// see https://github.com/es-shims/es5-shim/issues/150\n// variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346\n// avoid IE GC bug\nvar activeXDocument;\nvar NullProtoObject = function () {\n try {\n /* global ActiveXObject -- old IE */\n activeXDocument = document.domain && new ActiveXObject('htmlfile');\n } catch (error) { /* ignore */ }\n NullProtoObject = activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) : NullProtoObjectViaIFrame();\n var length = enumBugKeys.length;\n while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];\n return NullProtoObject();\n};\n\nhiddenKeys[IE_PROTO] = true;\n\n// `Object.create` method\n// https://tc39.es/ecma262/#sec-object.create\nmodule.exports = Object.create || function create(O, Properties) {\n var result;\n if (O !== null) {\n EmptyConstructor[PROTOTYPE] = anObject(O);\n result = new EmptyConstructor();\n EmptyConstructor[PROTOTYPE] = null;\n // add \"__proto__\" for Object.getPrototypeOf polyfill\n result[IE_PROTO] = O;\n } else result = NullProtoObject();\n return Properties === undefined ? result : defineProperties(result, Properties);\n};\n", "var wellKnownSymbol = require('../internals/well-known-symbol');\nvar create = require('../internals/object-create');\nvar definePropertyModule = require('../internals/object-define-property');\n\nvar UNSCOPABLES = wellKnownSymbol('unscopables');\nvar ArrayPrototype = Array.prototype;\n\n// Array.prototype[@@unscopables]\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\nif (ArrayPrototype[UNSCOPABLES] == undefined) {\n definePropertyModule.f(ArrayPrototype, UNSCOPABLES, {\n configurable: true,\n value: create(null)\n });\n}\n\n// add a key to Array.prototype[@@unscopables]\nmodule.exports = function (key) {\n ArrayPrototype[UNSCOPABLES][key] = true;\n};\n", "module.exports = {};\n", "var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n function F() { /* empty */ }\n F.prototype.constructor = null;\n // eslint-disable-next-line es/no-object-getprototypeof -- required for testing\n return Object.getPrototypeOf(new F()) !== F.prototype;\n});\n", "var has = require('../internals/has');\nvar toObject = require('../internals/to-object');\nvar sharedKey = require('../internals/shared-key');\nvar CORRECT_PROTOTYPE_GETTER = require('../internals/correct-prototype-getter');\n\nvar IE_PROTO = sharedKey('IE_PROTO');\nvar ObjectPrototype = Object.prototype;\n\n// `Object.getPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.getprototypeof\n// eslint-disable-next-line es/no-object-getprototypeof -- safe\nmodule.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) {\n O = toObject(O);\n if (has(O, IE_PROTO)) return O[IE_PROTO];\n if (typeof O.constructor == 'function' && O instanceof O.constructor) {\n return O.constructor.prototype;\n } return O instanceof Object ? ObjectPrototype : null;\n};\n", "'use strict';\nvar fails = require('../internals/fails');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar BUGGY_SAFARI_ITERATORS = false;\n\nvar returnThis = function () { return this; };\n\n// `%IteratorPrototype%` object\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-object\nvar IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator;\n\n/* eslint-disable es/no-array-prototype-keys -- safe */\nif ([].keys) {\n arrayIterator = [].keys();\n // Safari 8 has buggy iterators w/o `next`\n if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true;\n else {\n PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator));\n if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype;\n }\n}\n\nvar NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () {\n var test = {};\n // FF44- legacy iterators case\n return IteratorPrototype[ITERATOR].call(test) !== test;\n});\n\nif (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {};\n\n// `%IteratorPrototype%[@@iterator]()` method\n// https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator\nif ((!IS_PURE || NEW_ITERATOR_PROTOTYPE) && !has(IteratorPrototype, ITERATOR)) {\n createNonEnumerableProperty(IteratorPrototype, ITERATOR, returnThis);\n}\n\nmodule.exports = {\n IteratorPrototype: IteratorPrototype,\n BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS\n};\n", "var defineProperty = require('../internals/object-define-property').f;\nvar has = require('../internals/has');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n\nmodule.exports = function (it, TAG, STATIC) {\n if (it && !has(it = STATIC ? it : it.prototype, TO_STRING_TAG)) {\n defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG });\n }\n};\n", "'use strict';\nvar IteratorPrototype = require('../internals/iterators-core').IteratorPrototype;\nvar create = require('../internals/object-create');\nvar createPropertyDescriptor = require('../internals/create-property-descriptor');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar Iterators = require('../internals/iterators');\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (IteratorConstructor, NAME, next) {\n var TO_STRING_TAG = NAME + ' Iterator';\n IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) });\n setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true);\n Iterators[TO_STRING_TAG] = returnThis;\n return IteratorConstructor;\n};\n", "var isObject = require('../internals/is-object');\n\nmodule.exports = function (it) {\n if (!isObject(it) && it !== null) {\n throw TypeError(\"Can't set \" + String(it) + ' as a prototype');\n } return it;\n};\n", "/* eslint-disable no-proto -- safe */\nvar anObject = require('../internals/an-object');\nvar aPossiblePrototype = require('../internals/a-possible-prototype');\n\n// `Object.setPrototypeOf` method\n// https://tc39.es/ecma262/#sec-object.setprototypeof\n// Works with __proto__ only. Old v8 can't work with null proto objects.\n// eslint-disable-next-line es/no-object-setprototypeof -- safe\nmodule.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () {\n var CORRECT_SETTER = false;\n var test = {};\n var setter;\n try {\n // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe\n setter = Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set;\n setter.call(test, []);\n CORRECT_SETTER = test instanceof Array;\n } catch (error) { /* empty */ }\n return function setPrototypeOf(O, proto) {\n anObject(O);\n aPossiblePrototype(proto);\n if (CORRECT_SETTER) setter.call(O, proto);\n else O.__proto__ = proto;\n return O;\n };\n}() : undefined);\n", "'use strict';\nvar $ = require('../internals/export');\nvar createIteratorConstructor = require('../internals/create-iterator-constructor');\nvar getPrototypeOf = require('../internals/object-get-prototype-of');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\nvar redefine = require('../internals/redefine');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar IS_PURE = require('../internals/is-pure');\nvar Iterators = require('../internals/iterators');\nvar IteratorsCore = require('../internals/iterators-core');\n\nvar IteratorPrototype = IteratorsCore.IteratorPrototype;\nvar BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS;\nvar ITERATOR = wellKnownSymbol('iterator');\nvar KEYS = 'keys';\nvar VALUES = 'values';\nvar ENTRIES = 'entries';\n\nvar returnThis = function () { return this; };\n\nmodule.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) {\n createIteratorConstructor(IteratorConstructor, NAME, next);\n\n var getIterationMethod = function (KIND) {\n if (KIND === DEFAULT && defaultIterator) return defaultIterator;\n if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND];\n switch (KIND) {\n case KEYS: return function keys() { return new IteratorConstructor(this, KIND); };\n case VALUES: return function values() { return new IteratorConstructor(this, KIND); };\n case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); };\n } return function () { return new IteratorConstructor(this); };\n };\n\n var TO_STRING_TAG = NAME + ' Iterator';\n var INCORRECT_VALUES_NAME = false;\n var IterablePrototype = Iterable.prototype;\n var nativeIterator = IterablePrototype[ITERATOR]\n || IterablePrototype['@@iterator']\n || DEFAULT && IterablePrototype[DEFAULT];\n var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT);\n var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator;\n var CurrentIteratorPrototype, methods, KEY;\n\n // fix native\n if (anyNativeIterator) {\n CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable()));\n if (IteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) {\n if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) {\n if (setPrototypeOf) {\n setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype);\n } else if (typeof CurrentIteratorPrototype[ITERATOR] != 'function') {\n createNonEnumerableProperty(CurrentIteratorPrototype, ITERATOR, returnThis);\n }\n }\n // Set @@toStringTag to native iterators\n setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true);\n if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis;\n }\n }\n\n // fix Array.prototype.{ values, @@iterator }.name in V8 / FF\n if (DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) {\n INCORRECT_VALUES_NAME = true;\n defaultIterator = function values() { return nativeIterator.call(this); };\n }\n\n // define iterator\n if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) {\n createNonEnumerableProperty(IterablePrototype, ITERATOR, defaultIterator);\n }\n Iterators[NAME] = defaultIterator;\n\n // export additional methods\n if (DEFAULT) {\n methods = {\n values: getIterationMethod(VALUES),\n keys: IS_SET ? defaultIterator : getIterationMethod(KEYS),\n entries: getIterationMethod(ENTRIES)\n };\n if (FORCED) for (KEY in methods) {\n if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) {\n redefine(IterablePrototype, KEY, methods[KEY]);\n }\n } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods);\n }\n\n return methods;\n};\n", "'use strict';\nvar toIndexedObject = require('../internals/to-indexed-object');\nvar addToUnscopables = require('../internals/add-to-unscopables');\nvar Iterators = require('../internals/iterators');\nvar InternalStateModule = require('../internals/internal-state');\nvar defineIterator = require('../internals/define-iterator');\n\nvar ARRAY_ITERATOR = 'Array Iterator';\nvar setInternalState = InternalStateModule.set;\nvar getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR);\n\n// `Array.prototype.entries` method\n// https://tc39.es/ecma262/#sec-array.prototype.entries\n// `Array.prototype.keys` method\n// https://tc39.es/ecma262/#sec-array.prototype.keys\n// `Array.prototype.values` method\n// https://tc39.es/ecma262/#sec-array.prototype.values\n// `Array.prototype[@@iterator]` method\n// https://tc39.es/ecma262/#sec-array.prototype-@@iterator\n// `CreateArrayIterator` internal method\n// https://tc39.es/ecma262/#sec-createarrayiterator\nmodule.exports = defineIterator(Array, 'Array', function (iterated, kind) {\n setInternalState(this, {\n type: ARRAY_ITERATOR,\n target: toIndexedObject(iterated), // target\n index: 0, // next index\n kind: kind // kind\n });\n// `%ArrayIteratorPrototype%.next` method\n// https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next\n}, function () {\n var state = getInternalState(this);\n var target = state.target;\n var kind = state.kind;\n var index = state.index++;\n if (!target || index >= target.length) {\n state.target = undefined;\n return { value: undefined, done: true };\n }\n if (kind == 'keys') return { value: index, done: false };\n if (kind == 'values') return { value: target[index], done: false };\n return { value: [index, target[index]], done: false };\n}, 'values');\n\n// argumentsList[@@iterator] is %ArrayProto_values%\n// https://tc39.es/ecma262/#sec-createunmappedargumentsobject\n// https://tc39.es/ecma262/#sec-createmappedargumentsobject\nIterators.Arguments = Iterators.Array;\n\n// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables\naddToUnscopables('keys');\naddToUnscopables('values');\naddToUnscopables('entries');\n", "'use strict';\nvar DESCRIPTORS = require('../internals/descriptors');\nvar fails = require('../internals/fails');\nvar objectKeys = require('../internals/object-keys');\nvar getOwnPropertySymbolsModule = require('../internals/object-get-own-property-symbols');\nvar propertyIsEnumerableModule = require('../internals/object-property-is-enumerable');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\n\n// eslint-disable-next-line es/no-object-assign -- safe\nvar $assign = Object.assign;\n// eslint-disable-next-line es/no-object-defineproperty -- required for testing\nvar defineProperty = Object.defineProperty;\n\n// `Object.assign` method\n// https://tc39.es/ecma262/#sec-object.assign\nmodule.exports = !$assign || fails(function () {\n // should have correct order of operations (Edge bug)\n if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', {\n enumerable: true,\n get: function () {\n defineProperty(this, 'b', {\n value: 3,\n enumerable: false\n });\n }\n }), { b: 2 })).b !== 1) return true;\n // should work with symbols and should have deterministic property order (V8 bug)\n var A = {};\n var B = {};\n // eslint-disable-next-line es/no-symbol -- safe\n var symbol = Symbol();\n var alphabet = 'abcdefghijklmnopqrst';\n A[symbol] = 7;\n alphabet.split('').forEach(function (chr) { B[chr] = chr; });\n return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet;\n}) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length`\n var T = toObject(target);\n var argumentsLength = arguments.length;\n var index = 1;\n var getOwnPropertySymbols = getOwnPropertySymbolsModule.f;\n var propertyIsEnumerable = propertyIsEnumerableModule.f;\n while (argumentsLength > index) {\n var S = IndexedObject(arguments[index++]);\n var keys = getOwnPropertySymbols ? objectKeys(S).concat(getOwnPropertySymbols(S)) : objectKeys(S);\n var length = keys.length;\n var j = 0;\n var key;\n while (length > j) {\n key = keys[j++];\n if (!DESCRIPTORS || propertyIsEnumerable.call(S, key)) T[key] = S[key];\n }\n } return T;\n} : $assign;\n", "var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\nvar test = {};\n\ntest[TO_STRING_TAG] = 'z';\n\nmodule.exports = String(test) === '[object z]';\n", "var TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classofRaw = require('../internals/classof-raw');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar TO_STRING_TAG = wellKnownSymbol('toStringTag');\n// ES3 wrong here\nvar CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments';\n\n// fallback for IE11 Script Access Denied error\nvar tryGet = function (it, key) {\n try {\n return it[key];\n } catch (error) { /* empty */ }\n};\n\n// getting tag from ES6+ `Object.prototype.toString`\nmodule.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) {\n var O, tag, result;\n return it === undefined ? 'Undefined' : it === null ? 'Null'\n // @@toStringTag case\n : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag\n // builtinTag case\n : CORRECT_ARGUMENTS ? classofRaw(O)\n // ES3 arguments fallback\n : (result = classofRaw(O)) == 'Object' && typeof O.callee == 'function' ? 'Arguments' : result;\n};\n", "'use strict';\nvar TO_STRING_TAG_SUPPORT = require('../internals/to-string-tag-support');\nvar classof = require('../internals/classof');\n\n// `Object.prototype.toString` method implementation\n// https://tc39.es/ecma262/#sec-object.prototype.tostring\nmodule.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() {\n return '[object ' + classof(this) + ']';\n};\n", "// a string of all valid unicode whitespaces\nmodule.exports = '\\u0009\\u000A\\u000B\\u000C\\u000D\\u0020\\u00A0\\u1680\\u2000\\u2001\\u2002' +\n '\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200A\\u202F\\u205F\\u3000\\u2028\\u2029\\uFEFF';\n", "var requireObjectCoercible = require('../internals/require-object-coercible');\nvar whitespaces = require('../internals/whitespaces');\n\nvar whitespace = '[' + whitespaces + ']';\nvar ltrim = RegExp('^' + whitespace + whitespace + '*');\nvar rtrim = RegExp(whitespace + whitespace + '*$');\n\n// `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation\nvar createMethod = function (TYPE) {\n return function ($this) {\n var string = String(requireObjectCoercible($this));\n if (TYPE & 1) string = string.replace(ltrim, '');\n if (TYPE & 2) string = string.replace(rtrim, '');\n return string;\n };\n};\n\nmodule.exports = {\n // `String.prototype.{ trimLeft, trimStart }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimstart\n start: createMethod(1),\n // `String.prototype.{ trimRight, trimEnd }` methods\n // https://tc39.es/ecma262/#sec-string.prototype.trimend\n end: createMethod(2),\n // `String.prototype.trim` method\n // https://tc39.es/ecma262/#sec-string.prototype.trim\n trim: createMethod(3)\n};\n", "var global = require('../internals/global');\nvar trim = require('../internals/string-trim').trim;\nvar whitespaces = require('../internals/whitespaces');\n\nvar $parseInt = global.parseInt;\nvar hex = /^[+-]?0[Xx]/;\nvar FORCED = $parseInt(whitespaces + '08') !== 8 || $parseInt(whitespaces + '0x16') !== 22;\n\n// `parseInt` method\n// https://tc39.es/ecma262/#sec-parseint-string-radix\nmodule.exports = FORCED ? function parseInt(string, radix) {\n var S = trim(String(string));\n return $parseInt(S, (radix >>> 0) || (hex.test(S) ? 16 : 10));\n} : $parseInt;\n", "var toInteger = require('../internals/to-integer');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\n\n// `String.prototype.{ codePointAt, at }` methods implementation\nvar createMethod = function (CONVERT_TO_STRING) {\n return function ($this, pos) {\n var S = String(requireObjectCoercible($this));\n var position = toInteger(pos);\n var size = S.length;\n var first, second;\n if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined;\n first = S.charCodeAt(position);\n return first < 0xD800 || first > 0xDBFF || position + 1 === size\n || (second = S.charCodeAt(position + 1)) < 0xDC00 || second > 0xDFFF\n ? CONVERT_TO_STRING ? S.charAt(position) : first\n : CONVERT_TO_STRING ? S.slice(position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;\n };\n};\n\nmodule.exports = {\n // `String.prototype.codePointAt` method\n // https://tc39.es/ecma262/#sec-string.prototype.codepointat\n codeAt: createMethod(false),\n // `String.prototype.at` method\n // https://github.com/mathiasbynens/String.prototype.at\n charAt: createMethod(true)\n};\n", "var redefine = require('../internals/redefine');\n\nmodule.exports = function (target, src, options) {\n for (var key in src) redefine(target, key, src[key], options);\n return target;\n};\n", "var fails = require('../internals/fails');\n\nmodule.exports = !fails(function () {\n // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing\n return Object.isExtensible(Object.preventExtensions({}));\n});\n", "var hiddenKeys = require('../internals/hidden-keys');\nvar isObject = require('../internals/is-object');\nvar has = require('../internals/has');\nvar defineProperty = require('../internals/object-define-property').f;\nvar uid = require('../internals/uid');\nvar FREEZING = require('../internals/freezing');\n\nvar METADATA = uid('meta');\nvar id = 0;\n\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = Object.isExtensible || function () {\n return true;\n};\n\nvar setMetadata = function (it) {\n defineProperty(it, METADATA, { value: {\n objectID: 'O' + ++id, // object ID\n weakData: {} // weak collections IDs\n } });\n};\n\nvar fastKey = function (it, create) {\n // return a primitive with prefix\n if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it;\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return 'F';\n // not necessary to add metadata\n if (!create) return 'E';\n // add missing metadata\n setMetadata(it);\n // return object ID\n } return it[METADATA].objectID;\n};\n\nvar getWeakData = function (it, create) {\n if (!has(it, METADATA)) {\n // can't set metadata to uncaught frozen object\n if (!isExtensible(it)) return true;\n // not necessary to add metadata\n if (!create) return false;\n // add missing metadata\n setMetadata(it);\n // return the store of weak collections IDs\n } return it[METADATA].weakData;\n};\n\n// add metadata on freeze-family methods calling\nvar onFreeze = function (it) {\n if (FREEZING && meta.REQUIRED && isExtensible(it) && !has(it, METADATA)) setMetadata(it);\n return it;\n};\n\nvar meta = module.exports = {\n REQUIRED: false,\n fastKey: fastKey,\n getWeakData: getWeakData,\n onFreeze: onFreeze\n};\n\nhiddenKeys[METADATA] = true;\n", "var wellKnownSymbol = require('../internals/well-known-symbol');\nvar Iterators = require('../internals/iterators');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar ArrayPrototype = Array.prototype;\n\n// check on default Array iterator\nmodule.exports = function (it) {\n return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it);\n};\n", "var classof = require('../internals/classof');\nvar Iterators = require('../internals/iterators');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\n\nmodule.exports = function (it) {\n if (it != undefined) return it[ITERATOR]\n || it['@@iterator']\n || Iterators[classof(it)];\n};\n", "var anObject = require('../internals/an-object');\n\nmodule.exports = function (iterator) {\n var returnMethod = iterator['return'];\n if (returnMethod !== undefined) {\n return anObject(returnMethod.call(iterator)).value;\n }\n};\n", "var anObject = require('../internals/an-object');\nvar isArrayIteratorMethod = require('../internals/is-array-iterator-method');\nvar toLength = require('../internals/to-length');\nvar bind = require('../internals/function-bind-context');\nvar getIteratorMethod = require('../internals/get-iterator-method');\nvar iteratorClose = require('../internals/iterator-close');\n\nvar Result = function (stopped, result) {\n this.stopped = stopped;\n this.result = result;\n};\n\nmodule.exports = function (iterable, unboundFunction, options) {\n var that = options && options.that;\n var AS_ENTRIES = !!(options && options.AS_ENTRIES);\n var IS_ITERATOR = !!(options && options.IS_ITERATOR);\n var INTERRUPTED = !!(options && options.INTERRUPTED);\n var fn = bind(unboundFunction, that, 1 + AS_ENTRIES + INTERRUPTED);\n var iterator, iterFn, index, length, result, next, step;\n\n var stop = function (condition) {\n if (iterator) iteratorClose(iterator);\n return new Result(true, condition);\n };\n\n var callFn = function (value) {\n if (AS_ENTRIES) {\n anObject(value);\n return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]);\n } return INTERRUPTED ? fn(value, stop) : fn(value);\n };\n\n if (IS_ITERATOR) {\n iterator = iterable;\n } else {\n iterFn = getIteratorMethod(iterable);\n if (typeof iterFn != 'function') throw TypeError('Target is not iterable');\n // optimisation for array iterators\n if (isArrayIteratorMethod(iterFn)) {\n for (index = 0, length = toLength(iterable.length); length > index; index++) {\n result = callFn(iterable[index]);\n if (result && result instanceof Result) return result;\n } return new Result(false);\n }\n iterator = iterFn.call(iterable);\n }\n\n next = iterator.next;\n while (!(step = next.call(iterator)).done) {\n try {\n result = callFn(step.value);\n } catch (error) {\n iteratorClose(iterator);\n throw error;\n }\n if (typeof result == 'object' && result && result instanceof Result) return result;\n } return new Result(false);\n};\n", "module.exports = function (it, Constructor, name) {\n if (!(it instanceof Constructor)) {\n throw TypeError('Incorrect ' + (name ? name + ' ' : '') + 'invocation');\n } return it;\n};\n", "var wellKnownSymbol = require('../internals/well-known-symbol');\n\nvar ITERATOR = wellKnownSymbol('iterator');\nvar SAFE_CLOSING = false;\n\ntry {\n var called = 0;\n var iteratorWithReturn = {\n next: function () {\n return { done: !!called++ };\n },\n 'return': function () {\n SAFE_CLOSING = true;\n }\n };\n iteratorWithReturn[ITERATOR] = function () {\n return this;\n };\n // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing\n Array.from(iteratorWithReturn, function () { throw 2; });\n} catch (error) { /* empty */ }\n\nmodule.exports = function (exec, SKIP_CLOSING) {\n if (!SKIP_CLOSING && !SAFE_CLOSING) return false;\n var ITERATION_SUPPORT = false;\n try {\n var object = {};\n object[ITERATOR] = function () {\n return {\n next: function () {\n return { done: ITERATION_SUPPORT = true };\n }\n };\n };\n exec(object);\n } catch (error) { /* empty */ }\n return ITERATION_SUPPORT;\n};\n", "var isObject = require('../internals/is-object');\nvar setPrototypeOf = require('../internals/object-set-prototype-of');\n\n// makes subclassing work correct for wrapped built-ins\nmodule.exports = function ($this, dummy, Wrapper) {\n var NewTarget, NewTargetPrototype;\n if (\n // it can work only with native `setPrototypeOf`\n setPrototypeOf &&\n // we haven't completely correct pre-ES6 way for getting `new.target`, so use this\n typeof (NewTarget = dummy.constructor) == 'function' &&\n NewTarget !== Wrapper &&\n isObject(NewTargetPrototype = NewTarget.prototype) &&\n NewTargetPrototype !== Wrapper.prototype\n ) setPrototypeOf($this, NewTargetPrototype);\n return $this;\n};\n", "'use strict';\nvar $ = require('../internals/export');\nvar global = require('../internals/global');\nvar isForced = require('../internals/is-forced');\nvar redefine = require('../internals/redefine');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar iterate = require('../internals/iterate');\nvar anInstance = require('../internals/an-instance');\nvar isObject = require('../internals/is-object');\nvar fails = require('../internals/fails');\nvar checkCorrectnessOfIteration = require('../internals/check-correctness-of-iteration');\nvar setToStringTag = require('../internals/set-to-string-tag');\nvar inheritIfRequired = require('../internals/inherit-if-required');\n\nmodule.exports = function (CONSTRUCTOR_NAME, wrapper, common) {\n var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;\n var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;\n var ADDER = IS_MAP ? 'set' : 'add';\n var NativeConstructor = global[CONSTRUCTOR_NAME];\n var NativePrototype = NativeConstructor && NativeConstructor.prototype;\n var Constructor = NativeConstructor;\n var exported = {};\n\n var fixMethod = function (KEY) {\n var nativeMethod = NativePrototype[KEY];\n redefine(NativePrototype, KEY,\n KEY == 'add' ? function add(value) {\n nativeMethod.call(this, value === 0 ? 0 : value);\n return this;\n } : KEY == 'delete' ? function (key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'get' ? function get(key) {\n return IS_WEAK && !isObject(key) ? undefined : nativeMethod.call(this, key === 0 ? 0 : key);\n } : KEY == 'has' ? function has(key) {\n return IS_WEAK && !isObject(key) ? false : nativeMethod.call(this, key === 0 ? 0 : key);\n } : function set(key, value) {\n nativeMethod.call(this, key === 0 ? 0 : key, value);\n return this;\n }\n );\n };\n\n var REPLACE = isForced(\n CONSTRUCTOR_NAME,\n typeof NativeConstructor != 'function' || !(IS_WEAK || NativePrototype.forEach && !fails(function () {\n new NativeConstructor().entries().next();\n }))\n );\n\n if (REPLACE) {\n // create collection constructor\n Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER);\n InternalMetadataModule.REQUIRED = true;\n } else if (isForced(CONSTRUCTOR_NAME, true)) {\n var instance = new Constructor();\n // early implementations not supports chaining\n var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;\n // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false\n var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); });\n // most early implementations doesn't supports iterables, most modern - not close it correctly\n // eslint-disable-next-line no-new -- required for testing\n var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); });\n // for early implementations -0 and +0 not the same\n var BUGGY_ZERO = !IS_WEAK && fails(function () {\n // V8 ~ Chromium 42- fails only with 5+ elements\n var $instance = new NativeConstructor();\n var index = 5;\n while (index--) $instance[ADDER](index, index);\n return !$instance.has(-0);\n });\n\n if (!ACCEPT_ITERABLES) {\n Constructor = wrapper(function (dummy, iterable) {\n anInstance(dummy, Constructor, CONSTRUCTOR_NAME);\n var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor);\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n return that;\n });\n Constructor.prototype = NativePrototype;\n NativePrototype.constructor = Constructor;\n }\n\n if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) {\n fixMethod('delete');\n fixMethod('has');\n IS_MAP && fixMethod('get');\n }\n\n if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER);\n\n // weak collections should not contains .clear method\n if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear;\n }\n\n exported[CONSTRUCTOR_NAME] = Constructor;\n $({ global: true, forced: Constructor != NativeConstructor }, exported);\n\n setToStringTag(Constructor, CONSTRUCTOR_NAME);\n\n if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP);\n\n return Constructor;\n};\n", "'use strict';\nvar redefineAll = require('../internals/redefine-all');\nvar getWeakData = require('../internals/internal-metadata').getWeakData;\nvar anObject = require('../internals/an-object');\nvar isObject = require('../internals/is-object');\nvar anInstance = require('../internals/an-instance');\nvar iterate = require('../internals/iterate');\nvar ArrayIterationModule = require('../internals/array-iteration');\nvar $has = require('../internals/has');\nvar InternalStateModule = require('../internals/internal-state');\n\nvar setInternalState = InternalStateModule.set;\nvar internalStateGetterFor = InternalStateModule.getterFor;\nvar find = ArrayIterationModule.find;\nvar findIndex = ArrayIterationModule.findIndex;\nvar id = 0;\n\n// fallback for uncaught frozen keys\nvar uncaughtFrozenStore = function (store) {\n return store.frozen || (store.frozen = new UncaughtFrozenStore());\n};\n\nvar UncaughtFrozenStore = function () {\n this.entries = [];\n};\n\nvar findUncaughtFrozen = function (store, key) {\n return find(store.entries, function (it) {\n return it[0] === key;\n });\n};\n\nUncaughtFrozenStore.prototype = {\n get: function (key) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) return entry[1];\n },\n has: function (key) {\n return !!findUncaughtFrozen(this, key);\n },\n set: function (key, value) {\n var entry = findUncaughtFrozen(this, key);\n if (entry) entry[1] = value;\n else this.entries.push([key, value]);\n },\n 'delete': function (key) {\n var index = findIndex(this.entries, function (it) {\n return it[0] === key;\n });\n if (~index) this.entries.splice(index, 1);\n return !!~index;\n }\n};\n\nmodule.exports = {\n getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) {\n var C = wrapper(function (that, iterable) {\n anInstance(that, C, CONSTRUCTOR_NAME);\n setInternalState(that, {\n type: CONSTRUCTOR_NAME,\n id: id++,\n frozen: undefined\n });\n if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP });\n });\n\n var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME);\n\n var define = function (that, key, value) {\n var state = getInternalState(that);\n var data = getWeakData(anObject(key), true);\n if (data === true) uncaughtFrozenStore(state).set(key, value);\n else data[state.id] = value;\n return that;\n };\n\n redefineAll(C.prototype, {\n // `{ WeakMap, WeakSet }.prototype.delete(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.delete\n // https://tc39.es/ecma262/#sec-weakset.prototype.delete\n 'delete': function (key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state)['delete'](key);\n return data && $has(data, state.id) && delete data[state.id];\n },\n // `{ WeakMap, WeakSet }.prototype.has(key)` methods\n // https://tc39.es/ecma262/#sec-weakmap.prototype.has\n // https://tc39.es/ecma262/#sec-weakset.prototype.has\n has: function has(key) {\n var state = getInternalState(this);\n if (!isObject(key)) return false;\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).has(key);\n return data && $has(data, state.id);\n }\n });\n\n redefineAll(C.prototype, IS_MAP ? {\n // `WeakMap.prototype.get(key)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.get\n get: function get(key) {\n var state = getInternalState(this);\n if (isObject(key)) {\n var data = getWeakData(key);\n if (data === true) return uncaughtFrozenStore(state).get(key);\n return data ? data[state.id] : undefined;\n }\n },\n // `WeakMap.prototype.set(key, value)` method\n // https://tc39.es/ecma262/#sec-weakmap.prototype.set\n set: function set(key, value) {\n return define(this, key, value);\n }\n } : {\n // `WeakSet.prototype.add(value)` method\n // https://tc39.es/ecma262/#sec-weakset.prototype.add\n add: function add(value) {\n return define(this, value, true);\n }\n });\n\n return C;\n }\n};\n", "'use strict';\nvar global = require('../internals/global');\nvar redefineAll = require('../internals/redefine-all');\nvar InternalMetadataModule = require('../internals/internal-metadata');\nvar collection = require('../internals/collection');\nvar collectionWeak = require('../internals/collection-weak');\nvar isObject = require('../internals/is-object');\nvar enforceIternalState = require('../internals/internal-state').enforce;\nvar NATIVE_WEAK_MAP = require('../internals/native-weak-map');\n\nvar IS_IE11 = !global.ActiveXObject && 'ActiveXObject' in global;\n// eslint-disable-next-line es/no-object-isextensible -- safe\nvar isExtensible = Object.isExtensible;\nvar InternalWeakMap;\n\nvar wrapper = function (init) {\n return function WeakMap() {\n return init(this, arguments.length ? arguments[0] : undefined);\n };\n};\n\n// `WeakMap` constructor\n// https://tc39.es/ecma262/#sec-weakmap-constructor\nvar $WeakMap = module.exports = collection('WeakMap', wrapper, collectionWeak);\n\n// IE11 WeakMap frozen keys fix\n// We can't use feature detection because it crash some old IE builds\n// https://github.com/zloirock/core-js/issues/485\nif (NATIVE_WEAK_MAP && IS_IE11) {\n InternalWeakMap = collectionWeak.getConstructor(wrapper, 'WeakMap', true);\n InternalMetadataModule.REQUIRED = true;\n var WeakMapPrototype = $WeakMap.prototype;\n var nativeDelete = WeakMapPrototype['delete'];\n var nativeHas = WeakMapPrototype.has;\n var nativeGet = WeakMapPrototype.get;\n var nativeSet = WeakMapPrototype.set;\n redefineAll(WeakMapPrototype, {\n 'delete': function (key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeDelete.call(this, key) || state.frozen['delete'](key);\n } return nativeDelete.call(this, key);\n },\n has: function has(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas.call(this, key) || state.frozen.has(key);\n } return nativeHas.call(this, key);\n },\n get: function get(key) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n return nativeHas.call(this, key) ? nativeGet.call(this, key) : state.frozen.get(key);\n } return nativeGet.call(this, key);\n },\n set: function set(key, value) {\n if (isObject(key) && !isExtensible(key)) {\n var state = enforceIternalState(this);\n if (!state.frozen) state.frozen = new InternalWeakMap();\n nativeHas.call(this, key) ? nativeSet.call(this, key, value) : state.frozen.set(key, value);\n } else nativeSet.call(this, key, value);\n return this;\n }\n });\n}\n", "/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Creates a throttled function that only invokes `func` at most once per\n * every `wait` milliseconds. The throttled function comes with a `cancel`\n * method to cancel delayed `func` invocations and a `flush` method to\n * immediately invoke them. Provide `options` to indicate whether `func`\n * should be invoked on the leading and/or trailing edge of the `wait`\n * timeout. The `func` is invoked with the last arguments provided to the\n * throttled function. Subsequent calls to the throttled function return the\n * result of the last `func` invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the throttled function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.throttle` and `_.debounce`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to throttle.\n * @param {number} [wait=0] The number of milliseconds to throttle invocations to.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=true]\n * Specify invoking on the leading edge of the timeout.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new throttled function.\n * @example\n *\n * // Avoid excessively updating the position while scrolling.\n * jQuery(window).on('scroll', _.throttle(updatePosition, 100));\n *\n * // Invoke `renewToken` when the click event is fired, but not more than once every 5 minutes.\n * var throttled = _.throttle(renewToken, 300000, { 'trailing': false });\n * jQuery(element).on('click', throttled);\n *\n * // Cancel the trailing throttled invocation.\n * jQuery(window).on('popstate', throttled.cancel);\n */\nfunction throttle(func, wait, options) {\n var leading = true,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n if (isObject(options)) {\n leading = 'leading' in options ? !!options.leading : leading;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n return debounce(func, wait, {\n 'leading': leading,\n 'maxWait': wait,\n 'trailing': trailing\n });\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = throttle;\n", "/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used as references for various `Number` constants. */\nvar NAN = 0 / 0;\n\n/** `Object#toString` result references. */\nvar symbolTag = '[object Symbol]';\n\n/** Used to match leading and trailing whitespace. */\nvar reTrim = /^\\s+|\\s+$/g;\n\n/** Used to detect bad signed hexadecimal string values. */\nvar reIsBadHex = /^[-+]0x[0-9a-f]+$/i;\n\n/** Used to detect binary string values. */\nvar reIsBinary = /^0b[01]+$/i;\n\n/** Used to detect octal string values. */\nvar reIsOctal = /^0o[0-7]+$/i;\n\n/** Built-in method references without a dependency on `root`. */\nvar freeParseInt = parseInt;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/** Used for built-in method references. */\nvar objectProto = Object.prototype;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max,\n nativeMin = Math.min;\n\n/**\n * Gets the timestamp of the number of milliseconds that have elapsed since\n * the Unix epoch (1 January 1970 00:00:00 UTC).\n *\n * @static\n * @memberOf _\n * @since 2.4.0\n * @category Date\n * @returns {number} Returns the timestamp.\n * @example\n *\n * _.defer(function(stamp) {\n * console.log(_.now() - stamp);\n * }, _.now());\n * // => Logs the number of milliseconds it took for the deferred invocation.\n */\nvar now = function() {\n return root.Date.now();\n};\n\n/**\n * Creates a debounced function that delays invoking `func` until after `wait`\n * milliseconds have elapsed since the last time the debounced function was\n * invoked. The debounced function comes with a `cancel` method to cancel\n * delayed `func` invocations and a `flush` method to immediately invoke them.\n * Provide `options` to indicate whether `func` should be invoked on the\n * leading and/or trailing edge of the `wait` timeout. The `func` is invoked\n * with the last arguments provided to the debounced function. Subsequent\n * calls to the debounced function return the result of the last `func`\n * invocation.\n *\n * **Note:** If `leading` and `trailing` options are `true`, `func` is\n * invoked on the trailing edge of the timeout only if the debounced function\n * is invoked more than once during the `wait` timeout.\n *\n * If `wait` is `0` and `leading` is `false`, `func` invocation is deferred\n * until to the next tick, similar to `setTimeout` with a timeout of `0`.\n *\n * See [David Corbacho's article](https://css-tricks.com/debouncing-throttling-explained-examples/)\n * for details over the differences between `_.debounce` and `_.throttle`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to debounce.\n * @param {number} [wait=0] The number of milliseconds to delay.\n * @param {Object} [options={}] The options object.\n * @param {boolean} [options.leading=false]\n * Specify invoking on the leading edge of the timeout.\n * @param {number} [options.maxWait]\n * The maximum time `func` is allowed to be delayed before it's invoked.\n * @param {boolean} [options.trailing=true]\n * Specify invoking on the trailing edge of the timeout.\n * @returns {Function} Returns the new debounced function.\n * @example\n *\n * // Avoid costly calculations while the window size is in flux.\n * jQuery(window).on('resize', _.debounce(calculateLayout, 150));\n *\n * // Invoke `sendMail` when clicked, debouncing subsequent calls.\n * jQuery(element).on('click', _.debounce(sendMail, 300, {\n * 'leading': true,\n * 'trailing': false\n * }));\n *\n * // Ensure `batchLog` is invoked once after 1 second of debounced calls.\n * var debounced = _.debounce(batchLog, 250, { 'maxWait': 1000 });\n * var source = new EventSource('/stream');\n * jQuery(source).on('message', debounced);\n *\n * // Cancel the trailing debounced invocation.\n * jQuery(window).on('popstate', debounced.cancel);\n */\nfunction debounce(func, wait, options) {\n var lastArgs,\n lastThis,\n maxWait,\n result,\n timerId,\n lastCallTime,\n lastInvokeTime = 0,\n leading = false,\n maxing = false,\n trailing = true;\n\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n wait = toNumber(wait) || 0;\n if (isObject(options)) {\n leading = !!options.leading;\n maxing = 'maxWait' in options;\n maxWait = maxing ? nativeMax(toNumber(options.maxWait) || 0, wait) : maxWait;\n trailing = 'trailing' in options ? !!options.trailing : trailing;\n }\n\n function invokeFunc(time) {\n var args = lastArgs,\n thisArg = lastThis;\n\n lastArgs = lastThis = undefined;\n lastInvokeTime = time;\n result = func.apply(thisArg, args);\n return result;\n }\n\n function leadingEdge(time) {\n // Reset any `maxWait` timer.\n lastInvokeTime = time;\n // Start the timer for the trailing edge.\n timerId = setTimeout(timerExpired, wait);\n // Invoke the leading edge.\n return leading ? invokeFunc(time) : result;\n }\n\n function remainingWait(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime,\n result = wait - timeSinceLastCall;\n\n return maxing ? nativeMin(result, maxWait - timeSinceLastInvoke) : result;\n }\n\n function shouldInvoke(time) {\n var timeSinceLastCall = time - lastCallTime,\n timeSinceLastInvoke = time - lastInvokeTime;\n\n // Either this is the first call, activity has stopped and we're at the\n // trailing edge, the system time has gone backwards and we're treating\n // it as the trailing edge, or we've hit the `maxWait` limit.\n return (lastCallTime === undefined || (timeSinceLastCall >= wait) ||\n (timeSinceLastCall < 0) || (maxing && timeSinceLastInvoke >= maxWait));\n }\n\n function timerExpired() {\n var time = now();\n if (shouldInvoke(time)) {\n return trailingEdge(time);\n }\n // Restart the timer.\n timerId = setTimeout(timerExpired, remainingWait(time));\n }\n\n function trailingEdge(time) {\n timerId = undefined;\n\n // Only invoke if we have `lastArgs` which means `func` has been\n // debounced at least once.\n if (trailing && lastArgs) {\n return invokeFunc(time);\n }\n lastArgs = lastThis = undefined;\n return result;\n }\n\n function cancel() {\n if (timerId !== undefined) {\n clearTimeout(timerId);\n }\n lastInvokeTime = 0;\n lastArgs = lastCallTime = lastThis = timerId = undefined;\n }\n\n function flush() {\n return timerId === undefined ? result : trailingEdge(now());\n }\n\n function debounced() {\n var time = now(),\n isInvoking = shouldInvoke(time);\n\n lastArgs = arguments;\n lastThis = this;\n lastCallTime = time;\n\n if (isInvoking) {\n if (timerId === undefined) {\n return leadingEdge(lastCallTime);\n }\n if (maxing) {\n // Handle invocations in a tight loop.\n timerId = setTimeout(timerExpired, wait);\n return invokeFunc(lastCallTime);\n }\n }\n if (timerId === undefined) {\n timerId = setTimeout(timerExpired, wait);\n }\n return result;\n }\n debounced.cancel = cancel;\n debounced.flush = flush;\n return debounced;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\n/**\n * Checks if `value` is object-like. A value is object-like if it's not `null`\n * and has a `typeof` result of \"object\".\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is object-like, else `false`.\n * @example\n *\n * _.isObjectLike({});\n * // => true\n *\n * _.isObjectLike([1, 2, 3]);\n * // => true\n *\n * _.isObjectLike(_.noop);\n * // => false\n *\n * _.isObjectLike(null);\n * // => false\n */\nfunction isObjectLike(value) {\n return !!value && typeof value == 'object';\n}\n\n/**\n * Checks if `value` is classified as a `Symbol` primitive or object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a symbol, else `false`.\n * @example\n *\n * _.isSymbol(Symbol.iterator);\n * // => true\n *\n * _.isSymbol('abc');\n * // => false\n */\nfunction isSymbol(value) {\n return typeof value == 'symbol' ||\n (isObjectLike(value) && objectToString.call(value) == symbolTag);\n}\n\n/**\n * Converts `value` to a number.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to process.\n * @returns {number} Returns the number.\n * @example\n *\n * _.toNumber(3.2);\n * // => 3.2\n *\n * _.toNumber(Number.MIN_VALUE);\n * // => 5e-324\n *\n * _.toNumber(Infinity);\n * // => Infinity\n *\n * _.toNumber('3.2');\n * // => 3.2\n */\nfunction toNumber(value) {\n if (typeof value == 'number') {\n return value;\n }\n if (isSymbol(value)) {\n return NAN;\n }\n if (isObject(value)) {\n var other = typeof value.valueOf == 'function' ? value.valueOf() : value;\n value = isObject(other) ? (other + '') : other;\n }\n if (typeof value != 'string') {\n return value === 0 ? value : +value;\n }\n value = value.replace(reTrim, '');\n var isBinary = reIsBinary.test(value);\n return (isBinary || reIsOctal.test(value))\n ? freeParseInt(value.slice(2), isBinary ? 2 : 8)\n : (reIsBadHex.test(value) ? NAN : +value);\n}\n\nmodule.exports = debounce;\n", "/**\n * lodash (Custom Build) \n * Build: `lodash modularize exports=\"npm\" -o ./`\n * Copyright jQuery Foundation and other contributors \n * Released under MIT license \n * Based on Underscore.js 1.8.3 \n * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors\n */\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/** Used to stand-in for `undefined` hash values. */\nvar HASH_UNDEFINED = '__lodash_hash_undefined__';\n\n/** `Object#toString` result references. */\nvar funcTag = '[object Function]',\n genTag = '[object GeneratorFunction]';\n\n/**\n * Used to match `RegExp`\n * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).\n */\nvar reRegExpChar = /[\\\\^$.*+?()[\\]{}|]/g;\n\n/** Used to detect host constructors (Safari). */\nvar reIsHostCtor = /^\\[object .+?Constructor\\]$/;\n\n/** Detect free variable `global` from Node.js. */\nvar freeGlobal = typeof global == 'object' && global && global.Object === Object && global;\n\n/** Detect free variable `self`. */\nvar freeSelf = typeof self == 'object' && self && self.Object === Object && self;\n\n/** Used as a reference to the global object. */\nvar root = freeGlobal || freeSelf || Function('return this')();\n\n/**\n * Gets the value at `key` of `object`.\n *\n * @private\n * @param {Object} [object] The object to query.\n * @param {string} key The key of the property to get.\n * @returns {*} Returns the property value.\n */\nfunction getValue(object, key) {\n return object == null ? undefined : object[key];\n}\n\n/**\n * Checks if `value` is a host object in IE < 9.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a host object, else `false`.\n */\nfunction isHostObject(value) {\n // Many host objects are `Object` objects that can coerce to strings\n // despite having improperly defined `toString` methods.\n var result = false;\n if (value != null && typeof value.toString != 'function') {\n try {\n result = !!(value + '');\n } catch (e) {}\n }\n return result;\n}\n\n/** Used for built-in method references. */\nvar arrayProto = Array.prototype,\n funcProto = Function.prototype,\n objectProto = Object.prototype;\n\n/** Used to detect overreaching core-js shims. */\nvar coreJsData = root['__core-js_shared__'];\n\n/** Used to detect methods masquerading as native. */\nvar maskSrcKey = (function() {\n var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');\n return uid ? ('Symbol(src)_1.' + uid) : '';\n}());\n\n/** Used to resolve the decompiled source of functions. */\nvar funcToString = funcProto.toString;\n\n/** Used to check objects for own properties. */\nvar hasOwnProperty = objectProto.hasOwnProperty;\n\n/**\n * Used to resolve the\n * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)\n * of values.\n */\nvar objectToString = objectProto.toString;\n\n/** Used to detect if a method is native. */\nvar reIsNative = RegExp('^' +\n funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\\\$&')\n .replace(/hasOwnProperty|(function).*?(?=\\\\\\()| for .+?(?=\\\\\\])/g, '$1.*?') + '$'\n);\n\n/** Built-in value references. */\nvar splice = arrayProto.splice;\n\n/* Built-in method references that are verified to be native. */\nvar Map = getNative(root, 'Map'),\n nativeCreate = getNative(Object, 'create');\n\n/**\n * Creates a hash object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction Hash(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the hash.\n *\n * @private\n * @name clear\n * @memberOf Hash\n */\nfunction hashClear() {\n this.__data__ = nativeCreate ? nativeCreate(null) : {};\n}\n\n/**\n * Removes `key` and its value from the hash.\n *\n * @private\n * @name delete\n * @memberOf Hash\n * @param {Object} hash The hash to modify.\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction hashDelete(key) {\n return this.has(key) && delete this.__data__[key];\n}\n\n/**\n * Gets the hash value for `key`.\n *\n * @private\n * @name get\n * @memberOf Hash\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction hashGet(key) {\n var data = this.__data__;\n if (nativeCreate) {\n var result = data[key];\n return result === HASH_UNDEFINED ? undefined : result;\n }\n return hasOwnProperty.call(data, key) ? data[key] : undefined;\n}\n\n/**\n * Checks if a hash value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf Hash\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction hashHas(key) {\n var data = this.__data__;\n return nativeCreate ? data[key] !== undefined : hasOwnProperty.call(data, key);\n}\n\n/**\n * Sets the hash `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf Hash\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the hash instance.\n */\nfunction hashSet(key, value) {\n var data = this.__data__;\n data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;\n return this;\n}\n\n// Add methods to `Hash`.\nHash.prototype.clear = hashClear;\nHash.prototype['delete'] = hashDelete;\nHash.prototype.get = hashGet;\nHash.prototype.has = hashHas;\nHash.prototype.set = hashSet;\n\n/**\n * Creates an list cache object.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction ListCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the list cache.\n *\n * @private\n * @name clear\n * @memberOf ListCache\n */\nfunction listCacheClear() {\n this.__data__ = [];\n}\n\n/**\n * Removes `key` and its value from the list cache.\n *\n * @private\n * @name delete\n * @memberOf ListCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction listCacheDelete(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n return false;\n }\n var lastIndex = data.length - 1;\n if (index == lastIndex) {\n data.pop();\n } else {\n splice.call(data, index, 1);\n }\n return true;\n}\n\n/**\n * Gets the list cache value for `key`.\n *\n * @private\n * @name get\n * @memberOf ListCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction listCacheGet(key) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n return index < 0 ? undefined : data[index][1];\n}\n\n/**\n * Checks if a list cache value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf ListCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction listCacheHas(key) {\n return assocIndexOf(this.__data__, key) > -1;\n}\n\n/**\n * Sets the list cache `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf ListCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the list cache instance.\n */\nfunction listCacheSet(key, value) {\n var data = this.__data__,\n index = assocIndexOf(data, key);\n\n if (index < 0) {\n data.push([key, value]);\n } else {\n data[index][1] = value;\n }\n return this;\n}\n\n// Add methods to `ListCache`.\nListCache.prototype.clear = listCacheClear;\nListCache.prototype['delete'] = listCacheDelete;\nListCache.prototype.get = listCacheGet;\nListCache.prototype.has = listCacheHas;\nListCache.prototype.set = listCacheSet;\n\n/**\n * Creates a map cache object to store key-value pairs.\n *\n * @private\n * @constructor\n * @param {Array} [entries] The key-value pairs to cache.\n */\nfunction MapCache(entries) {\n var index = -1,\n length = entries ? entries.length : 0;\n\n this.clear();\n while (++index < length) {\n var entry = entries[index];\n this.set(entry[0], entry[1]);\n }\n}\n\n/**\n * Removes all key-value entries from the map.\n *\n * @private\n * @name clear\n * @memberOf MapCache\n */\nfunction mapCacheClear() {\n this.__data__ = {\n 'hash': new Hash,\n 'map': new (Map || ListCache),\n 'string': new Hash\n };\n}\n\n/**\n * Removes `key` and its value from the map.\n *\n * @private\n * @name delete\n * @memberOf MapCache\n * @param {string} key The key of the value to remove.\n * @returns {boolean} Returns `true` if the entry was removed, else `false`.\n */\nfunction mapCacheDelete(key) {\n return getMapData(this, key)['delete'](key);\n}\n\n/**\n * Gets the map value for `key`.\n *\n * @private\n * @name get\n * @memberOf MapCache\n * @param {string} key The key of the value to get.\n * @returns {*} Returns the entry value.\n */\nfunction mapCacheGet(key) {\n return getMapData(this, key).get(key);\n}\n\n/**\n * Checks if a map value for `key` exists.\n *\n * @private\n * @name has\n * @memberOf MapCache\n * @param {string} key The key of the entry to check.\n * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.\n */\nfunction mapCacheHas(key) {\n return getMapData(this, key).has(key);\n}\n\n/**\n * Sets the map `key` to `value`.\n *\n * @private\n * @name set\n * @memberOf MapCache\n * @param {string} key The key of the value to set.\n * @param {*} value The value to set.\n * @returns {Object} Returns the map cache instance.\n */\nfunction mapCacheSet(key, value) {\n getMapData(this, key).set(key, value);\n return this;\n}\n\n// Add methods to `MapCache`.\nMapCache.prototype.clear = mapCacheClear;\nMapCache.prototype['delete'] = mapCacheDelete;\nMapCache.prototype.get = mapCacheGet;\nMapCache.prototype.has = mapCacheHas;\nMapCache.prototype.set = mapCacheSet;\n\n/**\n * Gets the index at which the `key` is found in `array` of key-value pairs.\n *\n * @private\n * @param {Array} array The array to inspect.\n * @param {*} key The key to search for.\n * @returns {number} Returns the index of the matched value, else `-1`.\n */\nfunction assocIndexOf(array, key) {\n var length = array.length;\n while (length--) {\n if (eq(array[length][0], key)) {\n return length;\n }\n }\n return -1;\n}\n\n/**\n * The base implementation of `_.isNative` without bad shim checks.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a native function,\n * else `false`.\n */\nfunction baseIsNative(value) {\n if (!isObject(value) || isMasked(value)) {\n return false;\n }\n var pattern = (isFunction(value) || isHostObject(value)) ? reIsNative : reIsHostCtor;\n return pattern.test(toSource(value));\n}\n\n/**\n * Gets the data for `map`.\n *\n * @private\n * @param {Object} map The map to query.\n * @param {string} key The reference key.\n * @returns {*} Returns the map data.\n */\nfunction getMapData(map, key) {\n var data = map.__data__;\n return isKeyable(key)\n ? data[typeof key == 'string' ? 'string' : 'hash']\n : data.map;\n}\n\n/**\n * Gets the native function at `key` of `object`.\n *\n * @private\n * @param {Object} object The object to query.\n * @param {string} key The key of the method to get.\n * @returns {*} Returns the function if it's native, else `undefined`.\n */\nfunction getNative(object, key) {\n var value = getValue(object, key);\n return baseIsNative(value) ? value : undefined;\n}\n\n/**\n * Checks if `value` is suitable for use as unique object key.\n *\n * @private\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is suitable, else `false`.\n */\nfunction isKeyable(value) {\n var type = typeof value;\n return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')\n ? (value !== '__proto__')\n : (value === null);\n}\n\n/**\n * Checks if `func` has its source masked.\n *\n * @private\n * @param {Function} func The function to check.\n * @returns {boolean} Returns `true` if `func` is masked, else `false`.\n */\nfunction isMasked(func) {\n return !!maskSrcKey && (maskSrcKey in func);\n}\n\n/**\n * Converts `func` to its source code.\n *\n * @private\n * @param {Function} func The function to process.\n * @returns {string} Returns the source code.\n */\nfunction toSource(func) {\n if (func != null) {\n try {\n return funcToString.call(func);\n } catch (e) {}\n try {\n return (func + '');\n } catch (e) {}\n }\n return '';\n}\n\n/**\n * Creates a function that memoizes the result of `func`. If `resolver` is\n * provided, it determines the cache key for storing the result based on the\n * arguments provided to the memoized function. By default, the first argument\n * provided to the memoized function is used as the map cache key. The `func`\n * is invoked with the `this` binding of the memoized function.\n *\n * **Note:** The cache is exposed as the `cache` property on the memoized\n * function. Its creation may be customized by replacing the `_.memoize.Cache`\n * constructor with one whose instances implement the\n * [`Map`](http://ecma-international.org/ecma-262/7.0/#sec-properties-of-the-map-prototype-object)\n * method interface of `delete`, `get`, `has`, and `set`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Function\n * @param {Function} func The function to have its output memoized.\n * @param {Function} [resolver] The function to resolve the cache key.\n * @returns {Function} Returns the new memoized function.\n * @example\n *\n * var object = { 'a': 1, 'b': 2 };\n * var other = { 'c': 3, 'd': 4 };\n *\n * var values = _.memoize(_.values);\n * values(object);\n * // => [1, 2]\n *\n * values(other);\n * // => [3, 4]\n *\n * object.a = 2;\n * values(object);\n * // => [1, 2]\n *\n * // Modify the result cache.\n * values.cache.set(object, ['a', 'b']);\n * values(object);\n * // => ['a', 'b']\n *\n * // Replace `_.memoize.Cache`.\n * _.memoize.Cache = WeakMap;\n */\nfunction memoize(func, resolver) {\n if (typeof func != 'function' || (resolver && typeof resolver != 'function')) {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n var memoized = function() {\n var args = arguments,\n key = resolver ? resolver.apply(this, args) : args[0],\n cache = memoized.cache;\n\n if (cache.has(key)) {\n return cache.get(key);\n }\n var result = func.apply(this, args);\n memoized.cache = cache.set(key, result);\n return result;\n };\n memoized.cache = new (memoize.Cache || MapCache);\n return memoized;\n}\n\n// Assign cache to `_.memoize`.\nmemoize.Cache = MapCache;\n\n/**\n * Performs a\n * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)\n * comparison between two values to determine if they are equivalent.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to compare.\n * @param {*} other The other value to compare.\n * @returns {boolean} Returns `true` if the values are equivalent, else `false`.\n * @example\n *\n * var object = { 'a': 1 };\n * var other = { 'a': 1 };\n *\n * _.eq(object, object);\n * // => true\n *\n * _.eq(object, other);\n * // => false\n *\n * _.eq('a', 'a');\n * // => true\n *\n * _.eq('a', Object('a'));\n * // => false\n *\n * _.eq(NaN, NaN);\n * // => true\n */\nfunction eq(value, other) {\n return value === other || (value !== value && other !== other);\n}\n\n/**\n * Checks if `value` is classified as a `Function` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is a function, else `false`.\n * @example\n *\n * _.isFunction(_);\n * // => true\n *\n * _.isFunction(/abc/);\n * // => false\n */\nfunction isFunction(value) {\n // The use of `Object#toString` avoids issues with the `typeof` operator\n // in Safari 8-9 which returns 'object' for typed array and other constructors.\n var tag = isObject(value) ? objectToString.call(value) : '';\n return tag == funcTag || tag == genTag;\n}\n\n/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nmodule.exports = memoize;\n", "var aFunction = require('../internals/a-function');\nvar toObject = require('../internals/to-object');\nvar IndexedObject = require('../internals/indexed-object');\nvar toLength = require('../internals/to-length');\n\n// `Array.prototype.{ reduce, reduceRight }` methods implementation\nvar createMethod = function (IS_RIGHT) {\n return function (that, callbackfn, argumentsLength, memo) {\n aFunction(callbackfn);\n var O = toObject(that);\n var self = IndexedObject(O);\n var length = toLength(O.length);\n var index = IS_RIGHT ? length - 1 : 0;\n var i = IS_RIGHT ? -1 : 1;\n if (argumentsLength < 2) while (true) {\n if (index in self) {\n memo = self[index];\n index += i;\n break;\n }\n index += i;\n if (IS_RIGHT ? index < 0 : length <= index) {\n throw TypeError('Reduce of empty array with no initial value');\n }\n }\n for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) {\n memo = callbackfn(memo, self[index], index, O);\n }\n return memo;\n };\n};\n\nmodule.exports = {\n // `Array.prototype.reduce` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduce\n left: createMethod(false),\n // `Array.prototype.reduceRight` method\n // https://tc39.es/ecma262/#sec-array.prototype.reduceright\n right: createMethod(true)\n};\n", "var classof = require('../internals/classof-raw');\nvar global = require('../internals/global');\n\nmodule.exports = classof(global.process) == 'process';\n", "'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n", "var fails = require('../internals/fails');\n\n// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,\nvar RE = function (s, f) {\n return RegExp(s, f);\n};\n\nexports.UNSUPPORTED_Y = fails(function () {\n var re = RE('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = RE('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n", "var fails = require('./fails');\n\nmodule.exports = fails(function () {\n // babel-minify transpiles RegExp('.', 's') -> /./s and it causes SyntaxError\n var re = RegExp('.', (typeof '').charAt(0));\n return !(re.dotAll && re.exec('\\n') && re.flags === 's');\n});\n", "var fails = require('./fails');\n\nmodule.exports = fails(function () {\n // babel-minify transpiles RegExp('.', 'g') -> /./g and it causes SyntaxError\n var re = RegExp('(?
b)', (typeof '').charAt(5));\n return re.exec('b').groups.a !== 'b' ||\n 'b'.replace(re, '$c') !== 'bc';\n});\n", "'use strict';\n/* eslint-disable regexp/no-assertion-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar regexpFlags = require('../internals/regexp-flags');\nvar stickyHelpers = require('../internals/regexp-sticky-helpers');\nvar shared = require('../internals/shared');\nvar create = require('../internals/object-create');\nvar getInternalState = require('../internals/internal-state').get;\nvar UNSUPPORTED_DOT_ALL = require('../internals/regexp-unsupported-dot-all');\nvar UNSUPPORTED_NCG = require('../internals/regexp-unsupported-ncg');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG;\n\nif (PATCH) {\n // eslint-disable-next-line max-statements -- TODO\n patchedExec = function exec(str) {\n var re = this;\n var state = getInternalState(re);\n var raw = state.raw;\n var result, reCopy, lastIndex, match, i, object, group;\n\n if (raw) {\n raw.lastIndex = re.lastIndex;\n result = patchedExec.call(raw, str);\n re.lastIndex = raw.lastIndex;\n return result;\n }\n\n var groups = state.groups;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = String(str).slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n if (match && groups) {\n match.groups = object = create(null);\n for (i = 0; i < groups.length; i++) {\n group = groups[i];\n object[group[0]] = match[group[1]];\n }\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n", "'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n// `RegExp.prototype.exec` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.exec\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n exec: exec\n});\n", "'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nmodule.exports = function (KEY, exec, FORCED, SHAM) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n FORCED\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n });\n\n redefine(String.prototype, KEY, methods[0]);\n redefine(RegExpPrototype, SYMBOL, methods[1]);\n }\n\n if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n", "'use strict';\nvar charAt = require('../internals/string-multibyte').charAt;\n\n// `AdvanceStringIndex` abstract operation\n// https://tc39.es/ecma262/#sec-advancestringindex\nmodule.exports = function (S, index, unicode) {\n return index + (unicode ? charAt(S, index).length : 1);\n};\n", "var classof = require('./classof-raw');\nvar regexpExec = require('./regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n", "var toObject = require('../internals/to-object');\n\nvar floor = Math.floor;\nvar replace = ''.replace;\nvar SUBSTITUTION_SYMBOLS = /\\$([$&'`]|\\d{1,2}|<[^>]*>)/g;\nvar SUBSTITUTION_SYMBOLS_NO_NAMED = /\\$([$&'`]|\\d{1,2})/g;\n\n// `GetSubstitution` abstract operation\n// https://tc39.es/ecma262/#sec-getsubstitution\nmodule.exports = function (matched, str, position, captures, namedCaptures, replacement) {\n var tailPos = position + matched.length;\n var m = captures.length;\n var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED;\n if (namedCaptures !== undefined) {\n namedCaptures = toObject(namedCaptures);\n symbols = SUBSTITUTION_SYMBOLS;\n }\n return replace.call(replacement, symbols, function (match, ch) {\n var capture;\n switch (ch.charAt(0)) {\n case '$': return '$';\n case '&': return matched;\n case '`': return str.slice(0, position);\n case \"'\": return str.slice(tailPos);\n case '<':\n capture = namedCaptures[ch.slice(1, -1)];\n break;\n default: // \\d\\d?\n var n = +ch;\n if (n === 0) return match;\n if (n > m) {\n var f = floor(n / 10);\n if (f === 0) return match;\n if (f <= m) return captures[f - 1] === undefined ? ch.charAt(1) : captures[f - 1] + ch.charAt(1);\n return match;\n }\n capture = captures[n - 1];\n }\n return capture === undefined ? '' : capture;\n });\n};\n", "/*!\n * cookie\n * Copyright(c) 2012-2014 Roman Shtylman\n * Copyright(c) 2015 Douglas Christopher Wilson\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module exports.\n * @public\n */\n\nexports.parse = parse;\nexports.serialize = serialize;\n\n/**\n * Module variables.\n * @private\n */\n\nvar decode = decodeURIComponent;\nvar encode = encodeURIComponent;\nvar pairSplitRegExp = /; */;\n\n/**\n * RegExp to match field-content in RFC 7230 sec 3.2\n *\n * field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]\n * field-vchar = VCHAR / obs-text\n * obs-text = %x80-FF\n */\n\nvar fieldContentRegExp = /^[\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+$/;\n\n/**\n * Parse a cookie header.\n *\n * Parse the given cookie header string into an object\n * The object has the various cookies as keys(names) => values\n *\n * @param {string} str\n * @param {object} [options]\n * @return {object}\n * @public\n */\n\nfunction parse(str, options) {\n if (typeof str !== 'string') {\n throw new TypeError('argument str must be a string');\n }\n\n var obj = {}\n var opt = options || {};\n var pairs = str.split(pairSplitRegExp);\n var dec = opt.decode || decode;\n\n for (var i = 0; i < pairs.length; i++) {\n var pair = pairs[i];\n var eq_idx = pair.indexOf('=');\n\n // skip things that don't look like key=value\n if (eq_idx < 0) {\n continue;\n }\n\n var key = pair.substr(0, eq_idx).trim()\n var val = pair.substr(++eq_idx, pair.length).trim();\n\n // quoted values\n if ('\"' == val[0]) {\n val = val.slice(1, -1);\n }\n\n // only assign once\n if (undefined == obj[key]) {\n obj[key] = tryDecode(val, dec);\n }\n }\n\n return obj;\n}\n\n/**\n * Serialize data into a cookie header.\n *\n * Serialize the a name value pair into a cookie string suitable for\n * http headers. An optional options object specified cookie parameters.\n *\n * serialize('foo', 'bar', { httpOnly: true })\n * => \"foo=bar; httpOnly\"\n *\n * @param {string} name\n * @param {string} val\n * @param {object} [options]\n * @return {string}\n * @public\n */\n\nfunction serialize(name, val, options) {\n var opt = options || {};\n var enc = opt.encode || encode;\n\n if (typeof enc !== 'function') {\n throw new TypeError('option encode is invalid');\n }\n\n if (!fieldContentRegExp.test(name)) {\n throw new TypeError('argument name is invalid');\n }\n\n var value = enc(val);\n\n if (value && !fieldContentRegExp.test(value)) {\n throw new TypeError('argument val is invalid');\n }\n\n var str = name + '=' + value;\n\n if (null != opt.maxAge) {\n var maxAge = opt.maxAge - 0;\n\n if (isNaN(maxAge) || !isFinite(maxAge)) {\n throw new TypeError('option maxAge is invalid')\n }\n\n str += '; Max-Age=' + Math.floor(maxAge);\n }\n\n if (opt.domain) {\n if (!fieldContentRegExp.test(opt.domain)) {\n throw new TypeError('option domain is invalid');\n }\n\n str += '; Domain=' + opt.domain;\n }\n\n if (opt.path) {\n if (!fieldContentRegExp.test(opt.path)) {\n throw new TypeError('option path is invalid');\n }\n\n str += '; Path=' + opt.path;\n }\n\n if (opt.expires) {\n if (typeof opt.expires.toUTCString !== 'function') {\n throw new TypeError('option expires is invalid');\n }\n\n str += '; Expires=' + opt.expires.toUTCString();\n }\n\n if (opt.httpOnly) {\n str += '; HttpOnly';\n }\n\n if (opt.secure) {\n str += '; Secure';\n }\n\n if (opt.sameSite) {\n var sameSite = typeof opt.sameSite === 'string'\n ? opt.sameSite.toLowerCase() : opt.sameSite;\n\n switch (sameSite) {\n case true:\n str += '; SameSite=Strict';\n break;\n case 'lax':\n str += '; SameSite=Lax';\n break;\n case 'strict':\n str += '; SameSite=Strict';\n break;\n case 'none':\n str += '; SameSite=None';\n break;\n default:\n throw new TypeError('option sameSite is invalid');\n }\n }\n\n return str;\n}\n\n/**\n * Try decoding a string using a decoding function.\n *\n * @param {string} str\n * @param {function} decode\n * @private\n */\n\nfunction tryDecode(str, decode) {\n try {\n return decode(str);\n } catch (e) {\n return str;\n }\n}\n", "/**\n * EvEmitter v1.1.0\n * Lil' event emitter\n * MIT License\n */\n\n/* jshint unused: true, undef: true, strict: true */\n\n( function( global, factory ) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, window */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory();\n } else {\n // Browser globals\n global.EvEmitter = factory();\n }\n\n}( typeof window != 'undefined' ? window : this, function() {\n\n\"use strict\";\n\nfunction EvEmitter() {}\n\nvar proto = EvEmitter.prototype;\n\nproto.on = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // set events hash\n var events = this._events = this._events || {};\n // set listeners array\n var listeners = events[ eventName ] = events[ eventName ] || [];\n // only add once\n if ( listeners.indexOf( listener ) == -1 ) {\n listeners.push( listener );\n }\n\n return this;\n};\n\nproto.once = function( eventName, listener ) {\n if ( !eventName || !listener ) {\n return;\n }\n // add event\n this.on( eventName, listener );\n // set once flag\n // set onceEvents hash\n var onceEvents = this._onceEvents = this._onceEvents || {};\n // set onceListeners object\n var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {};\n // set flag\n onceListeners[ listener ] = true;\n\n return this;\n};\n\nproto.off = function( eventName, listener ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n var index = listeners.indexOf( listener );\n if ( index != -1 ) {\n listeners.splice( index, 1 );\n }\n\n return this;\n};\n\nproto.emitEvent = function( eventName, args ) {\n var listeners = this._events && this._events[ eventName ];\n if ( !listeners || !listeners.length ) {\n return;\n }\n // copy over to avoid interference if .off() in listener\n listeners = listeners.slice(0);\n args = args || [];\n // once stuff\n var onceListeners = this._onceEvents && this._onceEvents[ eventName ];\n\n for ( var i=0; i < listeners.length; i++ ) {\n var listener = listeners[i]\n var isOnce = onceListeners && onceListeners[ listener ];\n if ( isOnce ) {\n // remove listener\n // remove before trigger to prevent recursion\n this.off( eventName, listener );\n // unset once flag\n delete onceListeners[ listener ];\n }\n // trigger listener\n listener.apply( this, args );\n }\n\n return this;\n};\n\nproto.allOff = function() {\n delete this._events;\n delete this._onceEvents;\n};\n\nreturn EvEmitter;\n\n}));\n", "/*!\n * getSize v2.0.3\n * measure size of elements\n * MIT license\n */\n\n/* jshint browser: true, strict: true, undef: true, unused: true */\n/* globals console: false */\n\n( function( window, factory ) {\n /* jshint strict: false */ /* globals define, module */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory();\n } else {\n // browser global\n window.getSize = factory();\n }\n\n})( window, function factory() {\n'use strict';\n\n// -------------------------- helpers -------------------------- //\n\n// get a number from a string, not a percentage\nfunction getStyleSize( value ) {\n var num = parseFloat( value );\n // not a percent like '100%', and a number\n var isValid = value.indexOf('%') == -1 && !isNaN( num );\n return isValid && num;\n}\n\nfunction noop() {}\n\nvar logError = typeof console == 'undefined' ? noop :\n function( message ) {\n console.error( message );\n };\n\n// -------------------------- measurements -------------------------- //\n\nvar measurements = [\n 'paddingLeft',\n 'paddingRight',\n 'paddingTop',\n 'paddingBottom',\n 'marginLeft',\n 'marginRight',\n 'marginTop',\n 'marginBottom',\n 'borderLeftWidth',\n 'borderRightWidth',\n 'borderTopWidth',\n 'borderBottomWidth'\n];\n\nvar measurementsLength = measurements.length;\n\nfunction getZeroSize() {\n var size = {\n width: 0,\n height: 0,\n innerWidth: 0,\n innerHeight: 0,\n outerWidth: 0,\n outerHeight: 0\n };\n for ( var i=0; i < measurementsLength; i++ ) {\n var measurement = measurements[i];\n size[ measurement ] = 0;\n }\n return size;\n}\n\n// -------------------------- getStyle -------------------------- //\n\n/**\n * getStyle, get style of element, check for Firefox bug\n * https://bugzilla.mozilla.org/show_bug.cgi?id=548397\n */\nfunction getStyle( elem ) {\n var style = getComputedStyle( elem );\n if ( !style ) {\n logError( 'Style returned ' + style +\n '. Are you running this code in a hidden iframe on Firefox? ' +\n 'See https://bit.ly/getsizebug1' );\n }\n return style;\n}\n\n// -------------------------- setup -------------------------- //\n\nvar isSetup = false;\n\nvar isBoxSizeOuter;\n\n/**\n * setup\n * check isBoxSizerOuter\n * do on first getSize() rather than on page load for Firefox bug\n */\nfunction setup() {\n // setup once\n if ( isSetup ) {\n return;\n }\n isSetup = true;\n\n // -------------------------- box sizing -------------------------- //\n\n /**\n * Chrome & Safari measure the outer-width on style.width on border-box elems\n * IE11 & Firefox<29 measures the inner-width\n */\n var div = document.createElement('div');\n div.style.width = '200px';\n div.style.padding = '1px 2px 3px 4px';\n div.style.borderStyle = 'solid';\n div.style.borderWidth = '1px 2px 3px 4px';\n div.style.boxSizing = 'border-box';\n\n var body = document.body || document.documentElement;\n body.appendChild( div );\n var style = getStyle( div );\n // round value for browser zoom. desandro/masonry#928\n isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200;\n getSize.isBoxSizeOuter = isBoxSizeOuter;\n\n body.removeChild( div );\n}\n\n// -------------------------- getSize -------------------------- //\n\nfunction getSize( elem ) {\n setup();\n\n // use querySeletor if elem is string\n if ( typeof elem == 'string' ) {\n elem = document.querySelector( elem );\n }\n\n // do not proceed on non-objects\n if ( !elem || typeof elem != 'object' || !elem.nodeType ) {\n return;\n }\n\n var style = getStyle( elem );\n\n // if hidden, everything is 0\n if ( style.display == 'none' ) {\n return getZeroSize();\n }\n\n var size = {};\n size.width = elem.offsetWidth;\n size.height = elem.offsetHeight;\n\n var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box';\n\n // get all measurements\n for ( var i=0; i < measurementsLength; i++ ) {\n var measurement = measurements[i];\n var value = style[ measurement ];\n var num = parseFloat( value );\n // any 'auto', 'medium' value will be 0\n size[ measurement ] = !isNaN( num ) ? num : 0;\n }\n\n var paddingWidth = size.paddingLeft + size.paddingRight;\n var paddingHeight = size.paddingTop + size.paddingBottom;\n var marginWidth = size.marginLeft + size.marginRight;\n var marginHeight = size.marginTop + size.marginBottom;\n var borderWidth = size.borderLeftWidth + size.borderRightWidth;\n var borderHeight = size.borderTopWidth + size.borderBottomWidth;\n\n var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter;\n\n // overwrite width and height if we can get it from style\n var styleWidth = getStyleSize( style.width );\n if ( styleWidth !== false ) {\n size.width = styleWidth +\n // add padding and border unless it's already including it\n ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth );\n }\n\n var styleHeight = getStyleSize( style.height );\n if ( styleHeight !== false ) {\n size.height = styleHeight +\n // add padding and border unless it's already including it\n ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight );\n }\n\n size.innerWidth = size.width - ( paddingWidth + borderWidth );\n size.innerHeight = size.height - ( paddingHeight + borderHeight );\n\n size.outerWidth = size.width + marginWidth;\n size.outerHeight = size.height + marginHeight;\n\n return size;\n}\n\nreturn getSize;\n\n});\n", "/**\n * matchesSelector v2.0.2\n * matchesSelector( element, '.selector' )\n * MIT license\n */\n\n/*jshint browser: true, strict: true, undef: true, unused: true */\n\n( function( window, factory ) {\n /*global define: false, module: false */\n 'use strict';\n // universal module definition\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory();\n } else {\n // browser global\n window.matchesSelector = factory();\n }\n\n}( window, function factory() {\n 'use strict';\n\n var matchesMethod = ( function() {\n var ElemProto = window.Element.prototype;\n // check for the standard method name first\n if ( ElemProto.matches ) {\n return 'matches';\n }\n // check un-prefixed\n if ( ElemProto.matchesSelector ) {\n return 'matchesSelector';\n }\n // check vendor prefixes\n var prefixes = [ 'webkit', 'moz', 'ms', 'o' ];\n\n for ( var i=0; i < prefixes.length; i++ ) {\n var prefix = prefixes[i];\n var method = prefix + 'MatchesSelector';\n if ( ElemProto[ method ] ) {\n return method;\n }\n }\n })();\n\n return function matchesSelector( elem, selector ) {\n return elem[ matchesMethod ]( selector );\n };\n\n}));\n", "/**\n * Fizzy UI utils v2.0.7\n * MIT license\n */\n\n/*jshint browser: true, undef: true, unused: true, strict: true */\n\n( function( window, factory ) {\n // universal module definition\n /*jshint strict: false */ /*globals define, module, require */\n\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'desandro-matches-selector/matches-selector'\n ], function( matchesSelector ) {\n return factory( window, matchesSelector );\n });\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n window,\n require('desandro-matches-selector')\n );\n } else {\n // browser global\n window.fizzyUIUtils = factory(\n window,\n window.matchesSelector\n );\n }\n\n}( window, function factory( window, matchesSelector ) {\n\n'use strict';\n\nvar utils = {};\n\n// ----- extend ----- //\n\n// extends objects\nutils.extend = function( a, b ) {\n for ( var prop in b ) {\n a[ prop ] = b[ prop ];\n }\n return a;\n};\n\n// ----- modulo ----- //\n\nutils.modulo = function( num, div ) {\n return ( ( num % div ) + div ) % div;\n};\n\n// ----- makeArray ----- //\n\nvar arraySlice = Array.prototype.slice;\n\n// turn element or nodeList into an array\nutils.makeArray = function( obj ) {\n if ( Array.isArray( obj ) ) {\n // use object if already an array\n return obj;\n }\n // return empty array if undefined or null. #6\n if ( obj === null || obj === undefined ) {\n return [];\n }\n\n var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number';\n if ( isArrayLike ) {\n // convert nodeList to array\n return arraySlice.call( obj );\n }\n\n // array of single index\n return [ obj ];\n};\n\n// ----- removeFrom ----- //\n\nutils.removeFrom = function( ary, obj ) {\n var index = ary.indexOf( obj );\n if ( index != -1 ) {\n ary.splice( index, 1 );\n }\n};\n\n// ----- getParent ----- //\n\nutils.getParent = function( elem, selector ) {\n while ( elem.parentNode && elem != document.body ) {\n elem = elem.parentNode;\n if ( matchesSelector( elem, selector ) ) {\n return elem;\n }\n }\n};\n\n// ----- getQueryElement ----- //\n\n// use element as selector string\nutils.getQueryElement = function( elem ) {\n if ( typeof elem == 'string' ) {\n return document.querySelector( elem );\n }\n return elem;\n};\n\n// ----- handleEvent ----- //\n\n// enable .ontype to trigger from .addEventListener( elem, 'type' )\nutils.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\n// ----- filterFindElements ----- //\n\nutils.filterFindElements = function( elems, selector ) {\n // make array of elems\n elems = utils.makeArray( elems );\n var ffElems = [];\n\n elems.forEach( function( elem ) {\n // check that elem is an actual element\n if ( !( elem instanceof HTMLElement ) ) {\n return;\n }\n // add elem if no selector\n if ( !selector ) {\n ffElems.push( elem );\n return;\n }\n // filter & find items if we have a selector\n // filter\n if ( matchesSelector( elem, selector ) ) {\n ffElems.push( elem );\n }\n // find children\n var childElems = elem.querySelectorAll( selector );\n // concat childElems to filterFound array\n for ( var i=0; i < childElems.length; i++ ) {\n ffElems.push( childElems[i] );\n }\n });\n\n return ffElems;\n};\n\n// ----- debounceMethod ----- //\n\nutils.debounceMethod = function( _class, methodName, threshold ) {\n threshold = threshold || 100;\n // original method\n var method = _class.prototype[ methodName ];\n var timeoutName = methodName + 'Timeout';\n\n _class.prototype[ methodName ] = function() {\n var timeout = this[ timeoutName ];\n clearTimeout( timeout );\n\n var args = arguments;\n var _this = this;\n this[ timeoutName ] = setTimeout( function() {\n method.apply( _this, args );\n delete _this[ timeoutName ];\n }, threshold );\n };\n};\n\n// ----- docReady ----- //\n\nutils.docReady = function( callback ) {\n var readyState = document.readyState;\n if ( readyState == 'complete' || readyState == 'interactive' ) {\n // do async to allow for other scripts to run. metafizzy/flickity#441\n setTimeout( callback );\n } else {\n document.addEventListener( 'DOMContentLoaded', callback );\n }\n};\n\n// ----- htmlInit ----- //\n\n// http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/\nutils.toDashed = function( str ) {\n return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) {\n return $1 + '-' + $2;\n }).toLowerCase();\n};\n\nvar console = window.console;\n/**\n * allow user to initialize classes via [data-namespace] or .js-namespace class\n * htmlInit( Widget, 'widgetName' )\n * options are parsed from data-namespace-options\n */\nutils.htmlInit = function( WidgetClass, namespace ) {\n utils.docReady( function() {\n var dashedNamespace = utils.toDashed( namespace );\n var dataAttr = 'data-' + dashedNamespace;\n var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' );\n var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace );\n var elems = utils.makeArray( dataAttrElems )\n .concat( utils.makeArray( jsDashElems ) );\n var dataOptionsAttr = dataAttr + '-options';\n var jQuery = window.jQuery;\n\n elems.forEach( function( elem ) {\n var attr = elem.getAttribute( dataAttr ) ||\n elem.getAttribute( dataOptionsAttr );\n var options;\n try {\n options = attr && JSON.parse( attr );\n } catch ( error ) {\n // log error, do not initialize\n if ( console ) {\n console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className +\n ': ' + error );\n }\n return;\n }\n // initialize\n var instance = new WidgetClass( elem, options );\n // make available via $().data('namespace')\n if ( jQuery ) {\n jQuery.data( elem, namespace, instance );\n }\n });\n\n });\n};\n\n// ----- ----- //\n\nreturn utils;\n\n}));\n", "/**\n * Outlayer Item\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /* globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( [\n 'ev-emitter/ev-emitter',\n 'get-size/get-size'\n ],\n factory\n );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory(\n require('ev-emitter'),\n require('get-size')\n );\n } else {\n // browser global\n window.Outlayer = {};\n window.Outlayer.Item = factory(\n window.EvEmitter,\n window.getSize\n );\n }\n\n}( window, function factory( EvEmitter, getSize ) {\n'use strict';\n\n// ----- helpers ----- //\n\nfunction isEmptyObj( obj ) {\n for ( var prop in obj ) {\n return false;\n }\n prop = null;\n return true;\n}\n\n// -------------------------- CSS3 support -------------------------- //\n\n\nvar docElemStyle = document.documentElement.style;\n\nvar transitionProperty = typeof docElemStyle.transition == 'string' ?\n 'transition' : 'WebkitTransition';\nvar transformProperty = typeof docElemStyle.transform == 'string' ?\n 'transform' : 'WebkitTransform';\n\nvar transitionEndEvent = {\n WebkitTransition: 'webkitTransitionEnd',\n transition: 'transitionend'\n}[ transitionProperty ];\n\n// cache all vendor properties that could have vendor prefix\nvar vendorProperties = {\n transform: transformProperty,\n transition: transitionProperty,\n transitionDuration: transitionProperty + 'Duration',\n transitionProperty: transitionProperty + 'Property',\n transitionDelay: transitionProperty + 'Delay'\n};\n\n// -------------------------- Item -------------------------- //\n\nfunction Item( element, layout ) {\n if ( !element ) {\n return;\n }\n\n this.element = element;\n // parent layout class, i.e. Masonry, Isotope, or Packery\n this.layout = layout;\n this.position = {\n x: 0,\n y: 0\n };\n\n this._create();\n}\n\n// inherit EvEmitter\nvar proto = Item.prototype = Object.create( EvEmitter.prototype );\nproto.constructor = Item;\n\nproto._create = function() {\n // transition objects\n this._transn = {\n ingProperties: {},\n clean: {},\n onEnd: {}\n };\n\n this.css({\n position: 'absolute'\n });\n};\n\n// trigger specified handler for event type\nproto.handleEvent = function( event ) {\n var method = 'on' + event.type;\n if ( this[ method ] ) {\n this[ method ]( event );\n }\n};\n\nproto.getSize = function() {\n this.size = getSize( this.element );\n};\n\n/**\n * apply CSS styles to element\n * @param {Object} style\n */\nproto.css = function( style ) {\n var elemStyle = this.element.style;\n\n for ( var prop in style ) {\n // use vendor property if available\n var supportedProp = vendorProperties[ prop ] || prop;\n elemStyle[ supportedProp ] = style[ prop ];\n }\n};\n\n // measure position, and sets it\nproto.getPosition = function() {\n var style = getComputedStyle( this.element );\n var isOriginLeft = this.layout._getOption('originLeft');\n var isOriginTop = this.layout._getOption('originTop');\n var xValue = style[ isOriginLeft ? 'left' : 'right' ];\n var yValue = style[ isOriginTop ? 'top' : 'bottom' ];\n var x = parseFloat( xValue );\n var y = parseFloat( yValue );\n // convert percent to pixels\n var layoutSize = this.layout.size;\n if ( xValue.indexOf('%') != -1 ) {\n x = ( x / 100 ) * layoutSize.width;\n }\n if ( yValue.indexOf('%') != -1 ) {\n y = ( y / 100 ) * layoutSize.height;\n }\n // clean up 'auto' or other non-integer values\n x = isNaN( x ) ? 0 : x;\n y = isNaN( y ) ? 0 : y;\n // remove padding from measurement\n x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight;\n y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom;\n\n this.position.x = x;\n this.position.y = y;\n};\n\n// set settled position, apply padding\nproto.layoutPosition = function() {\n var layoutSize = this.layout.size;\n var style = {};\n var isOriginLeft = this.layout._getOption('originLeft');\n var isOriginTop = this.layout._getOption('originTop');\n\n // x\n var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight';\n var xProperty = isOriginLeft ? 'left' : 'right';\n var xResetProperty = isOriginLeft ? 'right' : 'left';\n\n var x = this.position.x + layoutSize[ xPadding ];\n // set in percentage or pixels\n style[ xProperty ] = this.getXValue( x );\n // reset other property\n style[ xResetProperty ] = '';\n\n // y\n var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom';\n var yProperty = isOriginTop ? 'top' : 'bottom';\n var yResetProperty = isOriginTop ? 'bottom' : 'top';\n\n var y = this.position.y + layoutSize[ yPadding ];\n // set in percentage or pixels\n style[ yProperty ] = this.getYValue( y );\n // reset other property\n style[ yResetProperty ] = '';\n\n this.css( style );\n this.emitEvent( 'layout', [ this ] );\n};\n\nproto.getXValue = function( x ) {\n var isHorizontal = this.layout._getOption('horizontal');\n return this.layout.options.percentPosition && !isHorizontal ?\n ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px';\n};\n\nproto.getYValue = function( y ) {\n var isHorizontal = this.layout._getOption('horizontal');\n return this.layout.options.percentPosition && isHorizontal ?\n ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px';\n};\n\nproto._transitionTo = function( x, y ) {\n this.getPosition();\n // get current x & y from top/left\n var curX = this.position.x;\n var curY = this.position.y;\n\n var didNotMove = x == this.position.x && y == this.position.y;\n\n // save end position\n this.setPosition( x, y );\n\n // if did not move and not transitioning, just go to layout\n if ( didNotMove && !this.isTransitioning ) {\n this.layoutPosition();\n return;\n }\n\n var transX = x - curX;\n var transY = y - curY;\n var transitionStyle = {};\n transitionStyle.transform = this.getTranslate( transX, transY );\n\n this.transition({\n to: transitionStyle,\n onTransitionEnd: {\n transform: this.layoutPosition\n },\n isCleaning: true\n });\n};\n\nproto.getTranslate = function( x, y ) {\n // flip cooridinates if origin on right or bottom\n var isOriginLeft = this.layout._getOption('originLeft');\n var isOriginTop = this.layout._getOption('originTop');\n x = isOriginLeft ? x : -x;\n y = isOriginTop ? y : -y;\n return 'translate3d(' + x + 'px, ' + y + 'px, 0)';\n};\n\n// non transition + transform support\nproto.goTo = function( x, y ) {\n this.setPosition( x, y );\n this.layoutPosition();\n};\n\nproto.moveTo = proto._transitionTo;\n\nproto.setPosition = function( x, y ) {\n this.position.x = parseFloat( x );\n this.position.y = parseFloat( y );\n};\n\n// ----- transition ----- //\n\n/**\n * @param {Object} style - CSS\n * @param {Function} onTransitionEnd\n */\n\n// non transition, just trigger callback\nproto._nonTransition = function( args ) {\n this.css( args.to );\n if ( args.isCleaning ) {\n this._removeStyles( args.to );\n }\n for ( var prop in args.onTransitionEnd ) {\n args.onTransitionEnd[ prop ].call( this );\n }\n};\n\n/**\n * proper transition\n * @param {Object} args - arguments\n * @param {Object} to - style to transition to\n * @param {Object} from - style to start transition from\n * @param {Boolean} isCleaning - removes transition styles after transition\n * @param {Function} onTransitionEnd - callback\n */\nproto.transition = function( args ) {\n // redirect to nonTransition if no transition duration\n if ( !parseFloat( this.layout.options.transitionDuration ) ) {\n this._nonTransition( args );\n return;\n }\n\n var _transition = this._transn;\n // keep track of onTransitionEnd callback by css property\n for ( var prop in args.onTransitionEnd ) {\n _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ];\n }\n // keep track of properties that are transitioning\n for ( prop in args.to ) {\n _transition.ingProperties[ prop ] = true;\n // keep track of properties to clean up when transition is done\n if ( args.isCleaning ) {\n _transition.clean[ prop ] = true;\n }\n }\n\n // set from styles\n if ( args.from ) {\n this.css( args.from );\n // force redraw. http://blog.alexmaccaw.com/css-transitions\n var h = this.element.offsetHeight;\n // hack for JSHint to hush about unused var\n h = null;\n }\n // enable transition\n this.enableTransition( args.to );\n // set styles that are transitioning\n this.css( args.to );\n\n this.isTransitioning = true;\n\n};\n\n// dash before all cap letters, including first for\n// WebkitTransform => -webkit-transform\nfunction toDashedAll( str ) {\n return str.replace( /([A-Z])/g, function( $1 ) {\n return '-' + $1.toLowerCase();\n });\n}\n\nvar transitionProps = 'opacity,' + toDashedAll( transformProperty );\n\nproto.enableTransition = function(/* style */) {\n // HACK changing transitionProperty during a transition\n // will cause transition to jump\n if ( this.isTransitioning ) {\n return;\n }\n\n // make `transition: foo, bar, baz` from style object\n // HACK un-comment this when enableTransition can work\n // while a transition is happening\n // var transitionValues = [];\n // for ( var prop in style ) {\n // // dash-ify camelCased properties like WebkitTransition\n // prop = vendorProperties[ prop ] || prop;\n // transitionValues.push( toDashedAll( prop ) );\n // }\n // munge number to millisecond, to match stagger\n var duration = this.layout.options.transitionDuration;\n duration = typeof duration == 'number' ? duration + 'ms' : duration;\n // enable transition styles\n this.css({\n transitionProperty: transitionProps,\n transitionDuration: duration,\n transitionDelay: this.staggerDelay || 0\n });\n // listen for transition end event\n this.element.addEventListener( transitionEndEvent, this, false );\n};\n\n// ----- events ----- //\n\nproto.onwebkitTransitionEnd = function( event ) {\n this.ontransitionend( event );\n};\n\nproto.onotransitionend = function( event ) {\n this.ontransitionend( event );\n};\n\n// properties that I munge to make my life easier\nvar dashedVendorProperties = {\n '-webkit-transform': 'transform'\n};\n\nproto.ontransitionend = function( event ) {\n // disregard bubbled events from children\n if ( event.target !== this.element ) {\n return;\n }\n var _transition = this._transn;\n // get property name of transitioned property, convert to prefix-free\n var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName;\n\n // remove property that has completed transitioning\n delete _transition.ingProperties[ propertyName ];\n // check if any properties are still transitioning\n if ( isEmptyObj( _transition.ingProperties ) ) {\n // all properties have completed transitioning\n this.disableTransition();\n }\n // clean style\n if ( propertyName in _transition.clean ) {\n // clean up style\n this.element.style[ event.propertyName ] = '';\n delete _transition.clean[ propertyName ];\n }\n // trigger onTransitionEnd callback\n if ( propertyName in _transition.onEnd ) {\n var onTransitionEnd = _transition.onEnd[ propertyName ];\n onTransitionEnd.call( this );\n delete _transition.onEnd[ propertyName ];\n }\n\n this.emitEvent( 'transitionEnd', [ this ] );\n};\n\nproto.disableTransition = function() {\n this.removeTransitionStyles();\n this.element.removeEventListener( transitionEndEvent, this, false );\n this.isTransitioning = false;\n};\n\n/**\n * removes style property from element\n * @param {Object} style\n**/\nproto._removeStyles = function( style ) {\n // clean up transition styles\n var cleanStyle = {};\n for ( var prop in style ) {\n cleanStyle[ prop ] = '';\n }\n this.css( cleanStyle );\n};\n\nvar cleanTransitionStyle = {\n transitionProperty: '',\n transitionDuration: '',\n transitionDelay: ''\n};\n\nproto.removeTransitionStyles = function() {\n // remove transition\n this.css( cleanTransitionStyle );\n};\n\n// ----- stagger ----- //\n\nproto.stagger = function( delay ) {\n delay = isNaN( delay ) ? 0 : delay;\n this.staggerDelay = delay + 'ms';\n};\n\n// ----- show/hide/remove ----- //\n\n// remove element from DOM\nproto.removeElem = function() {\n this.element.parentNode.removeChild( this.element );\n // remove display: none\n this.css({ display: '' });\n this.emitEvent( 'remove', [ this ] );\n};\n\nproto.remove = function() {\n // just remove element if no transition support or no transition\n if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) {\n this.removeElem();\n return;\n }\n\n // start transition\n this.once( 'transitionEnd', function() {\n this.removeElem();\n });\n this.hide();\n};\n\nproto.reveal = function() {\n delete this.isHidden;\n // remove display: none\n this.css({ display: '' });\n\n var options = this.layout.options;\n\n var onTransitionEnd = {};\n var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle');\n onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd;\n\n this.transition({\n from: options.hiddenStyle,\n to: options.visibleStyle,\n isCleaning: true,\n onTransitionEnd: onTransitionEnd\n });\n};\n\nproto.onRevealTransitionEnd = function() {\n // check if still visible\n // during transition, item may have been hidden\n if ( !this.isHidden ) {\n this.emitEvent('reveal');\n }\n};\n\n/**\n * get style property use for hide/reveal transition end\n * @param {String} styleProperty - hiddenStyle/visibleStyle\n * @returns {String}\n */\nproto.getHideRevealTransitionEndProperty = function( styleProperty ) {\n var optionStyle = this.layout.options[ styleProperty ];\n // use opacity\n if ( optionStyle.opacity ) {\n return 'opacity';\n }\n // get first property\n for ( var prop in optionStyle ) {\n return prop;\n }\n};\n\nproto.hide = function() {\n // set flag\n this.isHidden = true;\n // remove display: none\n this.css({ display: '' });\n\n var options = this.layout.options;\n\n var onTransitionEnd = {};\n var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle');\n onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd;\n\n this.transition({\n from: options.visibleStyle,\n to: options.hiddenStyle,\n // keep hidden stuff hidden\n isCleaning: true,\n onTransitionEnd: onTransitionEnd\n });\n};\n\nproto.onHideTransitionEnd = function() {\n // check if still hidden\n // during transition, item may have been un-hidden\n if ( this.isHidden ) {\n this.css({ display: 'none' });\n this.emitEvent('hide');\n }\n};\n\nproto.destroy = function() {\n this.css({\n position: '',\n left: '',\n right: '',\n top: '',\n bottom: '',\n transition: '',\n transform: ''\n });\n};\n\nreturn Item;\n\n}));\n", "/*!\n * Outlayer v2.1.1\n * the brains and guts of a layout library\n * MIT license\n */\n\n( function( window, factory ) {\n 'use strict';\n // universal module definition\n /* jshint strict: false */ /* globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD - RequireJS\n define( [\n 'ev-emitter/ev-emitter',\n 'get-size/get-size',\n 'fizzy-ui-utils/utils',\n './item'\n ],\n function( EvEmitter, getSize, utils, Item ) {\n return factory( window, EvEmitter, getSize, utils, Item);\n }\n );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS - Browserify, Webpack\n module.exports = factory(\n window,\n require('ev-emitter'),\n require('get-size'),\n require('fizzy-ui-utils'),\n require('./item')\n );\n } else {\n // browser global\n window.Outlayer = factory(\n window,\n window.EvEmitter,\n window.getSize,\n window.fizzyUIUtils,\n window.Outlayer.Item\n );\n }\n\n}( window, function factory( window, EvEmitter, getSize, utils, Item ) {\n'use strict';\n\n// ----- vars ----- //\n\nvar console = window.console;\nvar jQuery = window.jQuery;\nvar noop = function() {};\n\n// -------------------------- Outlayer -------------------------- //\n\n// globally unique identifiers\nvar GUID = 0;\n// internal store of all Outlayer intances\nvar instances = {};\n\n\n/**\n * @param {Element, String} element\n * @param {Object} options\n * @constructor\n */\nfunction Outlayer( element, options ) {\n var queryElement = utils.getQueryElement( element );\n if ( !queryElement ) {\n if ( console ) {\n console.error( 'Bad element for ' + this.constructor.namespace +\n ': ' + ( queryElement || element ) );\n }\n return;\n }\n this.element = queryElement;\n // add jQuery\n if ( jQuery ) {\n this.$element = jQuery( this.element );\n }\n\n // options\n this.options = utils.extend( {}, this.constructor.defaults );\n this.option( options );\n\n // add id for Outlayer.getFromElement\n var id = ++GUID;\n this.element.outlayerGUID = id; // expando\n instances[ id ] = this; // associate via id\n\n // kick it off\n this._create();\n\n var isInitLayout = this._getOption('initLayout');\n if ( isInitLayout ) {\n this.layout();\n }\n}\n\n// settings are for internal use only\nOutlayer.namespace = 'outlayer';\nOutlayer.Item = Item;\n\n// default options\nOutlayer.defaults = {\n containerStyle: {\n position: 'relative'\n },\n initLayout: true,\n originLeft: true,\n originTop: true,\n resize: true,\n resizeContainer: true,\n // item options\n transitionDuration: '0.4s',\n hiddenStyle: {\n opacity: 0,\n transform: 'scale(0.001)'\n },\n visibleStyle: {\n opacity: 1,\n transform: 'scale(1)'\n }\n};\n\nvar proto = Outlayer.prototype;\n// inherit EvEmitter\nutils.extend( proto, EvEmitter.prototype );\n\n/**\n * set options\n * @param {Object} opts\n */\nproto.option = function( opts ) {\n utils.extend( this.options, opts );\n};\n\n/**\n * get backwards compatible option value, check old name\n */\nproto._getOption = function( option ) {\n var oldOption = this.constructor.compatOptions[ option ];\n return oldOption && this.options[ oldOption ] !== undefined ?\n this.options[ oldOption ] : this.options[ option ];\n};\n\nOutlayer.compatOptions = {\n // currentName: oldName\n initLayout: 'isInitLayout',\n horizontal: 'isHorizontal',\n layoutInstant: 'isLayoutInstant',\n originLeft: 'isOriginLeft',\n originTop: 'isOriginTop',\n resize: 'isResizeBound',\n resizeContainer: 'isResizingContainer'\n};\n\nproto._create = function() {\n // get items from children\n this.reloadItems();\n // elements that affect layout, but are not laid out\n this.stamps = [];\n this.stamp( this.options.stamp );\n // set container style\n utils.extend( this.element.style, this.options.containerStyle );\n\n // bind resize method\n var canBindResize = this._getOption('resize');\n if ( canBindResize ) {\n this.bindResize();\n }\n};\n\n// goes through all children again and gets bricks in proper order\nproto.reloadItems = function() {\n // collection of item elements\n this.items = this._itemize( this.element.children );\n};\n\n\n/**\n * turn elements into Outlayer.Items to be used in layout\n * @param {Array or NodeList or HTMLElement} elems\n * @returns {Array} items - collection of new Outlayer Items\n */\nproto._itemize = function( elems ) {\n\n var itemElems = this._filterFindItemElements( elems );\n var Item = this.constructor.Item;\n\n // create new Outlayer Items for collection\n var items = [];\n for ( var i=0; i < itemElems.length; i++ ) {\n var elem = itemElems[i];\n var item = new Item( elem, this );\n items.push( item );\n }\n\n return items;\n};\n\n/**\n * get item elements to be used in layout\n * @param {Array or NodeList or HTMLElement} elems\n * @returns {Array} items - item elements\n */\nproto._filterFindItemElements = function( elems ) {\n return utils.filterFindElements( elems, this.options.itemSelector );\n};\n\n/**\n * getter method for getting item elements\n * @returns {Array} elems - collection of item elements\n */\nproto.getItemElements = function() {\n return this.items.map( function( item ) {\n return item.element;\n });\n};\n\n// ----- init & layout ----- //\n\n/**\n * lays out all items\n */\nproto.layout = function() {\n this._resetLayout();\n this._manageStamps();\n\n // don't animate first layout\n var layoutInstant = this._getOption('layoutInstant');\n var isInstant = layoutInstant !== undefined ?\n layoutInstant : !this._isLayoutInited;\n this.layoutItems( this.items, isInstant );\n\n // flag for initalized\n this._isLayoutInited = true;\n};\n\n// _init is alias for layout\nproto._init = proto.layout;\n\n/**\n * logic before any new layout\n */\nproto._resetLayout = function() {\n this.getSize();\n};\n\n\nproto.getSize = function() {\n this.size = getSize( this.element );\n};\n\n/**\n * get measurement from option, for columnWidth, rowHeight, gutter\n * if option is String -> get element from selector string, & get size of element\n * if option is Element -> get size of element\n * else use option as a number\n *\n * @param {String} measurement\n * @param {String} size - width or height\n * @private\n */\nproto._getMeasurement = function( measurement, size ) {\n var option = this.options[ measurement ];\n var elem;\n if ( !option ) {\n // default to 0\n this[ measurement ] = 0;\n } else {\n // use option as an element\n if ( typeof option == 'string' ) {\n elem = this.element.querySelector( option );\n } else if ( option instanceof HTMLElement ) {\n elem = option;\n }\n // use size of element, if element\n this[ measurement ] = elem ? getSize( elem )[ size ] : option;\n }\n};\n\n/**\n * layout a collection of item elements\n * @api public\n */\nproto.layoutItems = function( items, isInstant ) {\n items = this._getItemsForLayout( items );\n\n this._layoutItems( items, isInstant );\n\n this._postLayout();\n};\n\n/**\n * get the items to be laid out\n * you may want to skip over some items\n * @param {Array} items\n * @returns {Array} items\n */\nproto._getItemsForLayout = function( items ) {\n return items.filter( function( item ) {\n return !item.isIgnored;\n });\n};\n\n/**\n * layout items\n * @param {Array} items\n * @param {Boolean} isInstant\n */\nproto._layoutItems = function( items, isInstant ) {\n this._emitCompleteOnItems( 'layout', items );\n\n if ( !items || !items.length ) {\n // no items, emit event with empty array\n return;\n }\n\n var queue = [];\n\n items.forEach( function( item ) {\n // get x/y object from method\n var position = this._getItemLayoutPosition( item );\n // enqueue\n position.item = item;\n position.isInstant = isInstant || item.isLayoutInstant;\n queue.push( position );\n }, this );\n\n this._processLayoutQueue( queue );\n};\n\n/**\n * get item layout position\n * @param {Outlayer.Item} item\n * @returns {Object} x and y position\n */\nproto._getItemLayoutPosition = function( /* item */ ) {\n return {\n x: 0,\n y: 0\n };\n};\n\n/**\n * iterate over array and position each item\n * Reason being - separating this logic prevents 'layout invalidation'\n * thx @paul_irish\n * @param {Array} queue\n */\nproto._processLayoutQueue = function( queue ) {\n this.updateStagger();\n queue.forEach( function( obj, i ) {\n this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i );\n }, this );\n};\n\n// set stagger from option in milliseconds number\nproto.updateStagger = function() {\n var stagger = this.options.stagger;\n if ( stagger === null || stagger === undefined ) {\n this.stagger = 0;\n return;\n }\n this.stagger = getMilliseconds( stagger );\n return this.stagger;\n};\n\n/**\n * Sets position of item in DOM\n * @param {Outlayer.Item} item\n * @param {Number} x - horizontal position\n * @param {Number} y - vertical position\n * @param {Boolean} isInstant - disables transitions\n */\nproto._positionItem = function( item, x, y, isInstant, i ) {\n if ( isInstant ) {\n // if not transition, just set CSS\n item.goTo( x, y );\n } else {\n item.stagger( i * this.stagger );\n item.moveTo( x, y );\n }\n};\n\n/**\n * Any logic you want to do after each layout,\n * i.e. size the container\n */\nproto._postLayout = function() {\n this.resizeContainer();\n};\n\nproto.resizeContainer = function() {\n var isResizingContainer = this._getOption('resizeContainer');\n if ( !isResizingContainer ) {\n return;\n }\n var size = this._getContainerSize();\n if ( size ) {\n this._setContainerMeasure( size.width, true );\n this._setContainerMeasure( size.height, false );\n }\n};\n\n/**\n * Sets width or height of container if returned\n * @returns {Object} size\n * @param {Number} width\n * @param {Number} height\n */\nproto._getContainerSize = noop;\n\n/**\n * @param {Number} measure - size of width or height\n * @param {Boolean} isWidth\n */\nproto._setContainerMeasure = function( measure, isWidth ) {\n if ( measure === undefined ) {\n return;\n }\n\n var elemSize = this.size;\n // add padding and border width if border box\n if ( elemSize.isBorderBox ) {\n measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight +\n elemSize.borderLeftWidth + elemSize.borderRightWidth :\n elemSize.paddingBottom + elemSize.paddingTop +\n elemSize.borderTopWidth + elemSize.borderBottomWidth;\n }\n\n measure = Math.max( measure, 0 );\n this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px';\n};\n\n/**\n * emit eventComplete on a collection of items events\n * @param {String} eventName\n * @param {Array} items - Outlayer.Items\n */\nproto._emitCompleteOnItems = function( eventName, items ) {\n var _this = this;\n function onComplete() {\n _this.dispatchEvent( eventName + 'Complete', null, [ items ] );\n }\n\n var count = items.length;\n if ( !items || !count ) {\n onComplete();\n return;\n }\n\n var doneCount = 0;\n function tick() {\n doneCount++;\n if ( doneCount == count ) {\n onComplete();\n }\n }\n\n // bind callback\n items.forEach( function( item ) {\n item.once( eventName, tick );\n });\n};\n\n/**\n * emits events via EvEmitter and jQuery events\n * @param {String} type - name of event\n * @param {Event} event - original event\n * @param {Array} args - extra arguments\n */\nproto.dispatchEvent = function( type, event, args ) {\n // add original event to arguments\n var emitArgs = event ? [ event ].concat( args ) : args;\n this.emitEvent( type, emitArgs );\n\n if ( jQuery ) {\n // set this.$element\n this.$element = this.$element || jQuery( this.element );\n if ( event ) {\n // create jQuery event\n var $event = jQuery.Event( event );\n $event.type = type;\n this.$element.trigger( $event, args );\n } else {\n // just trigger with type if no event available\n this.$element.trigger( type, args );\n }\n }\n};\n\n// -------------------------- ignore & stamps -------------------------- //\n\n\n/**\n * keep item in collection, but do not lay it out\n * ignored items do not get skipped in layout\n * @param {Element} elem\n */\nproto.ignore = function( elem ) {\n var item = this.getItem( elem );\n if ( item ) {\n item.isIgnored = true;\n }\n};\n\n/**\n * return item to layout collection\n * @param {Element} elem\n */\nproto.unignore = function( elem ) {\n var item = this.getItem( elem );\n if ( item ) {\n delete item.isIgnored;\n }\n};\n\n/**\n * adds elements to stamps\n * @param {NodeList, Array, Element, or String} elems\n */\nproto.stamp = function( elems ) {\n elems = this._find( elems );\n if ( !elems ) {\n return;\n }\n\n this.stamps = this.stamps.concat( elems );\n // ignore\n elems.forEach( this.ignore, this );\n};\n\n/**\n * removes elements to stamps\n * @param {NodeList, Array, or Element} elems\n */\nproto.unstamp = function( elems ) {\n elems = this._find( elems );\n if ( !elems ){\n return;\n }\n\n elems.forEach( function( elem ) {\n // filter out removed stamp elements\n utils.removeFrom( this.stamps, elem );\n this.unignore( elem );\n }, this );\n};\n\n/**\n * finds child elements\n * @param {NodeList, Array, Element, or String} elems\n * @returns {Array} elems\n */\nproto._find = function( elems ) {\n if ( !elems ) {\n return;\n }\n // if string, use argument as selector string\n if ( typeof elems == 'string' ) {\n elems = this.element.querySelectorAll( elems );\n }\n elems = utils.makeArray( elems );\n return elems;\n};\n\nproto._manageStamps = function() {\n if ( !this.stamps || !this.stamps.length ) {\n return;\n }\n\n this._getBoundingRect();\n\n this.stamps.forEach( this._manageStamp, this );\n};\n\n// update boundingLeft / Top\nproto._getBoundingRect = function() {\n // get bounding rect for container element\n var boundingRect = this.element.getBoundingClientRect();\n var size = this.size;\n this._boundingRect = {\n left: boundingRect.left + size.paddingLeft + size.borderLeftWidth,\n top: boundingRect.top + size.paddingTop + size.borderTopWidth,\n right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ),\n bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth )\n };\n};\n\n/**\n * @param {Element} stamp\n**/\nproto._manageStamp = noop;\n\n/**\n * get x/y position of element relative to container element\n * @param {Element} elem\n * @returns {Object} offset - has left, top, right, bottom\n */\nproto._getElementOffset = function( elem ) {\n var boundingRect = elem.getBoundingClientRect();\n var thisRect = this._boundingRect;\n var size = getSize( elem );\n var offset = {\n left: boundingRect.left - thisRect.left - size.marginLeft,\n top: boundingRect.top - thisRect.top - size.marginTop,\n right: thisRect.right - boundingRect.right - size.marginRight,\n bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom\n };\n return offset;\n};\n\n// -------------------------- resize -------------------------- //\n\n// enable event handlers for listeners\n// i.e. resize -> onresize\nproto.handleEvent = utils.handleEvent;\n\n/**\n * Bind layout to window resizing\n */\nproto.bindResize = function() {\n window.addEventListener( 'resize', this );\n this.isResizeBound = true;\n};\n\n/**\n * Unbind layout to window resizing\n */\nproto.unbindResize = function() {\n window.removeEventListener( 'resize', this );\n this.isResizeBound = false;\n};\n\nproto.onresize = function() {\n this.resize();\n};\n\nutils.debounceMethod( Outlayer, 'onresize', 100 );\n\nproto.resize = function() {\n // don't trigger if size did not change\n // or if resize was unbound. See #9\n if ( !this.isResizeBound || !this.needsResizeLayout() ) {\n return;\n }\n\n this.layout();\n};\n\n/**\n * check if layout is needed post layout\n * @returns Boolean\n */\nproto.needsResizeLayout = function() {\n var size = getSize( this.element );\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var hasSizes = this.size && size;\n return hasSizes && size.innerWidth !== this.size.innerWidth;\n};\n\n// -------------------------- methods -------------------------- //\n\n/**\n * add items to Outlayer instance\n * @param {Array or NodeList or Element} elems\n * @returns {Array} items - Outlayer.Items\n**/\nproto.addItems = function( elems ) {\n var items = this._itemize( elems );\n // add items to collection\n if ( items.length ) {\n this.items = this.items.concat( items );\n }\n return items;\n};\n\n/**\n * Layout newly-appended item elements\n * @param {Array or NodeList or Element} elems\n */\nproto.appended = function( elems ) {\n var items = this.addItems( elems );\n if ( !items.length ) {\n return;\n }\n // layout and reveal just the new items\n this.layoutItems( items, true );\n this.reveal( items );\n};\n\n/**\n * Layout prepended elements\n * @param {Array or NodeList or Element} elems\n */\nproto.prepended = function( elems ) {\n var items = this._itemize( elems );\n if ( !items.length ) {\n return;\n }\n // add items to beginning of collection\n var previousItems = this.items.slice(0);\n this.items = items.concat( previousItems );\n // start new layout\n this._resetLayout();\n this._manageStamps();\n // layout new stuff without transition\n this.layoutItems( items, true );\n this.reveal( items );\n // layout previous items\n this.layoutItems( previousItems );\n};\n\n/**\n * reveal a collection of items\n * @param {Array of Outlayer.Items} items\n */\nproto.reveal = function( items ) {\n this._emitCompleteOnItems( 'reveal', items );\n if ( !items || !items.length ) {\n return;\n }\n var stagger = this.updateStagger();\n items.forEach( function( item, i ) {\n item.stagger( i * stagger );\n item.reveal();\n });\n};\n\n/**\n * hide a collection of items\n * @param {Array of Outlayer.Items} items\n */\nproto.hide = function( items ) {\n this._emitCompleteOnItems( 'hide', items );\n if ( !items || !items.length ) {\n return;\n }\n var stagger = this.updateStagger();\n items.forEach( function( item, i ) {\n item.stagger( i * stagger );\n item.hide();\n });\n};\n\n/**\n * reveal item elements\n * @param {Array}, {Element}, {NodeList} items\n */\nproto.revealItemElements = function( elems ) {\n var items = this.getItems( elems );\n this.reveal( items );\n};\n\n/**\n * hide item elements\n * @param {Array}, {Element}, {NodeList} items\n */\nproto.hideItemElements = function( elems ) {\n var items = this.getItems( elems );\n this.hide( items );\n};\n\n/**\n * get Outlayer.Item, given an Element\n * @param {Element} elem\n * @param {Function} callback\n * @returns {Outlayer.Item} item\n */\nproto.getItem = function( elem ) {\n // loop through items to get the one that matches\n for ( var i=0; i < this.items.length; i++ ) {\n var item = this.items[i];\n if ( item.element == elem ) {\n // return item\n return item;\n }\n }\n};\n\n/**\n * get collection of Outlayer.Items, given Elements\n * @param {Array} elems\n * @returns {Array} items - Outlayer.Items\n */\nproto.getItems = function( elems ) {\n elems = utils.makeArray( elems );\n var items = [];\n elems.forEach( function( elem ) {\n var item = this.getItem( elem );\n if ( item ) {\n items.push( item );\n }\n }, this );\n\n return items;\n};\n\n/**\n * remove element(s) from instance and DOM\n * @param {Array or NodeList or Element} elems\n */\nproto.remove = function( elems ) {\n var removeItems = this.getItems( elems );\n\n this._emitCompleteOnItems( 'remove', removeItems );\n\n // bail if no items to remove\n if ( !removeItems || !removeItems.length ) {\n return;\n }\n\n removeItems.forEach( function( item ) {\n item.remove();\n // remove item from collection\n utils.removeFrom( this.items, item );\n }, this );\n};\n\n// ----- destroy ----- //\n\n// remove and disable Outlayer instance\nproto.destroy = function() {\n // clean up dynamic styles\n var style = this.element.style;\n style.height = '';\n style.position = '';\n style.width = '';\n // destroy items\n this.items.forEach( function( item ) {\n item.destroy();\n });\n\n this.unbindResize();\n\n var id = this.element.outlayerGUID;\n delete instances[ id ]; // remove reference to instance by id\n delete this.element.outlayerGUID;\n // remove data for jQuery\n if ( jQuery ) {\n jQuery.removeData( this.element, this.constructor.namespace );\n }\n\n};\n\n// -------------------------- data -------------------------- //\n\n/**\n * get Outlayer instance from element\n * @param {Element} elem\n * @returns {Outlayer}\n */\nOutlayer.data = function( elem ) {\n elem = utils.getQueryElement( elem );\n var id = elem && elem.outlayerGUID;\n return id && instances[ id ];\n};\n\n\n// -------------------------- create Outlayer class -------------------------- //\n\n/**\n * create a layout class\n * @param {String} namespace\n */\nOutlayer.create = function( namespace, options ) {\n // sub-class Outlayer\n var Layout = subclass( Outlayer );\n // apply new options and compatOptions\n Layout.defaults = utils.extend( {}, Outlayer.defaults );\n utils.extend( Layout.defaults, options );\n Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions );\n\n Layout.namespace = namespace;\n\n Layout.data = Outlayer.data;\n\n // sub-class Item\n Layout.Item = subclass( Item );\n\n // -------------------------- declarative -------------------------- //\n\n utils.htmlInit( Layout, namespace );\n\n // -------------------------- jQuery bridge -------------------------- //\n\n // make into jQuery plugin\n if ( jQuery && jQuery.bridget ) {\n jQuery.bridget( namespace, Layout );\n }\n\n return Layout;\n};\n\nfunction subclass( Parent ) {\n function SubClass() {\n Parent.apply( this, arguments );\n }\n\n SubClass.prototype = Object.create( Parent.prototype );\n SubClass.prototype.constructor = SubClass;\n\n return SubClass;\n}\n\n// ----- helpers ----- //\n\n// how many milliseconds are in each unit\nvar msUnits = {\n ms: 1,\n s: 1000\n};\n\n// munge time-like parameter into millisecond number\n// '0.4s' -> 40\nfunction getMilliseconds( time ) {\n if ( typeof time == 'number' ) {\n return time;\n }\n var matches = time.match( /(^\\d*\\.?\\d*)(\\w*)/ );\n var num = matches && matches[1];\n var unit = matches && matches[2];\n if ( !num.length ) {\n return 0;\n }\n num = parseFloat( num );\n var mult = msUnits[ unit ] || 1;\n return num * mult;\n}\n\n// ----- fin ----- //\n\n// back in global\nOutlayer.Item = Item;\n\nreturn Outlayer;\n\n}));\n", "/*!\n * Masonry v4.2.2\n * Cascading grid layout library\n * https://masonry.desandro.com\n * MIT License\n * by David DeSandro\n */\n\n( function( window, factory ) {\n // universal module definition\n /* jshint strict: false */ /*globals define, module, require */\n if ( typeof define == 'function' && define.amd ) {\n // AMD\n define( [\n 'outlayer/outlayer',\n 'get-size/get-size'\n ],\n factory );\n } else if ( typeof module == 'object' && module.exports ) {\n // CommonJS\n module.exports = factory(\n require('outlayer'),\n require('get-size')\n );\n } else {\n // browser global\n window.Masonry = factory(\n window.Outlayer,\n window.getSize\n );\n }\n\n}( window, function factory( Outlayer, getSize ) {\n\n'use strict';\n\n// -------------------------- masonryDefinition -------------------------- //\n\n // create an Outlayer layout class\n var Masonry = Outlayer.create('masonry');\n // isFitWidth -> fitWidth\n Masonry.compatOptions.fitWidth = 'isFitWidth';\n\n var proto = Masonry.prototype;\n\n proto._resetLayout = function() {\n this.getSize();\n this._getMeasurement( 'columnWidth', 'outerWidth' );\n this._getMeasurement( 'gutter', 'outerWidth' );\n this.measureColumns();\n\n // reset column Y\n this.colYs = [];\n for ( var i=0; i < this.cols; i++ ) {\n this.colYs.push( 0 );\n }\n\n this.maxY = 0;\n this.horizontalColIndex = 0;\n };\n\n proto.measureColumns = function() {\n this.getContainerWidth();\n // if columnWidth is 0, default to outerWidth of first item\n if ( !this.columnWidth ) {\n var firstItem = this.items[0];\n var firstItemElem = firstItem && firstItem.element;\n // columnWidth fall back to item of first element\n this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth ||\n // if first elem has no width, default to size of container\n this.containerWidth;\n }\n\n var columnWidth = this.columnWidth += this.gutter;\n\n // calculate columns\n var containerWidth = this.containerWidth + this.gutter;\n var cols = containerWidth / columnWidth;\n // fix rounding errors, typically with gutters\n var excess = columnWidth - containerWidth % columnWidth;\n // if overshoot is less than a pixel, round up, otherwise floor it\n var mathMethod = excess && excess < 1 ? 'round' : 'floor';\n cols = Math[ mathMethod ]( cols );\n this.cols = Math.max( cols, 1 );\n };\n\n proto.getContainerWidth = function() {\n // container is parent if fit width\n var isFitWidth = this._getOption('fitWidth');\n var container = isFitWidth ? this.element.parentNode : this.element;\n // check that this.size and size are there\n // IE8 triggers resize on body size change, so they might not be\n var size = getSize( container );\n this.containerWidth = size && size.innerWidth;\n };\n\n proto._getItemLayoutPosition = function( item ) {\n item.getSize();\n // how many columns does this brick span\n var remainder = item.size.outerWidth % this.columnWidth;\n var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil';\n // round if off by 1 pixel, otherwise use ceil\n var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth );\n colSpan = Math.min( colSpan, this.cols );\n // use horizontal or top column position\n var colPosMethod = this.options.horizontalOrder ?\n '_getHorizontalColPosition' : '_getTopColPosition';\n var colPosition = this[ colPosMethod ]( colSpan, item );\n // position the brick\n var position = {\n x: this.columnWidth * colPosition.col,\n y: colPosition.y\n };\n // apply setHeight to necessary columns\n var setHeight = colPosition.y + item.size.outerHeight;\n var setMax = colSpan + colPosition.col;\n for ( var i = colPosition.col; i < setMax; i++ ) {\n this.colYs[i] = setHeight;\n }\n\n return position;\n };\n\n proto._getTopColPosition = function( colSpan ) {\n var colGroup = this._getTopColGroup( colSpan );\n // get the minimum Y value from the columns\n var minimumY = Math.min.apply( Math, colGroup );\n\n return {\n col: colGroup.indexOf( minimumY ),\n y: minimumY,\n };\n };\n\n /**\n * @param {Number} colSpan - number of columns the element spans\n * @returns {Array} colGroup\n */\n proto._getTopColGroup = function( colSpan ) {\n if ( colSpan < 2 ) {\n // if brick spans only one column, use all the column Ys\n return this.colYs;\n }\n\n var colGroup = [];\n // how many different places could this brick fit horizontally\n var groupCount = this.cols + 1 - colSpan;\n // for each group potential horizontal position\n for ( var i = 0; i < groupCount; i++ ) {\n colGroup[i] = this._getColGroupY( i, colSpan );\n }\n return colGroup;\n };\n\n proto._getColGroupY = function( col, colSpan ) {\n if ( colSpan < 2 ) {\n return this.colYs[ col ];\n }\n // make an array of colY values for that one group\n var groupColYs = this.colYs.slice( col, col + colSpan );\n // and get the max value of the array\n return Math.max.apply( Math, groupColYs );\n };\n\n // get column position based on horizontal index. #873\n proto._getHorizontalColPosition = function( colSpan, item ) {\n var col = this.horizontalColIndex % this.cols;\n var isOver = colSpan > 1 && col + colSpan > this.cols;\n // shift to next row if item can't fit on current row\n col = isOver ? 0 : col;\n // don't let zero-size items take up space\n var hasSize = item.size.outerWidth && item.size.outerHeight;\n this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex;\n\n return {\n col: col,\n y: this._getColGroupY( col, colSpan ),\n };\n };\n\n proto._manageStamp = function( stamp ) {\n var stampSize = getSize( stamp );\n var offset = this._getElementOffset( stamp );\n // get the columns that this stamp affects\n var isOriginLeft = this._getOption('originLeft');\n var firstX = isOriginLeft ? offset.left : offset.right;\n var lastX = firstX + stampSize.outerWidth;\n var firstCol = Math.floor( firstX / this.columnWidth );\n firstCol = Math.max( 0, firstCol );\n var lastCol = Math.floor( lastX / this.columnWidth );\n // lastCol should not go over if multiple of columnWidth #425\n lastCol -= lastX % this.columnWidth ? 0 : 1;\n lastCol = Math.min( this.cols - 1, lastCol );\n // set colYs to bottom of the stamp\n\n var isOriginTop = this._getOption('originTop');\n var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) +\n stampSize.outerHeight;\n for ( var i = firstCol; i <= lastCol; i++ ) {\n this.colYs[i] = Math.max( stampMaxY, this.colYs[i] );\n }\n };\n\n proto._getContainerSize = function() {\n this.maxY = Math.max.apply( Math, this.colYs );\n var size = {\n height: this.maxY\n };\n\n if ( this._getOption('fitWidth') ) {\n size.width = this._getContainerFitWidth();\n }\n\n return size;\n };\n\n proto._getContainerFitWidth = function() {\n var unusedCols = 0;\n // count unused columns\n var i = this.cols;\n while ( --i ) {\n if ( this.colYs[i] !== 0 ) {\n break;\n }\n unusedCols++;\n }\n // fit container to columns that have been used\n return ( this.cols - unusedCols ) * this.columnWidth - this.gutter;\n };\n\n proto.needsResizeLayout = function() {\n var previousWidth = this.containerWidth;\n this.getContainerWidth();\n return previousWidth != this.containerWidth;\n };\n\n return Masonry;\n\n}));\n", "module.exports = debounce;\n\nfunction debounce(fn, wait, callFirst) {\n var timeout = null;\n\n var clear = function() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = null;\n }\n };\n\n var debounceWrapper = function() {\n if (!wait) {\n return fn.apply(this, arguments);\n }\n\n var context = this;\n var args = arguments;\n var callNow = callFirst && !timeout;\n\n clear();\n\n timeout = setTimeout(function() {\n timeout = null;\n\n if (!callNow) {\n return fn.apply(context, args);\n }\n }, wait);\n\n if (callNow) {\n return fn.apply(this, arguments);\n }\n };\n\n debounceWrapper.cancel = clear;\n\n return debounceWrapper;\n}\n", "'use strict';\nmodule.exports = str => encodeURIComponent(str).replace(/[!'()*]/g, x => `%${x.charCodeAt(0).toString(16).toUpperCase()}`);\n", "'use strict';\nvar token = '%[a-f0-9]{2}';\nvar singleMatcher = new RegExp(token, 'gi');\nvar multiMatcher = new RegExp('(' + token + ')+', 'gi');\n\nfunction decodeComponents(components, split) {\n\ttry {\n\t\t// Try to decode the entire string first\n\t\treturn decodeURIComponent(components.join(''));\n\t} catch (err) {\n\t\t// Do nothing\n\t}\n\n\tif (components.length === 1) {\n\t\treturn components;\n\t}\n\n\tsplit = split || 1;\n\n\t// Split the array in 2 parts\n\tvar left = components.slice(0, split);\n\tvar right = components.slice(split);\n\n\treturn Array.prototype.concat.call([], decodeComponents(left), decodeComponents(right));\n}\n\nfunction decode(input) {\n\ttry {\n\t\treturn decodeURIComponent(input);\n\t} catch (err) {\n\t\tvar tokens = input.match(singleMatcher);\n\n\t\tfor (var i = 1; i < tokens.length; i++) {\n\t\t\tinput = decodeComponents(tokens, i).join('');\n\n\t\t\ttokens = input.match(singleMatcher);\n\t\t}\n\n\t\treturn input;\n\t}\n}\n\nfunction customDecodeURIComponent(input) {\n\t// Keep track of all the replacements and prefill the map with the `BOM`\n\tvar replaceMap = {\n\t\t'%FE%FF': '\\uFFFD\\uFFFD',\n\t\t'%FF%FE': '\\uFFFD\\uFFFD'\n\t};\n\n\tvar match = multiMatcher.exec(input);\n\twhile (match) {\n\t\ttry {\n\t\t\t// Decode as big chunks as possible\n\t\t\treplaceMap[match[0]] = decodeURIComponent(match[0]);\n\t\t} catch (err) {\n\t\t\tvar result = decode(match[0]);\n\n\t\t\tif (result !== match[0]) {\n\t\t\t\treplaceMap[match[0]] = result;\n\t\t\t}\n\t\t}\n\n\t\tmatch = multiMatcher.exec(input);\n\t}\n\n\t// Add `%C2` at the end of the map to make sure it does not replace the combinator before everything else\n\treplaceMap['%C2'] = '\\uFFFD';\n\n\tvar entries = Object.keys(replaceMap);\n\n\tfor (var i = 0; i < entries.length; i++) {\n\t\t// Replace all decoded components\n\t\tvar key = entries[i];\n\t\tinput = input.replace(new RegExp(key, 'g'), replaceMap[key]);\n\t}\n\n\treturn input;\n}\n\nmodule.exports = function (encodedURI) {\n\tif (typeof encodedURI !== 'string') {\n\t\tthrow new TypeError('Expected `encodedURI` to be of type `string`, got `' + typeof encodedURI + '`');\n\t}\n\n\ttry {\n\t\tencodedURI = encodedURI.replace(/\\+/g, ' ');\n\n\t\t// Try the built in decoder first\n\t\treturn decodeURIComponent(encodedURI);\n\t} catch (err) {\n\t\t// Fallback to a more advanced decoder\n\t\treturn customDecodeURIComponent(encodedURI);\n\t}\n};\n", "'use strict';\n\nmodule.exports = (string, separator) => {\n\tif (!(typeof string === 'string' && typeof separator === 'string')) {\n\t\tthrow new TypeError('Expected the arguments to be of type `string`');\n\t}\n\n\tif (separator === '') {\n\t\treturn [string];\n\t}\n\n\tconst separatorIndex = string.indexOf(separator);\n\n\tif (separatorIndex === -1) {\n\t\treturn [string];\n\t}\n\n\treturn [\n\t\tstring.slice(0, separatorIndex),\n\t\tstring.slice(separatorIndex + separator.length)\n\t];\n};\n", "'use strict';\nmodule.exports = function (obj, predicate) {\n\tvar ret = {};\n\tvar keys = Object.keys(obj);\n\tvar isArr = Array.isArray(predicate);\n\n\tfor (var i = 0; i < keys.length; i++) {\n\t\tvar key = keys[i];\n\t\tvar val = obj[key];\n\n\t\tif (isArr ? predicate.indexOf(key) !== -1 : predicate(key, val, obj)) {\n\t\t\tret[key] = val;\n\t\t}\n\t}\n\n\treturn ret;\n};\n", "'use strict';\nconst strictUriEncode = require('strict-uri-encode');\nconst decodeComponent = require('decode-uri-component');\nconst splitOnFirst = require('split-on-first');\nconst filterObject = require('filter-obj');\n\nconst isNullOrUndefined = value => value === null || value === undefined;\n\nfunction encoderForArrayFormat(options) {\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tconst index = result.length;\n\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[', index, ']'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [\n\t\t\t\t\t...result,\n\t\t\t\t\t[encode(key, options), '[', encode(index, options), ']=', encode(value, options)].join('')\n\t\t\t\t];\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, [encode(key, options), '[]'].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '[]=', encode(value, options)].join('')];\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (value === null || value === undefined || value.length === 0) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (result.length === 0) {\n\t\t\t\t\treturn [[encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t\t}\n\n\t\t\t\treturn [[result, encode(value, options)].join(options.arrayFormatSeparator)];\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn key => (result, value) => {\n\t\t\t\tif (\n\t\t\t\t\tvalue === undefined ||\n\t\t\t\t\t(options.skipNull && value === null) ||\n\t\t\t\t\t(options.skipEmptyString && value === '')\n\t\t\t\t) {\n\t\t\t\t\treturn result;\n\t\t\t\t}\n\n\t\t\t\tif (value === null) {\n\t\t\t\t\treturn [...result, encode(key, options)];\n\t\t\t\t}\n\n\t\t\t\treturn [...result, [encode(key, options), '=', encode(value, options)].join('')];\n\t\t\t};\n\t}\n}\n\nfunction parserForArrayFormat(options) {\n\tlet result;\n\n\tswitch (options.arrayFormat) {\n\t\tcase 'index':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /\\[(\\d*)\\]$/.exec(key);\n\n\t\t\t\tkey = key.replace(/\\[\\d*\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = {};\n\t\t\t\t}\n\n\t\t\t\taccumulator[key][result[1]] = value;\n\t\t\t};\n\n\t\tcase 'bracket':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tresult = /(\\[\\])$/.exec(key);\n\t\t\t\tkey = key.replace(/\\[\\]$/, '');\n\n\t\t\t\tif (!result) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = [value];\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\n\t\tcase 'comma':\n\t\tcase 'separator':\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tconst isArray = typeof value === 'string' && value.includes(options.arrayFormatSeparator);\n\t\t\t\tconst isEncodedArray = (typeof value === 'string' && !isArray && decode(value, options).includes(options.arrayFormatSeparator));\n\t\t\t\tvalue = isEncodedArray ? decode(value, options) : value;\n\t\t\t\tconst newValue = isArray || isEncodedArray ? value.split(options.arrayFormatSeparator).map(item => decode(item, options)) : value === null ? value : decode(value, options);\n\t\t\t\taccumulator[key] = newValue;\n\t\t\t};\n\n\t\tdefault:\n\t\t\treturn (key, value, accumulator) => {\n\t\t\t\tif (accumulator[key] === undefined) {\n\t\t\t\t\taccumulator[key] = value;\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\taccumulator[key] = [].concat(accumulator[key], value);\n\t\t\t};\n\t}\n}\n\nfunction validateArrayFormatSeparator(value) {\n\tif (typeof value !== 'string' || value.length !== 1) {\n\t\tthrow new TypeError('arrayFormatSeparator must be single character string');\n\t}\n}\n\nfunction encode(value, options) {\n\tif (options.encode) {\n\t\treturn options.strict ? strictUriEncode(value) : encodeURIComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction decode(value, options) {\n\tif (options.decode) {\n\t\treturn decodeComponent(value);\n\t}\n\n\treturn value;\n}\n\nfunction keysSorter(input) {\n\tif (Array.isArray(input)) {\n\t\treturn input.sort();\n\t}\n\n\tif (typeof input === 'object') {\n\t\treturn keysSorter(Object.keys(input))\n\t\t\t.sort((a, b) => Number(a) - Number(b))\n\t\t\t.map(key => input[key]);\n\t}\n\n\treturn input;\n}\n\nfunction removeHash(input) {\n\tconst hashStart = input.indexOf('#');\n\tif (hashStart !== -1) {\n\t\tinput = input.slice(0, hashStart);\n\t}\n\n\treturn input;\n}\n\nfunction getHash(url) {\n\tlet hash = '';\n\tconst hashStart = url.indexOf('#');\n\tif (hashStart !== -1) {\n\t\thash = url.slice(hashStart);\n\t}\n\n\treturn hash;\n}\n\nfunction extract(input) {\n\tinput = removeHash(input);\n\tconst queryStart = input.indexOf('?');\n\tif (queryStart === -1) {\n\t\treturn '';\n\t}\n\n\treturn input.slice(queryStart + 1);\n}\n\nfunction parseValue(value, options) {\n\tif (options.parseNumbers && !Number.isNaN(Number(value)) && (typeof value === 'string' && value.trim() !== '')) {\n\t\tvalue = Number(value);\n\t} else if (options.parseBooleans && value !== null && (value.toLowerCase() === 'true' || value.toLowerCase() === 'false')) {\n\t\tvalue = value.toLowerCase() === 'true';\n\t}\n\n\treturn value;\n}\n\nfunction parse(query, options) {\n\toptions = Object.assign({\n\t\tdecode: true,\n\t\tsort: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ',',\n\t\tparseNumbers: false,\n\t\tparseBooleans: false\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst formatter = parserForArrayFormat(options);\n\n\t// Create an object with no prototype\n\tconst ret = Object.create(null);\n\n\tif (typeof query !== 'string') {\n\t\treturn ret;\n\t}\n\n\tquery = query.trim().replace(/^[?#&]/, '');\n\n\tif (!query) {\n\t\treturn ret;\n\t}\n\n\tfor (const param of query.split('&')) {\n\t\tif (param === '') {\n\t\t\tcontinue;\n\t\t}\n\n\t\tlet [key, value] = splitOnFirst(options.decode ? param.replace(/\\+/g, ' ') : param, '=');\n\n\t\t// Missing `=` should be `null`:\n\t\t// http://w3.org/TR/2012/WD-url-20120524/#collect-url-parameters\n\t\tvalue = value === undefined ? null : ['comma', 'separator'].includes(options.arrayFormat) ? value : decode(value, options);\n\t\tformatter(decode(key, options), value, ret);\n\t}\n\n\tfor (const key of Object.keys(ret)) {\n\t\tconst value = ret[key];\n\t\tif (typeof value === 'object' && value !== null) {\n\t\t\tfor (const k of Object.keys(value)) {\n\t\t\t\tvalue[k] = parseValue(value[k], options);\n\t\t\t}\n\t\t} else {\n\t\t\tret[key] = parseValue(value, options);\n\t\t}\n\t}\n\n\tif (options.sort === false) {\n\t\treturn ret;\n\t}\n\n\treturn (options.sort === true ? Object.keys(ret).sort() : Object.keys(ret).sort(options.sort)).reduce((result, key) => {\n\t\tconst value = ret[key];\n\t\tif (Boolean(value) && typeof value === 'object' && !Array.isArray(value)) {\n\t\t\t// Sort object keys, not values\n\t\t\tresult[key] = keysSorter(value);\n\t\t} else {\n\t\t\tresult[key] = value;\n\t\t}\n\n\t\treturn result;\n\t}, Object.create(null));\n}\n\nexports.extract = extract;\nexports.parse = parse;\n\nexports.stringify = (object, options) => {\n\tif (!object) {\n\t\treturn '';\n\t}\n\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true,\n\t\tarrayFormat: 'none',\n\t\tarrayFormatSeparator: ','\n\t}, options);\n\n\tvalidateArrayFormatSeparator(options.arrayFormatSeparator);\n\n\tconst shouldFilter = key => (\n\t\t(options.skipNull && isNullOrUndefined(object[key])) ||\n\t\t(options.skipEmptyString && object[key] === '')\n\t);\n\n\tconst formatter = encoderForArrayFormat(options);\n\n\tconst objectCopy = {};\n\n\tfor (const key of Object.keys(object)) {\n\t\tif (!shouldFilter(key)) {\n\t\t\tobjectCopy[key] = object[key];\n\t\t}\n\t}\n\n\tconst keys = Object.keys(objectCopy);\n\n\tif (options.sort !== false) {\n\t\tkeys.sort(options.sort);\n\t}\n\n\treturn keys.map(key => {\n\t\tconst value = object[key];\n\n\t\tif (value === undefined) {\n\t\t\treturn '';\n\t\t}\n\n\t\tif (value === null) {\n\t\t\treturn encode(key, options);\n\t\t}\n\n\t\tif (Array.isArray(value)) {\n\t\t\treturn value\n\t\t\t\t.reduce(formatter(key), [])\n\t\t\t\t.join('&');\n\t\t}\n\n\t\treturn encode(key, options) + '=' + encode(value, options);\n\t}).filter(x => x.length > 0).join('&');\n};\n\nexports.parseUrl = (url, options) => {\n\toptions = Object.assign({\n\t\tdecode: true\n\t}, options);\n\n\tconst [url_, hash] = splitOnFirst(url, '#');\n\n\treturn Object.assign(\n\t\t{\n\t\t\turl: url_.split('?')[0] || '',\n\t\t\tquery: parse(extract(url), options)\n\t\t},\n\t\toptions && options.parseFragmentIdentifier && hash ? {fragmentIdentifier: decode(hash, options)} : {}\n\t);\n};\n\nexports.stringifyUrl = (object, options) => {\n\toptions = Object.assign({\n\t\tencode: true,\n\t\tstrict: true\n\t}, options);\n\n\tconst url = removeHash(object.url).split('?')[0] || '';\n\tconst queryFromUrl = exports.extract(object.url);\n\tconst parsedQueryFromUrl = exports.parse(queryFromUrl, {sort: false});\n\n\tconst query = Object.assign(parsedQueryFromUrl, object.query);\n\tlet queryString = exports.stringify(query, options);\n\tif (queryString) {\n\t\tqueryString = `?${queryString}`;\n\t}\n\n\tlet hash = getHash(object.url);\n\tif (object.fragmentIdentifier) {\n\t\thash = `#${encode(object.fragmentIdentifier, options)}`;\n\t}\n\n\treturn `${url}${queryString}${hash}`;\n};\n\nexports.pick = (input, filter, options) => {\n\toptions = Object.assign({\n\t\tparseFragmentIdentifier: true\n\t}, options);\n\n\tconst {url, query, fragmentIdentifier} = exports.parseUrl(input, options);\n\treturn exports.stringifyUrl({\n\t\turl,\n\t\tquery: filterObject(query, filter),\n\t\tfragmentIdentifier\n\t}, options);\n};\n\nexports.exclude = (input, filter, options) => {\n\tconst exclusionFilter = Array.isArray(filter) ? key => !filter.includes(key) : (key, value) => !filter(key, value);\n\n\treturn exports.pick(input, exclusionFilter, options);\n};\n", "/*!\n * clipboard.js v2.0.6\n * https://clipboardjs.com/\n * \n * Licensed MIT \u00A9 Zeno Rocha\n */\n(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClipboardJS\"] = factory();\n\telse\n\t\troot[\"ClipboardJS\"] = factory();\n})(this, function() {\nreturn /******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = 6);\n/******/ })\n/************************************************************************/\n/******/ ([\n/* 0 */\n/***/ (function(module, exports) {\n\nfunction select(element) {\n var selectedText;\n\n if (element.nodeName === 'SELECT') {\n element.focus();\n\n selectedText = element.value;\n }\n else if (element.nodeName === 'INPUT' || element.nodeName === 'TEXTAREA') {\n var isReadOnly = element.hasAttribute('readonly');\n\n if (!isReadOnly) {\n element.setAttribute('readonly', '');\n }\n\n element.select();\n element.setSelectionRange(0, element.value.length);\n\n if (!isReadOnly) {\n element.removeAttribute('readonly');\n }\n\n selectedText = element.value;\n }\n else {\n if (element.hasAttribute('contenteditable')) {\n element.focus();\n }\n\n var selection = window.getSelection();\n var range = document.createRange();\n\n range.selectNodeContents(element);\n selection.removeAllRanges();\n selection.addRange(range);\n\n selectedText = selection.toString();\n }\n\n return selectedText;\n}\n\nmodule.exports = select;\n\n\n/***/ }),\n/* 1 */\n/***/ (function(module, exports) {\n\nfunction E () {\n // Keep this empty so it's easier to inherit from\n // (via https://github.com/lipsmack from https://github.com/scottcorgan/tiny-emitter/issues/3)\n}\n\nE.prototype = {\n on: function (name, callback, ctx) {\n var e = this.e || (this.e = {});\n\n (e[name] || (e[name] = [])).push({\n fn: callback,\n ctx: ctx\n });\n\n return this;\n },\n\n once: function (name, callback, ctx) {\n var self = this;\n function listener () {\n self.off(name, listener);\n callback.apply(ctx, arguments);\n };\n\n listener._ = callback\n return this.on(name, listener, ctx);\n },\n\n emit: function (name) {\n var data = [].slice.call(arguments, 1);\n var evtArr = ((this.e || (this.e = {}))[name] || []).slice();\n var i = 0;\n var len = evtArr.length;\n\n for (i; i < len; i++) {\n evtArr[i].fn.apply(evtArr[i].ctx, data);\n }\n\n return this;\n },\n\n off: function (name, callback) {\n var e = this.e || (this.e = {});\n var evts = e[name];\n var liveEvents = [];\n\n if (evts && callback) {\n for (var i = 0, len = evts.length; i < len; i++) {\n if (evts[i].fn !== callback && evts[i].fn._ !== callback)\n liveEvents.push(evts[i]);\n }\n }\n\n // Remove event from queue to prevent memory leak\n // Suggested by https://github.com/lazd\n // Ref: https://github.com/scottcorgan/tiny-emitter/commit/c6ebfaa9bc973b33d110a84a307742b7cf94c953#commitcomment-5024910\n\n (liveEvents.length)\n ? e[name] = liveEvents\n : delete e[name];\n\n return this;\n }\n};\n\nmodule.exports = E;\nmodule.exports.TinyEmitter = E;\n\n\n/***/ }),\n/* 2 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar is = __webpack_require__(3);\nvar delegate = __webpack_require__(4);\n\n/**\n * Validates all params and calls the right\n * listener function based on its target type.\n *\n * @param {String|HTMLElement|HTMLCollection|NodeList} target\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listen(target, type, callback) {\n if (!target && !type && !callback) {\n throw new Error('Missing required arguments');\n }\n\n if (!is.string(type)) {\n throw new TypeError('Second argument must be a String');\n }\n\n if (!is.fn(callback)) {\n throw new TypeError('Third argument must be a Function');\n }\n\n if (is.node(target)) {\n return listenNode(target, type, callback);\n }\n else if (is.nodeList(target)) {\n return listenNodeList(target, type, callback);\n }\n else if (is.string(target)) {\n return listenSelector(target, type, callback);\n }\n else {\n throw new TypeError('First argument must be a String, HTMLElement, HTMLCollection, or NodeList');\n }\n}\n\n/**\n * Adds an event listener to a HTML element\n * and returns a remove listener function.\n *\n * @param {HTMLElement} node\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNode(node, type, callback) {\n node.addEventListener(type, callback);\n\n return {\n destroy: function() {\n node.removeEventListener(type, callback);\n }\n }\n}\n\n/**\n * Add an event listener to a list of HTML elements\n * and returns a remove listener function.\n *\n * @param {NodeList|HTMLCollection} nodeList\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenNodeList(nodeList, type, callback) {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.addEventListener(type, callback);\n });\n\n return {\n destroy: function() {\n Array.prototype.forEach.call(nodeList, function(node) {\n node.removeEventListener(type, callback);\n });\n }\n }\n}\n\n/**\n * Add an event listener to a selector\n * and returns a remove listener function.\n *\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Object}\n */\nfunction listenSelector(selector, type, callback) {\n return delegate(document.body, selector, type, callback);\n}\n\nmodule.exports = listen;\n\n\n/***/ }),\n/* 3 */\n/***/ (function(module, exports) {\n\n/**\n * Check if argument is a HTML element.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.node = function(value) {\n return value !== undefined\n && value instanceof HTMLElement\n && value.nodeType === 1;\n};\n\n/**\n * Check if argument is a list of HTML elements.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.nodeList = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return value !== undefined\n && (type === '[object NodeList]' || type === '[object HTMLCollection]')\n && ('length' in value)\n && (value.length === 0 || exports.node(value[0]));\n};\n\n/**\n * Check if argument is a string.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.string = function(value) {\n return typeof value === 'string'\n || value instanceof String;\n};\n\n/**\n * Check if argument is a function.\n *\n * @param {Object} value\n * @return {Boolean}\n */\nexports.fn = function(value) {\n var type = Object.prototype.toString.call(value);\n\n return type === '[object Function]';\n};\n\n\n/***/ }),\n/* 4 */\n/***/ (function(module, exports, __webpack_require__) {\n\nvar closest = __webpack_require__(5);\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction _delegate(element, selector, type, callback, useCapture) {\n var listenerFn = listener.apply(this, arguments);\n\n element.addEventListener(type, listenerFn, useCapture);\n\n return {\n destroy: function() {\n element.removeEventListener(type, listenerFn, useCapture);\n }\n }\n}\n\n/**\n * Delegates event to a selector.\n *\n * @param {Element|String|Array} [elements]\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @param {Boolean} useCapture\n * @return {Object}\n */\nfunction delegate(elements, selector, type, callback, useCapture) {\n // Handle the regular Element usage\n if (typeof elements.addEventListener === 'function') {\n return _delegate.apply(null, arguments);\n }\n\n // Handle Element-less usage, it defaults to global delegation\n if (typeof type === 'function') {\n // Use `document` as the first parameter, then apply arguments\n // This is a short way to .unshift `arguments` without running into deoptimizations\n return _delegate.bind(null, document).apply(null, arguments);\n }\n\n // Handle Selector-based usage\n if (typeof elements === 'string') {\n elements = document.querySelectorAll(elements);\n }\n\n // Handle Array-like based usage\n return Array.prototype.map.call(elements, function (element) {\n return _delegate(element, selector, type, callback, useCapture);\n });\n}\n\n/**\n * Finds closest match and invokes callback.\n *\n * @param {Element} element\n * @param {String} selector\n * @param {String} type\n * @param {Function} callback\n * @return {Function}\n */\nfunction listener(element, selector, type, callback) {\n return function(e) {\n e.delegateTarget = closest(e.target, selector);\n\n if (e.delegateTarget) {\n callback.call(element, e);\n }\n }\n}\n\nmodule.exports = delegate;\n\n\n/***/ }),\n/* 5 */\n/***/ (function(module, exports) {\n\nvar DOCUMENT_NODE_TYPE = 9;\n\n/**\n * A polyfill for Element.matches()\n */\nif (typeof Element !== 'undefined' && !Element.prototype.matches) {\n var proto = Element.prototype;\n\n proto.matches = proto.matchesSelector ||\n proto.mozMatchesSelector ||\n proto.msMatchesSelector ||\n proto.oMatchesSelector ||\n proto.webkitMatchesSelector;\n}\n\n/**\n * Finds the closest parent that matches a selector.\n *\n * @param {Element} element\n * @param {String} selector\n * @return {Function}\n */\nfunction closest (element, selector) {\n while (element && element.nodeType !== DOCUMENT_NODE_TYPE) {\n if (typeof element.matches === 'function' &&\n element.matches(selector)) {\n return element;\n }\n element = element.parentNode;\n }\n}\n\nmodule.exports = closest;\n\n\n/***/ }),\n/* 6 */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n\n// EXTERNAL MODULE: ./node_modules/select/src/select.js\nvar src_select = __webpack_require__(0);\nvar select_default = /*#__PURE__*/__webpack_require__.n(src_select);\n\n// CONCATENATED MODULE: ./src/clipboard-action.js\nvar _typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\n\n\n/**\n * Inner class which performs selection from either `text` or `target`\n * properties and then executes copy or cut operations.\n */\n\nvar clipboard_action_ClipboardAction = function () {\n /**\n * @param {Object} options\n */\n function ClipboardAction(options) {\n _classCallCheck(this, ClipboardAction);\n\n this.resolveOptions(options);\n this.initSelection();\n }\n\n /**\n * Defines base properties passed from constructor.\n * @param {Object} options\n */\n\n\n _createClass(ClipboardAction, [{\n key: 'resolveOptions',\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n this.action = options.action;\n this.container = options.container;\n this.emitter = options.emitter;\n this.target = options.target;\n this.text = options.text;\n this.trigger = options.trigger;\n\n this.selectedText = '';\n }\n\n /**\n * Decides which selection strategy is going to be applied based\n * on the existence of `text` and `target` properties.\n */\n\n }, {\n key: 'initSelection',\n value: function initSelection() {\n if (this.text) {\n this.selectFake();\n } else if (this.target) {\n this.selectTarget();\n }\n }\n\n /**\n * Creates a fake textarea element, sets its value from `text` property,\n * and makes a selection on it.\n */\n\n }, {\n key: 'selectFake',\n value: function selectFake() {\n var _this = this;\n\n var isRTL = document.documentElement.getAttribute('dir') == 'rtl';\n\n this.removeFake();\n\n this.fakeHandlerCallback = function () {\n return _this.removeFake();\n };\n this.fakeHandler = this.container.addEventListener('click', this.fakeHandlerCallback) || true;\n\n this.fakeElem = document.createElement('textarea');\n // Prevent zooming on iOS\n this.fakeElem.style.fontSize = '12pt';\n // Reset box model\n this.fakeElem.style.border = '0';\n this.fakeElem.style.padding = '0';\n this.fakeElem.style.margin = '0';\n // Move element out of screen horizontally\n this.fakeElem.style.position = 'absolute';\n this.fakeElem.style[isRTL ? 'right' : 'left'] = '-9999px';\n // Move element to the same position vertically\n var yPosition = window.pageYOffset || document.documentElement.scrollTop;\n this.fakeElem.style.top = yPosition + 'px';\n\n this.fakeElem.setAttribute('readonly', '');\n this.fakeElem.value = this.text;\n\n this.container.appendChild(this.fakeElem);\n\n this.selectedText = select_default()(this.fakeElem);\n this.copyText();\n }\n\n /**\n * Only removes the fake element after another click event, that way\n * a user can hit `Ctrl+C` to copy because selection still exists.\n */\n\n }, {\n key: 'removeFake',\n value: function removeFake() {\n if (this.fakeHandler) {\n this.container.removeEventListener('click', this.fakeHandlerCallback);\n this.fakeHandler = null;\n this.fakeHandlerCallback = null;\n }\n\n if (this.fakeElem) {\n this.container.removeChild(this.fakeElem);\n this.fakeElem = null;\n }\n }\n\n /**\n * Selects the content from element passed on `target` property.\n */\n\n }, {\n key: 'selectTarget',\n value: function selectTarget() {\n this.selectedText = select_default()(this.target);\n this.copyText();\n }\n\n /**\n * Executes the copy operation based on the current selection.\n */\n\n }, {\n key: 'copyText',\n value: function copyText() {\n var succeeded = void 0;\n\n try {\n succeeded = document.execCommand(this.action);\n } catch (err) {\n succeeded = false;\n }\n\n this.handleResult(succeeded);\n }\n\n /**\n * Fires an event based on the copy operation result.\n * @param {Boolean} succeeded\n */\n\n }, {\n key: 'handleResult',\n value: function handleResult(succeeded) {\n this.emitter.emit(succeeded ? 'success' : 'error', {\n action: this.action,\n text: this.selectedText,\n trigger: this.trigger,\n clearSelection: this.clearSelection.bind(this)\n });\n }\n\n /**\n * Moves focus away from `target` and back to the trigger, removes current selection.\n */\n\n }, {\n key: 'clearSelection',\n value: function clearSelection() {\n if (this.trigger) {\n this.trigger.focus();\n }\n document.activeElement.blur();\n window.getSelection().removeAllRanges();\n }\n\n /**\n * Sets the `action` to be performed which can be either 'copy' or 'cut'.\n * @param {String} action\n */\n\n }, {\n key: 'destroy',\n\n\n /**\n * Destroy lifecycle.\n */\n value: function destroy() {\n this.removeFake();\n }\n }, {\n key: 'action',\n set: function set() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'copy';\n\n this._action = action;\n\n if (this._action !== 'copy' && this._action !== 'cut') {\n throw new Error('Invalid \"action\" value, use either \"copy\" or \"cut\"');\n }\n }\n\n /**\n * Gets the `action` property.\n * @return {String}\n */\n ,\n get: function get() {\n return this._action;\n }\n\n /**\n * Sets the `target` property using an element\n * that will be have its content copied.\n * @param {Element} target\n */\n\n }, {\n key: 'target',\n set: function set(target) {\n if (target !== undefined) {\n if (target && (typeof target === 'undefined' ? 'undefined' : _typeof(target)) === 'object' && target.nodeType === 1) {\n if (this.action === 'copy' && target.hasAttribute('disabled')) {\n throw new Error('Invalid \"target\" attribute. Please use \"readonly\" instead of \"disabled\" attribute');\n }\n\n if (this.action === 'cut' && (target.hasAttribute('readonly') || target.hasAttribute('disabled'))) {\n throw new Error('Invalid \"target\" attribute. You can\\'t cut text from elements with \"readonly\" or \"disabled\" attributes');\n }\n\n this._target = target;\n } else {\n throw new Error('Invalid \"target\" value, use a valid Element');\n }\n }\n }\n\n /**\n * Gets the `target` property.\n * @return {String|HTMLElement}\n */\n ,\n get: function get() {\n return this._target;\n }\n }]);\n\n return ClipboardAction;\n}();\n\n/* harmony default export */ var clipboard_action = (clipboard_action_ClipboardAction);\n// EXTERNAL MODULE: ./node_modules/tiny-emitter/index.js\nvar tiny_emitter = __webpack_require__(1);\nvar tiny_emitter_default = /*#__PURE__*/__webpack_require__.n(tiny_emitter);\n\n// EXTERNAL MODULE: ./node_modules/good-listener/src/listen.js\nvar listen = __webpack_require__(2);\nvar listen_default = /*#__PURE__*/__webpack_require__.n(listen);\n\n// CONCATENATED MODULE: ./src/clipboard.js\nvar clipboard_typeof = typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; };\n\nvar clipboard_createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();\n\nfunction clipboard_classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _possibleConstructorReturn(self, call) { if (!self) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }\n\n\n\n\n\n/**\n * Base class which takes one or more elements, adds event listeners to them,\n * and instantiates a new `ClipboardAction` on each click.\n */\n\nvar clipboard_Clipboard = function (_Emitter) {\n _inherits(Clipboard, _Emitter);\n\n /**\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n * @param {Object} options\n */\n function Clipboard(trigger, options) {\n clipboard_classCallCheck(this, Clipboard);\n\n var _this = _possibleConstructorReturn(this, (Clipboard.__proto__ || Object.getPrototypeOf(Clipboard)).call(this));\n\n _this.resolveOptions(options);\n _this.listenClick(trigger);\n return _this;\n }\n\n /**\n * Defines if attributes would be resolved using internal setter functions\n * or custom functions that were passed in the constructor.\n * @param {Object} options\n */\n\n\n clipboard_createClass(Clipboard, [{\n key: 'resolveOptions',\n value: function resolveOptions() {\n var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n this.action = typeof options.action === 'function' ? options.action : this.defaultAction;\n this.target = typeof options.target === 'function' ? options.target : this.defaultTarget;\n this.text = typeof options.text === 'function' ? options.text : this.defaultText;\n this.container = clipboard_typeof(options.container) === 'object' ? options.container : document.body;\n }\n\n /**\n * Adds a click event listener to the passed trigger.\n * @param {String|HTMLElement|HTMLCollection|NodeList} trigger\n */\n\n }, {\n key: 'listenClick',\n value: function listenClick(trigger) {\n var _this2 = this;\n\n this.listener = listen_default()(trigger, 'click', function (e) {\n return _this2.onClick(e);\n });\n }\n\n /**\n * Defines a new `ClipboardAction` on each click event.\n * @param {Event} e\n */\n\n }, {\n key: 'onClick',\n value: function onClick(e) {\n var trigger = e.delegateTarget || e.currentTarget;\n\n if (this.clipboardAction) {\n this.clipboardAction = null;\n }\n\n this.clipboardAction = new clipboard_action({\n action: this.action(trigger),\n target: this.target(trigger),\n text: this.text(trigger),\n container: this.container,\n trigger: trigger,\n emitter: this\n });\n }\n\n /**\n * Default `action` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: 'defaultAction',\n value: function defaultAction(trigger) {\n return getAttributeValue('action', trigger);\n }\n\n /**\n * Default `target` lookup function.\n * @param {Element} trigger\n */\n\n }, {\n key: 'defaultTarget',\n value: function defaultTarget(trigger) {\n var selector = getAttributeValue('target', trigger);\n\n if (selector) {\n return document.querySelector(selector);\n }\n }\n\n /**\n * Returns the support of the given action, or all actions if no action is\n * given.\n * @param {String} [action]\n */\n\n }, {\n key: 'defaultText',\n\n\n /**\n * Default `text` lookup function.\n * @param {Element} trigger\n */\n value: function defaultText(trigger) {\n return getAttributeValue('text', trigger);\n }\n\n /**\n * Destroy lifecycle.\n */\n\n }, {\n key: 'destroy',\n value: function destroy() {\n this.listener.destroy();\n\n if (this.clipboardAction) {\n this.clipboardAction.destroy();\n this.clipboardAction = null;\n }\n }\n }], [{\n key: 'isSupported',\n value: function isSupported() {\n var action = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ['copy', 'cut'];\n\n var actions = typeof action === 'string' ? [action] : action;\n var support = !!document.queryCommandSupported;\n\n actions.forEach(function (action) {\n support = support && !!document.queryCommandSupported(action);\n });\n\n return support;\n }\n }]);\n\n return Clipboard;\n}(tiny_emitter_default.a);\n\n/**\n * Helper function to retrieve attribute value.\n * @param {String} suffix\n * @param {Element} element\n */\n\n\nfunction getAttributeValue(suffix, element) {\n var attribute = 'data-clipboard-' + suffix;\n\n if (!element.hasAttribute(attribute)) {\n return;\n }\n\n return element.getAttribute(attribute);\n}\n\n/* harmony default export */ var clipboard = __webpack_exports__[\"default\"] = (clipboard_Clipboard);\n\n/***/ })\n/******/ ])[\"default\"];\n});", "/* flatpickr v4.6.3, @license MIT */\n(function (global, factory) {\n typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :\n typeof define === 'function' && define.amd ? define(factory) :\n (global = global || self, global.flatpickr = factory());\n}(this, function () { 'use strict';\n\n /*! *****************************************************************************\r\n Copyright (c) Microsoft Corporation. All rights reserved.\r\n Licensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\n this file except in compliance with the License. You may obtain a copy of the\r\n License at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\n THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\n WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\n MERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\n See the Apache Version 2.0 License for specific language governing permissions\r\n and limitations under the License.\r\n ***************************************************************************** */\r\n\r\n var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n };\r\n return __assign.apply(this, arguments);\r\n };\n\n var HOOKS = [\n \"onChange\",\n \"onClose\",\n \"onDayCreate\",\n \"onDestroy\",\n \"onKeyDown\",\n \"onMonthChange\",\n \"onOpen\",\n \"onParseConfig\",\n \"onReady\",\n \"onValueUpdate\",\n \"onYearChange\",\n \"onPreCalendarPosition\",\n ];\n var defaults = {\n _disable: [],\n _enable: [],\n allowInput: false,\n altFormat: \"F j, Y\",\n altInput: false,\n altInputClass: \"form-control input\",\n animate: typeof window === \"object\" &&\n window.navigator.userAgent.indexOf(\"MSIE\") === -1,\n ariaDateFormat: \"F j, Y\",\n clickOpens: true,\n closeOnSelect: true,\n conjunction: \", \",\n dateFormat: \"Y-m-d\",\n defaultHour: 12,\n defaultMinute: 0,\n defaultSeconds: 0,\n disable: [],\n disableMobile: false,\n enable: [],\n enableSeconds: false,\n enableTime: false,\n errorHandler: function (err) {\n return typeof console !== \"undefined\" && console.warn(err);\n },\n getWeek: function (givenDate) {\n var date = new Date(givenDate.getTime());\n date.setHours(0, 0, 0, 0);\n // Thursday in current week decides the year.\n date.setDate(date.getDate() + 3 - ((date.getDay() + 6) % 7));\n // January 4 is always in week 1.\n var week1 = new Date(date.getFullYear(), 0, 4);\n // Adjust to Thursday in week 1 and count number of weeks from date to week1.\n return (1 +\n Math.round(((date.getTime() - week1.getTime()) / 86400000 -\n 3 +\n ((week1.getDay() + 6) % 7)) /\n 7));\n },\n hourIncrement: 1,\n ignoredFocusElements: [],\n inline: false,\n locale: \"default\",\n minuteIncrement: 5,\n mode: \"single\",\n monthSelectorType: \"dropdown\",\n nextArrow: \"\",\n noCalendar: false,\n now: new Date(),\n onChange: [],\n onClose: [],\n onDayCreate: [],\n onDestroy: [],\n onKeyDown: [],\n onMonthChange: [],\n onOpen: [],\n onParseConfig: [],\n onReady: [],\n onValueUpdate: [],\n onYearChange: [],\n onPreCalendarPosition: [],\n plugins: [],\n position: \"auto\",\n positionElement: undefined,\n prevArrow: \"\",\n shorthandCurrentMonth: false,\n showMonths: 1,\n static: false,\n time_24hr: false,\n weekNumbers: false,\n wrap: false\n };\n\n var english = {\n weekdays: {\n shorthand: [\"Sun\", \"Mon\", \"Tue\", \"Wed\", \"Thu\", \"Fri\", \"Sat\"],\n longhand: [\n \"Sunday\",\n \"Monday\",\n \"Tuesday\",\n \"Wednesday\",\n \"Thursday\",\n \"Friday\",\n \"Saturday\",\n ]\n },\n months: {\n shorthand: [\n \"Jan\",\n \"Feb\",\n \"Mar\",\n \"Apr\",\n \"May\",\n \"Jun\",\n \"Jul\",\n \"Aug\",\n \"Sep\",\n \"Oct\",\n \"Nov\",\n \"Dec\",\n ],\n longhand: [\n \"January\",\n \"February\",\n \"March\",\n \"April\",\n \"May\",\n \"June\",\n \"July\",\n \"August\",\n \"September\",\n \"October\",\n \"November\",\n \"December\",\n ]\n },\n daysInMonth: [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31],\n firstDayOfWeek: 0,\n ordinal: function (nth) {\n var s = nth % 100;\n if (s > 3 && s < 21)\n return \"th\";\n switch (s % 10) {\n case 1:\n return \"st\";\n case 2:\n return \"nd\";\n case 3:\n return \"rd\";\n default:\n return \"th\";\n }\n },\n rangeSeparator: \" to \",\n weekAbbreviation: \"Wk\",\n scrollTitle: \"Scroll to increment\",\n toggleTitle: \"Click to toggle\",\n amPM: [\"AM\", \"PM\"],\n yearAriaLabel: \"Year\",\n hourAriaLabel: \"Hour\",\n minuteAriaLabel: \"Minute\",\n time_24hr: false\n };\n\n var pad = function (number) { return (\"0\" + number).slice(-2); };\n var int = function (bool) { return (bool === true ? 1 : 0); };\n /* istanbul ignore next */\n function debounce(func, wait, immediate) {\n if (immediate === void 0) { immediate = false; }\n var timeout;\n return function () {\n var context = this, args = arguments;\n timeout !== null && clearTimeout(timeout);\n timeout = window.setTimeout(function () {\n timeout = null;\n if (!immediate)\n func.apply(context, args);\n }, wait);\n if (immediate && !timeout)\n func.apply(context, args);\n };\n }\n var arrayify = function (obj) {\n return obj instanceof Array ? obj : [obj];\n };\n\n function toggleClass(elem, className, bool) {\n if (bool === true)\n return elem.classList.add(className);\n elem.classList.remove(className);\n }\n function createElement(tag, className, content) {\n var e = window.document.createElement(tag);\n className = className || \"\";\n content = content || \"\";\n e.className = className;\n if (content !== undefined)\n e.textContent = content;\n return e;\n }\n function clearNode(node) {\n while (node.firstChild)\n node.removeChild(node.firstChild);\n }\n function findParent(node, condition) {\n if (condition(node))\n return node;\n else if (node.parentNode)\n return findParent(node.parentNode, condition);\n return undefined; // nothing found\n }\n function createNumberInput(inputClassName, opts) {\n var wrapper = createElement(\"div\", \"numInputWrapper\"), numInput = createElement(\"input\", \"numInput \" + inputClassName), arrowUp = createElement(\"span\", \"arrowUp\"), arrowDown = createElement(\"span\", \"arrowDown\");\n if (navigator.userAgent.indexOf(\"MSIE 9.0\") === -1) {\n numInput.type = \"number\";\n }\n else {\n numInput.type = \"text\";\n numInput.pattern = \"\\\\d*\";\n }\n if (opts !== undefined)\n for (var key in opts)\n numInput.setAttribute(key, opts[key]);\n wrapper.appendChild(numInput);\n wrapper.appendChild(arrowUp);\n wrapper.appendChild(arrowDown);\n return wrapper;\n }\n function getEventTarget(event) {\n if (typeof event.composedPath === \"function\") {\n var path = event.composedPath();\n return path[0];\n }\n return event.target;\n }\n\n var doNothing = function () { return undefined; };\n var monthToStr = function (monthNumber, shorthand, locale) { return locale.months[shorthand ? \"shorthand\" : \"longhand\"][monthNumber]; };\n var revFormat = {\n D: doNothing,\n F: function (dateObj, monthName, locale) {\n dateObj.setMonth(locale.months.longhand.indexOf(monthName));\n },\n G: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n H: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n J: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n K: function (dateObj, amPM, locale) {\n dateObj.setHours((dateObj.getHours() % 12) +\n 12 * int(new RegExp(locale.amPM[1], \"i\").test(amPM)));\n },\n M: function (dateObj, shortMonth, locale) {\n dateObj.setMonth(locale.months.shorthand.indexOf(shortMonth));\n },\n S: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n U: function (_, unixSeconds) { return new Date(parseFloat(unixSeconds) * 1000); },\n W: function (dateObj, weekNum, locale) {\n var weekNumber = parseInt(weekNum);\n var date = new Date(dateObj.getFullYear(), 0, 2 + (weekNumber - 1) * 7, 0, 0, 0, 0);\n date.setDate(date.getDate() - date.getDay() + locale.firstDayOfWeek);\n return date;\n },\n Y: function (dateObj, year) {\n dateObj.setFullYear(parseFloat(year));\n },\n Z: function (_, ISODate) { return new Date(ISODate); },\n d: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n h: function (dateObj, hour) {\n dateObj.setHours(parseFloat(hour));\n },\n i: function (dateObj, minutes) {\n dateObj.setMinutes(parseFloat(minutes));\n },\n j: function (dateObj, day) {\n dateObj.setDate(parseFloat(day));\n },\n l: doNothing,\n m: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n n: function (dateObj, month) {\n dateObj.setMonth(parseFloat(month) - 1);\n },\n s: function (dateObj, seconds) {\n dateObj.setSeconds(parseFloat(seconds));\n },\n u: function (_, unixMillSeconds) {\n return new Date(parseFloat(unixMillSeconds));\n },\n w: doNothing,\n y: function (dateObj, year) {\n dateObj.setFullYear(2000 + parseFloat(year));\n }\n };\n var tokenRegex = {\n D: \"(\\\\w+)\",\n F: \"(\\\\w+)\",\n G: \"(\\\\d\\\\d|\\\\d)\",\n H: \"(\\\\d\\\\d|\\\\d)\",\n J: \"(\\\\d\\\\d|\\\\d)\\\\w+\",\n K: \"\",\n M: \"(\\\\w+)\",\n S: \"(\\\\d\\\\d|\\\\d)\",\n U: \"(.+)\",\n W: \"(\\\\d\\\\d|\\\\d)\",\n Y: \"(\\\\d{4})\",\n Z: \"(.+)\",\n d: \"(\\\\d\\\\d|\\\\d)\",\n h: \"(\\\\d\\\\d|\\\\d)\",\n i: \"(\\\\d\\\\d|\\\\d)\",\n j: \"(\\\\d\\\\d|\\\\d)\",\n l: \"(\\\\w+)\",\n m: \"(\\\\d\\\\d|\\\\d)\",\n n: \"(\\\\d\\\\d|\\\\d)\",\n s: \"(\\\\d\\\\d|\\\\d)\",\n u: \"(.+)\",\n w: \"(\\\\d\\\\d|\\\\d)\",\n y: \"(\\\\d{2})\"\n };\n var formats = {\n // get the date in UTC\n Z: function (date) { return date.toISOString(); },\n // weekday name, short, e.g. Thu\n D: function (date, locale, options) {\n return locale.weekdays.shorthand[formats.w(date, locale, options)];\n },\n // full month name e.g. January\n F: function (date, locale, options) {\n return monthToStr(formats.n(date, locale, options) - 1, false, locale);\n },\n // padded hour 1-12\n G: function (date, locale, options) {\n return pad(formats.h(date, locale, options));\n },\n // hours with leading zero e.g. 03\n H: function (date) { return pad(date.getHours()); },\n // day (1-30) with ordinal suffix e.g. 1st, 2nd\n J: function (date, locale) {\n return locale.ordinal !== undefined\n ? date.getDate() + locale.ordinal(date.getDate())\n : date.getDate();\n },\n // AM/PM\n K: function (date, locale) { return locale.amPM[int(date.getHours() > 11)]; },\n // shorthand month e.g. Jan, Sep, Oct, etc\n M: function (date, locale) {\n return monthToStr(date.getMonth(), true, locale);\n },\n // seconds 00-59\n S: function (date) { return pad(date.getSeconds()); },\n // unix timestamp\n U: function (date) { return date.getTime() / 1000; },\n W: function (date, _, options) {\n return options.getWeek(date);\n },\n // full year e.g. 2016\n Y: function (date) { return date.getFullYear(); },\n // day in month, padded (01-30)\n d: function (date) { return pad(date.getDate()); },\n // hour from 1-12 (am/pm)\n h: function (date) { return (date.getHours() % 12 ? date.getHours() % 12 : 12); },\n // minutes, padded with leading zero e.g. 09\n i: function (date) { return pad(date.getMinutes()); },\n // day in month (1-30)\n j: function (date) { return date.getDate(); },\n // weekday name, full, e.g. Thursday\n l: function (date, locale) {\n return locale.weekdays.longhand[date.getDay()];\n },\n // padded month number (01-12)\n m: function (date) { return pad(date.getMonth() + 1); },\n // the month number (1-12)\n n: function (date) { return date.getMonth() + 1; },\n // seconds 0-59\n s: function (date) { return date.getSeconds(); },\n // Unix Milliseconds\n u: function (date) { return date.getTime(); },\n // number of the day of the week\n w: function (date) { return date.getDay(); },\n // last two digits of year e.g. 16 for 2016\n y: function (date) { return String(date.getFullYear()).substring(2); }\n };\n\n var createDateFormatter = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (dateObj, frmt, overrideLocale) {\n var locale = overrideLocale || l10n;\n if (config.formatDate !== undefined) {\n return config.formatDate(dateObj, frmt, locale);\n }\n return frmt\n .split(\"\")\n .map(function (c, i, arr) {\n return formats[c] && arr[i - 1] !== \"\\\\\"\n ? formats[c](dateObj, locale, config)\n : c !== \"\\\\\"\n ? c\n : \"\";\n })\n .join(\"\");\n };\n };\n var createDateParser = function (_a) {\n var _b = _a.config, config = _b === void 0 ? defaults : _b, _c = _a.l10n, l10n = _c === void 0 ? english : _c;\n return function (date, givenFormat, timeless, customLocale) {\n if (date !== 0 && !date)\n return undefined;\n var locale = customLocale || l10n;\n var parsedDate;\n var dateOrig = date;\n if (date instanceof Date)\n parsedDate = new Date(date.getTime());\n else if (typeof date !== \"string\" &&\n date.toFixed !== undefined // timestamp\n )\n // create a copy\n parsedDate = new Date(date);\n else if (typeof date === \"string\") {\n // date string\n var format = givenFormat || (config || defaults).dateFormat;\n var datestr = String(date).trim();\n if (datestr === \"today\") {\n parsedDate = new Date();\n timeless = true;\n }\n else if (/Z$/.test(datestr) ||\n /GMT$/.test(datestr) // datestrings w/ timezone\n )\n parsedDate = new Date(date);\n else if (config && config.parseDate)\n parsedDate = config.parseDate(date, format);\n else {\n parsedDate =\n !config || !config.noCalendar\n ? new Date(new Date().getFullYear(), 0, 1, 0, 0, 0, 0)\n : new Date(new Date().setHours(0, 0, 0, 0));\n var matched = void 0, ops = [];\n for (var i = 0, matchIndex = 0, regexStr = \"\"; i < format.length; i++) {\n var token_1 = format[i];\n var isBackSlash = token_1 === \"\\\\\";\n var escaped = format[i - 1] === \"\\\\\" || isBackSlash;\n if (tokenRegex[token_1] && !escaped) {\n regexStr += tokenRegex[token_1];\n var match = new RegExp(regexStr).exec(date);\n if (match && (matched = true)) {\n ops[token_1 !== \"Y\" ? \"push\" : \"unshift\"]({\n fn: revFormat[token_1],\n val: match[++matchIndex]\n });\n }\n }\n else if (!isBackSlash)\n regexStr += \".\"; // don't really care\n ops.forEach(function (_a) {\n var fn = _a.fn, val = _a.val;\n return (parsedDate = fn(parsedDate, val, locale) || parsedDate);\n });\n }\n parsedDate = matched ? parsedDate : undefined;\n }\n }\n /* istanbul ignore next */\n if (!(parsedDate instanceof Date && !isNaN(parsedDate.getTime()))) {\n config.errorHandler(new Error(\"Invalid date provided: \" + dateOrig));\n return undefined;\n }\n if (timeless === true)\n parsedDate.setHours(0, 0, 0, 0);\n return parsedDate;\n };\n };\n /**\n * Compute the difference in dates, measured in ms\n */\n function compareDates(date1, date2, timeless) {\n if (timeless === void 0) { timeless = true; }\n if (timeless !== false) {\n return (new Date(date1.getTime()).setHours(0, 0, 0, 0) -\n new Date(date2.getTime()).setHours(0, 0, 0, 0));\n }\n return date1.getTime() - date2.getTime();\n }\n var isBetween = function (ts, ts1, ts2) {\n return ts > Math.min(ts1, ts2) && ts < Math.max(ts1, ts2);\n };\n var duration = {\n DAY: 86400000\n };\n\n if (typeof Object.assign !== \"function\") {\n Object.assign = function (target) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n if (!target) {\n throw TypeError(\"Cannot convert undefined or null to object\");\n }\n var _loop_1 = function (source) {\n if (source) {\n Object.keys(source).forEach(function (key) { return (target[key] = source[key]); });\n }\n };\n for (var _a = 0, args_1 = args; _a < args_1.length; _a++) {\n var source = args_1[_a];\n _loop_1(source);\n }\n return target;\n };\n }\n\n var DEBOUNCED_CHANGE_MS = 300;\n function FlatpickrInstance(element, instanceConfig) {\n var self = {\n config: __assign({}, defaults, flatpickr.defaultConfig),\n l10n: english\n };\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n self._handlers = [];\n self.pluginElements = [];\n self.loadedPlugins = [];\n self._bind = bind;\n self._setHoursFromDate = setHoursFromDate;\n self._positionCalendar = positionCalendar;\n self.changeMonth = changeMonth;\n self.changeYear = changeYear;\n self.clear = clear;\n self.close = close;\n self._createElement = createElement;\n self.destroy = destroy;\n self.isEnabled = isEnabled;\n self.jumpToDate = jumpToDate;\n self.open = open;\n self.redraw = redraw;\n self.set = set;\n self.setDate = setDate;\n self.toggle = toggle;\n function setupHelperFunctions() {\n self.utils = {\n getDaysInMonth: function (month, yr) {\n if (month === void 0) { month = self.currentMonth; }\n if (yr === void 0) { yr = self.currentYear; }\n if (month === 1 && ((yr % 4 === 0 && yr % 100 !== 0) || yr % 400 === 0))\n return 29;\n return self.l10n.daysInMonth[month];\n }\n };\n }\n function init() {\n self.element = self.input = element;\n self.isOpen = false;\n parseConfig();\n setupLocale();\n setupInputs();\n setupDates();\n setupHelperFunctions();\n if (!self.isMobile)\n build();\n bindEvents();\n if (self.selectedDates.length || self.config.noCalendar) {\n if (self.config.enableTime) {\n setHoursFromDate(self.config.noCalendar\n ? self.latestSelectedDateObj || self.config.minDate\n : undefined);\n }\n updateValue(false);\n }\n setCalendarWidth();\n self.showTimeInput =\n self.selectedDates.length > 0 || self.config.noCalendar;\n var isSafari = /^((?!chrome|android).)*safari/i.test(navigator.userAgent);\n /* TODO: investigate this further\n \n Currently, there is weird positioning behavior in safari causing pages\n to scroll up. https://github.com/chmln/flatpickr/issues/563\n \n However, most browsers are not Safari and positioning is expensive when used\n in scale. https://github.com/chmln/flatpickr/issues/1096\n */\n if (!self.isMobile && isSafari) {\n positionCalendar();\n }\n triggerEvent(\"onReady\");\n }\n function bindToInstance(fn) {\n return fn.bind(self);\n }\n function setCalendarWidth() {\n var config = self.config;\n if (config.weekNumbers === false && config.showMonths === 1)\n return;\n else if (config.noCalendar !== true) {\n window.requestAnimationFrame(function () {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.style.visibility = \"hidden\";\n self.calendarContainer.style.display = \"block\";\n }\n if (self.daysContainer !== undefined) {\n var daysWidth = (self.days.offsetWidth + 1) * config.showMonths;\n self.daysContainer.style.width = daysWidth + \"px\";\n self.calendarContainer.style.width =\n daysWidth +\n (self.weekWrapper !== undefined\n ? self.weekWrapper.offsetWidth\n : 0) +\n \"px\";\n self.calendarContainer.style.removeProperty(\"visibility\");\n self.calendarContainer.style.removeProperty(\"display\");\n }\n });\n }\n }\n /**\n * The handler for all events targeting the time inputs\n */\n function updateTime(e) {\n if (self.selectedDates.length === 0) {\n setDefaultTime();\n }\n if (e !== undefined && e.type !== \"blur\") {\n timeWrapper(e);\n }\n var prevValue = self._input.value;\n setHoursFromInputs();\n updateValue();\n if (self._input.value !== prevValue) {\n self._debouncedChange();\n }\n }\n function ampm2military(hour, amPM) {\n return (hour % 12) + 12 * int(amPM === self.l10n.amPM[1]);\n }\n function military2ampm(hour) {\n switch (hour % 24) {\n case 0:\n case 12:\n return 12;\n default:\n return hour % 12;\n }\n }\n /**\n * Syncs the selected date object time with user's time input\n */\n function setHoursFromInputs() {\n if (self.hourElement === undefined || self.minuteElement === undefined)\n return;\n var hours = (parseInt(self.hourElement.value.slice(-2), 10) || 0) % 24, minutes = (parseInt(self.minuteElement.value, 10) || 0) % 60, seconds = self.secondElement !== undefined\n ? (parseInt(self.secondElement.value, 10) || 0) % 60\n : 0;\n if (self.amPM !== undefined) {\n hours = ampm2military(hours, self.amPM.textContent);\n }\n var limitMinHours = self.config.minTime !== undefined ||\n (self.config.minDate &&\n self.minDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.minDate, true) ===\n 0);\n var limitMaxHours = self.config.maxTime !== undefined ||\n (self.config.maxDate &&\n self.maxDateHasTime &&\n self.latestSelectedDateObj &&\n compareDates(self.latestSelectedDateObj, self.config.maxDate, true) ===\n 0);\n if (limitMaxHours) {\n var maxTime = self.config.maxTime !== undefined\n ? self.config.maxTime\n : self.config.maxDate;\n hours = Math.min(hours, maxTime.getHours());\n if (hours === maxTime.getHours())\n minutes = Math.min(minutes, maxTime.getMinutes());\n if (minutes === maxTime.getMinutes())\n seconds = Math.min(seconds, maxTime.getSeconds());\n }\n if (limitMinHours) {\n var minTime = self.config.minTime !== undefined\n ? self.config.minTime\n : self.config.minDate;\n hours = Math.max(hours, minTime.getHours());\n if (hours === minTime.getHours())\n minutes = Math.max(minutes, minTime.getMinutes());\n if (minutes === minTime.getMinutes())\n seconds = Math.max(seconds, minTime.getSeconds());\n }\n setHours(hours, minutes, seconds);\n }\n /**\n * Syncs time input values with a date\n */\n function setHoursFromDate(dateObj) {\n var date = dateObj || self.latestSelectedDateObj;\n if (date)\n setHours(date.getHours(), date.getMinutes(), date.getSeconds());\n }\n function setDefaultHours() {\n var hours = self.config.defaultHour;\n var minutes = self.config.defaultMinute;\n var seconds = self.config.defaultSeconds;\n if (self.config.minDate !== undefined) {\n var minHr = self.config.minDate.getHours();\n var minMinutes = self.config.minDate.getMinutes();\n hours = Math.max(hours, minHr);\n if (hours === minHr)\n minutes = Math.max(minMinutes, minutes);\n if (hours === minHr && minutes === minMinutes)\n seconds = self.config.minDate.getSeconds();\n }\n if (self.config.maxDate !== undefined) {\n var maxHr = self.config.maxDate.getHours();\n var maxMinutes = self.config.maxDate.getMinutes();\n hours = Math.min(hours, maxHr);\n if (hours === maxHr)\n minutes = Math.min(maxMinutes, minutes);\n if (hours === maxHr && minutes === maxMinutes)\n seconds = self.config.maxDate.getSeconds();\n }\n setHours(hours, minutes, seconds);\n }\n /**\n * Sets the hours, minutes, and optionally seconds\n * of the latest selected date object and the\n * corresponding time inputs\n * @param {Number} hours the hour. whether its military\n * or am-pm gets inferred from config\n * @param {Number} minutes the minutes\n * @param {Number} seconds the seconds (optional)\n */\n function setHours(hours, minutes, seconds) {\n if (self.latestSelectedDateObj !== undefined) {\n self.latestSelectedDateObj.setHours(hours % 24, minutes, seconds || 0, 0);\n }\n if (!self.hourElement || !self.minuteElement || self.isMobile)\n return;\n self.hourElement.value = pad(!self.config.time_24hr\n ? ((12 + hours) % 12) + 12 * int(hours % 12 === 0)\n : hours);\n self.minuteElement.value = pad(minutes);\n if (self.amPM !== undefined)\n self.amPM.textContent = self.l10n.amPM[int(hours >= 12)];\n if (self.secondElement !== undefined)\n self.secondElement.value = pad(seconds);\n }\n /**\n * Handles the year input and incrementing events\n * @param {Event} event the keyup or increment event\n */\n function onYearInput(event) {\n var year = parseInt(event.target.value) + (event.delta || 0);\n if (year / 1000 > 1 ||\n (event.key === \"Enter\" && !/[^\\d]/.test(year.toString()))) {\n changeYear(year);\n }\n }\n /**\n * Essentially addEventListener + tracking\n * @param {Element} element the element to addEventListener to\n * @param {String} event the event name\n * @param {Function} handler the event handler\n */\n function bind(element, event, handler, options) {\n if (event instanceof Array)\n return event.forEach(function (ev) { return bind(element, ev, handler, options); });\n if (element instanceof Array)\n return element.forEach(function (el) { return bind(el, event, handler, options); });\n element.addEventListener(event, handler, options);\n self._handlers.push({\n element: element,\n event: event,\n handler: handler,\n options: options\n });\n }\n /**\n * A mousedown handler which mimics click.\n * Minimizes latency, since we don't need to wait for mouseup in most cases.\n * Also, avoids handling right clicks.\n *\n * @param {Function} handler the event handler\n */\n function onClick(handler) {\n return function (evt) {\n evt.which === 1 && handler(evt);\n };\n }\n function triggerChange() {\n triggerEvent(\"onChange\");\n }\n /**\n * Adds all the necessary event listeners\n */\n function bindEvents() {\n if (self.config.wrap) {\n [\"open\", \"close\", \"toggle\", \"clear\"].forEach(function (evt) {\n Array.prototype.forEach.call(self.element.querySelectorAll(\"[data-\" + evt + \"]\"), function (el) {\n return bind(el, \"click\", self[evt]);\n });\n });\n }\n if (self.isMobile) {\n setupMobile();\n return;\n }\n var debouncedResize = debounce(onResize, 50);\n self._debouncedChange = debounce(triggerChange, DEBOUNCED_CHANGE_MS);\n if (self.daysContainer && !/iPhone|iPad|iPod/i.test(navigator.userAgent))\n bind(self.daysContainer, \"mouseover\", function (e) {\n if (self.config.mode === \"range\")\n onMouseOver(e.target);\n });\n bind(window.document.body, \"keydown\", onKeyDown);\n if (!self.config.inline && !self.config.static)\n bind(window, \"resize\", debouncedResize);\n if (window.ontouchstart !== undefined)\n bind(window.document, \"touchstart\", documentClick);\n else\n bind(window.document, \"mousedown\", onClick(documentClick));\n bind(window.document, \"focus\", documentClick, { capture: true });\n if (self.config.clickOpens === true) {\n bind(self._input, \"focus\", self.open);\n bind(self._input, \"mousedown\", onClick(self.open));\n }\n if (self.daysContainer !== undefined) {\n bind(self.monthNav, \"mousedown\", onClick(onMonthNavClick));\n bind(self.monthNav, [\"keyup\", \"increment\"], onYearInput);\n bind(self.daysContainer, \"mousedown\", onClick(selectDate));\n }\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n var selText = function (e) {\n return e.target.select();\n };\n bind(self.timeContainer, [\"increment\"], updateTime);\n bind(self.timeContainer, \"blur\", updateTime, { capture: true });\n bind(self.timeContainer, \"mousedown\", onClick(timeIncrement));\n bind([self.hourElement, self.minuteElement], [\"focus\", \"click\"], selText);\n if (self.secondElement !== undefined)\n bind(self.secondElement, \"focus\", function () { return self.secondElement && self.secondElement.select(); });\n if (self.amPM !== undefined) {\n bind(self.amPM, \"mousedown\", onClick(function (e) {\n updateTime(e);\n triggerChange();\n }));\n }\n }\n }\n /**\n * Set the calendar view to a particular date.\n * @param {Date} jumpDate the date to set the view to\n * @param {boolean} triggerChange if change events should be triggered\n */\n function jumpToDate(jumpDate, triggerChange) {\n var jumpTo = jumpDate !== undefined\n ? self.parseDate(jumpDate)\n : self.latestSelectedDateObj ||\n (self.config.minDate && self.config.minDate > self.now\n ? self.config.minDate\n : self.config.maxDate && self.config.maxDate < self.now\n ? self.config.maxDate\n : self.now);\n var oldYear = self.currentYear;\n var oldMonth = self.currentMonth;\n try {\n if (jumpTo !== undefined) {\n self.currentYear = jumpTo.getFullYear();\n self.currentMonth = jumpTo.getMonth();\n }\n }\n catch (e) {\n /* istanbul ignore next */\n e.message = \"Invalid date supplied: \" + jumpTo;\n self.config.errorHandler(e);\n }\n if (triggerChange && self.currentYear !== oldYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n if (triggerChange &&\n (self.currentYear !== oldYear || self.currentMonth !== oldMonth)) {\n triggerEvent(\"onMonthChange\");\n }\n self.redraw();\n }\n /**\n * The up/down arrow handler for time inputs\n * @param {Event} e the click event\n */\n function timeIncrement(e) {\n if (~e.target.className.indexOf(\"arrow\"))\n incrementNumInput(e, e.target.classList.contains(\"arrowUp\") ? 1 : -1);\n }\n /**\n * Increments/decrements the value of input associ-\n * ated with the up/down arrow by dispatching an\n * \"increment\" event on the input.\n *\n * @param {Event} e the click event\n * @param {Number} delta the diff (usually 1 or -1)\n * @param {Element} inputElem the input element\n */\n function incrementNumInput(e, delta, inputElem) {\n var target = e && e.target;\n var input = inputElem ||\n (target && target.parentNode && target.parentNode.firstChild);\n var event = createEvent(\"increment\");\n event.delta = delta;\n input && input.dispatchEvent(event);\n }\n function build() {\n var fragment = window.document.createDocumentFragment();\n self.calendarContainer = createElement(\"div\", \"flatpickr-calendar\");\n self.calendarContainer.tabIndex = -1;\n if (!self.config.noCalendar) {\n fragment.appendChild(buildMonthNav());\n self.innerContainer = createElement(\"div\", \"flatpickr-innerContainer\");\n if (self.config.weekNumbers) {\n var _a = buildWeeks(), weekWrapper = _a.weekWrapper, weekNumbers = _a.weekNumbers;\n self.innerContainer.appendChild(weekWrapper);\n self.weekNumbers = weekNumbers;\n self.weekWrapper = weekWrapper;\n }\n self.rContainer = createElement(\"div\", \"flatpickr-rContainer\");\n self.rContainer.appendChild(buildWeekdays());\n if (!self.daysContainer) {\n self.daysContainer = createElement(\"div\", \"flatpickr-days\");\n self.daysContainer.tabIndex = -1;\n }\n buildDays();\n self.rContainer.appendChild(self.daysContainer);\n self.innerContainer.appendChild(self.rContainer);\n fragment.appendChild(self.innerContainer);\n }\n if (self.config.enableTime) {\n fragment.appendChild(buildTime());\n }\n toggleClass(self.calendarContainer, \"rangeMode\", self.config.mode === \"range\");\n toggleClass(self.calendarContainer, \"animate\", self.config.animate === true);\n toggleClass(self.calendarContainer, \"multiMonth\", self.config.showMonths > 1);\n self.calendarContainer.appendChild(fragment);\n var customAppend = self.config.appendTo !== undefined &&\n self.config.appendTo.nodeType !== undefined;\n if (self.config.inline || self.config.static) {\n self.calendarContainer.classList.add(self.config.inline ? \"inline\" : \"static\");\n if (self.config.inline) {\n if (!customAppend && self.element.parentNode)\n self.element.parentNode.insertBefore(self.calendarContainer, self._input.nextSibling);\n else if (self.config.appendTo !== undefined)\n self.config.appendTo.appendChild(self.calendarContainer);\n }\n if (self.config.static) {\n var wrapper = createElement(\"div\", \"flatpickr-wrapper\");\n if (self.element.parentNode)\n self.element.parentNode.insertBefore(wrapper, self.element);\n wrapper.appendChild(self.element);\n if (self.altInput)\n wrapper.appendChild(self.altInput);\n wrapper.appendChild(self.calendarContainer);\n }\n }\n if (!self.config.static && !self.config.inline)\n (self.config.appendTo !== undefined\n ? self.config.appendTo\n : window.document.body).appendChild(self.calendarContainer);\n }\n function createDay(className, date, dayNumber, i) {\n var dateIsEnabled = isEnabled(date, true), dayElement = createElement(\"span\", \"flatpickr-day \" + className, date.getDate().toString());\n dayElement.dateObj = date;\n dayElement.$i = i;\n dayElement.setAttribute(\"aria-label\", self.formatDate(date, self.config.ariaDateFormat));\n if (className.indexOf(\"hidden\") === -1 &&\n compareDates(date, self.now) === 0) {\n self.todayDateElem = dayElement;\n dayElement.classList.add(\"today\");\n dayElement.setAttribute(\"aria-current\", \"date\");\n }\n if (dateIsEnabled) {\n dayElement.tabIndex = -1;\n if (isDateSelected(date)) {\n dayElement.classList.add(\"selected\");\n self.selectedDateElem = dayElement;\n if (self.config.mode === \"range\") {\n toggleClass(dayElement, \"startRange\", self.selectedDates[0] &&\n compareDates(date, self.selectedDates[0], true) === 0);\n toggleClass(dayElement, \"endRange\", self.selectedDates[1] &&\n compareDates(date, self.selectedDates[1], true) === 0);\n if (className === \"nextMonthDay\")\n dayElement.classList.add(\"inRange\");\n }\n }\n }\n else {\n dayElement.classList.add(\"flatpickr-disabled\");\n }\n if (self.config.mode === \"range\") {\n if (isDateInRange(date) && !isDateSelected(date))\n dayElement.classList.add(\"inRange\");\n }\n if (self.weekNumbers &&\n self.config.showMonths === 1 &&\n className !== \"prevMonthDay\" &&\n dayNumber % 7 === 1) {\n self.weekNumbers.insertAdjacentHTML(\"beforeend\", \"\" + self.config.getWeek(date) + \"\");\n }\n triggerEvent(\"onDayCreate\", dayElement);\n return dayElement;\n }\n function focusOnDayElem(targetNode) {\n targetNode.focus();\n if (self.config.mode === \"range\")\n onMouseOver(targetNode);\n }\n function getFirstAvailableDay(delta) {\n var startMonth = delta > 0 ? 0 : self.config.showMonths - 1;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n for (var m = startMonth; m != endMonth; m += delta) {\n var month = self.daysContainer.children[m];\n var startIndex = delta > 0 ? 0 : month.children.length - 1;\n var endIndex = delta > 0 ? month.children.length : -1;\n for (var i = startIndex; i != endIndex; i += delta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 && isEnabled(c.dateObj))\n return c;\n }\n }\n return undefined;\n }\n function getNextAvailableDay(current, delta) {\n var givenMonth = current.className.indexOf(\"Month\") === -1\n ? current.dateObj.getMonth()\n : self.currentMonth;\n var endMonth = delta > 0 ? self.config.showMonths : -1;\n var loopDelta = delta > 0 ? 1 : -1;\n for (var m = givenMonth - self.currentMonth; m != endMonth; m += loopDelta) {\n var month = self.daysContainer.children[m];\n var startIndex = givenMonth - self.currentMonth === m\n ? current.$i + delta\n : delta < 0\n ? month.children.length - 1\n : 0;\n var numMonthDays = month.children.length;\n for (var i = startIndex; i >= 0 && i < numMonthDays && i != (delta > 0 ? numMonthDays : -1); i += loopDelta) {\n var c = month.children[i];\n if (c.className.indexOf(\"hidden\") === -1 &&\n isEnabled(c.dateObj) &&\n Math.abs(current.$i - i) >= Math.abs(delta))\n return focusOnDayElem(c);\n }\n }\n self.changeMonth(loopDelta);\n focusOnDay(getFirstAvailableDay(loopDelta), 0);\n return undefined;\n }\n function focusOnDay(current, offset) {\n var dayFocused = isInView(document.activeElement || document.body);\n var startElem = current !== undefined\n ? current\n : dayFocused\n ? document.activeElement\n : self.selectedDateElem !== undefined && isInView(self.selectedDateElem)\n ? self.selectedDateElem\n : self.todayDateElem !== undefined && isInView(self.todayDateElem)\n ? self.todayDateElem\n : getFirstAvailableDay(offset > 0 ? 1 : -1);\n if (startElem === undefined)\n return self._input.focus();\n if (!dayFocused)\n return focusOnDayElem(startElem);\n getNextAvailableDay(startElem, offset);\n }\n function buildMonthDays(year, month) {\n var firstOfMonth = (new Date(year, month, 1).getDay() - self.l10n.firstDayOfWeek + 7) % 7;\n var prevMonthDays = self.utils.getDaysInMonth((month - 1 + 12) % 12);\n var daysInMonth = self.utils.getDaysInMonth(month), days = window.document.createDocumentFragment(), isMultiMonth = self.config.showMonths > 1, prevMonthDayClass = isMultiMonth ? \"prevMonthDay hidden\" : \"prevMonthDay\", nextMonthDayClass = isMultiMonth ? \"nextMonthDay hidden\" : \"nextMonthDay\";\n var dayNumber = prevMonthDays + 1 - firstOfMonth, dayIndex = 0;\n // prepend days from the ending of previous month\n for (; dayNumber <= prevMonthDays; dayNumber++, dayIndex++) {\n days.appendChild(createDay(prevMonthDayClass, new Date(year, month - 1, dayNumber), dayNumber, dayIndex));\n }\n // Start at 1 since there is no 0th day\n for (dayNumber = 1; dayNumber <= daysInMonth; dayNumber++, dayIndex++) {\n days.appendChild(createDay(\"\", new Date(year, month, dayNumber), dayNumber, dayIndex));\n }\n // append days from the next month\n for (var dayNum = daysInMonth + 1; dayNum <= 42 - firstOfMonth &&\n (self.config.showMonths === 1 || dayIndex % 7 !== 0); dayNum++, dayIndex++) {\n days.appendChild(createDay(nextMonthDayClass, new Date(year, month + 1, dayNum % daysInMonth), dayNum, dayIndex));\n }\n //updateNavigationCurrentMonth();\n var dayContainer = createElement(\"div\", \"dayContainer\");\n dayContainer.appendChild(days);\n return dayContainer;\n }\n function buildDays() {\n if (self.daysContainer === undefined) {\n return;\n }\n clearNode(self.daysContainer);\n // TODO: week numbers for each month\n if (self.weekNumbers)\n clearNode(self.weekNumbers);\n var frag = document.createDocumentFragment();\n for (var i = 0; i < self.config.showMonths; i++) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n frag.appendChild(buildMonthDays(d.getFullYear(), d.getMonth()));\n }\n self.daysContainer.appendChild(frag);\n self.days = self.daysContainer.firstChild;\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n onMouseOver();\n }\n }\n function buildMonthSwitch() {\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType !== \"dropdown\")\n return;\n var shouldBuildMonth = function (month) {\n if (self.config.minDate !== undefined &&\n self.currentYear === self.config.minDate.getFullYear() &&\n month < self.config.minDate.getMonth()) {\n return false;\n }\n return !(self.config.maxDate !== undefined &&\n self.currentYear === self.config.maxDate.getFullYear() &&\n month > self.config.maxDate.getMonth());\n };\n self.monthsDropdownContainer.tabIndex = -1;\n self.monthsDropdownContainer.innerHTML = \"\";\n for (var i = 0; i < 12; i++) {\n if (!shouldBuildMonth(i))\n continue;\n var month = createElement(\"option\", \"flatpickr-monthDropdown-month\");\n month.value = new Date(self.currentYear, i).getMonth().toString();\n month.textContent = monthToStr(i, self.config.shorthandCurrentMonth, self.l10n);\n month.tabIndex = -1;\n if (self.currentMonth === i) {\n month.selected = true;\n }\n self.monthsDropdownContainer.appendChild(month);\n }\n }\n function buildMonth() {\n var container = createElement(\"div\", \"flatpickr-month\");\n var monthNavFragment = window.document.createDocumentFragment();\n var monthElement;\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n monthElement = createElement(\"span\", \"cur-month\");\n }\n else {\n self.monthsDropdownContainer = createElement(\"select\", \"flatpickr-monthDropdown-months\");\n bind(self.monthsDropdownContainer, \"change\", function (e) {\n var target = e.target;\n var selectedMonth = parseInt(target.value, 10);\n self.changeMonth(selectedMonth - self.currentMonth);\n triggerEvent(\"onMonthChange\");\n });\n buildMonthSwitch();\n monthElement = self.monthsDropdownContainer;\n }\n var yearInput = createNumberInput(\"cur-year\", { tabindex: \"-1\" });\n var yearElement = yearInput.getElementsByTagName(\"input\")[0];\n yearElement.setAttribute(\"aria-label\", self.l10n.yearAriaLabel);\n if (self.config.minDate) {\n yearElement.setAttribute(\"min\", self.config.minDate.getFullYear().toString());\n }\n if (self.config.maxDate) {\n yearElement.setAttribute(\"max\", self.config.maxDate.getFullYear().toString());\n yearElement.disabled =\n !!self.config.minDate &&\n self.config.minDate.getFullYear() === self.config.maxDate.getFullYear();\n }\n var currentMonth = createElement(\"div\", \"flatpickr-current-month\");\n currentMonth.appendChild(monthElement);\n currentMonth.appendChild(yearInput);\n monthNavFragment.appendChild(currentMonth);\n container.appendChild(monthNavFragment);\n return {\n container: container,\n yearElement: yearElement,\n monthElement: monthElement\n };\n }\n function buildMonths() {\n clearNode(self.monthNav);\n self.monthNav.appendChild(self.prevMonthNav);\n if (self.config.showMonths) {\n self.yearElements = [];\n self.monthElements = [];\n }\n for (var m = self.config.showMonths; m--;) {\n var month = buildMonth();\n self.yearElements.push(month.yearElement);\n self.monthElements.push(month.monthElement);\n self.monthNav.appendChild(month.container);\n }\n self.monthNav.appendChild(self.nextMonthNav);\n }\n function buildMonthNav() {\n self.monthNav = createElement(\"div\", \"flatpickr-months\");\n self.yearElements = [];\n self.monthElements = [];\n self.prevMonthNav = createElement(\"span\", \"flatpickr-prev-month\");\n self.prevMonthNav.innerHTML = self.config.prevArrow;\n self.nextMonthNav = createElement(\"span\", \"flatpickr-next-month\");\n self.nextMonthNav.innerHTML = self.config.nextArrow;\n buildMonths();\n Object.defineProperty(self, \"_hidePrevMonthArrow\", {\n get: function () { return self.__hidePrevMonthArrow; },\n set: function (bool) {\n if (self.__hidePrevMonthArrow !== bool) {\n toggleClass(self.prevMonthNav, \"flatpickr-disabled\", bool);\n self.__hidePrevMonthArrow = bool;\n }\n }\n });\n Object.defineProperty(self, \"_hideNextMonthArrow\", {\n get: function () { return self.__hideNextMonthArrow; },\n set: function (bool) {\n if (self.__hideNextMonthArrow !== bool) {\n toggleClass(self.nextMonthNav, \"flatpickr-disabled\", bool);\n self.__hideNextMonthArrow = bool;\n }\n }\n });\n self.currentYearElement = self.yearElements[0];\n updateNavigationCurrentMonth();\n return self.monthNav;\n }\n function buildTime() {\n self.calendarContainer.classList.add(\"hasTime\");\n if (self.config.noCalendar)\n self.calendarContainer.classList.add(\"noCalendar\");\n self.timeContainer = createElement(\"div\", \"flatpickr-time\");\n self.timeContainer.tabIndex = -1;\n var separator = createElement(\"span\", \"flatpickr-time-separator\", \":\");\n var hourInput = createNumberInput(\"flatpickr-hour\", {\n \"aria-label\": self.l10n.hourAriaLabel\n });\n self.hourElement = hourInput.getElementsByTagName(\"input\")[0];\n var minuteInput = createNumberInput(\"flatpickr-minute\", {\n \"aria-label\": self.l10n.minuteAriaLabel\n });\n self.minuteElement = minuteInput.getElementsByTagName(\"input\")[0];\n self.hourElement.tabIndex = self.minuteElement.tabIndex = -1;\n self.hourElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getHours()\n : self.config.time_24hr\n ? self.config.defaultHour\n : military2ampm(self.config.defaultHour));\n self.minuteElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getMinutes()\n : self.config.defaultMinute);\n self.hourElement.setAttribute(\"step\", self.config.hourIncrement.toString());\n self.minuteElement.setAttribute(\"step\", self.config.minuteIncrement.toString());\n self.hourElement.setAttribute(\"min\", self.config.time_24hr ? \"0\" : \"1\");\n self.hourElement.setAttribute(\"max\", self.config.time_24hr ? \"23\" : \"12\");\n self.minuteElement.setAttribute(\"min\", \"0\");\n self.minuteElement.setAttribute(\"max\", \"59\");\n self.timeContainer.appendChild(hourInput);\n self.timeContainer.appendChild(separator);\n self.timeContainer.appendChild(minuteInput);\n if (self.config.time_24hr)\n self.timeContainer.classList.add(\"time24hr\");\n if (self.config.enableSeconds) {\n self.timeContainer.classList.add(\"hasSeconds\");\n var secondInput = createNumberInput(\"flatpickr-second\");\n self.secondElement = secondInput.getElementsByTagName(\"input\")[0];\n self.secondElement.value = pad(self.latestSelectedDateObj\n ? self.latestSelectedDateObj.getSeconds()\n : self.config.defaultSeconds);\n self.secondElement.setAttribute(\"step\", self.minuteElement.getAttribute(\"step\"));\n self.secondElement.setAttribute(\"min\", \"0\");\n self.secondElement.setAttribute(\"max\", \"59\");\n self.timeContainer.appendChild(createElement(\"span\", \"flatpickr-time-separator\", \":\"));\n self.timeContainer.appendChild(secondInput);\n }\n if (!self.config.time_24hr) {\n // add self.amPM if appropriate\n self.amPM = createElement(\"span\", \"flatpickr-am-pm\", self.l10n.amPM[int((self.latestSelectedDateObj\n ? self.hourElement.value\n : self.config.defaultHour) > 11)]);\n self.amPM.title = self.l10n.toggleTitle;\n self.amPM.tabIndex = -1;\n self.timeContainer.appendChild(self.amPM);\n }\n return self.timeContainer;\n }\n function buildWeekdays() {\n if (!self.weekdayContainer)\n self.weekdayContainer = createElement(\"div\", \"flatpickr-weekdays\");\n else\n clearNode(self.weekdayContainer);\n for (var i = self.config.showMonths; i--;) {\n var container = createElement(\"div\", \"flatpickr-weekdaycontainer\");\n self.weekdayContainer.appendChild(container);\n }\n updateWeekdays();\n return self.weekdayContainer;\n }\n function updateWeekdays() {\n if (!self.weekdayContainer) {\n return;\n }\n var firstDayOfWeek = self.l10n.firstDayOfWeek;\n var weekdays = self.l10n.weekdays.shorthand.slice();\n if (firstDayOfWeek > 0 && firstDayOfWeek < weekdays.length) {\n weekdays = weekdays.splice(firstDayOfWeek, weekdays.length).concat(weekdays.splice(0, firstDayOfWeek));\n }\n for (var i = self.config.showMonths; i--;) {\n self.weekdayContainer.children[i].innerHTML = \"\\n \\n \" + weekdays.join(\"\") + \"\\n \\n \";\n }\n }\n /* istanbul ignore next */\n function buildWeeks() {\n self.calendarContainer.classList.add(\"hasWeeks\");\n var weekWrapper = createElement(\"div\", \"flatpickr-weekwrapper\");\n weekWrapper.appendChild(createElement(\"span\", \"flatpickr-weekday\", self.l10n.weekAbbreviation));\n var weekNumbers = createElement(\"div\", \"flatpickr-weeks\");\n weekWrapper.appendChild(weekNumbers);\n return {\n weekWrapper: weekWrapper,\n weekNumbers: weekNumbers\n };\n }\n function changeMonth(value, isOffset) {\n if (isOffset === void 0) { isOffset = true; }\n var delta = isOffset ? value : value - self.currentMonth;\n if ((delta < 0 && self._hidePrevMonthArrow === true) ||\n (delta > 0 && self._hideNextMonthArrow === true))\n return;\n self.currentMonth += delta;\n if (self.currentMonth < 0 || self.currentMonth > 11) {\n self.currentYear += self.currentMonth > 11 ? 1 : -1;\n self.currentMonth = (self.currentMonth + 12) % 12;\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n buildDays();\n triggerEvent(\"onMonthChange\");\n updateNavigationCurrentMonth();\n }\n function clear(triggerChangeEvent, toInitial) {\n if (triggerChangeEvent === void 0) { triggerChangeEvent = true; }\n if (toInitial === void 0) { toInitial = true; }\n self.input.value = \"\";\n if (self.altInput !== undefined)\n self.altInput.value = \"\";\n if (self.mobileInput !== undefined)\n self.mobileInput.value = \"\";\n self.selectedDates = [];\n self.latestSelectedDateObj = undefined;\n if (toInitial === true) {\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n }\n self.showTimeInput = false;\n if (self.config.enableTime === true) {\n setDefaultHours();\n }\n self.redraw();\n if (triggerChangeEvent)\n // triggerChangeEvent is true (default) or an Event\n triggerEvent(\"onChange\");\n }\n function close() {\n self.isOpen = false;\n if (!self.isMobile) {\n if (self.calendarContainer !== undefined) {\n self.calendarContainer.classList.remove(\"open\");\n }\n if (self._input !== undefined) {\n self._input.classList.remove(\"active\");\n }\n }\n triggerEvent(\"onClose\");\n }\n function destroy() {\n if (self.config !== undefined)\n triggerEvent(\"onDestroy\");\n for (var i = self._handlers.length; i--;) {\n var h = self._handlers[i];\n h.element.removeEventListener(h.event, h.handler, h.options);\n }\n self._handlers = [];\n if (self.mobileInput) {\n if (self.mobileInput.parentNode)\n self.mobileInput.parentNode.removeChild(self.mobileInput);\n self.mobileInput = undefined;\n }\n else if (self.calendarContainer && self.calendarContainer.parentNode) {\n if (self.config.static && self.calendarContainer.parentNode) {\n var wrapper = self.calendarContainer.parentNode;\n wrapper.lastChild && wrapper.removeChild(wrapper.lastChild);\n if (wrapper.parentNode) {\n while (wrapper.firstChild)\n wrapper.parentNode.insertBefore(wrapper.firstChild, wrapper);\n wrapper.parentNode.removeChild(wrapper);\n }\n }\n else\n self.calendarContainer.parentNode.removeChild(self.calendarContainer);\n }\n if (self.altInput) {\n self.input.type = \"text\";\n if (self.altInput.parentNode)\n self.altInput.parentNode.removeChild(self.altInput);\n delete self.altInput;\n }\n if (self.input) {\n self.input.type = self.input._type;\n self.input.classList.remove(\"flatpickr-input\");\n self.input.removeAttribute(\"readonly\");\n self.input.value = \"\";\n }\n [\n \"_showTimeInput\",\n \"latestSelectedDateObj\",\n \"_hideNextMonthArrow\",\n \"_hidePrevMonthArrow\",\n \"__hideNextMonthArrow\",\n \"__hidePrevMonthArrow\",\n \"isMobile\",\n \"isOpen\",\n \"selectedDateElem\",\n \"minDateHasTime\",\n \"maxDateHasTime\",\n \"days\",\n \"daysContainer\",\n \"_input\",\n \"_positionElement\",\n \"innerContainer\",\n \"rContainer\",\n \"monthNav\",\n \"todayDateElem\",\n \"calendarContainer\",\n \"weekdayContainer\",\n \"prevMonthNav\",\n \"nextMonthNav\",\n \"monthsDropdownContainer\",\n \"currentMonthElement\",\n \"currentYearElement\",\n \"navigationCurrentMonth\",\n \"selectedDateElem\",\n \"config\",\n ].forEach(function (k) {\n try {\n delete self[k];\n }\n catch (_) { }\n });\n }\n function isCalendarElem(elem) {\n if (self.config.appendTo && self.config.appendTo.contains(elem))\n return true;\n return self.calendarContainer.contains(elem);\n }\n function documentClick(e) {\n if (self.isOpen && !self.config.inline) {\n var eventTarget_1 = getEventTarget(e);\n var isCalendarElement = isCalendarElem(eventTarget_1);\n var isInput = eventTarget_1 === self.input ||\n eventTarget_1 === self.altInput ||\n self.element.contains(eventTarget_1) ||\n // web components\n // e.path is not present in all browsers. circumventing typechecks\n (e.path &&\n e.path.indexOf &&\n (~e.path.indexOf(self.input) ||\n ~e.path.indexOf(self.altInput)));\n var lostFocus = e.type === \"blur\"\n ? isInput &&\n e.relatedTarget &&\n !isCalendarElem(e.relatedTarget)\n : !isInput &&\n !isCalendarElement &&\n !isCalendarElem(e.relatedTarget);\n var isIgnored = !self.config.ignoredFocusElements.some(function (elem) {\n return elem.contains(eventTarget_1);\n });\n if (lostFocus && isIgnored) {\n if (self.timeContainer !== undefined &&\n self.minuteElement !== undefined &&\n self.hourElement !== undefined) {\n updateTime();\n }\n self.close();\n if (self.config.mode === \"range\" && self.selectedDates.length === 1) {\n self.clear(false);\n self.redraw();\n }\n }\n }\n }\n function changeYear(newYear) {\n if (!newYear ||\n (self.config.minDate && newYear < self.config.minDate.getFullYear()) ||\n (self.config.maxDate && newYear > self.config.maxDate.getFullYear()))\n return;\n var newYearNum = newYear, isNewYear = self.currentYear !== newYearNum;\n self.currentYear = newYearNum || self.currentYear;\n if (self.config.maxDate &&\n self.currentYear === self.config.maxDate.getFullYear()) {\n self.currentMonth = Math.min(self.config.maxDate.getMonth(), self.currentMonth);\n }\n else if (self.config.minDate &&\n self.currentYear === self.config.minDate.getFullYear()) {\n self.currentMonth = Math.max(self.config.minDate.getMonth(), self.currentMonth);\n }\n if (isNewYear) {\n self.redraw();\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n }\n function isEnabled(date, timeless) {\n if (timeless === void 0) { timeless = true; }\n var dateToCheck = self.parseDate(date, undefined, timeless); // timeless\n if ((self.config.minDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.minDate, timeless !== undefined ? timeless : !self.minDateHasTime) < 0) ||\n (self.config.maxDate &&\n dateToCheck &&\n compareDates(dateToCheck, self.config.maxDate, timeless !== undefined ? timeless : !self.maxDateHasTime) > 0))\n return false;\n if (self.config.enable.length === 0 && self.config.disable.length === 0)\n return true;\n if (dateToCheck === undefined)\n return false;\n var bool = self.config.enable.length > 0, array = bool ? self.config.enable : self.config.disable;\n for (var i = 0, d = void 0; i < array.length; i++) {\n d = array[i];\n if (typeof d === \"function\" &&\n d(dateToCheck) // disabled by function\n )\n return bool;\n else if (d instanceof Date &&\n dateToCheck !== undefined &&\n d.getTime() === dateToCheck.getTime())\n // disabled by date\n return bool;\n else if (typeof d === \"string\" && dateToCheck !== undefined) {\n // disabled by date string\n var parsed = self.parseDate(d, undefined, true);\n return parsed && parsed.getTime() === dateToCheck.getTime()\n ? bool\n : !bool;\n }\n else if (\n // disabled by range\n typeof d === \"object\" &&\n dateToCheck !== undefined &&\n d.from &&\n d.to &&\n dateToCheck.getTime() >= d.from.getTime() &&\n dateToCheck.getTime() <= d.to.getTime())\n return bool;\n }\n return !bool;\n }\n function isInView(elem) {\n if (self.daysContainer !== undefined)\n return (elem.className.indexOf(\"hidden\") === -1 &&\n self.daysContainer.contains(elem));\n return false;\n }\n function onKeyDown(e) {\n // e.key e.keyCode\n // \"Backspace\" 8\n // \"Tab\" 9\n // \"Enter\" 13\n // \"Escape\" (IE \"Esc\") 27\n // \"ArrowLeft\" (IE \"Left\") 37\n // \"ArrowUp\" (IE \"Up\") 38\n // \"ArrowRight\" (IE \"Right\") 39\n // \"ArrowDown\" (IE \"Down\") 40\n // \"Delete\" (IE \"Del\") 46\n var isInput = e.target === self._input;\n var allowInput = self.config.allowInput;\n var allowKeydown = self.isOpen && (!allowInput || !isInput);\n var allowInlineKeydown = self.config.inline && isInput && !allowInput;\n if (e.keyCode === 13 && isInput) {\n if (allowInput) {\n self.setDate(self._input.value, true, e.target === self.altInput\n ? self.config.altFormat\n : self.config.dateFormat);\n return e.target.blur();\n }\n else {\n self.open();\n }\n }\n else if (isCalendarElem(e.target) ||\n allowKeydown ||\n allowInlineKeydown) {\n var isTimeObj = !!self.timeContainer &&\n self.timeContainer.contains(e.target);\n switch (e.keyCode) {\n case 13:\n if (isTimeObj) {\n e.preventDefault();\n updateTime();\n focusAndClose();\n }\n else\n selectDate(e);\n break;\n case 27: // escape\n e.preventDefault();\n focusAndClose();\n break;\n case 8:\n case 46:\n if (isInput && !self.config.allowInput) {\n e.preventDefault();\n self.clear();\n }\n break;\n case 37:\n case 39:\n if (!isTimeObj && !isInput) {\n e.preventDefault();\n if (self.daysContainer !== undefined &&\n (allowInput === false ||\n (document.activeElement && isInView(document.activeElement)))) {\n var delta_1 = e.keyCode === 39 ? 1 : -1;\n if (!e.ctrlKey)\n focusOnDay(undefined, delta_1);\n else {\n e.stopPropagation();\n changeMonth(delta_1);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n }\n }\n else if (self.hourElement)\n self.hourElement.focus();\n break;\n case 38:\n case 40:\n e.preventDefault();\n var delta = e.keyCode === 40 ? 1 : -1;\n if ((self.daysContainer && e.target.$i !== undefined) ||\n e.target === self.input ||\n e.target === self.altInput) {\n if (e.ctrlKey) {\n e.stopPropagation();\n changeYear(self.currentYear - delta);\n focusOnDay(getFirstAvailableDay(1), 0);\n }\n else if (!isTimeObj)\n focusOnDay(undefined, delta * 7);\n }\n else if (e.target === self.currentYearElement) {\n changeYear(self.currentYear - delta);\n }\n else if (self.config.enableTime) {\n if (!isTimeObj && self.hourElement)\n self.hourElement.focus();\n updateTime(e);\n self._debouncedChange();\n }\n break;\n case 9:\n if (isTimeObj) {\n var elems = [\n self.hourElement,\n self.minuteElement,\n self.secondElement,\n self.amPM,\n ]\n .concat(self.pluginElements)\n .filter(function (x) { return x; });\n var i = elems.indexOf(e.target);\n if (i !== -1) {\n var target = elems[i + (e.shiftKey ? -1 : 1)];\n e.preventDefault();\n (target || self._input).focus();\n }\n }\n else if (!self.config.noCalendar &&\n self.daysContainer &&\n self.daysContainer.contains(e.target) &&\n e.shiftKey) {\n e.preventDefault();\n self._input.focus();\n }\n break;\n default:\n break;\n }\n }\n if (self.amPM !== undefined && e.target === self.amPM) {\n switch (e.key) {\n case self.l10n.amPM[0].charAt(0):\n case self.l10n.amPM[0].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[0];\n setHoursFromInputs();\n updateValue();\n break;\n case self.l10n.amPM[1].charAt(0):\n case self.l10n.amPM[1].charAt(0).toLowerCase():\n self.amPM.textContent = self.l10n.amPM[1];\n setHoursFromInputs();\n updateValue();\n break;\n }\n }\n if (isInput || isCalendarElem(e.target)) {\n triggerEvent(\"onKeyDown\", e);\n }\n }\n function onMouseOver(elem) {\n if (self.selectedDates.length !== 1 ||\n (elem &&\n (!elem.classList.contains(\"flatpickr-day\") ||\n elem.classList.contains(\"flatpickr-disabled\"))))\n return;\n var hoverDate = elem\n ? elem.dateObj.getTime()\n : self.days.firstElementChild.dateObj.getTime(), initialDate = self.parseDate(self.selectedDates[0], undefined, true).getTime(), rangeStartDate = Math.min(hoverDate, self.selectedDates[0].getTime()), rangeEndDate = Math.max(hoverDate, self.selectedDates[0].getTime());\n var containsDisabled = false;\n var minRange = 0, maxRange = 0;\n for (var t = rangeStartDate; t < rangeEndDate; t += duration.DAY) {\n if (!isEnabled(new Date(t), true)) {\n containsDisabled =\n containsDisabled || (t > rangeStartDate && t < rangeEndDate);\n if (t < initialDate && (!minRange || t > minRange))\n minRange = t;\n else if (t > initialDate && (!maxRange || t < maxRange))\n maxRange = t;\n }\n }\n for (var m = 0; m < self.config.showMonths; m++) {\n var month = self.daysContainer.children[m];\n var _loop_1 = function (i, l) {\n var dayElem = month.children[i], date = dayElem.dateObj;\n var timestamp = date.getTime();\n var outOfRange = (minRange > 0 && timestamp < minRange) ||\n (maxRange > 0 && timestamp > maxRange);\n if (outOfRange) {\n dayElem.classList.add(\"notAllowed\");\n [\"inRange\", \"startRange\", \"endRange\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n return \"continue\";\n }\n else if (containsDisabled && !outOfRange)\n return \"continue\";\n [\"startRange\", \"inRange\", \"endRange\", \"notAllowed\"].forEach(function (c) {\n dayElem.classList.remove(c);\n });\n if (elem !== undefined) {\n elem.classList.add(hoverDate <= self.selectedDates[0].getTime()\n ? \"startRange\"\n : \"endRange\");\n if (initialDate < hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"startRange\");\n else if (initialDate > hoverDate && timestamp === initialDate)\n dayElem.classList.add(\"endRange\");\n if (timestamp >= minRange &&\n (maxRange === 0 || timestamp <= maxRange) &&\n isBetween(timestamp, initialDate, hoverDate))\n dayElem.classList.add(\"inRange\");\n }\n };\n for (var i = 0, l = month.children.length; i < l; i++) {\n _loop_1(i, l);\n }\n }\n }\n function onResize() {\n if (self.isOpen && !self.config.static && !self.config.inline)\n positionCalendar();\n }\n function setDefaultTime() {\n self.setDate(self.config.minDate !== undefined\n ? new Date(self.config.minDate.getTime())\n : new Date(), true);\n setDefaultHours();\n updateValue();\n }\n function open(e, positionElement) {\n if (positionElement === void 0) { positionElement = self._positionElement; }\n if (self.isMobile === true) {\n if (e) {\n e.preventDefault();\n e.target && e.target.blur();\n }\n if (self.mobileInput !== undefined) {\n self.mobileInput.focus();\n self.mobileInput.click();\n }\n triggerEvent(\"onOpen\");\n return;\n }\n if (self._input.disabled || self.config.inline)\n return;\n var wasOpen = self.isOpen;\n self.isOpen = true;\n if (!wasOpen) {\n self.calendarContainer.classList.add(\"open\");\n self._input.classList.add(\"active\");\n triggerEvent(\"onOpen\");\n positionCalendar(positionElement);\n }\n if (self.config.enableTime === true && self.config.noCalendar === true) {\n if (self.selectedDates.length === 0) {\n setDefaultTime();\n }\n if (self.config.allowInput === false &&\n (e === undefined ||\n !self.timeContainer.contains(e.relatedTarget))) {\n setTimeout(function () { return self.hourElement.select(); }, 50);\n }\n }\n }\n function minMaxDateSetter(type) {\n return function (date) {\n var dateObj = (self.config[\"_\" + type + \"Date\"] = self.parseDate(date, self.config.dateFormat));\n var inverseDateObj = self.config[\"_\" + (type === \"min\" ? \"max\" : \"min\") + \"Date\"];\n if (dateObj !== undefined) {\n self[type === \"min\" ? \"minDateHasTime\" : \"maxDateHasTime\"] =\n dateObj.getHours() > 0 ||\n dateObj.getMinutes() > 0 ||\n dateObj.getSeconds() > 0;\n }\n if (self.selectedDates) {\n self.selectedDates = self.selectedDates.filter(function (d) { return isEnabled(d); });\n if (!self.selectedDates.length && type === \"min\")\n setHoursFromDate(dateObj);\n updateValue();\n }\n if (self.daysContainer) {\n redraw();\n if (dateObj !== undefined)\n self.currentYearElement[type] = dateObj.getFullYear().toString();\n else\n self.currentYearElement.removeAttribute(type);\n self.currentYearElement.disabled =\n !!inverseDateObj &&\n dateObj !== undefined &&\n inverseDateObj.getFullYear() === dateObj.getFullYear();\n }\n };\n }\n function parseConfig() {\n var boolOpts = [\n \"wrap\",\n \"weekNumbers\",\n \"allowInput\",\n \"clickOpens\",\n \"time_24hr\",\n \"enableTime\",\n \"noCalendar\",\n \"altInput\",\n \"shorthandCurrentMonth\",\n \"inline\",\n \"static\",\n \"enableSeconds\",\n \"disableMobile\",\n ];\n var userConfig = __assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));\n var formats = {};\n self.config.parseDate = userConfig.parseDate;\n self.config.formatDate = userConfig.formatDate;\n Object.defineProperty(self.config, \"enable\", {\n get: function () { return self.config._enable; },\n set: function (dates) {\n self.config._enable = parseDateRules(dates);\n }\n });\n Object.defineProperty(self.config, \"disable\", {\n get: function () { return self.config._disable; },\n set: function (dates) {\n self.config._disable = parseDateRules(dates);\n }\n });\n var timeMode = userConfig.mode === \"time\";\n if (!userConfig.dateFormat && (userConfig.enableTime || timeMode)) {\n var defaultDateFormat = flatpickr.defaultConfig.dateFormat || defaults.dateFormat;\n formats.dateFormat =\n userConfig.noCalendar || timeMode\n ? \"H:i\" + (userConfig.enableSeconds ? \":S\" : \"\")\n : defaultDateFormat + \" H:i\" + (userConfig.enableSeconds ? \":S\" : \"\");\n }\n if (userConfig.altInput &&\n (userConfig.enableTime || timeMode) &&\n !userConfig.altFormat) {\n var defaultAltFormat = flatpickr.defaultConfig.altFormat || defaults.altFormat;\n formats.altFormat =\n userConfig.noCalendar || timeMode\n ? \"h:i\" + (userConfig.enableSeconds ? \":S K\" : \" K\")\n : defaultAltFormat + (\" h:i\" + (userConfig.enableSeconds ? \":S\" : \"\") + \" K\");\n }\n if (!userConfig.altInputClass) {\n self.config.altInputClass =\n self.input.className + \" \" + self.config.altInputClass;\n }\n Object.defineProperty(self.config, \"minDate\", {\n get: function () { return self.config._minDate; },\n set: minMaxDateSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxDate\", {\n get: function () { return self.config._maxDate; },\n set: minMaxDateSetter(\"max\")\n });\n var minMaxTimeSetter = function (type) { return function (val) {\n self.config[type === \"min\" ? \"_minTime\" : \"_maxTime\"] = self.parseDate(val, \"H:i:S\");\n }; };\n Object.defineProperty(self.config, \"minTime\", {\n get: function () { return self.config._minTime; },\n set: minMaxTimeSetter(\"min\")\n });\n Object.defineProperty(self.config, \"maxTime\", {\n get: function () { return self.config._maxTime; },\n set: minMaxTimeSetter(\"max\")\n });\n if (userConfig.mode === \"time\") {\n self.config.noCalendar = true;\n self.config.enableTime = true;\n }\n Object.assign(self.config, formats, userConfig);\n for (var i = 0; i < boolOpts.length; i++)\n self.config[boolOpts[i]] =\n self.config[boolOpts[i]] === true ||\n self.config[boolOpts[i]] === \"true\";\n HOOKS.filter(function (hook) { return self.config[hook] !== undefined; }).forEach(function (hook) {\n self.config[hook] = arrayify(self.config[hook] || []).map(bindToInstance);\n });\n self.isMobile =\n !self.config.disableMobile &&\n !self.config.inline &&\n self.config.mode === \"single\" &&\n !self.config.disable.length &&\n !self.config.enable.length &&\n !self.config.weekNumbers &&\n /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);\n for (var i = 0; i < self.config.plugins.length; i++) {\n var pluginConf = self.config.plugins[i](self) || {};\n for (var key in pluginConf) {\n if (HOOKS.indexOf(key) > -1) {\n self.config[key] = arrayify(pluginConf[key])\n .map(bindToInstance)\n .concat(self.config[key]);\n }\n else if (typeof userConfig[key] === \"undefined\")\n self.config[key] = pluginConf[key];\n }\n }\n triggerEvent(\"onParseConfig\");\n }\n function setupLocale() {\n if (typeof self.config.locale !== \"object\" &&\n typeof flatpickr.l10ns[self.config.locale] === \"undefined\")\n self.config.errorHandler(new Error(\"flatpickr: invalid locale \" + self.config.locale));\n self.l10n = __assign({}, flatpickr.l10ns[\"default\"], (typeof self.config.locale === \"object\"\n ? self.config.locale\n : self.config.locale !== \"default\"\n ? flatpickr.l10ns[self.config.locale]\n : undefined));\n tokenRegex.K = \"(\" + self.l10n.amPM[0] + \"|\" + self.l10n.amPM[1] + \"|\" + self.l10n.amPM[0].toLowerCase() + \"|\" + self.l10n.amPM[1].toLowerCase() + \")\";\n var userConfig = __assign({}, instanceConfig, JSON.parse(JSON.stringify(element.dataset || {})));\n if (userConfig.time_24hr === undefined &&\n flatpickr.defaultConfig.time_24hr === undefined) {\n self.config.time_24hr = self.l10n.time_24hr;\n }\n self.formatDate = createDateFormatter(self);\n self.parseDate = createDateParser({ config: self.config, l10n: self.l10n });\n }\n function positionCalendar(customPositionElement) {\n if (self.calendarContainer === undefined)\n return;\n triggerEvent(\"onPreCalendarPosition\");\n var positionElement = customPositionElement || self._positionElement;\n var calendarHeight = Array.prototype.reduce.call(self.calendarContainer.children, (function (acc, child) { return acc + child.offsetHeight; }), 0), calendarWidth = self.calendarContainer.offsetWidth, configPos = self.config.position.split(\" \"), configPosVertical = configPos[0], configPosHorizontal = configPos.length > 1 ? configPos[1] : null, inputBounds = positionElement.getBoundingClientRect(), distanceFromBottom = window.innerHeight - inputBounds.bottom, showOnTop = configPosVertical === \"above\" ||\n (configPosVertical !== \"below\" &&\n distanceFromBottom < calendarHeight &&\n inputBounds.top > calendarHeight);\n var top = window.pageYOffset +\n inputBounds.top +\n (!showOnTop ? positionElement.offsetHeight + 2 : -calendarHeight - 2);\n toggleClass(self.calendarContainer, \"arrowTop\", !showOnTop);\n toggleClass(self.calendarContainer, \"arrowBottom\", showOnTop);\n if (self.config.inline)\n return;\n var left = window.pageXOffset +\n inputBounds.left -\n (configPosHorizontal != null && configPosHorizontal === \"center\"\n ? (calendarWidth - inputBounds.width) / 2\n : 0);\n var right = window.document.body.offsetWidth - (window.pageXOffset + inputBounds.right);\n var rightMost = left + calendarWidth > window.document.body.offsetWidth;\n var centerMost = right + calendarWidth > window.document.body.offsetWidth;\n toggleClass(self.calendarContainer, \"rightMost\", rightMost);\n if (self.config.static)\n return;\n self.calendarContainer.style.top = top + \"px\";\n if (!rightMost) {\n self.calendarContainer.style.left = left + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n else if (!centerMost) {\n self.calendarContainer.style.left = \"auto\";\n self.calendarContainer.style.right = right + \"px\";\n }\n else {\n var doc = document.styleSheets[0];\n // some testing environments don't have css support\n if (doc === undefined)\n return;\n var bodyWidth = window.document.body.offsetWidth;\n var centerLeft = Math.max(0, bodyWidth / 2 - calendarWidth / 2);\n var centerBefore = \".flatpickr-calendar.centerMost:before\";\n var centerAfter = \".flatpickr-calendar.centerMost:after\";\n var centerIndex = doc.cssRules.length;\n var centerStyle = \"{left:\" + inputBounds.left + \"px;right:auto;}\";\n toggleClass(self.calendarContainer, \"rightMost\", false);\n toggleClass(self.calendarContainer, \"centerMost\", true);\n doc.insertRule(centerBefore + \",\" + centerAfter + centerStyle, centerIndex);\n self.calendarContainer.style.left = centerLeft + \"px\";\n self.calendarContainer.style.right = \"auto\";\n }\n }\n function redraw() {\n if (self.config.noCalendar || self.isMobile)\n return;\n updateNavigationCurrentMonth();\n buildDays();\n }\n function focusAndClose() {\n self._input.focus();\n if (window.navigator.userAgent.indexOf(\"MSIE\") !== -1 ||\n navigator.msMaxTouchPoints !== undefined) {\n // hack - bugs in the way IE handles focus keeps the calendar open\n setTimeout(self.close, 0);\n }\n else {\n self.close();\n }\n }\n function selectDate(e) {\n e.preventDefault();\n e.stopPropagation();\n var isSelectable = function (day) {\n return day.classList &&\n day.classList.contains(\"flatpickr-day\") &&\n !day.classList.contains(\"flatpickr-disabled\") &&\n !day.classList.contains(\"notAllowed\");\n };\n var t = findParent(e.target, isSelectable);\n if (t === undefined)\n return;\n var target = t;\n var selectedDate = (self.latestSelectedDateObj = new Date(target.dateObj.getTime()));\n var shouldChangeMonth = (selectedDate.getMonth() < self.currentMonth ||\n selectedDate.getMonth() >\n self.currentMonth + self.config.showMonths - 1) &&\n self.config.mode !== \"range\";\n self.selectedDateElem = target;\n if (self.config.mode === \"single\")\n self.selectedDates = [selectedDate];\n else if (self.config.mode === \"multiple\") {\n var selectedIndex = isDateSelected(selectedDate);\n if (selectedIndex)\n self.selectedDates.splice(parseInt(selectedIndex), 1);\n else\n self.selectedDates.push(selectedDate);\n }\n else if (self.config.mode === \"range\") {\n if (self.selectedDates.length === 2) {\n self.clear(false, false);\n }\n self.latestSelectedDateObj = selectedDate;\n self.selectedDates.push(selectedDate);\n // unless selecting same date twice, sort ascendingly\n if (compareDates(selectedDate, self.selectedDates[0], true) !== 0)\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n setHoursFromInputs();\n if (shouldChangeMonth) {\n var isNewYear = self.currentYear !== selectedDate.getFullYear();\n self.currentYear = selectedDate.getFullYear();\n self.currentMonth = selectedDate.getMonth();\n if (isNewYear) {\n triggerEvent(\"onYearChange\");\n buildMonthSwitch();\n }\n triggerEvent(\"onMonthChange\");\n }\n updateNavigationCurrentMonth();\n buildDays();\n updateValue();\n if (self.config.enableTime)\n setTimeout(function () { return (self.showTimeInput = true); }, 50);\n // maintain focus\n if (!shouldChangeMonth &&\n self.config.mode !== \"range\" &&\n self.config.showMonths === 1)\n focusOnDayElem(target);\n else if (self.selectedDateElem !== undefined &&\n self.hourElement === undefined) {\n self.selectedDateElem && self.selectedDateElem.focus();\n }\n if (self.hourElement !== undefined)\n self.hourElement !== undefined && self.hourElement.focus();\n if (self.config.closeOnSelect) {\n var single = self.config.mode === \"single\" && !self.config.enableTime;\n var range = self.config.mode === \"range\" &&\n self.selectedDates.length === 2 &&\n !self.config.enableTime;\n if (single || range) {\n focusAndClose();\n }\n }\n triggerChange();\n }\n var CALLBACKS = {\n locale: [setupLocale, updateWeekdays],\n showMonths: [buildMonths, setCalendarWidth, buildWeekdays],\n minDate: [jumpToDate],\n maxDate: [jumpToDate]\n };\n function set(option, value) {\n if (option !== null && typeof option === \"object\") {\n Object.assign(self.config, option);\n for (var key in option) {\n if (CALLBACKS[key] !== undefined)\n CALLBACKS[key].forEach(function (x) { return x(); });\n }\n }\n else {\n self.config[option] = value;\n if (CALLBACKS[option] !== undefined)\n CALLBACKS[option].forEach(function (x) { return x(); });\n else if (HOOKS.indexOf(option) > -1)\n self.config[option] = arrayify(value);\n }\n self.redraw();\n updateValue(false);\n }\n function setSelectedDate(inputDate, format) {\n var dates = [];\n if (inputDate instanceof Array)\n dates = inputDate.map(function (d) { return self.parseDate(d, format); });\n else if (inputDate instanceof Date || typeof inputDate === \"number\")\n dates = [self.parseDate(inputDate, format)];\n else if (typeof inputDate === \"string\") {\n switch (self.config.mode) {\n case \"single\":\n case \"time\":\n dates = [self.parseDate(inputDate, format)];\n break;\n case \"multiple\":\n dates = inputDate\n .split(self.config.conjunction)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n case \"range\":\n dates = inputDate\n .split(self.l10n.rangeSeparator)\n .map(function (date) { return self.parseDate(date, format); });\n break;\n default:\n break;\n }\n }\n else\n self.config.errorHandler(new Error(\"Invalid date supplied: \" + JSON.stringify(inputDate)));\n self.selectedDates = dates.filter(function (d) { return d instanceof Date && isEnabled(d, false); });\n if (self.config.mode === \"range\")\n self.selectedDates.sort(function (a, b) { return a.getTime() - b.getTime(); });\n }\n function setDate(date, triggerChange, format) {\n if (triggerChange === void 0) { triggerChange = false; }\n if (format === void 0) { format = self.config.dateFormat; }\n if ((date !== 0 && !date) || (date instanceof Array && date.length === 0))\n return self.clear(triggerChange);\n setSelectedDate(date, format);\n self.showTimeInput = self.selectedDates.length > 0;\n self.latestSelectedDateObj =\n self.selectedDates[self.selectedDates.length - 1];\n self.redraw();\n jumpToDate();\n setHoursFromDate();\n if (self.selectedDates.length === 0) {\n self.clear(false);\n }\n updateValue(triggerChange);\n if (triggerChange)\n triggerEvent(\"onChange\");\n }\n function parseDateRules(arr) {\n return arr\n .slice()\n .map(function (rule) {\n if (typeof rule === \"string\" ||\n typeof rule === \"number\" ||\n rule instanceof Date) {\n return self.parseDate(rule, undefined, true);\n }\n else if (rule &&\n typeof rule === \"object\" &&\n rule.from &&\n rule.to)\n return {\n from: self.parseDate(rule.from, undefined),\n to: self.parseDate(rule.to, undefined)\n };\n return rule;\n })\n .filter(function (x) { return x; }); // remove falsy values\n }\n function setupDates() {\n self.selectedDates = [];\n self.now = self.parseDate(self.config.now) || new Date();\n // Workaround IE11 setting placeholder as the input's value\n var preloadedDate = self.config.defaultDate ||\n ((self.input.nodeName === \"INPUT\" ||\n self.input.nodeName === \"TEXTAREA\") &&\n self.input.placeholder &&\n self.input.value === self.input.placeholder\n ? null\n : self.input.value);\n if (preloadedDate)\n setSelectedDate(preloadedDate, self.config.dateFormat);\n self._initialDate =\n self.selectedDates.length > 0\n ? self.selectedDates[0]\n : self.config.minDate &&\n self.config.minDate.getTime() > self.now.getTime()\n ? self.config.minDate\n : self.config.maxDate &&\n self.config.maxDate.getTime() < self.now.getTime()\n ? self.config.maxDate\n : self.now;\n self.currentYear = self._initialDate.getFullYear();\n self.currentMonth = self._initialDate.getMonth();\n if (self.selectedDates.length > 0)\n self.latestSelectedDateObj = self.selectedDates[0];\n if (self.config.minTime !== undefined)\n self.config.minTime = self.parseDate(self.config.minTime, \"H:i\");\n if (self.config.maxTime !== undefined)\n self.config.maxTime = self.parseDate(self.config.maxTime, \"H:i\");\n self.minDateHasTime =\n !!self.config.minDate &&\n (self.config.minDate.getHours() > 0 ||\n self.config.minDate.getMinutes() > 0 ||\n self.config.minDate.getSeconds() > 0);\n self.maxDateHasTime =\n !!self.config.maxDate &&\n (self.config.maxDate.getHours() > 0 ||\n self.config.maxDate.getMinutes() > 0 ||\n self.config.maxDate.getSeconds() > 0);\n Object.defineProperty(self, \"showTimeInput\", {\n get: function () { return self._showTimeInput; },\n set: function (bool) {\n self._showTimeInput = bool;\n if (self.calendarContainer)\n toggleClass(self.calendarContainer, \"showTimeInput\", bool);\n self.isOpen && positionCalendar();\n }\n });\n }\n function setupInputs() {\n self.input = self.config.wrap\n ? element.querySelector(\"[data-input]\")\n : element;\n /* istanbul ignore next */\n if (!self.input) {\n self.config.errorHandler(new Error(\"Invalid input element specified\"));\n return;\n }\n // hack: store previous type to restore it after destroy()\n self.input._type = self.input.type;\n self.input.type = \"text\";\n self.input.classList.add(\"flatpickr-input\");\n self._input = self.input;\n if (self.config.altInput) {\n // replicate self.element\n self.altInput = createElement(self.input.nodeName, self.config.altInputClass);\n self._input = self.altInput;\n self.altInput.placeholder = self.input.placeholder;\n self.altInput.disabled = self.input.disabled;\n self.altInput.required = self.input.required;\n self.altInput.tabIndex = self.input.tabIndex;\n self.altInput.type = \"text\";\n self.input.setAttribute(\"type\", \"hidden\");\n if (!self.config.static && self.input.parentNode)\n self.input.parentNode.insertBefore(self.altInput, self.input.nextSibling);\n }\n if (!self.config.allowInput)\n self._input.setAttribute(\"readonly\", \"readonly\");\n self._positionElement = self.config.positionElement || self._input;\n }\n function setupMobile() {\n var inputType = self.config.enableTime\n ? self.config.noCalendar\n ? \"time\"\n : \"datetime-local\"\n : \"date\";\n self.mobileInput = createElement(\"input\", self.input.className + \" flatpickr-mobile\");\n self.mobileInput.step = self.input.getAttribute(\"step\") || \"any\";\n self.mobileInput.tabIndex = 1;\n self.mobileInput.type = inputType;\n self.mobileInput.disabled = self.input.disabled;\n self.mobileInput.required = self.input.required;\n self.mobileInput.placeholder = self.input.placeholder;\n self.mobileFormatStr =\n inputType === \"datetime-local\"\n ? \"Y-m-d\\\\TH:i:S\"\n : inputType === \"date\"\n ? \"Y-m-d\"\n : \"H:i:S\";\n if (self.selectedDates.length > 0) {\n self.mobileInput.defaultValue = self.mobileInput.value = self.formatDate(self.selectedDates[0], self.mobileFormatStr);\n }\n if (self.config.minDate)\n self.mobileInput.min = self.formatDate(self.config.minDate, \"Y-m-d\");\n if (self.config.maxDate)\n self.mobileInput.max = self.formatDate(self.config.maxDate, \"Y-m-d\");\n self.input.type = \"hidden\";\n if (self.altInput !== undefined)\n self.altInput.type = \"hidden\";\n try {\n if (self.input.parentNode)\n self.input.parentNode.insertBefore(self.mobileInput, self.input.nextSibling);\n }\n catch (_a) { }\n bind(self.mobileInput, \"change\", function (e) {\n self.setDate(e.target.value, false, self.mobileFormatStr);\n triggerEvent(\"onChange\");\n triggerEvent(\"onClose\");\n });\n }\n function toggle(e) {\n if (self.isOpen === true)\n return self.close();\n self.open(e);\n }\n function triggerEvent(event, data) {\n // If the instance has been destroyed already, all hooks have been removed\n if (self.config === undefined)\n return;\n var hooks = self.config[event];\n if (hooks !== undefined && hooks.length > 0) {\n for (var i = 0; hooks[i] && i < hooks.length; i++)\n hooks[i](self.selectedDates, self.input.value, self, data);\n }\n if (event === \"onChange\") {\n self.input.dispatchEvent(createEvent(\"change\"));\n // many front-end frameworks bind to the input event\n self.input.dispatchEvent(createEvent(\"input\"));\n }\n }\n function createEvent(name) {\n var e = document.createEvent(\"Event\");\n e.initEvent(name, true, true);\n return e;\n }\n function isDateSelected(date) {\n for (var i = 0; i < self.selectedDates.length; i++) {\n if (compareDates(self.selectedDates[i], date) === 0)\n return \"\" + i;\n }\n return false;\n }\n function isDateInRange(date) {\n if (self.config.mode !== \"range\" || self.selectedDates.length < 2)\n return false;\n return (compareDates(date, self.selectedDates[0]) >= 0 &&\n compareDates(date, self.selectedDates[1]) <= 0);\n }\n function updateNavigationCurrentMonth() {\n if (self.config.noCalendar || self.isMobile || !self.monthNav)\n return;\n self.yearElements.forEach(function (yearElement, i) {\n var d = new Date(self.currentYear, self.currentMonth, 1);\n d.setMonth(self.currentMonth + i);\n if (self.config.showMonths > 1 ||\n self.config.monthSelectorType === \"static\") {\n self.monthElements[i].textContent =\n monthToStr(d.getMonth(), self.config.shorthandCurrentMonth, self.l10n) + \" \";\n }\n else {\n self.monthsDropdownContainer.value = d.getMonth().toString();\n }\n yearElement.value = d.getFullYear().toString();\n });\n self._hidePrevMonthArrow =\n self.config.minDate !== undefined &&\n (self.currentYear === self.config.minDate.getFullYear()\n ? self.currentMonth <= self.config.minDate.getMonth()\n : self.currentYear < self.config.minDate.getFullYear());\n self._hideNextMonthArrow =\n self.config.maxDate !== undefined &&\n (self.currentYear === self.config.maxDate.getFullYear()\n ? self.currentMonth + 1 > self.config.maxDate.getMonth()\n : self.currentYear > self.config.maxDate.getFullYear());\n }\n function getDateStr(format) {\n return self.selectedDates\n .map(function (dObj) { return self.formatDate(dObj, format); })\n .filter(function (d, i, arr) {\n return self.config.mode !== \"range\" ||\n self.config.enableTime ||\n arr.indexOf(d) === i;\n })\n .join(self.config.mode !== \"range\"\n ? self.config.conjunction\n : self.l10n.rangeSeparator);\n }\n /**\n * Updates the values of inputs associated with the calendar\n */\n function updateValue(triggerChange) {\n if (triggerChange === void 0) { triggerChange = true; }\n if (self.mobileInput !== undefined && self.mobileFormatStr) {\n self.mobileInput.value =\n self.latestSelectedDateObj !== undefined\n ? self.formatDate(self.latestSelectedDateObj, self.mobileFormatStr)\n : \"\";\n }\n self.input.value = getDateStr(self.config.dateFormat);\n if (self.altInput !== undefined) {\n self.altInput.value = getDateStr(self.config.altFormat);\n }\n if (triggerChange !== false)\n triggerEvent(\"onValueUpdate\");\n }\n function onMonthNavClick(e) {\n var isPrevMonth = self.prevMonthNav.contains(e.target);\n var isNextMonth = self.nextMonthNav.contains(e.target);\n if (isPrevMonth || isNextMonth) {\n changeMonth(isPrevMonth ? -1 : 1);\n }\n else if (self.yearElements.indexOf(e.target) >= 0) {\n e.target.select();\n }\n else if (e.target.classList.contains(\"arrowUp\")) {\n self.changeYear(self.currentYear + 1);\n }\n else if (e.target.classList.contains(\"arrowDown\")) {\n self.changeYear(self.currentYear - 1);\n }\n }\n function timeWrapper(e) {\n e.preventDefault();\n var isKeyDown = e.type === \"keydown\", input = e.target;\n if (self.amPM !== undefined && e.target === self.amPM) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n var min = parseFloat(input.getAttribute(\"min\")), max = parseFloat(input.getAttribute(\"max\")), step = parseFloat(input.getAttribute(\"step\")), curValue = parseInt(input.value, 10), delta = e.delta ||\n (isKeyDown ? (e.which === 38 ? 1 : -1) : 0);\n var newValue = curValue + step * delta;\n if (typeof input.value !== \"undefined\" && input.value.length === 2) {\n var isHourElem = input === self.hourElement, isMinuteElem = input === self.minuteElement;\n if (newValue < min) {\n newValue =\n max +\n newValue +\n int(!isHourElem) +\n (int(isHourElem) && int(!self.amPM));\n if (isMinuteElem)\n incrementNumInput(undefined, -1, self.hourElement);\n }\n else if (newValue > max) {\n newValue =\n input === self.hourElement ? newValue - max - int(!self.amPM) : min;\n if (isMinuteElem)\n incrementNumInput(undefined, 1, self.hourElement);\n }\n if (self.amPM &&\n isHourElem &&\n (step === 1\n ? newValue + curValue === 23\n : Math.abs(newValue - curValue) > step)) {\n self.amPM.textContent =\n self.l10n.amPM[int(self.amPM.textContent === self.l10n.amPM[0])];\n }\n input.value = pad(newValue);\n }\n }\n init();\n return self;\n }\n /* istanbul ignore next */\n function _flatpickr(nodeList, config) {\n // static list\n var nodes = Array.prototype.slice\n .call(nodeList)\n .filter(function (x) { return x instanceof HTMLElement; });\n var instances = [];\n for (var i = 0; i < nodes.length; i++) {\n var node = nodes[i];\n try {\n if (node.getAttribute(\"data-fp-omit\") !== null)\n continue;\n if (node._flatpickr !== undefined) {\n node._flatpickr.destroy();\n node._flatpickr = undefined;\n }\n node._flatpickr = FlatpickrInstance(node, config || {});\n instances.push(node._flatpickr);\n }\n catch (e) {\n console.error(e);\n }\n }\n return instances.length === 1 ? instances[0] : instances;\n }\n /* istanbul ignore next */\n if (typeof HTMLElement !== \"undefined\" &&\n typeof HTMLCollection !== \"undefined\" &&\n typeof NodeList !== \"undefined\") {\n // browser env\n HTMLCollection.prototype.flatpickr = NodeList.prototype.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n HTMLElement.prototype.flatpickr = function (config) {\n return _flatpickr([this], config);\n };\n }\n /* istanbul ignore next */\n var flatpickr = function (selector, config) {\n if (typeof selector === \"string\") {\n return _flatpickr(window.document.querySelectorAll(selector), config);\n }\n else if (selector instanceof Node) {\n return _flatpickr([selector], config);\n }\n else {\n return _flatpickr(selector, config);\n }\n };\n /* istanbul ignore next */\n flatpickr.defaultConfig = {};\n flatpickr.l10ns = {\n en: __assign({}, english),\n \"default\": __assign({}, english)\n };\n flatpickr.localize = function (l10n) {\n flatpickr.l10ns[\"default\"] = __assign({}, flatpickr.l10ns[\"default\"], l10n);\n };\n flatpickr.setDefaults = function (config) {\n flatpickr.defaultConfig = __assign({}, flatpickr.defaultConfig, config);\n };\n flatpickr.parseDate = createDateParser({});\n flatpickr.formatDate = createDateFormatter({});\n flatpickr.compareDates = compareDates;\n /* istanbul ignore next */\n if (typeof jQuery !== \"undefined\" && typeof jQuery.fn !== \"undefined\") {\n jQuery.fn.flatpickr = function (config) {\n return _flatpickr(this, config);\n };\n }\n // eslint-disable-next-line @typescript-eslint/camelcase\n Date.prototype.fp_incr = function (days) {\n return new Date(this.getFullYear(), this.getMonth(), this.getDate() + (typeof days === \"string\" ? parseInt(days, 10) : days));\n };\n if (typeof window !== \"undefined\") {\n window.flatpickr = flatpickr;\n }\n\n return flatpickr;\n\n}));\n", "export * from \"./enums.js\";\nexport * from \"./modifiers/index.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { popperGenerator, detectOverflow, createPopper as createPopperBase } from \"./createPopper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper } from \"./popper.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\";", "export var top = 'top';\nexport var bottom = 'bottom';\nexport var right = 'right';\nexport var left = 'left';\nexport var auto = 'auto';\nexport var basePlacements = [top, bottom, right, left];\nexport var start = 'start';\nexport var end = 'end';\nexport var clippingParents = 'clippingParents';\nexport var viewport = 'viewport';\nexport var popper = 'popper';\nexport var reference = 'reference';\nexport var variationPlacements = /*#__PURE__*/basePlacements.reduce(function (acc, placement) {\n return acc.concat([placement + \"-\" + start, placement + \"-\" + end]);\n}, []);\nexport var placements = /*#__PURE__*/[].concat(basePlacements, [auto]).reduce(function (acc, placement) {\n return acc.concat([placement, placement + \"-\" + start, placement + \"-\" + end]);\n}, []); // modifiers that need to read the DOM\n\nexport var beforeRead = 'beforeRead';\nexport var read = 'read';\nexport var afterRead = 'afterRead'; // pure-logic modifiers\n\nexport var beforeMain = 'beforeMain';\nexport var main = 'main';\nexport var afterMain = 'afterMain'; // modifier with the purpose to write to the DOM (or write into a framework state)\n\nexport var beforeWrite = 'beforeWrite';\nexport var write = 'write';\nexport var afterWrite = 'afterWrite';\nexport var modifierPhases = [beforeRead, read, afterRead, beforeMain, main, afterMain, beforeWrite, write, afterWrite];", "export default function getNodeName(element) {\n return element ? (element.nodeName || '').toLowerCase() : null;\n}", "export default function getWindow(node) {\n if (node == null) {\n return window;\n }\n\n if (node.toString() !== '[object Window]') {\n var ownerDocument = node.ownerDocument;\n return ownerDocument ? ownerDocument.defaultView || window : window;\n }\n\n return node;\n}", "import getWindow from \"./getWindow.js\";\n\nfunction isElement(node) {\n var OwnElement = getWindow(node).Element;\n return node instanceof OwnElement || node instanceof Element;\n}\n\nfunction isHTMLElement(node) {\n var OwnElement = getWindow(node).HTMLElement;\n return node instanceof OwnElement || node instanceof HTMLElement;\n}\n\nfunction isShadowRoot(node) {\n // IE 11 has no ShadowRoot\n if (typeof ShadowRoot === 'undefined') {\n return false;\n }\n\n var OwnElement = getWindow(node).ShadowRoot;\n return node instanceof OwnElement || node instanceof ShadowRoot;\n}\n\nexport { isElement, isHTMLElement, isShadowRoot };", "import getNodeName from \"../dom-utils/getNodeName.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // This modifier takes the styles prepared by the `computeStyles` modifier\n// and applies them to the HTMLElements such as popper and arrow\n\nfunction applyStyles(_ref) {\n var state = _ref.state;\n Object.keys(state.elements).forEach(function (name) {\n var style = state.styles[name] || {};\n var attributes = state.attributes[name] || {};\n var element = state.elements[name]; // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n } // Flow doesn't support to extend this property, but it's the most\n // effective way to apply styles to an HTMLElement\n // $FlowFixMe[cannot-write]\n\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (name) {\n var value = attributes[name];\n\n if (value === false) {\n element.removeAttribute(name);\n } else {\n element.setAttribute(name, value === true ? '' : value);\n }\n });\n });\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state;\n var initialStyles = {\n popper: {\n position: state.options.strategy,\n left: '0',\n top: '0',\n margin: '0'\n },\n arrow: {\n position: 'absolute'\n },\n reference: {}\n };\n Object.assign(state.elements.popper.style, initialStyles.popper);\n state.styles = initialStyles;\n\n if (state.elements.arrow) {\n Object.assign(state.elements.arrow.style, initialStyles.arrow);\n }\n\n return function () {\n Object.keys(state.elements).forEach(function (name) {\n var element = state.elements[name];\n var attributes = state.attributes[name] || {};\n var styleProperties = Object.keys(state.styles.hasOwnProperty(name) ? state.styles[name] : initialStyles[name]); // Set all values to an empty string to unset them\n\n var style = styleProperties.reduce(function (style, property) {\n style[property] = '';\n return style;\n }, {}); // arrow is optional + virtual elements\n\n if (!isHTMLElement(element) || !getNodeName(element)) {\n return;\n }\n\n Object.assign(element.style, style);\n Object.keys(attributes).forEach(function (attribute) {\n element.removeAttribute(attribute);\n });\n });\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'applyStyles',\n enabled: true,\n phase: 'write',\n fn: applyStyles,\n effect: effect,\n requires: ['computeStyles']\n};", "import { auto } from \"../enums.js\";\nexport default function getBasePlacement(placement) {\n return placement.split('-')[0];\n}", "export default function getBoundingClientRect(element) {\n var rect = element.getBoundingClientRect();\n return {\n width: rect.width,\n height: rect.height,\n top: rect.top,\n right: rect.right,\n bottom: rect.bottom,\n left: rect.left,\n x: rect.left,\n y: rect.top\n };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\"; // Returns the layout rect of an element relative to its offsetParent. Layout\n// means it doesn't take into account transforms.\n\nexport default function getLayoutRect(element) {\n var clientRect = getBoundingClientRect(element); // Use the clientRect sizes if it's not been transformed.\n // Fixes https://github.com/popperjs/popper-core/issues/1223\n\n var width = element.offsetWidth;\n var height = element.offsetHeight;\n\n if (Math.abs(clientRect.width - width) <= 1) {\n width = clientRect.width;\n }\n\n if (Math.abs(clientRect.height - height) <= 1) {\n height = clientRect.height;\n }\n\n return {\n x: element.offsetLeft,\n y: element.offsetTop,\n width: width,\n height: height\n };\n}", "import { isShadowRoot } from \"./instanceOf.js\";\nexport default function contains(parent, child) {\n var rootNode = child.getRootNode && child.getRootNode(); // First, attempt with faster native method\n\n if (parent.contains(child)) {\n return true;\n } // then fallback to custom implementation with Shadow DOM support\n else if (rootNode && isShadowRoot(rootNode)) {\n var next = child;\n\n do {\n if (next && parent.isSameNode(next)) {\n return true;\n } // $FlowFixMe[prop-missing]: need a better way to handle this...\n\n\n next = next.parentNode || next.host;\n } while (next);\n } // Give up, the result is false\n\n\n return false;\n}", "import getWindow from \"./getWindow.js\";\nexport default function getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}", "import getNodeName from \"./getNodeName.js\";\nexport default function isTableElement(element) {\n return ['table', 'td', 'th'].indexOf(getNodeName(element)) >= 0;\n}", "import { isElement } from \"./instanceOf.js\";\nexport default function getDocumentElement(element) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return ((isElement(element) ? element.ownerDocument : // $FlowFixMe[prop-missing]\n element.document) || window.document).documentElement;\n}", "import getNodeName from \"./getNodeName.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport { isShadowRoot } from \"./instanceOf.js\";\nexport default function getParentNode(element) {\n if (getNodeName(element) === 'html') {\n return element;\n }\n\n return (// this is a quicker (but less type safe) way to save quite some bytes from the bundle\n // $FlowFixMe[incompatible-return]\n // $FlowFixMe[prop-missing]\n element.assignedSlot || // step into the shadow DOM of the parent of a slotted node\n element.parentNode || ( // DOM Element detected\n isShadowRoot(element) ? element.host : null) || // ShadowRoot detected\n // $FlowFixMe[incompatible-call]: HTMLElement is a Node\n getDocumentElement(element) // fallback\n\n );\n}", "import getWindow from \"./getWindow.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport isTableElement from \"./isTableElement.js\";\nimport getParentNode from \"./getParentNode.js\";\n\nfunction getTrueOffsetParent(element) {\n if (!isHTMLElement(element) || // https://github.com/popperjs/popper-core/issues/837\n getComputedStyle(element).position === 'fixed') {\n return null;\n }\n\n return element.offsetParent;\n} // `.offsetParent` reports `null` for fixed elements, while absolute elements\n// return the containing block\n\n\nfunction getContainingBlock(element) {\n var isFirefox = navigator.userAgent.toLowerCase().indexOf('firefox') !== -1;\n var isIE = navigator.userAgent.indexOf('Trident') !== -1;\n\n if (isIE && isHTMLElement(element)) {\n // In IE 9, 10 and 11 fixed elements containing block is always established by the viewport\n var elementCss = getComputedStyle(element);\n\n if (elementCss.position === 'fixed') {\n return null;\n }\n }\n\n var currentNode = getParentNode(element);\n\n while (isHTMLElement(currentNode) && ['html', 'body'].indexOf(getNodeName(currentNode)) < 0) {\n var css = getComputedStyle(currentNode); // This is non-exhaustive but covers the most common CSS properties that\n // create a containing block.\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n\n if (css.transform !== 'none' || css.perspective !== 'none' || css.contain === 'paint' || ['transform', 'perspective'].indexOf(css.willChange) !== -1 || isFirefox && css.willChange === 'filter' || isFirefox && css.filter && css.filter !== 'none') {\n return currentNode;\n } else {\n currentNode = currentNode.parentNode;\n }\n }\n\n return null;\n} // Gets the closest ancestor positioned element. Handles some edge cases,\n// such as table ancestors and cross browser bugs.\n\n\nexport default function getOffsetParent(element) {\n var window = getWindow(element);\n var offsetParent = getTrueOffsetParent(element);\n\n while (offsetParent && isTableElement(offsetParent) && getComputedStyle(offsetParent).position === 'static') {\n offsetParent = getTrueOffsetParent(offsetParent);\n }\n\n if (offsetParent && (getNodeName(offsetParent) === 'html' || getNodeName(offsetParent) === 'body' && getComputedStyle(offsetParent).position === 'static')) {\n return window;\n }\n\n return offsetParent || getContainingBlock(element) || window;\n}", "export default function getMainAxisFromPlacement(placement) {\n return ['top', 'bottom'].indexOf(placement) >= 0 ? 'x' : 'y';\n}", "export var max = Math.max;\nexport var min = Math.min;\nexport var round = Math.round;", "import { max as mathMax, min as mathMin } from \"./math.js\";\nexport default function within(min, value, max) {\n return mathMax(min, mathMin(value, max));\n}", "export default function getFreshSideObject() {\n return {\n top: 0,\n right: 0,\n bottom: 0,\n left: 0\n };\n}", "import getFreshSideObject from \"./getFreshSideObject.js\";\nexport default function mergePaddingObject(paddingObject) {\n return Object.assign({}, getFreshSideObject(), paddingObject);\n}", "export default function expandToHashMap(value, keys) {\n return keys.reduce(function (hashMap, key) {\n hashMap[key] = value;\n return hashMap;\n }, {});\n}", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport contains from \"../dom-utils/contains.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport within from \"../utils/within.js\";\nimport mergePaddingObject from \"../utils/mergePaddingObject.js\";\nimport expandToHashMap from \"../utils/expandToHashMap.js\";\nimport { left, right, basePlacements, top, bottom } from \"../enums.js\";\nimport { isHTMLElement } from \"../dom-utils/instanceOf.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar toPaddingObject = function toPaddingObject(padding, state) {\n padding = typeof padding === 'function' ? padding(Object.assign({}, state.rects, {\n placement: state.placement\n })) : padding;\n return mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n};\n\nfunction arrow(_ref) {\n var _state$modifiersData$;\n\n var state = _ref.state,\n name = _ref.name,\n options = _ref.options;\n var arrowElement = state.elements.arrow;\n var popperOffsets = state.modifiersData.popperOffsets;\n var basePlacement = getBasePlacement(state.placement);\n var axis = getMainAxisFromPlacement(basePlacement);\n var isVertical = [left, right].indexOf(basePlacement) >= 0;\n var len = isVertical ? 'height' : 'width';\n\n if (!arrowElement || !popperOffsets) {\n return;\n }\n\n var paddingObject = toPaddingObject(options.padding, state);\n var arrowRect = getLayoutRect(arrowElement);\n var minProp = axis === 'y' ? top : left;\n var maxProp = axis === 'y' ? bottom : right;\n var endDiff = state.rects.reference[len] + state.rects.reference[axis] - popperOffsets[axis] - state.rects.popper[len];\n var startDiff = popperOffsets[axis] - state.rects.reference[axis];\n var arrowOffsetParent = getOffsetParent(arrowElement);\n var clientSize = arrowOffsetParent ? axis === 'y' ? arrowOffsetParent.clientHeight || 0 : arrowOffsetParent.clientWidth || 0 : 0;\n var centerToReference = endDiff / 2 - startDiff / 2; // Make sure the arrow doesn't overflow the popper if the center point is\n // outside of the popper bounds\n\n var min = paddingObject[minProp];\n var max = clientSize - arrowRect[len] - paddingObject[maxProp];\n var center = clientSize / 2 - arrowRect[len] / 2 + centerToReference;\n var offset = within(min, center, max); // Prevents breaking syntax highlighting...\n\n var axisProp = axis;\n state.modifiersData[name] = (_state$modifiersData$ = {}, _state$modifiersData$[axisProp] = offset, _state$modifiersData$.centerOffset = offset - center, _state$modifiersData$);\n}\n\nfunction effect(_ref2) {\n var state = _ref2.state,\n options = _ref2.options;\n var _options$element = options.element,\n arrowElement = _options$element === void 0 ? '[data-popper-arrow]' : _options$element;\n\n if (arrowElement == null) {\n return;\n } // CSS selector\n\n\n if (typeof arrowElement === 'string') {\n arrowElement = state.elements.popper.querySelector(arrowElement);\n\n if (!arrowElement) {\n return;\n }\n }\n\n if (process.env.NODE_ENV !== \"production\") {\n if (!isHTMLElement(arrowElement)) {\n console.error(['Popper: \"arrow\" element must be an HTMLElement (not an SVGElement).', 'To use an SVG arrow, wrap it in an HTMLElement that will be used as', 'the arrow.'].join(' '));\n }\n }\n\n if (!contains(state.elements.popper, arrowElement)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: \"arrow\" modifier\\'s `element` must be a child of the popper', 'element.'].join(' '));\n }\n\n return;\n }\n\n state.elements.arrow = arrowElement;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'arrow',\n enabled: true,\n phase: 'main',\n fn: arrow,\n effect: effect,\n requires: ['popperOffsets'],\n requiresIfExists: ['preventOverflow']\n};", "import { top, left, right, bottom } from \"../enums.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport getWindow from \"../dom-utils/getWindow.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport getComputedStyle from \"../dom-utils/getComputedStyle.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { round } from \"../utils/math.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar unsetSides = {\n top: 'auto',\n right: 'auto',\n bottom: 'auto',\n left: 'auto'\n}; // Round the offsets to the nearest suitable subpixel based on the DPR.\n// Zooming can change the DPR, but it seems to report a value that will\n// cleanly divide the values into the appropriate subpixels.\n\nfunction roundOffsetsByDPR(_ref) {\n var x = _ref.x,\n y = _ref.y;\n var win = window;\n var dpr = win.devicePixelRatio || 1;\n return {\n x: round(round(x * dpr) / dpr) || 0,\n y: round(round(y * dpr) / dpr) || 0\n };\n}\n\nexport function mapToStyles(_ref2) {\n var _Object$assign2;\n\n var popper = _ref2.popper,\n popperRect = _ref2.popperRect,\n placement = _ref2.placement,\n offsets = _ref2.offsets,\n position = _ref2.position,\n gpuAcceleration = _ref2.gpuAcceleration,\n adaptive = _ref2.adaptive,\n roundOffsets = _ref2.roundOffsets;\n\n var _ref3 = roundOffsets === true ? roundOffsetsByDPR(offsets) : typeof roundOffsets === 'function' ? roundOffsets(offsets) : offsets,\n _ref3$x = _ref3.x,\n x = _ref3$x === void 0 ? 0 : _ref3$x,\n _ref3$y = _ref3.y,\n y = _ref3$y === void 0 ? 0 : _ref3$y;\n\n var hasX = offsets.hasOwnProperty('x');\n var hasY = offsets.hasOwnProperty('y');\n var sideX = left;\n var sideY = top;\n var win = window;\n\n if (adaptive) {\n var offsetParent = getOffsetParent(popper);\n var heightProp = 'clientHeight';\n var widthProp = 'clientWidth';\n\n if (offsetParent === getWindow(popper)) {\n offsetParent = getDocumentElement(popper);\n\n if (getComputedStyle(offsetParent).position !== 'static') {\n heightProp = 'scrollHeight';\n widthProp = 'scrollWidth';\n }\n } // $FlowFixMe[incompatible-cast]: force type refinement, we compare offsetParent with window above, but Flow doesn't detect it\n\n\n offsetParent = offsetParent;\n\n if (placement === top) {\n sideY = bottom; // $FlowFixMe[prop-missing]\n\n y -= offsetParent[heightProp] - popperRect.height;\n y *= gpuAcceleration ? 1 : -1;\n }\n\n if (placement === left) {\n sideX = right; // $FlowFixMe[prop-missing]\n\n x -= offsetParent[widthProp] - popperRect.width;\n x *= gpuAcceleration ? 1 : -1;\n }\n }\n\n var commonStyles = Object.assign({\n position: position\n }, adaptive && unsetSides);\n\n if (gpuAcceleration) {\n var _Object$assign;\n\n return Object.assign({}, commonStyles, (_Object$assign = {}, _Object$assign[sideY] = hasY ? '0' : '', _Object$assign[sideX] = hasX ? '0' : '', _Object$assign.transform = (win.devicePixelRatio || 1) < 2 ? \"translate(\" + x + \"px, \" + y + \"px)\" : \"translate3d(\" + x + \"px, \" + y + \"px, 0)\", _Object$assign));\n }\n\n return Object.assign({}, commonStyles, (_Object$assign2 = {}, _Object$assign2[sideY] = hasY ? y + \"px\" : '', _Object$assign2[sideX] = hasX ? x + \"px\" : '', _Object$assign2.transform = '', _Object$assign2));\n}\n\nfunction computeStyles(_ref4) {\n var state = _ref4.state,\n options = _ref4.options;\n var _options$gpuAccelerat = options.gpuAcceleration,\n gpuAcceleration = _options$gpuAccelerat === void 0 ? true : _options$gpuAccelerat,\n _options$adaptive = options.adaptive,\n adaptive = _options$adaptive === void 0 ? true : _options$adaptive,\n _options$roundOffsets = options.roundOffsets,\n roundOffsets = _options$roundOffsets === void 0 ? true : _options$roundOffsets;\n\n if (process.env.NODE_ENV !== \"production\") {\n var transitionProperty = getComputedStyle(state.elements.popper).transitionProperty || '';\n\n if (adaptive && ['transform', 'top', 'right', 'bottom', 'left'].some(function (property) {\n return transitionProperty.indexOf(property) >= 0;\n })) {\n console.warn(['Popper: Detected CSS transitions on at least one of the following', 'CSS properties: \"transform\", \"top\", \"right\", \"bottom\", \"left\".', '\\n\\n', 'Disable the \"computeStyles\" modifier\\'s `adaptive` option to allow', 'for smooth transitions, or remove these properties from the CSS', 'transition declaration on the popper element if only transitioning', 'opacity or background-color for example.', '\\n\\n', 'We recommend using the popper element as a wrapper around an inner', 'element that can have any CSS property transitioned for animations.'].join(' '));\n }\n }\n\n var commonStyles = {\n placement: getBasePlacement(state.placement),\n popper: state.elements.popper,\n popperRect: state.rects.popper,\n gpuAcceleration: gpuAcceleration\n };\n\n if (state.modifiersData.popperOffsets != null) {\n state.styles.popper = Object.assign({}, state.styles.popper, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.popperOffsets,\n position: state.options.strategy,\n adaptive: adaptive,\n roundOffsets: roundOffsets\n })));\n }\n\n if (state.modifiersData.arrow != null) {\n state.styles.arrow = Object.assign({}, state.styles.arrow, mapToStyles(Object.assign({}, commonStyles, {\n offsets: state.modifiersData.arrow,\n position: 'absolute',\n adaptive: false,\n roundOffsets: roundOffsets\n })));\n }\n\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-placement': state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'computeStyles',\n enabled: true,\n phase: 'beforeWrite',\n fn: computeStyles,\n data: {}\n};", "import getWindow from \"../dom-utils/getWindow.js\"; // eslint-disable-next-line import/no-unused-modules\n\nvar passive = {\n passive: true\n};\n\nfunction effect(_ref) {\n var state = _ref.state,\n instance = _ref.instance,\n options = _ref.options;\n var _options$scroll = options.scroll,\n scroll = _options$scroll === void 0 ? true : _options$scroll,\n _options$resize = options.resize,\n resize = _options$resize === void 0 ? true : _options$resize;\n var window = getWindow(state.elements.popper);\n var scrollParents = [].concat(state.scrollParents.reference, state.scrollParents.popper);\n\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.addEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.addEventListener('resize', instance.update, passive);\n }\n\n return function () {\n if (scroll) {\n scrollParents.forEach(function (scrollParent) {\n scrollParent.removeEventListener('scroll', instance.update, passive);\n });\n }\n\n if (resize) {\n window.removeEventListener('resize', instance.update, passive);\n }\n };\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'eventListeners',\n enabled: true,\n phase: 'write',\n fn: function fn() {},\n effect: effect,\n data: {}\n};", "var hash = {\n left: 'right',\n right: 'left',\n bottom: 'top',\n top: 'bottom'\n};\nexport default function getOppositePlacement(placement) {\n return placement.replace(/left|right|bottom|top/g, function (matched) {\n return hash[matched];\n });\n}", "var hash = {\n start: 'end',\n end: 'start'\n};\nexport default function getOppositeVariationPlacement(placement) {\n return placement.replace(/start|end/g, function (matched) {\n return hash[matched];\n });\n}", "import getWindow from \"./getWindow.js\";\nexport default function getWindowScroll(node) {\n var win = getWindow(node);\n var scrollLeft = win.pageXOffset;\n var scrollTop = win.pageYOffset;\n return {\n scrollLeft: scrollLeft,\n scrollTop: scrollTop\n };\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nexport default function getWindowScrollBarX(element) {\n // If has a CSS width greater than the viewport, then this will be\n // incorrect for RTL.\n // Popper 1 is broken in this case and never had a bug report so let's assume\n // it's not an issue. I don't think anyone ever specifies width on \n // anyway.\n // Browsers where the left scrollbar doesn't cause an issue report `0` for\n // this (e.g. Edge 2019, IE11, Safari)\n return getBoundingClientRect(getDocumentElement(element)).left + getWindowScroll(element).scrollLeft;\n}", "import getWindow from \"./getWindow.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nexport default function getViewportRect(element) {\n var win = getWindow(element);\n var html = getDocumentElement(element);\n var visualViewport = win.visualViewport;\n var width = html.clientWidth;\n var height = html.clientHeight;\n var x = 0;\n var y = 0; // NB: This isn't supported on iOS <= 12. If the keyboard is open, the popper\n // can be obscured underneath it.\n // Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even\n // if it isn't open, so if this isn't available, the popper will be detected\n // to overflow the bottom of the screen too early.\n\n if (visualViewport) {\n width = visualViewport.width;\n height = visualViewport.height; // Uses Layout Viewport (like Chrome; Safari does not currently)\n // In Chrome, it returns a value very close to 0 (+/-) but contains rounding\n // errors due to floating point numbers, so we need to check precision.\n // Safari returns a number <= 0, usually < -1 when pinch-zoomed\n // Feature detection fails in mobile emulation mode in Chrome.\n // Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <\n // 0.001\n // Fallback here: \"Not Safari\" userAgent\n\n if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {\n x = visualViewport.offsetLeft;\n y = visualViewport.offsetTop;\n }\n }\n\n return {\n width: width,\n height: height,\n x: x + getWindowScrollBarX(element),\n y: y\n };\n}", "import getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getWindowScroll from \"./getWindowScroll.js\";\nimport { max } from \"../utils/math.js\"; // Gets the entire size of the scrollable document area, even extending outside\n// of the `` and `` rect bounds if horizontally scrollable\n\nexport default function getDocumentRect(element) {\n var _element$ownerDocumen;\n\n var html = getDocumentElement(element);\n var winScroll = getWindowScroll(element);\n var body = (_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body;\n var width = max(html.scrollWidth, html.clientWidth, body ? body.scrollWidth : 0, body ? body.clientWidth : 0);\n var height = max(html.scrollHeight, html.clientHeight, body ? body.scrollHeight : 0, body ? body.clientHeight : 0);\n var x = -winScroll.scrollLeft + getWindowScrollBarX(element);\n var y = -winScroll.scrollTop;\n\n if (getComputedStyle(body || html).direction === 'rtl') {\n x += max(html.clientWidth, body ? body.clientWidth : 0) - width;\n }\n\n return {\n width: width,\n height: height,\n x: x,\n y: y\n };\n}", "import getComputedStyle from \"./getComputedStyle.js\";\nexport default function isScrollParent(element) {\n // Firefox wants us to check `-x` and `-y` variations as well\n var _getComputedStyle = getComputedStyle(element),\n overflow = _getComputedStyle.overflow,\n overflowX = _getComputedStyle.overflowX,\n overflowY = _getComputedStyle.overflowY;\n\n return /auto|scroll|overlay|hidden/.test(overflow + overflowY + overflowX);\n}", "import getParentNode from \"./getParentNode.js\";\nimport isScrollParent from \"./isScrollParent.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nexport default function getScrollParent(node) {\n if (['html', 'body', '#document'].indexOf(getNodeName(node)) >= 0) {\n // $FlowFixMe[incompatible-return]: assume body is always available\n return node.ownerDocument.body;\n }\n\n if (isHTMLElement(node) && isScrollParent(node)) {\n return node;\n }\n\n return getScrollParent(getParentNode(node));\n}", "import getScrollParent from \"./getScrollParent.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport getWindow from \"./getWindow.js\";\nimport isScrollParent from \"./isScrollParent.js\";\n/*\ngiven a DOM element, return the list of all scroll parents, up the list of ancesors\nuntil we get to the top window object. This list is what we attach scroll listeners\nto, because if any of these parent elements scroll, we'll need to re-calculate the\nreference element's position.\n*/\n\nexport default function listScrollParents(element, list) {\n var _element$ownerDocumen;\n\n if (list === void 0) {\n list = [];\n }\n\n var scrollParent = getScrollParent(element);\n var isBody = scrollParent === ((_element$ownerDocumen = element.ownerDocument) == null ? void 0 : _element$ownerDocumen.body);\n var win = getWindow(scrollParent);\n var target = isBody ? [win].concat(win.visualViewport || [], isScrollParent(scrollParent) ? scrollParent : []) : scrollParent;\n var updatedList = list.concat(target);\n return isBody ? updatedList : // $FlowFixMe[incompatible-call]: isBody tells us target will be an HTMLElement here\n updatedList.concat(listScrollParents(getParentNode(target)));\n}", "export default function rectToClientRect(rect) {\n return Object.assign({}, rect, {\n left: rect.x,\n top: rect.y,\n right: rect.x + rect.width,\n bottom: rect.y + rect.height\n });\n}", "import { viewport } from \"../enums.js\";\nimport getViewportRect from \"./getViewportRect.js\";\nimport getDocumentRect from \"./getDocumentRect.js\";\nimport listScrollParents from \"./listScrollParents.js\";\nimport getOffsetParent from \"./getOffsetParent.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport getComputedStyle from \"./getComputedStyle.js\";\nimport { isElement, isHTMLElement } from \"./instanceOf.js\";\nimport getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getParentNode from \"./getParentNode.js\";\nimport contains from \"./contains.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport rectToClientRect from \"../utils/rectToClientRect.js\";\nimport { max, min } from \"../utils/math.js\";\n\nfunction getInnerBoundingClientRect(element) {\n var rect = getBoundingClientRect(element);\n rect.top = rect.top + element.clientTop;\n rect.left = rect.left + element.clientLeft;\n rect.bottom = rect.top + element.clientHeight;\n rect.right = rect.left + element.clientWidth;\n rect.width = element.clientWidth;\n rect.height = element.clientHeight;\n rect.x = rect.left;\n rect.y = rect.top;\n return rect;\n}\n\nfunction getClientRectFromMixedType(element, clippingParent) {\n return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isHTMLElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));\n} // A \"clipping parent\" is an overflowable container with the characteristic of\n// clipping (or hiding) overflowing elements with a position different from\n// `initial`\n\n\nfunction getClippingParents(element) {\n var clippingParents = listScrollParents(getParentNode(element));\n var canEscapeClipping = ['absolute', 'fixed'].indexOf(getComputedStyle(element).position) >= 0;\n var clipperElement = canEscapeClipping && isHTMLElement(element) ? getOffsetParent(element) : element;\n\n if (!isElement(clipperElement)) {\n return [];\n } // $FlowFixMe[incompatible-return]: https://github.com/facebook/flow/issues/1414\n\n\n return clippingParents.filter(function (clippingParent) {\n return isElement(clippingParent) && contains(clippingParent, clipperElement) && getNodeName(clippingParent) !== 'body';\n });\n} // Gets the maximum area that the element is visible in due to any number of\n// clipping parents\n\n\nexport default function getClippingRect(element, boundary, rootBoundary) {\n var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);\n var clippingParents = [].concat(mainClippingParents, [rootBoundary]);\n var firstClippingParent = clippingParents[0];\n var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {\n var rect = getClientRectFromMixedType(element, clippingParent);\n accRect.top = max(rect.top, accRect.top);\n accRect.right = min(rect.right, accRect.right);\n accRect.bottom = min(rect.bottom, accRect.bottom);\n accRect.left = max(rect.left, accRect.left);\n return accRect;\n }, getClientRectFromMixedType(element, firstClippingParent));\n clippingRect.width = clippingRect.right - clippingRect.left;\n clippingRect.height = clippingRect.bottom - clippingRect.top;\n clippingRect.x = clippingRect.left;\n clippingRect.y = clippingRect.top;\n return clippingRect;\n}", "export default function getVariation(placement) {\n return placement.split('-')[1];\n}", "import getBasePlacement from \"./getBasePlacement.js\";\nimport getVariation from \"./getVariation.js\";\nimport getMainAxisFromPlacement from \"./getMainAxisFromPlacement.js\";\nimport { top, right, bottom, left, start, end } from \"../enums.js\";\nexport default function computeOffsets(_ref) {\n var reference = _ref.reference,\n element = _ref.element,\n placement = _ref.placement;\n var basePlacement = placement ? getBasePlacement(placement) : null;\n var variation = placement ? getVariation(placement) : null;\n var commonX = reference.x + reference.width / 2 - element.width / 2;\n var commonY = reference.y + reference.height / 2 - element.height / 2;\n var offsets;\n\n switch (basePlacement) {\n case top:\n offsets = {\n x: commonX,\n y: reference.y - element.height\n };\n break;\n\n case bottom:\n offsets = {\n x: commonX,\n y: reference.y + reference.height\n };\n break;\n\n case right:\n offsets = {\n x: reference.x + reference.width,\n y: commonY\n };\n break;\n\n case left:\n offsets = {\n x: reference.x - element.width,\n y: commonY\n };\n break;\n\n default:\n offsets = {\n x: reference.x,\n y: reference.y\n };\n }\n\n var mainAxis = basePlacement ? getMainAxisFromPlacement(basePlacement) : null;\n\n if (mainAxis != null) {\n var len = mainAxis === 'y' ? 'height' : 'width';\n\n switch (variation) {\n case start:\n offsets[mainAxis] = offsets[mainAxis] - (reference[len] / 2 - element[len] / 2);\n break;\n\n case end:\n offsets[mainAxis] = offsets[mainAxis] + (reference[len] / 2 - element[len] / 2);\n break;\n\n default:\n }\n }\n\n return offsets;\n}", "import getBoundingClientRect from \"../dom-utils/getBoundingClientRect.js\";\nimport getClippingRect from \"../dom-utils/getClippingRect.js\";\nimport getDocumentElement from \"../dom-utils/getDocumentElement.js\";\nimport computeOffsets from \"./computeOffsets.js\";\nimport rectToClientRect from \"./rectToClientRect.js\";\nimport { clippingParents, reference, popper, bottom, top, right, basePlacements, viewport } from \"../enums.js\";\nimport { isElement } from \"../dom-utils/instanceOf.js\";\nimport mergePaddingObject from \"./mergePaddingObject.js\";\nimport expandToHashMap from \"./expandToHashMap.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport default function detectOverflow(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n _options$placement = _options.placement,\n placement = _options$placement === void 0 ? state.placement : _options$placement,\n _options$boundary = _options.boundary,\n boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,\n _options$rootBoundary = _options.rootBoundary,\n rootBoundary = _options$rootBoundary === void 0 ? viewport : _options$rootBoundary,\n _options$elementConte = _options.elementContext,\n elementContext = _options$elementConte === void 0 ? popper : _options$elementConte,\n _options$altBoundary = _options.altBoundary,\n altBoundary = _options$altBoundary === void 0 ? false : _options$altBoundary,\n _options$padding = _options.padding,\n padding = _options$padding === void 0 ? 0 : _options$padding;\n var paddingObject = mergePaddingObject(typeof padding !== 'number' ? padding : expandToHashMap(padding, basePlacements));\n var altContext = elementContext === popper ? reference : popper;\n var referenceElement = state.elements.reference;\n var popperRect = state.rects.popper;\n var element = state.elements[altBoundary ? altContext : elementContext];\n var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);\n var referenceClientRect = getBoundingClientRect(referenceElement);\n var popperOffsets = computeOffsets({\n reference: referenceClientRect,\n element: popperRect,\n strategy: 'absolute',\n placement: placement\n });\n var popperClientRect = rectToClientRect(Object.assign({}, popperRect, popperOffsets));\n var elementClientRect = elementContext === popper ? popperClientRect : referenceClientRect; // positive = overflowing the clipping rect\n // 0 or negative = within the clipping rect\n\n var overflowOffsets = {\n top: clippingClientRect.top - elementClientRect.top + paddingObject.top,\n bottom: elementClientRect.bottom - clippingClientRect.bottom + paddingObject.bottom,\n left: clippingClientRect.left - elementClientRect.left + paddingObject.left,\n right: elementClientRect.right - clippingClientRect.right + paddingObject.right\n };\n var offsetData = state.modifiersData.offset; // Offsets can be applied only to the popper element\n\n if (elementContext === popper && offsetData) {\n var offset = offsetData[placement];\n Object.keys(overflowOffsets).forEach(function (key) {\n var multiply = [right, bottom].indexOf(key) >= 0 ? 1 : -1;\n var axis = [top, bottom].indexOf(key) >= 0 ? 'y' : 'x';\n overflowOffsets[key] += offset[axis] * multiply;\n });\n }\n\n return overflowOffsets;\n}", "import getVariation from \"./getVariation.js\";\nimport { variationPlacements, basePlacements, placements as allPlacements } from \"../enums.js\";\nimport detectOverflow from \"./detectOverflow.js\";\nimport getBasePlacement from \"./getBasePlacement.js\";\nexport default function computeAutoPlacement(state, options) {\n if (options === void 0) {\n options = {};\n }\n\n var _options = options,\n placement = _options.placement,\n boundary = _options.boundary,\n rootBoundary = _options.rootBoundary,\n padding = _options.padding,\n flipVariations = _options.flipVariations,\n _options$allowedAutoP = _options.allowedAutoPlacements,\n allowedAutoPlacements = _options$allowedAutoP === void 0 ? allPlacements : _options$allowedAutoP;\n var variation = getVariation(placement);\n var placements = variation ? flipVariations ? variationPlacements : variationPlacements.filter(function (placement) {\n return getVariation(placement) === variation;\n }) : basePlacements;\n var allowedPlacements = placements.filter(function (placement) {\n return allowedAutoPlacements.indexOf(placement) >= 0;\n });\n\n if (allowedPlacements.length === 0) {\n allowedPlacements = placements;\n\n if (process.env.NODE_ENV !== \"production\") {\n console.error(['Popper: The `allowedAutoPlacements` option did not allow any', 'placements. Ensure the `placement` option matches the variation', 'of the allowed placements.', 'For example, \"auto\" cannot be used to allow \"bottom-start\".', 'Use \"auto-start\" instead.'].join(' '));\n }\n } // $FlowFixMe[incompatible-type]: Flow seems to have problems with two array unions...\n\n\n var overflows = allowedPlacements.reduce(function (acc, placement) {\n acc[placement] = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding\n })[getBasePlacement(placement)];\n return acc;\n }, {});\n return Object.keys(overflows).sort(function (a, b) {\n return overflows[a] - overflows[b];\n });\n}", "import getOppositePlacement from \"../utils/getOppositePlacement.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getOppositeVariationPlacement from \"../utils/getOppositeVariationPlacement.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport computeAutoPlacement from \"../utils/computeAutoPlacement.js\";\nimport { bottom, top, start, right, left, auto } from \"../enums.js\";\nimport getVariation from \"../utils/getVariation.js\"; // eslint-disable-next-line import/no-unused-modules\n\nfunction getExpandedFallbackPlacements(placement) {\n if (getBasePlacement(placement) === auto) {\n return [];\n }\n\n var oppositePlacement = getOppositePlacement(placement);\n return [getOppositeVariationPlacement(placement), oppositePlacement, getOppositeVariationPlacement(oppositePlacement)];\n}\n\nfunction flip(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n\n if (state.modifiersData[name]._skip) {\n return;\n }\n\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? true : _options$altAxis,\n specifiedFallbackPlacements = options.fallbackPlacements,\n padding = options.padding,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n _options$flipVariatio = options.flipVariations,\n flipVariations = _options$flipVariatio === void 0 ? true : _options$flipVariatio,\n allowedAutoPlacements = options.allowedAutoPlacements;\n var preferredPlacement = state.options.placement;\n var basePlacement = getBasePlacement(preferredPlacement);\n var isBasePlacement = basePlacement === preferredPlacement;\n var fallbackPlacements = specifiedFallbackPlacements || (isBasePlacement || !flipVariations ? [getOppositePlacement(preferredPlacement)] : getExpandedFallbackPlacements(preferredPlacement));\n var placements = [preferredPlacement].concat(fallbackPlacements).reduce(function (acc, placement) {\n return acc.concat(getBasePlacement(placement) === auto ? computeAutoPlacement(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n flipVariations: flipVariations,\n allowedAutoPlacements: allowedAutoPlacements\n }) : placement);\n }, []);\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var checksMap = new Map();\n var makeFallbackChecks = true;\n var firstFittingPlacement = placements[0];\n\n for (var i = 0; i < placements.length; i++) {\n var placement = placements[i];\n\n var _basePlacement = getBasePlacement(placement);\n\n var isStartVariation = getVariation(placement) === start;\n var isVertical = [top, bottom].indexOf(_basePlacement) >= 0;\n var len = isVertical ? 'width' : 'height';\n var overflow = detectOverflow(state, {\n placement: placement,\n boundary: boundary,\n rootBoundary: rootBoundary,\n altBoundary: altBoundary,\n padding: padding\n });\n var mainVariationSide = isVertical ? isStartVariation ? right : left : isStartVariation ? bottom : top;\n\n if (referenceRect[len] > popperRect[len]) {\n mainVariationSide = getOppositePlacement(mainVariationSide);\n }\n\n var altVariationSide = getOppositePlacement(mainVariationSide);\n var checks = [];\n\n if (checkMainAxis) {\n checks.push(overflow[_basePlacement] <= 0);\n }\n\n if (checkAltAxis) {\n checks.push(overflow[mainVariationSide] <= 0, overflow[altVariationSide] <= 0);\n }\n\n if (checks.every(function (check) {\n return check;\n })) {\n firstFittingPlacement = placement;\n makeFallbackChecks = false;\n break;\n }\n\n checksMap.set(placement, checks);\n }\n\n if (makeFallbackChecks) {\n // `2` may be desired in some cases \u2013 research later\n var numberOfChecks = flipVariations ? 3 : 1;\n\n var _loop = function _loop(_i) {\n var fittingPlacement = placements.find(function (placement) {\n var checks = checksMap.get(placement);\n\n if (checks) {\n return checks.slice(0, _i).every(function (check) {\n return check;\n });\n }\n });\n\n if (fittingPlacement) {\n firstFittingPlacement = fittingPlacement;\n return \"break\";\n }\n };\n\n for (var _i = numberOfChecks; _i > 0; _i--) {\n var _ret = _loop(_i);\n\n if (_ret === \"break\") break;\n }\n }\n\n if (state.placement !== firstFittingPlacement) {\n state.modifiersData[name]._skip = true;\n state.placement = firstFittingPlacement;\n state.reset = true;\n }\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'flip',\n enabled: true,\n phase: 'main',\n fn: flip,\n requiresIfExists: ['offset'],\n data: {\n _skip: false\n }\n};", "import { top, bottom, left, right } from \"../enums.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\n\nfunction getSideOffsets(overflow, rect, preventedOffsets) {\n if (preventedOffsets === void 0) {\n preventedOffsets = {\n x: 0,\n y: 0\n };\n }\n\n return {\n top: overflow.top - rect.height - preventedOffsets.y,\n right: overflow.right - rect.width + preventedOffsets.x,\n bottom: overflow.bottom - rect.height + preventedOffsets.y,\n left: overflow.left - rect.width - preventedOffsets.x\n };\n}\n\nfunction isAnySideFullyClipped(overflow) {\n return [top, right, bottom, left].some(function (side) {\n return overflow[side] >= 0;\n });\n}\n\nfunction hide(_ref) {\n var state = _ref.state,\n name = _ref.name;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var preventedOffsets = state.modifiersData.preventOverflow;\n var referenceOverflow = detectOverflow(state, {\n elementContext: 'reference'\n });\n var popperAltOverflow = detectOverflow(state, {\n altBoundary: true\n });\n var referenceClippingOffsets = getSideOffsets(referenceOverflow, referenceRect);\n var popperEscapeOffsets = getSideOffsets(popperAltOverflow, popperRect, preventedOffsets);\n var isReferenceHidden = isAnySideFullyClipped(referenceClippingOffsets);\n var hasPopperEscaped = isAnySideFullyClipped(popperEscapeOffsets);\n state.modifiersData[name] = {\n referenceClippingOffsets: referenceClippingOffsets,\n popperEscapeOffsets: popperEscapeOffsets,\n isReferenceHidden: isReferenceHidden,\n hasPopperEscaped: hasPopperEscaped\n };\n state.attributes.popper = Object.assign({}, state.attributes.popper, {\n 'data-popper-reference-hidden': isReferenceHidden,\n 'data-popper-escaped': hasPopperEscaped\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'hide',\n enabled: true,\n phase: 'main',\n requiresIfExists: ['preventOverflow'],\n fn: hide\n};", "import getBasePlacement from \"../utils/getBasePlacement.js\";\nimport { top, left, right, placements } from \"../enums.js\";\nexport function distanceAndSkiddingToXY(placement, rects, offset) {\n var basePlacement = getBasePlacement(placement);\n var invertDistance = [left, top].indexOf(basePlacement) >= 0 ? -1 : 1;\n\n var _ref = typeof offset === 'function' ? offset(Object.assign({}, rects, {\n placement: placement\n })) : offset,\n skidding = _ref[0],\n distance = _ref[1];\n\n skidding = skidding || 0;\n distance = (distance || 0) * invertDistance;\n return [left, right].indexOf(basePlacement) >= 0 ? {\n x: distance,\n y: skidding\n } : {\n x: skidding,\n y: distance\n };\n}\n\nfunction offset(_ref2) {\n var state = _ref2.state,\n options = _ref2.options,\n name = _ref2.name;\n var _options$offset = options.offset,\n offset = _options$offset === void 0 ? [0, 0] : _options$offset;\n var data = placements.reduce(function (acc, placement) {\n acc[placement] = distanceAndSkiddingToXY(placement, state.rects, offset);\n return acc;\n }, {});\n var _data$state$placement = data[state.placement],\n x = _data$state$placement.x,\n y = _data$state$placement.y;\n\n if (state.modifiersData.popperOffsets != null) {\n state.modifiersData.popperOffsets.x += x;\n state.modifiersData.popperOffsets.y += y;\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'offset',\n enabled: true,\n phase: 'main',\n requires: ['popperOffsets'],\n fn: offset\n};", "import computeOffsets from \"../utils/computeOffsets.js\";\n\nfunction popperOffsets(_ref) {\n var state = _ref.state,\n name = _ref.name;\n // Offsets are the actual position the popper needs to have to be\n // properly positioned near its reference element\n // This is the most basic placement, and will be adjusted by\n // the modifiers in the next step\n state.modifiersData[name] = computeOffsets({\n reference: state.rects.reference,\n element: state.rects.popper,\n strategy: 'absolute',\n placement: state.placement\n });\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'popperOffsets',\n enabled: true,\n phase: 'read',\n fn: popperOffsets,\n data: {}\n};", "export default function getAltAxis(axis) {\n return axis === 'x' ? 'y' : 'x';\n}", "import { top, left, right, bottom, start } from \"../enums.js\";\nimport getBasePlacement from \"../utils/getBasePlacement.js\";\nimport getMainAxisFromPlacement from \"../utils/getMainAxisFromPlacement.js\";\nimport getAltAxis from \"../utils/getAltAxis.js\";\nimport within from \"../utils/within.js\";\nimport getLayoutRect from \"../dom-utils/getLayoutRect.js\";\nimport getOffsetParent from \"../dom-utils/getOffsetParent.js\";\nimport detectOverflow from \"../utils/detectOverflow.js\";\nimport getVariation from \"../utils/getVariation.js\";\nimport getFreshSideObject from \"../utils/getFreshSideObject.js\";\nimport { max as mathMax, min as mathMin } from \"../utils/math.js\";\n\nfunction preventOverflow(_ref) {\n var state = _ref.state,\n options = _ref.options,\n name = _ref.name;\n var _options$mainAxis = options.mainAxis,\n checkMainAxis = _options$mainAxis === void 0 ? true : _options$mainAxis,\n _options$altAxis = options.altAxis,\n checkAltAxis = _options$altAxis === void 0 ? false : _options$altAxis,\n boundary = options.boundary,\n rootBoundary = options.rootBoundary,\n altBoundary = options.altBoundary,\n padding = options.padding,\n _options$tether = options.tether,\n tether = _options$tether === void 0 ? true : _options$tether,\n _options$tetherOffset = options.tetherOffset,\n tetherOffset = _options$tetherOffset === void 0 ? 0 : _options$tetherOffset;\n var overflow = detectOverflow(state, {\n boundary: boundary,\n rootBoundary: rootBoundary,\n padding: padding,\n altBoundary: altBoundary\n });\n var basePlacement = getBasePlacement(state.placement);\n var variation = getVariation(state.placement);\n var isBasePlacement = !variation;\n var mainAxis = getMainAxisFromPlacement(basePlacement);\n var altAxis = getAltAxis(mainAxis);\n var popperOffsets = state.modifiersData.popperOffsets;\n var referenceRect = state.rects.reference;\n var popperRect = state.rects.popper;\n var tetherOffsetValue = typeof tetherOffset === 'function' ? tetherOffset(Object.assign({}, state.rects, {\n placement: state.placement\n })) : tetherOffset;\n var data = {\n x: 0,\n y: 0\n };\n\n if (!popperOffsets) {\n return;\n }\n\n if (checkMainAxis || checkAltAxis) {\n var mainSide = mainAxis === 'y' ? top : left;\n var altSide = mainAxis === 'y' ? bottom : right;\n var len = mainAxis === 'y' ? 'height' : 'width';\n var offset = popperOffsets[mainAxis];\n var min = popperOffsets[mainAxis] + overflow[mainSide];\n var max = popperOffsets[mainAxis] - overflow[altSide];\n var additive = tether ? -popperRect[len] / 2 : 0;\n var minLen = variation === start ? referenceRect[len] : popperRect[len];\n var maxLen = variation === start ? -popperRect[len] : -referenceRect[len]; // We need to include the arrow in the calculation so the arrow doesn't go\n // outside the reference bounds\n\n var arrowElement = state.elements.arrow;\n var arrowRect = tether && arrowElement ? getLayoutRect(arrowElement) : {\n width: 0,\n height: 0\n };\n var arrowPaddingObject = state.modifiersData['arrow#persistent'] ? state.modifiersData['arrow#persistent'].padding : getFreshSideObject();\n var arrowPaddingMin = arrowPaddingObject[mainSide];\n var arrowPaddingMax = arrowPaddingObject[altSide]; // If the reference length is smaller than the arrow length, we don't want\n // to include its full size in the calculation. If the reference is small\n // and near the edge of a boundary, the popper can overflow even if the\n // reference is not overflowing as well (e.g. virtual elements with no\n // width or height)\n\n var arrowLen = within(0, referenceRect[len], arrowRect[len]);\n var minOffset = isBasePlacement ? referenceRect[len] / 2 - additive - arrowLen - arrowPaddingMin - tetherOffsetValue : minLen - arrowLen - arrowPaddingMin - tetherOffsetValue;\n var maxOffset = isBasePlacement ? -referenceRect[len] / 2 + additive + arrowLen + arrowPaddingMax + tetherOffsetValue : maxLen + arrowLen + arrowPaddingMax + tetherOffsetValue;\n var arrowOffsetParent = state.elements.arrow && getOffsetParent(state.elements.arrow);\n var clientOffset = arrowOffsetParent ? mainAxis === 'y' ? arrowOffsetParent.clientTop || 0 : arrowOffsetParent.clientLeft || 0 : 0;\n var offsetModifierValue = state.modifiersData.offset ? state.modifiersData.offset[state.placement][mainAxis] : 0;\n var tetherMin = popperOffsets[mainAxis] + minOffset - offsetModifierValue - clientOffset;\n var tetherMax = popperOffsets[mainAxis] + maxOffset - offsetModifierValue;\n\n if (checkMainAxis) {\n var preventedOffset = within(tether ? mathMin(min, tetherMin) : min, offset, tether ? mathMax(max, tetherMax) : max);\n popperOffsets[mainAxis] = preventedOffset;\n data[mainAxis] = preventedOffset - offset;\n }\n\n if (checkAltAxis) {\n var _mainSide = mainAxis === 'x' ? top : left;\n\n var _altSide = mainAxis === 'x' ? bottom : right;\n\n var _offset = popperOffsets[altAxis];\n\n var _min = _offset + overflow[_mainSide];\n\n var _max = _offset - overflow[_altSide];\n\n var _preventedOffset = within(tether ? mathMin(_min, tetherMin) : _min, _offset, tether ? mathMax(_max, tetherMax) : _max);\n\n popperOffsets[altAxis] = _preventedOffset;\n data[altAxis] = _preventedOffset - _offset;\n }\n }\n\n state.modifiersData[name] = data;\n} // eslint-disable-next-line import/no-unused-modules\n\n\nexport default {\n name: 'preventOverflow',\n enabled: true,\n phase: 'main',\n fn: preventOverflow,\n requiresIfExists: ['offset']\n};", "export default function getHTMLElementScroll(element) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n}", "import getWindowScroll from \"./getWindowScroll.js\";\nimport getWindow from \"./getWindow.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getHTMLElementScroll from \"./getHTMLElementScroll.js\";\nexport default function getNodeScroll(node) {\n if (node === getWindow(node) || !isHTMLElement(node)) {\n return getWindowScroll(node);\n } else {\n return getHTMLElementScroll(node);\n }\n}", "import getBoundingClientRect from \"./getBoundingClientRect.js\";\nimport getNodeScroll from \"./getNodeScroll.js\";\nimport getNodeName from \"./getNodeName.js\";\nimport { isHTMLElement } from \"./instanceOf.js\";\nimport getWindowScrollBarX from \"./getWindowScrollBarX.js\";\nimport getDocumentElement from \"./getDocumentElement.js\";\nimport isScrollParent from \"./isScrollParent.js\"; // Returns the composite rect of an element relative to its offsetParent.\n// Composite means it takes into account transforms as well as layout.\n\nexport default function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {\n if (isFixed === void 0) {\n isFixed = false;\n }\n\n var documentElement = getDocumentElement(offsetParent);\n var rect = getBoundingClientRect(elementOrVirtualElement);\n var isOffsetParentAnElement = isHTMLElement(offsetParent);\n var scroll = {\n scrollLeft: 0,\n scrollTop: 0\n };\n var offsets = {\n x: 0,\n y: 0\n };\n\n if (isOffsetParentAnElement || !isOffsetParentAnElement && !isFixed) {\n if (getNodeName(offsetParent) !== 'body' || // https://github.com/popperjs/popper-core/issues/1078\n isScrollParent(documentElement)) {\n scroll = getNodeScroll(offsetParent);\n }\n\n if (isHTMLElement(offsetParent)) {\n offsets = getBoundingClientRect(offsetParent);\n offsets.x += offsetParent.clientLeft;\n offsets.y += offsetParent.clientTop;\n } else if (documentElement) {\n offsets.x = getWindowScrollBarX(documentElement);\n }\n }\n\n return {\n x: rect.left + scroll.scrollLeft - offsets.x,\n y: rect.top + scroll.scrollTop - offsets.y,\n width: rect.width,\n height: rect.height\n };\n}", "import { modifierPhases } from \"../enums.js\"; // source: https://stackoverflow.com/questions/49875255\n\nfunction order(modifiers) {\n var map = new Map();\n var visited = new Set();\n var result = [];\n modifiers.forEach(function (modifier) {\n map.set(modifier.name, modifier);\n }); // On visiting object, check for its dependencies and visit them recursively\n\n function sort(modifier) {\n visited.add(modifier.name);\n var requires = [].concat(modifier.requires || [], modifier.requiresIfExists || []);\n requires.forEach(function (dep) {\n if (!visited.has(dep)) {\n var depModifier = map.get(dep);\n\n if (depModifier) {\n sort(depModifier);\n }\n }\n });\n result.push(modifier);\n }\n\n modifiers.forEach(function (modifier) {\n if (!visited.has(modifier.name)) {\n // check for visited object\n sort(modifier);\n }\n });\n return result;\n}\n\nexport default function orderModifiers(modifiers) {\n // order based on dependencies\n var orderedModifiers = order(modifiers); // order based on phase\n\n return modifierPhases.reduce(function (acc, phase) {\n return acc.concat(orderedModifiers.filter(function (modifier) {\n return modifier.phase === phase;\n }));\n }, []);\n}", "export default function debounce(fn) {\n var pending;\n return function () {\n if (!pending) {\n pending = new Promise(function (resolve) {\n Promise.resolve().then(function () {\n pending = undefined;\n resolve(fn());\n });\n });\n }\n\n return pending;\n };\n}", "export default function mergeByName(modifiers) {\n var merged = modifiers.reduce(function (merged, current) {\n var existing = merged[current.name];\n merged[current.name] = existing ? Object.assign({}, existing, current, {\n options: Object.assign({}, existing.options, current.options),\n data: Object.assign({}, existing.data, current.data)\n }) : current;\n return merged;\n }, {}); // IE11 does not support Object.values\n\n return Object.keys(merged).map(function (key) {\n return merged[key];\n });\n}", "import getCompositeRect from \"./dom-utils/getCompositeRect.js\";\nimport getLayoutRect from \"./dom-utils/getLayoutRect.js\";\nimport listScrollParents from \"./dom-utils/listScrollParents.js\";\nimport getOffsetParent from \"./dom-utils/getOffsetParent.js\";\nimport getComputedStyle from \"./dom-utils/getComputedStyle.js\";\nimport orderModifiers from \"./utils/orderModifiers.js\";\nimport debounce from \"./utils/debounce.js\";\nimport validateModifiers from \"./utils/validateModifiers.js\";\nimport uniqueBy from \"./utils/uniqueBy.js\";\nimport getBasePlacement from \"./utils/getBasePlacement.js\";\nimport mergeByName from \"./utils/mergeByName.js\";\nimport detectOverflow from \"./utils/detectOverflow.js\";\nimport { isElement } from \"./dom-utils/instanceOf.js\";\nimport { auto } from \"./enums.js\";\nvar INVALID_ELEMENT_ERROR = 'Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.';\nvar INFINITE_LOOP_ERROR = 'Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.';\nvar DEFAULT_OPTIONS = {\n placement: 'bottom',\n modifiers: [],\n strategy: 'absolute'\n};\n\nfunction areValidElements() {\n for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {\n args[_key] = arguments[_key];\n }\n\n return !args.some(function (element) {\n return !(element && typeof element.getBoundingClientRect === 'function');\n });\n}\n\nexport function popperGenerator(generatorOptions) {\n if (generatorOptions === void 0) {\n generatorOptions = {};\n }\n\n var _generatorOptions = generatorOptions,\n _generatorOptions$def = _generatorOptions.defaultModifiers,\n defaultModifiers = _generatorOptions$def === void 0 ? [] : _generatorOptions$def,\n _generatorOptions$def2 = _generatorOptions.defaultOptions,\n defaultOptions = _generatorOptions$def2 === void 0 ? DEFAULT_OPTIONS : _generatorOptions$def2;\n return function createPopper(reference, popper, options) {\n if (options === void 0) {\n options = defaultOptions;\n }\n\n var state = {\n placement: 'bottom',\n orderedModifiers: [],\n options: Object.assign({}, DEFAULT_OPTIONS, defaultOptions),\n modifiersData: {},\n elements: {\n reference: reference,\n popper: popper\n },\n attributes: {},\n styles: {}\n };\n var effectCleanupFns = [];\n var isDestroyed = false;\n var instance = {\n state: state,\n setOptions: function setOptions(options) {\n cleanupModifierEffects();\n state.options = Object.assign({}, defaultOptions, state.options, options);\n state.scrollParents = {\n reference: isElement(reference) ? listScrollParents(reference) : reference.contextElement ? listScrollParents(reference.contextElement) : [],\n popper: listScrollParents(popper)\n }; // Orders the modifiers based on their dependencies and `phase`\n // properties\n\n var orderedModifiers = orderModifiers(mergeByName([].concat(defaultModifiers, state.options.modifiers))); // Strip out disabled modifiers\n\n state.orderedModifiers = orderedModifiers.filter(function (m) {\n return m.enabled;\n }); // Validate the provided modifiers so that the consumer will get warned\n // if one of the modifiers is invalid for any reason\n\n if (process.env.NODE_ENV !== \"production\") {\n var modifiers = uniqueBy([].concat(orderedModifiers, state.options.modifiers), function (_ref) {\n var name = _ref.name;\n return name;\n });\n validateModifiers(modifiers);\n\n if (getBasePlacement(state.options.placement) === auto) {\n var flipModifier = state.orderedModifiers.find(function (_ref2) {\n var name = _ref2.name;\n return name === 'flip';\n });\n\n if (!flipModifier) {\n console.error(['Popper: \"auto\" placements require the \"flip\" modifier be', 'present and enabled to work.'].join(' '));\n }\n }\n\n var _getComputedStyle = getComputedStyle(popper),\n marginTop = _getComputedStyle.marginTop,\n marginRight = _getComputedStyle.marginRight,\n marginBottom = _getComputedStyle.marginBottom,\n marginLeft = _getComputedStyle.marginLeft; // We no longer take into account `margins` on the popper, and it can\n // cause bugs with positioning, so we'll warn the consumer\n\n\n if ([marginTop, marginRight, marginBottom, marginLeft].some(function (margin) {\n return parseFloat(margin);\n })) {\n console.warn(['Popper: CSS \"margin\" styles cannot be used to apply padding', 'between the popper and its reference element or boundary.', 'To replicate margin, use the `offset` modifier, as well as', 'the `padding` option in the `preventOverflow` and `flip`', 'modifiers.'].join(' '));\n }\n }\n\n runModifierEffects();\n return instance.update();\n },\n // Sync update \u2013 it will always be executed, even if not necessary. This\n // is useful for low frequency updates where sync behavior simplifies the\n // logic.\n // For high frequency updates (e.g. `resize` and `scroll` events), always\n // prefer the async Popper#update method\n forceUpdate: function forceUpdate() {\n if (isDestroyed) {\n return;\n }\n\n var _state$elements = state.elements,\n reference = _state$elements.reference,\n popper = _state$elements.popper; // Don't proceed if `reference` or `popper` are not valid elements\n // anymore\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return;\n } // Store the reference and popper rects to be read by modifiers\n\n\n state.rects = {\n reference: getCompositeRect(reference, getOffsetParent(popper), state.options.strategy === 'fixed'),\n popper: getLayoutRect(popper)\n }; // Modifiers have the ability to reset the current update cycle. The\n // most common use case for this is the `flip` modifier changing the\n // placement, which then needs to re-run all the modifiers, because the\n // logic was previously ran for the previous placement and is therefore\n // stale/incorrect\n\n state.reset = false;\n state.placement = state.options.placement; // On each update cycle, the `modifiersData` property for each modifier\n // is filled with the initial data specified by the modifier. This means\n // it doesn't persist and is fresh on each update.\n // To ensure persistent data, use `${name}#persistent`\n\n state.orderedModifiers.forEach(function (modifier) {\n return state.modifiersData[modifier.name] = Object.assign({}, modifier.data);\n });\n var __debug_loops__ = 0;\n\n for (var index = 0; index < state.orderedModifiers.length; index++) {\n if (process.env.NODE_ENV !== \"production\") {\n __debug_loops__ += 1;\n\n if (__debug_loops__ > 100) {\n console.error(INFINITE_LOOP_ERROR);\n break;\n }\n }\n\n if (state.reset === true) {\n state.reset = false;\n index = -1;\n continue;\n }\n\n var _state$orderedModifie = state.orderedModifiers[index],\n fn = _state$orderedModifie.fn,\n _state$orderedModifie2 = _state$orderedModifie.options,\n _options = _state$orderedModifie2 === void 0 ? {} : _state$orderedModifie2,\n name = _state$orderedModifie.name;\n\n if (typeof fn === 'function') {\n state = fn({\n state: state,\n options: _options,\n name: name,\n instance: instance\n }) || state;\n }\n }\n },\n // Async and optimistically optimized update \u2013 it will not be executed if\n // not necessary (debounced to run at most once-per-tick)\n update: debounce(function () {\n return new Promise(function (resolve) {\n instance.forceUpdate();\n resolve(state);\n });\n }),\n destroy: function destroy() {\n cleanupModifierEffects();\n isDestroyed = true;\n }\n };\n\n if (!areValidElements(reference, popper)) {\n if (process.env.NODE_ENV !== \"production\") {\n console.error(INVALID_ELEMENT_ERROR);\n }\n\n return instance;\n }\n\n instance.setOptions(options).then(function (state) {\n if (!isDestroyed && options.onFirstUpdate) {\n options.onFirstUpdate(state);\n }\n }); // Modifiers have the ability to execute arbitrary code before the first\n // update cycle runs. They will be executed in the same order as the update\n // cycle. This is useful when a modifier adds some persistent data that\n // other modifiers need to use, but the modifier is run after the dependent\n // one.\n\n function runModifierEffects() {\n state.orderedModifiers.forEach(function (_ref3) {\n var name = _ref3.name,\n _ref3$options = _ref3.options,\n options = _ref3$options === void 0 ? {} : _ref3$options,\n effect = _ref3.effect;\n\n if (typeof effect === 'function') {\n var cleanupFn = effect({\n state: state,\n name: name,\n instance: instance,\n options: options\n });\n\n var noopFn = function noopFn() {};\n\n effectCleanupFns.push(cleanupFn || noopFn);\n }\n });\n }\n\n function cleanupModifierEffects() {\n effectCleanupFns.forEach(function (fn) {\n return fn();\n });\n effectCleanupFns = [];\n }\n\n return instance;\n };\n}\nexport var createPopper = /*#__PURE__*/popperGenerator(); // eslint-disable-next-line import/no-unused-modules\n\nexport { detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow };", "import { popperGenerator, detectOverflow } from \"./createPopper.js\";\nimport eventListeners from \"./modifiers/eventListeners.js\";\nimport popperOffsets from \"./modifiers/popperOffsets.js\";\nimport computeStyles from \"./modifiers/computeStyles.js\";\nimport applyStyles from \"./modifiers/applyStyles.js\";\nimport offset from \"./modifiers/offset.js\";\nimport flip from \"./modifiers/flip.js\";\nimport preventOverflow from \"./modifiers/preventOverflow.js\";\nimport arrow from \"./modifiers/arrow.js\";\nimport hide from \"./modifiers/hide.js\";\nvar defaultModifiers = [eventListeners, popperOffsets, computeStyles, applyStyles, offset, flip, preventOverflow, arrow, hide];\nvar createPopper = /*#__PURE__*/popperGenerator({\n defaultModifiers: defaultModifiers\n}); // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper, popperGenerator, defaultModifiers, detectOverflow }; // eslint-disable-next-line import/no-unused-modules\n\nexport { createPopper as createPopperLite } from \"./popper-lite.js\"; // eslint-disable-next-line import/no-unused-modules\n\nexport * from \"./modifiers/index.js\";", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): dom/selector-engine.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NODE_TEXT = 3\n\nconst SelectorEngine = {\n find(selector, element = document.documentElement) {\n return [].concat(...Element.prototype.querySelectorAll.call(element, selector))\n },\n\n findOne(selector, element = document.documentElement) {\n return Element.prototype.querySelector.call(element, selector)\n },\n\n children(element, selector) {\n return [].concat(...element.children)\n .filter(child => child.matches(selector))\n },\n\n parents(element, selector) {\n const parents = []\n\n let ancestor = element.parentNode\n\n while (ancestor && ancestor.nodeType === Node.ELEMENT_NODE && ancestor.nodeType !== NODE_TEXT) {\n if (ancestor.matches(selector)) {\n parents.push(ancestor)\n }\n\n ancestor = ancestor.parentNode\n }\n\n return parents\n },\n\n prev(element, selector) {\n let previous = element.previousElementSibling\n\n while (previous) {\n if (previous.matches(selector)) {\n return [previous]\n }\n\n previous = previous.previousElementSibling\n }\n\n return []\n },\n\n next(element, selector) {\n let next = element.nextElementSibling\n\n while (next) {\n if (next.matches(selector)) {\n return [next]\n }\n\n next = next.nextElementSibling\n }\n\n return []\n }\n}\n\nexport default SelectorEngine\n", "import SelectorEngine from '../dom/selector-engine'\n\n/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): util/index.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst MAX_UID = 1000000\nconst MILLISECONDS_MULTIPLIER = 1000\nconst TRANSITION_END = 'transitionend'\n\n// Shoutout AngusCroll (https://goo.gl/pxwQGp)\nconst toType = obj => {\n if (obj === null || obj === undefined) {\n return `${obj}`\n }\n\n return {}.toString.call(obj).match(/\\s([a-z]+)/i)[1].toLowerCase()\n}\n\n/**\n * --------------------------------------------------------------------------\n * Public Util Api\n * --------------------------------------------------------------------------\n */\n\nconst getUID = prefix => {\n do {\n prefix += Math.floor(Math.random() * MAX_UID)\n } while (document.getElementById(prefix))\n\n return prefix\n}\n\nconst getSelector = element => {\n let selector = element.getAttribute('data-bs-target')\n\n if (!selector || selector === '#') {\n let hrefAttr = element.getAttribute('href')\n\n // The only valid content that could double as a selector are IDs or classes,\n // so everything starting with `#` or `.`. If a \"real\" URL is used as the selector,\n // `document.querySelector` will rightfully complain it is invalid.\n // See https://github.com/twbs/bootstrap/issues/32273\n if (!hrefAttr || (!hrefAttr.includes('#') && !hrefAttr.startsWith('.'))) {\n return null\n }\n\n // Just in case some CMS puts out a full URL with the anchor appended\n if (hrefAttr.includes('#') && !hrefAttr.startsWith('#')) {\n hrefAttr = `#${hrefAttr.split('#')[1]}`\n }\n\n selector = hrefAttr && hrefAttr !== '#' ? hrefAttr.trim() : null\n }\n\n return selector\n}\n\nconst getSelectorFromElement = element => {\n const selector = getSelector(element)\n\n if (selector) {\n return document.querySelector(selector) ? selector : null\n }\n\n return null\n}\n\nconst getElementFromSelector = element => {\n const selector = getSelector(element)\n\n return selector ? document.querySelector(selector) : null\n}\n\nconst getTransitionDurationFromElement = element => {\n if (!element) {\n return 0\n }\n\n // Get transition-duration of the element\n let { transitionDuration, transitionDelay } = window.getComputedStyle(element)\n\n const floatTransitionDuration = Number.parseFloat(transitionDuration)\n const floatTransitionDelay = Number.parseFloat(transitionDelay)\n\n // Return 0 if element or transition duration is not found\n if (!floatTransitionDuration && !floatTransitionDelay) {\n return 0\n }\n\n // If multiple durations are defined, take the first\n transitionDuration = transitionDuration.split(',')[0]\n transitionDelay = transitionDelay.split(',')[0]\n\n return (Number.parseFloat(transitionDuration) + Number.parseFloat(transitionDelay)) * MILLISECONDS_MULTIPLIER\n}\n\nconst triggerTransitionEnd = element => {\n element.dispatchEvent(new Event(TRANSITION_END))\n}\n\nconst isElement = obj => {\n if (!obj || typeof obj !== 'object') {\n return false\n }\n\n if (typeof obj.jquery !== 'undefined') {\n obj = obj[0]\n }\n\n return typeof obj.nodeType !== 'undefined'\n}\n\nconst getElement = obj => {\n if (isElement(obj)) { // it's a jQuery object or a node element\n return obj.jquery ? obj[0] : obj\n }\n\n if (typeof obj === 'string' && obj.length > 0) {\n return SelectorEngine.findOne(obj)\n }\n\n return null\n}\n\nconst typeCheckConfig = (componentName, config, configTypes) => {\n Object.keys(configTypes).forEach(property => {\n const expectedTypes = configTypes[property]\n const value = config[property]\n const valueType = value && isElement(value) ? 'element' : toType(value)\n\n if (!new RegExp(expectedTypes).test(valueType)) {\n throw new TypeError(\n `${componentName.toUpperCase()}: Option \"${property}\" provided type \"${valueType}\" but expected type \"${expectedTypes}\".`\n )\n }\n })\n}\n\nconst isVisible = element => {\n if (!isElement(element) || element.getClientRects().length === 0) {\n return false\n }\n\n return getComputedStyle(element).getPropertyValue('visibility') === 'visible'\n}\n\nconst isDisabled = element => {\n if (!element || element.nodeType !== Node.ELEMENT_NODE) {\n return true\n }\n\n if (element.classList.contains('disabled')) {\n return true\n }\n\n if (typeof element.disabled !== 'undefined') {\n return element.disabled\n }\n\n return element.hasAttribute('disabled') && element.getAttribute('disabled') !== 'false'\n}\n\nconst findShadowRoot = element => {\n if (!document.documentElement.attachShadow) {\n return null\n }\n\n // Can find the shadow root otherwise it'll return the document\n if (typeof element.getRootNode === 'function') {\n const root = element.getRootNode()\n return root instanceof ShadowRoot ? root : null\n }\n\n if (element instanceof ShadowRoot) {\n return element\n }\n\n // when we don't find a shadow root\n if (!element.parentNode) {\n return null\n }\n\n return findShadowRoot(element.parentNode)\n}\n\nconst noop = () => {}\n\nconst reflow = element => element.offsetHeight\n\nconst getjQuery = () => {\n const { jQuery } = window\n\n if (jQuery && !document.body.hasAttribute('data-bs-no-jquery')) {\n return jQuery\n }\n\n return null\n}\n\nconst DOMContentLoadedCallbacks = []\n\nconst onDOMContentLoaded = callback => {\n if (document.readyState === 'loading') {\n // add listener on the first call when the document is in loading state\n if (!DOMContentLoadedCallbacks.length) {\n document.addEventListener('DOMContentLoaded', () => {\n DOMContentLoadedCallbacks.forEach(callback => callback())\n })\n }\n\n DOMContentLoadedCallbacks.push(callback)\n } else {\n callback()\n }\n}\n\nconst isRTL = () => document.documentElement.dir === 'rtl'\n\nconst defineJQueryPlugin = plugin => {\n onDOMContentLoaded(() => {\n const $ = getjQuery()\n /* istanbul ignore if */\n if ($) {\n const name = plugin.NAME\n const JQUERY_NO_CONFLICT = $.fn[name]\n $.fn[name] = plugin.jQueryInterface\n $.fn[name].Constructor = plugin\n $.fn[name].noConflict = () => {\n $.fn[name] = JQUERY_NO_CONFLICT\n return plugin.jQueryInterface\n }\n }\n })\n}\n\nconst execute = callback => {\n if (typeof callback === 'function') {\n callback()\n }\n}\n\nconst executeAfterTransition = (callback, transitionElement, waitForTransition = true) => {\n if (!waitForTransition) {\n execute(callback)\n return\n }\n\n const durationPadding = 5\n const emulatedDuration = getTransitionDurationFromElement(transitionElement) + durationPadding\n\n let called = false\n\n const handler = ({ target }) => {\n if (target !== transitionElement) {\n return\n }\n\n called = true\n transitionElement.removeEventListener(TRANSITION_END, handler)\n execute(callback)\n }\n\n transitionElement.addEventListener(TRANSITION_END, handler)\n setTimeout(() => {\n if (!called) {\n triggerTransitionEnd(transitionElement)\n }\n }, emulatedDuration)\n}\n\n/**\n * Return the previous/next element of a list.\n *\n * @param {array} list The list of elements\n * @param activeElement The active element\n * @param shouldGetNext Choose to get next or previous element\n * @param isCycleAllowed\n * @return {Element|elem} The proper element\n */\nconst getNextActiveElement = (list, activeElement, shouldGetNext, isCycleAllowed) => {\n let index = list.indexOf(activeElement)\n\n // if the element does not exist in the list return an element depending on the direction and if cycle is allowed\n if (index === -1) {\n return list[!shouldGetNext && isCycleAllowed ? list.length - 1 : 0]\n }\n\n const listLength = list.length\n\n index += shouldGetNext ? 1 : -1\n\n if (isCycleAllowed) {\n index = (index + listLength) % listLength\n }\n\n return list[Math.max(0, Math.min(index, listLength - 1))]\n}\n\nexport {\n getElement,\n getUID,\n getSelectorFromElement,\n getElementFromSelector,\n getTransitionDurationFromElement,\n triggerTransitionEnd,\n isElement,\n typeCheckConfig,\n isVisible,\n isDisabled,\n findShadowRoot,\n noop,\n getNextActiveElement,\n reflow,\n getjQuery,\n onDOMContentLoaded,\n isRTL,\n defineJQueryPlugin,\n execute,\n executeAfterTransition\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): dom/event-handler.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { getjQuery } from '../util/index'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst namespaceRegex = /[^.]*(?=\\..*)\\.|.*/\nconst stripNameRegex = /\\..*/\nconst stripUidRegex = /::\\d+$/\nconst eventRegistry = {} // Events storage\nlet uidEvent = 1\nconst customEvents = {\n mouseenter: 'mouseover',\n mouseleave: 'mouseout'\n}\nconst customEventsRegex = /^(mouseenter|mouseleave)/i\nconst nativeEvents = new Set([\n 'click',\n 'dblclick',\n 'mouseup',\n 'mousedown',\n 'contextmenu',\n 'mousewheel',\n 'DOMMouseScroll',\n 'mouseover',\n 'mouseout',\n 'mousemove',\n 'selectstart',\n 'selectend',\n 'keydown',\n 'keypress',\n 'keyup',\n 'orientationchange',\n 'touchstart',\n 'touchmove',\n 'touchend',\n 'touchcancel',\n 'pointerdown',\n 'pointermove',\n 'pointerup',\n 'pointerleave',\n 'pointercancel',\n 'gesturestart',\n 'gesturechange',\n 'gestureend',\n 'focus',\n 'blur',\n 'change',\n 'reset',\n 'select',\n 'submit',\n 'focusin',\n 'focusout',\n 'load',\n 'unload',\n 'beforeunload',\n 'resize',\n 'move',\n 'DOMContentLoaded',\n 'readystatechange',\n 'error',\n 'abort',\n 'scroll'\n])\n\n/**\n * ------------------------------------------------------------------------\n * Private methods\n * ------------------------------------------------------------------------\n */\n\nfunction getUidEvent(element, uid) {\n return (uid && `${uid}::${uidEvent++}`) || element.uidEvent || uidEvent++\n}\n\nfunction getEvent(element) {\n const uid = getUidEvent(element)\n\n element.uidEvent = uid\n eventRegistry[uid] = eventRegistry[uid] || {}\n\n return eventRegistry[uid]\n}\n\nfunction bootstrapHandler(element, fn) {\n return function handler(event) {\n event.delegateTarget = element\n\n if (handler.oneOff) {\n EventHandler.off(element, event.type, fn)\n }\n\n return fn.apply(element, [event])\n }\n}\n\nfunction bootstrapDelegationHandler(element, selector, fn) {\n return function handler(event) {\n const domElements = element.querySelectorAll(selector)\n\n for (let { target } = event; target && target !== this; target = target.parentNode) {\n for (let i = domElements.length; i--;) {\n if (domElements[i] === target) {\n event.delegateTarget = target\n\n if (handler.oneOff) {\n // eslint-disable-next-line unicorn/consistent-destructuring\n EventHandler.off(element, event.type, selector, fn)\n }\n\n return fn.apply(target, [event])\n }\n }\n }\n\n // To please ESLint\n return null\n }\n}\n\nfunction findHandler(events, handler, delegationSelector = null) {\n const uidEventList = Object.keys(events)\n\n for (let i = 0, len = uidEventList.length; i < len; i++) {\n const event = events[uidEventList[i]]\n\n if (event.originalHandler === handler && event.delegationSelector === delegationSelector) {\n return event\n }\n }\n\n return null\n}\n\nfunction normalizeParams(originalTypeEvent, handler, delegationFn) {\n const delegation = typeof handler === 'string'\n const originalHandler = delegation ? delegationFn : handler\n\n let typeEvent = getTypeEvent(originalTypeEvent)\n const isNative = nativeEvents.has(typeEvent)\n\n if (!isNative) {\n typeEvent = originalTypeEvent\n }\n\n return [delegation, originalHandler, typeEvent]\n}\n\nfunction addHandler(element, originalTypeEvent, handler, delegationFn, oneOff) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n if (!handler) {\n handler = delegationFn\n delegationFn = null\n }\n\n // in case of mouseenter or mouseleave wrap the handler within a function that checks for its DOM position\n // this prevents the handler from being dispatched the same way as mouseover or mouseout does\n if (customEventsRegex.test(originalTypeEvent)) {\n const wrapFn = fn => {\n return function (event) {\n if (!event.relatedTarget || (event.relatedTarget !== event.delegateTarget && !event.delegateTarget.contains(event.relatedTarget))) {\n return fn.call(this, event)\n }\n }\n }\n\n if (delegationFn) {\n delegationFn = wrapFn(delegationFn)\n } else {\n handler = wrapFn(handler)\n }\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn)\n const events = getEvent(element)\n const handlers = events[typeEvent] || (events[typeEvent] = {})\n const previousFn = findHandler(handlers, originalHandler, delegation ? handler : null)\n\n if (previousFn) {\n previousFn.oneOff = previousFn.oneOff && oneOff\n\n return\n }\n\n const uid = getUidEvent(originalHandler, originalTypeEvent.replace(namespaceRegex, ''))\n const fn = delegation ?\n bootstrapDelegationHandler(element, handler, delegationFn) :\n bootstrapHandler(element, handler)\n\n fn.delegationSelector = delegation ? handler : null\n fn.originalHandler = originalHandler\n fn.oneOff = oneOff\n fn.uidEvent = uid\n handlers[uid] = fn\n\n element.addEventListener(typeEvent, fn, delegation)\n}\n\nfunction removeHandler(element, events, typeEvent, handler, delegationSelector) {\n const fn = findHandler(events[typeEvent], handler, delegationSelector)\n\n if (!fn) {\n return\n }\n\n element.removeEventListener(typeEvent, fn, Boolean(delegationSelector))\n delete events[typeEvent][fn.uidEvent]\n}\n\nfunction removeNamespacedHandlers(element, events, typeEvent, namespace) {\n const storeElementEvent = events[typeEvent] || {}\n\n Object.keys(storeElementEvent).forEach(handlerKey => {\n if (handlerKey.includes(namespace)) {\n const event = storeElementEvent[handlerKey]\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n })\n}\n\nfunction getTypeEvent(event) {\n // allow to get the native events from namespaced events ('click.bs.button' --> 'click')\n event = event.replace(stripNameRegex, '')\n return customEvents[event] || event\n}\n\nconst EventHandler = {\n on(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, false)\n },\n\n one(element, event, handler, delegationFn) {\n addHandler(element, event, handler, delegationFn, true)\n },\n\n off(element, originalTypeEvent, handler, delegationFn) {\n if (typeof originalTypeEvent !== 'string' || !element) {\n return\n }\n\n const [delegation, originalHandler, typeEvent] = normalizeParams(originalTypeEvent, handler, delegationFn)\n const inNamespace = typeEvent !== originalTypeEvent\n const events = getEvent(element)\n const isNamespace = originalTypeEvent.startsWith('.')\n\n if (typeof originalHandler !== 'undefined') {\n // Simplest case: handler is passed, remove that listener ONLY.\n if (!events || !events[typeEvent]) {\n return\n }\n\n removeHandler(element, events, typeEvent, originalHandler, delegation ? handler : null)\n return\n }\n\n if (isNamespace) {\n Object.keys(events).forEach(elementEvent => {\n removeNamespacedHandlers(element, events, elementEvent, originalTypeEvent.slice(1))\n })\n }\n\n const storeElementEvent = events[typeEvent] || {}\n Object.keys(storeElementEvent).forEach(keyHandlers => {\n const handlerKey = keyHandlers.replace(stripUidRegex, '')\n\n if (!inNamespace || originalTypeEvent.includes(handlerKey)) {\n const event = storeElementEvent[keyHandlers]\n\n removeHandler(element, events, typeEvent, event.originalHandler, event.delegationSelector)\n }\n })\n },\n\n trigger(element, event, args) {\n if (typeof event !== 'string' || !element) {\n return null\n }\n\n const $ = getjQuery()\n const typeEvent = getTypeEvent(event)\n const inNamespace = event !== typeEvent\n const isNative = nativeEvents.has(typeEvent)\n\n let jQueryEvent\n let bubbles = true\n let nativeDispatch = true\n let defaultPrevented = false\n let evt = null\n\n if (inNamespace && $) {\n jQueryEvent = $.Event(event, args)\n\n $(element).trigger(jQueryEvent)\n bubbles = !jQueryEvent.isPropagationStopped()\n nativeDispatch = !jQueryEvent.isImmediatePropagationStopped()\n defaultPrevented = jQueryEvent.isDefaultPrevented()\n }\n\n if (isNative) {\n evt = document.createEvent('HTMLEvents')\n evt.initEvent(typeEvent, bubbles, true)\n } else {\n evt = new CustomEvent(event, {\n bubbles,\n cancelable: true\n })\n }\n\n // merge custom information in our event\n if (typeof args !== 'undefined') {\n Object.keys(args).forEach(key => {\n Object.defineProperty(evt, key, {\n get() {\n return args[key]\n }\n })\n })\n }\n\n if (defaultPrevented) {\n evt.preventDefault()\n }\n\n if (nativeDispatch) {\n element.dispatchEvent(evt)\n }\n\n if (evt.defaultPrevented && typeof jQueryEvent !== 'undefined') {\n jQueryEvent.preventDefault()\n }\n\n return evt\n }\n}\n\nexport default EventHandler\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): dom/data.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst elementMap = new Map()\n\nexport default {\n set(element, key, instance) {\n if (!elementMap.has(element)) {\n elementMap.set(element, new Map())\n }\n\n const instanceMap = elementMap.get(element)\n\n // make it clear we only want one instance per element\n // can be removed later when multiple key/instances are fine to be used\n if (!instanceMap.has(key) && instanceMap.size !== 0) {\n // eslint-disable-next-line no-console\n console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(instanceMap.keys())[0]}.`)\n return\n }\n\n instanceMap.set(key, instance)\n },\n\n get(element, key) {\n if (elementMap.has(element)) {\n return elementMap.get(element).get(key) || null\n }\n\n return null\n },\n\n remove(element, key) {\n if (!elementMap.has(element)) {\n return\n }\n\n const instanceMap = elementMap.get(element)\n\n instanceMap.delete(key)\n\n // free up element references if there are no instances left for an element\n if (instanceMap.size === 0) {\n elementMap.delete(element)\n }\n }\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): base-component.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport Data from './dom/data'\nimport {\n executeAfterTransition,\n getElement\n} from './util/index'\nimport EventHandler from './dom/event-handler'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst VERSION = '5.0.2'\n\nclass BaseComponent {\n constructor(element) {\n element = getElement(element)\n\n if (!element) {\n return\n }\n\n this._element = element\n Data.set(this._element, this.constructor.DATA_KEY, this)\n }\n\n dispose() {\n Data.remove(this._element, this.constructor.DATA_KEY)\n EventHandler.off(this._element, this.constructor.EVENT_KEY)\n\n Object.getOwnPropertyNames(this).forEach(propertyName => {\n this[propertyName] = null\n })\n }\n\n _queueCallback(callback, element, isAnimated = true) {\n executeAfterTransition(callback, element, isAnimated)\n }\n\n /** Static */\n\n static getInstance(element) {\n return Data.get(element, this.DATA_KEY)\n }\n\n static getOrCreateInstance(element, config = {}) {\n return this.getInstance(element) || new this(element, typeof config === 'object' ? config : null)\n }\n\n static get VERSION() {\n return VERSION\n }\n\n static get NAME() {\n throw new Error('You have to implement the static method \"NAME\", for each component!')\n }\n\n static get DATA_KEY() {\n return `bs.${this.NAME}`\n }\n\n static get EVENT_KEY() {\n return `.${this.DATA_KEY}`\n }\n}\n\nexport default BaseComponent\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): alert.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'alert'\nconst DATA_KEY = 'bs.alert'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst SELECTOR_DISMISS = '[data-bs-dismiss=\"alert\"]'\n\nconst EVENT_CLOSE = `close${EVENT_KEY}`\nconst EVENT_CLOSED = `closed${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_ALERT = 'alert'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Alert extends BaseComponent {\n // Getters\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n close(element) {\n const rootElement = element ? this._getRootElement(element) : this._element\n const customEvent = this._triggerCloseEvent(rootElement)\n\n if (customEvent === null || customEvent.defaultPrevented) {\n return\n }\n\n this._removeElement(rootElement)\n }\n\n // Private\n\n _getRootElement(element) {\n return getElementFromSelector(element) || element.closest(`.${CLASS_NAME_ALERT}`)\n }\n\n _triggerCloseEvent(element) {\n return EventHandler.trigger(element, EVENT_CLOSE)\n }\n\n _removeElement(element) {\n element.classList.remove(CLASS_NAME_SHOW)\n\n const isAnimated = element.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(() => this._destroyElement(element), element, isAnimated)\n }\n\n _destroyElement(element) {\n element.remove()\n\n EventHandler.trigger(element, EVENT_CLOSED)\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Alert.getOrCreateInstance(this)\n\n if (config === 'close') {\n data[config](this)\n }\n })\n }\n\n static handleDismiss(alertInstance) {\n return function (event) {\n if (event) {\n event.preventDefault()\n }\n\n alertInstance.close(this)\n }\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DISMISS, Alert.handleDismiss(new Alert()))\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Alert to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Alert)\n\nexport default Alert\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): button.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'button'\nconst DATA_KEY = 'bs.button'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"button\"]'\n\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Button extends BaseComponent {\n // Getters\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n toggle() {\n // Toggle class and sync the `aria-pressed` attribute with the return value of the `.toggle()` method\n this._element.setAttribute('aria-pressed', this._element.classList.toggle(CLASS_NAME_ACTIVE))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Button.getOrCreateInstance(this)\n\n if (config === 'toggle') {\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, event => {\n event.preventDefault()\n\n const button = event.target.closest(SELECTOR_DATA_TOGGLE)\n const data = Button.getOrCreateInstance(button)\n\n data.toggle()\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Button to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Button)\n\nexport default Button\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): dom/manipulator.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nfunction normalizeData(val) {\n if (val === 'true') {\n return true\n }\n\n if (val === 'false') {\n return false\n }\n\n if (val === Number(val).toString()) {\n return Number(val)\n }\n\n if (val === '' || val === 'null') {\n return null\n }\n\n return val\n}\n\nfunction normalizeDataKey(key) {\n return key.replace(/[A-Z]/g, chr => `-${chr.toLowerCase()}`)\n}\n\nconst Manipulator = {\n setDataAttribute(element, key, value) {\n element.setAttribute(`data-bs-${normalizeDataKey(key)}`, value)\n },\n\n removeDataAttribute(element, key) {\n element.removeAttribute(`data-bs-${normalizeDataKey(key)}`)\n },\n\n getDataAttributes(element) {\n if (!element) {\n return {}\n }\n\n const attributes = {}\n\n Object.keys(element.dataset)\n .filter(key => key.startsWith('bs'))\n .forEach(key => {\n let pureKey = key.replace(/^bs/, '')\n pureKey = pureKey.charAt(0).toLowerCase() + pureKey.slice(1, pureKey.length)\n attributes[pureKey] = normalizeData(element.dataset[key])\n })\n\n return attributes\n },\n\n getDataAttribute(element, key) {\n return normalizeData(element.getAttribute(`data-bs-${normalizeDataKey(key)}`))\n },\n\n offset(element) {\n const rect = element.getBoundingClientRect()\n\n return {\n top: rect.top + document.body.scrollTop,\n left: rect.left + document.body.scrollLeft\n }\n },\n\n position(element) {\n return {\n top: element.offsetTop,\n left: element.offsetLeft\n }\n }\n}\n\nexport default Manipulator\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): carousel.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n isRTL,\n isVisible,\n getNextActiveElement,\n reflow,\n triggerTransitionEnd,\n typeCheckConfig\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'carousel'\nconst DATA_KEY = 'bs.carousel'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ARROW_LEFT_KEY = 'ArrowLeft'\nconst ARROW_RIGHT_KEY = 'ArrowRight'\nconst TOUCHEVENT_COMPAT_WAIT = 500 // Time for mouse compat events to fire after touch\nconst SWIPE_THRESHOLD = 40\n\nconst Default = {\n interval: 5000,\n keyboard: true,\n slide: false,\n pause: 'hover',\n wrap: true,\n touch: true\n}\n\nconst DefaultType = {\n interval: '(number|boolean)',\n keyboard: 'boolean',\n slide: '(boolean|string)',\n pause: '(string|boolean)',\n wrap: 'boolean',\n touch: 'boolean'\n}\n\nconst ORDER_NEXT = 'next'\nconst ORDER_PREV = 'prev'\nconst DIRECTION_LEFT = 'left'\nconst DIRECTION_RIGHT = 'right'\n\nconst KEY_TO_DIRECTION = {\n [ARROW_LEFT_KEY]: DIRECTION_RIGHT,\n [ARROW_RIGHT_KEY]: DIRECTION_LEFT\n}\n\nconst EVENT_SLIDE = `slide${EVENT_KEY}`\nconst EVENT_SLID = `slid${EVENT_KEY}`\nconst EVENT_KEYDOWN = `keydown${EVENT_KEY}`\nconst EVENT_MOUSEENTER = `mouseenter${EVENT_KEY}`\nconst EVENT_MOUSELEAVE = `mouseleave${EVENT_KEY}`\nconst EVENT_TOUCHSTART = `touchstart${EVENT_KEY}`\nconst EVENT_TOUCHMOVE = `touchmove${EVENT_KEY}`\nconst EVENT_TOUCHEND = `touchend${EVENT_KEY}`\nconst EVENT_POINTERDOWN = `pointerdown${EVENT_KEY}`\nconst EVENT_POINTERUP = `pointerup${EVENT_KEY}`\nconst EVENT_DRAG_START = `dragstart${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_CAROUSEL = 'carousel'\nconst CLASS_NAME_ACTIVE = 'active'\nconst CLASS_NAME_SLIDE = 'slide'\nconst CLASS_NAME_END = 'carousel-item-end'\nconst CLASS_NAME_START = 'carousel-item-start'\nconst CLASS_NAME_NEXT = 'carousel-item-next'\nconst CLASS_NAME_PREV = 'carousel-item-prev'\nconst CLASS_NAME_POINTER_EVENT = 'pointer-event'\n\nconst SELECTOR_ACTIVE = '.active'\nconst SELECTOR_ACTIVE_ITEM = '.active.carousel-item'\nconst SELECTOR_ITEM = '.carousel-item'\nconst SELECTOR_ITEM_IMG = '.carousel-item img'\nconst SELECTOR_NEXT_PREV = '.carousel-item-next, .carousel-item-prev'\nconst SELECTOR_INDICATORS = '.carousel-indicators'\nconst SELECTOR_INDICATOR = '[data-bs-target]'\nconst SELECTOR_DATA_SLIDE = '[data-bs-slide], [data-bs-slide-to]'\nconst SELECTOR_DATA_RIDE = '[data-bs-ride=\"carousel\"]'\n\nconst POINTER_TYPE_TOUCH = 'touch'\nconst POINTER_TYPE_PEN = 'pen'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\nclass Carousel extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._items = null\n this._interval = null\n this._activeElement = null\n this._isPaused = false\n this._isSliding = false\n this.touchTimeout = null\n this.touchStartX = 0\n this.touchDeltaX = 0\n\n this._config = this._getConfig(config)\n this._indicatorsElement = SelectorEngine.findOne(SELECTOR_INDICATORS, this._element)\n this._touchSupported = 'ontouchstart' in document.documentElement || navigator.maxTouchPoints > 0\n this._pointerEvent = Boolean(window.PointerEvent)\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n next() {\n this._slide(ORDER_NEXT)\n }\n\n nextWhenVisible() {\n // Don't call next when the page isn't visible\n // or the carousel or its parent isn't visible\n if (!document.hidden && isVisible(this._element)) {\n this.next()\n }\n }\n\n prev() {\n this._slide(ORDER_PREV)\n }\n\n pause(event) {\n if (!event) {\n this._isPaused = true\n }\n\n if (SelectorEngine.findOne(SELECTOR_NEXT_PREV, this._element)) {\n triggerTransitionEnd(this._element)\n this.cycle(true)\n }\n\n clearInterval(this._interval)\n this._interval = null\n }\n\n cycle(event) {\n if (!event) {\n this._isPaused = false\n }\n\n if (this._interval) {\n clearInterval(this._interval)\n this._interval = null\n }\n\n if (this._config && this._config.interval && !this._isPaused) {\n this._updateInterval()\n\n this._interval = setInterval(\n (document.visibilityState ? this.nextWhenVisible : this.next).bind(this),\n this._config.interval\n )\n }\n }\n\n to(index) {\n this._activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n const activeIndex = this._getItemIndex(this._activeElement)\n\n if (index > this._items.length - 1 || index < 0) {\n return\n }\n\n if (this._isSliding) {\n EventHandler.one(this._element, EVENT_SLID, () => this.to(index))\n return\n }\n\n if (activeIndex === index) {\n this.pause()\n this.cycle()\n return\n }\n\n const order = index > activeIndex ?\n ORDER_NEXT :\n ORDER_PREV\n\n this._slide(order, this._items[index])\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _handleSwipe() {\n const absDeltax = Math.abs(this.touchDeltaX)\n\n if (absDeltax <= SWIPE_THRESHOLD) {\n return\n }\n\n const direction = absDeltax / this.touchDeltaX\n\n this.touchDeltaX = 0\n\n if (!direction) {\n return\n }\n\n this._slide(direction > 0 ? DIRECTION_RIGHT : DIRECTION_LEFT)\n }\n\n _addEventListeners() {\n if (this._config.keyboard) {\n EventHandler.on(this._element, EVENT_KEYDOWN, event => this._keydown(event))\n }\n\n if (this._config.pause === 'hover') {\n EventHandler.on(this._element, EVENT_MOUSEENTER, event => this.pause(event))\n EventHandler.on(this._element, EVENT_MOUSELEAVE, event => this.cycle(event))\n }\n\n if (this._config.touch && this._touchSupported) {\n this._addTouchEventListeners()\n }\n }\n\n _addTouchEventListeners() {\n const start = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchStartX = event.clientX\n } else if (!this._pointerEvent) {\n this.touchStartX = event.touches[0].clientX\n }\n }\n\n const move = event => {\n // ensure swiping with one touch and not pinching\n this.touchDeltaX = event.touches && event.touches.length > 1 ?\n 0 :\n event.touches[0].clientX - this.touchStartX\n }\n\n const end = event => {\n if (this._pointerEvent && (event.pointerType === POINTER_TYPE_PEN || event.pointerType === POINTER_TYPE_TOUCH)) {\n this.touchDeltaX = event.clientX - this.touchStartX\n }\n\n this._handleSwipe()\n if (this._config.pause === 'hover') {\n // If it's a touch-enabled device, mouseenter/leave are fired as\n // part of the mouse compatibility events on first tap - the carousel\n // would stop cycling until user tapped out of it;\n // here, we listen for touchend, explicitly pause the carousel\n // (as if it's the second time we tap on it, mouseenter compat event\n // is NOT fired) and after a timeout (to allow for mouse compatibility\n // events to fire) we explicitly restart cycling\n\n this.pause()\n if (this.touchTimeout) {\n clearTimeout(this.touchTimeout)\n }\n\n this.touchTimeout = setTimeout(event => this.cycle(event), TOUCHEVENT_COMPAT_WAIT + this._config.interval)\n }\n }\n\n SelectorEngine.find(SELECTOR_ITEM_IMG, this._element).forEach(itemImg => {\n EventHandler.on(itemImg, EVENT_DRAG_START, e => e.preventDefault())\n })\n\n if (this._pointerEvent) {\n EventHandler.on(this._element, EVENT_POINTERDOWN, event => start(event))\n EventHandler.on(this._element, EVENT_POINTERUP, event => end(event))\n\n this._element.classList.add(CLASS_NAME_POINTER_EVENT)\n } else {\n EventHandler.on(this._element, EVENT_TOUCHSTART, event => start(event))\n EventHandler.on(this._element, EVENT_TOUCHMOVE, event => move(event))\n EventHandler.on(this._element, EVENT_TOUCHEND, event => end(event))\n }\n }\n\n _keydown(event) {\n if (/input|textarea/i.test(event.target.tagName)) {\n return\n }\n\n const direction = KEY_TO_DIRECTION[event.key]\n if (direction) {\n event.preventDefault()\n this._slide(direction)\n }\n }\n\n _getItemIndex(element) {\n this._items = element && element.parentNode ?\n SelectorEngine.find(SELECTOR_ITEM, element.parentNode) :\n []\n\n return this._items.indexOf(element)\n }\n\n _getItemByOrder(order, activeElement) {\n const isNext = order === ORDER_NEXT\n return getNextActiveElement(this._items, activeElement, isNext, this._config.wrap)\n }\n\n _triggerSlideEvent(relatedTarget, eventDirectionName) {\n const targetIndex = this._getItemIndex(relatedTarget)\n const fromIndex = this._getItemIndex(SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element))\n\n return EventHandler.trigger(this._element, EVENT_SLIDE, {\n relatedTarget,\n direction: eventDirectionName,\n from: fromIndex,\n to: targetIndex\n })\n }\n\n _setActiveIndicatorElement(element) {\n if (this._indicatorsElement) {\n const activeIndicator = SelectorEngine.findOne(SELECTOR_ACTIVE, this._indicatorsElement)\n\n activeIndicator.classList.remove(CLASS_NAME_ACTIVE)\n activeIndicator.removeAttribute('aria-current')\n\n const indicators = SelectorEngine.find(SELECTOR_INDICATOR, this._indicatorsElement)\n\n for (let i = 0; i < indicators.length; i++) {\n if (Number.parseInt(indicators[i].getAttribute('data-bs-slide-to'), 10) === this._getItemIndex(element)) {\n indicators[i].classList.add(CLASS_NAME_ACTIVE)\n indicators[i].setAttribute('aria-current', 'true')\n break\n }\n }\n }\n }\n\n _updateInterval() {\n const element = this._activeElement || SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n\n if (!element) {\n return\n }\n\n const elementInterval = Number.parseInt(element.getAttribute('data-bs-interval'), 10)\n\n if (elementInterval) {\n this._config.defaultInterval = this._config.defaultInterval || this._config.interval\n this._config.interval = elementInterval\n } else {\n this._config.interval = this._config.defaultInterval || this._config.interval\n }\n }\n\n _slide(directionOrOrder, element) {\n const order = this._directionToOrder(directionOrOrder)\n const activeElement = SelectorEngine.findOne(SELECTOR_ACTIVE_ITEM, this._element)\n const activeElementIndex = this._getItemIndex(activeElement)\n const nextElement = element || this._getItemByOrder(order, activeElement)\n\n const nextElementIndex = this._getItemIndex(nextElement)\n const isCycling = Boolean(this._interval)\n\n const isNext = order === ORDER_NEXT\n const directionalClassName = isNext ? CLASS_NAME_START : CLASS_NAME_END\n const orderClassName = isNext ? CLASS_NAME_NEXT : CLASS_NAME_PREV\n const eventDirectionName = this._orderToDirection(order)\n\n if (nextElement && nextElement.classList.contains(CLASS_NAME_ACTIVE)) {\n this._isSliding = false\n return\n }\n\n if (this._isSliding) {\n return\n }\n\n const slideEvent = this._triggerSlideEvent(nextElement, eventDirectionName)\n if (slideEvent.defaultPrevented) {\n return\n }\n\n if (!activeElement || !nextElement) {\n // Some weirdness is happening, so we bail\n return\n }\n\n this._isSliding = true\n\n if (isCycling) {\n this.pause()\n }\n\n this._setActiveIndicatorElement(nextElement)\n this._activeElement = nextElement\n\n const triggerSlidEvent = () => {\n EventHandler.trigger(this._element, EVENT_SLID, {\n relatedTarget: nextElement,\n direction: eventDirectionName,\n from: activeElementIndex,\n to: nextElementIndex\n })\n }\n\n if (this._element.classList.contains(CLASS_NAME_SLIDE)) {\n nextElement.classList.add(orderClassName)\n\n reflow(nextElement)\n\n activeElement.classList.add(directionalClassName)\n nextElement.classList.add(directionalClassName)\n\n const completeCallBack = () => {\n nextElement.classList.remove(directionalClassName, orderClassName)\n nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n activeElement.classList.remove(CLASS_NAME_ACTIVE, orderClassName, directionalClassName)\n\n this._isSliding = false\n\n setTimeout(triggerSlidEvent, 0)\n }\n\n this._queueCallback(completeCallBack, activeElement, true)\n } else {\n activeElement.classList.remove(CLASS_NAME_ACTIVE)\n nextElement.classList.add(CLASS_NAME_ACTIVE)\n\n this._isSliding = false\n triggerSlidEvent()\n }\n\n if (isCycling) {\n this.cycle()\n }\n }\n\n _directionToOrder(direction) {\n if (![DIRECTION_RIGHT, DIRECTION_LEFT].includes(direction)) {\n return direction\n }\n\n if (isRTL()) {\n return direction === DIRECTION_LEFT ? ORDER_PREV : ORDER_NEXT\n }\n\n return direction === DIRECTION_LEFT ? ORDER_NEXT : ORDER_PREV\n }\n\n _orderToDirection(order) {\n if (![ORDER_NEXT, ORDER_PREV].includes(order)) {\n return order\n }\n\n if (isRTL()) {\n return order === ORDER_PREV ? DIRECTION_LEFT : DIRECTION_RIGHT\n }\n\n return order === ORDER_PREV ? DIRECTION_RIGHT : DIRECTION_LEFT\n }\n\n // Static\n\n static carouselInterface(element, config) {\n const data = Carousel.getOrCreateInstance(element, config)\n\n let { _config } = data\n if (typeof config === 'object') {\n _config = {\n ..._config,\n ...config\n }\n }\n\n const action = typeof config === 'string' ? config : _config.slide\n\n if (typeof config === 'number') {\n data.to(config)\n } else if (typeof action === 'string') {\n if (typeof data[action] === 'undefined') {\n throw new TypeError(`No method named \"${action}\"`)\n }\n\n data[action]()\n } else if (_config.interval && _config.ride) {\n data.pause()\n data.cycle()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Carousel.carouselInterface(this, config)\n })\n }\n\n static dataApiClickHandler(event) {\n const target = getElementFromSelector(this)\n\n if (!target || !target.classList.contains(CLASS_NAME_CAROUSEL)) {\n return\n }\n\n const config = {\n ...Manipulator.getDataAttributes(target),\n ...Manipulator.getDataAttributes(this)\n }\n const slideIndex = this.getAttribute('data-bs-slide-to')\n\n if (slideIndex) {\n config.interval = false\n }\n\n Carousel.carouselInterface(target, config)\n\n if (slideIndex) {\n Carousel.getInstance(target).to(slideIndex)\n }\n\n event.preventDefault()\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_SLIDE, Carousel.dataApiClickHandler)\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () => {\n const carousels = SelectorEngine.find(SELECTOR_DATA_RIDE)\n\n for (let i = 0, len = carousels.length; i < len; i++) {\n Carousel.carouselInterface(carousels[i], Carousel.getInstance(carousels[i]))\n }\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Carousel to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Carousel)\n\nexport default Carousel\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): collapse.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElement,\n getSelectorFromElement,\n getElementFromSelector,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'collapse'\nconst DATA_KEY = 'bs.collapse'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst Default = {\n toggle: true,\n parent: ''\n}\n\nconst DefaultType = {\n toggle: 'boolean',\n parent: '(string|element)'\n}\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_COLLAPSE = 'collapse'\nconst CLASS_NAME_COLLAPSING = 'collapsing'\nconst CLASS_NAME_COLLAPSED = 'collapsed'\n\nconst WIDTH = 'width'\nconst HEIGHT = 'height'\n\nconst SELECTOR_ACTIVES = '.show, .collapsing'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"collapse\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Collapse extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._isTransitioning = false\n this._config = this._getConfig(config)\n this._triggerArray = SelectorEngine.find(\n `${SELECTOR_DATA_TOGGLE}[href=\"#${this._element.id}\"],` +\n `${SELECTOR_DATA_TOGGLE}[data-bs-target=\"#${this._element.id}\"]`\n )\n\n const toggleList = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (let i = 0, len = toggleList.length; i < len; i++) {\n const elem = toggleList[i]\n const selector = getSelectorFromElement(elem)\n const filterElement = SelectorEngine.find(selector)\n .filter(foundElem => foundElem === this._element)\n\n if (selector !== null && filterElement.length) {\n this._selector = selector\n this._triggerArray.push(elem)\n }\n }\n\n this._parent = this._config.parent ? this._getParent() : null\n\n if (!this._config.parent) {\n this._addAriaAndCollapsedClass(this._element, this._triggerArray)\n }\n\n if (this._config.toggle) {\n this.toggle()\n }\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n toggle() {\n if (this._element.classList.contains(CLASS_NAME_SHOW)) {\n this.hide()\n } else {\n this.show()\n }\n }\n\n show() {\n if (this._isTransitioning || this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n let actives\n let activesData\n\n if (this._parent) {\n actives = SelectorEngine.find(SELECTOR_ACTIVES, this._parent)\n .filter(elem => {\n if (typeof this._config.parent === 'string') {\n return elem.getAttribute('data-bs-parent') === this._config.parent\n }\n\n return elem.classList.contains(CLASS_NAME_COLLAPSE)\n })\n\n if (actives.length === 0) {\n actives = null\n }\n }\n\n const container = SelectorEngine.findOne(this._selector)\n if (actives) {\n const tempActiveData = actives.find(elem => container !== elem)\n activesData = tempActiveData ? Collapse.getInstance(tempActiveData) : null\n\n if (activesData && activesData._isTransitioning) {\n return\n }\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_SHOW)\n if (startEvent.defaultPrevented) {\n return\n }\n\n if (actives) {\n actives.forEach(elemActive => {\n if (container !== elemActive) {\n Collapse.collapseInterface(elemActive, 'hide')\n }\n\n if (!activesData) {\n Data.set(elemActive, DATA_KEY, null)\n }\n })\n }\n\n const dimension = this._getDimension()\n\n this._element.classList.remove(CLASS_NAME_COLLAPSE)\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n\n this._element.style[dimension] = 0\n\n if (this._triggerArray.length) {\n this._triggerArray.forEach(element => {\n element.classList.remove(CLASS_NAME_COLLAPSED)\n element.setAttribute('aria-expanded', true)\n })\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n this._element.style[dimension] = ''\n\n this.setTransitioning(false)\n\n EventHandler.trigger(this._element, EVENT_SHOWN)\n }\n\n const capitalizedDimension = dimension[0].toUpperCase() + dimension.slice(1)\n const scrollSize = `scroll${capitalizedDimension}`\n\n this._queueCallback(complete, this._element, true)\n this._element.style[dimension] = `${this._element[scrollSize]}px`\n }\n\n hide() {\n if (this._isTransitioning || !this._element.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const startEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n if (startEvent.defaultPrevented) {\n return\n }\n\n const dimension = this._getDimension()\n\n this._element.style[dimension] = `${this._element.getBoundingClientRect()[dimension]}px`\n\n reflow(this._element)\n\n this._element.classList.add(CLASS_NAME_COLLAPSING)\n this._element.classList.remove(CLASS_NAME_COLLAPSE, CLASS_NAME_SHOW)\n\n const triggerArrayLength = this._triggerArray.length\n if (triggerArrayLength > 0) {\n for (let i = 0; i < triggerArrayLength; i++) {\n const trigger = this._triggerArray[i]\n const elem = getElementFromSelector(trigger)\n\n if (elem && !elem.classList.contains(CLASS_NAME_SHOW)) {\n trigger.classList.add(CLASS_NAME_COLLAPSED)\n trigger.setAttribute('aria-expanded', false)\n }\n }\n }\n\n this.setTransitioning(true)\n\n const complete = () => {\n this.setTransitioning(false)\n this._element.classList.remove(CLASS_NAME_COLLAPSING)\n this._element.classList.add(CLASS_NAME_COLLAPSE)\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._element.style[dimension] = ''\n\n this._queueCallback(complete, this._element, true)\n }\n\n setTransitioning(isTransitioning) {\n this._isTransitioning = isTransitioning\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...config\n }\n config.toggle = Boolean(config.toggle) // Coerce string values\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _getDimension() {\n return this._element.classList.contains(WIDTH) ? WIDTH : HEIGHT\n }\n\n _getParent() {\n let { parent } = this._config\n\n parent = getElement(parent)\n\n const selector = `${SELECTOR_DATA_TOGGLE}[data-bs-parent=\"${parent}\"]`\n\n SelectorEngine.find(selector, parent)\n .forEach(element => {\n const selected = getElementFromSelector(element)\n\n this._addAriaAndCollapsedClass(\n selected,\n [element]\n )\n })\n\n return parent\n }\n\n _addAriaAndCollapsedClass(element, triggerArray) {\n if (!element || !triggerArray.length) {\n return\n }\n\n const isOpen = element.classList.contains(CLASS_NAME_SHOW)\n\n triggerArray.forEach(elem => {\n if (isOpen) {\n elem.classList.remove(CLASS_NAME_COLLAPSED)\n } else {\n elem.classList.add(CLASS_NAME_COLLAPSED)\n }\n\n elem.setAttribute('aria-expanded', isOpen)\n })\n }\n\n // Static\n\n static collapseInterface(element, config) {\n let data = Collapse.getInstance(element)\n const _config = {\n ...Default,\n ...Manipulator.getDataAttributes(element),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (!data && _config.toggle && typeof config === 'string' && /show|hide/.test(config)) {\n _config.toggle = false\n }\n\n if (!data) {\n data = new Collapse(element, _config)\n }\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Collapse.collapseInterface(this, config)\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n // preventDefault only for elements (which change the URL) not inside the collapsible element\n if (event.target.tagName === 'A' || (event.delegateTarget && event.delegateTarget.tagName === 'A')) {\n event.preventDefault()\n }\n\n const triggerData = Manipulator.getDataAttributes(this)\n const selector = getSelectorFromElement(this)\n const selectorElements = SelectorEngine.find(selector)\n\n selectorElements.forEach(element => {\n const data = Collapse.getInstance(element)\n let config\n if (data) {\n // update parent attribute\n if (data._parent === null && typeof triggerData.parent === 'string') {\n data._config.parent = triggerData.parent\n data._parent = data._getParent()\n }\n\n config = 'toggle'\n } else {\n config = triggerData\n }\n\n Collapse.collapseInterface(element, config)\n })\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Collapse to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Collapse)\n\nexport default Collapse\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): dropdown.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\n\nimport {\n defineJQueryPlugin,\n getElement,\n getElementFromSelector,\n isDisabled,\n isElement,\n isVisible,\n isRTL,\n noop,\n getNextActiveElement,\n typeCheckConfig\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'dropdown'\nconst DATA_KEY = 'bs.dropdown'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst ESCAPE_KEY = 'Escape'\nconst SPACE_KEY = 'Space'\nconst TAB_KEY = 'Tab'\nconst ARROW_UP_KEY = 'ArrowUp'\nconst ARROW_DOWN_KEY = 'ArrowDown'\nconst RIGHT_MOUSE_BUTTON = 2 // MouseEvent.button value for the secondary button, usually the right button\n\nconst REGEXP_KEYDOWN = new RegExp(`${ARROW_UP_KEY}|${ARROW_DOWN_KEY}|${ESCAPE_KEY}`)\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_CLICK = `click${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYDOWN_DATA_API = `keydown${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_KEYUP_DATA_API = `keyup${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_DROPUP = 'dropup'\nconst CLASS_NAME_DROPEND = 'dropend'\nconst CLASS_NAME_DROPSTART = 'dropstart'\nconst CLASS_NAME_NAVBAR = 'navbar'\n\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"dropdown\"]'\nconst SELECTOR_MENU = '.dropdown-menu'\nconst SELECTOR_NAVBAR_NAV = '.navbar-nav'\nconst SELECTOR_VISIBLE_ITEMS = '.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)'\n\nconst PLACEMENT_TOP = isRTL() ? 'top-end' : 'top-start'\nconst PLACEMENT_TOPEND = isRTL() ? 'top-start' : 'top-end'\nconst PLACEMENT_BOTTOM = isRTL() ? 'bottom-end' : 'bottom-start'\nconst PLACEMENT_BOTTOMEND = isRTL() ? 'bottom-start' : 'bottom-end'\nconst PLACEMENT_RIGHT = isRTL() ? 'left-start' : 'right-start'\nconst PLACEMENT_LEFT = isRTL() ? 'right-start' : 'left-start'\n\nconst Default = {\n offset: [0, 2],\n boundary: 'clippingParents',\n reference: 'toggle',\n display: 'dynamic',\n popperConfig: null,\n autoClose: true\n}\n\nconst DefaultType = {\n offset: '(array|string|function)',\n boundary: '(string|element)',\n reference: '(string|element|object)',\n display: 'string',\n popperConfig: '(null|object|function)',\n autoClose: '(boolean|string)'\n}\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Dropdown extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._popper = null\n this._config = this._getConfig(config)\n this._menu = this._getMenuElement()\n this._inNavbar = this._detectNavbar()\n\n this._addEventListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n toggle() {\n if (isDisabled(this._element)) {\n return\n }\n\n const isActive = this._element.classList.contains(CLASS_NAME_SHOW)\n\n if (isActive) {\n this.hide()\n return\n }\n\n this.show()\n }\n\n show() {\n if (isDisabled(this._element) || this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const parent = Dropdown.getParentFromElement(this._element)\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, relatedTarget)\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n // Totally disable Popper for Dropdowns in Navbar\n if (this._inNavbar) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'none')\n } else {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s dropdowns require Popper (https://popper.js.org)')\n }\n\n let referenceElement = this._element\n\n if (this._config.reference === 'parent') {\n referenceElement = parent\n } else if (isElement(this._config.reference)) {\n referenceElement = getElement(this._config.reference)\n } else if (typeof this._config.reference === 'object') {\n referenceElement = this._config.reference\n }\n\n const popperConfig = this._getPopperConfig()\n const isDisplayStatic = popperConfig.modifiers.find(modifier => modifier.name === 'applyStyles' && modifier.enabled === false)\n\n this._popper = Popper.createPopper(referenceElement, this._menu, popperConfig)\n\n if (isDisplayStatic) {\n Manipulator.setDataAttribute(this._menu, 'popper', 'static')\n }\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement &&\n !parent.closest(SELECTOR_NAVBAR_NAV)) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.on(elem, 'mouseover', noop))\n }\n\n this._element.focus()\n this._element.setAttribute('aria-expanded', true)\n\n this._menu.classList.toggle(CLASS_NAME_SHOW)\n this._element.classList.toggle(CLASS_NAME_SHOW)\n EventHandler.trigger(this._element, EVENT_SHOWN, relatedTarget)\n }\n\n hide() {\n if (isDisabled(this._element) || !this._menu.classList.contains(CLASS_NAME_SHOW)) {\n return\n }\n\n const relatedTarget = {\n relatedTarget: this._element\n }\n\n this._completeHide(relatedTarget)\n }\n\n dispose() {\n if (this._popper) {\n this._popper.destroy()\n }\n\n super.dispose()\n }\n\n update() {\n this._inNavbar = this._detectNavbar()\n if (this._popper) {\n this._popper.update()\n }\n }\n\n // Private\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_CLICK, event => {\n event.preventDefault()\n this.toggle()\n })\n }\n\n _completeHide(relatedTarget) {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE, relatedTarget)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children)\n .forEach(elem => EventHandler.off(elem, 'mouseover', noop))\n }\n\n if (this._popper) {\n this._popper.destroy()\n }\n\n this._menu.classList.remove(CLASS_NAME_SHOW)\n this._element.classList.remove(CLASS_NAME_SHOW)\n this._element.setAttribute('aria-expanded', 'false')\n Manipulator.removeDataAttribute(this._menu, 'popper')\n EventHandler.trigger(this._element, EVENT_HIDDEN, relatedTarget)\n }\n\n _getConfig(config) {\n config = {\n ...this.constructor.Default,\n ...Manipulator.getDataAttributes(this._element),\n ...config\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n if (typeof config.reference === 'object' && !isElement(config.reference) &&\n typeof config.reference.getBoundingClientRect !== 'function'\n ) {\n // Popper virtual elements require a getBoundingClientRect method\n throw new TypeError(`${NAME.toUpperCase()}: Option \"reference\" provided type \"object\" without a required \"getBoundingClientRect\" method.`)\n }\n\n return config\n }\n\n _getMenuElement() {\n return SelectorEngine.next(this._element, SELECTOR_MENU)[0]\n }\n\n _getPlacement() {\n const parentDropdown = this._element.parentNode\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPEND)) {\n return PLACEMENT_RIGHT\n }\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPSTART)) {\n return PLACEMENT_LEFT\n }\n\n // We need to trim the value because custom properties can also include spaces\n const isEnd = getComputedStyle(this._menu).getPropertyValue('--bs-position').trim() === 'end'\n\n if (parentDropdown.classList.contains(CLASS_NAME_DROPUP)) {\n return isEnd ? PLACEMENT_TOPEND : PLACEMENT_TOP\n }\n\n return isEnd ? PLACEMENT_BOTTOMEND : PLACEMENT_BOTTOM\n }\n\n _detectNavbar() {\n return this._element.closest(`.${CLASS_NAME_NAVBAR}`) !== null\n }\n\n _getOffset() {\n const { offset } = this._config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _getPopperConfig() {\n const defaultBsPopperConfig = {\n placement: this._getPlacement(),\n modifiers: [{\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n }]\n }\n\n // Disable Popper if we have a static display\n if (this._config.display === 'static') {\n defaultBsPopperConfig.modifiers = [{\n name: 'applyStyles',\n enabled: false\n }]\n }\n\n return {\n ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n }\n }\n\n _selectMenuItem({ key, target }) {\n const items = SelectorEngine.find(SELECTOR_VISIBLE_ITEMS, this._menu).filter(isVisible)\n\n if (!items.length) {\n return\n }\n\n // if target isn't included in items (e.g. when expanding the dropdown)\n // allow cycling to get the last item in case key equals ARROW_UP_KEY\n getNextActiveElement(items, target, key === ARROW_DOWN_KEY, !items.includes(target)).focus()\n }\n\n // Static\n\n static dropdownInterface(element, config) {\n const data = Dropdown.getOrCreateInstance(element, config)\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n }\n\n static jQueryInterface(config) {\n return this.each(function () {\n Dropdown.dropdownInterface(this, config)\n })\n }\n\n static clearMenus(event) {\n if (event && (event.button === RIGHT_MOUSE_BUTTON || (event.type === 'keyup' && event.key !== TAB_KEY))) {\n return\n }\n\n const toggles = SelectorEngine.find(SELECTOR_DATA_TOGGLE)\n\n for (let i = 0, len = toggles.length; i < len; i++) {\n const context = Dropdown.getInstance(toggles[i])\n if (!context || context._config.autoClose === false) {\n continue\n }\n\n if (!context._element.classList.contains(CLASS_NAME_SHOW)) {\n continue\n }\n\n const relatedTarget = {\n relatedTarget: context._element\n }\n\n if (event) {\n const composedPath = event.composedPath()\n const isMenuTarget = composedPath.includes(context._menu)\n if (\n composedPath.includes(context._element) ||\n (context._config.autoClose === 'inside' && !isMenuTarget) ||\n (context._config.autoClose === 'outside' && isMenuTarget)\n ) {\n continue\n }\n\n // Tab navigation through the dropdown menu or events from contained inputs shouldn't close the menu\n if (context._menu.contains(event.target) && ((event.type === 'keyup' && event.key === TAB_KEY) || /input|select|option|textarea|form/i.test(event.target.tagName))) {\n continue\n }\n\n if (event.type === 'click') {\n relatedTarget.clickEvent = event\n }\n }\n\n context._completeHide(relatedTarget)\n }\n }\n\n static getParentFromElement(element) {\n return getElementFromSelector(element) || element.parentNode\n }\n\n static dataApiKeydownHandler(event) {\n // If not input/textarea:\n // - And not a key in REGEXP_KEYDOWN => not a dropdown command\n // If input/textarea:\n // - If space key => not a dropdown command\n // - If key is other than escape\n // - If key is not up or down => not a dropdown command\n // - If trigger inside the menu => not a dropdown command\n if (/input|textarea/i.test(event.target.tagName) ?\n event.key === SPACE_KEY || (event.key !== ESCAPE_KEY &&\n ((event.key !== ARROW_DOWN_KEY && event.key !== ARROW_UP_KEY) ||\n event.target.closest(SELECTOR_MENU))) :\n !REGEXP_KEYDOWN.test(event.key)) {\n return\n }\n\n const isActive = this.classList.contains(CLASS_NAME_SHOW)\n\n if (!isActive && event.key === ESCAPE_KEY) {\n return\n }\n\n event.preventDefault()\n event.stopPropagation()\n\n if (isDisabled(this)) {\n return\n }\n\n const getToggleButton = () => this.matches(SELECTOR_DATA_TOGGLE) ? this : SelectorEngine.prev(this, SELECTOR_DATA_TOGGLE)[0]\n\n if (event.key === ESCAPE_KEY) {\n getToggleButton().focus()\n Dropdown.clearMenus()\n return\n }\n\n if (event.key === ARROW_UP_KEY || event.key === ARROW_DOWN_KEY) {\n if (!isActive) {\n getToggleButton().click()\n }\n\n Dropdown.getInstance(getToggleButton())._selectMenuItem(event)\n return\n }\n\n if (!isActive || event.key === SPACE_KEY) {\n Dropdown.clearMenus()\n }\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_DATA_TOGGLE, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_KEYDOWN_DATA_API, SELECTOR_MENU, Dropdown.dataApiKeydownHandler)\nEventHandler.on(document, EVENT_CLICK_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_KEYUP_DATA_API, Dropdown.clearMenus)\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n event.preventDefault()\n Dropdown.dropdownInterface(this)\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Dropdown to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Dropdown)\n\nexport default Dropdown\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): util/scrollBar.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport SelectorEngine from '../dom/selector-engine'\nimport Manipulator from '../dom/manipulator'\nimport { isElement } from './index'\n\nconst SELECTOR_FIXED_CONTENT = '.fixed-top, .fixed-bottom, .is-fixed, .sticky-top'\nconst SELECTOR_STICKY_CONTENT = '.sticky-top'\n\nclass ScrollBarHelper {\n constructor() {\n this._element = document.body\n }\n\n getWidth() {\n // https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes\n const documentWidth = document.documentElement.clientWidth\n return Math.abs(window.innerWidth - documentWidth)\n }\n\n hide() {\n const width = this.getWidth()\n this._disableOverFlow()\n // give padding to element to balance the hidden scrollbar width\n this._setElementAttributes(this._element, 'paddingRight', calculatedValue => calculatedValue + width)\n // trick: We adjust positive paddingRight and negative marginRight to sticky-top elements to keep showing fullwidth\n this._setElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight', calculatedValue => calculatedValue + width)\n this._setElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight', calculatedValue => calculatedValue - width)\n }\n\n _disableOverFlow() {\n this._saveInitialAttribute(this._element, 'overflow')\n this._element.style.overflow = 'hidden'\n }\n\n _setElementAttributes(selector, styleProp, callback) {\n const scrollbarWidth = this.getWidth()\n const manipulationCallBack = element => {\n if (element !== this._element && window.innerWidth > element.clientWidth + scrollbarWidth) {\n return\n }\n\n this._saveInitialAttribute(element, styleProp)\n const calculatedValue = window.getComputedStyle(element)[styleProp]\n element.style[styleProp] = `${callback(Number.parseFloat(calculatedValue))}px`\n }\n\n this._applyManipulationCallback(selector, manipulationCallBack)\n }\n\n reset() {\n this._resetElementAttributes(this._element, 'overflow')\n this._resetElementAttributes(this._element, 'paddingRight')\n this._resetElementAttributes(SELECTOR_FIXED_CONTENT, 'paddingRight')\n this._resetElementAttributes(SELECTOR_STICKY_CONTENT, 'marginRight')\n }\n\n _saveInitialAttribute(element, styleProp) {\n const actualValue = element.style[styleProp]\n if (actualValue) {\n Manipulator.setDataAttribute(element, styleProp, actualValue)\n }\n }\n\n _resetElementAttributes(selector, styleProp) {\n const manipulationCallBack = element => {\n const value = Manipulator.getDataAttribute(element, styleProp)\n if (typeof value === 'undefined') {\n element.style.removeProperty(styleProp)\n } else {\n Manipulator.removeDataAttribute(element, styleProp)\n element.style[styleProp] = value\n }\n }\n\n this._applyManipulationCallback(selector, manipulationCallBack)\n }\n\n _applyManipulationCallback(selector, callBack) {\n if (isElement(selector)) {\n callBack(selector)\n } else {\n SelectorEngine.find(selector, this._element).forEach(callBack)\n }\n }\n\n isOverflowing() {\n return this.getWidth() > 0\n }\n}\n\nexport default ScrollBarHelper\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): util/backdrop.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport EventHandler from '../dom/event-handler'\nimport { execute, executeAfterTransition, getElement, reflow, typeCheckConfig } from './index'\n\nconst Default = {\n isVisible: true, // if false, we use the backdrop helper without adding any element to the dom\n isAnimated: false,\n rootElement: 'body', // give the choice to place backdrop under different elements\n clickCallback: null\n}\n\nconst DefaultType = {\n isVisible: 'boolean',\n isAnimated: 'boolean',\n rootElement: '(element|string)',\n clickCallback: '(function|null)'\n}\nconst NAME = 'backdrop'\nconst CLASS_NAME_BACKDROP = 'modal-backdrop'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst EVENT_MOUSEDOWN = `mousedown.bs.${NAME}`\n\nclass Backdrop {\n constructor(config) {\n this._config = this._getConfig(config)\n this._isAppended = false\n this._element = null\n }\n\n show(callback) {\n if (!this._config.isVisible) {\n execute(callback)\n return\n }\n\n this._append()\n\n if (this._config.isAnimated) {\n reflow(this._getElement())\n }\n\n this._getElement().classList.add(CLASS_NAME_SHOW)\n\n this._emulateAnimation(() => {\n execute(callback)\n })\n }\n\n hide(callback) {\n if (!this._config.isVisible) {\n execute(callback)\n return\n }\n\n this._getElement().classList.remove(CLASS_NAME_SHOW)\n\n this._emulateAnimation(() => {\n this.dispose()\n execute(callback)\n })\n }\n\n // Private\n\n _getElement() {\n if (!this._element) {\n const backdrop = document.createElement('div')\n backdrop.className = CLASS_NAME_BACKDROP\n if (this._config.isAnimated) {\n backdrop.classList.add(CLASS_NAME_FADE)\n }\n\n this._element = backdrop\n }\n\n return this._element\n }\n\n _getConfig(config) {\n config = {\n ...Default,\n ...(typeof config === 'object' ? config : {})\n }\n\n // use getElement() with the default \"body\" to get a fresh Element on each instantiation\n config.rootElement = getElement(config.rootElement)\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _append() {\n if (this._isAppended) {\n return\n }\n\n this._config.rootElement.appendChild(this._getElement())\n\n EventHandler.on(this._getElement(), EVENT_MOUSEDOWN, () => {\n execute(this._config.clickCallback)\n })\n\n this._isAppended = true\n }\n\n dispose() {\n if (!this._isAppended) {\n return\n }\n\n EventHandler.off(this._element, EVENT_MOUSEDOWN)\n\n this._element.remove()\n this._isAppended = false\n }\n\n _emulateAnimation(callback) {\n executeAfterTransition(callback, this._getElement(), this._config.isAnimated)\n }\n}\n\nexport default Backdrop\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): modal.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n isRTL,\n isVisible,\n reflow,\n typeCheckConfig\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport ScrollBarHelper from './util/scrollbar'\nimport BaseComponent from './base-component'\nimport Backdrop from './util/backdrop'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'modal'\nconst DATA_KEY = 'bs.modal'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst ESCAPE_KEY = 'Escape'\n\nconst Default = {\n backdrop: true,\n keyboard: true,\n focus: true\n}\n\nconst DefaultType = {\n backdrop: '(boolean|string)',\n keyboard: 'boolean',\n focus: 'boolean'\n}\n\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDE_PREVENTED = `hidePrevented${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_RESIZE = `resize${EVENT_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEUP_DISMISS = `mouseup.dismiss${EVENT_KEY}`\nconst EVENT_MOUSEDOWN_DISMISS = `mousedown.dismiss${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_OPEN = 'modal-open'\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\nconst CLASS_NAME_STATIC = 'modal-static'\n\nconst SELECTOR_DIALOG = '.modal-dialog'\nconst SELECTOR_MODAL_BODY = '.modal-body'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"modal\"]'\nconst SELECTOR_DATA_DISMISS = '[data-bs-dismiss=\"modal\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Modal extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._config = this._getConfig(config)\n this._dialog = SelectorEngine.findOne(SELECTOR_DIALOG, this._element)\n this._backdrop = this._initializeBackDrop()\n this._isShown = false\n this._ignoreBackdropClick = false\n this._isTransitioning = false\n this._scrollBar = new ScrollBarHelper()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isShown || this._isTransitioning) {\n return\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, {\n relatedTarget\n })\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n this._isShown = true\n\n if (this._isAnimated()) {\n this._isTransitioning = true\n }\n\n this._scrollBar.hide()\n\n document.body.classList.add(CLASS_NAME_OPEN)\n\n this._adjustDialog()\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, event => this.hide(event))\n\n EventHandler.on(this._dialog, EVENT_MOUSEDOWN_DISMISS, () => {\n EventHandler.one(this._element, EVENT_MOUSEUP_DISMISS, event => {\n if (event.target === this._element) {\n this._ignoreBackdropClick = true\n }\n })\n })\n\n this._showBackdrop(() => this._showElement(relatedTarget))\n }\n\n hide(event) {\n if (event && ['A', 'AREA'].includes(event.target.tagName)) {\n event.preventDefault()\n }\n\n if (!this._isShown || this._isTransitioning) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n this._isShown = false\n const isAnimated = this._isAnimated()\n\n if (isAnimated) {\n this._isTransitioning = true\n }\n\n this._setEscapeEvent()\n this._setResizeEvent()\n\n EventHandler.off(document, EVENT_FOCUSIN)\n\n this._element.classList.remove(CLASS_NAME_SHOW)\n\n EventHandler.off(this._element, EVENT_CLICK_DISMISS)\n EventHandler.off(this._dialog, EVENT_MOUSEDOWN_DISMISS)\n\n this._queueCallback(() => this._hideModal(), this._element, isAnimated)\n }\n\n dispose() {\n [window, this._dialog]\n .forEach(htmlElement => EventHandler.off(htmlElement, EVENT_KEY))\n\n this._backdrop.dispose()\n super.dispose()\n\n /**\n * `document` has 2 events `EVENT_FOCUSIN` and `EVENT_CLICK_DATA_API`\n * Do not move `document` in `htmlElements` array\n * It will remove `EVENT_CLICK_DATA_API` event that should remain\n */\n EventHandler.off(document, EVENT_FOCUSIN)\n }\n\n handleUpdate() {\n this._adjustDialog()\n }\n\n // Private\n\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: Boolean(this._config.backdrop), // 'static' option will be translated to true, and booleans will keep their value\n isAnimated: this._isAnimated()\n })\n }\n\n _getConfig(config) {\n config = {\n ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _showElement(relatedTarget) {\n const isAnimated = this._isAnimated()\n const modalBody = SelectorEngine.findOne(SELECTOR_MODAL_BODY, this._dialog)\n\n if (!this._element.parentNode || this._element.parentNode.nodeType !== Node.ELEMENT_NODE) {\n // Don't move modal's DOM position\n document.body.appendChild(this._element)\n }\n\n this._element.style.display = 'block'\n this._element.removeAttribute('aria-hidden')\n this._element.setAttribute('aria-modal', true)\n this._element.setAttribute('role', 'dialog')\n this._element.scrollTop = 0\n\n if (modalBody) {\n modalBody.scrollTop = 0\n }\n\n if (isAnimated) {\n reflow(this._element)\n }\n\n this._element.classList.add(CLASS_NAME_SHOW)\n\n if (this._config.focus) {\n this._enforceFocus()\n }\n\n const transitionComplete = () => {\n if (this._config.focus) {\n this._element.focus()\n }\n\n this._isTransitioning = false\n EventHandler.trigger(this._element, EVENT_SHOWN, {\n relatedTarget\n })\n }\n\n this._queueCallback(transitionComplete, this._dialog, isAnimated)\n }\n\n _enforceFocus() {\n EventHandler.off(document, EVENT_FOCUSIN) // guard against infinite focus loop\n EventHandler.on(document, EVENT_FOCUSIN, event => {\n if (document !== event.target &&\n this._element !== event.target &&\n !this._element.contains(event.target)) {\n this._element.focus()\n }\n })\n }\n\n _setEscapeEvent() {\n if (this._isShown) {\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY) {\n event.preventDefault()\n this.hide()\n } else if (!this._config.keyboard && event.key === ESCAPE_KEY) {\n this._triggerBackdropTransition()\n }\n })\n } else {\n EventHandler.off(this._element, EVENT_KEYDOWN_DISMISS)\n }\n }\n\n _setResizeEvent() {\n if (this._isShown) {\n EventHandler.on(window, EVENT_RESIZE, () => this._adjustDialog())\n } else {\n EventHandler.off(window, EVENT_RESIZE)\n }\n }\n\n _hideModal() {\n this._element.style.display = 'none'\n this._element.setAttribute('aria-hidden', true)\n this._element.removeAttribute('aria-modal')\n this._element.removeAttribute('role')\n this._isTransitioning = false\n this._backdrop.hide(() => {\n document.body.classList.remove(CLASS_NAME_OPEN)\n this._resetAdjustments()\n this._scrollBar.reset()\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n })\n }\n\n _showBackdrop(callback) {\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, event => {\n if (this._ignoreBackdropClick) {\n this._ignoreBackdropClick = false\n return\n }\n\n if (event.target !== event.currentTarget) {\n return\n }\n\n if (this._config.backdrop === true) {\n this.hide()\n } else if (this._config.backdrop === 'static') {\n this._triggerBackdropTransition()\n }\n })\n\n this._backdrop.show(callback)\n }\n\n _isAnimated() {\n return this._element.classList.contains(CLASS_NAME_FADE)\n }\n\n _triggerBackdropTransition() {\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE_PREVENTED)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n const { classList, scrollHeight, style } = this._element\n const isModalOverflowing = scrollHeight > document.documentElement.clientHeight\n\n // return if the following background transition hasn't yet completed\n if ((!isModalOverflowing && style.overflowY === 'hidden') || classList.contains(CLASS_NAME_STATIC)) {\n return\n }\n\n if (!isModalOverflowing) {\n style.overflowY = 'hidden'\n }\n\n classList.add(CLASS_NAME_STATIC)\n this._queueCallback(() => {\n classList.remove(CLASS_NAME_STATIC)\n if (!isModalOverflowing) {\n this._queueCallback(() => {\n style.overflowY = ''\n }, this._dialog)\n }\n }, this._dialog)\n\n this._element.focus()\n }\n\n // ----------------------------------------------------------------------\n // the following methods are used to handle overflowing modals\n // ----------------------------------------------------------------------\n\n _adjustDialog() {\n const isModalOverflowing = this._element.scrollHeight > document.documentElement.clientHeight\n const scrollbarWidth = this._scrollBar.getWidth()\n const isBodyOverflowing = scrollbarWidth > 0\n\n if ((!isBodyOverflowing && isModalOverflowing && !isRTL()) || (isBodyOverflowing && !isModalOverflowing && isRTL())) {\n this._element.style.paddingLeft = `${scrollbarWidth}px`\n }\n\n if ((isBodyOverflowing && !isModalOverflowing && !isRTL()) || (!isBodyOverflowing && isModalOverflowing && isRTL())) {\n this._element.style.paddingRight = `${scrollbarWidth}px`\n }\n }\n\n _resetAdjustments() {\n this._element.style.paddingLeft = ''\n this._element.style.paddingRight = ''\n }\n\n // Static\n\n static jQueryInterface(config, relatedTarget) {\n return this.each(function () {\n const data = Modal.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](relatedTarget)\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n const target = getElementFromSelector(this)\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n EventHandler.one(target, EVENT_SHOW, showEvent => {\n if (showEvent.defaultPrevented) {\n // only register focus restorer if modal will actually get shown\n return\n }\n\n EventHandler.one(target, EVENT_HIDDEN, () => {\n if (isVisible(this)) {\n this.focus()\n }\n })\n })\n\n const data = Modal.getOrCreateInstance(target)\n\n data.toggle(this)\n})\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Modal to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Modal)\n\nexport default Modal\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): offcanvas.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getElementFromSelector,\n isDisabled,\n isVisible,\n typeCheckConfig\n} from './util/index'\nimport ScrollBarHelper from './util/scrollbar'\nimport EventHandler from './dom/event-handler'\nimport BaseComponent from './base-component'\nimport SelectorEngine from './dom/selector-engine'\nimport Manipulator from './dom/manipulator'\nimport Backdrop from './util/backdrop'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'offcanvas'\nconst DATA_KEY = 'bs.offcanvas'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\nconst ESCAPE_KEY = 'Escape'\n\nconst Default = {\n backdrop: true,\n keyboard: true,\n scroll: false\n}\n\nconst DefaultType = {\n backdrop: 'boolean',\n keyboard: 'boolean',\n scroll: 'boolean'\n}\n\nconst CLASS_NAME_SHOW = 'show'\nconst OPEN_SELECTOR = '.offcanvas.show'\n\nconst EVENT_SHOW = `show${EVENT_KEY}`\nconst EVENT_SHOWN = `shown${EVENT_KEY}`\nconst EVENT_HIDE = `hide${EVENT_KEY}`\nconst EVENT_HIDDEN = `hidden${EVENT_KEY}`\nconst EVENT_FOCUSIN = `focusin${EVENT_KEY}`\nconst EVENT_CLICK_DATA_API = `click${EVENT_KEY}${DATA_API_KEY}`\nconst EVENT_CLICK_DISMISS = `click.dismiss${EVENT_KEY}`\nconst EVENT_KEYDOWN_DISMISS = `keydown.dismiss${EVENT_KEY}`\n\nconst SELECTOR_DATA_DISMISS = '[data-bs-dismiss=\"offcanvas\"]'\nconst SELECTOR_DATA_TOGGLE = '[data-bs-toggle=\"offcanvas\"]'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Offcanvas extends BaseComponent {\n constructor(element, config) {\n super(element)\n\n this._config = this._getConfig(config)\n this._isShown = false\n this._backdrop = this._initializeBackDrop()\n this._addEventListeners()\n }\n\n // Getters\n\n static get NAME() {\n return NAME\n }\n\n static get Default() {\n return Default\n }\n\n // Public\n\n toggle(relatedTarget) {\n return this._isShown ? this.hide() : this.show(relatedTarget)\n }\n\n show(relatedTarget) {\n if (this._isShown) {\n return\n }\n\n const showEvent = EventHandler.trigger(this._element, EVENT_SHOW, { relatedTarget })\n\n if (showEvent.defaultPrevented) {\n return\n }\n\n this._isShown = true\n this._element.style.visibility = 'visible'\n\n this._backdrop.show()\n\n if (!this._config.scroll) {\n new ScrollBarHelper().hide()\n this._enforceFocusOnElement(this._element)\n }\n\n this._element.removeAttribute('aria-hidden')\n this._element.setAttribute('aria-modal', true)\n this._element.setAttribute('role', 'dialog')\n this._element.classList.add(CLASS_NAME_SHOW)\n\n const completeCallBack = () => {\n EventHandler.trigger(this._element, EVENT_SHOWN, { relatedTarget })\n }\n\n this._queueCallback(completeCallBack, this._element, true)\n }\n\n hide() {\n if (!this._isShown) {\n return\n }\n\n const hideEvent = EventHandler.trigger(this._element, EVENT_HIDE)\n\n if (hideEvent.defaultPrevented) {\n return\n }\n\n EventHandler.off(document, EVENT_FOCUSIN)\n this._element.blur()\n this._isShown = false\n this._element.classList.remove(CLASS_NAME_SHOW)\n this._backdrop.hide()\n\n const completeCallback = () => {\n this._element.setAttribute('aria-hidden', true)\n this._element.removeAttribute('aria-modal')\n this._element.removeAttribute('role')\n this._element.style.visibility = 'hidden'\n\n if (!this._config.scroll) {\n new ScrollBarHelper().reset()\n }\n\n EventHandler.trigger(this._element, EVENT_HIDDEN)\n }\n\n this._queueCallback(completeCallback, this._element, true)\n }\n\n dispose() {\n this._backdrop.dispose()\n super.dispose()\n EventHandler.off(document, EVENT_FOCUSIN)\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' ? config : {})\n }\n typeCheckConfig(NAME, config, DefaultType)\n return config\n }\n\n _initializeBackDrop() {\n return new Backdrop({\n isVisible: this._config.backdrop,\n isAnimated: true,\n rootElement: this._element.parentNode,\n clickCallback: () => this.hide()\n })\n }\n\n _enforceFocusOnElement(element) {\n EventHandler.off(document, EVENT_FOCUSIN) // guard against infinite focus loop\n EventHandler.on(document, EVENT_FOCUSIN, event => {\n if (document !== event.target &&\n element !== event.target &&\n !element.contains(event.target)) {\n element.focus()\n }\n })\n element.focus()\n }\n\n _addEventListeners() {\n EventHandler.on(this._element, EVENT_CLICK_DISMISS, SELECTOR_DATA_DISMISS, () => this.hide())\n\n EventHandler.on(this._element, EVENT_KEYDOWN_DISMISS, event => {\n if (this._config.keyboard && event.key === ESCAPE_KEY) {\n this.hide()\n }\n })\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Offcanvas.getOrCreateInstance(this, config)\n\n if (typeof config !== 'string') {\n return\n }\n\n if (data[config] === undefined || config.startsWith('_') || config === 'constructor') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config](this)\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * Data Api implementation\n * ------------------------------------------------------------------------\n */\n\nEventHandler.on(document, EVENT_CLICK_DATA_API, SELECTOR_DATA_TOGGLE, function (event) {\n const target = getElementFromSelector(this)\n\n if (['A', 'AREA'].includes(this.tagName)) {\n event.preventDefault()\n }\n\n if (isDisabled(this)) {\n return\n }\n\n EventHandler.one(target, EVENT_HIDDEN, () => {\n // focus on trigger when it is closed\n if (isVisible(this)) {\n this.focus()\n }\n })\n\n // avoid conflict when clicking a toggler of an offcanvas, while another is open\n const allReadyOpen = SelectorEngine.findOne(OPEN_SELECTOR)\n if (allReadyOpen && allReadyOpen !== target) {\n Offcanvas.getInstance(allReadyOpen).hide()\n }\n\n const data = Offcanvas.getOrCreateInstance(target)\n data.toggle(this)\n})\n\nEventHandler.on(window, EVENT_LOAD_DATA_API, () =>\n SelectorEngine.find(OPEN_SELECTOR).forEach(el => Offcanvas.getOrCreateInstance(el).show())\n)\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\ndefineJQueryPlugin(Offcanvas)\n\nexport default Offcanvas\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): util/sanitizer.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nconst uriAttrs = new Set([\n 'background',\n 'cite',\n 'href',\n 'itemtype',\n 'longdesc',\n 'poster',\n 'src',\n 'xlink:href'\n])\n\nconst ARIA_ATTRIBUTE_PATTERN = /^aria-[\\w-]*$/i\n\n/**\n * A pattern that recognizes a commonly useful subset of URLs that are safe.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst SAFE_URL_PATTERN = /^(?:(?:https?|mailto|ftp|tel|file):|[^#&/:?]*(?:[#/?]|$))/i\n\n/**\n * A pattern that matches safe data URLs. Only matches image, video and audio types.\n *\n * Shoutout to Angular 7 https://github.com/angular/angular/blob/7.2.4/packages/core/src/sanitization/url_sanitizer.ts\n */\nconst DATA_URL_PATTERN = /^data:(?:image\\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\\/(?:mpeg|mp4|ogg|webm)|audio\\/(?:mp3|oga|ogg|opus));base64,[\\d+/a-z]+=*$/i\n\nconst allowedAttribute = (attr, allowedAttributeList) => {\n const attrName = attr.nodeName.toLowerCase()\n\n if (allowedAttributeList.includes(attrName)) {\n if (uriAttrs.has(attrName)) {\n return Boolean(SAFE_URL_PATTERN.test(attr.nodeValue) || DATA_URL_PATTERN.test(attr.nodeValue))\n }\n\n return true\n }\n\n const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp)\n\n // Check if a regular expression validates the attribute.\n for (let i = 0, len = regExp.length; i < len; i++) {\n if (regExp[i].test(attrName)) {\n return true\n }\n }\n\n return false\n}\n\nexport const DefaultAllowlist = {\n // Global attributes allowed on any supplied element below.\n '*': ['class', 'dir', 'id', 'lang', 'role', ARIA_ATTRIBUTE_PATTERN],\n a: ['target', 'href', 'title', 'rel'],\n area: [],\n b: [],\n br: [],\n col: [],\n code: [],\n div: [],\n em: [],\n hr: [],\n h1: [],\n h2: [],\n h3: [],\n h4: [],\n h5: [],\n h6: [],\n i: [],\n img: ['src', 'srcset', 'alt', 'title', 'width', 'height'],\n li: [],\n ol: [],\n p: [],\n pre: [],\n s: [],\n small: [],\n span: [],\n sub: [],\n sup: [],\n strong: [],\n u: [],\n ul: []\n}\n\nexport function sanitizeHtml(unsafeHtml, allowList, sanitizeFn) {\n if (!unsafeHtml.length) {\n return unsafeHtml\n }\n\n if (sanitizeFn && typeof sanitizeFn === 'function') {\n return sanitizeFn(unsafeHtml)\n }\n\n const domParser = new window.DOMParser()\n const createdDocument = domParser.parseFromString(unsafeHtml, 'text/html')\n const allowlistKeys = Object.keys(allowList)\n const elements = [].concat(...createdDocument.body.querySelectorAll('*'))\n\n for (let i = 0, len = elements.length; i < len; i++) {\n const el = elements[i]\n const elName = el.nodeName.toLowerCase()\n\n if (!allowlistKeys.includes(elName)) {\n el.remove()\n\n continue\n }\n\n const attributeList = [].concat(...el.attributes)\n const allowedAttributes = [].concat(allowList['*'] || [], allowList[elName] || [])\n\n attributeList.forEach(attr => {\n if (!allowedAttribute(attr, allowedAttributes)) {\n el.removeAttribute(attr.nodeName)\n }\n })\n }\n\n return createdDocument.body.innerHTML\n}\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): tooltip.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport * as Popper from '@popperjs/core'\n\nimport {\n defineJQueryPlugin,\n findShadowRoot,\n getElement,\n getUID,\n isElement,\n isRTL,\n noop,\n typeCheckConfig\n} from './util/index'\nimport {\n DefaultAllowlist,\n sanitizeHtml\n} from './util/sanitizer'\nimport Data from './dom/data'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'tooltip'\nconst DATA_KEY = 'bs.tooltip'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst CLASS_PREFIX = 'bs-tooltip'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\nconst DISALLOWED_ATTRIBUTES = new Set(['sanitize', 'allowList', 'sanitizeFn'])\n\nconst DefaultType = {\n animation: 'boolean',\n template: 'string',\n title: '(string|element|function)',\n trigger: 'string',\n delay: '(number|object)',\n html: 'boolean',\n selector: '(string|boolean)',\n placement: '(string|function)',\n offset: '(array|string|function)',\n container: '(string|element|boolean)',\n fallbackPlacements: 'array',\n boundary: '(string|element)',\n customClass: '(string|function)',\n sanitize: 'boolean',\n sanitizeFn: '(null|function)',\n allowList: 'object',\n popperConfig: '(null|object|function)'\n}\n\nconst AttachmentMap = {\n AUTO: 'auto',\n TOP: 'top',\n RIGHT: isRTL() ? 'left' : 'right',\n BOTTOM: 'bottom',\n LEFT: isRTL() ? 'right' : 'left'\n}\n\nconst Default = {\n animation: true,\n template: '
' +\n '
' +\n '
' +\n '
',\n trigger: 'hover focus',\n title: '',\n delay: 0,\n html: false,\n selector: false,\n placement: 'top',\n offset: [0, 0],\n container: false,\n fallbackPlacements: ['top', 'right', 'bottom', 'left'],\n boundary: 'clippingParents',\n customClass: '',\n sanitize: true,\n sanitizeFn: null,\n allowList: DefaultAllowlist,\n popperConfig: null\n}\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_MODAL = 'modal'\nconst CLASS_NAME_SHOW = 'show'\n\nconst HOVER_STATE_SHOW = 'show'\nconst HOVER_STATE_OUT = 'out'\n\nconst SELECTOR_TOOLTIP_INNER = '.tooltip-inner'\n\nconst TRIGGER_HOVER = 'hover'\nconst TRIGGER_FOCUS = 'focus'\nconst TRIGGER_CLICK = 'click'\nconst TRIGGER_MANUAL = 'manual'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Tooltip extends BaseComponent {\n constructor(element, config) {\n if (typeof Popper === 'undefined') {\n throw new TypeError('Bootstrap\\'s tooltips require Popper (https://popper.js.org)')\n }\n\n super(element)\n\n // private\n this._isEnabled = true\n this._timeout = 0\n this._hoverState = ''\n this._activeTrigger = {}\n this._popper = null\n\n // Protected\n this._config = this._getConfig(config)\n this.tip = null\n\n this._setListeners()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get Event() {\n return Event\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Public\n\n enable() {\n this._isEnabled = true\n }\n\n disable() {\n this._isEnabled = false\n }\n\n toggleEnabled() {\n this._isEnabled = !this._isEnabled\n }\n\n toggle(event) {\n if (!this._isEnabled) {\n return\n }\n\n if (event) {\n const context = this._initializeOnDelegatedTarget(event)\n\n context._activeTrigger.click = !context._activeTrigger.click\n\n if (context._isWithActiveTrigger()) {\n context._enter(null, context)\n } else {\n context._leave(null, context)\n }\n } else {\n if (this.getTipElement().classList.contains(CLASS_NAME_SHOW)) {\n this._leave(null, this)\n return\n }\n\n this._enter(null, this)\n }\n }\n\n dispose() {\n clearTimeout(this._timeout)\n\n EventHandler.off(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)\n\n if (this.tip) {\n this.tip.remove()\n }\n\n if (this._popper) {\n this._popper.destroy()\n }\n\n super.dispose()\n }\n\n show() {\n if (this._element.style.display === 'none') {\n throw new Error('Please use show on visible elements')\n }\n\n if (!(this.isWithContent() && this._isEnabled)) {\n return\n }\n\n const showEvent = EventHandler.trigger(this._element, this.constructor.Event.SHOW)\n const shadowRoot = findShadowRoot(this._element)\n const isInTheDom = shadowRoot === null ?\n this._element.ownerDocument.documentElement.contains(this._element) :\n shadowRoot.contains(this._element)\n\n if (showEvent.defaultPrevented || !isInTheDom) {\n return\n }\n\n const tip = this.getTipElement()\n const tipId = getUID(this.constructor.NAME)\n\n tip.setAttribute('id', tipId)\n this._element.setAttribute('aria-describedby', tipId)\n\n this.setContent()\n\n if (this._config.animation) {\n tip.classList.add(CLASS_NAME_FADE)\n }\n\n const placement = typeof this._config.placement === 'function' ?\n this._config.placement.call(this, tip, this._element) :\n this._config.placement\n\n const attachment = this._getAttachment(placement)\n this._addAttachmentClass(attachment)\n\n const { container } = this._config\n Data.set(tip, this.constructor.DATA_KEY, this)\n\n if (!this._element.ownerDocument.documentElement.contains(this.tip)) {\n container.appendChild(tip)\n EventHandler.trigger(this._element, this.constructor.Event.INSERTED)\n }\n\n if (this._popper) {\n this._popper.update()\n } else {\n this._popper = Popper.createPopper(this._element, tip, this._getPopperConfig(attachment))\n }\n\n tip.classList.add(CLASS_NAME_SHOW)\n\n const customClass = typeof this._config.customClass === 'function' ? this._config.customClass() : this._config.customClass\n if (customClass) {\n tip.classList.add(...customClass.split(' '))\n }\n\n // If this is a touch-enabled device we add extra\n // empty mouseover listeners to the body's immediate children;\n // only needed because of broken event delegation on iOS\n // https://www.quirksmode.org/blog/archives/2014/02/mouse_event_bub.html\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children).forEach(element => {\n EventHandler.on(element, 'mouseover', noop)\n })\n }\n\n const complete = () => {\n const prevHoverState = this._hoverState\n\n this._hoverState = null\n EventHandler.trigger(this._element, this.constructor.Event.SHOWN)\n\n if (prevHoverState === HOVER_STATE_OUT) {\n this._leave(null, this)\n }\n }\n\n const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(complete, this.tip, isAnimated)\n }\n\n hide() {\n if (!this._popper) {\n return\n }\n\n const tip = this.getTipElement()\n const complete = () => {\n if (this._isWithActiveTrigger()) {\n return\n }\n\n if (this._hoverState !== HOVER_STATE_SHOW) {\n tip.remove()\n }\n\n this._cleanTipClass()\n this._element.removeAttribute('aria-describedby')\n EventHandler.trigger(this._element, this.constructor.Event.HIDDEN)\n\n if (this._popper) {\n this._popper.destroy()\n this._popper = null\n }\n }\n\n const hideEvent = EventHandler.trigger(this._element, this.constructor.Event.HIDE)\n if (hideEvent.defaultPrevented) {\n return\n }\n\n tip.classList.remove(CLASS_NAME_SHOW)\n\n // If this is a touch-enabled device we remove the extra\n // empty mouseover listeners we added for iOS support\n if ('ontouchstart' in document.documentElement) {\n [].concat(...document.body.children)\n .forEach(element => EventHandler.off(element, 'mouseover', noop))\n }\n\n this._activeTrigger[TRIGGER_CLICK] = false\n this._activeTrigger[TRIGGER_FOCUS] = false\n this._activeTrigger[TRIGGER_HOVER] = false\n\n const isAnimated = this.tip.classList.contains(CLASS_NAME_FADE)\n this._queueCallback(complete, this.tip, isAnimated)\n this._hoverState = ''\n }\n\n update() {\n if (this._popper !== null) {\n this._popper.update()\n }\n }\n\n // Protected\n\n isWithContent() {\n return Boolean(this.getTitle())\n }\n\n getTipElement() {\n if (this.tip) {\n return this.tip\n }\n\n const element = document.createElement('div')\n element.innerHTML = this._config.template\n\n this.tip = element.children[0]\n return this.tip\n }\n\n setContent() {\n const tip = this.getTipElement()\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TOOLTIP_INNER, tip), this.getTitle())\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n }\n\n setElementContent(element, content) {\n if (element === null) {\n return\n }\n\n if (isElement(content)) {\n content = getElement(content)\n\n // content is a DOM node or a jQuery\n if (this._config.html) {\n if (content.parentNode !== element) {\n element.innerHTML = ''\n element.appendChild(content)\n }\n } else {\n element.textContent = content.textContent\n }\n\n return\n }\n\n if (this._config.html) {\n if (this._config.sanitize) {\n content = sanitizeHtml(content, this._config.allowList, this._config.sanitizeFn)\n }\n\n element.innerHTML = content\n } else {\n element.textContent = content\n }\n }\n\n getTitle() {\n let title = this._element.getAttribute('data-bs-original-title')\n\n if (!title) {\n title = typeof this._config.title === 'function' ?\n this._config.title.call(this._element) :\n this._config.title\n }\n\n return title\n }\n\n updateAttachment(attachment) {\n if (attachment === 'right') {\n return 'end'\n }\n\n if (attachment === 'left') {\n return 'start'\n }\n\n return attachment\n }\n\n // Private\n\n _initializeOnDelegatedTarget(event, context) {\n const dataKey = this.constructor.DATA_KEY\n context = context || Data.get(event.delegateTarget, dataKey)\n\n if (!context) {\n context = new this.constructor(event.delegateTarget, this._getDelegateConfig())\n Data.set(event.delegateTarget, dataKey, context)\n }\n\n return context\n }\n\n _getOffset() {\n const { offset } = this._config\n\n if (typeof offset === 'string') {\n return offset.split(',').map(val => Number.parseInt(val, 10))\n }\n\n if (typeof offset === 'function') {\n return popperData => offset(popperData, this._element)\n }\n\n return offset\n }\n\n _getPopperConfig(attachment) {\n const defaultBsPopperConfig = {\n placement: attachment,\n modifiers: [\n {\n name: 'flip',\n options: {\n fallbackPlacements: this._config.fallbackPlacements\n }\n },\n {\n name: 'offset',\n options: {\n offset: this._getOffset()\n }\n },\n {\n name: 'preventOverflow',\n options: {\n boundary: this._config.boundary\n }\n },\n {\n name: 'arrow',\n options: {\n element: `.${this.constructor.NAME}-arrow`\n }\n },\n {\n name: 'onChange',\n enabled: true,\n phase: 'afterWrite',\n fn: data => this._handlePopperPlacementChange(data)\n }\n ],\n onFirstUpdate: data => {\n if (data.options.placement !== data.placement) {\n this._handlePopperPlacementChange(data)\n }\n }\n }\n\n return {\n ...defaultBsPopperConfig,\n ...(typeof this._config.popperConfig === 'function' ? this._config.popperConfig(defaultBsPopperConfig) : this._config.popperConfig)\n }\n }\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)\n }\n\n _getAttachment(placement) {\n return AttachmentMap[placement.toUpperCase()]\n }\n\n _setListeners() {\n const triggers = this._config.trigger.split(' ')\n\n triggers.forEach(trigger => {\n if (trigger === 'click') {\n EventHandler.on(this._element, this.constructor.Event.CLICK, this._config.selector, event => this.toggle(event))\n } else if (trigger !== TRIGGER_MANUAL) {\n const eventIn = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSEENTER :\n this.constructor.Event.FOCUSIN\n const eventOut = trigger === TRIGGER_HOVER ?\n this.constructor.Event.MOUSELEAVE :\n this.constructor.Event.FOCUSOUT\n\n EventHandler.on(this._element, eventIn, this._config.selector, event => this._enter(event))\n EventHandler.on(this._element, eventOut, this._config.selector, event => this._leave(event))\n }\n })\n\n this._hideModalHandler = () => {\n if (this._element) {\n this.hide()\n }\n }\n\n EventHandler.on(this._element.closest(`.${CLASS_NAME_MODAL}`), 'hide.bs.modal', this._hideModalHandler)\n\n if (this._config.selector) {\n this._config = {\n ...this._config,\n trigger: 'manual',\n selector: ''\n }\n } else {\n this._fixTitle()\n }\n }\n\n _fixTitle() {\n const title = this._element.getAttribute('title')\n const originalTitleType = typeof this._element.getAttribute('data-bs-original-title')\n\n if (title || originalTitleType !== 'string') {\n this._element.setAttribute('data-bs-original-title', title || '')\n if (title && !this._element.getAttribute('aria-label') && !this._element.textContent) {\n this._element.setAttribute('aria-label', title)\n }\n\n this._element.setAttribute('title', '')\n }\n }\n\n _enter(event, context) {\n context = this._initializeOnDelegatedTarget(event, context)\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusin' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = true\n }\n\n if (context.getTipElement().classList.contains(CLASS_NAME_SHOW) || context._hoverState === HOVER_STATE_SHOW) {\n context._hoverState = HOVER_STATE_SHOW\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_SHOW\n\n if (!context._config.delay || !context._config.delay.show) {\n context.show()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_SHOW) {\n context.show()\n }\n }, context._config.delay.show)\n }\n\n _leave(event, context) {\n context = this._initializeOnDelegatedTarget(event, context)\n\n if (event) {\n context._activeTrigger[\n event.type === 'focusout' ? TRIGGER_FOCUS : TRIGGER_HOVER\n ] = context._element.contains(event.relatedTarget)\n }\n\n if (context._isWithActiveTrigger()) {\n return\n }\n\n clearTimeout(context._timeout)\n\n context._hoverState = HOVER_STATE_OUT\n\n if (!context._config.delay || !context._config.delay.hide) {\n context.hide()\n return\n }\n\n context._timeout = setTimeout(() => {\n if (context._hoverState === HOVER_STATE_OUT) {\n context.hide()\n }\n }, context._config.delay.hide)\n }\n\n _isWithActiveTrigger() {\n for (const trigger in this._activeTrigger) {\n if (this._activeTrigger[trigger]) {\n return true\n }\n }\n\n return false\n }\n\n _getConfig(config) {\n const dataAttributes = Manipulator.getDataAttributes(this._element)\n\n Object.keys(dataAttributes).forEach(dataAttr => {\n if (DISALLOWED_ATTRIBUTES.has(dataAttr)) {\n delete dataAttributes[dataAttr]\n }\n })\n\n config = {\n ...this.constructor.Default,\n ...dataAttributes,\n ...(typeof config === 'object' && config ? config : {})\n }\n\n config.container = config.container === false ? document.body : getElement(config.container)\n\n if (typeof config.delay === 'number') {\n config.delay = {\n show: config.delay,\n hide: config.delay\n }\n }\n\n if (typeof config.title === 'number') {\n config.title = config.title.toString()\n }\n\n if (typeof config.content === 'number') {\n config.content = config.content.toString()\n }\n\n typeCheckConfig(NAME, config, this.constructor.DefaultType)\n\n if (config.sanitize) {\n config.template = sanitizeHtml(config.template, config.allowList, config.sanitizeFn)\n }\n\n return config\n }\n\n _getDelegateConfig() {\n const config = {}\n\n if (this._config) {\n for (const key in this._config) {\n if (this.constructor.Default[key] !== this._config[key]) {\n config[key] = this._config[key]\n }\n }\n }\n\n return config\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement()\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim())\n .forEach(tClass => tip.classList.remove(tClass))\n }\n }\n\n _handlePopperPlacementChange(popperData) {\n const { state } = popperData\n\n if (!state) {\n return\n }\n\n this.tip = state.elements.popper\n this._cleanTipClass()\n this._addAttachmentClass(this._getAttachment(state.placement))\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Tooltip.getOrCreateInstance(this, config)\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Tooltip to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Tooltip)\n\nexport default Tooltip\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): popover.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport { defineJQueryPlugin } from './util/index'\nimport SelectorEngine from './dom/selector-engine'\nimport Tooltip from './tooltip'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'popover'\nconst DATA_KEY = 'bs.popover'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst CLASS_PREFIX = 'bs-popover'\nconst BSCLS_PREFIX_REGEX = new RegExp(`(^|\\\\s)${CLASS_PREFIX}\\\\S+`, 'g')\n\nconst Default = {\n ...Tooltip.Default,\n placement: 'right',\n offset: [0, 8],\n trigger: 'click',\n content: '',\n template: '
' +\n '
' +\n '

' +\n '
' +\n '
'\n}\n\nconst DefaultType = {\n ...Tooltip.DefaultType,\n content: '(string|element|function)'\n}\n\nconst Event = {\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n INSERTED: `inserted${EVENT_KEY}`,\n CLICK: `click${EVENT_KEY}`,\n FOCUSIN: `focusin${EVENT_KEY}`,\n FOCUSOUT: `focusout${EVENT_KEY}`,\n MOUSEENTER: `mouseenter${EVENT_KEY}`,\n MOUSELEAVE: `mouseleave${EVENT_KEY}`\n}\n\nconst CLASS_NAME_FADE = 'fade'\nconst CLASS_NAME_SHOW = 'show'\n\nconst SELECTOR_TITLE = '.popover-header'\nconst SELECTOR_CONTENT = '.popover-body'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass Popover extends Tooltip {\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n static get Event() {\n return Event\n }\n\n static get DefaultType() {\n return DefaultType\n }\n\n // Overrides\n\n isWithContent() {\n return this.getTitle() || this._getContent()\n }\n\n getTipElement() {\n if (this.tip) {\n return this.tip\n }\n\n this.tip = super.getTipElement()\n\n if (!this.getTitle()) {\n SelectorEngine.findOne(SELECTOR_TITLE, this.tip).remove()\n }\n\n if (!this._getContent()) {\n SelectorEngine.findOne(SELECTOR_CONTENT, this.tip).remove()\n }\n\n return this.tip\n }\n\n setContent() {\n const tip = this.getTipElement()\n\n // we use append for html objects to maintain js events\n this.setElementContent(SelectorEngine.findOne(SELECTOR_TITLE, tip), this.getTitle())\n let content = this._getContent()\n if (typeof content === 'function') {\n content = content.call(this._element)\n }\n\n this.setElementContent(SelectorEngine.findOne(SELECTOR_CONTENT, tip), content)\n\n tip.classList.remove(CLASS_NAME_FADE, CLASS_NAME_SHOW)\n }\n\n // Private\n\n _addAttachmentClass(attachment) {\n this.getTipElement().classList.add(`${CLASS_PREFIX}-${this.updateAttachment(attachment)}`)\n }\n\n _getContent() {\n return this._element.getAttribute('data-bs-content') || this._config.content\n }\n\n _cleanTipClass() {\n const tip = this.getTipElement()\n const tabClass = tip.getAttribute('class').match(BSCLS_PREFIX_REGEX)\n if (tabClass !== null && tabClass.length > 0) {\n tabClass.map(token => token.trim())\n .forEach(tClass => tip.classList.remove(tClass))\n }\n }\n\n // Static\n\n static jQueryInterface(config) {\n return this.each(function () {\n const data = Popover.getOrCreateInstance(this, config)\n\n if (typeof config === 'string') {\n if (typeof data[config] === 'undefined') {\n throw new TypeError(`No method named \"${config}\"`)\n }\n\n data[config]()\n }\n })\n }\n}\n\n/**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n * add .Popover to jQuery only if jQuery is present\n */\n\ndefineJQueryPlugin(Popover)\n\nexport default Popover\n", "/**\n * --------------------------------------------------------------------------\n * Bootstrap (v5.0.2): scrollspy.js\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * --------------------------------------------------------------------------\n */\n\nimport {\n defineJQueryPlugin,\n getSelectorFromElement,\n getUID,\n isElement,\n typeCheckConfig\n} from './util/index'\nimport EventHandler from './dom/event-handler'\nimport Manipulator from './dom/manipulator'\nimport SelectorEngine from './dom/selector-engine'\nimport BaseComponent from './base-component'\n\n/**\n * ------------------------------------------------------------------------\n * Constants\n * ------------------------------------------------------------------------\n */\n\nconst NAME = 'scrollspy'\nconst DATA_KEY = 'bs.scrollspy'\nconst EVENT_KEY = `.${DATA_KEY}`\nconst DATA_API_KEY = '.data-api'\n\nconst Default = {\n offset: 10,\n method: 'auto',\n target: ''\n}\n\nconst DefaultType = {\n offset: 'number',\n method: 'string',\n target: '(string|element)'\n}\n\nconst EVENT_ACTIVATE = `activate${EVENT_KEY}`\nconst EVENT_SCROLL = `scroll${EVENT_KEY}`\nconst EVENT_LOAD_DATA_API = `load${EVENT_KEY}${DATA_API_KEY}`\n\nconst CLASS_NAME_DROPDOWN_ITEM = 'dropdown-item'\nconst CLASS_NAME_ACTIVE = 'active'\n\nconst SELECTOR_DATA_SPY = '[data-bs-spy=\"scroll\"]'\nconst SELECTOR_NAV_LIST_GROUP = '.nav, .list-group'\nconst SELECTOR_NAV_LINKS = '.nav-link'\nconst SELECTOR_NAV_ITEMS = '.nav-item'\nconst SELECTOR_LIST_ITEMS = '.list-group-item'\nconst SELECTOR_DROPDOWN = '.dropdown'\nconst SELECTOR_DROPDOWN_TOGGLE = '.dropdown-toggle'\n\nconst METHOD_OFFSET = 'offset'\nconst METHOD_POSITION = 'position'\n\n/**\n * ------------------------------------------------------------------------\n * Class Definition\n * ------------------------------------------------------------------------\n */\n\nclass ScrollSpy extends BaseComponent {\n constructor(element, config) {\n super(element)\n this._scrollElement = this._element.tagName === 'BODY' ? window : this._element\n this._config = this._getConfig(config)\n this._selector = `${this._config.target} ${SELECTOR_NAV_LINKS}, ${this._config.target} ${SELECTOR_LIST_ITEMS}, ${this._config.target} .${CLASS_NAME_DROPDOWN_ITEM}`\n this._offsets = []\n this._targets = []\n this._activeTarget = null\n this._scrollHeight = 0\n\n EventHandler.on(this._scrollElement, EVENT_SCROLL, () => this._process())\n\n this.refresh()\n this._process()\n }\n\n // Getters\n\n static get Default() {\n return Default\n }\n\n static get NAME() {\n return NAME\n }\n\n // Public\n\n refresh() {\n const autoMethod = this._scrollElement === this._scrollElement.window ?\n METHOD_OFFSET :\n METHOD_POSITION\n\n const offsetMethod = this._config.method === 'auto' ?\n autoMethod :\n this._config.method\n\n const offsetBase = offsetMethod === METHOD_POSITION ?\n this._getScrollTop() :\n 0\n\n this._offsets = []\n this._targets = []\n this._scrollHeight = this._getScrollHeight()\n\n const targets = SelectorEngine.find(this._selector)\n\n targets.map(element => {\n const targetSelector = getSelectorFromElement(element)\n const target = targetSelector ? SelectorEngine.findOne(targetSelector) : null\n\n if (target) {\n const targetBCR = target.getBoundingClientRect()\n if (targetBCR.width || targetBCR.height) {\n return [\n Manipulator[offsetMethod](target).top + offsetBase,\n targetSelector\n ]\n }\n }\n\n return null\n })\n .filter(item => item)\n .sort((a, b) => a[0] - b[0])\n .forEach(item => {\n this._offsets.push(item[0])\n this._targets.push(item[1])\n })\n }\n\n dispose() {\n EventHandler.off(this._scrollElement, EVENT_KEY)\n super.dispose()\n }\n\n // Private\n\n _getConfig(config) {\n config = {\n ...Default,\n ...Manipulator.getDataAttributes(this._element),\n ...(typeof config === 'object' && config ? config : {})\n }\n\n if (typeof config.target !== 'string' && isElement(config.target)) {\n let { id } = config.target\n if (!id) {\n id = getUID(NAME)\n config.target.id = id\n }\n\n config.target = `#${id}`\n }\n\n typeCheckConfig(NAME, config, DefaultType)\n\n return config\n }\n\n _getScrollTop() {\n return this._scrollElement === window ?\n this._scrollElement.pageYOffset :\n this._scrollElement.scrollTop\n }\n\n _getScrollHeight() {\n return this._scrollElement.scrollHeight || Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight\n )\n }\n\n _getOffsetHeight() {\n return this._scrollElement === window ?\n window.innerHeight :\n this._scrollElement.getBoundingClientRect().height\n }\n\n _process() {\n const scrollTop = this._getScrollTop() + this._config.offset\n const scrollHeight = this._getScrollHeight()\n const maxScroll = this._config.offset + scrollHeight - this._getOffsetHeight()\n\n if (this._scrollHeight !== scrollHeight) {\n this.refresh()\n }\n\n if (scrollTop >= maxScroll) {\n const target = this._targets[this._targets.length - 1]\n\n if (this._activeTarget !== target) {\n this._activate(target)\n }\n\n return\n }\n\n if (this._activeTarget && scrollTop < this._offsets[0] && this._offsets[0] > 0) {\n this._activeTarget = null\n this._clear()\n return\n }\n\n for (let i = this._offsets.length; i--;) {\n const isActiveTarget = this._activeTarget !== this._targets[i] &&\n scrollTop >= this._offsets[i] &&\n (typeof this._offsets[i + 1] === 'undefined' || scrollTop < this._offsets[i + 1])\n\n if (isActiveTarget) {\n this._activate(this._targets[i])\n }\n }\n }\n\n _activate(target) {\n this._activeTarget = target\n\n this._clear()\n\n const queries = this._selector.split(',')\n .map(selector => `${selector}[data-bs-target=\"${target}\"],${selector}[href=\"${target}\"]`)\n\n const link = SelectorEngine.findOne(queries.join(','))\n\n if (link.classList.contains(CLASS_NAME_DROPDOWN_ITEM)) {\n SelectorEngine.findOne(SELECTOR_DROPDOWN_TOGGLE, link.closest(SELECTOR_DROPDOWN))\n .classList.add(CLASS_NAME_ACTIVE)\n\n link.classList.add(CLASS_NAME_ACTIVE)\n } else {\n // Set triggered link as active\n link.classList.add(CLASS_NAME_ACTIVE)\n\n SelectorEngine.parents(link, SELECTOR_NAV_LIST_GROUP)\n .forEach(listGroup => {\n // Set triggered links parents as active\n // With both