@lystech/core 3.0.9 → 3.0.10
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.
|
@@ -41015,7 +41015,7 @@ function H9({ enableInstallAppButton: e, enablePushNotificationButton: t }) {
|
|
|
41015
41015
|
)
|
|
41016
41016
|
] });
|
|
41017
41017
|
}
|
|
41018
|
-
const V9 = "lystechcorenpmpackage", Y9 = "lystechcorenpmpackage:last-version", W9 = "3.0.
|
|
41018
|
+
const V9 = "lystechcorenpmpackage", Y9 = "lystechcorenpmpackage:last-version", W9 = "3.0.10";
|
|
41019
41019
|
function U9(e = {}) {
|
|
41020
41020
|
const {
|
|
41021
41021
|
packageName: t = V9,
|
|
@@ -1685,7 +1685,7 @@ html body {
|
|
|
1685
1685
|
`,wH=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],dv={},br;function EH(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&dv[n])return dv[n];var r=window.getComputedStyle(e),a=r.getPropertyValue("box-sizing")||r.getPropertyValue("-moz-box-sizing")||r.getPropertyValue("-webkit-box-sizing"),i=parseFloat(r.getPropertyValue("padding-bottom"))+parseFloat(r.getPropertyValue("padding-top")),o=parseFloat(r.getPropertyValue("border-bottom-width"))+parseFloat(r.getPropertyValue("border-top-width")),s=wH.map(function(u){return"".concat(u,":").concat(r.getPropertyValue(u))}).join(";"),c={sizingStyle:s,paddingSize:i,borderSize:o,boxSizing:a};return t&&n&&(dv[n]=c),c}function xH(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,r=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;br||(br=document.createElement("textarea"),br.setAttribute("tab-index","-1"),br.setAttribute("aria-hidden","true"),br.setAttribute("name","hiddenTextarea"),document.body.appendChild(br)),e.getAttribute("wrap")?br.setAttribute("wrap",e.getAttribute("wrap")):br.removeAttribute("wrap");var a=EH(e,t),i=a.paddingSize,o=a.borderSize,s=a.boxSizing,c=a.sizingStyle;br.setAttribute("style","".concat(c,";").concat(SH)),br.value=e.value||e.placeholder||"";var u=void 0,d=void 0,f,h=br.scrollHeight;if(s==="border-box"?h+=o:s==="content-box"&&(h-=i),n!==null||r!==null){br.value=" ";var v=br.scrollHeight-i;n!==null&&(u=v*n,s==="border-box"&&(u=u+i+o),h=Math.max(u,h)),r!==null&&(d=v*r,s==="border-box"&&(d=d+i+o),f=h>d?"":"hidden",h=Math.min(d,h))}var p={height:h,overflowY:f,resize:"none"};return u&&(p.minHeight=u),d&&(p.maxHeight=d),p}var AH=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],fv=0,hv=1,mv=2,OH=l.forwardRef(function(e,t){var n=e,r=n.prefixCls,a=n.defaultValue,i=n.value,o=n.autoSize,s=n.onResize,c=n.className,u=n.style,d=n.disabled,f=n.onChange,h=n.onInternalAutoSize,v=St(n,AH),p=cn(a,{value:i,postState:function(U){return U??""}}),g=X(p,2),m=g[0],y=g[1],b=function(U){y(U.target.value),f==null||f(U)},C=l.useRef();l.useImperativeHandle(t,function(){return{textArea:C.current}});var S=l.useMemo(function(){return o&&at(o)==="object"?[o.minRows,o.maxRows]:[]},[o]),w=X(S,2),x=w[0],E=w[1],M=!!o,P=function(){try{if(document.activeElement===C.current){var U=C.current,J=U.selectionStart,ie=U.selectionEnd,oe=U.scrollTop;C.current.setSelectionRange(J,ie),C.current.scrollTop=oe}}catch{}},I=l.useState(mv),N=X(I,2),L=N[0],D=N[1],R=l.useState(),T=X(R,2),j=T[0],z=T[1],F=function(){D(fv),process.env.NODE_ENV==="test"&&(h==null||h())};Zt(function(){M&&F()},[i,x,E,M]),Zt(function(){if(L===fv)D(hv);else if(L===hv){var Y=xH(C.current,!1,x,E);D(mv),z(Y)}else P()},[L]);var k=l.useRef(),H=function(){Lt.cancel(k.current)},W=function(U){L===mv&&(s==null||s(U),o&&(H(),k.current=Lt(function(){F()})))};l.useEffect(function(){return H},[]);var B=M?j:null,V=Q(Q({},u),B);return(L===fv||L===hv)&&(V.overflowY="hidden",V.overflowX="hidden"),l.createElement(er,{onResize:W,disabled:!(o||s)},l.createElement("textarea",Me({},v,{ref:C,style:V,className:he(r,c,K({},"".concat(r,"-disabled"),d)),disabled:d,value:m,onChange:b})))}),PH=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],MH=O.forwardRef(function(e,t){var n,r=e.defaultValue,a=e.value,i=e.onFocus,o=e.onBlur,s=e.onChange,c=e.allowClear,u=e.maxLength,d=e.onCompositionStart,f=e.onCompositionEnd,h=e.suffix,v=e.prefixCls,p=v===void 0?"rc-textarea":v,g=e.showCount,m=e.count,y=e.className,b=e.style,C=e.disabled,S=e.hidden,w=e.classNames,x=e.styles,E=e.onResize,M=e.onClear,P=e.onPressEnter,I=e.readOnly,N=e.autoSize,L=e.onKeyDown,D=St(e,PH),R=cn(r,{value:a,defaultValue:r}),T=X(R,2),j=T[0],z=T[1],F=j==null?"":String(j),k=O.useState(!1),H=X(k,2),W=H[0],B=H[1],V=O.useRef(!1),Y=O.useState(null),U=X(Y,2),J=U[0],ie=U[1],oe=O.useRef(null),le=O.useRef(null),te=function(){var ae;return(ae=le.current)===null||ae===void 0?void 0:ae.textArea},re=function(){te().focus()};O.useImperativeHandle(t,function(){var $;return{resizableTextArea:le.current,focus:re,blur:function(){te().blur()},nativeElement:(($=oe.current)===null||$===void 0?void 0:$.nativeElement)||te()}}),O.useEffect(function(){B(function($){return!C&&$})},[C]);var ne=O.useState(null),ue=X(ne,2),_=ue[0],fe=ue[1];O.useEffect(function(){if(_){var $;($=te()).setSelectionRange.apply($,De(_))}},[_]);var se=GE(m,g),ee=(n=se.max)!==null&&n!==void 0?n:u,ce=Number(ee)>0,me=se.strategy(F),pe=!!ee&&me>ee,be=function(ae,de){var Ce=de;!V.current&&se.exceedFormatter&&se.max&&se.strategy(de)>se.max&&(Ce=se.exceedFormatter(de,{max:se.max}),de!==Ce&&fe([te().selectionStart||0,te().selectionEnd||0])),z(Ce),Ru(ae.currentTarget,ae,s,Ce)},Ae=function(ae){V.current=!0,d==null||d(ae)},we=function(ae){V.current=!1,be(ae,ae.currentTarget.value),f==null||f(ae)},ve=function(ae){be(ae,ae.target.value)},Oe=function(ae){ae.key==="Enter"&&P&&P(ae),L==null||L(ae)},Pe=function(ae){B(!0),i==null||i(ae)},Ve=function(ae){B(!1),o==null||o(ae)},je=function(ae){z(""),re(),Ru(te(),ae,s)},Re=h,Ke;se.show&&(se.showFormatter?Ke=se.showFormatter({value:F,count:me,maxLength:ee}):Ke="".concat(me).concat(ce?" / ".concat(ee):""),Re=O.createElement(O.Fragment,null,Re,O.createElement("span",{className:he("".concat(p,"-data-count"),w==null?void 0:w.count),style:x==null?void 0:x.count},Ke)));var q=function(ae){var de;E==null||E(ae),(de=te())!==null&&de!==void 0&&de.style.height&&ie(!0)},G=!N&&!g&&!c;return O.createElement(UE,{ref:oe,value:F,allowClear:c,handleReset:je,suffix:Re,prefixCls:p,classNames:Q(Q({},w),{},{affixWrapper:he(w==null?void 0:w.affixWrapper,K(K({},"".concat(p,"-show-count"),g),"".concat(p,"-textarea-allow-clear"),c))}),disabled:C,focused:W,className:he(y,pe&&"".concat(p,"-out-of-range")),style:Q(Q({},b),J&&!G?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof Ke=="string"?Ke:void 0}},hidden:S,readOnly:I,onClear:M},O.createElement(OH,Me({},D,{autoSize:N,maxLength:u,onKeyDown:Oe,onChange:ve,onFocus:Pe,onBlur:Ve,onCompositionStart:Ae,onCompositionEnd:we,className:he(w==null?void 0:w.textarea),style:Q(Q({},x==null?void 0:x.textarea),{},{resize:b==null?void 0:b.resize}),disabled:C,prefixCls:p,onResize:q,ref:le,readOnly:I})))});const IH=e=>{const{componentCls:t,paddingLG:n}=e,r=`${t}-textarea`;return{[`textarea${t}`]:{maxWidth:"100%",height:"auto",minHeight:e.controlHeight,lineHeight:e.lineHeight,verticalAlign:"bottom",transition:`all ${e.motionDurationSlow}`,resize:"vertical",[`&${t}-mouse-active`]:{transition:`all ${e.motionDurationSlow}, height 0s, width 0s`}},[`${t}-textarea-affix-wrapper-resize-dirty`]:{width:"auto"},[r]:{position:"relative","&-show-count":{[`${t}-data-count`]:{position:"absolute",bottom:e.calc(e.fontSize).mul(e.lineHeight).mul(-1).equal(),insetInlineEnd:0,color:e.colorTextDescription,whiteSpace:"nowrap",pointerEvents:"none"}},[`
|
|
1686
1686
|
&-allow-clear > ${t},
|
|
1687
1687
|
&-affix-wrapper${r}-has-feedback ${t}
|
|
1688
|
-
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},NH=Fn(["Input","TextArea"],e=>{const t=qt(e,rl(e));return[IH(t)]},al,{resetFont:!1});var RH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const DH=O.forwardRef((e,t)=>{var n;const{prefixCls:r,bordered:a=!0,size:i,disabled:o,status:s,allowClear:c,classNames:u,rootClassName:d,className:f,style:h,styles:v,variant:p,showCount:g,onMouseDown:m,onResize:y}=e,b=RH(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:se}=ln("TextArea");se(!("bordered"in e),"bordered","variant")}const{getPrefixCls:C,direction:S,allowClear:w,autoComplete:x,className:E,style:M,classNames:P,styles:I}=ia("textArea"),N=l.useContext(Br),L=o??N,{status:D,hasFeedback:R,feedbackIcon:T}=l.useContext(pr),j=xo(D,s),z=l.useRef(null);l.useImperativeHandle(t,()=>{var se;return{resizableTextArea:(se=z.current)===null||se===void 0?void 0:se.resizableTextArea,focus:ee=>{var ce,me;WE((me=(ce=z.current)===null||ce===void 0?void 0:ce.resizableTextArea)===null||me===void 0?void 0:me.textArea,ee)},blur:()=>{var ee;return(ee=z.current)===null||ee===void 0?void 0:ee.blur()}}});const F=C("input",r),k=Or(F),[H,W,B]=CE(F,d),[V]=NH(F,k),{compactSize:Y,compactItemClassnames:U}=Ai(F,S),J=Pr(se=>{var ee;return(ee=i??Y)!==null&&ee!==void 0?ee:se}),[ie,oe]=Ao("textArea",p,a),le=KE(c??w),[te,re]=l.useState(!1),[ne,ue]=l.useState(!1),_=se=>{re(!0),m==null||m(se);const ee=()=>{re(!1),document.removeEventListener("mouseup",ee)};document.addEventListener("mouseup",ee)},fe=se=>{var ee,ce;if(y==null||y(se),te&&typeof getComputedStyle=="function"){const me=(ce=(ee=z.current)===null||ee===void 0?void 0:ee.nativeElement)===null||ce===void 0?void 0:ce.querySelector("textarea");me&&getComputedStyle(me).resize==="both"&&ue(!0)}};return H(V(l.createElement(MH,Object.assign({autoComplete:x},b,{style:Object.assign(Object.assign({},M),h),styles:Object.assign(Object.assign({},I),v),disabled:L,allowClear:le,className:he(B,k,f,d,U,E,ne&&`${F}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},u),P),{textarea:he({[`${F}-sm`]:J==="small",[`${F}-lg`]:J==="large"},W,u==null?void 0:u.textarea,P.textarea,te&&`${F}-mouse-active`),variant:he({[`${F}-${ie}`]:oe},Eo(F,j)),affixWrapper:he(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:S==="rtl",[`${F}-affix-wrapper-sm`]:J==="small",[`${F}-affix-wrapper-lg`]:J==="large",[`${F}-textarea-show-count`]:g||((n=e.count)===null||n===void 0?void 0:n.show)},W)}),prefixCls:F,suffix:R&&l.createElement("span",{className:`${F}-textarea-suffix`},T),showCount:g,ref:z,onResize:fe,onMouseDown:_}))))}),nr=il;nr.Group=sH,nr.Search=ax,nr.TextArea=DH,nr.Password=rx,nr.OTP=mH;let Rr=null,Ti=e=>e(),ol=[],sl={};function ix(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:a}=sl,i=(e==null?void 0:e())||document.body;return{getContainer:()=>i,duration:t,rtl:n,maxCount:r,top:a}}const jH=O.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:a}=O.useContext(Dt),i=sl.prefixCls||a("message"),o=O.useContext(gL),[s,c]=z1(Object.assign(Object.assign(Object.assign({},n),{prefixCls:i}),o.message));return O.useImperativeHandle(t,()=>{const u=Object.assign({},s);return Object.keys(u).forEach(d=>{u[d]=(...f)=>(r(),s[d].apply(s,f))}),{instance:u,sync:r}}),c}),TH=O.forwardRef((e,t)=>{const[n,r]=O.useState(ix),a=()=>{r(ix)};O.useEffect(a,[]);const i=u1(),o=i.getRootPrefixCls(),s=i.getIconPrefixCls(),c=i.getTheme(),u=O.createElement(jH,{ref:t,sync:a,messageConfig:n});return O.createElement(Xa,{prefixCls:o,iconPrefixCls:s,theme:c},i.holderRender?i.holderRender(u):u)});function ju(){if(!Rr){const e=document.createDocumentFragment(),t={fragment:e};Rr=t,Ti(()=>{Y1()(O.createElement(TH,{ref:r=>{const{instance:a,sync:i}=r||{};Promise.resolve().then(()=>{!t.instance&&a&&(t.instance=a,t.sync=i,ju())})}}),e)});return}Rr.instance&&(ol.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":{Ti(()=>{const r=Rr.instance.open(Object.assign(Object.assign({},sl),e.config));r==null||r.then(e.resolve),e.setCloseFn(r)});break}case"destroy":Ti(()=>{Rr==null||Rr.instance.destroy(e.key)});break;default:Ti(()=>{var r;const a=(r=Rr.instance)[t].apply(r,De(e.args));a==null||a.then(e.resolve),e.setCloseFn(a)})}}),ol=[])}function LH(e){sl=Object.assign(Object.assign({},sl),e),Ti(()=>{var t;(t=Rr==null?void 0:Rr.sync)===null||t===void 0||t.call(Rr)})}function zH(e){const t=Sh(n=>{let r;const a={type:"open",config:e,resolve:n,setCloseFn:i=>{r=i}};return ol.push(a),()=>{r?Ti(()=>{r()}):a.skipped=!0}});return ju(),t}function FH(e,t){const n=u1();process.env.NODE_ENV!=="production"&&!n.holderRender&&$j("message");const r=Sh(a=>{let i;const o={type:e,args:t,resolve:a,setCloseFn:s=>{i=s}};return ol.push(o),()=>{i?Ti(()=>{i()}):o.skipped=!0}});return ju(),r}const kH=e=>{ol.push({type:"destroy",key:e}),ju()},BH=["success","info","warning","error","loading"],ox={open:zH,destroy:kH,config:LH,useMessage:$3,_InternalPanelDoNotUseOrYouWillBeFired:G3};BH.forEach(e=>{ox[e]=(...t)=>FH(e,t)}),process.env.NODE_ENV,process.env.NODE_ENV;var HH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9z"}}]},name:"heart",theme:"filled"},VH=function(t,n){return l.createElement(vn,Me({},t,{ref:n,icon:HH}))},YH=l.forwardRef(VH);process.env.NODE_ENV!=="production"&&(YH.displayName="HeartFilled");var WH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z"}}]},name:"heart",theme:"outlined"},UH=function(t,n){return l.createElement(vn,Me({},t,{ref:n,icon:WH}))},GH=l.forwardRef(UH);process.env.NODE_ENV!=="production"&&(GH.displayName="HeartOutlined");var KH={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z",fill:t}},{tag:"path",attrs:{d:"M679.7 201c-73.1 0-136.5 40.8-167.7 100.4C480.8 241.8 417.4 201 344.3 201c-104 0-188.3 82.6-188.3 184.5 0 201.2 356 429.3 356 429.3s356-228.1 356-429.3C868 283.6 783.7 201 679.7 201z",fill:n}}]}},name:"heart",theme:"twotone"},QH=function(t,n){return l.createElement(vn,Me({},t,{ref:n,icon:KH}))},ZH=l.forwardRef(QH);process.env.NODE_ENV!=="production"&&(ZH.displayName="HeartTwoTone");var XH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"},qH=function(t,n){return l.createElement(vn,Me({},t,{ref:n,icon:XH}))},vv=l.forwardRef(qH);process.env.NODE_ENV!=="production"&&(vv.displayName="MailOutlined");const JH=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:a,calc:i}=e,o=i(r).sub(n).equal(),s=i(t).sub(n).equal();return{[a]:Object.assign(Object.assign({},Dn(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${ge(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},gv=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,a=e.fontSizeSM;return qt(e,{tagFontSize:a,tagLineHeight:ge(r(e.lineHeightSM).mul(a).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},pv=e=>({defaultBg:new Xt(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),sx=Fn("Tag",e=>{const t=gv(e);return JH(t)},pv);var _H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const $H=l.forwardRef((e,t)=>{const{prefixCls:n,style:r,className:a,checked:i,onChange:o,onClick:s}=e,c=_H(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:u,tag:d}=l.useContext(Dt),f=y=>{o==null||o(!i),s==null||s(y)},h=u("tag",n),[v,p,g]=sx(h),m=he(h,`${h}-checkable`,{[`${h}-checkable-checked`]:i},d==null?void 0:d.className,a,p,g);return v(l.createElement("span",Object.assign({},c,{ref:t,style:Object.assign(Object.assign({},r),d==null?void 0:d.style),className:m,onClick:f})))}),e9=e=>Wy(e,(t,{textColor:n,lightBorderColor:r,lightColor:a,darkColor:i})=>({[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:a,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}})),t9=uh(["Tag","preset"],e=>{const t=gv(e);return e9(t)},pv);function n9(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Tu=(e,t,n)=>{const r=n9(n);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},r9=uh(["Tag","status"],e=>{const t=gv(e);return[Tu(t,"success","Success"),Tu(t,"processing","Info"),Tu(t,"error","Error"),Tu(t,"warning","Warning")]},pv);var a9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const bv=l.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:a,style:i,children:o,icon:s,color:c,onClose:u,bordered:d=!0,visible:f}=e,h=a9(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:v,direction:p,tag:g}=l.useContext(Dt),[m,y]=l.useState(!0),b=Gn(h,["closeIcon","closable"]);process.env.NODE_ENV!=="production"&&ln("Tag").deprecated(!("visible"in e),"visible","visible && <Tag />"),l.useEffect(()=>{f!==void 0&&y(f)},[f]);const C=WS(c),S=Y5(c),w=C||S,x=Object.assign(Object.assign({backgroundColor:c&&!w?c:void 0},g==null?void 0:g.style),i),E=v("tag",n),[M,P,I]=sx(E),N=he(E,g==null?void 0:g.className,{[`${E}-${c}`]:w,[`${E}-has-color`]:c&&!w,[`${E}-hidden`]:!m,[`${E}-rtl`]:p==="rtl",[`${E}-borderless`]:!d},r,a,P,I),L=F=>{F.stopPropagation(),u==null||u(F),!F.defaultPrevented&&y(!1)},[,D]=q8(DC(e),DC(g),{closable:!1,closeIconRender:F=>{const k=l.createElement("span",{className:`${E}-close-icon`,onClick:L},F);return w1(F,k,H=>({onClick:W=>{var B;(B=H==null?void 0:H.onClick)===null||B===void 0||B.call(H,W),L(W)},className:he(H==null?void 0:H.className,`${E}-close-icon`)}))}}),R=typeof h.onClick=="function"||o&&o.type==="a",T=s||null,j=T?l.createElement(l.Fragment,null,T,o&&l.createElement("span",null,o)):o,z=l.createElement("span",Object.assign({},b,{ref:t,className:N,style:x}),j,D,C&&l.createElement(t9,{key:"preset",prefixCls:E}),S&&l.createElement(r9,{key:"status",prefixCls:E}));return M(R?l.createElement(Vc,{component:"Tag"},z):z)});process.env.NODE_ENV!=="production"&&(bv.displayName="Tag"),bv.CheckableTag=$H;const lx=O.createContext({popupElement:null,confirmPopupElement:null,showPopup:()=>{},showConfirmPopup:()=>{},hidePopup:()=>{},hideConfirmPopup:()=>{},isPopupShowing:!1,isConfirmPopupShowing:!1,showMessage:()=>{},hideMessage:()=>{}}),cx=4400,Ur=()=>O.useContext(lx);function i9({children:e}){const[t,n]=O.useState(null),[r,a]=O.useState(null),[i,o]=O.useState(null),[s,c]=ox.useMessage(),u=O.useCallback(y=>{const{type:b,message:C,key:S,duration:w}=y;if(s.open({type:b,content:C,key:S,duration:w||cx}),y.type==="loading"){const{duration:x}=y;setTimeout(()=>{s.destroy()},x)}else setTimeout(()=>{s.destroy()},w||cx)},[s]);function d(y){s.destroy(y)}const f=O.useMemo(()=>!!t,[t]),h=O.useMemo(()=>!!i,[i]);function v(){n(null)}function p(y){n(y)}function g(y){o(y)}function m(){o(null)}return A.jsxs(lx.Provider,{value:{popupElement:t,confirmPopupElement:i,isPopupShowing:f,isConfirmPopupShowing:h,showPopup:p,showConfirmPopup:g,hidePopup:v,hideConfirmPopup:m,showMessage:u,hideMessage:d},children:[c,e,t?A.jsx("div",{className:"popup",children:t}):null,r?A.jsx("div",{className:"popup",children:r}):null,i||null]})}const ux=O.createContext({children:null}),o9=()=>O.useContext(ux);function s9({children:e}){const{debugMode:t}=Li(),{showMessage:n}=Ur();function r(i){const o=localStorage.getItem("missing-endpoints")||"[]",s=JSON.parse(o);i.config.url;const c=s.findIndex(u=>u.endpoint===u.endpoint);c!==-1&&s.splice(c,1),localStorage.setItem("missing-endpoints",JSON.stringify(s))}function a(i){var u,d,f,h;const o=((u=i==null?void 0:i.response)==null?void 0:u.status)||0,s=i,c=`[${((d=s==null?void 0:s.config)==null?void 0:d.method)||""}] -> ${((f=s==null?void 0:s.config)==null?void 0:f.url)||""}`;if(t&&console.log("Axios Error:",{status:o,req:c,error:s,message:s==null?void 0:s.message}),o===404){const v=window.location.pathname,p=localStorage.getItem("missing-endpoints")||"[]",g=JSON.parse(p),m={page:v,endpoint:((h=i.config)==null?void 0:h.url)||""};g.find(b=>b.endpoint===m.endpoint)||g.push(m),localStorage.setItem("missing-endpoints",JSON.stringify(g)),t&&(console.log("--------- Missing endpoints ---------"),g.forEach(b=>{console.log(`Page: ${b.page} - Endpoint: ${b.endpoint}`)}),console.log("--------- Missing endpoints ---------"))}}return O.useLayoutEffect(()=>{const i=Ut.interceptors.request.use(s=>{const c=localStorage.getItem("authKey"),u=localStorage.getItem("impersonatedUserAuthKey"),d=localStorage.getItem("Organization"),h=d||""||d||"",v=localStorage.getItem("token"),p=localStorage.getItem("currentSubscriptionEndpoint")||"";return s!=null&&s.headers||(s.headers={"Content-Type":"application/json"}),t&&(console.log("••••••••••••* Début - AxiosMiddlewareProvider"),console.log("Endpoint:",s.url,"Method:",s.method)),c?(s.headers.Authorization=c,t&&console.log("✔️ AuthKey trouvé: ",c)):t&&console.log("❌ AuthKey"),h?(s.headers.Organization=h,t&&console.log("✔️ Organization trouvé: ",h)):t&&console.log("❌ Organization"),u&&(s.headers.ImpersonateAuthorization=u,t&&console.log("✔️ ImpersonateAuthorization trouvé: ",u)),v&&(s.headers.Token=v,t&&console.log("✔️ Token trouvé: ",v)),p&&(s.headers.pnendpoint=p,t&&console.log("✔️ currentSubscriptionEndpoint trouvé: ",p)),t&&(console.log("Axios Request - Endpoint:",s.url),console.log("Axios Request - Authorization:",s.headers.Authorization),console.log("Axios Request - ImpersonateAuthorization:",s.headers.ImpersonateAuthorization),console.log("Axios Request - Organization:",s.headers.Organization),console.log("Axios Request - Token:",s.headers.Token),console.log("••••••••••••* FIN - AxiosMiddlewareProvider")),s},async s=>(n({type:"error",message:"une erreur est survenue"}),Promise.reject(s))),o=Ut.interceptors.response.use(s=>(r(s),s),async s=>{var g,m,y,b,C,S,w;a(s);const c=((g=s==null?void 0:s.response)==null?void 0:g.status)||0,u=s,d=((m=u==null?void 0:u.config)==null?void 0:m.method)||"",f=((y=u==null?void 0:u.config)==null?void 0:y.url)||"",h=`[${d}] -> ${f}`,v=((C=(b=u==null?void 0:u.response)==null?void 0:b.data)==null?void 0:C.message)||"Une erreur est survenue",p=((w=(S=u==null?void 0:u.response)==null?void 0:S.data)==null?void 0:w.code)||"UNKNOWN_ERROR";return Promise.reject({status:c,req:h,error:u,message:v,code:p,success:!1})});return()=>{Ut.interceptors.request.eject(i),Ut.interceptors.response.eject(o)}},[]),A.jsx(ux.Provider,{value:{children:e},children:e})}function dx({visible:e,title:t,onConfirm:n,onCancel:r,okText:a="Oui",cancelText:i="Non",position:o}){const s=O.useRef(null);O.useEffect(()=>{const u=f=>{s.current&&!s.current.contains(f.target)&&r()},d=f=>{f.key==="Escape"&&r()};return e&&(document.addEventListener("mousedown",u),document.addEventListener("keydown",d)),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[e,r]);const c=()=>{if(!e)return{display:"none"};const u=250,d=120;let f=o.x,h=o.y;return o.x+u>window.innerWidth&&(f=o.x-u),o.y+d>window.innerHeight&&(h=o.y-d),f=Math.max(10,f),h=Math.max(10,h),{position:"fixed",left:`${f}px`,top:`${h}px`,zIndex:1e4}};return e?A.jsx("div",{ref:s,className:"context-menu-confirm",style:c(),children:A.jsxs("div",{className:"confirm-content",children:[A.jsx("div",{className:"confirm-title",children:t}),A.jsxs("div",{className:"confirm-buttons",children:[A.jsx(Gt,{size:"small",onClick:r,children:i}),A.jsx(Gt,{size:"small",type:"primary",danger:!0,onClick:n,children:a})]})]})}):null}function fx(){var u,d,f;const{contextMenuState:e,hideContextMenu:t}=yv(),n=O.useRef(null),[r,a]=O.useState({visible:!1,option:null,position:{x:0,y:0}});O.useEffect(()=>{const h=p=>{n.current&&!n.current.contains(p.target)&&(t(),a({visible:!1,option:null,position:{x:0,y:0}}))},v=p=>{p.key==="Escape"&&(r.visible?a({visible:!1,option:null,position:{x:0,y:0}}):t())};return e.isVisible&&(document.addEventListener("mousedown",h),document.addEventListener("keydown",v)),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",v)}},[e.isVisible,r.visible,t]);const i=(h,v)=>{const p=v.target.getBoundingClientRect();a({visible:!0,option:h,position:{x:p.right+10,y:p.top}})},o=()=>{r.option&&(r.option.onClick(),t(),a({visible:!1,option:null,position:{x:0,y:0}}))},s=()=>{a({visible:!1,option:null,position:{x:0,y:0}})},c=()=>{if(!e.isVisible)return{display:"none"};const{x:h,y:v}=e,p=200,g=300;let m=h,y=v;return h+p>window.innerWidth&&(m=h-p),v+g>window.innerHeight&&(y=v-g),{position:"fixed",left:`${m}px`,top:`${y}px`,zIndex:9999}};return e.isVisible?A.jsxs("div",{ref:n,className:"context-menu",style:c(),children:[e.title&&A.jsx("div",{className:"context-menu-title",children:e.title}),A.jsx("div",{className:"context-menu-options",children:e.options.map((h,v)=>A.jsxs(O.Fragment,{children:[h.separator&&A.jsx("div",{className:"context-menu-separator"})," ",h.requestConfirmation?A.jsxs(Gt,{disabled:h.disabled,className:`context-menu-option ${h.disabled?"disabled":""}`,onClick:p=>{h.disabled||i(h,p)},children:[A.jsx("span",{className:"context-menu-label",children:h.label}),h.icon&&A.jsx("span",{className:"context-menu-icon",children:h.icon})]}):A.jsxs(Gt,{disabled:h.disabled,className:`context-menu-option ${h.disabled?"disabled":""}`,onClick:()=>{h.disabled||(h.onClick(),t())},children:[A.jsx("span",{className:"context-menu-label",children:h.label}),h.icon&&A.jsx("span",{className:"context-menu-icon",children:h.icon})]})]},v))}),A.jsx(dx,{visible:r.visible,title:((u=r.option)==null?void 0:u.confirmationMessage)||"Êtes-vous sûr de vouloir faire ça?",onConfirm:o,onCancel:s,okText:((d=r.option)==null?void 0:d.yesText)||"Oui",cancelText:((f=r.option)==null?void 0:f.noText)||"Non",position:r.position})]}):null}const hx=O.createContext(null),yv=()=>{const e=O.useContext(hx);if(!e)throw new Error("useContextMenu must be used within ContextMenuProvider");return e},Cv=()=>{const{showContextMenu:e}=yv();return{handleContextMenu:(n,r,a)=>{n.preventDefault(),n.stopPropagation(),e(n.clientX,n.clientY,r,a)}}};function mx({children:e}){const[t,n]=O.useState({isVisible:!1,x:0,y:0,options:[],title:void 0}),r=(i,o,s,c)=>{n({isVisible:!0,x:i,y:o,options:s,title:c})},a=()=>{n(i=>({...i,isVisible:!1}))};return A.jsxs(hx.Provider,{value:{showContextMenu:r,hideContextMenu:a,contextMenuState:t},children:[A.jsx(fx,{}),e]})}function l9(){const{isPushSupported:e,isSubscribed:t,pushMessage:n,vapidPublicKey:r,subscribePush:a,unsubscribePush:i,sendTestPushNotification:o}=Lu();return A.jsxs("div",{className:"p-10",children:[A.jsx("h3",{children:"Statut des Notifications Push"}),A.jsxs("p",{children:["Supporté:"," ",A.jsx("span",{style:{color:e?"green":"red",fontWeight:"bold"},children:e?"Oui":"Non"})]}),A.jsxs("p",{children:["Clé VAPID:"," ",A.jsx("span",{style:{color:r?"green":"red",fontWeight:"bold"},children:r?"Oui":"Non"})]}),A.jsxs("p",{children:["Abonné:"," ",A.jsx("span",{style:{color:t?"green":"red",fontWeight:"bold"},children:t?"Oui":"Non"})]}),A.jsxs("p",{children:["Message:"," ",A.jsx("span",{style:{color:n?"green":"red",fontWeight:"bold"},children:n||"Aucun"})]}),!t&&e&&A.jsx("button",{onClick:a,children:"S'abonner aux notifications"}),t&&e&&A.jsx("button",{onClick:i,children:"Se désabonner"}),t&&o&&A.jsx("button",{onClick:()=>o("Titre du test","Corps du message de test"),children:"Envoyer une notification de test"})]})}const vx=O.createContext({isPushSupported:!1,isSubscribed:!1,isPushSubscriptionLoading:!1,pushMessage:"",vapidPublicKey:null,currentSubscriptionEndpoint:null,subscribePush:async()=>{},unsubscribePush:async()=>{}}),Lu=()=>O.useContext(vx),c9=e=>{const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(n),a=new Uint8Array(r.length);for(let i=0;i<r.length;++i)a[i]=r.charCodeAt(i);return a};function u9({children:e,usePushNotifications:t}){const{debugMode:n}=Li(),[r,a]=O.useState(!1),[i,o]=O.useState(!1),[s,c]=O.useState(null),[u,d]=O.useState(null),[f,h]=O.useState(""),[v,p]=O.useState(!0);O.useEffect(()=>{if(!t){n&&console.log("Notifications push désactivées par la prop usePushNotifications."),h("Notifications push désactivées.");return}"serviceWorker"in navigator&&"PushManager"in window?(a(!0),n&&console.log("Les notifications push sont supportées."),p(!0),Ut.get("/push-notification/key").then(b=>{d(b.data.publicVapidKey),n&&console.log("Clé publique VAPID récupérée:",b.data.publicVapidKey)}).catch(b=>{n&&console.error("Erreur lors de la récupération de la clé VAPID:",b),h("Erreur: Impossible de récupérer la clé VAPID du serveur.")}),navigator.serviceWorker.register("/service-worker.js").then(b=>(n&&console.log("Service Worker enregistré avec succès:",b),b.pushManager.getSubscription())).then(b=>{b?(n&&console.log("Utilisateur déjà abonné:",b),c(b),o(!0),h("Vous êtes abonné aux notifications.")):(n&&console.log("Utilisateur non abonné."),o(!1),h("Vous n'êtes pas abonné aux notifications.")),p(!1)}).catch(b=>{n&&console.error("Erreur lors de l'enregistrement du Service Worker ou de la récupération de l'abonnement:",b),h("Erreur: Impossible d'enregistrer le Service Worker.")})):(n&&console.warn("Les notifications push ne sont pas supportées par ce navigateur."),h("Votre navigateur ne supporte pas les notifications push."))},[t,n]),O.useEffect(()=>{localStorage.setItem("currentSubscriptionEndpoint",(s==null?void 0:s.endpoint)||"")},[s==null?void 0:s.endpoint]);const g=O.useCallback(async()=>{if(!r||!u){h("Les notifications push ne sont pas supportées ou la clé VAPID est manquante.");return}try{const C=await(await navigator.serviceWorker.ready).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:c9(u)});n&&console.log("Abonnement push réussi:",C),c(C),o(!0),h("Abonnement réussi !"),await Ut.post("/push-notification/subscribe",C),n&&console.log("Abonnement envoyé au serveur.")}catch(b){n&&console.error("Échec de l'abonnement push:",b),h(`Échec de l'abonnement: ${b instanceof Error?b.message:String(b)}`)}},[r,u,n]),m=O.useCallback(async()=>{if(!r||!s){h("Pas d'abonnement à désinscrire.");return}try{await s.unsubscribe(),n&&console.log("Désabonnement push réussi."),c(null),o(!1),h("Désabonnement réussi !")}catch(b){n&&console.error("Échec du désabonnement push:",b),h(`Échec du désabonnement: ${b instanceof Error?b.message:String(b)}`)}},[r,s,n]),y=O.useCallback(async(b,C)=>{var S;if(!i){h("Veuillez vous abonner d'abord pour envoyer une notification de test.");return}if(!n){h("Le mode débogage n'est pas activé pour envoyer des notifications de test.");return}try{const w=await Ut.post("/push-notification/send",{title:b,body:C});w.status===200?h("Notification de test envoyée (vérifiez votre écran)."):h(`Erreur lors de l'envoi de la notification: ${((S=w.data)==null?void 0:S.message)||w.statusText}`)}catch(w){n&&console.error("Erreur lors de l'envoi de la notification de test:",w),h(`Erreur réseau lors de l'envoi: ${w instanceof Error?w.message:String(w)}`)}},[i,n]);return A.jsxs(vx.Provider,{value:{usePushNotifications:t,isPushSupported:r,isSubscribed:i,isPushSubscriptionLoading:v,pushMessage:f,vapidPublicKey:u,currentSubscriptionEndpoint:(s==null?void 0:s.endpoint)||null,subscribePush:g,unsubscribePush:m,sendTestPushNotification:n?y:void 0},children:[n&&t&&A.jsx(l9,{}),e]})}const gx=O.createContext({isProgressiveWebAppInstalled:!1,canInstallProgressiveWebApp:!1,progressiveWebAppMessage:"",isMobile:!1,installProgressiveWebApp:async()=>{}}),Sv=()=>O.useContext(gx);function d9({children:e}){const{debugMode:t,useProgressiveWebAppFeatures:n}=Li(),[r,a]=O.useState(!1),[i,o]=O.useState(null),[s,c]=O.useState(""),[u,d]=O.useState(!1),f=!1;O.useEffect(()=>{const v=()=>{const p=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|rim)|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,g=/android|ipad|playbook|silk/i,m=p.test(navigator.userAgent)||g.test(navigator.userAgent);d(m),t&&console.log("Détection mobile:",m)};return v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[t]),O.useEffect(()=>{let v=!1;if(n===!0?v=!0:n==="mobile"&&(v=u),!v){t&&console.log("Fonctionnalités progressiveWebApp désactivées."),c("Fonctionnalités progressiveWebApp désactivées.");return}const p=()=>{const y=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;a(y),t&&console.log("Statut progressiveWebApp initial:",y?"Installée":"Non installée"),c(y?"Vous êtes en mode progressiveWebApp.":"Vous n'êtes pas en mode progressiveWebApp.")};p();const g=y=>{y.preventDefault(),o(y),t&&console.log("Événement beforeinstallprompt capturé."),c("L'installation de la progressiveWebApp est disponible.")},m=()=>{a(!0),o(null),t&&console.log("progressiveWebApp installée avec succès par l'utilisateur."),c("progressiveWebApp installée avec succès !")};return window.addEventListener("beforeinstallprompt",g),window.addEventListener("appinstalled",m),window.matchMedia("(display-mode: standalone)").addEventListener("change",p),()=>{window.removeEventListener("beforeinstallprompt",g),window.removeEventListener("appinstalled",m),window.matchMedia("(display-mode: standalone)").removeEventListener("change",p)}},[n,t,u]);const h=O.useCallback(async()=>{if(i){t&&console.log("Déclenchement du prompt d'installation progressiveWebApp..."),i.prompt();const{outcome:v}=await i.userChoice;t&&console.log(`Réponse de l'utilisateur au prompt d'installation: ${v}`),c(v==="accepted"?"L'utilisateur a accepté d'installer la progressiveWebApp.":"L'utilisateur a refusé d'installer la progressiveWebApp."),o(null)}else t&&console.warn("Le prompt d'installation n'est pas disponible ou la progressiveWebApp est déjà installée."),c("L'installation n'est pas disponible.")},[i,t]);return A.jsxs(gx.Provider,{value:{useProgressiveWebAppFeatures:n,isProgressiveWebAppInstalled:r,canInstallProgressiveWebApp:!!i&&!r,progressiveWebAppMessage:s,isMobile:u,installProgressiveWebApp:h},children:[t&&f,e]})}const px=O.createContext(void 0),f9=()=>{const e=O.useContext(px);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},h9=({children:e})=>{const[t,n]=O.useState(()=>{const u=localStorage.getItem("theme");return u==="light"||u==="dark"?u:"light"}),[r,a]=O.useState(()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[i,o]=O.useState("hsl(212, 51%, 31%)");O.useEffect(()=>{const u=window.matchMedia("(prefers-color-scheme: dark)"),d=f=>{a(f.matches?"dark":"light")};return u.addEventListener("change",d),()=>u.removeEventListener("change",d)},[]),O.useEffect(()=>{const u=document.body.classList,d={light:"light-theme",dark:"dark-theme"};Object.values(d).forEach(f=>u.remove(f)),t==="light"||t==="dark"?(u.add(d[t]),localStorage.setItem("theme",t)):localStorage.removeItem("theme")},[t]),O.useEffect(()=>{document.body.style.setProperty("--dynamic-primary",i)},[i]);const c={theme:t,toggleTheme:()=>{n(u=>u==="dark"?"light":u==="light"?"dark":r==="dark"?"light":"dark")},currentSystemTheme:r,primaryColor:i,setPrimaryColor:o};return A.jsx(px.Provider,{value:c,children:e})},m9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm52-84a12,12,0,0,1-12,12H117l11.52,11.51a12,12,0,0,1-17,17l-32-32a12,12,0,0,1,0-17l32-32a12,12,0,0,1,17,17L117,116h51A12,12,0,0,1,180,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H107.31l18.35,18.34a8,8,0,0,1-11.32,11.32l-32-32a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,11.32L107.31,120H168A8,8,0,0,1,176,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm40,112H107.31l18.35,18.34a8,8,0,0,1-11.32,11.32l-32-32a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,11.32L107.31,120H168a8,8,0,0,1,0,16Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm46-90a6,6,0,0,1-6,6H102.49l21.75,21.76a6,6,0,1,1-8.48,8.48l-32-32a6,6,0,0,1,0-8.48l32-32a6,6,0,0,1,8.48,8.48L102.49,122H168A6,6,0,0,1,174,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H107.31l18.35,18.34a8,8,0,0,1-11.32,11.32l-32-32a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,11.32L107.31,120H168A8,8,0,0,1,176,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm44-92a4,4,0,0,1-4,4H97.66l25.17,25.17a4,4,0,0,1-5.66,5.66l-32-32a4,4,0,0,1,0-5.66l32-32a4,4,0,0,1,5.66,5.66L97.66,124H168A4,4,0,0,1,172,128Z"}))]]),v9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm48.49-92.49a12,12,0,0,1,0,17l-32,32a12,12,0,1,1-17-17L139,140H88a12,12,0,0,1,0-24h51l-11.52-11.51a12,12,0,1,1,17-17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm45.66-93.66a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32-11.32L148.69,136H88a8,8,0,0,1,0-16h60.69l-18.35-18.34a8,8,0,0,1,11.32-11.32Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,109.66-32,32a8,8,0,0,1-11.32-11.32L148.69,136H88a8,8,0,0,1,0-16h60.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,173.66,133.66Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm44.24-94.24a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L153.51,134H88a6,6,0,0,1,0-12h65.51l-21.75-21.76a6,6,0,0,1,8.48-8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm45.66-93.66a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32-11.32L148.69,136H88a8,8,0,0,1,0-16h60.69l-18.35-18.34a8,8,0,0,1,11.32-11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm42.83-94.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L158.34,132H88a4,4,0,0,1,0-8h70.34L133.17,98.83a4,4,0,0,1,5.66-5.66Z"}))]]),g9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),l.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),p9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),l.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),b9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),l.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),y9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm12,191.13V156h20a12,12,0,0,0,0-24H140V112a12,12,0,0,1,12-12h16a12,12,0,0,0,0-24H152a36,36,0,0,0-36,36v20H96a12,12,0,0,0,0,24h20v55.13a84,84,0,1,1,24,0Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm8,191.63V152h24a8,8,0,0,0,0-16H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,0-16H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0,0,16h24v63.63a88,88,0,1,1,16,0Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,128a104.16,104.16,0,0,1-91.55,103.26,4,4,0,0,1-4.45-4V152h24a8,8,0,0,0,8-8.53,8.17,8.17,0,0,0-8.25-7.47H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,8-8.53A8.17,8.17,0,0,0,167.73,80H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0-8,8.53A8.17,8.17,0,0,0,96.27,152H120v75.28a4,4,0,0,1-4.44,4A104.15,104.15,0,0,1,24.07,124.09c2-54,45.74-97.9,99.78-100A104.12,104.12,0,0,1,232,128Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm6,191.8V150h26a6,6,0,0,0,0-12H134V112a18,18,0,0,1,18-18h16a6,6,0,0,0,0-12H152a30,30,0,0,0-30,30v26H96a6,6,0,0,0,0,12h26v67.8a90,90,0,1,1,12,0Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm8,191.63V152h24a8,8,0,0,0,0-16H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,0-16H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0,0,16h24v63.63a88,88,0,1,1,16,0Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm4,191.91V148h28a4,4,0,0,0,0-8H132V112a20,20,0,0,1,20-20h16a4,4,0,0,0,0-8H152a28,28,0,0,0-28,28v28H96a4,4,0,0,0,0,8h28v71.91a92,92,0,1,1,8,0Z"}))]]),C9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M222.14,69.17,186.83,33.86A19.86,19.86,0,0,0,172.69,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V83.31A19.86,19.86,0,0,0,222.14,69.17ZM164,204H92V160h72Zm40,0H188V156a20,20,0,0,0-20-20H88a20,20,0,0,0-20,20v48H52V52H171l33,33ZM164,84a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h56A12,12,0,0,1,164,84Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,83.31V208a8,8,0,0,1-8,8H176V152a8,8,0,0,0-8-8H88a8,8,0,0,0-8,8v64H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H172.69a8,8,0,0,1,5.65,2.34l35.32,35.32A8,8,0,0,1,216,83.31Z",opacity:"0.2"}),l.createElement("path",{d:"M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM208,208H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M217.9,73.42,182.58,38.1a13.9,13.9,0,0,0-9.89-4.1H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V83.31A13.9,13.9,0,0,0,217.9,73.42ZM170,210H86V152a2,2,0,0,1,2-2h80a2,2,0,0,1,2,2Zm40-2a2,2,0,0,1-2,2H182V152a14,14,0,0,0-14-14H88a14,14,0,0,0-14,14v58H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H172.69a2,2,0,0,1,1.41.58L209.42,81.9a2,2,0,0,1,.58,1.41ZM158,72a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h56A6,6,0,0,1,158,72Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216.49,74.83,181.17,39.51A11.93,11.93,0,0,0,172.69,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V83.31A11.93,11.93,0,0,0,216.49,74.83ZM172,212H84V152a4,4,0,0,1,4-4h80a4,4,0,0,1,4,4Zm40-4a4,4,0,0,1-4,4H180V152a12,12,0,0,0-12-12H88a12,12,0,0,0-12,12v60H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H172.69a4,4,0,0,1,2.82,1.17l35.32,35.32A4,4,0,0,1,212,83.31ZM156,72a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h56A4,4,0,0,1,156,72Z"}))]]),S9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228,128a100,100,0,1,1-22.86-63.64,12,12,0,0,1-18.51,15.28A76,76,0,1,0,203.05,140H128a12,12,0,0,1,0-24h88A12,12,0,0,1,228,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),l.createElement("path",{d:"M224,128a96,96,0,1,1-21.95-61.09,8,8,0,1,1-12.33,10.18A80,80,0,1,0,207.6,136H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104,104,0,0,0,128,24Zm0,184A80,80,0,1,1,181.34,68.37a8,8,0,0,1-10.67,11.92A64,64,0,1,0,191.5,136H128a8,8,0,0,1,0-16h72a8,8,0,0,1,8,8A80.09,80.09,0,0,1,128,208Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M222,128a94,94,0,1,1-21.49-59.82,6,6,0,1,1-9.25,7.64A82,82,0,1,0,209.78,134H128a6,6,0,0,1,0-12h88A6,6,0,0,1,222,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-21.95-61.09,8,8,0,1,1-12.33,10.18A80,80,0,1,0,207.6,136H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M220,128a92,92,0,1,1-21-58.55,4,4,0,0,1-6.17,5.1A84,84,0,1,0,211.91,132H128a4,4,0,0,1,0-8h88A4,4,0,0,1,220,128Z"}))]]),w9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),l.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),E9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),l.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),x9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),l.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),A9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),l.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),O9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M125.18,156.94a64,64,0,1,0-82.36,0,100.23,100.23,0,0,0-39.49,32,12,12,0,0,0,19.35,14.2,76,76,0,0,1,122.64,0,12,12,0,0,0,19.36-14.2A100.33,100.33,0,0,0,125.18,156.94ZM44,108a40,40,0,1,1,40,40A40,40,0,0,1,44,108Zm206.1,97.67a12,12,0,0,1-16.78-2.57A76.31,76.31,0,0,0,172,172a12,12,0,0,1,0-24,40,40,0,1,0-10.3-78.67,12,12,0,1,1-6.16-23.19,64,64,0,0,1,57.64,110.8,100.23,100.23,0,0,1,39.49,32A12,12,0,0,1,250.1,205.67Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M136,108A52,52,0,1,1,84,56,52,52,0,0,1,136,108Z",opacity:"0.2"}),l.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M164.47,195.63a8,8,0,0,1-6.7,12.37H10.23a8,8,0,0,1-6.7-12.37,95.83,95.83,0,0,1,47.22-37.71,60,60,0,1,1,66.5,0A95.83,95.83,0,0,1,164.47,195.63Zm87.91-.15a95.87,95.87,0,0,0-47.13-37.56A60,60,0,0,0,144.7,54.59a4,4,0,0,0-1.33,6A75.83,75.83,0,0,1,147,150.53a4,4,0,0,0,1.07,5.53,112.32,112.32,0,0,1,29.85,30.83,23.92,23.92,0,0,1,3.65,16.47,4,4,0,0,0,3.95,4.64h60.3a8,8,0,0,0,7.73-5.93A8.22,8.22,0,0,0,252.38,195.48Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M112.6,158.43a58,58,0,1,0-57.2,0A93.83,93.83,0,0,0,5.21,196.72a6,6,0,0,0,10.05,6.56,82,82,0,0,1,137.48,0,6,6,0,0,0,10-6.56A93.83,93.83,0,0,0,112.6,158.43ZM38,108a46,46,0,1,1,46,46A46.06,46.06,0,0,1,38,108Zm211,97a6,6,0,0,1-8.3-1.74A81.8,81.8,0,0,0,172,166a6,6,0,0,1,0-12,46,46,0,1,0-17.08-88.73,6,6,0,1,1-4.46-11.14,58,58,0,0,1,50.14,104.3,93.83,93.83,0,0,1,50.19,38.29A6,6,0,0,1,249,205Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M107.19,159a56,56,0,1,0-46.38,0A91.83,91.83,0,0,0,6.88,197.81a4,4,0,1,0,6.7,4.37,84,84,0,0,1,140.84,0,4,4,0,1,0,6.7-4.37A91.83,91.83,0,0,0,107.19,159ZM36,108a48,48,0,1,1,48,48A48.05,48.05,0,0,1,36,108Zm212,95.35a4,4,0,0,1-5.53-1.17A83.81,83.81,0,0,0,172,164a4,4,0,0,1,0-8,48,48,0,1,0-17.82-92.58,4,4,0,1,1-3-7.43,56,56,0,0,1,44,103,91.83,91.83,0,0,1,53.93,38.86A4,4,0,0,1,248,203.35Z"}))]]),P9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),l.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),M9=O.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),rr=l.forwardRef((e,t)=>{const{alt:n,color:r,size:a,weight:i,mirrored:o,children:s,weights:c,...u}=e,{color:d="currentColor",size:f,weight:h="regular",mirrored:v=!1,...p}=l.useContext(M9);return l.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:a??f,height:a??f,fill:r??d,viewBox:"0 0 256 256",transform:o||v?"scale(-1, 1)":void 0,...p,...u},!!n&&l.createElement("title",null,n),s,c.get(i??h))});rr.displayName="IconBase";const bx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:m9}));bx.displayName="ArrowCircleLeftIcon";const yx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:v9}));yx.displayName="ArrowCircleRightIcon";const Cx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:g9}));Cx.displayName="BellIcon";const Sx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:p9}));Sx.displayName="CheckIcon";const wv=Sx,wx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:b9}));wx.displayName="DownloadSimpleIcon";const Ex=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:y9}));Ex.displayName="FacebookLogoIcon";const xx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:C9}));xx.displayName="FloppyDiskIcon";const I9=xx,Ax=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:S9}));Ax.displayName="GoogleLogoIcon";const Ox=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:w9}));Ox.displayName="PaperPlaneTiltIcon";const Px=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:E9}));Px.displayName="PencilSimpleIcon";const Mx=Px,Ix=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:x9}));Ix.displayName="PlusIcon";const N9=Ix,Nx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:A9}));Nx.displayName="TrashIcon";const Rx=Nx,Dx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:O9}));Dx.displayName="UsersIcon";const Ev=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:P9}));Ev.displayName="XIcon";const zu=Ev;function xv({icon:e,text:t,onClick:n,onClose:r,visible:a=!0,disabled:i=!1,size:o=56,theme:s="pwa",bottom:c=24,showClose:u=!0,className:d="",onAction:f,onPopupClose:h,url:v,urlText:p}){const[g,m]=O.useState(!0),[y,b]=O.useState(!0),C=a&&y;if(O.useEffect(()=>{if(C)m(!0);else{const x=setTimeout(()=>m(!1),250);return()=>clearTimeout(x)}},[C]),!g)return null;const S=C?{opacity:1,transform:"translateY(0) scale(1)",transition:"opacity 0.35s, transform 0.35s",animation:"popbutton-fade-in 0.35s"}:{opacity:0,transform:"translateY(10px) scale(0.95)",transition:"opacity 0.35s, transform 0.35s"},w=()=>{b(!1),typeof r=="function"&&r(),typeof h=="function"&&h()};return A.jsx("div",{className:`PopButton-container PopButton-${s}-theme ${d}`,style:{bottom:c,pointerEvents:C?"auto":"none",...S},children:A.jsxs("div",{className:"flex col gap-10",children:[A.jsx("div",{className:"PopButton-btn-row",children:A.jsxs(Gt,{size:"large",disabled:i,className:`PopButton-btn${i?" disabled":""}`,style:{minWidth:o+32},onClick:()=>{n&&n(),f&&f()},children:[A.jsx("span",{className:"PopButton-col PopButton-col-icon",children:e}),A.jsx("span",{className:"PopButton-col PopButton-text PopButton-col-text",children:t}),u?A.jsx("span",{className:"PopButton-col PopButton-close-wrapper PopButton-col-close",onClick:x=>{x.stopPropagation(),w()},children:A.jsx(Ev,{size:20,className:"PopButton-close"})}):A.jsx("span",{className:"PopButton-col PopButton-col-close"}),A.jsx("span",{className:"PopButton-glossy"})]})}),v&&p&&(()=>{let x=!1;try{const E=document.createElement("a");E.href=v;const M=E.pathname+E.search+E.hash,P=window.location.pathname+window.location.search+window.location.hash;x=M===P||E.href===window.location.href}catch(E){console.warn("Invalid URL:",v,E)}return x?null:A.jsx("div",{className:"PopButton-link-container",style:{marginTop:8,textAlign:"center"},children:A.jsx("a",{href:v,className:"PopButton-link",style:{color:"#007bff",textDecoration:"underline",cursor:"pointer",fontSize:14},children:p})})})()]})})}function jx({size:e=56,visible:t=!0,forceVisible:n=!1,text:r,knowMoreUrl:a,knowMoreText:i,onAction:o,onPopupClose:s}){const{organizationDetails:c,areOrganizationDetailsLoading:u}=Gr(),d=r||"Installez l'application pour une expérience optimale",{showMessage:f}=Ur(),{isProgressiveWebAppInstalled:h,canInstallProgressiveWebApp:v,installProgressiveWebApp:p}=Sv(),[g,m]=O.useState(!1),y=t&&!h&&v||n,b=async()=>{if(!g){m(!0);try{await p(),o&&o()}catch{f({type:"error",message:"L'installation a échoué ou a été annulée."})}setTimeout(()=>m(!1),2e3)}},C=c!=null&&c.image?A.jsx("img",{src:c.image,alt:"Organization Logo",style:{width:e,height:e}}):A.jsx(wx,{size:e,color:"#1890ff"});return u?null:A.jsx(xv,{icon:C,text:d,onClick:b,onClose:s,visible:y,disabled:g,size:e,theme:"pwa",showClose:!0,bottom:50,onAction:o,onPopupClose:s,url:a,urlText:i})}function Tx({size:e=56,visible:t=!0,forceVisible:n=!1,text:r,knowMoreUrl:a,knowMoreText:i,onAction:o,onPopupClose:s}){const c=r||"Activez les notifications pour ne rater aucune commande. Cliquez ici pour vous abonner.",{isSubscribed:u,subscribePush:d}=Lu(),[f,h]=O.useState(!1),v=async()=>{f||(h(!0),u||(await d(),o&&o()),setTimeout(()=>h(!1),2e3))},p=t&&!u||n;return A.jsx(xv,{icon:A.jsx(Cx,{weight:u?"fill":"regular",size:32,color:u?"#3e8e5a":"#faad14"}),text:c,onClick:v,onClose:s,visible:p,disabled:f,size:e,theme:u?"subscribed":"unsubscribed",showClose:!0,bottom:50,onAction:o,onPopupClose:s,url:a,urlText:i})}function Lx({enableInstallAppButton:e,enablePushNotificationButton:t}){const{isProgressiveWebAppInstalled:n,canInstallProgressiveWebApp:r}=Sv(),{isPushSupported:a,isSubscribed:i,isPushSubscriptionLoading:o}=Lu(),[s,c]=O.useState(!1),[u,d]=O.useState(!1),f=!n&&r&&!s&&e,h=!f&&a&&!o&&!i&&!u&&t;return A.jsxs(A.Fragment,{children:[A.jsx(jx,{visible:f,onPopupClose:()=>{c(!0)},knowMoreUrl:"/install-app",knowMoreText:"En savoir plus"}),A.jsx(Tx,{visible:h,onPopupClose:()=>{d(!0)},knowMoreUrl:"/install-app",knowMoreText:"En savoir plus"})]})}const R9="lystechcorenpmpackage",D9="lystechcorenpmpackage:last-version",zx="3.0.9";function Fx(e={}){const{packageName:t=R9,storageKey:n=D9,triggerOnFirstInstall:r=!1,onPackageUpdated:a}=e,[i,o]=O.useState(null),[s]=O.useState(zx),[c,u]=O.useState(!1),[d,f]=O.useState(!1),h=O.useCallback(()=>{if(typeof window>"u")return;const v=localStorage.getItem(n),p=!v,g=!!v&&v!==s;if(o(v),u(p),f(g),p||g){const m={packageName:t,previousVersion:v,currentVersion:s,isFirstInstall:p,hasUpdated:g};(g||p&&r)&&(a==null||a(m)),window.dispatchEvent(new CustomEvent("lystechcorenpmpackage:update",{detail:m}))}localStorage.setItem(n,s)},[n,s,t,r,a]);return O.useEffect(()=>{h()},[h]),O.useMemo(()=>({packageName:t,previousVersion:i,currentVersion:s,isFirstInstall:c,hasUpdated:d,checkForUpdate:h}),[t,i,s,c,d,h])}const j9=new ZN({defaultOptions:{queries:{staleTime:1e3*60*5,retry:3,refetchOnWindowFocus:!1}}}),kx=O.createContext({}),Li=()=>O.useContext(kx);function T9({children:e,organization:t,shouldRedirectAfterLogin:n,loginRedirectRoute:r,queryClient:a,usePushNotifications:i,useProgressiveWebAppFeatures:o,useThemeProvider:s,quickGoogleLoginButtonStyle:c,enableGoogleQuickLoginButton:u,showGoogleQuickLoginButton:d,useGoogleAutoSelect:f,debugMode:h,showAskPermissionsButtons:v,onPackageUpdated:p,triggerOnFirstInstallPackageCallback:g,packageVersionStorageKey:m}){const y=a||j9;Fx({onPackageUpdated:p,triggerOnFirstInstall:!!g,storageKey:m});const b=A.jsxs(kx.Provider,{value:{debugMode:h,usePushNotifications:i,useProgressiveWebAppFeatures:o},children:[h&&A.jsxs("div",{className:"p-10",children:[A.jsx("h2",{children:"DEBUG MODE"}),A.jsxs("p",{children:["Organization: ",t]})]}),A.jsx(d9,{children:A.jsx(i9,{children:A.jsx(nR,{client:y,children:A.jsx(u9,{usePushNotifications:i,children:A.jsx(s9,{children:A.jsx(L9,{organization:t,children:A.jsx(H9,{shouldRedirectAfterLogin:n,loginRedirectRoute:r,quickGoogleLoginButtonStyle:c,enableGoogleQuickLoginButton:u,showGoogleQuickLoginButton:d,useGoogleAutoSelect:f,children:A.jsxs(mx,{children:[e,v&&A.jsx(Lx,{enableInstallAppButton:v==null?void 0:v.installApp,enablePushNotificationButton:v==null?void 0:v.pushNotifications})]})})})})})})})})]});return s?A.jsx(h9,{children:b}):b}const Bx=O.createContext({});function Gr(){return O.useContext(Bx)}function L9({children:e,organization:t}){const n=mf(),{debugMode:r}=Li(),[a,i]=O.useState(t||"");O.useEffect(()=>{if(t){r&&console.log("OrganizationProvider: organization prop utilisée",t),i(t);return}const S=new URLSearchParams(n.search),w=S.get("org");if(w){r&&console.log("OrganizationProvider: paramètre ?org= trouvé dans l'URL",w),S.delete("org");const x=`${n.pathname}${S.toString()?"?"+S.toString():""}`;window.history.replaceState({},"",x),i(w)}else{const x=localStorage.getItem("Organization");x?(r&&console.log("OrganizationProvider: organisation trouvée dans le localStorage",x),i(x)):r&&console.log("OrganizationProvider: aucune organisation trouvée")}},[t,n.search,n.pathname,r]);function o(S){r&&console.log("User logged in:",S),!a&&!t&&S!=null&&S.defaultOrganization&&i(S.defaultOrganization)}const{data:s,isLoading:c,refetch:u}=G0(a),d=sf();function f(){u(),d.invalidateQueries()}O.useEffect(()=>{f()},[a]),O.useEffect(()=>{localStorage.removeItem("invalid-organizations")},[]);const[h,v]=O.useState(""),[p,g]=O.useState({clientId:"",appSecret:"",clientIdSandbox:"",appSecretSandbox:"",enabled:!1});O.useEffect(()=>{localStorage.setItem("Organization",a),r&&(a?console.log("OrganizationProvider: organisation mise à jour dans le localStorage",a):console.warn("OrganizationProvider: organisationState est vide, pas de mise à jour dans le localStorage"))},[a]),O.useEffect(()=>{v((s==null?void 0:s.image)??""),s&&g({clientId:(s==null?void 0:s.paypalClientId)??"",appSecret:(s==null?void 0:s.paypalAppSecret)??"",clientIdSandbox:(s==null?void 0:s.paypalClientIdSandbox)??"",appSecretSandbox:(s==null?void 0:s.paypalAppSecretSandbox)??"",enabled:!!s.paypalEnabled||!1})},[s]);async function m(S){const w=await NN(S);return w!=null&&w.success&&u(),w==null?void 0:w.success}async function y(S){const w=await RN(S);return w!=null&&w.success&&(u(),g(x=>({...x,enabled:S}))),w==null?void 0:w.success}async function b(){await jN(),u()}async function C(S,w,x){const E=await DN(S,w,x);return f(),E}return A.jsx(Bx.Provider,{value:{organization:a,organizationImage:h,organizationDetails:s??void 0,areOrganizationDetailsLoading:c,paypalInfo:p,onLoggedIn:o,updateOrganizationDetails:m,updatePaypalConfiguration:C,toggleOrganizationMode:b,updateOrganizationPaypalEnabled:y,refetchOrganizationDetails:f},children:e})}async function z9(){return await Ut.get("/users/roles")}const Hx=(e,t)=>ta(["user-role-details",e,t],z9,{enabled:!!e,select:n=>n==null?void 0:n.data,onError:n=>{console.error("Error fetching user role details:",n)}}),F9={apiKey:"AIzaSyCpAeHlt1wZvM5KtYg7X7MDVnWVJT86gvc",authDomain:"lystech.firebaseapp.com",databaseURL:"https://lystech.firebaseio.com",projectId:"lystech",storageBucket:"lystech.appspot.com",messagingSenderId:"237347321732",appId:"1:237347321732:web:7f9586d48e488d73ddcfd1"};async function Av(e){const t=await Ut.get(`users/impersonate/${e}`);return t==null?void 0:t.data}const Vx=e=>ta(["impersonating-user",e],()=>Av(e),{enabled:!!e});async function Yx(e){const t=new FormData;t.append("image",e);const n=await Ut.put("users/image",t,{headers:{"Content-Type":"multipart/form-data"},data:t});return n==null?void 0:n.data}async function Wx(e,t){const n=await Ut.put("users/image/url",{authKey:e,imageUrl:t});return n==null?void 0:n.data}async function k9(e){const t=await Ut.post("auth/request-reset-password",{email:e});return t==null?void 0:t.data}async function B9(e){const t=await Ut.post(`auth/activate/${e}`);return t==null?void 0:t.data}async function Ux(e){return await Ut.post("auth/register",{...e})}const Gx=O.createContext({});function cr(){return O.useContext(Gx)}function H9({children:e,shouldRedirectAfterLogin:t,loginRedirectRoute:n,quickGoogleLoginButtonStyle:r,enableGoogleQuickLoginButton:a,showGoogleQuickLoginButton:i,useGoogleAutoSelect:o=!0}){var te,re,ne,ue,_,fe,se;const[s,c]=O.useState(n||null),{debugMode:u}=Li();Tg(F9);const{organization:d,onLoggedIn:f}=Gr(),h=O.useCallback(()=>{const ce=sessionStorage.getItem("username");if(ce)return{id:parseInt(sessionStorage.getItem("id")||"-1"),displayName:ce,firstName:sessionStorage.getItem("firstName")||"",lastName:sessionStorage.getItem("lastName")||"",birthday:sessionStorage.getItem("birthday")?new Date(sessionStorage.getItem("birthday")):null,email:sessionStorage.getItem("email")||"",authKey:sessionStorage.getItem("authKey")||"",profileImage:sessionStorage.getItem("profileImage")||"",notifyCoffee:sessionStorage.getItem("notifyCoffee")?parseInt(sessionStorage.getItem("notifyCoffee")):0,defaultOrganization:sessionStorage.getItem("defaultOrganization")||"",thirdPartyAuthUID:sessionStorage.getItem("thirdPartyAuthUID")||"",roleDetails:{role:"",isOwner:!1,isSuperAdmin:!1,isAdmin:!1,isUser:!1,isSuperAdminOrMore:!1,isAdminOrMore:!1,isUserOrMore:!1,isAdminInAnyOrganization:!1},type:"emailPassword",activatedOn:"",approvedBy:""}},[]),v=O.useCallback(()=>{const ee=h();return ee||{}},[h]);function p(ee){g&&(g.notifyCoffee=ee,m({...g}),sessionStorage.setItem("notifyCoffee",ee.toString()))}const[g,m]=O.useState(v()),[y,b]=O.useState(localStorage.getItem("impersonateAuthKey")||void 0),C=O.useCallback(async ee=>{const{success:ce,url:me}=await Yx(ee);return ce&&(g.photoURL=me,g.profileImage=me,m({...g}),sessionStorage.setItem("profileImage",me||"")),ce},[g,m]),S=O.useCallback(async ee=>{const{success:ce,url:me}=await Wx(g==null?void 0:g.authKey,ee);return ce&&(g.photoURL=me,g.profileImage=me,m({...g}),sessionStorage.setItem("profileImage",me||"")),ce},[g,m]),w=O.useCallback(ee=>{g.firstName=ee,m({...g}),sessionStorage.setItem("firstName",ee)},[g,m]),x=O.useCallback(ee=>{g.lastName=ee,m({...g}),sessionStorage.setItem("lastName",ee)},[g,m]);O.useEffect(()=>{y?localStorage.setItem("impersonateAuthKey",y):localStorage.removeItem("impersonateAuthKey")},[y]);const E=ab(),M=ZM(),P=O.useMemo(()=>{if(g&&g.id!==-1&&g!=null&&g.authKey)return{id:g.id,authKey:g.authKey,thirdPartyAuthUID:g.thirdPartyAuthUID,displayName:g.displayName,firstName:g.firstName,lastName:g.lastName,birthday:g.birthday,profileImage:g.profileImage,defaultOrganization:g.defaultOrganization,email:g.email,roleDetails:g.roleDetails,type:"emailPassword",activatedOn:g.activatedOn,notifyCoffee:g.notifyCoffee,approvedBy:g.approvedBy}},[g]);O.useEffect(()=>{P&&y===(P==null?void 0:P.authKey)&&b(void 0)},[P,y]);const{data:I}=Vx(y||""),{data:N,isLoading:L}=Hx(I?I==null?void 0:I.authKey:P==null?void 0:P.authKey,d),D=O.useMemo(()=>I?{...I,roleDetails:N}:{...P,roleDetails:N},[P,I,N]),R=O.useMemo(()=>!!(P!=null&&P.authKey)&&(P==null?void 0:P.id)!==-1,[P]);O.useEffect(()=>{localStorage.setItem("authKey",(P==null?void 0:P.authKey)??"")},[P]),O.useEffect(()=>{R||T()},[R]);async function T(){try{const ee=await Ut.get("/auth/me");return console.log("Validate Me Response",ee),ee.data&&ie(ee==null?void 0:ee.data),ee==null?void 0:ee.data}catch(ee){return console.log("Validate Me Error",ee),null}}O.useEffect(()=>{N&&localStorage.setItem("userRoleDetails",JSON.stringify(N)),I?localStorage.setItem("impersonatedUserAuthKey",I.authKey):localStorage.removeItem("impersonatedUserAuthKey")},[N,I]);const j=O.useMemo(()=>{if(!R)return"/login";let ee="";return N&&(ee="/past-orders"),ee===""&&(ee="/"),("/"+ee+"/").replace(/\/+/g,"/")},[N,R]);async function z(ee,ce,me,pe=()=>{},be=()=>{},Ae=0){try{const we={email:ee,password:ce},ve=await Ut.get("/auth/login",{headers:we}),Oe=!!ve.data;me({result:Oe,data:ve==null?void 0:ve.data}),Ae>0?setTimeout(()=>{ie(ve==null?void 0:ve.data),t&&s&&E(s),f&&f(ve==null?void 0:ve.data)},Ae):(ie(ve==null?void 0:ve.data),f&&f(ve==null?void 0:ve.data),t&&s&&E(s))}catch(we){console.log("Login Error",we),(we==null?void 0:we.status)===403?pe(we):be(we)}}async function F(ee){const ce=await Ut.post("/auth/login/third-party",{providerData:ee}),me=ce==null?void 0:ce.data;if(!me){console.error("No user data returned from third-party login");return}return ie(me),f&&f(me),ce}async function k(){var ee,ce,me,pe;try{const be=new pa;be.setCustomParameters({prompt:"select_account"});const Ae=await Ip(M,be);if(((ce=(ee=Ae==null?void 0:Ae.user)==null?void 0:ee.providerData)==null?void 0:ce.length)===0||!((me=Ae==null?void 0:Ae.user)!=null&&me.providerData))return;const we=(pe=Ae==null?void 0:Ae.user)==null?void 0:pe.providerData[0];return await F(we)}catch(be){console.error("Google login failed",be)}}async function H(){var ee;try{const ce=new ga,me=await Ip(M,ce),pe=(ee=me==null?void 0:me.user)==null?void 0:ee.providerData[0];return await F(pe)}catch(ce){console.error("Facebook login failed",ce)}}async function W(){b(void 0),sessionStorage.clear(),localStorage.clear(),ie(null),FP(M),E("/login")}async function B(ee){const ce=iI(ee.credential);if(ce!=null&&ce.email){let me="unknown.com";ce!=null&&ce.iss.includes("google")?me="google.com":ce!=null&&ce.iss.includes("facebook")&&(me="facebook.com");const pe={displayName:ce==null?void 0:ce.given_name,email:ce==null?void 0:ce.email,phoneNumber:null,photoURL:ce==null?void 0:ce.picture,providerId:me,uid:ce==null?void 0:ce.sub};return await F(pe)}}const V=()=>{console.error("Google login failed")};function Y(ee){N!=null&&N.isSuperAdminOrMore&&b(ee)}function U(ee){t&&s&&E(s)}function J(ee){var ce;if(!ee){sessionStorage.clear();return}sessionStorage.setItem("username",ee.displayName),sessionStorage.setItem("email",ee.email),sessionStorage.setItem("firstName",ee.firstName??""),sessionStorage.setItem("lastName",ee.lastName??""),sessionStorage.setItem("birthday",((ce=ee.birthday)==null?void 0:ce.toString())??""),sessionStorage.setItem("defaultOrganization",ee.defaultOrganization),sessionStorage.setItem("id",ee.id.toString()),sessionStorage.setItem("authKey",ee.authKey),sessionStorage.setItem("thirdPartyAuthUID",ee.thirdPartyAuthUID),sessionStorage.setItem("profileImage",ee.profileImage),sessionStorage.setItem("notifyCoffee",ee.notifyCoffee.toString())}function ie(ee){m(ee),J(ee),(ee==null?void 0:ee.id)==-1&&(ee==null?void 0:ee.id)!=-1&&U()}const oe=O.useMemo(()=>{var ee,ce,me;return R?!1:a!==void 0?a:!((ee=window==null?void 0:window.location)!=null&&ee.pathname.includes("/activate"))&&!((ce=window==null?void 0:window.location)!=null&&ce.pathname.includes("/account/reset-password"))&&!((me=window==null?void 0:window.location)!=null&&me.pathname.includes("/account/activation"))},[R,a,(te=window==null?void 0:window.location)==null?void 0:te.pathname]),le=O.useMemo(()=>{var ee;return i!==void 0?i:oe&&!((ee=window==null?void 0:window.location)!=null&&ee.pathname.includes("/login"))},[oe,i,(re=window==null?void 0:window.location)==null?void 0:re.pathname]);return O.useEffect(()=>{u&&(console.log("AuthProvider - user.authKey:",P==null?void 0:P.authKey),console.log("AuthProvider - isLoggedIn:",R))},[P==null?void 0:P.authKey,R]),A.jsx(_M,{clientId:"237347321732-65nra8lcs59qn6dms77ruad01vjdr7ph.apps.googleusercontent.com",children:A.jsxs(Gx.Provider,{value:{user:P?{...P,roleDetails:N||{role:"",isOwner:!1,isSuperAdmin:!1,isAdmin:!1,isUser:!1,isSuperAdminOrMore:!1,isAdminOrMore:!1,isUserOrMore:!1,isAdminInAnyOrganization:!1}}:void 0,impersonatedUser:I,currentUser:D,auth:M,isLoggedIn:R,isSuperAdmin:(ne=D==null?void 0:D.roleDetails)==null?void 0:ne.isSuperAdminOrMore,isAdmin:(ue=D==null?void 0:D.roleDetails)==null?void 0:ue.isAdminOrMore,isUser:(_=D==null?void 0:D.roleDetails)==null?void 0:_.isUserOrMore,isSuperAdminInAnyOrganization:(fe=D==null?void 0:D.roleDetails)==null?void 0:fe.isSuperAdminOrMore,isAdminInAnyOrganization:(se=D==null?void 0:D.roleDetails)==null?void 0:se.isAdminInAnyOrganization,areRoleDetailsLoading:L,homeRoute:j,impersonateAuthKey:y,setLoginRedirectRouteState:c,registerNewUser:Ux,signInWithEmailAndPassword:z,signInWithGoogle:k,signInWithFacebook:H,logout:W,requestResetPassword:k9,activateUser:B9,impersonate:Y,getImpersonatingUser:Av,updateUserImage:C,updateUserImageUrl:S,updateUserFirstName:w,updateUserLastName:x,updateNotificationState:p},children:[u&&A.jsx("div",{className:"p-10",children:A.jsxs("p",{children:["Login Redirect Route State: ",A.jsx("b",{children:s||"null"})]})}),e,oe&&A.jsx("div",{className:`fixed top-10 right-10 ${le?"":"hidden"}`,style:r,children:A.jsx(nI,{onSuccess:B,onError:V,auto_select:o,useOneTap:!0,type:"icon"})})]})})}async function V9(){return(await Ut.get("/politique-and-conditions/9716a5de-02be-4fb2-b9b5-85ad82bfae4f")).data}async function Y9(){return(await Ut.get("/politique-and-conditions")).data}const Kx=()=>ta({queryKey:["lystech-politique-and-conditions"],queryFn:V9}),Qx=e=>ta({queryKey:["politique-and-conditions",e],queryFn:Y9,enabled:!!e});async function W9(){const e=await Ut.get("collections/invitation");return(e==null?void 0:e.data)||[]}const Fu=(e,t)=>ta(["invitedToOrders",e,t],W9,{staleTime:1e3*60*2,select:n=>t?n.filter(r=>r.organization.subdomain===t):n,enabled:!!e}),U9=()=>sf(),Zx=({onSuccess:e,onAccountNotActivated:t,onAccountNotFound:n,onError:r,className:a="",showTitle:i=!0,title:o="Se connecter",loginButtonText:s="Se connecter",pendingConnexionButtonText:c="Connexion...",passwordFieldLabel:u="Mot de passe",emailFieldLabel:d="Email",emailFieldPlaceholder:f="Votre email",passwordFieldPlaceholder:h="••••••••••••",loginSuccessMessage:v="Connexion réussie",unknownErrorMessage:p="Une erreur inconnue est survenue."})=>{const g=cr(),m=Ur(),[y,b]=O.useState({email:"",password:""}),[C,S]=O.useState(!1),w=(E,M)=>{b(P=>({...P,[E]:M}))},x=async E=>{var M,P,I;E.preventDefault(),S(!0);try{await g.signInWithEmailAndPassword(y.email,y.password,N=>{e?e(N):m.showMessage({type:"success",message:v})},N=>{t?t(N):m.showMessage({type:"warning",message:N==null?void 0:N.message})},N=>{n?n(N):m.showMessage({type:"error",message:N==null?void 0:N.message})})}catch(N){const L=N instanceof Error?N:new Error("Erreur inconnue");if(r)r(L);else{const D=(I=(P=(M=N.error)==null?void 0:M.response)==null?void 0:P.data)==null?void 0:I.message;m.showMessage({type:"error",message:D||p})}}finally{S(!1)}};return A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:`auth-form ${a}`,children:[i&&A.jsx("h2",{children:o}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"email",children:d}),A.jsx("input",{type:"email",id:"email",value:y.email,onChange:E=>w("email",E.target.value),required:!0,placeholder:f})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"password",children:u}),A.jsx("input",{type:"password",id:"password",value:y.password,onChange:E=>w("password",E.target.value),required:!0,placeholder:h})]})}),A.jsx("button",{type:"button",disabled:C||!y.email.trim()||!y.password.trim(),className:"btn btn-primary",onClick:x,children:C?c:s})]}),A.jsx(Nu,{}),A.jsxs("button",{className:"third-party-login-button login-with-google",onClick:()=>{g.signInWithGoogle()},children:["Continuer avec Google ",A.jsx(Ax,{size:36,weight:"fill"})]}),A.jsxs("button",{className:"third-party-login-button login-with-facebook",onClick:()=>{g.signInWithFacebook()},children:["Continuer avec Facebook ",A.jsx(Ex,{size:36})]})]})},Xx=({onSuccess:e,onEmailAlreadyExists:t,onError:n,className:r="",showTitle:a=!0,title:i="Créer un compte",showBirthdayField:o=!0,firstNameFieldLabel:s="Prénom",firstNameFieldPlaceholder:c="Votre prénom",lastNameFieldLabel:u="Nom",lastNameFieldPlaceholder:d="Votre nom",emailFieldLabel:f="Email",emailFieldPlaceholder:h="Votre email",birthdayFieldLabel:v="Date de naissance",birthdayFieldPlaceholder:p="Votre date de naissance",passwordFieldLabel:g="Mot de passe",passwordFieldPlaceholder:m="••••••••••••",confirmPasswordFieldLabel:y="Confirmation du mot de passe",confirmPasswordFieldPlaceholder:b="••••••••••••",createAccountButtonText:C="Créer le compte",creatingAccountButtonText:S="Création en cours...",accountCreatedMessage:w="Compte créé avec succès !",accountAlreadyExistsMessage:x="Un compte avec cet email existe déjà.",errorMessage:E="Une erreur est survenue lors de la création du compte.",passwordNotMatchMessage:M="Les mots de passe ne correspondent pas.",politiqueAndConditionsConsentTexte:P="En créant un compte, j'accepte les termes et conditions.",seePolitiqueAndConditions:I="Voir les termes et conditions",politiqueAndConditionsRoute:N="/conditions"})=>{const L=cr(),D=Ur(),[R,T]=O.useState({firstName:"",lastName:"",email:"",birthday:"",password:"",confirmPassword:""}),[j,z]=O.useState(!1),F=(H,W)=>{T(B=>({...B,[H]:W}))},k=async H=>{var W,B,V;if(H.preventDefault(),z(!0),R.password!==R.confirmPassword){D.showMessage({type:"error",message:M}),z(!1);return}try{L.registerNewUser?(await L.registerNewUser({username:R.email,email:R.email,password:R.password,firstName:R.firstName,lastName:R.lastName,birthday:R.birthday||void 0}),e?e():D.showMessage({type:"success",message:w})):D.showMessage({type:"error",message:"La méthode d'enregistrement n'est pas disponible."})}catch(Y){const U=Y instanceof Error?Y:new Error("Erreur inconnue");if(n)console.log("Error in AuthRegisterForm:",U),n(U);else{const J=(V=(B=(W=Y.error)==null?void 0:W.response)==null?void 0:B.data)==null?void 0:V.message;D.showMessage({type:"error",message:J})}}finally{z(!1)}};return A.jsxs("form",{onSubmit:k,className:`auth-form ${r}`,children:[a&&A.jsx("h2",{children:i}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"firstName",children:s}),A.jsx("input",{type:"text",id:"firstName",value:R.firstName,onChange:H=>F("firstName",H.target.value),placeholder:c,required:!0})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"lastName",children:u}),A.jsx("input",{type:"text",id:"lastName",value:R.lastName,onChange:H=>F("lastName",H.target.value),required:!0,placeholder:d})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"email",children:f}),A.jsx("input",{type:"email",id:"email",value:R.email,onChange:H=>F("email",H.target.value),required:!0,placeholder:h})]})}),o&&A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"birthday",children:v}),A.jsx("input",{type:"date",id:"birthday",value:R.birthday,onChange:H=>F("birthday",H.target.value)})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"password",children:g}),A.jsx("input",{type:"password",id:"password",value:R.password,onChange:H=>F("password",H.target.value),required:!0,placeholder:m})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"confirmPassword",children:y}),A.jsx("input",{type:"password",id:"confirmPassword",value:R.confirmPassword,onChange:H=>F("confirmPassword",H.target.value),required:!0,placeholder:b})]})}),A.jsx("div",{className:"form-row",children:A.jsx("div",{className:"form-group",style:{fontSize:"0.95em",color:"#555"},children:A.jsxs("span",{children:[P," ",A.jsx("a",{href:N,target:"_blank",rel:"noopener noreferrer",style:{color:"#007bff",textDecoration:"underline"},children:I})]})})}),A.jsx("button",{type:"submit",disabled:j,className:"btn btn-primary",children:j?S:C})]})},qx=({onSuccess:e,onError:t,className:n="",showTitle:r=!0,title:a="Réinitialiser le mot de passe",showDescription:i=!0,description:o="Entrez votre email pour recevoir un lien de réinitialisation.",emailFieldLabel:s="Email",confirmButtonText:c="Envoyer le lien",confirmingButtonText:u="Envoi en cours...",emailFieldPlaceholder:d="votre@email.com",activationMailSentMessage:f="Un email de réinitialisation a été envoyé à votre adresse.",errorMessage:h="Impossible d'envoyer l'email de réinitialisation."})=>{const v=cr(),p=Ur(),[g,m]=O.useState(""),[y,b]=O.useState(""),[C,S]=O.useState(!1),w=async E=>{E.preventDefault(),S(!0);try{const M=await v.requestResetPassword(g);b(g),e?e(g):p.showMessage({type:"success",message:f})}catch(M){const P=M instanceof Error?M:new Error("Erreur inconnue");t?t(P):p.showMessage({type:"error",message:`${h}`})}finally{S(!1)}},x=C||g===y||!g.trim();return A.jsxs("form",{onSubmit:w,className:`auth-form ${n}`,children:[r&&A.jsx("h2",{children:a}),i&&A.jsx("p",{className:"form-description",children:o}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"email",children:s}),A.jsx("input",{type:"email",id:"email",value:g,onChange:E=>m(E.target.value),required:!0,placeholder:d})]})}),A.jsx("button",{type:"submit",disabled:x,className:"btn btn-primary",children:C?u:c})]})},Jx=({onLogout:e,onClose:t,className:n="",showTitle:r=!0,title:a="Profil utilisateur",showCloseButton:i=!1,closeButtonText:o="Fermer",logoutSuccessMessage:s="Déconnexion réussie",logoutErrorMessage:c="Erreur lors de la déconnexion",disconnectedLabel:u="Non connecté",mustBeLoggedInMessage:d="Vous devez être connecté pour voir votre profil.",logoutButtonText:f="Se déconnecter",emailLabel:h="Email",nameLabel:v="Nom",idLabel:p="ID"})=>{var b,C,S;const g=cr(),m=Ur(),y=async()=>{try{await g.logout(),e?e():m.showMessage({type:"success",message:s})}catch(w){console.error("Erreur lors de la déconnexion:",w),m.showMessage({type:"error",message:c})}};return g.isLoggedIn?A.jsxs("div",{className:`user-profile ${n}`,children:[A.jsx("div",{className:"profile-icon",children:"👤"}),r&&A.jsx("h2",{children:a}),A.jsxs("div",{className:"user-info",children:[A.jsxs("div",{className:"info-item",children:[A.jsxs("span",{className:"label",children:[h,":"]}),A.jsx("span",{className:"value",children:((b=g.currentUser)==null?void 0:b.email)||"N/A"})]}),A.jsxs("div",{className:"info-item",children:[A.jsxs("span",{className:"label",children:[v,":"]}),A.jsx("span",{className:"value",children:((C=g.currentUser)==null?void 0:C.displayName)||"N/A"})]}),A.jsxs("div",{className:"info-item",children:[A.jsxs("span",{className:"label",children:[p,":"]}),A.jsx("span",{className:"value",children:((S=g.currentUser)==null?void 0:S.id)||"N/A"})]})]}),A.jsxs("div",{className:"profile-actions",children:[A.jsx("button",{onClick:y,className:"btn btn-logout",children:f}),i&&t&&A.jsx("button",{onClick:t,className:"btn btn-secondary",children:o})]})]}):A.jsxs("div",{className:`user-profile ${n}`,children:[A.jsx("div",{className:"profile-icon",children:"🔒"}),A.jsx("h2",{children:u}),A.jsx("p",{children:d})]})};function _x(){const{organization:e}=Gr(),{data:t,isLoading:n}=Kx(),{data:r,isLoading:a}=Qx(e),i=O.useMemo(()=>n||a?[]:e!=="lystech"?[...r||[],...t||[]]:r||[],[t,r,n,a,e]);return A.jsx("div",{className:"flex col gap-10",style:{padding:"20px",textAlign:"left"},children:i&&i.map(o=>A.jsxs("div",{className:"p-4 border rounded bg-white",children:[A.jsx("div",{dangerouslySetInnerHTML:{__html:o.content}}),A.jsx("div",{className:"text-xs text-gray-500 mt-2",children:o.updatedOn?`Updated: ${new Date(o.updatedOn).toLocaleString()}`:""})]},o.id))})}function G9(){const{showMessage:e}=Ur(),{activateUser:t}=cr(),{token:n}=NR(),[r,a]=O.useState(!1),[i,o]=O.useState(!1),s=O.useRef(!1),[c,u]=O.useState(null);async function d(f){if(!s.current){s.current=!0,u({type:"info",content:"Activation en cours..."}),a(!0);try{const h=await t(f);return h!=null&&h.success?(e({message:"Votre compte a été activé avec succès.",type:"success",duration:1e4}),o(!0),u({type:"success",content:"Votre compte a été activé avec succès. Redirection..."}),setTimeout(()=>{if(h!=null&&h.redirectionUrl){window.location.href=h.redirectionUrl;return}else window.location.href="/login"},3e3)):(e({message:"L'activation de votre compte a échoué ou ce lien est expiré.",type:"error",duration:1e4}),u({type:"error",content:"L'activation de votre compte a échoué ou ce lien est expiré."})),h}catch{return e({message:"Une erreur s'est produite lors de l'activation de votre compte.",type:"error",duration:1e4}),u({type:"error",content:"Une erreur s'est produite lors de l'activation de votre compte."}),null}finally{a(!1)}}}return O.useEffect(()=>{n&&!i&&!r&&!s.current&&d(n)},[n,i,r]),A.jsx("div",{className:"account-activation auth-theme-container",children:A.jsx("div",{className:"auth-theme-content",children:A.jsx("div",{className:`auth-message ${(c==null?void 0:c.type)||""}`.trim(),children:c==null?void 0:c.content})})})}const K9=({onSuccess:e,onCancel:t,style:n,className:r="",centered:a=!1,showLogo:i=!0,logoSrc:o,appName:s="",defaultMode:c="login",cancelButtonText:u="Annuler",returnToLoginButtonText:d="Retour à la connexion",showTitle:f=!0,title:h="",showLoginForm:v=!0,showRegisterForm:p=!0,showForgotPasswordForm:g=!0,loginButtonText:m="Se connecter",registerButtonText:y="S'inscrire",forgotPasswordButtonText:b="Réinitialiser le mot de passe",loginFormProps:C={},registerFormProps:S={},forgotPasswordFormProps:w={},politiqueAndConditionsConsentTexte:x="En créant un compte, j'ai lu, compris et j'accepte les règles d'utilisation.",seePolitiqueAndConditions:E="Voir les termes et conditions",politiqueAndConditionsRoute:M="/conditions"})=>{const P=cr(),I=mf(),[N,L]=O.useState(c),D=!!M&&(I==null?void 0:I.pathname)===M,R=()=>{e==null||e()},T=()=>{L("login")},j=()=>{L("login")},z=()=>{};return D?A.jsx(_x,{}):P.isLoggedIn?A.jsx("div",{className:`auth-template connected ${r}`,style:{...n,...a?{maxWidth:"400px",margin:"0 auto",padding:"20px"}:{}},children:A.jsxs("div",{className:"auth-container",children:[i&&A.jsxs("div",{className:"auth-header",children:[o&&A.jsx("img",{src:o,alt:s,className:"auth-logo"}),A.jsx("h1",{children:s})]}),A.jsx(Jx,{onLogout:z,onClose:t,showCloseButton:!!t})]})}):A.jsx("div",{className:`auth-template ${r}`,style:{...n,...a?{maxWidth:"400px",margin:"0 auto",padding:"20px"}:{}},children:A.jsxs("div",{className:"auth-container",children:[i&&A.jsxs("div",{className:"auth-header",children:[o&&A.jsx("img",{src:o,alt:s,className:"auth-logo"}),A.jsx("h1",{children:s})]}),f&&A.jsx("div",{className:"auth-title",children:A.jsx("h2",{children:h})}),A.jsxs("div",{className:"auth-tabs",children:[v&&A.jsx("button",{className:`tab ${N==="login"?"active":""}`,onClick:()=>L("login"),children:m}),p&&A.jsx("button",{className:`tab ${N==="register"?"active":""}`,onClick:()=>L("register"),children:y})]}),A.jsxs("div",{className:"auth-content",children:[N==="login"&&v&&A.jsxs("div",{children:[A.jsx(Zx,{onSuccess:R,loginButtonText:"Se connecter",className:"auth-login-form",...C}),g&&A.jsx("div",{className:"auth-links",children:A.jsx("button",{type:"button",onClick:()=>L("forgot-password"),className:"link-button",children:b})})]}),N==="register"&&p&&A.jsx(Xx,{onSuccess:T,politiqueAndConditionsConsentTexte:x,seePolitiqueAndConditions:E,politiqueAndConditionsRoute:M,...S}),N==="forgot-password"&&g&&A.jsxs("div",{children:[A.jsx(qx,{onSuccess:j,...w}),A.jsx("div",{className:"auth-links",children:A.jsxs("button",{type:"button",onClick:()=>L("login"),className:"link-button",children:["← ",d]})})]}),N==="activation"&&A.jsx(G9,{})]}),t&&A.jsx("div",{className:"auth-footer",children:A.jsx("button",{onClick:t,className:"btn btn-secondary",children:u})})]})})};function ku(){const{organizationDetails:e}=Gr();return A.jsxs("div",{style:{width:"100%",minHeight:"400px",display:"flex",justifyContent:"center",alignItems:"center",fontSize:18,color:"#888"},children:[A.jsx("div",{className:"loading-spinner",style:{width:48,height:48,border:"6px solid #eee",borderTop:`6px solid ${(e==null?void 0:e.primaryColor)||"#1677ff"}`,borderRadius:"50%",animation:"spin 1s linear infinite"}}),A.jsx("style",{children:`
|
|
1688
|
+
`]:{paddingInlineEnd:n},[`&-affix-wrapper${t}-affix-wrapper`]:{padding:0,[`> textarea${t}`]:{fontSize:"inherit",border:"none",outline:"none",background:"transparent",minHeight:e.calc(e.controlHeight).sub(e.calc(e.lineWidth).mul(2)).equal(),"&:focus":{boxShadow:"none !important"}},[`${t}-suffix`]:{margin:0,"> *:not(:last-child)":{marginInline:0},[`${t}-clear-icon`]:{position:"absolute",insetInlineEnd:e.paddingInline,insetBlockStart:e.paddingXS},[`${r}-suffix`]:{position:"absolute",top:0,insetInlineEnd:e.paddingInline,bottom:0,zIndex:1,display:"inline-flex",alignItems:"center",margin:"auto",pointerEvents:"none"}}},[`&-affix-wrapper${t}-affix-wrapper-rtl`]:{[`${t}-suffix`]:{[`${t}-data-count`]:{direction:"ltr",insetInlineStart:0}}},[`&-affix-wrapper${t}-affix-wrapper-sm`]:{[`${t}-suffix`]:{[`${t}-clear-icon`]:{insetInlineEnd:e.paddingInlineSM}}}}}},NH=Fn(["Input","TextArea"],e=>{const t=qt(e,rl(e));return[IH(t)]},al,{resetFont:!1});var RH=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const DH=O.forwardRef((e,t)=>{var n;const{prefixCls:r,bordered:a=!0,size:i,disabled:o,status:s,allowClear:c,classNames:u,rootClassName:d,className:f,style:h,styles:v,variant:p,showCount:g,onMouseDown:m,onResize:y}=e,b=RH(e,["prefixCls","bordered","size","disabled","status","allowClear","classNames","rootClassName","className","style","styles","variant","showCount","onMouseDown","onResize"]);if(process.env.NODE_ENV!=="production"){const{deprecated:se}=ln("TextArea");se(!("bordered"in e),"bordered","variant")}const{getPrefixCls:C,direction:S,allowClear:w,autoComplete:x,className:E,style:M,classNames:P,styles:I}=ia("textArea"),N=l.useContext(Br),L=o??N,{status:D,hasFeedback:R,feedbackIcon:T}=l.useContext(pr),j=xo(D,s),z=l.useRef(null);l.useImperativeHandle(t,()=>{var se;return{resizableTextArea:(se=z.current)===null||se===void 0?void 0:se.resizableTextArea,focus:ee=>{var ce,me;WE((me=(ce=z.current)===null||ce===void 0?void 0:ce.resizableTextArea)===null||me===void 0?void 0:me.textArea,ee)},blur:()=>{var ee;return(ee=z.current)===null||ee===void 0?void 0:ee.blur()}}});const F=C("input",r),k=Or(F),[H,W,B]=CE(F,d),[V]=NH(F,k),{compactSize:Y,compactItemClassnames:U}=Ai(F,S),J=Pr(se=>{var ee;return(ee=i??Y)!==null&&ee!==void 0?ee:se}),[ie,oe]=Ao("textArea",p,a),le=KE(c??w),[te,re]=l.useState(!1),[ne,ue]=l.useState(!1),_=se=>{re(!0),m==null||m(se);const ee=()=>{re(!1),document.removeEventListener("mouseup",ee)};document.addEventListener("mouseup",ee)},fe=se=>{var ee,ce;if(y==null||y(se),te&&typeof getComputedStyle=="function"){const me=(ce=(ee=z.current)===null||ee===void 0?void 0:ee.nativeElement)===null||ce===void 0?void 0:ce.querySelector("textarea");me&&getComputedStyle(me).resize==="both"&&ue(!0)}};return H(V(l.createElement(MH,Object.assign({autoComplete:x},b,{style:Object.assign(Object.assign({},M),h),styles:Object.assign(Object.assign({},I),v),disabled:L,allowClear:le,className:he(B,k,f,d,U,E,ne&&`${F}-textarea-affix-wrapper-resize-dirty`),classNames:Object.assign(Object.assign(Object.assign({},u),P),{textarea:he({[`${F}-sm`]:J==="small",[`${F}-lg`]:J==="large"},W,u==null?void 0:u.textarea,P.textarea,te&&`${F}-mouse-active`),variant:he({[`${F}-${ie}`]:oe},Eo(F,j)),affixWrapper:he(`${F}-textarea-affix-wrapper`,{[`${F}-affix-wrapper-rtl`]:S==="rtl",[`${F}-affix-wrapper-sm`]:J==="small",[`${F}-affix-wrapper-lg`]:J==="large",[`${F}-textarea-show-count`]:g||((n=e.count)===null||n===void 0?void 0:n.show)},W)}),prefixCls:F,suffix:R&&l.createElement("span",{className:`${F}-textarea-suffix`},T),showCount:g,ref:z,onResize:fe,onMouseDown:_}))))}),nr=il;nr.Group=sH,nr.Search=ax,nr.TextArea=DH,nr.Password=rx,nr.OTP=mH;let Rr=null,Ti=e=>e(),ol=[],sl={};function ix(){const{getContainer:e,duration:t,rtl:n,maxCount:r,top:a}=sl,i=(e==null?void 0:e())||document.body;return{getContainer:()=>i,duration:t,rtl:n,maxCount:r,top:a}}const jH=O.forwardRef((e,t)=>{const{messageConfig:n,sync:r}=e,{getPrefixCls:a}=O.useContext(Dt),i=sl.prefixCls||a("message"),o=O.useContext(gL),[s,c]=z1(Object.assign(Object.assign(Object.assign({},n),{prefixCls:i}),o.message));return O.useImperativeHandle(t,()=>{const u=Object.assign({},s);return Object.keys(u).forEach(d=>{u[d]=(...f)=>(r(),s[d].apply(s,f))}),{instance:u,sync:r}}),c}),TH=O.forwardRef((e,t)=>{const[n,r]=O.useState(ix),a=()=>{r(ix)};O.useEffect(a,[]);const i=u1(),o=i.getRootPrefixCls(),s=i.getIconPrefixCls(),c=i.getTheme(),u=O.createElement(jH,{ref:t,sync:a,messageConfig:n});return O.createElement(Xa,{prefixCls:o,iconPrefixCls:s,theme:c},i.holderRender?i.holderRender(u):u)});function ju(){if(!Rr){const e=document.createDocumentFragment(),t={fragment:e};Rr=t,Ti(()=>{Y1()(O.createElement(TH,{ref:r=>{const{instance:a,sync:i}=r||{};Promise.resolve().then(()=>{!t.instance&&a&&(t.instance=a,t.sync=i,ju())})}}),e)});return}Rr.instance&&(ol.forEach(e=>{const{type:t,skipped:n}=e;if(!n)switch(t){case"open":{Ti(()=>{const r=Rr.instance.open(Object.assign(Object.assign({},sl),e.config));r==null||r.then(e.resolve),e.setCloseFn(r)});break}case"destroy":Ti(()=>{Rr==null||Rr.instance.destroy(e.key)});break;default:Ti(()=>{var r;const a=(r=Rr.instance)[t].apply(r,De(e.args));a==null||a.then(e.resolve),e.setCloseFn(a)})}}),ol=[])}function LH(e){sl=Object.assign(Object.assign({},sl),e),Ti(()=>{var t;(t=Rr==null?void 0:Rr.sync)===null||t===void 0||t.call(Rr)})}function zH(e){const t=Sh(n=>{let r;const a={type:"open",config:e,resolve:n,setCloseFn:i=>{r=i}};return ol.push(a),()=>{r?Ti(()=>{r()}):a.skipped=!0}});return ju(),t}function FH(e,t){const n=u1();process.env.NODE_ENV!=="production"&&!n.holderRender&&$j("message");const r=Sh(a=>{let i;const o={type:e,args:t,resolve:a,setCloseFn:s=>{i=s}};return ol.push(o),()=>{i?Ti(()=>{i()}):o.skipped=!0}});return ju(),r}const kH=e=>{ol.push({type:"destroy",key:e}),ju()},BH=["success","info","warning","error","loading"],ox={open:zH,destroy:kH,config:LH,useMessage:$3,_InternalPanelDoNotUseOrYouWillBeFired:G3};BH.forEach(e=>{ox[e]=(...t)=>FH(e,t)}),process.env.NODE_ENV,process.env.NODE_ENV;var HH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9z"}}]},name:"heart",theme:"filled"},VH=function(t,n){return l.createElement(vn,Me({},t,{ref:n,icon:HH}))},YH=l.forwardRef(VH);process.env.NODE_ENV!=="production"&&(YH.displayName="HeartFilled");var WH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z"}}]},name:"heart",theme:"outlined"},UH=function(t,n){return l.createElement(vn,Me({},t,{ref:n,icon:WH}))},GH=l.forwardRef(UH);process.env.NODE_ENV!=="production"&&(GH.displayName="HeartOutlined");var KH={icon:function(t,n){return{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M923 283.6a260.04 260.04 0 00-56.9-82.8 264.4 264.4 0 00-84-55.5A265.34 265.34 0 00679.7 125c-49.3 0-97.4 13.5-139.2 39-10 6.1-19.5 12.8-28.5 20.1-9-7.3-18.5-14-28.5-20.1-41.8-25.5-89.9-39-139.2-39-35.5 0-69.9 6.8-102.4 20.3-31.4 13-59.7 31.7-84 55.5a258.44 258.44 0 00-56.9 82.8c-13.9 32.3-21 66.6-21 101.9 0 33.3 6.8 68 20.3 103.3 11.3 29.5 27.5 60.1 48.2 91 32.8 48.9 77.9 99.9 133.9 151.6 92.8 85.7 184.7 144.9 188.6 147.3l23.7 15.2c10.5 6.7 24 6.7 34.5 0l23.7-15.2c3.9-2.5 95.7-61.6 188.6-147.3 56-51.7 101.1-102.7 133.9-151.6 20.7-30.9 37-61.5 48.2-91 13.5-35.3 20.3-70 20.3-103.3.1-35.3-7-69.6-20.9-101.9zM512 814.8S156 586.7 156 385.5C156 283.6 240.3 201 344.3 201c73.1 0 136.5 40.8 167.7 100.4C543.2 241.8 606.6 201 679.7 201c104 0 188.3 82.6 188.3 184.5 0 201.2-356 429.3-356 429.3z",fill:t}},{tag:"path",attrs:{d:"M679.7 201c-73.1 0-136.5 40.8-167.7 100.4C480.8 241.8 417.4 201 344.3 201c-104 0-188.3 82.6-188.3 184.5 0 201.2 356 429.3 356 429.3s356-228.1 356-429.3C868 283.6 783.7 201 679.7 201z",fill:n}}]}},name:"heart",theme:"twotone"},QH=function(t,n){return l.createElement(vn,Me({},t,{ref:n,icon:KH}))},ZH=l.forwardRef(QH);process.env.NODE_ENV!=="production"&&(ZH.displayName="HeartTwoTone");var XH={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M928 160H96c-17.7 0-32 14.3-32 32v640c0 17.7 14.3 32 32 32h832c17.7 0 32-14.3 32-32V192c0-17.7-14.3-32-32-32zm-40 110.8V792H136V270.8l-27.6-21.5 39.3-50.5 42.8 33.3h643.1l42.8-33.3 39.3 50.5-27.7 21.5zM833.6 232L512 482 190.4 232l-42.8-33.3-39.3 50.5 27.6 21.5 341.6 265.6a55.99 55.99 0 0068.7 0L888 270.8l27.6-21.5-39.3-50.5-42.7 33.2z"}}]},name:"mail",theme:"outlined"},qH=function(t,n){return l.createElement(vn,Me({},t,{ref:n,icon:XH}))},vv=l.forwardRef(qH);process.env.NODE_ENV!=="production"&&(vv.displayName="MailOutlined");const JH=e=>{const{paddingXXS:t,lineWidth:n,tagPaddingHorizontal:r,componentCls:a,calc:i}=e,o=i(r).sub(n).equal(),s=i(t).sub(n).equal();return{[a]:Object.assign(Object.assign({},Dn(e)),{display:"inline-block",height:"auto",marginInlineEnd:e.marginXS,paddingInline:o,fontSize:e.tagFontSize,lineHeight:e.tagLineHeight,whiteSpace:"nowrap",background:e.defaultBg,border:`${ge(e.lineWidth)} ${e.lineType} ${e.colorBorder}`,borderRadius:e.borderRadiusSM,opacity:1,transition:`all ${e.motionDurationMid}`,textAlign:"start",position:"relative",[`&${a}-rtl`]:{direction:"rtl"},"&, a, a:hover":{color:e.defaultColor},[`${a}-close-icon`]:{marginInlineStart:s,fontSize:e.tagIconSize,color:e.colorIcon,cursor:"pointer",transition:`all ${e.motionDurationMid}`,"&:hover":{color:e.colorTextHeading}},[`&${a}-has-color`]:{borderColor:"transparent",[`&, a, a:hover, ${e.iconCls}-close, ${e.iconCls}-close:hover`]:{color:e.colorTextLightSolid}},"&-checkable":{backgroundColor:"transparent",borderColor:"transparent",cursor:"pointer",[`&:not(${a}-checkable-checked):hover`]:{color:e.colorPrimary,backgroundColor:e.colorFillSecondary},"&:active, &-checked":{color:e.colorTextLightSolid},"&-checked":{backgroundColor:e.colorPrimary,"&:hover":{backgroundColor:e.colorPrimaryHover}},"&:active":{backgroundColor:e.colorPrimaryActive}},"&-hidden":{display:"none"},[`> ${e.iconCls} + span, > span + ${e.iconCls}`]:{marginInlineStart:o}}),[`${a}-borderless`]:{borderColor:"transparent",background:e.tagBorderlessBg}}},gv=e=>{const{lineWidth:t,fontSizeIcon:n,calc:r}=e,a=e.fontSizeSM;return qt(e,{tagFontSize:a,tagLineHeight:ge(r(e.lineHeightSM).mul(a).equal()),tagIconSize:r(n).sub(r(t).mul(2)).equal(),tagPaddingHorizontal:8,tagBorderlessBg:e.defaultBg})},pv=e=>({defaultBg:new Xt(e.colorFillQuaternary).onBackground(e.colorBgContainer).toHexString(),defaultColor:e.colorText}),sx=Fn("Tag",e=>{const t=gv(e);return JH(t)},pv);var _H=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const $H=l.forwardRef((e,t)=>{const{prefixCls:n,style:r,className:a,checked:i,onChange:o,onClick:s}=e,c=_H(e,["prefixCls","style","className","checked","onChange","onClick"]),{getPrefixCls:u,tag:d}=l.useContext(Dt),f=y=>{o==null||o(!i),s==null||s(y)},h=u("tag",n),[v,p,g]=sx(h),m=he(h,`${h}-checkable`,{[`${h}-checkable-checked`]:i},d==null?void 0:d.className,a,p,g);return v(l.createElement("span",Object.assign({},c,{ref:t,style:Object.assign(Object.assign({},r),d==null?void 0:d.style),className:m,onClick:f})))}),e9=e=>Wy(e,(t,{textColor:n,lightBorderColor:r,lightColor:a,darkColor:i})=>({[`${e.componentCls}${e.componentCls}-${t}`]:{color:n,background:a,borderColor:r,"&-inverse":{color:e.colorTextLightSolid,background:i,borderColor:i},[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}})),t9=uh(["Tag","preset"],e=>{const t=gv(e);return e9(t)},pv);function n9(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.slice(1)}const Tu=(e,t,n)=>{const r=n9(n);return{[`${e.componentCls}${e.componentCls}-${t}`]:{color:e[`color${n}`],background:e[`color${r}Bg`],borderColor:e[`color${r}Border`],[`&${e.componentCls}-borderless`]:{borderColor:"transparent"}}}},r9=uh(["Tag","status"],e=>{const t=gv(e);return[Tu(t,"success","Success"),Tu(t,"processing","Info"),Tu(t,"error","Error"),Tu(t,"warning","Warning")]},pv);var a9=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var a=0,r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]]);return n};const bv=l.forwardRef((e,t)=>{const{prefixCls:n,className:r,rootClassName:a,style:i,children:o,icon:s,color:c,onClose:u,bordered:d=!0,visible:f}=e,h=a9(e,["prefixCls","className","rootClassName","style","children","icon","color","onClose","bordered","visible"]),{getPrefixCls:v,direction:p,tag:g}=l.useContext(Dt),[m,y]=l.useState(!0),b=Gn(h,["closeIcon","closable"]);process.env.NODE_ENV!=="production"&&ln("Tag").deprecated(!("visible"in e),"visible","visible && <Tag />"),l.useEffect(()=>{f!==void 0&&y(f)},[f]);const C=WS(c),S=Y5(c),w=C||S,x=Object.assign(Object.assign({backgroundColor:c&&!w?c:void 0},g==null?void 0:g.style),i),E=v("tag",n),[M,P,I]=sx(E),N=he(E,g==null?void 0:g.className,{[`${E}-${c}`]:w,[`${E}-has-color`]:c&&!w,[`${E}-hidden`]:!m,[`${E}-rtl`]:p==="rtl",[`${E}-borderless`]:!d},r,a,P,I),L=F=>{F.stopPropagation(),u==null||u(F),!F.defaultPrevented&&y(!1)},[,D]=q8(DC(e),DC(g),{closable:!1,closeIconRender:F=>{const k=l.createElement("span",{className:`${E}-close-icon`,onClick:L},F);return w1(F,k,H=>({onClick:W=>{var B;(B=H==null?void 0:H.onClick)===null||B===void 0||B.call(H,W),L(W)},className:he(H==null?void 0:H.className,`${E}-close-icon`)}))}}),R=typeof h.onClick=="function"||o&&o.type==="a",T=s||null,j=T?l.createElement(l.Fragment,null,T,o&&l.createElement("span",null,o)):o,z=l.createElement("span",Object.assign({},b,{ref:t,className:N,style:x}),j,D,C&&l.createElement(t9,{key:"preset",prefixCls:E}),S&&l.createElement(r9,{key:"status",prefixCls:E}));return M(R?l.createElement(Vc,{component:"Tag"},z):z)});process.env.NODE_ENV!=="production"&&(bv.displayName="Tag"),bv.CheckableTag=$H;const lx=O.createContext({popupElement:null,confirmPopupElement:null,showPopup:()=>{},showConfirmPopup:()=>{},hidePopup:()=>{},hideConfirmPopup:()=>{},isPopupShowing:!1,isConfirmPopupShowing:!1,showMessage:()=>{},hideMessage:()=>{}}),cx=4400,Ur=()=>O.useContext(lx);function i9({children:e}){const[t,n]=O.useState(null),[r,a]=O.useState(null),[i,o]=O.useState(null),[s,c]=ox.useMessage(),u=O.useCallback(y=>{const{type:b,message:C,key:S,duration:w}=y;if(s.open({type:b,content:C,key:S,duration:w||cx}),y.type==="loading"){const{duration:x}=y;setTimeout(()=>{s.destroy()},x)}else setTimeout(()=>{s.destroy()},w||cx)},[s]);function d(y){s.destroy(y)}const f=O.useMemo(()=>!!t,[t]),h=O.useMemo(()=>!!i,[i]);function v(){n(null)}function p(y){n(y)}function g(y){o(y)}function m(){o(null)}return A.jsxs(lx.Provider,{value:{popupElement:t,confirmPopupElement:i,isPopupShowing:f,isConfirmPopupShowing:h,showPopup:p,showConfirmPopup:g,hidePopup:v,hideConfirmPopup:m,showMessage:u,hideMessage:d},children:[c,e,t?A.jsx("div",{className:"popup",children:t}):null,r?A.jsx("div",{className:"popup",children:r}):null,i||null]})}const ux=O.createContext({children:null}),o9=()=>O.useContext(ux);function s9({children:e}){const{debugMode:t}=Li(),{showMessage:n}=Ur();function r(i){const o=localStorage.getItem("missing-endpoints")||"[]",s=JSON.parse(o);i.config.url;const c=s.findIndex(u=>u.endpoint===u.endpoint);c!==-1&&s.splice(c,1),localStorage.setItem("missing-endpoints",JSON.stringify(s))}function a(i){var u,d,f,h;const o=((u=i==null?void 0:i.response)==null?void 0:u.status)||0,s=i,c=`[${((d=s==null?void 0:s.config)==null?void 0:d.method)||""}] -> ${((f=s==null?void 0:s.config)==null?void 0:f.url)||""}`;if(t&&console.log("Axios Error:",{status:o,req:c,error:s,message:s==null?void 0:s.message}),o===404){const v=window.location.pathname,p=localStorage.getItem("missing-endpoints")||"[]",g=JSON.parse(p),m={page:v,endpoint:((h=i.config)==null?void 0:h.url)||""};g.find(b=>b.endpoint===m.endpoint)||g.push(m),localStorage.setItem("missing-endpoints",JSON.stringify(g)),t&&(console.log("--------- Missing endpoints ---------"),g.forEach(b=>{console.log(`Page: ${b.page} - Endpoint: ${b.endpoint}`)}),console.log("--------- Missing endpoints ---------"))}}return O.useLayoutEffect(()=>{const i=Ut.interceptors.request.use(s=>{const c=localStorage.getItem("authKey"),u=localStorage.getItem("impersonatedUserAuthKey"),d=localStorage.getItem("Organization"),h=d||""||d||"",v=localStorage.getItem("token"),p=localStorage.getItem("currentSubscriptionEndpoint")||"";return s!=null&&s.headers||(s.headers={"Content-Type":"application/json"}),t&&(console.log("••••••••••••* Début - AxiosMiddlewareProvider"),console.log("Endpoint:",s.url,"Method:",s.method)),c?(s.headers.Authorization=c,t&&console.log("✔️ AuthKey trouvé: ",c)):t&&console.log("❌ AuthKey"),h?(s.headers.Organization=h,t&&console.log("✔️ Organization trouvé: ",h)):t&&console.log("❌ Organization"),u&&(s.headers.ImpersonateAuthorization=u,t&&console.log("✔️ ImpersonateAuthorization trouvé: ",u)),v&&(s.headers.Token=v,t&&console.log("✔️ Token trouvé: ",v)),p&&(s.headers.pnendpoint=p,t&&console.log("✔️ currentSubscriptionEndpoint trouvé: ",p)),t&&(console.log("Axios Request - Endpoint:",s.url),console.log("Axios Request - Authorization:",s.headers.Authorization),console.log("Axios Request - ImpersonateAuthorization:",s.headers.ImpersonateAuthorization),console.log("Axios Request - Organization:",s.headers.Organization),console.log("Axios Request - Token:",s.headers.Token),console.log("••••••••••••* FIN - AxiosMiddlewareProvider")),s},async s=>(n({type:"error",message:"une erreur est survenue"}),Promise.reject(s))),o=Ut.interceptors.response.use(s=>(r(s),s),async s=>{var g,m,y,b,C,S,w;a(s);const c=((g=s==null?void 0:s.response)==null?void 0:g.status)||0,u=s,d=((m=u==null?void 0:u.config)==null?void 0:m.method)||"",f=((y=u==null?void 0:u.config)==null?void 0:y.url)||"",h=`[${d}] -> ${f}`,v=((C=(b=u==null?void 0:u.response)==null?void 0:b.data)==null?void 0:C.message)||"Une erreur est survenue",p=((w=(S=u==null?void 0:u.response)==null?void 0:S.data)==null?void 0:w.code)||"UNKNOWN_ERROR";return Promise.reject({status:c,req:h,error:u,message:v,code:p,success:!1})});return()=>{Ut.interceptors.request.eject(i),Ut.interceptors.response.eject(o)}},[]),A.jsx(ux.Provider,{value:{children:e},children:e})}function dx({visible:e,title:t,onConfirm:n,onCancel:r,okText:a="Oui",cancelText:i="Non",position:o}){const s=O.useRef(null);O.useEffect(()=>{const u=f=>{s.current&&!s.current.contains(f.target)&&r()},d=f=>{f.key==="Escape"&&r()};return e&&(document.addEventListener("mousedown",u),document.addEventListener("keydown",d)),()=>{document.removeEventListener("mousedown",u),document.removeEventListener("keydown",d)}},[e,r]);const c=()=>{if(!e)return{display:"none"};const u=250,d=120;let f=o.x,h=o.y;return o.x+u>window.innerWidth&&(f=o.x-u),o.y+d>window.innerHeight&&(h=o.y-d),f=Math.max(10,f),h=Math.max(10,h),{position:"fixed",left:`${f}px`,top:`${h}px`,zIndex:1e4}};return e?A.jsx("div",{ref:s,className:"context-menu-confirm",style:c(),children:A.jsxs("div",{className:"confirm-content",children:[A.jsx("div",{className:"confirm-title",children:t}),A.jsxs("div",{className:"confirm-buttons",children:[A.jsx(Gt,{size:"small",onClick:r,children:i}),A.jsx(Gt,{size:"small",type:"primary",danger:!0,onClick:n,children:a})]})]})}):null}function fx(){var u,d,f;const{contextMenuState:e,hideContextMenu:t}=yv(),n=O.useRef(null),[r,a]=O.useState({visible:!1,option:null,position:{x:0,y:0}});O.useEffect(()=>{const h=p=>{n.current&&!n.current.contains(p.target)&&(t(),a({visible:!1,option:null,position:{x:0,y:0}}))},v=p=>{p.key==="Escape"&&(r.visible?a({visible:!1,option:null,position:{x:0,y:0}}):t())};return e.isVisible&&(document.addEventListener("mousedown",h),document.addEventListener("keydown",v)),()=>{document.removeEventListener("mousedown",h),document.removeEventListener("keydown",v)}},[e.isVisible,r.visible,t]);const i=(h,v)=>{const p=v.target.getBoundingClientRect();a({visible:!0,option:h,position:{x:p.right+10,y:p.top}})},o=()=>{r.option&&(r.option.onClick(),t(),a({visible:!1,option:null,position:{x:0,y:0}}))},s=()=>{a({visible:!1,option:null,position:{x:0,y:0}})},c=()=>{if(!e.isVisible)return{display:"none"};const{x:h,y:v}=e,p=200,g=300;let m=h,y=v;return h+p>window.innerWidth&&(m=h-p),v+g>window.innerHeight&&(y=v-g),{position:"fixed",left:`${m}px`,top:`${y}px`,zIndex:9999}};return e.isVisible?A.jsxs("div",{ref:n,className:"context-menu",style:c(),children:[e.title&&A.jsx("div",{className:"context-menu-title",children:e.title}),A.jsx("div",{className:"context-menu-options",children:e.options.map((h,v)=>A.jsxs(O.Fragment,{children:[h.separator&&A.jsx("div",{className:"context-menu-separator"})," ",h.requestConfirmation?A.jsxs(Gt,{disabled:h.disabled,className:`context-menu-option ${h.disabled?"disabled":""}`,onClick:p=>{h.disabled||i(h,p)},children:[A.jsx("span",{className:"context-menu-label",children:h.label}),h.icon&&A.jsx("span",{className:"context-menu-icon",children:h.icon})]}):A.jsxs(Gt,{disabled:h.disabled,className:`context-menu-option ${h.disabled?"disabled":""}`,onClick:()=>{h.disabled||(h.onClick(),t())},children:[A.jsx("span",{className:"context-menu-label",children:h.label}),h.icon&&A.jsx("span",{className:"context-menu-icon",children:h.icon})]})]},v))}),A.jsx(dx,{visible:r.visible,title:((u=r.option)==null?void 0:u.confirmationMessage)||"Êtes-vous sûr de vouloir faire ça?",onConfirm:o,onCancel:s,okText:((d=r.option)==null?void 0:d.yesText)||"Oui",cancelText:((f=r.option)==null?void 0:f.noText)||"Non",position:r.position})]}):null}const hx=O.createContext(null),yv=()=>{const e=O.useContext(hx);if(!e)throw new Error("useContextMenu must be used within ContextMenuProvider");return e},Cv=()=>{const{showContextMenu:e}=yv();return{handleContextMenu:(n,r,a)=>{n.preventDefault(),n.stopPropagation(),e(n.clientX,n.clientY,r,a)}}};function mx({children:e}){const[t,n]=O.useState({isVisible:!1,x:0,y:0,options:[],title:void 0}),r=(i,o,s,c)=>{n({isVisible:!0,x:i,y:o,options:s,title:c})},a=()=>{n(i=>({...i,isVisible:!1}))};return A.jsxs(hx.Provider,{value:{showContextMenu:r,hideContextMenu:a,contextMenuState:t},children:[A.jsx(fx,{}),e]})}function l9(){const{isPushSupported:e,isSubscribed:t,pushMessage:n,vapidPublicKey:r,subscribePush:a,unsubscribePush:i,sendTestPushNotification:o}=Lu();return A.jsxs("div",{className:"p-10",children:[A.jsx("h3",{children:"Statut des Notifications Push"}),A.jsxs("p",{children:["Supporté:"," ",A.jsx("span",{style:{color:e?"green":"red",fontWeight:"bold"},children:e?"Oui":"Non"})]}),A.jsxs("p",{children:["Clé VAPID:"," ",A.jsx("span",{style:{color:r?"green":"red",fontWeight:"bold"},children:r?"Oui":"Non"})]}),A.jsxs("p",{children:["Abonné:"," ",A.jsx("span",{style:{color:t?"green":"red",fontWeight:"bold"},children:t?"Oui":"Non"})]}),A.jsxs("p",{children:["Message:"," ",A.jsx("span",{style:{color:n?"green":"red",fontWeight:"bold"},children:n||"Aucun"})]}),!t&&e&&A.jsx("button",{onClick:a,children:"S'abonner aux notifications"}),t&&e&&A.jsx("button",{onClick:i,children:"Se désabonner"}),t&&o&&A.jsx("button",{onClick:()=>o("Titre du test","Corps du message de test"),children:"Envoyer une notification de test"})]})}const vx=O.createContext({isPushSupported:!1,isSubscribed:!1,isPushSubscriptionLoading:!1,pushMessage:"",vapidPublicKey:null,currentSubscriptionEndpoint:null,subscribePush:async()=>{},unsubscribePush:async()=>{}}),Lu=()=>O.useContext(vx),c9=e=>{const t="=".repeat((4-e.length%4)%4),n=(e+t).replace(/\-/g,"+").replace(/_/g,"/"),r=window.atob(n),a=new Uint8Array(r.length);for(let i=0;i<r.length;++i)a[i]=r.charCodeAt(i);return a};function u9({children:e,usePushNotifications:t}){const{debugMode:n}=Li(),[r,a]=O.useState(!1),[i,o]=O.useState(!1),[s,c]=O.useState(null),[u,d]=O.useState(null),[f,h]=O.useState(""),[v,p]=O.useState(!0);O.useEffect(()=>{if(!t){n&&console.log("Notifications push désactivées par la prop usePushNotifications."),h("Notifications push désactivées.");return}"serviceWorker"in navigator&&"PushManager"in window?(a(!0),n&&console.log("Les notifications push sont supportées."),p(!0),Ut.get("/push-notification/key").then(b=>{d(b.data.publicVapidKey),n&&console.log("Clé publique VAPID récupérée:",b.data.publicVapidKey)}).catch(b=>{n&&console.error("Erreur lors de la récupération de la clé VAPID:",b),h("Erreur: Impossible de récupérer la clé VAPID du serveur.")}),navigator.serviceWorker.register("/service-worker.js").then(b=>(n&&console.log("Service Worker enregistré avec succès:",b),b.pushManager.getSubscription())).then(b=>{b?(n&&console.log("Utilisateur déjà abonné:",b),c(b),o(!0),h("Vous êtes abonné aux notifications.")):(n&&console.log("Utilisateur non abonné."),o(!1),h("Vous n'êtes pas abonné aux notifications.")),p(!1)}).catch(b=>{n&&console.error("Erreur lors de l'enregistrement du Service Worker ou de la récupération de l'abonnement:",b),h("Erreur: Impossible d'enregistrer le Service Worker.")})):(n&&console.warn("Les notifications push ne sont pas supportées par ce navigateur."),h("Votre navigateur ne supporte pas les notifications push."))},[t,n]),O.useEffect(()=>{localStorage.setItem("currentSubscriptionEndpoint",(s==null?void 0:s.endpoint)||"")},[s==null?void 0:s.endpoint]);const g=O.useCallback(async()=>{if(!r||!u){h("Les notifications push ne sont pas supportées ou la clé VAPID est manquante.");return}try{const C=await(await navigator.serviceWorker.ready).pushManager.subscribe({userVisibleOnly:!0,applicationServerKey:c9(u)});n&&console.log("Abonnement push réussi:",C),c(C),o(!0),h("Abonnement réussi !"),await Ut.post("/push-notification/subscribe",C),n&&console.log("Abonnement envoyé au serveur.")}catch(b){n&&console.error("Échec de l'abonnement push:",b),h(`Échec de l'abonnement: ${b instanceof Error?b.message:String(b)}`)}},[r,u,n]),m=O.useCallback(async()=>{if(!r||!s){h("Pas d'abonnement à désinscrire.");return}try{await s.unsubscribe(),n&&console.log("Désabonnement push réussi."),c(null),o(!1),h("Désabonnement réussi !")}catch(b){n&&console.error("Échec du désabonnement push:",b),h(`Échec du désabonnement: ${b instanceof Error?b.message:String(b)}`)}},[r,s,n]),y=O.useCallback(async(b,C)=>{var S;if(!i){h("Veuillez vous abonner d'abord pour envoyer une notification de test.");return}if(!n){h("Le mode débogage n'est pas activé pour envoyer des notifications de test.");return}try{const w=await Ut.post("/push-notification/send",{title:b,body:C});w.status===200?h("Notification de test envoyée (vérifiez votre écran)."):h(`Erreur lors de l'envoi de la notification: ${((S=w.data)==null?void 0:S.message)||w.statusText}`)}catch(w){n&&console.error("Erreur lors de l'envoi de la notification de test:",w),h(`Erreur réseau lors de l'envoi: ${w instanceof Error?w.message:String(w)}`)}},[i,n]);return A.jsxs(vx.Provider,{value:{usePushNotifications:t,isPushSupported:r,isSubscribed:i,isPushSubscriptionLoading:v,pushMessage:f,vapidPublicKey:u,currentSubscriptionEndpoint:(s==null?void 0:s.endpoint)||null,subscribePush:g,unsubscribePush:m,sendTestPushNotification:n?y:void 0},children:[n&&t&&A.jsx(l9,{}),e]})}const gx=O.createContext({isProgressiveWebAppInstalled:!1,canInstallProgressiveWebApp:!1,progressiveWebAppMessage:"",isMobile:!1,installProgressiveWebApp:async()=>{}}),Sv=()=>O.useContext(gx);function d9({children:e}){const{debugMode:t,useProgressiveWebAppFeatures:n}=Li(),[r,a]=O.useState(!1),[i,o]=O.useState(null),[s,c]=O.useState(""),[u,d]=O.useState(!1),f=!1;O.useEffect(()=>{const v=()=>{const p=/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|rim)|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,g=/android|ipad|playbook|silk/i,m=p.test(navigator.userAgent)||g.test(navigator.userAgent);d(m),t&&console.log("Détection mobile:",m)};return v(),window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[t]),O.useEffect(()=>{let v=!1;if(n===!0?v=!0:n==="mobile"&&(v=u),!v){t&&console.log("Fonctionnalités progressiveWebApp désactivées."),c("Fonctionnalités progressiveWebApp désactivées.");return}const p=()=>{const y=window.matchMedia("(display-mode: standalone)").matches||window.navigator.standalone;a(y),t&&console.log("Statut progressiveWebApp initial:",y?"Installée":"Non installée"),c(y?"Vous êtes en mode progressiveWebApp.":"Vous n'êtes pas en mode progressiveWebApp.")};p();const g=y=>{y.preventDefault(),o(y),t&&console.log("Événement beforeinstallprompt capturé."),c("L'installation de la progressiveWebApp est disponible.")},m=()=>{a(!0),o(null),t&&console.log("progressiveWebApp installée avec succès par l'utilisateur."),c("progressiveWebApp installée avec succès !")};return window.addEventListener("beforeinstallprompt",g),window.addEventListener("appinstalled",m),window.matchMedia("(display-mode: standalone)").addEventListener("change",p),()=>{window.removeEventListener("beforeinstallprompt",g),window.removeEventListener("appinstalled",m),window.matchMedia("(display-mode: standalone)").removeEventListener("change",p)}},[n,t,u]);const h=O.useCallback(async()=>{if(i){t&&console.log("Déclenchement du prompt d'installation progressiveWebApp..."),i.prompt();const{outcome:v}=await i.userChoice;t&&console.log(`Réponse de l'utilisateur au prompt d'installation: ${v}`),c(v==="accepted"?"L'utilisateur a accepté d'installer la progressiveWebApp.":"L'utilisateur a refusé d'installer la progressiveWebApp."),o(null)}else t&&console.warn("Le prompt d'installation n'est pas disponible ou la progressiveWebApp est déjà installée."),c("L'installation n'est pas disponible.")},[i,t]);return A.jsxs(gx.Provider,{value:{useProgressiveWebAppFeatures:n,isProgressiveWebAppInstalled:r,canInstallProgressiveWebApp:!!i&&!r,progressiveWebAppMessage:s,isMobile:u,installProgressiveWebApp:h},children:[t&&f,e]})}const px=O.createContext(void 0),f9=()=>{const e=O.useContext(px);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e},h9=({children:e})=>{const[t,n]=O.useState(()=>{const u=localStorage.getItem("theme");return u==="light"||u==="dark"?u:"light"}),[r,a]=O.useState(()=>window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),[i,o]=O.useState("hsl(212, 51%, 31%)");O.useEffect(()=>{const u=window.matchMedia("(prefers-color-scheme: dark)"),d=f=>{a(f.matches?"dark":"light")};return u.addEventListener("change",d),()=>u.removeEventListener("change",d)},[]),O.useEffect(()=>{const u=document.body.classList,d={light:"light-theme",dark:"dark-theme"};Object.values(d).forEach(f=>u.remove(f)),t==="light"||t==="dark"?(u.add(d[t]),localStorage.setItem("theme",t)):localStorage.removeItem("theme")},[t]),O.useEffect(()=>{document.body.style.setProperty("--dynamic-primary",i)},[i]);const c={theme:t,toggleTheme:()=>{n(u=>u==="dark"?"light":u==="light"?"dark":r==="dark"?"light":"dark")},currentSystemTheme:r,primaryColor:i,setPrimaryColor:o};return A.jsx(px.Provider,{value:c,children:e})},m9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm52-84a12,12,0,0,1-12,12H117l11.52,11.51a12,12,0,0,1-17,17l-32-32a12,12,0,0,1,0-17l32-32a12,12,0,0,1,17,17L117,116h51A12,12,0,0,1,180,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H107.31l18.35,18.34a8,8,0,0,1-11.32,11.32l-32-32a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,11.32L107.31,120H168A8,8,0,0,1,176,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm40,112H107.31l18.35,18.34a8,8,0,0,1-11.32,11.32l-32-32a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,11.32L107.31,120H168a8,8,0,0,1,0,16Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm46-90a6,6,0,0,1-6,6H102.49l21.75,21.76a6,6,0,1,1-8.48,8.48l-32-32a6,6,0,0,1,0-8.48l32-32a6,6,0,0,1,8.48,8.48L102.49,122H168A6,6,0,0,1,174,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm48-88a8,8,0,0,1-8,8H107.31l18.35,18.34a8,8,0,0,1-11.32,11.32l-32-32a8,8,0,0,1,0-11.32l32-32a8,8,0,0,1,11.32,11.32L107.31,120H168A8,8,0,0,1,176,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm44-92a4,4,0,0,1-4,4H97.66l25.17,25.17a4,4,0,0,1-5.66,5.66l-32-32a4,4,0,0,1,0-5.66l32-32a4,4,0,0,1,5.66,5.66L97.66,124H168A4,4,0,0,1,172,128Z"}))]]),v9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm0,192a84,84,0,1,1,84-84A84.09,84.09,0,0,1,128,212Zm48.49-92.49a12,12,0,0,1,0,17l-32,32a12,12,0,1,1-17-17L139,140H88a12,12,0,0,1,0-24h51l-11.52-11.51a12,12,0,1,1,17-17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm45.66-93.66a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32-11.32L148.69,136H88a8,8,0,0,1,0-16h60.69l-18.35-18.34a8,8,0,0,1,11.32-11.32Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm45.66,109.66-32,32a8,8,0,0,1-11.32-11.32L148.69,136H88a8,8,0,0,1,0-16h60.69l-18.35-18.34a8,8,0,0,1,11.32-11.32l32,32A8,8,0,0,1,173.66,133.66Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm0,192a90,90,0,1,1,90-90A90.1,90.1,0,0,1,128,218Zm44.24-94.24a6,6,0,0,1,0,8.48l-32,32a6,6,0,0,1-8.48-8.48L153.51,134H88a6,6,0,0,1,0-12h65.51l-21.75-21.76a6,6,0,0,1,8.48-8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm0,192a88,88,0,1,1,88-88A88.1,88.1,0,0,1,128,216Zm45.66-93.66a8,8,0,0,1,0,11.32l-32,32a8,8,0,0,1-11.32-11.32L148.69,136H88a8,8,0,0,1,0-16h60.69l-18.35-18.34a8,8,0,0,1,11.32-11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm0,192a92,92,0,1,1,92-92A92.1,92.1,0,0,1,128,220Zm42.83-94.83a4,4,0,0,1,0,5.66l-32,32a4,4,0,0,1-5.66-5.66L158.34,132H88a4,4,0,0,1,0-8h70.34L133.17,98.83a4,4,0,0,1,5.66-5.66Z"}))]]),g9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M225.29,165.93C216.61,151,212,129.57,212,104a84,84,0,0,0-168,0c0,25.58-4.59,47-13.27,61.93A20.08,20.08,0,0,0,30.66,186,19.77,19.77,0,0,0,48,196H84.18a44,44,0,0,0,87.64,0H208a19.77,19.77,0,0,0,17.31-10A20.08,20.08,0,0,0,225.29,165.93ZM128,212a20,20,0,0,1-19.6-16h39.2A20,20,0,0,1,128,212ZM54.66,172C63.51,154,68,131.14,68,104a60,60,0,0,1,120,0c0,27.13,4.48,50,13.33,68Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,192H48a8,8,0,0,1-6.88-12C47.71,168.6,56,139.81,56,104a72,72,0,0,1,144,0c0,35.82,8.3,64.6,14.9,76A8,8,0,0,1,208,192Z",opacity:"0.2"}),l.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M220.07,176.94C214.41,167.2,206,139.73,206,104a78,78,0,1,0-156,0c0,35.74-8.42,63.2-14.08,72.94A14,14,0,0,0,48,198H90.48a38,38,0,0,0,75,0H208a14,14,0,0,0,12.06-21.06ZM128,218a26,26,0,0,1-25.29-20h50.58A26,26,0,0,1,128,218Zm81.71-33a1.9,1.9,0,0,1-1.7,1H48a1.9,1.9,0,0,1-1.7-1,2,2,0,0,1,0-2C53.87,170,62,139.69,62,104a66,66,0,1,1,132,0c0,35.68,8.14,65.95,15.71,79A2,2,0,0,1,209.71,185Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M221.8,175.94C216.25,166.38,208,139.33,208,104a80,80,0,1,0-160,0c0,35.34-8.26,62.38-13.81,71.94A16,16,0,0,0,48,200H88.81a40,40,0,0,0,78.38,0H208a16,16,0,0,0,13.8-24.06ZM128,216a24,24,0,0,1-22.62-16h45.24A24,24,0,0,1,128,216ZM48,184c7.7-13.24,16-43.92,16-80a64,64,0,1,1,128,0c0,36.05,8.28,66.73,16,80Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M218.35,178C212.58,168,204,140.13,204,104a76,76,0,1,0-152,0c0,36.13-8.59,64-14.36,73.95A12,12,0,0,0,48,196H92.23a36,36,0,0,0,71.54,0H208A12,12,0,0,0,218.35,178ZM128,220a28,28,0,0,1-27.71-24h55.42A28,28,0,0,1,128,220Zm83.45-34a3.91,3.91,0,0,1-3.44,2H48a3.91,3.91,0,0,1-3.44-2,4,4,0,0,1,0-4C52,169.17,60,139.32,60,104a68,68,0,1,1,136,0c0,35.31,8,65.17,15.44,78A4,4,0,0,1,211.45,186Z"}))]]),p9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232.49,80.49l-128,128a12,12,0,0,1-17,0l-56-56a12,12,0,1,1,17-17L96,183,215.51,63.51a12,12,0,0,1,17,17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,56V200a16,16,0,0,1-16,16H40a16,16,0,0,1-16-16V56A16,16,0,0,1,40,40H216A16,16,0,0,1,232,56Z",opacity:"0.2"}),l.createElement("path",{d:"M205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,40H40A16,16,0,0,0,24,56V200a16,16,0,0,0,16,16H216a16,16,0,0,0,16-16V56A16,16,0,0,0,216,40ZM205.66,85.66l-96,96a8,8,0,0,1-11.32,0l-40-40a8,8,0,0,1,11.32-11.32L104,164.69l90.34-90.35a8,8,0,0,1,11.32,11.32Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228.24,76.24l-128,128a6,6,0,0,1-8.48,0l-56-56a6,6,0,0,1,8.48-8.48L96,191.51,219.76,67.76a6,6,0,0,1,8.48,8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M229.66,77.66l-128,128a8,8,0,0,1-11.32,0l-56-56a8,8,0,0,1,11.32-11.32L96,188.69,218.34,66.34a8,8,0,0,1,11.32,11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M226.83,74.83l-128,128a4,4,0,0,1-5.66,0l-56-56a4,4,0,0,1,5.66-5.66L96,194.34,221.17,69.17a4,4,0,1,1,5.66,5.66Z"}))]]),b9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228,144v64a12,12,0,0,1-12,12H40a12,12,0,0,1-12-12V144a12,12,0,0,1,24,0v52H204V144a12,12,0,0,1,24,0Zm-108.49,8.49a12,12,0,0,0,17,0l40-40a12,12,0,0,0-17-17L140,115V32a12,12,0,0,0-24,0v83L96.49,95.51a12,12,0,0,0-17,17Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48V208H40V48A16,16,0,0,1,56,32H200A16,16,0,0,1,216,48Z",opacity:"0.2"}),l.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40A8,8,0,0,0,168,96H136V32a8,8,0,0,0-16,0V96H88a8,8,0,0,0-5.66,13.66Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M222,144v64a6,6,0,0,1-6,6H40a6,6,0,0,1-6-6V144a6,6,0,0,1,12,0v58H210V144a6,6,0,0,1,12,0Zm-98.24,4.24a6,6,0,0,0,8.48,0l40-40a6,6,0,0,0-8.48-8.48L134,129.51V32a6,6,0,0,0-12,0v97.51L92.24,99.76a6,6,0,0,0-8.48,8.48Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,144v64a8,8,0,0,1-8,8H40a8,8,0,0,1-8-8V144a8,8,0,0,1,16,0v56H208V144a8,8,0,0,1,16,0Zm-101.66,5.66a8,8,0,0,0,11.32,0l40-40a8,8,0,0,0-11.32-11.32L136,124.69V32a8,8,0,0,0-16,0v92.69L93.66,98.34a8,8,0,0,0-11.32,11.32Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M220,144v64a4,4,0,0,1-4,4H40a4,4,0,0,1-4-4V144a4,4,0,0,1,8,0v60H212V144a4,4,0,0,1,8,0Zm-94.83,2.83a4,4,0,0,0,5.66,0l40-40a4,4,0,1,0-5.66-5.66L132,134.34V32a4,4,0,0,0-8,0V134.34L90.83,101.17a4,4,0,0,0-5.66,5.66Z"}))]]),y9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,20A108,108,0,1,0,236,128,108.12,108.12,0,0,0,128,20Zm12,191.13V156h20a12,12,0,0,0,0-24H140V112a12,12,0,0,1,12-12h16a12,12,0,0,0,0-24H152a36,36,0,0,0-36,36v20H96a12,12,0,0,0,0,24h20v55.13a84,84,0,1,1,24,0Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-96-96A96,96,0,0,1,224,128Z",opacity:"0.2"}),l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm8,191.63V152h24a8,8,0,0,0,0-16H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,0-16H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0,0,16h24v63.63a88,88,0,1,1,16,0Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M232,128a104.16,104.16,0,0,1-91.55,103.26,4,4,0,0,1-4.45-4V152h24a8,8,0,0,0,8-8.53,8.17,8.17,0,0,0-8.25-7.47H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,8-8.53A8.17,8.17,0,0,0,167.73,80H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0-8,8.53A8.17,8.17,0,0,0,96.27,152H120v75.28a4,4,0,0,1-4.44,4A104.15,104.15,0,0,1,24.07,124.09c2-54,45.74-97.9,99.78-100A104.12,104.12,0,0,1,232,128Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,26A102,102,0,1,0,230,128,102.12,102.12,0,0,0,128,26Zm6,191.8V150h26a6,6,0,0,0,0-12H134V112a18,18,0,0,1,18-18h16a6,6,0,0,0,0-12H152a30,30,0,0,0-30,30v26H96a6,6,0,0,0,0,12h26v67.8a90,90,0,1,1,12,0Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm8,191.63V152h24a8,8,0,0,0,0-16H136V112a16,16,0,0,1,16-16h16a8,8,0,0,0,0-16H152a32,32,0,0,0-32,32v24H96a8,8,0,0,0,0,16h24v63.63a88,88,0,1,1,16,0Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,28A100,100,0,1,0,228,128,100.11,100.11,0,0,0,128,28Zm4,191.91V148h28a4,4,0,0,0,0-8H132V112a20,20,0,0,1,20-20h16a4,4,0,0,0,0-8H152a28,28,0,0,0-28,28v28H96a4,4,0,0,0,0,8h28v71.91a92,92,0,1,1,8,0Z"}))]]),C9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M222.14,69.17,186.83,33.86A19.86,19.86,0,0,0,172.69,28H48A20,20,0,0,0,28,48V208a20,20,0,0,0,20,20H208a20,20,0,0,0,20-20V83.31A19.86,19.86,0,0,0,222.14,69.17ZM164,204H92V160h72Zm40,0H188V156a20,20,0,0,0-20-20H88a20,20,0,0,0-20,20v48H52V52H171l33,33ZM164,84a12,12,0,0,1-12,12H96a12,12,0,0,1,0-24h56A12,12,0,0,1,164,84Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,83.31V208a8,8,0,0,1-8,8H176V152a8,8,0,0,0-8-8H88a8,8,0,0,0-8,8v64H48a8,8,0,0,1-8-8V48a8,8,0,0,1,8-8H172.69a8,8,0,0,1,5.65,2.34l35.32,35.32A8,8,0,0,1,216,83.31Z",opacity:"0.2"}),l.createElement("path",{d:"M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM208,208H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M217.9,73.42,182.58,38.1a13.9,13.9,0,0,0-9.89-4.1H48A14,14,0,0,0,34,48V208a14,14,0,0,0,14,14H208a14,14,0,0,0,14-14V83.31A13.9,13.9,0,0,0,217.9,73.42ZM170,210H86V152a2,2,0,0,1,2-2h80a2,2,0,0,1,2,2Zm40-2a2,2,0,0,1-2,2H182V152a14,14,0,0,0-14-14H88a14,14,0,0,0-14,14v58H48a2,2,0,0,1-2-2V48a2,2,0,0,1,2-2H172.69a2,2,0,0,1,1.41.58L209.42,81.9a2,2,0,0,1,.58,1.41ZM158,72a6,6,0,0,1-6,6H96a6,6,0,0,1,0-12h56A6,6,0,0,1,158,72Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M219.31,72,184,36.69A15.86,15.86,0,0,0,172.69,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V83.31A15.86,15.86,0,0,0,219.31,72ZM168,208H88V152h80Zm40,0H184V152a16,16,0,0,0-16-16H88a16,16,0,0,0-16,16v56H48V48H172.69L208,83.31ZM160,72a8,8,0,0,1-8,8H96a8,8,0,0,1,0-16h56A8,8,0,0,1,160,72Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216.49,74.83,181.17,39.51A11.93,11.93,0,0,0,172.69,36H48A12,12,0,0,0,36,48V208a12,12,0,0,0,12,12H208a12,12,0,0,0,12-12V83.31A11.93,11.93,0,0,0,216.49,74.83ZM172,212H84V152a4,4,0,0,1,4-4h80a4,4,0,0,1,4,4Zm40-4a4,4,0,0,1-4,4H180V152a12,12,0,0,0-12-12H88a12,12,0,0,0-12,12v60H48a4,4,0,0,1-4-4V48a4,4,0,0,1,4-4H172.69a4,4,0,0,1,2.82,1.17l35.32,35.32A4,4,0,0,1,212,83.31ZM156,72a4,4,0,0,1-4,4H96a4,4,0,0,1,0-8h56A4,4,0,0,1,156,72Z"}))]]),S9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228,128a100,100,0,1,1-22.86-63.64,12,12,0,0,1-18.51,15.28A76,76,0,1,0,203.05,140H128a12,12,0,0,1,0-24h88A12,12,0,0,1,228,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,128a88,88,0,1,1-88-88A88,88,0,0,1,216,128Z",opacity:"0.2"}),l.createElement("path",{d:"M224,128a96,96,0,1,1-21.95-61.09,8,8,0,1,1-12.33,10.18A80,80,0,1,0,207.6,136H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M128,24A104,104,0,1,0,232,128,104,104,0,0,0,128,24Zm0,184A80,80,0,1,1,181.34,68.37a8,8,0,0,1-10.67,11.92A64,64,0,1,0,191.5,136H128a8,8,0,0,1,0-16h72a8,8,0,0,1,8,8A80.09,80.09,0,0,1,128,208Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M222,128a94,94,0,1,1-21.49-59.82,6,6,0,1,1-9.25,7.64A82,82,0,1,0,209.78,134H128a6,6,0,0,1,0-12h88A6,6,0,0,1,222,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a96,96,0,1,1-21.95-61.09,8,8,0,1,1-12.33,10.18A80,80,0,1,0,207.6,136H128a8,8,0,0,1,0-16h88A8,8,0,0,1,224,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M220,128a92,92,0,1,1-21-58.55,4,4,0,0,1-6.17,5.1A84,84,0,1,0,211.91,132H128a4,4,0,0,1,0-8h88A4,4,0,0,1,220,128Z"}))]]),w9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M230.14,25.86a20,20,0,0,0-19.57-5.11l-.22.07L18.44,79a20,20,0,0,0-3.06,37.25L99,157l40.71,83.65a19.81,19.81,0,0,0,18,11.38c.57,0,1.15,0,1.73-.07A19.82,19.82,0,0,0,177,237.56L235.18,45.65a1.42,1.42,0,0,0,.07-.22A20,20,0,0,0,230.14,25.86ZM156.91,221.07l-34.37-70.64,46-45.95a12,12,0,0,0-17-17l-46,46L34.93,99.09,210,46Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M223.69,42.18l-58.22,192a8,8,0,0,1-14.92,1.25L108,148,20.58,105.45a8,8,0,0,1,1.25-14.92l192-58.22A8,8,0,0,1,223.69,42.18Z",opacity:"0.2"}),l.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M231.4,44.34s0,.1,0,.15l-58.2,191.94a15.88,15.88,0,0,1-14,11.51q-.69.06-1.38.06a15.86,15.86,0,0,1-14.42-9.15L107,164.15a4,4,0,0,1,.77-4.58l57.92-57.92a8,8,0,0,0-11.31-11.31L96.43,148.26a4,4,0,0,1-4.58.77L17.08,112.64a16,16,0,0,1,2.49-29.8l191.94-58.2.15,0A16,16,0,0,1,231.4,44.34Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M225.88,30.12a13.83,13.83,0,0,0-13.7-3.58l-.11,0L20.14,84.77A14,14,0,0,0,18,110.85l85.56,41.64L145.12,238a13.87,13.87,0,0,0,12.61,8c.4,0,.81,0,1.21-.05a13.9,13.9,0,0,0,12.29-10.09l58.2-191.93,0-.11A13.83,13.83,0,0,0,225.88,30.12Zm-8,10.4L159.73,232.43l0,.11a2,2,0,0,1-3.76.26l-40.68-83.58,49-49a6,6,0,1,0-8.49-8.49l-49,49L23.15,100a2,2,0,0,1,.31-3.74l.11,0L215.48,38.08a1.94,1.94,0,0,1,1.92.52A2,2,0,0,1,217.92,40.52Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M227.32,28.68a16,16,0,0,0-15.66-4.08l-.15,0L19.57,82.84a16,16,0,0,0-2.49,29.8L102,154l41.3,84.87A15.86,15.86,0,0,0,157.74,248q.69,0,1.38-.06a15.88,15.88,0,0,0,14-11.51l58.2-191.94c0-.05,0-.1,0-.15A16,16,0,0,0,227.32,28.68ZM157.83,231.85l-.05.14,0-.07-40.06-82.3,48-48a8,8,0,0,0-11.31-11.31l-48,48L24.08,98.25l-.07,0,.14,0L216,40Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224.47,31.52a11.87,11.87,0,0,0-11.82-3L20.74,86.67a12,12,0,0,0-1.91,22.38L105,151l41.92,86.15A11.88,11.88,0,0,0,157.74,244c.34,0,.69,0,1,0a11.89,11.89,0,0,0,10.52-8.63l58.21-192,0-.08A11.85,11.85,0,0,0,224.47,31.52Zm-4.62,9.54-58.23,192a4,4,0,0,1-7.48.59l-41.3-84.86,50-50a4,4,0,1,0-5.66-5.66l-50,50-84.9-41.31a3.88,3.88,0,0,1-2.27-4,3.93,3.93,0,0,1,3-3.54L214.9,36.16A3.93,3.93,0,0,1,216,36a4,4,0,0,1,2.79,1.19A3.93,3.93,0,0,1,219.85,41.06Z"}))]]),E9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M230.14,70.54,185.46,25.85a20,20,0,0,0-28.29,0L33.86,149.17A19.85,19.85,0,0,0,28,163.31V208a20,20,0,0,0,20,20H92.69a19.86,19.86,0,0,0,14.14-5.86L230.14,98.82a20,20,0,0,0,0-28.28ZM91,204H52V165l84-84,39,39ZM192,103,153,64l18.34-18.34,39,39Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M221.66,90.34,192,120,136,64l29.66-29.66a8,8,0,0,1,11.31,0L221.66,79A8,8,0,0,1,221.66,90.34Z",opacity:"0.2"}),l.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M225.9,74.78,181.21,30.09a14,14,0,0,0-19.8,0L38.1,153.41a13.94,13.94,0,0,0-4.1,9.9V208a14,14,0,0,0,14,14H92.69a13.94,13.94,0,0,0,9.9-4.1L225.9,94.58a14,14,0,0,0,0-19.8ZM94.1,209.41a2,2,0,0,1-1.41.59H48a2,2,0,0,1-2-2V163.31a2,2,0,0,1,.59-1.41L136,72.48,183.51,120ZM217.41,86.1,192,111.51,144.49,64,169.9,38.58a2,2,0,0,1,2.83,0l44.68,44.69a2,2,0,0,1,0,2.83Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M227.31,73.37,182.63,28.68a16,16,0,0,0-22.63,0L36.69,152A15.86,15.86,0,0,0,32,163.31V208a16,16,0,0,0,16,16H92.69A15.86,15.86,0,0,0,104,219.31L227.31,96a16,16,0,0,0,0-22.63ZM92.69,208H48V163.31l88-88L180.69,120ZM192,108.68,147.31,64l24-24L216,84.68Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224.49,76.2,179.8,31.51a12,12,0,0,0-17,0L133.17,61.17h0L39.52,154.83A11.9,11.9,0,0,0,36,163.31V208a12,12,0,0,0,12,12H92.69a12,12,0,0,0,8.48-3.51L224.48,93.17a12,12,0,0,0,0-17Zm-129,134.63A4,4,0,0,1,92.69,212H48a4,4,0,0,1-4-4V163.31a4,4,0,0,1,1.17-2.83L136,69.65,186.34,120ZM218.83,87.51,192,114.34,141.66,64l26.82-26.83a4,4,0,0,1,5.66,0l44.69,44.68a4,4,0,0,1,0,5.66Z"}))]]),x9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M228,128a12,12,0,0,1-12,12H140v76a12,12,0,0,1-24,0V140H40a12,12,0,0,1,0-24h76V40a12,12,0,0,1,24,0v76h76A12,12,0,0,1,228,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),l.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM184,136H136v48a8,8,0,0,1-16,0V136H72a8,8,0,0,1,0-16h48V72a8,8,0,0,1,16,0v48h48a8,8,0,0,1,0,16Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M222,128a6,6,0,0,1-6,6H134v82a6,6,0,0,1-12,0V134H40a6,6,0,0,1,0-12h82V40a6,6,0,0,1,12,0v82h82A6,6,0,0,1,222,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M224,128a8,8,0,0,1-8,8H136v80a8,8,0,0,1-16,0V136H40a8,8,0,0,1,0-16h80V40a8,8,0,0,1,16,0v80h80A8,8,0,0,1,224,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M220,128a4,4,0,0,1-4,4H132v84a4,4,0,0,1-8,0V132H40a4,4,0,0,1,0-8h84V40a4,4,0,0,1,8,0v84h84A4,4,0,0,1,220,128Z"}))]]),A9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H180V36A28,28,0,0,0,152,8H104A28,28,0,0,0,76,36V48H40a12,12,0,0,0,0,24h4V208a20,20,0,0,0,20,20H192a20,20,0,0,0,20-20V72h4a12,12,0,0,0,0-24ZM100,36a4,4,0,0,1,4-4h48a4,4,0,0,1,4,4V48H100Zm88,168H68V72H188ZM116,104v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Zm48,0v64a12,12,0,0,1-24,0V104a12,12,0,0,1,24,0Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M200,56V208a8,8,0,0,1-8,8H64a8,8,0,0,1-8-8V56Z",opacity:"0.2"}),l.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM112,168a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm0-120H96V40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,50H174V40a22,22,0,0,0-22-22H104A22,22,0,0,0,82,40V50H40a6,6,0,0,0,0,12H50V208a14,14,0,0,0,14,14H192a14,14,0,0,0,14-14V62h10a6,6,0,0,0,0-12ZM94,40a10,10,0,0,1,10-10h48a10,10,0,0,1,10,10V50H94ZM194,208a2,2,0,0,1-2,2H64a2,2,0,0,1-2-2V62H194ZM110,104v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Zm48,0v64a6,6,0,0,1-12,0V104a6,6,0,0,1,12,0Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,48H176V40a24,24,0,0,0-24-24H104A24,24,0,0,0,80,40v8H40a8,8,0,0,0,0,16h8V208a16,16,0,0,0,16,16H192a16,16,0,0,0,16-16V64h8a8,8,0,0,0,0-16ZM96,40a8,8,0,0,1,8-8h48a8,8,0,0,1,8,8v8H96Zm96,168H64V64H192ZM112,104v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Zm48,0v64a8,8,0,0,1-16,0V104a8,8,0,0,1,16,0Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,52H172V40a20,20,0,0,0-20-20H104A20,20,0,0,0,84,40V52H40a4,4,0,0,0,0,8H52V208a12,12,0,0,0,12,12H192a12,12,0,0,0,12-12V60h12a4,4,0,0,0,0-8ZM92,40a12,12,0,0,1,12-12h48a12,12,0,0,1,12,12V52H92ZM196,208a4,4,0,0,1-4,4H64a4,4,0,0,1-4-4V60H196ZM108,104v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Zm48,0v64a4,4,0,0,1-8,0V104a4,4,0,0,1,8,0Z"}))]]),O9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M125.18,156.94a64,64,0,1,0-82.36,0,100.23,100.23,0,0,0-39.49,32,12,12,0,0,0,19.35,14.2,76,76,0,0,1,122.64,0,12,12,0,0,0,19.36-14.2A100.33,100.33,0,0,0,125.18,156.94ZM44,108a40,40,0,1,1,40,40A40,40,0,0,1,44,108Zm206.1,97.67a12,12,0,0,1-16.78-2.57A76.31,76.31,0,0,0,172,172a12,12,0,0,1,0-24,40,40,0,1,0-10.3-78.67,12,12,0,1,1-6.16-23.19,64,64,0,0,1,57.64,110.8,100.23,100.23,0,0,1,39.49,32A12,12,0,0,1,250.1,205.67Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M136,108A52,52,0,1,1,84,56,52,52,0,0,1,136,108Z",opacity:"0.2"}),l.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M164.47,195.63a8,8,0,0,1-6.7,12.37H10.23a8,8,0,0,1-6.7-12.37,95.83,95.83,0,0,1,47.22-37.71,60,60,0,1,1,66.5,0A95.83,95.83,0,0,1,164.47,195.63Zm87.91-.15a95.87,95.87,0,0,0-47.13-37.56A60,60,0,0,0,144.7,54.59a4,4,0,0,0-1.33,6A75.83,75.83,0,0,1,147,150.53a4,4,0,0,0,1.07,5.53,112.32,112.32,0,0,1,29.85,30.83,23.92,23.92,0,0,1,3.65,16.47,4,4,0,0,0,3.95,4.64h60.3a8,8,0,0,0,7.73-5.93A8.22,8.22,0,0,0,252.38,195.48Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M112.6,158.43a58,58,0,1,0-57.2,0A93.83,93.83,0,0,0,5.21,196.72a6,6,0,0,0,10.05,6.56,82,82,0,0,1,137.48,0,6,6,0,0,0,10-6.56A93.83,93.83,0,0,0,112.6,158.43ZM38,108a46,46,0,1,1,46,46A46.06,46.06,0,0,1,38,108Zm211,97a6,6,0,0,1-8.3-1.74A81.8,81.8,0,0,0,172,166a6,6,0,0,1,0-12,46,46,0,1,0-17.08-88.73,6,6,0,1,1-4.46-11.14,58,58,0,0,1,50.14,104.3,93.83,93.83,0,0,1,50.19,38.29A6,6,0,0,1,249,205Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M117.25,157.92a60,60,0,1,0-66.5,0A95.83,95.83,0,0,0,3.53,195.63a8,8,0,1,0,13.4,8.74,80,80,0,0,1,134.14,0,8,8,0,0,0,13.4-8.74A95.83,95.83,0,0,0,117.25,157.92ZM40,108a44,44,0,1,1,44,44A44.05,44.05,0,0,1,40,108Zm210.14,98.7a8,8,0,0,1-11.07-2.33A79.83,79.83,0,0,0,172,168a8,8,0,0,1,0-16,44,44,0,1,0-16.34-84.87,8,8,0,1,1-5.94-14.85,60,60,0,0,1,55.53,105.64,95.83,95.83,0,0,1,47.22,37.71A8,8,0,0,1,250.14,206.7Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M107.19,159a56,56,0,1,0-46.38,0A91.83,91.83,0,0,0,6.88,197.81a4,4,0,1,0,6.7,4.37,84,84,0,0,1,140.84,0,4,4,0,1,0,6.7-4.37A91.83,91.83,0,0,0,107.19,159ZM36,108a48,48,0,1,1,48,48A48.05,48.05,0,0,1,36,108Zm212,95.35a4,4,0,0,1-5.53-1.17A83.81,83.81,0,0,0,172,164a4,4,0,0,1,0-8,48,48,0,1,0-17.82-92.58,4,4,0,1,1-3-7.43,56,56,0,0,1,44,103,91.83,91.83,0,0,1,53.93,38.86A4,4,0,0,1,248,203.35Z"}))]]),P9=new Map([["bold",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208.49,191.51a12,12,0,0,1-17,17L128,145,64.49,208.49a12,12,0,0,1-17-17L111,128,47.51,64.49a12,12,0,0,1,17-17L128,111l63.51-63.52a12,12,0,0,1,17,17L145,128Z"}))],["duotone",l.createElement(l.Fragment,null,l.createElement("path",{d:"M216,56V200a16,16,0,0,1-16,16H56a16,16,0,0,1-16-16V56A16,16,0,0,1,56,40H200A16,16,0,0,1,216,56Z",opacity:"0.2"}),l.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["fill",l.createElement(l.Fragment,null,l.createElement("path",{d:"M208,32H48A16,16,0,0,0,32,48V208a16,16,0,0,0,16,16H208a16,16,0,0,0,16-16V48A16,16,0,0,0,208,32ZM181.66,170.34a8,8,0,0,1-11.32,11.32L128,139.31,85.66,181.66a8,8,0,0,1-11.32-11.32L116.69,128,74.34,85.66A8,8,0,0,1,85.66,74.34L128,116.69l42.34-42.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["light",l.createElement(l.Fragment,null,l.createElement("path",{d:"M204.24,195.76a6,6,0,1,1-8.48,8.48L128,136.49,60.24,204.24a6,6,0,0,1-8.48-8.48L119.51,128,51.76,60.24a6,6,0,0,1,8.48-8.48L128,119.51l67.76-67.75a6,6,0,0,1,8.48,8.48L136.49,128Z"}))],["regular",l.createElement(l.Fragment,null,l.createElement("path",{d:"M205.66,194.34a8,8,0,0,1-11.32,11.32L128,139.31,61.66,205.66a8,8,0,0,1-11.32-11.32L116.69,128,50.34,61.66A8,8,0,0,1,61.66,50.34L128,116.69l66.34-66.35a8,8,0,0,1,11.32,11.32L139.31,128Z"}))],["thin",l.createElement(l.Fragment,null,l.createElement("path",{d:"M202.83,197.17a4,4,0,0,1-5.66,5.66L128,133.66,58.83,202.83a4,4,0,0,1-5.66-5.66L122.34,128,53.17,58.83a4,4,0,0,1,5.66-5.66L128,122.34l69.17-69.17a4,4,0,1,1,5.66,5.66L133.66,128Z"}))]]),M9=O.createContext({color:"currentColor",size:"1em",weight:"regular",mirrored:!1}),rr=l.forwardRef((e,t)=>{const{alt:n,color:r,size:a,weight:i,mirrored:o,children:s,weights:c,...u}=e,{color:d="currentColor",size:f,weight:h="regular",mirrored:v=!1,...p}=l.useContext(M9);return l.createElement("svg",{ref:t,xmlns:"http://www.w3.org/2000/svg",width:a??f,height:a??f,fill:r??d,viewBox:"0 0 256 256",transform:o||v?"scale(-1, 1)":void 0,...p,...u},!!n&&l.createElement("title",null,n),s,c.get(i??h))});rr.displayName="IconBase";const bx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:m9}));bx.displayName="ArrowCircleLeftIcon";const yx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:v9}));yx.displayName="ArrowCircleRightIcon";const Cx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:g9}));Cx.displayName="BellIcon";const Sx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:p9}));Sx.displayName="CheckIcon";const wv=Sx,wx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:b9}));wx.displayName="DownloadSimpleIcon";const Ex=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:y9}));Ex.displayName="FacebookLogoIcon";const xx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:C9}));xx.displayName="FloppyDiskIcon";const I9=xx,Ax=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:S9}));Ax.displayName="GoogleLogoIcon";const Ox=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:w9}));Ox.displayName="PaperPlaneTiltIcon";const Px=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:E9}));Px.displayName="PencilSimpleIcon";const Mx=Px,Ix=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:x9}));Ix.displayName="PlusIcon";const N9=Ix,Nx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:A9}));Nx.displayName="TrashIcon";const Rx=Nx,Dx=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:O9}));Dx.displayName="UsersIcon";const Ev=l.forwardRef((e,t)=>l.createElement(rr,{ref:t,...e,weights:P9}));Ev.displayName="XIcon";const zu=Ev;function xv({icon:e,text:t,onClick:n,onClose:r,visible:a=!0,disabled:i=!1,size:o=56,theme:s="pwa",bottom:c=24,showClose:u=!0,className:d="",onAction:f,onPopupClose:h,url:v,urlText:p}){const[g,m]=O.useState(!0),[y,b]=O.useState(!0),C=a&&y;if(O.useEffect(()=>{if(C)m(!0);else{const x=setTimeout(()=>m(!1),250);return()=>clearTimeout(x)}},[C]),!g)return null;const S=C?{opacity:1,transform:"translateY(0) scale(1)",transition:"opacity 0.35s, transform 0.35s",animation:"popbutton-fade-in 0.35s"}:{opacity:0,transform:"translateY(10px) scale(0.95)",transition:"opacity 0.35s, transform 0.35s"},w=()=>{b(!1),typeof r=="function"&&r(),typeof h=="function"&&h()};return A.jsx("div",{className:`PopButton-container PopButton-${s}-theme ${d}`,style:{bottom:c,pointerEvents:C?"auto":"none",...S},children:A.jsxs("div",{className:"flex col gap-10",children:[A.jsx("div",{className:"PopButton-btn-row",children:A.jsxs(Gt,{size:"large",disabled:i,className:`PopButton-btn${i?" disabled":""}`,style:{minWidth:o+32},onClick:()=>{n&&n(),f&&f()},children:[A.jsx("span",{className:"PopButton-col PopButton-col-icon",children:e}),A.jsx("span",{className:"PopButton-col PopButton-text PopButton-col-text",children:t}),u?A.jsx("span",{className:"PopButton-col PopButton-close-wrapper PopButton-col-close",onClick:x=>{x.stopPropagation(),w()},children:A.jsx(Ev,{size:20,className:"PopButton-close"})}):A.jsx("span",{className:"PopButton-col PopButton-col-close"}),A.jsx("span",{className:"PopButton-glossy"})]})}),v&&p&&(()=>{let x=!1;try{const E=document.createElement("a");E.href=v;const M=E.pathname+E.search+E.hash,P=window.location.pathname+window.location.search+window.location.hash;x=M===P||E.href===window.location.href}catch(E){console.warn("Invalid URL:",v,E)}return x?null:A.jsx("div",{className:"PopButton-link-container",style:{marginTop:8,textAlign:"center"},children:A.jsx("a",{href:v,className:"PopButton-link",style:{color:"#007bff",textDecoration:"underline",cursor:"pointer",fontSize:14},children:p})})})()]})})}function jx({size:e=56,visible:t=!0,forceVisible:n=!1,text:r,knowMoreUrl:a,knowMoreText:i,onAction:o,onPopupClose:s}){const{organizationDetails:c,areOrganizationDetailsLoading:u}=Gr(),d=r||"Installez l'application pour une expérience optimale",{showMessage:f}=Ur(),{isProgressiveWebAppInstalled:h,canInstallProgressiveWebApp:v,installProgressiveWebApp:p}=Sv(),[g,m]=O.useState(!1),y=t&&!h&&v||n,b=async()=>{if(!g){m(!0);try{await p(),o&&o()}catch{f({type:"error",message:"L'installation a échoué ou a été annulée."})}setTimeout(()=>m(!1),2e3)}},C=c!=null&&c.image?A.jsx("img",{src:c.image,alt:"Organization Logo",style:{width:e,height:e}}):A.jsx(wx,{size:e,color:"#1890ff"});return u?null:A.jsx(xv,{icon:C,text:d,onClick:b,onClose:s,visible:y,disabled:g,size:e,theme:"pwa",showClose:!0,bottom:50,onAction:o,onPopupClose:s,url:a,urlText:i})}function Tx({size:e=56,visible:t=!0,forceVisible:n=!1,text:r,knowMoreUrl:a,knowMoreText:i,onAction:o,onPopupClose:s}){const c=r||"Activez les notifications pour ne rater aucune commande. Cliquez ici pour vous abonner.",{isSubscribed:u,subscribePush:d}=Lu(),[f,h]=O.useState(!1),v=async()=>{f||(h(!0),u||(await d(),o&&o()),setTimeout(()=>h(!1),2e3))},p=t&&!u||n;return A.jsx(xv,{icon:A.jsx(Cx,{weight:u?"fill":"regular",size:32,color:u?"#3e8e5a":"#faad14"}),text:c,onClick:v,onClose:s,visible:p,disabled:f,size:e,theme:u?"subscribed":"unsubscribed",showClose:!0,bottom:50,onAction:o,onPopupClose:s,url:a,urlText:i})}function Lx({enableInstallAppButton:e,enablePushNotificationButton:t}){const{isProgressiveWebAppInstalled:n,canInstallProgressiveWebApp:r}=Sv(),{isPushSupported:a,isSubscribed:i,isPushSubscriptionLoading:o}=Lu(),[s,c]=O.useState(!1),[u,d]=O.useState(!1),f=!n&&r&&!s&&e,h=!f&&a&&!o&&!i&&!u&&t;return A.jsxs(A.Fragment,{children:[A.jsx(jx,{visible:f,onPopupClose:()=>{c(!0)},knowMoreUrl:"/install-app",knowMoreText:"En savoir plus"}),A.jsx(Tx,{visible:h,onPopupClose:()=>{d(!0)},knowMoreUrl:"/install-app",knowMoreText:"En savoir plus"})]})}const R9="lystechcorenpmpackage",D9="lystechcorenpmpackage:last-version",zx="3.0.10";function Fx(e={}){const{packageName:t=R9,storageKey:n=D9,triggerOnFirstInstall:r=!1,onPackageUpdated:a}=e,[i,o]=O.useState(null),[s]=O.useState(zx),[c,u]=O.useState(!1),[d,f]=O.useState(!1),h=O.useCallback(()=>{if(typeof window>"u")return;const v=localStorage.getItem(n),p=!v,g=!!v&&v!==s;if(o(v),u(p),f(g),p||g){const m={packageName:t,previousVersion:v,currentVersion:s,isFirstInstall:p,hasUpdated:g};(g||p&&r)&&(a==null||a(m)),window.dispatchEvent(new CustomEvent("lystechcorenpmpackage:update",{detail:m}))}localStorage.setItem(n,s)},[n,s,t,r,a]);return O.useEffect(()=>{h()},[h]),O.useMemo(()=>({packageName:t,previousVersion:i,currentVersion:s,isFirstInstall:c,hasUpdated:d,checkForUpdate:h}),[t,i,s,c,d,h])}const j9=new ZN({defaultOptions:{queries:{staleTime:1e3*60*5,retry:3,refetchOnWindowFocus:!1}}}),kx=O.createContext({}),Li=()=>O.useContext(kx);function T9({children:e,organization:t,shouldRedirectAfterLogin:n,loginRedirectRoute:r,queryClient:a,usePushNotifications:i,useProgressiveWebAppFeatures:o,useThemeProvider:s,quickGoogleLoginButtonStyle:c,enableGoogleQuickLoginButton:u,showGoogleQuickLoginButton:d,useGoogleAutoSelect:f,debugMode:h,showAskPermissionsButtons:v,onPackageUpdated:p,triggerOnFirstInstallPackageCallback:g,packageVersionStorageKey:m}){const y=a||j9;Fx({onPackageUpdated:p,triggerOnFirstInstall:!!g,storageKey:m});const b=A.jsxs(kx.Provider,{value:{debugMode:h,usePushNotifications:i,useProgressiveWebAppFeatures:o},children:[h&&A.jsxs("div",{className:"p-10",children:[A.jsx("h2",{children:"DEBUG MODE"}),A.jsxs("p",{children:["Organization: ",t]})]}),A.jsx(d9,{children:A.jsx(i9,{children:A.jsx(nR,{client:y,children:A.jsx(u9,{usePushNotifications:i,children:A.jsx(s9,{children:A.jsx(L9,{organization:t,children:A.jsx(H9,{shouldRedirectAfterLogin:n,loginRedirectRoute:r,quickGoogleLoginButtonStyle:c,enableGoogleQuickLoginButton:u,showGoogleQuickLoginButton:d,useGoogleAutoSelect:f,children:A.jsxs(mx,{children:[e,v&&A.jsx(Lx,{enableInstallAppButton:v==null?void 0:v.installApp,enablePushNotificationButton:v==null?void 0:v.pushNotifications})]})})})})})})})})]});return s?A.jsx(h9,{children:b}):b}const Bx=O.createContext({});function Gr(){return O.useContext(Bx)}function L9({children:e,organization:t}){const n=mf(),{debugMode:r}=Li(),[a,i]=O.useState(t||"");O.useEffect(()=>{if(t){r&&console.log("OrganizationProvider: organization prop utilisée",t),i(t);return}const S=new URLSearchParams(n.search),w=S.get("org");if(w){r&&console.log("OrganizationProvider: paramètre ?org= trouvé dans l'URL",w),S.delete("org");const x=`${n.pathname}${S.toString()?"?"+S.toString():""}`;window.history.replaceState({},"",x),i(w)}else{const x=localStorage.getItem("Organization");x?(r&&console.log("OrganizationProvider: organisation trouvée dans le localStorage",x),i(x)):r&&console.log("OrganizationProvider: aucune organisation trouvée")}},[t,n.search,n.pathname,r]);function o(S){r&&console.log("User logged in:",S),!a&&!t&&S!=null&&S.defaultOrganization&&i(S.defaultOrganization)}const{data:s,isLoading:c,refetch:u}=G0(a),d=sf();function f(){u(),d.invalidateQueries()}O.useEffect(()=>{f()},[a]),O.useEffect(()=>{localStorage.removeItem("invalid-organizations")},[]);const[h,v]=O.useState(""),[p,g]=O.useState({clientId:"",appSecret:"",clientIdSandbox:"",appSecretSandbox:"",enabled:!1});O.useEffect(()=>{localStorage.setItem("Organization",a),r&&(a?console.log("OrganizationProvider: organisation mise à jour dans le localStorage",a):console.warn("OrganizationProvider: organisationState est vide, pas de mise à jour dans le localStorage"))},[a]),O.useEffect(()=>{v((s==null?void 0:s.image)??""),s&&g({clientId:(s==null?void 0:s.paypalClientId)??"",appSecret:(s==null?void 0:s.paypalAppSecret)??"",clientIdSandbox:(s==null?void 0:s.paypalClientIdSandbox)??"",appSecretSandbox:(s==null?void 0:s.paypalAppSecretSandbox)??"",enabled:!!s.paypalEnabled||!1})},[s]);async function m(S){const w=await NN(S);return w!=null&&w.success&&u(),w==null?void 0:w.success}async function y(S){const w=await RN(S);return w!=null&&w.success&&(u(),g(x=>({...x,enabled:S}))),w==null?void 0:w.success}async function b(){await jN(),u()}async function C(S,w,x){const E=await DN(S,w,x);return f(),E}return A.jsx(Bx.Provider,{value:{organization:a,organizationImage:h,organizationDetails:s??void 0,areOrganizationDetailsLoading:c,paypalInfo:p,onLoggedIn:o,updateOrganizationDetails:m,updatePaypalConfiguration:C,toggleOrganizationMode:b,updateOrganizationPaypalEnabled:y,refetchOrganizationDetails:f},children:e})}async function z9(){return await Ut.get("/users/roles")}const Hx=(e,t)=>ta(["user-role-details",e,t],z9,{enabled:!!e,select:n=>n==null?void 0:n.data,onError:n=>{console.error("Error fetching user role details:",n)}}),F9={apiKey:"AIzaSyCpAeHlt1wZvM5KtYg7X7MDVnWVJT86gvc",authDomain:"lystech.firebaseapp.com",databaseURL:"https://lystech.firebaseio.com",projectId:"lystech",storageBucket:"lystech.appspot.com",messagingSenderId:"237347321732",appId:"1:237347321732:web:7f9586d48e488d73ddcfd1"};async function Av(e){const t=await Ut.get(`users/impersonate/${e}`);return t==null?void 0:t.data}const Vx=e=>ta(["impersonating-user",e],()=>Av(e),{enabled:!!e});async function Yx(e){const t=new FormData;t.append("image",e);const n=await Ut.put("users/image",t,{headers:{"Content-Type":"multipart/form-data"},data:t});return n==null?void 0:n.data}async function Wx(e,t){const n=await Ut.put("users/image/url",{authKey:e,imageUrl:t});return n==null?void 0:n.data}async function k9(e){const t=await Ut.post("auth/request-reset-password",{email:e});return t==null?void 0:t.data}async function B9(e){const t=await Ut.post(`auth/activate/${e}`);return t==null?void 0:t.data}async function Ux(e){return await Ut.post("auth/register",{...e})}const Gx=O.createContext({});function cr(){return O.useContext(Gx)}function H9({children:e,shouldRedirectAfterLogin:t,loginRedirectRoute:n,quickGoogleLoginButtonStyle:r,enableGoogleQuickLoginButton:a,showGoogleQuickLoginButton:i,useGoogleAutoSelect:o=!0}){var te,re,ne,ue,_,fe,se;const[s,c]=O.useState(n||null),{debugMode:u}=Li();Tg(F9);const{organization:d,onLoggedIn:f}=Gr(),h=O.useCallback(()=>{const ce=sessionStorage.getItem("username");if(ce)return{id:parseInt(sessionStorage.getItem("id")||"-1"),displayName:ce,firstName:sessionStorage.getItem("firstName")||"",lastName:sessionStorage.getItem("lastName")||"",birthday:sessionStorage.getItem("birthday")?new Date(sessionStorage.getItem("birthday")):null,email:sessionStorage.getItem("email")||"",authKey:sessionStorage.getItem("authKey")||"",profileImage:sessionStorage.getItem("profileImage")||"",notifyCoffee:sessionStorage.getItem("notifyCoffee")?parseInt(sessionStorage.getItem("notifyCoffee")):0,defaultOrganization:sessionStorage.getItem("defaultOrganization")||"",thirdPartyAuthUID:sessionStorage.getItem("thirdPartyAuthUID")||"",roleDetails:{role:"",isOwner:!1,isSuperAdmin:!1,isAdmin:!1,isUser:!1,isSuperAdminOrMore:!1,isAdminOrMore:!1,isUserOrMore:!1,isAdminInAnyOrganization:!1},type:"emailPassword",activatedOn:"",approvedBy:""}},[]),v=O.useCallback(()=>{const ee=h();return ee||{}},[h]);function p(ee){g&&(g.notifyCoffee=ee,m({...g}),sessionStorage.setItem("notifyCoffee",ee.toString()))}const[g,m]=O.useState(v()),[y,b]=O.useState(localStorage.getItem("impersonateAuthKey")||void 0),C=O.useCallback(async ee=>{const{success:ce,url:me}=await Yx(ee);return ce&&(g.photoURL=me,g.profileImage=me,m({...g}),sessionStorage.setItem("profileImage",me||"")),ce},[g,m]),S=O.useCallback(async ee=>{const{success:ce,url:me}=await Wx(g==null?void 0:g.authKey,ee);return ce&&(g.photoURL=me,g.profileImage=me,m({...g}),sessionStorage.setItem("profileImage",me||"")),ce},[g,m]),w=O.useCallback(ee=>{g.firstName=ee,m({...g}),sessionStorage.setItem("firstName",ee)},[g,m]),x=O.useCallback(ee=>{g.lastName=ee,m({...g}),sessionStorage.setItem("lastName",ee)},[g,m]);O.useEffect(()=>{y?localStorage.setItem("impersonateAuthKey",y):localStorage.removeItem("impersonateAuthKey")},[y]);const E=ab(),M=ZM(),P=O.useMemo(()=>{if(g&&g.id!==-1&&g!=null&&g.authKey)return{id:g.id,authKey:g.authKey,thirdPartyAuthUID:g.thirdPartyAuthUID,displayName:g.displayName,firstName:g.firstName,lastName:g.lastName,birthday:g.birthday,profileImage:g.profileImage,defaultOrganization:g.defaultOrganization,email:g.email,roleDetails:g.roleDetails,type:"emailPassword",activatedOn:g.activatedOn,notifyCoffee:g.notifyCoffee,approvedBy:g.approvedBy}},[g]);O.useEffect(()=>{P&&y===(P==null?void 0:P.authKey)&&b(void 0)},[P,y]);const{data:I}=Vx(y||""),{data:N,isLoading:L}=Hx(I?I==null?void 0:I.authKey:P==null?void 0:P.authKey,d),D=O.useMemo(()=>I?{...I,roleDetails:N}:{...P,roleDetails:N},[P,I,N]),R=O.useMemo(()=>!!(P!=null&&P.authKey)&&(P==null?void 0:P.id)!==-1,[P]);O.useEffect(()=>{localStorage.setItem("authKey",(P==null?void 0:P.authKey)??"")},[P]),O.useEffect(()=>{R||T()},[R]);async function T(){try{const ee=await Ut.get("/auth/me");return console.log("Validate Me Response",ee),ee.data&&ie(ee==null?void 0:ee.data),ee==null?void 0:ee.data}catch(ee){return console.log("Validate Me Error",ee),null}}O.useEffect(()=>{N&&localStorage.setItem("userRoleDetails",JSON.stringify(N)),I?localStorage.setItem("impersonatedUserAuthKey",I.authKey):localStorage.removeItem("impersonatedUserAuthKey")},[N,I]);const j=O.useMemo(()=>{if(!R)return"/login";let ee="";return N&&(ee="/past-orders"),ee===""&&(ee="/"),("/"+ee+"/").replace(/\/+/g,"/")},[N,R]);async function z(ee,ce,me,pe=()=>{},be=()=>{},Ae=0){try{const we={email:ee,password:ce},ve=await Ut.get("/auth/login",{headers:we}),Oe=!!ve.data;me({result:Oe,data:ve==null?void 0:ve.data}),Ae>0?setTimeout(()=>{ie(ve==null?void 0:ve.data),t&&s&&E(s),f&&f(ve==null?void 0:ve.data)},Ae):(ie(ve==null?void 0:ve.data),f&&f(ve==null?void 0:ve.data),t&&s&&E(s))}catch(we){console.log("Login Error",we),(we==null?void 0:we.status)===403?pe(we):be(we)}}async function F(ee){const ce=await Ut.post("/auth/login/third-party",{providerData:ee}),me=ce==null?void 0:ce.data;if(!me){console.error("No user data returned from third-party login");return}return ie(me),f&&f(me),ce}async function k(){var ee,ce,me,pe;try{const be=new pa;be.setCustomParameters({prompt:"select_account"});const Ae=await Ip(M,be);if(((ce=(ee=Ae==null?void 0:Ae.user)==null?void 0:ee.providerData)==null?void 0:ce.length)===0||!((me=Ae==null?void 0:Ae.user)!=null&&me.providerData))return;const we=(pe=Ae==null?void 0:Ae.user)==null?void 0:pe.providerData[0];return await F(we)}catch(be){console.error("Google login failed",be)}}async function H(){var ee;try{const ce=new ga,me=await Ip(M,ce),pe=(ee=me==null?void 0:me.user)==null?void 0:ee.providerData[0];return await F(pe)}catch(ce){console.error("Facebook login failed",ce)}}async function W(){b(void 0),sessionStorage.clear(),localStorage.clear(),ie(null),FP(M),E("/login")}async function B(ee){const ce=iI(ee.credential);if(ce!=null&&ce.email){let me="unknown.com";ce!=null&&ce.iss.includes("google")?me="google.com":ce!=null&&ce.iss.includes("facebook")&&(me="facebook.com");const pe={displayName:ce==null?void 0:ce.given_name,email:ce==null?void 0:ce.email,phoneNumber:null,photoURL:ce==null?void 0:ce.picture,providerId:me,uid:ce==null?void 0:ce.sub};return await F(pe)}}const V=()=>{console.error("Google login failed")};function Y(ee){N!=null&&N.isSuperAdminOrMore&&b(ee)}function U(ee){t&&s&&E(s)}function J(ee){var ce;if(!ee){sessionStorage.clear();return}sessionStorage.setItem("username",ee.displayName),sessionStorage.setItem("email",ee.email),sessionStorage.setItem("firstName",ee.firstName??""),sessionStorage.setItem("lastName",ee.lastName??""),sessionStorage.setItem("birthday",((ce=ee.birthday)==null?void 0:ce.toString())??""),sessionStorage.setItem("defaultOrganization",ee.defaultOrganization),sessionStorage.setItem("id",ee.id.toString()),sessionStorage.setItem("authKey",ee.authKey),sessionStorage.setItem("thirdPartyAuthUID",ee.thirdPartyAuthUID),sessionStorage.setItem("profileImage",ee.profileImage),sessionStorage.setItem("notifyCoffee",ee.notifyCoffee.toString())}function ie(ee){m(ee),J(ee),(ee==null?void 0:ee.id)==-1&&(ee==null?void 0:ee.id)!=-1&&U()}const oe=O.useMemo(()=>{var ee,ce,me;return R?!1:a!==void 0?a:!((ee=window==null?void 0:window.location)!=null&&ee.pathname.includes("/activate"))&&!((ce=window==null?void 0:window.location)!=null&&ce.pathname.includes("/account/reset-password"))&&!((me=window==null?void 0:window.location)!=null&&me.pathname.includes("/account/activation"))},[R,a,(te=window==null?void 0:window.location)==null?void 0:te.pathname]),le=O.useMemo(()=>{var ee;return i!==void 0?i:oe&&!((ee=window==null?void 0:window.location)!=null&&ee.pathname.includes("/login"))},[oe,i,(re=window==null?void 0:window.location)==null?void 0:re.pathname]);return O.useEffect(()=>{u&&(console.log("AuthProvider - user.authKey:",P==null?void 0:P.authKey),console.log("AuthProvider - isLoggedIn:",R))},[P==null?void 0:P.authKey,R]),A.jsx(_M,{clientId:"237347321732-65nra8lcs59qn6dms77ruad01vjdr7ph.apps.googleusercontent.com",children:A.jsxs(Gx.Provider,{value:{user:P?{...P,roleDetails:N||{role:"",isOwner:!1,isSuperAdmin:!1,isAdmin:!1,isUser:!1,isSuperAdminOrMore:!1,isAdminOrMore:!1,isUserOrMore:!1,isAdminInAnyOrganization:!1}}:void 0,impersonatedUser:I,currentUser:D,auth:M,isLoggedIn:R,isSuperAdmin:(ne=D==null?void 0:D.roleDetails)==null?void 0:ne.isSuperAdminOrMore,isAdmin:(ue=D==null?void 0:D.roleDetails)==null?void 0:ue.isAdminOrMore,isUser:(_=D==null?void 0:D.roleDetails)==null?void 0:_.isUserOrMore,isSuperAdminInAnyOrganization:(fe=D==null?void 0:D.roleDetails)==null?void 0:fe.isSuperAdminOrMore,isAdminInAnyOrganization:(se=D==null?void 0:D.roleDetails)==null?void 0:se.isAdminInAnyOrganization,areRoleDetailsLoading:L,homeRoute:j,impersonateAuthKey:y,setLoginRedirectRouteState:c,registerNewUser:Ux,signInWithEmailAndPassword:z,signInWithGoogle:k,signInWithFacebook:H,logout:W,requestResetPassword:k9,activateUser:B9,impersonate:Y,getImpersonatingUser:Av,updateUserImage:C,updateUserImageUrl:S,updateUserFirstName:w,updateUserLastName:x,updateNotificationState:p},children:[u&&A.jsx("div",{className:"p-10",children:A.jsxs("p",{children:["Login Redirect Route State: ",A.jsx("b",{children:s||"null"})]})}),e,oe&&A.jsx("div",{className:`fixed top-10 right-10 ${le?"":"hidden"}`,style:r,children:A.jsx(nI,{onSuccess:B,onError:V,auto_select:o,useOneTap:!0,type:"icon"})})]})})}async function V9(){return(await Ut.get("/politique-and-conditions/9716a5de-02be-4fb2-b9b5-85ad82bfae4f")).data}async function Y9(){return(await Ut.get("/politique-and-conditions")).data}const Kx=()=>ta({queryKey:["lystech-politique-and-conditions"],queryFn:V9}),Qx=e=>ta({queryKey:["politique-and-conditions",e],queryFn:Y9,enabled:!!e});async function W9(){const e=await Ut.get("collections/invitation");return(e==null?void 0:e.data)||[]}const Fu=(e,t)=>ta(["invitedToOrders",e,t],W9,{staleTime:1e3*60*2,select:n=>t?n.filter(r=>r.organization.subdomain===t):n,enabled:!!e}),U9=()=>sf(),Zx=({onSuccess:e,onAccountNotActivated:t,onAccountNotFound:n,onError:r,className:a="",showTitle:i=!0,title:o="Se connecter",loginButtonText:s="Se connecter",pendingConnexionButtonText:c="Connexion...",passwordFieldLabel:u="Mot de passe",emailFieldLabel:d="Email",emailFieldPlaceholder:f="Votre email",passwordFieldPlaceholder:h="••••••••••••",loginSuccessMessage:v="Connexion réussie",unknownErrorMessage:p="Une erreur inconnue est survenue."})=>{const g=cr(),m=Ur(),[y,b]=O.useState({email:"",password:""}),[C,S]=O.useState(!1),w=(E,M)=>{b(P=>({...P,[E]:M}))},x=async E=>{var M,P,I;E.preventDefault(),S(!0);try{await g.signInWithEmailAndPassword(y.email,y.password,N=>{e?e(N):m.showMessage({type:"success",message:v})},N=>{t?t(N):m.showMessage({type:"warning",message:N==null?void 0:N.message})},N=>{n?n(N):m.showMessage({type:"error",message:N==null?void 0:N.message})})}catch(N){const L=N instanceof Error?N:new Error("Erreur inconnue");if(r)r(L);else{const D=(I=(P=(M=N.error)==null?void 0:M.response)==null?void 0:P.data)==null?void 0:I.message;m.showMessage({type:"error",message:D||p})}}finally{S(!1)}};return A.jsxs(A.Fragment,{children:[A.jsxs("div",{className:`auth-form ${a}`,children:[i&&A.jsx("h2",{children:o}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"email",children:d}),A.jsx("input",{type:"email",id:"email",value:y.email,onChange:E=>w("email",E.target.value),required:!0,placeholder:f})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"password",children:u}),A.jsx("input",{type:"password",id:"password",value:y.password,onChange:E=>w("password",E.target.value),required:!0,placeholder:h})]})}),A.jsx("button",{type:"button",disabled:C||!y.email.trim()||!y.password.trim(),className:"btn btn-primary",onClick:x,children:C?c:s})]}),A.jsx(Nu,{}),A.jsxs("button",{className:"third-party-login-button login-with-google",onClick:()=>{g.signInWithGoogle()},children:["Continuer avec Google ",A.jsx(Ax,{size:36,weight:"fill"})]}),A.jsxs("button",{className:"third-party-login-button login-with-facebook",onClick:()=>{g.signInWithFacebook()},children:["Continuer avec Facebook ",A.jsx(Ex,{size:36})]})]})},Xx=({onSuccess:e,onEmailAlreadyExists:t,onError:n,className:r="",showTitle:a=!0,title:i="Créer un compte",showBirthdayField:o=!0,firstNameFieldLabel:s="Prénom",firstNameFieldPlaceholder:c="Votre prénom",lastNameFieldLabel:u="Nom",lastNameFieldPlaceholder:d="Votre nom",emailFieldLabel:f="Email",emailFieldPlaceholder:h="Votre email",birthdayFieldLabel:v="Date de naissance",birthdayFieldPlaceholder:p="Votre date de naissance",passwordFieldLabel:g="Mot de passe",passwordFieldPlaceholder:m="••••••••••••",confirmPasswordFieldLabel:y="Confirmation du mot de passe",confirmPasswordFieldPlaceholder:b="••••••••••••",createAccountButtonText:C="Créer le compte",creatingAccountButtonText:S="Création en cours...",accountCreatedMessage:w="Compte créé avec succès !",accountAlreadyExistsMessage:x="Un compte avec cet email existe déjà.",errorMessage:E="Une erreur est survenue lors de la création du compte.",passwordNotMatchMessage:M="Les mots de passe ne correspondent pas.",politiqueAndConditionsConsentTexte:P="En créant un compte, j'accepte les termes et conditions.",seePolitiqueAndConditions:I="Voir les termes et conditions",politiqueAndConditionsRoute:N="/conditions"})=>{const L=cr(),D=Ur(),[R,T]=O.useState({firstName:"",lastName:"",email:"",birthday:"",password:"",confirmPassword:""}),[j,z]=O.useState(!1),F=(H,W)=>{T(B=>({...B,[H]:W}))},k=async H=>{var W,B,V;if(H.preventDefault(),z(!0),R.password!==R.confirmPassword){D.showMessage({type:"error",message:M}),z(!1);return}try{L.registerNewUser?(await L.registerNewUser({username:R.email,email:R.email,password:R.password,firstName:R.firstName,lastName:R.lastName,birthday:R.birthday||void 0}),e?e():D.showMessage({type:"success",message:w})):D.showMessage({type:"error",message:"La méthode d'enregistrement n'est pas disponible."})}catch(Y){const U=Y instanceof Error?Y:new Error("Erreur inconnue");if(n)console.log("Error in AuthRegisterForm:",U),n(U);else{const J=(V=(B=(W=Y.error)==null?void 0:W.response)==null?void 0:B.data)==null?void 0:V.message;D.showMessage({type:"error",message:J})}}finally{z(!1)}};return A.jsxs("form",{onSubmit:k,className:`auth-form ${r}`,children:[a&&A.jsx("h2",{children:i}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"firstName",children:s}),A.jsx("input",{type:"text",id:"firstName",value:R.firstName,onChange:H=>F("firstName",H.target.value),placeholder:c,required:!0})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"lastName",children:u}),A.jsx("input",{type:"text",id:"lastName",value:R.lastName,onChange:H=>F("lastName",H.target.value),required:!0,placeholder:d})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"email",children:f}),A.jsx("input",{type:"email",id:"email",value:R.email,onChange:H=>F("email",H.target.value),required:!0,placeholder:h})]})}),o&&A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"birthday",children:v}),A.jsx("input",{type:"date",id:"birthday",value:R.birthday,onChange:H=>F("birthday",H.target.value)})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"password",children:g}),A.jsx("input",{type:"password",id:"password",value:R.password,onChange:H=>F("password",H.target.value),required:!0,placeholder:m})]})}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"confirmPassword",children:y}),A.jsx("input",{type:"password",id:"confirmPassword",value:R.confirmPassword,onChange:H=>F("confirmPassword",H.target.value),required:!0,placeholder:b})]})}),A.jsx("div",{className:"form-row",children:A.jsx("div",{className:"form-group",style:{fontSize:"0.95em",color:"#555"},children:A.jsxs("span",{children:[P," ",A.jsx("a",{href:N,target:"_blank",rel:"noopener noreferrer",style:{color:"#007bff",textDecoration:"underline"},children:I})]})})}),A.jsx("button",{type:"submit",disabled:j,className:"btn btn-primary",children:j?S:C})]})},qx=({onSuccess:e,onError:t,className:n="",showTitle:r=!0,title:a="Réinitialiser le mot de passe",showDescription:i=!0,description:o="Entrez votre email pour recevoir un lien de réinitialisation.",emailFieldLabel:s="Email",confirmButtonText:c="Envoyer le lien",confirmingButtonText:u="Envoi en cours...",emailFieldPlaceholder:d="votre@email.com",activationMailSentMessage:f="Un email de réinitialisation a été envoyé à votre adresse.",errorMessage:h="Impossible d'envoyer l'email de réinitialisation."})=>{const v=cr(),p=Ur(),[g,m]=O.useState(""),[y,b]=O.useState(""),[C,S]=O.useState(!1),w=async E=>{E.preventDefault(),S(!0);try{const M=await v.requestResetPassword(g);b(g),e?e(g):p.showMessage({type:"success",message:f})}catch(M){const P=M instanceof Error?M:new Error("Erreur inconnue");t?t(P):p.showMessage({type:"error",message:`${h}`})}finally{S(!1)}},x=C||g===y||!g.trim();return A.jsxs("form",{onSubmit:w,className:`auth-form ${n}`,children:[r&&A.jsx("h2",{children:a}),i&&A.jsx("p",{className:"form-description",children:o}),A.jsx("div",{className:"form-row",children:A.jsxs("div",{className:"form-group",children:[A.jsx("label",{htmlFor:"email",children:s}),A.jsx("input",{type:"email",id:"email",value:g,onChange:E=>m(E.target.value),required:!0,placeholder:d})]})}),A.jsx("button",{type:"submit",disabled:x,className:"btn btn-primary",children:C?u:c})]})},Jx=({onLogout:e,onClose:t,className:n="",showTitle:r=!0,title:a="Profil utilisateur",showCloseButton:i=!1,closeButtonText:o="Fermer",logoutSuccessMessage:s="Déconnexion réussie",logoutErrorMessage:c="Erreur lors de la déconnexion",disconnectedLabel:u="Non connecté",mustBeLoggedInMessage:d="Vous devez être connecté pour voir votre profil.",logoutButtonText:f="Se déconnecter",emailLabel:h="Email",nameLabel:v="Nom",idLabel:p="ID"})=>{var b,C,S;const g=cr(),m=Ur(),y=async()=>{try{await g.logout(),e?e():m.showMessage({type:"success",message:s})}catch(w){console.error("Erreur lors de la déconnexion:",w),m.showMessage({type:"error",message:c})}};return g.isLoggedIn?A.jsxs("div",{className:`user-profile ${n}`,children:[A.jsx("div",{className:"profile-icon",children:"👤"}),r&&A.jsx("h2",{children:a}),A.jsxs("div",{className:"user-info",children:[A.jsxs("div",{className:"info-item",children:[A.jsxs("span",{className:"label",children:[h,":"]}),A.jsx("span",{className:"value",children:((b=g.currentUser)==null?void 0:b.email)||"N/A"})]}),A.jsxs("div",{className:"info-item",children:[A.jsxs("span",{className:"label",children:[v,":"]}),A.jsx("span",{className:"value",children:((C=g.currentUser)==null?void 0:C.displayName)||"N/A"})]}),A.jsxs("div",{className:"info-item",children:[A.jsxs("span",{className:"label",children:[p,":"]}),A.jsx("span",{className:"value",children:((S=g.currentUser)==null?void 0:S.id)||"N/A"})]})]}),A.jsxs("div",{className:"profile-actions",children:[A.jsx("button",{onClick:y,className:"btn btn-logout",children:f}),i&&t&&A.jsx("button",{onClick:t,className:"btn btn-secondary",children:o})]})]}):A.jsxs("div",{className:`user-profile ${n}`,children:[A.jsx("div",{className:"profile-icon",children:"🔒"}),A.jsx("h2",{children:u}),A.jsx("p",{children:d})]})};function _x(){const{organization:e}=Gr(),{data:t,isLoading:n}=Kx(),{data:r,isLoading:a}=Qx(e),i=O.useMemo(()=>n||a?[]:e!=="lystech"?[...r||[],...t||[]]:r||[],[t,r,n,a,e]);return A.jsx("div",{className:"flex col gap-10",style:{padding:"20px",textAlign:"left"},children:i&&i.map(o=>A.jsxs("div",{className:"p-4 border rounded bg-white",children:[A.jsx("div",{dangerouslySetInnerHTML:{__html:o.content}}),A.jsx("div",{className:"text-xs text-gray-500 mt-2",children:o.updatedOn?`Updated: ${new Date(o.updatedOn).toLocaleString()}`:""})]},o.id))})}function G9(){const{showMessage:e}=Ur(),{activateUser:t}=cr(),{token:n}=NR(),[r,a]=O.useState(!1),[i,o]=O.useState(!1),s=O.useRef(!1),[c,u]=O.useState(null);async function d(f){if(!s.current){s.current=!0,u({type:"info",content:"Activation en cours..."}),a(!0);try{const h=await t(f);return h!=null&&h.success?(e({message:"Votre compte a été activé avec succès.",type:"success",duration:1e4}),o(!0),u({type:"success",content:"Votre compte a été activé avec succès. Redirection..."}),setTimeout(()=>{if(h!=null&&h.redirectionUrl){window.location.href=h.redirectionUrl;return}else window.location.href="/login"},3e3)):(e({message:"L'activation de votre compte a échoué ou ce lien est expiré.",type:"error",duration:1e4}),u({type:"error",content:"L'activation de votre compte a échoué ou ce lien est expiré."})),h}catch{return e({message:"Une erreur s'est produite lors de l'activation de votre compte.",type:"error",duration:1e4}),u({type:"error",content:"Une erreur s'est produite lors de l'activation de votre compte."}),null}finally{a(!1)}}}return O.useEffect(()=>{n&&!i&&!r&&!s.current&&d(n)},[n,i,r]),A.jsx("div",{className:"account-activation auth-theme-container",children:A.jsx("div",{className:"auth-theme-content",children:A.jsx("div",{className:`auth-message ${(c==null?void 0:c.type)||""}`.trim(),children:c==null?void 0:c.content})})})}const K9=({onSuccess:e,onCancel:t,style:n,className:r="",centered:a=!1,showLogo:i=!0,logoSrc:o,appName:s="",defaultMode:c="login",cancelButtonText:u="Annuler",returnToLoginButtonText:d="Retour à la connexion",showTitle:f=!0,title:h="",showLoginForm:v=!0,showRegisterForm:p=!0,showForgotPasswordForm:g=!0,loginButtonText:m="Se connecter",registerButtonText:y="S'inscrire",forgotPasswordButtonText:b="Réinitialiser le mot de passe",loginFormProps:C={},registerFormProps:S={},forgotPasswordFormProps:w={},politiqueAndConditionsConsentTexte:x="En créant un compte, j'ai lu, compris et j'accepte les règles d'utilisation.",seePolitiqueAndConditions:E="Voir les termes et conditions",politiqueAndConditionsRoute:M="/conditions"})=>{const P=cr(),I=mf(),[N,L]=O.useState(c),D=!!M&&(I==null?void 0:I.pathname)===M,R=()=>{e==null||e()},T=()=>{L("login")},j=()=>{L("login")},z=()=>{};return D?A.jsx(_x,{}):P.isLoggedIn?A.jsx("div",{className:`auth-template connected ${r}`,style:{...n,...a?{maxWidth:"400px",margin:"0 auto",padding:"20px"}:{}},children:A.jsxs("div",{className:"auth-container",children:[i&&A.jsxs("div",{className:"auth-header",children:[o&&A.jsx("img",{src:o,alt:s,className:"auth-logo"}),A.jsx("h1",{children:s})]}),A.jsx(Jx,{onLogout:z,onClose:t,showCloseButton:!!t})]})}):A.jsx("div",{className:`auth-template ${r}`,style:{...n,...a?{maxWidth:"400px",margin:"0 auto",padding:"20px"}:{}},children:A.jsxs("div",{className:"auth-container",children:[i&&A.jsxs("div",{className:"auth-header",children:[o&&A.jsx("img",{src:o,alt:s,className:"auth-logo"}),A.jsx("h1",{children:s})]}),f&&A.jsx("div",{className:"auth-title",children:A.jsx("h2",{children:h})}),A.jsxs("div",{className:"auth-tabs",children:[v&&A.jsx("button",{className:`tab ${N==="login"?"active":""}`,onClick:()=>L("login"),children:m}),p&&A.jsx("button",{className:`tab ${N==="register"?"active":""}`,onClick:()=>L("register"),children:y})]}),A.jsxs("div",{className:"auth-content",children:[N==="login"&&v&&A.jsxs("div",{children:[A.jsx(Zx,{onSuccess:R,loginButtonText:"Se connecter",className:"auth-login-form",...C}),g&&A.jsx("div",{className:"auth-links",children:A.jsx("button",{type:"button",onClick:()=>L("forgot-password"),className:"link-button",children:b})})]}),N==="register"&&p&&A.jsx(Xx,{onSuccess:T,politiqueAndConditionsConsentTexte:x,seePolitiqueAndConditions:E,politiqueAndConditionsRoute:M,...S}),N==="forgot-password"&&g&&A.jsxs("div",{children:[A.jsx(qx,{onSuccess:j,...w}),A.jsx("div",{className:"auth-links",children:A.jsxs("button",{type:"button",onClick:()=>L("login"),className:"link-button",children:["← ",d]})})]}),N==="activation"&&A.jsx(G9,{})]}),t&&A.jsx("div",{className:"auth-footer",children:A.jsx("button",{onClick:t,className:"btn btn-secondary",children:u})})]})})};function ku(){const{organizationDetails:e}=Gr();return A.jsxs("div",{style:{width:"100%",minHeight:"400px",display:"flex",justifyContent:"center",alignItems:"center",fontSize:18,color:"#888"},children:[A.jsx("div",{className:"loading-spinner",style:{width:48,height:48,border:"6px solid #eee",borderTop:`6px solid ${(e==null?void 0:e.primaryColor)||"#1677ff"}`,borderRadius:"50%",animation:"spin 1s linear infinite"}}),A.jsx("style",{children:`
|
|
1689
1689
|
@keyframes spin {
|
|
1690
1690
|
0% { transform: rotate(0deg);}
|
|
1691
1691
|
100% { transform: rotate(360deg);}
|