etudes 16.0.2 → 16.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/etudes.js CHANGED
@@ -803,6 +803,8 @@ process.env.NODE_ENV !== "production" && (he.displayName = "Styled");
803
803
  function ze(e, r = {}) {
804
804
  const s = Object.keys(r), a = Object.values(r), l = {};
805
805
  return sn.forEach(e, (u) => {
806
+ if (u == null)
807
+ return;
806
808
  if (!an(u)) {
807
809
  console.error("[etudes::asComponentDict] Invalid child detected");
808
810
  return;
@@ -19,7 +19,7 @@
19
19
  <%s {...props} />
20
20
  React keys must be passed directly to JSX without using spread:
21
21
  let props = %s;
22
- <%s key={someKey} {...props} />`,ie,xe,J,xe),B[xe+ie]=!0)}if(xe=null,oe!==void 0&&(s(oe),xe=""+oe),h(H)&&(s(H.key),xe=""+H.key),"key"in H){oe={};for(var ze in H)ze!=="key"&&(oe[ze]=H[ze])}else oe=H;return xe&&g(oe,typeof C=="function"?C.displayName||C.name||"Unknown":C),S(C,xe,ve,fe,l(),oe,Ee,Se)}function P(C){typeof C=="object"&&C!==null&&C.$$typeof===j&&C._store&&(C._store.validated=1)}var O=N,j=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),X=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),re=O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,U=Array.isArray,D=console.createTask?console.createTask:function(){return null};O={"react-stack-bottom-frame":function(C){return C()}};var z,te={},ee=O["react-stack-bottom-frame"].bind(O,u)(),ce=D(a(u)),B={};ht.Fragment=x,ht.jsx=function(C,H,oe,ie,fe){var ve=1e4>re.recentlyCreatedOwnerStacks++;return k(C,H,oe,!1,ie,fe,ve?Error("react-stack-top-frame"):ee,ve?D(a(C)):ce)},ht.jsxs=function(C,H,oe,ie,fe){var ve=1e4>re.recentlyCreatedOwnerStacks++;return k(C,H,oe,!0,ie,fe,ve?Error("react-stack-top-frame"):ee,ve?D(a(C)):ce)}}()),ht}var Ar;function Ai(){return Ar||(Ar=1,process.env.NODE_ENV==="production"?zt.exports=Ri():zt.exports=ji()),zt.exports}var b=Ai();function Mr(e){var r,s,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(r=0;r<l;r++)e[r]&&(s=Mr(e[r]))&&(a&&(a+=" "),a+=s)}else for(s in e)e[s]&&(a&&(a+=" "),a+=s);return a}function ae(){for(var e,r,s=0,a="",l=arguments.length;s<l;s++)(e=arguments[s])&&(r=Mr(e))&&(a&&(a+=" "),a+=r);return a}var Rn,zr;function Mi(){return zr||(zr=1,Rn=function e(r,s){if(r===s)return!0;if(r&&s&&typeof r=="object"&&typeof s=="object"){if(r.constructor!==s.constructor)return!1;var a,l,u;if(Array.isArray(r)){if(a=r.length,a!=s.length)return!1;for(l=a;l--!==0;)if(!e(r[l],s[l]))return!1;return!0}if(r.constructor===RegExp)return r.source===s.source&&r.flags===s.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===s.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===s.toString();if(u=Object.keys(r),a=u.length,a!==Object.keys(s).length)return!1;for(l=a;l--!==0;)if(!Object.prototype.hasOwnProperty.call(s,u[l]))return!1;for(l=a;l--!==0;){var h=u[l];if(!(h==="_owner"&&r.$$typeof)&&!e(r[h],s[h]))return!1}return!0}return r!==r&&s!==s}),Rn}var zi=Mi();const Ve=Ir(zi);var pe;(e=>{e.zero=r();function r(x=0,R=0){if(typeof x=="number")return{x,y:R};if(!O(x))throw Error("Invalid parameters passed to constructor");return x instanceof Array?{x:x[0],y:x[1]}:{x:x.x,y:x.y}}e.make=r;function s(x,R={}){return r({x:typeof R.x=="number"?R.x:x.x,y:typeof R.y=="number"?R.y:x.y})}e.clone=s;function a(x,R){return r({x:x.x+R.x,y:x.y+R.y})}e.add=a;function l(x,R){return r({x:x.x-R.x,y:x.y-R.y})}e.subtract=l;function u(x,R){return r({x:x.x*R.x,y:x.y*R.y})}e.multiply=u;function h(x,R){return r({x:x.x/R.x,y:x.y/R.y})}e.divide=h;function g(x){return r({x:x.y,y:x.x})}e.invert=g;function m(x,R){return!(x.x!==R.x||x.y!==R.y)}e.isEqual=m;function S(x){return`Point(x=${x.x}, y=${x.y})`}e.toString=S;function k(x){return Object.freeze({x:x.x,y:x.y})}e.toJSON=k;function P(x){return[x.x,x.y]}e.toArray=P;function O(x){return x instanceof Array?!(x.length!==2||typeof x[0]!="number"||typeof x[1]!="number"):typeof x=="object"?!(typeof x.x!="number"||typeof x.y!="number"):!1}e.isValidDescriptor=O;function j(x){return typeof x=="object"&&typeof x.x=="number"&&typeof x.y=="number"}e.isPoint=j;function L(x){return x.x===0&&x.y===0}e.isZero=L})(pe||(pe={}));function Li(e,r){try{const s=pe.isValidDescriptor(e)&&pe.make(e),a=pe.isValidDescriptor(r)&&pe.make(r);if(s&&!a){const l=r instanceof Array?r:[r],u=l.length;for(let h=0;h<u;h++){const g=ge.from(l[h]);if(!g)continue;const m=s.x>=g.left&&s.x<=g.right,S=s.y>=g.top&&s.y<=g.bottom;if(m&&S)return!0}return!1}else if(!s&&a){const l=e instanceof Array?e:[e],u=l.length;for(let h=0;h<u;h++){const g=ge.from(l[h]);if(!g)continue;const m=a.x>=g.left&&a.x<=g.right,S=a.y>=g.top&&a.y<=g.bottom;if(m&&S)return!0}return!1}else{if(s&&a)return pe.isEqual(s,a);{const l=[...e instanceof Array?e:[e],...r instanceof Array?r:[r]],u=ge.intersecting.apply(null,l);return u?u.width*u.height!==0:!1}}}catch(s){return console.error(s),!1}}var Pe;(e=>{e.zero=r();function r(x=0,R=0){if(typeof x=="number")return{width:x,height:R};if(!O(x))throw Error("Invalid parameters passed to constructor");return x instanceof Array?{width:x[0],height:x[1]}:{width:x.width,height:x.height}}e.make=r;function s(x,R={}){return r({width:typeof R.width=="number"?R.width:x.width,height:typeof R.height=="number"?R.height:x.height})}e.clone=s;function a(x,R){return r({width:x.width+R.width,height:x.height+R.height})}e.add=a;function l(x,R){return r({width:x.width-R.width,height:x.height-R.height})}e.subtract=l;function u(x,R){return r({width:x.width*R.width,height:x.height*R.height})}e.multiply=u;function h(x,R){return r({width:x.width/R.width,height:x.height/R.height})}e.divide=h;function g(x){return r({width:x.height,height:x.width})}e.invert=g;function m(x,R){return!(x.width!==R.width||x.height!==R.height)}e.isEqual=m;function S(x){return`Size(width=${x.width}, height=${x.height})`}e.toString=S;function k(x){return Object.freeze({width:x.width,height:x.height})}e.toJSON=k;function P(x){return[x.width,x.height]}e.toArray=P;function O(x){return x instanceof Array?!(x.length!==2||typeof x[0]!="number"||typeof x[1]!="number"):typeof x=="object"?!(typeof x.width!="number"||typeof x.height!="number"):!1}e.isValidDescriptor=O;function j(x){return typeof x=="object"&&typeof x.width=="number"&&typeof x.height=="number"}e.isSize=j;function L(x){return x.width===0&&x.height===0}e.isZero=L})(Pe||(Pe={}));var ge;(e=>{e.zero=r();function r(T=0,I=0,E=0,F=0){if(typeof T=="number"&&typeof I=="number"){const W=T,Z=I;return{top:Z,right:W+E,bottom:Z+F,left:W,width:E,height:F}}else if(pe.isPoint(T)&&Pe.isSize(I)){const W=T,Z=I;return{top:W.y,right:W.x+Z.width,bottom:W.y+Z.height,left:W.x,width:Z.width,height:Z.height}}else{const W=T;if(!Q(W))throw Error("Invalid parameters passed to constructor");return{top:W.y,right:W.x+W.width,bottom:W.y+W.height,left:W.x,width:W.width,height:W.height}}}e.make=r;function s(T){return pe.make({x:(T.right-T.left)/2+T.left,y:(T.bottom-T.top)/2+T.top})}e.center=s;function a(T){return Pe.make({width:T.width,height:T.height})}e.size=a;function l(T,I={}){try{if(T==null)return;if(X(T))return T;if(pt(T))return l(document.documentElement||document.body.parentNode||document.body,I);const E=T instanceof Array?T:[T],F=E.length,W=I.reference||window,Z=u(),re=pt(W)?Z:l(I.reference);if(!Z||!re)return;let q;for(let U=0;U<F;U++){const D=E[U],z=D.getBoundingClientRect(),te=r({x:z.left+Z.left-(pt(W)?0:re.left),y:z.top+Z.top-(pt(W)?0:re.top),width:I.overflow?D.scrollWidth:D instanceof HTMLElement?D.offsetWidth:z.width,height:I.overflow?D.scrollHeight:D instanceof HTMLElement?D.offsetHeight:z.height});q=q?O(q,te):te}return q}catch(E){console.error(E);return}}e.from=l;function u(){const T=Math.max(document.documentElement.clientWidth,window.innerWidth||0),I=Math.max(document.documentElement.clientHeight,window.innerHeight||0),E=window.pageXOffset!==void 0?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,F=window.pageYOffset!==void 0?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;return r({x:E,y:F,width:T,height:I})}e.fromViewport=u;function h(T,I={}){if(T)return pt(T)?l(Array.from(document.body.children)):l(Array.from(T.children),{overflow:I.overflow,reference:I.reference||T})}e.fromChildrenOf=h;function g(T,I,E={}){if(!I)return;const F=Array.from(I.children);return T<=0?r():T>=F.length?l(F,{reference:E.reference,overflow:!1}):(F.splice(T),l(F,{reference:E.reference||I,overflow:!1}))}e.fromChildrenBefore=g;function m(T,I,E={}){if(!I)return;const F=Array.from(I.children);return T<0?l(F,{reference:E.reference,overflow:!1}):T>=F.length-1?r():(F.splice(0,F.length-T-1),l(F,{reference:E.reference||I,overflow:!1}))}e.fromChildrenAfter=m;function S(T,I,E={}){if(!I)return;const F=I.children[T];return l(F,{overflow:E.overflow,reference:E.reference||I})}e.fromChildAt=S;function k(...T){try{const I=T.length,E={};let F,W;for(let Z=0;Z<I;Z++){if(F||(F=l(T[Z])),Z===0&&Z+1===I)W=u();else if(Z+1<I)W=l(T[Z+1]);else break;!F||!W||(E.width=Math.max(0,Math.min(F.right,W.right)-Math.max(F.left,W.left)),E.height=Math.max(0,Math.min(F.bottom,W.bottom)-Math.max(F.top,W.top)),E.y=Math.max(F.top,W.top),E.x=Math.max(F.left,W.left),E.width*E.height===0&&(E.width=0,E.height=0,E.y=NaN,E.x=NaN),F=r(E))}return r(E)}catch(I){console.error(I);return}}e.intersecting=k;function P(T,I={}){return r({x:typeof I.x=="number"?I.x:T.left,y:typeof I.y=="number"?I.y:T.top,width:typeof I.width=="number"?I.width:T.width,height:typeof I.height=="number"?I.height:T.height})}e.clone=P;function O(T,I){return r({x:Math.min(T.left,I.left),y:Math.min(T.top,I.top),width:Math.max(T.right,I.right)-Math.min(T.left,I.left),height:Math.max(T.bottom,I.bottom)-Math.min(T.top,I.top)})}e.concat=O;function j(T){return r({x:T.left,y:T.top,width:T.height,height:T.width})}e.invert=j;function L(T,I){return!(T.top!==I.top||T.right!==I.right||T.bottom!==I.bottom||T.left!==I.left||T.width!==I.width||T.height!==I.height)}e.isEqual=L;function x(T,I){return Li(I,T)}e.contains=x;function R(T){return`Rect(top=${T.top}, right=${T.right}, bottom=${T.bottom}, left=${T.left}, width=${T.width}, height=${T.height})`}e.toString=R;function $(T){return Object.freeze({top:T.top,right:T.right,bottom:T.bottom,left:T.left,width:T.width,height:T.height})}e.toJSON=$;function Q(T){return!(typeof T.x!="number"||typeof T.y!="number"||typeof T.width!="number"||typeof T.height!="number")}e.isValidDescriptor=Q;function X(T){return typeof T=="object"&&typeof T.top=="number"&&typeof T.right=="number"&&typeof T.bottom=="number"&&typeof T.left=="number"&&typeof T.width=="number"&&typeof T.height=="number"}e.isRect=X;function G(T){return T.top===0&&T.right===0&&T.bottom===0&&T.left===0&&T.width===0&&T.height===0}e.isZero=G})(ge||(ge={}));function pt(e){return e===window}function Ne(e){const r=N.useRef(e);return N.useEffect(()=>{r.current=e},[e]),r}function Lt(e,{onResize:r}){const s=Ne(r);N.useLayoutEffect(()=>{const a=e.current;if(!a)return;const l=new ResizeObserver(()=>{s.current?.(a)});return l.observe(a),()=>{l.disconnect()}},[e.current])}function jn(e){const[r,s]=N.useState(ge.zero);return Lt(e,{onResize:a=>{const l=ge.from(a);l&&s(l)}}),ge.size(r)}function gt({in:e,children:r,render:s}){if(e==null)return b.jsx(b.Fragment,{});if(!(e instanceof Array))throw TypeError(`Provided list <${e}> is not an array`);return b.jsx(b.Fragment,{children:e.map((a,l)=>b.jsx(N.Fragment,{children:s?.(a,l)??(typeof r=="function"?r(a,l):r)},`item-${l}`))})}process.env.NODE_ENV!=="production"&&(gt.displayName="Each");function Ft(e,r={},...s){const{className:a,style:l,...u}=r,{className:h,style:g,...m}=e.props;return N.cloneElement(e,{className:`${h??""} ${a??""}`.split(" ").filter(Boolean).join(" ")||void 0,style:{...g??{},...l??{}},...m,...u},...s)}function me({children:e,element:r,...s}){return Ft(r,s,...e?Array.isArray(e)?e:[e]:[])}process.env.NODE_ENV!=="production"&&(me.displayName="Styled");function Oe(e,r={}){const s=Object.keys(r),a=Object.values(r),l={};return N.Children.forEach(e,u=>{if(!N.isValidElement(u)){console.error("[etudes::asComponentDict] Invalid child detected");return}const h=a.indexOf(u.type);if(h<0){console.error(`[etudes::asComponentDict] Unsupported child, only the following children are allowed: ${a.map(m=>m.displayName??m.name).join(", ")}`);return}const g=s[h];if(l[g]){console.error(`[etudes::asComponentDict] Only one ${a[h]} can be provided as a child`);return}l[g]=u}),l}function Fi(e){return e}function le(...e){return e.reduce((r,s)=>({...r,...s||{}}),{})}const Dt=N.forwardRef(({className:e,children:r,style:s,isSelectionTogglable:a=!1,itemLength:l,itemPadding:u=0,items:h=[],layout:g="list",numSegments:m=1,orientation:S="vertical",selection:k,selectionMode:P="none",onActivateAt:O,onDeselectAt:j,onCustomEvent:L,onSelectAt:x,onSelectionChange:R,ItemComponent:$,...Q},X)=>{const G=Vi(k??[],h),T=Bi({itemLength:l,itemPadding:u,layout:g,numSegments:m,orientation:S}),I=U=>G.indexOf(U)>=0,E=U=>{I(U)?W(U):F(U)},F=U=>{if(I(U))return;let D;switch(P){case"multiple":{D=ee=>Lr([...ee.filter(ce=>ce!==U),U]);break}case"single":{D=ee=>[U];break}default:return}const z=G,te=D(G);re(z,te)},W=U=>{if(!I(U))return;const D=ee=>ee.filter(ce=>ce!==U),z=G,te=D(G);re(z,te)},Z=U=>{O?.(U),P!=="none"&&(a?E(U):F(U))},re=(U,D)=>{if(Ve(U,D))return;const z=U?.filter(ee=>D.indexOf(ee)===-1)??[],te=D.filter(ee=>U?.indexOf(ee)===-1);z.forEach(ee=>j?.(ee)),te.forEach(ee=>x?.(ee)),R?.(D)};N.useEffect(()=>{const U=G;let D;switch(P){case"multiple":D=G;break;case"single":D=G.slice(-1);break;default:D=[];break}re(U,D)},[P]);const q=Oe(r,{item:st});return b.jsx("div",{...Q,ref:X,"aria-multiselectable":P==="multiple",className:ae(e),role:g==="grid"?"grid":P==="none"?"list":"listbox",style:le(s,T.root),children:b.jsx(gt,{in:h,children:(U,D)=>{const z=g==="grid"?"gridcell":P==="none"?"listitem":"option",te=I(D),ee=le(T.item,{pointerEvents:a!==!0&&I(D)?"none":"auto",...D>=h.length-1?{}:{...g==="list"?{...S==="vertical"?{marginBottom:`${u}px`}:{marginRight:`${u}px`}}:{}}});return $?b.jsx($,{"aria-selected":te,className:ae({active:te}),index:D,isSelected:I(D),item:U,orientation:S,role:z,style:ee,onClick:()=>Z(D),onCustomEvent:(ce,B)=>L?.(D,ce,B)}):b.jsx(me,{"aria-selected":te,className:ae({active:te}),element:q.item??b.jsx(st,{}),role:z,selectionMode:P,style:ee,onActivateAt:O,onClick:()=>Z(D),children:`${U}`})}})})}),st=({children:e,selectionMode:r,onActivateAt:s,...a})=>s||r==="single"||r==="multiple"?b.jsx("button",{...a,children:e}):b.jsx("div",{...a,children:e});function Di(e,r){return!!(isNaN(e)||e>=r.length||e<0)}function Vi(e,r){return Lr(e).filter(s=>!Di(s,r))}function Lr(e){return e.sort((r,s)=>r-s)}function Bi({itemLength:e=NaN,itemPadding:r=0,layout:s="collection",numSegments:a=1,orientation:l="vertical"}){return{root:{counterReset:"item-counter",listStyle:"none",...s==="list"?{alignItems:"flex-start",display:"flex",flex:"0 0 auto",flexDirection:l==="horizontal"?"row":"column",justifyContent:"flex-start"}:{display:"grid",gap:`${r}px`,...l==="vertical"?{gridAutoRows:isNaN(e)?void 0:`${e}px`,gridTemplateColumns:`repeat(${a}, 1fr)`,gridAutoFlow:"row"}:{gridAutoColumns:isNaN(e)?void 0:`${e}px`,gridTemplateRows:`repeat(${a}, 1fr)`,gridAutoFlow:"column"}}},item:{counterIncrement:"item-counter",flex:"0 0 auto",...s==="list"?{...l==="vertical"?{width:"100%",height:isNaN(e)?void 0:`${e}px`}:{width:isNaN(e)?void 0:`${e}px`,height:"100%"}}:{}}}}process.env.NODE_ENV!=="production"&&(Dt.displayName="Collection",st.displayName="CollectionItem");const Fr=N.forwardRef(({children:e,style:r,autoCollapseSections:s=!1,expandedSectionIndices:a,orientation:l="vertical",sectionPadding:u=0,sections:h,selection:g,selectionMode:m="single",onActivateAt:S,onCollapseSectionAt:k,onDeselectAt:P,onExpandedSectionsChange:O,onExpandSectionAt:j,onHeaderCustomEvent:L,onItemCustomEvent:x,onSelectAt:R,onSelectionChange:$,HeaderComponent:Q,ItemComponent:X,...G},T)=>{const I=Xi(g??{},h),E=Yi(a??[],h),F=Ui({orientation:l}),W=h.map(()=>N.useRef(null)),Z=W.map(B=>jn(B)),re=(B,C)=>(I[C]?.indexOf(B)??-1)>=0,q=B=>E.indexOf(B)>=0,U=B=>{let C;q(B)?C=H=>H.filter(oe=>oe!==B):s?C=H=>[B]:C=H=>[...H.filter(oe=>oe!==B),B],te(E,C(E))},D=(B,C)=>{if(re(B,C))return;let H;switch(m){case"multiple":H=ie=>({...ie,[C]:Ht([...(ie[C]??[]).filter(fe=>fe!==B),B])});break;case"single":H=ie=>({[C]:[B]});break;default:return}const oe=H(I);ee(I,oe)},z=(B,C)=>{if(!re(B,C))return;const oe=(ie=>({...ie,[C]:(ie[C]??[]).filter(fe=>fe!==B)}))(I);ee(I,oe)},te=(B,C)=>{if(Ve(B,C))return;const H=B?.filter(ie=>C.indexOf(ie)===-1)??[],oe=C.filter(ie=>B?.indexOf(ie)===-1);H.forEach(ie=>k?.(ie)),oe.forEach(ie=>j?.(ie)),O?.(C)},ee=(B,C)=>{if(Ve(B,C))return;const H=h.length;let oe=[],ie=[];for(let fe=0;fe<H;fe++){const ve=B?.[fe]??[],Ee=C[fe]??[],Se=ve.filter(J=>Ee.indexOf(J)===-1),xe=Ee.filter(J=>ve?.indexOf(J)===-1);oe=[...oe,...Se.map(J=>[J,fe])],ie=[...ie,...xe.map(J=>[J,fe])]}oe.forEach(fe=>P?.(fe[0],fe[1])),ie.forEach(fe=>R?.(fe[0],fe[1])),$?.(C)},ce=Oe(e,{collapseIcon:Mn,expandIcon:An,header:Vt,item:Bt,section:zn});return b.jsx("div",{...G,ref:T,style:le(r,F.root),children:b.jsx(gt,{in:h,children:(B,C)=>{const{collectionPadding:H=0,items:oe=[],itemLength:ie=50,itemPadding:fe=0,isSelectionTogglable:ve,layout:Ee="list",maxVisible:Se=-1,numSegments:xe=1}=B,J=Ee==="list"?oe.length:Math.ceil(oe.length/xe),ze=Se<0?J:Math.min(J,Se),_e=ie*ze+fe*(ze-1),ke=!q(C),De=Z[C];return b.jsxs(me,{element:ce.section??b.jsx(zn,{}),style:le(F.section,l==="vertical"?{marginTop:C===0?"0px":`${u}px`,...De.height>0?{height:ke?`${De.height}px`:`${_e+De.height+H}px`}:{visibility:"hidden"}}:{marginLeft:C===0?"0px":`${u}px`,...De.width>0?{width:ke?`${De.width}px`:`${_e+De.width+H}px`}:{visibility:"hidden"}}),children:[b.jsx("div",{ref:W[C],style:le(F.headerContainer),children:Q?b.jsx(Q,{"aria-expanded":!ke,className:ae({collapsed:ke,expanded:!ke}),index:C,isCollapsed:ke,role:"button",section:B,style:le(F.header),onClick:()=>U(C),onCustomEvent:(Ae,He)=>L?.(C,Ae,He)}):b.jsxs(me,{"aria-expanded":!ke,className:ae({collapsed:ke,expanded:!ke}),element:ce.header??b.jsx(Vt,{}),role:"button",style:le(F.header),onClick:()=>U(C),children:[b.jsx("span",{dangerouslySetInnerHTML:{__html:B.label}}),ce.expandIcon&&b.jsx(me,{className:ae({collapsed:ke,expanded:!ke}),element:ke?ce.collapseIcon??ce.expandIcon:ce.expandIcon,style:le(ke?F.collapseIcon:F.expandIcon)})]})}),b.jsx("div",{role:"region",style:le({pointerEvents:ke?"none":"auto"},l==="vertical"?{width:"100%",height:`${_e}px`,marginTop:`${H}px`,overflowY:Se<0||Se>=J?"hidden":"scroll"}:{marginLeft:`${H}px`,overflowX:Se<0||Se>=J?"hidden":"scroll",width:`${_e}px`,height:"100%"}),children:b.jsx(Dt,{className:ae({collapsed:ke,expanded:!ke}),isSelectionTogglable:ve,ItemComponent:X,itemLength:ie,itemPadding:fe,items:oe,layout:Ee,numSegments:xe,orientation:l,selection:I[C]??[],selectionMode:m,style:le(l==="vertical"?{width:"100%"}:{height:"100%"}),onActivateAt:Ae=>S?.(Ae,C),onCustomEvent:(Ae,He,Ye)=>x?.(Ae,C,He,Ye),onDeselectAt:Ae=>z(Ae,C),onSelectAt:Ae=>D(Ae,C),children:!X&&(ce.item??b.jsx(Bt,{}))})})]})}})})}),Vt=({children:e,...r})=>b.jsx("button",{...r,children:e}),An=({children:e,...r})=>b.jsx("figure",{...r,children:e}),Mn=({children:e,...r})=>b.jsx("figure",{...r,children:e}),zn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Bt=st;function Dr(e,r){return e>=r.length||e<0}function Hi(e,r,s){if(Dr(r,s))return!0;const a=s[r].items??[];return e>=a.length||e<0}function Yi(e,r){return Ht(e).filter(s=>!Dr(s,r))}function Xi(e,r){const s={};for(const a in r){if(!Object.hasOwn(r,a))continue;const l=Ht([...e[a]??[]]);s[Number(a)]=Ht(l).filter(u=>!Hi(u,Number(a),r))}return s}function Ht(e){return e.sort((r,s)=>r-s)}function Ui({orientation:e="vertical"}){return{root:{alignItems:"center",boxSizing:"border-box",display:"flex",flex:"0 0 auto",justifyContent:"flex-start",padding:"0",...e==="vertical"?{flexDirection:"column",height:"auto"}:{flexDirection:"row",width:"auto"}},collapseIcon:{pointerEvents:"none",zIndex:1},expandIcon:{pointerEvents:"none",zIndex:1},section:{alignItems:"flex-start",display:"flex",flex:"0 0 auto",justifyContent:"flex-start",margin:"0",overflow:"hidden",padding:"0",...e==="vertical"?{flexDirection:"column",width:"100%"}:{flexDirection:"row",height:"100%"}},headerContainer:{flexShrink:"0",...e==="vertical"?{width:"100%"}:{height:"100%"}},header:{cursor:"pointer",margin:"0",...e==="vertical"?{width:"100%"}:{height:"100%"}}}}process.env.NODE_ENV!=="production"&&(Fr.displayName="Accordion",Vt.displayName="AccordionHeader",An.displayName="AccordionExpandIcon",Mn.displayName="AccordionCollapseIcon",Bt.displayName="AccordionItem");function Yt({count:e=1,children:r,render:s}){return b.jsx(b.Fragment,{children:[...Array(e)].map((a,l)=>b.jsx(N.Fragment,{children:s?.(l)??(typeof r=="function"?r(l):r)},`element-${l}`))})}process.env.NODE_ENV!=="production"&&(Yt.displayName="Repeat");function Gi(e){return e}const Ln=N.forwardRef(({children:e,className:r,isActive:s=!1,isTailHidden:a=!1,isSplit:l=!1,numberOfBars:u=3,...h},g)=>{const m=Oe(e,{bar:mt}),S={root:ae({active:s}),bar:ae({active:s})},k=Ki({isSplit:l,isActive:s,isTailHidden:a});return b.jsx("div",{...h,ref:g,className:ae(r,S.root),children:b.jsx(Yt,{count:l?2:1,children:P=>b.jsx("div",{"aria-hidden":!0,style:le(k.section,k[`section${P}`]),children:b.jsx(Yt,{count:u,children:O=>b.jsx(me,{"aria-hidden":!0,className:ae(S.bar),element:m.bar??b.jsx(mt,{}),style:(()=>{switch(u){case 2:return le(k.bar,k[`bar${P}${O===0?0:2}`]);case 3:default:return le(k.bar,k[`bar${P}${O}`])}})()})})})})})}),mt=({...e})=>b.jsx("span",{...e});function Ki({isActive:e=!1,isSplit:r=!1,isTailHidden:s=!1}){return{section:{height:"100%",position:"absolute",width:r?"50%":"100%"},section0:{left:"0",top:"0"},section1:{right:"0",top:"0"},bar:{margin:"0",padding:"0",position:"absolute",width:"100%"},bar00:{left:"0",top:e?"50%":"0",transform:e?"translate(0, -50%) rotate(45deg)":"translate(0, 0) rotate(0deg)",transformOrigin:r?"right center":"center"},bar01:{left:"0",top:"50%",transform:e?"translate(0, -50%) scale(0)":"translate(0, -50%) scale(1)",transformOrigin:r?"right center":"center"},bar02:{left:"0",top:e?"50%":"100%",transform:e?"translate(0, -50%) rotate(-45deg)":"translate(0, -100%) rotate(0deg)",transformOrigin:r?"right center":"center",width:e||r?"100%":`${s?"50%":"100%"}`},bar10:{left:"0",top:e?"50%":"0",transform:e?"translate(0, -50%) rotate(-45deg)":"translate(0, 0) rotate(0deg)",transformOrigin:"left center"},bar11:{left:"0",top:"50%",transform:e?"translate(0, -50%) scale(0)":"translate(0, -50%) scale(1)",transformOrigin:"left center"},bar12:{left:"0",top:e?"50%":"100%",transform:e?"translate(0, -50%) rotate(45deg)":"translate(0, -100%) rotate(0deg)",transformOrigin:"left center",width:s&&!e?"0":"100%"}}}process.env.NODE_ENV!=="production"&&(Ln.displayName="Burger",mt.displayName="BurgerBar");const Vr=N.forwardRef(({children:e,className:r,style:s,isActive:a=!1,isTailHidden:l=!1,isSplit:u=!1,numberOfBars:h=3,onActivate:g,onDeactivate:m,onToggle:S,...k},P)=>{const O=()=>{const x=!a;S?.(x),x?g?.():m?.()},j={root:ae({active:a})},L=Wi();return b.jsx("button",{...k,ref:P,"aria-expanded":a,className:ae(r,j.root),style:le(s,L.root),onClick:O,children:b.jsx(Ln,{isActive:a,isSplit:u,isTailHidden:l,numberOfBars:h,children:e})})}),Br=mt;function Wi(){return{root:{background:"transparent",border:"none",display:"block",outline:"none"}}}process.env.NODE_ENV!=="production"&&(Vr.displayName="BurgerButton",Br.displayName="BurgerButtonBar");function Hr(e){switch(!0){case Ji(e):{const{action:r,children:s,isNav:a,className:l,isDisabled:u,label:h,...g}=e;return b.jsx(In.NavLink,{...g,"aria-disabled":u,"aria-label":h,className:ae(l,{disabled:u}),to:r,children:s??h})}case Zi(e):{const{action:r,children:s,className:a,isDisabled:l,label:u,...h}=e;return b.jsx(In.Link,{...h,"aria-disabled":l,"aria-label":u,className:ae(a,{disabled:l}),to:r,children:s??u})}case Qi(e):{const{action:r,children:s,className:a,isDisabled:l,label:u,opensInNewTab:h,...g}=e;return b.jsx("a",{...g,"aria-disabled":l,"aria-label":u,className:ae(a,{disabled:l}),href:r,rel:h?"noopener,noreferrer":void 0,target:h?"_blank":void 0,children:s??u})}case $i(e):{const{action:r,children:s,className:a,isDisabled:l,label:u,type:h="button",...g}=e;return b.jsx("button",{...g,"aria-disabled":l,"aria-label":u,className:a,disabled:l,type:h,onClick:()=>r(),children:s??u})}default:return console.error("[etudes::Button] Unknown button type"),b.jsx(b.Fragment,{})}}function Ji(e){return!(typeof e.action!="string"||!e.action.startsWith("/")||!("isNav"in e)||!e.isNav)}function Zi(e){return!(typeof e.action!="string"||!e.action.startsWith("/")||"isNav"in e&&e.isNav)}function Qi(e){return!(typeof e.action!="string"||e.action.startsWith("/"))}function $i(e){return typeof e.action=="function"}process.env.NODE_ENV!=="production"&&(Hr.displayName="Button");function Yr(e,{isEnabled:r=!0,updatesCursor:s=!0,onDragStart:a,onDragMove:l,onDragEnd:u}){const h=N.useRef(void 0),g=N.useRef(void 0),m=Ne(a),S=Ne(l),k=Ne(u),P=N.useCallback(L=>{if(!h.current)return;const x=pe.make(L.clientX,L.clientY),R=pe.subtract(x,g.current??h.current);g.current=x,S.current?.(R,x,h.current)},[]),O=N.useCallback(L=>{const x=e.current;if(!x||!h.current)return;const R=pe.make(L.clientX,L.clientY),$=pe.subtract(g.current??h.current,R);k.current?.(R,$,h.current),h.current=void 0,g.current=void 0,x.removeEventListener("mousemove",P),x.removeEventListener("mouseup",O,{capture:!0}),x.removeEventListener("mouseleave",O),s&&(x.style.cursor="grab")},[s,P]),j=N.useCallback(L=>{const x=e.current;if(!x)return;L.preventDefault();const R=pe.make(L.clientX,L.clientY);h.current=R,g.current=R,x.addEventListener("mousemove",P),x.addEventListener("mouseup",O,{capture:!0}),x.addEventListener("mouseleave",O),s&&(x.style.cursor="grabbing"),m.current?.(R)},[s,P,O]);N.useLayoutEffect(()=>{const L=e.current;if(!L||!r||!s)return;const x=L.style.cursor;return L.style.cursor="grab",()=>{L.style.cursor=x}},[r,s]),N.useLayoutEffect(()=>{const L=e.current;if(!(!L||!r))return L.addEventListener("mousedown",j),()=>{L.removeEventListener("mousedown",j),L.removeEventListener("mousemove",P),L.removeEventListener("mouseup",O,{capture:!0}),L.removeEventListener("mouseleave",O)}},[r,P,O,j])}function Xr(e,{autoStarts:r=!0,shouldInvokeInitially:s=!1,onInterval:a}){const l=N.useRef(void 0),u=Ne(a),h=N.useCallback(()=>{clearInterval(l.current),l.current=void 0},[]),g=N.useCallback(()=>{h(),!(e<0)&&(s&&u.current(),l.current=setInterval(()=>{u.current()},e))},[e,s,h]);return N.useEffect(()=>(r&&e>0&&g(),h),[r,e,g,h]),{start:g,stop:h}}const Ur=N.forwardRef(({autoAdvanceInterval:e=0,index:r=0,isDragEnabled:s=!0,items:a=[],orientation:l="horizontal",tracksItemExposure:u=!1,onAutoAdvancePause:h,onAutoAdvanceResume:g,onIndexChange:m,ItemComponent:S,...k},P)=>{const O=N.useRef(void 0),j=N.useRef(null),L=N.useRef(void 0),x=N.useRef(void 0),R=N.useRef(void 0),$=1e3,[Q,X]=N.useState(Fn(j,l)),[G,T]=N.useState(!1),I=ts({scrollSnapEnabled:!G,orientation:l}),E=e>0,F=N.useCallback(z=>{m?.(z)},[m]),W=N.useCallback(z=>{L.current=pe.make(z.clientX,z.clientY),T(!0)},[]),Z=N.useCallback(z=>{const te=L.current,ee=x.current;if(!te||!ee)return;const ce=5,B=pe.subtract(te,ee);(Math.abs(B.x)>ce||Math.abs(B.y)>ce)&&z.stopPropagation(),L.current=void 0,x.current=void 0},[]),re=N.useCallback(z=>{x.current=pe.make(z.clientX,z.clientY),G&&T(!1)},[G]),q=N.useCallback(()=>{qi(j,r,l),clearTimeout(R.current),R.current=setTimeout(()=>{clearTimeout(R.current),R.current=void 0},$)},[j.current,r,l,$]),U=N.useCallback(()=>{const z=(r+a.length+1)%a.length;F(z)},[G,r,a.length,F]),D=N.useCallback(({x:z,y:te})=>{const ee=j.current;switch(l){case"horizontal":requestAnimationFrame(()=>{ee&&(ee.scrollLeft-=z*1.5)});break;case"vertical":requestAnimationFrame(()=>{ee&&(ee.scrollTop-=te*1.5)});break;default:console.error(`[etudes::Carousel] Unsupported orientation: ${l}`)}},[l,j.current]);return N.useEffect(()=>{const z=j.current;if(!z)return;const te=O.current===void 0,ee=O.current===r,ce=B=>{if(u&&X(Fn(j,l)),R.current!==void 0)return;const C=Math.round(l==="horizontal"?z.scrollLeft/z.clientWidth:z.scrollTop/z.clientHeight),H=Math.max(0,Math.min(a.length-1,C));H!==r&&(O.current=H,F(H))};return z.addEventListener("scroll",ce),u&&X(Fn(j,l)),ee||(O.current=r,te||(F(r),q())),()=>{z.removeEventListener("scroll",ce)}},[r,l,u]),N.useEffect(()=>{E&&(G?h?.():g?.())},[G,E]),Yr(j,{isEnabled:s&&a.length>1,onDragMove:D}),Xr(G||!E?-1:e,{onInterval:U}),b.jsx("div",{...k,ref:P,role:"region",onClick:z=>Z(z),onPointerCancel:z=>re(z),onPointerDown:z=>W(z),onPointerLeave:z=>re(z),onPointerUp:z=>re(z),children:b.jsx("div",{ref:j,style:le(I.viewport),children:b.jsx(gt,{in:a,children:({style:z,...te},ee)=>b.jsx("div",{style:le(I.itemContainer),children:b.jsx(S,{"aria-hidden":ee!==r,exposure:u?Q?.[ee]:void 0,style:le(z,I.item),...te})})})})})});function qi(e,r,s){const a=e?.current;if(!a)return;const l=s==="horizontal"?0:a.clientHeight*r,u=s==="horizontal"?a.clientWidth*r:0;a.scrollTop===l&&a.scrollLeft===u||a.scrollTo({top:l,left:u,behavior:"smooth"})}function Fn(e,r){const s=e?.current;if(!s)return;const a=[];for(let l=0;l<s.children.length;l++)a.push(es(l,e,r));return a}function es(e,r,s){const a=r?.current,l=a?.children[e];if(!l)return 0;const u=ge.intersecting(l,a);if(!u)return 0;switch(s){case"horizontal":return Math.max(0,Math.min(1,Math.round((u.width/a.clientWidth+Number.EPSILON)*1e3)/1e3));case"vertical":return Math.max(0,Math.min(1,Math.round((u.height/a.clientHeight+Number.EPSILON)*1e3)/1e3));default:return console.error(`[etudes::Carousel] Unsupported orientation: ${s}`),NaN}}function ts({scrollSnapEnabled:e=!1,orientation:r="horizontal"}){return{viewport:{alignItems:"center",display:"flex",height:"100%",userSelect:e?"auto":"none",justifyContent:"flex-start",scrollBehavior:e?"smooth":"auto",scrollSnapStop:e?"always":"unset",WebkitOverflowScrolling:"touch",width:"100%",...r==="horizontal"?{flexDirection:"row",overflowX:"scroll",overflowY:"hidden",scrollSnapType:e?"x mandatory":"none"}:{flexDirection:"column",overflowX:"hidden",overflowY:"scroll",scrollSnapType:e?"y mandatory":"none"}},itemContainer:{height:"100%",overflow:"hidden",scrollSnapAlign:"center",width:"100%",flex:"0 0 auto"},item:{height:"100%",width:"100%"}}}process.env.NODE_ENV!=="production"&&(Ur.displayName="Carousel");function Gr(e){const r=N.useRef(void 0);return N.useEffect(()=>{r.current=e},[e]),r.current}const Dn=N.forwardRef(({className:e,emptyValue:r="",isDisabled:s=!1,isRequired:a=!1,placeholder:l,value:u,formatter:h,onFocus:g,onUnfocus:m,onChange:S,...k},P)=>{const O=N.useCallback(j=>{const L=(h?.(j)??j)||r;S?.(L)},[S,h]);return b.jsx("input",{...k,ref:P,"aria-disabled":s,"aria-placeholder":l,"aria-required":a,className:ae(e,{disabled:s}),disabled:s,placeholder:l,required:a,type:"text",value:u||r,onBlur:({target:j})=>m?.(j.value),onChange:({target:j})=>O(j.value),onFocus:({target:j})=>g?.(j.value)})});process.env.NODE_ENV!=="production"&&(Dn.displayName="TextField");const Kr=N.forwardRef(({children:e,style:r,allowsInput:s=!0,max:a=NaN,min:l=NaN,quantity:u=0,onChange:h,...g},m)=>{const S=()=>{h?.(x(u-1))},k=()=>{h?.(x(u+1))},P=I=>{$(I)},O=I=>{const E=L(I);E!==u?h?.(E):$(j(E))},j=I=>I.toLocaleString(),L=I=>{const E=parseInt(I,10);return E.toString()!==I.replace(/^0+/,"")?u:x(E)},x=I=>{let E=I;return isNaN(l)||(E=Math.max(l,E)),isNaN(a)||(E=Math.min(a,E)),E},[R,$]=N.useState(j(u)),Q=Gr(u),X=!isNaN(a)&&u+1>a,G=!isNaN(l)&&u-1<l;N.useEffect(()=>{if(Q===void 0||Q===u)return;const I=x(u);$(j(I))},[u,l,a]);const T=Oe(e,{textField:Xt,addButton:Ut,subscribeButton:Gt});return b.jsxs("div",{...g,ref:m,style:le(r,Kt.root),children:[b.jsx(me,{className:ae({disabled:G}),element:T.subscribeButton??b.jsx(Gt,{}),style:le(Kt.subtract),onClick:()=>S()}),b.jsx(me,{element:T.textField??b.jsx(Xt,{}),isDisabled:!s,style:le(Kt.textField),value:R,onChange:P,onUnfocus:O}),b.jsx(me,{className:ae({disabled:X}),element:T.addButton??b.jsx(Ut,{}),style:le(Kt.add),onClick:()=>k()})]})}),Xt=({...e})=>b.jsx(Dn,{...e}),Ut=({children:e,...r})=>b.jsx("button",{...r,children:e}),Gt=({children:e,...r})=>b.jsx("button",{...r,children:e}),Kt={root:{alignItems:"stretch",display:"flex",flexDirection:"row",justifyContent:"stretch"},subtract:{flex:"0 0 auto"},add:{flex:"0 0 auto"},textField:{width:"100%"}};process.env.NODE_ENV!=="production"&&(Kr.displayName="Counter",Ut.displayName="CounterAddButton",Gt.displayName="CounterSubtractButton",Xt.displayName="CounterTextField");function Wr(){const[e,r]=N.useState(Pe.zero);return N.useLayoutEffect(()=>{const s=()=>{const a=ge.size(ge.fromViewport());r(a)};return window.addEventListener("resize",s),s(),()=>{window.removeEventListener("resize",s)}},[]),e}function Be(e){const[r,s]=N.useState(ge.zero),a=Wr();return Lt(e,{onResize:l=>{const u=ge.from(l);u&&s(u)}}),N.useLayoutEffect(()=>{const l=e.current,u=ge.from(l);u&&s(u)},[Pe.toString(a)]),r}function Jr({src:e,srcSet:r,sizes:s},{onLoadStart:a,onLoadComplete:l,onLoadError:u}={}){const h=N.useRef(void 0),g=Ne(a),m=Ne(l),S=Ne(u);N.useLayoutEffect(()=>{const k=O=>{const j=O.currentTarget;m.current?.(j)},P=O=>{const j=O.currentTarget;S.current?.(j)};return h.current=new Image,e&&(h.current.src=e),r&&(h.current.srcset=r),s&&(h.current.sizes=s),g.current?.(h.current),h.current.addEventListener("load",k),h.current.addEventListener("error",P),()=>{h.current?.removeEventListener("load",k),h.current?.removeEventListener("error",P),h.current=void 0}},[e,r,s])}function Vn({src:e,srcSet:r,sizes:s},{preservesSizeBetweenLoads:a=!0,onLoadStart:l,onLoadComplete:u,onLoadError:h}={}){const[g,m]=N.useState(),S=Ne(l),k=Ne(u),P=Ne(h),O=N.useCallback(x=>{a||m(void 0),S.current?.(x)},[a]),j=N.useCallback(x=>{m(ns(x)),k.current?.(x)},[]),L=N.useCallback(x=>{a||m(void 0),P.current?.(x)},[a]);return Jr({src:e,srcSet:r,sizes:s},{onLoadStart:O,onLoadComplete:j,onLoadError:L}),g}function ns(e){if(e&&typeof e.width=="number"&&typeof e.height=="number")return Pe.make(e.width,e.height)}const Bn=N.forwardRef(({alt:e,loadingMode:r="preload",sizes:s,src:a,srcSet:l,onLoadStart:u,onLoadComplete:h,onLoadError:g,onSizeChange:m,...S},k)=>{const P=l?.map(({pixelDensity:L,src:x,width:R})=>{if(s&&R===void 0){console.error("[etudes::Image] `width` must be specified if `sizes` is specified");return}if(R!==void 0&&L!==void 0){console.error("[etudes::Image] Only one of `width` or `pixelDensity` can be specified");return}let $=x;if(R!==void 0){const Q=Math.floor(R);if(!isFinite(Q)||String(Q)!==String(R)||Q<=0){console.error("[etudes::Image] The specified width must be a positive integer greater than 0");return}$+=` ${Q}w`}else if(L!==void 0){if(!isFinite(L)||L<=0){console.error("[etudes::Image] The specified pixel density must be a positive floating number than 0");return}$+=` ${L}x`}return $}).filter(Boolean).join(", "),O=s?.map(({mediaCondition:L,width:x},R)=>{const $=R===s.length-1;let Q=x;if($&&L){console.error("[etudes::Image] The last item in `sizes` must not have a `mediaCondition` specified");return}return L&&(Q=`${L} ${Q}`),Q}).filter(Boolean).join(", "),j=Vn({src:a,srcSet:P,sizes:O},{onLoadStart:u,onLoadComplete:h,onLoadError:g});return N.useEffect(()=>{m?.(j)},[j?.width,j?.height]),b.jsx("img",{...S,ref:k,alt:e,loading:r==="lazy"?"lazy":"eager",sizes:O,src:a,srcSet:P})});process.env.NODE_ENV!=="production"&&(Bn.displayName="Image");const Zr=N.forwardRef(({children:e,style:r,alt:s,aspectRatio:a=NaN,loadingMode:l,sizes:u,src:h,srcSet:g,onLoadStart:m,onLoadComplete:S,onLoadError:k,...P},O)=>{const j=E=>{$(E?E.width/E.height:NaN)},L=N.useRef(null),x=O??L,[R,$]=N.useState(NaN),Q=isNaN(a)?R:a,X=Be(x),G=X.width/X.height,T=Pe.make(G>1?Math.max(X.width,X.height*Q):Math.max(X.width,Math.max(X.height,X.width/Q)*Q),G>1?Math.max(X.height,Math.max(X.width,X.height*Q)/Q):Math.max(X.height,X.width/Q)),I=Oe(e,{content:Hn,viewport:Yn});return b.jsxs("div",{...P,ref:x,style:le(r,Xn.root),children:[b.jsx(Bn,{alt:s,sizes:u,src:h,srcSet:g,style:le(Xn.viewport,{height:`${T.height}px`,maxWidth:"unset",width:`${T.width}px`}),onLoadComplete:S,onLoadError:k,onLoadStart:m,onSizeChange:E=>j(E)}),I.viewport&&b.jsx(me,{element:I.viewport,style:le(Xn.viewport,{height:`${T.height}px`,pointerEvents:"none",width:`${T.width}px`})}),I.content]})}),Hn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Yn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Xn={root:{overflow:"hidden"},viewport:{fontSize:"0",left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"}};process.env.NODE_ENV!=="production"&&(Zr.displayName="CoverImage",Hn.displayName="CoverImageContent",Yn.displayName="CoverImageViewport");function Qr(e,{onLoadStart:r,onLoadComplete:s,onLoadError:a}={}){const l=Ne(r),u=Ne(s),h=Ne(a);N.useLayoutEffect(()=>{if(!e)return;const g=document.createElement("video"),m=()=>u.current?.(g),S=()=>h.current?.(g);return g.addEventListener("loadedmetadata",m),g.addEventListener("error",S),g.src=e,l.current?.(g),()=>{g.removeEventListener("loadedmetadata",m),g.removeEventListener("error",S),g.src=""}},[e])}function $r(e,{preservesSizeBetweenLoads:r=!0,onLoadStart:s,onLoadComplete:a,onLoadError:l}={}){const[u,h]=N.useState(),g=Ne(s),m=Ne(a),S=Ne(l),k=N.useCallback(j=>{r||h(void 0),g.current?.(j)},[r]),P=N.useCallback(j=>{h(rs(j)),m.current?.(j)},[]),O=N.useCallback(j=>{r||h(void 0),S.current?.(j)},[r]);return Qr(e,{onLoadStart:k,onLoadComplete:P,onLoadError:O}),u}function rs(e){if(e&&typeof e.videoWidth=="number"&&typeof e.videoHeight=="number")return Pe.make(e.videoWidth,e.videoHeight)}const Un=N.forwardRef(({autoLoop:e=!0,autoPlay:r=!0,hasControls:s=!1,isMuted:a=!0,playsInline:l=!0,posterSrc:u,src:h,onCanPlay:g,onEnd:m,onFullscreenChange:S,onLoadMetadata:k,onLoadMetadataComplete:P,onLoadMetadataError:O,onPause:j,onPlay:L,onSizeChange:x,onTimeUpdate:R,...$},Q)=>{const X=N.useRef(null),G=Q??X,T=$r(h,{onLoadStart:k,onLoadComplete:P,onLoadError:O});N.useEffect(()=>{if(!G.current)return;if(h.toLowerCase().endsWith(".m3u8")){const D=!!G.current.canPlayType("application/x-mpegURL"),z=typeof window<"u"&&typeof window.Hls<"u"?window.Hls:void 0;if(!D&&z?.isSupported()){const te=new z;te.loadSource(h),te.attachMedia(G.current)}}const U=D=>{const z=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;z!==void 0&&S?.(z)};return G.current.muted=a,G.current.load(),G.current.addEventListener("webkitfullscreenchange",U),G.current.addEventListener("mozfullscreenchange",U),G.current.addEventListener("fullscreenchange",U),()=>{q(),G.current?.removeEventListener("webkitfullscreenchange",U),G.current?.removeEventListener("mozfullscreenchange",U),G.current?.removeEventListener("fullscreenchange",U)}},[h]),N.useEffect(()=>{x?.(T)},[T]);const I=U=>{const D=U.currentTarget;r&&D.paused&&re(),g?.()},E=U=>{L?.()},F=U=>{j?.()},W=U=>{m?.()},Z=U=>{const D=U.currentTarget;R?.(D.currentTime,D.duration)},re=()=>{G.current&&G.current.play()},q=()=>{G.current&&G.current.pause()};return b.jsx("video",{...$,ref:G,autoPlay:r,controls:s,loop:e,muted:a,playsInline:l,poster:u,onCanPlay:I,onEnded:W,onPause:F,onPlay:E,onTimeUpdate:Z,children:b.jsx("source",{src:h})})});process.env.NODE_ENV!=="production"&&(Un.displayName="Video");const qr=N.forwardRef(({className:e,children:r,style:s,aspectRatio:a=NaN,autoLoop:l,autoPlay:u,hasControls:h,isMuted:g,playsInline:m,posterSrc:S,src:k,onCanPlay:P,onEnd:O,onFullscreenChange:j,onLoadMetadata:L,onLoadMetadataComplete:x,onLoadMetadataError:R,onPause:$,onPlay:Q,onSizeChange:X,...G},T)=>{const I=z=>{Z(z?z.width/z.height:NaN),X?.(z)},E=T??N.useRef(null),F=Be(E),[W,Z]=N.useState(NaN),re=isNaN(a)?W:a,q=F.width/F.height,U=Pe.make(q>1?Math.max(F.width,F.height*re):Math.max(F.width,Math.max(F.height,F.width/re)*re),q>1?Math.max(F.height,Math.max(F.width,F.height*re)/re):Math.max(F.height,F.width/re)),D=Oe(r,{content:Gn,viewport:Kn});return b.jsxs("div",{...G,ref:E,className:e,style:le(s,Wn.root),children:[b.jsx(Un,{autoLoop:l,autoPlay:u,hasControls:h,isMuted:g,playsInline:m,posterSrc:S,src:k,style:le(Wn.viewport,{width:`${U.width}px`,height:`${U.height}px`,maxWidth:"unset"}),onCanPlay:P,onEnd:O,onFullscreenChange:j,onLoadMetadata:L,onLoadMetadataComplete:x,onLoadMetadataError:R,onPause:$,onPlay:Q,onSizeChange:z=>I(z)}),D.viewport&&b.jsx(me,{element:D.viewport,style:le(Wn.viewport,{height:`${U.height}px`,pointerEvents:"none",width:`${U.width}px`})}),D.content]})}),Gn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Kn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Wn={root:{overflow:"hidden"},viewport:{fontSize:"0",left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"}};process.env.NODE_ENV!=="production"&&(qr.displayName="CoverVideo",Gn.displayName="CoverVideoContent",Kn.displayName="CoverVideoViewport");const eo=N.forwardRef(({children:e,style:r,angle:s=0,knobLength:a=30,knobThickness:l=10,radius:u=50,trackGap:h=0,trackThickness:g=2,...m},S)=>{const k=u*2,P=Math.max(0,Math.min(360,a)),O=Oe(e,{track:Wt,knob:Jt}),j=is({angle:s,diameter:k});return b.jsxs("div",{...m,ref:S,style:le(r,j.root),children:[b.jsx("div",{style:j.trackContainer,children:b.jsx("svg",{height:k,style:j.svgContainer,viewBox:`0 0 ${k} ${k}`,width:k,children:b.jsx(me,{cx:u,cy:u,element:O.track??b.jsx(Wt,{}),fill:"none",r:u-g/2,strokeDasharray:h,strokeWidth:g})})}),b.jsx("div",{style:le(j.knobContainer),children:b.jsx("svg",{style:j.svgContainer,viewBox:`0 0 ${k} ${k}`,xmlns:"http://www.w3.org/2000/svg",children:b.jsx(me,{d:os(u,u,u-l/2-(g-l)/2,-P/2,P/2),element:O.knob??b.jsx(Jt,{}),fill:"none",strokeWidth:l})})})]})}),Wt=({...e})=>b.jsx("circle",{...e}),Jt=({...e})=>b.jsx("path",{...e});function to(e,r,s,a){const l=(a-90)*Math.PI/180;return{x:e+s*Math.cos(l),y:r+s*Math.sin(l)}}function os(e,r,s,a,l){const u=to(e,r,s,l),h=to(e,r,s,a),g=l-a<=180?"0":"1";return["M",u.x,u.y,"A",s,s,0,g,0,h.x,h.y].join(" ")}function is({diameter:e=0,angle:r=0}){return{root:{height:`${e}px`,width:`${e}px`},knobContainer:{backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"100%",height:"100%",left:"0",position:"absolute",top:"0",transformOrigin:"center",width:"100%",transform:`rotate(${(r+360)%360}deg)`},trackContainer:{height:"100%",left:"0",position:"absolute",top:"0",transformOrigin:"center",width:"100%"},svgContainer:{overflow:"visible",position:"absolute",right:"0",top:"0"}}}process.env.NODE_ENV!=="production"&&(eo.displayName="Dial",Wt.displayName="DialTrack",Jt.displayName="DialKnob");const no=N.forwardRef(({children:e,className:r,style:s,collapsesOnSelect:a=!0,collectionPadding:l=0,isCollapsed:u,isInverted:h=!1,label:g,layout:m="list",isSelectionTogglable:S=!1,itemLength:k,itemPadding:P=0,items:O=[],maxVisibleItems:j=-1,numSegments:L=1,orientation:x="vertical",selection:R=[],selectionMode:$="single",onActivateAt:Q,onCollapse:X,onDeselectAt:G,onExpand:T,onSelectAt:I,onSelectionChange:E,onToggleCustomEvent:F,ItemComponent:W,ToggleComponent:Z,...re},q)=>{const U=N.useRef(null),D=Be(U),z=O.length,te=ls(O,j,L,m),ee=k??(x==="vertical"?D.height:D.width),ce=ee*te+P*(te-1),B=as(R,O),[C,H]=N.useState(u??!0),oe=us({isCollapsed:C,collectionPadding:l,isInverted:h,maxVisibleItems:j,menuLength:ce,numItems:z,orientation:x}),ie=Oe(e,{collapseIcon:Jn,collection:Zt,expandIcon:Zn,item:Qt,toggle:$t}),fe=()=>{C&&(H(!1),T?.())},ve=()=>{C||(H(!0),X?.())},Ee=()=>{C?fe():ve()},Se=xe=>{I?.(xe),$==="single"&&a&&ve()};return N.useEffect(()=>{u!==void 0&&H(u)},[u]),N.useEffect(()=>{const xe=J=>{if(C||!(J.target instanceof Node))return;let ze=!0,_e=J.target;for(;_e;){if(_e===U.current){ze=!1;break}if(!_e.parentNode)break;_e=_e.parentNode}ze&&ve()};return window.addEventListener("click",xe),()=>{window.removeEventListener("click",xe)}},[C]),b.jsx("div",{...re,ref:q,className:ae(r,{collapsed:C,expanded:!C}),style:le(s,oe.root),children:b.jsxs("div",{ref:U,style:le(oe.body),children:[Z?b.jsx(Z,{"aria-expanded":!C,"aria-haspopup":"listbox",className:ae({collapsed:C,expanded:!C}),style:le(oe.toggle),onClick:Ee,onCustomEvent:(xe,J)=>F?.(xe,J)}):b.jsxs(me,{"aria-expanded":!C,"aria-haspopup":"listbox",className:ae({collapsed:C,expanded:!C}),element:ie.toggle??b.jsx($t,{}),style:le(oe.toggle),onClick:Ee,children:[b.jsx("span",{dangerouslySetInnerHTML:{__html:g?.(B)??(B.length>0?B.map(xe=>O[xe]).join(", "):"")}}),ie.expandIcon&&b.jsx(me,{className:ae({collapsed:C,expanded:!C}),element:C?ie.collapseIcon??ie.expandIcon:ie.expandIcon,style:le(C?oe.collapseIcon:oe.expandIcon)})]}),b.jsx(me,{element:ie.collection??b.jsx(Zt,{}),isSelectionTogglable:S,ItemComponent:W,itemLength:ee,itemPadding:P,items:O,layout:m,numSegments:L,orientation:x,selection:B,selectionMode:$,style:le(oe.collection),onActivateAt:Q,onDeselectAt:G,onSelectAt:Se,onSelectionChange:E,children:!W&&(ie.item??b.jsx(Qt,{}))})]})})}),Zt=Dt,Qt=st,$t=({children:e,...r})=>b.jsx("button",{...r,children:e}),Jn=({children:e,...r})=>b.jsx("figure",{...r,"aria-hidden":!0,children:e}),Zn=({children:e,...r})=>b.jsx("figure",{...r,"aria-hidden":!0,children:e});function ss(e,r){return!!(isNaN(e)||e>=r.length||e<0)}function as(e,r){return cs(e).filter(s=>!ss(s,r))}function cs(e){return e.sort((r,s)=>r-s)}function ls(e,r,s,a){const l=e.length;switch(a){case"grid":{const u=s<1?l:Math.ceil(l/s);return r<0?u:Math.min(u,r)}default:return r<0?l:Math.min(l,r)}}function us({isCollapsed:e=!0,isInverted:r=!1,collectionPadding:s=0,maxVisibleItems:a=0,menuLength:l=NaN,numItems:u=0,orientation:h="vertical"}){return{root:{alignItems:"center",display:"flex",justifyContent:"flex-start",overflow:"visible",...h==="vertical"?{flexDirection:r?"column-reverse":"column"}:{flexDirection:r?"row-reverse":"row"}},body:{height:"100%",position:"relative",width:"100%"},toggle:{height:"100%",left:"0",margin:"0",position:"absolute",top:"0",width:"100%",zIndex:"1"},collection:{position:"absolute",...h==="vertical"?{width:"100%",height:e?"0px":`${l}px`,overflowY:a!==-1&&a<u?"scroll":"hidden",...r?{marginBottom:`${s}px`,bottom:"100%"}:{top:"100%",marginTop:`${s}px`}}:{width:e?"0px":`${l}px`,height:"100%",overflowX:a!==-1&&a<u?"scroll":"hidden",...r?{marginRight:`${s}px`,right:"100%"}:{left:"100%",marginLeft:`${s}px`}}},expandIcon:{pointerEvents:"none",zIndex:1},collapseIcon:{pointerEvents:"none",zIndex:1}}}process.env.NODE_ENV!=="production"&&(no.displayName="Dropdown",Zt.displayName="DropdownCollection",Jn.displayName="DropdownCollapseIcon",Zn.displayName="DropdownExpandIcon",Qt.displayName="DropdownItem",$t.displayName="DropdownToggle");const ro=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",fs=ro+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ds="["+ro+"]["+fs+"]*",hs=new RegExp("^"+ds+"$");function oo(e,r){const s=[];let a=r.exec(e);for(;a;){const l=[];l.startIndex=r.lastIndex-a[0].length;const u=a.length;for(let h=0;h<u;h++)l.push(a[h]);s.push(l),a=r.exec(e)}return s}const Qn=function(e){const r=hs.exec(e);return!(r===null||typeof r>"u")};function ps(e){return typeof e<"u"}const gs={allowBooleanAttributes:!1,unpairedTags:[]};function ms(e,r){r=Object.assign({},gs,r);const s=[];let a=!1,l=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let u=0;u<e.length;u++)if(e[u]==="<"&&e[u+1]==="?"){if(u+=2,u=so(e,u),u.err)return u}else if(e[u]==="<"){let h=u;if(u++,e[u]==="!"){u=ao(e,u);continue}else{let g=!1;e[u]==="/"&&(g=!0,u++);let m="";for(;u<e.length&&e[u]!==">"&&e[u]!==" "&&e[u]!==" "&&e[u]!==`
22
+ <%s key={someKey} {...props} />`,ie,xe,J,xe),B[xe+ie]=!0)}if(xe=null,oe!==void 0&&(s(oe),xe=""+oe),h(H)&&(s(H.key),xe=""+H.key),"key"in H){oe={};for(var ze in H)ze!=="key"&&(oe[ze]=H[ze])}else oe=H;return xe&&g(oe,typeof C=="function"?C.displayName||C.name||"Unknown":C),S(C,xe,ve,fe,l(),oe,Ee,Se)}function P(C){typeof C=="object"&&C!==null&&C.$$typeof===j&&C._store&&(C._store.validated=1)}var O=N,j=Symbol.for("react.transitional.element"),L=Symbol.for("react.portal"),x=Symbol.for("react.fragment"),R=Symbol.for("react.strict_mode"),$=Symbol.for("react.profiler"),Q=Symbol.for("react.consumer"),X=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),W=Symbol.for("react.activity"),Z=Symbol.for("react.client.reference"),re=O.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q=Object.prototype.hasOwnProperty,U=Array.isArray,D=console.createTask?console.createTask:function(){return null};O={"react-stack-bottom-frame":function(C){return C()}};var z,te={},ee=O["react-stack-bottom-frame"].bind(O,u)(),ce=D(a(u)),B={};ht.Fragment=x,ht.jsx=function(C,H,oe,ie,fe){var ve=1e4>re.recentlyCreatedOwnerStacks++;return k(C,H,oe,!1,ie,fe,ve?Error("react-stack-top-frame"):ee,ve?D(a(C)):ce)},ht.jsxs=function(C,H,oe,ie,fe){var ve=1e4>re.recentlyCreatedOwnerStacks++;return k(C,H,oe,!0,ie,fe,ve?Error("react-stack-top-frame"):ee,ve?D(a(C)):ce)}}()),ht}var Ar;function Ai(){return Ar||(Ar=1,process.env.NODE_ENV==="production"?zt.exports=Ri():zt.exports=ji()),zt.exports}var b=Ai();function Mr(e){var r,s,a="";if(typeof e=="string"||typeof e=="number")a+=e;else if(typeof e=="object")if(Array.isArray(e)){var l=e.length;for(r=0;r<l;r++)e[r]&&(s=Mr(e[r]))&&(a&&(a+=" "),a+=s)}else for(s in e)e[s]&&(a&&(a+=" "),a+=s);return a}function ae(){for(var e,r,s=0,a="",l=arguments.length;s<l;s++)(e=arguments[s])&&(r=Mr(e))&&(a&&(a+=" "),a+=r);return a}var Rn,zr;function Mi(){return zr||(zr=1,Rn=function e(r,s){if(r===s)return!0;if(r&&s&&typeof r=="object"&&typeof s=="object"){if(r.constructor!==s.constructor)return!1;var a,l,u;if(Array.isArray(r)){if(a=r.length,a!=s.length)return!1;for(l=a;l--!==0;)if(!e(r[l],s[l]))return!1;return!0}if(r.constructor===RegExp)return r.source===s.source&&r.flags===s.flags;if(r.valueOf!==Object.prototype.valueOf)return r.valueOf()===s.valueOf();if(r.toString!==Object.prototype.toString)return r.toString()===s.toString();if(u=Object.keys(r),a=u.length,a!==Object.keys(s).length)return!1;for(l=a;l--!==0;)if(!Object.prototype.hasOwnProperty.call(s,u[l]))return!1;for(l=a;l--!==0;){var h=u[l];if(!(h==="_owner"&&r.$$typeof)&&!e(r[h],s[h]))return!1}return!0}return r!==r&&s!==s}),Rn}var zi=Mi();const Ve=Ir(zi);var pe;(e=>{e.zero=r();function r(x=0,R=0){if(typeof x=="number")return{x,y:R};if(!O(x))throw Error("Invalid parameters passed to constructor");return x instanceof Array?{x:x[0],y:x[1]}:{x:x.x,y:x.y}}e.make=r;function s(x,R={}){return r({x:typeof R.x=="number"?R.x:x.x,y:typeof R.y=="number"?R.y:x.y})}e.clone=s;function a(x,R){return r({x:x.x+R.x,y:x.y+R.y})}e.add=a;function l(x,R){return r({x:x.x-R.x,y:x.y-R.y})}e.subtract=l;function u(x,R){return r({x:x.x*R.x,y:x.y*R.y})}e.multiply=u;function h(x,R){return r({x:x.x/R.x,y:x.y/R.y})}e.divide=h;function g(x){return r({x:x.y,y:x.x})}e.invert=g;function m(x,R){return!(x.x!==R.x||x.y!==R.y)}e.isEqual=m;function S(x){return`Point(x=${x.x}, y=${x.y})`}e.toString=S;function k(x){return Object.freeze({x:x.x,y:x.y})}e.toJSON=k;function P(x){return[x.x,x.y]}e.toArray=P;function O(x){return x instanceof Array?!(x.length!==2||typeof x[0]!="number"||typeof x[1]!="number"):typeof x=="object"?!(typeof x.x!="number"||typeof x.y!="number"):!1}e.isValidDescriptor=O;function j(x){return typeof x=="object"&&typeof x.x=="number"&&typeof x.y=="number"}e.isPoint=j;function L(x){return x.x===0&&x.y===0}e.isZero=L})(pe||(pe={}));function Li(e,r){try{const s=pe.isValidDescriptor(e)&&pe.make(e),a=pe.isValidDescriptor(r)&&pe.make(r);if(s&&!a){const l=r instanceof Array?r:[r],u=l.length;for(let h=0;h<u;h++){const g=ge.from(l[h]);if(!g)continue;const m=s.x>=g.left&&s.x<=g.right,S=s.y>=g.top&&s.y<=g.bottom;if(m&&S)return!0}return!1}else if(!s&&a){const l=e instanceof Array?e:[e],u=l.length;for(let h=0;h<u;h++){const g=ge.from(l[h]);if(!g)continue;const m=a.x>=g.left&&a.x<=g.right,S=a.y>=g.top&&a.y<=g.bottom;if(m&&S)return!0}return!1}else{if(s&&a)return pe.isEqual(s,a);{const l=[...e instanceof Array?e:[e],...r instanceof Array?r:[r]],u=ge.intersecting.apply(null,l);return u?u.width*u.height!==0:!1}}}catch(s){return console.error(s),!1}}var Pe;(e=>{e.zero=r();function r(x=0,R=0){if(typeof x=="number")return{width:x,height:R};if(!O(x))throw Error("Invalid parameters passed to constructor");return x instanceof Array?{width:x[0],height:x[1]}:{width:x.width,height:x.height}}e.make=r;function s(x,R={}){return r({width:typeof R.width=="number"?R.width:x.width,height:typeof R.height=="number"?R.height:x.height})}e.clone=s;function a(x,R){return r({width:x.width+R.width,height:x.height+R.height})}e.add=a;function l(x,R){return r({width:x.width-R.width,height:x.height-R.height})}e.subtract=l;function u(x,R){return r({width:x.width*R.width,height:x.height*R.height})}e.multiply=u;function h(x,R){return r({width:x.width/R.width,height:x.height/R.height})}e.divide=h;function g(x){return r({width:x.height,height:x.width})}e.invert=g;function m(x,R){return!(x.width!==R.width||x.height!==R.height)}e.isEqual=m;function S(x){return`Size(width=${x.width}, height=${x.height})`}e.toString=S;function k(x){return Object.freeze({width:x.width,height:x.height})}e.toJSON=k;function P(x){return[x.width,x.height]}e.toArray=P;function O(x){return x instanceof Array?!(x.length!==2||typeof x[0]!="number"||typeof x[1]!="number"):typeof x=="object"?!(typeof x.width!="number"||typeof x.height!="number"):!1}e.isValidDescriptor=O;function j(x){return typeof x=="object"&&typeof x.width=="number"&&typeof x.height=="number"}e.isSize=j;function L(x){return x.width===0&&x.height===0}e.isZero=L})(Pe||(Pe={}));var ge;(e=>{e.zero=r();function r(T=0,I=0,E=0,F=0){if(typeof T=="number"&&typeof I=="number"){const W=T,Z=I;return{top:Z,right:W+E,bottom:Z+F,left:W,width:E,height:F}}else if(pe.isPoint(T)&&Pe.isSize(I)){const W=T,Z=I;return{top:W.y,right:W.x+Z.width,bottom:W.y+Z.height,left:W.x,width:Z.width,height:Z.height}}else{const W=T;if(!Q(W))throw Error("Invalid parameters passed to constructor");return{top:W.y,right:W.x+W.width,bottom:W.y+W.height,left:W.x,width:W.width,height:W.height}}}e.make=r;function s(T){return pe.make({x:(T.right-T.left)/2+T.left,y:(T.bottom-T.top)/2+T.top})}e.center=s;function a(T){return Pe.make({width:T.width,height:T.height})}e.size=a;function l(T,I={}){try{if(T==null)return;if(X(T))return T;if(pt(T))return l(document.documentElement||document.body.parentNode||document.body,I);const E=T instanceof Array?T:[T],F=E.length,W=I.reference||window,Z=u(),re=pt(W)?Z:l(I.reference);if(!Z||!re)return;let q;for(let U=0;U<F;U++){const D=E[U],z=D.getBoundingClientRect(),te=r({x:z.left+Z.left-(pt(W)?0:re.left),y:z.top+Z.top-(pt(W)?0:re.top),width:I.overflow?D.scrollWidth:D instanceof HTMLElement?D.offsetWidth:z.width,height:I.overflow?D.scrollHeight:D instanceof HTMLElement?D.offsetHeight:z.height});q=q?O(q,te):te}return q}catch(E){console.error(E);return}}e.from=l;function u(){const T=Math.max(document.documentElement.clientWidth,window.innerWidth||0),I=Math.max(document.documentElement.clientHeight,window.innerHeight||0),E=window.pageXOffset!==void 0?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,F=window.pageYOffset!==void 0?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;return r({x:E,y:F,width:T,height:I})}e.fromViewport=u;function h(T,I={}){if(T)return pt(T)?l(Array.from(document.body.children)):l(Array.from(T.children),{overflow:I.overflow,reference:I.reference||T})}e.fromChildrenOf=h;function g(T,I,E={}){if(!I)return;const F=Array.from(I.children);return T<=0?r():T>=F.length?l(F,{reference:E.reference,overflow:!1}):(F.splice(T),l(F,{reference:E.reference||I,overflow:!1}))}e.fromChildrenBefore=g;function m(T,I,E={}){if(!I)return;const F=Array.from(I.children);return T<0?l(F,{reference:E.reference,overflow:!1}):T>=F.length-1?r():(F.splice(0,F.length-T-1),l(F,{reference:E.reference||I,overflow:!1}))}e.fromChildrenAfter=m;function S(T,I,E={}){if(!I)return;const F=I.children[T];return l(F,{overflow:E.overflow,reference:E.reference||I})}e.fromChildAt=S;function k(...T){try{const I=T.length,E={};let F,W;for(let Z=0;Z<I;Z++){if(F||(F=l(T[Z])),Z===0&&Z+1===I)W=u();else if(Z+1<I)W=l(T[Z+1]);else break;!F||!W||(E.width=Math.max(0,Math.min(F.right,W.right)-Math.max(F.left,W.left)),E.height=Math.max(0,Math.min(F.bottom,W.bottom)-Math.max(F.top,W.top)),E.y=Math.max(F.top,W.top),E.x=Math.max(F.left,W.left),E.width*E.height===0&&(E.width=0,E.height=0,E.y=NaN,E.x=NaN),F=r(E))}return r(E)}catch(I){console.error(I);return}}e.intersecting=k;function P(T,I={}){return r({x:typeof I.x=="number"?I.x:T.left,y:typeof I.y=="number"?I.y:T.top,width:typeof I.width=="number"?I.width:T.width,height:typeof I.height=="number"?I.height:T.height})}e.clone=P;function O(T,I){return r({x:Math.min(T.left,I.left),y:Math.min(T.top,I.top),width:Math.max(T.right,I.right)-Math.min(T.left,I.left),height:Math.max(T.bottom,I.bottom)-Math.min(T.top,I.top)})}e.concat=O;function j(T){return r({x:T.left,y:T.top,width:T.height,height:T.width})}e.invert=j;function L(T,I){return!(T.top!==I.top||T.right!==I.right||T.bottom!==I.bottom||T.left!==I.left||T.width!==I.width||T.height!==I.height)}e.isEqual=L;function x(T,I){return Li(I,T)}e.contains=x;function R(T){return`Rect(top=${T.top}, right=${T.right}, bottom=${T.bottom}, left=${T.left}, width=${T.width}, height=${T.height})`}e.toString=R;function $(T){return Object.freeze({top:T.top,right:T.right,bottom:T.bottom,left:T.left,width:T.width,height:T.height})}e.toJSON=$;function Q(T){return!(typeof T.x!="number"||typeof T.y!="number"||typeof T.width!="number"||typeof T.height!="number")}e.isValidDescriptor=Q;function X(T){return typeof T=="object"&&typeof T.top=="number"&&typeof T.right=="number"&&typeof T.bottom=="number"&&typeof T.left=="number"&&typeof T.width=="number"&&typeof T.height=="number"}e.isRect=X;function G(T){return T.top===0&&T.right===0&&T.bottom===0&&T.left===0&&T.width===0&&T.height===0}e.isZero=G})(ge||(ge={}));function pt(e){return e===window}function Ne(e){const r=N.useRef(e);return N.useEffect(()=>{r.current=e},[e]),r}function Lt(e,{onResize:r}){const s=Ne(r);N.useLayoutEffect(()=>{const a=e.current;if(!a)return;const l=new ResizeObserver(()=>{s.current?.(a)});return l.observe(a),()=>{l.disconnect()}},[e.current])}function jn(e){const[r,s]=N.useState(ge.zero);return Lt(e,{onResize:a=>{const l=ge.from(a);l&&s(l)}}),ge.size(r)}function gt({in:e,children:r,render:s}){if(e==null)return b.jsx(b.Fragment,{});if(!(e instanceof Array))throw TypeError(`Provided list <${e}> is not an array`);return b.jsx(b.Fragment,{children:e.map((a,l)=>b.jsx(N.Fragment,{children:s?.(a,l)??(typeof r=="function"?r(a,l):r)},`item-${l}`))})}process.env.NODE_ENV!=="production"&&(gt.displayName="Each");function Ft(e,r={},...s){const{className:a,style:l,...u}=r,{className:h,style:g,...m}=e.props;return N.cloneElement(e,{className:`${h??""} ${a??""}`.split(" ").filter(Boolean).join(" ")||void 0,style:{...g??{},...l??{}},...m,...u},...s)}function me({children:e,element:r,...s}){return Ft(r,s,...e?Array.isArray(e)?e:[e]:[])}process.env.NODE_ENV!=="production"&&(me.displayName="Styled");function Oe(e,r={}){const s=Object.keys(r),a=Object.values(r),l={};return N.Children.forEach(e,u=>{if(u==null)return;if(!N.isValidElement(u)){console.error("[etudes::asComponentDict] Invalid child detected");return}const h=a.indexOf(u.type);if(h<0){console.error(`[etudes::asComponentDict] Unsupported child, only the following children are allowed: ${a.map(m=>m.displayName??m.name).join(", ")}`);return}const g=s[h];if(l[g]){console.error(`[etudes::asComponentDict] Only one ${a[h]} can be provided as a child`);return}l[g]=u}),l}function Fi(e){return e}function le(...e){return e.reduce((r,s)=>({...r,...s||{}}),{})}const Dt=N.forwardRef(({className:e,children:r,style:s,isSelectionTogglable:a=!1,itemLength:l,itemPadding:u=0,items:h=[],layout:g="list",numSegments:m=1,orientation:S="vertical",selection:k,selectionMode:P="none",onActivateAt:O,onDeselectAt:j,onCustomEvent:L,onSelectAt:x,onSelectionChange:R,ItemComponent:$,...Q},X)=>{const G=Vi(k??[],h),T=Bi({itemLength:l,itemPadding:u,layout:g,numSegments:m,orientation:S}),I=U=>G.indexOf(U)>=0,E=U=>{I(U)?W(U):F(U)},F=U=>{if(I(U))return;let D;switch(P){case"multiple":{D=ee=>Lr([...ee.filter(ce=>ce!==U),U]);break}case"single":{D=ee=>[U];break}default:return}const z=G,te=D(G);re(z,te)},W=U=>{if(!I(U))return;const D=ee=>ee.filter(ce=>ce!==U),z=G,te=D(G);re(z,te)},Z=U=>{O?.(U),P!=="none"&&(a?E(U):F(U))},re=(U,D)=>{if(Ve(U,D))return;const z=U?.filter(ee=>D.indexOf(ee)===-1)??[],te=D.filter(ee=>U?.indexOf(ee)===-1);z.forEach(ee=>j?.(ee)),te.forEach(ee=>x?.(ee)),R?.(D)};N.useEffect(()=>{const U=G;let D;switch(P){case"multiple":D=G;break;case"single":D=G.slice(-1);break;default:D=[];break}re(U,D)},[P]);const q=Oe(r,{item:st});return b.jsx("div",{...Q,ref:X,"aria-multiselectable":P==="multiple",className:ae(e),role:g==="grid"?"grid":P==="none"?"list":"listbox",style:le(s,T.root),children:b.jsx(gt,{in:h,children:(U,D)=>{const z=g==="grid"?"gridcell":P==="none"?"listitem":"option",te=I(D),ee=le(T.item,{pointerEvents:a!==!0&&I(D)?"none":"auto",...D>=h.length-1?{}:{...g==="list"?{...S==="vertical"?{marginBottom:`${u}px`}:{marginRight:`${u}px`}}:{}}});return $?b.jsx($,{"aria-selected":te,className:ae({active:te}),index:D,isSelected:I(D),item:U,orientation:S,role:z,style:ee,onClick:()=>Z(D),onCustomEvent:(ce,B)=>L?.(D,ce,B)}):b.jsx(me,{"aria-selected":te,className:ae({active:te}),element:q.item??b.jsx(st,{}),role:z,selectionMode:P,style:ee,onActivateAt:O,onClick:()=>Z(D),children:`${U}`})}})})}),st=({children:e,selectionMode:r,onActivateAt:s,...a})=>s||r==="single"||r==="multiple"?b.jsx("button",{...a,children:e}):b.jsx("div",{...a,children:e});function Di(e,r){return!!(isNaN(e)||e>=r.length||e<0)}function Vi(e,r){return Lr(e).filter(s=>!Di(s,r))}function Lr(e){return e.sort((r,s)=>r-s)}function Bi({itemLength:e=NaN,itemPadding:r=0,layout:s="collection",numSegments:a=1,orientation:l="vertical"}){return{root:{counterReset:"item-counter",listStyle:"none",...s==="list"?{alignItems:"flex-start",display:"flex",flex:"0 0 auto",flexDirection:l==="horizontal"?"row":"column",justifyContent:"flex-start"}:{display:"grid",gap:`${r}px`,...l==="vertical"?{gridAutoRows:isNaN(e)?void 0:`${e}px`,gridTemplateColumns:`repeat(${a}, 1fr)`,gridAutoFlow:"row"}:{gridAutoColumns:isNaN(e)?void 0:`${e}px`,gridTemplateRows:`repeat(${a}, 1fr)`,gridAutoFlow:"column"}}},item:{counterIncrement:"item-counter",flex:"0 0 auto",...s==="list"?{...l==="vertical"?{width:"100%",height:isNaN(e)?void 0:`${e}px`}:{width:isNaN(e)?void 0:`${e}px`,height:"100%"}}:{}}}}process.env.NODE_ENV!=="production"&&(Dt.displayName="Collection",st.displayName="CollectionItem");const Fr=N.forwardRef(({children:e,style:r,autoCollapseSections:s=!1,expandedSectionIndices:a,orientation:l="vertical",sectionPadding:u=0,sections:h,selection:g,selectionMode:m="single",onActivateAt:S,onCollapseSectionAt:k,onDeselectAt:P,onExpandedSectionsChange:O,onExpandSectionAt:j,onHeaderCustomEvent:L,onItemCustomEvent:x,onSelectAt:R,onSelectionChange:$,HeaderComponent:Q,ItemComponent:X,...G},T)=>{const I=Xi(g??{},h),E=Yi(a??[],h),F=Ui({orientation:l}),W=h.map(()=>N.useRef(null)),Z=W.map(B=>jn(B)),re=(B,C)=>(I[C]?.indexOf(B)??-1)>=0,q=B=>E.indexOf(B)>=0,U=B=>{let C;q(B)?C=H=>H.filter(oe=>oe!==B):s?C=H=>[B]:C=H=>[...H.filter(oe=>oe!==B),B],te(E,C(E))},D=(B,C)=>{if(re(B,C))return;let H;switch(m){case"multiple":H=ie=>({...ie,[C]:Ht([...(ie[C]??[]).filter(fe=>fe!==B),B])});break;case"single":H=ie=>({[C]:[B]});break;default:return}const oe=H(I);ee(I,oe)},z=(B,C)=>{if(!re(B,C))return;const oe=(ie=>({...ie,[C]:(ie[C]??[]).filter(fe=>fe!==B)}))(I);ee(I,oe)},te=(B,C)=>{if(Ve(B,C))return;const H=B?.filter(ie=>C.indexOf(ie)===-1)??[],oe=C.filter(ie=>B?.indexOf(ie)===-1);H.forEach(ie=>k?.(ie)),oe.forEach(ie=>j?.(ie)),O?.(C)},ee=(B,C)=>{if(Ve(B,C))return;const H=h.length;let oe=[],ie=[];for(let fe=0;fe<H;fe++){const ve=B?.[fe]??[],Ee=C[fe]??[],Se=ve.filter(J=>Ee.indexOf(J)===-1),xe=Ee.filter(J=>ve?.indexOf(J)===-1);oe=[...oe,...Se.map(J=>[J,fe])],ie=[...ie,...xe.map(J=>[J,fe])]}oe.forEach(fe=>P?.(fe[0],fe[1])),ie.forEach(fe=>R?.(fe[0],fe[1])),$?.(C)},ce=Oe(e,{collapseIcon:Mn,expandIcon:An,header:Vt,item:Bt,section:zn});return b.jsx("div",{...G,ref:T,style:le(r,F.root),children:b.jsx(gt,{in:h,children:(B,C)=>{const{collectionPadding:H=0,items:oe=[],itemLength:ie=50,itemPadding:fe=0,isSelectionTogglable:ve,layout:Ee="list",maxVisible:Se=-1,numSegments:xe=1}=B,J=Ee==="list"?oe.length:Math.ceil(oe.length/xe),ze=Se<0?J:Math.min(J,Se),_e=ie*ze+fe*(ze-1),ke=!q(C),De=Z[C];return b.jsxs(me,{element:ce.section??b.jsx(zn,{}),style:le(F.section,l==="vertical"?{marginTop:C===0?"0px":`${u}px`,...De.height>0?{height:ke?`${De.height}px`:`${_e+De.height+H}px`}:{visibility:"hidden"}}:{marginLeft:C===0?"0px":`${u}px`,...De.width>0?{width:ke?`${De.width}px`:`${_e+De.width+H}px`}:{visibility:"hidden"}}),children:[b.jsx("div",{ref:W[C],style:le(F.headerContainer),children:Q?b.jsx(Q,{"aria-expanded":!ke,className:ae({collapsed:ke,expanded:!ke}),index:C,isCollapsed:ke,role:"button",section:B,style:le(F.header),onClick:()=>U(C),onCustomEvent:(Ae,He)=>L?.(C,Ae,He)}):b.jsxs(me,{"aria-expanded":!ke,className:ae({collapsed:ke,expanded:!ke}),element:ce.header??b.jsx(Vt,{}),role:"button",style:le(F.header),onClick:()=>U(C),children:[b.jsx("span",{dangerouslySetInnerHTML:{__html:B.label}}),ce.expandIcon&&b.jsx(me,{className:ae({collapsed:ke,expanded:!ke}),element:ke?ce.collapseIcon??ce.expandIcon:ce.expandIcon,style:le(ke?F.collapseIcon:F.expandIcon)})]})}),b.jsx("div",{role:"region",style:le({pointerEvents:ke?"none":"auto"},l==="vertical"?{width:"100%",height:`${_e}px`,marginTop:`${H}px`,overflowY:Se<0||Se>=J?"hidden":"scroll"}:{marginLeft:`${H}px`,overflowX:Se<0||Se>=J?"hidden":"scroll",width:`${_e}px`,height:"100%"}),children:b.jsx(Dt,{className:ae({collapsed:ke,expanded:!ke}),isSelectionTogglable:ve,ItemComponent:X,itemLength:ie,itemPadding:fe,items:oe,layout:Ee,numSegments:xe,orientation:l,selection:I[C]??[],selectionMode:m,style:le(l==="vertical"?{width:"100%"}:{height:"100%"}),onActivateAt:Ae=>S?.(Ae,C),onCustomEvent:(Ae,He,Ye)=>x?.(Ae,C,He,Ye),onDeselectAt:Ae=>z(Ae,C),onSelectAt:Ae=>D(Ae,C),children:!X&&(ce.item??b.jsx(Bt,{}))})})]})}})})}),Vt=({children:e,...r})=>b.jsx("button",{...r,children:e}),An=({children:e,...r})=>b.jsx("figure",{...r,children:e}),Mn=({children:e,...r})=>b.jsx("figure",{...r,children:e}),zn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Bt=st;function Dr(e,r){return e>=r.length||e<0}function Hi(e,r,s){if(Dr(r,s))return!0;const a=s[r].items??[];return e>=a.length||e<0}function Yi(e,r){return Ht(e).filter(s=>!Dr(s,r))}function Xi(e,r){const s={};for(const a in r){if(!Object.hasOwn(r,a))continue;const l=Ht([...e[a]??[]]);s[Number(a)]=Ht(l).filter(u=>!Hi(u,Number(a),r))}return s}function Ht(e){return e.sort((r,s)=>r-s)}function Ui({orientation:e="vertical"}){return{root:{alignItems:"center",boxSizing:"border-box",display:"flex",flex:"0 0 auto",justifyContent:"flex-start",padding:"0",...e==="vertical"?{flexDirection:"column",height:"auto"}:{flexDirection:"row",width:"auto"}},collapseIcon:{pointerEvents:"none",zIndex:1},expandIcon:{pointerEvents:"none",zIndex:1},section:{alignItems:"flex-start",display:"flex",flex:"0 0 auto",justifyContent:"flex-start",margin:"0",overflow:"hidden",padding:"0",...e==="vertical"?{flexDirection:"column",width:"100%"}:{flexDirection:"row",height:"100%"}},headerContainer:{flexShrink:"0",...e==="vertical"?{width:"100%"}:{height:"100%"}},header:{cursor:"pointer",margin:"0",...e==="vertical"?{width:"100%"}:{height:"100%"}}}}process.env.NODE_ENV!=="production"&&(Fr.displayName="Accordion",Vt.displayName="AccordionHeader",An.displayName="AccordionExpandIcon",Mn.displayName="AccordionCollapseIcon",Bt.displayName="AccordionItem");function Yt({count:e=1,children:r,render:s}){return b.jsx(b.Fragment,{children:[...Array(e)].map((a,l)=>b.jsx(N.Fragment,{children:s?.(l)??(typeof r=="function"?r(l):r)},`element-${l}`))})}process.env.NODE_ENV!=="production"&&(Yt.displayName="Repeat");function Gi(e){return e}const Ln=N.forwardRef(({children:e,className:r,isActive:s=!1,isTailHidden:a=!1,isSplit:l=!1,numberOfBars:u=3,...h},g)=>{const m=Oe(e,{bar:mt}),S={root:ae({active:s}),bar:ae({active:s})},k=Ki({isSplit:l,isActive:s,isTailHidden:a});return b.jsx("div",{...h,ref:g,className:ae(r,S.root),children:b.jsx(Yt,{count:l?2:1,children:P=>b.jsx("div",{"aria-hidden":!0,style:le(k.section,k[`section${P}`]),children:b.jsx(Yt,{count:u,children:O=>b.jsx(me,{"aria-hidden":!0,className:ae(S.bar),element:m.bar??b.jsx(mt,{}),style:(()=>{switch(u){case 2:return le(k.bar,k[`bar${P}${O===0?0:2}`]);case 3:default:return le(k.bar,k[`bar${P}${O}`])}})()})})})})})}),mt=({...e})=>b.jsx("span",{...e});function Ki({isActive:e=!1,isSplit:r=!1,isTailHidden:s=!1}){return{section:{height:"100%",position:"absolute",width:r?"50%":"100%"},section0:{left:"0",top:"0"},section1:{right:"0",top:"0"},bar:{margin:"0",padding:"0",position:"absolute",width:"100%"},bar00:{left:"0",top:e?"50%":"0",transform:e?"translate(0, -50%) rotate(45deg)":"translate(0, 0) rotate(0deg)",transformOrigin:r?"right center":"center"},bar01:{left:"0",top:"50%",transform:e?"translate(0, -50%) scale(0)":"translate(0, -50%) scale(1)",transformOrigin:r?"right center":"center"},bar02:{left:"0",top:e?"50%":"100%",transform:e?"translate(0, -50%) rotate(-45deg)":"translate(0, -100%) rotate(0deg)",transformOrigin:r?"right center":"center",width:e||r?"100%":`${s?"50%":"100%"}`},bar10:{left:"0",top:e?"50%":"0",transform:e?"translate(0, -50%) rotate(-45deg)":"translate(0, 0) rotate(0deg)",transformOrigin:"left center"},bar11:{left:"0",top:"50%",transform:e?"translate(0, -50%) scale(0)":"translate(0, -50%) scale(1)",transformOrigin:"left center"},bar12:{left:"0",top:e?"50%":"100%",transform:e?"translate(0, -50%) rotate(45deg)":"translate(0, -100%) rotate(0deg)",transformOrigin:"left center",width:s&&!e?"0":"100%"}}}process.env.NODE_ENV!=="production"&&(Ln.displayName="Burger",mt.displayName="BurgerBar");const Vr=N.forwardRef(({children:e,className:r,style:s,isActive:a=!1,isTailHidden:l=!1,isSplit:u=!1,numberOfBars:h=3,onActivate:g,onDeactivate:m,onToggle:S,...k},P)=>{const O=()=>{const x=!a;S?.(x),x?g?.():m?.()},j={root:ae({active:a})},L=Wi();return b.jsx("button",{...k,ref:P,"aria-expanded":a,className:ae(r,j.root),style:le(s,L.root),onClick:O,children:b.jsx(Ln,{isActive:a,isSplit:u,isTailHidden:l,numberOfBars:h,children:e})})}),Br=mt;function Wi(){return{root:{background:"transparent",border:"none",display:"block",outline:"none"}}}process.env.NODE_ENV!=="production"&&(Vr.displayName="BurgerButton",Br.displayName="BurgerButtonBar");function Hr(e){switch(!0){case Ji(e):{const{action:r,children:s,isNav:a,className:l,isDisabled:u,label:h,...g}=e;return b.jsx(In.NavLink,{...g,"aria-disabled":u,"aria-label":h,className:ae(l,{disabled:u}),to:r,children:s??h})}case Zi(e):{const{action:r,children:s,className:a,isDisabled:l,label:u,...h}=e;return b.jsx(In.Link,{...h,"aria-disabled":l,"aria-label":u,className:ae(a,{disabled:l}),to:r,children:s??u})}case Qi(e):{const{action:r,children:s,className:a,isDisabled:l,label:u,opensInNewTab:h,...g}=e;return b.jsx("a",{...g,"aria-disabled":l,"aria-label":u,className:ae(a,{disabled:l}),href:r,rel:h?"noopener,noreferrer":void 0,target:h?"_blank":void 0,children:s??u})}case $i(e):{const{action:r,children:s,className:a,isDisabled:l,label:u,type:h="button",...g}=e;return b.jsx("button",{...g,"aria-disabled":l,"aria-label":u,className:a,disabled:l,type:h,onClick:()=>r(),children:s??u})}default:return console.error("[etudes::Button] Unknown button type"),b.jsx(b.Fragment,{})}}function Ji(e){return!(typeof e.action!="string"||!e.action.startsWith("/")||!("isNav"in e)||!e.isNav)}function Zi(e){return!(typeof e.action!="string"||!e.action.startsWith("/")||"isNav"in e&&e.isNav)}function Qi(e){return!(typeof e.action!="string"||e.action.startsWith("/"))}function $i(e){return typeof e.action=="function"}process.env.NODE_ENV!=="production"&&(Hr.displayName="Button");function Yr(e,{isEnabled:r=!0,updatesCursor:s=!0,onDragStart:a,onDragMove:l,onDragEnd:u}){const h=N.useRef(void 0),g=N.useRef(void 0),m=Ne(a),S=Ne(l),k=Ne(u),P=N.useCallback(L=>{if(!h.current)return;const x=pe.make(L.clientX,L.clientY),R=pe.subtract(x,g.current??h.current);g.current=x,S.current?.(R,x,h.current)},[]),O=N.useCallback(L=>{const x=e.current;if(!x||!h.current)return;const R=pe.make(L.clientX,L.clientY),$=pe.subtract(g.current??h.current,R);k.current?.(R,$,h.current),h.current=void 0,g.current=void 0,x.removeEventListener("mousemove",P),x.removeEventListener("mouseup",O,{capture:!0}),x.removeEventListener("mouseleave",O),s&&(x.style.cursor="grab")},[s,P]),j=N.useCallback(L=>{const x=e.current;if(!x)return;L.preventDefault();const R=pe.make(L.clientX,L.clientY);h.current=R,g.current=R,x.addEventListener("mousemove",P),x.addEventListener("mouseup",O,{capture:!0}),x.addEventListener("mouseleave",O),s&&(x.style.cursor="grabbing"),m.current?.(R)},[s,P,O]);N.useLayoutEffect(()=>{const L=e.current;if(!L||!r||!s)return;const x=L.style.cursor;return L.style.cursor="grab",()=>{L.style.cursor=x}},[r,s]),N.useLayoutEffect(()=>{const L=e.current;if(!(!L||!r))return L.addEventListener("mousedown",j),()=>{L.removeEventListener("mousedown",j),L.removeEventListener("mousemove",P),L.removeEventListener("mouseup",O,{capture:!0}),L.removeEventListener("mouseleave",O)}},[r,P,O,j])}function Xr(e,{autoStarts:r=!0,shouldInvokeInitially:s=!1,onInterval:a}){const l=N.useRef(void 0),u=Ne(a),h=N.useCallback(()=>{clearInterval(l.current),l.current=void 0},[]),g=N.useCallback(()=>{h(),!(e<0)&&(s&&u.current(),l.current=setInterval(()=>{u.current()},e))},[e,s,h]);return N.useEffect(()=>(r&&e>0&&g(),h),[r,e,g,h]),{start:g,stop:h}}const Ur=N.forwardRef(({autoAdvanceInterval:e=0,index:r=0,isDragEnabled:s=!0,items:a=[],orientation:l="horizontal",tracksItemExposure:u=!1,onAutoAdvancePause:h,onAutoAdvanceResume:g,onIndexChange:m,ItemComponent:S,...k},P)=>{const O=N.useRef(void 0),j=N.useRef(null),L=N.useRef(void 0),x=N.useRef(void 0),R=N.useRef(void 0),$=1e3,[Q,X]=N.useState(Fn(j,l)),[G,T]=N.useState(!1),I=ts({scrollSnapEnabled:!G,orientation:l}),E=e>0,F=N.useCallback(z=>{m?.(z)},[m]),W=N.useCallback(z=>{L.current=pe.make(z.clientX,z.clientY),T(!0)},[]),Z=N.useCallback(z=>{const te=L.current,ee=x.current;if(!te||!ee)return;const ce=5,B=pe.subtract(te,ee);(Math.abs(B.x)>ce||Math.abs(B.y)>ce)&&z.stopPropagation(),L.current=void 0,x.current=void 0},[]),re=N.useCallback(z=>{x.current=pe.make(z.clientX,z.clientY),G&&T(!1)},[G]),q=N.useCallback(()=>{qi(j,r,l),clearTimeout(R.current),R.current=setTimeout(()=>{clearTimeout(R.current),R.current=void 0},$)},[j.current,r,l,$]),U=N.useCallback(()=>{const z=(r+a.length+1)%a.length;F(z)},[G,r,a.length,F]),D=N.useCallback(({x:z,y:te})=>{const ee=j.current;switch(l){case"horizontal":requestAnimationFrame(()=>{ee&&(ee.scrollLeft-=z*1.5)});break;case"vertical":requestAnimationFrame(()=>{ee&&(ee.scrollTop-=te*1.5)});break;default:console.error(`[etudes::Carousel] Unsupported orientation: ${l}`)}},[l,j.current]);return N.useEffect(()=>{const z=j.current;if(!z)return;const te=O.current===void 0,ee=O.current===r,ce=B=>{if(u&&X(Fn(j,l)),R.current!==void 0)return;const C=Math.round(l==="horizontal"?z.scrollLeft/z.clientWidth:z.scrollTop/z.clientHeight),H=Math.max(0,Math.min(a.length-1,C));H!==r&&(O.current=H,F(H))};return z.addEventListener("scroll",ce),u&&X(Fn(j,l)),ee||(O.current=r,te||(F(r),q())),()=>{z.removeEventListener("scroll",ce)}},[r,l,u]),N.useEffect(()=>{E&&(G?h?.():g?.())},[G,E]),Yr(j,{isEnabled:s&&a.length>1,onDragMove:D}),Xr(G||!E?-1:e,{onInterval:U}),b.jsx("div",{...k,ref:P,role:"region",onClick:z=>Z(z),onPointerCancel:z=>re(z),onPointerDown:z=>W(z),onPointerLeave:z=>re(z),onPointerUp:z=>re(z),children:b.jsx("div",{ref:j,style:le(I.viewport),children:b.jsx(gt,{in:a,children:({style:z,...te},ee)=>b.jsx("div",{style:le(I.itemContainer),children:b.jsx(S,{"aria-hidden":ee!==r,exposure:u?Q?.[ee]:void 0,style:le(z,I.item),...te})})})})})});function qi(e,r,s){const a=e?.current;if(!a)return;const l=s==="horizontal"?0:a.clientHeight*r,u=s==="horizontal"?a.clientWidth*r:0;a.scrollTop===l&&a.scrollLeft===u||a.scrollTo({top:l,left:u,behavior:"smooth"})}function Fn(e,r){const s=e?.current;if(!s)return;const a=[];for(let l=0;l<s.children.length;l++)a.push(es(l,e,r));return a}function es(e,r,s){const a=r?.current,l=a?.children[e];if(!l)return 0;const u=ge.intersecting(l,a);if(!u)return 0;switch(s){case"horizontal":return Math.max(0,Math.min(1,Math.round((u.width/a.clientWidth+Number.EPSILON)*1e3)/1e3));case"vertical":return Math.max(0,Math.min(1,Math.round((u.height/a.clientHeight+Number.EPSILON)*1e3)/1e3));default:return console.error(`[etudes::Carousel] Unsupported orientation: ${s}`),NaN}}function ts({scrollSnapEnabled:e=!1,orientation:r="horizontal"}){return{viewport:{alignItems:"center",display:"flex",height:"100%",userSelect:e?"auto":"none",justifyContent:"flex-start",scrollBehavior:e?"smooth":"auto",scrollSnapStop:e?"always":"unset",WebkitOverflowScrolling:"touch",width:"100%",...r==="horizontal"?{flexDirection:"row",overflowX:"scroll",overflowY:"hidden",scrollSnapType:e?"x mandatory":"none"}:{flexDirection:"column",overflowX:"hidden",overflowY:"scroll",scrollSnapType:e?"y mandatory":"none"}},itemContainer:{height:"100%",overflow:"hidden",scrollSnapAlign:"center",width:"100%",flex:"0 0 auto"},item:{height:"100%",width:"100%"}}}process.env.NODE_ENV!=="production"&&(Ur.displayName="Carousel");function Gr(e){const r=N.useRef(void 0);return N.useEffect(()=>{r.current=e},[e]),r.current}const Dn=N.forwardRef(({className:e,emptyValue:r="",isDisabled:s=!1,isRequired:a=!1,placeholder:l,value:u,formatter:h,onFocus:g,onUnfocus:m,onChange:S,...k},P)=>{const O=N.useCallback(j=>{const L=(h?.(j)??j)||r;S?.(L)},[S,h]);return b.jsx("input",{...k,ref:P,"aria-disabled":s,"aria-placeholder":l,"aria-required":a,className:ae(e,{disabled:s}),disabled:s,placeholder:l,required:a,type:"text",value:u||r,onBlur:({target:j})=>m?.(j.value),onChange:({target:j})=>O(j.value),onFocus:({target:j})=>g?.(j.value)})});process.env.NODE_ENV!=="production"&&(Dn.displayName="TextField");const Kr=N.forwardRef(({children:e,style:r,allowsInput:s=!0,max:a=NaN,min:l=NaN,quantity:u=0,onChange:h,...g},m)=>{const S=()=>{h?.(x(u-1))},k=()=>{h?.(x(u+1))},P=I=>{$(I)},O=I=>{const E=L(I);E!==u?h?.(E):$(j(E))},j=I=>I.toLocaleString(),L=I=>{const E=parseInt(I,10);return E.toString()!==I.replace(/^0+/,"")?u:x(E)},x=I=>{let E=I;return isNaN(l)||(E=Math.max(l,E)),isNaN(a)||(E=Math.min(a,E)),E},[R,$]=N.useState(j(u)),Q=Gr(u),X=!isNaN(a)&&u+1>a,G=!isNaN(l)&&u-1<l;N.useEffect(()=>{if(Q===void 0||Q===u)return;const I=x(u);$(j(I))},[u,l,a]);const T=Oe(e,{textField:Xt,addButton:Ut,subscribeButton:Gt});return b.jsxs("div",{...g,ref:m,style:le(r,Kt.root),children:[b.jsx(me,{className:ae({disabled:G}),element:T.subscribeButton??b.jsx(Gt,{}),style:le(Kt.subtract),onClick:()=>S()}),b.jsx(me,{element:T.textField??b.jsx(Xt,{}),isDisabled:!s,style:le(Kt.textField),value:R,onChange:P,onUnfocus:O}),b.jsx(me,{className:ae({disabled:X}),element:T.addButton??b.jsx(Ut,{}),style:le(Kt.add),onClick:()=>k()})]})}),Xt=({...e})=>b.jsx(Dn,{...e}),Ut=({children:e,...r})=>b.jsx("button",{...r,children:e}),Gt=({children:e,...r})=>b.jsx("button",{...r,children:e}),Kt={root:{alignItems:"stretch",display:"flex",flexDirection:"row",justifyContent:"stretch"},subtract:{flex:"0 0 auto"},add:{flex:"0 0 auto"},textField:{width:"100%"}};process.env.NODE_ENV!=="production"&&(Kr.displayName="Counter",Ut.displayName="CounterAddButton",Gt.displayName="CounterSubtractButton",Xt.displayName="CounterTextField");function Wr(){const[e,r]=N.useState(Pe.zero);return N.useLayoutEffect(()=>{const s=()=>{const a=ge.size(ge.fromViewport());r(a)};return window.addEventListener("resize",s),s(),()=>{window.removeEventListener("resize",s)}},[]),e}function Be(e){const[r,s]=N.useState(ge.zero),a=Wr();return Lt(e,{onResize:l=>{const u=ge.from(l);u&&s(u)}}),N.useLayoutEffect(()=>{const l=e.current,u=ge.from(l);u&&s(u)},[Pe.toString(a)]),r}function Jr({src:e,srcSet:r,sizes:s},{onLoadStart:a,onLoadComplete:l,onLoadError:u}={}){const h=N.useRef(void 0),g=Ne(a),m=Ne(l),S=Ne(u);N.useLayoutEffect(()=>{const k=O=>{const j=O.currentTarget;m.current?.(j)},P=O=>{const j=O.currentTarget;S.current?.(j)};return h.current=new Image,e&&(h.current.src=e),r&&(h.current.srcset=r),s&&(h.current.sizes=s),g.current?.(h.current),h.current.addEventListener("load",k),h.current.addEventListener("error",P),()=>{h.current?.removeEventListener("load",k),h.current?.removeEventListener("error",P),h.current=void 0}},[e,r,s])}function Vn({src:e,srcSet:r,sizes:s},{preservesSizeBetweenLoads:a=!0,onLoadStart:l,onLoadComplete:u,onLoadError:h}={}){const[g,m]=N.useState(),S=Ne(l),k=Ne(u),P=Ne(h),O=N.useCallback(x=>{a||m(void 0),S.current?.(x)},[a]),j=N.useCallback(x=>{m(ns(x)),k.current?.(x)},[]),L=N.useCallback(x=>{a||m(void 0),P.current?.(x)},[a]);return Jr({src:e,srcSet:r,sizes:s},{onLoadStart:O,onLoadComplete:j,onLoadError:L}),g}function ns(e){if(e&&typeof e.width=="number"&&typeof e.height=="number")return Pe.make(e.width,e.height)}const Bn=N.forwardRef(({alt:e,loadingMode:r="preload",sizes:s,src:a,srcSet:l,onLoadStart:u,onLoadComplete:h,onLoadError:g,onSizeChange:m,...S},k)=>{const P=l?.map(({pixelDensity:L,src:x,width:R})=>{if(s&&R===void 0){console.error("[etudes::Image] `width` must be specified if `sizes` is specified");return}if(R!==void 0&&L!==void 0){console.error("[etudes::Image] Only one of `width` or `pixelDensity` can be specified");return}let $=x;if(R!==void 0){const Q=Math.floor(R);if(!isFinite(Q)||String(Q)!==String(R)||Q<=0){console.error("[etudes::Image] The specified width must be a positive integer greater than 0");return}$+=` ${Q}w`}else if(L!==void 0){if(!isFinite(L)||L<=0){console.error("[etudes::Image] The specified pixel density must be a positive floating number than 0");return}$+=` ${L}x`}return $}).filter(Boolean).join(", "),O=s?.map(({mediaCondition:L,width:x},R)=>{const $=R===s.length-1;let Q=x;if($&&L){console.error("[etudes::Image] The last item in `sizes` must not have a `mediaCondition` specified");return}return L&&(Q=`${L} ${Q}`),Q}).filter(Boolean).join(", "),j=Vn({src:a,srcSet:P,sizes:O},{onLoadStart:u,onLoadComplete:h,onLoadError:g});return N.useEffect(()=>{m?.(j)},[j?.width,j?.height]),b.jsx("img",{...S,ref:k,alt:e,loading:r==="lazy"?"lazy":"eager",sizes:O,src:a,srcSet:P})});process.env.NODE_ENV!=="production"&&(Bn.displayName="Image");const Zr=N.forwardRef(({children:e,style:r,alt:s,aspectRatio:a=NaN,loadingMode:l,sizes:u,src:h,srcSet:g,onLoadStart:m,onLoadComplete:S,onLoadError:k,...P},O)=>{const j=E=>{$(E?E.width/E.height:NaN)},L=N.useRef(null),x=O??L,[R,$]=N.useState(NaN),Q=isNaN(a)?R:a,X=Be(x),G=X.width/X.height,T=Pe.make(G>1?Math.max(X.width,X.height*Q):Math.max(X.width,Math.max(X.height,X.width/Q)*Q),G>1?Math.max(X.height,Math.max(X.width,X.height*Q)/Q):Math.max(X.height,X.width/Q)),I=Oe(e,{content:Hn,viewport:Yn});return b.jsxs("div",{...P,ref:x,style:le(r,Xn.root),children:[b.jsx(Bn,{alt:s,sizes:u,src:h,srcSet:g,style:le(Xn.viewport,{height:`${T.height}px`,maxWidth:"unset",width:`${T.width}px`}),onLoadComplete:S,onLoadError:k,onLoadStart:m,onSizeChange:E=>j(E)}),I.viewport&&b.jsx(me,{element:I.viewport,style:le(Xn.viewport,{height:`${T.height}px`,pointerEvents:"none",width:`${T.width}px`})}),I.content]})}),Hn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Yn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Xn={root:{overflow:"hidden"},viewport:{fontSize:"0",left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"}};process.env.NODE_ENV!=="production"&&(Zr.displayName="CoverImage",Hn.displayName="CoverImageContent",Yn.displayName="CoverImageViewport");function Qr(e,{onLoadStart:r,onLoadComplete:s,onLoadError:a}={}){const l=Ne(r),u=Ne(s),h=Ne(a);N.useLayoutEffect(()=>{if(!e)return;const g=document.createElement("video"),m=()=>u.current?.(g),S=()=>h.current?.(g);return g.addEventListener("loadedmetadata",m),g.addEventListener("error",S),g.src=e,l.current?.(g),()=>{g.removeEventListener("loadedmetadata",m),g.removeEventListener("error",S),g.src=""}},[e])}function $r(e,{preservesSizeBetweenLoads:r=!0,onLoadStart:s,onLoadComplete:a,onLoadError:l}={}){const[u,h]=N.useState(),g=Ne(s),m=Ne(a),S=Ne(l),k=N.useCallback(j=>{r||h(void 0),g.current?.(j)},[r]),P=N.useCallback(j=>{h(rs(j)),m.current?.(j)},[]),O=N.useCallback(j=>{r||h(void 0),S.current?.(j)},[r]);return Qr(e,{onLoadStart:k,onLoadComplete:P,onLoadError:O}),u}function rs(e){if(e&&typeof e.videoWidth=="number"&&typeof e.videoHeight=="number")return Pe.make(e.videoWidth,e.videoHeight)}const Un=N.forwardRef(({autoLoop:e=!0,autoPlay:r=!0,hasControls:s=!1,isMuted:a=!0,playsInline:l=!0,posterSrc:u,src:h,onCanPlay:g,onEnd:m,onFullscreenChange:S,onLoadMetadata:k,onLoadMetadataComplete:P,onLoadMetadataError:O,onPause:j,onPlay:L,onSizeChange:x,onTimeUpdate:R,...$},Q)=>{const X=N.useRef(null),G=Q??X,T=$r(h,{onLoadStart:k,onLoadComplete:P,onLoadError:O});N.useEffect(()=>{if(!G.current)return;if(h.toLowerCase().endsWith(".m3u8")){const D=!!G.current.canPlayType("application/x-mpegURL"),z=typeof window<"u"&&typeof window.Hls<"u"?window.Hls:void 0;if(!D&&z?.isSupported()){const te=new z;te.loadSource(h),te.attachMedia(G.current)}}const U=D=>{const z=document.fullScreen||document.mozFullScreen||document.webkitIsFullScreen;z!==void 0&&S?.(z)};return G.current.muted=a,G.current.load(),G.current.addEventListener("webkitfullscreenchange",U),G.current.addEventListener("mozfullscreenchange",U),G.current.addEventListener("fullscreenchange",U),()=>{q(),G.current?.removeEventListener("webkitfullscreenchange",U),G.current?.removeEventListener("mozfullscreenchange",U),G.current?.removeEventListener("fullscreenchange",U)}},[h]),N.useEffect(()=>{x?.(T)},[T]);const I=U=>{const D=U.currentTarget;r&&D.paused&&re(),g?.()},E=U=>{L?.()},F=U=>{j?.()},W=U=>{m?.()},Z=U=>{const D=U.currentTarget;R?.(D.currentTime,D.duration)},re=()=>{G.current&&G.current.play()},q=()=>{G.current&&G.current.pause()};return b.jsx("video",{...$,ref:G,autoPlay:r,controls:s,loop:e,muted:a,playsInline:l,poster:u,onCanPlay:I,onEnded:W,onPause:F,onPlay:E,onTimeUpdate:Z,children:b.jsx("source",{src:h})})});process.env.NODE_ENV!=="production"&&(Un.displayName="Video");const qr=N.forwardRef(({className:e,children:r,style:s,aspectRatio:a=NaN,autoLoop:l,autoPlay:u,hasControls:h,isMuted:g,playsInline:m,posterSrc:S,src:k,onCanPlay:P,onEnd:O,onFullscreenChange:j,onLoadMetadata:L,onLoadMetadataComplete:x,onLoadMetadataError:R,onPause:$,onPlay:Q,onSizeChange:X,...G},T)=>{const I=z=>{Z(z?z.width/z.height:NaN),X?.(z)},E=T??N.useRef(null),F=Be(E),[W,Z]=N.useState(NaN),re=isNaN(a)?W:a,q=F.width/F.height,U=Pe.make(q>1?Math.max(F.width,F.height*re):Math.max(F.width,Math.max(F.height,F.width/re)*re),q>1?Math.max(F.height,Math.max(F.width,F.height*re)/re):Math.max(F.height,F.width/re)),D=Oe(r,{content:Gn,viewport:Kn});return b.jsxs("div",{...G,ref:E,className:e,style:le(s,Wn.root),children:[b.jsx(Un,{autoLoop:l,autoPlay:u,hasControls:h,isMuted:g,playsInline:m,posterSrc:S,src:k,style:le(Wn.viewport,{width:`${U.width}px`,height:`${U.height}px`,maxWidth:"unset"}),onCanPlay:P,onEnd:O,onFullscreenChange:j,onLoadMetadata:L,onLoadMetadataComplete:x,onLoadMetadataError:R,onPause:$,onPlay:Q,onSizeChange:z=>I(z)}),D.viewport&&b.jsx(me,{element:D.viewport,style:le(Wn.viewport,{height:`${U.height}px`,pointerEvents:"none",width:`${U.width}px`})}),D.content]})}),Gn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Kn=({children:e,...r})=>b.jsx("div",{...r,children:e}),Wn={root:{overflow:"hidden"},viewport:{fontSize:"0",left:"50%",position:"absolute",top:"50%",transform:"translate(-50%, -50%)"}};process.env.NODE_ENV!=="production"&&(qr.displayName="CoverVideo",Gn.displayName="CoverVideoContent",Kn.displayName="CoverVideoViewport");const eo=N.forwardRef(({children:e,style:r,angle:s=0,knobLength:a=30,knobThickness:l=10,radius:u=50,trackGap:h=0,trackThickness:g=2,...m},S)=>{const k=u*2,P=Math.max(0,Math.min(360,a)),O=Oe(e,{track:Wt,knob:Jt}),j=is({angle:s,diameter:k});return b.jsxs("div",{...m,ref:S,style:le(r,j.root),children:[b.jsx("div",{style:j.trackContainer,children:b.jsx("svg",{height:k,style:j.svgContainer,viewBox:`0 0 ${k} ${k}`,width:k,children:b.jsx(me,{cx:u,cy:u,element:O.track??b.jsx(Wt,{}),fill:"none",r:u-g/2,strokeDasharray:h,strokeWidth:g})})}),b.jsx("div",{style:le(j.knobContainer),children:b.jsx("svg",{style:j.svgContainer,viewBox:`0 0 ${k} ${k}`,xmlns:"http://www.w3.org/2000/svg",children:b.jsx(me,{d:os(u,u,u-l/2-(g-l)/2,-P/2,P/2),element:O.knob??b.jsx(Jt,{}),fill:"none",strokeWidth:l})})})]})}),Wt=({...e})=>b.jsx("circle",{...e}),Jt=({...e})=>b.jsx("path",{...e});function to(e,r,s,a){const l=(a-90)*Math.PI/180;return{x:e+s*Math.cos(l),y:r+s*Math.sin(l)}}function os(e,r,s,a,l){const u=to(e,r,s,l),h=to(e,r,s,a),g=l-a<=180?"0":"1";return["M",u.x,u.y,"A",s,s,0,g,0,h.x,h.y].join(" ")}function is({diameter:e=0,angle:r=0}){return{root:{height:`${e}px`,width:`${e}px`},knobContainer:{backgroundPosition:"center",backgroundRepeat:"no-repeat",backgroundSize:"100%",height:"100%",left:"0",position:"absolute",top:"0",transformOrigin:"center",width:"100%",transform:`rotate(${(r+360)%360}deg)`},trackContainer:{height:"100%",left:"0",position:"absolute",top:"0",transformOrigin:"center",width:"100%"},svgContainer:{overflow:"visible",position:"absolute",right:"0",top:"0"}}}process.env.NODE_ENV!=="production"&&(eo.displayName="Dial",Wt.displayName="DialTrack",Jt.displayName="DialKnob");const no=N.forwardRef(({children:e,className:r,style:s,collapsesOnSelect:a=!0,collectionPadding:l=0,isCollapsed:u,isInverted:h=!1,label:g,layout:m="list",isSelectionTogglable:S=!1,itemLength:k,itemPadding:P=0,items:O=[],maxVisibleItems:j=-1,numSegments:L=1,orientation:x="vertical",selection:R=[],selectionMode:$="single",onActivateAt:Q,onCollapse:X,onDeselectAt:G,onExpand:T,onSelectAt:I,onSelectionChange:E,onToggleCustomEvent:F,ItemComponent:W,ToggleComponent:Z,...re},q)=>{const U=N.useRef(null),D=Be(U),z=O.length,te=ls(O,j,L,m),ee=k??(x==="vertical"?D.height:D.width),ce=ee*te+P*(te-1),B=as(R,O),[C,H]=N.useState(u??!0),oe=us({isCollapsed:C,collectionPadding:l,isInverted:h,maxVisibleItems:j,menuLength:ce,numItems:z,orientation:x}),ie=Oe(e,{collapseIcon:Jn,collection:Zt,expandIcon:Zn,item:Qt,toggle:$t}),fe=()=>{C&&(H(!1),T?.())},ve=()=>{C||(H(!0),X?.())},Ee=()=>{C?fe():ve()},Se=xe=>{I?.(xe),$==="single"&&a&&ve()};return N.useEffect(()=>{u!==void 0&&H(u)},[u]),N.useEffect(()=>{const xe=J=>{if(C||!(J.target instanceof Node))return;let ze=!0,_e=J.target;for(;_e;){if(_e===U.current){ze=!1;break}if(!_e.parentNode)break;_e=_e.parentNode}ze&&ve()};return window.addEventListener("click",xe),()=>{window.removeEventListener("click",xe)}},[C]),b.jsx("div",{...re,ref:q,className:ae(r,{collapsed:C,expanded:!C}),style:le(s,oe.root),children:b.jsxs("div",{ref:U,style:le(oe.body),children:[Z?b.jsx(Z,{"aria-expanded":!C,"aria-haspopup":"listbox",className:ae({collapsed:C,expanded:!C}),style:le(oe.toggle),onClick:Ee,onCustomEvent:(xe,J)=>F?.(xe,J)}):b.jsxs(me,{"aria-expanded":!C,"aria-haspopup":"listbox",className:ae({collapsed:C,expanded:!C}),element:ie.toggle??b.jsx($t,{}),style:le(oe.toggle),onClick:Ee,children:[b.jsx("span",{dangerouslySetInnerHTML:{__html:g?.(B)??(B.length>0?B.map(xe=>O[xe]).join(", "):"")}}),ie.expandIcon&&b.jsx(me,{className:ae({collapsed:C,expanded:!C}),element:C?ie.collapseIcon??ie.expandIcon:ie.expandIcon,style:le(C?oe.collapseIcon:oe.expandIcon)})]}),b.jsx(me,{element:ie.collection??b.jsx(Zt,{}),isSelectionTogglable:S,ItemComponent:W,itemLength:ee,itemPadding:P,items:O,layout:m,numSegments:L,orientation:x,selection:B,selectionMode:$,style:le(oe.collection),onActivateAt:Q,onDeselectAt:G,onSelectAt:Se,onSelectionChange:E,children:!W&&(ie.item??b.jsx(Qt,{}))})]})})}),Zt=Dt,Qt=st,$t=({children:e,...r})=>b.jsx("button",{...r,children:e}),Jn=({children:e,...r})=>b.jsx("figure",{...r,"aria-hidden":!0,children:e}),Zn=({children:e,...r})=>b.jsx("figure",{...r,"aria-hidden":!0,children:e});function ss(e,r){return!!(isNaN(e)||e>=r.length||e<0)}function as(e,r){return cs(e).filter(s=>!ss(s,r))}function cs(e){return e.sort((r,s)=>r-s)}function ls(e,r,s,a){const l=e.length;switch(a){case"grid":{const u=s<1?l:Math.ceil(l/s);return r<0?u:Math.min(u,r)}default:return r<0?l:Math.min(l,r)}}function us({isCollapsed:e=!0,isInverted:r=!1,collectionPadding:s=0,maxVisibleItems:a=0,menuLength:l=NaN,numItems:u=0,orientation:h="vertical"}){return{root:{alignItems:"center",display:"flex",justifyContent:"flex-start",overflow:"visible",...h==="vertical"?{flexDirection:r?"column-reverse":"column"}:{flexDirection:r?"row-reverse":"row"}},body:{height:"100%",position:"relative",width:"100%"},toggle:{height:"100%",left:"0",margin:"0",position:"absolute",top:"0",width:"100%",zIndex:"1"},collection:{position:"absolute",...h==="vertical"?{width:"100%",height:e?"0px":`${l}px`,overflowY:a!==-1&&a<u?"scroll":"hidden",...r?{marginBottom:`${s}px`,bottom:"100%"}:{top:"100%",marginTop:`${s}px`}}:{width:e?"0px":`${l}px`,height:"100%",overflowX:a!==-1&&a<u?"scroll":"hidden",...r?{marginRight:`${s}px`,right:"100%"}:{left:"100%",marginLeft:`${s}px`}}},expandIcon:{pointerEvents:"none",zIndex:1},collapseIcon:{pointerEvents:"none",zIndex:1}}}process.env.NODE_ENV!=="production"&&(no.displayName="Dropdown",Zt.displayName="DropdownCollection",Jn.displayName="DropdownCollapseIcon",Zn.displayName="DropdownExpandIcon",Qt.displayName="DropdownItem",$t.displayName="DropdownToggle");const ro=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",fs=ro+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040",ds="["+ro+"]["+fs+"]*",hs=new RegExp("^"+ds+"$");function oo(e,r){const s=[];let a=r.exec(e);for(;a;){const l=[];l.startIndex=r.lastIndex-a[0].length;const u=a.length;for(let h=0;h<u;h++)l.push(a[h]);s.push(l),a=r.exec(e)}return s}const Qn=function(e){const r=hs.exec(e);return!(r===null||typeof r>"u")};function ps(e){return typeof e<"u"}const gs={allowBooleanAttributes:!1,unpairedTags:[]};function ms(e,r){r=Object.assign({},gs,r);const s=[];let a=!1,l=!1;e[0]==="\uFEFF"&&(e=e.substr(1));for(let u=0;u<e.length;u++)if(e[u]==="<"&&e[u+1]==="?"){if(u+=2,u=so(e,u),u.err)return u}else if(e[u]==="<"){let h=u;if(u++,e[u]==="!"){u=ao(e,u);continue}else{let g=!1;e[u]==="/"&&(g=!0,u++);let m="";for(;u<e.length&&e[u]!==">"&&e[u]!==" "&&e[u]!==" "&&e[u]!==`
23
23
  `&&e[u]!=="\r";u++)m+=e[u];if(m=m.trim(),m[m.length-1]==="/"&&(m=m.substring(0,m.length-1),u--),!Ss(m)){let P;return m.trim().length===0?P="Invalid space after '<'.":P="Tag '"+m+"' is an invalid name.",Ce("InvalidTag",P,Ie(e,u))}const S=bs(e,u);if(S===!1)return Ce("InvalidAttr","Attributes for '"+m+"' have open quote.",Ie(e,u));let k=S.value;if(u=S.index,k[k.length-1]==="/"){const P=u-k.length;k=k.substring(0,k.length-1);const O=co(k,r);if(O===!0)a=!0;else return Ce(O.err.code,O.err.msg,Ie(e,P+O.err.line))}else if(g)if(S.tagClosed){if(k.trim().length>0)return Ce("InvalidTag","Closing tag '"+m+"' can't have attributes or invalid starting.",Ie(e,h));if(s.length===0)return Ce("InvalidTag","Closing tag '"+m+"' has not been opened.",Ie(e,h));{const P=s.pop();if(m!==P.tagName){let O=Ie(e,P.tagStartPos);return Ce("InvalidTag","Expected closing tag '"+P.tagName+"' (opened in line "+O.line+", col "+O.col+") instead of closing tag '"+m+"'.",Ie(e,h))}s.length==0&&(l=!0)}}else return Ce("InvalidTag","Closing tag '"+m+"' doesn't have proper closing.",Ie(e,u));else{const P=co(k,r);if(P!==!0)return Ce(P.err.code,P.err.msg,Ie(e,u-k.length+P.err.line));if(l===!0)return Ce("InvalidXml","Multiple possible root nodes found.",Ie(e,u));r.unpairedTags.indexOf(m)!==-1||s.push({tagName:m,tagStartPos:h}),a=!0}for(u++;u<e.length;u++)if(e[u]==="<")if(e[u+1]==="!"){u++,u=ao(e,u);continue}else if(e[u+1]==="?"){if(u=so(e,++u),u.err)return u}else break;else if(e[u]==="&"){const P=Es(e,u);if(P==-1)return Ce("InvalidChar","char '&' is not expected.",Ie(e,u));u=P}else if(l===!0&&!io(e[u]))return Ce("InvalidXml","Extra text at the end",Ie(e,u));e[u]==="<"&&u--}}else{if(io(e[u]))continue;return Ce("InvalidChar","char '"+e[u]+"' is not expected.",Ie(e,u))}if(a){if(s.length==1)return Ce("InvalidTag","Unclosed tag '"+s[0].tagName+"'.",Ie(e,s[0].tagStartPos));if(s.length>0)return Ce("InvalidXml","Invalid '"+JSON.stringify(s.map(u=>u.tagName),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1})}else return Ce("InvalidXml","Start tag expected.",1);return!0}function io(e){return e===" "||e===" "||e===`
24
24
  `||e==="\r"}function so(e,r){const s=r;for(;r<e.length;r++)if(e[r]=="?"||e[r]==" "){const a=e.substr(s,r-s);if(r>5&&a==="xml")return Ce("InvalidXml","XML declaration allowed only at the start of the document.",Ie(e,r));if(e[r]=="?"&&e[r+1]==">"){r++;break}else continue}return r}function ao(e,r){if(e.length>r+5&&e[r+1]==="-"&&e[r+2]==="-"){for(r+=3;r<e.length;r++)if(e[r]==="-"&&e[r+1]==="-"&&e[r+2]===">"){r+=2;break}}else if(e.length>r+8&&e[r+1]==="D"&&e[r+2]==="O"&&e[r+3]==="C"&&e[r+4]==="T"&&e[r+5]==="Y"&&e[r+6]==="P"&&e[r+7]==="E"){let s=1;for(r+=8;r<e.length;r++)if(e[r]==="<")s++;else if(e[r]===">"&&(s--,s===0))break}else if(e.length>r+9&&e[r+1]==="["&&e[r+2]==="C"&&e[r+3]==="D"&&e[r+4]==="A"&&e[r+5]==="T"&&e[r+6]==="A"&&e[r+7]==="["){for(r+=8;r<e.length;r++)if(e[r]==="]"&&e[r+1]==="]"&&e[r+2]===">"){r+=2;break}}return r}const vs='"',ys="'";function bs(e,r){let s="",a="",l=!1;for(;r<e.length;r++){if(e[r]===vs||e[r]===ys)a===""?a=e[r]:a!==e[r]||(a="");else if(e[r]===">"&&a===""){l=!0;break}s+=e[r]}return a!==""?!1:{value:s,index:r,tagClosed:l}}const xs=new RegExp(`(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['"])(([\\s\\S])*?)\\5)?`,"g");function co(e,r){const s=oo(e,xs),a={};for(let l=0;l<s.length;l++){if(s[l][1].length===0)return Ce("InvalidAttr","Attribute '"+s[l][2]+"' has no space in starting.",vt(s[l]));if(s[l][3]!==void 0&&s[l][4]===void 0)return Ce("InvalidAttr","Attribute '"+s[l][2]+"' is without value.",vt(s[l]));if(s[l][3]===void 0&&!r.allowBooleanAttributes)return Ce("InvalidAttr","boolean attribute '"+s[l][2]+"' is not allowed.",vt(s[l]));const u=s[l][2];if(!Ns(u))return Ce("InvalidAttr","Attribute '"+u+"' is an invalid name.",vt(s[l]));if(!a.hasOwnProperty(u))a[u]=1;else return Ce("InvalidAttr","Attribute '"+u+"' is repeated.",vt(s[l]))}return!0}function ws(e,r){let s=/\d/;for(e[r]==="x"&&(r++,s=/[\da-fA-F]/);r<e.length;r++){if(e[r]===";")return r;if(!e[r].match(s))break}return-1}function Es(e,r){if(r++,e[r]===";")return-1;if(e[r]==="#")return r++,ws(e,r);let s=0;for(;r<e.length;r++,s++)if(!(e[r].match(/\w/)&&s<20)){if(e[r]===";")break;return-1}return r}function Ce(e,r,s){return{err:{code:e,msg:r,line:s.line||s,col:s.col}}}function Ns(e){return Qn(e)}function Ss(e){return Qn(e)}function Ie(e,r){const s=e.substring(0,r).split(/\r?\n/);return{line:s.length,col:s[s.length-1].length+1}}function vt(e){return e.startIndex+e[1].length}const Ts={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,r){return r},attributeValueProcessor:function(e,r){return r},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,r,s){return e},captureMetaData:!1},Cs=function(e){return Object.assign({},Ts,e)};let qt;typeof Symbol!="function"?qt="@@xmlMetadata":qt=Symbol("XML Node Metadata");class et{constructor(r){this.tagname=r,this.child=[],this[":@"]={}}add(r,s){r==="__proto__"&&(r="#__proto__"),this.child.push({[r]:s})}addChild(r,s){r.tagname==="__proto__"&&(r.tagname="#__proto__"),r[":@"]&&Object.keys(r[":@"]).length>0?this.child.push({[r.tagname]:r.child,":@":r[":@"]}):this.child.push({[r.tagname]:r.child}),s!==void 0&&(this.child[this.child.length-1][qt]={startIndex:s})}static getMetaDataSymbol(){return qt}}function ks(e,r){const s={};if(e[r+3]==="O"&&e[r+4]==="C"&&e[r+5]==="T"&&e[r+6]==="Y"&&e[r+7]==="P"&&e[r+8]==="E"){r=r+9;let a=1,l=!1,u=!1;for(;r<e.length;r++)if(e[r]==="<"&&!u){if(l&&tt(e,"!ENTITY",r)){r+=7;let h,g;[h,g,r]=_s(e,r+1),g.indexOf("&")===-1&&(s[h]={regx:RegExp(`&${h};`,"g"),val:g})}else if(l&&tt(e,"!ELEMENT",r)){r+=8;const{index:h}=Os(e,r+1);r=h}else if(l&&tt(e,"!ATTLIST",r))r+=8;else if(l&&tt(e,"!NOTATION",r)){r+=9;const{index:h}=Ps(e,r+1);r=h}else if(tt(e,"!--",r))u=!0;else throw new Error("Invalid DOCTYPE");a++}else if(e[r]===">"){if(u?e[r-1]==="-"&&e[r-2]==="-"&&(u=!1,a--):a--,a===0)break}else e[r]==="["&&(l=!0);if(a!==0)throw new Error("Unclosed DOCTYPE")}else throw new Error("Invalid Tag instead of DOCTYPE");return{entities:s,i:r}}const Ke=(e,r)=>{for(;r<e.length&&/\s/.test(e[r]);)r++;return r};function _s(e,r){r=Ke(e,r);let s="";for(;r<e.length&&!/\s/.test(e[r])&&e[r]!=='"'&&e[r]!=="'";)s+=e[r],r++;if($n(s),r=Ke(e,r),e.substring(r,r+6).toUpperCase()==="SYSTEM")throw new Error("External entities are not supported");if(e[r]==="%")throw new Error("Parameter entities are not supported");let a="";return[r,a]=en(e,r,"entity"),r--,[s,a,r]}function Ps(e,r){r=Ke(e,r);let s="";for(;r<e.length&&!/\s/.test(e[r]);)s+=e[r],r++;$n(s),r=Ke(e,r);const a=e.substring(r,r+6).toUpperCase();if(a!=="SYSTEM"&&a!=="PUBLIC")throw new Error(`Expected SYSTEM or PUBLIC, found "${a}"`);r+=a.length,r=Ke(e,r);let l=null,u=null;if(a==="PUBLIC")[r,l]=en(e,r,"publicIdentifier"),r=Ke(e,r),(e[r]==='"'||e[r]==="'")&&([r,u]=en(e,r,"systemIdentifier"));else if(a==="SYSTEM"&&([r,u]=en(e,r,"systemIdentifier"),!u))throw new Error("Missing mandatory system identifier for SYSTEM notation");return{notationName:s,publicIdentifier:l,systemIdentifier:u,index:--r}}function en(e,r,s){let a="";const l=e[r];if(l!=='"'&&l!=="'")throw new Error(`Expected quoted string, found "${l}"`);for(r++;r<e.length&&e[r]!==l;)a+=e[r],r++;if(e[r]!==l)throw new Error(`Unterminated ${s} value`);return r++,[r,a]}function Os(e,r){r=Ke(e,r);let s="";for(;r<e.length&&!/\s/.test(e[r]);)s+=e[r],r++;if(!$n(s))throw new Error(`Invalid element name: "${s}"`);r=Ke(e,r);let a="";if(e[r]==="E"&&tt(e,"MPTY",r))r+=6;else if(e[r]==="A"&&tt(e,"NY",r))r+=4;else if(e[r]==="("){for(r++;r<e.length&&e[r]!==")";)a+=e[r],r++;if(e[r]!==")")throw new Error("Unterminated content model")}else throw new Error(`Invalid Element Expression, found "${e[r]}"`);return{elementName:s,contentModel:a.trim(),index:r}}function tt(e,r,s){for(let a=0;a<r.length;a++)if(r[a]!==e[s+a+1])return!1;return!0}function $n(e){if(Qn(e))return e;throw new Error(`Invalid entity name ${e}`)}const Is=/^[-+]?0x[a-fA-F0-9]+$/,Rs=/^([\-\+])?(0*)([0-9]*(\.[0-9]*)?)$/,js={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};function As(e,r={}){if(r=Object.assign({},js,r),!e||typeof e!="string")return e;let s=e.trim();if(r.skipLike!==void 0&&r.skipLike.test(s))return e;if(e==="0")return 0;if(r.hex&&Is.test(s))return Fs(s,16);if(s.search(/.+[eE].+/)!==-1)return zs(e,s,r);{const a=Rs.exec(s);if(a){const l=a[1]||"",u=a[2];let h=Ls(a[3]);const g=l?e[u.length+1]===".":e[u.length]===".";if(!r.leadingZeros&&(u.length>1||u.length===1&&!g))return e;{const m=Number(s),S=String(m);if(m===0||m===-0)return m;if(S.search(/[eE]/)!==-1)return r.eNotation?m:e;if(s.indexOf(".")!==-1)return S==="0"||S===h||S===`${l}${h}`?m:e;let k=u?h:s;return u?k===S||l+k===S?m:e:k===S||k===l+S?m:e}}else return e}}const Ms=/^([-+])?(0*)(\d*(\.\d*)?[eE][-\+]?\d+)$/;function zs(e,r,s){if(!s.eNotation)return e;const a=r.match(Ms);if(a){let l=a[1]||"";const u=a[3].indexOf("e")===-1?"E":"e",h=a[2],g=l?e[h.length+1]===u:e[h.length]===u;return h.length>1&&g?e:h.length===1&&(a[3].startsWith(`.${u}`)||a[3][0]===u)?Number(r):s.leadingZeros&&!g?(r=(a[1]||"")+a[3],Number(r)):e}else return e}function Ls(e){return e&&e.indexOf(".")!==-1&&(e=e.replace(/0+$/,""),e==="."?e="0":e[0]==="."?e="0"+e:e[e.length-1]==="."&&(e=e.substring(0,e.length-1))),e}function Fs(e,r){if(parseInt)return parseInt(e,r);if(Number.parseInt)return Number.parseInt(e,r);if(window&&window.parseInt)return window.parseInt(e,r);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}function lo(e){return typeof e=="function"?e:Array.isArray(e)?r=>{for(const s of e)if(typeof s=="string"&&r===s||s instanceof RegExp&&s.test(r))return!0}:()=>!1}class Ds{constructor(r){this.options=r,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(s,a)=>String.fromCodePoint(Number.parseInt(a,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(s,a)=>String.fromCodePoint(Number.parseInt(a,16))}},this.addExternalEntities=Vs,this.parseXml=Us,this.parseTextData=Bs,this.resolveNameSpace=Hs,this.buildAttributesMap=Xs,this.isItStopNode=Js,this.replaceEntitiesValue=Ks,this.readStopNodeData=Qs,this.saveTextToParentTag=Ws,this.addChild=Gs,this.ignoreAttributesFn=lo(this.options.ignoreAttributes)}}function Vs(e){const r=Object.keys(e);for(let s=0;s<r.length;s++){const a=r[s];this.lastEntities[a]={regex:new RegExp("&"+a+";","g"),val:e[a]}}}function Bs(e,r,s,a,l,u,h){if(e!==void 0&&(this.options.trimValues&&!a&&(e=e.trim()),e.length>0)){h||(e=this.replaceEntitiesValue(e));const g=this.options.tagValueProcessor(r,e,s,l,u);return g==null?e:typeof g!=typeof e||g!==e?g:this.options.trimValues?er(e,this.options.parseTagValue,this.options.numberParseOptions):e.trim()===e?er(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function Hs(e){if(this.options.removeNSPrefix){const r=e.split(":"),s=e.charAt(0)==="/"?"/":"";if(r[0]==="xmlns")return"";r.length===2&&(e=s+r[1])}return e}const Ys=new RegExp(`([^\\s=]+)\\s*(=\\s*(['"])([\\s\\S]*?)\\3)?`,"gm");function Xs(e,r,s){if(this.options.ignoreAttributes!==!0&&typeof e=="string"){const a=oo(e,Ys),l=a.length,u={};for(let h=0;h<l;h++){const g=this.resolveNameSpace(a[h][1]);if(this.ignoreAttributesFn(g,r))continue;let m=a[h][4],S=this.options.attributeNamePrefix+g;if(g.length)if(this.options.transformAttributeName&&(S=this.options.transformAttributeName(S)),S==="__proto__"&&(S="#__proto__"),m!==void 0){this.options.trimValues&&(m=m.trim()),m=this.replaceEntitiesValue(m);const k=this.options.attributeValueProcessor(g,m,r);k==null?u[S]=m:typeof k!=typeof m||k!==m?u[S]=k:u[S]=er(m,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(u[S]=!0)}if(!Object.keys(u).length)return;if(this.options.attributesGroupName){const h={};return h[this.options.attributesGroupName]=u,h}return u}}const Us=function(e){e=e.replace(/\r\n?/g,`
25
25
  `);const r=new et("!xml");let s=r,a="",l="";for(let u=0;u<e.length;u++)if(e[u]==="<")if(e[u+1]==="/"){const g=nt(e,">",u,"Closing Tag is not closed.");let m=e.substring(u+2,g).trim();if(this.options.removeNSPrefix){const P=m.indexOf(":");P!==-1&&(m=m.substr(P+1))}this.options.transformTagName&&(m=this.options.transformTagName(m)),s&&(a=this.saveTextToParentTag(a,s,l));const S=l.substring(l.lastIndexOf(".")+1);if(m&&this.options.unpairedTags.indexOf(m)!==-1)throw new Error(`Unpaired tag can not be used as closing tag: </${m}>`);let k=0;S&&this.options.unpairedTags.indexOf(S)!==-1?(k=l.lastIndexOf(".",l.lastIndexOf(".")-1),this.tagsNodeStack.pop()):k=l.lastIndexOf("."),l=l.substring(0,k),s=this.tagsNodeStack.pop(),a="",u=g}else if(e[u+1]==="?"){let g=qn(e,u,!1,"?>");if(!g)throw new Error("Pi Tag is not closed.");if(a=this.saveTextToParentTag(a,s,l),!(this.options.ignoreDeclaration&&g.tagName==="?xml"||this.options.ignorePiTags)){const m=new et(g.tagName);m.add(this.options.textNodeName,""),g.tagName!==g.tagExp&&g.attrExpPresent&&(m[":@"]=this.buildAttributesMap(g.tagExp,l,g.tagName)),this.addChild(s,m,l,u)}u=g.closeIndex+1}else if(e.substr(u+1,3)==="!--"){const g=nt(e,"-->",u+4,"Comment is not closed.");if(this.options.commentPropName){const m=e.substring(u+4,g-2);a=this.saveTextToParentTag(a,s,l),s.add(this.options.commentPropName,[{[this.options.textNodeName]:m}])}u=g}else if(e.substr(u+1,2)==="!D"){const g=ks(e,u);this.docTypeEntities=g.entities,u=g.i}else if(e.substr(u+1,2)==="!["){const g=nt(e,"]]>",u,"CDATA is not closed.")-2,m=e.substring(u+9,g);a=this.saveTextToParentTag(a,s,l);let S=this.parseTextData(m,s.tagname,l,!0,!1,!0,!0);S==null&&(S=""),this.options.cdataPropName?s.add(this.options.cdataPropName,[{[this.options.textNodeName]:m}]):s.add(this.options.textNodeName,S),u=g+2}else{let g=qn(e,u,this.options.removeNSPrefix),m=g.tagName;const S=g.rawTagName;let k=g.tagExp,P=g.attrExpPresent,O=g.closeIndex;this.options.transformTagName&&(m=this.options.transformTagName(m)),s&&a&&s.tagname!=="!xml"&&(a=this.saveTextToParentTag(a,s,l,!1));const j=s;j&&this.options.unpairedTags.indexOf(j.tagname)!==-1&&(s=this.tagsNodeStack.pop(),l=l.substring(0,l.lastIndexOf("."))),m!==r.tagname&&(l+=l?"."+m:m);const L=u;if(this.isItStopNode(this.options.stopNodes,l,m)){let x="";if(k.length>0&&k.lastIndexOf("/")===k.length-1)m[m.length-1]==="/"?(m=m.substr(0,m.length-1),l=l.substr(0,l.length-1),k=m):k=k.substr(0,k.length-1),u=g.closeIndex;else if(this.options.unpairedTags.indexOf(m)!==-1)u=g.closeIndex;else{const $=this.readStopNodeData(e,S,O+1);if(!$)throw new Error(`Unexpected end of ${S}`);u=$.i,x=$.tagContent}const R=new et(m);m!==k&&P&&(R[":@"]=this.buildAttributesMap(k,l,m)),x&&(x=this.parseTextData(x,m,l,!0,P,!0,!0)),l=l.substr(0,l.lastIndexOf(".")),R.add(this.options.textNodeName,x),this.addChild(s,R,l,L)}else{if(k.length>0&&k.lastIndexOf("/")===k.length-1){m[m.length-1]==="/"?(m=m.substr(0,m.length-1),l=l.substr(0,l.length-1),k=m):k=k.substr(0,k.length-1),this.options.transformTagName&&(m=this.options.transformTagName(m));const x=new et(m);m!==k&&P&&(x[":@"]=this.buildAttributesMap(k,l,m)),this.addChild(s,x,l,L),l=l.substr(0,l.lastIndexOf("."))}else{const x=new et(m);this.tagsNodeStack.push(s),m!==k&&P&&(x[":@"]=this.buildAttributesMap(k,l,m)),this.addChild(s,x,l,L),s=x}a="",u=O}}else a+=e[u];return r.child};function Gs(e,r,s,a){this.options.captureMetaData||(a=void 0);const l=this.options.updateTag(r.tagname,s,r[":@"]);l===!1||(typeof l=="string"&&(r.tagname=l),e.addChild(r,a))}const Ks=function(e){if(this.options.processEntities){for(let r in this.docTypeEntities){const s=this.docTypeEntities[r];e=e.replace(s.regx,s.val)}for(let r in this.lastEntities){const s=this.lastEntities[r];e=e.replace(s.regex,s.val)}if(this.options.htmlEntities)for(let r in this.htmlEntities){const s=this.htmlEntities[r];e=e.replace(s.regex,s.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function Ws(e,r,s,a){return e&&(a===void 0&&(a=r.child.length===0),e=this.parseTextData(e,r.tagname,s,!1,r[":@"]?Object.keys(r[":@"]).length!==0:!1,a),e!==void 0&&e!==""&&r.add(this.options.textNodeName,e),e=""),e}function Js(e,r,s){const a="*."+s;for(const l in e){const u=e[l];if(a===u||r===u)return!0}return!1}function Zs(e,r,s=">"){let a,l="";for(let u=r;u<e.length;u++){let h=e[u];if(a)h===a&&(a="");else if(h==='"'||h==="'")a=h;else if(h===s[0])if(s[1]){if(e[u+1]===s[1])return{data:l,index:u}}else return{data:l,index:u};else h===" "&&(h=" ");l+=h}}function nt(e,r,s,a){const l=e.indexOf(r,s);if(l===-1)throw new Error(a);return l+r.length-1}function qn(e,r,s,a=">"){const l=Zs(e,r+1,a);if(!l)return;let u=l.data;const h=l.index,g=u.search(/\s/);let m=u,S=!0;g!==-1&&(m=u.substring(0,g),u=u.substring(g+1).trimStart());const k=m;if(s){const P=m.indexOf(":");P!==-1&&(m=m.substr(P+1),S=m!==l.data.substr(P+1))}return{tagName:m,tagExp:u,closeIndex:h,attrExpPresent:S,rawTagName:k}}function Qs(e,r,s){const a=s;let l=1;for(;s<e.length;s++)if(e[s]==="<")if(e[s+1]==="/"){const u=nt(e,">",s,`${r} is not closed`);if(e.substring(s+2,u).trim()===r&&(l--,l===0))return{tagContent:e.substring(a,s),i:u};s=u}else if(e[s+1]==="?")s=nt(e,"?>",s+1,"StopNode is not closed.");else if(e.substr(s+1,3)==="!--")s=nt(e,"-->",s+3,"StopNode is not closed.");else if(e.substr(s+1,2)==="![")s=nt(e,"]]>",s,"StopNode is not closed.")-2;else{const u=qn(e,s,">");u&&((u&&u.tagName)===r&&u.tagExp[u.tagExp.length-1]!=="/"&&l++,s=u.closeIndex)}}function er(e,r,s){if(r&&typeof e=="string"){const a=e.trim();return a==="true"?!0:a==="false"?!1:As(e,s)}else return ps(e)?e:""}const tr=et.getMetaDataSymbol();function $s(e,r){return uo(e,r)}function uo(e,r,s){let a;const l={};for(let u=0;u<e.length;u++){const h=e[u],g=qs(h);let m="";if(s===void 0?m=g:m=s+"."+g,g===r.textNodeName)a===void 0?a=h[g]:a+=""+h[g];else{if(g===void 0)continue;if(h[g]){let S=uo(h[g],r,m);const k=ta(S,r);h[tr]!==void 0&&(S[tr]=h[tr]),h[":@"]?ea(S,h[":@"],m,r):Object.keys(S).length===1&&S[r.textNodeName]!==void 0&&!r.alwaysCreateTextNode?S=S[r.textNodeName]:Object.keys(S).length===0&&(r.alwaysCreateTextNode?S[r.textNodeName]="":S=""),l[g]!==void 0&&l.hasOwnProperty(g)?(Array.isArray(l[g])||(l[g]=[l[g]]),l[g].push(S)):r.isArray(g,m,k)?l[g]=[S]:l[g]=S}}}return typeof a=="string"?a.length>0&&(l[r.textNodeName]=a):a!==void 0&&(l[r.textNodeName]=a),l}function qs(e){const r=Object.keys(e);for(let s=0;s<r.length;s++){const a=r[s];if(a!==":@")return a}}function ea(e,r,s,a){if(r){const l=Object.keys(r),u=l.length;for(let h=0;h<u;h++){const g=l[h];a.isArray(g,s+"."+g,!0,!0)?e[g]=[r[g]]:e[g]=r[g]}}}function ta(e,r){const{textNodeName:s}=r,a=Object.keys(e).length;return!!(a===0||a===1&&(e[s]||typeof e[s]=="boolean"||e[s]===0))}class na{constructor(r){this.externalEntities={},this.options=Cs(r)}parse(r,s){if(typeof r!="string")if(r.toString)r=r.toString();else throw new Error("XML data is accepted in String or Bytes[] form.");if(s){s===!0&&(s={});const u=ms(r,s);if(u!==!0)throw Error(`${u.err.msg}:${u.err.line}:${u.err.col}`)}const a=new Ds(this.options);a.addExternalEntities(this.externalEntities);const l=a.parseXml(r);return this.options.preserveOrder||l===void 0?l:$s(l,this.options)}addEntity(r,s){if(s.indexOf("&")!==-1)throw new Error("Entity value can't have '&'");if(r.indexOf("&")!==-1||r.indexOf(";")!==-1)throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if(s==="&")throw new Error("An entity with value '&' is not permitted");this.externalEntities[r]=s}static getMetaDataSymbol(){return et.getMetaDataSymbol()}}const ra=`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "etudes",
3
- "version": "16.0.2",
3
+ "version": "16.0.3",
4
4
  "description": "A study of headless React components",
5
5
  "type": "module",
6
6
  "main": "./build/etudes.umd.cjs",
@@ -42,30 +42,30 @@
42
42
  "license": "MIT",
43
43
  "devDependencies": {
44
44
  "@commitlint/config-conventional": "^19.8.1",
45
- "@eslint/js": "^9.26.0",
45
+ "@eslint/js": "^9.27.0",
46
46
  "@semantic-release/changelog": "^6.0.3",
47
47
  "@semantic-release/git": "^10.0.1",
48
48
  "@stylistic/eslint-plugin": "^4.2.0",
49
- "@tailwindcss/vite": "^4.1.6",
50
- "@types/node": "^22.15.17",
49
+ "@tailwindcss/vite": "^4.1.7",
50
+ "@types/node": "^22.15.19",
51
51
  "@types/react": "^19.1.4",
52
52
  "@types/react-dom": "^19.1.5",
53
53
  "@vitejs/plugin-react": "^4.4.1",
54
- "@vitest/coverage-v8": "^3.1.3",
54
+ "@vitest/coverage-v8": "^3.1.4",
55
55
  "concurrently": "^9.1.2",
56
- "eslint": "^9.26.0",
56
+ "eslint": "^9.27.0",
57
57
  "react": "^19.1.0",
58
58
  "react-dom": "^19.1.0",
59
59
  "react-router": "^7.6.0",
60
60
  "rimraf": "^6.0.1",
61
- "semantic-release": "^24.2.3",
62
- "tailwindcss": "^4.1.6",
61
+ "semantic-release": "^24.2.4",
62
+ "tailwindcss": "^4.1.7",
63
63
  "tailwindcss-safe-area": "^0.6.0",
64
64
  "typescript": "^5.8.3",
65
65
  "typescript-eslint": "^8.32.1",
66
66
  "vite": "^6.3.5",
67
- "vite-plugin-dts": "^4.5.3",
68
- "vitest": "^3.1.3",
67
+ "vite-plugin-dts": "^4.5.4",
68
+ "vitest": "^3.1.4",
69
69
  "wait-on": "^8.0.3"
70
70
  },
71
71
  "dependencies": {