@wix/himalaya-cli 0.2045.0 → 0.2047.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (305) hide show
  1. package/dist/cli.mjs +0 -2
  2. package/package.json +2 -2
  3. package/templates/beauty-salon/l10n/ar.json +5 -0
  4. package/templates/beauty-salon/l10n/cs.json +5 -0
  5. package/templates/beauty-salon/l10n/da.json +5 -0
  6. package/templates/beauty-salon/l10n/de.json +5 -0
  7. package/templates/beauty-salon/l10n/el.json +5 -0
  8. package/templates/beauty-salon/l10n/es.json +5 -0
  9. package/templates/beauty-salon/l10n/fi.json +5 -0
  10. package/templates/beauty-salon/l10n/fr.json +5 -0
  11. package/templates/beauty-salon/l10n/he.json +4 -0
  12. package/templates/beauty-salon/l10n/hu.json +5 -0
  13. package/templates/beauty-salon/l10n/id.json +5 -0
  14. package/templates/beauty-salon/l10n/it.json +5 -0
  15. package/templates/beauty-salon/l10n/ja.json +5 -0
  16. package/templates/beauty-salon/l10n/ko.json +5 -0
  17. package/templates/beauty-salon/l10n/lt.json +5 -0
  18. package/templates/beauty-salon/l10n/nl.json +5 -0
  19. package/templates/beauty-salon/l10n/no.json +5 -0
  20. package/templates/beauty-salon/l10n/pl.json +5 -0
  21. package/templates/beauty-salon/l10n/pt.json +5 -0
  22. package/templates/beauty-salon/l10n/ru.json +5 -0
  23. package/templates/beauty-salon/l10n/sv.json +5 -0
  24. package/templates/beauty-salon/l10n/th.json +5 -0
  25. package/templates/beauty-salon/l10n/tr.json +5 -0
  26. package/templates/beauty-salon/l10n/uk.json +5 -0
  27. package/templates/beauty-salon/l10n/vi.json +5 -0
  28. package/templates/beauty-salon/l10n/zh.json +5 -0
  29. package/templates/beauty-salon/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  30. package/templates/branded-lite/l10n/ar.json +5 -0
  31. package/templates/branded-lite/l10n/cs.json +5 -0
  32. package/templates/branded-lite/l10n/da.json +5 -0
  33. package/templates/branded-lite/l10n/de.json +5 -0
  34. package/templates/branded-lite/l10n/el.json +5 -0
  35. package/templates/branded-lite/l10n/es.json +5 -0
  36. package/templates/branded-lite/l10n/fi.json +5 -0
  37. package/templates/branded-lite/l10n/fr.json +5 -0
  38. package/templates/branded-lite/l10n/he.json +4 -0
  39. package/templates/branded-lite/l10n/hu.json +5 -0
  40. package/templates/branded-lite/l10n/id.json +5 -0
  41. package/templates/branded-lite/l10n/it.json +5 -0
  42. package/templates/branded-lite/l10n/ja.json +5 -0
  43. package/templates/branded-lite/l10n/ko.json +5 -0
  44. package/templates/branded-lite/l10n/lt.json +5 -0
  45. package/templates/branded-lite/l10n/nl.json +5 -0
  46. package/templates/branded-lite/l10n/no.json +5 -0
  47. package/templates/branded-lite/l10n/pl.json +5 -0
  48. package/templates/branded-lite/l10n/pt.json +5 -0
  49. package/templates/branded-lite/l10n/ru.json +5 -0
  50. package/templates/branded-lite/l10n/sv.json +5 -0
  51. package/templates/branded-lite/l10n/th.json +5 -0
  52. package/templates/branded-lite/l10n/tr.json +5 -0
  53. package/templates/branded-lite/l10n/uk.json +5 -0
  54. package/templates/branded-lite/l10n/vi.json +5 -0
  55. package/templates/branded-lite/l10n/zh.json +5 -0
  56. package/templates/branded-lite/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  57. package/templates/brandy/config.ts +1 -0
  58. package/templates/brandy/dev/member-screens.ts +1619 -411
  59. package/templates/brandy/tier5-src/_shared/empty-flags.ts +33 -0
  60. package/templates/brandy/tier5-src/_shared/push-permission.ts +75 -0
  61. package/templates/brandy/tier5-src/himi-branded-lite-notifsettings/index.ts +455 -0
  62. package/templates/community-club/l10n/ar.json +5 -0
  63. package/templates/community-club/l10n/cs.json +5 -0
  64. package/templates/community-club/l10n/da.json +5 -0
  65. package/templates/community-club/l10n/de.json +5 -0
  66. package/templates/community-club/l10n/el.json +5 -0
  67. package/templates/community-club/l10n/es.json +5 -0
  68. package/templates/community-club/l10n/fi.json +5 -0
  69. package/templates/community-club/l10n/fr.json +5 -0
  70. package/templates/community-club/l10n/he.json +4 -0
  71. package/templates/community-club/l10n/hu.json +5 -0
  72. package/templates/community-club/l10n/id.json +5 -0
  73. package/templates/community-club/l10n/it.json +5 -0
  74. package/templates/community-club/l10n/ja.json +5 -0
  75. package/templates/community-club/l10n/ko.json +5 -0
  76. package/templates/community-club/l10n/lt.json +5 -0
  77. package/templates/community-club/l10n/nl.json +5 -0
  78. package/templates/community-club/l10n/no.json +5 -0
  79. package/templates/community-club/l10n/pl.json +5 -0
  80. package/templates/community-club/l10n/pt.json +5 -0
  81. package/templates/community-club/l10n/ru.json +5 -0
  82. package/templates/community-club/l10n/sv.json +5 -0
  83. package/templates/community-club/l10n/th.json +5 -0
  84. package/templates/community-club/l10n/tr.json +5 -0
  85. package/templates/community-club/l10n/uk.json +5 -0
  86. package/templates/community-club/l10n/vi.json +5 -0
  87. package/templates/community-club/l10n/zh.json +5 -0
  88. package/templates/community-club/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  89. package/templates/events-meetups/l10n/ar.json +5 -0
  90. package/templates/events-meetups/l10n/cs.json +5 -0
  91. package/templates/events-meetups/l10n/da.json +5 -0
  92. package/templates/events-meetups/l10n/de.json +5 -0
  93. package/templates/events-meetups/l10n/el.json +5 -0
  94. package/templates/events-meetups/l10n/es.json +5 -0
  95. package/templates/events-meetups/l10n/fi.json +5 -0
  96. package/templates/events-meetups/l10n/fr.json +5 -0
  97. package/templates/events-meetups/l10n/he.json +4 -0
  98. package/templates/events-meetups/l10n/hu.json +5 -0
  99. package/templates/events-meetups/l10n/id.json +5 -0
  100. package/templates/events-meetups/l10n/it.json +5 -0
  101. package/templates/events-meetups/l10n/ja.json +5 -0
  102. package/templates/events-meetups/l10n/ko.json +5 -0
  103. package/templates/events-meetups/l10n/lt.json +5 -0
  104. package/templates/events-meetups/l10n/nl.json +5 -0
  105. package/templates/events-meetups/l10n/no.json +5 -0
  106. package/templates/events-meetups/l10n/pl.json +5 -0
  107. package/templates/events-meetups/l10n/pt.json +5 -0
  108. package/templates/events-meetups/l10n/ru.json +5 -0
  109. package/templates/events-meetups/l10n/sv.json +5 -0
  110. package/templates/events-meetups/l10n/th.json +5 -0
  111. package/templates/events-meetups/l10n/tr.json +5 -0
  112. package/templates/events-meetups/l10n/uk.json +5 -0
  113. package/templates/events-meetups/l10n/vi.json +5 -0
  114. package/templates/events-meetups/l10n/zh.json +5 -0
  115. package/templates/events-meetups/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  116. package/templates/gym-fitness/l10n/ar.json +5 -0
  117. package/templates/gym-fitness/l10n/cs.json +5 -0
  118. package/templates/gym-fitness/l10n/da.json +5 -0
  119. package/templates/gym-fitness/l10n/de.json +5 -0
  120. package/templates/gym-fitness/l10n/el.json +5 -0
  121. package/templates/gym-fitness/l10n/es.json +5 -0
  122. package/templates/gym-fitness/l10n/fi.json +5 -0
  123. package/templates/gym-fitness/l10n/fr.json +5 -0
  124. package/templates/gym-fitness/l10n/he.json +4 -0
  125. package/templates/gym-fitness/l10n/hu.json +5 -0
  126. package/templates/gym-fitness/l10n/id.json +5 -0
  127. package/templates/gym-fitness/l10n/it.json +5 -0
  128. package/templates/gym-fitness/l10n/ja.json +5 -0
  129. package/templates/gym-fitness/l10n/ko.json +5 -0
  130. package/templates/gym-fitness/l10n/lt.json +5 -0
  131. package/templates/gym-fitness/l10n/nl.json +5 -0
  132. package/templates/gym-fitness/l10n/no.json +5 -0
  133. package/templates/gym-fitness/l10n/pl.json +5 -0
  134. package/templates/gym-fitness/l10n/pt.json +5 -0
  135. package/templates/gym-fitness/l10n/ru.json +5 -0
  136. package/templates/gym-fitness/l10n/sv.json +5 -0
  137. package/templates/gym-fitness/l10n/th.json +5 -0
  138. package/templates/gym-fitness/l10n/tr.json +5 -0
  139. package/templates/gym-fitness/l10n/uk.json +5 -0
  140. package/templates/gym-fitness/l10n/vi.json +5 -0
  141. package/templates/gym-fitness/l10n/zh.json +5 -0
  142. package/templates/gym-fitness/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  143. package/templates/nonprofit-cause/l10n/ar.json +5 -0
  144. package/templates/nonprofit-cause/l10n/cs.json +5 -0
  145. package/templates/nonprofit-cause/l10n/da.json +5 -0
  146. package/templates/nonprofit-cause/l10n/de.json +5 -0
  147. package/templates/nonprofit-cause/l10n/el.json +5 -0
  148. package/templates/nonprofit-cause/l10n/es.json +5 -0
  149. package/templates/nonprofit-cause/l10n/fi.json +5 -0
  150. package/templates/nonprofit-cause/l10n/fr.json +5 -0
  151. package/templates/nonprofit-cause/l10n/he.json +4 -0
  152. package/templates/nonprofit-cause/l10n/hu.json +5 -0
  153. package/templates/nonprofit-cause/l10n/id.json +5 -0
  154. package/templates/nonprofit-cause/l10n/it.json +5 -0
  155. package/templates/nonprofit-cause/l10n/ja.json +5 -0
  156. package/templates/nonprofit-cause/l10n/ko.json +5 -0
  157. package/templates/nonprofit-cause/l10n/lt.json +5 -0
  158. package/templates/nonprofit-cause/l10n/nl.json +5 -0
  159. package/templates/nonprofit-cause/l10n/no.json +5 -0
  160. package/templates/nonprofit-cause/l10n/pl.json +5 -0
  161. package/templates/nonprofit-cause/l10n/pt.json +5 -0
  162. package/templates/nonprofit-cause/l10n/ru.json +5 -0
  163. package/templates/nonprofit-cause/l10n/sv.json +5 -0
  164. package/templates/nonprofit-cause/l10n/th.json +5 -0
  165. package/templates/nonprofit-cause/l10n/tr.json +5 -0
  166. package/templates/nonprofit-cause/l10n/uk.json +5 -0
  167. package/templates/nonprofit-cause/l10n/vi.json +5 -0
  168. package/templates/nonprofit-cause/l10n/zh.json +5 -0
  169. package/templates/nonprofit-cause/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  170. package/templates/personal-fitness-trainer/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  171. package/templates/podcast-creator/l10n/ar.json +5 -0
  172. package/templates/podcast-creator/l10n/cs.json +5 -0
  173. package/templates/podcast-creator/l10n/da.json +5 -0
  174. package/templates/podcast-creator/l10n/de.json +5 -0
  175. package/templates/podcast-creator/l10n/el.json +5 -0
  176. package/templates/podcast-creator/l10n/es.json +5 -0
  177. package/templates/podcast-creator/l10n/fi.json +5 -0
  178. package/templates/podcast-creator/l10n/fr.json +5 -0
  179. package/templates/podcast-creator/l10n/he.json +4 -0
  180. package/templates/podcast-creator/l10n/hu.json +5 -0
  181. package/templates/podcast-creator/l10n/id.json +5 -0
  182. package/templates/podcast-creator/l10n/it.json +5 -0
  183. package/templates/podcast-creator/l10n/ja.json +5 -0
  184. package/templates/podcast-creator/l10n/ko.json +5 -0
  185. package/templates/podcast-creator/l10n/lt.json +5 -0
  186. package/templates/podcast-creator/l10n/nl.json +5 -0
  187. package/templates/podcast-creator/l10n/no.json +5 -0
  188. package/templates/podcast-creator/l10n/pl.json +5 -0
  189. package/templates/podcast-creator/l10n/pt.json +5 -0
  190. package/templates/podcast-creator/l10n/ru.json +5 -0
  191. package/templates/podcast-creator/l10n/sv.json +5 -0
  192. package/templates/podcast-creator/l10n/th.json +5 -0
  193. package/templates/podcast-creator/l10n/tr.json +5 -0
  194. package/templates/podcast-creator/l10n/uk.json +5 -0
  195. package/templates/podcast-creator/l10n/vi.json +5 -0
  196. package/templates/podcast-creator/l10n/zh.json +5 -0
  197. package/templates/podcast-creator/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  198. package/templates/portfolio-creative/l10n/ar.json +5 -0
  199. package/templates/portfolio-creative/l10n/cs.json +5 -0
  200. package/templates/portfolio-creative/l10n/da.json +5 -0
  201. package/templates/portfolio-creative/l10n/de.json +5 -0
  202. package/templates/portfolio-creative/l10n/el.json +5 -0
  203. package/templates/portfolio-creative/l10n/es.json +5 -0
  204. package/templates/portfolio-creative/l10n/fi.json +5 -0
  205. package/templates/portfolio-creative/l10n/fr.json +5 -0
  206. package/templates/portfolio-creative/l10n/he.json +4 -0
  207. package/templates/portfolio-creative/l10n/hu.json +5 -0
  208. package/templates/portfolio-creative/l10n/id.json +5 -0
  209. package/templates/portfolio-creative/l10n/it.json +5 -0
  210. package/templates/portfolio-creative/l10n/ja.json +5 -0
  211. package/templates/portfolio-creative/l10n/ko.json +5 -0
  212. package/templates/portfolio-creative/l10n/lt.json +5 -0
  213. package/templates/portfolio-creative/l10n/nl.json +5 -0
  214. package/templates/portfolio-creative/l10n/no.json +5 -0
  215. package/templates/portfolio-creative/l10n/pl.json +5 -0
  216. package/templates/portfolio-creative/l10n/pt.json +5 -0
  217. package/templates/portfolio-creative/l10n/ru.json +5 -0
  218. package/templates/portfolio-creative/l10n/sv.json +5 -0
  219. package/templates/portfolio-creative/l10n/th.json +5 -0
  220. package/templates/portfolio-creative/l10n/tr.json +5 -0
  221. package/templates/portfolio-creative/l10n/uk.json +5 -0
  222. package/templates/portfolio-creative/l10n/vi.json +5 -0
  223. package/templates/portfolio-creative/l10n/zh.json +5 -0
  224. package/templates/portfolio-creative/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  225. package/templates/restaurant/l10n/ar.json +5 -0
  226. package/templates/restaurant/l10n/cs.json +5 -0
  227. package/templates/restaurant/l10n/da.json +5 -0
  228. package/templates/restaurant/l10n/de.json +5 -0
  229. package/templates/restaurant/l10n/el.json +5 -0
  230. package/templates/restaurant/l10n/es.json +5 -0
  231. package/templates/restaurant/l10n/fi.json +5 -0
  232. package/templates/restaurant/l10n/fr.json +5 -0
  233. package/templates/restaurant/l10n/he.json +4 -0
  234. package/templates/restaurant/l10n/hu.json +5 -0
  235. package/templates/restaurant/l10n/id.json +5 -0
  236. package/templates/restaurant/l10n/it.json +5 -0
  237. package/templates/restaurant/l10n/ja.json +5 -0
  238. package/templates/restaurant/l10n/ko.json +5 -0
  239. package/templates/restaurant/l10n/lt.json +5 -0
  240. package/templates/restaurant/l10n/nl.json +5 -0
  241. package/templates/restaurant/l10n/no.json +5 -0
  242. package/templates/restaurant/l10n/pl.json +5 -0
  243. package/templates/restaurant/l10n/pt.json +5 -0
  244. package/templates/restaurant/l10n/ru.json +5 -0
  245. package/templates/restaurant/l10n/sv.json +5 -0
  246. package/templates/restaurant/l10n/th.json +5 -0
  247. package/templates/restaurant/l10n/tr.json +5 -0
  248. package/templates/restaurant/l10n/uk.json +5 -0
  249. package/templates/restaurant/l10n/vi.json +5 -0
  250. package/templates/restaurant/l10n/zh.json +5 -0
  251. package/templates/restaurant/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  252. package/templates/retail-store/l10n/ar.json +5 -0
  253. package/templates/retail-store/l10n/cs.json +5 -0
  254. package/templates/retail-store/l10n/da.json +5 -0
  255. package/templates/retail-store/l10n/de.json +5 -0
  256. package/templates/retail-store/l10n/el.json +5 -0
  257. package/templates/retail-store/l10n/es.json +5 -0
  258. package/templates/retail-store/l10n/fi.json +5 -0
  259. package/templates/retail-store/l10n/fr.json +5 -0
  260. package/templates/retail-store/l10n/he.json +4 -0
  261. package/templates/retail-store/l10n/hu.json +5 -0
  262. package/templates/retail-store/l10n/id.json +5 -0
  263. package/templates/retail-store/l10n/it.json +5 -0
  264. package/templates/retail-store/l10n/ja.json +5 -0
  265. package/templates/retail-store/l10n/ko.json +5 -0
  266. package/templates/retail-store/l10n/lt.json +5 -0
  267. package/templates/retail-store/l10n/nl.json +5 -0
  268. package/templates/retail-store/l10n/no.json +5 -0
  269. package/templates/retail-store/l10n/pl.json +5 -0
  270. package/templates/retail-store/l10n/pt.json +5 -0
  271. package/templates/retail-store/l10n/ru.json +5 -0
  272. package/templates/retail-store/l10n/sv.json +5 -0
  273. package/templates/retail-store/l10n/th.json +5 -0
  274. package/templates/retail-store/l10n/tr.json +5 -0
  275. package/templates/retail-store/l10n/uk.json +5 -0
  276. package/templates/retail-store/l10n/vi.json +5 -0
  277. package/templates/retail-store/l10n/zh.json +5 -0
  278. package/templates/retail-store/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
  279. package/templates/yoga-studio/l10n/ar.json +5 -0
  280. package/templates/yoga-studio/l10n/cs.json +5 -0
  281. package/templates/yoga-studio/l10n/da.json +5 -0
  282. package/templates/yoga-studio/l10n/de.json +5 -0
  283. package/templates/yoga-studio/l10n/el.json +5 -0
  284. package/templates/yoga-studio/l10n/es.json +5 -0
  285. package/templates/yoga-studio/l10n/fi.json +5 -0
  286. package/templates/yoga-studio/l10n/fr.json +5 -0
  287. package/templates/yoga-studio/l10n/he.json +4 -0
  288. package/templates/yoga-studio/l10n/hu.json +5 -0
  289. package/templates/yoga-studio/l10n/id.json +5 -0
  290. package/templates/yoga-studio/l10n/it.json +5 -0
  291. package/templates/yoga-studio/l10n/ja.json +5 -0
  292. package/templates/yoga-studio/l10n/ko.json +5 -0
  293. package/templates/yoga-studio/l10n/lt.json +5 -0
  294. package/templates/yoga-studio/l10n/nl.json +5 -0
  295. package/templates/yoga-studio/l10n/no.json +5 -0
  296. package/templates/yoga-studio/l10n/pl.json +5 -0
  297. package/templates/yoga-studio/l10n/pt.json +5 -0
  298. package/templates/yoga-studio/l10n/ru.json +5 -0
  299. package/templates/yoga-studio/l10n/sv.json +5 -0
  300. package/templates/yoga-studio/l10n/th.json +5 -0
  301. package/templates/yoga-studio/l10n/tr.json +5 -0
  302. package/templates/yoga-studio/l10n/uk.json +5 -0
  303. package/templates/yoga-studio/l10n/vi.json +5 -0
  304. package/templates/yoga-studio/l10n/zh.json +5 -0
  305. package/templates/yoga-studio/tier5-src/himi-branded-lite-notifsettings/index.ts +225 -45
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Prisijunkite, kad galėtumėte tvarkyti pranešimus.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Nepavyko išsaugoti pranešimų nustatymų. Bandykite dar kartą.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Nemokamai",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Log in om je meldingen te beheren.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Meldingsinstellingen konden niet worden opgeslagen. Probeer het opnieuw.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Gratis",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Logg inn for å administrere varslene dine.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Kunne ikke lagre varslingsinnstillingene. Prøv igjen.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Gratis",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Zaloguj się, aby zarządzać powiadomieniami.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Nie udało się zapisać ustawień powiadomień. Spróbuj ponownie.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Za darmo",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Faça login para gerenciar suas notificações.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Não foi possível salvar as configurações de notificação. Tente novamente.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Grátis",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Войдите, чтобы управлять уведомлениями.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Не удалось сохранить настройки уведомлений. Попробуйте ещё раз.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Бесплатно",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Logga in för att hantera dina notiser.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Det gick inte att spara notisinställningarna. Försök igen.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Gratis",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "เข้าสู่ระบบเพื่อจัดการการแจ้งเตือนของคุณ",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "ไม่สามารถบันทึกการตั้งค่าการแจ้งเตือนได้ โปรดลองอีกครั้ง",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "ฟรี",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Bildirimlerinizi yönetmek için giriş yapın.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Bildirim ayarları kaydedilemedi. Tekrar deneyin.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Ücretsiz",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Увійдіть, щоб керувати сповіщеннями.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Не вдалося зберегти налаштування сповіщень. Спробуйте ще раз.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Безкоштовно",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "Đăng nhập để quản lý thông báo của bạn.",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "Không thể lưu cài đặt thông báo. Vui lòng thử lại.",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "Miễn phí",
@@ -2868,6 +2868,11 @@
2868
2868
  "translation": "登入後即可管理您的通知。",
2869
2869
  "origin": "machine"
2870
2870
  },
2871
+ "h_8d5f95beb674": {
2872
+ "source": "Couldn't save your notification settings. Try again.",
2873
+ "translation": "无法保存通知设置。请重试。",
2874
+ "origin": "machine"
2875
+ },
2871
2876
  "h_75f527181b57": {
2872
2877
  "source": "Free",
2873
2878
  "translation": "免費",
@@ -4,8 +4,8 @@ import { withOnlineWrites } from "../_shared/online-actions.js";
4
4
  // visitor) and an empty one is a real empty state — never sample rows presented as
5
5
  // the customer's own. Samples appear only in the host's explicit sample preview
6
6
  // (_shared/branded-load-state.ts).
7
- // any exist. INTERACTIVE: tapping a row toggles that topic On/Off — optimistic +
8
- // best-effort upsertMyNotificationPreferences (a no-op on sample rows).
7
+ // any exist. INTERACTIVE: tapping a row toggles that topic On/Off at once; a failed
8
+ // upsertMyNotificationPreferences puts it back and says so (a no-op on sample rows).
9
9
  //
10
10
  // A saved preference is only half the truth: the PHONE's permission decides whether anything
11
11
  // arrives. So the screen also reads it (declares "push"): denied ⇒ "off on this phone" + Open
@@ -30,11 +30,67 @@ import {
30
30
  preferenceFor,
31
31
  type NotificationTopicDefinition,
32
32
  type PreferenceInfo,
33
+ type Channel,
33
34
  } from "@himalaya/wix-notification-preferences";
34
35
 
35
- /** The channel this surface delivers on — read for the row state, written on toggle.
36
- * One constant, so the read and the write cannot drift apart. */
37
- const CHANNEL = "MOBILE";
36
+ /** The channels a member can pick (WebShell's Push / Email). Without the `channels` option the
37
+ * screen stays on push, as Branded Lite always was. One map, so a row's read and its write
38
+ * cannot drift apart. */
39
+ type ChannelId = "push" | "email";
40
+ const WIX_CHANNEL: Record<ChannelId, Channel> = { push: "MOBILE", email: "EMAIL" };
41
+
42
+ /** WebShell's options, set by the screen's load params ("1" = on). Off: Branded Lite's screen. */
43
+ const options = { channels: false, allowAll: false };
44
+ function readOptions(arg: unknown): void {
45
+ if (!arg || typeof arg !== "object" || !("channels" in arg || "allowAll" in arg)) return;
46
+ const a = arg as Record<string, unknown>;
47
+ options.channels = a.channels === "1";
48
+ options.allowAll = a.allowAll === "1";
49
+ }
50
+
51
+ /** The last read of the site's topics and the member's rows on every channel, so switching
52
+ * channel re-derives the switches without a second read. */
53
+ let definitions: NotificationTopicDefinition[] = [];
54
+ let preferences: PreferenceInfo[] = [];
55
+
56
+ /** A successful write, recorded so the other channel and back shows what was saved. The server's own row
57
+ * wins when the response carries it: its `granted` / `overridden` verdict decides whether the switch is on
58
+ * and editable, which the requested mute state alone cannot tell. */
59
+ function rememberWrites(written: PreferenceInfo[], response: unknown, seq: number): void {
60
+ const returned = readPreferences(response as Parameters<typeof readPreferences>[0]);
61
+ const same = (a: PreferenceInfo, b: PreferenceInfo) => a.topicId === b.topicId && a.channel === b.channel;
62
+ // A newer save of the same row already answered, and the server applies saves in the order sent, so
63
+ // this older answer is not its last word. A failed save marks nothing: an older success still counts.
64
+ const rows = written.filter((w) => (lastSaved.get(keyOf(w)) ?? 0) < seq).map((w) => returned.find((r) => same(r, w)) ?? w);
65
+ for (const r of rows) lastSaved.set(keyOf(r), seq);
66
+ preferences = [...preferences.filter((p) => !rows.some((r) => same(r, p))), ...rows];
67
+ }
68
+ const keyOf = (p: PreferenceInfo) => `${p.topicId}\u0000${p.channel}`;
69
+ let writeSeq = 0;
70
+ /** Per row, the send order of the newest save whose answer is in the cache. */
71
+ const lastSaved = new Map<string, number>();
72
+ /** Saves go out one at a time, in tap order: nothing else makes the server apply them in the order
73
+ * `lastSaved` assumes. A tap takes its place in the queue before its first await, so a slow member
74
+ * check cannot let a later tap send first. A tap that writes nothing gives its place up, and a failed
75
+ * save does not stop the next. A save that waited is sent only if its member is still the one signed
76
+ * in, so it never lands on another account. */
77
+ let saveQueue: Promise<unknown> = Promise.resolve();
78
+ interface SaveSlot { seq: number; send(written: PreferenceInfo[], member: MemberAccess): Promise<unknown>; cancel(): void }
79
+ function reserveSave(): SaveSlot {
80
+ const seq = ++writeSeq;
81
+ let fill!: (run: (() => Promise<unknown>) | null) => void;
82
+ const job = new Promise<(() => Promise<unknown>) | null>((resolve) => { fill = resolve; });
83
+ const sent = saveQueue.then(() => job).then((run) => (run ? run() : undefined));
84
+ saveQueue = sent.catch(() => undefined);
85
+ return {
86
+ seq,
87
+ send: (written, member) => {
88
+ fill(async () => { await assertMemberAccess(member); return upsertMyNotificationPreferences(written); });
89
+ return sent;
90
+ },
91
+ cancel: () => fill(null),
92
+ };
93
+ }
38
94
 
39
95
  /** `note` is the line under a row's switch — only a locked topic has one. */
40
96
  interface Row { id: string; name: string; subtitle: string; note: string; on: boolean; locked: boolean;
@@ -59,6 +115,12 @@ interface S extends LoadFlags {
59
115
  /** The topic switches' opacity: dimmed while the phone blocks notifications. */
60
116
  topicsOpacity: number;
61
117
  pushMessage: string;
118
+ /** The picked channel, and the hiddenWhen flag of its picker (true without the option). */
119
+ channel: ChannelId; hideChannels: boolean;
120
+ /** "Allow all": on when every changeable topic is on. One switch per channel, each with its own static
121
+ * label (a native switch draws its label as catalog text, never a `$service:` path); each is hidden
122
+ * without the option, without topics, or on the other channel. */
123
+ allOn: boolean; hideAllowAllPush: boolean; hideAllowAllEmail: boolean;
62
124
  /** Transient: the runtime strips it and arms the foreground-refresh poll. */
63
125
  _poll?: PollDirective;
64
126
  }
@@ -89,15 +151,15 @@ const OPEN_FAILED = () => copyParam("notifsettings.openSettingsFailed", "Change
89
151
  * member unmuted under a channel-wide mute renders OFF instead of promising a
90
152
  * notification that will never arrive. No preference row at all ⇒ the topic's default,
91
153
  * which is delivery. */
92
- function isOn(topicId: string, prefs: PreferenceInfo[]): boolean {
93
- const p = preferenceFor(topicId, prefs, CHANNEL);
154
+ function isOn(topicId: string, prefs: PreferenceInfo[], channel: Channel): boolean {
155
+ const p = preferenceFor(topicId, prefs, channel);
94
156
  if (!p) return true;
95
157
  return isDeliveredNow(p.stateData);
96
158
  }
97
159
 
98
160
  /** A row the server says cannot be changed here (a broader rule overrides it). */
99
- function locked(topicId: string, prefs: PreferenceInfo[]): boolean {
100
- return isLocked(preferenceFor(topicId, prefs, CHANNEL)?.stateData);
161
+ function locked(topicId: string, prefs: PreferenceInfo[], channel: Channel): boolean {
162
+ return isLocked(preferenceFor(topicId, prefs, channel)?.stateData);
101
163
  }
102
164
 
103
165
  /** Row subtitle doubles as an affordance: current state + how to change it. */
@@ -105,16 +167,23 @@ function subtitleFor(on: boolean): string {
105
167
  return on ? "On · tap to mute" : "Off · tap to enable";
106
168
  }
107
169
 
170
+ function withOn(r: Row, on: boolean): Row {
171
+ return { ...r, on, subtitle: subtitleFor(on), stateLabel: on ? "On" : "Off" };
172
+ }
173
+
108
174
  function row(id: string, name: string, on: boolean): Row {
109
175
  return { id, name, subtitle: subtitleFor(on), note: "", on, locked: false, notLocked: true, stateLabel: on ? "On" : "Off" };
110
176
  }
111
177
 
112
- function norm(t: NotificationTopicDefinition, prefs: PreferenceInfo[]): Row {
113
- const name = (t.displayName || "Notification").trim() || "Notification";
114
- const id = t.topicId || name;
115
- const r = row(id, name, isOn(id, prefs));
178
+ const topicName = (t: NotificationTopicDefinition) => (t.displayName || "Notification").trim() || "Notification";
179
+ /** A row's id: the topic id, or its name when the definition has none. */
180
+ const rowId = (t: NotificationTopicDefinition) => t.topicId || topicName(t);
181
+ function norm(t: NotificationTopicDefinition, prefs: PreferenceInfo[], channel: Channel): Row {
182
+ const name = topicName(t);
183
+ const id = rowId(t);
184
+ const r = row(id, name, isOn(id, prefs, channel));
116
185
  // An overridden row says so instead of offering a toggle that cannot take effect.
117
- return locked(id, prefs)
186
+ return locked(id, prefs, channel)
118
187
  ? { ...r, locked: true, notLocked: false, subtitle: "Managed by your channel settings", note: "Managed by your channel settings" }
119
188
  : r;
120
189
  }
@@ -136,7 +205,52 @@ const COPY: LoadCopy<Row> = {
136
205
  sample: () => MOCK.map((r) => ({ ...r })),
137
206
  };
138
207
 
139
- const defineService = withOnlineWrites(registerService, ["toggle"], { messageFields: ["actionMessage"] });
208
+ const defineService = withOnlineWrites(registerService, ["toggle", "toggleAll"], { messageFields: ["actionMessage"] });
209
+
210
+ const SAVE_FAILED = () => copyParam("notifsettings.saveFailed", "Couldn't save your notification settings. Try again.");
211
+
212
+ /** The rows for one channel, from the last read plus every write since. */
213
+ function rowsFor(channel: ChannelId): Row[] {
214
+ return definitions.map((t) => norm(t, preferences, WIX_CHANNEL[channel]));
215
+ }
216
+ /** One topic's row, without rebuilding the others. */
217
+ function rowFor(channel: ChannelId, id: string): Row | undefined {
218
+ const t = definitions.find((d) => rowId(d) === id);
219
+ return t ? norm(t, preferences, WIX_CHANNEL[channel]) : undefined;
220
+ }
221
+
222
+ /** The channel-dependent fields, derived after every action so no reducer can leave them stale.
223
+ * Email reaches the member whatever the phone allows, so only push switches are dimmed. */
224
+ function channelView<T extends S>(s: T): T {
225
+ const channel: ChannelId = options.channels ? s.channel : "push";
226
+ const changeable = s.topics.filter((r) => !r.locked);
227
+ return {
228
+ ...s,
229
+ channel,
230
+ // No topics (loading, signed out, failed): nothing to pick a channel for.
231
+ hideChannels: !options.channels || s.topics.length === 0,
232
+ allOn: changeable.length > 0 && changeable.every((r) => r.on),
233
+ hideAllowAllPush: !options.allowAll || changeable.length === 0 || channel !== "push",
234
+ hideAllowAllEmail: !options.allowAll || changeable.length === 0 || channel !== "email",
235
+ ...(channel === "email" ? { topicsOpacity: 1 } : {}),
236
+ };
237
+ }
238
+
239
+ // Typed like `withEmptyFlags`: D passes through untouched, so each action keeps its own parameter types.
240
+ type Action = (s: S, ...args: unknown[]) => unknown;
241
+ function withChannelView<D extends { state: object; actions?: object }>(def: D): D {
242
+ const derive = (r: unknown) => (r && typeof r === "object" ? channelView(r as S) : r);
243
+ const actions: Record<string, Action> = {};
244
+ for (const [name, action] of Object.entries((def.actions ?? {}) as Record<string, Action>)) {
245
+ actions[name] = (s, ...args) => {
246
+ const r = action(s, ...args);
247
+ return r instanceof Promise ? r.then(derive) : derive(r);
248
+ };
249
+ }
250
+ return { ...def, state: channelView(def.state as S), actions } as D;
251
+ }
252
+ const CHANNEL_INITIAL = { channel: "push" as ChannelId, hideChannels: true, allOn: false, hideAllowAllPush: true, hideAllowAllEmail: true };
253
+ const CHANNEL_FIELDS = Object.keys(CHANNEL_INITIAL) as Array<keyof typeof CHANNEL_INITIAL>;
140
254
  const INITIAL = { ...LOADING, topics: [] as Row[], emptyText: "", actionMessage: "", preferencesMember: null };
141
255
  const PUSH_INITIAL = { ...pushView("loading"), pushMessage: "" };
142
256
  const PUSH_FIELDS = ["pushStatus", "hidePushOff", "hidePushAsk", "hideOffSettingsCta", "hideOffTurnOnCta", "topicsOpacity", "pushMessage"] as const;
@@ -154,18 +268,23 @@ const svc = defineService<S, {
154
268
  checkPush: (s: S) => Promise<S | undefined>;
155
269
  enablePush: (s: S) => Promise<S>;
156
270
  openPushSettings: (s: S) => Promise<S>;
157
- }>("himiBrandedNotifSettings", withEmptyFlags({
158
- state: { ...INITIAL, ...PUSH_INITIAL },
271
+ setChannel: (s: S, arg?: unknown) => S | undefined;
272
+ toggleAll: (s: S, p?: { value?: unknown }) => Promise<S | undefined>;
273
+ showOn: (s: S, p?: { ids?: unknown; on?: unknown; channel?: unknown }) => S | undefined;
274
+ }>("himiBrandedNotifSettings", withChannelView(withEmptyFlags({
275
+ state: { ...INITIAL, ...PUSH_INITIAL, ...CHANNEL_INITIAL } as S,
159
276
  // The phone's permission is read fresh each run: last run's answer may have changed in Settings.
160
- notHydrated: [...PUSH_FIELDS],
277
+ // The channel controls too: last run's picker or Allow all must not paint over a signed-out screen.
278
+ notHydrated: [...PUSH_FIELDS, ...CHANNEL_FIELDS],
161
279
  // Nor persisted: an early paint from the snapshot would show last run's card before the worker reads the OS.
162
- notPersisted: [...PUSH_FIELDS],
280
+ notPersisted: [...PUSH_FIELDS, ...CHANNEL_FIELDS],
163
281
  actions: {
164
282
  // The push view too: a warm worker must not show last visit's card while this load reads the OS.
165
283
  // `pushStatus` is kept: a poll comparing against it must not mistake a reload for a change.
166
284
  prepare: (s) => ({ ...s, ...INITIAL, ...PUSH_INITIAL, pushStatus: s.pushStatus }),
167
285
  load: async (s, arg): Promise<S | undefined> => {
168
286
  stashCopy(arg);
287
+ readOptions(arg);
169
288
  const version = ++loadVersion;
170
289
  await svc.prepare();
171
290
  // Independent of the member (a visitor's phone permission is just as real), and read HERE rather
@@ -190,25 +309,34 @@ const svc = defineService<S, {
190
309
  getMyNotificationPreferences(),
191
310
  ]);
192
311
  await assertMemberAccess(member);
193
- const prefs = readPreferences(prefsRes);
194
- const topics = readTopics(topicsRes).map((t) => norm(t, prefs));
312
+ if (version !== loadVersion) return undefined;
313
+ preferences = readPreferences(prefsRes);
314
+ definitions = readTopics(topicsRes);
315
+ const topics = rowsFor(options.channels ? current().channel : "push");
195
316
  const push = await pushOf();
196
317
  return version === loadVersion ? { ...current(), ...loaded("topics", topics, COPY), ...push, preferencesMember: member, actionMessage: "", _poll: POLL } : undefined;
197
318
  } catch {
198
319
  const member = await memberAccess();
199
320
  // An authenticated denial is not repaired by an endless sign-in loop.
200
321
  const failure = member.email ? new Error(COPY.error) : signInRequired();
322
+ // Nothing of a previous member's list may be re-derived after a failed load.
323
+ if (version === loadVersion) { definitions = []; preferences = []; }
201
324
  const push = await pushOf();
202
325
  return version === loadVersion ? { ...current(), ...loadFailed("topics", failure, COPY), ...push, preferencesMember: null, actionMessage: "", _poll: POLL } : undefined;
203
326
  }
204
327
  },
205
- // Flip one topic's On/Off. Optimistic (updates the row immediately); the real
206
- // upsert is best-effort and a no-op on sample rows.
328
+ // Flip one topic's On/Off. Shown at once; a failed save puts the row back and says so, so a
329
+ // member never believes a topic is muted when it is not. A no-op write on sample rows.
207
330
  toggle: async (s, p): Promise<S | undefined> => {
208
331
  const id = p?.id;
209
332
  const target = s.topics.find((r) => r.id === id);
210
333
  if (s.busy || !id || !target || target.locked) return undefined;
211
- if (!s.isMock) {
334
+ // A Toggle sends the NEXT state as `value` (action-payload contract); honour it so
335
+ // a repeated event can never flip the row the wrong way. A bare tap still flips.
336
+ const nextOn = typeof p?.value === "boolean" ? p.value : !target.on;
337
+ if (s.isMock || id.startsWith("sample-")) return { ...s, topics: s.topics.map((r) => (r.id === id ? withOn(r, nextOn) : r)) };
338
+ const slot = reserveSave();
339
+ try {
212
340
  try {
213
341
  if (!s.preferencesMember) return undefined;
214
342
  await assertMemberAccess(s.preferencesMember);
@@ -217,27 +345,36 @@ const svc = defineService<S, {
217
345
  await svc.load();
218
346
  return undefined;
219
347
  }
220
- }
221
- let nextOn = true;
222
- const topics = s.topics.map((r) => {
223
- if (r.id !== id) return r;
224
- // A Toggle sends the NEXT state as `value` (action-payload contract); honour it so
225
- // a repeated event can never flip the row the wrong way. A bare tap still flips.
226
- nextOn = typeof p?.value === "boolean" ? p.value : !r.on;
227
- return { ...r, on: nextOn, subtitle: subtitleFor(nextOn), stateLabel: nextOn ? "On" : "Off" };
228
- });
229
- if (!s.isMock && !id.startsWith("sample-")) {
230
- try {
231
- // `stateData.state` is a SCALAR enum — the old nested `{ muteStatus }` was a
232
- // shape this service does not have, so every write was malformed.
233
- await upsertMyNotificationPreferences([
234
- { topicId: id, channel: CHANNEL, stateData: { state: muteStatusFor(nextOn) } },
235
- ]);
236
- } catch { /* keep the optimistic state */ }
237
- try { await assertMemberAccess(s.preferencesMember!); }
348
+ await svc.showOn({ ids: [id], on: nextOn, channel: s.channel });
349
+ // `stateData.state` is a SCALAR enum — the old nested `{ muteStatus }` was a
350
+ // shape this service does not have, so every write was malformed.
351
+ const written = [{ topicId: id, channel: WIX_CHANNEL[s.channel], stateData: { state: muteStatusFor(nextOn) } }];
352
+ let failed = false;
353
+ try { rememberWrites(written, await slot.send(written, s.preferencesMember), slot.seq); }
354
+ catch { failed = true; }
355
+ try { await assertMemberAccess(s.preferencesMember); }
238
356
  catch { await svc.load(); return undefined; }
239
- }
240
- return svc.getState().preferencesMember === s.preferencesMember ? { ...svc.getState(), topics } : undefined;
357
+ const now = current();
358
+ if (now.preferencesMember !== s.preferencesMember) return undefined;
359
+ // A save that worked clears an earlier failure's message, as Allow all's does.
360
+ const actionMessage = failed ? SAVE_FAILED() : "";
361
+ // Moved to the other channel while saving: its rows stay as they are (a save of its own may be out);
362
+ // the cache holds this one for when the member comes back.
363
+ if (now.channel !== s.channel) return { ...now, actionMessage };
364
+ // Only this row changes: a bulk update that landed while this save was out stays on screen.
365
+ // A failure shows what the cache holds, which includes an Allow all that landed meanwhile.
366
+ const saved = rowFor(s.channel, id) ?? (failed ? target : withOn(target, nextOn));
367
+ return { ...now, topics: now.topics.map((r) => (r.id === id ? saved : r)), actionMessage };
368
+ } finally { slot.cancel(); }
369
+ },
370
+ // A switch shown at once, before its save. Published, so that a failed save is a real change back:
371
+ // a native switch keeps its own flip until its bound value moves.
372
+ showOn: (s, p): S | undefined => {
373
+ const a = (p ?? {}) as { ids?: unknown; on?: unknown; channel?: unknown };
374
+ // The member moved to the other channel meanwhile: these rows are not the ones being saved.
375
+ if (a.channel !== s.channel) return undefined;
376
+ const ids = Array.isArray(a.ids) ? a.ids : [];
377
+ return { ...s, topics: s.topics.map((r) => (ids.includes(r.id) && !r.locked ? withOn(r, a.on === true) : r)) };
241
378
  },
242
379
  // onAppear's kick and every poll tick (the host fires it on return from the OS settings).
243
380
  checkPush: async (s): Promise<S | undefined> => {
@@ -266,8 +403,51 @@ const svc = defineService<S, {
266
403
  const opened = await openPushSettings();
267
404
  return { ...current(), ...viewOf(status), pushMessage: opened ? "" : OPEN_FAILED() };
268
405
  },
406
+ // The Push / Email picker. Sample rows are one channel's illustration, so they stay as they are.
407
+ setChannel: (s, arg): S | undefined => {
408
+ const raw = typeof arg === "string" ? arg : (arg as { selectedId?: unknown } | undefined)?.selectedId;
409
+ const channel: ChannelId = raw === "email" ? "email" : "push";
410
+ if (!options.channels || channel === s.channel) return undefined;
411
+ // Back on push, the dimming follows the phone again (email set it to full).
412
+ return { ...s, channel, topics: s.isMock || s.busy ? s.topics : rowsFor(channel), topicsOpacity: viewOf(s.pushStatus).topicsOpacity, actionMessage: "" };
413
+ },
414
+ // "Allow all": every changeable topic on this channel, in one write. Unlike a single switch, a
415
+ // failure rolls back: a master switch left On over topics that were never saved would lie.
416
+ toggleAll: async (s, p): Promise<S | undefined> => {
417
+ const changeable = s.topics.filter((r) => !r.locked);
418
+ if (!options.allowAll || s.busy || changeable.length === 0) return undefined;
419
+ const on = typeof p?.value === "boolean" ? p.value : !s.topics.every((r) => r.locked || r.on);
420
+ const flip = (r: Row): Row => (r.locked ? r : withOn(r, on));
421
+ if (s.isMock) return { ...s, topics: s.topics.map(flip) };
422
+ const slot = reserveSave();
423
+ try {
424
+ if (!s.preferencesMember) return undefined;
425
+ // As `toggle`: never write one member's list under another account.
426
+ try { await assertMemberAccess(s.preferencesMember); }
427
+ catch { await svc.load(); return undefined; }
428
+ if (current().preferencesMember !== s.preferencesMember) return undefined;
429
+ await svc.showOn({ ids: changeable.map((r) => r.id), on, channel: s.channel });
430
+ const channel = WIX_CHANNEL[s.channel];
431
+ const written = changeable.map((r) => ({ topicId: r.id, channel, stateData: { state: muteStatusFor(on) } }));
432
+ let failed = false;
433
+ try { rememberWrites(written, await slot.send(written, s.preferencesMember), slot.seq); }
434
+ catch { failed = true; }
435
+ // Signed out or switched account while saving: the next load shows that, not this member's rows.
436
+ try { await assertMemberAccess(s.preferencesMember); }
437
+ catch { await svc.load(); return undefined; }
438
+ const now = current();
439
+ if (failed) {
440
+ // Every row as the cache has it, so the master switch moves back too.
441
+ return now.preferencesMember === s.preferencesMember
442
+ ? { ...now, topics: now.channel === s.channel ? rowsFor(s.channel) : now.topics, actionMessage: SAVE_FAILED() }
443
+ : undefined;
444
+ }
445
+ // The rows as the server answered: a topic it still holds muted shows Off.
446
+ return now.preferencesMember === s.preferencesMember && now.channel === s.channel ? { ...now, topics: rowsFor(s.channel), actionMessage: "" } : undefined;
447
+ } finally { slot.cancel(); }
448
+ },
269
449
  },
270
- }, { topics: "noTopics" }));
450
+ }, { topics: "noTopics" })));
271
451
  /** The live state, typed: the actions above read it after an await (TS7022 without the annotation). */
272
452
  function current(): S { return svc.getState() as S; }
273
453
  svc.prepare();
@@ -2557,6 +2557,11 @@
2557
2557
  "translation": "سجّل الدخول لإدارة إشعاراتك.",
2558
2558
  "origin": "machine"
2559
2559
  },
2560
+ "h_8d5f95beb674": {
2561
+ "source": "Couldn't save your notification settings. Try again.",
2562
+ "translation": "تعذّر حفظ إعدادات الإشعارات. حاول مرة أخرى.",
2563
+ "origin": "machine"
2564
+ },
2560
2565
  "h_75f527181b57": {
2561
2566
  "source": "Free",
2562
2567
  "translation": "مجانًا",
@@ -2557,6 +2557,11 @@
2557
2557
  "translation": "Pro správu oznámení se přihlaste.",
2558
2558
  "origin": "machine"
2559
2559
  },
2560
+ "h_8d5f95beb674": {
2561
+ "source": "Couldn't save your notification settings. Try again.",
2562
+ "translation": "Nastavení oznámení se nepodařilo uložit. Zkuste to znovu.",
2563
+ "origin": "machine"
2564
+ },
2560
2565
  "h_75f527181b57": {
2561
2566
  "source": "Free",
2562
2567
  "translation": "Zdarma",
@@ -2557,6 +2557,11 @@
2557
2557
  "translation": "Log ind for at administrere dine notifikationer.",
2558
2558
  "origin": "machine"
2559
2559
  },
2560
+ "h_8d5f95beb674": {
2561
+ "source": "Couldn't save your notification settings. Try again.",
2562
+ "translation": "Notifikationsindstillingerne kunne ikke gemmes. Prøv igen.",
2563
+ "origin": "machine"
2564
+ },
2560
2565
  "h_75f527181b57": {
2561
2566
  "source": "Free",
2562
2567
  "translation": "Gratis",
@@ -2557,6 +2557,11 @@
2557
2557
  "translation": "Melde dich an, um deine Benachrichtigungen zu verwalten.",
2558
2558
  "origin": "machine"
2559
2559
  },
2560
+ "h_8d5f95beb674": {
2561
+ "source": "Couldn't save your notification settings. Try again.",
2562
+ "translation": "Deine Benachrichtigungseinstellungen konnten nicht gespeichert werden. Versuch es noch einmal.",
2563
+ "origin": "machine"
2564
+ },
2560
2565
  "h_75f527181b57": {
2561
2566
  "source": "Free",
2562
2567
  "translation": "Kostenlos",
@@ -2557,6 +2557,11 @@
2557
2557
  "translation": "Συνδεθείτε για να διαχειριστείτε τις ειδοποιήσεις σας.",
2558
2558
  "origin": "machine"
2559
2559
  },
2560
+ "h_8d5f95beb674": {
2561
+ "source": "Couldn't save your notification settings. Try again.",
2562
+ "translation": "Δεν ήταν δυνατή η αποθήκευση των ρυθμίσεων ειδοποιήσεων. Δοκίμασε ξανά.",
2563
+ "origin": "machine"
2564
+ },
2560
2565
  "h_75f527181b57": {
2561
2566
  "source": "Free",
2562
2567
  "translation": "Δωρεάν",
@@ -2557,6 +2557,11 @@
2557
2557
  "translation": "Inicia sesión para administrar tus notificaciones.",
2558
2558
  "origin": "machine"
2559
2559
  },
2560
+ "h_8d5f95beb674": {
2561
+ "source": "Couldn't save your notification settings. Try again.",
2562
+ "translation": "No se pudo guardar la configuración de notificaciones. Inténtalo de nuevo.",
2563
+ "origin": "machine"
2564
+ },
2560
2565
  "h_75f527181b57": {
2561
2566
  "source": "Free",
2562
2567
  "translation": "Gratis",
@@ -2557,6 +2557,11 @@
2557
2557
  "translation": "Kirjaudu sisään hallitaksesi ilmoituksiasi.",
2558
2558
  "origin": "machine"
2559
2559
  },
2560
+ "h_8d5f95beb674": {
2561
+ "source": "Couldn't save your notification settings. Try again.",
2562
+ "translation": "Ilmoitusasetuksia ei voitu tallentaa. Yritä uudelleen.",
2563
+ "origin": "machine"
2564
+ },
2560
2565
  "h_75f527181b57": {
2561
2566
  "source": "Free",
2562
2567
  "translation": "Ilmainen",
@@ -2537,6 +2537,11 @@
2537
2537
  "translation": "Connectez-vous pour gérer vos notifications.",
2538
2538
  "origin": "machine"
2539
2539
  },
2540
+ "h_8d5f95beb674": {
2541
+ "source": "Couldn't save your notification settings. Try again.",
2542
+ "translation": "Impossible d'enregistrer les paramètres de notification. Réessayez.",
2543
+ "origin": "machine"
2544
+ },
2540
2545
  "h_75f527181b57": {
2541
2546
  "source": "Free",
2542
2547
  "translation": "Gratuit",