1"use strict";(this.webpackChunkenvision=this.webpackChunkenvision||[]).push([[926],{6472(n,t,e){e.d(t,{default:()=>r});const o={active:!0,breakpoints:{}};function i(n,t,e){return Math.min(Math.max(n,t),e)}function s(n){return"number"==typeof n&&!isNaN(n)}function r(n={}){let t,e,a,c,l,u=!1,p=!1,d=[],f=0,g=0,h=0,y=!1;function E(){return!u&&(!p&&t.active)}function S(){M(e.selectedSnap(),1)}function v(){return h}function b(){y=!1}function m(){y=!1,f=0,g=0}function $(){const n=e.internalEngine().scrollBody.duration();g=n?0:1,y=!0,n||S()}function x(n){const{scrollSnaps:t,location:o,target:i}=e.internalEngine();!s(n)||d[n]<.5||(o.set(t[n]),i.set(o))}function M(n,t){e.snapList().forEach((o,s)=>{const r=Math.abs(t),a=d[s],c=s===n,l=i(c?a+r:a-r,0,1);d[s]=l;const u=c&&y,p=e.previousSnap();u&&(d[p]=1-l),c&&function(n,t){const{indexCurrent:o,dragHandler:i,scrollSnaps:s}=e.internalEngine(),r=i.pointerDown(),a=1/(s.length-1);let c=n,l=r?e.selectedSnap():e.previousSnap();if(r&&c===l){const n=-1*Math.sign(f);c=l,l=o.clone().set(l).add(n).get()}const u=l*a,p=(c-l)*a;h=u+p*t}(n,l),function(n){const{scrollSnaps:t,containerRect:o,scrollSnapList:i}=e.internalEngine(),s=i.slidesBySnap[n],r=d[n];s.forEach(i=>{const s=e.slideNodes()[i].style,a=parseFloat(r.toFixed(2)),c=a>0,l=function(n){const{axis:t}=e.internalEngine();return`translate${t.scroll.toUpperCase()}(${t.direction(n)}px)`}(c?t[n]:o.width+2);c&&(s.transform=l),s.opacity=a.toString(),s.pointerEvents=r>.5?"auto":"none",c||(s.transform=l)})}(s)})}function w(){const{dragHandler:n,indexCurrent:t,scrollBody:o}=e.internalEngine(),i=e.selectedSnap();if(!n.pointerDown())return i;const s=Math.sign(o.velocity()),r=Math.sign(f),a=t.clone().set(i).add(-1*s).get();return s&&r?r===s?a:i:null}function k(){const{target:n,location:t}=e.internalEngine(),o=n.minus(t),i=Math.abs(o)>=1,r=w(),c=!s(r);return function(n){const{dragHandler:t,scrollBody:e}=n.internalEngine(),o=t.pointerDown(),i=e.velocity(),r=e.duration(),c=w(),l=!s(c);if(o){if(!i)return;f+=i,g=Math.abs(i/a),x(c)}if(!o){if(!r||l)return;g+=(1-d[c])/r,g*=.68}l||M(c,g)}(e),!c&&!i&&d[r]>.999}function B(n,t,o){const{active:i}=n,{slidesBySnap:s}=e.internalEngine().scrollSnapList,r=e.selectedSnap(),a=`${t} ${o}{opacity:${i?0:1};pointer-events:${i?"none":"auto"};}`,c=s[r].reduce((n,e)=>n+`${t} ${o}:nth-child(${e+1}){opacity:1;pointer-events:auto;}`,"");return i?a+c:a}return{name:"fade",options:n,init:function(s,f){e=s;const{mergeOptions:g,optionsAtMedia:h}=f,x=g(o,r.globalOptions),M=g(x,n);if(p=!1,t=h(M),u=e.internalEngine().isSsr,!E())return;const w=e.selectedSnap(),{scrollBody:B,containerRect:C,axis:N}=e.internalEngine(),L=N.getSize(C);a=i(.75*L,200,500),y=!1,d=e.snapList().map((n,t)=>t===w?1:0),c=B.settled,l=e.scrollProgress,B.settled=k,e.scrollProgress=v,e.on("select",$).on("slidefocus",S).on("pointerdown",m).on("pointerup",b),function(){const{translate:n,slideTranslates:t}=e.internalEngine();[n,...t].forEach(n=>{n.clear(),n.toggleActive(!1)}),e.containerNode().style.transform="translate(0px,0px)"}(),S()},destroy:function(){if(!E())return;const{scrollBody:n}=e.internalEngine();n.settled=c,e.scrollProgress=l,e.off("select",$).off("slidefocus",S).off("pointerdown",m).off("pointerup",b),e.slideNodes().forEach(n=>{const t=n.style;t.opacity="",t.pointerEvents=""}),p=!0},ssrStyles:function(e,o="> *"){if(!u)return"";const i=n.breakpoints||{};return B(t,e,o)+Object.keys(i).reduce((n,t)=>n+`@media ${t}{${B(i[t],e,o)}}`,"")}}}r.globalOptions=void 0}}]); 2//# sourceMappingURL=env-carousel-fade-4424b29a56e5fe95f99c.js.map
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.