Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

embla-carousel-svelte

Package Overview
Dependencies
Maintainers
1
Versions
52
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

embla-carousel-svelte - npm Package Compare versions

Comparing version 8.0.0-rc12 to 8.0.0-rc13

2

embla-carousel-svelte.umd.js

@@ -1,1 +0,1 @@

!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselSvelte=t()}(this,(function(){"use strict";function n(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function t(e,r){const o=Object.keys(e),i=Object.keys(r);if(o.length!==i.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(r.breakpoints||{}))&&o.every((o=>{const i=e[o],c=r[o];return"function"==typeof i?`${i}`==`${c}`:n(i)&&n(c)?t(i,c):i===c}))}function e(n){return n.concat().sort(((n,t)=>n.name>t.name?1:-1)).map((n=>n.options))}function r(n){return"number"==typeof n}function o(n){return"string"==typeof n}function i(n){return"boolean"==typeof n}function c(n){return"[object Object]"===Object.prototype.toString.call(n)}function u(n){return Math.abs(n)}function s(n){return Math.sign(n)}function a(n,t){return u(n-t)}function l(n){return g(n).map(Number)}function d(n){return n[f(n)]}function f(n){return Math.max(0,n.length-1)}function p(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function g(n){return Object.keys(n)}function m(n,t){return[n,t].reduce(((n,t)=>(g(t).forEach((e=>{const r=n[e],o=t[e],i=c(r)&&c(o);n[e]=i?m(r,o):o})),n)),{})}function h(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function y(n,t){const e={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return t-n}return{measure:function(o){return r(n)?t*Number(n):e[n](o)}}}function x(n,t){const e=u(n-t);function r(t){return t<n}function o(n){return n>t}function i(n){return r(n)||o(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?r(e)?n:t:e},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function b(n,t,e){const{constrain:r}=x(0,n),o=n+1;let i=c(t);function c(n){return e?u((o+n)%o):r(n)}function s(){return i}function a(){return b(n,s(),e)}const l={get:s,set:function(n){return i=c(n),l},add:function(n){return a().set(s()+n)},clone:a};return l}function v(){let n=[];const t={add:function(e,r,o,i={passive:!0}){return e.addEventListener(r,o,i),n.push((()=>e.removeEventListener(r,o,i))),t},clear:function(){n=n.filter((n=>n()))}};return t}function w(n,t,e,r,o,c,l,d,f,p,g,m,y,b,w,S,E,O,D,I){const{cross:A}=n,L=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=v(),k=v(),F=x(50,225).constrain(w.measure(20)),P={mouse:300,touch:400},z={mouse:500,touch:600},j=S?43:25;let R=!1,B=0,H=0,C=!1,N=!1,V=!1,G=!1;function q(n){const e=l.readPoint(n),r=l.readPoint(n,A),o=a(e,B),i=a(r,H);if(!N&&!G){if(!n.cancelable)return $(n);if(N=o>i,!N)return $(n)}const u=l.pointerMove(n);o>E&&(V=!0),g.useFriction(.3).useDuration(1),f.start(),c.add(t.apply(u)),n.preventDefault()}function $(n){const e=m.byDistance(0,!1).index!==y.get(),r=l.pointerUp(n)*(S?z:P)[G?"mouse":"touch"],o=function(n,t){const e=y.add(-1*s(n)),r=m.byDistance(n,!S).distance;return S||u(n)<F?r:O&&t?.5*r:m.byIndex(e.get(),0).distance}(t.apply(r),e),i=function(n,t){if(0===n||0===t)return 0;if(u(n)<=u(t))return 0;const e=a(u(n),u(t));return u(e/n)}(r,o),c=j-10*i,d=D+i/50;N=!1,C=!1,k.clear(),g.useDuration(c).useFriction(d),p.distance(o,!S),G=!1,b.emit("pointerUp")}function U(n){V&&(n.stopPropagation(),n.preventDefault())}return{init:function(n){if(!I)return;function t(t){(i(I)||I(n,t))&&function(n){const t=h(n,o);if(G=t,t&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return L.includes(t)}(n.target))return;V=S&&t&&!n.buttons&&R,R=a(c.get(),d.get())>=2,C=!0,l.pointerDown(n),g.useFriction(0).useDuration(0),c.set(d),function(){const n=G?r:e;k.add(n,"touchmove",q,M).add(n,"touchend",$).add(n,"mousemove",q,M).add(n,"mouseup",$)}(),B=l.readPoint(n),H=l.readPoint(n,A),b.emit("pointerDown")}(t)}const u=e;T.add(u,"dragstart",(n=>n.preventDefault()),M).add(u,"touchmove",(()=>{}),M).add(u,"touchend",(()=>{})).add(u,"touchstart",t).add(u,"mousedown",t).add(u,"touchcancel",$).add(u,"contextmenu",$).add(u,"click",U,!0)},pointerDown:function(){return C},destroy:function(){T.clear(),k.clear()}}}function S(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(h(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),c=o(n)-o(e)>170;return r=n,c&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),c=o(n)-o(e),s=o(n)-o(r)>170,a=t/c;return c&&!s&&u(a)>.1?a:0},readPoint:i}}function E(n,t,e,r,o,c){let u,s,a=[],l=!1;function d(n){return o.measureSize(n.getBoundingClientRect())}return{init:function(o){if(!c)return;s=d(n),a=r.map(d),u=new ResizeObserver((u=>{l||(i(c)||c(o,u))&&function(i){for(const c of i){const i=c.target===n,u=r.indexOf(c.target);if((i?s:a[u])!==d(i?n:r[u])){e.requestAnimationFrame((()=>{o.reInit(),t.emit("resize")}));break}}}(u)})),[n].concat(r).forEach((n=>u.observe(n)))},destroy:function(){u&&u.disconnect(),l=!0}}}function O(n,t,e,r,o){const i=o.measure(10),c=o.measure(50),s=x(.1,.99);let a=!1;return{constrain:function(o){if(a||!n.reachedAny(e.get())||!n.reachedAny(t.get()))return;const l=n.reachedMin(t.get())?"min":"max",d=u(n[l]-t.get()),f=e.get()-t.get(),p=s.constrain(d/c);e.subtract(f*p),!o&&u(f)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function D(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=x(o,i);return{loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get())}(t))return;const o=n*(-1*t);r.forEach((n=>n.add(o)))}}}function I(n,t,e,r,o){const{reachedAny:i,removeOffset:c,constrain:a}=r;function l(n){return n.concat().sort(((n,t)=>u(n)-u(t)))[0]}function f(t,r){const o=[t,t+e,t-e];if(!n)return o[0];if(!r)return l(o);const i=o.filter((n=>s(n)===r));return i.length?l(i):d(o)-e}return{byDistance:function(e,r){const s=o.get()+e,{index:l,distance:d}=function(e){const r=n?c(e):a(e),o=t.map((n=>n-r)).map((n=>f(n,0))).map(((n,t)=>({diff:n,index:t}))).sort(((n,t)=>u(n.diff)-u(t.diff))),{index:i}=o[0];return{index:i,distance:r}}(s),p=!n&&i(s);return!r||p?{index:l,distance:e}:{index:l,distance:e+f(t[l]-d,0)}},byIndex:function(n,e){return{index:n,distance:f(t[n]-o.get(),e)}},shortcut:f}}function A(n){let t=n;function e(n){return r(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function L(n,t,e){const r="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=e.style;let i=!1;return{clear:function(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))},to:function(n){i||(o.transform=r(t.apply(n)))},toggleActive:function(n){i=!n}}}function M(n,t,e,r,o,i,c,u,s,a){const d=l(i),f=l(i).reverse(),p=function(){const n=u[0]-1;return h(m(f,n),r,!1)}().concat(function(){const n=e-u[0]-1;return h(m(d,n),-r,!0)}());function g(n,t){return n.reduce(((n,t)=>n-i[t]),t)}function m(n,t){return n.reduce(((n,e)=>g(n,t)>0?n.concat([e]):n),[])}function h(i,u,l){const d=function(n){return c.map(((t,r)=>({start:t-o[r]+.5+n,end:t+e-.5+n})))}(u);return i.map((e=>{const o=l?0:-r,i=l?r:0,c=l?"end":"start",u=d[e][c];return{index:e,slideLocation:A(-1),translate:L(n,t,a[e]),target:()=>s.get()>u?o:i}}))}return{canLoop:function(){return p.every((({index:n})=>g(d.filter((t=>t!==n)),e)<=.1))},clear:function(){p.forEach((n=>n.translate.clear()))},loop:function(){p.forEach((n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))}))},loopPoints:p}}function T(n,t,e){let r,o=!1;return{init:function(c){e&&(r=new MutationObserver((n=>{o||(i(e)||e(c,n))&&function(n){for(const e of n)if("childList"===e.type){c.reInit(),t.emit("slidesChanged");break}}(n)})),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function k(n,t,e,r){const o={};let i,c=null,u=null,s=!1;return{init:function(){i=new IntersectionObserver((n=>{s||(n.forEach((n=>{const e=t.indexOf(n.target);o[e]=n})),c=null,u=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:r}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),s=!0},get:function(n=!0){if(n&&c)return c;if(!n&&u)return u;const t=function(n){return g(o).reduce(((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t}),[])}(n);return n&&(c=t),n||(u=t),t}}}function F(n,t,e,o,i,c,s,a,p){const{startEdge:g,endEdge:m}=n,h=r(o);return{groupSlides:function(n){return h?function(n,t){return l(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,o):function(n){return n.length?l(n).reduce(((r,o)=>{const l=d(r)||0,h=0===l,y=o===f(n),x=c[g]-s[l][g],b=c[g]-s[o][m],v=!i&&h?t.apply(a):0;return u(b-(!i&&y?t.apply(p):0)-(x+v))>e&&r.push(o),y&&r.push(n.length),r}),[]).map(((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)})):[]}(n)}}}function P(n,t,e,o,i,c,a,g){const{align:m,axis:h,direction:P,startIndex:z,loop:j,duration:R,dragFree:B,dragThreshold:H,inViewThreshold:C,slidesToScroll:N,skipSnaps:V,containScroll:G,watchResize:q,watchSlides:$,watchDrag:U}=c,W=t.getBoundingClientRect(),J=e.map((n=>n.getBoundingClientRect())),Q=function(n){const t="rtl"===n?-1:1;return{apply:function(n){return n*t}}}(P),X=function(n,t){const e="y"===n?"y":"x";return{scroll:e,cross:"y"===n?"x":"y",startEdge:"y"===e?"top":"rtl"===t?"right":"left",endEdge:"y"===e?"bottom":"rtl"===t?"left":"right",measureSize:function(n){const{width:t,height:r}=n;return"x"===e?t:r}}}(h,P),Y=X.measureSize(W),K=function(n){return{measure:function(t){return n*(t/100)}}}(Y),Z=y(m,Y),_=!j&&!!G,nn=j||!!G,{slideSizes:tn,slideSizesWithGaps:en,startGap:rn,endGap:on}=function(n,t,e,r,o,i){const{measureSize:c,startEdge:s,endEdge:a}=n,l=e[0]&&o,p=function(){if(!l)return 0;const n=e[0];return u(t[s]-n[s])}(),g=function(){if(!l)return 0;const n=i.getComputedStyle(d(r));return parseFloat(n.getPropertyValue(`margin-${a}`))}(),m=e.map(c),h=e.map(((n,t,e)=>{const r=!t,o=t===f(e);return r?m[t]+p:o?m[t]+g:e[t+1][s]-n[s]})).map(u);return{slideSizes:m,slideSizesWithGaps:h,startGap:p,endGap:g}}(X,W,J,e,nn,i),cn=F(X,Q,Y,N,j,W,J,rn,on),{snaps:un,snapsAligned:sn}=function(n,t,e,r,o){const{startEdge:i,endEdge:c}=n,{groupSlides:s}=o,a=s(r).map((n=>d(n)[c]-n[0][i])).map(u).map(t.measure),l=r.map((n=>e[i]-n[i])).map((n=>-u(n))),f=s(l).map((n=>n[0])).map(((n,t)=>n+a[t]));return{snaps:l,snapsAligned:f}}(X,Z,W,J,cn),an=-d(un)+d(en),{snapsContained:ln,scrollContainLimit:dn}=function(n,t,e,r){const o=x(-t+n,0),i=e.map(o.constrain).map((n=>parseFloat(n.toFixed(3)))),c=function(){const n=i[0],t=d(i);return x(i.lastIndexOf(n),i.indexOf(t)+1)}();return{snapsContained:function(){if(t<=n)return[o.max];if("keepSnaps"===r)return i;const{min:e,max:u}=c;return i.slice(e,u)}(),scrollContainLimit:c}}(Y,an,sn,G),fn=_?ln:sn,{limit:pn}=function(n,t,e){const r=t[0];return{limit:x(e?r-n:d(t),r)}}(an,fn,j),gn=b(f(fn),z,j),mn=gn.clone(),hn=l(e),yn={start:()=>g.start(Tn),stop:()=>g.stop(Tn),update:()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,eventHandler:r,animation:o,options:{loop:i}})=>{const c=n.pointerDown();i||e.constrain(c);const u=t.seek().settled();u&&!c&&(o.stop(),r.emit("settle")),u||r.emit("scroll")})(Tn),render:n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,scrollLooper:o,slideLooper:i,options:{loop:c}},u)=>{const s=n.velocity();r.set(e.get()-s+s*u),c&&(o.loop(n.direction()),i.loop()),t.to(r.get())})(Tn,n)},xn=fn[gn.get()],bn=A(xn),vn=A(xn),wn=A(xn),Sn=function(n,t,e,r){let o=!0,i=0,c=0,a=e,l=r,d=n.get(),f=0;function p(n){return a=n,m}function g(n){return l=n,m}const m={direction:function(){return c},duration:function(){return a},velocity:function(){return i},seek:function(){const e=t.get()-n.get();let r=0;return a?(i+=e/a,i*=l,d+=i,n.add(i),r=d-f):(i=0,n.set(t),r=e),c=s(r),f=d,o=u(e)<.001,m},settled:function(){return o},useBaseFriction:function(){return g(r)},useBaseDuration:function(){return p(e)},useFriction:g,useDuration:p};return m}(bn,wn,R,.68),En=I(j,fn,an,pn,wn),On=function(n,t,e,r,o,i,c){function u(r){const u=r.distance,s=r.index!==t.get();i.add(u),u&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),s&&(e.set(t.get()),t.set(r.index),c.emit("select"))}return{distance:function(n,t){u(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);u(r.byIndex(o.get(),e))}}}(yn,gn,mn,En,Sn,wn,a),Dn=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(pn),In=v(),An=k(t,e,a,C),{slideRegistry:Ln}=function(n,t,e,r,o,i){const{groupSlides:c}=o,{min:u,max:s}=r;return{slideRegistry:function(){const r=c(i);return!e||t<=n?r:r.slice(u,s).map(((n,t,e)=>{const r=!t,o=!r&&t===f(e);return r?p(d(e[0])+1):o?p(f(i)-d(e)[0]+1,d(e)[0]):n}))}()}}(Y,an,_,dn,cn,hn),Mn=function(n,t,e,o,i,c){let u=0;function s(n){"Tab"===n.code&&(u=(new Date).getTime())}function a(s){c.add(s,"focus",(()=>{if((new Date).getTime()-u>10)return;n.scrollLeft=0;const c=t.indexOf(s),a=e.findIndex((n=>n.includes(c)));r(a)&&(i.useDuration(0),o.index(a,0))}),{passive:!0,capture:!0})}return{init:function(){c.add(document,"keydown",s,!1),t.forEach(a)}}}(n,e,Ln,On,Sn,In),Tn={ownerDocument:o,ownerWindow:i,eventHandler:a,containerRect:W,slideRects:J,animation:yn,axis:X,direction:Q,dragHandler:w(X,Q,n,o,i,wn,S(X,i),bn,yn,On,Sn,En,gn,a,K,B,H,V,.68,U),eventStore:In,percentOfView:K,index:gn,indexPrevious:mn,limit:pn,location:bn,offsetLocation:vn,options:c,resizeHandler:E(t,a,i,e,X,q),scrollBody:Sn,scrollBounds:O(pn,bn,wn,Sn,K),scrollLooper:D(an,pn,vn,[bn,vn,wn]),scrollProgress:Dn,scrollSnapList:fn.map(Dn.get),scrollSnaps:fn,scrollTarget:En,scrollTo:On,slideLooper:M(X,Q,Y,an,tn,en,un,fn,vn,e),slideFocus:Mn,slidesHandler:T(t,a,$),slidesInView:An,slideIndexes:hn,slideRegistry:Ln,slidesToScroll:cn,target:wn,translate:L(X,Q,t)};return Tn}const z={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 j(n){function t(n,t){return m(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=g(r).filter((t=>n.matchMedia(t).matches)).map((n=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o)},optionsMediaQueries:function(t){return t.map((n=>g(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}};return e}function R(n,t,e){const r=n.ownerDocument,i=r.defaultView,c=j(i),s=function(n){let t=[];return{init:function(e,r){return t=r.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),r.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(c),a=v(),l=v(),d=function(){const n={};let t;function e(t){return n[t]||[]}const r={init:function(n){t=n},emit:function(n){return e(n).forEach((e=>e(t,n))),r},off:function(t,o){return n[t]=e(t).filter((n=>n!==o)),r},on:function(t,o){return n[t]=e(t).concat([o]),r}};return r}(),{animationRealms:f}=R,{mergeOptions:p,optionsAtMedia:g,optionsMediaQueries:m}=c,{on:h,off:y,emit:x}=d,b=k;let w,S,E,O,D=!1,I=p(z,R.globalOptions),A=p(I),L=[];function M(t,e){const o=P(n,E,O,r,i,t,d,e);if(t.loop&&!o.slideLooper.canLoop()){return M(Object.assign({},t,{loop:!1}),e)}return o}function T(t,e){if(D)return;const c=f.find((n=>n.window===i)),d=c||function(n){const t=1e3/60;let e=[],r=null,o=0,i=0;function c(s){r||(r=s);const a=s-r;for(r=s,o+=a;o>=t;)e.forEach((({animation:n})=>n.update())),o-=t;const l=u(o/t);e.forEach((({animation:n})=>n.render(l))),i&&n.requestAnimationFrame(c)}return{start:function(t){e.includes(t)||e.push(t),i||(i=n.requestAnimationFrame(c))},stop:function(t){e=e.filter((n=>n!==t)),e.length||(n.cancelAnimationFrame(i),r=null,o=0,i=0)},reset:function(){r=null,o=0},window:n}}(i);c||f.push(d),I=p(I,t),A=g(I),L=e||L,function(){const{container:t,slides:e}=A,r=o(t)?n.querySelector(t):t;E=r||n.children[0];const i=o(e)?E.querySelectorAll(e):e;O=[].slice.call(i||E.children)}(),w=M(A,d),m([I,...L.map((({options:n})=>n))]).forEach((n=>a.add(n,"change",k))),A.active&&(w.translate.to(w.location.get()),w.slidesInView.init(),w.slideFocus.init(),w.eventHandler.init(C),w.resizeHandler.init(C),w.slidesHandler.init(C),l.add(r,"visibilitychange",(()=>{r.hidden&&d.reset()})),w.options.loop&&w.slideLooper.loop(),E.offsetParent&&O.length&&w.dragHandler.init(C),S=s.init(C,L))}function k(n,t){const e=H();F(),T(p({startIndex:e},n),t),d.emit("reInit")}function F(){w.dragHandler.destroy(),w.animation.stop(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),s.destroy(),a.clear(),l.clear()}function B(n,t,e){A.active&&!D&&(w.scrollBody.useBaseFriction().useDuration(t?0:A.duration),w.scrollTo.index(n,e||0))}function H(){return w.index.get()}const C={canScrollNext:function(){return w.index.add(1).get()!==H()},canScrollPrev:function(){return w.index.add(-1).get()!==H()},containerNode:function(){return E},internalEngine:function(){return w},destroy:function(){D||(D=!0,a.clear(),F(),d.emit("destroy"))},off:y,on:h,emit:x,plugins:function(){return S},previousScrollSnap:function(){return w.indexPrevious.get()},reInit:b,rootNode:function(){return n},scrollNext:function(n){B(w.index.add(1).get(),!0===n,-1)},scrollPrev:function(n){B(w.index.add(-1).get(),!0===n,1)},scrollProgress:function(){return w.scrollProgress.get(w.location.get())},scrollSnapList:function(){return w.scrollSnapList},scrollTo:B,selectedScrollSnap:H,slideNodes:function(){return O},slidesInView:function(){return w.slidesInView.get()},slidesNotInView:function(){return w.slidesInView.get(!1)}};return T(t,e),setTimeout((()=>d.emit("init")),0),C}function B(n,r={options:{},plugins:[]}){let o,i=r;return"undefined"!=typeof window&&window.document&&window.document.createElement&&(R.globalOptions=B.globalOptions,o=R(n,i.options,i.plugins),o.on("init",(()=>n.dispatchEvent(new CustomEvent("emblaInit",{detail:o}))))),{destroy:()=>{o&&o.destroy()},update:n=>{const r=!t(i.options,n.options),c=!function(n,r){if(n.length!==r.length)return!1;const o=e(n),i=e(r);return o.every(((n,e)=>t(n,i[e])))}(i.plugins,n.plugins);(r||c)&&(i=n,o&&o.reInit(i.options,i.plugins))}}}return R.animationRealms=[],R.globalOptions=void 0,B.globalOptions=void 0,B}));
!function(n,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(n="undefined"!=typeof globalThis?globalThis:n||self).EmblaCarouselSvelte=t()}(this,(function(){"use strict";function n(n){return function(n){return"[object Object]"===Object.prototype.toString.call(n)}(n)||Array.isArray(n)}function t(e,r){const o=Object.keys(e),i=Object.keys(r);if(o.length!==i.length)return!1;return JSON.stringify(Object.keys(e.breakpoints||{}))===JSON.stringify(Object.keys(r.breakpoints||{}))&&o.every((o=>{const i=e[o],c=r[o];return"function"==typeof i?`${i}`==`${c}`:n(i)&&n(c)?t(i,c):i===c}))}function e(n){return n.concat().sort(((n,t)=>n.name>t.name?1:-1)).map((n=>n.options))}function r(n){return"number"==typeof n}function o(n){return"string"==typeof n}function i(n){return"boolean"==typeof n}function c(n){return"[object Object]"===Object.prototype.toString.call(n)}function u(n){return Math.abs(n)}function s(n){return Math.sign(n)}function a(n,t){return u(n-t)}function l(n){return g(n).map(Number)}function d(n){return n[f(n)]}function f(n){return Math.max(0,n.length-1)}function p(n,t=0){return Array.from(Array(n),((n,e)=>t+e))}function g(n){return Object.keys(n)}function m(n,t){return[n,t].reduce(((n,t)=>(g(t).forEach((e=>{const r=n[e],o=t[e],i=c(r)&&c(o);n[e]=i?m(r,o):o})),n)),{})}function h(n,t){return void 0!==t.MouseEvent&&n instanceof t.MouseEvent}function y(n,t){const e={start:function(){return 0},center:function(n){return o(n)/2},end:o};function o(n){return t-n}return{measure:function(o){return r(n)?t*Number(n):e[n](o)}}}function x(n,t){const e=u(n-t);function r(t){return t<n}function o(n){return n>t}function i(n){return r(n)||o(n)}return{length:e,max:t,min:n,constrain:function(e){return i(e)?r(e)?n:t:e},reachedAny:i,reachedMax:o,reachedMin:r,removeOffset:function(n){return e?n-e*Math.ceil((n-t)/e):n}}}function b(n,t,e){const{constrain:r}=x(0,n),o=n+1;let i=c(t);function c(n){return e?u((o+n)%o):r(n)}function s(){return i}function a(){return b(n,s(),e)}const l={get:s,set:function(n){return i=c(n),l},add:function(n){return a().set(s()+n)},clone:a};return l}function v(){let n=[];const t={add:function(e,r,o,i={passive:!0}){let c;if("addEventListener"in e)e.addEventListener(r,o,i),c=()=>e.removeEventListener(r,o,i);else{const n=e;n.addListener(o),c=()=>n.removeListener(o)}return n.push(c),t},clear:function(){n=n.filter((n=>n()))}};return t}function w(n,t,e,r,o,c,l,d,f,p,g,m,y,b,w,S,E,O,L,D){const{cross:I}=n,A=["INPUT","SELECT","TEXTAREA"],M={passive:!1},T=v(),k=v(),F=x(50,225).constrain(w.measure(20)),P={mouse:300,touch:400},z={mouse:500,touch:600},j=S?43:25;let R=!1,B=0,H=0,C=!1,N=!1,V=!1,G=!1;function q(n){const e=l.readPoint(n),r=l.readPoint(n,I),o=a(e,B),i=a(r,H);if(!N&&!G){if(!n.cancelable)return $(n);if(N=o>i,!N)return $(n)}const u=l.pointerMove(n);o>E&&(V=!0),g.useFriction(.3).useDuration(1),f.start(),c.add(t.apply(u)),n.preventDefault()}function $(n){const e=m.byDistance(0,!1).index!==y.get(),r=l.pointerUp(n)*(S?z:P)[G?"mouse":"touch"],o=function(n,t){const e=y.add(-1*s(n)),r=m.byDistance(n,!S).distance;return S||u(n)<F?r:O&&t?.5*r:m.byIndex(e.get(),0).distance}(t.apply(r),e),i=function(n,t){if(0===n||0===t)return 0;if(u(n)<=u(t))return 0;const e=a(u(n),u(t));return u(e/n)}(r,o),c=j-10*i,d=L+i/50;N=!1,C=!1,k.clear(),g.useDuration(c).useFriction(d),p.distance(o,!S),G=!1,b.emit("pointerUp")}function U(n){V&&(n.stopPropagation(),n.preventDefault())}return{init:function(n){if(!D)return;function t(t){(i(D)||D(n,t))&&function(n){const t=h(n,o);if(G=t,t&&0!==n.button)return;if(function(n){const t=n.nodeName||"";return A.includes(t)}(n.target))return;V=S&&t&&!n.buttons&&R,R=a(c.get(),d.get())>=2,C=!0,l.pointerDown(n),g.useFriction(0).useDuration(0),c.set(d),function(){const n=G?r:e;k.add(n,"touchmove",q,M).add(n,"touchend",$).add(n,"mousemove",q,M).add(n,"mouseup",$)}(),B=l.readPoint(n),H=l.readPoint(n,I),b.emit("pointerDown")}(t)}const u=e;T.add(u,"dragstart",(n=>n.preventDefault()),M).add(u,"touchmove",(()=>{}),M).add(u,"touchend",(()=>{})).add(u,"touchstart",t).add(u,"mousedown",t).add(u,"touchcancel",$).add(u,"contextmenu",$).add(u,"click",U,!0)},pointerDown:function(){return C},destroy:function(){T.clear(),k.clear()}}}function S(n,t){let e,r;function o(n){return n.timeStamp}function i(e,r){const o="client"+("x"===(r||n.scroll)?"X":"Y");return(h(e,t)?e:e.touches[0])[o]}return{pointerDown:function(n){return e=n,r=n,i(n)},pointerMove:function(n){const t=i(n)-i(r),c=o(n)-o(e)>170;return r=n,c&&(e=n),t},pointerUp:function(n){if(!e||!r)return 0;const t=i(r)-i(e),c=o(n)-o(e),s=o(n)-o(r)>170,a=t/c;return c&&!s&&u(a)>.1?a:0},readPoint:i}}function E(n,t,e,r,o,c){let u,s,a=[],l=!1;function d(n){return o.measureSize(n.getBoundingClientRect())}return{init:function(o){if(!c)return;s=d(n),a=r.map(d),u=new ResizeObserver((u=>{l||(i(c)||c(o,u))&&function(i){for(const c of i){const i=c.target===n,u=r.indexOf(c.target);if((i?s:a[u])!==d(i?n:r[u])){e.requestAnimationFrame((()=>{o.reInit(),t.emit("resize")}));break}}}(u)})),[n].concat(r).forEach((n=>u.observe(n)))},destroy:function(){u&&u.disconnect(),l=!0}}}function O(n,t,e,r,o){const i=o.measure(10),c=o.measure(50),s=x(.1,.99);let a=!1;return{constrain:function(o){if(a||!n.reachedAny(e.get())||!n.reachedAny(t.get()))return;const l=n.reachedMin(t.get())?"min":"max",d=u(n[l]-t.get()),f=e.get()-t.get(),p=s.constrain(d/c);e.subtract(f*p),!o&&u(f)<i&&(e.set(n.constrain(e.get())),r.useDuration(25).useBaseFriction())},toggleActive:function(n){a=!n}}}function L(n,t,e,r){const o=t.min+.1,i=t.max+.1,{reachedMin:c,reachedMax:u}=x(o,i);return{loop:function(t){if(!function(n){return 1===n?u(e.get()):-1===n&&c(e.get())}(t))return;const o=n*(-1*t);r.forEach((n=>n.add(o)))}}}function D(n,t,e,r,o){const{reachedAny:i,removeOffset:c,constrain:a}=r;function l(n){return n.concat().sort(((n,t)=>u(n)-u(t)))[0]}function f(t,r){const o=[t,t+e,t-e];if(!n)return o[0];if(!r)return l(o);const i=o.filter((n=>s(n)===r));return i.length?l(i):d(o)-e}return{byDistance:function(e,r){const s=o.get()+e,{index:l,distance:d}=function(e){const r=n?c(e):a(e),o=t.map((n=>n-r)).map((n=>f(n,0))).map(((n,t)=>({diff:n,index:t}))).sort(((n,t)=>u(n.diff)-u(t.diff))),{index:i}=o[0];return{index:i,distance:r}}(s),p=!n&&i(s);return!r||p?{index:l,distance:e}:{index:l,distance:e+f(t[l]-d,0)}},byIndex:function(n,e){return{index:n,distance:f(t[n]-o.get(),e)}},shortcut:f}}function I(n){let t=n;function e(n){return r(n)?n:n.get()}return{get:function(){return t},set:function(n){t=e(n)},add:function(n){t+=e(n)},subtract:function(n){t-=e(n)}}}function A(n,t,e){const r="x"===n.scroll?function(n){return`translate3d(${n}px,0px,0px)`}:function(n){return`translate3d(0px,${n}px,0px)`},o=e.style;let i=!1;return{clear:function(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))},to:function(n){i||(o.transform=r(t.apply(n)))},toggleActive:function(n){i=!n}}}function M(n,t,e,r,o,i,c,u,s,a){const d=l(i),f=l(i).reverse(),p=function(){const n=u[0]-1;return h(m(f,n),r,!1)}().concat(function(){const n=e-u[0]-1;return h(m(d,n),-r,!0)}());function g(n,t){return n.reduce(((n,t)=>n-i[t]),t)}function m(n,t){return n.reduce(((n,e)=>g(n,t)>0?n.concat([e]):n),[])}function h(i,u,l){const d=function(n){return c.map(((t,r)=>({start:t-o[r]+.5+n,end:t+e-.5+n})))}(u);return i.map((e=>{const o=l?0:-r,i=l?r:0,c=l?"end":"start",u=d[e][c];return{index:e,slideLocation:I(-1),translate:A(n,t,a[e]),target:()=>s.get()>u?o:i}}))}return{canLoop:function(){return p.every((({index:n})=>g(d.filter((t=>t!==n)),e)<=.1))},clear:function(){p.forEach((n=>n.translate.clear()))},loop:function(){p.forEach((n=>{const{target:t,translate:e,slideLocation:r}=n,o=t();o!==r.get()&&(e.to(o),r.set(o))}))},loopPoints:p}}function T(n,t,e){let r,o=!1;return{init:function(c){e&&(r=new MutationObserver((n=>{o||(i(e)||e(c,n))&&function(n){for(const e of n)if("childList"===e.type){c.reInit(),t.emit("slidesChanged");break}}(n)})),r.observe(n,{childList:!0}))},destroy:function(){r&&r.disconnect(),o=!0}}}function k(n,t,e,r){const o={};let i,c=null,u=null,s=!1;return{init:function(){i=new IntersectionObserver((n=>{s||(n.forEach((n=>{const e=t.indexOf(n.target);o[e]=n})),c=null,u=null,e.emit("slidesInView"))}),{root:n.parentElement,threshold:r}),t.forEach((n=>i.observe(n)))},destroy:function(){i&&i.disconnect(),s=!0},get:function(n=!0){if(n&&c)return c;if(!n&&u)return u;const t=function(n){return g(o).reduce(((t,e)=>{const r=parseInt(e),{isIntersecting:i}=o[r];return(n&&i||!n&&!i)&&t.push(r),t}),[])}(n);return n&&(c=t),n||(u=t),t}}}function F(n,t,e,o,i,c,s,a,p){const{startEdge:g,endEdge:m}=n,h=r(o);return{groupSlides:function(n){return h?function(n,t){return l(n).filter((n=>n%t==0)).map((e=>n.slice(e,e+t)))}(n,o):function(n){return n.length?l(n).reduce(((r,o)=>{const l=d(r)||0,h=0===l,y=o===f(n),x=c[g]-s[l][g],b=c[g]-s[o][m],v=!i&&h?t.apply(a):0;return u(b-(!i&&y?t.apply(p):0)-(x+v))>e&&r.push(o),y&&r.push(n.length),r}),[]).map(((t,e,r)=>{const o=Math.max(r[e-1]||0);return n.slice(o,t)})):[]}(n)}}}function P(n,t,e,o,i,c,a,g){const{align:m,axis:h,direction:P,startIndex:z,loop:j,duration:R,dragFree:B,dragThreshold:H,inViewThreshold:C,slidesToScroll:N,skipSnaps:V,containScroll:G,watchResize:q,watchSlides:$,watchDrag:U}=c,W=t.getBoundingClientRect(),J=e.map((n=>n.getBoundingClientRect())),Q=function(n){const t="rtl"===n?-1:1;return{apply:function(n){return n*t}}}(P),X=function(n,t){const e="y"===n?"y":"x";return{scroll:e,cross:"y"===n?"x":"y",startEdge:"y"===e?"top":"rtl"===t?"right":"left",endEdge:"y"===e?"bottom":"rtl"===t?"left":"right",measureSize:function(n){const{width:t,height:r}=n;return"x"===e?t:r}}}(h,P),Y=X.measureSize(W),K=function(n){return{measure:function(t){return n*(t/100)}}}(Y),Z=y(m,Y),_=!j&&!!G,nn=j||!!G,{slideSizes:tn,slideSizesWithGaps:en,startGap:rn,endGap:on}=function(n,t,e,r,o,i){const{measureSize:c,startEdge:s,endEdge:a}=n,l=e[0]&&o,p=function(){if(!l)return 0;const n=e[0];return u(t[s]-n[s])}(),g=function(){if(!l)return 0;const n=i.getComputedStyle(d(r));return parseFloat(n.getPropertyValue(`margin-${a}`))}(),m=e.map(c),h=e.map(((n,t,e)=>{const r=!t,o=t===f(e);return r?m[t]+p:o?m[t]+g:e[t+1][s]-n[s]})).map(u);return{slideSizes:m,slideSizesWithGaps:h,startGap:p,endGap:g}}(X,W,J,e,nn,i),cn=F(X,Q,Y,N,j,W,J,rn,on),{snaps:un,snapsAligned:sn}=function(n,t,e,r,o){const{startEdge:i,endEdge:c}=n,{groupSlides:s}=o,a=s(r).map((n=>d(n)[c]-n[0][i])).map(u).map(t.measure),l=r.map((n=>e[i]-n[i])).map((n=>-u(n))),f=s(l).map((n=>n[0])).map(((n,t)=>n+a[t]));return{snaps:l,snapsAligned:f}}(X,Z,W,J,cn),an=-d(un)+d(en),{snapsContained:ln,scrollContainLimit:dn}=function(n,t,e,r){const o=x(-t+n,0),i=e.map(o.constrain).map((n=>parseFloat(n.toFixed(3)))),c=function(){const n=i[0],t=d(i);return x(i.lastIndexOf(n),i.indexOf(t)+1)}();return{snapsContained:function(){if(t<=n)return[o.max];if("keepSnaps"===r)return i;const{min:e,max:u}=c;return i.slice(e,u)}(),scrollContainLimit:c}}(Y,an,sn,G),fn=_?ln:sn,{limit:pn}=function(n,t,e){const r=t[0];return{limit:x(e?r-n:d(t),r)}}(an,fn,j),gn=b(f(fn),z,j),mn=gn.clone(),hn=l(e),yn={start:()=>g.start(Tn),stop:()=>g.stop(Tn),update:()=>(({dragHandler:n,scrollBody:t,scrollBounds:e,eventHandler:r,animation:o,options:{loop:i}})=>{const c=n.pointerDown();i||e.constrain(c);const u=t.seek().settled();u&&!c&&(o.stop(),r.emit("settle")),u||r.emit("scroll")})(Tn),render:n=>(({scrollBody:n,translate:t,location:e,offsetLocation:r,scrollLooper:o,slideLooper:i,options:{loop:c}},u)=>{const s=n.velocity();r.set(e.get()-s+s*u),c&&(o.loop(n.direction()),i.loop()),t.to(r.get())})(Tn,n)},xn=fn[gn.get()],bn=I(xn),vn=I(xn),wn=I(xn),Sn=function(n,t,e,r){let o=!0,i=0,c=0,a=e,l=r,d=n.get(),f=0;function p(n){return a=n,m}function g(n){return l=n,m}const m={direction:function(){return c},duration:function(){return a},velocity:function(){return i},seek:function(){const e=t.get()-n.get();let r=0;return a?(i+=e/a,i*=l,d+=i,n.add(i),r=d-f):(i=0,n.set(t),r=e),c=s(r),f=d,o=u(e)<.001,m},settled:function(){return o},useBaseFriction:function(){return g(r)},useBaseDuration:function(){return p(e)},useFriction:g,useDuration:p};return m}(bn,wn,R,.68),En=D(j,fn,an,pn,wn),On=function(n,t,e,r,o,i,c){function u(r){const u=r.distance,s=r.index!==t.get();i.add(u),u&&(o.duration()?n.start():(n.update(),n.render(1),n.update())),s&&(e.set(t.get()),t.set(r.index),c.emit("select"))}return{distance:function(n,t){u(r.byDistance(n,t))},index:function(n,e){const o=t.clone().set(n);u(r.byIndex(o.get(),e))}}}(yn,gn,mn,En,Sn,wn,a),Ln=function(n){const{max:t,length:e}=n;return{get:function(n){return e?(n-t)/-e:0}}}(pn),Dn=v(),In=k(t,e,a,C),{slideRegistry:An}=function(n,t,e,r,o,i){const{groupSlides:c}=o,{min:u,max:s}=r;return{slideRegistry:function(){const r=c(i);return!e||t<=n?r:r.slice(u,s).map(((n,t,e)=>{const r=!t,o=!r&&t===f(e);return r?p(d(e[0])+1):o?p(f(i)-d(e)[0]+1,d(e)[0]):n}))}()}}(Y,an,_,dn,cn,hn),Mn=function(n,t,e,o,i,c){let u=0;function s(n){"Tab"===n.code&&(u=(new Date).getTime())}function a(s){c.add(s,"focus",(()=>{if((new Date).getTime()-u>10)return;n.scrollLeft=0;const c=t.indexOf(s),a=e.findIndex((n=>n.includes(c)));r(a)&&(i.useDuration(0),o.index(a,0))}),{passive:!0,capture:!0})}return{init:function(){c.add(document,"keydown",s,!1),t.forEach(a)}}}(n,e,An,On,Sn,Dn),Tn={ownerDocument:o,ownerWindow:i,eventHandler:a,containerRect:W,slideRects:J,animation:yn,axis:X,direction:Q,dragHandler:w(X,Q,n,o,i,wn,S(X,i),bn,yn,On,Sn,En,gn,a,K,B,H,V,.68,U),eventStore:Dn,percentOfView:K,index:gn,indexPrevious:mn,limit:pn,location:bn,offsetLocation:vn,options:c,resizeHandler:E(t,a,i,e,X,q),scrollBody:Sn,scrollBounds:O(pn,bn,wn,Sn,K),scrollLooper:L(an,pn,vn,[bn,vn,wn]),scrollProgress:Ln,scrollSnapList:fn.map(Ln.get),scrollSnaps:fn,scrollTarget:En,scrollTo:On,slideLooper:M(X,Q,Y,an,tn,en,un,fn,vn,e),slideFocus:Mn,slidesHandler:T(t,a,$),slidesInView:In,slideIndexes:hn,slideRegistry:An,slidesToScroll:cn,target:wn,translate:A(X,Q,t)};return Tn}const z={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 j(n){function t(n,t){return m(n,t||{})}const e={mergeOptions:t,optionsAtMedia:function(e){const r=e.breakpoints||{},o=g(r).filter((t=>n.matchMedia(t).matches)).map((n=>r[n])).reduce(((n,e)=>t(n,e)),{});return t(e,o)},optionsMediaQueries:function(t){return t.map((n=>g(n.breakpoints||{}))).reduce(((n,t)=>n.concat(t)),[]).map(n.matchMedia)}};return e}function R(n,t,e){const r=n.ownerDocument,i=r.defaultView,c=j(i),s=function(n){let t=[];return{init:function(e,r){return t=r.filter((({options:t})=>!1!==n.optionsAtMedia(t).active)),t.forEach((t=>t.init(e,n))),r.reduce(((n,t)=>Object.assign(n,{[t.name]:t})),{})},destroy:function(){t=t.filter((n=>n.destroy()))}}}(c),a=v(),l=v(),d=function(){const n={};let t;function e(t){return n[t]||[]}const r={init:function(n){t=n},emit:function(n){return e(n).forEach((e=>e(t,n))),r},off:function(t,o){return n[t]=e(t).filter((n=>n!==o)),r},on:function(t,o){return n[t]=e(t).concat([o]),r}};return r}(),{animationRealms:f}=R,{mergeOptions:p,optionsAtMedia:g,optionsMediaQueries:m}=c,{on:h,off:y,emit:x}=d,b=k;let w,S,E,O,L=!1,D=p(z,R.globalOptions),I=p(D),A=[];function M(t,e){const o=P(n,E,O,r,i,t,d,e);if(t.loop&&!o.slideLooper.canLoop()){return M(Object.assign({},t,{loop:!1}),e)}return o}function T(t,e){if(L)return;const c=f.find((n=>n.window===i)),d=c||function(n){const t=1e3/60;let e=[],r=null,o=0,i=0;function c(s){r||(r=s);const a=s-r;for(r=s,o+=a;o>=t;)e.forEach((({animation:n})=>n.update())),o-=t;const l=u(o/t);e.forEach((({animation:n})=>n.render(l))),i&&n.requestAnimationFrame(c)}return{start:function(t){e.includes(t)||e.push(t),i||(i=n.requestAnimationFrame(c))},stop:function(t){e=e.filter((n=>n!==t)),e.length||(n.cancelAnimationFrame(i),r=null,o=0,i=0)},reset:function(){r=null,o=0},window:n}}(i);c||f.push(d),D=p(D,t),I=g(D),A=e||A,function(){const{container:t,slides:e}=I,r=o(t)?n.querySelector(t):t;E=r||n.children[0];const i=o(e)?E.querySelectorAll(e):e;O=[].slice.call(i||E.children)}(),w=M(I,d),m([D,...A.map((({options:n})=>n))]).forEach((n=>a.add(n,"change",k))),I.active&&(w.translate.to(w.location.get()),w.slidesInView.init(),w.slideFocus.init(),w.eventHandler.init(C),w.resizeHandler.init(C),w.slidesHandler.init(C),l.add(r,"visibilitychange",(()=>{r.hidden&&d.reset()})),w.options.loop&&w.slideLooper.loop(),E.offsetParent&&O.length&&w.dragHandler.init(C),S=s.init(C,A))}function k(n,t){const e=H();F(),T(p({startIndex:e},n),t),d.emit("reInit")}function F(){w.dragHandler.destroy(),w.animation.stop(),w.eventStore.clear(),w.translate.clear(),w.slideLooper.clear(),w.resizeHandler.destroy(),w.slidesHandler.destroy(),s.destroy(),a.clear(),l.clear()}function B(n,t,e){I.active&&!L&&(w.scrollBody.useBaseFriction().useDuration(t?0:I.duration),w.scrollTo.index(n,e||0))}function H(){return w.index.get()}const C={canScrollNext:function(){return w.index.add(1).get()!==H()},canScrollPrev:function(){return w.index.add(-1).get()!==H()},containerNode:function(){return E},internalEngine:function(){return w},destroy:function(){L||(L=!0,a.clear(),F(),d.emit("destroy"))},off:y,on:h,emit:x,plugins:function(){return S},previousScrollSnap:function(){return w.indexPrevious.get()},reInit:b,rootNode:function(){return n},scrollNext:function(n){B(w.index.add(1).get(),!0===n,-1)},scrollPrev:function(n){B(w.index.add(-1).get(),!0===n,1)},scrollProgress:function(){return w.scrollProgress.get(w.location.get())},scrollSnapList:function(){return w.scrollSnapList},scrollTo:B,selectedScrollSnap:H,slideNodes:function(){return O},slidesInView:function(){return w.slidesInView.get()},slidesNotInView:function(){return w.slidesInView.get(!1)}};return T(t,e),setTimeout((()=>d.emit("init")),0),C}function B(n,r={options:{},plugins:[]}){let o,i=r;return"undefined"!=typeof window&&window.document&&window.document.createElement&&(R.globalOptions=B.globalOptions,o=R(n,i.options,i.plugins),o.on("init",(()=>n.dispatchEvent(new CustomEvent("emblaInit",{detail:o}))))),{destroy:()=>{o&&o.destroy()},update:n=>{const r=!t(i.options,n.options),c=!function(n,r){if(n.length!==r.length)return!1;const o=e(n),i=e(r);return o.every(((n,e)=>t(n,i[e])))}(i.plugins,n.plugins);(r||c)&&(i=n,o&&o.reInit(i.options,i.plugins))}}}return R.animationRealms=[],R.globalOptions=void 0,B.globalOptions=void 0,B}));
{
"name": "embla-carousel-svelte",
"version": "8.0.0-rc12",
"version": "8.0.0-rc13",
"author": "David Jerleke",

@@ -59,4 +59,4 @@ "description": "A lightweight carousel library with fluid motion and great swipe precision",

"dependencies": {
"embla-carousel": "8.0.0-rc12",
"embla-carousel-reactive-utils": "8.0.0-rc12"
"embla-carousel": "8.0.0-rc13",
"embla-carousel-reactive-utils": "8.0.0-rc13"
},

@@ -63,0 +63,0 @@ "peerDependencies": {

@@ -9,7 +9,7 @@ <br />

<p align="center">
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/npm/l/embla-carousel?color=%238ab4f8&style=flat-square"></a>
<a href="https://www.npmjs.com/package/embla-carousel-svelte"><img src="https://img.shields.io/npm/v/embla-carousel-svelte.svg?color=%23c1a8e2&style=flat-square"></a>
<a href="https://github.com/davidjerleke/embla-carousel/actions?query=workflow%3A%22Continuous+Integration%22"><img src="https://img.shields.io/github/actions/workflow/status/davidjerleke/embla-carousel/cd.yml?color=%238ab4f8&style=flat-square"></a>
<a href="https://prettier.io"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?color=%23c1a8e2&style=flat-square"></a>
<a href="https://bundlephobia.com/result?p=embla-carousel-svelte@latest"><img src="https://img.shields.io/bundlephobia/minzip/embla-carousel-svelte?color=%238ab4f8&style=flat-square&label=gzip%20size">
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/npm/l/embla-carousel?color=%238ab4f8"></a>
<a href="https://www.npmjs.com/package/embla-carousel-svelte"><img src="https://img.shields.io/npm/v/embla-carousel-svelte.svg?color=%23c1a8e2"></a>
<a href="https://github.com/davidjerleke/embla-carousel/actions?query=workflow%3A%22Continuous+Integration%22"><img src="https://img.shields.io/github/actions/workflow/status/davidjerleke/embla-carousel/cd.yml?color=%238ab4f8"></a>
<a href="https://prettier.io"><img src="https://img.shields.io/badge/code_style-prettier-ff69b4.svg?color=%23c1a8e2"></a>
<a href="https://bundlephobia.com/result?p=embla-carousel-svelte@latest"><img src="https://img.shields.io/bundlephobia/minzip/embla-carousel-svelte?color=%238ab4f8&label=gzip%20size">
</a>

@@ -109,2 +109,3 @@ </p>

<a href="https://github.com/horseeyephil"><img src="https://avatars.githubusercontent.com/u/32337092?s=120&v=4" title="horseeyephil" width="50" height="50" style="max-width:100%;"></a>
<a href="https://github.com/hamidrezahanafi"><img src="https://avatars.githubusercontent.com/u/91487491?s=120&v=4" title="hamidrezahanafi" width="50" height="50" style="max-width:100%;"></a>
</p>

@@ -111,0 +112,0 @@ </div>

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc