@vanelsas/baredom 1.4.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (84) hide show
  1. package/CHANGELOG.md +21 -1
  2. package/README.md +57 -5
  3. package/dist/base.js +212 -212
  4. package/dist/x-alert.js +16 -16
  5. package/dist/x-avatar-group.js +11 -11
  6. package/dist/x-avatar.js +16 -16
  7. package/dist/x-badge.js +11 -11
  8. package/dist/x-bento-grid.js +5 -5
  9. package/dist/x-bento-item.js +4 -4
  10. package/dist/x-breadcrumbs.js +14 -14
  11. package/dist/x-button.js +15 -15
  12. package/dist/x-cancel-dialogue.js +16 -16
  13. package/dist/x-card.js +7 -7
  14. package/dist/x-chart.js +46 -46
  15. package/dist/x-checkbox.js +11 -11
  16. package/dist/x-chip.js +9 -9
  17. package/dist/x-collapse.js +11 -11
  18. package/dist/x-command-palette.js +29 -29
  19. package/dist/x-container.js +6 -6
  20. package/dist/x-context-menu.js +20 -19
  21. package/dist/x-copy.js +23 -23
  22. package/dist/x-currency-field.js +21 -21
  23. package/dist/x-date-picker.js +36 -36
  24. package/dist/x-divider.js +12 -12
  25. package/dist/x-drawer.js +11 -11
  26. package/dist/x-dropdown.js +10 -10
  27. package/dist/x-fieldset.js +6 -6
  28. package/dist/x-file-download.js +7 -7
  29. package/dist/x-form-field.js +16 -16
  30. package/dist/x-form.js +9 -9
  31. package/dist/x-gaussian-blur.js +18 -18
  32. package/dist/x-grid.js +6 -6
  33. package/dist/x-kinetic-font.js +27 -27
  34. package/dist/x-kinetic-typography.js +37 -37
  35. package/dist/x-liquid-dock.js +37 -37
  36. package/dist/x-liquid-fill.js +42 -42
  37. package/dist/x-liquid-glass.js +38 -38
  38. package/dist/x-menu-item.js +10 -10
  39. package/dist/x-menu.js +11 -11
  40. package/dist/x-metaball-cursor.js +28 -28
  41. package/dist/x-modal.js +11 -11
  42. package/dist/x-morph-stack.js +39 -39
  43. package/dist/x-navbar.js +13 -13
  44. package/dist/x-neural-glow.js +31 -31
  45. package/dist/x-notification-center.js +9 -9
  46. package/dist/x-organic-divider.js +17 -17
  47. package/dist/x-organic-progress.js +38 -38
  48. package/dist/x-organic-shape.js +12 -12
  49. package/dist/x-pagination.js +16 -16
  50. package/dist/x-popover.js +14 -14
  51. package/dist/x-progress-circle.js +9 -9
  52. package/dist/x-progress.js +9 -9
  53. package/dist/x-radio.js +12 -12
  54. package/dist/x-ripple-effect.js +11 -11
  55. package/dist/x-scroll-parallax.js +17 -17
  56. package/dist/x-scroll-stack.js +18 -18
  57. package/dist/x-scroll-story.js +34 -35
  58. package/dist/x-scroll-timeline.js +46 -49
  59. package/dist/x-scroll.js +39 -39
  60. package/dist/x-search-field.js +15 -15
  61. package/dist/x-select.js +10 -10
  62. package/dist/x-sidebar.js +17 -17
  63. package/dist/x-skeleton.js +5 -5
  64. package/dist/x-slider.js +16 -16
  65. package/dist/x-soft-body.js +21 -20
  66. package/dist/x-spacer.js +5 -5
  67. package/dist/x-spinner.js +6 -6
  68. package/dist/x-splash.js +14 -14
  69. package/dist/x-stat.js +11 -11
  70. package/dist/x-stepper.js +16 -16
  71. package/dist/x-switch.js +11 -11
  72. package/dist/x-tab.js +8 -8
  73. package/dist/x-table-cell.js +21 -21
  74. package/dist/x-table-row.js +10 -10
  75. package/dist/x-table.js +13 -13
  76. package/dist/x-tabs.js +11 -11
  77. package/dist/x-text-area.js +18 -18
  78. package/dist/x-theme.js +25 -0
  79. package/dist/x-timeline-item.js +21 -21
  80. package/dist/x-timeline.js +9 -9
  81. package/dist/x-toast.js +23 -23
  82. package/dist/x-toaster.js +8 -8
  83. package/dist/x-typography.js +11 -10
  84. package/package.json +6 -2
@@ -1,20 +1,20 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Uy=function(a,b){return typeof a==="string"?(a=parseFloat(a.trim()),typeof a==="number"&&$APP.t(isNaN(a))&&a>0?a:b):b},Wy=function(a){return typeof a==="string"&&$APP.J(Vy,a.trim().toLowerCase())?a.trim().toLowerCase():"center"},Xy=function(a,b,c){b*=c;c=b+c-b;return Math.max(0,Math.min(1,c<=0?0:(a-b)/c))},Yy=function(a,b,c){b*=c;return b<=0?0:Math.max(0,Math.min(1,a/b))},Zy=function(a){var b=$APP.l(a,"__xScrollStackRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),
2
+ var $y=function(a,b){return typeof a==="string"?(a=parseFloat(a.trim()),typeof a==="number"&&$APP.t(isNaN(a))&&a>0?a:b):b},bz=function(a){return typeof a==="string"&&$APP.J(az,a.trim().toLowerCase())?a.trim().toLowerCase():"center"},cz=function(a,b,c){b*=c;c=b+c-b;return Math.max(0,Math.min(1,c<=0?0:(a-b)/c))},dz=function(a,b,c){b*=c;return b<=0?0:Math.max(0,Math.min(1,a/b))},ez=function(a){var b=$APP.l(a,"__xScrollStackRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),
3
3
  d=document.createElement("div"),e=document.createElement("slot");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-stack-peek:6px;--x-scroll-stack-rotation:3deg;--x-scroll-stack-gap:1rem;}[part\x3dcontainer]{position:sticky;top:0;height:100vh;overflow:hidden;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;padding-top:var(--x-scroll-stack-padding-top,2rem);gap:var(--x-scroll-stack-gap);}::slotted(*){flex-shrink:0;will-change:transform;transition:transform 60ms linear;}:host([disabled]){opacity:0.55;}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}}";
4
- d.setAttribute("part","container");d.setAttribute("role","region");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xScrollStackRefs=new $APP.P(null,3,[$APP.bi,b,$APP.Zi,d,$APP.Fi,e],null);return $APP.l(a,"__xScrollStackRefs")},ez=function(a){a=new $APP.P(null,5,[$y,a.getAttribute("peek"),az,a.getAttribute("rotation"),bz,a.getAttribute("scroll-distance"),$APP.qi,a.getAttribute("align"),$APP.Ai,$APP.r(a.hasAttribute("disabled"))?"":null],null);var b=$APP.N(a);a=$APP.G(b,$y);var c=$APP.G(b,az),
5
- d=$APP.G(b,bz),e=$APP.G(b,$APP.qi);b=$APP.G(b,$APP.Ai);return new $APP.P(null,5,[cz,Uy(a,6),$APP.cl,Uy(c,3),dz,Uy(d,150),$APP.Qi,Wy(e),$APP.W,b!=null],null)},fz=function(a){a=Zy(a);a=$APP.N(a);return $APP.G(a,$APP.Fi).assignedElements()},gz=function(a,b,c){b=new CustomEvent(b,{detail:$APP.nh(c),bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b)},hz=function(a){var b=$APP.l(a,"__xScrollStackModel");b=$APP.r(b)?b:ez(a);var c=fz(a).length;b=window.innerHeight+c*dz.g(b);a.style.height=""+$APP.S.g(b)+
6
- "px"},nz=function(a){var b=function(){var sa=$APP.l(a,"__xScrollStackModel");return $APP.r(sa)?sa:ez(a)}(),c=a.getBoundingClientRect();c=Math.max(0,-c.top);var d=fz(a),e=d.length,g=$APP.l(a,"__xScrollStackNaturalOffsets"),h=$APP.l(a,"__xScrollStackChildHeights");if($APP.r(function(){var sa=e>0;return sa?$APP.r(g)?$APP.r(h)?$APP.D.i(g.length,e)&&$APP.D.i(h.length,e):h:g:sa}())){var k=dz.g(b),m=cz.g(b),p=$APP.cl.g(b),q=$APP.Qi.g(b),w=g[0],x=$APP.r(a.hasAttribute("align"))?function(){var sa=(e-1)*m+
7
- h[e-1],Ga=$APP.N($APP.l(a,"__xScrollStackRefs"));Ga=$APP.G(Ga,$APP.Zi).clientHeight;a:switch(q){case "top":sa=32;break a;case "bottom":sa=Ga-sa-32;break a;default:sa=(Ga-sa)/2}return sa-w}():0;b=Yy(c,e,k);for(var y=Math.max(0,Math.min(e,Math.floor(c/Math.max(1,k)))),A=function(){var sa=$APP.l(a,"__xScrollStackStackedCount");return $APP.r(sa)?sa:0}(),C=0;;)if(C<e){var E=d[C],H=Xy(c,C,k),F=new $APP.P(null,3,[iz,C*m,jz,p*Math.sin(C*2.3),kz,2*Math.cos(C*3.7)],null),K=g[C];K=w+iz.g(F)-K;K=H*K+H*x;var X=
8
- H*jz.g(F);F=H*kz.g(F);var da=H>0?""+$APP.S.g(C):"";E.style.transform=H===0?"":"translate("+$APP.S.g(F.toFixed(2))+"px,"+$APP.S.g(K.toFixed(2))+"px) rotate("+$APP.S.g(X.toFixed(3))+"deg)";E.style.zIndex=da;C+=1}else break;$APP.O(y,A)&&(a.__xScrollStackStackedCount=y,gz(a,"x-scroll-stack-change",new $APP.P(null,3,[lz,y,mz,e,$APP.dl,b],null)));c=$APP.l(a,"__xScrollStackLastProg");if(c==null||Math.abs(b-c)>.001)a.__xScrollStackLastProg=b,gz(a,"x-scroll-stack-progress",new $APP.P(null,3,[$APP.dl,b,lz,
9
- y,mz,e],null))}a.__xScrollStackRAF=null},oz=function(a){a=$APP.l(a,"__xScrollStackModel");return $APP.r(a)?$APP.W.g(a):a},pz=function(a){return $APP.r(function(){var b=a.isConnected;return $APP.r(b)?(b=$APP.l(a,"__xScrollStackVisible"),$APP.r(b)?$APP.t(oz(a)):b):b}())?$APP.r($APP.l(a,"__xScrollStackRAF"))?null:$APP.n(a,"__xScrollStackRAF",requestAnimationFrame(function(){return nz(a)})):null},qz=function(a){a=$APP.l(a,"__xScrollStackHandlers");$APP.r($APP.r(a)?$APP.t($APP.l(a,"scrollAttached")):a)&&
10
- (window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},rz=function(a){a=$APP.l(a,"__xScrollStackHandlers");if($APP.r($APP.r(a)?$APP.l(a,"scrollAttached"):a))window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1;else return null},sz=function(a){var b=$APP.l(a,"__xScrollStackCacheRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);return $APP.n(a,"__xScrollStackCacheRAF",requestAnimationFrame(function(){a.__xScrollStackCacheRAF=
11
- null;if($APP.r(a.isConnected)){var c=fz(a),d=c.length;if(d>0){var e=$APP.N($APP.l(a,"__xScrollStackRefs")),g=$APP.G(e,$APP.Zi);e=Array(d);for(var h=Array(d),k=0;;)if(k<d){var m=c[k];m.style.transform="";m.style.zIndex="";k+=1}else break;g.offsetHeight;g=g.getBoundingClientRect();for(k=0;;)if(k<d)m=c[k].getBoundingClientRect(),e[k]=m.top-g.top,h[k]=m.height,k+=1;else break;a.__xScrollStackNaturalOffsets=e;a.__xScrollStackChildHeights=h}return nz(a)}return null}))},tz=function(a){var b=$APP.l(a,"__xScrollStackIO");
12
- $APP.r(b)&&b.disconnect();b=new IntersectionObserver(function(c){c=c[0].isIntersecting;a.__xScrollStackVisible=c;$APP.r(c)?$APP.r(oz(a))?c=null:(qz(a),c=sz(a)):c=rz(a);return c},{threshold:[0]});b.observe(a);a.__xScrollStackIO=b},uz=function(a){a=fz(a);for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.style.transform="";d.style.zIndex="";c+=1}else break},vz=function(a){function b(){hz(a);return $APP.r($APP.l(a,"__xScrollStackVisible"))?sz(a):null}function c(){hz(a);return $APP.r($APP.l(a,"__xScrollStackVisible"))?
13
- sz(a):null}var d=Zy(a);d=$APP.N(d);$APP.G(d,$APP.Fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.n(a,"__xScrollStackHandlers",{scroll:function(){return pz(a)},slot:c,resize:b,scrollAttached:!1})},wz=function(a){var b=$APP.l(a,"__xScrollStackHandlers");if($APP.r(b)){rz(a);var c=$APP.l(a,"__xScrollStackRefs");if($APP.r(c)){c=$APP.Fi.g(c);var d=$APP.l(b,"slot");$APP.r(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.r(b)&&window.removeEventListener("resize",
14
- b)}b=$APP.l(a,"__xScrollStackRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStackRAF=null);b=$APP.l(a,"__xScrollStackCacheRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);a.__xScrollStackHandlers=null},xz=function(a){var b=ez(a);if($APP.O($APP.l(a,"__xScrollStackModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.W);a.__xScrollStackModel=b;$APP.r(c)?(uz(a),a.__xScrollStackStackedCount=0,a.__xScrollStackLastProg=null,rz(a)):$APP.r($APP.l(a,"__xScrollStackVisible"))&&(qz(a),sz(a))}},
15
- yz=function(a){Object.defineProperty(a,"peek",{get:function(){return Uy(this.getAttribute("peek"),6)},set:function(b){return b!=null?this.setAttribute("peek",""+$APP.S.g(b)):this.removeAttribute("peek")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rotation",{get:function(){return Uy(this.getAttribute("rotation"),3)},set:function(b){return b!=null?this.setAttribute("rotation",""+$APP.S.g(b)):this.removeAttribute("rotation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scrollDistance",
16
- {get:function(){return Uy(this.getAttribute("scroll-distance"),150)},set:function(b){return b!=null?this.setAttribute("scroll-distance",""+$APP.S.g(b)):this.removeAttribute("scroll-distance")},enumerable:!0,configurable:!0});Object.defineProperty(a,"align",{get:function(){return Wy(this.getAttribute("align"))},set:function(b){return b!=null?this.setAttribute("align",""+$APP.S.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
17
- set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"stackedCount",{get:function(){var b=$APP.l(this,"__xScrollStackStackedCount");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.l(this,"__xScrollStackLastProg");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"refresh",{value:function(){hz(this);return $APP.r($APP.l(this,
18
- "__xScrollStackVisible"))?sz(this):null},enumerable:!0,configurable:!0})},Az=function(){var a=class extends HTMLElement{};a.observedAttributes=zz;a.prototype.connectedCallback=function(){Zy(this);wz(this);vz(this);tz(this);xz(this);hz(this);return null};a.prototype.disconnectedCallback=function(){uz(this);wz(this);var b=$APP.l(this,"__xScrollStackIO");$APP.r(b)&&(b.disconnect(),this.__xScrollStackIO=null);this.__xScrollStackVisible=!1;this.__xScrollStackStackedCount=0;return this.__xScrollStackChildHeights=
19
- this.__xScrollStackNaturalOffsets=this.__xScrollStackLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&(xz(this),hz(this),$APP.r($APP.l(this,"__xScrollStackVisible"))&&sz(this));return null};yz(a.prototype);return a},Bz=function(){$APP.r(customElements.get("x-scroll-stack"))||customElements.define("x-scroll-stack",Az());return null},jz=new $APP.M(null,"stack-rot","stack-rot",-949440704),cz=new $APP.M(null,"peek","peek",-291396325),mz=new $APP.M(null,"totalCount","totalCount",
20
- 2101470328),bz=new $APP.M(null,"scroll-distance-raw","scroll-distance-raw",1537519796),kz=new $APP.M(null,"stack-x","stack-x",-1557848736),iz=new $APP.M(null,"stack-y","stack-y",146748620),az=new $APP.M(null,"rotation-raw","rotation-raw",318004495),$y=new $APP.M(null,"peek-raw","peek-raw",361729174),lz=new $APP.M(null,"stackedCount","stackedCount",137366007),dz=new $APP.M(null,"scroll-distance","scroll-distance",-544947824);var zz=["peek","rotation","scroll-distance","align","disabled"];$APP.Sd(["x-scroll-stack-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[lz,$APP.V,mz,$APP.V,$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-scroll-stack-progress",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.dl,$APP.V,lz,$APP.V,mz,$APP.V],null),$APP.kl,!1],null)]);var Vy=new $APP.R(null,new $APP.P(null,3,["top",null,"center",null,"bottom",null],null),null);$APP.ka("baredom.exports.x_scroll_stack.init",Bz);export const init=Bz;
4
+ d.setAttribute("part","container");d.setAttribute("role","region");d.appendChild(e);b.appendChild(c);b.appendChild(d);a.__xScrollStackRefs=new $APP.P(null,3,[$APP.bi,b,$APP.Zi,d,$APP.Fi,e],null);return $APP.l(a,"__xScrollStackRefs")},kz=function(a){a=new $APP.P(null,5,[fz,a.getAttribute("peek"),gz,a.getAttribute("rotation"),hz,a.getAttribute("scroll-distance"),$APP.qi,a.getAttribute("align"),$APP.Ai,$APP.r(a.hasAttribute("disabled"))?"":null],null);var b=$APP.N(a);a=$APP.G(b,fz);var c=$APP.G(b,gz),
5
+ d=$APP.G(b,hz),e=$APP.G(b,$APP.qi);b=$APP.G(b,$APP.Ai);return new $APP.P(null,5,[iz,$y(a,6),$APP.dl,$y(c,3),jz,$y(d,150),$APP.Qi,bz(e),$APP.W,b!=null],null)},lz=function(a){a=ez(a);a=$APP.N(a);return $APP.G(a,$APP.Fi).assignedElements()},mz=function(a,b,c){b=new CustomEvent(b,{detail:$APP.nh(c),bubbles:!0,composed:!0,cancelable:!1});a.dispatchEvent(b)},nz=function(a){var b=$APP.l(a,"__xScrollStackModel");b=$APP.r(b)?b:kz(a);var c=lz(a).length;b=window.innerHeight+c*jz.g(b);a.style.height=""+$APP.S.g(b)+
6
+ "px"},tz=function(a){var b=function(){var ta=$APP.l(a,"__xScrollStackModel");return $APP.r(ta)?ta:kz(a)}(),c=a.getBoundingClientRect();c=Math.max(0,-c.top);var d=lz(a),e=d.length,g=$APP.l(a,"__xScrollStackNaturalOffsets"),h=$APP.l(a,"__xScrollStackChildHeights");if($APP.r(function(){var ta=e>0;return ta?$APP.r(g)?$APP.r(h)?$APP.D.i(g.length,e)&&$APP.D.i(h.length,e):h:g:ta}())){var k=jz.g(b),m=iz.g(b),p=$APP.dl.g(b),q=$APP.Qi.g(b),w=g[0],x=$APP.r(a.hasAttribute("align"))?function(){var ta=(e-1)*m+
7
+ h[e-1],Ha=$APP.N($APP.l(a,"__xScrollStackRefs"));Ha=$APP.G(Ha,$APP.Zi).clientHeight;a:switch(q){case "top":ta=32;break a;case "bottom":ta=Ha-ta-32;break a;default:ta=(Ha-ta)/2}return ta-w}():0;b=dz(c,e,k);for(var y=Math.max(0,Math.min(e,Math.floor(c/Math.max(1,k)))),A=function(){var ta=$APP.l(a,"__xScrollStackStackedCount");return $APP.r(ta)?ta:0}(),B=0;;)if(B<e){var E=d[B],H=cz(c,B,k),F=new $APP.P(null,3,[oz,B*m,pz,p*Math.sin(B*2.3),qz,2*Math.cos(B*3.7)],null),M=g[B];M=w+oz.g(F)-M;M=H*M+H*x;var Y=
8
+ H*pz.g(F);F=H*qz.g(F);var ea=H>0?""+$APP.S.g(B):"";E.style.transform=H===0?"":"translate("+$APP.S.g(F.toFixed(2))+"px,"+$APP.S.g(M.toFixed(2))+"px) rotate("+$APP.S.g(Y.toFixed(3))+"deg)";E.style.zIndex=ea;B+=1}else break;$APP.O(y,A)&&(a.__xScrollStackStackedCount=y,mz(a,"x-scroll-stack-change",new $APP.P(null,3,[rz,y,sz,e,$APP.el,b],null)));c=$APP.l(a,"__xScrollStackLastProg");if(c==null||Math.abs(b-c)>.001)a.__xScrollStackLastProg=b,mz(a,"x-scroll-stack-progress",new $APP.P(null,3,[$APP.el,b,rz,
9
+ y,sz,e],null))}a.__xScrollStackRAF=null},uz=function(a){a=$APP.l(a,"__xScrollStackModel");return $APP.r(a)?$APP.W.g(a):a},vz=function(a){return $APP.r(function(){var b=a.isConnected;return $APP.r(b)?(b=$APP.l(a,"__xScrollStackVisible"),$APP.r(b)?$APP.t(uz(a)):b):b}())?$APP.r($APP.l(a,"__xScrollStackRAF"))?null:$APP.n(a,"__xScrollStackRAF",requestAnimationFrame(function(){return tz(a)})):null},wz=function(a){a=$APP.l(a,"__xScrollStackHandlers");$APP.r($APP.r(a)?$APP.t($APP.l(a,"scrollAttached")):a)&&
10
+ (window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},xz=function(a){a=$APP.l(a,"__xScrollStackHandlers");if($APP.r($APP.r(a)?$APP.l(a,"scrollAttached"):a))window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1;else return null},yz=function(a){var b=$APP.l(a,"__xScrollStackCacheRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);return $APP.n(a,"__xScrollStackCacheRAF",requestAnimationFrame(function(){a.__xScrollStackCacheRAF=
11
+ null;if($APP.r(a.isConnected)){var c=lz(a),d=c.length;if(d>0){var e=$APP.N($APP.l(a,"__xScrollStackRefs")),g=$APP.G(e,$APP.Zi);e=Array(d);for(var h=Array(d),k=0;;)if(k<d){var m=c[k];m.style.transform="";m.style.zIndex="";k+=1}else break;g.offsetHeight;g=g.getBoundingClientRect();for(k=0;;)if(k<d)m=c[k].getBoundingClientRect(),e[k]=m.top-g.top,h[k]=m.height,k+=1;else break;a.__xScrollStackNaturalOffsets=e;a.__xScrollStackChildHeights=h}return tz(a)}return null}))},zz=function(a){var b=$APP.l(a,"__xScrollStackIO");
12
+ $APP.r(b)&&b.disconnect();b=new IntersectionObserver(function(c){c=c[0].isIntersecting;a.__xScrollStackVisible=c;$APP.r(c)?$APP.r(uz(a))?c=null:(wz(a),c=yz(a)):c=xz(a);return c},{threshold:[0]});b.observe(a);a.__xScrollStackIO=b},Az=function(a){a=lz(a);for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.style.transform="";d.style.zIndex="";c+=1}else break},Bz=function(a){function b(){nz(a);return $APP.r($APP.l(a,"__xScrollStackVisible"))?yz(a):null}function c(){nz(a);return $APP.r($APP.l(a,"__xScrollStackVisible"))?
13
+ yz(a):null}var d=ez(a);d=$APP.N(d);$APP.G(d,$APP.Fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.n(a,"__xScrollStackHandlers",{scroll:function(){return vz(a)},slot:c,resize:b,scrollAttached:!1})},Cz=function(a){var b=$APP.l(a,"__xScrollStackHandlers");if($APP.r(b)){xz(a);var c=$APP.l(a,"__xScrollStackRefs");if($APP.r(c)){c=$APP.Fi.g(c);var d=$APP.l(b,"slot");$APP.r(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.r(b)&&window.removeEventListener("resize",
14
+ b)}b=$APP.l(a,"__xScrollStackRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStackRAF=null);b=$APP.l(a,"__xScrollStackCacheRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStackCacheRAF=null);a.__xScrollStackHandlers=null},Dz=function(a){var b=kz(a);if($APP.O($APP.l(a,"__xScrollStackModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.W);a.__xScrollStackModel=b;$APP.r(c)?(Az(a),a.__xScrollStackStackedCount=0,a.__xScrollStackLastProg=null,xz(a)):$APP.r($APP.l(a,"__xScrollStackVisible"))&&(wz(a),yz(a))}},
15
+ Ez=function(a){Object.defineProperty(a,"peek",{get:function(){return $y(this.getAttribute("peek"),6)},set:function(b){return b!=null?this.setAttribute("peek",""+$APP.S.g(b)):this.removeAttribute("peek")},enumerable:!0,configurable:!0});Object.defineProperty(a,"rotation",{get:function(){return $y(this.getAttribute("rotation"),3)},set:function(b){return b!=null?this.setAttribute("rotation",""+$APP.S.g(b)):this.removeAttribute("rotation")},enumerable:!0,configurable:!0});Object.defineProperty(a,"scrollDistance",
16
+ {get:function(){return $y(this.getAttribute("scroll-distance"),150)},set:function(b){return b!=null?this.setAttribute("scroll-distance",""+$APP.S.g(b)):this.removeAttribute("scroll-distance")},enumerable:!0,configurable:!0});Object.defineProperty(a,"align",{get:function(){return bz(this.getAttribute("align"))},set:function(b){return b!=null?this.setAttribute("align",""+$APP.S.g(b)):this.removeAttribute("align")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},
17
+ set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"stackedCount",{get:function(){var b=$APP.l(this,"__xScrollStackStackedCount");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.l(this,"__xScrollStackLastProg");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"refresh",{value:function(){nz(this);return $APP.r($APP.l(this,
18
+ "__xScrollStackVisible"))?yz(this):null},enumerable:!0,configurable:!0})},Gz=function(){var a=class extends HTMLElement{};a.observedAttributes=Fz;a.prototype.connectedCallback=function(){ez(this);Cz(this);Bz(this);zz(this);Dz(this);nz(this);return null};a.prototype.disconnectedCallback=function(){Az(this);Cz(this);var b=$APP.l(this,"__xScrollStackIO");$APP.r(b)&&(b.disconnect(),this.__xScrollStackIO=null);this.__xScrollStackVisible=!1;this.__xScrollStackStackedCount=0;return this.__xScrollStackChildHeights=
19
+ this.__xScrollStackNaturalOffsets=this.__xScrollStackLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&(Dz(this),nz(this),$APP.r($APP.l(this,"__xScrollStackVisible"))&&yz(this));return null};Ez(a.prototype);return a},Hz=function(){$APP.r(customElements.get("x-scroll-stack"))||customElements.define("x-scroll-stack",Gz());return null},pz=new $APP.K(null,"stack-rot","stack-rot",-949440704),iz=new $APP.K(null,"peek","peek",-291396325),sz=new $APP.K(null,"totalCount","totalCount",
20
+ 2101470328),hz=new $APP.K(null,"scroll-distance-raw","scroll-distance-raw",1537519796),qz=new $APP.K(null,"stack-x","stack-x",-1557848736),oz=new $APP.K(null,"stack-y","stack-y",146748620),gz=new $APP.K(null,"rotation-raw","rotation-raw",318004495),fz=new $APP.K(null,"peek-raw","peek-raw",361729174),rz=new $APP.K(null,"stackedCount","stackedCount",137366007),jz=new $APP.K(null,"scroll-distance","scroll-distance",-544947824);var Fz=["peek","rotation","scroll-distance","align","disabled"];$APP.Sd(["x-scroll-stack-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[rz,$APP.V,sz,$APP.V,$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-stack-progress",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.el,$APP.V,rz,$APP.V,sz,$APP.V],null),$APP.ll,!1],null)]);var az=new $APP.R(null,new $APP.P(null,3,["top",null,"center",null,"bottom",null],null),null);$APP.ka("baredom.exports.x_scroll_stack.init",Hz);export const init=Hz;
@@ -1,38 +1,37 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var kX=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?.5:$APP.Yg.i(0,$APP.Zg.i(1,a))):.5},lX=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?.5:$APP.Yg.i(.1,$APP.Zg.i(.9,a))):.5},mX=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?50:$APP.Yg.i(1,$APP.Zg.i(1E3,a))):50},nX=function(a,b){var c=$APP.B(a);if(c===0)return-1;for(var d=0,e=-1,g=-1;;){if(d>=c)return e>=0?e:g;var h=$APP.rc(a,d),k=$APP.N(h);h=$APP.G(k,
3
- $APP.Qh);k=$APP.G(k,$APP.Qj);e=h<=b&&k>b?d:e;g=h<=b?d:g;d+=1}},pX=function(a){var b=$APP.l(a,"__xScrollStoryRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),k=document.createElement("slot"),m=document.createElement("div");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-story-gap:0;--x-scroll-story-step-min-height:80vh;--x-scroll-story-step-padding:2rem;--x-scroll-story-active-opacity:1;--x-scroll-story-inactive-opacity:0.3;--x-scroll-story-transition-duration:300ms;--x-scroll-story-disabled-opacity:0.55;--x-scroll-story-media-top:0;}[part\x3dcontainer]{display:flex;gap:var(--x-scroll-story-gap);}:host([data-layout\x3dleft]) [part\x3dcontainer]{flex-direction:row;}:host([data-layout\x3dright]) [part\x3dcontainer]{flex-direction:row-reverse;}:host([data-layout\x3dtop]) [part\x3dcontainer]{flex-direction:column;}[part\x3dmedia]{position:sticky;top:var(--x-scroll-story-media-top);align-self:flex-start;flex-shrink:0;}:host([data-layout\x3dtop]) [part\x3dmedia]{position:sticky;width:100%;}[part\x3dsteps]{flex:1;min-width:0;}[part\x3dmedia]{height:100vh;}::slotted(:not([slot])){min-height:var(--x-scroll-story-step-min-height);padding:var(--x-scroll-story-step-padding);opacity:var(--x-scroll-story-inactive-opacity);transition:opacity var(--x-scroll-story-transition-duration) ease;}::slotted([data-active]){opacity:var(--x-scroll-story-active-opacity);}:host([disabled]){opacity:var(--x-scroll-story-disabled-opacity);}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}[part\x3dindicator]{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;width:48px;height:48px;opacity:0.7;}[part\x3dindicator]::before,[part\x3dindicator]::after{content:'';position:absolute;top:8px;width:12px;height:32px;background:rgba(255,255,255,0.9);border-radius:3px;}[part\x3dindicator]::before{left:8px;}[part\x3dindicator]::after{right:8px;}:host([data-autoplay-paused][autoplay-indicator]) [part\x3dindicator]{display:block;}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}}";
2
+ var OX=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?.5:$APP.Yg.i(0,$APP.Zg.i(1,a))):.5},PX=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?.5:$APP.Yg.i(.1,$APP.Zg.i(.9,a))):.5},QX=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?50:$APP.Yg.i(1,$APP.Zg.i(1E3,a))):50},RX=function(a,b){var c=$APP.C(a);if(c===0)return-1;for(var d=0,e=-1,g=-1;;){if(d>=c)return e>=0?e:g;var h=$APP.rc(a,d),k=$APP.N(h);h=$APP.G(k,
3
+ $APP.Qh);k=$APP.G(k,$APP.Rj);e=h<=b&&k>b?d:e;g=h<=b?d:g;d+=1}},TX=function(a){var b=$APP.l(a,"__xScrollStoryRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),h=document.createElement("slot"),k=document.createElement("slot"),m=document.createElement("div");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-story-gap:0;--x-scroll-story-step-min-height:80vh;--x-scroll-story-step-padding:2rem;--x-scroll-story-active-opacity:1;--x-scroll-story-inactive-opacity:0.3;--x-scroll-story-transition-duration:300ms;--x-scroll-story-disabled-opacity:0.55;--x-scroll-story-media-top:0;}[part\x3dcontainer]{display:flex;gap:var(--x-scroll-story-gap);}:host([data-layout\x3dleft]) [part\x3dcontainer]{flex-direction:row;}:host([data-layout\x3dright]) [part\x3dcontainer]{flex-direction:row-reverse;}:host([data-layout\x3dtop]) [part\x3dcontainer]{flex-direction:column;}[part\x3dmedia]{position:sticky;top:var(--x-scroll-story-media-top);align-self:flex-start;flex-shrink:0;}:host([data-layout\x3dtop]) [part\x3dmedia]{position:sticky;width:100%;}[part\x3dsteps]{flex:1;min-width:0;}[part\x3dmedia]{height:100vh;}::slotted(:not([slot])){min-height:var(--x-scroll-story-step-min-height);padding:var(--x-scroll-story-step-padding);opacity:var(--x-scroll-story-inactive-opacity);transition:opacity var(--x-scroll-story-transition-duration) ease;}::slotted([data-active]){opacity:var(--x-scroll-story-active-opacity);}:host([disabled]){opacity:var(--x-scroll-story-disabled-opacity);}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}[part\x3dindicator]{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;width:48px;height:48px;opacity:0.7;}[part\x3dindicator]::before,[part\x3dindicator]::after{content:'';position:absolute;top:8px;width:12px;height:32px;background:rgba(255,255,255,0.9);border-radius:3px;}[part\x3dindicator]::before{left:8px;}[part\x3dindicator]::after{right:8px;}:host([data-autoplay-paused][autoplay-indicator]) [part\x3dindicator]{display:block;}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}}";
4
4
  d.setAttribute("part","container");d.setAttribute("role","region");e.setAttribute("part","media");h.setAttribute("name","media");var p=document.createElement("div");p.setAttribute("part","indicator");e.appendChild(p);e.appendChild(h);g.setAttribute("part","steps");g.appendChild(k);d.appendChild(e);d.appendChild(g);m.setAttribute("part","live");m.setAttribute("aria-live","polite");m.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(m);a.__xScrollStoryRefs=new $APP.P(null,
5
- 6,[$APP.bi,b,$APP.Zi,d,oX,e,$APP.wl,g,$APP.Fi,k,$APP.$h,m],null);return $APP.l(a,"__xScrollStoryRefs")},tX=function(a){a=$APP.Q([$APP.Oh,$APP.lj,$APP.gl,$APP.Ah,$APP.sk,$APP.ki,$APP.Ai,$APP.fl,qX],[a.getAttribute("label"),a.getAttribute("autoplay-speed"),$APP.r(a.hasAttribute("autoplay"))?"":null,a.getAttribute("threshold"),a.getAttribute("layout"),$APP.r(a.hasAttribute("autoplay-indicator"))?"":null,$APP.r(a.hasAttribute("disabled"))?"":null,$APP.r(a.hasAttribute("autoplay-loop"))?"":null,a.getAttribute("split")]);
6
- var b=$APP.N(a);a=$APP.G(b,$APP.Ai);var c=$APP.G(b,$APP.fl),d=$APP.G(b,qX),e=$APP.G(b,$APP.Oh),g=$APP.G(b,$APP.lj),h=$APP.G(b,$APP.gl),k=$APP.G(b,$APP.Ah),m=$APP.G(b,$APP.sk);b=$APP.G(b,$APP.ki);m=typeof m==="string"?m.trim().toLowerCase():null;m=$APP.J(rX,m)?m:"left";return $APP.Q([$APP.Aj,$APP.Wh,$APP.Wk,sX,$APP.T,$APP.di,$APP.W,$APP.mj,$APP.gi],[m,c!=null,kX(k),lX(d),$APP.r(e)?e:"",b!=null,a!=null,mX(g),h!=null])},uX=function(a){a=pX(a);a=$APP.N(a);return $APP.G(a,$APP.Fi).assignedElements()},
7
- vX=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},wX=function(a){a=a.getAttribute("id");return typeof a==="string"&&$APP.O(a,"")?a:null},xX=function(a,b,c){b=new CustomEvent(b,{detail:$APP.nh(c),bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},yX=function(a,b){a.textContent=b;setTimeout(function(){return a.textContent=""},3E3)},zX=function(a,b,c){var d=$APP.l(a,"__xScrollStoryActiveIndex");d=$APP.r(d)?d:-1;if($APP.O(d,c)){d>=0&&d<b.length&&
8
- b[d].removeAttribute("data-active");c>=0&&c<b.length&&b[c].setAttribute("data-active","");c>=0?a.setAttribute("data-active-index",""+$APP.S.g(c)):a.removeAttribute("data-active-index");a.__xScrollStoryActiveIndex=c;var e=d>=0&&d<b.length?wX(b[d]):null;b=c>=0&&c<b.length?wX(b[c]):null;xX(a,"x-scroll-story-step-change",new $APP.P(null,4,[$APP.Eh,c,$APP.Dk,b,$APP.rj,d,$APP.Ul,e],null));a=$APP.N($APP.l(a,"__xScrollStoryRefs"));a=$APP.G(a,$APP.$h);yX(a,"Step "+$APP.S.g(c+1)+" active")}},AX=function(a,
9
- b,c,d){var e=b.length;var g=$APP.l(a,"__xScrollStoryStepStates");if(!$APP.r($APP.r(g)?$APP.D.i(g.length,e):g)){for(var h=Array(e),k=0;;)if(k<e)h[k]=$APP.r($APP.r(g)?k<g.length:g)?g[k]:!1,k+=1;else break;g=a.__xScrollStoryStepStates=h}for(h=0;;)if(h<e){if(h<$APP.B(c)){k=$APP.rc(c,h);k=$APP.N(k);var m=$APP.G(k,$APP.Qh),p=$APP.G(k,$APP.Qj),q=g[h];k=m<=d&&p>d;var w=wX(b[h]),x=m;m=p-m;m=m<=0?0:$APP.Yg.i(0,$APP.Zg.i(1,(d-x)/m));$APP.t(q)&&k?(g[h]=!0,xX(a,"x-scroll-story-step-enter",new $APP.P(null,3,[$APP.Eh,
10
- h,$APP.Dk,w,$APP.dl,m],null))):$APP.r($APP.r(q)?!k:q)&&(g[h]=!1,xX(a,"x-scroll-story-step-leave",new $APP.P(null,3,[$APP.Eh,h,$APP.Dk,w,$APP.dl,m],null)))}h+=1}else break},BX=function(a){var b=function(){var m=$APP.l(a,"__xScrollStoryModel");return $APP.r(m)?m:tX(a)}();if(!$APP.r($APP.W.g(b))){var c=uX(a),d=c.length,e=window.innerHeight,g=e*$APP.Wk.g(b),h=function(){for(var m=0,p=$APP.ie;;){if(m>=d)return p;var q=c[m].getBoundingClientRect();m+=1;p=$APP.od.i(p,new $APP.P(null,2,[$APP.Qh,q.top,$APP.Qj,
11
- q.top+q.height],null))}}();b=nX(h,g);var k=$APP.N($APP.l(a,"__xScrollStoryRefs"));k=$APP.G(k,$APP.wl).getBoundingClientRect();e=$APP.Yg.i(0,$APP.Zg.i(1,(e-k.top)/(e+k.height)));k=$APP.l(a,"__xScrollStoryLastProg");zX(a,c,b);AX(a,c,h,g);if(k==null||Math.abs(e-k)>.001)a.__xScrollStoryLastProg=e,g=b>=0&&b<d?wX(c[b]):null,xX(a,"x-scroll-story-progress",new $APP.P(null,3,[$APP.dl,e,$APP.Cj,b,$APP.Kk,g],null))}a.__xScrollStoryRAF=null},CX=function(a){return function d(c){if($APP.r(function(){var k=a.isConnected;
5
+ 6,[$APP.bi,b,$APP.Zi,d,SX,e,$APP.xl,g,$APP.Fi,k,$APP.$h,m],null);return $APP.l(a,"__xScrollStoryRefs")},XX=function(a){a=$APP.Q([$APP.Oh,$APP.lj,$APP.hl,$APP.Ah,$APP.tk,$APP.ki,$APP.Ai,$APP.gl,UX],[a.getAttribute("label"),a.getAttribute("autoplay-speed"),$APP.r(a.hasAttribute("autoplay"))?"":null,a.getAttribute("threshold"),a.getAttribute("layout"),$APP.r(a.hasAttribute("autoplay-indicator"))?"":null,$APP.r(a.hasAttribute("disabled"))?"":null,$APP.r(a.hasAttribute("autoplay-loop"))?"":null,a.getAttribute("split")]);
6
+ var b=$APP.N(a);a=$APP.G(b,$APP.Ai);var c=$APP.G(b,$APP.gl),d=$APP.G(b,UX),e=$APP.G(b,$APP.Oh),g=$APP.G(b,$APP.lj),h=$APP.G(b,$APP.hl),k=$APP.G(b,$APP.Ah),m=$APP.G(b,$APP.tk);b=$APP.G(b,$APP.ki);m=typeof m==="string"?m.trim().toLowerCase():null;m=$APP.J(VX,m)?m:"left";return $APP.Q([$APP.Aj,$APP.Wh,$APP.Xk,WX,$APP.T,$APP.di,$APP.W,$APP.mj,$APP.gi],[m,c!=null,OX(k),PX(d),$APP.r(e)?e:"",b!=null,a!=null,QX(g),h!=null])},YX=function(a){a=TX(a);a=$APP.N(a);return $APP.G(a,$APP.Fi).assignedElements()},
7
+ ZX=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},$X=function(a){a=a.getAttribute("id");return typeof a==="string"&&$APP.O(a,"")?a:null},aY=function(a,b,c){b=new CustomEvent(b,{detail:$APP.nh(c),bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},bY=function(a,b){a.textContent=b;setTimeout(function(){return a.textContent=""},3E3)},cY=function(a,b,c){var d=$APP.l(a,"__xScrollStoryActiveIndex");d=$APP.r(d)?d:-1;if($APP.O(d,c)){d>=0&&d<b.length&&
8
+ b[d].removeAttribute("data-active");c>=0&&c<b.length&&b[c].setAttribute("data-active","");c>=0?a.setAttribute("data-active-index",""+$APP.S.g(c)):a.removeAttribute("data-active-index");a.__xScrollStoryActiveIndex=c;var e=d>=0&&d<b.length?$X(b[d]):null;b=c>=0&&c<b.length?$X(b[c]):null;aY(a,"x-scroll-story-step-change",new $APP.P(null,4,[$APP.Eh,c,$APP.Ek,b,$APP.rj,d,$APP.Vl,e],null));a=$APP.N($APP.l(a,"__xScrollStoryRefs"));a=$APP.G(a,$APP.$h);bY(a,"Step "+$APP.S.g(c+1)+" active")}},dY=function(a,
9
+ b,c,d){var e=b.length;var g=$APP.l(a,"__xScrollStoryStepStates");if(!$APP.r($APP.r(g)?$APP.D.i(g.length,e):g)){for(var h=Array(e),k=0;;)if(k<e)h[k]=$APP.r($APP.r(g)?k<g.length:g)?g[k]:!1,k+=1;else break;g=a.__xScrollStoryStepStates=h}for(h=0;;)if(h<e){if(h<$APP.C(c)){k=$APP.rc(c,h);k=$APP.N(k);var m=$APP.G(k,$APP.Qh),p=$APP.G(k,$APP.Rj),q=g[h];k=m<=d&&p>d;var w=$X(b[h]),x=m;m=p-m;m=m<=0?0:$APP.Yg.i(0,$APP.Zg.i(1,(d-x)/m));$APP.t(q)&&k?(g[h]=!0,aY(a,"x-scroll-story-step-enter",new $APP.P(null,3,[$APP.Eh,
10
+ h,$APP.Ek,w,$APP.el,m],null))):$APP.r($APP.r(q)?!k:q)&&(g[h]=!1,aY(a,"x-scroll-story-step-leave",new $APP.P(null,3,[$APP.Eh,h,$APP.Ek,w,$APP.el,m],null)))}h+=1}else break},eY=function(a){var b=function(){var m=$APP.l(a,"__xScrollStoryModel");return $APP.r(m)?m:XX(a)}();if(!$APP.r($APP.W.g(b))){var c=YX(a),d=c.length,e=window.innerHeight,g=e*$APP.Xk.g(b),h=function(){for(var m=0,p=$APP.ie;;){if(m>=d)return p;var q=c[m].getBoundingClientRect();m+=1;p=$APP.od.i(p,new $APP.P(null,2,[$APP.Qh,q.top,$APP.Rj,
11
+ q.top+q.height],null))}}();b=RX(h,g);var k=$APP.N($APP.l(a,"__xScrollStoryRefs"));k=$APP.G(k,$APP.xl).getBoundingClientRect();e=$APP.Yg.i(0,$APP.Zg.i(1,(e-k.top)/(e+k.height)));k=$APP.l(a,"__xScrollStoryLastProg");cY(a,c,b);dY(a,c,h,g);if(k==null||Math.abs(e-k)>.001)a.__xScrollStoryLastProg=e,g=b>=0&&b<d?$X(c[b]):null,aY(a,"x-scroll-story-progress",new $APP.P(null,3,[$APP.el,e,$APP.Cj,b,$APP.Lk,g],null))}a.__xScrollStoryRAF=null},fY=function(a){return function d(c){if($APP.r(function(){var k=a.isConnected;
12
12
  return $APP.r(k)?(k=$APP.l(a,"__xScrollStoryVisible"),$APP.r(k)?$APP.t($APP.l(a,"__xScrollStoryAutoplayPaused")):k):k}())){var e=$APP.l(a,"__xScrollStoryModel");if($APP.r(function(){if($APP.r(e)){var k=$APP.gi.g(e);return $APP.r(k)?$APP.t($APP.W.g(e)):k}return e}())){var g=$APP.l(a,"__xScrollStoryAutoplayLast");g=$APP.r(g)?(c-g)/1E3:0;a.__xScrollStoryAutoplayLast=c;if(g>0){var h=window.scrollY;window.scrollBy(0,$APP.mj.g(e)*g);$APP.r(function(){var k=$APP.Wh.g(e);return $APP.r(k)?window.scrollY-h<
13
- .5:k}())&&(c=a.getBoundingClientRect().top+window.scrollY,window.scrollTo(0,c),a.__xScrollStoryAutoplayLast=null)}return $APP.n(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(d))}}return null}},DX=function(a){if($APP.r($APP.l(a,"__xScrollStoryAutoplayPaused")))return null;a.__xScrollStoryAutoplayPaused=!0;var b=$APP.l(a,"__xScrollStoryAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStoryAutoplayRAF=null);a.setAttribute("data-autoplay-paused","");b=function(){var e=$APP.l(a,"__xScrollStoryLastProg");
14
- return $APP.r(e)?e:0}();var c=function(){var e=$APP.l(a,"__xScrollStoryActiveIndex");return $APP.r(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?wX(d[c]):null;return xX(a,"x-scroll-story-autoplay-pause",new $APP.P(null,3,[$APP.dl,b,$APP.Cj,c,$APP.Kk,d],null))},EX=function(a){if($APP.r($APP.l(a,"__xScrollStoryAutoplayPaused"))){a.__xScrollStoryAutoplayPaused=!1;a.removeAttribute("data-autoplay-paused");a.__xScrollStoryAutoplayLast=null;$APP.n(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(CX(a)));
15
- var b=function(){var e=$APP.l(a,"__xScrollStoryLastProg");return $APP.r(e)?e:0}(),c=function(){var e=$APP.l(a,"__xScrollStoryActiveIndex");return $APP.r(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?wX(d[c]):null;return xX(a,"x-scroll-story-autoplay-resume",new $APP.P(null,3,[$APP.dl,b,$APP.Cj,c,$APP.Kk,d],null))}return null},FX=function(a){var b=$APP.l(a,"__xScrollStoryAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStoryAutoplayRAF=null);b=$APP.l(a,"__xScrollStoryAutoplayHandlers");$APP.r(b)&&
16
- (a.removeEventListener("mousedown",$APP.l(b,"mousedown")),a.removeEventListener("mouseup",$APP.l(b,"mouseup")),a.removeEventListener("mouseleave",$APP.l(b,"mouseleave")),a.removeEventListener("touchstart",$APP.l(b,"touchstart")),a.removeEventListener("touchend",$APP.l(b,"touchend")),a.removeEventListener("keydown",$APP.l(b,"keydown")),a.removeEventListener("keyup",$APP.l(b,"keyup")),a.__xScrollStoryAutoplayHandlers=null);a.removeAttribute("data-autoplay-paused");a.removeAttribute("tabindex");a.__xScrollStoryAutoplayPaused=
17
- !1;a.__xScrollStoryAutoplayLast=null},GX=function(a){if($APP.l(a,"__xScrollStoryAutoplayRAF")==null){var b=$APP.l(a,"__xScrollStoryModel");if($APP.r(function(){if($APP.r(b)){var p=$APP.gi.g(b);return $APP.r(p)?(p=$APP.t($APP.W.g(b)))?(p=$APP.l(a,"__xScrollStoryVisible"),$APP.r(p)?!vX():p):p:p}return b}())){a.setAttribute("tabindex","0");a.__xScrollStoryAutoplayPaused=!1;a.__xScrollStoryAutoplayLast=null;var c=function(){return DX(a)},d=function(){return EX(a)},e=function(){return $APP.r($APP.l(a,
18
- "__xScrollStoryAutoplayPaused"))?EX(a):null},g=function(){return DX(a)},h=function(){return EX(a)},k=function(p){return $APP.D.i(p.code,"Space")?(p.preventDefault(),DX(a)):null},m=function(p){return $APP.D.i(p.code,"Space")?EX(a):null};a.addEventListener("mousedown",c);a.addEventListener("mouseup",d);a.addEventListener("mouseleave",e);a.addEventListener("touchstart",g,{passive:!0});a.addEventListener("touchend",h,{passive:!0});a.addEventListener("keydown",k);a.addEventListener("keyup",m);$APP.n(a,
19
- "__xScrollStoryAutoplayHandlers",{mousedown:c,mouseup:d,mouseleave:e,touchstart:g,touchend:h,keydown:k,keyup:m});$APP.n(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(CX(a)))}}return null},HX=function(a){a=$APP.l(a,"__xScrollStoryModel");return $APP.r(a)?$APP.W.g(a):a},IX=function(a){return $APP.r(function(){var b=a.isConnected;return $APP.r(b)?(b=$APP.l(a,"__xScrollStoryVisible"),$APP.r(b)?$APP.t(HX(a))&&!vX():b):b}())?$APP.r($APP.l(a,"__xScrollStoryRAF"))?null:$APP.n(a,"__xScrollStoryRAF",
20
- requestAnimationFrame(function(){return BX(a)})):null},JX=function(a){a=$APP.l(a,"__xScrollStoryHandlers");$APP.r($APP.r(a)?$APP.t($APP.l(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},KX=function(a){a=$APP.l(a,"__xScrollStoryHandlers");$APP.r($APP.r(a)?$APP.l(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1)},LX=function(a,b){b=b[0].isIntersecting;var c=$APP.N($APP.l(a,"__xScrollStoryRefs"));
21
- c=$APP.G(c,$APP.$h);a.__xScrollStoryVisible=b;if($APP.r(b)){if($APP.r(HX(a)))return null;JX(a);BX(a);yX(c,"Story section entered viewport");xX(a,"x-scroll-story-enter",new $APP.P(null,1,[$APP.dl,function(){var d=$APP.l(a,"__xScrollStoryLastProg");return $APP.r(d)?d:0}()],null));b=$APP.l(a,"__xScrollStoryModel");return $APP.r($APP.r(b)?$APP.gi.g(b):b)?GX(a):null}KX(a);FX(a);if($APP.r(HX(a)))return null;yX(c,"Story section left viewport");return xX(a,"x-scroll-story-leave",new $APP.P(null,1,[$APP.dl,
22
- function(){var d=$APP.l(a,"__xScrollStoryLastProg");return $APP.r(d)?d:0}()],null))},MX=function(a){function b(){return $APP.r($APP.l(a,"__xScrollStoryVisible"))?(a.__xScrollStoryStepStates=null,BX(a)):null}function c(){a.__xScrollStoryStepStates=null;return $APP.r($APP.l(a,"__xScrollStoryVisible"))?BX(a):null}var d=pX(a);d=$APP.N(d);$APP.G(d,$APP.Fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.n(a,"__xScrollStoryHandlers",{scroll:function(){return IX(a)},slot:c,resize:b,
23
- scrollAttached:!1})},NX=function(a){var b=$APP.l(a,"__xScrollStoryHandlers");if($APP.r(b)){KX(a);var c=$APP.l(a,"__xScrollStoryRefs");if($APP.r(c)){c=$APP.Fi.g(c);var d=$APP.l(b,"slot");$APP.r(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.r(b)&&window.removeEventListener("resize",b)}b=$APP.l(a,"__xScrollStoryRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStoryRAF=null);a.__xScrollStoryHandlers=null},OX=function(a){var b=$APP.l(a,"__xScrollStoryIO");$APP.r(b)&&b.disconnect();
24
- b=new IntersectionObserver(function(c){return LX(a,c)},{threshold:[0]});b.observe(a);a.__xScrollStoryIO=b},PX=function(a){a=uX(a);for(var b=a.length,c=0;;)if(c<b)a[c].removeAttribute("data-active"),c+=1;else break},QX=function(a){var b=tX(a);if($APP.O($APP.l(a,"__xScrollStoryModel"),b)){var c=$APP.N(b),d=$APP.G(c,$APP.Aj),e=$APP.G(c,sX);b=$APP.G(c,$APP.W);var g=$APP.G(c,$APP.T),h=pX(a);h=$APP.N(h);var k=$APP.G(h,$APP.Zi),m=$APP.G(h,oX);$APP.G(h,$APP.$h);a.setAttribute("data-layout",d);$APP.D.i(d,
25
- "top")?m.style.width="":m.style.width="var(--x-scroll-story-media-width,"+$APP.S.g(e*100)+"%)";$APP.u(g)?k.setAttribute("aria-label",g):k.removeAttribute("aria-label");a.__xScrollStoryModel=c;$APP.r(b)?(PX(a),a.__xScrollStoryActiveIndex=-1,a.__xScrollStoryStepStates=null,KX(a),FX(a)):$APP.r($APP.l(a,"__xScrollStoryVisible"))&&(JX(a),BX(a));c=$APP.gi.g(c);b=$APP.r(c)?(b=$APP.t(b))?$APP.l(a,"__xScrollStoryVisible"):b:c;$APP.r(b)?GX(a):FX(a)}},RX=function(a){Object.defineProperty(a,"layout",{get:function(){var b=
26
- this.getAttribute("layout");return $APP.r(b)?b:"left"},set:function(b){return $APP.r(b)?this.setAttribute("layout",""+$APP.S.g(b)):this.removeAttribute("layout")},enumerable:!0,configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return kX(this.getAttribute("threshold"))},set:function(b){return b!=null?this.setAttribute("threshold",""+$APP.S.g(b)):this.removeAttribute("threshold")},enumerable:!0,configurable:!0});Object.defineProperty(a,"split",{get:function(){return lX(this.getAttribute("split"))},
27
- set:function(b){return b!=null?this.setAttribute("split",""+$APP.S.g(b)):this.removeAttribute("split")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:""},set:function(b){return $APP.r($APP.r(b)?
28
- $APP.O(b,""):b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"activeIndex",{get:function(){var b=$APP.l(this,"__xScrollStoryActiveIndex");return b!=null?b:-1},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.l(this,"__xScrollStoryLastProg");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplay",{get:function(){return this.hasAttribute("autoplay")},
29
- set:function(b){return $APP.r(b)?this.setAttribute("autoplay",""):this.removeAttribute("autoplay")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplaySpeed",{get:function(){return mX(this.getAttribute("autoplay-speed"))},set:function(b){return b!=null?this.setAttribute("autoplay-speed",""+$APP.S.g(b)):this.removeAttribute("autoplay-speed")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayLoop",{get:function(){return this.hasAttribute("autoplay-loop")},set:function(b){return $APP.r(b)?
30
- this.setAttribute("autoplay-loop",""):this.removeAttribute("autoplay-loop")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayIndicator",{get:function(){return this.hasAttribute("autoplay-indicator")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay-indicator",""):this.removeAttribute("autoplay-indicator")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayPaused",{get:function(){return $APP.I($APP.l(this,"__xScrollStoryAutoplayPaused"))},enumerable:!0,configurable:!0})},
31
- TX=function(){var a=class extends HTMLElement{};a.observedAttributes=SX;a.prototype.connectedCallback=function(){pX(this);NX(this);MX(this);OX(this);QX(this);return null};a.prototype.disconnectedCallback=function(){FX(this);PX(this);if($APP.r($APP.l(this,"__xScrollStoryVisible"))){var b=$APP.l(this,"__xScrollStoryLastProg");xX(this,"x-scroll-story-leave",new $APP.P(null,1,[$APP.dl,$APP.r(b)?b:0],null))}NX(this);b=$APP.l(this,"__xScrollStoryIO");$APP.r(b)&&(b.disconnect(),this.__xScrollStoryIO=null);
32
- this.__xScrollStoryVisible=!1;this.__xScrollStoryActiveIndex=-1;return this.__xScrollStoryStepStates=this.__xScrollStoryLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&QX(this);return null};RX(a.prototype);return a},UX=function(){$APP.r(customElements.get("x-scroll-story"))||customElements.define("x-scroll-story",TX());return null},oX=new $APP.M(null,"media","media",-1066138403),qX=new $APP.M(null,"split-raw","split-raw",-455766786),sX=new $APP.M(null,"split","split",
33
- -599435118);var SX="layout threshold split disabled label autoplay autoplay-speed autoplay-loop autoplay-indicator".split(" ");
34
- $APP.Q([$APP.zk,$APP.ph,$APP.Uj,$APP.gj,$APP.Aj,$APP.Cj,$APP.Wk,$APP.Bl,sX,$APP.T,$APP.Nj,$APP.dl],[new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,
35
- 1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null)]);
36
- $APP.Sd(["x-scroll-story-step-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,4,[$APP.Eh,$APP.V,$APP.Dk,$APP.Y,$APP.rj,$APP.V,$APP.Ul,$APP.Y],null),$APP.kl,!1],null),"x-scroll-story-step-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Dk,$APP.Y,$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-scroll-story-step-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Dk,$APP.Y,$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-scroll-story-progress",new $APP.P(null,2,[$APP.U,
37
- new $APP.P(null,3,[$APP.dl,$APP.V,$APP.Cj,$APP.V,$APP.Kk,$APP.Y],null),$APP.kl,!1],null),"x-scroll-story-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-scroll-story-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-scroll-story-autoplay-pause",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.dl,$APP.V,$APP.Cj,$APP.V,$APP.Kk,$APP.Y],null),$APP.kl,!1],null),"x-scroll-story-autoplay-resume",new $APP.P(null,
38
- 2,[$APP.U,new $APP.P(null,3,[$APP.dl,$APP.V,$APP.Cj,$APP.V,$APP.Kk,$APP.Y],null),$APP.kl,!1],null)]);var rX=new $APP.R(null,new $APP.P(null,3,["right",null,"top",null,"left",null],null),null);$APP.ka("baredom.exports.x_scroll_story.init",UX);export const init=UX;
13
+ .5:k}())&&(c=a.getBoundingClientRect().top+window.scrollY,window.scrollTo(0,c),a.__xScrollStoryAutoplayLast=null)}return $APP.n(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(d))}}return null}},gY=function(a){if($APP.r($APP.l(a,"__xScrollStoryAutoplayPaused")))return null;a.__xScrollStoryAutoplayPaused=!0;var b=$APP.l(a,"__xScrollStoryAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStoryAutoplayRAF=null);a.setAttribute("data-autoplay-paused","");b=function(){var e=$APP.l(a,"__xScrollStoryLastProg");
14
+ return $APP.r(e)?e:0}();var c=function(){var e=$APP.l(a,"__xScrollStoryActiveIndex");return $APP.r(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?$X(d[c]):null;return aY(a,"x-scroll-story-autoplay-pause",new $APP.P(null,3,[$APP.el,b,$APP.Cj,c,$APP.Lk,d],null))},hY=function(a){if($APP.r($APP.l(a,"__xScrollStoryAutoplayPaused"))){a.__xScrollStoryAutoplayPaused=!1;a.removeAttribute("data-autoplay-paused");a.__xScrollStoryAutoplayLast=null;$APP.n(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(fY(a)));
15
+ var b=function(){var e=$APP.l(a,"__xScrollStoryLastProg");return $APP.r(e)?e:0}(),c=function(){var e=$APP.l(a,"__xScrollStoryActiveIndex");return $APP.r(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?$X(d[c]):null;return aY(a,"x-scroll-story-autoplay-resume",new $APP.P(null,3,[$APP.el,b,$APP.Cj,c,$APP.Lk,d],null))}return null},iY=function(a){var b=$APP.l(a,"__xScrollStoryAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStoryAutoplayRAF=null);b=$APP.l(a,"__xScrollStoryAutoplayHandlers");$APP.r(b)&&
16
+ (a.removeEventListener("pointerdown",$APP.l(b,"pointerdown")),a.removeEventListener("pointerup",$APP.l(b,"pointerup")),a.removeEventListener("pointerleave",$APP.l(b,"pointerleave")),a.removeEventListener("keydown",$APP.l(b,"keydown")),a.removeEventListener("keyup",$APP.l(b,"keyup")),a.__xScrollStoryAutoplayHandlers=null);a.removeAttribute("data-autoplay-paused");a.removeAttribute("tabindex");a.__xScrollStoryAutoplayPaused=!1;a.__xScrollStoryAutoplayLast=null},jY=function(a){if($APP.l(a,"__xScrollStoryAutoplayRAF")==
17
+ null){var b=$APP.l(a,"__xScrollStoryModel");if($APP.r(function(){if($APP.r(b)){var k=$APP.gi.g(b);return $APP.r(k)?(k=$APP.t($APP.W.g(b)))?(k=$APP.l(a,"__xScrollStoryVisible"),$APP.r(k)?!ZX():k):k:k}return b}())){a.setAttribute("tabindex","0");a.__xScrollStoryAutoplayPaused=!1;a.__xScrollStoryAutoplayLast=null;var c=function(){return gY(a)},d=function(){return hY(a)},e=function(){return $APP.r($APP.l(a,"__xScrollStoryAutoplayPaused"))?hY(a):null},g=function(k){return $APP.D.i(k.code,"Space")?(k.preventDefault(),
18
+ gY(a)):null},h=function(k){return $APP.D.i(k.code,"Space")?hY(a):null};a.addEventListener("pointerdown",c);a.addEventListener("pointerup",d);a.addEventListener("pointerleave",e);a.addEventListener("keydown",g);a.addEventListener("keyup",h);$APP.n(a,"__xScrollStoryAutoplayHandlers",{pointerdown:c,pointerup:d,pointerleave:e,keydown:g,keyup:h});$APP.n(a,"__xScrollStoryAutoplayRAF",requestAnimationFrame(fY(a)))}}return null},kY=function(a){a=$APP.l(a,"__xScrollStoryModel");return $APP.r(a)?$APP.W.g(a):
19
+ a},lY=function(a){return $APP.r(function(){var b=a.isConnected;return $APP.r(b)?(b=$APP.l(a,"__xScrollStoryVisible"),$APP.r(b)?$APP.t(kY(a))&&!ZX():b):b}())?$APP.r($APP.l(a,"__xScrollStoryRAF"))?null:$APP.n(a,"__xScrollStoryRAF",requestAnimationFrame(function(){return eY(a)})):null},mY=function(a){a=$APP.l(a,"__xScrollStoryHandlers");$APP.r($APP.r(a)?$APP.t($APP.l(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},nY=function(a){a=$APP.l(a,
20
+ "__xScrollStoryHandlers");$APP.r($APP.r(a)?$APP.l(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1)},oY=function(a,b){b=b[0].isIntersecting;var c=$APP.N($APP.l(a,"__xScrollStoryRefs"));c=$APP.G(c,$APP.$h);a.__xScrollStoryVisible=b;if($APP.r(b)){if($APP.r(kY(a)))return null;mY(a);eY(a);bY(c,"Story section entered viewport");aY(a,"x-scroll-story-enter",new $APP.P(null,1,[$APP.el,function(){var d=$APP.l(a,"__xScrollStoryLastProg");return $APP.r(d)?
21
+ d:0}()],null));b=$APP.l(a,"__xScrollStoryModel");return $APP.r($APP.r(b)?$APP.gi.g(b):b)?jY(a):null}nY(a);iY(a);if($APP.r(kY(a)))return null;bY(c,"Story section left viewport");return aY(a,"x-scroll-story-leave",new $APP.P(null,1,[$APP.el,function(){var d=$APP.l(a,"__xScrollStoryLastProg");return $APP.r(d)?d:0}()],null))},pY=function(a){function b(){return $APP.r($APP.l(a,"__xScrollStoryVisible"))?(a.__xScrollStoryStepStates=null,eY(a)):null}function c(){a.__xScrollStoryStepStates=null;return $APP.r($APP.l(a,
22
+ "__xScrollStoryVisible"))?eY(a):null}var d=TX(a);d=$APP.N(d);$APP.G(d,$APP.Fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.n(a,"__xScrollStoryHandlers",{scroll:function(){return lY(a)},slot:c,resize:b,scrollAttached:!1})},qY=function(a){var b=$APP.l(a,"__xScrollStoryHandlers");if($APP.r(b)){nY(a);var c=$APP.l(a,"__xScrollStoryRefs");if($APP.r(c)){c=$APP.Fi.g(c);var d=$APP.l(b,"slot");$APP.r(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.r(b)&&window.removeEventListener("resize",
23
+ b)}b=$APP.l(a,"__xScrollStoryRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollStoryRAF=null);a.__xScrollStoryHandlers=null},rY=function(a){var b=$APP.l(a,"__xScrollStoryIO");$APP.r(b)&&b.disconnect();b=new IntersectionObserver(function(c){return oY(a,c)},{threshold:[0]});b.observe(a);a.__xScrollStoryIO=b},sY=function(a){a=YX(a);for(var b=a.length,c=0;;)if(c<b)a[c].removeAttribute("data-active"),c+=1;else break},tY=function(a){var b=XX(a);if($APP.O($APP.l(a,"__xScrollStoryModel"),b)){var c=$APP.N(b),
24
+ d=$APP.G(c,$APP.Aj),e=$APP.G(c,WX);b=$APP.G(c,$APP.W);var g=$APP.G(c,$APP.T),h=TX(a);h=$APP.N(h);var k=$APP.G(h,$APP.Zi),m=$APP.G(h,SX);$APP.G(h,$APP.$h);a.setAttribute("data-layout",d);$APP.D.i(d,"top")?m.style.width="":m.style.width="var(--x-scroll-story-media-width,"+$APP.S.g(e*100)+"%)";$APP.u(g)?k.setAttribute("aria-label",g):k.removeAttribute("aria-label");a.__xScrollStoryModel=c;$APP.r(b)?(sY(a),a.__xScrollStoryActiveIndex=-1,a.__xScrollStoryStepStates=null,nY(a),iY(a)):$APP.r($APP.l(a,"__xScrollStoryVisible"))&&
25
+ (mY(a),eY(a));c=$APP.gi.g(c);b=$APP.r(c)?(b=$APP.t(b))?$APP.l(a,"__xScrollStoryVisible"):b:c;$APP.r(b)?jY(a):iY(a)}},uY=function(a){Object.defineProperty(a,"layout",{get:function(){var b=this.getAttribute("layout");return $APP.r(b)?b:"left"},set:function(b){return $APP.r(b)?this.setAttribute("layout",""+$APP.S.g(b)):this.removeAttribute("layout")},enumerable:!0,configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return OX(this.getAttribute("threshold"))},set:function(b){return b!=
26
+ null?this.setAttribute("threshold",""+$APP.S.g(b)):this.removeAttribute("threshold")},enumerable:!0,configurable:!0});Object.defineProperty(a,"split",{get:function(){return PX(this.getAttribute("split"))},set:function(b){return b!=null?this.setAttribute("split",""+$APP.S.g(b)):this.removeAttribute("split")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},
27
+ enumerable:!0,configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:""},set:function(b){return $APP.r($APP.r(b)?$APP.O(b,""):b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"activeIndex",{get:function(){var b=$APP.l(this,"__xScrollStoryActiveIndex");return b!=null?b:-1},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=
28
+ $APP.l(this,"__xScrollStoryLastProg");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplay",{get:function(){return this.hasAttribute("autoplay")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay",""):this.removeAttribute("autoplay")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplaySpeed",{get:function(){return QX(this.getAttribute("autoplay-speed"))},set:function(b){return b!=null?this.setAttribute("autoplay-speed",""+$APP.S.g(b)):this.removeAttribute("autoplay-speed")},
29
+ enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayLoop",{get:function(){return this.hasAttribute("autoplay-loop")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay-loop",""):this.removeAttribute("autoplay-loop")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayIndicator",{get:function(){return this.hasAttribute("autoplay-indicator")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay-indicator",""):this.removeAttribute("autoplay-indicator")},enumerable:!0,
30
+ configurable:!0});Object.defineProperty(a,"autoplayPaused",{get:function(){return $APP.I($APP.l(this,"__xScrollStoryAutoplayPaused"))},enumerable:!0,configurable:!0})},wY=function(){var a=class extends HTMLElement{};a.observedAttributes=vY;a.prototype.connectedCallback=function(){TX(this);qY(this);pY(this);rY(this);tY(this);return null};a.prototype.disconnectedCallback=function(){iY(this);sY(this);if($APP.r($APP.l(this,"__xScrollStoryVisible"))){var b=$APP.l(this,"__xScrollStoryLastProg");aY(this,
31
+ "x-scroll-story-leave",new $APP.P(null,1,[$APP.el,$APP.r(b)?b:0],null))}qY(this);b=$APP.l(this,"__xScrollStoryIO");$APP.r(b)&&(b.disconnect(),this.__xScrollStoryIO=null);this.__xScrollStoryVisible=!1;this.__xScrollStoryActiveIndex=-1;return this.__xScrollStoryStepStates=this.__xScrollStoryLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&tY(this);return null};uY(a.prototype);return a},xY=function(){$APP.r(customElements.get("x-scroll-story"))||customElements.define("x-scroll-story",
32
+ wY());return null},SX=new $APP.K(null,"media","media",-1066138403),UX=new $APP.K(null,"split-raw","split-raw",-455766786),WX=new $APP.K(null,"split","split",-599435118);var vY="layout threshold split disabled label autoplay autoplay-speed autoplay-loop autoplay-indicator".split(" ");
33
+ $APP.Q([$APP.Ak,$APP.ph,$APP.Vj,$APP.gj,$APP.Aj,$APP.Cj,$APP.Xk,$APP.Cl,WX,$APP.T,$APP.Oj,$APP.el],[new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,
34
+ 1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null)]);
35
+ $APP.Sd(["x-scroll-story-step-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,4,[$APP.Eh,$APP.V,$APP.Ek,$APP.X,$APP.rj,$APP.V,$APP.Vl,$APP.X],null),$APP.ll,!1],null),"x-scroll-story-step-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Ek,$APP.X,$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-story-step-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Ek,$APP.X,$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-story-progress",new $APP.P(null,2,[$APP.U,
36
+ new $APP.P(null,3,[$APP.el,$APP.V,$APP.Cj,$APP.V,$APP.Lk,$APP.X],null),$APP.ll,!1],null),"x-scroll-story-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-story-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-story-autoplay-pause",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.el,$APP.V,$APP.Cj,$APP.V,$APP.Lk,$APP.X],null),$APP.ll,!1],null),"x-scroll-story-autoplay-resume",new $APP.P(null,
37
+ 2,[$APP.U,new $APP.P(null,3,[$APP.el,$APP.V,$APP.Cj,$APP.V,$APP.Lk,$APP.X],null),$APP.ll,!1],null)]);var VX=new $APP.R(null,new $APP.P(null,3,["right",null,"top",null,"left",null],null),null);$APP.ka("baredom.exports.x_scroll_story.init",xY);export const init=xY;
@@ -1,51 +1,48 @@
1
1
  import { $APP, shadow$provide } from "./base.js";
2
- var Ru=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?.5:$APP.Yg.i(0,$APP.Zg.i(1,a))):.5},Su=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?50:$APP.Yg.i(1,$APP.Zg.i(1E3,a))):50},Tu=function(a,b){switch(a){case "alternating":return $APP.hd(b,2)===0?"left":"right";case "left":return"right";case "right":return"left";default:return"right"}},Uu=function(a,b){var c=$APP.B(a);if(c===0)return-1;for(var d=0,e=-1,g=-1;;){if(d>=c)return e>=0?
3
- e:g;var h=$APP.rc(a,d),k=$APP.N(h);h=$APP.G(k,$APP.Qh);k=$APP.G(k,$APP.Qj);e=h<=b&&k>b?d:e;g=h<=b?d:g;d+=1}},Vu=function(a,b,c){return b<=0?0:$APP.Yg.i(0,$APP.Zg.i(1,(c-a)/b))},Xu=function(a,b,c){var d=$APP.B(a);if(d===0)return"";if($APP.D.i(d,1))return a=$APP.v(a),a=$APP.N(a),a=$APP.G(a,$APP.Nk),"M "+$APP.S.g(c)+" "+$APP.S.g(a);var e=$APP.v(a),g=$APP.Nk.g(e);e=0;for(g=new $APP.ve(null,1,5,$APP.we,["M "+$APP.S.g(c)+" "+$APP.S.g(g)],null);;){if(e>=d-1)return $APP.Jg(g);var h=$APP.rc(a,e),k=$APP.rc(a,
4
- e+1),m=$APP.Nk.g(h),p=$APP.Nk.g(k);h=Wu.g(h);var q=Wu.g(k);k=$APP.D.i(h,"left")?-b:b;q=$APP.D.i(q,"left")?-b:b;h=m+(p-m)*.33;q=c+q;m+=(p-m)*.66;var w=c;e+=1;g=$APP.od.i(g,"C "+$APP.S.g(c+k)+" "+$APP.S.g(h)+" "+$APP.S.g(q)+" "+$APP.S.g(m)+" "+$APP.S.g(w)+" "+$APP.S.g(p))}},ev=function(a){var b=$APP.l(a,"__xScrollTimelineRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),
5
- h=document.createElement("div"),k=document.createElementNS("http://www.w3.org/2000/svg","svg"),m=document.createElementNS("http://www.w3.org/2000/svg","path"),p=document.createElementNS("http://www.w3.org/2000/svg","path"),q=document.createElement("div"),w=document.createElement("slot"),x=document.createElement("div"),y=document.createElement("div");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-timeline-track-color:rgba(0,0,0,0.12);--x-scroll-timeline-track-fill-color:#3b82f6;--x-scroll-timeline-track-width:3px;--x-scroll-timeline-marker-size:14px;--x-scroll-timeline-marker-color:rgba(0,0,0,0.15);--x-scroll-timeline-marker-active-color:#3b82f6;--x-scroll-timeline-marker-border-color:#3b82f6;--x-scroll-timeline-entry-gap:2rem;--x-scroll-timeline-date-color:rgba(0,0,0,0.5);--x-scroll-timeline-date-font-size:0.8125rem;--x-scroll-timeline-transition-duration:300ms;--x-scroll-timeline-curve-amplitude:60;--x-scroll-timeline-disabled-opacity:0.55;}@media (prefers-color-scheme:dark){:host{--x-scroll-timeline-track-color:rgba(255,255,255,0.12);--x-scroll-timeline-marker-color:rgba(255,255,255,0.18);--x-scroll-timeline-date-color:rgba(255,255,255,0.5);}}[part\x3dcontainer]{position:relative;padding:0;}[part\x3dtrack]{position:absolute;top:0;bottom:0;left:50%;transform:translateX(-50%);width:var(--x-scroll-timeline-track-width);pointer-events:none;z-index:1;}:host([data-layout\x3dleft]) [part\x3dtrack]{left:calc(var(--x-scroll-timeline-marker-size) / 2);transform:none;}:host([data-layout\x3dright]) [part\x3dtrack]{left:auto;right:calc(var(--x-scroll-timeline-marker-size) / 2);transform:none;}[part\x3dtrack-line]{position:absolute;top:0;bottom:0;left:0;right:0;background:var(--x-scroll-timeline-track-color);border-radius:999px;}[part\x3dtrack-fill]{position:absolute;top:0;left:0;right:0;height:0%;background:var(--x-scroll-timeline-track-fill-color);border-radius:999px;transition:height 60ms linear;}[part\x3dtrack-svg]{display:none;position:absolute;top:0;left:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:1;}:host([data-track\x3dcurved]) [part\x3dtrack-line],:host([data-track\x3dcurved]) [part\x3dtrack-fill]{display:none;}:host([data-track\x3dcurved]) [part\x3dtrack-svg]{display:block;}[part\x3dtrack-path]{fill:none;stroke:var(--x-scroll-timeline-track-color);stroke-width:3px;stroke-linecap:round;}[part\x3dtrack-fill-path]{fill:none;stroke:var(--x-scroll-timeline-track-fill-color);stroke-width:3px;stroke-linecap:round;transition:stroke-dashoffset 60ms linear;}[part\x3dentries]{position:relative;z-index:2;}::slotted(*){display:block;margin-bottom:var(--x-scroll-timeline-entry-gap);opacity:0.4;transition:opacity var(--x-scroll-timeline-transition-duration) ease;}::slotted(:last-child){margin-bottom:0;}::slotted([data-active]){opacity:1;}:host([data-layout\x3dalternating]) ::slotted(*){width:calc(50% - var(--x-scroll-timeline-marker-size));}:host([data-layout\x3dalternating]) ::slotted([data-side\x3dleft]){margin-left:0;margin-right:auto;text-align:right;padding-right:1.5rem;}:host([data-layout\x3dalternating]) ::slotted([data-side\x3dright]){margin-left:auto;margin-right:0;text-align:left;padding-left:1.5rem;}:host([data-layout\x3dleft]) ::slotted(*){margin-left:calc(var(--x-scroll-timeline-marker-size) + 1.5rem);width:auto;}:host([data-layout\x3dright]) ::slotted(*){margin-right:calc(var(--x-scroll-timeline-marker-size) + 1.5rem);width:auto;text-align:right;}.tl-marker{position:absolute;z-index:3;width:var(--x-scroll-timeline-marker-size);height:var(--x-scroll-timeline-marker-size);border-radius:50%;background:var(--x-scroll-timeline-marker-color);border:2px solid transparent;transform:translate(-50%,-50%);transition:background var(--x-scroll-timeline-transition-duration) ease,border-color var(--x-scroll-timeline-transition-duration) ease,box-shadow var(--x-scroll-timeline-transition-duration) ease;}.tl-marker[data-active]{background:var(--x-scroll-timeline-marker-active-color);border-color:var(--x-scroll-timeline-marker-active-color);box-shadow:0 0 0 3px rgba(59,130,246,0.25);}:host([data-marker\x3dring]) .tl-marker{background:transparent;border:2px solid var(--x-scroll-timeline-marker-color);}:host([data-marker\x3dring]) .tl-marker[data-active]{background:var(--x-scroll-timeline-marker-active-color);border-color:var(--x-scroll-timeline-marker-active-color);}:host([data-marker\x3dnone]) .tl-marker{display:none;}.tl-marker{left:50%;}:host([data-layout\x3dleft]) .tl-marker{left:calc(var(--x-scroll-timeline-marker-size) / 2);}:host([data-layout\x3dright]) .tl-marker{left:auto;right:calc(var(--x-scroll-timeline-marker-size) / 2);transform:translate(50%,-50%);}.tl-date{position:absolute;z-index:3;font-size:var(--x-scroll-timeline-date-font-size);color:var(--x-scroll-timeline-date-color);white-space:nowrap;transform:translateY(-50%);transition:color var(--x-scroll-timeline-transition-duration) ease;}.tl-date[data-active]{color:var(--x-scroll-timeline-marker-active-color);font-weight:600;}:host([data-layout\x3dalternating]) .tl-date[data-side\x3dleft]{left:calc(50% + var(--x-scroll-timeline-marker-size));padding-left:0.5rem;}:host([data-layout\x3dalternating]) .tl-date[data-side\x3dright]{right:calc(50% + var(--x-scroll-timeline-marker-size));padding-right:0.5rem;text-align:right;}:host([data-layout\x3dleft]) .tl-date{left:calc(var(--x-scroll-timeline-marker-size) + 0.5rem);}:host([data-layout\x3dright]) .tl-date{right:calc(var(--x-scroll-timeline-marker-size) + 0.5rem);text-align:right;}:host([disabled]){opacity:var(--x-scroll-timeline-disabled-opacity);}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}[part\x3dindicator]{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;width:48px;height:48px;opacity:0.7;z-index:4;}[part\x3dindicator]::before,[part\x3dindicator]::after{content:'';position:absolute;top:8px;width:12px;height:32px;background:rgba(255,255,255,0.9);border-radius:3px;}[part\x3dindicator]::before{left:8px;}[part\x3dindicator]::after{right:8px;}:host([data-autoplay-paused][autoplay-indicator]) [part\x3dindicator]{display:block;}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}.tl-marker{transition:none !important;}.tl-date{transition:none !important;}[part\x3dtrack-fill]{transition:none !important;}[part\x3dtrack-fill-path]{transition:none !important;}}";
2
+ var Su=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?.5:$APP.Yg.i(0,$APP.Zg.i(1,a))):.5},Tu=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.r(isNaN(a))?50:$APP.Yg.i(1,$APP.Zg.i(1E3,a))):50},Uu=function(a,b){switch(a){case "alternating":return $APP.hd(b,2)===0?"left":"right";case "left":return"right";case "right":return"left";default:return"right"}},Vu=function(a,b){var c=$APP.C(a);if(c===0)return-1;for(var d=0,e=-1,g=-1;;){if(d>=c)return e>=0?
3
+ e:g;var h=$APP.rc(a,d),k=$APP.N(h);h=$APP.G(k,$APP.Qh);k=$APP.G(k,$APP.Rj);e=h<=b&&k>b?d:e;g=h<=b?d:g;d+=1}},Wu=function(a,b,c){return b<=0?0:$APP.Yg.i(0,$APP.Zg.i(1,(c-a)/b))},Yu=function(a,b,c){var d=$APP.C(a);if(d===0)return"";if($APP.D.i(d,1))return a=$APP.v(a),a=$APP.N(a),a=$APP.G(a,$APP.Ok),"M "+$APP.S.g(c)+" "+$APP.S.g(a);var e=$APP.v(a),g=$APP.Ok.g(e);e=0;for(g=new $APP.ve(null,1,5,$APP.we,["M "+$APP.S.g(c)+" "+$APP.S.g(g)],null);;){if(e>=d-1)return $APP.Jg(g);var h=$APP.rc(a,e),k=$APP.rc(a,
4
+ e+1),m=$APP.Ok.g(h),p=$APP.Ok.g(k);h=Xu.g(h);var q=Xu.g(k);k=$APP.D.i(h,"left")?-b:b;q=$APP.D.i(q,"left")?-b:b;h=m+(p-m)*.33;q=c+q;m+=(p-m)*.66;var w=c;e+=1;g=$APP.od.i(g,"C "+$APP.S.g(c+k)+" "+$APP.S.g(h)+" "+$APP.S.g(q)+" "+$APP.S.g(m)+" "+$APP.S.g(w)+" "+$APP.S.g(p))}},fv=function(a){var b=$APP.l(a,"__xScrollTimelineRefs");if($APP.r(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("div"),
5
+ h=document.createElement("div"),k=document.createElementNS("http://www.w3.org/2000/svg","svg"),m=document.createElementNS("http://www.w3.org/2000/svg","path"),p=document.createElementNS("http://www.w3.org/2000/svg","path"),q=document.createElement("div"),w=document.createElement("slot"),x=document.createElement("div"),y=document.createElement("div");c.textContent=":host{display:block;position:relative;color-scheme:light dark;--x-scroll-timeline-track-color:rgba(0,0,0,0.12);--x-scroll-timeline-track-fill-color:var(--x-color-primary,#3b82f6);--x-scroll-timeline-track-width:3px;--x-scroll-timeline-marker-size:14px;--x-scroll-timeline-marker-color:rgba(0,0,0,0.15);--x-scroll-timeline-marker-active-color:var(--x-color-primary,#3b82f6);--x-scroll-timeline-marker-border-color:var(--x-color-primary,#3b82f6);--x-scroll-timeline-entry-gap:2rem;--x-scroll-timeline-date-color:rgba(0,0,0,0.5);--x-scroll-timeline-date-font-size:0.8125rem;--x-scroll-timeline-transition-duration:300ms;--x-scroll-timeline-curve-amplitude:60;--x-scroll-timeline-disabled-opacity:0.55;}@media (prefers-color-scheme:dark){:host{--x-scroll-timeline-track-color:rgba(255,255,255,0.12);--x-scroll-timeline-marker-color:rgba(255,255,255,0.18);--x-scroll-timeline-date-color:rgba(255,255,255,0.5);}}[part\x3dcontainer]{position:relative;padding:0;}[part\x3dtrack]{position:absolute;top:0;bottom:0;left:50%;transform:translateX(-50%);width:var(--x-scroll-timeline-track-width);pointer-events:none;z-index:1;}:host([data-layout\x3dleft]) [part\x3dtrack]{left:calc(var(--x-scroll-timeline-marker-size) / 2);transform:none;}:host([data-layout\x3dright]) [part\x3dtrack]{left:auto;right:calc(var(--x-scroll-timeline-marker-size) / 2);transform:none;}[part\x3dtrack-line]{position:absolute;top:0;bottom:0;left:0;right:0;background:var(--x-scroll-timeline-track-color);border-radius:999px;}[part\x3dtrack-fill]{position:absolute;top:0;left:0;right:0;height:0%;background:var(--x-scroll-timeline-track-fill-color);border-radius:999px;transition:height 60ms linear;}[part\x3dtrack-svg]{display:none;position:absolute;top:0;left:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:1;}:host([data-track\x3dcurved]) [part\x3dtrack-line],:host([data-track\x3dcurved]) [part\x3dtrack-fill]{display:none;}:host([data-track\x3dcurved]) [part\x3dtrack-svg]{display:block;}[part\x3dtrack-path]{fill:none;stroke:var(--x-scroll-timeline-track-color);stroke-width:3px;stroke-linecap:round;}[part\x3dtrack-fill-path]{fill:none;stroke:var(--x-scroll-timeline-track-fill-color);stroke-width:3px;stroke-linecap:round;transition:stroke-dashoffset 60ms linear;}[part\x3dentries]{position:relative;z-index:2;}::slotted(*){display:block;margin-bottom:var(--x-scroll-timeline-entry-gap);opacity:0.4;transition:opacity var(--x-scroll-timeline-transition-duration) ease;}::slotted(:last-child){margin-bottom:0;}::slotted([data-active]){opacity:1;}:host([data-layout\x3dalternating]) ::slotted(*){width:calc(50% - var(--x-scroll-timeline-marker-size));}:host([data-layout\x3dalternating]) ::slotted([data-side\x3dleft]){margin-left:0;margin-right:auto;text-align:right;padding-right:1.5rem;}:host([data-layout\x3dalternating]) ::slotted([data-side\x3dright]){margin-left:auto;margin-right:0;text-align:left;padding-left:1.5rem;}:host([data-layout\x3dleft]) ::slotted(*){margin-left:calc(var(--x-scroll-timeline-marker-size) + 1.5rem);width:auto;}:host([data-layout\x3dright]) ::slotted(*){margin-right:calc(var(--x-scroll-timeline-marker-size) + 1.5rem);width:auto;text-align:right;}.tl-marker{position:absolute;z-index:3;width:var(--x-scroll-timeline-marker-size);height:var(--x-scroll-timeline-marker-size);border-radius:50%;background:var(--x-scroll-timeline-marker-color);border:2px solid transparent;transform:translate(-50%,-50%);transition:background var(--x-scroll-timeline-transition-duration) ease,border-color var(--x-scroll-timeline-transition-duration) ease,box-shadow var(--x-scroll-timeline-transition-duration) ease;}.tl-marker[data-active]{background:var(--x-scroll-timeline-marker-active-color);border-color:var(--x-scroll-timeline-marker-active-color);box-shadow:0 0 0 3px rgba(59,130,246,0.25);}:host([data-marker\x3dring]) .tl-marker{background:transparent;border:2px solid var(--x-scroll-timeline-marker-color);}:host([data-marker\x3dring]) .tl-marker[data-active]{background:var(--x-scroll-timeline-marker-active-color);border-color:var(--x-scroll-timeline-marker-active-color);}:host([data-marker\x3dnone]) .tl-marker{display:none;}.tl-marker{left:50%;}:host([data-layout\x3dleft]) .tl-marker{left:calc(var(--x-scroll-timeline-marker-size) / 2);}:host([data-layout\x3dright]) .tl-marker{left:auto;right:calc(var(--x-scroll-timeline-marker-size) / 2);transform:translate(50%,-50%);}.tl-date{position:absolute;z-index:3;font-size:var(--x-scroll-timeline-date-font-size);color:var(--x-scroll-timeline-date-color);white-space:nowrap;transform:translateY(-50%);transition:color var(--x-scroll-timeline-transition-duration) ease;}.tl-date[data-active]{color:var(--x-scroll-timeline-marker-active-color);font-weight:600;}:host([data-layout\x3dalternating]) .tl-date[data-side\x3dleft]{left:calc(50% + var(--x-scroll-timeline-marker-size));padding-left:0.5rem;}:host([data-layout\x3dalternating]) .tl-date[data-side\x3dright]{right:calc(50% + var(--x-scroll-timeline-marker-size));padding-right:0.5rem;text-align:right;}:host([data-layout\x3dleft]) .tl-date{left:calc(var(--x-scroll-timeline-marker-size) + 0.5rem);}:host([data-layout\x3dright]) .tl-date{right:calc(var(--x-scroll-timeline-marker-size) + 0.5rem);text-align:right;}:host([disabled]){opacity:var(--x-scroll-timeline-disabled-opacity);}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}[part\x3dindicator]{display:none;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);pointer-events:none;width:48px;height:48px;opacity:0.7;z-index:4;}[part\x3dindicator]::before,[part\x3dindicator]::after{content:'';position:absolute;top:8px;width:12px;height:32px;background:rgba(255,255,255,0.9);border-radius:3px;}[part\x3dindicator]::before{left:8px;}[part\x3dindicator]::after{right:8px;}:host([data-autoplay-paused][autoplay-indicator]) [part\x3dindicator]{display:block;}@media (pointer:coarse){:host{--x-scroll-timeline-marker-size:44px;}}@media (prefers-reduced-motion:reduce){::slotted(*){transition:none !important;}.tl-marker{transition:none !important;}.tl-date{transition:none !important;}[part\x3dtrack-fill]{transition:none !important;}[part\x3dtrack-fill-path]{transition:none !important;}}";
6
6
  d.setAttribute("part","container");d.setAttribute("role","feed");e.setAttribute("part","track");g.setAttribute("part","track-line");h.setAttribute("part","track-fill");k.setAttribute("part","track-svg");k.setAttribute("aria-hidden","true");k.setAttribute("focusable","false");m.setAttribute("part","track-path");p.setAttribute("part","track-fill-path");p.setAttribute("pathLength","1");k.appendChild(m);k.appendChild(p);e.appendChild(g);e.appendChild(h);q.setAttribute("part","entries");q.appendChild(w);
7
- x.setAttribute("part","indicator");d.appendChild(e);d.appendChild(q);d.appendChild(k);d.appendChild(x);y.setAttribute("part","live");y.setAttribute("aria-live","polite");y.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(y);b=$APP.Q([$APP.Fi,Yu,Zu,$u,av,bv,$APP.bi,$APP.Zi,cv,$APP.$h,dv,$APP.zi],[w,k,p,q,m,g,b,d,x,y,h,e]);a.__xScrollTimelineRefs=b;return $APP.l(a,"__xScrollTimelineRefs")},mv=function(a){a=$APP.Q([$APP.Oh,fv,$APP.lj,$APP.gl,$APP.Ah,$APP.sk,$APP.ki,
8
- gv,$APP.Ai,$APP.fl,hv],[a.getAttribute("label"),a.getAttribute("marker"),a.getAttribute("autoplay-speed"),$APP.r(a.hasAttribute("autoplay"))?"":null,a.getAttribute("threshold"),a.getAttribute("layout"),$APP.r(a.hasAttribute("autoplay-indicator"))?"":null,a.getAttribute("track"),$APP.r(a.hasAttribute("disabled"))?"":null,$APP.r(a.hasAttribute("autoplay-loop"))?"":null,$APP.r(a.hasAttribute("no-progress"))?"":null]);var b=$APP.N(a);a=$APP.G(b,$APP.Ai);var c=$APP.G(b,$APP.fl),d=$APP.G(b,hv),e=$APP.G(b,
9
- $APP.Oh),g=$APP.G(b,fv),h=$APP.G(b,$APP.lj),k=$APP.G(b,$APP.gl),m=$APP.G(b,$APP.Ah),p=$APP.G(b,$APP.sk),q=$APP.G(b,$APP.ki);b=$APP.G(b,gv);p=typeof p==="string"?p.trim().toLowerCase():null;p=$APP.J(iv,p)?p:"alternating";g=typeof g==="string"?g.trim().toLowerCase():null;g=$APP.J(jv,g)?g:"dot";m=Ru(m);e=$APP.r(e)?e:"";h=Su(h);b=typeof b==="string"?b.trim().toLowerCase():null;b=$APP.J(kv,b)?b:"straight";return $APP.Q([$APP.Aj,$APP.Xj,$APP.Wh,lv,$APP.Wk,$APP.T,$APP.di,$APP.W,$APP.mj,$APP.zi,$APP.gi],
10
- [p,g,c!=null,d!=null,m,e,q!=null,a!=null,h,b,k!=null])},nv=function(a){a=ev(a);a=$APP.N(a);return $APP.G(a,$APP.Fi).assignedElements()},ov=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},pv=function(a){a=a.getAttribute("id");return typeof a==="string"&&$APP.O(a,"")?a:null},qv=function(a,b,c){b=new CustomEvent(b,{detail:$APP.nh(c),bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},rv=function(a,b){a=$APP.N($APP.l(a,"__xScrollTimelineRefs"));var c=
11
- $APP.G(a,$APP.$h);c.textContent=b;setTimeout(function(){return c.textContent=""},1E3)},sv=function(a,b){for(var c=a.length,d=0;;)if(d<c){var e=a[d];e.setAttribute("data-side",Tu(b,d));e.setAttribute("data-index",""+$APP.S.g(d));d+=1}else break},tv=function(a){a=nv(a);for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.removeAttribute("data-active");d.removeAttribute("data-side");d.removeAttribute("data-index");c+=1}else break},uv=function(a,b){var c=$APP.N($APP.l(a,"__xScrollTimelineRefs"));c=$APP.G(c,
12
- $APP.Zi);var d=$APP.l(a,"__xScrollTimelineMarkerEls");d=$APP.r(d)?d:[];b=b.length;for(var e=d.length,g=0;;)if(g<e)d[g].remove(),g+=1;else break;d=Array(b);for(e=0;;)if(e<b)g=document.createElement("div"),g.classList.add("tl-marker"),c.appendChild(g),d[e]=g,e+=1;else break;a.__xScrollTimelineMarkerEls=d},vv=function(a,b){var c=$APP.N($APP.l(a,"__xScrollTimelineRefs"));c=$APP.G(c,$APP.Zi);var d=$APP.l(a,"__xScrollTimelineDateEls");var e=$APP.r(d)?d:[];d=b.length;for(var g=e.length,h=0;;)if(h<g){var k=
13
- e[h];$APP.r(k)&&k.remove();h+=1}else break;e=Array(d);for(g=0;;)if(g<d)h=b[g].getAttribute("data-date"),typeof h==="string"&&$APP.O(h,"")?(k=document.createElement("span"),k.classList.add("tl-date"),k.textContent=h,c.appendChild(k),e[g]=k):e[g]=null,g+=1;else break;a.__xScrollTimelineDateEls=e},wv=function(a,b,c){a=$APP.N($APP.l(a,"__xScrollTimelineRefs"));a=$APP.G(a,dv);$APP.r(c)?a.style.height="0%":a.style.height=""+$APP.S.g(b*100)+"%"},xv=function(a,b){var c=$APP.N($APP.l(a,"__xScrollTimelineRefs")),
14
- d=$APP.G(c,$APP.Zi),e=$APP.G(c,Yu),g=$APP.G(c,av);c=$APP.G(c,Zu);var h=function(){var E=$APP.l(a,"__xScrollTimelineModel");return $APP.r(E)?E:mv(a)}(),k=$APP.Aj.g(h);h=d.getBoundingClientRect();var m=h.top;d=h.height;var p=h.width,q=window.getComputedStyle(a).getPropertyValue("--x-scroll-timeline-curve-amplitude");h=function(){var E=parseFloat(q);return $APP.r(isNaN(E))?60:E}();var w=window.getComputedStyle(a).getPropertyValue("--x-scroll-timeline-marker-size"),x=function(){var E=parseFloat(w);return $APP.r(isNaN(E))?
15
- 7:E/2}(),y=function(){switch(k){case "left":return x;case "right":return p-x;default:return p*.5}}(),A=b.length;if(A>0){var C=function(){for(var E=0,H=$APP.ie;;){if(E>=A)return H;var F=b[E].getBoundingClientRect(),K=E+1;H=$APP.od.i(H,new $APP.P(null,2,[$APP.Nk,F.top+F.height/2-m,Wu,Tu(k,E)],null));E=K}}();h=Xu(C,h,y);e.setAttribute("viewBox","0 0 "+$APP.S.g(p)+" "+$APP.S.g(d));g.setAttribute("d",h);c.setAttribute("d",h);c.setAttribute("stroke-dasharray","1");c.setAttribute("stroke-dashoffset","1")}},
16
- yv=function(a,b,c){a=$APP.N($APP.l(a,"__xScrollTimelineRefs"));a=$APP.G(a,Zu);$APP.r(c)?a.setAttribute("stroke-dashoffset","1"):a.setAttribute("stroke-dashoffset",""+$APP.S.g(1-b))},zv=function(a,b,c){var d=$APP.l(a,"__xScrollTimelineActiveIndex");d=$APP.r(d)?d:-1;if($APP.O(d,c)){d>=0&&d<b.length&&b[d].removeAttribute("data-active");c>=0&&c<b.length&&b[c].setAttribute("data-active","");var e=$APP.l(a,"__xScrollTimelineMarkerEls"),g=$APP.l(a,"__xScrollTimelineDateEls");$APP.r(e)&&(d>=0&&d<e.length&&
17
- e[d].removeAttribute("data-active"),c>=0&&c<e.length&&e[c].setAttribute("data-active",""));$APP.r(g)&&(d>=0&&d<g.length&&(e=g[d],$APP.r(e)&&e.removeAttribute("data-active")),c>=0&&c<g.length&&(g=g[c],$APP.r(g)&&g.setAttribute("data-active","")));c>=0?a.setAttribute("data-active-index",""+$APP.S.g(c)):a.removeAttribute("data-active-index");a.__xScrollTimelineActiveIndex=c;g=d>=0&&d<b.length?pv(b[d]):null;b=c>=0&&c<b.length?pv(b[c]):null;qv(a,"x-scroll-timeline-entry-change",new $APP.P(null,4,[$APP.Eh,
18
- c,$APP.Dk,b,$APP.rj,d,$APP.Ul,g],null));rv(a,"Entry "+$APP.S.g(c+1)+" active")}},Av=function(a,b,c,d){var e=b.length;var g=$APP.l(a,"__xScrollTimelineEntryStates");if(!$APP.r($APP.r(g)?$APP.D.i(g.length,e):g)){for(var h=Array(e),k=0;;)if(k<e)h[k]=$APP.r($APP.r(g)?k<g.length:g)?g[k]:!1,k+=1;else break;g=a.__xScrollTimelineEntryStates=h}for(h=0;;)if(h<e){if(h<$APP.B(c)){k=$APP.rc(c,h);k=$APP.N(k);var m=$APP.G(k,$APP.Qh),p=$APP.G(k,$APP.Qj),q=g[h];k=m<=d&&p>d;var w=pv(b[h]);m=Vu(m,p-m,d);$APP.t(q)&&
19
- k?(g[h]=!0,qv(a,"x-scroll-timeline-entry-enter",new $APP.P(null,3,[$APP.Eh,h,$APP.Dk,w,$APP.dl,m],null))):$APP.r($APP.r(q)?!k:q)&&(g[h]=!1,qv(a,"x-scroll-timeline-entry-leave",new $APP.P(null,3,[$APP.Eh,h,$APP.Dk,w,$APP.dl,m],null)))}h+=1}else break},Bv=function(a){var b=function(){var q=$APP.l(a,"__xScrollTimelineModel");return $APP.r(q)?q:mv(a)}();if(!$APP.r($APP.W.g(b))){var c=nv(a),d=c.length,e=window.innerHeight,g=e*$APP.Wk.g(b),h=function(){for(var q=0,w=$APP.ie;;){if(q>=d)return w;var x=c[q].getBoundingClientRect();
20
- q+=1;w=$APP.od.i(w,new $APP.P(null,2,[$APP.Qh,x.top,$APP.Qj,x.top+x.height],null))}}(),k=Uu(h,g),m=$APP.N($APP.l(a,"__xScrollTimelineRefs"));m=$APP.G(m,$APP.Zi).getBoundingClientRect();e=$APP.Yg.i(0,$APP.Zg.i(1,(e-m.top)/(e+m.height)));m=$APP.l(a,"__xScrollTimelineLastProg");var p=d<2||k<0?0:function(){var q=function(){var C=$APP.rc(h,0);return($APP.Qh.g(C)+$APP.Qj.g(C))/2}(),w=function(){var C=$APP.rc(h,d-1);return($APP.Qh.g(C)+$APP.Qj.g(C))/2}()-q,x=$APP.rc(h,k),y=($APP.Qh.g(x)+$APP.Qj.g(x))/2;
21
- x=Vu($APP.Qh.g(x),$APP.Qj.g(x)-$APP.Qh.g(x),g);var A=k<d-1?function(){var C=$APP.rc(h,k+1);return($APP.Qh.g(C)+$APP.Qj.g(C))/2}():y;return w<=0?1:$APP.Yg.i(0,$APP.Zg.i(1,(y+x*(A-y)-q)/w))}();zv(a,c,k);Av(a,c,h,g);$APP.D.i($APP.zi.g(b),"curved")?yv(a,p,lv.g(b)):wv(a,p,lv.g(b));if(m==null||Math.abs(e-m)>.001)a.__xScrollTimelineLastProg=e,b=k>=0&&k<d?pv(c[k]):null,qv(a,"x-scroll-timeline-progress",new $APP.P(null,3,[$APP.dl,e,$APP.Cj,k,$APP.Kk,b],null))}a.__xScrollTimelineRAF=null},Cv=function(a){return function d(c){if($APP.r(function(){var k=
22
- a.isConnected;return $APP.r(k)?(k=$APP.l(a,"__xScrollTimelineVisible"),$APP.r(k)?$APP.t($APP.l(a,"__xScrollTimelineAutoplayPaused")):k):k}())){var e=$APP.l(a,"__xScrollTimelineModel");if($APP.r(function(){if($APP.r(e)){var k=$APP.gi.g(e);return $APP.r(k)?$APP.t($APP.W.g(e)):k}return e}())){var g=$APP.l(a,"__xScrollTimelineAutoplayLast");g=$APP.r(g)?(c-g)/1E3:0;a.__xScrollTimelineAutoplayLast=c;if(g>0){var h=window.scrollY;window.scrollBy(0,$APP.mj.g(e)*g);$APP.r(function(){var k=$APP.Wh.g(e);return $APP.r(k)?
23
- window.scrollY-h<.5:k}())&&(c=a.getBoundingClientRect().top+window.scrollY,window.scrollTo(0,$APP.Yg.i(0,c-window.innerHeight)),a.__xScrollTimelineAutoplayLast=null)}return $APP.n(a,"__xScrollTimelineAutoplayRAF",requestAnimationFrame(d))}}return null}},Dv=function(a){if($APP.r($APP.l(a,"__xScrollTimelineAutoplayPaused")))return null;a.__xScrollTimelineAutoplayPaused=!0;var b=$APP.l(a,"__xScrollTimelineAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollTimelineAutoplayRAF=null);a.setAttribute("data-autoplay-paused",
24
- "");b=function(){var e=$APP.l(a,"__xScrollTimelineLastProg");return $APP.r(e)?e:0}();var c=function(){var e=$APP.l(a,"__xScrollTimelineActiveIndex");return $APP.r(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?pv(d[c]):null;return qv(a,"x-scroll-timeline-autoplay-pause",new $APP.P(null,3,[$APP.dl,b,$APP.Cj,c,$APP.Kk,d],null))},Ev=function(a){if($APP.r($APP.l(a,"__xScrollTimelineAutoplayPaused"))){a.__xScrollTimelineAutoplayPaused=!1;a.removeAttribute("data-autoplay-paused");a.__xScrollTimelineAutoplayLast=
25
- null;$APP.n(a,"__xScrollTimelineAutoplayRAF",requestAnimationFrame(Cv(a)));var b=function(){var e=$APP.l(a,"__xScrollTimelineLastProg");return $APP.r(e)?e:0}(),c=function(){var e=$APP.l(a,"__xScrollTimelineActiveIndex");return $APP.r(e)?e:-1}(),d=a.children;d=c>=0&&c<d.length?pv(d[c]):null;return qv(a,"x-scroll-timeline-autoplay-resume",new $APP.P(null,3,[$APP.dl,b,$APP.Cj,c,$APP.Kk,d],null))}return null},Fv=function(a){var b=$APP.l(a,"__xScrollTimelineAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),
26
- a.__xScrollTimelineAutoplayRAF=null);b=$APP.l(a,"__xScrollTimelineAutoplayHandlers");$APP.r(b)&&(a.removeEventListener("mousedown",$APP.l(b,"mousedown")),a.removeEventListener("mouseup",$APP.l(b,"mouseup")),a.removeEventListener("mouseleave",$APP.l(b,"mouseleave")),a.removeEventListener("touchstart",$APP.l(b,"touchstart")),a.removeEventListener("touchend",$APP.l(b,"touchend")),a.removeEventListener("keydown",$APP.l(b,"keydown")),a.removeEventListener("keyup",$APP.l(b,"keyup")),a.__xScrollTimelineAutoplayHandlers=
27
- null);a.removeAttribute("data-autoplay-paused");a.removeAttribute("tabindex");a.__xScrollTimelineAutoplayPaused=!1;a.__xScrollTimelineAutoplayLast=null},Gv=function(a){if($APP.l(a,"__xScrollTimelineAutoplayRAF")==null){var b=$APP.l(a,"__xScrollTimelineModel");if($APP.r(function(){if($APP.r(b)){var p=$APP.gi.g(b);return $APP.r(p)?(p=$APP.t($APP.W.g(b)))?(p=$APP.l(a,"__xScrollTimelineVisible"),$APP.r(p)?!ov():p):p:p}return b}())){a.setAttribute("tabindex","0");a.__xScrollTimelineAutoplayPaused=!1;a.__xScrollTimelineAutoplayLast=
28
- null;var c=function(){return Dv(a)},d=function(){return Ev(a)},e=function(){return $APP.r($APP.l(a,"__xScrollTimelineAutoplayPaused"))?Ev(a):null},g=function(){return Dv(a)},h=function(){return Ev(a)},k=function(p){return $APP.D.i(p.code,"Space")?(p.preventDefault(),Dv(a)):null},m=function(p){return $APP.D.i(p.code,"Space")?Ev(a):null};a.addEventListener("mousedown",c);a.addEventListener("mouseup",d);a.addEventListener("mouseleave",e);a.addEventListener("touchstart",g,{passive:!0});a.addEventListener("touchend",
29
- h,{passive:!0});a.addEventListener("keydown",k);a.addEventListener("keyup",m);$APP.n(a,"__xScrollTimelineAutoplayHandlers",{mousedown:c,mouseup:d,mouseleave:e,touchstart:g,touchend:h,keydown:k,keyup:m});$APP.n(a,"__xScrollTimelineAutoplayRAF",requestAnimationFrame(Cv(a)))}}return null},Hv=function(a){a=$APP.l(a,"__xScrollTimelineModel");return $APP.r(a)?$APP.W.g(a):a},Iv=function(a){return $APP.r(function(){var b=a.isConnected;return $APP.r(b)?(b=$APP.l(a,"__xScrollTimelineVisible"),$APP.r(b)?$APP.t(Hv(a))&&
30
- !ov():b):b}())?$APP.r($APP.l(a,"__xScrollTimelineRAF"))?null:$APP.n(a,"__xScrollTimelineRAF",requestAnimationFrame(function(){return Bv(a)})):null},Jv=function(a){a=$APP.l(a,"__xScrollTimelineHandlers");$APP.r($APP.r(a)?$APP.t($APP.l(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},Kv=function(a){a=$APP.l(a,"__xScrollTimelineHandlers");$APP.r($APP.r(a)?$APP.l(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.l(a,"scroll")),
31
- a.scrollAttached=!1)},Lv=function(a,b){b=b[0].isIntersecting;a.__xScrollTimelineVisible=b;if($APP.r(b)){if($APP.r(Hv(a)))return null;Jv(a);Bv(a);rv(a,"Timeline entered viewport");qv(a,"x-scroll-timeline-enter",new $APP.P(null,1,[$APP.dl,function(){var c=$APP.l(a,"__xScrollTimelineLastProg");return $APP.r(c)?c:0}()],null));b=$APP.l(a,"__xScrollTimelineModel");return $APP.r($APP.r(b)?$APP.gi.g(b):b)?Gv(a):null}Kv(a);Fv(a);if($APP.r(Hv(a)))return null;rv(a,"Timeline left viewport");return qv(a,"x-scroll-timeline-leave",
32
- new $APP.P(null,1,[$APP.dl,function(){var c=$APP.l(a,"__xScrollTimelineLastProg");return $APP.r(c)?c:0}()],null))},Mv=function(a){var b=function(){var d=$APP.l(a,"__xScrollTimelineModel");return $APP.r(d)?d:mv(a)}(),c=nv(a);sv(c,$APP.Aj.g(b));uv(a,c);vv(a,c);return requestAnimationFrame(function(){var d=nv(a),e=$APP.l(a,"__xScrollTimelineMarkerEls"),g=$APP.l(a,"__xScrollTimelineDateEls"),h=$APP.N($APP.l(a,"__xScrollTimelineRefs"));h=$APP.G(h,$APP.Zi).getBoundingClientRect().top;var k=$APP.l(a,"__xScrollTimelineModel");
33
- k=$APP.r(k)?k:mv(a);k=$APP.Aj.g(k);for(var m=d.length,p=0;;)if(p<m){var q=d[p].getBoundingClientRect();q=q.top+q.height/2-h;var w=Tu(k,p),x=$APP.r(e)?e[p]:e;$APP.r(x)&&(x.style.top=""+$APP.S.g(q)+"px");x=$APP.r(g)?g[p]:g;$APP.r(x)&&(x.style.top=""+$APP.S.g(q)+"px",x.setAttribute("data-side",w));p+=1}else break;$APP.D.i($APP.zi.g(b),"curved")&&xv(a,d);return $APP.r($APP.l(a,"__xScrollTimelineVisible"))?Bv(a):null})},Nv=function(a){function b(){return $APP.r($APP.l(a,"__xScrollTimelineVisible"))?(a.__xScrollTimelineEntryStates=
34
- null,Mv(a)):null}function c(){a.__xScrollTimelineEntryStates=null;return Mv(a)}var d=ev(a);d=$APP.N(d);$APP.G(d,$APP.Fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.n(a,"__xScrollTimelineHandlers",{scroll:function(){return Iv(a)},slot:c,resize:b,scrollAttached:!1})},Ov=function(a){var b=$APP.l(a,"__xScrollTimelineHandlers");if($APP.r(b)){Kv(a);var c=$APP.l(a,"__xScrollTimelineRefs");if($APP.r(c)){c=$APP.Fi.g(c);var d=$APP.l(b,"slot");$APP.r(d)&&c.removeEventListener("slotchange",
35
- d)}b=$APP.l(b,"resize");$APP.r(b)&&window.removeEventListener("resize",b)}b=$APP.l(a,"__xScrollTimelineRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollTimelineRAF=null);a.__xScrollTimelineHandlers=null},Pv=function(a){var b=$APP.l(a,"__xScrollTimelineIO");$APP.r(b)&&b.disconnect();b=new IntersectionObserver(function(c){return Lv(a,c)},{threshold:[0]});b.observe(a);a.__xScrollTimelineIO=b},Qv=function(a){var b=mv(a);if($APP.O($APP.l(a,"__xScrollTimelineModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.Aj),
36
- d=$APP.G(b,$APP.zi),e=$APP.G(b,$APP.W),g=$APP.G(b,$APP.T),h=$APP.G(b,$APP.Xj),k=ev(a);k=$APP.N(k);k=$APP.G(k,$APP.Zi);var m=$APP.l(a,"__xScrollTimelineModel");a.setAttribute("data-layout",c);a.setAttribute("data-track",d);a.setAttribute("data-marker",h);$APP.u(g)?k.setAttribute("aria-label",g):k.removeAttribute("aria-label");a.__xScrollTimelineModel=b;$APP.r(e)?(tv(a),a.__xScrollTimelineActiveIndex=-1,a.__xScrollTimelineEntryStates=null,Kv(a),Fv(a)):$APP.r(m)&&($APP.O($APP.Aj.g(m),c)||$APP.O($APP.zi.g(m),
37
- d)||$APP.O($APP.Xj.g(m),h)||$APP.O($APP.W.g(m),e)?Mv(a):($APP.O($APP.Wk.g(m),$APP.Wk.g(b))||$APP.O(lv.g(m),lv.g(b)))&&$APP.r($APP.l(a,"__xScrollTimelineVisible"))&&Bv(a));$APP.r(e)||(b=$APP.gi.g(b),$APP.r($APP.r(b)?$APP.l(a,"__xScrollTimelineVisible"):b)?Gv(a):Fv(a))}},Rv=function(a){Object.defineProperty(a,"layout",{get:function(){var b=this.getAttribute("layout");return $APP.r(b)?b:"alternating"},set:function(b){return $APP.r(b)?this.setAttribute("layout",""+$APP.S.g(b)):this.removeAttribute("layout")},
38
- enumerable:!0,configurable:!0});Object.defineProperty(a,"track",{get:function(){var b=this.getAttribute("track");return $APP.r(b)?b:"straight"},set:function(b){return $APP.r(b)?this.setAttribute("track",""+$APP.S.g(b)):this.removeAttribute("track")},enumerable:!0,configurable:!0});Object.defineProperty(a,"threshold",{get:function(){return Ru(this.getAttribute("threshold"))},set:function(b){return b!=null?this.setAttribute("threshold",""+$APP.S.g(b)):this.removeAttribute("threshold")},enumerable:!0,
39
- configurable:!0});Object.defineProperty(a,"noProgress",{get:function(){return this.hasAttribute("no-progress")},set:function(b){return $APP.r(b)?this.setAttribute("no-progress",""):this.removeAttribute("no-progress")},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.r(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,configurable:!0});Object.defineProperty(a,"label",
40
- {get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:""},set:function(b){return $APP.r($APP.r(b)?$APP.O(b,""):b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0});Object.defineProperty(a,"marker",{get:function(){var b=this.getAttribute("marker");return $APP.r(b)?b:"dot"},set:function(b){return $APP.r(b)?this.setAttribute("marker",""+$APP.S.g(b)):this.removeAttribute("marker")},enumerable:!0,configurable:!0});Object.defineProperty(a,
41
- "activeIndex",{get:function(){var b=$APP.l(this,"__xScrollTimelineActiveIndex");return b!=null?b:-1},enumerable:!0,configurable:!0});Object.defineProperty(a,"progress",{get:function(){var b=$APP.l(this,"__xScrollTimelineLastProg");return $APP.r(b)?b:0},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplay",{get:function(){return this.hasAttribute("autoplay")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay",""):this.removeAttribute("autoplay")},enumerable:!0,configurable:!0});
42
- Object.defineProperty(a,"autoplaySpeed",{get:function(){return Su(this.getAttribute("autoplay-speed"))},set:function(b){return b!=null?this.setAttribute("autoplay-speed",""+$APP.S.g(b)):this.removeAttribute("autoplay-speed")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayLoop",{get:function(){return this.hasAttribute("autoplay-loop")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay-loop",""):this.removeAttribute("autoplay-loop")},enumerable:!0,configurable:!0});Object.defineProperty(a,
43
- "autoplayIndicator",{get:function(){return this.hasAttribute("autoplay-indicator")},set:function(b){return $APP.r(b)?this.setAttribute("autoplay-indicator",""):this.removeAttribute("autoplay-indicator")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoplayPaused",{get:function(){return $APP.I($APP.l(this,"__xScrollTimelineAutoplayPaused"))},enumerable:!0,configurable:!0})},Tv=function(){var a=class extends HTMLElement{};a.observedAttributes=Sv;a.prototype.connectedCallback=function(){ev(this);
44
- Ov(this);Nv(this);Pv(this);Qv(this);return null};a.prototype.disconnectedCallback=function(){Fv(this);tv(this);if($APP.r($APP.l(this,"__xScrollTimelineVisible"))){var b=$APP.l(this,"__xScrollTimelineLastProg");qv(this,"x-scroll-timeline-leave",new $APP.P(null,1,[$APP.dl,$APP.r(b)?b:0],null))}Ov(this);b=$APP.l(this,"__xScrollTimelineIO");$APP.r(b)&&(b.disconnect(),this.__xScrollTimelineIO=null);this.__xScrollTimelineVisible=!1;this.__xScrollTimelineActiveIndex=-1;return this.__xScrollTimelineEntryStates=
45
- this.__xScrollTimelineLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&Qv(this);return null};Rv(a.prototype);return a},Uv=function(){$APP.r(customElements.get("x-scroll-timeline"))||customElements.define("x-scroll-timeline",Tv());return null},dv=new $APP.M(null,"track-fill","track-fill",1852369499),$u=new $APP.M(null,"entries","entries",-86943161),fv=new $APP.M(null,"marker-raw","marker-raw",2140891555),cv=new $APP.M(null,"indicator","indicator",1928219637),lv=new $APP.M(null,
46
- "no-progress?","no-progress?",-1599319890),gv=new $APP.M(null,"track-raw","track-raw",751958776),av=new $APP.M(null,"track-path","track-path",-1838135442),Zu=new $APP.M(null,"fill-path","fill-path",-792439899),hv=new $APP.M(null,"no-progress-attr","no-progress-attr",115951679),Yu=new $APP.M(null,"track-svg","track-svg",-556455964),Wu=new $APP.M(null,"side","side",389652279),bv=new $APP.M(null,"track-line","track-line",1370628624);var Sv="layout track threshold no-progress disabled label marker autoplay autoplay-speed autoplay-loop autoplay-indicator".split(" ");
47
- $APP.Q([$APP.zk,$APP.ph,$APP.Uj,$APP.gj,$APP.Aj,$APP.Cj,$APP.Xj,$APP.Wk,$APP.Bl,$APP.T,$APP.Nj,$APP.dl,new $APP.M(null,"noProgress","noProgress",-2114530658),$APP.zi],[new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),
48
- new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.Y],null)]);
49
- $APP.Sd(["x-scroll-timeline-entry-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,4,[$APP.Eh,$APP.V,$APP.Dk,$APP.Y,$APP.rj,$APP.V,$APP.Ul,$APP.Y],null),$APP.kl,!1],null),"x-scroll-timeline-entry-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Dk,$APP.Y,$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-scroll-timeline-entry-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Dk,$APP.Y,$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-scroll-timeline-progress",new $APP.P(null,
50
- 2,[$APP.U,new $APP.P(null,3,[$APP.dl,$APP.V,$APP.Cj,$APP.V,$APP.Kk,$APP.Y],null),$APP.kl,!1],null),"x-scroll-timeline-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-scroll-timeline-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.dl,$APP.V],null),$APP.kl,!1],null),"x-scroll-timeline-autoplay-pause",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.dl,$APP.V,$APP.Cj,$APP.V,$APP.Kk,$APP.Y],null),$APP.kl,!1],null),"x-scroll-timeline-autoplay-resume",
51
- new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.dl,$APP.V,$APP.Cj,$APP.V,$APP.Kk,$APP.Y],null),$APP.kl,!1],null)]);var iv=new $APP.R(null,new $APP.P(null,3,["right",null,"left",null,"alternating",null],null),null),kv=new $APP.R(null,new $APP.P(null,2,["curved",null,"straight",null],null),null),jv=new $APP.R(null,new $APP.P(null,3,["ring",null,"none",null,"dot",null],null),null);$APP.ka("baredom.exports.x_scroll_timeline.init",Uv);export const init=Uv;
7
+ x.setAttribute("part","indicator");d.appendChild(e);d.appendChild(q);d.appendChild(k);d.appendChild(x);y.setAttribute("part","live");y.setAttribute("aria-live","polite");y.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(y);b=$APP.Q([$APP.Fi,Zu,$u,av,bv,cv,$APP.bi,$APP.Zi,dv,$APP.$h,ev,$APP.wi],[w,k,p,q,m,g,b,d,x,y,h,e]);a.__xScrollTimelineRefs=b;return $APP.l(a,"__xScrollTimelineRefs")},nv=function(a){a=$APP.Q([$APP.Oh,gv,$APP.lj,$APP.hl,$APP.Ah,$APP.tk,$APP.ki,
8
+ hv,$APP.Ai,$APP.gl,iv],[a.getAttribute("label"),a.getAttribute("marker"),a.getAttribute("autoplay-speed"),$APP.r(a.hasAttribute("autoplay"))?"":null,a.getAttribute("threshold"),a.getAttribute("layout"),$APP.r(a.hasAttribute("autoplay-indicator"))?"":null,a.getAttribute("track"),$APP.r(a.hasAttribute("disabled"))?"":null,$APP.r(a.hasAttribute("autoplay-loop"))?"":null,$APP.r(a.hasAttribute("no-progress"))?"":null]);var b=$APP.N(a);a=$APP.G(b,$APP.Ai);var c=$APP.G(b,$APP.gl),d=$APP.G(b,iv),e=$APP.G(b,
9
+ $APP.Oh),g=$APP.G(b,gv),h=$APP.G(b,$APP.lj),k=$APP.G(b,$APP.hl),m=$APP.G(b,$APP.Ah),p=$APP.G(b,$APP.tk),q=$APP.G(b,$APP.ki);b=$APP.G(b,hv);p=typeof p==="string"?p.trim().toLowerCase():null;p=$APP.J(jv,p)?p:"alternating";g=typeof g==="string"?g.trim().toLowerCase():null;g=$APP.J(kv,g)?g:"dot";m=Su(m);e=$APP.r(e)?e:"";h=Tu(h);b=typeof b==="string"?b.trim().toLowerCase():null;b=$APP.J(lv,b)?b:"straight";return $APP.Q([$APP.Aj,$APP.Yj,$APP.Wh,mv,$APP.Xk,$APP.T,$APP.di,$APP.W,$APP.mj,$APP.wi,$APP.gi],
10
+ [p,g,c!=null,d!=null,m,e,q!=null,a!=null,h,b,k!=null])},ov=function(a){a=fv(a);a=$APP.N(a);return $APP.G(a,$APP.Fi).assignedElements()},pv=function(){return $APP.I(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},qv=function(a){a=a.getAttribute("id");return typeof a==="string"&&$APP.O(a,"")?a:null},rv=function(a,b,c){b=new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},sv=function(a,b){a=$APP.N($APP.l(a,"__xScrollTimelineRefs"));var c=$APP.G(a,
11
+ $APP.$h);c.textContent=b;setTimeout(function(){return c.textContent=""},1E3)},tv=function(a,b){for(var c=a.length,d=0;;)if(d<c){var e=a[d];e.setAttribute("data-side",Uu(b,d));e.setAttribute("data-index",""+$APP.S.g(d));d+=1}else break},uv=function(a){a=ov(a);for(var b=a.length,c=0;;)if(c<b){var d=a[c];d.removeAttribute("data-active");d.removeAttribute("data-side");d.removeAttribute("data-index");c+=1}else break},vv=function(a,b){var c=$APP.N($APP.l(a,"__xScrollTimelineRefs"));c=$APP.G(c,$APP.Zi);
12
+ var d=$APP.l(a,"__xScrollTimelineMarkerEls");d=$APP.r(d)?d:[];b=b.length;for(var e=d.length,g=0;;)if(g<e)d[g].remove(),g+=1;else break;d=Array(b);for(e=0;;)if(e<b)g=document.createElement("div"),g.classList.add("tl-marker"),c.appendChild(g),d[e]=g,e+=1;else break;a.__xScrollTimelineMarkerEls=d},wv=function(a,b){var c=$APP.N($APP.l(a,"__xScrollTimelineRefs"));c=$APP.G(c,$APP.Zi);var d=$APP.l(a,"__xScrollTimelineDateEls");var e=$APP.r(d)?d:[];d=b.length;for(var g=e.length,h=0;;)if(h<g){var k=e[h];$APP.r(k)&&
13
+ k.remove();h+=1}else break;e=Array(d);for(g=0;;)if(g<d)h=b[g].getAttribute("data-date"),typeof h==="string"&&$APP.O(h,"")?(k=document.createElement("span"),k.classList.add("tl-date"),k.textContent=h,c.appendChild(k),e[g]=k):e[g]=null,g+=1;else break;a.__xScrollTimelineDateEls=e},xv=function(a,b,c){a=$APP.N($APP.l(a,"__xScrollTimelineRefs"));a=$APP.G(a,ev);$APP.r(c)?a.style.height="0%":a.style.height=""+$APP.S.g(b*100)+"%"},yv=function(a,b){var c=$APP.N($APP.l(a,"__xScrollTimelineRefs")),d=$APP.G(c,
14
+ $APP.Zi),e=$APP.G(c,Zu),g=$APP.G(c,bv);c=$APP.G(c,$u);var h=function(){var E=$APP.l(a,"__xScrollTimelineModel");return $APP.r(E)?E:nv(a)}(),k=$APP.Aj.g(h);h=d.getBoundingClientRect();var m=h.top;d=h.height;var p=h.width,q=window.getComputedStyle(a).getPropertyValue("--x-scroll-timeline-curve-amplitude");h=function(){var E=parseFloat(q);return $APP.r(isNaN(E))?60:E}();var w=window.getComputedStyle(a).getPropertyValue("--x-scroll-timeline-marker-size"),x=function(){var E=parseFloat(w);return $APP.r(isNaN(E))?
15
+ 7:E/2}(),y=function(){switch(k){case "left":return x;case "right":return p-x;default:return p*.5}}(),A=b.length;if(A>0){var B=function(){for(var E=0,H=$APP.ie;;){if(E>=A)return H;var F=b[E].getBoundingClientRect(),M=E+1;H=$APP.od.i(H,new $APP.P(null,2,[$APP.Ok,F.top+F.height/2-m,Xu,Uu(k,E)],null));E=M}}();h=Yu(B,h,y);e.setAttribute("viewBox","0 0 "+$APP.S.g(p)+" "+$APP.S.g(d));g.setAttribute("d",h);c.setAttribute("d",h);c.setAttribute("stroke-dasharray","1");c.setAttribute("stroke-dashoffset","1")}},
16
+ zv=function(a,b,c){a=$APP.N($APP.l(a,"__xScrollTimelineRefs"));a=$APP.G(a,$u);$APP.r(c)?a.setAttribute("stroke-dashoffset","1"):a.setAttribute("stroke-dashoffset",""+$APP.S.g(1-b))},Av=function(a,b,c){var d=$APP.l(a,"__xScrollTimelineActiveIndex");d=$APP.r(d)?d:-1;if($APP.O(d,c)){d>=0&&d<b.length&&b[d].removeAttribute("data-active");c>=0&&c<b.length&&b[c].setAttribute("data-active","");var e=$APP.l(a,"__xScrollTimelineMarkerEls"),g=$APP.l(a,"__xScrollTimelineDateEls");$APP.r(e)&&(d>=0&&d<e.length&&
17
+ e[d].removeAttribute("data-active"),c>=0&&c<e.length&&e[c].setAttribute("data-active",""));$APP.r(g)&&(d>=0&&d<g.length&&(e=g[d],$APP.r(e)&&e.removeAttribute("data-active")),c>=0&&c<g.length&&(g=g[c],$APP.r(g)&&g.setAttribute("data-active","")));c>=0?a.setAttribute("data-active-index",""+$APP.S.g(c)):a.removeAttribute("data-active-index");a.__xScrollTimelineActiveIndex=c;g=d>=0&&d<b.length?qv(b[d]):null;b=c>=0&&c<b.length?qv(b[c]):null;rv(a,"x-scroll-timeline-entry-change",{index:c,id:b,previousIndex:d,
18
+ previousId:g});sv(a,"Entry "+$APP.S.g(c+1)+" active")}},Bv=function(a,b,c,d){var e=b.length;var g=$APP.l(a,"__xScrollTimelineEntryStates");if(!$APP.r($APP.r(g)?$APP.D.i(g.length,e):g)){for(var h=Array(e),k=0;;)if(k<e)h[k]=$APP.r($APP.r(g)?k<g.length:g)?g[k]:!1,k+=1;else break;g=a.__xScrollTimelineEntryStates=h}for(h=0;;)if(h<e){if(h<$APP.C(c)){k=$APP.rc(c,h);k=$APP.N(k);var m=$APP.G(k,$APP.Qh),p=$APP.G(k,$APP.Rj),q=g[h];k=m<=d&&p>d;var w=qv(b[h]);m=Wu(m,p-m,d);$APP.t(q)&&k?(g[h]=!0,rv(a,"x-scroll-timeline-entry-enter",
19
+ {index:h,id:w,progress:m})):$APP.r($APP.r(q)?!k:q)&&(g[h]=!1,rv(a,"x-scroll-timeline-entry-leave",{index:h,id:w,progress:m}))}h+=1}else break},Cv=function(a){var b=function(){var q=$APP.l(a,"__xScrollTimelineModel");return $APP.r(q)?q:nv(a)}();if(!$APP.r($APP.W.g(b))){var c=ov(a),d=c.length,e=window.innerHeight,g=e*$APP.Xk.g(b),h=function(){for(var q=0,w=$APP.ie;;){if(q>=d)return w;var x=c[q].getBoundingClientRect();q+=1;w=$APP.od.i(w,new $APP.P(null,2,[$APP.Qh,x.top,$APP.Rj,x.top+x.height],null))}}(),
20
+ k=Vu(h,g),m=$APP.N($APP.l(a,"__xScrollTimelineRefs"));m=$APP.G(m,$APP.Zi).getBoundingClientRect();e=$APP.Yg.i(0,$APP.Zg.i(1,(e-m.top)/(e+m.height)));m=$APP.l(a,"__xScrollTimelineLastProg");var p=d<2||k<0?0:function(){var q=function(){var B=$APP.rc(h,0);return($APP.Qh.g(B)+$APP.Rj.g(B))/2}(),w=function(){var B=$APP.rc(h,d-1);return($APP.Qh.g(B)+$APP.Rj.g(B))/2}()-q,x=$APP.rc(h,k),y=($APP.Qh.g(x)+$APP.Rj.g(x))/2;x=Wu($APP.Qh.g(x),$APP.Rj.g(x)-$APP.Qh.g(x),g);var A=k<d-1?function(){var B=$APP.rc(h,k+
21
+ 1);return($APP.Qh.g(B)+$APP.Rj.g(B))/2}():y;return w<=0?1:$APP.Yg.i(0,$APP.Zg.i(1,(y+x*(A-y)-q)/w))}();Av(a,c,k);Bv(a,c,h,g);$APP.D.i($APP.wi.g(b),"curved")?zv(a,p,mv.g(b)):xv(a,p,mv.g(b));if(m==null||Math.abs(e-m)>.001)a.__xScrollTimelineLastProg=e,b=k>=0&&k<d?qv(c[k]):null,rv(a,"x-scroll-timeline-progress",{progress:e,activeIndex:k,activeId:b})}a.__xScrollTimelineRAF=null},Dv=function(a){return function d(c){if($APP.r(function(){var h=a.isConnected;return $APP.r(h)?(h=$APP.l(a,"__xScrollTimelineVisible"),
22
+ $APP.r(h)?$APP.t($APP.l(a,"__xScrollTimelineAutoplayPaused")):h):h}())){var e=$APP.l(a,"__xScrollTimelineModel");if($APP.r(function(){if($APP.r(e)){var h=$APP.gi.g(e);return $APP.r(h)?$APP.t($APP.W.g(e)):h}return e}())){var g=$APP.l(a,"__xScrollTimelineAutoplayLast");g=$APP.r(g)?(c-g)/1E3:0;a.__xScrollTimelineAutoplayLast=c;g>0&&(window.scrollBy(0,$APP.mj.g(e)*g),$APP.r($APP.Wh.g(e))&&(g=window.scrollY,c=window.innerHeight,g+c>=document.documentElement.scrollHeight-1&&(g=a.getBoundingClientRect().top+
23
+ g,window.scrollTo(0,$APP.Yg.i(0,g-c)),a.__xScrollTimelineAutoplayLast=null)));return $APP.n(a,"__xScrollTimelineAutoplayRAF",requestAnimationFrame(d))}}return null}},Ev=function(a){if($APP.r($APP.l(a,"__xScrollTimelineAutoplayPaused")))return null;a.__xScrollTimelineAutoplayPaused=!0;var b=$APP.l(a,"__xScrollTimelineAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollTimelineAutoplayRAF=null);a.setAttribute("data-autoplay-paused","");b=function(){var e=$APP.l(a,"__xScrollTimelineLastProg");
24
+ return $APP.r(e)?e:0}();var c=function(){var e=$APP.l(a,"__xScrollTimelineActiveIndex");return $APP.r(e)?e:-1}(),d=ov(a);d=c>=0&&c<d.length?qv(d[c]):null;return rv(a,"x-scroll-timeline-autoplay-pause",{progress:b,activeIndex:c,activeId:d})},Fv=function(a){if($APP.r($APP.l(a,"__xScrollTimelineAutoplayPaused"))){a.__xScrollTimelineAutoplayPaused=!1;a.removeAttribute("data-autoplay-paused");a.__xScrollTimelineAutoplayLast=null;$APP.n(a,"__xScrollTimelineAutoplayRAF",requestAnimationFrame(Dv(a)));var b=
25
+ function(){var e=$APP.l(a,"__xScrollTimelineLastProg");return $APP.r(e)?e:0}(),c=function(){var e=$APP.l(a,"__xScrollTimelineActiveIndex");return $APP.r(e)?e:-1}(),d=ov(a);d=c>=0&&c<d.length?qv(d[c]):null;return rv(a,"x-scroll-timeline-autoplay-resume",{progress:b,activeIndex:c,activeId:d})}return null},Gv=function(a){var b=$APP.l(a,"__xScrollTimelineAutoplayRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollTimelineAutoplayRAF=null);b=$APP.l(a,"__xScrollTimelineAutoplayHandlers");$APP.r(b)&&(a.removeEventListener("pointerdown",
26
+ $APP.l(b,"pointerdown")),a.removeEventListener("pointerup",$APP.l(b,"pointerup")),a.removeEventListener("pointerleave",$APP.l(b,"pointerleave")),a.removeEventListener("keydown",$APP.l(b,"keydown")),a.removeEventListener("keyup",$APP.l(b,"keyup")),a.__xScrollTimelineAutoplayHandlers=null);a.removeAttribute("data-autoplay-paused");a.removeAttribute("tabindex");a.__xScrollTimelineAutoplayPaused=!1;a.__xScrollTimelineAutoplayLast=null},Hv=function(a){if($APP.l(a,"__xScrollTimelineAutoplayRAF")==null){var b=
27
+ $APP.l(a,"__xScrollTimelineModel");if($APP.r(function(){if($APP.r(b)){var k=$APP.gi.g(b);return $APP.r(k)?(k=$APP.t($APP.W.g(b)))?(k=$APP.l(a,"__xScrollTimelineVisible"),$APP.r(k)?!pv():k):k:k}return b}())){a.setAttribute("tabindex","0");a.__xScrollTimelineAutoplayPaused=!1;a.__xScrollTimelineAutoplayLast=null;var c=function(){return Ev(a)},d=function(){return Fv(a)},e=function(){return $APP.r($APP.l(a,"__xScrollTimelineAutoplayPaused"))?Fv(a):null},g=function(k){return $APP.D.i(k.code,"Space")?(k.preventDefault(),
28
+ Ev(a)):null},h=function(k){return $APP.D.i(k.code,"Space")?Fv(a):null};a.addEventListener("pointerdown",c);a.addEventListener("pointerup",d);a.addEventListener("pointerleave",e);a.addEventListener("keydown",g);a.addEventListener("keyup",h);$APP.n(a,"__xScrollTimelineAutoplayHandlers",{pointerdown:c,pointerup:d,pointerleave:e,keydown:g,keyup:h});$APP.n(a,"__xScrollTimelineAutoplayRAF",requestAnimationFrame(Dv(a)))}}return null},Iv=function(a){a=$APP.l(a,"__xScrollTimelineModel");return $APP.r(a)?$APP.W.g(a):
29
+ a},Jv=function(a){return $APP.r(function(){var b=a.isConnected;return $APP.r(b)?(b=$APP.l(a,"__xScrollTimelineVisible"),$APP.r(b)?$APP.t(Iv(a))&&!pv():b):b}())?$APP.r($APP.l(a,"__xScrollTimelineRAF"))?null:$APP.n(a,"__xScrollTimelineRAF",requestAnimationFrame(function(){return Cv(a)})):null},Kv=function(a){a=$APP.l(a,"__xScrollTimelineHandlers");$APP.r($APP.r(a)?$APP.t($APP.l(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.l(a,"scroll"),{passive:!0}),a.scrollAttached=!0)},Lv=function(a){a=
30
+ $APP.l(a,"__xScrollTimelineHandlers");$APP.r($APP.r(a)?$APP.l(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.l(a,"scroll")),a.scrollAttached=!1)},Mv=function(a,b){b=b[0].isIntersecting;a.__xScrollTimelineVisible=b;if($APP.r(b)){if($APP.r(Iv(a)))return null;Kv(a);Cv(a);sv(a,"Timeline entered viewport");rv(a,"x-scroll-timeline-enter",{progress:function(){var c=$APP.l(a,"__xScrollTimelineLastProg");return $APP.r(c)?c:0}()});b=$APP.l(a,"__xScrollTimelineModel");return $APP.r($APP.r(b)?
31
+ $APP.gi.g(b):b)?Hv(a):null}Lv(a);Gv(a);if($APP.r(Iv(a)))return null;sv(a,"Timeline left viewport");return rv(a,"x-scroll-timeline-leave",{progress:function(){var c=$APP.l(a,"__xScrollTimelineLastProg");return $APP.r(c)?c:0}()})},Nv=function(a){var b=function(){var d=$APP.l(a,"__xScrollTimelineModel");return $APP.r(d)?d:nv(a)}(),c=ov(a);tv(c,$APP.Aj.g(b));vv(a,c);wv(a,c);return requestAnimationFrame(function(){var d=ov(a),e=$APP.l(a,"__xScrollTimelineMarkerEls"),g=$APP.l(a,"__xScrollTimelineDateEls"),
32
+ h=$APP.N($APP.l(a,"__xScrollTimelineRefs"));h=$APP.G(h,$APP.Zi).getBoundingClientRect().top;var k=$APP.l(a,"__xScrollTimelineModel");k=$APP.r(k)?k:nv(a);k=$APP.Aj.g(k);for(var m=d.length,p=0;;)if(p<m){var q=d[p].getBoundingClientRect();q=q.top+q.height/2-h;var w=Uu(k,p),x=$APP.r(e)?e[p]:e;$APP.r(x)&&(x.style.top=""+$APP.S.g(q)+"px");x=$APP.r(g)?g[p]:g;$APP.r(x)&&(x.style.top=""+$APP.S.g(q)+"px",x.setAttribute("data-side",w));p+=1}else break;$APP.D.i($APP.wi.g(b),"curved")&&yv(a,d);return $APP.r($APP.l(a,
33
+ "__xScrollTimelineVisible"))?Cv(a):null})},Ov=function(a){function b(){return $APP.r($APP.l(a,"__xScrollTimelineVisible"))?(a.__xScrollTimelineEntryStates=null,Nv(a)):null}function c(){a.__xScrollTimelineEntryStates=null;return Nv(a)}var d=fv(a);d=$APP.N(d);$APP.G(d,$APP.Fi).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.n(a,"__xScrollTimelineHandlers",{scroll:function(){return Jv(a)},slot:c,resize:b,scrollAttached:!1})},Pv=function(a){var b=$APP.l(a,"__xScrollTimelineHandlers");
34
+ if($APP.r(b)){Lv(a);var c=$APP.l(a,"__xScrollTimelineRefs");if($APP.r(c)){c=$APP.Fi.g(c);var d=$APP.l(b,"slot");$APP.r(d)&&c.removeEventListener("slotchange",d)}b=$APP.l(b,"resize");$APP.r(b)&&window.removeEventListener("resize",b)}b=$APP.l(a,"__xScrollTimelineRAF");$APP.r(b)&&(cancelAnimationFrame(b),a.__xScrollTimelineRAF=null);a.__xScrollTimelineHandlers=null},Qv=function(a){var b=$APP.l(a,"__xScrollTimelineIO");$APP.r(b)&&b.disconnect();b=new IntersectionObserver(function(c){return Mv(a,c)},{threshold:[0]});
35
+ b.observe(a);a.__xScrollTimelineIO=b},Rv=function(a){var b=nv(a);if($APP.O($APP.l(a,"__xScrollTimelineModel"),b)){b=$APP.N(b);var c=$APP.G(b,$APP.Aj),d=$APP.G(b,$APP.wi),e=$APP.G(b,$APP.W),g=$APP.G(b,$APP.T),h=$APP.G(b,$APP.Yj),k=fv(a);k=$APP.N(k);k=$APP.G(k,$APP.Zi);var m=$APP.l(a,"__xScrollTimelineModel");a.setAttribute("data-layout",c);a.setAttribute("data-track",d);a.setAttribute("data-marker",h);$APP.u(g)?k.setAttribute("aria-label",g):k.removeAttribute("aria-label");a.__xScrollTimelineModel=
36
+ b;$APP.r(e)?(uv(a),a.__xScrollTimelineActiveIndex=-1,a.__xScrollTimelineEntryStates=null,Lv(a),Gv(a)):$APP.r(m)&&($APP.O($APP.Aj.g(m),c)||$APP.O($APP.wi.g(m),d)||$APP.O($APP.Yj.g(m),h)||$APP.O($APP.W.g(m),e)?Nv(a):($APP.O($APP.Xk.g(m),$APP.Xk.g(b))||$APP.O(mv.g(m),mv.g(b)))&&$APP.r($APP.l(a,"__xScrollTimelineVisible"))&&Cv(a));$APP.r(e)||(b=$APP.gi.g(b),$APP.r($APP.r(b)?$APP.l(a,"__xScrollTimelineVisible"):b)?Hv(a):Gv(a))}},Sv=function(a,b,c,d){Object.defineProperty(a,b,{get:function(){var e=this.getAttribute(c);
37
+ return $APP.r(e)?e:d},set:function(e){return $APP.r(e)?this.setAttribute(c,""+$APP.S.g(e)):this.removeAttribute(c)},enumerable:!0,configurable:!0})},Tv=function(a){Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.r(b)?b:""},set:function(b){return $APP.r($APP.r(b)?$APP.O(b,""):b)?this.setAttribute("label",""+$APP.S.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},Uv=function(a,b,c){Object.defineProperty(a,b,{get:function(){return this.hasAttribute(c)},
38
+ set:function(d){return $APP.r(d)?this.setAttribute(c,""):this.removeAttribute(c)},enumerable:!0,configurable:!0})},Vv=function(a,b,c,d){Object.defineProperty(a,b,{get:function(){var e=this.getAttribute(c);return d.g?d.g(e):d.call(null,e)},set:function(e){return e!=null?this.setAttribute(c,""+$APP.S.g(e)):this.removeAttribute(c)},enumerable:!0,configurable:!0})},Wv=function(a,b,c,d){Object.defineProperty(a,b,{get:function(){var e=$APP.l(this,c);return e!=null?e:d},enumerable:!0,configurable:!0})},
39
+ Xv=function(a){Sv(a,"layout","layout","alternating");Sv(a,"track","track","straight");Sv(a,"marker","marker","dot");Tv(a);Vv(a,"threshold","threshold",Su);Uv(a,"noProgress","no-progress");Uv(a,"disabled","disabled");Uv(a,"autoplay","autoplay");Vv(a,"autoplaySpeed","autoplay-speed",Tu);Uv(a,"autoplayLoop","autoplay-loop");Uv(a,"autoplayIndicator","autoplay-indicator");Wv(a,"activeIndex","__xScrollTimelineActiveIndex",-1);Wv(a,"progress","__xScrollTimelineLastProg",0);Wv(a,"autoplayPaused","__xScrollTimelineAutoplayPaused",
40
+ !1)},Zv=function(){var a=class extends HTMLElement{};a.observedAttributes=Yv;a.prototype.connectedCallback=function(){fv(this);Pv(this);Ov(this);Qv(this);Rv(this);return null};a.prototype.disconnectedCallback=function(){Gv(this);uv(this);if($APP.r($APP.l(this,"__xScrollTimelineVisible"))){var b=$APP.l(this,"__xScrollTimelineLastProg");rv(this,"x-scroll-timeline-leave",{progress:$APP.r(b)?b:0})}Pv(this);b=$APP.l(this,"__xScrollTimelineIO");$APP.r(b)&&(b.disconnect(),this.__xScrollTimelineIO=null);
41
+ this.__xScrollTimelineVisible=!1;this.__xScrollTimelineActiveIndex=-1;return this.__xScrollTimelineEntryStates=this.__xScrollTimelineLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.O(c,d)&&Rv(this);return null};Xv(a.prototype);return a},$v=function(){$APP.r(customElements.get("x-scroll-timeline"))||customElements.define("x-scroll-timeline",Zv());return null},ev=new $APP.K(null,"track-fill","track-fill",1852369499),av=new $APP.K(null,"entries","entries",-86943161),gv=new $APP.K(null,
42
+ "marker-raw","marker-raw",2140891555),dv=new $APP.K(null,"indicator","indicator",1928219637),mv=new $APP.K(null,"no-progress?","no-progress?",-1599319890),hv=new $APP.K(null,"track-raw","track-raw",751958776),bv=new $APP.K(null,"track-path","track-path",-1838135442),$u=new $APP.K(null,"fill-path","fill-path",-792439899),iv=new $APP.K(null,"no-progress-attr","no-progress-attr",115951679),Zu=new $APP.K(null,"track-svg","track-svg",-556455964),Xu=new $APP.K(null,"side","side",389652279),cv=new $APP.K(null,
43
+ "track-line","track-line",1370628624);var Yv="layout track threshold no-progress disabled label marker autoplay autoplay-speed autoplay-loop autoplay-indicator".split(" ");
44
+ $APP.Q([$APP.Ak,$APP.ph,$APP.Vj,$APP.gj,$APP.Aj,$APP.Cj,$APP.Yj,$APP.Xk,$APP.Cl,$APP.T,$APP.Oj,$APP.el,new $APP.K(null,"noProgress","noProgress",-2114530658),$APP.wi],[new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.V],null),
45
+ new $APP.P(null,2,[$APP.Z,$APP.qj,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.X],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,2,[$APP.Z,$APP.V,$APP.Fj,!0],null),new $APP.P(null,1,[$APP.Z,$APP.qj],null),new $APP.P(null,1,[$APP.Z,$APP.X],null)]);
46
+ $APP.Sd(["x-scroll-timeline-entry-change",new $APP.P(null,2,[$APP.U,new $APP.P(null,4,[$APP.Eh,$APP.V,$APP.Ek,$APP.X,$APP.rj,$APP.V,$APP.Vl,$APP.X],null),$APP.ll,!1],null),"x-scroll-timeline-entry-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Ek,$APP.X,$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-timeline-entry-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.Eh,$APP.V,$APP.Ek,$APP.X,$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-timeline-progress",new $APP.P(null,
47
+ 2,[$APP.U,new $APP.P(null,3,[$APP.el,$APP.V,$APP.Cj,$APP.V,$APP.Lk,$APP.X],null),$APP.ll,!1],null),"x-scroll-timeline-enter",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-timeline-leave",new $APP.P(null,2,[$APP.U,new $APP.P(null,1,[$APP.el,$APP.V],null),$APP.ll,!1],null),"x-scroll-timeline-autoplay-pause",new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.el,$APP.V,$APP.Cj,$APP.V,$APP.Lk,$APP.X],null),$APP.ll,!1],null),"x-scroll-timeline-autoplay-resume",
48
+ new $APP.P(null,2,[$APP.U,new $APP.P(null,3,[$APP.el,$APP.V,$APP.Cj,$APP.V,$APP.Lk,$APP.X],null),$APP.ll,!1],null)]);var jv=new $APP.R(null,new $APP.P(null,3,["right",null,"left",null,"alternating",null],null),null),lv=new $APP.R(null,new $APP.P(null,2,["curved",null,"straight",null],null),null),kv=new $APP.R(null,new $APP.P(null,3,["ring",null,"none",null,"dot",null],null),null);$APP.ka("baredom.exports.x_scroll_timeline.init",$v);export const init=$v;