PageSourceSearch

https://www.mycase.com/_astro/LogoCarousel.astro_astro_type_script…?dpl=6abc30545298140008d07ae4

js mycase.com collected 2026-10-01 10:24:47 UTC 5,393 bytes, 1 lines download raw bytes

1import{t as e}from"./embla-carousel.esm.D-xAhe_h.js?dpl=6abc30545298140008d07ae4";import{t}from"./embla-carousel-autoplay.esm.nYLz4_VA.js?dpl=6abc30545298140008d07ae4";var n=(e,t)=>{t?.addEventListener(`click`,()=>{let t=e?.plugins()?.autoplay;t&&(t.isPlaying()?t.stop():(e.scrollNext(),t.play()))})},r=(e,t,n,r)=>{n?.addEventListener(`click`,()=>{e.scrollNext(),r&&e.plugins().autoplay.stop()}),t?.addEventListener(`click`,()=>{e.scrollPrev(),r&&e.plugins().autoplay.stop()})},i=(e,t,n)=>{Array.from(t.querySelectorAll(`.dot`)).forEach(t=>{let r=t.dataset.index;t.addEventListener(`click`,()=>{e.scrollTo(Number(r)),n&&e.plugins().autoplay.stop()})})},a=(e,t,n)=>{if(!e)return;let r=t.querySelectorAll(`.dot`),i=t.querySelector(`.dot-${e.selectedScrollSnap()}`);if(!r.length||!i)return;r.forEach(e=>{n?e?.parentElement?.classList.remove(`progress-bar-active`):(e?.classList.remove(`dot-active`),e?.parentElement?.classList.remove(`progress-bar-current`))}),n?i?.parentElement?.classList.add(`progress-bar-active`):(i?.classList.add(`dot-active`),i?.parentElement?.classList.add(`progress-bar-current`));let a=i?.closest(`.progress-bar`),o=t.querySelector(`.dots-wrapper`);if(a&&o){let e=t=>{if(t.propertyName!==`width`)return;a.removeEventListener(`transitionend`,e);let n=a.getBoundingClientRect(),r=o.getBoundingClientRect(),i=n.left-r.left+o.scrollLeft+n.width/2;o.scrollTo({left:i-o.clientWidth/2,behavior:`smooth`})};a.addEventListener(`transitionend`,e)}},o=(e,t,n)=>{let r=t.querySelector(`.dot-${e.selectedScrollSnap()}`);n?r?.classList.remove(`dot-paused`):r?.classList.add(`dot-paused`)},s=(e,t,n)=>{n?.classList.toggle(`chevron-button-disabled`,!e.canScrollNext()),t?.classList.toggle(`chevron-button-disabled`,!e.canScrollPrev())},c=(e,t,n,r,i)=>{e?.plugins()?.autoplay&&(e.plugins().autoplay.reset(),o(e,t,e.plugins().autoplay.isPlaying())),(n||r)&&s(e,n,r),a(e,t,i)},l=(e,t)=>{if(!e)return;let n=e.scrollSnapList().length;t.setAttribute(`data-scroll-snap-count`,String(n))},u=({parent:s,options:u,plugins:d=[],autoplayCarousel:f,autoplayDelay:p=1e4})=>{if(!s)return;let m={loop:!1,align:`center`,containScroll:!1};f&&d.push(t({delay:p,stopOnInteraction:!0,stopOnLastSnap:!0}));let h=s.querySelector(`.embla`);if(!h)return;let g=e(h,u||m,d),_=s.querySelector(`.chevron-button-next`),v=s.querySelector(`.chevron-button-prev`),y=s.querySelector(`.play-button`),b=s.querySelector(`.play-icon-play`),x=s.querySelector(`.play-icon-pause`);return r(g,v,_,f),i(g,s,f),n(g,y),g.on(`init`,e=>{l(e,s),a(e,s,f)}),g.on(`reInit`,e=>{l(e,s),a(e,s,f)}),g.on(`autoplay:play`,e=>{o(e,s,!0),b?.classList.add(`hidden`),x?.classList.remove(`hidden`)}),g.on(`autoplay:stop`,e=>{o(e,s,!1),x?.classList.add(`hidden`),b?.classList.remove(`hidden`)}),g.on(`resize`,e=>{l(e,s),c(e,s,v,_,f)}),g.on(`select`,e=>{c(e,s,v,_,f)}),()=>g.destroy()},d={direction:`forward`,speed:2,startDelay:1e3,active:!0,breakpoints:{},playOnInit:!0,stopOnFocusIn:!0,stopOnInteraction:!0,stopOnMouseEnter:!1,rootNode:null};function f(e,t){let n=e.rootNode();return t&&t(n)||n}function p(e={}){let t,n,r,i,a=0,o=!1,s=!1,c;function l(a,o){n=a;let{mergeOptions:s,optionsAtMedia:l}=o;if(t=l(s(s(d,p.globalOptions),e)),n.scrollSnapList().length<=1)return;i=t.startDelay,r=!1,c=n.internalEngine().scrollBody;let{eventStore:u}=n.internalEngine(),g=!!n.internalEngine().options.watchDrag,x=f(n,t.rootNode);g&&n.on(`pointerDown`,_),g&&!t.stopOnInteraction&&n.on(`pointerUp`,v),t.stopOnMouseEnter&&u.add(x,`mouseenter`,y),t.stopOnMouseEnter&&!t.stopOnInteraction&&u.add(x,`mouseleave`,b),t.stopOnFocusIn&&n.on(`slideFocusStart`,h),t.stopOnFocusIn&&!t.stopOnInteraction&&u.add(n.containerNode(),`focusout`,m),t.playOnInit&&m()}function u(){n.off(`pointerDown`,_).off(`pointerUp`,v).off(`slideFocusStart`,h).off(`settle`,x),h(),r=!0,o=!1}function m(){if(r||o)return;n.emit(`autoScroll:play`);let e=n.internalEngine(),{ownerWindow:t}=e;a=t.setTimeout(()=>{e.scrollBody=g(e),e.animation.start()},i),o=!0}function h(){if(r||!o)return;n.emit(`autoScroll:stop`);let e=n.internalEngine(),{ownerWindow:t}=e;e.scrollBody=c,t.clearTimeout(a),a=0,o=!1}function g(e){let{location:r,previousLocation:i,offsetLocation:a,target:o,scrollTarget:s,index:c,indexPrevious:l,limit:{reachedMin:u,reachedMax:d,constrain:f},options:{loop:p}}=e,m=t.direction===`forward`?-1:1,g=()=>C,_=0,v=0,y=r.get(),b=0,x=!1;function S(){let e=0;i.set(r),_=m*t.speed,y+=_,r.add(_),o.set(r),e=y-b,v=Math.sign(e),b=y;let g=s.byDistance(0,!1).index;c.get()!==g&&(l.set(c.get()),c.set(g),n.emit(`select`));let S=t.direction===`forward`?u(a.get()):d(a.get());if(!p&&S){x=!0;let e=f(r.get());r.set(e),o.set(r),h()}return C}let C={direction:()=>v,duration:()=>-1,velocity:()=>_,settled:()=>x,seek:S,useBaseFriction:g,useBaseDuration:g,useFriction:g,useDuration:g};return C}function _(){s||h()}function v(){s||S()}function y(){s=!0,h()}function b(){s=!1,m()}function x(){n.off(`settle`,x),m()}function S(){n.on(`settle`,x)}function C(e){e!==void 0&&(i=e),m()}function w(){o&&h()}function T(){o&&(h(),S())}function E(){return o}return{name:`autoScroll`,options:e,init:l,destroy:u,play:C,stop:w,reset:T,isPlaying:E}}p.globalOptions=void 0;var m=class extends HTMLElement{connectedCallback(){let e={loop:!0,dragFree:!0},t=[p({playOnInit:!0,stopOnInteraction:!1,stopOnFocusIn:!1,stopOnMouseEnter:!1,speed:1})];
1u({parent:this,options:e,plugins:t})}};customElements.define(`logo-carousel`,m);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.