vendor: 4,299 bytes, lines 1-10
1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/SignUp-_f9OFUsU.js","assets/vendor-react-z4hXqFxK.js","assets/geocoding-Chxo-U66.js","assets/Turnstile-BS1iwldW.js","assets/arrow-left-D7GN4JsB.js","assets/check-Cqu8tNaF.js","assets/send-Uyar9O-K.js","assets/vendor-supabase-DfwcnzK-.js","assets/vendor-monitoring-DRqSlk6P.js","assets/ForgotPassword-Br-H8hcz.js","assets/UpdatePassword-BY6EOX7Z.js","assets/EmptyState-CERZozju.js","assets/MyProfile-C8Sx_CXq.js","assets/index.esm-BIGf0G-3.js","assets/Badge-BIl6km_H.js","assets/mail-B9R4Vjag.js","assets/CompleteProfile-lDOp09r4.js","assets/errorHandler-BUkCGA87.js","assets/ClaimGroup-ZBXPtsVn.js","assets/telephone-YTKABG1k.js","assets/GroupAddressField-z3eElWbN.js","assets/map-pin-BgjGLmiC.js","assets/search-AJguBR-n.js","assets/MyGroup-BuPP7X7z.js","assets/ConfirmationDialog-BS2kH9sP.js","assets/activiteGroupe-C5aEStru.js","assets/statutGroupe-Du5fD3Y8.js","assets/user-plus-Dal5emmN.js","assets/arrow-right-BalwR2di.js","assets/StatutBadge-Cc-be4ip.js","assets/marqueurs-LTTytGfe.js","assets/pencil-Dit63tIt.js","assets/clock-CUg5iCkz.js","assets/phone-B6L9ghR6.js","assets/QuestionsPage-CAe8W6rQ.js","assets/globe-BVLLoM8Z.js","assets/TriduumsPage-CkcQVkXm.js","assets/ErrorState-DgRFj5tZ.js","assets/refresh-cw-DcnPUuQi.js","assets/Skeleton-CXxpZsNX.js","assets/external-link-BorksSwr.js","assets/MapContainer-B0eTmRoy.js","assets/useGroups-CQMGB-Wy.js","assets/user-check-C_ajCHQc.js","assets/calendar-DfmpruT5.js","assets/MapContainer-3yaWYNWa.css","assets/GroupList-443Tm5WZ.js","assets/chevron-left-DGaEa2qA.js","assets/chevron-right-BWEHeOic.js","assets/chevron-up-PG9tQbiz.js","assets/user-x-DdE5YEOR.js","assets/GroupForm-AuGV4vUz.js","assets/archive-Ck5ZOAJN.js","assets/circle-check-big-DzbBuWu6.js","assets/building-7s3m7e0T.js","assets/HelpPage-BT90Re-d.js","assets/heart-D389-zx_.js","assets/ExpiredUpdateLink-C0EIxPXP.js","assets/RegistrationForm-CgpO5gE7.js","assets/UserList-DS8PCM9z.js","assets/TriduumAdmin-DjjeEwX3.js","assets/AccountsOverview-tfOauDsv.js","assets/download-DhvPmN5z.js","assets/ImportGroups-BSoeHgZq.js","assets/AdminDashboard-Bk_33zqK.js","assets/ActivityLog-B1Jhcg3e.js","assets/EmailConsole-BCwjyIh0.js","assets/Diagnose-dLYjOCry.js","assets/NotFound-DGttrxIo.js"])))=>i.map(i=>d[i]); 2import{r as m,a as In,u as Re,N as le,L as Xe,R as b,b as Ln,c as Yt,d as fe,e as An,f as M,B as Rn}from"./vendor-react-z4hXqFxK.js";import{c as Pn}from"./vendor-supabase-DfwcnzK-.js";import{w as Mn,c as zn,i as Dn,s as St,a as at,E as Bn}from"./vendor-monitoring-DRqSlk6P.js";(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))s(o);new MutationObserver(o=>{for(const a of o)if(a.type==="childList")for(const c of a.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&s(c)}).observe(document,{childList:!0,subtree:!0});function n(o){const a={};return o.integrity&&(a.integrity=o.integrity),o.referrerPolicy&&(a.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?a.credentials="include":o.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function s(o){if(o.ep)return;o.ep=!0;const a=n(o);fetch(o.href,a)}})();var Xt={exports:{}},Qe={};/** 3 * @license React 4 * react-jsx-runtime.production.min.js 5 * 6 * Copyright (c) Facebook, Inc. and its affiliates. 7 * 8 * This source code is licensed under the MIT license found in the 9 * LICENSE file in the root directory of this source tree. 10 */var On=m,$n=Symbol.for("react.element"),Hn=Symbol.for("react.fragment"),Vn=Object.prototype.hasOwnProperty,Fn=On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,qn={key:!0,ref:!0,__self:!0,__source:!0};function Jt(t,e,n){var s,o={},a=null,c=null;n!==void 0&&(a=""+n),e.key!==void 0&&(a=""+e.key),e.ref!==void 0&&(c=e.ref);for(s in e)Vn.call(e,s)&&!qn.hasOwnProperty(s)&&(o[s]=e[s]);if(t&&t.defaultProps)for(s in e=t.defaultProps,e)o[s]===void 0&&(o[s]=e[s]);return{$$typeof:$n,type:t,key:a,ref:c,props:o,_owner:Fn.current}}Qe.Fragment=Hn;Qe.jsx=Jt;Qe.jsxs=Jt;Xt.exports=Qe;var r=Xt.exports,lt={},Tt=In;lt.createRoot=Tt.createRoot,lt.hydrateRoot=Tt.hydrateRoot;const Un="modulepreload",Wn=function(t){return"/"+t},It={}
10,V=function(e,n,s){let o=Promise.resolve();if(n&&n.length>0){document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),p=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));o=Promise.allSettled(n.map(l=>{if(l=Wn(l),l in It)return;It[l]=!0;const d=l.endsWith(".css"),f=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${l}"]${f}`))return;const i=document.createElement("link");if(i.rel=d?"stylesheet":Un,d||(i.as="script"),i.crossOrigin="",i.href=l,p&&i.setAttribute("nonce",p),document.head.appendChild(i),d)return new Promise((u,v)=>{i.addEventListener("load",u),i.addEventListener("error",()=>v(new Error(`Unable to preload CSS for ${l}`)))})}))}function a(c){const p=new Event("vite:preloadError",{cancelable:!0});if(p.payload=c,window.dispatchEvent(p),!p.defaultPrevented)throw c}return o.then(c=>{for(const p of c||[])p.status==="rejected"&&a(p.reason);return e().catch(a)})};/** 11 * @license lucide-react v0.379.0 - ISC 12 * 13 * This source code is licensed under the ISC license. 14 * See the LICENSE file in the root directory of this source tree. 15 */const Gn=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Kt=(...t)=>t.filter((e,n,s)=>!!e&&s.indexOf(e)===n).join(" ");/** 16 * @license lucide-react v0.379.0 - ISC 17 * 18 * This source code is licensed under the ISC license. 19 * See the LICENSE file in the root directory of this source tree. 20 */var Yn={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/** 21 * @license lucide-react v0.379.0 - ISC 22 * 23 * This source code is licensed under the ISC license. 24 * See the LICENSE file in the root directory of this source tree. 25 */const Xn=m.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:s,className:o="",children:a,iconNode:c,...p},l)=>m.createElement("svg",{ref:l,...Yn,width:e,height:e,stroke:t,strokeWidth:s?Number(n)*24/Number(e):n,className:Kt("lucide",o),...p},[...c.map(([d,f])=>m.createElement(d,f)),...Array.isArray(a)?a:[a]]));/** 26 * @license lucide-react v0.379.0 - ISC 27 * 28 * This source code is licensed under the ISC license. 29 * See the LICENSE file in the root directory of this source tree. 30 */const P=(t,e)=>{const n=m.forwardRef(({className:s,...o},a)=>m.createElement(Xn,{ref:a,iconNode:e,className:Kt(`lucide-${Gn(t)}`,s),...o}));return n.displayName=`${t}`,n};/** 31 * @license lucide-react v0.379.0 - ISC 32 * 33 * This source code is licensed under the ISC license. 34 * See the LICENSE file in the root directory of this source tree. 35 */const Jn=P("Activity",[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]]);/** 36 * @license lucide-react v0.379.0 - ISC 37 * 38 * This source code is licensed under the ISC license. 39 * See the LICENSE file in the root directory of this source tree. 40 */const Kn=P("BarChart3",[["path",{d:"M3 3v18h18",key:"1s2lah"}],["path",{d:"M18 17V9",key:"2bz60n"}],["path",{d:"M13 17V5",key:"1frdt8"}],["path",{d:"M8 17v-3",key:"17ska0"}]]);/** 41 * @license lucide-react v0.379.0 - ISC 42 * 43 * This source code is licensed under the ISC license. 44 * See the LICENSE file in the root directory of this source tree. 45 */const Zn=P("BookOpen",[["path",{d:"M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z",key:"vv98re"}],["path",{d:"M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z",key:"1cyq3y"}]]);/** 46 * @license lucide-react v0.379.0 - ISC 47 * 48 * This source code is licensed under the ISC license. 49 * See the LICENSE file in the root directory of this source tree. 50 */const Qn=P("CalendarHeart",[["path",{d:"M3 10h18V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h7",key:"136lmk"}],["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21.29 14.7a2.43 2.43 0 0 0-2.65-.52c-.3.12-.57.3-.8.53l-.34.34-.35-.34a2.43 2.43 0 0 0-2.65-.53c-.3.12-.56.3-.79.53-.95.94-1 2.53.2 3.74L17.5 22l3.6-3.55c1.2-1.21 1.14-2.8.19-3.74Z",key:"1t7hil"}]]);/** 51 * @license lucide-react v0.379.0 - ISC 52 * 53 * This source code is licensed under the ISC license. 54 * See the LICENSE file in the root directory of this source tree. 55 */const er=P("CalendarPlus",[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["path",{d:"M21 13V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8",key:"3spt84"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M16 19h6",key:"xwg31i"}],["path",{d:"M19 16v6",key:"tddt3s"}]]);/** 56 * @license lucide-react v0.379.0 - ISC 57 * 58 * This source code is licensed under the ISC license. 59 * See the LICENSE file in the root directory of this source tree. 60 */const tr=P("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/** 61 * @license lucide-react v0.379.0 - ISC 62 * 63 * This source code is licensed under the ISC license. 64 * See the LICENSE file in the root directory of this source tree. 65 */const nr=P("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);/** 66 * @license lucide-react v0.379.0 - ISC 67 * 68 * This source code is licensed under the ISC license. 69 * See the LICENSE file in the root directory of this source tree. 70 */const rr=P("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);/** 71 * @license lucide-react v0.379.0 - ISC 72 * 73 * This source code is licensed under the ISC license. 74 * See the LICENSE file in the root directory of this source tree. 75 */const Zt=P("CircleHelp",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 76 * @license lucide-react v0.379.0 - ISC 77 * 78 * This source code is licensed under the ISC license. 79 * See the LICENSE file in the root directory of this source tree. 80 */const Qt=P("CirclePlay",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polygon",{points:"10 8 16 12 10 16 10 8",key:"1cimsy"}]]);/** 81 * @license lucide-react v0.379.0 - ISC 82 * 83 * This source code is licensed under the ISC license. 84 * See the LICENSE file in the root directory of this source tree. 85 */const sr=P("CircleX",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]);/** 86 * @license lucide-react v0.379.0 - ISC 87 * 88 * This source code is licensed under the ISC license. 89 * See the LICENSE file in the root directory of this source tree.
90 */const or=P("ClipboardList",[["rect",{width:"8",height:"4",x:"8",y:"2",rx:"1",ry:"1",key:"tgr4d6"}],["path",{d:"M16 4h2a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h2",key:"116196"}],["path",{d:"M12 11h4",key:"1jrz19"}],["path",{d:"M12 16h4",key:"n85exb"}],["path",{d:"M8 11h.01",key:"1dfujw"}],["path",{d:"M8 16h.01",key:"18s6g9"}]]);/** 91 * @license lucide-react v0.379.0 - ISC 92 * 93 * This source code is licensed under the ISC license. 94 * See the LICENSE file in the root directory of this source tree. 95 */const ir=P("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/** 96 * @license lucide-react v0.379.0 - ISC 97 * 98 * This source code is licensed under the ISC license. 99 * See the LICENSE file in the root directory of this source tree. 100 */const ar=P("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 101 * @license lucide-react v0.379.0 - ISC 102 * 103 * This source code is licensed under the ISC license. 104 * See the LICENSE file in the root directory of this source tree. 105 */const lr=P("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]);/** 106 * @license lucide-react v0.379.0 - ISC 107 * 108 * This source code is licensed under the ISC license. 109 * See the LICENSE file in the root directory of this source tree. 110 */const cr=P("KeyRound",[["path",{d:"M2 18v3c0 .6.4 1 1 1h4v-3h3v-3h2l1.4-1.4a6.5 6.5 0 1 0-4-4Z",key:"167ctg"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]]);/** 111 * @license lucide-react v0.379.0 - ISC 112 * 113 * This source code is licensed under the ISC license. 114 * See the LICENSE file in the root directory of this source tree. 115 */const dr=P("List",[["line",{x1:"8",x2:"21",y1:"6",y2:"6",key:"7ey8pc"}],["line",{x1:"8",x2:"21",y1:"12",y2:"12",key:"rjfblc"}],["line",{x1:"8",x2:"21",y1:"18",y2:"18",key:"c3b1m8"}],["line",{x1:"3",x2:"3.01",y1:"6",y2:"6",key:"1g7gq3"}],["line",{x1:"3",x2:"3.01",y1:"12",y2:"12",key:"1pjlvk"}],["line",{x1:"3",x2:"3.01",y1:"18",y2:"18",key:"28t2mc"}]]);/** 116 * @license lucide-react v0.379.0 - ISC 117 * 118 * This source code is licensed under the ISC license. 119 * See the LICENSE file in the root directory of this source tree. 120 */const Ce=P("LoaderCircle",[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]]);/** 121 * @license lucide-react v0.379.0 - ISC 122 * 123 * This source code is licensed under the ISC license. 124 * See the LICENSE file in the root directory of this source tree. 125 */const Lt=P("LogOut",[["path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4",key:"1uf3rs"}],["polyline",{points:"16 17 21 12 16 7",key:"1gabdz"}],["line",{x1:"21",x2:"9",y1:"12",y2:"12",key:"1uyos4"}]]);/** 126 * @license lucide-react v0.379.0 - ISC 127 * 128 * This source code is licensed under the ISC license. 129 * See the LICENSE file in the root directory of this source tree. 130 */const ur=P("MailCheck",[["path",{d:"M22 13V6a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v12c0 1.1.9 2 2 2h8",key:"12jkf8"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}],["path",{d:"m16 19 2 2 4-4",key:"1b14m6"}]]);/** 131 * @license lucide-react v0.379.0 - ISC 132 * 133 * This source code is licensed under the ISC license. 134 * See the LICENSE file in the root directory of this source tree. 135 */const pr=P("Map",[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]]);/** 136 * @license lucide-react v0.379.0 - ISC 137 * 138 * This source code is licensed under the ISC license. 139 * See the LICENSE file in the root directory of this source tree. 140 */const mr=P("Menu",[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]]);/** 141 * @license lucide-react v0.379.0 - ISC 142 * 143 * This source code is licensed under the ISC license. 144 * See the LICENSE file in the root directory of this source tree. 145 */const fr=P("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/** 146 * @license lucide-react v0.379.0 - ISC 147 * 148 * This source code is licensed under the ISC license. 149 * See the LICENSE file in the root directory of this source tree. 150 */const en=P("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);/** 151 * @license lucide-react v0.379.0 - ISC 152 * 153 * This source code is licensed under the ISC license. 154 * See the LICENSE file in the root directory of this source tree. 155 */const hr=P("Settings",[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/** 156 * @license lucide-react v0.379.0 - ISC 157 * 158 * This source code is licensed under the ISC license. 159 * See the LICENSE file in the root directory of this source tree. 160 */const mt=P("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);/** 161 * @license lucide-react v0.379.0 - ISC 162 * 163 * This source code is licensed under the ISC license. 164 * See the LICENSE file in the root directory of this source tree. 165 */const gr=P("Upload",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"17 8 12 3 7 8",key:"t8dd8p"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15",key:"widbto"}]]);/** 166 * @license lucide-react v0.379.0 - ISC 167 * 168 * This source code is licensed under the ISC license. 169 * See the LICENSE file in the root directory of this source tree. 170 */const vr=P("User",[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]]);/** 171 * @license lucide-react v0.379.0 - ISC 172 * 173 * This source code is licensed under the ISC license. 174 * See the LICENSE file in the root directory of this source tree. 175 */const At=P("Users",[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["path",{d:"M16 3.13a4 4 0 0 1 0 7.75",key:"1da9ce"}]]);/** 176 * @license lucide-react v0.379.0 - ISC 177 * 178 * This source code is licensed under the ISC license. 179 * See the LICENSE file in the root directory of this source tree. 180 */const xr=P("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}
180],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),ct="https://kkbopzxhzodxiuktvbue.supabase.co",yr="eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImtrYm9wenhoem9keGl1a3R2YnVlIiwicm9sZSI6ImFub24iLCJpYXQiOjE3NjgyNDQ2MzQsImV4cCI6MjA4MzgyMDYzNH0.q0gswRUyuaV4L_PCG88uGHgD9pQpjDq0qbCHNcGT4oc";ct.startsWith("https")||console.error("â ï¸ ERREUR CRITIQUE : URL Supabase invalide dans .env.local :",ct);const ie=Pn(ct,yr,{auth:{persistSession:!0,autoRefreshToken:!0}}),br=()=>{if(typeof window>"u")return null;try{return window.localStorage.getItem("analytics_user_email")}catch{return null}},dt=t=>t?String(t).trim().toLowerCase():null,wr=t=>{const e=dt(t);if(!e)return null;let n=5381;for(let s=0;s<e.length;s+=1)n=(n<<5)+n+e.charCodeAt(s)>>>0;return n.toString(36)},jr=()=>{if(typeof window>"u")return[];const t=window.__ANALYTICS_EXCLUDED_EMAIL_HASHES;return Array.isArray(t)?t:[]},tn=t=>{const e=wr(t);return e?jr().includes(e):!1},Er=t=>{if(typeof window>"u")return!1;const e=window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1",n=typeof navigator>"u"?!0:navigator.onLine,s=dt(t)??dt(br());return!e&&n&&!tn(s)},Cr=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/gi,kr=t=>{const e=String(t||"/");return e.startsWith("/update-request/")?"/update-request/:token":e.replace(Cr,":id")},_r=()=>{if(typeof window>"u")return{};try{return{"[Amplitude] Page Domain":window.location.hostname,"[Amplitude] Page Path":kr(window.location.pathname)}}catch{return{}}},ae=(t,e={})=>{if(typeof window>"u")return;const n={..._r(),...e};if(Er()&&window.amplitude){window.amplitude.track(t,n);return}typeof import.meta<"u"&&!1&&console.log(`ð¡ [Amplitude DEV] ${t}`,n)},ge={},nn=(ge==null?void 0:ge.VITE_SENTRY_DSN)??"",Nr=/[\w.+-]+@[\w-]+\.[\w.-]+/g,Sr=()=>typeof window<"u"&&(window.location.hostname==="localhost"||window.location.hostname==="127.0.0.1"),Tr=()=>(ge==null?void 0:ge.VITE_SENTRY_FORCE_LOCAL)==="1",ze=()=>!!nn&&typeof window<"u"&&(!Sr()||Tr()),Ir=t=>{try{return JSON.parse(JSON.stringify(t).replace(Nr,"[email masqué]"))}catch{return t}},Lr=t=>{if(typeof t!="string")return t;const e=t.indexOf("?");return e===-1?t:`${t.slice(0,e)}?[filtres masqués]`},Ar=()=>{ze()&&Dn({dsn:nn,environment:(ge==null?void 0:ge.VITE_SENTRY_ENVIRONMENT)??"production"??"production",sendDefaultPii:!1,tracesSampleRate:0,ignoreErrors:["ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"],denyUrls:[/extensions\//i,/^chrome-extension:\/\//i,/^moz-extension:\/\//i],beforeBreadcrumb:t=>{var e;return(e=t==null?void 0:t.data)!=null&&e.url&&(t.data.url=Lr(t.data.url)),t},beforeSend:t=>Ir(t)})},Rr=t=>{if(ze())try{t!=null&&t.id?at({id:t.id}):at(null)}catch{}},Pr=()=>{if(ze())try{at(null)}catch{}},Mr=t=>{if(ze())try{St("derived_type",(t==null?void 0:t.derived_type)??"inconnu"),St("group_count",String(((t==null?void 0:t.groups)??[]).length))}catch{}},zr=(t,{where:e,tags:n}={})=>{if(ze())try{Mn(s=>{e&&s.setTag("where",e),Object.entries(n??{}).forEach(([o,a])=>{a!=null&&s.setTag(o,String(a))}),zn(t instanceof Error?t:new Error(String(t)))})}catch{}},rn=m.createContext(),Dr=({children:t})=>{const[e,n]=m.useState(null),[s,o]=m.useState(null),[a,c]=m.useState(!0),[p,l]=m.useState(null),[d,f]=m.useState(!1),[i,u]=m.useState(null),v=m.useCallback(async()=>{try{const{data:w,error:k}=await ie.rpc("my_context");if(k)throw k;l(w??null),u(null),Mr(w);try{const _=typeof window<"u"?window.amplitude:null;if(_!=null&&_.identify&&(w!=null&&w.derived_type))if(typeof _.Identify=="function"){const N=new _.Identify;N.set("derived_type",w.derived_type),N.set("group_count",(w.groups??[]).length),_.identify(N)}else _.identify({derived_type:w.derived_type,group_count:(w.groups??[]).length})}catch{}return w??null}catch(w){return console.warn("my_context indisponible :",w.message),l(null),u(w),null}finally{f(!0)}},[]),x=m.useRef(null),y=m.useRef(null);m.useEffect(()=>{let w=!0;const k=async j=>{var T;Rr(j);try{const{data:I,error:O}=await ie.from("profiles").select("*").eq("id",j.id).maybeSingle();if(O)throw O;if(w){y.current=j.email||null,n(I?{...j,...I,email:j.email??I.email}:j),v();const z=(j.email||"").trim().toLowerCase(),q=((I==null?void 0:I.email)||"").trim().toLowerCase();I&&z&&z!==q&&ie.rpc("sync_my_email").then(({data:D,error:B})=>{if(B){console.warn("Réalignement de l'adresse impossible :",B.message);return}(D==null?void 0:D.status)==="ok"?ae("Email Change Completed",{groupes:D.groupes??0,profil:D.profil??0}):(D==null?void 0:D.status)==="conflit"&&ae("Email Sync Conflict")},()=>{})}}catch(I){I.name!=="AbortError"&&!((T=I.message)!=null&&T.includes("aborted"))&&console.warn("Lecture du profil impossible :",I.message),w&&(n(j),v())}finally{w&&c(!1)}},_=(j,T)=>{if(!w)return;o(j);const I=(j==null?void 0:j.user)??null;if(!I){x.current=null,y.current=null,Or(),Pr(),n(null),l(null),f(!1),u(null),c(!1);return}const O=x.current!==I.id,z=y.current!==null&&y.current!==(I.email||null);!O&&T!=="USER_UPDATED"&&!z||(x.current=I.id,Br(I),k(I))};ie.auth.getSession().then(({data:{session:j},error:T})=>
180{if(T)throw T;_(j,"INITIAL_SESSION")}).catch(j=>{var T;j.name!=="AbortError"&&!((T=j.message)!=null&&T.includes("aborted"))&&console.error("Erreur Auth:",j.message),w&&c(!1)});const{data:{subscription:N}}=ie.auth.onAuthStateChange((j,T)=>{_(T,j)});return()=>{w=!1,N.unsubscribe()}},[v]);const h=m.useCallback(w=>{n(k=>k&&{...k,...w})},[]),g=async()=>{await ie.auth.signOut(),x.current=null,n(null),o(null),l(null),f(!1),u(null)};return r.jsx(rn.Provider,{value:{user:e,session:s,signOut:g,loading:a,context:p,contextLoaded:d,contextError:i,refreshContext:v,applyProfilePatch:h,derivedType:(p==null?void 0:p.derived_type)??null,myGroups:(p==null?void 0:p.groups)??[],isReferent:((p==null?void 0:p.groups)??[]).length>0},children:a?r.jsx("div",{className:"h-screen flex items-center justify-center bg-gray-50",children:r.jsxs("div",{className:"text-center",children:[r.jsx("div",{className:"animate-spin rounded-full h-10 w-10 border-b-2 border-blue-600 mx-auto mb-4"}),r.jsx("p",{className:"text-gray-600",children:"Chargement de l'application..."})]})}):t})},Br=t=>{var e;try{const n=typeof window<"u"?window.amplitude:null,s=t.email?t.email.toLowerCase():null,o=tn(s),a=typeof navigator>"u"?!0:navigator.onLine;if(typeof window<"u"&&(s?window.localStorage.setItem("analytics_user_email",s):window.localStorage.removeItem("analytics_user_email")),n!=null&&n.setOptOut&&n.setOptOut(o||!a),o){(e=n==null?void 0:n.reset)==null||e.call(n);return}if(n!=null&&n.setUserId&&n.setUserId(t.id),n!=null&&n.identify){const c=new Date().toISOString();if(typeof n.Identify=="function"){const p=new n.Identify;p.set("last_login",c),n.identify(p)}else n.identify({last_login:c})}}catch(n){console.warn("Amplitude identify failed:",n)}},Or=()=>{var t;try{const e=typeof window<"u"?window.amplitude:null,n=typeof navigator>"u"?!0:navigator.onLine;typeof window<"u"&&window.localStorage.removeItem("analytics_user_email"),(t=e==null?void 0:e.reset)==null||t.call(e),e!=null&&e.setOptOut&&e.setOptOut(!n)}catch(e){console.warn("Amplitude reset failed:",e)}},ve=()=>m.useContext(rn),sn=m.createContext(),Uo=()=>{const t=m.useContext(sn);if(!t)throw new Error("useGroupsContext doit être utilisé à l'intérieur d'un GroupsProvider");return t},rt=1e3,$r=({children:t})=>{var x;const{session:e,derivedType:n}=ve(),[s,o]=m.useState([]),[a,c]=m.useState(!0),[p,l]=m.useState(null),d=m.useRef(0),f=m.useCallback(async()=>{const y=++d.current;c(!0),l(null);try{let h=0;const g=[];for(;;){const w=h*rt,k=w+rt-1,{data:_,error:N}=await ie.from("groups").select("*").is("archived_at",null).order("created_at",{ascending:!1}).order("id",{ascending:!1}).range(w,k);if(N)throw N;if(y!==d.current)return;if(!_||_.length===0||(g.push(..._),_.length<rt))break;h++}if(y!==d.current)return;o(g)}catch(h){if(y!==d.current)return;console.error("Chargement des groupes impossible.",h),l(h)}finally{y===d.current&&c(!1)}},[]),i=m.useCallback(y=>{y!=null&&y.id&&o(h=>{if(y.archived_at)return h.filter(k=>k.id!==y.id);const g=h.findIndex(k=>k.id===y.id);if(g===-1)return[y,...h];const w=h.slice();return w[g]={...w[g],...y},w})},[]),u=m.useCallback(y=>{y&&o(h=>h.filter(g=>g.id!==y))},[]);m.useEffect(()=>{if(!(e!=null&&e.user)){d.current+=1,o([]),c(!1);return}n&&(n==="admin"||n==="coordinatrice"?f():(o([]),c(!1)))},[(x=e==null?void 0:e.user)==null?void 0:x.id,n,f]);const v={groups:s,loading:a,error:p,refetchGroups:f,upsertGroup:i,removeGroup:u};return r.jsx(sn.Provider,{value:v,children:t})},ke=(t,e)=>{const n=((t==null?void 0:t.message)||"").toLowerCase();return n?n.includes("signups not allowed for otp")?"Nous n'avons pas pu vous envoyer de code. Si vous n'avez pas encore de compte, créez-le depuis « Créer un compte ».":n.includes("signups not allowed")||n.includes("signup is disabled")?"Les inscriptions ne sont pas ouvertes pour le moment. Ãcrivez à [email protected] pour obtenir un accès.":n.includes("already registered")||n.includes("already been registered")?"Si cette adresse ne possède pas encore de compte, un e-mail vient d'être envoyé.":n.includes("invalid login credentials")?"Email ou mot de passe incorrect.":n.includes("email not confirmed")?"Votre adresse n'est pas encore confirmée. Ouvrez le lien reçu par e-mail â pensez à regarder dans les indésirables.":n.includes("different from the old password")?"Le nouveau mot de passe doit être différent de l'ancien.":n.includes("password")&&(n.includes("at least")||n.includes("too short"))?"Le mot de passe est trop court : 8 caractères au minimum.":n.includes("auth session missing")||n.includes("session_not_found")?"Ce lien n'est plus valide. Demandez-en un nouveau depuis « Mot de passe oublié ».":n.includes("token has expired")||n.includes("otp_expired")||n.includes("invalid or has expired")?"Ce lien a expiré. Demandez-en un nouveau depuis « Mot de passe oublié ».":n.includes("invalid refresh token")||n.includes("jwt expired")?"Votre session a expiré. Veuillez vous reconnecter.":n.includes("invalid format")||n.includes("unable to validate email")?"Cette adresse e-mail n'est pas valide.":n.includes("for security purposes")||n.includes("after 60 seconds")?"Un e-mail vient déjà de partir. Patientez une minute avant de réessayer.":n.includes("email rate limit")||n.includes("over_email_send_rate_limit")?"Trop d'e-mails demandés pour le moment. Réessayez dans quelques minutes.":n.includes("rate limit")||n.includes("too many requests")?"Trop de tentatives. Patientez quelques minutes avant de réessayer.":n.includes("failed to fetch")||n.includes("networkerror")?"Problème de connexion internet. Vérifiez votre réseau puis réessayez.":(t==null?void 0:t.message)||e||"Une erreur est survenue.":e||"Une erreur est survenue."},Hr=t=>{const e=((t==null?void 0:t.message)||"").toLowerCase();return e.includes("token has expired")||e.includes("otp_expired")||e.includes("invalid or has expired")||e.includes("invalid token")||e.includes("otp_disabled")?"Ce co
180de est incorrect ou a expiré. Vérifiez les six chiffres, ou demandez-en un nouveau.":ke(t,"Ce code n'a pas pu être vérifié.")},Wo=t=>{const e=((t==null?void 0:t.message)||"").toLowerCase();return e.includes("already registered")||e.includes("already been registered")||e.includes("already in use")||e.includes("email_exists")?"Cette adresse est déjà associée à un compte. Si c'est un compte que vous aviez créé, écrivez à [email protected].":e.includes("should be different")&&e.includes("email")?"C'est déjà l'adresse de votre compte.":e.includes("email change")&&e.includes("rate")?"Une demande de changement vient déjà de partir. Patientez une minute avant de réessayer.":ke(t,"L'adresse n'a pas pu être changée.")},Go=(t,e)=>{const n=(t==null?void 0:t.message)||"";return e&&e!==n?e.slice(0,80):(t==null?void 0:t.code)||"non_traduit"},Yo=t=>{const e=String(t||"").replace(/^#/,"");if(!e)return null;const n=new URLSearchParams(e),s=n.get("error_code"),o=n.get("error"),a=n.get("error_description");return!s&&!o&&!a?null:s==="otp_expired"||/expired/i.test(a||"")?"Ce lien a expiré. Demandez-en un nouveau depuis « Mot de passe oublié ».":s==="access_denied"||o==="access_denied"?"Ce lien n'est plus valide â il a peut-être déjà été utilisé. Demandez-en un nouveau depuis « Mot de passe oublié ».":ke({message:(a||"").replace(/\+/g," ")},"Ce lien n'est pas valide. Demandez-en un nouveau depuis « Mot de passe oublié ».")},Vr=({title:t,subtitle:e,width:n="sm",children:s})=>r.jsx("div",{className:"flex min-h-screen flex-col items-center justify-center bg-gray-100 p-4",children:r.jsxs("div",{className:`w-full ${n==="md"?"max-w-md":"max-w-sm"}`,children:[r.jsx("div",{className:"mb-6 flex justify-center",children:r.jsx("img",{src:"/logo-rond.png",alt:"Prière des Mères",className:"h-24 w-24"})}),r.jsxs("div",{className:"w-full rounded-xl bg-white p-8 shadow-lg",children:[t&&r.jsx("h1",{className:"mb-2 text-center font-heading text-3xl font-bold text-gray-900",children:t}),e&&r.jsx("p",{className:"mb-8 text-center text-gray-700",children:e}),s]}),r.jsxs("p",{className:"mt-6 text-center text-xs text-gray-600",children:["Prière des Mères © ",new Date().getFullYear()]})]})}),st={},Rt={google:{id:"google",label:"Google",options:{}},azure:{id:"azure",label:"Microsoft",options:{scopes:"email"}}},Fr="google",on=t=>{const e=typeof t=="string"?t.trim():"";if(!e)return on(Fr);const n=e.toLowerCase().split(",").map(o=>o.trim()).filter(Boolean);if(n.includes("aucun")||n.includes("none"))return[];const s=new Set;return n.filter(o=>s.has(o)||!Rt[o]?!1:(s.add(o),!0)).map(o=>Rt[o])},qr=()=>on(st==null?void 0:st.VITE_AUTH_PROVIDERS),Ur=["inline-flex items-center justify-center gap-2","font-semibold rounded-md","transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-700 focus-visible:ring-offset-2","disabled:opacity-50 disabled:cursor-not-allowed"].join(" "),Pt={primary:"bg-brand-600 text-white hover:bg-brand-700 active:bg-brand-800",secondary:"bg-white text-gray-900 border border-line-strong hover:bg-gray-50 active:bg-gray-100",ghost:"bg-transparent text-gray-700 hover:bg-gray-100 hover:text-gray-900 active:bg-gray-200",danger:"bg-danger-600 text-white hover:bg-danger-700 active:bg-danger-700",success:"bg-success-600 text-white hover:bg-success-700 active:bg-success-700"},Mt={sm:"min-h-control-sm px-3 py-1.5 text-sm",md:"min-h-control px-4 py-2.5 text-sm",lg:"min-h-control px-6 py-3 text-base"},zt={sm:"min-h-control-sm min-w-control-sm p-1.5",md:"min-h-control min-w-control p-2.5",lg:"min-h-control min-w-control p-3"},Dt={sm:14,md:16,lg:18},he=m.forwardRef(function({as:e="button",variant:n="primary",size:s="md",iconOnly:o=!1,loading:a=!1,loadingLabel:c="Chargement en cours",disabled:p=!1,className:l="",children:d,type:f,...i},u){const v=e==="button",x=p||a,y=[Ur,Pt[n]??Pt.primary,o?zt[s]??zt.md:Mt[s]??Mt.md,l].filter(Boolean).join(" "),h=!v&&x?{"aria-disabled":!0,tabIndex:-1,onClick:g=>g.preventDefault()}:{};return r.jsxs(e,{ref:u,className:y,...v?{type:f??"button",disabled:x}:{},...a?{"aria-busy":!0}:{},...h,...i,children:[a&&r.jsx(Ce,{size:Dt[s]??Dt.md,className:"animate-spin motion-reduce:animate-none","aria-hidden":"true"}),d,a&&r.jsx("span",{className:"sr-only",children:c})]})}),Wr=()=>r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 48 48",className:"h-5 w-5","aria-hidden":"true",children:[r.jsx("path",{fill:"#FFC107",d:"M43.611,20.083H42V20H24v8h11.303c-1.649,4.657-6.08,8-11.303,8c-6.627,0-12-5.373-12-12c0-6.627,5.373-12,12-12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C12.955,4,4,12.955,4,24c0,11.045,8.955,20,20,20c11.045,0,20-8.955,20-20C44,22.659,43.862,21.35,43.611,20.083z"}),r.jsx("path",{fill:"#FF3D00",d:"M6.306,14.691l6.571,4.819C14.655,15.108,18.961,12,24,12c3.059,0,5.842,1.154,7.961,3.039l5.657-5.657C34.046,6.053,29.268,4,24,4C16.318,4,9.656,8.337,6.306,14.691z"}),r.jsx("path",{fill:"#4CAF50",d:"M24,44c5.166,0,9.86-1.977,13.409-5.192l-6.19-5.238C29.211,35.091,26.715,36,24,36c-5.223,0-9.651-3.358-11.303-8H6.306C9.656,35.663,16.318,40,24,40z"}),r.jsx("path",{fill:"#1976D2",d:"M43.611,20.083H42V20H24v8h11.303c-0.792,2.237-2.231,4.166-4.087,5.5
18071l6.19,5.238C43.021,36.251,44,30.433,44,24C44,22.659,43.862,21.35,43.611,20.083z"})]}),Gr=()=>r.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 23 23",className:"h-5 w-5","aria-hidden":"true",children:[r.jsx("path",{fill:"#F25022",d:"M1 1h10v10H1z"}),r.jsx("path",{fill:"#7FBA00",d:"M12 1h10v10H12z"}),r.jsx("path",{fill:"#00A4EF",d:"M1 12h10v10H1z"}),r.jsx("path",{fill:"#FFB900",d:"M12 12h10v10H12z"})]}),Yr={google:Wr,azure:Gr},Xr=({screen:t,redirectAfter:e=null,onError:n,disabled:s=!1})=>{const[o,a]=m.useState(null),c=qr();if(c.length===0)return null;const p=async l=>{a(l.id),n==null||n(""),ae("Auth Method Chosen",{method:l.id,screen:t});try{e&&e!=="/"&&sessionStorage.setItem("auth_redirect",e);const{error:d}=await ie.auth.signInWithOAuth({provider:l.id,options:{redirectTo:window.location.origin,...l.options}});if(d)throw d}catch(d){sessionStorage.removeItem("auth_redirect"),n==null||n(ke(d,`La connexion avec ${l.label} a échoué.`)),a(null)}};return r.jsx("div",{className:"space-y-3",children:c.map(l=>{const d=Yr[l.id],f=o===l.id;return r.jsxs(he,{variant:"secondary",size:"lg",onClick:()=>p(l),loading:f,loadingLabel:`Redirection vers ${l.label} en cours`,disabled:s||o!==null&&!f,className:"w-full",children:[!f&&d&&r.jsx(d,{}),"Continuer avec ",l.label]},l.id)})})},Bt={error:{classes:"bg-danger-bg text-danger-fg border-danger-fg/20",Icon:sr,role:"alert",prefix:"Erreur : "},success:{classes:"bg-success-bg text-success-fg border-success-fg/20",Icon:rr,role:"status",prefix:""},warning:{classes:"bg-warning-bg text-warning-fg border-warning-fg/20",Icon:mt,role:"status",prefix:"Attention : "},info:{classes:"bg-brand-50 text-brand-800 border-brand-700/20",Icon:lr,role:"status",prefix:""}},Ge=({tone:t="info",children:e,className:n=""})=>{const{classes:s,Icon:o,role:a,prefix:c}=Bt[t]??Bt.info;return r.jsxs("div",{role:a,className:`flex items-start gap-2.5 rounded-md border px-3 py-2.5 text-sm font-medium ${s} ${n}`,children:[r.jsx(o,{size:18,className:"mt-0.5 flex-shrink-0","aria-hidden":"true"}),r.jsxs("div",{children:[c&&r.jsx("span",{className:"sr-only",children:c}),e]})]})},ft=["w-full min-h-control px-3 py-2.5","bg-white text-gray-900 rounded-md","border placeholder:text-gray-700","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-700 focus-visible:ring-offset-1","disabled:bg-gray-100 disabled:text-gray-700 disabled:cursor-not-allowed"].join(" "),ht=t=>t?"border-danger-600 focus-visible:ring-danger-600":"border-line-strong hover:border-gray-600";function gt({label:t,help:e,error:n,required:s=!1,htmlFor:o,describedBy:a,children:c}){return r.jsxs("div",{className:"w-full",children:[r.jsxs("label",{htmlFor:o,className:"block text-sm font-medium text-gray-900 mb-1",children:[t,s&&r.jsxs(r.Fragment,{children:[r.jsx("span",{"aria-hidden":"true",className:"text-danger-fg",children:" *"}),r.jsx("span",{className:"sr-only",children:" (obligatoire)"})]})]}),e&&r.jsx("p",{id:`${a}-help`,className:"text-sm text-gray-600 mb-1.5",children:e}),c,n&&r.jsxs("p",{id:`${a}-error`,className:"mt-1.5 flex items-start gap-1.5 text-sm font-medium text-danger-fg",children:[r.jsx(nr,{size:16,className:"mt-0.5 flex-shrink-0","aria-hidden":"true"}),r.jsx("span",{children:n})]})]})}const vt=(t,e,n)=>{const s=[e&&`${t}-help`,n&&`${t}-error`].filter(Boolean);return s.length>0?s.join(" "):void 0},Ye=m.forwardRef(function({label:e,help:n,error:s,required:o,className:a="",id:c,...p},l){const d=m.useId(),f=c??d;return r.jsx(gt,{label:e,help:n,error:s,required:o,htmlFor:f,describedBy:f,children:r.jsx("input",{ref:l,id:f,required:o,"aria-invalid":s?!0:void 0,"aria-describedby":vt(f,n,s),className:`${ft} ${ht(!!s)} ${a}`,...p})})}),Jr=m.forwardRef(function({label:e,help:n,error:s,required:o,className:a="",id:c,...p},l){const d=m.useId(),f=c??d,[i,u]=m.useState(!1);return r.jsx(gt,{label:e,help:n,error:s,required:o,htmlFor:f,describedBy:f,children:r.jsxs("div",{className:"relative",children:[r.jsx("input",{ref:l,id:f,type:i?"text":"password",required:o,"aria-invalid":s?!0:void 0,"aria-describedby":vt(f,n,s),className:`${ft} ${ht(!!s)} pr-12 ${a}`,...p}),r.jsx("button",{type:"button",onClick:()=>u(v=>!v),"aria-label":i?"Masquer le mot de passe":"Afficher le mot de passe","aria-pressed":i,className:"absolute right-1 top-1/2 flex min-h-control-sm min-w-control-sm -translate-y-1/2 items-center justify-center rounded-md text-gray-700 hover:bg-gray-100 hover:text-gray-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-700",children:i?r.jsx(ir,{size:18,"aria-hidden":"true"}):r.jsx(ar,{size:18,"aria-hidden":"true"})})]})})}),Xo=m.forwardRef(function({label:e,help:n,error:s,required:o,className:a="",id:c,children:p,...l},d){const f=m.useId(),i=c??f;return r.jsx(gt,{label:e,help:n,error:s,required:o,htmlFor:i,describedBy:i,children:r.jsx("select",{ref:d,id:i,required:o,"aria-invalid":s?!0:void 0,"aria-describedby":vt(i,n,s),className:`${ft} ${ht(!!s)} ${a}`,...l,children:p})})}),Ot=["gmail.com","hotmail.fr","hotmail.com","yahoo.fr","yahoo.com","orange.fr","wanadoo.fr","free.fr","sfr.fr","neuf.fr","bbox.fr","laposte.net","outlook.fr","outlook.com","live.fr","live.com","icloud.com","me.com","club-internet.fr","aol.com","gmx.fr"],Kr=(t,e)=>{const n=Array.from({length:t.length+1},(s,o)=>[o,...Array(e.length).fill(0)]);for(let s=1;s<=e.length;s+=1)n[0][s]=s;for(let s=1;s<=t.length;s+=1)for(let o=1;o<=e.length;o+=1){const a=t[s-1]===e[o-1]?0:1;n[s][o]=Math.min(n[s-1][o]+1,n[s][o-1]+1,n[s-1][o-1]+a),s>1&&o>1&&t[s-1]===e[o-2]&&t[s-2]===e[o-1]&&(n[s][o]=Math.min(n[s][o],n[s-2][o-2]+1))}return n[t.length][e.length]},Zr=t=>t.length<=8?1:2,Qr=t=>{const e=String(t??"").trim().toLowerCase(),n=e.lastIndexOf("@");if(n<1)return null;const s=e.slice(0,n),o=e.slice(n+1);if(o.length<4||Ot.includes(o))return null;let a=null,c=1/0;for(const p of Ot){const l=Kr(o,p);l<c&&(a=p,c=l)}return c<=Zr(o)?`${s}@${a}`:null},es=(t,e,n)=>{const[s,o]=m.useState(null),[a,c]=m.useState(null),p=Qr(t),l=p!==null&&s===t,d=()=>{p===null||s===t||(o(t),ae("Email Suggestion Shown",{screen:n}))},f=()=>p===null||a===t?!0:(c(t),d(),!1),i=()=>{ae("Email Suggestion Accepted",{screen:n}),e(p),o(null)};return{onBlur:d,laisserPartir:f,element:l?r.jsxs("p",{className:"mt-2 text-sm text-gray-800",role:"status",children:["Vouliez-vous dire ",r.jsx("strong",{children:p})," ?"," ",r.jsx("button",{type:"button",onClick:i,className:"rounded-sm font-semibold text-brand-700 underline underline-offset-2 hover:text-brand-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-700",children:"Corriger"})]}):null}},ts=60,ns=({screen:t,allowCreate:e,withPhone:n=!1,initialEmail:s="",startAtCode:o=!1,showResend:a=!0,onVerified:c,onCancel:p,onEtapeChange:l})=>{const[d,f]=m.useState(o?"saisie":"demande"),[i,u]=m.useState(s),[v,x]=m.useState(""),[y,h]=m.useState(""),[g,w]=m.useState(""),[k,_]=m.useState(!1),[N,j]=m.useState(!1),[T,I]=m.useState(0),O=m.useRef(null),z=es(i,u,t);m.useEffect(()=>{if(T<=0)return;const R=setTimeout(()=>I(J=>J-1),1e3);return()=>clearTimeout(R)},[T]),m.useEffect(()=>{var R;d==="saisie"&&((R=O.current)==null||R.focus()),l==null||l(d)},[d]);const q=()=>i.trim().toLowerCase(),D=async(R=!1)=>
180{if(w(""),!(!R&&!z.laisserPartir())){if(n&&v.replace(/\D/g,"").length<10){w("Indiquez un numéro de téléphone à dix chiffres au minimum.");return}_(!0);try{const{error:J}=await ie.auth.signInWithOtp({email:q(),options:{shouldCreateUser:e,emailRedirectTo:window.location.origin,...n&&v.trim()?{data:{phone:v.trim()}}:{}}});if(J)throw J;ae("Code Requested",{screen:t,resend:R}),f("saisie"),I(ts)}catch(J){const L=ke(J,"L'envoi du code a échoué.");ae("Code Request Failed",{screen:t,reason:L.slice(0,80)}),w(L)}finally{_(!1)}}},B=async R=>{var L;R.preventDefault(),w("");const J=y.replace(/\D/g,"");if(J.length!==6){w("Le code compte six chiffres.");return}j(!0);try{const{error:$}=await ie.auth.verifyOtp({email:q(),token:J,type:"email"});if($)throw $;ae("Code Verified",{screen:t}),c==null||c()}catch($){const ee=Hr($);ae("Code Failed",{screen:t,reason:ee.slice(0,80)}),w(ee),h(""),(L=O.current)==null||L.focus()}finally{j(!1)}};return d==="saisie"?r.jsxs("div",{children:[a&&r.jsxs(r.Fragment,{children:[r.jsxs("p",{className:"mb-5 text-sm text-gray-800",children:["Un code à six chiffres vient d'être envoyé à ",r.jsx("strong",{children:q()}),"."]}),r.jsxs(Ge,{tone:"warning",className:"mb-5 text-left",children:["Vous ne le voyez pas ? Regardez dans vos ",r.jsx("strong",{children:"courriers indésirables"})," (ou « spam » : le message y arrive souvent)."]})]}),g&&r.jsx(Ge,{tone:"error",className:"mb-5",children:g}),r.jsxs("form",{onSubmit:B,className:"space-y-5",children:[r.jsx(Ye,{id:"code-otp",ref:O,label:"Code reçu par e-mail",inputMode:"numeric",autoComplete:"one-time-code",maxLength:6,placeholder:"123456",help:"Il est valable une heure.",className:"text-center text-2xl tracking-[0.4em]",value:y,onChange:R=>h(R.target.value.replace(/\D/g,"").slice(0,6)),required:!0}),r.jsx(he,{type:"submit",size:"lg",loading:N,loadingLabel:"Vérification du code en cours",className:"w-full",children:"Me connecter"})]}),a&&r.jsxs("div",{className:"mt-5 flex flex-col gap-2 text-center",children:[r.jsx(he,{variant:"ghost",size:"sm",onClick:()=>D(!0),loading:k,loadingLabel:"Nouvel envoi en cours",disabled:T>0,children:T>0?`Renvoyer un code (${T} s)`:"Renvoyer un code"}),r.jsx(he,{variant:"ghost",size:"sm",onClick:()=>{f("demande"),h(""),w("")},children:"Corriger mon adresse"})]})]}):r.jsxs("div",{children:[g&&r.jsx(Ge,{tone:"error",className:"mb-5",children:g}),r.jsxs("form",{onSubmit:R=>{R.preventDefault(),D(!1)},className:"space-y-5",children:[r.jsx(Ye,{id:"code-email",label:"Adresse e-mail",type:"email",autoComplete:"email",placeholder:"[email protected]",help:e?void 0:"Celle de votre compte. Nous vous enverrons un code à six chiffres.",value:i,onChange:R=>u(R.target.value),onBlur:z.onBlur,required:!0}),z.element,n&&r.jsx(Ye,{id:"code-phone",label:"Téléphone",type:"tel",inputMode:"tel",autoComplete:"tel",placeholder:"06 12 34 56 78",help:"Pour que votre coordinatrice puisse vous joindre.",value:v,onChange:R=>x(R.target.value),required:!0}),r.jsx(he,{type:"submit",size:"lg",loading:k,loadingLabel:"Envoi du code en cours",className:"w-full",children:"Recevoir un code"})]}),p&&r.jsx("div",{className:"mt-5 text-center",children:r.jsx(he,{variant:"ghost",size:"sm",onClick:p,children:"Utiliser une autre méthode"})})]})},rs="rounded-sm text-sm font-medium text-brand-700 underline underline-offset-2 hover:text-brand-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-700",ss=()=>{var y;const[t,e]=m.useState(""),[n,s]=m.useState(""),[o,a]=m.useState(""),[c,p]=m.useState(!1),[l,d]=m.useState(null),f=Re(),{user:i}=ve(),u=((y=f.state)==null?void 0:y.from)||"/";if(i)return r.jsx(le,{to:u,replace:!0});const v=async h=>{h.preventDefault(),p(!0),a("");try{const{error:g}=await ie.auth.signInWithPassword({email:t,password:n});a(g?ke(g,"La connexion a échoué."):"")}catch(g){a(ke(g,"La connexion a échoué."))}finally{p(!1)}},x=h=>{a(""),d(h),h&&ae("Auth Method Chosen",{method:h,screen:"login"})};return r.jsxs(Vr,{title:"Bienvenue",subtitle:"Connectez-vous à votre espace",children:[o&&r.jsx(Ge,{tone:"error",className:"mb-6",children:o}),l==="code"?r.jsx(ns,{screen:"login",allowCreate:!1,initialEmail:t,onCancel:()=>x(null)}):r.jsxs("div",{className:"space-y-4",children:[r.jsx(Xr,{screen:"login",redirectAfter:u,onError:a}),r.jsxs("div",{className:"relative flex items-center py-2",children:[r.jsx("span",{className:"flex-grow border-t border-line","aria-hidden":"true"}),r.jsx("span",{className:"mx-4 flex-shrink text-xs text-gray-600",children:"ou"}),r.jsx("span",{className:"flex-grow border-t border-line","aria-hidden":"true"})]}),l==="motdepasse"?r.jsxs("form",{onSubmit:v,className:"space-y-5",children:[r.jsx(Ye,{id:"email",label:"Adresse e-mail",type:"email",autoComplete:"username",placeholder:"[email protected]",value:t,onChange:h=>e(h.target.value),required:!0}),r.jsxs("div",{children:[r.jsx(Jr,{id:"password",label:"Mot de passe",autoComplete:"current-password",value:n,onChange:h=>s(h.target.value),required:!0}),r.jsx("p",{className:"mt-2 text-right",children:r.jsx(Xe,{to:"/forgot-password",className:rs,children:"Mot de passe oublié ?"})})]}),r.jsx(he,{type:"submit",size:"lg",loading:c,loadingLabel:"Connexion en cours",className:"w-full",children:c?"Connexionâ¦":"Se connecter"})]}):r.jsxs(r.Fragment,{children:[r.jsx(he,{variant:"secondary",size:"lg",onClick:()=>x("code"),className:"w-full",children:"Recevoir un code par e-mail"}),r.jsx("div",{className:"text-center",children:r.jsx(he,{variant:"ghost",size:"sm",onClick:()=>x("motdepasse"),children:"Utiliser mon mot de passe"})})]})]}),r.jsxs("p",{className:"mt-6 text-center text-sm text-gray-700",children:["Pas encore de compte ?"," ",r.jsx(Xe,{to:"/inscription",className:"rounded-sm font-semibold text-brand-700 underline underline-offset-2 hover:text-brand-800 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-700",children:"Créer mon compte"})]})]})},an=(t,e)=>{var s;const n=Array.isArray(e)?e:[];switch(t){case"admin":case"coordinatrice":return"/map";case"referente":return(s=n[0])!=null&&s.group_id?`/mon-groupe/${n[0].group_id}`:"/rattachement";default:return"/rattachement"}}
180,os=({savedRedirect:t})=>{const{user:e,context:n,contextLoaded:s,contextError:o,derivedType:a,myGroups:c,signOut:p,refreshContext:l}=ve(),d=s&&!n&&!o;return m.useEffect(()=>{d&&p()},[d,p]),e?d?r.jsx("div",{className:"h-screen flex items-center justify-center bg-gray-50",children:r.jsx(Ce,{className:"h-8 w-8 animate-spin text-brand-700"})}):o?r.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:r.jsxs("div",{className:"bg-white rounded-xl shadow-lg border border-gray-200 max-w-md w-full p-8 text-center",children:[r.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-amber-100 flex items-center justify-center mb-4",children:r.jsx(mt,{className:"text-amber-600",size:32})}),r.jsx("h1",{className:"font-heading text-xl font-semibold text-gray-800 mb-3",children:"Impossible de charger votre profil"}),r.jsx("p",{className:"text-gray-600 mb-6",children:"La connexion au serveur a échoué. Votre compte n'est pas en cause : vous restez connectée."}),r.jsxs("div",{className:"flex flex-col sm:flex-row gap-3 justify-center",children:[r.jsxs("button",{type:"button",onClick:()=>l(),className:"inline-flex items-center justify-center gap-2 min-h-control bg-brand-600 text-white font-semibold px-5 py-2.5 rounded-md hover:bg-brand-700 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-brand-700",children:[r.jsx(en,{size:18}),"Réessayer"]}),r.jsx("button",{type:"button",onClick:p,className:"px-5 py-2.5 rounded-lg text-gray-700 bg-gray-200 hover:bg-gray-300 transition-colors",children:"Se déconnecter"})]})]})}):!s||!n?r.jsx("div",{className:"h-screen flex items-center justify-center bg-gray-50",children:r.jsx(Ce,{className:"h-8 w-8 animate-spin text-brand-700"})}):t?r.jsx(le,{to:t,replace:!0}):r.jsx(le,{to:an(a,c),replace:!0}):r.jsx(le,{to:"/login",replace:!0})},W=({children:t})=>{const{user:e}=ve(),n=Re();return e?t:r.jsx(le,{to:"/login",replace:!0,state:{from:`${n.pathname}${n.search}`}})},Ae=({children:t})=>{const{context:e,contextLoaded:n,contextError:s,derivedType:o,myGroups:a}=ve();return s||n&&!e?r.jsx(le,{to:"/",replace:!0}):!n||!e?r.jsx("div",{className:"h-64 flex items-center justify-center",children:r.jsx(Ce,{className:"h-6 w-6 animate-spin text-brand-700"})}):o==="referente"&&a[0]?r.jsx(le,{to:`/mon-groupe/${a[0].group_id}`,replace:!0}):o==="utilisateur"?r.jsx(le,{to:"/rattachement",replace:!0}):t},$t=({children:t})=>{const{context:e,contextLoaded:n,derivedType:s}=ve();return!n||!e?r.jsx("div",{className:"h-64 flex items-center justify-center",children:r.jsx(Ce,{className:"h-6 w-6 animate-spin text-brand-700"})}):s==="coordinatrice"?r.jsx(le,{to:"/map",replace:!0}):t};function is(t){if(typeof document>"u")return;let e=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",e.appendChild(n),n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t))}const as=t=>{switch(t){case"success":return ds;case"info":return ps;case"warning":return us;case"error":return ms;default:return null}},ls=Array(12).fill(0),cs=({visible:t,className:e})=>b.createElement("div",{className:["sonner-loading-wrapper",e].filter(Boolean).join(" "),"data-visible":t},b.createElement("div",{className:"sonner-spinner"},ls.map((n,s)=>b.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${s}`})))),ds=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),us=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ps=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ms=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fs=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},b.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),b.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),hs=()=>{const[t,e]=b.useState(document.hidden);return b.useEffect(()=>{const n=()=>{e(document.hidden)};
vendor: 3,926 bytes, line 180
180return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),t};let ut=1;class gs{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const n=this.subscribers.indexOf(e);this.subscribers.splice(n,1)}),this.publish=e=>{this.subscribers.forEach(n=>n(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var n;const{message:s,...o}=e,a=typeof(e==null?void 0:e.id)=="number"||((n=e.id)==null?void 0:n.length)>0?e.id:ut++,c=this.toasts.find(l=>l.id===a),p=e.dismissible===void 0?!0:e.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),c?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...e,id:a,title:s}),{...l,...e,id:a,dismissible:p,title:s}):l):this.addToast({title:s,...o,dismissible:p,id:a}),a},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:e,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(s=>s({id:n.id,dismiss:!0}))}),e),this.message=(e,n)=>this.create({...n,message:e}),this.error=(e,n)=>this.create({...n,message:e,type:"error"}),this.success=(e,n)=>this.create({...n,type:"success",message:e}),this.info=(e,n)=>this.create({...n,type:"info",message:e}),this.warning=(e,n)=>this.create({...n,type:"warning",message:e}),this.loading=(e,n)=>this.create({...n,type:"loading",message:e}),this.promise=(e,n)=>{if(!n)return;let s;n.loading!==void 0&&(s=this.create({...n,promise:e,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(e instanceof Function?e():e);let a=s!==void 0,c;const p=o.then(async d=>{if(c=["resolve",d],b.isValidElement(d))a=!1,this.create({id:s,type:"default",message:d});else if(xs(d)&&!d.ok){a=!1;const i=typeof n.error=="function"?await n.error(`HTTP error! status: ${d.status}`):n.error,u=typeof n.description=="function"?await n.description(`HTTP error! status: ${d.status}`):n.description,x=typeof i=="object"&&!b.isValidElement(i)?i:{message:i};this.create({id:s,type:"error",description:u,...x})}else if(d instanceof Error){a=!1;const i=typeof n.error=="function"?await n.error(d):n.error,u=typeof n.description=="function"?await n.description(d):n.description,x=typeof i=="object"&&!b.isValidElement(i)?i:{message:i};this.create({id:s,type:"error",description:u,...x})}else if(n.success!==void 0){a=!1;const i=typeof n.success=="function"?await n.success(d):n.success,u=typeof n.description=="function"?await n.description(d):n.description,x=typeof i=="object"&&!b.isValidElement(i)?i:{message:i};this.create({id:s,type:"success",description:u,...x})}}).catch(async d=>{if(c=["reject",d],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(d):n.error,i=typeof n.description=="function"?await n.description(d):n.description,v=typeof f=="object"&&!b.isValidElement(f)?f:{message:f};this.create({id:s,type:"error",description:i,...v})}}).finally(()=>{a&&(this.dismiss(s),s=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((d,f)=>p.then(()=>c[0]==="reject"?f(c[1]):d(c[1])).catch(f));return typeof s!="string"&&typeof s!="number"?{unwrap:l}:Object.assign(s,{unwrap:l})},this.custom=(e,n)=>{const s=(n==null?void 0:n.id)||ut++;return this.create({jsx:e(s),id:s,...n}),s},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const Q=new gs,vs=(t,e)=>{const n=(e==null?void 0:e.id)||ut++;return Q.addToast({title:t,...e,id:n}),n},xs=t=>t&&typeof t=="object"&&"ok"in t&&typeof t.ok=="boolean"&&"status"in t&&typeof t.status=="number",ys=vs,bs=()=>Q.toasts,ws=()=>Q.getActiveToasts(),js=Object.assign(ys,{success:Q.success,info:Q.info,warning:Q.warning,error:Q.error,custom:Q.custom,message:Q.message,promise:Q.promise,dismiss:Q.dismiss,loading:Q.loading},{getHistory:bs,getToasts:ws});is
vendor: 4,787 bytes, line 180
180("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;
vendor: 10,086 bytes, line 180
180left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function
vendor: 9,056 bytes, line 180
180Fe(t){return t.label!==void 0}const Es=3,Cs="24px",ks="16px",Ht=4e3,_s=356,Ns=14,Ss=45,Ts=200;function pe(...t){return t.filter(Boolean).join(" ")}function Is(t){const[e,n]=t.split("-"),s=[];return e&&s.push(e),n&&s.push(n),s}const Ls=t=>{var e,n,s,o,a,c,p,l,d;const{invert:f,toast:i,unstyled:u,interacting:v,setHeights:x,visibleToasts:y,heights:h,index:g,toasts:w,expanded:k,removeToast:_,defaultRichColors:N,closeButton:j,style:T,cancelButtonStyle:I,actionButtonStyle:O,className:z="",descriptionClassName:q="",duration:D,position:B,gap:R,expandByDefault:J,classNames:L,icons:$,closeButtonAriaLabel:ee="Close toast"}=t,[be,ce]=b.useState(null),[we,De]=b.useState(null),[A,U]=b.useState(!1),[F,se]=b.useState(!1),[_e,H]=b.useState(!1),[Ne,Be]=b.useState(!1),[Oe,Se]=b.useState(!1),[xn,et]=b.useState(0),[yn,yt]=b.useState(0),Pe=b.useRef(i.duration||D||Ht),bt=b.useRef(null),me=b.useRef(null),bn=g===0,wn=g+1<=y,te=i.type,Te=i.dismissible!==!1,jn=i.className||"",En=i.descriptionClassName||"",$e=b.useMemo(()=>h.findIndex(S=>S.toastId===i.id)||0,[h,i.id]),Cn=b.useMemo(()=>{var S;return(S=i.closeButton)!=null?S:j},[i.closeButton,j]),wt=b.useMemo(()=>i.duration||D||Ht,[i.duration,D]),tt=b.useRef(0),Ie=b.useRef(0),jt=b.useRef(0),Le=b.useRef(null),[kn,_n]=B.split("-"),Et=b.useMemo(()=>h.reduce((S,G,Z)=>Z>=$e?S:S+G.height,0),[h,$e]),Ct=hs(),Nn=i.invert||f,nt=te==="loading";Ie.current=b.useMemo(()=>$e*R+Et,[$e,Et]),b.useEffect(()=>{Pe.current=wt},[wt]),b.useEffect(()=>{U(!0)},[]),b.useEffect(()=>{const S=me.current;if(S){const G=S.getBoundingClientRect().height;return yt(G),x(Z=>[{toastId:i.id,height:G,position:i.position},...Z]),()=>x(Z=>Z.filter(ne=>ne.toastId!==i.id))}},[x,i.id]),b.useLayoutEffect(()=>{if(!A)return;const S=me.current,G=S.style.height;S.style.height="auto";const Z=S.getBoundingClientRect().height;S.style.height=G,yt(Z),x(ne=>ne.find(K=>K.toastId===i.id)?ne.map(K=>K.toastId===i.id?{...K,height:Z}:K):[{toastId:i.id,height:Z,position:i.position},...ne])},[A,i.title,i.description,x,i.id,i.jsx,i.action,i.cancel]);const xe=b.useCallback(()=>{se(!0),et(Ie.current),x(S=>S.filter(G=>G.toastId!==i.id)),setTimeout(()=>{_(i)},Ts)},[i,_,x,Ie]);b.useEffect(()=>{if(i.promise&&te==="loading"||i.duration===1/0||i.type==="loading")return;let S;return k||v||Ct?(()=>{if(jt.current<tt.current){const ne=new Date().getTime()-tt.current;Pe.current=Pe.current-ne}jt.current=new Date().getTime()})():(()=>{Pe.current!==1/0&&(tt.current=new Date().getTime(),S=setTimeout(()=>{i.onAutoClose==null||i.onAutoClose.call(i,i),xe()},Pe.current))})(),()=>clearTimeout(S)},[k,v,i,te,Ct,xe]),b.useEffect(()=>{i.delete&&(xe(),i.onDismiss==null||i.onDismiss.call(i,i))},[xe,i.delete]);function Sn(){var S;if($!=null&&$.loading){var G;return b.createElement("div",{className:pe(L==null?void 0:L.loader,i==null||(G=i.classNames)==null?void 0:G.loader,"sonner-loader"),"data-visible":te==="loading"},$.loading)}return b.createElement(cs,{className:pe(L==null?void 0:L.loader,i==null||(S=i.classNames)==null?void 0:S.loader),visible:te==="loading"})}const Tn=i.icon||($==null?void 0:$[te])||as(te);var kt,_t;return b.createElement("li",{tabIndex:0,ref:me,className:pe(z,jn,L==null?void 0:L.toast,i==null||(e=i.classNames)==null?void 0:e.toast,L==null?void 0:L.default,L==null?void 0:L[te],i==null||(n=i.classNames)==null?void 0:n[te]),"data-sonner-toast":"","data-rich-colors":(kt=i.richColors)!=null?kt:N,"data-styled":!(i.jsx||i.unstyled||u),"data-mounted":A,"data-promise":!!i.promise,"data-swiped":Oe,"data-removed":F,"data-visible":wn,"data-y-position":kn,"data-x-position":_n,"data-index":g,"data-front":bn,"data-swiping":_e,"data-dismissible":Te,"data-type":te,"data-invert":Nn,"data-swipe-out":Ne,"data-swipe-direction":we,"data-expanded":!!(k||J&&A),"data-testid":i.testId,style:{"--index":g,"--toasts-before":g,"--z-index":w.length-g,"--offset":`${F?xn:Ie.current}px`,"--initial-height":J?"auto":`${yn}px`,...T,...i.style},onDragEnd:()=>{H(!1),ce(null),Le.current=null},onPointerDown:S=>{S.button!==2&&(nt||!Te||(bt.current=new Date,et(Ie.current),S.target.setPointerCapture(S.pointerId),S.target.tagName!=="BUTTON"&&(H(!0),Le.current={x:S.clientX,y:S.clientY})))},onPointerUp:()=>{var S,G,Z;if(Ne||!Te)return;Le.current=null;const ne=Number(((S=me.current)==null?void 0:S.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),He=Number(((G=me.current)==null?void 0:G.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),K=new Date().getTime()-((Z=bt.current)==null?void 0:Z.getTime()),oe=be==="x"?ne:He,Ve=Math.abs(oe)/K;if(Math.abs(oe)>=Ss||Ve>.11){et(Ie.current),i.onDismiss==null||i.onDismiss.call(i,i),De(be==="x"?ne>0?"right":"left":He>0?"down":"up"),xe(),Be(!0);return}else{var de,ue;(de=me.current)==null||de.style.setProperty("--swipe-amount-x","0px"),(ue=me.current)==null||ue.style.setProperty("--swipe-amount-y","0px")}Se(!1),H(!1),ce(null)},onPointerMove:S=>{var G,Z,ne;if(!Le.current||!Te||((G=window.getSelection())==null?void 0:G.toString().length)>0)return;const K=S.clientY-Le.current.y,oe=S.clientX-Le.current.x;var Ve;const de=(Ve=t.swipeDirections)!=null?Ve:Is(B);!be&&(Math.abs(oe)>1||Math.abs(K)>1)&&ce(Math.abs(oe)>Math.abs(K)?"x":"y");let ue={x:0,y:0};const Nt=je=>1/(1.5+Math.abs(je)/20);if(be==="y"){if(de.includes("top")||de.includes("bottom"))if(de.includes("top")&&K<0||de.includes("bottom")&&K>0)ue.y=K;else{const je=K*Nt(K);ue.y=Math.abs(je)<Math.abs(K)?je:K}}else if(be==="x"&&(de.includes("left")||de.includes("right")))if(de.includes("left")&&oe<0||de.includes("right")&&oe>0)ue.x=oe;else{const je=oe*Nt(oe);ue.x=Math.abs(je)<Math.abs(oe)?je:oe}(Math.abs(ue.x)>0||Math.abs(ue.y)>0)&&Se(!0),(Z=me.current)==null||Z.style.setProperty("--swipe-amount-x",`${ue.x}px`),(ne=me.current)==null||ne.style.setProperty("--swipe-amount-y",`${ue.y}px`)}},Cn&&!i.jsx&&te!=="loading"?b.createElement("button",{"aria-label":ee,"data-disabled":nt,"data-close-button":!0,onClick:nt||!Te?()=>{}:()=>{xe(),i.onDismiss==null||i.onDismiss.call(i,i)},className:pe(L==null?void 0:L.closeButton,i==null||(s=i.classNames)==null?void 0:s.closeButton)},(_t=$==null?void 0:$.close)!=null?_t:fs):null,(te||i.icon||i.promise)&&i.icon!==null&&(($==null?void 0:$[te])!==null||i.icon)?b.createElement("div",{"data-icon":"",className:pe(L==null?void 0:L.icon,i==null||(o=i.classNames)==null?void 0:o.icon)},i.promise||i.type==="loading"&&!i.icon?i.icon||Sn():null,i.type!=="loading"?Tn:null):null,b.createElement("div",{"data-content":"",className:pe(L==null?void 0:L.content,i==null||(a=i.classNames)==null?void 0:a.content)},b.createElement("div",{"data-title":"",className:pe(L==null?void 0:L.title,i==null||(c=i.classNames)==null?void 0:c.title)},i.jsx?i.jsx:typeof i.title=="function"?i.title():i.title),i.description?b.createElement("div",{"data-description":"",className:pe(q,En,L==null?void 0:L.description,i==null||(p=i.classNames)==null?void 0:p.description)},typeof i.description=="function"?i.description():i.description):null),b.isValidElement(i.cancel)?i.cancel:i.cancel&&Fe(i.cancel)?b.createElement("button",{"data-button":!0,"data-cancel":!0,style:i.cancelButtonStyle||I,onClick:S=>{Fe(i.cancel)&&Te&&(i.cancel.onClick==null||i.cancel.onClick.call(i.cancel,S),xe())},className:pe(L==null?void 0:L.cancelButton,i==null||(l=i.classNames)==null?void 0:l.cancelButton)},i.cancel.label):null,b.isValidElement(i.action)?i.action:i.action&&Fe(i.action)?b.createElement("button",{"data-button":!0,"data-action":!0,style:i.actionButtonStyle||O,onClick:S=>{Fe(i.action)&&(i.action.onClick==null||i.action.onClick.call(i.action,S),!S.defaultPrevented&&xe())},className:pe(L==null?void 0:L.actionButton,i==null||(d=i.classNames)==null?void 0:d.actionButton)},i.action.label):null)};function Vt(){if(typeof window>"u"||typeof document>"u")return"ltr";const t=document.documentElement.getAttribute("dir");return t==="auto"||!t?window.getComputedStyle(document.documentElement).direction:t}function As(t,e){const n={};return[t,e].forEach((s,o)=>{const a=o===1,c=a?"--mobile-offset":"--offset",p=a?ks:Cs;function l(d){["top","right","bottom","left"].forEach(f=>{n[`${c}-${f}`]=typeof d=="number"?`${d}px`:d})}typeof s=="number"||typeof s=="string"?l(s):typeof s=="object"?["top","right","bottom","left"].forEach(d=>{s[d]===void 0?n[`${c}-${d}`]=p:n[`${c}-${d}`]=typeof s[d]=="number"?`${s[d]}px`:s[d]}):l(p)}),n}const Rs=b.forwardRef(function(e,n){const{id:s,invert:o,position:a="bottom-right",hotkey:c=["altKey","KeyT"],expand:p,closeButton:l,className:d,offset:f,mobileOffset:i,theme:u="light",richColors:v,duration:x,style:y,visibleToasts:h=Es,toastOptions:g,dir:w=Vt(),gap:k=Ns,icons:_,containerAriaLabel:N="Notifications"}=e,[j,T]=b.useState([]),I=b.useMemo(()=>s?j.filter(A=>A.toasterId===s):j.filter(A=>!A.toasterId),[j,s]),O=b.useMemo(()=>Array.from(new Set([a].concat(I.filter(A=>A.position).map(A=>A.position)))),[I,a]),[z,q]=b.useState([]),[D,B]=b.useState(!1),[R,J]=b.useState(!1),[L,$]=b.useState(u!=="system"?u:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dar
180k":"light"),ee=b.useRef(null),be=c.join("+").replace(/Key/g,"").replace(/Digit/g,""),ce=b.useRef(null),we=b.useRef(!1),De=b.useCallback(A=>{T(U=>{var F;return(F=U.find(se=>se.id===A.id))!=null&&F.delete||Q.dismiss(A.id),U.filter(({id:se})=>se!==A.id)})},[]);return b.useEffect(()=>Q.subscribe(A=>{if(A.dismiss){requestAnimationFrame(()=>{T(U=>U.map(F=>F.id===A.id?{...F,delete:!0}:F))});return}setTimeout(()=>{Ln.flushSync(()=>{T(U=>{const F=U.findIndex(se=>se.id===A.id);return F!==-1?[...U.slice(0,F),{...U[F],...A},...U.slice(F+1)]:[A,...U]})})})}),[j]),b.useEffect(()=>{if(u!=="system"){$(u);return}if(u==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?$("dark"):$("light")),typeof window>"u")return;const A=window.matchMedia("(prefers-color-scheme: dark)");try{A.addEventListener("change",({matches:U})=>{$(U?"dark":"light")})}catch{A.addListener(({matches:F})=>{try{$(F?"dark":"light")}catch(se){console.error(se)}})}},[u]),b.useEffect(()=>{j.length<=1&&B(!1)},[j]),b.useEffect(()=>{const A=U=>{var F;if(c.every(H=>U[H]||U.code===H)){var _e;B(!0),(_e=ee.current)==null||_e.focus()}U.code==="Escape"&&(document.activeElement===ee.current||(F=ee.current)!=null&&F.contains(document.activeElement))&&B(!1)};return document.addEventListener("keydown",A),()=>document.removeEventListener("keydown",A)},[c]),b.useEffect(()=>{if(ee.current)return()=>{ce.current&&(ce.current.focus({preventScroll:!0}),ce.current=null,we.current=!1)}},[ee.current]),b.createElement("section",{ref:n,"aria-label":`${N} ${be}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},O.map((A,U)=>{var F;const[se,_e]=A.split("-");return I.length?b.createElement("ol",{key:A,dir:w==="auto"?Vt():w,tabIndex:-1,ref:ee,className:d,"data-sonner-toaster":!0,"data-sonner-theme":L,"data-y-position":se,"data-x-position":_e,style:{"--front-toast-height":`${((F=z[0])==null?void 0:F.height)||0}px`,"--width":`${_s}px`,"--gap":`${k}px`,...y,...As(f,i)},onBlur:H=>{we.current&&!H.currentTarget.contains(H.relatedTarget)&&(we.current=!1,ce.current&&(ce.current.focus({preventScroll:!0}),ce.current=null))},onFocus:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||we.current||(we.current=!0,ce.current=H.relatedTarget)},onMouseEnter:()=>B(!0),onMouseMove:()=>B(!0),onMouseLeave:()=>{R||B(!1)},onDragEnd:()=>B(!1),onPointerDown:H=>{H.target instanceof HTMLElement&&H.target.dataset.dismissible==="false"||J(!0)},onPointerUp:()=>J(!1)},I.filter(H=>!H.position&&U===0||H.position===A).map((H,Ne)=>{var Be,Oe;return b.createElement(Ls,{key:H.id,icons:_,index:Ne,toast:H,defaultRichColors:v,duration:(Be=g==null?void 0:g.duration)!=null?Be:x,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:o,visibleToasts:h,closeButton:(Oe=g==null?void 0:g.closeButton)!=null?Oe:l,interacting:R,position:A,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:De,toasts:I.filter(Se=>Se.position==H.position),heights:z.filter(Se=>Se.position==H.position),setHeights:q,expandByDefault:p,gap:k,expanded:D,swipeDirections:e.swipeDirections})})):null}))}),ye=({children:t})=>{const{user:e,context:n,contextLoaded:s,contextError:o,derivedType:a}=ve(),c=a==="admin",p=m.useRef(!1);return m.useEffect(()=>{s&&n&&!c&&!p.current&&(p.current=!0,js.error("Accès réservé aux administrateurs."))},[s,n,c]),e?o||s&&!n?r.jsx(le,{to:"/",replace:!0}):!s||!n?r.jsx("div",{className:"h-64 flex items-center justify-center",children:r.jsx(Ce,{className:"h-6 w-6 animate-spin text-brand-700"})}):c?t:r.jsx(le,{to:"/",replace:!0}):r.jsx(le,{to:"/login",replace:!0})},qe=Object.freeze({coordinatrice:"d82nfjvftfU",referente:"vQar5J5YDLc"}),Je=t=>{switch(t){case"coordinatrice":return qe.coordinatrice?{public:"coordinatrice",videoId:qe.coordinatrice}:null;case"referente":return qe.referente?{public:"referente",videoId:qe.referente}:null;default:return null}},Ps=t=>`https://www.youtube-nocookie.com/embed/${encodeURIComponent(t)}?rel=0`,Ms=({user:t,contextLoaded:e,derivedType:n,pathname:s})=>!t||!e||!Object.prototype.hasOwnProperty.call(t,"intro_video_seen_at")||t.intro_video_seen_at!==null||s==="/rattachement"?!1:Je(n)!==null,zs=[{to:"/admin/dashboard",Icone:Kn,libelle:"Statistiques"},{to:"/admin/accounts",Icone:or,libelle:"Suivi des comptes"},{to:"/admin/activity",Icone:Jn,libelle:"Journal d'activités"},{to:"/admin/emails",Icone:ur,libelle:"Relances"},{to:"/admin/import",Icone:gr,libelle:"Import de groupes"},{to:"/admin/triduums",Icone:er,libelle:"Gérer les 3 Jours"},{to:"/admin/users",Icone:cr,libelle:"Rôles et accès"}],Ds=({onRevoirVideo:t=null})=>{const{signOut:e,derivedType:n,myGroups:s}=ve(),o=Yt(),a=Re(),[c,p]=m.useState(!1),[l,d]=m.useState(()=>a.pathname.startsWith("/admin")),f=async()=>{await e(),o("/login")},i=()=>p(!1);m.useEffect(()=>{p(!1)},[a.pathname]);const u=({isActive:_})=>`flex items-center gap-3 px-4 py-3 rounded-lg text-base font-medium transition-colors ${_?"text-brand-800 bg-brand-100":"text-gray-600 hover:bg-gray-200 hover:text-gray-800"}`,v=({isActive:_})=>`flex items-center gap-3 px-4 py-2 rounded-lg text-sm font-medium transition-colors ${_?"text-brand-800 bg-brand-100":"text-gray-600 hover:bg-gray-200 hover:text-gray-800"}`,x=n==="admin",y=n==="referente",h=n==="utilisateur",g=()=>r.jsxs(r.Fragment,{children:[h&&r.jsxs(fe,{to:"/rattachement",className:u,onClick:i,children:[r.jsx(At,{size:16})," Retrouver mon groupe"]}),y&&s[0]&&r.jsxs(fe,{to:`/mon-groupe/${s[0].group_id}`,className:u,onClick:i,children:[r.jsx(At,{size:16})," Mon groupe"]}),!y&&!h&&r.jsxs(r.Fragment,{children:[r.jsxs(fe,{to:"/map",end:!0,className:u,onClick:i,children:[r.jsx(pr,{size:16})," Carte"]}),r.jsxs(fe,{to:"/groups",className:u,onClick:i,children:[r.jsx(dr,{size:16})," Liste des groupes"]})]}),y&&r.jsxs(fe,{to:"/questions",className:u,onClick:i,children:[r.jsx(Zn,{size:16})," Questions fréquentes"]}),!y&&!h&&r.jsxs(fe,{to:"/help",className:u,onClick:i,children:[r.jsx(Zt,{size:16})," Aide"]}),r.jsxs(fe,{to:"/3-jours-de-priere",className:u,onClick:i,children:[r.jsx(Qn,{size:16})," 3 Jours de Prière"]}),t&&Je(n)&&r.jsxs("button",{type:"button",onClick:()=>{i(),t()},className:`${u({isActive:!1})} w-full text-left`,children:[r.jsx(Qt,{size:16})," Vidéo de présentation"]}),x&&r.jsxs("div",{className:"mt-2 pt-2 border-t border-gray-200",children:[r.jsxs("button",{type:"button",onClick:()=>d(_=>!_),"aria-expanded":l,className:"flex items-center justify-between w-full px-4 py-2 rounded-lg text-xs font-semibold text-gray-600 uppercase tracking-wider hover:bg-gray-200 hover:text-gray-800 transition-colors",children:[r.jsxs("span",{className:"flex items-center gap-3",children:[r.jsx(hr,{size:16,"aria-hidden":"true"})," Administration"]}),r.jsx(tr,{size:16,"aria-hidden":"true",className:`transition-transform ${l?"rotate-180":""}`})]}),l&&r.jsx("div",{className:"mt-1 flex flex-col gap-0.5",children:zs.map(({to:_,Icone:N,libelle:j})=>r.jsxs(fe,{to:_,className:v,onClick:i,children:[r.jsx(N,{size:16})," ",j]},_))})]})]}),w=r.jsxs(fe,{to:"/profile",className:u,onClick:i,children:[r.jsx(vr,{size:16})," Mon compte"]}),k=r.jsxs(Xe,{to:an(n,s),onClick:i,className:"flex-shrink-0 flex items-center gap-3 rounded-lg focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-brand-700 focus-visible:ring-offset-2",children:[r.jsx("img",{src:"/logo-rond.png",alt:"",className:"h-10 w-10"}),r.jsx("span",{className:"font-heading text-xl font-bold text-gray-800",children:"Prière des Mères"})]});return r.jsxs(r.Fragment,{children:[r.jsxs("aside",{className:"hidden md:flex md:flex-col md:w-64 md:shrink-0 md:sticky md:top-0 md:h-screen bg-white border-r border-gray-200",children:[r.jsx("div",{className:"p-4 border-b border-gray-200",children:k}),r.jsx("nav",{className:"flex-1 overflow-y-auto flex flex-col gap-1 p-4",children:g()}),r.jsxs("div",{className:"p-4 border-t border-gray-200 flex flex-col gap-1",children:[w,r.jsxs("button",{onClick:f,className:"flex items-center gap-3 w-full px-4 py-3 rounded-lg text-base font-medium text-gray-600 hover:bg-red-100 hover:text-red-600 transition-colors",children:[r.jsx(Lt,{size:16})," Déconnexion"]})]})]}),r.jsxs("header",{className:"md:hidden bg-white/80 backdrop-blur-sm sticky top-0 z-40 border-b border-gray-200",children:[r.jsx("div",{className:"max-w-7xl mx-auto px-4 sm:px-6 lg:px-8",children:r.jsxs("div",{className:"flex justify-between items-center h-20",children:[k,r.jsxs("div",{className:"flex items-center gap-2",children:[r.jsx("button",{onClick:f,title:"Déconnexion",className:"p-2 rounded-full text-gray-700 hover:bg-red-100 hover:text-red-600 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-gray-100 focus:ring-red-500 transition-colors",children:r.jsx(Lt,{size:20})}),r.jsx("button",{onClick:()=>p(!c),className:"p-2 rounded-md text-gray-600 hover:bg-gray-200 focus:outline-none focus:ring-2 focus:ring-inset focus-visible:ring-brand-700","aria-expanded":c,"aria-controls":"mobile-nav","aria-label":c?"Fermer le menu":"Ouvrir le menu",children:c?r.jsx(xr,{size:24}):r.jsx(mr,{size:24})})]})]})}),c&&r.jsx("div",{id:"mobile-nav",className:"absolute top-full left-0 right-0 bg-white shadow-lg border-t border-gray-200 z-50",children:r.jsxs("nav",{className:"flex flex-col gap-1 p-4",children:[g(),w]})})]})]})},Bs=b.memo(Ds);let pt={},ln;function ot(t={}){pt={animate:!0,allowClose:!0,overlayClickBehavior:"close",overlayOpacity:.7,smoothScroll:!1,disableActiveInteraction:!1,showProgress:!1,stagePadding:10,stageRadius:5,popoverOffset:10,showButtons:["next","previous","close"],disableButtons:[],overlayColor:"#000",...t}}function E(t){return t?pt[t]:pt}function Os(t){ln=t}function re(){return ln}let Ke={};function Ue(t,e){Ke[t]=e}function Ee(t){var e;(e=Ke[t])==null||e.call(Ke)}function $s(){Ke={}}function We(t,e,n,s){return(t/=s/2)<1?n/2*t*t+e:-n/2*(--t*(t-2)-1)+e}function cn(t){const e='a[href]:not([disabled]), button:not([disabled]), textarea:not([disabled]), input[type="text"]:not([disabled]), input[type="radio"]:not([disabled]), input[type="checkbox"]:not([disabled]), select:not([disabled])';return t.flatMap(n=>{const s=n.matches(e),o=Array.from(n.querySelectorAll(e));
180return[...s?[n]:[],...o]}).filter(n=>getComputedStyle(n).pointerEvents!=="none"&&Fs(n))}function dn(t){if(!t||Vs(t))return;const e=E("smoothScroll"),n=t.offsetHeight>window.innerHeight;t.scrollIntoView({behavior:!e||Hs(t)?"auto":"smooth",inline:"center",block:n?"start":"center"})}function Hs(t){if(!t||!t.parentElement)return;const e=t.parentElement;return e.scrollHeight>e.clientHeight}function Vs(t){const e=t.getBoundingClientRect();return e.top>=0&&e.left>=0&&e.bottom<=(window.innerHeight||document.documentElement.clientHeight)&&e.right<=(window.innerWidth||document.documentElement.clientWidth)}function Fs(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}let Ze={};function X(t,e){Ze[t]=e}function C(t){return t?Ze[t]:Ze}function Ft(){Ze={}}function qs(t,e,n,s){let o=C("__activeStagePosition");const a=o||n.getBoundingClientRect(),c=s.getBoundingClientRect(),p=We(t,a.x,c.x-a.x,e),l=We(t,a.y,c.y-a.y,e),d=We(t,a.width,c.width-a.width,e),f=We(t,a.height,c.height-a.height,e);o={x:p,y:l,width:d,height:f},pn(o),X("__activeStagePosition",o)}function un(t){if(!t)return;const e=t.getBoundingClientRect(),n={x:e.x,y:e.y,width:e.width,height:e.height};X("__activeStagePosition",n),pn(n)}function Us(){const t=C("__activeStagePosition"),e=C("__overlaySvg");if(!t)return;if(!e){console.warn("No stage svg found.");return}const n=window.innerWidth,s=window.innerHeight;e.setAttribute("viewBox",`0 0 ${n} ${s}`)}function Ws(t){const e=Gs(t);document.body.appendChild(e),hn(e,n=>{n.target.tagName==="path"&&Ee("overlayClick")}),X("__overlaySvg",e)}function pn(t){const e=C("__overlaySvg");if(!e){Ws(t);return}const n=e.firstElementChild;if((n==null?void 0:n.tagName)!=="path")throw new Error("no path element found in stage svg");n.setAttribute("d",mn(t))}function Gs(t){const e=window.innerWidth,n=window.innerHeight,s=document.createElementNS("http://www.w3.org/2000/svg","svg");s.classList.add("driver-overlay","driver-overlay-animated"),s.setAttribute("viewBox",`0 0 ${e} ${n}`),s.setAttribute("xmlSpace","preserve"),s.setAttribute("xmlnsXlink","http://www.w3.org/1999/xlink"),s.setAttribute("version","1.1"),s.setAttribute("preserveAspectRatio","xMinYMin slice"),s.style.fillRule="evenodd",s.style.clipRule="evenodd",s.style.strokeLinejoin="round",s.style.strokeMiterlimit="2",s.style.zIndex="10000",s.style.position="fixed",s.style.top="0",s.style.left="0",s.style.width="100%",s.style.height="100%";const o=document.createElementNS("http://www.w3.org/2000/svg","path");return o.setAttribute("d",mn(t)),o.style.fill=E("overlayColor")||"rgb(0,0,0)",o.style.opacity=`${E("overlayOpacity")}`,o.style.pointerEvents="auto",o.style.cursor="auto",s.appendChild(o),s}function mn(t){const e=window.innerWidth,n=window.innerHeight,s=E("stagePadding")||0,o=E("stageRadius")||0,a=t.width+s*2,c=t.height+s*2,p=Math.min(o,a/2,c/2),l=Math.floor(Math.max(p,0)),d=t.x-s+l,f=t.y-s,i=a-l*2,u=c-l*2;return`M${e},0L0,0L0,${n}L${e},${n}L${e},0Z 181 M${d},${f} h${i} a${l},${l} 0 0 1 ${l},${l} v${u} a${l},${l} 0 0 1 -${l},${l} h-${i} a${l},${l} 0 0 1 -${l},-${l} v-${u} a${l},${l} 0 0 1 ${l},-${l} z`}function Ys(){const t=C("__overlaySvg");t&&t.remove()}function Xs(){const t=document.getElementById("driver-dummy-element");if(t)return t;let e=document.createElement("div");return e.id="driver-dummy-element",e.style.width="0",e.style.height="0",e.style.pointerEvents="none",e.style.opacity="0",e.style.position="fixed",e.style.top="50%",e.style.left="50%",document.body.appendChild(e),e}function qt(t){const{element:e}=t;let n=typeof e=="function"?e():typeof e=="string"?document.querySelector(e):e;n||(n=Xs()),Ks(n,t)}function Js(){const t=C("__activeElement"),e=C("__activeStep");t&&(un(t),Us(),vn(t,e))}function Ks(t,e){var n;const s=Date.now(),o=C("__activeStep"),a=C("__activeElement")||t,c=!a||a===t,p=t.id==="driver-dummy-element",l=a.id==="driver-dummy-element",d=E("animate"),f=e.onHighlightStarted||E("onHighlightStarted"),i=(e==null?void 0:e.onHighlighted)||E("onHighlighted"),u=(o==null?void 0:o.onDeselected)||E("onDeselected"),v=E(),x=C();!c&&u&&u(l?void 0:a,o,{config:v,state:x,driver:re()}),f&&f(p?void 0:t,e,{config:v,state:x,driver:re()});const y=!c&&d;let h=!1;no(),X("previousStep",o),X("previousElement",a),X("activeStep",e),X("activeElement",t);const g=()=>{if(C("__transitionCallback")!==g)return;const w=Date.now()-s,k=400-w<=400/2;e.popover&&k&&!h&&y&&(Ut(t,e),h=!0),E("animate")&&w<400?qs(w,400,a,t):(un(t),i&&i(p?void 0:t,e,{config:E(),state:C(),driver:re()}),X("__transitionCallback",void 0),X("__previousStep",o),X("__previousElement",a),X("__activeStep",e),X("__activeElement",t)),window.requestAnimationFrame(g)};X("__transitionCallback",g),window.requestAnimationFrame(g),dn(t),!y&&e.popover&&Ut(t,e),a.classList.remove("driver-active-element","driver-no-interaction"),a.removeAttribute("aria-haspopup"),a.removeAttribute("aria-expanded"),a.removeAttribute("aria-controls"),((n=e.disableActiveInteraction)!=null?n:E("disableActiveInteraction"))&&t.classList.add("driver-no-interaction"),t.classList.add("driver-active-element"),t.setAttribute("aria-haspopup","dialog"),t.setAttribute("aria-expanded","true"),t.setAttribute("aria-controls","driver-popover-content")}function Zs(){var t;(t=document.getElementById("driver-dummy-element"))==null||t.remove(),document.querySelectorAll(".driver-active-element").forEach(e
181=>{e.classList.remove("driver-active-element","driver-no-interaction"),e.removeAttribute("aria-haspopup"),e.removeAttribute("aria-expanded"),e.removeAttribute("aria-controls")})}function Me(){const t=C("__resizeTimeout");t&&window.cancelAnimationFrame(t),X("__resizeTimeout",window.requestAnimationFrame(Js))}function Qs(t){var e;if(!C("isInitialized")||!(t.key==="Tab"||t.keyCode===9))return;const n=C("__activeElement"),s=(e=C("popover"))==null?void 0:e.wrapper,o=cn([...s?[s]:[],...n?[n]:[]]),a=o[0],c=o[o.length-1];if(t.preventDefault(),t.shiftKey){const p=o[o.indexOf(document.activeElement)-1]||c;p==null||p.focus()}else{const p=o[o.indexOf(document.activeElement)+1]||a;p==null||p.focus()}}function fn(t){var e;((e=E("allowKeyboardControl"))==null||e)&&(t.key==="Escape"?Ee("escapePress"):t.key==="ArrowRight"?Ee("arrowRightPress"):t.key==="ArrowLeft"&&Ee("arrowLeftPress"))}function hn(t,e,n){const s=(o,a)=>{const c=o.target;t.contains(c)&&((!n||n(c))&&(o.preventDefault(),o.stopPropagation(),o.stopImmediatePropagation()),a==null||a(o))};document.addEventListener("pointerdown",s,!0),document.addEventListener("mousedown",s,!0),document.addEventListener("pointerup",s,!0),document.addEventListener("mouseup",s,!0),document.addEventListener("click",o=>{s(o,e)},!0)}function eo(){window.addEventListener("keyup",fn,!1),window.addEventListener("keydown",Qs,!1),window.addEventListener("resize",Me),window.addEventListener("scroll",Me)}function to(){window.removeEventListener("keyup",fn),window.removeEventListener("resize",Me),window.removeEventListener("scroll",Me)}function no(){const t=C("popover");t&&(t.wrapper.style.display="none")}function Ut(t,e){var n,s;let o=C("popover");o&&document.body.removeChild(o.wrapper),o=so(),document.body.appendChild(o.wrapper);const{title:a,description:c,showButtons:p,disableButtons:l,showProgress:d,nextBtnText:f=E("nextBtnText")||"Next →",prevBtnText:i=E("prevBtnText")||"← Previous",progressText:u=E("progressText")||"{current} of {total}"}=e.popover||{};o.nextButton.innerHTML=f,o.previousButton.innerHTML=i,o.progress.innerHTML=u,a?(o.title.innerHTML=a,o.title.style.display="block"):o.title.style.display="none",c?(o.description.innerHTML=c,o.description.style.display="block"):o.description.style.display="none";const v=p||E("showButtons"),x=d||E("showProgress")||!1,y=(v==null?void 0:v.includes("next"))||(v==null?void 0:v.includes("previous"))||x;o.closeButton.style.display=v.includes("close")?"block":"none",y?(o.footer.style.display="flex",o.progress.style.display=x?"block":"none",o.nextButton.style.display=v.includes("next")?"block":"none",o.previousButton.style.display=v.includes("previous")?"block":"none"):o.footer.style.display="none";const h=l||E("disableButtons")||[];h!=null&&h.includes("next")&&(o.nextButton.disabled=!0,o.nextButton.classList.add("driver-popover-btn-disabled")),h!=null&&h.includes("previous")&&(o.previousButton.disabled=!0,o.previousButton.classList.add("driver-popover-btn-disabled")),h!=null&&h.includes("close")&&(o.closeButton.disabled=!0,o.closeButton.classList.add("driver-popover-btn-disabled"));const g=o.wrapper;g.style.display="block",g.style.left="",g.style.top="",g.style.bottom="",g.style.right="",g.id="driver-popover-content",g.setAttribute("role","dialog"),g.setAttribute("aria-labelledby","driver-popover-title"),g.setAttribute("aria-describedby","driver-popover-description");const w=o.arrow;w.className="driver-popover-arrow";const k=((n=e.popover)==null?void 0:n.popoverClass)||E("popoverClass")||"";g.className=`driver-popover ${k}`.trim(),hn(o.wrapper,T=>{var I,O,z;const q=T.target,D=((I=e.popover)==null?void 0:I.onNextClick)||E("onNextClick"),B=((O=e.popover)==null?void 0:O.onPrevClick)||E("onPrevClick"),R=((z=e.popover)==null?void 0:z.onCloseClick)||E("onCloseClick");if(q.closest(".driver-popover-next-btn"))return D?D(t,e,{config:E(),state:C(),driver:re()}):Ee("nextClick");if(q.closest(".driver-popover-prev-btn"))return B?B(t,e,{config:E(),state:C(),driver:re()}):Ee("prevClick");if(q.closest(".driver-popover-close-btn"))return R?R(t,e,{config:E(),state:C(),driver:re()}):Ee("closeClick")},T=>!(o!=null&&o.description.contains(T))&&!(o!=null&&o.title.contains(T))&&typeof T.className=="string"&&T.className.includes("driver-popover")),X("popover",o);
181const _=((s=e.popover)==null?void 0:s.onPopoverRender)||E("onPopoverRender");_&&_(o,{config:E(),state:C(),driver:re()}),vn(t,e),dn(g);const N=t.classList.contains("driver-dummy-element"),j=cn([g,...N?[]:[t]]);j.length>0&&j[0].focus()}function gn(){const t=C("popover");if(!(t!=null&&t.wrapper))return;const e=t.wrapper.getBoundingClientRect(),n=E("stagePadding")||0,s=E("popoverOffset")||0;return{width:e.width+n+s,height:e.height+n+s,realWidth:e.width,realHeight:e.height}}function Wt(t,e){const{elementDimensions:n,popoverDimensions:s,popoverPadding:o,popoverArrowDimensions:a}=e;return t==="start"?Math.max(Math.min(n.top-o,window.innerHeight-s.realHeight-a.width),a.width):t==="end"?Math.max(Math.min(n.top-(s==null?void 0:s.realHeight)+n.height+o,window.innerHeight-(s==null?void 0:s.realHeight)-a.width),a.width):t==="center"?Math.max(Math.min(n.top+n.height/2-(s==null?void 0:s.realHeight)/2,window.innerHeight-(s==null?void 0:s.realHeight)-a.width),a.width):0}function Gt(t,e){const{elementDimensions:n,popoverDimensions:s,popoverPadding:o,popoverArrowDimensions:a}=e;return t==="start"?Math.max(Math.min(n.left-o,window.innerWidth-s.realWidth-a.width),a.width):t==="end"?Math.max(Math.min(n.left-(s==null?void 0:s.realWidth)+n.width+o,window.innerWidth-(s==null?void 0:s.realWidth)-a.width),a.width):t==="center"?Math.max(Math.min(n.left+n.width/2-(s==null?void 0:s.realWidth)/2,window.innerWidth-(s==null?void 0:s.realWidth)-a.width),a.width):0}function vn(t,e){const n=C("popover");if(!n)return;const{align:s="start",side:o="left"}=(e==null?void 0:e.popover)||{},a=s,c=t.id==="driver-dummy-element"?"over":o,p=E("stagePadding")||0,l=gn(),d=n.arrow.getBoundingClientRect(),f=t.getBoundingClientRect(),i=f.top-l.height;let u=i>=0;const v=window.innerHeight-(f.bottom+l.height);let x=v>=0;const y=f.left-l.width;let h=y>=0;const g=window.innerWidth-(f.right+l.width);let w=g>=0;const k=!u&&!x&&!h&&!w;let _=c;if(c==="top"&&u?w=h=x=!1:c==="bottom"&&x?w=h=u=!1:c==="left"&&h?w=u=x=!1:c==="right"&&w&&(h=u=x=!1),c==="over"){const N=window.innerWidth/2-l.realWidth/2,j=window.innerHeight/2-l.realHeight/2;n.wrapper.style.left=`${N}px`,n.wrapper.style.right="auto",n.wrapper.style.top=`${j}px`,n.wrapper.style.bottom="auto"}else if(k){const N=window.innerWidth/2-(l==null?void 0:l.realWidth)/2,j=10;n.wrapper.style.left=`${N}px`,n.wrapper.style.right="auto",n.wrapper.style.bottom=`${j}px`,n.wrapper.style.top="auto"}else if(h){const N=Math.min(y,window.innerWidth-(l==null?void 0:l.realWidth)-d.width),j=Wt(a,{elementDimensions:f,popoverDimensions:l,popoverPadding:p,popoverArrowDimensions:d});n.wrapper.style.left=`${N}px`,n.wrapper.style.top=`${j}px`,n.wrapper.style.bottom="auto",n.wrapper.style.right="auto",_="left"}else if(w){const N=Math.min(g,window.innerWidth-(l==null?void 0:l.realWidth)-d.width),j=Wt(a,{elementDimensions:f,popoverDimensions:l,popoverPadding:p,popoverArrowDimensions:d});n.wrapper.style.right=`${N}px`,n.wrapper.style.top=`${j}px`,n.wrapper.style.bottom="auto",n.wrapper.style.left="auto",_="right"}else if(u){const N=Math.min(i,window.innerHeight-l.realHeight-d.width);let j=Gt(a,{elementDimensions:f,popoverDimensions:l,popoverPadding:p,popoverArrowDimensions:d});n.wrapper.style.top=`${N}px`,n.wrapper.style.left=`${j}px`,n.wrapper.style.bottom="auto",n.wrapper.style.right="auto",_="top"}else if(x){const N=Math.min(v,window.innerHeight-(l==null?void 0:l.realHeight)-d.width);let j=Gt(a,{elementDimensions:f,popoverDimensions:l,popoverPadding:p,popoverArrowDimensions:d});n.wrapper.style.left=`${j}px`,n.wrapper.style.bottom=`${N}px`,n.wrapper.style.top="auto",n.wrapper.style.right="auto",_="bottom"}k?n.arrow.classList.add("driver-popover-arrow-none"):ro(a,_,t)}function ro(t,e,n){const s=C("popover");if(!s)return;const o=n.getBoundingClientRect(),a=gn(),c=s.arrow,p=a.width,l=window.innerWidth,d=o.width,f=o.left,i=a.height,u=window.innerHeight,v=o.top,x=o.height;c.className="driver-popover-arrow";let y=e,h=t;if(e==="top"?(f+d<=0?(y="right",h="end"):f+d-p<=0&&(y="top",h="start"),f>=l?(y="left",h="end"):f+p>=l&&(y="top",h="end")):e==="bottom"?(f+d<=0?(y="right",h="start"):f+d-p<=0&&(y="bottom",h="start"),f>=l?(y="left",h="start"):f+p>
181=l&&(y="bottom",h="end")):e==="left"?(v+x<=0?(y="bottom",h="end"):v+x-i<=0&&(y="left",h="start"),v>=u?(y="top",h="end"):v+i>=u&&(y="left",h="end")):e==="right"&&(v+x<=0?(y="bottom",h="start"):v+x-i<=0&&(y="right",h="start"),v>=u?(y="top",h="start"):v+i>=u&&(y="right",h="end")),!y)c.classList.add("driver-popover-arrow-none");else{c.classList.add(`driver-popover-arrow-side-${y}`),c.classList.add(`driver-popover-arrow-align-${h}`);const g=n.getBoundingClientRect(),w=c.getBoundingClientRect(),k=E("stagePadding")||0,_=g.left-k<window.innerWidth&&g.right+k>0&&g.top-k<window.innerHeight&&g.bottom+k>0;e==="bottom"&&_&&(w.x>g.x&&w.x+w.width<g.x+g.width?s.wrapper.style.transform="translateY(0)":(c.classList.remove(`driver-popover-arrow-align-${h}`),c.classList.add("driver-popover-arrow-none"),s.wrapper.style.transform=`translateY(-${k/2}px)`))}}function so(){const t=document.createElement("div");t.classList.add("driver-popover");const e=document.createElement("div");e.classList.add("driver-popover-arrow");const n=document.createElement("header");n.id="driver-popover-title",n.classList.add("driver-popover-title"),n.style.display="none",n.innerText="Popover Title";const s=document.createElement("div");s.id="driver-popover-description",s.classList.add("driver-popover-description"),s.style.display="none",s.innerText="Popover description is here";const o=document.createElement("button");o.type="button",o.classList.add("driver-popover-close-btn"),o.setAttribute("aria-label","Close"),o.innerHTML="×";const a=document.createElement("footer");a.classList.add("driver-popover-footer");const c=document.createElement("span");c.classList.add("driver-popover-progress-text"),c.innerText="";const p=document.createElement("span");p.classList.add("driver-popover-navigation-btns");const l=document.createElement("button");l.type="button",l.classList.add("driver-popover-prev-btn"),l.innerHTML="← Previous";const d=document.createElement("button");return d.type="button",d.classList.add("driver-popover-next-btn"),d.innerHTML="Next →",p.appendChild(l),p.appendChild(d),a.appendChild(c),a.appendChild(p),t.appendChild(o),t.appendChild(e),t.appendChild(n),t.appendChild(s),t.appendChild(a),{wrapper:t,arrow:e,title:n,description:s,footer:a,previousButton:l,nextButton:d,closeButton:o,footerButtons:p,progress:c}}function oo(){var t;const e=C("popover");e&&((t=e.wrapper.parentElement)==null||t.removeChild(e.wrapper))}function xt(t={}){ot(t);function e(){E("allowClose")&&f()}function n(){const u=E("overlayClickBehavior");if(E("allowClose")&&u==="close"){f();return}if(typeof u=="function"){const v=C("__activeStep"),x=C("__activeElement");u(x,v,{config:E(),state:C(),driver:re()});return}u==="nextStep"&&s()}function s(){const u=C("activeIndex"),v=E("steps")||[];if(typeof u>"u")return;const x=u+1;v[x]?d(x):f()}function o(){const u=C("activeIndex"),v=E("steps")||[];if(typeof u>"u")return;const x=u-1;v[x]?d(x):f()}function a(u){(E("steps")||[])[u]?d(u):f()}function c(){var u;if(C("__transitionCallback"))return;const v=C("activeIndex"),x=C("__activeStep"),y=C("__activeElement");if(typeof v>"u"||typeof x>"u"||typeof C("activeIndex")>"u")return;const h=((u=x.popover)==null?void 0:u.onPrevClick)||E("onPrevClick");if(h)return h(y,x,{config:E(),state:C(),driver:re()});o()}function p(){var u;if(C("__transitionCallback"))return;const v=C("activeIndex"),x=C("__activeStep"),y=C("__activeElement");if(typeof v>"u"||typeof x>"u")return;const h=((u=x.popover)==null?void 0:u.onNextClick)||E("onNextClick");if(h)return h(y,x,{config:E(),state:C(),driver:re()});s()}function l(){C("isInitialized")||(X("isInitialized",!0),document.body.classList.add("driver-active",E("animate")?"driver-fade":"driver-simple"),eo(),Ue("overlayClick",n),Ue("escapePress",e),Ue("arrowLeftPress",c),Ue("arrowRightPress",p))}function d(u=0){var v,x,y,h,g,w,k,_;const N=E("steps");if(!N){console.error("No steps to drive through"),f();return}if(!N[u]){f();return}X("__activeOnDestroyed",document.activeElement),X("activeIndex",u);const j=N[u],T=N[u+1],I=N[u-1],O=((v=j.popover)==null?void 0:v.doneBtnText)||E("doneBtnText")||"Done",z=E("allowClose"),q=typeof((x=j.popover)==null?void 0:x.showProgress)<"u"?(y=j.popover)==null?void 0:y.showProgress:E("showProgress"),D=(((h=j.popover)==null?void 0:h.progressText)||E("progressText")||"{{current}} of {{total}}").replace("{{current}}",`${u+1}`).replace("{{total}}",`${N.length}`),B=((g=j.popover)==null?void 0:g.showButtons)||E("showButtons"),R=["next","previous",...z?["close"]:[]].filter(ee=>!(B!=null&&B.length)||B.includes(ee)),J=((w=j.popover)==null?void 0:w.onNextClick)||E("onNextClick"),L=((k=j.popover)==null?void 0:k.onPrevClick)||E("onPrevClick"),$=((_=j.popover)==null?void 0:_.onCloseClick)||E("onCloseClick");qt({...j,popover:{showButtons:R,nextBtnText:T?void 0:O,disableButtons:[...I?[]:["previous"]],showProgress:q,progressText:D,onNextClick:J||(()=>{T?d(u+1):f()}),onPrevClick:L||(()=>{d(u-1)}),onCloseClick:$||(()=>{f()}),...(j==null?void 0:j.popover)||{}}})}function f(u=!0){const v=C("__activeElement"),x=C("__activeStep"),y=C("__activeOnDestroyed"),h=E("onDestroyStarted");if(u&&h){const k=!v||(v==null?void 0:v.id)==="driver-dummy-element";h(k?void 0:v,x,{config:E(),state:C(),driver:re()});return}const g=(x==null?void 0:x.onDeselected)||E("onDeselected"),w=E("onDestroyed");if(document.body.classList.remove("driver-active","driver-fade","driver-simple"),to(),oo(),Zs(),Ys(),$s(),Ft(),v&&x){const k=v.id==="driver-dummy-element";g&&g(k?void 0:v,x,{config:E(),state:C(),driver:re()}),w&&w(k?void 0:v,x,{config:E(),state:C(),driver:re()})}y&&y.focus()}const i={isActive:()=>C("isInitialized")||!1,refresh:Me,drive:(u=0)=>{l(),d(u)},setConfig:ot,setSteps:u=>{Ft(),ot({...E(),steps:u})},getConfig:E,getState:C,getActiveIndex:()=>C("activeIndex"),isFirstStep:()=>C("activeIndex")===0,isLastStep:()=>{const u=E("steps")||[],v=C("activeIndex");return v!==void 0&&v===u.length-1},getActiveStep:()=>C("activeStep"),getActiveElement:()=>C("activeElement"),getPreviousElement:()=>C("previousElement"),getPreviousStep:()=>C("previousStep"),moveNext:s,movePrevious:o,moveTo:a,hasNextStep:()=>{const u=E("steps")||[],v=C("activeIndex");return v!==void 0&&!!u[v+1]},hasPreviousStep:()=>{const u=E("steps")||[],v=C("activeIndex");return v!==void 0&&!!u[v-1]},highlight:u=>{l(),qt({...u,popover:u.popover?{showButtons:[],showProgress:!1,progressText:"",...u.popover}:void 0})},destroy:()=>{f(!1)}};return Os(i),i}const io=m.forwardRef((t,e)=>{const n=m.useCallback(()=>{const s=xt({showProgress:!0,allowClose:!0,nextBtnText:"Suivant",prevBtnText:"Précédent",doneBtnText:"Terminé",onDestroyStarted:()=>{s.destroy()},steps:[{popover:{title:"Bienvenue sur Prière des Mères !",description:"Suivez cette visite guidée pour découvrir les fonctionnalités principales de l'application.",align:"center"}},{element:"#map-container",popover:{title:"La Carte des Groupes",description:"Visualisez ici tous les groupes de prière. Les points gris signalent les groupes qui n'ont pas été confirmés depuis plus d'un an. Il convient dans ce cas là de s'assurer auprès des référentes qu'ils existent toujours.",side:"top",align:"start"}},{element:"#address-search-input",popover:{title:"Rechercher une Adresse",description:"Utilisez cette barre pour trouver une ville ou une adresse et centrer la carte dessus.",side:"bottom",align:"start"}},{element:".add-group-btn",popover:{title:"Ajouter un Groupe",description:"Cliquez sur ce bouton pour enregistrer un nouveau groupe de prière sur la carte.",side:"left",align:"center"}},{popover:{title:"Fin de la visite",description:"Vous êtes maintenant prête à explorer l'application. Bonne navigation !",align:"center"}}]});s.drive()},[]);return m.useImperativeHandle(e,()=>({startTour:n})),null}),ao=m.forwardRef((t,e)=>{const n=()=>{const s=xt({showProgress:!0,allowClose:!0,nextBtnText:"Suivant",prevBtnText:"Précédent",doneBtnText:"Terminé",onDestroyStarted:()=>{s.destroy()},steps:[{popover:{title:"Bienvenue dans la liste des groupes",description:"Cette visite rapide vous montre comment filtrer, explorer et gérer les groupes.",align:"center"}},{element:"#group-search",popover:{title:"Recherche",description:"Recherchez un groupe par prénom, nom, email ou ville.",side:"bottom",align:"start"}},{element:"#group-status-filter",popover:{title:"Filtre par statut",description:"Affichez uniquement les groupes actifs ou ceux à vérifier.",side:"bottom",align:"start"}},{element:"#group-list-results",popover:{title:"Résultats",description:"Le compteur indique le nombre de groupes affichés selon vos filtres.",side:"bottom",align:"start"}},{element:"#add-group-fab",popover:{title:"Ajouter un groupe",description:"Utilisez ce bouton pour créer un nouveau groupe.",side:"left",align:"center"}},{popover:{title:"Fin de la visite",description:"Vous êtes maintenant prêt(e) à utiliser l'application. Bonne navigation !"}}]});s.drive()};return m.useImperativeHandle(e,()=>({startTour:n})),null}),lo=m.forwardRef((t,e)=>{const n=()=>{const s=xt({showProgress:!0,allowClose:!0,nextBtnText:"Suivant",prevBtnText:"Précédent",doneBtnText:"Terminé",onDestroyStarted:()=>{s.destroy()},steps:[{popover:{title:"Fiche groupe",description:"Cette visite vous montre les actions principales de la fiche d'un groupe.",align:"center"}},{element:"#group-detail-title",popover:{title:"Informations du groupe",description:"Vous consultez ici les détails du groupe sélectionné.",side:"bottom",align:"start"}},{element:"#group-detail-edit-btn",popover:{title:"Modifier la fiche",description:"Ce bouton ouvre le mode édition du groupe.",side:"bottom",align:"center"}},{element:"#group-detail-copy-summary-btn",popover:{title:"Copier le résumé",description:"Copie un résumé du groupe pour le partager rapidement.",side:"bottom",align:"center"}},{element:"#group-detail-more-menu-btn",popover:{title:"Menu Plus",description:`Ce menu tient à l'écart l'action qu'on ne clique pas par mégarde. "Archiver" retire le groupe de la carte et de la liste, sans le supprimer : il reste restaurable. Pour qu'une référente mette sa fiche à jour elle-même, invitez-la à créer son compte depuis la section "Référente".`,side:"bottom",align:"center"}},{element:"#group-detail-map-btn",popover:{title:"Voir sur la carte",description:"Permet de centrer la carte directement sur ce groupe.",side:"left",align:"center"}},{element:"#group-detail-verify-card",popover:{title:"Statut du groupe",description:"Confirmez ici que le groupe se réunit toujours, ou déclarez-le interrompu ou arrêté. Chaque geste est inscrit dans lâactivité récente.",side:"top",align:"start"}},{popover:{title:"Fin de la visite",description:"Vous pouvez relancer cette visite à tout moment.",align:"center"}}]});s.drive()};return m.useImperativeHandle(e,()=>({startTour:n})),null}),co=({videoId:t,titre:e})=>r.jsx("div",{className:"relative w-full aspect-video overflow-hidden rounded-lg bg-gray-900",children:r.jsx("iframe",{src:Ps(t),title:e,className:"absolute inset-0 h-full w-full border-0",allow:"accelerometer; clipboard-write; encrypted-media; gyroscope; picture-in-picture;
181 web-share",referrerPolicy:"strict-origin-when-cross-origin",allowFullScreen:!0,loading:"lazy"})}),uo=t=>null,po={coordinatrice:"Découvrez en quelques minutes comment suivre les groupes de prière de vos départements.",referente:"Découvrez en quelques minutes comment tenir à jour la fiche de votre groupe et la liste de ses membres."},mo=({demandee:t=!1,onFermee:e=null})=>{const{user:n,contextLoaded:s,derivedType:o,applyProfilePatch:a}=ve(),{pathname:c,search:p}=Re(),l=uo(),[d,f]=m.useState(!1),i=m.useRef(null),u=m.useRef(null),v=m.useRef(null),x=m.useId(),y=m.useId(),h=l==="referente"||l==="coordinatrice"?l:o,g=!t&&!d&&(l?!!n&&s&&Je(h)!==null:Ms({user:n,contextLoaded:s,derivedType:o,pathname:c})),w=t||g,k=w?Je(h):null,_=(k==null?void 0:k.public)??null,N=t?"menu":"first_login",j=m.useCallback(async T=>{f(!0),e==null||e();const I=i.current?Math.round((Date.now()-i.current)/1e3):null;if(ae("Intro Video Dismissed",{audience:_,trigger:N,how:T,seconds_open:I}),t||l)return;a({intro_video_seen_at:new Date().toISOString()});const{error:O}=await ie.rpc("mark_intro_video_seen");O&&zr(O,{where:"mark_intro_video_seen",tags:{code:O.code}})},[_,N,t,l,a,e]);return m.useEffect(()=>{var O;if(!w)return;i.current=Date.now(),ae("Intro Video Shown",{audience:_,trigger:N}),(O=v.current)==null||O.focus();const T=z=>{var R;if(z.key==="Escape"){j("escape");return}if(z.key!=="Tab")return;const q=(R=u.current)==null?void 0:R.querySelectorAll("button:not([disabled]), iframe");if(!q||q.length===0)return;const D=q[0],B=q[q.length-1];z.shiftKey&&document.activeElement===D?(z.preventDefault(),B.focus()):!z.shiftKey&&document.activeElement===B&&(z.preventDefault(),D.focus())};document.addEventListener("keydown",T);const I=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.removeEventListener("keydown",T),document.body.style.overflow=I}},[w]),!w||!k?null:r.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-black bg-opacity-60 backdrop-blur-sm p-4",children:r.jsxs("div",{ref:u,role:"dialog","aria-modal":"true","aria-labelledby":x,"aria-describedby":y,className:"bg-white rounded-xl shadow-xl w-full max-w-3xl max-h-full overflow-y-auto p-5 sm:p-6",children:[r.jsxs("div",{className:"flex justify-between items-start gap-4",children:[r.jsxs("h2",{id:x,className:"font-heading text-2xl font-bold text-gray-800 flex items-center gap-2",children:[r.jsx(Qt,{className:"h-6 w-6 text-brand-600 shrink-0","aria-hidden":"true"}),t?"Vidéo de présentation":"Bienvenue !"]}),r.jsx("button",{type:"button",onClick:()=>j("close"),"aria-label":"Fermer",className:"text-gray-600 hover:text-gray-800 text-2xl leading-none",children:"Ã"})]}),r.jsx("p",{id:y,className:"mt-2 text-gray-600",children:po[_]}),r.jsx("div",{className:"mt-4",children:r.jsx(co,{videoId:k.videoId,titre:"Vidéo de présentation de l'application"})}),r.jsxs("div",{className:"mt-4 flex flex-col-reverse sm:flex-row sm:items-center sm:justify-between gap-3",children:[r.jsx("p",{className:"text-sm text-gray-600",children:t?"":"Vous la retrouverez à tout moment dans le menu, « Vidéo de présentation »."}),r.jsx("button",{type:"button",ref:v,onClick:()=>j("continue"),className:"px-4 py-2 rounded-md text-white bg-brand-600 hover:bg-brand-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-brand-700 shrink-0",children:t?"Retour à l'application":"Accéder à l'application"})]})]})})},Y=({children:t})=>{const e=Re(),n=Yt(),s=m.useRef(null),o=m.useRef(null),a=m.useRef(null),[c,p]=m.useState(!1),l=m.useCallback(()=>p(!0),[]),d=m.useCallback(()=>p(!1),[]),f=/^\/groups\/[^/]+$/.test(e.pathname),i=["/map","/groups"].includes(e.pathname)||f,u=["/map","/groups"].includes(e.pathname),v=u?"bottom-24":"bottom-6",x=m.useCallback(()=>{const{startTour:y,...h}=e.state||{};n({pathname:e.pathname,search:e.search},{replace:!0,state:h})},[e.pathname,e.search,e.state,n]);return m.useEffect(()=>{var g;if(!((g=e.state)!=null&&g.startTour))return;const y=e.pathname==="/map"?s:e.pathname==="/groups"?o:f?a:null;if(!(y!=null&&y.current))return;const h=setTimeout(()=>{y.current.startTour(),x()},500);return()=>clearTimeout(h)},[f,e.pathname,e.state,x]),m.useEffect(()=>{window.scrollTo({top:0,left:0,behavior:"auto"})},[e.pathname]),r.jsxs("div",{className:"flex flex-col md:flex-row min-h-screen bg-gray-50",children:[r.jsx(Bs,{onRevoirVideo:l}),r.jsx("main",{className:"flex-grow min-w-0",children:t}),i&&r.jsxs(r.Fragment,{children:[r.jsx("button",{onClick:()=>{n({pathname:e.pathname,search:e.search},{state:{...e.state,startTour:!0}})},className:`help-tour-btn fixed ${v} right-6 bg-brand-600 text-white p-4 rounded-full shadow-lg hover:bg-brand-700 hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-brand-700 transition-all duration-300 z-40 flex items-center justify-center`,"aria-label":"Lancer la visite guidée",title:"Lancer la visite guidée",children:r.jsx(Zt,{size:28})}),u&&r.jsx(Xe,{id:"add-group-fab",to:"/groups/new",className:"add-group-btn fixed bottom-6 right-6 bg-brand-600 text-white p-4 rounded-full shadow-lg hover:bg-brand-700 hover:scale-105 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-offset-white focus:ring-brand-700 transition-all duration-300 z-40 flex items-center justify-center","aria-label":"Ajouter un groupe",title:"Ajouter un groupe",children:r.jsx(fr,{size:28})})]}),r.jsx(io,{ref:s}),r.jsx(ao,{ref:o}),r.jsx(lo,{ref:a}),r.jsx(mo,{demandee:c,onFermee:d})]})},fo=m.lazy(()=>V(()=>import("./SignUp-_f9OFUsU.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]))),ho=m.lazy(()=>V(()=>import("./ForgotPassword-Br-H8hcz.js"),__vite__mapDeps([9,1,7,8]))),go=m.lazy(()=>V(()=>import("./UpdatePassword-BY6EOX7Z.js"),__vite__mapDeps([10,1,11,7,8]))),vo=m.lazy(()=>V(()=>import("./MyProfile-C8Sx_CXq.js"),__vite__mapDeps([12,1,13,14,15,7,8]))),xo=m.lazy(()=>V(()=>import("./CompleteProfile-lDOp09r4.js"),__vite__mapDeps([16,1,17,7,8]))),yo=m.lazy(()=>V(()=>import("./ClaimGroup-ZBXPtsVn.js"),__vite__mapDeps([18,1,17,19,20,2,5,21,22,7,8]))),bo=m.lazy(()=>V(()=>import("./MyGroup-BuPP7X7z.js"),__vite__mapDeps([23,1,24,20,2,5,21,22,25,26,27,28,14,29,17,30,31,19,32,33,15,7,8]))),wo=m.lazy(()=>V(()=>import("./QuestionsPage-CAe8W6rQ.js"),__vite__mapDeps([34,1,33,15,35,7,8]))),jo=m.lazy(()=>V(()=>import("./TriduumsPage-CkcQVkXm.js"),__vite__mapDeps([36,1,17,14,11,37,38,39,40,7,8]))),Eo=m.lazy(()=>V(()=>import("./MapContainer-B0eTmRoy.js"),__vite__mapDeps([41,1,30,26,14,42,2,17,22,21,37,38,11,43,44,7,8,45]))),
181Co=m.lazy(()=>V(()=>import("./GroupList-443Tm5WZ.js"),__vite__mapDeps([46,1,42,17,39,14,11,37,38,29,26,47,48,49,50,43,7,8]))),it=m.lazy(()=>V(()=>import("./GroupForm-AuGV4vUz.js"),__vite__mapDeps([51,1,13,2,17,19,24,25,26,27,28,14,29,30,31,22,52,4,5,53,15,33,21,32,43,50,6,44,54,35,7,8]))),ko=m.lazy(()=>V(()=>import("./HelpPage-BT90Re-d.js"),__vite__mapDeps([55,1,17,39,56,15,7,8]))),_o=m.lazy(()=>V(()=>import("./ExpiredUpdateLink-C0EIxPXP.js"),__vite__mapDeps([57,1,27,7,8]))),No=m.lazy(()=>V(()=>import("./RegistrationForm-CgpO5gE7.js"),__vite__mapDeps([58,1,13,2,3,53,5,4,28,56,21,54,44,32,15,33,7,8]))),So=m.lazy(()=>V(()=>import("./UserList-DS8PCM9z.js"),__vite__mapDeps([59,1,17,7,8]))),To=m.lazy(()=>V(()=>import("./TriduumAdmin-DjjeEwX3.js"),__vite__mapDeps([60,1,17,14,37,38,39,11,24,31,52,40,15,7,8]))),Io=m.lazy(()=>V(()=>import("./AccountsOverview-tfOauDsv.js"),__vite__mapDeps([61,1,17,39,62,38,43,50,22,48,40,49,7,8]))),Lo=m.lazy(()=>V(()=>import("./ImportGroups-BSoeHgZq.js"),__vite__mapDeps([63,1,24,2,17,62,7,8]))),Ao=m.lazy(()=>V(()=>import("./AdminDashboard-Bk_33zqK.js"),__vite__mapDeps([64,1,39,38,44,53,7,8]))),Ro=m.lazy(()=>V(()=>import("./ActivityLog-B1Jhcg3e.js"),__vite__mapDeps([65,1,38,49,40,47,48,7,8]))),Po=m.lazy(()=>V(()=>import("./EmailConsole-BCwjyIh0.js"),__vite__mapDeps([66,1,17,39,38,32,6,48,22,40,47,7,8]))),Mo=m.lazy(()=>V(()=>import("./Diagnose-dLYjOCry.js"),__vite__mapDeps([67,1,7,8]))),zo=m.lazy(()=>V(()=>import("./NotFound-DGttrxIo.js"),__vite__mapDeps([68,1,21,4,7,8]))),Do=()=>r.jsx("div",{className:"h-64 flex items-center justify-center",children:r.jsx(Ce,{className:"h-6 w-6 animate-spin text-brand-700","aria-label":"Chargement"})});function Bo(){const t=typeof sessionStorage<"u"?sessionStorage.getItem("auth_redirect"):null;return t&&sessionStorage.removeItem("auth_redirect"),r.jsx(Dr,{children:r.jsxs($r,{children:[r.jsx(Rs,{position:"top-right",richColors:!0}),r.jsx(m.Suspense,{fallback:r.jsx(Do,{}),children:r.jsx(Oo,{savedRedirect:t})})]})})}function Oo({savedRedirect:t}){const e=Re();return r.jsxs(An,{children:[r.jsx(M,{path:"/",element:r.jsx(os,{savedRedirect:t})}),r.jsx(M,{path:"/login",element:r.jsx(ss,{})}),r.jsx(M,{path:"/inscription",element:r.jsx(fo,{})}),r.jsx(M,{path:"/forgot-password",element:r.jsx(ho,{})}),r.jsx(M,{path:"/update-password",element:r.jsx(go,{})}),r.jsx(M,{path:"/update-request/:token",element:r.jsx(_o,{})}),r.jsx(M,{path:"/enregistrement",element:r.jsx(No,{})}),r.jsx(M,{path:"/completer-profil",element:r.jsx(W,{children:r.jsx(xo,{})})}),r.jsx(M,{path:"/rattachement",element:r.jsx(W,{children:r.jsx($t,{children:r.jsx(Y,{children:r.jsx(yo,{})})})})}),r.jsx(M,{path:"/mon-groupe/:id",element:r.jsx(W,{children:r.jsx($t,{children:r.jsx(Y,{children:r.jsx(bo,{})})})})}),r.jsx(M,{path:"/questions",element:r.jsx(W,{children:r.jsx(Y,{children:r.jsx(wo,{})})})}),r.jsx(M,{path:"/3-jours-de-priere",element:r.jsx(W,{children:r.jsx(Y,{children:r.jsx(jo,{})})})}),r.jsx(M,{path:"/map",element:r.jsx(W,{children:r.jsx(Ae,{children:r.jsx(Y,{children:r.jsx(Eo,{})})})})}),r.jsx(M,{path:"/groups",element:r.jsx(W,{children:r.jsx(Ae,{children:r.jsx(Y,{children:r.jsx(Co,{})})})})}),r.jsx(M,{path:"/groups/new",element:r.jsx(W,{children:r.jsx(Ae,{children:r.jsx(Y,{children:r.jsx(it,{},e.pathname)})})})}),r.jsx(M,{path:"/groups/:id",element:r.jsx(W,{children:r.jsx(Ae,{children:r.jsx(Y,{children:r.jsx(it,{},e.pathname)})})})}),r.jsx(M,{path:"/groups/:id/edit",element:r.jsx(W,{children:r.jsx(Ae,{children:r.jsx(Y,{children:r.jsx(it,{},e.pathname)})})})}),r.jsx(M,{path:"/help",element:r.jsx(W,{children:r.jsx(Ae,{children:r.jsx(Y,{children:r.jsx(ko,{})})})})}),r.jsx(M,{path:"/profile",element:r.jsx(W,{children:r.jsx(Y,{children:r.jsx(vo,{})})})}),r.jsx(M,{path:"/admin/users",element:r.jsx(W,{children:r.jsx(ye,{children:r.jsx(Y,{children:r.jsx(So,{})})})})}),r.jsx(M,{path:"/admin/accounts",element:r.jsx(W,{children:r.jsx(ye,{children:r.jsx(Y,{children:r.jsx(Io,{})})})})}),r.jsx(M,{path:"/admin/import",element:r.jsx(W,{children:r.jsx(ye,{children:r.jsx(Y,{children:r.jsx(Lo,{})})})})}),r.jsx(M,{path:"/admin/dashboard",element:r.jsx(W,{children:r.jsx(ye,{children:r.jsx(Y,{children:r.jsx(Ao,{})})})})}),r.jsx(M,{path:"/admin/activity",element:r.jsx(W,{children:r.jsx(ye,{children:r.jsx(Y,{children:r.jsx(Ro,{})})})})}),r.jsx(M,{path:"/admin/emails",element:r.jsx(W,{children:r.jsx(ye,{children:r.jsx(Y,{children:r.jsx(Po,{})})})})}),r.jsx(M,{path:"/admin/triduums",element:r.jsx(W,{children:r.jsx(ye,{children:r.jsx(Y,{children:r.jsx(To,{})})})})}),r.jsx(M,{path:"/diagnose",element:r.jsx(W,{children:r.jsx(ye,{children:r.jsx(Mo,{})})})}),r.jsx(M,{path:"*",element:r.jsx(zo,{})})]})}const $o=()=>r.jsx("div",{className:"min-h-screen bg-gray-50 flex items-center justify-center p-4",children:r.jsxs("div",{className:"bg-white rounded-xl shadow-lg border border-gray-200 max-w-md w-full p-8 text-center",children:[r.jsx("div",{className:"mx-auto w-16 h-16 rounded-full bg-amber-100 flex items-center justify-center mb-4",children:r.jsx(mt,{className:"text-amber-600",
181size:32})}),r.jsx("h1",{className:"font-heading text-xl font-semibold text-gray-800 mb-3",children:"Une erreur est survenue"}),r.jsx("p",{className:"text-gray-600 mb-6",children:"L'application n'a pas pu afficher cette page. L'incident a été signalé à l'équipe technique. Vous pouvez recharger pour reprendre où vous en étiez."}),r.jsxs("button",{type:"button",onClick:()=>window.location.reload(),className:"inline-flex items-center gap-2 min-h-control bg-brand-600 text-white font-semibold px-5 py-2.5 rounded-md hover:bg-brand-700 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-brand-700",children:[r.jsx(en,{size:18}),"Recharger la page"]})]})});Ar();lt.createRoot(document.getElementById("root")).render(r.jsx(b.StrictMode,{children:r.jsx(Bn,{fallback:r.jsx($o,{}),children:r.jsx(Rn,{children:r.jsx(Bo,{})})})}));export{Vr as A,he as B,rr as C,er as D,ns as E,gr as F,zr as G,lr as I,cr as K,Ce as L,ur as M,Jr as P,en as R,Xo as S,Ye as T,At as U,xr as X,es as a,Ge as b,Xr as c,mt as d,Yo as e,Wo as f,ke as g,Go as h,fr as i,r as j,P as k,ae as l,Lt as m,tr as n,Zn as o,Qn as p,pr as q,Uo as r,ie as s,js as t,ve as u,vr as v,ar as w,Jn as x,nr as y,or as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.