react-motion-gallery 2.0.38 → 2.0.40

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 (38) hide show
  1. package/README.md +161 -5
  2. package/dist/chunk-AOQIL2HW.mjs +1 -0
  3. package/dist/{chunk-P6NLW2QN.mjs → chunk-CXH7XALE.mjs} +1 -1
  4. package/dist/{chunk-YNQPSE2N.mjs → chunk-CXV4KHLX.mjs} +1 -1
  5. package/dist/chunk-QJ2YFMAT.mjs +2 -0
  6. package/dist/chunk-S356JN3V.mjs +4 -0
  7. package/dist/core.d.mts +2 -1
  8. package/dist/entries.d.mts +4 -4
  9. package/dist/entries.mjs +1 -1
  10. package/dist/fullscreen-captions.d.mts +2 -1
  11. package/dist/fullscreen-controls.d.mts +2 -1
  12. package/dist/fullscreen-crossfade.d.mts +2 -1
  13. package/dist/fullscreen-lazy-load.d.mts +2 -1
  14. package/dist/fullscreen-slider.d.mts +2 -1
  15. package/dist/fullscreen-thumbnails.d.mts +2 -1
  16. package/dist/fullscreen-video.d.mts +2 -1
  17. package/dist/fullscreen-zoom-pan.d.mts +2 -1
  18. package/dist/fullscreen.d.mts +3 -2
  19. package/dist/{index-QEgABhod.d.mts → index-C9XZ3Lr3.d.mts} +1 -1
  20. package/dist/index.d.mts +2 -2
  21. package/dist/index.mjs +1 -1
  22. package/dist/metafile-esm.json +1 -1
  23. package/dist/{responsive-BnHorKhC.d.mts → responsive-Cwty6be5.d.mts} +3 -0
  24. package/dist/responsive.d.mts +2 -1
  25. package/dist/skeleton-base.d.mts +1 -1
  26. package/dist/skeleton-base.mjs +1 -1
  27. package/dist/skeleton-cache.d.mts +1 -1
  28. package/dist/skeleton-cache.mjs +1 -1
  29. package/dist/skeleton-grid.d.mts +3 -2
  30. package/dist/skeleton-grid.mjs +1 -1
  31. package/dist/skeleton-masonry.d.mts +1 -1
  32. package/dist/skeleton-masonry.mjs +1 -1
  33. package/dist/skeleton-slider.d.mts +4 -2
  34. package/dist/skeleton-slider.mjs +7 -7
  35. package/package.json +1 -1
  36. package/dist/chunk-4RPAI2F7.mjs +0 -4
  37. package/dist/chunk-EWWWD475.mjs +0 -1
  38. package/dist/chunk-MLE7BKAD.mjs +0 -2
package/README.md CHANGED
@@ -11,7 +11,7 @@ This table reports local gzip measurements for selected runtime surfaces. Type-o
11
11
  <!-- bundle-size:start -->
12
12
  | Surface | JS gzip |
13
13
  | --- | --- |
14
- | `Entries` | 13.4kB |
14
+ | `Entries` | 15.7kB |
15
15
  | `FullscreenThumbnailSlider` | 20.3kB |
16
16
  | `GalleryCore` | 2.6kB |
17
17
  | `Grid` | 6.3kB |
@@ -20,10 +20,10 @@ This table reports local gzip measurements for selected runtime surfaces. Type-o
20
20
  | `Masonry` | 6.5kB |
21
21
  | `masonry/ready` | 323.0B |
22
22
  | `masonry/lazy-load` | 3.3kB |
23
- | `Skeleton base` | 10.6kB |
24
- | `skeleton/slider` | 17.0kB |
25
- | `skeleton/grid` | 10.6kB |
26
- | `skeleton/masonry` | 21.8kB |
23
+ | `Skeleton base` | 10.7kB |
24
+ | `skeleton/slider` | 19.3kB |
25
+ | `skeleton/grid` | 13.0kB |
26
+ | `skeleton/masonry` | 21.9kB |
27
27
  | `Slider core` | 18.7kB |
28
28
  | `slider/ready` | 894.0B |
29
29
  | `slider/arrows` | 1.2kB |
@@ -157,6 +157,8 @@ Subpaths give bundlers a smaller graph than the root. Less JS to transfer, parse
157
157
  | `react-motion-gallery/skeleton/slider` | `SliderSkeleton` and slider skeleton authoring types |
158
158
  | `react-motion-gallery/skeleton/grid` | `GridSkeleton` and grid skeleton authoring types |
159
159
  | `react-motion-gallery/skeleton/masonry` | `MasonrySkeleton` and masonry skeleton authoring types |
160
+ | `react-motion-gallery/skeleton/cache` | Server-safe skeleton cookie cache helpers and types |
161
+ | `react-motion-gallery/skeleton/cache/provider` | Client `SkeletonCacheProvider` for SSR snapshots |
160
162
  | `react-motion-gallery/fullscreen` | `useFullscreenController` and fullscreen types |
161
163
  | `react-motion-gallery/fullscreen/slider` | `fullscreenSlider` |
162
164
  | `react-motion-gallery/fullscreen/controls` | `fullscreenControls` |
@@ -443,6 +445,7 @@ export function LoadingShell({ ready, children }: { ready: boolean; children: Re
443
445
  | `timing.minVisibleMs` | `number` | `220` | Minimum time the skeleton stays visible before exit can begin. |
444
446
  | `shellClassName` / `shellStyle` | `string` / `CSSProperties` | `—` | Wrapper-layer class and style for content+skeleton mode. |
445
447
  | `contentClassName` / `contentStyle` | `string` / `CSSProperties` | `—` | Content-layer class and style for wrapper mode. |
448
+ | `cache` | `SkeletonCacheOptions` | `—` | Opts into the cookie snapshot cache. Available on standalone `Skeleton`, `SliderSkeleton`, `GridSkeleton`, `MasonrySkeleton`, and `Entries.loading.cache`. |
446
449
 
447
450
  The wrapper timing model matches the gallery loading layers: content begins fading in as soon as the skeleton exit starts; it does not wait for the skeleton to unmount.
448
451
 
@@ -460,6 +463,158 @@ npm run --silent generate:skeleton-text-module -- \
460
463
 
461
464
  Use `responsiveBy: "container"` when text wrapping follows the card or cell width more closely than the viewport. For equal-height card sliders, the browser analyzer can also measure all canonical slider items and emit `rowHeightCompensation` so unseen cards cannot surprise the skeleton row height. See [`docs/skeleton-text-authoring.md`](./docs/skeleton-text-authoring.md) for manifest fields, command options, and the Codex-friendly workflow.
462
465
 
466
+ ### Skeleton cookie snapshot cache
467
+
468
+ The skeleton cookie snapshot cache is an opt-in SSR acceleration path for skeletons with expensive responsive text or layout geometry. The first visit uses the normal responsive skeleton CSS. After hydration, and again after debounced resizes, the client measures the active rendered content/skeleton geometry and writes a compact cookie. On a later server render, a valid cookie lets the skeleton render only the active snapshot values instead of the full responsive text CSS table.
469
+
470
+ This exists because very accurate skeletons can require a lot of responsive text CSS, especially when text wrapping affects masonry packing or card heights. Client-only storage such as `sessionStorage` cannot help SSR because the server cannot read it and the browser only gets it after the document starts executing. A cookie is available during SSR, so the server can reserve the correct first-paint geometry before hydration.
471
+
472
+ What the cache stores:
473
+
474
+ - cache version, cache key, scope id, route key, timestamp, viewport width, and active width bucket
475
+ - measured skeleton text records keyed by `textId`: line count, per-line widths, and optional bar metrics
476
+ - masonry-only active geometry: variant key, shell height, and item heights
477
+ - no text strings, no media URLs, and no full CSS text
478
+
479
+ Benefits:
480
+
481
+ - first visit remains unchanged and uses the full responsive skeleton behavior
482
+ - later reloads can parse much less skeleton CSS for the active breakpoint
483
+ - text-heavy masonry, grid, slider, entries, and standalone skeletons can keep layout stability while reducing first-paint CSS work
484
+ - stale, expired, route-mismatched, scope-mismatched, or malformed cookies silently fall back to the normal responsive path
485
+
486
+ Defaults: `ttlMs` is `10 * 60 * 1000`, `debounceMs` is `250`, cookie `path` is `/`, and `sameSite` is `lax`. Use a stable `key` per skeleton surface and a stable `routeKey` when a skeleton only applies to one route.
487
+
488
+ For skeleton text to be measurable, the skeleton `text` node needs a `textId`, and the matching real content text needs `data-skeleton-text-id`. Browser-generated skeleton text modules include `textId` automatically, so existing spreads such as `...skeletonText.body` are cache-ready.
489
+
490
+ ```typescript
491
+ const cardBodySkeleton = {
492
+ kind: "text",
493
+ textId: "cardBody",
494
+ barHeight: 14,
495
+ lineHeight: 1.45,
496
+ lines: { 0: 4, 900: 3, 1200: 2 },
497
+ } as const;
498
+
499
+ function CardBody({ children }: { children: React.ReactNode }) {
500
+ return <p data-skeleton-text-id="cardBody">{children}</p>;
501
+ }
502
+ ```
503
+
504
+ In SSR frameworks, read cache cookies on the server with the server-safe helper entry, then pass valid snapshots into a client provider. This example parses all React Motion Gallery skeleton cache cookies for the route.
505
+
506
+ ```tsx
507
+ // app/gallery/page.tsx
508
+ import { cookies } from "next/headers";
509
+ import {
510
+ parseSkeletonCacheCookie,
511
+ type SkeletonCacheSnapshot,
512
+ } from "react-motion-gallery/skeleton/cache";
513
+ import { GalleryPageClient } from "./GalleryPageClient";
514
+
515
+ function readSkeletonCacheSnapshots(
516
+ cookieStore: Awaited<ReturnType<typeof cookies>>
517
+ ) {
518
+ const snapshots: Record<string, SkeletonCacheSnapshot> = {};
519
+
520
+ for (const cookie of cookieStore.getAll()) {
521
+ if (!cookie.name.startsWith("rmg_skel_cache_")) continue;
522
+
523
+ const snapshot = parseSkeletonCacheCookie(cookie.value);
524
+ if (snapshot) snapshots[snapshot.key] = snapshot;
525
+ }
526
+
527
+ return snapshots;
528
+ }
529
+
530
+ export default async function GalleryPage() {
531
+ const snapshotMap = readSkeletonCacheSnapshots(await cookies());
532
+
533
+ return <GalleryPageClient skeletonCacheSnapshots={snapshotMap} />;
534
+ }
535
+ ```
536
+
537
+ Wrap the client tree in `SkeletonCacheProvider`, then opt individual skeletons in with `cache={{ key, routeKey }}`. Per-skeleton `cache.snapshot` takes precedence over provider snapshots when you need to pass one directly.
538
+
539
+ ```tsx
540
+ // app/gallery/GalleryPageClient.tsx
541
+ "use client";
542
+
543
+ import type { SkeletonCacheSnapshot } from "react-motion-gallery/skeleton/cache";
544
+ import { SkeletonCacheProvider } from "react-motion-gallery/skeleton/cache/provider";
545
+ import { MasonrySkeleton } from "react-motion-gallery/skeleton/masonry";
546
+ import { Masonry } from "react-motion-gallery/masonry";
547
+ import { useMasonryReady } from "react-motion-gallery/masonry/ready";
548
+
549
+ export function GalleryPageClient({
550
+ skeletonCacheSnapshots,
551
+ }: {
552
+ skeletonCacheSnapshots: Record<string, SkeletonCacheSnapshot | null | undefined>;
553
+ }) {
554
+ const { ref, ready } = useMasonryReady();
555
+
556
+ return (
557
+ <SkeletonCacheProvider snapshots={skeletonCacheSnapshots}>
558
+ <MasonrySkeleton
559
+ cache={{
560
+ key: "portfolio-masonry",
561
+ routeKey: "/gallery",
562
+ }}
563
+ layout={portfolioSkeleton}
564
+ ready={ready}
565
+ masonry={{
566
+ count: items.length,
567
+ columns: { 0: 1, 720: 2, 1140: 4 },
568
+ gap: { 0: 12, 1140: 18 },
569
+ }}
570
+ >
571
+ <Masonry ref={ref} columns={{ 0: 1, 720: 2, 1140: 4 }}>
572
+ {items.map((item) => (
573
+ <Masonry.Item key={item.id}>{/* real card */}</Masonry.Item>
574
+ ))}
575
+ </Masonry>
576
+ </MasonrySkeleton>
577
+ </SkeletonCacheProvider>
578
+ );
579
+ }
580
+ ```
581
+
582
+ Use the same `cache` object on `SliderSkeleton`, `GridSkeleton`, and standalone `Skeleton`. For `Entries`, put it under `entries.loading.cache`.
583
+
584
+ ```tsx
585
+ <Entries
586
+ entries={{
587
+ items,
588
+ mediaLayout: "grid",
589
+ loading: {
590
+ cache: {
591
+ key: "editorial-entries",
592
+ routeKey: "/stories",
593
+ },
594
+ skeleton: entrySkeleton,
595
+ },
596
+ }}
597
+ />
598
+ ```
599
+
600
+ Cookie options can be tuned per skeleton:
601
+
602
+ ```tsx
603
+ <GridSkeleton
604
+ cache={{
605
+ key: "product-grid",
606
+ routeKey: "/products",
607
+ ttlMs: 5 * 60 * 1000,
608
+ debounceMs: 150,
609
+ cookie: {
610
+ path: "/",
611
+ sameSite: "lax",
612
+ },
613
+ }}
614
+ layout={productGridSkeleton}
615
+ />
616
+ ```
617
+
463
618
  ## Slider
464
619
 
465
620
  The default `Slider` is the small synchronous core: children, drag, wheel navigation, snapping, grouping, looping, index channels, intro, and the imperative ref API. Heavier behavior is opt-in through first-party plugins, so importing one feature, such as arrows or parallax, does not pull in the rest of the slider feature set. Structured slider skeletons and restore behavior are owned by `SliderSkeleton`, composed with `useSliderReady()`.
@@ -1378,6 +1533,7 @@ Fullscreen close has a matching entry-aware path. If the user closes fullscreen
1378
1533
  | `loading.enabled` | `boolean` | `—` | Enables entry loading and decode gating. |
1379
1534
  | `loading.force` | `boolean \| { enabled?: boolean; showContent?: boolean; skeletonOpacity?: number }` | `—` | Forces entry skeletons to remain visible. Set `showContent: true` to preview mounted, ready entry content under the skeleton, and tune the loading overlay with `skeletonOpacity`. |
1380
1535
  | `loading.skeleton` | `EntrySkeletonSpec \| ((args) => EntrySkeletonSpec \| null \| undefined)` | `—` | Built-in skeleton spec or resolver. |
1536
+ | `loading.cache` | `SkeletonCacheOptions` | `—` | Opts entry skeleton text into the cookie snapshot cache. |
1381
1537
  | `loading.minHeight` | `number \| string` | `"260px"` | Minimum reserved height while loading. |
1382
1538
  | `loading.nearMargin` | `string` | `"700px 0px"` | Preload margin used before entries enter view. |
1383
1539
  | `loading.viewMargin` | `string` | `"0px 0px"` | Margin used for the actual in-view gate. |
@@ -0,0 +1 @@
1
+ var N=1,T=6e5,I=250,K="rmg_skel_cache",W=/^(?:0|[1-9]\d{0,4})(?:\.\d{1,3})?(?:px|%)$/;function g(n){return !!n&&typeof n=="object"&&!Array.isArray(n)}function l(n,e){let t=Number(n);return !Number.isFinite(t)||e?.min!=null&&t<e.min||e?.max!=null&&t>e.max?null:e?.integer?Math.trunc(t):t}function f(n){return typeof n=="string"&&n.trim()?n.trim():null}function P(n){let e=f(n);return !e||!W.test(e)?null:e}function b(n,e){if(!Array.isArray(n)||e?.maxLength!=null&&n.length>e.maxLength)return;let t=[];for(let r of n){let i=l(r,{min:e?.min,max:e?.max});if(i==null)return;t.push(Math.round(i*1e3)/1e3);}return t}function E(n){if(Array.isArray(n)){let[s,h,o,c,a,m]=n,w=l(s,{min:1,max:64,integer:true});if(w==null)return null;let y=b(h,{maxLength:64,min:0,max:1e4}),k=o==null?void 0:l(o,{min:0,max:1e3}),S=c==null?void 0:l(c,{min:0,max:10}),C=a==null?void 0:l(a,{min:0,max:1e5}),x=Array.isArray(m)?m.map(P):void 0;return h!=null&&!y||o!=null&&k==null||c!=null&&S==null||a!=null&&C==null||x&&x.some(H=>!H)?null:{lines:w,...y?.length?{lineWidthsPx:y}:null,...k!=null?{barHeight:k}:null,...S!=null?{lineHeight:S}:null,...C!=null?{containerWidthPx:C}:null,...x?.length?{barWidths:x}:null}}if(!g(n))return null;let e=l(n.lines,{min:1,max:64,integer:true});if(e==null)return null;let t=Array.isArray(n.barWidths)?n.barWidths.map(P):void 0;if(t&&t.some(s=>!s))return null;let r=b(n.lineWidthsPx,{maxLength:64,min:0,max:1e4}),i=n.barHeight==null?void 0:l(n.barHeight,{min:0,max:1e3}),u=n.lineHeight==null?void 0:l(n.lineHeight,{min:0,max:10}),d=n.containerWidthPx==null?void 0:l(n.containerWidthPx,{min:0,max:1e5});return n.barHeight!=null&&i==null||n.lineHeight!=null&&u==null||n.containerWidthPx!=null&&d==null?null:{lines:e,...t?.length?{barWidths:t}:null,...r?.length?{lineWidthsPx:r}:null,...i!=null?{barHeight:i}:null,...u!=null?{lineHeight:u}:null,...d!=null?{containerWidthPx:d}:null}}function p(n){if(!g(n))return null;let e={};for(let[t,r]of Object.entries(n)){let i=f(t);if(!i)return null;let u=E(r);if(!u)return null;e[i]=u;}return e}function _(n){if(n==null)return;if(!g(n))return null;let e=f(n.variantKey??n.v);if(!e)return null;let t=(n.shellHeightPx??n.h)==null?void 0:l(n.shellHeightPx??n.h,{min:0,max:1e5}),r=b(n.itemHeightsPx??n.i,{maxLength:500,min:0,max:1e5});return (n.shellHeightPx??n.h)!=null&&t==null||(n.itemHeightsPx??n.i)!=null&&!r?null:{variantKey:e,...t!=null?{shellHeightPx:t}:null,...r?.length?{itemHeightsPx:r}:null}}function A(n){try{return decodeURIComponent(n)}catch{return n}}function M(n){let e=5381;for(let t=0;t<n.length;t++)e=(e<<5)+e^n.charCodeAt(t);return (e>>>0).toString(36)}function O(n){return n.trim().replace(/[^a-zA-Z0-9_-]+/g,"_").replace(/^_+|_+$/g,"").slice(0,48)||"default"}function L(n){if(!g(n)||(n.version??n.v)!==1)return null;let e=f(n.key??n.k),t=f(n.scopeId??n.s),r=n.kind??n.d,i=r==="s"||r==="skeleton"?"skeleton":r==="l"||r==="slider"?"slider":r==="g"||r==="grid"?"grid":r==="m"||r==="masonry"?"masonry":r==="e"||r==="entries"?"entries":null,u=l(n.createdAt??n.t,{min:1}),d=l(n.widthBucketMin??n.b,{min:0,max:1e5}),s=l(n.viewportWidth??n.w,{min:1,max:1e5}),h=n.layoutWidthPx??n.l,o=h==null?void 0:l(h,{min:0,max:1e5}),c=(n.routeKey??n.r)==null?void 0:f(n.routeKey??n.r),a=p(n.text??n.x),m=_(n.masonry??n.m);return !e||!t||!i||u==null||d==null||s==null||h!=null&&o==null||(n.routeKey??n.r)!=null&&!c||!a||m===null?null:{version:1,key:e,scopeId:t,kind:i,...c?{routeKey:c}:null,createdAt:u,widthBucketMin:d,viewportWidth:s,...o!=null?{layoutWidthPx:o}:null,...m?{masonry:m}:null,text:a}}function z(n){let e=typeof n=="string"&&n.trim()?n.trim():"default";return `${K}_${O(e)}_${M(e)}`}function B(n){let e={};for(let[t,r]of Object.entries(n.text)){let i=[r.lines,r.lineWidthsPx?.length?r.lineWidthsPx:void 0,r.barHeight,r.lineHeight,r.containerWidthPx,r.barWidths?.length?r.barWidths:void 0];for(;i.length>1&&i[i.length-1]==null;)i.pop();e[t]=i;}return JSON.stringify({v:1,k:n.key,s:n.scopeId,d:n.kind==="masonry"?"m":n.kind==="slider"?"l":n.kind==="grid"?"g":n.kind==="entries"?"e":"s",...n.routeKey?{r:n.routeKey}:null,t:n.createdAt,b:n.widthBucketMin,w:n.viewportWidth,...n.layoutWidthPx!=null?{l:n.layoutWidthPx}:null,...n.masonry?{m:{v:n.masonry.variantKey,...n.masonry.shellHeightPx!=null?{h:n.masonry.shellHeightPx}:null,...n.masonry.itemHeightsPx?.length?{i:n.masonry.itemHeightsPx}:null}}:null,x:e})}function R(n,e={}){if(!n)return null;let t=typeof e.ttlMs=="number"&&Number.isFinite(e.ttlMs)?Math.max(0,e.ttlMs):6e5,i=(typeof e.now=="number"&&Number.isFinite(e.now)?e.now:Date.now())-n.createdAt;if(t>0&&(i<0||i>t)||e.key!=null&&n.key!==e.key||e.scopeId!=null&&n.scopeId!==e.scopeId||e.kind!=null&&n.kind!==e.kind||e.routeKey!=null&&n.routeKey!==e.routeKey||e.widthBucketMin!=null&&n.widthBucketMin!==e.widthBucketMin)return null;if(e.textIds?.length){for(let u of e.textIds)if(!n.text[u])return null}return e.variantKeys?.length&&n.masonry?.variantKey&&!e.variantKeys.includes(n.masonry.variantKey)||e.itemCount!=null&&n.masonry?.itemHeightsPx&&n.masonry.itemHeightsPx.length!==e.itemCount?null:n}function F(n,e={}){if(!n)return null;let t;try{t=JSON.parse(A(n));}catch{return null}return R(L(t),e)}function $(n=typeof window<"u"?window.location:void 0){return n?`${n.pathname}${n.search}`:""}export{N as a,T as b,I as c,z as d,B as e,R as f,F as g,$ as h};
@@ -1 +1 @@
1
- import {A,z,C,B,n,l,D}from'./chunk-45TZO7MN.mjs';import {b as b$1,c as c$1}from'./chunk-AU4O4KU4.mjs';import {f,h,e as e$1,d as d$1}from'./chunk-EWWWD475.mjs';import {a as a$1,d,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 m from'react';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var R={shell:"Ue",contentLayer:"y",loadingLayer:"x",contentLayerVisible:"Ve",contentLayerBlocked:"We",loadingLayerOverlay:"er",loadingLayerCompare:"rr",loadingLayerExit:"ir"};function L(e){return Math.round(e*1e3)/1e3}function ye(e){let o=globalThis.CSS;return o?.escape?o.escape(e):e.replace(/["\\]/g,"\\$&")}function le(e,o,t){return e.querySelector(`[${o}="${ye(t)}"]`)}function ge(e){let o=[];for(let t of e){if(t.width<=0||t.height<=0)continue;let n=o.find(i=>Math.abs(i.top-t.top)<=1.5);n?(n.left=Math.min(n.left,t.left),n.right=Math.max(n.right,t.right)):o.push({top:t.top,left:t.left,right:t.right});}return o.sort((t,n)=>t.top-n.top).map(t=>L(Math.max(0,t.right-t.left)))}function Se(e){let t=e.ownerDocument.createRange();t.selectNodeContents(e);try{let n=typeof t.getClientRects=="function"?ge(Array.from(t.getClientRects())):[];if(n.length)return n;let i=e.getBoundingClientRect();return i.width>0?[L(i.width)]:[]}finally{t.detach();}}function ke(e,o,t){let n=e?le(e,"data-rmg-skel-text-id",o):null,s=n?.querySelector('[data-rmg-skel-text-line="true"]')?.getBoundingClientRect().height,r=n?.getBoundingClientRect().height,d=s&&s>0&&r&&r>0?r/Math.max(1,t)/s:void 0;return {...s&&s>0?{barHeight:L(s)}:null,...d&&Number.isFinite(d)?{lineHeight:L(d)}:null}}function fe(e){let o={};for(let t of e.textIds){let n=le(e.contentRoot,"data-skeleton-text-id",t);if(!n)return null;let i=Se(n);if(!i.length)return null;let s=Math.max(1,i.length);o[t]={lines:s,lineWidthsPx:i,...ke(e.skeletonRoot,t,s)};}return o}function Re(e){return e?.querySelector('[data-rmg-skeleton-content-layer="true"]')??e??document}function Ce(e){let o=typeof e.cache.ttlMs=="number"&&Number.isFinite(e.cache.ttlMs)?Math.max(0,e.cache.ttlMs):6e5,t=Math.max(0,Math.ceil(o/1e3)),n=e.cache.cookie??{},i=n.sameSite??"lax",s=n.path??"/",r=n.secure||i==="none",d=e$1(e.snapshot);document.cookie=[`${d$1(e.cache.key)}=${encodeURIComponent(d)}`,`path=${s}`,`max-age=${t}`,`samesite=${i}`,r?"secure":""].filter(Boolean).join("; ");}function ce({cache:e,kind:o,scopeId:t,textIds:n,skeletonRootRef:i,shellRef:s,getGeometrySnapshot:r}){let d=n.join("");m.useEffect(()=>{if(!e?.key||!n.length)return;let y=0,u=0,g=false,S=typeof e.debounceMs=="number"&&Number.isFinite(e.debounceMs)?Math.max(0,e.debounceMs):250,k=()=>{if(g)return;let C=i.current,v=s?.current??null,w=Re(v),f=fe({textIds:n,skeletonRoot:C,contentRoot:w});if(!f)return;let a=r?.()??{widthBucketMin:0};if(!a)return;let l=document.documentElement,p=a.viewportWidth??(window.innerWidth||l.clientWidth||0);!Number.isFinite(p)||p<=0||Ce({cache:e,snapshot:{version:1,key:e.key,scopeId:t,kind:o,routeKey:e.routeKey??h(window.location),createdAt:Date.now(),widthBucketMin:Math.max(0,L(a.widthBucketMin)),viewportWidth:L(p),...a.layoutWidthPx!=null?{layoutWidthPx:L(a.layoutWidthPx)}:null,...a.masonry?{masonry:a.masonry}:null,text:f}});},h$1=C=>{window.clearTimeout(u),y&&window.cancelAnimationFrame(y),u=window.setTimeout(()=>{y=window.requestAnimationFrame(k);},C);};h$1(0);let x=()=>h$1(S);return window.addEventListener("resize",x),()=>{g=true,window.clearTimeout(u),y&&window.cancelAnimationFrame(y),window.removeEventListener("resize",x);}},[e,r,o,t,s,i,n,d]);}function H(...e){return e.filter(Boolean).join(" ")}function Me({skeletonNode:e$1,children:o,ready:t,enabled:n=true,force:i,timing:s,shellClassName:r,shellStyle:d$1,loadingShellStyle:y,contentClassName:u,contentStyle:g,contentOwnsWrapperLayout:S,loadingLayerFirst:k,contentWrapper:h,shellDataAttributes:x,shellRef:C}){let v=o!==void 0,w=a(),f=t===true,a$2=a$1(i),l=v&&n&&(a$2.enabled||!f),p=m.useMemo(()=>d({prefersReducedMotion:w,timing:s}),[w,s]),{showLoadingLayer:M,loadingExiting:T}=e({loadingActive:l,exitMs:p.exitMs,minVisibleMs:p.minVisibleMs}),c$1=m.useMemo(()=>b({loadingActive:l,loadingForced:i,contentReady:f}),[f,i,l]),E=m.useMemo(()=>c({exitMs:p.exitMs,compareMode:c$1.compareMode,loadingLayerOpacity:c$1.loadingLayerOpacity,opacityVarName:"--rmg-standalone-skeleton-opacity"}),[p.exitMs,c$1.compareMode,c$1.loadingLayerOpacity]);if(!v)return jsx(Fragment,{children:e$1});let b$1=n&&M,O=!n||c$1.compareMode||T||!b$1,_=n&&c$1.contentBlocked&&!T&&!S,B=h?h(o):o,P=b$1?jsx("div",{className:H(R.loadingLayer,S&&R.loadingLayerOverlay,c$1.compareMode&&R.loadingLayerCompare,T&&R.loadingLayerExit),style:E,"data-rmg-skeleton-loading-layer":"true",children:e$1}):null;return jsxs("div",{ref:C,className:H(R.shell,r),style:{...b$1?y:null,...d$1},"aria-busy":l?true:void 0,"data-rmg-skeleton-wrapper":"true","data-rmg-skeleton-ready":f?"true":"false","data-rmg-skeleton-compare":c$1.compareMode?"true":"false","data-rmg-skeleton-layout-owner":S?"content":"skeleton",...x,children:[k?P:null,jsx("div",{className:H(R.contentLayer,O&&R.contentLayerVisible,_&&R.contentLayerBlocked,u),style:{"--rmg-loading-fade-duration":`${p.exitMs}ms`,...g},"aria-hidden":O?void 0:true,"data-rmg-skeleton-content-layer":"true",children:B}),k?null:P]})}function Ie({layout:e,children:o,breakpoints:t,className:n$1,style:i,shellClassName:s,shellStyle:r,contentClassName:d,contentStyle:y,backgroundColor:u,radius:g,shimmer:S,disableShimmer:k,ariaLabel:h,ready:x,enabled:C$1,force:v,timing:w,cache:f$1}){let a=m.useMemo(()=>({...a$2,...t??{}}),[t]),l$1=m.useMemo(()=>a$3("skel_",{layout:e,breakpoints:a,backgroundColor:u,radius:g,shimmer:S,disableShimmer:k}),[e,a,u,g,S,k]),p=b$1(),M=c$1(f$1,p),T=m.useMemo(()=>Array.from(A(e,"__standalone__")),[e]),c=f(M?.snapshot,{key:M?.key,scopeId:l$1,kind:"skeleton",routeKey:M?.routeKey,ttlMs:M?.ttlMs,textIds:T}),E=m.useRef(null),b=m.useRef(null);ce({cache:M,kind:"skeleton",scopeId:l$1,textIds:T,skeletonRootRef:E,shellRef:b});let{layout:O,responsiveCss:_}=m.useMemo(()=>{let pe=0,me=()=>`n${++pe}`,A=[],ue=c?z(e,c.text,"__standalone__",a):e;return {layout:B(ue,me,A,"__standalone__",a),responsiveCss:C({scopeAttr:"data-rmg-skeleton-scope",scopeId:l$1,rules:A})}},[e,l$1,a,c]),B$1={...i,...u?{"--rmg-skel-bg":u}:null,...g!=null?{"--rmg-skel-radius":l(g)}:null,...k?null:n(S)};return jsx(Me,{skeletonNode:jsxs("div",{"data-rmg-skeleton-scope":l$1,ref:E,className:n$1,style:B$1,"aria-hidden":h?void 0:true,"aria-label":h,role:h?"status":void 0,"aria-live":h?"polite":void 0,children:[_?jsx("style",{dangerouslySetInnerHTML:{__html:_}}):null,jsx(D,{node:O,disableShimmer:k,breakpointMap:a})]}),ready:x,enabled:C$1,force:v,timing:w,shellClassName:s,shellStyle:r,contentClassName:d,contentStyle:y,shellRef:b,children:o})}export{ce as a,Me as b,Ie as c};
1
+ import {A,z,C,B,n,l,D}from'./chunk-45TZO7MN.mjs';import {b as b$1,c as c$1}from'./chunk-AU4O4KU4.mjs';import {f,h,e as e$1,d as d$1}from'./chunk-AOQIL2HW.mjs';import {a as a$1,d,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 m from'react';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var R={shell:"Ue",contentLayer:"y",loadingLayer:"x",contentLayerVisible:"Ve",contentLayerBlocked:"We",loadingLayerOverlay:"er",loadingLayerCompare:"rr",loadingLayerExit:"ir"};function L(e){return Math.round(e*1e3)/1e3}function ye(e){let o=globalThis.CSS;return o?.escape?o.escape(e):e.replace(/["\\]/g,"\\$&")}function le(e,o,t){return e.querySelector(`[${o}="${ye(t)}"]`)}function ge(e){let o=[];for(let t of e){if(t.width<=0||t.height<=0)continue;let n=o.find(i=>Math.abs(i.top-t.top)<=1.5);n?(n.left=Math.min(n.left,t.left),n.right=Math.max(n.right,t.right)):o.push({top:t.top,left:t.left,right:t.right});}return o.sort((t,n)=>t.top-n.top).map(t=>L(Math.max(0,t.right-t.left)))}function Se(e){let t=e.ownerDocument.createRange();t.selectNodeContents(e);try{let n=typeof t.getClientRects=="function"?ge(Array.from(t.getClientRects())):[];if(n.length)return n;let i=e.getBoundingClientRect();return i.width>0?[L(i.width)]:[]}finally{t.detach();}}function ke(e,o,t){let n=e?le(e,"data-rmg-skel-text-id",o):null,s=n?.querySelector('[data-rmg-skel-text-line="true"]')?.getBoundingClientRect().height,r=n?.getBoundingClientRect().height,d=s&&s>0&&r&&r>0?r/Math.max(1,t)/s:void 0;return {...s&&s>0?{barHeight:L(s)}:null,...d&&Number.isFinite(d)?{lineHeight:L(d)}:null}}function fe(e){let o={};for(let t of e.textIds){let n=le(e.contentRoot,"data-skeleton-text-id",t);if(!n)return null;let i=Se(n);if(!i.length)return null;let s=Math.max(1,i.length);o[t]={lines:s,lineWidthsPx:i,...ke(e.skeletonRoot,t,s)};}return o}function Re(e){return e?.querySelector('[data-rmg-skeleton-content-layer="true"]')??e??document}function Ce(e){let o=typeof e.cache.ttlMs=="number"&&Number.isFinite(e.cache.ttlMs)?Math.max(0,e.cache.ttlMs):6e5,t=Math.max(0,Math.ceil(o/1e3)),n=e.cache.cookie??{},i=n.sameSite??"lax",s=n.path??"/",r=n.secure||i==="none",d=e$1(e.snapshot);document.cookie=[`${d$1(e.cache.key)}=${encodeURIComponent(d)}`,`path=${s}`,`max-age=${t}`,`samesite=${i}`,r?"secure":""].filter(Boolean).join("; ");}function ce({cache:e,kind:o,scopeId:t,textIds:n,skeletonRootRef:i,shellRef:s,getGeometrySnapshot:r}){let d=n.join("");m.useEffect(()=>{if(!e?.key||!n.length)return;let y=0,u=0,g=false,S=typeof e.debounceMs=="number"&&Number.isFinite(e.debounceMs)?Math.max(0,e.debounceMs):250,k=()=>{if(g)return;let C=i.current,v=s?.current??null,w=Re(v),f=fe({textIds:n,skeletonRoot:C,contentRoot:w});if(!f)return;let a=r?.()??{widthBucketMin:0};if(!a)return;let l=document.documentElement,p=a.viewportWidth??(window.innerWidth||l.clientWidth||0);!Number.isFinite(p)||p<=0||Ce({cache:e,snapshot:{version:1,key:e.key,scopeId:t,kind:o,routeKey:e.routeKey??h(window.location),createdAt:Date.now(),widthBucketMin:Math.max(0,L(a.widthBucketMin)),viewportWidth:L(p),...a.layoutWidthPx!=null?{layoutWidthPx:L(a.layoutWidthPx)}:null,...a.masonry?{masonry:a.masonry}:null,text:f}});},h$1=C=>{window.clearTimeout(u),y&&window.cancelAnimationFrame(y),u=window.setTimeout(()=>{y=window.requestAnimationFrame(k);},C);};h$1(0);let x=()=>h$1(S);return window.addEventListener("resize",x),()=>{g=true,window.clearTimeout(u),y&&window.cancelAnimationFrame(y),window.removeEventListener("resize",x);}},[e,r,o,t,s,i,n,d]);}function H(...e){return e.filter(Boolean).join(" ")}function Me({skeletonNode:e$1,children:o,ready:t,enabled:n=true,force:i,timing:s,shellClassName:r,shellStyle:d$1,loadingShellStyle:y,contentClassName:u,contentStyle:g,contentOwnsWrapperLayout:S,loadingLayerFirst:k,contentWrapper:h,shellDataAttributes:x,shellRef:C}){let v=o!==void 0,w=a(),f=t===true,a$2=a$1(i),l=v&&n&&(a$2.enabled||!f),p=m.useMemo(()=>d({prefersReducedMotion:w,timing:s}),[w,s]),{showLoadingLayer:M,loadingExiting:T}=e({loadingActive:l,exitMs:p.exitMs,minVisibleMs:p.minVisibleMs}),c$1=m.useMemo(()=>b({loadingActive:l,loadingForced:i,contentReady:f}),[f,i,l]),E=m.useMemo(()=>c({exitMs:p.exitMs,compareMode:c$1.compareMode,loadingLayerOpacity:c$1.loadingLayerOpacity,opacityVarName:"--rmg-standalone-skeleton-opacity"}),[p.exitMs,c$1.compareMode,c$1.loadingLayerOpacity]);if(!v)return jsx(Fragment,{children:e$1});let b$1=n&&M,O=!n||c$1.compareMode||T||!b$1,_=n&&c$1.contentBlocked&&!T&&!S,B=h?h(o):o,P=b$1?jsx("div",{className:H(R.loadingLayer,S&&R.loadingLayerOverlay,c$1.compareMode&&R.loadingLayerCompare,T&&R.loadingLayerExit),style:E,"data-rmg-skeleton-loading-layer":"true",children:e$1}):null;return jsxs("div",{ref:C,className:H(R.shell,r),style:{...b$1?y:null,...d$1},"aria-busy":l?true:void 0,"data-rmg-skeleton-wrapper":"true","data-rmg-skeleton-ready":f?"true":"false","data-rmg-skeleton-compare":c$1.compareMode?"true":"false","data-rmg-skeleton-layout-owner":S?"content":"skeleton",...x,children:[k?P:null,jsx("div",{className:H(R.contentLayer,O&&R.contentLayerVisible,_&&R.contentLayerBlocked,u),style:{"--rmg-loading-fade-duration":`${p.exitMs}ms`,...g},"aria-hidden":O?void 0:true,"data-rmg-skeleton-content-layer":"true",children:B}),k?null:P]})}function Ie({layout:e,children:o,breakpoints:t,className:n$1,style:i,shellClassName:s,shellStyle:r,contentClassName:d,contentStyle:y,backgroundColor:u,radius:g,shimmer:S,disableShimmer:k,ariaLabel:h,ready:x,enabled:C$1,force:v,timing:w,cache:f$1}){let a=m.useMemo(()=>({...a$2,...t??{}}),[t]),l$1=m.useMemo(()=>a$3("skel_",{layout:e,breakpoints:a,backgroundColor:u,radius:g,shimmer:S,disableShimmer:k}),[e,a,u,g,S,k]),p=b$1(),M=c$1(f$1,p),T=m.useMemo(()=>Array.from(A(e,"__standalone__")),[e]),c=f(M?.snapshot,{key:M?.key,scopeId:l$1,kind:"skeleton",routeKey:M?.routeKey,ttlMs:M?.ttlMs,textIds:T}),E=m.useRef(null),b=m.useRef(null);ce({cache:M,kind:"skeleton",scopeId:l$1,textIds:T,skeletonRootRef:E,shellRef:b});let{layout:O,responsiveCss:_}=m.useMemo(()=>{let pe=0,me=()=>`n${++pe}`,A=[],ue=c?z(e,c.text,"__standalone__",a):e;return {layout:B(ue,me,A,"__standalone__",a),responsiveCss:C({scopeAttr:"data-rmg-skeleton-scope",scopeId:l$1,rules:A})}},[e,l$1,a,c]),B$1={...i,...u?{"--rmg-skel-bg":u}:null,...g!=null?{"--rmg-skel-radius":l(g)}:null,...k?null:n(S)};return jsx(Me,{skeletonNode:jsxs("div",{"data-rmg-skeleton-scope":l$1,ref:E,className:n$1,style:B$1,"aria-hidden":h?void 0:true,"aria-label":h,role:h?"status":void 0,"aria-live":h?"polite":void 0,children:[_?jsx("style",{dangerouslySetInnerHTML:{__html:_}}):null,jsx(D,{node:O,disableShimmer:k,breakpointMap:a})]}),ready:x,enabled:C$1,force:v,timing:w,shellClassName:s,shellStyle:r,contentClassName:d,contentStyle:y,shellRef:b,children:o})}export{ce as a,Me as b,Ie as c};
@@ -1,3 +1,3 @@
1
- import {i,j,m,l,k,n as n$1,d}from'./chunk-4URHXPTV.mjs';import {a as a$2,b as b$2}from'./chunk-P6NLW2QN.mjs';import {A,z,n,l as l$1,a as a$3,m as m$1,D,v,c as c$1,o}from'./chunk-45TZO7MN.mjs';import {b,c}from'./chunk-AU4O4KU4.mjs';import {f}from'./chunk-EWWWD475.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import {a,b as b$1}from'./chunk-HK2DPKES.mjs';import*as h from'react';import {jsx,jsxs}from'react/jsx-runtime';var X={masonrySkeletonRoot:"or",masonrySkeletonCol:"sr",masonrySkeletonItem:"lr",masonrySkeletonLayoutItem:"z",masonrySkeletonLayoutItemInner:"dr"};function Fe(e,s){let r=`[data-rmg-mskel-scope="${v(e)}"]`,i=[];i.push(`${r} [data-rmg-mskel-variant]{display:none !important;}`);let a=s[0];a&&i.push(`${r} [data-rmg-mskel-variant="${a.key}"]{display:block !important;}`);for(let k of s)k.minWidth<=0||i.push(`@media (min-width:${k.minWidth}px){${r} [data-rmg-mskel-variant]{display:none !important;}${r} [data-rmg-mskel-variant="${k.key}"]{display:block !important;}}`);return i.join(`
1
+ import {i,j,m,l,k,n as n$1,d}from'./chunk-4URHXPTV.mjs';import {a as a$2,b as b$2}from'./chunk-CXH7XALE.mjs';import {A,z,n,l as l$1,a as a$3,m as m$1,D,v,c as c$1,o}from'./chunk-45TZO7MN.mjs';import {b,c}from'./chunk-AU4O4KU4.mjs';import {f}from'./chunk-AOQIL2HW.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import {a,b as b$1}from'./chunk-HK2DPKES.mjs';import*as h from'react';import {jsx,jsxs}from'react/jsx-runtime';var X={masonrySkeletonRoot:"or",masonrySkeletonCol:"sr",masonrySkeletonItem:"lr",masonrySkeletonLayoutItem:"z",masonrySkeletonLayoutItemInner:"dr"};function Fe(e,s){let r=`[data-rmg-mskel-scope="${v(e)}"]`,i=[];i.push(`${r} [data-rmg-mskel-variant]{display:none !important;}`);let a=s[0];a&&i.push(`${r} [data-rmg-mskel-variant="${a.key}"]{display:block !important;}`);for(let k of s)k.minWidth<=0||i.push(`@media (min-width:${k.minWidth}px){${r} [data-rmg-mskel-variant]{display:none !important;}${r} [data-rmg-mskel-variant="${k.key}"]{display:block !important;}}`);return i.join(`
2
2
  `)}function _(e,s){return `${e}:${s} !important;`}function Ke(e,s){let r=`[data-rmg-mskel-scope="${v(e)}"]`,i=[];for(let a of s){let k=a.items.some(M=>M.span>1),v$1=`${r} [data-rmg-mskel-variant="${v(a.state.key)}"]`;for(let M of a.containerCssRules??[]){let d=`${v$1}{`+Object.entries(M.rootDecls).map(([g,W])=>_(g,W)).join("")+"}",w=k?M.items.map(g=>`${`${v$1} > [data-rmg-mskel-index="${g.index}"]`}{`+[_("top",g.topCssExpr??"0px"),_("left",g.leftCssExpr),_("width",g.widthCssExpr)].join("")+"}").join(""):"";i.push(`@container (min-width:${M.minWidth}px){${d}${w}}`);}}return i.join(`
3
3
  `)}function De(e,s){let r=`[data-rmg-mskel-scope="${v(e)}"]`,i=[];for(let a of s){let k=a.items.some(l=>l.span>1),v$1=`${r} [data-rmg-mskel-variant="${v(a.state.key)}"]`,M=a.items.length?Math.max(0,...a.items.map(l=>l.safariTop+l.safariHeight)):0,d=[["height",a.safariShellHeightCssExpr??a.shellHeightCssExpr??`${M}px`],["--rmg-cols",a.state.columns],["--rmg-gap",`${a.state.gapPx}px`],...Object.entries(a.safariPositionedCssVars??{})],w=k?d:d.filter(([l])=>l!=="height"),g=`${v$1}{`+w.map(([l,N])=>_(l,N)).join("")+"}",W=a.items.map(l=>{let N=`${v$1} [data-rmg-mskel-index="${l.index}"]`,C=k?[_("height",l.safariHeightCssExpr),_("top",l.safariTopCssExpr??`${l.safariTop}px`)]:[_("height",l.safariHeightCssExpr)];return `${N}{`+C.join("")+"}"}).join(""),f=(a.safariContainerCssRules??[]).map(l=>{let N=Object.entries(l.rootDecls).filter(([L])=>k||L!=="height"),C=`${v$1}{`+N.map(([L,o])=>_(L,o)).join("")+"}",$=k?l.items.map(L=>`${`${v$1} [data-rmg-mskel-index="${L.index}"]`}{`+[_("top",L.topCssExpr??"0px"),_("left",L.leftCssExpr),_("width",L.widthCssExpr)].join("")+"}").join(""):"";return `@container (min-width:${l.minWidth}px){${C}${$}}`}).join("");i.push(`${g}${W}${f}`);}return i.length?`@supports ${c$1}{${i.join("")}}`:""}function He(e){if(!e)return {outerStyle:void 0,innerStyle:void 0};let s=o(e),r={};return s.boxShadow!=null&&(r["--rmg-masonry-skel-wrap-shadow"]=s.boxShadow,delete s.boxShadow),s.borderRadius!=null&&(r["--rmg-masonry-skel-wrap-shadow-radius"]=s.borderRadius),{outerStyle:Object.keys(r).length?r:void 0,innerStyle:s}}function Be(e){let{count:s,columns:r,gap:i$1,breakpoints:a$2,classNames:k,ratios:v,placement:M,spec:d$1,viewportWidth:w,layoutWidthPx:g,disableShimmer:W,cacheSnapshot:f}=e,l=h.useRef(g),N=l.current!==void 0?l.current:g,C=h.useMemo(()=>({...a,...a$2??{}}),[a$2]),$=h.useMemo(()=>a$1("mskel_",{count:s,columns:r,gap:i$1,breakpoints:C,ratios:v,heightsPx:e.heightsPx,spans:e.spans,placement:M,spec:d$1}),[s,r,i$1,C,v,e.heightsPx,e.spans,M,d$1]),L={...d$1?.backgroundColor?{"--rmg-skel-bg":d$1.backgroundColor}:null,...d$1?.radius!=null?{"--rmg-skel-radius":l$1(d$1.radius)}:null,...W?null:n(d$1?.shimmer,{enabledVarName:"--rmg-skel-card-shimmer-enabled"}),...!W&&(d$1?.shimmer?.c2??d$1?.highlightColor)!=null?{"--rmg-skel-shimmer-c2":d$1?.shimmer?.c2??d$1?.highlightColor}:null},o=h.useMemo(()=>{let E=f?.text&&d$1?{...d$1,layout:d$1.layout?z(d$1.layout,f.text,"masonry",C):d$1.layout}:d$1;return i({count:s,columns:r,gap:i$1,breakpoints:C,ratios:v,heightsPx:e.heightsPx,spans:e.spans,placement:M,spec:E,scopeId:$,viewportWidth:w,layoutWidthPx:N})},[f,s,r,i$1,C,v,e.heightsPx,e.spans,M,d$1,$,w,N]),z$1=w!==void 0,m=f?.masonry?.variantKey?o.variants.find(E=>E.state.key===f.masonry?.variantKey&&E.state.minWidth===f.widthBucketMin)??null:null,x=!!m,u=x?m.state.key:z$1?d(o.states,w):null,ne=h.useMemo(()=>x||z$1?null:Fe($,o.states),[x,z$1,$,o.variants]),I=h.useMemo(()=>x?"":Ke($,o.variants),[x,$,o.variants]),Z=h.useMemo(()=>x?"":De($,o.variants),[x,$,o.variants]),H=o.structuredLayout,j=k?.root??X.masonrySkeletonRoot,U=k?.column??X.masonrySkeletonCol,q=k?.item??(H?X.masonrySkeletonLayoutItem:X.masonrySkeletonItem),V=z$1&&N!==void 0&&Number.isFinite(Number(N))&&Number(N)>0,me=h.useMemo(()=>{let E=W?null:a$3.skelCardShimmer;return (m?[m]:o.variants).map(t=>{let T=t.items.some(n=>n.span>1),G=Math.max(0,...t.items.map(n=>n.top+n.height)),c=m?f?.masonry?.shellHeightPx:void 0,b=(n,B)=>{let A=m?f?.masonry?.itemHeightsPx?.[n]:void 0;return typeof A=="number"&&Number.isFinite(A)&&A>=0?A:B};if(!T){let n=Array.from({length:t.state.columns},()=>[]);for(let B of t.items)n[B.columnIndex].push(B);return jsx("div",{"data-rmg-mskel-variant":t.state.key,style:{width:"100%","--rmg-cols":t.state.columns,"--rmg-gap":`${t.state.gapPx}px`,...t.positionedCssVars??{},display:x||z$1?t.state.key===u?"block":"none":t.state.key===o.states[0]?.key?"block":"none"},children:jsx("div",{style:{width:"100%",display:"flex",alignItems:"flex-start",columnGap:`${t.state.gapPx}px`},children:n.map((B,A)=>jsx("div",{className:U,style:{flex:1,minWidth:0,display:"flex",flexDirection:"column"},children:B.map((R,oe)=>{let J=oe===B.length-1?"0px":`${t.state.gapPx}px`;if(!H)return jsx("div",{"data-rmg-mskel-index":R.index,className:[q,E].filter(Boolean).join(" "),style:{height:`${b(R.index,R.height)}px`,marginBottom:J}},`rmg-mskel-${t.state.key}-${R.index}`);let{outerStyle:se,innerStyle:p}=He(R.slot?.itemWrapStyle);return jsx("div",{"data-rmg-mskel-index":R.index,className:q,style:{...R.slot?.itemWrapStyle?m$1(R.slot.itemWrapStyle):null,...se??null,width:"100%",height:m?`${b(R.index,R.height)}px`:R.heightCssExpr,marginBottom:J},children:jsx("div",{className:[X.masonrySkeletonLayoutItemInner,E].filter(Boolean).join(" "),style:p,children:jsx("div",{style:{width:"100%"},children:jsx(D,{node:R.slot?.item??H.item,disableShimmer:true,breakpointMap:C})})})},`rmg-mskel-${t.state.key}-${R.index}`)})},A))})},t.state.key)}return jsx("div",{"data-rmg-mskel-variant":t.state.key,style:{position:"relative",width:"100%",height:c!=null?`${c}px`:H&&!V?t.shellHeightCssExpr??`${G}px`:`${G}px`,display:x||z$1?t.state.key===u?"block":"none":t.state.key===o.states[0]?.key?"block":"none","--rmg-cols":t.state.columns,"--rmg-gap":`${t.state.gapPx}px`,...t.positionedCssVars??{}},children:t.items.map(n=>{if(!H)return jsx("div",{"data-rmg-mskel-index":n.index,className:[q,E].filter(Boolean).join(" "),style:{position:"absolute",top:`${n.top}px`,left:n.leftCssExpr,width:n.widthCssExpr,height:`${b(n.index,n.height)}px`}},`rmg-mskel-${t.state.key}-${n.index}`);let{outerStyle:B,innerStyle:A}=He(n.slot?.itemWrapStyle);return jsx("div",{"data-rmg-mskel-index":n.index,className:q,style:{...n.slot?.itemWrapStyle?m$1(n.slot.itemWrapStyle):null,...B??null,position:"absolute",top:V?`${n.top}px`:n.topCssExpr??`${n.top}px`,left:V?`${n.leftPx}px`:n.leftCssExpr,width:V?`${n.widthPx}px`:n.widthCssExpr,height:m?`${b(n.index,n.height)}px`:V?`${n.height}px`:n.heightCssExpr,minWidth:0},children:jsx("div",{className:[X.masonrySkeletonLayoutItemInner,E].filter(Boolean).join(" "),style:A,children:jsx("div",{style:{width:"100%"},children:jsx(D,{node:n.slot?.item??H.item,disableShimmer:true,breakpointMap:C})})})},`rmg-mskel-${t.state.key}-${n.index}`)})},t.state.key)})},[q,U,o.variants,o.states,H,C,z$1,V,u,W,f,m]);return jsxs("div",{"data-rmg-mskel-scope":$,"data-rmg-skel-node":o.structuredNodeId,className:[j,d$1?.className].filter(Boolean).join(" "),style:{...L,...o.plainStructuredStyle||{},containerType:"inline-size",width:"100%"},children:[ne?jsx("style",{dangerouslySetInnerHTML:{__html:ne}}):null,o.responsiveCss?jsx("style",{dangerouslySetInnerHTML:{__html:o.responsiveCss}}):null,I?jsx("style",{dangerouslySetInnerHTML:{__html:I}}):null,me,Z?jsx("style",{dangerouslySetInnerHTML:{__html:Z}}):null]})}function je(e){return !!e&&typeof e=="object"&&!("kind"in e)&&"layout"in e&&e.layout?.kind==="masonry"}function Ae(e){return !!e&&typeof e=="object"&&"kind"in e&&e.kind==="masonry"}function qe(e){if(je(e))return e;let{className:s,backgroundColor:r,radius:i,shimmer:a,columns:k,gap:v,ratios:M,heightsPx:d,spans:w,placement:g,viewportWidth:W,layoutWidthPx:f,...l}=e;return {className:s,backgroundColor:r,radius:i,shimmer:a,layout:l}}function pe(e){return Math.round(e*1e3)/1e3}function Ge(e){for(let s of Array.from(e)){let r=window.getComputedStyle(s);if(r.display!=="none"&&r.visibility!=="hidden")return s}return null}function Oe(e,s){let r=new Map;return e.querySelectorAll(s).forEach(i=>{let a=Number(i.getAttribute("data-rmg-mskel-index")??i.getAttribute("data-rmg-idx"));!Number.isInteger(a)||a<0||r.set(a,pe(i.getBoundingClientRect().height));}),Array.from(r.entries()).sort((i,a)=>i[0]-a[0]).map(([,i])=>i)}function ht({layout:e,children:s,breakpoints:r,className:i$1,style:a$3,shellClassName:k$1,shellStyle:v,contentClassName:M,contentStyle:d,backgroundColor:w,radius:g,shimmer:W,disableShimmer:f$1,ariaLabel:l$2,ready:N,enabled:C,force:$,timing:L,masonry:o,cache:z$1}){let m$1=h.useMemo(()=>({...a,...r??{}}),[r]),x=h.useMemo(()=>a$1("skel_",{layout:e,breakpoints:m$1,backgroundColor:w,radius:g,shimmer:W,disableShimmer:f$1,masonry:o}),[e,m$1,w,g,W,f$1,o]),u=h.useMemo(()=>Ae(e)||je(e)?qe(e):null,[e]),ne=b(),I=c(z$1,ne),Z=u?.layout?.kind==="masonry"?u.layout:null,H=h.useMemo(()=>u?.layout?Array.from(A(u.layout,"masonry")):[],[u]),j$1=Ae(e)?e:null,U=h.useRef(null),q=h.useRef(null),V=o?.layoutWidthPx??j$1?.layoutWidthPx,[me,E]=h.useState(void 0),ge=V??me;h.useLayoutEffect(()=>{if(V!==void 0){E(P=>P===void 0?P:void 0);return}let p=U.current;if(!p)return;let O=P=>{let F=Number(P);!Number.isFinite(F)||F<=0||E(K=>K!=null&&Math.abs(K-F)<.5?K:F);},y=()=>{O(p.getBoundingClientRect().width);};if(y(),typeof ResizeObserver<"u"){let P=new ResizeObserver(F=>{let K=F[0];O(K?.contentRect.width);});return P.observe(p),()=>P.disconnect()}return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[V]);let t=u?{count:o?.count??(typeof Z?.count=="number"?Math.max(0,Z.count|0):1),columns:o?.columns??j$1?.columns,gap:o?.gap??j$1?.gap,ratios:o?.ratios??j$1?.ratios,heightsPx:o?.heightsPx??j$1?.heightsPx,spans:o?.spans??j$1?.spans,placement:o?.placement??j$1?.placement,viewportWidth:o?.viewportWidth??j$1?.viewportWidth,layoutWidthPx:ge,disableShimmer:f$1}:null,T=h.useMemo(()=>{let p=f(I?.snapshot,{key:I?.key,scopeId:x,kind:"masonry",routeKey:I?.routeKey,ttlMs:I?.ttlMs,textIds:H,itemCount:t?.count});return !p||!u||!t||!i({count:t.count,columns:t.columns,gap:t.gap,breakpoints:m$1,ratios:t.ratios,heightsPx:t.heightsPx,spans:t.spans,placement:t.placement,spec:u,scopeId:"__rmg_cache_validate__",viewportWidth:p.viewportWidth,layoutWidthPx:p.layoutWidthPx}).variants.some(y=>y.state.key===p.masonry?.variantKey&&y.state.minWidth===p.widthBucketMin)?null:p},[m$1,I?.key,I?.routeKey,I?.snapshot,I?.ttlMs,t,u,x,H]),G=h.useMemo(()=>!T?.text||!u?u:{...u,layout:u.layout?z(u.layout,T.text,"masonry",m$1):u.layout},[m$1,u,T]),c$1=h.useMemo(()=>t?T?{...t,viewportWidth:T.viewportWidth,layoutWidthPx:T.layoutWidthPx??t.layoutWidthPx}:t:null,[t,T]),b$3=h.useMemo(()=>{if(!G||!c$1)return null;let p=a$1("mseed_",{scopeId:x,breakpoints:m$1,masonry:c$1,spec:G}),O=i({count:c$1.count,columns:c$1.columns,gap:c$1.gap,breakpoints:m$1,ratios:c$1.ratios,heightsPx:c$1.heightsPx,spans:c$1.spans,placement:c$1.placement,spec:G,scopeId:p,respectLayoutCount:false,viewportWidth:c$1.viewportWidth,layoutWidthPx:c$1.layoutWidthPx}),y=j(O.variants,c$1.viewportWidth??b$1),P=T&&y?{...O,states:[y.state],variants:[y]}:O;return {scopeId:p,prediction:O,initialHeights:y?.items.map(F=>F.height),activeVariantKey:y?.state.key,activeWidthBucketMin:y?.state.minWidth,responsiveCss:k({scopeId:p,prediction:P}),shellReserveCss:l({scopeId:p,prediction:P}),shellReserveSafariCss:m({scopeId:p,prediction:P})}},[m$1,c$1?.columns,c$1?.count,c$1?.disableShimmer,c$1?.gap,c$1?.heightsPx,c$1?.layoutWidthPx,c$1?.placement,c$1?.ratios,c$1?.spans,c$1?.viewportWidth,G,x,T]),n$2=h.useCallback(()=>{let p=window.innerWidth||document.documentElement.clientWidth||b$1,O=b$3?.prediction,y=O?j(O.variants,p):null,P=U.current,F=q.current,K=P?Ge(P.querySelectorAll("[data-rmg-mskel-variant]")):null,ae=F?.querySelector("[data-rmg-masonry-layout-seed]")??null,fe=ae?.getBoundingClientRect()??P?.getBoundingClientRect()??null,ue=K?.getBoundingClientRect().height??ae?.getBoundingClientRect().height??(y?Math.max(0,...y.items.map(re=>re.top+re.height)):void 0),xe=K?Oe(K,"[data-rmg-mskel-index]"):ae?Oe(ae,"[data-rmg-idx]"):y?.items.map(re=>pe(re.height)),be=K?.getAttribute("data-rmg-mskel-variant")??y?.state.key;return !be||!y?null:{widthBucketMin:y.state.minWidth,viewportWidth:p,...fe?.width?{layoutWidthPx:pe(fe.width)}:null,masonry:{variantKey:be,...ue!=null&&Number.isFinite(ue)?{shellHeightPx:pe(ue)}:null,...xe?.length?{itemHeightsPx:xe}:null}}},[b$3]);a$2({cache:I,kind:"masonry",scopeId:x,textIds:H,skeletonRootRef:U,shellRef:q,getGeometrySnapshot:n$2});let B={...a$3,...w?{"--rmg-skel-bg":w}:null,...g!=null?{"--rmg-skel-radius":l$1(g)}:null,...f$1?null:n(W)},A$1=G&&c$1?jsx("div",{"data-rmg-skeleton-scope":x,ref:U,className:i$1,style:B,"aria-hidden":l$2?void 0:true,"aria-label":l$2,role:l$2?"status":void 0,"aria-live":l$2?"polite":void 0,children:jsx(Be,{...c$1,spec:G,breakpoints:m$1,cacheSnapshot:T})}):null,R=h.useCallback(p=>b$3?jsx(n$1,{value:b$3,children:p}):p,[b$3]);if(!A$1)return null;let oe=s!==void 0&&!!b$3?.scopeId,J=oe&&C!==false&&N!==true&&!!b$3?.shellReserveCss,se=jsx(b$2,{skeletonNode:A$1,ready:N,enabled:C,force:$,timing:L,shellClassName:k$1,shellStyle:v,contentClassName:M,contentStyle:d,contentOwnsWrapperLayout:s!==void 0,loadingLayerFirst:s!==void 0,contentWrapper:R,shellDataAttributes:J?{"data-rmg-masonry-skeleton-shell":b$3.scopeId}:void 0,shellRef:q,children:s});return oe?jsxs("div",{style:{containerType:"inline-size",width:"100%"},children:[J?jsx("style",{dangerouslySetInnerHTML:{__html:b$3.shellReserveCss}}):null,se,J&&b$3.shellReserveSafariCss?jsx("style",{dangerouslySetInnerHTML:{__html:b$3.shellReserveSafariCss}}):null]}):se}export{ht as a};
@@ -0,0 +1,2 @@
1
+ import {a as a$3}from'./chunk-CXH7XALE.mjs';import {n,g,h as h$1,w,x,b as b$2,k,y,t,j,s}from'./chunk-45TZO7MN.mjs';import {b as b$1,c}from'./chunk-AU4O4KU4.mjs';import {f}from'./chunk-AOQIL2HW.mjs';import {b,a}from'./chunk-Z34PSRMG.mjs';import {a as a$2}from'./chunk-UUAWLGWO.mjs';import {a as a$1}from'./chunk-LVYED5ZM.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import {a as a$5}from'./chunk-L2HRIINV.mjs';import {a as a$4}from'./chunk-HK2DPKES.mjs';import*as h from'react';import {jsx,jsxs}from'react/jsx-runtime';function zt(){let e=window.innerWidth||document.documentElement.clientWidth||0,t=window.innerHeight||document.documentElement.clientHeight||0;return {top:0,left:0,right:e,bottom:t,width:e,height:t}}function me(e,t){return e?e.endsWith("%")?t*parseFloat(e)/100:parseFloat(e)||0:0}function Gt(e,t){let n=e.trim().split(/\s+/).filter(Boolean),[r,i=r,o=r,a=i]=[n[0]??"0px",n[1],n[2],n[3]];return {top:me(r,t.height),right:me(i,t.width),bottom:me(o,t.height),left:me(a,t.width)}}function st(e,t,n){let r=e.getBoundingClientRect();if(r.width<=0||r.height<=0)return 0;let i=t instanceof Element?t.getBoundingClientRect():zt(),o=Gt(n,i),a={top:i.top-o.top,left:i.left-o.left,right:i.right+o.right,bottom:i.bottom+o.bottom},s=Math.max(0,Math.min(r.right,a.right)-Math.max(r.left,a.left)),p=Math.max(0,Math.min(r.bottom,a.bottom)-Math.max(r.top,a.top)),v=s*p,k=r.width*r.height;return k>0?v/k:0}function lt(e,t){return t<=0?e>0:e>=t}function Ut(e,t){if(Array.isArray(e)){let n=e[0];return typeof n=="number"?n:t}return typeof e=="number"?e:t}function ct(e,t){let n=t?.nearMargin??"700px 0px",r=t?.viewMargin??"0px 0px",i=Ut(t?.threshold,.01),o=0,a=t?.root??null,[s,p]=h.useState(()=>Array.from({length:e},()=>false)),[v,k]=h.useState(()=>Array.from({length:e},()=>false)),g=h.useRef(null),u=h.useRef(null),c=h.useRef(new Map),M=h.useRef([]),E=h.useCallback((y,l)=>{if(typeof window>"u"||!y)return;let m=st(y,a,n);lt(m,i)&&p(w=>{if(w[l])return w;let x=w.slice();return x[l]=true,x});let b=st(y,a,r);lt(b,o)&&k(w=>{if(w[l])return w;let x=w.slice();return x[l]=true,x});},[o,n,i,a,r]);h.useEffect(()=>{M.current=Array.from({length:e},()=>null),p(Array.from({length:e},()=>false)),k(Array.from({length:e},()=>false)),c.current.clear(),g.current?.disconnect(),u.current?.disconnect(),g.current=null,u.current=null;},[e]),h.useEffect(()=>{if(!(typeof window>"u")){if(g.current?.disconnect(),u.current?.disconnect(),typeof IntersectionObserver>"u"){for(let[y,l]of c.current.entries())E(y,l);return}g.current=new IntersectionObserver(y=>{p(l=>{let m=l,b=false;for(let w of y){let x=c.current.get(w.target);if(x==null||x<0||x>=e)continue;let S=!!w.isIntersecting;S!==l[x]&&(b||(m=l.slice(),b=true),m[x]=S);}return b?m:l});},{root:a,rootMargin:n,threshold:i}),u.current=new IntersectionObserver(y=>{k(l=>{let m=l,b=false;for(let w of y){let x=c.current.get(w.target);x==null||x<0||x>=e||w.isIntersecting&&!l[x]&&(b||(m=l.slice(),b=true),m[x]=true);}return b?m:l});},{root:a,rootMargin:r,threshold:o});for(let[y]of c.current)g.current.observe(y),u.current.observe(y);for(let[y,l]of c.current.entries())E(y,l);return ()=>{g.current?.disconnect(),u.current?.disconnect(),g.current=null,u.current=null;}}},[o,e,n,i,a,E,r]);let W=h.useCallback(y=>l=>{let m=M.current[y]??null;m&&m!==l&&(c.current.delete(m),g.current?.unobserve(m),u.current?.unobserve(m)),M.current[y]=l,l&&(c.current.set(l,y),E(l,y),g.current?.observe(l),u.current?.observe(l));},[E]);return {nearView:s,everInView:v,setEntryRef:W}}function Xt(e){let t=e??[],n=`${t.length}|`;for(let r=0;r<t.length;r++){let i=t[r];n+=(i?.key??i?.id??`i${r}`)+"|";}return n}function Yt(e,t){return new Promise(n=>{let r=new Image;r.decoding="async",r.src=e;let i=()=>n();if(t?.aborted)return i();if(t?.addEventListener("abort",i,{once:true}),typeof r.decode=="function"){r.decode().catch(()=>{}).finally(i);return}if(r.complete)return i();r.onload=i,r.onerror=i;})}function dt(e,t,n,r){let i=r?.timeoutMs??8e3,o=h.useMemo(()=>Xt(t),[t]),a=h.useMemo(()=>(t??[]).map(c=>(c.media??[]).filter(M=>M?.kind==="image"&&typeof M?.src=="string").map(M=>M.src)),[t]),[s,p]=h.useState([]),v=h.useRef([]),k=h.useRef(new Map),g=h.useRef("");return h.useEffect(()=>{if(!e)return;let u=t?.length??0;if(g.current!==o){g.current=o,p(Array.from({length:u},(c,M)=>(a[M]?.length??0)===0)),v.current=Array.from({length:u},()=>false);for(let[,c]of k.current)c.abort();k.current.clear();}},[e,o,t,a]),h.useEffect(()=>{if(!e)return;let u=t?.length??0;if(u)for(let c=0;c<u;c++){let M=!!n[c],E=s[c]??false,W=v.current[c]??false;if(!M||E||W)continue;v.current[c]=true;let y=a[c]??[];if(!y.length){p(m=>{if(m[c])return m;let b=m.slice();return b[c]=true,b});continue}let l=new AbortController;k.current.set(c,l),(async()=>{for(let m of y){if(l.signal.aborted)return;await Promise.race([Yt(m,l.signal),new Promise(b=>{let w=window.setTimeout(b,i);l.signal.addEventListener("abort",()=>{window.clearTimeout(w),b();},{once:true});})]);}l.signal.aborted||p(m=>{if(!m||c<0||c>=m.length||m[c])return m;let b=m.slice();return b[c]=true,b});})();}},[e,t,a,n,s,i]),h.useEffect(()=>()=>{for(let[,u]of k.current)u.abort();k.current.clear();},[]),{decodedReady:s,entriesKey:o}}function Qt(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function ut(e){return h.useMemo(()=>{let t=e.loading??{},n=typeof t.nearMargin=="string"?t.nearMargin:"700px 0px",r=typeof t.viewMargin=="string"?t.viewMargin:"0px 0px",i=typeof t.threshold=="number"&&!Number.isNaN(t.threshold)?t.threshold:.01,o=t.waitForDecode!==false,a=typeof t.decodeTimeoutMs=="number"&&t.decodeTimeoutMs>0?t.decodeTimeoutMs:8e3,s=Qt(t.minHeight)??"260px";return {enabled:t.enabled,force:t.force,skeleton:t.skeleton,minHeight:s,nearMargin:n,viewMargin:r,threshold:i,waitForDecode:o,decodeTimeoutMs:a,skeletonWrap:t.skeletonWrap}},[e.loading])}function mt(e){return h.useMemo(()=>{let t=e.intro??{};return {renderIntro:t.renderIntro,staggerMs:t.staggerMs??200,durationMs:t.durationMs??700,easing:t.easing??"cubic-bezier(.2,.7,.2,1)",staggerLimit:Math.max(0,(t.staggerLimit??6)|0)}},[e.intro])}var R={entryRow:"t",entrySkeletonWrap:"e",entrySkeletonBody:"W",entryInner:"c",entrySkelTile:"n",entryList:"ee",entrySkelRoot:"re",entrySkelGroup:"ie",entrySkelStack:"ae",entrySkelRow:"te",entrySkelCol:"ne",entrySkelText:"oe",entrySkelTextLine:"se",entrySkelRect:"le",entrySkelSquare:"de",entrySkelCircle:"me"};function Zt(){return {variant:"solid",minHeight:260}}function L(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function Le(e){if(!e)return {};let t=L(e.marginTop),n=L(e.marginRight),r=L(e.marginBottom),i=L(e.marginLeft),o={};return t!=null&&(o.marginTop=t),n!=null&&(o.marginRight=n),r!=null&&(o.marginBottom=r),i!=null&&(o.marginLeft=i),o}function ht(e,t){let n$1={};return e?.aspectRatio!=null&&(n$1.aspectRatio=e.aspectRatio),e?.width!=null&&(n$1.width=L(e.width)),e?.maxWidth!=null&&(n$1.maxWidth=L(e.maxWidth)),e?.height!=null&&(n$1.height=L(e.height)),e?.maxHeight!=null&&(n$1.maxHeight=L(e.maxHeight)),e?.aspectRatio!=null&&e?.height==null&&(n$1.height="auto"),e?.aspectRatio!=null&&e?.width==null&&e?.height==null&&(n$1.width="100%"),e?.backgroundColor&&(n$1["--rmg-skel-bg"]=e.backgroundColor),e?.borderRadius!=null&&(n$1["--rmg-skel-radius"]=L(e.borderRadius)),e?.overflow!=null&&(n$1.overflow=e.overflow),e?.alignSelf&&(n$1.alignSelf=e.alignSelf),Object.assign(n$1,n(t)),n$1}function ft(e,t){let n={};t!=null&&(n.height=`${t}px`);let r=L(e?.width),i=L(e?.maxWidth);return r!=null&&(n.width=r),i!=null&&(n.maxWidth=i),e?.alignSelf&&(n.alignSelf=e.alignSelf),n}function gt(e){let t={};return e&&(e.display!=null&&(t.display=e.display),e.gap!=null&&(t.gap=L(e.gap)),e.padding!=null&&(t.padding=L(e.padding)),e.align&&(t.alignItems=e.align),e.justify&&(t.justifyContent=e.justify),e.wrap&&(t.flexWrap="wrap"),e.width!=null&&(t.width=L(e.width)),e.maxWidth!=null&&(t.maxWidth=L(e.maxWidth)),e.overflow!=null&&(t.overflow=e.overflow)),t}function yt(e){return e.replace(/"/g,'\\"')}function St(e,t,n,r=a$4){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({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:r}).map(a=>({...a,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$2} [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 "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 a=e.children.map(s=>St(s,t,n,r));return {...e,...o?{__rmgNodeId:o}:null,children:a}}default:return e}}function en(e,t){if(!t.length)return "";let n=`[data-rmg-entry-skel-scope="${yt(e)}"]`,r=[];for(let i of t){let o=`${n} [data-rmg-skel-node="${yt(i.nodeId)}"]`;for(let a of i.rules){let s=a.raw?a.css.split("__NODE_SEL__").join(o):`${o}{${a.css}}`;a.minWidth<=0?r.push(s):a.query==="container"?r.push(`@container (min-width:${a.minWidth}px){${s}}`):r.push(`@media (min-width:${a.minWidth}px){${s}}`);}}return r.join(`
2
+ `)}function tn(e){if(e.barWidths?.length)return e.barWidths;if(e.lineWidthsPx?.length)return e.lineWidthsPx.map(t=>`${Math.max(0,t)}px`)}function nn(e){return Math.max(1,Math.min(64,Math.trunc(e)))}function Rt(e,t,n=a$4){if(!t)return e;if(e.kind==="text"){let r=e.textId?t[e.textId]:void 0;if(!r)return e;let i=nn(r.lines),o=tn(r),a=typeof r.barHeight=="number"&&Number.isFinite(r.barHeight)?r.barHeight:typeof e.barHeight=="number"?e.barHeight:g(e.barHeight,0,0,n),s=typeof r.lineHeight=="number"&&Number.isFinite(r.lineHeight)?r.lineHeight:typeof e.lineHeight=="number"?e.lineHeight:h$1(e.lineHeight,1,0,n);return {...e,barHeight:a,lineHeight:s,lines:i,...o?.length?{barWidth:o}:null,lastBarWidth:o?.[Math.min(i,o.length)-1]??e.lastBarWidth,responsiveBy:void 0}}return e.kind==="media"?e:e.kind==="stack"||e.kind==="row"||e.kind==="col"?{...e,children:e.children.map(r=>Rt(r,t,n))}:e}function Ie(e,t=new Set){return e?e.kind==="text"?(e.textId&&t.add(e.textId),t):(e.kind==="media"||(e.kind==="stack"||e.kind==="row"||e.kind==="col")&&e.children.forEach(n=>Ie(n,t)),t):t}function pt(e){let{kind:t,style:n,shimmer:r,breakpointMap:i,mediaTile:o}=e,a=t==="circle"?R.entrySkelCircle:t==="square"?R.entrySkelSquare:R.entrySkelRect,s$1=s(n,i),p=e.__rmgNodeId;return jsx("div",{"data-rmg-skel-node":p,"data-rmg-skel-media-tile":o?"true":void 0,className:[R.entrySkelTile,a].join(" "),style:{...ht(s$1,r),...Le(s$1)}})}function rn({node:e,breakpointMap:t}){let n=j({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:t}),r=s(e.style,t),i=n.responsiveBy==="container"&&n.usesResponsiveBarCss,o=n.states.some(({state:g})=>g.lineCount!==n.baseState.lineCount||g.metrics.totalHeight!==n.baseState.metrics.totalHeight||g.metrics.barHeight!==n.baseState.metrics.barHeight||g.metrics.paddingBlock!==n.baseState.metrics.paddingBlock||g.metrics.rowGap!==n.baseState.metrics.rowGap),a=n.states.some(({state:g})=>g.lineCount!==n.baseState.lineCount||g.barWidths.length!==n.baseState.barWidths.length||g.barWidths.some((u,c)=>u!==n.baseState.barWidths[c])),s$1=e.__rmgNodeId,p=ft(i?void 0:r,o?void 0:n.metrics.totalHeight),v={height:n.metrics.barHeight,backgroundColor:r?.backgroundColor,borderRadius:r?.borderRadius},k=jsx("div",{"data-rmg-skel-node":s$1,"data-rmg-skel-text":"true","data-rmg-skel-text-id":e.textId,className:R.entrySkelText,style:{...p,...i?null:Le(r),...o?null:{paddingBlock:`${n.metrics.paddingBlock}px`,rowGap:`${n.metrics.rowGap}px`}},children:Array.from({length:n.maxLines}).map((g,u)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[R.entrySkelTile,R.entrySkelTextLine].join(" "),style:{...ht(v,e.shimmer),...a?null:{display:u>=n.baseLines?"none":void 0,width:"100%",maxWidth:n.baseState.barWidths[u]??"100%"}}},u))});return i?jsx("div",{"data-rmg-skel-text-container":"true",style:{...ft(r),...Le(r),containerType:"inline-size"},children:k}):k}function kt({node:e,breakpointMap:t$1}){switch(e.kind){case "rect":case "square":case "circle":return jsx(pt,{...e,breakpointMap:t$1});case "media":{let n=Math.max(0,e.count|0),r=e.direction??"row",i=e.tile?.shape??"rect",o=e.__rmgNodeId,a=gt(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":o,className:[R.entrySkelGroup,r==="row"?R.entrySkelRow:R.entrySkelCol].join(" "),style:a,children:Array.from({length:n}).map((s,p)=>jsx(pt,{kind:i,style:e.tile?.style,shimmer:e.tile?.shimmer,breakpointMap:t$1,mediaTile:true},p))})}case "stack":case "row":case "col":{let n=e.kind==="row"?R.entrySkelRow:e.kind==="col"?R.entrySkelCol:R.entrySkelStack,r=e.__rmgNodeId,i=gt(t(e.style,t$1));return jsx("div",{"data-rmg-skel-node":r,className:[R.entrySkelGroup,n].join(" "),style:i,children:e.children.map((o,a)=>jsx(kt,{node:o,breakpointMap:t$1},a))})}case "text":return jsx(rn,{node:e,breakpointMap:t$1});default:{return null}}}function bt({spec:e,className:t,breakpoints:n$1,cacheSnapshot:r}){let i=e??Zt(),o=h.useMemo(()=>({...a$4,...n$1??{}}),[n$1]),a={...i.minHeight!=null?{minHeight:L(i.minHeight)}:null,...n(i.defaults?.shimmer)};if(i.defaults?.backgroundColor&&(a["--rmg-skel-bg"]=i.defaults.backgroundColor),i.defaults?.radius!=null&&(a["--rmg-skel-radius"]=L(i.defaults.radius)),i.variant==="solid"&&!i.layout)return jsx("div",{className:[R.entrySkelTile,t].filter(Boolean).join(" "),style:a});let s=h.useMemo(()=>({kind:"stack",style:{gap:12},children:[{kind:"rect",style:{height:18,width:"60%"}},{kind:"rect",style:{height:14,width:"90%"}},{kind:"media",count:2,direction:"row",style:{gap:10,wrap:true}}]}),[]),p=h.useMemo(()=>{let u=i.layout??s;return r?.text?Rt(u,r.text,o):u},[r,s,o,i.layout]),v=h.useMemo(()=>a$2("skel_",{breakpoints:o,className:t,layout:p,minHeight:i.minHeight,variant:i.variant}),[t,o,p,i.minHeight,i.variant]),{layout:k,responsiveCss:g}=h.useMemo(()=>{let u=0,c=()=>`n${++u}`,M=[],E=St(p,c,M,o),W=en(v,M);return {layout:E,responsiveCss:W}},[p,v,o]);return jsxs("div",{"data-rmg-entry-skel-scope":v,className:[R.entrySkelRoot,t].filter(Boolean).join(" "),style:a,children:[g?jsx("style",{dangerouslySetInnerHTML:{__html:g}}):null,jsx(kt,{node:k,breakpointMap:o})]})}var an=220,sn=220;function ln(e){let t=b({loadingActive:e.loadingActive&&e.shouldMountContent,loadingForced:e.loadingForced,contentReady:e.contentReady}),n=a(e.loadingForced),r=e.loadingActive&&n.enabled;return {compareMode:t.compareMode,revealContent:t.compareMode?true:r?false:e.defaultReveal,loadingLayerOpacity:t.loadingLayerOpacity}}function cn(e){if(!e)return;let t={...e};return t.boxShadow!=null&&(t["--rmg-entry-skel-wrap-shadow"]=t.boxShadow,delete t.boxShadow),t.borderRadius!=null&&(t["--rmg-entry-skel-wrap-shadow-radius"]=t.borderRadius),t}function wt(e,t){return String(e.key??e.id??t)}function vt(e){return e?e.split("\0"):[]}function fe(e,t){if(e.size===0)return e;let n=new Set(vt(t)),r=false,i=new Set;return e.forEach(o=>{n.has(o)?i.add(o):r=true;}),r?i:e}function dn(e,t){let n=false,r=new Set(e);return t.forEach(i=>{r.has(i)||(r.add(i),n=true);}),n?r:e}function xt({enabled:e,entries:t,fsEnabled:n,openFullscreenAt:r,entryFlatIndexRef:i,nodeFromMedia:o,renderMediaContainer:a$4,breakpoints:s,registerExpandableImage:p,entrySliderRefs:v}){let g=h.useRef(null),u=h.useRef(false),c$1=f=>{f.button!=null&&f.button!==0||(u.current=false,g.current={x:f.clientX,y:f.clientY});},M=f=>{let d=g.current;if(!d)return;let C=f.clientX-d.x,O=f.clientY-d.y;!u.current&&C*C+O*O>=36&&(u.current=true);},E=()=>{g.current=null,window.setTimeout(()=>{u.current=false;},0);},W=()=>u.current;function y(f,d){let C=t?.loading?.skeleton;if(typeof C=="function"){let O=C({entry:f,entryIndex:d});if(O&&typeof O=="object")return O}else if(C&&typeof C=="object")return C;return {variant:"solid",minHeight:260}}let l=t.items??[],m=l.length,b=h.useMemo(()=>l.map((f,d)=>wt(f,d)),[l]),w=b.join("\0"),[x,S]=h.useState(()=>new Set),[B,V]=h.useState(()=>new Set);h.useEffect(()=>{S(f=>fe(f,w)),V(f=>fe(f,w));},[w]);let X=h.useRef(0),Y=h.useRef([]);Y.current.length!==m&&(Y.current=Array.from({length:m},()=>-1),X.current=0);let D=ut(t),F=mt(t),oe=t?.loading,Et=oe?.enabled??true,ae=a(oe?.force),se=a$1(),Ct=b$1(),Q=c(oe?.cache,Ct),J=h.useMemo(()=>l.map((f,d)=>y(f,d)),[l,t.loading?.skeleton]),He=h.useMemo(()=>Array.from(J.reduce((f,d)=>(Ie(d.layout,f),f),new Set)),[J]),ge=h.useMemo(()=>a$2("esk_",{breakpoints:s,entryKeySignature:w,skeletons:J}),[s,w,J]),Lt=f(Q?.snapshot,{key:Q?.key,scopeId:ge,kind:"entries",routeKey:Q?.routeKey,ttlMs:Q?.ttlMs,textIds:He}),ye=h.useRef(null);a$3({cache:Q,kind:"entries",scopeId:ge,textIds:He,skeletonRootRef:ye,shellRef:ye});let A=e&&Et,pe=A&&!se&&(F.durationMs>0||F.staggerMs>0),{nearView:Ne,everInView:It,setEntryRef:Tt}=ct(m,{root:null,nearMargin:D.nearMargin,viewMargin:D.viewMargin,threshold:D.threshold}),Ht=A&&(!ae.enabled||ae.showContent),{decodedReady:Nt}=dt(Ht,l,Ne,{timeoutMs:D.decodeTimeoutMs}),he=Math.max(0,(se?0:an)-sn),[Bt,Se]=h.useState(()=>!(A&&(ae.enabled||m===0))),Ot=h.useCallback(f=>{S(d=>{if(d.has(f))return d;let C=new Set(d);return C.add(f),C});},[]),Z=false,Be=false,Oe=[],Wt=m?l.map((f,d)=>{let C=Ne[d]??false,O=It[d]??false,ee=Nt[d]??false,j=O||C,At=j&&(D.waitForDecode?ee:true),Pt=A?O&&(D.waitForDecode?ee:true):j,$=ln({loadingActive:A,loadingForced:oe?.force,shouldMountContent:j,contentReady:At,defaultReveal:Pt}),te=b[d]??wt(f,d),ce=$.revealContent,de=ce&&(!pe||$.compareMode||B.has(te));$.compareMode&&(Be=true),ce&&(Z=true);let Ft=de&&!$.compareMode&&x.has(te);ce&&!$.compareMode&&Oe.push(te);let Pe=null;if(j){let ne=f.media??[],Kt=i.current,qt=ne.map(($e,re)=>{let Ve=Kt?.[d]?.[re]??0,Re=typeof t.render?.media=="function"?t.render.media({entry:f,entryIndex:d,media:$e,mediaIndex:re}):o($e),ke=P=>{p?.(Ve,P);},Ke=P=>{P.preventDefault(),n&&r(Ve,P.currentTarget);};if(h.isValidElement(Re)){let P=Re,qe=P.props?.onClick,ie=P.ref,ze=_=>{typeof qe=="function"&&qe(_),!_.defaultPrevented&&Ke(_);};if(typeof P.type=="string"){let _=K=>{typeof ie=="function"?ie(K):ie&&typeof ie=="object"&&(ie.current=K),ke(K);};return h.cloneElement(P,{key:`${d}-${re}`,onClick:K=>{if(W()){K.preventDefault(),K.stopPropagation();return}ze(K);},onPointerDownCapture:c$1,onPointerMoveCapture:M,onPointerUpCapture:E,ref:_})}return jsx("span",{ref:ke,style:{display:"contents"},onPointerDownCapture:c$1,onPointerMoveCapture:M,onPointerUpCapture:E,children:h.cloneElement(P,{onClick:_=>{if(W()){_.preventDefault(),_.stopPropagation();return}ze(_);}})},`${d}-${re}`)}return jsx("div",{className:R.entryMediaButton,onClick:Ke,ref:ke,children:Re},`${d}-${re}`)}),je=a$4({entryIndex:d,entryInView:de,mediaNodes:qt,entrySliderRefs:v});Pe=typeof t.render?.card=="function"?t.render.card({entry:f,entryIndex:d,media:je}):je;}let Fe=F.staggerLimit,_t=Fe>0&&d<Fe?d:0,Dt=typeof t.render?.skeleton=="function"?t.render.skeleton({entry:f,entryIndex:d}):null,jt=J[d]??y(f,d),_e=D.skeletonWrap,$t=cn(_e?.style);ce&&Y.current[d]===-1&&(Y.current[d]=X.current++);let De=Y.current[d],Vt=De>=0?De*F.staggerMs:0;return jsxs("div",{ref:Tt(d),"data-rmg-entry-ready":de?"1":"0","data-rmg-entry-compare":$.compareMode?"1":"0","data-rmg-entry-mounted":j?"1":"0",className:[R.entryRow,t.entryRow?.className].filter(Boolean).join(" "),"data-rmg-entry-owner":d,style:{"--rmg-entry-min-height":D.minHeight,"--rmg-entry-intro-index":_t,"--rmg-entry-intro-delay":`${Vt}ms`,...t.entryRow?.style},children:[A?jsx("div",{className:[R.entrySkeletonWrap,_e?.className].filter(Boolean).join(" "),style:{"--rmg-entry-skeleton-opacity":$.loadingLayerOpacity,...$t??{}},"aria-hidden":"true","data-rmg-entry-skeleton":true,"data-rmg-entry-shimmer":Ft?"off":void 0,onTransitionEnd:ne=>{ne.currentTarget!==ne.target||ne.propertyName!=="opacity"||!de||$.compareMode||Ot(te);},children:jsx("div",{className:R.entrySkeletonBody,children:Dt??jsx(bt,{spec:jt,breakpoints:s,cacheSnapshot:Lt})})}):null,j?jsx("div",{className:R.entryInner,children:Pe}):null]},te)}):null,z=Oe.join("\0");h.useEffect(()=>{S(f=>fe(f,z)),V(f=>fe(f,z));},[z]),h.useEffect(()=>{if(!z)return;let f=vt(z),d=false,C=()=>{d||V(j=>dn(j,f));};if(!pe){C();return}if(typeof window>"u"||typeof window.requestAnimationFrame!="function"){C();return}let O=0,ee=0;return O=window.requestAnimationFrame(()=>{ee=window.requestAnimationFrame(C);}),()=>{d=true,window.cancelAnimationFrame(O),window.cancelAnimationFrame(ee);}},[z,pe]);let le=A&&(m===0||ae.enabled&&!Be&&!Z);h.useEffect(()=>{if(le){Se(false);return}if(!A||se||he===0){Se(A?Z:true);return}let f=window.setTimeout(()=>{Se(Z);},he);return ()=>{window.clearTimeout(f);}},[Z,he,A,se,le]);let We={ref:ye,"data-rmg-entry-skeleton-cache-scope":ge,className:[R.entryList,t.entryList?.className].filter(Boolean).join(" "),style:{"--rmg-entry-intro-stagger":`${F.staggerMs}ms`,"--rmg-entry-intro-duration":`${F.durationMs}ms`,"--rmg-entry-intro-easing":F.easing,...t.entryList?.style},"aria-busy":le?true:void 0},Ae=jsx("div",{...We,children:Wt});return F.renderIntro?F.renderIntro({active:!le&&Bt,containerProps:We},Ae):Ae}var Mt={mediaLayout:"slider"};var mn=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),fn=e=>!e||!e.length?[]:mn(e)?a$5(e):e,gn=e=>e?e.kind==="image":false;function yn(e){return e.kind==="image"?jsx("img",{src:e.src,alt:e.alt??""}):e.kind==="video"?jsx("video",{src:e.src,controls:true,preload:"metadata"}):null}function pn(e){let t=[],n=[],r=[],i=[];return e?.length?(e.forEach((o,a)=>{r[a]=[],(o.media??[]).forEach((s,p)=>{let v=t.length;t.push(s),n.push({entryIndex:a,mediaIndex:p}),i.push({entryIndex:a}),r[a][p]=v;});}),{flattenedMedia:t,flattenedMap:n,entryFlatIndex:r,owners:i}):{flattenedMedia:[],flattenedMap:[],entryFlatIndex:null,owners:[]}}function Yn(e){let{enabled:t=true,entries:n,fullscreen:r,renderMediaContainer:i,nodeFromMedia:o=yn}=e,a=h.useMemo(()=>({...n,mediaLayout:n?.mediaLayout??Mt.mediaLayout}),[n]),s=d(),p=h.useMemo(()=>s?.effectiveBreakpoints??{...a$4},[s?.effectiveBreakpoints]),v=e.entryFlatIndexRef??h.useRef(null),k=e.entryMapRef??h.useRef(null),g=e.fsOwnersRef??h.useRef([]),u=e.entrySliderRefs??h.useRef([]),c=s?.expandableImageRefs??h.useRef([]),M=s?.registerExpandableImage??h.useCallback((S,B)=>{if(!B){c.current[S]=null;return}if(B.tagName==="IMG"){c.current[S]=B;return}let V=B.querySelector("img");c.current[S]=V;},[]),{flattenedMedia:E,flattenedMap:W,entryFlatIndex:y,owners:l}=h.useMemo(()=>pn(a.items),[a.items]);h.useEffect(()=>{v.current=y,g.current=l,k.current=W;},[y,l,W,v,g,k]);let m=h.useMemo(()=>{let S=fn(r?.items);return S.length?S:E},[r?.items,E]);h.useEffect(()=>{s&&s.registerFullscreenAdapter("entries",{closestSelector:a.mediaLayout==="slider"?".rmg__slide":".rmg__grid-item",getOwnerSliderHandle:S=>{let B=k.current?.[S];return B?u.current?.[B.entryIndex]??null:null},getEntryContext:()=>({entryMapRef:k,entryMediaLayout:a.mediaLayout,entriesObject:a,entrySliderRefs:u,expandableImageRefs:s?.expandableImageRefs??c})});},[s,a]);let b=S=>S?S instanceof HTMLImageElement?S:S.querySelector("img"):null,w=h.useCallback((S,B)=>{if(!s?.requestFullscreenOpen)return;let V=m[S]??E[S];if(!gn(V))return;let X=b(B??null)??c.current[S]??null;X&&s.requestFullscreenOpen({source:"entries",index:S,image:X,event:void 0});},[s,c,m,E]),x=(r?.enabled??true)&&m.length>0;return jsx(xt,{enabled:!!t,entries:a,fsEnabled:!!x,openFullscreenAt:w,entryFlatIndexRef:v,nodeFromMedia:o,registerExpandableImage:M,renderMediaContainer:i,entrySliderRefs:u,breakpoints:p})}export{ct as a,dt as b,ut as c,mt as d,ln as e,xt as f,yn as g,pn as h,Yn as i};
@@ -0,0 +1,4 @@
1
+ import {a as a$2,b as b$2}from'./chunk-CXH7XALE.mjs';import {A,n,l,z,B,C,p,t,m,a as a$3,D,v,o}from'./chunk-45TZO7MN.mjs';import {b as b$1,c}from'./chunk-AU4O4KU4.mjs';import {f}from'./chunk-AOQIL2HW.mjs';import {f as f$1,c as c$1,d,e}from'./chunk-Y7NUGXTR.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import {a,i}from'./chunk-HK2DPKES.mjs';import*as b from'react';import {jsx,jsxs}from'react/jsx-runtime';var M={gridSkeletonOverlay:"Re",gridSkeletonGrid:"Se",gridSkeletonItem:"K",gridSkeletonItemInner:"Te"};function j(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function Se(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function he(e,t){let o=t[e];if(typeof o=="number"&&Number.isFinite(o))return o;let i=parseFloat(e);return Number.isNaN(i)?0:i}function Re(e){let{templateColumns:t,breakpointMap:o}=e;if(!Se(t))return [];let i=Object.entries(t).map(([l,s])=>({minWidth:he(l,o),template:typeof s=="string"?s.trim():""})).filter(l=>l.template.length>0).sort((l,s)=>l.minWidth-s.minWidth);return i.length===0?[]:(i[0].minWidth>0?i.unshift({minWidth:0,template:i[0].template}):i[0].minWidth<0&&(i[0]={...i[0],minWidth:0}),i)}function Ge(e){let{scopeId:t,columns:o,templateColumns:i$1,gap:l,breakpointMap:s,fallbackGap:k}=e,S=`${`[data-rmg-grid-skel-scope="${v(t)}"]`} .${M.gridSkeletonGrid}`,a=[],p=(n,r)=>{if(!r.length)return;let h=`${S}{${r.join("")}}`;if(n<=0){a.push(h);return}a.push(`@media (min-width:${n}px){${h}}`);},m=Re({templateColumns:i$1,breakpointMap:s});if(m.length>0)for(let n of m)p(n.minWidth,[`grid-template-columns:${n.template};`]);else if(j(o)){let n=i(o,1,s);for(let r of n)p(r.minWidth,[`grid-template-columns:repeat(${Math.max(1,r.count|0)}, minmax(0, 1fr));`]);}if(j(l)){let n=i(l,k,s);for(let r of n)p(r.minWidth,[`--rmg-grid-gap:${Math.max(0,r.count|0)}px;`]);}return a.join(`
2
+ `)}function Ce(e$1){let{scopeId:t,items:o,breakpointMap:i,allowSpan:l}=e$1;if(!l)return "";let s=[],k=`[data-rmg-grid-skel-scope="${v(t)}"]`;for(let d$1 of o){let S=d$1.span;if(!c$1(S))continue;let a=`${k} [data-rmg-grid-item-key="${v(d$1.id)}"]`,p=d(S,i);for(let m of p){let n=e(m.span);if(!n)continue;let r=`${a}{grid-column:${n};}`;if(m.minWidth<=0){s.push(r);continue}s.push(`@media (min-width:${m.minWidth}px){${r}}`);}}return s.join(`
3
+ `)}function be(e){let t={...e.gridStyle||{}};return e.minColumnWidth!=null&&t["--rmg-grid-min"]==null&&(t["--rmg-grid-min"]=typeof e.minColumnWidth=="number"?`${e.minColumnWidth}px`:e.minColumnWidth),!j(e.gap)&&e.gap!=null&&t["--rmg-grid-gap"]==null&&(t["--rmg-grid-gap"]=typeof e.gap=="number"?`${Math.max(0,e.gap|0)}px`:String(e.gap)),!Se(e.templateColumns)&&typeof e.templateColumns=="string"&&e.templateColumns.trim().length>0&&t.gridTemplateColumns==null?t.gridTemplateColumns=e.templateColumns.trim():e.templateColumns==null&&!j(e.columns)&&typeof e.columns=="number"&&Number.isFinite(e.columns)&&t.gridTemplateColumns==null&&(t.gridTemplateColumns=`repeat(${Math.max(1,e.columns|0)}, minmax(0, 1fr))`),t}function ue(){return {layout:{kind:"grid",item:{kind:"rect",style:{width:"100%",aspectRatio:1,borderRadius:12}},itemWrapStyle:void 0},radius:12}}function ve(e,t){if(!(!e&&!t))return {...e||{},...t||{}}}function Ne(e,t){let o=e.slots?.[t];return {item:o?.item??e.item,itemWrapStyle:ve(e.itemWrapStyle,o?.itemWrapStyle)}}function xe(e){if(!e)return {outerStyle:void 0,innerStyle:void 0};let t=o(e),o$1={};return t.boxShadow!=null&&(o$1["--rmg-grid-skel-wrap-shadow"]=t.boxShadow,delete t.boxShadow),t.borderRadius!=null&&(o$1["--rmg-grid-skel-wrap-shadow-radius"]=t.borderRadius),{outerStyle:Object.keys(o$1).length?o$1:void 0,innerStyle:t}}function ce({count:e,gridStyle:t$1,spec:o,breakpoints:i,columns:l$1,templateColumns:s,minColumnWidth:k,gap:d,items:S,allowItemSpans:a$2,disableShimmer:p$1,cacheSnapshot:m$1}){let n$1=o??ue(),r=b.useMemo(()=>({...a,...i??{}}),[i]),h=b.useMemo(()=>{let c=n$1.layout??ue().layout;return m$1?.text?z(c,m$1.text,"grid",r):c},[m$1,r,n$1.layout]),v=b.useMemo(()=>a$1("gskel_",{count:e,breakpoints:r,gridStyle:t$1,spec:o,columns:l$1,templateColumns:s,minColumnWidth:k,gap:d,items:S,allowItemSpans:a$2,disableShimmer:p$1}),[e,r,t$1,o,l$1,s,k,d,S,a$2,p$1]),W={...be({gridStyle:t$1,columns:l$1,templateColumns:s,minColumnWidth:k,gap:d}),...p$1?null:n(n$1.shimmer,{enabledVarName:"--rmg-skel-card-shimmer-enabled"})};n$1.backgroundColor&&(W["--rmg-skel-bg"]=n$1.backgroundColor),n$1.radius!=null&&(W["--rmg-skel-radius"]=l(n$1.radius));let{layout:F,responsiveCss:u,itemLayouts:E}=b.useMemo(()=>{let c=0,R=()=>`n${++c}`,N=[],x=B(h,R,N,"grid",r),G=C({scopeAttr:"data-rmg-grid-skel-scope",scopeId:v,rules:N}),C$1=h,y=Array.from({length:Math.max(0,typeof C$1.count=="number"?C$1.count|0:e|0)},(Ie,D)=>({id:`slot-${D}`,span:C$1.slots?.[D]?.span})),L=S??y,z=Ge({scopeId:v,columns:l$1,templateColumns:s,gap:d,breakpointMap:r,fallbackGap:typeof d=="number"&&Number.isFinite(d)?d:8}),P=Ce({scopeId:v,items:L,breakpointMap:r,allowSpan:!!a$2}),fe=[G,z,P].filter(Boolean).join(`
4
+ `);return {layout:x,responsiveCss:fe,itemLayouts:L}},[h,v,r,l$1,s,d,S,a$2]),g=F,I=g.__rmgNodeId,f=p(t(g.style,r)),V=g.count!=null?Math.max(0,g.count|0):Math.max(0,e|0);return jsxs("div",{"data-rmg-grid-skel-scope":v,className:[M.gridSkeletonOverlay,n$1.className].filter(Boolean).join(" "),children:[u?jsx("style",{dangerouslySetInnerHTML:{__html:u}}):null,jsx("div",{"data-rmg-skel-node":I,className:M.gridSkeletonGrid,style:{...W,...f||{},display:"grid"},children:Array.from({length:V}).map((c,R)=>{let N=E[R],{item:x,itemWrapStyle:G}=Ne(g,R),{outerStyle:C,innerStyle:y}=xe(G);return jsx("div",{"data-rmg-grid-item-key":N?.id,className:M.gridSkeletonItem,style:{...f$1({span:N?.span,allowSpan:!!a$2})||{},...G?m(G):null,...C||null},children:jsx("div",{className:[M.gridSkeletonItemInner,p$1?null:a$3.skelCardShimmer].filter(Boolean).join(" "),style:y,children:jsx(D,{node:x,disableShimmer:true,breakpointMap:r})})},`rmg-grid-skel-${R}`)})})]})}function ke(e){return !!e&&typeof e=="object"&&!("kind"in e)&&"layout"in e&&e.layout?.kind==="grid"}function ye(e){return !!e&&typeof e=="object"&&"kind"in e&&e.kind==="grid"}function We(e){if(ke(e))return e;let{className:t,backgroundColor:o,radius:i,shimmer:l,gridStyle:s,columns:k,templateColumns:d,minColumnWidth:S,gap:a,items:p,allowItemSpans:m,...n}=e;return {className:t,backgroundColor:o,radius:i,shimmer:l,layout:n}}function qe({layout:e,children:t,breakpoints:o,className:i,style:l$1,shellClassName:s,shellStyle:k,contentClassName:d,contentStyle:S,backgroundColor:a$3,radius:p,shimmer:m,disableShimmer:n$1,ariaLabel:r,ready:h,enabled:v,force:W,timing:F,grid:u,cache:E}){let g=b.useMemo(()=>({...a,...o??{}}),[o]),I=b.useMemo(()=>a$1("skel_",{layout:e,breakpoints:g,backgroundColor:a$3,radius:p,shimmer:m,disableShimmer:n$1,grid:u}),[e,g,a$3,p,m,n$1,u]),f$1=b.useMemo(()=>ye(e)||ke(e)?We(e):null,[e]),V=b$1(),c$1=c(E,V),R=b.useMemo(()=>f$1?.layout?Array.from(A(f$1.layout,"grid")):[],[f$1]),N=f(c$1?.snapshot,{key:c$1?.key,scopeId:I,kind:"grid",routeKey:c$1?.routeKey,ttlMs:c$1?.ttlMs,textIds:R}),x=b.useRef(null),G=b.useRef(null);a$2({cache:c$1,kind:"grid",scopeId:I,textIds:R,skeletonRootRef:x,shellRef:G});let C=f$1?.layout?.kind==="grid"?f$1.layout:null,y=ye(e)?e:null,L=f$1?{count:u?.count??(typeof C?.count=="number"?Math.max(0,C.count|0):1),gridStyle:u?.style??y?.gridStyle,columns:u?.columns??y?.columns,templateColumns:u?.templateColumns??y?.templateColumns,minColumnWidth:u?.minColumnWidth??y?.minColumnWidth,gap:u?.gap??y?.gap,items:u?.items??y?.items,allowItemSpans:u?.allowItemSpans??y?.allowItemSpans,disableShimmer:n$1}:null,z={...l$1,...a$3?{"--rmg-skel-bg":a$3}:null,...p!=null?{"--rmg-skel-radius":l(p)}:null,...n$1?null:n(m)},P=f$1&&L?jsx("div",{"data-rmg-skeleton-scope":I,ref:x,className:i,style:z,"aria-hidden":r?void 0:true,"aria-label":r,role:r?"status":void 0,"aria-live":r?"polite":void 0,children:jsx(ce,{...L,spec:f$1,breakpoints:g,cacheSnapshot:N})}):null;return P?jsx(b$2,{skeletonNode:P,ready:h,enabled:v,force:W,timing:F,shellClassName:s,shellStyle:k,contentClassName:d,contentStyle:S,contentOwnsWrapperLayout:t!==void 0,shellRef:G,children:t}):null}export{qe as a};
package/dist/core.d.mts CHANGED
@@ -4,7 +4,7 @@ import { B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
4
4
  import { MediaItem } from './media.mjs';
5
5
  import { a as GalleryCoreApi, m as SliderNodeInput, n as SliderRemoveTarget, j as SliderHandle, H as FullscreenOpenRequest } from './types-BiXSaEk7.mjs';
6
6
  export { G as GalleryApi, b as GalleryLayoutApi } from './types-BiXSaEk7.mjs';
7
- import { M as MediaEntryLink } from './responsive-BnHorKhC.mjs';
7
+ import { M as MediaEntryLink } from './responsive-Cwty6be5.mjs';
8
8
  import './force-C5m1QpdF.mjs';
9
9
  import './types-DXFoG8LC.mjs';
10
10
  import './transitions-DU3ftmIq.mjs';
@@ -12,6 +12,7 @@ import './plyrTypes-DhzgHNfX.mjs';
12
12
  import 'plyr';
13
13
  import './types-Dhh8xfHo.mjs';
14
14
  import './text-BBcRGVzn.mjs';
15
+ import './skeleton-cache.mjs';
15
16
  import 'plyr-react';
16
17
  import './types-DNd5jSkS.mjs';
17
18
  import 'react-dom/client';
@@ -1,5 +1,5 @@
1
- import { a as EntriesMediaContainerRender } from './index-QEgABhod.mjs';
2
- export { E as Entries, b as EntriesProps, E as default, f as flattenEntries, n as nodeFromMediaDefault } from './index-QEgABhod.mjs';
1
+ import { a as EntriesMediaContainerRender } from './index-C9XZ3Lr3.mjs';
2
+ export { E as Entries, b as EntriesProps, E as default, f as flattenEntries, n as nodeFromMediaDefault } from './index-C9XZ3Lr3.mjs';
3
3
  import * as React from 'react';
4
4
  import { j as SliderHandle, i as SliderOptions } from './types-BiXSaEk7.mjs';
5
5
  import { I as IntroOptions } from './types-Do4Pq-Td.mjs';
@@ -7,8 +7,8 @@ import { b as GridSkeletonSpec } from './GridSkeleton-Dpsi5tXc.mjs';
7
7
  import { SkeletonForceOptions, SkeletonTimingOptions } from './skeleton-base.mjs';
8
8
  import { I as IntroOptions$1 } from './types-Br27DWP7.mjs';
9
9
  import { b as MasonrySkeletonSpec } from './MasonrySkeleton-Cs0x-4yL.mjs';
10
- import { E as EntriesOptions } from './responsive-BnHorKhC.mjs';
11
- export { z as EntriesLoadingOptions, x as EntryCardRenderArgs, s as EntryItem, w as EntryMediaLayout, t as EntryMediaRenderArgs, u as EntryOverlayRenderArgs, v as EntryOverlayStyle, A as EntrySkeletonRenderArgs, y as EntrySkeletonResolverArgs, I as IntroOptions, M as MediaEntryLink, S as SlideOwner } from './responsive-BnHorKhC.mjs';
10
+ import { E as EntriesOptions } from './responsive-Cwty6be5.mjs';
11
+ export { z as EntriesLoadingOptions, x as EntryCardRenderArgs, s as EntryItem, w as EntryMediaLayout, t as EntryMediaRenderArgs, u as EntryOverlayRenderArgs, v as EntryOverlayStyle, A as EntrySkeletonRenderArgs, y as EntrySkeletonResolverArgs, I as IntroOptions, M as MediaEntryLink, S as SlideOwner } from './responsive-Cwty6be5.mjs';
12
12
  import * as react_jsx_runtime from 'react/jsx-runtime';
13
13
  import { B as BreakpointMap } from './responsiveNumber-CouEMJ9O.mjs';
14
14
  import { L as LoadingForceOptions } from './force-C5m1QpdF.mjs';
package/dist/entries.mjs CHANGED
@@ -1 +1 @@
1
- import {a as a$1}from'./chunk-MJD4OUYN.mjs';import {a as a$5}from'./chunk-4RPAI2F7.mjs';import {a as a$8}from'./chunk-YNQPSE2N.mjs';import {a}from'./chunk-H6XFG3CJ.mjs';import'./chunk-WGVWASZM.mjs';export{i as Entries,f as EntryList,i as default,h as flattenEntries,g as nodeFromMediaDefault,e as resolveEntryLoadingVisualState,b as useEntryDecodeReady,a as useEntryInView,d as useNormalizedEntriesIntro,c as useNormalizedEntriesLoading}from'./chunk-MLE7BKAD.mjs';import {a as a$a}from'./chunk-RFWZVERZ.mjs';import'./chunk-LVMYHM4T.mjs';import'./chunk-VWEQRZ24.mjs';import {a as a$9}from'./chunk-KJZTKXTM.mjs';import {a as a$7}from'./chunk-AHMXEVKY.mjs';import {b as b$1}from'./chunk-4URHXPTV.mjs';import {a as a$6}from'./chunk-ZCCYTID7.mjs';import'./chunk-P6NLW2QN.mjs';import'./chunk-45TZO7MN.mjs';import'./chunk-AU4O4KU4.mjs';import'./chunk-EWWWD475.mjs';import'./chunk-VPFAU2TE.mjs';import'./chunk-4NT4UVB5.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-HGY3QLCE.mjs';import {a as a$4}from'./chunk-MJAHN7TG.mjs';import'./chunk-Y7NUGXTR.mjs';import'./chunk-A6MPGIEJ.mjs';import'./chunk-D3T6HIS2.mjs';import'./chunk-AKY343WN.mjs';import'./chunk-X4HEGEZV.mjs';import'./chunk-UUAWLGWO.mjs';import {a as a$3}from'./chunk-STRS7UNJ.mjs';import'./chunk-LVYED5ZM.mjs';import {b}from'./chunk-UML6FCOQ.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import'./chunk-L2HRIINV.mjs';import'./chunk-B4CC5AGE.mjs';import {a as a$2}from'./chunk-HK2DPKES.mjs';import*as R from'react';import {jsx}from'react/jsx-runtime';var L={align:"start",direction:{dir:"ltr",axis:"x"},scroll:{loop:false,freeScroll:false,groupCells:false,skipSnaps:false},motion:{selectDuration:25,freeScrollDuration:43,friction:.68},elements:{container:{},viewport:{}},transitions:{intro:{staggerMs:0,durationMs:0}},plugins:[a(),a$1()]};function K(m){let{entryIndex:r,entryInView:p,mediaNodes:i,opts:t,entrySliderRefs:a}=m;if(!(Array.isArray(i)&&i.length>0))return a.current&&(a.current[r]=null),null;let l=d(),S=R.useMemo(()=>{let e=t?.sliderObject;return {...e??L,transitions:{...L.transitions,...e?.transitions??{},intro:{...L.transitions?.intro??{},...e?.transitions?.intro??{},inView:p}}}},[p,t?.sliderObject]),n=l?.effectiveBreakpoints??{...a$2};return jsx("div",{className:a$9.sliderShell,style:{minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height))"},children:jsx(a$a,{...S,breakpoints:n,ref:e=>{a.current[r]=e??null;},children:i})})}function J(m={}){let r=m.entrySliderRefs??{current:[]};return ({entryIndex:p,entryInView:i,mediaNodes:t,entrySliderRefs:a})=>jsx(K,{entryIndex:p,entryInView:i,mediaNodes:t,opts:m,entrySliderRefs:a??r})}function U(m){let{gridObject:r,gridLoading:p,gridIntro:i}=m;function t(n){return n?{enabled:n?.enabled,force:n?.force,skeleton:n?.skeleton,timing:n?.timing}:null}function a(n){return {renderIntro:n?.renderIntro,staggerMs:n?.staggerMs??40,durationMs:n?.durationMs??300,easing:n?.easing??"cubic-bezier(.2,.7,.2,1)",staggerLimit:n?.staggerLimit}}let s=t(p??r?.loading),l=a(i??r?.intro);function S(n){let{entryIndex:e,entryInView:f,mediaNodes:d$1}=n;if(!Array.isArray(d$1)||d$1.length===0)return null;let A=d(),I=b(),b$1=A?.effectiveBreakpoints??{...a$2},E=a$3(),c=R.useMemo(()=>d$1.map((o,k)=>({id:`entry-${e}-media-${k}`,node:o})),[e,d$1]),M=jsx(a$4,{ref:E.ref,cells:c,grid:r,renderMode:"passthrough",gridItemBaseClass:"",breakpoints:b$1,viewportWidth:I,intro:l,enableFullscreen:false,onOpen:()=>{},registerExpandableImage:()=>{},introReady:f??true});return s?.skeleton?jsx(a$5,{layout:s.skeleton,ready:E.ready,enabled:s.enabled,force:s.force,timing:s.timing,grid:{count:c.length,columns:r?.columns,templateColumns:r?.templateColumns,minColumnWidth:r?.minColumnWidth,gap:r?.gap},children:M}):M}return ({entryIndex:n,entryInView:e,mediaNodes:f})=>jsx(S,{entryIndex:n,entryInView:e,mediaNodes:f})}function q(m){let{masonryObject:r,masonryLoading:p,masonryIntro:i}=m,t=r??{};function a(e){return e?{enabled:e?.enabled,force:e?.force,skeleton:e?.skeleton,timing:e?.timing}:null}function s(e){return {renderIntro:e?.renderIntro,staggerMs:e?.staggerMs??40,durationMs:e?.durationMs??300,easing:e?.easing??"cubic-bezier(.2,.7,.2,1)",staggerLimit:e?.staggerLimit}}let l=a(p??t.loading),S=s(i??t.intro);function n(e){let{entryInView:f,mediaNodes:d$1}=e,I=d()?.effectiveBreakpoints??{...a$2},b=a$6(),c=R.useMemo(()=>!Array.isArray(d$1)||d$1.length===0?[]:d$1.map((o,k)=>{let y=b$1(o),h=y.node;return h==null?{key:`entries-masonry-${k}`,node:null,span:y.layoutMeta?.span}:y.layoutMeta?.className||y.layoutMeta?.style?{key:`entries-masonry-${k}`,span:y.layoutMeta?.span,node:jsx("div",{className:y.layoutMeta?.className,style:y.layoutMeta?.style,children:h})}:{key:`entries-masonry-${k}`,node:h,span:y.layoutMeta?.span}}),[d$1]).filter(o=>o.node!=null);if(c.length===0)return null;let M=jsx(a$7,{ref:b.ref,items:c.map(o=>jsx(R.Fragment,{children:o.node},o.key)),itemSpans:c.map(o=>o.span),masonry:t,breakpoints:I,intro:S,introReady:f??true});return l?.skeleton?jsx(a$8,{layout:l.skeleton,ready:b.ready,enabled:l.enabled,force:l.force,timing:l.timing,masonry:{count:c.length,columns:t.columns,gap:t.gap,placement:t.placement,spans:c.map(o=>o.span)},children:M}):M}return ({entryInView:e,mediaNodes:f})=>jsx(n,{entryInView:e,mediaNodes:f})}export{U as createEntriesGridMedia,q as createEntriesMasonryMedia,J as createEntriesSliderMedia};
1
+ import {a as a$1}from'./chunk-MJD4OUYN.mjs';import {a as a$5}from'./chunk-S356JN3V.mjs';import {a as a$8}from'./chunk-CXV4KHLX.mjs';import {a}from'./chunk-H6XFG3CJ.mjs';import'./chunk-WGVWASZM.mjs';export{i as Entries,f as EntryList,i as default,h as flattenEntries,g as nodeFromMediaDefault,e as resolveEntryLoadingVisualState,b as useEntryDecodeReady,a as useEntryInView,d as useNormalizedEntriesIntro,c as useNormalizedEntriesLoading}from'./chunk-QJ2YFMAT.mjs';import {a as a$a}from'./chunk-RFWZVERZ.mjs';import'./chunk-LVMYHM4T.mjs';import'./chunk-VWEQRZ24.mjs';import {a as a$9}from'./chunk-KJZTKXTM.mjs';import {a as a$7}from'./chunk-AHMXEVKY.mjs';import {b as b$1}from'./chunk-4URHXPTV.mjs';import {a as a$6}from'./chunk-ZCCYTID7.mjs';import'./chunk-CXH7XALE.mjs';import'./chunk-45TZO7MN.mjs';import'./chunk-AU4O4KU4.mjs';import'./chunk-AOQIL2HW.mjs';import'./chunk-VPFAU2TE.mjs';import'./chunk-4NT4UVB5.mjs';import'./chunk-Z34PSRMG.mjs';import'./chunk-HGY3QLCE.mjs';import {a as a$4}from'./chunk-MJAHN7TG.mjs';import'./chunk-Y7NUGXTR.mjs';import'./chunk-A6MPGIEJ.mjs';import'./chunk-D3T6HIS2.mjs';import'./chunk-AKY343WN.mjs';import'./chunk-X4HEGEZV.mjs';import'./chunk-UUAWLGWO.mjs';import {a as a$3}from'./chunk-STRS7UNJ.mjs';import'./chunk-LVYED5ZM.mjs';import {b}from'./chunk-UML6FCOQ.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import'./chunk-L2HRIINV.mjs';import'./chunk-B4CC5AGE.mjs';import {a as a$2}from'./chunk-HK2DPKES.mjs';import*as R from'react';import {jsx}from'react/jsx-runtime';var L={align:"start",direction:{dir:"ltr",axis:"x"},scroll:{loop:false,freeScroll:false,groupCells:false,skipSnaps:false},motion:{selectDuration:25,freeScrollDuration:43,friction:.68},elements:{container:{},viewport:{}},transitions:{intro:{staggerMs:0,durationMs:0}},plugins:[a(),a$1()]};function K(m){let{entryIndex:r,entryInView:p,mediaNodes:i,opts:t,entrySliderRefs:a}=m;if(!(Array.isArray(i)&&i.length>0))return a.current&&(a.current[r]=null),null;let l=d(),S=R.useMemo(()=>{let e=t?.sliderObject;return {...e??L,transitions:{...L.transitions,...e?.transitions??{},intro:{...L.transitions?.intro??{},...e?.transitions?.intro??{},inView:p}}}},[p,t?.sliderObject]),n=l?.effectiveBreakpoints??{...a$2};return jsx("div",{className:a$9.sliderShell,style:{minHeight:"var(--rmg-slider-initial-height, var(--rmg-slider-height))"},children:jsx(a$a,{...S,breakpoints:n,ref:e=>{a.current[r]=e??null;},children:i})})}function J(m={}){let r=m.entrySliderRefs??{current:[]};return ({entryIndex:p,entryInView:i,mediaNodes:t,entrySliderRefs:a})=>jsx(K,{entryIndex:p,entryInView:i,mediaNodes:t,opts:m,entrySliderRefs:a??r})}function U(m){let{gridObject:r,gridLoading:p,gridIntro:i}=m;function t(n){return n?{enabled:n?.enabled,force:n?.force,skeleton:n?.skeleton,timing:n?.timing}:null}function a(n){return {renderIntro:n?.renderIntro,staggerMs:n?.staggerMs??40,durationMs:n?.durationMs??300,easing:n?.easing??"cubic-bezier(.2,.7,.2,1)",staggerLimit:n?.staggerLimit}}let s=t(p??r?.loading),l=a(i??r?.intro);function S(n){let{entryIndex:e,entryInView:f,mediaNodes:d$1}=n;if(!Array.isArray(d$1)||d$1.length===0)return null;let A=d(),I=b(),b$1=A?.effectiveBreakpoints??{...a$2},E=a$3(),c=R.useMemo(()=>d$1.map((o,k)=>({id:`entry-${e}-media-${k}`,node:o})),[e,d$1]),M=jsx(a$4,{ref:E.ref,cells:c,grid:r,renderMode:"passthrough",gridItemBaseClass:"",breakpoints:b$1,viewportWidth:I,intro:l,enableFullscreen:false,onOpen:()=>{},registerExpandableImage:()=>{},introReady:f??true});return s?.skeleton?jsx(a$5,{layout:s.skeleton,ready:E.ready,enabled:s.enabled,force:s.force,timing:s.timing,grid:{count:c.length,columns:r?.columns,templateColumns:r?.templateColumns,minColumnWidth:r?.minColumnWidth,gap:r?.gap},children:M}):M}return ({entryIndex:n,entryInView:e,mediaNodes:f})=>jsx(S,{entryIndex:n,entryInView:e,mediaNodes:f})}function q(m){let{masonryObject:r,masonryLoading:p,masonryIntro:i}=m,t=r??{};function a(e){return e?{enabled:e?.enabled,force:e?.force,skeleton:e?.skeleton,timing:e?.timing}:null}function s(e){return {renderIntro:e?.renderIntro,staggerMs:e?.staggerMs??40,durationMs:e?.durationMs??300,easing:e?.easing??"cubic-bezier(.2,.7,.2,1)",staggerLimit:e?.staggerLimit}}let l=a(p??t.loading),S=s(i??t.intro);function n(e){let{entryInView:f,mediaNodes:d$1}=e,I=d()?.effectiveBreakpoints??{...a$2},b=a$6(),c=R.useMemo(()=>!Array.isArray(d$1)||d$1.length===0?[]:d$1.map((o,k)=>{let y=b$1(o),h=y.node;return h==null?{key:`entries-masonry-${k}`,node:null,span:y.layoutMeta?.span}:y.layoutMeta?.className||y.layoutMeta?.style?{key:`entries-masonry-${k}`,span:y.layoutMeta?.span,node:jsx("div",{className:y.layoutMeta?.className,style:y.layoutMeta?.style,children:h})}:{key:`entries-masonry-${k}`,node:h,span:y.layoutMeta?.span}}),[d$1]).filter(o=>o.node!=null);if(c.length===0)return null;let M=jsx(a$7,{ref:b.ref,items:c.map(o=>jsx(R.Fragment,{children:o.node},o.key)),itemSpans:c.map(o=>o.span),masonry:t,breakpoints:I,intro:S,introReady:f??true});return l?.skeleton?jsx(a$8,{layout:l.skeleton,ready:b.ready,enabled:l.enabled,force:l.force,timing:l.timing,masonry:{count:c.length,columns:t.columns,gap:t.gap,placement:t.placement,spans:c.map(o=>o.span)},children:M}):M}return ({entryInView:e,mediaNodes:f})=>jsx(n,{entryInView:e,mediaNodes:f})}export{U as createEntriesGridMedia,q as createEntriesMasonryMedia,J as createEntriesSliderMedia};
@@ -1,4 +1,4 @@
1
- import { F as FullscreenCaptionOptions, j as FullscreenPlugin } from './responsive-BnHorKhC.mjs';
1
+ import { F as FullscreenCaptionOptions, j as FullscreenPlugin } from './responsive-Cwty6be5.mjs';
2
2
  import './types-DXFoG8LC.mjs';
3
3
  import 'react';
4
4
  import './responsiveNumber-CouEMJ9O.mjs';
@@ -10,6 +10,7 @@ import './plyrTypes-DhzgHNfX.mjs';
10
10
  import 'plyr';
11
11
  import './types-Dhh8xfHo.mjs';
12
12
  import './text-BBcRGVzn.mjs';
13
+ import './skeleton-cache.mjs';
13
14
  import 'plyr-react';
14
15
  import './types-DNd5jSkS.mjs';
15
16
  import 'react-dom/client';
@@ -1,4 +1,4 @@
1
- import { e as FullscreenControlsOptions, j as FullscreenPlugin } from './responsive-BnHorKhC.mjs';
1
+ import { e as FullscreenControlsOptions, j as FullscreenPlugin } from './responsive-Cwty6be5.mjs';
2
2
  import './types-DXFoG8LC.mjs';
3
3
  import 'react';
4
4
  import './responsiveNumber-CouEMJ9O.mjs';
@@ -10,6 +10,7 @@ import './plyrTypes-DhzgHNfX.mjs';
10
10
  import 'plyr';
11
11
  import './types-Dhh8xfHo.mjs';
12
12
  import './text-BBcRGVzn.mjs';
13
+ import './skeleton-cache.mjs';
13
14
  import 'plyr-react';
14
15
  import './types-DNd5jSkS.mjs';
15
16
  import 'react-dom/client';
@@ -1,4 +1,4 @@
1
- import { f as FullscreenCrossfadeOptions, j as FullscreenPlugin } from './responsive-BnHorKhC.mjs';
1
+ import { f as FullscreenCrossfadeOptions, j as FullscreenPlugin } from './responsive-Cwty6be5.mjs';
2
2
  import './types-DXFoG8LC.mjs';
3
3
  import 'react';
4
4
  import './responsiveNumber-CouEMJ9O.mjs';
@@ -10,6 +10,7 @@ import './plyrTypes-DhzgHNfX.mjs';
10
10
  import 'plyr';
11
11
  import './types-Dhh8xfHo.mjs';
12
12
  import './text-BBcRGVzn.mjs';
13
+ import './skeleton-cache.mjs';
13
14
  import 'plyr-react';
14
15
  import './types-DNd5jSkS.mjs';
15
16
  import 'react-dom/client';
@@ -1,4 +1,4 @@
1
- import { g as FullscreenLazyLoadOptions, j as FullscreenPlugin } from './responsive-BnHorKhC.mjs';
1
+ import { g as FullscreenLazyLoadOptions, j as FullscreenPlugin } from './responsive-Cwty6be5.mjs';
2
2
  import './types-DXFoG8LC.mjs';
3
3
  import 'react';
4
4
  import './responsiveNumber-CouEMJ9O.mjs';
@@ -10,6 +10,7 @@ import './plyrTypes-DhzgHNfX.mjs';
10
10
  import 'plyr';
11
11
  import './types-Dhh8xfHo.mjs';
12
12
  import './text-BBcRGVzn.mjs';
13
+ import './skeleton-cache.mjs';
13
14
  import 'plyr-react';
14
15
  import './types-DNd5jSkS.mjs';
15
16
  import 'react-dom/client';
@@ -1,4 +1,4 @@
1
- import { l as FullscreenSliderOptions, j as FullscreenPlugin } from './responsive-BnHorKhC.mjs';
1
+ import { l as FullscreenSliderOptions, j as FullscreenPlugin } from './responsive-Cwty6be5.mjs';
2
2
  import './types-DXFoG8LC.mjs';
3
3
  import 'react';
4
4
  import './responsiveNumber-CouEMJ9O.mjs';
@@ -10,6 +10,7 @@ import './plyrTypes-DhzgHNfX.mjs';
10
10
  import 'plyr';
11
11
  import './types-Dhh8xfHo.mjs';
12
12
  import './text-BBcRGVzn.mjs';
13
+ import './skeleton-cache.mjs';
13
14
  import 'plyr-react';
14
15
  import './types-DNd5jSkS.mjs';
15
16
  import 'react-dom/client';
@@ -1,4 +1,4 @@
1
- import { j as FullscreenPlugin } from './responsive-BnHorKhC.mjs';
1
+ import { j as FullscreenPlugin } from './responsive-Cwty6be5.mjs';
2
2
  import './types-DXFoG8LC.mjs';
3
3
  import 'react';
4
4
  import './responsiveNumber-CouEMJ9O.mjs';
@@ -10,6 +10,7 @@ import './plyrTypes-DhzgHNfX.mjs';
10
10
  import 'plyr';
11
11
  import './types-Dhh8xfHo.mjs';
12
12
  import './text-BBcRGVzn.mjs';
13
+ import './skeleton-cache.mjs';
13
14
  import 'plyr-react';
14
15
  import './types-DNd5jSkS.mjs';
15
16
  import 'react-dom/client';
@@ -1,4 +1,4 @@
1
- import { m as FullscreenVideoOptions, j as FullscreenPlugin } from './responsive-BnHorKhC.mjs';
1
+ import { m as FullscreenVideoOptions, j as FullscreenPlugin } from './responsive-Cwty6be5.mjs';
2
2
  import './types-DXFoG8LC.mjs';
3
3
  import 'react';
4
4
  import './responsiveNumber-CouEMJ9O.mjs';
@@ -10,6 +10,7 @@ import './plyrTypes-DhzgHNfX.mjs';
10
10
  import 'plyr';
11
11
  import './types-Dhh8xfHo.mjs';
12
12
  import './text-BBcRGVzn.mjs';
13
+ import './skeleton-cache.mjs';
13
14
  import 'plyr-react';
14
15
  import './types-DNd5jSkS.mjs';
15
16
  import 'react-dom/client';
@@ -1,4 +1,4 @@
1
- import { n as FullscreenZoomPanOptions, j as FullscreenPlugin } from './responsive-BnHorKhC.mjs';
1
+ import { n as FullscreenZoomPanOptions, j as FullscreenPlugin } from './responsive-Cwty6be5.mjs';
2
2
  import './types-DXFoG8LC.mjs';
3
3
  import 'react';
4
4
  import './responsiveNumber-CouEMJ9O.mjs';
@@ -10,6 +10,7 @@ import './plyrTypes-DhzgHNfX.mjs';
10
10
  import 'plyr';
11
11
  import './types-Dhh8xfHo.mjs';
12
12
  import './text-BBcRGVzn.mjs';
13
+ import './skeleton-cache.mjs';
13
14
  import 'plyr-react';
14
15
  import './types-DNd5jSkS.mjs';
15
16
  import 'react-dom/client';
@@ -1,6 +1,6 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { i as FullscreenOptions, j as FullscreenPlugin, B as FullscreenClose, C as FullscreenArrows, D as FullscreenCounter, q as ResponsiveLength, R as ResponsiveCaptionPlacement, G as FsCaptionRenderArgs, H as FSImageRender, m as FullscreenVideoOptions, g as FullscreenLazyLoadOptions, c as FullscreenCloseScrollOptions } from './responsive-BnHorKhC.mjs';
3
- export { o as FsCaptionPlacement, p as FsIntroRequest, F as FullscreenCaptionOptions, a as FullscreenCloseScrollContext, b as FullscreenCloseScrollEnabled, d as FullscreenCloseScrollTiming, e as FullscreenControlsOptions, f as FullscreenCrossfadeOptions, h as FullscreenMobileDetectionContext, k as FullscreenPluginKind, l as FullscreenSliderOptions, n as FullscreenZoomPanOptions } from './responsive-BnHorKhC.mjs';
2
+ import { i as FullscreenOptions, j as FullscreenPlugin, B as FullscreenClose, C as FullscreenArrows, D as FullscreenCounter, q as ResponsiveLength, R as ResponsiveCaptionPlacement, G as FsCaptionRenderArgs, H as FSImageRender, m as FullscreenVideoOptions, g as FullscreenLazyLoadOptions, c as FullscreenCloseScrollOptions } from './responsive-Cwty6be5.mjs';
3
+ export { o as FsCaptionPlacement, p as FsIntroRequest, F as FullscreenCaptionOptions, a as FullscreenCloseScrollContext, b as FullscreenCloseScrollEnabled, d as FullscreenCloseScrollTiming, e as FullscreenControlsOptions, f as FullscreenCrossfadeOptions, h as FullscreenMobileDetectionContext, k as FullscreenPluginKind, l as FullscreenSliderOptions, n as FullscreenZoomPanOptions } from './responsive-Cwty6be5.mjs';
4
4
  import React__default from 'react';
5
5
  import { MediaItem } from './media.mjs';
6
6
  import { g as SliderSkipSnaps, d as CrossFadeWheel, H as FullscreenOpenRequest } from './types-BiXSaEk7.mjs';
@@ -14,6 +14,7 @@ import './plyrTypes-DhzgHNfX.mjs';
14
14
  import 'plyr';
15
15
  import './types-Dhh8xfHo.mjs';
16
16
  import './text-BBcRGVzn.mjs';
17
+ import './skeleton-cache.mjs';
17
18
  import 'plyr-react';
18
19
  import 'react-dom/client';
19
20
 
@@ -1,5 +1,5 @@
1
1
  import * as react_jsx_runtime from 'react/jsx-runtime';
2
- import { E as EntriesOptions, M as MediaEntryLink, S as SlideOwner, s as EntryItem } from './responsive-BnHorKhC.mjs';
2
+ import { E as EntriesOptions, M as MediaEntryLink, S as SlideOwner, s as EntryItem } from './responsive-Cwty6be5.mjs';
3
3
  import * as React from 'react';
4
4
  import { MediaItem } from './media.mjs';
5
5
  import { j as SliderHandle } from './types-BiXSaEk7.mjs';