react-motion-gallery 2.0.37 → 2.0.38

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 (42) hide show
  1. package/README.md +2 -2
  2. package/dist/{GridSkeleton-B5wWBN9L.d.mts → GridSkeleton-Dpsi5tXc.d.mts} +1 -1
  3. package/dist/{MasonrySkeleton-D8aZRUiv.d.mts → MasonrySkeleton-Cs0x-4yL.d.mts} +1 -1
  4. package/dist/chunk-45TZO7MN.mjs +2 -0
  5. package/dist/chunk-4RPAI2F7.mjs +4 -0
  6. package/dist/chunk-4URHXPTV.mjs +4 -0
  7. package/dist/{chunk-7PF7OJT2.mjs → chunk-5HGFS3S2.mjs} +1 -1
  8. package/dist/{chunk-MFTASEWB.mjs → chunk-AHMXEVKY.mjs} +1 -1
  9. package/dist/chunk-AU4O4KU4.mjs +1 -0
  10. package/dist/chunk-EWWWD475.mjs +1 -0
  11. package/dist/{chunk-J3UHEYNG.mjs → chunk-MJAHN7TG.mjs} +1 -1
  12. package/dist/{chunk-63CVVCOL.mjs → chunk-MLE7BKAD.mjs} +1 -1
  13. package/dist/chunk-P6NLW2QN.mjs +1 -0
  14. package/dist/chunk-YNQPSE2N.mjs +3 -0
  15. package/dist/{chunk-3RVITFUD.mjs → chunk-YU2WS3GJ.mjs} +1 -1
  16. package/dist/entries.d.mts +4 -3
  17. package/dist/entries.mjs +1 -1
  18. package/dist/grid.d.mts +2 -2
  19. package/dist/grid.mjs +1 -1
  20. package/dist/index.d.mts +2 -1
  21. package/dist/index.mjs +1 -1
  22. package/dist/{layout-DoYnPD0I.d.mts → layout-BOy4geKv.d.mts} +1 -0
  23. package/dist/masonry.mjs +1 -1
  24. package/dist/metafile-esm.json +1 -1
  25. package/dist/skeleton-base.d.mts +8 -5
  26. package/dist/skeleton-base.mjs +1 -1
  27. package/dist/skeleton-cache-provider.d.mts +7 -0
  28. package/dist/skeleton-cache-provider.mjs +1 -0
  29. package/dist/skeleton-cache.d.mts +70 -0
  30. package/dist/skeleton-cache.mjs +1 -0
  31. package/dist/skeleton-grid.d.mts +5 -4
  32. package/dist/skeleton-grid.mjs +1 -1
  33. package/dist/skeleton-masonry.d.mts +8 -6
  34. package/dist/skeleton-masonry.mjs +1 -1
  35. package/dist/skeleton-slider.d.mts +2 -1
  36. package/dist/skeleton-slider.mjs +5 -5
  37. package/package.json +9 -1
  38. package/dist/chunk-4BTS6IIA.mjs +0 -2
  39. package/dist/chunk-4ZOW533S.mjs +0 -1
  40. package/dist/chunk-LSHR3FZM.mjs +0 -4
  41. package/dist/chunk-RGS2QTPJ.mjs +0 -3
  42. package/dist/chunk-X3W6JPNH.mjs +0 -4
@@ -3,8 +3,9 @@ import * as React from 'react';
3
3
  import { B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
4
4
  import { L as LoadingForceOptions } from './force-C5m1QpdF.mjs';
5
5
  import { L as LoadingTimingOptions } from './transitions-DU3ftmIq.mjs';
6
- import { S as SkeletonNode, a as SkeletonLength, b as SkeletonShimmer } from './layout-DoYnPD0I.mjs';
7
- export { e as SkeletonBaseStyle, f as SkeletonBaseStyleResponsive, g as SkeletonContainerStyle, h as SkeletonContainerStyleResponsive } from './layout-DoYnPD0I.mjs';
6
+ import { S as SkeletonNode, a as SkeletonLength, b as SkeletonShimmer } from './layout-BOy4geKv.mjs';
7
+ export { e as SkeletonBaseStyle, f as SkeletonBaseStyleResponsive, g as SkeletonContainerStyle, h as SkeletonContainerStyleResponsive } from './layout-BOy4geKv.mjs';
8
+ import { SkeletonCacheOptions } from './skeleton-cache.mjs';
8
9
  export { R as ResponsiveTextBarHeight, a as ResponsiveTextBarWidth, d as ResponsiveTextLastBarWidth, c as ResponsiveTextLineCount, b as ResponsiveTextLineHeight, T as TextSkeletonResponsiveBy } from './text-BBcRGVzn.mjs';
9
10
 
10
11
  type SkeletonForceOptions = LoadingForceOptions;
@@ -25,6 +26,7 @@ type SkeletonFrameProps = {
25
26
  loadingLayerFirst?: boolean;
26
27
  contentWrapper?: (children: React.ReactNode) => React.ReactNode;
27
28
  shellDataAttributes?: Record<string, string | boolean | undefined>;
29
+ shellRef?: React.Ref<HTMLDivElement>;
28
30
  };
29
31
  type SkeletonProps = {
30
32
  layout: SkeletonNode;
@@ -45,8 +47,9 @@ type SkeletonProps = {
45
47
  enabled?: boolean;
46
48
  force?: SkeletonForceOptions;
47
49
  timing?: SkeletonTimingOptions;
50
+ cache?: SkeletonCacheOptions;
48
51
  };
49
- declare function SkeletonFrame({ skeletonNode, children, ready, enabled, force, timing, shellClassName, shellStyle, loadingShellStyle, contentClassName, contentStyle, contentOwnsWrapperLayout, loadingLayerFirst, contentWrapper, shellDataAttributes, }: SkeletonFrameProps): react_jsx_runtime.JSX.Element;
50
- declare function Skeleton({ layout, children, breakpoints, className, style, shellClassName, shellStyle, contentClassName, contentStyle, backgroundColor, radius, shimmer, disableShimmer, ariaLabel, ready, enabled, force, timing, }: SkeletonProps): react_jsx_runtime.JSX.Element;
52
+ declare function SkeletonFrame({ skeletonNode, children, ready, enabled, force, timing, shellClassName, shellStyle, loadingShellStyle, contentClassName, contentStyle, contentOwnsWrapperLayout, loadingLayerFirst, contentWrapper, shellDataAttributes, shellRef, }: SkeletonFrameProps): react_jsx_runtime.JSX.Element;
53
+ declare function Skeleton({ layout, children, breakpoints, className, style, shellClassName, shellStyle, contentClassName, contentStyle, backgroundColor, radius, shimmer, disableShimmer, ariaLabel, ready, enabled, force, timing, cache, }: SkeletonProps): react_jsx_runtime.JSX.Element;
51
54
 
52
- export { Skeleton, type SkeletonForceOptions, SkeletonFrame, type SkeletonFrameProps, SkeletonLength, SkeletonNode, type SkeletonProps, SkeletonShimmer, type SkeletonTimingOptions, Skeleton as default };
55
+ export { Skeleton, SkeletonCacheOptions, type SkeletonForceOptions, SkeletonFrame, type SkeletonFrameProps, SkeletonLength, SkeletonNode, type SkeletonProps, SkeletonShimmer, type SkeletonTimingOptions, Skeleton as default };
@@ -1 +1 @@
1
- export{b as Skeleton,a as SkeletonFrame,b as default}from'./chunk-4ZOW533S.mjs';import'./chunk-4BTS6IIA.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import'./chunk-HK2DPKES.mjs';
1
+ export{c as Skeleton,b as SkeletonFrame,c as default}from'./chunk-P6NLW2QN.mjs';import'./chunk-45TZO7MN.mjs';import'./chunk-AU4O4KU4.mjs';import'./chunk-EWWWD475.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import'./chunk-HK2DPKES.mjs';
@@ -0,0 +1,7 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { SkeletonCacheProviderProps } from './skeleton-cache.mjs';
3
+ import 'react';
4
+
5
+ declare function SkeletonCacheProvider({ children, options, snapshot, snapshots, }: SkeletonCacheProviderProps): react_jsx_runtime.JSX.Element;
6
+
7
+ export { SkeletonCacheProvider, SkeletonCacheProviderProps };
@@ -0,0 +1 @@
1
+ export{a as SkeletonCacheProvider}from'./chunk-AU4O4KU4.mjs';
@@ -0,0 +1,70 @@
1
+ import * as React from 'react';
2
+
3
+ declare const SKELETON_CACHE_VERSION = 1;
4
+ declare const DEFAULT_SKELETON_CACHE_TTL_MS: number;
5
+ declare const DEFAULT_SKELETON_CACHE_DEBOUNCE_MS = 250;
6
+ type SkeletonCacheKind = "skeleton" | "masonry";
7
+ type SkeletonCacheTextRecord = {
8
+ lines: number;
9
+ barWidths?: string[];
10
+ lineWidthsPx?: number[];
11
+ barHeight?: number;
12
+ lineHeight?: number;
13
+ containerWidthPx?: number;
14
+ };
15
+ type SkeletonCacheMasonrySnapshot = {
16
+ variantKey: string;
17
+ shellHeightPx?: number;
18
+ itemHeightsPx?: number[];
19
+ };
20
+ type SkeletonCacheSnapshot = {
21
+ version: 1;
22
+ key: string;
23
+ scopeId: string;
24
+ kind: SkeletonCacheKind;
25
+ routeKey?: string;
26
+ createdAt: number;
27
+ widthBucketMin: number;
28
+ viewportWidth: number;
29
+ layoutWidthPx?: number;
30
+ masonry?: SkeletonCacheMasonrySnapshot;
31
+ text: Record<string, SkeletonCacheTextRecord>;
32
+ };
33
+ type SkeletonCacheCookieOptions = {
34
+ path?: string;
35
+ sameSite?: "lax" | "strict" | "none";
36
+ secure?: boolean;
37
+ };
38
+ type SkeletonCacheOptions = {
39
+ key: string;
40
+ snapshot?: SkeletonCacheSnapshot | null;
41
+ ttlMs?: number;
42
+ debounceMs?: number;
43
+ routeKey?: string;
44
+ cookie?: SkeletonCacheCookieOptions;
45
+ };
46
+ type SkeletonCacheProviderProps = {
47
+ children?: React.ReactNode;
48
+ options?: Omit<SkeletonCacheOptions, "snapshot">;
49
+ snapshot?: SkeletonCacheSnapshot | null;
50
+ snapshots?: Record<string, SkeletonCacheSnapshot | null | undefined>;
51
+ };
52
+ type SkeletonCacheParseOptions = {
53
+ key?: string;
54
+ scopeId?: string;
55
+ kind?: SkeletonCacheKind;
56
+ routeKey?: string;
57
+ ttlMs?: number;
58
+ now?: number;
59
+ textIds?: readonly string[];
60
+ itemCount?: number;
61
+ variantKeys?: readonly string[];
62
+ widthBucketMin?: number;
63
+ };
64
+ declare function getSkeletonCacheCookieName(key: string): string;
65
+ declare function serializeSkeletonCacheSnapshot(snapshot: SkeletonCacheSnapshot): string;
66
+ declare function validateSkeletonCacheSnapshot(snapshot: SkeletonCacheSnapshot | null | undefined, options?: SkeletonCacheParseOptions): SkeletonCacheSnapshot | null;
67
+ declare function parseSkeletonCacheCookie(raw: string | null | undefined, options?: SkeletonCacheParseOptions): SkeletonCacheSnapshot | null;
68
+ declare function getSkeletonCacheRouteKey(loc?: Pick<Location, "pathname" | "search"> | undefined): string;
69
+
70
+ export { DEFAULT_SKELETON_CACHE_DEBOUNCE_MS, DEFAULT_SKELETON_CACHE_TTL_MS, SKELETON_CACHE_VERSION, type SkeletonCacheCookieOptions, type SkeletonCacheKind, type SkeletonCacheMasonrySnapshot, type SkeletonCacheOptions, type SkeletonCacheProviderProps, type SkeletonCacheSnapshot, type SkeletonCacheTextRecord, getSkeletonCacheCookieName, getSkeletonCacheRouteKey, parseSkeletonCacheCookie, serializeSkeletonCacheSnapshot, validateSkeletonCacheSnapshot };
@@ -0,0 +1 @@
1
+ export{c as DEFAULT_SKELETON_CACHE_DEBOUNCE_MS,b as DEFAULT_SKELETON_CACHE_TTL_MS,a as SKELETON_CACHE_VERSION,d as getSkeletonCacheCookieName,h as getSkeletonCacheRouteKey,g as parseSkeletonCacheCookie,e as serializeSkeletonCacheSnapshot,f as validateSkeletonCacheSnapshot}from'./chunk-EWWWD475.mjs';
@@ -1,15 +1,16 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { R as ResponsiveNumber, B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
4
- import { a as SkeletonLength, b as SkeletonShimmer } from './layout-DoYnPD0I.mjs';
5
- export { S as SkeletonNode } from './layout-DoYnPD0I.mjs';
4
+ import { a as SkeletonLength, b as SkeletonShimmer } from './layout-BOy4geKv.mjs';
5
+ export { S as SkeletonNode } from './layout-BOy4geKv.mjs';
6
6
  import { f as ResponsiveGridTemplate, R as ResponsiveGridSpan } from './types-Do4Pq-Td.mjs';
7
- import { c as GridSkeletonLayoutNode, b as GridSkeletonSpec } from './GridSkeleton-B5wWBN9L.mjs';
8
- export { G as GridSkeletonNode, a as GridSkeletonSlot } from './GridSkeleton-B5wWBN9L.mjs';
7
+ import { c as GridSkeletonLayoutNode, b as GridSkeletonSpec } from './GridSkeleton-Dpsi5tXc.mjs';
8
+ export { G as GridSkeletonNode, a as GridSkeletonSlot } from './GridSkeleton-Dpsi5tXc.mjs';
9
9
  import { SkeletonForceOptions, SkeletonTimingOptions } from './skeleton-base.mjs';
10
10
  import './text-BBcRGVzn.mjs';
11
11
  import './force-C5m1QpdF.mjs';
12
12
  import './transitions-DU3ftmIq.mjs';
13
+ import './skeleton-cache.mjs';
13
14
 
14
15
  type SkeletonGridOptions = {
15
16
  count?: number;
@@ -1 +1 @@
1
- export{a as GridSkeleton,a as Skeleton,a as default}from'./chunk-X3W6JPNH.mjs';import'./chunk-4ZOW533S.mjs';import'./chunk-4BTS6IIA.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-Y7NUGXTR.mjs';import'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import'./chunk-HK2DPKES.mjs';
1
+ export{a as GridSkeleton,a as Skeleton,a as default}from'./chunk-4RPAI2F7.mjs';import'./chunk-P6NLW2QN.mjs';import'./chunk-45TZO7MN.mjs';import'./chunk-AU4O4KU4.mjs';import'./chunk-EWWWD475.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-Y7NUGXTR.mjs';import'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import'./chunk-HK2DPKES.mjs';
@@ -1,12 +1,13 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { R as ResponsiveNumber, B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
4
- import { a as SkeletonLength, b as SkeletonShimmer } from './layout-DoYnPD0I.mjs';
5
- export { S as SkeletonNode } from './layout-DoYnPD0I.mjs';
4
+ import { a as SkeletonLength, b as SkeletonShimmer } from './layout-BOy4geKv.mjs';
5
+ export { S as SkeletonNode } from './layout-BOy4geKv.mjs';
6
6
  import { R as ResponsiveMasonrySpan } from './types-Br27DWP7.mjs';
7
- import { M as MasonrySkeletonLayoutNode, a as MasonryPlacement, b as MasonrySkeletonSpec } from './MasonrySkeleton-D8aZRUiv.mjs';
8
- export { c as MasonrySkeletonNode, d as MasonrySkeletonSlot } from './MasonrySkeleton-D8aZRUiv.mjs';
7
+ import { M as MasonrySkeletonLayoutNode, a as MasonryPlacement, b as MasonrySkeletonSpec } from './MasonrySkeleton-Cs0x-4yL.mjs';
8
+ export { c as MasonrySkeletonNode, d as MasonrySkeletonSlot } from './MasonrySkeleton-Cs0x-4yL.mjs';
9
9
  import { SkeletonForceOptions, SkeletonTimingOptions } from './skeleton-base.mjs';
10
+ import { SkeletonCacheOptions } from './skeleton-cache.mjs';
10
11
  import './text-BBcRGVzn.mjs';
11
12
  import './force-C5m1QpdF.mjs';
12
13
  import './transitions-DU3ftmIq.mjs';
@@ -56,7 +57,8 @@ type MasonrySkeletonProps = {
56
57
  force?: SkeletonForceOptions;
57
58
  timing?: SkeletonTimingOptions;
58
59
  masonry?: SkeletonMasonryOptions;
60
+ cache?: SkeletonCacheOptions;
59
61
  };
60
- declare function MasonrySkeleton({ layout, children, breakpoints, className, style, shellClassName, shellStyle, contentClassName, contentStyle, backgroundColor, radius, shimmer, disableShimmer, ariaLabel, ready, enabled, force, timing, masonry, }: MasonrySkeletonProps): react_jsx_runtime.JSX.Element | null;
62
+ declare function MasonrySkeleton({ layout, children, breakpoints, className, style, shellClassName, shellStyle, contentClassName, contentStyle, backgroundColor, radius, shimmer, disableShimmer, ariaLabel, ready, enabled, force, timing, masonry, cache, }: MasonrySkeletonProps): react_jsx_runtime.JSX.Element | null;
61
63
 
62
- export { MasonryPlacement, MasonrySkeleton, type MasonrySkeletonProps, MasonrySkeletonSpec, MasonrySkeleton as Skeleton, SkeletonForceOptions, type SkeletonMasonryLayout, type SkeletonMasonryOptions, SkeletonTimingOptions, MasonrySkeleton as default };
64
+ export { MasonryPlacement, MasonrySkeleton, type MasonrySkeletonProps, MasonrySkeletonSpec, MasonrySkeleton as Skeleton, SkeletonCacheOptions, SkeletonForceOptions, type SkeletonMasonryLayout, type SkeletonMasonryOptions, SkeletonTimingOptions, MasonrySkeleton as default };
@@ -1 +1 @@
1
- export{a as MasonrySkeleton,a as Skeleton,a as default}from'./chunk-RGS2QTPJ.mjs';import'./chunk-LSHR3FZM.mjs';import'./chunk-4ZOW533S.mjs';import'./chunk-4BTS6IIA.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import'./chunk-HK2DPKES.mjs';
1
+ export{a as MasonrySkeleton,a as Skeleton,a as default}from'./chunk-YNQPSE2N.mjs';import'./chunk-4URHXPTV.mjs';import'./chunk-P6NLW2QN.mjs';import'./chunk-45TZO7MN.mjs';import'./chunk-AU4O4KU4.mjs';import'./chunk-EWWWD475.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import'./chunk-HK2DPKES.mjs';
@@ -2,12 +2,13 @@ import * as react_jsx_runtime from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
3
  import { R as ResponsiveNumber, B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
4
4
  import { j as SliderHandle } from './types-BiXSaEk7.mjs';
5
- import { a as SkeletonLength$1, b as SkeletonShimmer$1 } from './layout-DoYnPD0I.mjs';
5
+ import { a as SkeletonLength$1, b as SkeletonShimmer$1 } from './layout-BOy4geKv.mjs';
6
6
  import { R as ResponsiveTextBarHeight, a as ResponsiveTextBarWidth, b as ResponsiveTextLineHeight, c as ResponsiveTextLineCount, d as ResponsiveTextLastBarWidth } from './text-BBcRGVzn.mjs';
7
7
  import { SkeletonForceOptions, SkeletonTimingOptions } from './skeleton-base.mjs';
8
8
  import './force-C5m1QpdF.mjs';
9
9
  import './media.mjs';
10
10
  import './transitions-DU3ftmIq.mjs';
11
+ import './skeleton-cache.mjs';
11
12
 
12
13
  type SkeletonLength = number | string;
13
14
  type SkeletonShimmer = {
@@ -1,4 +1,4 @@
1
- import {a as a$2}from'./chunk-R6EGYRTJ.mjs';import {a as a$4}from'./chunk-KJZTKXTM.mjs';import {a as a$3}from'./chunk-4ZOW533S.mjs';import {n,l,t,i as i$1,u,w,x,b,k as k$1,y,s,q,d as d$1,f,h,g,r,j}from'./chunk-4BTS6IIA.mjs';import'./chunk-Z34PSRMG.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import {i,a,d,e}from'./chunk-HK2DPKES.mjs';import*as C from'react';import {jsxs,jsx}from'react/jsx-runtime';var ut=300*1e3,ct=2,dt="rmg:slider-restore",Vt=new Set(["reload","back_forward"]);function Xt(e,t){return (e%t+t)%t}function Jt(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function St(){return Date.now()}function mt(e,t=typeof window<"u"?window.location:void 0){let n=t?`${t.pathname}${t.search}`:"";return `${dt}:${e}:${n}`}function Ut(e=window){let n=(e.performance?.getEntriesByType?.("navigation")??[])[0];if(n?.type)return n.type;let r=e.performance?.navigation;return r?r.type===r.TYPE_RELOAD?"reload":r.type===r.TYPE_BACK_FORWARD?"back_forward":null:null}function Zt(e=window){let t=Ut(e);return !!t&&Vt.has(t)}function Qt(e){if(!e)return null;let t;try{t=JSON.parse(e);}catch{return null}if(!Jt(t)||t.version!==1)return null;let n=Number(t.index),r=Number(t.viewportWidth),i=Number(t.slideCount),o=Number(t.skeletonSlotCount),l=Number(t.timestamp),a=Number(t.scrollY),c=Number(t.scrollMax),u=t.heightPx==null?void 0:Number(t.heightPx);return !Number.isInteger(n)||n<0||!Number.isFinite(r)||r<=0||!Number.isInteger(i)||i<=0||!Number.isInteger(o)||o<=0||!Number.isFinite(l)||l<=0||u!=null&&(!Number.isFinite(u)||u<=0)?null:{version:1,index:n,heightPx:u,viewportWidth:r,slideCount:i,skeletonSlotCount:o,timestamp:l,scrollY:Number.isFinite(a)?Math.max(0,a):0,scrollMax:Number.isFinite(c)?Math.max(0,c):0,wasAtBottom:t.wasAtBottom===true}}function en(e,t){if(!e)return null;let n=Math.max(0,t.ttlMs),r=(t.now??St())-e.timestamp;if(n>0&&(r<0||r>n)||e.slideCount!==t.slideCount||e.skeletonSlotCount!==t.skeletonSlotCount||e.index<0||e.index>=t.slideCount)return null;let i=t.viewportTolerancePx??ct;return Math.abs(e.viewportWidth-t.viewportWidth)>i?null:e}function ft(e,t=window,n={}){if(!e?.enabled||e.controlled||n.requireNavigationRestore!==false&&!Zt(t))return null;try{let r=t.sessionStorage.getItem(mt(e.storageKeyId,t.location));return en(Qt(r),{ttlMs:e.ttlMs,viewportWidth:t.innerWidth||t.document.documentElement.clientWidth||0,slideCount:e.slideCount,skeletonSlotCount:e.skeletonSlotCount})}catch{return null}}function pt(e,t,n=window){if(!(!e?.enabled||e.controlled))try{let r=n.document.documentElement,i=n.document.body,o=Math.max(r?.scrollHeight??0,i?.scrollHeight??0),l=n.innerHeight||r?.clientHeight||0,a=Math.max(0,o-l),c=Math.max(0,n.scrollY||n.pageYOffset||0),u=a>0&&a-c<=4,s={version:1,index:Math.max(0,Math.floor(t.index)),heightPx:t.heightPx,viewportWidth:n.innerWidth||r?.clientWidth||0,slideCount:t.slideCount,skeletonSlotCount:t.skeletonSlotCount,timestamp:St(),scrollY:c,scrollMax:a,wasAtBottom:u};n.sessionStorage.setItem(mt(e.storageKeyId,n.location),JSON.stringify(s));}catch{}}function gt(e){let t=Math.max(0,Math.floor(e.slotCount)),n=Math.min(t,Math.max(0,Math.floor(e.visibleCount)));if(t<=0||n<=0)return [];let r=Math.min(Math.max(0,Math.floor(e.activeIndex)),Math.max(0,t-1)),i=Math.min(Math.max(0,Math.floor(e.activeSlotOffset)),Math.max(0,n-1)),o=e.loop?r:Math.min(Math.max(0,r-i),Math.max(0,t-n)),l=[],a=new Set;for(let c=0;c<n;c+=1){let u=o+c,s=e.loop?Xt(u,t):u;s<0||s>=t||a.has(s)||(a.add(s),l.push({slot:s+1,order:c}));}return l}function tn(e){return JSON.stringify(e).replace(/</g,"\\u003c")}function nn(e){return `(function(){try{
1
+ import {a as a$2}from'./chunk-R6EGYRTJ.mjs';import {a as a$3}from'./chunk-KJZTKXTM.mjs';import {b}from'./chunk-P6NLW2QN.mjs';import {n,l,t,i as i$1,u,w,x,b as b$1,k as k$1,y,s,q,d as d$1,f,h,g,r,j}from'./chunk-45TZO7MN.mjs';import'./chunk-AU4O4KU4.mjs';import'./chunk-EWWWD475.mjs';import'./chunk-Z34PSRMG.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import'./chunk-LVYED5ZM.mjs';import'./chunk-B4CC5AGE.mjs';import {i,a,d,e}from'./chunk-HK2DPKES.mjs';import*as C from'react';import {jsxs,jsx}from'react/jsx-runtime';var ut=300*1e3,ct=2,dt="rmg:slider-restore",Vt=new Set(["reload","back_forward"]);function Xt(e,t){return (e%t+t)%t}function Jt(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function St(){return Date.now()}function mt(e,t=typeof window<"u"?window.location:void 0){let n=t?`${t.pathname}${t.search}`:"";return `${dt}:${e}:${n}`}function Ut(e=window){let n=(e.performance?.getEntriesByType?.("navigation")??[])[0];if(n?.type)return n.type;let r=e.performance?.navigation;return r?r.type===r.TYPE_RELOAD?"reload":r.type===r.TYPE_BACK_FORWARD?"back_forward":null:null}function Zt(e=window){let t=Ut(e);return !!t&&Vt.has(t)}function Qt(e){if(!e)return null;let t;try{t=JSON.parse(e);}catch{return null}if(!Jt(t)||t.version!==1)return null;let n=Number(t.index),r=Number(t.viewportWidth),i=Number(t.slideCount),o=Number(t.skeletonSlotCount),l=Number(t.timestamp),a=Number(t.scrollY),c=Number(t.scrollMax),u=t.heightPx==null?void 0:Number(t.heightPx);return !Number.isInteger(n)||n<0||!Number.isFinite(r)||r<=0||!Number.isInteger(i)||i<=0||!Number.isInteger(o)||o<=0||!Number.isFinite(l)||l<=0||u!=null&&(!Number.isFinite(u)||u<=0)?null:{version:1,index:n,heightPx:u,viewportWidth:r,slideCount:i,skeletonSlotCount:o,timestamp:l,scrollY:Number.isFinite(a)?Math.max(0,a):0,scrollMax:Number.isFinite(c)?Math.max(0,c):0,wasAtBottom:t.wasAtBottom===true}}function en(e,t){if(!e)return null;let n=Math.max(0,t.ttlMs),r=(t.now??St())-e.timestamp;if(n>0&&(r<0||r>n)||e.slideCount!==t.slideCount||e.skeletonSlotCount!==t.skeletonSlotCount||e.index<0||e.index>=t.slideCount)return null;let i=t.viewportTolerancePx??ct;return Math.abs(e.viewportWidth-t.viewportWidth)>i?null:e}function ft(e,t=window,n={}){if(!e?.enabled||e.controlled||n.requireNavigationRestore!==false&&!Zt(t))return null;try{let r=t.sessionStorage.getItem(mt(e.storageKeyId,t.location));return en(Qt(r),{ttlMs:e.ttlMs,viewportWidth:t.innerWidth||t.document.documentElement.clientWidth||0,slideCount:e.slideCount,skeletonSlotCount:e.skeletonSlotCount})}catch{return null}}function pt(e,t,n=window){if(!(!e?.enabled||e.controlled))try{let r=n.document.documentElement,i=n.document.body,o=Math.max(r?.scrollHeight??0,i?.scrollHeight??0),l=n.innerHeight||r?.clientHeight||0,a=Math.max(0,o-l),c=Math.max(0,n.scrollY||n.pageYOffset||0),u=a>0&&a-c<=4,s={version:1,index:Math.max(0,Math.floor(t.index)),heightPx:t.heightPx,viewportWidth:n.innerWidth||r?.clientWidth||0,slideCount:t.slideCount,skeletonSlotCount:t.skeletonSlotCount,timestamp:St(),scrollY:c,scrollMax:a,wasAtBottom:u};n.sessionStorage.setItem(mt(e.storageKeyId,n.location),JSON.stringify(s));}catch{}}function gt(e){let t=Math.max(0,Math.floor(e.slotCount)),n=Math.min(t,Math.max(0,Math.floor(e.visibleCount)));if(t<=0||n<=0)return [];let r=Math.min(Math.max(0,Math.floor(e.activeIndex)),Math.max(0,t-1)),i=Math.min(Math.max(0,Math.floor(e.activeSlotOffset)),Math.max(0,n-1)),o=e.loop?r:Math.min(Math.max(0,r-i),Math.max(0,t-n)),l=[],a=new Set;for(let c=0;c<n;c+=1){let u=o+c,s=e.loop?Xt(u,t):u;s<0||s>=t||a.has(s)||(a.add(s),l.push({slot:s+1,order:c}));}return l}function tn(e){return JSON.stringify(e).replace(/</g,"\\u003c")}function nn(e){return `(function(){try{
2
2
  var cfg=${tn(e)};
3
3
  var nav=(performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]||{}).type;
4
4
  if(!nav&&performance.navigation){nav=performance.navigation.type===performance.navigation.TYPE_RELOAD?"reload":performance.navigation.type===performance.navigation.TYPE_BACK_FORWARD?"back_forward":"";}
@@ -34,7 +34,7 @@ style.setAttribute("data-rmg-slider-restore-style",cfg.scopeId);
34
34
  style.textContent=css;
35
35
  document.head.appendChild(style);
36
36
  if(state.wasAtBottom){var keep=function(){var doc=document.documentElement;var body=document.body;var max=Math.max(0,Math.max(doc.scrollHeight,body?body.scrollHeight:0)-(innerHeight||doc.clientHeight||0));scrollTo(scrollX||0,max);};requestAnimationFrame(keep);setTimeout(keep,50);addEventListener("load",function(){requestAnimationFrame(keep);setTimeout(keep,120);},{once:true});}
37
- }catch(e){}})();`}function ht(e){if(e.slideCount<=0||e.skeletonSlotCount<=0)return "";let t=i(e.responsiveCount,e.fallbackCount,e.breakpointMap),n={scopeId:e.scopeId,storageKeyId:e.storageKeyId,ttlMs:e.ttlMs,slideCount:e.slideCount,skeletonSlotCount:e.skeletonSlotCount,maxSlots:e.maxSlots,loop:e.loop,activeSlotOffset:e.activeSlotOffset,countRules:t,dotStyles:e.dotStyles??[],viewportTolerancePx:ct};return nn(n)}function m(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function He(e){if(!e)return {};let t=m(e.margin),n=m(e.marginTop),r=m(e.marginRight),i=m(e.marginBottom),o=m(e.marginLeft),l={};return t!=null&&(l.margin=t),n!=null&&(l.marginTop=n),r!=null&&(l.marginRight=r),i!=null&&(l.marginBottom=i),o!=null&&(l.marginLeft=o),l}function rn(e,t){if(!(!e&&!t))return {...e||{},...t||{}}}function Ie(e,t){let n=e.slots?.[t];return {item:n?.item??e.item,itemWrapStyle:rn(e.itemWrapStyle,n?.itemWrapStyle)}}function We(e,t){let n$1={};e?.aspectRatio!=null&&(n$1.aspectRatio=e.aspectRatio);let r=m(e?.width),i=m(e?.maxWidth),o=m(e?.height),l=m(e?.maxHeight);return r!=null&&(n$1.inlineSize=r,n$1.width=r),i!=null&&(n$1.maxInlineSize=i,n$1.maxWidth=i),o!=null&&(n$1.height=o),l!=null&&(n$1.maxHeight=l),e?.aspectRatio!=null&&e?.height==null&&(n$1.height="auto"),e?.aspectRatio!=null&&e?.width==null&&e?.height==null&&(n$1.inlineSize="100%",n$1.width="100%",n$1.height="auto"),e?.backgroundColor&&(n$1["--rmg-skel-bg"]=e.backgroundColor),e?.borderRadius!=null&&(n$1["--rmg-skel-radius"]=m(e.borderRadius)),e?.overflow!=null&&(n$1.overflow=e.overflow),e?.alignSelf&&(n$1.alignSelf=e.alignSelf),e?.scale!=null&&(n$1.transform=`scale(${e.scale})`),Object.assign(n$1,n(t)),n$1}function on(e,t){let n={};t!=null&&(n.height=`${t}px`);let r=m(e?.width),i=m(e?.maxWidth);return r!=null&&(n.inlineSize=r,n.width=r),i!=null&&(n.maxInlineSize=i,n.maxWidth=i),e?.alignSelf&&(n.alignSelf=e.alignSelf),e?.scale!=null&&(n.transform=`scale(${e.scale})`),n}function $e(e){return typeof e=="string"&&e.trim()==="max-content"}function ln(e){return !e||typeof e!="object"?false:$e(e.width)?true:Object.values(e).some(n=>!!n&&typeof n=="object"&&$e(n.width))}function sn(e){let t=We(e,void 0);return delete t["--rmg-skel-bg"],e?.backgroundColor!=null&&(t.backgroundColor=e.backgroundColor),e?.border!=null&&(t.border=e.border),e?.boxShadow!=null&&(t.boxShadow=e.boxShadow),e?.borderRadius!=null?(t.borderRadius=m(e.borderRadius),t.overflow=e?.overflow??"hidden"):e?.overflow!=null&&(t.overflow=e.overflow),t.boxSizing="border-box",t}function an(e){if(!e)return {outerStyle:void 0,innerStyle:void 0};let t=sn(e),n={};return t.boxShadow!=null&&(n["--rmg-slider-skel-wrap-shadow"]=t.boxShadow,delete t.boxShadow),t.borderRadius!=null&&(n["--rmg-slider-skel-wrap-shadow-radius"]=t.borderRadius),{outerStyle:Object.keys(n).length?n:void 0,innerStyle:t}}function Be(e){let t={};return e&&(e.position!=null&&(t.position=e.position),e.inset!=null&&(t.inset=m(e.inset)),e.insetBlock!=null&&(t.insetBlock=m(e.insetBlock)),e.insetInline!=null&&(t.insetInline=m(e.insetInline)),e.top!=null&&(t.top=m(e.top)),e.right!=null&&(t.right=m(e.right)),e.bottom!=null&&(t.bottom=m(e.bottom)),e.left!=null&&(t.left=m(e.left)),e.zIndex!=null&&(t.zIndex=e.zIndex),e.gap!=null&&(t.gap=m(e.gap)),e.padding!=null&&(t.padding=m(e.padding)),e.align&&(t.alignItems=e.align),e.justify&&(t.justifyContent=e.justify),e.wrap&&(t.flexWrap="wrap"),e.width!=null&&(t.width=m(e.width)),e.maxWidth!=null&&(t.maxWidth=m(e.maxWidth)),e.height!=null&&(t.height=m(e.height)),e.minHeight!=null&&(t.minHeight=m(e.minHeight)),e.maxHeight!=null&&(t.maxHeight=m(e.maxHeight)),e.backgroundColor!=null&&(t.backgroundColor=e.backgroundColor),e.borderRadius!=null&&(t.borderRadius=m(e.borderRadius)),e.border!=null&&(t.border=e.border),e.boxShadow!=null&&(t.boxShadow=e.boxShadow),e.margin!=null&&(t.margin=m(e.margin)),e.marginTop!=null&&(t.marginTop=m(e.marginTop)),e.marginRight!=null&&(t.marginRight=m(e.marginRight)),e.marginBottom!=null&&(t.marginBottom=m(e.marginBottom)),e.marginLeft!=null&&(t.marginLeft=m(e.marginLeft)),e.flex!=null&&(t.flex=e.flex),e.flexGrow!=null&&(t.flexGrow=e.flexGrow),e.flexShrink!=null&&(t.flexShrink=e.flexShrink),e.flexBasis!=null&&(t.flexBasis=m(e.flexBasis)),e.order!=null&&(t.order=e.order),e.alignSelf!=null&&(t.alignSelf=e.alignSelf),e.overflow!=null&&(t.overflow=e.overflow),e.transform!=null&&(t.transform=e.transform),e.pointerEvents!=null&&(t.pointerEvents=e.pointerEvents),e.opacity!=null&&(t.opacity=e.opacity)),t}function Ae(e){let t=We(e,void 0);return delete t["--rmg-skel-bg"],e?.backgroundColor!=null&&(t.backgroundColor=e.backgroundColor),e?.borderRadius!=null&&(t.borderRadius=m(e.borderRadius)),e?.overflow!=null&&(t.overflow=e.overflow),{...t,...He(e)}}function bt(e){return e.replace(/"/g,'\\"')}function ne(e,t,n,r=a){switch(e.kind){case "rect":case "square":case "circle":{let i=x({style:e.style,breakpointMap:r});if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "text":{let i=[...k$1({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,fitContent:ln(e.style),breakpointMap:r}).map(l=>({...l,raw:true})),...y({style:e.style,breakpointMap:r})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "media":{let i=[...w({style:e.style,breakpointMap:r}),...x({style:e.tile?.style,breakpointMap:r,selector:`${b} [data-rmg-skel-media-tile="true"]`})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "sliderDots":{let i=[...w({style:e.style,breakpointMap:r}),...x({style:e.dotStyle,breakpointMap:r,selector:`${b} [data-rmg-skel-slider-dot]`}),...x({style:e.activeStyle,breakpointMap:r,selector:`${b} [data-rmg-skel-dot-active="true"]`}),...x({style:e.inactiveStyle,breakpointMap:r,selector:`${b} [data-rmg-skel-dot-active="false"]`})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "stack":case "row":case "col":{let i=w({style:e.style,breakpointMap:r}),o=i.length?t():void 0;o&&i.length&&n.push({nodeId:o,rules:i});let l=e.children.map(a=>ne(a,t,n,r));return {...e,...o?{__rmgNodeId:o}:null,children:l}}case "slider":{let i=w({style:e.style,breakpointMap:r}),o=i.length?t():void 0;o&&i.length&&n.push({nodeId:o,rules:i});let l=ne(e.item,t,n,r),a=e.children?.map(s=>ne(s,t,n,r)),c=e.overlays?.map(s=>ne(s,t,n,r)),u=e.slots?.map(s=>({...s,item:s.item?ne(s.item,t,n,r):void 0}));return {...e,...o?{__rmgNodeId:o}:null,item:l,children:a,overlays:c,slots:u}}default:return e}}function un(e,t){if(!t.length)return "";let n=[];for(let r of t){let i=`${e} [data-rmg-skel-node="${bt(r.nodeId)}"]`;for(let o of r.rules){let l=o.raw?o.css.split("__NODE_SEL__").join(i):`${i}{${o.css}}`;o.minWidth<=0?n.push(l):n.push(`@media (min-width:${o.minWidth}px){${l}}`);}}return n.join(`
38
- `)}function kt(e){let{kind:t,style:n,shimmer:r,breakpointMap:i,mediaTile:o}=e,l={},a=s(n,i),c=e.__rmgNodeId;return t==="circle"&&(l.borderRadius="9999px"),t==="square"&&a?.aspectRatio==null&&(l.aspectRatio="1"),a?.aspectRatio!=null&&a?.height==null&&(l.height="auto"),jsx("div",{"data-rmg-skel-node":c,"data-rmg-skel-media-tile":o?"true":void 0,className:a$4.sliderSkeleton,style:{...We(a,r),...He(a),...l}})}function cn({node:e,breakpointMap:t}){let n=j({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:t}),r=s(e.style,t),i=n.states.some(({state:s})=>s.lineCount!==n.baseState.lineCount||s.metrics.totalHeight!==n.baseState.metrics.totalHeight||s.metrics.barHeight!==n.baseState.metrics.barHeight||s.metrics.paddingBlock!==n.baseState.metrics.paddingBlock||s.metrics.rowGap!==n.baseState.metrics.rowGap),o=n.states.some(({state:s})=>s.lineCount!==n.baseState.lineCount||s.barWidths.length!==n.baseState.barWidths.length||s.barWidths.some((p,S)=>p!==n.baseState.barWidths[S])),l=e.__rmgNodeId,a=on(r,i?void 0:n.metrics.totalHeight),c={height:n.metrics.barHeight,backgroundColor:r?.backgroundColor,borderRadius:r?.borderRadius},u=$e(r?.width);return jsx("div",{"data-rmg-skel-node":l,"data-rmg-skel-text":"true",className:a$4.sliderSkeletonText,style:{...a,...He(r),...i?null:{paddingBlock:`${n.metrics.paddingBlock}px`,rowGap:`${n.metrics.rowGap}px`}},children:Array.from({length:n.maxLines}).map((s,p)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[a$4.sliderSkeleton,a$4.sliderSkeletonTextLine].join(" "),style:{...We(c,e.shimmer),...o?null:{display:p>=n.baseLines?"none":void 0,width:u?n.baseState.barWidths[p]??"100%":"100%",maxWidth:n.baseState.barWidths[p]??"100%"}}},p))})}function Le({node:e,breakpointMap:t$1,activeDotIndex:n$1}){switch(e.kind){case "rect":case "square":case "circle":return jsx(kt,{...e,breakpointMap:t$1});case "media":{let r=Math.max(0,e.count|0),i=e.direction??"row",o=e.tile?.shape??"rect",l=e.__rmgNodeId,a=Be(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":l,className:a$4.sliderSkeletonGroup,style:{display:"flex",flexDirection:i==="row"?"row":"column",...a||{}},children:Array.from({length:r}).map((c,u)=>jsx(kt,{kind:o,style:e.tile?.style,shimmer:e.tile?.shimmer,breakpointMap:t$1,mediaTile:true},u))})}case "sliderDots":{let r=Math.max(0,e.count|0),i=e.__rmgNodeId,o=Be(t(e.style,t$1)),l=Ae(s(e.dotStyle,t$1)),a=Ae(s(e.activeStyle,t$1)),c=Ae(s(e.inactiveStyle,t$1)),u=typeof n$1=="number"&&Number.isFinite(n$1)?Math.max(0,Math.min(r-1,Math.floor(n$1))):0;return jsx("div",{"data-rmg-skel-node":i,"data-rmg-skel-slider-dots":"true","data-rmg-skel-dot-active-style":JSON.stringify(a),"data-rmg-skel-dot-inactive-style":JSON.stringify(c),className:a$4.sliderSkeletonGroup,style:{display:"flex",flexDirection:"row",...o||{}},children:Array.from({length:r}).map((s,p)=>{let S=p===u;return jsx("div",{"data-rmg-skel-slider-dot":p,"data-rmg-skel-dot-active":S?"true":"false",className:a$4.sliderSkeleton,style:{...n(e.shimmer),...l,...S?a:c}},p)})})}case "stack":case "row":case "col":{let r=e.kind==="row"?"row":"column",i=e.__rmgNodeId,o=Be(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":i,className:a$4.sliderSkeletonGroup,style:{display:"flex",flexDirection:r,...o||{}},children:e.children.map((l,a)=>jsx(Le,{node:l,breakpointMap:t$1,activeDotIndex:n$1},a))})}case "text":return jsx(cn,{node:e,breakpointMap:t$1});default:return null}}function yt(){return {layout:{kind:"slider",direction:"row",item:{kind:"rect",style:{width:"100%",height:"100%",borderRadius:2}},itemWrapStyle:void 0},radius:12}}function Ee(e){return /%$/.test(e.trim())}function Rt(e){let t=e.trim();if(!t.length)return null;if(t==="0")return {value:0,unit:"px"};let n=t.match(/^(\d+(?:\.\d+)?|\.\d+)([a-zA-Z]+)$/);if(!n)return null;let r=Number(n[1]);return !Number.isFinite(r)||r<0?null:{value:r,unit:n[2]}}function Ct(e){let t=[],n="",r=0;for(let i of e.trim()){if(/\s/.test(i)&&r===0){n&&(t.push(n),n="");continue}n+=i,i==="("?r+=1:i===")"&&(r=Math.max(0,r-1));}return n&&t.push(n),t}function dn(e){let t=e.trim();return t.length?t==="0"?"0px":/^(?:var|calc|min|max|clamp)\(.+\)$/i.test(t)||Rt(t)?t:null:null}function Sn(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)&&e>=0?e===0?"0px":`${e}px`:null;for(let t of Ct(String(e))){let n=dn(t);if(n)return n}return null}function _(e){return e==null?null:typeof e=="number"?`${e}px`:String(e)}function Me(e,t){if(!e)return null;if(t===0)return "0px";if(e==="0px")return e;let n=Rt(e);return n?`${n.value*t}${n.unit}`:`calc(${e} * ${t})`}function wt(e){if(e==null)return null;if(typeof e=="number")return e>0?e:null;let t=String(e).trim(),n=t.match(/^(\d+(?:\.\d+)?)\s*\/\s*(\d+(?:\.\d+)?)$/);if(n){let i=Number(n[1]),o=Number(n[2]);return i>0&&o>0?i/o:null}let r=Number(t);return Number.isFinite(r)&&r>0?r:null}function k(e){let t=e.filter(r=>!!r&&r.trim().length>0);if(!t.length)return null;let n=t.filter(r=>{let i=r.trim();return i!=="0"&&i!=="0px"});return n.length?n.length===1?n[0]:`calc(${n.join(" + ")})`:"0px"}function ve(e){let t=e.filter(n=>!!n&&n.trim().length>0);return t.length?t.length===1?t[0]:`max(${t.join(", ")})`:null}function mn(e){let t=e.filter(n=>!!n&&n.trim().length>0);return t.length?t.length===1?t[0]:`min(${t.join(", ")})`:null}function ae(e,t){if(e.trim()==="0"||e.trim()==="0px"||t.trim()==="0"||t.trim()==="0px")return "0px";if(t.trim()==="1")return e;let n=Number(t);return Number.isFinite(n)?Me(e,n)??`calc(${e} * ${t})`:`calc(${e} * ${t})`}function Fe(e,t){return t.trim()==="1"?e:`calc(${e} / ${t})`}function Nt(e,t){return t.trim()==="0"||t.trim()==="0px"?e:`calc(${e} - ${t})`}function Bt(e,t){let n=_(t);return !e||!n?e:mn([e,n])}function re(e){let t=_(e?.margin),n=_(e?.marginTop),r=_(e?.marginBottom);return t&&!n&&!r?Me(t,2):!t&&!n&&!r?null:k([n??t??"0px",r??t??"0px"])}function Lt(e){if(e==null)return null;let t=typeof e=="number"?`${e}px`:String(e).trim();if(!t.length)return null;let n=Ct(t);if(!n.length||n.length>4)return null;let[r,i,o,l]=n;return n.length===1?{top:r,right:r,bottom:r,left:r}:n.length===2?{top:r,right:i,bottom:r,left:i}:n.length===3?{top:r,right:i,bottom:o,left:i}:{top:r,right:i,bottom:o,left:l}}function Et(e){return Sn(e?.border)}function fn(e){return Me(Et(e),2)}function pn(e){return Me(Et(e),2)}function V(e){let t=Lt(e?.padding);return t?k([t.top,t.bottom]):null}function Ht(e){let t=Lt(e?.padding);return t?k([t.left,t.right]):null}function be(e){return _(e?.gap)}function xt(e,t){let n=Ht(t);return !n||n==="0px"?e:Nt(e,n)}function ue(e,t=0,n=a){return r(e,t,n)}function De(e,t,n,r,i=0,o=a){let l=ue(e.style,i,o),a=be(l)??"0px",c=Ht(l)??"0px",u=Math.max(1,t|0),s=u>1?ae(a,String(u-1)):"0px",p=`calc(100cqw - ${c} - ${s})`,{itemWrapStyle:S}=Ie(e,n),g=S?.width?_(S.width):null,v;return r==="peek"&&g&&!Ee(g)?v=g:v=Fe(p,String(u)),Bt(v,S?.maxWidth)??v}function gn(e,t,n,r,i=0,o=a){let l=De(e,t,n,r,i,o),{itemWrapStyle:a}=Ie(e,n),c=fn(a);return !c||c==="0px"?l:Nt(l,c)}function hn(e$1,t=0,n=a){let r=e(d(e$1.rowHeightCompensation,n),t);return r==null||!Number.isFinite(r)||r<=0?null:`${r}px`}function It(e,t,n,r=0,i=a){let o=ue(e.style,r,i),l=be(o)??"0px",a=V(o)??"0px",c=hn(e,r,i),u=Math.max(1,t|0),s=e.direction??"row",p=Array.from({length:u},(g,v)=>{let{item:M,itemWrapStyle:W}=Ie(e,v),O=De(e,u,v,n,r,i),N=gn(e,u,v,n,r,i),b=ce(M,N,r,i),y=pn(W),B=re(W),f=k([y,B]),d=null,H=null;if(b&&!Ee(b)&&(H=k([b,y,B])),W){let q=_(W.height);if(q)d=k([q,B]);else {let P=wt(W.aspectRatio);P?d=k([Fe(O,String(P)),B]):d=f;}}return b?d?Ee(b)?d:ve([d,H??b]):b:d}),S=s==="row"?(()=>{let g=e.initialHeightSlot;if(g==null)return ve(p);let v=Math.min(Math.max(0,Math.trunc(g)),Math.max(0,u-1));return p[v]??ve(p)})():k([k(p),u>1?ae(l,String(u-1)):"0px"]);return k([S,a,c])}function Wt(e,t=0,n=a){return k((e.children??[]).map(r=>ce(r,"100cqw",t,n)))}function ce(e,t,n=0,r=a){if(e.kind==="rect"||e.kind==="square"||e.kind==="circle"){let i=q(e.style,n,r),o=_(i?.height),l=wt(i?.aspectRatio);if(o)return k([o,re(i)]);if(l){let a=_(i?.width),c=a&&!Ee(a)?a:t,u=Bt(c,i?.maxWidth)??c,s=String(l),p=Fe(u,s);return k([p,re(i)])}return re(i)??null}if(e.kind==="media"){let i=e.direction??"row",o=ue(e.style,n,r),l=be(o)??"0px",a=Math.max(0,e.count|0),c=xt(t,o),u=e.tile?{kind:e.tile.shape??"rect",style:e.tile.style,shimmer:e.tile.shimmer}:{kind:"rect",style:{width:"100%",height:"100%"}},s=ce(u,c,n,r);return s?i==="row"?k([s,V(o)]):a<=1?k([s,V(o)]):k([ae(s,String(a)),ae(l,String(a-1)),V(o)]):null}if(e.kind==="sliderDots"){let i=ue(e.style,n,r),o=q(e.dotStyle,n,r),l=q(e.activeStyle,n,r),a=q(e.inactiveStyle,n,r),c=[o,l,a].map(s=>k([_(s?.height),re(s)])).filter(s=>!!s),u=ve(c);return u?k([u,V(i)]):V(i)}if(e.kind==="row"||e.kind==="col"||e.kind==="stack"){let i=e.kind==="row"?"row":"col",o=ue(e.style,n,r),l=be(o)??"0px",a=V(o)??"0px",c=xt(t,o),u=e.children.map(s=>ce(s,c,n,r));if(i==="row"){let s=ve(u);return s?k([s,a]):null}else {let s=u.filter(S=>!!S);if(!s.length)return a;let p=s.length>1?ae(l,String(s.length-1)):"0px";return k([k(s)??null,p,a])}}if(e.kind==="text"){let i=q(e.style,n,r),o=d$1({barHeight:g(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,n,r),lineHeight:h(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,n,r),lines:f(e.lines,1,n,r)});return k([`${o.totalHeight}px`,re(i)])}return null}function Mt(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;if(!o)return ce(e,"100cqw",r,i);let l=It(o,t,n,r,i),a=Wt(o,r,i);return k([l,a])}function Pt(e,t=0,n=a){let r=e.kind==="slider"?e:null;return r?Wt(r,t,n):null}function Tt(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;if(!o||n!=="peek")return null;let l=Math.max(1,t|0);if(l<=1)return null;let a=ue(o.style,r,i),c=be(a)??"0px",u=Array.from({length:l-1},(p,S)=>De(o,l,S+1,n,r,i)),s=l>2?ae(c,String(l-2)):null;return k([...u,s])}function _t(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;return o?It(o,t,n,r,i):ce(e,"100cqw",r,i)}function ie(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "media":case "sliderDots":return;case "text":for(let r of i$1({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:n}))t.add(r);return;case "stack":case "row":case "col":for(let r of e.children)ie(r,t,n);return;case "slider":ie(e.item,t,n);for(let r of e.children??[])ie(r,t,n);for(let r of e.overlays??[])ie(r,t,n);for(let r of e.slots??[])r.item&&ie(r.item,t,n);return;default:return e}}function oe(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":u(e.style,t,n);return;case "media":u(e.tile?.style,t,n);return;case "sliderDots":u(e.dotStyle,t,n),u(e.activeStyle,t,n),u(e.inactiveStyle,t,n);return;case "text":u(e.style,t,n);return;case "stack":case "row":case "col":for(let r of e.children)oe(r,t,n);return;case "slider":oe(e.item,t,n);for(let r of e.children??[])oe(r,t,n);for(let r of e.overlays??[])oe(r,t,n);for(let r of e.slots??[])r.item&&oe(r.item,t,n);return;default:return e}}function Ne(e,t,n=a){u(e,t,n);}function le(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "text":return;case "media":Ne(e.style,t,n);return;case "sliderDots":Ne(e.style,t,n);return;case "stack":case "row":case "col":Ne(e.style,t,n);for(let r of e.children)le(r,t,n);return;case "slider":Ne(e.style,t,n),le(e.item,t,n);for(let r of e.children??[])le(r,t,n);for(let r of e.overlays??[])le(r,t,n);for(let r of e.slots??[])r.item&&le(r.item,t,n);return;default:return e}}function se(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "media":case "sliderDots":case "text":return;case "stack":case "row":case "col":for(let r of e.children)se(r,t,n);return;case "slider":for(let r of d(e.rowHeightCompensation,n))t.add(r.minWidth);se(e.item,t,n);for(let r of e.children??[])se(r,t,n);for(let r of e.overlays??[])se(r,t,n);for(let r of e.slots??[])r.item&&se(r.item,t,n);return;default:return e}}function Ot(e,t=a){let n=new Set;return ie(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function At(e,t=a){let n=new Set;return le(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function $t(e,t=a){let n=new Set;return oe(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function Ft(e,t=a){let n=new Set;return se(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function Dt({count:e,maxSlots:t$1,activeDotIndex:n$1,rowStyle:r,spec:i,breakpoints:o,centerFirst:l=false,hasLeadingSpacer:a$2=false,responsiveCssScopeSelector:c}){let u=i??yt(),s=C.useMemo(()=>({...a,...o??{}}),[o]),p=u.layout??yt().layout,S=C.useMemo(()=>a$1("ssk_",{breakpoints:s,centerFirst:l,count:e,hasLeadingSpacer:a$2,maxSlots:t$1,rowStyle:r,spec:u}),[l,e,s,a$2,t$1,r,u]),g=C.useMemo(()=>`[data-rmg-slider-skel-scope="${bt(S)}"]`,[S]),v=c??g,M={...r||{},...n(u.shimmer)};u.backgroundColor&&(M["--rmg-skel-bg"]=u.backgroundColor),u.radius!=null&&(M["--rmg-skel-radius"]=m(u.radius));let{layout:W,responsiveCss:O}=C.useMemo(()=>{let T=0,I=()=>`n${++T}`,A=[],Se=ne(p,I,A,s),z=un(v,A);return {layout:Se,responsiveCss:z}},[p,v,s]),N=W,b=N.__rmgNodeId,y=Be(t(N.style,s)),B=N.count!=null?Math.max(0,N.count|0):Math.max(0,e|0),f=N.direction??"row",d=N.children??[],H=N.overlays??[],q=l&&f==="row",P=a$2&&f==="row",Re=N.itemStretch??true,J=Math.max(0,t$1|0),U=u.mode??"fit";return jsxs("div",{"data-rmg-slider-skel-scope":c?void 0:S,"data-rmg-skel-mode":U,"data-rmg-skel-has-extras":d.length?"true":void 0,className:[a$4.sliderSkeletonOverlay,u.className].filter(Boolean).join(" "),style:u.style,"data-rmg-skel-part":"overlay",children:[O?jsx("style",{dangerouslySetInnerHTML:{__html:O}}):null,jsxs("div",{className:a$4.sliderSkeletonLayout,"data-rmg-skel-part":"layout","data-rmg-skel-has-extras":d.length?"true":void 0,children:[jsx("div",{"data-rmg-skel-node":b,className:a$4.sliderSkeletonRow,"data-rmg-skel-part":"row",style:{...M,...y||{},display:"flex",flexDirection:f==="row"?"row":"column",...q?{justifyContent:"center"}:null},children:Array.from({length:J}).map((T,I)=>{let A=P&&I===0,Se=P?I-1:I,z=A?{item:{kind:"rect",style:{width:"100%",height:"100%",backgroundColor:"transparent"},shimmer:{enabled:false}},itemWrapStyle:{width:"var(--rmg-slider-center-first-spacer-width, 0px)",height:0}}:Ie(N,Se),E=z.itemWrapStyle,{outerStyle:$,innerStyle:Ce}=an(E);return jsx("div",{className:a$4.sliderSkeletonItem,"data-rmg-skel-slot":I+1,"data-rmg-skel-visible-count":B,"data-rmg-skel-center-first-spacer":A?"true":void 0,style:{boxSizing:"border-box",...E?He(E):null,...$??null,...f==="col"?{flex:"0 0 auto",height:"auto"}:Re?{height:"100%"}:{alignSelf:"flex-start",height:"auto"},minWidth:0,minHeight:0},children:jsx("div",{className:a$4.sliderSkeletonItemInner,style:{...Ce??null,...f==="row"&&!Re?{height:"auto"}:null},children:jsx(Le,{node:z.item,breakpointMap:s,activeDotIndex:n$1})})},`rmg-slider-skel-${I}`)})}),d.length?jsx("div",{className:a$4.sliderSkeletonExtras,"data-rmg-skel-part":"extras",children:d.map((T,I)=>jsx(Le,{node:T,breakpointMap:s,activeDotIndex:n$1},`rmg-slider-skel-extra-${I}`))}):null]}),H.length?jsx("div",{className:a$4.sliderSkeletonOverlays,"data-rmg-skel-part":"overlays",children:H.map((T,I)=>jsx(Le,{node:T,breakpointMap:s,activeDotIndex:n$1},`rmg-slider-skel-overlay-${I}`))}):null]})}function ze(e){return !!e&&typeof e=="object"&&!("kind"in e)&&"layout"in e&&e.layout?.kind==="slider"}function jt(e){return !!e&&typeof e=="object"&&"kind"in e&&e.kind==="slider"}function kn(e){if(ze(e))return e;let{mode:t,centering:n,className:r,visibleCount:i,backgroundColor:o,radius:l,shimmer:a,...c}=e;return {mode:t,centering:n,className:r,visibleCount:i,backgroundColor:o,radius:l,shimmer:a,layout:c}}function qt(e){if(!e||typeof e!="object"||Array.isArray(e))return {};let t={};for(let[n,r]of Object.entries(e))r!=null&&(typeof r=="string"||typeof r=="number"||typeof r=="boolean")&&(t[n]=r);return t}function de(e,t=[]){return !e||typeof e!="object"?t:e.kind==="sliderDots"?(t.push({activeStyle:qt(e.activeStyle),inactiveStyle:qt(e.inactiveStyle)}),t):e.kind==="slider"?(de(e.item,t),e.children?.forEach?.(n=>de(n,t)),e.overlays?.forEach?.(n=>de(n,t)),e.slots?.forEach?.(n=>de(n.item,t)),t):(e.children?.forEach?.(n=>de(n,t)),t)}function je(e,t,n){return i(e,t,n).reduce((r,i)=>Math.max(r,i.count),0)}function yn(e,t){let n=Math.max(0,Math.floor(e));return n<=0?[]:n===1?t>=2?[2]:[]:Array.from({length:Math.min(t,n+1)},(r,i)=>i+1)}function zt(e){return `[data-rmg-scope="${e}"] > [data-rmg-scope-shell="true"]`}function qe(e){typeof document>"u"||document.querySelectorAll("style[data-rmg-slider-restore-style]").forEach(t=>{t.getAttribute("data-rmg-slider-restore-style")===e&&t.remove();});}function xn(e,t){if(t==null||!Number.isFinite(t)||t<=0)return "";let n=Math.round((t+Number.EPSILON)*1e3)/1e3;return `${zt(e)}{--rmg-slider-initial-height:${n}px!important;--rmg-slider-row-height:${n}px!important;}`}function Kt(e){let t=e.skeletonSpec.layout;if(!t)return "";let n=e.skeletonSpec.mode??"fit",r=zt(e.scopeId),i$1=i(e.responsiveCount,e.fallbackCount,e.breakpointMap),o=Ot(t,e.breakpointMap),l=At(t,e.breakpointMap),a=$t(t,e.breakpointMap),c=Ft(t,e.breakpointMap),u=S=>{let g=e.fallbackCount;for(let v of i$1)S>=v.minWidth&&(g=v.count);return Math.max(1,g|0)},s=(S,g)=>{let v=Mt(t,S,n,g,e.breakpointMap),M=_t(t,S,n,g,e.breakpointMap),W=Pt(t,g,e.breakpointMap),O=e.centerFirstSpacer?Tt(t,S,n,g,e.breakpointMap):null;if(!v&&!M&&!W&&!O)return "";let N=[v?`--rmg-slider-initial-height:${v};`:"",M?`--rmg-slider-row-height:${M};`:"",W?`--rmg-slider-extras-height:${W};`:"",e.centerFirstSpacer?`--rmg-slider-center-first-spacer-width:${O??"0px"};`:""].join("");return `${r}{${N}}`};return Array.from(new Set([...i$1.map(S=>S.minWidth),...a,...l,...o,...c])).sort((S,g)=>S-g).map(S=>{let g=s(u(S),S);return g?S<=0?g:`@media (min-width:${S}px){${g}}`:""}).filter(Boolean).join(`
39
- `)}function Ke({layout:e,children:t,breakpoints:n$1,className:r,style:i,shellClassName:o,shellStyle:l$1,contentClassName:a$4,contentStyle:c,backgroundColor:u,radius:s,shimmer:p,disableShimmer:S,ariaLabel:g,ready:v,enabled:M,force:W,timing:O,restore:N}){let b=C.useMemo(()=>({...a,...n$1??{}}),[n$1]),y=C.useMemo(()=>a$1("skel_",{layout:e,breakpoints:b,backgroundColor:u,radius:s,shimmer:p,disableShimmer:S}),[e,b,u,s,p,S]),B=C.useMemo(()=>jt(e)||ze(e)?kn(e):null,[e]),f=B?.layout?.kind==="slider"?B.layout:null,d=N?.kind==="slider"?N:null,H=d?.slider?.handleRef??null,q=d&&d.enabled!==false&&d.slider?.handleRef?[d.key??"",d.itemCount,JSON.stringify(d.visibleCount??null),d.loop===true?"loop":"no-loop",d.activeSlotOffset??""].join(":"):"",P=q!=="",[Re,J]=C.useState(()=>!P),[U,T]=C.useState(null),[I,A]=C.useState(null),Se=v===true&&(!P||Re),z=!!f,E=d?.visibleCount??(jt(e)?e.visibleCount:void 0)??(ze(e)?e.visibleCount:void 0)??(typeof f?.count=="number"?f.count:void 0),$=typeof E=="number"?Math.max(1,E|0):typeof f?.count=="number"?Math.max(1,f.count|0):1,Ce=!!f&&B?.centering==="first"&&(B.mode??"fit")==="peek",K=Ce&&je(E,$,b)>1,me=Array.isArray(f?.slots)&&f.slots.length>0?f.slots.length:Math.max(d?.itemCount??0,typeof f?.count=="number"?f.count:0,$),fe=f?Math.max(12,K?me+1:me,K?je(E,$,b)+1:je(E,$,b)):0,w=C.useMemo(()=>{if(!d||d.enabled===false||!z)return null;let x=Math.max(0,Math.floor(d.itemCount));return x<=0||me<=0?null:{enabled:true,storageKeyId:typeof d.key=="string"&&d.key.trim()?d.key.trim():y,ttlMs:typeof d.ttlMs=="number"&&Number.isFinite(d.ttlMs)?Math.max(0,d.ttlMs):ut,slideCount:x,skeletonSlotCount:Math.max(x,me)}},[z,y,d?.enabled,d?.itemCount,d?.key,d?.ttlMs,me]),G=C.useMemo(()=>f?a$2({scopeId:y,responsiveCount:E,fallbackCount:$,breakpointMap:b,maxSlots:fe,visibleSlotsForCount:K?yn:void 0,slotOrderForCount:U==null||!w?.enabled||!d?void 0:x=>gt({activeIndex:U,visibleCount:x,slotCount:w.skeletonSlotCount,loop:d.loop===true,activeSlotOffset:d.activeSlotOffset??(typeof f.initialHeightSlot=="number"?f.initialHeightSlot:0)})}):{cssText:"",ssrBaseCount:$},[b,y,K,$,f,fe,d,U,w,E]),Ge=C.useMemo(()=>!f||!B?"":Kt({scopeId:y,skeletonSpec:B,responsiveCount:E,fallbackCount:G.ssrBaseCount,breakpointMap:b,centerFirstSpacer:K}),[b,y,K,G.ssrBaseCount,f,B,E]),Ye=C.useMemo(()=>!w?.enabled||!d||!f?"":ht({scopeId:y,storageKeyId:w.storageKeyId,ttlMs:w.ttlMs,slideCount:w.slideCount,skeletonSlotCount:w.skeletonSlotCount,maxSlots:fe,loop:d.loop===true,activeSlotOffset:d.activeSlotOffset??(typeof f.initialHeightSlot=="number"?f.initialHeightSlot:0),responsiveCount:E,fallbackCount:G.ssrBaseCount,breakpointMap:b,dotStyles:de(f)}),[b,y,G.ssrBaseCount,f,fe,d?.activeSlotOffset,d?.enabled,d?.loop,w,E]),Ve=C.useMemo(()=>xn(y,I),[y,I]),Pe=C.useRef(null);C.useLayoutEffect(()=>{J(!P),T(null),A(null);},[P,q]),C.useLayoutEffect(()=>{if(!w?.enabled||!H||typeof window>"u")return;let x=null,F=false,pe=()=>{if(F)return;let Y=H.current;if(!Y){x=window.requestAnimationFrame(pe);return}let D=ft(w,window,{requireNavigationRestore:false});if(!D){qe(y),T(null),A(null),J(true);return}T(D.index),A(D.heightPx??null),qe(y);let _e=[w.storageKeyId,D.timestamp,D.index,D.heightPx??""].join(":");if(Pe.current!==_e&&Y.setIndex(D.index,"instant"),Pe.current===_e){J(true);return}if(!Y.isReady()){x=window.requestAnimationFrame(pe);return}if(!H.current?.isReady()){x=window.requestAnimationFrame(pe);return}Pe.current=_e,x=window.requestAnimationFrame(()=>{x=null,!F&&(H.current?.setIndex(D.index,"instant"),x=window.requestAnimationFrame(()=>{x=null,!F&&(x=window.requestAnimationFrame(()=>{x=null,F||J(true);}));}));});};return pe(),()=>{F=true,x!=null&&window.cancelAnimationFrame(x),qe(y);}},[y,H,w]),C.useEffect(()=>{if(!w?.enabled||!H||typeof window>"u")return;let x=()=>{let F=H.current;if(!F)return;let Y=F.getViewportNode()?.getBoundingClientRect().height;pt(w,{index:F.getIndex(),slideCount:w.slideCount,skeletonSlotCount:w.skeletonSlotCount,heightPx:Y&&Y>0?Y:void 0});};return window.addEventListener("pagehide",x),window.addEventListener("beforeunload",x),()=>{x(),window.removeEventListener("pagehide",x),window.removeEventListener("beforeunload",x);}},[H,w]);let Gt={position:"relative",width:"100%",minWidth:0,minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height, 320px))",overflow:"hidden",...i,...u?{"--rmg-skel-bg":u}:null,...s!=null?{"--rmg-skel-radius":l(s)}:null,...S?null:n(p)},Te=f&&B?jsxs("div",{"data-rmg-skeleton-scope":y,className:r,style:Gt,"aria-hidden":g?void 0:true,"aria-label":g,role:g?"status":void 0,"aria-live":g?"polite":void 0,children:[G.cssText||Ge||Ve?jsx("style",{dangerouslySetInnerHTML:{__html:[G.cssText,Ge,Ve].filter(Boolean).join(`
40
- `)}}):null,jsx(Dt,{count:G.ssrBaseCount,maxSlots:fe,activeDotIndex:U??void 0,spec:B,breakpoints:b,centerFirst:Ce,hasLeadingSpacer:K,responsiveCssScopeSelector:`[data-rmg-scope="${y}"]`}),Ye?jsx("script",{dangerouslySetInnerHTML:{__html:Ye}}):null]}):null,Xe={containerType:"inline-size",width:"100%"},Yt=f?{minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height, 320px))"}:null;return Te?t===void 0?jsx("div",{"data-rmg-scope":y,style:Xe,children:jsx("div",{"data-rmg-scope-shell":"true",style:{minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height, 320px))"},children:Te})}):jsx("div",{"data-rmg-scope":y,style:Xe,children:jsx(a$3,{skeletonNode:Te,ready:Se,enabled:M,force:W,timing:O,shellClassName:o,shellStyle:l$1,loadingShellStyle:Yt,contentClassName:a$4,contentStyle:c,contentOwnsWrapperLayout:true,shellDataAttributes:{"data-rmg-scope-shell":"true"},children:t})}):null}export{Ke as Skeleton,Ke as SliderSkeleton,Kt as buildScopedInitialHeightCss,Ke as default};
37
+ }catch(e){}})();`}function ht(e){if(e.slideCount<=0||e.skeletonSlotCount<=0)return "";let t=i(e.responsiveCount,e.fallbackCount,e.breakpointMap),n={scopeId:e.scopeId,storageKeyId:e.storageKeyId,ttlMs:e.ttlMs,slideCount:e.slideCount,skeletonSlotCount:e.skeletonSlotCount,maxSlots:e.maxSlots,loop:e.loop,activeSlotOffset:e.activeSlotOffset,countRules:t,dotStyles:e.dotStyles??[],viewportTolerancePx:ct};return nn(n)}function m(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function He(e){if(!e)return {};let t=m(e.margin),n=m(e.marginTop),r=m(e.marginRight),i=m(e.marginBottom),o=m(e.marginLeft),l={};return t!=null&&(l.margin=t),n!=null&&(l.marginTop=n),r!=null&&(l.marginRight=r),i!=null&&(l.marginBottom=i),o!=null&&(l.marginLeft=o),l}function rn(e,t){if(!(!e&&!t))return {...e||{},...t||{}}}function Ie(e,t){let n=e.slots?.[t];return {item:n?.item??e.item,itemWrapStyle:rn(e.itemWrapStyle,n?.itemWrapStyle)}}function We(e,t){let n$1={};e?.aspectRatio!=null&&(n$1.aspectRatio=e.aspectRatio);let r=m(e?.width),i=m(e?.maxWidth),o=m(e?.height),l=m(e?.maxHeight);return r!=null&&(n$1.inlineSize=r,n$1.width=r),i!=null&&(n$1.maxInlineSize=i,n$1.maxWidth=i),o!=null&&(n$1.height=o),l!=null&&(n$1.maxHeight=l),e?.aspectRatio!=null&&e?.height==null&&(n$1.height="auto"),e?.aspectRatio!=null&&e?.width==null&&e?.height==null&&(n$1.inlineSize="100%",n$1.width="100%",n$1.height="auto"),e?.backgroundColor&&(n$1["--rmg-skel-bg"]=e.backgroundColor),e?.borderRadius!=null&&(n$1["--rmg-skel-radius"]=m(e.borderRadius)),e?.overflow!=null&&(n$1.overflow=e.overflow),e?.alignSelf&&(n$1.alignSelf=e.alignSelf),e?.scale!=null&&(n$1.transform=`scale(${e.scale})`),Object.assign(n$1,n(t)),n$1}function on(e,t){let n={};t!=null&&(n.height=`${t}px`);let r=m(e?.width),i=m(e?.maxWidth);return r!=null&&(n.inlineSize=r,n.width=r),i!=null&&(n.maxInlineSize=i,n.maxWidth=i),e?.alignSelf&&(n.alignSelf=e.alignSelf),e?.scale!=null&&(n.transform=`scale(${e.scale})`),n}function $e(e){return typeof e=="string"&&e.trim()==="max-content"}function ln(e){return !e||typeof e!="object"?false:$e(e.width)?true:Object.values(e).some(n=>!!n&&typeof n=="object"&&$e(n.width))}function sn(e){let t=We(e,void 0);return delete t["--rmg-skel-bg"],e?.backgroundColor!=null&&(t.backgroundColor=e.backgroundColor),e?.border!=null&&(t.border=e.border),e?.boxShadow!=null&&(t.boxShadow=e.boxShadow),e?.borderRadius!=null?(t.borderRadius=m(e.borderRadius),t.overflow=e?.overflow??"hidden"):e?.overflow!=null&&(t.overflow=e.overflow),t.boxSizing="border-box",t}function an(e){if(!e)return {outerStyle:void 0,innerStyle:void 0};let t=sn(e),n={};return t.boxShadow!=null&&(n["--rmg-slider-skel-wrap-shadow"]=t.boxShadow,delete t.boxShadow),t.borderRadius!=null&&(n["--rmg-slider-skel-wrap-shadow-radius"]=t.borderRadius),{outerStyle:Object.keys(n).length?n:void 0,innerStyle:t}}function Be(e){let t={};return e&&(e.position!=null&&(t.position=e.position),e.inset!=null&&(t.inset=m(e.inset)),e.insetBlock!=null&&(t.insetBlock=m(e.insetBlock)),e.insetInline!=null&&(t.insetInline=m(e.insetInline)),e.top!=null&&(t.top=m(e.top)),e.right!=null&&(t.right=m(e.right)),e.bottom!=null&&(t.bottom=m(e.bottom)),e.left!=null&&(t.left=m(e.left)),e.zIndex!=null&&(t.zIndex=e.zIndex),e.gap!=null&&(t.gap=m(e.gap)),e.padding!=null&&(t.padding=m(e.padding)),e.align&&(t.alignItems=e.align),e.justify&&(t.justifyContent=e.justify),e.wrap&&(t.flexWrap="wrap"),e.width!=null&&(t.width=m(e.width)),e.maxWidth!=null&&(t.maxWidth=m(e.maxWidth)),e.height!=null&&(t.height=m(e.height)),e.minHeight!=null&&(t.minHeight=m(e.minHeight)),e.maxHeight!=null&&(t.maxHeight=m(e.maxHeight)),e.backgroundColor!=null&&(t.backgroundColor=e.backgroundColor),e.borderRadius!=null&&(t.borderRadius=m(e.borderRadius)),e.border!=null&&(t.border=e.border),e.boxShadow!=null&&(t.boxShadow=e.boxShadow),e.margin!=null&&(t.margin=m(e.margin)),e.marginTop!=null&&(t.marginTop=m(e.marginTop)),e.marginRight!=null&&(t.marginRight=m(e.marginRight)),e.marginBottom!=null&&(t.marginBottom=m(e.marginBottom)),e.marginLeft!=null&&(t.marginLeft=m(e.marginLeft)),e.flex!=null&&(t.flex=e.flex),e.flexGrow!=null&&(t.flexGrow=e.flexGrow),e.flexShrink!=null&&(t.flexShrink=e.flexShrink),e.flexBasis!=null&&(t.flexBasis=m(e.flexBasis)),e.order!=null&&(t.order=e.order),e.alignSelf!=null&&(t.alignSelf=e.alignSelf),e.overflow!=null&&(t.overflow=e.overflow),e.transform!=null&&(t.transform=e.transform),e.pointerEvents!=null&&(t.pointerEvents=e.pointerEvents),e.opacity!=null&&(t.opacity=e.opacity)),t}function Ae(e){let t=We(e,void 0);return delete t["--rmg-skel-bg"],e?.backgroundColor!=null&&(t.backgroundColor=e.backgroundColor),e?.borderRadius!=null&&(t.borderRadius=m(e.borderRadius)),e?.overflow!=null&&(t.overflow=e.overflow),{...t,...He(e)}}function bt(e){return e.replace(/"/g,'\\"')}function ne(e,t,n,r=a){switch(e.kind){case "rect":case "square":case "circle":{let i=x({style:e.style,breakpointMap:r});if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "text":{let i=[...k$1({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,fitContent:ln(e.style),breakpointMap:r}).map(l=>({...l,raw:true})),...y({style:e.style,breakpointMap:r})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "media":{let i=[...w({style:e.style,breakpointMap:r}),...x({style:e.tile?.style,breakpointMap:r,selector:`${b$1} [data-rmg-skel-media-tile="true"]`})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "sliderDots":{let i=[...w({style:e.style,breakpointMap:r}),...x({style:e.dotStyle,breakpointMap:r,selector:`${b$1} [data-rmg-skel-slider-dot]`}),...x({style:e.activeStyle,breakpointMap:r,selector:`${b$1} [data-rmg-skel-dot-active="true"]`}),...x({style:e.inactiveStyle,breakpointMap:r,selector:`${b$1} [data-rmg-skel-dot-active="false"]`})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "stack":case "row":case "col":{let i=w({style:e.style,breakpointMap:r}),o=i.length?t():void 0;o&&i.length&&n.push({nodeId:o,rules:i});let l=e.children.map(a=>ne(a,t,n,r));return {...e,...o?{__rmgNodeId:o}:null,children:l}}case "slider":{let i=w({style:e.style,breakpointMap:r}),o=i.length?t():void 0;o&&i.length&&n.push({nodeId:o,rules:i});let l=ne(e.item,t,n,r),a=e.children?.map(s=>ne(s,t,n,r)),c=e.overlays?.map(s=>ne(s,t,n,r)),u=e.slots?.map(s=>({...s,item:s.item?ne(s.item,t,n,r):void 0}));return {...e,...o?{__rmgNodeId:o}:null,item:l,children:a,overlays:c,slots:u}}default:return e}}function un(e,t){if(!t.length)return "";let n=[];for(let r of t){let i=`${e} [data-rmg-skel-node="${bt(r.nodeId)}"]`;for(let o of r.rules){let l=o.raw?o.css.split("__NODE_SEL__").join(i):`${i}{${o.css}}`;o.minWidth<=0?n.push(l):n.push(`@media (min-width:${o.minWidth}px){${l}}`);}}return n.join(`
38
+ `)}function kt(e){let{kind:t,style:n,shimmer:r,breakpointMap:i,mediaTile:o}=e,l={},a=s(n,i),c=e.__rmgNodeId;return t==="circle"&&(l.borderRadius="9999px"),t==="square"&&a?.aspectRatio==null&&(l.aspectRatio="1"),a?.aspectRatio!=null&&a?.height==null&&(l.height="auto"),jsx("div",{"data-rmg-skel-node":c,"data-rmg-skel-media-tile":o?"true":void 0,className:a$3.sliderSkeleton,style:{...We(a,r),...He(a),...l}})}function cn({node:e,breakpointMap:t}){let n=j({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:t}),r=s(e.style,t),i=n.states.some(({state:s})=>s.lineCount!==n.baseState.lineCount||s.metrics.totalHeight!==n.baseState.metrics.totalHeight||s.metrics.barHeight!==n.baseState.metrics.barHeight||s.metrics.paddingBlock!==n.baseState.metrics.paddingBlock||s.metrics.rowGap!==n.baseState.metrics.rowGap),o=n.states.some(({state:s})=>s.lineCount!==n.baseState.lineCount||s.barWidths.length!==n.baseState.barWidths.length||s.barWidths.some((p,S)=>p!==n.baseState.barWidths[S])),l=e.__rmgNodeId,a=on(r,i?void 0:n.metrics.totalHeight),c={height:n.metrics.barHeight,backgroundColor:r?.backgroundColor,borderRadius:r?.borderRadius},u=$e(r?.width);return jsx("div",{"data-rmg-skel-node":l,"data-rmg-skel-text":"true",className:a$3.sliderSkeletonText,style:{...a,...He(r),...i?null:{paddingBlock:`${n.metrics.paddingBlock}px`,rowGap:`${n.metrics.rowGap}px`}},children:Array.from({length:n.maxLines}).map((s,p)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[a$3.sliderSkeleton,a$3.sliderSkeletonTextLine].join(" "),style:{...We(c,e.shimmer),...o?null:{display:p>=n.baseLines?"none":void 0,width:u?n.baseState.barWidths[p]??"100%":"100%",maxWidth:n.baseState.barWidths[p]??"100%"}}},p))})}function Le({node:e,breakpointMap:t$1,activeDotIndex:n$1}){switch(e.kind){case "rect":case "square":case "circle":return jsx(kt,{...e,breakpointMap:t$1});case "media":{let r=Math.max(0,e.count|0),i=e.direction??"row",o=e.tile?.shape??"rect",l=e.__rmgNodeId,a=Be(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":l,className:a$3.sliderSkeletonGroup,style:{display:"flex",flexDirection:i==="row"?"row":"column",...a||{}},children:Array.from({length:r}).map((c,u)=>jsx(kt,{kind:o,style:e.tile?.style,shimmer:e.tile?.shimmer,breakpointMap:t$1,mediaTile:true},u))})}case "sliderDots":{let r=Math.max(0,e.count|0),i=e.__rmgNodeId,o=Be(t(e.style,t$1)),l=Ae(s(e.dotStyle,t$1)),a=Ae(s(e.activeStyle,t$1)),c=Ae(s(e.inactiveStyle,t$1)),u=typeof n$1=="number"&&Number.isFinite(n$1)?Math.max(0,Math.min(r-1,Math.floor(n$1))):0;return jsx("div",{"data-rmg-skel-node":i,"data-rmg-skel-slider-dots":"true","data-rmg-skel-dot-active-style":JSON.stringify(a),"data-rmg-skel-dot-inactive-style":JSON.stringify(c),className:a$3.sliderSkeletonGroup,style:{display:"flex",flexDirection:"row",...o||{}},children:Array.from({length:r}).map((s,p)=>{let S=p===u;return jsx("div",{"data-rmg-skel-slider-dot":p,"data-rmg-skel-dot-active":S?"true":"false",className:a$3.sliderSkeleton,style:{...n(e.shimmer),...l,...S?a:c}},p)})})}case "stack":case "row":case "col":{let r=e.kind==="row"?"row":"column",i=e.__rmgNodeId,o=Be(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":i,className:a$3.sliderSkeletonGroup,style:{display:"flex",flexDirection:r,...o||{}},children:e.children.map((l,a)=>jsx(Le,{node:l,breakpointMap:t$1,activeDotIndex:n$1},a))})}case "text":return jsx(cn,{node:e,breakpointMap:t$1});default:return null}}function yt(){return {layout:{kind:"slider",direction:"row",item:{kind:"rect",style:{width:"100%",height:"100%",borderRadius:2}},itemWrapStyle:void 0},radius:12}}function Ee(e){return /%$/.test(e.trim())}function Rt(e){let t=e.trim();if(!t.length)return null;if(t==="0")return {value:0,unit:"px"};let n=t.match(/^(\d+(?:\.\d+)?|\.\d+)([a-zA-Z]+)$/);if(!n)return null;let r=Number(n[1]);return !Number.isFinite(r)||r<0?null:{value:r,unit:n[2]}}function Ct(e){let t=[],n="",r=0;for(let i of e.trim()){if(/\s/.test(i)&&r===0){n&&(t.push(n),n="");continue}n+=i,i==="("?r+=1:i===")"&&(r=Math.max(0,r-1));}return n&&t.push(n),t}function dn(e){let t=e.trim();return t.length?t==="0"?"0px":/^(?:var|calc|min|max|clamp)\(.+\)$/i.test(t)||Rt(t)?t:null:null}function Sn(e){if(e==null)return null;if(typeof e=="number")return Number.isFinite(e)&&e>=0?e===0?"0px":`${e}px`:null;for(let t of Ct(String(e))){let n=dn(t);if(n)return n}return null}function _(e){return e==null?null:typeof e=="number"?`${e}px`:String(e)}function Me(e,t){if(!e)return null;if(t===0)return "0px";if(e==="0px")return e;let n=Rt(e);return n?`${n.value*t}${n.unit}`:`calc(${e} * ${t})`}function wt(e){if(e==null)return null;if(typeof e=="number")return e>0?e:null;let t=String(e).trim(),n=t.match(/^(\d+(?:\.\d+)?)\s*\/\s*(\d+(?:\.\d+)?)$/);if(n){let i=Number(n[1]),o=Number(n[2]);return i>0&&o>0?i/o:null}let r=Number(t);return Number.isFinite(r)&&r>0?r:null}function k(e){let t=e.filter(r=>!!r&&r.trim().length>0);if(!t.length)return null;let n=t.filter(r=>{let i=r.trim();return i!=="0"&&i!=="0px"});return n.length?n.length===1?n[0]:`calc(${n.join(" + ")})`:"0px"}function ve(e){let t=e.filter(n=>!!n&&n.trim().length>0);return t.length?t.length===1?t[0]:`max(${t.join(", ")})`:null}function mn(e){let t=e.filter(n=>!!n&&n.trim().length>0);return t.length?t.length===1?t[0]:`min(${t.join(", ")})`:null}function ae(e,t){if(e.trim()==="0"||e.trim()==="0px"||t.trim()==="0"||t.trim()==="0px")return "0px";if(t.trim()==="1")return e;let n=Number(t);return Number.isFinite(n)?Me(e,n)??`calc(${e} * ${t})`:`calc(${e} * ${t})`}function Fe(e,t){return t.trim()==="1"?e:`calc(${e} / ${t})`}function Nt(e,t){return t.trim()==="0"||t.trim()==="0px"?e:`calc(${e} - ${t})`}function Bt(e,t){let n=_(t);return !e||!n?e:mn([e,n])}function re(e){let t=_(e?.margin),n=_(e?.marginTop),r=_(e?.marginBottom);return t&&!n&&!r?Me(t,2):!t&&!n&&!r?null:k([n??t??"0px",r??t??"0px"])}function Lt(e){if(e==null)return null;let t=typeof e=="number"?`${e}px`:String(e).trim();if(!t.length)return null;let n=Ct(t);if(!n.length||n.length>4)return null;let[r,i,o,l]=n;return n.length===1?{top:r,right:r,bottom:r,left:r}:n.length===2?{top:r,right:i,bottom:r,left:i}:n.length===3?{top:r,right:i,bottom:o,left:i}:{top:r,right:i,bottom:o,left:l}}function Et(e){return Sn(e?.border)}function fn(e){return Me(Et(e),2)}function pn(e){return Me(Et(e),2)}function V(e){let t=Lt(e?.padding);return t?k([t.top,t.bottom]):null}function Ht(e){let t=Lt(e?.padding);return t?k([t.left,t.right]):null}function be(e){return _(e?.gap)}function xt(e,t){let n=Ht(t);return !n||n==="0px"?e:Nt(e,n)}function ue(e,t=0,n=a){return r(e,t,n)}function De(e,t,n,r,i=0,o=a){let l=ue(e.style,i,o),a=be(l)??"0px",c=Ht(l)??"0px",u=Math.max(1,t|0),s=u>1?ae(a,String(u-1)):"0px",p=`calc(100cqw - ${c} - ${s})`,{itemWrapStyle:S}=Ie(e,n),g=S?.width?_(S.width):null,v;return r==="peek"&&g&&!Ee(g)?v=g:v=Fe(p,String(u)),Bt(v,S?.maxWidth)??v}function gn(e,t,n,r,i=0,o=a){let l=De(e,t,n,r,i,o),{itemWrapStyle:a}=Ie(e,n),c=fn(a);return !c||c==="0px"?l:Nt(l,c)}function hn(e$1,t=0,n=a){let r=e(d(e$1.rowHeightCompensation,n),t);return r==null||!Number.isFinite(r)||r<=0?null:`${r}px`}function It(e,t,n,r=0,i=a){let o=ue(e.style,r,i),l=be(o)??"0px",a=V(o)??"0px",c=hn(e,r,i),u=Math.max(1,t|0),s=e.direction??"row",p=Array.from({length:u},(g,v)=>{let{item:M,itemWrapStyle:W}=Ie(e,v),O=De(e,u,v,n,r,i),N=gn(e,u,v,n,r,i),b=ce(M,N,r,i),y=pn(W),B=re(W),f=k([y,B]),d=null,H=null;if(b&&!Ee(b)&&(H=k([b,y,B])),W){let q=_(W.height);if(q)d=k([q,B]);else {let P=wt(W.aspectRatio);P?d=k([Fe(O,String(P)),B]):d=f;}}return b?d?Ee(b)?d:ve([d,H??b]):b:d}),S=s==="row"?(()=>{let g=e.initialHeightSlot;if(g==null)return ve(p);let v=Math.min(Math.max(0,Math.trunc(g)),Math.max(0,u-1));return p[v]??ve(p)})():k([k(p),u>1?ae(l,String(u-1)):"0px"]);return k([S,a,c])}function Wt(e,t=0,n=a){return k((e.children??[]).map(r=>ce(r,"100cqw",t,n)))}function ce(e,t,n=0,r=a){if(e.kind==="rect"||e.kind==="square"||e.kind==="circle"){let i=q(e.style,n,r),o=_(i?.height),l=wt(i?.aspectRatio);if(o)return k([o,re(i)]);if(l){let a=_(i?.width),c=a&&!Ee(a)?a:t,u=Bt(c,i?.maxWidth)??c,s=String(l),p=Fe(u,s);return k([p,re(i)])}return re(i)??null}if(e.kind==="media"){let i=e.direction??"row",o=ue(e.style,n,r),l=be(o)??"0px",a=Math.max(0,e.count|0),c=xt(t,o),u=e.tile?{kind:e.tile.shape??"rect",style:e.tile.style,shimmer:e.tile.shimmer}:{kind:"rect",style:{width:"100%",height:"100%"}},s=ce(u,c,n,r);return s?i==="row"?k([s,V(o)]):a<=1?k([s,V(o)]):k([ae(s,String(a)),ae(l,String(a-1)),V(o)]):null}if(e.kind==="sliderDots"){let i=ue(e.style,n,r),o=q(e.dotStyle,n,r),l=q(e.activeStyle,n,r),a=q(e.inactiveStyle,n,r),c=[o,l,a].map(s=>k([_(s?.height),re(s)])).filter(s=>!!s),u=ve(c);return u?k([u,V(i)]):V(i)}if(e.kind==="row"||e.kind==="col"||e.kind==="stack"){let i=e.kind==="row"?"row":"col",o=ue(e.style,n,r),l=be(o)??"0px",a=V(o)??"0px",c=xt(t,o),u=e.children.map(s=>ce(s,c,n,r));if(i==="row"){let s=ve(u);return s?k([s,a]):null}else {let s=u.filter(S=>!!S);if(!s.length)return a;let p=s.length>1?ae(l,String(s.length-1)):"0px";return k([k(s)??null,p,a])}}if(e.kind==="text"){let i=q(e.style,n,r),o=d$1({barHeight:g(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,n,r),lineHeight:h(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,n,r),lines:f(e.lines,1,n,r)});return k([`${o.totalHeight}px`,re(i)])}return null}function Mt(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;if(!o)return ce(e,"100cqw",r,i);let l=It(o,t,n,r,i),a=Wt(o,r,i);return k([l,a])}function Pt(e,t=0,n=a){let r=e.kind==="slider"?e:null;return r?Wt(r,t,n):null}function Tt(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;if(!o||n!=="peek")return null;let l=Math.max(1,t|0);if(l<=1)return null;let a=ue(o.style,r,i),c=be(a)??"0px",u=Array.from({length:l-1},(p,S)=>De(o,l,S+1,n,r,i)),s=l>2?ae(c,String(l-2)):null;return k([...u,s])}function _t(e,t,n,r=0,i=a){let o=e.kind==="slider"?e:null;return o?It(o,t,n,r,i):ce(e,"100cqw",r,i)}function ie(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "media":case "sliderDots":return;case "text":for(let r of i$1({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:n}))t.add(r);return;case "stack":case "row":case "col":for(let r of e.children)ie(r,t,n);return;case "slider":ie(e.item,t,n);for(let r of e.children??[])ie(r,t,n);for(let r of e.overlays??[])ie(r,t,n);for(let r of e.slots??[])r.item&&ie(r.item,t,n);return;default:return e}}function oe(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":u(e.style,t,n);return;case "media":u(e.tile?.style,t,n);return;case "sliderDots":u(e.dotStyle,t,n),u(e.activeStyle,t,n),u(e.inactiveStyle,t,n);return;case "text":u(e.style,t,n);return;case "stack":case "row":case "col":for(let r of e.children)oe(r,t,n);return;case "slider":oe(e.item,t,n);for(let r of e.children??[])oe(r,t,n);for(let r of e.overlays??[])oe(r,t,n);for(let r of e.slots??[])r.item&&oe(r.item,t,n);return;default:return e}}function Ne(e,t,n=a){u(e,t,n);}function le(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "text":return;case "media":Ne(e.style,t,n);return;case "sliderDots":Ne(e.style,t,n);return;case "stack":case "row":case "col":Ne(e.style,t,n);for(let r of e.children)le(r,t,n);return;case "slider":Ne(e.style,t,n),le(e.item,t,n);for(let r of e.children??[])le(r,t,n);for(let r of e.overlays??[])le(r,t,n);for(let r of e.slots??[])r.item&&le(r.item,t,n);return;default:return e}}function se(e,t,n=a){switch(e.kind){case "rect":case "square":case "circle":case "media":case "sliderDots":case "text":return;case "stack":case "row":case "col":for(let r of e.children)se(r,t,n);return;case "slider":for(let r of d(e.rowHeightCompensation,n))t.add(r.minWidth);se(e.item,t,n);for(let r of e.children??[])se(r,t,n);for(let r of e.overlays??[])se(r,t,n);for(let r of e.slots??[])r.item&&se(r.item,t,n);return;default:return e}}function Ot(e,t=a){let n=new Set;return ie(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function At(e,t=a){let n=new Set;return le(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function $t(e,t=a){let n=new Set;return oe(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function Ft(e,t=a){let n=new Set;return se(e,n,t),Array.from(n).filter(r=>r>0).sort((r,i)=>r-i)}function Dt({count:e,maxSlots:t$1,activeDotIndex:n$1,rowStyle:r,spec:i,breakpoints:o,centerFirst:l=false,hasLeadingSpacer:a$2=false,responsiveCssScopeSelector:c}){let u=i??yt(),s=C.useMemo(()=>({...a,...o??{}}),[o]),p=u.layout??yt().layout,S=C.useMemo(()=>a$1("ssk_",{breakpoints:s,centerFirst:l,count:e,hasLeadingSpacer:a$2,maxSlots:t$1,rowStyle:r,spec:u}),[l,e,s,a$2,t$1,r,u]),g=C.useMemo(()=>`[data-rmg-slider-skel-scope="${bt(S)}"]`,[S]),v=c??g,M={...r||{},...n(u.shimmer)};u.backgroundColor&&(M["--rmg-skel-bg"]=u.backgroundColor),u.radius!=null&&(M["--rmg-skel-radius"]=m(u.radius));let{layout:W,responsiveCss:O}=C.useMemo(()=>{let T=0,I=()=>`n${++T}`,A=[],Se=ne(p,I,A,s),z=un(v,A);return {layout:Se,responsiveCss:z}},[p,v,s]),N=W,b=N.__rmgNodeId,y=Be(t(N.style,s)),B=N.count!=null?Math.max(0,N.count|0):Math.max(0,e|0),f=N.direction??"row",d=N.children??[],H=N.overlays??[],q=l&&f==="row",P=a$2&&f==="row",Re=N.itemStretch??true,J=Math.max(0,t$1|0),U=u.mode??"fit";return jsxs("div",{"data-rmg-slider-skel-scope":c?void 0:S,"data-rmg-skel-mode":U,"data-rmg-skel-has-extras":d.length?"true":void 0,className:[a$3.sliderSkeletonOverlay,u.className].filter(Boolean).join(" "),style:u.style,"data-rmg-skel-part":"overlay",children:[O?jsx("style",{dangerouslySetInnerHTML:{__html:O}}):null,jsxs("div",{className:a$3.sliderSkeletonLayout,"data-rmg-skel-part":"layout","data-rmg-skel-has-extras":d.length?"true":void 0,children:[jsx("div",{"data-rmg-skel-node":b,className:a$3.sliderSkeletonRow,"data-rmg-skel-part":"row",style:{...M,...y||{},display:"flex",flexDirection:f==="row"?"row":"column",...q?{justifyContent:"center"}:null},children:Array.from({length:J}).map((T,I)=>{let A=P&&I===0,Se=P?I-1:I,z=A?{item:{kind:"rect",style:{width:"100%",height:"100%",backgroundColor:"transparent"},shimmer:{enabled:false}},itemWrapStyle:{width:"var(--rmg-slider-center-first-spacer-width, 0px)",height:0}}:Ie(N,Se),E=z.itemWrapStyle,{outerStyle:$,innerStyle:Ce}=an(E);return jsx("div",{className:a$3.sliderSkeletonItem,"data-rmg-skel-slot":I+1,"data-rmg-skel-visible-count":B,"data-rmg-skel-center-first-spacer":A?"true":void 0,style:{boxSizing:"border-box",...E?He(E):null,...$??null,...f==="col"?{flex:"0 0 auto",height:"auto"}:Re?{height:"100%"}:{alignSelf:"flex-start",height:"auto"},minWidth:0,minHeight:0},children:jsx("div",{className:a$3.sliderSkeletonItemInner,style:{...Ce??null,...f==="row"&&!Re?{height:"auto"}:null},children:jsx(Le,{node:z.item,breakpointMap:s,activeDotIndex:n$1})})},`rmg-slider-skel-${I}`)})}),d.length?jsx("div",{className:a$3.sliderSkeletonExtras,"data-rmg-skel-part":"extras",children:d.map((T,I)=>jsx(Le,{node:T,breakpointMap:s,activeDotIndex:n$1},`rmg-slider-skel-extra-${I}`))}):null]}),H.length?jsx("div",{className:a$3.sliderSkeletonOverlays,"data-rmg-skel-part":"overlays",children:H.map((T,I)=>jsx(Le,{node:T,breakpointMap:s,activeDotIndex:n$1},`rmg-slider-skel-overlay-${I}`))}):null]})}function ze(e){return !!e&&typeof e=="object"&&!("kind"in e)&&"layout"in e&&e.layout?.kind==="slider"}function jt(e){return !!e&&typeof e=="object"&&"kind"in e&&e.kind==="slider"}function kn(e){if(ze(e))return e;let{mode:t,centering:n,className:r,visibleCount:i,backgroundColor:o,radius:l,shimmer:a,...c}=e;return {mode:t,centering:n,className:r,visibleCount:i,backgroundColor:o,radius:l,shimmer:a,layout:c}}function qt(e){if(!e||typeof e!="object"||Array.isArray(e))return {};let t={};for(let[n,r]of Object.entries(e))r!=null&&(typeof r=="string"||typeof r=="number"||typeof r=="boolean")&&(t[n]=r);return t}function de(e,t=[]){return !e||typeof e!="object"?t:e.kind==="sliderDots"?(t.push({activeStyle:qt(e.activeStyle),inactiveStyle:qt(e.inactiveStyle)}),t):e.kind==="slider"?(de(e.item,t),e.children?.forEach?.(n=>de(n,t)),e.overlays?.forEach?.(n=>de(n,t)),e.slots?.forEach?.(n=>de(n.item,t)),t):(e.children?.forEach?.(n=>de(n,t)),t)}function je(e,t,n){return i(e,t,n).reduce((r,i)=>Math.max(r,i.count),0)}function yn(e,t){let n=Math.max(0,Math.floor(e));return n<=0?[]:n===1?t>=2?[2]:[]:Array.from({length:Math.min(t,n+1)},(r,i)=>i+1)}function zt(e){return `[data-rmg-scope="${e}"] > [data-rmg-scope-shell="true"]`}function qe(e){typeof document>"u"||document.querySelectorAll("style[data-rmg-slider-restore-style]").forEach(t=>{t.getAttribute("data-rmg-slider-restore-style")===e&&t.remove();});}function xn(e,t){if(t==null||!Number.isFinite(t)||t<=0)return "";let n=Math.round((t+Number.EPSILON)*1e3)/1e3;return `${zt(e)}{--rmg-slider-initial-height:${n}px!important;--rmg-slider-row-height:${n}px!important;}`}function Kt(e){let t=e.skeletonSpec.layout;if(!t)return "";let n=e.skeletonSpec.mode??"fit",r=zt(e.scopeId),i$1=i(e.responsiveCount,e.fallbackCount,e.breakpointMap),o=Ot(t,e.breakpointMap),l=At(t,e.breakpointMap),a=$t(t,e.breakpointMap),c=Ft(t,e.breakpointMap),u=S=>{let g=e.fallbackCount;for(let v of i$1)S>=v.minWidth&&(g=v.count);return Math.max(1,g|0)},s=(S,g)=>{let v=Mt(t,S,n,g,e.breakpointMap),M=_t(t,S,n,g,e.breakpointMap),W=Pt(t,g,e.breakpointMap),O=e.centerFirstSpacer?Tt(t,S,n,g,e.breakpointMap):null;if(!v&&!M&&!W&&!O)return "";let N=[v?`--rmg-slider-initial-height:${v};`:"",M?`--rmg-slider-row-height:${M};`:"",W?`--rmg-slider-extras-height:${W};`:"",e.centerFirstSpacer?`--rmg-slider-center-first-spacer-width:${O??"0px"};`:""].join("");return `${r}{${N}}`};return Array.from(new Set([...i$1.map(S=>S.minWidth),...a,...l,...o,...c])).sort((S,g)=>S-g).map(S=>{let g=s(u(S),S);return g?S<=0?g:`@media (min-width:${S}px){${g}}`:""}).filter(Boolean).join(`
39
+ `)}function Ke({layout:e,children:t,breakpoints:n$1,className:r,style:i,shellClassName:o,shellStyle:l$1,contentClassName:a$3,contentStyle:c,backgroundColor:u,radius:s,shimmer:p,disableShimmer:S,ariaLabel:g,ready:v,enabled:M,force:W,timing:O,restore:N}){let b$1=C.useMemo(()=>({...a,...n$1??{}}),[n$1]),y=C.useMemo(()=>a$1("skel_",{layout:e,breakpoints:b$1,backgroundColor:u,radius:s,shimmer:p,disableShimmer:S}),[e,b$1,u,s,p,S]),B=C.useMemo(()=>jt(e)||ze(e)?kn(e):null,[e]),f=B?.layout?.kind==="slider"?B.layout:null,d=N?.kind==="slider"?N:null,H=d?.slider?.handleRef??null,q=d&&d.enabled!==false&&d.slider?.handleRef?[d.key??"",d.itemCount,JSON.stringify(d.visibleCount??null),d.loop===true?"loop":"no-loop",d.activeSlotOffset??""].join(":"):"",P=q!=="",[Re,J]=C.useState(()=>!P),[U,T]=C.useState(null),[I,A]=C.useState(null),Se=v===true&&(!P||Re),z=!!f,E=d?.visibleCount??(jt(e)?e.visibleCount:void 0)??(ze(e)?e.visibleCount:void 0)??(typeof f?.count=="number"?f.count:void 0),$=typeof E=="number"?Math.max(1,E|0):typeof f?.count=="number"?Math.max(1,f.count|0):1,Ce=!!f&&B?.centering==="first"&&(B.mode??"fit")==="peek",K=Ce&&je(E,$,b$1)>1,me=Array.isArray(f?.slots)&&f.slots.length>0?f.slots.length:Math.max(d?.itemCount??0,typeof f?.count=="number"?f.count:0,$),fe=f?Math.max(12,K?me+1:me,K?je(E,$,b$1)+1:je(E,$,b$1)):0,w=C.useMemo(()=>{if(!d||d.enabled===false||!z)return null;let x=Math.max(0,Math.floor(d.itemCount));return x<=0||me<=0?null:{enabled:true,storageKeyId:typeof d.key=="string"&&d.key.trim()?d.key.trim():y,ttlMs:typeof d.ttlMs=="number"&&Number.isFinite(d.ttlMs)?Math.max(0,d.ttlMs):ut,slideCount:x,skeletonSlotCount:Math.max(x,me)}},[z,y,d?.enabled,d?.itemCount,d?.key,d?.ttlMs,me]),G=C.useMemo(()=>f?a$2({scopeId:y,responsiveCount:E,fallbackCount:$,breakpointMap:b$1,maxSlots:fe,visibleSlotsForCount:K?yn:void 0,slotOrderForCount:U==null||!w?.enabled||!d?void 0:x=>gt({activeIndex:U,visibleCount:x,slotCount:w.skeletonSlotCount,loop:d.loop===true,activeSlotOffset:d.activeSlotOffset??(typeof f.initialHeightSlot=="number"?f.initialHeightSlot:0)})}):{cssText:"",ssrBaseCount:$},[b$1,y,K,$,f,fe,d,U,w,E]),Ge=C.useMemo(()=>!f||!B?"":Kt({scopeId:y,skeletonSpec:B,responsiveCount:E,fallbackCount:G.ssrBaseCount,breakpointMap:b$1,centerFirstSpacer:K}),[b$1,y,K,G.ssrBaseCount,f,B,E]),Ye=C.useMemo(()=>!w?.enabled||!d||!f?"":ht({scopeId:y,storageKeyId:w.storageKeyId,ttlMs:w.ttlMs,slideCount:w.slideCount,skeletonSlotCount:w.skeletonSlotCount,maxSlots:fe,loop:d.loop===true,activeSlotOffset:d.activeSlotOffset??(typeof f.initialHeightSlot=="number"?f.initialHeightSlot:0),responsiveCount:E,fallbackCount:G.ssrBaseCount,breakpointMap:b$1,dotStyles:de(f)}),[b$1,y,G.ssrBaseCount,f,fe,d?.activeSlotOffset,d?.enabled,d?.loop,w,E]),Ve=C.useMemo(()=>xn(y,I),[y,I]),Pe=C.useRef(null);C.useLayoutEffect(()=>{J(!P),T(null),A(null);},[P,q]),C.useLayoutEffect(()=>{if(!w?.enabled||!H||typeof window>"u")return;let x=null,F=false,pe=()=>{if(F)return;let Y=H.current;if(!Y){x=window.requestAnimationFrame(pe);return}let D=ft(w,window,{requireNavigationRestore:false});if(!D){qe(y),T(null),A(null),J(true);return}T(D.index),A(D.heightPx??null),qe(y);let _e=[w.storageKeyId,D.timestamp,D.index,D.heightPx??""].join(":");if(Pe.current!==_e&&Y.setIndex(D.index,"instant"),Pe.current===_e){J(true);return}if(!Y.isReady()){x=window.requestAnimationFrame(pe);return}if(!H.current?.isReady()){x=window.requestAnimationFrame(pe);return}Pe.current=_e,x=window.requestAnimationFrame(()=>{x=null,!F&&(H.current?.setIndex(D.index,"instant"),x=window.requestAnimationFrame(()=>{x=null,!F&&(x=window.requestAnimationFrame(()=>{x=null,F||J(true);}));}));});};return pe(),()=>{F=true,x!=null&&window.cancelAnimationFrame(x),qe(y);}},[y,H,w]),C.useEffect(()=>{if(!w?.enabled||!H||typeof window>"u")return;let x=()=>{let F=H.current;if(!F)return;let Y=F.getViewportNode()?.getBoundingClientRect().height;pt(w,{index:F.getIndex(),slideCount:w.slideCount,skeletonSlotCount:w.skeletonSlotCount,heightPx:Y&&Y>0?Y:void 0});};return window.addEventListener("pagehide",x),window.addEventListener("beforeunload",x),()=>{x(),window.removeEventListener("pagehide",x),window.removeEventListener("beforeunload",x);}},[H,w]);let Gt={position:"relative",width:"100%",minWidth:0,minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height, 320px))",overflow:"hidden",...i,...u?{"--rmg-skel-bg":u}:null,...s!=null?{"--rmg-skel-radius":l(s)}:null,...S?null:n(p)},Te=f&&B?jsxs("div",{"data-rmg-skeleton-scope":y,className:r,style:Gt,"aria-hidden":g?void 0:true,"aria-label":g,role:g?"status":void 0,"aria-live":g?"polite":void 0,children:[G.cssText||Ge||Ve?jsx("style",{dangerouslySetInnerHTML:{__html:[G.cssText,Ge,Ve].filter(Boolean).join(`
40
+ `)}}):null,jsx(Dt,{count:G.ssrBaseCount,maxSlots:fe,activeDotIndex:U??void 0,spec:B,breakpoints:b$1,centerFirst:Ce,hasLeadingSpacer:K,responsiveCssScopeSelector:`[data-rmg-scope="${y}"]`}),Ye?jsx("script",{dangerouslySetInnerHTML:{__html:Ye}}):null]}):null,Xe={containerType:"inline-size",width:"100%"},Yt=f?{minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height, 320px))"}:null;return Te?t===void 0?jsx("div",{"data-rmg-scope":y,style:Xe,children:jsx("div",{"data-rmg-scope-shell":"true",style:{minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height, 320px))"},children:Te})}):jsx("div",{"data-rmg-scope":y,style:Xe,children:jsx(b,{skeletonNode:Te,ready:Se,enabled:M,force:W,timing:O,shellClassName:o,shellStyle:l$1,loadingShellStyle:Yt,contentClassName:a$3,contentStyle:c,contentOwnsWrapperLayout:true,shellDataAttributes:{"data-rmg-scope-shell":"true"},children:t})}):null}export{Ke as Skeleton,Ke as SliderSkeleton,Kt as buildScopedInitialHeightCss,Ke as default};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-motion-gallery",
3
- "version": "2.0.37",
3
+ "version": "2.0.38",
4
4
  "description": "Composable React media gallery primitives for sliders, grids, masonry, fullscreen, video, zoom/pan, and stable skeleton loading",
5
5
  "license": "PolyForm-Noncommercial-1.0.0",
6
6
  "author": "React Motion Gallery",
@@ -142,6 +142,14 @@
142
142
  "types": "./dist/skeleton-base.d.mts",
143
143
  "import": "./dist/skeleton-base.mjs"
144
144
  },
145
+ "./skeleton/cache": {
146
+ "types": "./dist/skeleton-cache.d.mts",
147
+ "import": "./dist/skeleton-cache.mjs"
148
+ },
149
+ "./skeleton/cache/provider": {
150
+ "types": "./dist/skeleton-cache-provider.d.mts",
151
+ "import": "./dist/skeleton-cache-provider.mjs"
152
+ },
145
153
  "./skeleton/slider": {
146
154
  "types": "./dist/skeleton-slider.d.mts",
147
155
  "import": "./dist/skeleton-slider.mjs"
@@ -1,2 +0,0 @@
1
- import {a as a$1}from'./chunk-HK2DPKES.mjs';import {jsx}from'react/jsx-runtime';var h={skelRect:"ge",skelSquare:"ce",skelCircle:"pe",skelGroup:"he",skelRow:"fe",skelCol:"be",skelStack:"ve",skelText:"B",skelTextLine:"ue",skelTile:"ye",skelCardShimmer:"p",rmgSharedSkeletonShimmer:"h",skelShimmer:"C"};var R="68%",W="__NODE_SEL__",se="(font: -apple-system-body) and (-webkit-hyphens: none)";function ae(e){let n=Math.max(1,Math.trunc(e.lines??1)),t=Math.max(0,e.barHeight*e.lineHeight),o=Math.min(Math.max(0,e.barHeight),t),r=Math.max(t-o,0);return {lines:n,lineBoxHeight:t,barHeight:o,leading:r,paddingBlock:r/2,rowGap:r,totalHeight:t*n}}function L(e){let n=Math.max(e.barHeight,Math.floor(e.lineBoxHeight)),t=Math.max(n-e.barHeight,0);return {...e,lineBoxHeight:n,leading:t,paddingBlock:t/2,rowGap:t,totalHeight:n*e.lines}}function v(e,n=a$1){return !e||typeof e!="object"||Array.isArray(e)?false:Object.keys(e).some(t=>S(t,n)!=null)}function k(e,n){let t=Number.isFinite(e)?Math.trunc(e):n;return Math.max(1,t)}function C(e,n){let t=Number.isFinite(e)?Number(e):n;return Math.max(0,t)}function w(e,n){let t=Number.isFinite(e)?Number(e):n;return Math.max(0,t)}function S(e,n=a$1){let t=n[e];if(Number.isFinite(t))return Math.max(0,t);let o=Number(e);return Number.isFinite(o)?Math.max(0,o):null}function c(e){return typeof e=="number"?`${e}px`:e}function b(e){return Array.isArray(e)?e.map(c):c(e)}function le(e){let{barWidths:n,lineCount:t,finalBarWidthFallback:o}=e;return t<=0?[o]:n.length>=t?n.slice(0,t):Array.from({length:t},(r,i)=>i<n.length?n[i]:i===t-1?o:"100%")}function z(e){let n=ce(e.lines,1,e.minWidth,e.breakpointMap),t=ge(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,e.minWidth,e.breakpointMap),o=Se(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,e.minWidth,e.breakpointMap),r=ke(e.lastBarWidth,R,e.minWidth,e.breakpointMap),i=xe(e.barWidth,"100%",e.minWidth,e.breakpointMap),s=e.barWidth==null?Array.from({length:n},(l,u)=>u===n-1?r:"100%"):Array.isArray(i)?i:Array.from({length:n},()=>i);return {lineCount:n,barWidths:le({barWidths:s,lineCount:n,finalBarWidthFallback:e.barWidth==null?r:"100%"}),metrics:ae({barHeight:t,lineHeight:o,lines:n})}}function ue(e,n){return e.lineCount===n.lineCount&&e.metrics.totalHeight===n.metrics.totalHeight&&e.metrics.barHeight===n.metrics.barHeight&&e.metrics.paddingBlock===n.metrics.paddingBlock&&e.metrics.rowGap===n.metrics.rowGap&&e.barWidths.length===n.barWidths.length&&e.barWidths.every((t,o)=>t===n.barWidths[o])}function de(e,n=a$1){return v(e,n)}function pe(e,n=a$1){return v(e,n)}function he(e,n=a$1){return v(e,n)}function me(e,n=a$1){return v(e,n)}function fe(e,n=a$1){return v(e,n)}function A(e,n=1,t=a$1){if(!de(e,t))return [{minWidth:0,lines:k(typeof e=="number"?e:void 0,n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null?null:{minWidth:s,lines:k(typeof i=="number"?i:Number(i),n)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.lines=i.lines:r.push(i),r},[]);return o.length===0?[{minWidth:0,lines:k(void 0,n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,lines:k(void 0,n)}),o)}function E(e,n=0,t=a$1){if(!pe(e,t))return [{minWidth:0,barHeight:C(typeof e=="number"?e:void 0,n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null?null:{minWidth:s,barHeight:C(typeof i=="number"?i:Number(i),n)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.barHeight=i.barHeight:r.push(i),r},[]);return o.length===0?[{minWidth:0,barHeight:C(void 0,n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,barHeight:o[0].barHeight}),o)}function G(e,n=1,t=a$1){if(!he(e,t))return [{minWidth:0,lineHeight:w(typeof e=="number"?e:void 0,n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null?null:{minWidth:s,lineHeight:w(typeof i=="number"?i:Number(i),n)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.lineHeight=i.lineHeight:r.push(i),r},[]);return o.length===0?[{minWidth:0,lineHeight:w(void 0,n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,lineHeight:o[0].lineHeight}),o)}function ce(e,n=1,t=0,o=a$1){let r=A(e,n,o),i=r[0]?.lines??k(void 0,n);for(let s of r)t>=s.minWidth&&(i=s.lines);return i}function ge(e,n=0,t=0,o=a$1){let r=E(e,n,o),i=r[0]?.barHeight??C(void 0,n);for(let s of r)t>=s.minWidth&&(i=s.barHeight);return i}function Se(e,n=1,t=0,o=a$1){let r=G(e,n,o),i=r[0]?.lineHeight??w(void 0,n);for(let s of r)t>=s.minWidth&&(i=s.lineHeight);return i}function xe(e,n="100%",t=0,o=a$1){let r=O(e,n,o),i=r[0]?.barWidth??b(n);for(let s of r)t>=s.minWidth&&(i=s.barWidth);return i}function O(e,n="100%",t=a$1){if(!me(e,t))return [{minWidth:0,barWidth:b(e??n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null||i==null?null:{minWidth:s,barWidth:b(i)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.barWidth=i.barWidth:r.push(i),r},[]);return o.length===0?[{minWidth:0,barWidth:b(n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,barWidth:b(n)}),o)}function D(e,n=R,t=a$1){if(!fe(e,t))return [{minWidth:0,lastBarWidth:c(e??n)}];let o=Object.entries(e).map(([r,i])=>{let s=S(r,t);return s==null||i==null?null:{minWidth:s,lastBarWidth:c(i)}}).filter(r=>!!r).sort((r,i)=>r.minWidth-i.minWidth).reduce((r,i)=>{let s=r[r.length-1];return s&&s.minWidth===i.minWidth?s.lastBarWidth=i.lastBarWidth:r.push(i),r},[]);return o.length===0?[{minWidth:0,lastBarWidth:c(n)}]:(o[0].minWidth>0&&o.unshift({minWidth:0,lastBarWidth:c(n)}),o)}function ke(e,n=R,t=0,o=a$1){let r=D(e,n,o),i=r[0]?.lastBarWidth??c(n);for(let s of r)t>=s.minWidth&&(i=s.lastBarWidth);return i}function be(e){let n=new Set,t=e.breakpointMap??a$1;for(let r of E(e.barHeight,typeof e.barHeight=="number"?e.barHeight:0,t))n.add(r.minWidth);for(let r of A(e.lines,1,t))n.add(r.minWidth);for(let r of G(e.lineHeight,typeof e.lineHeight=="number"?e.lineHeight:1,t))n.add(r.minWidth);let o=e.barWidth!=null?O(e.barWidth,"100%",t):D(e.lastBarWidth,R,t);for(let r of o)n.add(r.minWidth);return Array.from(n).sort((r,i)=>r-i)}function H(e){let n=e.breakpointMap??a$1,t=e.responsiveBy??"viewport",r=be({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:n}).reduce((l,u)=>{let p=z({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,minWidth:u,breakpointMap:n}),m=l[l.length-1];return m&&ue(m.state,p)||l.push({minWidth:u,state:p}),l},[]),i=r[0]?.state??z({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,minWidth:0,breakpointMap:n}),s=r.reduce((l,u)=>Math.max(l,u.state.lineCount),i.lineCount);return {baseState:i,states:r.length?r:[{minWidth:0,state:i}],maxLines:s,usesResponsiveBarCss:r.length>1,baseLines:i.lineCount,baseLastBarWidth:i.barWidths[i.lineCount-1]??R,metrics:i.metrics,responsiveBy:t}}function F(e){let n="renderState"in e?e.renderState:H({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:e.breakpointMap});if(!n.usesResponsiveBarCss)return [];let t=e.selectorPlaceholder??W,o=e.fitContent===true;return n.states.map(({minWidth:r,state:i})=>{let s=`${t} [data-rmg-skel-text-line="true"]`,l=`${s}:nth-child(-n+${i.lineCount})`,u=i.lineCount<n.maxLines?`${s}:nth-child(n+${i.lineCount+1})`:null,p=i.barWidths.map((g,y)=>o?`${s}:nth-child(${y+1}){width:${g} !important;max-width:${g} !important;}`:`${s}:nth-child(${y+1}){max-width:${g} !important;}`),m=o?`${l}{display:block !important;max-width:100% !important;}`:`${l}{display:block !important;width:100% !important;max-width:100% !important;}`,x=L(i.metrics);return {minWidth:r,query:n.responsiveBy,css:[`${t}{height:${i.metrics.totalHeight}px !important;padding-block:${i.metrics.paddingBlock}px !important;row-gap:${i.metrics.rowGap}px !important;}`,`@supports ${se}{${t}{height:${x.totalHeight}px !important;padding-block:${x.paddingBlock}px !important;row-gap:${x.rowGap}px !important;}}`,`${s}{display:none !important;height:${i.metrics.barHeight}px !important;}`,m,...u?[`${u}{display:none !important;}`]:[],...p].join("")}})}function V(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function Re(e,n=a$1){let t=n[e];if(Number.isFinite(t))return Math.max(0,t);let o=Number(e);return Number.isFinite(o)?Math.max(0,o):null}function B(e,n=a$1){if(!V(e))return {baseStyle:e,rules:[]};let t={},o=new Map;for(let[r,i]of Object.entries(e)){let s=Re(r,n);if(s!=null&&V(i)){o.set(s,{...o.get(s)??{},...i});continue}t[r]=i;}return {baseStyle:Object.keys(t).length?t:void 0,rules:Array.from(o.entries()).sort((r,i)=>r[0]-i[0]).map(([r,i])=>({minWidth:r,style:i}))}}function P(e,n,t=a$1){let{baseStyle:o,rules:r}=B(e,t),i={...o??{}};for(let s of r){if(s.minWidth>n)break;Object.assign(i,s.style);}return Object.keys(i).length?i:void 0}function J(e,n=a$1){let{baseStyle:t,rules:o}=B(e,n);if(!t)return;if(!o.length)return t;let r=new Set;for(let s of o)for(let l of Object.keys(s.style))r.add(l);let i={};for(let[s,l]of Object.entries(t))r.has(s)||(i[s]=l);return Object.keys(i).length?i:void 0}function Y(e,n,t=a$1){let{rules:o}=B(e,t);for(let r of o)r.minWidth>0&&n.add(r.minWidth);}function ee(e){let n=e.breakpointMap??a$1,t=e.selector??W,o=[],{rules:r}=B(e.value,n);if(!r.length)return [];let i=new Set([0]);for(let s of r)i.add(s.minWidth);for(let s of Array.from(i).sort((l,u)=>l-u)){let l=P(e.value,s,n),u=l?e.serialize(l):"";u&&o.push({minWidth:s,css:`${t}{${u}}`,raw:true});}return o}function a(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function ne(e){if(!e)return {};let n=a(e.margin),t=a(e.marginTop),o=a(e.marginRight),r=a(e.marginBottom),i=a(e.marginLeft),s={};return n!=null&&(s.margin=n),t!=null&&(s.marginTop=t),o!=null&&(s.marginRight=o),r!=null&&(s.marginBottom=r),i!=null&&(s.marginLeft=i),s}function _(e,n){n&&(n.flex!=null&&(e.flex=n.flex),n.flexGrow!=null&&(e.flexGrow=n.flexGrow),n.flexShrink!=null&&(e.flexShrink=n.flexShrink),n.flexBasis!=null&&(e.flexBasis=a(n.flexBasis)),n.order!=null&&(e.order=n.order),n.alignSelf&&(e.alignSelf=n.alignSelf),n.boxSizing!=null&&(e.boxSizing=n.boxSizing));}function j(e,n){n&&(n.flex!=null&&e.push(`flex:${n.flex};`),n.flexGrow!=null&&e.push(`flex-grow:${n.flexGrow};`),n.flexShrink!=null&&e.push(`flex-shrink:${n.flexShrink};`),n.flexBasis!=null&&e.push(`flex-basis:${a(n.flexBasis)};`),n.order!=null&&e.push(`order:${n.order};`),n.alignSelf&&e.push(`align-self:${n.alignSelf};`),n.boxSizing!=null&&e.push(`box-sizing:${n.boxSizing};`));}function te(e,n){let t={};e?.aspectRatio!=null&&(t.aspectRatio=e.aspectRatio);let o=a(e?.width),r=a(e?.minWidth),i=a(e?.maxWidth),s=a(e?.height),l=a(e?.minHeight),u=a(e?.maxHeight);return o!=null&&(t.inlineSize=o,t.width=o),r!=null&&(t.minInlineSize=r,t.minWidth=r),i!=null&&(t.maxInlineSize=i,t.maxWidth=i),s!=null&&(t.height=s),l!=null&&(t.minHeight=l),u!=null&&(t.maxHeight=u),e?.aspectRatio!=null&&e?.height==null&&(t.height="auto"),e?.aspectRatio!=null&&e?.width==null&&e?.height==null&&(t.inlineSize="100%",t.width="100%",t.height="auto"),e?.backgroundColor&&(t["--rmg-skel-bg"]=e.backgroundColor),e?.borderRadius!=null&&(t["--rmg-skel-radius"]=a(e.borderRadius)),e?.overflow!=null&&(t.overflow=e.overflow),_(t,e),e?.scale!=null&&(t.transform=`scale(${e.scale})`),Object.assign(t,Te(n)),t}function I(e,n){let t=a(n?.margin),o=a(n?.marginTop),r=a(n?.marginRight),i=a(n?.marginBottom),s=a(n?.marginLeft);t!=null&&e.push(`margin:${t};`),o!=null&&e.push(`margin-top:${o};`),r!=null&&e.push(`margin-right:${r};`),i!=null&&e.push(`margin-bottom:${i};`),s!=null&&e.push(`margin-left:${s};`);}function We(e){if(!e)return "";let n=[],t=a(e.width),o=a(e.minWidth),r=a(e.maxWidth),i=a(e.height),s=a(e.minHeight),l=a(e.maxHeight);return e.aspectRatio!=null&&n.push(`aspect-ratio:${String(e.aspectRatio)};`),t!=null&&(n.push(`inline-size:${t};`),n.push(`width:${t};`)),o!=null&&(n.push(`min-inline-size:${o};`),n.push(`min-width:${o};`)),r!=null&&(n.push(`max-inline-size:${r};`),n.push(`max-width:${r};`)),i!=null&&n.push(`height:${i};`),s!=null&&n.push(`min-height:${s};`),l!=null&&n.push(`max-height:${l};`),e.aspectRatio!=null&&e.height==null&&n.push("height:auto;"),e.aspectRatio!=null&&e.width==null&&e.height==null&&(n.push("inline-size:100%;"),n.push("width:100%;"),n.push("height:auto;")),e.backgroundColor&&n.push(`--rmg-skel-bg:${e.backgroundColor};`),e.borderRadius!=null&&n.push(`--rmg-skel-radius:${a(e.borderRadius)};`),e.overflow!=null&&n.push(`overflow:${e.overflow};`),j(n,e),e.scale!=null&&n.push(`transform:scale(${e.scale});`),I(n,e),n.join("")}function ve(e){if(!e)return "";let n=[],t=a(e.width),o=a(e.minWidth),r=a(e.maxWidth);return t!=null&&(n.push(`inline-size:${t};`),n.push(`width:${t};`)),o!=null&&(n.push(`min-inline-size:${o};`),n.push(`min-width:${o};`)),r!=null&&(n.push(`max-inline-size:${r};`),n.push(`max-width:${r};`)),j(n,e),e.scale!=null&&n.push(`transform:scale(${e.scale});`),I(n,e),n.join("")}function Be(e){if(!e)return "";let n=[];return e.backgroundColor&&n.push(`--rmg-skel-bg:${e.backgroundColor};`),e.borderRadius!=null&&n.push(`--rmg-skel-radius:${a(e.borderRadius)};`),n.join("")}function Te(e,n){let t={},o=n?.enabledVarName??"--rmg-skel-shimmer-enabled";return e?.enabled===false&&(t[o]="0"),e?.durationMs!=null&&(t["--rmg-skel-shimmer-duration"]=`${e.durationMs}ms`),e?.angleDeg!=null&&(t["--rmg-skel-shimmer-angle"]=`${e.angleDeg}deg`),e?.opacity!=null&&(t["--rmg-skel-shimmer-opacity"]=String(e.opacity)),e?.blurPx!=null&&(t["--rmg-skel-shimmer-blur"]=`${e.blurPx}px`,t["--rmg-skel-shimmer-filter"]=e.blurPx>0?`blur(${e.blurPx}px)`:"none"),e?.timing&&(t["--rmg-skel-shimmer-timing"]=e.timing),e?.c1&&(t["--rmg-skel-shimmer-c1"]=e.c1),e?.c2&&(t["--rmg-skel-shimmer-c2"]=e.c2),e?.c3&&(t["--rmg-skel-shimmer-c3"]=e.c3),t}function q(e,n){let t={};n!=null&&(t.height=`${n}px`);let o=a(e?.width),r=a(e?.minWidth),i=a(e?.maxWidth);return o!=null&&(t.inlineSize=o,t.width=o),r!=null&&(t.minInlineSize=r,t.minWidth=r),i!=null&&(t.maxInlineSize=i,t.maxWidth=i),_(t,e),e?.scale!=null&&(t.transform=`scale(${e.scale})`),t}function N(e){return typeof e=="string"&&e.trim()==="max-content"}function Ce(e){return !e||typeof e!="object"?false:N(e.width)?true:Object.values(e).some(t=>!!t&&typeof t=="object"&&N(t.width))}function Ae(e){let n=te(e,void 0);return delete n["--rmg-skel-bg"],e?.backgroundColor!=null&&(n.backgroundColor=e.backgroundColor),e?.padding!=null&&(n.padding=a(e.padding)),e?.border!=null&&(n.border=e.border),e?.boxShadow!=null&&(n.boxShadow=e.boxShadow),e?.borderRadius!=null?(n.borderRadius=a(e.borderRadius),n.overflow=e?.overflow??"hidden"):e?.overflow!=null&&(n.overflow=e.overflow),n.boxSizing="border-box",n}function K(e){let n={};return e&&(e.position!=null&&(n.position=e.position),e.inset!=null&&(n.inset=a(e.inset)),e.insetBlock!=null&&(n.insetBlock=a(e.insetBlock)),e.insetInline!=null&&(n.insetInline=a(e.insetInline)),e.top!=null&&(n.top=a(e.top)),e.right!=null&&(n.right=a(e.right)),e.bottom!=null&&(n.bottom=a(e.bottom)),e.left!=null&&(n.left=a(e.left)),e.zIndex!=null&&(n.zIndex=e.zIndex),e.display!=null&&(n.display=e.display),e.flexDirection!=null&&(n.flexDirection=e.flexDirection),e.gap!=null&&(n.gap=a(e.gap)),e.rowGap!=null&&(n.rowGap=a(e.rowGap)),e.columnGap!=null&&(n.columnGap=a(e.columnGap)),e.padding!=null&&(n.padding=a(e.padding)),(e.align??e.alignItems)&&(n.alignItems=e.alignItems??e.align),e.alignContent!=null&&(n.alignContent=e.alignContent),(e.justify??e.justifyContent)&&(n.justifyContent=e.justifyContent??e.justify),e.aspectRatio!=null&&(n.aspectRatio=e.aspectRatio),e.flexWrap!=null?n.flexWrap=e.flexWrap:e.wrap&&(n.flexWrap="wrap"),e.width!=null&&(n.width=a(e.width)),e.minWidth!=null&&(n.minWidth=a(e.minWidth)),e.maxWidth!=null&&(n.maxWidth=a(e.maxWidth)),e.height!=null&&(n.height=a(e.height)),e.minHeight!=null&&(n.minHeight=a(e.minHeight)),e.maxHeight!=null&&(n.maxHeight=a(e.maxHeight)),e.aspectRatio!=null&&e.height==null&&(n.height="auto"),e.backgroundColor!=null&&(n.backgroundColor=e.backgroundColor),e.borderRadius!=null&&(n.borderRadius=a(e.borderRadius)),e.border!=null&&(n.border=e.border),e.boxShadow!=null&&(n.boxShadow=e.boxShadow),e.margin!=null&&(n.margin=a(e.margin)),e.marginTop!=null&&(n.marginTop=a(e.marginTop)),e.marginRight!=null&&(n.marginRight=a(e.marginRight)),e.marginBottom!=null&&(n.marginBottom=a(e.marginBottom)),e.marginLeft!=null&&(n.marginLeft=a(e.marginLeft)),_(n,e),e.overflow!=null&&(n.overflow=e.overflow),e.transform!=null&&(n.transform=e.transform),e.pointerEvents!=null&&(n.pointerEvents=e.pointerEvents),e.opacity!=null&&(n.opacity=e.opacity)),n}function we(e,n=a$1){return B(e,n).rules.length>0}function He(e,n=0,t=a$1){return P(e,n,t)}function Ee(e,n=0,t=a$1){return P(e,n,t)}function ie(e,n=a$1){return J(e,n)}function X(e,n=a$1){return J(e,n)}function Ge(e,n,t=a$1){Y(e,n,t);}function U(e){return e.replace(/"/g,'\\"')}function ye(e){let n=[];return e.position!=null&&n.push(`position:${e.position};`),e.inset!=null&&n.push(`inset:${a(e.inset)};`),e.insetBlock!=null&&n.push(`inset-block:${a(e.insetBlock)};`),e.insetInline!=null&&n.push(`inset-inline:${a(e.insetInline)};`),e.top!=null&&n.push(`top:${a(e.top)};`),e.right!=null&&n.push(`right:${a(e.right)};`),e.bottom!=null&&n.push(`bottom:${a(e.bottom)};`),e.left!=null&&n.push(`left:${a(e.left)};`),e.zIndex!=null&&n.push(`z-index:${e.zIndex};`),e.display!=null&&n.push(`display:${e.display};`),e.flexDirection!=null&&n.push(`flex-direction:${e.flexDirection};`),e.gap!=null&&n.push(`gap:${a(e.gap)};`),e.rowGap!=null&&n.push(`row-gap:${a(e.rowGap)};`),e.columnGap!=null&&n.push(`column-gap:${a(e.columnGap)};`),e.padding!=null&&n.push(`padding:${a(e.padding)};`),(e.align??e.alignItems)&&n.push(`align-items:${e.alignItems??e.align};`),e.alignContent!=null&&n.push(`align-content:${e.alignContent};`),(e.justify??e.justifyContent)&&n.push(`justify-content:${e.justifyContent??e.justify};`),e.aspectRatio!=null&&n.push(`aspect-ratio:${String(e.aspectRatio)};`),e.flexWrap!=null?n.push(`flex-wrap:${e.flexWrap};`):e.wrap&&n.push("flex-wrap:wrap;"),e.width!=null&&n.push(`width:${a(e.width)};`),e.minWidth!=null&&n.push(`min-width:${a(e.minWidth)};`),e.maxWidth!=null&&n.push(`max-width:${a(e.maxWidth)};`),e.height!=null&&n.push(`height:${a(e.height)};`),e.minHeight!=null&&n.push(`min-height:${a(e.minHeight)};`),e.maxHeight!=null&&n.push(`max-height:${a(e.maxHeight)};`),e.aspectRatio!=null&&e.height==null&&n.push("height:auto;"),e.backgroundColor!=null&&n.push(`background-color:${e.backgroundColor};`),e.borderRadius!=null&&n.push(`border-radius:${a(e.borderRadius)};`),e.border!=null&&n.push(`border:${e.border};`),e.boxShadow!=null&&n.push(`box-shadow:${e.boxShadow};`),I(n,e),j(n,e),e.overflow!=null&&n.push(`overflow:${e.overflow};`),e.transform!=null&&n.push(`transform:${e.transform};`),e.pointerEvents!=null&&n.push(`pointer-events:${e.pointerEvents};`),e.opacity!=null&&n.push(`opacity:${e.opacity};`),n.join("")}function $(e){return ee({value:e.style,breakpointMap:e.breakpointMap,selector:e.selector,serialize:ye})}function Q(e){return ee({value:e.style,breakpointMap:e.breakpointMap,selector:e.selector,serialize:We})}function Le(e){let n=e.breakpointMap??a$1;if(!we(e.style,n))return [];let t=e.selector??W,o=[],r=new Set([0]);Y(e.style,r,n);for(let i of Array.from(r).sort((s,l)=>s-l)){let s=He(e.style,i,n),l=ve(s),u=Be(s),p=[l?`${t}{${l}}`:"",u?`${t} [data-rmg-skel-text-line="true"]{${u}}`:""].filter(Boolean).join("");p&&o.push({minWidth:i,css:p,raw:true});}return o}function M(e,n,t,o,r=a$1){if(e.kind===o){let i=e,s=$({style:i.style,breakpointMap:r}),l=s.length?n():void 0;l&&s.length&&t.push({nodeId:l,rules:s});let u=M(i.item,n,t,o,r),p=Array.isArray(i.slots)?i.slots.map(m=>({...m,item:m?.item?M(m.item,n,t,o,r):m?.item})):void 0;return {...i,...l?{__rmgNodeId:l}:null,item:u,...p?{slots:p}:null}}switch(e.kind){case "rect":case "square":case "circle":{let i=e,s=Q({style:i.style,breakpointMap:r});if(!s.length)return e;let l=n();return t.push({nodeId:l,rules:s}),{...i,__rmgNodeId:l}}case "text":{let i=e,s=i.__rmgTextRenderState??H({barHeight:i.barHeight,barWidth:i.barWidth,lineHeight:i.lineHeight,lines:i.lines,lastBarWidth:i.lastBarWidth,responsiveBy:i.responsiveBy,breakpointMap:r}),l=[...F({renderState:s,fitContent:Ce(i.style)}).map(p=>({...p,raw:true})),...Le({style:i.style,breakpointMap:r})];if(!l.length&&!i.__rmgTextRenderState)return e;let u=l.length?n():void 0;return u&&l.length&&t.push({nodeId:u,rules:l}),{...i,...u?{__rmgNodeId:u}:null,__rmgTextRenderState:s}}case "media":{let i=e,s=[...$({style:i.style,breakpointMap:r}),...Q({style:i.tile?.style,breakpointMap:r,selector:`${W} [data-rmg-skel-media-tile="true"]`})];if(!s.length)return e;let l=n();return t.push({nodeId:l,rules:s}),{...e,__rmgNodeId:l}}case "stack":case "row":case "col":{let i=e,s=$({style:i.style,breakpointMap:r}),l=s.length?n():void 0;l&&s.length&&t.push({nodeId:l,rules:s});let u=i.children.map(p=>M(p,n,t,o,r));return {...i,...l?{__rmgNodeId:l}:null,children:u}}default:return e}}function Oe(e){if(!e.rules.length)return "";let n=`[${e.scopeAttr}="${U(e.scopeId)}"]`,t=[];for(let o of e.rules){let r=`${n} [data-rmg-skel-node="${U(o.nodeId)}"]`;for(let i of o.rules){let s=i.raw?i.css.split("__NODE_SEL__").join(r):`${r}{${i.css}}`;i.minWidth<=0?t.push(s):i.query==="container"?t.push(`@container (min-width:${i.minWidth}px){${s}}`):t.push(`@media (min-width:${i.minWidth}px){${s}}`);}}return t.join(`
2
- `)}function re(e,n,t){return te(e,t?void 0:n)}function Z(e){let{kind:n,style:t,shimmer:o,disableShimmer:r,breakpointMap:i,mediaTile:s}=e,l=n==="circle"?h.skelCircle:n==="square"?h.skelSquare:h.skelRect,u=ie(t,i),p=e.__rmgNodeId;return jsx("div",{"data-rmg-skel-node":p,"data-rmg-skel-media-tile":s?"true":void 0,className:[h.skelTile,l,r?null:h.skelShimmer].filter(Boolean).join(" "),style:{...re(u,o,r),...ne(u)}})}function $e({node:e,disableShimmer:n,breakpointMap:t}){let o=e.__rmgTextRenderState??H({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:t}),r=ie(e.style,t),i=e.__rmgNodeId,s=o.responsiveBy==="container"&&o.usesResponsiveBarCss,l=L(o.baseState.metrics),u=q(s?void 0:r,o.baseState.metrics.totalHeight),p=ne(r),m={height:o.baseState.metrics.barHeight,backgroundColor:r?.backgroundColor,borderRadius:r?.borderRadius},x=N(r?.width),g=jsx("div",{"data-rmg-skel-node":i,"data-rmg-skel-text":"true",className:h.skelText,style:{...u,...s?null:p,paddingBlock:`${o.baseState.metrics.paddingBlock}px`,rowGap:`${o.baseState.metrics.rowGap}px`,"--rmg-skel-text-safari-height":`${l.totalHeight}px`,"--rmg-skel-text-safari-padding-block":`${l.paddingBlock}px`,"--rmg-skel-text-safari-row-gap":`${l.rowGap}px`},children:Array.from({length:o.maxLines}).map((y,T)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[h.skelTile,n?null:h.skelShimmer,h.skelTextLine].filter(Boolean).join(" "),style:{...re(m,e.shimmer,n),display:T>=o.baseState.lineCount?"none":void 0,width:x?o.baseState.barWidths[T]??"100%":"100%",maxWidth:o.baseState.barWidths[T]??"100%"}},T))});return s?jsx("div",{"data-rmg-skel-text-container":"true",style:{...q(r),...p,containerType:"inline-size"},children:g}):g}function Me({node:e,disableShimmer:n,breakpointMap:t}){let o=t??a$1;switch(e.kind){case "rect":case "square":case "circle":return jsx(Z,{...e,disableShimmer:n,breakpointMap:o});case "media":{let r=Math.max(0,e.count|0),i=e.direction??"row",s=e.tile?.shape??"rect",l=e.__rmgNodeId,u=K(X(e.style,o));return jsx("div",{"data-rmg-skel-node":l,className:[h.skelGroup,i==="row"?h.skelRow:h.skelCol].join(" "),style:u,children:Array.from({length:r}).map((p,m)=>jsx(Z,{kind:s,style:e.tile?.style,shimmer:e.tile?.shimmer,disableShimmer:n,breakpointMap:o,mediaTile:true},m))})}case "stack":case "row":case "col":{let r=e.kind==="row"?h.skelRow:e.kind==="col"?h.skelCol:h.skelStack,i=e.__rmgNodeId,s=K(X(e.style,o));return jsx("div",{"data-rmg-skel-node":i,className:[h.skelGroup,r].join(" "),style:s,children:e.children.map((l,u)=>jsx(Me,{node:l,disableShimmer:n,breakpointMap:o},u))})}case "text":return jsx($e,{node:e,disableShimmer:n,breakpointMap:o});default:return null}}export{Oe as A,Me as B,h as a,W as b,se as c,ae as d,L as e,ce as f,ge as g,Se as h,be as i,H as j,F as k,a as l,ne as m,Te as n,Ae as o,K as p,He as q,Ee as r,ie as s,X as t,Ge as u,U as v,$ as w,Q as x,Le as y,M as z};
@@ -1 +0,0 @@
1
- import {A,z,n,l,B}from'./chunk-4BTS6IIA.mjs';import {a as a$1,d as d$1,e,b,c}from'./chunk-Z34PSRMG.mjs';import {a as a$3}from'./chunk-UUAWLGWO.mjs';import {a}from'./chunk-LVYED5ZM.mjs';import {a as a$2}from'./chunk-HK2DPKES.mjs';import*as d from'react';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var o={shell:"Ue",contentLayer:"y",loadingLayer:"x",contentLayerVisible:"Ve",contentLayerBlocked:"We",loadingLayerOverlay:"er",loadingLayerCompare:"rr",loadingLayerExit:"ir"};function O(...e){return e.filter(Boolean).join(" ")}function Q({skeletonNode:e$1,children:S,ready:v,enabled:c$1=true,force:u,timing:R,shellClassName:M,shellStyle:N,loadingShellStyle:b$1,contentClassName:p,contentStyle:y,contentOwnsWrapperLayout:a$2,loadingLayerFirst:s,contentWrapper:i,shellDataAttributes:w}){let f=S!==void 0,x=a(),m=v===true,r=a$1(u),n=f&&c$1&&(r.enabled||!m),l=d.useMemo(()=>d$1({prefersReducedMotion:x,timing:R}),[x,R]),{showLoadingLayer:C,loadingExiting:k}=e({loadingActive:n,exitMs:l.exitMs,minVisibleMs:l.minVisibleMs}),t=d.useMemo(()=>b({loadingActive:n,loadingForced:u,contentReady:m}),[m,u,n]),P=d.useMemo(()=>c({exitMs:l.exitMs,compareMode:t.compareMode,loadingLayerOpacity:t.loadingLayerOpacity,opacityVarName:"--rmg-standalone-skeleton-opacity"}),[l.exitMs,t.compareMode,t.loadingLayerOpacity]);if(!f)return jsx(Fragment,{children:e$1});let L=c$1&&C,h=!c$1||t.compareMode||k||!L,T=c$1&&t.contentBlocked&&!k&&!a$2,G=i?i(S):S,B=L?jsx("div",{className:O(o.loadingLayer,a$2&&o.loadingLayerOverlay,t.compareMode&&o.loadingLayerCompare,k&&o.loadingLayerExit),style:P,"data-rmg-skeleton-loading-layer":"true",children:e$1}):null;return jsxs("div",{className:O(o.shell,M),style:{...L?b$1:null,...N},"aria-busy":n?true:void 0,"data-rmg-skeleton-wrapper":"true","data-rmg-skeleton-ready":m?"true":"false","data-rmg-skeleton-compare":t.compareMode?"true":"false","data-rmg-skeleton-layout-owner":a$2?"content":"skeleton",...w,children:[s?B:null,jsx("div",{className:O(o.contentLayer,h&&o.contentLayerVisible,T&&o.contentLayerBlocked,p),style:{"--rmg-loading-fade-duration":`${l.exitMs}ms`,...y},"aria-hidden":h?void 0:true,"data-rmg-skeleton-content-layer":"true",children:G}),s?null:B]})}function ie({layout:e,children:S,breakpoints:v,className:c,style:u,shellClassName:R,shellStyle:M,contentClassName:N,contentStyle:b,backgroundColor:p,radius:y,shimmer:a,disableShimmer:s,ariaLabel:i,ready:w,enabled:f,force:x,timing:m}){let r=d.useMemo(()=>({...a$2,...v??{}}),[v]),n$1=d.useMemo(()=>a$3("skel_",{layout:e,breakpoints:r,backgroundColor:p,radius:y,shimmer:a,disableShimmer:s}),[e,r,p,y,a,s]),{layout:l$1,responsiveCss:C}=d.useMemo(()=>{let P=0,L=()=>`n${++P}`,h=[];return {layout:z(e,L,h,"__standalone__",r),responsiveCss:A({scopeAttr:"data-rmg-skeleton-scope",scopeId:n$1,rules:h})}},[e,n$1,r]),k={...u,...p?{"--rmg-skel-bg":p}:null,...y!=null?{"--rmg-skel-radius":l(y)}:null,...s?null:n(a)};return jsx(Q,{skeletonNode:jsxs("div",{"data-rmg-skeleton-scope":n$1,className:c,style:k,"aria-hidden":i?void 0:true,"aria-label":i,role:i?"status":void 0,"aria-live":i?"polite":void 0,children:[C?jsx("style",{dangerouslySetInnerHTML:{__html:C}}):null,jsx(B,{node:l$1,disableShimmer:s,breakpointMap:r})]}),ready:w,enabled:f,force:x,timing:m,shellClassName:R,shellStyle:M,contentClassName:N,contentStyle:b,children:S})}export{Q as a,ie as b};
@@ -1,4 +0,0 @@
1
- import {p,t,v as v$1,c as c$1,u,i,z,A,q as q$1,r,j as j$1,e as e$1,f,g,d,h}from'./chunk-4BTS6IIA.mjs';import {a,c,e}from'./chunk-HK2DPKES.mjs';import*as F from'react';import {jsx}from'react/jsx-runtime';var ln=Object.assign(function({children:e}){return F.createElement(F.Fragment,null,e)},{__rmgMasonryItem:true,displayName:"Masonry.Item"});function $e(t,e){let n=e[t];if(typeof n=="number"&&Number.isFinite(n))return n;let r=parseFloat(t);return Number.isNaN(r)?0:r}function Zt(t){if(t==="full")return t;if(!(typeof t!="number"||!Number.isFinite(t)))return Math.max(1,t|0)}function Fe(t){let e=F.Children.toArray(t);return e.length===0?null:e.length===1?e[0]??null:F.createElement(F.Fragment,null,t)}function He(t){return F.isValidElement(t)&&!!t.type?.__rmgMasonryItem}function un(t){if(!He(t))return {node:t};let e={span:t.props.span,className:t.props.className,style:t.props.style};return {node:Fe(t.props.children),layoutMeta:e}}function Be(t){return !!t&&typeof t=="object"&&!Array.isArray(t)}function gt(t,e){if(!Be(t)){let r=Zt(t);return r==null?[]:[{minWidth:0,span:r}]}let n=Object.entries(t).map(([r,i])=>({minWidth:$e(r,e),span:Zt(i)})).filter(r=>r.span!=null).sort((r,i)=>r.minWidth-i.minWidth);return n.length===0?[]:(n[0].minWidth>0?n.unshift({minWidth:0,span:n[0].span}):n[0].minWidth<0&&(n[0]={...n[0],minWidth:0}),n)}function Te(t,e){let n=Math.max(1,e|0);return t==="full"?n:typeof t!="number"||!Number.isFinite(t)?1:Math.max(1,Math.min(n,t|0))}function Gt(t){let{span:e,columnCount:n,width:r,breakpointMap:i}=t,s=gt(e,i);if(!s.length)return 1;let a=s[0].span;for(let o of s)if(r>=o.minWidth)a=o.span;else break;return Te(a,n)}var tt=240,ue=[55,90,130,75];function pe(t){return t!=null&&Number.isFinite(t)?[{minWidth:0,value:t}]:[]}function Ie(t){return t!=null&&Number.isFinite(t)?t:void 0}function Ae(){return {ratios:[...ue],radius:12}}function B(t){return `${Math.max(0,t)}px`}function I(t){return `calc(${t})`}function Yt(t){let e=t.trim();for(;e.startsWith("(")&&e.endsWith(")");){let n=0,r=true;for(let i=0;i<e.length;i++){let s=e[i];if(s==="("&&(n+=1),s===")"&&(n-=1),n===0&&i<e.length-1){r=false;break}if(n<0){r=false;break}}if(!r||n!==0)break;e=e.slice(1,-1).trim();}return e}function ce(t){let e=Yt(t);return e.startsWith("calc(")&&e.endsWith(")")?Yt(e.slice(5,-1).trim()):e}function j(t){return `(${ce(t)})`}function Y(t){let e=ce(t);if(!e)return null;let n=e.match(/^(-?\d*\.?\d+)([a-zA-Z%]+)?$/);if(!n)return null;let r=Number(n[1]);return Number.isFinite(r)?{value:r,unit:n[2]??null}:null}function Ve(t){let e=Y(t);return e!=null&&e.value===0}function mt(t,e,n){return Number.isFinite(t)?t===0&&n?.preferPxForZero?"0px":e?`${t}${e}`:`${t}`:e?`0${e}`:"0"}function b(t){let e=t.filter(Boolean);if(!e.length)return "0px";let n=[],r=0;for(let i of e){let s=Y(i);if(!s){n.push(i);continue}if(s.unit==="px"||s.unit==null&&s.value===0){r+=s.value;continue}n.push(i);}return (r!==0||!n.length&&r===0)&&n.push(mt(r,"px",{preferPxForZero:true})),n.length===1?n[0]:I(n.map(j).join(" + "))}function Nt(t,e){if(Ve(e))return t;let n=Y(t),r=Y(e);return n&&r&&(n.unit===r.unit&&n.unit!=null||n.unit==="px"&&r.unit==null&&r.value===0||r.unit==="px"&&n.unit==null&&n.value===0||n.unit==null&&r.unit==null)?mt(n.value-r.value,n.unit??r.unit,{preferPxForZero:(n.unit??r.unit)==="px"}):I(`${j(t)} - ${j(e)}`)}function v(t,e){if(!Number.isFinite(e))return I(`${j(t)} * ${e}`);if(e===0)return "0px";if(e===1)return t;let n=Y(t);return n?mt(n.value*e,n.unit,{preferPxForZero:n.unit==="px"}):I(`${j(t)} * ${e}`)}function Ut(t,e){if(!Number.isFinite(e)||e===0)return I(`${j(t)} / ${e}`);if(e===1)return t;let n=Y(t);return n?mt(n.value/e,n.unit,{preferPxForZero:n.unit==="px"}):I(`${j(t)} / ${e}`)}function de(t){let e=t.filter(Boolean);return e.length?e.length===1?e[0]:`max(${e.join(", ")})`:"0px"}function Xt(t,e){if(!t)return [];if(typeof t=="number")return [];if(typeof t=="string")return [];if(typeof t!="object")return [];let n=[];for(let[i,s]of Object.entries(t)){let a=Number(s);if(!Number.isFinite(a))continue;if(String(+i)===i){let l=+i;Number.isFinite(l)&&l>=0&&n.push({minWidth:l,value:a});continue}let o=e?.[i];typeof o=="number"&&Number.isFinite(o)&&n.push({minWidth:o,value:a});}n.sort((i,s)=>i.minWidth-s.minWidth);let r=[];for(let i of n){let s=r[r.length-1];s&&s.minWidth===i.minWidth?s.value=i.value:r.push(i);}return r}function Jt(t,e,n){if(t==null)return n;if(typeof t=="number")return t;if(typeof t=="string"){let r=Number(t);return Number.isFinite(r)?r:n}return e.length?e[0].value:n}function Qt(t,e,n){let r=n;for(let i of t)if(i.minWidth<=e)r=i.value;else break;return r}function Oe(t,e){if(!(!t&&!e))return {...t||{},...e||{}}}function L(t,e){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?t:null;let n=t.trim();if(!n)return null;if(n.endsWith("%")){let i=Number(n.slice(0,-1));return !Number.isFinite(i)||e==null?null:e*i/100}let r=parseFloat(n);return Number.isFinite(r)?r:null}function T(t,e){if(t==null)return null;if(typeof t=="number")return B(t);let n=t.trim();if(!n)return null;if(n.endsWith("%")){let r=Number(n.slice(0,-1));return !Number.isFinite(r)||!e?null:v(e,r/100)}return n}function me(t){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)&&t>0?t:null;let e=t.replace(/\s+/g,"");if(!e)return null;if(e.includes("/")){let[r,i]=e.split("/"),s=Number(r),a=Number(i);return Number.isFinite(s)&&Number.isFinite(a)&&s>0&&a>0?s/a:null}let n=parseFloat(e);return Number.isFinite(n)&&n>0?n:null}function et(t,e,n){if(t==null)return 0;let r=t.toString().trim().split(/\s+/).map(i=>L(i,n)).filter(i=>Number.isFinite(i));return r.length?r.length===1?r[0]*2:r.length===2?e==="block"?r[0]*2:r[1]*2:r.length===3?e==="block"?r[0]+r[2]:r[1]*2:e==="block"?r[0]+r[2]:r[1]+r[3]:0}function nt(t,e,n){if(t==null)return null;let r=t.toString().trim().split(/\s+/).map(i=>T(i,n)).filter(Boolean);return r.length?r.length===1?v(r[0],2):r.length===2?v(e==="block"?r[0]:r[1],2):r.length===3?e==="block"?b([r[0],r[2]]):v(r[1],2):b(e==="block"?[r[0],r[2]]:[r[1],r[3]]):null}function he(t){if(typeof t!="string")return 0;let e=t.trim().split(/\s+/)[0],n=L(e);return n!=null?n*2:0}function fe(t){return he(t)}function xe(t){if(typeof t!="string")return null;let e=t.trim().split(/\s+/)[0],n=T(e);return n?v(n,2):null}function _e(t){return xe(t)}function q(t,e){return (L(t?.marginTop,e)??0)+(L(t?.marginBottom,e)??0)}function Z(t,e){let n=T(t?.marginTop,e),r=T(t?.marginBottom,e);return !n&&!r?null:b([n??"0px",r??"0px"])}function te(t,e){return t?q(t,e)+et(t.padding,"block",e)+he(t.border):0}function ee(t,e){return t?b([Z(t,e)??"0px",nt(t.padding,"block",e)??"0px",xe(t.border)??"0px"]):null}function ye(t,e){return t==null?null:Math.max(0,t-et(e?.padding,"inline",t)-fe(e?.border))}function je(t,e){if(!t)return null;let n=nt(e?.padding,"inline",t),r=_e(e?.border);return !n&&!r?t:Nt(t,b([n??"0px",r??"0px"]))}function wt(t,e){return {slope:t.slope*e,intercept:t.intercept*e}}function be(t,e){return {slope:t.slope,intercept:t.intercept-e}}function ge(t,e){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?{slope:0,intercept:t}:null;let n=t.trim();if(!n)return null;if(n.endsWith("%")){let i=Number(n.slice(0,-1));return Number.isFinite(i)?wt(e,i/100):null}let r=parseFloat(n);return Number.isFinite(r)?{slope:0,intercept:r}:null}function Me(t,e,n){if(t==null)return {slope:0,intercept:0};let r=t.toString().trim().split(/\s+/).map(a=>ge(a,n));if(!r.length||r.some(a=>a==null))return null;let i=(a,o)=>({slope:a.slope+o.slope,intercept:a.intercept+o.intercept}),s=(a,o)=>wt(a,o);return r.length===1?s(r[0],2):r.length===2?s(r[1],2):r.length===3?s(r[1],2):i(r[1],r[3])}function De(t,e){let n=ge(t?.width,e)??e;return t?.maxWidth==null?n:null}function ze(t,e){let n=Me(e?.padding,"inline",t);return n?be({slope:t.slope-n.slope,intercept:t.intercept-n.intercept},fe(e?.border)):null}function ne(t,e){let n=Me(e?.padding,"inline",t);return n?{slope:t.slope-n.slope,intercept:t.intercept-n.intercept}:null}function pt(t,e){return t==null?null:Math.max(0,t-et(e?.padding,"inline",t))}function re(t,e){if(!t)return null;let n=nt(e?.padding,"inline",t);return n?Nt(t,n):t}function ct(t,e){let n=L(t?.width,e)??e,r=L(t?.maxWidth,e);return r==null?Math.max(0,n):Math.max(0,Math.min(n,r))}function Wt(t,e){let n=T(t?.width,e)??e,r=T(t?.maxWidth,e);return r?de([`min(${n}, ${r})`]):n}function Ce(t){let e=t.node.responsiveBy==="container"&&t.availableWidthPx!=null&&Number.isFinite(t.availableWidthPx)&&t.availableWidthPx>0?t.availableWidthPx:t.responsiveMinWidth,n=q$1(t.node.style,t.responsiveMinWidth,t.breakpointMap);if(t.conservativeContainerText&&t.node.responsiveBy==="container"){let a=t.node.__rmgTextRenderState??j$1({barHeight:t.node.barHeight,barWidth:t.node.barWidth,lineHeight:t.node.lineHeight,lines:t.node.lines,lastBarWidth:t.node.lastBarWidth,responsiveBy:t.node.responsiveBy,breakpointMap:t.breakpointMap}),o=a.states.reduce((l,c)=>c.state.metrics.totalHeight>l.metrics.totalHeight?c.state:l,a.baseState);return {style:n,metrics:t.textMetricsMode==="safari"?e$1(o.metrics):o.metrics}}let r=f(t.node.lines,1,e,t.breakpointMap),i=g(t.node.barHeight,typeof t.node.barHeight=="number"?t.node.barHeight:0,e,t.breakpointMap),s=d({barHeight:i,lineHeight:h(t.node.lineHeight,typeof t.node.lineHeight=="number"?t.node.lineHeight:1,e,t.breakpointMap),lines:r});return {style:n,metrics:t.textMetricsMode==="safari"?e$1(s):s}}function U(t,e,n=a){return r(t,e,n)}function Pt(t,e){let n=e?.responsiveMinWidth??0,r=e?.availableWidthPx??null,i=e?.breakpointMap??a,s=e?.conservativeContainerText===true,a$1=e?.textMetricsMode??"default";if(t.kind==="rect"||t.kind==="square"||t.kind==="circle"){let o=q$1(t.style,n,i),l=L(o?.height,r??void 0);if(l!=null)return l+q(o,r??void 0);let c=ct(o,r??tt);if(t.kind==="square"&&c!=null)return c+q(o,r??void 0);let u=me(o?.aspectRatio);if(u!=null&&c!=null&&c>0)return c/u+q(o,r??void 0);let p=q(o,r??void 0);return p>0?p:null}if(t.kind==="text"){let{style:o,metrics:l}=Ce({node:t,responsiveMinWidth:n,availableWidthPx:r,breakpointMap:i,conservativeContainerText:s,textMetricsMode:a$1});return l.totalHeight+q(o,r??void 0)}if(t.kind==="media"){let o=U(t.style,n,i),l=pt(r,o),c=L(o?.gap,l??void 0)??0,u=et(o?.padding,"block",r??void 0),p=Math.max(0,t.count|0),h={kind:t.tile?.shape??"rect",style:t.tile?.style,shimmer:t.tile?.shimmer},y=(t.direction??"row")==="row"&&p>1&&l!=null?Math.max(0,(l-c*Math.max(0,p-1))/p):l,m=Pt(h,{responsiveMinWidth:n,availableWidthPx:y,breakpointMap:i,conservativeContainerText:s,textMetricsMode:a$1});return m==null?u||null:(t.direction??"row")==="row"||p<=1?m+u:m*p+c*Math.max(0,p-1)+u}if(t.kind==="row"||t.kind==="col"||t.kind==="stack"){let o=U(t.style,n,i),l=pt(r,o),c=L(o?.gap,l??void 0)??0,u=et(o?.padding,"block",r??void 0),p=t.children.map(h=>Pt(h,{responsiveMinWidth:n,availableWidthPx:l,breakpointMap:i,conservativeContainerText:s,textMetricsMode:a$1})).filter(h=>h!=null);return p.length?t.kind==="row"?Math.max(...p)+u:p.reduce((h,y)=>h+y,0)+c*Math.max(0,p.length-1)+u:u||null}return null}function kt(t,e){let n=e?.responsiveMinWidth??0,r=e?.availableWidthExpr??null,i=e?.availableWidthPx??null,s=e?.breakpointMap??a,a$1=e?.conservativeContainerText===true,o=e?.textMetricsMode??"default";if(t.kind==="rect"||t.kind==="square"||t.kind==="circle"){let l=q$1(t.style,n,s),c=T(l?.height,r??void 0);if(c!=null)return b([c,Z(l,r??void 0)??"0px"]);let u=Wt(l,r??B(tt));if(t.kind==="square")return b([u,Z(l,r??void 0)??"0px"]);let p=me(l?.aspectRatio);return p!=null?b([Ut(u,p),Z(l,r??void 0)??"0px"]):Z(l,r??void 0)??null}if(t.kind==="text"){let{style:l,metrics:c}=Ce({node:t,responsiveMinWidth:n,availableWidthPx:i,breakpointMap:s,conservativeContainerText:a$1,textMetricsMode:o});return b([B(c.totalHeight),Z(l,r??void 0)??"0px"])}if(t.kind==="media"){let l=U(t.style,n,s),c=re(r,l),u=pt(i,l),p=T(l?.gap,c??void 0)??"0px",h=L(l?.gap,u??void 0)??0,y=nt(l?.padding,"block",r??void 0)??"0px",m=Math.max(0,t.count|0),f={kind:t.tile?.shape??"rect",style:t.tile?.style,shimmer:t.tile?.shimmer},S=(t.direction??"row")==="row"&&m>1&&c!=null?Ut(Nt(c,v(p,Math.max(0,m-1))),m):c,W=(t.direction??"row")==="row"&&m>1&&u!=null?Math.max(0,(u-h*Math.max(0,m-1))/m):u,M=kt(f,{responsiveMinWidth:n,availableWidthExpr:S,availableWidthPx:W,breakpointMap:s,conservativeContainerText:a$1,textMetricsMode:o});return M==null?y||null:(t.direction??"row")==="row"||m<=1?b([M,y]):b([v(M,m),v(p,Math.max(0,m-1)),y])}if(t.kind==="row"||t.kind==="col"||t.kind==="stack"){let l=U(t.style,n,s),c=re(r,l),u=pt(i,l),p=T(l?.gap,c??void 0)??"0px",h=nt(l?.padding,"block",r??void 0)??"0px",y=t.children.map(m=>kt(m,{responsiveMinWidth:n,availableWidthExpr:c,availableWidthPx:u,breakpointMap:s,conservativeContainerText:a$1,textMetricsMode:o})).filter(m=>!!m);return y.length?t.kind==="row"?b([de(y),h]):b([...y.flatMap((m,f)=>f>0?[p,m]:[m]),h]):h||null}return null}function Ke(t){if(t==null)return null;let e=Number(t);return Number.isFinite(e)?Math.max(25,Math.min(260,e)):null}function qe(t){if(t==null)return null;let e=Number(t);return Number.isFinite(e)&&e>0?e:null}function Rt(t,e){let n=t.slots?.[e];return {item:n?.item??t.item,itemWrapStyle:Oe(t.itemWrapStyle,n?.itemWrapStyle),ratio:Ke(n?.ratio),heightPx:qe(n?.heightPx),span:n?.span}}function Se(t,e,n){let r=gt(t,n);for(let i of r)e.add(i.minWidth);}function Et(t){return Gt({span:t.span,columnCount:t.columnCount,width:t.minWidth,breakpointMap:t.breakpointMap})}function xn(t,e){return We(t,e)?.key??null}function We(t,e){if(!t.length)return null;let n=t[0];for(let r of t)if(e>=r.minWidth)n=r;else break;return n}function Ze(t){let{columnsRules:e,gapRules:n,baseColumns:r,baseGapPx:i,extraMinWidths:s}=t,a=new Set([0]),o=new Set;for(let p of e)a.add(p.minWidth);for(let p of n)a.add(p.minWidth);if(s)for(let p of s){let h=Math.max(0,p|0);a.add(h),o.add(h);}let l=Array.from(a).sort((p,h)=>p-h),c$1=[],u="";for(let p of l){let h=Qt(e,p,r),y=Qt(n,p,i),m=Math.max(1,h|0),f=Math.max(0,c(y,i)),S=`c${m}_g${f}`;S===u&&!o.has(p)||(c$1.push({minWidth:p,columns:m,gapPx:f,key:S===u?`${S}_m${p}`:S}),u=S);}return c$1.length?c$1:[{minWidth:0,columns:r,gapPx:i,key:`c${r}_g${i}`}]}function Ge(t){let e$1=pe(t.layoutWidthPx).filter(r=>r.value>0);if(!e$1.length)return;if(t.viewportWidth!=null){let r=We(t.states,t.viewportWidth),i=Ie(t.layoutWidthPx);return !r||i==null||i<=0?void 0:new Map([[r.key,i]])}let n=new Map;for(let r of t.states){let i=e(e$1,r.minWidth);i!=null&&i>0&&n.set(r.key,i);}return n.size?n:void 0}function Ye(t,e){return e!=null&&Number.isFinite(e)&&e>0?Math.max(e,tt):Math.max(t.minWidth||tt,tt)}function ie(t,e){let n=Ye(t,e);return t.columns>0?(n-t.gapPx*(t.columns-1))/t.columns:n}function ut(t,e,n){if(t){if(t.kind==="masonry"){u(t.style,e,n),ut(t.item,e,n);for(let r of t.slots??[])Se(r.span,e,n),ut(r.item,e,n);return}switch(t.kind){case "rect":case "square":case "circle":u(t.style,e,n);return;case "text":u(t.style,e,n);for(let r of i({barHeight:t.barHeight,barWidth:t.barWidth,lineHeight:t.lineHeight,lines:t.lines,lastBarWidth:t.lastBarWidth,breakpointMap:n}))e.add(r);return;case "media":u(t.style,e,n),u(t.tile?.style,e,n);return;case "stack":case "row":case "col":u(t.style,e,n);for(let r of t.children)ut(r,e,n);return}}}function Ue(t){return Number.isFinite(t)?Math.max(0,Math.round(t*1e3)/1e3):null}function Xe(t,e,n){if(t<=0){n.add(0);return}if(e.slope<=0)return;let r=Ue((t-e.intercept)/e.slope);r!=null&&n.add(r);}function vt(t){let{node:e,availableWidth:n,responsiveMinWidth:r,breakpointMap:i$1,out:s}=t;if(!(!e||!n))switch(e.kind){case "rect":case "square":case "circle":return;case "text":if(e.responsiveBy!=="container")return;for(let a of i({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,breakpointMap:i$1}))Xe(a,n,s);return;case "media":{let a=U(e.style,r,i$1),o=ne(n,a);if(!o)return;let l=L(a?.gap,0)??0,c=Math.max(0,e.count|0),u=(e.direction??"row")==="row"&&c>1?wt(be(o,l*Math.max(0,c-1)),1/c):o,p={kind:e.tile?.shape??"rect",style:e.tile?.style,shimmer:e.tile?.shimmer};vt({node:p,availableWidth:u,responsiveMinWidth:r,breakpointMap:i$1,out:s});return}case "stack":case "row":case "col":{let a=U(e.style,r,i$1),o=ne(n,a);if(!o)return;for(let l of e.children)vt({node:l,availableWidth:o,responsiveMinWidth:r,breakpointMap:i$1,out:s});return}}}function Je(t){let{state:e,span:n}=t,r=Math.max(1,e.columns|0),i={slope:1/r,intercept:-(e.gapPx*Math.max(0,r-1))/r};return {slope:i.slope*n,intercept:i.intercept*n+e.gapPx*Math.max(0,n-1)}}function Qe(t){let e=new Set([0]),{state:n,itemCount:r,structuredLayout:i,spans:s,breakpointMap:a}=t;if(!i)return [];for(let o=0;o<r;o++){let l=Rt(i,o),c=Et({span:l?.span??s?.[o],columnCount:n.columns,minWidth:n.minWidth,breakpointMap:a}),u=Je({state:n,span:c}),p=De(l.itemWrapStyle,u),h=p?ze(p,l.itemWrapStyle):null;vt({node:l.item,availableWidth:h,responsiveMinWidth:n.minWidth,breakpointMap:a,out:e});}return Array.from(e).sort((o,l)=>o-l)}function tn(t){if(!t.layout)return {structuredLayout:null,responsiveCss:""};let e=t.breakpointMap??a,n=0,r=()=>`n${++n}`,i=[],s=z(t.layout,r,i,"masonry",e),a$1=t.scopeId?A({scopeAttr:"data-rmg-mskel-scope",scopeId:t.scopeId,rules:i}):"";return {structuredLayout:s,responsiveCss:a$1}}function en(t){let e=t?.colsCssVar??"--rmg-cols",n=t?.gapCssVar??"--rmg-gap",r=t?.containerWidthCss??"100cqw";return I(`(${r} - ((var(${e}) - 1) * var(${n}))) / var(${e})`)}function se(t){let{span:e,columnWidthCssExpr:n,gapCssExpr:r="var(--rmg-gap)"}=t;return e<=1?n:b([v(n,e),v(r,Math.max(0,e-1))])}function oe(t){let{columnStart:e,columnWidthCssExpr:n,gapCssExpr:r="var(--rmg-gap)"}=t;return e<=0?"0px":b([v(n,e),v(r,e)])}function ae(t){let{index:e,slot:n,state:r,safeRatios:i,safeHeights:s,itemWidthCssExpr:a,itemWidthPx:o,breakpointMap:l,conservativeContainerText:c,textMetricsMode:u="default"}=t;if(n){let y=Wt(n.itemWrapStyle,a),m=ct(n.itemWrapStyle,o),f=je(y,n.itemWrapStyle),S=ye(m,n.itemWrapStyle),W=kt(n.item,{responsiveMinWidth:r.minWidth,availableWidthExpr:f,availableWidthPx:S,breakpointMap:l,conservativeContainerText:c,textMetricsMode:u});if(W)return b([W,ee(n.itemWrapStyle,y)??"0px"])}let p=Wt(n?.itemWrapStyle,a),h=ee(n?.itemWrapStyle,p)??"0px";return n?.heightPx!=null?b([B(n.heightPx),h]):n?.ratio!=null?b([I(`${p} * ${n.ratio/100}`),h]):s?.length?b([B(s[e%s.length]),h]):i.length?b([I(`${p} * ${i[e%i.length]/100}`),h]):b([p,h])}function le(t){let{index:e,slot:n,state:r,safeRatios:i,safeHeights:s,itemWidthPx:a,breakpointMap:o,conservativeContainerText:l,textMetricsMode:c="default"}=t;if(n){let y=ct(n.itemWrapStyle,a),m=ye(y,n.itemWrapStyle),f=Pt(n.item,{responsiveMinWidth:r.minWidth,availableWidthPx:m,breakpointMap:o,conservativeContainerText:l,textMetricsMode:c});if(f!=null)return Math.ceil(f+te(n.itemWrapStyle,y))}let u=ct(n?.itemWrapStyle,a),p=te(n?.itemWrapStyle,u),h=n?.heightPx!=null?n.heightPx:n?.ratio!=null?Math.round(n.ratio/100*u):s?.length?s[e%s.length]:i.length?Math.round(i[e%i.length]/100*u):u;return Math.ceil(h+p)}function Mt(t,e,n){let r=0;for(let i=e;i<e+n;i++)r=Math.max(r,t[i]??0);return r}function nn(t,e,n){let r=0;for(let i=e;i<e+n;i++)r+=t[i]??0;return r}function rn(t){let e=Math.max(1,t.columnCount-t.span+1);return t.cursor%e}function Ct(t){let{itemCount:e,columnCount:n,placement:r,heights:i,gapPx:s,spans:a}=t,o=Math.max(1,n|0),l=new Array(o).fill(0),c=new Array(o).fill(0),u=[],p=0,h=0,y=0;for(let m=0;m<e;m++){let f=Math.max(1,Math.min(o,Math.round(a?.[m]??1)||1)),S=i[m]??0,W=Math.max(0,o-f),M=0,C=0;if(r==="roundRobin")M=rn({cursor:h,columnCount:o,span:f}),C=Mt(l,M,f),h+=1;else if(r==="horizontalOrder")M=y%o,M+f>o&&(M=0),C=Mt(l,M,f),y=M+f;else {let R=0,N=Number.POSITIVE_INFINITY,X=Number.POSITIVE_INFINITY;for(let d=0;d<=W;d++){let w=Mt(l,d,f),D=nn(c,d,f);(w<N||w===N&&D<X||w===N&&D===X&&d<R)&&(R=d,N=w,X=D);}M=R,C=Number.isFinite(N)?N:0;}let H=C+S+s;for(let R=M;R<M+f;R++)l[R]=H,c[R]=(c[R]??0)+1;p=Math.max(p,C+S),u.push({index:m,span:f,columnStart:M,top:C,height:S});}return {items:u,height:p}}function St(t){if(t.items.length===0)return {itemTopCssExprs:[],itemHeightCssExprs:[],shellHeightCssExpr:"0px",cssVars:{}};let e=Math.max(1,t.columnCount|0),n=new Array(e).fill(0),r=new Array(e).fill(null),i=[],s=[],a={};for(let[u,p]of t.items.entries()){let h=`--rmg-mskel-height-${p.index}`,y=`var(${h})`;a[h]=p.heightCssExpr,s.push(y);let m=0,f=null;for(let C=p.columnStart;C<p.columnStart+p.span;C++){let H=n[C]??0,R=r[C]??null;(H>m||f==null)&&(m=H,f=R);}let S=m<=0||!f?"0px":t.gapPx>0?b([f,B(t.gapPx)]):f,W=b([S,y]);i.push(S);let M=(m>0?m+t.gapPx:0)+p.heightPx;for(let C=p.columnStart;C<p.columnStart+p.span;C++)n[C]=M,r[C]=W;}let l=0,c="0px";for(let u=0;u<e;u++){let p=n[u]??0,h=r[u]??"0px";p>=l&&(l=p,c=h);}return {itemTopCssExprs:i,itemHeightCssExprs:s,shellHeightCssExpr:c,cssVars:a}}function yn(t$1){let e=t$1.spec??Ae(),n={...a,...t$1.breakpoints??{}},r=pe(t$1.layoutWidthPx).filter(d=>d.value>0),i=e.ratios??ue,s=(Array.isArray(t$1.ratios)&&t$1.ratios.length?t$1.ratios:Array.isArray(e.ratios)&&e.ratios.length?e.ratios:i).map(d=>Number(d)).filter(d=>Number.isFinite(d)).map(d=>Math.max(25,Math.min(220,d))),a$1=(Array.isArray(t$1.heightsPx)&&t$1.heightsPx.length?t$1.heightsPx:Array.isArray(e.heightsPx)&&e.heightsPx.length?e.heightsPx:null)?.map(d=>Number(d)).filter(d=>Number.isFinite(d)&&d>0)??null,o=Xt(t$1.columns,n),l=Xt(t$1.gap,n),c$1=Jt(t$1.columns,o,4),u=Jt(t$1.gap,l,8),p$1=Math.max(1,c$1|0),h=Math.max(0,c(u,8)),y=Ze({columnsRules:o,gapRules:l,baseColumns:p$1,baseGapPx:h,extraMinWidths:(()=>{let d=new Set;ut(e.layout,d,n);for(let w of t$1.spans??[])Se(w,d,n);for(let w of r)d.add(w.minWidth);return d})()}),m=Ge({states:y,layoutWidthPx:t$1.layoutWidthPx,viewportWidth:t$1.viewportWidth}),{structuredLayout:f,responsiveCss:S}=tn({layout:e.layout,scopeId:t$1.scopeId,breakpointMap:n}),W=t$1.respectLayoutCount===false?Math.max(0,t$1.count|0):f?.count!=null?Math.max(0,f.count|0):Math.max(0,t$1.count|0),M=t$1.placement??"balanced",C="--rmg-mskel-colw",H=`var(${C})`,R=en(),N="var(--rmg-gap)",X=y.map(d=>{let w=m?.has(d.key)===true,D=!w,Lt=ie(d,m?.get(d.key)),$t=x=>Array.from({length:W},(g,P)=>{let $=f?Rt(f,P):null,A=Et({span:$?.span??t$1.spans?.[P],columnCount:d.columns,minWidth:d.minWidth,breakpointMap:n}),V=Lt*A+d.gapPx*Math.max(0,A-1),k=`--rmg-mskel-width-${P}`,E=se({span:A,columnWidthCssExpr:H,gapCssExpr:N}),O=`var(${k})`,Q=le({index:P,slot:$,state:d,safeRatios:s,safeHeights:a$1,itemWidthPx:V,breakpointMap:n,conservativeContainerText:D,textMetricsMode:x}),ot=ae({index:P,slot:$,state:d,safeRatios:s,safeHeights:a$1,itemWidthCssExpr:O,itemWidthPx:V,breakpointMap:n,conservativeContainerText:D,textMetricsMode:x});return {slot:$,span:A,height:Q,heightCssExpr:ot,itemWidthPx:V,itemWidthVarName:k,itemWidthCssValue:E,itemWidthCssExpr:O}}),J=$t("default"),z=$t("safari"),Ft=Ct({itemCount:W,columnCount:d.columns,placement:M,heights:J.map(x=>x.height),gapPx:d.gapPx,spans:J.map(x=>x.span)}),rt=St({columnCount:d.columns,gapPx:d.gapPx,items:Ft.items.map((x,g)=>({index:g,columnStart:x.columnStart,span:x.span,heightPx:x.height,heightCssExpr:J[g]?.heightCssExpr??B(x.height)}))}),Ht=Ct({itemCount:W,columnCount:d.columns,placement:M,heights:z.map(x=>x.height),gapPx:d.gapPx,spans:z.map(x=>x.span)}),it=St({columnCount:d.columns,gapPx:d.gapPx,items:Ht.items.map((x,g)=>({index:g,columnStart:x.columnStart,span:x.span,heightPx:x.height,heightCssExpr:z[g]?.heightCssExpr??B(x.height)}))}),st={[C]:R};for(let x of J)st[x.itemWidthVarName]=x.itemWidthCssValue;Object.assign(st,rt.cssVars);let Re={...st,...it.cssVars},Bt=x=>!w&&f?Qe({state:d,itemCount:W,structuredLayout:f,spans:t$1.spans,breakpointMap:n}).map(g=>{let P=ie(d,g),$=Array.from({length:W},(k,E)=>{let O=Rt(f,E),Q=Et({span:O?.span??t$1.spans?.[E],columnCount:d.columns,minWidth:d.minWidth,breakpointMap:n}),ot=P*Q+d.gapPx*Math.max(0,Q-1),Ne=`var(${`--rmg-mskel-width-${E}`})`,we=le({index:E,slot:O,state:d,safeRatios:s,safeHeights:a$1,itemWidthPx:ot,breakpointMap:n,conservativeContainerText:false,textMetricsMode:x}),Le=ae({index:E,slot:O,state:d,safeRatios:s,safeHeights:a$1,itemWidthCssExpr:Ne,itemWidthPx:ot,breakpointMap:n,conservativeContainerText:false,textMetricsMode:x});return {slot:O,span:Q,height:we,heightCssExpr:Le}}),A=Ct({itemCount:W,columnCount:d.columns,placement:M,heights:$.map(k=>k.height),gapPx:d.gapPx,spans:$.map(k=>k.span)}),V=St({columnCount:d.columns,gapPx:d.gapPx,items:A.items.map((k,E)=>({index:E,columnStart:k.columnStart,span:k.span,heightPx:k.height,heightCssExpr:$[E]?.heightCssExpr??B(k.height)}))});return {minWidth:g,rootDecls:{height:V.shellHeightCssExpr,...V.cssVars},items:A.items.map((k,E)=>({index:E,topCssExpr:V.itemTopCssExprs[E],leftCssExpr:oe({columnStart:k.columnStart,columnWidthCssExpr:H,gapCssExpr:N}),widthCssExpr:se({span:k.span,columnWidthCssExpr:H,gapCssExpr:N})}))}}):void 0,Ee=Bt("default"),ve=Bt("safari");return {state:d,shellHeightCssExpr:rt.shellHeightCssExpr,positionedCssVars:st,containerCssRules:Ee,safariShellHeightCssExpr:it.shellHeightCssExpr,safariPositionedCssVars:Re,safariContainerCssRules:ve,items:J.map((x,g)=>{let P=Ft.items[g]??{span:x.span,columnStart:0,top:0,height:x.height},$=Ht.items[g]??{span:x.span,columnStart:P.columnStart,top:P.top,height:z[g]?.height??x.height};return {index:g,height:x.height,columnIndex:P.columnStart,columnStart:P.columnStart,span:P.span,top:P.top,topCssExpr:rt.itemTopCssExprs[g],leftPx:P.columnStart*(Lt+d.gapPx),leftCssExpr:oe({columnStart:P.columnStart,columnWidthCssExpr:H,gapCssExpr:N}),widthPx:x.itemWidthPx,widthCssExpr:x.itemWidthCssExpr,slot:x.slot,heightCssExpr:rt.itemHeightCssExprs[g]??x.heightCssExpr,safariHeight:z[g]?.height??x.height,safariTop:$.top,safariTopCssExpr:it.itemTopCssExprs[g],safariHeightCssExpr:it.itemHeightCssExprs[g]??z[g]?.heightCssExpr??x.heightCssExpr}})}});return {itemCount:W,states:y,variants:X,structuredLayout:f,structuredNodeId:f?.__rmgNodeId,plainStructuredStyle:f?p(t(f.style,n)):void 0,responsiveCss:S}}function bn(t,e){if(!t.length)return null;let n=t[0];for(let r of t)if(e>=r.state.minWidth)n=r;else break;return n}function sn(t){return t.items.length?Math.max(0,...t.items.map(e=>e.top+e.height)):0}function G(t,e){return `${t}:${e} !important;`}function dt(t,e="default"){let n=e==="safari"?t.safariShellHeightCssExpr??t.shellHeightCssExpr:t.shellHeightCssExpr,r=e==="safari"?t.safariPositionedCssVars??t.positionedCssVars:t.positionedCssVars,i=[["height",n??`${sn(t)}px`],["--rmg-cols",t.state.columns],["--rmg-gap",`${t.state.gapPx}px`]];for(let[s,a]of Object.entries(r??{}))i.push([s,a]);return i}function Pe(t){return t.map(([e,n])=>e==="height"?["min-height",n]:[e,n])}function gn(t){if(!t.scopeId||!t.prediction.variants.length)return "";let e=`[data-rmg-masonry-layout-seed="${v$1(t.scopeId)}"]`,n=(i,s)=>{let a=`${e}{`+i.map(([l,c])=>G(l,c)).join("")+"}",o=s.map(l=>`${`${e}>[data-rmg-idx="${l.index}"]`}{`+[G("top",l.topCssExpr??"0px"),G("left",l.leftCssExpr),G("width",l.widthCssExpr)].join("")+"}").join("");return `${a}${o}`},r=i=>{let s=dt(i),a=n(s,i.items.map(u=>({index:u.index,topCssExpr:u.topCssExpr??`${u.top}px`,leftCssExpr:u.leftCssExpr,widthCssExpr:u.widthCssExpr}))),o=(i.containerCssRules??[]).map(u=>`@container (min-width:${u.minWidth}px){${n(Object.entries(u.rootDecls),u.items)}}`).join(""),l=n(dt(i,"safari"),i.items.map(u=>({index:u.index,topCssExpr:u.safariTopCssExpr??u.topCssExpr??`${u.safariTop}px`,leftCssExpr:u.leftCssExpr,widthCssExpr:u.widthCssExpr}))),c=(i.safariContainerCssRules??[]).map(u=>`@container (min-width:${u.minWidth}px){${n(Object.entries(u.rootDecls),u.items)}}`).join("");return `${a}${o}@supports ${c$1}{${l}${c}}`};return t.prediction.variants.map(i=>{let s=r(i);return i.state.minWidth<=0?s:`@media (min-width:${i.state.minWidth}px){${s}}`}).join(`
2
- `)}function Mn(t){if(!t.scopeId||!t.prediction.variants.length)return "";let e=`[data-rmg-masonry-skeleton-shell="${v$1(t.scopeId)}"]`,n=i=>`${e}{`+Pe(i).map(([s,a])=>G(s,a)).join("")+"}",r=i=>{let s=n(dt(i)),a=(i.containerCssRules??[]).map(o=>`@container (min-width:${o.minWidth}px){${n(Object.entries(o.rootDecls))}}`).join("");return `${s}${a}`};return t.prediction.variants.map(i=>{let s=r(i);return i.state.minWidth<=0?s:`@media (min-width:${i.state.minWidth}px){${s}}`}).join(`
3
- `)}function Cn(t){if(!t.scopeId||!t.prediction.variants.length)return "";let e=`[data-rmg-masonry-skeleton-shell="${v$1(t.scopeId)}"]`,n=i=>`${e}{`+Pe(i).map(([s,a])=>G(s,a)).join("")+"}",r=i=>{let s=n(dt(i,"safari")),a=(i.safariContainerCssRules??[]).map(o=>`@container (min-width:${o.minWidth}px){${n(Object.entries(o.rootDecls))}}`).join("");return `@supports ${c$1}{${s}${a}}`};return t.prediction.variants.map(i=>{let s=r(i);return i.state.minWidth<=0?s:`@media (min-width:${i.state.minWidth}px){${s}}`}).join(`
4
- `)}var ke=F.createContext(null);function Wn(t){return jsx(ke.Provider,{value:t.value,children:t.children})}function Pn(){return F.useContext(ke)}export{ln as a,un as b,Gt as c,xn as d,en as e,se as f,oe as g,Ct as h,yn as i,bn as j,gn as k,Mn as l,Cn as m,Wn as n,Pn as o};