https://chateau-charmail.com/cdn/shop/t/8/assets/modules-slideshow…?v=172217404368932026051749045083
1import{S as e}from"./shared-import-splide.esm.bundle.min.js"; 2/*! 3 * @splidejs/splide-extension-auto-scroll 4 * Version : 0.5.3 5 * License : MIT 6 * Copyright: 2022 Naotoshi Fujita 7 */function t(e,t,n){return Array.prototype.slice.call(e,t,n)}function n(e){return e.bind.apply(e,[null].concat(t(arguments,1)))}function o(e){return requestAnimationFrame(e)}function i(e,t){return typeof t===e}var r=Array.isArray;function s(e){return r(e)?e:[e]}function d(e,t){s(e).forEach(t)}n(i,"function"),n(i,"string"),n(i,"undefined");var a=Object.keys;function u(e){return t(arguments,1).forEach((function(t){!function(e,t,n){if(e){var o=a(e);o=n?o.reverse():o;for(var i=0;i<o.length;i++){var r=o[i];if("__proto__"!==r&&!1===t(e[r],r))break}}}(t,(function(n,o){e[o]=t[o]}))})),e}var c=Math.min;var l="move",f="moved",p="updated",m="drag",w="dragged",h="scroll",v="scrolled",g="destroy";function b(e){var o=e?e.event.bus:document.createDocumentFragment(),i=function(){var e=[];function t(e,t,n){d(e,(function(e){e&&d(t,(function(t){t.split(" ").forEach((function(t){var o=t.split(".");n(e,o[0],o[1])}))}))}))}return{bind:function(n,o,i,r){t(n,o,(function(t,n,o){var s="addEventListener"in t,d=s?t.removeEventListener.bind(t,n,i,r):t.removeListener.bind(t,i);s?t.addEventListener(n,i,r):t.addListener(i),e.push([t,n,o,i,d])}))},unbind:function(n,o,i){t(n,o,(function(t,n,o){e=e.filter((function(e){return!!(e[0]!==t||e[1]!==n||e[2]!==o||i&&e[3]!==i)||(e[4](),!1)}))}))},dispatch:function(e,t,n){var o;return"function"==typeof CustomEvent?o=new CustomEvent(t,{bubbles:!0,detail:n}):(o=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!1,n),e.dispatchEvent(o),o},destroy:function(){e.forEach((function(e){e[4]()})),e.length=0}}}();return e&&e.event.on(g,i.destroy),u(i,{bus:o,on:function(e,t){i.bind(o,s(e).join(" "),(function(e){t.apply(t,r(e.detail)?e.detail:[])}))},off:n(i.unbind,o),emit:function(e){i.dispatch(o,e,t(arguments,1))}})}function y(e,t,n,i){var r,s,d=Date.now,a=0,u=!0,l=0;function f(){if(!u){if(a=e?c((d()-r)/e,1):1,n&&n(a),a>=1&&(t(),r=d(),i&&++l>=i))return p();o(f)}}function p(){u=!0}function m(){s&&cancelAnimationFrame(s),a=0,s=0,u=!0}return{start:function(t){!t&&m(),r=d()-(t?a*e:0),u=!1,o(f)},rewind:function(){r=d(),a=0,n&&n(a)},pause:p,cancel:m,set:function(t){e=t},isPaused:function(){return u}}}var S="slide";function E(e,t,n){return Array.prototype.slice.call(e,t,n)}function A(e){return e.bind(null,...E(arguments,1))}function L(e,t){return typeof t===e}function _(e){return!C(e)&&L("object",e)}const k=Array.isArray;A(L,"function"),A(L,"string");const q=A(L,"undefined");function C(e){return null===e}function x(e,t){var n;(n=e,k(n)?n:[n]).forEach(t)}const I=Object.keys;function O(e,t,n){if(e){let o=I(e);o=n?o.reverse():o;for(let n=0;n<o.length;n++){const i=o[n];if("__proto__"!==i&&!1===t(e[i],i))break}}return e}function P(e){return E(arguments,1).forEach((t=>{O(t,((n,o)=>{e[o]=t[o]}))})),e}function F(e,t,n){_(t)?O(t,((t,n)=>{F(e,n,t)})):x(e,(e=>{C(n)||""===n?function(e,t){x(e,(e=>{x(t,(t=>{e&&e.removeAttribute(t)}))}))}(e,t):e.setAttribute(t,String(n))}))}const{min:M,max:N,floor:j,ceil:D,abs:H}=Math;const B={speed:1,autoStart:!0,pauseOnHover:!0,pauseOnFocus:!0},T={startScroll:"Start auto scroll",pauseScroll:"Pause auto scroll"};function $(e,t,n){const{on:o,off:i,bind:r,unbind:s}=b(e),{translate:d,getPosition:a,toIndex:u,getLimit:c}=t.Move,{setIndex:g,getIndex:E}=t.Controller,{orient:A}=t.Direction,{toggle:L}=t.Elements,{Live:k}=t,{root:C}=e,I=function(e,t){var n;return function(){n||(n=y(t||0,(function(){e(),n=null}),null,1)).start()}}(t.Arrows.update,500);let O,j,D,H,$,z,Q={};function R(){e.is("fade")||O||!1===n.autoScroll||(O=y(0,V),function(){Q.pauseOnHover&&r(C,"mouseenter mouseleave",(e=>{D="mouseenter"===e.type,U()}));Q.pauseOnFocus&&r(C,"focusin focusout",(e=>{H="focusin"===e.type,U()}));Q.useToggleButton&&r(L,"click",(()=>{j?G():K()}));o(p,J),o([l,m,h],(()=>{$=!0,K(!1)})),o([f,w,v],(()=>{$=!1,U()}))}(),Q.autoStart&&("complete"===document.readyState?G():r(window,"load",G)))}function W(){O&&(O.cancel(),O=null,z=void 0,i([l,m,h,f,v]),s(C,"mouseenter mouseleave focusin focusout"),s(L,"click"))}function J(){const{autoScroll:e}=n;!1!==e?(Q=P({},Q,_(e)?e:{}),R()):W(),O&&!q(z)&&d(z)}function G(){Y()&&(O.start(!0),k.disable(!0),H=D=j=!1,X())}function K(e=!0){j||(j=e,X(),Y()||(O.pause(),k.disable(!1)))}function U(){j||(D||H||$?K(!1):G())}function V(){const o=a(),i=function(t){const n=Q.speed||1;t+=A(n),e.is(S)&&(t=function(e,t,n){const o=M(t,n),i=N(t,n);return M(N(o,e),i)}(t,c(!1),c(!0)));return t}(o);o!==i?(d(i),function(o){const{length:i}=e,r=(u(o)+i)%i;r!==E()&&(g(r),t.Slides.update(),t.Pagination.update(),"nearby"===n.lazyLoad&&t.LazyLoad.check())}(z=a())):(K(!1),Q.rewind&&e.go(Q.speed>0?0:t.Controller.getEnd())),I()}function X(){if(L){const i=j?"startScroll":"pauseScroll";t="is-active",o=!j,(e=L)&&x(t,(t=>{t&&e.classList[o?"add":"remove"](t)})),F(L,"aria-label",n.i18n[i]||T[i])}var e,t,o}function Y(){return!O||O.isPaused()}return{setup:function(){const{autoScroll:e}=n;Q=P({},B,_(e)?e:{})},mount:R,destroy:W,play:G,pause:K,isPaused:Y}}window.Splide=e,window.slideshows={};const z=(t,n,o)=>
7{if(t.hasAttribute("data-thumbnails")){const i=document.getElementById(t.getAttribute("data-thumbnails"));window.slideshows[i.id]=new e(`#${i.id}`,{direction:"ttb",height:"var(--thumbnails-height)",autoHeight:!0,arrows:!1,pagination:!1,isNavigation:!0,focus:"left",gap:"0.625rem",slideFocus:!1}),window.slideshows[t.id]=new e(`#${t.id}`,n);const r=window.slideshows[t.id],s=window.slideshows[i.id];r.mount(o),document.addEventListener("shapes:product:arrow-change",(e=>{"prev"==e.detail.direction?s.go("<"):s.go(">");s.Components.Slides.getAt(s.index).slide.querySelector(".media-thumbnail").click()})),document.addEventListener("shapes:product:variantchange",(e=>{if(!e.target.contains(t))return;const n=e.detail.variant.featured_media.id,o=s.Components.Slides.filter((e=>e.slide.dataset.mediaId===n.toString()));o.length&&s.go(o[0].index)})),s.mount()}else window.slideshows[t.id]=new e(`#${t.id}`,n),window.slideshows[t.id].on("mounted",(e=>{const n=window.slideshows[t.id].root.querySelectorAll(".splide__slide--clone");for(let e=0;e<n.length;e++){let t=n[e].getElementsByTagName("*");for(let n=0;n<t.length;n++){let o=t[n];if(o.hasAttribute("id")&&(o.id=o.getAttribute("id")+"-"+e),o.hasAttribute("for")){let t=o.getAttribute("for")+"-"+e;o.setAttribute("for",t)}}}})),"true"===t.dataset.autoRotate&&Q(t),window.slideshows[t.id].mount(o)};window.destroySlideshow=e=>{window.slideshows[e.id].destroy(),delete window.slideshows[e.id]},window.makeSlideshow=e=>{if(e.matches(".splide--thumbnails"))return;if(!e.id)return void console.error("Shapes Theme: makeSlideshow requires a unique ID on the slideshow root");if(window.slideshows[e.id])return;let t={mediaQuery:"min",perPage:1,perMove:1,autoWidth:!0,arrows:!0,pagination:!1,rewind:!0,autoScroll:{autoStart:!1},breakpoints:e.matches(".splide--mobile")?{990:{destroy:!0}}:{}};if(null!==e.querySelector(".slideshow-options")&&(t=JSON.parse(e.querySelector(".slideshow-options").textContent)),e.matches(".splide--product")){const t={mediaQuery:"min",type:"slide",perPage:1,perMove:1,autoWidth:!0,pagination:!1,arrows:!0,rewind:!0,drag:"true"!==e.dataset.dragDisabled,autoScroll:{autoStart:!1},breakpoints:{990:{destroy:!0}}};import("./components-splide-product.bundle.min.js").then((({default:n,SplideProduct:o})=>{z(e,t,{SplideProduct:o})}))}else{"true"===e.dataset.autoRotate&&(t.drag=!1,t.pauseOnHover=!0,t.pauseOnFocus=!0);let n={};t.autoScroll&&!0===t.autoScroll.autoStart&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches&&(n={AutoScroll:$}),z(e,t,n)}},window.discoverNewSlideshows=(e=document)=>{e.querySelectorAll(".splide").forEach((e=>{makeSlideshow(e)}))},window.destroySlideshowsIn=(e=document)=>{e.querySelectorAll(".splide").forEach((e=>{destroySlideshow(e)}))},document.addEventListener("DOMContentLoaded",(()=>{discoverNewSlideshows()})),document.addEventListener("shapes:productquickbuy:added",(()=>{discoverNewSlideshows()})),document.addEventListener("shapes:productquickbuy:willremove",(e=>{e.detail.container&&destroySlideshowsIn(e.detail.container)})),document.addEventListener("shapes:product:mediachange",(e=>{const t=window.slideshows[e.detail.slideshow_id];if(!t)return;const n=t.Components.Elements.slides.findIndex((t=>Number(t.dataset.mediaId)===e.detail.media_id));n>-1&&t.go(n)}));const Q=e=>{const t=e.querySelector(".splide__toggle"),n=t.dataset.play,o=t.dataset.pause;window.slideshows[e.id].on("autoplay:play",(()=>{t.setAttribute("aria-label",o)})),window.slideshows[e.id].on("autoplay:pause",(e=>{t.setAttribute("aria-label",n)}))};function R(e,t,n){const o=e.root.querySelector(".splide__progress-bar");function i(){const t=e.Components.Controller.getEnd()+1;o.style.width=String(100*(e.index+1)/t)+"%"}return{mount:function(){o&&e.on("mounted move",i)}}}export{R as progressBar};
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.