"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1583],{91583:function(e,t,n){n.d(t,{Z:function(){return useEmblaCarousel}});var r=n(67294);function isRecord(e){return"[object Object]"===Object.prototype.toString.call(e)||Array.isArray(e)}function areOptionsEqual(e,t){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;let i=JSON.stringify(Object.keys(e.breakpoints||{})),o=JSON.stringify(Object.keys(t.breakpoints||{}));return i===o&&n.every(n=>{let r=e[n],i=t[n];return"function"==typeof r?`${r}`==`${i}`:isRecord(r)&&isRecord(i)?areOptionsEqual(r,i):r===i})}function sortAndMapPluginToOptions(e){return e.concat().sort((e,t)=>e.name>t.name?1:-1).map(e=>e.options)}function isNumber(e){return"number"==typeof e}function isString(e){return"string"==typeof e}function isBoolean(e){return"boolean"==typeof e}function embla_carousel_esm_isObject(e){return"[object Object]"===Object.prototype.toString.call(e)}function mathAbs(e){return Math.abs(e)}function mathSign(e){return Math.sign(e)}function arrayKeys(e){return objectKeys(e).map(Number)}function arrayLast(e){return e[arrayLastIndex(e)]}function arrayLastIndex(e){return Math.max(0,e.length-1)}function arrayFromNumber(e,t=0){return Array.from(Array(e),(e,n)=>t+n)}function objectKeys(e){return Object.keys(e)}function isMouseEvent(e,t){return void 0!==t.MouseEvent&&e instanceof t.MouseEvent}function Limit(e,t){let n=mathAbs(e-t);function reachedAny(n){return n<e||n>t}return{length:n,max:t,min:e,constrain:function(n){return reachedAny(n)?n<e?e:t:n},reachedAny,reachedMax:function(e){return e>t},reachedMin:function(t){return t<e},removeOffset:function(e){return n?e-n*Math.ceil((e-t)/n):e}}}function EventStore(){let e=[],t={add:function(n,r,i,o={passive:!0}){let a;return"addEventListener"in n?(n.addEventListener(r,i,o),a=()=>n.removeEventListener(r,i,o)):(n.addListener(i),a=()=>n.removeListener(i)),e.push(a),t},clear:function(){e=e.filter(e=>e())}};return t}function Vector1D(e){let t=e;function normalizeInput(e){return isNumber(e)?e:e.get()}return{get:function(){return t},set:function(e){t=normalizeInput(e)},add:function(e){t+=normalizeInput(e)},subtract:function(e){t-=normalizeInput(e)}}}function Translate(e,t,n){let r="x"===e.scroll?function(e){return`translate3d(${e}px,0px,0px)`}:function(e){return`translate3d(0px,${e}px,0px)`},i=n.style,o=!1;return{clear:function(){o||(i.transform="",n.getAttribute("style")||n.removeAttribute("style"))},to:function(e){o||(i.transform=r(t.apply(e)))},toggleActive:function(e){o=!e}}}let i={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0};function EmblaCarousel(e,t,n){let r,o,a,u,c;let s=e.ownerDocument,l=s.defaultView,d=function(e){function mergeOptions(e,t){return function objectsMergeDeep(e,t){return[e,t].reduce((e,t)=>(objectKeys(t).forEach(n=>{let r=e[n],i=t[n],o=embla_carousel_esm_isObject(r)&&embla_carousel_esm_isObject(i);e[n]=o?objectsMergeDeep(r,i):i}),e),{})}(e,t||{})}return{mergeOptions,optionsAtMedia:function(t){let n=t.breakpoints||{},r=objectKeys(n).filter(t=>e.matchMedia(t).matches).map(e=>n[e]).reduce((e,t)=>mergeOptions(e,t),{});return mergeOptions(t,r)},optionsMediaQueries:function(t){return t.map(e=>objectKeys(e.breakpoints||{})).reduce((e,t)=>e.concat(t),[]).map(e.matchMedia)}}}(l),f=(c=[],{init:function(e,t){return(c=t.filter(({options:e})=>!1!==d.optionsAtMedia(e).active)).forEach(t=>t.init(e,d)),t.reduce((e,t)=>Object.assign(e,{[t.name]:t}),{})},destroy:function(){c=c.filter(e=>e.destroy())}}),m=EventStore(),p=EventStore(),g=function(){let e;let t={},n={init:function(t){e=t},emit:function(r){return(t[r]||[]).forEach(t=>t(e,r)),n},off:function(e,r){return t[e]=(t[e]||[]).filter(e=>e!==r),n},on:function(e,r){return t[e]=(t[e]||[]).concat([r]),n}};return n}(),{animationRealms:b}=EmblaCarousel,{mergeOptions:h,optionsAtMedia:y,optionsMediaQueries:v}=d,{on:S,off:A,emit:E}=g,x=!1,L=h(i,EmblaCarousel.globalOptions),w=h(L),O=[];function activate(t,n){if(x)return;let i=b.find(e=>e.window===l),c=i||function(e){let t=1e3/60,n=[],r=null,i=0,o=0;function animate(a){r||(r=a);let u=a-r;for(r=a,i+=u;i>=t;)n.forEach(({animation:e})=>e.update()),i-=t;let c=mathAbs(i/t);n.forEach(({animation:e})=>e.render(c)),o&&e.requestAnimationFrame(animate)}return{start:function(t){n.includes(t)||n.push(t),o||(o=e.requestAnimationFrame(animate))},stop:function(t){(n=n.filter(e=>e!==t)).length||(e.cancelAnimationFrame(o),r=null,i=0,o=0)},reset:function(){r=null,i=0},window:e}}(l);i||b.push(c),w=y(L=h(L,t)),O=n||O,function(){let{container:t,slides:n}=w,r=isString(t)?e.querySelector(t):t;a=r||e.children[0];let i=isString(n)?a.querySelectorAll(n):n;u=[].slice.call(i||a.children)}(),r=function createEngine(t,n){let r=function(e,t,n,r,i,o,a,u){let c,s;let{align:l,axis:d,direction:f,startIndex:m,loop:p,duration:g,dragFree:b,dragThreshold:h,inViewThreshold:y,slidesToScroll:v,skipSnaps:S,containScroll:A,watchResize:E,watchSlides:x,watchDrag:L}=o,w=t.getBoundingClientRect(),O=n.map(e=>e.getBoundingClientRect()),I=function(e){let t="rtl"===e?-1:1;return{apply:function(e){return e*t}}}(f),D=function(e,t){let n="y"===e?"y":"x";return{scroll:n,cross:"y"===e?"x":"y",startEdge:"y"===n?"top":"rtl"===t?"right":"left",endEdge:"y"===n?"bottom":"rtl"===t?"left":"right",measureSize:function(e){let{width:t,height:r}=e;return"x"===n?t:r}}}(d,f),T=D.measureSize(w),P={measure:function(e){return T*(e/100)}},M=function(e,t){let n={start:function(){return 0},center:function(e){return(t-e)/2},end:function(e){return t-e}};return{measure:function(r){return isNumber(e)?t*Number(e):n[e](r)}}}(l,T),k=!p&&!!A,j=p||!!A,{slideSizes:F,slideSizesWithGaps:C,startGap:N,endGap:z}=function(e,t,n,r,i,o){let{measureSize:a,startEdge:u,endEdge:c}=e,s=n[0]&&i,l=function(){if(!s)return 0;let e=n[0];return mathAbs(t[u]-e[u])}(),d=function(){if(!s)return 0;let e=o.getComputedStyle(arrayLast(r));return parseFloat(e.getPropertyValue(`margin-${c}`))}(),f=n.map(a),m=n.map((e,t,n)=>{let r=t===arrayLastIndex(n);return t?r?f[t]+d:n[t+1][u]-e[u]:f[t]+l}).map(mathAbs);return{slideSizes:f,slideSizesWithGaps:m,startGap:l,endGap:d}}(D,w,O,n,j,i),V=function(e,t,n,r,i,o,a,u,c){let{startEdge:s,endEdge:l}=e,d=isNumber(r);return{groupSlides:function(e){return d?arrayKeys(e).filter(e=>e%r==0).map(t=>e.slice(t,t+r)):e.length?arrayKeys(e).reduce((r,d)=>{let f=arrayLast(r)||0,m=d===arrayLastIndex(e),p=o[s]-a[f][s],g=o[s]-a[d][l],b=i||0!==f?0:t.apply(u),h=!i&&m?t.apply(c):0,y=mathAbs(g-h-(p+b));return y>n&&r.push(d),m&&r.push(e.length),r},[]).map((t,n,r)=>{let i=Math.max(r[n-1]||0);return e.slice(i,t)}):[]}}}(D,I,T,v,p,w,O,N,z),{snaps:B,snapsAligned:_}=function(e,t,n,r,i){let{startEdge:o,endEdge:a}=e,{groupSlides:u}=i,c=u(r).map(e=>arrayLast(e)[a]-e[0][o]).map(mathAbs).map(t.measure),s=r.map(e=>n[o]-e[o]).map(e=>-mathAbs(e)),l=u(s).map(e=>e[0]).map((e,t)=>e+c[t]);return{snaps:s,snapsAligned:l}}(D,M,w,O,V),K=-arrayLast(B)+arrayLast(C),{snapsContained:R,scrollContainLimit:H}=function(e,t,n,r){let i=Limit(-t+e,0),o=n.map(i.constrain).map(e=>parseFloat(e.toFixed(3))),a=function(){let e=o[0],t=arrayLast(o),n=o.lastIndexOf(e),r=o.indexOf(t)+1;return Limit(n,r)}(),u=function(){if(t<=e)return[i.max];if("keepSnaps"===r)return o;let{min:n,max:u}=a;return o.slice(n,u)}();return{snapsContained:u,scrollContainLimit:a}}(T,K,_,A),q=k?R:_,{limit:$}=function(e,t,n){let r=t[0],i=n?r-e:arrayLast(t),o=Limit(i,r);return{limit:o}}(K,q,p),U=function Counter(e,t,n){let{constrain:r}=Limit(0,e),i=e+1,o=withinLimit(t);function withinLimit(e){return n?mathAbs((i+e)%i):r(e)}function clone(){return Counter(e,o,n)}let a={get:function(){return o},set:function(e){return o=withinLimit(e),a},add:function(e){return clone().set(o+e)},clone};return a}(arrayLastIndex(q),m,p),G=U.clone(),J=arrayKeys(n),update=({dragHandler:e,scrollBody:t,scrollBounds:n,eventHandler:r,animation:i,options:{loop:o}})=>{let a=e.pointerDown();o||n.constrain(a);let u=t.seek().settled();u&&!a&&(i.stop(),r.emit("settle")),u||r.emit("scroll")},render=({scrollBody:e,translate:t,location:n,offsetLocation:r,scrollLooper:i,slideLooper:o,options:{loop:a}},u)=>{let c=e.velocity();r.set(n.get()-c+c*u),a&&(i.loop(e.direction()),o.loop()),t.to(r.get())},X={start:()=>u.start(ec),stop:()=>u.stop(ec),update:()=>update(ec),render:e=>render(ec,e)},Q=q[U.get()],Y=Vector1D(Q),Z=Vector1D(Q),W=Vector1D(Q),ee=function(e,t,n,r){let i=!0,o=0,a=0,u=n,c=r,s=e.get(),l=0;function useDuration(e){return u=e,d}function useFriction(e){return c=e,d}let d={direction:function(){return a},duration:function(){return u},velocity:function(){return o},seek:function(){let n=t.get()-e.get(),r=!u,f=0;return r?(o=0,e.set(t),f=n):(o+=n/u,o*=c,s+=o,e.add(o),f=s-l),a=mathSign(f),l=s,i=.001>mathAbs(n),d},settled:function(){return i},useBaseFriction:function(){return useFriction(r)},useBaseDuration:function(){return useDuration(n)},useFriction,useDuration};return d}(Y,W,g,.68),et=function(e,t,n,r,i){let{reachedAny:o,removeOffset:a,constrain:u}=r;function minDistance(e){return e.concat().sort((e,t)=>mathAbs(e)-mathAbs(t))[0]}function shortcut(t,r){let i=[t,t+n,t-n];if(!e)return i[0];if(!r)return minDistance(i);let o=i.filter(e=>mathSign(e)===r);return o.length?minDistance(o):arrayLast(i)-n}return{byDistance:function(n,r){let c=i.get()+n,{index:s,distance:l}=function(n){let r=e?a(n):u(n),i=t.map(e=>e-r).map(e=>shortcut(e,0)).map((e,t)=>({diff:e,index:t})).sort((e,t)=>mathAbs(e.diff)-mathAbs(t.diff)),{index:o}=i[0];return{index:o,distance:r}}(c),d=!e&&o(c);if(!r||d)return{index:s,distance:n};let f=t[s]-l,m=n+shortcut(f,0);return{index:s,distance:m}},byIndex:function(e,n){let r=t[e]-i.get(),o=shortcut(r,n);return{index:e,distance:o}},shortcut}}(p,q,K,$,W),en=function(e,t,n,r,i,o,a){function scrollTo(r){let u=r.distance,c=r.index!==t.get();o.add(u),u&&(i.duration()?e.start():(e.update(),e.render(1),e.update())),c&&(n.set(t.get()),t.set(r.index),a.emit("select"))}return{distance:function(e,t){let n=r.byDistance(e,t);scrollTo(n)},index:function(e,n){let i=t.clone().set(e),o=r.byIndex(i.get(),n);scrollTo(o)}}}(X,U,G,et,ee,W,a),er=function(e){let{max:t,length:n}=e;return{get:function(e){return n?-((e-t)/n):0}}}($),ei=EventStore(),eo=function(e,t,n,r){let i;let o={},a=null,u=null,c=!1;return{init:function(){i=new IntersectionObserver(e=>{c||(e.forEach(e=>{let n=t.indexOf(e.target);o[n]=e}),a=null,u=null,n.emit("slidesInView"))},{root:e.parentElement,threshold:r}),t.forEach(e=>i.observe(e))},destroy:function(){i&&i.disconnect(),c=!0},get:function(e=!0){if(e&&a)return a;if(!e&&u)return u;let t=objectKeys(o).reduce((t,n)=>{let r=parseInt(n),{isIntersecting:i}=o[r];return(e&&i||!e&&!i)&&t.push(r),t},[]);return e&&(a=t),e||(u=t),t}}}(t,n,a,y),{slideRegistry:ea}=function(e,t,n,r,i,o){let{groupSlides:a}=i,{min:u,max:c}=r,s=function(){let r=a(o);return!n||t<=e?r:r.slice(u,c).map((e,t,n)=>{let r=!t,i=!r&&t===arrayLastIndex(n);if(r){let e=arrayLast(n[0])+1;return arrayFromNumber(e)}if(i){let e=arrayLastIndex(o)-arrayLast(n)[0]+1;return arrayFromNumber(e,arrayLast(n)[0])}return e})}();return{slideRegistry:s}}(T,K,k,H,V,J),eu=function(e,t,n,r,i,o){let a=0;function registerTabPress(e){"Tab"===e.code&&(a=new Date().getTime())}function addSlideFocusEvent(u){o.add(u,"focus",()=>{let o=new Date().getTime(),c=o-a;if(c>10)return;e.scrollLeft=0;let s=t.indexOf(u),l=n.findIndex(e=>e.includes(s));isNumber(l)&&(i.useDuration(0),r.index(l,0))},{passive:!0,capture:!0})}return{init:function(){o.add(document,"keydown",registerTabPress,!1),t.forEach(addSlideFocusEvent)}}}(e,n,ea,en,ee,ei),ec={ownerDocument:r,ownerWindow:i,eventHandler:a,containerRect:w,slideRects:O,animation:X,axis:D,direction:I,dragHandler:function(e,t,n,r,i,o,a,u,c,s,l,d,f,m,p,g,b,h,y,v){let{cross:S}=e,A=["INPUT","SELECT","TEXTAREA"],E={passive:!1},x=EventStore(),L=EventStore(),w=Limit(50,225).constrain(p.measure(20)),O={mouse:300,touch:400},I={mouse:500,touch:600},D=g?43:25,T=!1,P=0,M=0,k=!1,j=!1,F=!1,C=!1;function move(e){let n=a.readPoint(e),r=a.readPoint(e,S),i=mathAbs(n-P),u=mathAbs(r-M);if(!j&&!C&&(!e.cancelable||!(j=i>u)))return up(e);let s=a.pointerMove(e);i>b&&(F=!0),l.useFriction(.3).useDuration(1),c.start(),o.add(t.apply(s)),e.preventDefault()}function up(e){let n=d.byDistance(0,!1),r=n.index!==f.get(),i=a.pointerUp(e)*function(){let e=g?I:O,t=C?"mouse":"touch";return e[t]}(),o=function(e,t){let n=f.add(-1*mathSign(e)),r=d.byDistance(e,!g).distance;return g||mathAbs(e)<w?r:h&&t?.5*r:d.byIndex(n.get(),0).distance}(t.apply(i),r),u=function(e,t){var n,r;if(0===e||0===t||mathAbs(e)<=mathAbs(t))return 0;let i=(n=mathAbs(e),r=mathAbs(t),mathAbs(n-r));return mathAbs(i/e)}(i,o);j=!1,k=!1,L.clear(),l.useDuration(D-10*u).useFriction(.68+u/50),s.distance(o,!g),C=!1,m.emit("pointerUp")}function click(e){F&&(e.stopPropagation(),e.preventDefault())}return{init:function(e){v&&x.add(n,"dragstart",e=>e.preventDefault(),E).add(n,"touchmove",()=>void 0,E).add(n,"touchend",()=>void 0).add(n,"touchstart",downIfAllowed).add(n,"mousedown",downIfAllowed).add(n,"touchcancel",up).add(n,"contextmenu",up).add(n,"click",click,!0);function downIfAllowed(t){(isBoolean(v)||v(e,t))&&function(e){let t=isMouseEvent(e,i);C=t,(!t||0===e.button)&&!function(e){let t=e.nodeName||"";return A.includes(t)}(e.target)&&(F=g&&t&&!e.buttons&&T,T=mathAbs(o.get()-u.get())>=2,k=!0,a.pointerDown(e),l.useFriction(0).useDuration(0),o.set(u),function(){let e=C?r:n;L.add(e,"touchmove",move,E).add(e,"touchend",up).add(e,"mousemove",move,E).add(e,"mouseup",up)}(),P=a.readPoint(e),M=a.readPoint(e,S),m.emit("pointerDown"))}(t)}},pointerDown:function(){return k},destroy:function(){x.clear(),L.clear()}}}(D,I,e,r,i,W,function(e,t){let n,r;function readTime(e){return e.timeStamp}function readPoint(n,r){let i=r||e.scroll,o=`client${"x"===i?"X":"Y"}`;return(isMouseEvent(n,t)?n:n.touches[0])[o]}return{pointerDown:function(e){return n=e,r=e,readPoint(e)},pointerMove:function(e){let t=readPoint(e)-readPoint(r),i=readTime(e)-readTime(n)>170;return r=e,i&&(n=e),t},pointerUp:function(e){if(!n||!r)return 0;let t=readPoint(r)-readPoint(n),i=readTime(e)-readTime(n),o=readTime(e)-readTime(r)>170,a=t/i,u=i&&!o&&mathAbs(a)>.1;return u?a:0},readPoint}}(D,i),Y,X,en,ee,et,U,a,P,b,h,S,0,L),eventStore:ei,percentOfView:P,index:U,indexPrevious:G,limit:$,location:Y,offsetLocation:Z,options:o,resizeHandler:function(e,t,n,r,i,o){let a,u;let c=[],s=!1;function readSize(e){return i.measureSize(e.getBoundingClientRect())}return{init:function(i){if(!o)return;u=readSize(e),c=r.map(readSize),a=new ResizeObserver(a=>{!s&&(isBoolean(o)||o(i,a))&&function(o){for(let a of o){let o=a.target===e,s=r.indexOf(a.target),l=o?u:c[s],d=readSize(o?e:r[s]),f=mathAbs(d-l);if(f>=.2){n.requestAnimationFrame(()=>{i.reInit(),t.emit("resize")});break}}}(a)});let l=[e].concat(r);l.forEach(e=>a.observe(e))},destroy:function(){a&&a.disconnect(),s=!0}}}(t,a,i,n,D,E),scrollBody:ee,scrollBounds:function(e,t,n,r,i){let o=i.measure(10),a=i.measure(50),u=Limit(.1,.99),c=!1;return{constrain:function(i){if(!(!c&&e.reachedAny(n.get())&&e.reachedAny(t.get())))return;let s=e.reachedMin(t.get())?"min":"max",l=mathAbs(e[s]-t.get()),d=n.get()-t.get(),f=u.constrain(l/a);n.subtract(d*f),!i&&mathAbs(d)<o&&(n.set(e.constrain(n.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(e){c=!e}}}($,Y,W,ee,P),scrollLooper:function(e,t,n,r){let i=t.min+.1,o=t.max+.1,{reachedMin:a,reachedMax:u}=Limit(i,o);return{loop:function(t){if(!(1===t?u(n.get()):-1===t&&a(n.get())))return;let i=e*(-1*t);r.forEach(e=>e.add(i))}}}(K,$,Z,[Y,Z,W]),scrollProgress:er,scrollSnapList:q.map(er.get),scrollSnaps:q,scrollTarget:et,scrollTo:en,slideLooper:function(e,t,n,r,i,o,a,u,c,s){let l=arrayKeys(o),d=arrayKeys(o).reverse(),f=(function(){let e=u[0]-1,t=slidesInGap(d,e);return findLoopPoints(t,r,!1)})().concat(function(){let e=n-u[0]-1,t=slidesInGap(l,e);return findLoopPoints(t,-r,!0)}());function removeSlideSizes(e,t){return e.reduce((e,t)=>e-o[t],t)}function slidesInGap(e,t){return e.reduce((e,n)=>{let r=removeSlideSizes(e,t);return r>0?e.concat([n]):e},[])}function findLoopPoints(o,u,l){let d=a.map((e,t)=>({start:e-i[t]+.5+u,end:e+n-.5+u}));return o.map(n=>{let i=l?0:-r,o=l?r:0,a=d[n][l?"end":"start"];return{index:n,slideLocation:Vector1D(-1),translate:Translate(e,t,s[n]),target:()=>c.get()>a?i:o}})}return{canLoop:function(){return f.every(({index:e})=>{let t=l.filter(t=>t!==e);return .1>=removeSlideSizes(t,n)})},clear:function(){f.forEach(e=>e.translate.clear())},loop:function(){f.forEach(e=>{let{target:t,translate:n,slideLocation:r}=e,i=t();i!==r.get()&&(n.to(i),r.set(i))})},loopPoints:f}}(D,I,T,K,F,C,B,q,Z,n),slideFocus:eu,slidesHandler:(s=!1,{init:function(e){x&&(c=new MutationObserver(t=>{!s&&(isBoolean(x)||x(e,t))&&function(t){for(let n of t)if("childList"===n.type){e.reInit(),a.emit("slidesChanged");break}}(t)})).observe(t,{childList:!0})},destroy:function(){c&&c.disconnect(),s=!0}}),slidesInView:eo,slideIndexes:J,slideRegistry:ea,slidesToScroll:V,target:W,translate:Translate(D,I,t)};return ec}(e,a,u,s,l,t,g,n);if(t.loop&&!r.slideLooper.canLoop()){let e=Object.assign({},t,{loop:!1});return createEngine(e,n)}return r}(w,c),v([L,...O.map(({options:e})=>e)]).forEach(e=>m.add(e,"change",reActivate)),w.active&&(r.translate.to(r.location.get()),r.slidesInView.init(),r.slideFocus.init(),r.eventHandler.init(I),r.resizeHandler.init(I),r.slidesHandler.init(I),p.add(s,"visibilitychange",()=>{s.hidden&&c.reset()}),r.options.loop&&r.slideLooper.loop(),a.offsetParent&&u.length&&r.dragHandler.init(I),o=f.init(I,O))}function reActivate(e,t){let n=selectedScrollSnap();deActivate(),activate(h({startIndex:n},e),t),g.emit("reInit")}function deActivate(){r.dragHandler.destroy(),r.animation.stop(),r.eventStore.clear(),r.translate.clear(),r.slideLooper.clear(),r.resizeHandler.destroy(),r.slidesHandler.destroy(),f.destroy(),m.clear(),p.clear()}function scrollTo(e,t,n){w.active&&!x&&(r.scrollBody.useBaseFriction().useDuration(t?0:w.duration),r.scrollTo.index(e,n||0))}function selectedScrollSnap(){return r.index.get()}let I={canScrollNext:function(){let e=r.index.add(1).get();return e!==selectedScrollSnap()},canScrollPrev:function(){let e=r.index.add(-1).get();return e!==selectedScrollSnap()},containerNode:function(){return a},internalEngine:function(){return r},destroy:function(){x||(x=!0,m.clear(),deActivate(),g.emit("destroy"))},off:A,on:S,emit:E,plugins:function(){return o},previousScrollSnap:function(){return r.indexPrevious.get()},reInit:reActivate,rootNode:function(){return e},scrollNext:function(e){let t=r.index.add(1).get();scrollTo(t,!0===e,-1)},scrollPrev:function(e){let t=r.index.add(-1).get();scrollTo(t,!0===e,1)},scrollProgress:function(){return r.scrollProgress.get(r.location.get())},scrollSnapList:function(){return r.scrollSnapList},scrollTo,selectedScrollSnap,slideNodes:function(){return u},slidesInView:function(){return r.slidesInView.get()},slidesNotInView:function(){return r.slidesInView.get(!1)}};return activate(t,n),setTimeout(()=>g.emit("init"),0),I}function useEmblaCarousel(e={},t=[]){let n=(0,r.useRef)(e),i=(0,r.useRef)(t),[o,a]=(0,r.useState)(),[u,c]=(0,r.useState)(),s=(0,r.useCallback)(()=>{o&&o.reInit(n.current,i.current)},[o]);return(0,r.useEffect)(()=>{if("undefined"!=typeof window&&window.document&&window.document.createElement&&u){EmblaCarousel.globalOptions=useEmblaCarousel.globalOptions;let e=EmblaCarousel(u,n.current,i.current);return a(e),()=>e.destroy()}a(void 0)},[u,a]),(0,r.useEffect)(()=>{areOptionsEqual(n.current,e)||(n.current=e,s())},[e,s]),(0,r.useEffect)(()=>{!function(e,t){if(e.length!==t.length)return!1;let n=sortAndMapPluginToOptions(e),r=sortAndMapPluginToOptions(t);return n.every((e,t)=>{let n=r[t];return areOptionsEqual(e,n)})}(i.current,t)&&(i.current=t,s())},[t,s]),[c,o]}EmblaCarousel.animationRealms=[],EmblaCarousel.globalOptions=void 0,useEmblaCarousel.globalOptions=void 0}}]);