Вход Регистрация
Файл: public/build/assets/main-BJDUmT42.js
Строк: 13380
var e=Object.defineProperty,t=(t,n)=>{let r={};for(var i in t)e(r,i,{get:t[i],enumerable:!0});return n||e(r,Symbol.toStringTag,{value:`Module`}),r},n=`bottom`,r=`right`,i=`left`,a=`auto`,o=[`top`,n,r,i],s=`start`,c=`clippingParents`,l=`viewport`,u=`popper`,d=`reference`,f=o.reduce(function(e,t){return e.concat([t+`-`+s,t+`-end`])},[]),p=[].concat(o,[a]).reduce(function(e,t){return e.concat([t,t+`-`+s,t+`-end`])},[]),m=`beforeRead`,h=`read`,g=`afterRead`,_=`beforeMain`,v=`main`,y=`afterMain`,b=`beforeWrite`,x=`write`,S=`afterWrite`,C=[m,h,g,_,v,y,b,x,S];function w(e){return e?(e.nodeName||``).toLowerCase():null}function T(e){if(e==null)return window;if(e.toString()!==`[object Window]`){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function E(e){return e instanceof T(e).Element||e instanceof Element}function D(e){return e instanceof T(e).HTMLElement||e instanceof HTMLElement}function O(e){return typeof ShadowRoot>`u`?!1:e instanceof T(e).ShadowRoot||e instanceof ShadowRoot}function k(e){var t=e.state;Object.keys(t.elements).forEach(function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},i=t.elements[e];!D(i)||!w(i)||(Object.assign(i.style,n),Object.keys(r).forEach(function(e){var t=r[e];t===!1?i.removeAttribute(e):i.setAttribute(e,t===!0?``:t)}))})}function A(e){var t=e.state,n={popper:{position:t.options.strategy,left:`0`,top:`0`,margin:`0`},arrow:{position:`absolute`},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach(function(e){var r=t.elements[e],i=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce(function(e,t){return e[t]=``,e},{});!D(r)||!w(r)||(Object.assign(r.style,a),Object.keys(i).forEach(function(e){r.removeAttribute(e)}))})}}var j={name:`applyStyles`,enabled:!0,phase:`write`,fn:k,effect:A,requires:[`computeStyles`]};function M(e){return e.split(`-`)[0]}var N=Math.max,P=Math.min,F=Math.round;function I(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(e){return e.brand+`/`+e.version}).join(` `):navigator.userAgent}function L(){return!/^((?!chrome|android).)*safari/i.test(I())}function R(e,t,n){t===void 0&&(t=!1),n===void 0&&(n=!1);var r=e.getBoundingClientRect(),i=1,a=1;t&&D(e)&&(i=e.offsetWidth>0&&F(r.width)/e.offsetWidth||1,a=e.offsetHeight>0&&F(r.height)/e.offsetHeight||1);var o=(E(e)?T(e):window).visualViewport,s=!L()&&n,c=(r.left+(s&&o?o.offsetLeft:0))/i,l=(r.top+(s&&o?o.offsetTop:0))/a,u=r.width/i,d=r.height/a;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function z(e){var t=R(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function B(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&O(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function V(e){return T(e).getComputedStyle(e)}function ee(e){return[`table`,`td`,`th`].indexOf(w(e))>=0}function te(e){return((E(e)?e.ownerDocument:e.document)||window.document).documentElement}function ne(e){return w(e)===`html`?e:e.assignedSlot||e.parentNode||(O(e)?e.host:null)||te(e)}function re(e){return!D(e)||V(e).position===`fixed`?null:e.offsetParent}function ie(e){var t=/firefox/i.test(I());if(/Trident/i.test(I())&&D(e)&&V(e).position===`fixed`)return null;var n=ne(e);for(O(n)&&(n=n.host);D(n)&&[`html`,`body`].indexOf(w(n))<0;){var r=V(n);if(r.transform!==`none`||r.perspective!==`none`||r.contain===`paint`||[`transform`,`perspective`].indexOf(r.willChange)!==-1||t&&r.willChange===`filter`||t&&r.filter&&r.filter!==`none`)return n;n=n.parentNode}return null}function ae(e){for(var t=T(e),n=re(e);n&&ee(n)&&V(n).position===`static`;)n=re(n);return n&&(w(n)===`html`||w(n)===`body`&&V(n).position===`static`)?t:n||ie(e)||t}function oe(e){return[`top`,`bottom`].indexOf(e)>=0?`x`:`y`}function H(e,t,n){return N(e,P(t,n))}function U(e,t,n){var r=H(e,t,n);return r>n?n:r}function se(){return{top:0,right:0,bottom:0,left:0}}function ce(e){return Object.assign({},se(),e)}function le(e,t){return t.reduce(function(t,n){return t[n]=e,t},{})}var ue=function(e,t){return e=typeof e==`function`?e(Object.assign({},t.rects,{placement:t.placement})):e,ce(typeof e==`number`?le(e,o):e)};function de(e){var t,a=e.state,o=e.name,s=e.options,c=a.elements.arrow,l=a.modifiersData.popperOffsets,u=M(a.placement),d=oe(u),f=[`left`,`right`].indexOf(u)>=0?`height`:`width`;if(!(!c||!l)){var p=ue(s.padding,a),m=z(c),h=d===`y`?`top`:i,g=d===`y`?n:r,_=a.rects.reference[f]+a.rects.reference[d]-l[d]-a.rects.popper[f],v=l[d]-a.rects.reference[d],y=ae(c),b=y?d===`y`?y.clientHeight||0:y.clientWidth||0:0,x=_/2-v/2,S=p[h],C=b-m[f]-p[g],w=b/2-m[f]/2+x,T=H(S,w,C),E=d;a.modifiersData[o]=(t={},t[E]=T,t.centerOffset=T-w,t)}}function fe(e){var t=e.state,n=e.options.element,r=n===void 0?`[data-popper-arrow]`:n;r!=null&&(typeof r==`string`&&(r=t.elements.popper.querySelector(r),!r)||B(t.elements.popper,r)&&(t.elements.arrow=r))}var pe={name:`arrow`,enabled:!0,phase:`main`,fn:de,effect:fe,requires:[`popperOffsets`],requiresIfExists:[`preventOverflow`]};function me(e){return e.split(`-`)[1]}var he={top:`auto`,right:`auto`,bottom:`auto`,left:`auto`};function ge(e,t){var n=e.x,r=e.y,i=t.devicePixelRatio||1;return{x:F(n*i)/i||0,y:F(r*i)/i||0}}function _e(e){var t,a=e.popper,o=e.popperRect,s=e.placement,c=e.variation,l=e.offsets,u=e.position,d=e.gpuAcceleration,f=e.adaptive,p=e.roundOffsets,m=e.isFixed,h=l.x,g=h===void 0?0:h,_=l.y,v=_===void 0?0:_,y=typeof p==`function`?p({x:g,y:v}):{x:g,y:v};g=y.x,v=y.y;var b=l.hasOwnProperty(`x`),x=l.hasOwnProperty(`y`),S=i,C=`top`,w=window;if(f){var E=ae(a),D=`clientHeight`,O=`clientWidth`;if(E===T(a)&&(E=te(a),V(E).position!==`static`&&u===`absolute`&&(D=`scrollHeight`,O=`scrollWidth`)),E=E,s===`top`||(s===`left`||s===`right`)&&c===`end`){C=n;var k=m&&E===w&&w.visualViewport?w.visualViewport.height:E[D];v-=k-o.height,v*=d?1:-1}if(s===`left`||(s===`top`||s===`bottom`)&&c===`end`){S=r;var A=m&&E===w&&w.visualViewport?w.visualViewport.width:E[O];g-=A-o.width,g*=d?1:-1}}var j=Object.assign({position:u},f&&he),M=p===!0?ge({x:g,y:v},T(a)):{x:g,y:v};if(g=M.x,v=M.y,d){var N;return Object.assign({},j,(N={},N[C]=x?`0`:``,N[S]=b?`0`:``,N.transform=(w.devicePixelRatio||1)<=1?`translate(`+g+`px, `+v+`px)`:`translate3d(`+g+`px, `+v+`px, 0)`,N))}return Object.assign({},j,(t={},t[C]=x?v+`px`:``,t[S]=b?g+`px`:``,t.transform=``,t))}function ve(e){var t=e.state,n=e.options,r=n.gpuAcceleration,i=r===void 0?!0:r,a=n.adaptive,o=a===void 0?!0:a,s=n.roundOffsets,c=s===void 0?!0:s,l={placement:M(t.placement),variation:me(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy===`fixed`};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,_e(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,_e(Object.assign({},l,{offsets:t.modifiersData.arrow,position:`absolute`,adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var ye={name:`computeStyles`,enabled:!0,phase:`beforeWrite`,fn:ve,data:{}},be={passive:!0};function xe(e){var t=e.state,n=e.instance,r=e.options,i=r.scroll,a=i===void 0?!0:i,o=r.resize,s=o===void 0?!0:o,c=T(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach(function(e){e.addEventListener(`scroll`,n.update,be)}),s&&c.addEventListener(`resize`,n.update,be),function(){a&&l.forEach(function(e){e.removeEventListener(`scroll`,n.update,be)}),s&&c.removeEventListener(`resize`,n.update,be)}}var Se={name:`eventListeners`,enabled:!0,phase:`write`,fn:function(){},effect:xe,data:{}},Ce={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function we(e){return e.replace(/left|right|bottom|top/g,function(e){return Ce[e]})}var Te={start:`end`,end:`start`};function Ee(e){return e.replace(/start|end/g,function(e){return Te[e]})}function De(e){var t=T(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Oe(e){return R(te(e)).left+De(e).scrollLeft}function W(e,t){var n=T(e),r=te(e),i=n.visualViewport,a=r.clientWidth,o=r.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var l=L();(l||!l&&t===`fixed`)&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+Oe(e),y:c}}function ke(e){var t=te(e),n=De(e),r=e.ownerDocument?.body,i=N(t.scrollWidth,t.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),a=N(t.scrollHeight,t.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),o=-n.scrollLeft+Oe(e),s=-n.scrollTop;return V(r||t).direction===`rtl`&&(o+=N(t.clientWidth,r?r.clientWidth:0)-i),{width:i,height:a,x:o,y:s}}function Ae(e){var t=V(e),n=t.overflow,r=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+i+r)}function je(e){return[`html`,`body`,`#document`].indexOf(w(e))>=0?e.ownerDocument.body:D(e)&&Ae(e)?e:je(ne(e))}function Me(e,t){t===void 0&&(t=[]);var n=je(e),r=n===e.ownerDocument?.body,i=T(n),a=r?[i].concat(i.visualViewport||[],Ae(n)?n:[]):n,o=t.concat(a);return r?o:o.concat(Me(ne(a)))}function Ne(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Pe(e,t){var n=R(e,!1,t===`fixed`);return n.top+=e.clientTop,n.left+=e.clientLeft,n.bottom=n.top+e.clientHeight,n.right=n.left+e.clientWidth,n.width=e.clientWidth,n.height=e.clientHeight,n.x=n.left,n.y=n.top,n}function Fe(e,t,n){return t===`viewport`?Ne(W(e,n)):E(t)?Pe(t,n):Ne(ke(te(e)))}function Ie(e){var t=Me(ne(e)),n=[`absolute`,`fixed`].indexOf(V(e).position)>=0&&D(e)?ae(e):e;return E(n)?t.filter(function(e){return E(e)&&B(e,n)&&w(e)!==`body`}):[]}function Le(e,t,n,r){var i=t===`clippingParents`?Ie(e):[].concat(t),a=[].concat(i,[n]),o=a[0],s=a.reduce(function(t,n){var i=Fe(e,n,r);return t.top=N(i.top,t.top),t.right=P(i.right,t.right),t.bottom=P(i.bottom,t.bottom),t.left=N(i.left,t.left),t},Fe(e,o,r));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Re(e){var t=e.reference,a=e.element,o=e.placement,c=o?M(o):null,l=o?me(o):null,u=t.x+t.width/2-a.width/2,d=t.y+t.height/2-a.height/2,f;switch(c){case`top`:f={x:u,y:t.y-a.height};break;case n:f={x:u,y:t.y+t.height};break;case r:f={x:t.x+t.width,y:d};break;case i:f={x:t.x-a.width,y:d};break;default:f={x:t.x,y:t.y}}var p=c?oe(c):null;if(p!=null){var m=p===`y`?`height`:`width`;switch(l){case s:f[p]=f[p]-(t[m]/2-a[m]/2);break;case`end`:f[p]=f[p]+(t[m]/2-a[m]/2);break;default:}}return f}function ze(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=r===void 0?e.placement:r,a=n.strategy,s=a===void 0?e.strategy:a,f=n.boundary,p=f===void 0?c:f,m=n.rootBoundary,h=m===void 0?l:m,g=n.elementContext,_=g===void 0?u:g,v=n.altBoundary,y=v===void 0?!1:v,b=n.padding,x=b===void 0?0:b,S=ce(typeof x==`number`?le(x,o):x),C=_===`popper`?d:u,w=e.rects.popper,T=e.elements[y?C:_],D=Le(E(T)?T:T.contextElement||te(e.elements.popper),p,h,s),O=R(e.elements.reference),k=Re({reference:O,element:w,strategy:`absolute`,placement:i}),A=Ne(Object.assign({},w,k)),j=_===`popper`?A:O,M={top:D.top-j.top+S.top,bottom:j.bottom-D.bottom+S.bottom,left:D.left-j.left+S.left,right:j.right-D.right+S.right},N=e.modifiersData.offset;if(_===`popper`&&N){var P=N[i];Object.keys(M).forEach(function(e){var t=[`right`,`bottom`].indexOf(e)>=0?1:-1,n=[`top`,`bottom`].indexOf(e)>=0?`y`:`x`;M[e]+=P[n]*t})}return M}function Be(e,t){t===void 0&&(t={});var n=t,r=n.placement,i=n.boundary,a=n.rootBoundary,s=n.padding,c=n.flipVariations,l=n.allowedAutoPlacements,u=l===void 0?p:l,d=me(r),m=d?c?f:f.filter(function(e){return me(e)===d}):o,h=m.filter(function(e){return u.indexOf(e)>=0});h.length===0&&(h=m);var g=h.reduce(function(t,n){return t[n]=ze(e,{placement:n,boundary:i,rootBoundary:a,padding:s})[M(n)],t},{});return Object.keys(g).sort(function(e,t){return g[e]-g[t]})}function Ve(e){if(M(e)===`auto`)return[];var t=we(e);return[Ee(e),t,Ee(t)]}function He(e){var t=e.state,a=e.options,o=e.name;if(!t.modifiersData[o]._skip){for(var c=a.mainAxis,l=c===void 0?!0:c,u=a.altAxis,d=u===void 0?!0:u,f=a.fallbackPlacements,p=a.padding,m=a.boundary,h=a.rootBoundary,g=a.altBoundary,_=a.flipVariations,v=_===void 0?!0:_,y=a.allowedAutoPlacements,b=t.options.placement,x=M(b)===b,S=f||(x||!v?[we(b)]:Ve(b)),C=[b].concat(S).reduce(function(e,n){return e.concat(M(n)===`auto`?Be(t,{placement:n,boundary:m,rootBoundary:h,padding:p,flipVariations:v,allowedAutoPlacements:y}):n)},[]),w=t.rects.reference,T=t.rects.popper,E=new Map,D=!0,O=C[0],k=0;k<C.length;k++){var A=C[k],j=M(A),N=me(A)===s,P=[`top`,n].indexOf(j)>=0,F=P?`width`:`height`,I=ze(t,{placement:A,boundary:m,rootBoundary:h,altBoundary:g,padding:p}),L=P?N?r:i:N?n:`top`;w[F]>T[F]&&(L=we(L));var R=we(L),z=[];if(l&&z.push(I[j]<=0),d&&z.push(I[L]<=0,I[R]<=0),z.every(function(e){return e})){O=A,D=!1;break}E.set(A,z)}if(D)for(var B=v?3:1,V=function(e){var t=C.find(function(t){var n=E.get(t);if(n)return n.slice(0,e).every(function(e){return e})});if(t)return O=t,`break`},ee=B;ee>0&&V(ee)!==`break`;ee--);t.placement!==O&&(t.modifiersData[o]._skip=!0,t.placement=O,t.reset=!0)}}var Ue={name:`flip`,enabled:!0,phase:`main`,fn:He,requiresIfExists:[`offset`],data:{_skip:!1}};function We(e,t,n){return n===void 0&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function Ge(e){return[`top`,r,n,i].some(function(t){return e[t]>=0})}function Ke(e){var t=e.state,n=e.name,r=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=ze(t,{elementContext:`reference`}),s=ze(t,{altBoundary:!0}),c=We(o,r),l=We(s,i,a),u=Ge(c),d=Ge(l);t.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}var qe={name:`hide`,enabled:!0,phase:`main`,requiresIfExists:[`preventOverflow`],fn:Ke};function Je(e,t,n){var r=M(e),i=[`left`,`top`].indexOf(r)>=0?-1:1,a=typeof n==`function`?n(Object.assign({},t,{placement:e})):n,o=a[0],s=a[1];return o||=0,s=(s||0)*i,[`left`,`right`].indexOf(r)>=0?{x:s,y:o}:{x:o,y:s}}function Ye(e){var t=e.state,n=e.options,r=e.name,i=n.offset,a=i===void 0?[0,0]:i,o=p.reduce(function(e,n){return e[n]=Je(n,t.rects,a),e},{}),s=o[t.placement],c=s.x,l=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=l),t.modifiersData[r]=o}var Xe={name:`offset`,enabled:!0,phase:`main`,requires:[`popperOffsets`],fn:Ye};function Ze(e){var t=e.state,n=e.name;t.modifiersData[n]=Re({reference:t.rects.reference,element:t.rects.popper,strategy:`absolute`,placement:t.placement})}var Qe={name:`popperOffsets`,enabled:!0,phase:`read`,fn:Ze,data:{}};function $e(e){return e===`x`?`y`:`x`}function et(e){var t=e.state,a=e.options,o=e.name,s=a.mainAxis,c=s===void 0?!0:s,l=a.altAxis,u=l===void 0?!1:l,d=a.boundary,f=a.rootBoundary,p=a.altBoundary,m=a.padding,h=a.tether,g=h===void 0?!0:h,_=a.tetherOffset,v=_===void 0?0:_,y=ze(t,{boundary:d,rootBoundary:f,padding:m,altBoundary:p}),b=M(t.placement),x=me(t.placement),S=!x,C=oe(b),w=$e(C),T=t.modifiersData.popperOffsets,E=t.rects.reference,D=t.rects.popper,O=typeof v==`function`?v(Object.assign({},t.rects,{placement:t.placement})):v,k=typeof O==`number`?{mainAxis:O,altAxis:O}:Object.assign({mainAxis:0,altAxis:0},O),A=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,j={x:0,y:0};if(T){if(c){var F=C===`y`?`top`:i,I=C===`y`?n:r,L=C===`y`?`height`:`width`,R=T[C],B=R+y[F],V=R-y[I],ee=g?-D[L]/2:0,te=x===`start`?E[L]:D[L],ne=x===`start`?-D[L]:-E[L],re=t.elements.arrow,ie=g&&re?z(re):{width:0,height:0},ce=t.modifiersData[`arrow#persistent`]?t.modifiersData[`arrow#persistent`].padding:se(),le=ce[F],ue=ce[I],de=H(0,E[L],ie[L]),fe=S?E[L]/2-ee-de-le-k.mainAxis:te-de-le-k.mainAxis,pe=S?-E[L]/2+ee+de+ue+k.mainAxis:ne+de+ue+k.mainAxis,he=t.elements.arrow&&ae(t.elements.arrow),ge=he?C===`y`?he.clientTop||0:he.clientLeft||0:0,_e=A?.[C]??0,ve=R+fe-_e-ge,ye=R+pe-_e,be=H(g?P(B,ve):B,R,g?N(V,ye):V);T[C]=be,j[C]=be-R}if(u){var xe=C===`x`?`top`:i,Se=C===`x`?n:r,Ce=T[w],we=w===`y`?`height`:`width`,Te=Ce+y[xe],Ee=Ce-y[Se],De=[`top`,i].indexOf(b)!==-1,Oe=A?.[w]??0,W=De?Te:Ce-E[we]-D[we]-Oe+k.altAxis,ke=De?Ce+E[we]+D[we]-Oe-k.altAxis:Ee,Ae=g&&De?U(W,Ce,ke):H(g?W:Te,Ce,g?ke:Ee);T[w]=Ae,j[w]=Ae-Ce}t.modifiersData[o]=j}}var tt={name:`preventOverflow`,enabled:!0,phase:`main`,fn:et,requiresIfExists:[`offset`]};function nt(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function rt(e){return e===T(e)||!D(e)?De(e):nt(e)}function it(e){var t=e.getBoundingClientRect(),n=F(t.width)/e.offsetWidth||1,r=F(t.height)/e.offsetHeight||1;return n!==1||r!==1}function at(e,t,n){n===void 0&&(n=!1);var r=D(t),i=D(t)&&it(t),a=te(t),o=R(e,i,n),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(r||!r&&!n)&&((w(t)!==`body`||Ae(a))&&(s=rt(t)),D(t)?(c=R(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=Oe(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function ot(e){var t=new Map,n=new Set,r=[];e.forEach(function(e){t.set(e.name,e)});function i(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach(function(e){if(!n.has(e)){var r=t.get(e);r&&i(r)}}),r.push(e)}return e.forEach(function(e){n.has(e.name)||i(e)}),r}function st(e){var t=ot(e);return C.reduce(function(e,n){return e.concat(t.filter(function(e){return e.phase===n}))},[])}function ct(e){var t;return function(){return t||=new Promise(function(n){Promise.resolve().then(function(){t=void 0,n(e())})}),t}}function lt(e){var t=e.reduce(function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e},{});return Object.keys(t).map(function(e){return t[e]})}var ut={placement:`bottom`,modifiers:[],strategy:`absolute`};function dt(){return![...arguments].some(function(e){return!(e&&typeof e.getBoundingClientRect==`function`)})}function ft(e){e===void 0&&(e={});var t=e,n=t.defaultModifiers,r=n===void 0?[]:n,i=t.defaultOptions,a=i===void 0?ut:i;return function(e,t,n){n===void 0&&(n=a);var i={placement:`bottom`,orderedModifiers:[],options:Object.assign({},ut,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},o=[],s=!1,c={state:i,setOptions:function(n){var o=typeof n==`function`?n(i.options):n;u(),i.options=Object.assign({},a,i.options,o),i.scrollParents={reference:E(e)?Me(e):e.contextElement?Me(e.contextElement):[],popper:Me(t)};var s=st(lt([].concat(r,i.options.modifiers)));return i.orderedModifiers=s.filter(function(e){return e.enabled}),l(),c.update()},forceUpdate:function(){if(!s){var e=i.elements,t=e.reference,n=e.popper;if(dt(t,n)){i.rects={reference:at(t,ae(n),i.options.strategy===`fixed`),popper:z(n)},i.reset=!1,i.placement=i.options.placement,i.orderedModifiers.forEach(function(e){return i.modifiersData[e.name]=Object.assign({},e.data)});for(var r=0;r<i.orderedModifiers.length;r++){if(i.reset===!0){i.reset=!1,r=-1;continue}var a=i.orderedModifiers[r],o=a.fn,l=a.options,u=l===void 0?{}:l,d=a.name;typeof o==`function`&&(i=o({state:i,options:u,name:d,instance:c})||i)}}}},update:ct(function(){return new Promise(function(e){c.forceUpdate(),e(i)})}),destroy:function(){u(),s=!0}};if(!dt(e,t))return c;c.setOptions(n).then(function(e){!s&&n.onFirstUpdate&&n.onFirstUpdate(e)});function l(){i.orderedModifiers.forEach(function(e){var t=e.name,n=e.options,r=n===void 0?{}:n,a=e.effect;if(typeof a==`function`){var s=a({state:i,name:t,instance:c,options:r});o.push(s||function(){})}})}function u(){o.forEach(function(e){return e()}),o=[]}return c}}var pt=ft(),mt=ft({defaultModifiers:[Se,Qe,ye,j]}),ht=ft({defaultModifiers:[Se,Qe,ye,j,Xe,Ue,tt,pe,qe]}),gt=t({afterMain:()=>y,afterRead:()=>g,afterWrite:()=>S,applyStyles:()=>j,arrow:()=>pe,auto:()=>a,basePlacements:()=>o,beforeMain:()=>_,beforeRead:()=>m,beforeWrite:()=>b,bottom:()=>n,clippingParents:()=>c,computeStyles:()=>ye,createPopper:()=>ht,createPopperBase:()=>pt,createPopperLite:()=>mt,detectOverflow:()=>ze,end:()=>`end`,eventListeners:()=>Se,flip:()=>Ue,hide:()=>qe,left:()=>i,main:()=>v,modifierPhases:()=>C,offset:()=>Xe,placements:()=>p,popper:()=>u,popperGenerator:()=>ft,popperOffsets:()=>Qe,preventOverflow:()=>tt,read:()=>h,reference:()=>d,right:()=>r,start:()=>s,top:()=>`top`,variationPlacements:()=>f,viewport:()=>l,write:()=>x}),_t=new Map,vt={set(e,t,n){_t.has(e)||_t.set(e,new Map);let r=_t.get(e);if(!r.has(t)&&r.size!==0){console.error(`Bootstrap doesn't allow more than one instance per element. Bound instance: ${Array.from(r.keys())[0]}.`);return}r.set(t,n)},get(e,t){return _t.has(e)&&_t.get(e).get(t)||null},remove(e,t){if(!_t.has(e))return;let n=_t.get(e);n.delete(t),n.size===0&&_t.delete(e)}},yt=1e6,bt=1e3,xt=`transitionend`,St=e=>(e&&window.CSS&&window.CSS.escape&&(e=e.replace(/#([^s"#']+)/g,(e,t)=>`#${CSS.escape(t)}`)),e),Ct=e=>e==null?`${e}`:Object.prototype.toString.call(e).match(/s([a-z]+)/i)[1].toLowerCase(),wt=e=>{do e+=Math.floor(Math.random()*yt);while(document.getElementById(e));return e},Tt=e=>{if(!e)return 0;let{transitionDuration:t,transitionDelay:n}=window.getComputedStyle(e);return!Number.parseFloat(t)&&!Number.parseFloat(n)?0:(t=t.split(`,`)[0],n=n.split(`,`)[0],(Number.parseFloat(t)+Number.parseFloat(n))*bt)},Et=e=>{e.dispatchEvent(new Event(xt))},Dt=e=>!e||typeof e!=`object`?!1:(e.jquery!==void 0&&(e=e[0]),e.nodeType!==void 0),Ot=e=>Dt(e)?e.jquery?e[0]:e:typeof e==`string`&&e.length>0?document.querySelector(St(e)):null,kt=e=>{if(!Dt(e)||e.getClientRects().length===0)return!1;let t=getComputedStyle(e).getPropertyValue(`visibility`)===`visible`,n=e.closest(`details:not([open])`);if(!n)return t;if(n!==e){let t=e.closest(`summary`);if(t&&t.parentNode!==n||t===null)return!1}return t},At=e=>!e||e.nodeType!==Node.ELEMENT_NODE||e.classList.contains(`disabled`)?!0:e.disabled===void 0?e.hasAttribute(`disabled`)&&e.getAttribute(`disabled`)!==`false`:e.disabled,jt=e=>{if(!document.documentElement.attachShadow)return null;if(typeof e.getRootNode==`function`){let t=e.getRootNode();return t instanceof ShadowRoot?t:null}return e instanceof ShadowRoot?e:e.parentNode?jt(e.parentNode):null},Mt=()=>{},Nt=e=>{e.offsetHeight},Pt=()=>window.jQuery&&!document.body.hasAttribute(`data-bs-no-jquery`)?window.jQuery:null,Ft=[],It=e=>{document.readyState===`loading`?(Ft.length||document.addEventListener(`DOMContentLoaded`,()=>{for(let e of Ft)e()}),Ft.push(e)):e()},Lt=()=>document.documentElement.dir===`rtl`,Rt=e=>{It(()=>{let t=Pt();if(t){let n=e.NAME,r=t.fn[n];t.fn[n]=e.jQueryInterface,t.fn[n].Constructor=e,t.fn[n].noConflict=()=>(t.fn[n]=r,e.jQueryInterface)}})},zt=(e,t=[],n=e)=>typeof e==`function`?e.call(...t):n,Bt=(e,t,n=!0)=>{if(!n){zt(e);return}let r=Tt(t)+5,i=!1,a=({target:n})=>{n===t&&(i=!0,t.removeEventListener(xt,a),zt(e))};t.addEventListener(xt,a),setTimeout(()=>{i||Et(t)},r)},Vt=(e,t,n,r)=>{let i=e.length,a=e.indexOf(t);return a===-1?!n&&r?e[i-1]:e[0]:(a+=n?1:-1,r&&(a=(a+i)%i),e[Math.max(0,Math.min(a,i-1))])},Ht=/[^.]*(?=..*).|.*/,Ut=/..*/,Wt=/::d+$/,Gt={},Kt=1,qt={mouseenter:`mouseover`,mouseleave:`mouseout`},Jt=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`.split(`.`));function Yt(e,t){return t&&`${t}::${Kt++}`||e.uidEvent||Kt++}function Xt(e){let t=Yt(e);return e.uidEvent=t,Gt[t]=Gt[t]||{},Gt[t]}function Zt(e,t){return function n(r){return on(r,{delegateTarget:e}),n.oneOff&&G.off(e,r.type,t),t.apply(e,[r])}}function Qt(e,t,n){return function r(i){let a=e.querySelectorAll(t);for(let{target:o}=i;o&&o!==this;o=o.parentNode)for(let s of a)if(s===o)return on(i,{delegateTarget:o}),r.oneOff&&G.off(e,i.type,t,n),n.apply(o,[i])}}function $t(e,t,n=null){return Object.values(e).find(e=>e.callable===t&&e.delegationSelector===n)}function en(e,t,n){let r=typeof t==`string`,i=r?n:t||n,a=an(e);return Jt.has(a)||(a=e),[r,i,a]}function tn(e,t,n,r,i){if(typeof t!=`string`||!e)return;let[a,o,s]=en(t,n,r);t in qt&&(o=(e=>function(t){if(!t.relatedTarget||t.relatedTarget!==t.delegateTarget&&!t.delegateTarget.contains(t.relatedTarget))return e.call(this,t)})(o));let c=Xt(e),l=c[s]||(c[s]={}),u=$t(l,o,a?n:null);if(u){u.oneOff=u.oneOff&&i;return}let d=Yt(o,t.replace(Ht,``)),f=a?Qt(e,n,o):Zt(e,o);f.delegationSelector=a?n:null,f.callable=o,f.oneOff=i,f.uidEvent=d,l[d]=f,e.addEventListener(s,f,a)}function nn(e,t,n,r,i){let a=$t(t[n],r,i);a&&(e.removeEventListener(n,a,!!i),delete t[n][a.uidEvent])}function rn(e,t,n,r){let i=t[n]||{};for(let[a,o]of Object.entries(i))a.includes(r)&&nn(e,t,n,o.callable,o.delegationSelector)}function an(e){return e=e.replace(Ut,``),qt[e]||e}var G={on(e,t,n,r){tn(e,t,n,r,!1)},one(e,t,n,r){tn(e,t,n,r,!0)},off(e,t,n,r){if(typeof t!=`string`||!e)return;let[i,a,o]=en(t,n,r),s=o!==t,c=Xt(e),l=c[o]||{},u=t.startsWith(`.`);if(a!==void 0){if(!Object.keys(l).length)return;nn(e,c,o,a,i?n:null);return}if(u)for(let n of Object.keys(c))rn(e,c,n,t.slice(1));for(let[n,r]of Object.entries(l)){let i=n.replace(Wt,``);(!s||t.includes(i))&&nn(e,c,o,r.callable,r.delegationSelector)}},trigger(e,t,n){if(typeof t!=`string`||!e)return null;let r=Pt(),i=t!==an(t),a=null,o=!0,s=!0,c=!1;i&&r&&(a=r.Event(t,n),r(e).trigger(a),o=!a.isPropagationStopped(),s=!a.isImmediatePropagationStopped(),c=a.isDefaultPrevented());let l=on(new Event(t,{bubbles:o,cancelable:!0}),n);return c&&l.preventDefault(),s&&e.dispatchEvent(l),l.defaultPrevented&&a&&a.preventDefault(),l}};function on(e,t={}){for(let[n,r]of Object.entries(t))try{e[n]=r}catch{Object.defineProperty(e,n,{configurable:!0,get(){return r}})}return e}function sn(e){if(e===`true`)return!0;if(e===`false`)return!1;if(e===Number(e).toString())return Number(e);if(e===``||e===`null`)return null;if(typeof e!=`string`)return e;try{return JSON.parse(decodeURIComponent(e))}catch{return e}}function cn(e){return e.replace(/[A-Z]/g,e=>`-${e.toLowerCase()}`)}var ln={setDataAttribute(e,t,n){e.setAttribute(`data-bs-${cn(t)}`,n)},removeDataAttribute(e,t){e.removeAttribute(`data-bs-${cn(t)}`)},getDataAttributes(e){if(!e)return{};let t={},n=Object.keys(e.dataset).filter(e=>e.startsWith(`bs`)&&!e.startsWith(`bsConfig`));for(let r of n){let n=r.replace(/^bs/,``);n=n.charAt(0).toLowerCase()+n.slice(1),t[n]=sn(e.dataset[r])}return t},getDataAttribute(e,t){return sn(e.getAttribute(`data-bs-${cn(t)}`))}},un=class{static get Default(){return{}}static get DefaultType(){return{}}static get NAME(){throw Error(`You have to implement the static method "NAME", for each component!`)}_getConfig(e){return e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e}_mergeConfigObj(e,t){let n=Dt(t)?ln.getDataAttribute(t,`config`):{};return{...this.constructor.Default,...typeof n==`object`?n:{},...Dt(t)?ln.getDataAttributes(t):{},...typeof e==`object`?e:{}}}_typeCheckConfig(e,t=this.constructor.DefaultType){for(let[n,r]of Object.entries(t)){let t=e[n],i=Dt(t)?`element`:Ct(t);if(!new RegExp(r).test(i))throw TypeError(`${this.constructor.NAME.toUpperCase()}: Option "${n}" provided type "${i}" but expected type "${r}".`)}}},dn=`5.3.8`,fn=class extends un{constructor(e,t){super(),e=Ot(e),e&&(this._element=e,this._config=this._getConfig(t),vt.set(this._element,this.constructor.DATA_KEY,this))}dispose(){vt.remove(this._element,this.constructor.DATA_KEY),G.off(this._element,this.constructor.EVENT_KEY);for(let e of Object.getOwnPropertyNames(this))this[e]=null}_queueCallback(e,t,n=!0){Bt(e,t,n)}_getConfig(e){return e=this._mergeConfigObj(e,this._element),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}static getInstance(e){return vt.get(Ot(e),this.DATA_KEY)}static getOrCreateInstance(e,t={}){return this.getInstance(e)||new this(e,typeof t==`object`?t:null)}static get VERSION(){return dn}static get DATA_KEY(){return`bs.${this.NAME}`}static get EVENT_KEY(){return`.${this.DATA_KEY}`}static eventName(e){return`${e}${this.EVENT_KEY}`}},pn=e=>{let t=e.getAttribute(`data-bs-target`);if(!t||t===`#`){let n=e.getAttribute(`href`);if(!n||!n.includes(`#`)&&!n.startsWith(`.`))return null;n.includes(`#`)&&!n.startsWith(`#`)&&(n=`#${n.split(`#`)[1]}`),t=n&&n!==`#`?n.trim():null}return t?t.split(`,`).map(e=>St(e)).join(`,`):null},K={find(e,t=document.documentElement){return[].concat(...Element.prototype.querySelectorAll.call(t,e))},findOne(e,t=document.documentElement){return Element.prototype.querySelector.call(t,e)},children(e,t){return[].concat(...e.children).filter(e=>e.matches(t))},parents(e,t){let n=[],r=e.parentNode.closest(t);for(;r;)n.push(r),r=r.parentNode.closest(t);return n},prev(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return[n];n=n.previousElementSibling}return[]},next(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return[n];n=n.nextElementSibling}return[]},focusableChildren(e){let t=[`a`,`button`,`input`,`textarea`,`select`,`details`,`[tabindex]`,`[contenteditable="true"]`].map(e=>`${e}:not([tabindex^="-"])`).join(`,`);return this.find(t,e).filter(e=>!At(e)&&kt(e))},getSelectorFromElement(e){let t=pn(e);return t&&K.findOne(t)?t:null},getElementFromSelector(e){let t=pn(e);return t?K.findOne(t):null},getMultipleElementsFromSelector(e){let t=pn(e);return t?K.find(t):[]}},mn=(e,t=`hide`)=>{let n=`click.dismiss${e.EVENT_KEY}`,r=e.NAME;G.on(document,n,`[data-bs-dismiss="${r}"]`,function(n){if([`A`,`AREA`].includes(this.tagName)&&n.preventDefault(),At(this))return;let i=K.getElementFromSelector(this)||this.closest(`.${r}`);e.getOrCreateInstance(i)[t]()})},hn=`alert`,gn=`.bs.alert`,_n=`close${gn}`,vn=`closed${gn}`,yn=`fade`,bn=`show`,xn=class e extends fn{static get NAME(){return hn}close(){if(G.trigger(this._element,_n).defaultPrevented)return;this._element.classList.remove(bn);let e=this._element.classList.contains(yn);this._queueCallback(()=>this._destroyElement(),this._element,e)}_destroyElement(){this._element.remove(),G.trigger(this._element,vn),this.dispose()}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this);if(typeof t==`string`){if(n[t]===void 0||t.startsWith(`_`)||t===`constructor`)throw TypeError(`No method named "${t}"`);n[t](this)}})}};mn(xn,`close`),Rt(xn);var Sn=`button`,Cn=`.bs.button`,wn=`.data-api`,Tn=`active`,En=`[data-bs-toggle="button"]`,Dn=`click${Cn}${wn}`,On=class e extends fn{static get NAME(){return Sn}toggle(){this._element.setAttribute(`aria-pressed`,this._element.classList.toggle(Tn))}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this);t===`toggle`&&n[t]()})}};G.on(document,Dn,En,e=>{e.preventDefault();let t=e.target.closest(En);On.getOrCreateInstance(t).toggle()}),Rt(On);var kn=`swipe`,An=`.bs.swipe`,jn=`touchstart${An}`,Mn=`touchmove${An}`,Nn=`touchend${An}`,Pn=`pointerdown${An}`,Fn=`pointerup${An}`,In=`touch`,Ln=`pen`,Rn=`pointer-event`,zn=40,Bn={endCallback:null,leftCallback:null,rightCallback:null},Vn={endCallback:`(function|null)`,leftCallback:`(function|null)`,rightCallback:`(function|null)`},Hn=class e extends un{constructor(t,n){super(),this._element=t,!(!t||!e.isSupported())&&(this._config=this._getConfig(n),this._deltaX=0,this._supportPointerEvents=!!window.PointerEvent,this._initEvents())}static get Default(){return Bn}static get DefaultType(){return Vn}static get NAME(){return kn}dispose(){G.off(this._element,An)}_start(e){if(!this._supportPointerEvents){this._deltaX=e.touches[0].clientX;return}this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX)}_end(e){this._eventIsPointerPenTouch(e)&&(this._deltaX=e.clientX-this._deltaX),this._handleSwipe(),zt(this._config.endCallback)}_move(e){this._deltaX=e.touches&&e.touches.length>1?0:e.touches[0].clientX-this._deltaX}_handleSwipe(){let e=Math.abs(this._deltaX);if(e<=zn)return;let t=e/this._deltaX;this._deltaX=0,t&&zt(t>0?this._config.rightCallback:this._config.leftCallback)}_initEvents(){this._supportPointerEvents?(G.on(this._element,Pn,e=>this._start(e)),G.on(this._element,Fn,e=>this._end(e)),this._element.classList.add(Rn)):(G.on(this._element,jn,e=>this._start(e)),G.on(this._element,Mn,e=>this._move(e)),G.on(this._element,Nn,e=>this._end(e)))}_eventIsPointerPenTouch(e){return this._supportPointerEvents&&(e.pointerType===Ln||e.pointerType===In)}static isSupported(){return`ontouchstart`in document.documentElement||navigator.maxTouchPoints>0}},Un=`carousel`,Wn=`.bs.carousel`,Gn=`.data-api`,Kn=`ArrowLeft`,qn=`ArrowRight`,Jn=500,Yn=`next`,Xn=`prev`,Zn=`left`,Qn=`right`,$n=`slide${Wn}`,er=`slid${Wn}`,tr=`keydown${Wn}`,nr=`mouseenter${Wn}`,rr=`mouseleave${Wn}`,ir=`dragstart${Wn}`,ar=`load${Wn}${Gn}`,or=`click${Wn}${Gn}`,sr=`carousel`,cr=`active`,lr=`slide`,ur=`carousel-item-end`,dr=`carousel-item-start`,fr=`carousel-item-next`,pr=`carousel-item-prev`,mr=`.active`,hr=`.carousel-item`,gr=`.active.carousel-item`,_r=`.carousel-item img`,vr=`.carousel-indicators`,yr=`[data-bs-slide], [data-bs-slide-to]`,br=`[data-bs-ride="carousel"]`,xr={[Kn]:Qn,[qn]:Zn},Sr={interval:5e3,keyboard:!0,pause:`hover`,ride:!1,touch:!0,wrap:!0},Cr={interval:`(number|boolean)`,keyboard:`boolean`,pause:`(string|boolean)`,ride:`(boolean|string)`,touch:`boolean`,wrap:`boolean`},wr=class e extends fn{constructor(e,t){super(e,t),this._interval=null,this._activeElement=null,this._isSliding=!1,this.touchTimeout=null,this._swipeHelper=null,this._indicatorsElement=K.findOne(vr,this._element),this._addEventListeners(),this._config.ride===sr&&this.cycle()}static get Default(){return Sr}static get DefaultType(){return Cr}static get NAME(){return Un}next(){this._slide(Yn)}nextWhenVisible(){!document.hidden&&kt(this._element)&&this.next()}prev(){this._slide(Xn)}pause(){this._isSliding&&Et(this._element),this._clearInterval()}cycle(){this._clearInterval(),this._updateInterval(),this._interval=setInterval(()=>this.nextWhenVisible(),this._config.interval)}_maybeEnableCycle(){if(this._config.ride){if(this._isSliding){G.one(this._element,er,()=>this.cycle());return}this.cycle()}}to(e){let t=this._getItems();if(e>t.length-1||e<0)return;if(this._isSliding){G.one(this._element,er,()=>this.to(e));return}let n=this._getItemIndex(this._getActive());if(n===e)return;let r=e>n?Yn:Xn;this._slide(r,t[e])}dispose(){this._swipeHelper&&this._swipeHelper.dispose(),super.dispose()}_configAfterMerge(e){return e.defaultInterval=e.interval,e}_addEventListeners(){this._config.keyboard&&G.on(this._element,tr,e=>this._keydown(e)),this._config.pause===`hover`&&(G.on(this._element,nr,()=>this.pause()),G.on(this._element,rr,()=>this._maybeEnableCycle())),this._config.touch&&Hn.isSupported()&&this._addTouchEventListeners()}_addTouchEventListeners(){for(let e of K.find(_r,this._element))G.on(e,ir,e=>e.preventDefault());let e={leftCallback:()=>this._slide(this._directionToOrder(Zn)),rightCallback:()=>this._slide(this._directionToOrder(Qn)),endCallback:()=>{this._config.pause===`hover`&&(this.pause(),this.touchTimeout&&clearTimeout(this.touchTimeout),this.touchTimeout=setTimeout(()=>this._maybeEnableCycle(),Jn+this._config.interval))}};this._swipeHelper=new Hn(this._element,e)}_keydown(e){if(/input|textarea/i.test(e.target.tagName))return;let t=xr[e.key];t&&(e.preventDefault(),this._slide(this._directionToOrder(t)))}_getItemIndex(e){return this._getItems().indexOf(e)}_setActiveIndicatorElement(e){if(!this._indicatorsElement)return;let t=K.findOne(mr,this._indicatorsElement);t.classList.remove(cr),t.removeAttribute(`aria-current`);let n=K.findOne(`[data-bs-slide-to="${e}"]`,this._indicatorsElement);n&&(n.classList.add(cr),n.setAttribute(`aria-current`,`true`))}_updateInterval(){let e=this._activeElement||this._getActive();if(!e)return;let t=Number.parseInt(e.getAttribute(`data-bs-interval`),10);this._config.interval=t||this._config.defaultInterval}_slide(e,t=null){if(this._isSliding)return;let n=this._getActive(),r=e===Yn,i=t||Vt(this._getItems(),n,r,this._config.wrap);if(i===n)return;let a=this._getItemIndex(i),o=t=>G.trigger(this._element,t,{relatedTarget:i,direction:this._orderToDirection(e),from:this._getItemIndex(n),to:a});if(o($n).defaultPrevented||!n||!i)return;let s=!!this._interval;this.pause(),this._isSliding=!0,this._setActiveIndicatorElement(a),this._activeElement=i;let c=r?dr:ur,l=r?fr:pr;i.classList.add(l),Nt(i),n.classList.add(c),i.classList.add(c),this._queueCallback(()=>{i.classList.remove(c,l),i.classList.add(cr),n.classList.remove(cr,l,c),this._isSliding=!1,o(er)},n,this._isAnimated()),s&&this.cycle()}_isAnimated(){return this._element.classList.contains(lr)}_getActive(){return K.findOne(gr,this._element)}_getItems(){return K.find(hr,this._element)}_clearInterval(){this._interval&&=(clearInterval(this._interval),null)}_directionToOrder(e){return Lt()?e===Zn?Xn:Yn:e===Zn?Yn:Xn}_orderToDirection(e){return Lt()?e===Xn?Zn:Qn:e===Xn?Qn:Zn}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this,t);if(typeof t==`number`){n.to(t);return}if(typeof t==`string`){if(n[t]===void 0||t.startsWith(`_`)||t===`constructor`)throw TypeError(`No method named "${t}"`);n[t]()}})}};G.on(document,or,yr,function(e){let t=K.getElementFromSelector(this);if(!t||!t.classList.contains(sr))return;e.preventDefault();let n=wr.getOrCreateInstance(t),r=this.getAttribute(`data-bs-slide-to`);if(r){n.to(r),n._maybeEnableCycle();return}if(ln.getDataAttribute(this,`slide`)===`next`){n.next(),n._maybeEnableCycle();return}n.prev(),n._maybeEnableCycle()}),G.on(window,ar,()=>{let e=K.find(br);for(let t of e)wr.getOrCreateInstance(t)}),Rt(wr);var Tr=`collapse`,Er=`.bs.collapse`,Dr=`.data-api`,Or=`show${Er}`,kr=`shown${Er}`,Ar=`hide${Er}`,jr=`hidden${Er}`,Mr=`click${Er}${Dr}`,Nr=`show`,Pr=`collapse`,Fr=`collapsing`,Ir=`collapsed`,Lr=`:scope .${Pr} .${Pr}`,Rr=`collapse-horizontal`,zr=`width`,Br=`height`,Vr=`.collapse.show, .collapse.collapsing`,Hr=`[data-bs-toggle="collapse"]`,Ur={parent:null,toggle:!0},Wr={parent:`(null|element)`,toggle:`boolean`},Gr=class e extends fn{constructor(e,t){super(e,t),this._isTransitioning=!1,this._triggerArray=[];let n=K.find(Hr);for(let e of n){let t=K.getSelectorFromElement(e),n=K.find(t).filter(e=>e===this._element);t!==null&&n.length&&this._triggerArray.push(e)}this._initializeChildren(),this._config.parent||this._addAriaAndCollapsedClass(this._triggerArray,this._isShown()),this._config.toggle&&this.toggle()}static get Default(){return Ur}static get DefaultType(){return Wr}static get NAME(){return Tr}toggle(){this._isShown()?this.hide():this.show()}show(){if(this._isTransitioning||this._isShown())return;let t=[];if(this._config.parent&&(t=this._getFirstLevelChildren(Vr).filter(e=>e!==this._element).map(t=>e.getOrCreateInstance(t,{toggle:!1}))),t.length&&t[0]._isTransitioning||G.trigger(this._element,Or).defaultPrevented)return;for(let e of t)e.hide();let n=this._getDimension();this._element.classList.remove(Pr),this._element.classList.add(Fr),this._element.style[n]=0,this._addAriaAndCollapsedClass(this._triggerArray,!0),this._isTransitioning=!0;let r=()=>{this._isTransitioning=!1,this._element.classList.remove(Fr),this._element.classList.add(Pr,Nr),this._element.style[n]=``,G.trigger(this._element,kr)},i=`scroll${n[0].toUpperCase()+n.slice(1)}`;this._queueCallback(r,this._element,!0),this._element.style[n]=`${this._element[i]}px`}hide(){if(this._isTransitioning||!this._isShown()||G.trigger(this._element,Ar).defaultPrevented)return;let e=this._getDimension();this._element.style[e]=`${this._element.getBoundingClientRect()[e]}px`,Nt(this._element),this._element.classList.add(Fr),this._element.classList.remove(Pr,Nr);for(let e of this._triggerArray){let t=K.getElementFromSelector(e);t&&!this._isShown(t)&&this._addAriaAndCollapsedClass([e],!1)}this._isTransitioning=!0;let t=()=>{this._isTransitioning=!1,this._element.classList.remove(Fr),this._element.classList.add(Pr),G.trigger(this._element,jr)};this._element.style[e]=``,this._queueCallback(t,this._element,!0)}_isShown(e=this._element){return e.classList.contains(Nr)}_configAfterMerge(e){return e.toggle=!!e.toggle,e.parent=Ot(e.parent),e}_getDimension(){return this._element.classList.contains(Rr)?zr:Br}_initializeChildren(){if(!this._config.parent)return;let e=this._getFirstLevelChildren(Hr);for(let t of e){let e=K.getElementFromSelector(t);e&&this._addAriaAndCollapsedClass([t],this._isShown(e))}}_getFirstLevelChildren(e){let t=K.find(Lr,this._config.parent);return K.find(e,this._config.parent).filter(e=>!t.includes(e))}_addAriaAndCollapsedClass(e,t){if(e.length)for(let n of e)n.classList.toggle(Ir,!t),n.setAttribute(`aria-expanded`,t)}static jQueryInterface(t){let n={};return typeof t==`string`&&/show|hide/.test(t)&&(n.toggle=!1),this.each(function(){let r=e.getOrCreateInstance(this,n);if(typeof t==`string`){if(r[t]===void 0)throw TypeError(`No method named "${t}"`);r[t]()}})}};G.on(document,Mr,Hr,function(e){(e.target.tagName===`A`||e.delegateTarget&&e.delegateTarget.tagName===`A`)&&e.preventDefault();for(let e of K.getMultipleElementsFromSelector(this))Gr.getOrCreateInstance(e,{toggle:!1}).toggle()}),Rt(Gr);var Kr=`dropdown`,qr=`.bs.dropdown`,Jr=`.data-api`,Yr=`Escape`,Xr=`Tab`,Zr=`ArrowUp`,Qr=`ArrowDown`,$r=2,ei=`hide${qr}`,ti=`hidden${qr}`,ni=`show${qr}`,ri=`shown${qr}`,ii=`click${qr}${Jr}`,ai=`keydown${qr}${Jr}`,oi=`keyup${qr}${Jr}`,si=`show`,ci=`dropup`,li=`dropend`,ui=`dropstart`,di=`dropup-center`,fi=`dropdown-center`,pi=`[data-bs-toggle="dropdown"]:not(.disabled):not(:disabled)`,mi=`${pi}.${si}`,hi=`.dropdown-menu`,gi=`.navbar`,_i=`.navbar-nav`,vi=`.dropdown-menu .dropdown-item:not(.disabled):not(:disabled)`,yi=Lt()?`top-end`:`top-start`,bi=Lt()?`top-start`:`top-end`,xi=Lt()?`bottom-end`:`bottom-start`,Si=Lt()?`bottom-start`:`bottom-end`,Ci=Lt()?`left-start`:`right-start`,wi=Lt()?`right-start`:`left-start`,Ti=`top`,Ei=`bottom`,Di={autoClose:!0,boundary:`clippingParents`,display:`dynamic`,offset:[0,2],popperConfig:null,reference:`toggle`},Oi={autoClose:`(boolean|string)`,boundary:`(string|element)`,display:`string`,offset:`(array|string|function)`,popperConfig:`(null|object|function)`,reference:`(string|element|object)`},ki=class e extends fn{constructor(e,t){super(e,t),this._popper=null,this._parent=this._element.parentNode,this._menu=K.next(this._element,hi)[0]||K.prev(this._element,hi)[0]||K.findOne(hi,this._parent),this._inNavbar=this._detectNavbar()}static get Default(){return Di}static get DefaultType(){return Oi}static get NAME(){return Kr}toggle(){return this._isShown()?this.hide():this.show()}show(){if(At(this._element)||this._isShown())return;let e={relatedTarget:this._element};if(!G.trigger(this._element,ni,e).defaultPrevented){if(this._createPopper(),`ontouchstart`in document.documentElement&&!this._parent.closest(_i))for(let e of[].concat(...document.body.children))G.on(e,`mouseover`,Mt);this._element.focus(),this._element.setAttribute(`aria-expanded`,!0),this._menu.classList.add(si),this._element.classList.add(si),G.trigger(this._element,ri,e)}}hide(){if(At(this._element)||!this._isShown())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()}_completeHide(e){if(!G.trigger(this._element,ei,e).defaultPrevented){if(`ontouchstart`in document.documentElement)for(let e of[].concat(...document.body.children))G.off(e,`mouseover`,Mt);this._popper&&this._popper.destroy(),this._menu.classList.remove(si),this._element.classList.remove(si),this._element.setAttribute(`aria-expanded`,`false`),ln.removeDataAttribute(this._menu,`popper`),G.trigger(this._element,ti,e)}}_getConfig(e){if(e=super._getConfig(e),typeof e.reference==`object`&&!Dt(e.reference)&&typeof e.reference.getBoundingClientRect!=`function`)throw TypeError(`${Kr.toUpperCase()}: Option "reference" provided type "object" without a required "getBoundingClientRect" method.`);return e}_createPopper(){if(gt===void 0)throw TypeError(`Bootstrap's dropdowns require Popper (https://popper.js.org/docs/v2/)`);let e=this._element;this._config.reference===`parent`?e=this._parent:Dt(this._config.reference)?e=Ot(this._config.reference):typeof this._config.reference==`object`&&(e=this._config.reference);let t=this._getPopperConfig();this._popper=ht(e,this._menu,t)}_isShown(){return this._menu.classList.contains(si)}_getPlacement(){let e=this._parent;if(e.classList.contains(li))return Ci;if(e.classList.contains(ui))return wi;if(e.classList.contains(di))return Ti;if(e.classList.contains(fi))return Ei;let t=getComputedStyle(this._menu).getPropertyValue(`--bs-position`).trim()===`end`;return e.classList.contains(ci)?t?bi:yi:t?Si:xi}_detectNavbar(){return this._element.closest(gi)!==null}_getOffset(){let{offset:e}=this._config;return typeof e==`string`?e.split(`,`).map(e=>Number.parseInt(e,10)):typeof e==`function`?t=>e(t,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._inNavbar||this._config.display===`static`)&&(ln.setDataAttribute(this._menu,`popper`,`static`),e.modifiers=[{name:`applyStyles`,enabled:!1}]),{...e,...zt(this._config.popperConfig,[void 0,e])}}_selectMenuItem({key:e,target:t}){let n=K.find(vi,this._menu).filter(e=>kt(e));n.length&&Vt(n,t,e===Qr,!n.includes(t)).focus()}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this,t);if(typeof t==`string`){if(n[t]===void 0)throw TypeError(`No method named "${t}"`);n[t]()}})}static clearMenus(t){if(t.button===$r||t.type===`keyup`&&t.key!==Xr)return;let n=K.find(mi);for(let r of n){let n=e.getInstance(r);if(!n||n._config.autoClose===!1)continue;let i=t.composedPath(),a=i.includes(n._menu);if(i.includes(n._element)||n._config.autoClose===`inside`&&!a||n._config.autoClose===`outside`&&a||n._menu.contains(t.target)&&(t.type===`keyup`&&t.key===Xr||/input|select|option|textarea|form/i.test(t.target.tagName)))continue;let o={relatedTarget:n._element};t.type===`click`&&(o.clickEvent=t),n._completeHide(o)}}static dataApiKeydownHandler(t){let n=/input|textarea/i.test(t.target.tagName),r=t.key===Yr,i=[Zr,Qr].includes(t.key);if(!i&&!r||n&&!r)return;t.preventDefault();let a=this.matches(pi)?this:K.prev(this,pi)[0]||K.next(this,pi)[0]||K.findOne(pi,t.delegateTarget.parentNode),o=e.getOrCreateInstance(a);if(i){t.stopPropagation(),o.show(),o._selectMenuItem(t);return}o._isShown()&&(t.stopPropagation(),o.hide(),a.focus())}};G.on(document,ai,pi,ki.dataApiKeydownHandler),G.on(document,ai,hi,ki.dataApiKeydownHandler),G.on(document,ii,ki.clearMenus),G.on(document,oi,ki.clearMenus),G.on(document,ii,pi,function(e){e.preventDefault(),ki.getOrCreateInstance(this).toggle()}),Rt(ki);var Ai=`backdrop`,ji=`fade`,Mi=`show`,Ni=`mousedown.bs.${Ai}`,Pi={className:`modal-backdrop`,clickCallback:null,isAnimated:!1,isVisible:!0,rootElement:`body`},Fi={className:`string`,clickCallback:`(function|null)`,isAnimated:`boolean`,isVisible:`boolean`,rootElement:`(element|string)`},Ii=class extends un{constructor(e){super(),this._config=this._getConfig(e),this._isAppended=!1,this._element=null}static get Default(){return Pi}static get DefaultType(){return Fi}static get NAME(){return Ai}show(e){if(!this._config.isVisible){zt(e);return}this._append();let t=this._getElement();this._config.isAnimated&&Nt(t),t.classList.add(Mi),this._emulateAnimation(()=>{zt(e)})}hide(e){if(!this._config.isVisible){zt(e);return}this._getElement().classList.remove(Mi),this._emulateAnimation(()=>{this.dispose(),zt(e)})}dispose(){this._isAppended&&=(G.off(this._element,Ni),this._element.remove(),!1)}_getElement(){if(!this._element){let e=document.createElement(`div`);e.className=this._config.className,this._config.isAnimated&&e.classList.add(ji),this._element=e}return this._element}_configAfterMerge(e){return e.rootElement=Ot(e.rootElement),e}_append(){if(this._isAppended)return;let e=this._getElement();this._config.rootElement.append(e),G.on(e,Ni,()=>{zt(this._config.clickCallback)}),this._isAppended=!0}_emulateAnimation(e){Bt(e,this._getElement(),this._config.isAnimated)}},Li=`focustrap`,Ri=`.bs.focustrap`,zi=`focusin${Ri}`,Bi=`keydown.tab${Ri}`,Vi=`Tab`,Hi=`forward`,Ui=`backward`,Wi={autofocus:!0,trapElement:null},Gi={autofocus:`boolean`,trapElement:`element`},Ki=class extends un{constructor(e){super(),this._config=this._getConfig(e),this._isActive=!1,this._lastTabNavDirection=null}static get Default(){return Wi}static get DefaultType(){return Gi}static get NAME(){return Li}activate(){this._isActive||=(this._config.autofocus&&this._config.trapElement.focus(),G.off(document,Ri),G.on(document,zi,e=>this._handleFocusin(e)),G.on(document,Bi,e=>this._handleKeydown(e)),!0)}deactivate(){this._isActive&&(this._isActive=!1,G.off(document,Ri))}_handleFocusin(e){let{trapElement:t}=this._config;if(e.target===document||e.target===t||t.contains(e.target))return;let n=K.focusableChildren(t);n.length===0?t.focus():this._lastTabNavDirection===Ui?n[n.length-1].focus():n[0].focus()}_handleKeydown(e){e.key===Vi&&(this._lastTabNavDirection=e.shiftKey?Ui:Hi)}},qi=`.fixed-top, .fixed-bottom, .is-fixed, .sticky-top`,Ji=`.sticky-top`,Yi=`padding-right`,Xi=`margin-right`,Zi=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,Yi,t=>t+e),this._setElementAttributes(qi,Yi,t=>t+e),this._setElementAttributes(Ji,Xi,t=>t-e)}reset(){this._resetElementAttributes(this._element,`overflow`),this._resetElementAttributes(this._element,Yi),this._resetElementAttributes(qi,Yi),this._resetElementAttributes(Ji,Xi)}isOverflowing(){return this.getWidth()>0}_disableOverFlow(){this._saveInitialAttribute(this._element,`overflow`),this._element.style.overflow=`hidden`}_setElementAttributes(e,t,n){let r=this.getWidth();this._applyManipulationCallback(e,e=>{if(e!==this._element&&window.innerWidth>e.clientWidth+r)return;this._saveInitialAttribute(e,t);let i=window.getComputedStyle(e).getPropertyValue(t);e.style.setProperty(t,`${n(Number.parseFloat(i))}px`)})}_saveInitialAttribute(e,t){let n=e.style.getPropertyValue(t);n&&ln.setDataAttribute(e,t,n)}_resetElementAttributes(e,t){this._applyManipulationCallback(e,e=>{let n=ln.getDataAttribute(e,t);if(n===null){e.style.removeProperty(t);return}ln.removeDataAttribute(e,t),e.style.setProperty(t,n)})}_applyManipulationCallback(e,t){if(Dt(e)){t(e);return}for(let n of K.find(e,this._element))t(n)}},Qi=`modal`,$i=`.bs.modal`,ea=`.data-api`,ta=`Escape`,na=`hide${$i}`,ra=`hidePrevented${$i}`,ia=`hidden${$i}`,aa=`show${$i}`,oa=`shown${$i}`,sa=`resize${$i}`,ca=`click.dismiss${$i}`,la=`mousedown.dismiss${$i}`,ua=`keydown.dismiss${$i}`,da=`click${$i}${ea}`,fa=`modal-open`,pa=`fade`,ma=`show`,ha=`modal-static`,ga=`.modal.show`,_a=`.modal-dialog`,va=`.modal-body`,ya=`[data-bs-toggle="modal"]`,ba={backdrop:!0,focus:!0,keyboard:!0},xa={backdrop:`(boolean|string)`,focus:`boolean`,keyboard:`boolean`},Sa=class e extends fn{constructor(e,t){super(e,t),this._dialog=K.findOne(_a,this._element),this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._isShown=!1,this._isTransitioning=!1,this._scrollBar=new Zi,this._addEventListeners()}static get Default(){return ba}static get DefaultType(){return xa}static get NAME(){return Qi}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||this._isTransitioning||G.trigger(this._element,aa,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._isTransitioning=!0,this._scrollBar.hide(),document.body.classList.add(fa),this._adjustDialog(),this._backdrop.show(()=>this._showElement(e)))}hide(){!this._isShown||this._isTransitioning||G.trigger(this._element,na).defaultPrevented||(this._isShown=!1,this._isTransitioning=!0,this._focustrap.deactivate(),this._element.classList.remove(ma),this._queueCallback(()=>this._hideModal(),this._element,this._isAnimated()))}dispose(){G.off(window,$i),G.off(this._dialog,$i),this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}handleUpdate(){this._adjustDialog()}_initializeBackDrop(){return new Ii({isVisible:!!this._config.backdrop,isAnimated:this._isAnimated()})}_initializeFocusTrap(){return new Ki({trapElement:this._element})}_showElement(e){document.body.contains(this._element)||document.body.append(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;let t=K.findOne(va,this._dialog);t&&(t.scrollTop=0),Nt(this._element),this._element.classList.add(ma),this._queueCallback(()=>{this._config.focus&&this._focustrap.activate(),this._isTransitioning=!1,G.trigger(this._element,oa,{relatedTarget:e})},this._dialog,this._isAnimated())}_addEventListeners(){G.on(this._element,ua,e=>{if(e.key===ta){if(this._config.keyboard){this.hide();return}this._triggerBackdropTransition()}}),G.on(window,sa,()=>{this._isShown&&!this._isTransitioning&&this._adjustDialog()}),G.on(this._element,la,e=>{G.one(this._element,ca,t=>{if(!(this._element!==e.target||this._element!==t.target)){if(this._config.backdrop===`static`){this._triggerBackdropTransition();return}this._config.backdrop&&this.hide()}})})}_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(fa),this._resetAdjustments(),this._scrollBar.reset(),G.trigger(this._element,ia)})}_isAnimated(){return this._element.classList.contains(pa)}_triggerBackdropTransition(){if(G.trigger(this._element,ra).defaultPrevented)return;let e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._element.style.overflowY;t===`hidden`||this._element.classList.contains(ha)||(e||(this._element.style.overflowY=`hidden`),this._element.classList.add(ha),this._queueCallback(()=>{this._element.classList.remove(ha),this._queueCallback(()=>{this._element.style.overflowY=t},this._dialog)},this._dialog),this._element.focus())}_adjustDialog(){let e=this._element.scrollHeight>document.documentElement.clientHeight,t=this._scrollBar.getWidth(),n=t>0;if(n&&!e){let e=Lt()?`paddingLeft`:`paddingRight`;this._element.style[e]=`${t}px`}if(!n&&e){let e=Lt()?`paddingRight`:`paddingLeft`;this._element.style[e]=`${t}px`}}_resetAdjustments(){this._element.style.paddingLeft=``,this._element.style.paddingRight=``}static jQueryInterface(t,n){return this.each(function(){let r=e.getOrCreateInstance(this,t);if(typeof t==`string`){if(r[t]===void 0)throw TypeError(`No method named "${t}"`);r[t](n)}})}};G.on(document,da,ya,function(e){let t=K.getElementFromSelector(this);[`A`,`AREA`].includes(this.tagName)&&e.preventDefault(),G.one(t,aa,e=>{e.defaultPrevented||G.one(t,ia,()=>{kt(this)&&this.focus()})});let n=K.findOne(ga);n&&Sa.getInstance(n).hide(),Sa.getOrCreateInstance(t).toggle(this)}),mn(Sa),Rt(Sa);var Ca=`offcanvas`,wa=`.bs.offcanvas`,Ta=`.data-api`,Ea=`load${wa}${Ta}`,Da=`Escape`,Oa=`show`,ka=`showing`,Aa=`hiding`,ja=`offcanvas-backdrop`,Ma=`.offcanvas.show`,Na=`show${wa}`,Pa=`shown${wa}`,Fa=`hide${wa}`,Ia=`hidePrevented${wa}`,La=`hidden${wa}`,Ra=`resize${wa}`,za=`click${wa}${Ta}`,Ba=`keydown.dismiss${wa}`,Va=`[data-bs-toggle="offcanvas"]`,Ha={backdrop:!0,keyboard:!0,scroll:!1},Ua={backdrop:`(boolean|string)`,keyboard:`boolean`,scroll:`boolean`},Wa=class e extends fn{constructor(e,t){super(e,t),this._isShown=!1,this._backdrop=this._initializeBackDrop(),this._focustrap=this._initializeFocusTrap(),this._addEventListeners()}static get Default(){return Ha}static get DefaultType(){return Ua}static get NAME(){return Ca}toggle(e){return this._isShown?this.hide():this.show(e)}show(e){this._isShown||G.trigger(this._element,Na,{relatedTarget:e}).defaultPrevented||(this._isShown=!0,this._backdrop.show(),this._config.scroll||new Zi().hide(),this._element.setAttribute(`aria-modal`,!0),this._element.setAttribute(`role`,`dialog`),this._element.classList.add(ka),this._queueCallback(()=>{(!this._config.scroll||this._config.backdrop)&&this._focustrap.activate(),this._element.classList.add(Oa),this._element.classList.remove(ka),G.trigger(this._element,Pa,{relatedTarget:e})},this._element,!0))}hide(){!this._isShown||G.trigger(this._element,Fa).defaultPrevented||(this._focustrap.deactivate(),this._element.blur(),this._isShown=!1,this._element.classList.add(Aa),this._backdrop.hide(),this._queueCallback(()=>{this._element.classList.remove(Oa,Aa),this._element.removeAttribute(`aria-modal`),this._element.removeAttribute(`role`),this._config.scroll||new Zi().reset(),G.trigger(this._element,La)},this._element,!0))}dispose(){this._backdrop.dispose(),this._focustrap.deactivate(),super.dispose()}_initializeBackDrop(){let e=()=>{if(this._config.backdrop===`static`){G.trigger(this._element,Ia);return}this.hide()},t=!!this._config.backdrop;return new Ii({className:ja,isVisible:t,isAnimated:!0,rootElement:this._element.parentNode,clickCallback:t?e:null})}_initializeFocusTrap(){return new Ki({trapElement:this._element})}_addEventListeners(){G.on(this._element,Ba,e=>{if(e.key===Da){if(this._config.keyboard){this.hide();return}G.trigger(this._element,Ia)}})}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this,t);if(typeof t==`string`){if(n[t]===void 0||t.startsWith(`_`)||t===`constructor`)throw TypeError(`No method named "${t}"`);n[t](this)}})}};G.on(document,za,Va,function(e){let t=K.getElementFromSelector(this);if([`A`,`AREA`].includes(this.tagName)&&e.preventDefault(),At(this))return;G.one(t,La,()=>{kt(this)&&this.focus()});let n=K.findOne(Ma);n&&n!==t&&Wa.getInstance(n).hide(),Wa.getOrCreateInstance(t).toggle(this)}),G.on(window,Ea,()=>{for(let e of K.find(Ma))Wa.getOrCreateInstance(e).show()}),G.on(window,Ra,()=>{for(let e of K.find(`[aria-modal][class*=show][class*=offcanvas-]`))getComputedStyle(e).position!==`fixed`&&Wa.getOrCreateInstance(e).hide()}),mn(Wa),Rt(Wa);var Ga={"*":[`class`,`dir`,`id`,`lang`,`role`,/^aria-[w-]*$/i],a:[`target`,`href`,`title`,`rel`],area:[],b:[],br:[],col:[],code:[],dd:[],div:[],dl:[],dt:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:[`src`,`srcset`,`alt`,`title`,`width`,`height`],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},Ka=new Set([`background`,`cite`,`href`,`itemtype`,`longdesc`,`poster`,`src`,`xlink:href`]),qa=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:/?#]*(?:[/?#]|$))/i,Ja=(e,t)=>{let n=e.nodeName.toLowerCase();return t.includes(n)?Ka.has(n)?!!qa.test(e.nodeValue):!0:t.filter(e=>e instanceof RegExp).some(e=>e.test(n))};function Ya(e,t,n){if(!e.length)return e;if(n&&typeof n==`function`)return n(e);let r=new window.DOMParser().parseFromString(e,`text/html`),i=[].concat(...r.body.querySelectorAll(`*`));for(let e of i){let n=e.nodeName.toLowerCase();if(!Object.keys(t).includes(n)){e.remove();continue}let r=[].concat(...e.attributes),i=[].concat(t[`*`]||[],t[n]||[]);for(let t of r)Ja(t,i)||e.removeAttribute(t.nodeName)}return r.body.innerHTML}var Xa=`TemplateFactory`,Za={allowList:Ga,content:{},extraClass:``,html:!1,sanitize:!0,sanitizeFn:null,template:`<div></div>`},Qa={allowList:`object`,content:`object`,extraClass:`(string|function)`,html:`boolean`,sanitize:`boolean`,sanitizeFn:`(null|function)`,template:`string`},$a={entry:`(string|element|function|null)`,selector:`(string|element)`},eo=class extends un{constructor(e){super(),this._config=this._getConfig(e)}static get Default(){return Za}static get DefaultType(){return Qa}static get NAME(){return Xa}getContent(){return Object.values(this._config.content).map(e=>this._resolvePossibleFunction(e)).filter(Boolean)}hasContent(){return this.getContent().length>0}changeContent(e){return this._checkContent(e),this._config.content={...this._config.content,...e},this}toHtml(){let e=document.createElement(`div`);e.innerHTML=this._maybeSanitize(this._config.template);for(let[t,n]of Object.entries(this._config.content))this._setContent(e,n,t);let t=e.children[0],n=this._resolvePossibleFunction(this._config.extraClass);return n&&t.classList.add(...n.split(` `)),t}_typeCheckConfig(e){super._typeCheckConfig(e),this._checkContent(e.content)}_checkContent(e){for(let[t,n]of Object.entries(e))super._typeCheckConfig({selector:t,entry:n},$a)}_setContent(e,t,n){let r=K.findOne(n,e);if(r){if(t=this._resolvePossibleFunction(t),!t){r.remove();return}if(Dt(t)){this._putElementInTemplate(Ot(t),r);return}if(this._config.html){r.innerHTML=this._maybeSanitize(t);return}r.textContent=t}}_maybeSanitize(e){return this._config.sanitize?Ya(e,this._config.allowList,this._config.sanitizeFn):e}_resolvePossibleFunction(e){return zt(e,[void 0,this])}_putElementInTemplate(e,t){if(this._config.html){t.innerHTML=``,t.append(e);return}t.textContent=e.textContent}},to=`tooltip`,no=new Set([`sanitize`,`allowList`,`sanitizeFn`]),ro=`fade`,io=`modal`,ao=`show`,oo=`.tooltip-inner`,so=`.${io}`,co=`hide.bs.modal`,lo=`hover`,uo=`focus`,fo=`click`,po=`manual`,mo=`hide`,ho=`hidden`,go=`show`,_o=`shown`,vo=`inserted`,yo=`click`,bo=`focusin`,xo=`focusout`,So=`mouseenter`,Co=`mouseleave`,wo={AUTO:`auto`,TOP:`top`,RIGHT:Lt()?`left`:`right`,BOTTOM:`bottom`,LEFT:Lt()?`right`:`left`},To={allowList:Ga,animation:!0,boundary:`clippingParents`,container:!1,customClass:``,delay:0,fallbackPlacements:[`top`,`right`,`bottom`,`left`],html:!1,offset:[0,6],placement:`top`,popperConfig:null,sanitize:!0,sanitizeFn:null,selector:!1,template:`<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>`,title:``,trigger:`hover focus`},Eo={allowList:`object`,animation:`boolean`,boundary:`(string|element)`,container:`(string|element|boolean)`,customClass:`(string|function)`,delay:`(number|object)`,fallbackPlacements:`array`,html:`boolean`,offset:`(array|string|function)`,placement:`(string|function)`,popperConfig:`(null|object|function)`,sanitize:`boolean`,sanitizeFn:`(null|function)`,selector:`(string|boolean)`,template:`string`,title:`(string|element|function)`,trigger:`string`},Do=class e extends fn{constructor(e,t){if(gt===void 0)throw TypeError(`Bootstrap's tooltips require Popper (https://popper.js.org/docs/v2/)`);super(e,t),this._isEnabled=!0,this._timeout=0,this._isHovered=null,this._activeTrigger={},this._popper=null,this._templateFactory=null,this._newContent=null,this.tip=null,this._setListeners(),this._config.selector||this._fixTitle()}static get Default(){return To}static get DefaultType(){return Eo}static get NAME(){return to}enable(){this._isEnabled=!0}disable(){this._isEnabled=!1}toggleEnabled(){this._isEnabled=!this._isEnabled}toggle(){if(this._isEnabled){if(this._isShown()){this._leave();return}this._enter()}}dispose(){clearTimeout(this._timeout),G.off(this._element.closest(so),co,this._hideModalHandler),this._element.getAttribute(`data-bs-original-title`)&&this._element.setAttribute(`title`,this._element.getAttribute(`data-bs-original-title`)),this._disposePopper(),super.dispose()}show(){if(this._element.style.display===`none`)throw Error(`Please use show on visible elements`);if(!(this._isWithContent()&&this._isEnabled))return;let e=G.trigger(this._element,this.constructor.eventName(go)),t=(jt(this._element)||this._element.ownerDocument.documentElement).contains(this._element);if(e.defaultPrevented||!t)return;this._disposePopper();let n=this._getTipElement();this._element.setAttribute(`aria-describedby`,n.getAttribute(`id`));let{container:r}=this._config;if(this._element.ownerDocument.documentElement.contains(this.tip)||(r.append(n),G.trigger(this._element,this.constructor.eventName(vo))),this._popper=this._createPopper(n),n.classList.add(ao),`ontouchstart`in document.documentElement)for(let e of[].concat(...document.body.children))G.on(e,`mouseover`,Mt);this._queueCallback(()=>{G.trigger(this._element,this.constructor.eventName(_o)),this._isHovered===!1&&this._leave(),this._isHovered=!1},this.tip,this._isAnimated())}hide(){if(!(!this._isShown()||G.trigger(this._element,this.constructor.eventName(mo)).defaultPrevented)){if(this._getTipElement().classList.remove(ao),`ontouchstart`in document.documentElement)for(let e of[].concat(...document.body.children))G.off(e,`mouseover`,Mt);this._activeTrigger[fo]=!1,this._activeTrigger[uo]=!1,this._activeTrigger[lo]=!1,this._isHovered=null,this._queueCallback(()=>{this._isWithActiveTrigger()||(this._isHovered||this._disposePopper(),this._element.removeAttribute(`aria-describedby`),G.trigger(this._element,this.constructor.eventName(ho)))},this.tip,this._isAnimated())}}update(){this._popper&&this._popper.update()}_isWithContent(){return!!this._getTitle()}_getTipElement(){return this.tip||=this._createTipElement(this._newContent||this._getContentForTemplate()),this.tip}_createTipElement(e){let t=this._getTemplateFactory(e).toHtml();if(!t)return null;t.classList.remove(ro,ao),t.classList.add(`bs-${this.constructor.NAME}-auto`);let n=wt(this.constructor.NAME).toString();return t.setAttribute(`id`,n),this._isAnimated()&&t.classList.add(ro),t}setContent(e){this._newContent=e,this._isShown()&&(this._disposePopper(),this.show())}_getTemplateFactory(e){return this._templateFactory?this._templateFactory.changeContent(e):this._templateFactory=new eo({...this._config,content:e,extraClass:this._resolvePossibleFunction(this._config.customClass)}),this._templateFactory}_getContentForTemplate(){return{[oo]:this._getTitle()}}_getTitle(){return this._resolvePossibleFunction(this._config.title)||this._element.getAttribute(`data-bs-original-title`)}_initializeOnDelegatedTarget(e){return this.constructor.getOrCreateInstance(e.delegateTarget,this._getDelegateConfig())}_isAnimated(){return this._config.animation||this.tip&&this.tip.classList.contains(ro)}_isShown(){return this.tip&&this.tip.classList.contains(ao)}_createPopper(e){let t=wo[zt(this._config.placement,[this,e,this._element]).toUpperCase()];return ht(this._element,e,this._getPopperConfig(t))}_getOffset(){let{offset:e}=this._config;return typeof e==`string`?e.split(`,`).map(e=>Number.parseInt(e,10)):typeof e==`function`?t=>e(t,this._element):e}_resolvePossibleFunction(e){return zt(e,[this._element,this._element])}_getPopperConfig(e){let t={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:`preSetPlacement`,enabled:!0,phase:`beforeMain`,fn:e=>{this._getTipElement().setAttribute(`data-popper-placement`,e.state.placement)}}]};return{...t,...zt(this._config.popperConfig,[void 0,t])}}_setListeners(){let e=this._config.trigger.split(` `);for(let t of e)if(t===`click`)G.on(this._element,this.constructor.eventName(yo),this._config.selector,e=>{let t=this._initializeOnDelegatedTarget(e);t._activeTrigger[fo]=!(t._isShown()&&t._activeTrigger[fo]),t.toggle()});else if(t!==po){let e=t===lo?this.constructor.eventName(So):this.constructor.eventName(bo),n=t===lo?this.constructor.eventName(Co):this.constructor.eventName(xo);G.on(this._element,e,this._config.selector,e=>{let t=this._initializeOnDelegatedTarget(e);t._activeTrigger[e.type===`focusin`?uo:lo]=!0,t._enter()}),G.on(this._element,n,this._config.selector,e=>{let t=this._initializeOnDelegatedTarget(e);t._activeTrigger[e.type===`focusout`?uo:lo]=t._element.contains(e.relatedTarget),t._leave()})}this._hideModalHandler=()=>{this._element&&this.hide()},G.on(this._element.closest(so),co,this._hideModalHandler)}_fixTitle(){let e=this._element.getAttribute(`title`);e&&(!this._element.getAttribute(`aria-label`)&&!this._element.textContent.trim()&&this._element.setAttribute(`aria-label`,e),this._element.setAttribute(`data-bs-original-title`,e),this._element.removeAttribute(`title`))}_enter(){if(this._isShown()||this._isHovered){this._isHovered=!0;return}this._isHovered=!0,this._setTimeout(()=>{this._isHovered&&this.show()},this._config.delay.show)}_leave(){this._isWithActiveTrigger()||(this._isHovered=!1,this._setTimeout(()=>{this._isHovered||this.hide()},this._config.delay.hide))}_setTimeout(e,t){clearTimeout(this._timeout),this._timeout=setTimeout(e,t)}_isWithActiveTrigger(){return Object.values(this._activeTrigger).includes(!0)}_getConfig(e){let t=ln.getDataAttributes(this._element);for(let e of Object.keys(t))no.has(e)&&delete t[e];return e={...t,...typeof e==`object`&&e?e:{}},e=this._mergeConfigObj(e),e=this._configAfterMerge(e),this._typeCheckConfig(e),e}_configAfterMerge(e){return e.container=e.container===!1?document.body:Ot(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()),e}_getDelegateConfig(){let e={};for(let[t,n]of Object.entries(this._config))this.constructor.Default[t]!==n&&(e[t]=n);return e.selector=!1,e.trigger=`manual`,e}_disposePopper(){this._popper&&=(this._popper.destroy(),null),this.tip&&=(this.tip.remove(),null)}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this,t);if(typeof t==`string`){if(n[t]===void 0)throw TypeError(`No method named "${t}"`);n[t]()}})}};Rt(Do);var Oo=`popover`,ko=`.popover-header`,Ao=`.popover-body`,jo={...Do.Default,content:``,offset:[0,8],placement:`right`,template:`<div class="popover" role="tooltip"><div class="popover-arrow"></div><h3 class="popover-header"></h3><div class="popover-body"></div></div>`,trigger:`click`},Mo={...Do.DefaultType,content:`(null|string|element|function)`},No=class e extends Do{static get Default(){return jo}static get DefaultType(){return Mo}static get NAME(){return Oo}_isWithContent(){return this._getTitle()||this._getContent()}_getContentForTemplate(){return{[ko]:this._getTitle(),[Ao]:this._getContent()}}_getContent(){return this._resolvePossibleFunction(this._config.content)}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this,t);if(typeof t==`string`){if(n[t]===void 0)throw TypeError(`No method named "${t}"`);n[t]()}})}};Rt(No);var Po=`scrollspy`,Fo=`.bs.scrollspy`,Io=`.data-api`,Lo=`activate${Fo}`,Ro=`click${Fo}`,zo=`load${Fo}${Io}`,Bo=`dropdown-item`,Vo=`active`,Ho=`[data-bs-spy="scroll"]`,Uo=`[href]`,Wo=`.nav, .list-group`,Go=`.nav-link`,Ko=`${Go}, .nav-item > ${Go}, .list-group-item`,qo=`.dropdown`,Jo=`.dropdown-toggle`,Yo={offset:null,rootMargin:`0px 0px -25%`,smoothScroll:!1,target:null,threshold:[.1,.5,1]},Xo={offset:`(number|null)`,rootMargin:`string`,smoothScroll:`boolean`,target:`element`,threshold:`array`},Zo=class e extends fn{constructor(e,t){super(e,t),this._targetLinks=new Map,this._observableSections=new Map,this._rootElement=getComputedStyle(this._element).overflowY===`visible`?null:this._element,this._activeTarget=null,this._observer=null,this._previousScrollData={visibleEntryTop:0,parentScrollTop:0},this.refresh()}static get Default(){return Yo}static get DefaultType(){return Xo}static get NAME(){return Po}refresh(){this._initializeTargetsAndObservables(),this._maybeEnableSmoothScroll(),this._observer?this._observer.disconnect():this._observer=this._getNewObserver();for(let e of this._observableSections.values())this._observer.observe(e)}dispose(){this._observer.disconnect(),super.dispose()}_configAfterMerge(e){return e.target=Ot(e.target)||document.body,e.rootMargin=e.offset?`${e.offset}px 0px -30%`:e.rootMargin,typeof e.threshold==`string`&&(e.threshold=e.threshold.split(`,`).map(e=>Number.parseFloat(e))),e}_maybeEnableSmoothScroll(){this._config.smoothScroll&&(G.off(this._config.target,Ro),G.on(this._config.target,Ro,Uo,e=>{let t=this._observableSections.get(e.target.hash);if(t){e.preventDefault();let n=this._rootElement||window,r=t.offsetTop-this._element.offsetTop;if(n.scrollTo){n.scrollTo({top:r,behavior:`smooth`});return}n.scrollTop=r}}))}_getNewObserver(){let e={root:this._rootElement,threshold:this._config.threshold,rootMargin:this._config.rootMargin};return new IntersectionObserver(e=>this._observerCallback(e),e)}_observerCallback(e){let t=e=>this._targetLinks.get(`#${e.target.id}`),n=e=>{this._previousScrollData.visibleEntryTop=e.target.offsetTop,this._process(t(e))},r=(this._rootElement||document.documentElement).scrollTop,i=r>=this._previousScrollData.parentScrollTop;this._previousScrollData.parentScrollTop=r;for(let a of e){if(!a.isIntersecting){this._activeTarget=null,this._clearActiveClass(t(a));continue}let e=a.target.offsetTop>=this._previousScrollData.visibleEntryTop;if(i&&e){if(n(a),!r)return;continue}!i&&!e&&n(a)}}_initializeTargetsAndObservables(){this._targetLinks=new Map,this._observableSections=new Map;let e=K.find(Uo,this._config.target);for(let t of e){if(!t.hash||At(t))continue;let e=K.findOne(decodeURI(t.hash),this._element);kt(e)&&(this._targetLinks.set(decodeURI(t.hash),t),this._observableSections.set(t.hash,e))}}_process(e){this._activeTarget!==e&&(this._clearActiveClass(this._config.target),this._activeTarget=e,e.classList.add(Vo),this._activateParents(e),G.trigger(this._element,Lo,{relatedTarget:e}))}_activateParents(e){if(e.classList.contains(Bo)){K.findOne(Jo,e.closest(qo)).classList.add(Vo);return}for(let t of K.parents(e,Wo))for(let e of K.prev(t,Ko))e.classList.add(Vo)}_clearActiveClass(e){e.classList.remove(Vo);let t=K.find(`${Uo}.${Vo}`,e);for(let e of t)e.classList.remove(Vo)}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this,t);if(typeof t==`string`){if(n[t]===void 0||t.startsWith(`_`)||t===`constructor`)throw TypeError(`No method named "${t}"`);n[t]()}})}};G.on(window,zo,()=>{for(let e of K.find(Ho))Zo.getOrCreateInstance(e)}),Rt(Zo);var Qo=`tab`,$o=`.bs.tab`,es=`hide${$o}`,ts=`hidden${$o}`,ns=`show${$o}`,rs=`shown${$o}`,is=`click${$o}`,as=`keydown${$o}`,os=`load${$o}`,ss=`ArrowLeft`,cs=`ArrowRight`,ls=`ArrowUp`,us=`ArrowDown`,ds=`Home`,fs=`End`,ps=`active`,ms=`fade`,hs=`show`,gs=`dropdown`,_s=`.dropdown-toggle`,vs=`.dropdown-menu`,ys=`:not(${_s})`,bs=`.list-group, .nav, [role="tablist"]`,xs=`.nav-item, .list-group-item`,Ss=`.nav-link${ys}, .list-group-item${ys}, [role="tab"]${ys}`,Cs=`[data-bs-toggle="tab"], [data-bs-toggle="pill"], [data-bs-toggle="list"]`,ws=`${Ss}, ${Cs}`,Ts=`.${ps}[data-bs-toggle="tab"], .${ps}[data-bs-toggle="pill"], .${ps}[data-bs-toggle="list"]`,Es=class e extends fn{constructor(e){super(e),this._parent=this._element.closest(bs),this._parent&&(this._setInitialAttributes(this._parent,this._getChildren()),G.on(this._element,as,e=>this._keydown(e)))}static get NAME(){return Qo}show(){let e=this._element;if(this._elemIsActive(e))return;let t=this._getActiveElem(),n=t?G.trigger(t,es,{relatedTarget:e}):null;G.trigger(e,ns,{relatedTarget:t}).defaultPrevented||n&&n.defaultPrevented||(this._deactivate(t,e),this._activate(e,t))}_activate(e,t){e&&(e.classList.add(ps),this._activate(K.getElementFromSelector(e)),this._queueCallback(()=>{if(e.getAttribute(`role`)!==`tab`){e.classList.add(hs);return}e.removeAttribute(`tabindex`),e.setAttribute(`aria-selected`,!0),this._toggleDropDown(e,!0),G.trigger(e,rs,{relatedTarget:t})},e,e.classList.contains(ms)))}_deactivate(e,t){e&&(e.classList.remove(ps),e.blur(),this._deactivate(K.getElementFromSelector(e)),this._queueCallback(()=>{if(e.getAttribute(`role`)!==`tab`){e.classList.remove(hs);return}e.setAttribute(`aria-selected`,!1),e.setAttribute(`tabindex`,`-1`),this._toggleDropDown(e,!1),G.trigger(e,ts,{relatedTarget:t})},e,e.classList.contains(ms)))}_keydown(t){if(![ss,cs,ls,us,ds,fs].includes(t.key))return;t.stopPropagation(),t.preventDefault();let n=this._getChildren().filter(e=>!At(e)),r;if([ds,fs].includes(t.key))r=n[t.key===ds?0:n.length-1];else{let e=[cs,us].includes(t.key);r=Vt(n,t.target,e,!0)}r&&(r.focus({preventScroll:!0}),e.getOrCreateInstance(r).show())}_getChildren(){return K.find(ws,this._parent)}_getActiveElem(){return this._getChildren().find(e=>this._elemIsActive(e))||null}_setInitialAttributes(e,t){this._setAttributeIfNotExists(e,`role`,`tablist`);for(let e of t)this._setInitialAttributesOnChild(e)}_setInitialAttributesOnChild(e){e=this._getInnerElement(e);let t=this._elemIsActive(e),n=this._getOuterElement(e);e.setAttribute(`aria-selected`,t),n!==e&&this._setAttributeIfNotExists(n,`role`,`presentation`),t||e.setAttribute(`tabindex`,`-1`),this._setAttributeIfNotExists(e,`role`,`tab`),this._setInitialAttributesOnTargetPanel(e)}_setInitialAttributesOnTargetPanel(e){let t=K.getElementFromSelector(e);t&&(this._setAttributeIfNotExists(t,`role`,`tabpanel`),e.id&&this._setAttributeIfNotExists(t,`aria-labelledby`,`${e.id}`))}_toggleDropDown(e,t){let n=this._getOuterElement(e);if(!n.classList.contains(gs))return;let r=(e,r)=>{let i=K.findOne(e,n);i&&i.classList.toggle(r,t)};r(_s,ps),r(vs,hs),n.setAttribute(`aria-expanded`,t)}_setAttributeIfNotExists(e,t,n){e.hasAttribute(t)||e.setAttribute(t,n)}_elemIsActive(e){return e.classList.contains(ps)}_getInnerElement(e){return e.matches(ws)?e:K.findOne(ws,e)}_getOuterElement(e){return e.closest(xs)||e}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this);if(typeof t==`string`){if(n[t]===void 0||t.startsWith(`_`)||t===`constructor`)throw TypeError(`No method named "${t}"`);n[t]()}})}};G.on(document,is,Cs,function(e){[`A`,`AREA`].includes(this.tagName)&&e.preventDefault(),!At(this)&&Es.getOrCreateInstance(this).show()}),G.on(window,os,()=>{for(let e of K.find(Ts))Es.getOrCreateInstance(e)}),Rt(Es);var Ds=`toast`,Os=`.bs.toast`,ks=`mouseover${Os}`,As=`mouseout${Os}`,js=`focusin${Os}`,Ms=`focusout${Os}`,Ns=`hide${Os}`,Ps=`hidden${Os}`,Fs=`show${Os}`,Is=`shown${Os}`,Ls=`fade`,Rs=`hide`,zs=`show`,Bs=`showing`,Vs={animation:`boolean`,autohide:`boolean`,delay:`number`},Hs={animation:!0,autohide:!0,delay:5e3},Us=class e extends fn{constructor(e,t){super(e,t),this._timeout=null,this._hasMouseInteraction=!1,this._hasKeyboardInteraction=!1,this._setListeners()}static get Default(){return Hs}static get DefaultType(){return Vs}static get NAME(){return Ds}show(){G.trigger(this._element,Fs).defaultPrevented||(this._clearTimeout(),this._config.animation&&this._element.classList.add(Ls),this._element.classList.remove(Rs),Nt(this._element),this._element.classList.add(zs,Bs),this._queueCallback(()=>{this._element.classList.remove(Bs),G.trigger(this._element,Is),this._maybeScheduleHide()},this._element,this._config.animation))}hide(){!this.isShown()||G.trigger(this._element,Ns).defaultPrevented||(this._element.classList.add(Bs),this._queueCallback(()=>{this._element.classList.add(Rs),this._element.classList.remove(Bs,zs),G.trigger(this._element,Ps)},this._element,this._config.animation))}dispose(){this._clearTimeout(),this.isShown()&&this._element.classList.remove(zs),super.dispose()}isShown(){return this._element.classList.contains(zs)}_maybeScheduleHide(){this._config.autohide&&(this._hasMouseInteraction||this._hasKeyboardInteraction||(this._timeout=setTimeout(()=>{this.hide()},this._config.delay)))}_onInteraction(e,t){switch(e.type){case`mouseover`:case`mouseout`:this._hasMouseInteraction=t;break;case`focusin`:case`focusout`:this._hasKeyboardInteraction=t;break}if(t){this._clearTimeout();return}let n=e.relatedTarget;this._element===n||this._element.contains(n)||this._maybeScheduleHide()}_setListeners(){G.on(this._element,ks,e=>this._onInteraction(e,!0)),G.on(this._element,As,e=>this._onInteraction(e,!1)),G.on(this._element,js,e=>this._onInteraction(e,!0)),G.on(this._element,Ms,e=>this._onInteraction(e,!1))}_clearTimeout(){clearTimeout(this._timeout),this._timeout=null}static jQueryInterface(t){return this.each(function(){let n=e.getOrCreateInstance(this,t);if(typeof t==`string`){if(n[t]===void 0)throw TypeError(`No method named "${t}"`);n[t](this)}})}};mn(Us),Rt(Us);var Ws=e=>{let t=e.split(`.`).reduce((e,t)=>e?.[t],window.translations);return t===void 0?(console.warn(`Translation not found: ${e}`),e):t},q=e=>typeof e==`string`,Gs=e=>e&&e!==null&&e instanceof Element&&`nodeType`in e,Ks=function(e){if(!(e&&e instanceof Element&&e.offsetParent))return!1;let t=!1,n=!1;if(e.scrollWidth>e.clientWidth){let n=window.getComputedStyle(e).overflowX,r=n.indexOf(`hidden`)!==-1,i=n.indexOf(`clip`)!==-1,a=n.indexOf(`visible`)!==-1;t=!r&&!i&&!a}if(e.scrollHeight>e.clientHeight){let t=window.getComputedStyle(e).overflowY,r=t.indexOf(`hidden`)!==-1,i=t.indexOf(`clip`)!==-1,a=t.indexOf(`visible`)!==-1;n=!r&&!i&&!a}return t||n},qs=function(e,t=void 0){return!e||e===document.body||t&&e===t?null:Ks(e)?e:qs(e.parentElement,t)},Js=function(e){var t=new DOMParser().parseFromString(e,`text/html`).body;if(t.childElementCount>1){for(var n=document.createElement(`div`);t.firstChild;)n.appendChild(t.firstChild);return n}let r=t.firstChild;return!r||r instanceof HTMLElement?r:((n=document.createElement(`div`)).appendChild(r),n)},J=function(e=0,t=0,n=0){return Math.max(Math.min(t,n),e)},Ys=e=>typeof e==`object`&&!!e&&e.constructor===Object&&Object.prototype.toString.call(e)===`[object Object]`;function Xs(e){return Ys(e)||Array.isArray(e)}function Zs(e,t){let n=Object.keys(e),r=Object.keys(t);return n.length===r.length&&n.every(n=>{let r=e[n],i=t[n];return typeof r==`function`?`${r}`==`${i}`:Xs(r)&&Xs(i)?Zs(r,i):r===i})}var Qs=function(e){for(let t of nc)t.getState()===$s.Running&&t.tick(ic?e-ic:0);ic=e,rc=window.requestAnimationFrame(Qs)},$s,ec,tc;(function(e){e[e.Initializing=0]=`Initializing`,e[e.Running=1]=`Running`,e[e.Paused=2]=`Paused`,e[e.Completed=3]=`Completed`,e[e.Destroyed=4]=`Destroyed`})($s||={}),function(e){e[e.Spring=0]=`Spring`,e[e.Ease=1]=`Ease`}(ec||={}),function(e){e[e.Loop=0]=`Loop`,e[e.Reverse=1]=`Reverse`}(tc||={});var nc=new Set,rc=null,ic=0;function ac(){let e=$s.Initializing,t=ec.Ease,n=0,r=0,i=ac.Easings.Linear,a=500,o=0,s=0,c=0,l=0,u=1/0,d=.01,f=.01,p=!1,m={},h=null,g={},_={},v={},y=0,b=0,x=tc.Loop,S=ac.Easings.Linear,C=new Map;function w(e,...t){for(let n of C.get(e)||[])n(...t)}function T(e){return r=0,e?h=setTimeout(()=>{E()},e):E(),O}function E(){e=$s.Running,w(`start`,g,_)}function D(){if(e=$s.Completed,v={},w(`end`,g),e===$s.Completed)if(n<y){if(n++,x===tc.Reverse){let e=Object.assign({},m);m=Object.assign({},_),_=e}T(b)}else n=0;return O}let O={getState:function(){return e},easing:function(e){return i=e,t=ec.Ease,v={},O},duration:function(e){return a=e,O},spring:function(e={}){t=ec.Spring;let{velocity:n,mass:r,tension:i,friction:a,restDelta:m,restSpeed:h,maxSpeed:g,clamp:_}=Object.assign(Object.assign({},{velocity:0,mass:1,tension:170,friction:26,restDelta:.1,restSpeed:.1,maxSpeed:1/0,clamp:!0}),e);return o=n,s=r,c=i,l=a,f=m,d=h,u=g,p=_,v={},O},isRunning:function(){return e===$s.Running},isSpring:function(){return t===ec.Spring},from:function(e){return g=Object.assign({},e),O},to:function(e){return _=e,O},repeat:function(e,t=0,n=tc.Loop,r){return y=e,b=t,x=n,S=r||i,O},on:function(e,t){var n,r;return n=e,r=t,C.set(n,[...C.get(n)||[],r]),O},off:function(e,t){var n,r;return n=e,r=t,C.has(n)&&C.set(n,C.get(n).filter(e=>e!==r)),O},start:function(t){return Zs(g,_)||(e=$s.Initializing,m=Object.assign({},g),nc.add(this),rc||=window.requestAnimationFrame(Qs),T(t)),O},pause:function(){return h&&=(clearTimeout(h),null),e===$s.Running&&(e=$s.Paused,w(`pause`,g)),O},end:D,tick:function(n){n>50&&(n=50),r+=n;let h=0,y=!1;if(e!==$s.Running)return O;if(t===ec.Ease){h=J(0,r/a,1),y=h===1;let e=x===tc.Reverse?S:i;for(let t in g)g[t]=m[t]+(_[t]-m[t])*e(h)}if(t===ec.Spring){let e=.001*n,t=0;for(let n in g){let r=_[n],i=g[n];if(typeof r!=`number`||isNaN(r)||typeof i!=`number`||isNaN(i))continue;if(Math.abs(r-i)<=f){g[n]=r,v[n]=0;continue}v[n]||(typeof o==`object`&&typeof o[n]==`number`?v[n]=o[n]:v[n]=typeof o==`number`?o:0);let a=v[n];a=J(-1*Math.abs(u),a,Math.abs(u));let m=a*s*l;a+=((i>r?-1:1)*(Math.abs(r-i)*c)-m)/s*e,i+=a*e;let h=g[n]>r?i<r:i>r,y=Math.abs(a)<d&&Math.abs(r-i)<=f;p&&h&&(y=!0),y?(i=r,a=0):t++,g[n]=i,v[n]=a}y=!t}let b=Object.assign({},_);return w(`step`,g,m,_,h),y&&e===$s.Running&&Zs(_,b)&&(e=$s.Completed,D()),O},getStartValues:function(){return m},getCurrentValues:function(){return g},getCurrentVelocities:function(){return v},getEndValues:function(){return _},destroy:function(){e=$s.Destroyed,h&&=(clearTimeout(h),null),m=g=_={},nc.delete(this)}};return O}ac.destroy=()=>{for(let e of nc)e.destroy();rc&&=(cancelAnimationFrame(rc),null)},ac.Easings={Linear:function(e){return e},EaseIn:function(e){return e===0?0:2**(10*e-10)},EaseOut:function(e){return e===1?1:1-2**(-10*e)},EaseInOut:function(e){return e===0?0:e===1?1:e<.5?2**(20*e-10)/2:(2-2**(-20*e+10))/2}};function oc(e){return typeof TouchEvent<`u`&&e instanceof TouchEvent}function sc(e,t){let n=[],r=oc(e)?e[t]:e instanceof MouseEvent&&(t===`changedTouches`||e.type!==`mouseup`)?[e]:[];for(let e of r)n.push({x:e.clientX,y:e.clientY,ts:Date.now()});return n}function cc(e){return sc(e,`touches`)}function lc(e){return sc(e,`targetTouches`)}function uc(e){return sc(e,`changedTouches`)}function dc(e){let t=e[0],n=e[1]||t;return{x:(t.x+n.x)/2,y:(t.y+n.y)/2,ts:n.ts}}function fc(e){let t=e[0],n=e[1]||e[0];return t&&n?-1*Math.sqrt((n.x-t.x)*(n.x-t.x)+(n.y-t.y)*(n.y-t.y)):0}var pc=e=>{e.cancelable&&e.preventDefault()},mc={passive:!1},hc={panThreshold:5,swipeThreshold:3,ignore:[`textarea`,`input`,`select`,`[contenteditable]`,`[data-selectable]`,`[data-draggable]`]},gc=!1,_c=!0,vc=(e,t)=>{let n,r,i,a,o,s=Object.assign(Object.assign({},hc),t),c=[],l=[],u=[],d=!1,f=!1,p=!1,m=!1,h=0,g=0,_=0,v=0,y=0,b=0,x=0,S=0,C=0,w=[],T=new Map;function E(e){let t=fc(l),a=fc(u),o=t&&a?t/a:0,s={srcEvent:n,isPanRecognized:d,isSwipeRecognized:f,firstTouch:c,previousTouch:u,currentTouch:l,deltaX:_,deltaY:v,offsetX:y,offsetY:b,velocityX:x,velocityY:S,velocity:Math.abs(x)>Math.abs(S)?x:S,angle:C,axis:i,scale:o,center:r};for(let t of T.get(e)||[])t(s)}function D(e){let t=e.target,n=e.composedPath()[0],r=s.ignore.join(`,`),i=e=>e&&e instanceof HTMLElement&&(e.matches(r)||e.closest(r));if(i(t)||i(n))return!1}function O(e){let t=Date.now();if(w=w.filter(e=>!e.ts||e.ts>t-100),e&&w.push(e),x=0,S=0,w.length>3){let e=w[0],t=w[w.length-1];if(e&&t){let n=t.x-e.x,r=t.y-e.y,i=e.ts&&t.ts?t.ts-e.ts:0;i>0&&(x=Math.abs(n)>3?n/(i/30):0,S=Math.abs(r)>3?r/(i/30):0)}}}function k(e){if(!1===D(e))return;if(typeof MouseEvent<`u`&&e instanceof MouseEvent){if(gc)return}else gc=!0;if(typeof MouseEvent<`u`&&e instanceof MouseEvent){if(!e.buttons||e.button!==0)return;pc(e)}e instanceof MouseEvent&&(window.addEventListener(`mousemove`,A),window.addEventListener(`mouseup`,j)),window.addEventListener(`blur`,M),n=e,l=lc(e),c=[...l],u=[],g=l.length,r=dc(l),g===1&&(d=!1,f=!1,p=!1),g&&O(dc(l));let t=Date.now(),i=t-(h||t);m=i>0&&i<=250&&g===1,h=t,clearTimeout(a),E(`start`)}function A(e){var t;if(!c.length||e.defaultPrevented||!1===D(e))return;n=e,u=[...l],l=cc(e);let a=dc(u),f=dc(cc(e));if(O(f),g=l.length,r=f,u.length===l.length?(_=f.x-a.x,v=f.y-a.y):(_=0,v=0),c.length){let e=dc(c);y=f.x-e.x,b=f.y-e.y}if(l.length>1){let e=fc(l),t=fc(u);Math.abs(e-t)>=.1&&(p=!0,E(`pinch`))}d||(d=Math.abs(y)>=s.panThreshold||Math.abs(b)>=s.panThreshold,d&&(_c=!1,clearTimeout(o),o=void 0,C=Math.abs(180*Math.atan2(b,y)/Math.PI),i=C>45&&C<135?`y`:`x`,c=[...l],u=[...l],y=0,b=0,_=0,v=0,(t=window.getSelection())==null||t.removeAllRanges(),E(`panstart`))),d&&(_||v)&&E(`pan`),E(`move`)}function j(e){if(n=e,!c.length)return;let t=lc(e),i=uc(e);if(g=t.length,r=dc(i),i.length&&O(dc(i)),u=[...l],l=[...t],c=[...t],g>0)E(`end`),d=!1,f=!1,w=[];else{let e=s.swipeThreshold;(Math.abs(x)>e||Math.abs(S)>e)&&(f=!0),d&&E(`panend`),f&&E(`swipe`),d||f||p||(E(`tap`),m?E(`doubleTap`):a=setTimeout(function(){E(`singleTap`)},250)),E(`end`),N()}}function M(){clearTimeout(a),N(),d&&E(`panend`),E(`end`)}function N(){gc=!1,d=!1,f=!1,m=!1,g=0,w=[],l=[],u=[],c=[],_=0,v=0,y=0,b=0,x=0,S=0,C=0,i=void 0,window.removeEventListener(`mousemove`,A),window.removeEventListener(`mouseup`,j),window.removeEventListener(`blur`,M),_c||o||(o=setTimeout(()=>{_c=!0,o=void 0},100))}function P(e){let t=e.target;gc=!1,t&&!e.defaultPrevented&&(_c||(pc(e),e.stopPropagation()))}let F={init:function(){return e&&(e.addEventListener(`click`,P,mc),e.addEventListener(`mousedown`,k,mc),e.addEventListener(`touchstart`,k,mc),e.addEventListener(`touchmove`,A,mc),e.addEventListener(`touchend`,j),e.addEventListener(`touchcancel`,j)),F},on:function(e,t){return function(e,t){T.set(e,[...T.get(e)||[],t])}(e,t),F},off:function(e,t){return T.has(e)&&T.set(e,T.get(e).filter(e=>e!==t)),F},isPointerDown:()=>g>0,destroy:function(){clearTimeout(a),clearTimeout(o),o=void 0,e&&(e.removeEventListener(`click`,P,mc),e.removeEventListener(`mousedown`,k,mc),e.removeEventListener(`touchstart`,k,mc),e.removeEventListener(`touchmove`,A,mc),e.removeEventListener(`touchend`,j),e.removeEventListener(`touchcancel`,j)),e=null,N()}};return F};vc.isClickAllowed=()=>_c;var yc={IMAGE_ERROR:`This image couldn't be loaded. <br /> Please try again later.`,MOVE_UP:`Move up`,MOVE_DOWN:`Move down`,MOVE_LEFT:`Move left`,MOVE_RIGHT:`Move right`,ZOOM_IN:`Zoom in`,ZOOM_OUT:`Zoom out`,TOGGLE_FULL:`Toggle zoom level`,TOGGLE_1TO1:`Toggle zoom level`,ITERATE_ZOOM:`Toggle zoom level`,ROTATE_CCW:`Rotate counterclockwise`,ROTATE_CW:`Rotate clockwise`,FLIP_X:`Flip horizontally`,FLIP_Y:`Flip vertically`,RESET:`Reset`,TOGGLE_FS:`Toggle fullscreen`},Y=(e,t=``)=>{e&&e.classList&&t.split(` `).forEach(t=>{t&&e.classList.add(t)})},X=(e,t=``)=>{e&&e.classList&&t.split(` `).forEach(t=>{t&&e.classList.remove(t)})},bc=(e,t=``,n)=>{e&&e.classList&&t.split(` `).forEach(t=>{t&&e.classList.toggle(t,n||!1)})},xc=e=>{e.cancelable&&e.preventDefault()},Sc=(e,t=1e4)=>(e=parseFloat(e+``)||0,Math.round((e+2**-52)*t)/t),Cc=e=>e instanceof HTMLImageElement,Z,wc;(function(e){e.Reset=`reset`,e.Zoom=`zoom`,e.ZoomIn=`zoomIn`,e.ZoomOut=`zoomOut`,e.ZoomTo=`zoomTo`,e.ToggleCover=`toggleCover`,e.ToggleFull=`toggleFull`,e.ToggleMax=`toggleMax`,e.IterateZoom=`iterateZoom`,e.Pan=`pan`,e.Swipe=`swipe`,e.Move=`move`,e.MoveLeft=`moveLeft`,e.MoveRight=`moveRight`,e.MoveUp=`moveUp`,e.MoveDown=`moveDown`,e.RotateCCW=`rotateCCW`,e.RotateCW=`rotateCW`,e.FlipX=`flipX`,e.FlipY=`flipY`,e.ToggleFS=`toggleFS`})(Z||={}),function(e){e.Cover=`cover`,e.Full=`full`,e.Max=`max`}(wc||={});var Tc={x:0,y:0,scale:1,angle:0,flipX:1,flipY:1},Ec={bounds:!0,classes:{container:`f-panzoom`,wrapper:`f-panzoom__wrapper`,content:`f-panzoom__content`,viewport:`f-panzoom__viewport`},clickAction:Z.ToggleFull,dblClickAction:!1,gestures:{},height:`auto`,l10n:yc,maxScale:4,minScale:1,mouseMoveFactor:1,panMode:`drag`,protected:!1,singleClickAction:!1,spinnerTpl:`<div class="f-spinner"></div>`,wheelAction:Z.Zoom,width:`auto`},Dc,Oc=0,kc=0,Ac=0,jc=(e,t={},n={})=>{let r,i,a,o,s,c,l,u,d=0,f=Object.assign(Object.assign({},Ec),t),p={},m=Object.assign({},Tc),h=Object.assign({},Tc),g=[];function _(e){let t=f[e];return t&&typeof t==`function`?t(de):t}function v(){return e&&e.parentElement&&r&&d===3}let y=new Map;function b(e,...t){let n=[...y.get(e)||[]];f.on&&n.push(f.on[e]);for(let e of n)e&&typeof e==`function`&&e(de,...t);e!==`*`&&b(`*`,e,...t)}function x(e){if(!v())return;let t=e.target;if(qs(t))return;let n=Date.now(),r=J(-1,[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}),1);b(`wheel`,e,r);let i=_(`wheelAction`);if(!i||e.defaultPrevented)return;let a=h.scale,o=a*(r>0?1.5:.5);if(i===Z.Zoom){let t=Math.abs(e.deltaY)<100&&Math.abs(e.deltaX)<100;if(n-kc<(t?200:45))return void xc(e);kc=n;let i=N(),s=I();if(Sc(o)<Sc(i)&&Sc(a)<=Sc(i)?(Ac+=Math.abs(r),o=i):Sc(o)>Sc(s)&&Sc(a)>=Sc(s)?(Ac+=Math.abs(r),o=s):(Ac=0,o=J(i,o,s)),Ac>7)return}switch(xc(e),i){case Z.Pan:B(i,{srcEvent:e,deltaX:2*-e.deltaX,deltaY:2*-e.deltaY});break;case Z.Zoom:B(Z.ZoomTo,{srcEvent:e,scale:o,center:{x:e.clientX,y:e.clientY}});break;default:B(i,{srcEvent:e})}}function S(t){let n=t.composedPath()[0];if(!vc.isClickAllowed()||!Gs(n)||t.defaultPrevented||!e?.contains(n)||n.hasAttribute(`disabled`)||n.hasAttribute(`aria-disabled`)||n.hasAttribute(`data-carousel-go-prev`)||n.hasAttribute(`data-carousel-go-next`))return;let i=n.closest(`[data-panzoom-action]`),a=i?.dataset?.panzoomAction,o=i?.dataset?.panzoomValue||``;if(a){switch(xc(t),a){case Z.ZoomTo:case Z.ZoomIn:case Z.ZoomOut:B(a,{scale:parseFloat(o||``)||void 0});break;case Z.MoveLeft:case Z.MoveRight:B(a,{deltaX:parseFloat(o||``)||void 0});break;case Z.MoveUp:case Z.MoveDown:B(a,{deltaY:parseFloat(o||``)||void 0});break;case Z.ToggleFS:le();break;default:B(a)}return}if(!r?.contains(n))return;let s={srcEvent:t};if(B(_(`clickAction`),s),_(`dblClickAction`)){let e=Date.now(),t=e-(Oc||e);Oc=e,t>0&&t<=250?(Dc&&=(clearTimeout(Dc),void 0),B(_(`dblClickAction`),s)):Dc=setTimeout(()=>{B(_(`singleClickAction`),s)},250)}}function C(e){if(u=e,!v()||!A()||m.scale<=1||h.scale<=1||(r?.dataset.animationName||``).indexOf(`zoom`)>-1)return;let t=j(h.scale);if(!t)return;let{x:n,y:i}=t;B(Z.Pan,{deltaX:n-h.x,deltaY:i-h.y})}function w(){var t;e&&(X(e,`is-loading`),(t=e.querySelector(`.f-spinner`))==null||t.remove())}function T(){if(!e||!i)return;if(w(),Cc(i)&&(!i.complete||!i.naturalWidth))return d=2,r?.classList.add(`has-error`),void b(`error`);b(`loaded`);let{width:t,height:n}=O();Cc(i)&&(i.setAttribute(`width`,t+``),i.setAttribute(`height`,n+``)),r&&(X(r,`has-error`),Cc(i)&&(r.setAttribute(`width`,t+``),r.setAttribute(`height`,n+``),r.style.aspectRatio=`${t/n||``}`)),c=ac().on(`start`,(e,t)=>{t.angle!==void 0&&(t.angle=90*Math.round(t.angle/90)),t.flipX!==void 0&&(t.flipX=t.flipX>0?1:-1),t.flipY!==void 0&&(t.flipY=t.flipY>0?1:-1),h=Object.assign(Object.assign({},Tc),t),z(),b(`animationStart`)}).on(`pause`,e=>{h=Object.assign(Object.assign({},Tc),e)}).on(`step`,e=>{if(!v())return void(c==null||c.end());if(m=Object.assign(Object.assign({},Tc),e),A()||!_(`bounds`)||U()||h.scale>m.scale||h.scale<P())return void V();let t=L(h.scale),n=!1,r=!1,i=!1,a=!1;m.x<t.x[0]&&(n=!0),m.x>t.x[1]&&(r=!0),m.y<t.y[0]&&(a=!0),m.y>t.y[1]&&(i=!0);let o=!1,s=!1,l=!1,u=!1;h.x<t.x[0]&&(o=!0),h.x>t.x[1]&&(s=!0),h.y<t.y[0]&&(u=!0),h.y>t.y[1]&&(l=!0);let d=!1;(r&&s||n&&o)&&(h.x=J(t.x[0],h.x,t.x[1]),d=!0),(i&&l||a&&u)&&(h.y=J(t.y[0],h.y,t.y[1]),d=!0),d&&c&&c.spring({tension:94,friction:17,maxSpeed:555*h.scale,restDelta:.1,restSpeed:.1,velocity:c.getCurrentVelocities()}).from(m).to(h).start(),V()}).on(`end`,()=>{s!=null&&s.isPointerDown()||R(),c!=null&&c.isRunning()||(z(),b(`animationEnd`))}),function(){let e=_(`gestures`);if(!e||!o||!i)return;let t=!1;s=vc(o,e).on(`start`,e=>{if(!_(`gestures`)||!c||!v()||A())return;let n=e.srcEvent;(m.scale>1||H(m.angle)||e.currentTouch.length>1)&&(n?.stopPropagation(),c.pause(),t=!0),e.currentTouch.length===1&&b(`touchStart`)}).on(`move`,e=>{var n;t&&(h.scale!==1||H(h.angle)||e.currentTouch.length>1)&&(xc(e.srcEvent),(n=e.srcEvent)==null||n.stopPropagation())}).on(`pan`,e=>{if(!t)return;let n=e.srcEvent;(h.scale!==1||H(h.angle)||e.currentTouch.length>1)&&(xc(n),B(Z.Pan,e))}).on(`swipe`,e=>{t&&(h.scale>1||H(h.angle))&&B(Z.Swipe,e)}).on(`tap`,e=>{b(`click`,e)}).on(`singleTap`,e=>{b(`singleClick`,e)}).on(`doubleTap`,e=>{b(`dblClick`,e)}).on(`pinch`,e=>{t&&(e.scale>P()?B(Z.ZoomIn,e):e.scale<P()?B(Z.ZoomOut,e):B(Z.Pan,e))}).on(`end`,e=>{t&&(e.currentTouch.length?(e.srcEvent.stopPropagation(),xc(e.srcEvent),c?.end()):(t=!1,z(),R(),b(`touchEnd`)))}).init()}(),o&&(o.addEventListener(`wheel`,x,{passive:!1}),g.push(()=>{o?.removeEventListener(`wheel`,x,{passive:!1})})),e?.addEventListener(`click`,S),document==null||document.addEventListener(`mousemove`,C),g.push(()=>{e?.removeEventListener(`click`,S),document==null||document.removeEventListener(`mousemove`,C)});let a=E();m=Object.assign({},a),h=Object.assign({},a),d=3,V(),z(),b(`ready`),requestAnimationFrame(()=>{d===3&&(w(),o&&(o.style.visibility=``))})}function E(){let e=Object.assign({},_(`startPos`)||{}),t=e.scale,n=1;n=typeof t==`string`?M(t):typeof t==`number`?t:P();let r=Object.assign(Object.assign(Object.assign({},Tc),e),{scale:n}),i=A()?j(n):void 0;if(i){let{x:e,y:t}=i;r.x=e,r.y=t}return r}function D(){let e={top:0,left:0,width:0,height:0};if(r){let t=r.getBoundingClientRect();H(h.angle)?(e.top=t.top+.5*t.height-.5*t.width,e.left=t.left+.5*t.width-.5*t.height,e.width=t.height,e.height=t.width):(e.top=t.top,e.left=t.left,e.width=t.width,e.height=t.height)}return e}function O(){let e=_(`width`),t=_(`height`);if(i&&e===`auto`){let t=i.getAttribute(`width`);e=t?parseFloat(t+``):i.dataset.width===void 0?Cc(o)?o.naturalWidth:Cc(i)?i.naturalWidth:r?.getBoundingClientRect().width||0:parseFloat(i.dataset.width+``)}else e=q(e)?parseFloat(e):e;if(i&&t===`auto`){let e=i.getAttribute(`height`);t=e?parseFloat(e+``):i.dataset.height===void 0?Cc(o)?o.naturalHeight:Cc(i)?i.naturalHeight:r?.getBoundingClientRect().height||0:parseFloat(i.dataset.height+``)}else t=q(t)?parseFloat(t):t;return{width:e,height:t}}function k(){let e=D();return{width:e.width,height:e.height}}function A(){return _(`panMode`)===`mousemove`&&matchMedia(`(hover: hover)`).matches}function j(e){let t=u||_(`event`),n=r?.getBoundingClientRect();if(!t||!n||e<=1)return{x:0,y:0};let i=(t.clientX||0)-n.left,a=(t.clientY||0)-n.top,{width:o,height:s}=k(),c=L(e);if(e>1){let t=_(`mouseMoveFactor`);t>1&&(e*=t)}let l=o*e,d=s*e,f=.5*(l-o)-i/o*100/100*(l-o),p=.5*(d-s)-a/s*100/100*(d-s);return f=J(c.x[0],f,c.x[1]),p=J(c.y[0],p,c.y[1]),{x:f,y:p}}function M(t){if(!t)return h.scale;if(!e)return 1;let n=e.getBoundingClientRect(),r=D(),{width:i,height:a}=O(),o=e=>{if(typeof e==`number`)return e;switch(e){case`min`:case`base`:return 1;case`cover`:return Math.max(n.height/r.height,n.width/r.width)||1;case`full`:case`max`:{let e=H(h.angle)?a:i;return e&&r.width?e/r.width:1}}},s=_(`minScale`),c=_(`maxScale`),l=Math.min(o(`full`),o(s)),u=typeof c==`number`?o(`full`)*c:Math.min(o(`full`),o(c));switch(t){case`min`:return l;case`base`:return J(l,1,u);case`cover`:return o(`cover`);case`full`:return Math.min(u,o(`full`));case`max`:return u}}function N(){return M(`min`)}function P(){return M(`base`)}function F(){return M(`full`)}function I(){return M(`max`)}function L(t){let n={x:[0,0],y:[0,0]},r=e?.getBoundingClientRect();if(!r)return n;let i=D(),a=r.width,o=r.height,s=i.width,c=i.height,l=t=t===void 0?h.scale:t,u=t;if(A()&&t>1){let e=_(`mouseMoveFactor`);e>1&&(s*t>a+.01&&(l*=e),c*t>o+.01&&(u*=e))}if(s*=l,c*=u,s>a){n.x[0]=.5*(a-s),n.x[1]=.5*(s-a);let e=.5*(i.left-r.left),t=.5*(i.left+i.width-r.right);n.x[0]-=e+t,n.x[1]-=e+t}if(c>o){n.y[0]=.5*(o-c),n.y[1]=.5*(c-o);let e=.5*(i.top-r.top),t=.5*(i.top+i.height-r.bottom);n.y[0]-=e+t,n.y[1]-=e+t}return n}function R(){if(!v()||!_(`bounds`)||!c)return;let e=N(),t=I(),n=J(e,h.scale,t);if(h.scale<e-.01||h.scale>t+.01)return void B(Z.ZoomTo,{scale:n});if(c.isRunning()||U())return;let r=L(n);h.x<r.x[0]||h.x>r.x[1]||h.y<r.y[0]||h.y>r.y[1]?(h.x=J(r.x[0],h.x,r.x[1]),h.y=J(r.y[0],h.y,r.y[1]),c.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:c.getCurrentVelocities()}),c.from(m).to(h).start()):V()}function z(t){if(!v())return;let n=oe(),i=U(),a=se(),o=ce(),s=te(),c=ne();bc(r,`is-fullsize`,o),bc(r,`is-expanded`,a),bc(r,`is-dragging`,i),bc(r,`can-drag`,n),bc(r,`will-zoom-in`,s),bc(r,`will-zoom-out`,c);let l=ie(),u=ae(),d=re(),f=!v();for(let n of(t||e)?.querySelectorAll(`[data-panzoom-action]`)||[]){let e=n.dataset.panzoomAction,t=!1;if(f)t=!0;else switch(e){case Z.ZoomIn:l||(t=!0);break;case Z.ZoomOut:d||(t=!0);break;case Z.ToggleFull:{u||d||(t=!0);let e=n.querySelector(`g`);e&&(e.style.display=o&&!t?`none`:``);break}case Z.IterateZoom:{l||d||(t=!0);let e=n.querySelector(`g`);e&&(e.style.display=l||t?``:`none`);break}case Z.ToggleCover:case Z.ToggleMax:l||d||(t=!0)}t?(n.setAttribute(`aria-disabled`,``),n.setAttribute(`tabindex`,`-1`)):(n.removeAttribute(`aria-disabled`),n.removeAttribute(`tabindex`))}}function B(t,n){if(!(t&&e&&i&&c&&v())||t===Z.Swipe&&Math.abs(c.getCurrentVelocities().scale)>.01)return;let r=Object.assign({},h),a=Object.assign({},h),o=L(A()?r.scale:m.scale),s=c.getCurrentVelocities(),l=D(),u=((n||={}).currentTouch?.length||0)>1,d=n.velocityX||0,f=n.velocityY||0,p=n.center;n.srcEvent&&(p=dc(uc(n.srcEvent)));let g=n.deltaX||0,y=n.deltaY||0;switch(t){case Z.MoveRight:g=n.deltaX||100;break;case Z.MoveLeft:g=n.deltaX||-100;break;case Z.MoveUp:y=n.deltaY||-100;break;case Z.MoveDown:y=n.deltaY||100}let x=[];if(typeof t==`number`)a.scale=t;else switch(t){case Z.Reset:a=Object.assign({},Tc),a.scale=P();break;case Z.ZoomTo:case Z.ZoomIn:case Z.ZoomOut:case Z.ToggleCover:case Z.ToggleFull:case Z.ToggleMax:case Z.IterateZoom:case Z.Zoom:a.scale=ee(t,n);break;case Z.Pan:case Z.Move:case Z.MoveLeft:case Z.MoveRight:case Z.MoveUp:case Z.MoveDown:if(U()){let e=1,t=1;a.x<=o.x[0]&&d<=0&&(e=Math.max(.01,1-Math.abs(1/l.width*Math.abs(a.x-o.x[0]))),e*=.2),a.x>=o.x[1]&&d>=0&&(e=Math.max(.01,1-Math.abs(1/l.width*Math.abs(a.x-o.x[1]))),e*=.2),a.y<=o.y[0]&&f<=0&&(t=Math.max(.01,1-Math.abs(1/l.height*Math.abs(a.y-o.y[0]))),t*=.2),a.y>=o.y[1]&&f>=0&&(t=Math.max(.01,1-Math.abs(1/l.height*Math.abs(a.y-o.y[1]))),t*=.2),a.x+=g*e,a.y+=y*t}else a.x=J(o.x[0],a.x+g,o.x[1]),a.y=J(o.y[0],a.y+y,o.y[1]);break;case Z.Swipe:let e=(e=0)=>Math.sign(e)*Math.abs(e)**1.5;a.x+=J(-1e3,e(d),1e3),a.y+=J(-1e3,e(f),1e3),f&&!d&&(a.x=J(o.x[0],a.x,o.x[1])),!f&&d&&(a.y=J(o.y[0],a.y,o.y[1])),s.x=d,s.y=f;break;case Z.RotateCW:a.angle+=90;break;case Z.RotateCCW:a.angle-=90;break;case Z.FlipX:a.flipX*=-1;break;case Z.FlipY:a.flipY*=-1}if(m.angle!==void 0&&Math.abs(m.angle)>=360&&(a.angle-=360*Math.floor(m.angle/360),m.angle-=360*Math.floor(m.angle/360)),x.length){let e=x.findIndex(e=>e>a.scale+1e-4);a.scale=x[e]||x[0]}if(u&&(a.scale=J(N()*(u?.8:1),a.scale,I()*(u?1.6:1))),A()){let e=j(a.scale);if(e){let{x:t,y:n}=e;a.x=t,a.y=n}}else if(Math.abs(a.scale-r.scale)>1e-4){let t=0,n=0;if(p)t=p.x,n=p.y;else{let r=e.getBoundingClientRect();t=r.x+.5*r.width,n=r.y+.5*r.height}let i=t-l.left,s=n-l.top;i-=.5*l.width,s-=.5*l.height;let c=(i-r.x)/r.scale,d=(s-r.y)/r.scale;a.x=i-c*a.scale,a.y=s-d*a.scale,!u&&_(`bounds`)&&(o=L(a.scale),a.x=J(o.x[0],a.x,o.x[1]),a.y=J(o.y[0],a.y,o.y[1]))}if(t===Z.Swipe){let e=500*a.scale,t=s;c.spring({tension:94,friction:17,maxSpeed:e,restDelta:.1,restSpeed:.1,velocity:t})}else t===Z.Pan||u?c.spring({tension:900,friction:17,restDelta:.01,restSpeed:.01,maxSpeed:1}):c.spring({tension:170,friction:17,restDelta:.001,restSpeed:.001,maxSpeed:1/0,velocity:s});if(n.velocity===0||Zs(m,a))m=Object.assign({},a),h=Object.assign({},a),c.end(),V(),z();else{if(Zs(h,a))return;c.from(m).to(a).start()}b(`action`,t)}function V(){if(!i||!r||!o)return;let{width:t,height:n}=O();Object.assign(r.style,{maxWidth:`min(${t}px, 100%)`,maxHeight:`min(${n}px, 100%)`});let{x:a,y:s,width:c,height:l,scale:u,angle:d,flipX:f,flipY:p}=function(){let{width:t,height:n}=O(),{width:r,height:i}=k();if(!e)return{x:0,y:0,width:0,height:0,scale:0,flipX:0,flipY:0,angle:0,fitWidth:r,fitHeight:i,fullWidth:t,fullHeight:n};let{x:a,y:o,scale:s,angle:c,flipX:l,flipY:u}=m,d=1/F(),f=t,p=n,g=m.scale*d,_=h.scale*d,v=Math.max(r,i),y=Math.min(r,i);t>n?(f=v,p=y):(f=y,p=v),g=t>n?v*s/t||1:v*s/n||1;let b=f?t*_:0,x=p?n*_:0,S=f&&p?t*g/b:0;return a=a+.5*f-.5*b,o=o+.5*p-.5*x,{x:a,y:o,width:b,height:x,scale:S,flipX:l,flipY:u,angle:c,fitWidth:r,fitHeight:i,fullWidth:t,fullHeight:n}}(),g=`translate(${Sc(a,100)}px, ${Sc(s,100)}px)`;g+=f!==1||p!==1?` scaleX(${Sc(u*f)}) scaleY(${Sc(u*p)})`:` scale(${Sc(u)})`,d!==0&&(g+=` rotate(${d}deg)`),o.style.width=`${Sc(c)}px`,o.style.height=`${Sc(l)}px`,o.style.transform=`${g}`,b(`render`)}function ee(e=_(`clickAction`),t={}){let n=h.scale,r=P(),i=[];if(typeof e==`number`)r=e;else if(e){switch(e){case Z.ZoomTo:r=t.scale||1;break;case Z.ZoomIn:r=n*(t.scale||2);break;case Z.ZoomOut:r=n*(t.scale||.5);break;case Z.ToggleCover:i=[P(),M(`cover`)];break;case Z.ToggleFull:i=[P(),F()];break;case Z.ToggleMax:i=[P(),I()];break;case Z.IterateZoom:i=[P(),F(),I()];break;case Z.Zoom:{let e=F();r=n>=e-.05?P():Math.min(e,n*(t.scale||2));break}}i.length&&(r=i.find(e=>e>n+1e-4)??P())}return e!==Z.ZoomTo&&(r=J(N(),r,I())),r}function te(){return!!(v()&&ee()>h.scale)}function ne(){return!!(v()&&ee()<h.scale)}function re(){return!!(v()&&h.scale>N())}function ie(){return!!(v()&&h.scale<I())}function ae(){return!!(v()&&h.scale<F())}function oe(){return!(!v()||!se()&&!H(h.angle)||!s||A())}function H(e){return Math.abs(e%180)===90}function U(){return!(!v()||!s?.isPointerDown()||A())}function se(){return!!(v()&&h.scale>P())}function ce(){return!!(v()&&h.scale>=F())}function le(){let t=`in-fullscreen`,n=`with-panzoom-in-fullscreen`;e?.classList.toggle(t);let r=e?.classList.contains(t);r?(document.documentElement.classList.add(n),document.addEventListener(`keydown`,ue,!0)):(document.documentElement.classList.remove(n),document.removeEventListener(`keydown`,ue,!0)),V(),b(r?`enterFS`:`exitFS`)}function ue(e){e.key!==`Escape`||e.defaultPrevented||le()}let de={canDrag:oe,canZoomIn:ie,canZoomOut:re,canZoomToFull:ae,destroy:function(){b(`destroy`);for(let e of Object.values(p))e?.destroy(de);for(let e of g)e();return r&&(r.style.aspectRatio=``,r.style.maxWidth=``,r.style.maxHeight=``),o&&(o.style.width=``,o.style.height=``,o.style.transform=``),r=void 0,i=void 0,o=void 0,m=Object.assign({},Tc),h=Object.assign({},Tc),c?.destroy(),c=void 0,s?.destroy(),s=void 0,d=4,de},emit:b,execute:B,getBoundaries:L,getContainer:function(){return e},getContent:function(){return i},getFullDim:O,getGestures:function(){return s},getMousemovePos:j,getOptions:function(){return f},getPlugins:function(){return p},getScale:M,getStartPosition:E,getState:function(){return d},getTransform:function(e){return!0===e?h:m},getTween:function(){return c},getViewport:function(){return o},getWrapper:function(){return r},init:function(){return d=0,b(`init`),function(){for(let[e,t]of Object.entries(Object.assign(Object.assign({},n),f.plugins||{})))if(e&&!p[e]&&t instanceof Function){let n=t();n.init(de),p[e]=n}b(`initPlugins`)}(),function(){let t=Object.assign(Object.assign({},Ec.classes),_(`classes`)),n=t.content?.split(` `).shift(),s=t.wrapper?.split(` `).shift(),c=t.viewport?.split(` `).shift();if(!(!n||!s||!c)&&e&&(Y(e,t.container),i=e.querySelector(`.${n}:not(.is-clone)`),i)){if(i.setAttribute(`draggable`,`false`),r=e.querySelector(`.${s}`),r||(r=document.createElement(`div`),Y(r,t.wrapper),i.insertAdjacentElement(`beforebegin`,r),r.insertAdjacentElement(`afterbegin`,i)),o=e.querySelector(`.${c}`),o||(o=document.createElement(`div`),Y(o,t.viewport),r.insertAdjacentElement(`beforeend`,o)),o.contains(i)||o.insertAdjacentElement(`afterbegin`,i),a=e.querySelector(`.${n}.is-clone`),a||(a=i.cloneNode(!0),a.removeAttribute(`id`),Y(a,`is-clone`),r.insertAdjacentElement(`afterbegin`,a)),i instanceof HTMLPictureElement&&(i=i.querySelector(`img`)),a instanceof HTMLPictureElement&&(a=a.querySelector(`img`)),o instanceof HTMLPictureElement&&(o=o.querySelector(`img`)),o&&(o.style.visibility=`hidden`,_(`protected`))){o.addEventListener(`contextmenu`,e=>{xc(e)});let e=document.createElement(`div`);Y(e,`f-panzoom__protected`),o.appendChild(e)}b(`initLayout`)}}(),function(){if(e&&r&&!l){let e=null;l=new ResizeObserver(()=>{v()&&(e||=requestAnimationFrame(()=>{v()&&(z(),R(),b(`refresh`)),e=null}))}),l.observe(r),g.push(()=>{l?.disconnect(),l=void 0,e&&=(cancelAnimationFrame(e),null)})}}(),function(){if(!e||!i)return;if(!Cc(i)||!Cc(a))return void T();let t=()=>{i&&Cc(i)&&i.decode().then(()=>{T()}).catch(()=>{T()})};if(d=1,e.classList.add(`is-loading`),b(`loading`),a.src&&a.complete)return void t();(function(){if(!e||e?.querySelector(`.f-spinner`))return;let t=Js(_(`spinnerTpl`));t&&(t.classList.add(`f-spinner`),e.classList.add(`is-loading`),r?.insertAdjacentElement(`afterbegin`,t))})(),a.addEventListener(`load`,t,!1),a.addEventListener(`error`,t,!1),g.push(()=>{a?.removeEventListener(`load`,t,!1),a?.removeEventListener(`error`,t,!1)})}(),de},isDragging:U,isExpanded:se,isFullsize:ce,isMousemoveMode:A,localize:function(e,t=[]){let n=_(`l10n`)||{};e=String(e).replace(/{{(w+)}}/g,(e,t)=>n[t]||e);for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e=e.replace(/{{(.*?)}}/g,(e,t)=>t)},off:function(e,t){for(let n of e instanceof Array?e:[e])y.has(n)&&y.set(n,y.get(n).filter(e=>e!==t));return de},on:function(e,t){for(let n of e instanceof Array?e:[e])y.set(n,[...y.get(n)||[],t]);return de},toggleFS:le,updateControls:z,version:`6.1.14`,willZoomIn:te,willZoomOut:ne};return de};jc.l10n={en_EN:yc},jc.getDefaults=()=>Ec;var Mc=(e,t)=>{let n=[];return e.childNodes.forEach(e=>{e.nodeType!==Node.ELEMENT_NODE||t&&!e.matches(t)||n.push(e)}),n},Nc=(e,...t)=>{let n=t.length;for(let r=0;r<n;r++){let n=t[r]||{};Object.entries(n).forEach(([t,n])=>{let r=Array.isArray(n)?[]:{};e[t]||Object.assign(e,{[t]:r}),Ys(n)?Object.assign(e[t],Nc(e[t],n)):Array.isArray(n)?Object.assign(e,{[t]:[...n]}):Object.assign(e,{[t]:n})})}return e},Pc=function(e=0,t=0,n=0,r=0,i=0,a=!1){let o=(e-t)/(n-t)*(i-r)+r;return a?r<i?J(r,o,i):J(i,o,r):o},Fc=Object.assign(Object.assign({},yc),{ERROR:`Something went wrong. <br /> Please try again later.`,NEXT:`Next page`,PREV:`Previous page`,GOTO:`Go to page #%d`,DOWNLOAD:`Download`,TOGGLE_FULLSCREEN:`Toggle full-screen mode`,TOGGLE_EXPAND:`Toggle full-size mode`,TOGGLE_THUMBS:`Toggle thumbnails`,TOGGLE_AUTOPLAY:`Toggle slideshow`}),Ic=e=>{e.cancelable&&e.preventDefault()},Lc={adaptiveHeight:!1,center:!0,classes:{container:`f-carousel`,isEnabled:`is-enabled`,isLTR:`is-ltr`,isRTL:`is-rtl`,isHorizontal:`is-horizontal`,isVertical:`is-vertical`,hasAdaptiveHeight:`has-adaptive-height`,viewport:`f-carousel__viewport`,slide:`f-carousel__slide`,isSelected:`is-selected`},dragFree:!1,enabled:!0,errorTpl:`<div class="f-html">{{ERROR}}</div>`,fill:!0,infinite:!0,initialPage:0,l10n:Fc,rtl:!1,slides:[],slidesPerPage:`auto`,spinnerTpl:`<div class="f-spinner"></div>`,transition:`fade`,tween:{clamp:!0,mass:1,tension:160,friction:25,restDelta:1,restSpeed:1,velocity:0},vertical:!1},Rc,zc,Bc=0,Vc=(e,t={},n={})=>{Bc++;let r,i,a,o,s,c=0,l=Object.assign({},Lc),u=Object.assign({},Lc),d={},f=null,p=null,m=0,h=0,g=0,_=!1,v=!1,y=!1,b=`height`,x=0,S=!0,C=0,w=0,T=0,E=0,D=`*`,O=[],k=[],A=new Set,j=[],M=[],N=0,P=0,F=0;function I(e,...t){let n=u[e];return n&&n instanceof Function?n(W,...t):n}function L(e,t=[]){let n=I(`l10n`)||{};e=String(e).replace(/{{(w+)}}/g,(e,t)=>n[t]||e);for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e=e.replace(/{{(.*?)}}/g,(e,t)=>t)}let R=new Map;function z(e,...t){let n=[...R.get(e)||[]];u.on&&n.push(u.on[e]);for(let e of n)e&&e instanceof Function&&e(W,...t);e===`click`&&ye(t[0]),e!==`*`&&z(`*`,e,...t)}function B(){let e=Nc({},Lc,l),t=``,o=l.breakpoints||{};for(let[n,r]of Object.entries(o))window.matchMedia(n).matches&&(t+=n,Nc(e,r));if(s===void 0||t!==s){if(s=t,c!==0){let t=M[C]?.slides[0]?.index;t===void 0&&(t=u.initialSlide),e.initialSlide=t,e.slides=[];for(let t of O)t.isVirtual&&e.slides.push(t)}Ee(),u=e,!1!==I(`enabled`)&&(c=0,z(`init`),function(){for(let[e,t]of Object.entries(Object.assign(Object.assign({},n),u.plugins||{})))if(e&&!d[e]&&t instanceof Function){let n=t();n.init(W,Vc),d[e]=n}z(`initPlugins`)}(),function(){if(!f)return;let e=I(`classes`)||{};Y(f,e.container);let t=I(`style`);if(t&&Ys(t))for(let[e,n]of Object.entries(t))f.style.setProperty(e,n);p=Array.from(f.querySelectorAll(`.${e.viewport}`)).filter(t=>t.closest(`.${e.container}`)===f).pop()||null,p||(p=document.createElement(`div`),Y(p,e.viewport),p.append(...Mc(f,`.${e.slide}`)),f.insertAdjacentElement(`afterbegin`,p)),f.carousel=W,z(`initLayout`)}(),function(){if(!p)return;let e=I(`classes`)||{};O=[],[...Mc(p,`.${e.slide}`)].forEach(e=>{if(e.parentElement){let t=le(Object.assign({el:e,isVirtual:!1},e.dataset||{}));z(`createSlide`,t),O.push(t)}}),pe();for(let e of O)z(`addSlide`,e);ce(I(`slides`));for(let e of O){let t=e.el;t?.parentElement===p&&(Y(t,u.classes.slide),Y(t,e.class),Se(e),z(`attachSlideEl`,e))}z(`initSlides`)}(),me(),c=1,Y(f,(I(`classes`)||{}).isEnabled||``),Te(),re(),i=ac().on(`start`,()=>{r&&r.isPointerDown()||(ne(),Te())}).on(`step`,e=>{let t=x;x=e.pos,x!==t&&(S=!1,Te())}).on(`end`,e=>{r!=null&&r.isPointerDown()||(x=e.pos,i&&!_&&(x<T||x>E)?i.spring({clamp:!0,mass:1,tension:200,friction:25,velocity:0,restDelta:1,restSpeed:1}).from({pos:x}).to({pos:J(T,x,E)}).start():S||(S=!0,z(`settle`)))}),ee(),function(){if(!f||!p)return;f.addEventListener(`click`,ve),document.addEventListener(`mousemove`,V),zc||(zc=function(e){let t=e.target?.dataset?.carouselTarget;t&&(document.getElementById(`${t.split(`#`).pop()}`)?.carousel)?.emit(`click`,e)},document.addEventListener(`click`,zc));let e=p.getBoundingClientRect();if(N=e.height,P=e.width,!a){let e=null;a=new ResizeObserver(()=>{e||=requestAnimationFrame(()=>{(function(){if(c!==1||!p)return;let e=M.length,t=p.getBoundingClientRect(),n=t.height,i=t.width;e>1&&(y&&Math.abs(n-N)<.5||!y&&Math.abs(i-P)<.5)||(me(),ee(),N=n,P=i,y&&!N||!y&&!P||f&&p&&(e===M.length&&r!=null&&r.isPointerDown()||(I(`dragFree`)&&(_||x>T&&x<E)?(ne(),Te()):Ce(C,{transition:!1}))))})(),e=null})}),a.observe(p)}}(),z(`ready`))}}function V(e){Rc=e}function ee(){!1===I(`gestures`)?r&&=(r.destroy(),void 0):r||function(){let e=I(`gestures`);!r&&!1!==e&&p&&(r=vc(p,e).on(`start`,e=>{if(!i||!1===I(`gestures`,e))return;let{srcEvent:t}=e;y&&oc(t)&&!qs(t.target)&&Ic(t),i.pause(),i.getCurrentVelocities().pos=0;let n=M[C]?.slides[0],r=n?.el;n&&A.has(n.index)&&r&&(x=n.offset||0,x+=(function(e){let t=window.getComputedStyle(e),n=new DOMMatrixReadOnly(t.transform);return{width:n.m41||0,height:n.m42||0}}(r)[b]||0)*(v&&!y?1:-1)),ge(),_||(x<T||x>E)&&i.spring({clamp:!0,mass:1,tension:500,friction:25,velocity:i.getCurrentVelocities()?.pos||0,restDelta:1,restSpeed:1}).from({pos:x}).to({pos:J(T,x,E)}).start()}).on(`move`,e=>{if(!1===I(`gestures`,e))return;let{srcEvent:t,axis:n,deltaX:r,deltaY:a}=e;if(oc(t)&&t.touches?.length>1)return;let o=t.target,s=qs(o),c=s?s.scrollHeight>s.clientHeight?`y`:`x`:void 0;if(s&&s!==p&&(!n||n===c))return;if(!n)return Ic(t),t.stopPropagation(),void t.stopImmediatePropagation();if(n===`y`&&!y||n===`x`&&y||(Ic(t),t.stopPropagation(),!i))return;let l=v&&!y?1:-1,u=y?a:r,d=i?.isRunning()?i.getEndValues().pos:x,f=1;_||(d<=T&&u*l<0?(f=Math.max(.01,1-(Math.abs(1/H()*Math.abs(d-T))||0)),f*=.2):d>=E&&u*l>0&&(f=Math.max(.01,1-(Math.abs(1/H()*Math.abs(d-E))||0)),f*=.2)),d+=u*f*l,i.spring({clamp:!0,mass:1,tension:700,friction:25,velocity:i.getCurrentVelocities()?.pos||0,restDelta:1,restSpeed:1}).from({pos:x}).to({pos:d}).start()}).on(`panstart`,e=>{!1!==I(`gestures`,e)&&e?.axis===(y?`y`:`x`)&&Y(p,`is-dragging`)}).on(`panend`,e=>{!1!==I(`gestures`,e)&&X(p,`is-dragging`)}).on(`end`,e=>{if(!1===I(`gestures`,e))return;let{srcEvent:t,axis:n,velocityX:r,velocityY:a,currentTouch:o}=e;if(o.length>0||!i)return;let s=t.target,c=qs(s),l=c?c.scrollHeight>c.clientHeight?`y`:`x`:void 0,u=c&&(!n||n===l);y&&oc(t)&&!n&&ve(t);let f=M.length,p=I(`dragFree`);if(!f)return;let m=u?0:I(`vertical`)?a:r;n!==(y?`y`:`x`)&&(m=0);let h=i?.isRunning()?i.getEndValues().pos:x,g=v&&!y?1:-1;if(u||(h+=m*(p?5:1)*g),!_&&(m*g<=0&&h<T||m*g>=0&&h>E)){let e=0;Math.abs(m)>0&&(e=2*Math.abs(m),e=Math.min(.3*H(),e)),h=J(T+-1*e,h,E+e),i.spring({clamp:!0,mass:1,tension:380,friction:25,velocity:-1*m,restDelta:1,restSpeed:1}).from({pos:x}).to({pos:h}).start();return}if(p||d.Autoscroll?.isEnabled())return void(Math.abs(m)>10?i.spring({clamp:!0,mass:1,tension:150,friction:25,velocity:-1*m,restDelta:1,restSpeed:1}).from({pos:x}).to({pos:h}).start():i.isRunning()||S||(S=!0,z(`settle`)));if(!p&&!d.Autoscroll?.isEnabled()&&(!e.offsetX&&!e.offsetY||n===`y`&&!y||n===`x`&&y))return void Ce(C,{transition:`tween`});let b=ae(h);Math.abs(m)>10&&b===C&&(b+=m>0?v&&!y?1:-1:v&&!y?-1:1),Ce(b,{transition:`tween`,tween:{velocity:-1*m}})}).init())}(),bc(p,`is-draggable`,!!r&&M.length>0)}function te(e=`*`){var t;let n=[];for(let r of O)(e===`*`||r.class&&r.class.includes(e)||r.el&&(t=r.el)!=null&&t.classList.contains(e))&&n.push(r);o=void 0,D=e,k=[...n]}function ne(){if(!i)return;let e=ae(i?.isRunning()?i.getEndValues().pos:x);e!==C&&(o=C,C=e,Se(),re(),ie(),z(`change`,C,o))}function re(){if(!f)return;for(let e of f.querySelectorAll(`[data-carousel-index]`))e.innerHTML=C+``;for(let e of f.querySelectorAll(`[data-carousel-page]`))e.innerHTML=C+1+``;for(let e of f.querySelectorAll(`[data-carousel-pages]`))e.innerHTML=M.length+``;let e=I(`classes`)||{},t=Array.from(f.querySelectorAll(`[data-carousel-go-to]`)).filter(t=>t.closest(`.${e.container}`)===f);for(let e of t)parseInt(e.dataset?.carouselGoTo||`-1`,10)===C?e.setAttribute(`aria-current`,`true`):e.removeAttribute(`aria-current`);for(let e of f.querySelectorAll(`[data-carousel-go-prev]`))e.toggleAttribute(`aria-disabled`,!De()),De()?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,`-1`);for(let e of f.querySelectorAll(`[data-carousel-go-next]`))e.toggleAttribute(`aria-disabled`,!Oe()),Oe()?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,`-1`);let n=!1,r=M[C]?.slides[0];r&&(r.downloadSrc||r.type===`image`&&r.src)&&(n=!0);for(let e of f.querySelectorAll(`[data-carousel-download]`))e.toggleAttribute(`aria-disabled`,!n)}function ie(e){e||=M[C]?.slides[0];let t=e?.el;if(t)for(let n of t.querySelectorAll(`[data-slide-index]`))n.innerHTML=e.index+1+``}function ae(e){if(!M.length)return 0;let t=U(),n=e;_?n-=Math.floor((e-M[0]?.pos)/t)*t||0:n=J(M[0]?.pos,e,M[M.length-1]?.pos);let r=new Map,i=0;for(let e of M){let a=Math.abs(e.pos-n),o=Math.abs(e.pos-n-t),s=Math.abs(e.pos-n+t),c=Math.min(a,o,s);r.set(i,c),i++}let a=r.size>0?[...r.entries()].reduce((e,t)=>t[1]<e[1]?t:e):[C,0];return parseInt(a[0])}function oe(){return F}function H(){return m}function U(e=!0){return k.length?k.reduce((e,t)=>e+t.dim,0)+(k.length-(_&&e?0:1))*F:0}function se(e){let t=U(),n=H();if(!t||!p||!n)return[];let r=[];e=e===void 0?x:e,_&&(e-=Math.floor(e/t)*t||0);let i=0;for(let a of k){let o=(t=0)=>{r.indexOf(a)>-1||(a.pos=i-e+t||0,a.offset+t>e-a.dim-h+.51&&a.offset+t<e+n+g-.51&&r.push(a))};a.offset=i,_&&(o(t),o(-1*t)),o(),i+=a.dim+F}return r}function ce(e,t){let n=[];for(let t of Array.isArray(e)?e:[e]){let e=le(Object.assign(Object.assign({},t),{isVirtual:!0}));e.el||=document.createElement(`div`),z(`createSlide`,e),n.push(e)}O.splice(t===void 0?O.length:t,0,...n),pe();for(let e of n)z(`addSlide`,e),ue(e);return te(D),n}function le(e){return(q(e)||e instanceof HTMLElement)&&(e={html:e}),Object.assign({index:-1,el:void 0,class:``,isVirtual:!0,dim:0,pos:0,offset:0,html:``,src:``},e)}function ue(e){let t=e.el;if(!e||!t)return;let n=e.html?e.html instanceof HTMLElement?e.html:Js(e.html):void 0;n&&(Y(n,`f-html`),e.htmlEl=n,Y(t,`has-html`),t.append(n),z(`contentReady`,e))}function de(e){if(!p||!e)return;let t=e.el;if(t){if(t.setAttribute(`index`,e.index+``),t.parentElement!==p){let n;Y(t,u.classes.slide),Y(t,e.class),Se(e);for(let t of O)if(t.index>e.index){n=t.el;break}p.insertBefore(t,n&&p.contains(n)?n:null),z(`attachSlideEl`,e)}return ie(e),t}}function fe(e){let t=e?.el;t&&(t.remove(),he(t),z(`detachSlideEl`,e))}function pe(){for(let e=0;e<O.length;e++){let t=O[e],n=t.el;n&&(t.index!==e&&he(n),n.setAttribute(`index`,`${e}`)),t.index=e}}function me(){var e;if(!f||!p)return;v=I(`rtl`),y=I(`vertical`),b=y?`height`:`width`;let t=I(`classes`);if(bc(f,t.isLTR,!v),bc(f,t.isRTL,v),bc(f,t.isHorizontal,!y),bc(f,t.isVertical,y),bc(f,t.hasAdaptiveHeight,I(`adaptiveHeight`)),m=0,h=0,g=0,F=0,p){p.childElementCount||(p.style.display=`grid`);let e=p.getBoundingClientRect();m=p.getBoundingClientRect()[b]||0;let t=window.getComputedStyle(p);F=parseFloat(t.getPropertyValue(`--f-carousel-gap`))||0,t.getPropertyValue(`overflow-`+(y?`y`:`x`))===`visible`&&(h=Math.abs(e[y?`top`:`left`]),g=Math.abs(window[y?`innerHeight`:`innerWidth`]-e[y?`bottom`:`right`])),p.style.display=``}if(!m)return;let n=function(){let e=0;if(p){let t=document.createElement(`div`);t.style.display=`block`,Y(t,u.classes.slide),p.appendChild(t),e=t.getBoundingClientRect()[b],t.remove(),t=void 0}return e}();for(let t of k){let r=t.el,i=0;if(!t.isVirtual&&r&&Gs(r)){let t=!1;r.parentElement&&r.parentElement===p||(p.appendChild(r),t=!0),i=r.getBoundingClientRect()[b],t&&((e=r.parentElement)==null||e.removeChild(r))}else i=n;t.dim=i}if(_=!1,I(`infinite`)){_=!0;let e=U(),t=m+h+g;for(let n=0;n<k.length;n++){let r=k[n]?.dim+F;if(e-r<t&&e-r-t<r){_=!1;break}}}(function(){var e;if(!f)return;let t=H(),n=U(!1),r=I(`slidesPerPage`);r=r===`auto`?1/0:parseFloat(r+``),M=[];let i=0,a=0;for(let n of k)(!M.length||i+n.dim-t>.05||a>=r)&&(M.push({index:M.length,slides:[],dim:0,offset:0,pos:0}),i=0,a=0),(e=M[M.length-1])==null||e.slides.push(n),i+=n.dim+F,a++;let o=I(`center`),s=I(`fill`),c=0;for(let e of M){e.dim=(e.slides.length-1)*F;for(let t of e.slides)e.dim+=t.dim;e.offset=c,e.pos=c,!1!==o&&(e.pos-=.5*(t-e.dim)),s&&!_&&n>t&&(e.pos=J(0,e.pos,n-t)),c+=e.dim+F}let l=[],u;for(let e of M){let t=Object.assign({},e);u&&Math.abs(t.pos-u.pos)<.1?(u.dim+=t.dim,u.slides=[...u.slides,...t.slides]):(u=t,t.index=l.length,l.push(t))}M=l,C=J(0,C,M.length-1)})(),T=M[0]?.pos||0,E=M[M.length-1]?.pos||0,c===0?function(){o=void 0,C=I(`initialPage`);let e=I(`initialSlide`)||void 0;e!==void 0&&(C=W.getPageIndex(e)||0),C=J(0,C,M.length-1),x=M[C]?.pos||0,w=x}():w=M[C||0]?.pos||0,z(`refresh`),re()}function he(e){if(!e||!Gs(e))return;let t=parseInt(e.getAttribute(`index`)||`-1`),n=``;for(let t of Array.from(e.classList)){let e=t.match(/^f-(w+)(Out|In)$/);e&&e[1]&&(n=e[1]+``)}if(!e||!n)return;let r=[`f-${n}Out`,`f-${n}In`,`to-prev`,`to-next`,`from-prev`,`from-next`];e.removeEventListener(`animationend`,_e),X(e,r.join(` `)),A.delete(t)}function ge(){if(!p)return;let e=A.size>0;for(let e of k)he(e.el);A.clear(),e&&Te()}function _e(e){e.animationName?.substring(0,2)===`f-`&&(he(e.target),A.size||(X(f,`in-transition`),!S&&Math.abs(W.getPosition(!0)-w)<.5&&(S=!0,z(`settle`))),Te())}function ve(e){ye(e),z(`click`,e)}function ye(e){if(e.defaultPrevented)return;let t=e.composedPath()[0];if(t.closest(`[data-carousel-go-prev]`))return Ic(e),void W.prev();if(t.closest(`[data-carousel-go-next]`))return Ic(e),void W.next();let n=t.closest(`[data-carousel-go-to]`);if(n)return Ic(e),void W.goTo(parseFloat(n.dataset.carouselGoTo||``)||0);if(t.closest(`[data-carousel-download]`)){Ic(e);let t=M[C]?.slides[0];if(t&&(t.downloadSrc||t.type===`image`&&t.src)){let e=t.downloadFilename,n=document.createElement(`a`),r=t.downloadSrc||t.src||``;n.href=r,n.target=`_blank`,n.download=e||r,n.click()}return}}function be(e){var t;let n=e.el;n&&((t=n.querySelector(`.f-spinner`))==null||t.remove())}function xe(e){var t;let n=e.el;n&&((t=n.querySelector(`.f-html.is-error`))==null||t.remove(),X(n,`has-error`))}function Se(e){e||=M[C]?.slides[0];let t=e?.el;if(!t)return;let n=I(`formatCaption`,e);n===void 0&&(n=e.caption),n||=``;let r=I(`captionEl`);if(r&&r instanceof HTMLElement){if(e.index!==C)return;if(q(n)&&(r.innerHTML=L(n+``)),n instanceof HTMLElement){if(n.parentElement===r)return;r.innerHTML=``,n.parentElement&&(n=n.cloneNode(!0)),r.append(n)}return}if(!n)return;let i=e.captionEl||t.querySelector(`.f-caption`);!i&&n instanceof HTMLElement&&n.classList.contains(`f-caption`)&&(i=n),i||(i=document.createElement(`div`),Y(i,`f-caption`),q(n)?i.innerHTML=L(n+``):n instanceof HTMLElement&&(n.parentElement&&(n=n.cloneNode(!0)),i.append(n)));let a=`f-caption-${Bc}_${e.index}`;i.setAttribute(`id`,a),i.dataset.selectable=`true`,Y(t,`has-caption`),t.setAttribute(`aria-labelledby`,a),e.captionEl=i,t.insertAdjacentElement(`beforeend`,i)}function Ce(e,t={}){let{transition:n,tween:r}=Object.assign({transition:u.transition,tween:u.tween},t||{});if(!f||!i)return;let a=M.length;if(!a||function(e,t){if(!(f&&m&&i&&t&&q(t)&&t!==`tween`))return!1;for(let e of j)if(m-e.dim>.5)return!1;if(h>.5||g>.5)return;let n=M.length,r=e>C?1:-1;e=_?(e%n+n)%n:J(0,e,n-1),v&&(r*=-1);let a=M[C]?.slides[0],o=a?.index,s=M[e]?.slides[0],c=s?.index,l=M[e]?.pos;if(c===void 0||o===void 0||o===c||x===l||Math.abs(m-(s?.dim||0))>1)return!1;S=!1,i.pause(),ge(),Y(f,`in-transition`),x=w=l;let d=de(a),p=de(s);return ne(),d&&(A.add(o),d.style.transform=``,d.addEventListener(`animationend`,_e),X(d,u.classes.isSelected),d.inert=!1,Y(d,`f-${t}Out to-${r>0?`next`:`prev`}`)),p&&(A.add(c),p.style.transform=``,p.addEventListener(`animationend`,_e),Y(p,u.classes.isSelected),p.inert=!1,Y(p,`f-${t}In from-${r>0?`prev`:`next`}`)),Te(),!0}(e,n))return;e=_?(e%a+a)%a:J(0,e,a-1),w=M[e||0]?.pos||0;let s=i.isRunning()?i.getEndValues().pos:x;if(Math.abs(w-s)<1)return x=w,C!==e&&(Se(),o=C,C=e,re(),ie(),z(`change`,C,o)),Te(),void(S||(S=!0,z(`settle`)));if(i.pause(),ge(),_){let e=U(),t=Math.floor((s-M[0]?.pos)/e)||0,n=w+t*e;w=[n+e,n,n-e].reduce(function(e,t){return Math.abs(t-s)<Math.abs(e-s)?t:e})}!1!==n&&Ys(r)?i.spring(Nc({},u.tween,r)).from({pos:x}).to({pos:w}).start():(x=w,ne(),Te(),S||(S=!0,z(`settle`)))}function we(e){let t=x;if(_&&!0!==e){let e=U();t-=(Math.floor((x-M[0]?.pos||0)/e)||0)*e}return t}function Te(){if(!f||!p)return;j=se();let e=new Set,t=[],n=M[C],r=u.setTransform,i;for(let r of k){let a=A.has(r.index),o=j.indexOf(r)>-1,s=(n?.slides)?.indexOf(r)>-1;if(r.isVirtual&&!a&&!o)continue;let c=de(r);if(c&&(t.push(r),s&&e.add(c),I(`adaptiveHeight`)&&s)){let e=(c.lastElementChild||c).getBoundingClientRect().height;i=i==null?e:Math.max(i,e)}}p&&i&&(p.style.height=`${i}px`),[...Mc(p,`.${u.classes.slide}`)].forEach(t=>{bc(t,u.classes.isSelected,e.has(t));let n=O[parseInt(t.getAttribute(`index`)||`-1`)];if(!n)return t.remove(),void he(t);let i=A.has(n.index),a=j.indexOf(n)>-1;if(n.isVirtual&&!i&&!a)return void fe(n);if(t.inert=!a,!1===r)return;let o=n.pos?Math.round(1e4*n.pos)/1e4:0,s=0,c=0,l=0,d=0;i||(s=y?0:v?-1*o:o,c=y?o:0,l=Pc(s,0,n.dim,0,100),d=Pc(c,0,n.dim,0,100)),r instanceof Function&&!i?r(W,n,{x:s,y:c,xPercent:l,yPercent:d}):t.style.transform=s||c?`translate3d(${l}%, ${d}%,0)`:``}),z(`render`,t)}function Ee(){f?.removeEventListener(`click`,ve),document.removeEventListener(`mousemove`,V),A.clear(),a?.disconnect(),a=void 0;for(let e of O){let t=e.el;t&&Gs(t)&&(e.state=void 0,be(e),xe(e),e.isVirtual?(fe(e),e.el=void 0):(he(t),t.style.transform=``,p&&!p.contains(t)&&p.appendChild(t)))}for(let e of Object.values(d))e?.destroy();d={},r?.destroy(),r=void 0,i?.destroy(),i=void 0;for(let[e,t]of Object.entries(u.classes||{}))e!==`container`&&X(f,t);X(p,`is-draggable`)}function De(){return _||C>0}function Oe(){return _||C<M.length-1}let W={add:function(e,t){let n=x,r=C,a=U(),o=i?.isRunning()?i.getEndValues().pos:x,s=a&&Math.floor((o-(M[0]?.pos||0))/a)||0;return ce(e,t),te(D),me(),i&&a&&(r===C&&(n-=s*a),n===w?x=w:i.spring({clamp:!0,mass:1,tension:300,friction:25,restDelta:1,restSpeed:1}).from({pos:n}).to({pos:w}).start()),Te(),W},canGoPrev:De,canGoNext:Oe,destroy:function(){return z(`destroy`),window.removeEventListener(`resize`,B),Ee(),R.clear(),f=null,M=[],O=[],u=Object.assign({},Lc),d={},k=[],s=void 0,D=`*`,c=2,W},emit:z,filter:function(e=`*`){return te(e),me(),x=J(T,x,E),Te(),z(`filter`,e),W},getContainer:function(){return f},getGapDim:oe,getGestures:function(){return r},getLastMouseMove:function(){return Rc},getOption:function(e){return I(e)},getOptions:function(){return u},getPage:function(){return M[C]},getPageIndex:function(e){if(e!==void 0){for(let t of M||[])for(let n of t.slides)if(n.index===e)return t.index;return-1}return C},getPageIndexFromPosition:ae,getPageProgress:function(e,t){e===void 0&&(e=C);let n=M[e];if(!n)return e>C?-1:1;let r=U(),i=oe(),a=n.pos,o=we();if(_&&!0!==t){let e=Math.floor((o-M[0]?.pos)/r)||0;o-=e*r,a=[a+r,a,a-r].reduce(function(e,t){return Math.abs(t-o)<Math.abs(e-o)?t:e})}return(o-a)/(n.dim+i)||0},getPageVisibility:function(e){e===void 0&&(e=C);let t=M[e];if(!t)return e>C?-1:1;let n=we(),r=H(),i=t.pos;if(_){let e=U(),t=i+(Math.floor((n-M[0]?.pos)/e)||0)*e;i=[t+e,t,t-e].reduce(function(e,t){return Math.abs(t-n)<Math.abs(e-n)?t:e})}return i>n&&i+t.dim<n+r?1:i<n?(i+t.dim-n)/t.dim||0:i+t.dim>n+r&&(n+r-i)/t.dim||0},getPages:function(){return M},getPlugins:function(){return d},getPosition:we,getSlides:function(){return O},getState:function(){return c},getTotalSlideDim:U,getTween:function(){return i},getViewport:function(){return p},getViewportDim:H,getVisibleSlides:function(e){return e===void 0?j:se(e)},goTo:Ce,hasNavigated:function(){return o!==void 0},hideError:xe,hideLoading:be,init:function(){if(!e||!Gs(e))throw Error(`No Element found`);return c!==0&&(Ee(),c=0),f=e,l=t,window.removeEventListener(`resize`,B),l.breakpoints&&window.addEventListener(`resize`,B),B(),W},isInfinite:function(){return _},isInTransition:function(){return A.size>0},isRTL:function(){return v},isSettled:function(){return S},isVertical:function(){return y},localize:L,next:function(e={}){return Ce(C+1,e),W},off:function(e,t){for(let n of e instanceof Array?e:[e])R.has(n)&&R.set(n,R.get(n).filter(e=>e!==t));return W},on:function(e,t){for(let n of e instanceof Array?e:[e])R.set(n,[...R.get(n)||[],t]);return W},prev:function(e={}){return Ce(C-1,e),W},reInit:function(e={},r){return Ee(),c=0,s=void 0,D=`*`,t=e,l=e,Ys(r)&&(n=r),B(),W},remove:function(e){e===void 0&&(e=O.length-1);let t=O[e];return t&&(z(`removeSlide`,t),t.el&&=(he(t.el),t.el.remove(),void 0),O.splice(e,1),te(D),me(),x=J(T,x,E),Te()),W},setPosition:function(e){x=e,ne(),Te()},showError:function(e,t){if(c===1){be(e),xe(e);let n=e.el;if(n){let r=document.createElement(`div`);Y(r,`f-html`),Y(r,`is-error`),r.innerHTML=L(t||`<p>{{ERROR}}</p>`),e.htmlEl=r,Y(n,`has-html has-error`),n.insertAdjacentElement(`afterbegin`,r),z(`contentReady`,e)}}return W},showLoading:function(e){let t=e.el,n=t?.querySelector(`.f-spinner`);if(!t||n)return W;let r=Js(I(`spinnerTpl`));return r&&(Y(r,`f-spinner`),t.insertAdjacentElement(`beforeend`,r)),W},version:`6.1.14`};return W};Vc.l10n={en_EN:Fc},Vc.getDefaults=()=>Lc;var Hc=(e=!0,t=`--f-scrollbar-compensate`,n=`--f-body-margin`,r=`hide-scrollbar`)=>{let i=document,a=i.body,o=i.documentElement;if(e){if(a.classList.contains(r))return;let e=window.innerWidth-o.getBoundingClientRect().width;e<0&&(e=0),o.style.setProperty(t,`${e}px`);let i=parseFloat(window.getComputedStyle(a).marginRight);i&&a.style.setProperty(n,`${i}px`),a.classList.add(r)}else a.classList.remove(r),a.style.setProperty(n,``),i.documentElement.style.setProperty(t,``)};function Uc(){return!(typeof window>`u`||!window.document||!window.document.createElement)}var Wc=function(e=``,t=``,n=``){return e.split(t).join(n)},Gc={tpl:e=>`<img class="f-panzoom__content" n    ${e.srcset?`data-lazy-srcset="{{srcset}}"`:``} n    ${e.sizes?`data-lazy-sizes="{{sizes}}"`:``} n    data-lazy-src="{{src}}" alt="{{alt}}" />`},Kc=()=>{let e;function t(t,n){let r=e?.getOptions().Zoomable,i=(Ys(r)?Object.assign(Object.assign({},Gc),r):Gc)[t];return i&&typeof i==`function`&&n?i(n):i}function n(){e&&!1!==e.getOptions().Zoomable&&(e.on(`addSlide`,a),e.on(`removeSlide`,o),e.on(`attachSlideEl`,s),e.on(`click`,i),e.on(`change`,r),e.on(`ready`,r))}function r(){c();let t=e?.getVisibleSlides()||[];if(t.length>1||e?.getOption(`transition`)===`slide`)for(let n of t){let t=n.panzoomRef;t&&(e?.getPage().slides||[]).indexOf(n)<0&&t.execute(Z.ZoomTo,Object.assign({},t.getStartPosition()))}}function i(e,t){let n=t.target;n&&!t.defaultPrevented&&n.dataset.panzoomAction&&l(n.dataset.panzoomAction)}function a(n,r){let i=r.el;if(!e||!i||r.panzoomRef)return;let a=r.src||r.lazySrc||``,o=r.alt||r.caption||`Image #${r.index}`,s=r.srcset||r.lazySrcset||``,l=r.sizes||r.lazySizes||``;if(a&&q(a)&&!r.html&&(!r.type||r.type===`image`)){r.type=`image`,r.thumbSrc=r.thumbSrc||a;let e=t(`tpl`,r);e=Wc(e,`{{src}}`,a+``),e=Wc(e,`{{srcset}}`,s+``),e=Wc(e,`{{sizes}}`,l+``),i.insertAdjacentHTML(`afterbegin`,e)}let u=i.querySelector(`.f-panzoom__content`);if(!u)return;u.setAttribute(`alt`,o+``);let d=r.width&&r.width!==`auto`?parseFloat(r.width+``):`auto`,f=r.height&&r.height!==`auto`?parseFloat(r.height+``):`auto`,p=jc(i,Object.assign({width:d,height:f,classes:{container:`f-zoomable`},event:()=>e?.getLastMouseMove(),spinnerTpl:()=>e?.getOption(`spinnerTpl`)||``},t(`Panzoom`)));p.on(`*`,(t,n,...i)=>{e&&(n===`loading`&&(r.state=0),n===`loaded`&&(r.state=1),n===`error`&&(r.state=2,e?.showError(r,`{{IMAGE_ERROR}}`)),e.emit(`panzoom:${n}`,r,...i),n===`loading`&&e.emit(`contentLoading`,r),n===`ready`&&e.emit(`contentReady`,r),r.index===e?.getPageIndex()&&c())}),r.panzoomRef=p}function o(e,t){t.panzoomRef&&=(t.panzoomRef.destroy(),void 0)}function s(e,t){let n=t.panzoomRef;if(n)switch(n.getState()){case 0:n.init();break;case 3:n.execute(Z.ZoomTo,Object.assign(Object.assign({},n.getStartPosition()),{velocity:0}))}}function c(){let t=e?.getContainer()||void 0,n=(e?.getPage())?.slides[0]?.panzoomRef;if(t)if(n)n.updateControls(t);else for(let e of t.querySelectorAll(`[data-panzoom-action]`)||[])e.setAttribute(`aria-disabled`,``),e.setAttribute(`tabindex`,`-1`)}function l(t,...n){var r;(r=e?.getPage().slides[0].panzoomRef)==null||r.execute(t,...n)}return{init:function(t){e=t,e.on(`initPlugins`,n)},destroy:function(){if(e){e.off(`initPlugins`,n),e.off(`addSlide`,a),e.off(`removeSlide`,o),e.off(`attachSlideEl`,s),e.off(`click`,i),e.off(`change`,r),e.off(`ready`,r);for(let t of e.getSlides())o(0,t)}e=void 0},execute:l}},qc={syncOnChange:!1,syncOnClick:!0,syncOnHover:!1},Jc=()=>{let e,t;function n(){let t=e?.getOptions().Sync;return Ys(t)?Object.assign(Object.assign({},qc),t):qc}function r(r){var i;e&&r&&(t=r,e.getOptions().classes=Object.assign(Object.assign({},e.getOptions().classes),{isSelected:``}),e.getOptions().initialSlide=t.getPage()?.slides[0]?.index||0,n().syncOnChange&&e.on(`change`,o),n().syncOnClick&&e.on(`click`,c),n().syncOnHover&&((i=e.getViewport())==null||i.addEventListener(`mouseover`,l)),function(){!e||!t||(e.on(`ready`,a),e.on(`refresh`,u),t.on(`change`,s),t.on(`filter`,d))}())}function i(){let t=n().target;e&&t&&r(t)}function a(){f()}function o(){if(e&&t){let n=e.getPage()?.slides||[],r=t.getPageIndex(n[0].index||0);r>-1&&t.goTo(r,e.hasNavigated()?void 0:{tween:!1,transition:!1}),f()}}function s(){if(e&&t){let n=e.getPageIndex(t.getPage()?.slides[0].index||0);n>-1&&e.goTo(n,t.hasNavigated()?void 0:{tween:!1,transition:!1}),f()}}function c(n,r){if(!e||!t||e.getTween()?.isRunning())return;let i=e?.getOptions().classes.slide;if(!i)return;let a=r.target.closest(`.${i}`);if(a){let e=parseInt(a.getAttribute(`index`)||``)||0,n=t.getPageIndex(e);t.goTo(n)}}function l(t){e&&c(0,t)}function u(){if(e&&t){let n=e.getPageIndex(t.getPage()?.slides[0].index||0);n>-1&&e.goTo(n,{tween:!1,transition:!1}),f()}}function d(n,r){e&&t&&(e.filter(r),s())}function f(){var n;if(!t)return;let r=t.getPage()?.slides[0]?.index||0;for(let t of e?.getSlides()||[])(n=t.el)==null||n.classList.toggle(`is-selected`,t.index===r)}return{init:function(t){e=t,e.on(`initSlides`,i)},destroy:function(){var n;e?.off(`ready`,a),e?.off(`refresh`,u),e?.off(`change`,o),e?.off(`click`,c),(n=e?.getViewport())==null||n.removeEventListener(`mouseover`,l),t?.off(`change`,s),t?.off(`filter`,d),t=void 0,e?.off(`initSlides`,i),e=void 0},getTarget:function(){return t}}},Yc={showLoading:!0,preload:1},Xc=`is-lazyloading`,Zc=`is-lazyloaded`,Qc=`has-lazyerror`,$c=()=>{let e;function t(){let t=e?.getOptions().Lazyload;return Ys(t)?Object.assign(Object.assign({},Yc),t):Yc}function n(n){let r=n.el;if(!r)return;let i=t(),a=`[data-lazy-src],[data-lazy-srcset],[data-lazy-bg]`,o=Array.from(r.querySelectorAll(a));r.matches(a)&&o.push(r);for(let t of o){let r=t.dataset.lazySrc,a=t.dataset.lazySrcset,o=t.dataset.lazySizes,s=t.dataset.lazyBg,c=(t instanceof HTMLImageElement||t instanceof HTMLSourceElement)&&(r||a),l=!!s;if(!c&&!l)continue;let u=r||a||s;if(u){if(c){let s=t.parentElement?.classList.contains(`f-panzoom__wrapper`);i.showLoading&&e?.showLoading(n),t.addEventListener(`load`,()=>{e?.hideLoading(n),X(t,Qc),t instanceof HTMLImageElement?t.decode().finally(()=>{X(t,Xc),Y(t,Zc)}).catch(()=>{}):(X(t,Xc),Y(t,Zc)),s||e==null||e.emit(`lazyLoad:loaded`,n,t,u)}),t.addEventListener(`error`,()=>{e?.hideLoading(n),X(t,Xc),Y(t,Qc),s||e==null||e.emit(`lazyLoad:error`,n,t,u)}),t.classList.add(`f-lazyload`),t.classList.add(Xc),s||e==null||e.emit(`lazyLoad:load`,n,t,u),r&&(t.src=r),a&&(t.srcset=a),o&&(t.sizes=o)}else l&&(t.style.backgroundImage=`url('${s}')`);delete t.dataset.lazySrc,delete t.dataset.lazySrcset,delete t.dataset.lazySizes,delete t.dataset.lazyBg}}}function r(){if(!e)return;let r=[...e.getVisibleSlides()],i=t().preload;if(i>0){let t=e.getPosition(),n=e.getViewportDim();r.push(...e.getVisibleSlides(t+n*i),...e.getVisibleSlides(t-n*i))}for(let e of r)n(e)}return{init:function(t){e=t,e.on(`render`,r)},destroy:function(){e?.off(`render`,r),e=void 0}}},el={prevTpl:`<svg width="24" height="24" viewBox="0 0 24 24" tabindex="-1"><path d="M15 3l-9 9 9 9"></path></svg>`,nextTpl:`<svg width="24" height="24" viewBox="0 0 24 24" tabindex="-1"><path d="M9 3l9 9-9 9"></path></svg>`},tl=()=>{let e,t,n;function r(t){let n=function(){let t=e?.getOptions().Arrows;return Ys(t)?Object.assign(Object.assign({},el),t):el}(),r=`<button data-carousel-go-${t} tabindex="0" class="f-button is-arrow is-${t}" title="{{${t.toUpperCase()}}}">`+n[`${t}Tpl`]+`</button>`,i=Js(e.localize(r))||void 0;return i&&Y(i,n[`${t}Class`]),i}function i(){var r;t?.remove(),t=void 0,n?.remove(),n=void 0,(r=e?.getContainer())==null||r.classList.remove(`has-arrows`)}function a(){e&&!1!==e.getOptions().Arrows&&e.getPages().length>1?(function(){if(!e)return;let i=e.getViewport();i&&(t||(t=r(`prev`),t&&i.insertAdjacentElement(`beforebegin`,t)),n||(n=r(`next`),n&&i.insertAdjacentElement(`afterend`,n)),bc(e.getContainer(),`has-arrows`,!0))}(),e&&(t?.toggleAttribute(`aria-disabled`,!e.canGoPrev()),n?.toggleAttribute(`aria-disabled`,!e.canGoNext()))):i()}return{init:function(t){e=t.on([`change`,`refresh`],a)},destroy:function(){i(),e?.off([`change`,`refresh`],a),e=void 0}}},nl=`<circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/>`,rl=`<g><line x1="11" y1="8" x2="11" y2="14"></line></g><circle cx="11" cy="11" r="7.5"/><path d="m21 21-4.35-4.35M8 11h6"/>`,il={moveLeft:[`moveLeft`,`MOVE_LEFT`,`<path d="M5 12h14M5 12l6 6M5 12l6-6"/>`],moveRight:[`moveRight`,`MOVE_RIGHT`,`<path d="M5 12h14M13 18l6-6M13 6l6 6"/>`],moveUp:[`moveUp`,`MOVE_UP`,`<path d="M12 5v14M18 11l-6-6M6 11l6-6"/>`],moveDown:[`moveDown`,`MOVE_DOWN`,`<path d="M12 5v14M18 13l-6 6M6 13l6 6"/>`],zoomOut:[`zoomOut`,`ZOOM_OUT`,nl],zoomIn:[`zoomIn`,`ZOOM_IN`,rl],toggleFull:[`toggleFull`,`TOGGLE_FULL`,rl],iterateZoom:[`iterateZoom`,`ITERATE_ZOOM`,rl],toggle1to1:[`toggleFull`,`TOGGLE_FULL`,`<path d="M3.51 3.07c5.74.02 11.48-.02 17.22.02 1.37.1 2.34 1.64 2.18 3.13 0 4.08.02 8.16 0 12.23-.1 1.54-1.47 2.64-2.79 2.46-5.61-.01-11.24.02-16.86-.01-1.36-.12-2.33-1.65-2.17-3.14 0-4.07-.02-8.16 0-12.23.1-1.36 1.22-2.48 2.42-2.46Z"/><path d="M5.65 8.54h1.49v6.92m8.94-6.92h1.49v6.92M11.5 9.4v.02m0 5.18v0"/>`],rotateCCW:[`rotateCCW`,`ROTATE_CCW`,`<path d="M15 4.55a8 8 0 0 0-6 14.9M9 15v5H4M18.37 7.16v.01M13 19.94v.01M16.84 18.37v.01M19.37 15.1v.01M19.94 11v.01"/>`],rotateCW:[`rotateCW`,`ROTATE_CW`,`<path d="M9 4.55a8 8 0 0 1 6 14.9M15 15v5h5M5.63 7.16v.01M4.06 11v.01M4.63 15.1v.01M7.16 18.37v.01M11 19.94v.01"/>`],flipX:[`flipX`,`FLIP_X`,`<path d="M12 3v18M16 7v10h5L16 7M8 7v10H3L8 7"/>`],flipY:[`flipY`,`FLIP_Y`,`<path d="M3 12h18M7 16h10L7 21v-5M7 8h10L7 3v5"/>`],reset:[`reset`,`RESET`,`<path d="M20 11A8.1 8.1 0 0 0 4.5 9M4 5v4h4M4 13a8.1 8.1 0 0 0 15.5 2m.5 4v-4h-4"/>`],toggleFS:[`toggleFS`,`TOGGLE_FS`,`<g><path d="M14.5 9.5 21 3m0 0h-6m6 0v6M3 21l6.5-6.5M3 21v-6m0 6h6"/></g><g><path d="m14 10 7-7m-7 7h6m-6 0V4M3 21l7-7m0 0v6m0-6H4"/></g>`]},al={};for(let e of Object.keys(il)){let t=il[e];al[e]={tpl:`<button data-panzoom-action="${t[0]}" class="f-button" title="{{${t[1]}}}"><svg>${t[2]}</svg></button>`}}var ol;(function(e){e.Left=`left`,e.middle=`middle`,e.right=`right`})(ol||={});var sl=Object.assign({counter:{tpl:`<div class="f-counter"><span data-carousel-page></span>/<span data-carousel-pages></span></div>`},download:{tpl:`<button data-carousel-download class="f-button" title="{{DOWNLOAD}}"><svg><path d="M4 17v2a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-2M7 11l5 5 5-5M12 4v12"/></svg></button>`},autoplay:{tpl:`<button data-autoplay-action="toggle" class="f-button" title="{{TOGGLE_AUTOPLAY}}"><svg><g><path d="M5 3.5 19 12 5 20.5Z"/></g><g><path d="M8 4v15M17 4v15"/></g></svg></button>`},thumbs:{tpl:`<button data-thumbs-action="toggle" class="f-button" title="{{TOGGLE_THUMBS}}"><svg><rect width="18" height="14" x="3" y="3" rx="2"/><path d="M4 21h1M9 21h1M14 21h1M19 21h1"/></svg></button>`}},al),cl={absolute:!1,display:{left:[],middle:[`zoomIn`,`zoomOut`,`toggle1to1`,`rotateCCW`,`rotateCW`,`flipX`,`flipY`,`reset`],right:[]},enabled:`auto`,items:{}},ll=()=>{let e,t;function n(t){let n=e?.getOptions().Toolbar,r=(Ys(n)?Object.assign(Object.assign({},cl),n):cl)[t];return r&&typeof r==`function`&&e?r(e):r}function r(){if(!e||t||!1===e?.getOptions().Toolbar)return;let r=e.getContainer();if(!r)return;let i=n(`enabled`);if(!i)return;let a=n(`absolute`),o=e.getSlides().length>1,s=!1,c=!1;for(let t of e.getSlides())t.panzoomRef&&(s=!0),(t.downloadSrc||t.type===`image`&&t.src)&&(c=!0);let l=e.getPlugins().Thumbs?.isEnabled()||!1,u=o&&e.getPlugins().Autoplay||!1,d=e.getPlugins().Fullscreen&&(document.fullscreenEnabled||document.webkitFullscreenEnabled);if(i===`auto`&&(i=s),!i)return;t=r.querySelector(`.f-carousel__toolbar`)||void 0,t||(t=document.createElement(`div`),Y(t,`f-carousel__toolbar`));let f=n(`display`),p=Nc({},sl,n(`items`));for(let n of[`left`,`middle`,`right`]){let r=f[n]||[],i=document.createElement(`div`);Y(i,`f-carousel__toolbar__column is-${n}`);for(let t of r){let n;if(q(t)){if(t===`counter`&&!o||t===`autoplay`&&!u||al[t]&&!s||t===`fullscreen`&&!d||t===`thumbs`&&!l||t===`download`&&!c)continue;n=p[t]}if(Ys(t)&&(n=t),n&&n.tpl){let t=e.localize(n.tpl);t=t.split(`<svg>`).join(`<svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24">`);let r=Js(t);r&&(typeof n.click==`function`&&e&&r.addEventListener(`click`,t=>{t.preventDefault(),t.stopPropagation(),typeof n.click==`function`&&e&&n.click(e,t)}),i.append(r))}}t.append(i)}if(t.childElementCount){if(a&&Y(t,`is-absolute`),!t.parentElement){let e=n(`parentEl`);e?e.insertAdjacentElement(`afterbegin`,t):r.insertAdjacentElement(`afterbegin`,t)}r.contains(t)&&(Y(r,`has-toolbar`),a&&Y(r,`has-absolute-toolbar`))}}return{init:function(t){e=t,e?.on(`initSlides`,r)},destroy:function(){e?.off(`initSlides`,r),X(e?.getContainer(),`has-toolbar has-absolute-toolbar`),t?.remove(),t=void 0},add:function(e,t){sl[e]=t},isEnabled:function(){return!!t}}},ul={autoStart:!0,pauseOnHover:!0,showProgressbar:!0,timeout:2e3},dl=()=>{let e,t,n=!1,r=!1,i=!1,a=null;function o(t){let n=e?.getOptions().Autoplay,r=(Ys(n)?Object.assign(Object.assign({},ul),n):ul)[t];return r&&typeof r==`function`&&e?r(e):r}function s(){clearTimeout(t),t=void 0}function c(){if(!e||!n||i||r||t||!e.isSettled()||function(){let t=e?.getPage()?.slides||[];for(let e of t)if(e.state===0)return!0;return!1}())return;(function(){var t;if(!e||(d(),!o(`showProgressbar`)))return;let n=o(`progressbarParentEl`);if(!n&&(t=e.getPlugins().Toolbar)!=null&&t.isEnabled()&&(n=e.getContainer()),!n&&!0!==e.getPlugins().Toolbar?.isEnabled()){let t=e.getPages()[0]?.slides||[],r=e.getPage()?.slides||[];t.length===1&&r.length===1&&(n=r[0].el)}if(n||=e.getViewport(),!n)return;a=document.createElement(`div`),Y(a,`f-progressbar`),n.prepend(a);let r=o(`timeout`)||1e3;a.style.animationDuration=`${r}ms`})();let s=o(`timeout`);t=setTimeout(()=>{e&&n&&!r&&(e.isInfinite()||e.getPageIndex()!==e.getPages().length-1?e.next():e.goTo(0))},s)}function l(){var t;if(!e||e.getPages().length<2||!1===e.getOptions().Autoplay||n)return;n=!0,e.emit(`autoplay:start`,o(`timeout`)),Y(e.getContainer(),`has-autoplay`),(t=e.getTween())==null||t.on(`start`,_);let r=e?.getContainer();r&&o(`pauseOnHover`)&&matchMedia(`(hover: hover)`).matches&&(r.addEventListener(`mouseenter`,v,!1),r.addEventListener(`mouseleave`,y,!1)),e.on(`change`,h),e.on(`settle`,g),e.on(`contentReady`,p),e.on(`panzoom:touchStart`,u),e.on(`panzoom:wheel`,u),e.isSettled()&&c()}function u(){var t;if(s(),d(),e){if(n){e.emit(`autoplay:end`),(t=e.getTween())==null||t.off(`start`,_);let n=e.getContainer();n&&(n.classList.remove(`has-autoplay`),n.removeEventListener(`mouseenter`,v,!1),n.removeEventListener(`mouseleave`,y,!1))}e.off(`change`,h),e.off(`settle`,g),e.off(`contentReady`,p),e.off(`panzoom:touchStart`,u),e.off(`panzoom:wheel`,u)}n=!1,r=!1}function d(){a&&=(a.remove(),null)}function f(){e&&e.getPages().length>1&&o(`autoStart`)&&l()}function p(){c()}function m(e,t){let n=t.target;n&&!t.defaultPrevented&&n.dataset.autoplayAction===`toggle`&&b.toggle()}function h(){!e||!e?.isInfinite()&&e.getPageIndex()===e.getPages().length-1?u():(s(),d())}function g(){c()}function _(){s(),d()}function v(){i=!0,n&&(s(),d())}function y(){i=!1,n&&!r&&e!=null&&e.isSettled()&&c()}let b={init:function(t){e=t,e.on(`ready`,f),e.on(`click`,m)},destroy:function(){u(),e?.off(`ready`,f),e?.off(`click`,m),e=void 0},isEnabled:()=>n,pause:function(){r=!0,s(),d()},resume:function(){r=!1,n&&!i&&c()},start(){l()},stop(){u()},toggle(){n?u():l()}};return b},fl={Carousel:{Lazyload:{showLoading:!1}},minCount:2,showOnStart:!0,thumbTpl:`<button aria-label="Slide to #{{page}}"><img draggable="false" alt="{{alt}}" data-lazy-src="{{src}}" /></button>`,type:`modern`},pl,ml=()=>{let e,t,n,r,i,a=0,o=0,s=!0;function c(t){let n=e?.getOptions().Thumbs,r=(Ys(n)?Object.assign(Object.assign({},fl),n):fl)[t];return r&&typeof r==`function`&&e?r(e):r}function l(){if(!e||!1===e?.getOptions().Thumbs)return!1;let t=0;for(let n of e.getSlides())n.thumbSrc&&t++;return t>=c(`minCount`)}function u(){return c(`type`)===`modern`}function d(){return c(`type`)===`scrollable`}function f(){let t=[],n=e?.getSlides()||[];for(let e of n)t.push({index:e.index,class:e.thumbClass,html:p(e)});return t}function p(e){let t=e.thumb?e.thumb instanceof HTMLImageElement?e.thumb.src:e.thumb:e.thumbSrc||void 0,n=e.thumbAlt===void 0?`Thumbnail #${(e.index||0)+1}`:e.thumbAlt+``,r=c(`thumbTpl`);return r=Wc(r,`{{alt}}`,n),r=Wc(r,`{{src}}`,t+``),r=Wc(r,`{{index}}`,`${e.index||0}`),r=Wc(r,`{{page}}`,`${(e.index||0)+1}`),r}function m(e){return`<div index="${e.index||0}" class="f-thumbs__slide ${e.class||``}">${e.html||``}</div>`}function h(t=!1){let r=e?.getContainer();if(!e||!r||n||!l())return;let i=c(`Carousel`)?.classes||{};if(i.container=i.container||`f-thumbs`,!n){let e=r.nextElementSibling;e!=null&&e.classList.contains(i.container)&&(n=e)}if(!n){n=document.createElement(`div`);let e=c(`parentEl`);e?e.insertAdjacentElement(`beforeend`,n):r.insertAdjacentElement(`afterend`,n)}Y(n,i.container),Y(n,`f-thumbs`),Y(n,`is-${c(`type`)}`),t&&Y(n,`is-hidden`)}function g(){if(!n||!d())return;r=document.createElement(`div`),Y(r,`f-thumbs__viewport`);let t=``;for(let e of f())typeof(e.html||``)==`string`&&(t+=m(e));r.innerHTML=t,n.append(r),n.addEventListener(`click`,t=>{t.preventDefault();let n=t.target.closest(`[index]`),r=parseInt(n?.getAttribute(`index`)||`-1`);e&&r>-1&&e.goTo(r)}),i=new IntersectionObserver(e=>{e.forEach(e=>{e.isIntersecting&&e.target instanceof HTMLImageElement&&(e.target.src=e.target.getAttribute(`data-lazy-src`)+``,e.target.removeAttribute(`data-lazy-src`),i?.unobserve(e.target))})},{root:r,rootMargin:`100px`}),n.querySelectorAll(`[data-lazy-src]`).forEach(e=>{i?.observe(e)}),e?.emit(`thumbs:ready`)}function _(){var r;if(!pl||!e||!n||d()||t)return;let i=f();if(!i.length)return;let l=Nc({},{Sync:{target:e},Lazyload:{preload:1},slides:i,classes:{container:`f-thumbs`,viewport:`f-thumbs__viewport`,slide:`f-thumbs__slide`},center:!0,fill:!u(),infinite:!1,dragFree:!0,rtl:e.getOptions().rtl||!1,slidesPerPage:e=>{let t=0;return u()&&(function(){if(!u()||!n)return;let e=e=>n&&parseFloat(getComputedStyle(n).getPropertyValue(`--f-thumb-`+e))||0;a=e(`width`),o=e(`clip-width`)}(),t=4*(a-o)),e&&e.getTotalSlideDim()<=e.getViewportDim()-t?1/0:1}},fl.Carousel||{},c(`Carousel`)||{});t=pl(n,l,{Sync:Jc,Lazyload:$c}),t.on(`ready`,()=>{Y(n,`is-syncing`),e?.emit(`thumbs:ready`),u()&&e?.on(`render`,x)}),t.on(`destroy`,()=>{e?.emit(`thumbs:destroy`)}),t.init(),(r=t.getGestures())==null||r.on(`start`,()=>{s=!1}),t.on(`click`,(e,t)=>{let n=t.target;if(n){let e=n.matches(`button`)?n:n.firstElementChild;e&&e.matches(`button`)&&(t.preventDefault(),e.focus({preventScroll:!0}))}}),Y(e.getContainer(),`has-thumbs`),O()}function v(){l()&&c(`showOnStart`)&&(h(),g())}function y(){var t;l()&&(_(),e?.on(`addSlide`,C),e?.on(`removeSlide`,w),e?.on(`click`,T),e?.on(`refresh`,E),(t=e?.getGestures())==null||t.on(`start`,b),D(!0))}function b(){var e,t;s=!0,(e=document.activeElement)!=null&&e.closest(`.f-thumbs`)&&((t=document.activeElement)==null||t.blur())}function x(){var r;n?.classList.toggle(`is-syncing`,!1===e?.hasNavigated()||(e?.getTween())?.isRunning()),O(),(r=e?.getGestures())!=null&&r.isPointerDown()&&function(){if(!u()||!e||!t||!s)return;let n=t.getTween(),r=t.getPages(),i=e.getPageIndex()||0,c=e.getPageProgress()||0;if(!(e&&r&&r[i]&&n))return;let l=n.isRunning()?n.getCurrentValues().pos:t.getPosition();if(l===void 0)return;let d=r[i].pos+c*(a-o);d=J(r[0].pos,d,r[r.length-1].pos),n.from({pos:l}).to({pos:d}).start()}()}function S(){s=!0,D()}function C(e,n){let a={html:p(n)};if(t)t.add(a,n.index);else if(r){let e=Js(m(a));if(e){r.append(e);let t=e.querySelector(`img`);t&&i?.observe(t)}}}function w(e,n){var i;t?t.remove(n.index):r&&((i=r.querySelector(`[index="${n.index}"]`))==null||i.remove())}function T(e,t){let r=t.target;t.defaultPrevented||r?.dataset?.thumbsAction!==`toggle`||(n||(h(!0),g(),_()),n&&n.classList.toggle(`is-hidden`))}function E(){D()}function D(t=!1){if(!e||!r||!d())return;let n=e.getPageIndex();r.querySelectorAll(`.is-selected`).forEach(e=>{e.classList.remove(`is-selected`)});let i=r.querySelector(`[index="${n}"]`);if(i){i.classList.add(`is-selected`);let e=r.getBoundingClientRect(),n=i.getBoundingClientRect(),a=i.offsetTop-r.offsetTop-.5*e.height+.5*n.height,o=i.scrollLeft-r.scrollLeft-.5*e.width+.5*n.width;r.scrollTo({top:a,left:o,behavior:t?`instant`:`smooth`})}}function O(){if(!u()||!e||!t)return;let n=t?.getSlides()||[],r=-.5*a;for(let t of n){let n=t.el;if(!n)continue;let i=e.getPageProgress(t.index)||0;i=Math.max(-1,Math.min(1,i)),i>-1&&i<1&&(r+=.5*a*(1-Math.abs(i))),i=Math.round(1e4*i)/1e4,r=Math.round(1e4*r)/1e4,n.style.setProperty(`--progress`,`${Math.abs(i)}`),n.style.setProperty(`--shift`,`${e?.isRTL()?-1*r:r}px`),i>-1&&i<1&&(r+=.5*a*(1-Math.abs(i)))}}return{init:function(t,n){pl=n,e=t,e.on(`ready`,y),e.on(`initSlides`,v),e.on(`change`,S)},destroy:function(){var r,i;d()&&e?.emit(`thumbs:destroy`),e?.off(`ready`,y),e?.off(`initSlides`,v),e?.off(`change`,S),e?.off(`render`,x),e?.off(`addSlide`,C),e?.off(`click`,T),e?.off(`refresh`,E),(r=e?.getGestures())==null||r.off(`start`,b),(i=e?.getContainer())==null||i.classList.remove(`has-thumbs`),e=void 0,t?.destroy(),t=void 0,n?.remove(),n=void 0},getCarousel:function(){return t},getContainer:function(){return n},getType:function(){return c(`type`)},isEnabled:l}},hl={autosize:!1,iframeAttr:{allow:`autoplay; fullscreen`,scrolling:`auto`},preload:!1},gl=()=>{let e;function t(){let t=e?.getOptions().Html;return Ys(t)?Nc({},hl,t):hl}function n(){return!1!==e?.getOptions().Html}function r(e){return e.type===`iframe`||e.type===`pdf`||e.type===`gmap`}function i(e){let t=`${e}`;return t.match(/^d+$/)?`${t}px`:t}function a(e){if(e===void 0||e===``)return;let t=`${e}`.trim();if(!t.match(/^d+(.d+)?(px)?$/))return;let n=parseFloat(t);return Number.isFinite(n)?n:void 0}function o(e,n){let r=e[n]??t()[n];return r===`true`||r!==`false`&&r}function s(e,t){if(!n())return;let r=t.type,i=t.src;if(!r&&q(i)){if(i.charAt(0)===`#`?r=`inline`:i.match(/(^data:image/[a-z0-9+/=]*,)|(.((a)?png|avif|gif|jp(g|eg)|pjp(eg)?|jfif|svg|webp|bmp|ico|tif(f)?)((?|#).*)?$)/i)?r=`image`:i.match(/.(pdf)((?|#).*)?$/i)?r=`pdf`:i.match(/.(html|php)((?|#).*)?$/i)&&(r=`iframe`),!r){let e=i.match(/(?:maps.)?google.([a-z]{2,3}(?:.[a-z]{2})?)/(?:(?:(?:maps/(?:place/(?:.*)/)?@(.*),(d+.?d+?)z))|(?:?ll=))(.*)?/i);e&&(i=`https://maps.google.${e[1]}/?ll=${(e[2]?e[2]+`&z=`+Math.floor(parseFloat(e[3]))+(e[4]?e[4].replace(/^//,`&`):``):e[4]+``).replace(/?/,`&`)}&output=${e[4]&&e[4].indexOf(`layer=c`)>0?`svembed`:`embed`}`,r=`gmap`)}if(!r){let e=i.match(/(?:maps.)?google.([a-z]{2,3}(?:.[a-z]{2})?)/(?:maps/search/)(.*)/i);e&&(i=`https://maps.google.${e[1]}/maps?q=${e[2].replace(`query=`,`q=`).replace(`api=1`,``)}&output=embed`,r=`gmap`)}r&&(t.src=i,t.type=r)}}function c(i,a){n()&&r(a)&&function(n){let r=n.el,i=n.src;if(!e||!r||!i)return;let a=document.createElement(`iframe`);Y(a,`f-iframe`);for(let[e,n]of Object.entries(t().iframeAttr||{}))a.setAttribute(e,n);a.onerror=()=>{n.state=2,e?.showError(n,`{{IFRAME_ERROR}}`)};let s=document.createElement(`div`);Y(s,`f-html`),s.append(a),n.htmlEl=s,n.contentEl=a,Y(r,`has-html has-iframe has-${n.type}`),r.prepend(s),d(n);let c=o(n,`preload`),l=o(n,`autosize`);n.type===`iframe`&&(c||l)?(n.state=0,e.showLoading(n),Y(r,`is-loading`),a.onload=()=>{if(!e||e.getState()===2||!a.src.length||n.contentEl!==a||!a.isConnected)return;n.state=1;let t=a.dataset.ready!==`true`;a.dataset.ready=`true`,f(n),e.hideLoading(n),t&&e.emit(`contentReady`,n),X(r,`is-loading`)},a.src=`${i}`):(a.src=`${i}`,e.emit(`contentReady`,n))}(a)}function l(t,n){var i,a;if(r(n)){let t=n.el;e?.hideError(n),(i=n.contentEl)==null||i.remove(),n.contentEl=void 0,(a=n.htmlEl)==null||a.remove(),n.htmlEl=void 0,t&&(X(t,`has-html has-iframe has-pdf has-gmap`),X(t,`is-loading`))}}function u(){for(let t of e?.getSlides()||[])r(t)&&(d(t),t.state===1&&f(t))}function d(e){let t=e.htmlEl;if(t&&r(e)&&(t.style.aspectRatio=``,t.style.width=``,t.style.height=``,t.style.maxWidth=``,t.style.maxHeight=``,e.width&&(t.style.maxWidth=i(e.width)),e.height&&(t.style.maxHeight=i(e.height)),e.aspectRatio)){let n=e.aspectRatio.split(`/`),r=parseFloat(n[0].trim()),i=n[1]?parseFloat(n[1].trim()):0,a=r&&i?r/i:r;t.offsetHeight;let o=t.getBoundingClientRect(),s=a<(o.width||1)/(o.height||1);t.style.aspectRatio=`${e.aspectRatio}`,t.style.width=s?`auto`:``,t.style.height=s?``:`auto`}}function f(e){let t=e.contentEl,n=t?.parentElement,r=n?.style,i=o(e,`autosize`),s=a(e.width)||0,c=a(e.height)||0;if(s&&c&&(i=!1),t&&n&&r&&i){try{let e=window.getComputedStyle(n),i=parseFloat(e.paddingLeft)+parseFloat(e.paddingRight),a=parseFloat(e.paddingTop)+parseFloat(e.paddingBottom),o=t.contentWindow;if(o){let e=o.document,t=e.getElementsByTagName(`html`)[0],n=e.body;r.width=``;let l=window.getComputedStyle(n),u=parseFloat(l.marginLeft)+parseFloat(l.marginRight),d=n.style.overflow||``;n.style.overflow=`hidden`,s||=n.scrollWidth+u+i,r.flex=`0 0 auto`,r.width=`${s}px`,r.height=`${n.scrollHeight}px`,n.style.overflow=d,c=Math.max(t.scrollHeight,Math.ceil(t.getBoundingClientRect().height))+a}}catch{}(s||c)&&Object.assign(r,{flex:`0 1 auto`,width:s?`${s}px`:``,height:c?`${c}px`:``})}}return{init:function(t){e=t,e.on(`addSlide`,s),e.on(`attachSlideEl`,c),e.on(`detachSlideEl`,l),e.on(`refresh`,u)},destroy:function(){e?.off(`addSlide`,s),e?.off(`attachSlideEl`,c),e?.off(`detachSlideEl`,l),e?.off(`refresh`,u),e=void 0}}},_l=(e,t={})=>{let n=new URL(e),r=new URLSearchParams(n.search),i=new URLSearchParams;for(let[e,n]of[...r,...Object.entries(t)]){let t=n+``;if(e===`t`){let e=t.match(/((d*)m)?(d*)s?/);e&&i.set(`start`,60*parseInt(e[2]||`0`)+parseInt(e[3]||`0`)+``)}else i.set(e,t)}let a=i+``,o=e.match(/#t=((.*)?d+s)/);return o&&(a+=`#t=${o[1]}`),a},vl={autoplay:!1,html5videoTpl:`<video class="f-html5video" playsinline controls controlsList="nodownload" poster="{{poster}}">
    <source src="{{src}}" type="{{format}}" />Sorry, your browser doesn't support embedded videos.</video>`,iframeAttr:{allow:`autoplay; fullscreen`,scrolling:`no`,referrerPolicy:`strict-origin-when-cross-origin`,credentialless:``},vimeo:{byline:1,color:`00adef`,controls:1,dnt:1,muted:0},youtube:{controls:1,enablejsapi:1,nocookie:1,rel:0,fs:1}},yl=()=>{let e,t=!1;function n(){let t=e?.getOptions().Video;return Ys(t)?Object.assign(Object.assign({},vl),t):vl}function r(){return(e?.getPage())?.slides[0]}let i=t=>{try{let n=JSON.parse(t.data);if(t.origin===`https://player.vimeo.com`){if(n.event===`ready`)for(let n of Array.from((e?.getContainer())?.getElementsByClassName(`f-iframe`)||[]))n instanceof HTMLIFrameElement&&n.contentWindow===t.source&&(n.dataset.ready=`true`)}else if(t.origin.match(/^https://(www.)?youtube(-nocookie)?.com$/)&&n.event===`onReady`){let e=document.getElementById(n.id);e&&(e.dataset.ready=`true`)}}catch{}};function a(e,t){let r=t.src;if(!q(r))return;let i=t.type;if(!i||i===`html5video`){let e=r.match(/.(mp4|mov|ogv|webm)((?|#).*)?$/i);e&&(i=`html5video`,t.html5videoFormat=t.html5videoFormat||`video/`+(e[1]===`ogv`?`ogg`:e[1]))}if(!i||i===`youtube`){let e=r.match(/(youtube.com|youtu.be|youtube-nocookie.com)/(?:watch?(?:.*&)?v=|v/|u/|shorts/|embed/?)?(videoseries?list=(?:.*)|[w-]{11}|?listType=(?:.*)&list=(?:.*))(?:.*)/i);if(e){let a=Object.assign(Object.assign({},n().youtube),t.youtube||{}),o=`www.youtube${a.nocookie?`-nocookie`:``}.com`,s=_l(r,a),c=encodeURIComponent(e[2]);t.videoId=c,t.src=`https://${o}/embed/${c}?${s}`,t.thumb=t.thumb||`https://i.ytimg.com/vi/${c}/mqdefault.jpg`,i=`youtube`}}if(!i||i===`vimeo`){let e=r.match(/^.+vimeo.com/(?:/)?(video/)?([d]+)((/|?h=)([a-z0-9]+))?(.*)?/);if(e){let a=_l(r,Object.assign(Object.assign({},n().vimeo),t.vimeo||{})),o=encodeURIComponent(e[2]),s=e[5]||``;t.videoId=o,t.src=`https://player.vimeo.com/video/${o}?${s?`h=${s}${a?`&`:``}`:``}${a}`,i=`vimeo`}}t.type=i}function o(t,r){r.type===`html5video`&&function(t){let r=t.el,i=t.src;if(!e||!r||!i)return;let a=t.html5videoTpl||n().html5videoTpl,o=t.html5videoFormat||n().html5videoFormat;if(!a)return;let s=t.poster||(t.thumb&&q(t.thumb)?t.thumb:``),c=Js(a.replace(/{{src}}/gi,i+``).replace(/{{format}}/gi,o||``).replace(/{{poster}}/gi,s+``));if(!c)return;let l=document.createElement(`div`);Y(l,`f-html`),l.append(c),t.contentEl=c,t.htmlEl=l,Y(r,`has-${t.type}`),r.prepend(l),u(t),e.emit(`contentReady`,t)}(r),r.type!==`youtube`&&r.type!==`vimeo`||function(t){let r=t.el,i=t.src;if(!e||!r||!i)return;let a=document.createElement(`iframe`);Y(a,`f-iframe`),a.setAttribute(`id`,`f-iframe_${t.videoId}`);for(let[e,t]of Object.entries(n().iframeAttr||{}))a.setAttribute(e,t);t.type===`youtube`&&(a.onload=()=>{var t;e?.getState()===1&&((t=a.contentWindow)==null||t.postMessage(JSON.stringify({event:`listening`,id:a.getAttribute(`id`)}),`*`))}),a.onerror=()=>{e?.showError(t,`{{IFRAME_ERROR}}`)};let o=document.createElement(`div`);Y(o,`f-html`),o.append(a),t.contentEl=a,t.htmlEl=o,Y(r,`has-html has-iframe has-${t.type}`),a.src=`${t.src}`,r.prepend(o),u(t),e.emit(`contentReady`,t)}(r)}function s(e,t){var n,r;t.type!==`html5video`&&t.type!==`youtube`&&t.type!==`vimeo`||((n=t.contentEl)==null||n.remove(),t.contentEl=void 0,(r=t.htmlEl)==null||r.remove(),t.htmlEl=void 0),t.poller&&clearTimeout(t.poller)}function c(){t=!1}function l(){if(t)return;t=!0;let e=r();(e&&e.autoplay!==void 0?e.autoplay:n().autoplay)&&(function(){var e;let t=r(),n=t?.el;if(n&&t?.type===`html5video`)try{let e=n.querySelector(`video`);if(e){let t=e.play();t!==void 0&&t.then(()=>{}).catch(t=>{e.muted=!0,e.play()})}}catch{}let i=t?.htmlEl;i instanceof HTMLIFrameElement&&((e=i.contentWindow)==null||e.postMessage(`{"event":"command","func":"stopVideo","args":""}`,`*`))}(),function(){let e=r(),t=e?.type;if(!e?.el||t!==`youtube`&&t!==`vimeo`)return;let n=()=>{if(e.contentEl&&e.contentEl instanceof HTMLIFrameElement&&e.contentEl.contentWindow){let t;if(e.contentEl.dataset.ready===`true`)return t=e.type===`youtube`?{event:`command`,func:`playVideo`}:{method:`play`,value:`true`},t&&e.contentEl.contentWindow.postMessage(JSON.stringify(t),`*`),void(e.poller=void 0);e.type===`youtube`&&(t={event:`listening`,id:e.contentEl.getAttribute(`id`)},e.contentEl.contentWindow.postMessage(JSON.stringify(t),`*`))}e.poller=setTimeout(n,250)};n()}())}function u(e){let t=e?.htmlEl;if(e&&t&&(e.type===`html5video`||e.type===`youtube`||e.type===`vimeo`)){if(t.style.aspectRatio=``,t.style.width=``,t.style.height=``,t.style.maxWidth=``,t.style.maxHeight=``,e.width){let n=`${e.width}`;n.match(/^d+$/)&&(n+=`px`),t.style.maxWidth=`${n}`}if(e.height){let n=`${e.height}`;n.match(/^d+$/)&&(n+=`px`),t.style.maxHeight=`${n}`}if(e.aspectRatio){let n=e.aspectRatio.split(`/`),r=parseFloat(n[0].trim()),i=n[1]?parseFloat(n[1].trim()):0,a=r&&i?r/i:r;t.offsetHeight;let o=t.getBoundingClientRect(),s=a<(o.width||1)/(o.height||1);t.style.aspectRatio=`${e.aspectRatio}`,t.style.width=s?`auto`:``,t.style.height=s?``:`auto`}}}function d(){u(r())}return{init:function(t){e=t,e.on(`addSlide`,a),e.on(`attachSlideEl`,o),e.on(`detachSlideEl`,s),e.on(`ready`,l),e.on(`change`,c),e.on(`settle`,l),e.on(`refresh`,d),window.addEventListener(`message`,i)},destroy:function(){e?.off(`addSlide`,a),e?.off(`attachSlideEl`,o),e?.off(`detachSlideEl`,s),e?.off(`ready`,l),e?.off(`change`,c),e?.off(`settle`,l),e?.off(`refresh`,d),window.removeEventListener(`message`,i),e=void 0}}},bl={autoStart:!1,btnTpl:`<button data-fullscreen-action="toggle" class="f-button" title="{{TOGGLE_FULLSCREEN}}"><svg><g><path d="M8 3H5a2 2 0 0 0-2 2v3M21 8V5a2 2 0 0 0-2-2h-3M3 16v3a2 2 0 0 0 2 2h3M16 21h3a2 2 0 0 0 2-2v-3"/></g><g><path d="M15 19v-2a2 2 0 0 1 2-2h2M15 5v2a2 2 0 0 0 2 2h2M5 15h2a2 2 0 0 1 2 2v2M5 9h2a2 2 0 0 0 2-2V5"/></g></svg></button>`},xl=`in-fullscreen-mode`,Sl=()=>{let e;function t(t){let n=e?.getOptions().Fullscreen,r=(Ys(n)?Object.assign(Object.assign({},bl),n):bl)[t];return r&&typeof r==`function`&&e?r(e):r}function n(){var n;(n=e?.getPlugins().Toolbar)==null||n.add(`fullscreen`,{tpl:t(`btnTpl`)})}function r(){if(t(`autoStart`)){let e=a();e&&s(e)}}function i(e,t){let n=t.target;n&&!t.defaultPrevented&&n.dataset.fullscreenAction===`toggle`&&l()}function a(){return t(`el`)||e?.getContainer()||void 0}function o(){let e=document;return e.fullscreenEnabled?!!e.fullscreenElement:!!e.webkitFullscreenEnabled&&!!e.webkitFullscreenElement}function s(e){let t=document,n;return e||=t.documentElement,t.fullscreenEnabled?n=e.requestFullscreen():t.webkitFullscreenEnabled&&(n=e.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT)),n&&n.then(()=>{e.classList.add(xl)}),n}function c(){let e=document,t;return e.fullscreenEnabled?t=e.fullscreenElement&&e.exitFullscreen():e.webkitFullscreenEnabled&&(t=e.webkitFullscreenElement&&e.webkitExitFullscreen()),t&&t.then(()=>{var e;(e=a())==null||e.classList.remove(xl)}),t}function l(){if(o())c();else{let e=a();e&&s(e)}}return{init:function(t){e=t,e.on(`initPlugins`,n),e.on(`ready`,r),e.on(`click`,i)},destroy:function(){e?.off(`initPlugins`,n),e?.off(`ready`,r),e?.off(`click`,i)},exit:c,inFullscreen:o,request:s,toggle:l}},Cl,wl,Tl=!1,El=!1,Dl=!1,Ol=!1,kl=()=>{let e=new URL(document.URL).hash,t=e.slice(1).split(`-`),n=t[t.length-1],r=n&&/^+?d+$/.test(n)&&parseInt(t.pop()||`1`,10)||1;return{urlHash:e,urlSlug:t.join(`-`),urlIndex:r}},Al=()=>{let e=Cl?.getInstance(),t=e?.getState();return!(!e||t!==0&&t!==1)},jl=()=>{if(!Cl||Al())return;let{urlSlug:e,urlIndex:t}=kl();if(!e)return;let n=document.querySelector(`[data-slug="${e}"]`);n&&Cl.fromTriggerEl(n),Al()||(n=document.querySelectorAll(`[data-fancybox="${e}"]`)[t-1],n&&Cl.fromTriggerEl(n,{startIndex:t-1})),Al()&&n&&!n.closest(`[inert]`)&&n.scrollIntoView({behavior:`instant`,block:`center`,inline:`center`})},Ml=e=>{let t=e.getOptions().Hash,n=e.getSlide();return n&&(n.slug||n.fancybox||(Ys(t)?t.slug:``))||``},Nl=e=>{let t=Ml(e),n=e.getSlide();if(!n||!t)return``;let r=parseInt(n.index+``,10)+1,i=n.slug?`#${n.slug}`:`#${t}-${r}`;return(e.getCarousel()?.getPages()?.length||0)<2&&(i=`#${t}`),i},Pl=()=>{if(!Cl||Dl)return;let e=Cl?.getInstance(),t=e?.getCarousel(),{urlSlug:n,urlIndex:r}=kl(),i=e?.getOptions().Hash;if(!1!==i){if(e&&e.getState()===1&&t){let a=t.getSlides();for(let e of a||[])if(e.slug===n||(e.fancybox===n||Ys(i)&&i.slug===n)&&e.index===r-1)return El=!1,void t.goTo(e.index);Ol=!0,e.close(),Ol=!1}jl()}},Fl=()=>{Cl&&(wl=setTimeout(()=>{Tl=!0,jl(),Tl=!1},300),window.addEventListener(`hashchange`,Pl,!1))},Il;function Ll(){history.scrollRestoration&&Il&&(history.scrollRestoration=Il,Il=void 0)}var Rl=()=>{let e,t=``;function n(){if(!e||!e.isTopMost()||!1===e.getOptions().Hash)return;if(Tl){let t=e.getOptions().sync;t&&t.goTo((e?.getCarousel())?.getPageIndex()||0,{transition:!1,tween:!1})}let n=e.getCarousel();if(!n||!e.getSlide())return;let i=Ml(e);if(!i)return;let{urlHash:a,urlSlug:o}=kl(),s=Nl(e);a!==s&&(t=a),history.scrollRestoration&&!Il&&(Il=history.scrollRestoration,history.scrollRestoration=`manual`,window.addEventListener(`beforeunload`,Ll)),n.on(`change`,r);let c=i!==o;try{window.history[c?`pushState`:`replaceState`]({},document.title,window.location.pathname+window.location.search+s),c&&(El=!0)}catch{}}function r(){if(!e||!e.isTopMost()||!1===e.getOptions().Hash||!e.getSlide()||!Ml(e))return;let t=Nl(e);Dl=!0;try{window.history.replaceState({},document.title,window.location.pathname+window.location.search+t)}catch{}Dl=!1}function i(){if(!(!e||!e.isTopMost()||!1===e.getOptions().Hash||Ol)&&Ml(e)){Dl=!0;try{El&&!function(){if(window.parent===window)return!1;try{var e=window.frameElement}catch{e=null}return e===null?location.protocol===`data:`:e.hasAttribute(`sandbox`)}()&&document.activeElement?.nodeName!==`IFRAME`?window.history.back():window.history.replaceState({},document.title,window.location.pathname+window.location.search+t)}catch{}Dl=!1}}return{init:function(t){clearTimeout(wl),e=t,e.on(`ready`,n),e.on(`close`,i)},destroy:function(){e?.off(`ready`,n),e?.off(`close`,i);let t=e?.getCarousel();t&&t.off(`change`,r),e=void 0,Cl!=null&&Cl.getInstance()||(Ll(),window.removeEventListener(`beforeunload`,Ll))}}};Rl.getInfoFromURL=kl,Rl.startFromUrl=jl,Rl.setup=function(e){Cl||(Cl=e,Uc()&&(/complete|interactive|loaded/.test(document.readyState)?Fl():document.addEventListener(`DOMContentLoaded`,Fl)))};var zl=Object.assign(Object.assign({},Fc),{CLOSE:`Close`,NEXT:`Next`,PREV:`Previous`,MODAL:`You can close this modal content with the ESC key`,ELEMENT_NOT_FOUND:`HTML Element Not Found`,IFRAME_ERROR:`Error Loading Page`,NO_CAPTION:`No Caption`,TOGGLE_SIDEBAR:`Toggle sidebar`}),Bl=`<button class="f-button" title="{{CLOSE}}" data-fancybox-close><svg tabindex="-1" width="24" height="24" viewBox="0 0 24 24"><path d="M19.286 4.714 4.714 19.286M4.714 4.714l14.572 14.572" /></svg></button>`;ll().add(`close`,{tpl:Bl});var Vl=e=>{e.cancelable&&e.preventDefault()},Hl=(e=null,t=``,n)=>{if(!e||!e.parentElement||!t)return void(n&&n());Ul(e);let r=i=>{i.target===e&&e.dataset.animationName&&(e.removeEventListener(`animationend`,r),delete e.dataset.animationName,n&&n(),e.classList.remove(t))};e.dataset.animationName=t,e.addEventListener(`animationend`,r),Y(e,t)},Ul=e=>{e&&e.dispatchEvent(new CustomEvent(`animationend`,{bubbles:!1,cancelable:!0,currentTarget:e}))},Q;(function(e){e[e.Init=0]=`Init`,e[e.Ready=1]=`Ready`,e[e.Closing=2]=`Closing`,e[e.Destroyed=3]=`Destroyed`})(Q||={});var Wl={ajax:null,backdropClick:`close`,Carousel:{},closeButton:`auto`,closeButtonTpl:Bl,closeExisting:!1,delegateEl:void 0,dragToClose:!0,fadeEffect:!0,groupAll:!1,groupAttr:`data-fancybox`,hideClass:`f-fadeOut`,hideScrollbar:!0,id:void 0,idle:!1,keyboard:{Escape:`close`,Delete:`close`,Backspace:`close`,PageUp:`next`,PageDown:`prev`,ArrowUp:`prev`,ArrowDown:`next`,ArrowRight:`next`,ArrowLeft:`prev`},l10n:zl,mainClass:``,mainStyle:{},mainTpl:`<dialog class="fancybox__dialog">
    <div class="fancybox__container" tabindex="0" aria-label="{{MODAL}}">
      <div class="fancybox__backdrop"></div>
      <div class="fancybox__carousel"></div>
    </div>
  </dialog>`,modal:!0,on:{},parentEl:void 0,placeFocusBack:!0,showClass:`f-zoomInUp`,startIndex:0,sync:void 0,theme:`dark`,triggerEl:void 0,triggerEvent:void 0,zoomEffect:!0},Gl=new Map,Kl=0,ql=`with-fancybox`,Jl=()=>{let e,t,n,r,i,a,o,s=Q.Init,c=Object.assign({},Wl),l=-1,u={},d=[],f=!1,p=!0,m=0;function h(e,...t){let n=c[e];return n&&typeof n==`function`?n(U,...t):n}function g(e,t=[]){let n=h(`l10n`)||{};e=String(e).replace(/{{(w+)}}/g,(e,t)=>n[t]||e);for(let n=0;n<t.length;n++)e=e.split(t[n][0]).join(t[n][1]);return e=e.replace(/{{(.*?)}}/g,(e,t)=>t)}let _=new Map;function v(e,...t){let n=[..._.get(e)||[]];for(let[t,r]of Object.entries(c.on||{}))(t===e||t.split(` `).indexOf(e)>-1)&&n.push(r);for(let e of n)e&&typeof e==`function`&&e(U,...t);e!==`*`&&v(`*`,e,...t)}function y(){X(t,`is-revealing`);try{document.activeElement===e&&(t?.querySelector(`[autofocus]`)||t).focus()}catch{}}function b(e,t){var n;P(t),k(),(n=t.el)==null||n.addEventListener(`click`,S),t.type!==`inline`&&t.type!==`clone`||function(e){if(!r||!e||!e.el)return;let t=null;if(q(e.src)){let n=e.src.split(`#`,2).pop();t=n?document.getElementById(n):null}if(t){if(Y(t,`f-html`),e.type===`clone`||t.closest(`.fancybox__carousel`)){t=t.cloneNode(!0);let n=t.dataset.animationName;n&&(t.classList.remove(n),delete t.dataset.animationName);let r=t.getAttribute(`id`);r=r?`${r}--clone`:`clone-${l}-${e.index}`,t.setAttribute(`id`,r)}else if(t.parentNode){let n=document.createElement(`div`);n.inert=!0,t.parentNode.insertBefore(n,t),e.placeholderEl=n}e.htmlEl=t,Y(e.el,`has-html`),e.el.prepend(t),t.classList.remove(`hidden`),t.style.display===`none`&&(t.style.display=``),getComputedStyle(t).getPropertyValue(`display`)===`none`&&(t.style.display=t.dataset.display||`flex`),r?.emit(`contentReady`,e)}else r?.showError(e,`{{ELEMENT_NOT_FOUND}}`)}(t),t.type===`ajax`&&function(e){let t=e.el;if(!t||e.htmlEl||e.xhr)return;r?.showLoading(e),e.state=0;let n=new XMLHttpRequest;n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE&&s===Q.Ready)if(r?.hideLoading(e),e.state=1,n.status===200){let i=n.responseText+``,a=null,o=null;if(e.filter){let t=document.createElement(`div`);t.innerHTML=i,o=t.querySelector(e.filter+``)}o&&o instanceof HTMLElement?a=o:(a=document.createElement(`div`),a.innerHTML=i),a.classList.add(`f-html`),e.htmlEl=a,t.classList.add(`has-html`),t.classList.add(`has-ajax`),t.prepend(a),r?.emit(`contentReady`,e)}else r?.showError(e)};let i=h(`ajax`)||null;n.open(i?`POST`:`GET`,e.src+``),n.setRequestHeader(`Content-Type`,`application/x-www-form-urlencoded`),n.setRequestHeader(`X-Requested-With`,`XMLHttpRequest`),n.send(i),e.xhr=n}(t)}function x(e,t){var n;F(t),(n=t.el)==null||n.removeEventListener(`click`,S),t.type!==`inline`&&t.type!==`clone`||function(e){let t=e.htmlEl,n=e.placeholderEl;t&&(getComputedStyle(t).getPropertyValue(`display`)!==`none`&&(t.style.display=`none`),t.offsetHeight),n&&(t&&n.parentNode&&n.parentNode.insertBefore(t,n),n.remove()),e.htmlEl=void 0,e.placeholderEl=void 0}(t),t.xhr&&=(t.xhr.abort(),void 0)}function S(e){if(!L())return;if(s!==Q.Ready)return Vl(e),void e.stopPropagation();if(e.defaultPrevented||!vc.isClickAllowed())return;let t=e.composedPath()[0];t.closest(`.fancybox__carousel`)&&t.classList.contains(`fancybox__slide`)&&A(e)}function C(){p=!1,t&&r&&t.classList.remove(`is-revealing`),k();let e=h(`sync`);if(r&&e){let t=e.getPageIndex(r.getPageIndex())||0;e.goTo(t,{transition:!1,tween:!1})}}function w(){var e;(function(){let e=r?.getViewport();if(!h(`dragToClose`)||!r||!e||(i=vc(e).init(),!i))return;let n=!1,o=0,c=0,l={},u=1;function d(){a?.spring({clamp:!0,mass:1,tension:c===0?140:960,friction:17,restDelta:.1,restSpeed:.1,maxSpeed:1/0}).from({y:o}).to({y:c}).start();let e=(r?.getViewport())?.getBoundingClientRect().height||0,t=R()?.panzoomRef;if(e&&t)if(c===0)t.execute(Z.Reset);else{let n=Pc(Math.abs(o),0,.33*e,u,.77*u,!1);t.execute(Z.ZoomTo,{scale:n})}}let f=e=>{let t=e.srcEvent,n=t.target;return r&&!(oc(t)&&t.touches?.length>1)&&n&&!qs(n)};a=ac().on(`step`,n=>{if(t&&e&&s===Q.Ready){let r=e.getBoundingClientRect().height;o=Math.min(r,Math.max(-1*r,n.y));let i=Pc(Math.abs(o),0,.65*r,1,.2,!0);t.style.setProperty(`--f-drag-opacity`,i+``),t.style.setProperty(`--f-drag-offset`,o+`px`)}}),i.on(`start`,function(){n||(a?.pause(),c=o)}).on(`panstart`,e=>{var t;if(!n&&f(e)&&e.axis===`y`){Vl(e.srcEvent),n=!0,ie(),(t=r?.getViewport())==null||t.classList.add(`is-dragging`);let i=R()?.panzoomRef;if(i){u=i.getTransform().scale||1;let e=i.getOptions();l=Object.assign({},e),e.bounds=!1,e.gestures=!1}}else n=!1}).on(`pan`,function(e){n&&f(e)&&(Vl(e.srcEvent),e.srcEvent.stopPropagation(),e.axis===`y`&&(c+=e.deltaY,d()))}).on(`end`,e=>{var t,i;if((t=r?.getViewport())==null||t.classList.remove(`is-dragging`),n){let t=R()?.panzoomRef;if(t){(i=t.getTween())==null||i.end();let e=t.getOptions();e.bounds=l.bounds||!1,e.gestures=l.gestures||!1}f(e)&&e.axis===`y`&&(Math.abs(e.velocityY)>5||Math.abs(o)>50)&&ae(e.srcEvent,`f-throwOut`+(e.velocityY>0?`Down`:`Up`))}n=!1,s===Q.Ready&&o!==0&&(c=0,d())})})(),document.body.addEventListener(`click`,N),document.body.addEventListener(`keydown`,M,{passive:!1,capture:!0}),k(),ee();let n=h(`sync`);r&&n&&((e=n.getTween())==null||e.start()),I(R())}function T(){r?.canGoNext()?ee():re()}function E(e,t){P(t)}function D(e,t){P(t),I(t)}function O(){let e=r?.getPlugins().Thumbs;bc(t,`has-thumbs`,e?.isEnabled()||!1),bc(t,`has-vertical-thumbs`,!!e&&(e.getType()===`scrollable`||!0===e.getCarousel()?.isVertical()))}function k(){if(!t)return;let e=r?.getPages().length||0,n=r?.getPageIndex()||0,i=t.querySelectorAll(`[data-fancybox-index],[data-fancybox-page],[data-fancybox-pages]`);for(let t of i)t.hasAttribute(`data-fancybox-index`)?t.textContent=String(n):t.hasAttribute(`data-fancybox-page`)?t.textContent=String(n+1):t.textContent=String(e)}function A(e){if(e.composedPath()[0].closest(`[data-fancybox-close]`))return void ae(e);v(`backdropClick`,e),!e.defaultPrevented&&h(`backdropClick`)&&ae(e)}function j(){ne()}function M(e){if(!L()||s!==Q.Ready)return;let t=e.key,n=h(`keyboard`);if(!n||e.ctrlKey||e.altKey||e.shiftKey)return;let i=e.composedPath()[0];if(!Gs(i)||t!==`Escape`&&(e=>{let t=[`input`,`textarea`,`select`,`option`,`video`,`iframe`,`[contenteditable]`,`[data-selectable]`,`[data-draggable]`].join(`,`);return e.matches(t)||e.closest(t)})(i)||(v(`keydown`,e),e.defaultPrevented))return;let a=n[t];if(a)switch(a){case`close`:ae(e);break;case`next`:Vl(e),r?.next();break;case`prev`:Vl(e),r?.prev()}}function N(e){if(!L()||s!==Q.Ready||(ne(),e.defaultPrevented))return;let t=e.composedPath()[0],n=!!t.closest(`[data-fancybox-close]`),r=t.classList.contains(`fancybox__backdrop`);(n||r)&&A(e)}function P(e){let{el:t,htmlEl:n,panzoomRef:i,closeButtonEl:a}=e,o=i?i.getWrapper():n;if(!t||!t.parentElement||!o)return;let s=h(`closeButton`);if(s===`auto`&&(s=!0!==(r?.getPlugins().Toolbar)?.isEnabled()),s){if(!a){let n=Js(g(h(`closeButtonTpl`)));n&&(Y(n,`is-close-button`),e.closeButtonEl=o.insertAdjacentElement(`afterbegin`,n),Y(t,`has-close-btn`))}}else F(e)}function F(e){e.closeButtonEl&&=(e.closeButtonEl.remove(),void 0),X(e.el,`has-close-btn`)}function I(e){if(!(p&&r&&r.getState()===1&&e&&e.index===r.getOptions().initialPage&&e.el&&e.el.parentElement)||e.state!==void 0&&e.state!==1)return;p=!1;let t=e.panzoomRef,n=t?.getTween(),i=h(`zoomEffect`)&&n?B(e):void 0;if(t&&n&&i){let{x:e,y:r,scale:a}=t.getStartPosition();n.spring({tension:215,friction:25,restDelta:.001,restSpeed:.001,maxSpeed:1/0}).from(i).to({x:e,y:r,scale:a}).start();return}let a=t?.getContent()||e.htmlEl;a&&Hl(a,h(`showClass`,e))}function L(){return $.getInstance()?.getId()===l}function R(){return(r?.getPage())?.slides[0]}function z(){let e=R();return e?e.triggerEl||h(`triggerEl`):void 0}function B(e){let t=e.thumbEl;if(!t||!(e=>{let t=e.getBoundingClientRect(),n=e.closest(`[style]`),r=n?.parentElement;if(n&&n.style.transform&&r){let e=r.getBoundingClientRect();if(t.left<e.left||t.left>e.left+e.width-t.width||t.top<e.top||t.top>e.top+e.height-t.height)return!1}let i=Math.max(document.documentElement.clientHeight,window.innerHeight),a=Math.max(document.documentElement.clientWidth,window.innerWidth);return!(t.bottom<0||t.top-i>=0||t.right<0||t.left-a>=0)})(t))return;let n=(e.panzoomRef?.getWrapper())?.getBoundingClientRect(),r=n?.width,i=n?.height;if(!r||!i)return;let a=t.getBoundingClientRect(),o=a.width,s=a.height,c=a.left,l=a.top;if(!(!a||!o||!s)){if(t instanceof HTMLImageElement){let e=window.getComputedStyle(t).getPropertyValue(`object-fit`);if(e===`contain`||e===`scale-down`){let{width:n,height:r}=((e,t,n,r,i=`contain`)=>{if(i===`contain`||e>n||t>r){let i=n/e,a=r/t,o=Math.min(i,a);e*=o,t*=o}return{width:e,height:t}})(t.naturalWidth,t.naturalHeight,o,s,e);c+=.5*(o-n),l+=.5*(s-r),o=n,s=r}}if(!(Math.abs(r/i-o/s)>.1))return{x:c+.5*o-(n.left+.5*r),y:l+.5*s-(n.top+.5*i),scale:o/r}}}function V(){o&&clearTimeout(o),o=void 0,document.removeEventListener(`mousemove`,j)}function ee(){if(f||o)return;let e=h(`idle`);e&&(o=setTimeout(te,e))}function te(){t&&(V(),Y(t,`is-idle`),document.addEventListener(`mousemove`,j),f=!0)}function ne(){f&&(re(),ee())}function re(){V(),t?.classList.remove(`is-idle`),f=!1}function ie(){let e=z();var t;!e||(t=e.getBoundingClientRect()).bottom>0&&t.right>0&&t.left<(window.innerWidth||document.documentElement.clientWidth)&&t.top<(window.innerHeight||document.documentElement.clientHeight)||e.closest(`[inert]`)||e.scrollIntoView({behavior:`instant`,block:`center`,inline:`center`})}function ae(e,t){var n,o,c,l,u;if(s===Q.Closing||s===Q.Destroyed)return;let d=new Event(`shouldClose`,{bubbles:!0,cancelable:!0});if(v(`shouldClose`,d,e),d.defaultPrevented)return;if(V(),e){if(e.defaultPrevented)return;Vl(e),e.stopPropagation(),e.stopImmediatePropagation()}if(s=Q.Closing,a?.pause(),i?.destroy(),r){(n=r.getGestures())==null||n.destroy(),(o=r.getTween())==null||o.pause();for(let e of r.getSlides()){let t=e.panzoomRef;t&&(Nc(t.getOptions(),{clickAction:!1,dblClickAction:!1,wheelAction:!1,bounds:!1,minScale:0,maxScale:1/0}),(c=t.getGestures())==null||c.destroy(),(l=t.getTween())==null||l.pause())}}let f=r?.getPlugins();(u=f?.Autoplay)==null||u.stop();let p=f?.Fullscreen;p&&p.inFullscreen()?Promise.resolve(p.exit()).then(()=>{setTimeout(()=>{oe(e,t)},150)}):oe(e,t)}function oe(n,i){if(s!==Q.Closing)return;v(`close`,n),p=!1,document.body.removeEventListener(`click`,N),document.body.removeEventListener(`keydown`,M,{passive:!1,capture:!0}),h(`placeFocusBack`)&&ie();let a=document.activeElement;a&&e!=null&&e.contains(a)&&a.blur(),h(`fadeEffect`)&&(t?.classList.remove(`is-ready`),t?.classList.add(`is-hiding`)),t?.classList.add(`is-closing`);let o=R(),c=o?.el,l=o?.panzoomRef,u=(o?.panzoomRef)?.getTween(),d=i||h(`hideClass`),f=!1,m=!1;if(r&&o&&c&&l&&u){let e;if(h(`zoomEffect`)&&o.state===1&&(e=B(o)),e){f=!0;let t=()=>{e=B(o),e?u.to(Object.assign(Object.assign({},Tc),e)):H()};l.on(`refresh`,()=>{t()}),u.easing(ac.Easings.EaseOut).duration(350).from(Object.assign({},l.getTransform())).to(Object.assign(Object.assign({},Tc),e)).start(),c!=null&&c.getAnimations()&&(c.style.animationPlayState=`paused`,requestAnimationFrame(()=>{t()}))}}let g=o?.htmlEl||(o?.panzoomRef)?.getWrapper();g&&Ul(g),!f&&d&&g&&(m=!0,Hl(g,d,()=>{H()})),f||m?setTimeout(()=>{H()},350):H()}function H(){var n,i,a;if(s===Q.Destroyed)return;s=Q.Destroyed;let o=z();v(`destroy`),(n=h(`sync`)?.getPlugins().Autoplay)==null||n.resume(),(i=h(`sync`)?.getPlugins().Autoscroll)==null||i.resume(),e instanceof HTMLDialogElement&&e.close(),(a=r?.getContainer())==null||a.classList.remove(`is-idle`),r?.destroy();for(let e of Object.values(u))e?.destroy();if(u={},e?.remove(),e=void 0,t=void 0,r=void 0,Gl.delete(l),!Gl.size&&(Hc(!1),document.documentElement.classList.remove(ql),h(`placeFocusBack`)&&o&&!o.closest(`[inert]`)))try{o?.focus({preventScroll:!0})}catch{}}let U={close:ae,destroy:H,getCarousel:function(){return r},getContainer:function(){return t},getId:function(){return l},getOptions:function(){return c},getPlugins:function(){return u},getSlide:function(){return R()},getState:function(){return s},init:function(i=[],a={}){s!==Q.Init&&(U.destroy(),s=Q.Init),c=Nc({},Wl,a),l=h(`id`)||`fancybox-`+ ++Kl;let o=Gl.get(l);if(o&&o.destroy(),Gl.set(l,U),v(`init`),function(){for(let[e,t]of Object.entries(Object.assign(Object.assign({},$.Plugins),c.plugins||{})))if(e&&!u[e]&&t instanceof Function){let n=t();n.init(U),u[e]=n}v(`initPlugins`)}(),function(e=[]){v(`initSlides`,e),d=[...e]}(i),function(){let n=h(`parentEl`)||document.body;if(!(n&&n instanceof HTMLElement)||(e=Js(g(h(`mainTpl`)||``))||void 0,!e)||(t=e.querySelector(`.fancybox__container`),!(t&&t instanceof HTMLElement)))return;let i=h(`mainClass`);i&&Y(t,i);let a=h(`mainStyle`);if(a&&Ys(a))for(let[e,n]of Object.entries(a))t.style.setProperty(e,n);let o=h(`theme`),s=o===`auto`?window.matchMedia(`(prefers-color-scheme:light)`).matches:o===`light`;t.setAttribute(`theme`,s?`light`:`dark`),e.setAttribute(`id`,`${l}`),e.addEventListener(`keydown`,e=>{e.key===`Escape`&&Vl(e)}),e.addEventListener(`wheel`,e=>{let t=e.target,n=h(`wheel`,e);t.closest(`.f-thumbs`)&&(n=`slide`);let i=n===`slide`,a=[-e.deltaX||0,-e.deltaY||0,-e.detail||0].reduce(function(e,t){return Math.abs(t)>Math.abs(e)?t:e}),o=Math.max(-1,Math.min(1,a)),s=Date.now();m&&s-m<300?i&&Vl(e):(m=s,v(`wheel`,e,o),e.defaultPrevented||(n===`close`?ae(e):n===`slide`&&r&&!qs(t)&&(Vl(e),r[o>0?`prev`:`next`]())))},{capture:!0,passive:!1}),e.addEventListener(`cancel`,e=>{ae(e)}),n.append(e),Gl.size===1&&(h(`hideScrollbar`)&&Hc(!0),document.documentElement.classList.add(ql)),v(`initLayout`),e instanceof HTMLDialogElement&&(h(`modal`)?e.showModal():e.show())}(),function(){if(n=e?.querySelector(`.fancybox__carousel`)||void 0,!n)return;n.fancybox=U;let i=Nc({},{Autoplay:{autoStart:!1,pauseOnHover:!1,progressbarParentEl:e=>{let t=e.getContainer();return t?.querySelector(`.f-carousel__toolbar [data-autoplay-action]`)||t}},Fullscreen:{el:t},Toolbar:{absolute:!0,items:{counter:{tpl:`<div class="f-counter"><span data-fancybox-page></span>/<span data-fancybox-pages></span></div>`}},display:{left:[`counter`],right:[`toggleFull`,`autoplay`,`fullscreen`,`thumbs`,`close`]}},Video:{autoplay:!0},Thumbs:{minCount:2,Carousel:{classes:{container:`fancybox__thumbs`}}},classes:{container:`fancybox__carousel`,viewport:`fancybox__viewport`,slide:`fancybox__slide`},spinnerTpl:`<div class="f-spinner" data-fancybox-close></div>`,dragFree:!1,slidesPerPage:1,plugins:{Sync:Jc,Arrows:tl,Lazyload:$c,Zoomable:Kc,Html:gl,Video:yl,Autoplay:dl,Fullscreen:Sl,Thumbs:ml,Toolbar:ll}},h(`Carousel`)||{},{slides:d,enabled:!0,initialPage:h(`startIndex`)||0,l10n:h(`l10n`)});r=Vc(n,i),v(`initCarousel`,r),r.on(`*`,(e,t,...n)=>{v(`Carousel.${t}`,e,...n)}),r.on(`attachSlideEl`,b),r.on(`detachSlideEl`,x),r.on(`contentLoading`,E),r.on(`contentReady`,D),r.on(`ready`,w),r.on(`change`,C),r.on(`settle`,T),r.on(`thumbs:ready`,O),r.on(`thumbs:destroy`,O),r.init()}(),e&&t){if(h(`closeExisting`))for(let[e,t]of Gl.entries())e!==l&&t.close();h(`fadeEffect`)?(setTimeout(()=>{y()},500),Y(t,`is-revealing`)):y(),t.classList.add(`is-ready`),s=Q.Ready,v(`ready`)}},isCurrentSlide:function(e){let t=R();return!(!e||!t)&&t.index===e.index},isTopMost:function(){return L()},localize:g,off:function(e,t){return _.has(e)&&_.set(e,_.get(e).filter(e=>e!==t)),U},on:function(e,t){return _.set(e,[..._.get(e)||[],t]),U},toggleIdle(e){(f||!0===e)&&te(),f&&!1!==e||re()}};return U};function Yl(){for(let e of Object.values($.Plugins)){let t=e.setup;typeof t==`function`&&t($)}}function Xl(e,t={}){var n,r,i;if(!(e&&e instanceof Element))return;let a,o,s,c,l={};for(let[t,n]of $.openers)if(t.contains(e))for(let[r,i]of n){let n;if(r){for(let i of t.querySelectorAll(r))if(i.contains(e)){n=i;break}if(!n)continue}for(let[r,u]of i){let i=null;try{i=e.closest(r)}catch{}i&&(o=t,s=n,a=i,c=r,Nc(l,u||{}))}}if(!o||!c||!a)return;let u=Nc({},Wl,t,l,{triggerEl:a}),d=[].slice.call((s||o).querySelectorAll(c)),f=a.closest(`.f-carousel`),p=f?.carousel;if(p&&(!s||!f.contains(s))){let e=[];for(let t of p?.getSlides()){let n=t.el;n&&(n.matches(c)?e.push(n):e.push(...[].slice.call(n.querySelectorAll(c))))}e.length&&(d=[...e],(n=p.getPlugins().Autoplay)==null||n.pause(),(r=p.getPlugins().Autoscroll)==null||r.pause(),u.sync=p)}if(!1===u.groupAll){let e=u.groupAttr,t=e&&a?a.getAttribute(`${e}`):``;d=e&&t&&t!==`true`?d.filter(n=>n.getAttribute(`${e}`)===t):[a]}if(!d.length)return;(i=u.triggerEvent)==null||i.preventDefault();let m=$.getInstance(),h=m?.getState();if(m&&(h===Q.Init||h===Q.Ready)){let e=m.getOptions().triggerEl;if(e&&d.indexOf(e)>-1)return}return Object.assign({},u.Carousel||{}).rtl&&(d=d.reverse()),a&&t.startIndex===void 0&&(u.startIndex=d.indexOf(a)),$.fromNodes(d,u)}var $={Plugins:{Hash:Rl},version:`6.1.14`,openers:new Map,bind:function(e,t,n,r){if(!Uc())return;let i=document.body,a=null,o=`[data-fancybox]`,s={};e instanceof Element&&(i=e),q(e)&&q(t)?(a=e,o=t):q(t)&&q(n)?(a=t,o=n):q(t)?o=t:q(e)&&(o=e),typeof t==`object`&&(s=t||{}),typeof n==`object`&&(s=n||{}),typeof r==`object`&&(s=r||{}),function(e,t,n,r={}){if(!(e&&e instanceof Element&&n))return;let i=$.openers.get(e)||new Map,a=i.get(t)||new Map;a.set(n,r),i.set(t,a),$.openers.set(e,i),i.size===1&&e.addEventListener(`click`,$.fromEvent),Yl()}(i,a,o,s)},close:function(e=!0,...t){if(e)for(let e of Gl.values())e.close(...t);else{let e=$.getInstance();e&&e.close(...t)}},destroy:function(){let e;for(;e=$.getInstance();)e.destroy();for(let e of $.openers.keys())e.removeEventListener(`click`,$.fromEvent);$.openers.clear()},fromEvent:function(e){if(e.defaultPrevented||e.button&&e.button!==0||e.ctrlKey||e.metaKey||e.shiftKey)return;let t=e.composedPath()[0],n={triggerEvent:e};if(t.closest(`.fancybox__container.is-hiding`))return Vl(e),void e.stopPropagation();let r=t.closest(`[data-fancybox-delegate]`)||void 0;if(r){let e=r.dataset.fancyboxDelegate||``,i=document.querySelectorAll(`[data-fancybox="${e}"]`),a=parseInt(r.dataset.fancyboxIndex||``,10)||0;t=i[a]||i[0],Nc(n,{delegateEl:r,startIndex:a})}return Xl(t,n)},fromNodes:function(e,t){t=Nc({},Wl,t||{});let n=[],r=e=>e instanceof HTMLImageElement?e:e instanceof HTMLElement?e.querySelector(`img:not([aria-hidden])`):void 0;for(let i of e){let a=i.dataset||{},o=t.delegateEl&&e.indexOf(i)===t.startIndex?t.delegateEl:void 0,s=r(o)||r(i)||void 0,c=a.src||i.getAttribute(`href`)||i.getAttribute(`currentSrc`)||i.getAttribute(`src`)||void 0,l=a.thumb||a.thumbSrc||s?.getAttribute(`currentSrc`)||s?.getAttribute(`src`)||s?.dataset.lazySrc||void 0,u={src:c,alt:a.alt||s?.getAttribute(`alt`)||void 0,thumbSrc:l,thumbEl:s,triggerEl:i,delegateEl:o};for(let e in a){let t=a[e]+``;u[e]=t===`true`?e!==`fancybox`||``:t!==`false`&&t}n.push(u)}return $.show(n,t)},fromSelector:function(e,t,n,r){if(!Uc())return;let i=document.body,a=null,o=`[data-fancybox]`,s={};e instanceof Element&&(i=e),q(e)&&q(t)?(a=e,o=t):q(t)&&q(n)?(a=t,o=n):q(t)?o=t:q(e)&&(o=e),typeof t==`object`&&(s=t||{}),typeof n==`object`&&(s=n||{}),typeof r==`object`&&(s=r||{});for(let[e,t]of $.openers)for(let[n,r]of t)for(let[t,c]of r)if(e===i&&n===a){let e=i.querySelector((n?`${n} `:``)+o);if(e&&e.matches(t))return $.fromTriggerEl(e,s)}},fromTriggerEl:Xl,getCarousel:function(){return $.getInstance()?.getCarousel()||void 0},getDefaults:function(){return Wl},getInstance:function(e){if(e){let t=Gl.get(e);return t&&t.getState()!==Q.Destroyed?t:void 0}return Array.from(Gl.values()).reverse().find(e=>{if(e.getState()!==Q.Destroyed)return e})||void 0},getSlide:function(){return $.getInstance()?.getSlide()||void 0},show:function(e=[],t={}){return Yl(),Jl().init(e,t)},unbind:function(e,t,n){if(!Uc())return;let r=document.body,i=null,a=`[data-fancybox]`;e instanceof Element&&(r=e),q(e)&&q(t)?(i=e,a=t):q(t)&&q(n)?(i=t,a=n):q(t)?a=t:q(e)&&(a=e),function(e,t,n){if(!(e&&e instanceof Element&&n))return;let r=$.openers.get(e)||new Map,i=r.get(t)||new Map;i&&n&&i.delete(n),i.size&&n||r.delete(t),r.size||($.openers.delete(e),e.removeEventListener(`click`,$.fromEvent))}(r,i,a)}},Zl={dotTpl:`<button class="f-carousel__dot" data-carousel-go-to="%i" aria-label="{{GOTO}}"></button>`,dynamicFrom:11,dynamicPadd:4,maxCount:1/0,minCount:2},Ql=`f-carousel__dots`,$l=`has-dots`,eu=()=>{let e,t,n=!1,r=4,i=0,a=r;function o(){if(!e)return;let o=e.getOptions().Dots,s=Ys(o)?Object.assign(Object.assign({},Zl),o):Zl;r=s.dynamicPadd,i=0,a=r;let u=e.getContainer(),d=e.getViewport(),f=e.getPages().length;if(!1===o||!u||!d||f<s.minCount||f>s.maxCount)return void l();t||=Array.from(u.querySelectorAll(`.f-carousel__dots`)).filter(e=>!d.contains(e)).pop(),t||(t=document.createElement(`div`),Y(t,Ql),d.insertAdjacentElement(`afterend`,t));let p=n,{dynamicFrom:m}=s;n=!!(m&&f>=m&&f>=r+4),p!==n&&l(),function(n){if(!e||!t)return;let r=e.getPages().length;if(r!==t.childElementCount){let i=[],a=n.dotTpl||`%d`;for(let t=0;t<r;t++){let n=Js(e.localize(a,[[`%d`,t+1]]).replace(/%i/g,t+``));n&&i.push(n)}t.replaceChildren(...i)}}(s),c(),t.classList.toggle(`is-dynamic`,n),t.style.display=``,Y(u,$l)}function s(){c()}function c(){if(!e||!t||!n)return;let o=e.getPageIndex(),s=e.getPages().length;o<i&&(i=o,a=Math.min(i+r,s)),o>a&&(a=o,i=Math.max(a-r,0));let c=e=>e===o?`active`:e>=i&&e<=a?`padd`:e===i-1||e===a+1?`small`:e===i-2||e===a+2?`micro`:`hidden`,l=[...t.childNodes];for(let e of l){let t=parseInt(e.dataset.carouselGoTo||`0`,10);X(e,`active padd small micro hidden`),Y(e,c(t))}}function l(){t&&(t.replaceChildren(),t.style.display=`none`),X(e?.getContainer(),$l)}return{init:function(t){e=t,e.on(`refresh`,o),e.on(`change`,s)},destroy:function(){l(),e?.off(`refresh`,o),e?.off(`change`,s),e=void 0}}},tu={items:[],allowNew:!1,showAllSuggestions:!1,badgeStyle:`primary`,allowClear:!1,clearEnd:!1,selected:[],regex:``,separator:[],max:0,clearLabel:`Clear`,searchLabel:`Type a value`,showDropIcon:!0,keepOpen:!1,allowSame:!1,baseClass:``,placeholder:``,addOnBlur:!1,showDisabled:!1,hideNativeValidation:!1,suggestionsThreshold:-1,maximumItems:0,autoselectFirst:!0,updateOnSelect:!1,highlightTyped:!1,highlightClass:``,fullWidth:!0,fixed:!1,fuzzy:!1,startsWith:!1,singleBadge:!1,activeClasses:[`bg-primary`,`text-white`],labelField:`label`,valueField:`value`,searchFields:[`label`],queryParam:`query`,server:``,serverMethod:`GET`,serverParams:{},serverDataKey:`data`,fetchOptions:{},liveServer:!1,noCache:!0,allowHtml:!1,debounceTime:300,notFoundMessage:``,displayValueInBadge:!1,inputFilter:e=>e,sanitizer:e=>bu(e),onRenderItem:(e,t,n)=>n.config(`allowHtml`)?t:n.config(`sanitizer`)(t),onSelectItem:(e,t)=>{},onClearItem:(e,t)=>{},onCreateItem:(e,t)=>{},onBlur:(e,t)=>{},onDataLoaded:(e,t)=>{},onFocus:(e,t)=>{},onCanAdd:(e,t,n)=>{},confirmClear:(e,t)=>Promise.resolve(),confirmAdd:(e,t)=>Promise.resolve(),onServerResponse:(e,t)=>e.json(),onServerError:(e,t,n)=>{e.name===`AbortError`||t.aborted||console.error(e)}},nu=`tags-`,ru=`is-loading`,iu=`is-active`,au=`is-invalid`,ou=`is-max-reached`,su=`show`,cu=`data-value`,lu=`next`,uu=`prev`,du=`form-control-focus`,fu=`form-placeholder-shown`,pu=`form-control-disabled`,mu=new WeakMap,hu=0,gu=window.bootstrap&&window.bootstrap.Tooltip;function _u(e,t=300){let n;return(...r)=>{clearTimeout(n),n=setTimeout(()=>{e.apply(this,r)},t)}}function vu(e,t=document.body){let n=ku(`span`);t.appendChild(n),n.style.fontSize=`inherit`,n.style.height=`auto`,n.style.width=`auto`,n.style.position=`absolute`,n.style.whiteSpace=`no-wrap`,n.innerHTML=bu(`${e}`);let r=Math.ceil(n.clientWidth);return t.removeChild(n),r<=20&&t!==document.body?vu(e,document.body):r}function yu(e){if(!e.includes(`#`))return!0;let t=+(`0x`+e.slice(1).replace(e.length<5&&/./g,`$&$&`)),n=t>>16,r=t>>8&255,i=t&255;return Math.sqrt(n*n*.299+r*r*.587+i*i*.114)>127.5}function bu(e){return e.replace(/[x26x0A<>'"]/g,function(e){return`&#`+e.charCodeAt(0)+`;`})}function xu(e){return e.normalize(`NFD`).replace(/[u0300-u036f]/g,``)}function Su(e){return e?xu(e.toString()).toLowerCase():``}function Cu(e,t){if(e.indexOf(t)>=0)return!0;let n=0;for(let r=0;r<t.length;r++){let i=t[r];if(i!==` `&&(n=e.indexOf(i,n)+1,n<=0))return!1}return!0}function wu(e){e.style.display=`none`,Eu(e,{"aria-hidden":`true`})}function Tu(e){e.style.display=`list-item`,Eu(e,{"aria-hidden":`false`})}function Eu(e,t){for(let[n,r]of Object.entries(t))e.setAttribute(n,r)}function Du(e,t){e.hasAttribute(t)&&e.removeAttribute(t)}function Ou(e){return[`true`,`false`,`1`,`0`,!0,!1].includes(e)&&!!JSON.parse(e)}function ku(e){return document.createElement(e)}function Au(e,t){let n=t[0],r=e;for(let e=1;e<t.length;e++)r=r.split(t[e]).join(n);return r.split(n)}function ju(e,t=`window`){return e.split(`.`).reduce((e,t)=>e[t],t)}var Mu=class e{constructor(e,t={}){if(!(e instanceof HTMLElement)){console.error(`Invalid element`,e);return}mu.set(e,this),hu++,this._selectElement=e,this._configure(t),this._isMouse=!1,this._keyboardNavigation=!1,this._searchFunc=_u(()=>{this._loadFromServer(!0)},this._config.debounceTime),this._fireEvents=!0,this._configureParent(),this._holderElement=ku(`div`),this._containerElement=ku(`div`),this._dropElement=ku(`ul`),this._searchInput=ku(`input`),this._holderElement.appendChild(this._containerElement),this._selectElement.parentElement.insertBefore(this._holderElement,this._selectElement),this.handleEvent=e=>{this._handleEvent(e)},this._configureHolderElement(),this._configureContainerElement(),this._configureSelectElement(),this._configureSearchInput(),this._configureDropElement(),this.resetState(),this._config.fixed&&(document.addEventListener(`scroll`,this,!0),window.addEventListener(`resize`,this)),Array.isArray(this._config.separator)&&(this._config.separator=this._config.separator.filter(e=>e)),this._config.labelField!==`label`&&this._config.searchFields.includes(`label`)&&this._config.searchFields.length===1&&(this._config.searchFields=[this._config.labelField]);for(let e of[`focus`,`blur`,`input`,`keydown`,`paste`])this._searchInput.addEventListener(e,this);for(let e of[`mousemove`,`mouseleave`])this._dropElement.addEventListener(e,this);this.loadData(!0)}static init(t=`select[multiple]`,n={},r=!1){let i=document.querySelectorAll(t);for(let t=0;t<i.length;t++){let a=e.getInstance(i[t]);a&&!r||(a&&a.dispose(),new e(i[t],n))}}static getInstance(e){if(mu.has(e))return mu.get(e)}dispose(){for(let e of[`focus`,`blur`,`input`,`keydown`,`paste`])this._searchInput.removeEventListener(e,this);for(let e of[`mousemove`,`mouseleave`])this._dropElement.removeEventListener(e,this);this._config.fixed&&(document.removeEventListener(`scroll`,this,!0),window.removeEventListener(`resize`,this)),this._selectElement.style.display=`block`,this._holderElement.parentElement.removeChild(this._holderElement),this.parentForm&&this.parentForm.removeEventListener(`reset`,this),mu.delete(this._selectElement)}handleEvent(e){this._handleEvent(e)}_handleEvent(e){[`scroll`,`resize`].includes(e.type)?(this._timer&&window.cancelAnimationFrame(this._timer),this._timer=window.requestAnimationFrame(()=>{this[`on${e.type}`](e)})):this[`on${e.type}`](e)}_configure(e={}){this._config=Object.assign({},tu,{showDropIcon:!!this._findOption()});let t=this._selectElement.dataset.config?JSON.parse(this._selectElement.dataset.config):{},n={...e,...t,...this._selectElement.dataset};for(let[e,t]of Object.entries(tu)){if(e===`config`||n[e]===void 0)continue;let r=n[e];switch(typeof t){case`number`:this._config[e]=parseInt(r);break;case`boolean`:this._config[e]=Ou(r);break;case`string`:this._config[e]=r.toString();break;case`object`:this._config[e]=r,typeof r==`string`&&([`{`,`[`].includes(r[0])?this._config[e]=JSON.parse(r):this._config[e]=r.split(r.includes(`|`)?`|`:`,`));break;case`function`:this._config[e]=typeof r==`string`?r.split(`.`).reduce((e,t)=>e[t],window):r,this._config[e]||console.error(`Invalid function`,r);break;default:this._config[e]=r;break}}this._config.placeholder||(this._config.placeholder=this._getPlaceholder()),this._config.suggestionsThreshold==-1&&(this._config.suggestionsThreshold=+!!this._config.liveServer)}config(e=null){return e?this._config[e]:this._config}setConfig(e,t){this._config[e]=t}_configureParent(){for(this.overflowParent=null,this.parentForm=this._selectElement.parentElement;this.parentForm&&(this.parentForm.style.overflow===`hidden`&&(this.overflowParent=this.parentForm),this.parentForm=this.parentForm.parentElement,!(this.parentForm&&this.parentForm.nodeName==`FORM`)););this.parentForm&&this.parentForm.addEventListener(`reset`,this)}_getPlaceholder(){if(this._selectElement.hasAttribute(`placeholder`))return this._selectElement.getAttribute(`placeholder`);if(this._selectElement.dataset.placeholder)return this._selectElement.dataset.placeholder;let e=this._selectElement.querySelector(`option`);return!e||e.value!=``?``:(Du(e,`selected`),e.selected=!1,e.textContent)}_configureSelectElement(){let e=this._selectElement;this._config.hideNativeValidation?(e.style.position=`absolute`,e.style.left=`-9999px`):e.style.cssText=`height:1px;width:1px;opacity:0;padding:0;margin:0;border:0;float:left;flex-basis:100%;min-height:unset;`,e.tabIndex=-1,e.addEventListener(`focus`,e=>{this.onclick(e)}),e.addEventListener(`invalid`,e=>{this._holderElement.classList.add(au)})}_configureDropElement(){let e=this._dropElement;e.classList.add(`dropdown-menu`,`${nu}menu`),e.id=`${nu}menu-${hu}`,e.setAttribute(`role`,`menu`);let t=e.style;t.padding=`0`,t.maxHeight=`280px`,this._config.fullWidth||(t.maxWidth=`360px`),this._config.fixed&&(t.position=`fixed`),t.overflowY=`auto`,t.overscrollBehavior=`contain`,t.textAlign=`unset`,e.addEventListener(`mouseenter`,e=>{this._keyboardNavigation=!1}),this._holderElement.appendChild(e),this._searchInput.setAttribute(`aria-controls`,e.id)}_configureHolderElement(){let e=this._holderElement;e.classList.add(`form-control`,`dropdown`),[`form-select-lg`,`form-select-sm`,`is-invalid`,`is-valid`].forEach(t=>{this._selectElement.classList.contains(t)&&e.classList.add(t)}),this._config.suggestionsThreshold==0&&this._config.showDropIcon&&e.classList.add(`form-select`),this.overflowParent&&(e.style.position=`inherit`),e.style.height=`auto`,e.addEventListener(`click`,this)}_configureContainerElement(){this._containerElement.addEventListener(`click`,e=>{this.isDisabled()||this._searchInput.style.visibility!==`hidden`&&this._searchInput.focus()});let e=this._containerElement.style;e.display=`flex`,e.alignItems=`center`,e.flexWrap=`wrap`}_configureSearchInput(){let e=this._searchInput;e.type=`text`,e.autocomplete=`off`,e.spellcheck=!1,Eu(e,{"aria-autocomplete":`list`,"aria-haspopup":`menu`,"aria-expanded":`false`,"aria-label":this._config.searchLabel,role:`combobox`}),e.style.cssText=`background-color:transparent;color:currentColor;border:0;padding:0;outline:0;max-width:100%`,this.resetSearchInput(!0),this._containerElement.appendChild(e),this._rtl=e.dir===``&&document.dir===`rtl`||e.dir===`rtl`}onfocus(e){this._holderElement.classList.contains(du)||(this._holderElement.classList.add(du),this.showOrSearch(),this._config.onFocus(e,this))}onblur(e){let t=e.relatedTarget;if(this._isMouse&&t&&(t.classList.contains(`modal`)||t.classList.contains(`${nu}menu`))){this._searchInput.focus();return}this.afteronblur(e)}afteronblur(e){this._abortController&&this._abortController.abort();let t=!0;if(this._config.addOnBlur&&this._searchInput.value&&(t=this._enterValue()),this._holderElement.classList.remove(du),this.hideSuggestions(t),this._fireEvents){let t=this.getSelection(),n={selection:t?t.dataset.value:null,input:this._searchInput.value};this._config.onBlur(e,this),this._selectElement.dispatchEvent(new CustomEvent(`tags.blur`,{bubbles:!0,detail:n}))}}onpaste(e){let t=(e.clipboardData||window.clipboardData).getData(`text/plain`).replace(/rn|n/g,` `);if(t.length>2&&this._config.separator.length){let n=Au(t,this._config.separator).filter(e=>e);if(n.length>1){e.preventDefault();for(let e of n)this._addPastedValue(e)}}}_addPastedValue(e){let t=e,n={};if(this._config.allowNew)n.new=1;else{let n=this.getSelection();if(!n)return;e=n.getAttribute(cu),t=n.dataset.label}this._config.confirmAdd(e,this).then(()=>{this._add(t,e,n)}).catch(()=>{})}oninput(e){let t=this._config.inputFilter(this._searchInput.value);if(t!=this._searchInput.value&&(this._searchInput.value=t),t){let e=t.slice(-1);if(this._config.separator.length&&this._config.separator.includes(e)){this._searchInput.value=this._searchInput.value.slice(0,-1),this._addPastedValue(this._searchInput.value);return}}setTimeout(()=>{this._adjustWidth()}),this.showOrSearch()}onkeydown(e){let t=e.keyCode||e.key,n=e.target;switch(e.keyCode==229&&(t=n.value.charAt(n.selectionStart-1).charCodeAt(0)),t){case 13:case`Enter`:e.preventDefault(),this._enterValue();break;case 38:case`ArrowUp`:e.preventDefault(),this._keyboardNavigation=!0,this._moveSelection(uu);break;case 40:case`ArrowDown`:e.preventDefault(),this._keyboardNavigation=!0,this.isDropdownVisible()?this._moveSelection(lu):this.showOrSearch(!1);break;case 8:case`Backspace`:let t=this.getLastItem();this._searchInput.value.length===0&&t&&this._config.confirmClear(t,this).then(()=>{this.removeLastItem(),this._adjustWidth(),this.showOrSearch()}).catch(()=>{});break;case 27:case`Escape`:this._searchInput.focus(),this.hideSuggestions();break}}onmousemove(e){this._isMouse=!0,this._keyboardNavigation=!1}onmouseleave(e){this._isMouse=!1,this.removeSelection()}onscroll(e){this._positionMenu()}onresize(e){this._positionMenu()}onclick(e=null){!this.isSingle()&&this.isMaxReached()||this._searchInput.focus()}onreset(e){this.reset()}loadData(e=!1){Object.keys(this._config.items).length>0?this.setData(this._config.items,!0):this.resetSuggestions(!0),this._config.server&&(this._config.liveServer||this._loadFromServer(!e))}_setSelectedAttributes(){let e=this._selectElement.selectedOptions||[];for(let t=0;t<e.length;t++)e[t].value&&!e[t].hasAttribute(`selected`)&&e[t].setAttribute(`selected`,`selected`)}resetState(){this.isDisabled()?(this._holderElement.setAttribute(`readonly`,``),this._searchInput.setAttribute(`disabled`,``),this._holderElement.classList.add(pu)):(Du(this._holderElement,`readonly`),Du(this._searchInput,`disabled`),this._holderElement.classList.remove(pu))}resetSuggestions(e=!1){this._setSelectedAttributes();let t=e=>{let t={value:e.getAttribute(`value`),label:e.textContent,disabled:e.disabled,selected:e.selected,title:e.title,data:Object.assign({disabled:e.disabled},e.dataset)};return this._config.valueField!==`value`&&(t[this._config.valueField]=t.value),this._config.labelField!==`label`&&(t[this._config.labelField]=t.label),t},n=Array.from(this._selectElement.children).filter(e=>e.hasAttribute(`label`)||!e.disabled||this._config.showDisabled).map(e=>e.hasAttribute(`label`)?{group:e.getAttribute(`label`),items:Array.from(e.children).map(e=>t(e))}:t(e));this.setData(n,e)}_enterValue(){let e=this.getSelection();if(e)return e.click(),!0;if(this._config.allowNew&&this._searchInput.value){let e=this._searchInput.value;return this._config.confirmAdd(e,this).then(()=>{this._add(e,e,{new:1})}).catch(()=>{}),!0}return!1}_loadFromServer(e=!1){this._abortController&&this._abortController.abort(),this._abortController=new AbortController;let t=this._selectElement.dataset.serverParams||{};typeof t==`string`&&(t=JSON.parse(t));let n=Object.assign({},this._config.serverParams,t);if(n[this._config.queryParam]=this._searchInput.value,this._config.noCache&&(n.t=Date.now()),n.related){let e=document.getElementById(n.related);if(e){n.related=e.value;let t=e.getAttribute(`name`);t&&(n[t]=e.value)}}let r=new URLSearchParams(n),i=this._config.server,a=Object.assign(this._config.fetchOptions,{method:this._config.serverMethod||`GET`,signal:this._abortController.signal});a.method===`POST`?a.body=r:i+=`?${r.toString()}`,this._holderElement.classList.add(ru),fetch(i,a).then(e=>this._config.onServerResponse(e,this)).then(t=>{let n=ju(this._config.serverDataKey,t)||t;this.setData(n,!e),this._abortController=null,e&&this._showSuggestions()}).catch(e=>{this._config.onServerError(e,this._abortController.signal,this)}).finally(e=>{this._holderElement.classList.remove(ru)})}_add(e,t=null,n={}){if(!n.value&&t&&(n.value=t),!this.canAdd(e,n))return null;let r=this.addItem(e,t,n);return this._resetHtmlState(),this._config.keepOpen?this._showSuggestions():this.resetSearchInput(),r}_isItemEnabled(e){if(e.style.display===`none`)return!1;let t=e.firstElementChild;return t.tagName===`A`&&!t.classList.contains(`disabled`)}_moveSelection(e=lu,t=null){let n=this.getSelection(),r=t;if(n){let t=e===lu?`nextSibling`:`previousSibling`;r=n.parentNode;do r=r[t];while(r&&!this._isItemEnabled(r));r?n.classList.remove(...this._activeClasses()):n&&(r=n.parentElement)}else{if(e===uu)return r;if(!r)for(r=this._dropElement.firstChild;r&&!this._isItemEnabled(r);)r=r.nextSibling}if(r){let t=r.offsetHeight,n=r.offsetTop,i=r.parentNode,a=i.offsetHeight,o=i.scrollHeight,s=i.offsetTop;t===0&&setTimeout(()=>{i.scrollTop=0}),e===uu?i.scrollTop=n-s>10?n-s:0:n+t-(a+i.scrollTop)>0&&t>0&&(i.scrollTop=n+t-a+1,i.scrollTop+a>=o-10&&(i.scrollTop=n-s));let c=r.querySelector(`a`);c.classList.add(...this._activeClasses()),this._searchInput.setAttribute(`aria-activedescendant`,c.id),this._config.updateOnSelect&&(this._searchInput.value=c.dataset.label,this._adjustWidth())}else this._searchInput.setAttribute(`aria-activedescendant`,``);return r}_adjustWidth(){this._holderElement.classList.remove(fu),this._searchInput.value?this._searchInput.size=this._searchInput.value.length:this.getSelectedValues().length?(this._searchInput.placeholder=``,this._searchInput.size=1):(this._searchInput.size=this._config.placeholder.length>0?this._config.placeholder.length:1,this._searchInput.placeholder=this._config.placeholder,this._holderElement.classList.add(fu));let e=this._searchInput.value||this._searchInput.placeholder;if(e.length>0){let t=vu(e,this._holderElement)+20;this._searchInput.style.width=`${t}px`}}_buildSuggestions(e){for(;this._dropElement.lastChild;)this._dropElement.removeChild(this._dropElement.lastChild);let t=0,n=1;for(let r=0;r<e.length;r++){let i=e[r];if(i){if(i.group&&i.items){let e=ku(`li`);e.setAttribute(`role`,`presentation`),e.dataset.id=``+n;let r=ku(`span`);if(e.append(r),r.classList.add(`dropdown-header`,`text-truncate`),r.innerHTML=this._config.sanitizer(i.group),this._dropElement.appendChild(e),i.items)for(let e=0;e<i.items.length;e++){let r=i.items[e];r.group_id=n,this._buildSuggestionsItem(i.items[e],t),t++}n++}this._buildSuggestionsItem(i,t),t++}}if(this._config.notFoundMessage){let e=ku(`li`);e.setAttribute(`role`,`presentation`),e.classList.add(`${nu}not-found`),e.innerHTML=`<span class="dropdown-item"></span>`,this._dropElement.appendChild(e)}}_buildSuggestionsItem(e,t){if(!e[this._config.valueField])return;let n=e[this._config.valueField],r=e[this._config.labelField],i=this._config.onRenderItem(e,r,this),a=ku(`li`);a.setAttribute(`role`,`menuitem`),e.group_id&&a.setAttribute(`data-group-id`,`${e.group_id}`),e.title&&(a.setAttribute(`title`,e.title),a.setAttribute(`data-bs-placement`,`left`));let o=ku(`a`);a.append(o),o.id=`${this._dropElement.id}-${t}`,o.classList.add(`dropdown-item`,`text-truncate`),e.disabled&&o.classList.add(`disabled`),o.setAttribute(cu,n),o.dataset.label=r;let s={};this._config.searchFields.forEach(t=>{s[t]=e[t]}),o.dataset.searchData=JSON.stringify(s),o.setAttribute(`href`,`#`),o.innerHTML=i,this._dropElement.appendChild(a);let c=this._getBootstrapVersion()===5;e.title&&gu&&c&&gu.getOrCreateInstance(a),o.addEventListener(`mouseenter`,e=>{this._keyboardNavigation||(this.removeSelection(),a.querySelector(`a`).classList.add(...this._activeClasses()))}),o.addEventListener(`mousedown`,e=>{e.preventDefault()}),o.addEventListener(`click`,t=>{t.preventDefault(),t.stopPropagation(),this._config.confirmAdd(n,this).then(()=>{this._add(r,n,e.data),this._config.onSelectItem(e,this)}).catch(()=>{})})}initialOptions(){return this._selectElement.querySelectorAll(`option[data-init]`)}_removeSelectedAttrs(){this._selectElement.querySelectorAll(`option`).forEach(e=>{Du(e,`selected`)})}reset(){this.removeAll(),this._fireEvents=!1;let e=this.initialOptions();this._removeSelectedAttrs();for(let t=0;t<e.length;t++){let n=e[t],r=Object.assign({},{disabled:n.hasAttribute(`disabled`)},n.dataset);this.addItem(n.textContent,n.value,r)}this._resetHtmlState(),this._fireEvents=!0}resetSearchInput(e=!1){if(this._searchInput.value=``,e||this._adjustWidth(),this._checkMax(),this.isSingle()&&!e){document.activeElement.blur(),this.hideSuggestions();return}e||(this._shouldShow()||this.hideSuggestions(),this._searchInput===document.activeElement&&this._searchInput.dispatchEvent(new Event(`input`)))}_checkMax(){this.isMaxReached()?(this._holderElement.classList.add(ou),this._searchInput.style.visibility=`hidden`):this._searchInput.style.visibility==`hidden`&&(this._searchInput.style.visibility=`visible`)}getSelectedValues(){let e=this._selectElement.querySelectorAll(`option[selected]`);return Array.from(e).map(e=>e.value)}getAvailableValues(){let e=this._selectElement.querySelectorAll(`option`);return Array.from(e).map(e=>e.value)}showOrSearch(e=!0){if(e&&!this._shouldShow()){this.hideSuggestions(!1);return}this._config.liveServer?this._searchFunc():this._showSuggestions()}hideSuggestions(e=!0){this._dropElement.classList.remove(su),Eu(this._searchInput,{"aria-expanded":`false`}),this.removeSelection(),e&&this._holderElement.classList.remove(au)}toggleSuggestions(e=!0,t=!0){this._dropElement.classList.contains(su)?this.hideSuggestions(t):this.showOrSearch(e)}_shouldShow(){return this.isDisabled()||this.isMaxReached()?!1:this._searchInput.value.length>=this._config.suggestionsThreshold}_showSuggestions(){if(this._searchInput.style.visibility==`hidden`)return;let e=Su(this._searchInput.value),t={},n=this._dropElement.querySelectorAll(`li`),r=0,i=null,a=!1,o={};for(let s=0;s<n.length;s++){let c=n[s],l=c.firstElementChild;if(l instanceof HTMLSpanElement){c.dataset.id&&(o[c.dataset.id]=!1),wu(c);continue}if(l.classList.remove(...this._activeClasses()),!this._config.allowSame){let e=l.getAttribute(cu);if(t[e]=t[e]||0,this._findOption(l.getAttribute(cu),`[selected]`,t[e]++)){wu(c);continue}}let u=this._config.showAllSuggestions||e.length===0,d=e.length==0&&this._config.suggestionsThreshold===0;if(!u&&e.length>0){let t=JSON.parse(l.dataset.searchData);this._config.searchFields.forEach(n=>{let r=Su(t[n]),i=!1;if(this._config.fuzzy)i=Cu(r,e);else{let t=r.indexOf(e);i=this._config.startsWith?t===0:t>=0}i&&(d=!0)})}let f=d||e.length===0;if(u||d?(r++,Tu(c),c.dataset.groupId&&(o[c.dataset.groupId]=!0),!i&&this._isItemEnabled(c)&&f&&(i=c),this._config.maximumItems>0&&r>this._config.maximumItems&&wu(c)):wu(c),this._config.highlightTyped){let t=l.textContent,n=Su(t).indexOf(e);l.innerHTML=t.substring(0,n)+`<mark class="${this._config.highlightClass}">${t.substring(n,n+e.length)}</mark>`+t.substring(n+e.length,t.length)}this._isItemEnabled(c)&&(a=!0)}if(!this._config.allowNew&&!(e.length===0&&!a)&&this._holderElement.classList.add(au),this._config.allowNew&&this._config.regex&&this.isInvalid()&&this._holderElement.classList.remove(au),Array.from(n).filter(e=>e.dataset.id).forEach(e=>{o[e.dataset.id]===!0&&Tu(e)}),a&&(this._holderElement.classList.remove(au),i&&this._config.autoselectFirst&&(this.removeSelection(),this._moveSelection(lu,i))),r===0)if(this._config.notFoundMessage){let e=this._dropElement.querySelector(`.${nu}not-found`);e.style.display=`block`,e.innerHTML=`<span class="dropdown-item">${this._config.notFoundMessage.replace(`{{tag}}`,this._searchInput.value)}</span>`,this._showDropdown()}else this.hideSuggestions(!1);else this._showDropdown()}_showDropdown(){let e=this._dropElement.classList.contains(su);e||(this._dropElement.classList.add(su),Eu(this._searchInput,{"aria-expanded":`true`})),this._positionMenu(e)}_positionMenu(e=!1){let t=this._rtl,n=this._config.fixed,r=this._config.fullWidth,i=this._searchInput.getBoundingClientRect(),a=this._holderElement.getBoundingClientRect(),o=0,s=0;if(n?r?(o=a.x,s=a.y+a.height+2):(o=i.x,s=i.y+i.height):r?(o=0,s=a.height+2):(o=this._searchInput.offsetLeft,s=this._searchInput.offsetHeight+this._searchInput.offsetTop),t&&!r&&(o-=this._dropElement.offsetWidth-i.width),!r){let e=Math.min(window.innerWidth,document.body.offsetWidth),n=t?i.x+i.width-this._dropElement.offsetWidth-1:e-1-(i.x+this._dropElement.offsetWidth);n<0&&(o=t?o-n:o+n)}r&&(this._dropElement.style.width=`${this._holderElement.offsetWidth}px`),e||(this._dropElement.style.transform=`unset`),Object.assign(this._dropElement.style,{left:`${o}px`,top:`${s}px`});let c=this._dropElement.getBoundingClientRect(),l=window.innerHeight;if(c.y+c.height>l||this._dropElement.style.transform.includes(`translateY`)){let e=r?a.height+4:i.height;this._dropElement.style.transform=`translateY(calc(-100.1% - ${e}px))`}}_getBootstrapVersion(){let e=5,t=window.jQuery;return t&&t.fn.tooltip&&t.fn.tooltip.Constructor&&(e=parseInt(t.fn.tooltip.Constructor.VERSION.charAt(0))),e}_isSelected(e){return!!Array.from(this._selectElement.querySelectorAll(`option`)).find(t=>t.textContent==e&&t.getAttribute(`selected`))}_isSelectable(e,t){let n=Array.from(this._selectElement.querySelectorAll(`option`)),r=t.value?n.filter(e=>e.value==t.value):n.filter(t=>t.textContent==e);return!(r.length>0&&!r.find(e=>!e.getAttribute(`selected`)))}hasItem(e){for(let t of this._config.items){let n=t.items||[t];for(let t of n)if(t[this._config.labelField]==e)return!0}return!1}getItem(e){for(let t of this._config.items){let n=t.items||[t];for(let t of n)if(t[this._config.valueField]==e)return t}return null}_validateRegex(e){return new RegExp(this._config.regex.trim()).test(e)}getSelection(){return this._dropElement.querySelector(`a.${iu}`)}removeSelection(){let e=this.getSelection();e&&e.classList.remove(...this._activeClasses())}_activeClasses(){return[...this._config.activeClasses,iu]}getActiveSelection(){return this.getSelection()}removeActiveSelection(){return this.removeSelection()}removeAll(){this.getSelectedValues().forEach(e=>{this.removeItem(e,!0)}),this._adjustWidth()}removeLastItem(e=!1){let t=this.getLastItem();t&&this.removeItem(t,e)}getLastItem(){let e=this._containerElement.querySelectorAll(`span.${nu}badge`);if(e.length)return e[e.length-1].getAttribute(cu)}disable(){this._selectElement.setAttribute(`disabled`,``),this.resetState()}enable(){Du(this._selectElement,`disabled`),this.resetState()}isDisabled(){return this._selectElement.hasAttribute(`disabled`)||this._selectElement.disabled||this._selectElement.hasAttribute(`readonly`)}isDropdownVisible(){return this._dropElement.classList.contains(su)}isInvalid(){return this._holderElement.classList.contains(au)}isSingle(){return!this._selectElement.hasAttribute(`multiple`)}isMaxReached(){return this._config.max&&this.getSelectedValues().length>=this._config.max}canAdd(e,t={}){let n=this.cannotAddReason(e,t);return n===`ok`?!0:(n.includes(`invalid-`)&&this._holderElement.classList.add(au),!1)}cannotAddReason(e,t={}){if(!e)return`no-text`;if(t.new&&!this._config.allowNew)return`not-allow-new`;if(!t.new&&!this._config.liveServer&&!this.hasItem(e))return`no-item`;if(this.isDisabled())return`is-disabled`;if(!this.isSingle()&&!this._config.allowSame){if(t.new){if(this._isSelected(e))return`already-selected`}else if(!this._isSelectable(e,t))return`not-selectable`}return this.isMaxReached()?`max-reached`:this._config.regex&&t.new&&!this._validateRegex(e)?`invalid-regex`:this._config.onCanAdd&&this._config.onCanAdd(e,t,this)===!1?`invalid-can-add`:`ok`}getData(){return this._config.items}setData(e,t=!1){this._fireEvents=!1,Array.isArray(e)||(e=Object.entries(e).map(([e,t])=>({value:e,label:t}))),this._config.items!=e&&(this._config.items=e),t&&(this._removeSelectedAttrs(),e.reduce((e,t)=>e.concat(t.group?t.items:[t]),[]).forEach(e=>{let t=e[this._config.valueField],n=e[this._config.labelField];if(t&&(e.selected||this._config.selected.includes(t))){let r=this.addItem(n,t,e.data);r&&r.setAttribute(`data-init`,`true`)}})),this._buildSuggestions(e),this._resetHtmlState(),this._fireEvents=!0,this._config.onDataLoaded(e,this),this._selectElement.dispatchEvent(new CustomEvent(`tags.loaded`,{bubbles:!0,detail:e}))}_findOption(e=null,t=``,n=0){let r=`option${e===null?``:`[value="${CSS.escape(e)}"]`}${t}`;return this._selectElement.querySelectorAll(r)[n]||null}setItem(e,t={}){let n=null;if(!this._config.allowSame&&this._findOption(e,`[selected]`))return;let r=this._findOption(e,`:not([selected])`);if(r)n=this.addItem(r.textContent,r.value,t);else{let r=this.getItem(e);if(r){let e=r[this._config.valueField],i=r[this._config.labelField];n=this.addItem(i,e,t)}}return this._adjustWidth(),this._checkMax(),n}addItem(e,t=null,n={}){t||=e,this.isSingle()&&this.getSelectedValues().length&&this.removeLastItem(!0);let r=this._findOption(t,`:not([selected])`);if(!r){r=ku(`option`),r.value=t,r.innerText=e;for(let[e,t]of Object.entries(n))r.dataset[e]=t;this._selectElement.appendChild(r),this._config.onCreateItem(r,this)}return r&&(n=Object.assign({title:r.getAttribute(`title`)},r.dataset,n)),r.setAttribute(`selected`,`selected`),r.selected=!0,this._createBadge(e,t,n),this._fireEvents&&this._selectElement.dispatchEvent(new Event(`change`,{bubbles:!0})),r}_resetHtmlState(){let e=this._selectElement.innerHTML;this._selectElement.innerHTML=``,this._selectElement.innerHTML=e,this._adjustWidth()}_createBadge(e,t=null,n={}){let r=this._getBootstrapVersion()===5,i=n.disabled&&Ou(n.disabled),a=this._config.allowClear&&!i;this._config.displayValueInBadge&&(n.title||=e,e=t);let o=this._config.allowHtml?e:this._config.sanitizer(e),s=ku(`span`),c=[`${nu}badge`],l=this.isSingle()&&!this._config.singleBadge;if(!l){c.push(`badge`);let e=this._config.badgeStyle;n.badgeStyle&&(e=n.badgeStyle),n.badgeClass&&c.push(...n.badgeClass.split(` `)),this._config.baseClass?c.push(...this._config.baseClass.split(` `)):c=r?[...c,`bg-${e}`,`text-truncate`]:[...c,`badge-${e}`],s.style.maxWidth=`100%`}i&&c.push(`disabled`,`opacity-50`);let u=l?0:2;if(s.style.margin=`${u}px 6px ${u}px 0px`,s.style.marginBlock=`${u}px`,s.style.marginInline=`0px 6px`,s.style.display=`flex`,s.style.alignItems=`center`,n.backgroundColor&&s.style.setProperty(`background-color`,n.backgroundColor,`important`),n.color&&s.style.setProperty(`color`,n.color,`important`),s.classList.add(...c),s.setAttribute(cu,t),n.title&&s.setAttribute(`title`,n.title),a){let e=c.includes(`text-dark`)||n.color&&!yu(n.color)||l?`btn-close`:`btn-close btn-close-white`,t=`margin-inline: 0px 6px;`,i=`left`;this._config.clearEnd&&(i=`right`),i==`right`&&(t=`margin-inline: 6px 0px;`);let a=r?`<button type="button" style="font-size:0.65em;`+t+`" class="`+e+`" aria-label="`+this._config.clearLabel+`"></button>`:`<button type="button" style="font-size:1em;`+t+`text-shadow:none;color:currentColor;transform:scale(1.2);float:none" class="close" aria-label="`+this._config.clearLabel+`"><span aria-hidden="true">&times;</span></button>`;o=i==`left`?a+o:o+a}s.innerHTML=o,this._containerElement.insertBefore(s,this._searchInput),n.title&&gu&&r&&gu.getOrCreateInstance(s),a&&s.querySelector(`button`).addEventListener(`click`,e=>{e.preventDefault(),e.stopPropagation(),this.isDisabled()||this._config.confirmClear(t,this).then(()=>{this.removeItem(t),document.activeElement.blur(),this._adjustWidth()}).catch(()=>{})})}getHolder(){return this._holderElement}clear(){this.hideSuggestions(),this.reset()}updateData(e){this.setData(e,!1),this.reset()}removeItem(e,t=!1){let n=CSS.escape(e),r=this._containerElement.querySelectorAll(`span[data-value="`+n+`"]`);if(!r.length)return!1;let i=r.length-1,a=r[i];a&&(a.dataset.bsOriginalTitle&&gu.getOrCreateInstance(a).dispose(),a.remove());let o=this._findOption(e,`[selected]`,i);return o&&(Du(o,`selected`),o.selected=!1,this._fireEvents&&!t&&this._selectElement.dispatchEvent(new Event(`change`,{bubbles:!0}))),this._searchInput.style.visibility==`hidden`&&!this.isMaxReached()&&(this._searchInput.style.visibility=`visible`,this._holderElement.classList.remove(ou)),t||this._config.onClearItem(e,this),!0}},Nu=function(){return Nu=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Nu.apply(this,arguments)},Pu=function(){function e(e){this.options=e,this.listeners={}}return e.prototype.on=function(e,t){var n=this.listeners[e]||[];this.listeners[e]=n.concat([t])},e.prototype.triggerEvent=function(e,t){var n=this;(this.listeners[e]||[]).forEach(function(e){return e({target:n,event:t})})},e}(),Fu;(function(e){e[e.Add=0]=`Add`,e[e.Remove=1]=`Remove`})(Fu||={});var Iu=function(){function e(){this.notifications=[]}return e.prototype.push=function(e){this.notifications.push(e),this.updateFn(e,Fu.Add,this.notifications)},e.prototype.splice=function(e,t){var n=this.notifications.splice(e,t)[0];return this.updateFn(n,Fu.Remove,this.notifications),n},e.prototype.indexOf=function(e){return this.notifications.indexOf(e)},e.prototype.onUpdate=function(e){this.updateFn=e},e}(),Lu;(function(e){e.Dismiss=`dismiss`,e.Click=`click`})(Lu||={});var Ru={types:[{type:`success`,className:`notyf__toast--success`,backgroundColor:`#3dc763`,icon:{className:`notyf__icon--success`,tagName:`i`}},{type:`error`,className:`notyf__toast--error`,backgroundColor:`#ed3d3d`,icon:{className:`notyf__icon--error`,tagName:`i`}}],duration:2e3,ripple:!0,position:{x:`right`,y:`bottom`},dismissible:!1},zu=function(){function e(){this.notifications=[],this.events={},this.X_POSITION_FLEX_MAP={left:`flex-start`,center:`center`,right:`flex-end`},this.Y_POSITION_FLEX_MAP={top:`flex-start`,center:`center`,bottom:`flex-end`};var e=document.createDocumentFragment(),t=this._createHTMLElement({tagName:`div`,className:`notyf`});e.appendChild(t),document.body.appendChild(e),this.container=t,this.animationEndEventName=this._getAnimationEndEventName(),this._createA11yContainer()}return e.prototype.on=function(e,t){var n;this.events=Nu(Nu({},this.events),(n={},n[e]=t,n))},e.prototype.update=function(e,t){t===Fu.Add?this.addNotification(e):t===Fu.Remove&&this.removeNotification(e)},e.prototype.removeNotification=function(e){var t=this,n=this._popRenderedNotification(e),r;if(n){r=n.node,r.classList.add(`notyf__toast--disappear`);var i;r.addEventListener(this.animationEndEventName,i=function(e){e.target===r&&(r.removeEventListener(t.animationEndEventName,i),t.container.removeChild(r))})}},e.prototype.addNotification=function(e){var t=this._renderNotification(e);this.notifications.push({notification:e,node:t}),this._announce(e.options.message||`Notification`)},e.prototype._renderNotification=function(e){var t,n=this._buildNotificationCard(e),r=e.options.className;return r&&(t=n.classList).add.apply(t,r.split(` `)),this.container.appendChild(n),n},e.prototype._popRenderedNotification=function(e){for(var t=-1,n=0;n<this.notifications.length&&t<0;n++)this.notifications[n].notification===e&&(t=n);if(t!==-1)return this.notifications.splice(t,1)[0]},e.prototype.getXPosition=function(e){return e?.position?.x||`right`},e.prototype.getYPosition=function(e){return e?.position?.y||`bottom`},e.prototype.adjustContainerAlignment=function(e){var t=this.X_POSITION_FLEX_MAP[this.getXPosition(e)],n=this.Y_POSITION_FLEX_MAP[this.getYPosition(e)],r=this.container.style;r.setProperty(`justify-content`,n),r.setProperty(`align-items`,t)},e.prototype._buildNotificationCard=function(e){var t=this,n=e.options,r=n.icon;this.adjustContainerAlignment(n);var i=this._createHTMLElement({tagName:`div`,className:`notyf__toast`}),a=this._createHTMLElement({tagName:`div`,className:`notyf__ripple`}),o=this._createHTMLElement({tagName:`div`,className:`notyf__wrapper`}),s=this._createHTMLElement({tagName:`div`,className:`notyf__message`});s.innerHTML=n.message||``;var c=n.background||n.backgroundColor;if(r){var l=this._createHTMLElement({tagName:`div`,className:`notyf__icon`});if((typeof r==`string`||r instanceof String)&&(l.innerHTML=new String(r).valueOf()),typeof r==`object`){var u=r.tagName,d=u===void 0?`i`:u,f=r.className,p=r.text,m=r.color,h=m===void 0?c:m,g=this._createHTMLElement({tagName:d,className:f,text:p});h&&(g.style.color=h),l.appendChild(g)}o.appendChild(l)}if(o.appendChild(s),i.appendChild(o),c&&(n.ripple?(a.style.background=c,i.appendChild(a)):i.style.background=c),n.dismissible){var _=this._createHTMLElement({tagName:`div`,className:`notyf__dismiss`}),v=this._createHTMLElement({tagName:`button`,className:`notyf__dismiss-btn`});_.appendChild(v),o.appendChild(_),i.classList.add(`notyf__toast--dismissible`),v.addEventListener(`click`,function(n){var r,i;(i=(r=t.events)[Lu.Dismiss])==null||i.call(r,{target:e,event:n}),n.stopPropagation()})}i.addEventListener(`click`,function(n){var r;return(r=t.events)[Lu.Click]?.call(r,{target:e,event:n})});var y=this.getYPosition(n)===`top`?`upper`:`lower`;return i.classList.add(`notyf__toast--`+y),i},e.prototype._createHTMLElement=function(e){var t=e.tagName,n=e.className,r=e.text,i=document.createElement(t);return n&&(i.className=n),i.textContent=r||null,i},e.prototype._createA11yContainer=function(){var e=this._createHTMLElement({tagName:`div`,className:`notyf-announcer`});e.setAttribute(`aria-atomic`,`true`),e.setAttribute(`aria-live`,`polite`),e.style.border=`0`,e.style.clip=`rect(0 0 0 0)`,e.style.height=`1px`,e.style.margin=`-1px`,e.style.overflow=`hidden`,e.style.padding=`0`,e.style.position=`absolute`,e.style.width=`1px`,e.style.outline=`0`,document.body.appendChild(e),this.a11yContainer=e},e.prototype._announce=function(e){var t=this;this.a11yContainer.textContent=``,setTimeout(function(){t.a11yContainer.textContent=e},100)},e.prototype._getAnimationEndEventName=function(){var e=document.createElement(`_fake`),t={MozTransition:`animationend`,OTransition:`oAnimationEnd`,WebkitTransition:`webkitAnimationEnd`,transition:`animationend`},n;for(n in t)if(e.style[n]!==void 0)return t[n];return`animationend`},e}(),Bu=new(function(){function e(e){var t=this;this.dismiss=this._removeNotification,this.notifications=new Iu,this.view=new zu;var n=this.registerTypes(e);this.options=Nu(Nu({},Ru),e),this.options.types=n,this.notifications.onUpdate(function(e,n){return t.view.update(e,n)}),this.view.on(Lu.Dismiss,function(e){var n=e.target,r=e.event;t._removeNotification(n),n.triggerEvent(Lu.Dismiss,r)}),this.view.on(Lu.Click,function(e){var t=e.target,n=e.event;return t.triggerEvent(Lu.Click,n)})}return e.prototype.error=function(e){var t=this.normalizeOptions(`error`,e);return this.open(t)},e.prototype.success=function(e){var t=this.normalizeOptions(`success`,e);return this.open(t)},e.prototype.open=function(e){var t=this.options.types.find(function(t){return t.type===e.type})||{},n=Nu(Nu({},t),e);this.assignProps([`ripple`,`position`,`dismissible`],n);var r=new Pu(n);return this._pushNotification(r),r},e.prototype.dismissAll=function(){for(;this.notifications.splice(0,1););},e.prototype.assignProps=function(e,t){var n=this;e.forEach(function(e){t[e]=t[e]==null?n.options[e]:t[e]})},e.prototype._pushNotification=function(e){var t=this;this.notifications.push(e);var n=e.options.duration===void 0?this.options.duration:e.options.duration;n&&setTimeout(function(){return t._removeNotification(e)},n)},e.prototype._removeNotification=function(e){var t=this.notifications.indexOf(e);t!==-1&&this.notifications.splice(t,1)},e.prototype.normalizeOptions=function(e,t){var n={type:e};return typeof t==`string`?n.message=t:typeof t==`object`&&(n=Nu(Nu({},n),t)),n},e.prototype.registerTypes=function(e){var t=(e&&e.types||[]).slice();return Ru.types.map(function(e){var n=-1;t.forEach(function(t,r){t.type===e.type&&(n=r)});var r=n===-1?{}:t.splice(n,1)[0];return Nu(Nu({},e),r)}).concat(t)},e}())({duration:4e3,position:{x:`right`,y:`top`},dismissible:!0,ripple:!0,types:[{type:`success`,background:`#28a745`},{type:`error`,background:`#dc3545`},{type:`warning`,background:`#ffc107`}]});window.fancybox=$,window.fancyCarousel=Vc,window.fancyCarouselPlugins={Arrows:tl,Dots:eu},window.tags=Mu,window.notyf=Bu;var Vu=`modulepreload`,Hu=function(e){return`/build/`+e},Uu={},Wu=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}r=o(t.map(t=>{if(t=Hu(t,n),t in Uu)return;Uu[t]=!0;let r=t.endsWith(`.css`),i=r?`[rel="stylesheet"]`:``;if(n)for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}else if(document.querySelector(`link[href="${t}"]${i}`))return;let o=document.createElement(`link`);if(o.rel=r?`stylesheet`:Vu,r||(o.as=`script`),o.crossOrigin=``,o.href=t,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),r)return new Promise((e,n)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};document.addEventListener(`DOMContentLoaded`,()=>{let e=document.querySelectorAll(`textarea.tiptap`);e.length&&Wu(async()=>{let{initEditors:e}=await import(`./tiptap-D6BjJNgN.js`);return{initEditors:e}},[]).then(({initEditors:t})=>t(e))}),(function(){var e=null;window.PR_SHOULD_USE_CONTINUATION=!0,(function(){function t(e){function t(e){var t=e.charCodeAt(0);if(t!==92)return t;var n=e.charAt(1);return(t=d[n])?t:`0`<=n&&n<=`7`?parseInt(e.substring(1),8):n===`u`||n===`x`?parseInt(e.substring(2),16):e.charCodeAt(1)}function n(e){return e<32?(e<16?`\x0`:`\x`)+e.toString(16):(e=String.fromCharCode(e),e===`\`||e===`-`||e===`]`||e===`^`?`\`+e:e)}function r(e){var r=e.substring(1,e.length-1).match(/\u[dA-Fa-f]{4}|\x[dA-Fa-f]{2}|\[0-3][0-7]{0,2}|\[0-7]{1,2}|\[Ss]|[^\]/g),e=[],i=r[0]===`^`,a=[`[`];i&&a.push(`^`);for(var i=+!!i,o=r.length;i<o;++i){var s=r[i];if(/\[bdsw]/i.test(s))a.push(s);else{var s=t(s),c;i+2<o&&r[i+1]===`-`?(c=t(r[i+2]),i+=2):c=s,e.push([s,c]),c<65||s>122||(c<65||s>90||e.push([Math.max(65,s)|32,Math.min(c,90)|32]),c<97||s>122||e.push([Math.max(97,s)&-33,Math.min(c,122)&-33]))}}for(e.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]}),r=[],o=[],i=0;i<e.length;++i)s=e[i],s[0]<=o[1]+1?o[1]=Math.max(o[1],s[1]):r.push(o=s);for(i=0;i<r.length;++i)s=r[i],a.push(n(s[0])),s[1]>s[0]&&(s[1]+1>s[0]&&a.push(`-`),a.push(n(s[1])));return a.push(`]`),a.join(``)}function i(e){for(var t=e.source.match(/[(?:[^\]]|\[Ss])*]|\u[dA-Fa-f]{4}|\x[dA-Fa-f]{2}|\d+|\[^dux]|(?[!:=]|[()^]|[^()[\^]+/g),i=t.length,s=[],c=0,l=0;c<i;++c){var u=t[c];u===`(`?++l:u.charAt(0)===`\`&&(u=+u.substring(1))&&(u<=l?s[u]=-1:t[c]=n(u))}for(c=1;c<s.length;++c)s[c]===-1&&(s[c]=++a);for(l=c=0;c<i;++c)u=t[c],u===`(`?(++l,s[l]||(t[c]=`(?:`)):u.charAt(0)===`\`&&(u=+u.substring(1))&&u<=l&&(t[c]=`\`+s[u]);for(c=0;c<i;++c)t[c]===`^`&&t[c+1]!==`^`&&(t[c]=``);if(e.ignoreCase&&o)for(c=0;c<i;++c)u=t[c],e=u.charAt(0),u.length>=2&&e===`[`?t[c]=r(u):e!==`\`&&(t[c]=u.replace(/[A-Za-z]/g,function(e){return e=e.charCodeAt(0),`[`+String.fromCharCode(e&-33,e|32)+`]`}));return t.join(``)}for(var a=0,o=!1,s=!1,c=0,l=e.length;c<l;++c){var u=e[c];if(u.ignoreCase)s=!0;else if(/[a-z]/i.test(u.source.replace(/\u[da-f]{4}|\x[da-f]{2}|\[^UXux]/gi,``))){o=!0,s=!1;break}}for(var d={b:8,t:9,n:10,v:11,f:12,r:13},f=[],c=0,l=e.length;c<l;++c){if(u=e[c],u.global||u.multiline)throw Error(``+u);f.push(`(?:`+i(u)+`)`)}return RegExp(f.join(`|`),s?`gi`:`g`)}function n(e,t){function n(e){var c=e.nodeType;if(c==1){if(!r.test(e.className)){for(c=e.firstChild;c;c=c.nextSibling)n(c);c=e.nodeName.toLowerCase(),(c===`br`||c===`li`)&&(i[s]=`
`,o[s<<1]=a++,o[s++<<1|1]=e)}}else (c==3||c==4)&&(c=e.nodeValue,c.length&&(c=t?c.replace(/rn?/g,`
`):c.replace(/[tnr ]+/g,` `),i[s]=c,o[s<<1]=a,a+=c.length,o[s++<<1|1]=e))}var r=/(?:^|s)nocode(?:s|$)/,i=[],a=0,o=[],s=0;return n(e),{a:i.join(``).replace(/n$/,``),d:o}}function r(e,t,n,r){t&&(e={a:t,e},n(e),r.push.apply(r,e.g))}function i(e){for(var t=void 0,n=e.firstChild;n;n=n.nextSibling)var r=n.nodeType,t=r===1?t?e:n:r===3&&x.test(n.nodeValue)?e:t;return t===e?void 0:t}function a(n,i){function a(e){for(var t=e.e,n=[t,`pln`],u=0,d=e.a.match(s)||[],f={},p=0,m=d.length;p<m;++p){var h=d[p],g=f[h],_=void 0,v;if(typeof g==`string`)v=!1;else{var y=o[h.charAt(0)];if(y)_=h.match(y[1]),g=y[0];else{for(v=0;v<c;++v)if(y=i[v],_=h.match(y[1])){g=y[0];break}_||(g=`pln`)}(v=g.length>=5&&g.substring(0,5)===`lang-`)&&!(_&&typeof _[1]==`string`)&&(v=!1,g=`src`),v||(f[h]=g)}if(y=u,u+=h.length,v){v=_[1];var b=h.indexOf(v),x=b+v.length;_[2]&&(x=h.length-_[2].length,b=x-v.length),g=g.substring(5),r(t+y,h.substring(0,b),a,n),r(t+y+b,v,l(g,v),n),r(t+y+x,h.substring(x),a,n)}else n.push(t+y,g)}e.g=n}var o={},s;(function(){for(var r=n.concat(i),a=[],c={},l=0,u=r.length;l<u;++l){var d=r[l],f=d[3];if(f)for(var p=f.length;--p>=0;)o[f.charAt(p)]=d;d=d[1],f=``+d,c.hasOwnProperty(f)||(a.push(d),c[f]=e)}a.push(/[Ss]/),s=t(a)})();var c=i.length;return a}function o(t){var n=[],r=[];t.tripleQuotedStrings?n.push([`str`,/^(?:'''(?:[^'\]|\[Ss]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\]|\[Ss]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\]|\[Ss])*(?:'|$)|"(?:[^"\]|\[Ss])*(?:"|$))/,e,`'"`]):t.multiLineStrings?n.push([`str`,/^(?:'(?:[^'\]|\[Ss])*(?:'|$)|"(?:[^"\]|\[Ss])*(?:"|$)|`(?:[^\`]|\[Ss])*(?:`|$))/,e,`'"``]):n.push([`str`,/^(?:'(?:[^nr'\]|\.)*(?:'|$)|"(?:[^nr"\]|\.)*(?:"|$))/,e,`"'`]),t.verbatimStrings&&r.push([`str`,/^@"(?:[^"]|"")*(?:"|$)/,e]);var i=t.hashComments;if(i&&(t.cStyleComments?(i>1?n.push([`com`,/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,e,`#`]):n.push([`com`,/^#(?:(?:define|e(?:l|nd)if|else|error|ifn?def|include|line|pragma|undef|warning)b|[^nr]*)/,e,`#`]),r.push([`str`,/^<(?:(?:(?:../)*|/?)(?:[w-]+(?:/[w-]+)+)?[w-]+.h(?:h|pp|++)?|[a-z]w*)>/,e])):n.push([`com`,/^#[^nr]*/,e,`#`])),t.cStyleComments&&(r.push([`com`,/^//[^nr]*/,e]),r.push([`com`,/^/*[Ss]*?(?:*/|$)/,e])),i=t.regexLiterals){var o=(i=i>1?``:`
r`)?`.`:`[\S\s]`;r.push([`lang-regex`,RegExp(`^(?:^^\.?|[+-]|[!=]=?=?|\#|%=?|&&?=?|\(|\*=?|[+\-]=|->|\/=?|::?|<<?=?|>>?>?=?|,|;|\?|@|\[|~|{|\^\^?=?|\|\|?=?|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(`+(`/(?=[^/*`+i+`])(?:[^/\x5B\x5C`+i+`]|\x5C`+o+`|\x5B(?:[^\x5C\x5D`+i+`]|\x5C`+o+`)*(?:\x5D|$))+/`)+`)`)])}return(i=t.types)&&r.push([`typ`,i]),i=(``+t.keywords).replace(/^ | $/g,``),i.length&&r.push([`kwd`,RegExp(`^(?:`+i.replace(/[s,]+/g,`|`)+`)\b`),e]),n.push([`pln`,/^s+/,e,` r
    xA0`]),i=`^.[^\s\w.$@'"`/\\]*`,t.regexLiterals&&(i+=`(?!s*/)`),r.push([`lit`,/^@[$_a-z][w$@]*/i,e],[`typ`,/^(?:[@_]?[A-Z]+[a-z][w$@]*|w+_tb)/,e],[`pln`,/^[$_a-z][w$@]*/i,e],[`lit`,/^(?:0x[da-f]+|(?:d(?:_d+)*d*(?:.d*)?|.d+)(?:e[+-]?d+)?)[a-z]*/i,e,`0123456789`],[`pln`,/^\[Ss]?/,e],[`pun`,RegExp(i),e]),a(n,r)}function s(e,t,n){function r(e){var t=e.nodeType;if(t==1&&!a.test(e.className))if(e.nodeName===`br`)i(e),e.parentNode&&e.parentNode.removeChild(e);else for(e=e.firstChild;e;e=e.nextSibling)r(e);else if((t==3||t==4)&&n){var c=e.nodeValue,l=c.match(o);l&&(t=c.substring(0,l.index),e.nodeValue=t,(c=c.substring(l.index+l[0].length))&&e.parentNode.insertBefore(s.createTextNode(c),e.nextSibling),i(e),t||e.parentNode.removeChild(e))}}function i(e){function t(e,n){var r=n?e.cloneNode(!1):e,i=e.parentNode;if(i){var i=t(i,1),a=e.nextSibling;i.appendChild(r);for(var o=a;o;o=a)a=o.nextSibling,i.appendChild(o)}return r}for(;!e.nextSibling;)if(e=e.parentNode,!e)return;for(var e=t(e.nextSibling,0),n;(n=e.parentNode)&&n.nodeType===1;)e=n;l.push(e)}for(var a=/(?:^|s)nocode(?:s|$)/,o=/rn?|n/,s=e.ownerDocument,c=s.createElement(`li`);e.firstChild;)c.appendChild(e.firstChild);for(var l=[c],u=0;u<l.length;++u)r(l[u]);t===(t|0)&&l[0].setAttribute(`value`,t);var d=s.createElement(`ol`);d.className=`linenums`;for(var t=Math.max(0,t-1|0)||0,u=0,f=l.length;u<f;++u)c=l[u],c.className=`L`+(u+t)%10,c.firstChild||c.appendChild(s.createTextNode(`xA0`)),d.appendChild(c);e.appendChild(d)}function c(e,t){for(var n=t.length;--n>=0;){var r=t[n];C.hasOwnProperty(r)?d.console&&console.warn(`cannot override language handler %s`,r):C[r]=e}}function l(e,t){return(!e||!C.hasOwnProperty(e))&&(e=/^s*</.test(t)?`default-markup`:`default-code`),C[e]}function u(e){var t=e.h;try{var r=n(e.c,e.i),i=r.a;e.a=i,e.d=r.d,e.e=0,l(t,i)(e);var a=/bMSIEs(d+)/.exec(navigator.userAgent),a=a&&+a[1]<=8,t=/n/g,o=e.a,s=o.length,r=0,c=e.d,u=c.length,i=0,f=e.g,p=f.length,m=0;f[p]=s;var h,g;for(g=h=0;g<p;)f[g]===f[g+2]?g+=2:(f[h++]=f[g++],f[h++]=f[g++]);for(p=h,g=h=0;g<p;){for(var _=f[g],v=f[g+1],y=g+2;y+2<=p&&f[y+1]===v;)y+=2;f[h++]=_,f[h++]=v,g=y}f.length=h;var b=e.c,x;b&&(x=b.style.display,b.style.display=`none`);try{for(;i<u;){var S=c[i+2]||s,C=f[m+2]||s,y=Math.min(S,C),w=c[i+1],T;if(w.nodeType!==1&&(T=o.substring(r,y))){a&&(T=T.replace(t,`r`)),w.nodeValue=T;var E=w.ownerDocument,D=E.createElement(`span`);D.className=f[m+1];var O=w.parentNode;O.replaceChild(D,w),D.appendChild(w),r<S&&(c[i+1]=w=E.createTextNode(o.substring(y,S)),O.insertBefore(w,D.nextSibling))}r=y,r>=S&&(i+=2),r>=C&&(m+=2)}}finally{b&&(b.style.display=x)}}catch(e){d.console&&console.log(e&&e.stack||e)}}var d=window,f=[`break,continue,do,else,for,if,return,while`],p=[[f,`auto,case,char,const,default,double,enum,extern,float,goto,inline,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile`],`catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof`],m=[p,`alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,delegate,dynamic_cast,explicit,export,friend,generic,late_check,mutable,namespace,nullptr,property,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where`],h=[p,`abstract,assert,boolean,byte,extends,final,finally,implements,import,instanceof,interface,null,native,package,strictfp,super,synchronized,throws,transient`],g=[h,`as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,internal,into,is,let,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var,virtual,where`],p=[p,`debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN`],_=[f,`and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None`],v=[f,`alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END`],y=[f,`as,assert,const,copy,drop,enum,extern,fail,false,fn,impl,let,log,loop,match,mod,move,mut,priv,pub,pure,ref,self,static,struct,true,trait,type,unsafe,use`],f=[f,`case,done,elif,esac,eval,fi,function,in,local,set,then,until`],b=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)d*)b/,x=/S/,S=o({keywords:[m,g,p,`caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END`,_,v,f],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),C={};c(S,[`default-code`]),c(a([],[[`pln`,/^[^<?]+/],[`dec`,/^<!w[^>]*(?:>|$)/],[`com`,/^<!--[Ss]*?(?:-->|$)/],[`lang-`,/^<?([Ss]+?)(?:?>|$)/],[`lang-`,/^<%([Ss]+?)(?:%>|$)/],[`pun`,/^(?:<[%?]|[%?]>)/],[`lang-`,/^<xmpb[^>]*>([Ss]+?)</xmpb[^>]*>/i],[`lang-js`,/^<scriptb[^>]*>([Ss]*?)(</scriptb[^>]*>)/i],[`lang-css`,/^<styleb[^>]*>([Ss]*?)(</styleb[^>]*>)/i],[`lang-in.tag`,/^(</?[a-z][^<>]*>)/i]]),[`default-markup`,`htm`,`html`,`mxml`,`xhtml`,`xml`,`xsl`]),c(a([[`pln`,/^s+/,e,`     r
`],[`atv`,/^(?:"[^"]*"?|'[^']*'?)/,e,`"'`]],[[`tag`,/^^</?[a-z](?:[w-.:]*w)?|/?>$/i],[`atn`,/^(?!style[s=]|on)[a-z](?:[w:-]*w)?/i],[`lang-uq.val`,/^=s*([^s"'>]*(?:[^s"'/>]|/(?=s)))/],[`pun`,/^[/<->]+/],[`lang-js`,/^onw+s*=s*"([^"]+)"/i],[`lang-js`,/^onw+s*=s*'([^']+)'/i],[`lang-js`,/^onw+s*=s*([^s"'>]+)/i],[`lang-css`,/^styles*=s*"([^"]+)"/i],[`lang-css`,/^styles*=s*'([^']+)'/i],[`lang-css`,/^styles*=s*([^s"'>]+)/i]]),[`in.tag`]),c(a([],[[`atv`,/^[Ss]+/]]),[`uq.val`]),c(o({keywords:m,hashComments:!0,cStyleComments:!0,types:b}),[`c`,`cc`,`cpp`,`cxx`,`cyc`,`m`]),c(o({keywords:`null,true,false`}),[`json`]),c(o({keywords:g,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:b}),[`cs`]),c(o({keywords:h,cStyleComments:!0}),[`java`]),c(o({keywords:f,hashComments:!0,multiLineStrings:!0}),[`bash`,`bsh`,`csh`,`sh`]),c(o({keywords:_,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),[`cv`,`py`,`python`]),c(o({keywords:`caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END`,hashComments:!0,multiLineStrings:!0,regexLiterals:2}),[`perl`,`pl`,`pm`]),c(o({keywords:v,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),[`rb`,`ruby`]),c(o({keywords:p,cStyleComments:!0,regexLiterals:!0}),[`javascript`,`js`]),c(o({keywords:`all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,throw,true,try,unless,until,when,while,yes`,hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),[`coffee`]),c(o({keywords:y,cStyleComments:!0,multilineStrings:!0}),[`rc`,`rs`,`rust`]),c(a([],[[`str`,/^[Ss]+/]]),[`regex`]);var w=d.PR={createSimpleLexer:a,registerLangHandler:c,sourceDecorator:o,PR_ATTRIB_NAME:`atn`,PR_ATTRIB_VALUE:`atv`,PR_COMMENT:`com`,PR_DECLARATION:`dec`,PR_KEYWORD:`kwd`,PR_LITERAL:`lit`,PR_NOCODE:`nocode`,PR_PLAIN:`pln`,PR_PUNCTUATION:`pun`,PR_SOURCE:`src`,PR_STRING:`str`,PR_TAG:`tag`,PR_TYPE:`typ`,prettyPrintOne:d.prettyPrintOne=function(e,t,n){var r=document.createElement(`div`);return r.innerHTML=`<pre>`+e+`</pre>`,r=r.firstChild,n&&s(r,n,!0),u({h:t,j:n,c:r,i:1}),r.innerHTML},prettyPrint:d.prettyPrint=function(t,n){function r(){for(var n=d.PR_SHOULD_USE_CONTINUATION?m.now()+250:1/0;h<c.length&&m.now()<n;h++){for(var a=c[h],l=C,f=a;f=f.previousSibling;){var p=f.nodeType,w=(p===7||p===8)&&f.nodeValue;if(w?!/^??prettifyb/.test(w):p!==3||/S/.test(f.nodeValue))break;if(w){l={},w.replace(/b(w+)=([w%+-.:]+)/g,function(e,t,n){l[t]=n});break}}if(f=a.className,(l!==C||v.test(f))&&!y.test(f)){for(p=!1,w=a.parentNode;w;w=w.parentNode)if(S.test(w.tagName)&&w.className&&v.test(w.className)){p=!0;break}if(!p){if(a.className+=` prettyprinted`,p=l.lang,!p){var p=f.match(_),T;!p&&(T=i(a))&&x.test(T.tagName)&&(p=T.className.match(_)),p&&=p[1]}if(b.test(a.tagName))w=1;else var w=a.currentStyle,E=o.defaultView,w=(w=w?w.whiteSpace:E&&E.getComputedStyle?E.getComputedStyle(a,e).getPropertyValue(`white-space`):0)&&w.substring(0,3)===`pre`;E=l.linenums,(E=E===`true`||+E)||(E=(E=f.match(/blinenumsb(?::(d+))?/))?E[1]&&E[1].length?+E[1]:!0:!1),E&&s(a,E,w),g={h:p,c:a,j:E,i:w},u(g)}}}h<c.length?setTimeout(r,250):typeof t==`function`&&t()}for(var a=n||document.body,o=a.ownerDocument||document,a=[a.getElementsByTagName(`pre`),a.getElementsByTagName(`code`),a.getElementsByTagName(`xmp`)],c=[],l=0;l<a.length;++l)for(var f=0,p=a[l].length;f<p;++f)c.push(a[l][f]);var a=e,m=Date;m.now||(m={now:function(){return+new Date}});var h=0,g,_=/blang(?:uage)?-([w.]+)(?!S)/,v=/bcodeb/,y=/bprettyprintedb/,b=/pre|xmp/i,x=/^code$/i,S=/^(?:pre|code|xmp)$/i,C={};r()}};typeof define==`function`&&define.amd&&define(`google-code-prettify`,[],function(){return w})})()})();var Gu=document.querySelector(`meta[name="csrf-token"]`)?.content;function Ku(){let e=0;return document.querySelectorAll(`.app-header, .app-topnav`).forEach(t=>{e=Math.max(e,t.getBoundingClientRect().bottom)}),e||document.querySelectorAll(`body > *, body > * > *`).forEach(t=>{if(window.getComputedStyle(t).position===`fixed`){let n=t.getBoundingClientRect();n.top>=0&&n.top<5&&n.bottom>0&&n.bottom<window.innerHeight*.5&&n.width>window.innerWidth*.5&&(e=Math.max(e,n.bottom))}}),e}function qu(e=document){e.querySelectorAll(`.section-content.short-view:not(.clamped):not(.expanded)`).forEach(function(e){let t=e.scrollHeight-e.clientHeight;if(t>100){e.classList.add(`clamped`);let t=document.createElement(`button`);t.type=`button`,t.className=`btn btn-sm btn-adaptive mt-2`,t.textContent=`Показать полностью`,t.addEventListener(`click`,function(){e.classList.add(`expanded`),e.classList.remove(`clamped`),t.remove()}),e.after(t)}else t>0&&e.classList.remove(`short-view`)})}function Ju({url:e,type:t=`GET`,data:n=null,dataType:r=`json`,beforeSend:i,complete:a,success:o,error:s}){i&&i();let c={method:t.toUpperCase(),headers:{"X-CSRF-TOKEN":Gu,"X-Requested-With":`XMLHttpRequest`}};n&&(n instanceof FormData?c.body=n:(c.headers[`Content-Type`]=`application/x-www-form-urlencoded`,c.body=new URLSearchParams(n))),fetch(e,c).then(e=>r===`json`?e.json():e.text()).then(e=>{o&&o(e)}).catch(e=>{s&&s(null,e.message,e)}).finally(()=>{a&&a()})}function Yu(e,t){e.addEventListener(`input`,function(){let n=e.value.replace(/D/g,``),r=``,i=0;for(let e=0;e<t.length&&i<n.length;e++)r+=t[e]===`0`?n[i++]:t[e];e.value=r})}document.addEventListener(`DOMContentLoaded`,function(){document.querySelectorAll(`[data-bs-toggle="tooltip"]`).forEach(e=>new Do(e));let e=document.querySelectorAll(`[data-bs-toggle="popover"]`);e.forEach(e=>new No(e)),document.body.addEventListener(`click`,function(t){!t.target.closest(`[data-bs-toggle="popover"]`)&&!t.target.closest(`.popover`)&&e.forEach(e=>No.getInstance(e)?.hide())});let t=document.querySelector(`.colorpicker`),n=document.querySelector(`.colorpicker-addon`);t&&n&&(t.addEventListener(`input`,()=>n.value=t.value),n.addEventListener(`input`,()=>t.value=n.value)),document.querySelectorAll(`.phone`).forEach(e=>Yu(e,`+0 000 000-00-00-00`)),document.querySelectorAll(`.birthday`).forEach(e=>Yu(e,`00.00.0000`));let r=document.querySelector(`.scrollup`);r&&(window.addEventListener(`scroll`,function(){let e=window.scrollY>200;r.style.opacity=e?`1`:`0`,r.style.pointerEvents=e?`auto`:`none`}),r.addEventListener(`click`,function(){return window.scrollTo({top:0,behavior:`smooth`}),!1})),document.querySelector(`.js-messages-block`)?.addEventListener(`show.bs.dropdown`,function(){getNewMessages()});function i(e){document.documentElement.setAttribute(`data-bs-theme`,e);let t=e===`dark`?`fa-moon`:`fa-sun`,n=document.getElementById(`theme-icon-active`);n&&(n.className=`fa-regular ${t} fa-lg`),Ju({type:`POST`,url:`/ajax/set-theme`,data:{theme:e}})}if(document.querySelectorAll(`[data-bs-theme-value]`).forEach(e=>{e.addEventListener(`click`,()=>i(e.dataset.bsThemeValue))}),window.location.hash){let e=window.location.hash;e===`#comments`&&history.replaceState(null,``,location.pathname+location.search),setTimeout(function(){let t=document.querySelector(e);if(t){let e=Ku();window.scrollTo({top:t.getBoundingClientRect().top+window.scrollY-e,behavior:`instant`})}},100)}else if(new URLSearchParams(location.search).has(`page`)){let e=document.querySelector(`#comments`);e&&setTimeout(function(){let t=Ku();window.scrollTo({top:e.getBoundingClientRect().top+window.scrollY-t,behavior:`instant`})},100)}setTimeout(qu,300),prettyPrint(),tags.init(`.input-tag`,{allowNew:!0,server:`/blogs/tags-search`,liveServer:!0,clearEnd:!0,allowClear:!0,suggestionsThreshold:2,max:10,separator:[`,`],addOnBlur:!0}),fancybox.bind(`[data-fancybox]:not(.fancybox-exclude)`,{});let a=null;document.querySelectorAll(`.f-carousel`).forEach(e=>{let t=fancyCarousel(e,{infinite:!0,adaptiveHeight:!0},fancyCarouselPlugins);t.init(),e.addEventListener(`mouseenter`,()=>a=t),e.addEventListener(`mouseleave`,()=>{a===t&&(a=null)})}),document.addEventListener(`keydown`,e=>{a&&(e.key===`ArrowLeft`?(e.preventDefault(),a.prev()):e.key===`ArrowRight`&&(e.preventDefault(),a.next()))}),document.querySelectorAll(`.slide-thumb-link[data-type="html5video"]`).forEach(e=>{let t=e.querySelector(`video`);if(!t)return;let n=()=>{let n=document.createElement(`canvas`);n.width=t.videoWidth||160,n.height=t.videoHeight||90,n.getContext(`2d`).drawImage(t,0,0,n.width,n.height),e.dataset.thumb=n.toDataURL(`image/jpeg`,.8)};t.readyState>=2?n():t.addEventListener(`loadeddata`,n,{once:!0})})}),window.showAttachForm=function(){let e=document.querySelector(`.js-attach-button`),t=document.querySelector(`.js-attach-form`);return e&&(e.style.display=`none`),t&&(t.style.display=`block`),!1},window.postJump=function(){let e=document.querySelector(`.section-form`);if(e){let t=Ku();window.scrollTo({top:e.getBoundingClientRect().top+window.scrollY-t,behavior:`smooth`})}},window.toggleComment=function(e){let t=document.getElementById(`comment-body-`+e),n=document.getElementById(`comment-expand-`+e),r=document.getElementById(`comment-ctrl-`+e);if(!t)return;let i=t.classList.toggle(`d-none`);if(n&&n.classList.toggle(`d-none`,!i),r){let e=r.querySelector(`i`);e&&(e.className=i?`fa fa-plus`:`fa fa-minus`);let t=r.querySelector(`.comment-thread-line`);t&&t.classList.toggle(`d-none`,i)}},window.openReplyForm=function(e,t){document.querySelectorAll(`.reply-form`).forEach(function(e){e.classList.add(`d-none`)});let n=document.getElementById(`reply-form-`+e);if(!n)return!1;n.classList.remove(`d-none`);let r=n.querySelector(`textarea`),i=r?.id;if(r&&i&&!window._tiptapEditors?.[i])r.classList.add(`tiptap`),Wu(async()=>{let{initEditors:e}=await import(`./tiptap-D6BjJNgN.js`);return{initEditors:e}},[]).then(({initEditors:e})=>{e([r]);let n=window._tiptapEditors?.[i];n?.commands.focus(),t?.(n)});else{let e=window._tiptapEditors?.[i];e?.commands.focus(),t?.(e)}return!1},window.closeReplyForm=function(e){document.getElementById(`reply-form-`+e)?.classList.add(`d-none`)},window.toggleReplyToolbar=function(e){e.closest(`.reply-form`).classList.toggle(`toolbar-visible`)},document.addEventListener(`submit`,function(e){let t=e.target.closest(`.reply-form form`);if(!t)return;e.preventDefault();let n=t.querySelector(`.reply-error`);n&&(n.textContent=``);let r=t.querySelector(`button[type="submit"], button:not([type="button"])`);r&&(r.disabled=!0),fetch(t.action,{method:`POST`,headers:{Accept:`application/json`,"X-Requested-With":`XMLHttpRequest`},body:new FormData(t)}).then(function(e){return e.json().then(function(t){return{ok:e.ok,data:t}})}).then(function({ok:e,data:t}){if(e){let e=t.redirect.includes(`#`)?t.redirect.split(`#`)[1]:``;window.location.hash=e,window.location.reload()}else{let e=Object.values(t.errors||{}).flat().join(`, `);n&&(n.textContent=e),r&&(r.disabled=!1)}}).catch(function(){r&&(r.disabled=!1)})}),document.addEventListener(`click`,function(e){let t=e.target.closest(`.comment-collapse-btn`);if(!t)return;let n=t.dataset.id,r=document.getElementById(`comment-children-`+n);if(!r)return;let i=t.querySelector(`i`);i.className=r.classList.toggle(`d-none`)?`fa fa-plus text-muted`:`fa fa-minus text-muted`}),document.addEventListener(`click`,function(e){let t=e.target.closest(`[data-lang]`);t&&(e.preventDefault(),Ju({url:`/language/`+t.dataset.lang,type:`POST`,success:()=>location.reload()}))}),window.postReply=function(e){postJump();let t=e.closest(`.section`)?.querySelector(`.section-author`),n=t?.dataset.login||t?.textContent.trim();if(!n)return!1;let r=window._tiptapActiveEditor;return r&&(t.matches(`a`)?r.chain().focus(`end`,{scrollIntoView:!1}).insertContent([{type:`mention`,attrs:{id:n,label:n}},{type:`text`,text:` `}]).run():r.chain().focus(`end`,{scrollIntoView:!1}).insertContent({type:`text`,text:n+`, `}).run()),!1};function Xu(e,t,n,r,i){if(!i){n&&e.chain().focus(`end`,{scrollIntoView:!1}).insertContent([{type:`mention`,attrs:{id:n,label:n}},{type:`text`,text:` `}]).run();return}let a=[{type:`blockquote`,attrs:{author:n?(t.matches(`a`)?`@`:``)+n+(r?` `+r:``):r||null},content:[{type:`paragraph`,content:[{type:`text`,text:i}]}]},{type:`paragraph`}];if(e.isEmpty)e.chain().focus(`end`,{scrollIntoView:!1}).setContent({type:`doc`,content:a}).run();else{let t=e.state.doc,n=t.lastChild,r=n&&n.type.name===`paragraph`&&n.childCount===0?t.content.size-n.nodeSize:t.content.size;e.chain().focus(`end`,{scrollIntoView:!1}).insertContentAt(r,a).run()}}window.postQuote=function(e){let t=e.closest(`.comment-item`);if(t){let n=t.dataset.id,r=e.closest(`.comment-right`),i=r?.querySelector(`.section-author`),a=i?.dataset.login||i?.textContent.trim()||null,o=r?.querySelector(`.section-date`),s=(o?.dataset.date||o?.textContent||``).trim(),c=r?.querySelector(`.section-message`)?.cloneNode(!0);c?.querySelectorAll(`blockquote`).forEach(e=>e.remove());let l=c?.textContent.trim()||``;return openReplyForm(n,function(e){e&&Xu(e,i,a,s,l)}),!1}postJump();let n=e.closest(`.section`),r=n?.querySelector(`.section-author`),i=r?.dataset.login||r?.textContent.trim()||null,a=n?.querySelector(`.section-date`),o=(a?.dataset.date||a?.textContent||``).trim(),s=n?.querySelector(`.section-message`)?.cloneNode(!0),c=window._tiptapActiveEditor;return c?(s?.querySelectorAll(`blockquote`).forEach(e=>e.remove()),Xu(c,r,i,o,s?.textContent.trim()||``),!1):!1};var Zu=new WeakSet;window.confirmAction=function(e){let t=e.dataset.confirm||`Вы уверены?`;return Zu.has(e)?(Zu.delete(e),!0):(ed(t,function(t){if(!t)return;let n=e.matches(`form`)?e:e.closest(`form`);if(n)Zu.add(n),n.submit();else{let t=e.getAttribute(`href`);t&&(window.location.href=t)}}),!1)},window.sendComplaint=function(e){return ed(Ws(`confirm_complain_submit`),function(t){t&&Ju({data:{id:e.dataset.id,type:e.dataset.type,page:e.dataset.page},dataType:`json`,type:`post`,url:`/ajax/complaint`,success:function(t){if(!t.success){notyf.error(t.message);return}e.classList.add(`text-muted`,`pe-none`),e.querySelector(`i`).className=`fa fa-check`,notyf.success(Ws(`complain_submitted`))}})}),!1},window.bookmark=function(e){return Ju({data:{tid:e.dataset.tid},dataType:`json`,type:`post`,url:`/forums/bookmarks/perform`,success:function(t){if(!t.success){notyf.error(t.message);return}notyf.success(t.message),e.textContent=t.type===`added`?e.dataset.from:e.dataset.to}}),!1},window.deletePost=function(e){return ed(Ws(`confirm_message_delete`),function(t){t&&Ju({url:e.getAttribute(`href`),type:`delete`,dataType:`json`,success:function(t){t.success?(notyf.success(t.message),e.closest(`.section`).style.display=`none`):notyf.error(t.message)}})}),!1},window.openEditModal=function(e){let t=e.dataset.id,n=e.dataset.url,r=document.getElementById(`editCommentModal`);document.getElementById(`edit-comment-id`).value=t,r.dataset.editUrl=n+`/`+t,r.querySelector(`input[type="file"]`)?.setAttribute(`data-id`,t);let i=document.getElementById(`edit-comment-msg`);i&&(i.dataset.relateId=t);let a=r.querySelector(`.js-files`);a&&(a.innerHTML=``);let o=fetch(n+`/`+t,{headers:{"X-Requested-With":`XMLHttpRequest`,"X-CSRF-TOKEN":Gu}}).then(e=>e.json()).then(e=>{let t=r.querySelector(`form`);return e.files?.forEach(e=>{let n=(t?.querySelector(e.isImage?`.js-image-template`:`.js-file-template`))?.cloneNode(!0);if(n){if(e.isImage)n.querySelector(`img`)?.setAttribute(`src`,e.path);else{let t=n.querySelector(`.js-file-link`);t&&(t.href=e.path,t.textContent=e.name);let r=n.querySelector(`.js-file-size`);r&&(r.textContent=e.size)}n.querySelector(`.js-file-delete`)?.setAttribute(`data-id`,e.id),a?.insertAdjacentHTML(`beforeend`,n.innerHTML)}}),e.text||``}),s=async()=>{r.removeEventListener(`shown.bs.modal`,s);let e=await o;if(!window._tiptapEditors?.[`edit-comment-msg`]&&i){i.classList.add(`tiptap`);let{initEditors:e}=await Wu(async()=>{let{initEditors:e}=await import(`./tiptap-D6BjJNgN.js`);return{initEditors:e}},[]);e([i]),await new Promise(e=>requestAnimationFrame(e))}let t=window._tiptapEditors?.[`edit-comment-msg`];t&&(t.commands.setContent(e,!0),t.resetChanged())};return r.addEventListener(`shown.bs.modal`,s),Sa.getOrCreateInstance(r).show(),!1},document.getElementById(`editCommentModal`)?.addEventListener(`hide.bs.modal`,function(e){let t=window._tiptapEditors?.[`edit-comment-msg`];t?.getIsChanged()&&(e.preventDefault(),window.confirm(Ws(`confirm_discard_changes`))&&(t.resetChanged(),Sa.getInstance(this)?.hide()))}),document.getElementById(`editCommentForm`)?.addEventListener(`submit`,function(e){e.preventDefault();let t=document.getElementById(`editCommentModal`),n=document.getElementById(`edit-comment-id`).value,r=document.getElementById(`edit-comment-msg`).value,i=t?.dataset.editUrl;Ju({data:{msg:r},dataType:`json`,type:`patch`,url:i,success:function(e){e.success?(Sa.getInstance(t)?.hide(),window.location.hash=`#comment_`+n,window.location.reload()):notyf.error(e.message)}})}),window.deleteComment=function(e){let t=e.closest(`.comment-item, .section`);return ed(Ws(`confirm_message_delete`),function(n){n&&Ju({dataType:`json`,type:`delete`,url:`/comments/`+e.dataset.id,success:function(e){if(e.success){if(notyf.success(Ws(`message_deleted`)),t){let e=t.querySelector(`.comment-content`);e&&(e.innerHTML=`<div class="comment-removed text-muted fst-italic small mb-2">`+Ws(`comment_removed`)+`</div>`)}}else notyf.error(e.message)}})}),!1},window.changeRating=function(e){return Ju({data:{id:e.dataset.id,type:e.dataset.type,vote:e.dataset.vote},dataType:`json`,type:`post`,url:`/ajax/rating`,success:function(t){if(t.success){let n=e.closest(`.js-rating`);n?.querySelectorAll(`a`).forEach(e=>e.classList.remove(`active`)),t.cancel||e.classList.add(`active`);let r=n?.querySelector(`.rating-value`);r&&(r.innerHTML=t.rating)}else t.message&&notyf.error(t.message)}}),!1},window.deleteRating=function(e){return ed(Ws(`confirm_message_delete`),function(t){t&&Ju({data:{id:e.dataset.id},dataType:`json`,type:`post`,url:`/ratings/delete`,success:t=>{t.success?(notyf.success(Ws(`record_deleted`)),e.closest(`.section`).style.display=`none`):notyf.error(t.message)}})}),!1},window.deleteSpam=function(e){return Ju({data:{id:e.dataset.id},dataType:`json`,type:`post`,url:`/admin/spam/delete`,success:function(t){t.success?(notyf.success(Ws(`record_deleted`)),e.closest(`.section`).style.display=`none`):notyf.error(t.message)}}),!1},window.deleteWall=function(e){return ed(Ws(`confirm_message_delete`),function(t){t&&Ju({data:{id:e.dataset.id,login:e.dataset.login},dataType:`json`,type:`post`,url:`/walls/`+e.dataset.login+`/delete`,success:function(t){t.success?(notyf.success(Ws(`record_deleted`)),e.closest(`.section`).style.display=`none`):notyf.error(t.message)}})}),!1},window.copyToClipboard=function(e){let t=e.closest(`.input-group`)??e.parentElement,n=t?.querySelector(`input, textarea`),r=e.dataset.copy??n?.value??``,i=()=>{if(n){n.select(),document.execCommand(`copy`);return}if(!r)return;let e=document.createElement(`textarea`);e.value=r,e.style.position=`fixed`,e.style.opacity=`0`,document.body.appendChild(e),e.select();try{document.execCommand(`copy`)}catch{}document.body.removeChild(e)};navigator.clipboard?.writeText&&r?navigator.clipboard.writeText(r).catch(i):i();let a=e.querySelector(`i`);if(a&&!a.dataset.copyReset){let e=a.className;a.dataset.copyReset=`1`,a.className=`fas fa-check`,setTimeout(()=>{a.className=e,delete a.dataset.copyReset},1500)}let o=t?.querySelector(`.input-group-text`)??(e.matches(`[data-bs-toggle="tooltip"]`)?e:null);if(o){let e=o.getAttribute(`data-bs-original-title`)??o.getAttribute(`title`),t=Do.getOrCreateInstance(o);o.setAttribute(`data-bs-original-title`,Ws(`copied`)),t.update(),t.show(),e!==null&&setTimeout(()=>{o.setAttribute(`data-bs-original-title`,e),t.update()},1500)}return!1},window.submitFile=function(e){let t=new FormData;t.append(`file`,e.files[0]),t.append(`id`,e.dataset.id),t.append(`type`,e.dataset.type);let n=e.closest(`form`)??document,r=n.querySelector(`.js-files`);return Ju({data:t,type:`post`,dataType:`json`,url:`/ajax/file/upload`,beforeSend:()=>r?.insertAdjacentHTML(`beforeend`,`<i class="fas fa-spinner fa-spin fa-3x mx-3"></i>`),complete:()=>r?.querySelectorAll(`.fa-spinner`).forEach(e=>e.remove()),success:function(e){if(!e.success){notyf.error(e.message);return}let t=e.type===`image`||e.type===`video`,i=n.querySelector(t?`.js-image-template`:`.js-file-template`)?.cloneNode(!0);if(e.type===`image`)i?.querySelector(`img`)?.setAttribute(`src`,e.path);else if(e.type===`video`){let t=i?.querySelector(`img`);if(t){let n=t.parentElement,r=document.createElement(`video`);r.src=e.path,r.className=t.className,r.preload=`metadata`,t.replaceWith(r),n?.insertAdjacentHTML(`beforeend`,`<span class="slide-play-icon">▶</span>`)}}else{let t=i?.querySelector(`.js-file-link`);t&&(t.href=e.path,t.textContent=e.name);let n=i?.querySelector(`.js-file-size`);n&&(n.textContent=e.size)}i?.querySelector(`a`)?.setAttribute(`data-id`,e.id),i&&r?.insertAdjacentHTML(`beforeend`,i.innerHTML)},error:(e,t)=>notyf.error(`Ошибка загрузки файла: `+t)}),e.value=``,!1},window.cutMedia=function(e){if(!e)return;let t=window._tiptapActiveEditor;if(!t)return;let n=e=>{try{return new URL(e).pathname}catch{return e}},r=n(e),{state:i,dispatch:a}=t.view,o=i.tr,s=[];i.doc.descendants(function(e,t){let i=e.attrs.src??e.attrs.href;[`image`,`video`].includes(e.type.name)&&n(i)===r&&s.push({pos:t,size:e.nodeSize})}),s.reverse().forEach(({pos:e,size:t})=>o.delete(e,e+t)),o.docChanged&&a(o)},window.deleteFile=function(e){return ed(Ws(`confirm_file_delete`),function(t){t&&Ju({url:`/ajax/file/delete`,type:`POST`,dataType:`json`,data:{id:e.dataset.id,type:e.dataset.type},success:function(t){if(!t.success){notyf.error(t.message);return}t.path&&cutMedia(t.path),e.closest(`.js-file`).style.display=`none`},error:(e,t)=>notyf.error(`Ошибка удаления файла: `+t)})}),!1},window.resendingCode=function(){let e=document.querySelector(`.js-resending-link`),t=document.querySelector(`.js-resending-form`);return e&&(e.style.display=`none`),t&&(t.style.display=`block`),!1},window.showQueries=function(){let e=document.querySelector(`.js-queries`);e&&(e.style.display=getComputedStyle(e).display===`none`?``:`none`)},window.updateMessageCount=function(e){let t=JSON.parse(localStorage.getItem(`messageData`)||`{}`);t.countMessages=parseInt(e)||0,localStorage.setItem(`messageData`,JSON.stringify(t)),localStorage.setItem(`messageCount`,e),window.dispatchEvent(new Event(`storage`))},window.getNewMessages=function(){let e=document.querySelector(`.js-messages-block .app-nav__item`),t=e?.querySelector(`.badge`),n=document.querySelector(`.app-notification__title span`),r=document.querySelector(`.js-messages-block .js-messages`);return Ju({dataType:`json`,type:`GET`,url:`/messages/new`,beforeSend:()=>r?.insertAdjacentHTML(`beforeend`,`<li class="js-message-spin text-center"><i class="fas fa-spinner fa-spin fa-2x my-2"></i></li>`),complete:()=>r?.querySelectorAll(`.js-message-spin`).forEach(e=>e.remove()),success(i){if(!i?.success){t?.remove(),n&&(n.textContent=0);return}let a=i.countMessages;if(t)t.textContent=a;else if(e){let t=document.createElement(`span`);t.className=`badge bg-notify`,t.textContent=a,e.append(t)}updateMessageCount(a),n&&(n.textContent=a),r&&(r.innerHTML=``,r.insertAdjacentHTML(`beforeend`,i.dialogues))}}),!1},window.initSlideMainImage=function(e){let t=e.getAttribute(`href`),n=e.closest(`.media-file`);n?.querySelectorAll(`.slide-thumb-link`).forEach(e=>e.classList.remove(`fancybox-exclude`)),n?.querySelectorAll(`.slide-thumb-link[href="${t}"]`).forEach(e=>e.classList.add(`fancybox-exclude`))},window.initSlideThumbImage=function(e){let t=e.getAttribute(`href`),n=e.dataset.type===`html5video`,r=e.dataset.fancybox??``,i=e.closest(`.media-file`),a=i?.querySelector(`.slide-main-inner`);return!a||e.querySelector(`.slide-thumb-image, .slide-thumb-video`)?.classList.contains(`active`)?!1:(a.querySelector(`video`)?.pause(),n?a.innerHTML=`<video src="${t}" class="img-fluid rounded" controls preload="metadata"></video>`:a.innerHTML=`<a href="${t}" class="slide-main-link" data-fancybox="${r}" onclick="return initSlideMainImage(this)"><img src="${t}" alt="${(e.querySelector(`img`)?.getAttribute(`alt`)??``).replace(/"/g,`&quot;`)}" class="img-fluid rounded slide-main-img"></a>`,i?.querySelectorAll(`.slide-thumb-image`).forEach(e=>e.classList.remove(`active`)),i?.querySelectorAll(`.slide-thumb-video`).forEach(e=>e.classList.remove(`active`)),e.querySelector(`.slide-thumb-image, .slide-thumb-video`)?.classList.add(`active`),!1)};var Qu;window.checkLogin=function(e){let t=e.closest(`.mb-3`),n=t?.querySelector(`.invalid-feedback`),r=e.value.trim();if(r.length<3){t?.classList.remove(`is-valid`,`is-invalid`),n&&(n.textContent=``);return}return clearTimeout(Qu),Qu=setTimeout(function(){Ju({url:`/check-login`,type:`POST`,dataType:`json`,data:{login:r},success:e=>{t?.classList.toggle(`is-valid`,e.success),t?.classList.toggle(`is-invalid`,!e.success),n&&(n.textContent=e.success?``:e.message)},error:()=>{t?.classList.remove(`is-valid`),t?.classList.add(`is-invalid`)}})},1e3),!1};var $u=document.createElement(`dialog`);$u.className=`confirm-dialog`,$u.innerHTML=`
<p class="confirm-message"></p>
<div class="confirm-footer">
    <button type="button" class="btn btn-secondary btn-sm js-confirm-cancel"></button>
    <button type="button" class="btn btn-primary btn-sm js-confirm-ok"></button>
</div>`,document.body.appendChild($u);function ed(e,t){$u.querySelector(`.confirm-message`).textContent=e,$u.querySelector(`.js-confirm-ok`).textContent=Ws(`buttons.ok`),$u.querySelector(`.js-confirm-cancel`).textContent=Ws(`buttons.cancel`),$u.querySelector(`.js-confirm-ok`).onclick=()=>{$u.close(),t(!0)},$u.querySelector(`.js-confirm-cancel`).onclick=()=>{$u.close(),t(!1)},$u.showModal()}var td=document.getElementById(`feed-container`),nd=document.getElementById(`feed-sentinel`);if(td&&nd){let e=!1,t=()=>{let e=td.querySelectorAll(`.feed-pagination`);return e[e.length-1]?.dataset.next||``},n=document.createElement(`div`);n.className=`feed-loader d-none`,n.innerHTML=`<span></span><span></span><span></span><span></span><span></span>`,nd.before(n);let r=()=>{let i=document.createElement(`button`);return i.type=`button`,i.className=`btn btn-primary d-block mx-auto my-3`,i.textContent=Ws(`buttons.load_more`),i.addEventListener(`click`,async()=>{let a=t();if(!(!a||e)){e=!0,i.remove(),n.classList.remove(`d-none`);try{let e=await(await fetch(a,{headers:{"X-Requested-With":`XMLHttpRequest`}})).text(),i=document.createElement(`div`);if(i.innerHTML=e,i.querySelector(`.feed-pagination`)?.dataset.empty===`1`)return;td.append(...i.children),setTimeout(qu,100),t()&&n.before(r())}finally{e=!1,n.classList.add(`d-none`)}}}),i};t()&&n.before(r())}export{ki as n,Ws as t};
Онлайн: 2
Реклама