@lystech/sections 0.3.0 → 0.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/editeur.js CHANGED
@@ -1,190 +1,241 @@
1
- import { jsx as e, jsxs as b, Fragment as Q } from "react/jsx-runtime";
2
- import { createRoot as Z } from "react-dom/client";
3
- import { useState as k, useRef as F, useEffect as B, useCallback as H, useMemo as W } from "react";
4
- function se({
1
+ import { jsx as e, jsxs as f, Fragment as ne } from "react/jsx-runtime";
2
+ import { createRoot as oe } from "react-dom/client";
3
+ import { useState as L, useRef as H, useEffect as _, useCallback as J, useMemo as $ } from "react";
4
+ function me({
5
5
  jeton: n,
6
6
  site: t,
7
- apiBaseUrl: c,
7
+ apiBaseUrl: s,
8
8
  surJetonRefuse: r
9
9
  }) {
10
10
  const a = {
11
11
  "Content-Type": "application/json",
12
12
  Authorization: "Bearer " + n
13
13
  };
14
- function f(o, i) {
14
+ function d(o, i) {
15
15
  if (i && (o.status === 401 || o.status === 403) && r(), !o.ok) throw new Error(String(o.status));
16
16
  }
17
- async function u(o, i = !0) {
18
- const h = await fetch(c + o, {
17
+ async function l(o, i = !0) {
18
+ const x = await fetch(s + o, {
19
19
  headers: i ? a : void 0
20
20
  });
21
- return f(h, i), await h.json();
21
+ return d(x, i), await x.json();
22
22
  }
23
- async function m(o, i, h) {
24
- const g = await fetch(c + o, {
23
+ async function b(o, i, x) {
24
+ const v = await fetch(s + o, {
25
25
  method: i,
26
26
  headers: a,
27
- body: h === void 0 ? void 0 : JSON.stringify(h)
27
+ body: x === void 0 ? void 0 : JSON.stringify(x)
28
28
  });
29
- return f(g, !0), await g.json();
29
+ return d(v, !0), await v.json();
30
30
  }
31
31
  return {
32
32
  /** Les blocs que le site a déclaré savoir afficher. Route publique. */
33
- schemas: () => u("/site-sections/public/" + encodeURIComponent(t) + "/schemas", !1),
33
+ schemas: () => l("/site-sections/public/" + encodeURIComponent(t) + "/schemas", !1),
34
34
  /** Ce qui existe sur une page, brouillons compris. */
35
- pourPage: (o) => u("/site-sections?page=" + encodeURIComponent(o)),
36
- creer: (o, i, h) => m("/site-sections", "POST", { page: o, blockType: i, draft: h }),
37
- enregistrerBrouillon: (o, i) => m("/site-sections/" + o + "/draft", "PUT", { draft: i }),
38
- publier: (o) => m("/site-sections/" + o + "/publish", "POST"),
35
+ pourPage: (o) => l("/site-sections?page=" + encodeURIComponent(o)),
36
+ creer: (o, i, x) => b("/site-sections", "POST", { page: o, blockType: i, draft: x }),
37
+ enregistrerBrouillon: (o, i) => b("/site-sections/" + o + "/draft", "PUT", { draft: i }),
38
+ publier: (o) => b("/site-sections/" + o + "/publish", "POST"),
39
39
  /** Ramène le brouillon à ce qui est en ligne. */
40
- annuler: (o) => m("/site-sections/" + o + "/revert", "POST")
40
+ annuler: (o) => b("/site-sections/" + o + "/revert", "POST")
41
41
  };
42
42
  }
43
- function ce({
43
+ const fe = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEgAAABICAYAAABV7bNHAAAcRElEQVR42u2ce7RsV1Xmf3OuvetxHveZ3FxJI6gJYNKCrUhsEBO6AR8YQcc4B5BWpHWMYINNa2LTw4FUjt12awdfPUQbWm3wSZ/TNEgAQUwIJhgkvAx5ERJy87jhvs89z6rae605+4+1q06d5N68SJThyL5jj1tVp2pX7bnn/L5vfmutDU9uT25Pbk/gJk/48efmdPzsvPOchcsdxJ8M0MQX+MMFbmnRvl6DJk9kXC649NIL1o5ULwiVHFqu1+/75qc9fXnjwIljn3n1wSM6v5QeEBFlbk5YWrJTx/SfUoB6PWVhwc667D/+0fpw+sfLgyu49mORbKBDO1m05Z7o8Vb6m5+fQj734vOe8aV3/ebCiTQ+wFygd56zsGD/ZEvMez3d25m6ttadF9S33evF5kZRmoMFagpMHajR4aaVlu5U0etnS/vwzMm7rrn16qsPp8lSXFpK/1gByjjgrnhPH6fQCMDz1+NTY1E8s5oKobN/b6AoHFV3cdMiWpGGqR09hdCSYat77nqn8xOH6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Nyrqe44y/NI9tI9vUCgeg2JmrognN4IR3BV3KKu1/mzBUru03z/w0fde66ObELDkj0UE/mPdWEBYXFTm59O3vPyVT934kR96u13wnIvTbIt2qlM8sUp18z1w8ATx9vtIXz1BMHOKoOaio3U9iKN1IiSrNA5uaqf+Xz5l7+wHvvj+P/q0jeGhxyO1Lb7+bm4ytxhYmk8O4dvf+96fXTn3rMtqb5298pm7sL8/gB07SXuzpo2QgtOnphimAfXwpKfhobakW6bFP7dzdua6Z+r0jUtLv9kf42avxz/UbSue2DsZuAuaJwzOXfmus+9YLV/Y//Q9T+PwkR1FGboUnqxOwxjTsZTsK8Vw9f5CqsMvbdmx31pa6m9D2gsvLLjoIvt6uJ/HE1Fy4YFXRR7JDVLm5sI/1i0p/sHuH7Qtm5aWlCWApVO/Z+sGTHw93SLnye3J7cntCdv+P7oWqdEFC8mjAAAAAElFTkSuQmCC", be = {
44
+ apiKey: "AIzaSyCpAeHlt1wZvM5KtYg7X7MDVnWVJT86gvc",
45
+ authDomain: "lystech.firebaseapp.com",
46
+ projectId: "lystech",
47
+ storageBucket: "lystech.appspot.com",
48
+ messagingSenderId: "237347321732",
49
+ appId: "1:237347321732:web:7f9586d48e488d73ddcfd1"
50
+ };
51
+ function ge() {
52
+ return /* @__PURE__ */ f("span", { className: "marque", children: [
53
+ /* @__PURE__ */ e("img", { src: fe, alt: "", width: 22, height: 22 }),
54
+ /* @__PURE__ */ e("span", { className: "marque__mot", children: "Lystech" })
55
+ ] });
56
+ }
57
+ function xe() {
58
+ return /* @__PURE__ */ f("svg", { viewBox: "0 0 18 18", "aria-hidden": "true", focusable: "false", className: "logo", children: [
59
+ /* @__PURE__ */ e("path", { fill: "#4285F4", d: "M17.64 9.2c0-.64-.06-1.25-.16-1.84H9v3.48h4.84a4.14 4.14 0 0 1-1.8 2.72v2.26h2.91c1.7-1.57 2.69-3.88 2.69-6.62z" }),
60
+ /* @__PURE__ */ e("path", { fill: "#34A853", d: "M9 18c2.43 0 4.47-.8 5.96-2.18l-2.91-2.26c-.81.54-1.84.86-3.05.86-2.34 0-4.33-1.58-5.04-3.71H.96v2.33A9 9 0 0 0 9 18z" }),
61
+ /* @__PURE__ */ e("path", { fill: "#FBBC05", d: "M3.96 10.71a5.41 5.41 0 0 1 0-3.42V4.96H.96a9 9 0 0 0 0 8.08l3-2.33z" }),
62
+ /* @__PURE__ */ e("path", { fill: "#EA4335", d: "M9 3.58c1.32 0 2.5.45 3.44 1.35l2.58-2.59C13.46.89 11.43 0 9 0A9 9 0 0 0 .96 4.96l3 2.33C4.67 5.16 6.66 3.58 9 3.58z" })
63
+ ] });
64
+ }
65
+ function he() {
66
+ return /* @__PURE__ */ e("svg", { viewBox: "0 0 24 24", "aria-hidden": "true", focusable: "false", className: "logo", children: /* @__PURE__ */ e(
67
+ "path",
68
+ {
69
+ fill: "#fff",
70
+ d: "M22 12.06C22 6.5 17.52 2 12 2S2 6.5 2 12.06c0 5.02 3.66 9.18 8.44 9.94v-7.03H7.9v-2.91h2.54V9.85c0-2.52 1.49-3.91 3.77-3.91 1.09 0 2.24.2 2.24.2v2.46h-1.26c-1.24 0-1.63.78-1.63 1.57v1.89h2.78l-.45 2.91h-2.33V22c4.78-.76 8.44-4.92 8.44-9.94z"
71
+ }
72
+ ) });
73
+ }
74
+ function ve({
44
75
  site: n,
45
76
  apiBaseUrl: t,
46
- surJeton: c,
47
- surFermer: r
77
+ methodes: s = ["google", "facebook"],
78
+ surJeton: r,
79
+ surFermer: a
48
80
  }) {
49
- const [a, f] = k(""), [u, m] = k(""), [o, i] = k({ nom: "repos" }), h = async (v) => {
50
- if (!a || !u) {
51
- i({ nom: "erreur", texte: "Entrez votre adresse et votre mot de passe." });
52
- return;
81
+ const [d, l] = L({ nom: "repos" }), b = (v) => {
82
+ switch (v) {
83
+ case "auth/popup-blocked":
84
+ return "Votre navigateur a bloqué la fenêtre de connexion. Autorisez les fenêtres pour ce site, puis réessayez.";
85
+ case "auth/popup-closed-by-user":
86
+ case "auth/cancelled-popup-request":
87
+ return "Connexion annulée.";
88
+ case "auth/unauthorized-domain":
89
+ return "Ce domaine n'est pas encore autorisé côté Lystech. Prévenez la personne qui gère le site.";
90
+ case "auth/account-exists-with-different-credential":
91
+ return "Cette adresse est déjà associée à un autre mode de connexion. Essayez l'autre bouton.";
92
+ case "auth/network-request-failed":
93
+ return "Connexion au réseau impossible. Vérifiez votre lien Internet.";
94
+ default:
95
+ return "La connexion a échoué. Réessayez dans un instant.";
53
96
  }
54
- i({ nom: "envoi" });
55
- try {
56
- const S = await fetch(t + "/site-sections/edit-login", {
57
- method: "POST",
58
- headers: { "Content-Type": "application/json" },
59
- body: JSON.stringify({ site: n, email: a, password: u, demanderAcces: v })
97
+ }, o = async (v, A = !1) => {
98
+ const T = await fetch(t + "/site-sections/edit-login/third-party", {
99
+ method: "POST",
100
+ headers: { "Content-Type": "application/json" },
101
+ body: JSON.stringify({
102
+ site: n,
103
+ token: v,
104
+ tokenType: "firebase",
105
+ demanderAcces: A
106
+ })
107
+ });
108
+ if (T.status === 429) {
109
+ l({
110
+ nom: "erreur",
111
+ texte: "Trop de tentatives. Réessayez dans quelques minutes."
60
112
  });
61
- if (S.status === 429) {
62
- i({
63
- nom: "erreur",
64
- texte: "Trop de tentatives. Réessayez dans quelques minutes."
65
- });
113
+ return;
114
+ }
115
+ const y = await T.json().catch(() => null);
116
+ if (y?.ok && y?.token) {
117
+ r(y.token);
118
+ return;
119
+ }
120
+ switch (y?.raison) {
121
+ case "sans_acces":
122
+ l({ nom: "sans-acces", jeton: v });
66
123
  return;
67
- }
68
- const _ = await S.json().catch(() => null);
69
- if (_?.ok && _?.token) {
70
- c(_.token);
124
+ case "demande_envoyee":
125
+ l({ nom: "demande-envoyee" });
71
126
  return;
72
- }
73
- if (_?.raison === "sans_acces") {
74
- i({ nom: "sans-acces" });
127
+ case "trop_de_demandes":
128
+ l({
129
+ nom: "erreur",
130
+ texte: "Trop de demandes aujourd'hui. Réessayez demain."
131
+ });
75
132
  return;
76
- }
77
- if (_?.raison === "demande_envoyee") {
78
- i({ nom: "demande-envoyee" });
133
+ case "aucun_compte":
134
+ l({ nom: "aucun-compte", adresse: "" });
79
135
  return;
80
- }
81
- if (_?.raison === "trop_de_demandes") {
82
- i({
136
+ case "adresse_non_verifiee":
137
+ l({
83
138
  nom: "erreur",
84
- texte: "Trop de demandes aujourd'hui. Réessayez demain."
139
+ texte: "Votre fournisseur n'a pas confirmé cette adresse courriel. Vérifiez-la chez lui, puis réessayez."
85
140
  });
86
141
  return;
87
- }
88
- i({
89
- nom: "erreur",
90
- texte: "Adresse ou mot de passe incorrect."
91
- });
92
- } catch {
93
- i({
94
- nom: "erreur",
95
- texte: "Connexion au serveur impossible. Vérifiez votre réseau."
96
- });
142
+ default:
143
+ l({
144
+ nom: "erreur",
145
+ texte: "La connexion a échoué. Réessayez dans un instant."
146
+ });
97
147
  }
98
- }, g = o.nom === "envoi";
99
- return /* @__PURE__ */ e("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ b("div", { className: "fenetre", children: [
100
- /* @__PURE__ */ b("div", { className: "panneau__tete", children: [
101
- /* @__PURE__ */ b("div", { style: { flex: 1 }, children: [
102
- /* @__PURE__ */ e("h2", { className: "panneau__titre", children: "Modifier ce site" }),
103
- /* @__PURE__ */ e("p", { className: "panneau__sous", children: "Vous vous connectez à Lystech. Cet accès ne sert qu'à modifier le contenu de ce site." })
104
- ] }),
105
- /* @__PURE__ */ e(
148
+ }, i = async (v) => {
149
+ l({ nom: "envoi", quoi: v });
150
+ try {
151
+ const [{ initializeApp: A, getApps: T }, y] = await Promise.all([
152
+ import("./morceaux/index.esm-B4AB50RA.js"),
153
+ import("./morceaux/index.esm-B4hL1FOE.js")
154
+ ]), P = T().find((U) => U.name === "lystech-edition") ?? A(be, "lystech-edition"), Q = v === "google" ? new y.GoogleAuthProvider() : new y.FacebookAuthProvider(), N = await (await y.signInWithPopup(y.getAuth(P), Q)).user.getIdToken();
155
+ await o(N);
156
+ } catch (A) {
157
+ l({ nom: "erreur", texte: b(String(A?.code ?? "")) });
158
+ }
159
+ }, x = d.nom === "envoi";
160
+ return /* @__PURE__ */ e("div", { className: "voile", role: "dialog", "aria-modal": "true", "aria-label": "Modifier ce site", children: /* @__PURE__ */ f("div", { className: "fenetre", children: [
161
+ /* @__PURE__ */ e(
162
+ "button",
163
+ {
164
+ type: "button",
165
+ className: "fenetre__fermer",
166
+ onClick: a,
167
+ "aria-label": "Fermer",
168
+ children: "✕"
169
+ }
170
+ ),
171
+ /* @__PURE__ */ f("div", { className: "fenetre__tete", children: [
172
+ /* @__PURE__ */ e(ge, {}),
173
+ /* @__PURE__ */ e("h2", { className: "fenetre__titre", children: "Modifier ce site" }),
174
+ /* @__PURE__ */ e("p", { className: "fenetre__sous", children: "Vous vous connectez à Lystech. Cet accès ne sert qu'à modifier le contenu de ce site." })
175
+ ] }),
176
+ /* @__PURE__ */ f("div", { className: "fenetre__corps", children: [
177
+ d.nom === "erreur" && /* @__PURE__ */ e("p", { className: "message message--erreur", children: d.texte }),
178
+ d.nom === "aucun-compte" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun compte Lystech ne correspond à cette adresse. Adressez-vous à la personne responsable du site." }),
179
+ d.nom === "sans-acces" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Vous êtes bien reconnu, mais vous n'avez pas encore le droit de modifier ce site. Vous pouvez le demander : la personne responsable recevra un courriel." }),
180
+ d.nom === "demande-envoyee" && /* @__PURE__ */ e("p", { className: "message message--ok", children: "Demande envoyée. La personne responsable du site vous répondra." }),
181
+ d.nom === "sans-acces" ? /* @__PURE__ */ e(
106
182
  "button",
107
183
  {
108
184
  type: "button",
109
- className: "bouton bouton--icone bouton--discret",
110
- onClick: r,
111
- "aria-label": "Fermer",
112
- children: "✕"
185
+ className: "bouton bouton--principal bouton--large",
186
+ onClick: () => {
187
+ o(d.jeton, !0);
188
+ },
189
+ children: "Demander l'accès"
113
190
  }
114
- )
115
- ] }),
116
- /* @__PURE__ */ b(
117
- "form",
118
- {
119
- className: "panneau__corps",
120
- onSubmit: (v) => {
121
- v.preventDefault(), h(!1);
122
- },
123
- children: [
124
- o.nom === "erreur" && /* @__PURE__ */ e("p", { className: "message message--erreur", children: o.texte }),
125
- o.nom === "sans-acces" && /* @__PURE__ */ e("p", { className: "message message--info", children: "Vous êtes bien reconnu, mais vous n'avez pas encore le droit de modifier ce site. Vous pouvez le demander : la personne responsable recevra un courriel." }),
126
- o.nom === "demande-envoyee" && /* @__PURE__ */ e("p", { className: "message message--ok", children: "Demande envoyée. La personne responsable du site vous répondra." }),
127
- o.nom !== "demande-envoyee" && /* @__PURE__ */ b(Q, { children: [
128
- /* @__PURE__ */ b("div", { className: "champ", children: [
129
- /* @__PURE__ */ e("label", { className: "champ__etiquette", htmlFor: "lys-courriel", children: "Adresse courriel" }),
130
- /* @__PURE__ */ e(
131
- "input",
132
- {
133
- id: "lys-courriel",
134
- type: "text",
135
- inputMode: "email",
136
- autoComplete: "email",
137
- value: a,
138
- disabled: g,
139
- onChange: (v) => f(v.target.value)
140
- }
141
- )
142
- ] }),
143
- /* @__PURE__ */ b("div", { className: "champ", children: [
144
- /* @__PURE__ */ e("label", { className: "champ__etiquette", htmlFor: "lys-mdp", children: "Mot de passe" }),
145
- /* @__PURE__ */ e(
146
- "input",
147
- {
148
- id: "lys-mdp",
149
- type: "password",
150
- autoComplete: "current-password",
151
- value: u,
152
- disabled: g,
153
- onChange: (v) => m(v.target.value)
154
- }
155
- )
156
- ] })
157
- ] }),
158
- /* @__PURE__ */ e("div", { style: { display: "flex", gap: 8, marginTop: 4 }, children: o.nom === "sans-acces" ? /* @__PURE__ */ e(
159
- "button",
160
- {
161
- type: "button",
162
- className: "bouton bouton--principal",
163
- disabled: g,
164
- onClick: () => {
165
- h(!0);
166
- },
167
- children: "Demander l'accès"
168
- }
169
- ) : o.nom === "demande-envoyee" ? /* @__PURE__ */ e("button", { type: "button", className: "bouton", onClick: r, children: "Fermer" }) : /* @__PURE__ */ e(
170
- "button",
171
- {
172
- type: "submit",
173
- className: "bouton bouton--principal",
174
- disabled: g,
175
- children: g ? "Vérification…" : "Se connecter"
176
- }
177
- ) })
178
- ]
179
- }
180
- )
191
+ ) : d.nom === "demande-envoyee" || d.nom === "aucun-compte" ? /* @__PURE__ */ e(
192
+ "button",
193
+ {
194
+ type: "button",
195
+ className: "bouton bouton--large",
196
+ onClick: a,
197
+ children: "Fermer"
198
+ }
199
+ ) : /* @__PURE__ */ f("div", { className: "fournisseurs", children: [
200
+ s.includes("google") && /* @__PURE__ */ f(
201
+ "button",
202
+ {
203
+ type: "button",
204
+ className: "fournisseur fournisseur--google",
205
+ disabled: x,
206
+ onClick: () => {
207
+ i("google");
208
+ },
209
+ children: [
210
+ /* @__PURE__ */ e(xe, {}),
211
+ /* @__PURE__ */ e("span", { children: d.nom === "envoi" && d.quoi === "google" ? "Connexion…" : "Continuer avec Google" })
212
+ ]
213
+ }
214
+ ),
215
+ s.includes("facebook") && /* @__PURE__ */ f(
216
+ "button",
217
+ {
218
+ type: "button",
219
+ className: "fournisseur fournisseur--facebook",
220
+ disabled: x,
221
+ onClick: () => {
222
+ i("facebook");
223
+ },
224
+ children: [
225
+ /* @__PURE__ */ e(he, {}),
226
+ /* @__PURE__ */ e("span", { children: d.nom === "envoi" && d.quoi === "facebook" ? "Connexion…" : "Continuer avec Facebook" })
227
+ ]
228
+ }
229
+ )
230
+ ] })
231
+ ] })
181
232
  ] }) });
182
233
  }
183
- function le(n, t) {
184
- const c = n && typeof n == "object" && !Array.isArray(n) ? Object.keys(n).filter((a) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(a)) : [], r = t.slice(0, 2);
185
- return Array.from(/* @__PURE__ */ new Set([r, ...c]));
234
+ function ye(n, t) {
235
+ const s = n && typeof n == "object" && !Array.isArray(n) ? Object.keys(n).filter((a) => /^[a-z]{2}(-[A-Za-z]{2})?$/.test(a)) : [], r = t.slice(0, 2);
236
+ return Array.from(/* @__PURE__ */ new Set([r, ...s]));
186
237
  }
187
- function ue(n) {
238
+ function we(n) {
188
239
  switch (n.type) {
189
240
  case "number":
190
241
  return 0;
@@ -196,14 +247,14 @@ function ue(n) {
196
247
  return "";
197
248
  }
198
249
  }
199
- function G({ champ: n, valeur: t, changer: c }) {
250
+ function ee({ champ: n, valeur: t, changer: s }) {
200
251
  switch (n.type) {
201
252
  case "richText":
202
253
  return /* @__PURE__ */ e(
203
254
  "textarea",
204
255
  {
205
256
  value: String(t ?? ""),
206
- onChange: (r) => c(r.target.value)
257
+ onChange: (r) => s(r.target.value)
207
258
  }
208
259
  );
209
260
  case "number":
@@ -212,17 +263,17 @@ function G({ champ: n, valeur: t, changer: c }) {
212
263
  {
213
264
  type: "number",
214
265
  value: t === "" || t == null ? "" : String(t),
215
- onChange: (r) => c(r.target.value === "" ? "" : Number(r.target.value))
266
+ onChange: (r) => s(r.target.value === "" ? "" : Number(r.target.value))
216
267
  }
217
268
  );
218
269
  case "boolean":
219
- return /* @__PURE__ */ b("label", { className: "bascule", children: [
270
+ return /* @__PURE__ */ f("label", { className: "bascule", children: [
220
271
  /* @__PURE__ */ e(
221
272
  "input",
222
273
  {
223
274
  type: "checkbox",
224
275
  checked: t === !0,
225
- onChange: (r) => c(r.target.checked)
276
+ onChange: (r) => s(r.target.checked)
226
277
  }
227
278
  ),
228
279
  /* @__PURE__ */ e("span", { children: t === !0 ? "Oui" : "Non" })
@@ -233,15 +284,15 @@ function G({ champ: n, valeur: t, changer: c }) {
233
284
  {
234
285
  type: "date",
235
286
  value: String(t ?? "").slice(0, 10),
236
- onChange: (r) => c(r.target.value)
287
+ onChange: (r) => s(r.target.value)
237
288
  }
238
289
  );
239
290
  case "choice":
240
- return /* @__PURE__ */ b(
291
+ return /* @__PURE__ */ f(
241
292
  "select",
242
293
  {
243
294
  value: String(t ?? ""),
244
- onChange: (r) => c(r.target.value),
295
+ onChange: (r) => s(r.target.value),
245
296
  children: [
246
297
  /* @__PURE__ */ e("option", { value: "", children: "—" }),
247
298
  (n.options ?? []).map((r) => /* @__PURE__ */ e("option", { value: r, children: r }, r))
@@ -254,18 +305,18 @@ function G({ champ: n, valeur: t, changer: c }) {
254
305
  {
255
306
  type: "url",
256
307
  value: String(t ?? ""),
257
- onChange: (r) => c(r.target.value),
308
+ onChange: (r) => s(r.target.value),
258
309
  placeholder: "https://"
259
310
  }
260
311
  );
261
312
  case "image":
262
- return /* @__PURE__ */ b(Q, { children: [
313
+ return /* @__PURE__ */ f(ne, { children: [
263
314
  /* @__PURE__ */ e(
264
315
  "input",
265
316
  {
266
317
  type: "url",
267
318
  value: String(t ?? ""),
268
- onChange: (r) => c(r.target.value),
319
+ onChange: (r) => s(r.target.value),
269
320
  placeholder: "https://…"
270
321
  }
271
322
  ),
@@ -277,24 +328,24 @@ function G({ champ: n, valeur: t, changer: c }) {
277
328
  {
278
329
  type: "text",
279
330
  value: String(t ?? ""),
280
- onChange: (r) => c(r.target.value)
331
+ onChange: (r) => s(r.target.value)
281
332
  }
282
333
  );
283
334
  }
284
335
  }
285
- function ee({ champ: n, valeur: t, changer: c, langue: r }) {
336
+ function re({ champ: n, valeur: t, changer: s, langue: r }) {
286
337
  if (n.type === "list") {
287
- const a = Array.isArray(t) ? t : [], f = n.of ?? [], u = (m, o, i) => {
288
- const h = a.map((g, v) => v === m ? { ...g, [o]: i } : g);
289
- c(h);
338
+ const a = Array.isArray(t) ? t : [], d = n.of ?? [], l = (b, o, i) => {
339
+ const x = a.map((v, A) => A === b ? { ...v, [o]: i } : v);
340
+ s(x);
290
341
  };
291
- return /* @__PURE__ */ b("div", { className: "champ", children: [
342
+ return /* @__PURE__ */ f("div", { className: "champ", children: [
292
343
  /* @__PURE__ */ e("span", { className: "champ__etiquette", children: n.label }),
293
344
  n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help }),
294
- a.map((m, o) => /* @__PURE__ */ b("div", { className: "liste__item", children: [
295
- /* @__PURE__ */ b("div", { className: "liste__tete", children: [
345
+ a.map((b, o) => /* @__PURE__ */ f("div", { className: "liste__item", children: [
346
+ /* @__PURE__ */ f("div", { className: "liste__tete", children: [
296
347
  /* @__PURE__ */ e("span", { className: "liste__rang", children: o + 1 }),
297
- /* @__PURE__ */ b("span", { style: { display: "flex", gap: 4 }, children: [
348
+ /* @__PURE__ */ f("span", { style: { display: "flex", gap: 4 }, children: [
298
349
  /* @__PURE__ */ e(
299
350
  "button",
300
351
  {
@@ -304,7 +355,7 @@ function ee({ champ: n, valeur: t, changer: c, langue: r }) {
304
355
  disabled: o === 0,
305
356
  onClick: () => {
306
357
  const i = [...a];
307
- [i[o - 1], i[o]] = [i[o], i[o - 1]], c(i);
358
+ [i[o - 1], i[o]] = [i[o], i[o - 1]], s(i);
308
359
  },
309
360
  children: "↑"
310
361
  }
@@ -318,7 +369,7 @@ function ee({ champ: n, valeur: t, changer: c, langue: r }) {
318
369
  disabled: o === a.length - 1,
319
370
  onClick: () => {
320
371
  const i = [...a];
321
- [i[o], i[o + 1]] = [i[o + 1], i[o]], c(i);
372
+ [i[o], i[o + 1]] = [i[o + 1], i[o]], s(i);
322
373
  },
323
374
  children: "↓"
324
375
  }
@@ -329,19 +380,19 @@ function ee({ champ: n, valeur: t, changer: c, langue: r }) {
329
380
  type: "button",
330
381
  className: "bouton bouton--icone bouton--discret",
331
382
  title: "Retirer",
332
- onClick: () => c(a.filter((i, h) => h !== o)),
383
+ onClick: () => s(a.filter((i, x) => x !== o)),
333
384
  children: "✕"
334
385
  }
335
386
  )
336
387
  ] })
337
388
  ] }),
338
- f.map((i) => /* @__PURE__ */ e(
339
- ee,
389
+ d.map((i) => /* @__PURE__ */ e(
390
+ re,
340
391
  {
341
392
  champ: i,
342
393
  langue: r,
343
- valeur: m?.[i.key],
344
- changer: (h) => u(o, i.key, h)
394
+ valeur: b?.[i.key],
395
+ changer: (x) => l(o, i.key, x)
345
396
  },
346
397
  i.key
347
398
  ))
@@ -351,9 +402,9 @@ function ee({ champ: n, valeur: t, changer: c, langue: r }) {
351
402
  {
352
403
  type: "button",
353
404
  className: "bouton",
354
- onClick: () => c([
405
+ onClick: () => s([
355
406
  ...a,
356
- Object.fromEntries(f.map((m) => [m.key, ue(m)]))
407
+ Object.fromEntries(d.map((b) => [b.key, we(b)]))
357
408
  ]),
358
409
  children: "+ Ajouter"
359
410
  }
@@ -361,162 +412,162 @@ function ee({ champ: n, valeur: t, changer: c, langue: r }) {
361
412
  ] });
362
413
  }
363
414
  if (n.localized) {
364
- const a = le(t, r), f = t && typeof t == "object" && !Array.isArray(t) ? t : {};
365
- return /* @__PURE__ */ b("div", { className: "champ", children: [
415
+ const a = ye(t, r), d = t && typeof t == "object" && !Array.isArray(t) ? t : {};
416
+ return /* @__PURE__ */ f("div", { className: "champ", children: [
366
417
  /* @__PURE__ */ e("span", { className: "champ__etiquette", children: n.label }),
367
418
  n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help }),
368
- a.map((u) => /* @__PURE__ */ b("div", { style: { marginBottom: 8 }, children: [
369
- /* @__PURE__ */ e("span", { className: "champ__langue", children: u }),
419
+ a.map((l) => /* @__PURE__ */ f("div", { style: { marginBottom: 8 }, children: [
420
+ /* @__PURE__ */ e("span", { className: "champ__langue", children: l }),
370
421
  /* @__PURE__ */ e(
371
- G,
422
+ ee,
372
423
  {
373
424
  champ: n,
374
- valeur: f[u],
375
- changer: (m) => c({ ...f, [u]: m })
425
+ valeur: d[l],
426
+ changer: (b) => s({ ...d, [l]: b })
376
427
  }
377
428
  )
378
- ] }, u))
429
+ ] }, l))
379
430
  ] });
380
431
  }
381
- return /* @__PURE__ */ b("div", { className: "champ", children: [
432
+ return /* @__PURE__ */ f("div", { className: "champ", children: [
382
433
  /* @__PURE__ */ e("label", { className: "champ__etiquette", children: n.label }),
383
- /* @__PURE__ */ e(G, { champ: n, valeur: t, changer: c }),
434
+ /* @__PURE__ */ e(ee, { champ: n, valeur: t, changer: s }),
384
435
  n.help && /* @__PURE__ */ e("p", { className: "champ__aide", children: n.help })
385
436
  ] });
386
437
  }
387
- const de = ["lystech-editeur-hote", "lystech-connexion-hote"];
388
- function pe(n) {
438
+ const Ne = ["lystech-editeur-hote", "lystech-connexion-hote"];
439
+ function ke(n) {
389
440
  const t = /* @__PURE__ */ new Map();
390
- for (const [c, r] of Object.entries(n))
391
- for (const [a, f] of Object.entries(r)) {
392
- const u = String(f ?? "").trim();
393
- if (u.length < 2 || u.includes("{{")) continue;
394
- const m = t.get(u);
395
- m ? m.push({ ns: c, chemin: a }) : t.set(u, [{ ns: c, chemin: a }]);
441
+ for (const [s, r] of Object.entries(n))
442
+ for (const [a, d] of Object.entries(r)) {
443
+ const l = String(d ?? "").trim();
444
+ if (l.length < 2 || l.includes("{{")) continue;
445
+ const b = t.get(l);
446
+ b ? b.push({ ns: s, chemin: a }) : t.set(l, [{ ns: s, chemin: a }]);
396
447
  }
397
448
  return t;
398
449
  }
399
- function me(n) {
400
- const t = /* @__PURE__ */ new Map(), c = document.body.querySelectorAll("*");
401
- for (const r of c) {
402
- if (de.some((u) => r.id === u || r.closest("#" + u)) || r.children.length > 0) continue;
450
+ function Ae(n) {
451
+ const t = /* @__PURE__ */ new Map(), s = document.body.querySelectorAll("*");
452
+ for (const r of s) {
453
+ if (Ne.some((l) => r.id === l || r.closest("#" + l)) || r.children.length > 0) continue;
403
454
  const a = (r.textContent ?? "").trim();
404
455
  if (a.length < 2) continue;
405
- const f = n.get(a);
406
- f && t.set(r, { valeur: a, candidats: f });
456
+ const d = n.get(a);
457
+ d && t.set(r, { valeur: a, candidats: d });
407
458
  }
408
459
  return t;
409
460
  }
410
- function be({
461
+ function Ce({
411
462
  source: n,
412
463
  actif: t,
413
- surModification: c
464
+ surModification: s
414
465
  }) {
415
- const r = F(/* @__PURE__ */ new Map()), a = F(null), [f, u] = k(null), m = F(n);
416
- m.current = n;
417
- const o = F(c);
418
- return o.current = c, B(() => {
466
+ const r = H(/* @__PURE__ */ new Map()), a = H(null), [d, l] = L(null), b = H(n);
467
+ b.current = n;
468
+ const o = H(s);
469
+ return o.current = s, _(() => {
419
470
  if (!t) return;
420
- const i = m.current.langueCourante(), h = pe(m.current.dictionnaire(i)), g = () => {
421
- r.current = me(h);
471
+ const i = b.current.langueCourante(), x = ke(b.current.dictionnaire(i)), v = () => {
472
+ r.current = Ae(x);
422
473
  };
423
- g();
424
- let v;
425
- const S = new MutationObserver(() => {
426
- a.current || (clearTimeout(v), v = setTimeout(g, 250));
474
+ v();
475
+ let A;
476
+ const T = new MutationObserver(() => {
477
+ a.current || (clearTimeout(A), A = setTimeout(v, 250));
427
478
  });
428
- S.observe(document.body, { childList: !0, subtree: !0 });
429
- const _ = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", U = (d) => {
430
- const s = d.target;
431
- !(s instanceof HTMLElement) || a.current || r.current.has(s) && (s.dataset.lysStyleAvant || (s.dataset.lysStyleAvant = s.getAttribute("style") ?? ""), s.setAttribute(
479
+ T.observe(document.body, { childList: !0, subtree: !0 });
480
+ const y = "outline:2px dashed rgba(59,165,141,.85);outline-offset:3px;border-radius:3px;cursor:text;", P = (p) => {
481
+ const c = p.target;
482
+ !(c instanceof HTMLElement) || a.current || r.current.has(c) && (c.dataset.lysStyleAvant || (c.dataset.lysStyleAvant = c.getAttribute("style") ?? ""), c.setAttribute(
432
483
  "style",
433
- (s.dataset.lysStyleAvant ?? "") + _
484
+ (c.dataset.lysStyleAvant ?? "") + y
434
485
  ));
435
- }, z = (d) => {
436
- const s = d.target;
437
- if (!(s instanceof HTMLElement) || a.current?.el === s || s.dataset.lysStyleAvant === void 0) return;
438
- const y = s.dataset.lysStyleAvant;
439
- delete s.dataset.lysStyleAvant, y ? s.setAttribute("style", y) : s.removeAttribute("style");
440
- }, T = (d, s) => {
441
- const y = d.getAttribute("style") ?? "";
486
+ }, Q = (p) => {
487
+ const c = p.target;
488
+ if (!(c instanceof HTMLElement) || a.current?.el === c || c.dataset.lysStyleAvant === void 0) return;
489
+ const h = c.dataset.lysStyleAvant;
490
+ delete c.dataset.lysStyleAvant, h ? c.setAttribute("style", h) : c.removeAttribute("style");
491
+ }, j = (p, c) => {
492
+ const h = p.getAttribute("style") ?? "";
442
493
  a.current = {
443
- el: d,
444
- avant: (d.textContent ?? "").trim(),
445
- ns: s.ns,
446
- chemin: s.chemin,
447
- styleAvant: d.dataset.lysStyleAvant ?? y
448
- }, d.setAttribute("contenteditable", "plaintext-only"), d.setAttribute(
494
+ el: p,
495
+ avant: (p.textContent ?? "").trim(),
496
+ ns: c.ns,
497
+ chemin: c.chemin,
498
+ styleAvant: p.dataset.lysStyleAvant ?? h
499
+ }, p.setAttribute("contenteditable", "plaintext-only"), p.setAttribute(
449
500
  "style",
450
- (d.dataset.lysStyleAvant ?? "") + "outline:2px solid #3ba58d;outline-offset:3px;border-radius:3px;"
451
- ), d.focus();
452
- const P = window.getSelection(), O = document.createRange();
453
- O.selectNodeContents(d), P?.removeAllRanges(), P?.addRange(O);
454
- }, w = async (d) => {
455
- const s = a.current;
456
- if (!s) return;
501
+ (p.dataset.lysStyleAvant ?? "") + "outline:2px solid #3ba58d;outline-offset:3px;border-radius:3px;"
502
+ ), p.focus();
503
+ const O = window.getSelection(), D = document.createRange();
504
+ D.selectNodeContents(p), O?.removeAllRanges(), O?.addRange(D);
505
+ }, N = async (p) => {
506
+ const c = a.current;
507
+ if (!c) return;
457
508
  a.current = null;
458
- const y = (s.el.textContent ?? "").trim();
459
- s.el.removeAttribute("contenteditable");
460
- const P = s.el.dataset.lysStyleAvant;
461
- if (delete s.el.dataset.lysStyleAvant, P ? s.el.setAttribute("style", P) : s.el.removeAttribute("style"), d || y === s.avant) {
462
- d && (s.el.textContent = s.avant);
509
+ const h = (c.el.textContent ?? "").trim();
510
+ c.el.removeAttribute("contenteditable");
511
+ const O = c.el.dataset.lysStyleAvant;
512
+ if (delete c.el.dataset.lysStyleAvant, O ? c.el.setAttribute("style", O) : c.el.removeAttribute("style"), p || h === c.avant) {
513
+ p && (c.el.textContent = c.avant);
463
514
  return;
464
515
  }
465
- const O = m.current.langueCourante();
466
- m.current.poser(O, s.ns, s.chemin, y), await o.current(s.ns, s.chemin, O, y);
467
- }, N = (d) => {
468
- const s = d.target;
469
- if (!(s instanceof HTMLElement)) return;
516
+ const D = b.current.langueCourante();
517
+ b.current.poser(D, c.ns, c.chemin, h), await o.current(c.ns, c.chemin, D, h);
518
+ }, U = (p) => {
519
+ const c = p.target;
520
+ if (!(c instanceof HTMLElement)) return;
470
521
  if (a.current) {
471
- if (a.current.el === s) return;
472
- w(!1);
522
+ if (a.current.el === c) return;
523
+ N(!1);
473
524
  }
474
- const y = r.current.get(s);
475
- if (y) {
476
- if (d.preventDefault(), d.stopPropagation(), y.candidats.length === 1) {
477
- T(s, y.candidats[0]);
525
+ const h = r.current.get(c);
526
+ if (h) {
527
+ if (p.preventDefault(), p.stopPropagation(), h.candidats.length === 1) {
528
+ j(c, h.candidats[0]);
478
529
  return;
479
530
  }
480
- u({
481
- el: s,
482
- candidats: y.candidats,
483
- x: d.clientX,
484
- y: d.clientY
531
+ l({
532
+ el: c,
533
+ candidats: h.candidats,
534
+ x: p.clientX,
535
+ y: p.clientY
485
536
  });
486
537
  }
487
- }, A = (d) => {
488
- a.current && (d.key === "Escape" ? (d.preventDefault(), w(!0)) : d.key === "Enter" && !d.shiftKey && (d.preventDefault(), w(!1)));
538
+ }, C = (p) => {
539
+ a.current && (p.key === "Escape" ? (p.preventDefault(), N(!0)) : p.key === "Enter" && !p.shiftKey && (p.preventDefault(), N(!1)));
489
540
  }, M = () => {
490
- a.current && w(!1);
541
+ a.current && N(!1);
491
542
  };
492
- document.addEventListener("mouseover", U, !0), document.addEventListener("mouseout", z, !0), document.addEventListener("click", N, !0);
493
- const I = (d) => {
543
+ document.addEventListener("mouseover", P, !0), document.addEventListener("mouseout", Q, !0), document.addEventListener("click", U, !0);
544
+ const K = (p) => {
494
545
  if (!a.current) return;
495
- const s = d.inputType;
496
- (s === "insertParagraph" || s === "insertLineBreak") && (d.preventDefault(), w(!1));
546
+ const c = p.inputType;
547
+ (c === "insertParagraph" || c === "insertLineBreak") && (p.preventDefault(), N(!1));
497
548
  };
498
- return document.addEventListener("beforeinput", I, !0), document.addEventListener("keydown", A, !0), document.addEventListener("focusout", M, !0), window.__lysChoisir = (d, s) => {
499
- u(null), T(s, d);
549
+ return document.addEventListener("beforeinput", K, !0), document.addEventListener("keydown", C, !0), document.addEventListener("focusout", M, !0), window.__lysChoisir = (p, c) => {
550
+ l(null), j(c, p);
500
551
  }, () => {
501
- clearTimeout(v), S.disconnect(), document.removeEventListener("mouseover", U, !0), document.removeEventListener("mouseout", z, !0), document.removeEventListener("click", N, !0), document.removeEventListener("beforeinput", I, !0), document.removeEventListener("keydown", A, !0), document.removeEventListener("focusout", M, !0), a.current && w(!0), delete window.__lysChoisir;
552
+ clearTimeout(A), T.disconnect(), document.removeEventListener("mouseover", P, !0), document.removeEventListener("mouseout", Q, !0), document.removeEventListener("click", U, !0), document.removeEventListener("beforeinput", K, !0), document.removeEventListener("keydown", C, !0), document.removeEventListener("focusout", M, !0), a.current && N(!0), delete window.__lysChoisir;
502
553
  };
503
- }, [t]), f ? /* @__PURE__ */ b(
554
+ }, [t]), d ? /* @__PURE__ */ f(
504
555
  "div",
505
556
  {
506
557
  className: "choix",
507
558
  style: {
508
- top: Math.min(f.y + 10, window.innerHeight - 200),
509
- left: Math.min(f.x, window.innerWidth - 280)
559
+ top: Math.min(d.y + 10, window.innerHeight - 200),
560
+ left: Math.min(d.x, window.innerWidth - 280)
510
561
  },
511
562
  children: [
512
563
  /* @__PURE__ */ e("p", { className: "choix__titre", children: "Ce texte apparaît à plusieurs endroits." }),
513
564
  /* @__PURE__ */ e("p", { className: "choix__aide", children: "Lequel corrigez-vous ?" }),
514
- f.candidats.map((i) => /* @__PURE__ */ b(
565
+ d.candidats.map((i) => /* @__PURE__ */ f(
515
566
  "button",
516
567
  {
517
568
  type: "button",
518
569
  className: "choix__option",
519
- onClick: () => window.__lysChoisir?.(i, f.el),
570
+ onClick: () => window.__lysChoisir?.(i, d.el),
520
571
  children: [
521
572
  /* @__PURE__ */ e("span", { className: "choix__chemin", children: i.chemin }),
522
573
  /* @__PURE__ */ e("span", { className: "choix__ns", children: i.ns })
@@ -529,7 +580,7 @@ function be({
529
580
  {
530
581
  type: "button",
531
582
  className: "bouton bouton--discret",
532
- onClick: () => u(null),
583
+ onClick: () => l(null),
533
584
  children: "Annuler"
534
585
  }
535
586
  )
@@ -537,197 +588,238 @@ function be({
537
588
  }
538
589
  ) : null;
539
590
  }
540
- const Y = /^i18n:([^:]+):(.*)$/, J = "commun";
541
- function K(n, t) {
591
+ const Y = /^i18n:([^:]+):(.*)$/, F = "commun", X = "lystech-edit-mode";
592
+ function te(n, t) {
542
593
  return JSON.stringify(n ?? {}) === JSON.stringify(t ?? {});
543
594
  }
544
- function fe({ api: n, pont: t }) {
545
- const [c, r] = k([]), [a, f] = k([]), [u, m] = k(t.page), [o, i] = k(null), [h, g] = k({}), [v, S] = k(!1), [_, U] = k("modifier"), [z, T] = k(!1), [w, N] = k(
595
+ function Ee({ api: n, pont: t }) {
596
+ const [s, r] = L([]), [a, d] = L([]), [l, b] = L(t.page), [o, i] = L(null), [x, v] = L({}), [A, T] = L(!1), [y, P] = L(() => {
597
+ try {
598
+ return window.localStorage.getItem(X) === "circuler" ? "circuler" : "modifier";
599
+ } catch {
600
+ return "modifier";
601
+ }
602
+ }), Q = () => P((u) => {
603
+ const m = u === "modifier" ? "circuler" : "modifier";
604
+ try {
605
+ window.localStorage.setItem(X, m);
606
+ } catch {
607
+ }
608
+ return m;
609
+ }), [j, N] = L(!1), [U, C] = L(
546
610
  null
547
611
  );
548
- B(() => (t.surChangementDePage = (l) => {
549
- m(l), i(null), S(!1);
612
+ _(() => (t.surChangementDePage = (u) => {
613
+ b(u), i(null), T(!1);
550
614
  }, () => {
551
615
  t.surChangementDePage = void 0;
552
616
  }), [t]);
553
- const A = H(async () => {
617
+ const M = J(async () => {
554
618
  try {
555
- const [l, p] = await Promise.all([
556
- n.pourPage(u),
557
- u === J ? Promise.resolve([]) : n.pourPage(J)
558
- ]), x = [...l, ...p];
559
- return f(x), x;
619
+ const [u, m] = await Promise.all([
620
+ n.pourPage(l),
621
+ l === F ? Promise.resolve([]) : n.pourPage(F)
622
+ ]), g = [...u, ...m];
623
+ return d(g), g;
560
624
  } catch {
561
- return N({
625
+ return C({
562
626
  ton: "erreur",
563
627
  texte: "Impossible de lire le contenu du site."
564
628
  }), [];
565
629
  }
566
- }, [n, u]);
567
- B(() => {
630
+ }, [n, l]);
631
+ _(() => {
568
632
  n.schemas().then(r).catch(() => r([]));
569
- }, [n]), B(() => {
570
- A();
571
- }, [A]);
572
- const M = H(
573
- (l, p) => {
574
- let x = null, C = -1;
575
- for (const R of c) {
576
- const L = Y.exec(R.blockType);
577
- if (!L || L[1] !== l) continue;
578
- const q = L[2];
579
- (q === "" || p === q || p.startsWith(q + ".")) && q.length > C && (x = R, C = q.length);
633
+ }, [n]), _(() => {
634
+ M();
635
+ }, [M]);
636
+ const K = J(
637
+ (u, m) => {
638
+ let g = null, E = -1;
639
+ for (const z of s) {
640
+ const w = Y.exec(z.blockType);
641
+ if (!w || w[1] !== u) continue;
642
+ const k = w[2];
643
+ (k === "" || m === k || m.startsWith(k + ".")) && k.length > E && (g = z, E = k.length);
580
644
  }
581
- if (!x) return null;
582
- const E = Y.exec(x.blockType)?.[2] ?? "", j = E ? p.slice(E.length + 1) : p;
583
- return { bloc: x, champ: j };
645
+ if (!g) return null;
646
+ const S = Y.exec(g.blockType)?.[2] ?? "", q = S ? m.slice(S.length + 1) : m;
647
+ return { bloc: g, champ: q };
584
648
  },
585
- [c]
586
- ), I = H(
587
- (l) => c.find((p) => p.blockType === l),
588
- [c]
589
- ), d = W(
590
- () => c.filter((l) => {
591
- const p = l.pages ?? [];
592
- return p.includes(u) || p.includes(J);
649
+ [s]
650
+ ), p = J(
651
+ (u) => s.find((m) => m.blockType === u),
652
+ [s]
653
+ ), c = $(
654
+ () => s.filter((u) => {
655
+ const m = u.pages ?? [];
656
+ return m.includes(l) || m.includes(F);
593
657
  }),
594
- [c, u]
595
- ), s = W(
596
- () => a.filter((l) => l.draft && !K(l.draft, l.data)),
658
+ [s, l]
659
+ ), h = $(
660
+ () => a.filter((u) => u.draft && !te(u.draft, u.data)),
597
661
  [a]
598
- ), y = H(
599
- async (l, p, x, C) => {
600
- const E = M(l, p);
601
- if (!E) {
602
- N({
662
+ ), O = J(
663
+ async (u, m, g, E) => {
664
+ const S = K(u, m);
665
+ if (!S) {
666
+ C({
603
667
  ton: "erreur",
604
- texte: `Ce texte (${l}:${p}) n'appartient à aucun bloc déclaré.`
668
+ texte: `Ce texte (${u}:${m}) n'appartient à aucun bloc déclaré.`
605
669
  });
606
670
  return;
607
671
  }
608
- const j = a.find((X) => X.blockType === E.bloc.blockType), R = j?.draft ?? j?.data ?? {}, L = R[E.champ], q = L && typeof L == "object" && !Array.isArray(L) ? { ...L, [x]: C } : { [x]: C }, $ = { ...R, [E.champ]: q };
672
+ const q = a.find((I) => I.blockType === S.bloc.blockType), z = q?.draft ?? q?.data ?? {}, w = z[S.champ], k = w && typeof w == "object" && !Array.isArray(w) ? { ...w, [g]: E } : { [g]: E }, R = { ...z, [S.champ]: k };
609
673
  try {
610
- if (j?.UID)
611
- await n.enregistrerBrouillon(j.UID, $);
674
+ if (q?.UID)
675
+ await n.enregistrerBrouillon(q.UID, R);
612
676
  else {
613
- const X = E.bloc.pages?.[0] ?? u;
614
- await n.creer(X, E.bloc.blockType, $);
677
+ const I = S.bloc.pages?.[0] ?? l;
678
+ await n.creer(I, S.bloc.blockType, R);
615
679
  }
616
- await A(), N(null);
680
+ await M(), C(null);
617
681
  } catch {
618
- N({
682
+ C({
619
683
  ton: "erreur",
620
684
  texte: "Enregistrement impossible. Votre texte est toujours à l'écran."
621
685
  });
622
686
  }
623
687
  },
624
- [n, M, u, A, a]
625
- ), P = async () => {
626
- if (!s.length) return;
627
- T(!0), N(null);
628
- const l = s.length;
688
+ [n, K, l, M, a]
689
+ ), D = async () => {
690
+ if (!h.length) return;
691
+ N(!0), C(null);
692
+ const u = h.length;
629
693
  try {
630
- for (const p of s) await n.publier(p.UID);
631
- await A(), t.recharger(), N({
694
+ for (const m of h) await n.publier(m.UID);
695
+ await M(), t.recharger(), C({
632
696
  ton: "ok",
633
- texte: l === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${l} modifications publiées.`
697
+ texte: u === 1 ? "Publié. Vos visiteurs le voient maintenant." : `${u} modifications publiées.`
634
698
  });
635
699
  } catch {
636
- N({
700
+ C({
637
701
  ton: "erreur",
638
702
  texte: "La publication a échoué. Rien n'a été mis en ligne."
639
703
  });
640
704
  } finally {
641
- T(!1);
705
+ N(!1);
642
706
  }
643
- }, O = async () => {
644
- T(!0);
707
+ }, ie = async () => {
708
+ N(!0);
645
709
  try {
646
- for (const p of s) await n.annuler(p.UID);
647
- const l = await A();
710
+ for (const m of h) await n.annuler(m.UID);
711
+ const u = await M();
648
712
  if (t.sourceTexte) {
649
- const { appliquerAuxTextes: p } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
650
- p(
651
- l.map((x) => ({ blockType: x.blockType, data: x.data })),
713
+ const { appliquerAuxTextes: m } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
714
+ m(
715
+ u.map((g) => ({ blockType: g.blockType, data: g.data })),
652
716
  t.sourceTexte
653
717
  );
654
718
  }
655
- N({
719
+ C({
656
720
  ton: "info",
657
721
  texte: "Modifications abandonnées. On est revenu à ce qui est en ligne."
658
722
  });
659
723
  } finally {
660
- T(!1);
724
+ N(!1);
725
+ }
726
+ }, ce = (u) => {
727
+ const m = a.find((z) => z.blockType === u), g = m?.draft ?? m?.data ?? {}, E = p(u), S = Y.exec(u), q = {};
728
+ if (S && E && t.sourceTexte) {
729
+ const z = S[1], w = S[2], k = t.sourceTexte.langues(), R = {};
730
+ for (const I of k)
731
+ R[I] = t.sourceTexte.dictionnaire(I)[z] ?? {};
732
+ for (const I of E.fields) {
733
+ const pe = w ? w + "." + I.key : I.key, G = {};
734
+ for (const W of k) {
735
+ const Z = R[W]?.[pe];
736
+ typeof Z == "string" && (G[W] = Z);
737
+ }
738
+ Object.keys(G).length && (q[I.key] = G);
739
+ }
661
740
  }
662
- }, oe = (l) => {
663
- const p = a.find((x) => x.blockType === l);
664
- g({ ...p?.draft ?? p?.data ?? {} }), i(l), S(!1), N(null);
665
- }, re = (l, p) => g((x) => ({ ...x, [l]: p })), ae = async () => {
741
+ for (const [z, w] of Object.entries(g)) {
742
+ const k = q[z], R = w && typeof w == "object" && !Array.isArray(w) && k && typeof k == "object" && !Array.isArray(k);
743
+ q[z] = R ? { ...k, ...w } : w;
744
+ }
745
+ v(q), i(u), T(!1), C(null);
746
+ }, le = (u, m) => v((g) => ({ ...g, [u]: m })), ue = async () => {
666
747
  if (o) {
667
- T(!0);
748
+ N(!0);
668
749
  try {
669
- const l = a.find((x) => x.blockType === o);
670
- if (l?.UID) await n.enregistrerBrouillon(l.UID, h);
750
+ const u = a.find((g) => g.blockType === o);
751
+ if (u?.UID) await n.enregistrerBrouillon(u.UID, x);
671
752
  else {
672
- const x = I(o)?.pages?.[0] ?? u;
673
- await n.creer(x, o, h);
753
+ const g = p(o)?.pages?.[0] ?? l;
754
+ await n.creer(g, o, x);
674
755
  }
675
- const p = await A();
756
+ const m = await M();
676
757
  if (t.sourceTexte) {
677
- const { appliquerAuxTextes: x } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
678
- x(
679
- p.map((C) => ({ blockType: C.blockType, data: C.draft ?? C.data })),
758
+ const { appliquerAuxTextes: g } = await import("./morceaux/sourceTexte-BMPMpNg9.js");
759
+ g(
760
+ m.map((E) => ({ blockType: E.blockType, data: E.draft ?? E.data })),
680
761
  t.sourceTexte
681
762
  );
682
763
  }
683
- N({
764
+ C({
684
765
  ton: "ok",
685
766
  texte: "Enregistré. Rien n'a encore changé pour vos visiteurs."
686
767
  });
687
768
  } catch {
688
- N({ ton: "erreur", texte: "L'enregistrement a échoué." });
769
+ C({ ton: "erreur", texte: "L'enregistrement a échoué." });
689
770
  } finally {
690
- T(!1);
771
+ N(!1);
691
772
  }
692
773
  }
693
- }, ie = () => {
774
+ }, de = () => {
775
+ try {
776
+ window.localStorage.setItem("lystech-edit-sortie", "1"), window.localStorage.removeItem("lystech-edit"), window.localStorage.removeItem(X);
777
+ } catch {
778
+ }
694
779
  try {
695
780
  window.sessionStorage.removeItem("lystech-edit");
696
781
  } catch {
697
782
  }
698
783
  window.location.reload();
699
- }, D = o ? I(o) : void 0, V = !o && !v;
700
- return /* @__PURE__ */ b("div", { className: "calque", children: [
784
+ }, V = o ? p(o) : void 0, B = !o && !A;
785
+ return /* @__PURE__ */ f("div", { className: "calque", children: [
786
+ /* @__PURE__ */ e(
787
+ "div",
788
+ {
789
+ className: "cadre-global" + (y === "circuler" ? " cadre-global--circuler" : ""),
790
+ "aria-hidden": "true"
791
+ }
792
+ ),
701
793
  t.sourceTexte && /* @__PURE__ */ e(
702
- be,
794
+ Ce,
703
795
  {
704
796
  source: t.sourceTexte,
705
- actif: V && !z && _ === "modifier",
706
- surModification: y
797
+ actif: B && !j && y === "modifier",
798
+ surModification: O
707
799
  }
708
800
  ),
709
- V && /* @__PURE__ */ b("div", { className: "barre", children: [
801
+ B && /* @__PURE__ */ f("div", { className: "barre", children: [
710
802
  /* @__PURE__ */ e("span", { className: "barre__point" }),
711
- /* @__PURE__ */ e("span", { className: "barre__texte", children: _ === "modifier" ? "Cliquez un texte pour le corriger" : "Navigation libre — les clics ouvrent les liens" }),
803
+ /* @__PURE__ */ e("span", { className: "barre__texte", children: y === "modifier" ? "Cliquez un texte pour le corriger" : "Navigation libre — les clics ouvrent les liens" }),
712
804
  /* @__PURE__ */ e(
713
805
  "button",
714
806
  {
715
807
  type: "button",
716
- className: "bouton " + (_ === "circuler" ? "bouton--principal" : ""),
717
- onClick: () => U((l) => l === "modifier" ? "circuler" : "modifier"),
718
- title: _ === "modifier" ? "Passer en navigation pour changer de page" : "Revenir a la modification des textes",
719
- children: _ === "modifier" ? "Circuler" : "Modifier"
808
+ className: "bouton " + (y === "circuler" ? "bouton--principal" : ""),
809
+ onClick: Q,
810
+ title: y === "modifier" ? "Passer en navigation pour changer de page" : "Revenir a la modification des textes",
811
+ children: y === "modifier" ? "Circuler" : "Modifier"
720
812
  }
721
813
  ),
722
- s.length > 0 ? /* @__PURE__ */ b(Q, { children: [
723
- /* @__PURE__ */ e("span", { className: "barre__compte", children: s.length === 1 ? "1 modification non publiée" : `${s.length} modifications non publiées` }),
814
+ h.length > 0 ? /* @__PURE__ */ f(ne, { children: [
815
+ /* @__PURE__ */ e("span", { className: "barre__compte", children: h.length === 1 ? "1 modification non publiée" : `${h.length} modifications non publiées` }),
724
816
  /* @__PURE__ */ e(
725
817
  "button",
726
818
  {
727
819
  type: "button",
728
820
  className: "bouton bouton--principal",
729
- onClick: P,
730
- disabled: z,
821
+ onClick: D,
822
+ disabled: j,
731
823
  children: "Publier"
732
824
  }
733
825
  ),
@@ -736,8 +828,8 @@ function fe({ api: n, pont: t }) {
736
828
  {
737
829
  type: "button",
738
830
  className: "bouton bouton--discret",
739
- onClick: O,
740
- disabled: z,
831
+ onClick: ie,
832
+ disabled: j,
741
833
  children: "Abandonner"
742
834
  }
743
835
  )
@@ -746,25 +838,29 @@ function fe({ api: n, pont: t }) {
746
838
  "button",
747
839
  {
748
840
  type: "button",
749
- className: "bouton bouton--discret",
750
- onClick: () => S(!0),
751
- children: "Plus…"
841
+ className: "bouton bouton--icone bouton--discret",
842
+ onClick: () => T(!0),
843
+ title: "Tous les contenus",
844
+ "aria-label": "Tous les contenus",
845
+ children: "⋮"
752
846
  }
753
847
  ),
754
848
  /* @__PURE__ */ e(
755
849
  "button",
756
850
  {
757
851
  type: "button",
758
- className: "bouton bouton--discret",
759
- onClick: ie,
760
- children: "Quitter"
852
+ className: "bouton bouton--icone bouton--sortie",
853
+ onClick: de,
854
+ title: "Quitter le mode édition",
855
+ "aria-label": "Quitter le mode édition",
856
+ children: "✕"
761
857
  }
762
858
  )
763
859
  ] }),
764
- w && V && /* @__PURE__ */ e("div", { className: "flottant", children: /* @__PURE__ */ e("p", { className: "message message--" + w.ton, children: w.texte }) }),
765
- v && /* @__PURE__ */ b("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
766
- /* @__PURE__ */ b("div", { className: "panneau__tete", children: [
767
- /* @__PURE__ */ b("div", { style: { flex: 1 }, children: [
860
+ U && B && /* @__PURE__ */ e("div", { className: "flottant", children: /* @__PURE__ */ e("p", { className: "message message--" + U.ton, children: U.texte }) }),
861
+ A && /* @__PURE__ */ f("div", { className: "panneau", role: "dialog", "aria-label": "Tous les contenus", children: [
862
+ /* @__PURE__ */ f("div", { className: "panneau__tete", children: [
863
+ /* @__PURE__ */ f("div", { style: { flex: 1 }, children: [
768
864
  /* @__PURE__ */ e("h2", { className: "panneau__titre", children: "Tous les contenus" }),
769
865
  /* @__PURE__ */ e("p", { className: "panneau__sous", children: "Y compris ce qui ne s'affiche pas dans la page : titre de l'onglet, description dans les moteurs de recherche, textes contenant une valeur calculée." })
770
866
  ] }),
@@ -773,43 +869,43 @@ function fe({ api: n, pont: t }) {
773
869
  {
774
870
  type: "button",
775
871
  className: "bouton bouton--icone bouton--discret",
776
- onClick: () => S(!1),
872
+ onClick: () => T(!1),
777
873
  "aria-label": "Fermer",
778
874
  children: "✕"
779
875
  }
780
876
  )
781
877
  ] }),
782
- /* @__PURE__ */ b("div", { className: "panneau__corps", children: [
783
- d.length === 0 && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
784
- d.map((l) => {
785
- const p = a.find((C) => C.blockType === l.blockType), x = p?.draft && !K(p.draft, p.data);
786
- return /* @__PURE__ */ b(
878
+ /* @__PURE__ */ f("div", { className: "panneau__corps", children: [
879
+ c.length === 0 && /* @__PURE__ */ e("p", { className: "message message--info", children: "Aucun contenu déclaré pour cette page." }),
880
+ c.map((u) => {
881
+ const m = a.find((E) => E.blockType === u.blockType), g = m?.draft && !te(m.draft, m.data);
882
+ return /* @__PURE__ */ f(
787
883
  "button",
788
884
  {
789
885
  type: "button",
790
886
  className: "rangee",
791
- onClick: () => oe(l.blockType),
887
+ onClick: () => ce(u.blockType),
792
888
  children: [
793
- /* @__PURE__ */ e("span", { className: "rangee__nom", children: l.label }),
794
- /* @__PURE__ */ e("span", { className: "rangee__info", children: x ? "non publié" : `${l.fields.length} textes` })
889
+ /* @__PURE__ */ e("span", { className: "rangee__nom", children: u.label }),
890
+ /* @__PURE__ */ e("span", { className: "rangee__info", children: g ? "non publié" : `${u.fields.length} textes` })
795
891
  ]
796
892
  },
797
- l.blockType
893
+ u.blockType
798
894
  );
799
895
  })
800
896
  ] })
801
897
  ] }),
802
- o && D && /* @__PURE__ */ b(
898
+ o && V && /* @__PURE__ */ f(
803
899
  "div",
804
900
  {
805
901
  className: "panneau",
806
902
  role: "dialog",
807
- "aria-label": "Modifier " + D.label,
903
+ "aria-label": "Modifier " + V.label,
808
904
  children: [
809
- /* @__PURE__ */ b("div", { className: "panneau__tete", children: [
810
- /* @__PURE__ */ b("div", { style: { flex: 1 }, children: [
811
- /* @__PURE__ */ e("h2", { className: "panneau__titre", children: D.label }),
812
- D.description && /* @__PURE__ */ e("p", { className: "panneau__sous", children: D.description })
905
+ /* @__PURE__ */ f("div", { className: "panneau__tete", children: [
906
+ /* @__PURE__ */ f("div", { style: { flex: 1 }, children: [
907
+ /* @__PURE__ */ e("h2", { className: "panneau__titre", children: V.label }),
908
+ V.description && /* @__PURE__ */ e("p", { className: "panneau__sous", children: V.description })
813
909
  ] }),
814
910
  /* @__PURE__ */ e(
815
911
  "button",
@@ -822,27 +918,27 @@ function fe({ api: n, pont: t }) {
822
918
  }
823
919
  )
824
920
  ] }),
825
- /* @__PURE__ */ b("div", { className: "panneau__corps", children: [
826
- w && /* @__PURE__ */ e("p", { className: "message message--" + w.ton, children: w.texte }),
827
- D.fields.map((l) => /* @__PURE__ */ e(
828
- ee,
921
+ /* @__PURE__ */ f("div", { className: "panneau__corps", children: [
922
+ U && /* @__PURE__ */ e("p", { className: "message message--" + U.ton, children: U.texte }),
923
+ V.fields.map((u) => /* @__PURE__ */ e(
924
+ re,
829
925
  {
830
- champ: l,
926
+ champ: u,
831
927
  langue: t.langue,
832
- valeur: h[l.key],
833
- changer: (p) => re(l.key, p)
928
+ valeur: x[u.key],
929
+ changer: (m) => le(u.key, m)
834
930
  },
835
- l.key
931
+ u.key
836
932
  ))
837
933
  ] }),
838
- /* @__PURE__ */ b("div", { className: "panneau__pied", children: [
934
+ /* @__PURE__ */ f("div", { className: "panneau__pied", children: [
839
935
  /* @__PURE__ */ e(
840
936
  "button",
841
937
  {
842
938
  type: "button",
843
939
  className: "bouton bouton--discret",
844
940
  onClick: () => i(null),
845
- disabled: z,
941
+ disabled: j,
846
942
  children: "Fermer"
847
943
  }
848
944
  ),
@@ -852,8 +948,8 @@ function fe({ api: n, pont: t }) {
852
948
  {
853
949
  type: "button",
854
950
  className: "bouton bouton--principal",
855
- onClick: ae,
856
- disabled: z,
951
+ onClick: ue,
952
+ disabled: j,
857
953
  children: "Enregistrer"
858
954
  }
859
955
  )
@@ -863,7 +959,7 @@ function fe({ api: n, pont: t }) {
863
959
  )
864
960
  ] });
865
961
  }
866
- const xe = `
962
+ const Se = `
867
963
  :host {
868
964
  all: initial;
869
965
  --fond: #16181d;
@@ -1000,13 +1096,86 @@ const xe = `
1000
1096
  }
1001
1097
 
1002
1098
  .fenetre {
1003
- width: min(420px, 100%);
1004
- max-height: 90vh;
1099
+ position: relative;
1100
+ width: min(408px, 100%);
1101
+ max-height: 92vh;
1005
1102
  overflow-y: auto;
1103
+ padding: 30px 28px 20px;
1006
1104
  border: 1px solid var(--bord);
1007
- border-radius: 12px;
1008
- background: var(--fond);
1009
- box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
1105
+ border-radius: 18px;
1106
+ /* Une lueur d'accent dans le coin superieur : de la presence, sans le
1107
+ degrade violet-bleu qu'on voit sur une page d'accueil sur deux. */
1108
+ background:
1109
+ radial-gradient(120% 90% at 50% -20%, rgba(59, 165, 141, 0.16), transparent 62%),
1110
+ var(--fond);
1111
+ box-shadow: 0 28px 70px rgba(0, 0, 0, 0.55);
1112
+ text-align: center;
1113
+ }
1114
+
1115
+ .fenetre__fermer {
1116
+ position: absolute; top: 12px; right: 12px;
1117
+ width: 30px; height: 30px;
1118
+ display: inline-flex; align-items: center; justify-content: center;
1119
+ border: 0; border-radius: 8px;
1120
+ background: transparent; color: var(--texte-doux);
1121
+ font: inherit; font-size: 14px; cursor: pointer;
1122
+ }
1123
+ .fenetre__fermer:hover { background: var(--fond-clair); color: var(--texte); }
1124
+
1125
+ /* ------------------------------------------------------------ MARQUE ---- */
1126
+
1127
+ .marque {
1128
+ display: inline-flex; align-items: center; gap: 8px;
1129
+ margin-bottom: 18px;
1130
+ }
1131
+ .marque img { width: 22px; height: 22px; display: block; }
1132
+ .marque__mot {
1133
+ font-size: 12px; font-weight: 600;
1134
+ letter-spacing: 0.18em; text-transform: uppercase;
1135
+ color: #6fd3bd;
1136
+ }
1137
+
1138
+ .fenetre__titre {
1139
+ margin: 0 0 6px;
1140
+ font-size: 20px; font-weight: 640; letter-spacing: -0.01em;
1141
+ color: var(--texte);
1142
+ }
1143
+ .fenetre__sous {
1144
+ margin: 0 auto 22px;
1145
+ max-width: 30ch;
1146
+ font-size: 13px; line-height: 1.5; color: var(--texte-doux);
1147
+ }
1148
+ .fenetre__corps { text-align: left; }
1149
+
1150
+ /* ------------------------------------------------------ FOURNISSEURS ---- */
1151
+
1152
+ .fournisseurs { display: flex; flex-direction: column; gap: 10px; }
1153
+
1154
+ .fournisseur {
1155
+ display: flex; align-items: center; justify-content: center; gap: 10px;
1156
+ width: 100%; padding: 12px 16px;
1157
+ border: 1px solid transparent; border-radius: 10px;
1158
+ font: inherit; font-size: 14px; font-weight: 600;
1159
+ cursor: pointer;
1160
+ transition: transform 90ms ease, filter 90ms ease;
1161
+ }
1162
+ .fournisseur:hover { filter: brightness(1.06); }
1163
+ .fournisseur:active { transform: translateY(1px); }
1164
+ .fournisseur:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
1165
+ .fournisseur[disabled] { opacity: 0.55; cursor: default; transform: none; filter: none; }
1166
+ .fournisseur .logo { width: 18px; height: 18px; flex: none; display: block; }
1167
+
1168
+ /* LES COULEURS DE CHAQUE MARQUE, telles qu'elles les publient. Un bouton
1169
+ Google repeint aux couleurs du site devient moins reconnaissable — et un
1170
+ bouton de connexion qu'on ne reconnait pas est un bouton sur lequel on
1171
+ hesite a cliquer. */
1172
+ .fournisseur--google { background: #fff; color: #1f1f1f; border-color: #dadce0; }
1173
+ .fournisseur--facebook { background: #1877f2; color: #fff; }
1174
+
1175
+ .bouton--large { width: 100%; padding: 12px 16px; font-size: 14px; }
1176
+
1177
+ @media (prefers-reduced-motion: reduce) {
1178
+ .fournisseur { transition: none; }
1010
1179
  }
1011
1180
 
1012
1181
  /* ------------------------------------------------------------ CHAMPS ---- */
@@ -1023,7 +1192,11 @@ const xe = `
1023
1192
  text-transform: uppercase; color: var(--texte-doux);
1024
1193
  }
1025
1194
 
1195
+ /* TOUS les types de champs, pas seulement ceux auxquels on pensait. Un
1196
+ type oublie — « password », « email » — retombe sur le style brut du
1197
+ navigateur : une ligne blanche au milieu d'un panneau sombre. */
1026
1198
  input[type="text"], input[type="url"], input[type="number"], input[type="date"],
1199
+ input[type="password"], input[type="email"], input[type="tel"], input[type="search"],
1027
1200
  select, textarea {
1028
1201
  width: 100%;
1029
1202
  padding: 8px 10px;
@@ -1088,7 +1261,7 @@ input:focus, select:focus, textarea:focus {
1088
1261
  @media (prefers-reduced-motion: reduce) {
1089
1262
  * { transition: none !important; animation: none !important; }
1090
1263
  }
1091
- `, he = `
1264
+ `, Te = `
1092
1265
  /* --------------------------------------------------------- CHOIX -------- */
1093
1266
 
1094
1267
  /* Quand un meme texte vient de plusieurs cles, on demande laquelle plutot que
@@ -1138,71 +1311,105 @@ input:focus, select:focus, textarea:focus {
1138
1311
  max-width: min(460px, calc(100vw - 24px));
1139
1312
  }
1140
1313
  .flottant .message { margin: 0; box-shadow: 0 8px 26px rgba(0,0,0,.4); }
1141
- `, ge = "lystech-editeur-hote", ve = "lystech-connexion-hote";
1142
- function te(n) {
1314
+ `, ze = `
1315
+ /* ON NE DOIT JAMAIS SE DEMANDER SI ON EST EN MODE EDITION. Une barre en bas
1316
+ se confond avec un bandeau de temoins ; un lisere qui borde tout l'ecran,
1317
+ present sur chaque page, ne se confond avec rien. Il ne prend aucun clic. */
1318
+ .cadre-global {
1319
+ position: fixed;
1320
+ inset: 0;
1321
+ pointer-events: none;
1322
+ border: 2px solid var(--accent);
1323
+ border-radius: 4px;
1324
+ box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
1325
+ opacity: 0.85;
1326
+ }
1327
+
1328
+ /* EN MODE CIRCULER, le cadre change d'allure. On est toujours connecte — le
1329
+ dire reste necessaire — mais les clics rendent la main aux liens, et rien
1330
+ ne serait plus desagreable que de croire qu'on edite alors qu'on navigue,
1331
+ ou l'inverse. Trait interrompu et plus efface : present, mais en retrait. */
1332
+ .cadre-global--circuler {
1333
+ border-style: dashed;
1334
+ border-color: var(--texte-doux);
1335
+ opacity: 0.5;
1336
+ }
1337
+
1338
+ /* La sortie est rouge au survol seulement : visible quand on la cherche,
1339
+ discrete le reste du temps — c'est le geste qu'on fait une fois. */
1340
+ .bouton--sortie { color: var(--texte-doux); background: transparent; border-color: transparent; }
1341
+ .bouton--sortie:hover { background: rgba(217, 119, 106, 0.16); color: var(--danger); }
1342
+ `, Ue = "lystech-editeur-hote", qe = "lystech-connexion-hote";
1343
+ function ae(n) {
1143
1344
  document.getElementById(n)?.remove();
1144
1345
  const t = document.createElement("div");
1145
1346
  t.id = n, document.body.appendChild(t);
1146
- const c = t.attachShadow({ mode: "open" }), r = document.createElement("style");
1147
- r.textContent = xe + he, c.appendChild(r);
1347
+ const s = t.attachShadow({ mode: "open" }), r = document.createElement("style");
1348
+ r.textContent = Se + Te + ze, s.appendChild(r);
1148
1349
  const a = document.createElement("div");
1149
- return c.appendChild(a), { hote: t, point: a };
1350
+ return s.appendChild(a), { hote: t, point: a };
1150
1351
  }
1151
- function ne(n, t) {
1152
- let c = n;
1352
+ function se(n, t) {
1353
+ let s = n;
1153
1354
  return () => {
1154
- const r = c;
1155
- c = null, setTimeout(() => {
1355
+ const r = s;
1356
+ s = null, setTimeout(() => {
1156
1357
  r?.unmount(), t.remove();
1157
1358
  }, 0);
1158
1359
  };
1159
1360
  }
1160
- function we({
1361
+ function je({
1161
1362
  site: n,
1162
1363
  apiBaseUrl: t,
1163
- surJeton: c
1364
+ methodes: s,
1365
+ surJeton: r
1164
1366
  }) {
1165
- const { hote: r, point: a } = te(ve), f = Z(a), u = () => m();
1166
- f.render(
1367
+ const { hote: a, point: d } = ae(qe), l = oe(d), b = () => o();
1368
+ l.render(
1167
1369
  /* @__PURE__ */ e(
1168
- ce,
1370
+ ve,
1169
1371
  {
1170
1372
  site: n,
1171
1373
  apiBaseUrl: t,
1172
- surJeton: (o) => {
1173
- m(), c(o);
1374
+ ...s ? { methodes: s } : {},
1375
+ surJeton: (i) => {
1376
+ o(), r(i);
1174
1377
  },
1175
- surFermer: u
1378
+ surFermer: b
1176
1379
  }
1177
1380
  )
1178
1381
  );
1179
- const m = ne(f, r);
1180
- return m;
1382
+ const o = se(l, a);
1383
+ return o;
1181
1384
  }
1182
- function ke({
1385
+ function Re({
1183
1386
  jeton: n,
1184
1387
  site: t,
1185
- apiBaseUrl: c,
1388
+ apiBaseUrl: s,
1186
1389
  pont: r
1187
1390
  }) {
1188
- const { hote: a, point: f } = te(ge), u = Z(f), m = () => {
1391
+ const { hote: a, point: d } = ae(Ue), l = oe(d), b = () => {
1392
+ try {
1393
+ window.localStorage.setItem("lystech-edit-sortie", "1"), window.localStorage.removeItem("lystech-edit");
1394
+ } catch {
1395
+ }
1189
1396
  try {
1190
1397
  window.sessionStorage.removeItem("lystech-edit");
1191
1398
  } catch {
1192
1399
  }
1193
1400
  window.location.reload();
1194
1401
  };
1195
- return u.render(
1402
+ return l.render(
1196
1403
  /* @__PURE__ */ e(
1197
- fe,
1404
+ Ee,
1198
1405
  {
1199
- api: se({ jeton: n, site: t, apiBaseUrl: c, surJetonRefuse: m }),
1406
+ api: me({ jeton: n, site: t, apiBaseUrl: s, surJetonRefuse: b }),
1200
1407
  pont: r
1201
1408
  }
1202
1409
  )
1203
- ), ne(u, a);
1410
+ ), se(l, a);
1204
1411
  }
1205
1412
  export {
1206
- we as monterConnexion,
1207
- ke as monterEditeur
1413
+ je as monterConnexion,
1414
+ Re as monterEditeur
1208
1415
  };