react-motion-gallery 2.0.19 → 2.0.21

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 (224) hide show
  1. package/LICENSE.md +14 -4
  2. package/README.md +714 -295
  3. package/THIRD_PARTY_NOTICES.md +31 -0
  4. package/dist/FullscreenRuntime-DVRVGK5F.mjs +4 -0
  5. package/dist/FullscreenRuntime-QX6YELBN.css +1 -0
  6. package/dist/GridSkeleton-B5wWBN9L.d.mts +23 -0
  7. package/dist/MasonrySkeleton-D8aZRUiv.d.mts +29 -0
  8. package/dist/{chunk-NABNX5HB.mjs → chunk-4NT4UVB5.mjs} +1 -1
  9. package/dist/chunk-4VHNCVVB.mjs +0 -0
  10. package/dist/chunk-5ZLGEQ55.mjs +1 -0
  11. package/dist/chunk-6PUPWNGD.mjs +1 -0
  12. package/dist/chunk-6XG7U4FJ.mjs +1 -0
  13. package/dist/chunk-ADIHG7AT.mjs +1 -0
  14. package/dist/chunk-AX2FSVFD.mjs +2 -0
  15. package/dist/chunk-B4CC5AGE.mjs +1 -0
  16. package/dist/chunk-BJBHSWMF.mjs +1 -0
  17. package/dist/chunk-C6PKH3FH.mjs +1 -0
  18. package/dist/chunk-CKXN2H7S.mjs +1 -0
  19. package/dist/chunk-D3T6HIS2.mjs +1 -0
  20. package/dist/chunk-DCUCXQHE.mjs +3 -0
  21. package/dist/chunk-EFXHC36P.mjs +0 -0
  22. package/dist/chunk-G5G54AZD.mjs +4 -0
  23. package/dist/chunk-GNGOOOVY.mjs +1 -0
  24. package/dist/chunk-GTS3HDGY.mjs +1 -0
  25. package/dist/chunk-H6XFG3CJ.mjs +1 -0
  26. package/dist/chunk-HGY3QLCE.mjs +1 -0
  27. package/dist/chunk-HK2DPKES.mjs +1 -0
  28. package/dist/chunk-HMT6GZUO.mjs +4 -0
  29. package/dist/chunk-JJMFOLJZ.mjs +1 -0
  30. package/dist/chunk-L2HRIINV.mjs +1 -0
  31. package/dist/chunk-L4TRPKGX.mjs +4 -0
  32. package/dist/chunk-LVMYHM4T.mjs +1 -0
  33. package/dist/chunk-MKCNUQFD.mjs +1 -0
  34. package/dist/chunk-NHIKOJLU.mjs +1 -0
  35. package/dist/chunk-NQI246HG.mjs +1 -0
  36. package/dist/chunk-ONCDUVQT.mjs +5 -0
  37. package/dist/chunk-OZSG45IP.mjs +4 -0
  38. package/dist/chunk-PFEGIWQJ.mjs +1 -0
  39. package/dist/chunk-PPFUWP7C.mjs +3 -0
  40. package/dist/chunk-R6EGYRTJ.mjs +6 -0
  41. package/dist/chunk-RLT5FULN.mjs +0 -0
  42. package/dist/chunk-RNLUNA5L.mjs +2 -0
  43. package/dist/chunk-STRS7UNJ.mjs +1 -0
  44. package/dist/chunk-TIQVSK5S.mjs +1 -0
  45. package/dist/chunk-UML6FCOQ.mjs +1 -0
  46. package/dist/chunk-UP6P6CQS.mjs +2 -0
  47. package/dist/chunk-UUAWLGWO.mjs +1 -0
  48. package/dist/chunk-V25YIPLC.mjs +1 -0
  49. package/dist/chunk-V7DPXRZF.mjs +1 -0
  50. package/dist/chunk-VGXO2IAF.mjs +1 -0
  51. package/dist/chunk-VPFAU2TE.mjs +1 -0
  52. package/dist/chunk-VWEQRZ24.mjs +1 -0
  53. package/dist/chunk-WGVWASZM.mjs +1 -0
  54. package/dist/chunk-WMG2LTLR.mjs +1 -0
  55. package/dist/chunk-X4HEGEZV.mjs +1 -0
  56. package/dist/chunk-XUQO5F2F.mjs +1 -0
  57. package/dist/chunk-Y7NUGXTR.mjs +1 -0
  58. package/dist/chunk-YIUXD3CO.mjs +1 -0
  59. package/dist/chunk-Z34PSRMG.mjs +1 -0
  60. package/dist/chunk-ZCCYTID7.mjs +1 -0
  61. package/dist/chunk-ZFDPVAPM.mjs +6 -0
  62. package/dist/chunk-ZXW3RIAC.mjs +1 -0
  63. package/dist/core.d.mts +22 -22
  64. package/dist/core.mjs +1 -1
  65. package/dist/entries.css +1 -1
  66. package/dist/entries.d.mts +49 -17
  67. package/dist/entries.mjs +1 -1
  68. package/dist/force-C5m1QpdF.d.mts +7 -0
  69. package/dist/fullscreen-captions.css +1 -0
  70. package/dist/fullscreen-captions.d.mts +19 -0
  71. package/dist/fullscreen-captions.mjs +1 -0
  72. package/dist/fullscreen-controls.d.mts +19 -0
  73. package/dist/fullscreen-controls.mjs +1 -0
  74. package/dist/fullscreen-crossfade.d.mts +19 -0
  75. package/dist/fullscreen-crossfade.mjs +1 -0
  76. package/dist/fullscreen-lazy-load.css +1 -0
  77. package/dist/fullscreen-lazy-load.d.mts +19 -0
  78. package/dist/fullscreen-lazy-load.mjs +1 -0
  79. package/dist/fullscreen-slider.css +1 -0
  80. package/dist/fullscreen-slider.d.mts +19 -0
  81. package/dist/fullscreen-slider.mjs +1 -0
  82. package/dist/fullscreen-thumbnails.d.mts +19 -0
  83. package/dist/fullscreen-thumbnails.mjs +1 -0
  84. package/dist/fullscreen-video.css +1 -0
  85. package/dist/fullscreen-video.d.mts +19 -0
  86. package/dist/fullscreen-video.mjs +1 -0
  87. package/dist/fullscreen-zoom-pan.d.mts +19 -0
  88. package/dist/fullscreen-zoom-pan.mjs +1 -0
  89. package/dist/fullscreen.css +1 -1
  90. package/dist/fullscreen.d.mts +29 -67
  91. package/dist/fullscreen.mjs +1 -1
  92. package/dist/fullscreenThumbnails.css +1 -1
  93. package/dist/fullscreenThumbnails.d.mts +8 -8
  94. package/dist/fullscreenThumbnails.mjs +1 -1
  95. package/dist/grid-lazy-load.css +1 -0
  96. package/dist/grid-lazy-load.d.mts +9 -0
  97. package/dist/grid-lazy-load.mjs +1 -0
  98. package/dist/grid-ready.d.mts +12 -0
  99. package/dist/grid-ready.mjs +1 -0
  100. package/dist/grid.css +1 -1
  101. package/dist/grid.d.mts +8 -29
  102. package/dist/grid.mjs +1 -1
  103. package/dist/index-DG19CAvz.d.mts +21 -0
  104. package/dist/{index-CwwxTQKa.d.mts → index-lEnLoQv4.d.mts} +5 -6
  105. package/dist/index.css +1 -1
  106. package/dist/index.d.mts +25 -28
  107. package/dist/index.mjs +1 -1
  108. package/dist/layout-DoYnPD0I.d.mts +137 -0
  109. package/dist/lazy-dGoYpcRa.d.mts +14 -0
  110. package/dist/masonry-lazy-load.css +1 -0
  111. package/dist/masonry-lazy-load.d.mts +9 -0
  112. package/dist/masonry-lazy-load.mjs +1 -0
  113. package/dist/masonry-ready.d.mts +12 -0
  114. package/dist/masonry-ready.mjs +1 -0
  115. package/dist/masonry.css +1 -1
  116. package/dist/masonry.d.mts +14 -13
  117. package/dist/masonry.mjs +1 -1
  118. package/dist/{plyrTypes-Cq4C3ul5.d.mts → media.d.mts} +1 -8
  119. package/dist/media.mjs +1 -0
  120. package/dist/metafile-esm.json +1 -1
  121. package/dist/plyrTypes-DhzgHNfX.d.mts +9 -0
  122. package/dist/responsive-CrESIWcm.d.mts +530 -0
  123. package/dist/responsive.d.mts +15 -0
  124. package/dist/responsive.mjs +1 -0
  125. package/dist/responsiveNumber-CouEMJ9O.d.mts +5 -0
  126. package/dist/skeleton-base.css +1 -0
  127. package/dist/skeleton-base.d.mts +52 -0
  128. package/dist/skeleton-base.mjs +1 -0
  129. package/dist/skeleton-grid.css +1 -0
  130. package/dist/skeleton-grid.d.mts +63 -0
  131. package/dist/skeleton-grid.mjs +1 -0
  132. package/dist/skeleton-masonry.css +1 -0
  133. package/dist/skeleton-masonry.d.mts +62 -0
  134. package/dist/skeleton-masonry.mjs +1 -0
  135. package/dist/skeleton-slider.css +1 -0
  136. package/dist/skeleton-slider.d.mts +208 -0
  137. package/dist/skeleton-slider.mjs +40 -0
  138. package/dist/slider-arrows.d.mts +9 -0
  139. package/dist/slider-arrows.mjs +1 -0
  140. package/dist/slider-auto-height.d.mts +9 -0
  141. package/dist/slider-auto-height.mjs +1 -0
  142. package/dist/slider-auto-play.d.mts +9 -0
  143. package/dist/slider-auto-play.mjs +1 -0
  144. package/dist/slider-auto-scroll.d.mts +9 -0
  145. package/dist/slider-auto-scroll.mjs +1 -0
  146. package/dist/slider-crossfade.d.mts +9 -0
  147. package/dist/slider-crossfade.mjs +1 -0
  148. package/dist/slider-dots.css +1 -0
  149. package/dist/slider-dots.d.mts +9 -0
  150. package/dist/slider-dots.mjs +1 -0
  151. package/dist/slider-fade.d.mts +9 -0
  152. package/dist/slider-fade.mjs +1 -0
  153. package/dist/slider-fullscreen.d.mts +9 -0
  154. package/dist/slider-fullscreen.mjs +1 -0
  155. package/dist/slider-lazy-load.css +1 -0
  156. package/dist/slider-lazy-load.d.mts +9 -0
  157. package/dist/slider-lazy-load.mjs +1 -0
  158. package/dist/slider-loading.css +1 -0
  159. package/dist/slider-loading.d.mts +9 -0
  160. package/dist/slider-loading.mjs +1 -0
  161. package/dist/slider-parallax.d.mts +9 -0
  162. package/dist/slider-parallax.mjs +1 -0
  163. package/dist/slider-progress.d.mts +9 -0
  164. package/dist/slider-progress.mjs +1 -0
  165. package/dist/slider-ready.d.mts +14 -0
  166. package/dist/slider-ready.mjs +1 -0
  167. package/dist/slider-ripple.d.mts +9 -0
  168. package/dist/slider-ripple.mjs +1 -0
  169. package/dist/slider-scale.d.mts +9 -0
  170. package/dist/slider-scale.mjs +1 -0
  171. package/dist/slider-scrollbar.css +1 -0
  172. package/dist/slider-scrollbar.d.mts +9 -0
  173. package/dist/slider-scrollbar.mjs +1 -0
  174. package/dist/slider.css +1 -1
  175. package/dist/slider.d.mts +7 -81
  176. package/dist/slider.mjs +1 -1
  177. package/dist/styles.css +4 -0
  178. package/dist/text-BBcRGVzn.d.mts +10 -0
  179. package/dist/thumbnails.css +1 -1
  180. package/dist/thumbnails.d.mts +8 -11
  181. package/dist/thumbnails.mjs +1 -1
  182. package/dist/transitions-DU3ftmIq.d.mts +6 -0
  183. package/dist/types-BiXSaEk7.d.mts +451 -0
  184. package/dist/types-Br27DWP7.d.mts +61 -0
  185. package/dist/{types-ROPjU8Nl.d.mts → types-DNd5jSkS.d.mts} +3 -2
  186. package/dist/{types-CHUayqcj.d.mts → types-DXFoG8LC.d.mts} +5 -3
  187. package/dist/types-Do4Pq-Td.d.mts +57 -0
  188. package/dist/video.css +1 -1
  189. package/dist/video.d.mts +2 -1
  190. package/dist/video.mjs +1 -1
  191. package/dist/zoomPan.d.mts +2 -4
  192. package/dist/zoomPan.mjs +1 -1
  193. package/package.json +146 -9
  194. package/dist/chunk-5HIHJGIV.mjs +0 -45
  195. package/dist/chunk-6TPHLAUP.mjs +0 -1
  196. package/dist/chunk-BIDZ4WZB.mjs +0 -2
  197. package/dist/chunk-DBIFLX6Y.mjs +0 -6
  198. package/dist/chunk-ECQ74X24.mjs +0 -1
  199. package/dist/chunk-FJYYM5TH.mjs +0 -1
  200. package/dist/chunk-GSEIEFRW.mjs +0 -1
  201. package/dist/chunk-GT6IL37J.mjs +0 -1
  202. package/dist/chunk-J4E4PKE5.mjs +0 -1
  203. package/dist/chunk-JD3VAF3N.mjs +0 -4
  204. package/dist/chunk-JMFDRKTX.mjs +0 -2
  205. package/dist/chunk-K6PQU6HF.mjs +0 -1
  206. package/dist/chunk-KSOQWCCL.mjs +0 -6
  207. package/dist/chunk-NEJ27O2B.mjs +0 -2
  208. package/dist/chunk-Q2PY6ZMU.mjs +0 -2
  209. package/dist/chunk-TKPLWDPW.mjs +0 -7
  210. package/dist/chunk-UV2SUN5V.mjs +0 -1
  211. package/dist/chunk-VXSRNAH4.mjs +0 -1
  212. package/dist/chunk-WLWVKQPL.mjs +0 -4
  213. package/dist/chunk-WZWMG4ZT.mjs +0 -1
  214. package/dist/chunk-XOS5AXSR.mjs +0 -4
  215. package/dist/chunk-ZX5E327W.mjs +0 -1
  216. package/dist/controls-SpWg1Kgt.d.mts +0 -44
  217. package/dist/layout-CR6f2aPH.d.mts +0 -95
  218. package/dist/responsive-D_xhZmVI.d.mts +0 -186
  219. package/dist/sliderSub-Bo6Y8as_.d.mts +0 -45
  220. package/dist/text-Cl2tR8oO.d.mts +0 -4
  221. package/dist/types-DY058l5M.d.mts +0 -301
  222. package/dist/types-VULXzSa2.d.mts +0 -68
  223. package/dist/types-XEr8LRal.d.mts +0 -65
  224. package/dist/types-_1D0QtfD.d.mts +0 -174
@@ -0,0 +1,3 @@
1
+ import {n,r,t,s,g,x,y as y$1,o,h,d,e as e$1,c as c$1,f,p}from'./chunk-AX2FSVFD.mjs';import {a,c,e}from'./chunk-HK2DPKES.mjs';import*as B from'react';import {jsx}from'react/jsx-runtime';var Jn=Object.assign(function({children:n}){return B.createElement(B.Fragment,null,n)},{__rmgMasonryItem:true,displayName:"Masonry.Item"});function Wn(t,n){let e=n[t];if(typeof e=="number"&&Number.isFinite(e))return e;let r=parseFloat(t);return Number.isNaN(r)?0:r}function It(t){if(t==="full")return t;if(!(typeof t!="number"||!Number.isFinite(t)))return Math.max(1,t|0)}function Cn(t){let n=B.Children.toArray(t);return n.length===0?null:n.length===1?n[0]??null:B.createElement(B.Fragment,null,t)}function kn(t){return B.isValidElement(t)&&!!t.type?.__rmgMasonryItem}function Qn(t){if(!kn(t))return {node:t};let n={span:t.props.span,className:t.props.className,style:t.props.style};return {node:Cn(t.props.children),layoutMeta:n}}function Pn(t){return !!t&&typeof t=="object"&&!Array.isArray(t)}function dt(t,n){if(!Pn(t)){let r=It(t);return r==null?[]:[{minWidth:0,span:r}]}let e=Object.entries(t).map(([r,i])=>({minWidth:Wn(r,n),span:It(i)})).filter(r=>r.span!=null).sort((r,i)=>r.minWidth-i.minWidth);return e.length===0?[]:(e[0].minWidth>0?e.unshift({minWidth:0,span:e[0].span}):e[0].minWidth<0&&(e[0]={...e[0],minWidth:0}),e)}function vn(t,n){let e=Math.max(1,n|0);return t==="full"?e:typeof t!="number"||!Number.isFinite(t)?1:Math.max(1,Math.min(e,t|0))}function At(t){let{span:n,columnCount:e,width:r,breakpointMap:i}=t,o=dt(n,i);if(!o.length)return 1;let a=o[0].span;for(let s of o)if(r>=s.minWidth)a=s.span;else break;return vn(a,e)}var J=240,tn=[55,90,130,75];function nn(t){return t!=null&&Number.isFinite(t)?[{minWidth:0,value:t}]:[]}function Rn(t){return t!=null&&Number.isFinite(t)?t:void 0}function En(){return {ratios:[...tn],radius:12}}function I(t){return `${Math.max(0,t)}px`}function H(t){return `calc(${t})`}function Tt(t){let n=t.trim();for(;n.startsWith("(")&&n.endsWith(")");){let e=0,r=true;for(let i=0;i<n.length;i++){let o=n[i];if(o==="("&&(e+=1),o===")"&&(e-=1),e===0&&i<n.length-1){r=false;break}if(e<0){r=false;break}}if(!r||e!==0)break;n=n.slice(1,-1).trim();}return n}function en(t){let n=Tt(t);return n.startsWith("calc(")&&n.endsWith(")")?Tt(n.slice(5,-1).trim()):n}function _(t){return `(${en(t)})`}function q(t){let n=en(t);if(!n)return null;let e=n.match(/^(-?\d*\.?\d+)([a-zA-Z%]+)?$/);if(!e)return null;let r=Number(e[1]);return Number.isFinite(r)?{value:r,unit:e[2]??null}:null}function Nn(t){let n=q(t);return n!=null&&n.value===0}function at(t,n,e){return Number.isFinite(t)?t===0&&e?.preferPxForZero?"0px":n?`${t}${n}`:`${t}`:n?`0${n}`:"0"}function y(t){let n=t.filter(Boolean);if(!n.length)return "0px";let e=[],r=0;for(let i of n){let o=q(i);if(!o){e.push(i);continue}if(o.unit==="px"||o.unit==null&&o.value===0){r+=o.value;continue}e.push(i);}return (r!==0||!e.length&&r===0)&&e.push(at(r,"px",{preferPxForZero:true})),e.length===1?e[0]:H(e.map(_).join(" + "))}function St(t,n){if(Nn(n))return t;let e=q(t),r=q(n);return e&&r&&(e.unit===r.unit&&e.unit!=null||e.unit==="px"&&r.unit==null&&r.value===0||r.unit==="px"&&e.unit==null&&e.value===0||e.unit==null&&r.unit==null)?at(e.value-r.value,e.unit??r.unit,{preferPxForZero:(e.unit??r.unit)==="px"}):H(`${_(t)} - ${_(n)}`)}function E(t,n){if(!Number.isFinite(n))return H(`${_(t)} * ${n}`);if(n===0)return "0px";if(n===1)return t;let e=q(t);return e?at(e.value*n,e.unit,{preferPxForZero:e.unit==="px"}):H(`${_(t)} * ${n}`)}function Vt(t,n){if(!Number.isFinite(n)||n===0)return H(`${_(t)} / ${n}`);if(n===1)return t;let e=q(t);return e?at(e.value/n,e.unit,{preferPxForZero:e.unit==="px"}):H(`${_(t)} / ${n}`)}function rn(t){let n=t.filter(Boolean);return n.length?n.length===1?n[0]:`max(${n.join(", ")})`:"0px"}function Ot(t,n){if(!t)return [];if(typeof t=="number")return [];if(typeof t=="string")return [];if(typeof t!="object")return [];let e=[];for(let[i,o]of Object.entries(t)){let a=Number(o);if(!Number.isFinite(a))continue;if(String(+i)===i){let l=+i;Number.isFinite(l)&&l>=0&&e.push({minWidth:l,value:a});continue}let s=n?.[i];typeof s=="number"&&Number.isFinite(s)&&e.push({minWidth:s,value:a});}e.sort((i,o)=>i.minWidth-o.minWidth);let r=[];for(let i of e){let o=r[r.length-1];o&&o.minWidth===i.minWidth?o.value=i.value:r.push(i);}return r}function _t(t,n,e){if(t==null)return e;if(typeof t=="number")return t;if(typeof t=="string"){let r=Number(t);return Number.isFinite(r)?r:e}return n.length?n[0].value:e}function jt(t,n,e){let r=e;for(let i of t)if(i.minWidth<=n)r=i.value;else break;return r}function wn(t,n){if(!(!t&&!n))return {...t||{},...n||{}}}function L(t,n){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?t:null;let e=t.trim();if(!e)return null;if(e.endsWith("%")){let i=Number(e.slice(0,-1));return !Number.isFinite(i)||n==null?null:n*i/100}let r=parseFloat(e);return Number.isFinite(r)?r:null}function $(t,n){if(t==null)return null;if(typeof t=="number")return I(t);let e=t.trim();if(!e)return null;if(e.endsWith("%")){let r=Number(e.slice(0,-1));return !Number.isFinite(r)||!n?null:E(n,r/100)}return e}function sn(t){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)&&t>0?t:null;let n=t.replace(/\s+/g,"");if(!n)return null;if(n.includes("/")){let[r,i]=n.split("/"),o=Number(r),a=Number(i);return Number.isFinite(o)&&Number.isFinite(a)&&o>0&&a>0?o/a:null}let e=parseFloat(n);return Number.isFinite(e)&&e>0?e:null}function Q(t,n,e){if(t==null)return 0;let r=t.toString().trim().split(/\s+/).map(i=>L(i,e)).filter(i=>Number.isFinite(i));return r.length?r.length===1?r[0]*2:r.length===2?n==="block"?r[0]*2:r[1]*2:r.length===3?n==="block"?r[0]+r[2]:r[1]*2:n==="block"?r[0]+r[2]:r[1]+r[3]:0}function tt(t,n,e){if(t==null)return null;let r=t.toString().trim().split(/\s+/).map(i=>$(i,e)).filter(Boolean);return r.length?r.length===1?E(r[0],2):r.length===2?E(n==="block"?r[0]:r[1],2):r.length===3?n==="block"?y([r[0],r[2]]):E(r[1],2):y(n==="block"?[r[0],r[2]]:[r[1],r[3]]):null}function on(t){if(typeof t!="string")return 0;let n=t.trim().split(/\s+/)[0],e=L(n);return e!=null?e*2:0}function an(t){return on(t)}function ln(t){if(typeof t!="string")return null;let n=t.trim().split(/\s+/)[0],e=$(n);return e?E(e,2):null}function Ln(t){return ln(t)}function D(t,n){return (L(t?.marginTop,n)??0)+(L(t?.marginBottom,n)??0)}function K(t,n){let e=$(t?.marginTop,n),r=$(t?.marginBottom,n);return !e&&!r?null:y([e??"0px",r??"0px"])}function zt(t,n){return t?D(t,n)+Q(t.padding,"block",n)+on(t.border):0}function Dt(t,n){return t?y([K(t,n)??"0px",tt(t.padding,"block",n)??"0px",ln(t.border)??"0px"]):null}function un(t,n){return t==null?null:Math.max(0,t-Q(n?.padding,"inline",t)-an(n?.border))}function Bn(t,n){if(!t)return null;let e=tt(n?.padding,"inline",t),r=Ln(n?.border);return !e&&!r?t:St(t,y([e??"0px",r??"0px"]))}function Wt(t,n){return {slope:t.slope*n,intercept:t.intercept*n}}function pn(t,n){return {slope:t.slope,intercept:t.intercept-n}}function cn(t,n){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?{slope:0,intercept:t}:null;let e=t.trim();if(!e)return null;if(e.endsWith("%")){let i=Number(e.slice(0,-1));return Number.isFinite(i)?Wt(n,i/100):null}let r=parseFloat(e);return Number.isFinite(r)?{slope:0,intercept:r}:null}function mn(t,n,e){if(t==null)return {slope:0,intercept:0};let r=t.toString().trim().split(/\s+/).map(a=>cn(a,e));if(!r.length||r.some(a=>a==null))return null;let i=(a,s)=>({slope:a.slope+s.slope,intercept:a.intercept+s.intercept}),o=(a,s)=>Wt(a,s);return r.length===1?o(r[0],2):r.length===2?o(r[1],2):r.length===3?o(r[1],2):i(r[1],r[3])}function Fn(t,n){let e=cn(t?.width,n)??n;return t?.maxWidth==null?e:null}function $n(t,n){let e=mn(n?.padding,"inline",t);return e?pn({slope:t.slope-e.slope,intercept:t.intercept-e.intercept},an(n?.border)):null}function Kt(t,n){let e=mn(n?.padding,"inline",t);return e?{slope:t.slope-e.slope,intercept:t.intercept-e.intercept}:null}function st(t,n){return t==null?null:Math.max(0,t-Q(n?.padding,"inline",t))}function qt(t,n){if(!t)return null;let e=tt(n?.padding,"inline",t);return e?St(t,e):t}function ot(t,n){let e=L(t?.width,n)??n,r=L(t?.maxWidth,n);return r==null?Math.max(0,e):Math.max(0,Math.min(e,r))}function ft(t,n){let e=$(t?.width,n)??n,r=$(t?.maxWidth,n);return r?rn([`min(${e}, ${r})`]):e}function dn(t){let n=t.node.responsiveBy==="container"&&t.availableWidthPx!=null&&Number.isFinite(t.availableWidthPx)&&t.availableWidthPx>0?t.availableWidthPx:t.responsiveMinWidth,e=o(t.node.style,t.responsiveMinWidth,t.breakpointMap);if(t.conservativeContainerText&&t.node.responsiveBy==="container"){let o=t.node.__rmgTextRenderState??h({barHeight:t.node.barHeight,barWidth:t.node.barWidth,lineHeight:t.node.lineHeight,lines:t.node.lines,lastBarWidth:t.node.lastBarWidth,responsiveBy:t.node.responsiveBy,breakpointMap:t.breakpointMap}),a=o.states.reduce((s,l)=>l.state.metrics.totalHeight>s.metrics.totalHeight?l.state:s,o.baseState);return {style:e,metrics:a.metrics}}let r=d(t.node.lines,1,n,t.breakpointMap),i=e$1(t.node.barHeight,typeof t.node.barHeight=="number"?t.node.barHeight:0,n,t.breakpointMap);return {style:e,metrics:c$1({barHeight:i,lineHeight:f(t.node.lineHeight,typeof t.node.lineHeight=="number"?t.node.lineHeight:1,n,t.breakpointMap),lines:r})}}function Z(t,n,e=a){return p(t,n,e)}function xt(t,n){let e=n?.responsiveMinWidth??0,r=n?.availableWidthPx??null,i=n?.breakpointMap??a,o$1=n?.conservativeContainerText===true;if(t.kind==="rect"||t.kind==="square"||t.kind==="circle"){let a=o(t.style,e,i),s=L(a?.height,r??void 0);if(s!=null)return s+D(a,r??void 0);let l=ot(a,r??J);if(t.kind==="square"&&l!=null)return l+D(a,r??void 0);let c=sn(a?.aspectRatio);if(c!=null&&l!=null&&l>0)return l/c+D(a,r??void 0);let m=D(a,r??void 0);return m>0?m:null}if(t.kind==="text"){let{style:a,metrics:s}=dn({node:t,responsiveMinWidth:e,availableWidthPx:r,breakpointMap:i,conservativeContainerText:o$1});return s.totalHeight+D(a,r??void 0)}if(t.kind==="media"){let a=Z(t.style,e,i),s=st(r,a),l=L(a?.gap,s??void 0)??0,c=Q(a?.padding,"block",r??void 0),m=Math.max(0,t.count|0),u={kind:t.tile?.shape??"rect",style:t.tile?.style,shimmer:t.tile?.shimmer},d=(t.direction??"row")==="row"&&m>1&&s!=null?Math.max(0,(s-l*Math.max(0,m-1))/m):s,h=xt(u,{responsiveMinWidth:e,availableWidthPx:d,breakpointMap:i,conservativeContainerText:o$1});return h==null?c||null:(t.direction??"row")==="row"||m<=1?h+c:h*m+l*Math.max(0,m-1)+c}if(t.kind==="row"||t.kind==="col"||t.kind==="stack"){let a=Z(t.style,e,i),s=st(r,a),l=L(a?.gap,s??void 0)??0,c=Q(a?.padding,"block",r??void 0),m=t.children.map(u=>xt(u,{responsiveMinWidth:e,availableWidthPx:s,breakpointMap:i,conservativeContainerText:o$1})).filter(u=>u!=null);return m.length?t.kind==="row"?Math.max(...m)+c:m.reduce((u,d)=>u+d,0)+l*Math.max(0,m.length-1)+c:c||null}return null}function yt(t,n){let e=n?.responsiveMinWidth??0,r=n?.availableWidthExpr??null,i=n?.availableWidthPx??null,o$1=n?.breakpointMap??a,a$1=n?.conservativeContainerText===true;if(t.kind==="rect"||t.kind==="square"||t.kind==="circle"){let s=o(t.style,e,o$1),l=$(s?.height,r??void 0);if(l!=null)return y([l,K(s,r??void 0)??"0px"]);let c=ft(s,r??I(J));if(t.kind==="square")return y([c,K(s,r??void 0)??"0px"]);let m=sn(s?.aspectRatio);return m!=null?y([Vt(c,m),K(s,r??void 0)??"0px"]):K(s,r??void 0)??null}if(t.kind==="text"){let{style:s,metrics:l}=dn({node:t,responsiveMinWidth:e,availableWidthPx:i,breakpointMap:o$1,conservativeContainerText:a$1});return y([I(l.totalHeight),K(s,r??void 0)??"0px"])}if(t.kind==="media"){let s=Z(t.style,e,o$1),l=qt(r,s),c=st(i,s),m=$(s?.gap,l??void 0)??"0px",u=L(s?.gap,c??void 0)??0,d=tt(s?.padding,"block",r??void 0)??"0px",h=Math.max(0,t.count|0),x={kind:t.tile?.shape??"rect",style:t.tile?.style,shimmer:t.tile?.shimmer},f=(t.direction??"row")==="row"&&h>1&&l!=null?Vt(St(l,E(m,Math.max(0,h-1))),h):l,g=(t.direction??"row")==="row"&&h>1&&c!=null?Math.max(0,(c-u*Math.max(0,h-1))/h):c,P=yt(x,{responsiveMinWidth:e,availableWidthExpr:f,availableWidthPx:g,breakpointMap:o$1,conservativeContainerText:a$1});return P==null?d||null:(t.direction??"row")==="row"||h<=1?y([P,d]):y([E(P,h),E(m,Math.max(0,h-1)),d])}if(t.kind==="row"||t.kind==="col"||t.kind==="stack"){let s=Z(t.style,e,o$1),l=qt(r,s),c=st(i,s),m=$(s?.gap,l??void 0)??"0px",u=tt(s?.padding,"block",r??void 0)??"0px",d=t.children.map(h=>yt(h,{responsiveMinWidth:e,availableWidthExpr:l,availableWidthPx:c,breakpointMap:o$1,conservativeContainerText:a$1})).filter(h=>!!h);return d.length?t.kind==="row"?y([rn(d),u]):y([...d.flatMap((h,x)=>x>0?[m,h]:[h]),u]):u||null}return null}function Hn(t){if(t==null)return null;let n=Number(t);return Number.isFinite(n)?Math.max(25,Math.min(260,n)):null}function In(t){if(t==null)return null;let n=Number(t);return Number.isFinite(n)&&n>0?n:null}function bt(t,n){let e=t.slots?.[n];return {item:e?.item??t.item,itemWrapStyle:wn(t.itemWrapStyle,e?.itemWrapStyle),ratio:Hn(e?.ratio),heightPx:In(e?.heightPx),span:e?.span}}function hn(t,n,e){let r=dt(t,e);for(let i of r)n.add(i.minWidth);}function gt(t){return At({span:t.span,columnCount:t.columnCount,width:t.minWidth,breakpointMap:t.breakpointMap})}function oe(t,n){return fn(t,n)?.key??null}function fn(t,n){if(!t.length)return null;let e=t[0];for(let r of t)if(n>=r.minWidth)e=r;else break;return e}function An(t){let{columnsRules:n,gapRules:e,baseColumns:r,baseGapPx:i,extraMinWidths:o}=t,a=new Set([0]),s=new Set;for(let u of n)a.add(u.minWidth);for(let u of e)a.add(u.minWidth);if(o)for(let u of o){let d=Math.max(0,u|0);a.add(d),s.add(d);}let l=Array.from(a).sort((u,d)=>u-d),c$1=[],m="";for(let u of l){let d=jt(n,u,r),h=jt(e,u,i),x=Math.max(1,d|0),f=Math.max(0,c(h,i)),g=`c${x}_g${f}`;g===m&&!s.has(u)||(c$1.push({minWidth:u,columns:x,gapPx:f,key:g===m?`${g}_m${u}`:g}),m=g);}return c$1.length?c$1:[{minWidth:0,columns:r,gapPx:i,key:`c${r}_g${i}`}]}function Tn(t){let n=nn(t.layoutWidthPx).filter(r=>r.value>0);if(!n.length)return;if(t.viewportWidth!=null){let r=fn(t.states,t.viewportWidth),i=Rn(t.layoutWidthPx);return !r||i==null||i<=0?void 0:new Map([[r.key,i]])}let e$1=new Map;for(let r of t.states){let i=e(n,r.minWidth);i!=null&&i>0&&e$1.set(r.key,i);}return e$1.size?e$1:void 0}function Vn(t,n){return n!=null&&Number.isFinite(n)&&n>0?Math.max(n,J):Math.max(t.minWidth||J,J)}function Zt(t,n){let e=Vn(t,n);return t.columns>0?(e-t.gapPx*(t.columns-1))/t.columns:e}function it(t,n,e){if(t){if(t.kind==="masonry"){s(t.style,n,e),it(t.item,n,e);for(let r of t.slots??[])hn(r.span,n,e),it(r.item,n,e);return}switch(t.kind){case "rect":case "square":case "circle":s(t.style,n,e);return;case "text":s(t.style,n,e);for(let r of g({barHeight:t.barHeight,barWidth:t.barWidth,lineHeight:t.lineHeight,lines:t.lines,lastBarWidth:t.lastBarWidth,breakpointMap:e}))n.add(r);return;case "media":s(t.style,n,e),s(t.tile?.style,n,e);return;case "stack":case "row":case "col":s(t.style,n,e);for(let r of t.children)it(r,n,e);return}}}function On(t){return Number.isFinite(t)?Math.max(0,Math.round(t*1e3)/1e3):null}function _n(t,n,e){if(t<=0){e.add(0);return}if(n.slope<=0)return;let r=On((t-n.intercept)/n.slope);r!=null&&e.add(r);}function Mt(t){let{node:n,availableWidth:e,responsiveMinWidth:r,breakpointMap:i,out:o}=t;if(!(!n||!e))switch(n.kind){case "rect":case "square":case "circle":return;case "text":if(n.responsiveBy!=="container")return;for(let a of g({barHeight:n.barHeight,barWidth:n.barWidth,lineHeight:n.lineHeight,lines:n.lines,lastBarWidth:n.lastBarWidth,breakpointMap:i}))_n(a,e,o);return;case "media":{let a=Z(n.style,r,i),s=Kt(e,a);if(!s)return;let l=L(a?.gap,0)??0,c=Math.max(0,n.count|0),m=(n.direction??"row")==="row"&&c>1?Wt(pn(s,l*Math.max(0,c-1)),1/c):s,u={kind:n.tile?.shape??"rect",style:n.tile?.style,shimmer:n.tile?.shimmer};Mt({node:u,availableWidth:m,responsiveMinWidth:r,breakpointMap:i,out:o});return}case "stack":case "row":case "col":{let a=Z(n.style,r,i),s=Kt(e,a);if(!s)return;for(let l of n.children)Mt({node:l,availableWidth:s,responsiveMinWidth:r,breakpointMap:i,out:o});return}}}function jn(t){let{state:n,span:e}=t,r=Math.max(1,n.columns|0),i={slope:1/r,intercept:-(n.gapPx*Math.max(0,r-1))/r};return {slope:i.slope*e,intercept:i.intercept*e+n.gapPx*Math.max(0,e-1)}}function zn(t){let n=new Set([0]),{state:e,itemCount:r,structuredLayout:i,spans:o,breakpointMap:a}=t;if(!i)return [];for(let s=0;s<r;s++){let l=bt(i,s),c=gt({span:l?.span??o?.[s],columnCount:e.columns,minWidth:e.minWidth,breakpointMap:a}),m=jn({state:e,span:c}),u=Fn(l.itemWrapStyle,m),d=u?$n(u,l.itemWrapStyle):null;Mt({node:l.item,availableWidth:d,responsiveMinWidth:e.minWidth,breakpointMap:a,out:n});}return Array.from(n).sort((s,l)=>s-l)}function Dn(t){if(!t.layout)return {structuredLayout:null,responsiveCss:""};let n=t.breakpointMap??a,e=0,r=()=>`n${++e}`,i=[],o=x(t.layout,r,i,"masonry",n),a$1=t.scopeId?y$1({scopeAttr:"data-rmg-mskel-scope",scopeId:t.scopeId,rules:i}):"";return {structuredLayout:o,responsiveCss:a$1}}function Kn(t){let n=t?.colsCssVar??"--rmg-cols",e=t?.gapCssVar??"--rmg-gap",r=t?.containerWidthCss??"100cqw";return H(`(${r} - ((var(${n}) - 1) * var(${e}))) / var(${n})`)}function Gt(t){let{span:n,columnWidthCssExpr:e,gapCssExpr:r="var(--rmg-gap)"}=t;return n<=1?e:y([E(e,n),E(r,Math.max(0,n-1))])}function Yt(t){let{columnStart:n,columnWidthCssExpr:e,gapCssExpr:r="var(--rmg-gap)"}=t;return n<=0?"0px":y([E(e,n),E(r,n)])}function Ut(t){let{index:n,slot:e,state:r,safeRatios:i,safeHeights:o,itemWidthCssExpr:a,itemWidthPx:s,breakpointMap:l,conservativeContainerText:c}=t;if(e){let d=ft(e.itemWrapStyle,a),h=ot(e.itemWrapStyle,s),x=Bn(d,e.itemWrapStyle),f=un(h,e.itemWrapStyle),g=yt(e.item,{responsiveMinWidth:r.minWidth,availableWidthExpr:x,availableWidthPx:f,breakpointMap:l,conservativeContainerText:c});if(g)return y([g,Dt(e.itemWrapStyle,d)??"0px"])}let m=ft(e?.itemWrapStyle,a),u=Dt(e?.itemWrapStyle,m)??"0px";return e?.heightPx!=null?y([I(e.heightPx),u]):e?.ratio!=null?y([H(`${m} * ${e.ratio/100}`),u]):o?.length?y([I(o[n%o.length]),u]):i.length?y([H(`${m} * ${i[n%i.length]/100}`),u]):y([m,u])}function Xt(t){let{index:n,slot:e,state:r,safeRatios:i,safeHeights:o,itemWidthPx:a,breakpointMap:s,conservativeContainerText:l}=t;if(e){let d=ot(e.itemWrapStyle,a),h=un(d,e.itemWrapStyle),x=xt(e.item,{responsiveMinWidth:r.minWidth,availableWidthPx:h,breakpointMap:s,conservativeContainerText:l});if(x!=null)return Math.ceil(x+zt(e.itemWrapStyle,d))}let c=ot(e?.itemWrapStyle,a),m=zt(e?.itemWrapStyle,c),u=e?.heightPx!=null?e.heightPx:e?.ratio!=null?Math.round(e.ratio/100*c):o?.length?o[n%o.length]:i.length?Math.round(i[n%i.length]/100*c):c;return Math.ceil(u+m)}function ht(t,n,e){let r=0;for(let i=n;i<n+e;i++)r=Math.max(r,t[i]??0);return r}function qn(t,n,e){let r=0;for(let i=n;i<n+e;i++)r+=t[i]??0;return r}function Zn(t){let n=Math.max(1,t.columnCount-t.span+1);return t.cursor%n}function Jt(t){let{itemCount:n,columnCount:e,placement:r,heights:i,gapPx:o,spans:a}=t,s=Math.max(1,e|0),l=new Array(s).fill(0),c=new Array(s).fill(0),m=[],u=0,d=0,h=0;for(let x=0;x<n;x++){let f=Math.max(1,Math.min(s,Math.round(a?.[x]??1)||1)),g=i[x]??0,P=Math.max(0,s-f),S=0,M=0;if(r==="roundRobin")S=Zn({cursor:d,columnCount:s,span:f}),M=ht(l,S,f),d+=1;else if(r==="horizontalOrder")S=h%s,S+f>s&&(S=0),M=ht(l,S,f),h=S+f;else {let v=0,N=Number.POSITIVE_INFINITY,G=Number.POSITIVE_INFINITY;for(let p=0;p<=P;p++){let w=ht(l,p,f),j=qn(c,p,f);(w<N||w===N&&j<G||w===N&&j===G&&p<v)&&(v=p,N=w,G=j);}S=v,M=Number.isFinite(N)?N:0;}let F=M+g+o;for(let v=S;v<S+f;v++)l[v]=F,c[v]=(c[v]??0)+1;u=Math.max(u,M+g),m.push({index:x,span:f,columnStart:S,top:M,height:g});}return {items:m,height:u}}function Qt(t){if(t.items.length===0)return {itemTopCssExprs:[],itemHeightCssExprs:[],shellHeightCssExpr:"0px",cssVars:{}};let n=Math.max(1,t.columnCount|0),e=new Array(n).fill(0),r=new Array(n).fill(null),i=[],o=[],a={};for(let[m,u]of t.items.entries()){let d=`--rmg-mskel-height-${u.index}`,h=`var(${d})`;a[d]=u.heightCssExpr,o.push(h);let x=0,f=null;for(let M=u.columnStart;M<u.columnStart+u.span;M++){let F=e[M]??0,v=r[M]??null;(F>x||f==null)&&(x=F,f=v);}let g=x<=0||!f?"0px":t.gapPx>0?y([f,I(t.gapPx)]):f,P=y([g,h]);i.push(g);let S=(x>0?x+t.gapPx:0)+u.heightPx;for(let M=u.columnStart;M<u.columnStart+u.span;M++)e[M]=S,r[M]=P;}let l=0,c="0px";for(let m=0;m<n;m++){let u=e[m]??0,d=r[m]??"0px";u>=l&&(l=u,c=d);}return {itemTopCssExprs:i,itemHeightCssExprs:o,shellHeightCssExpr:c,cssVars:a}}function ae(t){let n$1=t.spec??En(),e={...a,...t.breakpoints??{}},r$1=nn(t.layoutWidthPx).filter(p=>p.value>0),i=n$1.ratios??tn,o=(Array.isArray(t.ratios)&&t.ratios.length?t.ratios:Array.isArray(n$1.ratios)&&n$1.ratios.length?n$1.ratios:i).map(p=>Number(p)).filter(p=>Number.isFinite(p)).map(p=>Math.max(25,Math.min(220,p))),a$1=(Array.isArray(t.heightsPx)&&t.heightsPx.length?t.heightsPx:Array.isArray(n$1.heightsPx)&&n$1.heightsPx.length?n$1.heightsPx:null)?.map(p=>Number(p)).filter(p=>Number.isFinite(p)&&p>0)??null,s=Ot(t.columns,e),l=Ot(t.gap,e),c$1=_t(t.columns,s,4),m=_t(t.gap,l,8),u=Math.max(1,c$1|0),d=Math.max(0,c(m,8)),h=An({columnsRules:s,gapRules:l,baseColumns:u,baseGapPx:d,extraMinWidths:(()=>{let p=new Set;it(n$1.layout,p,e);for(let w of t.spans??[])hn(w,p,e);for(let w of r$1)p.add(w.minWidth);return p})()}),x=Tn({states:h,layoutWidthPx:t.layoutWidthPx,viewportWidth:t.viewportWidth}),{structuredLayout:f,responsiveCss:g}=Dn({layout:n$1.layout,scopeId:t.scopeId,breakpointMap:e}),P=t.respectLayoutCount===false?Math.max(0,t.count|0):f?.count!=null?Math.max(0,f.count|0):Math.max(0,t.count|0),S=t.placement??"balanced",M="--rmg-mskel-colw",F=`var(${M})`,v=Kn(),N="var(--rmg-gap)",G=h.map(p=>{let w=x?.has(p.key)===true,j=!w,Ct=Zt(p,x?.get(p.key)),Y=Array.from({length:P},(b,W)=>{let C=f?bt(f,W):null,A=gt({span:C?.span??t.spans?.[W],columnCount:p.columns,minWidth:p.minWidth,breakpointMap:e}),T=Ct*A+p.gapPx*Math.max(0,A-1),k=`--rmg-mskel-width-${W}`,R=Gt({span:A,columnWidthCssExpr:F,gapCssExpr:N}),V=`var(${k})`,U=Xt({index:W,slot:C,state:p,safeRatios:o,safeHeights:a$1,itemWidthPx:T,breakpointMap:e,conservativeContainerText:j}),et=Ut({index:W,slot:C,state:p,safeRatios:o,safeHeights:a$1,itemWidthCssExpr:V,itemWidthPx:T,breakpointMap:e,conservativeContainerText:j});return {slot:C,span:A,height:U,heightCssExpr:et,itemWidthPx:T,itemWidthVarName:k,itemWidthCssValue:R,itemWidthCssExpr:V}}),kt=Jt({itemCount:P,columnCount:p.columns,placement:S,heights:Y.map(b=>b.height),gapPx:p.gapPx,spans:Y.map(b=>b.span)}),nt=Qt({columnCount:p.columns,gapPx:p.gapPx,items:kt.items.map((b,W)=>({index:W,columnStart:b.columnStart,span:b.span,heightPx:b.height,heightCssExpr:Y[W]?.heightCssExpr??I(b.height)}))}),ut={[M]:v};for(let b of Y)ut[b.itemWidthVarName]=b.itemWidthCssValue;Object.assign(ut,nt.cssVars);let bn=!w&&f?zn({state:p,itemCount:P,structuredLayout:f,spans:t.spans,breakpointMap:e}).map(b=>{let W=Zt(p,b),C=Array.from({length:P},(k,R)=>{let V=bt(f,R),U=gt({span:V?.span??t.spans?.[R],columnCount:p.columns,minWidth:p.minWidth,breakpointMap:e}),et=W*U+p.gapPx*Math.max(0,U-1),gn=`var(${`--rmg-mskel-width-${R}`})`,Mn=Xt({index:R,slot:V,state:p,safeRatios:o,safeHeights:a$1,itemWidthPx:et,breakpointMap:e,conservativeContainerText:false}),Sn=Ut({index:R,slot:V,state:p,safeRatios:o,safeHeights:a$1,itemWidthCssExpr:gn,itemWidthPx:et,breakpointMap:e,conservativeContainerText:false});return {slot:V,span:U,height:Mn,heightCssExpr:Sn}}),A=Jt({itemCount:P,columnCount:p.columns,placement:S,heights:C.map(k=>k.height),gapPx:p.gapPx,spans:C.map(k=>k.span)}),T=Qt({columnCount:p.columns,gapPx:p.gapPx,items:A.items.map((k,R)=>({index:R,columnStart:k.columnStart,span:k.span,heightPx:k.height,heightCssExpr:C[R]?.heightCssExpr??I(k.height)}))});return {minWidth:b,rootDecls:{height:T.shellHeightCssExpr,...T.cssVars},items:A.items.map((k,R)=>({index:R,topCssExpr:T.itemTopCssExprs[R],leftCssExpr:Yt({columnStart:k.columnStart,columnWidthCssExpr:F,gapCssExpr:N}),widthCssExpr:Gt({span:k.span,columnWidthCssExpr:F,gapCssExpr:N})}))}}):void 0;return {state:p,shellHeightCssExpr:nt.shellHeightCssExpr,positionedCssVars:ut,containerCssRules:bn,items:Y.map((b,W)=>{let C=kt.items[W]??{span:b.span,columnStart:0,top:0,height:b.height};return {index:W,height:b.height,columnIndex:C.columnStart,columnStart:C.columnStart,span:C.span,top:C.top,topCssExpr:nt.itemTopCssExprs[W],leftPx:C.columnStart*(Ct+p.gapPx),leftCssExpr:Yt({columnStart:C.columnStart,columnWidthCssExpr:F,gapCssExpr:N}),widthPx:b.itemWidthPx,widthCssExpr:b.itemWidthCssExpr,slot:b.slot,heightCssExpr:nt.itemHeightCssExprs[W]??b.heightCssExpr}})}});return {itemCount:P,states:h,variants:G,structuredLayout:f,structuredNodeId:f?.__rmgNodeId,plainStructuredStyle:f?n(r(f.style,e)):void 0,responsiveCss:g}}function le(t,n){if(!t.length)return null;let e=t[0];for(let r of t)if(n>=r.state.minWidth)e=r;else break;return e}function Gn(t){return t.items.length?Math.max(0,...t.items.map(n=>n.top+n.height)):0}function X(t,n){return `${t}:${n} !important;`}function xn(t){let n=[["height",t.shellHeightCssExpr??`${Gn(t)}px`],["--rmg-cols",t.state.columns],["--rmg-gap",`${t.state.gapPx}px`]];for(let[e,r]of Object.entries(t.positionedCssVars??{}))n.push([e,r]);return n}function Yn(t){return t.map(([n,e])=>n==="height"?["min-height",e]:[n,e])}function ue(t$1){if(!t$1.scopeId||!t$1.prediction.variants.length)return "";let n=`[data-rmg-masonry-layout-seed="${t(t$1.scopeId)}"]`,e=(i,o)=>{let a=`${n}{`+i.map(([l,c])=>X(l,c)).join("")+"}",s=o.map(l=>`${`${n}>[data-rmg-idx="${l.index}"]`}{`+[X("top",l.topCssExpr??"0px"),X("left",l.leftCssExpr),X("width",l.widthCssExpr)].join("")+"}").join("");return `${a}${s}`},r=i=>{let o=xn(i),a=e(o,i.items.map(l=>({index:l.index,topCssExpr:l.topCssExpr??`${l.top}px`,leftCssExpr:l.leftCssExpr,widthCssExpr:l.widthCssExpr}))),s=(i.containerCssRules??[]).map(l=>`@container (min-width:${l.minWidth}px){${e(Object.entries(l.rootDecls),l.items)}}`).join("");return `${a}${s}`};return t$1.prediction.variants.map(i=>{let o=r(i);return i.state.minWidth<=0?o:`@media (min-width:${i.state.minWidth}px){${o}}`}).join(`
2
+ `)}function pe(t$1){if(!t$1.scopeId||!t$1.prediction.variants.length)return "";let n=`[data-rmg-masonry-skeleton-shell="${t(t$1.scopeId)}"]`,e=i=>`${n}{`+Yn(i).map(([o,a])=>X(o,a)).join("")+"}",r=i=>{let o=e(xn(i)),a=(i.containerCssRules??[]).map(s=>`@container (min-width:${s.minWidth}px){${e(Object.entries(s.rootDecls))}}`).join("");return `${o}${a}`};return t$1.prediction.variants.map(i=>{let o=r(i);return i.state.minWidth<=0?o:`@media (min-width:${i.state.minWidth}px){${o}}`}).join(`
3
+ `)}var yn=B.createContext(null);function me(t){return jsx(yn.Provider,{value:t.value,children:t.children})}function de(){return B.useContext(yn)}export{Jn as a,Qn as b,At as c,oe as d,Kn as e,Gt as f,Yt as g,Jt as h,ae as i,le as j,ue as k,pe as l,me as m,de as n};
File without changes
@@ -0,0 +1,4 @@
1
+ import {a as a$2}from'./chunk-GNGOOOVY.mjs';import {l,j,x,y,n,r,k,a as a$3,z,t,m}from'./chunk-AX2FSVFD.mjs';import {f,c,d,e}from'./chunk-Y7NUGXTR.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import {a,i}from'./chunk-HK2DPKES.mjs';import*as $ from'react';import {jsx,jsxs}from'react/jsx-runtime';var R={gridSkeletonOverlay:"Re",gridSkeletonGrid:"Se",gridSkeletonItem:"J",gridSkeletonItemInner:"Te"};function B(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function re(e){return !!e&&typeof e=="object"&&!Array.isArray(e)}function ue(e,t){let o=t[e];if(typeof o=="number"&&Number.isFinite(o))return o;let r=parseFloat(e);return Number.isNaN(r)?0:r}function Se(e){let{templateColumns:t,breakpointMap:o}=e;if(!re(t))return [];let r=Object.entries(t).map(([s,i])=>({minWidth:ue(s,o),template:typeof i=="string"?i.trim():""})).filter(s=>s.template.length>0).sort((s,i)=>s.minWidth-i.minWidth);return r.length===0?[]:(r[0].minWidth>0?r.unshift({minWidth:0,template:r[0].template}):r[0].minWidth<0&&(r[0]={...r[0],minWidth:0}),r)}function ce(e){let{scopeId:t$1,columns:o,templateColumns:r,gap:s,breakpointMap:i$1,fallbackGap:c}=e,u=`${`[data-rmg-grid-skel-scope="${t(t$1)}"]`} .${R.gridSkeletonGrid}`,p=[],d=(n,l)=>{if(!l.length)return;let y=`${u}{${l.join("")}}`;if(n<=0){p.push(y);return}p.push(`@media (min-width:${n}px){${y}}`);},a=Se({templateColumns:r,breakpointMap:i$1});if(a.length>0)for(let n of a)d(n.minWidth,[`grid-template-columns:${n.template};`]);else if(B(o)){let n=i(o,1,i$1);for(let l of n)d(l.minWidth,[`grid-template-columns:repeat(${Math.max(1,l.count|0)}, minmax(0, 1fr));`]);}if(B(s)){let n=i(s,c,i$1);for(let l of n)d(l.minWidth,[`--rmg-grid-gap:${Math.max(0,l.count|0)}px;`]);}return p.join(`
2
+ `)}function ye(e$1){let{scopeId:t$1,items:o,breakpointMap:r,allowSpan:s}=e$1;if(!s)return "";let i=[],c$1=`[data-rmg-grid-skel-scope="${t(t$1)}"]`;for(let m of o){let u=m.span;if(!c(u))continue;let p=`${c$1} [data-rmg-grid-item-key="${t(m.id)}"]`,d$1=d(u,r);for(let a of d$1){let n=e(a.span);if(!n)continue;let l=`${p}{grid-column:${n};}`;if(a.minWidth<=0){i.push(l);continue}i.push(`@media (min-width:${a.minWidth}px){${l}}`);}}return i.join(`
3
+ `)}function ke(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),!B(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)),!re(e.templateColumns)&&typeof e.templateColumns=="string"&&e.templateColumns.trim().length>0&&t.gridTemplateColumns==null?t.gridTemplateColumns=e.templateColumns.trim():e.templateColumns==null&&!B(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 oe(){return {layout:{kind:"grid",item:{kind:"rect",style:{width:"100%",aspectRatio:1,borderRadius:12}},itemWrapStyle:void 0},radius:12}}function ge(e,t){if(!(!e&&!t))return {...e||{},...t||{}}}function fe(e,t){let o=e.slots?.[t];return {item:o?.item??e.item,itemWrapStyle:ge(e.itemWrapStyle,o?.itemWrapStyle)}}function he(e){if(!e)return {outerStyle:void 0,innerStyle:void 0};let t=m(e),o={};return t.boxShadow!=null&&(o["--rmg-grid-skel-wrap-shadow"]=t.boxShadow,delete t.boxShadow),t.borderRadius!=null&&(o["--rmg-grid-skel-wrap-shadow-radius"]=t.borderRadius),{outerStyle:Object.keys(o).length?o:void 0,innerStyle:t}}function ie({count:e,gridStyle:t,spec:o,breakpoints:r$1,columns:s,templateColumns:i,minColumnWidth:c,gap:m,items:u,allowItemSpans:p,disableShimmer:d}){let a$2=o??oe(),n$1=$.useMemo(()=>({...a,...r$1??{}}),[r$1]),l$1=a$2.layout??oe().layout,y$1=$.useMemo(()=>a$1("gskel_",{count:e,breakpoints:n$1,gridStyle:t,spec:o,columns:s,templateColumns:i,minColumnWidth:c,gap:m,items:u,allowItemSpans:p,disableShimmer:d}),[e,n$1,t,o,s,i,c,m,u,p,d]),C={...ke({gridStyle:t,columns:s,templateColumns:i,minColumnWidth:c,gap:m}),...d?null:l(a$2.shimmer,{enabledVarName:"--rmg-skel-card-shimmer-enabled"})};a$2.backgroundColor&&(C["--rmg-skel-bg"]=a$2.backgroundColor),a$2.radius!=null&&(C["--rmg-skel-radius"]=j(a$2.radius));let{layout:A,responsiveCss:x$1,itemLayouts:S}=$.useMemo(()=>{let k=0,f=()=>`n${++k}`,G=[],b=x(l$1,f,G,"grid",n$1),v=y({scopeAttr:"data-rmg-grid-skel-scope",scopeId:y$1,rules:G}),N=l$1,j=Array.from({length:Math.max(0,typeof N.count=="number"?N.count|0:e|0)},(Re,E)=>({id:`slot-${E}`,span:N.slots?.[E]?.span})),z=u??j,ae=ce({scopeId:y$1,columns:s,templateColumns:i,gap:m,breakpointMap:n$1,fallbackGap:typeof m=="number"&&Number.isFinite(m)?m:8}),pe=ye({scopeId:y$1,items:z,breakpointMap:n$1,allowSpan:!!p}),de=[v,ae,pe].filter(Boolean).join(`
4
+ `);return {layout:b,responsiveCss:de,itemLayouts:z}},[l$1,y$1,n$1,s,i,m,u,p]),g=A,O=g.__rmgNodeId,h=n(r(g.style,n$1)),M=g.count!=null?Math.max(0,g.count|0):Math.max(0,e|0);return jsxs("div",{"data-rmg-grid-skel-scope":y$1,className:[R.gridSkeletonOverlay,a$2.className].filter(Boolean).join(" "),children:[x$1?jsx("style",{dangerouslySetInnerHTML:{__html:x$1}}):null,jsx("div",{"data-rmg-skel-node":O,className:R.gridSkeletonGrid,style:{...C,...h||{},display:"grid"},children:Array.from({length:M}).map((k$1,f$1)=>{let G=S[f$1],{item:b,itemWrapStyle:v}=fe(g,f$1),{outerStyle:N,innerStyle:j}=he(v);return jsx("div",{"data-rmg-grid-item-key":G?.id,className:R.gridSkeletonItem,style:{...f({span:G?.span,allowSpan:!!p})||{},...v?k(v):null,...N||null},children:jsx("div",{className:[R.gridSkeletonItemInner,d?null:a$3.skelCardShimmer].filter(Boolean).join(" "),style:j,children:jsx(z,{node:b,disableShimmer:true,breakpointMap:n$1})})},`rmg-grid-skel-${f$1}`)})})]})}function le(e){return !!e&&typeof e=="object"&&!("kind"in e)&&"layout"in e&&e.layout?.kind==="grid"}function se(e){return !!e&&typeof e=="object"&&"kind"in e&&e.kind==="grid"}function be(e){if(le(e))return e;let{className:t,backgroundColor:o,radius:r,shimmer:s,gridStyle:i,columns:c,templateColumns:m,minColumnWidth:u,gap:p,items:d,allowItemSpans:a,...n}=e;return {className:t,backgroundColor:o,radius:r,shimmer:s,layout:n}}function Ae({layout:e,children:t,breakpoints:o,className:r,style:s,shellClassName:i,shellStyle:c,contentClassName:m,contentStyle:u,backgroundColor:p,radius:d,shimmer:a$3,disableShimmer:n,ariaLabel:l$1,ready:y,enabled:C,force:A,timing:x,grid:S}){let g=$.useMemo(()=>({...a,...o??{}}),[o]),O=$.useMemo(()=>a$1("skel_",{layout:e,breakpoints:g,backgroundColor:p,radius:d,shimmer:a$3,disableShimmer:n,grid:S}),[e,g,p,d,a$3,n,S]),h=$.useMemo(()=>se(e)||le(e)?be(e):null,[e]),M=h?.layout?.kind==="grid"?h.layout:null,k=se(e)?e:null,f=h?{count:S?.count??(typeof M?.count=="number"?Math.max(0,M.count|0):1),gridStyle:S?.style??k?.gridStyle,columns:S?.columns??k?.columns,templateColumns:S?.templateColumns??k?.templateColumns,minColumnWidth:S?.minColumnWidth??k?.minColumnWidth,gap:S?.gap??k?.gap,items:S?.items??k?.items,allowItemSpans:S?.allowItemSpans??k?.allowItemSpans,disableShimmer:n}:null,G={...s,...p?{"--rmg-skel-bg":p}:null,...d!=null?{"--rmg-skel-radius":j(d)}:null,...n?null:l(a$3)},b=h&&f?jsx("div",{"data-rmg-skeleton-scope":O,className:r,style:G,"aria-hidden":l$1?void 0:true,"aria-label":l$1,role:l$1?"status":void 0,"aria-live":l$1?"polite":void 0,children:jsx(ie,{...f,spec:h,breakpoints:g})}):null;return b?jsx(a$2,{skeletonNode:b,ready:y,enabled:C,force:A,timing:x,shellClassName:i,shellStyle:c,contentClassName:m,contentStyle:u,contentOwnsWrapperLayout:t!==void 0,children:t}):null}export{Ae as a};
@@ -0,0 +1 @@
1
+ import {y,x,l,j,z}from'./chunk-AX2FSVFD.mjs';import {a as a$1,d as d$1,e,b,c}from'./chunk-Z34PSRMG.mjs';import {a as a$3}from'./chunk-UUAWLGWO.mjs';import {a}from'./chunk-LVYED5ZM.mjs';import {a as a$2}from'./chunk-HK2DPKES.mjs';import*as d from'react';import {jsx,Fragment,jsxs}from'react/jsx-runtime';var o={shell:"Ue",contentLayer:"y",loadingLayer:"x",contentLayerVisible:"Ve",contentLayerBlocked:"We",loadingLayerOverlay:"er",loadingLayerCompare:"rr",loadingLayerExit:"ir"};function O(...e){return e.filter(Boolean).join(" ")}function Q({skeletonNode:e$1,children:S,ready:v,enabled:c$1=true,force:u,timing:R,shellClassName:M,shellStyle:N,loadingShellStyle:b$1,contentClassName:p,contentStyle:y,contentOwnsWrapperLayout:a$2,loadingLayerFirst:s,contentWrapper:i,shellDataAttributes:w}){let f=S!==void 0,x=a(),m=v===true,r=a$1(u),n=f&&c$1&&(r.enabled||!m),l=d.useMemo(()=>d$1({prefersReducedMotion:x,timing:R}),[x,R]),{showLoadingLayer:C,loadingExiting:k}=e({loadingActive:n,exitMs:l.exitMs,minVisibleMs:l.minVisibleMs}),t=d.useMemo(()=>b({loadingActive:n,loadingForced:u,contentReady:m}),[m,u,n]),P=d.useMemo(()=>c({exitMs:l.exitMs,compareMode:t.compareMode,loadingLayerOpacity:t.loadingLayerOpacity,opacityVarName:"--rmg-standalone-skeleton-opacity"}),[l.exitMs,t.compareMode,t.loadingLayerOpacity]);if(!f)return jsx(Fragment,{children:e$1});let L=c$1&&C,h=!c$1||t.compareMode||k||!L,T=c$1&&t.contentBlocked&&!k&&!a$2,G=i?i(S):S,B=L?jsx("div",{className:O(o.loadingLayer,a$2&&o.loadingLayerOverlay,t.compareMode&&o.loadingLayerCompare,k&&o.loadingLayerExit),style:P,"data-rmg-skeleton-loading-layer":"true",children:e$1}):null;return jsxs("div",{className:O(o.shell,M),style:{...L?b$1:null,...N},"aria-busy":n?true:void 0,"data-rmg-skeleton-wrapper":"true","data-rmg-skeleton-ready":m?"true":"false","data-rmg-skeleton-compare":t.compareMode?"true":"false","data-rmg-skeleton-layout-owner":a$2?"content":"skeleton",...w,children:[s?B:null,jsx("div",{className:O(o.contentLayer,h&&o.contentLayerVisible,T&&o.contentLayerBlocked,p),style:{"--rmg-loading-fade-duration":`${l.exitMs}ms`,...y},"aria-hidden":h?void 0:true,"data-rmg-skeleton-content-layer":"true",children:G}),s?null:B]})}function ie({layout:e,children:S,breakpoints:v,className:c,style:u,shellClassName:R,shellStyle:M,contentClassName:N,contentStyle:b,backgroundColor:p,radius:y$1,shimmer:a,disableShimmer:s,ariaLabel:i,ready:w,enabled:f,force:x$1,timing:m}){let r=d.useMemo(()=>({...a$2,...v??{}}),[v]),n=d.useMemo(()=>a$3("skel_",{layout:e,breakpoints:r,backgroundColor:p,radius:y$1,shimmer:a,disableShimmer:s}),[e,r,p,y$1,a,s]),{layout:l$1,responsiveCss:C}=d.useMemo(()=>{let P=0,L=()=>`n${++P}`,h=[];return {layout:x(e,L,h,"__standalone__",r),responsiveCss:y({scopeAttr:"data-rmg-skeleton-scope",scopeId:n,rules:h})}},[e,n,r]),k={...u,...p?{"--rmg-skel-bg":p}:null,...y$1!=null?{"--rmg-skel-radius":j(y$1)}:null,...s?null:l(a)};return jsx(Q,{skeletonNode:jsxs("div",{"data-rmg-skeleton-scope":n,className:c,style:k,"aria-hidden":i?void 0:true,"aria-label":i,role:i?"status":void 0,"aria-live":i?"polite":void 0,children:[C?jsx("style",{dangerouslySetInnerHTML:{__html:C}}):null,jsx(z,{node:l$1,disableShimmer:s,breakpointMap:r})]}),ready:w,enabled:f,force:x$1,timing:m,shellClassName:R,shellStyle:M,contentClassName:N,contentStyle:b,children:S})}export{Q as a,ie as b};
@@ -0,0 +1 @@
1
+ import {n,c as c$1,e,h as h$1,f,g}from'./chunk-DCUCXQHE.mjs';import {a}from'./chunk-A6MPGIEJ.mjs';import {b as b$1}from'./chunk-UML6FCOQ.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import {b,a as a$1,h,c}from'./chunk-HK2DPKES.mjs';import*as t from'react';import {jsx,jsxs}from'react/jsx-runtime';var O={masonryRoot:"ar",masonryCol:"tr",masonryItem:"k",masonryShellFrame:"nr",introContainer:"w",introActive:"K"};function ce(e){if(e.preferPreviousHeight&&Number.isFinite(e.previousHeight)&&Number(e.previousHeight)>=0)return Number(e.previousHeight);let n=e.initialHeights?.[e.index];return Number.isFinite(n)&&Number(n)>0?Number(n):e.previousHeight??0}function ie(e){let n=e.previousHeights.slice(0,e.itemCount),m=n.length!==e.previousHeights.length;for(let o=0;o<e.itemCount;o++){if(e.measuredIndices.has(o)&&Number.isFinite(n[o]))continue;let g=ce({index:o,previousHeight:n[o],initialHeights:e.initialHeights,preferPreviousHeight:e.preferPreviousHeights});n[o]!==g&&(n[o]=g,m=true);}return m?n:e.previousHeights}var ae=({items:e$1,masonrySpans:n,masonryColumns:m,masonryGap:o,masonryPlacement:g$1="balanced",masonryInitialHeights:h$2,masonryClassNames:b,masonryStyle:M,masonryAs:S="div",masonryRootRef:C,breakpoints:w,masonryPlugins:p,responsiveViewportWidth:_,onVisibleIndex:E,onLayoutMeasured:u,measurementKey:l,revealedIndicesRef:c$2,masonryLayoutSeedScopeId:R})=>{let f$1=b$1(),y=_??f$1,N=t.useRef(new Set),z=t.useRef(false),D=t.useRef(l),P=t.useMemo(()=>({...a$1,...w??{}}),[w]),[L,k]=t.useState(()=>ie({itemCount:e$1.length,previousHeights:[],measuredIndices:new Set,initialHeights:h$2})),T=t.useRef(L);t.useLayoutEffect(()=>{T.current=L;},[L]),t.useLayoutEffect(()=>{let i=T.current,r=D.current!==l;D.current=l;let v=e$1.length>0&&i.length>=e$1.length&&i.slice(0,e$1.length).every(d=>Number.isFinite(d)&&d>=0);if(!z.current){z.current=true,u?.(e$1.length===0);return}r&&N.current.clear(),u?.(e$1.length===0||v),k(()=>{let d=ie({itemCount:e$1.length,previousHeights:i,measuredIndices:N.current,initialHeights:h$2,preferPreviousHeights:r&&v});return T.current=d,d});},[e$1.length,h$2,l,u]);let W=t.useMemo(()=>{let i=h(m,4,y,P);return Math.max(1,i|0)},[m,y,P]),F=t.useMemo(()=>{let i=h(o,8,y,P);return Math.max(0,c(i,8))},[o,y,P]),U=t.useMemo(()=>e$1.map((i,a)=>c$1({span:n?.[a],columnCount:W,width:y,breakpointMap:P})),[e$1,n,W,y,P]),A=t.useMemo(()=>e({containerWidthCss:"100%"}),[]),x=t.useMemo(()=>{let i=h$1({itemCount:e$1.length,columnCount:W,placement:g$1,heights:L,gapPx:F,spans:U});return {height:i.height,items:i.items.map(a=>({...a,leftCssExpr:g({columnStart:a.columnStart,columnWidthCssExpr:A}),widthCssExpr:f({span:a.span,columnWidthCssExpr:A})}))}},[e$1.length,W,g$1,L,F,U,A]),V=t.useCallback(()=>{if(u){if(e$1.length===0){u(true);return}for(let i=0;i<e$1.length;i++)if(!N.current.has(i)){u(false);return}u(true);}},[e$1.length,u]),B=t.useCallback((i,a)=>{Number.isFinite(a)&&(a>=0&&N.current.add(i),V(),k(r=>{if(r[i]===a)return r;let d=r.slice();return d[i]=a,T.current=d,d}));},[V]);t.useLayoutEffect(()=>{V();},[L,V]);let j=t.useMemo(()=>e$1.map((i,a)=>{let r=x.items[a];return r?jsx(le,{index:a,onHeight:B,className:b?.item,masonryPlugins:p,onVisibleIndex:E,revealedIndicesRef:c$2,measurementKey:l,top:r.top,left:r.leftCssExpr,width:r.widthCssExpr,children:i},a):null}),[e$1,x.items,B,p,b?.item,E,l,c$2]);return jsx(S,{ref:C,className:b?.root,"data-rmg-masonry-layout-seed":R,style:{position:"relative",width:"100%",height:`${x.height}px`,"--rmg-cols":W,"--rmg-gap":`${F}px`,...M||{}},children:j})},le=({index:e,onHeight:n,className:m,top:o,left:g,width:h,masonryPlugins:b,onVisibleIndex:M,revealedIndicesRef:S,measurementKey:C,children:w})=>{let p=t.useRef(null),_=t.useRef(new Set),E=S??_,u=t.useMemo(()=>b?.find(c=>c.renderItem),[b]);t.useLayoutEffect(()=>{let c=p.current;if(!c)return;if(n(e,c.getBoundingClientRect().height),typeof ResizeObserver<"u"){let H=new ResizeObserver(I=>{for(let f of I)n(e,f.contentRect.height);});return H.observe(c),()=>H.disconnect()}},[e,n,C]),t.useEffect(()=>{if(!M)return;let c=p.current;if(!c)return;let R=false,H=()=>{R||(R=true,M(e));};if(typeof IntersectionObserver>"u"){H();return}let I=c.closest('[data-rmg-viewport="true"]'),f=new IntersectionObserver(y=>{for(let N of y)if(N.isIntersecting){H(),f.disconnect();break}},{root:I,rootMargin:"200px",threshold:.15});return f.observe(c),()=>f.disconnect()},[w,e,M]);let l={className:m,"data-rmg-idx":e,style:{position:"absolute",top:`${o}px`,left:g,width:h,"--rmg-intro-index":e}};return u?.renderItem?u.renderItem({index:e,itemRef:p,itemProps:l,children:w,revealedIndicesRef:E},u.options):jsx("div",{ref:p,...l,children:w})};function de(e,n){e&&(typeof e=="function"?e(n):e.current=n);}function me(e){return e?Array.from(e.children).filter(n=>n instanceof HTMLElement&&n.hasAttribute("data-rmg-idx")):[]}function pe(e){return typeof e=="object"&&e!=null&&e.__rmgMasonryPlugin===true}var Pe=t.forwardRef(function({items:n$1,itemSpans:m,masonry:o,breakpoints:g,intro:h},b$1){let M=d(),S=n(),C=t.useRef(null),w=t.useRef(null),p=t.useRef(new Set),_=t.useRef(new Set),E=t.useRef(new Set),u=t.useRef(false),l=t.useRef(n$1.length===0),c=t.useRef(n$1.length),[R,H]=t.useState(b),[I,f]=t.useState(n$1.length===0),[y,N]=t.useState(false),[z,D]=t.useState(false),[P,L]=t.useState(true);t.useLayoutEffect(()=>{let r=()=>{let v=window.innerWidth??document.documentElement.clientWidth??window.visualViewport?.width??0;v<=0||H(d=>d===v?d:v);};return r(),window.addEventListener("resize",r),window.visualViewport?.addEventListener("resize",r),()=>{window.removeEventListener("resize",r),window.visualViewport?.removeEventListener("resize",r);}},[]),t.useLayoutEffect(()=>{L(false);},[]),t.useEffect(()=>{D(true);},[]),t.useEffect(()=>{p.current.clear(),_.current.clear();},[n$1.length]);let k=t.useMemo(()=>(o.plugins??[]).filter(pe),[o.plugins]),T=t.useMemo(()=>k.some(r=>r.blocksReady),[k]);a(!T,C,N);let F=R>0,A=(T?z&&F:F&&y)&&I,x=t.useCallback(()=>me(C.current),[]);t.useImperativeHandle(b$1,()=>({getRootNode:()=>C.current,getItemNodes:x,isReady:()=>u.current,onReady:r=>(E.current.add(r),()=>{E.current.delete(r);})}),[x]),t.useEffect(()=>{if(u.current=A,!A)return;let r=x();E.current.forEach(v=>v(r));},[A,x]);let V=t.useCallback(r=>{p.current.has(r)||(p.current.add(r),M?.notifyBaseVisibleIndex(r));},[M]),B=t.useMemo(()=>JSON.stringify({itemCount:n$1.length,viewportWidth:R,columns:o.columns??null,gap:o.gap??null,placement:o.placement??"balanced",spans:m??[]}),[n$1.length,R,o.columns,o.gap,o.placement,m]);t.useEffect(()=>{I&&(l.current=true);},[I]),t.useLayoutEffect(()=>{let r=c.current!==n$1.length;if(c.current=n$1.length,n$1.length===0){l.current=true,f(true);return}(r||!l.current)&&(l.current=false,f(false));},[n$1.length,B]);let j=z,i=[O.masonryRoot,O.introContainer,j?O.introActive:"",o.classNames?.root||""].filter(Boolean).join(" "),a$1=t.useCallback(r=>{C.current=r,de(o.rootRef,r);},[o.rootRef]);return jsx("div",{ref:w,className:O.masonryShellFrame,children:jsxs("div",{"data-rmg-masonry-content-ready":A?"true":"false",style:{containerType:"inline-size"},children:[S?.responsiveCss&&P?jsx("style",{dangerouslySetInnerHTML:{__html:S.responsiveCss}}):null,jsx(ae,{items:n$1,masonrySpans:m,masonryColumns:o.columns,masonryGap:o.gap,masonryPlacement:o.placement??"balanced",masonryClassNames:{root:i,column:[O.masonryCol,o.classNames?.column].filter(Boolean).join(" "),item:[O.masonryItem,o.classNames?.item].filter(Boolean).join(" ")},masonryStyle:{"--rmg-intro-stagger":`${h.staggerMs}ms`,"--rmg-intro-duration":`${h.durationMs}ms`,"--rmg-intro-easing":h.easing},masonryAs:o.as??"div",masonryRootRef:a$1,breakpoints:g,masonryPlugins:k,masonryInitialHeights:S?.initialHeights,responsiveViewportWidth:R,onVisibleIndex:V,onLayoutMeasured:f,measurementKey:B,revealedIndicesRef:_,masonryLayoutSeedScopeId:S?.scopeId})]})})});export{Pe as a};
@@ -0,0 +1 @@
1
+ import {a}from'./chunk-WGVWASZM.mjs';import*as p from'react';import {jsxs,Fragment,jsx}from'react/jsx-runtime';function A(e,r,n){return jsx("svg",{viewBox:"0 0 24 24",width:"32",height:"32","aria-hidden":true,children:jsx("path",{d:(e==="x"&&n?r==="prev"?"next":"prev":r)==="prev"?"M15.41 16.59 10.83 12l4.58-4.59L14 6l-6 6 6 6z":"M8.59 16.59 13.17 12 8.59 7.41 10 6l6 6-6 6z",transform:e==="y"?" rotate(90 12 12)":""})})}function C(e,r,n){return e==="y"?r==="prev"?{top:10,left:"50%",transform:"translateX(-50%)"}:{bottom:10,left:"50%",transform:"translateX(-50%)"}:n?r==="prev"?{right:10,top:"50%",transform:"translateY(-50%)"}:{left:10,top:"50%",transform:"translateY(-50%)"}:r==="prev"?{left:10,top:"50%",transform:"translateY(-50%)"}:{right:10,top:"50%",transform:"translateY(-50%)"}}function h({host:e,options:r}){let n=p.useRef(null),d=p.useRef(null);if(!(r.enabled!==false)||e.slideCount<=1)return null;let o=t=>{let l=Math.max(0,e.slideCount-1),R=e.index<=0,b=e.index>=l,a=!e.loop&&(t==="prev"?R:b),w=false,f=t==="prev"?n:d,m=()=>{if(a)return;let c=t==="prev"?-1:1,s=e.index+c,P=e.loop?s<0?l:s>l?0:s:s;e.handle?.setIndexFromUi(Math.max(0,Math.min(l,P)),{crossfade:e.hasPlugin("crossfade")});},v=["rmgArrow",`rmgArrow--${t}`,r.arrow?.className,t==="prev"?r.prev?.className:r.next?.className].filter(Boolean).join(" "),i={ref:f,onClick:m,hidden:w,disabled:a,createRipple:e.createRipple,className:v},x=t==="prev"?r.renderPrev?.(i):r.renderNext?.(i);if(x)return x;if(r.render)return r.render({...i,dir:t});let S={position:"absolute",zIndex:20,width:36,height:36,borderRadius:"999px",overflow:"hidden",display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,.75)",boxShadow:"0 0 5px rgba(0,0,0,.35)",cursor:a?"default":"pointer",opacity:a?.35:1,transition:"opacity 120ms ease",pointerEvents:"auto",...C(e.axis,t,e.dir==="rtl"),...r.arrow?.style??{},...t==="prev"?r.prev?.style:r.next?.style??{}};return jsx("div",{ref:f,className:v,role:"button","aria-disabled":a?"true":"false","aria-label":t==="prev"?"Previous slide":"Next slide",onClick:c=>{e.createRipple(c.currentTarget),m();},style:S,children:A(e.axis,t,e.dir==="rtl")})};return jsxs(Fragment,{children:[o("prev"),o("next")]})}function L(e={}){return a("arrows",{options:e,Runtime:h})}export{L as a};
@@ -0,0 +1 @@
1
+ function _(e){let{axis:t,ownerWindow:n,windowMs:o=120,recentMs:i=90,releaseFreshMs:x=180,stillMs:c=140,moveEps:f=.5,flickVel:u=.1,flickDist:h=1,minVel:d=.06}=e,T=1e-6,a=[],l=0,w=0,v=0,E=0,D=0,I=0;function k(s){let r=s.timeStamp,m=n?.performance?.now?n.performance.now():Date.now();return typeof r=="number"&&r>0?r:m}function Y(s){return n.MouseEvent?s instanceof n.MouseEvent:"clientX"in s&&!("touches"in s)}function V(s,r=t.scroll){let m=r==="x"?"clientX":"clientY";if(Y(s))return s[m];let y=s,p=y.touches&&y.touches[0]||y.changedTouches&&y.changedTouches[0];return p?p[m]:r==="x"?v:E}function O(s){let r=s-o*1.5;for(;a.length&&a[0].t<r;)a.shift();}function R(s,r){let m=s-r,y=0,p=0,b=Number.POSITIVE_INFINITY,M=Number.NEGATIVE_INFINITY;for(let A=a.length-1;A>=0;A--){let g=a[A];if(g.t<m)break;b=Math.min(b,g.t),M=Math.max(M,g.t);let S=.5+.5*((g.t-m)/Math.max(r,1));y+=g.dx*S,p+=g.dy*S;}let P=Math.max(M-b,T);return {vx:y/P,vy:p/P}}function X(s,r){let m=s-r,y=0,p=0;for(let b=a.length-1;b>=0;b--){let M=a[b];if(M.t<m)break;y+=M.dx,p+=M.dy;}return {dx:y,dy:p}}return {axis:t,pointerDown(s){return a=[],l=v=V(s,"x"),w=E=V(s,"y"),{x:l,y:w}},pointerMove(s){let r=k(s),m=V(s,"x"),y=V(s,"y"),p=m-v,b=y-E;return a.push({t:r,dx:p,dy:b}),O(r),(Math.abs(p)>=f||Math.abs(b)>=f)&&(I=r),v=m,E=y,D=r,{dx:p,dy:b}},pointerUp(s){let r=k(s);a.push({t:r,dx:0,dy:0}),O(r);let m=r-D,y=r-I,p=m<=x;if(y>c)return {fx:0,fy:0};let{vx:M,vy:P}=R(r,i),{dx:A,dy:g}=X(r,i),B=p&&(Math.abs(M)>=u||Math.abs(A)>=h),S=p&&(Math.abs(P)>=u||Math.abs(g)>=h),{vx:K,vy:q}=R(r,o),L=B?K:0,F=S?q:0;return B&&Math.abs(L)<d&&(L=(A>=0?1:-1)*d),S&&Math.abs(F)<d&&(F=(g>=0?1:-1)*d),{fx:L,fy:F}},readPoint:V}}function G(e){let t=e;return {get:()=>t,set:n=>{t=n;},add:n=>{t+=n;}}}function z(e,t,n,o,i,x){let c=0,f=0,u=i,h=x,d=e.get(),T=0,a=Math.abs;return {sync(){return d=e.get(),T=d,this},resetVelocity(){return c=0,this},useDuration(l){return u=l,this},useFriction(l){return h=l,this},useBaseDuration(){return this.useDuration(i)},useBaseFriction(){return this.useFriction(x)},duration(){return u},frictionFactor(){return h},direction(){return f},velocity(){return c},seek(){let l=e.get(),w=o.get(),v=w-l,E=!u,D=0;return E?(c=0,n.set(w),e.set(w),D=v):(n.set(l),c+=v/u,c*=h,d+=c,e.add(c),D=d-T),f=Math.sign(D),T=d,this},settled(){let l=o.get()-t.get();return a(l)<.001}}}function W(e,t){let n=t-e||1;return {min:e,max:t,reachedMin(o){return o<e},reachedMax(o){return o>t},constrain(o){return Math.max(e,Math.min(t,o))},reachedAny(o){return o<e||o>t},removeOffset(o){let i=o;for(;i<e;)i+=n;for(;i>t;)i-=n;return i}}}function Z(e,t,n,o,i,x){let c=i.measure(10),f=i.measure(50),u=W(.5,.99);function h(){return e.reachedAny(n.get())&&e.reachedAny(t.get())}function d(){return e.reachedAny(n.get())||e.reachedAny(t.get())}return {reached:h,passed:d,constrain(T){if(!h())return;let a=e.reachedMin(t.get())?"min":"max",l=Math.abs(e[a]-t.get()),w=n.get()-t.get(),v=u.constrain(l/f);n.set(n.get()-w*v);let E=n.get()-t.get();!T&&Math.abs(E)<c&&(n.set(e.constrain(n.get())),o.useDuration(x).useBaseFriction());}}}function $(e){return {measure(t){return e*t/100}}}function N(){let e=[];return {add(t,n,o,i){return t.addEventListener(n,o,i),e.push(()=>t.removeEventListener(n,o,i)),this},clear(){for(;e.length;)e.pop()?.();}}}function re(e,t,n,o){let i=16.666666666666668,x=N(),c=null,f=0,u=0;function h(){c=null,f=0;}function d(T){if(!u)return;c==null&&(c=T,n(),n());let a=T-c;for(c=T,f+=a;f>=i;)n(),f-=i;let l=f/i;o(l),u&&(u=t.requestAnimationFrame(d));}return {init(){x.add(e,"visibilitychange",()=>{e.hidden&&h();});},destroy(){this.stop(),x.clear();},start(){u||(u=t.requestAnimationFrame(d));},stop(){t.cancelAnimationFrame(u),u=0,h();},resetBlend(){h();}}}export{_ as a,G as b,z as c,W as d,Z as e,$ as f,N as g,re as h};
@@ -0,0 +1 @@
1
+ var f={xs:0,sm:600,md:900,lg:1200,xl:1536},b=1024,h=768;function m(e,t){if(e==null)return t;if(typeof e=="number")return e;let o=parseFloat(e);return Number.isNaN(o)?t:o}function W(e,t=f){if(e==null)return [];if(typeof e=="number"||typeof e=="string"){let n=m(e,Number.NaN);return Number.isFinite(n)?[{minWidth:0,value:n}]:[]}if(Array.isArray(e)||typeof e!="object")return [];let o=Object.entries(e).map(([n,i])=>{let s=t[n]??(Number.isNaN(parseFloat(n))?Number.NaN:parseFloat(n)),u=m(i,Number.NaN);return {minWidth:s,value:u}}).filter(n=>Number.isFinite(n.minWidth)&&n.minWidth>=0&&Number.isFinite(n.value)).sort((n,i)=>n.minWidth-i.minWidth),r=[];for(let n of o){let i=r[r.length-1];if(i&&i.minWidth===n.minWidth){i.value=n.value;continue}r.push(n);}return r}function R(e,t){let o;for(let r of e){if(r.minWidth>t)break;o=r.value;}return o}function N(e){return e>0?e:typeof window<"u"&&window.innerWidth>0?window.innerWidth:b}function y(e){return e>0?e:typeof window<"u"&&window.innerHeight>0?window.innerHeight:h}function p(e,t,o,r=f){let n=N(o);if(e==null)return t;if(typeof e=="number"||typeof e=="string")return m(e,t);if(Array.isArray(e))return p(e[0],t,n,r);let i=Object.entries(e).map(([u,d])=>({minWidth:r[u]??(Number.isNaN(parseFloat(u))?0:parseFloat(u)),value:d})).sort((u,d)=>u.minWidth-d.minWidth),s=t;for(let u of i)n>=u.minWidth&&(s=p(u.value,s,n,r));return s}function c(e,t,o){if(e==null)return [{minWidth:0,count:t}];if(typeof e=="number"||typeof e=="string"){let n=Math.floor(m(e,t));return [{minWidth:0,count:Math.max(0,n)}]}if(Array.isArray(e))return c(e[0],t,o);let r=Object.entries(e).map(([n,i])=>{let s=o[n]??(Number.isNaN(parseFloat(n))?0:parseFloat(n)),u=Math.floor(m(i,t));return {minWidth:s,count:Math.max(0,u)}}).sort((n,i)=>n.minWidth-i.minWidth);return r.length===0?[{minWidth:0,count:t}]:(r[0].minWidth>0?r.unshift({minWidth:0,count:t}):r[0].minWidth<0&&(r[0]={...r[0],minWidth:0}),r)}export{f as a,b,m as c,W as d,R as e,N as f,y as g,p as h,c as i};
@@ -0,0 +1,4 @@
1
+ import {a as a$2}from'./chunk-A6MPGIEJ.mjs';import {a}from'./chunk-D3T6HIS2.mjs';import {a as a$5}from'./chunk-AKY343WN.mjs';import {c,d as d$1,e,f as f$1}from'./chunk-Y7NUGXTR.mjs';import {a as a$1}from'./chunk-X4HEGEZV.mjs';import {a as a$3}from'./chunk-UUAWLGWO.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import {a as a$4,h,f,i}from'./chunk-HK2DPKES.mjs';import*as t from'react';import {jsx,jsxs}from'react/jsx-runtime';var I={gridRoot:"Oe",gridItem:"d",gridShell:"Pe",introContainer:"u",introItem:"Qe",introActive:"I"};function ie(o){return o instanceof HTMLImageElement}function oe(o){if(!o)return null;if(ie(o))return o;let i=o.querySelector("img");return ie(i)?i:null}function Xe(o){if(!(o instanceof HTMLElement))return null;let i=o.closest("img");return ie(i)?i:null}function Ye(...o){return i=>{for(let e of o)e&&(typeof e=="function"?e(i):typeof e=="object"&&(e.current=i));}}function z(...o){return o.filter(Boolean).join(" ")}function Ze(o){return typeof o=="object"&&o!=null&&o.__rmgGridPlugin===true}var Ge=new Set;function He(o,i){typeof process<"u"&&process.env.NODE_ENV==="production"||Ge.has(o)||(Ge.add(o),console.warn(i));}function q(o){return !!o&&typeof o=="object"&&!Array.isArray(o)}function Le(o){return !!o&&typeof o=="object"&&!Array.isArray(o)}function et(o,i){let e=i[o];if(typeof e=="number"&&Number.isFinite(e))return e;let m=parseFloat(o);return Number.isNaN(m)?0:m}function xe(o){let{templateColumns:i,breakpointMap:e}=o;if(!Le(i))return [];let m=Object.entries(i).map(([s,l])=>({minWidth:et(s,e),template:typeof l=="string"?l.trim():""})).filter(s=>s.template.length>0).sort((s,l)=>s.minWidth-l.minWidth);return m.length===0?[]:(m[0].minWidth>0?m.unshift({minWidth:0,template:m[0].template}):m[0].minWidth<0&&(m[0]={...m[0],minWidth:0}),m)}function tt(o){let{templateColumns:i,viewportWidth:e,breakpointMap:m}=o;if(typeof i=="string"){let p=i.trim();return p.length>0?p:void 0}let s=xe({templateColumns:i,breakpointMap:m});if(!s.length)return;let l=f(e),d=s[0]?.template;for(let p of s)l>=p.minWidth&&(d=p.template);return d}function nt(o){let{scopeId:i$1,columns:e,templateColumns:m,gap:s,breakpointMap:l,fallbackGap:d}=o,f=`${`[data-rmg-grid-scope="${i$1}"]`} [data-rmg-grid-node="true"]`,v=[],T=(u,a)=>{if(!a.length)return;let M=`${f}{${a.join("")}}`;if(u<=0){v.push(M);return}v.push(`@media (min-width:${u}px){${M}}`);},C=xe({templateColumns:m,breakpointMap:l});if(C.length>0)for(let u of C)T(u.minWidth,[`grid-template-columns:${u.template};`]);else if(q(e)){let u=i(e,1,l);for(let a of u)T(a.minWidth,[`grid-template-columns:repeat(${Math.max(1,a.count|0)}, minmax(0, 1fr));`]);}if(q(s)){let u=i(s,d,l);for(let a of u)T(a.minWidth,[`--rmg-grid-gap:${Math.max(0,a.count|0)}px;`]);}return v.join(`
2
+ `)}function rt(o){let{scopeId:i,cells:e$1,breakpointMap:m,allowSpan:s}=o;if(!s)return "";let l=[],d=`[data-rmg-grid-scope="${i}"]`;for(let p of e$1){let f=p.layoutMeta?.span;if(!c(f))continue;let v=`${d} [data-rmg-grid-item-key="${p.id}"]`,T=d$1(f,m);for(let C of T){let u=e(C.span);if(!u)continue;let a=`${v}{grid-column:${u};}`;if(C.minWidth<=0){l.push(a);continue}l.push(`@media (min-width:${C.minWidth}px){${a}}`);}}return l.join(`
3
+ `)}function Ne(o){let{originalStyle:i,layoutMeta:e,allowSpan:m,introStyle:s}=o;return {...i||{},...f$1({span:e?.span,allowSpan:m})||{},...e?.style||{},...s}}var gt=t.forwardRef(function({cells:i,grid:e,breakpoints:m,viewportWidth:s,intro:l,enableFullscreen:d$1,onOpen:p,registerExpandableImage:f,gridItemBaseClass:v="rmg__grid-item",renderMode:T},C){let u=d(),a$6=m??a$4,M=t.useRef(null),x=t.useMemo(()=>a(),[]),[Pe,$e]=t.useState(false),[Ae,We]=t.useState(false),A=t.useRef(new Set),ae=t.useRef(new Set),U=t.useRef(new Set),se=t.useRef(false),W=t.useMemo(()=>(e.plugins??[]).filter(Ze),[e.plugins]),k=t.useMemo(()=>W.find(n=>n.renderItem),[W]),le=t.useMemo(()=>W.some(n=>n.blocksReady),[W]);a$1(true,M,()=>$e(true)),a$2(!le,M,We);let P=T??"wrap",me=e.fullscreenTrigger??"media",[Be,De]=t.useState(false);t.useEffect(()=>{De(true);},[]);let w=le?Be:Ae,J=w&&Pe,B=t.useCallback(()=>{let n=M.current;return n?Array.from(n.querySelectorAll("[data-rmg-idx]")).filter(r=>r instanceof HTMLElement):[]},[]);t.useImperativeHandle(C,()=>({getRootNode:()=>M.current,getItemNodes:B,isReady:()=>se.current,onReady:n=>(U.current.add(n),()=>{U.current.delete(n);})}),[B]),t.useEffect(()=>{if(se.current=w,!w)return;let n=B();U.current.forEach(r=>r(n));},[w,B]),t.useEffect(()=>{A.current.clear();},[i.length]),t.useEffect(()=>{ae.current.clear();},[i.length]),t.useEffect(()=>{let n=M.current;if(!n||!u)return;let r=n.closest('[data-rmg-viewport="true"]'),c=new IntersectionObserver(R=>{for(let b of R){if(!b.isIntersecting)continue;let g=b.target;if(!(g instanceof HTMLElement)){c.unobserve(b.target);continue}let N=g.getAttribute("data-rmg-idx"),y=N!=null?parseInt(N,10):NaN;if(!Number.isFinite(y)){c.unobserve(g);continue}A.current.has(y)||(A.current.add(y),u.notifyBaseVisibleIndex(y)),c.unobserve(g);}},{root:r,rootMargin:"200px",threshold:.15});return Array.from(n.children).filter(R=>R instanceof HTMLElement&&R.hasAttribute("data-rmg-idx")).forEach(R=>{let b=R.getAttribute("data-rmg-idx"),g=b!=null?parseInt(b,10):NaN;!Number.isFinite(g)||A.current.has(g)||c.observe(R);}),()=>c.disconnect()},[i,u,P]);let D=t.useCallback((n,r,c)=>{if(!d$1)return;let S=me==="media"?Xe(c.target):oe(r);S&&p(n,S);},[d$1,me,p]),K=t.useCallback(n=>r=>{r.preventDefault(),D(n,r.currentTarget,r);},[D]),O=t.useCallback(n=>r=>{r.key!=="Enter"&&r.key!==" "||(r.preventDefault(),D(n,r.currentTarget,r));},[D]),Q=t.useCallback(n=>r=>{f(n,oe(r));},[f]);t.useEffect(()=>()=>{x.destroyAll();},[x]);let ue=typeof e.minColumnWidth=="number"?`${e.minColumnWidth}px`:e.minColumnWidth??"160px",G=typeof e.gap=="number"&&Number.isFinite(e.gap)?e.gap:8,V=q(e.gap),X=Le(e.templateColumns),j=q(e.columns),H=e.templateColumns!=null||e.columns!=null;e.templateColumns!=null&&(e.columns!=null||e.minColumnWidth!=null)&&He("grid-template-columns-precedence","[react-motion-gallery] Grid `templateColumns` overrides `columns` and `minColumnWidth` when they are provided together."),!H&&i.some(n=>n.layoutMeta?.span!=null)&&He("grid-span-autofill-ignored","[react-motion-gallery] Grid item `span` is ignored when the grid is using auto-fill `minColumnWidth` mode. Use `columns` or `templateColumns` to enable spans.");let $=t.useMemo(()=>a$3("rmg-grid-",{columns:e.columns,templateColumns:e.templateColumns,gap:e.gap,breakpointMap:a$6,fallbackGap:G}),[e.columns,e.templateColumns,e.gap,a$6,G]),Y=t.useMemo(()=>{if(V)return;if(typeof e.gap=="string"&&Number.isNaN(parseFloat(e.gap)))return e.gap;let n=h(e.gap,G,s,a$6);return `${Math.max(0,n|0)}px`},[e.gap,V,s,a$6,G]),Z=t.useMemo(()=>X?void 0:tt({templateColumns:e.templateColumns,viewportWidth:s,breakpointMap:a$6}),[e.templateColumns,X,s,a$6]),F=t.useMemo(()=>{if(e.templateColumns!=null||j||e.columns==null)return;let n=h(e.columns,1,s,a$6);return Math.max(1,n|0)},[e.columns,e.templateColumns,j,s,a$6]),ce=t.useMemo(()=>nt({scopeId:$,columns:e.templateColumns==null&&j?e.columns:void 0,templateColumns:e.templateColumns,gap:V?e.gap:void 0,breakpointMap:a$6,fallbackGap:G}),[$,j,X,V,e.columns,e.templateColumns,e.gap,a$6,G]),de=t.useMemo(()=>rt({scopeId:$,cells:i,breakpointMap:a$6,allowSpan:H}),[$,i,a$6,H]),pe=t.useMemo(()=>[ce,de].filter(Boolean).join(`
4
+ `),[ce,de]),fe=t.useMemo(()=>{let n={"--rmg-grid-min":ue};return Y!=null&&(n["--rmg-grid-gap"]=Y),Z?n.gridTemplateColumns=Z:F&&F>0&&(n.gridTemplateColumns=`repeat(${F}, minmax(0, 1fr))`),n},[ue,Y,Z,F]),ge=t.useMemo(()=>z(v,I.gridItem,I.introItem,e.itemClassName),[v,e.itemClassName]),Ke=t.useMemo(()=>i.map((n,r)=>{let c=n.node,S=n.layoutMeta,R=jsx(a$5,{value:{normIdx:r,isClone:false,storeBag:x},children:c}),b={"--rmg-intro-index":r},g=z(ge,S?.className),N=Ne({layoutMeta:S,allowSpan:H,introStyle:b});if(k?.renderItem){let ee=(t.isValidElement(c)?c:null)?.props??{},ze=d$1?E=>{E.defaultPrevented||K(r)(E);}:void 0,qe=d$1?E=>{ee.onKeyDown?.(E),!E.defaultPrevented&&O(r)(E);}:void 0,Ue={"data-rmg-idx":r,"data-rmg-grid-item-key":n.id,className:g,style:N,onClick:ze,onKeyDown:qe,tabIndex:d$1?ee.tabIndex??0:void 0,"aria-label":d$1?ee["aria-label"]??`View image ${r+1}`:void 0};return k.renderItem({index:r,key:n.id,itemProps:Ue,children:R,registerExpandableImage:(E,Je)=>f(E,Je),revealedIndicesRef:ae},k.options)}if(P==="passthrough")return jsx("div",{"data-rmg-idx":r,"data-rmg-grid-item-key":n.id,className:g,style:N,children:R},n.id);if(!t.isValidElement(c)||typeof c.type!="string")return jsx("div",{"data-rmg-idx":r,"data-rmg-grid-item-key":n.id,className:g,style:N,onClick:K(r),onKeyDown:O(r),tabIndex:0,"aria-label":`View image ${r+1}`,ref:Q(r),children:R},n.id);let y=c,_=y.props??{},Ve=y.ref,je=h=>{_.onClick?.(h),!h.defaultPrevented&&K(r)(h);},Fe=h=>{_.onKeyDown?.(h),!h.defaultPrevented&&O(r)(h);},_e=Ye(Ve,Q(r));return t.cloneElement(y,{key:n.id,ref:_e,"data-rmg-idx":r,"data-rmg-grid-item-key":n.id,className:z(g,_.className),style:Ne({originalStyle:_.style,layoutMeta:S,allowSpan:H,introStyle:b}),onClick:je,onKeyDown:Fe,tabIndex:y.props?.tabIndex??0,"aria-label":y.props?.["aria-label"]??`View image ${r+1}`,children:y.props?.children===void 0?void 0:jsx(a$5,{value:{normIdx:r,isClone:false,storeBag:x},children:y.props.children})})}),[i,k,P,ge,H,d$1,K,O,f,Q,x]);t.useLayoutEffect(()=>{if(P!=="passthrough"||k?.renderItem)return;let n=M.current;if(n){for(let r=0;r<i.length;r++){let c=n.querySelector(`[data-rmg-idx="${r}"]`);f(r,oe(c));}return ()=>{for(let r=0;r<i.length;r++)f(r,null);}}},[P,k,i.length,f]);let ye=t.useMemo(()=>({className:z(I.gridRoot,I.introContainer,J&&I.introActive,e.rootClassName),"data-rmg-grid-node":"true",style:{...fe,"--rmg-intro-stagger":`${l.staggerMs}ms`,"--rmg-intro-duration":`${l.durationMs}ms`,"--rmg-intro-easing":l.easing},"aria-busy":w?void 0:true}),[e.rootClassName,fe,l.staggerMs,l.durationMs,l.easing,J,w]),Re=jsx("div",{ref:M,...ye,children:Ke}),Oe=l.renderIntro?l.renderIntro({active:J,containerProps:ye},Re):Re;return jsxs("div",{className:I.gridShell,"data-rmg-grid-scope":$,children:[pe?jsx("style",{dangerouslySetInnerHTML:{__html:pe}}):null,Oe]})});export{gt as a};
@@ -0,0 +1 @@
1
+ var o={clickZoomLevel:2.5,maxZoomLevel:3,panDuration:43,panFriction:.68};export{o as a};
@@ -0,0 +1 @@
1
+ function a(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function s(e){return Array.isArray(e)&&e.every(n=>{if(!n||typeof n!="object")return false;let t=n.kind;return t==="image"||t==="video"?typeof n.src=="string":t==="node"?"node"in n:false})}function o(e){return Array.isArray(e)&&e.every(n=>typeof n=="string"?true:!n||typeof n!="object"?false:n.kind==="node"?"node"in n:typeof n.src=="string")}function r(e){return /\.(mp4|webm|ogg)$/i.test(e)?"video":"image"}var i=e=>e.map(n=>typeof n=="string"?{kind:r(n),src:n}:n.kind==="node"?{kind:"node",node:n.node}:(n.kind??(n.poster?"video":r(n.src)))==="video"?{kind:"video",src:n.src,poster:n.poster,alt:n.alt,caption:n.caption}:{kind:"image",src:n.src,alt:n.alt,caption:n.caption,srcSet:n.srcSet,sizes:n.sizes,width:n.width,height:n.height});function c(e){return !e||!e.length?[]:s(e)?e:a(e)||o(e)?i(e):[]}export{i as a,c as b};
@@ -0,0 +1,4 @@
1
+ import {a,c,h,e,b}from'./chunk-ADIHG7AT.mjs';import {f,d,g as g$1,h as h$1,a as a$1}from'./chunk-HGY3QLCE.mjs';import {g}from'./chunk-UAEPMZQY.mjs';import*as w from'react';function _(e){if(!e)return {x:0,y:0};let r=window.getComputedStyle(e).transform;if(!r||r==="none")return {x:0,y:0};let u=r.match(/matrix\(([^)]+)\)/);if(!u)return {x:0,y:0};let c=u[1].split(",").map(parseFloat),i=c[4]||0,m=c[5]||0;return {x:i,y:m}}function N(e,t,r){let u=e.naturalWidth||e.width||t,c=e.naturalHeight||e.height||r,i=Math.min(t/u,r/c);return {baseW:u*i,baseH:c*i}}function ie(e,t,r){return Math.max(t,Math.min(r,e))}function Ye(e,t){return t?{x:(e.clientX+t.clientX)/2,y:(e.clientY+t.clientY)/2}:{x:e.clientX,y:e.clientY}}function Xe(e,t){let r=e.clientX-t.clientX,u=e.clientY-t.clientY;return Math.hypot(r,u)}function ae(e,t,r,u,c=300){let i=e.currentImage.current;if(!i)return;let m=b(i);if(!m.length)return;let f=`transform ${c}ms cubic-bezier(.4,0,.22,1)`,l=`translate3d(${t}px, ${r}px, 0) scale(${u})`;m.forEach(n=>{n.style.transition=f,n.style.transform=l;}),e.offX.current?.set(t),e.offY.current?.set(r),e.locX.current?.set(t),e.locY.current?.set(r),e.prevX.current?.set(t),e.prevY.current?.set(r),e.tgtX.current?.set(t),e.tgtY.current?.set(r),e.scaleRef.current=u,e.setScale(u),window.setTimeout(()=>{m.forEach(n=>{n.style.transition="";});},c+30);}function Le(e,t){let{destZoomLevel:r,centerPoint:u,imageRef:c$1}=t;if(!c$1.current)return;e.currentImage.current=c$1.current;let i=e.currentImage.current,m=a(i);if(!m)return;let f=c(i)??i,l=f.getBoundingClientRect();if(h({width:l.width,height:l.height},m))return;let{x:n,y:a$1}=_(m);(!e.locX.current||!e.locY.current)&&(e.locX.current=e.Vector1D(n),e.prevX.current=e.Vector1D(n),e.offX.current=e.Vector1D(n),e.tgtX.current=e.Vector1D(n),e.locY.current=e.Vector1D(a$1),e.prevY.current=e.Vector1D(a$1),e.offY.current=e.Vector1D(a$1),e.tgtY.current=e.Vector1D(a$1),e.bodyX.current=e.ScrollBody(e.locX.current,e.offX.current,e.prevX.current,e.tgtX.current,e.fs.zoom.panDuration,e.fs.zoom.panFriction).sync(),e.bodyY.current=e.ScrollBody(e.locY.current,e.offY.current,e.prevY.current,e.tgtY.current,e.fs.zoom.panDuration,e.fs.zoom.panFriction).sync());let p=e.scaleRef.current||1,y=ie(r,1,e.fs.zoom.maxZoomLevel),h$1=1.01;if(y===p){let O=e.offX.current?.get()??n,z=e.offY.current?.get()??a$1,H=Math.abs(O)<.5&&Math.abs(z)<.5;if(y>h$1||H)return}let D=p>h$1,b=y>h$1;!D&&b?e.suppressLoopRef.current=true:D&&!b&&(e.suppressLoopRef.current=false);let g=f.getBoundingClientRect(),Y=g.width,R=g.height,S=u.x-g.left,k=u.y-g.top,{baseW:d,baseH:L}=N(m,Y,R),v=(Y-d)/2,P=(R-L)/2,X=e.offX.current.get(),F=e.offY.current.get(),T=y/p,s=X+(1-T)*(S-v-X),o=F+(1-T)*(k-P-F),{x:V,y:E,povX:C,povY:B}=e.boundsForCurrent(y,d,L,Y,R,{ignoreReserved:true});if(s=V.constrain(s),o=E.constrain(o),e.scaleRef.current=y,e.setScale(y),e.previousZoom.current.x=S,e.previousZoom.current.y=k,!b){s=V.constrain(0),o=E.constrain(0),e.boundsX.current=e.ScrollBounds(V,e.offX.current,e.tgtX.current,e.bodyX.current,C,e.fs.zoom.panDuration),e.boundsY.current=e.ScrollBounds(E,e.offY.current,e.tgtY.current,e.bodyY.current,B,e.fs.zoom.panDuration),e.tgtX.current.set(s),e.tgtY.current.set(o),e.bodyX.current?.resetVelocity?.(),e.bodyX.current?.useBaseDuration?.(),e.bodyX.current?.useBaseFriction?.(),e.bodyY.current?.resetVelocity?.(),e.bodyY.current?.useBaseDuration?.(),e.bodyY.current?.useBaseFriction?.(),e.animRef.current?.resetBlend(),e.animRef.current?.start();return}e.tgtX.current.set(s),e.locX.current.set(s),e.prevX.current.set(s),e.offX.current.set(s),e.tgtY.current.set(o),e.locY.current.set(o),e.prevY.current.set(o),e.offY.current.set(o),e.boundsX.current=e.ScrollBounds(V,e.offX.current,e.tgtX.current,e.bodyX.current,C,e.fs.zoom.panDuration),e.boundsY.current=e.ScrollBounds(E,e.offY.current,e.tgtY.current,e.bodyY.current,B,e.fs.zoom.panDuration),e.bodyX.current?.useDuration(0).useFriction(1),e.bodyY.current?.useDuration(0).useFriction(1),e.renderPan(s,o),e.animRef.current?.start();}function Se(e$1,t,r){if(!r.current)return;e$1.currentImage.current=r.current;let u=e$1.currentImage.current;if(!u)return;let c$1=a(u);if(!c$1)return;let i=c(u)??u,m=i.getBoundingClientRect();if(h({width:m.width,height:m.height},c$1))return;let{x:f,y:l}=_(c$1);(!e$1.locX.current||!e$1.locY.current)&&(e$1.locX.current=e$1.Vector1D(f),e$1.prevX.current=e$1.Vector1D(f),e$1.offX.current=e$1.Vector1D(f),e$1.tgtX.current=e$1.Vector1D(f),e$1.locY.current=e$1.Vector1D(l),e$1.prevY.current=e$1.Vector1D(l),e$1.offY.current=e$1.Vector1D(l),e$1.tgtY.current=e$1.Vector1D(l),e$1.bodyX.current=e$1.ScrollBody(e$1.locX.current,e$1.offX.current,e$1.prevX.current,e$1.tgtX.current,e$1.fs.zoom.panDuration,e$1.fs.zoom.panFriction).sync(),e$1.bodyY.current=e$1.ScrollBody(e$1.locY.current,e$1.offY.current,e$1.prevY.current,e$1.tgtY.current,e$1.fs.zoom.panDuration,e$1.fs.zoom.panFriction).sync());let n=e$1.scaleRef.current||1,a$1=n===1,p=a$1?e$1.fs.zoom.clickZoomLevel:1,y=1.01,h$1=n>y,D=p>y;h$1&&!D&&(e$1.suppressLoopRef.current=false,e$1.resetAllZoomDom());let b=i.getBoundingClientRect(),g=b.width,Y=b.height,{clientX:R,clientY:S}=e(t),k=R-b.left,d=S-b.top,{baseW:L,baseH:v}=N(c$1,g,Y),P=(g-L)/2,X=(Y-v)/2,F=e$1.offX.current.get(),T=e$1.offY.current.get(),s,o;if(a$1){let z=p/n;s=F+(1-z)*(k-P-F),o=T+(1-z)*(d-X-T);let{x:H,y:j}=e$1.boundsForCurrent(p,L,v,g,Y);s=H.constrain(s),o=j.constrain(o);}else s=0,o=0;ae(e$1,s,o,p,300),e$1.scaleRef.current=p,e$1.setScale(p),e$1.previousZoom.current.x=k,e$1.previousZoom.current.y=d,e$1.panRef.current={x:s,y:o},e$1.locX.current.set(s),e$1.prevX.current.set(s),e$1.offX.current.set(s),e$1.tgtX.current.set(s),e$1.locY.current.set(o),e$1.prevY.current.set(o),e$1.offY.current.set(o),e$1.tgtY.current.set(o),e$1.bodyX.current=e$1.ScrollBody(e$1.locX.current,e$1.offX.current,e$1.prevX.current,e$1.tgtX.current,e$1.fs.zoom.panDuration,e$1.fs.zoom.panFriction).sync(),e$1.bodyY.current=e$1.ScrollBody(e$1.locY.current,e$1.offY.current,e$1.prevY.current,e$1.tgtY.current,e$1.fs.zoom.panDuration,e$1.fs.zoom.panFriction).sync();let{x:E,y:C,povX:B,povY:O}=e$1.boundsForCurrent(p,L,v,g,Y);e$1.boundsX.current=e$1.ScrollBounds(E,e$1.offX.current,e$1.tgtX.current,e$1.bodyX.current,B,e$1.fs.zoom.panDuration),e$1.boundsY.current=e$1.ScrollBounds(C,e$1.offY.current,e$1.tgtY.current,e$1.bodyY.current,O,e$1.fs.zoom.panDuration),e$1.tgtX.current.set(E.constrain(e$1.tgtX.current.get())),e$1.tgtY.current.set(C.constrain(e$1.tgtY.current.get())),e$1.animRef.current?.resetBlend();}function me(e){w.useEffect(()=>{let t=h$1(document,window,()=>{e.boundsX.current?.constrain(e.pointerDownRef.current),e.boundsY.current?.constrain(e.pointerDownRef.current),e.bodyX.current?.seek(),e.bodyY.current?.seek();},r=>{let u=e.locX.current,c=e.locY.current,i=e.prevX.current,m=e.prevY.current;if(!u||!c||!i||!m)return;let f=u.get()*r+i.get()*(1-r),l=c.get()*r+m.get()*(1-r);e.offX.current?.set(f),e.offY.current?.set(l),e.renderPan(f,l);let n=!!e.bodyX.current?.settled()&&!!e.bodyY.current?.settled(),a=!e.boundsX.current?.reached?.()&&!e.boundsY.current?.reached?.();n&&a&&!e.pointerDownRef.current&&e.animRef.current?.stop();});return e.animRef.current=t,t.init(),()=>{t.destroy(),e.animRef.current=null;}},[]);}function Re(){return {scroll:"x",cross:"y",direction(e){return e},measureSize(e){return e.width}}}function fe(e,t){return typeof t.MouseEvent<"u"&&e instanceof t.MouseEvent}function ve(e,t){return a$1({ownerWindow:t,axis:e})}var A="data-rmg-pan-drag",pe="rmg-zoom-pan-drag-style";function ye(e){let t=w.useMemo(()=>({mouse:400,touch:400}),[]),r=w.useRef(null),u=w.useRef(g$1()).current,c=w.useRef(g$1()).current,i=w.useCallback((n,a)=>n*(a?t.mouse:t.touch),[t]);function m(){if(document.getElementById(pe))return;let n=document.createElement("style");n.id=pe,n.textContent=`
2
+ [data-rmg-zoom-pan-root="true"][${A}] { cursor: grabbing !important; }
3
+ [data-rmg-zoom-pan-root="true"][${A}] * { cursor: grabbing !important; }
4
+ `,document.head.appendChild(n);}w.useEffect(()=>{m();},[]);let f=w.useCallback(n=>{let a=e.currentImage.current;if(a){if(n){a.hasAttribute(A)||a.setAttribute(A,"");return}a.hasAttribute(A)&&a.removeAttribute(A);}},[e.currentImage]),l=w.useCallback((n,a$1)=>{if(!e.isZoomed||!a$1.current)return;e.currentImage.current=a$1.current,e.rebuildPanBodies();let p=window,y=e.axisRef.current||Re();r.current=ve(y,p);let h=n.button!==void 0,D=h?n.button===0:false;if(h&&!D)return;e.pointerDownRef.current=true,e.interactionModeRef.current="drag",f(true);let b=()=>{e.pointerDownRef.current=false,e.interactionModeRef.current="idle",c.clear(),f(false);};e.tgtX.current?.set(e.locX.current?.get?.()??0),e.tgtY.current?.set(e.locY.current?.get?.()??0);let g=3,Y=220,R=.075,S=0,k=0,d=false,L=performance.now(),v=n.nativeEvent;r.current.pointerDown(v);let P=s=>{if(!fe(s,window)&&s.touches?.length>=2)return d=true,b(),X(s);let o=r.current.pointerMove(s);S+=Math.abs(o.dx),k+=Math.abs(o.dy),e.bodyX.current?.useFriction(.3).useDuration(.75),e.bodyY.current?.useFriction(.3).useDuration(.75),e.tgtX.current?.add(o.dx),e.tgtY.current?.add(o.dy),e.animRef.current?.start(),"cancelable"in s&&s.cancelable&&s.preventDefault?.();},X=s=>{let o=r.current.pointerUp(s),V=fe(s,window),E=performance.now()-L,C=S<=g&&k<=g,B=Math.abs(o.fx)<=R&&Math.abs(o.fy)<=R,O=!d&&C&&B&&E<=Y;if(e.pointerDownRef.current=false,e.interactionModeRef.current="idle",c.clear(),b(),O){let x=e.currentImage.current,Z=a(x);if(Z){let W=s,de=W?.touches?.[0]?.clientX??W?.changedTouches?.[0]?.clientX??W?.clientX??v?.clientX,be=W?.touches?.[0]?.clientY??W?.changedTouches?.[0]?.clientY??W?.clientY??v?.clientY,ge={target:Z,currentTarget:Z,clientX:de,clientY:be,nativeEvent:W??v};e.handleZoomToggle(e.zoomCtx,ge,e.currentImage),e.suppressNextClickRef.current=true;let te=s;te?.preventDefault?.(),te?.stopPropagation?.(),e.animRef.current?.stop();return}e.animRef.current?.stop();return}let z=i(o.fx,V),H=i(o.fy,V),j=Math.min(1,Math.abs(o.fx)>0?Math.abs((Math.abs(z)-Math.abs(o.fx))/(o.fx||1)):0),q=Math.min(1,Math.abs(o.fy)>0?Math.abs((Math.abs(H)-Math.abs(o.fy))/(o.fy||1)):0),$=e.fs.zoom.panDuration,U=e.fs.zoom.panDuration,G=e.fs.zoom.panFriction+j/50,K=e.fs.zoom.panFriction+q/50;e.bodyX.current?.useDuration($).useFriction(G),e.bodyY.current?.useDuration(U).useFriction(K),e.tgtX.current?.add(z),e.tgtY.current?.add(H),e.animRef.current?.start();},T=n.nativeEvent instanceof MouseEvent?document:window;c.add(T,"touchmove",P,{passive:false}).add(T,"touchend",X).add(T,"mousemove",P,{passive:false}).add(T,"mouseup",X),u.add(window,"touchcancel",X).add(window,"contextmenu",X);},[e,u,c,i,f]);return w.useEffect(()=>()=>{c.clear(),u.clear(),e.currentImage.current?.removeAttribute(A),document.documentElement.classList.remove("rmg-pan-grabbing");},[e.currentImage,c,u]),{handlePanPointerStart:l}}function Ze(e){return me(e),ye(e)}function _e(e){if(!e.currentImage.current)return;let t=e.currentImage.current,r=a(t);if(!r)return;let u=c(t)?.getBoundingClientRect()??t.getBoundingClientRect(),c$1=u.width,i=u.height,{baseW:m,baseH:f}=N(r,c$1,i),{x:l,y:n}=_(r);e.locX.current=e.Vector1D(l),e.prevX.current=e.Vector1D(l),e.offX.current=e.Vector1D(l),e.tgtX.current=e.Vector1D(l),e.locY.current=e.Vector1D(n),e.prevY.current=e.Vector1D(n),e.offY.current=e.Vector1D(n),e.tgtY.current=e.Vector1D(n),e.bodyX.current=e.ScrollBody(e.locX.current,e.offX.current,e.prevX.current,e.tgtX.current,e.fs.zoom.panDuration,e.fs.zoom.panFriction).sync(),e.bodyY.current=e.ScrollBody(e.locY.current,e.offY.current,e.prevY.current,e.tgtY.current,e.fs.zoom.panDuration,e.fs.zoom.panFriction).sync();let{x:a$1,y:p,povX:y,povY:h}=e.boundsForCurrent(e.scaleRef.current,m,f,c$1,i);e.boundsX.current=e.ScrollBounds(a$1,e.offX.current,e.tgtX.current,e.bodyX.current,y,e.fs.zoom.panDuration),e.boundsY.current=e.ScrollBounds(p,e.offY.current,e.tgtY.current,e.bodyY.current,h,e.fs.zoom.panDuration);}function Ke(e){let{scale:t,imgW:r,imgH:u,currentImageEl:c$1,viewW:i,viewH:m,captionW:f$1,captionH:l,captionPlacement:n,reservedLeft:a,reservedRight:p,reservedTop:y,reservedBottom:h}=e,D=c(c$1)?.getBoundingClientRect()??null,b=i??D?.width??document.documentElement.clientWidth,g=m??D?.height??window.innerHeight,Y=r*t,R=u*t,S=(b-r)/2,k=(g-u)/2,d$1=D?.left??0,L=D?.top??0,v=d$1+S,P=L+k,X=n==="left"?f$1??0:0,F=n==="right"?f$1??0:0,T=n==="top"?l??0:0,s=n==="bottom"?l??0:0,o=a??X,V=p??F,E=y??T,C=h??s,B=d$1-o,O=d$1+b+V,z=L-E,H=L+g+C,j=O-B,q=H-z,$,U,G,K;if(Y<=j){let Z=(B+O)/2-v-Y/2;$=Z,U=Z;}else U=B-v,$=O-Y-v;if(R<=q){let Z=(z+H)/2-P-R/2;G=Z,K=Z;}else K=z-P,G=H-R-P;return {x:d($,U),y:d(G,K),povX:f(j),povY:f(q)}}function xe(e){let{setScale:t,zoomState:r,imageRefs:u,resetPan:c}=e,i=e.transition??"transform 0.2s cubic-bezier(.4,0,.22,1)",m="translate(0, 0) scale(1)";t(1),r.previousZoom.current.x=0,r.previousZoom.current.y=0,r.panRef.current={x:0,y:0},r.scaleRef.current=1,u.current.forEach(f=>{let l=f.current;if(!l)return;let n=l.children[0];if(g(n))return;let a$1=a(l);if(!a$1)return;let p=i.match(/([\d.]+)s/),y=p?parseFloat(p[1])*1e3:300;a$1.style.transition=i,a$1.offsetWidth,a$1.style.transform=m,window.setTimeout(()=>{a$1.style.transition="";},y+50);}),c();}function tr(e){let{currentImage:t,locX:r,prevX:u,offX:c$1,tgtX:i,locY:m,prevY:f,offY:l,tgtY:n,bodyX:a$1,bodyY:p,boundsX:y,boundsY:h,ScrollBody:D,ScrollBounds:b,baseFitSize:g$1,boundsForCurrent:Y,panDuration:R,panFriction:S,animRef:k}=e,d=t.current;if(!d||!r.current||!u.current||!c$1.current||!i.current||!m.current||!f.current||!l.current||!n.current)return;let L=d.children[0];if(g(L))return;let v=a(d);if(!v)return;k.current?.stop?.();let X=(c(d)??d).getBoundingClientRect(),F=X.width,T=X.height,{baseW:s,baseH:o}=g$1(v,F,T);r.current.set(0),u.current.set(0),c$1.current.set(0),i.current.set(0),m.current.set(0),f.current.set(0),l.current.set(0),n.current.set(0),a$1.current=D(r.current,c$1.current,u.current,i.current,R,S).sync(),p.current=D(m.current,l.current,f.current,n.current,R,S).sync();let{x:V,y:E,povX:C,povY:B}=Y(1,s,o,F,T,{ignoreReserved:true});y.current=b(V,c$1.current,i.current,a$1.current,C,R),h.current=b(E,l.current,n.current,p.current,B,R),i.current.set(V.constrain(0)),n.current.set(E.constrain(0)),k.current?.resetBlend();}export{N as a,Ye as b,Xe as c,Le as d,Se as e,Ze as f,_e as g,Ke as h,xe as i,tr as j};
@@ -0,0 +1 @@
1
+ import {d}from'./chunk-4NT4UVB5.mjs';var y=0;function R(e){if(typeof e=="object"&&e!=null){let r=Number.isFinite(e.threshold)?Math.max(0,e.threshold??y):y;return {enabled:e.enabled??true,threshold:r}}return {enabled:e===true,threshold:y}}function F(e,r){return Math.max(0,Math.min(r-1,e))}function j(e,r,s){let o=Math.trunc(e);return s?(o%r+r)%r:F(o,r)}function _(e){let{force:r,adjacentDistance:s,threshold:o}=e;if(o<=0)return true;let t=Math.abs(s);return t<=0?false:Math.abs(r)>=t*o}function w(e){let{force:r,fallbackDirection:s=0,slideCount:o,wrap:t,skipSnaps:L,strictSnaps:p,scrollTarget:b}=e,n=o||1;if(n<=1)return 0;let S=j(e.currentIndex||0,n,t),h=j(e.dragStartIndex??S,n,t),i=d(r),l=d(s);function k(d,a){if(!t||a===0)return false;let m=d+a*-1;return m<0||m>n-1}let M=p&&i!==0&&l!==0&&i!==l&&(k(h,i)||k(h,l))?l:i||l,u=p?M:i;function x(d,a){if(a===0)return b.byIndex(d,0).distance;let m=a*-1,c=d+m;t?c=(c%n+n)%n:(c<0||c>n-1)&&(c=d);let A=n===2?a:0;return b.byIndex(c,A).distance}if(p)return x(h,u);if(u===0)return 0;let T=R(L);if(!T.enabled)return x(S,u);let I=x(S,u);if(!_({force:r,adjacentDistance:I,threshold:T.threshold}))return I;let g=b.byDistance(r,true),{index:f}=g,{distance:v}=g;return f!==S?t?v:(f=F(f,n),b.byIndex(f,u).distance):I}export{w as a};
@@ -0,0 +1 @@
1
+ import {b,d,c}from'./chunk-6XG7U4FJ.mjs';import {e,f as f$1}from'./chunk-UAEPMZQY.mjs';import {a as a$3}from'./chunk-BJBHSWMF.mjs';import {e as e$1,c as c$1,d as d$1,j,g as g$1,f as f$2,h,i}from'./chunk-NHIKOJLU.mjs';import {a}from'./chunk-UML6FCOQ.mjs';import {a as a$1}from'./chunk-B4CC5AGE.mjs';import {f,g,a as a$2}from'./chunk-HK2DPKES.mjs';import*as n from'react';import {jsx,jsxs,Fragment}from'react/jsx-runtime';function Ge(e,t){return t>0?`calc(${e} - ${t}px)`:e}function lt(e){return e.isClone||e.renderMode==="crossfade"}function ct(e){return e.lazyEnabled&&!e.liveReady&&!e.lazyAllowed&&e.activeCanonicalIndex!=null&&e.canonicalIndex!==e.activeCanonicalIndex}function Qe(e,t){return t>1&&e===t+2}function dt(e,t,s){if(!Qe(t,s)){let o=s||t||1;return (e%o+o)%o}return e===0?s-1:e===t-1?0:e-1}function ut(e,t,s){return Qe(t,s)&&(e===0||e===t-1)}function Pe(e,t){return e===false?{render:false,node:null,isCustom:false}:typeof e=="function"?{render:true,node:e(t),isCustom:true}:e===true||e==null?{render:true,node:null,isCustom:false}:{render:true,node:e,isCustom:true}}function ft(e,t,s=t){e&&(e.style.opacity=t?"1":"0",e.style.visibility=t?"visible":"hidden",e.style.pointerEvents=s?"auto":"none");}function xe(e){e&&(e.style.setProperty("opacity","1","important"),e.style.setProperty("visibility","visible","important"),e.style.setProperty("pointer-events","none","important"));}function Me(e){e&&(e.style.setProperty("opacity","0","important"),e.style.setProperty("visibility","hidden","important"),e.style.setProperty("pointer-events","none","important"));}function Je(e){if(!e)return;try{e?.pause?.();}catch{}let t=e?.plyr??null;try{t?.pause?.();}catch{}try{t?.media?.pause?.();}catch{}}function pt(e){if(typeof e=="number"&&Number.isFinite(e)&&e>0)return e;if(typeof e=="string"){let t=e.trim(),s=t.match(/^(\d+(?:\.\d+)?)\s*:\s*(\d+(?:\.\d+)?)$/);if(s){let y=parseFloat(s[1]),w=parseFloat(s[2]);if(y>0&&w>0)return y/w}let o=t.match(/^(\d+(?:\.\d+)?)\s*\/\s*(\d+(?:\.\d+)?)$/);if(o){let y=parseFloat(o[1]),w=parseFloat(o[2]);if(y>0&&w>0)return y/w}let f=Number(t);if(Number.isFinite(f)&&f>0)return f}if(typeof e=="object"&&e){let t=e.w??e.width,s=e.h??e.height;if(typeof t=="number"&&typeof s=="number"&&t>0&&s>0)return t/s}return null}function Xe(e,t){let s=t?.source?.poster??e.poster??e.thumb;return typeof s=="string"&&s?s:void 0}function Ye(e,t){let o=t?.source?.sources?.[0]?.src??e.src??"";return typeof o=="string"?o:String(o??"")}function mt(e){if(typeof window>"u")return false;try{return new URL(e,window.location.href).origin!==window.location.origin}catch{return false}}function yt(e,t){if(!t)return e;let s=e??{};return s.crossorigin!=null?s:{...s,crossorigin:true}}function Rt(e){let{item:t,renderedIndex:s,canonicalIndex:o,activeCanonicalIndex:f,isClone:y,openingCanonicalIndex:w,openingInProgress:G,isZoomed:K,className:Z,baseStyle:M,renderImage:b,fsLazy:V,fsLazyAllowedRef:H,fsLazyListenersRef:A,fsCustomDecodedImagesRef:T,fsCustomResolvedSrcByKeyRef:F,getMediaKey:$}=e,d=n.useMemo(()=>$(t),[$,t,t.src,t.srcSet,t.sizes]),P=T.current.has(d),R=F.current.get(d)??"",O=!!G&&!y&&w===o,N=n.useCallback(()=>O||P?true:!!H?.current?.has(o),[O,P,H,o]),[g,U]=n.useState(()=>N()),S=n.useRef(null),c=n.useRef(null),p=n.useCallback(E=>{let k=c.current;k&&(E?xe(k):Me(k));},[]),m=n.useMemo(()=>Pe(V.spinner,{kind:"image",isClone:y}),[V.spinner,y]),h$1=n.useMemo(()=>[m.isCustom?a$3.spinnerWrap:a$3.spinner,V.spinnerClassName].filter(Boolean).join(" "),[m.isCustom,V.spinnerClassName]),J=m.render?m.isCustom?jsx("div",{ref:c,className:h$1,style:V.spinnerStyle,"data-rmg-image-spinner":true,children:m.node}):jsx("div",{ref:c,className:h$1,style:V.spinnerStyle,"data-rmg-image-spinner":true}):null;return n.useEffect(()=>{if(N()){U(true);return}U(false);let E=()=>{N()&&(U(true),A?.current?.delete(E));};return A?.current?.add(E),()=>{A?.current?.delete(E);}},[N,A,d]),n.useLayoutEffect(()=>{if(!g){p(true);return}let E=S.current;if(!E)return;let k=false,x=false,W=false,C=null,r=0,a=null,I=null,u=()=>{!I||x||(i(I),I=null);},z=(l,j$1)=>{if(!k&&(u(),p(false),j$1&&l?.naturalWidth)){T.current.add(d);let Y=j(l);Y&&F.current.set(d,Y);}},re=async l=>{if(k||W||a===l)return;a=l,d$1(l,{eager:O});let j$1=j(l);if(P&&!!R&&j$1===R&&l.complete&&l.naturalWidth>0){z(l,false);return}I=g$1(l),p(true),await f$2(l).catch(()=>{}),await e$1(),!(k||W||!I)&&(h(I),x=true,I=null,z(l,l.naturalWidth>0));},Q=()=>{let l=c$1(E);return l?(C?.disconnect(),C=null,r&&window.clearTimeout(r),re(l),true):false};return p(true),Q()||(C=new MutationObserver(()=>{Q();}),C.observe(E,{childList:true,subtree:true}),r=window.setTimeout(()=>{W=true,C?.disconnect(),C=null,u(),p(false);},1e3)),()=>{k=true,r&&window.clearTimeout(r),C?.disconnect(),u();}},[g,p,d,O,P,R,T,F]),jsxs(Fragment,{children:[g?jsx("span",{ref:S,style:{display:"contents"},"data-rmg-fs-custom-image-host":"true",children:b({item:t,index:s,isZoomed:K,className:Z,baseStyle:M})}):null,J]})}function gt(e){let{item:t,renderedIndex:s,canonicalIndex:o,isClone:f,openingCanonicalIndex:y,openingInProgress:w,isZoomed:G,className:K,baseStyle:Z,renderImage:M,fsLazy:b,fsLazyAllowedRef:V,fsLazyListenersRef:H,fsDecodedImagesRef:A,fsCustomDecodedImagesRef:T,fsCustomResolvedSrcByKeyRef:F,getMediaKey:$}=e,d=!!b?.enabled;if(M&&!d)return M({item:t,index:s,isZoomed:G,className:K,baseStyle:Z});if(M&&b)return jsx(Rt,{item:t,renderedIndex:s,canonicalIndex:o,isClone:f,openingCanonicalIndex:y,openingInProgress:w,isZoomed:G,className:K,baseStyle:Z,renderImage:M,fsLazy:b,fsLazyAllowedRef:V,fsLazyListenersRef:H,fsCustomDecodedImagesRef:T,fsCustomResolvedSrcByKeyRef:F,getMediaKey:$});let P=n.useMemo(()=>$(t),[$,t,t.src,t.srcSet,t.sizes]),R=A.current.has(P),O=n.useRef(null),N=n.useRef(null),g=n.useRef(null),U=n.useRef(false),S=t,c=!!w&&!f&&y===o,p=n.useCallback(()=>c||R||!d?true:!!V?.current?.has(o),[c,R,d,V,o]),m=n.useCallback(r=>{let a=O.current;a&&(r?xe(a):Me(a));},[]),h=n.useMemo(()=>Pe(b?.spinner,{kind:"image",isClone:f}),[b?.spinner,f]),J=d&&h.render,E=n.useMemo(()=>[h.isCustom?a$3.spinnerWrap:a$3.spinner,b?.spinnerClassName].filter(Boolean).join(" "),[h.isCustom,b?.spinnerClassName]),k=J?h.isCustom?jsx("div",{ref:O,className:E,style:b?.spinnerStyle,"data-rmg-image-spinner":true,children:h.node}):jsx("div",{ref:O,className:E,style:b?.spinnerStyle,"data-rmg-image-spinner":true}):null,x=n.useCallback(()=>{let r=N.current;if(!r)return;let a=S.src??t.src,I=S.srcSet??"",u=S.sizes??"";r.getAttribute("data-rmg-src-applied")!=="true"&&(r.setAttribute("data-rmg-src-applied","true"),r.src=a,I&&(r.srcset=I),u&&(r.sizes=u));},[S.src,S.srcSet,S.sizes,t.src]),W=n.useCallback(()=>{if(!c)return;let r=N.current;r&&(x(),typeof r.decode=="function"&&r.decode().catch(()=>{}));},[x,c]),C=n.useCallback(()=>{let r=N.current;r&&(m(false),r.style.opacity="0",r.style.transition="none",r.style.willChange="opacity",requestAnimationFrame(()=>{let a=N.current;if(!a)return;a.style.transition="opacity 300ms ease",a.style.opacity="1",U.current||(U.current=true,A.current.add(P));let I=false,u=z=>{z?.propertyName&&z.propertyName!=="opacity"||I||(I=true,a.style.willChange="",a.style.removeProperty("transition"),a.removeEventListener("transitionend",u));};a.addEventListener("transitionend",u),window.setTimeout(()=>u(),360);}));},[A,P,m]);return n.useLayoutEffect(()=>{let r=N.current;if(r){if(c){if(x(),W(),R){r.style.opacity="1",r.style.removeProperty("transition"),r.style.willChange="",m(false);return}r.style.opacity="0",r.style.transition="none",r.style.willChange="opacity",m(true);return}if(R){r.style.opacity="1",r.style.removeProperty("transition"),m(false),x();return}if(r.style.opacity="0",r.style.transition="none",r.style.willChange="opacity",!p()){m(true);return}m(true),x();}},[c,R,p,x,W,m]),n.useEffect(()=>{g.current?.(),g.current=null;let r=N.current;if(!r)return;let a=false,I=async()=>{if(!a)try{if(r.getAttribute("data-rmg-src-applied")!=="true"||((!r.complete||r.naturalWidth===0)&&await new Promise(re=>{let Q=()=>{r.removeEventListener("load",Q),r.removeEventListener("error",Q),re();};r.addEventListener("load",Q,{once:!0}),r.addEventListener("error",Q,{once:!0});}),a))return;if(typeof r.decode=="function")try{await r.decode();}catch{}if(a||(await e$1(),a))return;C();}catch{a||C();}},u=()=>a?false:p()?(x(),m(true),I(),true):false;if(c)return W(),R?(x(),m(false),r.style.removeProperty("transition"),r.style.opacity="1",r.style.willChange="",g.current=()=>{a=true;},g.current):(x(),m(true),I(),g.current=()=>{a=true;},g.current);if(R)return x(),m(false),r.style.removeProperty("transition"),r.style.opacity="1",r.style.willChange="",g.current=()=>{a=true;},g.current;if(u())return g.current=()=>{a=true;},g.current;let z=()=>{u()&&H?.current?.delete(z);};return d&&H?.current?.add(z),m(true),g.current=()=>{a=true,H?.current?.delete(z);},g.current},[c,R,d,H,p,x,C,W,m]),jsxs(Fragment,{children:[jsx("img",{ref:N,alt:t.alt??`cell-${s}`,"data-index":s,className:K,draggable:"false",decoding:"async",loading:c?"eager":"lazy",fetchPriority:c?"high":"low",style:{...Z,display:"block"}}),k]})}function vt(e){let{item:t,renderedIndex:s,canonicalIndex:o,plyr:f,videoSnapshotStore:y,playerRefs:w,defaultPlayerStyle:G,fsVideoStyle:K,fsVideoClassName:Z,fsLazy:M,showFullscreenSlider:b$1}=e;return n.useEffect(()=>(w.current[s]=null,()=>{w.current[s]=null;}),[w,s]),y?jsx(b,{canonicalIndex:o,store:y,src:Ye(t,f),poster:Xe(t,f),source:f?.source??void 0,options:f?.options??void 0,className:["rmg__player",Z].filter(Boolean).join(" "),style:{...G,...K??{},zIndex:2,pointerEvents:"none",visibility:b$1?"visible":"hidden",opacity:b$1?1:0,transition:"opacity 220ms ease",willChange:"opacity"},lazyLoad:M}):null}function St(e$1){let{item:t,renderedIndex:s,canonicalIndex:o,plyr:f,videoSnapshotStore:y,playerRefs:w,defaultPlayerStyle:G,fsVideoStyle:K,fsVideoClassName:Z,fsLazy:M,fsLazyAllowedRef:b$1,fsLazyListenersRef:V,fsPreparedVideosRef:H,getMediaKey:A,showFullscreenSlider:T}=e$1,F=!!M?.enabled,$=n.useMemo(()=>`video:${A(t)}`,[A,t,t.src,t.poster]),d$1=H.current.has($),P=n.useMemo(()=>e(f?.source),[f?.source]),R=n.useMemo(()=>Ye(t,f),[t,f]),O=n.useMemo(()=>Xe(t,f),[t,f]),N=n.useMemo(()=>P!=="mp4"?false:mt(R),[P,R]),g=n.useMemo(()=>yt(f?.options,N),[f?.options,N]),U=n.useMemo(()=>pt(g?.ratio??null),[g]),S=n.useRef(null),c$1=n.useRef(null),p=n.useRef(null),m=n.useRef(false),h=n.useRef(false),J=n.useRef(false),[E,k]=n.useState(false),[x,W]=n.useState(false),C=n.useRef(null),r=n.useRef(false),a=n.useCallback(()=>d$1||h.current||!F?true:!!b$1?.current?.has(o),[d$1,F,b$1,o]),I=n.useCallback(()=>{if(!F)return;let i=b$1?.current;if(!i||i.has(o))return;i.add(o);let L=V?.current;if(L?.size)for(let _ of Array.from(L))try{_();}catch{}},[F,b$1,V,o]),u=n.useCallback(i=>{let L=S.current;L&&(i?xe(L):Me(L));},[]),z=n.useMemo(()=>Pe(M?.spinner,{kind:"video",isClone:false}),[M?.spinner]),re=(M?.enabled??false)&&z.render,Q=n.useMemo(()=>[z.isCustom?a$3.spinnerWrap:a$3.spinner,M?.spinnerClassName].filter(Boolean).join(" "),[z.isCustom,M?.spinnerClassName]),l=n.useCallback(i=>{ft(c$1.current,T&&i,T&&i);},[T]),j=n.useCallback(i=>{if(!y)return;let L=c$1.current;if(!i||!L||!h.current){y.unregisterOriginal(o);return}y.registerOriginal({canonicalIndex:o,api:i,hostEl:L,provider:P,src:R,poster:O,ratio:U});},[o,O,P,U,R,y]);n.useLayoutEffect(()=>{if(d$1||h.current){l(true),u(false),J.current=true,k(true),x||W(true);return}l(false),u(true);},[d$1,l,u,x]),n.useEffect(()=>{if(d$1||h.current)return;let i=()=>J.current?true:a()?(J.current=true,k(true),true):false;if(i())return;let L=()=>{i()&&V?.current?.delete(L);};return F&&V?.current?.add(L),()=>{V?.current?.delete(L);}},[d$1,F,a,V]),n.useEffect(()=>{E&&(m.current||(m.current=true,l(false),u(F),F||u(false),W(true)));},[E,F,l,u]);let Y=n.useCallback(()=>{h.current||(h.current=true,requestAnimationFrame(()=>{u(false),l(true),H.current.add($),j(p.current);}));},[H,$,l,j,u]),te=n.useRef(null),ne=n.useRef(null),D=n.useCallback(()=>{let i=ne.current;if(i){try{i.__rmgDragSwallowCleanup?.();}catch{}ne.current=null;}},[]),le=n.useCallback(i=>{te.current?.(),te.current=null;let L=i??null;if(p.current=L,w.current[s]=L,j(L),requestAnimationFrame(()=>{l(h.current||d$1),u(!(h.current||d$1));}),!i){D();return}let _=i?.plyr??i;ne.current!==_&&(D(),d(_),ne.current=_);try{if(P==="youtube"||P==="vimeo"){te.current=f$1(_,Y,{provider:P,posterSrc:O??null});return}let B=_?.media;if(B){let q=()=>Y();B.addEventListener("loadedmetadata",q,{once:!0}),B.addEventListener("loadeddata",q,{once:!0}),B.addEventListener("canplay",q,{once:!0}),te.current=()=>{try{B.removeEventListener("loadedmetadata",q);}catch{}try{B.removeEventListener("loadeddata",q);}catch{}try{B.removeEventListener("canplay",q);}catch{}};try{let ee=B.readyState??0,ae=B.videoWidth??0,oe=B.videoHeight??0;(ee>=1||ae>0&&oe>0)&&Y();}catch{}}}catch{}},[D,Y,w,P,s,d$1,l,j,u]);n.useEffect(()=>(j(p.current),()=>{j(null);}),[j]),n.useEffect(()=>()=>{te.current?.(),te.current=null,D();},[D]),n.useEffect(()=>()=>{Je(p.current),p.current=null,w.current[s]=null,j(null);},[w,s,j]),n.useEffect(()=>{let i=C.current;if(!i)return;let L=i.closest("[data-rmg-viewport='true']")??i.closest("[data-rmg-fs-viewport='true']")??null,_=.7,B=.55,q=new IntersectionObserver(([ee])=>{let ae=ee.intersectionRatio??0,oe=r.current?!!(ee.isIntersecting&&ae>=B):!!(ee.isIntersecting&&ae>=_);if(oe!==r.current){if(r.current=oe,!oe){Je(p.current),h.current||l(false);return}I(),requestAnimationFrame(()=>{l(h.current||d$1),u(!(h.current||d$1));});}},{root:L,threshold:[0,B,_,1],rootMargin:"0px"});return q.observe(i),()=>q.disconnect()},[I,d$1,l,u]);let se=re?z.isCustom?jsx("div",{ref:S,className:Q,style:M?.spinnerStyle,"data-rmg-video-spinner":true,children:z.node}):jsx("div",{ref:S,className:Q,style:M?.spinnerStyle,"data-rmg-video-spinner":true}):null,X=y?jsx(b,{canonicalIndex:o,store:y,src:R,poster:O,source:f?.source??void 0,options:g,className:["rmg__player",Z].filter(Boolean).join(" "),style:{...G,...K??{},zIndex:1,pointerEvents:"none",visibility:T?"visible":"hidden",opacity:T?1:0}}):null;return jsxs(Fragment,{children:[jsx("div",{ref:C,style:{position:"absolute",inset:0,pointerEvents:T?"auto":"none"}}),X,se,jsx("div",{ref:c$1,"data-index":s,style:{...G,...K??{},zIndex:2,pointerEvents:T?"auto":"none",visibility:"hidden",opacity:0,transition:"opacity 220ms ease",willChange:"opacity"},className:["rmg__player",Z].filter(Boolean).join(" "),"data-rmg-live-video":"true","data-rmg-plyr":"true","data-rmg-plyr-index":String(s),"data-rmg-plyr-provider":P,children:E&&x?jsx(c,{source:f?.source,options:g,ref:le}):null})]})}function ht(e){let{item:t,index:s,canonicalIndex:o,activeCanonicalIndex:f,isClone:y,openingCanonicalIndex:w,openingInProgress:G,deferLiveVideoUntilVisible:K,plyr:Z,imageRef:M,playerRefs:b,cells:V,isZoomed:H,showFullscreenSlider:A,defaultPlayerStyle:T,fsVideoStyle:F,fsVideoClassName:$,onPanPointerDown:d,onSuppressNextClickCapture:P,captionNode:R,captionFirst:O,captionClassName:N,captionStyle:g,captionZoomMotion:U,captionLayout:S,isHorizontal:c,isVertical:p,fsCaptionWidth:m,fsCaptionHeight:h,viewportOverlayPlacement:J,fsViewportOverlayWidth:E,fsViewportOverlayHeight:k,viewportOverlaySideWidth:x=0,viewportOverlayTopBottomHeight:W=0,sideWidth:C,topBottomHeight:r,getTransform:a,styles:I,renderImage:u,fsLazy:z,fsLazyAllowedImagesRef:re,fsLazyListenersImagesRef:Q,fsLazyAllowedVideosRef:l,fsLazyListenersVideosRef:j,fsDecodedImagesRef:Y,fsCustomDecodedImagesRef:te,fsCustomResolvedSrcByKeyRef:ne,fsPreparedVideosRef:D,videoSnapshotStore:le,getMediaKey:se,renderMode:X="track",interactive:i=A,registerCell:L=true}=e,_=t.kind==="node",B=!!K&&!A,q=t.kind==="video"?`video:${se(t)}`:null,ee=q!=null&&D.current.has(q),ae=t.kind==="video"&&!!l?.current?.has(o),oe=t.kind==="video"&&ct({activeCanonicalIndex:f,canonicalIndex:o,lazyAllowed:ae,lazyEnabled:!!z?.videos?.enabled,liveReady:ee}),ye=lt({isClone:y,renderMode:X})||oe,ve={maxWidth:"100%",maxHeight:"100%",objectFit:"contain",touchAction:"manipulation",transformOrigin:"0 0",transform:"translate(0, 0) scale(1)",cursor:i?H?"grab":"zoom-in":"default",userSelect:"none"},de=i&&(U?.interactive??true),ue=U?.contentStyle,ie=R?jsx("div",{"data-rmg-fs-caption-content":"true",style:{width:"100%",...ue},children:R}):null,Se=S==="overlay"&&c&&O&&m!=null?C:0,he=S==="overlay"&&c&&!O&&m!=null?C:0,Re=S==="overlay"&&p&&O&&h!=null?r:0,be=S==="overlay"&&p&&!O&&h!=null?r:0,Ce=J==="left"&&E!=null?x:0,et=J==="right"&&E!=null?x:0,tt=J==="top"&&k!=null?W:0,nt=J==="bottom"&&k!=null?W:0,Oe=Se+Ce,ze=he+et,Ee=Re+tt,Fe=be+nt,Ne=c?Oe:Ee,Ae=c?ze:Fe,rt=!c||S==="overlay"||!R?"100%":`calc(100% - ${C}px)`,st=!p||S==="overlay"||!R?"100%":`calc(100% - ${r}px)`,ot=Ge(rt,Oe+ze),it=Ge(st,Ee+Fe);return jsx("div",{"data-rmg-fs-slide":"true","data-index":s,"data-rmg-canonical-idx":o,"data-rmg-clone":y?"true":"false","data-rmg-fs-render-mode":X,ref:fe=>{L&&fe&&!V.current.some(at=>at.element===fe)&&V.current.push({element:fe,index:s});},style:{transform:X==="crossfade"?"none":a(s),display:"flex",alignItems:"center",justifyContent:"center",position:"absolute",inset:X==="crossfade"?0:void 0,left:X==="crossfade"?void 0:0,top:X==="crossfade"?void 0:0,width:X==="crossfade"?"100%":void 0,minWidth:"100%",height:"100%",margin:"auto",touchAction:i?"none":"manipulation",pointerEvents:i?"auto":"none"},className:I.imgMargin,children:jsxs("div",{style:{position:"relative",width:"100%",height:"100%",display:"flex",flexDirection:c?"row":"column",justifyContent:"center"},children:[R&&O&&S!=="overlay"&&jsx("div",{className:N,"data-rmg-fs-caption":"true","aria-hidden":de?void 0:true,style:{display:"flex",alignItems:"center",justifyContent:"center",flex:c?`0 0 ${C}px`:"0 0 auto",alignSelf:"stretch",textAlign:"left",pointerEvents:de?"auto":"none",padding:"0.75rem 1rem",color:"#fff",fontSize:"0.875rem",width:c?C:"100%",height:p?r:"auto",boxSizing:"border-box",...g},children:ie}),Ne>0&&jsx("div",{"aria-hidden":true,style:{flex:`0 0 ${Ne}px`,pointerEvents:"none",visibility:"hidden"}}),jsx("div",{ref:M,"data-rmg-zoom-pan-root":"true","data-rmg-fs-media":"true","data-rmg-fs-media-viewport":"true",onPointerDown:_||!i?void 0:fe=>d(fe,M),onClickCapture:P,style:{overflow:"visible",touchAction:"none",width:ot,height:it,minWidth:0,display:"flex",alignItems:"center",justifyContent:"center",position:"relative",pointerEvents:i?"auto":"none"},children:_?jsx("div",{"data-rmg-fs-node":"true",style:{width:"100%",height:"100%",position:"relative",pointerEvents:i?"auto":"none",display:"flex",alignItems:"center",justifyContent:"center"},children:t.node}):t.kind==="video"?ye?jsx(vt,{item:t,renderedIndex:s,canonicalIndex:o,plyr:Z,videoSnapshotStore:le,playerRefs:b,defaultPlayerStyle:T,fsVideoStyle:F,fsVideoClassName:$,fsLazy:X==="crossfade"?void 0:z?.videos,showFullscreenSlider:A||X==="crossfade"}):B?null:jsx(St,{item:t,renderedIndex:s,canonicalIndex:o,plyr:Z,videoSnapshotStore:le,playerRefs:b,defaultPlayerStyle:T,fsVideoStyle:F,fsVideoClassName:$,fsLazy:z?.videos,fsLazyAllowedRef:l,fsLazyListenersRef:j,fsPreparedVideosRef:D,getMediaKey:se,showFullscreenSlider:A}):jsx(gt,{item:t,renderedIndex:s,canonicalIndex:o,isClone:y,openingCanonicalIndex:w,openingInProgress:G,isZoomed:H,className:I.fullscreenImages,baseStyle:ve,renderImage:u,fsLazy:X==="crossfade"?void 0:z?.images,fsLazyAllowedRef:re,fsLazyListenersRef:Q,fsDecodedImagesRef:Y,fsCustomDecodedImagesRef:te,fsCustomResolvedSrcByKeyRef:ne,getMediaKey:se})}),R&&!O&&S!=="overlay"&&jsx("div",{className:N,"data-rmg-fs-caption":"true","aria-hidden":de?void 0:true,style:{display:"flex",alignItems:"center",justifyContent:"center",flex:c?`0 0 ${C}px`:"0 0 auto",alignSelf:"stretch",textAlign:"left",pointerEvents:de?"auto":"none",padding:"0.75rem 1rem",color:"#fff",fontSize:"0.875rem",width:c?C:"100%",height:p?r:"100%",boxSizing:"border-box",...g},children:ie}),Ae>0&&jsx("div",{"aria-hidden":true,style:{flex:`0 0 ${Ae}px`,pointerEvents:"none",visibility:"hidden"}})]})},`${t.src??"slide"}-${s}`)}function bt(e){let{items:t,plyrList:s,getTransform:o,imageRefs:f$1,playerRefs:y,cells:w,isZoomed:G,showFullscreenSlider:K,defaultPlayerStyle:Z,fsVideoStyle:M,fsVideoClassName:b,onPanPointerDown:V,onSuppressNextClickCapture:H,renderCaption:A,captionClassName:T,captionStyle:F,captionZoomMotion:$,fsCaptionPlacement:d,fsCaptionWidth:P,fsCaptionHeight:R,fsCaptionBreakpoint:O,fsCaptionLayout:N,fsViewportOverlayPlacement:g$1,fsViewportOverlayWidth:U,fsViewportOverlayHeight:S,fsViewportOverlayBreakpoint:c,breakpointMap:p,resolveFsCaptionPlacement:m,styles:h,renderImage:J,fsLazy:E,fsLazyAllowedImagesRef:k,fsLazyListenersImagesRef:x,fsLazyAllowedVideosRef:W,fsLazyListenersVideosRef:C,canonicalLength:r,activeCanonicalIndex:a$3,openingCanonicalIndex:I,openingInProgress:u,deferLiveVideoUntilVisible:z,fsDecodedImagesRef:re,fsCustomDecodedImagesRef:Q,fsCustomResolvedSrcByKeyRef:l,fsPreparedVideosRef:j,videoSnapshotStore:Y,getMediaKey:te,renderMode:ne="track"}=e,D=f(e.viewportWidth??(typeof window<"u"?a():0)),le=g(e.viewportHeight??(typeof window<"u"?window.innerHeight:0)),se=m(d,O,D),X=se==="left"||se==="top",i=280,L=200,_=a$1(P,i,D,D,p??a$2),B=a$1(R,L,D,le,p??a$2),q=m(g$1,c,D),ee=se??q,ae=a$1(U,i,D,D,p??a$2),oe=a$1(S,L,D,le,p??a$2),ye=r??t.length,ve=ee==="left"||ee==="right",de=ee==="top"||ee==="bottom";return t.map((ue,ie)=>{let Se=f$1.current[ie],he=s[ie],Re=dt(ie,t.length,ye),be=A?A({item:ue,index:Re,isZoomed:G}):null,Ce=ut(ie,t.length,ye);return jsx(ht,{item:ue,index:ie,canonicalIndex:Re,activeCanonicalIndex:a$3,isClone:Ce,openingCanonicalIndex:I,openingInProgress:u,deferLiveVideoUntilVisible:z,plyr:he,imageRef:Se,playerRefs:y,cells:w,isZoomed:G,showFullscreenSlider:K,defaultPlayerStyle:Z,fsVideoStyle:M,fsVideoClassName:b,onPanPointerDown:V,onSuppressNextClickCapture:H,captionNode:be,captionFirst:X,captionClassName:T,captionStyle:F,captionZoomMotion:$,captionLayout:N,isHorizontal:!!ve,isVertical:!!de,fsCaptionWidth:P,fsCaptionHeight:R,viewportOverlayPlacement:q,fsViewportOverlayWidth:U,fsViewportOverlayHeight:S,viewportOverlaySideWidth:ae,viewportOverlayTopBottomHeight:oe,sideWidth:_,topBottomHeight:B,getTransform:o,styles:h,renderImage:J,fsLazy:E,fsLazyAllowedImagesRef:k,fsLazyListenersImagesRef:x,fsLazyAllowedVideosRef:W,fsLazyListenersVideosRef:C,fsDecodedImagesRef:re,fsCustomDecodedImagesRef:Q,fsCustomResolvedSrcByKeyRef:l,fsPreparedVideosRef:j,videoSnapshotStore:Y,getMediaKey:te,renderMode:ne,interactive:ne==="track"&&K,registerCell:ne==="track"},`${ue.src??"slide"}-${ie}`)})}function Nt(e){return bt({...e,renderMode:"crossfade",showFullscreenSlider:true})}export{bt as a,Nt as b};
@@ -0,0 +1 @@
1
+ function i(e){return !e.closest('[data-rmg-plyr="true"], .plyr, video, iframe')}function o(e){return e?Array.from(e.querySelectorAll("img")).filter(i):[]}function l(e){return o(e)[0]??null}function c(e,t){e.hasAttribute("loading")||e.setAttribute("loading",t?.eager?"eager":"lazy"),e.hasAttribute("decoding")||e.setAttribute("decoding","async"),e.hasAttribute("fetchpriority")||e.setAttribute("fetchpriority",t?.eager?"high":"low");}function d(){return new Promise(e=>{if(typeof requestAnimationFrame=="function"){requestAnimationFrame(()=>e());return}globalThis.setTimeout(()=>e(),0);})}async function y(e){if(e.complete){if(e.naturalWidth<=0)return;let t=e.decode;typeof t=="function"&&await t.call(e).catch(()=>{});return}await new Promise(t=>{let r=()=>{if(e.removeEventListener("load",r),e.removeEventListener("error",r),e.naturalWidth<=0){t();return}let n=e.decode;if(typeof n=="function"){n.call(e).catch(()=>{}).finally(t);return}t();};e.addEventListener("load",r),e.addEventListener("error",r);});}function s(e){if(e.hadTransition)return;let t=false,r=()=>{t||(t=true,e.img.style.removeProperty("transition"),e.img.removeEventListener("transitionend",n));},n=a=>{a.propertyName&&a.propertyName!=="opacity"||r();};e.img.addEventListener("transitionend",n),window.setTimeout(r,360);}function m(e){let t={img:e,prevOpacity:e.style.opacity,prevTransition:e.style.transition,hadOpacity:e.style.opacity!=="",hadTransition:e.style.transition!==""};return e.style.opacity="0",t.hadTransition||(e.style.transition="opacity 300ms ease"),t}function u(e){e.hadOpacity?e.img.style.opacity=e.prevOpacity:e.img.style.removeProperty("opacity"),s(e);}function f(e){e.hadOpacity?e.img.style.opacity=e.prevOpacity:e.img.style.removeProperty("opacity"),e.hadTransition?e.img.style.transition=e.prevTransition:e.img.style.removeProperty("transition");}function p(e){return e&&(e.currentSrc||e.src)||""}export{i as a,o as b,l as c,c as d,d as e,y as f,m as g,u as h,f as i,p as j};
@@ -0,0 +1 @@
1
+ var a={rtl:"C",track:"o",viewport:"xe",dotsRoot:"ke",dotsRootX:"we",dotsRootY:"ze",contentLayer:"Xe",contentBlocked:"_e",loadingLayer:"D",loadingLayerCompare:"je",loadingLayerExit:"Ye",fadeInStart:"Ze",fadeInActive:"h",pagination_dot:"s",active:"qe",inactive:"Ae",scrollbar:"i",scrollbarY:"Be",ripple:"f",fade_container:"E",spinner:"Ce",rmgSpin:"F",spinnerWrap:"De",sliderSkeletonOverlay:"G",sliderSkeletonLayout:"Ee",sliderSkeletonOverlays:"Fe",sliderSkeletonRow:"Ge",sliderSkeletonExtras:"He",sliderScope:"Ie",sliderShell:"Je",sliderSkeletonItem:"b",sliderSkeletonItemInner:"Ke",sliderSkeletonGroup:"Le",sliderSkeletonText:"Me",sliderSkeletonTextLine:"Ne",sliderSkeleton:"v",rmgShimmer:"H"};export{a};
@@ -0,0 +1,5 @@
1
+ import {a as a$6}from'./chunk-LVMYHM4T.mjs';import {a as a$2}from'./chunk-NQI246HG.mjs';import {a,b,d,g as g$1,m as m$1,h as h$3,e as e$1,l,k,j as j$1,f as f$2,i}from'./chunk-VPFAU2TE.mjs';import {j,f,h,g as g$2,c as c$1,b as b$3,a as a$5,e as e$2}from'./chunk-4NT4UVB5.mjs';import {b as b$1,c,d as d$1,f as f$1,e,h as h$1,g,a as a$4}from'./chunk-HGY3QLCE.mjs';import {a as a$1}from'./chunk-D3T6HIS2.mjs';import {a as a$7}from'./chunk-AKY343WN.mjs';import {b as b$2}from'./chunk-UML6FCOQ.mjs';import {a as a$3,h as h$2}from'./chunk-HK2DPKES.mjs';import*as m from'react';import {forwardRef,useRef,useState,useMemo,Children,isValidElement,useEffect,useLayoutEffect,useImperativeHandle}from'react';import {jsx,Fragment,jsxs}from'react/jsx-runtime';function Nr(N){let{wrap:H,contentSize:w,location:D,selectedIndex:oe,origin:le=0,threshold:J=1}=N;return !H||oe!==0||!Number.isFinite(w)||w<=0||!Number.isFinite(D)||!Number.isFinite(le)?false:Math.abs(D+w-le)<=Math.max(0,J)}function ko(N,H){let w=N??"x";return a$4({ownerWindow:H,axis:{scroll:w,cross:w==="x"?"y":"x"}})}function Ho(N){let{wrap:H,centerAlign:w,cellsPerSlide:D}=N,oe=typeof D=="number"&&Number.isFinite(D)&&D>0;return H||!!w||oe}function $n(N,H,w,D,oe,le,J,te,Ve,q){let se=oe!=null?(w%oe+oe)%oe:w,Me={normIdx:se,isClone:!!J,storeBag:te,indexChannel:Ve,registerApiByIndex:(me,ce)=>{q&&(ce?q.current[se]=ce:delete q.current[se]);}};return jsx("div",{"data-rmg-slide":"true","data-rmg-idx":String(se),"data-rmg-rendered-idx":String(w),"data-rmg-clone":J?"true":"false",ref:me=>{me&&!D.current.some(ce=>ce.element===me)&&D.current.push({element:me,index:w});},style:{position:"relative",flex:"0 0 auto",...le||{},transform:"scale(var(--rmg-scale, 1))",transformOrigin:"center",userSelect:"none"},children:jsx(a$7,{value:Me,children:N})},H)}var Fo=forwardRef(function({children:H,cellCount:w,isReady:D,setIsReady:oe,loop:le,containScroll:J,freeScroll:te,groupCells:Ve,centerAlign:q,gap:se,sliderViewportStyles:_e,sliderViewportClassName:Me,sliderContainerStyles:me,sliderContainerClassName:ce,cellsPerSlide:X,direction:lt,axis:Q,skipSnaps:ge,strictSnaps:ut,autoHeight:Ce,selectDuration:Te,freeScrollDuration:$t,sliderFriction:dt,initialIndex:tt,indexChannel:Kt,indexChannelControlled:mn,sliderImagesReady:Lt},Ut){let Xt=useRef(a(tt)),pe=useRef(b(tt)),We=useRef(false),W=useRef(null),h$2=useRef([]),ft=useRef(0),L=useRef(pe.current),jt=useRef(0),$e=useRef(0),Ke=useRef(true),F=useRef(null),k$1=useRef(null),[mt,Pt]=useState([]),Ue=useRef(0),[gt,qt]=useState(1),[At,nt]=useState([]),[Xe,gn]=useState(false),[p,Yt]=useState(false),pt=useRef(false),yt=useRef(0),Nt=useRef([]),He=useRef(false),Ae=useRef(new Set),Dt=useRef(new Set),Gt=useRef([]),[rt,ht]=useState(false),[kt,bt]=useState(false),Fe=useRef(0),St=useRef(-1),s=useRef(null),l$1=useRef(null),u=useRef(null),y=useRef(null),b$2=useRef(null),E=useRef(null),pn=useRef(null),ye=useRef(null),he=useRef(null),ze=useRef(false),je=useRef(false),Un=useRef(false),yn=useRef(false),O=useRef(0),Xn=useRef(0),Vr=useRef(0),_r=useRef(0),jn=useRef(0),hn=useRef(0),bn=useRef(0),qe=useRef(null),Ye=useRef(null),Rt=useRef([]),j$2=useRef(0),Sn=useRef(false),Wr=()=>(h$2.current||[]).map((e,t)=>-wn(t)),$r=()=>j$2.current||0,qn=useRef(0),Kr=useRef(null),Jt=useRef(null),Qt=useRef(0),Yn=useRef([]),Ur=useRef(0),Rn=useRef(null),Zt=useRef(null),Ge=useRef(null),be=useRef(null),xt=useRef(null),Ht=useRef(null),en="data-rmg-drag",[Gn,Xr]=useState(0),Mt=useMemo(()=>a$1(),[Gn]),Jn=useRef(false),Qn=useRef(""),tn=useRef({}),Ct=useRef(null),xn=useRef(""),nn=useRef(null),Mn=useRef(null),rn=useRef(null),jr=useMemo(()=>d(pe.current,"instant"),[]),$=Kt??jr,qr=mn===true,ue=lt==="rtl",Zn=ue?a$2.rtl:"",Tt=Q==="x"&&ue?-1:1,Cn=Ho({wrap:p,centerAlign:q,cellsPerSlide:X}),Tn=Q==="y"?"rmg-slider-core-y":"rmg-slider-core-x",I=useMemo(()=>({main:Q,cross:Q==="x"?"y":"x",sizeKey:Q==="x"?"width":"height",clientKey:Q==="x"?"clientWidth":"clientHeight",startKey:Q==="x"?"left":"top",endKey:Q==="x"?"right":"bottom",translate:g=>Q==="x"?`translate3d(${g}px,0,0)`:`translate3d(0,${g}px,0)`,place:g=>Q==="x"?`translateX(${g}px) scale(var(--rmg-scale, 1))`:`translateY(${g}px) scale(var(--rmg-scale, 1))`,wheelDelta:g=>Q==="x"?g.deltaX:g.deltaY}),[Q]);function Se(){let e=k$1.current;if(e){let r=e[I.clientKey];if(Number.isFinite(r)&&r>0)return r}let t=W.current;if(!t)return 0;let n=t[I.clientKey];return Number.isFinite(n)?n:0}function vn(e){let t=Se(),n=new WeakMap,r=c=>{if(typeof HTMLElement>"u"||!(c instanceof HTMLElement))return 0;let o=c.getBoundingClientRect()[I.sizeKey];if(Number.isFinite(o)&&o>0)return o;let i=c[I.clientKey];return Number.isFinite(i)?i:0},a=c=>{let o=c.contentRect?.[I.sizeKey];return Number.isFinite(o)&&o>0?o:r(c.target)};return e.forEach(c=>{if(!c)return;let o=r(c);Number.isFinite(o)&&o>0&&n.set(c,o);}),c=>{if(!c.length)return false;let o=e.filter(Boolean);if(!o.length||!c.every(P=>o.some(v=>v===P.target)))return false;let g=Se();if(g<=0)return false;let M=t;t=g;let C=true;for(let P of c){let v=a(P),R=n.get(P.target);Number.isFinite(v)&&v>0&&n.set(P.target,v),(R==null||!Number.isFinite(v)||Math.abs(v-R)>.5)&&(C=false);}return Number.isFinite(M)&&Math.abs(g-M)<=.5&&C}}function ot(e){if(!e)return 0;let t=e.getBoundingClientRect()[I.sizeKey],n=typeof window<"u"?window.getComputedStyle(e).getPropertyValue("--rmg-scale").trim():"",r=Number.parseFloat(n),a=I.main==="x"?e.offsetWidth:e.offsetHeight,c=(()=>{let o=Array.from(e.children);if(!o.length||typeof window>"u")return 0;let i=I.main==="x"?"offsetLeft":"offsetTop",g=I.main==="x"?"offsetWidth":"offsetHeight",M=I.main==="x"?"marginLeft":"marginTop",C=I.main==="x"?"marginRight":"marginBottom",P=1/0,v=-1/0,R=false;for(let z of o){let K=window.getComputedStyle(z);if(K.position==="absolute"||K.position==="fixed")continue;let x=z[i],G=z[g];if(!Number.isFinite(x)||!Number.isFinite(G)||G<=0)continue;let ee=Number.parseFloat(K[M])||0,ne=Number.parseFloat(K[C])||0;(ee!==0||ne!==0)&&(R=true),P=Math.min(P,x-ee),v=Math.max(v,x+G+ne);}return !R||!Number.isFinite(P)||!Number.isFinite(v)?0:Math.max(0,v-P)})();return f$2({rectSize:t,scale:r,offsetSize:a,marginExtentSize:c})}function Le(){let e=Rn.current;if(!e){yt.current=0;return}let t=e.max-e.min;if(t<=0){yt.current=1;return}let n=y.current?.get()??e.max,r=p?e.removeOffset(n):e.constrain(n);yt.current=Math.max(0,Math.min(1,(e.max-r)/t));}let on=useMemo(()=>Children.toArray(H).map((e,t)=>isValidElement(e)?String(e.key??t):`${typeof e}:${String(e)}`).join("|"),[H]);useEffect(()=>()=>{Mt.destroyAll();},[Mt]),useEffect(()=>()=>{sn();},[]),useEffect(()=>{bt(false),ht(false),Sn.current=false;},[w,on,le,J,Q]);function st(){let e=W.current;if(!e)return [];let t=Array.from(e.children),n=Ue.current||0,r=n;return t.slice(n,t.length-r)}function Yr(e){if(!e.length)return [];let t=I.main==="x"?"offsetLeft":"offsetTop",n=e[0],r=ot(n),a=n[t],c=a+r;return e.map(o=>{let i=ot(o),g=o[t],M=I.main==="x"&&ue?c-(g+i):g-a;return {el:o,start:M,end:M+i,size:i}})}function Gr(e,t){return !e||!t?0:I.main==="y"?t.offsetTop:ue?e.scrollWidth-(t.offsetLeft+ot(t)):t.offsetLeft}function Ne(e,t){return Math.max(0,Math.min(t-1,e))}useEffect(()=>{Ke.current=p;},[p,Ke]);function Jr(e){let t="rmg-drag-style-"+e;if(document.getElementById(t))return;let n=document.createElement("style");n.id=t,n.textContent=`
2
+ /* Only while data-rmg-drag is present on this slider root */
3
+ [data-rmg-slider-core-scope="${e}"][data-rmg-drag] { cursor: grabbing !important; }
4
+ [data-rmg-slider-core-scope="${e}"][data-rmg-drag] * { cursor: grabbing !important; }
5
+ `,document.head.appendChild(n);}useEffect(()=>{F.current&&Jr(Tn);},[F.current,Tn]);function Ft(e){let t=F.current;if(t){if(e){t.hasAttribute(en)||t.setAttribute(en,"");return}t.hasAttribute(en)&&t.removeAttribute(en);}}useEffect(()=>{let e=F.current;if(!e)return;let t=()=>{ze.current&&Ft(false);},n=()=>{ze.current&&Ft(true);};return e.addEventListener("mouseleave",t,{passive:true}),e.addEventListener("mouseenter",n,{passive:true}),()=>{e.removeEventListener("mouseleave",t),e.removeEventListener("mouseenter",n);}},[]);function er(e){let t=h$2.current?.[e];if(!t?.cells?.[0]?.element)return 0;let n=Se();if(n<=0)return 0;let r=t.alignSize>0?t.alignSize:ot(t.cells[0].element);return i({viewport:n,alignSize:r,centerAlign:q})}function wn(e){let t=h$2.current?.[e];if(!t)return 0;let n=-(t.target??0)+er(e);return j$1({snap:n,viewport:Se(),contentSpan:j$2.current||0,containScroll:J&&!p})}function tr(){let e=Se();return k({targets:(h$2.current||[]).map(t=>t.target??0),alignSizes:(h$2.current||[]).map(t=>{let n=t.cells?.[0]?.element,r=ot(n??null);return t.alignSize>0?t.alignSize:r}),viewport:e,centerAlign:q,contentSpan:j$2.current||0,containScroll:J&&!p})}function En(e){let t=j$2.current||0;Yn.current=e,qn.current=t,Ur.current=t;let n=0,r=0;e.length&&(n=Math.min(...e),r=Math.max(...e));let a=p?d$1(-t,0):d$1(n,r);Kr.current=a;let c=e[0]??0;Rn.current=p?g$2(c-t,c):g$2(n,r),Zt.current=b$2.current?c$1(p,e,t,a,b$2.current):null;let o=l$1.current,i=u.current,g=y.current,M=b$2.current;return p&&t>0&&o&&i&&g&&M?Jt.current=b$3(t,a,o,[o,i,g,M]):Jt.current=null,{minSnap:n,maxSnap:r}}function In(e$1={}){let{reanchor:t=false}=e$1,n=tr(),{minSnap:r,maxSnap:a}=En(n);if(!n.length)return;if(p){he.current=null,qe.current=null,Ye.current=null,t?Pn():(cn(y.current?.get()??O.current),Le());return}let c=Se();if(c<=0)return;if(he.current=d$1(Number.isFinite(r)?r:0,Number.isFinite(a)?a:0),l$1.current&&b$2.current&&E.current&&(Ye.current=f$1(c),qe.current=e(he.current,l$1.current,b$2.current,E.current,Ye.current,Te)),t){Pn();return}let o=y.current?.get()??O.current??0,i=he.current.constrain(o);cn(i),E.current?.useDuration(0).useFriction(1).sync().resetVelocity(),ye.current?.stop(),je.current=false,Le();}function Ln(e){let t=h$2.current?.length??0;if(!t)return;let n=Ne(e,t);h$2.current?.[n]&&(Dn(n),L.current=n,St.current=n,be.current?.set(n),xt.current?.set(n));}function Qr(e){let t=e.changedTouches?.[0]??e.touches?.[0];return t?{x:t.clientX,y:t.clientY}:{x:e.clientX,y:e.clientY}}function Zr(e){let{x:t,y:n}=Qr(e),r=e.target instanceof HTMLElement?e.target:document.elementFromPoint(t,n),a=document.elementFromPoint(t,n),c=a?.closest?.('[data-rmg-slide="true"]')??r?.closest?.('[data-rmg-slide="true"]');if(!c)return null;let o=c.querySelector('[data-rmg-plyr="true"]');if(!o)return null;let i=o.getBoundingClientRect();if(!(t>=i.left&&t<=i.right&&n>=i.top&&n<=i.bottom)||a?.closest?.(".plyr__controls"))return null;let M=c.getAttribute("data-rmg-rendered-idx"),C=c.getAttribute("data-rmg-idx"),P=M!=null?parseInt(M,10):NaN,v=C!=null?parseInt(C,10):NaN;return !Number.isFinite(P)||!Number.isFinite(v)?null:{renderedIndex:P,canonicalIndex:v,isClone:c.getAttribute("data-rmg-clone")==="true"}}function eo(e){let t=e?.plyr??null;if(!t)return false;if(typeof t.playing=="boolean"?t.playing:!t.paused)return t.pause(),true;let r=t.play();return r&&typeof r.catch=="function"&&r.catch(()=>{}),true}function to(e){let t=tn.current[e]??null;return eo(t)}function no(e){let t=W.current;return t?!!t.querySelector(`:scope > [data-rmg-slide="true"][data-rmg-clone="true"][data-rmg-idx="${e}"] [data-rmg-video-snapshot="true"]`):false}function ro(e){let t=l$1.current,n=u.current,r=y.current,a=b$2.current,c=qn.current||j$2.current||0,o=be.current?.get()??L.current??0,i=Yn.current[0]??0,g=e??t?.get()??0;return !t||!n||!r||!a||!Nr({wrap:p,contentSize:c,location:g,selectedIndex:o,origin:i})||!no(0)?false:(t.add(c),n.add(c),r.add(c),a.add(c),O.current=t.get(),c)}function oo(e){let t=W.current;return t?t.querySelector(`[data-rmg-slide="true"][data-rmg-clone="false"][data-rmg-idx="${e}"]`):null}function sn(){let e=Ct.current;e&&(e.observer?.disconnect(),e.rafId!=null&&cancelAnimationFrame(e.rafId),Ct.current=null);}function so(e){let t=Ct.current;if(!t||t.canonicalIndex!==e)return;t.deadlineTs=performance.now()+1200;let n=()=>{if(Ct.current===t){if(to(e)){sn();return}if(performance.now()>=t.deadlineTs){sn();return}t.rafId=requestAnimationFrame(n);}};t.rafId=requestAnimationFrame(n);}function co(e){sn(),Ln(e);let t=oo(e),n=k$1.current;if(!t||!n)return;let r={canonicalIndex:e,observer:null,rafId:null,deadlineTs:0},a=new IntersectionObserver(c=>{if(Ct.current===r){for(let i of c)if(!(!i.isIntersecting||(i.intersectionRatio??0)<.1)){r.observer?.disconnect(),r.observer=null,so(e);return}}},{root:n,rootMargin:"0px",threshold:[0,.1]});r.observer=a,Ct.current=r,a.observe(t);}function Pn(){let e=$.get().index??L.current??0;Ln(e);}function io(){return {active:false,speedMs:0,startedAt:null,elapsedMs:0,remainingMs:0,progress:0}}function An(e){Jn.current!==e&&(Jn.current=e,Yt(e),Ke.current=e,e||(Qt.current=0),Sn.current=false,ht(false),Xr(t=>t+1));}let Nn=useRef(false);function ao(){if(!Nn.current){Nn.current=true;try{nn.current?.();}finally{Nn.current=false;}}}function lo(e,t,n){return `${e}|per=${t}|cols=${n?X:0}|wrap=${p?1:0}`}useEffect(()=>{let e=W.current;if(!e)return;let t=null,n=false,r=()=>{t==null&&(t=window.setTimeout(()=>{t=null,a();},0));},a=()=>{if(!n){n=true;try{let i=Children.toArray(H).filter(isValidElement),g=i.length;if(g<1){e.style.removeProperty("--rmg-slide-main-size"),Ue.current=0,Qt.current=0,xn.current="",Rt.current=[],Pt([]),j$2.current=0,Ht.current=null,An(!1),h$2.current=[],nt([]),Nt.current=[];return}let M=Array.from(e.children),C=Ue.current,P=C,v=M.slice(C,M.length-P),R=Se();if(R<=0)return;let z=typeof X=="number"&&X>0,K=1,x;if(z){K=Math.max(1,Math.min(g,X));let U=se*Math.max(0,K-1);x=(R-U)/K;}z&&x!=null?e.style.setProperty("--rmg-slide-main-size",`${x}px`):e.style.removeProperty("--rmg-slide-main-size");let G=0,ee=0;for(let U of v){let S=ot(U);if(S===0){r();return}let T=ee===0?S:G+se+S;if(g$1(T,R))G=T,ee++;else {ee++;break}}let ne=z?Math.max(1,Math.min(g,K)):Math.max(2,Math.min(g,ee)),ve=p;Ue.current=ve?ne:0,ft.current!==ne&&(qt(ne),ft.current=ne);let ct=`${lo(g,ne,z)}|kids=${on}`;if(ct===xn.current)return;xn.current=ct;let Oe=[];Rt.current=[];let Pe=z&&x!=null?{flex:"0 0 auto",[I.sizeKey]:"var(--rmg-slide-main-size)"}:void 0;ve&&Oe.push(...i.slice(-ne).map((U,S)=>$n(U,`before-${S}`,-ne+S,Rt,w,Pe,!0,Mt,$,tn))),Oe.push(...i.map((U,S)=>$n(U,`original-${S}`,S,Rt,w,Pe,!1,Mt,$,tn))),ve&&Oe.push(...i.slice(0,ne).map((U,S)=>$n(U,`after-${S}`,g+S,Rt,w,Pe,!0,Mt,$,tn))),Pt(Oe);}finally{n=false;}}},c=vn([k$1.current,F.current]),o=new ResizeObserver(i=>{Ce&&c(i)||a();});return a(),k$1.current&&o.observe(k$1.current),F.current&&o.observe(F.current),()=>{t!=null&&window.clearTimeout(t),o.disconnect();}},[w,W,ft,X,Gn,on,Ce,$,Mt,p]),useLayoutEffect(()=>{if(!W.current)return;function t(){let c=W.current;if(!c)return;let o=Array.from(c.children);if(o.length===0)return;let i=Ue.current,g=o.slice(i,o.length-i);if(g.length===0)return;let M=Yr(g);if(M.some(x=>x.size===0)){setTimeout(t,0);return}let C=Se();if(C<=0)return;Ht.current={originals:M,cw:C};let P=Ht.current?.originals?.length??0,v=M[P-1]?.end??0,R=m$1({loop:le,itemCount:P,span:v,viewport:C});j$2.current=h$3({baseSpan:v,gap:se,shouldLoop:R});let K=`${M.map(x=>`${e$1(x.start)}:${e$1(x.size)}`).join(",")}|cw=${e$1(C)}|W=${e$1(v)}|wrap=${R?1:0}`;K!==Qn.current&&(Qn.current=K,ao()),An(R),gn(true);}let n=vn([k$1.current,F.current]),r=new ResizeObserver(c=>{Ce&&n(c)||t();});k$1.current&&r.observe(k$1.current),F.current&&r.observe(F.current);let a=typeof window<"u"?window.visualViewport:null;return a?.addEventListener("resize",t),window.addEventListener("resize",t,{passive:true}),t(),()=>{r.disconnect(),a?.removeEventListener("resize",t),window.removeEventListener("resize",t);}},[w,mt,gt,X,se,p,le,I,ue,Ce]),useEffect(()=>{D||!kt||!(Lt??true)||oe(true);},[Lt,kt,D]),useEffect(()=>{if(!D)return;let e=st();Dt.current.forEach(t=>t(e)),Gt.current.splice(0).forEach(t=>t(e));},[D]),useLayoutEffect(()=>{if(!W.current||Rt.current.length===0||j$2.current===0||!h$2.current||!h$2.current[0]||!h$2.current[0].cells[0]?.element)return;let e=Se();e<=0||(!p&&j$2.current<=e?Fe.current=Math.round((e-j$2.current)/2):Fe.current=0,De(y.current?.get()??O.current));},[At,p]),useEffect(()=>{let e=W.current;if(!e)return;let t=false,n=null,r=0,a=5;function c(){t||r++>=a||(n!=null&&window.clearTimeout(n),n=window.setTimeout(()=>{o();},0));}function o(){if(t||!e)return;let i=p?gt:0,g=i,M=Array.from(e.children),C=M.slice(i,M.length-g),P=new Map(C.map((S,T)=>[S,T])),v=Ht.current;if(!v||!v.originals?.length){c();return}if(C.length!==v.originals.length){c();return}let R=v.originals,z=v.cw,K=q&&!p,x=[],G=0,ee=typeof X=="number"&&X>0?Math.max(1,Math.min(R.length,X)):null;if(Ve)for(;G<R.length;){let S=R[G]?.start??0,T=G;if(ee!=null)T=Math.min(R.length,G+ee);else {let V=S+z,ie=.5;for(;T<R.length&&(R[T]?.end??0)<=V+ie;)T++;T===G&&T++;}let Y=R.slice(G,T).map(V=>V.el),re=T>=R.length,de=S;re&&!p&&!K&&(de=Math.max(0,(j$2.current||0)-z)),G===0&&(de=0),x.push({els:Y,target:de}),G=T;}else {let S=Math.max(0,(j$2.current||0)-z),T=.5;if(p||K)R.forEach((Y,re)=>{let de=re===0?0:Y.start;(!x.length||Math.abs(de-x[x.length-1].target)>T)&&x.push({els:[Y.el],target:de});});else {for(let V=0;V<R.length;V++){let ie=R[V],ae=V===0?0:ie.start;if(ae=Math.min(ae,S),(!x.length||Math.abs(ae-x[x.length-1].target)>T)&&x.push({els:[ie.el],target:ae}),Math.abs(ae-S)<=T)break}let Y=S-T,re=S+z+T,de=R.filter(V=>V.start<re&&V.end>Y).map(V=>V.el);if(de.length){let V=x[x.length-1]?.target??-1;if(Math.abs(V-S)>T)x.push({els:de,target:S});else {let ie=new Set(x[x.length-1].els.concat(de));x[x.length-1].els=Array.from(ie);}}else {let V=-1;for(let ae=R.length-1;ae>=0;ae--)if(R[ae].start<=S+T){V=ae;break}let ie=R[Math.max(0,V)];if(ie){let ae=x[x.length-1]?.target??-1;Math.abs(ae-S)>T&&x.push({els:[ie.el],target:S});}}}}let ne=x.map(S=>{let T=0;if(Ve){let Y=1/0,re=-1/0;for(let de of S.els){let V=P.get(de);if(V==null)continue;let ie=R[V];ie&&(Y=Math.min(Y,ie.start),re=Math.max(re,ie.end));}Number.isFinite(Y)&&Number.isFinite(re)&&re>Y&&(T=re-Y);}return T<=0&&(T=ot(S.els[0]??null)),{target:S.target,alignSize:T,cells:S.els.map(Y=>({element:Y,index:P.get(Y)}))}}),ve=l({pages:ne,viewport:z,contentSpan:j$2.current||0,centerAlign:q,containScroll:J&&!p});if(ve.some(S=>Number.isNaN(S.target))||p&&ve.length===1){c();return}let Oe=R[R.length-1]?.end??0,Pe=m$1({loop:le,itemCount:ve.length,span:Oe,viewport:z});if(Pe!==p){An(Pe);return}Qt.current=p&&C.length?Gr(e,C[0]??null):0,Ke.current=Pe,h$2.current=ve,nt(ve),pn.current&&In({reanchor:Cn}),ht(true);let U=[];ve.forEach((S,T)=>{S.cells.forEach(Y=>{U[Y.index]=T;});}),Nt.current=U,window.setTimeout(()=>{if(t)return;let S=st();S.length&&(He.current=true,Ae.current.forEach(T=>T(S)));},0);}return nn.current=o,o(),()=>{t=true,nn.current===o&&(nn.current=null),Mn.current!=null&&(cancelAnimationFrame(Mn.current),Mn.current=null),n!=null&&window.clearTimeout(n);}},[w,on,mt,gt,X,p,J]);let Je=useRef(false);function Be(e,t={}){let{jump:n=false,direction:r,programmatic:a=false}=t,c=be.current;if(!Ge.current||!E.current||!c)return;a&&(Je.current=true);let o=c.clone().set(e).get();vt(o,n?"instant":"animated"),n?E.current.useDuration(0):E.current.useBaseDuration().useBaseFriction();let g=typeof r=="number"?r:0;if(Ge.current.index(o,g),!E.current.duration()){let M=y.current?.get()??b$2.current?.get()??0;O.current=M,Le(),Je.current=false;}}function uo(){let e=Ge.current,t=E.current,n=be.current,r=h$2.current?.length??0;if(!e||!t||!n||!r)return;let a=n.get(),c=p?((a-1)%r+r)%r:Ne(a-1,r);t.useBaseDuration().useBaseFriction(),Be(c,{direction:1,programmatic:true}),$.emitBasePointerDown?.();}function fo(){let e=Ge.current,t=E.current,n=be.current,r=h$2.current?.length??0;if(!e||!t||!n||!r)return;let a=n.get(),c=p?((a+1)%r+r)%r:Ne(a+1,r);t.useBaseDuration().useBaseFriction(),Be(c,{direction:-1,programmatic:true}),$.emitBasePointerDown?.();}function mo(e){let t=-e,n=Wr(),r=$r();if(!n.length)return 0;let a=0,c=1/0;for(let o=0;o<n.length;o++){let i=n[o],g=!r||!p?[i]:[i,i+r,i-r];for(let M of g){let C=Math.abs(M-t);C<c&&(c=C,a=o);}}return a}function De(e){let t=e??O.current,n=p?Qt.current:0;pn.current?.to((t+Fe.current-n)*Tt);}function vt(e,t){St.current!==e&&(St.current=e,be.current?.set(e),L.current=e,$.set(e,t));}function nr(e){if(Je.current)return;let t=mo(e);t!==L.current&&vt(t,"animated");}useEffect(()=>{let e=$,t=()=>h$2.current?.length??0,n=r=>{let a=t();if(!a)return;let c=L.current,o=i=>ue?-i:i;if(r.type==="set"){let i=p?(r.index%a+a)%a:Ne(r.index,a);if(i===c)return;Be(i,{jump:r.mode!=="animated",programmatic:true});return}if(r.type==="bump"){let i=o(r.delta|0);if(!i)return;if(p){let g=((c+i)%a+a)%a;Be(g,{jump:r.mode!=="animated",programmatic:true});}else {let g=Ne(c+i,a);if(g===c)return;Be(g,{jump:r.mode!=="animated",programmatic:true});}return}if(typeof r.index=="number"){let i=p?(r.index%a+a)%a:Ne(r.index,a);i!==c&&Be(i,{jump:r.mode==="instant",programmatic:true});}};return typeof e.onEvent=="function"?e.onEvent(n):e.subscribe(()=>{let{index:r,mode:a}=e.get();n({type:"set",index:r,mode:a});})},[$,p,ue]);let{wheelLockMs:rr,lockWheelFor:zt,unlockWheelNow:or,markWheelSeen:go,isWheelLocked:po}=j(),yo=300;function sr(){or(),zt(yo);}function ho(e){let t=Ge.current,n=E.current,r=Rn.current;if(!t||!n||!r)return false;let a=r.max-r.min;if(a<=0)return Le(),false;sr(),ye.current?.stop(),je.current=false,Je.current=false;let c=Math.max(0,Math.min(1,e)),o=y.current?.get()??b$2.current?.get()??r.max,i=p?r.removeOffset(o):r.constrain(o),M=r.max-c*a-i;n.useDuration(0).useFriction(1).sync().resetVelocity(),t.distance(M,false);let C=y.current?.get()??b$2.current?.get()??o;return O.current=C,Le(),$.emitBasePointerDown?.(),true}function bo(e){let t=E.current,n=b$2.current,r=ye.current;if(!t||!n||!r||!W.current||!h$2.current?.length||!rt||!Xe)return false;if(!Ke.current||ze.current||je.current)return true;let a=Math.abs(Number.isFinite(e)?e:0);if(a<=0)return false;let c=y.current?.get()??b$2.current?.get()??O.current??0,i=c+(ue?1:-1)*a;return !p&&he.current&&(i=he.current.constrain(i),Math.abs(i-c)<.01)?(Le(),false):(Je.current=false,t.useDuration(0).useFriction(1),n.set(i),je.current=true,r.start(),true)}useEffect(()=>{let e$1=F.current,t=W.current;if(!e$1||!t||!h$2.current?.length||!rt||!Xe||j$2.current===0)return;let n=b$1(0),r=b$1(0),a=b$1(0),c$1=b$1(0);l$1.current=n,u.current=r,y.current=a,b$2.current=c$1;j$2.current||0;let i=h$2.current.length||1,g$1=Xt.current&&!We.current?pe.current:void 0,M=(qr?$.get().index:void 0)??g$1??L.current??0,C=Ne(M,i);L.current=C,We.current=true;let P=i-1,v=C,R=f(P,v,true),z=f(P,v,true);be.current=R,xt.current=z;let K=tr(),{minSnap:x,maxSnap:G}=En(K),ee=K[C]??0;n.set(ee),r.set(ee),a.set(ee),c$1.set(ee),O.current=ee,pn.current=h(t,I),De(ee),vt(C,"instant");function ne(f){let _=be.current,A=xt.current;if(!_||!A)return;let B=f.distance,Re=f.index!==_.get();if(b$2.current.add(B),B)if(E.current.duration())je.current=true,ye.current.start();else {E.current.seek();let Z=b$2.current.get();y.current?.set(Z),O.current=Z,De(Z);}if(Re){A.set(_.get()),_.set(f.index);let Z=_.get();L.current=Z;let ke=E.current?.duration()?"animated":"instant";$.set(Z,ke);}}let ve={distance(f,_){let A=Zt.current;if(!A)return;let B=A.byDistance(f,_);ne(B);},index(f,_){let A=Zt.current,B=be.current;if(!A||!B)return;let Re=B.clone().set(f),Z=A.byIndex(Re.get(),_);ne(Z);}};Ge.current=ve;let an=c(n,a,r,c$1,Te,dt);if(E.current=an,Le(),p)he.current=null,qe.current=null,Ye.current=null;else {let f=Se();if(f<=0)return;he.current=d$1(Number.isFinite(x)?x:0,Number.isFinite(G)?G:0),Ye.current=f$1(f),qe.current=e(he.current,l$1.current,b$2.current,E.current,Ye.current,Te);}let ct=h$1(document,window,()=>{if(p||qe.current?.constrain(ze.current),E.current?.seek(),p&&(j$2.current||0)>0){let _=E.current.direction()||Math.sign(b$2.current.get()-l$1.current.get())||0;Jt.current?.loop(_);}O.current=l$1.current.get();},f=>{let _=E.current,A=_?_.settled():true,B=!p&&(qe.current?.reached()??false);A&&!ze.current&&!B&&(ye.current?.stop(),je.current=false,Je.current=false);let Z=l$1.current.get(),ke=u.current.get(),xe=Z*f+ke*(1-f),we=ro(xe);we&&(xe+=we),y.current.set(xe),O.current=xe,De(),Le(),nr(xe);});ye.current=ct,ct.init();let Oe=g(),Pe=g(),U=ko(I.main,window),S=false,T=0,Y=0,re=false,de={mouse:500,touch:600};function V(){let f=S?document:e$1;Pe.add(f,"touchmove",ir).add(f,"touchend",it).add(f,"mousemove",ir,{passive:false}).add(f,"mouseup",it);}function ie(f){return f*de[S?"mouse":"touch"]}function ae(f){let _=a$5(f,window);if(S=_,_&&f.button!==0)return;s.current?.isBusy()&&s.current.finish(),Ft(true),$.emitBasePointerDown?.(),zt(rr),ze.current=true,Un.current=true,yn.current=false,pt.current=true,Je.current=false,jn.current=L.current||0,hn.current=b$2.current?.get()??l$1.current?.get()??0,bn.current=0,U.pointerDown(f),T=U.readPoint(f,I.main),Y=U.readPoint(f,I.cross),s.current?.canUseDrag()?s.current.beginDrag():(E.current.useFriction(0).useDuration(0),b$2.current.set(l$1.current.get())),V(),s.current?.canUseDrag()||ye.current?.start();}function ir(f){if(!a$5(f,window)&&f.touches?.length>=2)return it(f);ze.current&&Ft(true);let A=U.readPoint(f,I.main),B=U.readPoint(f,I.cross),Re=Math.abs(A-T),Z=Math.abs(B-Y);if((Re>5||Z>5)&&(pt.current=false),!re&&!S&&(!("cancelable"in f)||!f.cancelable||(re=Re>Z,!re)))return it(f);let{dx:ke,dy:xe}=U.pointerMove(f),we=(I.main==="x"?ke:xe)*Tt;Vr.current=Xn.current,Xn.current=A*Tt,$e.current=we,_r.current=performance.now();let Ee=(A-T)*Tt;if(bn.current=Ee,s.current?.canUseDrag()){yn.current=Math.abs(Ee)>.5,s.current.updateDrag(Ee),f.cancelable&&f.preventDefault?.();return}E.current.useFriction(.3).useDuration(.75),b$2.current.add(we),ye.current?.start(),f.cancelable&&f.preventDefault?.();}function it(f){if(Un.current=false,re=false,ze.current=false,Pe.clear(),Ft(false),or(),zt(300),pt.current){Be(L.current);let A=Zr(f);if(A!=null){A.isClone?co(A.canonicalIndex):Ln(A.canonicalIndex);return}}if(s.current?.canUseDrag()){let A=U.pointerUp(f),B=I.main==="x"?A.fx:A.fy;ue&&(B=-B),yn.current=false,s.current.settleDrag(B);return}if(te===false){let ur=function(Po){let Ao=b$2.current?.get()??l$1.current?.get()??hn.current;return a$6({force:Po,fallbackDirection:bn.current||Ao-hn.current,slideCount:h$2.current.length||1,currentIndex:L.current||0,dragStartIndex:jn.current,wrap:p,skipSnaps:ge,strictSnaps:ut,scrollTarget:lr})};let A=U.pointerUp(f),B=I.main==="x"?A.fx:A.fy;ue&&(B=-B);let Re=a$5(f,window),ke={mouse:300,touch:400}[Re?"mouse":"touch"],xe=B*ke,we=Zt.current,Ee=Ge.current,Bt=E.current;if(!we||!Ee||!Bt)return;let lr=we,vo=qe.current?.passed(),Hn=ur(xe),wo=we.byDistance(Hn,true);vt(wo.index,Bt.duration()?"animated":"instant");let Eo=dt,Io=e$2(xe,Hn),dr=Te;vo&&(dr=Te+5);let Lo=Eo+Io/50;Bt.useDuration(dr).useFriction(Lo),Ee.distance(Hn,true);}else {let A=U.pointerUp(f),B=I.main==="x"?A.fx:A.fy,Re=ie(B),Z=e$2(B,Re),ke=$t,xe=dt+Z/50;an.useDuration(ke).useFriction(xe),b$2.current.add(Re),ct.start(),S=false;}}Oe.add(e$1,"dragstart",f=>f.preventDefault(),{passive:false}).add(e$1,"touchstart",ae).add(e$1,"mousedown",ae,{passive:true}).add(e$1,"touchcancel",it).add(e$1,"contextmenu",it);function ar(f){let _=go();if(ze.current){zt(rr),f.cancelable&&f.preventDefault?.();return}if(po(_)){zt(40),f.cancelable&&f.preventDefault?.();return}if(!W.current)return;let B=Se(),Z=j$2.current>B;if(!(I.main==="x"?Math.abs(f.deltaX)>Math.abs(f.deltaY):Math.abs(f.deltaY)>=Math.abs(f.deltaX))||!Z)return;if(s.current?.canUseWheel()){f.cancelable&&f.preventDefault?.();let Bt=I.wheelDelta(f)*Tt;s.current.updateWheel(Bt,_)&&$.emitBasePointerDown?.();return}$.emitBasePointerDown?.(),Je.current=false;let we=(y.current?.get()??0)-I.wheelDelta(f)*Tt,Ee=we;!p&&he.current&&(Ee=he.current.constrain(we)),E.current?.useDuration(0).useFriction(1),b$2.current?.set(Ee),O.current=Ee,De(Ee),nr(Ee),ye.current?.start(),f.cancelable&&f.preventDefault?.();}return e$1.addEventListener("wheel",ar,{passive:false}),requestAnimationFrame(()=>{!W.current||!h$2.current?.length||bt(true);}),Sn.current=true,()=>{Oe.clear(),Pe.clear(),e$1.removeEventListener("wheel",ar),ye.current?.destroy(),ye.current=null,Jt.current=null;}},[At.length,p,X,rt,Xe,J]);function So(){return {location:l$1.current?.get()??O.current??0,previous:u.current?.get()??O.current??0,offset:y.current?.get()??O.current??0,target:b$2.current?.get()??O.current??0,x:O.current??0}}function Ro(e){l$1.current?.set(e.location),u.current?.set(e.previous),y.current?.set(e.offset),b$2.current?.set(e.target),O.current=e.x,De(e.offset);}function cn(e){l$1.current?.set(e),u.current?.set(e),y.current?.set(e),b$2.current?.set(e),O.current=e,De(e);}function Dn(e){let t=wn(e);ye.current?.stop(),je.current=false,cn(t),E.current?.useDuration(0).useFriction(1).sync().resetVelocity(),Le();}function kn(e,t="instant"){let n=Ne(e,h$2.current?.length??0),r=L.current;Dn(n),xt.current?.set(r),vt(n,t),be.current?.set(n),L.current=n;}function xo(e,t,n){let r=Ne(e,h$2.current?.length??0),a=typeof n=="number"&&Number.isFinite(n)?n:L.current;xt.current?.set(a),vt(r,t),be.current?.set(r),L.current=r;}useLayoutEffect(()=>{if(!D)return;let e=rn.current;e&&(rn.current=null,kn(e.index,e.mode));},[D]);function Mo(e,t={}){let{preserveTiming:n=false,fromUi:r=false,preferCrossfade:a=false,crossfade:c}=t;if(!E.current||!b$2.current)return;if(r&&(sr(),a&&s.current?.startUi(e,{durationMs:c?.durationMs,easing:c?.easing}))){$.emitBasePointerDown?.();return}n||E.current.useBaseDuration().useBaseFriction(),Be(e,{programmatic:true}),$.emitBasePointerDown?.();}function Co(){let e=Ht.current,t=W.current;if(!e||!t)return [];let n=e.originals,r=e.cw;if(!n.length||r<=0)return [];let a=-(y.current?.get()??0);if(!p){let P=a,v=a+r,R=[];return n.forEach((z,K)=>{let x=z.start;z.end>P&&x<v&&R.push(K);}),R}let c=j$2.current||0;if(c<=0)return [];let o=(a%c+c)%c,i=new Set,g=o,M=Math.min(o+r,c),C=(P,v)=>{n.forEach((R,z)=>{let K=R.start;R.end>P&&K<v&&i.add(z);});};if(C(g,M),o+r>c){let P=o+r-c;C(0,P);}return Array.from(i)}useImperativeHandle(Ut,()=>{let e=()=>$.get().index??0,t=()=>h$2.current?.length??0;function n(){let o=t();if(o<=1)return false;if(p)return true;let i=e()<=0,g=e()>=Math.max(0,o-1);return !(ue?i:g)}function r(){let o=t();if(o<=1)return false;if(p)return true;let i=e()<=0,g=e()>=Math.max(0,o-1);return !(ue?g:i)}function a(){return yt.current}function c(){return {slides:h$2??[],slider:W,sliderWidth:j$2,offsetLocation:y,visibleImages:ft,selectedIndex:L,sliderX:jt,sliderVelocity:$e,isWrapping:Ke,getCenterOffsetForIndex:er}}return {centerSlider:()=>Pn(),getIndex:()=>e(),setIndex:(o,i="animated")=>{if(!D||!Ge.current||!E.current||!be.current){let g=Ne(o,h$2.current?.length?h$2.current.length:w);rn.current={index:g,mode:i},L.current=g;return}if(rn.current=null,i!=="animated"){kn(o,i);return}Be(o,{jump:i!=="animated",programmatic:true});},setIndexFromUi:(o,i)=>{Mo(o,{fromUi:true,preferCrossfade:!!i?.crossfade,crossfade:i});},subscribeIndex:o=>$.subscribe(o),getAutoPlayTimer:()=>io(),slideIndexForCell:o=>{let i=w,g=t();if(!i||!g)return 0;let M=(o%i+i)%i,C=Nt.current[M];return typeof C=="number"?C:Math.min(M,g-1)},getRootNode:()=>F.current,getContainerNode:()=>W.current,getViewportNode:()=>k$1.current,getSlideNodes:()=>st(),onSlidesBuilt:o=>(Ae.current.add(o),He.current&&o(st()),()=>Ae.current.delete(o)),whenSlidesBuilt:()=>He.current?Promise.resolve(st()):new Promise(o=>{let i=g=>{Ae.current.delete(i),o(g);};Ae.current.add(i);}),isSlidesBuilt:()=>He.current,onReady:o=>(Dt.current.add(o),D&&o(st()),()=>Dt.current.delete(o)),whenReady:()=>D?Promise.resolve(st()):new Promise(o=>{Gt.current.push(o);}),isReady:()=>D,scrollNext:()=>{n()&&fo();},scrollPrev:()=>{r()&&uo();},canScrollNext:()=>n(),canScrollPrev:()=>r(),scrollProgress:()=>a(),cellsInView:()=>Co(),_scrollToProgressFromUi:o=>ho(o),_scrollByPixels:o=>bo(o),_getCrossfadeCore:()=>({getIndex:()=>e(),getSlideCount:()=>t(),getViewportMainSize:Se,getViewportNode:()=>k$1.current,getSnapLocationForIndex:wn,readMotionState:So,restoreMotionState:Ro,renderTrackAtLocation:cn,jumpTrackToIndexInstant:Dn,jumpToIndexInstant:kn,commitIndexOnly:xo}),_registerCrossfadeRuntime:o=>(s.current=o,()=>{s.current===o&&(s.current=null);}),getInternals:c}},[w,$,D,ue,p,J]),useEffect(()=>{let e$1=F.current,t=W.current;if(!e$1||!t||!h$2.current?.length||!rt||!Xe||j$2.current===0||!D)return;let n=vn([k$1.current,t]),r=new ResizeObserver(a=>{if(Ce&&n(a))return;let c=Se();if(c<=0)return;let o=j$2.current||0;if(!p){if(o<=c){let i=Math.round((c-o)/2);if(Fe.current=i,!l$1.current||!u.current||!y.current||!b$2.current||!E.current){De(y.current?.get()??O.current);return}if(!((h$2.current?.length??0)<=1)){De(y.current?.get()??O.current),Le();return}En([0]),L.current=0,be.current?.set(0),xt.current?.set(0),$.set(0,"instant"),he.current=d$1(0,0),Ye.current=f$1(c),qe.current=e(he.current,l$1.current,b$2.current,E.current,Ye.current,Te),E.current.useDuration(0).useFriction(1),je.current=false,ye.current?.stop(),l$1.current.set(0),u.current.set(0),y.current.set(0),b$2.current.set(0),O.current=0,De(0),Le();return}Fe.current=0,In({reanchor:Cn});return}Fe.current=0,In({reanchor:true});});return r.observe(t),k$1.current&&r.observe(k$1.current),()=>r.disconnect()},[p,rt,Xe,D,Cn,Ce,J]);function wt(e){let t=e.touches[0];wt._sx=t.clientX,wt._sy=t.clientY;}function cr(e){if(e.touches.length!==1)return;let t=e.touches[0],n=wt._sx??t.clientX,r=wt._sy??t.clientY,a=t.clientX-n,c=t.clientY-r,o=I.main==="x"?Math.abs(a):Math.abs(c),i=I.main==="x"?Math.abs(c):Math.abs(a);o>i&&e.preventDefault();}useEffect(()=>{let e=F.current;return e.addEventListener("touchstart",wt,{passive:false}),e.addEventListener("touchmove",cr,{passive:false}),()=>{e.removeEventListener("touchstart",wt),e.removeEventListener("touchmove",cr);}},[]);let To=jsx(Fragment,{children:jsx("div",{ref:k$1,"data-rmg-part":"viewport",className:[a$2.viewport,Me??""].join(" "),style:_e,children:jsx("div",{ref:W,className:`${a$2.track} ${Zn}`,"data-rmg-axis":I.main,style:{gap:`${se}px`},children:mt})})});return jsx(Fragment,{children:jsx("div",{"data-rmg-slider-core-scope":Tn,ref:F,className:[a$2.sliderScope,a$2.slider_container,Zn,ce??""].join(" "),dir:ue?"rtl":void 0,style:{position:"relative",zIndex:1,...me},"aria-busy":D?void 0:true,children:To})})}),Fr=Fo;var Ze={layout:{gap:20},direction:{dir:"ltr",axis:"x"},align:"start",scroll:{groupCells:false,skipSnaps:false,strictSnaps:false,freeScroll:false,loop:false,containScroll:false},motion:{selectDuration:25,freeScrollDuration:43,friction:.68}};function zo(N,H){N&&(typeof N=="function"?N(H):N.current=H);}var Bo=m.forwardRef(function(H,w){let{children:D,cellCount:oe,gap:le,cellsPerSlide:J,direction:te,align:Ve,scroll:q,autoHeight:se,motion:_e,initialIndex:Me,indexChannel:me,indexChannelControlled:ce,elements:X}=H,[lt,Q]=m.useState(false),ge=m.useMemo(()=>d(Me??0,"instant"),[Me]),ut=m.useCallback(Te=>{zo(w,Te);},[w]),Ce={...Ze.motion,..._e??{}};return jsx(Fr,{ref:ut,children:D,cellCount:oe,isReady:lt,setIsReady:Q,loop:q?.loop===true,containScroll:q?.containScroll===true,freeScroll:q?.freeScroll===true,groupCells:q?.groupCells===true,centerAlign:Ve==="center",gap:le,sliderViewportStyles:X?.viewport?.style,sliderViewportClassName:X?.viewport?.className,sliderContainerStyles:X?.container?.style,sliderContainerClassName:X?.container?.className,cellsPerSlide:J,direction:te?.dir??"ltr",axis:te?.axis??"x",skipSnaps:q?.skipSnaps,strictSnaps:q?.strictSnaps,autoHeight:se,selectDuration:Ce.selectDuration,freeScrollDuration:Ce.freeScrollDuration,sliderFriction:Ce.friction,initialIndex:Me,indexChannel:me??ge,indexChannelControlled:ce,sliderImagesReady:true})}),zr=Bo;function Kn(N){return Array.isArray(N)?N:[N]}function Br(N,H){N&&(typeof N=="function"?N(H):N.current=H);}function Vo(N){return typeof N=="object"&&N!=null&&N.__rmgSliderPlugin===true}var _o=m.forwardRef(function(H,w){let{children:D,breakpoints:oe,indexChannel:le,plugins:J=[],...te}=H,[Ve]=m.useState(()=>d(b(H.initialIndex),"instant")),q=le??Ve,se=m.useRef(null),_e=m.useRef(null),Me=m.useRef(null),me=m.useRef(null),ce=m.useRef(false),X=m.useRef(new Set),lt=m.useRef([]),Q=m.useRef(null),ge=te.transitions?.intro,ut=m.useRef(null),[Ce,Te]=m.useState(false),[$t,dt]=m.useState(b(H.initialIndex)),[tt,Kt]=m.useState(false),[mn,Lt]=m.useState(0),[Ut,Xt]=m.useState({}),pe=m.useMemo(()=>J.filter(Vo).map((s,l)=>({id:`${s.kind}:${l}`,plugin:s})),[J]),We=m.useMemo(()=>new Set(pe.map(s=>s.plugin.kind)),[pe]),W=m.useMemo(()=>pe.filter(s=>s.plugin.blocksReady).map(s=>s.id),[pe]);m.useEffect(()=>{Xt(s=>{let l={};for(let u of pe)u.plugin.blocksReady&&(l[u.id]=s[u.id]===true);return l});},[pe]);let h=m.useMemo(()=>({layout:{...Ze.layout,...te.layout??{}},direction:{...Ze.direction,...te.direction??{}},align:te.align??Ze.align,scroll:{...Ze.scroll,...te.scroll??{}},motion:{...Ze.motion,...te.motion??{}},elements:te.elements}),[te]),ft=m.useRef(0),L=m.useCallback(()=>`rmg-${++ft.current}`,[]),jt=m.useMemo(()=>m.Children.toArray(D).map(l=>({id:L(),node:l})),[]),[$e,Ke]=m.useState(jt),F=m.useRef(jt),k=m.useCallback(s=>{F.current=s,Ke(s);},[]),mt=m.useCallback(s=>{let l=Kn(s).map(y=>({id:L(),node:y})),u=[...F.current,...l];return k(u),u.length},[k,L]),Pt=m.useCallback(s=>{let u=[...Kn(s).map(y=>({id:L(),node:y})),...F.current];return k(u),u.length},[k,L]),Ue=m.useCallback((s,l)=>{let u=Kn(l).map(E=>({id:L(),node:E})),y=Math.max(0,Math.min(s|0,F.current.length)),b=[...F.current.slice(0,y),...u,...F.current.slice(y)];return k(b),b.length},[k,L]),gt=m.useCallback(s=>{let l=F.current;if(!l.length)return 0;let u=typeof s=="function"?l.filter((y,b)=>!s(b)):(()=>{let y=Math.max(0,Math.min(s|0,l.length-1));return l.slice(0,y).concat(l.slice(y+1))})();return k(u),u.length},[k]),qt=m.useCallback((s,l)=>{let u=F.current;if(!u.length)return;let y=Math.max(0,Math.min(s|0,u.length-1)),b=u.slice();b[y]={id:L(),node:l},k(b);},[k,L]),At=m.useCallback(s=>{let l=(s??[]).map(u=>({id:L(),node:u}));return k(l),l.length},[k,L]),nt=m.useCallback(()=>tt&&W.every(s=>Ut[s]===true),[W,tt,Ut]),Xe=m.useCallback(()=>{let l=se.current?.getSlideNodes()??[];X.current.forEach(u=>u(l)),lt.current.splice(0).forEach(u=>u(l));},[]);m.useEffect(()=>{!nt()||ce.current||(ce.current=true,Xe());},[Xe,nt]),m.useEffect(()=>{nt()||(ce.current=false);},[nt]);let gn=m.useCallback((s,l)=>{Xt(u=>u[s]===l?u:{...u,[s]:l});},[]),p=m.useCallback(s=>{Q.current=s;},[]),Yt=m.useCallback(s=>{let l=Q.current;if(!l?.active||l.startedAt==null||l.speedMs<=0)return l??s();let u=typeof performance<"u"&&typeof performance.now=="function"?performance.now():Date.now(),y=Math.max(0,u-l.startedAt),b=Math.max(0,Math.min(1,y/l.speedMs));return {...l,elapsedMs:y,remainingMs:Math.max(0,l.speedMs-y),progress:b}},[]),pt=m.useCallback(s=>{if(!We.has("ripple"))return;let l=s.querySelector("[data-rmg-ripple]");l&&l.remove();let u=s.getBoundingClientRect(),y=Math.max(u.width,u.height),b=document.createElement("span");b.dataset.rmgRipple="true",b.className=a$2.ripple,b.style.width=`${y}px`,b.style.height=`${y}px`,b.style.left=`${u.width/2-y/2}px`,b.style.top=`${u.height/2-y/2}px`,s.appendChild(b),window.setTimeout(()=>b.remove(),650);},[We]),yt=m.useCallback(s=>{if(Me.current?.(),me.current?.(),Me.current=null,me.current=null,se.current=s,Kt(s?.isReady()===true),!s){_e.current=null,Br(w,null),Lt(u=>u+1);return}Me.current=s.onReady(()=>Kt(true)),me.current=s.subscribeIndex(()=>{dt(s.getIndex());}),dt(s.getIndex());let l={...s,getAutoPlayTimer:()=>Yt(s.getAutoPlayTimer),append:mt,prepend:Pt,insert:Ue,remove:gt,replace:qt,setItems:At,onIndexChange:u=>s.subscribeIndex(()=>{u(s.getIndex(),{mode:q.get().mode});}),onReady:u=>(X.current.add(u),ce.current&&u(s.getSlideNodes()),()=>{X.current.delete(u);}),whenReady:()=>ce.current?Promise.resolve(s.getSlideNodes()):new Promise(u=>{lt.current.push(u);}),isReady:()=>ce.current};_e.current=l,Br(w,l),Lt(u=>u+1);},[mt,w,Ue,Pt,gt,qt,Yt,q,At]);m.useEffect(()=>()=>{Me.current?.(),me.current?.();},[]);let Nt=m.useMemo(()=>{let s=$e.map(l=>{let u=l.node;return m.isValidElement(u)?m.cloneElement(u,{key:l.id}):jsx("span",{style:{display:"block"},children:u},l.id)});return pe.reduce((l,u)=>u.plugin.transformChildren?u.plugin.transformChildren(l,u.plugin.options):l,s)},[$e,pe]),He=b$2(),Ae=m.useMemo(()=>({...a$3,...oe||{}}),[oe]),Dt=m.useMemo(()=>{if(h.layout.cellsPerSlide==null)return;let s=h$2(h.layout.cellsPerSlide,1,He,Ae);return Math.max(1,s|0)},[h.layout.cellsPerSlide,He,Ae]),Gt=m.useMemo(()=>{let s=h$2(h.layout.gap,20,He,Ae);return Math.max(0,s|0)},[h.layout.gap,He,Ae]);m.useEffect(()=>{if(!ge)return;if(ge.inView===true){Te(true);return}let s=ut.current;if(!s||typeof IntersectionObserver>"u"){Te(true);return}let l=new IntersectionObserver(u=>{u.some(y=>y.isIntersecting)&&(Te(true),l.disconnect());},{threshold:.2});return l.observe(s),()=>l.disconnect()},[ge]);let rt=m.useMemo(()=>{let s=_e.current,l=s?.getInternals().slides.current.length??0,u=s?.getSlideNodes().filter(y=>y.getAttribute("data-rmg-clone")!=="true").length??0;return {handle:s,coreReady:tt,index:$t,slideCount:l||u||$e.length,cellsInView:s?.cellsInView()??[],progress:s?.scrollProgress()??0,axis:h.direction.axis,dir:h.direction.dir,loop:h.scroll.loop===true,freeScroll:h.scroll.freeScroll===true,canScrollPrev:s?.canScrollPrev()??false,canScrollNext:s?.canScrollNext()??false,createRipple:pt,hasPlugin:y=>We.has(y),setAutoPlayTimer:p}},[tt,pt,mn,$t,$e.length,We,p,h.direction.axis,h.direction.dir,h.scroll.freeScroll,h.scroll.loop]),ht=jsx(zr,{cellCount:$e.length,gap:Gt,cellsPerSlide:h.layout.cellsPerSlide!=null?Dt??1:void 0,direction:h.direction,align:h.align,scroll:h.scroll,autoHeight:We.has("auto-height"),motion:h.motion,initialIndex:te.initialIndex,indexChannel:q,indexChannelControlled:!!le,elements:h.elements,ref:yt,children:Nt}),kt=pe.map(s=>{let l=s.plugin.Runtime,u={...rt,setPluginReady:y=>gn(s.id,y)};return jsxs(m.Fragment,{children:[l?jsx(l,{host:u,options:s.plugin.options}):null,s.plugin.renderOverlay?.(u,s.plugin.options)]},s.id)}),bt=kt.length>0?jsxs("div",{className:a$2.sliderShell,children:[ht,kt]}):ht;if(!ge)return bt;let Fe=Ce,St={className:[a$2.fade_container,Fe?a$2.fadeInActive:a$2.fadeInStart].join(" "),style:{position:"relative","--rmg-intro-stagger":`${ge.staggerMs??60}ms`,"--rmg-intro-duration":`${ge.durationMs??420}ms`,"--rmg-intro-easing":ge.easing??"cubic-bezier(.2,.7,.2,1)"}};return jsx("div",{ref:ut,...St,children:ge.renderIntro?ge.renderIntro({active:Fe,containerProps:St},bt):bt})}),Ks=m.forwardRef(function(H,w){return jsx(_o,{...H,ref:w})});export{Ks as a};
@@ -0,0 +1,4 @@
1
+ import {c as c$1}from'./chunk-ZFDPVAPM.mjs';import {c}from'./chunk-VPFAU2TE.mjs';import {useRef,useEffect,useMemo}from'react';import {createPortal}from'react-dom';import {jsx}from'react/jsx-runtime';function oe(n){return n==="instant"?"instant":"animated"}function I(n){return typeof n!="number"||!Number.isFinite(n)?null:n|0}function O(n,r){if(!r)return n;let t=r(n);return I(t)}function k(n){let{localChannel:r,fsSub:t,clampIndex:o}=n,u=false,c=[],f=(e,i)=>{let a=r.get();a.index===e&&oe(a.mode)===i||r.set(e,i);},T=()=>{let e=I(t.get());if(e==null)return;let i=O(e,o);i!=null&&f(i,"animated");},p=()=>{c.forEach(e=>e()),c=[],u=false;};return {start:()=>(u||(u=true,T(),typeof t.onBasePointerDown=="function"&&typeof r.emitBasePointerDown=="function"&&c.push(t.onBasePointerDown(()=>{r.emitBasePointerDown?.();})),c.push(t.onEvent(e=>{if(!e||typeof e!="object"||e.type!=="internalIndex")return;let i=I(e.index);if(i==null)return;let a=O(i,o);a!=null&&f(a,"animated");}))),p),stop:p,publishThumbnailClick:(e,i="animated",a={source:"thumbnail",transition:"scroll"})=>{let b=I(e);if(b==null)return;let x=O(b,o);x!=null&&t.requestSet(x,oe(i),{meta:a});}}}function C(n,r){if(r<=0||!Number.isFinite(n))return 0;let t=Math.trunc(n);return Math.max(0,Math.min(r-1,t))}function Se(n){switch(n){case "left":return "translateX(-8px)";case "right":return "translateX(8px)";case "top":return "translateY(-8px)";default:return "translateY(8px)"}}function de({bridge:n,items:r,position:t,containerClassName:o,containerStyle:u,thumbnailWidth:c$2,thumbnailHeight:f,thumbnailsCenter:T,thumbnailsContainerWidth:p,thumbnailsContainerHeight:w,fadeDurationMs:h=300,fadeEasing:e="cubic-bezier(.4,0,.22,1)",thumbnailItemClassName:i,thumbnailItemStyle:a,gap:b,freeScroll:x,groupCells:$,loop:L,skipSnaps:q,centerActiveThumb:z,selectDuration:E,freeScrollDuration:X,sliderFriction:Y,breakpointMap:j={xs:0,sm:640,md:768,lg:1024,xl:1280},rippleEnabled:N,rippleClassName:G,showArrows:H=false,arrowStyles:J,arrowClassName:K,prevArrowStyles:Q,prevArrowClassName:U,nextArrowStyles:V,nextArrowClassName:W,renderArrows:Z,renderPrevArrow:_,renderNextArrow:D,thumbnailCrossfade:A}){let{fsSub:d,mountEl:ee,visible:S,invisible:g,direction:me,registerLayout:ne,clearLayout:te}=n,m=r.length,F=useRef(c(C(d.get(),m),"animated")),re=useRef(false),y=useRef(false),B=useRef(k({localChannel:F.current,fsSub:d,clampIndex:l=>C(l,m)}));function le(l="instant"){let s=C(d.get(),m);F.current.set(s,l,{silent:false});}useEffect(()=>{B.current=k({localChannel:F.current,fsSub:d,clampIndex:s=>C(s,m)});let l=B.current.start();return ()=>l()},[d,m]),useEffect(()=>{ne({position:t,className:o,style:u,fadeDurationMs:h,fadeEasing:e});},[ne,t,o,u,h,e]),useEffect(()=>()=>{te();},[te]),useEffect(()=>{if(!(S&&!g)){y.current=false;return}re.current&&!y.current&&(le("instant"),y.current=true);},[S,g,m,d]);let fe=useMemo(()=>r.map((l,s)=>jsx("img",{src:l.thumbSrc,alt:l.alt??`thumb-${s}`,style:{width:"inherit",height:"inherit",objectFit:"contain",display:"block"},draggable:false},`fs-thumb-${s}`)),[r]),P=S&&!g,pe=P?1:0,he=P?"translate3d(0, 0, 0)":Se(t),be=P?"auto":"none",ie=p??u?.width,se=w??u?.height,xe={opacity:pe,transform:he,pointerEvents:be,transition:`
2
+ opacity ${h}ms ${e},
3
+ transform ${h}ms ${e}
4
+ `},ye=useMemo(()=>({layout:{position:t,thumbnail:{width:c$2,height:f},center:T,container:{width:ie,height:se},gap:b},scroll:{freeScroll:x,groupCells:$,loop:L,skipSnaps:q,centerActiveThumb:z},motion:{selectDuration:E,freeScrollDuration:X,friction:Y},elements:{thumbnail:{className:i,style:a},container:{style:u,className:o}},controls:{enabled:H,arrow:{style:J,className:K},prev:{style:Q,className:U},next:{style:V,className:W},render:Z,renderPrev:_,renderNext:D,ripple:{enabled:N,className:G}},transitions:{loading:{enabled:false},intro:{staggerMs:0,durationMs:0},crossfade:A},breakpointMap:j}),[t,c$2,f,T,ie,se,b,x,$,L,q,z,E,X,Y,u,o,i,a,H,J,K,Q,U,V,W,Z,_,D,N,G,j,A]);return ee?createPortal(jsx("div",{style:xe,children:jsx(c$1,{indexChannel:F.current,direction:me,options:ye,onReadyChange:l=>{re.current=l,!(!l||!(S&&!g)||y.current)&&(le("instant"),y.current=true);},onThumbnailClick:(l,s)=>{B.current.publishThumbnailClick(l,"animated",{source:"thumbnail",transition:s?.transition??"scroll",crossfade:s?.transition==="crossfade"?{durationMs:s.crossfade?.durationMs,easing:s.crossfade?.easing}:void 0});},children:fe})}),ee):null}export{de as a};
@@ -0,0 +1 @@
1
+ function y(s){if(!s)return {x:.5,y:.5};let c=(n,e)=>{let r=n.toLowerCase();if(e){if(r==="left")return 0;if(r==="center")return .5;if(r==="right")return 1}else {if(r==="top")return 0;if(r==="center")return .5;if(r==="bottom")return 1}return NaN},t=s.trim().split(/\s+/),a=.5,o=.5;if(t.length>=1){let n=t[0];if(n.endsWith("%"))a=Math.min(1,Math.max(0,parseFloat(n)/100));else {let e=c(n,true);Number.isNaN(e)||(a=e);}}if(t.length>=2){let n=t[1];if(n.endsWith("%"))o=Math.min(1,Math.max(0,parseFloat(n)/100));else {let e=c(n,false);Number.isNaN(e)||(o=e);}}return {x:a,y:o}}function w(s,c,t,a){let o=Math.max(1,t.width),n=Math.max(1,t.height),e=Math.max(o/Math.max(1,s),n/Math.max(1,c)),r=s*e,i=c*e,m=a?.x??.5,h=a?.y??.5,u=Math.max(0,r-o),l=Math.max(0,i-n),f=(.5-m)*u,x=(.5-h)*l,M=t.left+o/2+f,p=t.top+n/2+x;return {cx:M,cy:p,scale:e}}function b(s,c,t,a){let o=Math.max(1,t.width),n=Math.max(1,t.height),e=Math.min(o/Math.max(1,s),n/Math.max(1,c)),r=s*e,i=c*e,m=a?.x??.5,h=a?.y??.5,u=Math.max(0,o-r),l=Math.max(0,n-i),f=t.left+u*m,x=t.top+l*h,M=f+r/2,p=x+i/2;return {cx:M,cy:p,scale:e}}function g(s,c,t,a,o){let n=a==="contain"?Math.min(t.width/s,t.height/c):Math.max(t.width/s,t.height/c),e=s*n,r=c*n,i=t.left+(t.width-e)*o.x,m=t.top+(t.height-r)*o.y;return new DOMRect(i,m,e,r)}export{y as a,w as b,b as c,g as d};
@@ -0,0 +1,3 @@
1
+ import {i,j,l,k as k$1,m,d}from'./chunk-DCUCXQHE.mjs';import {a as a$2}from'./chunk-GNGOOOVY.mjs';import {l as l$1,j as j$1,a as a$3,k as k$2,z,t,m as m$1}from'./chunk-AX2FSVFD.mjs';import {a as a$1}from'./chunk-UUAWLGWO.mjs';import {a,b}from'./chunk-HK2DPKES.mjs';import*as k from'react';import {jsx,jsxs}from'react/jsx-runtime';var O={masonrySkeletonRoot:"or",masonrySkeletonCol:"sr",masonrySkeletonItem:"dr",masonrySkeletonLayoutItem:"z",masonrySkeletonLayoutItemInner:"lr"};function he(t$1,o){let s=`[data-rmg-mskel-scope="${t(t$1)}"]`,p=[];p.push(`${s} [data-rmg-mskel-variant]{display:none !important;}`);let y=o[0];y&&p.push(`${s} [data-rmg-mskel-variant="${y.key}"]{display:block !important;}`);for(let u of o)u.minWidth<=0||p.push(`@media (min-width:${u.minWidth}px){${s} [data-rmg-mskel-variant]{display:none !important;}${s} [data-rmg-mskel-variant="${u.key}"]{display:block !important;}}`);return p.join(`
2
+ `)}function Z(t,o){return `${t}:${o} !important;`}function ge(t$1,o){let s=`[data-rmg-mskel-scope="${t(t$1)}"]`,p=[];for(let y of o){if(!y.items.some(c=>c.span>1))continue;let u=`${s} [data-rmg-mskel-variant="${t(y.state.key)}"]`;for(let c of y.containerCssRules??[]){let R=`${u}{`+Object.entries(c.rootDecls).map(([i,f])=>Z(i,f)).join("")+"}",r=c.items.map(i=>`${`${u} > [data-rmg-mskel-index="${i.index}"]`}{`+[Z("top",i.topCssExpr??"0px"),Z("left",i.leftCssExpr),Z("width",i.widthCssExpr)].join("")+"}").join("");p.push(`@container (min-width:${c.minWidth}px){${R}${r}}`);}}return p.join(`
3
+ `)}function ye(t){if(!t)return {outerStyle:void 0,innerStyle:void 0};let o=m$1(t),s={};return o.boxShadow!=null&&(s["--rmg-masonry-skel-wrap-shadow"]=o.boxShadow,delete o.boxShadow),o.borderRadius!=null&&(s["--rmg-masonry-skel-wrap-shadow-radius"]=o.borderRadius),{outerStyle:Object.keys(s).length?s:void 0,innerStyle:o}}function ue(t){let{count:o,columns:s,gap:p,breakpoints:y,classNames:u,ratios:c,placement:R,spec:r,viewportWidth:i$1,layoutWidthPx:f,disableShimmer:C}=t,I=k.useRef(f),h=I.current!==void 0?I.current:f,x=k.useMemo(()=>({...a,...y??{}}),[y]),b=k.useMemo(()=>a$1("mskel_",{count:o,columns:s,gap:p,breakpoints:x,ratios:c,heightsPx:t.heightsPx,spans:t.spans,placement:R,spec:r}),[o,s,p,x,c,t.heightsPx,t.spans,R,r]),ee={...r?.backgroundColor?{"--rmg-skel-bg":r.backgroundColor}:null,...r?.radius!=null?{"--rmg-skel-radius":j$1(r.radius)}:null,...C?null:l$1(r?.shimmer,{enabledVarName:"--rmg-skel-card-shimmer-enabled"}),...!C&&(r?.shimmer?.c2??r?.highlightColor)!=null?{"--rmg-skel-shimmer-c2":r?.shimmer?.c2??r?.highlightColor}:null},l=k.useMemo(()=>i({count:o,columns:s,gap:p,breakpoints:x,ratios:c,heightsPx:t.heightsPx,spans:t.spans,placement:R,spec:r,scopeId:b,viewportWidth:i$1,layoutWidthPx:h}),[o,s,p,x,c,t.heightsPx,R,r,b,i$1,h]),a$2=i$1!==void 0,v=a$2?d(l.states,i$1):null,A=k.useMemo(()=>a$2?null:he(b,l.states),[a$2,b,l.variants]),g=k.useMemo(()=>ge(b,l.variants),[b,l.variants]),M=l.structuredLayout,P=u?.root??O.masonrySkeletonRoot,F=u?.column??O.masonrySkeletonCol,N=u?.item??(M?O.masonrySkeletonLayoutItem:O.masonrySkeletonItem),_=a$2&&h!==void 0&&Number.isFinite(Number(h))&&Number(h)>0,K=k.useMemo(()=>{let T=C?null:a$3.skelCardShimmer;return l.variants.map(e=>{let w=e.items.some(n=>n.span>1),U=Math.max(0,...e.items.map(n=>n.top+n.height));if(!w){let n=Array.from({length:e.state.columns},()=>[]);for(let W of e.items)n[W.columnIndex].push(W);return jsx("div",{"data-rmg-mskel-variant":e.state.key,style:{width:"100%",display:a$2?e.state.key===v?"block":"none":e.state.key===l.states[0]?.key?"block":"none"},children:jsx("div",{style:{width:"100%",display:"flex",alignItems:"flex-start",columnGap:`${e.state.gapPx}px`},children:n.map((W,j)=>jsx("div",{className:F,style:{flex:1,minWidth:0,display:"flex",flexDirection:"column"},children:W.map((S,G)=>{let m=G===W.length-1?"0px":`${e.state.gapPx}px`;if(!M)return jsx("div",{"data-rmg-mskel-index":S.index,className:[N,T].filter(Boolean).join(" "),style:{height:`${S.height}px`,marginBottom:m}},`rmg-mskel-${e.state.key}-${S.index}`);let{outerStyle:E,innerStyle:B}=ye(S.slot?.itemWrapStyle);return jsx("div",{"data-rmg-mskel-index":S.index,className:N,style:{...S.slot?.itemWrapStyle?k$2(S.slot.itemWrapStyle):null,...E??null,width:"100%",height:S.heightCssExpr,marginBottom:m},children:jsx("div",{className:[O.masonrySkeletonLayoutItemInner,T].filter(Boolean).join(" "),style:B,children:jsx("div",{style:{width:"100%"},children:jsx(z,{node:S.slot?.item??M.item,disableShimmer:true,breakpointMap:x})})})},`rmg-mskel-${e.state.key}-${S.index}`)})},j))})},e.state.key)}return jsx("div",{"data-rmg-mskel-variant":e.state.key,style:{position:"relative",width:"100%",height:M&&!_?e.shellHeightCssExpr??`${U}px`:`${U}px`,display:a$2?e.state.key===v?"block":"none":e.state.key===l.states[0]?.key?"block":"none","--rmg-cols":e.state.columns,"--rmg-gap":`${e.state.gapPx}px`,...e.positionedCssVars??{}},children:e.items.map(n=>{if(!M)return jsx("div",{"data-rmg-mskel-index":n.index,className:[N,T].filter(Boolean).join(" "),style:{position:"absolute",top:`${n.top}px`,left:n.leftCssExpr,width:n.widthCssExpr,height:`${n.height}px`}},`rmg-mskel-${e.state.key}-${n.index}`);let{outerStyle:W,innerStyle:j}=ye(n.slot?.itemWrapStyle);return jsx("div",{"data-rmg-mskel-index":n.index,className:N,style:{...n.slot?.itemWrapStyle?k$2(n.slot.itemWrapStyle):null,...W??null,position:"absolute",top:_?`${n.top}px`:n.topCssExpr??`${n.top}px`,left:_?`${n.leftPx}px`:n.leftCssExpr,width:_?`${n.widthPx}px`:n.widthCssExpr,height:_?`${n.height}px`:n.heightCssExpr,minWidth:0},children:jsx("div",{className:[O.masonrySkeletonLayoutItemInner,T].filter(Boolean).join(" "),style:j,children:jsx("div",{style:{width:"100%"},children:jsx(z,{node:n.slot?.item??M.item,disableShimmer:true,breakpointMap:x})})})},`rmg-mskel-${e.state.key}-${n.index}`)})},e.state.key)})},[N,F,l.variants,l.states,M,x,a$2,_,v,C]);return jsxs("div",{"data-rmg-mskel-scope":b,"data-rmg-skel-node":l.structuredNodeId,className:[P,r?.className].filter(Boolean).join(" "),style:{...ee,...l.plainStructuredStyle||{},containerType:"inline-size",width:"100%"},children:[A?jsx("style",{dangerouslySetInnerHTML:{__html:A}}):null,l.responsiveCss?jsx("style",{dangerouslySetInnerHTML:{__html:l.responsiveCss}}):null,g?jsx("style",{dangerouslySetInnerHTML:{__html:g}}):null,K]})}function Se(t){return !!t&&typeof t=="object"&&!("kind"in t)&&"layout"in t&&t.layout?.kind==="masonry"}function ce(t){return !!t&&typeof t=="object"&&"kind"in t&&t.kind==="masonry"}function xe(t){if(Se(t))return t;let{className:o,backgroundColor:s,radius:p,shimmer:y,columns:u,gap:c,ratios:R,heightsPx:r,spans:i,placement:f,viewportWidth:C,layoutWidthPx:I,...h}=t;return {className:o,backgroundColor:s,radius:p,shimmer:y,layout:h}}function Te({layout:t,children:o,breakpoints:s,className:p,style:y,shellClassName:u,shellStyle:c,contentClassName:R,contentStyle:r,backgroundColor:i$1,radius:f,shimmer:C,disableShimmer:I,ariaLabel:h,ready:x,enabled:b$1,force:ee,timing:l$2,masonry:a$3}){let v=k.useMemo(()=>({...a,...s??{}}),[s]),A=k.useMemo(()=>a$1("skel_",{layout:t,breakpoints:v,backgroundColor:i$1,radius:f,shimmer:C,disableShimmer:I,masonry:a$3}),[t,v,i$1,f,C,I,a$3]),g=k.useMemo(()=>ce(t)||Se(t)?xe(t):null,[t]),M=g?.layout?.kind==="masonry"?g.layout:null,P=ce(t)?t:null,F=k.useRef(null),N=a$3?.layoutWidthPx??P?.layoutWidthPx,[_,K]=k.useState(void 0),T=N??_;k.useLayoutEffect(()=>{if(N!==void 0){K(L=>L===void 0?L:void 0);return}let m=F.current;if(!m)return;let E=L=>{let V=Number(L);!Number.isFinite(V)||V<=0||K(z=>z!=null&&Math.abs(z-V)<.5?z:V);},B=()=>{E(m.getBoundingClientRect().width);};if(B(),typeof ResizeObserver<"u"){let L=new ResizeObserver(V=>{let z=V[0];E(z?.contentRect.width);});return L.observe(m),()=>L.disconnect()}return window.addEventListener("resize",B),()=>window.removeEventListener("resize",B)},[N]);let e=g?{count:a$3?.count??(typeof M?.count=="number"?Math.max(0,M.count|0):1),columns:a$3?.columns??P?.columns,gap:a$3?.gap??P?.gap,ratios:a$3?.ratios??P?.ratios,heightsPx:a$3?.heightsPx??P?.heightsPx,spans:a$3?.spans??P?.spans,placement:a$3?.placement??P?.placement,viewportWidth:a$3?.viewportWidth??P?.viewportWidth,layoutWidthPx:T,disableShimmer:I}:null,w=k.useMemo(()=>{if(!g||!e)return null;let m=a$1("mseed_",{scopeId:A,breakpoints:v,masonry:e,spec:g}),E=i({count:e.count,columns:e.columns,gap:e.gap,breakpoints:v,ratios:e.ratios,heightsPx:e.heightsPx,spans:e.spans,placement:e.placement,spec:g,scopeId:m,respectLayoutCount:false,viewportWidth:e.viewportWidth,layoutWidthPx:e.layoutWidthPx}),B=j(E.variants,e.viewportWidth??b);return {scopeId:m,initialHeights:B?.items.map(L=>L.height),responsiveCss:k$1({scopeId:m,prediction:E}),shellReserveCss:l({scopeId:m,prediction:E})}},[v,e?.columns,e?.count,e?.disableShimmer,e?.gap,e?.heightsPx,e?.layoutWidthPx,e?.placement,e?.ratios,e?.spans,e?.viewportWidth,g,A]),U={...y,...i$1?{"--rmg-skel-bg":i$1}:null,...f!=null?{"--rmg-skel-radius":j$1(f)}:null,...I?null:l$1(C)},n=g&&e?jsx("div",{"data-rmg-skeleton-scope":A,ref:F,className:p,style:U,"aria-hidden":h?void 0:true,"aria-label":h,role:h?"status":void 0,"aria-live":h?"polite":void 0,children:jsx(ue,{...e,spec:g,breakpoints:v})}):null,W=k.useCallback(m$1=>w?jsx(m,{value:w,children:m$1}):m$1,[w]);if(!n)return null;let j$2=o!==void 0&&!!w?.scopeId,S=j$2&&b$1!==false&&x!==true&&!!w?.shellReserveCss,G=jsx(a$2,{skeletonNode:n,ready:x,enabled:b$1,force:ee,timing:l$2,shellClassName:u,shellStyle:c,contentClassName:R,contentStyle:r,contentOwnsWrapperLayout:o!==void 0,loadingLayerFirst:o!==void 0,contentWrapper:W,shellDataAttributes:S?{"data-rmg-masonry-skeleton-shell":w.scopeId}:void 0,children:o});return j$2?jsxs("div",{style:{containerType:"inline-size",width:"100%"},children:[S?jsx("style",{dangerouslySetInnerHTML:{__html:w.shellReserveCss}}):null,G]}):G}export{Te as a};
@@ -0,0 +1,6 @@
1
+ import {i}from'./chunk-HK2DPKES.mjs';function w(S){let{scopeId:C,responsiveCount:M,fallbackCount:a,breakpointMap:g,maxSlots:t,visibleSlotsForCount:m,slotOrderForCount:k}=S,c=i(M,a,g),u=e=>Math.max(0,Math.floor(e)),p=u(c[0]?.count??a),b=`[data-rmg-scope="${C}"]`,d=`${b} [data-rmg-skel-slot]`,s=[];s.push(`${d}{ display:none; }`);let $=e=>{let r=u(e);if(r<=0)return [];let i=m?m(r,t):Array.from({length:Math.min(t,r)},(n,o)=>o+1);return Array.from(new Set(i.map(n=>Math.floor(n)).filter(n=>Number.isFinite(n)&&n>=1&&n<=t)))},f=e=>{let r=k?.(u(e),t),i=r?.length?r.map(({slot:o})=>Math.floor(o)).filter(o=>Number.isFinite(o)&&o>=1&&o<=t):$(e);if(!i.length)return "";let n=new Map((r??[]).map(({slot:o,order:l})=>[Math.floor(o),l]));return Array.from(new Set(i)).map(o=>{let l=n.get(o),v=Number.isFinite(l)?` order:${l};`:"";return `${b} [data-rmg-skel-slot="${o}"]{ display:block;${v} }`}).join(`
2
+ `)};s.push(f(p));for(let e of c.slice(1))s.push(`@media (min-width:${e.minWidth}px){
3
+ ${d}{ display:none; }
4
+ ${f(e.count)}
5
+ }`);return {cssText:s.join(`
6
+ `),ssrBaseCount:p}}export{w as a};
File without changes
@@ -0,0 +1,2 @@
1
+ import {l,u,v as v$1,b as b$1,i,w,r,h,q}from'./chunk-AX2FSVFD.mjs';import {b,a}from'./chunk-Z34PSRMG.mjs';import {a as a$4}from'./chunk-UUAWLGWO.mjs';import {a as a$1}from'./chunk-LVYED5ZM.mjs';import {d}from'./chunk-WMG2LTLR.mjs';import {a as a$3}from'./chunk-L2HRIINV.mjs';import {a as a$2}from'./chunk-HK2DPKES.mjs';import*as v from'react';import {jsx,jsxs}from'react/jsx-runtime';function Mt(){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 re(e,t){return e?e.endsWith("%")?t*parseFloat(e)/100:parseFloat(e)||0:0}function xt(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:re(r,t.height),right:re(i,t.width),bottom:re(o,t.height),left:re(a,t.width)}}function ze(e,t,n){let r=e.getBoundingClientRect();if(r.width<=0||r.height<=0)return 0;let i=t instanceof Element?t.getBoundingClientRect():Mt(),o=xt(n,i),a={top:i.top-o.top,left:i.left-o.left,right:i.right+o.right,bottom:i.bottom+o.bottom},l=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)),E=l*p,R=r.width*r.height;return R>0?E/R:0}function qe(e,t){return t<=0?e>0:e>=t}function Ct(e,t){if(Array.isArray(e)){let n=e[0];return typeof n=="number"?n:t}return typeof e=="number"?e:t}function Ge(e,t){let n=t?.nearMargin??"700px 0px",r=t?.viewMargin??"0px 0px",i=Ct(t?.threshold,.01),o=0,a=t?.root??null,[l,p]=v.useState(()=>Array.from({length:e},()=>false)),[E,R]=v.useState(()=>Array.from({length:e},()=>false)),g=v.useRef(null),m=v.useRef(null),s=v.useRef(new Map),M=v.useRef([]),C=v.useCallback((y,c)=>{if(typeof window>"u"||!y)return;let d=ze(y,a,n);qe(d,i)&&p(b=>{if(b[c])return b;let w=b.slice();return w[c]=true,w});let k=ze(y,a,r);qe(k,o)&&R(b=>{if(b[c])return b;let w=b.slice();return w[c]=true,w});},[o,n,i,a,r]);v.useEffect(()=>{M.current=Array.from({length:e},()=>null),p(Array.from({length:e},()=>false)),R(Array.from({length:e},()=>false)),s.current.clear(),g.current?.disconnect(),m.current?.disconnect(),g.current=null,m.current=null;},[e]),v.useEffect(()=>{if(!(typeof window>"u")){if(g.current?.disconnect(),m.current?.disconnect(),typeof IntersectionObserver>"u"){for(let[y,c]of s.current.entries())C(y,c);return}g.current=new IntersectionObserver(y=>{p(c=>{let d=c,k=false;for(let b of y){let w=s.current.get(b.target);if(w==null||w<0||w>=e)continue;let h=!!b.isIntersecting;h!==c[w]&&(k||(d=c.slice(),k=true),d[w]=h);}return k?d:c});},{root:a,rootMargin:n,threshold:i}),m.current=new IntersectionObserver(y=>{R(c=>{let d=c,k=false;for(let b of y){let w=s.current.get(b.target);w==null||w<0||w>=e||b.isIntersecting&&!c[w]&&(k||(d=c.slice(),k=true),d[w]=true);}return k?d:c});},{root:a,rootMargin:r,threshold:o});for(let[y]of s.current)g.current.observe(y),m.current.observe(y);for(let[y,c]of s.current.entries())C(y,c);return ()=>{g.current?.disconnect(),m.current?.disconnect(),g.current=null,m.current=null;}}},[o,e,n,i,a,C,r]);let P=v.useCallback(y=>c=>{let d=M.current[y]??null;d&&d!==c&&(s.current.delete(d),g.current?.unobserve(d),m.current?.unobserve(d)),M.current[y]=c,c&&(s.current.set(c,y),C(c,y),g.current?.observe(c),m.current?.observe(c));},[C]);return {nearView:l,everInView:E,setEntryRef:P}}function Lt(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 It(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 Ke(e,t,n,r){let i=r?.timeoutMs??8e3,o=v.useMemo(()=>Lt(t),[t]),a=v.useMemo(()=>(t??[]).map(s=>(s.media??[]).filter(M=>M?.kind==="image"&&typeof M?.src=="string").map(M=>M.src)),[t]),[l,p]=v.useState([]),E=v.useRef([]),R=v.useRef(new Map),g=v.useRef("");return v.useEffect(()=>{if(!e)return;let m=t?.length??0;if(g.current!==o){g.current=o,p(Array.from({length:m},(s,M)=>(a[M]?.length??0)===0)),E.current=Array.from({length:m},()=>false);for(let[,s]of R.current)s.abort();R.current.clear();}},[e,o,t,a]),v.useEffect(()=>{if(!e)return;let m=t?.length??0;if(m)for(let s=0;s<m;s++){let M=!!n[s],C=l[s]??false,P=E.current[s]??false;if(!M||C||P)continue;E.current[s]=true;let y=a[s]??[];if(!y.length){p(d=>{if(d[s])return d;let k=d.slice();return k[s]=true,k});continue}let c=new AbortController;R.current.set(s,c),(async()=>{for(let d of y){if(c.signal.aborted)return;await Promise.race([It(d,c.signal),new Promise(k=>{let b=window.setTimeout(k,i);c.signal.addEventListener("abort",()=>{window.clearTimeout(b),k();},{once:true});})]);}c.signal.aborted||p(d=>{if(!d||s<0||s>=d.length||d[s])return d;let k=d.slice();return k[s]=true,k});})();}},[e,t,a,n,l,i]),v.useEffect(()=>()=>{for(let[,m]of R.current)m.abort();R.current.clear();},[]),{decodedReady:l,entriesKey:o}}function Tt(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function Ue(e){return v.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,l=Tt(t.minHeight)??"260px";return {enabled:t.enabled,force:t.force,skeleton:t.skeleton,minHeight:l,nearMargin:n,viewMargin:r,threshold:i,waitForDecode:o,decodeTimeoutMs:a,skeletonWrap:t.skeletonWrap}},[e.loading])}function Xe(e){return v.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 S={entryRow:"t",entrySkeletonWrap:"e",entrySkeletonBody:"V",entryInner:"c",entrySkelTile:"n",entryList:"W",entrySkelRoot:"ee",entrySkelGroup:"re",entrySkelStack:"ie",entrySkelRow:"ae",entrySkelCol:"te",entrySkelText:"ne",entrySkelTextLine:"oe",entrySkelRect:"se",entrySkelSquare:"de",entrySkelCircle:"le"};function Nt(){return {variant:"solid",minHeight:260}}function L(e){if(e!=null)return typeof e=="number"?`${e}px`:e}function Re(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 et(e,t){let n={};return e?.aspectRatio!=null&&(n.aspectRatio=e.aspectRatio),e?.width!=null&&(n.width=L(e.width)),e?.maxWidth!=null&&(n.maxWidth=L(e.maxWidth)),e?.height!=null&&(n.height=L(e.height)),e?.maxHeight!=null&&(n.maxHeight=L(e.maxHeight)),e?.aspectRatio!=null&&e?.height==null&&(n.height="auto"),e?.aspectRatio!=null&&e?.width==null&&e?.height==null&&(n.width="100%"),e?.backgroundColor&&(n["--rmg-skel-bg"]=e.backgroundColor),e?.borderRadius!=null&&(n["--rmg-skel-radius"]=L(e.borderRadius)),e?.overflow!=null&&(n.overflow=e.overflow),e?.alignSelf&&(n.alignSelf=e.alignSelf),Object.assign(n,l(t)),n}function Ye(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 Qe(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 Je(e){return e.replace(/"/g,'\\"')}function tt(e,t,n,r=a$2){switch(e.kind){case "rect":case "square":case "circle":{let i=v$1({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$1=[...i({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})),...w({style:e.style,breakpointMap:r})];if(!i$1.length)return e;let o=t();return n.push({nodeId:o,rules:i$1}),{...e,__rmgNodeId:o}}case "media":{let i=[...u({style:e.style,breakpointMap:r}),...v$1({style:e.tile?.style,breakpointMap:r,selector:`${b$1} [data-rmg-skel-media-tile="true"]`})];if(!i.length)return e;let o=t();return n.push({nodeId:o,rules:i}),{...e,__rmgNodeId:o}}case "stack":case "row":case "col":{let i=u({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(l=>tt(l,t,n,r));return {...e,...o?{__rmgNodeId:o}:null,children:a}}default:return e}}function Bt(e,t){if(!t.length)return "";let n=`[data-rmg-entry-skel-scope="${Je(e)}"]`,r=[];for(let i of t){let o=`${n} [data-rmg-skel-node="${Je(i.nodeId)}"]`;for(let a of i.rules){let l=a.raw?a.css.split("__NODE_SEL__").join(o):`${o}{${a.css}}`;a.minWidth<=0?r.push(l):a.query==="container"?r.push(`@container (min-width:${a.minWidth}px){${l}}`):r.push(`@media (min-width:${a.minWidth}px){${l}}`);}}return r.join(`
2
+ `)}function Ze(e){let{kind:t,style:n,shimmer:r,breakpointMap:i,mediaTile:o}=e,a=t==="circle"?S.entrySkelCircle:t==="square"?S.entrySkelSquare:S.entrySkelRect,l=q(n,i),p=e.__rmgNodeId;return jsx("div",{"data-rmg-skel-node":p,"data-rmg-skel-media-tile":o?"true":void 0,className:[S.entrySkelTile,a].join(" "),style:{...et(l,r),...Re(l)}})}function Ot({node:e,breakpointMap:t}){let n=h({barHeight:e.barHeight,barWidth:e.barWidth,lineHeight:e.lineHeight,lines:e.lines,lastBarWidth:e.lastBarWidth,responsiveBy:e.responsiveBy,breakpointMap:t}),r=q(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((m,s)=>m!==n.baseState.barWidths[s])),l=e.__rmgNodeId,p=Ye(i?void 0:r,o?void 0:n.metrics.totalHeight),E={height:n.metrics.barHeight,backgroundColor:r?.backgroundColor,borderRadius:r?.borderRadius},R=jsx("div",{"data-rmg-skel-node":l,"data-rmg-skel-text":"true",className:S.entrySkelText,style:{...p,...i?null:Re(r),...o?null:{paddingBlock:`${n.metrics.paddingBlock}px`,rowGap:`${n.metrics.rowGap}px`}},children:Array.from({length:n.maxLines}).map((g,m)=>jsx("div",{"data-rmg-skel-text-line":"true",className:[S.entrySkelTile,S.entrySkelTextLine].join(" "),style:{...et(E,e.shimmer),...a?null:{display:m>=n.baseLines?"none":void 0,width:"100%",maxWidth:n.baseState.barWidths[m]??"100%"}}},m))});return i?jsx("div",{"data-rmg-skel-text-container":"true",style:{...Ye(r),...Re(r),containerType:"inline-size"},children:R}):R}function nt({node:e,breakpointMap:t}){switch(e.kind){case "rect":case "square":case "circle":return jsx(Ze,{...e,breakpointMap:t});case "media":{let n=Math.max(0,e.count|0),r$1=e.direction??"row",i=e.tile?.shape??"rect",o=e.__rmgNodeId,a=Qe(r(e.style,t));return jsx("div",{"data-rmg-skel-node":o,className:[S.entrySkelGroup,r$1==="row"?S.entrySkelRow:S.entrySkelCol].join(" "),style:a,children:Array.from({length:n}).map((l,p)=>jsx(Ze,{kind:i,style:e.tile?.style,shimmer:e.tile?.shimmer,breakpointMap:t,mediaTile:true},p))})}case "stack":case "row":case "col":{let n=e.kind==="row"?S.entrySkelRow:e.kind==="col"?S.entrySkelCol:S.entrySkelStack,r$1=e.__rmgNodeId,i=Qe(r(e.style,t));return jsx("div",{"data-rmg-skel-node":r$1,className:[S.entrySkelGroup,n].join(" "),style:i,children:e.children.map((o,a)=>jsx(nt,{node:o,breakpointMap:t},a))})}case "text":return jsx(Ot,{node:e,breakpointMap:t});default:{return null}}}function rt({spec:e,className:t,breakpoints:n}){let r=e??Nt(),i=v.useMemo(()=>({...a$2,...n??{}}),[n]),o={...r.minHeight!=null?{minHeight:L(r.minHeight)}:null,...l(r.defaults?.shimmer)};if(r.defaults?.backgroundColor&&(o["--rmg-skel-bg"]=r.defaults.backgroundColor),r.defaults?.radius!=null&&(o["--rmg-skel-radius"]=L(r.defaults.radius)),r.variant==="solid"&&!r.layout)return jsx("div",{className:[S.entrySkelTile,t].filter(Boolean).join(" "),style:o});let a=v.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}}]}),[]),l$1=r.layout??a,p=v.useMemo(()=>a$4("skel_",{breakpoints:i,className:t,layout:l$1,minHeight:r.minHeight,variant:r.variant}),[t,i,l$1,r.minHeight,r.variant]),{layout:E,responsiveCss:R}=v.useMemo(()=>{let g=0,m=()=>`n${++g}`,s=[],M=tt(l$1,m,s,i),C=Bt(p,s);return {layout:M,responsiveCss:C}},[l$1,p,i]);return jsxs("div",{"data-rmg-entry-skel-scope":p,className:[S.entrySkelRoot,t].filter(Boolean).join(" "),style:o,children:[R?jsx("style",{dangerouslySetInnerHTML:{__html:R}}):null,jsx(nt,{node:E,breakpointMap:i})]})}var At=220,Pt=220;function _t(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 Ft(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 it(e,t){return String(e.key??e.id??t)}function ot({enabled:e,entries:t,fsEnabled:n,openFullscreenAt:r,entryFlatIndexRef:i,nodeFromMedia:o,renderMediaContainer:a$2,breakpoints:l,registerExpandableImage:p,entrySliderRefs:E}){let g=v.useRef(null),m=v.useRef(false),s=f=>{f.button!=null&&f.button!==0||(m.current=false,g.current={x:f.clientX,y:f.clientY});},M=f=>{let u=g.current;if(!u)return;let x=f.clientX-u.x,T=f.clientY-u.y;!m.current&&x*x+T*T>=36&&(m.current=true);},C=()=>{g.current=null,window.setTimeout(()=>{m.current=false;},0);},P=()=>m.current;function y(f,u){let x=t?.loading?.skeleton;if(typeof x=="function"){let T=x({entry:f,entryIndex:u});if(T&&typeof T=="object")return T}else if(x&&typeof x=="object")return x;return {variant:"solid",minHeight:260}}let c=t.items??[],d=c.length,k=v.useMemo(()=>c.map((f,u)=>it(f,u)),[c]),b=k.join("\0"),[w,h]=v.useState(()=>new Set);v.useEffect(()=>{h(f=>{if(f.size===0)return f;let u=new Set(b?b.split("\0"):[]),x=false,T=new Set;return f.forEach(j=>{u.has(j)?T.add(j):x=true;}),x?T:f});},[b]);let N=v.useRef(0),_=v.useRef([]);_.current.length!==d&&(_.current=Array.from({length:d},()=>-1),N.current=0);let W=Ue(t),V=Xe(t),ie=t?.loading,st=ie?.enabled??true,ee=a(ie?.force),oe=a$1(),F=e&&st,{nearView:ke,everInView:lt,setEntryRef:ct}=Ge(d,{root:null,nearMargin:W.nearMargin,viewMargin:W.viewMargin,threshold:W.threshold}),dt=F&&(!ee.enabled||ee.showContent),{decodedReady:ut}=Ke(dt,c,ke,{timeoutMs:W.decodeTimeoutMs}),ae=Math.max(0,(oe?0:At)-Pt),[mt,se]=v.useState(()=>!(F&&(ee.enabled||d===0))),ft=v.useCallback(f=>{h(u=>{if(u.has(f))return u;let x=new Set(u);return x.add(f),x});},[]),U=false,be=false,we=[],gt=d?c.map((f,u)=>{let x=ke[u]??false,T=lt[u]??false,j=ut[u]??false,G=T||x,yt=G&&(W.waitForDecode?j:true),pt=F?T&&(W.waitForDecode?j:true):G,$=_t({loadingActive:F,loadingForced:ie?.force,shouldMountContent:G,contentReady:yt,defaultReveal:pt}),K=$.revealContent;$.compareMode&&(be=true),K&&(U=true);let ne=k[u]??it(f,u),ht=K&&!$.compareMode&&w.has(ne);K&&!$.compareMode&&we.push(ne);let Me=null;if(G){let X=f.media??[],vt=i.current,Et=X.map((Te,Y)=>{let He=vt?.[u]?.[Y]??0,ce=typeof t.render?.media=="function"?t.render.media({entry:f,entryIndex:u,media:Te,mediaIndex:Y}):o(Te),de=A=>{p?.(He,A);},Ne=A=>{A.preventDefault(),n&&r(He,A.currentTarget);};if(v.isValidElement(ce)){let A=ce,Be=A.props?.onClick,Q=A.ref,Oe=D=>{typeof Be=="function"&&Be(D),!D.defaultPrevented&&Ne(D);};if(typeof A.type=="string"){let D=z=>{typeof Q=="function"?Q(z):Q&&typeof Q=="object"&&(Q.current=z),de(z);};return v.cloneElement(A,{key:`${u}-${Y}`,onClick:z=>{if(P()){z.preventDefault(),z.stopPropagation();return}Oe(z);},onPointerDownCapture:s,onPointerMoveCapture:M,onPointerUpCapture:C,ref:D})}return jsx("span",{ref:de,style:{display:"contents"},onPointerDownCapture:s,onPointerMoveCapture:M,onPointerUpCapture:C,children:v.cloneElement(A,{onClick:D=>{if(P()){D.preventDefault(),D.stopPropagation();return}Oe(D);}})},`${u}-${Y}`)}return jsx("div",{className:S.entryMediaButton,onClick:Ne,ref:de,children:ce},`${u}-${Y}`)}),Ie=a$2({entryIndex:u,entryInView:T,mediaNodes:Et,entrySliderRefs:E});Me=typeof t.render?.card=="function"?t.render.card({entry:f,entryIndex:u,media:Ie}):Ie;}let xe=V.staggerLimit,Rt=xe>0&&u<xe?u:0,St=typeof t.render?.skeleton=="function"?t.render.skeleton({entry:f,entryIndex:u}):null,kt=y(f,u),Ce=W.skeletonWrap,bt=Ft(Ce?.style);K&&_.current[u]===-1&&(_.current[u]=N.current++);let Le=_.current[u],wt=Le>=0?Le*V.staggerMs:0;return jsxs("div",{ref:ct(u),"data-rmg-entry-ready":K?"1":"0","data-rmg-entry-compare":$.compareMode?"1":"0","data-rmg-entry-mounted":G?"1":"0",className:[S.entryRow,t.entryRow?.className].filter(Boolean).join(" "),"data-rmg-entry-owner":u,style:{"--rmg-entry-min-height":W.minHeight,"--rmg-entry-intro-index":Rt,"--rmg-entry-intro-delay":`${wt}ms`,...t.entryRow?.style},children:[F?jsx("div",{className:[S.entrySkeletonWrap,Ce?.className].filter(Boolean).join(" "),style:{"--rmg-entry-skeleton-opacity":$.loadingLayerOpacity,...bt??{}},"aria-hidden":"true","data-rmg-entry-skeleton":true,"data-rmg-entry-shimmer":ht?"off":void 0,onTransitionEnd:X=>{X.currentTarget!==X.target||X.propertyName!=="opacity"||!K||$.compareMode||ft(ne);},children:jsx("div",{className:S.entrySkeletonBody,children:St??jsx(rt,{spec:kt,breakpoints:l})})}):null,G?jsx("div",{className:S.entryInner,children:Me}):null]},ne)}):null,le=we.join("\0");v.useEffect(()=>{h(f=>{if(f.size===0)return f;let u=new Set(le?le.split("\0"):[]),x=false,T=new Set;return f.forEach(j=>{u.has(j)?T.add(j):x=true;}),x?T:f});},[le]);let te=F&&(d===0||ee.enabled&&!be&&!U);v.useEffect(()=>{if(te){se(false);return}if(!F||oe||ae===0){se(F?U:true);return}let f=window.setTimeout(()=>{se(U);},ae);return ()=>{window.clearTimeout(f);}},[U,ae,F,oe,te]);let ve={className:[S.entryList,t.entryList?.className].filter(Boolean).join(" "),style:{"--rmg-entry-intro-stagger":`${V.staggerMs}ms`,"--rmg-entry-intro-duration":`${V.durationMs}ms`,"--rmg-entry-intro-easing":V.easing,...t.entryList?.style},"aria-busy":te?true:void 0},Ee=jsx("div",{...ve,children:gt});return V.renderIntro?V.renderIntro({active:!te&&mt,containerProps:ve},Ee):Ee}var at={mediaLayout:"slider"};var jt=e=>Array.isArray(e)&&e.every(t=>typeof t=="string"),Vt=e=>!e||!e.length?[]:jt(e)?a$3(e):e,$t=e=>e?e.kind==="image":false;function zt(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 qt(e){let t=[],n=[],r=[],i=[];return e?.length?(e.forEach((o,a)=>{r[a]=[],(o.media??[]).forEach((l,p)=>{let E=t.length;t.push(l),n.push({entryIndex:a,mediaIndex:p}),i.push({entryIndex:a}),r[a][p]=E;});}),{flattenedMedia:t,flattenedMap:n,entryFlatIndex:r,owners:i}):{flattenedMedia:[],flattenedMap:[],entryFlatIndex:null,owners:[]}}function wn(e){let{enabled:t=true,entries:n,fullscreen:r,renderMediaContainer:i,nodeFromMedia:o=zt}=e,a=v.useMemo(()=>({...n,mediaLayout:n?.mediaLayout??at.mediaLayout}),[n]),l=d(),p=v.useMemo(()=>l?.effectiveBreakpoints??{...a$2},[l?.effectiveBreakpoints]),E=e.entryFlatIndexRef??v.useRef(null),R=e.entryMapRef??v.useRef(null),g=e.fsOwnersRef??v.useRef([]),m=e.entrySliderRefs??v.useRef([]),s=l?.expandableImageRefs??v.useRef([]),M=l?.registerExpandableImage??v.useCallback((h,N)=>{if(!N){s.current[h]=null;return}if(N.tagName==="IMG"){s.current[h]=N;return}let _=N.querySelector("img");s.current[h]=_;},[]),{flattenedMedia:C,flattenedMap:P,entryFlatIndex:y,owners:c}=v.useMemo(()=>qt(a.items),[a.items]);v.useEffect(()=>{E.current=y,g.current=c,R.current=P;},[y,c,P,E,g,R]);let d$1=v.useMemo(()=>{let h=Vt(r?.items);return h.length?h:C},[r?.items,C]);v.useEffect(()=>{l&&l.registerFullscreenAdapter("entries",{closestSelector:a.mediaLayout==="slider"?".rmg__slide":".rmg__grid-item",getOwnerSliderHandle:h=>{let N=R.current?.[h];return N?m.current?.[N.entryIndex]??null:null},getEntryContext:()=>({entryMapRef:R,entryMediaLayout:a.mediaLayout,entriesObject:a,entrySliderRefs:m,expandableImageRefs:l?.expandableImageRefs??s})});},[l,a]);let k=h=>h?h instanceof HTMLImageElement?h:h.querySelector("img"):null,b=v.useCallback((h,N)=>{if(!l?.requestFullscreenOpen)return;let _=d$1[h]??C[h];if(!$t(_))return;let W=k(N??null)??s.current[h]??null;W&&l.requestFullscreenOpen({source:"entries",index:h,image:W,event:void 0});},[l,s,d$1,C]),w=(r?.enabled??true)&&d$1.length>0;return jsx(ot,{enabled:!!t,entries:a,fsEnabled:!!w,openFullscreenAt:b,entryFlatIndexRef:E,nodeFromMedia:o,registerExpandableImage:M,renderMediaContainer:i,entrySliderRefs:m,breakpoints:p})}export{Ge as a,Ke as b,Ue as c,Xe as d,_t as e,ot as f,zt as g,qt as h,wn as i};
@@ -0,0 +1 @@
1
+ import*as e from'react';function i(){let c=e.useRef(null),l=e.useRef(null),r=e.useRef(null),u=e.useRef(false),[a,f]=e.useState(false),n=e.useCallback(t=>{u.current=t,f(t);},[]),o=e.useCallback(t=>{let s=l.current,R=t?.getRootNode()??null,d=!!t&&!!s&&s===R;if(r.current?.(),r.current=null,c.current=t,l.current=R,!t){l.current=null,n(false);return}d||n(false),!u.current&&t.isReady()&&n(true),r.current=t.onReady(()=>{u.current||n(true);});},[n]);return e.useEffect(()=>()=>{r.current?.(),r.current=null,l.current=null,u.current=false;},[]),e.useMemo(()=>({ref:o,ready:a,handleRef:c}),[o,a])}export{i as a};
@@ -0,0 +1 @@
1
+ function a(r){return Math.max(0,Math.min(1,r))}var c=5,b=.38,h=24;function f(r){let{currentIndex:n,delta:s,slideCount:t,wrap:o}=r;if(t<=1||Math.abs(s)<.5)return n;let e=s<0?n+1:n-1;return o?(e%t+t)%t:Math.max(0,Math.min(t-1,e))}function p(r){let{progress:n,force:s,delta:t}=r;if(a(n)>=.5)return true;let e=Math.sign(t),i=Math.sign(s);return i!==0&&e!==0&&i===e&&Math.abs(s)>=.05}function M(r){let{controls:n,wheel:s,sharedDurationMs:t,defaults:o}=r,e=typeof s=="object"&&s!=null?s:null,i=typeof s=="boolean"?s:e?e.enabled??true:n??false,u=typeof e?.sensitivity=="number"&&Number.isFinite(e.sensitivity)?Math.max(0,e.sensitivity):o.sensitivity,m=typeof e?.commitThreshold=="number"&&Number.isFinite(e.commitThreshold)?Math.max(0,Math.min(.499,e.commitThreshold)):o.commitThreshold,l=typeof e?.durationMs=="number"&&Number.isFinite(e.durationMs)?Math.max(0,e.durationMs):t,d=typeof e?.sessionGapMs=="number"&&Number.isFinite(e.sessionGapMs)?Math.max(0,e.sessionGapMs):o.sessionGapMs;return {enabled:i,sensitivity:u,commitThreshold:m,durationMs:l,sessionGapMs:d}}function x(r){let{currentIndex:n,delta:s,slideCount:t,wrap:o}=r;if(t<=1||!Number.isFinite(s)||Math.abs(s)<.5)return n;let e=s>0?1:-1,i=n+e;return o?(i%t+t)%t:Math.max(0,Math.min(t-1,i))}function T(r){let{delta:n,distance:s}=r;return !Number.isFinite(n)||!Number.isFinite(s)||s<=0?0:a(Math.abs(n)/s)}function C(r){let{progress:n,threshold:s}=r;if(!Number.isFinite(n))return false;let t=Math.max(0,Math.min(.499,s));return a(n)>=t}function E(r){let{now:n,direction:s,sessionDirection:t,lastEventTs:o,sessionGapMs:e}=r;return !Number.isFinite(n)||!Number.isFinite(o)||s!==t?false:n-o<=Math.max(0,e)}export{a,c as b,b as c,h as d,f as e,p as f,M as g,x as h,T as i,C as j,E as k};
@@ -0,0 +1 @@
1
+ import*as n from'react';function t(){return typeof window<"u"&&window.innerWidth>0?window.innerWidth:typeof document<"u"&&document.documentElement.clientWidth>0?document.documentElement.clientWidth:0}function i(){return n.useSyncExternalStore(e=>typeof window>"u"?()=>{}:(window.addEventListener("resize",e),window.visualViewport?.addEventListener("resize",e),()=>{window.removeEventListener("resize",e),window.visualViewport?.removeEventListener("resize",e);}),t,()=>0)}export{t as a,i as b};