@vanelsas/baredom 2.0.0 → 2.1.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.
- package/CHANGELOG.md +32 -0
- package/README.md +26 -7
- package/dist/base.js +405 -403
- package/dist/x-alert.js +19 -19
- package/dist/x-avatar-group.js +11 -11
- package/dist/x-avatar.js +15 -15
- package/dist/x-badge.js +11 -11
- package/dist/x-bento-grid.js +5 -5
- package/dist/x-bento-item.js +4 -4
- package/dist/x-breadcrumbs.js +14 -14
- package/dist/x-button.js +16 -16
- package/dist/x-cancel-dialogue.js +17 -17
- package/dist/x-card.js +7 -7
- package/dist/x-carousel.js +35 -0
- package/dist/x-chart.js +48 -48
- package/dist/x-checkbox.js +11 -11
- package/dist/x-chip.js +9 -9
- package/dist/x-collapse.js +11 -11
- package/dist/x-color-picker.js +46 -0
- package/dist/x-command-palette.js +27 -32
- package/dist/x-container.js +6 -6
- package/dist/x-context-menu.js +20 -20
- package/dist/x-copy.js +23 -23
- package/dist/x-currency-field.js +23 -23
- package/dist/x-date-picker.js +42 -42
- package/dist/x-divider.js +10 -13
- package/dist/x-drawer.js +12 -12
- package/dist/x-dropdown.js +10 -10
- package/dist/x-fieldset.js +6 -6
- package/dist/x-file-download.js +7 -7
- package/dist/x-form-field.js +16 -16
- package/dist/x-form.js +10 -10
- package/dist/x-gaussian-blur.js +18 -18
- package/dist/x-grid.js +6 -6
- package/dist/x-kinetic-font.js +29 -28
- package/dist/x-kinetic-typography.js +39 -39
- package/dist/x-liquid-dock.js +39 -39
- package/dist/x-liquid-fill.js +45 -44
- package/dist/x-liquid-glass.js +47 -47
- package/dist/x-menu-item.js +10 -10
- package/dist/x-menu.js +11 -12
- package/dist/x-metaball-cursor.js +27 -28
- package/dist/x-modal.js +13 -13
- package/dist/x-morph-stack.js +39 -39
- package/dist/x-navbar.js +13 -13
- package/dist/x-neural-glow.js +34 -34
- package/dist/x-notification-center.js +10 -9
- package/dist/x-organic-divider.js +19 -19
- package/dist/x-organic-progress.js +38 -38
- package/dist/x-organic-shape.js +14 -14
- package/dist/x-pagination.js +16 -16
- package/dist/x-particle-button.js +53 -0
- package/dist/x-popover.js +15 -15
- package/dist/x-progress-circle.js +11 -11
- package/dist/x-progress.js +11 -11
- package/dist/x-radio.js +11 -11
- package/dist/x-ripple-effect.js +12 -12
- package/dist/x-scroll-parallax.js +19 -19
- package/dist/x-scroll-stack.js +19 -19
- package/dist/x-scroll-story.js +36 -36
- package/dist/x-scroll-timeline.js +47 -47
- package/dist/x-scroll.js +42 -42
- package/dist/x-search-field.js +15 -15
- package/dist/x-select.js +11 -11
- package/dist/x-sidebar.js +17 -17
- package/dist/x-skeleton.js +6 -6
- package/dist/x-slider.js +16 -16
- package/dist/x-soft-body.js +22 -22
- package/dist/x-spacer.js +5 -5
- package/dist/x-spinner.js +5 -5
- package/dist/x-splash.js +13 -13
- package/dist/x-stat.js +11 -11
- package/dist/x-stepper.js +16 -16
- package/dist/x-switch.js +10 -10
- package/dist/x-tab.js +8 -8
- package/dist/x-table-cell.js +24 -24
- package/dist/x-table-row.js +10 -10
- package/dist/x-table.js +16 -16
- package/dist/x-tabs.js +11 -11
- package/dist/x-text-area.js +19 -19
- package/dist/x-theme.js +25 -24
- package/dist/x-timeline-item.js +24 -24
- package/dist/x-timeline.js +9 -9
- package/dist/x-toast.js +25 -25
- package/dist/x-toaster.js +8 -8
- package/dist/x-typography.js +11 -11
- package/package.json +14 -2
|
@@ -1,48 +1,48 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
e:g;var h=$APP.
|
|
4
|
-
e+1),m=$APP.
|
|
5
|
-
h=document.createElement("div"),
|
|
6
|
-
d.setAttribute("part","container");d.setAttribute("role","feed");e.setAttribute("part","track");g.setAttribute("part","track-line");h.setAttribute("part","track-fill");
|
|
7
|
-
x.setAttribute("part","indicator");d.appendChild(e);d.appendChild(q);d.appendChild(
|
|
8
|
-
|
|
9
|
-
$APP.
|
|
10
|
-
[p,g,c!=null,d!=null,m,e,q!=null,a!=null,h,b,
|
|
11
|
-
$APP
|
|
12
|
-
var d=$APP.
|
|
13
|
-
|
|
14
|
-
$APP.
|
|
15
|
-
7:E/2}(),y=function(){switch(
|
|
16
|
-
|
|
17
|
-
e[d].removeAttribute("data-active"),c>=0&&c<e.length&&e[c].setAttribute("data-active",""));$APP.
|
|
18
|
-
previousId:g});
|
|
19
|
-
{index:h,id:
|
|
20
|
-
|
|
21
|
-
1);return($APP.
|
|
22
|
-
$APP.
|
|
23
|
-
g,window.scrollTo(0,$APP.
|
|
24
|
-
return $APP.
|
|
25
|
-
function(){var e=$APP.
|
|
26
|
-
$APP.
|
|
27
|
-
$APP.
|
|
28
|
-
|
|
29
|
-
a},
|
|
30
|
-
|
|
31
|
-
$APP.
|
|
32
|
-
h=$APP.
|
|
33
|
-
"__xScrollTimelineVisible"))?
|
|
34
|
-
if($APP.
|
|
35
|
-
b.observe(a);a.__xScrollTimelineIO=b},
|
|
36
|
-
b;$APP.
|
|
37
|
-
return $APP.
|
|
38
|
-
set:function(d){return $APP.
|
|
39
|
-
|
|
40
|
-
!1)},
|
|
41
|
-
this.__xScrollTimelineVisible=!1;this.__xScrollTimelineActiveIndex=-1;return this.__xScrollTimelineEntryStates=this.__xScrollTimelineLastProg=null};a.prototype.attributeChangedCallback=function(b,c,d){$APP.
|
|
42
|
-
"marker-raw","marker-raw",2140891555),
|
|
43
|
-
"track-line","track-line",1370628624);var
|
|
44
|
-
$APP.
|
|
45
|
-
new $APP.
|
|
46
|
-
$APP.
|
|
47
|
-
2,[$APP.
|
|
48
|
-
new $APP.
|
|
2
|
+
var Qv=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?.5:$APP.$g.i(0,$APP.ah.i(1,a))):.5},Rv=function(a){return typeof a==="string"?(a=parseFloat(a.trim()),$APP.n(isNaN(a))?50:$APP.$g.i(1,$APP.ah.i(1E3,a))):50},Sv=function(a,b){switch(a){case "alternating":return $APP.ed(b,2)===0?"left":"right";case "left":return"right";case "right":return"left";default:return"right"}},Tv=function(a,b){var c=$APP.z(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.oc(a,d),l=$APP.M(h);h=$APP.D(l,$APP.Yh);l=$APP.D(l,$APP.fk);e=h<=b&&l>b?d:e;g=h<=b?d:g;d+=1}},Uv=function(a,b,c){return b<=0?0:$APP.$g.i(0,$APP.ah.i(1,(c-a)/b))},Wv=function(a,b,c){var d=$APP.z(a);if(d===0)return"";if($APP.C.i(d,1))return a=$APP.u(a),a=$APP.M(a),a=$APP.D(a,$APP.Xk),"M "+$APP.T.g(c)+" "+$APP.T.g(a);var e=$APP.u(a),g=$APP.Xk.g(e);e=0;for(g=new $APP.O(null,1,5,$APP.P,["M "+$APP.T.g(c)+" "+$APP.T.g(g)],null);;){if(e>=d-1)return $APP.Eg(g);var h=$APP.oc(a,e),l=$APP.oc(a,
|
|
4
|
+
e+1),m=$APP.Xk.g(h),p=$APP.Xk.g(l);h=Vv.g(h);var q=Vv.g(l);l=$APP.C.i(h,"left")?-b:b;q=$APP.C.i(q,"left")?-b:b;h=m+(p-m)*.33;q=c+q;m+=(p-m)*.66;var v=c;e+=1;g=$APP.kd.i(g,"C "+$APP.T.g(c+l)+" "+$APP.T.g(h)+" "+$APP.T.g(q)+" "+$APP.T.g(m)+" "+$APP.T.g(v)+" "+$APP.T.g(p))}},dw=function(a){var b=$APP.k(a,"__xScrollTimelineRefs");if($APP.n(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"),l=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"),v=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
|
+
d.setAttribute("part","container");d.setAttribute("role","feed");e.setAttribute("part","track");g.setAttribute("part","track-line");h.setAttribute("part","track-fill");l.setAttribute("part","track-svg");l.setAttribute("aria-hidden","true");l.setAttribute("focusable","false");m.setAttribute("part","track-path");p.setAttribute("part","track-fill-path");p.setAttribute("pathLength","1");l.appendChild(m);l.appendChild(p);e.appendChild(g);e.appendChild(h);q.setAttribute("part","entries");q.appendChild(v);
|
|
7
|
+
x.setAttribute("part","indicator");d.appendChild(e);d.appendChild(q);d.appendChild(l);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.xf([$APP.Li,Xv,Yv,Zv,$v,aw,$APP.ji,$APP.ej,bw,$APP.hi,cw,$APP.Fi],[v,l,p,q,m,g,b,d,x,y,h,e]);a.__xScrollTimelineRefs=b;return $APP.k(a,"__xScrollTimelineRefs")},lw=function(a){a=$APP.xf([$APP.Wh,ew,$APP.vj,$APP.sl,$APP.Gh,$APP.Bk,$APP.si,
|
|
8
|
+
fw,$APP.Gi,$APP.rl,gw],[a.getAttribute("label"),a.getAttribute("marker"),a.getAttribute("autoplay-speed"),$APP.n(a.hasAttribute("autoplay"))?"":null,a.getAttribute("threshold"),a.getAttribute("layout"),$APP.n(a.hasAttribute("autoplay-indicator"))?"":null,a.getAttribute("track"),$APP.n(a.hasAttribute("disabled"))?"":null,$APP.n(a.hasAttribute("autoplay-loop"))?"":null,$APP.n(a.hasAttribute("no-progress"))?"":null]);var b=$APP.M(a);a=$APP.D(b,$APP.Gi);var c=$APP.D(b,$APP.rl),d=$APP.D(b,gw),e=$APP.D(b,
|
|
9
|
+
$APP.Wh),g=$APP.D(b,ew),h=$APP.D(b,$APP.vj),l=$APP.D(b,$APP.sl),m=$APP.D(b,$APP.Gh),p=$APP.D(b,$APP.Bk),q=$APP.D(b,$APP.si);b=$APP.D(b,fw);p=typeof p==="string"?p.trim().toLowerCase():null;p=$APP.J(hw,p)?p:"alternating";g=typeof g==="string"?g.trim().toLowerCase():null;g=$APP.J(iw,g)?g:"dot";m=Qv(m);e=$APP.n(e)?e:"";h=Rv(h);b=typeof b==="string"?b.trim().toLowerCase():null;b=$APP.J(jw,b)?b:"straight";return $APP.xf([$APP.Nj,$APP.mk,$APP.di,kw,$APP.gl,$APP.U,$APP.li,$APP.W,$APP.wj,$APP.Fi,$APP.oi],
|
|
10
|
+
[p,g,c!=null,d!=null,m,e,q!=null,a!=null,h,b,l!=null])},mw=function(a){a=dw(a);a=$APP.M(a);return $APP.D(a,$APP.Li).assignedElements()},nw=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},ow=function(a){a=a.getAttribute("id");return typeof a==="string"&&$APP.N(a,"")?a:null},pw=function(a,b,c){b=new CustomEvent(b,{detail:c,bubbles:!0,composed:!0,cancelable:!1});return a.dispatchEvent(b)},qw=function(a,b){a=$APP.M($APP.k(a,"__xScrollTimelineRefs"));var c=$APP.D(a,
|
|
11
|
+
$APP.hi);c.textContent=b;setTimeout(function(){return c.textContent=""},1E3)},rw=function(a,b){for(var c=a.length,d=0;;)if(d<c){var e=a[d];e.setAttribute("data-side",Sv(b,d));e.setAttribute("data-index",""+$APP.T.g(d));d+=1}else break},sw=function(a){a=mw(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},tw=function(a,b){var c=$APP.M($APP.k(a,"__xScrollTimelineRefs"));c=$APP.D(c,$APP.ej);
|
|
12
|
+
var d=$APP.k(a,"__xScrollTimelineMarkerEls");d=$APP.n(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},uw=function(a,b){var c=$APP.M($APP.k(a,"__xScrollTimelineRefs"));c=$APP.D(c,$APP.ej);var d=$APP.k(a,"__xScrollTimelineDateEls");var e=$APP.n(d)?d:[];d=b.length;for(var g=e.length,h=0;;)if(h<g){var l=e[h];$APP.n(l)&&
|
|
13
|
+
l.remove();h+=1}else break;e=Array(d);for(g=0;;)if(g<d)h=b[g].getAttribute("data-date"),typeof h==="string"&&$APP.N(h,"")?(l=document.createElement("span"),l.classList.add("tl-date"),l.textContent=h,c.appendChild(l),e[g]=l):e[g]=null,g+=1;else break;a.__xScrollTimelineDateEls=e},vw=function(a,b,c){a=$APP.M($APP.k(a,"__xScrollTimelineRefs"));a=$APP.D(a,cw);$APP.n(c)?a.style.height="0%":a.style.height=""+$APP.T.g(b*100)+"%"},ww=function(a,b){var c=$APP.M($APP.k(a,"__xScrollTimelineRefs")),d=$APP.D(c,
|
|
14
|
+
$APP.ej),e=$APP.D(c,Xv),g=$APP.D(c,$v);c=$APP.D(c,Yv);var h=function(){var E=$APP.k(a,"__xScrollTimelineModel");return $APP.n(E)?E:lw(a)}(),l=$APP.Nj.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.n(isNaN(E))?60:E}();var v=window.getComputedStyle(a).getPropertyValue("--x-scroll-timeline-marker-size"),x=function(){var E=parseFloat(v);return $APP.n(isNaN(E))?
|
|
15
|
+
7:E/2}(),y=function(){switch(l){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.ee;;){if(E>=A)return H;var G=b[E].getBoundingClientRect(),I=E+1;H=$APP.kd.i(H,new $APP.R(null,2,[$APP.Xk,G.top+G.height/2-m,Vv,Sv(l,E)],null));E=I}}();h=Wv(B,h,y);e.setAttribute("viewBox","0 0 "+$APP.T.g(p)+" "+$APP.T.g(d));g.setAttribute("d",h);c.setAttribute("d",h);c.setAttribute("stroke-dasharray","1");c.setAttribute("stroke-dashoffset","1")}},
|
|
16
|
+
xw=function(a,b,c){a=$APP.M($APP.k(a,"__xScrollTimelineRefs"));a=$APP.D(a,Yv);$APP.n(c)?a.setAttribute("stroke-dashoffset","1"):a.setAttribute("stroke-dashoffset",""+$APP.T.g(1-b))},yw=function(a,b,c){var d=$APP.k(a,"__xScrollTimelineActiveIndex");d=$APP.n(d)?d:-1;if($APP.N(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.k(a,"__xScrollTimelineMarkerEls"),g=$APP.k(a,"__xScrollTimelineDateEls");$APP.n(e)&&(d>=0&&d<e.length&&
|
|
17
|
+
e[d].removeAttribute("data-active"),c>=0&&c<e.length&&e[c].setAttribute("data-active",""));$APP.n(g)&&(d>=0&&d<g.length&&(e=g[d],$APP.n(e)&&e.removeAttribute("data-active")),c>=0&&c<g.length&&(g=g[c],$APP.n(g)&&g.setAttribute("data-active","")));c>=0?a.setAttribute("data-active-index",""+$APP.T.g(c)):a.removeAttribute("data-active-index");a.__xScrollTimelineActiveIndex=c;g=d>=0&&d<b.length?ow(b[d]):null;b=c>=0&&c<b.length?ow(b[c]):null;pw(a,"x-scroll-timeline-entry-change",{index:c,id:b,previousIndex:d,
|
|
18
|
+
previousId:g});qw(a,"Entry "+$APP.T.g(c+1)+" active")}},zw=function(a,b,c,d){var e=b.length;var g=$APP.k(a,"__xScrollTimelineEntryStates");if(!$APP.n($APP.n(g)?$APP.C.i(g.length,e):g)){for(var h=Array(e),l=0;;)if(l<e)h[l]=$APP.n($APP.n(g)?l<g.length:g)?g[l]:!1,l+=1;else break;g=a.__xScrollTimelineEntryStates=h}for(h=0;;)if(h<e){if(h<$APP.z(c)){l=$APP.oc(c,h);l=$APP.M(l);var m=$APP.D(l,$APP.Yh),p=$APP.D(l,$APP.fk),q=g[h];l=m<=d&&p>d;var v=ow(b[h]);m=Uv(m,p-m,d);$APP.r(q)&&l?(g[h]=!0,pw(a,"x-scroll-timeline-entry-enter",
|
|
19
|
+
{index:h,id:v,progress:m})):$APP.n($APP.n(q)?!l:q)&&(g[h]=!1,pw(a,"x-scroll-timeline-entry-leave",{index:h,id:v,progress:m}))}h+=1}else break},Aw=function(a){var b=function(){var q=$APP.k(a,"__xScrollTimelineModel");return $APP.n(q)?q:lw(a)}();if(!$APP.n($APP.W.g(b))){var c=mw(a),d=c.length,e=window.innerHeight,g=e*$APP.gl.g(b),h=function(){for(var q=0,v=$APP.ee;;){if(q>=d)return v;var x=c[q].getBoundingClientRect();q+=1;v=$APP.kd.i(v,new $APP.R(null,2,[$APP.Yh,x.top,$APP.fk,x.top+x.height],null))}}(),
|
|
20
|
+
l=Tv(h,g),m=$APP.M($APP.k(a,"__xScrollTimelineRefs"));m=$APP.D(m,$APP.ej).getBoundingClientRect();e=$APP.$g.i(0,$APP.ah.i(1,(e-m.top)/(e+m.height)));m=$APP.k(a,"__xScrollTimelineLastProg");var p=d<2||l<0?0:function(){var q=function(){var B=$APP.oc(h,0);return($APP.Yh.g(B)+$APP.fk.g(B))/2}(),v=function(){var B=$APP.oc(h,d-1);return($APP.Yh.g(B)+$APP.fk.g(B))/2}()-q,x=$APP.oc(h,l),y=($APP.Yh.g(x)+$APP.fk.g(x))/2;x=Uv($APP.Yh.g(x),$APP.fk.g(x)-$APP.Yh.g(x),g);var A=l<d-1?function(){var B=$APP.oc(h,l+
|
|
21
|
+
1);return($APP.Yh.g(B)+$APP.fk.g(B))/2}():y;return v<=0?1:$APP.$g.i(0,$APP.ah.i(1,(y+x*(A-y)-q)/v))}();yw(a,c,l);zw(a,c,h,g);$APP.C.i($APP.Fi.g(b),"curved")?xw(a,p,kw.g(b)):vw(a,p,kw.g(b));if(m==null||Math.abs(e-m)>.001)a.__xScrollTimelineLastProg=e,b=l>=0&&l<d?ow(c[l]):null,pw(a,"x-scroll-timeline-progress",{progress:e,activeIndex:l,activeId:b})}a.__xScrollTimelineRAF=null},Bw=function(a){return function d(c){if($APP.n(function(){var h=a.isConnected;return $APP.n(h)?(h=$APP.k(a,"__xScrollTimelineVisible"),
|
|
22
|
+
$APP.n(h)?$APP.r($APP.k(a,"__xScrollTimelineAutoplayPaused")):h):h}())){var e=$APP.k(a,"__xScrollTimelineModel");if($APP.n(function(){if($APP.n(e)){var h=$APP.oi.g(e);return $APP.n(h)?$APP.r($APP.W.g(e)):h}return e}())){var g=$APP.k(a,"__xScrollTimelineAutoplayLast");g=$APP.n(g)?(c-g)/1E3:0;a.__xScrollTimelineAutoplayLast=c;g>0&&(window.scrollBy(0,$APP.wj.g(e)*g),$APP.n($APP.di.g(e))&&(g=window.scrollY,c=window.innerHeight,g+c>=document.documentElement.scrollHeight-1&&(g=a.getBoundingClientRect().top+
|
|
23
|
+
g,window.scrollTo(0,$APP.$g.i(0,g-c)),a.__xScrollTimelineAutoplayLast=null)));return $APP.ia(a,"__xScrollTimelineAutoplayRAF",requestAnimationFrame(d))}}return null}},Cw=function(a){if($APP.n($APP.k(a,"__xScrollTimelineAutoplayPaused")))return null;a.__xScrollTimelineAutoplayPaused=!0;var b=$APP.k(a,"__xScrollTimelineAutoplayRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollTimelineAutoplayRAF=null);a.setAttribute("data-autoplay-paused","");b=function(){var e=$APP.k(a,"__xScrollTimelineLastProg");
|
|
24
|
+
return $APP.n(e)?e:0}();var c=function(){var e=$APP.k(a,"__xScrollTimelineActiveIndex");return $APP.n(e)?e:-1}(),d=mw(a);d=c>=0&&c<d.length?ow(d[c]):null;return pw(a,"x-scroll-timeline-autoplay-pause",{progress:b,activeIndex:c,activeId:d})},Dw=function(a){if($APP.n($APP.k(a,"__xScrollTimelineAutoplayPaused"))){a.__xScrollTimelineAutoplayPaused=!1;a.removeAttribute("data-autoplay-paused");a.__xScrollTimelineAutoplayLast=null;$APP.ia(a,"__xScrollTimelineAutoplayRAF",requestAnimationFrame(Bw(a)));var b=
|
|
25
|
+
function(){var e=$APP.k(a,"__xScrollTimelineLastProg");return $APP.n(e)?e:0}(),c=function(){var e=$APP.k(a,"__xScrollTimelineActiveIndex");return $APP.n(e)?e:-1}(),d=mw(a);d=c>=0&&c<d.length?ow(d[c]):null;return pw(a,"x-scroll-timeline-autoplay-resume",{progress:b,activeIndex:c,activeId:d})}return null},Ew=function(a){var b=$APP.k(a,"__xScrollTimelineAutoplayRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollTimelineAutoplayRAF=null);b=$APP.k(a,"__xScrollTimelineAutoplayHandlers");$APP.n(b)&&(a.removeEventListener("pointerdown",
|
|
26
|
+
$APP.k(b,"pointerdown")),a.removeEventListener("pointerup",$APP.k(b,"pointerup")),a.removeEventListener("pointerleave",$APP.k(b,"pointerleave")),a.removeEventListener("keydown",$APP.k(b,"keydown")),a.removeEventListener("keyup",$APP.k(b,"keyup")),a.__xScrollTimelineAutoplayHandlers=null);a.removeAttribute("data-autoplay-paused");a.removeAttribute("tabindex");a.__xScrollTimelineAutoplayPaused=!1;a.__xScrollTimelineAutoplayLast=null},Fw=function(a){if($APP.k(a,"__xScrollTimelineAutoplayRAF")==null){var b=
|
|
27
|
+
$APP.k(a,"__xScrollTimelineModel");if($APP.n(function(){if($APP.n(b)){var l=$APP.oi.g(b);return $APP.n(l)?(l=$APP.r($APP.W.g(b)))?(l=$APP.k(a,"__xScrollTimelineVisible"),$APP.n(l)?!nw():l):l:l}return b}())){a.setAttribute("tabindex","0");a.__xScrollTimelineAutoplayPaused=!1;a.__xScrollTimelineAutoplayLast=null;var c=function(){return Cw(a)},d=function(){return Dw(a)},e=function(){return $APP.n($APP.k(a,"__xScrollTimelineAutoplayPaused"))?Dw(a):null},g=function(l){return $APP.C.i(l.code,"Space")?(l.preventDefault(),
|
|
28
|
+
Cw(a)):null},h=function(l){return $APP.C.i(l.code,"Space")?Dw(a):null};a.addEventListener("pointerdown",c);a.addEventListener("pointerup",d);a.addEventListener("pointerleave",e);a.addEventListener("keydown",g);a.addEventListener("keyup",h);$APP.ia(a,"__xScrollTimelineAutoplayHandlers",{pointerdown:c,pointerup:d,pointerleave:e,keydown:g,keyup:h});$APP.ia(a,"__xScrollTimelineAutoplayRAF",requestAnimationFrame(Bw(a)))}}return null},Gw=function(a){a=$APP.k(a,"__xScrollTimelineModel");return $APP.n(a)?
|
|
29
|
+
$APP.W.g(a):a},Hw=function(a){return $APP.n(function(){var b=a.isConnected;return $APP.n(b)?(b=$APP.k(a,"__xScrollTimelineVisible"),$APP.n(b)?$APP.r(Gw(a))&&!nw():b):b}())?$APP.n($APP.k(a,"__xScrollTimelineRAF"))?null:$APP.ia(a,"__xScrollTimelineRAF",requestAnimationFrame(function(){return Aw(a)})):null},Iw=function(a){a=$APP.k(a,"__xScrollTimelineHandlers");$APP.n($APP.n(a)?$APP.r($APP.k(a,"scrollAttached")):a)&&(window.addEventListener("scroll",$APP.k(a,"scroll"),{passive:!0}),a.scrollAttached=
|
|
30
|
+
!0)},Jw=function(a){a=$APP.k(a,"__xScrollTimelineHandlers");$APP.n($APP.n(a)?$APP.k(a,"scrollAttached"):a)&&(window.removeEventListener("scroll",$APP.k(a,"scroll")),a.scrollAttached=!1)},Kw=function(a,b){b=b[0].isIntersecting;a.__xScrollTimelineVisible=b;if($APP.n(b)){if($APP.n(Gw(a)))return null;Iw(a);Aw(a);qw(a,"Timeline entered viewport");pw(a,"x-scroll-timeline-enter",{progress:function(){var c=$APP.k(a,"__xScrollTimelineLastProg");return $APP.n(c)?c:0}()});b=$APP.k(a,"__xScrollTimelineModel");
|
|
31
|
+
return $APP.n($APP.n(b)?$APP.oi.g(b):b)?Fw(a):null}Jw(a);Ew(a);if($APP.n(Gw(a)))return null;qw(a,"Timeline left viewport");return pw(a,"x-scroll-timeline-leave",{progress:function(){var c=$APP.k(a,"__xScrollTimelineLastProg");return $APP.n(c)?c:0}()})},Lw=function(a){var b=function(){var d=$APP.k(a,"__xScrollTimelineModel");return $APP.n(d)?d:lw(a)}(),c=mw(a);rw(c,$APP.Nj.g(b));tw(a,c);uw(a,c);return requestAnimationFrame(function(){var d=mw(a),e=$APP.k(a,"__xScrollTimelineMarkerEls"),g=$APP.k(a,
|
|
32
|
+
"__xScrollTimelineDateEls"),h=$APP.M($APP.k(a,"__xScrollTimelineRefs"));h=$APP.D(h,$APP.ej).getBoundingClientRect().top;var l=$APP.k(a,"__xScrollTimelineModel");l=$APP.n(l)?l:lw(a);l=$APP.Nj.g(l);for(var m=d.length,p=0;;)if(p<m){var q=d[p].getBoundingClientRect();q=q.top+q.height/2-h;var v=Sv(l,p),x=$APP.n(e)?e[p]:e;$APP.n(x)&&(x.style.top=""+$APP.T.g(q)+"px");x=$APP.n(g)?g[p]:g;$APP.n(x)&&(x.style.top=""+$APP.T.g(q)+"px",x.setAttribute("data-side",v));p+=1}else break;$APP.C.i($APP.Fi.g(b),"curved")&&
|
|
33
|
+
ww(a,d);return $APP.n($APP.k(a,"__xScrollTimelineVisible"))?Aw(a):null})},Mw=function(a){function b(){return $APP.n($APP.k(a,"__xScrollTimelineVisible"))?(a.__xScrollTimelineEntryStates=null,Lw(a)):null}function c(){a.__xScrollTimelineEntryStates=null;return Lw(a)}var d=dw(a);d=$APP.M(d);$APP.D(d,$APP.Li).addEventListener("slotchange",c);window.addEventListener("resize",b);$APP.ia(a,"__xScrollTimelineHandlers",{scroll:function(){return Hw(a)},slot:c,resize:b,scrollAttached:!1})},Nw=function(a){var b=
|
|
34
|
+
$APP.k(a,"__xScrollTimelineHandlers");if($APP.n(b)){Jw(a);var c=$APP.k(a,"__xScrollTimelineRefs");if($APP.n(c)){c=$APP.Li.g(c);var d=$APP.k(b,"slot");$APP.n(d)&&c.removeEventListener("slotchange",d)}b=$APP.k(b,"resize");$APP.n(b)&&window.removeEventListener("resize",b)}b=$APP.k(a,"__xScrollTimelineRAF");$APP.n(b)&&(cancelAnimationFrame(b),a.__xScrollTimelineRAF=null);a.__xScrollTimelineHandlers=null},Ow=function(a){var b=$APP.k(a,"__xScrollTimelineIO");$APP.n(b)&&b.disconnect();b=new IntersectionObserver(function(c){return Kw(a,
|
|
35
|
+
c)},{threshold:[0]});b.observe(a);a.__xScrollTimelineIO=b},Pw=function(a){var b=lw(a);if($APP.N($APP.k(a,"__xScrollTimelineModel"),b)){b=$APP.M(b);var c=$APP.D(b,$APP.Nj),d=$APP.D(b,$APP.Fi),e=$APP.D(b,$APP.W),g=$APP.D(b,$APP.U),h=$APP.D(b,$APP.mk),l=dw(a);l=$APP.M(l);l=$APP.D(l,$APP.ej);var m=$APP.k(a,"__xScrollTimelineModel");a.setAttribute("data-layout",c);a.setAttribute("data-track",d);a.setAttribute("data-marker",h);$APP.t(g)?l.setAttribute("aria-label",g):l.removeAttribute("aria-label");a.__xScrollTimelineModel=
|
|
36
|
+
b;$APP.n(e)?(sw(a),a.__xScrollTimelineActiveIndex=-1,a.__xScrollTimelineEntryStates=null,Jw(a),Ew(a)):$APP.n(m)&&($APP.N($APP.Nj.g(m),c)||$APP.N($APP.Fi.g(m),d)||$APP.N($APP.mk.g(m),h)||$APP.N($APP.W.g(m),e)?Lw(a):($APP.N($APP.gl.g(m),$APP.gl.g(b))||$APP.N(kw.g(m),kw.g(b)))&&$APP.n($APP.k(a,"__xScrollTimelineVisible"))&&Aw(a));$APP.n(e)||(b=$APP.oi.g(b),$APP.n($APP.n(b)?$APP.k(a,"__xScrollTimelineVisible"):b)?Fw(a):Ew(a))}},Qw=function(a,b,c,d){Object.defineProperty(a,b,{get:function(){var e=this.getAttribute(c);
|
|
37
|
+
return $APP.n(e)?e:d},set:function(e){return $APP.n(e)?this.setAttribute(c,""+$APP.T.g(e)):this.removeAttribute(c)},enumerable:!0,configurable:!0})},Rw=function(a){Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:""},set:function(b){return $APP.n($APP.n(b)?$APP.N(b,""):b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},Sw=function(a,b,c){Object.defineProperty(a,b,{get:function(){return this.hasAttribute(c)},
|
|
38
|
+
set:function(d){return $APP.n(d)?this.setAttribute(c,""):this.removeAttribute(c)},enumerable:!0,configurable:!0})},Tw=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.T.g(e)):this.removeAttribute(c)},enumerable:!0,configurable:!0})},Uw=function(a,b,c,d){Object.defineProperty(a,b,{get:function(){var e=$APP.k(this,c);return e!=null?e:d},enumerable:!0,configurable:!0})},
|
|
39
|
+
Vw=function(a){Qw(a,"layout","layout","alternating");Qw(a,"track","track","straight");Qw(a,"marker","marker","dot");Rw(a);Tw(a,"threshold","threshold",Qv);Sw(a,"noProgress","no-progress");Sw(a,"disabled","disabled");Sw(a,"autoplay","autoplay");Tw(a,"autoplaySpeed","autoplay-speed",Rv);Sw(a,"autoplayLoop","autoplay-loop");Sw(a,"autoplayIndicator","autoplay-indicator");Uw(a,"activeIndex","__xScrollTimelineActiveIndex",-1);Uw(a,"progress","__xScrollTimelineLastProg",0);Uw(a,"autoplayPaused","__xScrollTimelineAutoplayPaused",
|
|
40
|
+
!1)},Xw=function(){var a=class extends HTMLElement{};a.observedAttributes=Ww;a.prototype.connectedCallback=function(){dw(this);Nw(this);Mw(this);Ow(this);Pw(this);return null};a.prototype.disconnectedCallback=function(){Ew(this);sw(this);if($APP.n($APP.k(this,"__xScrollTimelineVisible"))){var b=$APP.k(this,"__xScrollTimelineLastProg");pw(this,"x-scroll-timeline-leave",{progress:$APP.n(b)?b:0})}Nw(this);b=$APP.k(this,"__xScrollTimelineIO");$APP.n(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.N(c,d)&&Pw(this);return null};Vw(a.prototype);return a},Yw=function(){$APP.n(customElements.get("x-scroll-timeline"))||customElements.define("x-scroll-timeline",Xw());return null},cw=new $APP.K(null,"track-fill","track-fill",1852369499),Zv=new $APP.K(null,"entries","entries",-86943161),ew=new $APP.K(null,
|
|
42
|
+
"marker-raw","marker-raw",2140891555),bw=new $APP.K(null,"indicator","indicator",1928219637),kw=new $APP.K(null,"no-progress?","no-progress?",-1599319890),fw=new $APP.K(null,"track-raw","track-raw",751958776),$v=new $APP.K(null,"track-path","track-path",-1838135442),Yv=new $APP.K(null,"fill-path","fill-path",-792439899),gw=new $APP.K(null,"no-progress-attr","no-progress-attr",115951679),Xv=new $APP.K(null,"track-svg","track-svg",-556455964),Vv=new $APP.K(null,"side","side",389652279),aw=new $APP.K(null,
|
|
43
|
+
"track-line","track-line",1370628624);var Ww="layout track threshold no-progress disabled label marker autoplay autoplay-speed autoplay-loop autoplay-indicator".split(" ");
|
|
44
|
+
$APP.xf([$APP.Ik,$APP.rh,$APP.jk,$APP.mj,$APP.Nj,$APP.Pj,$APP.mk,$APP.gl,$APP.Ul,$APP.U,$APP.ck,$APP.ol,new $APP.K(null,"noProgress","noProgress",-2114530658),$APP.Fi],[new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.V],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,2,[$APP.Z,$APP.V,$APP.Sj,!0],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.V],null),
|
|
45
|
+
new $APP.R(null,2,[$APP.Z,$APP.Bj,$APP.Sj,!0],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,2,[$APP.Z,$APP.V,$APP.Sj,!0],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.X],null)]);
|
|
46
|
+
$APP.Pd(["x-scroll-timeline-entry-change",new $APP.R(null,2,[$APP.yj,new $APP.R(null,4,[$APP.Lh,$APP.V,$APP.Nk,$APP.X,$APP.Cj,$APP.V,$APP.nm,$APP.X],null),$APP.wl,!1],null),"x-scroll-timeline-entry-enter",new $APP.R(null,2,[$APP.yj,new $APP.R(null,3,[$APP.Lh,$APP.V,$APP.Nk,$APP.X,$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-timeline-entry-leave",new $APP.R(null,2,[$APP.yj,new $APP.R(null,3,[$APP.Lh,$APP.V,$APP.Nk,$APP.X,$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-timeline-progress",new $APP.R(null,
|
|
47
|
+
2,[$APP.yj,new $APP.R(null,3,[$APP.ol,$APP.V,$APP.Pj,$APP.V,$APP.Uk,$APP.X],null),$APP.wl,!1],null),"x-scroll-timeline-enter",new $APP.R(null,2,[$APP.yj,new $APP.R(null,1,[$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-timeline-leave",new $APP.R(null,2,[$APP.yj,new $APP.R(null,1,[$APP.ol,$APP.V],null),$APP.wl,!1],null),"x-scroll-timeline-autoplay-pause",new $APP.R(null,2,[$APP.yj,new $APP.R(null,3,[$APP.ol,$APP.V,$APP.Pj,$APP.V,$APP.Uk,$APP.X],null),$APP.wl,!1],null),"x-scroll-timeline-autoplay-resume",
|
|
48
|
+
new $APP.R(null,2,[$APP.yj,new $APP.R(null,3,[$APP.ol,$APP.V,$APP.Pj,$APP.V,$APP.Uk,$APP.X],null),$APP.wl,!1],null)]);var hw=new $APP.S(null,new $APP.R(null,3,["right",null,"left",null,"alternating",null],null),null),jw=new $APP.S(null,new $APP.R(null,2,["curved",null,"straight",null],null),null),iw=new $APP.S(null,new $APP.R(null,3,["ring",null,"none",null,"dot",null],null),null);$APP.fa("baredom.exports.x_scroll_timeline.init",Yw);export const init=Yw;
|
package/dist/x-scroll.js
CHANGED
|
@@ -1,43 +1,43 @@
|
|
|
1
1
|
import { $APP, shadow$provide } from "./base.js";
|
|
2
|
-
var
|
|
3
|
-
$APP.
|
|
4
|
-
d.setAttribute("part","viewport");d.setAttribute("role","region");d.setAttribute("aria-roledescription","carousel");e.setAttribute("part","track");e.appendChild(g);d.appendChild(e);h.setAttribute("part","prev");h.setAttribute("type","button");h.setAttribute("aria-label","Previous slide");h.textContent="‹";
|
|
5
|
-
"Slide indicators");p.setAttribute("part","live");p.setAttribute("aria-live","polite");p.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(h);b.appendChild(
|
|
6
|
-
$APP.
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
"translateY("+$APP.
|
|
10
|
-
"",a+=1;else break;a=m*(h+
|
|
11
|
-
g)?(g.removeEventListener("transitionend",A),g.style.transition="none",
|
|
12
|
-
|
|
13
|
-
$APP.
|
|
14
|
-
g:
|
|
15
|
-
"__xScrollChildCount");return $APP.
|
|
16
|
-
|
|
17
|
-
function y(x){return $APP.
|
|
18
|
-
c=function(){var d=$APP.
|
|
19
|
-
p);return
|
|
20
|
-
($APP.
|
|
21
|
-
c);g=
|
|
22
|
-
"startX"):$APP.
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
this.setAttribute("show-controls","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showIndicators",{get:function(){return this.hasAttribute("show-indicators")},set:function(b){return $APP.
|
|
35
|
-
this.setAttribute("active-index",""+$APP.
|
|
36
|
-
configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.
|
|
37
|
-
var c=$APP.
|
|
38
|
-
b.prev=function(){return
|
|
39
|
-
|
|
40
|
-
$APP.
|
|
41
|
-
$APP.
|
|
42
|
-
$APP.
|
|
43
|
-
var
|
|
2
|
+
var C1=function(a){return a==null?!0:$APP.N((""+$APP.T.g(a)).trim().toLowerCase(),"false")},D1=function(a,b){if(typeof a==="string"){a=parseInt(a.trim(),10);var c=isNaN(a);return $APP.n($APP.n(c)?c:a<0)?b:a}return b},E1=function(a,b){return $APP.n(a)?b>=3:a},F1=function(a,b,c,d){a+=b;return $APP.n(E1(d,c))?c<=0?0:$APP.ed($APP.ed(a,c)+c,c):c<=0?0:$APP.$g.i(0,$APP.ah.i(a,c-1))},G1=function(a,b){var c=$APP.M(a);a=$APP.D(c,$APP.Fj);c=$APP.D(c,$APP.Kk);return $APP.n(E1(c,b))?b>0:a>0},H1=function(a,b){var c=
|
|
3
|
+
$APP.M(a);a=$APP.D(c,$APP.Fj);c=$APP.D(c,$APP.Kk);return $APP.n(E1(c,b))?b>0:a<b-1},J1=function(a){var b=$APP.k(a,"__xScrollRefs");if($APP.n(b))return b;b=a.attachShadow({mode:"open"});var c=document.createElement("style"),d=document.createElement("div"),e=document.createElement("div"),g=document.createElement("slot"),h=document.createElement("button"),l=document.createElement("button"),m=document.createElement("div"),p=document.createElement("div");c.textContent=":host{display:block;position:relative;overflow:hidden;color-scheme:light dark;--x-scroll-gap:0px;--x-scroll-padding:0px;--x-scroll-border-radius:0px;--x-scroll-bg:transparent;--x-scroll-control-size:36px;--x-scroll-control-bg:var(--x-color-bg,rgba(255,255,255,0.9));--x-scroll-control-color:var(--x-color-text,rgba(0,0,0,0.7));--x-scroll-control-hover-bg:var(--x-color-bg,rgba(255,255,255,1));--x-scroll-control-border-radius:50%;--x-scroll-control-shadow:var(--x-shadow-md,0 2px 8px rgba(0,0,0,.15));--x-scroll-indicator-size:8px;--x-scroll-indicator-gap:6px;--x-scroll-indicator-color:var(--x-color-text-muted,rgba(0,0,0,0.25));--x-scroll-indicator-active-color:var(--x-color-text,rgba(0,0,0,0.7));--x-scroll-transition-duration:var(--x-transition-duration,300ms);--x-scroll-slide-size:100%;--x-scroll-disabled-opacity:0.55;--x-scroll-focus-ring:var(--x-color-focus-ring,rgba(0,102,204,0.6));}@media (prefers-color-scheme:dark){:host{--x-scroll-control-bg:var(--x-color-bg,rgba(40,40,40,0.9));--x-scroll-control-color:var(--x-color-text,rgba(255,255,255,0.8));--x-scroll-control-hover-bg:var(--x-color-bg,rgba(50,50,50,1));--x-scroll-control-shadow:var(--x-shadow-md,0 2px 8px rgba(0,0,0,.4));--x-scroll-indicator-color:var(--x-color-text-muted,rgba(255,255,255,0.3));--x-scroll-indicator-active-color:var(--x-color-text,rgba(255,255,255,0.8));--x-scroll-focus-ring:var(--x-color-focus-ring,rgba(100,180,255,0.7));}}[part\x3dviewport]{position:relative;overflow:hidden;width:100%;height:100%;border-radius:var(--x-scroll-border-radius);background:var(--x-scroll-bg);padding:var(--x-scroll-padding);}[part\x3dtrack]{display:flex;position:relative;will-change:transform;transition:transform var(--x-scroll-transition-duration) cubic-bezier(0.25,0.1,0.25,1);touch-action:none;user-select:none;}:host([data-mode\x3dhorizontal]) [part\x3dtrack]{flex-direction:row;}:host([data-mode\x3dvertical]) [part\x3dtrack]{flex-direction:column;}::slotted(*){flex:0 0 var(--x-scroll-slide-size);min-width:0;min-height:0;box-sizing:border-box;}[part\x3dprev],[part\x3dnext]{position:absolute;top:50%;z-index:2;appearance:none;border:0;margin:0;padding:0;width:var(--x-scroll-control-size);height:var(--x-scroll-control-size);border-radius:var(--x-scroll-control-border-radius);background:var(--x-scroll-control-bg);color:var(--x-scroll-control-color);box-shadow:var(--x-scroll-control-shadow);cursor:pointer;display:flex;align-items:center;justify-content:center;font-size:calc(var(--x-scroll-control-size) * 0.5);line-height:1;transform:translateY(-50%);transition:background 120ms ease,opacity 120ms ease;}[part\x3dprev]{left:8px;}[part\x3dnext]{right:8px;}:host([data-mode\x3dvertical]) [part\x3dprev],:host([data-mode\x3dvertical]) [part\x3dnext]{top:auto;left:50%;transform:translateX(-50%);}:host([data-mode\x3dvertical]) [part\x3dprev]{top:8px;}:host([data-mode\x3dvertical]) [part\x3dnext]{bottom:8px;top:auto;}[part\x3dprev]:hover,[part\x3dnext]:hover{background:var(--x-scroll-control-hover-bg);}[part\x3dprev]:focus,[part\x3dnext]:focus{outline:none;}[part\x3dprev]:focus-visible,[part\x3dnext]:focus-visible{outline:2px solid var(--x-scroll-focus-ring);outline-offset:2px;}[part\x3dprev]:disabled,[part\x3dnext]:disabled{opacity:0.3;cursor:default;pointer-events:none;}[data-hide-controls] [part\x3dprev],[data-hide-controls] [part\x3dnext]{display:none;}[part\x3dindicators]{display:flex;justify-content:center;gap:var(--x-scroll-indicator-gap);position:absolute;bottom:12px;left:50%;transform:translateX(-50%);z-index:2;}:host([data-mode\x3dvertical]) [part\x3dindicators]{flex-direction:column;bottom:auto;left:auto;right:12px;top:50%;transform:translateY(-50%);}[part\x3dindicator]{appearance:none;border:0;margin:0;padding:0;width:var(--x-scroll-indicator-size);height:var(--x-scroll-indicator-size);border-radius:50%;background:var(--x-scroll-indicator-color);cursor:pointer;transition:background 120ms ease;}[part\x3dindicator]:focus{outline:none;}[part\x3dindicator]:focus-visible{outline:2px solid var(--x-scroll-focus-ring);outline-offset:2px;}[part\x3dindicator][aria-selected\x3dtrue]{background:var(--x-scroll-indicator-active-color);}[part\x3dlive]{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0,0,0,0);border:0;}:host([disabled]){opacity:var(--x-scroll-disabled-opacity);pointer-events:none;}@media (prefers-reduced-motion:reduce){[part\x3dtrack]{transition:none !important;}}";
|
|
4
|
+
d.setAttribute("part","viewport");d.setAttribute("role","region");d.setAttribute("aria-roledescription","carousel");e.setAttribute("part","track");e.appendChild(g);d.appendChild(e);h.setAttribute("part","prev");h.setAttribute("type","button");h.setAttribute("aria-label","Previous slide");h.textContent="‹";l.setAttribute("part","next");l.setAttribute("type","button");l.setAttribute("aria-label","Next slide");l.textContent="›";m.setAttribute("part","indicators");m.setAttribute("role","tablist");m.setAttribute("aria-label",
|
|
5
|
+
"Slide indicators");p.setAttribute("part","live");p.setAttribute("aria-live","polite");p.setAttribute("aria-atomic","true");b.appendChild(c);b.appendChild(d);b.appendChild(h);b.appendChild(l);b.appendChild(m);b.appendChild(p);a.__xScrollRefs=new $APP.R(null,8,[$APP.ji,b,$APP.Ni,d,$APP.Fi,e,$APP.Li,g,$APP.Ii,h,$APP.yh,l,I1,m,$APP.hi,p],null);return $APP.k(a,"__xScrollRefs")},V1=function(a){a=$APP.xf([K1,$APP.Wh,L1,$APP.Lk,M1,$APP.xi,N1,$APP.Mh,$APP.Gi,O1,$APP.Dk],[a.getAttribute("show-controls"),a.getAttribute("label"),
|
|
6
|
+
$APP.n(a.hasAttribute("auto-play"))?"":null,a.getAttribute("mode"),$APP.n(a.hasAttribute("loop"))?"":null,a.getAttribute("gap"),$APP.n(a.hasAttribute("show-indicators"))?"":null,a.getAttribute("interval"),$APP.n(a.hasAttribute("disabled"))?"":null,a.getAttribute("snap"),a.getAttribute("active-index")]);var b=$APP.M(a),c=$APP.D(b,O1);a=$APP.D(b,$APP.Mh);var d=$APP.D(b,$APP.Gi),e=$APP.D(b,$APP.Dk),g=$APP.D(b,K1),h=$APP.D(b,$APP.Wh),l=$APP.D(b,L1),m=$APP.D(b,$APP.Lk),p=$APP.D(b,M1),q=$APP.D(b,$APP.xi);
|
|
7
|
+
b=$APP.D(b,N1);e=D1(e,0);g=C1(g);c=typeof c==="string"?c.trim().toLowerCase():null;c=$APP.J(P1,c)?c:"none";m=typeof m==="string"?m.trim().toLowerCase():null;m=$APP.J(Q1,m)?m:"horizontal";return $APP.xf([$APP.Fj,R1,S1,$APP.Xi,T1,U1,$APP.U,$APP.zj,$APP.Kk,$APP.pk,$APP.W],[e,g,c,m,b!=null,l!=null,$APP.n(h)?h:"",D1(q,0),p!=null,$APP.$g.i(500,D1(a,5E3)),d!=null])},W1=function(a){a=J1(a);a=$APP.M(a);return $APP.D(a,$APP.Li).assignedElements()},X1=function(){return $APP.F(window.matchMedia("(prefers-reduced-motion:reduce)").matches)},
|
|
8
|
+
Y1=function(a){return $APP.C.i("horizontal",$APP.Xi.g(a))},Z1=function(a,b){a=W1(a);return a.length>0?(a=a[0].getBoundingClientRect(),Y1(b)?a.width:a.height):0},$1=function(a,b){return a.style.transform=b},a2=function(a,b){a=a.getBoundingClientRect();return $APP.C.i("horizontal",$APP.Xi.g(b))?a.width:a.height},b2=function(a,b,c){switch(a){case "center":return(b-c)/2;case "end":return b-c;default:return 0}},c2=function(a,b,c,d,e){a=$APP.fd(a)*(b+c)-d;return $APP.n(e)?"translateX("+$APP.T.g(-a)+"px)":
|
|
9
|
+
"translateY("+$APP.T.g(-a)+"px)"},d2=function(a,b,c){for(var d=0;;)if(d<b){var e=$APP.fd(b);a[d].style.order=""+$APP.T.g($APP.ed(d-c+e+b,b)-e);d+=1}else break},e2=function(a,b){var c=J1(a);c=$APP.M(c);var d=$APP.D(c,$APP.Ni);c=$APP.D(c,$APP.Fi);var e=W1(a),g=e.length,h=Z1(a,b),l=$APP.zj.g(b),m=$APP.Fj.g(b),p=E1($APP.Kk.g(b),g);d=a2(d,b);d=b2(S1.g(b),d,h);a.__xScrollChildCount=g;if(g>0){c.style.gap=""+$APP.T.g(l)+"px";if($APP.n(p))return d2(e,g,m),$1(c,c2(g,h,l,d,Y1(b)));for(a=0;;)if(a<g)e[a].style.order=
|
|
10
|
+
"",a+=1;else break;a=m*(h+l)-d;return $1(c,Y1(b)?"translateX("+$APP.T.g(-a)+"px)":"translateY("+$APP.T.g(-a)+"px)")}return null},f2=function(a,b,c){var d=J1(a);d=$APP.M(d);var e=$APP.D(d,$APP.Ni),g=$APP.D(d,$APP.Fi),h=W1(a),l=h.length,m=Z1(a,b),p=$APP.zj.g(b),q=Y1(b);a=a2(e,b);var v=b2(S1.g(b),a,m);c=-($APP.fd(l)*(m+p)-v+c*(m+p));$1(g,q?"translateX("+$APP.T.g(c)+"px)":"translateY("+$APP.T.g(c)+"px)");X1()?(d2(h,l,$APP.Fj.g(b)),$1(g,c2(l,m,p,v,q))):g.addEventListener("transitionend",function A(y){return $APP.C.i(y.target,
|
|
11
|
+
g)?(g.removeEventListener("transitionend",A),g.style.transition="none",d2(h,l,$APP.Fj.g(b)),$1(g,c2(l,m,p,v,q)),g.offsetHeight,g.style.transition=""):null})},g2=function(a,b,c,d){a=J1(a);var e=$APP.M(a),g=$APP.D(e,I1);g.innerHTML="";for(var h=0;;)if(h<b){var l=document.createElement("button");l.setAttribute("part","indicator");l.setAttribute("type","button");l.setAttribute("role","tab");l.setAttribute("aria-label","Slide "+$APP.T.g(h+1));l.setAttribute("aria-selected",""+$APP.T.g($APP.C.i(h,c)));
|
|
12
|
+
l.addEventListener("click",function(m){return function(){return d.g?d.g(m):d.call(null,m)}}(h,l,b,a,e,g,g));g.appendChild(l);h+=1}else break},h2=function(a,b){a=J1(a);a=$APP.M(a);a=$APP.D(a,I1).children;for(var c=a.length,d=0;;)if(d<c)a[d].setAttribute("aria-selected",""+$APP.T.g($APP.C.i(d,b))),d+=1;else break},i2=function(a,b,c,d){b=new CustomEvent(b,{detail:$APP.ph(c),bubbles:!0,composed:!0,cancelable:$APP.F(d)});return a.dispatchEvent(b)},j2=function(a){var b=$APP.k(a,"__xScrollAutoplayTid");
|
|
13
|
+
$APP.n(b)&&(clearInterval(b),a.__xScrollAutoplayTid=null);return null},m2=function(a){j2(a);var b=function(){var c=$APP.k(a,"__xScrollModel");return $APP.n(c)?c:V1(a)}();$APP.n(function(){var c=U1.g(b);return $APP.n(c)?$APP.r($APP.W.g(b)):c}())&&$APP.ia(a,"__xScrollAutoplayTid",setInterval(function(){if($APP.n(a.isConnected)){var c=W1(a).length;if(c>0){var d=$APP.Fj.g(function(){var g=$APP.k(a,"__xScrollModel");return $APP.n(g)?g:V1(a)}()),e=function(){var g=$APP.k(a,"__xScrollModel");return $APP.n(g)?
|
|
14
|
+
g:V1(a)}();c=F1(d,1,c,$APP.Kk.g(e));return $APP.N(d,c)?k2?k2(a,c,1):l2.call(null,a,c,1):null}}return null},$APP.pk.g(b)));return null},n2=function(a){j2(a);return m2(a)},l2=function(a){switch(arguments.length){case 2:return k2(arguments[0],arguments[1],null);case 3:return k2(arguments[0],arguments[1],arguments[2]);default:throw Error(["Invalid arity: ",arguments.length].join(""));}},k2=function(a,b,c){var d=function(){var v=$APP.k(a,"__xScrollModel");return $APP.n(v)?v:V1(a)}(),e=function(){var v=
|
|
15
|
+
$APP.k(a,"__xScrollChildCount");return $APP.n(v)?v:W1(a).length}(),g=$APP.Fj.g(d);if(e>0&&$APP.r($APP.W.g(d))){var h=E1($APP.Kk.g(d),e),l=$APP.n(h)?e<=0?0:$APP.ed($APP.ed(b,e)+e,e):e<=0?0:$APP.$g.i(0,$APP.ah.i(b,e-1));b=l-g;if($APP.N(l,g)){c=$APP.n(c)?c:b>0?1:-1;var m=e>0&&(c>0&&l<g||c<0&&l>g),p=c>0?"forward":"backward";if($APP.n(function(){var v=!m;return v?v:i2(a,"x-scroll-loop",new $APP.R(null,1,[$APP.Ti,p],null),!0)}())){i2(a,"x-scroll-start",new $APP.R(null,2,[$APP.Ti,p,$APP.Pj,g],null),!1);
|
|
16
|
+
d=$APP.Yg.m(d,$APP.Fj,l);a.__xScrollModel=d;a.setAttribute("active-index",""+$APP.T.g(l));$APP.n(h)?f2(a,d,c):e2(a,d);h2(a,l);h=J1(a);b=$APP.M(h);h=$APP.D(b,$APP.Ii);c=$APP.D(b,$APP.yh);b=$APP.D(b,$APP.hi);h.disabled=!G1(d,e);c.disabled=!H1(d,e);b.textContent="Slide "+$APP.T.g(l+1)+" of "+$APP.T.g(e);i2(a,"x-scroll-change",new $APP.R(null,2,[$APP.Pj,l,$APP.Cj,g],null),!1);if(X1())i2(a,"x-scroll-end",new $APP.R(null,1,[$APP.Pj,l],null),!1);else{e=J1(a);e=$APP.M(e);var q=$APP.D(e,$APP.Fi);q.addEventListener("transitionend",
|
|
17
|
+
function y(x){return $APP.C.i(x.target,q)?(q.removeEventListener("transitionend",y),i2(a,"x-scroll-end",new $APP.R(null,1,[$APP.Pj,l],null),!1)):null})}return n2(a)}}}return null},o2=function(a){var b=function(){var d=$APP.k(a,"__xScrollModel");return $APP.n(d)?d:V1(a)}(),c=function(){var d=$APP.k(a,"__xScrollChildCount");return $APP.n(d)?d:W1(a).length}();b=F1($APP.Fj.g(b),1,c,$APP.Kk.g(b));return k2(a,b,1)},p2=function(a){var b=function(){var d=$APP.k(a,"__xScrollModel");return $APP.n(d)?d:V1(a)}(),
|
|
18
|
+
c=function(){var d=$APP.k(a,"__xScrollChildCount");return $APP.n(d)?d:W1(a).length}();b=F1($APP.Fj.g(b),-1,c,$APP.Kk.g(b));return k2(a,b,-1)},s2=function(a,b){function c(l){return q2.i?q2.i(a,l):q2.call(null,a,l)}var d=function(){var l=$APP.k(a,"__xScrollModel");return $APP.n(l)?l:V1(a)}();if($APP.n($APP.W.g(d)))return null;var e=J1(a);e=$APP.M(e);e=$APP.D(e,$APP.Fi);var g=Y1(d);e.style.transition="none";j2(a);var h=function p(m){window.removeEventListener("pointermove",c);window.removeEventListener("pointerup",
|
|
19
|
+
p);return r2.i?r2.i(a,m):r2.call(null,a,m)};window.addEventListener("pointermove",c);window.addEventListener("pointerup",h);return $APP.ia(a,"__xScrollDragState",function(){var m={};m.startX=b.clientX;m.startTime=Date.now();m.startY=b.clientY;m.upH=h;m.moveH=c;m.isDragging=!1;m.lastY=b.clientY;m.lastTime=Date.now();m.horiz=g;m.lastX=b.clientX;return m}())},q2=function(a,b){var c=$APP.k(a,"__xScrollDragState");if($APP.n(c)){b.preventDefault();var d=$APP.k(c,"horiz"),e=($APP.n(d)?b.clientX:b.clientY)-
|
|
20
|
+
($APP.n(d)?$APP.k(c,"startX"):$APP.k(c,"startY"));$APP.r($APP.k(c,"isDragging"))&&Math.abs(e)>3&&(c.isDragging=!0);if($APP.n($APP.k(c,"isDragging"))){c.lastX=b.clientX;c.lastY=b.clientY;$APP.ia(c,"lastTime",Date.now());b=J1(a);b=$APP.M(b);var g=$APP.D(b,$APP.Ni);b=$APP.D(b,$APP.Fi);var h=function(){var v=$APP.k(a,"__xScrollModel");return $APP.n(v)?v:V1(a)}(),l=Z1(a,h),m=$APP.zj.g(h);c=function(){var v=$APP.k(a,"__xScrollChildCount");return $APP.n(v)?v:W1(a).length}();var p=$APP.Fj.g(h),q=E1($APP.Kk.g(h),
|
|
21
|
+
c);g=a2(g,h);g=b2(S1.g(h),g,l);l=($APP.n(q)?$APP.fd(c)*(l+m):p*(l+m))-g;e=($APP.r(q)&&(e<0&&$APP.C.i(p,c-1)||e>0&&$APP.C.i(p,0))?e*.3:e)-l;return $1(b,$APP.n(d)?"translateX("+$APP.T.g(e)+"px)":"translateY("+$APP.T.g(e)+"px)")}}return null},r2=function(a,b){var c=$APP.k(a,"__xScrollDragState");if($APP.n(c)){a.__xScrollDragState=null;var d=J1(a);d=$APP.M(d);$APP.D(d,$APP.Fi).style.transition="";if($APP.n($APP.k(c,"isDragging"))){d=$APP.k(c,"horiz");b=($APP.n(d)?b.clientX:b.clientY)-($APP.n(d)?$APP.k(c,
|
|
22
|
+
"startX"):$APP.k(c,"startY"));c=Date.now()-$APP.k(c,"lastTime");var e=c>0?Math.abs(b)/c:0;c=function(){var l=$APP.k(a,"__xScrollModel");return $APP.n(l)?l:V1(a)}();var g=Z1(a,c),h=function(){var l=$APP.k(a,"__xScrollChildCount");return $APP.n(l)?l:W1(a).length}();d=$APP.Fj.g(c);e=e>.5?b<0?1:-1:Math.abs(b)>.5*g?b<0?1:-1:0;h=e===0?d:F1(d,e,h,$APP.Kk.g(c));$APP.C.i(h,d)?e2(a,c):k2(a,h,b<0?1:-1);return n2(a)}}return null},t2=function(a,b){var c=function(){var e=$APP.k(a,"__xScrollModel");return $APP.n(e)?
|
|
23
|
+
e:V1(a)}();if($APP.n($APP.W.g(c)))return null;var d=b.key;(c=Y1(c))&&$APP.C.i(d,"ArrowLeft")?(p2(a),d=!0):c&&$APP.C.i(d,"ArrowRight")?(o2(a),d=!0):!c&&$APP.C.i(d,"ArrowUp")?(p2(a),d=!0):!c&&$APP.C.i(d,"ArrowDown")?(o2(a),d=!0):$APP.C.i(d,"Home")?(k2(a,0,null),d=!0):d=$APP.C.i(d,"End")&&function(){var e=$APP.k(a,"__xScrollChildCount");e=$APP.n(e)?e:W1(a).length;k2(a,e-1,null);return!0}();return d?b.preventDefault():null},u2=function(a){var b=function(){var h=$APP.k(a,"__xScrollModel");return $APP.n(h)?
|
|
24
|
+
h:V1(a)}(),c=W1(a).length;a.__xScrollChildCount=c;if(c>0&&$APP.Fj.g(b)>=c){var d=c-1;a.setAttribute("active-index",""+$APP.T.g(d));$APP.ia(a,"__xScrollModel",$APP.Yg.m(b,$APP.Fj,d))}b=function(){var h=$APP.k(a,"__xScrollModel");return $APP.n(h)?h:V1(a)}();d=J1(a);var e=$APP.M(d);d=$APP.D(e,$APP.Ii);var g=$APP.D(e,$APP.yh);e=$APP.D(e,$APP.hi);$APP.n(T1.g(b))&&g2(a,c,$APP.Fj.g(b),function(h){return k2(a,h,null)});d.disabled=!G1(b,c);g.disabled=!H1(b,c);c>0&&(e.textContent="Slide "+$APP.T.g($APP.Fj.g(b)+
|
|
25
|
+
1)+" of "+$APP.T.g(c));return e2(a,b)},v2=function(a){function b(){return n2(a)}function c(){return j2(a)}function d(){return n2(a)}function e(){return j2(a)}function g(){return $APP.n(document.hidden)?j2(a):n2(a)}function h(){return u2(a)}function l(B){return s2(a,B)}function m(B){return t2(a,B)}function p(){return o2(a)}function q(){return p2(a)}var v=J1(a),x=$APP.M(v);v=$APP.D(x,$APP.Ii);var y=$APP.D(x,$APP.yh),A=$APP.D(x,$APP.Li);x=$APP.D(x,$APP.Ni);v.addEventListener("click",q);y.addEventListener("click",
|
|
26
|
+
p);a.addEventListener("keydown",m);x.addEventListener("pointerdown",l);A.addEventListener("slotchange",h);document.addEventListener("visibilitychange",g);a.addEventListener("pointerenter",e);a.addEventListener("pointerleave",d);a.addEventListener("focusin",c);a.addEventListener("focusout",b);$APP.ia(a,"__xScrollHandlers",{slot:h,focusin:c,keydown:m,vis:g,enter:e,next:p,leave:d,prev:q,pdown:l,focusout:b})},w2=function(a){j2(a);var b=$APP.k(a,"__xScrollHandlers"),c=$APP.k(a,"__xScrollRefs");if($APP.n($APP.n(b)?
|
|
27
|
+
c:b)){var d=$APP.Ii.g(c),e=$APP.yh.g(c),g=$APP.Li.g(c);c=$APP.Ni.g(c);var h=$APP.k(b,"prev");$APP.n(h)&&d.removeEventListener("click",h);d=$APP.k(b,"next");$APP.n(d)&&e.removeEventListener("click",d);e=$APP.k(b,"keydown");$APP.n(e)&&a.removeEventListener("keydown",e);e=$APP.k(b,"pdown");$APP.n(e)&&c.removeEventListener("pointerdown",e);c=$APP.k(a,"__xScrollDragState");$APP.n(c)&&(e=$APP.k(c,"moveH"),$APP.n(e)&&window.removeEventListener("pointermove",e),c=$APP.k(c,"upH"),$APP.n(c)&&window.removeEventListener("pointerup",
|
|
28
|
+
c),a.__xScrollDragState=null);c=$APP.k(b,"slot");$APP.n(c)&&g.removeEventListener("slotchange",c);g=$APP.k(b,"vis");$APP.n(g)&&document.removeEventListener("visibilitychange",g);g=$APP.k(b,"enter");$APP.n(g)&&a.removeEventListener("pointerenter",g);g=$APP.k(b,"leave");$APP.n(g)&&a.removeEventListener("pointerleave",g);g=$APP.k(b,"focusin");$APP.n(g)&&a.removeEventListener("focusin",g);b=$APP.k(b,"focusout");$APP.n(b)&&a.removeEventListener("focusout",b)}a.__xScrollHandlers=null},x2=function(a){var b=
|
|
29
|
+
$APP.k(a,"__xScrollResizeObs");$APP.n(b)&&b.disconnect();b=J1(a);b=$APP.M(b);b=$APP.D(b,$APP.Ni);var c=new ResizeObserver(function(){if($APP.n(a.isConnected)){var d=$APP.k(a,"__xScrollModel");d=$APP.n(d)?d:V1(a);return e2(a,d)}return null});c.observe(b);a.__xScrollResizeObs=c},y2=function(a,b){b=$APP.M(b);var c=$APP.D(b,$APP.Xi),d=$APP.D(b,R1),e=$APP.D(b,T1),g=$APP.D(b,$APP.W),h=$APP.D(b,$APP.U),l=$APP.D(b,$APP.Fj),m=J1(a);m=$APP.M(m);var p=$APP.D(m,$APP.Ni),q=$APP.D(m,$APP.Ii),v=$APP.D(m,$APP.yh);
|
|
30
|
+
m=$APP.D(m,$APP.hi);var x=function(){var y=$APP.k(a,"__xScrollChildCount");return $APP.n(y)?y:W1(a).length}();a.setAttribute("data-mode",c);$APP.n(d)?a.removeAttribute("data-hide-controls"):a.setAttribute("data-hide-controls","");$APP.t(h)?p.setAttribute("aria-label",h):p.removeAttribute("aria-label");q.disabled=!G1(b,x);v.disabled=!H1(b,x);a.tabIndex=$APP.n(g)?-1:0;$APP.n(e)&&g2(a,x,l,function(y){return k2(a,y,null)});$APP.n(e)||(c=J1(a),c=$APP.M(c),$APP.D(c,I1).innerHTML="");x>0&&(m.textContent=
|
|
31
|
+
"Slide "+$APP.T.g(l+1)+" of "+$APP.T.g(x));e2(a,b);a.__xScrollModel=b},z2=function(a){var b=V1(a);$APP.N($APP.k(a,"__xScrollModel"),b)&&y2(a,b)},A2=function(a){Object.defineProperty(a,"mode",{get:function(){var b=this.getAttribute("mode");return $APP.n(b)?b:"horizontal"},set:function(b){return $APP.n(b)?this.setAttribute("mode",""+$APP.T.g(b)):this.removeAttribute("mode")},enumerable:!0,configurable:!0});Object.defineProperty(a,"snap",{get:function(){var b=this.getAttribute("snap");return $APP.n(b)?
|
|
32
|
+
b:"none"},set:function(b){return $APP.n(b)?this.setAttribute("snap",""+$APP.T.g(b)):this.removeAttribute("snap")},enumerable:!0,configurable:!0});Object.defineProperty(a,"loop",{get:function(){return this.hasAttribute("loop")},set:function(b){return $APP.n(b)?this.setAttribute("loop",""):this.removeAttribute("loop")},enumerable:!0,configurable:!0});Object.defineProperty(a,"autoPlay",{get:function(){return this.hasAttribute("auto-play")},set:function(b){return $APP.n(b)?this.setAttribute("auto-play",
|
|
33
|
+
""):this.removeAttribute("auto-play")},enumerable:!0,configurable:!0});Object.defineProperty(a,"interval",{get:function(){var b=this.getAttribute("interval");return $APP.$g.i(500,D1(b,5E3))},set:function(b){return b==null?this.removeAttribute("interval"):this.setAttribute("interval",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"showControls",{get:function(){return C1(this.getAttribute("show-controls"))},set:function(b){return $APP.n(b)?this.removeAttribute("show-controls"):
|
|
34
|
+
this.setAttribute("show-controls","false")},enumerable:!0,configurable:!0});Object.defineProperty(a,"showIndicators",{get:function(){return this.hasAttribute("show-indicators")},set:function(b){return $APP.n(b)?this.setAttribute("show-indicators",""):this.removeAttribute("show-indicators")},enumerable:!0,configurable:!0});Object.defineProperty(a,"activeIndex",{get:function(){var b=this.getAttribute("active-index");return D1(b,0)},set:function(b){return b==null?this.removeAttribute("active-index"):
|
|
35
|
+
this.setAttribute("active-index",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"gap",{get:function(){var b=this.getAttribute("gap");return D1(b,0)},set:function(b){return b==null?this.removeAttribute("gap"):this.setAttribute("gap",""+$APP.T.g(b|0))},enumerable:!0,configurable:!0});Object.defineProperty(a,"disabled",{get:function(){return this.hasAttribute("disabled")},set:function(b){return $APP.n(b)?this.setAttribute("disabled",""):this.removeAttribute("disabled")},enumerable:!0,
|
|
36
|
+
configurable:!0});Object.defineProperty(a,"label",{get:function(){var b=this.getAttribute("label");return $APP.n(b)?b:""},set:function(b){return $APP.n($APP.n(b)?$APP.N(b,""):b)?this.setAttribute("label",""+$APP.T.g(b)):this.removeAttribute("label")},enumerable:!0,configurable:!0})},C2=function(){var a=class extends HTMLElement{};a.observedAttributes=B2;a.prototype.connectedCallback=function(){J1(this);w2(this);v2(this);x2(this);z2(this);m2(this);return null};a.prototype.disconnectedCallback=function(){w2(this);
|
|
37
|
+
var c=$APP.k(this,"__xScrollResizeObs");$APP.n(c)&&(c.disconnect(),this.__xScrollResizeObs=null);c=W1(this);for(var d=c.length,e=0;;)if(e<d)c[e].style.order="",e+=1;else break;return null};a.prototype.attributeChangedCallback=function(c,d,e){$APP.N(d,e)&&(z2(this),d=this.isConnected,c=$APP.n(d)?$APP.C.i(c,"auto-play")||$APP.C.i(c,"interval")||$APP.C.i(c,"disabled"):d,$APP.n(c)&&n2(this));return null};var b=a.prototype;A2(b);b.goTo=function(c){return k2(this,c,null)};b.next=function(){return o2(this)};
|
|
38
|
+
b.prev=function(){return p2(this)};return a},D2=function(){$APP.n(customElements.get("x-scroll"))||customElements.define("x-scroll",C2());return null},S1=new $APP.K(null,"snap","snap",-51714904),O1=new $APP.K(null,"snap-raw","snap-raw",828444409),U1=new $APP.K(null,"auto-play?","auto-play?",385278451),R1=new $APP.K(null,"show-controls?","show-controls?",1318868354),N1=new $APP.K(null,"show-indicators-attr","show-indicators-attr",1148535895),K1=new $APP.K(null,"show-controls-attr","show-controls-attr",
|
|
39
|
+
-894641087),M1=new $APP.K(null,"loop-attr","loop-attr",-132212822),L1=new $APP.K(null,"auto-play-attr","auto-play-attr",329299716),T1=new $APP.K(null,"show-indicators?","show-indicators?",-370587412),I1=new $APP.K(null,"indicators","indicators",1312373003);var B2="mode snap loop auto-play interval show-controls show-indicators active-index gap disabled label".split(" ");
|
|
40
|
+
$APP.xf([$APP.mj,new $APP.K(null,"showIndicators","showIndicators",1780978055),S1,$APP.Pj,$APP.Xi,new $APP.K(null,"showControls","showControls",1591218925),$APP.Sl,$APP.U,$APP.zj,new $APP.K(null,"autoPlay","autoPlay",-561263241),$APP.pk],[new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.V],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,
|
|
41
|
+
$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.X],null),new $APP.R(null,1,[$APP.Z,$APP.V],null),new $APP.R(null,1,[$APP.Z,$APP.Bj],null),new $APP.R(null,1,[$APP.Z,$APP.V],null)]);
|
|
42
|
+
$APP.Pd(["x-scroll-change",new $APP.R(null,2,[$APP.yj,new $APP.R(null,2,[$APP.Pj,$APP.V,$APP.Cj,$APP.V],null),$APP.wl,!1],null),"x-scroll-start",new $APP.R(null,2,[$APP.yj,new $APP.R(null,2,[$APP.Ti,$APP.X,$APP.Pj,$APP.V],null),$APP.wl,!1],null),"x-scroll-end",new $APP.R(null,2,[$APP.yj,new $APP.R(null,1,[$APP.Pj,$APP.V],null),$APP.wl,!1],null),"x-scroll-loop",new $APP.R(null,2,[$APP.yj,new $APP.R(null,1,[$APP.Ti,$APP.X],null),$APP.wl,!0],null)]);
|
|
43
|
+
var Q1=new $APP.S(null,new $APP.R(null,2,["vertical",null,"horizontal",null],null),null),P1=new $APP.S(null,new $APP.R(null,4,["none",null,"center",null,"start",null,"end",null],null),null);$APP.fa("baredom.exports.x_scroll.init",D2);export const init=D2;
|