@magicpages/kalotyp 0.1.1 → 0.2.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 (1920) hide show
  1. package/dist/editor.d.ts.map +1 -1
  2. package/dist/emoji/0023-FE0F-20E3.svg +12 -0
  3. package/dist/emoji/002A-FE0F-20E3.svg +11 -0
  4. package/dist/emoji/0030-FE0F-20E3.svg +9 -0
  5. package/dist/emoji/0031-FE0F-20E3.svg +9 -0
  6. package/dist/emoji/0032-FE0F-20E3.svg +9 -0
  7. package/dist/emoji/0033-FE0F-20E3.svg +9 -0
  8. package/dist/emoji/0034-FE0F-20E3.svg +10 -0
  9. package/dist/emoji/0035-FE0F-20E3.svg +9 -0
  10. package/dist/emoji/0036-FE0F-20E3.svg +10 -0
  11. package/dist/emoji/0037-FE0F-20E3.svg +9 -0
  12. package/dist/emoji/0038-FE0F-20E3.svg +10 -0
  13. package/dist/emoji/0039-FE0F-20E3.svg +10 -0
  14. package/dist/emoji/00A9.svg +9 -0
  15. package/dist/emoji/00AE.svg +13 -0
  16. package/dist/emoji/1F004.svg +14 -0
  17. package/dist/emoji/1F0CF.svg +26 -0
  18. package/dist/emoji/1F170.svg +14 -0
  19. package/dist/emoji/1F171.svg +14 -0
  20. package/dist/emoji/1F17E.svg +12 -0
  21. package/dist/emoji/1F17F.svg +12 -0
  22. package/dist/emoji/1F18E.svg +18 -0
  23. package/dist/emoji/1F191.svg +14 -0
  24. package/dist/emoji/1F192.svg +18 -0
  25. package/dist/emoji/1F193.svg +24 -0
  26. package/dist/emoji/1F194.svg +14 -0
  27. package/dist/emoji/1F195.svg +13 -0
  28. package/dist/emoji/1F196.svg +14 -0
  29. package/dist/emoji/1F197.svg +18 -0
  30. package/dist/emoji/1F198.svg +16 -0
  31. package/dist/emoji/1F199.svg +18 -0
  32. package/dist/emoji/1F19A.svg +14 -0
  33. package/dist/emoji/1F1E6-1F1E8.svg +35 -0
  34. package/dist/emoji/1F1E6-1F1E9.svg +22 -0
  35. package/dist/emoji/1F1E6-1F1EA.svg +11 -0
  36. package/dist/emoji/1F1E6-1F1EB.svg +18 -0
  37. package/dist/emoji/1F1E6-1F1EC.svg +15 -0
  38. package/dist/emoji/1F1E6-1F1EE.svg +26 -0
  39. package/dist/emoji/1F1E6-1F1F1.svg +17 -0
  40. package/dist/emoji/1F1E6-1F1F2.svg +10 -0
  41. package/dist/emoji/1F1E6-1F1F4.svg +13 -0
  42. package/dist/emoji/1F1E6-1F1F6.svg +9 -0
  43. package/dist/emoji/1F1E6-1F1F7.svg +12 -0
  44. package/dist/emoji/1F1E6-1F1F8.svg +26 -0
  45. package/dist/emoji/1F1E6-1F1F9.svg +10 -0
  46. package/dist/emoji/1F1E6-1F1FA.svg +26 -0
  47. package/dist/emoji/1F1E6-1F1FC.svg +11 -0
  48. package/dist/emoji/1F1E6-1F1FD.svg +9 -0
  49. package/dist/emoji/1F1E6-1F1FF.svg +12 -0
  50. package/dist/emoji/1F1E7-1F1E6.svg +18 -0
  51. package/dist/emoji/1F1E7-1F1E7.svg +16 -0
  52. package/dist/emoji/1F1E7-1F1E9.svg +9 -0
  53. package/dist/emoji/1F1E7-1F1EA.svg +10 -0
  54. package/dist/emoji/1F1E7-1F1EB.svg +10 -0
  55. package/dist/emoji/1F1E7-1F1EC.svg +10 -0
  56. package/dist/emoji/1F1E7-1F1ED.svg +9 -0
  57. package/dist/emoji/1F1E7-1F1EE.svg +18 -0
  58. package/dist/emoji/1F1E7-1F1EF.svg +10 -0
  59. package/dist/emoji/1F1E7-1F1F1.svg +36 -0
  60. package/dist/emoji/1F1E7-1F1F2.svg +32 -0
  61. package/dist/emoji/1F1E7-1F1F3.svg +18 -0
  62. package/dist/emoji/1F1E7-1F1F4.svg +17 -0
  63. package/dist/emoji/1F1E7-1F1F6.svg +15 -0
  64. package/dist/emoji/1F1E7-1F1F7.svg +11 -0
  65. package/dist/emoji/1F1E7-1F1F8.svg +11 -0
  66. package/dist/emoji/1F1E7-1F1F9.svg +24 -0
  67. package/dist/emoji/1F1E7-1F1FB.svg +9 -0
  68. package/dist/emoji/1F1E7-1F1FC.svg +9 -0
  69. package/dist/emoji/1F1E7-1F1FE.svg +15 -0
  70. package/dist/emoji/1F1E7-1F1FF.svg +17 -0
  71. package/dist/emoji/1F1E8-1F1E6.svg +13 -0
  72. package/dist/emoji/1F1E8-1F1E8.svg +15 -0
  73. package/dist/emoji/1F1E8-1F1E9.svg +10 -0
  74. package/dist/emoji/1F1E8-1F1EB.svg +13 -0
  75. package/dist/emoji/1F1E8-1F1EC.svg +10 -0
  76. package/dist/emoji/1F1E8-1F1ED.svg +9 -0
  77. package/dist/emoji/1F1E8-1F1EE.svg +10 -0
  78. package/dist/emoji/1F1E8-1F1F0.svg +42 -0
  79. package/dist/emoji/1F1E8-1F1F1.svg +11 -0
  80. package/dist/emoji/1F1E8-1F1F2.svg +11 -0
  81. package/dist/emoji/1F1E8-1F1F3.svg +13 -0
  82. package/dist/emoji/1F1E8-1F1F4.svg +10 -0
  83. package/dist/emoji/1F1E8-1F1F5.svg +10 -0
  84. package/dist/emoji/1F1E8-1F1F6.svg +26 -0
  85. package/dist/emoji/1F1E8-1F1F7.svg +11 -0
  86. package/dist/emoji/1F1E8-1F1FA.svg +13 -0
  87. package/dist/emoji/1F1E8-1F1FB.svg +31 -0
  88. package/dist/emoji/1F1E8-1F1FC.svg +11 -0
  89. package/dist/emoji/1F1E8-1F1FD.svg +19 -0
  90. package/dist/emoji/1F1E8-1F1FE.svg +13 -0
  91. package/dist/emoji/1F1E8-1F1FF.svg +10 -0
  92. package/dist/emoji/1F1E9-1F1EA.svg +10 -0
  93. package/dist/emoji/1F1E9-1F1EC.svg +41 -0
  94. package/dist/emoji/1F1E9-1F1EF.svg +11 -0
  95. package/dist/emoji/1F1E9-1F1F0.svg +9 -0
  96. package/dist/emoji/1F1E9-1F1F2.svg +34 -0
  97. package/dist/emoji/1F1E9-1F1F4.svg +13 -0
  98. package/dist/emoji/1F1E9-1F1FF.svg +11 -0
  99. package/dist/emoji/1F1EA-1F1E6.svg +23 -0
  100. package/dist/emoji/1F1EA-1F1E8.svg +17 -0
  101. package/dist/emoji/1F1EA-1F1EA.svg +10 -0
  102. package/dist/emoji/1F1EA-1F1EC.svg +12 -0
  103. package/dist/emoji/1F1EA-1F1ED.svg +13 -0
  104. package/dist/emoji/1F1EA-1F1F7.svg +16 -0
  105. package/dist/emoji/1F1EA-1F1F8.svg +23 -0
  106. package/dist/emoji/1F1EA-1F1F9.svg +18 -0
  107. package/dist/emoji/1F1EA-1F1FA.svg +22 -0
  108. package/dist/emoji/1F1EB-1F1EE.svg +9 -0
  109. package/dist/emoji/1F1EB-1F1EF.svg +27 -0
  110. package/dist/emoji/1F1EB-1F1F0.svg +30 -0
  111. package/dist/emoji/1F1EB-1F1F2.svg +16 -0
  112. package/dist/emoji/1F1EB-1F1F4.svg +9 -0
  113. package/dist/emoji/1F1EB-1F1F7.svg +10 -0
  114. package/dist/emoji/1F1EC-1F1E6.svg +10 -0
  115. package/dist/emoji/1F1EC-1F1E7.svg +22 -0
  116. package/dist/emoji/1F1EC-1F1E9.svg +23 -0
  117. package/dist/emoji/1F1EC-1F1EA.svg +13 -0
  118. package/dist/emoji/1F1EC-1F1EB.svg +10 -0
  119. package/dist/emoji/1F1EC-1F1EC.svg +10 -0
  120. package/dist/emoji/1F1EC-1F1ED.svg +11 -0
  121. package/dist/emoji/1F1EC-1F1EE.svg +18 -0
  122. package/dist/emoji/1F1EC-1F1F1.svg +11 -0
  123. package/dist/emoji/1F1EC-1F1F2.svg +10 -0
  124. package/dist/emoji/1F1EC-1F1F3.svg +10 -0
  125. package/dist/emoji/1F1EC-1F1F5.svg +25 -0
  126. package/dist/emoji/1F1EC-1F1F6.svg +13 -0
  127. package/dist/emoji/1F1EC-1F1F7.svg +16 -0
  128. package/dist/emoji/1F1EC-1F1F8.svg +36 -0
  129. package/dist/emoji/1F1EC-1F1F9.svg +14 -0
  130. package/dist/emoji/1F1EC-1F1FA.svg +13 -0
  131. package/dist/emoji/1F1EC-1F1FC.svg +11 -0
  132. package/dist/emoji/1F1EC-1F1FE.svg +10 -0
  133. package/dist/emoji/1F1ED-1F1F0.svg +18 -0
  134. package/dist/emoji/1F1ED-1F1F2.svg +26 -0
  135. package/dist/emoji/1F1ED-1F1F3.svg +15 -0
  136. package/dist/emoji/1F1ED-1F1F7.svg +46 -0
  137. package/dist/emoji/1F1ED-1F1F9.svg +15 -0
  138. package/dist/emoji/1F1ED-1F1FA.svg +10 -0
  139. package/dist/emoji/1F1EE-1F1E8.svg +10 -0
  140. package/dist/emoji/1F1EE-1F1E9.svg +9 -0
  141. package/dist/emoji/1F1EE-1F1EA.svg +10 -0
  142. package/dist/emoji/1F1EE-1F1F1.svg +12 -0
  143. package/dist/emoji/1F1EE-1F1F2.svg +14 -0
  144. package/dist/emoji/1F1EE-1F1F3.svg +12 -0
  145. package/dist/emoji/1F1EE-1F1F4.svg +41 -0
  146. package/dist/emoji/1F1EE-1F1F6.svg +11 -0
  147. package/dist/emoji/1F1EE-1F1F7.svg +15 -0
  148. package/dist/emoji/1F1EE-1F1F8.svg +9 -0
  149. package/dist/emoji/1F1EE-1F1F9.svg +10 -0
  150. package/dist/emoji/1F1EF-1F1EA.svg +15 -0
  151. package/dist/emoji/1F1EF-1F1F2.svg +12 -0
  152. package/dist/emoji/1F1EF-1F1F4.svg +12 -0
  153. package/dist/emoji/1F1EF-1F1F5.svg +9 -0
  154. package/dist/emoji/1F1F0-1F1EA.svg +16 -0
  155. package/dist/emoji/1F1F0-1F1EC.svg +12 -0
  156. package/dist/emoji/1F1F0-1F1ED.svg +17 -0
  157. package/dist/emoji/1F1F0-1F1EE.svg +20 -0
  158. package/dist/emoji/1F1F0-1F1F2.svg +19 -0
  159. package/dist/emoji/1F1F0-1F1F3.svg +12 -0
  160. package/dist/emoji/1F1F0-1F1F5.svg +12 -0
  161. package/dist/emoji/1F1F0-1F1F7.svg +43 -0
  162. package/dist/emoji/1F1F0-1F1FC.svg +11 -0
  163. package/dist/emoji/1F1F0-1F1FE.svg +28 -0
  164. package/dist/emoji/1F1F0-1F1FF.svg +11 -0
  165. package/dist/emoji/1F1F1-1F1E6.svg +11 -0
  166. package/dist/emoji/1F1F1-1F1E7.svg +17 -0
  167. package/dist/emoji/1F1F1-1F1E8.svg +10 -0
  168. package/dist/emoji/1F1F1-1F1EE.svg +11 -0
  169. package/dist/emoji/1F1F1-1F1F0.svg +33 -0
  170. package/dist/emoji/1F1F1-1F1F7.svg +15 -0
  171. package/dist/emoji/1F1F1-1F1F8.svg +16 -0
  172. package/dist/emoji/1F1F1-1F1F9.svg +10 -0
  173. package/dist/emoji/1F1F1-1F1FA.svg +10 -0
  174. package/dist/emoji/1F1F1-1F1FB.svg +9 -0
  175. package/dist/emoji/1F1F1-1F1FE.svg +12 -0
  176. package/dist/emoji/1F1F2-1F1E6.svg +9 -0
  177. package/dist/emoji/1F1F2-1F1E8.svg +9 -0
  178. package/dist/emoji/1F1F2-1F1E9.svg +17 -0
  179. package/dist/emoji/1F1F2-1F1EA.svg +18 -0
  180. package/dist/emoji/1F1F2-1F1EB.svg +10 -0
  181. package/dist/emoji/1F1F2-1F1EC.svg +10 -0
  182. package/dist/emoji/1F1F2-1F1ED.svg +11 -0
  183. package/dist/emoji/1F1F2-1F1F0.svg +17 -0
  184. package/dist/emoji/1F1F2-1F1F1.svg +10 -0
  185. package/dist/emoji/1F1F2-1F1F2.svg +11 -0
  186. package/dist/emoji/1F1F2-1F1F3.svg +19 -0
  187. package/dist/emoji/1F1F2-1F1F4.svg +25 -0
  188. package/dist/emoji/1F1F2-1F1F5.svg +18 -0
  189. package/dist/emoji/1F1F2-1F1F6.svg +10 -0
  190. package/dist/emoji/1F1F2-1F1F7.svg +14 -0
  191. package/dist/emoji/1F1F2-1F1F8.svg +24 -0
  192. package/dist/emoji/1F1F2-1F1F9.svg +10 -0
  193. package/dist/emoji/1F1F2-1F1FA.svg +11 -0
  194. package/dist/emoji/1F1F2-1F1FB.svg +10 -0
  195. package/dist/emoji/1F1F2-1F1FC.svg +12 -0
  196. package/dist/emoji/1F1F2-1F1FD.svg +12 -0
  197. package/dist/emoji/1F1F2-1F1FE.svg +18 -0
  198. package/dist/emoji/1F1F2-1F1FF.svg +15 -0
  199. package/dist/emoji/1F1F3-1F1E6.svg +11 -0
  200. package/dist/emoji/1F1F3-1F1E8.svg +21 -0
  201. package/dist/emoji/1F1F3-1F1EA.svg +11 -0
  202. package/dist/emoji/1F1F3-1F1EB.svg +17 -0
  203. package/dist/emoji/1F1F3-1F1EC.svg +10 -0
  204. package/dist/emoji/1F1F3-1F1EE.svg +12 -0
  205. package/dist/emoji/1F1F3-1F1F1.svg +10 -0
  206. package/dist/emoji/1F1F3-1F1F4.svg +9 -0
  207. package/dist/emoji/1F1F3-1F1F5.svg +19 -0
  208. package/dist/emoji/1F1F3-1F1F7.svg +10 -0
  209. package/dist/emoji/1F1F3-1F1FA.svg +27 -0
  210. package/dist/emoji/1F1F3-1F1FF.svg +32 -0
  211. package/dist/emoji/1F1F4-1F1F2.svg +19 -0
  212. package/dist/emoji/1F1F5-1F1E6.svg +12 -0
  213. package/dist/emoji/1F1F5-1F1EA.svg +10 -0
  214. package/dist/emoji/1F1F5-1F1EB.svg +15 -0
  215. package/dist/emoji/1F1F5-1F1EC.svg +19 -0
  216. package/dist/emoji/1F1F5-1F1ED.svg +14 -0
  217. package/dist/emoji/1F1F5-1F1F0.svg +11 -0
  218. package/dist/emoji/1F1F5-1F1F1.svg +9 -0
  219. package/dist/emoji/1F1F5-1F1F2.svg +29 -0
  220. package/dist/emoji/1F1F5-1F1F3.svg +29 -0
  221. package/dist/emoji/1F1F5-1F1F7.svg +13 -0
  222. package/dist/emoji/1F1F5-1F1F8.svg +11 -0
  223. package/dist/emoji/1F1F5-1F1F9.svg +20 -0
  224. package/dist/emoji/1F1F5-1F1FC.svg +9 -0
  225. package/dist/emoji/1F1F5-1F1FE.svg +12 -0
  226. package/dist/emoji/1F1F6-1F1E6.svg +9 -0
  227. package/dist/emoji/1F1F7-1F1EA.svg +14 -0
  228. package/dist/emoji/1F1F7-1F1F4.svg +10 -0
  229. package/dist/emoji/1F1F7-1F1F8.svg +18 -0
  230. package/dist/emoji/1F1F7-1F1FA.svg +10 -0
  231. package/dist/emoji/1F1F7-1F1FC.svg +11 -0
  232. package/dist/emoji/1F1F8-1F1E6.svg +18 -0
  233. package/dist/emoji/1F1F8-1F1E7.svg +15 -0
  234. package/dist/emoji/1F1F8-1F1E8.svg +12 -0
  235. package/dist/emoji/1F1F8-1F1E9.svg +11 -0
  236. package/dist/emoji/1F1F8-1F1EA.svg +9 -0
  237. package/dist/emoji/1F1F8-1F1EC.svg +15 -0
  238. package/dist/emoji/1F1F8-1F1ED.svg +35 -0
  239. package/dist/emoji/1F1F8-1F1EE.svg +18 -0
  240. package/dist/emoji/1F1F8-1F1EF.svg +9 -0
  241. package/dist/emoji/1F1F8-1F1F0.svg +18 -0
  242. package/dist/emoji/1F1F8-1F1F1.svg +10 -0
  243. package/dist/emoji/1F1F8-1F1F2.svg +19 -0
  244. package/dist/emoji/1F1F8-1F1F3.svg +11 -0
  245. package/dist/emoji/1F1F8-1F1F4.svg +9 -0
  246. package/dist/emoji/1F1F8-1F1F7.svg +13 -0
  247. package/dist/emoji/1F1F8-1F1F8.svg +12 -0
  248. package/dist/emoji/1F1F8-1F1F9.svg +12 -0
  249. package/dist/emoji/1F1F8-1F1FB.svg +12 -0
  250. package/dist/emoji/1F1F8-1F1FD.svg +14 -0
  251. package/dist/emoji/1F1F8-1F1FE.svg +13 -0
  252. package/dist/emoji/1F1F8-1F1FF.svg +28 -0
  253. package/dist/emoji/1F1F9-1F1E6.svg +35 -0
  254. package/dist/emoji/1F1F9-1F1E8.svg +32 -0
  255. package/dist/emoji/1F1F9-1F1E9.svg +10 -0
  256. package/dist/emoji/1F1F9-1F1EB.svg +18 -0
  257. package/dist/emoji/1F1F9-1F1EC.svg +13 -0
  258. package/dist/emoji/1F1F9-1F1ED.svg +11 -0
  259. package/dist/emoji/1F1F9-1F1EF.svg +24 -0
  260. package/dist/emoji/1F1F9-1F1F0.svg +14 -0
  261. package/dist/emoji/1F1F9-1F1F1.svg +11 -0
  262. package/dist/emoji/1F1F9-1F1F2.svg +25 -0
  263. package/dist/emoji/1F1F9-1F1F3.svg +11 -0
  264. package/dist/emoji/1F1F9-1F1F4.svg +10 -0
  265. package/dist/emoji/1F1F9-1F1F7.svg +10 -0
  266. package/dist/emoji/1F1F9-1F1F9.svg +9 -0
  267. package/dist/emoji/1F1F9-1F1FB.svg +30 -0
  268. package/dist/emoji/1F1F9-1F1FC.svg +11 -0
  269. package/dist/emoji/1F1F9-1F1FF.svg +10 -0
  270. package/dist/emoji/1F1FA-1F1E6.svg +9 -0
  271. package/dist/emoji/1F1FA-1F1EC.svg +19 -0
  272. package/dist/emoji/1F1FA-1F1F2.svg +28 -0
  273. package/dist/emoji/1F1FA-1F1F3.svg +34 -0
  274. package/dist/emoji/1F1FA-1F1F8.svg +28 -0
  275. package/dist/emoji/1F1FA-1F1FE.svg +15 -0
  276. package/dist/emoji/1F1FA-1F1FF.svg +23 -0
  277. package/dist/emoji/1F1FB-1F1E6.svg +30 -0
  278. package/dist/emoji/1F1FB-1F1E8.svg +15 -0
  279. package/dist/emoji/1F1FB-1F1EA.svg +20 -0
  280. package/dist/emoji/1F1FB-1F1EC.svg +43 -0
  281. package/dist/emoji/1F1FB-1F1EE.svg +37 -0
  282. package/dist/emoji/1F1FB-1F1F3.svg +9 -0
  283. package/dist/emoji/1F1FB-1F1FA.svg +12 -0
  284. package/dist/emoji/1F1FC-1F1EB.svg +15 -0
  285. package/dist/emoji/1F1FC-1F1F8.svg +14 -0
  286. package/dist/emoji/1F1FD-1F1F0.svg +17 -0
  287. package/dist/emoji/1F1FE-1F1EA.svg +10 -0
  288. package/dist/emoji/1F1FE-1F1F9.svg +22 -0
  289. package/dist/emoji/1F1FF-1F1E6.svg +11 -0
  290. package/dist/emoji/1F1FF-1F1F2.svg +17 -0
  291. package/dist/emoji/1F1FF-1F1FC.svg +19 -0
  292. package/dist/emoji/1F201.svg +10 -0
  293. package/dist/emoji/1F202.svg +16 -0
  294. package/dist/emoji/1F21A.svg +20 -0
  295. package/dist/emoji/1F22F.svg +17 -0
  296. package/dist/emoji/1F232.svg +38 -0
  297. package/dist/emoji/1F233.svg +15 -0
  298. package/dist/emoji/1F234.svg +16 -0
  299. package/dist/emoji/1F235.svg +34 -0
  300. package/dist/emoji/1F236.svg +20 -0
  301. package/dist/emoji/1F237.svg +11 -0
  302. package/dist/emoji/1F238.svg +11 -0
  303. package/dist/emoji/1F239.svg +17 -0
  304. package/dist/emoji/1F23A.svg +24 -0
  305. package/dist/emoji/1F250.svg +27 -0
  306. package/dist/emoji/1F251.svg +16 -0
  307. package/dist/emoji/1F300.svg +9 -0
  308. package/dist/emoji/1F301.svg +39 -0
  309. package/dist/emoji/1F302.svg +11 -0
  310. package/dist/emoji/1F303.svg +50 -0
  311. package/dist/emoji/1F304.svg +16 -0
  312. package/dist/emoji/1F305.svg +22 -0
  313. package/dist/emoji/1F306.svg +40 -0
  314. package/dist/emoji/1F307.svg +47 -0
  315. package/dist/emoji/1F308.svg +18 -0
  316. package/dist/emoji/1F309.svg +53 -0
  317. package/dist/emoji/1F30A.svg +18 -0
  318. package/dist/emoji/1F30B.svg +23 -0
  319. package/dist/emoji/1F30C.svg +42 -0
  320. package/dist/emoji/1F30D.svg +13 -0
  321. package/dist/emoji/1F30E.svg +13 -0
  322. package/dist/emoji/1F30F.svg +19 -0
  323. package/dist/emoji/1F310.svg +15 -0
  324. package/dist/emoji/1F311.svg +11 -0
  325. package/dist/emoji/1F312.svg +13 -0
  326. package/dist/emoji/1F313.svg +14 -0
  327. package/dist/emoji/1F314.svg +13 -0
  328. package/dist/emoji/1F315.svg +8 -0
  329. package/dist/emoji/1F316.svg +13 -0
  330. package/dist/emoji/1F317.svg +14 -0
  331. package/dist/emoji/1F318.svg +13 -0
  332. package/dist/emoji/1F319.svg +12 -0
  333. package/dist/emoji/1F31A.svg +21 -0
  334. package/dist/emoji/1F31B.svg +14 -0
  335. package/dist/emoji/1F31C.svg +14 -0
  336. package/dist/emoji/1F31D.svg +21 -0
  337. package/dist/emoji/1F31E.svg +16 -0
  338. package/dist/emoji/1F31F.svg +21 -0
  339. package/dist/emoji/1F320.svg +15 -0
  340. package/dist/emoji/1F321.svg +15 -0
  341. package/dist/emoji/1F324.svg +11 -0
  342. package/dist/emoji/1F325.svg +12 -0
  343. package/dist/emoji/1F326.svg +26 -0
  344. package/dist/emoji/1F327.svg +26 -0
  345. package/dist/emoji/1F328.svg +23 -0
  346. package/dist/emoji/1F329.svg +13 -0
  347. package/dist/emoji/1F32A.svg +33 -0
  348. package/dist/emoji/1F32B.svg +23 -0
  349. package/dist/emoji/1F32C.svg +16 -0
  350. package/dist/emoji/1F32D.svg +19 -0
  351. package/dist/emoji/1F32E.svg +21 -0
  352. package/dist/emoji/1F32F.svg +16 -0
  353. package/dist/emoji/1F330.svg +17 -0
  354. package/dist/emoji/1F331.svg +15 -0
  355. package/dist/emoji/1F332.svg +12 -0
  356. package/dist/emoji/1F333.svg +11 -0
  357. package/dist/emoji/1F334.svg +18 -0
  358. package/dist/emoji/1F335.svg +20 -0
  359. package/dist/emoji/1F336.svg +18 -0
  360. package/dist/emoji/1F337.svg +21 -0
  361. package/dist/emoji/1F338.svg +22 -0
  362. package/dist/emoji/1F339.svg +29 -0
  363. package/dist/emoji/1F33A.svg +25 -0
  364. package/dist/emoji/1F33B.svg +18 -0
  365. package/dist/emoji/1F33C.svg +16 -0
  366. package/dist/emoji/1F33D.svg +17 -0
  367. package/dist/emoji/1F33E.svg +51 -0
  368. package/dist/emoji/1F33F.svg +18 -0
  369. package/dist/emoji/1F340.svg +15 -0
  370. package/dist/emoji/1F341.svg +11 -0
  371. package/dist/emoji/1F342.svg +10 -0
  372. package/dist/emoji/1F343.svg +13 -0
  373. package/dist/emoji/1F344-200D-1F7EB.svg +12 -0
  374. package/dist/emoji/1F344.svg +23 -0
  375. package/dist/emoji/1F345.svg +14 -0
  376. package/dist/emoji/1F346.svg +18 -0
  377. package/dist/emoji/1F347.svg +38 -0
  378. package/dist/emoji/1F348.svg +14 -0
  379. package/dist/emoji/1F349.svg +22 -0
  380. package/dist/emoji/1F34A.svg +15 -0
  381. package/dist/emoji/1F34B-200D-1F7E9.svg +16 -0
  382. package/dist/emoji/1F34B.svg +13 -0
  383. package/dist/emoji/1F34C.svg +11 -0
  384. package/dist/emoji/1F34D.svg +22 -0
  385. package/dist/emoji/1F34E.svg +15 -0
  386. package/dist/emoji/1F34F.svg +17 -0
  387. package/dist/emoji/1F350.svg +13 -0
  388. package/dist/emoji/1F351.svg +21 -0
  389. package/dist/emoji/1F352.svg +21 -0
  390. package/dist/emoji/1F353.svg +29 -0
  391. package/dist/emoji/1F354.svg +26 -0
  392. package/dist/emoji/1F355.svg +19 -0
  393. package/dist/emoji/1F356.svg +18 -0
  394. package/dist/emoji/1F357.svg +13 -0
  395. package/dist/emoji/1F358.svg +14 -0
  396. package/dist/emoji/1F359.svg +14 -0
  397. package/dist/emoji/1F35A.svg +14 -0
  398. package/dist/emoji/1F35B.svg +16 -0
  399. package/dist/emoji/1F35C.svg +18 -0
  400. package/dist/emoji/1F35D.svg +23 -0
  401. package/dist/emoji/1F35E.svg +13 -0
  402. package/dist/emoji/1F35F.svg +29 -0
  403. package/dist/emoji/1F360.svg +18 -0
  404. package/dist/emoji/1F361.svg +20 -0
  405. package/dist/emoji/1F362.svg +19 -0
  406. package/dist/emoji/1F363.svg +13 -0
  407. package/dist/emoji/1F364.svg +13 -0
  408. package/dist/emoji/1F365.svg +39 -0
  409. package/dist/emoji/1F366.svg +23 -0
  410. package/dist/emoji/1F367.svg +21 -0
  411. package/dist/emoji/1F368.svg +21 -0
  412. package/dist/emoji/1F369.svg +33 -0
  413. package/dist/emoji/1F36A.svg +25 -0
  414. package/dist/emoji/1F36B.svg +16 -0
  415. package/dist/emoji/1F36C.svg +14 -0
  416. package/dist/emoji/1F36D.svg +16 -0
  417. package/dist/emoji/1F36E.svg +15 -0
  418. package/dist/emoji/1F36F.svg +21 -0
  419. package/dist/emoji/1F370.svg +17 -0
  420. package/dist/emoji/1F371.svg +34 -0
  421. package/dist/emoji/1F372.svg +16 -0
  422. package/dist/emoji/1F373.svg +17 -0
  423. package/dist/emoji/1F374.svg +14 -0
  424. package/dist/emoji/1F375.svg +12 -0
  425. package/dist/emoji/1F376.svg +22 -0
  426. package/dist/emoji/1F377.svg +14 -0
  427. package/dist/emoji/1F378.svg +20 -0
  428. package/dist/emoji/1F379.svg +20 -0
  429. package/dist/emoji/1F37A.svg +16 -0
  430. package/dist/emoji/1F37B.svg +24 -0
  431. package/dist/emoji/1F37C.svg +18 -0
  432. package/dist/emoji/1F37D.svg +19 -0
  433. package/dist/emoji/1F37E.svg +22 -0
  434. package/dist/emoji/1F37F.svg +15 -0
  435. package/dist/emoji/1F380.svg +24 -0
  436. package/dist/emoji/1F381.svg +25 -0
  437. package/dist/emoji/1F382.svg +22 -0
  438. package/dist/emoji/1F383.svg +22 -0
  439. package/dist/emoji/1F384.svg +28 -0
  440. package/dist/emoji/1F385.svg +39 -0
  441. package/dist/emoji/1F386.svg +53 -0
  442. package/dist/emoji/1F387.svg +57 -0
  443. package/dist/emoji/1F388.svg +16 -0
  444. package/dist/emoji/1F389.svg +25 -0
  445. package/dist/emoji/1F38A.svg +24 -0
  446. package/dist/emoji/1F38B.svg +25 -0
  447. package/dist/emoji/1F38C.svg +20 -0
  448. package/dist/emoji/1F38D.svg +60 -0
  449. package/dist/emoji/1F38E.svg +44 -0
  450. package/dist/emoji/1F38F.svg +19 -0
  451. package/dist/emoji/1F390.svg +18 -0
  452. package/dist/emoji/1F391.svg +89 -0
  453. package/dist/emoji/1F392.svg +15 -0
  454. package/dist/emoji/1F393.svg +15 -0
  455. package/dist/emoji/1F396.svg +17 -0
  456. package/dist/emoji/1F397.svg +18 -0
  457. package/dist/emoji/1F399.svg +24 -0
  458. package/dist/emoji/1F39A.svg +38 -0
  459. package/dist/emoji/1F39B.svg +23 -0
  460. package/dist/emoji/1F39E.svg +29 -0
  461. package/dist/emoji/1F39F.svg +15 -0
  462. package/dist/emoji/1F3A0.svg +31 -0
  463. package/dist/emoji/1F3A1.svg +47 -0
  464. package/dist/emoji/1F3A2.svg +26 -0
  465. package/dist/emoji/1F3A3.svg +20 -0
  466. package/dist/emoji/1F3A4.svg +20 -0
  467. package/dist/emoji/1F3A5.svg +21 -0
  468. package/dist/emoji/1F3A6.svg +16 -0
  469. package/dist/emoji/1F3A7.svg +17 -0
  470. package/dist/emoji/1F3A8.svg +19 -0
  471. package/dist/emoji/1F3A9.svg +11 -0
  472. package/dist/emoji/1F3AA.svg +25 -0
  473. package/dist/emoji/1F3AB.svg +14 -0
  474. package/dist/emoji/1F3AC.svg +37 -0
  475. package/dist/emoji/1F3AD.svg +25 -0
  476. package/dist/emoji/1F3AE.svg +21 -0
  477. package/dist/emoji/1F3AF.svg +24 -0
  478. package/dist/emoji/1F3B0.svg +29 -0
  479. package/dist/emoji/1F3B1.svg +15 -0
  480. package/dist/emoji/1F3B2.svg +20 -0
  481. package/dist/emoji/1F3B3.svg +49 -0
  482. package/dist/emoji/1F3B4.svg +12 -0
  483. package/dist/emoji/1F3B5.svg +17 -0
  484. package/dist/emoji/1F3B6.svg +18 -0
  485. package/dist/emoji/1F3B7.svg +16 -0
  486. package/dist/emoji/1F3B8.svg +18 -0
  487. package/dist/emoji/1F3B9.svg +20 -0
  488. package/dist/emoji/1F3BA.svg +26 -0
  489. package/dist/emoji/1F3BB.svg +23 -0
  490. package/dist/emoji/1F3BC.svg +10 -0
  491. package/dist/emoji/1F3BD.svg +18 -0
  492. package/dist/emoji/1F3BE.svg +16 -0
  493. package/dist/emoji/1F3BF.svg +30 -0
  494. package/dist/emoji/1F3C0.svg +16 -0
  495. package/dist/emoji/1F3C1.svg +32 -0
  496. package/dist/emoji/1F3C2.svg +15 -0
  497. package/dist/emoji/1F3C3-200D-2640-FE0F-200D-27A1-FE0F.svg +17 -0
  498. package/dist/emoji/1F3C3-200D-2640-FE0F.svg +17 -0
  499. package/dist/emoji/1F3C3-200D-2642-FE0F-200D-27A1-FE0F.svg +16 -0
  500. package/dist/emoji/1F3C3-200D-2642-FE0F.svg +16 -0
  501. package/dist/emoji/1F3C3-200D-27A1-FE0F.svg +16 -0
  502. package/dist/emoji/1F3C3.svg +16 -0
  503. package/dist/emoji/1F3C4-200D-2640-FE0F.svg +20 -0
  504. package/dist/emoji/1F3C4-200D-2642-FE0F.svg +19 -0
  505. package/dist/emoji/1F3C4.svg +21 -0
  506. package/dist/emoji/1F3C5.svg +28 -0
  507. package/dist/emoji/1F3C6.svg +17 -0
  508. package/dist/emoji/1F3C7.svg +26 -0
  509. package/dist/emoji/1F3C8.svg +26 -0
  510. package/dist/emoji/1F3C9.svg +22 -0
  511. package/dist/emoji/1F3CA-200D-2640-FE0F.svg +19 -0
  512. package/dist/emoji/1F3CA-200D-2642-FE0F.svg +18 -0
  513. package/dist/emoji/1F3CA.svg +20 -0
  514. package/dist/emoji/1F3CB-FE0F-200D-2640-FE0F.svg +21 -0
  515. package/dist/emoji/1F3CB-FE0F-200D-2642-FE0F.svg +20 -0
  516. package/dist/emoji/1F3CB.svg +23 -0
  517. package/dist/emoji/1F3CC-FE0F-200D-2640-FE0F.svg +16 -0
  518. package/dist/emoji/1F3CC-FE0F-200D-2642-FE0F.svg +15 -0
  519. package/dist/emoji/1F3CC.svg +19 -0
  520. package/dist/emoji/1F3CD.svg +27 -0
  521. package/dist/emoji/1F3CE.svg +19 -0
  522. package/dist/emoji/1F3CF.svg +17 -0
  523. package/dist/emoji/1F3D0.svg +21 -0
  524. package/dist/emoji/1F3D1.svg +16 -0
  525. package/dist/emoji/1F3D2.svg +16 -0
  526. package/dist/emoji/1F3D3.svg +16 -0
  527. package/dist/emoji/1F3D4.svg +20 -0
  528. package/dist/emoji/1F3D5.svg +20 -0
  529. package/dist/emoji/1F3D6.svg +19 -0
  530. package/dist/emoji/1F3D7.svg +22 -0
  531. package/dist/emoji/1F3D8.svg +26 -0
  532. package/dist/emoji/1F3D9.svg +36 -0
  533. package/dist/emoji/1F3DA.svg +28 -0
  534. package/dist/emoji/1F3DB.svg +26 -0
  535. package/dist/emoji/1F3DC.svg +19 -0
  536. package/dist/emoji/1F3DD.svg +43 -0
  537. package/dist/emoji/1F3DE.svg +23 -0
  538. package/dist/emoji/1F3DF.svg +27 -0
  539. package/dist/emoji/1F3E0.svg +19 -0
  540. package/dist/emoji/1F3E1.svg +20 -0
  541. package/dist/emoji/1F3E2.svg +46 -0
  542. package/dist/emoji/1F3E3.svg +42 -0
  543. package/dist/emoji/1F3E4.svg +42 -0
  544. package/dist/emoji/1F3E5.svg +32 -0
  545. package/dist/emoji/1F3E6.svg +34 -0
  546. package/dist/emoji/1F3E7.svg +36 -0
  547. package/dist/emoji/1F3E8.svg +53 -0
  548. package/dist/emoji/1F3E9.svg +30 -0
  549. package/dist/emoji/1F3EA.svg +25 -0
  550. package/dist/emoji/1F3EB.svg +53 -0
  551. package/dist/emoji/1F3EC.svg +41 -0
  552. package/dist/emoji/1F3ED.svg +35 -0
  553. package/dist/emoji/1F3EE.svg +22 -0
  554. package/dist/emoji/1F3EF.svg +39 -0
  555. package/dist/emoji/1F3F0.svg +35 -0
  556. package/dist/emoji/1F3F3-FE0F-200D-1F308.svg +16 -0
  557. package/dist/emoji/1F3F3-FE0F-200D-26A7-FE0F.svg +12 -0
  558. package/dist/emoji/1F3F3.svg +13 -0
  559. package/dist/emoji/1F3F4-200D-2620-FE0F.svg +29 -0
  560. package/dist/emoji/1F3F4-E0067-E0062-E0065-E006E-E0067-E007F.svg +9 -0
  561. package/dist/emoji/1F3F4-E0067-E0062-E0073-E0063-E0074-E007F.svg +10 -0
  562. package/dist/emoji/1F3F4-E0067-E0062-E0077-E006C-E0073-E007F.svg +34 -0
  563. package/dist/emoji/1F3F4.svg +12 -0
  564. package/dist/emoji/1F3F5.svg +17 -0
  565. package/dist/emoji/1F3F7.svg +11 -0
  566. package/dist/emoji/1F3F8.svg +38 -0
  567. package/dist/emoji/1F3F9.svg +17 -0
  568. package/dist/emoji/1F3FA.svg +19 -0
  569. package/dist/emoji/1F400.svg +12 -0
  570. package/dist/emoji/1F401.svg +15 -0
  571. package/dist/emoji/1F402.svg +15 -0
  572. package/dist/emoji/1F403.svg +17 -0
  573. package/dist/emoji/1F404.svg +18 -0
  574. package/dist/emoji/1F405.svg +25 -0
  575. package/dist/emoji/1F406.svg +24 -0
  576. package/dist/emoji/1F407.svg +15 -0
  577. package/dist/emoji/1F408-200D-2B1B.svg +15 -0
  578. package/dist/emoji/1F408.svg +15 -0
  579. package/dist/emoji/1F409.svg +20 -0
  580. package/dist/emoji/1F40A.svg +16 -0
  581. package/dist/emoji/1F40B.svg +15 -0
  582. package/dist/emoji/1F40C.svg +15 -0
  583. package/dist/emoji/1F40D.svg +13 -0
  584. package/dist/emoji/1F40E.svg +15 -0
  585. package/dist/emoji/1F40F.svg +13 -0
  586. package/dist/emoji/1F410.svg +18 -0
  587. package/dist/emoji/1F411.svg +14 -0
  588. package/dist/emoji/1F412.svg +17 -0
  589. package/dist/emoji/1F413.svg +21 -0
  590. package/dist/emoji/1F414.svg +14 -0
  591. package/dist/emoji/1F415-200D-1F9BA.svg +35 -0
  592. package/dist/emoji/1F415.svg +15 -0
  593. package/dist/emoji/1F416.svg +19 -0
  594. package/dist/emoji/1F417.svg +17 -0
  595. package/dist/emoji/1F418.svg +13 -0
  596. package/dist/emoji/1F419.svg +19 -0
  597. package/dist/emoji/1F41A.svg +15 -0
  598. package/dist/emoji/1F41B.svg +22 -0
  599. package/dist/emoji/1F41C.svg +20 -0
  600. package/dist/emoji/1F41D.svg +20 -0
  601. package/dist/emoji/1F41E.svg +25 -0
  602. package/dist/emoji/1F41F.svg +10 -0
  603. package/dist/emoji/1F420.svg +18 -0
  604. package/dist/emoji/1F421.svg +39 -0
  605. package/dist/emoji/1F422.svg +27 -0
  606. package/dist/emoji/1F423.svg +21 -0
  607. package/dist/emoji/1F424.svg +18 -0
  608. package/dist/emoji/1F425.svg +21 -0
  609. package/dist/emoji/1F426-200D-1F525.svg +16 -0
  610. package/dist/emoji/1F426-200D-2B1B.svg +13 -0
  611. package/dist/emoji/1F426.svg +16 -0
  612. package/dist/emoji/1F427.svg +13 -0
  613. package/dist/emoji/1F428.svg +17 -0
  614. package/dist/emoji/1F429.svg +25 -0
  615. package/dist/emoji/1F42A.svg +14 -0
  616. package/dist/emoji/1F42B.svg +13 -0
  617. package/dist/emoji/1F42C.svg +16 -0
  618. package/dist/emoji/1F42D.svg +16 -0
  619. package/dist/emoji/1F42E.svg +19 -0
  620. package/dist/emoji/1F42F.svg +29 -0
  621. package/dist/emoji/1F430.svg +18 -0
  622. package/dist/emoji/1F431.svg +21 -0
  623. package/dist/emoji/1F432.svg +27 -0
  624. package/dist/emoji/1F433.svg +18 -0
  625. package/dist/emoji/1F434.svg +14 -0
  626. package/dist/emoji/1F435.svg +25 -0
  627. package/dist/emoji/1F436.svg +19 -0
  628. package/dist/emoji/1F437.svg +19 -0
  629. package/dist/emoji/1F438.svg +16 -0
  630. package/dist/emoji/1F439.svg +21 -0
  631. package/dist/emoji/1F43A.svg +25 -0
  632. package/dist/emoji/1F43B-200D-2744-FE0F.svg +16 -0
  633. package/dist/emoji/1F43B.svg +22 -0
  634. package/dist/emoji/1F43C.svg +26 -0
  635. package/dist/emoji/1F43D.svg +12 -0
  636. package/dist/emoji/1F43E.svg +26 -0
  637. package/dist/emoji/1F43F.svg +17 -0
  638. package/dist/emoji/1F440.svg +23 -0
  639. package/dist/emoji/1F441-FE0F-200D-1F5E8-FE0F.svg +15 -0
  640. package/dist/emoji/1F441.svg +16 -0
  641. package/dist/emoji/1F442.svg +16 -0
  642. package/dist/emoji/1F443.svg +14 -0
  643. package/dist/emoji/1F444.svg +19 -0
  644. package/dist/emoji/1F445.svg +15 -0
  645. package/dist/emoji/1F446.svg +23 -0
  646. package/dist/emoji/1F447.svg +22 -0
  647. package/dist/emoji/1F448.svg +51 -0
  648. package/dist/emoji/1F449.svg +38 -0
  649. package/dist/emoji/1F44A.svg +25 -0
  650. package/dist/emoji/1F44B.svg +15 -0
  651. package/dist/emoji/1F44C.svg +20 -0
  652. package/dist/emoji/1F44D.svg +17 -0
  653. package/dist/emoji/1F44E.svg +17 -0
  654. package/dist/emoji/1F44F.svg +41 -0
  655. package/dist/emoji/1F450.svg +13 -0
  656. package/dist/emoji/1F451.svg +29 -0
  657. package/dist/emoji/1F452.svg +18 -0
  658. package/dist/emoji/1F453.svg +18 -0
  659. package/dist/emoji/1F454.svg +15 -0
  660. package/dist/emoji/1F455.svg +18 -0
  661. package/dist/emoji/1F456.svg +14 -0
  662. package/dist/emoji/1F457.svg +12 -0
  663. package/dist/emoji/1F458.svg +30 -0
  664. package/dist/emoji/1F459.svg +15 -0
  665. package/dist/emoji/1F45A.svg +16 -0
  666. package/dist/emoji/1F45B.svg +19 -0
  667. package/dist/emoji/1F45C.svg +17 -0
  668. package/dist/emoji/1F45D.svg +13 -0
  669. package/dist/emoji/1F45E.svg +17 -0
  670. package/dist/emoji/1F45F.svg +16 -0
  671. package/dist/emoji/1F460.svg +12 -0
  672. package/dist/emoji/1F461.svg +13 -0
  673. package/dist/emoji/1F462.svg +13 -0
  674. package/dist/emoji/1F463.svg +33 -0
  675. package/dist/emoji/1F464.svg +13 -0
  676. package/dist/emoji/1F465.svg +15 -0
  677. package/dist/emoji/1F466.svg +20 -0
  678. package/dist/emoji/1F467.svg +20 -0
  679. package/dist/emoji/1F468-200D-1F33E.svg +43 -0
  680. package/dist/emoji/1F468-200D-1F373.svg +30 -0
  681. package/dist/emoji/1F468-200D-1F37C.svg +29 -0
  682. package/dist/emoji/1F468-200D-1F393.svg +32 -0
  683. package/dist/emoji/1F468-200D-1F3A4.svg +38 -0
  684. package/dist/emoji/1F468-200D-1F3A8.svg +44 -0
  685. package/dist/emoji/1F468-200D-1F3EB.svg +32 -0
  686. package/dist/emoji/1F468-200D-1F3ED.svg +40 -0
  687. package/dist/emoji/1F468-200D-1F466-200D-1F466.svg +37 -0
  688. package/dist/emoji/1F468-200D-1F466.svg +28 -0
  689. package/dist/emoji/1F468-200D-1F467-200D-1F466.svg +37 -0
  690. package/dist/emoji/1F468-200D-1F467-200D-1F467.svg +37 -0
  691. package/dist/emoji/1F468-200D-1F467.svg +28 -0
  692. package/dist/emoji/1F468-200D-1F468-200D-1F466-200D-1F466.svg +45 -0
  693. package/dist/emoji/1F468-200D-1F468-200D-1F466.svg +36 -0
  694. package/dist/emoji/1F468-200D-1F468-200D-1F467-200D-1F466.svg +45 -0
  695. package/dist/emoji/1F468-200D-1F468-200D-1F467-200D-1F467.svg +45 -0
  696. package/dist/emoji/1F468-200D-1F468-200D-1F467.svg +36 -0
  697. package/dist/emoji/1F468-200D-1F469-200D-1F466-200D-1F466.svg +45 -0
  698. package/dist/emoji/1F468-200D-1F469-200D-1F466.svg +36 -0
  699. package/dist/emoji/1F468-200D-1F469-200D-1F467-200D-1F466.svg +45 -0
  700. package/dist/emoji/1F468-200D-1F469-200D-1F467-200D-1F467.svg +45 -0
  701. package/dist/emoji/1F468-200D-1F469-200D-1F467.svg +36 -0
  702. package/dist/emoji/1F468-200D-1F4BB.svg +31 -0
  703. package/dist/emoji/1F468-200D-1F4BC.svg +37 -0
  704. package/dist/emoji/1F468-200D-1F527.svg +32 -0
  705. package/dist/emoji/1F468-200D-1F52C.svg +32 -0
  706. package/dist/emoji/1F468-200D-1F680.svg +30 -0
  707. package/dist/emoji/1F468-200D-1F692.svg +40 -0
  708. package/dist/emoji/1F468-200D-1F9AF-200D-27A1-FE0F.svg +26 -0
  709. package/dist/emoji/1F468-200D-1F9AF.svg +26 -0
  710. package/dist/emoji/1F468-200D-1F9B0.svg +22 -0
  711. package/dist/emoji/1F468-200D-1F9B1.svg +19 -0
  712. package/dist/emoji/1F468-200D-1F9B2.svg +17 -0
  713. package/dist/emoji/1F468-200D-1F9B3.svg +22 -0
  714. package/dist/emoji/1F468-200D-1F9BC-200D-27A1-FE0F.svg +25 -0
  715. package/dist/emoji/1F468-200D-1F9BC.svg +25 -0
  716. package/dist/emoji/1F468-200D-1F9BD-200D-27A1-FE0F.svg +22 -0
  717. package/dist/emoji/1F468-200D-1F9BD.svg +22 -0
  718. package/dist/emoji/1F468-200D-2695-FE0F.svg +30 -0
  719. package/dist/emoji/1F468-200D-2696-FE0F.svg +31 -0
  720. package/dist/emoji/1F468-200D-2708-FE0F.svg +44 -0
  721. package/dist/emoji/1F468-200D-2764-FE0F-200D-1F468.svg +39 -0
  722. package/dist/emoji/1F468-200D-2764-FE0F-200D-1F48B-200D-1F468.svg +35 -0
  723. package/dist/emoji/1F468.svg +23 -0
  724. package/dist/emoji/1F469-200D-1F33E.svg +49 -0
  725. package/dist/emoji/1F469-200D-1F373.svg +31 -0
  726. package/dist/emoji/1F469-200D-1F37C.svg +32 -0
  727. package/dist/emoji/1F469-200D-1F393.svg +33 -0
  728. package/dist/emoji/1F469-200D-1F3A4.svg +32 -0
  729. package/dist/emoji/1F469-200D-1F3A8.svg +46 -0
  730. package/dist/emoji/1F469-200D-1F3EB.svg +33 -0
  731. package/dist/emoji/1F469-200D-1F3ED.svg +42 -0
  732. package/dist/emoji/1F469-200D-1F466-200D-1F466.svg +37 -0
  733. package/dist/emoji/1F469-200D-1F466.svg +28 -0
  734. package/dist/emoji/1F469-200D-1F467-200D-1F466.svg +37 -0
  735. package/dist/emoji/1F469-200D-1F467-200D-1F467.svg +37 -0
  736. package/dist/emoji/1F469-200D-1F467.svg +28 -0
  737. package/dist/emoji/1F469-200D-1F469-200D-1F466-200D-1F466.svg +45 -0
  738. package/dist/emoji/1F469-200D-1F469-200D-1F466.svg +36 -0
  739. package/dist/emoji/1F469-200D-1F469-200D-1F467-200D-1F466.svg +45 -0
  740. package/dist/emoji/1F469-200D-1F469-200D-1F467-200D-1F467.svg +45 -0
  741. package/dist/emoji/1F469-200D-1F469-200D-1F467.svg +36 -0
  742. package/dist/emoji/1F469-200D-1F4BB.svg +30 -0
  743. package/dist/emoji/1F469-200D-1F4BC.svg +37 -0
  744. package/dist/emoji/1F469-200D-1F527.svg +34 -0
  745. package/dist/emoji/1F469-200D-1F52C.svg +33 -0
  746. package/dist/emoji/1F469-200D-1F680.svg +41 -0
  747. package/dist/emoji/1F469-200D-1F692.svg +43 -0
  748. package/dist/emoji/1F469-200D-1F9AF-200D-27A1-FE0F.svg +27 -0
  749. package/dist/emoji/1F469-200D-1F9AF.svg +27 -0
  750. package/dist/emoji/1F469-200D-1F9B0.svg +19 -0
  751. package/dist/emoji/1F469-200D-1F9B1.svg +19 -0
  752. package/dist/emoji/1F469-200D-1F9B2.svg +15 -0
  753. package/dist/emoji/1F469-200D-1F9B3.svg +19 -0
  754. package/dist/emoji/1F469-200D-1F9BC-200D-27A1-FE0F.svg +26 -0
  755. package/dist/emoji/1F469-200D-1F9BC.svg +26 -0
  756. package/dist/emoji/1F469-200D-1F9BD-200D-27A1-FE0F.svg +30 -0
  757. package/dist/emoji/1F469-200D-1F9BD.svg +30 -0
  758. package/dist/emoji/1F469-200D-2695-FE0F.svg +31 -0
  759. package/dist/emoji/1F469-200D-2696-FE0F.svg +32 -0
  760. package/dist/emoji/1F469-200D-2708-FE0F.svg +45 -0
  761. package/dist/emoji/1F469-200D-2764-FE0F-200D-1F468.svg +39 -0
  762. package/dist/emoji/1F469-200D-2764-FE0F-200D-1F469.svg +35 -0
  763. package/dist/emoji/1F469-200D-2764-FE0F-200D-1F48B-200D-1F468.svg +35 -0
  764. package/dist/emoji/1F469-200D-2764-FE0F-200D-1F48B-200D-1F469.svg +35 -0
  765. package/dist/emoji/1F469.svg +20 -0
  766. package/dist/emoji/1F46A.svg +36 -0
  767. package/dist/emoji/1F46B.svg +25 -0
  768. package/dist/emoji/1F46C.svg +25 -0
  769. package/dist/emoji/1F46D.svg +25 -0
  770. package/dist/emoji/1F46E-200D-2640-FE0F.svg +45 -0
  771. package/dist/emoji/1F46E-200D-2642-FE0F.svg +45 -0
  772. package/dist/emoji/1F46E.svg +42 -0
  773. package/dist/emoji/1F46F-200D-2640-FE0F.svg +34 -0
  774. package/dist/emoji/1F46F-200D-2642-FE0F.svg +34 -0
  775. package/dist/emoji/1F46F.svg +30 -0
  776. package/dist/emoji/1F470-200D-2640-FE0F.svg +30 -0
  777. package/dist/emoji/1F470-200D-2642-FE0F.svg +25 -0
  778. package/dist/emoji/1F470.svg +25 -0
  779. package/dist/emoji/1F471-200D-2640-FE0F.svg +23 -0
  780. package/dist/emoji/1F471-200D-2642-FE0F.svg +30 -0
  781. package/dist/emoji/1F471.svg +20 -0
  782. package/dist/emoji/1F472.svg +30 -0
  783. package/dist/emoji/1F473-200D-2640-FE0F.svg +30 -0
  784. package/dist/emoji/1F473-200D-2642-FE0F.svg +38 -0
  785. package/dist/emoji/1F473.svg +30 -0
  786. package/dist/emoji/1F474.svg +22 -0
  787. package/dist/emoji/1F475.svg +23 -0
  788. package/dist/emoji/1F476.svg +25 -0
  789. package/dist/emoji/1F477-200D-2640-FE0F.svg +51 -0
  790. package/dist/emoji/1F477-200D-2642-FE0F.svg +47 -0
  791. package/dist/emoji/1F477.svg +41 -0
  792. package/dist/emoji/1F478.svg +30 -0
  793. package/dist/emoji/1F479.svg +24 -0
  794. package/dist/emoji/1F47A.svg +26 -0
  795. package/dist/emoji/1F47B.svg +15 -0
  796. package/dist/emoji/1F47C.svg +24 -0
  797. package/dist/emoji/1F47D.svg +14 -0
  798. package/dist/emoji/1F47E.svg +33 -0
  799. package/dist/emoji/1F47F.svg +20 -0
  800. package/dist/emoji/1F480.svg +21 -0
  801. package/dist/emoji/1F481-200D-2640-FE0F.svg +21 -0
  802. package/dist/emoji/1F481-200D-2642-FE0F.svg +21 -0
  803. package/dist/emoji/1F481.svg +21 -0
  804. package/dist/emoji/1F482-200D-2640-FE0F.svg +40 -0
  805. package/dist/emoji/1F482-200D-2642-FE0F.svg +32 -0
  806. package/dist/emoji/1F482.svg +30 -0
  807. package/dist/emoji/1F483.svg +14 -0
  808. package/dist/emoji/1F484.svg +17 -0
  809. package/dist/emoji/1F485.svg +35 -0
  810. package/dist/emoji/1F486-200D-2640-FE0F.svg +29 -0
  811. package/dist/emoji/1F486-200D-2642-FE0F.svg +29 -0
  812. package/dist/emoji/1F486.svg +29 -0
  813. package/dist/emoji/1F487-200D-2640-FE0F.svg +27 -0
  814. package/dist/emoji/1F487-200D-2642-FE0F.svg +28 -0
  815. package/dist/emoji/1F487.svg +27 -0
  816. package/dist/emoji/1F488.svg +27 -0
  817. package/dist/emoji/1F489.svg +21 -0
  818. package/dist/emoji/1F48A.svg +18 -0
  819. package/dist/emoji/1F48B.svg +13 -0
  820. package/dist/emoji/1F48C.svg +19 -0
  821. package/dist/emoji/1F48D.svg +15 -0
  822. package/dist/emoji/1F48E.svg +17 -0
  823. package/dist/emoji/1F48F.svg +35 -0
  824. package/dist/emoji/1F490.svg +44 -0
  825. package/dist/emoji/1F491.svg +39 -0
  826. package/dist/emoji/1F492.svg +19 -0
  827. package/dist/emoji/1F493.svg +16 -0
  828. package/dist/emoji/1F494.svg +13 -0
  829. package/dist/emoji/1F495.svg +17 -0
  830. package/dist/emoji/1F496.svg +17 -0
  831. package/dist/emoji/1F497.svg +14 -0
  832. package/dist/emoji/1F498.svg +17 -0
  833. package/dist/emoji/1F499.svg +11 -0
  834. package/dist/emoji/1F49A.svg +13 -0
  835. package/dist/emoji/1F49B.svg +13 -0
  836. package/dist/emoji/1F49C.svg +10 -0
  837. package/dist/emoji/1F49D.svg +27 -0
  838. package/dist/emoji/1F49E.svg +15 -0
  839. package/dist/emoji/1F49F.svg +14 -0
  840. package/dist/emoji/1F4A0.svg +14 -0
  841. package/dist/emoji/1F4A1.svg +16 -0
  842. package/dist/emoji/1F4A2.svg +14 -0
  843. package/dist/emoji/1F4A3.svg +16 -0
  844. package/dist/emoji/1F4A4.svg +11 -0
  845. package/dist/emoji/1F4A5.svg +12 -0
  846. package/dist/emoji/1F4A6.svg +18 -0
  847. package/dist/emoji/1F4A7.svg +12 -0
  848. package/dist/emoji/1F4A8.svg +14 -0
  849. package/dist/emoji/1F4A9.svg +15 -0
  850. package/dist/emoji/1F4AA.svg +24 -0
  851. package/dist/emoji/1F4AB.svg +14 -0
  852. package/dist/emoji/1F4AC.svg +18 -0
  853. package/dist/emoji/1F4AD.svg +15 -0
  854. package/dist/emoji/1F4AE.svg +25 -0
  855. package/dist/emoji/1F4AF.svg +20 -0
  856. package/dist/emoji/1F4B0.svg +22 -0
  857. package/dist/emoji/1F4B1.svg +37 -0
  858. package/dist/emoji/1F4B2.svg +8 -0
  859. package/dist/emoji/1F4B3.svg +15 -0
  860. package/dist/emoji/1F4B4.svg +19 -0
  861. package/dist/emoji/1F4B5.svg +23 -0
  862. package/dist/emoji/1F4B6.svg +17 -0
  863. package/dist/emoji/1F4B7.svg +16 -0
  864. package/dist/emoji/1F4B8.svg +33 -0
  865. package/dist/emoji/1F4B9.svg +14 -0
  866. package/dist/emoji/1F4BA.svg +20 -0
  867. package/dist/emoji/1F4BB.svg +19 -0
  868. package/dist/emoji/1F4BC.svg +15 -0
  869. package/dist/emoji/1F4BD.svg +20 -0
  870. package/dist/emoji/1F4BE.svg +17 -0
  871. package/dist/emoji/1F4BF.svg +14 -0
  872. package/dist/emoji/1F4C0.svg +13 -0
  873. package/dist/emoji/1F4C1.svg +10 -0
  874. package/dist/emoji/1F4C2.svg +10 -0
  875. package/dist/emoji/1F4C3.svg +20 -0
  876. package/dist/emoji/1F4C4.svg +12 -0
  877. package/dist/emoji/1F4C5.svg +19 -0
  878. package/dist/emoji/1F4C6.svg +17 -0
  879. package/dist/emoji/1F4C7.svg +23 -0
  880. package/dist/emoji/1F4C8.svg +25 -0
  881. package/dist/emoji/1F4C9.svg +25 -0
  882. package/dist/emoji/1F4CA.svg +25 -0
  883. package/dist/emoji/1F4CB.svg +24 -0
  884. package/dist/emoji/1F4CC.svg +15 -0
  885. package/dist/emoji/1F4CD.svg +15 -0
  886. package/dist/emoji/1F4CE.svg +6 -0
  887. package/dist/emoji/1F4CF.svg +25 -0
  888. package/dist/emoji/1F4D0.svg +29 -0
  889. package/dist/emoji/1F4D1.svg +22 -0
  890. package/dist/emoji/1F4D2.svg +21 -0
  891. package/dist/emoji/1F4D3.svg +19 -0
  892. package/dist/emoji/1F4D4.svg +24 -0
  893. package/dist/emoji/1F4D5.svg +10 -0
  894. package/dist/emoji/1F4D6.svg +24 -0
  895. package/dist/emoji/1F4D7.svg +18 -0
  896. package/dist/emoji/1F4D8.svg +17 -0
  897. package/dist/emoji/1F4D9.svg +20 -0
  898. package/dist/emoji/1F4DA.svg +16 -0
  899. package/dist/emoji/1F4DB.svg +11 -0
  900. package/dist/emoji/1F4DC.svg +23 -0
  901. package/dist/emoji/1F4DD.svg +24 -0
  902. package/dist/emoji/1F4DE.svg +11 -0
  903. package/dist/emoji/1F4DF.svg +21 -0
  904. package/dist/emoji/1F4E0.svg +28 -0
  905. package/dist/emoji/1F4E1.svg +20 -0
  906. package/dist/emoji/1F4E2.svg +14 -0
  907. package/dist/emoji/1F4E3.svg +21 -0
  908. package/dist/emoji/1F4E4.svg +13 -0
  909. package/dist/emoji/1F4E5.svg +13 -0
  910. package/dist/emoji/1F4E6.svg +21 -0
  911. package/dist/emoji/1F4E7.svg +26 -0
  912. package/dist/emoji/1F4E8.svg +14 -0
  913. package/dist/emoji/1F4E9.svg +20 -0
  914. package/dist/emoji/1F4EA.svg +20 -0
  915. package/dist/emoji/1F4EB.svg +22 -0
  916. package/dist/emoji/1F4EC.svg +19 -0
  917. package/dist/emoji/1F4ED.svg +15 -0
  918. package/dist/emoji/1F4EE.svg +28 -0
  919. package/dist/emoji/1F4EF.svg +17 -0
  920. package/dist/emoji/1F4F0.svg +21 -0
  921. package/dist/emoji/1F4F1.svg +16 -0
  922. package/dist/emoji/1F4F2.svg +17 -0
  923. package/dist/emoji/1F4F3.svg +18 -0
  924. package/dist/emoji/1F4F4.svg +17 -0
  925. package/dist/emoji/1F4F5.svg +24 -0
  926. package/dist/emoji/1F4F6.svg +19 -0
  927. package/dist/emoji/1F4F7.svg +17 -0
  928. package/dist/emoji/1F4F8.svg +22 -0
  929. package/dist/emoji/1F4F9.svg +23 -0
  930. package/dist/emoji/1F4FA.svg +19 -0
  931. package/dist/emoji/1F4FB.svg +26 -0
  932. package/dist/emoji/1F4FC.svg +30 -0
  933. package/dist/emoji/1F4FD.svg +43 -0
  934. package/dist/emoji/1F4FF.svg +21 -0
  935. package/dist/emoji/1F500.svg +15 -0
  936. package/dist/emoji/1F501.svg +14 -0
  937. package/dist/emoji/1F502.svg +13 -0
  938. package/dist/emoji/1F503.svg +10 -0
  939. package/dist/emoji/1F504.svg +13 -0
  940. package/dist/emoji/1F505.svg +19 -0
  941. package/dist/emoji/1F506.svg +19 -0
  942. package/dist/emoji/1F507.svg +17 -0
  943. package/dist/emoji/1F508.svg +14 -0
  944. package/dist/emoji/1F509.svg +15 -0
  945. package/dist/emoji/1F50A.svg +16 -0
  946. package/dist/emoji/1F50B.svg +14 -0
  947. package/dist/emoji/1F50C.svg +20 -0
  948. package/dist/emoji/1F50D.svg +16 -0
  949. package/dist/emoji/1F50E.svg +16 -0
  950. package/dist/emoji/1F50F.svg +22 -0
  951. package/dist/emoji/1F510.svg +22 -0
  952. package/dist/emoji/1F511.svg +16 -0
  953. package/dist/emoji/1F512.svg +15 -0
  954. package/dist/emoji/1F513.svg +14 -0
  955. package/dist/emoji/1F514.svg +14 -0
  956. package/dist/emoji/1F515.svg +16 -0
  957. package/dist/emoji/1F516.svg +13 -0
  958. package/dist/emoji/1F517.svg +12 -0
  959. package/dist/emoji/1F518.svg +13 -0
  960. package/dist/emoji/1F519.svg +16 -0
  961. package/dist/emoji/1F51A.svg +12 -0
  962. package/dist/emoji/1F51B.svg +24 -0
  963. package/dist/emoji/1F51C.svg +12 -0
  964. package/dist/emoji/1F51D.svg +14 -0
  965. package/dist/emoji/1F51E.svg +22 -0
  966. package/dist/emoji/1F51F.svg +10 -0
  967. package/dist/emoji/1F520.svg +24 -0
  968. package/dist/emoji/1F521.svg +26 -0
  969. package/dist/emoji/1F522.svg +22 -0
  970. package/dist/emoji/1F523.svg +28 -0
  971. package/dist/emoji/1F524.svg +23 -0
  972. package/dist/emoji/1F525.svg +14 -0
  973. package/dist/emoji/1F526.svg +26 -0
  974. package/dist/emoji/1F527.svg +11 -0
  975. package/dist/emoji/1F528.svg +12 -0
  976. package/dist/emoji/1F529.svg +22 -0
  977. package/dist/emoji/1F52A.svg +14 -0
  978. package/dist/emoji/1F52B.svg +16 -0
  979. package/dist/emoji/1F52C.svg +22 -0
  980. package/dist/emoji/1F52D.svg +17 -0
  981. package/dist/emoji/1F52E.svg +20 -0
  982. package/dist/emoji/1F52F.svg +16 -0
  983. package/dist/emoji/1F530.svg +10 -0
  984. package/dist/emoji/1F531.svg +11 -0
  985. package/dist/emoji/1F532.svg +13 -0
  986. package/dist/emoji/1F533.svg +13 -0
  987. package/dist/emoji/1F534.svg +8 -0
  988. package/dist/emoji/1F535.svg +8 -0
  989. package/dist/emoji/1F536.svg +8 -0
  990. package/dist/emoji/1F537.svg +8 -0
  991. package/dist/emoji/1F538.svg +8 -0
  992. package/dist/emoji/1F539.svg +8 -0
  993. package/dist/emoji/1F53A.svg +8 -0
  994. package/dist/emoji/1F53B.svg +8 -0
  995. package/dist/emoji/1F53C.svg +9 -0
  996. package/dist/emoji/1F53D.svg +9 -0
  997. package/dist/emoji/1F549.svg +18 -0
  998. package/dist/emoji/1F54A.svg +13 -0
  999. package/dist/emoji/1F54B.svg +21 -0
  1000. package/dist/emoji/1F54C.svg +29 -0
  1001. package/dist/emoji/1F54D.svg +31 -0
  1002. package/dist/emoji/1F54E.svg +22 -0
  1003. package/dist/emoji/1F550.svg +15 -0
  1004. package/dist/emoji/1F551.svg +15 -0
  1005. package/dist/emoji/1F552.svg +15 -0
  1006. package/dist/emoji/1F553.svg +15 -0
  1007. package/dist/emoji/1F554.svg +15 -0
  1008. package/dist/emoji/1F555.svg +15 -0
  1009. package/dist/emoji/1F556.svg +15 -0
  1010. package/dist/emoji/1F557.svg +15 -0
  1011. package/dist/emoji/1F558.svg +15 -0
  1012. package/dist/emoji/1F559.svg +15 -0
  1013. package/dist/emoji/1F55A.svg +15 -0
  1014. package/dist/emoji/1F55B.svg +15 -0
  1015. package/dist/emoji/1F55C.svg +15 -0
  1016. package/dist/emoji/1F55D.svg +15 -0
  1017. package/dist/emoji/1F55E.svg +15 -0
  1018. package/dist/emoji/1F55F.svg +15 -0
  1019. package/dist/emoji/1F560.svg +15 -0
  1020. package/dist/emoji/1F561.svg +15 -0
  1021. package/dist/emoji/1F562.svg +15 -0
  1022. package/dist/emoji/1F563.svg +15 -0
  1023. package/dist/emoji/1F564.svg +15 -0
  1024. package/dist/emoji/1F565.svg +15 -0
  1025. package/dist/emoji/1F566.svg +15 -0
  1026. package/dist/emoji/1F567.svg +12 -0
  1027. package/dist/emoji/1F56F.svg +16 -0
  1028. package/dist/emoji/1F570.svg +20 -0
  1029. package/dist/emoji/1F573.svg +13 -0
  1030. package/dist/emoji/1F574.svg +14 -0
  1031. package/dist/emoji/1F575-FE0F-200D-2640-FE0F.svg +49 -0
  1032. package/dist/emoji/1F575-FE0F-200D-2642-FE0F.svg +43 -0
  1033. package/dist/emoji/1F575.svg +39 -0
  1034. package/dist/emoji/1F576.svg +16 -0
  1035. package/dist/emoji/1F577.svg +21 -0
  1036. package/dist/emoji/1F578.svg +16 -0
  1037. package/dist/emoji/1F579.svg +17 -0
  1038. package/dist/emoji/1F57A.svg +14 -0
  1039. package/dist/emoji/1F587.svg +11 -0
  1040. package/dist/emoji/1F58A.svg +13 -0
  1041. package/dist/emoji/1F58B.svg +13 -0
  1042. package/dist/emoji/1F58C.svg +15 -0
  1043. package/dist/emoji/1F58D.svg +16 -0
  1044. package/dist/emoji/1F590.svg +11 -0
  1045. package/dist/emoji/1F595.svg +16 -0
  1046. package/dist/emoji/1F596.svg +12 -0
  1047. package/dist/emoji/1F5A4.svg +11 -0
  1048. package/dist/emoji/1F5A5.svg +15 -0
  1049. package/dist/emoji/1F5A8.svg +30 -0
  1050. package/dist/emoji/1F5B1.svg +11 -0
  1051. package/dist/emoji/1F5B2.svg +13 -0
  1052. package/dist/emoji/1F5BC.svg +18 -0
  1053. package/dist/emoji/1F5C2.svg +19 -0
  1054. package/dist/emoji/1F5C3.svg +33 -0
  1055. package/dist/emoji/1F5C4.svg +23 -0
  1056. package/dist/emoji/1F5D1.svg +26 -0
  1057. package/dist/emoji/1F5D2.svg +31 -0
  1058. package/dist/emoji/1F5D3.svg +26 -0
  1059. package/dist/emoji/1F5DC.svg +19 -0
  1060. package/dist/emoji/1F5DD.svg +13 -0
  1061. package/dist/emoji/1F5DE.svg +20 -0
  1062. package/dist/emoji/1F5E1.svg +13 -0
  1063. package/dist/emoji/1F5E3.svg +16 -0
  1064. package/dist/emoji/1F5E8.svg +11 -0
  1065. package/dist/emoji/1F5EF.svg +13 -0
  1066. package/dist/emoji/1F5F3.svg +15 -0
  1067. package/dist/emoji/1F5FA.svg +17 -0
  1068. package/dist/emoji/1F5FB.svg +14 -0
  1069. package/dist/emoji/1F5FC.svg +25 -0
  1070. package/dist/emoji/1F5FD.svg +27 -0
  1071. package/dist/emoji/1F5FE.svg +21 -0
  1072. package/dist/emoji/1F5FF.svg +29 -0
  1073. package/dist/emoji/1F600.svg +17 -0
  1074. package/dist/emoji/1F601.svg +17 -0
  1075. package/dist/emoji/1F602.svg +24 -0
  1076. package/dist/emoji/1F603.svg +17 -0
  1077. package/dist/emoji/1F604.svg +17 -0
  1078. package/dist/emoji/1F605.svg +19 -0
  1079. package/dist/emoji/1F606.svg +17 -0
  1080. package/dist/emoji/1F607.svg +19 -0
  1081. package/dist/emoji/1F608.svg +20 -0
  1082. package/dist/emoji/1F609.svg +18 -0
  1083. package/dist/emoji/1F60A.svg +14 -0
  1084. package/dist/emoji/1F60B.svg +16 -0
  1085. package/dist/emoji/1F60C.svg +16 -0
  1086. package/dist/emoji/1F60D.svg +17 -0
  1087. package/dist/emoji/1F60E.svg +21 -0
  1088. package/dist/emoji/1F60F.svg +16 -0
  1089. package/dist/emoji/1F610.svg +14 -0
  1090. package/dist/emoji/1F611.svg +14 -0
  1091. package/dist/emoji/1F612.svg +16 -0
  1092. package/dist/emoji/1F613.svg +16 -0
  1093. package/dist/emoji/1F614.svg +16 -0
  1094. package/dist/emoji/1F615.svg +14 -0
  1095. package/dist/emoji/1F616.svg +14 -0
  1096. package/dist/emoji/1F617.svg +14 -0
  1097. package/dist/emoji/1F618.svg +18 -0
  1098. package/dist/emoji/1F619.svg +14 -0
  1099. package/dist/emoji/1F61A.svg +16 -0
  1100. package/dist/emoji/1F61B.svg +17 -0
  1101. package/dist/emoji/1F61C.svg +17 -0
  1102. package/dist/emoji/1F61D.svg +17 -0
  1103. package/dist/emoji/1F61E.svg +11 -0
  1104. package/dist/emoji/1F61F.svg +16 -0
  1105. package/dist/emoji/1F620.svg +16 -0
  1106. package/dist/emoji/1F621.svg +16 -0
  1107. package/dist/emoji/1F622.svg +16 -0
  1108. package/dist/emoji/1F623.svg +17 -0
  1109. package/dist/emoji/1F624.svg +19 -0
  1110. package/dist/emoji/1F625.svg +15 -0
  1111. package/dist/emoji/1F626.svg +14 -0
  1112. package/dist/emoji/1F627.svg +17 -0
  1113. package/dist/emoji/1F628.svg +18 -0
  1114. package/dist/emoji/1F629.svg +16 -0
  1115. package/dist/emoji/1F62A.svg +16 -0
  1116. package/dist/emoji/1F62B.svg +16 -0
  1117. package/dist/emoji/1F62C.svg +16 -0
  1118. package/dist/emoji/1F62D.svg +21 -0
  1119. package/dist/emoji/1F62E-200D-1F4A8.svg +15 -0
  1120. package/dist/emoji/1F62E.svg +15 -0
  1121. package/dist/emoji/1F62F.svg +17 -0
  1122. package/dist/emoji/1F630.svg +18 -0
  1123. package/dist/emoji/1F631.svg +23 -0
  1124. package/dist/emoji/1F632.svg +15 -0
  1125. package/dist/emoji/1F633.svg +30 -0
  1126. package/dist/emoji/1F634.svg +23 -0
  1127. package/dist/emoji/1F635-200D-1F4AB.svg +25 -0
  1128. package/dist/emoji/1F635.svg +16 -0
  1129. package/dist/emoji/1F636-200D-1F32B-FE0F.svg +19 -0
  1130. package/dist/emoji/1F636.svg +13 -0
  1131. package/dist/emoji/1F637.svg +21 -0
  1132. package/dist/emoji/1F638.svg +22 -0
  1133. package/dist/emoji/1F639.svg +26 -0
  1134. package/dist/emoji/1F63A.svg +26 -0
  1135. package/dist/emoji/1F63B.svg +24 -0
  1136. package/dist/emoji/1F63C.svg +26 -0
  1137. package/dist/emoji/1F63D.svg +20 -0
  1138. package/dist/emoji/1F63E.svg +26 -0
  1139. package/dist/emoji/1F63F.svg +28 -0
  1140. package/dist/emoji/1F640.svg +27 -0
  1141. package/dist/emoji/1F641.svg +14 -0
  1142. package/dist/emoji/1F642-200D-2194-FE0F.svg +13 -0
  1143. package/dist/emoji/1F642-200D-2195-FE0F.svg +15 -0
  1144. package/dist/emoji/1F642.svg +14 -0
  1145. package/dist/emoji/1F643.svg +14 -0
  1146. package/dist/emoji/1F644.svg +18 -0
  1147. package/dist/emoji/1F645-200D-2640-FE0F.svg +32 -0
  1148. package/dist/emoji/1F645-200D-2642-FE0F.svg +30 -0
  1149. package/dist/emoji/1F645.svg +30 -0
  1150. package/dist/emoji/1F646-200D-2640-FE0F.svg +26 -0
  1151. package/dist/emoji/1F646-200D-2642-FE0F.svg +24 -0
  1152. package/dist/emoji/1F646.svg +26 -0
  1153. package/dist/emoji/1F647-200D-2640-FE0F.svg +28 -0
  1154. package/dist/emoji/1F647-200D-2642-FE0F.svg +27 -0
  1155. package/dist/emoji/1F647.svg +28 -0
  1156. package/dist/emoji/1F648.svg +32 -0
  1157. package/dist/emoji/1F649.svg +36 -0
  1158. package/dist/emoji/1F64A.svg +34 -0
  1159. package/dist/emoji/1F64B-200D-2640-FE0F.svg +25 -0
  1160. package/dist/emoji/1F64B-200D-2642-FE0F.svg +25 -0
  1161. package/dist/emoji/1F64B.svg +25 -0
  1162. package/dist/emoji/1F64C.svg +17 -0
  1163. package/dist/emoji/1F64D-200D-2640-FE0F.svg +19 -0
  1164. package/dist/emoji/1F64D-200D-2642-FE0F.svg +19 -0
  1165. package/dist/emoji/1F64D.svg +19 -0
  1166. package/dist/emoji/1F64E-200D-2640-FE0F.svg +19 -0
  1167. package/dist/emoji/1F64E-200D-2642-FE0F.svg +19 -0
  1168. package/dist/emoji/1F64E.svg +19 -0
  1169. package/dist/emoji/1F64F.svg +18 -0
  1170. package/dist/emoji/1F680.svg +20 -0
  1171. package/dist/emoji/1F681.svg +18 -0
  1172. package/dist/emoji/1F682.svg +38 -0
  1173. package/dist/emoji/1F683.svg +24 -0
  1174. package/dist/emoji/1F684.svg +17 -0
  1175. package/dist/emoji/1F685.svg +20 -0
  1176. package/dist/emoji/1F686.svg +19 -0
  1177. package/dist/emoji/1F687.svg +18 -0
  1178. package/dist/emoji/1F688.svg +17 -0
  1179. package/dist/emoji/1F689.svg +27 -0
  1180. package/dist/emoji/1F68A.svg +19 -0
  1181. package/dist/emoji/1F68B.svg +27 -0
  1182. package/dist/emoji/1F68C.svg +26 -0
  1183. package/dist/emoji/1F68D.svg +28 -0
  1184. package/dist/emoji/1F68E.svg +27 -0
  1185. package/dist/emoji/1F68F.svg +25 -0
  1186. package/dist/emoji/1F690.svg +24 -0
  1187. package/dist/emoji/1F691.svg +30 -0
  1188. package/dist/emoji/1F692.svg +35 -0
  1189. package/dist/emoji/1F693.svg +26 -0
  1190. package/dist/emoji/1F694.svg +28 -0
  1191. package/dist/emoji/1F695.svg +26 -0
  1192. package/dist/emoji/1F696.svg +26 -0
  1193. package/dist/emoji/1F697.svg +20 -0
  1194. package/dist/emoji/1F698.svg +24 -0
  1195. package/dist/emoji/1F699.svg +23 -0
  1196. package/dist/emoji/1F69A.svg +24 -0
  1197. package/dist/emoji/1F69B.svg +21 -0
  1198. package/dist/emoji/1F69C.svg +25 -0
  1199. package/dist/emoji/1F69D.svg +38 -0
  1200. package/dist/emoji/1F69E.svg +28 -0
  1201. package/dist/emoji/1F69F.svg +35 -0
  1202. package/dist/emoji/1F6A0.svg +46 -0
  1203. package/dist/emoji/1F6A1.svg +24 -0
  1204. package/dist/emoji/1F6A2.svg +28 -0
  1205. package/dist/emoji/1F6A3-200D-2640-FE0F.svg +21 -0
  1206. package/dist/emoji/1F6A3-200D-2642-FE0F.svg +20 -0
  1207. package/dist/emoji/1F6A3.svg +22 -0
  1208. package/dist/emoji/1F6A4.svg +17 -0
  1209. package/dist/emoji/1F6A5.svg +21 -0
  1210. package/dist/emoji/1F6A6.svg +17 -0
  1211. package/dist/emoji/1F6A7.svg +36 -0
  1212. package/dist/emoji/1F6A8.svg +14 -0
  1213. package/dist/emoji/1F6A9.svg +11 -0
  1214. package/dist/emoji/1F6AA.svg +17 -0
  1215. package/dist/emoji/1F6AB.svg +14 -0
  1216. package/dist/emoji/1F6AC.svg +15 -0
  1217. package/dist/emoji/1F6AD.svg +16 -0
  1218. package/dist/emoji/1F6AE.svg +18 -0
  1219. package/dist/emoji/1F6AF.svg +28 -0
  1220. package/dist/emoji/1F6B0.svg +13 -0
  1221. package/dist/emoji/1F6B1.svg +23 -0
  1222. package/dist/emoji/1F6B2.svg +32 -0
  1223. package/dist/emoji/1F6B3.svg +23 -0
  1224. package/dist/emoji/1F6B4-200D-2640-FE0F.svg +17 -0
  1225. package/dist/emoji/1F6B4-200D-2642-FE0F.svg +16 -0
  1226. package/dist/emoji/1F6B4.svg +18 -0
  1227. package/dist/emoji/1F6B5-200D-2640-FE0F.svg +22 -0
  1228. package/dist/emoji/1F6B5-200D-2642-FE0F.svg +21 -0
  1229. package/dist/emoji/1F6B5.svg +22 -0
  1230. package/dist/emoji/1F6B6-200D-2640-FE0F-200D-27A1-FE0F.svg +14 -0
  1231. package/dist/emoji/1F6B6-200D-2640-FE0F.svg +14 -0
  1232. package/dist/emoji/1F6B6-200D-2642-FE0F-200D-27A1-FE0F.svg +13 -0
  1233. package/dist/emoji/1F6B6-200D-2642-FE0F.svg +13 -0
  1234. package/dist/emoji/1F6B6-200D-27A1-FE0F.svg +15 -0
  1235. package/dist/emoji/1F6B6.svg +15 -0
  1236. package/dist/emoji/1F6B7.svg +21 -0
  1237. package/dist/emoji/1F6B8.svg +16 -0
  1238. package/dist/emoji/1F6B9.svg +13 -0
  1239. package/dist/emoji/1F6BA.svg +13 -0
  1240. package/dist/emoji/1F6BB.svg +18 -0
  1241. package/dist/emoji/1F6BC.svg +19 -0
  1242. package/dist/emoji/1F6BD.svg +17 -0
  1243. package/dist/emoji/1F6BE.svg +10 -0
  1244. package/dist/emoji/1F6BF.svg +26 -0
  1245. package/dist/emoji/1F6C0.svg +31 -0
  1246. package/dist/emoji/1F6C1.svg +22 -0
  1247. package/dist/emoji/1F6C2.svg +52 -0
  1248. package/dist/emoji/1F6C3.svg +63 -0
  1249. package/dist/emoji/1F6C4.svg +26 -0
  1250. package/dist/emoji/1F6C5.svg +30 -0
  1251. package/dist/emoji/1F6CB.svg +27 -0
  1252. package/dist/emoji/1F6CC.svg +22 -0
  1253. package/dist/emoji/1F6CD.svg +17 -0
  1254. package/dist/emoji/1F6CE.svg +19 -0
  1255. package/dist/emoji/1F6CF.svg +19 -0
  1256. package/dist/emoji/1F6D0.svg +13 -0
  1257. package/dist/emoji/1F6D1.svg +25 -0
  1258. package/dist/emoji/1F6D2.svg +54 -0
  1259. package/dist/emoji/1F6D5.svg +44 -0
  1260. package/dist/emoji/1F6D6.svg +20 -0
  1261. package/dist/emoji/1F6D7.svg +24 -0
  1262. package/dist/emoji/1F6D8.svg +36 -0
  1263. package/dist/emoji/1F6DC.svg +12 -0
  1264. package/dist/emoji/1F6DD.svg +20 -0
  1265. package/dist/emoji/1F6DE.svg +19 -0
  1266. package/dist/emoji/1F6DF.svg +33 -0
  1267. package/dist/emoji/1F6E0.svg +23 -0
  1268. package/dist/emoji/1F6E1.svg +14 -0
  1269. package/dist/emoji/1F6E2.svg +22 -0
  1270. package/dist/emoji/1F6E3.svg +28 -0
  1271. package/dist/emoji/1F6E4.svg +21 -0
  1272. package/dist/emoji/1F6E5.svg +16 -0
  1273. package/dist/emoji/1F6E9.svg +21 -0
  1274. package/dist/emoji/1F6EB.svg +15 -0
  1275. package/dist/emoji/1F6EC.svg +17 -0
  1276. package/dist/emoji/1F6F0.svg +27 -0
  1277. package/dist/emoji/1F6F3.svg +21 -0
  1278. package/dist/emoji/1F6F4.svg +26 -0
  1279. package/dist/emoji/1F6F5.svg +22 -0
  1280. package/dist/emoji/1F6F6.svg +15 -0
  1281. package/dist/emoji/1F6F7.svg +21 -0
  1282. package/dist/emoji/1F6F8.svg +57 -0
  1283. package/dist/emoji/1F6F9.svg +20 -0
  1284. package/dist/emoji/1F6FA.svg +24 -0
  1285. package/dist/emoji/1F6FB.svg +25 -0
  1286. package/dist/emoji/1F6FC.svg +28 -0
  1287. package/dist/emoji/1F7E0.svg +8 -0
  1288. package/dist/emoji/1F7E1.svg +8 -0
  1289. package/dist/emoji/1F7E2.svg +8 -0
  1290. package/dist/emoji/1F7E3.svg +8 -0
  1291. package/dist/emoji/1F7E4.svg +8 -0
  1292. package/dist/emoji/1F7E5.svg +8 -0
  1293. package/dist/emoji/1F7E6.svg +8 -0
  1294. package/dist/emoji/1F7E7.svg +8 -0
  1295. package/dist/emoji/1F7E8.svg +8 -0
  1296. package/dist/emoji/1F7E9.svg +8 -0
  1297. package/dist/emoji/1F7EA.svg +8 -0
  1298. package/dist/emoji/1F7EB.svg +8 -0
  1299. package/dist/emoji/1F7F0.svg +21 -0
  1300. package/dist/emoji/1F90C.svg +12 -0
  1301. package/dist/emoji/1F90D.svg +12 -0
  1302. package/dist/emoji/1F90E.svg +8 -0
  1303. package/dist/emoji/1F90F.svg +20 -0
  1304. package/dist/emoji/1F910.svg +29 -0
  1305. package/dist/emoji/1F911.svg +28 -0
  1306. package/dist/emoji/1F912.svg +23 -0
  1307. package/dist/emoji/1F913.svg +25 -0
  1308. package/dist/emoji/1F914.svg +15 -0
  1309. package/dist/emoji/1F915.svg +20 -0
  1310. package/dist/emoji/1F916.svg +28 -0
  1311. package/dist/emoji/1F917.svg +21 -0
  1312. package/dist/emoji/1F918.svg +22 -0
  1313. package/dist/emoji/1F919.svg +16 -0
  1314. package/dist/emoji/1F91A.svg +11 -0
  1315. package/dist/emoji/1F91B.svg +13 -0
  1316. package/dist/emoji/1F91C.svg +12 -0
  1317. package/dist/emoji/1F91D.svg +27 -0
  1318. package/dist/emoji/1F91E.svg +22 -0
  1319. package/dist/emoji/1F91F.svg +13 -0
  1320. package/dist/emoji/1F920.svg +21 -0
  1321. package/dist/emoji/1F921.svg +30 -0
  1322. package/dist/emoji/1F922.svg +18 -0
  1323. package/dist/emoji/1F923.svg +22 -0
  1324. package/dist/emoji/1F924.svg +19 -0
  1325. package/dist/emoji/1F925.svg +18 -0
  1326. package/dist/emoji/1F926-200D-2640-FE0F.svg +25 -0
  1327. package/dist/emoji/1F926-200D-2642-FE0F.svg +25 -0
  1328. package/dist/emoji/1F926.svg +25 -0
  1329. package/dist/emoji/1F927.svg +16 -0
  1330. package/dist/emoji/1F928.svg +16 -0
  1331. package/dist/emoji/1F929.svg +22 -0
  1332. package/dist/emoji/1F92A.svg +23 -0
  1333. package/dist/emoji/1F92B.svg +23 -0
  1334. package/dist/emoji/1F92C.svg +34 -0
  1335. package/dist/emoji/1F92D.svg +17 -0
  1336. package/dist/emoji/1F92E.svg +17 -0
  1337. package/dist/emoji/1F92F.svg +21 -0
  1338. package/dist/emoji/1F930.svg +25 -0
  1339. package/dist/emoji/1F931.svg +30 -0
  1340. package/dist/emoji/1F932.svg +24 -0
  1341. package/dist/emoji/1F933.svg +30 -0
  1342. package/dist/emoji/1F934.svg +33 -0
  1343. package/dist/emoji/1F935-200D-2640-FE0F.svg +24 -0
  1344. package/dist/emoji/1F935-200D-2642-FE0F.svg +47 -0
  1345. package/dist/emoji/1F935.svg +24 -0
  1346. package/dist/emoji/1F936.svg +30 -0
  1347. package/dist/emoji/1F937-200D-2640-FE0F.svg +28 -0
  1348. package/dist/emoji/1F937-200D-2642-FE0F.svg +28 -0
  1349. package/dist/emoji/1F937.svg +28 -0
  1350. package/dist/emoji/1F938-200D-2640-FE0F.svg +13 -0
  1351. package/dist/emoji/1F938-200D-2642-FE0F.svg +12 -0
  1352. package/dist/emoji/1F938.svg +14 -0
  1353. package/dist/emoji/1F939-200D-2640-FE0F.svg +17 -0
  1354. package/dist/emoji/1F939-200D-2642-FE0F.svg +16 -0
  1355. package/dist/emoji/1F939.svg +18 -0
  1356. package/dist/emoji/1F93A.svg +16 -0
  1357. package/dist/emoji/1F93C-200D-2640-FE0F.svg +28 -0
  1358. package/dist/emoji/1F93C-200D-2642-FE0F.svg +26 -0
  1359. package/dist/emoji/1F93C.svg +24 -0
  1360. package/dist/emoji/1F93D-200D-2640-FE0F.svg +22 -0
  1361. package/dist/emoji/1F93D-200D-2642-FE0F.svg +21 -0
  1362. package/dist/emoji/1F93D.svg +23 -0
  1363. package/dist/emoji/1F93E-200D-2640-FE0F.svg +17 -0
  1364. package/dist/emoji/1F93E-200D-2642-FE0F.svg +16 -0
  1365. package/dist/emoji/1F93E.svg +20 -0
  1366. package/dist/emoji/1F93F.svg +19 -0
  1367. package/dist/emoji/1F940.svg +29 -0
  1368. package/dist/emoji/1F941.svg +22 -0
  1369. package/dist/emoji/1F942.svg +23 -0
  1370. package/dist/emoji/1F943.svg +19 -0
  1371. package/dist/emoji/1F944.svg +11 -0
  1372. package/dist/emoji/1F945.svg +67 -0
  1373. package/dist/emoji/1F947.svg +25 -0
  1374. package/dist/emoji/1F948.svg +25 -0
  1375. package/dist/emoji/1F949.svg +25 -0
  1376. package/dist/emoji/1F94A.svg +17 -0
  1377. package/dist/emoji/1F94B.svg +21 -0
  1378. package/dist/emoji/1F94C.svg +18 -0
  1379. package/dist/emoji/1F94D.svg +54 -0
  1380. package/dist/emoji/1F94E.svg +55 -0
  1381. package/dist/emoji/1F94F.svg +12 -0
  1382. package/dist/emoji/1F950.svg +23 -0
  1383. package/dist/emoji/1F951.svg +14 -0
  1384. package/dist/emoji/1F952.svg +9 -0
  1385. package/dist/emoji/1F953.svg +13 -0
  1386. package/dist/emoji/1F954.svg +16 -0
  1387. package/dist/emoji/1F955.svg +16 -0
  1388. package/dist/emoji/1F956.svg +15 -0
  1389. package/dist/emoji/1F957.svg +17 -0
  1390. package/dist/emoji/1F958.svg +25 -0
  1391. package/dist/emoji/1F959.svg +26 -0
  1392. package/dist/emoji/1F95A.svg +9 -0
  1393. package/dist/emoji/1F95B.svg +9 -0
  1394. package/dist/emoji/1F95C.svg +12 -0
  1395. package/dist/emoji/1F95D.svg +20 -0
  1396. package/dist/emoji/1F95E.svg +20 -0
  1397. package/dist/emoji/1F95F.svg +12 -0
  1398. package/dist/emoji/1F960.svg +11 -0
  1399. package/dist/emoji/1F961.svg +27 -0
  1400. package/dist/emoji/1F962.svg +13 -0
  1401. package/dist/emoji/1F963.svg +13 -0
  1402. package/dist/emoji/1F964.svg +12 -0
  1403. package/dist/emoji/1F965.svg +19 -0
  1404. package/dist/emoji/1F966.svg +25 -0
  1405. package/dist/emoji/1F967.svg +16 -0
  1406. package/dist/emoji/1F968.svg +15 -0
  1407. package/dist/emoji/1F969.svg +15 -0
  1408. package/dist/emoji/1F96A.svg +25 -0
  1409. package/dist/emoji/1F96B.svg +22 -0
  1410. package/dist/emoji/1F96C.svg +14 -0
  1411. package/dist/emoji/1F96D.svg +12 -0
  1412. package/dist/emoji/1F96E.svg +20 -0
  1413. package/dist/emoji/1F96F.svg +28 -0
  1414. package/dist/emoji/1F970.svg +19 -0
  1415. package/dist/emoji/1F971.svg +17 -0
  1416. package/dist/emoji/1F972.svg +15 -0
  1417. package/dist/emoji/1F973.svg +45 -0
  1418. package/dist/emoji/1F974.svg +17 -0
  1419. package/dist/emoji/1F975.svg +23 -0
  1420. package/dist/emoji/1F976.svg +28 -0
  1421. package/dist/emoji/1F977.svg +28 -0
  1422. package/dist/emoji/1F978.svg +25 -0
  1423. package/dist/emoji/1F979.svg +23 -0
  1424. package/dist/emoji/1F97A.svg +17 -0
  1425. package/dist/emoji/1F97B.svg +16 -0
  1426. package/dist/emoji/1F97C.svg +22 -0
  1427. package/dist/emoji/1F97D.svg +13 -0
  1428. package/dist/emoji/1F97E.svg +15 -0
  1429. package/dist/emoji/1F97F.svg +10 -0
  1430. package/dist/emoji/1F980.svg +27 -0
  1431. package/dist/emoji/1F981.svg +31 -0
  1432. package/dist/emoji/1F982.svg +29 -0
  1433. package/dist/emoji/1F983.svg +18 -0
  1434. package/dist/emoji/1F984.svg +21 -0
  1435. package/dist/emoji/1F985.svg +17 -0
  1436. package/dist/emoji/1F986.svg +18 -0
  1437. package/dist/emoji/1F987.svg +13 -0
  1438. package/dist/emoji/1F988.svg +19 -0
  1439. package/dist/emoji/1F989.svg +22 -0
  1440. package/dist/emoji/1F98A.svg +25 -0
  1441. package/dist/emoji/1F98B.svg +25 -0
  1442. package/dist/emoji/1F98C.svg +24 -0
  1443. package/dist/emoji/1F98D.svg +14 -0
  1444. package/dist/emoji/1F98E.svg +18 -0
  1445. package/dist/emoji/1F98F.svg +18 -0
  1446. package/dist/emoji/1F990.svg +24 -0
  1447. package/dist/emoji/1F991.svg +31 -0
  1448. package/dist/emoji/1F992.svg +15 -0
  1449. package/dist/emoji/1F993.svg +20 -0
  1450. package/dist/emoji/1F994.svg +24 -0
  1451. package/dist/emoji/1F995.svg +11 -0
  1452. package/dist/emoji/1F996.svg +15 -0
  1453. package/dist/emoji/1F997.svg +16 -0
  1454. package/dist/emoji/1F998.svg +18 -0
  1455. package/dist/emoji/1F999.svg +13 -0
  1456. package/dist/emoji/1F99A.svg +55 -0
  1457. package/dist/emoji/1F99B.svg +13 -0
  1458. package/dist/emoji/1F99C.svg +22 -0
  1459. package/dist/emoji/1F99D.svg +28 -0
  1460. package/dist/emoji/1F99E.svg +35 -0
  1461. package/dist/emoji/1F99F.svg +20 -0
  1462. package/dist/emoji/1F9A0.svg +66 -0
  1463. package/dist/emoji/1F9A1.svg +14 -0
  1464. package/dist/emoji/1F9A2.svg +11 -0
  1465. package/dist/emoji/1F9A3.svg +17 -0
  1466. package/dist/emoji/1F9A4.svg +19 -0
  1467. package/dist/emoji/1F9A5.svg +30 -0
  1468. package/dist/emoji/1F9A6.svg +59 -0
  1469. package/dist/emoji/1F9A7.svg +33 -0
  1470. package/dist/emoji/1F9A8.svg +15 -0
  1471. package/dist/emoji/1F9A9.svg +9 -0
  1472. package/dist/emoji/1F9AA.svg +29 -0
  1473. package/dist/emoji/1F9AB.svg +16 -0
  1474. package/dist/emoji/1F9AC.svg +17 -0
  1475. package/dist/emoji/1F9AD.svg +12 -0
  1476. package/dist/emoji/1F9AE.svg +40 -0
  1477. package/dist/emoji/1F9AF.svg +13 -0
  1478. package/dist/emoji/1F9B4.svg +10 -0
  1479. package/dist/emoji/1F9B5.svg +11 -0
  1480. package/dist/emoji/1F9B6.svg +13 -0
  1481. package/dist/emoji/1F9B7.svg +9 -0
  1482. package/dist/emoji/1F9B8-200D-2640-FE0F.svg +30 -0
  1483. package/dist/emoji/1F9B8-200D-2642-FE0F.svg +37 -0
  1484. package/dist/emoji/1F9B8.svg +32 -0
  1485. package/dist/emoji/1F9B9-200D-2640-FE0F.svg +32 -0
  1486. package/dist/emoji/1F9B9-200D-2642-FE0F.svg +34 -0
  1487. package/dist/emoji/1F9B9.svg +34 -0
  1488. package/dist/emoji/1F9BA.svg +18 -0
  1489. package/dist/emoji/1F9BB.svg +27 -0
  1490. package/dist/emoji/1F9BC.svg +18 -0
  1491. package/dist/emoji/1F9BD.svg +16 -0
  1492. package/dist/emoji/1F9BE.svg +18 -0
  1493. package/dist/emoji/1F9BF.svg +21 -0
  1494. package/dist/emoji/1F9C0.svg +24 -0
  1495. package/dist/emoji/1F9C1.svg +42 -0
  1496. package/dist/emoji/1F9C2.svg +14 -0
  1497. package/dist/emoji/1F9C3.svg +18 -0
  1498. package/dist/emoji/1F9C4.svg +23 -0
  1499. package/dist/emoji/1F9C5.svg +19 -0
  1500. package/dist/emoji/1F9C6.svg +18 -0
  1501. package/dist/emoji/1F9C7.svg +45 -0
  1502. package/dist/emoji/1F9C8.svg +13 -0
  1503. package/dist/emoji/1F9C9.svg +13 -0
  1504. package/dist/emoji/1F9CA.svg +13 -0
  1505. package/dist/emoji/1F9CB.svg +24 -0
  1506. package/dist/emoji/1F9CC.svg +33 -0
  1507. package/dist/emoji/1F9CD-200D-2640-FE0F.svg +19 -0
  1508. package/dist/emoji/1F9CD-200D-2642-FE0F.svg +19 -0
  1509. package/dist/emoji/1F9CD.svg +19 -0
  1510. package/dist/emoji/1F9CE-200D-2640-FE0F-200D-27A1-FE0F.svg +16 -0
  1511. package/dist/emoji/1F9CE-200D-2640-FE0F.svg +16 -0
  1512. package/dist/emoji/1F9CE-200D-2642-FE0F-200D-27A1-FE0F.svg +15 -0
  1513. package/dist/emoji/1F9CE-200D-2642-FE0F.svg +15 -0
  1514. package/dist/emoji/1F9CE-200D-27A1-FE0F.svg +15 -0
  1515. package/dist/emoji/1F9CE.svg +15 -0
  1516. package/dist/emoji/1F9CF-200D-2640-FE0F.svg +31 -0
  1517. package/dist/emoji/1F9CF-200D-2642-FE0F.svg +28 -0
  1518. package/dist/emoji/1F9CF.svg +25 -0
  1519. package/dist/emoji/1F9D0.svg +18 -0
  1520. package/dist/emoji/1F9D1-200D-1F33E.svg +43 -0
  1521. package/dist/emoji/1F9D1-200D-1F373.svg +30 -0
  1522. package/dist/emoji/1F9D1-200D-1F37C.svg +29 -0
  1523. package/dist/emoji/1F9D1-200D-1F384.svg +34 -0
  1524. package/dist/emoji/1F9D1-200D-1F393.svg +32 -0
  1525. package/dist/emoji/1F9D1-200D-1F3A4.svg +35 -0
  1526. package/dist/emoji/1F9D1-200D-1F3A8.svg +44 -0
  1527. package/dist/emoji/1F9D1-200D-1F3EB.svg +31 -0
  1528. package/dist/emoji/1F9D1-200D-1F3ED.svg +40 -0
  1529. package/dist/emoji/1F9D1-200D-1F4BB.svg +29 -0
  1530. package/dist/emoji/1F9D1-200D-1F4BC.svg +37 -0
  1531. package/dist/emoji/1F9D1-200D-1F527.svg +32 -0
  1532. package/dist/emoji/1F9D1-200D-1F52C.svg +31 -0
  1533. package/dist/emoji/1F9D1-200D-1F680.svg +30 -0
  1534. package/dist/emoji/1F9D1-200D-1F692.svg +40 -0
  1535. package/dist/emoji/1F9D1-200D-1F91D-200D-1F9D1.svg +25 -0
  1536. package/dist/emoji/1F9D1-200D-1F9AF-200D-27A1-FE0F.svg +26 -0
  1537. package/dist/emoji/1F9D1-200D-1F9AF.svg +26 -0
  1538. package/dist/emoji/1F9D1-200D-1F9B0.svg +20 -0
  1539. package/dist/emoji/1F9D1-200D-1F9B1.svg +21 -0
  1540. package/dist/emoji/1F9D1-200D-1F9B2.svg +17 -0
  1541. package/dist/emoji/1F9D1-200D-1F9B3.svg +20 -0
  1542. package/dist/emoji/1F9D1-200D-1F9BC-200D-27A1-FE0F.svg +25 -0
  1543. package/dist/emoji/1F9D1-200D-1F9BC.svg +25 -0
  1544. package/dist/emoji/1F9D1-200D-1F9BD-200D-27A1-FE0F.svg +22 -0
  1545. package/dist/emoji/1F9D1-200D-1F9BD.svg +22 -0
  1546. package/dist/emoji/1F9D1-200D-1F9D1-200D-1F9D2-200D-1F9D2.svg +25 -0
  1547. package/dist/emoji/1F9D1-200D-1F9D1-200D-1F9D2.svg +21 -0
  1548. package/dist/emoji/1F9D1-200D-1F9D2-200D-1F9D2.svg +20 -0
  1549. package/dist/emoji/1F9D1-200D-1F9D2.svg +14 -0
  1550. package/dist/emoji/1F9D1-200D-1FA70.svg +12 -0
  1551. package/dist/emoji/1F9D1-200D-2695-FE0F.svg +29 -0
  1552. package/dist/emoji/1F9D1-200D-2696-FE0F.svg +29 -0
  1553. package/dist/emoji/1F9D1-200D-2708-FE0F.svg +44 -0
  1554. package/dist/emoji/1F9D1.svg +20 -0
  1555. package/dist/emoji/1F9D2.svg +20 -0
  1556. package/dist/emoji/1F9D3.svg +22 -0
  1557. package/dist/emoji/1F9D4-200D-2640-FE0F.svg +22 -0
  1558. package/dist/emoji/1F9D4-200D-2642-FE0F.svg +28 -0
  1559. package/dist/emoji/1F9D4.svg +22 -0
  1560. package/dist/emoji/1F9D5.svg +25 -0
  1561. package/dist/emoji/1F9D6-200D-2640-FE0F.svg +25 -0
  1562. package/dist/emoji/1F9D6-200D-2642-FE0F.svg +25 -0
  1563. package/dist/emoji/1F9D6.svg +29 -0
  1564. package/dist/emoji/1F9D7-200D-2640-FE0F.svg +21 -0
  1565. package/dist/emoji/1F9D7-200D-2642-FE0F.svg +20 -0
  1566. package/dist/emoji/1F9D7.svg +23 -0
  1567. package/dist/emoji/1F9D8-200D-2640-FE0F.svg +16 -0
  1568. package/dist/emoji/1F9D8-200D-2642-FE0F.svg +15 -0
  1569. package/dist/emoji/1F9D8.svg +16 -0
  1570. package/dist/emoji/1F9D9-200D-2640-FE0F.svg +30 -0
  1571. package/dist/emoji/1F9D9-200D-2642-FE0F.svg +29 -0
  1572. package/dist/emoji/1F9D9.svg +25 -0
  1573. package/dist/emoji/1F9DA-200D-2640-FE0F.svg +30 -0
  1574. package/dist/emoji/1F9DA-200D-2642-FE0F.svg +30 -0
  1575. package/dist/emoji/1F9DA.svg +30 -0
  1576. package/dist/emoji/1F9DB-200D-2640-FE0F.svg +26 -0
  1577. package/dist/emoji/1F9DB-200D-2642-FE0F.svg +26 -0
  1578. package/dist/emoji/1F9DB.svg +26 -0
  1579. package/dist/emoji/1F9DC-200D-2640-FE0F.svg +41 -0
  1580. package/dist/emoji/1F9DC-200D-2642-FE0F.svg +33 -0
  1581. package/dist/emoji/1F9DC.svg +38 -0
  1582. package/dist/emoji/1F9DD-200D-2640-FE0F.svg +39 -0
  1583. package/dist/emoji/1F9DD-200D-2642-FE0F.svg +39 -0
  1584. package/dist/emoji/1F9DD.svg +39 -0
  1585. package/dist/emoji/1F9DE-200D-2640-FE0F.svg +28 -0
  1586. package/dist/emoji/1F9DE-200D-2642-FE0F.svg +28 -0
  1587. package/dist/emoji/1F9DE.svg +25 -0
  1588. package/dist/emoji/1F9DF-200D-2640-FE0F.svg +31 -0
  1589. package/dist/emoji/1F9DF-200D-2642-FE0F.svg +33 -0
  1590. package/dist/emoji/1F9DF.svg +28 -0
  1591. package/dist/emoji/1F9E0.svg +25 -0
  1592. package/dist/emoji/1F9E1.svg +8 -0
  1593. package/dist/emoji/1F9E2.svg +15 -0
  1594. package/dist/emoji/1F9E3.svg +20 -0
  1595. package/dist/emoji/1F9E4.svg +12 -0
  1596. package/dist/emoji/1F9E5.svg +23 -0
  1597. package/dist/emoji/1F9E6.svg +20 -0
  1598. package/dist/emoji/1F9E7.svg +31 -0
  1599. package/dist/emoji/1F9E8.svg +21 -0
  1600. package/dist/emoji/1F9E9.svg +28 -0
  1601. package/dist/emoji/1F9EA.svg +14 -0
  1602. package/dist/emoji/1F9EB.svg +17 -0
  1603. package/dist/emoji/1F9EC.svg +39 -0
  1604. package/dist/emoji/1F9ED.svg +20 -0
  1605. package/dist/emoji/1F9EE.svg +60 -0
  1606. package/dist/emoji/1F9EF.svg +19 -0
  1607. package/dist/emoji/1F9F0.svg +27 -0
  1608. package/dist/emoji/1F9F1.svg +32 -0
  1609. package/dist/emoji/1F9F2.svg +18 -0
  1610. package/dist/emoji/1F9F3.svg +40 -0
  1611. package/dist/emoji/1F9F4.svg +15 -0
  1612. package/dist/emoji/1F9F5.svg +25 -0
  1613. package/dist/emoji/1F9F6.svg +18 -0
  1614. package/dist/emoji/1F9F7.svg +14 -0
  1615. package/dist/emoji/1F9F8.svg +31 -0
  1616. package/dist/emoji/1F9F9.svg +15 -0
  1617. package/dist/emoji/1F9FA.svg +23 -0
  1618. package/dist/emoji/1F9FB.svg +15 -0
  1619. package/dist/emoji/1F9FC.svg +18 -0
  1620. package/dist/emoji/1F9FD.svg +22 -0
  1621. package/dist/emoji/1F9FE.svg +18 -0
  1622. package/dist/emoji/1F9FF.svg +15 -0
  1623. package/dist/emoji/1FA70.svg +10 -0
  1624. package/dist/emoji/1FA71.svg +10 -0
  1625. package/dist/emoji/1FA72.svg +10 -0
  1626. package/dist/emoji/1FA73.svg +18 -0
  1627. package/dist/emoji/1FA74.svg +11 -0
  1628. package/dist/emoji/1FA75.svg +8 -0
  1629. package/dist/emoji/1FA76.svg +8 -0
  1630. package/dist/emoji/1FA77.svg +8 -0
  1631. package/dist/emoji/1FA78.svg +9 -0
  1632. package/dist/emoji/1FA79.svg +49 -0
  1633. package/dist/emoji/1FA7A.svg +14 -0
  1634. package/dist/emoji/1FA7B.svg +50 -0
  1635. package/dist/emoji/1FA7C.svg +13 -0
  1636. package/dist/emoji/1FA80.svg +16 -0
  1637. package/dist/emoji/1FA81.svg +12 -0
  1638. package/dist/emoji/1FA82.svg +20 -0
  1639. package/dist/emoji/1FA83.svg +17 -0
  1640. package/dist/emoji/1FA84.svg +22 -0
  1641. package/dist/emoji/1FA85.svg +25 -0
  1642. package/dist/emoji/1FA86.svg +20 -0
  1643. package/dist/emoji/1FA87.svg +44 -0
  1644. package/dist/emoji/1FA88.svg +15 -0
  1645. package/dist/emoji/1FA89.svg +18 -0
  1646. package/dist/emoji/1FA8A.svg +20 -0
  1647. package/dist/emoji/1FA8E.svg +24 -0
  1648. package/dist/emoji/1FA8F.svg +15 -0
  1649. package/dist/emoji/1FA90.svg +13 -0
  1650. package/dist/emoji/1FA91.svg +12 -0
  1651. package/dist/emoji/1FA92.svg +14 -0
  1652. package/dist/emoji/1FA93.svg +12 -0
  1653. package/dist/emoji/1FA94.svg +14 -0
  1654. package/dist/emoji/1FA95.svg +13 -0
  1655. package/dist/emoji/1FA96.svg +24 -0
  1656. package/dist/emoji/1FA97.svg +51 -0
  1657. package/dist/emoji/1FA98.svg +38 -0
  1658. package/dist/emoji/1FA99.svg +18 -0
  1659. package/dist/emoji/1FA9A.svg +12 -0
  1660. package/dist/emoji/1FA9B.svg +16 -0
  1661. package/dist/emoji/1FA9C.svg +21 -0
  1662. package/dist/emoji/1FA9D.svg +8 -0
  1663. package/dist/emoji/1FA9E.svg +23 -0
  1664. package/dist/emoji/1FA9F.svg +17 -0
  1665. package/dist/emoji/1FAA0.svg +12 -0
  1666. package/dist/emoji/1FAA1.svg +16 -0
  1667. package/dist/emoji/1FAA2.svg +43 -0
  1668. package/dist/emoji/1FAA3.svg +17 -0
  1669. package/dist/emoji/1FAA4.svg +23 -0
  1670. package/dist/emoji/1FAA5.svg +12 -0
  1671. package/dist/emoji/1FAA6.svg +18 -0
  1672. package/dist/emoji/1FAA7.svg +15 -0
  1673. package/dist/emoji/1FAA8.svg +12 -0
  1674. package/dist/emoji/1FAA9.svg +36 -0
  1675. package/dist/emoji/1FAAA.svg +28 -0
  1676. package/dist/emoji/1FAAB.svg +10 -0
  1677. package/dist/emoji/1FAAC.svg +15 -0
  1678. package/dist/emoji/1FAAD.svg +32 -0
  1679. package/dist/emoji/1FAAE.svg +11 -0
  1680. package/dist/emoji/1FAAF.svg +23 -0
  1681. package/dist/emoji/1FAB0.svg +22 -0
  1682. package/dist/emoji/1FAB1.svg +11 -0
  1683. package/dist/emoji/1FAB2.svg +42 -0
  1684. package/dist/emoji/1FAB3.svg +21 -0
  1685. package/dist/emoji/1FAB4.svg +22 -0
  1686. package/dist/emoji/1FAB5.svg +14 -0
  1687. package/dist/emoji/1FAB6.svg +12 -0
  1688. package/dist/emoji/1FAB7.svg +21 -0
  1689. package/dist/emoji/1FAB8.svg +25 -0
  1690. package/dist/emoji/1FAB9.svg +15 -0
  1691. package/dist/emoji/1FABA.svg +32 -0
  1692. package/dist/emoji/1FABB.svg +35 -0
  1693. package/dist/emoji/1FABC.svg +21 -0
  1694. package/dist/emoji/1FABD.svg +11 -0
  1695. package/dist/emoji/1FABE.svg +16 -0
  1696. package/dist/emoji/1FABF.svg +15 -0
  1697. package/dist/emoji/1FAC0.svg +22 -0
  1698. package/dist/emoji/1FAC1.svg +20 -0
  1699. package/dist/emoji/1FAC2.svg +22 -0
  1700. package/dist/emoji/1FAC3.svg +24 -0
  1701. package/dist/emoji/1FAC4.svg +24 -0
  1702. package/dist/emoji/1FAC5.svg +22 -0
  1703. package/dist/emoji/1FAC6.svg +14 -0
  1704. package/dist/emoji/1FAC8.svg +25 -0
  1705. package/dist/emoji/1FACD.svg +13 -0
  1706. package/dist/emoji/1FACE.svg +22 -0
  1707. package/dist/emoji/1FACF.svg +20 -0
  1708. package/dist/emoji/1FAD0.svg +14 -0
  1709. package/dist/emoji/1FAD1.svg +15 -0
  1710. package/dist/emoji/1FAD2.svg +11 -0
  1711. package/dist/emoji/1FAD3.svg +14 -0
  1712. package/dist/emoji/1FAD4.svg +20 -0
  1713. package/dist/emoji/1FAD5.svg +26 -0
  1714. package/dist/emoji/1FAD6.svg +11 -0
  1715. package/dist/emoji/1FAD7.svg +19 -0
  1716. package/dist/emoji/1FAD8.svg +15 -0
  1717. package/dist/emoji/1FAD9.svg +16 -0
  1718. package/dist/emoji/1FADA.svg +17 -0
  1719. package/dist/emoji/1FADB.svg +29 -0
  1720. package/dist/emoji/1FADC.svg +14 -0
  1721. package/dist/emoji/1FADF.svg +11 -0
  1722. package/dist/emoji/1FAE0.svg +12 -0
  1723. package/dist/emoji/1FAE1.svg +19 -0
  1724. package/dist/emoji/1FAE2.svg +14 -0
  1725. package/dist/emoji/1FAE3.svg +24 -0
  1726. package/dist/emoji/1FAE4.svg +11 -0
  1727. package/dist/emoji/1FAE5.svg +14 -0
  1728. package/dist/emoji/1FAE6.svg +21 -0
  1729. package/dist/emoji/1FAE7.svg +24 -0
  1730. package/dist/emoji/1FAE8.svg +17 -0
  1731. package/dist/emoji/1FAE9.svg +21 -0
  1732. package/dist/emoji/1FAEA.svg +15 -0
  1733. package/dist/emoji/1FAEF.svg +37 -0
  1734. package/dist/emoji/1FAF0.svg +13 -0
  1735. package/dist/emoji/1FAF1.svg +9 -0
  1736. package/dist/emoji/1FAF2.svg +9 -0
  1737. package/dist/emoji/1FAF3.svg +10 -0
  1738. package/dist/emoji/1FAF4.svg +10 -0
  1739. package/dist/emoji/1FAF5.svg +19 -0
  1740. package/dist/emoji/1FAF6.svg +17 -0
  1741. package/dist/emoji/1FAF7.svg +16 -0
  1742. package/dist/emoji/1FAF8.svg +16 -0
  1743. package/dist/emoji/203C.svg +14 -0
  1744. package/dist/emoji/2049.svg +14 -0
  1745. package/dist/emoji/2122.svg +8 -0
  1746. package/dist/emoji/2139.svg +14 -0
  1747. package/dist/emoji/2194.svg +11 -0
  1748. package/dist/emoji/2195.svg +11 -0
  1749. package/dist/emoji/2196.svg +11 -0
  1750. package/dist/emoji/2197.svg +11 -0
  1751. package/dist/emoji/2198.svg +11 -0
  1752. package/dist/emoji/2199.svg +11 -0
  1753. package/dist/emoji/21A9.svg +11 -0
  1754. package/dist/emoji/21AA.svg +11 -0
  1755. package/dist/emoji/231A.svg +20 -0
  1756. package/dist/emoji/231B.svg +21 -0
  1757. package/dist/emoji/2328.svg +51 -0
  1758. package/dist/emoji/23CF.svg +9 -0
  1759. package/dist/emoji/23E9.svg +10 -0
  1760. package/dist/emoji/23EA.svg +10 -0
  1761. package/dist/emoji/23EB.svg +10 -0
  1762. package/dist/emoji/23EC.svg +10 -0
  1763. package/dist/emoji/23ED.svg +11 -0
  1764. package/dist/emoji/23EE.svg +11 -0
  1765. package/dist/emoji/23EF.svg +10 -0
  1766. package/dist/emoji/23F0.svg +23 -0
  1767. package/dist/emoji/23F1.svg +25 -0
  1768. package/dist/emoji/23F2.svg +27 -0
  1769. package/dist/emoji/23F3.svg +24 -0
  1770. package/dist/emoji/23F8.svg +10 -0
  1771. package/dist/emoji/23F9.svg +8 -0
  1772. package/dist/emoji/23FA.svg +12 -0
  1773. package/dist/emoji/24C2.svg +9 -0
  1774. package/dist/emoji/25AA.svg +8 -0
  1775. package/dist/emoji/25AB.svg +8 -0
  1776. package/dist/emoji/25B6.svg +8 -0
  1777. package/dist/emoji/25C0.svg +8 -0
  1778. package/dist/emoji/25FB.svg +8 -0
  1779. package/dist/emoji/25FC.svg +11 -0
  1780. package/dist/emoji/25FD.svg +8 -0
  1781. package/dist/emoji/25FE.svg +11 -0
  1782. package/dist/emoji/2600.svg +12 -0
  1783. package/dist/emoji/2601.svg +11 -0
  1784. package/dist/emoji/2602.svg +20 -0
  1785. package/dist/emoji/2603.svg +37 -0
  1786. package/dist/emoji/2604.svg +21 -0
  1787. package/dist/emoji/260E.svg +24 -0
  1788. package/dist/emoji/2611.svg +12 -0
  1789. package/dist/emoji/2614.svg +26 -0
  1790. package/dist/emoji/2615.svg +17 -0
  1791. package/dist/emoji/2618.svg +12 -0
  1792. package/dist/emoji/261D.svg +24 -0
  1793. package/dist/emoji/2620.svg +29 -0
  1794. package/dist/emoji/2622.svg +12 -0
  1795. package/dist/emoji/2623.svg +14 -0
  1796. package/dist/emoji/2626.svg +18 -0
  1797. package/dist/emoji/262A.svg +13 -0
  1798. package/dist/emoji/262E.svg +25 -0
  1799. package/dist/emoji/262F.svg +17 -0
  1800. package/dist/emoji/2638.svg +30 -0
  1801. package/dist/emoji/2639.svg +14 -0
  1802. package/dist/emoji/263A.svg +16 -0
  1803. package/dist/emoji/2640.svg +10 -0
  1804. package/dist/emoji/2642.svg +10 -0
  1805. package/dist/emoji/2648.svg +14 -0
  1806. package/dist/emoji/2649.svg +14 -0
  1807. package/dist/emoji/264A.svg +18 -0
  1808. package/dist/emoji/264B.svg +18 -0
  1809. package/dist/emoji/264C.svg +14 -0
  1810. package/dist/emoji/264D.svg +18 -0
  1811. package/dist/emoji/264E.svg +18 -0
  1812. package/dist/emoji/264F.svg +18 -0
  1813. package/dist/emoji/2650.svg +16 -0
  1814. package/dist/emoji/2651.svg +18 -0
  1815. package/dist/emoji/2652.svg +14 -0
  1816. package/dist/emoji/2653.svg +16 -0
  1817. package/dist/emoji/265F.svg +25 -0
  1818. package/dist/emoji/2660.svg +10 -0
  1819. package/dist/emoji/2663.svg +15 -0
  1820. package/dist/emoji/2665.svg +8 -0
  1821. package/dist/emoji/2666.svg +11 -0
  1822. package/dist/emoji/2668.svg +20 -0
  1823. package/dist/emoji/267B.svg +17 -0
  1824. package/dist/emoji/267E.svg +10 -0
  1825. package/dist/emoji/267F.svg +14 -0
  1826. package/dist/emoji/2692.svg +19 -0
  1827. package/dist/emoji/2693.svg +11 -0
  1828. package/dist/emoji/2694.svg +36 -0
  1829. package/dist/emoji/2695.svg +32 -0
  1830. package/dist/emoji/2696.svg +22 -0
  1831. package/dist/emoji/2697.svg +17 -0
  1832. package/dist/emoji/2699.svg +12 -0
  1833. package/dist/emoji/269B.svg +46 -0
  1834. package/dist/emoji/269C.svg +27 -0
  1835. package/dist/emoji/26A0.svg +15 -0
  1836. package/dist/emoji/26A1.svg +11 -0
  1837. package/dist/emoji/26A7.svg +14 -0
  1838. package/dist/emoji/26AA.svg +8 -0
  1839. package/dist/emoji/26AB.svg +11 -0
  1840. package/dist/emoji/26B0.svg +14 -0
  1841. package/dist/emoji/26B1.svg +16 -0
  1842. package/dist/emoji/26BD.svg +23 -0
  1843. package/dist/emoji/26BE.svg +27 -0
  1844. package/dist/emoji/26C4.svg +28 -0
  1845. package/dist/emoji/26C5.svg +14 -0
  1846. package/dist/emoji/26C8.svg +23 -0
  1847. package/dist/emoji/26CE.svg +14 -0
  1848. package/dist/emoji/26CF.svg +11 -0
  1849. package/dist/emoji/26D1.svg +22 -0
  1850. package/dist/emoji/26D3-FE0F-200D-1F4A5.svg +24 -0
  1851. package/dist/emoji/26D3.svg +20 -0
  1852. package/dist/emoji/26D4.svg +13 -0
  1853. package/dist/emoji/26E9.svg +25 -0
  1854. package/dist/emoji/26EA.svg +19 -0
  1855. package/dist/emoji/26F0.svg +15 -0
  1856. package/dist/emoji/26F1.svg +21 -0
  1857. package/dist/emoji/26F2.svg +29 -0
  1858. package/dist/emoji/26F3.svg +19 -0
  1859. package/dist/emoji/26F4.svg +21 -0
  1860. package/dist/emoji/26F5.svg +16 -0
  1861. package/dist/emoji/26F7.svg +32 -0
  1862. package/dist/emoji/26F8.svg +21 -0
  1863. package/dist/emoji/26F9-FE0F-200D-2640-FE0F.svg +20 -0
  1864. package/dist/emoji/26F9-FE0F-200D-2642-FE0F.svg +19 -0
  1865. package/dist/emoji/26F9.svg +21 -0
  1866. package/dist/emoji/26FA.svg +17 -0
  1867. package/dist/emoji/26FD.svg +25 -0
  1868. package/dist/emoji/2702.svg +17 -0
  1869. package/dist/emoji/2705.svg +13 -0
  1870. package/dist/emoji/2708.svg +15 -0
  1871. package/dist/emoji/2709.svg +22 -0
  1872. package/dist/emoji/270A.svg +25 -0
  1873. package/dist/emoji/270B.svg +11 -0
  1874. package/dist/emoji/270C.svg +17 -0
  1875. package/dist/emoji/270D.svg +22 -0
  1876. package/dist/emoji/270F.svg +19 -0
  1877. package/dist/emoji/2712.svg +15 -0
  1878. package/dist/emoji/2714.svg +8 -0
  1879. package/dist/emoji/2716.svg +11 -0
  1880. package/dist/emoji/271D.svg +11 -0
  1881. package/dist/emoji/2721.svg +14 -0
  1882. package/dist/emoji/2728.svg +18 -0
  1883. package/dist/emoji/2733.svg +18 -0
  1884. package/dist/emoji/2734.svg +12 -0
  1885. package/dist/emoji/2744.svg +23 -0
  1886. package/dist/emoji/2747.svg +12 -0
  1887. package/dist/emoji/274C.svg +11 -0
  1888. package/dist/emoji/274E.svg +13 -0
  1889. package/dist/emoji/2753.svg +13 -0
  1890. package/dist/emoji/2754.svg +13 -0
  1891. package/dist/emoji/2755.svg +13 -0
  1892. package/dist/emoji/2757.svg +13 -0
  1893. package/dist/emoji/2763.svg +17 -0
  1894. package/dist/emoji/2764-FE0F-200D-1F525.svg +16 -0
  1895. package/dist/emoji/2764-FE0F-200D-1FA79.svg +13 -0
  1896. package/dist/emoji/2764.svg +8 -0
  1897. package/dist/emoji/2795.svg +11 -0
  1898. package/dist/emoji/2796.svg +11 -0
  1899. package/dist/emoji/2797.svg +15 -0
  1900. package/dist/emoji/27A1.svg +11 -0
  1901. package/dist/emoji/27B0.svg +8 -0
  1902. package/dist/emoji/27BF.svg +8 -0
  1903. package/dist/emoji/2934.svg +11 -0
  1904. package/dist/emoji/2935.svg +11 -0
  1905. package/dist/emoji/2B05.svg +11 -0
  1906. package/dist/emoji/2B06.svg +11 -0
  1907. package/dist/emoji/2B07.svg +11 -0
  1908. package/dist/emoji/2B1B.svg +11 -0
  1909. package/dist/emoji/2B1C.svg +8 -0
  1910. package/dist/emoji/2B50.svg +11 -0
  1911. package/dist/emoji/2B55.svg +12 -0
  1912. package/dist/emoji/3030.svg +11 -0
  1913. package/dist/emoji/303D.svg +8 -0
  1914. package/dist/emoji/3297.svg +24 -0
  1915. package/dist/emoji/3299.svg +30 -0
  1916. package/dist/index.d.ts +2 -1
  1917. package/dist/index.d.ts.map +1 -1
  1918. package/dist/kalotyp.css +2 -1
  1919. package/dist/kalotyp.js +2 -103
  1920. package/package.json +8 -8
package/dist/kalotyp.js CHANGED
@@ -1,103 +1,2 @@
1
- (function(it,rt){typeof exports=="object"&&typeof module<"u"?rt(exports):typeof define=="function"&&define.amd?define(["exports"],rt):(it=typeof globalThis<"u"?globalThis:it||self,rt(it.pintura={}))})(this,function(it){"use strict";class rt{listeners=new Map;on(e,n){let o=this.listeners.get(e);return o||(o=new Set,this.listeners.set(e,o)),o.add(n),()=>{o?.delete(n)}}off(e,n){this.listeners.get(e)?.delete(n)}emit(e,n){const o=this.listeners.get(e);if(o)for(const i of[...o])try{i(n)}catch(r){queueMicrotask(()=>{throw r})}}clear(){this.listeners.clear()}}async function oo(t){if(typeof createImageBitmap=="function"){const e=await io(t);if(e)try{const n=await createImageBitmap(e,{imageOrientation:"from-image"});return{element:n,width:n.width,height:n.height}}catch{}}return ro(t)}async function io(t){if(t instanceof Blob)return t;if(typeof fetch!="function")return null;try{const e=await fetch(t,{credentials:"omit"});return e.ok?await e.blob():null}catch{return null}}async function ro(t){const e=typeof t=="string"?t:URL.createObjectURL(t),n=typeof t!="string";try{const o=await new Promise((i,r)=>{const a=new Image;a.crossOrigin="anonymous",a.onload=()=>i(a),a.onerror=()=>r(new Error(`Failed to load image: ${e}`)),a.src=e});return{element:o,width:o.naturalWidth,height:o.naturalHeight}}finally{n&&URL.revokeObjectURL(e)}}const Ct=Object.freeze({zoom:1,panX:0,panY:0});function j(t,e,n=Ct){const o=Math.max(0,t.width-t.padding*2),i=Math.max(0,t.height-t.padding*2);if(e.width<=0||e.height<=0||o<=0||i<=0)return{displayRect:{x:t.padding,y:t.padding,width:0,height:0},scale:0};const r=Math.min(o/e.width,i/e.height),a=Math.max(0,n.zoom||0),s=r*a,c=e.width*s,l=e.height*s,u=t.padding+(o-c)/2,d=t.padding+(i-l)/2,h=u+n.panX,f=d+n.panY,m=ye(h,u,c,o,t.padding),g=ye(f,d,l,i,t.padding);return{displayRect:{x:m,y:g,width:c,height:l},scale:s}}function ye(t,e,n,o,i){if(n<=o)return e;const r=i,a=i+o,s=r+1-n,c=a-1;return t<s?s:t>c?c:t}function Wt(t,e){return e.scale===0?{x:0,y:0}:{x:(t.x-e.displayRect.x)/e.scale,y:(t.y-e.displayRect.y)/e.scale}}function be(t,e){return{x:e.displayRect.x+t.x*e.scale,y:e.displayRect.y+t.y*e.scale,width:t.width*e.scale,height:t.height*e.scale}}const we=8,Ce=.25;class ao{current;isPinching;listeners;constructor(e=Ct){this.current=ve(e),this.isPinching=!1,this.listeners=new Set}getTransform(){return this.current}getSnapshot(){return{transform:this.current,pinching:this.isPinching}}setTransform(e){const n=ve(e);ke(this.current,n)||(this.current=n,this.emit())}zoomAt(e,n,o){if(!Number.isFinite(e)||e<=0)return this.current;const i=this.current.zoom,r=i*e,a=xe(r,Ce,we);if(a===i)return this.current;const s=a/i,c=n.x-o.x,l=n.y-o.y,u=s*this.current.panX+(1-s)*c,d=s*this.current.panY+(1-s)*l;return this.current={zoom:a,panX:u,panY:d},this.emit(),this.current}panBy(e,n){e===0&&n===0||(this.current={zoom:this.current.zoom,panX:this.current.panX+e,panY:this.current.panY+n},this.emit())}resetToFit(){ke(this.current,Ct)||(this.current=Ct,this.emit())}resetPan(){this.current.panX===0&&this.current.panY===0||(this.current={zoom:this.current.zoom,panX:0,panY:0},this.emit())}getPinching(){return this.isPinching}setPinching(e){this.isPinching!==e&&(this.isPinching=e,this.emit())}computeViewport(e,n){return j(e,n,this.current)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}clear(){this.listeners.clear()}emit(){const e=this.getSnapshot();for(const n of this.listeners)n(e)}}function xe(t,e,n){return t<e?e:t>n?n:t}function ve(t){const e=xe(Number.isFinite(t.zoom)?t.zoom:1,Ce,we),n=Number.isFinite(t.panX)?t.panX:0,o=Number.isFinite(t.panY)?t.panY:0;return{zoom:e,panX:n,panY:o}}function ke(t,e){return t.zoom===e.zoom&&t.panX===e.panX&&t.panY===e.panY}function Q(t,e){if(so())return{kind:"offscreen",canvas:new OffscreenCanvas(t,e)};const n=document.createElement("canvas");return n.width=t,n.height=e,{kind:"html",canvas:n}}function et(t){if(t.kind==="offscreen"){const n=t.canvas.getContext("2d");if(!n)throw new Error("2D canvas context is not available");return n}const e=t.canvas.getContext("2d");if(!e)throw new Error("2D canvas context is not available");return e}async function Se(t,e,n){return t.kind==="offscreen"?t.canvas.convertToBlob({type:e,quality:n}):new Promise((o,i)=>{t.canvas.toBlob(r=>{r?o(r):i(new Error("toBlob produced null"))},e,n)})}function so(){return typeof OffscreenCanvas>"u"?!1:typeof OffscreenCanvas.prototype.convertToBlob=="function"}const Ee=new Map;function dt(t){const e=Ee.get(t);if(e)return e;const n=(async()=>{try{const o=Q(1,1),i=await Se(o,t,.5);return i.type===t&&i.size>0}catch{return!1}})();return Ee.set(t,n),n}function co(t,e,n,o){const i={x:t.x+e,y:t.y+n,width:t.width,height:t.height};return xt(i,o)}function xt(t,e){let{x:n,y:o,width:i,height:r}=t;return i>e.width&&(i=e.width),r>e.height&&(r=e.height),n<e.x&&(n=e.x),o<e.y&&(o=e.y),n+i>e.x+e.width&&(n=e.x+e.width-i),o+r>e.y+e.height&&(o=e.y+e.height-r),{x:n,y:o,width:i,height:r}}function lo(t){return{x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height)}}function Ae(t){let e=t;const n=new Set;function o(i){for(const r of[...n])try{r(e,i)}catch(a){queueMicrotask(()=>{throw a})}}return{get(){return e},set(i){const r=e;e={...e,...i},o(r)},update(i){const r=e;e={...e,...i(e)},o(r)},subscribe(i){return n.add(i),()=>n.delete(i)}}}const Me=50;class uo{shadow;undoStack=[];redoStack=[];constructor(e){this.shadow=vt(e)}commit(e){ho(e,this.shadow)||(this.undoStack.push(this.shadow),this.undoStack.length>Me&&this.undoStack.shift(),this.shadow=vt(e),this.redoStack.length=0)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(e){const n=this.undoStack.pop();return n?(this.redoStack.push(vt(e)),this.shadow=n,{snapshot:n,changed:Ie(e,n)}):null}redo(e){const n=this.redoStack.pop();return n?(this.undoStack.push(vt(e)),this.undoStack.length>Me&&this.undoStack.shift(),this.shadow=n,{snapshot:n,changed:Ie(e,n)}):null}size(){return{undo:this.undoStack.length,redo:this.redoStack.length}}}function ho(t,e){if(t.size!==e.size)return!1;for(const[n,o]of t)if(!e.has(n)||kt(o)!==kt(e.get(n)))return!1;return!0}function Ie(t,e){const n=new Set;for(const[o,i]of e)kt(i)!==kt(t.get(o))&&n.add(o);for(const o of t.keys())e.has(o)||n.add(o);return n}function vt(t){const e=new Map;for(const[n,o]of t)e.set(n,structuredClone(o));return e}function kt(t){return JSON.stringify(t,(e,n)=>{if(n&&typeof n=="object"&&!Array.isArray(n)){const o={};for(const i of Object.keys(n).sort())o[i]=n[i];return o}return n})}function qt(t,e){if(e<=0||t.width<=0||t.height<=0)return{x:t.x,y:t.y,width:0,height:0};const n=t.width/t.height;let o,i;return e>=n?(o=t.width,i=o/e):(i=t.height,o=i*e),{x:t.x+(t.width-o)/2,y:t.y+(t.height-i)/2,width:o,height:i}}function po(t,e,n,o){if(e<=0)return t;if(t.width<=0||t.height<=0)return qt(o,e);const i=t.width/t.height;let r,a;i>e?(a=t.height,r=a*e):(r=t.width,a=r/e);const s=Re(t,r,a,n),c=xt(s,o),l=c.height===0?0:c.width/c.height;return Math.abs(l-e)<=mo?c:fo(c,e,n)}const mo=1e-6;function Re(t,e,n,o){switch(o){case"tl":return{x:t.x,y:t.y,width:e,height:n};case"tr":return{x:t.x+t.width-e,y:t.y,width:e,height:n};case"bl":return{x:t.x,y:t.y+t.height-n,width:e,height:n};case"br":return{x:t.x+t.width-e,y:t.y+t.height-n,width:e,height:n};case"center":return{x:t.x+(t.width-e)/2,y:t.y+(t.height-n)/2,width:e,height:n}}}function fo(t,e,n){const o=qt(t,e);return Re(t,o.width,o.height,n)}function go(t,e,n,o){const i=o.minSize??1,r=t.x,a=t.y,s=t.x+t.width,c=t.y+t.height;let l=r,u=a,d=s,h=c;(e==="tl"||e==="l"||e==="bl")&&(l=n.x),(e==="tr"||e==="r"||e==="br")&&(d=n.x),(e==="tl"||e==="t"||e==="tr")&&(u=n.y),(e==="bl"||e==="b"||e==="br")&&(h=n.y),(e==="l"||e==="r")&&(u=a,h=c),(e==="t"||e==="b")&&(l=r,d=s);let f=Math.min(l,d),m=Math.min(u,h),g=Math.abs(d-l),p=Math.abs(h-u);g<i&&(g=i,e==="tl"||e==="l"||e==="bl"?f=s-i:(e==="tr"||e==="r"||e==="br")&&(f=r)),p<i&&(p=i,e==="tl"||e==="t"||e==="tr"?m=c-i:(e==="bl"||e==="b"||e==="br")&&(m=a));let w={x:f,y:m,width:g,height:p};return w=xt(w,o.bounds),o.aspectRatio!==void 0&&o.aspectRatio>0&&(w=po(w,o.aspectRatio,yo(e),o.bounds)),w}function yo(t){switch(t){case"tl":return"br";case"tr":return"bl";case"bl":return"tr";case"br":return"tl";case"t":return"bl";case"b":return"tl";case"l":return"tr";case"r":return"tl"}}function bo(t,e){const[n]=t;return n===void 0||e===void 0?!0:e==="landscape"?n>=1:e==="portrait"?n<1:!0}function wo(t,e){return t.filter(n=>bo(n,e))}function Co(t){return{rect:{x:0,y:0,width:t.imageSize.width,height:t.imageSize.height},aspectRatio:void 0,activePresetIndex:vo(t.presets),presets:t.presets,imageSize:t.imageSize}}function xo(t,e){const n=t.presets[e];if(!n)return t;const[o]=n;if(o===void 0)return{...t,aspectRatio:void 0,activePresetIndex:e};const i={x:0,y:0,width:t.imageSize.width,height:t.imageSize.height},r=qt(i,o);return{...t,rect:r,aspectRatio:o,activePresetIndex:e}}function vo(t){return t.findIndex(([e])=>e===void 0)}function ko(t,e){const n=lo(e.rect),o=St(n.x,0,t.width),i=St(n.y,0,t.height),r=St(n.width,1,t.width-o),a=St(n.height,1,t.height-i),s=Q(r,a);if(s.kind==="offscreen"){const l=s.canvas.getContext("2d");if(!l)throw new Error("2D canvas context is not available");return l.drawImage(t.bitmap,o,i,r,a,0,0,r,a),{bitmap:s.canvas,width:r,height:a,mimeType:t.mimeType}}const c=s.canvas.getContext("2d");if(!c)throw new Error("2D canvas context is not available");return c.drawImage(t.bitmap,o,i,r,a,0,0,r,a),{bitmap:s.canvas,width:r,height:a,mimeType:t.mimeType}}function St(t,e,n){return Math.max(e,Math.min(n,t))}const Ne={mimeChoice:"auto",quality:.85};function Le(t){return Number.isFinite(t)?t<0?0:t>1?1:t:Ne.quality}function So(t,e){return t.mimeChoice===e?t:{...t,mimeChoice:e}}function Eo(t,e){const n=Le(e);return t.quality===n?t:{...t,quality:n}}function Ao(t,e){return t.stripMetadata===e?t:{...t,stripMetadata:e}}const Te=[255,216],Fe=[255,225],Pe=[69,120,105,102,0,0];async function Mo(t){if(t.output.type&&t.output.type!=="image/jpeg")return t.output;const e=await $e(t.source);if(!De(e,Te))return t.output;const n=Io(e);if(!n)return t.output;const o=await $e(t.output);if(!De(o,Te))return t.output;const i=new Uint8Array(o.length+n.length);return i.set(o.subarray(0,2),0),i.set(n,2),i.set(o.subarray(2),2+n.length),new Blob([i],{type:"image/jpeg"})}async function $e(t){return typeof t.arrayBuffer=="function"?new Uint8Array(await t.arrayBuffer()):new Promise((e,n)=>{const o=new FileReader;o.onload=()=>{const i=o.result;i instanceof ArrayBuffer?e(new Uint8Array(i)):n(new Error("FileReader returned a non-ArrayBuffer result"))},o.onerror=()=>n(o.error??new Error("FileReader failed")),o.readAsArrayBuffer(t)})}function De(t,e){if(t.length<e.length)return!1;for(let n=0;n<e.length;n++)if(t[n]!==e[n])return!1;return!0}function Io(t){let e=2;for(;e+4<=t.length;){if(t[e]!==255)return;const n=t[e+1];if(n===void 0||n===218||n===217)return;const o=t[e+2]!==void 0&&t[e+3]!==void 0?t[e+2]*256+t[e+3]:0;if(o<2)return;const i=e+2+o;if(i>t.length)return;if(t[e]===Fe[0]&&t[e+1]===Fe[1]&&Ro(t,e+4))return t.slice(e,i);e=i}}function Ro(t,e){for(let n=0;n<Pe.length;n++)if(t[e+n]!==Pe[n])return!1;return!0}const He="image/png",No=new Set(["image/png","image/webp","image/avif"]);async function Lo(t,e){return t.mimeChoice!=="auto"?await dt(t.mimeChoice)?t.mimeChoice:await dt("image/webp")?"image/webp":He:await dt("image/webp")?"image/webp":!No.has(e.mimeType)&&await dt("image/jpeg")?"image/jpeg":He}function To(t,e){const n=Po(e);if(!t)return`kalotyp-image.${n}`;const o=$o(t);if(!o)return`kalotyp-image.${n}`;const i=Ho(o);return i?`${i}.${n}`:`kalotyp-image.${n}`}async function Fo(t,e={}){const n=e.output??Ne,o=await Lo(n,t),i=Le(n.quality),r=To(e.sourceName,o),a=Q(t.width,t.height);if(a.kind==="offscreen"){const u=a.canvas.getContext("2d");if(!u)throw new Error("2D canvas context is not available");u.drawImage(t.bitmap,0,0)}else{const u=a.canvas.getContext("2d");if(!u)throw new Error("2D canvas context is not available");u.drawImage(t.bitmap,0,0)}const s=await Se(a,o,i),l=e.output?.stripMetadata===!1&&o==="image/jpeg"&&t.mimeType==="image/jpeg"&&e.sourceBlob!==void 0?await Mo({source:e.sourceBlob,output:s}):s;return new File([l],r,{type:o})}function Po(t){if(t==="image/jpeg")return"jpg";if(t==="image/png")return"png";if(t==="image/webp")return"webp";if(t==="image/avif")return"avif";const e=t.split("/")[1];return e&&e.length>0?e:"bin"}function $o(t){const n=Do(t).split(/[/\\]/);return n[n.length-1]}function Do(t){const e=t.indexOf("?");return e===-1?t:t.slice(0,e)}function Ho(t){const e=t.lastIndexOf(".");return e<=0?t:t.slice(0,e)}async function Oo(t,e){let n=e;for(const o of t)n=await o.plugin.bake(o.state,n);return n}function zo(){return{horizontal:!1,vertical:!1}}function Oe(t,e){return e==="horizontal"?{...t,horizontal:!t.horizontal}:{...t,vertical:!t.vertical}}function ze(t){return!t.horizontal&&!t.vertical}async function Bo(t,e){if(ze(t))return e;const{width:n,height:o}=e,i=Q(n,o),r=et(i),a=t.horizontal?-1:1,s=t.vertical?-1:1,c=t.horizontal?n:0,l=t.vertical?o:0;return r.setTransform(a,0,0,s,c,l),r.drawImage(e.bitmap,0,0),{bitmap:i.canvas,width:n,height:o,mimeType:e.mimeType}}const Ut=-45,Xt=45,Be=.1;function _o(){return{quarterTurns:0,freeAngle:0}}function Wo(t){return{...t,quarterTurns:(t.quarterTurns+1)%4}}function qo(t){return{...t,quarterTurns:(t.quarterTurns+3)%4}}function _e(t,e){const n=Uo(e,Ut,Xt),o=Math.round(n*10)/10;return{...t,freeAngle:o}}function We(t){return t.quarterTurns===0&&Math.abs(t.freeAngle)<1e-6}function Yt(t){return t.quarterTurns*90+t.freeAngle}function Uo(t,e,n){return Math.max(e,Math.min(n,t))}function qe(t,e){const n=t.width,o=t.height;if(n<=0||o<=0)return{width:0,height:0};const i=Math.abs(Math.cos(e)),r=Math.abs(Math.sin(e)),a=n*i+o*r,s=n*r+o*i,c=a>Ue?n*n/a:Number.POSITIVE_INFINITY,l=s>Ue?n*o/s:Number.POSITIVE_INFINITY,u=Math.min(c,l),d=u*o/n;return{width:u,height:d}}const Ue=1e-9;async function Xo(t,e){if(We(t))return e;const n=Yt(t),o=n*Math.PI/180,i=n-t.quarterTurns*90,r=Math.abs(i)<1e-6;let a,s;if(r)t.quarterTurns===1||t.quarterTurns===3?(a=e.height,s=e.width):(a=e.width,s=e.height);else{const u=qe(e,o);a=Math.max(1,Math.round(u.width)),s=Math.max(1,Math.round(u.height))}const c=Q(a,s),l=et(c);return l.imageSmoothingEnabled=!0,l.imageSmoothingQuality="high",l.translate(a/2,s/2),l.rotate(o),l.drawImage(e.bitmap,-e.width/2,-e.height/2),{bitmap:c.canvas,width:a,height:s,mimeType:e.mimeType}}const ht=8e3,Et=1;function Yo(){return{scaleX:1,scaleY:1,lockAspect:!0}}function Xe(t){return Math.abs(t.scaleX-1)<1e-9&&Math.abs(t.scaleY-1)<1e-9}function Ye(t,e){const n=At(Math.round(e.width*t.scaleX)),o=At(Math.round(e.height*t.scaleY));return{width:n,height:o}}function Go(t,e,n){if(n.width<=0)return t;const i=At(Math.round(e))/n.width,r=t.lockAspect?i:t.scaleY;return{...t,scaleX:i,scaleY:r}}function Ko(t,e,n){if(n.height<=0)return t;const i=At(Math.round(e))/n.height,r=t.lockAspect?i:t.scaleX;return{...t,scaleX:r,scaleY:i}}function Vo(t,e){const n=Qo(e/100);return{...t,scaleX:n,scaleY:n}}function jo(t,e){if(t.lockAspect===e)return t;if(!e)return{...t,lockAspect:!1};const n=(t.scaleX+t.scaleY)/2;return{scaleX:n,scaleY:n,lockAspect:!0}}function At(t){return Number.isFinite(t)?Math.max(Et,Math.min(ht,Math.trunc(t))):Et}function Qo(t){return!Number.isFinite(t)||t<=0?.01:Math.max(.01,Math.min(t,ht))}async function Jo(t,e){if(Xe(t))return e;const{width:n,height:o}=Ye(t,e);if(n<=0||o<=0)return e;const i=Zo(e.width,e.height,n,o);let r={bitmap:e.bitmap,width:e.width,height:e.height};for(let s=0;s<i;s++){const c=Math.max(n,Math.floor(r.width/2)),l=Math.max(o,Math.floor(r.height/2));r={bitmap:Ge(r,c,l).canvas,width:c,height:l}}return{bitmap:Ge(r,n,o).canvas,width:n,height:o,mimeType:e.mimeType}}function Zo(t,e,n,o){let i=t,r=e,a=0;for(;(i/2>n||r/2>o)&&a<16;)i=Math.floor(i/2),r=Math.floor(r/2),a+=1;return a}function Ge(t,e,n){const o=Q(e,n),i=et(o);return i.imageSmoothingEnabled=!0,i.imageSmoothingQuality="high",i.drawImage(t.bitmap,0,0,t.width,t.height,0,0,e,n),o}const Mt=-100,It=100,Rt=1,pt={brightness:0,contrast:0,saturation:0,exposure:0,clarity:0,gamma:0},Ke=[{key:"brightness",label:"Brightness"},{key:"contrast",label:"Contrast"},{key:"saturation",label:"Saturation"},{key:"exposure",label:"Exposure"},{key:"clarity",label:"Clarity"},{key:"gamma",label:"Gamma"}];function ti(){return pt}function Gt(t){return t.brightness===0&&t.contrast===0&&t.saturation===0&&t.exposure===0&&t.clarity===0&&t.gamma===0}function Ve(t,e,n){const o=oi(n);return t[e]===o?t:{...t,[e]:o}}function ei(t,e){return t[e]===0?t:{...t,[e]:0}}function ni(){return pt}function oi(t){return Number.isNaN(t)?0:t<=Mt?Mt:t>=It?It:Math.round(t/Rt)*Rt}function je(t){const e=new Uint8ClampedArray(256),n=t.brightness/200,o=1+t.contrast/100,i=1+t.exposure/200,r=ii(t.gamma);for(let a=0;a<256;a++){let s=a/255;s=s*i,s=(s-.5)*o+.5,s=s+n,s<0?s=0:s>1&&(s=1),s=s**r,s<0?s=0:s>1&&(s=1),e[a]=Math.round(s*255)}return e}function ii(t){return t===0?1:t>0?1-.5*(t/100):1+1*(-t/100)}function Qe(t,e,n,o){const i=t.length;if(e.length!==i)throw new Error("applyFinetuneLutAndSaturation: src/dst length mismatch");const r=1+o.saturation/100;if(r===1){for(let a=0;a<i;a+=4)e[a]=n[t[a]],e[a+1]=n[t[a+1]],e[a+2]=n[t[a+2]],e[a+3]=t[a+3];return}for(let a=0;a<i;a+=4){const s=n[t[a]],c=n[t[a+1]],l=n[t[a+2]],u=.2126*s+.7152*c+.0722*l;let d=u+(s-u)*r,h=u+(c-u)*r,f=u+(l-u)*r;d<0?d=0:d>255&&(d=255),h<0?h=0:h>255&&(h=255),f<0?f=0:f>255&&(f=255),e[a]=d,e[a+1]=h,e[a+2]=f,e[a+3]=t[a+3]}}function Je(t,e,n){if(n===0)return;const o=t.length;if(e.length!==o)throw new Error("applyClarity: dst/blurred length mismatch");const i=n/100;for(let r=0;r<o;r+=4){const a=t[r],s=t[r+1],c=t[r+2];let l=a+i*(a-e[r]),u=s+i*(s-e[r+1]),d=c+i*(c-e[r+2]);l<0?l=0:l>255&&(l=255),u<0?u=0:u>255&&(u=255),d<0?d=0:d>255&&(d=255),t[r]=l,t[r+1]=u,t[r+2]=d}}function Ze(t,e,n,o,i){if(t.length!==e.length||t.length!==n.length)throw new Error("boxBlur3x3: buffer length mismatch");for(let r=0;r<i;r++)for(let a=0;a<o;a++){const s=a===0?0:a-1,c=a===o-1?o-1:a+1,l=(r*o+a)*4,u=(r*o+s)*4,d=(r*o+c)*4;e[l]=(t[u]+t[l]+t[d])/3,e[l+1]=(t[u+1]+t[l+1]+t[d+1])/3,e[l+2]=(t[u+2]+t[l+2]+t[d+2])/3,e[l+3]=t[l+3]}for(let r=0;r<i;r++){const a=r===0?0:r-1,s=r===i-1?i-1:r+1;for(let c=0;c<o;c++){const l=(r*o+c)*4,u=(a*o+c)*4,d=(s*o+c)*4;n[l]=(e[u]+e[l]+e[d])/3,n[l+1]=(e[u+1]+e[l+1]+e[d+1])/3,n[l+2]=(e[u+2]+e[l+2]+e[d+2])/3,n[l+3]=e[l+3]}}}function Kt(t,e,n){if(e.width!==n.width||e.height!==n.height||e.data.length!==n.data.length)throw new Error("applyFinetuneToImageData: baseline/dst dimensions mismatch");const o=je(t);if(Qe(e.data,n.data,o,t),t.clarity!==0){const i=new Uint8ClampedArray(e.data.length),r=new Uint8ClampedArray(e.data.length);Ze(e.data,i,r,e.width,e.height),Je(n.data,r,t.clarity)}}async function ri(t,e){if(Gt(t))return e;const n=Q(e.width,e.height),o=et(n);o.imageSmoothingEnabled=!0,o.imageSmoothingQuality="high",o.drawImage(e.bitmap,0,0,e.width,e.height);const i=o.getImageData(0,0,e.width,e.height);if(t.clarity===0)Kt(t,i,i),o.putImageData(i,0,0);else{const r=new ImageData(new Uint8ClampedArray(i.data.length),i.width,i.height);Kt(t,i,r),o.putImageData(r,0,0)}return{bitmap:n.canvas,width:e.width,height:e.height,mimeType:e.mimeType}}const Vt=[{id:"none",label:"None",state:pt},{id:"vivid",label:"Vivid",state:{brightness:0,contrast:10,saturation:40,exposure:0,clarity:5,gamma:0}},{id:"mono",label:"Mono",state:{brightness:0,contrast:15,saturation:-100,exposure:0,clarity:0,gamma:0}},{id:"soft",label:"Soft",state:{brightness:5,contrast:-10,saturation:0,exposure:0,clarity:-25,gamma:0}},{id:"punch",label:"Punch",state:{brightness:0,contrast:30,saturation:5,exposure:0,clarity:25,gamma:0}},{id:"mute",label:"Mute",state:{brightness:0,contrast:5,saturation:-50,exposure:0,clarity:-5,gamma:0}},{id:"bright",label:"Bright",state:{brightness:5,contrast:5,saturation:0,exposure:15,clarity:0,gamma:0}}];function ai(t,e){return t.brightness===e.brightness&&t.contrast===e.contrast&&t.saturation===e.saturation&&t.exposure===e.exposure&&t.clarity===e.clarity&&t.gamma===e.gamma}function jt(t){for(const e of Vt)if(ai(e.state,t))return e}const si="rgba(255, 235, 59, 0.35)",ci=18,tn=32,li="#ff3b30",ui=4;function di(){return{color:li,strokeWidth:ui,fillColor:null,fontSize:tn}}function hi(t){return{shapes:[],selectedId:null,activeTool:"select",currentStyle:di(),imageSize:t.imageSize,nextShapeNumber:1}}function at(t){return{id:`s_${t.nextShapeNumber.toString(36)}`,nextShapeNumber:t.nextShapeNumber+1}}function Qt(t,e){return t.activeTool===e?t:{...t,activeTool:e,selectedId:e==="select"?t.selectedId:null}}function en(t,e){return{...t,currentStyle:{...t.currentStyle,...e}}}function mt(t,e){return t.selectedId===e?t:{...t,selectedId:e}}function st(t,e){return{...t,shapes:[...t.shapes,e],selectedId:e.id}}function nt(t,e){let n=!1;const o=t.shapes.map(i=>i.id!==e.id?i:(n=!0,e));return n?{...t,shapes:o}:t}function Nt(t,e){const n=t.shapes.filter(o=>o.id!==e);return n.length===t.shapes.length?t:{...t,shapes:n,selectedId:t.selectedId===e?null:t.selectedId}}function nn(t){let{x:e,y:n,width:o,height:i}=t;return o<0&&(e+=o,o=-o),i<0&&(n+=i,i=-i),{x:e,y:n,width:o,height:i}}function on(t,e,n){switch(t.kind){case"text":return{...t,x:t.x+e,y:t.y+n};case"rect":case"ellipse":return{...t,x:t.x+e,y:t.y+n};case"arrow":return{...t,x1:t.x1+e,y1:t.y1+n,x2:t.x2+e,y2:t.y2+n};case"freehand":case"highlight":return{...t,points:t.points.map(o=>({x:o.x+e,y:o.y+n}))};default:return Lt(t)}}function Lt(t){throw new Error(`Unhandled annotation shape kind: ${JSON.stringify(t)}`)}function rn(t){return t==="text"||t==="rect"||t==="ellipse"||t==="arrow"}function pi(t,e){const{imageSize:n,style:o,id:i}=e,r=Math.min(n.width,n.height),a=n.width/2,s=n.height/2;switch(t){case"rect":case"ellipse":{const c=Math.max(80,Math.round(r*.25)),l=Math.round(a-c/2),u=Math.round(s-c/2);return t==="rect"?{id:i,kind:"rect",x:l,y:u,width:c,height:c,strokeColor:o.color,strokeWidth:o.strokeWidth,fillColor:o.fillColor}:{id:i,kind:"ellipse",x:l,y:u,width:c,height:c,strokeColor:o.color,strokeWidth:o.strokeWidth,fillColor:o.fillColor}}case"arrow":{const c=Math.max(100,Math.round(r*.3)),l=Math.round(a-c/2),u=l+c,d=Math.round(s);return{id:i,kind:"arrow",x1:l,y1:d,x2:u,y2:d,color:o.color,strokeWidth:o.strokeWidth}}case"text":{const c=Math.round(a),l=Math.round(s-o.fontSize/2);return{id:i,kind:"text",x:c,y:l,text:"",fontSize:o.fontSize,color:o.color,textAlign:"center"}}}}function ft(t){switch(t.kind){case"text":{const{width:e,height:n}=fi(t.text,t.fontSize);return{x:gi(t.x,e,t.textAlign),y:t.y,width:e,height:n}}case"rect":case"ellipse":return{x:t.x,y:t.y,width:t.width,height:t.height};case"arrow":{const e=Math.min(t.x1,t.x2),n=Math.min(t.y1,t.y2);return{x:e,y:n,width:Math.abs(t.x2-t.x1),height:Math.abs(t.y2-t.y1)}}case"freehand":case"highlight":{const e=t.points[0];if(!e)return{x:0,y:0,width:0,height:0};let n=e.x,o=e.y,i=e.x,r=e.y;for(const a of t.points)a.x<n&&(n=a.x),a.x>i&&(i=a.x),a.y<o&&(o=a.y),a.y>r&&(r=a.y);return{x:n,y:o,width:i-n,height:r-o}}default:return Lt(t)}}const Tt=["tl","tr","bl","br","t","r","b","l"];function mi(t){const e=t.x,n=t.x+t.width,o=t.y,i=t.y+t.height,r=t.x+t.width/2,a=t.y+t.height/2;return{tl:{x:e,y:o},tr:{x:n,y:o},bl:{x:e,y:i},br:{x:n,y:i},t:{x:r,y:o},r:{x:n,y:a},b:{x:r,y:i},l:{x:e,y:a}}}function Jt(t,e,n){let o=t.x,i=t.y,r=t.x+t.width,a=t.y+t.height;return(e==="tl"||e==="l"||e==="bl")&&(o=n.x),(e==="tr"||e==="r"||e==="br")&&(r=n.x),(e==="tl"||e==="t"||e==="tr")&&(i=n.y),(e==="bl"||e==="b"||e==="br")&&(a=n.y),{x:o,y:i,width:r-o,height:a-i}}function fi(t,e){const n=t.length===0?[""]:t.split(`
2
- `);let o=0;for(const a of n)a.length>o&&(o=a.length);const i=Math.max(e*.6,o*e*.55),r=n.length*e*1.2;return{width:i,height:r}}function gi(t,e,n){switch(n){case"left":return t;case"center":return t-e/2;case"right":return t-e}}const ct=4;function yi(t,e){for(let n=t.length-1;n>=0;n--){const o=t[n];if(o&&bi(o,e))return o}}function bi(t,e){switch(t.kind){case"text":return gt(e,ft(t));case"rect":{const n=gt(e,Ft(t));if(t.fillColor!==null)return n;const o=Zt(Ft(t),t.strokeWidth/2+ct),i=Zt(Ft(t),-(t.strokeWidth/2+ct));return gt(e,o)&&!gt(e,i)}case"ellipse":{const n=Ft(t),o=n.width/2,i=n.height/2,r=n.x+o,a=n.y+i;if(o<=0||i<=0)return!1;const s=(e.x-r)/o,c=(e.y-a)/i,l=s*s+c*c,u=(t.strokeWidth/2+ct)/Math.min(o,i);return t.fillColor!==null?l<=(1+u)**2:l<=(1+u)**2&&l>=(1-u)**2}case"arrow":return an(e,{x:t.x1,y:t.y1},{x:t.x2,y:t.y2},t.strokeWidth/2+ct);case"freehand":case"highlight":{const n=ft(t),o=Zt(n,t.strokeWidth/2+ct);if(!gt(e,o))return!1;const i=t.strokeWidth/2+ct;for(let r=1;r<t.points.length;r++){const a=t.points[r-1],s=t.points[r];if(a&&s&&an(e,a,s,i))return!0}if(t.points.length===1){const r=t.points[0];if(!r)return!1;const a=r.x-e.x,s=r.y-e.y;return a*a+s*s<=i*i}return!1}default:return Lt(t)}}function gt(t,e){return t.x>=e.x&&t.y>=e.y&&t.x<=e.x+e.width&&t.y<=e.y+e.height}function Zt(t,e){return{x:t.x-e,y:t.y-e,width:t.width+e*2,height:t.height+e*2}}function Ft(t){let{x:e,y:n,width:o,height:i}=t;return o<0&&(e+=o,o=-o),i<0&&(n+=i,i=-i),{x:e,y:n,width:o,height:i}}function an(t,e,n,o){const i=n.x-e.x,r=n.y-e.y,a=i*i+r*r;if(a===0){const h=t.x-e.x,f=t.y-e.y;return h*h+f*f<=o*o}let s=((t.x-e.x)*i+(t.y-e.y)*r)/a;s<0?s=0:s>1&&(s=1);const c=e.x+s*i,l=e.y+s*r,u=t.x-c,d=t.y-l;return u*u+d*d<=o*o}const sn=2;function wi(t){if(t.length<=1)return[...t];const e=t[0];if(!e)return[];const n=[e];let o=e;const i=sn*sn;for(let a=1;a<t.length-1;a++){const s=t[a];if(!s)continue;const c=s.x-o.x,l=s.y-o.y;c*c+l*l<i||(n.push(s),o=s)}const r=t[t.length-1];return r&&r!==o&&n.push(r),n}function cn(t,e){if(e.length===0)return;const n=e[0];if(!n)return;if(e.length===1){t.moveTo(n.x,n.y),t.lineTo(n.x,n.y);return}t.moveTo(n.x,n.y);for(let i=1;i<e.length-1;i++){const r=e[i],a=e[i+1];if(!r||!a)continue;const s=(r.x+a.x)/2,c=(r.y+a.y)/2;t.quadraticCurveTo(r.x,r.y,s,c)}const o=e[e.length-1];o&&t.lineTo(o.x,o.y)}const ln='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif';async function Ci(t,e){if(t.shapes.length===0)return e;const n=Q(e.width,e.height),o=et(n);o.imageSmoothingEnabled=!0,o.imageSmoothingQuality="high",o.drawImage(e.bitmap,0,0,e.width,e.height);for(const i of t.shapes)te(o,i);return{bitmap:n.canvas,width:e.width,height:e.height,mimeType:e.mimeType}}function te(t,e){switch(e.kind){case"text":xi(t,e);return;case"rect":vi(t,e);return;case"ellipse":ki(t,e);return;case"arrow":Si(t,e);return;case"freehand":Ei(t,e);return;case"highlight":Ai(t,e);return;default:Lt(e)}}function xi(t,e){t.save(),t.fillStyle=e.color,t.font=`${e.fontSize}px ${ln}`,t.textAlign=e.textAlign,t.textBaseline="top";const n=e.text.length===0?[""]:e.text.split(`
3
- `),o=e.fontSize*1.2;for(let i=0;i<n.length;i++){const r=n[i];r!==void 0&&t.fillText(r,e.x,e.y+i*o)}t.restore()}function vi(t,e){t.save(),e.fillColor!==null&&(t.fillStyle=e.fillColor,t.fillRect(e.x,e.y,e.width,e.height)),e.strokeWidth>0&&(t.strokeStyle=e.strokeColor,t.lineWidth=e.strokeWidth,t.lineJoin="miter",t.strokeRect(e.x,e.y,e.width,e.height)),t.restore()}function ki(t,e){t.save();const n=e.width/2,o=e.height/2,i=e.x+n,r=e.y+o;t.beginPath(),t.ellipse(i,r,Math.max(0,n),Math.max(0,o),0,0,Math.PI*2),e.fillColor!==null&&(t.fillStyle=e.fillColor,t.fill()),e.strokeWidth>0&&(t.strokeStyle=e.strokeColor,t.lineWidth=e.strokeWidth,t.stroke()),t.restore()}function Si(t,e){const n=e.x2-e.x1,o=e.y2-e.y1,i=Math.sqrt(n*n+o*o);if(i<.5)return;t.save(),t.strokeStyle=e.color,t.fillStyle=e.color,t.lineWidth=e.strokeWidth,t.lineCap="round",t.lineJoin="round";const r=Math.min(Math.max(e.strokeWidth*5,28),i*.6),a=Math.max(e.strokeWidth*4,18),s=n/i,c=o/i,l=e.x2-s*r*.6,u=e.y2-c*r*.6;t.beginPath(),t.moveTo(e.x1,e.y1),t.lineTo(l,u),t.stroke();const d=e.x2-s*r,h=e.y2-c*r,f=-c,m=s;t.beginPath(),t.moveTo(e.x2,e.y2),t.lineTo(d+f*a/2,h+m*a/2),t.lineTo(d-f*a/2,h-m*a/2),t.closePath(),t.fill(),t.restore()}function Ei(t,e){e.points.length!==0&&(t.save(),t.strokeStyle=e.color,t.lineWidth=e.strokeWidth,t.lineCap="round",t.lineJoin="round",t.beginPath(),cn(t,e.points),t.stroke(),t.restore())}function Ai(t,e){e.points.length!==0&&(t.save(),t.globalCompositeOperation="multiply",t.strokeStyle=e.color,t.lineWidth=e.strokeWidth,t.lineCap="round",t.lineJoin="round",t.beginPath(),cn(t,e.points),t.stroke(),t.restore())}const Mi="#000000",Ii="pixelate";function Ri(t){return{regions:[],nextRegionNumber:1,selectedId:null,currentMode:Ii,currentColor:Mi,imageSize:t.imageSize}}function un(t){return{id:`r_${t.nextRegionNumber.toString(36)}`,nextRegionNumber:t.nextRegionNumber+1}}function dn(t,e){return{...t,regions:[...t.regions,e],selectedId:e.id}}function J(t,e){let n=!1;const o=t.regions.map(i=>i.id!==e.id?i:(n=!0,e));return n?{...t,regions:o}:t}function hn(t,e){const n=t.regions.filter(o=>o.id!==e);return n.length===t.regions.length?t:{...t,regions:n,selectedId:t.selectedId===e?null:t.selectedId}}function pn(t,e){return t.selectedId===e?t:{...t,selectedId:e}}function Ni(t,e){return t.currentMode===e?t:{...t,currentMode:e}}function Li(t,e){return t.currentColor===e?t:{...t,currentColor:e}}function Ti(t,e,n){const o=t.regions.find(i=>i.id===e);return!o||o.mode===n?t:J(t,{...o,mode:n})}function Fi(t,e,n){const o=t.regions.find(i=>i.id===e);return!o||o.color===n?t:J(t,{...o,color:n})}function lt(t){return t.selectedId===null?null:t.regions.find(e=>e.id===t.selectedId)??null}function Pi(t){let{x:e,y:n,width:o,height:i}=t;return o<0&&(e+=o,o=-o),i<0&&(n+=i,i=-i),{x:e,y:n,width:o,height:i}}function $i(t){const{imageSize:e,mode:n,color:o,id:i}=t,r=Math.min(e.width,e.height),a=Math.max(80,Math.round(r*.25)),s=e.width/2,c=e.height/2,l=Math.round(s-a/2),u=Math.round(c-a/2);return{id:i,x:l,y:u,width:a,height:a,mode:n,color:o}}function Di(t,e){if(t.imageSize.width===e.width&&t.imageSize.height===e.height)return t;const n=[];for(const i of t.regions)i.x+i.width<=0||i.y+i.height<=0||i.x>=e.width||i.y>=e.height||n.push(Hi(i,e));const o=t.selectedId!==null&&!n.some(i=>i.id===t.selectedId);return{...t,regions:n,imageSize:{width:e.width,height:e.height},selectedId:o?null:t.selectedId}}function Hi(t,e){const n=Math.max(0,t.x),o=Math.max(0,t.y),i=Math.min(e.width,t.x+t.width),r=Math.min(e.height,t.y+t.height);return{...t,x:n,y:o,width:Math.max(0,i-n),height:Math.max(0,r-o)}}async function Oi(t,e){if(t.regions.length===0)return e;const n=Q(e.width,e.height),o=et(n);o.drawImage(e.bitmap,0,0,e.width,e.height);for(const i of t.regions)mn(o,n.canvas,i,e);return{bitmap:n.canvas,width:e.width,height:e.height,mimeType:e.mimeType}}function mn(t,e,n,o){const i=Math.round(n.width),r=Math.round(n.height);if(i<1||r<1)return;const a=Math.round(n.x),s=Math.round(n.y);switch(n.mode){case"solid":zi(t,n,a,s,i,r);return;case"pixelate":Bi(t,e,o,a,s,i,r);return;case"blur":_i(t,e,o,a,s,i,r);return}}function zi(t,e,n,o,i,r){t.save(),t.fillStyle=e.color,t.fillRect(n,o,i,r),t.restore()}function Bi(t,e,n,o,i,r,a){const s=Math.max(r,a),c=Math.max(4,Math.round(8*Math.min(1,s/240))),l=Math.max(1,Math.round(r/s*c)),u=Math.max(1,Math.round(a/s*c));t.save();const d=ee(l,u);if(!d){t.restore();return}d.ctx.imageSmoothingEnabled=!0,d.ctx.imageSmoothingQuality="low",d.ctx.drawImage(e,o,i,r,a,0,0,l,u),t.imageSmoothingEnabled=!1,t.drawImage(d.canvas,0,0,l,u,o,i,r,a),t.restore()}function _i(t,e,n,o,i,r,a){const c=Math.max(1,Math.round(r*.125)),l=Math.max(1,Math.round(a*.125)),u=ee(c,l);if(!u)return;u.ctx.imageSmoothingEnabled=!0,u.ctx.imageSmoothingQuality="high",u.ctx.drawImage(e,o,i,r,a,0,0,c,l);const d=Math.max(1,Math.round(c*.5)),h=Math.max(1,Math.round(l*.5)),f=ee(d,h);if(!f){t.save(),t.imageSmoothingEnabled=!0,t.imageSmoothingQuality="high",t.drawImage(u.canvas,0,0,c,l,o,i,r,a),t.restore();return}f.ctx.imageSmoothingEnabled=!0,f.ctx.imageSmoothingQuality="high",f.ctx.drawImage(u.canvas,0,0,c,l,0,0,d,h),t.save(),t.imageSmoothingEnabled=!0,t.imageSmoothingQuality="high",t.drawImage(f.canvas,0,0,d,h,o,i,r,a),t.restore()}function ee(t,e){if(typeof OffscreenCanvas<"u")try{const i=new OffscreenCanvas(t,e),r=i.getContext("2d");if(r)return{canvas:i,ctx:r}}catch{}if(typeof document>"u")return null;const n=document.createElement("canvas");n.width=t,n.height=e;const o=n.getContext("2d");return o?{canvas:n,ctx:o}:null}const fn=[{id:"none",label:"None",acceptsColor:!1,defaultColor:"#000000"},{id:"solidSharp",label:"Mat Sharp",acceptsColor:!0,defaultColor:"#000000"},{id:"solidRound",label:"Mat Round",acceptsColor:!0,defaultColor:"#000000"},{id:"lineSingle",label:"Line Single",acceptsColor:!0,defaultColor:"#000000"},{id:"hook",label:"Corner Hooks",acceptsColor:!0,defaultColor:"#000000"},{id:"polaroid",label:"Polaroid",acceptsColor:!0,defaultColor:"#ffffff"}],Wi={presetId:"none",color:"#000000"};function qi(){return Wi}function gn(t){return t.presetId==="none"}function Ui(t,e){if(t.presetId===e)return t;const n=yn(t.presetId),o=yn(e);if(!o)return{...t,presetId:e};const r=n!==void 0&&t.color===n.defaultColor?o.defaultColor:t.color;return{presetId:e,color:r}}function Xi(t,e){return t.color===e?t:{...t,color:e}}function yn(t){return fn.find(e=>e.id===t)}async function Yi(t,e){return gn(t)?e:t.presetId==="polaroid"?Qi(t.color,e):t.presetId==="none"?e:Gi(t.presetId,t.color,e)}function Gi(t,e,n){const o=Q(n.width,n.height),i=et(o);return i.drawImage(n.bitmap,0,0,n.width,n.height),ne(i,t,e,n.width,n.height),{bitmap:o.canvas,width:n.width,height:n.height,mimeType:n.mimeType}}function ne(t,e,n,o,i){switch(e){case"solidSharp":bn(t,n,o,i);return;case"solidRound":Ki(t,n,o,i);return;case"lineSingle":Vi(t,n,o,i);return;case"hook":ji(t,n,o,i);return}}function bn(t,e,n,o){const i=wn(n,o);t.save(),t.fillStyle=e,t.fillRect(0,0,n,i),t.fillRect(0,o-i,n,i),t.fillRect(0,i,i,o-2*i),t.fillRect(n-i,i,i,o-2*i),t.restore()}function Ki(t,e,n,o){const r=wn(n,o);bn(t,e,n,o),t.save(),t.globalCompositeOperation="destination-out",t.fillStyle="#000",Pt(t,0,0,r,"tl"),Pt(t,n,0,r,"tr"),Pt(t,0,o,r,"bl"),Pt(t,n,o,r,"br"),t.restore()}function Pt(t,e,n,o,i){switch(t.beginPath(),t.moveTo(e,n),i){case"tl":t.lineTo(e+o,n),t.arc(e+o,n+o,o,-Math.PI/2,Math.PI,!0),t.lineTo(e,n);break;case"tr":t.lineTo(e,n+o),t.arc(e-o,n+o,o,0,-Math.PI/2,!0),t.lineTo(e,n);break;case"bl":t.lineTo(e+o,n),t.arc(e+o,n-o,o,Math.PI/2,Math.PI,!1),t.lineTo(e,n);break;case"br":t.lineTo(e-o,n),t.arc(e-o,n-o,o,Math.PI/2,0,!0),t.lineTo(e,n);break}t.closePath(),t.fill()}function Vi(t,e,n,o){const i=Math.round(Math.min(n,o)*.05),r=Math.max(2,Math.round(Math.min(n,o)*.01));t.save(),t.strokeStyle=e,t.lineWidth=r;const a=r/2;t.strokeRect(i+a,i+a,n-2*i-r,o-2*i-r),t.restore()}function ji(t,e,n,o){const i=Math.round(Math.min(n,o)*.08),r=Math.max(2,Math.round(Math.min(n,o)*.01)),a=Math.round(Math.min(n,o)*.05);t.save(),t.strokeStyle=e,t.lineWidth=r,t.lineCap="square";const s=r/2,c=(l,u,d,h)=>{t.beginPath(),t.moveTo(l+d*i,u),t.lineTo(l,u),t.lineTo(l,u+h*i),t.stroke()};c(a+s,a+s,1,1),c(n-a-s,a+s,-1,1),c(a+s,o-a-s,1,-1),c(n-a-s,o-a-s,-1,-1),t.restore()}function Qi(t,e){const n=Math.min(e.width,e.height),o=Math.round(n*.05),i=o,r=o,a=Math.round(n*.18),s=e.width+i+r,c=e.height+o+a,l=Q(s,c),u=et(l);return u.fillStyle=t,u.fillRect(0,0,s,c),u.drawImage(e.bitmap,i,o,e.width,e.height),{bitmap:l.canvas,width:s,height:c,mimeType:e.mimeType}}function wn(t,e){return Math.max(4,Math.round(Math.min(t,e)*.04))}function oe(t,e,n){if(t!=="polaroid")return{width:e,height:n};const o=Math.min(e,n),i=Math.round(o*.05),r=Math.round(o*.18);return{width:e+2*i,height:n+i+r}}/**
4
- * @license lucide v1.14.0 - ISC
5
- *
6
- * This source code is licensed under the ISC license.
7
- * See the LICENSE file in the root directory of this source tree.
8
- */const Ji=[["path",{d:"M5 12h14"}],["path",{d:"m12 5 7 7-7 7"}]];/**
9
- * @license lucide v1.14.0 - ISC
10
- *
11
- * This source code is licensed under the ISC license.
12
- * See the LICENSE file in the root directory of this source tree.
13
- */const Zi=[["path",{d:"M20 6 9 17l-5-5"}]];/**
14
- * @license lucide v1.14.0 - ISC
15
- *
16
- * This source code is licensed under the ISC license.
17
- * See the LICENSE file in the root directory of this source tree.
18
- */const tr=[["path",{d:"m6 9 6 6 6-6"}]];/**
19
- * @license lucide v1.14.0 - ISC
20
- *
21
- * This source code is licensed under the ISC license.
22
- * See the LICENSE file in the root directory of this source tree.
23
- */const er=[["circle",{cx:"12",cy:"12",r:"10"}]];/**
24
- * @license lucide v1.14.0 - ISC
25
- *
26
- * This source code is licensed under the ISC license.
27
- * See the LICENSE file in the root directory of this source tree.
28
- */const nr=[["path",{d:"m3 7 5 5-5 5V7"}],["path",{d:"m21 7-5 5 5 5V7"}],["path",{d:"M12 20v2"}],["path",{d:"M12 14v2"}],["path",{d:"M12 8v2"}],["path",{d:"M12 2v2"}]];/**
29
- * @license lucide v1.14.0 - ISC
30
- *
31
- * This source code is licensed under the ISC license.
32
- * See the LICENSE file in the root directory of this source tree.
33
- */const or=[["path",{d:"m17 3-5 5-5-5h10"}],["path",{d:"m17 21-5-5-5 5h10"}],["path",{d:"M4 12H2"}],["path",{d:"M10 12H8"}],["path",{d:"M16 12h-2"}],["path",{d:"M22 12h-2"}]];/**
34
- * @license lucide v1.14.0 - ISC
35
- *
36
- * This source code is licensed under the ISC license.
37
- * See the LICENSE file in the root directory of this source tree.
38
- */const ir=[["path",{d:"m9 11-6 6v3h9l3-3"}],["path",{d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"}]];/**
39
- * @license lucide v1.14.0 - ISC
40
- *
41
- * This source code is licensed under the ISC license.
42
- * See the LICENSE file in the root directory of this source tree.
43
- */const rr=[["path",{d:"M10 8h.01"}],["path",{d:"M12 12h.01"}],["path",{d:"M14 8h.01"}],["path",{d:"M16 12h.01"}],["path",{d:"M18 8h.01"}],["path",{d:"M6 8h.01"}],["path",{d:"M7 16h10"}],["path",{d:"M8 12h.01"}],["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2"}]];/**
44
- * @license lucide v1.14.0 - ISC
45
- *
46
- * This source code is licensed under the ISC license.
47
- * See the LICENSE file in the root directory of this source tree.
48
- */const ar=[["path",{d:"M9 17H7A5 5 0 0 1 7 7"}],["path",{d:"M15 7h2a5 5 0 0 1 4 8"}],["line",{x1:"8",x2:"12",y1:"12",y2:"12"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22"}]];/**
49
- * @license lucide v1.14.0 - ISC
50
- *
51
- * This source code is licensed under the ISC license.
52
- * See the LICENSE file in the root directory of this source tree.
53
- */const sr=[["path",{d:"M9 17H7A5 5 0 0 1 7 7h2"}],["path",{d:"M15 7h2a5 5 0 1 1 0 10h-2"}],["line",{x1:"8",x2:"16",y1:"12",y2:"12"}]];/**
54
- * @license lucide v1.14.0 - ISC
55
- *
56
- * This source code is licensed under the ISC license.
57
- * See the LICENSE file in the root directory of this source tree.
58
- */const cr=[["path",{d:"M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z"}]];/**
59
- * @license lucide v1.14.0 - ISC
60
- *
61
- * This source code is licensed under the ISC license.
62
- * See the LICENSE file in the root directory of this source tree.
63
- */const lr=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]];/**
64
- * @license lucide v1.14.0 - ISC
65
- *
66
- * This source code is licensed under the ISC license.
67
- * See the LICENSE file in the root directory of this source tree.
68
- */const ur=[["path",{d:"M5 12h14"}],["path",{d:"M12 5v14"}]];/**
69
- * @license lucide v1.14.0 - ISC
70
- *
71
- * This source code is licensed under the ISC license.
72
- * See the LICENSE file in the root directory of this source tree.
73
- */const dr=[["path",{d:"m15 14 5-5-5-5"}],["path",{d:"M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13"}]];/**
74
- * @license lucide v1.14.0 - ISC
75
- *
76
- * This source code is licensed under the ISC license.
77
- * See the LICENSE file in the root directory of this source tree.
78
- */const hr=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915"}],["circle",{cx:"12",cy:"12",r:"3"}]];/**
79
- * @license lucide v1.14.0 - ISC
80
- *
81
- * This source code is licensed under the ISC license.
82
- * See the LICENSE file in the root directory of this source tree.
83
- */const pr=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}]];/**
84
- * @license lucide v1.14.0 - ISC
85
- *
86
- * This source code is licensed under the ISC license.
87
- * See the LICENSE file in the root directory of this source tree.
88
- */const mr=[["path",{d:"M10 11v6"}],["path",{d:"M14 11v6"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"}],["path",{d:"M3 6h18"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"}]];/**
89
- * @license lucide v1.14.0 - ISC
90
- *
91
- * This source code is licensed under the ISC license.
92
- * See the LICENSE file in the root directory of this source tree.
93
- */const fr=[["path",{d:"M12 4v16"}],["path",{d:"M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2"}],["path",{d:"M9 20h6"}]];/**
94
- * @license lucide v1.14.0 - ISC
95
- *
96
- * This source code is licensed under the ISC license.
97
- * See the LICENSE file in the root directory of this source tree.
98
- */const gr=[["path",{d:"M9 14 4 9l5-5"}],["path",{d:"M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11"}]];/**
99
- * @license lucide v1.14.0 - ISC
100
- *
101
- * This source code is licensed under the ISC license.
102
- * See the LICENSE file in the root directory of this source tree.
103
- */const yr=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],br={xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":2,"stroke-linecap":"round","stroke-linejoin":"round","aria-hidden":"true"};function wr(t,e={}){const n={...br,...e},o=Object.entries(n).map(([r,a])=>`${r}="${a}"`).join(" "),i=t.map(([r,a])=>{const s=Object.entries(a).map(([c,l])=>`${c}="${l}"`).join(" ");return`<${r} ${s} />`}).join("");return`<svg ${o}>${i}</svg>`}function Cr(t){switch(t){case"select":return cr;case"text":return fr;case"rect":return pr;case"ellipse":return er;case"arrow":return Ji;case"freehand":return lr;case"highlight":return ir;case"undo":return gr;case"redo":return dr;case"close":return yr;case"delete":return mr;case"check":return Zi;case"lockClosed":return sr;case"lockOpen":return ar;case"plus":return ur;case"flipHorizontal":return nr;case"flipVertical":return or;case"chevronDown":return tr;case"settings":return hr;case"keyboard":return rr}}function B(t,e){return wr(Cr(t),e)}let xr=0;function vr(t){const e=`kalotyp-editor-${++xr}`,n=`${e}-title`,o=document.createElement("div");o.className="pintura-editor kalotyp-editor",o.id=e,o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.setAttribute("aria-labelledby",n),o.tabIndex=-1;const i=document.createElement("h2");i.id=n,i.className="kalotyp-visually-hidden",i.textContent="Image editor";const r=document.createElement("div");r.className="PinturaModal kalotyp-modal";const a=document.createElement("button");a.type="button",a.title="Close",a.setAttribute("aria-label","Close image editor"),a.className="kalotyp-button-close",a.innerHTML=B("close");const s=document.createElement("button");s.type="button",s.title="Preferences",s.setAttribute("aria-label","Open editor preferences"),s.setAttribute("aria-haspopup","dialog"),s.className="kalotyp-button-prefs",s.innerHTML=B("settings");const c=document.createElement("div");c.className="kalotyp-root",c.setAttribute("data-env","landscape has-navigation");const l=document.createElement("div");l.className="kalotyp-main";const u=document.createElement("div");u.className="kalotyp-stage",u.setAttribute("role","region"),u.setAttribute("aria-label","Image preview");const d=document.createElement("div");d.id=`${e}-panel`,d.className="kalotyp-util-main",d.setAttribute("role","tabpanel"),d.setAttribute("tabindex","0");const h=document.createElement("div");h.className="kalotyp-nav-tools";const f=document.createElement("div");f.className="kalotyp-util-footer";const m=document.createElement("div");m.className="kalotyp-export-group";const g=document.createElement("button");g.type="button",g.className="kalotyp-button-export";const p=document.createElement("span");p.className="kalotyp-button-inner",p.textContent=t.exportLabel,g.appendChild(p);const w=document.createElement("button");w.type="button",w.className="kalotyp-button-output-settings",w.title="Output settings",w.setAttribute("aria-label","Output settings (format and quality)"),w.setAttribute("aria-haspopup","dialog"),w.setAttribute("aria-expanded","false"),w.innerHTML=B("chevronDown"),m.appendChild(g),m.appendChild(w),f.appendChild(m);const y=document.createElement("div");return y.className="kalotyp-visually-hidden",y.setAttribute("role","status"),y.setAttribute("aria-live","polite"),y.setAttribute("aria-atomic","true"),l.appendChild(u),l.appendChild(d),c.appendChild(h),c.appendChild(l),c.appendChild(f),r.appendChild(i),r.appendChild(s),r.appendChild(a),r.appendChild(c),r.appendChild(y),o.appendChild(r),{editor:o,modal:r,root:c,main:l,stage:u,navTools:h,utilMain:d,utilFooter:f,closeButton:a,prefsButton:s,exportButton:g,outputSettingsButton:w,liveRegion:y,titleId:n}}function kr(t){const e=vr({exportLabel:t.exportLabel}),n=()=>t.onExportClick(),o=()=>t.onCloseClick(),i=()=>t.onOutputSettingsClick(),r=()=>t.onPrefsClick();e.exportButton.addEventListener("click",n),e.closeButton.addEventListener("click",o),e.outputSettingsButton.addEventListener("click",i),e.prefsButton.addEventListener("click",r),t.host.appendChild(e.editor);let a=!1;function s(c){a=!a,e.liveRegion.textContent=a?`${c} `:c}return{editor:e.editor,modal:e.modal,root:e.root,exportButton:e.exportButton,outputSettingsButton:e.outputSettingsButton,prefsButton:e.prefsButton,closeButton:e.closeButton,stage:e.stage,utilMain:e.utilMain,navTools:e.navTools,announce:s,destroy(){e.exportButton.removeEventListener("click",n),e.closeButton.removeEventListener("click",o),e.outputSettingsButton.removeEventListener("click",i),e.prefsButton.removeEventListener("click",r),e.editor.remove()}}}const ut=12;function Sr(t){const e=be(t.cropRectImage,t.viewport),{cornerAnchors:n,edgeHandles:o,bodyHitArea:i}=t;i.style.left=`${e.x}px`,i.style.top=`${e.y}px`,i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,$t(n.tl,e.x,e.y),$t(n.tr,e.x+e.width,e.y),$t(n.bl,e.x,e.y+e.height),$t(n.br,e.x+e.width,e.y+e.height);const r=Math.max(0,e.width-ut*2),a=Math.max(0,e.height-ut*2);Cn(o.t,e.x+ut,e.y,r),Cn(o.b,e.x+ut,e.y+e.height,r),xn(o.l,e.x,e.y+ut,a),xn(o.r,e.x+e.width,e.y+ut,a)}function $t(t,e,n){t.style.left=`${e}px`,t.style.top=`${n}px`}function Cn(t,e,n,o){t.style.left=`${e}px`,t.style.top=`${n}px`,t.style.width=`${o}px`}function xn(t,e,n,o){t.style.left=`${e}px`,t.style.top=`${n}px`,t.style.height=`${o}px`}function Er(t,e,n,o,i){const r=Math.max(1,window.devicePixelRatio||1),a=Math.max(1,Math.round(n*r)),s=Math.max(1,Math.round(o*r));t.width!==a&&(t.width=a),t.height!==s&&(t.height=s),t.style.width=`${n}px`,t.style.height=`${o}px`;const c=t.getContext("2d");c&&(c.setTransform(r,0,0,r,0,0),c.clearRect(0,0,n,o),c.drawImage(e,i.displayRect.x,i.displayRect.y,i.displayRect.width,i.displayRect.height))}const Ar="rgba(0, 0, 0, 0.4)",Mr="rgba(0, 0, 0, 0.45)",Ir=3,Rr="rgba(255, 255, 255, 0.95)",Nr=1,Lr="rgba(0, 0, 0, 0.25)",Tr=2,Fr="rgba(255, 255, 255, 0.55)",Pr=1;function $r(t,e,n,o,i){const r=Math.max(1,window.devicePixelRatio||1),a=Math.max(1,Math.round(n*r)),s=Math.max(1,Math.round(o*r));t.width!==a&&(t.width=a),t.height!==s&&(t.height=s),t.style.width=`${n}px`,t.style.height=`${o}px`;const c=t.getContext("2d");if(!c)return;c.setTransform(r,0,0,r,0,0),c.clearRect(0,0,n,o);const l=be(e,i),u=i.displayRect;c.save(),c.fillStyle=Ar,c.fillRect(u.x,u.y,u.width,u.height),c.globalCompositeOperation="destination-out",c.fillRect(l.x,l.y,l.width,l.height),c.restore();const d=l.x+.5,h=l.y+.5,f=l.width-1,m=l.height-1;c.strokeStyle=Mr,c.lineWidth=Ir,c.strokeRect(d,h,f,m),c.strokeStyle=Rr,c.lineWidth=Nr,c.strokeRect(d,h,f,m),vn(c,l,Lr,Tr),vn(c,l,Fr,Pr)}function vn(t,e,n,o){t.strokeStyle=n,t.lineWidth=o,t.beginPath();for(let i=1;i<3;i++){const r=e.x+e.width*i/3,a=e.y+e.height*i/3;t.moveTo(r,e.y),t.lineTo(r,e.y+e.height),t.moveTo(e.x,a),t.lineTo(e.x+e.width,a)}t.stroke()}function Dr(t,e,n){const o=document.createElement("div");o.className="kalotyp-preset-row",o.setAttribute("role","radiogroup"),o.setAttribute("aria-label","Crop aspect ratio");const i=[];return t.forEach((r,a)=>{const[,s]=r,c=document.createElement("button");c.type="button",c.className="kalotyp-preset-button",c.textContent=s,c.setAttribute("role","radio"),c.setAttribute("aria-checked",a===e?"true":"false"),c.dataset.presetIndex=String(a),c.addEventListener("click",()=>n(a,r)),o.appendChild(c),i.push(c)}),{container:o,buttons:i}}function kn(t,e){t.forEach((n,o)=>{n.setAttribute("aria-checked",o===e?"true":"false")})}const Hr=["tl","tr","bl","br"],Or=["t","r","b","l"];function zr(){const t=document.createElement("div");t.className="kalotyp-stage-container";const e=document.createElement("canvas");e.className="kalotyp-stage-image",e.setAttribute("aria-hidden","true");const n=document.createElement("canvas");n.className="kalotyp-stage-overlay",n.setAttribute("aria-hidden","true");const o=document.createElement("div");o.className="kalotyp-stage-body";const i=document.createElement("div");i.className="kalotyp-handles",i.setAttribute("role","group"),i.setAttribute("aria-label","Crop region");const r={};for(const s of Or){const c=_r(s);r[s]=c,i.appendChild(c)}const a={};for(const s of Hr){const c=document.createElement("div");c.className="kalotyp-corner-anchor",c.dataset.direction=s;const l=Br(s);c.appendChild(l),r[s]=l,a[s]=c,i.appendChild(c)}return t.appendChild(e),t.appendChild(n),t.appendChild(o),t.appendChild(i),{container:t,imageCanvas:e,overlayCanvas:n,handlesLayer:i,handles:r,cornerAnchors:a,bodyHitArea:o}}function Br(t){const e=document.createElement("button");return e.type="button",e.className="kalotyp-handle",e.dataset.shape="circle",e.dataset.direction=t,e.setAttribute("aria-label",Sn(t)),e.tabIndex=0,e}function _r(t){const e=document.createElement("button");return e.type="button",e.className="kalotyp-handle",e.dataset.shape="edge",e.dataset.direction=t,e.setAttribute("aria-label",Sn(t)),e.tabIndex=0,e}function Sn(t){switch(t){case"tl":return"Top-left crop handle";case"tr":return"Top-right crop handle";case"bl":return"Bottom-left crop handle";case"br":return"Bottom-right crop handle";case"t":return"Top crop handle";case"r":return"Right crop handle";case"b":return"Bottom crop handle";case"l":return"Left crop handle"}}function Wr(t,e,n){const o=[];for(const i of Object.keys(t.handles)){const r=t.handles[i];o.push(qr(r,i,e,n))}return o.push(Ur(t.bodyHitArea,e,n)),{destroy(){for(const i of o)i()}}}function qr(t,e,n,o){return En(t,()=>{const i=o.getViewport(),r=n.get(),a={x:0,y:0,width:r.imageSize.width,height:r.imageSize.height},s=r.aspectRatio;return{onMove(c){const l=ie(t,c.clientX,c.clientY),u=Wt(l,i),d=go(r.rect,e,u,{bounds:a,...s!==void 0?{aspectRatio:s}:{}});n.set({rect:d})},onCommit(){o.onCommit?.()},onCancel(){n.set({rect:r.rect})}}})}function Ur(t,e,n){return En(t,o=>{const i=n.getViewport(),r=e.get(),a={x:0,y:0,width:r.imageSize.width,height:r.imageSize.height},s=ie(t,o.clientX,o.clientY);return{onMove(c){const l=ie(t,c.clientX,c.clientY),u=(l.x-s.x)/i.scale,d=(l.y-s.y)/i.scale,h=co(r.rect,u,d,a);e.set({rect:h})},onCommit(){n.onCommit?.()},onCancel(){e.set({rect:r.rect})}}})}function En(t,e){const n=o=>{if(o.button!==0)return;o.preventDefault(),o.stopPropagation();const i=e(o);t.setPointerCapture(o.pointerId);let r,a=!1;const s=()=>{if(a=!1,!r)return;const h=r;r=void 0,i.onMove(h)},c=h=>{h.pointerId===o.pointerId&&(r={clientX:h.clientX,clientY:h.clientY},a||(a=!0,requestAnimationFrame(s)))},l=h=>{t.removeEventListener("pointermove",c),t.removeEventListener("pointerup",u),t.removeEventListener("pointercancel",d);try{t.releasePointerCapture(o.pointerId)}catch{}if(r){const f=r;r=void 0,i.onMove(f)}h?i.onCommit():i.onCancel()},u=h=>{h.pointerId===o.pointerId&&l(!0)},d=h=>{h.pointerId===o.pointerId&&l(!1)};t.addEventListener("pointermove",c),t.addEventListener("pointerup",u),t.addEventListener("pointercancel",d)};return t.addEventListener("pointerdown",n),()=>t.removeEventListener("pointerdown",n)}function ie(t,e,n){const i=(t.closest(".kalotyp-stage-container")??t).getBoundingClientRect();return{x:e-i.left,y:n-i.top}}const An=32;function Xr(t){const{stageHost:e,utilHost:n,source:o,presets:i,presetFilter:r,store:a,viewport:s}=t,c=t.onCommit??Gr,l=zr();e.appendChild(l.container);const u=document.createElement("div");u.className="kalotyp-crop-panel";const d=wo(i,r),h=Mn(a.get(),i,d),f=Dr(d,h,(A,T)=>{const $=i.indexOf(T);if($===-1)return;const O=xo(a.get(),$);a.set({rect:O.rect,aspectRatio:O.aspectRatio,activePresetIndex:$}),kn(f.buttons,A),c()});u.appendChild(f.container);const m=Yr({initial:a.get().rect,bounds:{width:o.width,height:o.height},onCommit(A){const T=a.get(),$={x:0,y:0,width:T.imageSize.width,height:T.imageSize.height},O=xt(A,$);a.set({rect:O}),c()}});u.appendChild(m.container),n.appendChild(u);let g=j({width:1,height:1,padding:An},{width:o.width,height:o.height});function p(){const A=l.container.getBoundingClientRect(),T={width:A.width,height:A.height,padding:An},$={width:o.width,height:o.height};g=s?s.computeViewport(T,$):j(T,$)}function w(){const A=l.container.getBoundingClientRect();A.width<=0||A.height<=0||(Er(l.imageCanvas,o.bitmap,A.width,A.height,g),y())}function y(){const A=l.container.getBoundingClientRect();A.width<=0||A.height<=0||($r(l.overlayCanvas,a.get().rect,A.width,A.height,g),Sr({cropRectImage:a.get().rect,viewport:g,cornerAnchors:l.cornerAnchors,edgeHandles:{t:l.handles.t,r:l.handles.r,b:l.handles.b,l:l.handles.l},bodyHitArea:l.bodyHitArea}))}p(),w();const C=new ResizeObserver(()=>{p(),w()});C.observe(l.container);let E=!1;const S=s?.subscribe(()=>{E||(E=!0,requestAnimationFrame(()=>{E=!1,p(),w()}))});let M=!1;const H=a.subscribe((A,T)=>{Vr(A,T,i,d,f.buttons),!Kr(A.rect,T.rect)&&(m.sync(A.rect),!M&&(M=!0,requestAnimationFrame(()=>{M=!1,y()})))}),R=Wr({handles:l.handles,bodyHitArea:l.bodyHitArea},a,{getViewport:()=>g,onCommit:c});return{destroy(){R.destroy(),H(),S?.(),C.disconnect(),l.container.remove(),u.remove()}}}function Yr(t){const e=document.createElement("div");e.className="kalotyp-crop-dims",e.setAttribute("role","group"),e.setAttribute("aria-label","Crop region dimensions");const n=Dt("Left",t.initial.x,0,t.bounds.width),o=Dt("Top",t.initial.y,0,t.bounds.height),i=Dt("Width",t.initial.width,1,t.bounds.width),r=Dt("Height",t.initial.height,1,t.bounds.height);function a(){return{x:Math.round(n.input.valueAsNumber),y:Math.round(o.input.valueAsNumber),width:Math.round(i.input.valueAsNumber),height:Math.round(r.input.valueAsNumber)}}for(const c of[n,o,i,r])c.input.addEventListener("change",()=>{const l=a();Number.isFinite(l.x+l.y+l.width+l.height)&&t.onCommit(l)});e.appendChild(n.wrapper),e.appendChild(o.wrapper),e.appendChild(i.wrapper),e.appendChild(r.wrapper);function s(c){n.input.valueAsNumber!==c.x&&(n.input.value=String(Math.round(c.x))),o.input.valueAsNumber!==c.y&&(o.input.value=String(Math.round(c.y))),i.input.valueAsNumber!==c.width&&(i.input.value=String(Math.round(c.width))),r.input.valueAsNumber!==c.height&&(r.input.value=String(Math.round(c.height)))}return{container:e,sync:s}}function Dt(t,e,n,o){const i=document.createElement("label");i.className="kalotyp-crop-dims-field";const r=document.createElement("span");r.className="kalotyp-crop-dims-label",r.textContent=t;const a=document.createElement("input");return a.type="number",a.className="kalotyp-crop-dims-input",a.min=String(n),a.max=String(o),a.step="1",a.value=String(Math.round(e)),a.inputMode="numeric",a.setAttribute("aria-label",`${t} (pixels)`),i.appendChild(r),i.appendChild(a),{wrapper:i,input:a}}function Gr(){}function Kr(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function Mn(t,e,n){if(t.activePresetIndex===-1)return-1;const o=e[t.activePresetIndex];return o?n.indexOf(o):-1}function Vr(t,e,n,o,i){if(t.activePresetIndex===e.activePresetIndex)return;const r=Mn(t,n,o);kn(i,r)}const jr="crop";function Qr(t){return{id:"crop",init(e){return Co({imageSize:{width:e.source.width,height:e.source.height},presets:t.presets,filter:t.presetFilter})},mount(e,n,o){const i=Xr({stageHost:e,utilHost:t.panelHost,source:n.source,presets:t.presets,presetFilter:t.presetFilter,store:o,viewport:n.viewport,onCommit:()=>n.bus.emit("commit",{utility:jr})});return{destroy:()=>i.destroy()}},async bake(e,n){return ko(n,{rect:e.rect})}}}const In=32;function yt(){const t=document.createElement("div");t.className="kalotyp-stage-container kalotyp-preview-container";const e=document.createElement("canvas");return e.className="kalotyp-stage-image kalotyp-preview-canvas",e.setAttribute("aria-hidden","true"),t.appendChild(e),{container:t,canvas:e}}function Ht(t,e,n){const o=t.getBoundingClientRect();if(o.width<=0||o.height<=0)return;const i={width:o.width,height:o.height,padding:In};return{viewport:n?n.computeViewport(i,e):j(i,e),stageWidth:o.width,stageHeight:o.height}}function re(t,e,n,o){const i=Math.max(1,window.devicePixelRatio||1),r=Math.max(1,Math.round(e*i)),a=Math.max(1,Math.round(n*i));t.width!==r&&(t.width=r),t.height!==a&&(t.height=a),t.style.width=`${e}px`,t.style.height=`${n}px`;const s=t.getContext("2d");s&&(s.setTransform(i,0,0,i,0,0),s.clearRect(0,0,e,n),s.imageSmoothingEnabled=!0,s.imageSmoothingQuality="high",o(s))}function Jr(t){const{stageHost:e,utilHost:n,source:o,store:i,viewport:r}=t,a=t.onCommit??(()=>{}),s=yt();e.appendChild(s.container);const c=Zr({onToggleHorizontal:()=>{i.set(Oe(i.get(),"horizontal")),a()},onToggleVertical:()=>{i.set(Oe(i.get(),"vertical")),a()}});n.appendChild(c.container);function l(){const p=Ht(s.container,{width:o.width,height:o.height},r);if(!p)return;const w=i.get();re(s.canvas,p.stageWidth,p.stageHeight,y=>{const C=p.viewport.displayRect,E=w.horizontal?-1:1,S=w.vertical?-1:1,M=C.x+C.width/2,H=C.y+C.height/2;y.translate(M,H),y.scale(E,S),y.drawImage(o.bitmap,-C.width/2,-C.height/2,C.width,C.height)})}function u(p){c.horizontalButton.setAttribute("aria-pressed",p.horizontal?"true":"false"),c.verticalButton.setAttribute("aria-pressed",p.vertical?"true":"false")}u(i.get()),l();const d=new ResizeObserver(()=>l());d.observe(s.container);let h=!1;const f=r?.subscribe(()=>{h||(h=!0,requestAnimationFrame(()=>{h=!1,l()}))});let m=!1;const g=i.subscribe(p=>{u(p),!m&&(m=!0,requestAnimationFrame(()=>{m=!1,l()}))});return{destroy(){g(),f?.(),d.disconnect(),s.container.remove(),c.container.remove()}}}function Zr(t){const e=document.createElement("div");e.className="kalotyp-flip-panel",e.setAttribute("role","group"),e.setAttribute("aria-label","Flip");const n=Rn("Flip horizontal",B("flipHorizontal"),t.onToggleHorizontal);n.classList.add("kalotyp-flip-button-h");const o=Rn("Flip vertical",B("flipVertical"),t.onToggleVertical);return o.classList.add("kalotyp-flip-button-v"),e.appendChild(n),e.appendChild(o),{container:e,horizontalButton:n,verticalButton:o}}function Rn(t,e,n){const o=document.createElement("button");return o.type="button",o.className="kalotyp-toggle-button",o.innerHTML=`${e}<span>${t}</span>`,o.setAttribute("aria-pressed","false"),o.setAttribute("aria-label",t),o.addEventListener("click",n),o}function ta(t){return{id:"flip",init:()=>zo(),mount(e,n,o){const i=Jr({stageHost:e,utilHost:t.panelHost,source:n.source,store:o,viewport:n.viewport,onCommit:()=>n.bus.emit("commit",{utility:"flip"})});return{destroy:()=>i.destroy()}},bake:Bo}}const ea="rgba(0, 0, 0, 0.4)",na="rgba(255, 255, 255, 0.95)",oa="rgba(0, 0, 0, 0.45)";function ia(t){const{stageHost:e,utilHost:n,source:o,store:i,viewport:r}=t,a=t.onCommit??sa,s=yt();e.appendChild(s.container);const c=ra({onCounterClockwise:()=>{i.set(qo(i.get())),a()},onClockwise:()=>{i.set(Wo(i.get())),a()},onAngleInput:p=>i.set(_e(i.get(),p)),onAngleCommit:()=>a(),onAngleReset:()=>{i.set(_e(i.get(),0)),a()}});n.appendChild(c.container);function l(){const p=s.container.getBoundingClientRect();if(p.width<=0||p.height<=0)return;const w=i.get(),y=Yt(w)*Math.PI/180,C=Yt(w)-w.quarterTurns*90,E=Math.abs(C)<1e-6,S=Math.abs(Math.cos(y)),M=Math.abs(Math.sin(y)),H=o.width*S+o.height*M,R=o.width*M+o.height*S,A={width:p.width,height:p.height,padding:In},T={width:H,height:R},$=r?r.computeViewport(A,T):j(A,T),O=$.displayRect,W=O.x+O.width/2,U=O.y+O.height/2,_=E?w.quarterTurns%2===0?{width:o.width,height:o.height}:{width:o.height,height:o.width}:qe(o,y);re(s.canvas,p.width,p.height,D=>{const G=o.width*$.scale,V=o.height*$.scale;D.save(),D.translate(W,U),D.rotate(y),D.drawImage(o.bitmap,-G/2,-V/2,G,V),D.restore();const Y=_.width*$.scale,x=_.height*$.scale,F=W-Y/2,N=U-x/2;E||(D.save(),D.beginPath(),D.rect(0,0,p.width,p.height),D.rect(F,N,Y,x),D.clip("evenodd"),D.fillStyle=ea,D.fillRect(0,0,p.width,p.height),D.restore()),D.save(),D.lineWidth=3,D.strokeStyle=oa,D.strokeRect(F+.5,N+.5,Y-1,x-1),D.lineWidth=1,D.strokeStyle=na,D.strokeRect(F+.5,N+.5,Y-1,x-1),D.restore()})}function u(p){c.angleSlider.valueAsNumber!==p.freeAngle&&(c.angleSlider.valueAsNumber=p.freeAngle);const w=aa(p.freeAngle);c.angleInput.value!==w&&(c.angleInput.value=w)}u(i.get()),l();const d=new ResizeObserver(()=>l());d.observe(s.container);let h=!1;const f=r?.subscribe(()=>{h||(h=!0,requestAnimationFrame(()=>{h=!1,l()}))});let m=!1;const g=i.subscribe(p=>{u(p),!m&&(m=!0,requestAnimationFrame(()=>{m=!1,l()}))});return{destroy(){g(),f?.(),d.disconnect(),s.container.remove(),c.container.remove()}}}function ra(t){const e=document.createElement("div");e.className="kalotyp-rotate-panel",e.setAttribute("role","group"),e.setAttribute("aria-label","Rotate");const n=Nn("Rotate 90° counter-clockwise","↺",t.onCounterClockwise),o=Nn("Rotate 90° clockwise","↻",t.onClockwise),i=document.createElement("label");i.className="kalotyp-rotate-slider-label",i.textContent="Straighten";const r=document.createElement("input");r.type="range",r.className="kalotyp-rotate-slider",r.min=String(Ut),r.max=String(Xt),r.step=String(Be),r.value="0",r.setAttribute("aria-label","Straighten angle"),r.addEventListener("input",()=>t.onAngleInput(r.valueAsNumber)),r.addEventListener("change",()=>t.onAngleCommit());const a=document.createElement("input");a.type="number",a.className="kalotyp-rotate-input",a.min=String(Ut),a.max=String(Xt),a.step=String(Be),a.value="0",a.setAttribute("aria-label","Straighten angle in degrees"),a.addEventListener("change",()=>{const h=a.valueAsNumber;Number.isFinite(h)&&(t.onAngleInput(h),t.onAngleCommit())});const s=document.createElement("span");s.className="kalotyp-rotate-suffix",s.setAttribute("aria-hidden","true"),s.textContent="°";const c=document.createElement("button");c.type="button",c.className="kalotyp-rotate-reset",c.textContent="Reset",c.addEventListener("click",t.onAngleReset);const l=document.createElement("div");l.className="kalotyp-rotate-row",l.appendChild(n),l.appendChild(o);const u=document.createElement("span");u.className="kalotyp-rotate-input-group",u.appendChild(a),u.appendChild(s);const d=document.createElement("div");return d.className="kalotyp-rotate-row kalotyp-rotate-slider-row",d.appendChild(i),d.appendChild(r),d.appendChild(u),d.appendChild(c),e.appendChild(l),e.appendChild(d),{container:e,angleSlider:r,angleInput:a}}function aa(t){const e=Math.round(t*10)/10;return Number.isInteger(e)?String(e):e.toFixed(1)}function sa(){}function Nn(t,e,n){const o=document.createElement("button");return o.type="button",o.className="kalotyp-quarter-button",o.setAttribute("aria-label",t),o.title=t,o.textContent=e,o.addEventListener("click",n),o}function ca(t){return{id:"rotate",init:()=>_o(),mount(e,n,o){const i=ia({stageHost:e,utilHost:t.panelHost,source:n.source,store:o,viewport:n.viewport,onCommit:()=>n.bus.emit("commit",{utility:"rotate"})});return{destroy:()=>i.destroy()}},bake:Xo}}function la(t){const{stageHost:e,utilHost:n,source:o,store:i,viewport:r}=t,a=t.onCommit??(()=>{}),s=yt();e.appendChild(s.container);const c={width:o.width,height:o.height},l=ua({upstream:c,onWidthChange:p=>{i.set(Go(i.get(),p,c)),a()},onHeightChange:p=>{i.set(Ko(i.get(),p,c)),a()},onPercentChange:p=>{i.set(Vo(i.get(),p)),a()},onLockChange:p=>{i.set(jo(i.get(),p)),a()}});n.appendChild(l.container);function u(){const p=Ht(s.container,c,r);p&&re(s.canvas,p.stageWidth,p.stageHeight,w=>{const y=p.viewport.displayRect;w.drawImage(o.bitmap,y.x,y.y,y.width,y.height)})}function d(p){const w=Ye(p,c);l.widthInput.valueAsNumber!==w.width&&(l.widthInput.value=String(w.width)),l.heightInput.valueAsNumber!==w.height&&(l.heightInput.value=String(w.height));const y=(p.scaleX+p.scaleY)/2,C=Math.round(y*1e3)/10;Number.parseFloat(l.percentInput.value||"0")!==C&&(l.percentInput.value=String(C)),l.lockButton.setAttribute("aria-pressed",p.lockAspect?"true":"false"),l.lockButton.setAttribute("aria-label",p.lockAspect?"Aspect ratio locked — click to unlock":"Aspect ratio unlocked — click to lock"),l.lockButton.title=p.lockAspect?"Aspect ratio locked":"Aspect ratio unlocked",l.lockButton.innerHTML=Ln(p.lockAspect),l.summary.textContent=`${w.width} × ${w.height}px (from ${c.width} × ${c.height}px)`}d(i.get()),u();const h=new ResizeObserver(()=>u());h.observe(s.container);let f=!1;const m=r?.subscribe(()=>{f||(f=!0,requestAnimationFrame(()=>{f=!1,u()}))}),g=i.subscribe(p=>{d(p)});return{destroy(){g(),m?.(),h.disconnect(),s.container.remove(),l.container.remove()}}}function ua(t){const e=document.createElement("div");e.className="kalotyp-resize-panel",e.setAttribute("role","group"),e.setAttribute("aria-label","Resize");const n=ae({label:"Width (px)",min:Et,max:ht,step:1,value:t.upstream.width,onChange:t.onWidthChange}),o=ae({label:"Height (px)",min:Et,max:ht,step:1,value:t.upstream.height,onChange:t.onHeightChange}),i=ae({label:"Scale (%)",min:1,max:1e3,step:.1,value:100,onChange:t.onPercentChange}),r=document.createElement("button");r.type="button",r.className="kalotyp-resize-lock",r.setAttribute("aria-pressed","true"),r.setAttribute("aria-label","Lock aspect ratio"),r.title="Lock aspect ratio",r.innerHTML=Ln(!0),r.addEventListener("click",()=>{const l=r.getAttribute("aria-pressed")!=="true";t.onLockChange(l)});const a=document.createElement("span");a.className="kalotyp-resize-summary",a.setAttribute("aria-live","polite"),a.textContent=`${t.upstream.width} × ${t.upstream.height}px`,e.title=`Maximum ${ht}px on either axis`;const s=document.createElement("div");s.className="kalotyp-resize-row kalotyp-resize-dims",s.appendChild(n.wrapper),s.appendChild(r),s.appendChild(o.wrapper);const c=document.createElement("div");return c.className="kalotyp-resize-row",c.appendChild(i.wrapper),c.appendChild(a),e.appendChild(s),e.appendChild(c),{container:e,widthInput:n.input,heightInput:o.input,percentInput:i.input,lockButton:r,summary:a}}function ae(t){const e=document.createElement("label");e.className="kalotyp-resize-field";const n=document.createElement("span");n.className="kalotyp-resize-field-label",n.textContent=t.label;const o=document.createElement("input");return o.type="number",o.className="kalotyp-resize-input",o.min=String(t.min),o.max=String(t.max),o.step=String(t.step),o.value=String(t.value),o.inputMode="numeric",o.setAttribute("aria-label",t.label),o.addEventListener("change",()=>{const i=o.valueAsNumber;Number.isFinite(i)&&t.onChange(i)}),e.appendChild(n),e.appendChild(o),{wrapper:e,input:o}}function Ln(t){return B(t?"lockClosed":"lockOpen")}function da(t){return{id:"resize",init:()=>Yo(),mount(e,n,o){const i=la({stageHost:e,utilHost:t.panelHost,source:n.source,store:o,viewport:n.viewport,onCommit:()=>n.bus.emit("commit",{utility:"resize"})});return{destroy:()=>i.destroy()}},bake:Jo}}function Tn(t){const{canvas:e,sourceBitmap:n}=t;let o;function i(s,c){if(s<=0||c<=0)return;const l=Fn(e);if(!l)return;e.width=s,e.height=c,l.imageSmoothingEnabled=!0,l.imageSmoothingQuality="high",l.clearRect(0,0,s,c),l.drawImage(n,0,0,s,c);const u=l.getImageData(0,0,s,c);o={baseline:new Uint8ClampedArray(u.data),scratch:u.data,blurred:void 0,width:s,height:c}}function r(s){if(!o)return;const c=Fn(e);if(!c)return;if(Gt(s)){const d=new ImageData(new Uint8ClampedArray(o.baseline),o.width,o.height);c.putImageData(d,0,0);return}const l=je(s);if(Qe(o.baseline,o.scratch,l,s),s.clarity!==0){if(!o.blurred){const d=new Uint8ClampedArray(o.baseline.length),h=new Uint8ClampedArray(o.baseline.length);Ze(o.baseline,d,h,o.width,o.height),o.blurred=h}Je(o.scratch,o.blurred,s.clarity)}const u=new ImageData(o.scratch,o.width,o.height);c.putImageData(u,0,0)}function a(){o=void 0}return{paint:r,rebuild:i,dispose:a}}function Fn(t){return t.getContext("2d",{willReadFrequently:!0})}function ha(t){const{stageHost:e,utilHost:n,source:o,store:i,viewport:r}=t,a=t.onCommit??fa,s=yt();e.appendChild(s.container);const c=Tn({canvas:s.canvas,sourceBitmap:o.bitmap}),l=pa({onSliderInput:(y,C)=>i.set(Ve(i.get(),y,C)),onSliderCommit:()=>a(),onNumberCommit:(y,C)=>{i.set(Ve(i.get(),y,C)),a()},onRowReset:y=>{i.set(ei(i.get(),y)),a()},onResetAll:()=>{i.update(()=>ni()),a()}});n.appendChild(l.container);let u={width:0,height:0};function d(){const y=Ht(s.container,{width:o.width,height:o.height},r);if(!y)return;const C=y.viewport.displayRect,E=Math.max(1,window.devicePixelRatio||1),S=Math.max(1,Math.round(C.width*E)),M=Math.max(1,Math.round(C.height*E));s.canvas.style.width=`${C.width}px`,s.canvas.style.height=`${C.height}px`,s.canvas.style.position="absolute",s.canvas.style.left=`${C.x}px`,s.canvas.style.top=`${C.y}px`,!(r?.getPinching()??!1)&&(u.width!==S||u.height!==M)&&(u={width:S,height:M},c.rebuild(S,M)),c.paint(i.get())}function h(y){for(const C of Ke){const E=l.rows.get(C.key);if(!E)continue;const S=y[C.key];E.slider.valueAsNumber!==S&&(E.slider.valueAsNumber=S),Number.parseFloat(E.input.value||"0")!==S&&(E.input.value=String(S))}}h(i.get()),d();const f=new ResizeObserver(()=>d());f.observe(s.container);let m=!1;const g=r?.subscribe(()=>{m||(m=!0,requestAnimationFrame(()=>{m=!1,d()}))});let p=!1;const w=i.subscribe(y=>{h(y),!p&&(p=!0,requestAnimationFrame(()=>{p=!1,c.paint(i.get())}))});return{destroy(){w(),g?.(),f.disconnect(),c.dispose(),s.container.remove(),l.container.remove()}}}function pa(t){const e=document.createElement("div");e.className="kalotyp-finetune-panel",e.setAttribute("role","group"),e.setAttribute("aria-label","Finetune adjustments");const n=new Map;for(const i of Ke){const r=ma(i.key,i.label,t);n.set(i.key,r),e.appendChild(r.row)}const o=document.createElement("button");return o.type="button",o.className="kalotyp-finetune-reset-all",o.textContent="Reset all",o.title="Reset every adjustment to 0",o.addEventListener("click",t.onResetAll),e.appendChild(o),{container:e,rows:n,resetAllButton:o}}function ma(t,e,n){const o=document.createElement("div");o.className="kalotyp-finetune-row",o.dataset.adjustment=t;const i=document.createElement("label");i.className="kalotyp-finetune-label",i.textContent=e;const r=document.createElement("input");r.type="range",r.className="kalotyp-finetune-slider",r.min=String(Mt),r.max=String(It),r.step=String(Rt),r.value="0",r.setAttribute("aria-label",`${e} adjustment`),r.addEventListener("input",()=>n.onSliderInput(t,r.valueAsNumber)),r.addEventListener("change",()=>n.onSliderCommit());const a=document.createElement("input");a.type="number",a.className="kalotyp-finetune-input",a.min=String(Mt),a.max=String(It),a.step=String(Rt),a.value="0",a.inputMode="numeric",a.setAttribute("aria-label",`${e} value`),a.addEventListener("change",()=>{const c=a.valueAsNumber;Number.isFinite(c)&&n.onNumberCommit(t,c)});const s=document.createElement("button");return s.type="button",s.className="kalotyp-finetune-row-reset",s.setAttribute("aria-label",`Reset ${e}`),s.title=`Reset ${e}`,s.textContent="↺",s.addEventListener("click",()=>n.onRowReset(t)),o.appendChild(i),o.appendChild(r),o.appendChild(a),o.appendChild(s),{row:o,slider:r,input:a,resetButton:s}}function fa(){}function ga(t){return{id:"finetune",init:()=>ti(),mount(e,n,o){const i=ha({stageHost:e,utilHost:t.panelHost,source:n.source,store:o,viewport:n.viewport,onCommit:()=>n.bus.emit("commit",{utility:"finetune"})});return{destroy:()=>i.destroy()}},bake:ri}}const Pn=80,$n=60;function ya(t){if(t.width<=0||t.height<=0)return{width:Pn,height:$n};const e=Pn/t.width,n=$n/t.height,o=Math.min(e,n),i=Math.max(1,Math.floor(t.width*o)),r=Math.max(1,Math.floor(t.height*o));return{width:i,height:r}}function ba(t){const{source:e,dims:n,dpr:o}=t,i=Math.max(1,Math.round(n.width*o)),r=Math.max(1,Math.round(n.height*o)),a=document.createElement("canvas");a.width=i,a.height=r;const s=a.getContext("2d",{willReadFrequently:!0});if(!s)return{get:()=>wa(n,o),dispose:()=>{}};s.imageSmoothingEnabled=!0,s.imageSmoothingQuality="high",s.drawImage(e,0,0,i,r);const c=s.getImageData(0,0,i,r),l={data:new Uint8ClampedArray(c.data),width:i,height:r},u=new Map;function d(h){const f=document.createElement("canvas");f.width=i,f.height=r,f.style.width=`${n.width}px`,f.style.height=`${n.height}px`;const m=f.getContext("2d");if(!m)return f;const g={data:new Uint8ClampedArray(l.data.length),width:i,height:r};return Kt(h.state,l,g),m.putImageData(new ImageData(g.data,i,r),0,0),f}return{get(h){const f=u.get(h.id);if(f)return f;const m=d(h);return u.set(h.id,m),m},dispose(){u.clear()}}}function wa(t,e){const n=document.createElement("canvas");return n.width=Math.max(1,Math.round(t.width*e)),n.height=Math.max(1,Math.round(t.height*e)),n.style.width=`${t.width}px`,n.style.height=`${t.height}px`,n}function Ca(t){const{stageHost:e,utilHost:n,source:o,store:i,viewport:r}=t,a=t.onCommit??va,s=yt();e.appendChild(s.container);const c=Tn({canvas:s.canvas,sourceBitmap:o.bitmap}),l=ya({width:o.width,height:o.height}),u=Math.max(1,window.devicePixelRatio||1),d=ba({source:o.bitmap,dims:l,dpr:u}),h=xa({presets:Vt,thumbnailCache:d,dims:l,onPresetClick:S=>{const M=i.get();if(jt(M)?.id===S.id&&S.id!=="none"){i.update(()=>pt),a();return}i.update(()=>S.state),a()}});n.appendChild(h.container);let f={width:0,height:0};function m(){const S=Ht(s.container,{width:o.width,height:o.height},r);if(!S)return;const M=S.viewport.displayRect,H=Math.max(1,Math.round(M.width*u)),R=Math.max(1,Math.round(M.height*u));s.canvas.style.width=`${M.width}px`,s.canvas.style.height=`${M.height}px`,s.canvas.style.position="absolute",s.canvas.style.left=`${M.x}px`,s.canvas.style.top=`${M.y}px`,!(r?.getPinching()??!1)&&(f.width!==H||f.height!==R)&&(f={width:H,height:R},c.rebuild(H,R)),c.paint(i.get())}function g(S){const M=jt(S)?.id;h.setActive(M)}g(i.get()),m();const p=new ResizeObserver(()=>m());p.observe(s.container);let w=!1;const y=r?.subscribe(()=>{w||(w=!0,requestAnimationFrame(()=>{w=!1,m()}))});let C=!1;const E=i.subscribe(S=>{g(S),!C&&(C=!0,requestAnimationFrame(()=>{C=!1,c.paint(i.get())}))});return{destroy(){E(),y?.(),p.disconnect(),c.dispose(),d.dispose(),s.container.remove(),h.container.remove()}}}function xa(t){const e=document.createElement("div");e.className="kalotyp-filter-panel",e.setAttribute("role","radiogroup"),e.setAttribute("aria-label","Filter presets");const n=document.createElement("div");n.className="kalotyp-filter-strip",e.appendChild(n);const o=new Map;for(const i of t.presets){const r=document.createElement("button");r.type="button",r.className="kalotyp-filter-thumb",r.dataset.presetId=i.id,r.setAttribute("role","radio"),r.setAttribute("aria-checked","false"),r.setAttribute("aria-label",`${i.label} filter`),r.title=i.label;const a=document.createElement("span");a.className="kalotyp-filter-thumb-image",a.style.width=`${t.dims.width}px`,a.style.height=`${t.dims.height}px`;const s=t.thumbnailCache.get(i);s.classList.add("kalotyp-filter-thumb-canvas"),a.appendChild(s);const c=document.createElement("span");c.className="kalotyp-filter-thumb-check",c.setAttribute("aria-hidden","true"),c.innerHTML="✓",a.appendChild(c);const l=document.createElement("span");l.className="kalotyp-filter-thumb-label",l.textContent=i.label,r.appendChild(a),r.appendChild(l),r.addEventListener("click",()=>t.onPresetClick(i)),n.appendChild(r),o.set(i.id,r)}return{container:e,setActive(i){for(const[r,a]of o){const s=r===i;a.setAttribute("aria-checked",s?"true":"false"),a.classList.toggle("kalotyp-filter-thumb--active",s)}}}}function va(){}function ka(t){return{id:"filter",init:()=>pt,mount(e,n,o){const i=Ca({stageHost:e,utilHost:t.panelHost,source:n.source,store:o,viewport:n.viewport,onCommit:()=>n.bus.emit("commit",{utility:"filter"})});return{destroy:()=>i.destroy()}},bake:Sa}}async function Sa(t,e){return e}const Ea=[{id:"x",label:"Left"},{id:"y",label:"Top"},{id:"width",label:"Width",min:1},{id:"height",label:"Height",min:1}],Aa=[{id:"x1",label:"Start X"},{id:"y1",label:"Start Y"},{id:"x2",label:"End X"},{id:"y2",label:"End Y"}],Ma=[{id:"x",label:"X"},{id:"y",label:"Y"}];function Ia(t){const e=document.createElement("div");e.className="kalotyp-annotate-coords",e.setAttribute("role","group"),e.setAttribute("aria-label","Selected annotation position"),e.hidden=!0;let n=null,o=null;const i=new Map;function r(l){e.replaceChildren(),i.clear();const u=Ra(l);for(const d of u){const h=document.createElement("label");h.className="kalotyp-annotate-coords-field";const f=document.createElement("span");f.className="kalotyp-annotate-coords-label",f.textContent=d.label;const m=document.createElement("input");m.type="number",m.className="kalotyp-annotate-coords-input",m.dataset.field=d.id,m.step="1",m.inputMode="numeric",d.min!==void 0&&(m.min=String(d.min)),d.max!==void 0&&(m.max=String(d.max)),m.setAttribute("aria-label",`${d.label} (pixels)`),m.addEventListener("change",s),h.appendChild(f),h.appendChild(m),e.appendChild(h),i.set(d.id,m)}o=l}function a(l){const u=(d,h)=>{const f=i.get(d);if(!f)return;const m=String(Math.round(h));document.activeElement!==f&&f.value!==m&&(f.value=m)};switch(l.kind){case"rect":case"ellipse":{u("x",l.x),u("y",l.y),u("width",l.width),u("height",l.height);return}case"arrow":{u("x1",l.x1),u("y1",l.y1),u("x2",l.x2),u("y2",l.y2);return}case"text":{u("x",l.x),u("y",l.y);return}default:return}}function s(){if(!n||!o)return;const l=c(n);if(!l)return;const u=Na(n,l);u!==n&&(n=u,t.onShapeChanged(u))}function c(l){const u=d=>{const h=i.get(d);return h?h.valueAsNumber:Number.NaN};switch(l.kind){case"rect":case"ellipse":{const d=Math.round(u("x")),h=Math.round(u("y")),f=Math.round(u("width")),m=Math.round(u("height"));return[d,h,f,m].every(Number.isFinite)?{kind:l.kind,x:d,y:h,width:f,height:m}:null}case"arrow":{const d=Math.round(u("x1")),h=Math.round(u("y1")),f=Math.round(u("x2")),m=Math.round(u("y2"));return[d,h,f,m].every(Number.isFinite)?{kind:"arrow",x1:d,y1:h,x2:f,y2:m}:null}case"text":{const d=Math.round(u("x")),h=Math.round(u("y"));return[d,h].every(Number.isFinite)?{kind:"text",x:d,y:h}:null}default:return null}}return{container:e,updateForShape(l){if(!l){n=null,o=null,e.hidden=!0,e.replaceChildren(),i.clear();return}if(l.kind==="freehand"||l.kind==="highlight"){n=l,o=null,e.hidden=!0,e.replaceChildren(),i.clear();return}n=l,o!==l.kind&&r(l.kind),a(l),e.hidden=!1},destroy(){e.replaceChildren(),i.clear(),e.remove()}}}function Ra(t){switch(t){case"rect":case"ellipse":return Ea;case"arrow":return Aa;case"text":return Ma}}function Na(t,e){switch(t.kind){case"rect":return e.kind!=="rect"?t:{...t,x:e.x,y:e.y,width:e.width,height:e.height};case"ellipse":return e.kind!=="ellipse"?t:{...t,x:e.x,y:e.y,width:e.width,height:e.height};case"arrow":return e.kind!=="arrow"?t:{...t,x1:e.x1,y1:e.y1,x2:e.x2,y2:e.y2};case"text":return e.kind!=="text"?t:{...t,x:e.x,y:e.y};default:return t}}const La=[{id:"select",label:"Select",icon:B("select",{fill:"currentColor","stroke-width":1})},{id:"text",label:"Text",icon:B("text")},{id:"rect",label:"Rectangle",icon:B("rect")},{id:"ellipse",label:"Ellipse",icon:B("ellipse")},{id:"arrow",label:"Arrow",icon:B("arrow")},{id:"freehand",label:"Freehand",icon:B("freehand")},{id:"highlight",label:"Highlight",icon:B("highlight")}],Ta=["#ff3b30","#ffcc00","#34c759","#007aff","#ffffff","#000000"];function Fa(t){const e=document.createElement("div");e.className="kalotyp-annotate-panel",e.setAttribute("role","group"),e.setAttribute("aria-label","Annotate");const n=document.createElement("div");n.className="kalotyp-annotate-toolbar",n.setAttribute("role","toolbar"),n.setAttribute("aria-label","Annotation tools");const o=new Map;for(const p of La){const w=document.createElement("button");w.type="button",w.className="kalotyp-annotate-tool",w.dataset.tool=p.id,w.setAttribute("aria-label",p.label),w.title=p.label,w.setAttribute("aria-pressed",p.id===t.initialTool?"true":"false"),w.innerHTML=p.icon,w.addEventListener("click",()=>t.onSelectTool(p.id)),n.appendChild(w),o.set(p.id,w)}const i=document.createElement("div");i.className="kalotyp-annotate-style-row";const r=[],a=document.createElement("div");a.className="kalotyp-annotate-swatches",a.setAttribute("role","radiogroup"),a.setAttribute("aria-label","Color");for(const p of Ta){const w=document.createElement("button");w.type="button",w.className="kalotyp-annotate-swatch",w.setAttribute("role","radio"),w.setAttribute("aria-label",`Use color ${p}`),w.dataset.color=p,w.style.setProperty("--kalotyp-swatch",p),w.addEventListener("click",()=>t.onColorChange(p)),a.appendChild(w),r.push(w)}let s=Hn(t.initialStyle.color);const c=document.createElement("input");c.type="text",c.className="kalotyp-annotate-hex",c.value=s,c.maxLength=7,c.spellcheck=!1,c.autocomplete="off",c.setAttribute("aria-label","Color hex code"),c.setAttribute("placeholder","#000000"),c.style.setProperty("--kalotyp-hex-swatch",s),c.addEventListener("change",()=>{const p=c.value.trim(),w=Pa(p);w?(c.value=w,s=w,c.style.setProperty("--kalotyp-hex-swatch",w),t.onColorChange(w)):c.value=s});const l=document.createElement("label");l.className="kalotyp-annotate-stroke-label",l.textContent="Width";const u=document.createElement("input");u.type="range",u.className="kalotyp-annotate-stroke",u.min="1",u.max="40",u.step="1",u.value=String(t.initialStyle.strokeWidth),u.setAttribute("aria-label","Stroke width"),u.addEventListener("change",()=>t.onStrokeWidthChange(u.valueAsNumber));const d=document.createElement("button");d.type="button",d.className="kalotyp-annotate-delete",d.innerHTML=`${B("delete")}<span>Delete</span>`,d.setAttribute("aria-label","Delete selected annotation"),d.title="Delete (Del)",d.disabled=!t.canDelete,d.addEventListener("click",()=>t.onDeleteSelected());const h=document.createElement("button");h.type="button",h.className="kalotyp-annotate-insert",h.innerHTML=`${B("plus")}<span>Insert at centre</span>`,h.setAttribute("aria-label","Insert annotation at image centre"),h.title="Insert at centre",h.disabled=!Dn(t.initialTool),h.addEventListener("click",()=>t.onInsertAtCenter()),i.appendChild(a),i.appendChild(c),i.appendChild(l),i.appendChild(u),i.appendChild(h),i.appendChild(d),e.appendChild(n),e.appendChild(i),e.appendChild(t.coordInputs);function f(p){for(const[w,y]of o)y.setAttribute("aria-pressed",w===p?"true":"false");h.disabled=!Dn(p)}function m(p){const w=Hn(p.color);c.value.toLowerCase()!==w.toLowerCase()&&(c.value=w),s=w,c.style.setProperty("--kalotyp-hex-swatch",w),u.valueAsNumber!==p.strokeWidth&&(u.value=String(p.strokeWidth));for(const y of r){const C=y.dataset.color?.toLowerCase()===p.color.toLowerCase();y.setAttribute("aria-checked",C?"true":"false")}}function g(p){d.disabled=!p}return m(t.initialStyle),{container:e,toolButtons:o,hexInput:c,colorSwatches:r,strokeRange:u,deleteButton:d,insertButton:h,setActiveTool:f,setStyle:m,setCanDelete:g}}function Dn(t){return t==="select"?!1:rn(t)}function Hn(t){if(/^#[0-9a-fA-F]{6}$/.test(t))return t;if(/^#[0-9a-fA-F]{3}$/.test(t)){const e=t[1],n=t[2],o=t[3];return`#${e}${e}${n}${n}${o}${o}`}return"#000000"}function Pa(t){const e=t.startsWith("#")?t.slice(1):t;if(/^[0-9a-fA-F]{6}$/.test(e))return`#${e.toLowerCase()}`;if(/^[0-9a-fA-F]{3}$/.test(e)){const n=e[0],o=e[1],i=e[2];return`#${n}${n}${o}${o}${i}${i}`.toLowerCase()}return null}function Ot(t,e){const n=o=>{if(o.button!==0)return;const i=e(o);if(!i)return;o.preventDefault(),o.stopPropagation();try{t.setPointerCapture(o.pointerId)}catch{}let r,a=!1,s=o.shiftKey;const c=()=>{if(a=!1,!r)return;const g=r;r=void 0,i.onMove(g)},l=g=>{r=g,a||(a=!0,requestAnimationFrame(c))},u=g=>{g.pointerId===o.pointerId&&(s=g.shiftKey,l({clientX:g.clientX,clientY:g.clientY,shiftKey:g.shiftKey}))},d=g=>{if(g.key!=="Shift"||g.shiftKey===s)return;s=g.shiftKey;const p=r,w=p?.clientX??o.clientX,y=p?.clientY??o.clientY;l({clientX:w,clientY:y,shiftKey:g.shiftKey})},h=g=>{t.removeEventListener("pointermove",u),t.removeEventListener("pointerup",f),t.removeEventListener("pointercancel",m),window.removeEventListener("keydown",d),window.removeEventListener("keyup",d);try{t.releasePointerCapture(o.pointerId)}catch{}if(r){const p=r;r=void 0,i.onMove(p)}g?i.onCommit():i.onCancel()},f=g=>{g.pointerId===o.pointerId&&h(!0)},m=g=>{g.pointerId===o.pointerId&&h(!1)};t.addEventListener("pointermove",u),t.addEventListener("pointerup",f),t.addEventListener("pointercancel",m),window.addEventListener("keydown",d),window.addEventListener("keyup",d)};return t.addEventListener("pointerdown",n),()=>t.removeEventListener("pointerdown",n)}function On(t,e,n){const o=t.getBoundingClientRect();return{x:e-o.left,y:n-o.top}}function zt(t,e,n){const o=Math.max(1,window.devicePixelRatio||1),i=Math.max(1,Math.round(e*o)),r=Math.max(1,Math.round(n*o));t.width!==i&&(t.width=i),t.height!==r&&(t.height=r),t.style.width=`${e}px`,t.style.height=`${n}px`;const a=t.getContext("2d");return a?(a.setTransform(o,0,0,o,0,0),a.clearRect(0,0,e,n),a):null}function $a(t,e,n,o,i){const r=zt(t,n,o);r&&(r.imageSmoothingEnabled=!0,r.imageSmoothingQuality="high",r.drawImage(e.bitmap,i.displayRect.x,i.displayRect.y,i.displayRect.width,i.displayRect.height))}function zn(t,e,n,o,i){const r=zt(t,n,o);if(r&&e.length!==0){r.save(),r.translate(i.displayRect.x,i.displayRect.y),r.scale(i.scale,i.scale);for(const a of e)te(r,a);r.restore()}}function Bn(t,e,n,o,i){const r=zt(t,n,o);r&&e!==null&&(r.save(),r.translate(i.displayRect.x,i.displayRect.y),r.scale(i.scale,i.scale),te(r,e),r.restore())}function Da(t,e,n,o,i){const r=zt(t,n,o);if(!r||!e)return;const a=i.displayRect.x+e.x*i.scale,s=i.displayRect.y+e.y*i.scale;let c=e.width*i.scale,l=e.height*i.scale,u=a,d=s;c<0&&(u=a+c,c=-c),l<0&&(d=s+l,l=-l),r.save(),r.fillStyle="rgba(99, 102, 241, 0.12)",r.fillRect(u,d,c,l),r.strokeStyle="rgba(99, 102, 241, 0.95)",r.lineWidth=1,r.setLineDash([4,3]),r.strokeRect(u+.5,d+.5,c-1,l-1),r.restore()}function Ha(t){const{host:e,toolContext:n}=t,o=new Map,i=[];for(const s of Tt){const c=document.createElement("button");c.type="button",c.className="kalotyp-annotate-handle",c.dataset.direction=s,c.setAttribute("aria-label",Ba(s)),c.tabIndex=-1,c.style.display="none",o.set(s,c),e.appendChild(c),i.push(Ot(c,l=>Oa(n,s)))}function r(s,c){if(!s){_n(o);return}if(s.kind==="arrow"){_n(o);const d=o.get("tl"),h=o.get("br");d&&ce(d,se({x:s.x1,y:s.y1},c)),h&&ce(h,se({x:s.x2,y:s.y2},c));return}const l=ft(s),u=mi(l);for(const d of Tt){const h=o.get(d);h&&ce(h,se(u[d],c))}}function a(){for(const s of i)s();for(const[,s]of o)s.remove();o.clear()}return{update:r,destroy:a}}function se(t,e){return{x:e.displayRect.x+t.x*e.scale,y:e.displayRect.y+t.y*e.scale}}function ce(t,e){t.style.display="",t.style.left=`${e.x}px`,t.style.top=`${e.y}px`}function _n(t){for(const[,e]of t)e.style.display="none"}function Oa(t,e,n){const o=t.store.get(),i=o.shapes.find(a=>a.id===o.selectedId);if(!i)return null;const r=i;return{onMove(a){const s=t.toImageSpace(a),c=za(r,e,s);c&&t.store.update(l=>nt(l,c))},onCommit(){t.commit()},onCancel(){t.store.update(a=>nt(a,r))}}}function za(t,e,n){switch(t.kind){case"rect":case"ellipse":{const o={x:t.x,y:t.y,width:t.width,height:t.height},i=Jt(o,e,n);return{...t,x:i.x,y:i.y,width:i.width,height:i.height}}case"arrow":{const o=t;return e==="tl"?{...o,x1:n.x,y1:n.y}:e==="br"?{...o,x2:n.x,y2:n.y}:t}case"text":{if(e!=="br")return t;const o=n.x-t.x,i=n.y-t.y,r=Math.max(8,Math.round(Math.max(o,i)*.6));return{...t,fontSize:r}}case"freehand":case"highlight":{const o=ft(t);if(o.width===0||o.height===0)return t;const i=Jt(o,e,n),r=i.width/o.width,a=i.height/o.height;if(!Number.isFinite(r)||!Number.isFinite(a))return t;const s=t.points.map(c=>({x:i.x+(c.x-o.x)*r,y:i.y+(c.y-o.y)*a}));return{...t,points:s}}}}function Ba(t){switch(t){case"tl":return"Resize from top-left";case"tr":return"Resize from top-right";case"bl":return"Resize from bottom-left";case"br":return"Resize from bottom-right";case"t":return"Resize from top";case"r":return"Resize from right";case"b":return"Resize from bottom";case"l":return"Resize from left"}}function Z(t){return t.selectedId===null?null:t.shapes.find(e=>e.id===t.selectedId)??null}function _a(){const t=document.createElement("div");t.className="kalotyp-annotate-stage";const e=document.createElement("canvas");e.className="kalotyp-annotate-image",e.setAttribute("aria-hidden","true");const n=document.createElement("canvas");n.className="kalotyp-annotate-shapes",n.setAttribute("aria-hidden","true");const o=document.createElement("canvas");o.className="kalotyp-annotate-live",o.setAttribute("aria-hidden","true");const i=document.createElement("div");i.className="kalotyp-annotate-hit",i.setAttribute("role","presentation");const r=document.createElement("div");r.className="kalotyp-annotate-handles",r.setAttribute("role","group"),r.setAttribute("aria-label","Selected annotation");const a=document.createElement("div");return a.className="kalotyp-annotate-text-overlay",t.appendChild(e),t.appendChild(n),t.appendChild(o),t.appendChild(i),t.appendChild(r),t.appendChild(a),{container:t,imageCanvas:e,shapesCanvas:n,liveCanvas:o,hitArea:i,handlesLayer:r,textOverlay:a}}function Wa(t){const e=document.createElement("div");e.className="kalotyp-annotate-text-editor",e.setAttribute("contenteditable","true"),e.setAttribute("role","textbox"),e.setAttribute("aria-label","Annotation text"),e.spellcheck=!1,e.style.display="none",t.host.appendChild(e);let n=null;const o=()=>{t.onInput(e.innerText)},i=a=>{if(a.key==="Enter"&&!a.shiftKey){a.preventDefault(),a.stopPropagation(),t.onCommit();return}a.key==="Escape"&&(a.preventDefault(),a.stopPropagation(),t.onCancel())},r=a=>{n!==null&&(e.contains(a.target)||t.onCommit())};return e.addEventListener("input",o),e.addEventListener("keydown",i),document.addEventListener("pointerdown",r,!0),{open(a,s,c){n=a;const l=s.displayRect.x+a.x*s.scale,u=s.displayRect.y+a.y*s.scale;e.style.display="",e.style.left=`${l}px`,e.style.top=`${u}px`,e.style.color=a.color,e.style.font=`${a.fontSize*s.scale}px ${ln}`,e.style.textAlign=a.textAlign,e.style.transformOrigin=qa(a.textAlign);const d=Math.max(100,s.displayRect.x+s.displayRect.width-l-8);e.style.maxWidth=`${d}px`,e.innerText=a.text,requestAnimationFrame(()=>{e.focus();const h=document.createRange();h.selectNodeContents(e),h.collapse(!1);const f=window.getSelection();f?.removeAllRanges(),f?.addRange(h)})},close(){n=null,e.style.display="none",e.blur()},destroy(){e.removeEventListener("input",o),e.removeEventListener("keydown",i),document.removeEventListener("pointerdown",r,!0),e.remove()}}}function qa(t){switch(t){case"left":return"top left";case"center":return"top center";case"right":return"top right"}}function Wn(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.max(Math.abs(n),Math.abs(o)),r=n===0?1:Math.sign(n),a=o===0?1:Math.sign(o);return{x:t.x+r*i,y:t.y+a*i}}function Ua(t,e){const n=e.x-t.x,o=e.y-t.y,i=Math.sqrt(n*n+o*o);if(i===0)return t;const r=Math.atan2(o,n),a=Math.round(r/(Math.PI/4))*(Math.PI/4);return{x:t.x+Math.cos(a)*i,y:t.y+Math.sin(a)*i}}function Xa(t,e){const n=e.x-t.x,o=e.y-t.y;return Math.abs(n)>=Math.abs(o)?{x:e.x,y:t.y}:{x:t.x,y:e.y}}function Ya(t,e){const n=t.toImageSpace(e),o=t.store.get(),{id:i,nextShapeNumber:r}=at(o);let a=n;return{onMove(s){const c=t.toImageSpace(s);a=s.shiftKey?Wn(n,c):c;const l={id:i,kind:"rect",x:n.x,y:n.y,width:a.x-n.x,height:a.y-n.y,strokeColor:o.currentStyle.color,strokeWidth:o.currentStyle.strokeWidth,fillColor:o.currentStyle.fillColor};t.setLiveShape(l)},onCommit(){const s=nn({x:n.x,y:n.y,width:a.x-n.x,height:a.y-n.y});if(t.setLiveShape(null),s.width<2||s.height<2)return;const c={id:i,kind:"rect",...s,strokeColor:o.currentStyle.color,strokeWidth:o.currentStyle.strokeWidth,fillColor:o.currentStyle.fillColor};t.store.update(l=>({...st(l,c),nextShapeNumber:r})),t.commit()},onCancel(){t.setLiveShape(null)}}}function Ga(t,e){const n=t.toImageSpace(e),o=t.store.get(),{id:i,nextShapeNumber:r}=at(o);let a=n;return{onMove(s){const c=t.toImageSpace(s);a=s.shiftKey?Wn(n,c):c;const l={id:i,kind:"ellipse",x:n.x,y:n.y,width:a.x-n.x,height:a.y-n.y,strokeColor:o.currentStyle.color,strokeWidth:o.currentStyle.strokeWidth,fillColor:o.currentStyle.fillColor};t.setLiveShape(l)},onCommit(){const s=nn({x:n.x,y:n.y,width:a.x-n.x,height:a.y-n.y});if(t.setLiveShape(null),s.width<2||s.height<2)return;const c={id:i,kind:"ellipse",...s,strokeColor:o.currentStyle.color,strokeWidth:o.currentStyle.strokeWidth,fillColor:o.currentStyle.fillColor};t.store.update(l=>({...st(l,c),nextShapeNumber:r})),t.commit()},onCancel(){t.setLiveShape(null)}}}function Ka(t,e){const n=t.toImageSpace(e),o=t.store.get(),{id:i,nextShapeNumber:r}=at(o);let a=n;return{onMove(s){const c=t.toImageSpace(s);a=s.shiftKey?Ua(n,c):c;const l={id:i,kind:"arrow",x1:n.x,y1:n.y,x2:a.x,y2:a.y,color:o.currentStyle.color,strokeWidth:o.currentStyle.strokeWidth};t.setLiveShape(l)},onCommit(){t.setLiveShape(null);const s=a.x-n.x,c=a.y-n.y;if(s*s+c*c<16)return;const l={id:i,kind:"arrow",x1:n.x,y1:n.y,x2:a.x,y2:a.y,color:o.currentStyle.color,strokeWidth:o.currentStyle.strokeWidth};t.store.update(u=>({...st(u,l),nextShapeNumber:r})),t.commit()},onCancel(){t.setLiveShape(null)}}}function qn(t,e,n){const o=t.toImageSpace(e),i=t.store.get(),{id:r,nextShapeNumber:a}=at(i),s=[o];let c=!1,l=o;const u=n.kind==="highlight",d=u?si:i.currentStyle.color,h=u?ci:i.currentStyle.strokeWidth;function f(m){const g={id:r,kind:n.kind,points:m,color:d,strokeWidth:h};t.setLiveShape(g)}return{onMove(m){const g=t.toImageSpace(m);c=m.shiftKey,m.shiftKey?(l=Xa(o,g),f([o,l])):(s.push(g),f(s))},onCommit(){t.setLiveShape(null);const m=c?[o,l]:wi(s);if(m.length<2)return;if(m.length===2){const p=m[0],w=m[1];if(p&&w){const y=w.x-p.x,C=w.y-p.y;if(y*y+C*C<4)return}}const g={id:r,kind:n.kind,points:m,color:d,strokeWidth:h};t.store.update(p=>({...st(p,g),nextShapeNumber:a})),t.commit()},onCancel(){t.setLiveShape(null)}}}function Va(t,e,n,o,i,r){const a=t.toImageSpace(e);return t.store.update(s=>mt(s,n)),{onMove(s){const c=t.toImageSpace(s),l=i(o,c.x-a.x,c.y-a.y);r(l)},onCommit(){t.commit()},onCancel(){r(o)}}}const Un=32;function ja(t){const{stageHost:e,utilHost:n,source:o,store:i,viewport:r}=t,a=t.onCommit??(()=>{}),s=t.onAnnounce??(()=>{}),c=_a();e.appendChild(c.container);let l=j({width:1,height:1,padding:Un},{width:o.width,height:o.height}),u=null,d=null;function h(){const b=c.container.getBoundingClientRect(),k={width:b.width,height:b.height,padding:Un},L={width:o.width,height:o.height};l=r?r.computeViewport(k,L):j(k,L)}function f(){const b=c.container.getBoundingClientRect();b.width<=0||b.height<=0||($a(c.imageCanvas,o,b.width,b.height,l),zn(c.shapesCanvas,i.get().shapes,b.width,b.height,l),Bn(c.liveCanvas,u,b.width,b.height,l),E.update(Z(i.get()),l))}function m(){const b=c.container.getBoundingClientRect();b.width<=0||b.height<=0||zn(c.shapesCanvas,i.get().shapes,b.width,b.height,l)}function g(){const b=c.container.getBoundingClientRect();b.width<=0||b.height<=0||(d!==null?Da(c.liveCanvas,d,b.width,b.height,l):Bn(c.liveCanvas,u,b.width,b.height,l))}function p(b){u=b,d=null,g()}function w(b){d=b,u=null,g()}function y(b){const k=On(c.container,b.clientX,b.clientY);return Wt(k,l)}const C={store:i,toImageSpace:y,setLiveShape:p,commit:a},E=Ha({host:c.handlesLayer,toolContext:C}),S=Wa({host:c.textOverlay,onInput:b=>{const k=Z(i.get());!k||k.kind!=="text"||i.update(L=>nt(L,{...k,text:b}))},onCommit:()=>{const b=Z(i.get());S.close(),b?.kind==="text"&&b.text.trim().length===0&&i.update(k=>Nt(k,b.id)),a(),i.update(k=>Qt(k,"select"))},onCancel:()=>{const b=Z(i.get());S.close(),b?.kind==="text"&&b.text.length===0&&i.update(k=>Nt(k,b.id)),i.update(k=>Qt(k,"select"))}}),M=Ot(c.hitArea,b=>{const k=i.get();switch(k.activeTool){case"select":return H(k,b);case"rect":return Ya(C,b);case"ellipse":return Ga(C,b);case"arrow":return Ka(C,b);case"freehand":return qn(C,b,{kind:"freehand"});case"highlight":return qn(C,b,{kind:"highlight"});case"text":return A(b),null;default:return null}});function H(b,k){const L=y(k),P=yi(b.shapes,L);return P?(b.selectedId!==P.id&&i.update(v=>mt(v,P.id)),Va(C,k,P.id,P,on,v=>i.update(I=>nt(I,v)))):R(k)}function R(b){const k=y(b);let L=k;return{onMove(P){L=y(P),w({x:k.x,y:k.y,width:L.x-k.x,height:L.y-k.y})},onCommit(){w(null);const P=L.x-k.x,v=L.y-k.y;if(Math.abs(P)<2&&Math.abs(v)<2){i.update(q=>mt(q,null));return}const I=Za({x:k.x,y:k.y,width:P,height:v}),z=ts(i.get().shapes,I);i.update(q=>mt(q,z?.id??null))},onCancel(){w(null)}}}function A(b){const k=i.get(),L=y(b),{id:P,nextShapeNumber:v}=at(k),I={id:P,kind:"text",x:L.x,y:L.y,text:"",fontSize:k.currentStyle.fontSize??tn,color:k.currentStyle.color,textAlign:"left"};i.update(z=>({...st(z,I),nextShapeNumber:v})),S.open(I,l,o)}function T(){const b=i.get(),k=b.activeTool;if(k==="select"||!rn(k))return;const{id:L,nextShapeNumber:P}=at(b),v=pi(k,{imageSize:{width:o.width,height:o.height},style:b.currentStyle,id:L});if(i.update(I=>({...st(I,v),nextShapeNumber:P})),v.kind==="text"){S.open(v,l,o),s("Text annotation placed at centre. Type to enter text.");return}s(`${os(v.kind)} placed at centre. Use arrow keys to nudge, or edit coordinates below.`),requestAnimationFrame(()=>{const I=$.container.querySelector(".kalotyp-annotate-coords-input");I?.focus(),I?.select()})}const $=Ia({onShapeChanged:b=>{i.update(k=>nt(k,b)),a()}}),O=i.get(),W=Fa({initialTool:O.activeTool,initialStyle:O.currentStyle,canDelete:O.selectedId!==null,coordInputs:$.container,onSelectTool:b=>i.update(k=>Qt(k,b)),onColorChange:b=>{i.update(k=>{let L=en(k,{color:b});const P=Z(k);return P&&(L=nt(L,Qa(P,b))),L}),a()},onStrokeWidthChange:b=>{i.update(k=>{let L=en(k,{strokeWidth:b});const P=Z(k);return P&&(L=nt(L,Ja(P,b))),L}),a()},onDeleteSelected:()=>{const b=i.get().selectedId;b&&(i.update(k=>Nt(k,b)),a())},onInsertAtCenter:()=>T()});n.appendChild(W.container),h(),f();const U=new ResizeObserver(()=>{h(),f()});U.observe(c.container);let _=!1;const D=r?.subscribe(()=>{_||(_=!0,requestAnimationFrame(()=>{_=!1,h(),f()}))});let G=i.get().shapes,V=i.get().selectedId,Y=i.get().activeTool,x=i.get().currentStyle;const F=i.subscribe(b=>{const k=b.shapes!==G,L=b.selectedId!==V;k&&(G=b.shapes,m()),L&&(V=b.selectedId,W.setCanDelete(b.selectedId!==null)),b.activeTool!==Y&&(Y=b.activeTool,W.setActiveTool(b.activeTool)),b.currentStyle!==x&&(x=b.currentStyle,W.setStyle(b.currentStyle)),E.update(Z(b),l),(L||k)&&$.updateForShape(Z(b))}),N=b=>{const k=b.target;if(ns(k))return;const L=i.get();if(b.key==="Escape"){L.selectedId!==null&&(b.preventDefault(),b.stopPropagation(),i.update(P=>mt(P,null)),s("Selection cleared."));return}if(b.key==="Delete"||b.key==="Backspace"){if(L.selectedId===null)return;b.preventDefault();const P=L.selectedId;i.update(v=>Nt(v,P)),a();return}if(b.key==="ArrowUp"||b.key==="ArrowDown"||b.key==="ArrowLeft"||b.key==="ArrowRight"){const P=Z(L);if(!P||b.ctrlKey||b.altKey||b.metaKey)return;const v=b.shiftKey?10:1,I=b.key==="ArrowLeft"?-v:b.key==="ArrowRight"?v:0,z=b.key==="ArrowUp"?-v:b.key==="ArrowDown"?v:0;b.preventDefault();const q=on(P,I,z);i.update(K=>nt(K,q)),a()}};return document.addEventListener("keydown",N,!0),{destroy(){document.removeEventListener("keydown",N,!0),M(),F(),D?.(),U.disconnect(),S.destroy(),E.destroy(),c.container.remove(),W.container.remove()}}}function Qa(t,e){switch(t.kind){case"text":return{...t,color:e};case"rect":case"ellipse":return{...t,strokeColor:e};case"arrow":case"freehand":case"highlight":return{...t,color:e}}}function Ja(t,e){switch(t.kind){case"text":return{...t,fontSize:Math.max(8,Math.round(e*4))};case"rect":case"ellipse":case"arrow":case"freehand":case"highlight":return{...t,strokeWidth:e}}}function Za(t){let{x:e,y:n,width:o,height:i}=t;return o<0&&(e+=o,o=-o),i<0&&(n+=i,i=-i),{x:e,y:n,width:o,height:i}}function ts(t,e){for(let n=t.length-1;n>=0;n--){const o=t[n];if(!o)continue;const i=ft(o);if(es(i,e))return o}}function es(t,e){return!(t.x+t.width<e.x||e.x+e.width<t.x||t.y+t.height<e.y||e.y+e.height<t.y)}function ns(t){if(!t)return!1;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"?!0:t.isContentEditable===!0}function os(t){switch(t){case"rect":return"Rectangle";case"ellipse":return"Ellipse";case"arrow":return"Arrow";case"text":return"Text annotation"}}function is(t){return{id:"annotate",init:e=>hi({imageSize:{width:e.source.width,height:e.source.height}}),mount(e,n,o){const i=ja({stageHost:e,utilHost:t.panelHost,source:n.source,store:o,viewport:n.viewport,onCommit:()=>n.bus.emit("commit",{utility:"annotate"}),onAnnounce:r=>n.bus.emit("announce",{message:r})});return{destroy:()=>i.destroy()}},bake:(e,n)=>Ci({shapes:e.shapes},n)}}const rs=[{id:"x",label:"Left"},{id:"y",label:"Top"},{id:"width",label:"Width",min:1},{id:"height",label:"Height",min:1}];function as(t){const e=document.createElement("div");e.className="kalotyp-redact-coords",e.setAttribute("role","group"),e.setAttribute("aria-label","Selected redaction position"),e.hidden=!0;let n=null;const o=new Map;for(const s of rs){const c=document.createElement("label");c.className="kalotyp-redact-coords-field";const l=document.createElement("span");l.className="kalotyp-redact-coords-label",l.textContent=s.label;const u=document.createElement("input");u.type="number",u.className="kalotyp-redact-coords-input",u.dataset.field=s.id,u.step="1",u.inputMode="numeric",s.min!==void 0&&(u.min=String(s.min)),u.setAttribute("aria-label",`${s.label} (pixels)`),u.addEventListener("change",r),c.appendChild(l),c.appendChild(u),e.appendChild(c),o.set(s.id,u)}function i(s){const c=(l,u)=>{const d=o.get(l);if(!d)return;const h=String(Math.round(u));document.activeElement!==d&&d.value!==h&&(d.value=h)};c("x",s.x),c("y",s.y),c("width",s.width),c("height",s.height)}function r(){if(!n)return;const s=a("x"),c=a("y"),l=a("width"),u=a("height");if(![s,c,l,u].every(Number.isFinite))return;const d={...n,x:s,y:c,width:l,height:u};d.x===n.x&&d.y===n.y&&d.width===n.width&&d.height===n.height||(n=d,t.onRegionChanged(d))}function a(s){const c=o.get(s);return c?Math.round(c.valueAsNumber):Number.NaN}return{container:e,updateForRegion(s){if(!s){n=null,e.hidden=!0;return}n=s,i(s),e.hidden=!1},destroy(){e.replaceChildren(),o.clear(),e.remove()}}}const ss=[{id:"pixelate",label:"Pixelate"},{id:"blur",label:"Blur"},{id:"solid",label:"Solid fill"}];function cs(t){const e=document.createElement("div");e.className="kalotyp-redact-panel",e.setAttribute("role","group"),e.setAttribute("aria-label","Redact");const n=document.createElement("div");n.className="kalotyp-redact-toolbar",n.setAttribute("role","radiogroup"),n.setAttribute("aria-label","Redaction mode");const o=new Map;for(const g of ss){const p=document.createElement("button");p.type="button",p.className="kalotyp-redact-mode",p.dataset.mode=g.id,p.setAttribute("role","radio"),p.setAttribute("aria-checked",g.id===t.initialMode?"true":"false"),p.setAttribute("aria-label",`${g.label} redaction`),p.title=g.label,p.textContent=g.label,p.addEventListener("click",()=>t.onSelectMode(g.id)),n.appendChild(p),o.set(g.id,p)}const i=document.createElement("div");i.className="kalotyp-redact-style-row";const r=document.createElement("input");r.type="color",r.className="kalotyp-redact-color",r.value=le(t.initialColor),r.setAttribute("aria-label","Solid fill colour (visual picker)"),r.addEventListener("change",()=>t.onColorChange(r.value));const a=document.createElement("input");a.type="text",a.className="kalotyp-redact-hex",a.value=le(t.initialColor),a.maxLength=7,a.spellcheck=!1,a.autocomplete="off",a.setAttribute("aria-label","Solid fill hex code"),a.setAttribute("placeholder","#000000"),a.addEventListener("change",()=>{const g=a.value.trim(),p=ls(g);p?(a.value=p,t.onColorChange(p)):a.value=r.value});const s=document.createElement("button");s.type="button",s.className="kalotyp-redact-insert",s.innerHTML=`${B("plus")}<span>Insert at centre</span>`,s.setAttribute("aria-label","Insert redaction region at image centre"),s.title="Insert at centre",s.addEventListener("click",()=>t.onInsertAtCenter());const c=document.createElement("button");c.type="button",c.className="kalotyp-redact-delete",c.innerHTML=`${B("delete")}<span>Delete</span>`,c.setAttribute("aria-label","Delete selected redaction region"),c.title="Delete (Del)",c.disabled=!t.canDelete,c.addEventListener("click",()=>t.onDeleteSelected());const l=document.createElement("div");l.className="kalotyp-redact-color-group",l.appendChild(r),l.appendChild(a);const u=document.createElement("span");u.className="kalotyp-redact-color-hint",u.textContent="Colour applies to Solid fill only.",u.setAttribute("aria-live","polite");const d=document.createElement("div");d.className="kalotyp-redact-button-group",d.appendChild(s),d.appendChild(c),i.appendChild(l),i.appendChild(u),i.appendChild(d),e.appendChild(n),e.appendChild(i),e.appendChild(t.coordInputs);function h(g){for(const[w,y]of o)y.setAttribute("aria-checked",w===g?"true":"false"),y.classList.toggle("kalotyp-redact-mode--active",w===g);const p=g==="solid";r.disabled=!p,a.disabled=!p,u.hidden=p}function f(g){const p=le(g);r.value!==p&&(r.value=p),a.value.toLowerCase()!==p.toLowerCase()&&(a.value=p)}function m(g){c.disabled=!g}return h(t.initialMode),{container:e,modeButtons:o,colorInput:r,hexInput:a,insertButton:s,deleteButton:c,setActiveMode:h,setColor:f,setCanDelete:m}}function le(t){if(/^#[0-9a-fA-F]{6}$/.test(t))return t;if(/^#[0-9a-fA-F]{3}$/.test(t)){const e=t[1],n=t[2],o=t[3];return`#${e}${e}${n}${n}${o}${o}`}return"#000000"}function ls(t){const e=t.startsWith("#")?t.slice(1):t;if(/^[0-9a-fA-F]{6}$/.test(e))return`#${e.toLowerCase()}`;if(/^[0-9a-fA-F]{3}$/.test(e)){const n=e[0],o=e[1],i=e[2];return`#${n}${n}${o}${o}${i}${i}`.toLowerCase()}return null}function ue(t,e,n){const o=Math.max(1,window.devicePixelRatio||1),i=Math.max(1,Math.round(e*o)),r=Math.max(1,Math.round(n*o));t.width!==i&&(t.width=i),t.height!==r&&(t.height=r),t.style.width=`${e}px`,t.style.height=`${n}px`;const a=t.getContext("2d");return a?(a.setTransform(o,0,0,o,0,0),a.clearRect(0,0,e,n),a):null}function us(t,e,n,o,i){const r=ue(t,n,o);r&&(r.imageSmoothingEnabled=!0,r.imageSmoothingQuality="high",r.drawImage(e.bitmap,i.displayRect.x,i.displayRect.y,i.displayRect.width,i.displayRect.height))}function ds(t,e,n,o,i,r,a){const s=ue(t,i,r);if(!s||n.length===0)return;const c=document.createElement("canvas"),l=Math.max(1,Math.round(a.displayRect.width)),u=Math.max(1,Math.round(a.displayRect.height));c.width=l,c.height=u;const d=c.getContext("2d");if(d){d.imageSmoothingEnabled=!0,d.imageSmoothingQuality="high",d.drawImage(e.bitmap,0,0,l,u);for(const h of n){const f={...h,x:h.x*a.scale,y:h.y*a.scale,width:h.width*a.scale,height:h.height*a.scale};mn(d,c,f,{})}s.drawImage(c,a.displayRect.x,a.displayRect.y,l,u);for(const h of n){const f=a.displayRect.x+h.x*a.scale,m=a.displayRect.y+h.y*a.scale,g=h.width*a.scale,p=h.height*a.scale;s.save(),h.id===o?(s.strokeStyle="rgba(99, 102, 241, 0.9)",s.lineWidth=1.5):(s.strokeStyle="rgba(255, 255, 255, 0.6)",s.lineWidth=1),s.setLineDash([4,3]),s.strokeRect(f+.5,m+.5,Math.max(0,g-1),Math.max(0,p-1)),s.restore()}}}function hs(t,e,n,o,i){const r=ue(t,n,o);if(!r||!e)return;const a=i.displayRect.x+e.x*i.scale,s=i.displayRect.y+e.y*i.scale;let c=e.width*i.scale,l=e.height*i.scale,u=a,d=s;c<0&&(u=a+c,c=-c),l<0&&(d=s+l,l=-l),r.save(),r.fillStyle=ps(e.mode,e.color),r.fillRect(u,d,c,l),r.strokeStyle="rgba(99, 102, 241, 0.95)",r.lineWidth=1.5,r.setLineDash([4,3]),r.strokeRect(u+.75,d+.75,Math.max(0,c-1.5),Math.max(0,l-1.5)),r.restore()}function ps(t,e){switch(t){case"solid":return ms(e,.7);case"pixelate":return"rgba(120, 120, 120, 0.6)";case"blur":return"rgba(180, 200, 220, 0.45)"}}function ms(t,e){const n=/^#([0-9a-fA-F]{6})$/.exec(t);if(!n)return t;const o=n[1];if(!o)return t;const i=Number.parseInt(o.slice(0,2),16),r=Number.parseInt(o.slice(2,4),16),a=Number.parseInt(o.slice(4,6),16);return`rgba(${i}, ${r}, ${a}, ${e})`}function fs(t){const{host:e,store:n}=t,o=new Map,i=[];for(const c of Tt){const l=document.createElement("button");l.type="button",l.className="kalotyp-redact-handle",l.dataset.direction=c,l.setAttribute("aria-label",bs(c)),l.tabIndex=-1,l.style.display="none",o.set(c,l),e.appendChild(l),i.push(Ot(l,u=>s(c)))}function r(c,l){if(!c){for(const[,h]of o)h.style.display="none";return}const u={x:c.x,y:c.y,width:c.width,height:c.height},d=gs(u);for(const h of Tt){const f=o.get(h);if(!f)continue;const m=ys(d[h],l);f.style.display="",f.style.left=`${m.x}px`,f.style.top=`${m.y}px`}}function a(){for(const c of i)c();for(const[,c]of o)c.remove();o.clear()}function s(c,l){const u=lt(n.get());return u?{onMove(d){const h=t.toImageSpace(d),f={x:u.x,y:u.y,width:u.width,height:u.height},m=Jt(f,c,h);n.update(g=>J(g,{...u,x:m.x,y:m.y,width:m.width,height:m.height}))},onCommit(){const d=lt(n.get());if(d&&(d.width<0||d.height<0)){let{x:h,y:f,width:m,height:g}=d;m<0&&(h+=m,m=-m),g<0&&(f+=g,g=-g),n.update(p=>J(p,{...d,x:h,y:f,width:m,height:g}))}t.commit()},onCancel(){n.update(d=>J(d,u))}}:null}return{update:r,destroy:a}}function gs(t){const e=t.x,n=t.x+t.width,o=t.y,i=t.y+t.height,r=t.x+t.width/2,a=t.y+t.height/2;return{tl:{x:e,y:o},tr:{x:n,y:o},bl:{x:e,y:i},br:{x:n,y:i},t:{x:r,y:o},r:{x:n,y:a},b:{x:r,y:i},l:{x:e,y:a}}}function ys(t,e){return{x:e.displayRect.x+t.x*e.scale,y:e.displayRect.y+t.y*e.scale}}function bs(t){switch(t){case"tl":return"Resize from top-left";case"tr":return"Resize from top-right";case"bl":return"Resize from bottom-left";case"br":return"Resize from bottom-right";case"t":return"Resize from top";case"r":return"Resize from right";case"b":return"Resize from bottom";case"l":return"Resize from left"}}function ws(){const t=document.createElement("div");t.className="kalotyp-redact-stage";const e=document.createElement("canvas");e.className="kalotyp-redact-image",e.setAttribute("aria-hidden","true");const n=document.createElement("canvas");n.className="kalotyp-redact-regions",n.setAttribute("aria-hidden","true");const o=document.createElement("canvas");o.className="kalotyp-redact-live",o.setAttribute("aria-hidden","true");const i=document.createElement("div");i.className="kalotyp-redact-hit",i.setAttribute("role","presentation");const r=document.createElement("div");return r.className="kalotyp-redact-handles",r.setAttribute("role","group"),r.setAttribute("aria-label","Selected redaction region"),t.appendChild(e),t.appendChild(n),t.appendChild(o),t.appendChild(i),t.appendChild(r),{container:t,imageCanvas:e,regionsCanvas:n,liveCanvas:o,hitArea:i,handlesLayer:r}}const Xn=32;function Cs(t){const{stageHost:e,utilHost:n,source:o,store:i,viewport:r}=t,a=t.onCommit??(()=>{}),s=t.onAnnounce??(()=>{}),c=Di(i.get(),{width:o.width,height:o.height});c!==i.get()&&i.update(()=>c);const l=ws();e.appendChild(l.container);let u=j({width:1,height:1,padding:Xn},{width:o.width,height:o.height}),d=null;function h(){const x=l.container.getBoundingClientRect(),F={width:x.width,height:x.height,padding:Xn},N={width:o.width,height:o.height};u=r?r.computeViewport(F,N):j(F,N)}function f(){const x=l.container.getBoundingClientRect();x.width<=0||x.height<=0||us(l.imageCanvas,o,x.width,x.height,u)}function m(){const x=l.container.getBoundingClientRect();if(x.width<=0||x.height<=0)return;const F=i.get();ds(l.regionsCanvas,o,F.regions,F.selectedId,x.width,x.height,u)}function g(){const x=l.container.getBoundingClientRect();x.width<=0||x.height<=0||hs(l.liveCanvas,d,x.width,x.height,u)}function p(){f(),m(),g(),C.update(lt(i.get()),u)}function w(x){d=x,g()}function y(x){const F=On(l.container,x.clientX,x.clientY);return Wt(F,u)}const C=fs({host:l.handlesLayer,store:i,toImageSpace:y,getViewport:()=>u,commit:a}),E=Ot(l.hitArea,x=>{const F=i.get(),N=y(x),b=xs(F.regions,N);return b?(F.selectedId!==b.id&&i.update(k=>pn(k,b.id)),S(b,x)):M(F,x)});function S(x,F){const N=y(F);return{onMove(b){const k=y(b),L=k.x-N.x,P=k.y-N.y;i.update(v=>J(v,{...x,x:x.x+L,y:x.y+P}))},onCommit(){a()},onCancel(){i.update(b=>J(b,x))}}}function M(x,F){const N=y(F);let b=N;return{onMove(k){const L=y(k);if(k.shiftKey){const P=L.x-N.x,v=L.y-N.y,I=Math.max(Math.abs(P),Math.abs(v)),z=P===0?1:Math.sign(P),q=v===0?1:Math.sign(v);b={x:N.x+z*I,y:N.y+q*I}}else b=L;w({x:N.x,y:N.y,width:b.x-N.x,height:b.y-N.y,mode:x.currentMode,color:x.currentColor})},onCommit(){w(null);const k=Pi({x:N.x,y:N.y,width:b.x-N.x,height:b.y-N.y});if(k.width<4||k.height<4)return;const{id:L,nextRegionNumber:P}=un(x),v={id:L,x:k.x,y:k.y,width:k.width,height:k.height,mode:x.currentMode,color:x.currentColor};i.update(I=>({...dn(I,v),nextRegionNumber:P})),a()},onCancel(){w(null)}}}function H(){const x=i.get(),{id:F,nextRegionNumber:N}=un(x),b=$i({imageSize:{width:o.width,height:o.height},mode:x.currentMode,color:x.currentColor,id:F});i.update(k=>({...dn(k,b),nextRegionNumber:N})),s("Redaction region placed at centre. Use arrow keys to nudge, or edit coordinates below."),requestAnimationFrame(()=>{const k=R.container.querySelector(".kalotyp-redact-coords-input");k?.focus(),k?.select()}),a()}const R=as({onRegionChanged:x=>{i.update(F=>J(F,x)),a()}}),A=i.get(),T=cs({initialMode:A.currentMode,initialColor:A.currentColor,canDelete:A.selectedId!==null,coordInputs:R.container,onSelectMode:x=>{i.update(F=>{const N=Ni(F,x);return N.selectedId===null?N:Ti(N,N.selectedId,x)}),a()},onColorChange:x=>{i.update(F=>{const N=Li(F,x);return N.selectedId===null?N:Fi(N,N.selectedId,x)}),a()},onInsertAtCenter:()=>H(),onDeleteSelected:()=>{const x=i.get().selectedId;x&&(i.update(F=>hn(F,x)),a())}});n.appendChild(T.container),h(),p();const $=new ResizeObserver(()=>{h(),p()});$.observe(l.container);let O=!1;const W=r?.subscribe(()=>{O||(O=!0,requestAnimationFrame(()=>{O=!1,h(),p()}))});let U=i.get().regions,_=i.get().selectedId,D=i.get().currentMode,G=i.get().currentColor;const V=i.subscribe(x=>{const F=x.regions!==U,N=x.selectedId!==_;F&&(U=x.regions,m()),N&&(_=x.selectedId,T.setCanDelete(x.selectedId!==null)),x.currentMode!==D&&(D=x.currentMode,T.setActiveMode(x.currentMode)),x.currentColor!==G&&(G=x.currentColor,T.setColor(x.currentColor)),C.update(lt(x),u),(N||F)&&R.updateForRegion(lt(x))}),Y=x=>{const F=x.target;if(vs(F))return;const N=i.get();if(x.key==="Escape"){N.selectedId!==null&&(x.preventDefault(),x.stopPropagation(),i.update(b=>pn(b,null)),s("Selection cleared."));return}if(x.key==="Delete"||x.key==="Backspace"){if(N.selectedId===null)return;x.preventDefault();const b=N.selectedId;i.update(k=>hn(k,b)),a();return}if(x.key==="ArrowUp"||x.key==="ArrowDown"||x.key==="ArrowLeft"||x.key==="ArrowRight"){const b=lt(N);if(!b||x.ctrlKey||x.altKey||x.metaKey)return;const k=x.shiftKey?10:1,L=x.key==="ArrowLeft"?-k:x.key==="ArrowRight"?k:0,P=x.key==="ArrowUp"?-k:x.key==="ArrowDown"?k:0;x.preventDefault(),i.update(v=>J(v,{...b,x:b.x+L,y:b.y+P})),a()}};return document.addEventListener("keydown",Y,!0),{destroy(){document.removeEventListener("keydown",Y,!0),E(),V(),W?.(),$.disconnect(),R.destroy(),C.destroy(),l.container.remove(),T.container.remove()}}}function xs(t,e){for(let n=t.length-1;n>=0;n--){const o=t[n];if(o&&e.x>=o.x&&e.x<=o.x+o.width&&e.y>=o.y&&e.y<=o.y+o.height)return o}}function vs(t){if(!t)return!1;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"?!0:t.isContentEditable===!0}function ks(t){return{id:"redact",init:e=>Ri({imageSize:{width:e.source.width,height:e.source.height}}),mount(e,n,o){const i=Cs({stageHost:e,utilHost:t.panelHost,source:n.source,store:o,viewport:n.viewport,onCommit:()=>n.bus.emit("commit",{utility:"redact"}),onAnnounce:r=>n.bus.emit("announce",{message:r})});return{destroy:()=>i.destroy()}},bake:(e,n)=>Oi({regions:e.regions},n)}}const Yn=32;function Ss(t){const{stageHost:e,utilHost:n,source:o,store:i,viewport:r}=t,a=t.onCommit??(()=>{}),s=document.createElement("div");s.className="kalotyp-stage-container kalotyp-frame-preview-container";const c=document.createElement("canvas");c.className="kalotyp-stage-image kalotyp-frame-preview-canvas",c.setAttribute("aria-hidden","true"),s.appendChild(c),e.appendChild(s);const l=i.get(),u=document.createElement("div");u.className="kalotyp-frame-panel";const d=Es({presets:fn,initialActiveId:l.presetId,labels:t.labels,source:o,initialState:l,onPresetClick:S=>{i.update(M=>Ui(M,S.id)),a()}});u.appendChild(d.container);const h=As({initialColor:l.color,initialPresetId:l.presetId,onColorChange:S=>{i.update(M=>Xi(M,S)),a()}});u.appendChild(h.container),n.appendChild(u);let f=j({width:1,height:1,padding:Yn},{width:o.width,height:o.height});function m(){const S=s.getBoundingClientRect();if(S.width<=0||S.height<=0)return;const M={width:S.width,height:S.height,padding:Yn},H=i.get(),R=oe(H.presetId,o.width,o.height);f=r?r.computeViewport(M,R):j(M,R)}function g(){const S=s.getBoundingClientRect();if(S.width<=0||S.height<=0)return;const M=Math.max(1,window.devicePixelRatio||1),H=Math.max(1,Math.round(S.width*M)),R=Math.max(1,Math.round(S.height*M));c.width!==H&&(c.width=H),c.height!==R&&(c.height=R),c.style.width=`${S.width}px`,c.style.height=`${S.height}px`;const A=c.getContext("2d");if(!A)return;A.setTransform(M,0,0,M,0,0),A.clearRect(0,0,S.width,S.height),A.imageSmoothingEnabled=!0,A.imageSmoothingQuality="high";const T=i.get(),$=oe(T.presetId,o.width,o.height),O=f.displayRect.x,W=f.displayRect.y,U=f.displayRect.width,_=f.displayRect.height;if(T.presetId==="polaroid"){A.fillStyle=T.color,A.fillRect(O,W,U,_);const D=o.width*(U/$.width),G=o.height*(_/$.height),V=Math.min(o.width,o.height),Y=Math.round(V*.05),x=O+Y*U/$.width,F=W+Y*_/$.height;A.drawImage(o.bitmap,x,F,D,G)}else A.drawImage(o.bitmap,O,W,U,_),T.presetId!=="none"&&(A.save(),A.translate(O,W),ne(A,T.presetId,T.color,U,_),A.restore())}m(),g();const p=new ResizeObserver(()=>{m(),g()});p.observe(s);let w=!1;const y=r?.subscribe(()=>{w||(w=!0,requestAnimationFrame(()=>{w=!1,m(),g()}))});let C=!1;const E=i.subscribe(S=>{d.setActive(S.presetId),h.setColor(S.color),h.setEnabled(S.presetId!=="none"),!C&&(C=!0,requestAnimationFrame(()=>{C=!1,m(),g()}))});return{destroy(){E(),y?.(),p.disconnect(),s.remove(),u.remove()}}}function Es(t){const e=document.createElement("div");e.className="kalotyp-frame-strip-wrap",e.setAttribute("role","radiogroup"),e.setAttribute("aria-label","Frame presets");const n=document.createElement("div");n.className="kalotyp-frame-strip",e.appendChild(n);const o=new Map;for(const r of t.presets){const a=document.createElement("button");a.type="button",a.className="kalotyp-frame-thumb",a.dataset.presetId=r.id,a.setAttribute("role","radio"),a.setAttribute("aria-checked","false");const s=t.labels?.[r.id]??r.label;a.setAttribute("aria-label",`${s} frame`),a.title=s;const c=document.createElement("span");c.className="kalotyp-frame-thumb-image";const l=Ms(r,t.source,t.initialState.color);l.classList.add("kalotyp-frame-thumb-canvas"),c.appendChild(l);const u=document.createElement("span");u.className="kalotyp-frame-thumb-check",u.setAttribute("aria-hidden","true"),u.innerHTML="✓",c.appendChild(u);const d=document.createElement("span");d.className="kalotyp-frame-thumb-label",d.textContent=s,a.appendChild(c),a.appendChild(d),a.addEventListener("click",()=>t.onPresetClick(r)),n.appendChild(a),o.set(r.id,a)}function i(r){for(const[a,s]of o){const c=a===r;s.setAttribute("aria-checked",c?"true":"false"),s.classList.toggle("kalotyp-frame-thumb--active",c)}}return i(t.initialActiveId),{container:e,setActive:i}}function As(t){const e=document.createElement("div");e.className="kalotyp-frame-color-row";const n=document.createElement("span");n.className="kalotyp-frame-color-label",n.textContent="Colour";const o=document.createElement("input");o.type="color",o.className="kalotyp-frame-color",o.value=de(t.initialColor),o.setAttribute("aria-label","Frame colour (visual picker)"),o.addEventListener("change",()=>t.onColorChange(o.value));const i=document.createElement("input");i.type="text",i.className="kalotyp-frame-hex",i.value=de(t.initialColor),i.maxLength=7,i.spellcheck=!1,i.autocomplete="off",i.setAttribute("aria-label","Frame colour hex code"),i.setAttribute("placeholder","#000000"),i.addEventListener("change",()=>{const c=i.value.trim(),l=Is(c);l?(i.value=l,t.onColorChange(l)):i.value=o.value});const r=document.createElement("span");r.className="kalotyp-frame-color-hint",r.textContent="Pick a frame preset to choose a colour.",r.setAttribute("aria-live","polite"),e.appendChild(n),e.appendChild(o),e.appendChild(i),e.appendChild(r);function a(c){o.disabled=!c,i.disabled=!c,r.hidden=c}function s(c){const l=de(c);o.value!==l&&(o.value=l),i.value.toLowerCase()!==l.toLowerCase()&&(i.value=l)}return a(t.initialPresetId!=="none"),{container:e,setColor:s,setEnabled:a}}function Ms(t,e,n){const o={width:80,height:60},i=oe(t.id,e.width,e.height),r=Math.min(o.width/i.width,o.height/i.height),a=Math.max(1,Math.floor(i.width*r)),s=Math.max(1,Math.floor(i.height*r)),c=Math.max(1,window.devicePixelRatio||1),l=document.createElement("canvas");l.width=Math.max(1,Math.round(a*c)),l.height=Math.max(1,Math.round(s*c)),l.style.width=`${a}px`,l.style.height=`${s}px`;const u=l.getContext("2d");if(!u)return l;if(u.setTransform(c,0,0,c,0,0),u.imageSmoothingEnabled=!0,u.imageSmoothingQuality="high",t.id==="polaroid"){u.fillStyle=n,u.fillRect(0,0,a,s);const d=Math.min(e.width,e.height),h=Math.round(d*.05/i.width*a),f=Math.round(d*.05/i.height*s),m=Math.round(e.width/i.width*a),g=Math.round(e.height/i.height*s);u.drawImage(e.bitmap,h,f,m,g)}else u.drawImage(e.bitmap,0,0,a,s),t.id!=="none"&&ne(u,t.id,n,a,s);return l}function de(t){if(/^#[0-9a-fA-F]{6}$/.test(t))return t;if(/^#[0-9a-fA-F]{3}$/.test(t)){const e=t[1],n=t[2],o=t[3];return`#${e}${e}${n}${n}${o}${o}`}return"#000000"}function Is(t){const e=t.startsWith("#")?t.slice(1):t;if(/^[0-9a-fA-F]{6}$/.test(e))return`#${e.toLowerCase()}`;if(/^[0-9a-fA-F]{3}$/.test(e)){const n=e[0],o=e[1],i=e[2];return`#${n}${n}${o}${o}${i}${i}`.toLowerCase()}return null}function Rs(t){return{id:"frame",init:()=>qi(),mount(e,n,o){const i=Ss({stageHost:e,utilHost:t.panelHost,source:n.source,store:o,viewport:n.viewport,labels:t.labels,onCommit:()=>n.bus.emit("commit",{utility:"frame"})});return{destroy:()=>i.destroy()}},bake:(e,n)=>Yi(e,n)}}function Ns(t,e,n,o){const i=document.createElement("div");i.className="kalotyp-util-nav",i.setAttribute("role","tablist"),i.setAttribute("aria-label","Editor tools");const r=new Map;for(const a of t){const s=document.createElement("button");s.type="button",s.className="kalotyp-util-nav-button",s.dataset.utilityId=a.id,s.id=`${o.panelId}-tab-${a.id}`,s.setAttribute("role","tab"),s.setAttribute("aria-selected",a.id===e?"true":"false"),s.setAttribute("aria-controls",o.panelId),s.tabIndex=a.id===e?0:-1,s.textContent=a.label,s.addEventListener("click",()=>n(a.id)),i.appendChild(s),r.set(a.id,s)}return i.addEventListener("keydown",a=>{if(a.key!=="ArrowLeft"&&a.key!=="ArrowRight"&&a.key!=="Home"&&a.key!=="End")return;const s=t.map(f=>f.id),l=a.target?.dataset?.utilityId,u=l?s.indexOf(l):-1;if(u===-1)return;let d=u;a.key==="ArrowLeft"?d=(u-1+s.length)%s.length:a.key==="ArrowRight"?d=(u+1)%s.length:a.key==="Home"?d=0:a.key==="End"&&(d=s.length-1);const h=s[d];!h||h===l||(a.preventDefault(),n(h),r.get(h)?.focus())}),{container:i,buttons:r}}function Gn(t,e,n){for(const[o,i]of t.buttons.entries()){const r=o===e;if(i.setAttribute("aria-selected",r?"true":"false"),i.tabIndex=r?0:-1,r){try{i.scrollIntoView({block:"nearest",inline:"nearest",behavior:"smooth"})}catch{}n&&n.setAttribute("aria-labelledby",i.id)}}}const Ls=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])","details","summary",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].join(", ");function Ts(t){const{host:e}=t,n=document.activeElement instanceof HTMLElement&&document.activeElement!==document.body?document.activeElement:null;function o(){return Array.from(e.querySelectorAll(Ls))}const i=t.initialFocus??o()[0];i&&requestAnimationFrame(()=>i.focus());const r=a=>{if(a.key!=="Tab")return;const s=o();if(s.length===0){a.preventDefault();return}const c=s[0],l=s[s.length-1];if(!c||!l)return;const u=document.activeElement;a.shiftKey?(u===c||!e.contains(u))&&(a.preventDefault(),l.focus()):(u===l||!e.contains(u))&&(a.preventDefault(),c.focus())};return document.addEventListener("keydown",r,!0),{refresh:()=>{},release:()=>{if(document.removeEventListener("keydown",r,!0),n?.isConnected)try{n.focus()}catch{}}}}const Fs=1.0015;function Ps(t,e){const n=new Map;let o=null;function i(){return t.getBoundingClientRect()}function r(m,g){const p=i();return{x:m-p.left,y:g-p.top}}function a(){const m=i();return{x:m.width/2,y:m.height/2}}function s(){if(n.size<2)return null;const m=n.values(),g=m.next().value,p=m.next().value,w=r((g.x+p.x)/2,(g.y+p.y)/2),y=p.x-g.x,C=p.y-g.y,E=Math.sqrt(y*y+C*C);return{midpoint:w,distance:E}}function c(){if(n.size<2||o!==null)return;const m=s();!m||m.distance<=0||(o={lastDistance:m.distance,lastMidpoint:m.midpoint},e.setPinching(!0))}function l(){o!==null&&(o=null,e.setPinching(!1))}function u(m){m.pointerType==="mouse"&&m.button!==0||(n.set(m.pointerId,{id:m.pointerId,x:m.clientX,y:m.clientY}),c())}function d(m){const g=n.get(m.pointerId);if(!g||(g.x=m.clientX,g.y=m.clientY,o===null))return;const p=s();if(!p||p.distance<=0)return;const w=p.distance/o.lastDistance;w!==1&&e.zoomAt(w,p.midpoint,a());const y=p.midpoint.x-o.lastMidpoint.x,C=p.midpoint.y-o.lastMidpoint.y;(y!==0||C!==0)&&e.panBy(y,C),o.lastDistance=p.distance,o.lastMidpoint=p.midpoint,m.preventDefault()}function h(m){n.has(m.pointerId)&&(n.delete(m.pointerId),n.size<2&&l())}function f(m){const g=Fs**-m.deltaY;if(g===1)return;const p=r(m.clientX,m.clientY);e.zoomAt(g,p,a()),m.preventDefault()}return t.addEventListener("pointerdown",u),t.addEventListener("pointermove",d),t.addEventListener("pointerup",h),t.addEventListener("pointercancel",h),t.addEventListener("pointerleave",h),t.addEventListener("wheel",f,{passive:!1}),()=>{t.removeEventListener("pointerdown",u),t.removeEventListener("pointermove",d),t.removeEventListener("pointerup",h),t.removeEventListener("pointercancel",h),t.removeEventListener("pointerleave",h),t.removeEventListener("wheel",f),n.clear(),o!==null&&e.setPinching(!1),o=null}}const $s=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[tabindex]:not([tabindex="-1"])','[contenteditable="true"]'].join(", ");function he(t){const e=document.activeElement instanceof HTMLElement?document.activeElement:null,n=document.createElement("div");n.className="kalotyp-nested-overlay",t.variant&&n.classList.add(t.variant);const o=document.createElement("div");o.className="kalotyp-nested-surface",o.setAttribute("role","dialog"),o.setAttribute("aria-modal","true"),o.tabIndex=-1;const i=`kalotyp-nested-title-${Math.random().toString(36).slice(2,8)}`;o.setAttribute("aria-labelledby",i);const r=document.createElement("div");r.className="kalotyp-nested-header";const a=document.createElement("h3");a.id=i,a.className="kalotyp-nested-title",a.textContent=t.title,r.appendChild(a);let s;t.showCloseButton!==!1&&(s=document.createElement("button"),s.type="button",s.className="kalotyp-nested-close",s.setAttribute("aria-label",`Close ${t.title}`),s.textContent="×",s.addEventListener("click",()=>h()),r.appendChild(s)),o.appendChild(r);const c=document.createElement("div");if(c.className="kalotyp-nested-body",c.appendChild(t.body),o.appendChild(c),n.appendChild(o),t.host.appendChild(n),t.anchor){n.classList.add("kalotyp-nested-overlay--popover"),Kn(n,o,t.anchor);const f=()=>Kn(n,o,t.anchor);window.addEventListener("resize",f),n.dataset.resizeListenerAttached="1",n.addEventListener("kalotyp-nested-cleanup",()=>{window.removeEventListener("resize",f)})}else n.classList.add("kalotyp-nested-overlay--modal");requestAnimationFrame(()=>o.focus());const l=f=>{if(f.key==="Escape"){f.preventDefault(),f.stopPropagation(),h();return}if(f.key!=="Tab")return;const m=Array.from(o.querySelectorAll($s));if(m.length===0){f.preventDefault(),o.focus();return}const g=m[0],p=m[m.length-1];if(!g||!p)return;const w=document.activeElement;f.shiftKey?(w===g||!o.contains(w))&&(f.preventDefault(),p.focus()):(w===p||!o.contains(w))&&(f.preventDefault(),g.focus())};document.addEventListener("keydown",l,!0);const u=f=>{const m=f.target;m&&(o.contains(m)||h())};n.addEventListener("mousedown",u);let d=!1;function h(){if(!d){if(d=!0,document.removeEventListener("keydown",l,!0),n.removeEventListener("mousedown",u),n.dispatchEvent(new Event("kalotyp-nested-cleanup")),n.remove(),e?.isConnected)try{e.focus()}catch{}t.onClose()}}return{element:n,close:h}}function Kn(t,e,n){const o=n.getBoundingClientRect(),i=t.parentElement?.getBoundingClientRect()??{top:0,right:window.innerWidth},r=e.getBoundingClientRect(),a=o.top-i.top-r.height-8,s=i.right-o.right;e.style.position="absolute",e.style.top=`${Math.max(8,a)}px`,e.style.right=`${Math.max(8,s)}px`}const pe=[{value:"auto",label:"Auto",description:"WebP when supported, PNG fallback.",requires:[]},{value:"image/webp",label:"WebP",description:"Best compression for most images.",requires:["image/webp"]},{value:"image/avif",label:"AVIF",description:"Smallest size; slower encode.",requires:["image/avif"]},{value:"image/jpeg",label:"JPEG",description:"Universal; no transparency.",requires:["image/jpeg"]},{value:"image/png",label:"PNG",description:"Lossless; preserves transparency.",requires:["image/png"]}];function Ds(t){const{host:e,anchor:n,store:o}=t,i=document.createElement("div");i.className="kalotyp-output-popover-body";const r=document.createElement("label");r.className="kalotyp-output-row";const a=document.createElement("span");a.className="kalotyp-output-row-label",a.textContent="Format",r.appendChild(a);const s=document.createElement("select");s.className="kalotyp-output-format",s.setAttribute("aria-label","Output format");for(const R of pe){const A=document.createElement("option");A.value=R.value,A.textContent=R.label,s.appendChild(A)}s.value=o.get().mimeChoice,s.addEventListener("change",()=>{const R=s.value;o.update(A=>So(A,R))}),r.appendChild(s);const c=document.createElement("p");c.className="kalotyp-output-hint",c.setAttribute("aria-live","polite");const l=document.createElement("label");l.className="kalotyp-output-row";const u=document.createElement("span");u.className="kalotyp-output-row-label",u.textContent="Quality",l.appendChild(u);const d=document.createElement("input");d.type="range",d.className="kalotyp-output-quality",d.min="50",d.max="100",d.step="1",d.value=String(Math.round(o.get().quality*100)),d.setAttribute("aria-label","Output quality"),d.addEventListener("input",()=>{o.update(R=>Eo(R,d.valueAsNumber/100))}),l.appendChild(d);const h=document.createElement("span");h.className="kalotyp-output-quality-readout",h.setAttribute("aria-hidden","true"),h.textContent=`${Math.round(o.get().quality*100)}`,l.appendChild(h);const f=document.createElement("p");f.className="kalotyp-output-summary",f.setAttribute("aria-live","polite");const m=document.createElement("label");m.className="kalotyp-output-metadata-row";const g=document.createElement("input");g.type="checkbox",g.className="kalotyp-output-metadata-checkbox",g.checked=o.get().stripMetadata,g.addEventListener("change",()=>{o.update(R=>Ao(R,g.checked))});const p=document.createElement("span");p.className="kalotyp-output-metadata-text",p.textContent="Strip EXIF, GPS, and camera metadata on save",m.appendChild(g),m.appendChild(p);const w=document.createElement("p");w.className="kalotyp-output-metadata-hint",w.setAttribute("aria-live","polite");const y=document.createElement("footer");y.className="kalotyp-output-footer";const C=document.createElement("button");C.type="button",C.className="kalotyp-output-done",C.textContent="Done",C.setAttribute("aria-label","Close output settings"),C.addEventListener("click",()=>S.close());const E=document.createElement("button");E.type="button",E.className="kalotyp-output-save",E.textContent="Save and close",E.addEventListener("click",()=>{t.canSave()&&t.onSaveAndClose()}),y.appendChild(C),y.appendChild(E),i.appendChild(r),i.appendChild(c),i.appendChild(l),i.appendChild(f),i.appendChild(m),i.appendChild(w),i.appendChild(y),n.setAttribute("aria-expanded","true");const S=he({host:e,anchor:n,title:"Output settings",body:i,variant:"kalotyp-output-popover",showCloseButton:!0,onClose:()=>{n.setAttribute("aria-expanded","false"),H(),t.onClose()}});function M(R){s.value!==R.mimeChoice&&(s.value=R.mimeChoice);const A=Math.round(R.quality*100);d.valueAsNumber!==A&&(d.value=String(A)),h.textContent=String(A);const T=pe.find(O=>O.value===R.mimeChoice);c.textContent=T?.description??"",f.textContent=Hs(R);const $=R.mimeChoice!=="image/png";d.disabled=!$,h.style.opacity=$?"1":"0.4",g.checked!==R.stripMetadata&&(g.checked=R.stripMetadata),w.textContent=Os(R),E.disabled=!t.canSave()}M(o.get());const H=o.subscribe(M);return(async()=>{for(const R of pe){if(R.requires.length===0)continue;if(!(await Promise.all(R.requires.map(T=>dt(T)))).every(Boolean)){const T=s.querySelector(`option[value="${R.value}"]`);T&&(T.disabled=!0,T.textContent=`${R.label} (unsupported)`)}}})(),{close:()=>S.close()}}function Hs(t){if(t.mimeChoice==="image/png")return"PNG · lossless";const e=Math.round(t.quality*100);switch(t.mimeChoice){case"auto":return`Auto · ${e}% quality`;case"image/webp":return`WebP · ${e}% quality`;case"image/avif":return`AVIF · ${e}% quality`;case"image/jpeg":return`JPEG · ${e}% quality`;default:return`${t.mimeChoice} · ${e}% quality`}}function Os(t){return t.stripMetadata?"":t.mimeChoice==="image/jpeg"?"EXIF preserved when the source is also JPEG.":t.mimeChoice==="auto"?"Metadata is preserved only when the resolved output is JPEG.":"Metadata can only be preserved when the output is JPEG."}const X={outputMimeChoice:"auto",outputQuality:.85,outputStripMetadata:!0,rememberAnnotationStyle:!0,rememberFilter:!0,rememberFrame:!0,lastAnnotationColor:"#ff3b30",lastAnnotationStrokeWidth:4,lastFilterPresetId:null,lastFramePresetId:null,lastFrameColor:"#000000"},zs="kalotyp:prefs:v1";function Bs(t){if(typeof t=="string")try{const e=new URL(t),n=e.pathname,o=n.indexOf("/content/"),i=o===-1?"":n.slice(0,o);return`${e.origin}${i}`}catch{}return typeof window<"u"?window.location.origin:"default"}function Vn(t){return`${zs}:${t}`}function _s(t){try{if(typeof localStorage>"u")return X;const e=localStorage.getItem(Vn(t));if(!e)return X;const n=JSON.parse(e);return Qn(n)}catch{return X}}function jn(t,e){try{if(typeof localStorage>"u")return;const n=Qn(e);localStorage.setItem(Vn(t),JSON.stringify(n))}catch{}}function Qn(t){const e=Ws(t.outputMimeChoice)?t.outputMimeChoice:X.outputMimeChoice,n=Jn(t.outputQuality,0,1,X.outputQuality),o=typeof t.outputStripMetadata=="boolean"?t.outputStripMetadata:X.outputStripMetadata,i=typeof t.rememberAnnotationStyle=="boolean"?t.rememberAnnotationStyle:X.rememberAnnotationStyle,r=typeof t.rememberFilter=="boolean"?t.rememberFilter:X.rememberFilter,a=typeof t.rememberFrame=="boolean"?t.rememberFrame:X.rememberFrame,s=typeof t.lastAnnotationColor=="string"?t.lastAnnotationColor:X.lastAnnotationColor,c=Jn(t.lastAnnotationStrokeWidth,1,40,X.lastAnnotationStrokeWidth),l=t.lastFilterPresetId===null||typeof t.lastFilterPresetId=="string"?t.lastFilterPresetId:X.lastFilterPresetId,u=t.lastFramePresetId===null||typeof t.lastFramePresetId=="string"?t.lastFramePresetId:X.lastFramePresetId,d=typeof t.lastFrameColor=="string"?t.lastFrameColor:X.lastFrameColor;return{outputMimeChoice:e,outputQuality:n,outputStripMetadata:o,rememberAnnotationStyle:i,rememberFilter:r,rememberFrame:a,lastAnnotationColor:s,lastAnnotationStrokeWidth:c,lastFilterPresetId:l,lastFramePresetId:u,lastFrameColor:d}}function Ws(t){return t==="auto"||t==="image/png"||t==="image/jpeg"||t==="image/webp"||t==="image/avif"}function Jn(t,e,n,o){return typeof t!="number"||!Number.isFinite(t)?o:t<e?e:t>n?n:t}const qs=[{value:"auto",label:"Auto (recommended)"},{value:"image/webp",label:"WebP"},{value:"image/avif",label:"AVIF"},{value:"image/jpeg",label:"JPEG"},{value:"image/png",label:"PNG"}];function Us(t){let e=t.initial;function n(E){e={...e,...E},t.onChange(e)}const o=document.createElement("div");o.className="kalotyp-preferences-body";const i=document.createElement("section");i.className="kalotyp-preferences-section",i.innerHTML="<h4>Output defaults</h4>";const r=Zn("Format"),a=document.createElement("select");a.className="kalotyp-output-format",a.setAttribute("aria-label","Default output format");for(const E of qs){const S=document.createElement("option");S.value=E.value,S.textContent=E.label,a.appendChild(S)}a.value=e.outputMimeChoice,a.addEventListener("change",()=>{n({outputMimeChoice:a.value})}),r.appendChild(a),i.appendChild(r);const s=Zn("Quality"),c=document.createElement("input");c.type="range",c.className="kalotyp-output-quality",c.min="50",c.max="100",c.step="1",c.value=String(Math.round(e.outputQuality*100)),c.setAttribute("aria-label","Default output quality"),c.addEventListener("input",()=>{n({outputQuality:c.valueAsNumber/100}),l.textContent=String(c.valueAsNumber)});const l=document.createElement("span");l.className="kalotyp-output-quality-readout",l.textContent=String(Math.round(e.outputQuality*100)),l.setAttribute("aria-hidden","true"),s.appendChild(c),s.appendChild(l),i.appendChild(s);const u=Bt("Strip EXIF, GPS, and camera metadata on save",e.outputStripMetadata,E=>n({outputStripMetadata:E}));i.appendChild(u);const d=document.createElement("section");d.className="kalotyp-preferences-section",d.innerHTML="<h4>Remember across sessions</h4>";const h=Bt("Annotation style (colour + stroke width)",e.rememberAnnotationStyle,E=>n({rememberAnnotationStyle:E})),f=Bt("Last filter preset",e.rememberFilter,E=>n({rememberFilter:E})),m=Bt("Last frame preset",e.rememberFrame,E=>n({rememberFrame:E}));d.appendChild(h),d.appendChild(f),d.appendChild(m);const g=document.createElement("footer");g.className="kalotyp-preferences-footer";const p=document.createElement("button");p.type="button",p.className="kalotyp-preferences-reset",p.textContent="Reset to defaults",p.addEventListener("click",()=>{e={...X},t.onChange(e),C(e)});const w=document.createElement("button");w.type="button",w.className="kalotyp-preferences-done",w.textContent="Done",w.addEventListener("click",()=>y.close()),g.appendChild(p),g.appendChild(w),o.appendChild(i),o.appendChild(d),o.appendChild(g);const y=he({host:t.host,title:"Preferences",body:o,variant:"kalotyp-preferences-modal",showCloseButton:!0,onClose:t.onClose});function C(E){a.value=E.outputMimeChoice,c.value=String(Math.round(E.outputQuality*100)),l.textContent=String(Math.round(E.outputQuality*100)),_t(u,E.outputStripMetadata),_t(h,E.rememberAnnotationStyle),_t(f,E.rememberFilter),_t(m,E.rememberFrame)}return{close:()=>y.close()}}function Zn(t){const e=document.createElement("div");e.className="kalotyp-output-row";const n=document.createElement("span");return n.className="kalotyp-output-row-label",n.textContent=t,e.appendChild(n),e}function Bt(t,e,n){const o=document.createElement("label");o.className="kalotyp-preferences-toggle";const i=document.createElement("input");i.type="checkbox",i.checked=e,i.addEventListener("change",()=>n(i.checked));const r=document.createElement("span");return r.textContent=t,o.appendChild(i),o.appendChild(r),o}function _t(t,e){const n=t.querySelector('input[type="checkbox"]');n&&n.checked!==e&&(n.checked=e)}const Xs=[{keys:["?"],description:"Show keyboard shortcuts",context:"editor"},{keys:["Esc"],description:"Close editor (or clear current selection)",context:"editor"},{keys:["Ctrl","Z"],description:"Undo",context:"editor"},{keys:["Ctrl","Shift","Z"],description:"Redo",context:"editor"},{keys:["Ctrl","Y"],description:"Redo (alternate)",context:"editor"},{keys:["Tab"],description:"Move focus to next control",context:"editor"},{keys:["Shift","Tab"],description:"Move focus to previous control",context:"editor"},{keys:["Delete"],description:"Delete the selected shape",context:"annotate"},{keys:["Arrow keys"],description:"Nudge the selected shape by 1 px",context:"annotate"},{keys:["Shift","Arrow keys"],description:"Nudge the selected shape by 10 px",context:"annotate"},{keys:["Shift","while drawing"],description:"Constrain shape (square, 45° line, circle)",context:"annotate"},{keys:["Delete"],description:"Delete the selected redaction region",context:"redact"},{keys:["Arrow keys"],description:"Nudge the selected region by 1 px",context:"redact"},{keys:["Shift","Arrow keys"],description:"Nudge the selected region by 10 px",context:"redact"},{keys:["Enter"],description:"Commit the text and close the editor",context:"text"},{keys:["Shift","Enter"],description:"Insert a line break",context:"text"},{keys:["Esc"],description:"Cancel the in-progress edit",context:"text"}],Ys={editor:"Editor",annotate:"Annotate",redact:"Redact",text:"Text editing"},Gs=["editor","annotate","redact","text"];function Ks(t){const e=document.createElement("div");e.className="kalotyp-cheatsheet-body";for(const o of Gs){const i=Xs.filter(r=>r.context===o);i.length!==0&&e.appendChild(Vs(o,i))}const n=he({host:t.host,title:"Keyboard shortcuts",body:e,variant:"kalotyp-cheatsheet-modal",showCloseButton:!0,onClose:t.onClose});return{close:()=>n.close()}}function Vs(t,e){const n=document.createElement("section");n.className="kalotyp-cheatsheet-section";const o=document.createElement("h4");o.className="kalotyp-cheatsheet-heading",o.textContent=Ys[t],n.appendChild(o);const i=document.createElement("dl");i.className="kalotyp-cheatsheet-list";for(const r of e){const a=document.createElement("dt");a.className="kalotyp-cheatsheet-keys",r.keys.forEach((c,l)=>{if(l>0){const d=document.createElement("span");d.className="kalotyp-cheatsheet-plus",d.setAttribute("aria-hidden","true"),d.textContent="+",a.appendChild(d)}const u=document.createElement("kbd");u.className="kalotyp-cheatsheet-kbd",u.textContent=c,a.appendChild(u)});const s=document.createElement("dd");s.className="kalotyp-cheatsheet-description",s.textContent=r.description,i.appendChild(a),i.appendChild(s)}return n.appendChild(i),n}const js=[[void 0,"Custom"],[1,"Square"],[2,"2:1"],[1.5,"3:2"],[4/3,"4:3"],[1.6,"16:10"],[16/9,"16:9"],[.5,"1:2"],[2/3,"2:3"],[.75,"3:4"],[10/16,"10:16"],[9/16,"9:16"]];async function Qs(t){return t instanceof File?t:t instanceof Blob?new File([t],"kalotyp-image.png",{type:t.type||"image/png"}):Js(t)}async function Js(t){const e=new URL(t,typeof window<"u"?window.location.href:"http://localhost"),n=await fetch(e.href,{credentials:"omit",mode:"cors"});if(!n.ok)throw new Error(`Source fetch failed: ${n.status} ${n.statusText}`);const o=await n.blob(),i=Zs(e,o.type);return new File([o],i,{type:o.type||"application/octet-stream"})}function Zs(t,e){const n=t.pathname.split("/").pop();return n&&/\.[a-z0-9]{2,5}$/i.test(n)?n:`kalotyp-image.${e.split("/")[1]??"bin"}`}const tc={sourceToFile:Qs,loadImage:oo,encodeSourceImage:Fo,createCropPlugin:Qr,createRotatePlugin:ca,createFlipPlugin:ta,createFinetunePlugin:ga,createFilterPlugin:ka,createAnnotatePlugin:is,createRedactPlugin:ks,createResizePlugin:da,createFramePlugin:Rs,runUtilityChain:Oo},me=[{id:"crop",label:"Crop"},{id:"rotate",label:"Rotate"},{id:"flip",label:"Flip"},{id:"filter",label:"Filter"},{id:"finetune",label:"Finetune"},{id:"annotate",label:"Annotate"},{id:"redact",label:"Redact"},{id:"resize",label:"Resize"},{id:"frame",label:"Frame"}];function to(t,e=tc){const n=new rt,o=new rt,i=new ao,r=rc(t),a=document.createElement("div");a.dataset.kalotypHost="",document.body.appendChild(a);let s=!1,c=!1;const l=Bs(t.src);let u=_s(l),d;function h(){d!==void 0&&clearTimeout(d),d=setTimeout(()=>{d=void 0,jn(l,u)},250)}function f(v){u={...u,...v},h()}const m=Ae({mimeChoice:u.outputMimeChoice,quality:u.outputQuality,stripMetadata:u.outputStripMetadata});m.subscribe(v=>{f({outputMimeChoice:v.mimeChoice,outputQuality:v.quality,outputStripMetadata:v.stripMetadata})});let g=null,p=null,w=null;const y={slots:new Map,sourceImage:void 0,sourceName:void 0,sourceFile:void 0,active:void 0,statusElement:void 0,history:void 0,committedChain:[],workingImage:void 0},C=kr({host:a,exportLabel:r,onExportClick:()=>{b()},onCloseClick:()=>{O()},onOutputSettingsClick:()=>{x()},onPrefsClick:()=>{N()}}),E=ic(t),S=Ns(me,E,v=>{W(v)},{panelId:C.utilMain.id});for(const v of S.buttons.values())v.disabled=!0;C.navTools.appendChild(S.container);const M=cc({onUndo:()=>D(),onRedo:()=>G()});M.undoButton.disabled=!0,M.redoButton.disabled=!0,C.modal.appendChild(M.container),C.exportButton.disabled=!0,eo(C.stage,"Loading image…",y);const H=Ts({host:C.editor,initialFocus:C.editor});C.announce("Image editor opened. Use Tab to navigate."),ec(C,t,y,e,S,E,o,i).then(()=>{C.exportButton.disabled=!1;for(const z of S.buttons.values())z.disabled=!1;no(y),_(),ac(y,u,f);const v=y.sourceImage?.width??0,I=y.sourceImage?.height??0;C.announce(`Image loaded. ${v} by ${I} pixels.`)},v=>{const I=v instanceof Error?v.message:"Failed to load image";n.emit("loaderror",{message:I,cause:v}),eo(C.stage,I,y),C.announce(`Failed to load image. ${I}`)});const R=o.on("commit",()=>{c||y.history&&(y.history.commit(bt(y)),_())}),A=o.on("announce",({message:v})=>{C.announce(v)}),T=lc({onUndo:()=>D(),onRedo:()=>G(),onEscape:()=>$(),onCheatsheet:()=>F()});function $(){L||(y.history?.canUndo()??!1)&&!window.confirm("You have unsaved changes. Discard them and close?")||O()}function O(){const v=t.willClose;return(v?v():!0)?(P(),!0):!1}async function W(v){if(!y.sourceImage||y.active?.id===v)return;const I=y.slots.get(v);if(!I)return;U()&&await nc(y,o,i),y.active?.handle.destroy(),y.active=void 0,Gn(S,v,C.utilMain),i.resetPan();const K={source:y.workingImage??y.sourceImage,bus:o,viewport:i},tt=I.plugin.mount(C.stage,K,I.store);y.active={id:v,handle:tt},y.history&&(y.history.commit(bt(y)),_())}function U(){if(!y.active)return!1;const v=y.active.id,I=v==="filter"?"finetune":v,z=y.slots.get(I);return z?!ge(I,z.store.get()):!1}function _(){M.undoButton.disabled=!y.history?.canUndo(),M.redoButton.disabled=!y.history?.canRedo()}function D(){if(!y.history)return;const v=y.history.undo(bt(y));v&&V(v)}function G(){if(!y.history)return;const v=y.history.redo(bt(y));v&&V(v)}async function V(v){c=!0;try{const q=v.snapshot.get(fe);q!==void 0&&(y.committedChain=q.map(K=>({id:K.id,state:K.state})),await oc(y,e));for(const[K,tt]of v.snapshot){if(K===fe)continue;const wt=y.slots.get(K);wt&&wt.store.update(()=>tt)}}finally{c=!1}_();const I=y.active?.id;if(I){const q=y.slots.get(I);if(q&&y.workingImage){y.active?.handle.destroy();const K={source:y.workingImage,bus:o,viewport:i},tt=q.plugin.mount(C.stage,K,q.store);y.active={id:I,handle:tt}}}if(I&&v.changed.has(I))return;const z=Y(v.changed);z&&z!==I&&await W(z)}function Y(v){for(const I of me)if(v.has(I.id))return I.id}function x(){if(g){g.close();return}g=Ds({host:C.editor,anchor:C.outputSettingsButton,store:m,canSave:()=>!s&&!C.exportButton.disabled,onSaveAndClose:()=>{g?.close(),b()},onClose:()=>{g=null}})}function F(){if(w){w.close();return}w=Ks({host:C.editor,onClose:()=>{w=null}})}function N(){if(p){p.close();return}p=Us({host:C.editor,initial:u,onChange:v=>{u=v,m.set({mimeChoice:v.outputMimeChoice,quality:v.outputQuality,stripMetadata:v.outputStripMetadata}),h()},onClose:()=>{p=null}})}async function b(){if(!s&&!(!y.sourceImage||y.slots.size===0)){s=!0;try{const v=y.workingImage??y.sourceImage;let I=v;const z=y.active;if(z){const tt=y.slots.get(z.id);if(tt){const wt=tt.store.get();ge(z.id,wt)||(I=await tt.plugin.bake(wt,v))}}const q={output:m.get(),...y.sourceName?{sourceName:y.sourceName}:{},...y.sourceFile?{sourceBlob:y.sourceFile}:{}},K=await e.encodeSourceImage(I,q);n.emit("process",{dest:K}),C.announce("Image saved."),P()}catch(v){const I=v instanceof Error?v.message:"Failed to export image";n.emit("loaderror",{message:I,cause:v}),C.announce(`Save failed. ${I}`)}finally{s=!1}}}const k=Ps(C.stage,i);let L=!1;function P(){L||(L=!0,g?.close(),g=null,p?.close(),p=null,w?.close(),w=null,d!==void 0&&(clearTimeout(d),d=void 0,jn(l,u)),y.active?.handle.destroy(),R(),A(),T(),k(),i.clear(),H.release(),C.destroy(),a.remove(),n.clear(),o.clear())}return{on(v,I){n.on(v,I)},off(v,I){n.off(v,I)}}}async function ec(t,e,n,o,i,r,a,s){const c=await o.sourceToFile(e.src),l=await o.loadImage(c),u={bitmap:l.element,width:l.width,height:l.height,mimeType:c.type||"image/png"},d=e.cropSelectPresetOptions??js,h=e.cropSelectPresetFilter,f=o.createCropPlugin({presets:d,presetFilter:h,panelHost:t.utilMain}),m=o.createRotatePlugin({panelHost:t.utilMain}),g=o.createFlipPlugin({panelHost:t.utilMain}),p=o.createFinetunePlugin({panelHost:t.utilMain}),w=o.createFilterPlugin({panelHost:t.utilMain}),y=o.createAnnotatePlugin({panelHost:t.utilMain}),C=o.createRedactPlugin({panelHost:t.utilMain}),E=o.createResizePlugin({panelHost:t.utilMain}),S=o.createFramePlugin({panelHost:t.utilMain,labels:sc(e)}),M={source:u,bus:a,viewport:s};ot(n,f,M),ot(n,m,M),ot(n,g,M),ot(n,p,M);const H=n.slots.get("finetune");H&&n.slots.set("filter",{id:"filter",plugin:w,store:H.store}),ot(n,y,M),ot(n,C,M),ot(n,E,M),ot(n,S,M),n.sourceImage=u,n.sourceName=c.name,n.sourceFile=c,n.workingImage=u,n.committedChain=[],n.history=new uo(bt(n));const R=n.slots.get(r);if(!R)return;const A={source:n.workingImage,bus:a,viewport:s},T=R.plugin.mount(t.stage,A,R.store);n.active={id:r,handle:T},Gn(i,r,t.utilMain)}function ot(t,e,n){const o=e.init(n),i=Ae(o);t.slots.set(e.id,{id:e.id,plugin:e,store:i})}const fe="__committedChain__";function bt(t){const e=new Map;for(const[n,o]of t.slots)e.set(n,o.store.get());return e.set(fe,t.committedChain),e}function ge(t,e){switch(t){case"crop":{const n=e;return!n.rect||!n.imageSize?!1:n.rect.x===0&&n.rect.y===0&&n.rect.width===n.imageSize.width&&n.rect.height===n.imageSize.height}case"rotate":{const n=e;return typeof n.quarterTurns!="number"||typeof n.freeAngle!="number"?!1:We(n)}case"flip":{const n=e;return typeof n.horizontal!="boolean"||typeof n.vertical!="boolean"?!1:ze(n)}case"finetune":case"filter":{const n=e;return n?Gt(n):!1}case"annotate":{const n=e.shapes;return Array.isArray(n)&&n.length===0}case"redact":{const n=e.regions;return Array.isArray(n)&&n.length===0}case"resize":{const n=e;return typeof n.scaleX!="number"||typeof n.scaleY!="number"?!1:Xe(n)}case"frame":{const n=e;return n.presetId?gn(n):!1}default:return!0}}async function nc(t,e,n){if(!t.active||!t.workingImage)return;const o=t.active.id,i=o==="filter"?"finetune":o,r=t.slots.get(i);if(!r)return;const a=r.store.get();if(ge(i,a))return;const s=await r.plugin.bake(a,t.workingImage);t.workingImage=s,t.committedChain.push({id:r.id,state:structuredClone(a)});const c={source:t.workingImage,bus:e,viewport:n},l=r.plugin.init(c);r.store.update(()=>l)}async function oc(t,e){if(!t.sourceImage)return;const n=[];for(const o of t.committedChain){const i=t.slots.get(o.id);i&&n.push({id:o.id,plugin:i.plugin,state:o.state})}if(n.length===0){t.workingImage=t.sourceImage;return}t.workingImage=await e.runUtilityChain(n,t.sourceImage)}function ic(t){const e=t.util;if(typeof e!="string")return"crop";for(const n of me)if(n.id===e)return n.id;return"crop"}function eo(t,e,n){no(n);const o=document.createElement("div");o.className="kalotyp-stage-status",o.setAttribute("role","status"),o.textContent=e,t.appendChild(o),n.statusElement=o}function no(t){t.statusElement?.remove(),t.statusElement=void 0}function rc(t){const e=t.locale?.labelButtonExport;return typeof e=="string"&&e.length>0?e:"Save and close"}function ac(t,e,n){if(e.rememberAnnotationStyle){const o=t.slots.get("annotate");if(o){const i=o.store;i.update(r=>({...r,currentStyle:{...r.currentStyle,color:e.lastAnnotationColor,strokeWidth:e.lastAnnotationStrokeWidth}})),i.subscribe(r=>{n({lastAnnotationColor:r.currentStyle.color,lastAnnotationStrokeWidth:r.currentStyle.strokeWidth})})}}if(e.rememberFilter&&e.lastFilterPresetId!==null){const o=t.slots.get("finetune"),i=Vt.find(r=>r.id===e.lastFilterPresetId);o&&i&&o.store.update(()=>i.state)}if(e.rememberFilter){const o=t.slots.get("finetune");o&&o.store.subscribe(r=>{const a=jt(r);n({lastFilterPresetId:a?.id??null})})}if(e.rememberFrame){const o=t.slots.get("frame");if(o){const i=o.store;e.lastFramePresetId&&i.update(()=>({presetId:e.lastFramePresetId,color:e.lastFrameColor})),i.subscribe(r=>{n({lastFramePresetId:r.presetId,lastFrameColor:r.color})})}}}function sc(t){const e=t.frameOptions;if(!Array.isArray(e))return;const n=t.locale??{},o={};for(const i of e){if(!Array.isArray(i))continue;const[r,a]=i,s=r===void 0?"none":r;try{const c=a(n);typeof c=="string"&&c.length>0&&(o[s]=c)}catch{}}return Object.keys(o).length===0?void 0:o}function cc(t){const e=document.createElement("div");e.className="kalotyp-history-controls",e.setAttribute("role","group"),e.setAttribute("aria-label","Edit history");const n=document.createElement("button");n.type="button",n.className="kalotyp-history-button kalotyp-history-undo",n.setAttribute("aria-label","Undo"),n.title="Undo (Ctrl+Z)",n.innerHTML=B("undo"),n.addEventListener("click",t.onUndo);const o=document.createElement("button");return o.type="button",o.className="kalotyp-history-button kalotyp-history-redo",o.setAttribute("aria-label","Redo"),o.title="Redo (Ctrl+Shift+Z)",o.innerHTML=B("redo"),o.addEventListener("click",t.onRedo),e.appendChild(n),e.appendChild(o),{container:e,undoButton:n,redoButton:o}}function lc(t){const e=n=>{if(n.key==="Escape"){n.preventDefault(),t.onEscape();return}const o=n.target;if(uc(o))return;if(n.key==="?"&&!n.ctrlKey&&!n.metaKey&&!n.altKey){n.preventDefault(),t.onCheatsheet();return}if(n.ctrlKey||n.metaKey){if(n.key==="z"||n.key==="Z"){n.preventDefault(),n.shiftKey?t.onRedo():t.onUndo();return}(n.key==="y"||n.key==="Y")&&(n.preventDefault(),t.onRedo())}};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}function uc(t){if(!t)return!1;const e=t.tagName;return e==="INPUT"||e==="TEXTAREA"||e==="SELECT"?!0:t.isContentEditable===!0}function dc(t=globalThis){const e=t.pintura;e&&typeof e=="object"||Object.defineProperty(t,"pintura",{value:{openDefaultEditor:to},writable:!0,configurable:!0,enumerable:!0})}typeof window<"u"&&dc(globalThis),it.openDefaultEditor=to,Object.defineProperty(it,Symbol.toStringTag,{value:"Module"})});
1
+ (function(e,t){typeof exports==`object`&&typeof module<`u`?t(exports):typeof define==`function`&&define.amd?define([`exports`],t):(e=typeof globalThis<`u`?globalThis:e||self,t(e.pintura={}))})(this,function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});function t(e,t){if(i())return{kind:`offscreen`,canvas:new OffscreenCanvas(e,t)};let n=document.createElement(`canvas`);return n.width=e,n.height=t,{kind:`html`,canvas:n}}function n(e){if(e.kind===`offscreen`){let t=e.canvas.getContext(`2d`);if(!t)throw Error(`2D canvas context is not available`);return t}let t=e.canvas.getContext(`2d`);if(!t)throw Error(`2D canvas context is not available`);return t}async function r(e,t,n){return e.kind===`offscreen`?e.canvas.convertToBlob({type:t,quality:n}):new Promise((r,i)=>{e.canvas.toBlob(e=>{e?r(e):i(Error(`toBlob produced null`))},t,n)})}function i(){return typeof OffscreenCanvas>`u`?!1:typeof OffscreenCanvas.prototype.convertToBlob==`function`}var a=new Map;function o(e){let n=a.get(e);if(n)return n;let i=(async()=>{try{let n=await r(t(1,1),e,.5);return n.type===e&&n.size>0}catch{return!1}})();return a.set(e,i),i}async function s(e){if(typeof createImageBitmap==`function`){let t=await c(e);if(t)try{let e=await createImageBitmap(t,{imageOrientation:`from-image`});return{element:e,width:e.width,height:e.height}}catch{}}return l(e)}async function c(e){if(e instanceof Blob)return e;if(typeof fetch!=`function`)return null;try{let t=await fetch(e,{credentials:`omit`});return t.ok?await t.blob():null}catch{return null}}async function l(e){let t=typeof e==`string`?e:URL.createObjectURL(e),n=typeof e!=`string`;try{let e=await new Promise((e,n)=>{let r=new Image;r.crossOrigin=`anonymous`,r.onload=()=>e(r),r.onerror=()=>n(Error(`Failed to load image: ${t}`)),r.src=t});return{element:e,width:e.naturalWidth,height:e.naturalHeight}}finally{n&&URL.revokeObjectURL(t)}}var u=Object.freeze({zoom:1,panX:0,panY:0});function d(e,t,n=u){let r=Math.max(0,e.width-e.padding*2),i=Math.max(0,e.height-e.padding*2);if(t.width<=0||t.height<=0||r<=0||i<=0)return{displayRect:{x:e.padding,y:e.padding,width:0,height:0},scale:0};let a=Math.min(r/t.width,i/t.height)*Math.max(0,n.zoom||0),o=t.width*a,s=t.height*a,c=e.padding+(r-o)/2,l=e.padding+(i-s)/2,d=c+n.panX,p=l+n.panY;return{displayRect:{x:f(d,c,o,r,e.padding),y:f(p,l,s,i,e.padding),width:o,height:s},scale:a}}function f(e,t,n,r,i){if(n<=r)return t;let a=i,o=i+r,s=a+1-n,c=o-1;return e<s?s:e>c?c:e}function p(e,t){return t.scale===0?{x:0,y:0}:{x:(e.x-t.displayRect.x)/t.scale,y:(e.y-t.displayRect.y)/t.scale}}function m(e,t){return{x:t.displayRect.x+e.x*t.scale,y:t.displayRect.y+e.y*t.scale,width:e.width*t.scale,height:e.height*t.scale}}var h=.25,g=class{current;isPinching;listeners;constructor(e=u){this.current=v(e),this.isPinching=!1,this.listeners=new Set}getTransform(){return this.current}getSnapshot(){return{transform:this.current,pinching:this.isPinching}}setTransform(e){let t=v(e);y(this.current,t)||(this.current=t,this.emit())}zoomAt(e,t,n){if(!Number.isFinite(e)||e<=0)return this.current;let r=this.current.zoom,i=_(r*e,h,8);if(i===r)return this.current;let a=i/r,o=t.x-n.x,s=t.y-n.y,c=a*this.current.panX+(1-a)*o,l=a*this.current.panY+(1-a)*s;return this.current={zoom:i,panX:c,panY:l},this.emit(),this.current}panBy(e,t){e===0&&t===0||(this.current={zoom:this.current.zoom,panX:this.current.panX+e,panY:this.current.panY+t},this.emit())}resetToFit(){y(this.current,u)||(this.current=u,this.emit())}resetPan(){this.current.panX===0&&this.current.panY===0||(this.current={zoom:this.current.zoom,panX:0,panY:0},this.emit())}getPinching(){return this.isPinching}setPinching(e){this.isPinching!==e&&(this.isPinching=e,this.emit())}computeViewport(e,t){return d(e,t,this.current)}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}clear(){this.listeners.clear()}emit(){let e=this.getSnapshot();for(let t of this.listeners)t(e)}};function _(e,t,n){return e<t?t:e>n?n:e}function v(e){return{zoom:_(Number.isFinite(e.zoom)?e.zoom:1,h,8),panX:Number.isFinite(e.panX)?e.panX:0,panY:Number.isFinite(e.panY)?e.panY:0}}function y(e,t){return e.zoom===t.zoom&&e.panX===t.panX&&e.panY===t.panY}var b=class{listeners=new Map;on(e,t){let n=this.listeners.get(e);return n||(n=new Set,this.listeners.set(e,n)),n.add(t),()=>{n?.delete(t)}}off(e,t){this.listeners.get(e)?.delete(t)}emit(e,t){let n=this.listeners.get(e);if(n)for(let e of[...n])try{e(t)}catch(e){queueMicrotask(()=>{throw e})}}clear(){this.listeners.clear()}};function x(e,t,n,r){return S({x:e.x+t,y:e.y+n,width:e.width,height:e.height},r)}function S(e,t){let{x:n,y:r,width:i,height:a}=e;return i>t.width&&(i=t.width),a>t.height&&(a=t.height),n<t.x&&(n=t.x),r<t.y&&(r=t.y),n+i>t.x+t.width&&(n=t.x+t.width-i),r+a>t.y+t.height&&(r=t.y+t.height-a),{x:n,y:r,width:i,height:a}}function C(e){return{x:Math.round(e.x),y:Math.round(e.y),width:Math.round(e.width),height:Math.round(e.height)}}var w=class{shadow;undoStack=[];redoStack=[];constructor(e){this.shadow=D(e)}commit(e){T(e,this.shadow)||(this.undoStack.push(this.shadow),this.undoStack.length>50&&this.undoStack.shift(),this.shadow=D(e),this.redoStack.length=0)}canUndo(){return this.undoStack.length>0}canRedo(){return this.redoStack.length>0}undo(e){let t=this.undoStack.pop();return t?(this.redoStack.push(D(e)),this.shadow=t,{snapshot:t,changed:E(e,t)}):null}redo(e){let t=this.redoStack.pop();return t?(this.undoStack.push(D(e)),this.undoStack.length>50&&this.undoStack.shift(),this.shadow=t,{snapshot:t,changed:E(e,t)}):null}size(){return{undo:this.undoStack.length,redo:this.redoStack.length}}};function T(e,t){if(e.size!==t.size)return!1;for(let[n,r]of e)if(!t.has(n)||O(r)!==O(t.get(n)))return!1;return!0}function E(e,t){let n=new Set;for(let[r,i]of t)O(i)!==O(e.get(r))&&n.add(r);for(let r of e.keys())t.has(r)||n.add(r);return n}function D(e){let t=new Map;for(let[n,r]of e)t.set(n,structuredClone(r));return t}function O(e){return JSON.stringify(e,(e,t)=>{if(t&&typeof t==`object`&&!Array.isArray(t)){let e={};for(let n of Object.keys(t).sort())e[n]=t[n];return e}return t})}var k={mimeChoice:`auto`,quality:.85,stripMetadata:!0};function A(e){return Number.isFinite(e)?e<0?0:e>1?1:e:k.quality}function ee(e,t){return e.mimeChoice===t?e:{...e,mimeChoice:t}}function te(e,t){let n=A(t);return e.quality===n?e:{...e,quality:n}}function j(e,t){return e.stripMetadata===t?e:{...e,stripMetadata:t}}var M=[255,216],N=[255,225],P=[69,120,105,102,0,0];async function F(e){if(e.output.type&&e.output.type!==`image/jpeg`)return e.output;let t=await ne(e.source);if(!I(t,M))return e.output;let n=L(t);if(!n)return e.output;let r=await ne(e.output);if(!I(r,M))return e.output;let i=new Uint8Array(r.length+n.length);return i.set(r.subarray(0,2),0),i.set(n,2),i.set(r.subarray(2),2+n.length),new Blob([i],{type:`image/jpeg`})}async function ne(e){return typeof e.arrayBuffer==`function`?new Uint8Array(await e.arrayBuffer()):new Promise((t,n)=>{let r=new FileReader;r.onload=()=>{let e=r.result;e instanceof ArrayBuffer?t(new Uint8Array(e)):n(Error(`FileReader returned a non-ArrayBuffer result`))},r.onerror=()=>n(r.error??Error(`FileReader failed`)),r.readAsArrayBuffer(e)})}function I(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function L(e){let t=2;for(;t+4<=e.length;){if(e[t]!==255)return;let n=e[t+1];if(n===void 0||n===218||n===217)return;let r=e[t+2]!==void 0&&e[t+3]!==void 0?e[t+2]*256+e[t+3]:0;if(r<2)return;let i=t+2+r;if(i>e.length)return;if(e[t]===N[0]&&e[t+1]===N[1]&&R(e,t+4))return e.slice(t,i);t=i}}function R(e,t){for(let n=0;n<P.length;n++)if(e[t+n]!==P[n])return!1;return!0}var z=`image/png`,re=new Set([`image/png`,`image/webp`,`image/avif`]);async function ie(e,t){return e.mimeChoice===`auto`?await o(`image/webp`)?`image/webp`:!re.has(t.mimeType)&&await o(`image/jpeg`)?`image/jpeg`:z:await o(e.mimeChoice)?e.mimeChoice:await o(`image/webp`)?`image/webp`:z}function ae(e,t){let n=se(t);if(!e)return`kalotyp-image.${n}`;let r=ce(e);if(!r)return`kalotyp-image.${n}`;let i=ue(r);return i?`${i}.${n}`:`kalotyp-image.${n}`}async function oe(e,n={}){let i=n.output??k,a=await ie(i,e),o=A(i.quality),s=ae(n.sourceName,a),c=t(e.width,e.height);if(c.kind===`offscreen`){let t=c.canvas.getContext(`2d`);if(!t)throw Error(`2D canvas context is not available`);t.drawImage(e.bitmap,0,0)}else{let t=c.canvas.getContext(`2d`);if(!t)throw Error(`2D canvas context is not available`);t.drawImage(e.bitmap,0,0)}let l=await r(c,a,o),u=n.output?.stripMetadata===!1&&a===`image/jpeg`&&e.mimeType===`image/jpeg`&&n.sourceBlob!==void 0?await F({source:n.sourceBlob,output:l}):l;return new File([u],s,{type:a})}function se(e){if(e===`image/jpeg`)return`jpg`;if(e===`image/png`)return`png`;if(e===`image/webp`)return`webp`;if(e===`image/avif`)return`avif`;let t=e.split(`/`)[1];return t&&t.length>0?t:`bin`}function ce(e){let t=le(e).split(/[/\\]/);return t[t.length-1]}function le(e){let t=e.indexOf(`?`);return t===-1?e:e.slice(0,t)}function ue(e){let t=e.lastIndexOf(`.`);return t<=0?e:e.slice(0,t)}async function de(e,t){let n=t;for(let t of e)n=await t.plugin.bake(t.state,n);return n}var fe=`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`,pe=`"Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", "Android Emoji", sans-serif`,me=[{key:`system`,label:`System`,stack:fe,bunnyName:null,generic:`sans-serif`},{key:`inter`,label:`Inter`,stack:`"Inter", sans-serif`,bunnyName:`inter`,generic:`sans-serif`},{key:`roboto`,label:`Roboto`,stack:`"Roboto", sans-serif`,bunnyName:`roboto`,generic:`sans-serif`},{key:`manrope`,label:`Manrope`,stack:`"Manrope", sans-serif`,bunnyName:`manrope`,generic:`sans-serif`},{key:`poppins`,label:`Poppins`,stack:`"Poppins", sans-serif`,bunnyName:`poppins`,generic:`sans-serif`},{key:`nunito`,label:`Nunito`,stack:`"Nunito", sans-serif`,bunnyName:`nunito`,generic:`sans-serif`},{key:`fira-sans`,label:`Fira Sans`,stack:`"Fira Sans", sans-serif`,bunnyName:`fira-sans`,generic:`sans-serif`},{key:`noto-sans`,label:`Noto Sans`,stack:`"Noto Sans", sans-serif`,bunnyName:`noto-sans`,generic:`sans-serif`},{key:`tenor-sans`,label:`Tenor Sans`,stack:`"Tenor Sans", sans-serif`,bunnyName:`tenor-sans`,generic:`sans-serif`},{key:`space-grotesk`,label:`Space Grotesk`,stack:`"Space Grotesk", sans-serif`,bunnyName:`space-grotesk`,generic:`sans-serif`},{key:`chakra-petch`,label:`Chakra Petch`,stack:`"Chakra Petch", sans-serif`,bunnyName:`chakra-petch`,generic:`sans-serif`},{key:`lora`,label:`Lora`,stack:`"Lora", serif`,bunnyName:`lora`,generic:`serif`},{key:`merriweather`,label:`Merriweather`,stack:`"Merriweather", serif`,bunnyName:`merriweather`,generic:`serif`},{key:`noto-serif`,label:`Noto Serif`,stack:`"Noto Serif", serif`,bunnyName:`noto-serif`,generic:`serif`},{key:`ibm-plex-serif`,label:`IBM Plex Serif`,stack:`"IBM Plex Serif", serif`,bunnyName:`ibm-plex-serif`,generic:`serif`},{key:`cardo`,label:`Cardo`,stack:`"Cardo", serif`,bunnyName:`cardo`,generic:`serif`},{key:`old-standard-tt`,label:`Old Standard TT`,stack:`"Old Standard TT", serif`,bunnyName:`old-standard-tt`,generic:`serif`},{key:`prata`,label:`Prata`,stack:`"Prata", serif`,bunnyName:`prata`,generic:`serif`},{key:`rufina`,label:`Rufina`,stack:`"Rufina", serif`,bunnyName:`rufina`,generic:`serif`},{key:`jetbrains-mono`,label:`JetBrains Mono`,stack:`"JetBrains Mono", monospace`,bunnyName:`jetbrains-mono`,generic:`monospace`},{key:`fira-mono`,label:`Fira Mono`,stack:`"Fira Mono", monospace`,bunnyName:`fira-mono`,generic:`monospace`},{key:`space-mono`,label:`Space Mono`,stack:`"Space Mono", monospace`,bunnyName:`space-mono`,generic:`monospace`}],he=new Map(me.map(e=>[e.key,e]));function ge(e){return he.get(e)?.stack??`-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif`}function _e(e,t=1){return`${e.fontStyle===`italic`?`italic `:``}${e.fontWeight===`bold`?`bold `:``}${e.fontSize*t}px ${ge(e.fontFamily)}`}function ve(e){if(e.length<=1)return[...e];let t=e[0];if(!t)return[];let n=[t],r=t;for(let t=1;t<e.length-1;t++){let i=e[t];if(!i)continue;let a=i.x-r.x,o=i.y-r.y;a*a+o*o<4||(n.push(i),r=i)}let i=e[e.length-1];return i&&i!==r&&n.push(i),n}function ye(e,t){if(t.length===0)return;let n=t[0];if(!n)return;if(t.length===1){e.moveTo(n.x,n.y),e.lineTo(n.x,n.y);return}e.moveTo(n.x,n.y);for(let n=1;n<t.length-1;n++){let r=t[n],i=t[n+1];if(!r||!i)continue;let a=(r.x+i.x)/2,o=(r.y+i.y)/2;e.quadraticCurveTo(r.x,r.y,a,o)}let r=t[t.length-1];r&&e.lineTo(r.x,r.y)}var be=`rgba(255, 235, 59, 0.35)`,xe=`#ff3b30`,Se=`system`,Ce=`😀`;function we(e){let t=Math.min(e.width,e.height);return Math.max(64,Math.round(t*.2))}function Te(e){return(e%360+360)%360}function Ee(){return{color:xe,strokeWidth:4,fillColor:null,fontSize:32,fontFamily:Se,fontWeight:`normal`,fontStyle:`normal`,textAlign:`left`,emoji:Ce}}function De(e){return typeof e.fontFamily==`string`&&(e.fontWeight===`normal`||e.fontWeight===`bold`)&&(e.fontStyle===`normal`||e.fontStyle===`italic`)?e:{...e,fontFamily:typeof e.fontFamily==`string`?e.fontFamily:Se,fontWeight:e.fontWeight===`bold`?`bold`:`normal`,fontStyle:e.fontStyle===`italic`?`italic`:`normal`}}function Oe(e){return{shapes:[],selectedId:null,activeTool:`select`,currentStyle:Ee(),imageSize:e.imageSize,nextShapeNumber:1}}function B(e){return{id:`s_${e.nextShapeNumber.toString(36)}`,nextShapeNumber:e.nextShapeNumber+1}}function ke(e,t){return e.activeTool===t?e:{...e,activeTool:t,selectedId:t===`select`?e.selectedId:null}}function Ae(e,t){return{...e,currentStyle:{...e.currentStyle,...t}}}function V(e,t){return e.selectedId===t?e:{...e,selectedId:t}}function H(e,t){return{...e,shapes:[...e.shapes,t],selectedId:t.id}}function U(e,t){let n=!1,r=e.shapes.map(e=>e.id===t.id?(n=!0,t):e);return n?{...e,shapes:r}:e}function je(e,t){let n=e.shapes.filter(e=>e.id!==t);return n.length===e.shapes.length?e:{...e,shapes:n,selectedId:e.selectedId===t?null:e.selectedId}}function Me(e){let{x:t,y:n,width:r,height:i}=e;return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),{x:t,y:n,width:r,height:i}}function Ne(e,t,n){switch(e.kind){case`text`:return{...e,x:e.x+t,y:e.y+n};case`rect`:case`ellipse`:case`emoji`:return{...e,x:e.x+t,y:e.y+n};case`arrow`:return{...e,x1:e.x1+t,y1:e.y1+n,x2:e.x2+t,y2:e.y2+n};case`freehand`:case`highlight`:return{...e,points:e.points.map(e=>({x:e.x+t,y:e.y+n}))};default:return Pe(e)}}function Pe(e){throw Error(`Unhandled annotation shape kind: ${JSON.stringify(e)}`)}function Fe(e){return e===`text`||e===`rect`||e===`ellipse`||e===`arrow`||e===`emoji`}function Ie(e,t){let{imageSize:n,style:r,id:i}=t,a=Math.min(n.width,n.height),o=n.width/2,s=n.height/2;switch(e){case`rect`:case`ellipse`:{let t=Math.max(80,Math.round(a*.25)),n=Math.round(o-t/2),c=Math.round(s-t/2);return e===`rect`?{id:i,kind:`rect`,x:n,y:c,width:t,height:t,strokeColor:r.color,strokeWidth:r.strokeWidth,fillColor:r.fillColor}:{id:i,kind:`ellipse`,x:n,y:c,width:t,height:t,strokeColor:r.color,strokeWidth:r.strokeWidth,fillColor:r.fillColor}}case`arrow`:{let e=Math.max(100,Math.round(a*.3)),t=Math.round(o-e/2),n=t+e,c=Math.round(s);return{id:i,kind:`arrow`,x1:t,y1:c,x2:n,y2:c,color:r.color,strokeWidth:r.strokeWidth}}case`text`:return{id:i,kind:`text`,x:Math.round(o),y:Math.round(s-r.fontSize/2),text:``,fontSize:r.fontSize,color:r.color,textAlign:r.textAlign,fontFamily:r.fontFamily,fontWeight:r.fontWeight,fontStyle:r.fontStyle};case`emoji`:{let e=we(n);return{id:i,kind:`emoji`,x:Math.round(o-e/2),y:Math.round(s-e/2),emoji:r.emoji,size:e,rotation:0}}}}var Le=1.2;function Re(e){return e.length===0?[``]:e.split(`
2
+ `)}function ze(e,t){let n=Re(e.text),r=0;for(let e of n){let n=t(e);n>r&&(r=n)}return r=Math.max(r,e.fontSize*.6),{lines:n,width:r,height:n.length*e.fontSize*Le}}function Be(e,t){return e.length*t*.55}function Ve(e,t,n){switch(n){case`left`:return 0;case`center`:return(e-t)/2;case`right`:return e-t}}var He=400;async function Ue(e){if(typeof document>`u`||!(`fonts`in document))return;let t=new Set;for(let n of e)n.kind===`text`&&t.add(_e(De(n)));if(t.size===0)return;let n=new Promise(e=>setTimeout(e,He)),r=Promise.all([...t].map(e=>document.fonts.load(e))).then(()=>document.fonts.ready).then(()=>void 0).catch(()=>void 0);await Promise.race([r,n])}async function We(e,r,i){if(e.shapes.length===0)return r;await Ue(e.shapes);let a=t(r.width,r.height),o=n(a);o.imageSmoothingEnabled=!0,o.imageSmoothingQuality=`high`,o.drawImage(r.bitmap,0,0,r.width,r.height);for(let t of e.shapes)Ge(o,t,i);return{bitmap:a.canvas,width:r.width,height:r.height,mimeType:r.mimeType}}function Ge(e,t,n){switch(t.kind){case`text`:qe(e,t);return;case`rect`:Je(e,t);return;case`ellipse`:Ye(e,t);return;case`arrow`:Xe(e,t);return;case`freehand`:Ze(e,t);return;case`highlight`:Qe(e,t);return;case`emoji`:Ke(e,t,n?.resolveEmojiImage);return;default:Pe(t)}}function Ke(e,t,n){let r=n?.(t.emoji)??null;if(e.save(),t.rotation){let n=t.x+t.size/2,r=t.y+t.size/2;e.translate(n,r),e.rotate(t.rotation*Math.PI/180),e.translate(-n,-r)}r?e.drawImage(r,t.x,t.y,t.size,t.size):(e.textAlign=`left`,e.textBaseline=`top`,e.font=`${t.size}px ${pe}`,e.fillText(t.emoji,t.x,t.y)),e.restore()}function qe(e,t){let n=De(t);e.save(),e.fillStyle=n.color,e.font=_e(n),e.textAlign=`left`,e.textBaseline=`top`;let r=Re(n.text),i=r.map(t=>e.measureText(t).width),a=i.reduce((e,t)=>t>e?t:e,0),o=n.fontSize*Le;for(let t=0;t<r.length;t++){let s=r[t];if(s===void 0)continue;let c=Ve(a,i[t]??0,n.textAlign);e.fillText(s,n.x+c,n.y+t*o)}e.restore()}function Je(e,t){e.save(),t.fillColor!==null&&(e.fillStyle=t.fillColor,e.fillRect(t.x,t.y,t.width,t.height)),t.strokeWidth>0&&(e.strokeStyle=t.strokeColor,e.lineWidth=t.strokeWidth,e.lineJoin=`miter`,e.strokeRect(t.x,t.y,t.width,t.height)),e.restore()}function Ye(e,t){e.save();let n=t.width/2,r=t.height/2,i=t.x+n,a=t.y+r;e.beginPath(),e.ellipse(i,a,Math.max(0,n),Math.max(0,r),0,0,Math.PI*2),t.fillColor!==null&&(e.fillStyle=t.fillColor,e.fill()),t.strokeWidth>0&&(e.strokeStyle=t.strokeColor,e.lineWidth=t.strokeWidth,e.stroke()),e.restore()}function Xe(e,t){let n=t.x2-t.x1,r=t.y2-t.y1,i=Math.sqrt(n*n+r*r);if(i<.5)return;e.save(),e.strokeStyle=t.color,e.fillStyle=t.color,e.lineWidth=t.strokeWidth,e.lineCap=`round`,e.lineJoin=`round`;let a=Math.min(Math.max(t.strokeWidth*5,28),i*.6),o=Math.max(t.strokeWidth*4,18),s=n/i,c=r/i,l=t.x2-s*a*.6,u=t.y2-c*a*.6;e.beginPath(),e.moveTo(t.x1,t.y1),e.lineTo(l,u),e.stroke();let d=t.x2-s*a,f=t.y2-c*a,p=-c,m=s;e.beginPath(),e.moveTo(t.x2,t.y2),e.lineTo(d+p*o/2,f+m*o/2),e.lineTo(d-p*o/2,f-m*o/2),e.closePath(),e.fill(),e.restore()}function Ze(e,t){t.points.length!==0&&(e.save(),e.strokeStyle=t.color,e.lineWidth=t.strokeWidth,e.lineCap=`round`,e.lineJoin=`round`,e.beginPath(),ye(e,t.points),e.stroke(),e.restore())}function Qe(e,t){t.points.length!==0&&(e.save(),e.globalCompositeOperation=`multiply`,e.strokeStyle=t.color,e.lineWidth=t.strokeWidth,e.lineCap=`round`,e.lineJoin=`round`,e.beginPath(),ye(e,t.points),e.stroke(),e.restore())}function W(e){switch(e.kind){case`text`:{let t=De(e),{width:n,height:r}=ze(t,e=>Be(e,t.fontSize));return{x:t.x,y:t.y,width:n,height:r}}case`rect`:case`ellipse`:return{x:e.x,y:e.y,width:e.width,height:e.height};case`emoji`:return{x:e.x,y:e.y,width:e.size,height:e.size};case`arrow`:return{x:Math.min(e.x1,e.x2),y:Math.min(e.y1,e.y2),width:Math.abs(e.x2-e.x1),height:Math.abs(e.y2-e.y1)};case`freehand`:case`highlight`:{let t=e.points[0];if(!t)return{x:0,y:0,width:0,height:0};let n=t.x,r=t.y,i=t.x,a=t.y;for(let t of e.points)t.x<n&&(n=t.x),t.x>i&&(i=t.x),t.y<r&&(r=t.y),t.y>a&&(a=t.y);return{x:n,y:r,width:i-n,height:a-r}}default:return Pe(e)}}var $e=[`tl`,`tr`,`bl`,`br`,`t`,`r`,`b`,`l`];function et(e){let t=e.x,n=e.x+e.width,r=e.y,i=e.y+e.height,a=e.x+e.width/2,o=e.y+e.height/2;return{tl:{x:t,y:r},tr:{x:n,y:r},bl:{x:t,y:i},br:{x:n,y:i},t:{x:a,y:r},r:{x:n,y:o},b:{x:a,y:i},l:{x:t,y:o}}}function tt(e,t,n){let r=e.x,i=e.y,a=e.x+e.width,o=e.y+e.height;return(t===`tl`||t===`l`||t===`bl`)&&(r=n.x),(t===`tr`||t===`r`||t===`br`)&&(a=n.x),(t===`tl`||t===`t`||t===`tr`)&&(i=n.y),(t===`bl`||t===`b`||t===`br`)&&(o=n.y),{x:r,y:i,width:a-r,height:o-i}}function nt(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r&&rt(r,t))return r}}function rt(e,t){switch(e.kind){case`text`:return G(t,W(e));case`emoji`:{let n=W(e);if(!e.rotation)return G(t,n);let r=n.x+n.width/2,i=n.y+n.height/2,a=-e.rotation*Math.PI/180,o=t.x-r,s=t.y-i;return G({x:r+o*Math.cos(a)-s*Math.sin(a),y:i+o*Math.sin(a)+s*Math.cos(a)},n)}case`rect`:{let n=G(t,at(e));if(e.fillColor!==null)return n;let r=it(at(e),e.strokeWidth/2+4),i=it(at(e),-(e.strokeWidth/2+4));return G(t,r)&&!G(t,i)}case`ellipse`:{let n=at(e),r=n.width/2,i=n.height/2,a=n.x+r,o=n.y+i;if(r<=0||i<=0)return!1;let s=(t.x-a)/r,c=(t.y-o)/i,l=s*s+c*c,u=(e.strokeWidth/2+4)/Math.min(r,i);return e.fillColor===null?l<=(1+u)**2&&l>=(1-u)**2:l<=(1+u)**2}case`arrow`:return ot(t,{x:e.x1,y:e.y1},{x:e.x2,y:e.y2},e.strokeWidth/2+4);case`freehand`:case`highlight`:{if(!G(t,it(W(e),e.strokeWidth/2+4)))return!1;let n=e.strokeWidth/2+4;for(let r=1;r<e.points.length;r++){let i=e.points[r-1],a=e.points[r];if(i&&a&&ot(t,i,a,n))return!0}if(e.points.length===1){let r=e.points[0];if(!r)return!1;let i=r.x-t.x,a=r.y-t.y;return i*i+a*a<=n*n}return!1}default:return Pe(e)}}function G(e,t){return e.x>=t.x&&e.y>=t.y&&e.x<=t.x+t.width&&e.y<=t.y+t.height}function it(e,t){return{x:e.x-t,y:e.y-t,width:e.width+t*2,height:e.height+t*2}}function at(e){let{x:t,y:n,width:r,height:i}=e;return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),{x:t,y:n,width:r,height:i}}function ot(e,t,n,r){let i=n.x-t.x,a=n.y-t.y,o=i*i+a*a;if(o===0){let n=e.x-t.x,i=e.y-t.y;return n*n+i*i<=r*r}let s=((e.x-t.x)*i+(e.y-t.y)*a)/o;s<0?s=0:s>1&&(s=1);let c=t.x+s*i,l=t.y+s*a,u=e.x-c,d=e.y-l;return u*u+d*d<=r*r}function st(e,t){if(t<=0||e.width<=0||e.height<=0)return{x:e.x,y:e.y,width:0,height:0};let n=e.width/e.height,r,i;return t>=n?(r=e.width,i=r/t):(i=e.height,r=i*t),{x:e.x+(e.width-r)/2,y:e.y+(e.height-i)/2,width:r,height:i}}function ct(e,t,n,r){if(t<=0)return e;if(e.width<=0||e.height<=0)return st(r,t);let i=e.width/e.height,a,o;i>t?(o=e.height,a=o*t):(a=e.width,o=a/t);let s=S(ut(e,a,o,n),r),c=s.height===0?0:s.width/s.height;return Math.abs(c-t)<=lt?s:dt(s,t,n)}var lt=1e-6;function ut(e,t,n,r){switch(r){case`tl`:return{x:e.x,y:e.y,width:t,height:n};case`tr`:return{x:e.x+e.width-t,y:e.y,width:t,height:n};case`bl`:return{x:e.x,y:e.y+e.height-n,width:t,height:n};case`br`:return{x:e.x+e.width-t,y:e.y+e.height-n,width:t,height:n};case`center`:return{x:e.x+(e.width-t)/2,y:e.y+(e.height-n)/2,width:t,height:n}}}function dt(e,t,n){let r=st(e,t);return ut(e,r.width,r.height,n)}function ft(e,n){let r=C(n.rect),i=pt(r.x,0,e.width),a=pt(r.y,0,e.height),o=pt(r.width,1,e.width-i),s=pt(r.height,1,e.height-a),c=t(o,s);if(c.kind===`offscreen`){let t=c.canvas.getContext(`2d`);if(!t)throw Error(`2D canvas context is not available`);return t.drawImage(e.bitmap,i,a,o,s,0,0,o,s),{bitmap:c.canvas,width:o,height:s,mimeType:e.mimeType}}let l=c.canvas.getContext(`2d`);if(!l)throw Error(`2D canvas context is not available`);return l.drawImage(e.bitmap,i,a,o,s,0,0,o,s),{bitmap:c.canvas,width:o,height:s,mimeType:e.mimeType}}function pt(e,t,n){return Math.max(t,Math.min(n,e))}function mt(e,t){let[n]=e;return n===void 0||t===void 0?!0:t===`landscape`?n>=1:t===`portrait`?n<1:!0}function ht(e,t){return e.filter(e=>mt(e,t))}function gt(e,t,n,r){let i=r.minSize??1,a=e.x,o=e.y,s=e.x+e.width,c=e.y+e.height,l=a,u=o,d=s,f=c;(t===`tl`||t===`l`||t===`bl`)&&(l=n.x),(t===`tr`||t===`r`||t===`br`)&&(d=n.x),(t===`tl`||t===`t`||t===`tr`)&&(u=n.y),(t===`bl`||t===`b`||t===`br`)&&(f=n.y),(t===`l`||t===`r`)&&(u=o,f=c),(t===`t`||t===`b`)&&(l=a,d=s);let p=Math.min(l,d),m=Math.min(u,f),h=Math.abs(d-l),g=Math.abs(f-u);h<i&&(h=i,t===`tl`||t===`l`||t===`bl`?p=s-i:(t===`tr`||t===`r`||t===`br`)&&(p=a)),g<i&&(g=i,t===`tl`||t===`t`||t===`tr`?m=c-i:(t===`bl`||t===`b`||t===`br`)&&(m=o));let _={x:p,y:m,width:h,height:g};return _=S(_,r.bounds),r.aspectRatio!==void 0&&r.aspectRatio>0&&(_=ct(_,r.aspectRatio,_t(t),r.bounds)),_}function _t(e){switch(e){case`tl`:return`br`;case`tr`:return`bl`;case`bl`:return`tr`;case`br`:return`tl`;case`t`:return`bl`;case`b`:return`tl`;case`l`:return`tr`;case`r`:return`tl`}}function vt(e){return{rect:{x:0,y:0,width:e.imageSize.width,height:e.imageSize.height},aspectRatio:void 0,activePresetIndex:bt(e.presets),presets:e.presets,imageSize:e.imageSize}}function yt(e,t){let n=e.presets[t];if(!n)return e;let[r]=n;if(r===void 0)return{...e,aspectRatio:void 0,activePresetIndex:t};let i=st({x:0,y:0,width:e.imageSize.width,height:e.imageSize.height},r);return{...e,rect:i,aspectRatio:r,activePresetIndex:t}}function bt(e){return e.findIndex(([e])=>e===void 0)}var xt=-100,K={brightness:0,contrast:0,saturation:0,exposure:0,clarity:0,gamma:0},St=[{key:`brightness`,label:`Brightness`},{key:`contrast`,label:`Contrast`},{key:`saturation`,label:`Saturation`},{key:`exposure`,label:`Exposure`},{key:`clarity`,label:`Clarity`},{key:`gamma`,label:`Gamma`}];function Ct(){return K}function wt(e){return e.brightness===0&&e.contrast===0&&e.saturation===0&&e.exposure===0&&e.clarity===0&&e.gamma===0}function Tt(e,t,n){let r=Ot(n);return e[t]===r?e:{...e,[t]:r}}function Et(e,t){return e[t]===0?e:{...e,[t]:0}}function Dt(){return K}function Ot(e){return Number.isNaN(e)?0:e<=-100?xt:e>=100?100:Math.round(e/1)*1}var kt=[{id:`none`,label:`None`,state:K},{id:`vivid`,label:`Vivid`,state:{brightness:0,contrast:10,saturation:40,exposure:0,clarity:5,gamma:0}},{id:`mono`,label:`Mono`,state:{brightness:0,contrast:15,saturation:-100,exposure:0,clarity:0,gamma:0}},{id:`soft`,label:`Soft`,state:{brightness:5,contrast:-10,saturation:0,exposure:0,clarity:-25,gamma:0}},{id:`punch`,label:`Punch`,state:{brightness:0,contrast:30,saturation:5,exposure:0,clarity:25,gamma:0}},{id:`mute`,label:`Mute`,state:{brightness:0,contrast:5,saturation:-50,exposure:0,clarity:-5,gamma:0}},{id:`bright`,label:`Bright`,state:{brightness:5,contrast:5,saturation:0,exposure:15,clarity:0,gamma:0}}];function At(e,t){return e.brightness===t.brightness&&e.contrast===t.contrast&&e.saturation===t.saturation&&e.exposure===t.exposure&&e.clarity===t.clarity&&e.gamma===t.gamma}function jt(e){for(let t of kt)if(At(t.state,e))return t}function Mt(e){let t=new Uint8ClampedArray(256),n=e.brightness/200,r=1+e.contrast/100,i=1+e.exposure/200,a=Nt(e.gamma);for(let e=0;e<256;e++){let o=e/255;o*=i,o=(o-.5)*r+.5,o+=n,o<0?o=0:o>1&&(o=1),o**=a,o<0?o=0:o>1&&(o=1),t[e]=Math.round(o*255)}return t}function Nt(e){return e===0?1:e>0?1-e/100*.5:1+1*(-e/100)}function Pt(e,t,n,r){let i=e.length;if(t.length!==i)throw Error(`applyFinetuneLutAndSaturation: src/dst length mismatch`);let a=1+r.saturation/100;if(a===1){for(let r=0;r<i;r+=4)t[r]=n[e[r]],t[r+1]=n[e[r+1]],t[r+2]=n[e[r+2]],t[r+3]=e[r+3];return}for(let r=0;r<i;r+=4){let i=n[e[r]],o=n[e[r+1]],s=n[e[r+2]],c=.2126*i+.7152*o+.0722*s,l=c+(i-c)*a,u=c+(o-c)*a,d=c+(s-c)*a;l<0?l=0:l>255&&(l=255),u<0?u=0:u>255&&(u=255),d<0?d=0:d>255&&(d=255),t[r]=l,t[r+1]=u,t[r+2]=d,t[r+3]=e[r+3]}}function Ft(e,t,n){if(n===0)return;let r=e.length;if(t.length!==r)throw Error(`applyClarity: dst/blurred length mismatch`);let i=n/100;for(let n=0;n<r;n+=4){let r=e[n],a=e[n+1],o=e[n+2],s=r+i*(r-t[n]),c=a+i*(a-t[n+1]),l=o+i*(o-t[n+2]);s<0?s=0:s>255&&(s=255),c<0?c=0:c>255&&(c=255),l<0?l=0:l>255&&(l=255),e[n]=s,e[n+1]=c,e[n+2]=l}}function It(e,t,n,r,i){if(e.length!==t.length||e.length!==n.length)throw Error(`boxBlur3x3: buffer length mismatch`);for(let n=0;n<i;n++)for(let i=0;i<r;i++){let a=i===0?0:i-1,o=i===r-1?r-1:i+1,s=(n*r+i)*4,c=(n*r+a)*4,l=(n*r+o)*4;t[s]=(e[c]+e[s]+e[l])/3,t[s+1]=(e[c+1]+e[s+1]+e[l+1])/3,t[s+2]=(e[c+2]+e[s+2]+e[l+2])/3,t[s+3]=e[s+3]}for(let e=0;e<i;e++){let a=e===0?0:e-1,o=e===i-1?i-1:e+1;for(let i=0;i<r;i++){let s=(e*r+i)*4,c=(a*r+i)*4,l=(o*r+i)*4;n[s]=(t[c]+t[s]+t[l])/3,n[s+1]=(t[c+1]+t[s+1]+t[l+1])/3,n[s+2]=(t[c+2]+t[s+2]+t[l+2])/3,n[s+3]=t[s+3]}}}function Lt(e,t,n){if(t.width!==n.width||t.height!==n.height||t.data.length!==n.data.length)throw Error(`applyFinetuneToImageData: baseline/dst dimensions mismatch`);let r=Mt(e);if(Pt(t.data,n.data,r,e),e.clarity!==0){let r=new Uint8ClampedArray(t.data.length),i=new Uint8ClampedArray(t.data.length);It(t.data,r,i,t.width,t.height),Ft(n.data,i,e.clarity)}}async function Rt(e,r){if(wt(e))return r;let i=t(r.width,r.height),a=n(i);a.imageSmoothingEnabled=!0,a.imageSmoothingQuality=`high`,a.drawImage(r.bitmap,0,0,r.width,r.height);let o=a.getImageData(0,0,r.width,r.height);if(e.clarity===0)Lt(e,o,o),a.putImageData(o,0,0);else{let t=new ImageData(new Uint8ClampedArray(o.data.length),o.width,o.height);Lt(e,o,t),a.putImageData(t,0,0)}return{bitmap:i.canvas,width:r.width,height:r.height,mimeType:r.mimeType}}function zt(){return{horizontal:!1,vertical:!1}}function Bt(e,t){return t===`horizontal`?{...e,horizontal:!e.horizontal}:{...e,vertical:!e.vertical}}function Vt(e){return!e.horizontal&&!e.vertical}async function Ht(e,r){if(Vt(e))return r;let{width:i,height:a}=r,o=t(i,a),s=n(o),c=e.horizontal?-1:1,l=e.vertical?-1:1,u=e.horizontal?i:0,d=e.vertical?a:0;return s.setTransform(c,0,0,l,u,d),s.drawImage(r.bitmap,0,0),{bitmap:o.canvas,width:i,height:a,mimeType:r.mimeType}}var Ut=[{id:`none`,label:`None`,acceptsColor:!1,defaultColor:`#000000`},{id:`solidSharp`,label:`Mat Sharp`,acceptsColor:!0,defaultColor:`#000000`},{id:`solidRound`,label:`Mat Round`,acceptsColor:!0,defaultColor:`#000000`},{id:`lineSingle`,label:`Line Single`,acceptsColor:!0,defaultColor:`#000000`},{id:`hook`,label:`Corner Hooks`,acceptsColor:!0,defaultColor:`#000000`},{id:`polaroid`,label:`Polaroid`,acceptsColor:!0,defaultColor:`#ffffff`}],Wt={presetId:`none`,color:`#000000`};function Gt(){return Wt}function Kt(e){return e.presetId===`none`}function qt(e,t){if(e.presetId===t)return e;let n=Yt(e.presetId),r=Yt(t);return r?{presetId:t,color:n!==void 0&&e.color===n.defaultColor?r.defaultColor:e.color}:{...e,presetId:t}}function Jt(e,t){return e.color===t?e:{...e,color:t}}function Yt(e){return Ut.find(t=>t.id===e)}async function Xt(e,t){return Kt(e)?t:e.presetId===`polaroid`?an(e.color,t):e.presetId===`none`?t:Zt(e.presetId,e.color,t)}function Zt(e,r,i){let a=t(i.width,i.height),o=n(a);return o.drawImage(i.bitmap,0,0,i.width,i.height),Qt(o,e,r,i.width,i.height),{bitmap:a.canvas,width:i.width,height:i.height,mimeType:i.mimeType}}function Qt(e,t,n,r,i){switch(t){case`solidSharp`:$t(e,n,r,i);return;case`solidRound`:en(e,n,r,i);return;case`lineSingle`:nn(e,n,r,i);return;case`hook`:rn(e,n,r,i);return}}function $t(e,t,n,r){let i=on(n,r);e.save(),e.fillStyle=t,e.fillRect(0,0,n,i),e.fillRect(0,r-i,n,i),e.fillRect(0,i,i,r-2*i),e.fillRect(n-i,i,i,r-2*i),e.restore()}function en(e,t,n,r){let i=on(n,r);$t(e,t,n,r),e.save(),e.globalCompositeOperation=`destination-out`,e.fillStyle=`#000`,tn(e,0,0,i,`tl`),tn(e,n,0,i,`tr`),tn(e,0,r,i,`bl`),tn(e,n,r,i,`br`),e.restore()}function tn(e,t,n,r,i){switch(e.beginPath(),e.moveTo(t,n),i){case`tl`:e.lineTo(t+r,n),e.arc(t+r,n+r,r,-Math.PI/2,Math.PI,!0),e.lineTo(t,n);break;case`tr`:e.lineTo(t,n+r),e.arc(t-r,n+r,r,0,-Math.PI/2,!0),e.lineTo(t,n);break;case`bl`:e.lineTo(t+r,n),e.arc(t+r,n-r,r,Math.PI/2,Math.PI,!1),e.lineTo(t,n);break;case`br`:e.lineTo(t-r,n),e.arc(t-r,n-r,r,Math.PI/2,0,!0),e.lineTo(t,n);break}e.closePath(),e.fill()}function nn(e,t,n,r){let i=Math.round(Math.min(n,r)*.05),a=Math.max(2,Math.round(Math.min(n,r)*.01));e.save(),e.strokeStyle=t,e.lineWidth=a;let o=a/2;e.strokeRect(i+o,i+o,n-2*i-a,r-2*i-a),e.restore()}function rn(e,t,n,r){let i=Math.round(Math.min(n,r)*.08),a=Math.max(2,Math.round(Math.min(n,r)*.01)),o=Math.round(Math.min(n,r)*.05);e.save(),e.strokeStyle=t,e.lineWidth=a,e.lineCap=`square`;let s=a/2,c=(t,n,r,a)=>{e.beginPath(),e.moveTo(t+r*i,n),e.lineTo(t,n),e.lineTo(t,n+a*i),e.stroke()};c(o+s,o+s,1,1),c(n-o-s,o+s,-1,1),c(o+s,r-o-s,1,-1),c(n-o-s,r-o-s,-1,-1),e.restore()}function an(e,r){let i=Math.min(r.width,r.height),a=Math.round(i*.05),o=a,s=a,c=Math.round(i*.18),l=r.width+o+s,u=r.height+a+c,d=t(l,u),f=n(d);return f.fillStyle=e,f.fillRect(0,0,l,u),f.drawImage(r.bitmap,o,a,r.width,r.height),{bitmap:d.canvas,width:l,height:u,mimeType:r.mimeType}}function on(e,t){return Math.max(4,Math.round(Math.min(e,t)*.04))}function sn(e,t,n){if(e!==`polaroid`)return{width:t,height:n};let r=Math.min(t,n),i=Math.round(r*.05),a=Math.round(r*.18);return{width:t+2*i,height:n+i+a}}async function cn(e,r){if(e.regions.length===0)return r;let i=t(r.width,r.height),a=n(i);a.drawImage(r.bitmap,0,0,r.width,r.height);for(let t of e.regions)ln(a,i.canvas,t,r);return{bitmap:i.canvas,width:r.width,height:r.height,mimeType:r.mimeType}}function ln(e,t,n,r){let i=Math.round(n.width),a=Math.round(n.height);if(i<1||a<1)return;let o=Math.round(n.x),s=Math.round(n.y);switch(n.mode){case`solid`:un(e,n,o,s,i,a);return;case`pixelate`:dn(e,t,r,o,s,i,a);return;case`blur`:fn(e,t,r,o,s,i,a);return}}function un(e,t,n,r,i,a){e.save(),e.fillStyle=t.color,e.fillRect(n,r,i,a),e.restore()}function dn(e,t,n,r,i,a,o){let s=Math.max(a,o),c=Math.max(4,Math.round(8*Math.min(1,s/240))),l=Math.max(1,Math.round(a/s*c)),u=Math.max(1,Math.round(o/s*c));e.save();let d=pn(l,u);if(!d){e.restore();return}d.ctx.imageSmoothingEnabled=!0,d.ctx.imageSmoothingQuality=`low`,d.ctx.drawImage(t,r,i,a,o,0,0,l,u),e.imageSmoothingEnabled=!1,e.drawImage(d.canvas,0,0,l,u,r,i,a,o),e.restore()}function fn(e,t,n,r,i,a,o){let s=1/8,c=Math.max(1,Math.round(a*s)),l=Math.max(1,Math.round(o*s)),u=pn(c,l);if(!u)return;u.ctx.imageSmoothingEnabled=!0,u.ctx.imageSmoothingQuality=`high`,u.ctx.drawImage(t,r,i,a,o,0,0,c,l);let d=Math.max(1,Math.round(c*.5)),f=Math.max(1,Math.round(l*.5)),p=pn(d,f);if(!p){e.save(),e.imageSmoothingEnabled=!0,e.imageSmoothingQuality=`high`,e.drawImage(u.canvas,0,0,c,l,r,i,a,o),e.restore();return}p.ctx.imageSmoothingEnabled=!0,p.ctx.imageSmoothingQuality=`high`,p.ctx.drawImage(u.canvas,0,0,c,l,0,0,d,f),e.save(),e.imageSmoothingEnabled=!0,e.imageSmoothingQuality=`high`,e.drawImage(p.canvas,0,0,d,f,r,i,a,o),e.restore()}function pn(e,t){if(typeof OffscreenCanvas<`u`)try{let n=new OffscreenCanvas(e,t),r=n.getContext(`2d`);if(r)return{canvas:n,ctx:r}}catch{}if(typeof document>`u`)return null;let n=document.createElement(`canvas`);n.width=e,n.height=t;let r=n.getContext(`2d`);return r?{canvas:n,ctx:r}:null}var mn=`#000000`,hn=`pixelate`;function gn(e){return{regions:[],nextRegionNumber:1,selectedId:null,currentMode:hn,currentColor:mn,imageSize:e.imageSize}}function _n(e){return{id:`r_${e.nextRegionNumber.toString(36)}`,nextRegionNumber:e.nextRegionNumber+1}}function vn(e,t){return{...e,regions:[...e.regions,t],selectedId:t.id}}function q(e,t){let n=!1,r=e.regions.map(e=>e.id===t.id?(n=!0,t):e);return n?{...e,regions:r}:e}function yn(e,t){let n=e.regions.filter(e=>e.id!==t);return n.length===e.regions.length?e:{...e,regions:n,selectedId:e.selectedId===t?null:e.selectedId}}function bn(e,t){return e.selectedId===t?e:{...e,selectedId:t}}function xn(e,t){return e.currentMode===t?e:{...e,currentMode:t}}function Sn(e,t){return e.currentColor===t?e:{...e,currentColor:t}}function Cn(e,t,n){let r=e.regions.find(e=>e.id===t);return!r||r.mode===n?e:q(e,{...r,mode:n})}function wn(e,t,n){let r=e.regions.find(e=>e.id===t);return!r||r.color===n?e:q(e,{...r,color:n})}function J(e){return e.selectedId===null?null:e.regions.find(t=>t.id===e.selectedId)??null}function Tn(e){let{x:t,y:n,width:r,height:i}=e;return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),{x:t,y:n,width:r,height:i}}function En(e){let{imageSize:t,mode:n,color:r,id:i}=e,a=Math.min(t.width,t.height),o=Math.max(80,Math.round(a*.25)),s=t.width/2,c=t.height/2;return{id:i,x:Math.round(s-o/2),y:Math.round(c-o/2),width:o,height:o,mode:n,color:r}}function Dn(e,t){if(e.imageSize.width===t.width&&e.imageSize.height===t.height)return e;let n=[];for(let r of e.regions)r.x+r.width<=0||r.y+r.height<=0||r.x>=t.width||r.y>=t.height||n.push(On(r,t));let r=e.selectedId!==null&&!n.some(t=>t.id===e.selectedId);return{...e,regions:n,imageSize:{width:t.width,height:t.height},selectedId:r?null:e.selectedId}}function On(e,t){let n=Math.max(0,e.x),r=Math.max(0,e.y),i=Math.min(t.width,e.x+e.width),a=Math.min(t.height,e.y+e.height);return{...e,x:n,y:r,width:Math.max(0,i-n),height:Math.max(0,a-r)}}var kn=8e3;function An(){return{scaleX:1,scaleY:1,lockAspect:!0}}function jn(e){return Math.abs(e.scaleX-1)<1e-9&&Math.abs(e.scaleY-1)<1e-9}function Mn(e,t){return{width:Ln(Math.round(t.width*e.scaleX)),height:Ln(Math.round(t.height*e.scaleY))}}function Nn(e,t,n){if(n.width<=0)return e;let r=Ln(Math.round(t))/n.width,i=e.lockAspect?r:e.scaleY;return{...e,scaleX:r,scaleY:i}}function Pn(e,t,n){if(n.height<=0)return e;let r=Ln(Math.round(t))/n.height,i=e.lockAspect?r:e.scaleX;return{...e,scaleX:i,scaleY:r}}function Fn(e,t){let n=Rn(t/100);return{...e,scaleX:n,scaleY:n}}function In(e,t){if(e.lockAspect===t)return e;if(!t)return{...e,lockAspect:!1};let n=(e.scaleX+e.scaleY)/2;return{scaleX:n,scaleY:n,lockAspect:!0}}function Ln(e){return Number.isFinite(e)?Math.max(1,Math.min(kn,Math.trunc(e))):1}function Rn(e){return!Number.isFinite(e)||e<=0?.01:Math.max(.01,Math.min(e,kn))}async function zn(e,t){if(jn(e))return t;let{width:n,height:r}=Mn(e,t);if(n<=0||r<=0)return t;let i=Bn(t.width,t.height,n,r),a={bitmap:t.bitmap,width:t.width,height:t.height},o=[];for(let e=0;e<i;e++){let e=Math.max(n,Math.floor(a.width/2)),t=Math.max(r,Math.floor(a.height/2)),i=Vn(a,e,t);o.push(i),a={bitmap:i.canvas,width:e,height:t}}let s=Vn(a,n,r);return o.length=0,{bitmap:s.canvas,width:n,height:r,mimeType:t.mimeType}}function Bn(e,t,n,r){let i=e,a=t,o=0;for(;(i/2>n||a/2>r)&&o<16;)i=Math.floor(i/2),a=Math.floor(a/2),o+=1;return o}function Vn(e,r,i){let a=t(r,i),o=n(a);return o.imageSmoothingEnabled=!0,o.imageSmoothingQuality=`high`,o.drawImage(e.bitmap,0,0,e.width,e.height,0,0,r,i),a}function Hn(e,t){let n=e.width,r=e.height;if(n<=0||r<=0)return{width:0,height:0};let i=Math.abs(Math.cos(t)),a=Math.abs(Math.sin(t)),o=n*i+r*a,s=n*a+r*i,c=o>Un?n*n/o:1/0,l=s>Un?n*r/s:1/0,u=Math.min(c,l);return{width:u,height:u*r/n}}var Un=1e-9,Wn=.1;function Gn(){return{quarterTurns:0,freeAngle:0}}function Kn(e){return{...e,quarterTurns:(e.quarterTurns+1)%4}}function qn(e){return{...e,quarterTurns:(e.quarterTurns+3)%4}}function Jn(e,t){let n=Zn(t,-45,45),r=Math.round(n*10)/10;return{...e,freeAngle:r}}function Yn(e){return e.quarterTurns===0&&Math.abs(e.freeAngle)<1e-6}function Xn(e){return e.quarterTurns*90+e.freeAngle}function Zn(e,t,n){return Math.max(t,Math.min(n,e))}async function Qn(e,r){if(Yn(e))return r;let i=Xn(e),a=i*Math.PI/180,o=i-e.quarterTurns*90,s=Math.abs(o)<1e-6,c,l;if(s)e.quarterTurns===1||e.quarterTurns===3?(c=r.height,l=r.width):(c=r.width,l=r.height);else{let e=Hn(r,a);c=Math.max(1,Math.round(e.width)),l=Math.max(1,Math.round(e.height))}let u=t(c,l),d=n(u);return d.imageSmoothingEnabled=!0,d.imageSmoothingQuality=`high`,d.translate(c/2,l/2),d.rotate(a),d.drawImage(r.bitmap,-r.width/2,-r.height/2),{bitmap:u.canvas,width:c,height:l,mimeType:r.mimeType}}function $n(e){let t=e,n=new Set;function r(e){for(let r of[...n])try{r(t,e)}catch(e){queueMicrotask(()=>{throw e})}}return{get(){return t},set(e){let n=t;t={...t,...e},r(n)},update(e){let n=t;t={...t,...e(t)},r(n)},subscribe(e){return n.add(e),()=>n.delete(e)}}}var er=1.0015;function tr(e,t){let n=new Map,r=null;function i(){return e.getBoundingClientRect()}function a(e,t){let n=i();return{x:e-n.left,y:t-n.top}}function o(){let e=i();return{x:e.width/2,y:e.height/2}}function s(){if(n.size<2)return null;let e=n.values(),t=e.next().value,r=e.next().value,i=a((t.x+r.x)/2,(t.y+r.y)/2),o=r.x-t.x,s=r.y-t.y;return{midpoint:i,distance:Math.sqrt(o*o+s*s)}}function c(){if(n.size<2||r!==null)return;let e=s();!e||e.distance<=0||(r={lastDistance:e.distance,lastMidpoint:e.midpoint},t.setPinching(!0))}function l(){r!==null&&(r=null,t.setPinching(!1))}function u(e){e.pointerType===`mouse`&&e.button!==0||(n.set(e.pointerId,{id:e.pointerId,x:e.clientX,y:e.clientY}),c())}function d(e){let i=n.get(e.pointerId);if(!i||(i.x=e.clientX,i.y=e.clientY,r===null))return;let a=s();if(!a||a.distance<=0)return;let c=a.distance/r.lastDistance;c!==1&&t.zoomAt(c,a.midpoint,o());let l=a.midpoint.x-r.lastMidpoint.x,u=a.midpoint.y-r.lastMidpoint.y;(l!==0||u!==0)&&t.panBy(l,u),r.lastDistance=a.distance,r.lastMidpoint=a.midpoint,e.preventDefault()}function f(e){n.has(e.pointerId)&&(n.delete(e.pointerId),n.size<2&&l())}function p(e){let n=er**-e.deltaY;if(n===1)return;let r=a(e.clientX,e.clientY);t.zoomAt(n,r,o()),e.preventDefault()}return e.addEventListener(`pointerdown`,u),e.addEventListener(`pointermove`,d),e.addEventListener(`pointerup`,f),e.addEventListener(`pointercancel`,f),e.addEventListener(`pointerleave`,f),e.addEventListener(`wheel`,p,{passive:!1}),()=>{e.removeEventListener(`pointerdown`,u),e.removeEventListener(`pointermove`,d),e.removeEventListener(`pointerup`,f),e.removeEventListener(`pointercancel`,f),e.removeEventListener(`pointerleave`,f),e.removeEventListener(`wheel`,p),n.clear(),r!==null&&t.setPinching(!1),r=null}}var nr=[`a[href]`,`button:not([disabled])`,`input:not([disabled]):not([type="hidden"])`,`select:not([disabled])`,`textarea:not([disabled])`,`[tabindex]:not([tabindex="-1"])`,`[contenteditable="true"]`].join(`, `);function rr(e){let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n=document.createElement(`div`);n.className=`kalotyp-nested-overlay`,e.variant&&n.classList.add(e.variant);let r=document.createElement(`div`);r.className=`kalotyp-nested-surface`,r.setAttribute(`role`,`dialog`),r.setAttribute(`aria-modal`,`true`),r.tabIndex=-1;let i=`kalotyp-nested-title-${Math.random().toString(36).slice(2,8)}`;r.setAttribute(`aria-labelledby`,i);let a=document.createElement(`div`);a.className=`kalotyp-nested-header`;let o=document.createElement(`h3`);o.id=i,o.className=`kalotyp-nested-title`,o.textContent=e.title,a.appendChild(o);let s;e.showCloseButton!==!1&&(s=document.createElement(`button`),s.type=`button`,s.className=`kalotyp-nested-close`,s.setAttribute(`aria-label`,`Close ${e.title}`),s.textContent=`×`,s.addEventListener(`click`,()=>f()),a.appendChild(s)),r.appendChild(a);let c=document.createElement(`div`);if(c.className=`kalotyp-nested-body`,c.appendChild(e.body),r.appendChild(c),n.appendChild(r),e.host.appendChild(n),e.anchor){n.classList.add(`kalotyp-nested-overlay--popover`),ir(n,r,e.anchor);let t=()=>ir(n,r,e.anchor);window.addEventListener(`resize`,t),n.dataset.resizeListenerAttached=`1`,n.addEventListener(`kalotyp-nested-cleanup`,()=>{window.removeEventListener(`resize`,t)})}else n.classList.add(`kalotyp-nested-overlay--modal`);requestAnimationFrame(()=>r.focus());let l=e=>{if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),f();return}if(e.key!==`Tab`)return;let t=Array.from(r.querySelectorAll(nr));if(t.length===0){e.preventDefault(),r.focus();return}let n=t[0],i=t[t.length-1];if(!n||!i)return;let a=document.activeElement;e.shiftKey?(a===n||!r.contains(a))&&(e.preventDefault(),i.focus()):(a===i||!r.contains(a))&&(e.preventDefault(),n.focus())};document.addEventListener(`keydown`,l,!0);let u=e=>{let t=e.target;t&&(r.contains(t)||f())};n.addEventListener(`mousedown`,u);let d=!1;function f(){if(!d){if(d=!0,document.removeEventListener(`keydown`,l,!0),n.removeEventListener(`mousedown`,u),n.dispatchEvent(new Event(`kalotyp-nested-cleanup`)),n.remove(),t?.isConnected)try{t.focus()}catch{}e.onClose()}}return{element:n,close:f}}function ir(e,t,n){let r=n.getBoundingClientRect(),i=e.parentElement?.getBoundingClientRect()??{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},a=t.getBoundingClientRect(),o=r.top-i.top-a.height-8,s=i.right-r.right;t.style.position=`absolute`,t.style.top=`${Math.max(8,o)}px`,t.style.right=`${Math.max(8,s)}px`}var ar=[{keys:[`?`],description:`Show keyboard shortcuts`,context:`editor`},{keys:[`Esc`],description:`Close editor (or clear current selection)`,context:`editor`},{keys:[`Ctrl`,`Z`],description:`Undo`,context:`editor`},{keys:[`Ctrl`,`Shift`,`Z`],description:`Redo`,context:`editor`},{keys:[`Ctrl`,`Y`],description:`Redo (alternate)`,context:`editor`},{keys:[`Tab`],description:`Move focus to next control`,context:`editor`},{keys:[`Shift`,`Tab`],description:`Move focus to previous control`,context:`editor`},{keys:[`Delete`],description:`Delete the selected shape`,context:`annotate`},{keys:[`Arrow keys`],description:`Nudge the selected shape by 1 px`,context:`annotate`},{keys:[`Shift`,`Arrow keys`],description:`Nudge the selected shape by 10 px`,context:`annotate`},{keys:[`Shift`,`while drawing`],description:`Constrain shape (square, 45° line, circle)`,context:`annotate`},{keys:[`Delete`],description:`Delete the selected redaction region`,context:`redact`},{keys:[`Arrow keys`],description:`Nudge the selected region by 1 px`,context:`redact`},{keys:[`Shift`,`Arrow keys`],description:`Nudge the selected region by 10 px`,context:`redact`},{keys:[`Enter`],description:`Commit the text and close the editor`,context:`text`},{keys:[`Shift`,`Enter`],description:`Insert a line break`,context:`text`},{keys:[`Esc`],description:`Cancel the in-progress edit`,context:`text`}],or={editor:`Editor`,annotate:`Annotate`,redact:`Redact`,text:`Text editing`},sr=[`editor`,`annotate`,`redact`,`text`];function cr(e){let t=document.createElement(`div`);t.className=`kalotyp-cheatsheet-body`;for(let e of sr){let n=ar.filter(t=>t.context===e);n.length!==0&&t.appendChild(lr(e,n))}let n=rr({host:e.host,title:`Keyboard shortcuts`,body:t,variant:`kalotyp-cheatsheet-modal`,showCloseButton:!0,onClose:e.onClose});return{close:()=>n.close()}}function lr(e,t){let n=document.createElement(`section`);n.className=`kalotyp-cheatsheet-section`;let r=document.createElement(`h4`);r.className=`kalotyp-cheatsheet-heading`,r.textContent=or[e],n.appendChild(r);let i=document.createElement(`dl`);i.className=`kalotyp-cheatsheet-list`;for(let e of t){let t=document.createElement(`dt`);t.className=`kalotyp-cheatsheet-keys`,e.keys.forEach((e,n)=>{if(n>0){let e=document.createElement(`span`);e.className=`kalotyp-cheatsheet-plus`,e.setAttribute(`aria-hidden`,`true`),e.textContent=`+`,t.appendChild(e)}let r=document.createElement(`kbd`);r.className=`kalotyp-cheatsheet-kbd`,r.textContent=e,t.appendChild(r)});let n=document.createElement(`dd`);n.className=`kalotyp-cheatsheet-description`,n.textContent=e.description,i.appendChild(t),i.appendChild(n)}return n.appendChild(i),n}function ur(e,t,n,r){let i=document.createElement(`div`);i.className=`kalotyp-util-nav`,i.setAttribute(`role`,`tablist`),i.setAttribute(`aria-label`,`Editor tools`);let a=new Map;for(let o of e){let e=document.createElement(`button`);e.type=`button`,e.className=`kalotyp-util-nav-button`,e.dataset.utilityId=o.id,e.id=`${r.panelId}-tab-${o.id}`,e.setAttribute(`role`,`tab`),e.setAttribute(`aria-selected`,o.id===t?`true`:`false`),e.setAttribute(`aria-controls`,r.panelId),e.tabIndex=o.id===t?0:-1,e.textContent=o.label,e.addEventListener(`click`,()=>n(o.id)),i.appendChild(e),a.set(o.id,e)}return i.addEventListener(`keydown`,t=>{if(t.key!==`ArrowLeft`&&t.key!==`ArrowRight`&&t.key!==`Home`&&t.key!==`End`)return;let r=e.map(e=>e.id),i=t.target?.dataset?.utilityId,o=i?r.indexOf(i):-1;if(o===-1)return;let s=o;t.key===`ArrowLeft`?s=(o-1+r.length)%r.length:t.key===`ArrowRight`?s=(o+1)%r.length:t.key===`Home`?s=0:t.key===`End`&&(s=r.length-1);let c=r[s];!c||c===i||(t.preventDefault(),n(c),a.get(c)?.focus())}),{container:i,buttons:a}}function dr(e,t,n){for(let[r,i]of e.buttons.entries()){let e=r===t;if(i.setAttribute(`aria-selected`,e?`true`:`false`),i.tabIndex=e?0:-1,e){try{i.scrollIntoView({block:`nearest`,inline:`nearest`,behavior:`smooth`})}catch{}n&&n.setAttribute(`aria-labelledby`,i.id)}}}var fr=[`a[href]`,`button:not([disabled])`,`input:not([disabled]):not([type="hidden"])`,`select:not([disabled])`,`textarea:not([disabled])`,`details`,`summary`,`[tabindex]:not([tabindex="-1"])`,`[contenteditable="true"]`].join(`, `);function pr(e){let{host:t}=e,n=document.activeElement instanceof HTMLElement&&document.activeElement!==document.body?document.activeElement:null;function r(){return Array.from(t.querySelectorAll(fr))}let i=e.initialFocus??r()[0];i&&requestAnimationFrame(()=>i.focus());let a=e=>{if(e.key!==`Tab`)return;let n=r();if(n.length===0){e.preventDefault();return}let i=n[0],a=n[n.length-1];if(!i||!a)return;let o=document.activeElement;e.shiftKey?(o===i||!t.contains(o))&&(e.preventDefault(),a.focus()):(o===a||!t.contains(o))&&(e.preventDefault(),i.focus())};return document.addEventListener(`keydown`,a,!0),{refresh:()=>{},release:()=>{if(document.removeEventListener(`keydown`,a,!0),n?.isConnected)try{n.focus()}catch{}}}}var mr=[[`path`,{d:`M5 12h14`}],[`path`,{d:`m12 5 7 7-7 7`}]],hr=[[`path`,{d:`M6 12h9a4 4 0 0 1 0 8H7a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1h7a4 4 0 0 1 0 8`}]],gr=[[`path`,{d:`M20 6 9 17l-5-5`}]],_r=[[`path`,{d:`m6 9 6 6 6-6`}]],vr=[[`circle`,{cx:`12`,cy:`12`,r:`10`}]],yr=[[`path`,{d:`m3 7 5 5-5 5V7`}],[`path`,{d:`m21 7-5 5 5 5V7`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`M12 14v2`}],[`path`,{d:`M12 8v2`}],[`path`,{d:`M12 2v2`}]],br=[[`path`,{d:`m17 3-5 5-5-5h10`}],[`path`,{d:`m17 21-5-5-5 5h10`}],[`path`,{d:`M4 12H2`}],[`path`,{d:`M10 12H8`}],[`path`,{d:`M16 12h-2`}],[`path`,{d:`M22 12h-2`}]],xr=[[`path`,{d:`m9 11-6 6v3h9l3-3`}],[`path`,{d:`m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4`}]],Sr=[[`line`,{x1:`19`,x2:`10`,y1:`4`,y2:`4`}],[`line`,{x1:`14`,x2:`5`,y1:`20`,y2:`20`}],[`line`,{x1:`15`,x2:`9`,y1:`4`,y2:`20`}]],Cr=[[`path`,{d:`M10 8h.01`}],[`path`,{d:`M12 12h.01`}],[`path`,{d:`M14 8h.01`}],[`path`,{d:`M16 12h.01`}],[`path`,{d:`M18 8h.01`}],[`path`,{d:`M6 8h.01`}],[`path`,{d:`M7 16h10`}],[`path`,{d:`M8 12h.01`}],[`rect`,{width:`20`,height:`16`,x:`2`,y:`4`,rx:`2`}]],wr=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7h2`}],[`path`,{d:`M15 7h2a5 5 0 1 1 0 10h-2`}],[`line`,{x1:`8`,x2:`16`,y1:`12`,y2:`12`}]],Tr=[[`path`,{d:`M9 17H7A5 5 0 0 1 7 7`}],[`path`,{d:`M15 7h2a5 5 0 0 1 4 8`}],[`line`,{x1:`8`,x2:`12`,y1:`12`,y2:`12`}],[`line`,{x1:`2`,x2:`22`,y1:`2`,y2:`22`}]],Er=[[`path`,{d:`M4.037 4.688a.495.495 0 0 1 .651-.651l16 6.5a.5.5 0 0 1-.063.947l-6.124 1.58a2 2 0 0 0-1.438 1.435l-1.579 6.126a.5.5 0 0 1-.947.063z`}]],Dr=[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`}],[`path`,{d:`m15 5 4 4`}]],Or=[[`path`,{d:`M5 12h14`}],[`path`,{d:`M12 5v14`}]],kr=[[`path`,{d:`m15 14 5-5-5-5`}],[`path`,{d:`M20 9H9.5A5.5 5.5 0 0 0 4 14.5A5.5 5.5 0 0 0 9.5 20H13`}]],Ar=[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]],jr=[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]],Mr=[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M8 14s1.5 2 4 2 4-2 4-2`}],[`line`,{x1:`9`,x2:`9.01`,y1:`9`,y2:`9`}],[`line`,{x1:`15`,x2:`15.01`,y1:`9`,y2:`9`}]],Nr=[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]],Pr=[[`path`,{d:`M21 5H3`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M21 19H7`}]],Fr=[[`path`,{d:`M21 5H3`}],[`path`,{d:`M17 12H7`}],[`path`,{d:`M19 19H5`}]],Ir=[[`path`,{d:`M21 5H3`}],[`path`,{d:`M15 12H3`}],[`path`,{d:`M17 19H3`}]],Lr=[[`path`,{d:`M10 11v6`}],[`path`,{d:`M14 11v6`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`}],[`path`,{d:`M3 6h18`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`}]],Rr=[[`path`,{d:`M12 4v16`}],[`path`,{d:`M4 7V5a1 1 0 0 1 1-1h14a1 1 0 0 1 1 1v2`}],[`path`,{d:`M9 20h6`}]],zr=[[`path`,{d:`M9 14 4 9l5-5`}],[`path`,{d:`M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11`}]],Br=[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]],Vr={xmlns:`http://www.w3.org/2000/svg`,width:16,height:16,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`,"aria-hidden":`true`};function Hr(e,t={}){let n={...Vr,...t};return`<svg ${Object.entries(n).map(([e,t])=>`${e}="${t}"`).join(` `)}>${e.map(([e,t])=>`<${e} ${Object.entries(t).map(([e,t])=>`${e}="${t}"`).join(` `)} />`).join(``)}</svg>`}function Ur(e){switch(e){case`select`:return Er;case`text`:return Rr;case`rect`:return Nr;case`ellipse`:return vr;case`arrow`:return mr;case`freehand`:return Dr;case`highlight`:return xr;case`undo`:return zr;case`redo`:return kr;case`close`:return Br;case`delete`:return Lr;case`check`:return gr;case`lockClosed`:return wr;case`lockOpen`:return Tr;case`plus`:return Or;case`flipHorizontal`:return yr;case`flipVertical`:return br;case`chevronDown`:return _r;case`settings`:return jr;case`keyboard`:return Cr;case`bold`:return hr;case`italic`:return Sr;case`alignLeft`:return Ir;case`alignCenter`:return Fr;case`alignRight`:return Pr;case`emoji`:return Mr;case`search`:return Ar}}function Y(e,t){return Hr(Ur(e),t)}var Wr=[{value:`auto`,label:`Auto`,description:`WebP when supported, PNG fallback.`,requires:[]},{value:`image/webp`,label:`WebP`,description:`Best compression for most images.`,requires:[`image/webp`]},{value:`image/avif`,label:`AVIF`,description:`Smallest size; slower encode.`,requires:[`image/avif`]},{value:`image/jpeg`,label:`JPEG`,description:`Universal; no transparency.`,requires:[`image/jpeg`]},{value:`image/png`,label:`PNG`,description:`Lossless; preserves transparency.`,requires:[`image/png`]}];function Gr(e){let{host:t,anchor:n,store:r}=e,i=document.createElement(`div`);i.className=`kalotyp-output-popover-body`;let a=document.createElement(`label`);a.className=`kalotyp-output-row`;let s=document.createElement(`span`);s.className=`kalotyp-output-row-label`,s.textContent=`Format`,a.appendChild(s);let c=document.createElement(`select`);c.className=`kalotyp-output-format`,c.setAttribute(`aria-label`,`Output format`);for(let e of Wr){let t=document.createElement(`option`);t.value=e.value,t.textContent=e.label,c.appendChild(t)}c.value=r.get().mimeChoice,c.addEventListener(`change`,()=>{let e=c.value;r.update(t=>ee(t,e))}),a.appendChild(c);let l=document.createElement(`p`);l.className=`kalotyp-output-hint`,l.setAttribute(`aria-live`,`polite`);let u=document.createElement(`label`);u.className=`kalotyp-output-row`;let d=document.createElement(`span`);d.className=`kalotyp-output-row-label`,d.textContent=`Quality`,u.appendChild(d);let f=document.createElement(`input`);f.type=`range`,f.className=`kalotyp-output-quality`,f.min=`50`,f.max=`100`,f.step=`1`,f.value=String(Math.round(r.get().quality*100)),f.setAttribute(`aria-label`,`Output quality`),f.addEventListener(`input`,()=>{r.update(e=>te(e,f.valueAsNumber/100))}),u.appendChild(f);let p=document.createElement(`span`);p.className=`kalotyp-output-quality-readout`,p.setAttribute(`aria-hidden`,`true`),p.textContent=`${Math.round(r.get().quality*100)}`,u.appendChild(p);let m=document.createElement(`p`);m.className=`kalotyp-output-summary`,m.setAttribute(`aria-live`,`polite`);let h=document.createElement(`label`);h.className=`kalotyp-output-metadata-row`;let g=document.createElement(`input`);g.type=`checkbox`,g.className=`kalotyp-output-metadata-checkbox`,g.checked=r.get().stripMetadata,g.addEventListener(`change`,()=>{r.update(e=>j(e,g.checked))});let _=document.createElement(`span`);_.className=`kalotyp-output-metadata-text`,_.textContent=`Strip EXIF, GPS, and camera metadata on save`,h.appendChild(g),h.appendChild(_);let v=document.createElement(`p`);v.className=`kalotyp-output-metadata-hint`,v.setAttribute(`aria-live`,`polite`);let y=document.createElement(`footer`);y.className=`kalotyp-output-footer`;let b=document.createElement(`button`);b.type=`button`,b.className=`kalotyp-output-done`,b.textContent=`Done`,b.setAttribute(`aria-label`,`Close output settings`),b.addEventListener(`click`,()=>S.close());let x=document.createElement(`button`);x.type=`button`,x.className=`kalotyp-output-save`,x.textContent=`Save and close`,x.addEventListener(`click`,()=>{e.canSave()&&e.onSaveAndClose()}),y.appendChild(b),y.appendChild(x),i.appendChild(a),i.appendChild(l),i.appendChild(u),i.appendChild(m),i.appendChild(h),i.appendChild(v),i.appendChild(y),n.setAttribute(`aria-expanded`,`true`);let S=rr({host:t,anchor:n,title:`Output settings`,body:i,variant:`kalotyp-output-popover`,showCloseButton:!0,onClose:()=>{n.setAttribute(`aria-expanded`,`false`),w(),e.onClose()}});function C(t){c.value!==t.mimeChoice&&(c.value=t.mimeChoice);let n=Math.round(t.quality*100);f.valueAsNumber!==n&&(f.value=String(n)),p.textContent=String(n),l.textContent=Wr.find(e=>e.value===t.mimeChoice)?.description??``,m.textContent=Kr(t);let r=t.mimeChoice!==`image/png`;f.disabled=!r,p.style.opacity=r?`1`:`0.4`,g.checked!==t.stripMetadata&&(g.checked=t.stripMetadata),v.textContent=qr(t),x.disabled=!e.canSave()}C(r.get());let w=r.subscribe(C);return(async()=>{for(let e of Wr)if(e.requires.length!==0&&!(await Promise.all(e.requires.map(e=>o(e)))).every(Boolean)){let t=c.querySelector(`option[value="${e.value}"]`);t&&(t.disabled=!0,t.textContent=`${e.label} (unsupported)`)}})(),{close:()=>S.close()}}function Kr(e){if(e.mimeChoice===`image/png`)return`PNG · lossless`;let t=Math.round(e.quality*100);switch(e.mimeChoice){case`auto`:return`Auto · ${t}% quality`;case`image/webp`:return`WebP · ${t}% quality`;case`image/avif`:return`AVIF · ${t}% quality`;case`image/jpeg`:return`JPEG · ${t}% quality`;default:return`${e.mimeChoice} · ${t}% quality`}}function qr(e){return e.stripMetadata?``:e.mimeChoice===`image/jpeg`?`EXIF preserved when the source is also JPEG.`:e.mimeChoice===`auto`?`Metadata is preserved only when the resolved output is JPEG.`:`Metadata can only be preserved when the output is JPEG.`}var Jr=[{id:`x`,label:`Left`},{id:`y`,label:`Top`},{id:`width`,label:`Width`,min:1},{id:`height`,label:`Height`,min:1}],Yr=[{id:`x1`,label:`Start X`},{id:`y1`,label:`Start Y`},{id:`x2`,label:`End X`},{id:`y2`,label:`End Y`}],Xr=[{id:`x`,label:`X`},{id:`y`,label:`Y`}],Zr=[{id:`x`,label:`X`},{id:`y`,label:`Y`},{id:`size`,label:`Size`,min:8},{id:`rotation`,label:`Angle`,unit:`degrees`}];function Qr(e){let t=document.createElement(`div`);t.className=`kalotyp-annotate-coords`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Selected annotation position`),t.hidden=!0;let n=null,r=null,i=new Map;function a(e){t.replaceChildren(),i.clear();let n=$r(e);for(let e of n){let n=document.createElement(`label`);n.className=`kalotyp-annotate-coords-field`;let r=document.createElement(`span`);r.className=`kalotyp-annotate-coords-label`,r.textContent=e.label;let a=document.createElement(`input`);a.type=`number`,a.className=`kalotyp-annotate-coords-input`,a.dataset.field=e.id,a.step=`1`,a.inputMode=`numeric`,e.min!==void 0&&(a.min=String(e.min)),e.max!==void 0&&(a.max=String(e.max)),a.setAttribute(`aria-label`,`${e.label} (${e.unit??`pixels`})`),a.addEventListener(`change`,s),n.appendChild(r),n.appendChild(a),t.appendChild(n),i.set(e.id,a)}r=e}function o(e){let t=(e,t)=>{let n=i.get(e);if(!n)return;let r=String(Math.round(t));document.activeElement!==n&&n.value!==r&&(n.value=r)};switch(e.kind){case`rect`:case`ellipse`:t(`x`,e.x),t(`y`,e.y),t(`width`,e.width),t(`height`,e.height);return;case`arrow`:t(`x1`,e.x1),t(`y1`,e.y1),t(`x2`,e.x2),t(`y2`,e.y2);return;case`text`:t(`x`,e.x),t(`y`,e.y);return;case`emoji`:t(`x`,e.x),t(`y`,e.y),t(`size`,e.size),t(`rotation`,e.rotation);return;default:return}}function s(){if(!n||!r)return;let t=c(n);if(!t)return;let i=ei(n,t);i!==n&&(n=i,e.onShapeChanged(i))}function c(e){let t=e=>{let t=i.get(e);return t?t.valueAsNumber:NaN};switch(e.kind){case`rect`:case`ellipse`:{let n=Math.round(t(`x`)),r=Math.round(t(`y`)),i=Math.round(t(`width`)),a=Math.round(t(`height`));return[n,r,i,a].every(Number.isFinite)?{kind:e.kind,x:n,y:r,width:i,height:a}:null}case`arrow`:{let e=Math.round(t(`x1`)),n=Math.round(t(`y1`)),r=Math.round(t(`x2`)),i=Math.round(t(`y2`));return[e,n,r,i].every(Number.isFinite)?{kind:`arrow`,x1:e,y1:n,x2:r,y2:i}:null}case`text`:{let e=Math.round(t(`x`)),n=Math.round(t(`y`));return[e,n].every(Number.isFinite)?{kind:`text`,x:e,y:n}:null}case`emoji`:{let e=Math.round(t(`x`)),n=Math.round(t(`y`)),r=Math.round(t(`size`)),i=Math.round(t(`rotation`));return[e,n,r,i].every(Number.isFinite)?{kind:`emoji`,x:e,y:n,size:r,rotation:i}:null}default:return null}}return{container:t,updateForShape(e){if(!e){n=null,r=null,t.hidden=!0,t.replaceChildren(),i.clear();return}if(e.kind===`freehand`||e.kind===`highlight`){n=e,r=null,t.hidden=!0,t.replaceChildren(),i.clear();return}n=e,r!==e.kind&&a(e.kind),o(e),t.hidden=!1},destroy(){t.replaceChildren(),i.clear(),t.remove()}}}function $r(e){switch(e){case`rect`:case`ellipse`:return Jr;case`arrow`:return Yr;case`text`:return Xr;case`emoji`:return Zr}}function ei(e,t){switch(e.kind){case`rect`:return t.kind===`rect`?{...e,x:t.x,y:t.y,width:t.width,height:t.height}:e;case`ellipse`:return t.kind===`ellipse`?{...e,x:t.x,y:t.y,width:t.width,height:t.height}:e;case`arrow`:return t.kind===`arrow`?{...e,x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2}:e;case`text`:return t.kind===`text`?{...e,x:t.x,y:t.y}:e;case`emoji`:return t.kind===`emoji`?{...e,x:t.x,y:t.y,size:Math.max(8,t.size),rotation:Te(t.rotation)}:e;default:return e}}var ti=[{id:`smileys_emotion`,label:`Smileys & Emotion`,emojis:[{char:`😀`,name:`grinning face`,key:`1F600`},{char:`😃`,name:`grinning face with big eyes`,key:`1F603`},{char:`😄`,name:`grinning face with smiling eyes`,key:`1F604`},{char:`😁`,name:`beaming face with smiling eyes`,key:`1F601`},{char:`😆`,name:`grinning squinting face`,key:`1F606`},{char:`😅`,name:`grinning face with sweat`,key:`1F605`},{char:`🤣`,name:`rolling on the floor laughing`,key:`1F923`},{char:`😂`,name:`face with tears of joy`,key:`1F602`},{char:`🙂`,name:`slightly smiling face`,key:`1F642`},{char:`🙃`,name:`upside-down face`,key:`1F643`},{char:`🫠`,name:`melting face`,key:`1FAE0`},{char:`😉`,name:`winking face`,key:`1F609`},{char:`😊`,name:`smiling face with smiling eyes`,key:`1F60A`},{char:`😇`,name:`smiling face with halo`,key:`1F607`},{char:`🥰`,name:`smiling face with hearts`,key:`1F970`},{char:`😍`,name:`smiling face with heart-eyes`,key:`1F60D`},{char:`🤩`,name:`star-struck`,key:`1F929`},{char:`😘`,name:`face blowing a kiss`,key:`1F618`},{char:`😗`,name:`kissing face`,key:`1F617`},{char:`☺️`,name:`smiling face`,key:`263A`},{char:`😚`,name:`kissing face with closed eyes`,key:`1F61A`},{char:`😙`,name:`kissing face with smiling eyes`,key:`1F619`},{char:`🥲`,name:`smiling face with tear`,key:`1F972`},{char:`😋`,name:`face savoring food`,key:`1F60B`},{char:`😛`,name:`face with tongue`,key:`1F61B`},{char:`😜`,name:`winking face with tongue`,key:`1F61C`},{char:`🤪`,name:`zany face`,key:`1F92A`},{char:`😝`,name:`squinting face with tongue`,key:`1F61D`},{char:`🤑`,name:`money-mouth face`,key:`1F911`},{char:`🤗`,name:`smiling face with open hands`,key:`1F917`},{char:`🤭`,name:`face with hand over mouth`,key:`1F92D`},{char:`🫢`,name:`face with open eyes and hand over mouth`,key:`1FAE2`},{char:`🫣`,name:`face with peeking eye`,key:`1FAE3`},{char:`🤫`,name:`shushing face`,key:`1F92B`},{char:`🤔`,name:`thinking face`,key:`1F914`},{char:`🫡`,name:`saluting face`,key:`1FAE1`},{char:`🤐`,name:`zipper-mouth face`,key:`1F910`},{char:`🤨`,name:`face with raised eyebrow`,key:`1F928`},{char:`😐`,name:`neutral face`,key:`1F610`},{char:`😑`,name:`expressionless face`,key:`1F611`},{char:`😶`,name:`face without mouth`,key:`1F636`},{char:`🫥`,name:`dotted line face`,key:`1FAE5`},{char:`😶‍🌫️`,name:`face in clouds`,key:`1F636-200D-1F32B-FE0F`},{char:`😏`,name:`smirking face`,key:`1F60F`},{char:`😒`,name:`unamused face`,key:`1F612`},{char:`🙄`,name:`face with rolling eyes`,key:`1F644`},{char:`😬`,name:`grimacing face`,key:`1F62C`},{char:`😮‍💨`,name:`face exhaling`,key:`1F62E-200D-1F4A8`},{char:`🤥`,name:`lying face`,key:`1F925`},{char:`🫨`,name:`shaking face`,key:`1FAE8`},{char:`🙂‍↔️`,name:`head shaking horizontally`,key:`1F642-200D-2194-FE0F`},{char:`🙂‍↕️`,name:`head shaking vertically`,key:`1F642-200D-2195-FE0F`},{char:`😌`,name:`relieved face`,key:`1F60C`},{char:`😔`,name:`pensive face`,key:`1F614`},{char:`😪`,name:`sleepy face`,key:`1F62A`},{char:`🤤`,name:`drooling face`,key:`1F924`},{char:`😴`,name:`sleeping face`,key:`1F634`},{char:`🫩`,name:`face with bags under eyes`,key:`1FAE9`},{char:`😷`,name:`face with medical mask`,key:`1F637`},{char:`🤒`,name:`face with thermometer`,key:`1F912`},{char:`🤕`,name:`face with head-bandage`,key:`1F915`},{char:`🤢`,name:`nauseated face`,key:`1F922`},{char:`🤮`,name:`face vomiting`,key:`1F92E`},{char:`🤧`,name:`sneezing face`,key:`1F927`},{char:`🥵`,name:`hot face`,key:`1F975`},{char:`🥶`,name:`cold face`,key:`1F976`},{char:`🥴`,name:`woozy face`,key:`1F974`},{char:`😵`,name:`face with crossed-out eyes`,key:`1F635`},{char:`😵‍💫`,name:`face with spiral eyes`,key:`1F635-200D-1F4AB`},{char:`🤯`,name:`exploding head`,key:`1F92F`},{char:`🤠`,name:`cowboy hat face`,key:`1F920`},{char:`🥳`,name:`partying face`,key:`1F973`},{char:`🥸`,name:`disguised face`,key:`1F978`},{char:`😎`,name:`smiling face with sunglasses`,key:`1F60E`},{char:`🤓`,name:`nerd face`,key:`1F913`},{char:`🧐`,name:`face with monocle`,key:`1F9D0`},{char:`😕`,name:`confused face`,key:`1F615`},{char:`🫤`,name:`face with diagonal mouth`,key:`1FAE4`},{char:`😟`,name:`worried face`,key:`1F61F`},{char:`🙁`,name:`slightly frowning face`,key:`1F641`},{char:`☹️`,name:`frowning face`,key:`2639`},{char:`😮`,name:`face with open mouth`,key:`1F62E`},{char:`😯`,name:`hushed face`,key:`1F62F`},{char:`😲`,name:`astonished face`,key:`1F632`},{char:`😳`,name:`flushed face`,key:`1F633`},{char:`🫪`,name:`distorted face`,key:`1FAEA`},{char:`🥺`,name:`pleading face`,key:`1F97A`},{char:`🥹`,name:`face holding back tears`,key:`1F979`},{char:`😦`,name:`frowning face with open mouth`,key:`1F626`},{char:`😧`,name:`anguished face`,key:`1F627`},{char:`😨`,name:`fearful face`,key:`1F628`},{char:`😰`,name:`anxious face with sweat`,key:`1F630`},{char:`😥`,name:`sad but relieved face`,key:`1F625`},{char:`😢`,name:`crying face`,key:`1F622`},{char:`😭`,name:`loudly crying face`,key:`1F62D`},{char:`😱`,name:`face screaming in fear`,key:`1F631`},{char:`😖`,name:`confounded face`,key:`1F616`},{char:`😣`,name:`persevering face`,key:`1F623`},{char:`😞`,name:`disappointed face`,key:`1F61E`},{char:`😓`,name:`downcast face with sweat`,key:`1F613`},{char:`😩`,name:`weary face`,key:`1F629`},{char:`😫`,name:`tired face`,key:`1F62B`},{char:`🥱`,name:`yawning face`,key:`1F971`},{char:`😤`,name:`face with steam from nose`,key:`1F624`},{char:`😡`,name:`enraged face`,key:`1F621`},{char:`😠`,name:`angry face`,key:`1F620`},{char:`🤬`,name:`face with symbols on mouth`,key:`1F92C`},{char:`😈`,name:`smiling face with horns`,key:`1F608`},{char:`👿`,name:`angry face with horns`,key:`1F47F`},{char:`💀`,name:`skull`,key:`1F480`},{char:`☠️`,name:`skull and crossbones`,key:`2620`},{char:`💩`,name:`pile of poo`,key:`1F4A9`},{char:`🤡`,name:`clown face`,key:`1F921`},{char:`👹`,name:`ogre`,key:`1F479`},{char:`👺`,name:`goblin`,key:`1F47A`},{char:`👻`,name:`ghost`,key:`1F47B`},{char:`👽`,name:`alien`,key:`1F47D`},{char:`👾`,name:`alien monster`,key:`1F47E`},{char:`🤖`,name:`robot`,key:`1F916`},{char:`😺`,name:`grinning cat`,key:`1F63A`},{char:`😸`,name:`grinning cat with smiling eyes`,key:`1F638`},{char:`😹`,name:`cat with tears of joy`,key:`1F639`},{char:`😻`,name:`smiling cat with heart-eyes`,key:`1F63B`},{char:`😼`,name:`cat with wry smile`,key:`1F63C`},{char:`😽`,name:`kissing cat`,key:`1F63D`},{char:`🙀`,name:`weary cat`,key:`1F640`},{char:`😿`,name:`crying cat`,key:`1F63F`},{char:`😾`,name:`pouting cat`,key:`1F63E`},{char:`🙈`,name:`see-no-evil monkey`,key:`1F648`},{char:`🙉`,name:`hear-no-evil monkey`,key:`1F649`},{char:`🙊`,name:`speak-no-evil monkey`,key:`1F64A`},{char:`💌`,name:`love letter`,key:`1F48C`},{char:`💘`,name:`heart with arrow`,key:`1F498`},{char:`💝`,name:`heart with ribbon`,key:`1F49D`},{char:`💖`,name:`sparkling heart`,key:`1F496`},{char:`💗`,name:`growing heart`,key:`1F497`},{char:`💓`,name:`beating heart`,key:`1F493`},{char:`💞`,name:`revolving hearts`,key:`1F49E`},{char:`💕`,name:`two hearts`,key:`1F495`},{char:`💟`,name:`heart decoration`,key:`1F49F`},{char:`❣️`,name:`heart exclamation`,key:`2763`},{char:`💔`,name:`broken heart`,key:`1F494`},{char:`❤️‍🔥`,name:`heart on fire`,key:`2764-FE0F-200D-1F525`},{char:`❤️‍🩹`,name:`mending heart`,key:`2764-FE0F-200D-1FA79`},{char:`❤️`,name:`red heart`,key:`2764`},{char:`🩷`,name:`pink heart`,key:`1FA77`},{char:`🧡`,name:`orange heart`,key:`1F9E1`},{char:`💛`,name:`yellow heart`,key:`1F49B`},{char:`💚`,name:`green heart`,key:`1F49A`},{char:`💙`,name:`blue heart`,key:`1F499`},{char:`🩵`,name:`light blue heart`,key:`1FA75`},{char:`💜`,name:`purple heart`,key:`1F49C`},{char:`🤎`,name:`brown heart`,key:`1F90E`},{char:`🖤`,name:`black heart`,key:`1F5A4`},{char:`🩶`,name:`grey heart`,key:`1FA76`},{char:`🤍`,name:`white heart`,key:`1F90D`},{char:`💋`,name:`kiss mark`,key:`1F48B`},{char:`💯`,name:`hundred points`,key:`1F4AF`},{char:`💢`,name:`anger symbol`,key:`1F4A2`},{char:`🫯`,name:`fight cloud`,key:`1FAEF`},{char:`💥`,name:`collision`,key:`1F4A5`},{char:`💫`,name:`dizzy`,key:`1F4AB`},{char:`💦`,name:`sweat droplets`,key:`1F4A6`},{char:`💨`,name:`dashing away`,key:`1F4A8`},{char:`🕳️`,name:`hole`,key:`1F573`},{char:`💬`,name:`speech balloon`,key:`1F4AC`},{char:`👁️‍🗨️`,name:`eye in speech bubble`,key:`1F441-FE0F-200D-1F5E8-FE0F`},{char:`🗨️`,name:`left speech bubble`,key:`1F5E8`},{char:`🗯️`,name:`right anger bubble`,key:`1F5EF`},{char:`💭`,name:`thought balloon`,key:`1F4AD`},{char:`💤`,name:`ZZZ`,key:`1F4A4`}]},{id:`people_body`,label:`People & Body`,emojis:[{char:`👋`,name:`waving hand`,key:`1F44B`},{char:`🤚`,name:`raised back of hand`,key:`1F91A`},{char:`🖐️`,name:`hand with fingers splayed`,key:`1F590`},{char:`✋`,name:`raised hand`,key:`270B`},{char:`🖖`,name:`vulcan salute`,key:`1F596`},{char:`🫱`,name:`rightwards hand`,key:`1FAF1`},{char:`🫲`,name:`leftwards hand`,key:`1FAF2`},{char:`🫳`,name:`palm down hand`,key:`1FAF3`},{char:`🫴`,name:`palm up hand`,key:`1FAF4`},{char:`🫷`,name:`leftwards pushing hand`,key:`1FAF7`},{char:`🫸`,name:`rightwards pushing hand`,key:`1FAF8`},{char:`👌`,name:`OK hand`,key:`1F44C`},{char:`🤌`,name:`pinched fingers`,key:`1F90C`},{char:`🤏`,name:`pinching hand`,key:`1F90F`},{char:`✌️`,name:`victory hand`,key:`270C`},{char:`🤞`,name:`crossed fingers`,key:`1F91E`},{char:`🫰`,name:`hand with index finger and thumb crossed`,key:`1FAF0`},{char:`🤟`,name:`love-you gesture`,key:`1F91F`},{char:`🤘`,name:`sign of the horns`,key:`1F918`},{char:`🤙`,name:`call me hand`,key:`1F919`},{char:`👈`,name:`backhand index pointing left`,key:`1F448`},{char:`👉`,name:`backhand index pointing right`,key:`1F449`},{char:`👆`,name:`backhand index pointing up`,key:`1F446`},{char:`🖕`,name:`middle finger`,key:`1F595`},{char:`👇`,name:`backhand index pointing down`,key:`1F447`},{char:`☝️`,name:`index pointing up`,key:`261D`},{char:`🫵`,name:`index pointing at the viewer`,key:`1FAF5`},{char:`👍`,name:`thumbs up`,key:`1F44D`},{char:`👎`,name:`thumbs down`,key:`1F44E`},{char:`✊`,name:`raised fist`,key:`270A`},{char:`👊`,name:`oncoming fist`,key:`1F44A`},{char:`🤛`,name:`left-facing fist`,key:`1F91B`},{char:`🤜`,name:`right-facing fist`,key:`1F91C`},{char:`👏`,name:`clapping hands`,key:`1F44F`},{char:`🙌`,name:`raising hands`,key:`1F64C`},{char:`🫶`,name:`heart hands`,key:`1FAF6`},{char:`👐`,name:`open hands`,key:`1F450`},{char:`🤲`,name:`palms up together`,key:`1F932`},{char:`🤝`,name:`handshake`,key:`1F91D`},{char:`🙏`,name:`folded hands`,key:`1F64F`},{char:`✍️`,name:`writing hand`,key:`270D`},{char:`💅`,name:`nail polish`,key:`1F485`},{char:`🤳`,name:`selfie`,key:`1F933`},{char:`💪`,name:`flexed biceps`,key:`1F4AA`},{char:`🦾`,name:`mechanical arm`,key:`1F9BE`},{char:`🦿`,name:`mechanical leg`,key:`1F9BF`},{char:`🦵`,name:`leg`,key:`1F9B5`},{char:`🦶`,name:`foot`,key:`1F9B6`},{char:`👂`,name:`ear`,key:`1F442`},{char:`🦻`,name:`ear with hearing aid`,key:`1F9BB`},{char:`👃`,name:`nose`,key:`1F443`},{char:`🧠`,name:`brain`,key:`1F9E0`},{char:`🫀`,name:`anatomical heart`,key:`1FAC0`},{char:`🫁`,name:`lungs`,key:`1FAC1`},{char:`🦷`,name:`tooth`,key:`1F9B7`},{char:`🦴`,name:`bone`,key:`1F9B4`},{char:`👀`,name:`eyes`,key:`1F440`},{char:`👁️`,name:`eye`,key:`1F441`},{char:`👅`,name:`tongue`,key:`1F445`},{char:`👄`,name:`mouth`,key:`1F444`},{char:`🫦`,name:`biting lip`,key:`1FAE6`},{char:`👶`,name:`baby`,key:`1F476`},{char:`🧒`,name:`child`,key:`1F9D2`},{char:`👦`,name:`boy`,key:`1F466`},{char:`👧`,name:`girl`,key:`1F467`},{char:`🧑`,name:`person`,key:`1F9D1`},{char:`👱`,name:`person blond hair`,key:`1F471`},{char:`👨`,name:`man`,key:`1F468`},{char:`🧔`,name:`person beard`,key:`1F9D4`},{char:`🧔‍♂️`,name:`man beard`,key:`1F9D4-200D-2642-FE0F`},{char:`🧔‍♀️`,name:`woman beard`,key:`1F9D4-200D-2640-FE0F`},{char:`👨‍🦰`,name:`man red hair`,key:`1F468-200D-1F9B0`},{char:`👨‍🦱`,name:`man curly hair`,key:`1F468-200D-1F9B1`},{char:`👨‍🦳`,name:`man white hair`,key:`1F468-200D-1F9B3`},{char:`👨‍🦲`,name:`man bald`,key:`1F468-200D-1F9B2`},{char:`👩`,name:`woman`,key:`1F469`},{char:`👩‍🦰`,name:`woman red hair`,key:`1F469-200D-1F9B0`},{char:`🧑‍🦰`,name:`person red hair`,key:`1F9D1-200D-1F9B0`},{char:`👩‍🦱`,name:`woman curly hair`,key:`1F469-200D-1F9B1`},{char:`🧑‍🦱`,name:`person curly hair`,key:`1F9D1-200D-1F9B1`},{char:`👩‍🦳`,name:`woman white hair`,key:`1F469-200D-1F9B3`},{char:`🧑‍🦳`,name:`person white hair`,key:`1F9D1-200D-1F9B3`},{char:`👩‍🦲`,name:`woman bald`,key:`1F469-200D-1F9B2`},{char:`🧑‍🦲`,name:`person bald`,key:`1F9D1-200D-1F9B2`},{char:`👱‍♀️`,name:`woman blond hair`,key:`1F471-200D-2640-FE0F`},{char:`👱‍♂️`,name:`man blond hair`,key:`1F471-200D-2642-FE0F`},{char:`🧓`,name:`older person`,key:`1F9D3`},{char:`👴`,name:`old man`,key:`1F474`},{char:`👵`,name:`old woman`,key:`1F475`},{char:`🙍`,name:`person frowning`,key:`1F64D`},{char:`🙍‍♂️`,name:`man frowning`,key:`1F64D-200D-2642-FE0F`},{char:`🙍‍♀️`,name:`woman frowning`,key:`1F64D-200D-2640-FE0F`},{char:`🙎`,name:`person pouting`,key:`1F64E`},{char:`🙎‍♂️`,name:`man pouting`,key:`1F64E-200D-2642-FE0F`},{char:`🙎‍♀️`,name:`woman pouting`,key:`1F64E-200D-2640-FE0F`},{char:`🙅`,name:`person gesturing NO`,key:`1F645`},{char:`🙅‍♂️`,name:`man gesturing NO`,key:`1F645-200D-2642-FE0F`},{char:`🙅‍♀️`,name:`woman gesturing NO`,key:`1F645-200D-2640-FE0F`},{char:`🙆`,name:`person gesturing OK`,key:`1F646`},{char:`🙆‍♂️`,name:`man gesturing OK`,key:`1F646-200D-2642-FE0F`},{char:`🙆‍♀️`,name:`woman gesturing OK`,key:`1F646-200D-2640-FE0F`},{char:`💁`,name:`person tipping hand`,key:`1F481`},{char:`💁‍♂️`,name:`man tipping hand`,key:`1F481-200D-2642-FE0F`},{char:`💁‍♀️`,name:`woman tipping hand`,key:`1F481-200D-2640-FE0F`},{char:`🙋`,name:`person raising hand`,key:`1F64B`},{char:`🙋‍♂️`,name:`man raising hand`,key:`1F64B-200D-2642-FE0F`},{char:`🙋‍♀️`,name:`woman raising hand`,key:`1F64B-200D-2640-FE0F`},{char:`🧏`,name:`deaf person`,key:`1F9CF`},{char:`🧏‍♂️`,name:`deaf man`,key:`1F9CF-200D-2642-FE0F`},{char:`🧏‍♀️`,name:`deaf woman`,key:`1F9CF-200D-2640-FE0F`},{char:`🙇`,name:`person bowing`,key:`1F647`},{char:`🙇‍♂️`,name:`man bowing`,key:`1F647-200D-2642-FE0F`},{char:`🙇‍♀️`,name:`woman bowing`,key:`1F647-200D-2640-FE0F`},{char:`🤦`,name:`person facepalming`,key:`1F926`},{char:`🤦‍♂️`,name:`man facepalming`,key:`1F926-200D-2642-FE0F`},{char:`🤦‍♀️`,name:`woman facepalming`,key:`1F926-200D-2640-FE0F`},{char:`🤷`,name:`person shrugging`,key:`1F937`},{char:`🤷‍♂️`,name:`man shrugging`,key:`1F937-200D-2642-FE0F`},{char:`🤷‍♀️`,name:`woman shrugging`,key:`1F937-200D-2640-FE0F`},{char:`🧑‍⚕️`,name:`health worker`,key:`1F9D1-200D-2695-FE0F`},{char:`👨‍⚕️`,name:`man health worker`,key:`1F468-200D-2695-FE0F`},{char:`👩‍⚕️`,name:`woman health worker`,key:`1F469-200D-2695-FE0F`},{char:`🧑‍🎓`,name:`student`,key:`1F9D1-200D-1F393`},{char:`👨‍🎓`,name:`man student`,key:`1F468-200D-1F393`},{char:`👩‍🎓`,name:`woman student`,key:`1F469-200D-1F393`},{char:`🧑‍🏫`,name:`teacher`,key:`1F9D1-200D-1F3EB`},{char:`👨‍🏫`,name:`man teacher`,key:`1F468-200D-1F3EB`},{char:`👩‍🏫`,name:`woman teacher`,key:`1F469-200D-1F3EB`},{char:`🧑‍⚖️`,name:`judge`,key:`1F9D1-200D-2696-FE0F`},{char:`👨‍⚖️`,name:`man judge`,key:`1F468-200D-2696-FE0F`},{char:`👩‍⚖️`,name:`woman judge`,key:`1F469-200D-2696-FE0F`},{char:`🧑‍🌾`,name:`farmer`,key:`1F9D1-200D-1F33E`},{char:`👨‍🌾`,name:`man farmer`,key:`1F468-200D-1F33E`},{char:`👩‍🌾`,name:`woman farmer`,key:`1F469-200D-1F33E`},{char:`🧑‍🍳`,name:`cook`,key:`1F9D1-200D-1F373`},{char:`👨‍🍳`,name:`man cook`,key:`1F468-200D-1F373`},{char:`👩‍🍳`,name:`woman cook`,key:`1F469-200D-1F373`},{char:`🧑‍🔧`,name:`mechanic`,key:`1F9D1-200D-1F527`},{char:`👨‍🔧`,name:`man mechanic`,key:`1F468-200D-1F527`},{char:`👩‍🔧`,name:`woman mechanic`,key:`1F469-200D-1F527`},{char:`🧑‍🏭`,name:`factory worker`,key:`1F9D1-200D-1F3ED`},{char:`👨‍🏭`,name:`man factory worker`,key:`1F468-200D-1F3ED`},{char:`👩‍🏭`,name:`woman factory worker`,key:`1F469-200D-1F3ED`},{char:`🧑‍💼`,name:`office worker`,key:`1F9D1-200D-1F4BC`},{char:`👨‍💼`,name:`man office worker`,key:`1F468-200D-1F4BC`},{char:`👩‍💼`,name:`woman office worker`,key:`1F469-200D-1F4BC`},{char:`🧑‍🔬`,name:`scientist`,key:`1F9D1-200D-1F52C`},{char:`👨‍🔬`,name:`man scientist`,key:`1F468-200D-1F52C`},{char:`👩‍🔬`,name:`woman scientist`,key:`1F469-200D-1F52C`},{char:`🧑‍💻`,name:`technologist`,key:`1F9D1-200D-1F4BB`},{char:`👨‍💻`,name:`man technologist`,key:`1F468-200D-1F4BB`},{char:`👩‍💻`,name:`woman technologist`,key:`1F469-200D-1F4BB`},{char:`🧑‍🎤`,name:`singer`,key:`1F9D1-200D-1F3A4`},{char:`👨‍🎤`,name:`man singer`,key:`1F468-200D-1F3A4`},{char:`👩‍🎤`,name:`woman singer`,key:`1F469-200D-1F3A4`},{char:`🧑‍🎨`,name:`artist`,key:`1F9D1-200D-1F3A8`},{char:`👨‍🎨`,name:`man artist`,key:`1F468-200D-1F3A8`},{char:`👩‍🎨`,name:`woman artist`,key:`1F469-200D-1F3A8`},{char:`🧑‍✈️`,name:`pilot`,key:`1F9D1-200D-2708-FE0F`},{char:`👨‍✈️`,name:`man pilot`,key:`1F468-200D-2708-FE0F`},{char:`👩‍✈️`,name:`woman pilot`,key:`1F469-200D-2708-FE0F`},{char:`🧑‍🚀`,name:`astronaut`,key:`1F9D1-200D-1F680`},{char:`👨‍🚀`,name:`man astronaut`,key:`1F468-200D-1F680`},{char:`👩‍🚀`,name:`woman astronaut`,key:`1F469-200D-1F680`},{char:`🧑‍🚒`,name:`firefighter`,key:`1F9D1-200D-1F692`},{char:`👨‍🚒`,name:`man firefighter`,key:`1F468-200D-1F692`},{char:`👩‍🚒`,name:`woman firefighter`,key:`1F469-200D-1F692`},{char:`👮`,name:`police officer`,key:`1F46E`},{char:`👮‍♂️`,name:`man police officer`,key:`1F46E-200D-2642-FE0F`},{char:`👮‍♀️`,name:`woman police officer`,key:`1F46E-200D-2640-FE0F`},{char:`🕵️`,name:`detective`,key:`1F575`},{char:`🕵️‍♂️`,name:`man detective`,key:`1F575-FE0F-200D-2642-FE0F`},{char:`🕵️‍♀️`,name:`woman detective`,key:`1F575-FE0F-200D-2640-FE0F`},{char:`💂`,name:`guard`,key:`1F482`},{char:`💂‍♂️`,name:`man guard`,key:`1F482-200D-2642-FE0F`},{char:`💂‍♀️`,name:`woman guard`,key:`1F482-200D-2640-FE0F`},{char:`🥷`,name:`ninja`,key:`1F977`},{char:`👷`,name:`construction worker`,key:`1F477`},{char:`👷‍♂️`,name:`man construction worker`,key:`1F477-200D-2642-FE0F`},{char:`👷‍♀️`,name:`woman construction worker`,key:`1F477-200D-2640-FE0F`},{char:`🫅`,name:`person with crown`,key:`1FAC5`},{char:`🤴`,name:`prince`,key:`1F934`},{char:`👸`,name:`princess`,key:`1F478`},{char:`👳`,name:`person wearing turban`,key:`1F473`},{char:`👳‍♂️`,name:`man wearing turban`,key:`1F473-200D-2642-FE0F`},{char:`👳‍♀️`,name:`woman wearing turban`,key:`1F473-200D-2640-FE0F`},{char:`👲`,name:`person with skullcap`,key:`1F472`},{char:`🧕`,name:`woman with headscarf`,key:`1F9D5`},{char:`🤵`,name:`person in tuxedo`,key:`1F935`},{char:`🤵‍♂️`,name:`man in tuxedo`,key:`1F935-200D-2642-FE0F`},{char:`🤵‍♀️`,name:`woman in tuxedo`,key:`1F935-200D-2640-FE0F`},{char:`👰`,name:`person with veil`,key:`1F470`},{char:`👰‍♂️`,name:`man with veil`,key:`1F470-200D-2642-FE0F`},{char:`👰‍♀️`,name:`woman with veil`,key:`1F470-200D-2640-FE0F`},{char:`🤰`,name:`pregnant woman`,key:`1F930`},{char:`🫃`,name:`pregnant man`,key:`1FAC3`},{char:`🫄`,name:`pregnant person`,key:`1FAC4`},{char:`🤱`,name:`breast-feeding`,key:`1F931`},{char:`👩‍🍼`,name:`woman feeding baby`,key:`1F469-200D-1F37C`},{char:`👨‍🍼`,name:`man feeding baby`,key:`1F468-200D-1F37C`},{char:`🧑‍🍼`,name:`person feeding baby`,key:`1F9D1-200D-1F37C`},{char:`👼`,name:`baby angel`,key:`1F47C`},{char:`🎅`,name:`Santa Claus`,key:`1F385`},{char:`🤶`,name:`Mrs. Claus`,key:`1F936`},{char:`🧑‍🎄`,name:`Mx Claus`,key:`1F9D1-200D-1F384`},{char:`🦸`,name:`superhero`,key:`1F9B8`},{char:`🦸‍♂️`,name:`man superhero`,key:`1F9B8-200D-2642-FE0F`},{char:`🦸‍♀️`,name:`woman superhero`,key:`1F9B8-200D-2640-FE0F`},{char:`🦹`,name:`supervillain`,key:`1F9B9`},{char:`🦹‍♂️`,name:`man supervillain`,key:`1F9B9-200D-2642-FE0F`},{char:`🦹‍♀️`,name:`woman supervillain`,key:`1F9B9-200D-2640-FE0F`},{char:`🧙`,name:`mage`,key:`1F9D9`},{char:`🧙‍♂️`,name:`man mage`,key:`1F9D9-200D-2642-FE0F`},{char:`🧙‍♀️`,name:`woman mage`,key:`1F9D9-200D-2640-FE0F`},{char:`🧚`,name:`fairy`,key:`1F9DA`},{char:`🧚‍♂️`,name:`man fairy`,key:`1F9DA-200D-2642-FE0F`},{char:`🧚‍♀️`,name:`woman fairy`,key:`1F9DA-200D-2640-FE0F`},{char:`🧛`,name:`vampire`,key:`1F9DB`},{char:`🧛‍♂️`,name:`man vampire`,key:`1F9DB-200D-2642-FE0F`},{char:`🧛‍♀️`,name:`woman vampire`,key:`1F9DB-200D-2640-FE0F`},{char:`🧜`,name:`merperson`,key:`1F9DC`},{char:`🧜‍♂️`,name:`merman`,key:`1F9DC-200D-2642-FE0F`},{char:`🧜‍♀️`,name:`mermaid`,key:`1F9DC-200D-2640-FE0F`},{char:`🧝`,name:`elf`,key:`1F9DD`},{char:`🧝‍♂️`,name:`man elf`,key:`1F9DD-200D-2642-FE0F`},{char:`🧝‍♀️`,name:`woman elf`,key:`1F9DD-200D-2640-FE0F`},{char:`🧞`,name:`genie`,key:`1F9DE`},{char:`🧞‍♂️`,name:`man genie`,key:`1F9DE-200D-2642-FE0F`},{char:`🧞‍♀️`,name:`woman genie`,key:`1F9DE-200D-2640-FE0F`},{char:`🧟`,name:`zombie`,key:`1F9DF`},{char:`🧟‍♂️`,name:`man zombie`,key:`1F9DF-200D-2642-FE0F`},{char:`🧟‍♀️`,name:`woman zombie`,key:`1F9DF-200D-2640-FE0F`},{char:`🧌`,name:`troll`,key:`1F9CC`},{char:`🫈`,name:`hairy creature`,key:`1FAC8`},{char:`💆`,name:`person getting massage`,key:`1F486`},{char:`💆‍♂️`,name:`man getting massage`,key:`1F486-200D-2642-FE0F`},{char:`💆‍♀️`,name:`woman getting massage`,key:`1F486-200D-2640-FE0F`},{char:`💇`,name:`person getting haircut`,key:`1F487`},{char:`💇‍♂️`,name:`man getting haircut`,key:`1F487-200D-2642-FE0F`},{char:`💇‍♀️`,name:`woman getting haircut`,key:`1F487-200D-2640-FE0F`},{char:`🚶`,name:`person walking`,key:`1F6B6`},{char:`🚶‍♂️`,name:`man walking`,key:`1F6B6-200D-2642-FE0F`},{char:`🚶‍♀️`,name:`woman walking`,key:`1F6B6-200D-2640-FE0F`},{char:`🚶‍➡️`,name:`person walking facing right`,key:`1F6B6-200D-27A1-FE0F`},{char:`🚶‍♀️‍➡️`,name:`woman walking facing right`,key:`1F6B6-200D-2640-FE0F-200D-27A1-FE0F`},{char:`🚶‍♂️‍➡️`,name:`man walking facing right`,key:`1F6B6-200D-2642-FE0F-200D-27A1-FE0F`},{char:`🧍`,name:`person standing`,key:`1F9CD`},{char:`🧍‍♂️`,name:`man standing`,key:`1F9CD-200D-2642-FE0F`},{char:`🧍‍♀️`,name:`woman standing`,key:`1F9CD-200D-2640-FE0F`},{char:`🧎`,name:`person kneeling`,key:`1F9CE`},{char:`🧎‍♂️`,name:`man kneeling`,key:`1F9CE-200D-2642-FE0F`},{char:`🧎‍♀️`,name:`woman kneeling`,key:`1F9CE-200D-2640-FE0F`},{char:`🧎‍➡️`,name:`person kneeling facing right`,key:`1F9CE-200D-27A1-FE0F`},{char:`🧎‍♀️‍➡️`,name:`woman kneeling facing right`,key:`1F9CE-200D-2640-FE0F-200D-27A1-FE0F`},{char:`🧎‍♂️‍➡️`,name:`man kneeling facing right`,key:`1F9CE-200D-2642-FE0F-200D-27A1-FE0F`},{char:`🧑‍🦯`,name:`person with white cane`,key:`1F9D1-200D-1F9AF`},{char:`🧑‍🦯‍➡️`,name:`person with white cane facing right`,key:`1F9D1-200D-1F9AF-200D-27A1-FE0F`},{char:`👨‍🦯`,name:`man with white cane`,key:`1F468-200D-1F9AF`},{char:`👨‍🦯‍➡️`,name:`man with white cane facing right`,key:`1F468-200D-1F9AF-200D-27A1-FE0F`},{char:`👩‍🦯`,name:`woman with white cane`,key:`1F469-200D-1F9AF`},{char:`👩‍🦯‍➡️`,name:`woman with white cane facing right`,key:`1F469-200D-1F9AF-200D-27A1-FE0F`},{char:`🧑‍🦼`,name:`person in motorized wheelchair`,key:`1F9D1-200D-1F9BC`},{char:`🧑‍🦼‍➡️`,name:`person in motorized wheelchair facing right`,key:`1F9D1-200D-1F9BC-200D-27A1-FE0F`},{char:`👨‍🦼`,name:`man in motorized wheelchair`,key:`1F468-200D-1F9BC`},{char:`👨‍🦼‍➡️`,name:`man in motorized wheelchair facing right`,key:`1F468-200D-1F9BC-200D-27A1-FE0F`},{char:`👩‍🦼`,name:`woman in motorized wheelchair`,key:`1F469-200D-1F9BC`},{char:`👩‍🦼‍➡️`,name:`woman in motorized wheelchair facing right`,key:`1F469-200D-1F9BC-200D-27A1-FE0F`},{char:`🧑‍🦽`,name:`person in manual wheelchair`,key:`1F9D1-200D-1F9BD`},{char:`🧑‍🦽‍➡️`,name:`person in manual wheelchair facing right`,key:`1F9D1-200D-1F9BD-200D-27A1-FE0F`},{char:`👨‍🦽`,name:`man in manual wheelchair`,key:`1F468-200D-1F9BD`},{char:`👨‍🦽‍➡️`,name:`man in manual wheelchair facing right`,key:`1F468-200D-1F9BD-200D-27A1-FE0F`},{char:`👩‍🦽`,name:`woman in manual wheelchair`,key:`1F469-200D-1F9BD`},{char:`👩‍🦽‍➡️`,name:`woman in manual wheelchair facing right`,key:`1F469-200D-1F9BD-200D-27A1-FE0F`},{char:`🏃`,name:`person running`,key:`1F3C3`},{char:`🏃‍♂️`,name:`man running`,key:`1F3C3-200D-2642-FE0F`},{char:`🏃‍♀️`,name:`woman running`,key:`1F3C3-200D-2640-FE0F`},{char:`🏃‍➡️`,name:`person running facing right`,key:`1F3C3-200D-27A1-FE0F`},{char:`🏃‍♀️‍➡️`,name:`woman running facing right`,key:`1F3C3-200D-2640-FE0F-200D-27A1-FE0F`},{char:`🏃‍♂️‍➡️`,name:`man running facing right`,key:`1F3C3-200D-2642-FE0F-200D-27A1-FE0F`},{char:`🧑‍🩰`,name:`ballet dancer`,key:`1F9D1-200D-1FA70`},{char:`💃`,name:`woman dancing`,key:`1F483`},{char:`🕺`,name:`man dancing`,key:`1F57A`},{char:`🕴️`,name:`person in suit levitating`,key:`1F574`},{char:`👯`,name:`people with bunny ears`,key:`1F46F`},{char:`👯‍♂️`,name:`men with bunny ears`,key:`1F46F-200D-2642-FE0F`},{char:`👯‍♀️`,name:`women with bunny ears`,key:`1F46F-200D-2640-FE0F`},{char:`🧖`,name:`person in steamy room`,key:`1F9D6`},{char:`🧖‍♂️`,name:`man in steamy room`,key:`1F9D6-200D-2642-FE0F`},{char:`🧖‍♀️`,name:`woman in steamy room`,key:`1F9D6-200D-2640-FE0F`},{char:`🧗`,name:`person climbing`,key:`1F9D7`},{char:`🧗‍♂️`,name:`man climbing`,key:`1F9D7-200D-2642-FE0F`},{char:`🧗‍♀️`,name:`woman climbing`,key:`1F9D7-200D-2640-FE0F`},{char:`🤺`,name:`person fencing`,key:`1F93A`},{char:`🏇`,name:`horse racing`,key:`1F3C7`},{char:`⛷️`,name:`skier`,key:`26F7`},{char:`🏂`,name:`snowboarder`,key:`1F3C2`},{char:`🏌️`,name:`person golfing`,key:`1F3CC`},{char:`🏌️‍♂️`,name:`man golfing`,key:`1F3CC-FE0F-200D-2642-FE0F`},{char:`🏌️‍♀️`,name:`woman golfing`,key:`1F3CC-FE0F-200D-2640-FE0F`},{char:`🏄`,name:`person surfing`,key:`1F3C4`},{char:`🏄‍♂️`,name:`man surfing`,key:`1F3C4-200D-2642-FE0F`},{char:`🏄‍♀️`,name:`woman surfing`,key:`1F3C4-200D-2640-FE0F`},{char:`🚣`,name:`person rowing boat`,key:`1F6A3`},{char:`🚣‍♂️`,name:`man rowing boat`,key:`1F6A3-200D-2642-FE0F`},{char:`🚣‍♀️`,name:`woman rowing boat`,key:`1F6A3-200D-2640-FE0F`},{char:`🏊`,name:`person swimming`,key:`1F3CA`},{char:`🏊‍♂️`,name:`man swimming`,key:`1F3CA-200D-2642-FE0F`},{char:`🏊‍♀️`,name:`woman swimming`,key:`1F3CA-200D-2640-FE0F`},{char:`⛹️`,name:`person bouncing ball`,key:`26F9`},{char:`⛹️‍♂️`,name:`man bouncing ball`,key:`26F9-FE0F-200D-2642-FE0F`},{char:`⛹️‍♀️`,name:`woman bouncing ball`,key:`26F9-FE0F-200D-2640-FE0F`},{char:`🏋️`,name:`person lifting weights`,key:`1F3CB`},{char:`🏋️‍♂️`,name:`man lifting weights`,key:`1F3CB-FE0F-200D-2642-FE0F`},{char:`🏋️‍♀️`,name:`woman lifting weights`,key:`1F3CB-FE0F-200D-2640-FE0F`},{char:`🚴`,name:`person biking`,key:`1F6B4`},{char:`🚴‍♂️`,name:`man biking`,key:`1F6B4-200D-2642-FE0F`},{char:`🚴‍♀️`,name:`woman biking`,key:`1F6B4-200D-2640-FE0F`},{char:`🚵`,name:`person mountain biking`,key:`1F6B5`},{char:`🚵‍♂️`,name:`man mountain biking`,key:`1F6B5-200D-2642-FE0F`},{char:`🚵‍♀️`,name:`woman mountain biking`,key:`1F6B5-200D-2640-FE0F`},{char:`🤸`,name:`person cartwheeling`,key:`1F938`},{char:`🤸‍♂️`,name:`man cartwheeling`,key:`1F938-200D-2642-FE0F`},{char:`🤸‍♀️`,name:`woman cartwheeling`,key:`1F938-200D-2640-FE0F`},{char:`🤼`,name:`people wrestling`,key:`1F93C`},{char:`🤼‍♂️`,name:`men wrestling`,key:`1F93C-200D-2642-FE0F`},{char:`🤼‍♀️`,name:`women wrestling`,key:`1F93C-200D-2640-FE0F`},{char:`🤽`,name:`person playing water polo`,key:`1F93D`},{char:`🤽‍♂️`,name:`man playing water polo`,key:`1F93D-200D-2642-FE0F`},{char:`🤽‍♀️`,name:`woman playing water polo`,key:`1F93D-200D-2640-FE0F`},{char:`🤾`,name:`person playing handball`,key:`1F93E`},{char:`🤾‍♂️`,name:`man playing handball`,key:`1F93E-200D-2642-FE0F`},{char:`🤾‍♀️`,name:`woman playing handball`,key:`1F93E-200D-2640-FE0F`},{char:`🤹`,name:`person juggling`,key:`1F939`},{char:`🤹‍♂️`,name:`man juggling`,key:`1F939-200D-2642-FE0F`},{char:`🤹‍♀️`,name:`woman juggling`,key:`1F939-200D-2640-FE0F`},{char:`🧘`,name:`person in lotus position`,key:`1F9D8`},{char:`🧘‍♂️`,name:`man in lotus position`,key:`1F9D8-200D-2642-FE0F`},{char:`🧘‍♀️`,name:`woman in lotus position`,key:`1F9D8-200D-2640-FE0F`},{char:`🛀`,name:`person taking bath`,key:`1F6C0`},{char:`🛌`,name:`person in bed`,key:`1F6CC`},{char:`🧑‍🤝‍🧑`,name:`people holding hands`,key:`1F9D1-200D-1F91D-200D-1F9D1`},{char:`👭`,name:`women holding hands`,key:`1F46D`},{char:`👫`,name:`woman and man holding hands`,key:`1F46B`},{char:`👬`,name:`men holding hands`,key:`1F46C`},{char:`💏`,name:`kiss`,key:`1F48F`},{char:`👩‍❤️‍💋‍👨`,name:`kiss woman, man`,key:`1F469-200D-2764-FE0F-200D-1F48B-200D-1F468`},{char:`👨‍❤️‍💋‍👨`,name:`kiss man, man`,key:`1F468-200D-2764-FE0F-200D-1F48B-200D-1F468`},{char:`👩‍❤️‍💋‍👩`,name:`kiss woman, woman`,key:`1F469-200D-2764-FE0F-200D-1F48B-200D-1F469`},{char:`💑`,name:`couple with heart`,key:`1F491`},{char:`👩‍❤️‍👨`,name:`couple with heart woman, man`,key:`1F469-200D-2764-FE0F-200D-1F468`},{char:`👨‍❤️‍👨`,name:`couple with heart man, man`,key:`1F468-200D-2764-FE0F-200D-1F468`},{char:`👩‍❤️‍👩`,name:`couple with heart woman, woman`,key:`1F469-200D-2764-FE0F-200D-1F469`},{char:`👨‍👩‍👦`,name:`family man, woman, boy`,key:`1F468-200D-1F469-200D-1F466`},{char:`👨‍👩‍👧`,name:`family man, woman, girl`,key:`1F468-200D-1F469-200D-1F467`},{char:`👨‍👩‍👧‍👦`,name:`family man, woman, girl, boy`,key:`1F468-200D-1F469-200D-1F467-200D-1F466`},{char:`👨‍👩‍👦‍👦`,name:`family man, woman, boy, boy`,key:`1F468-200D-1F469-200D-1F466-200D-1F466`},{char:`👨‍👩‍👧‍👧`,name:`family man, woman, girl, girl`,key:`1F468-200D-1F469-200D-1F467-200D-1F467`},{char:`👨‍👨‍👦`,name:`family man, man, boy`,key:`1F468-200D-1F468-200D-1F466`},{char:`👨‍👨‍👧`,name:`family man, man, girl`,key:`1F468-200D-1F468-200D-1F467`},{char:`👨‍👨‍👧‍👦`,name:`family man, man, girl, boy`,key:`1F468-200D-1F468-200D-1F467-200D-1F466`},{char:`👨‍👨‍👦‍👦`,name:`family man, man, boy, boy`,key:`1F468-200D-1F468-200D-1F466-200D-1F466`},{char:`👨‍👨‍👧‍👧`,name:`family man, man, girl, girl`,key:`1F468-200D-1F468-200D-1F467-200D-1F467`},{char:`👩‍👩‍👦`,name:`family woman, woman, boy`,key:`1F469-200D-1F469-200D-1F466`},{char:`👩‍👩‍👧`,name:`family woman, woman, girl`,key:`1F469-200D-1F469-200D-1F467`},{char:`👩‍👩‍👧‍👦`,name:`family woman, woman, girl, boy`,key:`1F469-200D-1F469-200D-1F467-200D-1F466`},{char:`👩‍👩‍👦‍👦`,name:`family woman, woman, boy, boy`,key:`1F469-200D-1F469-200D-1F466-200D-1F466`},{char:`👩‍👩‍👧‍👧`,name:`family woman, woman, girl, girl`,key:`1F469-200D-1F469-200D-1F467-200D-1F467`},{char:`👨‍👦`,name:`family man, boy`,key:`1F468-200D-1F466`},{char:`👨‍👦‍👦`,name:`family man, boy, boy`,key:`1F468-200D-1F466-200D-1F466`},{char:`👨‍👧`,name:`family man, girl`,key:`1F468-200D-1F467`},{char:`👨‍👧‍👦`,name:`family man, girl, boy`,key:`1F468-200D-1F467-200D-1F466`},{char:`👨‍👧‍👧`,name:`family man, girl, girl`,key:`1F468-200D-1F467-200D-1F467`},{char:`👩‍👦`,name:`family woman, boy`,key:`1F469-200D-1F466`},{char:`👩‍👦‍👦`,name:`family woman, boy, boy`,key:`1F469-200D-1F466-200D-1F466`},{char:`👩‍👧`,name:`family woman, girl`,key:`1F469-200D-1F467`},{char:`👩‍👧‍👦`,name:`family woman, girl, boy`,key:`1F469-200D-1F467-200D-1F466`},{char:`👩‍👧‍👧`,name:`family woman, girl, girl`,key:`1F469-200D-1F467-200D-1F467`},{char:`🗣️`,name:`speaking head`,key:`1F5E3`},{char:`👤`,name:`bust in silhouette`,key:`1F464`},{char:`👥`,name:`busts in silhouette`,key:`1F465`},{char:`🫂`,name:`people hugging`,key:`1FAC2`},{char:`👪`,name:`family`,key:`1F46A`},{char:`🧑‍🧑‍🧒`,name:`family adult, adult, child`,key:`1F9D1-200D-1F9D1-200D-1F9D2`},{char:`🧑‍🧑‍🧒‍🧒`,name:`family adult, adult, child, child`,key:`1F9D1-200D-1F9D1-200D-1F9D2-200D-1F9D2`},{char:`🧑‍🧒`,name:`family adult, child`,key:`1F9D1-200D-1F9D2`},{char:`🧑‍🧒‍🧒`,name:`family adult, child, child`,key:`1F9D1-200D-1F9D2-200D-1F9D2`},{char:`👣`,name:`footprints`,key:`1F463`},{char:`🫆`,name:`fingerprint`,key:`1FAC6`}]},{id:`animals_nature`,label:`Animals & Nature`,emojis:[{char:`🐵`,name:`monkey face`,key:`1F435`},{char:`🐒`,name:`monkey`,key:`1F412`},{char:`🦍`,name:`gorilla`,key:`1F98D`},{char:`🦧`,name:`orangutan`,key:`1F9A7`},{char:`🐶`,name:`dog face`,key:`1F436`},{char:`🐕`,name:`dog`,key:`1F415`},{char:`🦮`,name:`guide dog`,key:`1F9AE`},{char:`🐕‍🦺`,name:`service dog`,key:`1F415-200D-1F9BA`},{char:`🐩`,name:`poodle`,key:`1F429`},{char:`🐺`,name:`wolf`,key:`1F43A`},{char:`🦊`,name:`fox`,key:`1F98A`},{char:`🦝`,name:`raccoon`,key:`1F99D`},{char:`🐱`,name:`cat face`,key:`1F431`},{char:`🐈`,name:`cat`,key:`1F408`},{char:`🐈‍⬛`,name:`black cat`,key:`1F408-200D-2B1B`},{char:`🦁`,name:`lion`,key:`1F981`},{char:`🐯`,name:`tiger face`,key:`1F42F`},{char:`🐅`,name:`tiger`,key:`1F405`},{char:`🐆`,name:`leopard`,key:`1F406`},{char:`🐴`,name:`horse face`,key:`1F434`},{char:`🫎`,name:`moose`,key:`1FACE`},{char:`🫏`,name:`donkey`,key:`1FACF`},{char:`🐎`,name:`horse`,key:`1F40E`},{char:`🦄`,name:`unicorn`,key:`1F984`},{char:`🦓`,name:`zebra`,key:`1F993`},{char:`🦌`,name:`deer`,key:`1F98C`},{char:`🦬`,name:`bison`,key:`1F9AC`},{char:`🐮`,name:`cow face`,key:`1F42E`},{char:`🐂`,name:`ox`,key:`1F402`},{char:`🐃`,name:`water buffalo`,key:`1F403`},{char:`🐄`,name:`cow`,key:`1F404`},{char:`🐷`,name:`pig face`,key:`1F437`},{char:`🐖`,name:`pig`,key:`1F416`},{char:`🐗`,name:`boar`,key:`1F417`},{char:`🐽`,name:`pig nose`,key:`1F43D`},{char:`🐏`,name:`ram`,key:`1F40F`},{char:`🐑`,name:`ewe`,key:`1F411`},{char:`🐐`,name:`goat`,key:`1F410`},{char:`🐪`,name:`camel`,key:`1F42A`},{char:`🐫`,name:`two-hump camel`,key:`1F42B`},{char:`🦙`,name:`llama`,key:`1F999`},{char:`🦒`,name:`giraffe`,key:`1F992`},{char:`🐘`,name:`elephant`,key:`1F418`},{char:`🦣`,name:`mammoth`,key:`1F9A3`},{char:`🦏`,name:`rhinoceros`,key:`1F98F`},{char:`🦛`,name:`hippopotamus`,key:`1F99B`},{char:`🐭`,name:`mouse face`,key:`1F42D`},{char:`🐁`,name:`mouse`,key:`1F401`},{char:`🐀`,name:`rat`,key:`1F400`},{char:`🐹`,name:`hamster`,key:`1F439`},{char:`🐰`,name:`rabbit face`,key:`1F430`},{char:`🐇`,name:`rabbit`,key:`1F407`},{char:`🐿️`,name:`chipmunk`,key:`1F43F`},{char:`🦫`,name:`beaver`,key:`1F9AB`},{char:`🦔`,name:`hedgehog`,key:`1F994`},{char:`🦇`,name:`bat`,key:`1F987`},{char:`🐻`,name:`bear`,key:`1F43B`},{char:`🐻‍❄️`,name:`polar bear`,key:`1F43B-200D-2744-FE0F`},{char:`🐨`,name:`koala`,key:`1F428`},{char:`🐼`,name:`panda`,key:`1F43C`},{char:`🦥`,name:`sloth`,key:`1F9A5`},{char:`🦦`,name:`otter`,key:`1F9A6`},{char:`🦨`,name:`skunk`,key:`1F9A8`},{char:`🦘`,name:`kangaroo`,key:`1F998`},{char:`🦡`,name:`badger`,key:`1F9A1`},{char:`🐾`,name:`paw prints`,key:`1F43E`},{char:`🦃`,name:`turkey`,key:`1F983`},{char:`🐔`,name:`chicken`,key:`1F414`},{char:`🐓`,name:`rooster`,key:`1F413`},{char:`🐣`,name:`hatching chick`,key:`1F423`},{char:`🐤`,name:`baby chick`,key:`1F424`},{char:`🐥`,name:`front-facing baby chick`,key:`1F425`},{char:`🐦`,name:`bird`,key:`1F426`},{char:`🐧`,name:`penguin`,key:`1F427`},{char:`🕊️`,name:`dove`,key:`1F54A`},{char:`🦅`,name:`eagle`,key:`1F985`},{char:`🦆`,name:`duck`,key:`1F986`},{char:`🦢`,name:`swan`,key:`1F9A2`},{char:`🦉`,name:`owl`,key:`1F989`},{char:`🦤`,name:`dodo`,key:`1F9A4`},{char:`🪶`,name:`feather`,key:`1FAB6`},{char:`🦩`,name:`flamingo`,key:`1F9A9`},{char:`🦚`,name:`peacock`,key:`1F99A`},{char:`🦜`,name:`parrot`,key:`1F99C`},{char:`🪽`,name:`wing`,key:`1FABD`},{char:`🐦‍⬛`,name:`black bird`,key:`1F426-200D-2B1B`},{char:`🪿`,name:`goose`,key:`1FABF`},{char:`🐦‍🔥`,name:`phoenix`,key:`1F426-200D-1F525`},{char:`🐸`,name:`frog`,key:`1F438`},{char:`🐊`,name:`crocodile`,key:`1F40A`},{char:`🐢`,name:`turtle`,key:`1F422`},{char:`🦎`,name:`lizard`,key:`1F98E`},{char:`🐍`,name:`snake`,key:`1F40D`},{char:`🐲`,name:`dragon face`,key:`1F432`},{char:`🐉`,name:`dragon`,key:`1F409`},{char:`🦕`,name:`sauropod`,key:`1F995`},{char:`🦖`,name:`T-Rex`,key:`1F996`},{char:`🐳`,name:`spouting whale`,key:`1F433`},{char:`🐋`,name:`whale`,key:`1F40B`},{char:`🐬`,name:`dolphin`,key:`1F42C`},{char:`🫍`,name:`orca`,key:`1FACD`},{char:`🦭`,name:`seal`,key:`1F9AD`},{char:`🐟`,name:`fish`,key:`1F41F`},{char:`🐠`,name:`tropical fish`,key:`1F420`},{char:`🐡`,name:`blowfish`,key:`1F421`},{char:`🦈`,name:`shark`,key:`1F988`},{char:`🐙`,name:`octopus`,key:`1F419`},{char:`🐚`,name:`spiral shell`,key:`1F41A`},{char:`🪸`,name:`coral`,key:`1FAB8`},{char:`🪼`,name:`jellyfish`,key:`1FABC`},{char:`🦀`,name:`crab`,key:`1F980`},{char:`🦞`,name:`lobster`,key:`1F99E`},{char:`🦐`,name:`shrimp`,key:`1F990`},{char:`🦑`,name:`squid`,key:`1F991`},{char:`🦪`,name:`oyster`,key:`1F9AA`},{char:`🐌`,name:`snail`,key:`1F40C`},{char:`🦋`,name:`butterfly`,key:`1F98B`},{char:`🐛`,name:`bug`,key:`1F41B`},{char:`🐜`,name:`ant`,key:`1F41C`},{char:`🐝`,name:`honeybee`,key:`1F41D`},{char:`🪲`,name:`beetle`,key:`1FAB2`},{char:`🐞`,name:`lady beetle`,key:`1F41E`},{char:`🦗`,name:`cricket`,key:`1F997`},{char:`🪳`,name:`cockroach`,key:`1FAB3`},{char:`🕷️`,name:`spider`,key:`1F577`},{char:`🕸️`,name:`spider web`,key:`1F578`},{char:`🦂`,name:`scorpion`,key:`1F982`},{char:`🦟`,name:`mosquito`,key:`1F99F`},{char:`🪰`,name:`fly`,key:`1FAB0`},{char:`🪱`,name:`worm`,key:`1FAB1`},{char:`🦠`,name:`microbe`,key:`1F9A0`},{char:`💐`,name:`bouquet`,key:`1F490`},{char:`🌸`,name:`cherry blossom`,key:`1F338`},{char:`💮`,name:`white flower`,key:`1F4AE`},{char:`🪷`,name:`lotus`,key:`1FAB7`},{char:`🏵️`,name:`rosette`,key:`1F3F5`},{char:`🌹`,name:`rose`,key:`1F339`},{char:`🥀`,name:`wilted flower`,key:`1F940`},{char:`🌺`,name:`hibiscus`,key:`1F33A`},{char:`🌻`,name:`sunflower`,key:`1F33B`},{char:`🌼`,name:`blossom`,key:`1F33C`},{char:`🌷`,name:`tulip`,key:`1F337`},{char:`🪻`,name:`hyacinth`,key:`1FABB`},{char:`🌱`,name:`seedling`,key:`1F331`},{char:`🪴`,name:`potted plant`,key:`1FAB4`},{char:`🌲`,name:`evergreen tree`,key:`1F332`},{char:`🌳`,name:`deciduous tree`,key:`1F333`},{char:`🌴`,name:`palm tree`,key:`1F334`},{char:`🌵`,name:`cactus`,key:`1F335`},{char:`🌾`,name:`sheaf of rice`,key:`1F33E`},{char:`🌿`,name:`herb`,key:`1F33F`},{char:`☘️`,name:`shamrock`,key:`2618`},{char:`🍀`,name:`four leaf clover`,key:`1F340`},{char:`🍁`,name:`maple leaf`,key:`1F341`},{char:`🍂`,name:`fallen leaf`,key:`1F342`},{char:`🍃`,name:`leaf fluttering in wind`,key:`1F343`},{char:`🪹`,name:`empty nest`,key:`1FAB9`},{char:`🪺`,name:`nest with eggs`,key:`1FABA`},{char:`🍄`,name:`mushroom`,key:`1F344`},{char:`🪾`,name:`leafless tree`,key:`1FABE`}]},{id:`food_drink`,label:`Food & Drink`,emojis:[{char:`🍇`,name:`grapes`,key:`1F347`},{char:`🍈`,name:`melon`,key:`1F348`},{char:`🍉`,name:`watermelon`,key:`1F349`},{char:`🍊`,name:`tangerine`,key:`1F34A`},{char:`🍋`,name:`lemon`,key:`1F34B`},{char:`🍋‍🟩`,name:`lime`,key:`1F34B-200D-1F7E9`},{char:`🍌`,name:`banana`,key:`1F34C`},{char:`🍍`,name:`pineapple`,key:`1F34D`},{char:`🥭`,name:`mango`,key:`1F96D`},{char:`🍎`,name:`red apple`,key:`1F34E`},{char:`🍏`,name:`green apple`,key:`1F34F`},{char:`🍐`,name:`pear`,key:`1F350`},{char:`🍑`,name:`peach`,key:`1F351`},{char:`🍒`,name:`cherries`,key:`1F352`},{char:`🍓`,name:`strawberry`,key:`1F353`},{char:`🫐`,name:`blueberries`,key:`1FAD0`},{char:`🥝`,name:`kiwi fruit`,key:`1F95D`},{char:`🍅`,name:`tomato`,key:`1F345`},{char:`🫒`,name:`olive`,key:`1FAD2`},{char:`🥥`,name:`coconut`,key:`1F965`},{char:`🥑`,name:`avocado`,key:`1F951`},{char:`🍆`,name:`eggplant`,key:`1F346`},{char:`🥔`,name:`potato`,key:`1F954`},{char:`🥕`,name:`carrot`,key:`1F955`},{char:`🌽`,name:`ear of corn`,key:`1F33D`},{char:`🌶️`,name:`hot pepper`,key:`1F336`},{char:`🫑`,name:`bell pepper`,key:`1FAD1`},{char:`🥒`,name:`cucumber`,key:`1F952`},{char:`🥬`,name:`leafy green`,key:`1F96C`},{char:`🥦`,name:`broccoli`,key:`1F966`},{char:`🧄`,name:`garlic`,key:`1F9C4`},{char:`🧅`,name:`onion`,key:`1F9C5`},{char:`🥜`,name:`peanuts`,key:`1F95C`},{char:`🫘`,name:`beans`,key:`1FAD8`},{char:`🌰`,name:`chestnut`,key:`1F330`},{char:`🫚`,name:`ginger root`,key:`1FADA`},{char:`🫛`,name:`pea pod`,key:`1FADB`},{char:`🍄‍🟫`,name:`brown mushroom`,key:`1F344-200D-1F7EB`},{char:`🫜`,name:`root vegetable`,key:`1FADC`},{char:`🍞`,name:`bread`,key:`1F35E`},{char:`🥐`,name:`croissant`,key:`1F950`},{char:`🥖`,name:`baguette bread`,key:`1F956`},{char:`🫓`,name:`flatbread`,key:`1FAD3`},{char:`🥨`,name:`pretzel`,key:`1F968`},{char:`🥯`,name:`bagel`,key:`1F96F`},{char:`🥞`,name:`pancakes`,key:`1F95E`},{char:`🧇`,name:`waffle`,key:`1F9C7`},{char:`🧀`,name:`cheese wedge`,key:`1F9C0`},{char:`🍖`,name:`meat on bone`,key:`1F356`},{char:`🍗`,name:`poultry leg`,key:`1F357`},{char:`🥩`,name:`cut of meat`,key:`1F969`},{char:`🥓`,name:`bacon`,key:`1F953`},{char:`🍔`,name:`hamburger`,key:`1F354`},{char:`🍟`,name:`french fries`,key:`1F35F`},{char:`🍕`,name:`pizza`,key:`1F355`},{char:`🌭`,name:`hot dog`,key:`1F32D`},{char:`🥪`,name:`sandwich`,key:`1F96A`},{char:`🌮`,name:`taco`,key:`1F32E`},{char:`🌯`,name:`burrito`,key:`1F32F`},{char:`🫔`,name:`tamale`,key:`1FAD4`},{char:`🥙`,name:`stuffed flatbread`,key:`1F959`},{char:`🧆`,name:`falafel`,key:`1F9C6`},{char:`🥚`,name:`egg`,key:`1F95A`},{char:`🍳`,name:`cooking`,key:`1F373`},{char:`🥘`,name:`shallow pan of food`,key:`1F958`},{char:`🍲`,name:`pot of food`,key:`1F372`},{char:`🫕`,name:`fondue`,key:`1FAD5`},{char:`🥣`,name:`bowl with spoon`,key:`1F963`},{char:`🥗`,name:`green salad`,key:`1F957`},{char:`🍿`,name:`popcorn`,key:`1F37F`},{char:`🧈`,name:`butter`,key:`1F9C8`},{char:`🧂`,name:`salt`,key:`1F9C2`},{char:`🥫`,name:`canned food`,key:`1F96B`},{char:`🍱`,name:`bento box`,key:`1F371`},{char:`🍘`,name:`rice cracker`,key:`1F358`},{char:`🍙`,name:`rice ball`,key:`1F359`},{char:`🍚`,name:`cooked rice`,key:`1F35A`},{char:`🍛`,name:`curry rice`,key:`1F35B`},{char:`🍜`,name:`steaming bowl`,key:`1F35C`},{char:`🍝`,name:`spaghetti`,key:`1F35D`},{char:`🍠`,name:`roasted sweet potato`,key:`1F360`},{char:`🍢`,name:`oden`,key:`1F362`},{char:`🍣`,name:`sushi`,key:`1F363`},{char:`🍤`,name:`fried shrimp`,key:`1F364`},{char:`🍥`,name:`fish cake with swirl`,key:`1F365`},{char:`🥮`,name:`moon cake`,key:`1F96E`},{char:`🍡`,name:`dango`,key:`1F361`},{char:`🥟`,name:`dumpling`,key:`1F95F`},{char:`🥠`,name:`fortune cookie`,key:`1F960`},{char:`🥡`,name:`takeout box`,key:`1F961`},{char:`🍦`,name:`soft ice cream`,key:`1F366`},{char:`🍧`,name:`shaved ice`,key:`1F367`},{char:`🍨`,name:`ice cream`,key:`1F368`},{char:`🍩`,name:`doughnut`,key:`1F369`},{char:`🍪`,name:`cookie`,key:`1F36A`},{char:`🎂`,name:`birthday cake`,key:`1F382`},{char:`🍰`,name:`shortcake`,key:`1F370`},{char:`🧁`,name:`cupcake`,key:`1F9C1`},{char:`🥧`,name:`pie`,key:`1F967`},{char:`🍫`,name:`chocolate bar`,key:`1F36B`},{char:`🍬`,name:`candy`,key:`1F36C`},{char:`🍭`,name:`lollipop`,key:`1F36D`},{char:`🍮`,name:`custard`,key:`1F36E`},{char:`🍯`,name:`honey pot`,key:`1F36F`},{char:`🍼`,name:`baby bottle`,key:`1F37C`},{char:`🥛`,name:`glass of milk`,key:`1F95B`},{char:`☕`,name:`hot beverage`,key:`2615`},{char:`🫖`,name:`teapot`,key:`1FAD6`},{char:`🍵`,name:`teacup without handle`,key:`1F375`},{char:`🍶`,name:`sake`,key:`1F376`},{char:`🍾`,name:`bottle with popping cork`,key:`1F37E`},{char:`🍷`,name:`wine glass`,key:`1F377`},{char:`🍸`,name:`cocktail glass`,key:`1F378`},{char:`🍹`,name:`tropical drink`,key:`1F379`},{char:`🍺`,name:`beer mug`,key:`1F37A`},{char:`🍻`,name:`clinking beer mugs`,key:`1F37B`},{char:`🥂`,name:`clinking glasses`,key:`1F942`},{char:`🥃`,name:`tumbler glass`,key:`1F943`},{char:`🫗`,name:`pouring liquid`,key:`1FAD7`},{char:`🥤`,name:`cup with straw`,key:`1F964`},{char:`🧋`,name:`bubble tea`,key:`1F9CB`},{char:`🧃`,name:`beverage box`,key:`1F9C3`},{char:`🧉`,name:`mate`,key:`1F9C9`},{char:`🧊`,name:`ice`,key:`1F9CA`},{char:`🥢`,name:`chopsticks`,key:`1F962`},{char:`🍽️`,name:`fork and knife with plate`,key:`1F37D`},{char:`🍴`,name:`fork and knife`,key:`1F374`},{char:`🥄`,name:`spoon`,key:`1F944`},{char:`🔪`,name:`kitchen knife`,key:`1F52A`},{char:`🫙`,name:`jar`,key:`1FAD9`},{char:`🏺`,name:`amphora`,key:`1F3FA`}]},{id:`travel_places`,label:`Travel & Places`,emojis:[{char:`🌍`,name:`globe showing Europe-Africa`,key:`1F30D`},{char:`🌎`,name:`globe showing Americas`,key:`1F30E`},{char:`🌏`,name:`globe showing Asia-Australia`,key:`1F30F`},{char:`🌐`,name:`globe with meridians`,key:`1F310`},{char:`🗺️`,name:`world map`,key:`1F5FA`},{char:`🗾`,name:`map of Japan`,key:`1F5FE`},{char:`🧭`,name:`compass`,key:`1F9ED`},{char:`🏔️`,name:`snow-capped mountain`,key:`1F3D4`},{char:`⛰️`,name:`mountain`,key:`26F0`},{char:`🛘`,name:`landslide`,key:`1F6D8`},{char:`🌋`,name:`volcano`,key:`1F30B`},{char:`🗻`,name:`mount fuji`,key:`1F5FB`},{char:`🏕️`,name:`camping`,key:`1F3D5`},{char:`🏖️`,name:`beach with umbrella`,key:`1F3D6`},{char:`🏜️`,name:`desert`,key:`1F3DC`},{char:`🏝️`,name:`desert island`,key:`1F3DD`},{char:`🏞️`,name:`national park`,key:`1F3DE`},{char:`🏟️`,name:`stadium`,key:`1F3DF`},{char:`🏛️`,name:`classical building`,key:`1F3DB`},{char:`🏗️`,name:`building construction`,key:`1F3D7`},{char:`🧱`,name:`brick`,key:`1F9F1`},{char:`🪨`,name:`rock`,key:`1FAA8`},{char:`🪵`,name:`wood`,key:`1FAB5`},{char:`🛖`,name:`hut`,key:`1F6D6`},{char:`🏘️`,name:`houses`,key:`1F3D8`},{char:`🏚️`,name:`derelict house`,key:`1F3DA`},{char:`🏠`,name:`house`,key:`1F3E0`},{char:`🏡`,name:`house with garden`,key:`1F3E1`},{char:`🏢`,name:`office building`,key:`1F3E2`},{char:`🏣`,name:`Japanese post office`,key:`1F3E3`},{char:`🏤`,name:`post office`,key:`1F3E4`},{char:`🏥`,name:`hospital`,key:`1F3E5`},{char:`🏦`,name:`bank`,key:`1F3E6`},{char:`🏨`,name:`hotel`,key:`1F3E8`},{char:`🏩`,name:`love hotel`,key:`1F3E9`},{char:`🏪`,name:`convenience store`,key:`1F3EA`},{char:`🏫`,name:`school`,key:`1F3EB`},{char:`🏬`,name:`department store`,key:`1F3EC`},{char:`🏭`,name:`factory`,key:`1F3ED`},{char:`🏯`,name:`Japanese castle`,key:`1F3EF`},{char:`🏰`,name:`castle`,key:`1F3F0`},{char:`💒`,name:`wedding`,key:`1F492`},{char:`🗼`,name:`Tokyo tower`,key:`1F5FC`},{char:`🗽`,name:`Statue of Liberty`,key:`1F5FD`},{char:`⛪`,name:`church`,key:`26EA`},{char:`🕌`,name:`mosque`,key:`1F54C`},{char:`🛕`,name:`hindu temple`,key:`1F6D5`},{char:`🕍`,name:`synagogue`,key:`1F54D`},{char:`⛩️`,name:`shinto shrine`,key:`26E9`},{char:`🕋`,name:`kaaba`,key:`1F54B`},{char:`⛲`,name:`fountain`,key:`26F2`},{char:`⛺`,name:`tent`,key:`26FA`},{char:`🌁`,name:`foggy`,key:`1F301`},{char:`🌃`,name:`night with stars`,key:`1F303`},{char:`🏙️`,name:`cityscape`,key:`1F3D9`},{char:`🌄`,name:`sunrise over mountains`,key:`1F304`},{char:`🌅`,name:`sunrise`,key:`1F305`},{char:`🌆`,name:`cityscape at dusk`,key:`1F306`},{char:`🌇`,name:`sunset`,key:`1F307`},{char:`🌉`,name:`bridge at night`,key:`1F309`},{char:`♨️`,name:`hot springs`,key:`2668`},{char:`🎠`,name:`carousel horse`,key:`1F3A0`},{char:`🛝`,name:`playground slide`,key:`1F6DD`},{char:`🎡`,name:`ferris wheel`,key:`1F3A1`},{char:`🎢`,name:`roller coaster`,key:`1F3A2`},{char:`💈`,name:`barber pole`,key:`1F488`},{char:`🎪`,name:`circus tent`,key:`1F3AA`},{char:`🚂`,name:`locomotive`,key:`1F682`},{char:`🚃`,name:`railway car`,key:`1F683`},{char:`🚄`,name:`high-speed train`,key:`1F684`},{char:`🚅`,name:`bullet train`,key:`1F685`},{char:`🚆`,name:`train`,key:`1F686`},{char:`🚇`,name:`metro`,key:`1F687`},{char:`🚈`,name:`light rail`,key:`1F688`},{char:`🚉`,name:`station`,key:`1F689`},{char:`🚊`,name:`tram`,key:`1F68A`},{char:`🚝`,name:`monorail`,key:`1F69D`},{char:`🚞`,name:`mountain railway`,key:`1F69E`},{char:`🚋`,name:`tram car`,key:`1F68B`},{char:`🚌`,name:`bus`,key:`1F68C`},{char:`🚍`,name:`oncoming bus`,key:`1F68D`},{char:`🚎`,name:`trolleybus`,key:`1F68E`},{char:`🚐`,name:`minibus`,key:`1F690`},{char:`🚑`,name:`ambulance`,key:`1F691`},{char:`🚒`,name:`fire engine`,key:`1F692`},{char:`🚓`,name:`police car`,key:`1F693`},{char:`🚔`,name:`oncoming police car`,key:`1F694`},{char:`🚕`,name:`taxi`,key:`1F695`},{char:`🚖`,name:`oncoming taxi`,key:`1F696`},{char:`🚗`,name:`automobile`,key:`1F697`},{char:`🚘`,name:`oncoming automobile`,key:`1F698`},{char:`🚙`,name:`sport utility vehicle`,key:`1F699`},{char:`🛻`,name:`pickup truck`,key:`1F6FB`},{char:`🚚`,name:`delivery truck`,key:`1F69A`},{char:`🚛`,name:`articulated lorry`,key:`1F69B`},{char:`🚜`,name:`tractor`,key:`1F69C`},{char:`🏎️`,name:`racing car`,key:`1F3CE`},{char:`🏍️`,name:`motorcycle`,key:`1F3CD`},{char:`🛵`,name:`motor scooter`,key:`1F6F5`},{char:`🦽`,name:`manual wheelchair`,key:`1F9BD`},{char:`🦼`,name:`motorized wheelchair`,key:`1F9BC`},{char:`🛺`,name:`auto rickshaw`,key:`1F6FA`},{char:`🚲`,name:`bicycle`,key:`1F6B2`},{char:`🛴`,name:`kick scooter`,key:`1F6F4`},{char:`🛹`,name:`skateboard`,key:`1F6F9`},{char:`🛼`,name:`roller skate`,key:`1F6FC`},{char:`🚏`,name:`bus stop`,key:`1F68F`},{char:`🛣️`,name:`motorway`,key:`1F6E3`},{char:`🛤️`,name:`railway track`,key:`1F6E4`},{char:`🛢️`,name:`oil drum`,key:`1F6E2`},{char:`⛽`,name:`fuel pump`,key:`26FD`},{char:`🛞`,name:`wheel`,key:`1F6DE`},{char:`🚨`,name:`police car light`,key:`1F6A8`},{char:`🚥`,name:`horizontal traffic light`,key:`1F6A5`},{char:`🚦`,name:`vertical traffic light`,key:`1F6A6`},{char:`🛑`,name:`stop sign`,key:`1F6D1`},{char:`🚧`,name:`construction`,key:`1F6A7`},{char:`⚓`,name:`anchor`,key:`2693`},{char:`🛟`,name:`ring buoy`,key:`1F6DF`},{char:`⛵`,name:`sailboat`,key:`26F5`},{char:`🛶`,name:`canoe`,key:`1F6F6`},{char:`🚤`,name:`speedboat`,key:`1F6A4`},{char:`🛳️`,name:`passenger ship`,key:`1F6F3`},{char:`⛴️`,name:`ferry`,key:`26F4`},{char:`🛥️`,name:`motor boat`,key:`1F6E5`},{char:`🚢`,name:`ship`,key:`1F6A2`},{char:`✈️`,name:`airplane`,key:`2708`},{char:`🛩️`,name:`small airplane`,key:`1F6E9`},{char:`🛫`,name:`airplane departure`,key:`1F6EB`},{char:`🛬`,name:`airplane arrival`,key:`1F6EC`},{char:`🪂`,name:`parachute`,key:`1FA82`},{char:`💺`,name:`seat`,key:`1F4BA`},{char:`🚁`,name:`helicopter`,key:`1F681`},{char:`🚟`,name:`suspension railway`,key:`1F69F`},{char:`🚠`,name:`mountain cableway`,key:`1F6A0`},{char:`🚡`,name:`aerial tramway`,key:`1F6A1`},{char:`🛰️`,name:`satellite`,key:`1F6F0`},{char:`🚀`,name:`rocket`,key:`1F680`},{char:`🛸`,name:`flying saucer`,key:`1F6F8`},{char:`🛎️`,name:`bellhop bell`,key:`1F6CE`},{char:`🧳`,name:`luggage`,key:`1F9F3`},{char:`⌛`,name:`hourglass done`,key:`231B`},{char:`⏳`,name:`hourglass not done`,key:`23F3`},{char:`⌚`,name:`watch`,key:`231A`},{char:`⏰`,name:`alarm clock`,key:`23F0`},{char:`⏱️`,name:`stopwatch`,key:`23F1`},{char:`⏲️`,name:`timer clock`,key:`23F2`},{char:`🕰️`,name:`mantelpiece clock`,key:`1F570`},{char:`🕛`,name:`twelve o’clock`,key:`1F55B`},{char:`🕧`,name:`twelve-thirty`,key:`1F567`},{char:`🕐`,name:`one o’clock`,key:`1F550`},{char:`🕜`,name:`one-thirty`,key:`1F55C`},{char:`🕑`,name:`two o’clock`,key:`1F551`},{char:`🕝`,name:`two-thirty`,key:`1F55D`},{char:`🕒`,name:`three o’clock`,key:`1F552`},{char:`🕞`,name:`three-thirty`,key:`1F55E`},{char:`🕓`,name:`four o’clock`,key:`1F553`},{char:`🕟`,name:`four-thirty`,key:`1F55F`},{char:`🕔`,name:`five o’clock`,key:`1F554`},{char:`🕠`,name:`five-thirty`,key:`1F560`},{char:`🕕`,name:`six o’clock`,key:`1F555`},{char:`🕡`,name:`six-thirty`,key:`1F561`},{char:`🕖`,name:`seven o’clock`,key:`1F556`},{char:`🕢`,name:`seven-thirty`,key:`1F562`},{char:`🕗`,name:`eight o’clock`,key:`1F557`},{char:`🕣`,name:`eight-thirty`,key:`1F563`},{char:`🕘`,name:`nine o’clock`,key:`1F558`},{char:`🕤`,name:`nine-thirty`,key:`1F564`},{char:`🕙`,name:`ten o’clock`,key:`1F559`},{char:`🕥`,name:`ten-thirty`,key:`1F565`},{char:`🕚`,name:`eleven o’clock`,key:`1F55A`},{char:`🕦`,name:`eleven-thirty`,key:`1F566`},{char:`🌑`,name:`new moon`,key:`1F311`},{char:`🌒`,name:`waxing crescent moon`,key:`1F312`},{char:`🌓`,name:`first quarter moon`,key:`1F313`},{char:`🌔`,name:`waxing gibbous moon`,key:`1F314`},{char:`🌕`,name:`full moon`,key:`1F315`},{char:`🌖`,name:`waning gibbous moon`,key:`1F316`},{char:`🌗`,name:`last quarter moon`,key:`1F317`},{char:`🌘`,name:`waning crescent moon`,key:`1F318`},{char:`🌙`,name:`crescent moon`,key:`1F319`},{char:`🌚`,name:`new moon face`,key:`1F31A`},{char:`🌛`,name:`first quarter moon face`,key:`1F31B`},{char:`🌜`,name:`last quarter moon face`,key:`1F31C`},{char:`🌡️`,name:`thermometer`,key:`1F321`},{char:`☀️`,name:`sun`,key:`2600`},{char:`🌝`,name:`full moon face`,key:`1F31D`},{char:`🌞`,name:`sun with face`,key:`1F31E`},{char:`🪐`,name:`ringed planet`,key:`1FA90`},{char:`⭐`,name:`star`,key:`2B50`},{char:`🌟`,name:`glowing star`,key:`1F31F`},{char:`🌠`,name:`shooting star`,key:`1F320`},{char:`🌌`,name:`milky way`,key:`1F30C`},{char:`☁️`,name:`cloud`,key:`2601`},{char:`⛅`,name:`sun behind cloud`,key:`26C5`},{char:`⛈️`,name:`cloud with lightning and rain`,key:`26C8`},{char:`🌤️`,name:`sun behind small cloud`,key:`1F324`},{char:`🌥️`,name:`sun behind large cloud`,key:`1F325`},{char:`🌦️`,name:`sun behind rain cloud`,key:`1F326`},{char:`🌧️`,name:`cloud with rain`,key:`1F327`},{char:`🌨️`,name:`cloud with snow`,key:`1F328`},{char:`🌩️`,name:`cloud with lightning`,key:`1F329`},{char:`🌪️`,name:`tornado`,key:`1F32A`},{char:`🌫️`,name:`fog`,key:`1F32B`},{char:`🌬️`,name:`wind face`,key:`1F32C`},{char:`🌀`,name:`cyclone`,key:`1F300`},{char:`🌈`,name:`rainbow`,key:`1F308`},{char:`🌂`,name:`closed umbrella`,key:`1F302`},{char:`☂️`,name:`umbrella`,key:`2602`},{char:`☔`,name:`umbrella with rain drops`,key:`2614`},{char:`⛱️`,name:`umbrella on ground`,key:`26F1`},{char:`⚡`,name:`high voltage`,key:`26A1`},{char:`❄️`,name:`snowflake`,key:`2744`},{char:`☃️`,name:`snowman`,key:`2603`},{char:`⛄`,name:`snowman without snow`,key:`26C4`},{char:`☄️`,name:`comet`,key:`2604`},{char:`🔥`,name:`fire`,key:`1F525`},{char:`💧`,name:`droplet`,key:`1F4A7`},{char:`🌊`,name:`water wave`,key:`1F30A`}]},{id:`activities`,label:`Activities`,emojis:[{char:`🎃`,name:`jack-o-lantern`,key:`1F383`},{char:`🎄`,name:`Christmas tree`,key:`1F384`},{char:`🎆`,name:`fireworks`,key:`1F386`},{char:`🎇`,name:`sparkler`,key:`1F387`},{char:`🧨`,name:`firecracker`,key:`1F9E8`},{char:`✨`,name:`sparkles`,key:`2728`},{char:`🎈`,name:`balloon`,key:`1F388`},{char:`🎉`,name:`party popper`,key:`1F389`},{char:`🎊`,name:`confetti ball`,key:`1F38A`},{char:`🎋`,name:`tanabata tree`,key:`1F38B`},{char:`🎍`,name:`pine decoration`,key:`1F38D`},{char:`🎎`,name:`Japanese dolls`,key:`1F38E`},{char:`🎏`,name:`carp streamer`,key:`1F38F`},{char:`🎐`,name:`wind chime`,key:`1F390`},{char:`🎑`,name:`moon viewing ceremony`,key:`1F391`},{char:`🧧`,name:`red envelope`,key:`1F9E7`},{char:`🎀`,name:`ribbon`,key:`1F380`},{char:`🎁`,name:`wrapped gift`,key:`1F381`},{char:`🎗️`,name:`reminder ribbon`,key:`1F397`},{char:`🎟️`,name:`admission tickets`,key:`1F39F`},{char:`🎫`,name:`ticket`,key:`1F3AB`},{char:`🎖️`,name:`military medal`,key:`1F396`},{char:`🏆`,name:`trophy`,key:`1F3C6`},{char:`🏅`,name:`sports medal`,key:`1F3C5`},{char:`🥇`,name:`1st place medal`,key:`1F947`},{char:`🥈`,name:`2nd place medal`,key:`1F948`},{char:`🥉`,name:`3rd place medal`,key:`1F949`},{char:`⚽`,name:`soccer ball`,key:`26BD`},{char:`⚾`,name:`baseball`,key:`26BE`},{char:`🥎`,name:`softball`,key:`1F94E`},{char:`🏀`,name:`basketball`,key:`1F3C0`},{char:`🏐`,name:`volleyball`,key:`1F3D0`},{char:`🏈`,name:`american football`,key:`1F3C8`},{char:`🏉`,name:`rugby football`,key:`1F3C9`},{char:`🎾`,name:`tennis`,key:`1F3BE`},{char:`🥏`,name:`flying disc`,key:`1F94F`},{char:`🎳`,name:`bowling`,key:`1F3B3`},{char:`🏏`,name:`cricket game`,key:`1F3CF`},{char:`🏑`,name:`field hockey`,key:`1F3D1`},{char:`🏒`,name:`ice hockey`,key:`1F3D2`},{char:`🥍`,name:`lacrosse`,key:`1F94D`},{char:`🏓`,name:`ping pong`,key:`1F3D3`},{char:`🏸`,name:`badminton`,key:`1F3F8`},{char:`🥊`,name:`boxing glove`,key:`1F94A`},{char:`🥋`,name:`martial arts uniform`,key:`1F94B`},{char:`🥅`,name:`goal net`,key:`1F945`},{char:`⛳`,name:`flag in hole`,key:`26F3`},{char:`⛸️`,name:`ice skate`,key:`26F8`},{char:`🎣`,name:`fishing pole`,key:`1F3A3`},{char:`🤿`,name:`diving mask`,key:`1F93F`},{char:`🎽`,name:`running shirt`,key:`1F3BD`},{char:`🎿`,name:`skis`,key:`1F3BF`},{char:`🛷`,name:`sled`,key:`1F6F7`},{char:`🥌`,name:`curling stone`,key:`1F94C`},{char:`🎯`,name:`bullseye`,key:`1F3AF`},{char:`🪀`,name:`yo-yo`,key:`1FA80`},{char:`🪁`,name:`kite`,key:`1FA81`},{char:`🔫`,name:`water pistol`,key:`1F52B`},{char:`🎱`,name:`pool 8 ball`,key:`1F3B1`},{char:`🔮`,name:`crystal ball`,key:`1F52E`},{char:`🪄`,name:`magic wand`,key:`1FA84`},{char:`🎮`,name:`video game`,key:`1F3AE`},{char:`🕹️`,name:`joystick`,key:`1F579`},{char:`🎰`,name:`slot machine`,key:`1F3B0`},{char:`🎲`,name:`game die`,key:`1F3B2`},{char:`🧩`,name:`puzzle piece`,key:`1F9E9`},{char:`🧸`,name:`teddy bear`,key:`1F9F8`},{char:`🪅`,name:`piñata`,key:`1FA85`},{char:`🪩`,name:`mirror ball`,key:`1FAA9`},{char:`🪆`,name:`nesting dolls`,key:`1FA86`},{char:`♠️`,name:`spade suit`,key:`2660`},{char:`♥️`,name:`heart suit`,key:`2665`},{char:`♦️`,name:`diamond suit`,key:`2666`},{char:`♣️`,name:`club suit`,key:`2663`},{char:`♟️`,name:`chess pawn`,key:`265F`},{char:`🃏`,name:`joker`,key:`1F0CF`},{char:`🀄`,name:`mahjong red dragon`,key:`1F004`},{char:`🎴`,name:`flower playing cards`,key:`1F3B4`},{char:`🎭`,name:`performing arts`,key:`1F3AD`},{char:`🖼️`,name:`framed picture`,key:`1F5BC`},{char:`🎨`,name:`artist palette`,key:`1F3A8`},{char:`🧵`,name:`thread`,key:`1F9F5`},{char:`🪡`,name:`sewing needle`,key:`1FAA1`},{char:`🧶`,name:`yarn`,key:`1F9F6`},{char:`🪢`,name:`knot`,key:`1FAA2`}]},{id:`objects`,label:`Objects`,emojis:[{char:`👓`,name:`glasses`,key:`1F453`},{char:`🕶️`,name:`sunglasses`,key:`1F576`},{char:`🥽`,name:`goggles`,key:`1F97D`},{char:`🥼`,name:`lab coat`,key:`1F97C`},{char:`🦺`,name:`safety vest`,key:`1F9BA`},{char:`👔`,name:`necktie`,key:`1F454`},{char:`👕`,name:`t-shirt`,key:`1F455`},{char:`👖`,name:`jeans`,key:`1F456`},{char:`🧣`,name:`scarf`,key:`1F9E3`},{char:`🧤`,name:`gloves`,key:`1F9E4`},{char:`🧥`,name:`coat`,key:`1F9E5`},{char:`🧦`,name:`socks`,key:`1F9E6`},{char:`👗`,name:`dress`,key:`1F457`},{char:`👘`,name:`kimono`,key:`1F458`},{char:`🥻`,name:`sari`,key:`1F97B`},{char:`🩱`,name:`one-piece swimsuit`,key:`1FA71`},{char:`🩲`,name:`briefs`,key:`1FA72`},{char:`🩳`,name:`shorts`,key:`1FA73`},{char:`👙`,name:`bikini`,key:`1F459`},{char:`👚`,name:`woman’s clothes`,key:`1F45A`},{char:`🪭`,name:`folding hand fan`,key:`1FAAD`},{char:`👛`,name:`purse`,key:`1F45B`},{char:`👜`,name:`handbag`,key:`1F45C`},{char:`👝`,name:`clutch bag`,key:`1F45D`},{char:`🛍️`,name:`shopping bags`,key:`1F6CD`},{char:`🎒`,name:`backpack`,key:`1F392`},{char:`🩴`,name:`thong sandal`,key:`1FA74`},{char:`👞`,name:`man’s shoe`,key:`1F45E`},{char:`👟`,name:`running shoe`,key:`1F45F`},{char:`🥾`,name:`hiking boot`,key:`1F97E`},{char:`🥿`,name:`flat shoe`,key:`1F97F`},{char:`👠`,name:`high-heeled shoe`,key:`1F460`},{char:`👡`,name:`woman’s sandal`,key:`1F461`},{char:`🩰`,name:`ballet shoes`,key:`1FA70`},{char:`👢`,name:`woman’s boot`,key:`1F462`},{char:`🪮`,name:`hair pick`,key:`1FAAE`},{char:`👑`,name:`crown`,key:`1F451`},{char:`👒`,name:`woman’s hat`,key:`1F452`},{char:`🎩`,name:`top hat`,key:`1F3A9`},{char:`🎓`,name:`graduation cap`,key:`1F393`},{char:`🧢`,name:`billed cap`,key:`1F9E2`},{char:`🪖`,name:`military helmet`,key:`1FA96`},{char:`⛑️`,name:`rescue worker’s helmet`,key:`26D1`},{char:`📿`,name:`prayer beads`,key:`1F4FF`},{char:`💄`,name:`lipstick`,key:`1F484`},{char:`💍`,name:`ring`,key:`1F48D`},{char:`💎`,name:`gem stone`,key:`1F48E`},{char:`🔇`,name:`muted speaker`,key:`1F507`},{char:`🔈`,name:`speaker low volume`,key:`1F508`},{char:`🔉`,name:`speaker medium volume`,key:`1F509`},{char:`🔊`,name:`speaker high volume`,key:`1F50A`},{char:`📢`,name:`loudspeaker`,key:`1F4E2`},{char:`📣`,name:`megaphone`,key:`1F4E3`},{char:`📯`,name:`postal horn`,key:`1F4EF`},{char:`🔔`,name:`bell`,key:`1F514`},{char:`🔕`,name:`bell with slash`,key:`1F515`},{char:`🎼`,name:`musical score`,key:`1F3BC`},{char:`🎵`,name:`musical note`,key:`1F3B5`},{char:`🎶`,name:`musical notes`,key:`1F3B6`},{char:`🎙️`,name:`studio microphone`,key:`1F399`},{char:`🎚️`,name:`level slider`,key:`1F39A`},{char:`🎛️`,name:`control knobs`,key:`1F39B`},{char:`🎤`,name:`microphone`,key:`1F3A4`},{char:`🎧`,name:`headphone`,key:`1F3A7`},{char:`📻`,name:`radio`,key:`1F4FB`},{char:`🎷`,name:`saxophone`,key:`1F3B7`},{char:`🎺`,name:`trumpet`,key:`1F3BA`},{char:`🪊`,name:`trombone`,key:`1FA8A`},{char:`🪗`,name:`accordion`,key:`1FA97`},{char:`🎸`,name:`guitar`,key:`1F3B8`},{char:`🎹`,name:`musical keyboard`,key:`1F3B9`},{char:`🎻`,name:`violin`,key:`1F3BB`},{char:`🪕`,name:`banjo`,key:`1FA95`},{char:`🥁`,name:`drum`,key:`1F941`},{char:`🪘`,name:`long drum`,key:`1FA98`},{char:`🪇`,name:`maracas`,key:`1FA87`},{char:`🪈`,name:`flute`,key:`1FA88`},{char:`🪉`,name:`harp`,key:`1FA89`},{char:`📱`,name:`mobile phone`,key:`1F4F1`},{char:`📲`,name:`mobile phone with arrow`,key:`1F4F2`},{char:`☎️`,name:`telephone`,key:`260E`},{char:`📞`,name:`telephone receiver`,key:`1F4DE`},{char:`📟`,name:`pager`,key:`1F4DF`},{char:`📠`,name:`fax machine`,key:`1F4E0`},{char:`🔋`,name:`battery`,key:`1F50B`},{char:`🪫`,name:`low battery`,key:`1FAAB`},{char:`🔌`,name:`electric plug`,key:`1F50C`},{char:`💻`,name:`laptop`,key:`1F4BB`},{char:`🖥️`,name:`desktop computer`,key:`1F5A5`},{char:`🖨️`,name:`printer`,key:`1F5A8`},{char:`⌨️`,name:`keyboard`,key:`2328`},{char:`🖱️`,name:`computer mouse`,key:`1F5B1`},{char:`🖲️`,name:`trackball`,key:`1F5B2`},{char:`💽`,name:`computer disk`,key:`1F4BD`},{char:`💾`,name:`floppy disk`,key:`1F4BE`},{char:`💿`,name:`optical disk`,key:`1F4BF`},{char:`📀`,name:`dvd`,key:`1F4C0`},{char:`🧮`,name:`abacus`,key:`1F9EE`},{char:`🎥`,name:`movie camera`,key:`1F3A5`},{char:`🎞️`,name:`film frames`,key:`1F39E`},{char:`📽️`,name:`film projector`,key:`1F4FD`},{char:`🎬`,name:`clapper board`,key:`1F3AC`},{char:`📺`,name:`television`,key:`1F4FA`},{char:`📷`,name:`camera`,key:`1F4F7`},{char:`📸`,name:`camera with flash`,key:`1F4F8`},{char:`📹`,name:`video camera`,key:`1F4F9`},{char:`📼`,name:`videocassette`,key:`1F4FC`},{char:`🔍`,name:`magnifying glass tilted left`,key:`1F50D`},{char:`🔎`,name:`magnifying glass tilted right`,key:`1F50E`},{char:`🕯️`,name:`candle`,key:`1F56F`},{char:`💡`,name:`light bulb`,key:`1F4A1`},{char:`🔦`,name:`flashlight`,key:`1F526`},{char:`🏮`,name:`red paper lantern`,key:`1F3EE`},{char:`🪔`,name:`diya lamp`,key:`1FA94`},{char:`📔`,name:`notebook with decorative cover`,key:`1F4D4`},{char:`📕`,name:`closed book`,key:`1F4D5`},{char:`📖`,name:`open book`,key:`1F4D6`},{char:`📗`,name:`green book`,key:`1F4D7`},{char:`📘`,name:`blue book`,key:`1F4D8`},{char:`📙`,name:`orange book`,key:`1F4D9`},{char:`📚`,name:`books`,key:`1F4DA`},{char:`📓`,name:`notebook`,key:`1F4D3`},{char:`📒`,name:`ledger`,key:`1F4D2`},{char:`📃`,name:`page with curl`,key:`1F4C3`},{char:`📜`,name:`scroll`,key:`1F4DC`},{char:`📄`,name:`page facing up`,key:`1F4C4`},{char:`📰`,name:`newspaper`,key:`1F4F0`},{char:`🗞️`,name:`rolled-up newspaper`,key:`1F5DE`},{char:`📑`,name:`bookmark tabs`,key:`1F4D1`},{char:`🔖`,name:`bookmark`,key:`1F516`},{char:`🏷️`,name:`label`,key:`1F3F7`},{char:`🪙`,name:`coin`,key:`1FA99`},{char:`💰`,name:`money bag`,key:`1F4B0`},{char:`🪎`,name:`treasure chest`,key:`1FA8E`},{char:`💴`,name:`yen banknote`,key:`1F4B4`},{char:`💵`,name:`dollar banknote`,key:`1F4B5`},{char:`💶`,name:`euro banknote`,key:`1F4B6`},{char:`💷`,name:`pound banknote`,key:`1F4B7`},{char:`💸`,name:`money with wings`,key:`1F4B8`},{char:`💳`,name:`credit card`,key:`1F4B3`},{char:`🧾`,name:`receipt`,key:`1F9FE`},{char:`💹`,name:`chart increasing with yen`,key:`1F4B9`},{char:`✉️`,name:`envelope`,key:`2709`},{char:`📧`,name:`e-mail`,key:`1F4E7`},{char:`📨`,name:`incoming envelope`,key:`1F4E8`},{char:`📩`,name:`envelope with arrow`,key:`1F4E9`},{char:`📤`,name:`outbox tray`,key:`1F4E4`},{char:`📥`,name:`inbox tray`,key:`1F4E5`},{char:`📦`,name:`package`,key:`1F4E6`},{char:`📫`,name:`closed mailbox with raised flag`,key:`1F4EB`},{char:`📪`,name:`closed mailbox with lowered flag`,key:`1F4EA`},{char:`📬`,name:`open mailbox with raised flag`,key:`1F4EC`},{char:`📭`,name:`open mailbox with lowered flag`,key:`1F4ED`},{char:`📮`,name:`postbox`,key:`1F4EE`},{char:`🗳️`,name:`ballot box with ballot`,key:`1F5F3`},{char:`✏️`,name:`pencil`,key:`270F`},{char:`✒️`,name:`black nib`,key:`2712`},{char:`🖋️`,name:`fountain pen`,key:`1F58B`},{char:`🖊️`,name:`pen`,key:`1F58A`},{char:`🖌️`,name:`paintbrush`,key:`1F58C`},{char:`🖍️`,name:`crayon`,key:`1F58D`},{char:`📝`,name:`memo`,key:`1F4DD`},{char:`💼`,name:`briefcase`,key:`1F4BC`},{char:`📁`,name:`file folder`,key:`1F4C1`},{char:`📂`,name:`open file folder`,key:`1F4C2`},{char:`🗂️`,name:`card index dividers`,key:`1F5C2`},{char:`📅`,name:`calendar`,key:`1F4C5`},{char:`📆`,name:`tear-off calendar`,key:`1F4C6`},{char:`🗒️`,name:`spiral notepad`,key:`1F5D2`},{char:`🗓️`,name:`spiral calendar`,key:`1F5D3`},{char:`📇`,name:`card index`,key:`1F4C7`},{char:`📈`,name:`chart increasing`,key:`1F4C8`},{char:`📉`,name:`chart decreasing`,key:`1F4C9`},{char:`📊`,name:`bar chart`,key:`1F4CA`},{char:`📋`,name:`clipboard`,key:`1F4CB`},{char:`📌`,name:`pushpin`,key:`1F4CC`},{char:`📍`,name:`round pushpin`,key:`1F4CD`},{char:`📎`,name:`paperclip`,key:`1F4CE`},{char:`🖇️`,name:`linked paperclips`,key:`1F587`},{char:`📏`,name:`straight ruler`,key:`1F4CF`},{char:`📐`,name:`triangular ruler`,key:`1F4D0`},{char:`✂️`,name:`scissors`,key:`2702`},{char:`🗃️`,name:`card file box`,key:`1F5C3`},{char:`🗄️`,name:`file cabinet`,key:`1F5C4`},{char:`🗑️`,name:`wastebasket`,key:`1F5D1`},{char:`🔒`,name:`locked`,key:`1F512`},{char:`🔓`,name:`unlocked`,key:`1F513`},{char:`🔏`,name:`locked with pen`,key:`1F50F`},{char:`🔐`,name:`locked with key`,key:`1F510`},{char:`🔑`,name:`key`,key:`1F511`},{char:`🗝️`,name:`old key`,key:`1F5DD`},{char:`🔨`,name:`hammer`,key:`1F528`},{char:`🪓`,name:`axe`,key:`1FA93`},{char:`⛏️`,name:`pick`,key:`26CF`},{char:`⚒️`,name:`hammer and pick`,key:`2692`},{char:`🛠️`,name:`hammer and wrench`,key:`1F6E0`},{char:`🗡️`,name:`dagger`,key:`1F5E1`},{char:`⚔️`,name:`crossed swords`,key:`2694`},{char:`💣`,name:`bomb`,key:`1F4A3`},{char:`🪃`,name:`boomerang`,key:`1FA83`},{char:`🏹`,name:`bow and arrow`,key:`1F3F9`},{char:`🛡️`,name:`shield`,key:`1F6E1`},{char:`🪚`,name:`carpentry saw`,key:`1FA9A`},{char:`🔧`,name:`wrench`,key:`1F527`},{char:`🪛`,name:`screwdriver`,key:`1FA9B`},{char:`🔩`,name:`nut and bolt`,key:`1F529`},{char:`⚙️`,name:`gear`,key:`2699`},{char:`🗜️`,name:`clamp`,key:`1F5DC`},{char:`⚖️`,name:`balance scale`,key:`2696`},{char:`🦯`,name:`white cane`,key:`1F9AF`},{char:`🔗`,name:`link`,key:`1F517`},{char:`⛓️‍💥`,name:`broken chain`,key:`26D3-FE0F-200D-1F4A5`},{char:`⛓️`,name:`chains`,key:`26D3`},{char:`🪝`,name:`hook`,key:`1FA9D`},{char:`🧰`,name:`toolbox`,key:`1F9F0`},{char:`🧲`,name:`magnet`,key:`1F9F2`},{char:`🪜`,name:`ladder`,key:`1FA9C`},{char:`🪏`,name:`shovel`,key:`1FA8F`},{char:`⚗️`,name:`alembic`,key:`2697`},{char:`🧪`,name:`test tube`,key:`1F9EA`},{char:`🧫`,name:`petri dish`,key:`1F9EB`},{char:`🧬`,name:`dna`,key:`1F9EC`},{char:`🔬`,name:`microscope`,key:`1F52C`},{char:`🔭`,name:`telescope`,key:`1F52D`},{char:`📡`,name:`satellite antenna`,key:`1F4E1`},{char:`💉`,name:`syringe`,key:`1F489`},{char:`🩸`,name:`drop of blood`,key:`1FA78`},{char:`💊`,name:`pill`,key:`1F48A`},{char:`🩹`,name:`adhesive bandage`,key:`1FA79`},{char:`🩼`,name:`crutch`,key:`1FA7C`},{char:`🩺`,name:`stethoscope`,key:`1FA7A`},{char:`🩻`,name:`x-ray`,key:`1FA7B`},{char:`🚪`,name:`door`,key:`1F6AA`},{char:`🛗`,name:`elevator`,key:`1F6D7`},{char:`🪞`,name:`mirror`,key:`1FA9E`},{char:`🪟`,name:`window`,key:`1FA9F`},{char:`🛏️`,name:`bed`,key:`1F6CF`},{char:`🛋️`,name:`couch and lamp`,key:`1F6CB`},{char:`🪑`,name:`chair`,key:`1FA91`},{char:`🚽`,name:`toilet`,key:`1F6BD`},{char:`🪠`,name:`plunger`,key:`1FAA0`},{char:`🚿`,name:`shower`,key:`1F6BF`},{char:`🛁`,name:`bathtub`,key:`1F6C1`},{char:`🪤`,name:`mouse trap`,key:`1FAA4`},{char:`🪒`,name:`razor`,key:`1FA92`},{char:`🧴`,name:`lotion bottle`,key:`1F9F4`},{char:`🧷`,name:`safety pin`,key:`1F9F7`},{char:`🧹`,name:`broom`,key:`1F9F9`},{char:`🧺`,name:`basket`,key:`1F9FA`},{char:`🧻`,name:`roll of paper`,key:`1F9FB`},{char:`🪣`,name:`bucket`,key:`1FAA3`},{char:`🧼`,name:`soap`,key:`1F9FC`},{char:`🫧`,name:`bubbles`,key:`1FAE7`},{char:`🪥`,name:`toothbrush`,key:`1FAA5`},{char:`🧽`,name:`sponge`,key:`1F9FD`},{char:`🧯`,name:`fire extinguisher`,key:`1F9EF`},{char:`🛒`,name:`shopping cart`,key:`1F6D2`},{char:`🚬`,name:`cigarette`,key:`1F6AC`},{char:`⚰️`,name:`coffin`,key:`26B0`},{char:`🪦`,name:`headstone`,key:`1FAA6`},{char:`⚱️`,name:`funeral urn`,key:`26B1`},{char:`🧿`,name:`nazar amulet`,key:`1F9FF`},{char:`🪬`,name:`hamsa`,key:`1FAAC`},{char:`🗿`,name:`moai`,key:`1F5FF`},{char:`🪧`,name:`placard`,key:`1FAA7`},{char:`🪪`,name:`identification card`,key:`1FAAA`}]},{id:`symbols`,label:`Symbols`,emojis:[{char:`🏧`,name:`ATM sign`,key:`1F3E7`},{char:`🚮`,name:`litter in bin sign`,key:`1F6AE`},{char:`🚰`,name:`potable water`,key:`1F6B0`},{char:`♿`,name:`wheelchair symbol`,key:`267F`},{char:`🚹`,name:`men’s room`,key:`1F6B9`},{char:`🚺`,name:`women’s room`,key:`1F6BA`},{char:`🚻`,name:`restroom`,key:`1F6BB`},{char:`🚼`,name:`baby symbol`,key:`1F6BC`},{char:`🚾`,name:`water closet`,key:`1F6BE`},{char:`🛂`,name:`passport control`,key:`1F6C2`},{char:`🛃`,name:`customs`,key:`1F6C3`},{char:`🛄`,name:`baggage claim`,key:`1F6C4`},{char:`🛅`,name:`left luggage`,key:`1F6C5`},{char:`⚠️`,name:`warning`,key:`26A0`},{char:`🚸`,name:`children crossing`,key:`1F6B8`},{char:`⛔`,name:`no entry`,key:`26D4`},{char:`🚫`,name:`prohibited`,key:`1F6AB`},{char:`🚳`,name:`no bicycles`,key:`1F6B3`},{char:`🚭`,name:`no smoking`,key:`1F6AD`},{char:`🚯`,name:`no littering`,key:`1F6AF`},{char:`🚱`,name:`non-potable water`,key:`1F6B1`},{char:`🚷`,name:`no pedestrians`,key:`1F6B7`},{char:`📵`,name:`no mobile phones`,key:`1F4F5`},{char:`🔞`,name:`no one under eighteen`,key:`1F51E`},{char:`☢️`,name:`radioactive`,key:`2622`},{char:`☣️`,name:`biohazard`,key:`2623`},{char:`⬆️`,name:`up arrow`,key:`2B06`},{char:`↗️`,name:`up-right arrow`,key:`2197`},{char:`➡️`,name:`right arrow`,key:`27A1`},{char:`↘️`,name:`down-right arrow`,key:`2198`},{char:`⬇️`,name:`down arrow`,key:`2B07`},{char:`↙️`,name:`down-left arrow`,key:`2199`},{char:`⬅️`,name:`left arrow`,key:`2B05`},{char:`↖️`,name:`up-left arrow`,key:`2196`},{char:`↕️`,name:`up-down arrow`,key:`2195`},{char:`↔️`,name:`left-right arrow`,key:`2194`},{char:`↩️`,name:`right arrow curving left`,key:`21A9`},{char:`↪️`,name:`left arrow curving right`,key:`21AA`},{char:`⤴️`,name:`right arrow curving up`,key:`2934`},{char:`⤵️`,name:`right arrow curving down`,key:`2935`},{char:`🔃`,name:`clockwise vertical arrows`,key:`1F503`},{char:`🔄`,name:`counterclockwise arrows button`,key:`1F504`},{char:`🔙`,name:`BACK arrow`,key:`1F519`},{char:`🔚`,name:`END arrow`,key:`1F51A`},{char:`🔛`,name:`ON! arrow`,key:`1F51B`},{char:`🔜`,name:`SOON arrow`,key:`1F51C`},{char:`🔝`,name:`TOP arrow`,key:`1F51D`},{char:`🛐`,name:`place of worship`,key:`1F6D0`},{char:`⚛️`,name:`atom symbol`,key:`269B`},{char:`🕉️`,name:`om`,key:`1F549`},{char:`✡️`,name:`star of David`,key:`2721`},{char:`☸️`,name:`wheel of dharma`,key:`2638`},{char:`☯️`,name:`yin yang`,key:`262F`},{char:`✝️`,name:`latin cross`,key:`271D`},{char:`☦️`,name:`orthodox cross`,key:`2626`},{char:`☪️`,name:`star and crescent`,key:`262A`},{char:`☮️`,name:`peace symbol`,key:`262E`},{char:`🕎`,name:`menorah`,key:`1F54E`},{char:`🔯`,name:`dotted six-pointed star`,key:`1F52F`},{char:`🪯`,name:`khanda`,key:`1FAAF`},{char:`♈`,name:`Aries`,key:`2648`},{char:`♉`,name:`Taurus`,key:`2649`},{char:`♊`,name:`Gemini`,key:`264A`},{char:`♋`,name:`Cancer`,key:`264B`},{char:`♌`,name:`Leo`,key:`264C`},{char:`♍`,name:`Virgo`,key:`264D`},{char:`♎`,name:`Libra`,key:`264E`},{char:`♏`,name:`Scorpio`,key:`264F`},{char:`♐`,name:`Sagittarius`,key:`2650`},{char:`♑`,name:`Capricorn`,key:`2651`},{char:`♒`,name:`Aquarius`,key:`2652`},{char:`♓`,name:`Pisces`,key:`2653`},{char:`⛎`,name:`Ophiuchus`,key:`26CE`},{char:`🔀`,name:`shuffle tracks button`,key:`1F500`},{char:`🔁`,name:`repeat button`,key:`1F501`},{char:`🔂`,name:`repeat single button`,key:`1F502`},{char:`▶️`,name:`play button`,key:`25B6`},{char:`⏩`,name:`fast-forward button`,key:`23E9`},{char:`⏭️`,name:`next track button`,key:`23ED`},{char:`⏯️`,name:`play or pause button`,key:`23EF`},{char:`◀️`,name:`reverse button`,key:`25C0`},{char:`⏪`,name:`fast reverse button`,key:`23EA`},{char:`⏮️`,name:`last track button`,key:`23EE`},{char:`🔼`,name:`upwards button`,key:`1F53C`},{char:`⏫`,name:`fast up button`,key:`23EB`},{char:`🔽`,name:`downwards button`,key:`1F53D`},{char:`⏬`,name:`fast down button`,key:`23EC`},{char:`⏸️`,name:`pause button`,key:`23F8`},{char:`⏹️`,name:`stop button`,key:`23F9`},{char:`⏺️`,name:`record button`,key:`23FA`},{char:`⏏️`,name:`eject button`,key:`23CF`},{char:`🎦`,name:`cinema`,key:`1F3A6`},{char:`🔅`,name:`dim button`,key:`1F505`},{char:`🔆`,name:`bright button`,key:`1F506`},{char:`📶`,name:`antenna bars`,key:`1F4F6`},{char:`🛜`,name:`wireless`,key:`1F6DC`},{char:`📳`,name:`vibration mode`,key:`1F4F3`},{char:`📴`,name:`mobile phone off`,key:`1F4F4`},{char:`♀️`,name:`female sign`,key:`2640`},{char:`♂️`,name:`male sign`,key:`2642`},{char:`⚧️`,name:`transgender symbol`,key:`26A7`},{char:`✖️`,name:`multiply`,key:`2716`},{char:`➕`,name:`plus`,key:`2795`},{char:`➖`,name:`minus`,key:`2796`},{char:`➗`,name:`divide`,key:`2797`},{char:`🟰`,name:`heavy equals sign`,key:`1F7F0`},{char:`♾️`,name:`infinity`,key:`267E`},{char:`‼️`,name:`double exclamation mark`,key:`203C`},{char:`⁉️`,name:`exclamation question mark`,key:`2049`},{char:`❓`,name:`red question mark`,key:`2753`},{char:`❔`,name:`white question mark`,key:`2754`},{char:`❕`,name:`white exclamation mark`,key:`2755`},{char:`❗`,name:`red exclamation mark`,key:`2757`},{char:`〰️`,name:`wavy dash`,key:`3030`},{char:`💱`,name:`currency exchange`,key:`1F4B1`},{char:`💲`,name:`heavy dollar sign`,key:`1F4B2`},{char:`⚕️`,name:`medical symbol`,key:`2695`},{char:`♻️`,name:`recycling symbol`,key:`267B`},{char:`⚜️`,name:`fleur-de-lis`,key:`269C`},{char:`🔱`,name:`trident emblem`,key:`1F531`},{char:`📛`,name:`name badge`,key:`1F4DB`},{char:`🔰`,name:`Japanese symbol for beginner`,key:`1F530`},{char:`⭕`,name:`hollow red circle`,key:`2B55`},{char:`✅`,name:`check mark button`,key:`2705`},{char:`☑️`,name:`check box with check`,key:`2611`},{char:`✔️`,name:`check mark`,key:`2714`},{char:`❌`,name:`cross mark`,key:`274C`},{char:`❎`,name:`cross mark button`,key:`274E`},{char:`➰`,name:`curly loop`,key:`27B0`},{char:`➿`,name:`double curly loop`,key:`27BF`},{char:`〽️`,name:`part alternation mark`,key:`303D`},{char:`✳️`,name:`eight-spoked asterisk`,key:`2733`},{char:`✴️`,name:`eight-pointed star`,key:`2734`},{char:`❇️`,name:`sparkle`,key:`2747`},{char:`©️`,name:`copyright`,key:`00A9`},{char:`®️`,name:`registered`,key:`00AE`},{char:`™️`,name:`trade mark`,key:`2122`},{char:`🫟`,name:`splatter`,key:`1FADF`},{char:`#️⃣`,name:`keycap #`,key:`0023-FE0F-20E3`},{char:`*️⃣`,name:`keycap *`,key:`002A-FE0F-20E3`},{char:`0️⃣`,name:`keycap 0`,key:`0030-FE0F-20E3`},{char:`1️⃣`,name:`keycap 1`,key:`0031-FE0F-20E3`},{char:`2️⃣`,name:`keycap 2`,key:`0032-FE0F-20E3`},{char:`3️⃣`,name:`keycap 3`,key:`0033-FE0F-20E3`},{char:`4️⃣`,name:`keycap 4`,key:`0034-FE0F-20E3`},{char:`5️⃣`,name:`keycap 5`,key:`0035-FE0F-20E3`},{char:`6️⃣`,name:`keycap 6`,key:`0036-FE0F-20E3`},{char:`7️⃣`,name:`keycap 7`,key:`0037-FE0F-20E3`},{char:`8️⃣`,name:`keycap 8`,key:`0038-FE0F-20E3`},{char:`9️⃣`,name:`keycap 9`,key:`0039-FE0F-20E3`},{char:`🔟`,name:`keycap 10`,key:`1F51F`},{char:`🔠`,name:`input latin uppercase`,key:`1F520`},{char:`🔡`,name:`input latin lowercase`,key:`1F521`},{char:`🔢`,name:`input numbers`,key:`1F522`},{char:`🔣`,name:`input symbols`,key:`1F523`},{char:`🔤`,name:`input latin letters`,key:`1F524`},{char:`🅰️`,name:`A button (blood type)`,key:`1F170`},{char:`🆎`,name:`AB button (blood type)`,key:`1F18E`},{char:`🅱️`,name:`B button (blood type)`,key:`1F171`},{char:`🆑`,name:`CL button`,key:`1F191`},{char:`🆒`,name:`COOL button`,key:`1F192`},{char:`🆓`,name:`FREE button`,key:`1F193`},{char:`ℹ️`,name:`information`,key:`2139`},{char:`🆔`,name:`ID button`,key:`1F194`},{char:`Ⓜ️`,name:`circled M`,key:`24C2`},{char:`🆕`,name:`NEW button`,key:`1F195`},{char:`🆖`,name:`NG button`,key:`1F196`},{char:`🅾️`,name:`O button (blood type)`,key:`1F17E`},{char:`🆗`,name:`OK button`,key:`1F197`},{char:`🅿️`,name:`P button`,key:`1F17F`},{char:`🆘`,name:`SOS button`,key:`1F198`},{char:`🆙`,name:`UP! button`,key:`1F199`},{char:`🆚`,name:`VS button`,key:`1F19A`},{char:`🈁`,name:`Japanese “here” button`,key:`1F201`},{char:`🈂️`,name:`Japanese “service charge” button`,key:`1F202`},{char:`🈷️`,name:`Japanese “monthly amount” button`,key:`1F237`},{char:`🈶`,name:`Japanese “not free of charge” button`,key:`1F236`},{char:`🈯`,name:`Japanese “reserved” button`,key:`1F22F`},{char:`🉐`,name:`Japanese “bargain” button`,key:`1F250`},{char:`🈹`,name:`Japanese “discount” button`,key:`1F239`},{char:`🈚`,name:`Japanese “free of charge” button`,key:`1F21A`},{char:`🈲`,name:`Japanese “prohibited” button`,key:`1F232`},{char:`🉑`,name:`Japanese “acceptable” button`,key:`1F251`},{char:`🈸`,name:`Japanese “application” button`,key:`1F238`},{char:`🈴`,name:`Japanese “passing grade” button`,key:`1F234`},{char:`🈳`,name:`Japanese “vacancy” button`,key:`1F233`},{char:`㊗️`,name:`Japanese “congratulations” button`,key:`3297`},{char:`㊙️`,name:`Japanese “secret” button`,key:`3299`},{char:`🈺`,name:`Japanese “open for business” button`,key:`1F23A`},{char:`🈵`,name:`Japanese “no vacancy” button`,key:`1F235`},{char:`🔴`,name:`red circle`,key:`1F534`},{char:`🟠`,name:`orange circle`,key:`1F7E0`},{char:`🟡`,name:`yellow circle`,key:`1F7E1`},{char:`🟢`,name:`green circle`,key:`1F7E2`},{char:`🔵`,name:`blue circle`,key:`1F535`},{char:`🟣`,name:`purple circle`,key:`1F7E3`},{char:`🟤`,name:`brown circle`,key:`1F7E4`},{char:`⚫`,name:`black circle`,key:`26AB`},{char:`⚪`,name:`white circle`,key:`26AA`},{char:`🟥`,name:`red square`,key:`1F7E5`},{char:`🟧`,name:`orange square`,key:`1F7E7`},{char:`🟨`,name:`yellow square`,key:`1F7E8`},{char:`🟩`,name:`green square`,key:`1F7E9`},{char:`🟦`,name:`blue square`,key:`1F7E6`},{char:`🟪`,name:`purple square`,key:`1F7EA`},{char:`🟫`,name:`brown square`,key:`1F7EB`},{char:`⬛`,name:`black large square`,key:`2B1B`},{char:`⬜`,name:`white large square`,key:`2B1C`},{char:`◼️`,name:`black medium square`,key:`25FC`},{char:`◻️`,name:`white medium square`,key:`25FB`},{char:`◾`,name:`black medium-small square`,key:`25FE`},{char:`◽`,name:`white medium-small square`,key:`25FD`},{char:`▪️`,name:`black small square`,key:`25AA`},{char:`▫️`,name:`white small square`,key:`25AB`},{char:`🔶`,name:`large orange diamond`,key:`1F536`},{char:`🔷`,name:`large blue diamond`,key:`1F537`},{char:`🔸`,name:`small orange diamond`,key:`1F538`},{char:`🔹`,name:`small blue diamond`,key:`1F539`},{char:`🔺`,name:`red triangle pointed up`,key:`1F53A`},{char:`🔻`,name:`red triangle pointed down`,key:`1F53B`},{char:`💠`,name:`diamond with a dot`,key:`1F4A0`},{char:`🔘`,name:`radio button`,key:`1F518`},{char:`🔳`,name:`white square button`,key:`1F533`},{char:`🔲`,name:`black square button`,key:`1F532`}]},{id:`flags`,label:`Flags`,emojis:[{char:`🏁`,name:`chequered flag`,key:`1F3C1`},{char:`🚩`,name:`triangular flag`,key:`1F6A9`},{char:`🎌`,name:`crossed flags`,key:`1F38C`},{char:`🏴`,name:`black flag`,key:`1F3F4`},{char:`🏳️`,name:`white flag`,key:`1F3F3`},{char:`🏳️‍🌈`,name:`rainbow flag`,key:`1F3F3-FE0F-200D-1F308`},{char:`🏳️‍⚧️`,name:`transgender flag`,key:`1F3F3-FE0F-200D-26A7-FE0F`},{char:`🏴‍☠️`,name:`pirate flag`,key:`1F3F4-200D-2620-FE0F`},{char:`🇦🇨`,name:`flag Ascension Island`,key:`1F1E6-1F1E8`},{char:`🇦🇩`,name:`flag Andorra`,key:`1F1E6-1F1E9`},{char:`🇦🇪`,name:`flag United Arab Emirates`,key:`1F1E6-1F1EA`},{char:`🇦🇫`,name:`flag Afghanistan`,key:`1F1E6-1F1EB`},{char:`🇦🇬`,name:`flag Antigua & Barbuda`,key:`1F1E6-1F1EC`},{char:`🇦🇮`,name:`flag Anguilla`,key:`1F1E6-1F1EE`},{char:`🇦🇱`,name:`flag Albania`,key:`1F1E6-1F1F1`},{char:`🇦🇲`,name:`flag Armenia`,key:`1F1E6-1F1F2`},{char:`🇦🇴`,name:`flag Angola`,key:`1F1E6-1F1F4`},{char:`🇦🇶`,name:`flag Antarctica`,key:`1F1E6-1F1F6`},{char:`🇦🇷`,name:`flag Argentina`,key:`1F1E6-1F1F7`},{char:`🇦🇸`,name:`flag American Samoa`,key:`1F1E6-1F1F8`},{char:`🇦🇹`,name:`flag Austria`,key:`1F1E6-1F1F9`},{char:`🇦🇺`,name:`flag Australia`,key:`1F1E6-1F1FA`},{char:`🇦🇼`,name:`flag Aruba`,key:`1F1E6-1F1FC`},{char:`🇦🇽`,name:`flag Åland Islands`,key:`1F1E6-1F1FD`},{char:`🇦🇿`,name:`flag Azerbaijan`,key:`1F1E6-1F1FF`},{char:`🇧🇦`,name:`flag Bosnia & Herzegovina`,key:`1F1E7-1F1E6`},{char:`🇧🇧`,name:`flag Barbados`,key:`1F1E7-1F1E7`},{char:`🇧🇩`,name:`flag Bangladesh`,key:`1F1E7-1F1E9`},{char:`🇧🇪`,name:`flag Belgium`,key:`1F1E7-1F1EA`},{char:`🇧🇫`,name:`flag Burkina Faso`,key:`1F1E7-1F1EB`},{char:`🇧🇬`,name:`flag Bulgaria`,key:`1F1E7-1F1EC`},{char:`🇧🇭`,name:`flag Bahrain`,key:`1F1E7-1F1ED`},{char:`🇧🇮`,name:`flag Burundi`,key:`1F1E7-1F1EE`},{char:`🇧🇯`,name:`flag Benin`,key:`1F1E7-1F1EF`},{char:`🇧🇱`,name:`flag St. Barthélemy`,key:`1F1E7-1F1F1`},{char:`🇧🇲`,name:`flag Bermuda`,key:`1F1E7-1F1F2`},{char:`🇧🇳`,name:`flag Brunei`,key:`1F1E7-1F1F3`},{char:`🇧🇴`,name:`flag Bolivia`,key:`1F1E7-1F1F4`},{char:`🇧🇶`,name:`flag Caribbean Netherlands`,key:`1F1E7-1F1F6`},{char:`🇧🇷`,name:`flag Brazil`,key:`1F1E7-1F1F7`},{char:`🇧🇸`,name:`flag Bahamas`,key:`1F1E7-1F1F8`},{char:`🇧🇹`,name:`flag Bhutan`,key:`1F1E7-1F1F9`},{char:`🇧🇻`,name:`flag Bouvet Island`,key:`1F1E7-1F1FB`},{char:`🇧🇼`,name:`flag Botswana`,key:`1F1E7-1F1FC`},{char:`🇧🇾`,name:`flag Belarus`,key:`1F1E7-1F1FE`},{char:`🇧🇿`,name:`flag Belize`,key:`1F1E7-1F1FF`},{char:`🇨🇦`,name:`flag Canada`,key:`1F1E8-1F1E6`},{char:`🇨🇨`,name:`flag Cocos (Keeling) Islands`,key:`1F1E8-1F1E8`},{char:`🇨🇩`,name:`flag Congo - Kinshasa`,key:`1F1E8-1F1E9`},{char:`🇨🇫`,name:`flag Central African Republic`,key:`1F1E8-1F1EB`},{char:`🇨🇬`,name:`flag Congo - Brazzaville`,key:`1F1E8-1F1EC`},{char:`🇨🇭`,name:`flag Switzerland`,key:`1F1E8-1F1ED`},{char:`🇨🇮`,name:`flag Côte d’Ivoire`,key:`1F1E8-1F1EE`},{char:`🇨🇰`,name:`flag Cook Islands`,key:`1F1E8-1F1F0`},{char:`🇨🇱`,name:`flag Chile`,key:`1F1E8-1F1F1`},{char:`🇨🇲`,name:`flag Cameroon`,key:`1F1E8-1F1F2`},{char:`🇨🇳`,name:`flag China`,key:`1F1E8-1F1F3`},{char:`🇨🇴`,name:`flag Colombia`,key:`1F1E8-1F1F4`},{char:`🇨🇵`,name:`flag Clipperton Island`,key:`1F1E8-1F1F5`},{char:`🇨🇶`,name:`flag Sark`,key:`1F1E8-1F1F6`},{char:`🇨🇷`,name:`flag Costa Rica`,key:`1F1E8-1F1F7`},{char:`🇨🇺`,name:`flag Cuba`,key:`1F1E8-1F1FA`},{char:`🇨🇻`,name:`flag Cape Verde`,key:`1F1E8-1F1FB`},{char:`🇨🇼`,name:`flag Curaçao`,key:`1F1E8-1F1FC`},{char:`🇨🇽`,name:`flag Christmas Island`,key:`1F1E8-1F1FD`},{char:`🇨🇾`,name:`flag Cyprus`,key:`1F1E8-1F1FE`},{char:`🇨🇿`,name:`flag Czechia`,key:`1F1E8-1F1FF`},{char:`🇩🇪`,name:`flag Germany`,key:`1F1E9-1F1EA`},{char:`🇩🇬`,name:`flag Diego Garcia`,key:`1F1E9-1F1EC`},{char:`🇩🇯`,name:`flag Djibouti`,key:`1F1E9-1F1EF`},{char:`🇩🇰`,name:`flag Denmark`,key:`1F1E9-1F1F0`},{char:`🇩🇲`,name:`flag Dominica`,key:`1F1E9-1F1F2`},{char:`🇩🇴`,name:`flag Dominican Republic`,key:`1F1E9-1F1F4`},{char:`🇩🇿`,name:`flag Algeria`,key:`1F1E9-1F1FF`},{char:`🇪🇦`,name:`flag Ceuta & Melilla`,key:`1F1EA-1F1E6`},{char:`🇪🇨`,name:`flag Ecuador`,key:`1F1EA-1F1E8`},{char:`🇪🇪`,name:`flag Estonia`,key:`1F1EA-1F1EA`},{char:`🇪🇬`,name:`flag Egypt`,key:`1F1EA-1F1EC`},{char:`🇪🇭`,name:`flag Western Sahara`,key:`1F1EA-1F1ED`},{char:`🇪🇷`,name:`flag Eritrea`,key:`1F1EA-1F1F7`},{char:`🇪🇸`,name:`flag Spain`,key:`1F1EA-1F1F8`},{char:`🇪🇹`,name:`flag Ethiopia`,key:`1F1EA-1F1F9`},{char:`🇪🇺`,name:`flag European Union`,key:`1F1EA-1F1FA`},{char:`🇫🇮`,name:`flag Finland`,key:`1F1EB-1F1EE`},{char:`🇫🇯`,name:`flag Fiji`,key:`1F1EB-1F1EF`},{char:`🇫🇰`,name:`flag Falkland Islands`,key:`1F1EB-1F1F0`},{char:`🇫🇲`,name:`flag Micronesia`,key:`1F1EB-1F1F2`},{char:`🇫🇴`,name:`flag Faroe Islands`,key:`1F1EB-1F1F4`},{char:`🇫🇷`,name:`flag France`,key:`1F1EB-1F1F7`},{char:`🇬🇦`,name:`flag Gabon`,key:`1F1EC-1F1E6`},{char:`🇬🇧`,name:`flag United Kingdom`,key:`1F1EC-1F1E7`},{char:`🇬🇩`,name:`flag Grenada`,key:`1F1EC-1F1E9`},{char:`🇬🇪`,name:`flag Georgia`,key:`1F1EC-1F1EA`},{char:`🇬🇫`,name:`flag French Guiana`,key:`1F1EC-1F1EB`},{char:`🇬🇬`,name:`flag Guernsey`,key:`1F1EC-1F1EC`},{char:`🇬🇭`,name:`flag Ghana`,key:`1F1EC-1F1ED`},{char:`🇬🇮`,name:`flag Gibraltar`,key:`1F1EC-1F1EE`},{char:`🇬🇱`,name:`flag Greenland`,key:`1F1EC-1F1F1`},{char:`🇬🇲`,name:`flag Gambia`,key:`1F1EC-1F1F2`},{char:`🇬🇳`,name:`flag Guinea`,key:`1F1EC-1F1F3`},{char:`🇬🇵`,name:`flag Guadeloupe`,key:`1F1EC-1F1F5`},{char:`🇬🇶`,name:`flag Equatorial Guinea`,key:`1F1EC-1F1F6`},{char:`🇬🇷`,name:`flag Greece`,key:`1F1EC-1F1F7`},{char:`🇬🇸`,name:`flag South Georgia & South Sandwich Islands`,key:`1F1EC-1F1F8`},{char:`🇬🇹`,name:`flag Guatemala`,key:`1F1EC-1F1F9`},{char:`🇬🇺`,name:`flag Guam`,key:`1F1EC-1F1FA`},{char:`🇬🇼`,name:`flag Guinea-Bissau`,key:`1F1EC-1F1FC`},{char:`🇬🇾`,name:`flag Guyana`,key:`1F1EC-1F1FE`},{char:`🇭🇰`,name:`flag Hong Kong SAR China`,key:`1F1ED-1F1F0`},{char:`🇭🇲`,name:`flag Heard & McDonald Islands`,key:`1F1ED-1F1F2`},{char:`🇭🇳`,name:`flag Honduras`,key:`1F1ED-1F1F3`},{char:`🇭🇷`,name:`flag Croatia`,key:`1F1ED-1F1F7`},{char:`🇭🇹`,name:`flag Haiti`,key:`1F1ED-1F1F9`},{char:`🇭🇺`,name:`flag Hungary`,key:`1F1ED-1F1FA`},{char:`🇮🇨`,name:`flag Canary Islands`,key:`1F1EE-1F1E8`},{char:`🇮🇩`,name:`flag Indonesia`,key:`1F1EE-1F1E9`},{char:`🇮🇪`,name:`flag Ireland`,key:`1F1EE-1F1EA`},{char:`🇮🇱`,name:`flag Israel`,key:`1F1EE-1F1F1`},{char:`🇮🇲`,name:`flag Isle of Man`,key:`1F1EE-1F1F2`},{char:`🇮🇳`,name:`flag India`,key:`1F1EE-1F1F3`},{char:`🇮🇴`,name:`flag British Indian Ocean Territory`,key:`1F1EE-1F1F4`},{char:`🇮🇶`,name:`flag Iraq`,key:`1F1EE-1F1F6`},{char:`🇮🇷`,name:`flag Iran`,key:`1F1EE-1F1F7`},{char:`🇮🇸`,name:`flag Iceland`,key:`1F1EE-1F1F8`},{char:`🇮🇹`,name:`flag Italy`,key:`1F1EE-1F1F9`},{char:`🇯🇪`,name:`flag Jersey`,key:`1F1EF-1F1EA`},{char:`🇯🇲`,name:`flag Jamaica`,key:`1F1EF-1F1F2`},{char:`🇯🇴`,name:`flag Jordan`,key:`1F1EF-1F1F4`},{char:`🇯🇵`,name:`flag Japan`,key:`1F1EF-1F1F5`},{char:`🇰🇪`,name:`flag Kenya`,key:`1F1F0-1F1EA`},{char:`🇰🇬`,name:`flag Kyrgyzstan`,key:`1F1F0-1F1EC`},{char:`🇰🇭`,name:`flag Cambodia`,key:`1F1F0-1F1ED`},{char:`🇰🇮`,name:`flag Kiribati`,key:`1F1F0-1F1EE`},{char:`🇰🇲`,name:`flag Comoros`,key:`1F1F0-1F1F2`},{char:`🇰🇳`,name:`flag St. Kitts & Nevis`,key:`1F1F0-1F1F3`},{char:`🇰🇵`,name:`flag North Korea`,key:`1F1F0-1F1F5`},{char:`🇰🇷`,name:`flag South Korea`,key:`1F1F0-1F1F7`},{char:`🇰🇼`,name:`flag Kuwait`,key:`1F1F0-1F1FC`},{char:`🇰🇾`,name:`flag Cayman Islands`,key:`1F1F0-1F1FE`},{char:`🇰🇿`,name:`flag Kazakhstan`,key:`1F1F0-1F1FF`},{char:`🇱🇦`,name:`flag Laos`,key:`1F1F1-1F1E6`},{char:`🇱🇧`,name:`flag Lebanon`,key:`1F1F1-1F1E7`},{char:`🇱🇨`,name:`flag St. Lucia`,key:`1F1F1-1F1E8`},{char:`🇱🇮`,name:`flag Liechtenstein`,key:`1F1F1-1F1EE`},{char:`🇱🇰`,name:`flag Sri Lanka`,key:`1F1F1-1F1F0`},{char:`🇱🇷`,name:`flag Liberia`,key:`1F1F1-1F1F7`},{char:`🇱🇸`,name:`flag Lesotho`,key:`1F1F1-1F1F8`},{char:`🇱🇹`,name:`flag Lithuania`,key:`1F1F1-1F1F9`},{char:`🇱🇺`,name:`flag Luxembourg`,key:`1F1F1-1F1FA`},{char:`🇱🇻`,name:`flag Latvia`,key:`1F1F1-1F1FB`},{char:`🇱🇾`,name:`flag Libya`,key:`1F1F1-1F1FE`},{char:`🇲🇦`,name:`flag Morocco`,key:`1F1F2-1F1E6`},{char:`🇲🇨`,name:`flag Monaco`,key:`1F1F2-1F1E8`},{char:`🇲🇩`,name:`flag Moldova`,key:`1F1F2-1F1E9`},{char:`🇲🇪`,name:`flag Montenegro`,key:`1F1F2-1F1EA`},{char:`🇲🇫`,name:`flag St. Martin`,key:`1F1F2-1F1EB`},{char:`🇲🇬`,name:`flag Madagascar`,key:`1F1F2-1F1EC`},{char:`🇲🇭`,name:`flag Marshall Islands`,key:`1F1F2-1F1ED`},{char:`🇲🇰`,name:`flag North Macedonia`,key:`1F1F2-1F1F0`},{char:`🇲🇱`,name:`flag Mali`,key:`1F1F2-1F1F1`},{char:`🇲🇲`,name:`flag Myanmar (Burma)`,key:`1F1F2-1F1F2`},{char:`🇲🇳`,name:`flag Mongolia`,key:`1F1F2-1F1F3`},{char:`🇲🇴`,name:`flag Macao SAR China`,key:`1F1F2-1F1F4`},{char:`🇲🇵`,name:`flag Northern Mariana Islands`,key:`1F1F2-1F1F5`},{char:`🇲🇶`,name:`flag Martinique`,key:`1F1F2-1F1F6`},{char:`🇲🇷`,name:`flag Mauritania`,key:`1F1F2-1F1F7`},{char:`🇲🇸`,name:`flag Montserrat`,key:`1F1F2-1F1F8`},{char:`🇲🇹`,name:`flag Malta`,key:`1F1F2-1F1F9`},{char:`🇲🇺`,name:`flag Mauritius`,key:`1F1F2-1F1FA`},{char:`🇲🇻`,name:`flag Maldives`,key:`1F1F2-1F1FB`},{char:`🇲🇼`,name:`flag Malawi`,key:`1F1F2-1F1FC`},{char:`🇲🇽`,name:`flag Mexico`,key:`1F1F2-1F1FD`},{char:`🇲🇾`,name:`flag Malaysia`,key:`1F1F2-1F1FE`},{char:`🇲🇿`,name:`flag Mozambique`,key:`1F1F2-1F1FF`},{char:`🇳🇦`,name:`flag Namibia`,key:`1F1F3-1F1E6`},{char:`🇳🇨`,name:`flag New Caledonia`,key:`1F1F3-1F1E8`},{char:`🇳🇪`,name:`flag Niger`,key:`1F1F3-1F1EA`},{char:`🇳🇫`,name:`flag Norfolk Island`,key:`1F1F3-1F1EB`},{char:`🇳🇬`,name:`flag Nigeria`,key:`1F1F3-1F1EC`},{char:`🇳🇮`,name:`flag Nicaragua`,key:`1F1F3-1F1EE`},{char:`🇳🇱`,name:`flag Netherlands`,key:`1F1F3-1F1F1`},{char:`🇳🇴`,name:`flag Norway`,key:`1F1F3-1F1F4`},{char:`🇳🇵`,name:`flag Nepal`,key:`1F1F3-1F1F5`},{char:`🇳🇷`,name:`flag Nauru`,key:`1F1F3-1F1F7`},{char:`🇳🇺`,name:`flag Niue`,key:`1F1F3-1F1FA`},{char:`🇳🇿`,name:`flag New Zealand`,key:`1F1F3-1F1FF`},{char:`🇴🇲`,name:`flag Oman`,key:`1F1F4-1F1F2`},{char:`🇵🇦`,name:`flag Panama`,key:`1F1F5-1F1E6`},{char:`🇵🇪`,name:`flag Peru`,key:`1F1F5-1F1EA`},{char:`🇵🇫`,name:`flag French Polynesia`,key:`1F1F5-1F1EB`},{char:`🇵🇬`,name:`flag Papua New Guinea`,key:`1F1F5-1F1EC`},{char:`🇵🇭`,name:`flag Philippines`,key:`1F1F5-1F1ED`},{char:`🇵🇰`,name:`flag Pakistan`,key:`1F1F5-1F1F0`},{char:`🇵🇱`,name:`flag Poland`,key:`1F1F5-1F1F1`},{char:`🇵🇲`,name:`flag St. Pierre & Miquelon`,key:`1F1F5-1F1F2`},{char:`🇵🇳`,name:`flag Pitcairn Islands`,key:`1F1F5-1F1F3`},{char:`🇵🇷`,name:`flag Puerto Rico`,key:`1F1F5-1F1F7`},{char:`🇵🇸`,name:`flag Palestinian Territories`,key:`1F1F5-1F1F8`},{char:`🇵🇹`,name:`flag Portugal`,key:`1F1F5-1F1F9`},{char:`🇵🇼`,name:`flag Palau`,key:`1F1F5-1F1FC`},{char:`🇵🇾`,name:`flag Paraguay`,key:`1F1F5-1F1FE`},{char:`🇶🇦`,name:`flag Qatar`,key:`1F1F6-1F1E6`},{char:`🇷🇪`,name:`flag Réunion`,key:`1F1F7-1F1EA`},{char:`🇷🇴`,name:`flag Romania`,key:`1F1F7-1F1F4`},{char:`🇷🇸`,name:`flag Serbia`,key:`1F1F7-1F1F8`},{char:`🇷🇺`,name:`flag Russia`,key:`1F1F7-1F1FA`},{char:`🇷🇼`,name:`flag Rwanda`,key:`1F1F7-1F1FC`},{char:`🇸🇦`,name:`flag Saudi Arabia`,key:`1F1F8-1F1E6`},{char:`🇸🇧`,name:`flag Solomon Islands`,key:`1F1F8-1F1E7`},{char:`🇸🇨`,name:`flag Seychelles`,key:`1F1F8-1F1E8`},{char:`🇸🇩`,name:`flag Sudan`,key:`1F1F8-1F1E9`},{char:`🇸🇪`,name:`flag Sweden`,key:`1F1F8-1F1EA`},{char:`🇸🇬`,name:`flag Singapore`,key:`1F1F8-1F1EC`},{char:`🇸🇭`,name:`flag St. Helena`,key:`1F1F8-1F1ED`},{char:`🇸🇮`,name:`flag Slovenia`,key:`1F1F8-1F1EE`},{char:`🇸🇯`,name:`flag Svalbard & Jan Mayen`,key:`1F1F8-1F1EF`},{char:`🇸🇰`,name:`flag Slovakia`,key:`1F1F8-1F1F0`},{char:`🇸🇱`,name:`flag Sierra Leone`,key:`1F1F8-1F1F1`},{char:`🇸🇲`,name:`flag San Marino`,key:`1F1F8-1F1F2`},{char:`🇸🇳`,name:`flag Senegal`,key:`1F1F8-1F1F3`},{char:`🇸🇴`,name:`flag Somalia`,key:`1F1F8-1F1F4`},{char:`🇸🇷`,name:`flag Suriname`,key:`1F1F8-1F1F7`},{char:`🇸🇸`,name:`flag South Sudan`,key:`1F1F8-1F1F8`},{char:`🇸🇹`,name:`flag São Tomé & Príncipe`,key:`1F1F8-1F1F9`},{char:`🇸🇻`,name:`flag El Salvador`,key:`1F1F8-1F1FB`},{char:`🇸🇽`,name:`flag Sint Maarten`,key:`1F1F8-1F1FD`},{char:`🇸🇾`,name:`flag Syria`,key:`1F1F8-1F1FE`},{char:`🇸🇿`,name:`flag Eswatini`,key:`1F1F8-1F1FF`},{char:`🇹🇦`,name:`flag Tristan da Cunha`,key:`1F1F9-1F1E6`},{char:`🇹🇨`,name:`flag Turks & Caicos Islands`,key:`1F1F9-1F1E8`},{char:`🇹🇩`,name:`flag Chad`,key:`1F1F9-1F1E9`},{char:`🇹🇫`,name:`flag French Southern Territories`,key:`1F1F9-1F1EB`},{char:`🇹🇬`,name:`flag Togo`,key:`1F1F9-1F1EC`},{char:`🇹🇭`,name:`flag Thailand`,key:`1F1F9-1F1ED`},{char:`🇹🇯`,name:`flag Tajikistan`,key:`1F1F9-1F1EF`},{char:`🇹🇰`,name:`flag Tokelau`,key:`1F1F9-1F1F0`},{char:`🇹🇱`,name:`flag Timor-Leste`,key:`1F1F9-1F1F1`},{char:`🇹🇲`,name:`flag Turkmenistan`,key:`1F1F9-1F1F2`},{char:`🇹🇳`,name:`flag Tunisia`,key:`1F1F9-1F1F3`},{char:`🇹🇴`,name:`flag Tonga`,key:`1F1F9-1F1F4`},{char:`🇹🇷`,name:`flag Türkiye`,key:`1F1F9-1F1F7`},{char:`🇹🇹`,name:`flag Trinidad & Tobago`,key:`1F1F9-1F1F9`},{char:`🇹🇻`,name:`flag Tuvalu`,key:`1F1F9-1F1FB`},{char:`🇹🇼`,name:`flag Taiwan`,key:`1F1F9-1F1FC`},{char:`🇹🇿`,name:`flag Tanzania`,key:`1F1F9-1F1FF`},{char:`🇺🇦`,name:`flag Ukraine`,key:`1F1FA-1F1E6`},{char:`🇺🇬`,name:`flag Uganda`,key:`1F1FA-1F1EC`},{char:`🇺🇲`,name:`flag U.S. Outlying Islands`,key:`1F1FA-1F1F2`},{char:`🇺🇳`,name:`flag United Nations`,key:`1F1FA-1F1F3`},{char:`🇺🇸`,name:`flag United States`,key:`1F1FA-1F1F8`},{char:`🇺🇾`,name:`flag Uruguay`,key:`1F1FA-1F1FE`},{char:`🇺🇿`,name:`flag Uzbekistan`,key:`1F1FA-1F1FF`},{char:`🇻🇦`,name:`flag Vatican City`,key:`1F1FB-1F1E6`},{char:`🇻🇨`,name:`flag St. Vincent & Grenadines`,key:`1F1FB-1F1E8`},{char:`🇻🇪`,name:`flag Venezuela`,key:`1F1FB-1F1EA`},{char:`🇻🇬`,name:`flag British Virgin Islands`,key:`1F1FB-1F1EC`},{char:`🇻🇮`,name:`flag U.S. Virgin Islands`,key:`1F1FB-1F1EE`},{char:`🇻🇳`,name:`flag Vietnam`,key:`1F1FB-1F1F3`},{char:`🇻🇺`,name:`flag Vanuatu`,key:`1F1FB-1F1FA`},{char:`🇼🇫`,name:`flag Wallis & Futuna`,key:`1F1FC-1F1EB`},{char:`🇼🇸`,name:`flag Samoa`,key:`1F1FC-1F1F8`},{char:`🇽🇰`,name:`flag Kosovo`,key:`1F1FD-1F1F0`},{char:`🇾🇪`,name:`flag Yemen`,key:`1F1FE-1F1EA`},{char:`🇾🇹`,name:`flag Mayotte`,key:`1F1FE-1F1F9`},{char:`🇿🇦`,name:`flag South Africa`,key:`1F1FF-1F1E6`},{char:`🇿🇲`,name:`flag Zambia`,key:`1F1FF-1F1F2`},{char:`🇿🇼`,name:`flag Zimbabwe`,key:`1F1FF-1F1FC`},{char:`🏴󠁧󠁢󠁥󠁮󠁧󠁿`,name:`flag England`,key:`1F3F4-E0067-E0062-E0065-E006E-E0067-E007F`},{char:`🏴󠁧󠁢󠁳󠁣󠁴󠁿`,name:`flag Scotland`,key:`1F3F4-E0067-E0062-E0073-E0063-E0074-E007F`},{char:`🏴󠁧󠁢󠁷󠁬󠁳󠁿`,name:`flag Wales`,key:`1F3F4-E0067-E0062-E0077-E006C-E0073-E007F`}]}],ni=new Map;for(let e of ti)for(let t of e.emojis)ni.set(t.char,t.key);var ri=null;function ii(e){return e.endsWith(`/`)?e:`${e}/`}function ai(){if(ri)return ri;let e=typeof window<`u`?window.__KALOTYP_EMOJI_BASE__:void 0;return typeof e==`string`&&e.length>0?ii(e):`/emoji/`}function oi(e){return`${ai()}${e}.svg`}var si=new Map,ci=new Set;function li(e){return ci.add(e),()=>{ci.delete(e)}}function ui(){for(let e of ci)e()}function di(e){let t=si.get(e);if(t)return t;let n=new Image,r={image:n,loaded:!1,failed:!1};return si.set(e,r),n.addEventListener(`load`,()=>{r.loaded=!0,ui()}),n.addEventListener(`error`,()=>{r.failed=!0}),n.src=`${ai()}${e}.svg`,r}function fi(e){let t=ni.get(e);if(!t)return null;let n=di(t);return n.loaded?n.image:null}var pi=1500;async function mi(e){let t=new Set;for(let n of e){if(n.kind!==`emoji`)continue;let e=ni.get(n.emoji);e&&t.add(e)}if(t.size===0)return;let n=[...t].map(e=>{let t=di(e);return t.loaded||t.failed?Promise.resolve():new Promise(e=>{t.image.addEventListener(`load`,()=>e(),{once:!0}),t.image.addEventListener(`error`,()=>e(),{once:!0})})}),r,i=new Promise(e=>{r=setTimeout(e,pi)});try{await Promise.race([Promise.all(n).then(()=>void 0),i])}finally{r&&clearTimeout(r)}}var hi=8,gi=180;function _i(e){let t=!1,n=0,r=document.createElement(`div`);r.className=`kalotyp-annotate-emoji-picker`,r.setAttribute(`role`,`group`),r.setAttribute(`aria-label`,`Emoji picker`),r.hidden=!0;let i=document.createElement(`div`);i.className=`kalotyp-annotate-emoji-header`;let a=document.createElement(`span`);a.className=`kalotyp-annotate-emoji-title`,a.textContent=`Emoji`;let o=document.createElement(`button`);o.type=`button`,o.className=`kalotyp-annotate-emoji-close`,o.innerHTML=Y(`close`),o.setAttribute(`aria-label`,`Close emoji picker`),o.title=`Close`,o.addEventListener(`click`,()=>e.onClose()),i.appendChild(a),i.appendChild(o);let s=document.createElement(`div`);s.className=`kalotyp-annotate-emoji-search`,s.innerHTML=Y(`search`,{"aria-hidden":`true`});let c=document.createElement(`input`);c.type=`search`,c.className=`kalotyp-annotate-emoji-search-input`,c.setAttribute(`aria-label`,`Search emoji`),c.placeholder=`Search emoji`,c.autocomplete=`off`,c.spellcheck=!1,s.appendChild(c);let l=document.createElement(`div`);l.className=`kalotyp-annotate-emoji-tabs`,l.setAttribute(`role`,`group`),l.setAttribute(`aria-label`,`Emoji categories`);let u=[];ti.forEach((e,t)=>{let n=document.createElement(`button`);n.type=`button`,n.className=`kalotyp-annotate-emoji-tab`,n.setAttribute(`aria-label`,e.label),n.title=e.label;let r=e.emojis[0]?.key;if(r){let e=document.createElement(`img`);e.className=`kalotyp-annotate-emoji-tab-img`,e.setAttribute(`loading`,`lazy`),e.alt=``,e.draggable=!1,e.src=oi(r),n.appendChild(e)}n.addEventListener(`click`,()=>{c.value=``,p(t)}),l.appendChild(n),u.push(n)});let d=document.createElement(`div`);d.className=`kalotyp-annotate-emoji-grid`,d.setAttribute(`role`,`group`),d.setAttribute(`aria-label`,`Emoji`),d.style.setProperty(`--kalotyp-emoji-cols`,String(hi));let f=document.createElement(`p`);f.className=`kalotyp-annotate-emoji-empty`,f.textContent=`No emoji found.`,f.hidden=!0,r.appendChild(i),r.appendChild(s),r.appendChild(l),r.appendChild(d),r.appendChild(f),e.host.appendChild(r);function p(e){n=e,u.forEach((t,n)=>{t.setAttribute(`aria-pressed`,n===e?`true`:`false`)});let t=ti[e];h(t?t.emojis:[])}function m(e){let t=e.trim().toLowerCase();if(t===``){p(n);return}for(let e of u)e.setAttribute(`aria-pressed`,`false`);let r=[];for(let e of ti){for(let n of e.emojis)if(n.name.includes(t)&&(r.push(n),r.length>=gi))break;if(r.length>=gi)break}h(r)}function h(t){d.replaceChildren(),f.hidden=t.length>0,d.hidden=t.length===0,t.forEach((t,n)=>{let r=document.createElement(`button`);r.type=`button`,r.className=`kalotyp-annotate-emoji-cell`,r.tabIndex=n===0?0:-1,r.dataset.char=t.char,r.setAttribute(`aria-label`,t.name),r.title=t.name;let i=document.createElement(`img`);i.className=`kalotyp-annotate-emoji-cell-img`,i.setAttribute(`loading`,`lazy`),i.setAttribute(`decoding`,`async`),i.alt=``,i.draggable=!1,i.src=oi(t.key),r.appendChild(i),r.addEventListener(`click`,()=>e.onSelect(t.char)),d.appendChild(r)}),d.scrollTop=0}function g(e){let t=d.querySelectorAll(`.kalotyp-annotate-emoji-cell`),n=t[e];if(n){for(let e of t)e.tabIndex=-1;n.tabIndex=0,n.focus()}}function _(e){let t=e.target;if(!(t instanceof HTMLElement)||!t.classList.contains(`kalotyp-annotate-emoji-cell`))return;let n=Array.from(d.querySelectorAll(`.kalotyp-annotate-emoji-cell`)),r=n.indexOf(t);if(r===-1)return;let i=r;switch(e.key){case`ArrowRight`:i=Math.min(r+1,n.length-1);break;case`ArrowLeft`:i=Math.max(r-1,0);break;case`ArrowDown`:i=Math.min(r+hi,n.length-1);break;case`ArrowUp`:i=Math.max(r-hi,0);break;case`Home`:i=0;break;case`End`:i=n.length-1;break;default:return}e.preventDefault(),g(i)}let v=()=>m(c.value),y=e=>e.stopPropagation();return c.addEventListener(`input`,v),d.addEventListener(`keydown`,_),r.addEventListener(`wheel`,y),p(0),{element:r,get isOpen(){return t},show(){t=!0,r.hidden=!1,requestAnimationFrame(()=>c.focus())},hide(){t=!1,r.hidden=!0},destroy(){c.removeEventListener(`input`,v),d.removeEventListener(`keydown`,_),r.removeEventListener(`wheel`,y),r.remove()}}}var vi=`kalotyp-annotate-fonts`;function yi(){return`https://fonts.bunny.net/css?family=${me.flatMap(e=>e.bunnyName?[e.bunnyName]:[]).map(e=>`${e}:400,400i,700,700i`).join(`|`)}&display=swap`}function bi(e){if(typeof document>`u`)return()=>{};if(!document.getElementById(vi)){let e=document.createElement(`link`);e.id=vi,e.rel=`stylesheet`,e.href=yi(),document.head.appendChild(e)}if(!e||!(`fonts`in document))return()=>{};let t=()=>e();return document.fonts.addEventListener(`loadingdone`,t),document.fonts.ready.then(()=>e()),()=>document.fonts.removeEventListener(`loadingdone`,t)}var xi=[{id:`select`,label:`Select`,icon:Y(`select`,{fill:`currentColor`,"stroke-width":1})},{id:`text`,label:`Text`,icon:Y(`text`)},{id:`rect`,label:`Rectangle`,icon:Y(`rect`)},{id:`ellipse`,label:`Ellipse`,icon:Y(`ellipse`)},{id:`arrow`,label:`Arrow`,icon:Y(`arrow`)},{id:`freehand`,label:`Freehand`,icon:Y(`freehand`)},{id:`highlight`,label:`Highlight`,icon:Y(`highlight`)},{id:`emoji`,label:`Emoji`,icon:Y(`emoji`)}],Si=[`#ff3b30`,`#ffcc00`,`#34c759`,`#007aff`,`#ffffff`,`#000000`],Ci=8,wi=400;function Ti(e){let t=document.createElement(`div`);t.className=`kalotyp-annotate-panel`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Annotate`);let n=document.createElement(`div`);n.className=`kalotyp-annotate-toolbar`,n.setAttribute(`role`,`toolbar`),n.setAttribute(`aria-label`,`Annotation tools`);let r=new Map;for(let t of xi){let i=document.createElement(`button`);i.type=`button`,i.className=`kalotyp-annotate-tool`,i.dataset.tool=t.id,i.setAttribute(`aria-label`,t.label),i.title=t.label,i.setAttribute(`aria-pressed`,t.id===e.initialTool?`true`:`false`),i.innerHTML=t.icon,i.addEventListener(`click`,()=>e.onSelectTool(t.id)),n.appendChild(i),r.set(t.id,i)}let i=document.createElement(`div`);i.className=`kalotyp-annotate-style-row`;let a=[],o=document.createElement(`div`);o.className=`kalotyp-annotate-swatches`,o.setAttribute(`role`,`radiogroup`),o.setAttribute(`aria-label`,`Color`);for(let t of Si){let n=document.createElement(`button`);n.type=`button`,n.className=`kalotyp-annotate-swatch`,n.setAttribute(`role`,`radio`),n.setAttribute(`aria-label`,`Use color ${t}`),n.dataset.color=t,n.style.setProperty(`--kalotyp-swatch`,t),n.addEventListener(`click`,()=>e.onColorChange(t)),o.appendChild(n),a.push(n)}let s=Di(e.initialStyle.color),c=document.createElement(`input`);c.type=`text`,c.className=`kalotyp-annotate-hex`,c.value=s,c.maxLength=7,c.spellcheck=!1,c.autocomplete=`off`,c.setAttribute(`aria-label`,`Color hex code`),c.setAttribute(`placeholder`,`#000000`),c.style.setProperty(`--kalotyp-hex-swatch`,s),c.addEventListener(`change`,()=>{let t=Oi(c.value.trim());t?(c.value=t,s=t,c.style.setProperty(`--kalotyp-hex-swatch`,t),e.onColorChange(t)):c.value=s});let l=document.createElement(`span`);l.className=`kalotyp-annotate-stroke-wrap`;let u=document.createElement(`label`);u.className=`kalotyp-annotate-stroke-label`,u.textContent=`Width`;let d=document.createElement(`input`);d.type=`range`,d.className=`kalotyp-annotate-stroke`,d.min=`1`,d.max=`40`,d.step=`1`,d.value=String(e.initialStyle.strokeWidth),d.setAttribute(`aria-label`,`Stroke width`),d.addEventListener(`change`,()=>e.onStrokeWidthChange(d.valueAsNumber)),u.appendChild(d),l.appendChild(u);let f=document.createElement(`button`);f.type=`button`,f.className=`kalotyp-annotate-delete`,f.innerHTML=`${Y(`delete`)}<span>Delete</span>`,f.setAttribute(`aria-label`,`Delete selected annotation`),f.title=`Delete (Del)`,f.disabled=!e.canDelete,f.addEventListener(`click`,()=>e.onDeleteSelected());let p=document.createElement(`button`);p.type=`button`,p.className=`kalotyp-annotate-insert`,p.innerHTML=`${Y(`plus`)}<span>Insert at centre</span>`,p.setAttribute(`aria-label`,`Insert annotation at image centre`),p.title=`Insert at centre`,p.disabled=!Ei(e.initialTool),p.addEventListener(`click`,()=>e.onInsertAtCenter()),i.appendChild(o),i.appendChild(c),i.appendChild(l),i.appendChild(p),i.appendChild(f);let m=document.createElement(`div`);m.className=`kalotyp-annotate-text-row`,m.style.display=`none`;let h=document.createElement(`select`);h.className=`kalotyp-annotate-font`,h.setAttribute(`aria-label`,`Font`);for(let e of me){let t=document.createElement(`option`);t.value=e.key,t.textContent=e.label,h.appendChild(t)}h.value=e.initialStyle.fontFamily,h.addEventListener(`change`,()=>e.onFontFamilyChange(h.value));let g=e.initialStyle.fontSize,_=document.createElement(`input`);_.type=`number`,_.className=`kalotyp-annotate-font-size`,_.min=String(Ci),_.max=String(wi),_.step=`1`,_.value=String(e.initialStyle.fontSize),_.setAttribute(`aria-label`,`Font size`),_.addEventListener(`change`,()=>{let t=Math.round(_.valueAsNumber);Number.isFinite(t)&&t>=Ci&&t<=wi?(g=t,e.onFontSizeChange(t)):_.value=String(g)});let v=document.createElement(`button`);v.type=`button`,v.className=`kalotyp-annotate-text-toggle`,v.innerHTML=Y(`bold`),v.setAttribute(`aria-label`,`Bold`),v.title=`Bold`,v.setAttribute(`aria-pressed`,e.initialStyle.fontWeight===`bold`?`true`:`false`),v.addEventListener(`click`,()=>e.onToggleBold());let y=document.createElement(`button`);y.type=`button`,y.className=`kalotyp-annotate-text-toggle`,y.innerHTML=Y(`italic`),y.setAttribute(`aria-label`,`Italic`),y.title=`Italic`,y.setAttribute(`aria-pressed`,e.initialStyle.fontStyle===`italic`?`true`:`false`),y.addEventListener(`click`,()=>e.onToggleItalic());let b=document.createElement(`div`);b.className=`kalotyp-annotate-align`,b.setAttribute(`role`,`radiogroup`),b.setAttribute(`aria-label`,`Text alignment`);let x=new Map,S=[{id:`left`,label:`Align left`,icon:Y(`alignLeft`)},{id:`center`,label:`Align center`,icon:Y(`alignCenter`)},{id:`right`,label:`Align right`,icon:Y(`alignRight`)}];for(let t of S){let n=document.createElement(`button`);n.type=`button`,n.className=`kalotyp-annotate-align-button`,n.setAttribute(`role`,`radio`),n.setAttribute(`aria-label`,t.label),n.title=t.label,n.innerHTML=t.icon,n.setAttribute(`aria-checked`,t.id===e.initialStyle.textAlign?`true`:`false`),n.addEventListener(`click`,()=>e.onAlignChange(t.id)),b.appendChild(n),x.set(t.id,n)}m.appendChild(h),m.appendChild(_),m.appendChild(v),m.appendChild(y),m.appendChild(b),t.appendChild(n),t.appendChild(i),t.appendChild(m),t.appendChild(e.coordInputs);function C(e){for(let[t,n]of r)n.setAttribute(`aria-pressed`,t===e?`true`:`false`);p.disabled=!Ei(e)}function w(e){let t=Di(e.color);c.value.toLowerCase()!==t.toLowerCase()&&(c.value=t),s=t,c.style.setProperty(`--kalotyp-hex-swatch`,t),d.valueAsNumber!==e.strokeWidth&&(d.value=String(e.strokeWidth));for(let t of a){let n=t.dataset.color?.toLowerCase()===e.color.toLowerCase();t.setAttribute(`aria-checked`,n?`true`:`false`)}h.value!==e.fontFamily&&(h.value=e.fontFamily),g=e.fontSize,Math.round(_.valueAsNumber)!==e.fontSize&&(_.value=String(e.fontSize)),v.setAttribute(`aria-pressed`,e.fontWeight===`bold`?`true`:`false`),y.setAttribute(`aria-pressed`,e.fontStyle===`italic`?`true`:`false`);for(let[t,n]of x)n.setAttribute(`aria-checked`,t===e.textAlign?`true`:`false`)}function T(e){f.disabled=!e}function E(e){m.style.display=e.text?``:`none`,o.style.display=e.emoji?`none`:``,c.style.display=e.emoji?`none`:``,l.style.display=e.text||e.emoji?`none`:``}return w(e.initialStyle),{container:t,toolButtons:r,hexInput:c,colorSwatches:a,strokeRange:d,fontSelect:h,fontSizeInput:_,boldButton:v,italicButton:y,alignButtons:x,deleteButton:f,insertButton:p,setActiveTool:C,setStyle:w,setCanDelete:T,setControlsMode:E}}function Ei(e){return e===`select`?!1:Fe(e)}function Di(e){if(/^#[0-9a-fA-F]{6}$/.test(e))return e;if(/^#[0-9a-fA-F]{3}$/.test(e)){let t=e[1],n=e[2],r=e[3];return`#${t}${t}${n}${n}${r}${r}`}return`#000000`}function Oi(e){let t=e.startsWith(`#`)?e.slice(1):e;if(/^[0-9a-fA-F]{6}$/.test(t))return`#${t.toLowerCase()}`;if(/^[0-9a-fA-F]{3}$/.test(t)){let e=t[0],n=t[1],r=t[2];return`#${e}${e}${n}${n}${r}${r}`.toLowerCase()}return null}function ki(e,t){let n=n=>{if(n.button!==0)return;let r=t(n);if(!r)return;n.preventDefault(),n.stopPropagation();try{e.setPointerCapture(n.pointerId)}catch{}let i,a=!1,o=n.shiftKey,s=()=>{if(a=!1,!i)return;let e=i;i=void 0,r.onMove(e)},c=e=>{i=e,a||(a=!0,requestAnimationFrame(s))},l=e=>{e.pointerId===n.pointerId&&(o=e.shiftKey,c({clientX:e.clientX,clientY:e.clientY,shiftKey:e.shiftKey}))},u=e=>{if(e.key!==`Shift`||e.shiftKey===o)return;o=e.shiftKey;let t=i;c({clientX:t?.clientX??n.clientX,clientY:t?.clientY??n.clientY,shiftKey:e.shiftKey})},d=t=>{e.removeEventListener(`pointermove`,l),e.removeEventListener(`pointerup`,f),e.removeEventListener(`pointercancel`,p),window.removeEventListener(`keydown`,u),window.removeEventListener(`keyup`,u);try{e.releasePointerCapture(n.pointerId)}catch{}if(i){let e=i;i=void 0,r.onMove(e)}t?r.onCommit():r.onCancel()},f=e=>{e.pointerId===n.pointerId&&d(!0)},p=e=>{e.pointerId===n.pointerId&&d(!1)};e.addEventListener(`pointermove`,l),e.addEventListener(`pointerup`,f),e.addEventListener(`pointercancel`,p),window.addEventListener(`keydown`,u),window.addEventListener(`keyup`,u)};return e.addEventListener(`pointerdown`,n),()=>e.removeEventListener(`pointerdown`,n)}function Ai(e,t,n){let r=e.getBoundingClientRect();return{x:t-r.left,y:n-r.top}}function ji(e,t,n){let r=Math.max(1,window.devicePixelRatio||1),i=Math.max(1,Math.round(t*r)),a=Math.max(1,Math.round(n*r));e.width!==i&&(e.width=i),e.height!==a&&(e.height=a),e.style.width=`${t}px`,e.style.height=`${n}px`;let o=e.getContext(`2d`);return o?(o.setTransform(r,0,0,r,0,0),o.clearRect(0,0,t,n),o):null}function Mi(e,t,n,r,i){let a=ji(e,n,r);a&&(a.imageSmoothingEnabled=!0,a.imageSmoothingQuality=`high`,a.drawImage(t.bitmap,i.displayRect.x,i.displayRect.y,i.displayRect.width,i.displayRect.height))}function Ni(e,t,n,r,i,a){let o=ji(e,n,r);if(o&&t.length!==0){o.save(),o.translate(i.displayRect.x,i.displayRect.y),o.scale(i.scale,i.scale);for(let e of t)Ge(o,e,a);o.restore()}}function Pi(e,t,n,r,i,a){let o=ji(e,n,r);o&&t!==null&&(o.save(),o.translate(i.displayRect.x,i.displayRect.y),o.scale(i.scale,i.scale),Ge(o,t,a),o.restore())}function Fi(e,t,n,r,i){let a=ji(e,n,r);if(!a||!t)return;let o=i.displayRect.x+t.x*i.scale,s=i.displayRect.y+t.y*i.scale,c=t.width*i.scale,l=t.height*i.scale,u=o,d=s;c<0&&(u=o+c,c=-c),l<0&&(d=s+l,l=-l),a.save(),a.fillStyle=`rgba(99, 102, 241, 0.12)`,a.fillRect(u,d,c,l),a.strokeStyle=`rgba(99, 102, 241, 0.95)`,a.lineWidth=1,a.setLineDash([4,3]),a.strokeRect(u+.5,d+.5,c-1,l-1),a.restore()}var Ii=[`tl`,`tr`,`bl`,`br`],Li=24;function Ri(e){let{host:t,toolContext:n}=e,r=new Map,i=[];for(let e of $e){let a=document.createElement(`button`);a.type=`button`,a.className=`kalotyp-annotate-handle`,a.dataset.direction=e,a.setAttribute(`aria-label`,Ki(e)),a.tabIndex=-1,a.style.display=`none`,r.set(e,a),t.appendChild(a),i.push(ki(a,t=>Wi(n,e,t)))}let a=document.createElement(`button`);a.type=`button`,a.className=`kalotyp-annotate-rotate-handle`,a.setAttribute(`aria-label`,`Rotate`),a.tabIndex=-1,a.style.display=`none`,t.appendChild(a),i.push(ki(a,e=>Ui(n,e)));function o(e,t){if(a.style.display=`none`,!e){Vi(r);return}if(e.kind===`arrow`){Vi(r);let n=r.get(`tl`),i=r.get(`br`);n&&Bi(n,zi({x:e.x1,y:e.y1},t)),i&&Bi(i,zi({x:e.x2,y:e.y2},t));return}if(e.kind===`text`){Vi(r);return}if(e.kind===`emoji`){Vi(r);let n=et(W(e));for(let e of Ii){let i=r.get(e);i&&Bi(i,zi(n[e],t))}let i=zi({x:e.x+e.size/2,y:e.y+e.size/2},t),o=e.size/2*t.scale+Li,s=e.rotation*Math.PI/180;Bi(a,{x:i.x+o*Math.sin(s),y:i.y-o*Math.cos(s)});return}let n=et(W(e));for(let e of $e){let i=r.get(e);i&&Bi(i,zi(n[e],t))}}function s(){for(let e of i)e();for(let[,e]of r)e.remove();r.clear(),a.remove()}return{update:o,destroy:s}}function zi(e,t){return{x:t.displayRect.x+e.x*t.scale,y:t.displayRect.y+e.y*t.scale}}function Bi(e,t){e.style.display=``,e.style.left=`${t.x}px`,e.style.top=`${t.y}px`}function Vi(e){for(let[,t]of e)t.style.display=`none`}function Hi(e,t){return Te(Math.atan2(t.y-e.y,t.x-e.x)*180/Math.PI+90)}function Ui(e,t){let n=e.store.get(),r=n.shapes.find(e=>e.id===n.selectedId);if(r?.kind!==`emoji`)return null;let i=r,a={x:i.x+i.size/2,y:i.y+i.size/2};return{onMove(t){let n=Hi(a,e.toImageSpace(t));t.shiftKey&&(n=Te(Math.round(n/15)*15)),e.store.update(e=>U(e,{...i,rotation:Math.round(n)}))},onCommit(){e.commit()},onCancel(){e.store.update(e=>U(e,i))}}}function Wi(e,t,n){let r=e.store.get(),i=r.shapes.find(e=>e.id===r.selectedId);if(!i)return null;let a=i;return{onMove(n){let r=Gi(a,t,e.toImageSpace(n));r&&e.store.update(e=>U(e,r))},onCommit(){e.commit()},onCancel(){e.store.update(e=>U(e,a))}}}function Gi(e,t,n){switch(e.kind){case`rect`:case`ellipse`:{let r=tt({x:e.x,y:e.y,width:e.width,height:e.height},t,n);return{...e,x:r.x,y:r.y,width:r.width,height:r.height}}case`arrow`:{let r=e;return t===`tl`?{...r,x1:n.x,y1:n.y}:t===`br`?{...r,x2:n.x,y2:n.y}:e}case`text`:return e;case`emoji`:{if(!(t===`tl`||t===`tr`||t===`bl`||t===`br`))return e;let{x:r,y:i,size:a}=e,o=r+a,s=i+a,c=t===`tl`||t===`bl`,l=t===`tl`||t===`tr`,u=c?o-n.x:n.x-r,d=l?s-n.y:n.y-i,f=Math.max(8,Math.round(Math.max(u,d))),p=c?o-f:r,m=l?s-f:i;return{...e,x:p,y:m,size:f}}case`freehand`:case`highlight`:{let r=W(e);if(r.width===0||r.height===0)return e;let i=tt(r,t,n),a=i.width/r.width,o=i.height/r.height;if(!Number.isFinite(a)||!Number.isFinite(o))return e;let s=e.points.map(e=>({x:i.x+(e.x-r.x)*a,y:i.y+(e.y-r.y)*o}));return{...e,points:s}}}}function Ki(e){switch(e){case`tl`:return`Resize from top-left`;case`tr`:return`Resize from top-right`;case`bl`:return`Resize from bottom-left`;case`br`:return`Resize from bottom-right`;case`t`:return`Resize from top`;case`r`:return`Resize from right`;case`b`:return`Resize from bottom`;case`l`:return`Resize from left`}}function X(e){return e.selectedId===null?null:e.shapes.find(t=>t.id===e.selectedId)??null}function qi(){let e=document.createElement(`div`);e.className=`kalotyp-annotate-stage`;let t=document.createElement(`canvas`);t.className=`kalotyp-annotate-image`,t.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`canvas`);n.className=`kalotyp-annotate-shapes`,n.setAttribute(`aria-hidden`,`true`);let r=document.createElement(`canvas`);r.className=`kalotyp-annotate-live`,r.setAttribute(`aria-hidden`,`true`);let i=document.createElement(`div`);i.className=`kalotyp-annotate-hit`,i.setAttribute(`role`,`presentation`);let a=document.createElement(`div`);a.className=`kalotyp-annotate-handles`,a.setAttribute(`role`,`group`),a.setAttribute(`aria-label`,`Selected annotation`);let o=document.createElement(`div`);return o.className=`kalotyp-annotate-text-overlay`,e.appendChild(t),e.appendChild(n),e.appendChild(r),e.appendChild(i),e.appendChild(a),e.appendChild(o),{container:e,imageCanvas:t,shapesCanvas:n,liveCanvas:r,hitArea:i,handlesLayer:a,textOverlay:o}}function Ji(e){let t=document.createElement(`div`);t.className=`kalotyp-annotate-text-editor`,t.setAttribute(`contenteditable`,`true`),t.setAttribute(`role`,`textbox`),t.setAttribute(`aria-multiline`,`true`),t.setAttribute(`aria-label`,`Annotation text`),t.spellcheck=!1,t.style.display=`none`,e.host.appendChild(t);let n=null,r=()=>{e.onInput(t.innerText)},i=t=>{if(t.key===`Enter`&&!t.shiftKey){t.preventDefault(),t.stopPropagation(),e.onCommit();return}t.key===`Escape`&&(t.preventDefault(),t.stopPropagation(),e.onCancel())},a=r=>{if(n===null)return;let i=r.target;i instanceof Element&&(t.contains(i)||i.closest(`.kalotyp-annotate-panel`)||e.onCommit())};t.addEventListener(`input`,r),t.addEventListener(`keydown`,i),document.addEventListener(`pointerdown`,a,!0);function o(e,n){let r=n.displayRect.x+e.x*n.scale,i=n.displayRect.y+e.y*n.scale;t.style.left=`${r}px`,t.style.top=`${i}px`,t.style.color=`transparent`,t.style.caretColor=e.color,t.style.font=_e(e,n.scale),t.style.lineHeight=String(Le),t.style.textAlign=e.textAlign,t.style.transformOrigin=`top left`,t.style.width=`max-content`;let a=Math.max(100,n.displayRect.x+n.displayRect.width-r-8);t.style.maxWidth=`${a}px`}return{open(e,r,i){n=e,t.style.display=``,o(e,r),t.innerText=e.text,requestAnimationFrame(()=>{t.focus();let e=document.createRange();e.selectNodeContents(t),e.collapse(!1);let n=window.getSelection();n?.removeAllRanges(),n?.addRange(e)})},restyle(e,t){n!==null&&(n=e,o(e,t))},close(){n=null,t.style.display=`none`,t.blur()},destroy(){t.removeEventListener(`input`,r),t.removeEventListener(`keydown`,i),document.removeEventListener(`pointerdown`,a,!0),t.remove()}}}function Yi(e,t){let n=t.x-e.x,r=t.y-e.y,i=Math.max(Math.abs(n),Math.abs(r)),a=n===0?1:Math.sign(n),o=r===0?1:Math.sign(r);return{x:e.x+a*i,y:e.y+o*i}}function Xi(e,t){let n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r);if(i===0)return e;let a=Math.round(Math.atan2(r,n)/(Math.PI/4))*(Math.PI/4);return{x:e.x+Math.cos(a)*i,y:e.y+Math.sin(a)*i}}function Zi(e,t){let n=t.x-e.x,r=t.y-e.y;return Math.abs(n)>=Math.abs(r)?{x:t.x,y:e.y}:{x:e.x,y:t.y}}function Qi(e,t){let n=e.toImageSpace(t),r=e.store.get(),{id:i,nextShapeNumber:a}=B(r),o=n;return{onMove(t){let a=e.toImageSpace(t);o=t.shiftKey?Yi(n,a):a;let s={id:i,kind:`rect`,x:n.x,y:n.y,width:o.x-n.x,height:o.y-n.y,strokeColor:r.currentStyle.color,strokeWidth:r.currentStyle.strokeWidth,fillColor:r.currentStyle.fillColor};e.setLiveShape(s)},onCommit(){let t=Me({x:n.x,y:n.y,width:o.x-n.x,height:o.y-n.y});if(e.setLiveShape(null),t.width<2||t.height<2)return;let s={id:i,kind:`rect`,...t,strokeColor:r.currentStyle.color,strokeWidth:r.currentStyle.strokeWidth,fillColor:r.currentStyle.fillColor};e.store.update(e=>({...H(e,s),nextShapeNumber:a})),e.commit()},onCancel(){e.setLiveShape(null)}}}function $i(e,t){let n=e.toImageSpace(t),r=e.store.get(),{id:i,nextShapeNumber:a}=B(r),o=n;return{onMove(t){let a=e.toImageSpace(t);o=t.shiftKey?Yi(n,a):a;let s={id:i,kind:`ellipse`,x:n.x,y:n.y,width:o.x-n.x,height:o.y-n.y,strokeColor:r.currentStyle.color,strokeWidth:r.currentStyle.strokeWidth,fillColor:r.currentStyle.fillColor};e.setLiveShape(s)},onCommit(){let t=Me({x:n.x,y:n.y,width:o.x-n.x,height:o.y-n.y});if(e.setLiveShape(null),t.width<2||t.height<2)return;let s={id:i,kind:`ellipse`,...t,strokeColor:r.currentStyle.color,strokeWidth:r.currentStyle.strokeWidth,fillColor:r.currentStyle.fillColor};e.store.update(e=>({...H(e,s),nextShapeNumber:a})),e.commit()},onCancel(){e.setLiveShape(null)}}}function ea(e,t){let n=e.toImageSpace(t),r=e.store.get(),{id:i,nextShapeNumber:a}=B(r),o=n;return{onMove(t){let a=e.toImageSpace(t);o=t.shiftKey?Xi(n,a):a;let s={id:i,kind:`arrow`,x1:n.x,y1:n.y,x2:o.x,y2:o.y,color:r.currentStyle.color,strokeWidth:r.currentStyle.strokeWidth};e.setLiveShape(s)},onCommit(){e.setLiveShape(null);let t=o.x-n.x,s=o.y-n.y;if(t*t+s*s<16)return;let c={id:i,kind:`arrow`,x1:n.x,y1:n.y,x2:o.x,y2:o.y,color:r.currentStyle.color,strokeWidth:r.currentStyle.strokeWidth};e.store.update(e=>({...H(e,c),nextShapeNumber:a})),e.commit()},onCancel(){e.setLiveShape(null)}}}function ta(e,t,n){let r=e.toImageSpace(t),i=e.store.get(),{id:a,nextShapeNumber:o}=B(i),s=[r],c=!1,l=r,u=n.kind===`highlight`,d=u?be:i.currentStyle.color,f=u?18:i.currentStyle.strokeWidth;function p(t){let r={id:a,kind:n.kind,points:t,color:d,strokeWidth:f};e.setLiveShape(r)}return{onMove(t){let n=e.toImageSpace(t);c=t.shiftKey,t.shiftKey?(l=Zi(r,n),p([r,l])):(s.push(n),p(s))},onCommit(){e.setLiveShape(null);let t=c?[r,l]:ve(s);if(t.length<2)return;if(t.length===2){let e=t[0],n=t[1];if(e&&n){let t=n.x-e.x,r=n.y-e.y;if(t*t+r*r<4)return}}let i={id:a,kind:n.kind,points:t,color:d,strokeWidth:f};e.store.update(e=>({...H(e,i),nextShapeNumber:o})),e.commit()},onCancel(){e.setLiveShape(null)}}}function na(e,t,n){let{id:r,nextShapeNumber:i}=B(e.store.get()),{emoji:a,size:o}=n,s=t=>{let n=e.toImageSpace(t);return{id:r,kind:`emoji`,x:Math.round(n.x-o/2),y:Math.round(n.y-o/2),emoji:a,size:o,rotation:0}},c=s(t);return e.setLiveShape(c),{onMove(t){c=s(t),e.setLiveShape(c)},onCommit(){e.setLiveShape(null),e.store.update(e=>({...H(e,c),nextShapeNumber:i})),e.commit()},onCancel(){e.setLiveShape(null)}}}function ra(e,t,n,r,i,a){let o=e.toImageSpace(t);return e.store.update(e=>V(e,n)),{onMove(t){let n=e.toImageSpace(t);a(i(r,n.x-o.x,n.y-o.y))},onCommit(){e.commit()},onCancel(){a(r)}}}var ia=32;function aa(e){let{stageHost:t,utilHost:n,source:r,store:i,viewport:a}=e,o=e.onCommit??(()=>{}),s=e.onAnnounce??(()=>{}),c=qi();t.appendChild(c.container);let l=d({width:1,height:1,padding:ia},{width:r.width,height:r.height}),u=null,f=null;function m(){let e=c.container.getBoundingClientRect(),t={width:e.width,height:e.height,padding:ia},n={width:r.width,height:r.height};l=a?a.computeViewport(t,n):d(t,n)}let h={resolveEmojiImage:fi};function g(){let e=c.container.getBoundingClientRect();e.width<=0||e.height<=0||(Mi(c.imageCanvas,r,e.width,e.height,l),Ni(c.shapesCanvas,i.get().shapes,e.width,e.height,l,h),Pi(c.liveCanvas,u,e.width,e.height,l,h),T.update(v(i.get()),l),_())}function _(){if(E===null)return;let e=i.get().shapes.find(e=>e.id===E);e?.kind===`text`&&D.restyle(e,l)}function v(e){return E===null?X(e):null}function y(){let e=c.container.getBoundingClientRect();e.width<=0||e.height<=0||Ni(c.shapesCanvas,i.get().shapes,e.width,e.height,l,h)}function b(){let e=c.container.getBoundingClientRect();e.width<=0||e.height<=0||(f===null?Pi(c.liveCanvas,u,e.width,e.height,l,h):Fi(c.liveCanvas,f,e.width,e.height,l))}function x(e){u=e,f=null,b()}function S(e){f=e,u=null,b()}function C(e){return p(Ai(c.container,e.clientX,e.clientY),l)}let w={store:i,toImageSpace:C,setLiveShape:x,commit:o},T=Ri({host:c.handlesLayer,stageElement:c.container,toolContext:w,getViewport:()=>l}),E=null,D=Ji({host:c.textOverlay,onInput:e=>{let t=X(i.get());t?.kind===`text`&&i.update(n=>U(n,{...t,text:e}))},onCommit:()=>{let e=X(i.get());E=null,D.close(),e?.kind===`text`&&e.text.trim().length===0&&i.update(t=>je(t,e.id)),o(),i.update(e=>ke(e,`select`))},onCancel:()=>{let e=X(i.get());E=null,D.close(),e?.kind===`text`&&e.text.length===0&&i.update(t=>je(t,e.id)),i.update(e=>ke(e,`select`))}}),O=ki(c.hitArea,e=>{let t=i.get();switch(t.activeTool){case`select`:return k(t,e);case`rect`:return Qi(w,e);case`ellipse`:return $i(w,e);case`arrow`:return ea(w,e);case`freehand`:return ta(w,e,{kind:`freehand`});case`highlight`:return ta(w,e,{kind:`highlight`});case`text`:return te(e),null;case`emoji`:return ee(e);default:return null}});function k(e,t){let n=C(t),r=nt(e.shapes,n);return r?(e.selectedId!==r.id&&i.update(e=>V(e,r.id)),ra(w,t,r.id,r,Ne,e=>i.update(t=>U(t,e)))):A(t)}function A(e){let t=C(e),n=t;return{onMove(e){n=C(e),S({x:t.x,y:t.y,width:n.x-t.x,height:n.y-t.y})},onCommit(){S(null);let e=n.x-t.x,r=n.y-t.y;if(Math.abs(e)<2&&Math.abs(r)<2){i.update(e=>V(e,null));return}let a=ca({x:t.x,y:t.y,width:e,height:r}),o=la(i.get().shapes,a);i.update(e=>V(e,o?.id??null))},onCancel(){S(null)}}}function ee(e){let t=i.get(),n=C(e),a=nt(t.shapes,n);return a?.kind===`emoji`?(t.selectedId!==a.id&&i.update(e=>V(e,a.id)),ra(w,e,a.id,a,Ne,e=>i.update(t=>U(t,e)))):na(w,e,{emoji:t.currentStyle.emoji,size:we({width:r.width,height:r.height})})}function te(e){let t=i.get(),n=C(e),r=nt(t.shapes,n);if(r?.kind===`text`){t.selectedId!==r.id&&i.update(e=>V(e,r.id)),j(r);return}let{id:a,nextShapeNumber:o}=B(t),s={id:a,kind:`text`,x:n.x,y:n.y,text:``,fontSize:t.currentStyle.fontSize??32,color:t.currentStyle.color,textAlign:t.currentStyle.textAlign,fontFamily:t.currentStyle.fontFamily,fontWeight:t.currentStyle.fontWeight,fontStyle:t.currentStyle.fontStyle};i.update(e=>({...H(e,s),nextShapeNumber:o})),j(s)}function j(e){E=e.id,D.open(e,l,r),T.update(null,l)}function M(){let e=i.get(),t=e.activeTool;if(t===`select`||!Fe(t))return;let{id:n,nextShapeNumber:a}=B(e),o=Ie(t,{imageSize:{width:r.width,height:r.height},style:e.currentStyle,id:n});if(i.update(e=>({...H(e,o),nextShapeNumber:a})),o.kind===`text`){j(o),s(`Text annotation placed at centre. Type to enter text.`);return}s(`${fa(o.kind)} placed at centre. Use arrow keys to nudge, or edit coordinates below.`),requestAnimationFrame(()=>{let e=I.container.querySelector(`.kalotyp-annotate-coords-input`);e?.focus(),e?.select()})}function N(){let e=X(i.get());return e?.kind===`text`?e:void 0}function P(e){let t=e.selectedId?e.shapes.find(t=>t.id===e.selectedId):void 0,n=t?.kind===`text`?t:void 0,r=e.activeTool===`text`||n!==void 0,i=e.activeTool===`emoji`||t?.kind===`emoji`;z.setControlsMode({text:r,emoji:i}),n?z.setStyle({...e.currentStyle,fontFamily:n.fontFamily,fontSize:n.fontSize,fontWeight:n.fontWeight,fontStyle:n.fontStyle,textAlign:n.textAlign,color:n.color}):z.setStyle(e.currentStyle)}function F(e){i.update(t=>{let n=Ae(t,e),r=X(t);return r?.kind===`text`&&(n=U(n,{...r,...e})),n});let t=N();E!==null&&t&&t.id===E&&D.restyle(t,l),o()}function ne(e){i.update(t=>{let n=Ae(t,{emoji:e}),r=X(t);return r?.kind===`emoji`&&(n=U(n,{...r,emoji:e})),n}),o(),L.hide()}let I=Qr({onShapeChanged:e=>{i.update(t=>U(t,e)),o()}}),L=_i({host:c.container,onSelect:e=>ne(e),onClose:()=>{L.hide(),i.update(e=>ke(e,`select`))}}),R=i.get(),z=Ti({initialTool:R.activeTool,initialStyle:R.currentStyle,canDelete:R.selectedId!==null,coordInputs:I.container,onSelectTool:e=>{i.update(t=>ke(t,e)),e===`emoji`?L.show():L.hide()},onColorChange:e=>{i.update(t=>{let n=Ae(t,{color:e}),r=X(t);return r&&(n=U(n,oa(r,e))),n}),o()},onStrokeWidthChange:e=>{i.update(t=>{let n=Ae(t,{strokeWidth:e}),r=X(t);return r&&(n=U(n,sa(r,e))),n}),o()},onFontFamilyChange:e=>F({fontFamily:e}),onFontSizeChange:e=>F({fontSize:e}),onToggleBold:()=>{let e=N()??null;F({fontWeight:(e?e.fontWeight:i.get().currentStyle.fontWeight)===`bold`?`normal`:`bold`})},onToggleItalic:()=>{let e=N()??null;F({fontStyle:(e?e.fontStyle:i.get().currentStyle.fontStyle)===`italic`?`normal`:`italic`})},onAlignChange:e=>F({textAlign:e}),onDeleteSelected:()=>{let e=i.get().selectedId;e&&(i.update(t=>je(t,e)),o())},onInsertAtCenter:()=>M()});n.appendChild(z.container);let re=bi(()=>y()),ie=li(()=>{y(),b()});P(R),R.activeTool===`emoji`&&L.show(),c.container.dataset.tool=R.activeTool,m(),g();let ae=new ResizeObserver(()=>{m(),g()});ae.observe(c.container);let oe=!1,se=a?.subscribe(()=>{oe||(oe=!0,requestAnimationFrame(()=>{oe=!1,m(),g()}))}),ce=i.get().shapes,le=i.get().selectedId,ue=i.get().activeTool,de=i.get().currentStyle,fe=i.subscribe(e=>{let t=e.shapes!==ce,n=e.selectedId!==le,r=e.activeTool!==ue;t&&(ce=e.shapes,y()),n&&(le=e.selectedId,z.setCanDelete(e.selectedId!==null)),r&&(ue=e.activeTool,z.setActiveTool(e.activeTool),c.container.dataset.tool=e.activeTool,e.activeTool!==`emoji`&&L.hide()),e.currentStyle!==de&&(de=e.currentStyle,z.setStyle(e.currentStyle)),(n||r)&&P(e),T.update(v(e),l),(n||t)&&I.updateForShape(X(e))}),pe=e=>{let t=e.target;if(da(t))return;let n=i.get();if(e.key===`Escape`){n.selectedId!==null&&(e.preventDefault(),e.stopPropagation(),i.update(e=>V(e,null)),s(`Selection cleared.`));return}if(e.key===`Delete`||e.key===`Backspace`){if(n.selectedId===null)return;e.preventDefault();let t=n.selectedId;i.update(e=>je(e,t)),o();return}if(e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`){let t=X(n);if(!t||e.ctrlKey||e.altKey||e.metaKey)return;let r=e.shiftKey?10:1,a=e.key===`ArrowLeft`?-r:e.key===`ArrowRight`?r:0,s=e.key===`ArrowUp`?-r:e.key===`ArrowDown`?r:0;e.preventDefault();let c=Ne(t,a,s);i.update(e=>U(e,c)),o()}};return document.addEventListener(`keydown`,pe,!0),{destroy(){document.removeEventListener(`keydown`,pe,!0),re(),ie(),O(),fe(),se?.(),ae.disconnect(),D.destroy(),L.destroy(),T.destroy(),c.container.remove(),z.container.remove()}}}function oa(e,t){switch(e.kind){case`text`:return{...e,color:t};case`rect`:case`ellipse`:return{...e,strokeColor:t};case`arrow`:case`freehand`:case`highlight`:return{...e,color:t};case`emoji`:return e}}function sa(e,t){switch(e.kind){case`text`:return e;case`rect`:case`ellipse`:case`arrow`:case`freehand`:case`highlight`:return{...e,strokeWidth:t};case`emoji`:return e}}function ca(e){let{x:t,y:n,width:r,height:i}=e;return r<0&&(t+=r,r=-r),i<0&&(n+=i,i=-i),{x:t,y:n,width:r,height:i}}function la(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r&&ua(W(r),t))return r}}function ua(e,t){return!(e.x+e.width<t.x||t.x+t.width<e.x||e.y+e.height<t.y||t.y+t.height<e.y)}function da(e){if(!e)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`?!0:e.isContentEditable===!0}function fa(e){switch(e){case`rect`:return`Rectangle`;case`ellipse`:return`Ellipse`;case`arrow`:return`Arrow`;case`emoji`:return`Emoji`}}function pa(e){return{id:`annotate`,init:e=>Oe({imageSize:{width:e.source.width,height:e.source.height}}),mount(t,n,r){let i=aa({stageHost:t,utilHost:e.panelHost,source:n.source,store:r,viewport:n.viewport,onCommit:()=>n.bus.emit(`commit`,{utility:`annotate`}),onAnnounce:e=>n.bus.emit(`announce`,{message:e})});return{destroy:()=>i.destroy()}},bake:async(e,t)=>(await mi(e.shapes),We({shapes:e.shapes},t,{resolveEmojiImage:fi}))}}var Z=12;function ma(e){let t=m(e.cropRectImage,e.viewport),{cornerAnchors:n,edgeHandles:r,bodyHitArea:i}=e;i.style.left=`${t.x}px`,i.style.top=`${t.y}px`,i.style.width=`${t.width}px`,i.style.height=`${t.height}px`,ha(n.tl,t.x,t.y),ha(n.tr,t.x+t.width,t.y),ha(n.bl,t.x,t.y+t.height),ha(n.br,t.x+t.width,t.y+t.height);let a=Math.max(0,t.width-Z*2),o=Math.max(0,t.height-Z*2);ga(r.t,t.x+Z,t.y,a),ga(r.b,t.x+Z,t.y+t.height,a),_a(r.l,t.x,t.y+Z,o),_a(r.r,t.x+t.width,t.y+Z,o)}function ha(e,t,n){e.style.left=`${t}px`,e.style.top=`${n}px`}function ga(e,t,n,r){e.style.left=`${t}px`,e.style.top=`${n}px`,e.style.width=`${r}px`}function _a(e,t,n,r){e.style.left=`${t}px`,e.style.top=`${n}px`,e.style.height=`${r}px`}function va(e,t,n,r,i){let a=Math.max(1,window.devicePixelRatio||1),o=Math.max(1,Math.round(n*a)),s=Math.max(1,Math.round(r*a));e.width!==o&&(e.width=o),e.height!==s&&(e.height=s),e.style.width=`${n}px`,e.style.height=`${r}px`;let c=e.getContext(`2d`);c&&(c.setTransform(a,0,0,a,0,0),c.clearRect(0,0,n,r),c.drawImage(t,i.displayRect.x,i.displayRect.y,i.displayRect.width,i.displayRect.height))}var ya=`rgba(0, 0, 0, 0.4)`,ba=`rgba(0, 0, 0, 0.45)`,xa=3,Sa=`rgba(255, 255, 255, 0.95)`,Ca=1,wa=`rgba(0, 0, 0, 0.25)`,Ta=2,Ea=`rgba(255, 255, 255, 0.55)`,Da=1;function Oa(e,t,n,r,i){let a=Math.max(1,window.devicePixelRatio||1),o=Math.max(1,Math.round(n*a)),s=Math.max(1,Math.round(r*a));e.width!==o&&(e.width=o),e.height!==s&&(e.height=s),e.style.width=`${n}px`,e.style.height=`${r}px`;let c=e.getContext(`2d`);if(!c)return;c.setTransform(a,0,0,a,0,0),c.clearRect(0,0,n,r);let l=m(t,i),u=i.displayRect;c.save(),c.fillStyle=ya,c.fillRect(u.x,u.y,u.width,u.height),c.globalCompositeOperation=`destination-out`,c.fillRect(l.x,l.y,l.width,l.height),c.restore();let d=l.x+.5,f=l.y+.5,p=l.width-1,h=l.height-1;c.strokeStyle=ba,c.lineWidth=xa,c.strokeRect(d,f,p,h),c.strokeStyle=Sa,c.lineWidth=Ca,c.strokeRect(d,f,p,h),ka(c,l,wa,Ta),ka(c,l,Ea,Da)}function ka(e,t,n,r){e.strokeStyle=n,e.lineWidth=r,e.beginPath();for(let n=1;n<3;n++){let r=t.x+t.width*n/3,i=t.y+t.height*n/3;e.moveTo(r,t.y),e.lineTo(r,t.y+t.height),e.moveTo(t.x,i),e.lineTo(t.x+t.width,i)}e.stroke()}function Aa(e,t,n){let r=document.createElement(`div`);r.className=`kalotyp-preset-row`,r.setAttribute(`role`,`radiogroup`),r.setAttribute(`aria-label`,`Crop aspect ratio`);let i=[];return e.forEach((e,a)=>{let[,o]=e,s=document.createElement(`button`);s.type=`button`,s.className=`kalotyp-preset-button`,s.textContent=o,s.setAttribute(`role`,`radio`),s.setAttribute(`aria-checked`,a===t?`true`:`false`),s.dataset.presetIndex=String(a),s.addEventListener(`click`,()=>n(a,e)),r.appendChild(s),i.push(s)}),{container:r,buttons:i}}function ja(e,t){e.forEach((e,n)=>{e.setAttribute(`aria-checked`,n===t?`true`:`false`)})}var Ma=[`tl`,`tr`,`bl`,`br`],Na=[`t`,`r`,`b`,`l`];function Pa(){let e=document.createElement(`div`);e.className=`kalotyp-stage-container`;let t=document.createElement(`canvas`);t.className=`kalotyp-stage-image`,t.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`canvas`);n.className=`kalotyp-stage-overlay`,n.setAttribute(`aria-hidden`,`true`);let r=document.createElement(`div`);r.className=`kalotyp-stage-body`;let i=document.createElement(`div`);i.className=`kalotyp-handles`,i.setAttribute(`role`,`group`),i.setAttribute(`aria-label`,`Crop region`);let a={};for(let e of Na){let t=Ia(e);a[e]=t,i.appendChild(t)}let o={};for(let e of Ma){let t=document.createElement(`div`);t.className=`kalotyp-corner-anchor`,t.dataset.direction=e;let n=Fa(e);t.appendChild(n),a[e]=n,o[e]=t,i.appendChild(t)}return e.appendChild(t),e.appendChild(n),e.appendChild(r),e.appendChild(i),{container:e,imageCanvas:t,overlayCanvas:n,handlesLayer:i,handles:a,cornerAnchors:o,bodyHitArea:r}}function Fa(e){let t=document.createElement(`button`);return t.type=`button`,t.className=`kalotyp-handle`,t.dataset.shape=`circle`,t.dataset.direction=e,t.setAttribute(`aria-label`,La(e)),t.tabIndex=0,t}function Ia(e){let t=document.createElement(`button`);return t.type=`button`,t.className=`kalotyp-handle`,t.dataset.shape=`edge`,t.dataset.direction=e,t.setAttribute(`aria-label`,La(e)),t.tabIndex=0,t}function La(e){switch(e){case`tl`:return`Top-left crop handle`;case`tr`:return`Top-right crop handle`;case`bl`:return`Bottom-left crop handle`;case`br`:return`Bottom-right crop handle`;case`t`:return`Top crop handle`;case`r`:return`Right crop handle`;case`b`:return`Bottom crop handle`;case`l`:return`Left crop handle`}}function Ra(e,t,n){let r=[];for(let i of Object.keys(e.handles)){let a=e.handles[i];r.push(za(a,i,t,n))}return r.push(Ba(e.bodyHitArea,t,n)),{destroy(){for(let e of r)e()}}}function za(e,t,n,r){return Va(e,()=>{let i=r.getViewport(),a=n.get(),o={x:0,y:0,width:a.imageSize.width,height:a.imageSize.height},s=a.aspectRatio;return{onMove(r){let c=p(Ha(e,r.clientX,r.clientY),i),l=gt(a.rect,t,c,{bounds:o,...s===void 0?{}:{aspectRatio:s}});n.set({rect:l})},onCommit(){r.onCommit?.()},onCancel(){n.set({rect:a.rect})}}})}function Ba(e,t,n){return Va(e,r=>{let i=n.getViewport(),a=t.get(),o={x:0,y:0,width:a.imageSize.width,height:a.imageSize.height},s=Ha(e,r.clientX,r.clientY);return{onMove(n){let r=Ha(e,n.clientX,n.clientY),c=(r.x-s.x)/i.scale,l=(r.y-s.y)/i.scale,u=x(a.rect,c,l,o);t.set({rect:u})},onCommit(){n.onCommit?.()},onCancel(){t.set({rect:a.rect})}}})}function Va(e,t){let n=n=>{if(n.button!==0)return;n.preventDefault(),n.stopPropagation();let r=t(n);e.setPointerCapture(n.pointerId);let i,a=!1,o=()=>{if(a=!1,!i)return;let e=i;i=void 0,r.onMove(e)},s=e=>{e.pointerId===n.pointerId&&(i={clientX:e.clientX,clientY:e.clientY},a||(a=!0,requestAnimationFrame(o)))},c=t=>{e.removeEventListener(`pointermove`,s),e.removeEventListener(`pointerup`,l),e.removeEventListener(`pointercancel`,u);try{e.releasePointerCapture(n.pointerId)}catch{}if(i){let e=i;i=void 0,r.onMove(e)}t?r.onCommit():r.onCancel()},l=e=>{e.pointerId===n.pointerId&&c(!0)},u=e=>{e.pointerId===n.pointerId&&c(!1)};e.addEventListener(`pointermove`,s),e.addEventListener(`pointerup`,l),e.addEventListener(`pointercancel`,u)};return e.addEventListener(`pointerdown`,n),()=>e.removeEventListener(`pointerdown`,n)}function Ha(e,t,n){let r=(e.closest(`.kalotyp-stage-container`)??e).getBoundingClientRect();return{x:t-r.left,y:n-r.top}}var Ua=32;function Wa(e){let{stageHost:t,utilHost:n,source:r,presets:i,presetFilter:a,store:o,viewport:s}=e,c=e.onCommit??qa,l=Pa();t.appendChild(l.container);let u=document.createElement(`div`);u.className=`kalotyp-crop-panel`;let f=ht(i,a),p=Aa(f,Ya(o.get(),i,f),(e,t)=>{let n=i.indexOf(t);if(n===-1)return;let r=yt(o.get(),n);o.set({rect:r.rect,aspectRatio:r.aspectRatio,activePresetIndex:n}),ja(p.buttons,e),c()});u.appendChild(p.container);let m=Ga({initial:o.get().rect,bounds:{width:r.width,height:r.height},onCommit(e){let t=o.get(),n=S(e,{x:0,y:0,width:t.imageSize.width,height:t.imageSize.height});o.set({rect:n}),c()}});u.appendChild(m.container),n.appendChild(u);let h=d({width:1,height:1,padding:Ua},{width:r.width,height:r.height});function g(){let e=l.container.getBoundingClientRect(),t={width:e.width,height:e.height,padding:Ua},n={width:r.width,height:r.height};h=s?s.computeViewport(t,n):d(t,n)}function _(){let e=l.container.getBoundingClientRect();e.width<=0||e.height<=0||(va(l.imageCanvas,r.bitmap,e.width,e.height,h),v())}function v(){let e=l.container.getBoundingClientRect();e.width<=0||e.height<=0||(Oa(l.overlayCanvas,o.get().rect,e.width,e.height,h),ma({cropRectImage:o.get().rect,viewport:h,cornerAnchors:l.cornerAnchors,edgeHandles:{t:l.handles.t,r:l.handles.r,b:l.handles.b,l:l.handles.l},bodyHitArea:l.bodyHitArea}))}g(),_();let y=new ResizeObserver(()=>{g(),_()});y.observe(l.container);let b=!1,x=s?.subscribe(()=>{b||(b=!0,requestAnimationFrame(()=>{b=!1,g(),_()}))}),C=!1,w=o.subscribe((e,t)=>{Xa(e,t,i,f,p.buttons),!Ja(e.rect,t.rect)&&(m.sync(e.rect),!C&&(C=!0,requestAnimationFrame(()=>{C=!1,v()})))}),T=Ra({stageElement:l.container,handles:l.handles,bodyHitArea:l.bodyHitArea},o,{getViewport:()=>h,onCommit:c});return{destroy(){T.destroy(),w(),x?.(),y.disconnect(),l.container.remove(),u.remove()}}}function Ga(e){let t=document.createElement(`div`);t.className=`kalotyp-crop-dims`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Crop region dimensions`);let n=Ka(`Left`,e.initial.x,0,e.bounds.width),r=Ka(`Top`,e.initial.y,0,e.bounds.height),i=Ka(`Width`,e.initial.width,1,e.bounds.width),a=Ka(`Height`,e.initial.height,1,e.bounds.height);function o(){return{x:Math.round(n.input.valueAsNumber),y:Math.round(r.input.valueAsNumber),width:Math.round(i.input.valueAsNumber),height:Math.round(a.input.valueAsNumber)}}for(let t of[n,r,i,a])t.input.addEventListener(`change`,()=>{let t=o();Number.isFinite(t.x+t.y+t.width+t.height)&&e.onCommit(t)});t.appendChild(n.wrapper),t.appendChild(r.wrapper),t.appendChild(i.wrapper),t.appendChild(a.wrapper);function s(e){n.input.valueAsNumber!==e.x&&(n.input.value=String(Math.round(e.x))),r.input.valueAsNumber!==e.y&&(r.input.value=String(Math.round(e.y))),i.input.valueAsNumber!==e.width&&(i.input.value=String(Math.round(e.width))),a.input.valueAsNumber!==e.height&&(a.input.value=String(Math.round(e.height)))}return{container:t,sync:s}}function Ka(e,t,n,r){let i=document.createElement(`label`);i.className=`kalotyp-crop-dims-field`;let a=document.createElement(`span`);a.className=`kalotyp-crop-dims-label`,a.textContent=e;let o=document.createElement(`input`);return o.type=`number`,o.className=`kalotyp-crop-dims-input`,o.min=String(n),o.max=String(r),o.step=`1`,o.value=String(Math.round(t)),o.inputMode=`numeric`,o.setAttribute(`aria-label`,`${e} (pixels)`),i.appendChild(a),i.appendChild(o),{wrapper:i,input:o}}function qa(){}function Ja(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ya(e,t,n){if(e.activePresetIndex===-1)return-1;let r=t[e.activePresetIndex];return r?n.indexOf(r):-1}function Xa(e,t,n,r,i){e.activePresetIndex!==t.activePresetIndex&&ja(i,Ya(e,n,r))}var Za=`crop`;function Qa(e){return{id:`crop`,init(t){return vt({imageSize:{width:t.source.width,height:t.source.height},presets:e.presets,filter:e.presetFilter})},mount(t,n,r){let i=Wa({stageHost:t,utilHost:e.panelHost,source:n.source,presets:e.presets,presetFilter:e.presetFilter,store:r,viewport:n.viewport,onCommit:()=>n.bus.emit(`commit`,{utility:Za})});return{destroy:()=>i.destroy()}},async bake(e,t){return ft(t,{rect:e.rect})}}}function $a(){let e=document.createElement(`div`);e.className=`kalotyp-stage-container kalotyp-preview-container`;let t=document.createElement(`canvas`);return t.className=`kalotyp-stage-image kalotyp-preview-canvas`,t.setAttribute(`aria-hidden`,`true`),e.appendChild(t),{container:e,canvas:t}}function eo(e,t,n){let r=e.getBoundingClientRect();if(r.width<=0||r.height<=0)return;let i={width:r.width,height:r.height,padding:32};return{viewport:n?n.computeViewport(i,t):d(i,t),stageWidth:r.width,stageHeight:r.height}}function to(e,t,n,r){let i=Math.max(1,window.devicePixelRatio||1),a=Math.max(1,Math.round(t*i)),o=Math.max(1,Math.round(n*i));e.width!==a&&(e.width=a),e.height!==o&&(e.height=o),e.style.width=`${t}px`,e.style.height=`${n}px`;let s=e.getContext(`2d`);s&&(s.setTransform(i,0,0,i,0,0),s.clearRect(0,0,t,n),s.imageSmoothingEnabled=!0,s.imageSmoothingQuality=`high`,r(s))}function no(e){let{canvas:t,sourceBitmap:n}=e,r;function i(e,i){if(e<=0||i<=0)return;let a=ro(t);if(!a)return;t.width=e,t.height=i,a.imageSmoothingEnabled=!0,a.imageSmoothingQuality=`high`,a.clearRect(0,0,e,i),a.drawImage(n,0,0,e,i);let o=a.getImageData(0,0,e,i);r={baseline:new Uint8ClampedArray(o.data),scratch:o.data,blurred:void 0,width:e,height:i}}function a(e){if(!r)return;let n=ro(t);if(!n)return;if(wt(e)){let e=new ImageData(new Uint8ClampedArray(r.baseline),r.width,r.height);n.putImageData(e,0,0);return}let i=Mt(e);if(Pt(r.baseline,r.scratch,i,e),e.clarity!==0){if(!r.blurred){let e=new Uint8ClampedArray(r.baseline.length),t=new Uint8ClampedArray(r.baseline.length);It(r.baseline,e,t,r.width,r.height),r.blurred=t}Ft(r.scratch,r.blurred,e.clarity)}let a=new ImageData(r.scratch,r.width,r.height);n.putImageData(a,0,0)}function o(){r=void 0}return{paint:a,rebuild:i,dispose:o}}function ro(e){return e.getContext(`2d`,{willReadFrequently:!0})}function io(e){if(e.width<=0||e.height<=0)return{width:80,height:60};let t=80/e.width,n=60/e.height,r=Math.min(t,n);return{width:Math.max(1,Math.floor(e.width*r)),height:Math.max(1,Math.floor(e.height*r))}}function ao(e){let{source:t,dims:n,dpr:r}=e,i=Math.max(1,Math.round(n.width*r)),a=Math.max(1,Math.round(n.height*r)),o=document.createElement(`canvas`);o.width=i,o.height=a;let s=o.getContext(`2d`,{willReadFrequently:!0});if(!s)return{get:()=>oo(n,r),dispose:()=>{}};s.imageSmoothingEnabled=!0,s.imageSmoothingQuality=`high`,s.drawImage(t,0,0,i,a);let c=s.getImageData(0,0,i,a),l={data:new Uint8ClampedArray(c.data),width:i,height:a},u=new Map;function d(e){let t=document.createElement(`canvas`);t.width=i,t.height=a,t.style.width=`${n.width}px`,t.style.height=`${n.height}px`;let r=t.getContext(`2d`);if(!r)return t;let o={data:new Uint8ClampedArray(l.data.length),width:i,height:a};return Lt(e.state,l,o),r.putImageData(new ImageData(o.data,i,a),0,0),t}return{get(e){let t=u.get(e.id);if(t)return t;let n=d(e);return u.set(e.id,n),n},dispose(){u.clear()}}}function oo(e,t){let n=document.createElement(`canvas`);return n.width=Math.max(1,Math.round(e.width*t)),n.height=Math.max(1,Math.round(e.height*t)),n.style.width=`${e.width}px`,n.style.height=`${e.height}px`,n}function so(e){let{stageHost:t,utilHost:n,source:r,store:i,viewport:a}=e,o=e.onCommit??lo,s=$a();t.appendChild(s.container);let c=no({canvas:s.canvas,sourceBitmap:r.bitmap}),l=io({width:r.width,height:r.height}),u=Math.max(1,window.devicePixelRatio||1),d=ao({source:r.bitmap,dims:l,dpr:u}),f=co({presets:kt,thumbnailCache:d,dims:l,onPresetClick:e=>{if(jt(i.get())?.id===e.id&&e.id!==`none`){i.update(()=>K),o();return}i.update(()=>e.state),o()}});n.appendChild(f.container);let p={width:0,height:0};function m(){let e=eo(s.container,{width:r.width,height:r.height},a);if(!e)return;let t=e.viewport.displayRect,n=Math.max(1,Math.round(t.width*u)),o=Math.max(1,Math.round(t.height*u));s.canvas.style.width=`${t.width}px`,s.canvas.style.height=`${t.height}px`,s.canvas.style.position=`absolute`,s.canvas.style.left=`${t.x}px`,s.canvas.style.top=`${t.y}px`,!(a?.getPinching()??!1)&&(p.width!==n||p.height!==o)&&(p={width:n,height:o},c.rebuild(n,o)),c.paint(i.get())}function h(e){let t=jt(e)?.id;f.setActive(t)}h(i.get()),m();let g=new ResizeObserver(()=>m());g.observe(s.container);let _=!1,v=a?.subscribe(()=>{_||(_=!0,requestAnimationFrame(()=>{_=!1,m()}))}),y=!1,b=i.subscribe(e=>{h(e),!y&&(y=!0,requestAnimationFrame(()=>{y=!1,c.paint(i.get())}))});return{destroy(){b(),v?.(),g.disconnect(),c.dispose(),d.dispose(),s.container.remove(),f.container.remove()}}}function co(e){let t=document.createElement(`div`);t.className=`kalotyp-filter-panel`,t.setAttribute(`role`,`radiogroup`),t.setAttribute(`aria-label`,`Filter presets`);let n=document.createElement(`div`);n.className=`kalotyp-filter-strip`,t.appendChild(n);let r=new Map;for(let t of e.presets){let i=document.createElement(`button`);i.type=`button`,i.className=`kalotyp-filter-thumb`,i.dataset.presetId=t.id,i.setAttribute(`role`,`radio`),i.setAttribute(`aria-checked`,`false`),i.setAttribute(`aria-label`,`${t.label} filter`),i.title=t.label;let a=document.createElement(`span`);a.className=`kalotyp-filter-thumb-image`,a.style.width=`${e.dims.width}px`,a.style.height=`${e.dims.height}px`;let o=e.thumbnailCache.get(t);o.classList.add(`kalotyp-filter-thumb-canvas`),a.appendChild(o);let s=document.createElement(`span`);s.className=`kalotyp-filter-thumb-check`,s.setAttribute(`aria-hidden`,`true`),s.innerHTML=`✓`,a.appendChild(s);let c=document.createElement(`span`);c.className=`kalotyp-filter-thumb-label`,c.textContent=t.label,i.appendChild(a),i.appendChild(c),i.addEventListener(`click`,()=>e.onPresetClick(t)),n.appendChild(i),r.set(t.id,i)}return{container:t,setActive(e){for(let[t,n]of r){let r=t===e;n.setAttribute(`aria-checked`,r?`true`:`false`),n.classList.toggle(`kalotyp-filter-thumb--active`,r)}}}}function lo(){}function uo(e){return{id:`filter`,init:()=>K,mount(t,n,r){let i=so({stageHost:t,utilHost:e.panelHost,source:n.source,store:r,viewport:n.viewport,onCommit:()=>n.bus.emit(`commit`,{utility:`filter`})});return{destroy:()=>i.destroy()}},bake:fo}}async function fo(e,t){return t}function po(e){let{stageHost:t,utilHost:n,source:r,store:i,viewport:a}=e,o=e.onCommit??go,s=$a();t.appendChild(s.container);let c=no({canvas:s.canvas,sourceBitmap:r.bitmap}),l=mo({onSliderInput:(e,t)=>i.set(Tt(i.get(),e,t)),onSliderCommit:()=>o(),onNumberCommit:(e,t)=>{i.set(Tt(i.get(),e,t)),o()},onRowReset:e=>{i.set(Et(i.get(),e)),o()},onResetAll:()=>{i.update(()=>Dt()),o()}});n.appendChild(l.container);let u={width:0,height:0};function d(){let e=eo(s.container,{width:r.width,height:r.height},a);if(!e)return;let t=e.viewport.displayRect,n=Math.max(1,window.devicePixelRatio||1),o=Math.max(1,Math.round(t.width*n)),l=Math.max(1,Math.round(t.height*n));s.canvas.style.width=`${t.width}px`,s.canvas.style.height=`${t.height}px`,s.canvas.style.position=`absolute`,s.canvas.style.left=`${t.x}px`,s.canvas.style.top=`${t.y}px`,!(a?.getPinching()??!1)&&(u.width!==o||u.height!==l)&&(u={width:o,height:l},c.rebuild(o,l)),c.paint(i.get())}function f(e){for(let t of St){let n=l.rows.get(t.key);if(!n)continue;let r=e[t.key];n.slider.valueAsNumber!==r&&(n.slider.valueAsNumber=r),Number.parseFloat(n.input.value||`0`)!==r&&(n.input.value=String(r))}}f(i.get()),d();let p=new ResizeObserver(()=>d());p.observe(s.container);let m=!1,h=a?.subscribe(()=>{m||(m=!0,requestAnimationFrame(()=>{m=!1,d()}))}),g=!1,_=i.subscribe(e=>{f(e),!g&&(g=!0,requestAnimationFrame(()=>{g=!1,c.paint(i.get())}))});return{destroy(){_(),h?.(),p.disconnect(),c.dispose(),s.container.remove(),l.container.remove()}}}function mo(e){let t=document.createElement(`div`);t.className=`kalotyp-finetune-panel`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Finetune adjustments`);let n=new Map;for(let r of St){let i=ho(r.key,r.label,e);n.set(r.key,i),t.appendChild(i.row)}let r=document.createElement(`button`);return r.type=`button`,r.className=`kalotyp-finetune-reset-all`,r.textContent=`Reset all`,r.title=`Reset every adjustment to 0`,r.addEventListener(`click`,e.onResetAll),t.appendChild(r),{container:t,rows:n,resetAllButton:r}}function ho(e,t,n){let r=document.createElement(`div`);r.className=`kalotyp-finetune-row`,r.dataset.adjustment=e;let i=document.createElement(`label`);i.className=`kalotyp-finetune-label`,i.textContent=t;let a=document.createElement(`input`);a.type=`range`,a.className=`kalotyp-finetune-slider`,a.min=String(xt),a.max=`100`,a.step=`1`,a.value=`0`,a.setAttribute(`aria-label`,`${t} adjustment`),a.addEventListener(`input`,()=>n.onSliderInput(e,a.valueAsNumber)),a.addEventListener(`change`,()=>n.onSliderCommit());let o=document.createElement(`input`);o.type=`number`,o.className=`kalotyp-finetune-input`,o.min=String(xt),o.max=`100`,o.step=`1`,o.value=`0`,o.inputMode=`numeric`,o.setAttribute(`aria-label`,`${t} value`),o.addEventListener(`change`,()=>{let t=o.valueAsNumber;Number.isFinite(t)&&n.onNumberCommit(e,t)});let s=document.createElement(`button`);return s.type=`button`,s.className=`kalotyp-finetune-row-reset`,s.setAttribute(`aria-label`,`Reset ${t}`),s.title=`Reset ${t}`,s.textContent=`↺`,s.addEventListener(`click`,()=>n.onRowReset(e)),r.appendChild(i),r.appendChild(a),r.appendChild(o),r.appendChild(s),{row:r,slider:a,input:o,resetButton:s}}function go(){}function _o(e){return{id:`finetune`,init:()=>Ct(),mount(t,n,r){let i=po({stageHost:t,utilHost:e.panelHost,source:n.source,store:r,viewport:n.viewport,onCommit:()=>n.bus.emit(`commit`,{utility:`finetune`})});return{destroy:()=>i.destroy()}},bake:Rt}}function vo(e){let{stageHost:t,utilHost:n,source:r,store:i,viewport:a}=e,o=e.onCommit??(()=>{}),s=$a();t.appendChild(s.container);let c=yo({onToggleHorizontal:()=>{i.set(Bt(i.get(),`horizontal`)),o()},onToggleVertical:()=>{i.set(Bt(i.get(),`vertical`)),o()}});n.appendChild(c.container);function l(){let e=eo(s.container,{width:r.width,height:r.height},a);if(!e)return;let t=i.get();to(s.canvas,e.stageWidth,e.stageHeight,n=>{let i=e.viewport.displayRect,a=t.horizontal?-1:1,o=t.vertical?-1:1,s=i.x+i.width/2,c=i.y+i.height/2;n.translate(s,c),n.scale(a,o),n.drawImage(r.bitmap,-i.width/2,-i.height/2,i.width,i.height)})}function u(e){c.horizontalButton.setAttribute(`aria-pressed`,e.horizontal?`true`:`false`),c.verticalButton.setAttribute(`aria-pressed`,e.vertical?`true`:`false`)}u(i.get()),l();let d=new ResizeObserver(()=>l());d.observe(s.container);let f=!1,p=a?.subscribe(()=>{f||(f=!0,requestAnimationFrame(()=>{f=!1,l()}))}),m=!1,h=i.subscribe(e=>{u(e),!m&&(m=!0,requestAnimationFrame(()=>{m=!1,l()}))});return{destroy(){h(),p?.(),d.disconnect(),s.container.remove(),c.container.remove()}}}function yo(e){let t=document.createElement(`div`);t.className=`kalotyp-flip-panel`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Flip`);let n=bo(`Flip horizontal`,Y(`flipHorizontal`),e.onToggleHorizontal);n.classList.add(`kalotyp-flip-button-h`);let r=bo(`Flip vertical`,Y(`flipVertical`),e.onToggleVertical);return r.classList.add(`kalotyp-flip-button-v`),t.appendChild(n),t.appendChild(r),{container:t,horizontalButton:n,verticalButton:r}}function bo(e,t,n){let r=document.createElement(`button`);return r.type=`button`,r.className=`kalotyp-toggle-button`,r.innerHTML=`${t}<span>${e}</span>`,r.setAttribute(`aria-pressed`,`false`),r.setAttribute(`aria-label`,e),r.addEventListener(`click`,n),r}function xo(e){return{id:`flip`,init:()=>zt(),mount(t,n,r){let i=vo({stageHost:t,utilHost:e.panelHost,source:n.source,store:r,viewport:n.viewport,onCommit:()=>n.bus.emit(`commit`,{utility:`flip`})});return{destroy:()=>i.destroy()}},bake:Ht}}var So=32;function Co(e){let{stageHost:t,utilHost:n,source:r,store:i,viewport:a}=e,o=e.onCommit??(()=>{}),s=document.createElement(`div`);s.className=`kalotyp-stage-container kalotyp-frame-preview-container`;let c=document.createElement(`canvas`);c.className=`kalotyp-stage-image kalotyp-frame-preview-canvas`,c.setAttribute(`aria-hidden`,`true`),s.appendChild(c),t.appendChild(s);let l=i.get(),u=document.createElement(`div`);u.className=`kalotyp-frame-panel`;let f=wo({presets:Ut,initialActiveId:l.presetId,labels:e.labels,source:r,initialState:l,onPresetClick:e=>{i.update(t=>qt(t,e.id)),o()}});u.appendChild(f.container);let p=To({initialColor:l.color,initialPresetId:l.presetId,onColorChange:e=>{i.update(t=>Jt(t,e)),o()}});u.appendChild(p.container),n.appendChild(u);let m=d({width:1,height:1,padding:So},{width:r.width,height:r.height});function h(){let e=s.getBoundingClientRect();if(e.width<=0||e.height<=0)return;let t={width:e.width,height:e.height,padding:So},n=sn(i.get().presetId,r.width,r.height);m=a?a.computeViewport(t,n):d(t,n)}function g(){let e=s.getBoundingClientRect();if(e.width<=0||e.height<=0)return;let t=Math.max(1,window.devicePixelRatio||1),n=Math.max(1,Math.round(e.width*t)),a=Math.max(1,Math.round(e.height*t));c.width!==n&&(c.width=n),c.height!==a&&(c.height=a),c.style.width=`${e.width}px`,c.style.height=`${e.height}px`;let o=c.getContext(`2d`);if(!o)return;o.setTransform(t,0,0,t,0,0),o.clearRect(0,0,e.width,e.height),o.imageSmoothingEnabled=!0,o.imageSmoothingQuality=`high`;let l=i.get(),u=sn(l.presetId,r.width,r.height),d=m.displayRect.x,f=m.displayRect.y,p=m.displayRect.width,h=m.displayRect.height;if(l.presetId===`polaroid`){o.fillStyle=l.color,o.fillRect(d,f,p,h);let e=r.width*(p/u.width),t=r.height*(h/u.height),n=Math.min(r.width,r.height),i=Math.round(n*.05),a=d+i*p/u.width,s=f+i*h/u.height;o.drawImage(r.bitmap,a,s,e,t)}else o.drawImage(r.bitmap,d,f,p,h),l.presetId!==`none`&&(o.save(),o.translate(d,f),Qt(o,l.presetId,l.color,p,h),o.restore())}h(),g();let _=new ResizeObserver(()=>{h(),g()});_.observe(s);let v=!1,y=a?.subscribe(()=>{v||(v=!0,requestAnimationFrame(()=>{v=!1,h(),g()}))}),b=!1,x=i.subscribe(e=>{f.setActive(e.presetId),p.setColor(e.color),p.setEnabled(e.presetId!==`none`),!b&&(b=!0,requestAnimationFrame(()=>{b=!1,h(),g()}))});return{destroy(){x(),y?.(),_.disconnect(),s.remove(),u.remove()}}}function wo(e){let t=document.createElement(`div`);t.className=`kalotyp-frame-strip-wrap`,t.setAttribute(`role`,`radiogroup`),t.setAttribute(`aria-label`,`Frame presets`);let n=document.createElement(`div`);n.className=`kalotyp-frame-strip`,t.appendChild(n);let r=new Map;for(let t of e.presets){let i=document.createElement(`button`);i.type=`button`,i.className=`kalotyp-frame-thumb`,i.dataset.presetId=t.id,i.setAttribute(`role`,`radio`),i.setAttribute(`aria-checked`,`false`);let a=e.labels?.[t.id]??t.label;i.setAttribute(`aria-label`,`${a} frame`),i.title=a;let o=document.createElement(`span`);o.className=`kalotyp-frame-thumb-image`;let s=Eo(t,e.source,e.initialState.color);s.classList.add(`kalotyp-frame-thumb-canvas`),o.appendChild(s);let c=document.createElement(`span`);c.className=`kalotyp-frame-thumb-check`,c.setAttribute(`aria-hidden`,`true`),c.innerHTML=`✓`,o.appendChild(c);let l=document.createElement(`span`);l.className=`kalotyp-frame-thumb-label`,l.textContent=a,i.appendChild(o),i.appendChild(l),i.addEventListener(`click`,()=>e.onPresetClick(t)),n.appendChild(i),r.set(t.id,i)}function i(e){for(let[t,n]of r){let r=t===e;n.setAttribute(`aria-checked`,r?`true`:`false`),n.classList.toggle(`kalotyp-frame-thumb--active`,r)}}return i(e.initialActiveId),{container:t,setActive:i}}function To(e){let t=document.createElement(`div`);t.className=`kalotyp-frame-color-row`;let n=document.createElement(`span`);n.className=`kalotyp-frame-color-label`,n.textContent=`Colour`;let r=document.createElement(`input`);r.type=`color`,r.className=`kalotyp-frame-color`,r.value=Do(e.initialColor),r.setAttribute(`aria-label`,`Frame colour (visual picker)`),r.addEventListener(`change`,()=>e.onColorChange(r.value));let i=document.createElement(`input`);i.type=`text`,i.className=`kalotyp-frame-hex`,i.value=Do(e.initialColor),i.maxLength=7,i.spellcheck=!1,i.autocomplete=`off`,i.setAttribute(`aria-label`,`Frame colour hex code`),i.setAttribute(`placeholder`,`#000000`),i.addEventListener(`change`,()=>{let t=Oo(i.value.trim());t?(i.value=t,e.onColorChange(t)):i.value=r.value});let a=document.createElement(`span`);a.className=`kalotyp-frame-color-hint`,a.textContent=`Pick a frame preset to choose a colour.`,a.setAttribute(`aria-live`,`polite`),t.appendChild(n),t.appendChild(r),t.appendChild(i),t.appendChild(a);function o(e){r.disabled=!e,i.disabled=!e,a.hidden=e}function s(e){let t=Do(e);r.value!==t&&(r.value=t),i.value.toLowerCase()!==t.toLowerCase()&&(i.value=t)}return o(e.initialPresetId!==`none`),{container:t,setColor:s,setEnabled:o}}function Eo(e,t,n){let r={width:80,height:60},i=sn(e.id,t.width,t.height),a=Math.min(r.width/i.width,r.height/i.height),o=Math.max(1,Math.floor(i.width*a)),s=Math.max(1,Math.floor(i.height*a)),c=Math.max(1,window.devicePixelRatio||1),l=document.createElement(`canvas`);l.width=Math.max(1,Math.round(o*c)),l.height=Math.max(1,Math.round(s*c)),l.style.width=`${o}px`,l.style.height=`${s}px`;let u=l.getContext(`2d`);if(!u)return l;if(u.setTransform(c,0,0,c,0,0),u.imageSmoothingEnabled=!0,u.imageSmoothingQuality=`high`,e.id===`polaroid`){u.fillStyle=n,u.fillRect(0,0,o,s);let e=Math.min(t.width,t.height),r=Math.round(e*.05/i.width*o),a=Math.round(e*.05/i.height*s),c=Math.round(t.width/i.width*o),l=Math.round(t.height/i.height*s);u.drawImage(t.bitmap,r,a,c,l)}else u.drawImage(t.bitmap,0,0,o,s),e.id!==`none`&&Qt(u,e.id,n,o,s);return l}function Do(e){if(/^#[0-9a-fA-F]{6}$/.test(e))return e;if(/^#[0-9a-fA-F]{3}$/.test(e)){let t=e[1],n=e[2],r=e[3];return`#${t}${t}${n}${n}${r}${r}`}return`#000000`}function Oo(e){let t=e.startsWith(`#`)?e.slice(1):e;if(/^[0-9a-fA-F]{6}$/.test(t))return`#${t.toLowerCase()}`;if(/^[0-9a-fA-F]{3}$/.test(t)){let e=t[0],n=t[1],r=t[2];return`#${e}${e}${n}${n}${r}${r}`.toLowerCase()}return null}function ko(e){return{id:`frame`,init:()=>Gt(),mount(t,n,r){let i=Co({stageHost:t,utilHost:e.panelHost,source:n.source,store:r,viewport:n.viewport,labels:e.labels,onCommit:()=>n.bus.emit(`commit`,{utility:`frame`})});return{destroy:()=>i.destroy()}},bake:(e,t)=>Xt(e,t)}}var Ao=[{id:`x`,label:`Left`},{id:`y`,label:`Top`},{id:`width`,label:`Width`,min:1},{id:`height`,label:`Height`,min:1}];function jo(e){let t=document.createElement(`div`);t.className=`kalotyp-redact-coords`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Selected redaction position`),t.hidden=!0;let n=null,r=new Map;for(let e of Ao){let n=document.createElement(`label`);n.className=`kalotyp-redact-coords-field`;let i=document.createElement(`span`);i.className=`kalotyp-redact-coords-label`,i.textContent=e.label;let o=document.createElement(`input`);o.type=`number`,o.className=`kalotyp-redact-coords-input`,o.dataset.field=e.id,o.step=`1`,o.inputMode=`numeric`,e.min!==void 0&&(o.min=String(e.min)),o.setAttribute(`aria-label`,`${e.label} (pixels)`),o.addEventListener(`change`,a),n.appendChild(i),n.appendChild(o),t.appendChild(n),r.set(e.id,o)}function i(e){let t=(e,t)=>{let n=r.get(e);if(!n)return;let i=String(Math.round(t));document.activeElement!==n&&n.value!==i&&(n.value=i)};t(`x`,e.x),t(`y`,e.y),t(`width`,e.width),t(`height`,e.height)}function a(){if(!n)return;let t=o(`x`),r=o(`y`),i=o(`width`),a=o(`height`);if(![t,r,i,a].every(Number.isFinite))return;let s={...n,x:t,y:r,width:i,height:a};s.x===n.x&&s.y===n.y&&s.width===n.width&&s.height===n.height||(n=s,e.onRegionChanged(s))}function o(e){let t=r.get(e);return t?Math.round(t.valueAsNumber):NaN}return{container:t,updateForRegion(e){if(!e){n=null,t.hidden=!0;return}n=e,i(e),t.hidden=!1},destroy(){t.replaceChildren(),r.clear(),t.remove()}}}var Mo=[{id:`pixelate`,label:`Pixelate`},{id:`blur`,label:`Blur`},{id:`solid`,label:`Solid fill`}];function No(e){let t=document.createElement(`div`);t.className=`kalotyp-redact-panel`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Redact`);let n=document.createElement(`div`);n.className=`kalotyp-redact-toolbar`,n.setAttribute(`role`,`radiogroup`),n.setAttribute(`aria-label`,`Redaction mode`);let r=new Map;for(let t of Mo){let i=document.createElement(`button`);i.type=`button`,i.className=`kalotyp-redact-mode`,i.dataset.mode=t.id,i.setAttribute(`role`,`radio`),i.setAttribute(`aria-checked`,t.id===e.initialMode?`true`:`false`),i.setAttribute(`aria-label`,`${t.label} redaction`),i.title=t.label,i.textContent=t.label,i.addEventListener(`click`,()=>e.onSelectMode(t.id)),n.appendChild(i),r.set(t.id,i)}let i=document.createElement(`div`);i.className=`kalotyp-redact-style-row`;let a=document.createElement(`input`);a.type=`color`,a.className=`kalotyp-redact-color`,a.value=Po(e.initialColor),a.setAttribute(`aria-label`,`Solid fill colour (visual picker)`),a.addEventListener(`change`,()=>e.onColorChange(a.value));let o=document.createElement(`input`);o.type=`text`,o.className=`kalotyp-redact-hex`,o.value=Po(e.initialColor),o.maxLength=7,o.spellcheck=!1,o.autocomplete=`off`,o.setAttribute(`aria-label`,`Solid fill hex code`),o.setAttribute(`placeholder`,`#000000`),o.addEventListener(`change`,()=>{let t=Fo(o.value.trim());t?(o.value=t,e.onColorChange(t)):o.value=a.value});let s=document.createElement(`button`);s.type=`button`,s.className=`kalotyp-redact-insert`,s.innerHTML=`${Y(`plus`)}<span>Insert at centre</span>`,s.setAttribute(`aria-label`,`Insert redaction region at image centre`),s.title=`Insert at centre`,s.addEventListener(`click`,()=>e.onInsertAtCenter());let c=document.createElement(`button`);c.type=`button`,c.className=`kalotyp-redact-delete`,c.innerHTML=`${Y(`delete`)}<span>Delete</span>`,c.setAttribute(`aria-label`,`Delete selected redaction region`),c.title=`Delete (Del)`,c.disabled=!e.canDelete,c.addEventListener(`click`,()=>e.onDeleteSelected());let l=document.createElement(`div`);l.className=`kalotyp-redact-color-group`,l.appendChild(a),l.appendChild(o);let u=document.createElement(`span`);u.className=`kalotyp-redact-color-hint`,u.textContent=`Colour applies to Solid fill only.`,u.setAttribute(`aria-live`,`polite`);let d=document.createElement(`div`);d.className=`kalotyp-redact-button-group`,d.appendChild(s),d.appendChild(c),i.appendChild(l),i.appendChild(u),i.appendChild(d),t.appendChild(n),t.appendChild(i),t.appendChild(e.coordInputs);function f(e){for(let[t,n]of r)n.setAttribute(`aria-checked`,t===e?`true`:`false`),n.classList.toggle(`kalotyp-redact-mode--active`,t===e);let t=e===`solid`;a.disabled=!t,o.disabled=!t,u.hidden=t}function p(e){let t=Po(e);a.value!==t&&(a.value=t),o.value.toLowerCase()!==t.toLowerCase()&&(o.value=t)}function m(e){c.disabled=!e}return f(e.initialMode),{container:t,modeButtons:r,colorInput:a,hexInput:o,insertButton:s,deleteButton:c,setActiveMode:f,setColor:p,setCanDelete:m}}function Po(e){if(/^#[0-9a-fA-F]{6}$/.test(e))return e;if(/^#[0-9a-fA-F]{3}$/.test(e)){let t=e[1],n=e[2],r=e[3];return`#${t}${t}${n}${n}${r}${r}`}return`#000000`}function Fo(e){let t=e.startsWith(`#`)?e.slice(1):e;if(/^[0-9a-fA-F]{6}$/.test(t))return`#${t.toLowerCase()}`;if(/^[0-9a-fA-F]{3}$/.test(t)){let e=t[0],n=t[1],r=t[2];return`#${e}${e}${n}${n}${r}${r}`.toLowerCase()}return null}function Io(e,t,n){let r=Math.max(1,window.devicePixelRatio||1),i=Math.max(1,Math.round(t*r)),a=Math.max(1,Math.round(n*r));e.width!==i&&(e.width=i),e.height!==a&&(e.height=a),e.style.width=`${t}px`,e.style.height=`${n}px`;let o=e.getContext(`2d`);return o?(o.setTransform(r,0,0,r,0,0),o.clearRect(0,0,t,n),o):null}function Lo(e,t,n,r,i){let a=Io(e,n,r);a&&(a.imageSmoothingEnabled=!0,a.imageSmoothingQuality=`high`,a.drawImage(t.bitmap,i.displayRect.x,i.displayRect.y,i.displayRect.width,i.displayRect.height))}function Ro(e,t,n,r,i,a,o){let s=Io(e,i,a);if(!s||n.length===0)return;let c=document.createElement(`canvas`),l=Math.max(1,Math.round(o.displayRect.width)),u=Math.max(1,Math.round(o.displayRect.height));c.width=l,c.height=u;let d=c.getContext(`2d`);if(d){d.imageSmoothingEnabled=!0,d.imageSmoothingQuality=`high`,d.drawImage(t.bitmap,0,0,l,u);for(let e of n)ln(d,c,{...e,x:e.x*o.scale,y:e.y*o.scale,width:e.width*o.scale,height:e.height*o.scale},{bitmap:c,width:l,height:u,mimeType:`image/png`});s.drawImage(c,o.displayRect.x,o.displayRect.y,l,u);for(let e of n){let t=o.displayRect.x+e.x*o.scale,n=o.displayRect.y+e.y*o.scale,i=e.width*o.scale,a=e.height*o.scale;s.save(),e.id===r?(s.strokeStyle=`rgba(99, 102, 241, 0.9)`,s.lineWidth=1.5):(s.strokeStyle=`rgba(255, 255, 255, 0.6)`,s.lineWidth=1),s.setLineDash([4,3]),s.strokeRect(t+.5,n+.5,Math.max(0,i-1),Math.max(0,a-1)),s.restore()}}}function zo(e,t,n,r,i){let a=Io(e,n,r);if(!a||!t)return;let o=i.displayRect.x+t.x*i.scale,s=i.displayRect.y+t.y*i.scale,c=t.width*i.scale,l=t.height*i.scale,u=o,d=s;c<0&&(u=o+c,c=-c),l<0&&(d=s+l,l=-l),a.save(),a.fillStyle=Bo(t.mode,t.color),a.fillRect(u,d,c,l),a.strokeStyle=`rgba(99, 102, 241, 0.95)`,a.lineWidth=1.5,a.setLineDash([4,3]),a.strokeRect(u+.75,d+.75,Math.max(0,c-1.5),Math.max(0,l-1.5)),a.restore()}function Bo(e,t){switch(e){case`solid`:return Vo(t,.7);case`pixelate`:return`rgba(120, 120, 120, 0.6)`;case`blur`:return`rgba(180, 200, 220, 0.45)`}}function Vo(e,t){let n=/^#([0-9a-fA-F]{6})$/.exec(e);if(!n)return e;let r=n[1];return r?`rgba(${Number.parseInt(r.slice(0,2),16)}, ${Number.parseInt(r.slice(2,4),16)}, ${Number.parseInt(r.slice(4,6),16)}, ${t})`:e}function Ho(e){let{host:t,store:n}=e,r=new Map,i=[];for(let e of $e){let n=document.createElement(`button`);n.type=`button`,n.className=`kalotyp-redact-handle`,n.dataset.direction=e,n.setAttribute(`aria-label`,Go(e)),n.tabIndex=-1,n.style.display=`none`,r.set(e,n),t.appendChild(n),i.push(ki(n,t=>s(e,t)))}function a(e,t){if(!e){for(let[,e]of r)e.style.display=`none`;return}let n=Uo({x:e.x,y:e.y,width:e.width,height:e.height});for(let e of $e){let i=r.get(e);if(!i)continue;let a=Wo(n[e],t);i.style.display=``,i.style.left=`${a.x}px`,i.style.top=`${a.y}px`}}function o(){for(let e of i)e();for(let[,e]of r)e.remove();r.clear()}function s(t,r){let i=J(n.get());return i?{onMove(r){let a=e.toImageSpace(r),o=tt({x:i.x,y:i.y,width:i.width,height:i.height},t,a);n.update(e=>q(e,{...i,x:o.x,y:o.y,width:o.width,height:o.height}))},onCommit(){let t=J(n.get());if(t&&(t.width<0||t.height<0)){let{x:e,y:r,width:i,height:a}=t;i<0&&(e+=i,i=-i),a<0&&(r+=a,a=-a),n.update(n=>q(n,{...t,x:e,y:r,width:i,height:a}))}e.commit()},onCancel(){n.update(e=>q(e,i))}}:null}return{update:a,destroy:o}}function Uo(e){let t=e.x,n=e.x+e.width,r=e.y,i=e.y+e.height,a=e.x+e.width/2,o=e.y+e.height/2;return{tl:{x:t,y:r},tr:{x:n,y:r},bl:{x:t,y:i},br:{x:n,y:i},t:{x:a,y:r},r:{x:n,y:o},b:{x:a,y:i},l:{x:t,y:o}}}function Wo(e,t){return{x:t.displayRect.x+e.x*t.scale,y:t.displayRect.y+e.y*t.scale}}function Go(e){switch(e){case`tl`:return`Resize from top-left`;case`tr`:return`Resize from top-right`;case`bl`:return`Resize from bottom-left`;case`br`:return`Resize from bottom-right`;case`t`:return`Resize from top`;case`r`:return`Resize from right`;case`b`:return`Resize from bottom`;case`l`:return`Resize from left`}}function Ko(){let e=document.createElement(`div`);e.className=`kalotyp-redact-stage`;let t=document.createElement(`canvas`);t.className=`kalotyp-redact-image`,t.setAttribute(`aria-hidden`,`true`);let n=document.createElement(`canvas`);n.className=`kalotyp-redact-regions`,n.setAttribute(`aria-hidden`,`true`);let r=document.createElement(`canvas`);r.className=`kalotyp-redact-live`,r.setAttribute(`aria-hidden`,`true`);let i=document.createElement(`div`);i.className=`kalotyp-redact-hit`,i.setAttribute(`role`,`presentation`);let a=document.createElement(`div`);return a.className=`kalotyp-redact-handles`,a.setAttribute(`role`,`group`),a.setAttribute(`aria-label`,`Selected redaction region`),e.appendChild(t),e.appendChild(n),e.appendChild(r),e.appendChild(i),e.appendChild(a),{container:e,imageCanvas:t,regionsCanvas:n,liveCanvas:r,hitArea:i,handlesLayer:a}}var qo=32;function Jo(e){let{stageHost:t,utilHost:n,source:r,store:i,viewport:a}=e,o=e.onCommit??(()=>{}),s=e.onAnnounce??(()=>{}),c=Dn(i.get(),{width:r.width,height:r.height});c!==i.get()&&i.update(()=>c);let l=Ko();t.appendChild(l.container);let u=d({width:1,height:1,padding:qo},{width:r.width,height:r.height}),f=null;function m(){let e=l.container.getBoundingClientRect(),t={width:e.width,height:e.height,padding:qo},n={width:r.width,height:r.height};u=a?a.computeViewport(t,n):d(t,n)}function h(){let e=l.container.getBoundingClientRect();e.width<=0||e.height<=0||Lo(l.imageCanvas,r,e.width,e.height,u)}function g(){let e=l.container.getBoundingClientRect();if(e.width<=0||e.height<=0)return;let t=i.get();Ro(l.regionsCanvas,r,t.regions,t.selectedId,e.width,e.height,u)}function _(){let e=l.container.getBoundingClientRect();e.width<=0||e.height<=0||zo(l.liveCanvas,f,e.width,e.height,u)}function v(){h(),g(),_(),x.update(J(i.get()),u)}function y(e){f=e,_()}function b(e){return p(Ai(l.container,e.clientX,e.clientY),u)}let x=Ho({host:l.handlesLayer,store:i,toImageSpace:b,getViewport:()=>u,commit:o}),S=ki(l.hitArea,e=>{let t=i.get(),n=b(e),r=Yo(t.regions,n);return r?(t.selectedId!==r.id&&i.update(e=>bn(e,r.id)),C(r,e)):w(t,e)});function C(e,t){let n=b(t);return{onMove(t){let r=b(t),a=r.x-n.x,o=r.y-n.y;i.update(t=>q(t,{...e,x:e.x+a,y:e.y+o}))},onCommit(){o()},onCancel(){i.update(t=>q(t,e))}}}function w(e,t){let n=b(t),r=n;return{onMove(t){let i=b(t);if(t.shiftKey){let e=i.x-n.x,t=i.y-n.y,a=Math.max(Math.abs(e),Math.abs(t)),o=e===0?1:Math.sign(e),s=t===0?1:Math.sign(t);r={x:n.x+o*a,y:n.y+s*a}}else r=i;y({x:n.x,y:n.y,width:r.x-n.x,height:r.y-n.y,mode:e.currentMode,color:e.currentColor})},onCommit(){y(null);let t=Tn({x:n.x,y:n.y,width:r.x-n.x,height:r.y-n.y});if(t.width<4||t.height<4)return;let{id:a,nextRegionNumber:s}=_n(e),c={id:a,x:t.x,y:t.y,width:t.width,height:t.height,mode:e.currentMode,color:e.currentColor};i.update(e=>({...vn(e,c),nextRegionNumber:s})),o()},onCancel(){y(null)}}}function T(){let e=i.get(),{id:t,nextRegionNumber:n}=_n(e),a=En({imageSize:{width:r.width,height:r.height},mode:e.currentMode,color:e.currentColor,id:t});i.update(e=>({...vn(e,a),nextRegionNumber:n})),s(`Redaction region placed at centre. Use arrow keys to nudge, or edit coordinates below.`),requestAnimationFrame(()=>{let e=E.container.querySelector(`.kalotyp-redact-coords-input`);e?.focus(),e?.select()}),o()}let E=jo({onRegionChanged:e=>{i.update(t=>q(t,e)),o()}}),D=i.get(),O=No({initialMode:D.currentMode,initialColor:D.currentColor,canDelete:D.selectedId!==null,coordInputs:E.container,onSelectMode:e=>{i.update(t=>{let n=xn(t,e);return n.selectedId===null?n:Cn(n,n.selectedId,e)}),o()},onColorChange:e=>{i.update(t=>{let n=Sn(t,e);return n.selectedId===null?n:wn(n,n.selectedId,e)}),o()},onInsertAtCenter:()=>T(),onDeleteSelected:()=>{let e=i.get().selectedId;e&&(i.update(t=>yn(t,e)),o())}});n.appendChild(O.container),m(),v();let k=new ResizeObserver(()=>{m(),v()});k.observe(l.container);let A=!1,ee=a?.subscribe(()=>{A||(A=!0,requestAnimationFrame(()=>{A=!1,m(),v()}))}),te=i.get().regions,j=i.get().selectedId,M=i.get().currentMode,N=i.get().currentColor,P=i.subscribe(e=>{let t=e.regions!==te,n=e.selectedId!==j;t&&(te=e.regions,g()),n&&(j=e.selectedId,O.setCanDelete(e.selectedId!==null)),e.currentMode!==M&&(M=e.currentMode,O.setActiveMode(e.currentMode)),e.currentColor!==N&&(N=e.currentColor,O.setColor(e.currentColor)),x.update(J(e),u),(n||t)&&E.updateForRegion(J(e))}),F=e=>{let t=e.target;if(Xo(t))return;let n=i.get();if(e.key===`Escape`){n.selectedId!==null&&(e.preventDefault(),e.stopPropagation(),i.update(e=>bn(e,null)),s(`Selection cleared.`));return}if(e.key===`Delete`||e.key===`Backspace`){if(n.selectedId===null)return;e.preventDefault();let t=n.selectedId;i.update(e=>yn(e,t)),o();return}if(e.key===`ArrowUp`||e.key===`ArrowDown`||e.key===`ArrowLeft`||e.key===`ArrowRight`){let t=J(n);if(!t||e.ctrlKey||e.altKey||e.metaKey)return;let r=e.shiftKey?10:1,a=e.key===`ArrowLeft`?-r:e.key===`ArrowRight`?r:0,s=e.key===`ArrowUp`?-r:e.key===`ArrowDown`?r:0;e.preventDefault(),i.update(e=>q(e,{...t,x:t.x+a,y:t.y+s})),o()}};return document.addEventListener(`keydown`,F,!0),{destroy(){document.removeEventListener(`keydown`,F,!0),S(),P(),ee?.(),k.disconnect(),E.destroy(),x.destroy(),l.container.remove(),O.container.remove()}}}function Yo(e,t){for(let n=e.length-1;n>=0;n--){let r=e[n];if(r&&t.x>=r.x&&t.x<=r.x+r.width&&t.y>=r.y&&t.y<=r.y+r.height)return r}}function Xo(e){if(!e)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`?!0:e.isContentEditable===!0}function Zo(e){return{id:`redact`,init:e=>gn({imageSize:{width:e.source.width,height:e.source.height}}),mount(t,n,r){let i=Jo({stageHost:t,utilHost:e.panelHost,source:n.source,store:r,viewport:n.viewport,onCommit:()=>n.bus.emit(`commit`,{utility:`redact`}),onAnnounce:e=>n.bus.emit(`announce`,{message:e})});return{destroy:()=>i.destroy()}},bake:(e,t)=>cn({regions:e.regions},t)}}function Qo(e){let{stageHost:t,utilHost:n,source:r,store:i,viewport:a}=e,o=e.onCommit??(()=>{}),s=$a();t.appendChild(s.container);let c={width:r.width,height:r.height},l=$o({upstream:c,onWidthChange:e=>{i.set(Nn(i.get(),e,c)),o()},onHeightChange:e=>{i.set(Pn(i.get(),e,c)),o()},onPercentChange:e=>{i.set(Fn(i.get(),e)),o()},onLockChange:e=>{i.set(In(i.get(),e)),o()}});n.appendChild(l.container);function u(){let e=eo(s.container,c,a);e&&to(s.canvas,e.stageWidth,e.stageHeight,t=>{let n=e.viewport.displayRect;t.drawImage(r.bitmap,n.x,n.y,n.width,n.height)})}function d(e){let t=Mn(e,c);l.widthInput.valueAsNumber!==t.width&&(l.widthInput.value=String(t.width)),l.heightInput.valueAsNumber!==t.height&&(l.heightInput.value=String(t.height));let n=(e.scaleX+e.scaleY)/2,r=Math.round(n*1e3)/10;Number.parseFloat(l.percentInput.value||`0`)!==r&&(l.percentInput.value=String(r)),l.lockButton.setAttribute(`aria-pressed`,e.lockAspect?`true`:`false`),l.lockButton.setAttribute(`aria-label`,e.lockAspect?`Aspect ratio locked — click to unlock`:`Aspect ratio unlocked — click to lock`),l.lockButton.title=e.lockAspect?`Aspect ratio locked`:`Aspect ratio unlocked`,l.lockButton.innerHTML=ts(e.lockAspect),l.summary.textContent=`${t.width} × ${t.height}px (from ${c.width} × ${c.height}px)`}d(i.get()),u();let f=new ResizeObserver(()=>u());f.observe(s.container);let p=!1,m=a?.subscribe(()=>{p||(p=!0,requestAnimationFrame(()=>{p=!1,u()}))}),h=i.subscribe(e=>{d(e)});return{destroy(){h(),m?.(),f.disconnect(),s.container.remove(),l.container.remove()}}}function $o(e){let t=document.createElement(`div`);t.className=`kalotyp-resize-panel`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Resize`);let n=es({label:`Width (px)`,min:1,max:kn,step:1,value:e.upstream.width,onChange:e.onWidthChange}),r=es({label:`Height (px)`,min:1,max:kn,step:1,value:e.upstream.height,onChange:e.onHeightChange}),i=es({label:`Scale (%)`,min:1,max:1e3,step:.1,value:100,onChange:e.onPercentChange}),a=document.createElement(`button`);a.type=`button`,a.className=`kalotyp-resize-lock`,a.setAttribute(`aria-pressed`,`true`),a.setAttribute(`aria-label`,`Lock aspect ratio`),a.title=`Lock aspect ratio`,a.innerHTML=ts(!0),a.addEventListener(`click`,()=>{let t=a.getAttribute(`aria-pressed`)!==`true`;e.onLockChange(t)});let o=document.createElement(`span`);o.className=`kalotyp-resize-summary`,o.setAttribute(`aria-live`,`polite`),o.textContent=`${e.upstream.width} × ${e.upstream.height}px`,t.title=`Maximum ${kn}px on either axis`;let s=document.createElement(`div`);s.className=`kalotyp-resize-row kalotyp-resize-dims`,s.appendChild(n.wrapper),s.appendChild(a),s.appendChild(r.wrapper);let c=document.createElement(`div`);return c.className=`kalotyp-resize-row`,c.appendChild(i.wrapper),c.appendChild(o),t.appendChild(s),t.appendChild(c),{container:t,widthInput:n.input,heightInput:r.input,percentInput:i.input,lockButton:a,summary:o}}function es(e){let t=document.createElement(`label`);t.className=`kalotyp-resize-field`;let n=document.createElement(`span`);n.className=`kalotyp-resize-field-label`,n.textContent=e.label;let r=document.createElement(`input`);return r.type=`number`,r.className=`kalotyp-resize-input`,r.min=String(e.min),r.max=String(e.max),r.step=String(e.step),r.value=String(e.value),r.inputMode=`numeric`,r.setAttribute(`aria-label`,e.label),r.addEventListener(`change`,()=>{let t=r.valueAsNumber;Number.isFinite(t)&&e.onChange(t)}),t.appendChild(n),t.appendChild(r),{wrapper:t,input:r}}function ts(e){return Y(e?`lockClosed`:`lockOpen`)}function ns(e){return{id:`resize`,init:()=>An(),mount(t,n,r){let i=Qo({stageHost:t,utilHost:e.panelHost,source:n.source,store:r,viewport:n.viewport,onCommit:()=>n.bus.emit(`commit`,{utility:`resize`})});return{destroy:()=>i.destroy()}},bake:zn}}var rs=`rgba(0, 0, 0, 0.4)`,is=`rgba(255, 255, 255, 0.95)`,as=`rgba(0, 0, 0, 0.45)`;function os(e){let{stageHost:t,utilHost:n,source:r,store:i,viewport:a}=e,o=e.onCommit??ls,s=$a();t.appendChild(s.container);let c=ss({onCounterClockwise:()=>{i.set(qn(i.get())),o()},onClockwise:()=>{i.set(Kn(i.get())),o()},onAngleInput:e=>i.set(Jn(i.get(),e)),onAngleCommit:()=>o(),onAngleReset:()=>{i.set(Jn(i.get(),0)),o()}});n.appendChild(c.container);function l(){let e=s.container.getBoundingClientRect();if(e.width<=0||e.height<=0)return;let t=i.get(),n=Xn(t)*Math.PI/180,o=Xn(t)-t.quarterTurns*90,c=Math.abs(o)<1e-6,l=Math.abs(Math.cos(n)),u=Math.abs(Math.sin(n)),f=r.width*l+r.height*u,p=r.width*u+r.height*l,m={width:e.width,height:e.height,padding:32},h={width:f,height:p},g=a?a.computeViewport(m,h):d(m,h),_=g.displayRect,v=_.x+_.width/2,y=_.y+_.height/2,b=c?t.quarterTurns%2==0?{width:r.width,height:r.height}:{width:r.height,height:r.width}:Hn(r,n);to(s.canvas,e.width,e.height,t=>{let i=r.width*g.scale,a=r.height*g.scale;t.save(),t.translate(v,y),t.rotate(n),t.drawImage(r.bitmap,-i/2,-a/2,i,a),t.restore();let o=b.width*g.scale,s=b.height*g.scale,l=v-o/2,u=y-s/2;c||(t.save(),t.beginPath(),t.rect(0,0,e.width,e.height),t.rect(l,u,o,s),t.clip(`evenodd`),t.fillStyle=rs,t.fillRect(0,0,e.width,e.height),t.restore()),t.save(),t.lineWidth=3,t.strokeStyle=as,t.strokeRect(l+.5,u+.5,o-1,s-1),t.lineWidth=1,t.strokeStyle=is,t.strokeRect(l+.5,u+.5,o-1,s-1),t.restore()})}function u(e){c.angleSlider.valueAsNumber!==e.freeAngle&&(c.angleSlider.valueAsNumber=e.freeAngle);let t=cs(e.freeAngle);c.angleInput.value!==t&&(c.angleInput.value=t)}u(i.get()),l();let f=new ResizeObserver(()=>l());f.observe(s.container);let p=!1,m=a?.subscribe(()=>{p||(p=!0,requestAnimationFrame(()=>{p=!1,l()}))}),h=!1,g=i.subscribe(e=>{u(e),!h&&(h=!0,requestAnimationFrame(()=>{h=!1,l()}))});return{destroy(){g(),m?.(),f.disconnect(),s.container.remove(),c.container.remove()}}}function ss(e){let t=document.createElement(`div`);t.className=`kalotyp-rotate-panel`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Rotate`);let n=us(`Rotate 90° counter-clockwise`,`↺`,e.onCounterClockwise),r=us(`Rotate 90° clockwise`,`↻`,e.onClockwise),i=document.createElement(`label`);i.className=`kalotyp-rotate-slider-label`,i.textContent=`Straighten`;let a=document.createElement(`input`);a.type=`range`,a.className=`kalotyp-rotate-slider`,a.min=`-45`,a.max=`45`,a.step=String(Wn),a.value=`0`,a.setAttribute(`aria-label`,`Straighten angle`),a.addEventListener(`input`,()=>e.onAngleInput(a.valueAsNumber)),a.addEventListener(`change`,()=>e.onAngleCommit());let o=document.createElement(`input`);o.type=`number`,o.className=`kalotyp-rotate-input`,o.min=`-45`,o.max=`45`,o.step=String(Wn),o.value=`0`,o.setAttribute(`aria-label`,`Straighten angle in degrees`),o.addEventListener(`change`,()=>{let t=o.valueAsNumber;Number.isFinite(t)&&(e.onAngleInput(t),e.onAngleCommit())});let s=document.createElement(`span`);s.className=`kalotyp-rotate-suffix`,s.setAttribute(`aria-hidden`,`true`),s.textContent=`°`;let c=document.createElement(`button`);c.type=`button`,c.className=`kalotyp-rotate-reset`,c.textContent=`Reset`,c.addEventListener(`click`,e.onAngleReset);let l=document.createElement(`div`);l.className=`kalotyp-rotate-row`,l.appendChild(n),l.appendChild(r);let u=document.createElement(`span`);u.className=`kalotyp-rotate-input-group`,u.appendChild(o),u.appendChild(s);let d=document.createElement(`div`);return d.className=`kalotyp-rotate-row kalotyp-rotate-slider-row`,d.appendChild(i),d.appendChild(a),d.appendChild(u),d.appendChild(c),t.appendChild(l),t.appendChild(d),{container:t,angleSlider:a,angleInput:o}}function cs(e){let t=Math.round(e*10)/10;return Number.isInteger(t)?String(t):t.toFixed(1)}function ls(){}function us(e,t,n){let r=document.createElement(`button`);return r.type=`button`,r.className=`kalotyp-quarter-button`,r.setAttribute(`aria-label`,e),r.title=e,r.textContent=t,r.addEventListener(`click`,n),r}function ds(e){return{id:`rotate`,init:()=>Gn(),mount(t,n,r){let i=os({stageHost:t,utilHost:e.panelHost,source:n.source,store:r,viewport:n.viewport,onCommit:()=>n.bus.emit(`commit`,{utility:`rotate`})});return{destroy:()=>i.destroy()}},bake:Qn}}var Q={outputMimeChoice:`auto`,outputQuality:.85,outputStripMetadata:!0,rememberAnnotationStyle:!0,rememberFilter:!0,rememberFrame:!0,lastAnnotationColor:`#ff3b30`,lastAnnotationStrokeWidth:4,lastFilterPresetId:null,lastFramePresetId:null,lastFrameColor:`#000000`},fs=`kalotyp:prefs:v1`;function ps(e){if(typeof e==`string`)try{let t=new URL(e),n=t.pathname,r=n.indexOf(`/content/`),i=r===-1?``:n.slice(0,r);return`${t.origin}${i}`}catch{}return typeof window<`u`?window.location.origin:`default`}function ms(e){return`${fs}:${e}`}function hs(e){try{if(typeof localStorage>`u`)return Q;let t=localStorage.getItem(ms(e));return t?_s(JSON.parse(t)):Q}catch{return Q}}function gs(e,t){try{if(typeof localStorage>`u`)return;let n=_s(t);localStorage.setItem(ms(e),JSON.stringify(n))}catch{}}function _s(e){return{outputMimeChoice:vs(e.outputMimeChoice)?e.outputMimeChoice:Q.outputMimeChoice,outputQuality:ys(e.outputQuality,0,1,Q.outputQuality),outputStripMetadata:typeof e.outputStripMetadata==`boolean`?e.outputStripMetadata:Q.outputStripMetadata,rememberAnnotationStyle:typeof e.rememberAnnotationStyle==`boolean`?e.rememberAnnotationStyle:Q.rememberAnnotationStyle,rememberFilter:typeof e.rememberFilter==`boolean`?e.rememberFilter:Q.rememberFilter,rememberFrame:typeof e.rememberFrame==`boolean`?e.rememberFrame:Q.rememberFrame,lastAnnotationColor:typeof e.lastAnnotationColor==`string`?e.lastAnnotationColor:Q.lastAnnotationColor,lastAnnotationStrokeWidth:ys(e.lastAnnotationStrokeWidth,1,40,Q.lastAnnotationStrokeWidth),lastFilterPresetId:e.lastFilterPresetId===null||typeof e.lastFilterPresetId==`string`?e.lastFilterPresetId:Q.lastFilterPresetId,lastFramePresetId:e.lastFramePresetId===null||typeof e.lastFramePresetId==`string`?e.lastFramePresetId:Q.lastFramePresetId,lastFrameColor:typeof e.lastFrameColor==`string`?e.lastFrameColor:Q.lastFrameColor}}function vs(e){return e===`auto`||e===`image/png`||e===`image/jpeg`||e===`image/webp`||e===`image/avif`}function ys(e,t,n,r){return typeof e!=`number`||!Number.isFinite(e)?r:e<t?t:e>n?n:e}var bs=[{value:`auto`,label:`Auto (recommended)`},{value:`image/webp`,label:`WebP`},{value:`image/avif`,label:`AVIF`},{value:`image/jpeg`,label:`JPEG`},{value:`image/png`,label:`PNG`}];function xs(e){let t=e.initial;function n(n){t={...t,...n},e.onChange(t)}let r=document.createElement(`div`);r.className=`kalotyp-preferences-body`;let i=document.createElement(`section`);i.className=`kalotyp-preferences-section`,i.innerHTML=`<h4>Output defaults</h4>`;let a=Ss(`Format`),o=document.createElement(`select`);o.className=`kalotyp-output-format`,o.setAttribute(`aria-label`,`Default output format`);for(let e of bs){let t=document.createElement(`option`);t.value=e.value,t.textContent=e.label,o.appendChild(t)}o.value=t.outputMimeChoice,o.addEventListener(`change`,()=>{n({outputMimeChoice:o.value})}),a.appendChild(o),i.appendChild(a);let s=Ss(`Quality`),c=document.createElement(`input`);c.type=`range`,c.className=`kalotyp-output-quality`,c.min=`50`,c.max=`100`,c.step=`1`,c.value=String(Math.round(t.outputQuality*100)),c.setAttribute(`aria-label`,`Default output quality`),c.addEventListener(`input`,()=>{n({outputQuality:c.valueAsNumber/100}),l.textContent=String(c.valueAsNumber)});let l=document.createElement(`span`);l.className=`kalotyp-output-quality-readout`,l.textContent=String(Math.round(t.outputQuality*100)),l.setAttribute(`aria-hidden`,`true`),s.appendChild(c),s.appendChild(l),i.appendChild(s);let u=Cs(`Strip EXIF, GPS, and camera metadata on save`,t.outputStripMetadata,e=>n({outputStripMetadata:e}));i.appendChild(u);let d=document.createElement(`section`);d.className=`kalotyp-preferences-section`,d.innerHTML=`<h4>Remember across sessions</h4>`;let f=Cs(`Annotation style (colour + stroke width)`,t.rememberAnnotationStyle,e=>n({rememberAnnotationStyle:e})),p=Cs(`Last filter preset`,t.rememberFilter,e=>n({rememberFilter:e})),m=Cs(`Last frame preset`,t.rememberFrame,e=>n({rememberFrame:e}));d.appendChild(f),d.appendChild(p),d.appendChild(m);let h=document.createElement(`footer`);h.className=`kalotyp-preferences-footer`;let g=document.createElement(`button`);g.type=`button`,g.className=`kalotyp-preferences-reset`,g.textContent=`Reset to defaults`,g.addEventListener(`click`,()=>{t={...Q},e.onChange(t),y(t)});let _=document.createElement(`button`);_.type=`button`,_.className=`kalotyp-preferences-done`,_.textContent=`Done`,_.addEventListener(`click`,()=>v.close()),h.appendChild(g),h.appendChild(_),r.appendChild(i),r.appendChild(d),r.appendChild(h);let v=rr({host:e.host,title:`Preferences`,body:r,variant:`kalotyp-preferences-modal`,showCloseButton:!0,onClose:e.onClose});function y(e){o.value=e.outputMimeChoice,c.value=String(Math.round(e.outputQuality*100)),l.textContent=String(Math.round(e.outputQuality*100)),ws(u,e.outputStripMetadata),ws(f,e.rememberAnnotationStyle),ws(p,e.rememberFilter),ws(m,e.rememberFrame)}return{close:()=>v.close()}}function Ss(e){let t=document.createElement(`div`);t.className=`kalotyp-output-row`;let n=document.createElement(`span`);return n.className=`kalotyp-output-row-label`,n.textContent=e,t.appendChild(n),t}function Cs(e,t,n){let r=document.createElement(`label`);r.className=`kalotyp-preferences-toggle`;let i=document.createElement(`input`);i.type=`checkbox`,i.checked=t,i.addEventListener(`change`,()=>n(i.checked));let a=document.createElement(`span`);return a.textContent=e,r.appendChild(i),r.appendChild(a),r}function ws(e,t){let n=e.querySelector(`input[type="checkbox"]`);n&&n.checked!==t&&(n.checked=t)}var Ts=0;function Es(e){let t=`kalotyp-editor-${++Ts}`,n=`${t}-title`,r=document.createElement(`div`);r.className=`pintura-editor kalotyp-editor`,r.id=t,r.setAttribute(`role`,`dialog`),r.setAttribute(`aria-modal`,`true`),r.setAttribute(`aria-labelledby`,n),r.tabIndex=-1;let i=document.createElement(`h2`);i.id=n,i.className=`kalotyp-visually-hidden`,i.textContent=`Image editor`;let a=document.createElement(`div`);a.className=`PinturaModal kalotyp-modal`;let o=document.createElement(`button`);o.type=`button`,o.title=`Close`,o.setAttribute(`aria-label`,`Close image editor`),o.className=`kalotyp-button-close`,o.innerHTML=Y(`close`);let s=document.createElement(`button`);s.type=`button`,s.title=`Preferences`,s.setAttribute(`aria-label`,`Open editor preferences`),s.setAttribute(`aria-haspopup`,`dialog`),s.className=`kalotyp-button-prefs`,s.innerHTML=Y(`settings`);let c=document.createElement(`div`);c.className=`kalotyp-root`,c.setAttribute(`data-env`,`landscape has-navigation`);let l=document.createElement(`div`);l.className=`kalotyp-main`;let u=document.createElement(`div`);u.className=`kalotyp-stage`,u.setAttribute(`role`,`region`),u.setAttribute(`aria-label`,`Image preview`);let d=document.createElement(`div`);d.id=`${t}-panel`,d.className=`kalotyp-util-main`,d.setAttribute(`role`,`tabpanel`),d.setAttribute(`tabindex`,`0`);let f=document.createElement(`div`);f.className=`kalotyp-nav-tools`;let p=document.createElement(`div`);p.className=`kalotyp-util-footer`;let m=document.createElement(`div`);m.className=`kalotyp-export-group`;let h=document.createElement(`button`);h.type=`button`,h.className=`kalotyp-button-export`;let g=document.createElement(`span`);g.className=`kalotyp-button-inner`,g.textContent=e.exportLabel,h.appendChild(g);let _=document.createElement(`button`);_.type=`button`,_.className=`kalotyp-button-output-settings`,_.title=`Output settings`,_.setAttribute(`aria-label`,`Output settings (format and quality)`),_.setAttribute(`aria-haspopup`,`dialog`),_.setAttribute(`aria-expanded`,`false`),_.innerHTML=Y(`chevronDown`),m.appendChild(h),m.appendChild(_),p.appendChild(m);let v=document.createElement(`div`);return v.className=`kalotyp-visually-hidden`,v.setAttribute(`role`,`status`),v.setAttribute(`aria-live`,`polite`),v.setAttribute(`aria-atomic`,`true`),l.appendChild(u),l.appendChild(d),c.appendChild(f),c.appendChild(l),c.appendChild(p),a.appendChild(i),a.appendChild(s),a.appendChild(o),a.appendChild(c),a.appendChild(v),r.appendChild(a),{editor:r,modal:a,root:c,main:l,stage:u,navTools:f,utilMain:d,utilFooter:p,closeButton:o,prefsButton:s,exportButton:h,outputSettingsButton:_,liveRegion:v,titleId:n}}function Ds(e){let t=Es({exportLabel:e.exportLabel}),n=()=>e.onExportClick(),r=()=>e.onCloseClick(),i=()=>e.onOutputSettingsClick(),a=()=>e.onPrefsClick();t.exportButton.addEventListener(`click`,n),t.closeButton.addEventListener(`click`,r),t.outputSettingsButton.addEventListener(`click`,i),t.prefsButton.addEventListener(`click`,a),e.host.appendChild(t.editor);let o=!1;function s(e){o=!o,t.liveRegion.textContent=o?`${e} `:e}return{editor:t.editor,modal:t.modal,root:t.root,exportButton:t.exportButton,outputSettingsButton:t.outputSettingsButton,prefsButton:t.prefsButton,closeButton:t.closeButton,stage:t.stage,utilMain:t.utilMain,navTools:t.navTools,announce:s,destroy(){t.exportButton.removeEventListener(`click`,n),t.closeButton.removeEventListener(`click`,r),t.outputSettingsButton.removeEventListener(`click`,i),t.prefsButton.removeEventListener(`click`,a),t.editor.remove()}}}var Os=[[void 0,`Custom`],[1,`Square`],[2,`2:1`],[1.5,`3:2`],[4/3,`4:3`],[1.6,`16:10`],[16/9,`16:9`],[.5,`1:2`],[2/3,`2:3`],[.75,`3:4`],[10/16,`10:16`],[9/16,`9:16`]];async function ks(e){return e instanceof File?e:e instanceof Blob?new File([e],`kalotyp-image.png`,{type:e.type||`image/png`}):As(e)}async function As(e){let t=new URL(e,typeof window<`u`?window.location.href:`http://localhost`),n=await fetch(t.href,{credentials:`omit`,mode:`cors`});if(!n.ok)throw Error(`Source fetch failed: ${n.status} ${n.statusText}`);let r=await n.blob(),i=js(t,r.type);return new File([r],i,{type:r.type||`application/octet-stream`})}function js(e,t){let n=e.pathname.split(`/`).pop();return n&&/\.[a-z0-9]{2,5}$/i.test(n)?n:`kalotyp-image.${t.split(`/`)[1]??`bin`}`}var Ms={sourceToFile:ks,loadImage:s,encodeSourceImage:oe,createCropPlugin:Qa,createRotatePlugin:ds,createFlipPlugin:xo,createFinetunePlugin:_o,createFilterPlugin:uo,createAnnotatePlugin:pa,createRedactPlugin:Zo,createResizePlugin:ns,createFramePlugin:ko,runUtilityChain:de},Ns=[{id:`crop`,label:`Crop`},{id:`rotate`,label:`Rotate`},{id:`flip`,label:`Flip`},{id:`filter`,label:`Filter`},{id:`finetune`,label:`Finetune`},{id:`annotate`,label:`Annotate`},{id:`redact`,label:`Redact`},{id:`resize`,label:`Resize`},{id:`frame`,label:`Frame`}];function Ps(e,t=Ms){let n=new b,r=new b,i=new g,a=Ws(e),o=document.createElement(`div`);o.dataset.kalotypHost=``,document.body.appendChild(o);let s=!1,c=!1,l=ps(e.src),u=hs(l),d;function f(){d!==void 0&&clearTimeout(d),d=setTimeout(()=>{d=void 0,gs(l,u)},250)}function p(e){u={...u,...e},f()}let m=$n({mimeChoice:u.outputMimeChoice,quality:u.outputQuality,stripMetadata:u.outputStripMetadata});m.subscribe(e=>{p({outputMimeChoice:e.mimeChoice,outputQuality:e.quality,outputStripMetadata:e.stripMetadata})});let h=null,_=null,v=null,y={slots:new Map,sourceImage:void 0,sourceName:void 0,sourceFile:void 0,active:void 0,statusElement:void 0,history:void 0,committedChain:[],workingImage:void 0},x=Ds({host:o,exportLabel:a,onExportClick:()=>{R()},onCloseClick:()=>{A()},onOutputSettingsClick:()=>{ne()},onPrefsClick:()=>{L()}}),S=Vs(e),C=ur(Ns,S,e=>{ee(e)},{panelId:x.utilMain.id});for(let e of C.buttons.values())e.disabled=!0;x.navTools.appendChild(C.container);let w=qs({onUndo:()=>M(),onRedo:()=>N()});w.undoButton.disabled=!0,w.redoButton.disabled=!0,x.modal.appendChild(w.container),x.exportButton.disabled=!0,Hs(x.stage,`Loading image…`,y);let T=pr({host:x.editor,initialFocus:x.editor});x.announce(`Image editor opened. Use Tab to navigate.`),Fs(x,e,y,t,C,S,r,i).then(()=>{x.exportButton.disabled=!1;for(let e of C.buttons.values())e.disabled=!1;Us(y),j(),Gs(y,u,p);let e=y.sourceImage?.width??0,t=y.sourceImage?.height??0;x.announce(`Image loaded. ${e} by ${t} pixels.`)},e=>{let t=e instanceof Error?e.message:`Failed to load image`;n.emit(`loaderror`,{message:t,cause:e}),Hs(x.stage,t,y),x.announce(`Failed to load image. ${t}`)});let E=r.on(`commit`,()=>{c||y.history&&(y.history.commit(Ls(y)),j())}),D=r.on(`announce`,({message:e})=>{x.announce(e)}),O=Js({onUndo:()=>M(),onRedo:()=>N(),onEscape:()=>k(),onCheatsheet:()=>I()});function k(){re||(y.history?.canUndo()??!1)&&!window.confirm(`You have unsaved changes. Discard them and close?`)||A()}function A(){let t=e.willClose;return!t||t()?(ie(),!0):!1}async function ee(e){if(!y.sourceImage||y.active?.id===e)return;let t=y.slots.get(e);if(!t)return;te()&&await zs(y,r,i),y.active?.handle.destroy(),y.active=void 0,dr(C,e,x.utilMain),i.resetPan();let n={source:y.workingImage??y.sourceImage,bus:r,viewport:i};y.active={id:e,handle:t.plugin.mount(x.stage,n,t.store)},y.history&&(y.history.commit(Ls(y)),j())}function te(){if(!y.active)return!1;let e=y.active.id,t=e===`filter`?`finetune`:e,n=y.slots.get(t);return n?!Rs(t,n.store.get()):!1}function j(){w.undoButton.disabled=!y.history?.canUndo(),w.redoButton.disabled=!y.history?.canRedo()}function M(){if(!y.history)return;let e=y.history.undo(Ls(y));e&&P(e)}function N(){if(!y.history)return;let e=y.history.redo(Ls(y));e&&P(e)}async function P(e){c=!0;try{let n=e.snapshot.get(Is);n!==void 0&&(y.committedChain=n.map(e=>({id:e.id,state:e.state})),await Bs(y,t));for(let[t,n]of e.snapshot){if(t===Is)continue;let e=y.slots.get(t);e&&e.store.update(()=>n)}}finally{c=!1}j();let n=y.active?.id;if(n){let e=y.slots.get(n);if(e&&y.workingImage){y.active?.handle.destroy();let t={source:y.workingImage,bus:r,viewport:i};y.active={id:n,handle:e.plugin.mount(x.stage,t,e.store)}}}if(n&&e.changed.has(n))return;let a=F(e.changed);a&&a!==n&&await ee(a)}function F(e){for(let t of Ns)if(e.has(t.id))return t.id}function ne(){if(h){h.close();return}h=Gr({host:x.editor,anchor:x.outputSettingsButton,store:m,canSave:()=>!s&&!x.exportButton.disabled,onSaveAndClose:()=>{h?.close(),R()},onClose:()=>{h=null}})}function I(){if(v){v.close();return}v=cr({host:x.editor,onClose:()=>{v=null}})}function L(){if(_){_.close();return}_=xs({host:x.editor,initial:u,onChange:e=>{u=e,m.set({mimeChoice:e.outputMimeChoice,quality:e.outputQuality,stripMetadata:e.outputStripMetadata}),f()},onClose:()=>{_=null}})}async function R(){if(!s&&!(!y.sourceImage||y.slots.size===0)){s=!0;try{let e=y.workingImage??y.sourceImage,r=e,i=y.active;if(i){let t=y.slots.get(i.id);if(t){let n=t.store.get();Rs(i.id,n)||(r=await t.plugin.bake(n,e))}}let a={output:m.get(),...y.sourceName?{sourceName:y.sourceName}:{},...y.sourceFile?{sourceBlob:y.sourceFile}:{}},o=await t.encodeSourceImage(r,a);n.emit(`process`,{dest:o}),x.announce(`Image saved.`),ie()}catch(e){let t=e instanceof Error?e.message:`Failed to export image`;n.emit(`loaderror`,{message:t,cause:e}),x.announce(`Save failed. ${t}`)}finally{s=!1}}}let z=tr(x.stage,i),re=!1;function ie(){re||(re=!0,h?.close(),h=null,_?.close(),_=null,v?.close(),v=null,d!==void 0&&(clearTimeout(d),d=void 0,gs(l,u)),y.active?.handle.destroy(),E(),D(),O(),z(),i.clear(),T.release(),x.destroy(),o.remove(),n.clear(),r.clear())}return{on(e,t){n.on(e,t)},off(e,t){n.off(e,t)}}}async function Fs(e,t,n,r,i,a,o,s){let c=await r.sourceToFile(t.src),l=await r.loadImage(c),u={bitmap:l.element,width:l.width,height:l.height,mimeType:c.type||`image/png`},d=t.cropSelectPresetOptions??Os,f=t.cropSelectPresetFilter,p=r.createCropPlugin({presets:d,presetFilter:f,panelHost:e.utilMain}),m=r.createRotatePlugin({panelHost:e.utilMain}),h=r.createFlipPlugin({panelHost:e.utilMain}),g=r.createFinetunePlugin({panelHost:e.utilMain}),_=r.createFilterPlugin({panelHost:e.utilMain}),v=r.createAnnotatePlugin({panelHost:e.utilMain}),y=r.createRedactPlugin({panelHost:e.utilMain}),b=r.createResizePlugin({panelHost:e.utilMain}),x=r.createFramePlugin({panelHost:e.utilMain,labels:Ks(t)}),S={source:u,bus:o,viewport:s};$(n,p,S),$(n,m,S),$(n,h,S),$(n,g,S);let C=n.slots.get(`finetune`);C&&n.slots.set(`filter`,{id:`filter`,plugin:_,store:C.store}),$(n,v,S),$(n,y,S),$(n,b,S),$(n,x,S),n.sourceImage=u,n.sourceName=c.name,n.sourceFile=c,n.workingImage=u,n.committedChain=[],n.history=new w(Ls(n));let T=n.slots.get(a);if(!T)return;let E={source:n.workingImage,bus:o,viewport:s};n.active={id:a,handle:T.plugin.mount(e.stage,E,T.store)},dr(i,a,e.utilMain)}function $(e,t,n){let r=$n(t.init(n));e.slots.set(t.id,{id:t.id,plugin:t,store:r})}var Is=`__committedChain__`;function Ls(e){let t=new Map;for(let[n,r]of e.slots)t.set(n,r.store.get());return t.set(Is,e.committedChain),t}function Rs(e,t){switch(e){case`crop`:{let e=t;return!e.rect||!e.imageSize?!1:e.rect.x===0&&e.rect.y===0&&e.rect.width===e.imageSize.width&&e.rect.height===e.imageSize.height}case`rotate`:{let e=t;return typeof e.quarterTurns!=`number`||typeof e.freeAngle!=`number`?!1:Yn(e)}case`flip`:{let e=t;return typeof e.horizontal!=`boolean`||typeof e.vertical!=`boolean`?!1:Vt(e)}case`finetune`:case`filter`:{let e=t;return e?wt(e):!1}case`annotate`:{let e=t.shapes;return Array.isArray(e)&&e.length===0}case`redact`:{let e=t.regions;return Array.isArray(e)&&e.length===0}case`resize`:{let e=t;return typeof e.scaleX!=`number`||typeof e.scaleY!=`number`?!1:jn(e)}case`frame`:{let e=t;return e.presetId?Kt(e):!1}default:return!0}}async function zs(e,t,n){if(!e.active||!e.workingImage)return;let r=e.active.id,i=r===`filter`?`finetune`:r,a=e.slots.get(i);if(!a)return;let o=a.store.get();if(Rs(i,o))return;e.workingImage=await a.plugin.bake(o,e.workingImage),e.committedChain.push({id:a.id,state:structuredClone(o)});let s={source:e.workingImage,bus:t,viewport:n},c=a.plugin.init(s);a.store.update(()=>c)}async function Bs(e,t){if(!e.sourceImage)return;let n=[];for(let t of e.committedChain){let r=e.slots.get(t.id);r&&n.push({id:t.id,plugin:r.plugin,state:t.state})}if(n.length===0){e.workingImage=e.sourceImage;return}e.workingImage=await t.runUtilityChain(n,e.sourceImage)}function Vs(e){let t=e.util;if(typeof t!=`string`)return`crop`;for(let e of Ns)if(e.id===t)return e.id;return`crop`}function Hs(e,t,n){Us(n);let r=document.createElement(`div`);r.className=`kalotyp-stage-status`,r.setAttribute(`role`,`status`),r.textContent=t,e.appendChild(r),n.statusElement=r}function Us(e){e.statusElement?.remove(),e.statusElement=void 0}function Ws(e){let t=e.locale?.labelButtonExport;return typeof t==`string`&&t.length>0?t:`Save and close`}function Gs(e,t,n){if(t.rememberAnnotationStyle){let r=e.slots.get(`annotate`);if(r){let e=r.store;e.update(e=>({...e,currentStyle:{...e.currentStyle,color:t.lastAnnotationColor,strokeWidth:t.lastAnnotationStrokeWidth}})),e.subscribe(e=>{n({lastAnnotationColor:e.currentStyle.color,lastAnnotationStrokeWidth:e.currentStyle.strokeWidth})})}}if(t.rememberFilter&&t.lastFilterPresetId!==null){let n=e.slots.get(`finetune`),r=kt.find(e=>e.id===t.lastFilterPresetId);n&&r&&n.store.update(()=>r.state)}if(t.rememberFilter){let t=e.slots.get(`finetune`);t&&t.store.subscribe(e=>{n({lastFilterPresetId:jt(e)?.id??null})})}if(t.rememberFrame){let r=e.slots.get(`frame`);if(r){let e=r.store;t.lastFramePresetId&&e.update(()=>({presetId:t.lastFramePresetId,color:t.lastFrameColor})),e.subscribe(e=>{n({lastFramePresetId:e.presetId,lastFrameColor:e.color})})}}}function Ks(e){let t=e.frameOptions;if(!Array.isArray(t))return;let n=e.locale??{},r={};for(let e of t){if(!Array.isArray(e))continue;let[t,i]=e,a=t===void 0?`none`:t;try{let e=i(n);typeof e==`string`&&e.length>0&&(r[a]=e)}catch{}}return Object.keys(r).length===0?void 0:r}function qs(e){let t=document.createElement(`div`);t.className=`kalotyp-history-controls`,t.setAttribute(`role`,`group`),t.setAttribute(`aria-label`,`Edit history`);let n=document.createElement(`button`);n.type=`button`,n.className=`kalotyp-history-button kalotyp-history-undo`,n.setAttribute(`aria-label`,`Undo`),n.title=`Undo (Ctrl+Z)`,n.innerHTML=Y(`undo`),n.addEventListener(`click`,e.onUndo);let r=document.createElement(`button`);return r.type=`button`,r.className=`kalotyp-history-button kalotyp-history-redo`,r.setAttribute(`aria-label`,`Redo`),r.title=`Redo (Ctrl+Shift+Z)`,r.innerHTML=Y(`redo`),r.addEventListener(`click`,e.onRedo),t.appendChild(n),t.appendChild(r),{container:t,undoButton:n,redoButton:r}}function Js(e){let t=t=>{if(t.key===`Escape`){t.preventDefault(),e.onEscape();return}let n=t.target;if(!Ys(n)){if(t.key===`?`&&!t.ctrlKey&&!t.metaKey&&!t.altKey){t.preventDefault(),e.onCheatsheet();return}if(t.ctrlKey||t.metaKey){if(t.key===`z`||t.key===`Z`){t.preventDefault(),t.shiftKey?e.onRedo():e.onUndo();return}(t.key===`y`||t.key===`Y`)&&(t.preventDefault(),e.onRedo())}}};return document.addEventListener(`keydown`,t),()=>document.removeEventListener(`keydown`,t)}function Ys(e){if(!e)return!1;let t=e.tagName;return t===`INPUT`||t===`TEXTAREA`||t===`SELECT`?!0:e.isContentEditable===!0}function Xs(e=globalThis){let t=e.pintura;t&&typeof t==`object`||Object.defineProperty(e,"pintura",{value:{openDefaultEditor:Ps},writable:!0,configurable:!0,enumerable:!0})}typeof window<`u`&&Xs(globalThis),e.openDefaultEditor=Ps});