@gouvfr-lasuite/ui-kit 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -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} />`,O,W,Y,W),G[W+O]=!0)}if(W=null,_!==void 0&&(n(_),W=""+_),l(F)&&(n(F.key),W=""+F.key),"key"in F){_={};for(var J in F)J!=="key"&&(_[J]=F[J])}else _=F;return W&&a(_,typeof T=="function"?T.displayName||T.name||"Unknown":T),c(T,W,M,K,i(),_,z,V)}function f(T){typeof T=="object"&&T!==null&&T.$$typeof===v&&T._store&&(T._store.validated=1)}var h=u,v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),S=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),w=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,B=Array.isArray,L=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(T){return T()}};var U,I={},R=h["react-stack-bottom-frame"].bind(h,o)(),k=L(r(o)),G={};Pn.Fragment=p,Pn.jsx=function(T,F,_,O,K){var M=1e4>w.recentlyCreatedOwnerStacks++;return d(T,F,_,!1,O,K,M?Error("react-stack-top-frame"):R,M?L(r(T)):k)},Pn.jsxs=function(T,F,_,O,K){var M=1e4>w.recentlyCreatedOwnerStacks++;return d(T,F,_,!0,O,K,M?Error("react-stack-top-frame"):R,M?L(r(T)):k)}}()),Pn}var ca;function V2(){return ca||(ca=1,process.env.NODE_ENV==="production"?rr.exports=H2():rr.exports=z2()),rr.exports}var y=V2();const B2={alert:{close_aria_label:"Delete alert",expand_aria_label:"Expand alert",shrink_aria_label:"Shrink alert"},pagination:{goto_label:"Go to page",goto_label_aria:"Go to any page",next_aria:"Go to next page",previous_aria:"Go to previous page",goto_page_aria:"Go to page {page}",current_page_aria:"You are currently on page {page}"},datagrid:{empty:"This table is empty",empty_alt:"Illustration of an empty table",loader_aria:"Loading data",rows_selection_aria:"All rows selection",row_selection_aria:"Row selection"},provider:{test:"This is a test: {name}"},forms:{input:{password:{show_password:"Show password",hide_password:"Hide password"}},select:{toggle_button_aria_label:"Toggle dropdown",clear_button_aria_label:"Clear selection",clear_all_button_aria_label:"Clear all selections",menu_empty_placeholder:"No options available"},file_uploader:{delete_file_name:"Delete file {name}",delete_file:"Delete file",uploading:"Uploading...",caption:"Drag and drop or ",browse_files:"Browse files"},date_picker:{toggle_button_aria_label_open:"Open calendar",toggle_button_aria_label_close:"Close calendar",clear_button_aria_label:"Clear date",next_month_button_aria_label:"Next month",next_year_button_aria_label:"Next year",previous_month_button_aria_label:"Previous month",previous_year_button_aria_label:"Previous year",year_select_button_aria_label:"Select a year",month_select_button_aria_label:"Select a month"}},modals:{helpers:{delete_confirmation:{title:"Are you sure?",children:"Are you sure to delete this item?",cancel:"Cancel",delete:"Delete"},confirmation:{title:"Are you sure?",children:"Are you sure you want to do that?",cancel:"Cancel",yes:"Yes"},disclaimer:{title:"Disclaimer",children:"This is a disclaimer",ok:"Ok"}}}},U2={components:B2},W2={alert:{close_aria_label:"Supprimer l'alerte",expand_aria_label:"Ouvrir l'alerte",shrink_aria_label:"Fermer l'alerte"},pagination:{goto_label:"Aller à",goto_label_aria:"Aller à la page",next_aria:"Aller à la page suivante",previous_aria:"Aller à la page précédente",goto_page_aria:"Aller à la page {page}",current_page_aria:"Vous êtes actuellement sur la page {page}"},datagrid:{empty:"Ce tableau est vide",empty_alt:"Illustration d'un tableau vide",loader_aria:"Loading data"},provider:{test:"Ceci est un test : {name}"},forms:{select:{toggle_button_aria_label:"Ouvrir le menu",clear_button_aria_label:"Effacer la sélection",clear_all_button_aria_label:"Effacer toutes les sélections",menu_empty_placeholder:"Aucun choix disponible"},file_uploader:{delete_file_name:"Supprimer le fichier {name}",delete_file:"Supprimer le fichier",uploading:"Upload en cours ...",caption:"Glisser-déposer ou ",browse_files:"Parcourir"},date_picker:{toggle_button_aria_label_open:"Ouvrir le calendrier",toggle_button_aria_label_close:"Fermer le calendrier",clear_button_aria_label:"Effacer la date",next_month_button_aria_label:"Mois suivant",next_year_button_aria_label:"Année suivante",previous_month_button_aria_label:"Mois précédent",previous_year_button_aria_label:"Année précédente",year_select_button_aria_label:"Sélectionner une année",month_select_button_aria_label:"Sélectionner un mois"}}},G2={components:W2},q2={share:{copyLink:"Copy link",ok:"Ok",shareButton:"Share",modalTitle:"Share folder",access:{delete:"Remove access"},cannot_view:{message:"You can view this item but you need additional access to view its members or modify the settings."},invitations:{title:"Pending invitations"},members:{title:"Members",title_plural:"Shared between {count} people",title_singular:"Shared between {count} person",load_more:"Show more "},item:{add:"Add"},search:{placeholder:"Search user",group_name:"Search user result"},user:{no_result:"No result",placeholder:"Search user"},linkSettings:{title:"Link settings",reach:{choices:{public:{title:"Public",description:"Anyone with the link can access the document"},restricted:{title:"Private",description:"Only users of the space can access the document"}}},role:{choices:{reader:{title:"Reader"},editor:{title:"Editor"}}}}},footer:{links:{legal:"Legal mentions",personal_data:"Personal data and cookies",accessibility:"Accessibility"},mention:"Unless otherwise stated, all content on this site is under the",license:"etalab-2.0 license"}},Y2={components:q2},Z2={share:{copyLink:"Copier le lien",ok:"Ok",modalTitle:"Partage",shareButton:"Partager",access:{delete:"Retirer l'accès"},cannot_view:{message:"Vous pouvez voir cet élément mais vous avez besoin d'un accès supplémentaire pour voir ses membres ou modifier les paramètres."},invitations:{title:"Invitations en attente"},members:{title_plural:"Partagé entre {count} personnes",title_singular:"Partagé entre {count} personne",load_more:"Afficher plus"},item:{add:"Ajouter"},search:{placeholder:"Rechercher un utilisateur",group_name:"Résultat de la recherche d'utilisateur"},user:{no_result:"Aucun résultat",placeholder:"Rechercher un utilisateur"},linkSettings:{title:"Paramètres du lien",reach:{choices:{public:{title:"Public",description:"N'importe qui avec le lien peut accéder au document"},restricted:{title:"Privé",description:"Seulement les utilisateurs de l'espace peuvent y avoir accès"}}},role:{choices:{reader:{title:"Lecture seule"},editor:{title:"Édition"}}}}},footer:{links:{legal:"Mentions Légales",personal_data:"Données personnelles et cookies",accessibility:"Accessibilité"},mention:"Sauf mention contraire, tout le contenu de ce site est sous",license:"licence etalab-2.0"}},X2={components:Z2};function Ri(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Ar(t,...e){if(!e.length)return t;const n=e.shift();if(Ri(t)&&Ri(n))for(const r in n)Ri(n[r])?(t[r]||Object.assign(t,{[r]:{}}),Ar(t[r],n[r])):Object.assign(t,{[r]:n[r]});return Ar(t,...e)}function Vc(){return{"en-US":Ar(U2,Y2),"fr-FR":Ar(G2,X2)}}const J2=t=>{const e=Vc();return y.jsx(le.CunninghamProvider,{theme:"dsfr",customLocales:e,...t})},Bc=({disabled:t,onClick:e})=>y.jsx(le.Button,{disabled:t,className:"pro-connect-button",onClick:e}),ne=typeof document<"u"?u.useLayoutEffect:()=>{};function he(t){const e=u.useRef(null);return ne(()=>{e.current=t},[t]),u.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function Q2(t){let[e,n]=u.useState(t),r=u.useRef(null),i=he(()=>{if(!r.current)return;let l=r.current.next();if(l.done){r.current=null;return}e===l.value?i():n(l.value)});ne(()=>{r.current&&i()});let o=he(l=>{r.current=l(e),i()});return[e,o]}const Fr={prefix:String(Math.round(Math.random()*1e10)),current:0},Uc=u.createContext(Fr),eh=u.createContext(!1);let th=!!(typeof window<"u"&&window.document&&window.document.createElement),Mi=new WeakMap;function nh(t=!1){let e=u.useContext(Uc),n=u.useRef(null);if(n.current===null&&!t){var r,i;let o=(i=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let l=Mi.get(o);l==null?Mi.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==l.state&&(e.current=l.id,Mi.delete(o))}n.current=++e.current}return n.current}function rh(t){let e=u.useContext(Uc);e===Fr&&!th&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=nh(!!t),r=e===Fr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function ih(t){let e=u.useId(),[n]=u.useState(Qn()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Fr.prefix}`;return t||`${r}-${e}`}const oh=typeof u.useId=="function"?ih:rh;function lh(){return!1}function ah(){return!0}function sh(t){return()=>{}}function Qn(){return typeof u.useSyncExternalStore=="function"?u.useSyncExternalStore(sh,lh,ah):u.useContext(eh)}let ch=!!(typeof window<"u"&&window.document&&window.document.createElement),an=new Map,Rn;typeof FinalizationRegistry<"u"&&(Rn=new FinalizationRegistry(t=>{an.delete(t)}));function Se(t){let[e,n]=u.useState(t),r=u.useRef(null),i=oh(e),o=u.useRef(null);if(Rn&&Rn.register(o,i),ch){const l=an.get(i);l&&!l.includes(r)?l.push(r):an.set(i,[r])}return ne(()=>{let l=i;return()=>{Rn&&Rn.unregister(o),an.delete(l)}},[i]),u.useEffect(()=>{let l=r.current;return l&&n(l),()=>{l&&(r.current=null)}}),i}function uh(t,e){if(t===e)return t;let n=an.get(t);if(n)return n.forEach(i=>i.current=e),e;let r=an.get(e);return r?(r.forEach(i=>i.current=t),t):e}function xt(t=[]){let e=Se(),[n,r]=Q2(e),i=u.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return ne(i,[e,i,...t]),n}function Dt(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const oe=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},Me=t=>t&&"window"in t&&t.window===t?t:oe(t).defaultView||window;function dh(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function fh(t){return dh(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let hh=!1;function ni(){return hh}function ce(t,e){if(!ni())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let n=e;for(;n!==null;){if(n===t)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:fh(n)?n=n.host:n=n.parentNode}return!1}const Ce=(t=document)=>{var e;if(!ni())return t.activeElement;let n=t.activeElement;for(;n&&"shadowRoot"in n&&(!((e=n.shadowRoot)===null||e===void 0)&&e.activeElement);)n=n.shadowRoot.activeElement;return n};function ie(t){return ni()&&t.target.shadowRoot&&t.composedPath?t.composedPath()[0]:t.target}class ph{get currentNode(){return this._currentNode}set currentNode(e){if(!ce(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=e,i=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=r,a=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});n.push(a),a.currentNode=i,this._currentSetFor.add(a),r=i=l.host}else r=r.parentNode;const o=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(o),o.currentNode=i,this._currentSetFor.add(o),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return ce(e,n)?(n&&(this.currentNode=n),n):(this.currentNode=e,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){var n;let i;if(typeof this.filter=="function"?i=this.filter(e):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(i=this.filter.acceptNode(e)),i===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let o=this.nextNode();return o&&(this.currentNode=o),o}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null;return null}const n=e.previousNode();if(n){if(n.shadowRoot){var r;let o;if(typeof this.filter=="function"?o=this.filter(n):!((r=this.filter)===null||r===void 0)&&r.acceptNode&&(o=this.filter.acceptNode(n)),o===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let l=this.lastChild();return l&&(this.currentNode=l),l}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(e,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{if(l.nodeType===Node.ELEMENT_NODE){const s=l.shadowRoot;if(s){const c=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{var a;if(typeof this.filter=="function")return this.filter(l);if(!((a=this.filter)===null||a===void 0)&&a.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=n,this.filter=i??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(e.createTreeWalker(n,r,this._acceptNode));const o=n.shadowRoot;if(o){const l=this._doc.createTreeWalker(o,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}}function vh(t,e,n,r){return ni()?new ph(t,e,n,r):t.createTreeWalker(e,n,r)}function Wc(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Wc(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Pe(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Wc(t))&&(r&&(r+=" "),r+=e);return r}function re(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],l=r[i];typeof o=="function"&&typeof l=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Dt(o,l):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof l=="string"?e[i]=Pe(o,l):i==="id"&&o&&l?e.id=uh(o,l):e[i]=l!==void 0?l:o}}return e}function ul(...t){return t.length===1&&t[0]?t[0]:e=>{let n=!1;const r=t.map(i=>{const o=ua(i,e);return n||(n=typeof o=="function"),o});if(n)return()=>{r.forEach((i,o)=>{typeof i=="function"?i():ua(t[o],null)})}}}function ua(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}const gh=new Set(["id"]),mh=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),bh=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),yh=/^(data-.*)$/;function pe(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const l in t)Object.prototype.hasOwnProperty.call(t,l)&&(gh.has(l)||n&&mh.has(l)||r&&bh.has(l)||i!=null&&i.has(l)||yh.test(l))&&(o[l]=t[l]);return o}function ze(t){if(Ch())t.focus({preventScroll:!0});else{let e=Sh(t);t.focus(),wh(e)}}let ir=null;function Ch(){if(ir==null){ir=!1;try{document.createElement("div").focus({get preventScroll(){return ir=!0,!0}})}catch{}}return ir}function Sh(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function wh(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ri(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function dl(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function et(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const ft=et(function(){return dl(/^Mac/i)}),xh=et(function(){return dl(/^iPhone/i)}),Gc=et(function(){return dl(/^iPad/i)||ft()&&navigator.maxTouchPoints>1}),ii=et(function(){return xh()||Gc()}),Eh=et(function(){return ft()||ii()}),fl=et(function(){return ri(/AppleWebKit/i)&&!qc()}),qc=et(function(){return ri(/Chrome/i)}),hl=et(function(){return ri(/Android/i)}),$h=et(function(){return ri(/Firefox/i)}),Ph=u.createContext({isNative:!0,open:_h,useHref:t=>t});function oi(){return u.useContext(Ph)}function _t(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:l,altKey:a,shiftKey:s}=e;$h()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(ft()?o=!0:l=!0);let c=fl()&&ft()&&!Gc()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:l,altKey:a,shiftKey:s}):new MouseEvent("click",{metaKey:o,ctrlKey:l,altKey:a,shiftKey:s,bubbles:!0,cancelable:!0});_t.isOpening=n,ze(t),t.dispatchEvent(c),_t.isOpening=!1}_t.isOpening=!1;function Dh(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function _h(t,e){Dh(t,n=>_t(n,e))}function pl(t){let e=oi();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let st=new Map,Eo=new Set;function da(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=st.get(r.target);i||(i=new Set,st.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=st.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),st.delete(r.target)),st.size===0)){for(let o of Eo)o();Eo.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?da():document.addEventListener("DOMContentLoaded",da));function Th(){for(const[t]of st)"isConnected"in t&&!t.isConnected&&st.delete(t)}function Yc(t){requestAnimationFrame(()=>{Th(),st.size===0?t():Eo.add(t)})}function li(){let t=u.useRef(new Map),e=u.useCallback((i,o,l,a)=>{let s=a!=null&&a.once?(...c)=>{t.current.delete(l),l(...c)}:l;t.current.set(l,{type:o,eventTarget:i,fn:s,options:a}),i.addEventListener(o,s,a)},[]),n=u.useCallback((i,o,l,a)=>{var s;let c=((s=t.current.get(l))===null||s===void 0?void 0:s.fn)||l;i.removeEventListener(o,c,a),t.current.delete(l)},[]),r=u.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return u.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function ai(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=Se(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function tt(t){const e=u.useRef(null),n=u.useRef(void 0),r=u.useCallback(i=>{if(typeof t=="function"){const o=t,l=o(i);return()=>{typeof l=="function"?l():o(null)}}else if(t)return t.current=i,()=>{t.current=null}},[t]);return u.useMemo(()=>({get current(){return e.current},set current(i){e.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function fa(t,e){const n=u.useRef(!0),r=u.useRef(null);ne(()=>(n.current=!0,()=>{n.current=!1}),[]),ne(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function Ih(){return typeof window.ResizeObserver<"u"}function $o(t){const{ref:e,box:n,onResize:r}=t;u.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Ih()){const o=new window.ResizeObserver(l=>{l.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function Zc(t,e){ne(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Bn(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function Xc(t,e){let n=t;for(Bn(n,e)&&(n=n.parentElement);n&&!Bn(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function Oh(t,e){const n=[];for(;t&&t!==document.documentElement;)Bn(t,e)&&n.push(t),t=t.parentElement;return n}let kh=0;const Li=new Map;function Nh(t){let[e,n]=u.useState();return ne(()=>{if(!t)return;let r=Li.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${kh++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},Li.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Li.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function or(t,e,n,r){let i=he(n),o=n==null;u.useEffect(()=>{if(o||!t.current)return;let l=t.current;return l.addEventListener(e,i,r),()=>{l.removeEventListener(e,i,r)}},[t,e,r,o,i])}function Jc(t,e){let n=ha(t,e,"left"),r=ha(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,l=t.scrollLeft,a=t.scrollTop,{borderTopWidth:s,borderLeftWidth:c,scrollPaddingTop:d,scrollPaddingRight:f,scrollPaddingBottom:h,scrollPaddingLeft:v}=getComputedStyle(t),b=l+parseInt(c,10),p=a+parseInt(s,10),g=b+t.clientWidth,m=p+t.clientHeight,C=parseInt(d,10)||0,S=parseInt(h,10)||0,P=parseInt(f,10)||0,$=parseInt(v,10)||0;n<=l+$?l=n-parseInt(c,10)-$:n+i>g-P&&(l+=n+i-g+P),r<=p+C?a=r-parseInt(s,10)-C:r+o>m-S&&(a+=r+o-m+S),t.scrollLeft=l,t.scrollTop=a}function ha(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function pa(t,e){if(t&&document.contains(t)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let s=Oh(t);for(let c of s)Jc(c,t)}else{var n;let{left:s,top:c}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:d,top:f}=t.getBoundingClientRect();if(Math.abs(s-d)>1||Math.abs(c-f)>1){var r,i,o;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function Po(t){return t.mozInputSource===0&&t.isTrusted?!0:hl()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Rh(t){return!hl()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function Mh(t,e,n){let r=u.useRef(e),i=he(()=>{n&&n(r.current)});u.useEffect(()=>{var o;let l=t==null||(o=t.current)===null||o===void 0?void 0:o.form;return l==null||l.addEventListener("reset",i),()=>{l==null||l.removeEventListener("reset",i)}},[t,i])}function Lh(t){const e=u.version.split(".");return parseInt(e[0],10)>=19?t:t?"true":void 0}const Ah="react-aria-clear-focus",Fh="react-aria-focus";function en(t){return ft()?t.metaKey:t.ctrlKey}function Kh(t,e=!0){let[n,r]=u.useState(!0),i=n&&e;return ne(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),Qc(t,i,u.useCallback(()=>r(!1),[])),i}function jh(t,e){let[n,r]=u.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return Qc(t,i,u.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Qc(t,e,n){ne(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||Lt.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}const vl=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Hh=vl.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";vl.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const zh=vl.join(':not([hidden]):not([tabindex="-1"]),');function eu(t){return t.matches(Hh)}function Vh(t){return t.matches(zh)}function si(t,e,n){let[r,i]=u.useState(t||e),o=u.useRef(t!==void 0),l=t!==void 0;u.useEffect(()=>{let c=o.current;c!==l&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),o.current=l},[l]);let a=l?t:r,s=u.useCallback((c,...d)=>{let f=(h,...v)=>{n&&(Object.is(a,h)||n(h,...v)),l||(a=h)};typeof c=="function"?(process.env.NODE_ENV!=="production"&&console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((v,...b)=>{let p=c(l?a:v,...b);return f(p,...d),l?v:p})):(l||i(c),f(c,...d))},[l,a,n]);return[a,s]}function Do(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const gl=Symbol("default");function pt({values:t,children:e}){for(let[n,r]of t)e=u.createElement(n.Provider,{value:r},e);return e}function De(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:l,values:a}=t;return u.useMemo(()=>{let s,c,d;return typeof e=="function"?s=e({...a,defaultClassName:i}):s=e,typeof n=="function"?c=n({...a,defaultStyle:l||{}}):c=n,typeof r=="function"?d=r({...a,defaultChildren:o}):r==null?d=o:d=r,{className:s??i,style:c||l?{...l,...c}:void 0,children:d??o,"data-rac":""}},[e,n,r,i,o,l,a])}function ci(t,e){let n=u.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||gl;if(!n.slots[r]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(l=>`"${l}"`)),o=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${o} Valid slot names are ${i}.`)}return n.slots[r]}return n}function nt(t,e,n){let r=ci(n,t.slot)||{},{ref:i,...o}=r,l=tt(u.useMemo(()=>ul(e,i),[e,i])),a=re(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?a.style=s=>{let c=typeof o.style=="function"?o.style(s):o.style,d={...s.defaultStyle,...c},f=typeof t.style=="function"?t.style({...s,defaultStyle:d}):t.style;return{...d,...f}}:a.style={...o.style,...t.style}),[a,l]}function ml(t=!0){let[e,n]=u.useState(t),r=u.useRef(!1),i=u.useCallback(o=>{r.current=!0,n(!!o)},[]);return ne(()=>{r.current||n(!1)},[]),[i,e]}function Bh(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}class bl{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new bl(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=e,this.key=n}}class yl{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}UNSTABLE_filter(e){let n=new yl,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),l=null;for(let a of this.getChildren(i.key))if(va(a,e,this,n)){let s=a.clone();l==null&&(o.firstChildKey=s.key),n.firstKey==null&&(n.firstKey=o.key),l&&l.parentKey===s.parentKey?(l.nextKey=s.key,s.prevKey=l.key):s.prevKey=null,s.nextKey=null,n.addNode(s),l=s}l&&(l.type!=="header"?(o.lastChildKey=l.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(l.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else{let o=i.clone();va(o,e,this,n)&&(n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o)}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function va(t,e,n,r){if(t.type==="subdialogtrigger"||t.type==="submenutrigger"){let i=[...n.getChildren(t.key)][0];if(i&&e(i.textValue)){let o=i.clone();return r.addNode(o),!0}else return!1}else return t.type==="header"?!0:e(t.textValue)}class tu{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e)}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode,this.invalidateChildIndices(n),this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class sn extends tu{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof sn?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,n,r;let i=this.nextVisibleSibling,o=this.getMutableNode();o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof sn?this.parentNode.node.key:null;var l;o.prevKey=(l=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&l!==void 0?l:null;var a;o.nextKey=(a=i==null?void 0:i.node.key)!==null&&a!==void 0?a:null,o.hasChildNodes=!!this.firstChild;var s;o.firstChildKey=(s=(n=this.firstVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null;var c;if(o.lastChildKey=(c=(r=this.lastVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&c!==void 0?c:null,(o.colSpan!=null||o.colIndex!=null)&&i){var d,f;let h=((d=o.colIndex)!==null&&d!==void 0?d:o.index)+((f=o.colSpan)!==null&&f!==void 0?f:1);if(h!==i.node.colIndex){let v=i.getMutableNode();v.colIndex=h}}}setProps(e,n,r,i){let o=this.getMutableNode(),{value:l,textValue:a,id:s,...c}=e;if(c.ref=n,o.props=c,o.rendered=r,o.render=i,o.value=l,o.textValue=a||(typeof c.children=="string"?c.children:"")||e["aria-label"]||"",s!=null&&s!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=s}c.colSpan!=null&&(o.colSpan=c.colSpan),this.hasSetProps=!0,this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(n){let r=n==="none";if(e.isHidden!==r){var i,o;(((i=e.parentNode)===null||i===void 0?void 0:i.firstVisibleChild)===e||((o=e.parentNode)===null||o===void 0?void 0:o.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let l=e.previousVisibleSibling,a=e.nextVisibleSibling;l&&e.ownerDocument.markDirty(l),a&&e.ownerDocument.markDirty(a),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new bl(e,`react-aria-${++n.nodeId}`)}}class Uh extends tu{get isConnected(){return this.isMounted}createElement(e){return new sn(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof sn&&(!o.isConnected||o.isHidden)?this.removeNode(o):o.updateChildIndices();for(let o of this.dirtyNodes)o instanceof sn&&(o.isConnected&&!o.isHidden&&(o.updateNode(),this.addNode(o)),o.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,n,r,i;this.nextCollection.commit((r=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function nu(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,l=u.useMemo(()=>new WeakMap,o);return u.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let d of n){let f=l.get(d);if(!f){f=e(d);var a,s;let h=(s=(a=f.props.id)!==null&&a!==void 0?a:d.key)!==null&&s!==void 0?s:d.id;if(h==null)throw new Error("Could not determine key for item");r&&(h=r+":"+h),f=u.cloneElement(f,i?{key:h,id:h,value:d}:{key:h}),l.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,n,l,r,i])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Kr=u.createContext(!1);function Wh(t){if(u.useContext(Kr))return u.createElement(u.Fragment,null,t.children);let n=u.createElement(Kr.Provider,{value:!0},t.children);return u.createElement("template",{"data-react-aria-hidden":!0},n)}function Cl(t){let e=(n,r)=>u.useContext(Kr)?null:t(n,r);return e.displayName=t.displayName||t.name,u.forwardRef(e)}function Gh(){return u.useContext(Kr)}function Sl(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function ru(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function iu(t){let e=u.useRef({isFocused:!1,observer:null});ne(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=he(r=>{t==null||t(r)});return u.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=l=>{if(e.current.isFocused=!1,i.disabled){let a=Sl(l);n(a)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var l;(l=e.current.observer)===null||l===void 0||l.disconnect();let a=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let jr=!1;function ga(t){for(;t&&!eu(t);)t=t.parentElement;let e=Me(t),n=e.document.activeElement;if(!n||n===t)return;jr=!0;let r=!1,i=d=>{(d.target===n||r)&&d.stopImmediatePropagation()},o=d=>{(d.target===n||r)&&(d.stopImmediatePropagation(),!t&&!r&&(r=!0,ze(n),s()))},l=d=>{(d.target===t||r)&&d.stopImmediatePropagation()},a=d=>{(d.target===t||r)&&(d.stopImmediatePropagation(),r||(r=!0,ze(n),s()))};e.addEventListener("blur",i,!0),e.addEventListener("focusout",o,!0),e.addEventListener("focusin",a,!0),e.addEventListener("focus",l,!0);let s=()=>{cancelAnimationFrame(c),e.removeEventListener("blur",i,!0),e.removeEventListener("focusout",o,!0),e.removeEventListener("focusin",a,!0),e.removeEventListener("focus",l,!0),jr=!1,r=!1},c=requestAnimationFrame(s);return s}let rn="default",_o="",Er=new WeakMap;function ma(t){if(ii()){if(rn==="default"){const e=oe(t);_o=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}rn="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";Er.set(t,t.style[e]),t.style[e]="none"}}function Ai(t){if(ii()){if(rn!=="disabled")return;rn="restoring",setTimeout(()=>{Yc(()=>{if(rn==="restoring"){const e=oe(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=_o||""),_o="",rn="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&Er.has(t)){let e=Er.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),Er.delete(t)}}const wl=u.createContext({register:()=>{}});wl.displayName="PressResponderContext";function qh(t,e){return e.get?e.get.call(t):e.value}function ou(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Yh(t,e){var n=ou(t,e,"get");return qh(t,n)}function Zh(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xh(t,e,n){Zh(t,e),e.set(t,n)}function Jh(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function ba(t,e,n){var r=ou(t,e,"set");return Jh(t,r,n),n}function Qh(t){let e=u.useContext(wl);if(e){let{register:n,...r}=e;t=re(r,t),n()}return Zc(e,t.ref),t}var lr=new WeakMap;class ar{continuePropagation(){ba(this,lr,!1)}get shouldStopPropagation(){return Yh(this,lr)}constructor(e,n,r,i){Xh(this,lr,{writable:!0,value:void 0}),ba(this,lr,!0);var o;let l=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const a=l==null?void 0:l.getBoundingClientRect();let s,c=0,d,f=null;r.clientX!=null&&r.clientY!=null&&(d=r.clientX,f=r.clientY),a&&(d!=null&&f!=null?(s=d-a.left,c=f-a.top):(s=a.width/2,c=a.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=c}}const ya=Symbol("linkClicked"),Ca="react-aria-pressable-style",Sa="data-react-aria-pressable";function ui(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,onClick:l,isDisabled:a,isPressed:s,preventFocusOnPress:c,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:h,...v}=Qh(t),[b,p]=u.useState(!1),g=u.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:m,removeAllGlobalListeners:C}=li(),S=he((w,A)=>{let B=g.current;if(a||B.didFirePressStart)return!1;let L=!0;if(B.isTriggeringEvent=!0,r){let U=new ar("pressstart",A,w);r(U),L=U.shouldStopPropagation}return n&&n(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,p(!0),L}),P=he((w,A,B=!0)=>{let L=g.current;if(!L.didFirePressStart)return!1;L.didFirePressStart=!1,L.isTriggeringEvent=!0;let U=!0;if(i){let I=new ar("pressend",A,w);i(I),U=I.shouldStopPropagation}if(n&&n(!1),p(!1),e&&B&&!a){let I=new ar("press",A,w);e(I),U&&(U=I.shouldStopPropagation)}return L.isTriggeringEvent=!1,U}),$=he((w,A)=>{let B=g.current;if(a)return!1;if(o){B.isTriggeringEvent=!0;let L=new ar("pressup",A,w);return o(L),B.isTriggeringEvent=!1,L.shouldStopPropagation}return!0}),x=he(w=>{let A=g.current;if(A.isPressed&&A.target){A.didFirePressStart&&A.pointerType!=null&&P(vt(A.target,w),A.pointerType,!1),A.isPressed=!1,A.isOverTarget=!1,A.activePointerId=null,A.pointerType=null,C(),f||Ai(A.target);for(let B of A.disposables)B();A.disposables=[]}}),E=he(w=>{d&&x(w)}),N=he(w=>{l==null||l(w)}),H=he((w,A)=>{if(l){let B=new MouseEvent("click",w);ru(B,A),l(Sl(B))}}),j=u.useMemo(()=>{let w=g.current,A={onKeyDown(L){if(Fi(L.nativeEvent,L.currentTarget)&&ce(L.currentTarget,ie(L.nativeEvent))){var U;Ea(ie(L.nativeEvent),L.key)&&L.preventDefault();let I=!0;if(!w.isPressed&&!L.repeat){w.target=L.currentTarget,w.isPressed=!0,w.pointerType="keyboard",I=S(L,"keyboard");let R=L.currentTarget,k=G=>{Fi(G,R)&&!G.repeat&&ce(R,ie(G))&&w.target&&$(vt(w.target,G),"keyboard")};m(oe(L.currentTarget),"keyup",Dt(k,B),!0)}I&&L.stopPropagation(),L.metaKey&&ft()&&((U=w.metaKeyEvents)===null||U===void 0||U.set(L.key,L.nativeEvent))}else L.key==="Meta"&&(w.metaKeyEvents=new Map)},onClick(L){if(!(L&&!ce(L.currentTarget,ie(L.nativeEvent)))&&L&&L.button===0&&!w.isTriggeringEvent&&!_t.isOpening){let U=!0;if(a&&L.preventDefault(),!w.ignoreEmulatedMouseEvents&&!w.isPressed&&(w.pointerType==="virtual"||Po(L.nativeEvent))){let I=S(L,"virtual"),R=$(L,"virtual"),k=P(L,"virtual");N(L),U=I&&R&&k}else if(w.isPressed&&w.pointerType!=="keyboard"){let I=w.pointerType||L.nativeEvent.pointerType||"virtual",R=$(vt(L.currentTarget,L),I),k=P(vt(L.currentTarget,L),I,!0);U=R&&k,w.isOverTarget=!1,N(L),x(L)}w.ignoreEmulatedMouseEvents=!1,U&&L.stopPropagation()}}},B=L=>{var U;if(w.isPressed&&w.target&&Fi(L,w.target)){var I;Ea(ie(L),L.key)&&L.preventDefault();let k=ie(L),G=ce(w.target,ie(L));P(vt(w.target,L),"keyboard",G),G&&H(L,w.target),C(),L.key!=="Enter"&&xl(w.target)&&ce(w.target,k)&&!L[ya]&&(L[ya]=!0,_t(w.target,L,!1)),w.isPressed=!1,(I=w.metaKeyEvents)===null||I===void 0||I.delete(L.key)}else if(L.key==="Meta"&&(!((U=w.metaKeyEvents)===null||U===void 0)&&U.size)){var R;let k=w.metaKeyEvents;w.metaKeyEvents=void 0;for(let G of k.values())(R=w.target)===null||R===void 0||R.dispatchEvent(new KeyboardEvent("keyup",G))}};if(typeof PointerEvent<"u"){A.onPointerDown=I=>{if(I.button!==0||!ce(I.currentTarget,ie(I.nativeEvent)))return;if(Rh(I.nativeEvent)){w.pointerType="virtual";return}w.pointerType=I.pointerType;let R=!0;if(!w.isPressed){w.isPressed=!0,w.isOverTarget=!0,w.activePointerId=I.pointerId,w.target=I.currentTarget,f||ma(w.target),R=S(I,w.pointerType);let k=ie(I.nativeEvent);"releasePointerCapture"in k&&k.releasePointerCapture(I.pointerId),m(oe(I.currentTarget),"pointerup",L,!1),m(oe(I.currentTarget),"pointercancel",U,!1)}R&&I.stopPropagation()},A.onMouseDown=I=>{if(ce(I.currentTarget,ie(I.nativeEvent))&&I.button===0){if(c){let R=ga(I.target);R&&w.disposables.push(R)}I.stopPropagation()}},A.onPointerUp=I=>{!ce(I.currentTarget,ie(I.nativeEvent))||w.pointerType==="virtual"||I.button===0&&!w.isPressed&&$(I,w.pointerType||I.pointerType)},A.onPointerEnter=I=>{I.pointerId===w.activePointerId&&w.target&&!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,S(vt(w.target,I),w.pointerType))},A.onPointerLeave=I=>{I.pointerId===w.activePointerId&&w.target&&w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,P(vt(w.target,I),w.pointerType,!1),E(I))};let L=I=>{if(I.pointerId===w.activePointerId&&w.isPressed&&I.button===0&&w.target){if(ce(w.target,ie(I))&&w.pointerType!=null){let R=!1,k=setTimeout(()=>{w.isPressed&&w.target instanceof HTMLElement&&(R?x(I):(ze(w.target),w.target.click()))},80);m(I.currentTarget,"click",()=>R=!0,!0),w.disposables.push(()=>clearTimeout(k))}else x(I);w.isOverTarget=!1}},U=I=>{x(I)};A.onDragStart=I=>{ce(I.currentTarget,ie(I.nativeEvent))&&x(I)}}else if(process.env.NODE_ENV==="test"){A.onMouseDown=I=>{if(I.button!==0||!ce(I.currentTarget,ie(I.nativeEvent)))return;if(w.ignoreEmulatedMouseEvents){I.stopPropagation();return}if(w.isPressed=!0,w.isOverTarget=!0,w.target=I.currentTarget,w.pointerType=Po(I.nativeEvent)?"virtual":"mouse",Lt.flushSync(()=>S(I,w.pointerType))&&I.stopPropagation(),c){let k=ga(I.target);k&&w.disposables.push(k)}m(oe(I.currentTarget),"mouseup",L,!1)},A.onMouseEnter=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;let R=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!0,R=S(I,w.pointerType)),R&&I.stopPropagation()},A.onMouseLeave=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;let R=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!1,R=P(I,w.pointerType,!1),E(I)),R&&I.stopPropagation()},A.onMouseUp=I=>{ce(I.currentTarget,ie(I.nativeEvent))&&!w.ignoreEmulatedMouseEvents&&I.button===0&&!w.isPressed&&$(I,w.pointerType||"mouse")};let L=I=>{if(I.button===0){if(w.ignoreEmulatedMouseEvents){w.ignoreEmulatedMouseEvents=!1;return}w.target&&w.target.contains(I.target)&&w.pointerType!=null||x(I),w.isOverTarget=!1}};A.onTouchStart=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;let R=ep(I.nativeEvent);if(!R)return;w.activePointerId=R.identifier,w.ignoreEmulatedMouseEvents=!0,w.isOverTarget=!0,w.isPressed=!0,w.target=I.currentTarget,w.pointerType="touch",f||ma(w.target),S(it(w.target,I),w.pointerType)&&I.stopPropagation(),m(Me(I.currentTarget),"scroll",U,!0)},A.onTouchMove=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;if(!w.isPressed){I.stopPropagation();return}let R=wa(I.nativeEvent,w.activePointerId),k=!0;R&&xa(R,I.currentTarget)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,k=S(it(w.target,I),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,k=P(it(w.target,I),w.pointerType,!1),E(it(w.target,I))),k&&I.stopPropagation()},A.onTouchEnd=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;if(!w.isPressed){I.stopPropagation();return}let R=wa(I.nativeEvent,w.activePointerId),k=!0;R&&xa(R,I.currentTarget)&&w.pointerType!=null?($(it(w.target,I),w.pointerType),k=P(it(w.target,I),w.pointerType),H(I.nativeEvent,w.target)):w.isOverTarget&&w.pointerType!=null&&(k=P(it(w.target,I),w.pointerType,!1)),k&&I.stopPropagation(),w.isPressed=!1,w.activePointerId=null,w.isOverTarget=!1,w.ignoreEmulatedMouseEvents=!0,w.target&&!f&&Ai(w.target),C()},A.onTouchCancel=I=>{ce(I.currentTarget,ie(I.nativeEvent))&&(I.stopPropagation(),w.isPressed&&x(it(w.target,I)))};let U=I=>{w.isPressed&&ce(ie(I),w.target)&&x({currentTarget:w.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};A.onDragStart=I=>{ce(I.currentTarget,ie(I.nativeEvent))&&x(I)}}return A},[m,a,c,C,f,x,E,P,S,$,N,H]);return u.useEffect(()=>{if(!h||process.env.NODE_ENV==="test")return;const w=oe(h.current);if(!w||!w.head||w.getElementById(Ca))return;const A=w.createElement("style");A.id=Ca,A.textContent=`
|
|
22
|
+
<%s key={someKey} {...props} />`,O,W,Y,W),G[W+O]=!0)}if(W=null,_!==void 0&&(n(_),W=""+_),l(F)&&(n(F.key),W=""+F.key),"key"in F){_={};for(var J in F)J!=="key"&&(_[J]=F[J])}else _=F;return W&&a(_,typeof T=="function"?T.displayName||T.name||"Unknown":T),c(T,W,M,K,i(),_,z,V)}function f(T){typeof T=="object"&&T!==null&&T.$$typeof===v&&T._store&&(T._store.validated=1)}var h=u,v=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),p=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),m=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),S=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),x=Symbol.for("react.suspense_list"),E=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),H=Symbol.for("react.activity"),j=Symbol.for("react.client.reference"),w=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,A=Object.prototype.hasOwnProperty,B=Array.isArray,L=console.createTask?console.createTask:function(){return null};h={"react-stack-bottom-frame":function(T){return T()}};var U,I={},R=h["react-stack-bottom-frame"].bind(h,o)(),k=L(r(o)),G={};Pn.Fragment=p,Pn.jsx=function(T,F,_,O,K){var M=1e4>w.recentlyCreatedOwnerStacks++;return d(T,F,_,!1,O,K,M?Error("react-stack-top-frame"):R,M?L(r(T)):k)},Pn.jsxs=function(T,F,_,O,K){var M=1e4>w.recentlyCreatedOwnerStacks++;return d(T,F,_,!0,O,K,M?Error("react-stack-top-frame"):R,M?L(r(T)):k)}}()),Pn}var ca;function V2(){return ca||(ca=1,process.env.NODE_ENV==="production"?rr.exports=H2():rr.exports=z2()),rr.exports}var y=V2();const B2={alert:{close_aria_label:"Delete alert",expand_aria_label:"Expand alert",shrink_aria_label:"Shrink alert"},pagination:{goto_label:"Go to page",goto_label_aria:"Go to any page",next_aria:"Go to next page",previous_aria:"Go to previous page",goto_page_aria:"Go to page {page}",current_page_aria:"You are currently on page {page}"},datagrid:{empty:"This table is empty",empty_alt:"Illustration of an empty table",loader_aria:"Loading data",rows_selection_aria:"All rows selection",row_selection_aria:"Row selection"},provider:{test:"This is a test: {name}"},forms:{input:{password:{show_password:"Show password",hide_password:"Hide password"}},select:{toggle_button_aria_label:"Toggle dropdown",clear_button_aria_label:"Clear selection",clear_all_button_aria_label:"Clear all selections",menu_empty_placeholder:"No options available"},file_uploader:{delete_file_name:"Delete file {name}",delete_file:"Delete file",uploading:"Uploading...",caption:"Drag and drop or ",browse_files:"Browse files"},date_picker:{toggle_button_aria_label_open:"Open calendar",toggle_button_aria_label_close:"Close calendar",clear_button_aria_label:"Clear date",next_month_button_aria_label:"Next month",next_year_button_aria_label:"Next year",previous_month_button_aria_label:"Previous month",previous_year_button_aria_label:"Previous year",year_select_button_aria_label:"Select a year",month_select_button_aria_label:"Select a month"}},modals:{helpers:{delete_confirmation:{title:"Are you sure?",children:"Are you sure to delete this item?",cancel:"Cancel",delete:"Delete"},confirmation:{title:"Are you sure?",children:"Are you sure you want to do that?",cancel:"Cancel",yes:"Yes"},disclaimer:{title:"Disclaimer",children:"This is a disclaimer",ok:"Ok"}}}},U2={components:B2},W2={alert:{close_aria_label:"Supprimer l'alerte",expand_aria_label:"Ouvrir l'alerte",shrink_aria_label:"Fermer l'alerte"},pagination:{goto_label:"Aller à",goto_label_aria:"Aller à la page",next_aria:"Aller à la page suivante",previous_aria:"Aller à la page précédente",goto_page_aria:"Aller à la page {page}",current_page_aria:"Vous êtes actuellement sur la page {page}"},datagrid:{empty:"Ce tableau est vide",empty_alt:"Illustration d'un tableau vide",loader_aria:"Loading data"},provider:{test:"Ceci est un test : {name}"},forms:{select:{toggle_button_aria_label:"Ouvrir le menu",clear_button_aria_label:"Effacer la sélection",clear_all_button_aria_label:"Effacer toutes les sélections",menu_empty_placeholder:"Aucun choix disponible"},file_uploader:{delete_file_name:"Supprimer le fichier {name}",delete_file:"Supprimer le fichier",uploading:"Upload en cours ...",caption:"Glisser-déposer ou ",browse_files:"Parcourir"},date_picker:{toggle_button_aria_label_open:"Ouvrir le calendrier",toggle_button_aria_label_close:"Fermer le calendrier",clear_button_aria_label:"Effacer la date",next_month_button_aria_label:"Mois suivant",next_year_button_aria_label:"Année suivante",previous_month_button_aria_label:"Mois précédent",previous_year_button_aria_label:"Année précédente",year_select_button_aria_label:"Sélectionner une année",month_select_button_aria_label:"Sélectionner un mois"}},modals:{helpers:{delete_confirmation:{title:"Êtes-vous sûr ?",children:"Êtes-vous sûr de vouloir supprimer cet élément ?",cancel:"Annuler",delete:"Supprimer"},confirmation:{title:"Êtes-vous sûr ?",children:"Êtes-vous sûr de vouloir faire cela ?",cancel:"Annuler",yes:"Oui"},disclaimer:{title:"Avertissement",children:"Ceci est un avertissement",ok:"Ok"}}}},G2={components:W2},q2={share:{copyLink:"Copy link",ok:"Ok",shareButton:"Share",modalTitle:"Share folder",access:{delete:"Remove access"},cannot_view:{message:"You can view this item but you need additional access to view its members or modify the settings."},invitations:{title:"Pending invitations"},members:{title:"Members",title_plural:"Shared between {count} people",title_singular:"Shared between {count} person",load_more:"Show more "},item:{add:"Add"},search:{placeholder:"Search user",group_name:"Search user result"},user:{no_result:"No result",placeholder:"Search user"},linkSettings:{title:"Link settings",reach:{choices:{public:{title:"Public",description:"Anyone with the link can access the document"},restricted:{title:"Private",description:"Only users of the space can access the document"}}},role:{choices:{reader:{title:"Reader"},editor:{title:"Editor"}}}}},footer:{links:{legal:"Legal mentions",personal_data:"Personal data and cookies",accessibility:"Accessibility"},mention:"Unless otherwise stated, all content on this site is under the",license:"etalab-2.0 license"}},Y2={components:q2},Z2={share:{copyLink:"Copier le lien",ok:"Ok",modalTitle:"Partage",shareButton:"Partager",access:{delete:"Retirer l'accès"},cannot_view:{message:"Vous pouvez voir cet élément mais vous avez besoin d'un accès supplémentaire pour voir ses membres ou modifier les paramètres."},invitations:{title:"Invitations en attente"},members:{title_plural:"Partagé entre {count} personnes",title_singular:"Partagé entre {count} personne",load_more:"Afficher plus"},item:{add:"Ajouter"},search:{placeholder:"Rechercher un utilisateur",group_name:"Résultat de la recherche d'utilisateur"},user:{no_result:"Aucun résultat",placeholder:"Rechercher un utilisateur"},linkSettings:{title:"Paramètres du lien",reach:{choices:{public:{title:"Public",description:"N'importe qui avec le lien peut accéder au document"},restricted:{title:"Privé",description:"Seulement les utilisateurs de l'espace peuvent y avoir accès"}}},role:{choices:{reader:{title:"Lecture seule"},editor:{title:"Édition"}}}}},footer:{links:{legal:"Mentions Légales",personal_data:"Données personnelles et cookies",accessibility:"Accessibilité"},mention:"Sauf mention contraire, tout le contenu de ce site est sous",license:"licence etalab-2.0"}},X2={components:Z2};function Ri(t){return t&&typeof t=="object"&&!Array.isArray(t)}function Ar(t,...e){if(!e.length)return t;const n=e.shift();if(Ri(t)&&Ri(n))for(const r in n)Ri(n[r])?(t[r]||Object.assign(t,{[r]:{}}),Ar(t[r],n[r])):Object.assign(t,{[r]:n[r]});return Ar(t,...e)}function Vc(){return{"en-US":Ar(U2,Y2),"fr-FR":Ar(G2,X2)}}const J2=t=>{const e=Vc();return y.jsx(le.CunninghamProvider,{theme:"dsfr",customLocales:e,...t})},Bc=({disabled:t,onClick:e})=>y.jsx(le.Button,{disabled:t,className:"pro-connect-button",onClick:e}),ne=typeof document<"u"?u.useLayoutEffect:()=>{};function he(t){const e=u.useRef(null);return ne(()=>{e.current=t},[t]),u.useCallback((...n)=>{const r=e.current;return r==null?void 0:r(...n)},[])}function Q2(t){let[e,n]=u.useState(t),r=u.useRef(null),i=he(()=>{if(!r.current)return;let l=r.current.next();if(l.done){r.current=null;return}e===l.value?i():n(l.value)});ne(()=>{r.current&&i()});let o=he(l=>{r.current=l(e),i()});return[e,o]}const Fr={prefix:String(Math.round(Math.random()*1e10)),current:0},Uc=u.createContext(Fr),eh=u.createContext(!1);let th=!!(typeof window<"u"&&window.document&&window.document.createElement),Mi=new WeakMap;function nh(t=!1){let e=u.useContext(Uc),n=u.useRef(null);if(n.current===null&&!t){var r,i;let o=(i=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(o){let l=Mi.get(o);l==null?Mi.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==l.state&&(e.current=l.id,Mi.delete(o))}n.current=++e.current}return n.current}function rh(t){let e=u.useContext(Uc);e===Fr&&!th&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=nh(!!t),r=e===Fr&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function ih(t){let e=u.useId(),[n]=u.useState(Qn()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Fr.prefix}`;return t||`${r}-${e}`}const oh=typeof u.useId=="function"?ih:rh;function lh(){return!1}function ah(){return!0}function sh(t){return()=>{}}function Qn(){return typeof u.useSyncExternalStore=="function"?u.useSyncExternalStore(sh,lh,ah):u.useContext(eh)}let ch=!!(typeof window<"u"&&window.document&&window.document.createElement),an=new Map,Rn;typeof FinalizationRegistry<"u"&&(Rn=new FinalizationRegistry(t=>{an.delete(t)}));function Se(t){let[e,n]=u.useState(t),r=u.useRef(null),i=oh(e),o=u.useRef(null);if(Rn&&Rn.register(o,i),ch){const l=an.get(i);l&&!l.includes(r)?l.push(r):an.set(i,[r])}return ne(()=>{let l=i;return()=>{Rn&&Rn.unregister(o),an.delete(l)}},[i]),u.useEffect(()=>{let l=r.current;return l&&n(l),()=>{l&&(r.current=null)}}),i}function uh(t,e){if(t===e)return t;let n=an.get(t);if(n)return n.forEach(i=>i.current=e),e;let r=an.get(e);return r?(r.forEach(i=>i.current=t),t):e}function xt(t=[]){let e=Se(),[n,r]=Q2(e),i=u.useCallback(()=>{r(function*(){yield e,yield document.getElementById(e)?e:void 0})},[e,r]);return ne(i,[e,i,...t]),n}function Dt(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const oe=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},Me=t=>t&&"window"in t&&t.window===t?t:oe(t).defaultView||window;function dh(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function fh(t){return dh(t)&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE&&"host"in t}let hh=!1;function ni(){return hh}function ce(t,e){if(!ni())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let n=e;for(;n!==null;){if(n===t)return!0;n.tagName==="SLOT"&&n.assignedSlot?n=n.assignedSlot.parentNode:fh(n)?n=n.host:n=n.parentNode}return!1}const Ce=(t=document)=>{var e;if(!ni())return t.activeElement;let n=t.activeElement;for(;n&&"shadowRoot"in n&&(!((e=n.shadowRoot)===null||e===void 0)&&e.activeElement);)n=n.shadowRoot.activeElement;return n};function ie(t){return ni()&&t.target.shadowRoot&&t.composedPath?t.composedPath()[0]:t.target}class ph{get currentNode(){return this._currentNode}set currentNode(e){if(!ce(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const n=[];let r=e,i=e;for(this._currentNode=e;r&&r!==this.root;)if(r.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const l=r,a=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});n.push(a),a.currentNode=i,this._currentSetFor.add(a),r=i=l.host}else r=r.parentNode;const o=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});n.push(o),o.currentNode=i,this._currentSetFor.add(o),this._walkerStack=n}get doc(){return this._doc}firstChild(){let e=this.currentNode,n=this.nextNode();return ce(e,n)?(n&&(this.currentNode=n),n):(this.currentNode=e,null)}lastChild(){let n=this._walkerStack[0].lastChild();return n&&(this.currentNode=n),n}nextNode(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){var n;let i;if(typeof this.filter=="function"?i=this.filter(e):!((n=this.filter)===null||n===void 0)&&n.acceptNode&&(i=this.filter.acceptNode(e)),i===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let o=this.nextNode();return o&&(this.currentNode=o),o}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null;return null}const n=e.previousNode();if(n){if(n.shadowRoot){var r;let o;if(typeof this.filter=="function"?o=this.filter(n):!((r=this.filter)===null||r===void 0)&&r.acceptNode&&(o=this.filter.acceptNode(n)),o===NodeFilter.FILTER_ACCEPT)return n&&(this.currentNode=n),n;let l=this.lastChild();return l&&(this.currentNode=l),l}return n&&(this.currentNode=n),n}else if(this._walkerStack.length>1){this._walkerStack.shift();let i=this.previousNode();return i&&(this.currentNode=i),i}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}constructor(e,n,r,i){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=l=>{if(l.nodeType===Node.ELEMENT_NODE){const s=l.shadowRoot;if(s){const c=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{var a;if(typeof this.filter=="function")return this.filter(l);if(!((a=this.filter)===null||a===void 0)&&a.acceptNode)return this.filter.acceptNode(l);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=n,this.filter=i??null,this.whatToShow=r??NodeFilter.SHOW_ALL,this._currentNode=n,this._walkerStack.unshift(e.createTreeWalker(n,r,this._acceptNode));const o=n.shadowRoot;if(o){const l=this._doc.createTreeWalker(o,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(l)}}}function vh(t,e,n,r){return ni()?new ph(t,e,n,r):t.createTreeWalker(e,n,r)}function Wc(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Wc(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Pe(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Wc(t))&&(r&&(r+=" "),r+=e);return r}function re(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let o=e[i],l=r[i];typeof o=="function"&&typeof l=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Dt(o,l):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof l=="string"?e[i]=Pe(o,l):i==="id"&&o&&l?e.id=uh(o,l):e[i]=l!==void 0?l:o}}return e}function ul(...t){return t.length===1&&t[0]?t[0]:e=>{let n=!1;const r=t.map(i=>{const o=ua(i,e);return n||(n=typeof o=="function"),o});if(n)return()=>{r.forEach((i,o)=>{typeof i=="function"?i():ua(t[o],null)})}}}function ua(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}const gh=new Set(["id"]),mh=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),bh=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),yh=/^(data-.*)$/;function pe(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,o={};for(const l in t)Object.prototype.hasOwnProperty.call(t,l)&&(gh.has(l)||n&&mh.has(l)||r&&bh.has(l)||i!=null&&i.has(l)||yh.test(l))&&(o[l]=t[l]);return o}function ze(t){if(Ch())t.focus({preventScroll:!0});else{let e=Sh(t);t.focus(),wh(e)}}let ir=null;function Ch(){if(ir==null){ir=!1;try{document.createElement("div").focus({get preventScroll(){return ir=!0,!0}})}catch{}}return ir}function Sh(t){let e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function wh(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ri(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function dl(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function et(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const ft=et(function(){return dl(/^Mac/i)}),xh=et(function(){return dl(/^iPhone/i)}),Gc=et(function(){return dl(/^iPad/i)||ft()&&navigator.maxTouchPoints>1}),ii=et(function(){return xh()||Gc()}),Eh=et(function(){return ft()||ii()}),fl=et(function(){return ri(/AppleWebKit/i)&&!qc()}),qc=et(function(){return ri(/Chrome/i)}),hl=et(function(){return ri(/Android/i)}),$h=et(function(){return ri(/Firefox/i)}),Ph=u.createContext({isNative:!0,open:_h,useHref:t=>t});function oi(){return u.useContext(Ph)}function _t(t,e,n=!0){var r,i;let{metaKey:o,ctrlKey:l,altKey:a,shiftKey:s}=e;$h()&&(!((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0)&&r.startsWith("key"))&&t.target==="_blank"&&(ft()?o=!0:l=!0);let c=fl()&&ft()&&!Gc()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:l,altKey:a,shiftKey:s}):new MouseEvent("click",{metaKey:o,ctrlKey:l,altKey:a,shiftKey:s,bubbles:!0,cancelable:!0});_t.isOpening=n,ze(t),t.dispatchEvent(c),_t.isOpening=!1}_t.isOpening=!1;function Dh(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function _h(t,e){Dh(t,n=>_t(n,e))}function pl(t){let e=oi();var n;const r=e.useHref((n=t==null?void 0:t.href)!==null&&n!==void 0?n:"");return{href:t!=null&&t.href?r:void 0,target:t==null?void 0:t.target,rel:t==null?void 0:t.rel,download:t==null?void 0:t.download,ping:t==null?void 0:t.ping,referrerPolicy:t==null?void 0:t.referrerPolicy}}let st=new Map,Eo=new Set;function da(){if(typeof window>"u")return;function t(r){return"propertyName"in r}let e=r=>{if(!t(r)||!r.target)return;let i=st.get(r.target);i||(i=new Set,st.set(r.target,i),r.target.addEventListener("transitioncancel",n,{once:!0})),i.add(r.propertyName)},n=r=>{if(!t(r)||!r.target)return;let i=st.get(r.target);if(i&&(i.delete(r.propertyName),i.size===0&&(r.target.removeEventListener("transitioncancel",n),st.delete(r.target)),st.size===0)){for(let o of Eo)o();Eo.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",n)}typeof document<"u"&&(document.readyState!=="loading"?da():document.addEventListener("DOMContentLoaded",da));function Th(){for(const[t]of st)"isConnected"in t&&!t.isConnected&&st.delete(t)}function Yc(t){requestAnimationFrame(()=>{Th(),st.size===0?t():Eo.add(t)})}function li(){let t=u.useRef(new Map),e=u.useCallback((i,o,l,a)=>{let s=a!=null&&a.once?(...c)=>{t.current.delete(l),l(...c)}:l;t.current.set(l,{type:o,eventTarget:i,fn:s,options:a}),i.addEventListener(o,s,a)},[]),n=u.useCallback((i,o,l,a)=>{var s;let c=((s=t.current.get(l))===null||s===void 0?void 0:s.fn)||l;i.removeEventListener(o,c,a),t.current.delete(l)},[]),r=u.useCallback(()=>{t.current.forEach((i,o)=>{n(i.eventTarget,i.type,o,i.options)})},[n]);return u.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function ai(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=Se(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function tt(t){const e=u.useRef(null),n=u.useRef(void 0),r=u.useCallback(i=>{if(typeof t=="function"){const o=t,l=o(i);return()=>{typeof l=="function"?l():o(null)}}else if(t)return t.current=i,()=>{t.current=null}},[t]);return u.useMemo(()=>({get current(){return e.current},set current(i){e.current=i,n.current&&(n.current(),n.current=void 0),i!=null&&(n.current=r(i))}}),[r])}function fa(t,e){const n=u.useRef(!0),r=u.useRef(null);ne(()=>(n.current=!0,()=>{n.current=!1}),[]),ne(()=>{n.current?n.current=!1:(!r.current||e.some((i,o)=>!Object.is(i,r[o])))&&t(),r.current=e},e)}function Ih(){return typeof window.ResizeObserver<"u"}function $o(t){const{ref:e,box:n,onResize:r}=t;u.useEffect(()=>{let i=e==null?void 0:e.current;if(i)if(Ih()){const o=new window.ResizeObserver(l=>{l.length&&r()});return o.observe(i,{box:n}),()=>{i&&o.unobserve(i)}}else return window.addEventListener("resize",r,!1),()=>{window.removeEventListener("resize",r,!1)}},[r,e,n])}function Zc(t,e){ne(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}function Bn(t,e){if(!t)return!1;let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}function Xc(t,e){let n=t;for(Bn(n,e)&&(n=n.parentElement);n&&!Bn(n,e);)n=n.parentElement;return n||document.scrollingElement||document.documentElement}function Oh(t,e){const n=[];for(;t&&t!==document.documentElement;)Bn(t,e)&&n.push(t),t=t.parentElement;return n}let kh=0;const Li=new Map;function Nh(t){let[e,n]=u.useState();return ne(()=>{if(!t)return;let r=Li.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${kh++}`;n(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),r={refCount:0,element:o},Li.set(t,r)}return r.refCount++,()=>{r&&--r.refCount===0&&(r.element.remove(),Li.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function or(t,e,n,r){let i=he(n),o=n==null;u.useEffect(()=>{if(o||!t.current)return;let l=t.current;return l.addEventListener(e,i,r),()=>{l.removeEventListener(e,i,r)}},[t,e,r,o,i])}function Jc(t,e){let n=ha(t,e,"left"),r=ha(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,l=t.scrollLeft,a=t.scrollTop,{borderTopWidth:s,borderLeftWidth:c,scrollPaddingTop:d,scrollPaddingRight:f,scrollPaddingBottom:h,scrollPaddingLeft:v}=getComputedStyle(t),b=l+parseInt(c,10),p=a+parseInt(s,10),g=b+t.clientWidth,m=p+t.clientHeight,C=parseInt(d,10)||0,S=parseInt(h,10)||0,P=parseInt(f,10)||0,$=parseInt(v,10)||0;n<=l+$?l=n-parseInt(c,10)-$:n+i>g-P&&(l+=n+i-g+P),r<=p+C?a=r-parseInt(s,10)-C:r+o>m-S&&(a+=r+o-m+S),t.scrollLeft=l,t.scrollTop=a}function ha(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function pa(t,e){if(t&&document.contains(t)){let l=document.scrollingElement||document.documentElement;if(window.getComputedStyle(l).overflow==="hidden"){let s=Oh(t);for(let c of s)Jc(c,t)}else{var n;let{left:s,top:c}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:d,top:f}=t.getBoundingClientRect();if(Math.abs(s-d)>1||Math.abs(c-f)>1){var r,i,o;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function Po(t){return t.mozInputSource===0&&t.isTrusted?!0:hl()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function Rh(t){return!hl()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function Mh(t,e,n){let r=u.useRef(e),i=he(()=>{n&&n(r.current)});u.useEffect(()=>{var o;let l=t==null||(o=t.current)===null||o===void 0?void 0:o.form;return l==null||l.addEventListener("reset",i),()=>{l==null||l.removeEventListener("reset",i)}},[t,i])}function Lh(t){const e=u.version.split(".");return parseInt(e[0],10)>=19?t:t?"true":void 0}const Ah="react-aria-clear-focus",Fh="react-aria-focus";function en(t){return ft()?t.metaKey:t.ctrlKey}function Kh(t,e=!0){let[n,r]=u.useState(!0),i=n&&e;return ne(()=>{if(i&&t.current&&"getAnimations"in t.current)for(let o of t.current.getAnimations())o instanceof CSSTransition&&o.cancel()},[t,i]),Qc(t,i,u.useCallback(()=>r(!1),[])),i}function jh(t,e){let[n,r]=u.useState(e?"open":"closed");switch(n){case"open":e||r("exiting");break;case"closed":case"exiting":e&&r("open");break}let i=n==="exiting";return Qc(t,i,u.useCallback(()=>{r(o=>o==="exiting"?"closed":o)},[])),i}function Qc(t,e,n){ne(()=>{if(e&&t.current){if(!("getAnimations"in t.current)){n();return}let r=t.current.getAnimations();if(r.length===0){n();return}let i=!1;return Promise.all(r.map(o=>o.finished)).then(()=>{i||Lt.flushSync(()=>{n()})}).catch(()=>{}),()=>{i=!0}}},[t,e,n])}const vl=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])'],Hh=vl.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";vl.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const zh=vl.join(':not([hidden]):not([tabindex="-1"]),');function eu(t){return t.matches(Hh)}function Vh(t){return t.matches(zh)}function si(t,e,n){let[r,i]=u.useState(t||e),o=u.useRef(t!==void 0),l=t!==void 0;u.useEffect(()=>{let c=o.current;c!==l&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${c?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),o.current=l},[l]);let a=l?t:r,s=u.useCallback((c,...d)=>{let f=(h,...v)=>{n&&(Object.is(a,h)||n(h,...v)),l||(a=h)};typeof c=="function"?(process.env.NODE_ENV!=="production"&&console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((v,...b)=>{let p=c(l?a:v,...b);return f(p,...d),l?v:p})):(l||i(c),f(c,...d))},[l,a,n]);return[a,s]}function Do(t,e=-1/0,n=1/0){return Math.min(Math.max(t,e),n)}const gl=Symbol("default");function pt({values:t,children:e}){for(let[n,r]of t)e=u.createElement(n.Provider,{value:r},e);return e}function De(t){let{className:e,style:n,children:r,defaultClassName:i,defaultChildren:o,defaultStyle:l,values:a}=t;return u.useMemo(()=>{let s,c,d;return typeof e=="function"?s=e({...a,defaultClassName:i}):s=e,typeof n=="function"?c=n({...a,defaultStyle:l||{}}):c=n,typeof r=="function"?d=r({...a,defaultChildren:o}):r==null?d=o:d=r,{className:s??i,style:c||l?{...l,...c}:void 0,children:d??o,"data-rac":""}},[e,n,r,i,o,l,a])}function ci(t,e){let n=u.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||gl;if(!n.slots[r]){let i=new Intl.ListFormat().format(Object.keys(n.slots).map(l=>`"${l}"`)),o=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${o} Valid slot names are ${i}.`)}return n.slots[r]}return n}function nt(t,e,n){let r=ci(n,t.slot)||{},{ref:i,...o}=r,l=tt(u.useMemo(()=>ul(e,i),[e,i])),a=re(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?a.style=s=>{let c=typeof o.style=="function"?o.style(s):o.style,d={...s.defaultStyle,...c},f=typeof t.style=="function"?t.style({...s,defaultStyle:d}):t.style;return{...d,...f}}:a.style={...o.style,...t.style}),[a,l]}function ml(t=!0){let[e,n]=u.useState(t),r=u.useRef(!1),i=u.useCallback(o=>{r.current=!0,n(!!o)},[]);return ne(()=>{r.current||n(!1)},[]),[i,e]}function Bh(t){const e=/^(data-.*)$/;let n={};for(const r in t)e.test(r)||(n[r]=t[r]);return n}class bl{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new bl(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=e,this.key=n}}class yl{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),i=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;i;)yield i,i=i.nextKey!=null?n.get(i.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}UNSTABLE_filter(e){let n=new yl,r=null;for(let i of this)if(i.type==="section"&&i.hasChildNodes){let o=i.clone(),l=null;for(let a of this.getChildren(i.key))if(va(a,e,this,n)){let s=a.clone();l==null&&(o.firstChildKey=s.key),n.firstKey==null&&(n.firstKey=o.key),l&&l.parentKey===s.parentKey?(l.nextKey=s.key,s.prevKey=l.key):s.prevKey=null,s.nextKey=null,n.addNode(s),l=s}l&&(l.type!=="header"?(o.lastChildKey=l.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(l.key)))}else if(i.type==="separator"){let o=i.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else{let o=i.clone();va(o,e,this,n)&&(n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o)}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let i;r.prevKey!=null&&(i=n.getItem(r.prevKey),i.nextKey=null),n.removeNode(r.key),r=i}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function va(t,e,n,r){if(t.type==="subdialogtrigger"||t.type==="submenutrigger"){let i=[...n.getChildren(t.key)][0];if(i&&e(i.textValue)){let o=i.clone();return r.addNode(o),!0}else return!1}else return t.type==="header"?!0:e(t.textValue)}class tu{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e)}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode,this.invalidateChildIndices(n),this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class sn extends tu{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof sn?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,n,r;let i=this.nextVisibleSibling,o=this.getMutableNode();o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof sn?this.parentNode.node.key:null;var l;o.prevKey=(l=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&l!==void 0?l:null;var a;o.nextKey=(a=i==null?void 0:i.node.key)!==null&&a!==void 0?a:null,o.hasChildNodes=!!this.firstChild;var s;o.firstChildKey=(s=(n=this.firstVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null;var c;if(o.lastChildKey=(c=(r=this.lastVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&c!==void 0?c:null,(o.colSpan!=null||o.colIndex!=null)&&i){var d,f;let h=((d=o.colIndex)!==null&&d!==void 0?d:o.index)+((f=o.colSpan)!==null&&f!==void 0?f:1);if(h!==i.node.colIndex){let v=i.getMutableNode();v.colIndex=h}}}setProps(e,n,r,i){let o=this.getMutableNode(),{value:l,textValue:a,id:s,...c}=e;if(c.ref=n,o.props=c,o.rendered=r,o.render=i,o.value=l,o.textValue=a||(typeof c.children=="string"?c.children:"")||e["aria-label"]||"",s!=null&&s!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=s}c.colSpan!=null&&(o.colSpan=c.colSpan),this.hasSetProps=!0,this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(n){let r=n==="none";if(e.isHidden!==r){var i,o;(((i=e.parentNode)===null||i===void 0?void 0:i.firstVisibleChild)===e||((o=e.parentNode)===null||o===void 0?void 0:o.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let l=e.previousVisibleSibling,a=e.nextVisibleSibling;l&&e.ownerDocument.markDirty(l),a&&e.ownerDocument.markDirty(a),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new bl(e,`react-aria-${++n.nodeId}`)}}class Uh extends tu{get isConnected(){return this.isMounted}createElement(e){return new sn(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof sn&&(!o.isConnected||o.isHidden)?this.removeNode(o):o.updateChildIndices();for(let o of this.dirtyNodes)o instanceof sn&&(o.isConnected&&!o.isHidden&&(o.updateNode(),this.addNode(o)),o.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,n,r,i;this.nextCollection.commit((r=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(i=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&i!==void 0?i:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function nu(t){let{children:e,items:n,idScope:r,addIdAndValue:i,dependencies:o=[]}=t,l=u.useMemo(()=>new WeakMap,o);return u.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let d of n){let f=l.get(d);if(!f){f=e(d);var a,s;let h=(s=(a=f.props.id)!==null&&a!==void 0?a:d.key)!==null&&s!==void 0?s:d.id;if(h==null)throw new Error("Could not determine key for item");r&&(h=r+":"+h),f=u.cloneElement(f,i?{key:h,id:h,value:d}:{key:h}),l.set(d,f)}c.push(f)}return c}else if(typeof e!="function")return e},[e,n,l,r,i])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Kr=u.createContext(!1);function Wh(t){if(u.useContext(Kr))return u.createElement(u.Fragment,null,t.children);let n=u.createElement(Kr.Provider,{value:!0},t.children);return u.createElement("template",{"data-react-aria-hidden":!0},n)}function Cl(t){let e=(n,r)=>u.useContext(Kr)?null:t(n,r);return e.displayName=t.displayName||t.name,u.forwardRef(e)}function Gh(){return u.useContext(Kr)}function Sl(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function ru(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function iu(t){let e=u.useRef({isFocused:!1,observer:null});ne(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]);let n=he(r=>{t==null||t(r)});return u.useCallback(r=>{if(r.target instanceof HTMLButtonElement||r.target instanceof HTMLInputElement||r.target instanceof HTMLTextAreaElement||r.target instanceof HTMLSelectElement){e.current.isFocused=!0;let i=r.target,o=l=>{if(e.current.isFocused=!1,i.disabled){let a=Sl(l);n(a)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};i.addEventListener("focusout",o,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&i.disabled){var l;(l=e.current.observer)===null||l===void 0||l.disconnect();let a=i===document.activeElement?null:document.activeElement;i.dispatchEvent(new FocusEvent("blur",{relatedTarget:a})),i.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:a}))}}),e.current.observer.observe(i,{attributes:!0,attributeFilter:["disabled"]})}},[n])}let jr=!1;function ga(t){for(;t&&!eu(t);)t=t.parentElement;let e=Me(t),n=e.document.activeElement;if(!n||n===t)return;jr=!0;let r=!1,i=d=>{(d.target===n||r)&&d.stopImmediatePropagation()},o=d=>{(d.target===n||r)&&(d.stopImmediatePropagation(),!t&&!r&&(r=!0,ze(n),s()))},l=d=>{(d.target===t||r)&&d.stopImmediatePropagation()},a=d=>{(d.target===t||r)&&(d.stopImmediatePropagation(),r||(r=!0,ze(n),s()))};e.addEventListener("blur",i,!0),e.addEventListener("focusout",o,!0),e.addEventListener("focusin",a,!0),e.addEventListener("focus",l,!0);let s=()=>{cancelAnimationFrame(c),e.removeEventListener("blur",i,!0),e.removeEventListener("focusout",o,!0),e.removeEventListener("focusin",a,!0),e.removeEventListener("focus",l,!0),jr=!1,r=!1},c=requestAnimationFrame(s);return s}let rn="default",_o="",Er=new WeakMap;function ma(t){if(ii()){if(rn==="default"){const e=oe(t);_o=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}rn="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";Er.set(t,t.style[e]),t.style[e]="none"}}function Ai(t){if(ii()){if(rn!=="disabled")return;rn="restoring",setTimeout(()=>{Yc(()=>{if(rn==="restoring"){const e=oe(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=_o||""),_o="",rn="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&Er.has(t)){let e=Er.get(t),n="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[n]==="none"&&(t.style[n]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),Er.delete(t)}}const wl=u.createContext({register:()=>{}});wl.displayName="PressResponderContext";function qh(t,e){return e.get?e.get.call(t):e.value}function ou(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Yh(t,e){var n=ou(t,e,"get");return qh(t,n)}function Zh(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Xh(t,e,n){Zh(t,e),e.set(t,n)}function Jh(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function ba(t,e,n){var r=ou(t,e,"set");return Jh(t,r,n),n}function Qh(t){let e=u.useContext(wl);if(e){let{register:n,...r}=e;t=re(r,t),n()}return Zc(e,t.ref),t}var lr=new WeakMap;class ar{continuePropagation(){ba(this,lr,!1)}get shouldStopPropagation(){return Yh(this,lr)}constructor(e,n,r,i){Xh(this,lr,{writable:!0,value:void 0}),ba(this,lr,!0);var o;let l=(o=i==null?void 0:i.target)!==null&&o!==void 0?o:r.currentTarget;const a=l==null?void 0:l.getBoundingClientRect();let s,c=0,d,f=null;r.clientX!=null&&r.clientY!=null&&(d=r.clientX,f=r.clientY),a&&(d!=null&&f!=null?(s=d-a.left,c=f-a.top):(s=a.width/2,c=a.height/2)),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey,this.x=s,this.y=c}}const ya=Symbol("linkClicked"),Ca="react-aria-pressable-style",Sa="data-react-aria-pressable";function ui(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:o,onClick:l,isDisabled:a,isPressed:s,preventFocusOnPress:c,shouldCancelOnPointerExit:d,allowTextSelectionOnPress:f,ref:h,...v}=Qh(t),[b,p]=u.useState(!1),g=u.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:m,removeAllGlobalListeners:C}=li(),S=he((w,A)=>{let B=g.current;if(a||B.didFirePressStart)return!1;let L=!0;if(B.isTriggeringEvent=!0,r){let U=new ar("pressstart",A,w);r(U),L=U.shouldStopPropagation}return n&&n(!0),B.isTriggeringEvent=!1,B.didFirePressStart=!0,p(!0),L}),P=he((w,A,B=!0)=>{let L=g.current;if(!L.didFirePressStart)return!1;L.didFirePressStart=!1,L.isTriggeringEvent=!0;let U=!0;if(i){let I=new ar("pressend",A,w);i(I),U=I.shouldStopPropagation}if(n&&n(!1),p(!1),e&&B&&!a){let I=new ar("press",A,w);e(I),U&&(U=I.shouldStopPropagation)}return L.isTriggeringEvent=!1,U}),$=he((w,A)=>{let B=g.current;if(a)return!1;if(o){B.isTriggeringEvent=!0;let L=new ar("pressup",A,w);return o(L),B.isTriggeringEvent=!1,L.shouldStopPropagation}return!0}),x=he(w=>{let A=g.current;if(A.isPressed&&A.target){A.didFirePressStart&&A.pointerType!=null&&P(vt(A.target,w),A.pointerType,!1),A.isPressed=!1,A.isOverTarget=!1,A.activePointerId=null,A.pointerType=null,C(),f||Ai(A.target);for(let B of A.disposables)B();A.disposables=[]}}),E=he(w=>{d&&x(w)}),N=he(w=>{l==null||l(w)}),H=he((w,A)=>{if(l){let B=new MouseEvent("click",w);ru(B,A),l(Sl(B))}}),j=u.useMemo(()=>{let w=g.current,A={onKeyDown(L){if(Fi(L.nativeEvent,L.currentTarget)&&ce(L.currentTarget,ie(L.nativeEvent))){var U;Ea(ie(L.nativeEvent),L.key)&&L.preventDefault();let I=!0;if(!w.isPressed&&!L.repeat){w.target=L.currentTarget,w.isPressed=!0,w.pointerType="keyboard",I=S(L,"keyboard");let R=L.currentTarget,k=G=>{Fi(G,R)&&!G.repeat&&ce(R,ie(G))&&w.target&&$(vt(w.target,G),"keyboard")};m(oe(L.currentTarget),"keyup",Dt(k,B),!0)}I&&L.stopPropagation(),L.metaKey&&ft()&&((U=w.metaKeyEvents)===null||U===void 0||U.set(L.key,L.nativeEvent))}else L.key==="Meta"&&(w.metaKeyEvents=new Map)},onClick(L){if(!(L&&!ce(L.currentTarget,ie(L.nativeEvent)))&&L&&L.button===0&&!w.isTriggeringEvent&&!_t.isOpening){let U=!0;if(a&&L.preventDefault(),!w.ignoreEmulatedMouseEvents&&!w.isPressed&&(w.pointerType==="virtual"||Po(L.nativeEvent))){let I=S(L,"virtual"),R=$(L,"virtual"),k=P(L,"virtual");N(L),U=I&&R&&k}else if(w.isPressed&&w.pointerType!=="keyboard"){let I=w.pointerType||L.nativeEvent.pointerType||"virtual",R=$(vt(L.currentTarget,L),I),k=P(vt(L.currentTarget,L),I,!0);U=R&&k,w.isOverTarget=!1,N(L),x(L)}w.ignoreEmulatedMouseEvents=!1,U&&L.stopPropagation()}}},B=L=>{var U;if(w.isPressed&&w.target&&Fi(L,w.target)){var I;Ea(ie(L),L.key)&&L.preventDefault();let k=ie(L),G=ce(w.target,ie(L));P(vt(w.target,L),"keyboard",G),G&&H(L,w.target),C(),L.key!=="Enter"&&xl(w.target)&&ce(w.target,k)&&!L[ya]&&(L[ya]=!0,_t(w.target,L,!1)),w.isPressed=!1,(I=w.metaKeyEvents)===null||I===void 0||I.delete(L.key)}else if(L.key==="Meta"&&(!((U=w.metaKeyEvents)===null||U===void 0)&&U.size)){var R;let k=w.metaKeyEvents;w.metaKeyEvents=void 0;for(let G of k.values())(R=w.target)===null||R===void 0||R.dispatchEvent(new KeyboardEvent("keyup",G))}};if(typeof PointerEvent<"u"){A.onPointerDown=I=>{if(I.button!==0||!ce(I.currentTarget,ie(I.nativeEvent)))return;if(Rh(I.nativeEvent)){w.pointerType="virtual";return}w.pointerType=I.pointerType;let R=!0;if(!w.isPressed){w.isPressed=!0,w.isOverTarget=!0,w.activePointerId=I.pointerId,w.target=I.currentTarget,f||ma(w.target),R=S(I,w.pointerType);let k=ie(I.nativeEvent);"releasePointerCapture"in k&&k.releasePointerCapture(I.pointerId),m(oe(I.currentTarget),"pointerup",L,!1),m(oe(I.currentTarget),"pointercancel",U,!1)}R&&I.stopPropagation()},A.onMouseDown=I=>{if(ce(I.currentTarget,ie(I.nativeEvent))&&I.button===0){if(c){let R=ga(I.target);R&&w.disposables.push(R)}I.stopPropagation()}},A.onPointerUp=I=>{!ce(I.currentTarget,ie(I.nativeEvent))||w.pointerType==="virtual"||I.button===0&&!w.isPressed&&$(I,w.pointerType||I.pointerType)},A.onPointerEnter=I=>{I.pointerId===w.activePointerId&&w.target&&!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,S(vt(w.target,I),w.pointerType))},A.onPointerLeave=I=>{I.pointerId===w.activePointerId&&w.target&&w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,P(vt(w.target,I),w.pointerType,!1),E(I))};let L=I=>{if(I.pointerId===w.activePointerId&&w.isPressed&&I.button===0&&w.target){if(ce(w.target,ie(I))&&w.pointerType!=null){let R=!1,k=setTimeout(()=>{w.isPressed&&w.target instanceof HTMLElement&&(R?x(I):(ze(w.target),w.target.click()))},80);m(I.currentTarget,"click",()=>R=!0,!0),w.disposables.push(()=>clearTimeout(k))}else x(I);w.isOverTarget=!1}},U=I=>{x(I)};A.onDragStart=I=>{ce(I.currentTarget,ie(I.nativeEvent))&&x(I)}}else if(process.env.NODE_ENV==="test"){A.onMouseDown=I=>{if(I.button!==0||!ce(I.currentTarget,ie(I.nativeEvent)))return;if(w.ignoreEmulatedMouseEvents){I.stopPropagation();return}if(w.isPressed=!0,w.isOverTarget=!0,w.target=I.currentTarget,w.pointerType=Po(I.nativeEvent)?"virtual":"mouse",Lt.flushSync(()=>S(I,w.pointerType))&&I.stopPropagation(),c){let k=ga(I.target);k&&w.disposables.push(k)}m(oe(I.currentTarget),"mouseup",L,!1)},A.onMouseEnter=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;let R=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!0,R=S(I,w.pointerType)),R&&I.stopPropagation()},A.onMouseLeave=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;let R=!0;w.isPressed&&!w.ignoreEmulatedMouseEvents&&w.pointerType!=null&&(w.isOverTarget=!1,R=P(I,w.pointerType,!1),E(I)),R&&I.stopPropagation()},A.onMouseUp=I=>{ce(I.currentTarget,ie(I.nativeEvent))&&!w.ignoreEmulatedMouseEvents&&I.button===0&&!w.isPressed&&$(I,w.pointerType||"mouse")};let L=I=>{if(I.button===0){if(w.ignoreEmulatedMouseEvents){w.ignoreEmulatedMouseEvents=!1;return}w.target&&w.target.contains(I.target)&&w.pointerType!=null||x(I),w.isOverTarget=!1}};A.onTouchStart=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;let R=ep(I.nativeEvent);if(!R)return;w.activePointerId=R.identifier,w.ignoreEmulatedMouseEvents=!0,w.isOverTarget=!0,w.isPressed=!0,w.target=I.currentTarget,w.pointerType="touch",f||ma(w.target),S(it(w.target,I),w.pointerType)&&I.stopPropagation(),m(Me(I.currentTarget),"scroll",U,!0)},A.onTouchMove=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;if(!w.isPressed){I.stopPropagation();return}let R=wa(I.nativeEvent,w.activePointerId),k=!0;R&&xa(R,I.currentTarget)?!w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!0,k=S(it(w.target,I),w.pointerType)):w.isOverTarget&&w.pointerType!=null&&(w.isOverTarget=!1,k=P(it(w.target,I),w.pointerType,!1),E(it(w.target,I))),k&&I.stopPropagation()},A.onTouchEnd=I=>{if(!ce(I.currentTarget,ie(I.nativeEvent)))return;if(!w.isPressed){I.stopPropagation();return}let R=wa(I.nativeEvent,w.activePointerId),k=!0;R&&xa(R,I.currentTarget)&&w.pointerType!=null?($(it(w.target,I),w.pointerType),k=P(it(w.target,I),w.pointerType),H(I.nativeEvent,w.target)):w.isOverTarget&&w.pointerType!=null&&(k=P(it(w.target,I),w.pointerType,!1)),k&&I.stopPropagation(),w.isPressed=!1,w.activePointerId=null,w.isOverTarget=!1,w.ignoreEmulatedMouseEvents=!0,w.target&&!f&&Ai(w.target),C()},A.onTouchCancel=I=>{ce(I.currentTarget,ie(I.nativeEvent))&&(I.stopPropagation(),w.isPressed&&x(it(w.target,I)))};let U=I=>{w.isPressed&&ce(ie(I),w.target)&&x({currentTarget:w.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};A.onDragStart=I=>{ce(I.currentTarget,ie(I.nativeEvent))&&x(I)}}return A},[m,a,c,C,f,x,E,P,S,$,N,H]);return u.useEffect(()=>{if(!h||process.env.NODE_ENV==="test")return;const w=oe(h.current);if(!w||!w.head||w.getElementById(Ca))return;const A=w.createElement("style");A.id=Ca,A.textContent=`
|
|
23
23
|
@layer {
|
|
24
24
|
[${Sa}] {
|
|
25
25
|
touch-action: pan-x pan-y pinch-zoom;
|