(function(O,g){typeof exports=="object"&&typeof module<"u"?g(exports,require("react")):typeof define=="function"&&define.amd?define(["exports","react"],g):(O=typeof globalThis<"u"?globalThis:O||self,g(O.Modal={},O.React))})(this,function(O,g){"use strict";var q={exports:{}},W={};/** * @license React * react-jsx-runtime.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var ie;function De(){if(ie)return W;ie=1;var E=g,S=Symbol.for("react.element"),L=Symbol.for("react.fragment"),w=Object.prototype.hasOwnProperty,k=E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,D={key:!0,ref:!0,__self:!0,__source:!0};function x(R,c,C){var d,v={},y=null,F=null;C!==void 0&&(y=""+C),c.key!==void 0&&(y=""+c.key),c.ref!==void 0&&(F=c.ref);for(d in c)w.call(c,d)&&!D.hasOwnProperty(d)&&(v[d]=c[d]);if(R&&R.defaultProps)for(d in c=R.defaultProps,c)v[d]===void 0&&(v[d]=c[d]);return{$$typeof:S,type:R,key:y,ref:F,props:v,_owner:k.current}}return W.Fragment=L,W.jsx=x,W.jsxs=x,W}var M={};/** * @license React * react-jsx-runtime.development.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var se;function Fe(){return se||(se=1,process.env.NODE_ENV!=="production"&&function(){var E=g,S=Symbol.for("react.element"),L=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),D=Symbol.for("react.profiler"),x=Symbol.for("react.provider"),R=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),C=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),F=Symbol.for("react.offscreen"),K=Symbol.iterator,m="@@iterator";function B(e){if(e===null||typeof e!="object")return null;var r=K&&e[K]||e[m];return typeof r=="function"?r:null}var T=E.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function f(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),n=1;n=1&&l>=0&&a[u]!==p[l];)l--;for(;u>=1&&l>=0;u--,l--)if(a[u]!==p[l]){if(u!==1||l!==1)do if(u--,l--,l<0||a[u]!==p[l]){var h=` `+a[u].replace(" at new "," at ");return e.displayName&&h.includes("")&&(h=h.replace("",e.displayName)),typeof e=="function"&&z.set(e,h),h}while(u>=1&&l>=0);break}}}finally{Q=!1,H.current=s,Be(),Error.prepareStackTrace=i}var A=e?e.displayName||e.name:"",P=A?J(A):"";return typeof e=="function"&&z.set(e,P),P}function ze(e,r,t){return he(e,!1)}function Ge(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function G(e,r,t){if(e==null)return"";if(typeof e=="function")return he(e,Ge(e));if(typeof e=="string")return J(e);switch(e){case C:return J("Suspense");case d:return J("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case c:return ze(e.render);case v:return G(e.type,r,t);case y:{var n=e,i=n._payload,s=n._init;try{return G(s(i),r,t)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,ge={},_e=T.ReactDebugCurrentFrame;function X(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);_e.setExtraStackFrame(t)}else _e.setExtraStackFrame(null)}function Xe(e,r,t,n,i){{var s=Function.call.bind(V);for(var o in e)if(s(e,o)){var a=void 0;try{if(typeof e[o]!="function"){var p=Error((n||"React class")+": "+t+" type `"+o+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[o]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw p.name="Invariant Violation",p}a=e[o](r,o,n,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(u){a=u}a&&!(a instanceof Error)&&(X(i),f("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",n||"React class",t,o,typeof a),X(null)),a instanceof Error&&!(a.message in ge)&&(ge[a.message]=!0,X(i),f("Failed %s type: %s",t,a.message),X(null))}}}var qe=Array.isArray;function ee(e){return qe(e)}function He(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function Ze(e){try{return Ee(e),!1}catch{return!0}}function Ee(e){return""+e}function Re(e){if(Ze(e))return f("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",He(e)),Ee(e)}var U=T.ReactCurrentOwner,Qe={key:!0,ref:!0,__self:!0,__source:!0},Te,we,re;re={};function er(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function rr(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function tr(e,r){if(typeof e.ref=="string"&&U.current&&r&&U.current.stateNode!==r){var t=_(U.current.type);re[t]||(f('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref',_(U.current.type),e.ref),re[t]=!0)}}function nr(e,r){{var t=function(){Te||(Te=!0,f("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function ar(e,r){{var t=function(){we||(we=!0,f("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var or=function(e,r,t,n,i,s,o){var a={$$typeof:S,type:e,key:r,ref:t,props:o,_owner:s};return a._store={},Object.defineProperty(a._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(a,"_self",{configurable:!1,enumerable:!1,writable:!1,value:n}),Object.defineProperty(a,"_source",{configurable:!1,enumerable:!1,writable:!1,value:i}),Object.freeze&&(Object.freeze(a.props),Object.freeze(a)),a};function ir(e,r,t,n,i){{var s,o={},a=null,p=null;t!==void 0&&(Re(t),a=""+t),rr(r)&&(Re(r.key),a=""+r.key),er(r)&&(p=r.ref,tr(r,i));for(s in r)V.call(r,s)&&!Qe.hasOwnProperty(s)&&(o[s]=r[s]);if(e&&e.defaultProps){var u=e.defaultProps;for(s in u)o[s]===void 0&&(o[s]=u[s])}if(a||p){var l=typeof e=="function"?e.displayName||e.name||"Unknown":e;a&&nr(o,l),p&&ar(o,l)}return or(e,a,p,i,n,U.current,o)}}var te=T.ReactCurrentOwner,Ce=T.ReactDebugCurrentFrame;function I(e){if(e){var r=e._owner,t=G(e.type,e._source,r?r.type:null);Ce.setExtraStackFrame(t)}else Ce.setExtraStackFrame(null)}var ne;ne=!1;function ae(e){return typeof e=="object"&&e!==null&&e.$$typeof===S}function Oe(){{if(te.current){var e=_(te.current.type);if(e)return` Check the render method of \``+e+"`."}return""}}function sr(e){return""}var Se={};function ur(e){{var r=Oe();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=` Check the top-level render call using <`+t+">.")}return r}}function xe(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ur(r);if(Se[t])return;Se[t]=!0;var n="";e&&e._owner&&e._owner!==te.current&&(n=" It was passed a child from "+_(e._owner.type)+"."),I(e),f('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,n),I(null)}}function je(e,r){{if(typeof e!="object")return;if(ee(e))for(var t=0;t",a=" Did you accidentally export a JSX literal instead of a component?"):u=typeof e,f("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",u,a)}var l=ir(e,r,t,i,s);if(l==null)return l;if(o){var h=r.children;if(h!==void 0)if(n)if(ee(h)){for(var A=0;A0?"{key: someKey, "+b.join(": ..., ")+": ...}":"{key: someKey}";if(!Pe[P+oe]){var mr=b.length>0?"{"+b.join(": ..., ")+": ...}":"{}";f(`A props object containing a "key" prop is being spread into JSX: let props = %s; <%s {...props} /> React keys must be passed directly to JSX without using spread: let props = %s; <%s key={someKey} {...props} />`,oe,P,mr,P),Pe[P+oe]=!0}}return e===w?cr(l):lr(l),l}}function fr(e,r,t){return ke(e,r,t,!0)}function dr(e,r,t){return ke(e,r,t,!1)}var vr=dr,pr=fr;M.Fragment=w,M.jsx=vr,M.jsxs=pr}()),M}process.env.NODE_ENV==="production"?q.exports=De():q.exports=Fe();var Y=q.exports;const $={modal:"_modal_1bio5_17",containerInformations:"_containerInformations_1bio5_49",picture:"_picture_1bio5_77",btnClose:"_btnClose_1bio5_97"},Ie="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%20512%20512'%3e%3c!--!Font%20Awesome%20Free%206.5.1%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license/free%20Copyright%202024%20Fonticons,%20Inc.--%3e%3cpath%20d='M256%20512A256%20256%200%201%200%20256%200a256%20256%200%201%200%200%20512zM175%20175c9.4-9.4%2024.6-9.4%2033.9%200l47%2047%2047-47c9.4-9.4%2024.6-9.4%2033.9%200s9.4%2024.6%200%2033.9l-47%2047%2047%2047c9.4%209.4%209.4%2024.6%200%2033.9s-24.6%209.4-33.9%200l-47-47-47%2047c-9.4%209.4-24.6%209.4-33.9%200s-9.4-24.6%200-33.9l47-47-47-47c-9.4-9.4-9.4-24.6%200-33.9z'/%3e%3c/svg%3e",Ae=({onClose:E,title:S,titleClose:L,children:w,customModal:k,customContainerInformations:D,customTitle:x,customBtnClose:R,customIconClose:c,showCloseIcon:C=!0})=>{const d=g.useRef(null),v=g.useRef(null),y=g.useRef(null);g.useEffect(()=>{if(v&&y){const m=v.current;m!==null&&m.focus()}},[E]);const F=m=>{var B,T;document.activeElement===y.current&&m.key==="Tab"&&!m.shiftKey&&(m.preventDefault(),(B=v.current)==null||B.focus()),document.activeElement===v.current&&m.key==="Tab"&&m.shiftKey&&(m.preventDefault(),(T=y.current)==null||T.focus()),m.key==="Escape"&&E()},K=m=>{m.key==="Enter"&&E()};return Y.jsx("div",{className:`${$.modal} ${k}`,tabIndex:-1,ref:d,onKeyDown:F,"data-testid":"modal",children:Y.jsxs("div",{className:`${$.containerInformations} ${D}`,children:[Y.jsx("h2",{className:`${$.title} ${x}`,children:S}),w,Y.jsx("button",{ref:v,onClick:E,className:`${$.btnClose} ${R}`,tabIndex:1,children:L}),C&&Y.jsx("img",{id:"closeIcon",className:`${$.picture} ${c}`,src:Ie,alt:"Close","aria-label":"Close Modal",ref:y,onClick:E,onKeyDown:K,tabIndex:2})]})})};O.Modal=Ae,Object.defineProperty(O,Symbol.toStringTag,{value:"Module"})});