@arcgis/charts-components 5.2.0-next.4 → 5.2.0-next.41

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 (384) hide show
  1. package/dist/cdn/{2K4ODNJ4.js → 22GC5BZP.js} +1 -1
  2. package/dist/cdn/{YJ6TRXMU.js → 24MSASQQ.js} +1 -1
  3. package/dist/cdn/{4USHOYLT.js → 2BE3GYK4.js} +1 -1
  4. package/dist/cdn/{2HUAW34Q.js → 2R5BXKVB.js} +1 -1
  5. package/dist/cdn/2VWSSNE6.js +2 -0
  6. package/dist/cdn/{PC7IKOIB.js → 2WFIFBMW.js} +1 -1
  7. package/dist/cdn/{ZRFHAQL6.js → 3MRL3AI7.js} +1 -1
  8. package/dist/cdn/{U2LJZ4ML.js → 3QI7A32R.js} +1 -1
  9. package/dist/cdn/{SBYD2EKR.js → 3UDKG6TV.js} +1 -1
  10. package/dist/cdn/3WV4T637.js +2 -0
  11. package/dist/cdn/{PSO5AURI.js → 3YJRZ7CT.js} +1 -1
  12. package/dist/cdn/{DCZWZOPF.js → 4ASVJDBN.js} +1 -1
  13. package/dist/cdn/{CHLE2QGU.js → 4DXGXATO.js} +1 -1
  14. package/dist/cdn/{Y3CXVO2M.js → 4MSUALRF.js} +1 -1
  15. package/dist/cdn/4QGMMXRI.js +2 -0
  16. package/dist/cdn/{TYMKFCF4.js → 4RGS5J3H.js} +1 -1
  17. package/dist/cdn/4WQF5DM3.js +2 -0
  18. package/dist/cdn/{LRNADJJG.js → 4ZJHIYGJ.js} +2 -2
  19. package/dist/cdn/{L4G6FO7A.js → 57VIC2YX.js} +1 -1
  20. package/dist/cdn/{H2A5GZ55.js → 5D2QRMC6.js} +1 -1
  21. package/dist/cdn/{CHQDKVVQ.js → 5DUKB563.js} +1 -1
  22. package/dist/cdn/{U4XLNCOU.js → 5SIHKT2T.js} +1 -1
  23. package/dist/cdn/{LUSFGRHV.js → 5WIR3JWC.js} +1 -1
  24. package/dist/cdn/{VT4WJZN6.js → 64B7ILJI.js} +1 -1
  25. package/dist/cdn/{BBURKBKE.js → 6BXPCTBA.js} +1 -1
  26. package/dist/cdn/{PZGIXDMC.js → 6BZMGEWV.js} +1 -1
  27. package/dist/cdn/6IKWZMBE.js +2 -0
  28. package/dist/cdn/{BJDRJUEJ.js → 6RG6AF7N.js} +1 -1
  29. package/dist/cdn/{7LYAWWOE.js → 6WKTHJQK.js} +1 -1
  30. package/dist/cdn/76ILRLUC.js +2 -0
  31. package/dist/cdn/{II2ZPEUZ.js → 7C2LVFNV.js} +1 -1
  32. package/dist/cdn/{JJIGLOJA.js → 7CGAXWPM.js} +1 -1
  33. package/dist/cdn/{4Z23HWDH.js → 7COM5REK.js} +1 -1
  34. package/dist/cdn/{VVKV5KKN.js → 7KYTSBST.js} +1 -1
  35. package/dist/cdn/{N6AOFBBX.js → 7MEYUIY2.js} +1 -1
  36. package/dist/cdn/7RFX7LUS.js +102 -0
  37. package/dist/cdn/7T4W77V3.js +2 -0
  38. package/dist/cdn/7T5P3U5A.js +2 -0
  39. package/dist/cdn/{OJ5X6I3H.js → ADI63OO7.js} +1 -1
  40. package/dist/cdn/{5MEQANMY.js → AFE4UMQE.js} +1 -1
  41. package/dist/cdn/AZHBGLOD.js +2 -0
  42. package/dist/cdn/{TXB2I2U5.js → B2SUC7VR.js} +1 -1
  43. package/dist/cdn/{HCMD362H.js → B6GOLH4Q.js} +1 -1
  44. package/dist/cdn/{HVO4LIXR.js → BAPR67OA.js} +1 -1
  45. package/dist/cdn/{TACQVUBU.js → BDEDEGCZ.js} +1 -1
  46. package/dist/cdn/BGOWDCTO.js +2 -0
  47. package/dist/cdn/{CNFBNAPJ.js → BK7DHYA7.js} +1 -1
  48. package/dist/cdn/BYPSLSFP.js +2 -0
  49. package/dist/cdn/BYSUABOV.js +2 -0
  50. package/dist/cdn/{ZFZ5AEUQ.js → C4O77AVT.js} +1 -1
  51. package/dist/cdn/{R45FWF7D.js → CAOUA6TM.js} +1 -1
  52. package/dist/cdn/{GL3IXVRN.js → CHFKSXBJ.js} +1 -1
  53. package/dist/cdn/CHZMNR2R.js +2 -0
  54. package/dist/cdn/{LONASKGH.js → CMPHWKTI.js} +1 -1
  55. package/dist/cdn/{3YT44D4Z.js → CXT62XXL.js} +1 -1
  56. package/dist/cdn/{ZFJFTDJF.js → CYGMXV56.js} +1 -1
  57. package/dist/cdn/D7D3TANP.js +2 -0
  58. package/dist/cdn/D7FL6CSK.js +2 -0
  59. package/dist/cdn/DE5QJPJV.js +2 -0
  60. package/dist/cdn/{DEGBVJ76.js → DGJATKEL.js} +1 -1
  61. package/dist/cdn/DZP63RLO.js +2 -0
  62. package/dist/cdn/{LDPHZHSF.js → E47MLNJA.js} +1 -1
  63. package/dist/cdn/EAXAXRX2.js +2 -0
  64. package/dist/cdn/{A5GIBV5W.js → EDYALXKT.js} +1 -1
  65. package/dist/cdn/ELICLP7J.js +2 -0
  66. package/dist/cdn/EMMV3MPZ.js +2 -0
  67. package/dist/cdn/{J5NHXQLA.js → EQZBQP5A.js} +1 -1
  68. package/dist/cdn/F5P4Z43T.js +2 -0
  69. package/dist/cdn/{A4GEWIPY.js → F7IPTEHX.js} +1 -1
  70. package/dist/cdn/FBHIZNWF.js +2 -0
  71. package/dist/cdn/{WASEMNYV.js → FHKRXY7E.js} +1 -1
  72. package/dist/cdn/FK7GEP3O.js +45 -0
  73. package/dist/cdn/G3IEARQP.js +2 -0
  74. package/dist/cdn/{LFQGH44F.js → GEHO65XE.js} +1 -1
  75. package/dist/cdn/{JVHJMPFE.js → GGN3I7J2.js} +1 -1
  76. package/dist/cdn/GKXBWOFH.js +2 -0
  77. package/dist/cdn/{Y7HBWU3M.js → GP3V6A7V.js} +1 -1
  78. package/dist/cdn/{TF7TE7K5.js → GZZJATH3.js} +1 -1
  79. package/dist/cdn/{NQQW4GKA.js → HCYQEOJ6.js} +1 -1
  80. package/dist/cdn/HMBXRL4X.js +2 -0
  81. package/dist/cdn/{5G7DSKI7.js → HRMCHOLZ.js} +1 -1
  82. package/dist/cdn/{FF4DUQDZ.js → HRUQXEFI.js} +1 -1
  83. package/dist/cdn/{ZXOO3X5P.js → HWHKCIYW.js} +1 -1
  84. package/dist/cdn/{AZOBLYAP.js → I2BM5KSH.js} +1 -1
  85. package/dist/cdn/I6CEN2WV.js +2 -0
  86. package/dist/cdn/{YRBE7MBU.js → I6REUMW3.js} +1 -1
  87. package/dist/cdn/{JQKRGUBU.js → IDAOLPMA.js} +1 -1
  88. package/dist/cdn/IIQVRNZF.js +2 -0
  89. package/dist/cdn/{P4HSSZRL.js → IONJLIQQ.js} +1 -1
  90. package/dist/cdn/J64IDIEG.js +2 -0
  91. package/dist/cdn/JATS27TM.js +2 -0
  92. package/dist/cdn/{YOT6DVSU.js → JEW6MSOC.js} +1 -1
  93. package/dist/cdn/{KZ7LPNX3.js → JNFMKAES.js} +1 -1
  94. package/dist/cdn/JPPLQW3P.js +2 -0
  95. package/dist/cdn/JTYCEFWF.js +4 -0
  96. package/dist/cdn/{WNKDEOFZ.js → JWD4Y2L6.js} +1 -1
  97. package/dist/cdn/{AK7X7SGI.js → JYC77MVD.js} +1 -1
  98. package/dist/cdn/{JBHGSSHS.js → K25GJKPH.js} +1 -1
  99. package/dist/cdn/K4APZJ2O.js +2 -0
  100. package/dist/cdn/{23YH7MTF.js → KHLGXKN5.js} +1 -1
  101. package/dist/cdn/{D3CFPMAR.js → KOY5DWSR.js} +1 -1
  102. package/dist/cdn/{5QO32XSX.js → KS72POQC.js} +1 -1
  103. package/dist/cdn/{7FZC3RZK.js → L5J4TYCU.js} +1 -1
  104. package/dist/cdn/{AY6IOQ3H.js → LAEUROZM.js} +1 -1
  105. package/dist/cdn/{VY3KBD6N.js → LJLL37FG.js} +1 -1
  106. package/dist/cdn/LN3IK232.js +2 -0
  107. package/dist/cdn/{RFQBUWOW.js → LSMBD5CK.js} +1 -1
  108. package/dist/cdn/LSWWNXP3.js +2 -0
  109. package/dist/cdn/M22IUUVK.js +2 -0
  110. package/dist/cdn/{MRTKZZTF.js → MBL6ZAKF.js} +1 -1
  111. package/dist/cdn/{PAIRUVLU.js → MCT4U7MC.js} +1 -1
  112. package/dist/cdn/{K3GNHGEW.js → MDPDU2BA.js} +1 -1
  113. package/dist/cdn/{3DK6M5E7.js → MLBDUKS3.js} +1 -1
  114. package/dist/cdn/MNE46H4A.js +2 -0
  115. package/dist/cdn/MWARLTCH.js +2 -0
  116. package/dist/cdn/NG254LPM.js +2 -0
  117. package/dist/cdn/{XG2KN6YJ.js → NKPZCF5U.js} +1 -1
  118. package/dist/cdn/{VE3GFNNM.js → NRXCKYYY.js} +1 -1
  119. package/dist/cdn/{4C6KWLWN.js → NWLNHFHJ.js} +1 -1
  120. package/dist/cdn/{KDJ5RVHA.js → NYFHPR6N.js} +1 -1
  121. package/dist/cdn/{AJWYIBGC.js → O25MQAZU.js} +1 -1
  122. package/dist/cdn/O324BBM7.js +2 -0
  123. package/dist/cdn/{NAXNRCMZ.js → OD2NWPCL.js} +1 -1
  124. package/dist/cdn/{4ZIZEJXS.js → OISERMTF.js} +1 -1
  125. package/dist/cdn/{ETOGNYFU.js → OKAZOAYZ.js} +1 -1
  126. package/dist/cdn/{XUERYUEG.js → OQFM5DBD.js} +1 -1
  127. package/dist/cdn/{E7OAEGSE.js → OZSAA5YQ.js} +1 -1
  128. package/dist/cdn/{C5K6XOCR.js → P37JASN4.js} +1 -1
  129. package/dist/cdn/{244ZX2UP.js → P5I5RQTN.js} +1 -1
  130. package/dist/cdn/{N5ERJZPG.js → PCODH67Z.js} +1 -1
  131. package/dist/cdn/PDYF2IZ2.js +2 -0
  132. package/dist/cdn/PF7KNYUV.js +2 -0
  133. package/dist/cdn/PGO6DEJM.js +2 -0
  134. package/dist/cdn/{BJ7Q7LCT.js → PIZPF2BH.js} +1 -1
  135. package/dist/cdn/{UKDTXHZT.js → PTQOX5OZ.js} +1 -1
  136. package/dist/cdn/{ETKPMU7Z.js → Q3ZQR5JF.js} +1 -1
  137. package/dist/cdn/{QMSINFQX.js → Q5E66RNY.js} +1 -1
  138. package/dist/cdn/QFDQH5CQ.js +2 -0
  139. package/dist/cdn/{7UQHB6KY.js → QIG5H6WA.js} +1 -1
  140. package/dist/cdn/{XJFVSX2E.js → QJMUS3VS.js} +1 -1
  141. package/dist/cdn/{XMPLEHTW.js → QKZK6MTN.js} +1 -1
  142. package/dist/cdn/{THTYR6IL.js → QYNNPEED.js} +1 -1
  143. package/dist/cdn/{KOBNV5AQ.js → QZ5YUJ7Y.js} +1 -1
  144. package/dist/cdn/{GV3TT7L5.js → R6T7WJQJ.js} +1 -1
  145. package/dist/cdn/{KUZR6CGB.js → R6XIGSQS.js} +1 -1
  146. package/dist/cdn/{VEA5ZR5D.js → RE5QI7WA.js} +1 -1
  147. package/dist/cdn/{5XTQQOTT.js → RLCLIRL6.js} +1 -1
  148. package/dist/cdn/RPTZ52MF.js +2 -0
  149. package/dist/cdn/{TZB57XD4.js → RS37HDC7.js} +1 -1
  150. package/dist/cdn/{AM2TOTX6.js → RTVU7ANC.js} +1 -1
  151. package/dist/cdn/{WEQBZOH7.js → SDHNDW2J.js} +1 -1
  152. package/dist/cdn/{DNTLH5RT.js → SSOL6PCL.js} +1 -1
  153. package/dist/cdn/{DKAHZ7IX.js → SWEIMWH2.js} +1 -1
  154. package/dist/cdn/TAGN7GHJ.js +2 -0
  155. package/dist/cdn/{ZYOWZCR7.js → TB7JE5XK.js} +1 -1
  156. package/dist/cdn/{KFONSKQF.js → TQLMPVI5.js} +1 -1
  157. package/dist/cdn/{WMPWOPRZ.js → TRAVRA3M.js} +1 -1
  158. package/dist/cdn/{KLC6NTPC.js → TTTGMEZ7.js} +1 -1
  159. package/dist/cdn/{UT4TYXFO.js → TW4RXJ35.js} +1 -1
  160. package/dist/cdn/U5FPTPFH.js +2 -0
  161. package/dist/cdn/{P5AO3V3M.js → UD724V36.js} +1 -1
  162. package/dist/cdn/{CJ4POAPM.js → UG37REGM.js} +1 -1
  163. package/dist/cdn/{PVJEBBA7.js → UNFEHNQQ.js} +1 -1
  164. package/dist/cdn/{DSIFL2DF.js → UQSD6YZM.js} +1 -1
  165. package/dist/cdn/{TAI4RIWT.js → USQYT55U.js} +1 -1
  166. package/dist/cdn/UTJ2ODDK.js +2 -0
  167. package/dist/cdn/{Q7J7EKQW.js → UUVJGPFG.js} +1 -1
  168. package/dist/cdn/VAUVQGBW.js +3 -0
  169. package/dist/cdn/{A5AECJXP.js → VEXNULZX.js} +1 -1
  170. package/dist/cdn/{ZQDADGLQ.js → VLCUXTLC.js} +1 -1
  171. package/dist/cdn/WGYVJ5PD.js +2 -0
  172. package/dist/cdn/WIPAO2FH.js +2 -0
  173. package/dist/cdn/{7ABIELGZ.js → WKRYWDKZ.js} +1 -1
  174. package/dist/cdn/{6B7JCDQC.js → WTF2PFHV.js} +1 -1
  175. package/dist/cdn/{VDG54AIC.js → WVPMH6DW.js} +1 -1
  176. package/dist/cdn/{AWF4R7WL.js → WWIRRYDD.js} +1 -1
  177. package/dist/cdn/{XW4PBQNW.js → X6QMN2HV.js} +1 -1
  178. package/dist/cdn/{IPM2XKST.js → XVK4ONRA.js} +1 -1
  179. package/dist/cdn/{QOOBNATX.js → XWLP2CHH.js} +1 -1
  180. package/dist/cdn/XY4HDZKZ.js +2 -0
  181. package/dist/cdn/{5JML3JUR.js → YABRVLVL.js} +1 -1
  182. package/dist/cdn/{BXYNEUQY.js → YCQLYXH4.js} +1 -1
  183. package/dist/cdn/{LZYN55O4.js → YGGPPIZ7.js} +1 -1
  184. package/dist/cdn/{RAQZUMC6.js → YLMCVYAS.js} +1 -1
  185. package/dist/cdn/{XE3FKQFA.js → YS73YUW5.js} +1 -1
  186. package/dist/cdn/{TNB3MBXR.js → YXG7RVTK.js} +1 -1
  187. package/dist/cdn/{FDXE5JLT.js → Z7NF4IGS.js} +1 -1
  188. package/dist/cdn/{6XTKJ7DO.js → ZCAHK6VZ.js} +1 -1
  189. package/dist/cdn/{5ZGALYWZ.js → ZLCRTIQH.js} +1 -1
  190. package/dist/cdn/ZQDCFKNT.js +2 -0
  191. package/dist/cdn/{CLXVAIQX.js → ZYK5XBZK.js} +1 -1
  192. package/dist/cdn/{TYUVXRBO.js → ZZHKDFTA.js} +1 -1
  193. package/dist/cdn/assets/common/t9n/messages.en.json +1 -1
  194. package/dist/cdn/index.js +1 -1
  195. package/dist/cdn/main.css +1 -1
  196. package/dist/cdn/model/shared/setup-utils.js +2 -0
  197. package/dist/chart-rendering/common/data/utils/summarize-data/interfaces.d.ts +5 -1
  198. package/dist/chart-rendering/common/interfaces.d.ts +8 -8
  199. package/dist/chunks/axis-lines-symbol.js +7 -7
  200. package/dist/chunks/bar-chart-model.js +39 -36
  201. package/dist/chunks/box-plot-data.js +36 -36
  202. package/dist/chunks/box-plot-model.js +5 -5
  203. package/dist/chunks/chart-model.js +173 -141
  204. package/dist/chunks/chart-object-literals.js +2 -1
  205. package/dist/chunks/chart-ui-utils.js +24 -23
  206. package/dist/chunks/class-breaks.js +12 -12
  207. package/dist/chunks/combo-bar-line-chart-model.js +27 -27
  208. package/dist/chunks/data-labels-symbol.js +1 -1
  209. package/dist/chunks/data-labels-visibility.js +22 -22
  210. package/dist/chunks/data.js +68 -68
  211. package/dist/chunks/gauge-model.js +16 -16
  212. package/dist/chunks/generate-x-axis-title.js +9 -9
  213. package/dist/chunks/heat-chart-model.js +47 -27
  214. package/dist/chunks/histogram-data.js +15 -15
  215. package/dist/chunks/histogram-model.js +4 -4
  216. package/dist/chunks/index.js +84 -83
  217. package/dist/chunks/index2.js +3836 -3664
  218. package/dist/chunks/index3.js +32 -29
  219. package/dist/chunks/index4.js +252 -75
  220. package/dist/chunks/line-chart-model.js +1 -1
  221. package/dist/chunks/model-setter.js +10 -9
  222. package/dist/chunks/model-with-line-marker-styling.js +2 -3
  223. package/dist/chunks/model-with-y-guides.js +12 -12
  224. package/dist/chunks/negative-values-stacked-to-baseline.js +3 -3
  225. package/dist/chunks/pie-chart-data.js +48 -42
  226. package/dist/chunks/pie-chart-model.js +173 -160
  227. package/dist/chunks/radar-chart-model.js +1 -1
  228. package/dist/chunks/resource.js +1 -1
  229. package/dist/chunks/rotated-state.js +1 -1
  230. package/dist/chunks/rounded-corners.js +73 -0
  231. package/dist/chunks/scatterplot-model.js +4 -4
  232. package/dist/chunks/serial-chart-data.js +575 -525
  233. package/dist/chunks/serial-chart-model.js +107 -93
  234. package/dist/chunks/series-length.js +1 -1
  235. package/dist/chunks/series.js +1 -1
  236. package/dist/chunks/type-guards.js +17 -13
  237. package/dist/chunks/type-guards2.js +24 -20
  238. package/dist/chunks/type-guards3.js +1 -1
  239. package/dist/chunks/utils.js +69 -58
  240. package/dist/chunks/utils2.js +1 -1
  241. package/dist/chunks/web-component-utils.js +632 -492
  242. package/dist/chunks/x-bounds.js +16 -16
  243. package/dist/components/arcgis-chart/customElement.d.ts +147 -139
  244. package/dist/components/arcgis-chart/customElement.js +8568 -8455
  245. package/dist/components/arcgis-charts-action-bar/customElement.d.ts +4 -0
  246. package/dist/components/arcgis-charts-config-bar-chart/customElement.js +1 -1
  247. package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +4 -4
  248. package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.js +35 -37
  249. package/dist/components/arcgis-charts-config-bar-chart-series/customElement.js +28 -28
  250. package/dist/components/arcgis-charts-config-bar-chart-series-popover/customElement.js +6 -9
  251. package/dist/components/arcgis-charts-config-box-plot-data/customElement.js +1 -1
  252. package/dist/components/arcgis-charts-config-box-plot-popover/customElement.js +23 -25
  253. package/dist/components/arcgis-charts-config-box-plot-series/customElement.js +1 -1
  254. package/dist/components/arcgis-charts-config-box-plot-series-popover/customElement.js +14 -17
  255. package/dist/components/arcgis-charts-config-chart-rename-popover/customElement.js +14 -16
  256. package/dist/components/arcgis-charts-config-create-flow/customElement.js +16 -16
  257. package/dist/components/arcgis-charts-config-font-style/customElement.js +1 -1
  258. package/dist/components/arcgis-charts-config-format/customElement.js +25 -25
  259. package/dist/components/arcgis-charts-config-format-popover/customElement.js +7 -10
  260. package/dist/components/arcgis-charts-config-guide/customElement.js +6 -6
  261. package/dist/components/arcgis-charts-config-guide-popover/customElement.js +8 -11
  262. package/dist/components/arcgis-charts-config-guides/customElement.js +1 -1
  263. package/dist/components/arcgis-charts-config-heat-chart-data/customElement.js +21 -20
  264. package/dist/components/arcgis-charts-config-heat-chart-popover/customElement.js +53 -54
  265. package/dist/components/arcgis-charts-config-histogram/customElement.js +28 -23
  266. package/dist/components/arcgis-charts-config-histogram-data/customElement.js +11 -11
  267. package/dist/components/arcgis-charts-config-histogram-popover/customElement.js +33 -34
  268. package/dist/components/arcgis-charts-config-line-chart/customElement.js +1 -1
  269. package/dist/components/arcgis-charts-config-line-chart-data/customElement.js +3 -3
  270. package/dist/components/arcgis-charts-config-line-chart-popover/customElement.js +36 -38
  271. package/dist/components/arcgis-charts-config-line-chart-series/customElement.js +6 -6
  272. package/dist/components/arcgis-charts-config-line-chart-series-popover/customElement.js +5 -6
  273. package/dist/components/arcgis-charts-config-pie-chart-data/customElement.js +49 -56
  274. package/dist/components/arcgis-charts-config-pie-chart-popover/customElement.js +55 -56
  275. package/dist/components/arcgis-charts-config-pie-chart-slices/customElement.js +9 -9
  276. package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.js +8 -11
  277. package/dist/components/arcgis-charts-config-scatter-plot/customElement.js +27 -22
  278. package/dist/components/arcgis-charts-config-scatter-plot-data/customElement.js +75 -75
  279. package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.js +18 -19
  280. package/dist/components/arcgis-charts-config-select-chart-type-popover/customElement.js +9 -11
  281. package/dist/components/arcgis-charts-info-modal/customElement.js +1 -1
  282. package/dist/docs/api.json +1 -1
  283. package/dist/docs/docs.json +1 -1
  284. package/dist/docs/vscode.html-custom-data.json +1 -1
  285. package/dist/docs/web-types.json +1 -1
  286. package/dist/index.d.ts +66 -70
  287. package/dist/index.js +457 -450
  288. package/dist/json-schema/index.d.ts +162 -2
  289. package/dist/loader.js +1 -1
  290. package/dist/model/bar-chart-model/bar-chart-model.d.ts +4 -2
  291. package/dist/model/chart-model/chart-model.d.ts +2 -1
  292. package/dist/model/combo-bar-line-chart-model/combo-bar-line-chart-model.d.ts +8 -5
  293. package/dist/model/heat-chart-model/heat-chart-model.d.ts +22 -0
  294. package/dist/model/interfaces/common.d.ts +0 -2
  295. package/dist/model/mixins/model-with-line-marker-styling.d.ts +6 -5
  296. package/dist/model/mixins/model-with-multi-axes.d.ts +22 -22
  297. package/dist/model/pie-chart-model/pie-chart-model.d.ts +2 -0
  298. package/dist/model/properties/data-tooltip-font-size.d.ts +20 -0
  299. package/dist/model/properties/rotated-state.d.ts +1 -1
  300. package/dist/model/properties/rounded-corners.d.ts +18 -0
  301. package/dist/model/serial-chart-model/serial-chart-model.d.ts +15 -0
  302. package/dist/model/shared/type-guards.d.ts +7 -0
  303. package/dist/spec/chart-object-literals.d.ts +1 -0
  304. package/dist/spec/data-source.d.ts +6 -1
  305. package/dist/spec/rest-js-object-literals.d.ts +2 -2
  306. package/dist/spec/rest-js-types.d.ts +22 -8
  307. package/dist/spec/web-chart.d.ts +16 -2
  308. package/dist/utils/chart-config/converter/index.js +17 -17
  309. package/dist/utils/chart-config/utils/index.d.ts +35 -0
  310. package/dist/utils/chart-config/validator/index.d.ts +1 -0
  311. package/dist/utils/chart-config/validator/interfaces.d.ts +3 -3
  312. package/dist/utils/data/index.d.ts +14 -10
  313. package/dist/utils/defaults/index.d.ts +5 -3
  314. package/dist/utils/defaults/interfaces.d.ts +1 -1
  315. package/dist/utils/errors/index.d.ts +1 -1
  316. package/dist/utils/layer/index.d.ts +5 -3
  317. package/dist/utils/layer/inline-conversion/interfaces.d.ts +0 -2
  318. package/dist/utils/layer/interfaces.d.ts +2 -1
  319. package/dist/utils/layer/query-features/index.d.ts +17 -1
  320. package/dist/utils/layer/query-parser/index.d.ts +4 -3
  321. package/dist/utils/localization/interfaces.d.ts +4 -0
  322. package/dist/utils/misc/index.d.ts +2 -3
  323. package/dist/utils/types/index.d.ts +1 -5
  324. package/package.json +7 -8
  325. package/dist/cdn/24LTTBTF.js +0 -2
  326. package/dist/cdn/26FWESH3.js +0 -102
  327. package/dist/cdn/3XHZ677O.js +0 -2
  328. package/dist/cdn/547RDEMV.js +0 -2
  329. package/dist/cdn/5FMEOIBS.js +0 -3
  330. package/dist/cdn/5YJNENER.js +0 -2
  331. package/dist/cdn/74JAZF7U.js +0 -2
  332. package/dist/cdn/7HIZH35G.js +0 -2
  333. package/dist/cdn/CCR46UHB.js +0 -2
  334. package/dist/cdn/CJPEW4LJ.js +0 -142
  335. package/dist/cdn/CRFJ2GGS.js +0 -2
  336. package/dist/cdn/CXQOEN77.js +0 -2
  337. package/dist/cdn/DYC3Q36R.js +0 -2
  338. package/dist/cdn/E2N2S7BH.js +0 -2
  339. package/dist/cdn/E43KEVHT.js +0 -2
  340. package/dist/cdn/EXTKNE2L.js +0 -2
  341. package/dist/cdn/EZV7JSQJ.js +0 -2
  342. package/dist/cdn/F7Y6EWWB.js +0 -2
  343. package/dist/cdn/G5HVFOIO.js +0 -2
  344. package/dist/cdn/G7TRU7JI.js +0 -2
  345. package/dist/cdn/GES3HRXE.js +0 -2
  346. package/dist/cdn/HCV34H6X.js +0 -2
  347. package/dist/cdn/IHQ7R6L4.js +0 -4
  348. package/dist/cdn/IUFXFWXH.js +0 -2
  349. package/dist/cdn/JHYH555K.js +0 -2
  350. package/dist/cdn/JNNB2DIA.js +0 -2
  351. package/dist/cdn/JRRFLDWX.js +0 -58
  352. package/dist/cdn/KI4HS3AM.js +0 -2
  353. package/dist/cdn/KVGEY3IQ.js +0 -2
  354. package/dist/cdn/LWODMEOP.js +0 -2
  355. package/dist/cdn/LYZGRYQV.js +0 -2
  356. package/dist/cdn/MF3FGXHI.js +0 -2
  357. package/dist/cdn/MUPHTV55.js +0 -2
  358. package/dist/cdn/N524VXQ2.js +0 -2
  359. package/dist/cdn/NGPMU4T3.js +0 -2
  360. package/dist/cdn/NJCZ6UTM.js +0 -2
  361. package/dist/cdn/NMB6TWC2.js +0 -2
  362. package/dist/cdn/NNNTZU5J.js +0 -2
  363. package/dist/cdn/NS3THLCD.js +0 -2
  364. package/dist/cdn/NZR4L5AA.js +0 -2
  365. package/dist/cdn/OE3UFORR.js +0 -2
  366. package/dist/cdn/P2NPQAJ3.js +0 -2
  367. package/dist/cdn/PJUAU42S.js +0 -2
  368. package/dist/cdn/PK5XIIZY.js +0 -2
  369. package/dist/cdn/PY5Q3V6E.js +0 -2
  370. package/dist/cdn/RMYZGOBM.js +0 -2
  371. package/dist/cdn/RX3RNE7F.js +0 -2
  372. package/dist/cdn/TU3UF32Y.js +0 -2
  373. package/dist/cdn/TXSWWAOF.js +0 -2
  374. package/dist/cdn/U67P6YAZ.js +0 -2
  375. package/dist/cdn/UAJGYF4S.js +0 -2
  376. package/dist/cdn/UT6G7RV7.js +0 -2
  377. package/dist/cdn/VOTZAPI3.js +0 -2
  378. package/dist/cdn/W7X6L2OB.js +0 -127
  379. package/dist/cdn/WO6JBNMU.js +0 -2
  380. package/dist/cdn/WPPMMVD5.js +0 -2
  381. package/dist/cdn/YYK7SPXC.js +0 -2
  382. package/dist/cdn/ZRZEKOEF.js +0 -2
  383. package/dist/chunks/bar-chart-series.js +0 -15
  384. package/dist/chunks/time-zone.js +0 -38
@@ -1,127 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import"./U67P6YAZ.js";var G=function(o,e){return(G=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,s){t.__proto__=s}||function(t,s){for(var r in s)Object.prototype.hasOwnProperty.call(s,r)&&(t[r]=s[r])})(o,e)};function u(o,e){function t(){this.constructor=o}G(o,e),o.prototype=e===null?Object.create(e):(t.prototype=e.prototype,new t)}function H(o,e,t,s){return new(t||(t=Promise))((function(r,i){function n(p){try{c(s.next(p))}catch(l){i(l)}}function a(p){try{c(s.throw(p))}catch(l){i(l)}}function c(p){var l;p.done?r(p.value):(l=p.value,l instanceof t?l:new t((function(d){d(l)}))).then(n,a)}c((s=s.apply(o,e||[])).next())}))}function z(o,e){var t,s,r,i,n={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:a(0),throw:a(1),return:a(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function a(c){return function(p){return(function(l){if(t)throw new TypeError("Generator is already executing.");for(;n;)try{if(t=1,s&&(r=2&l[0]?s.return:l[0]?s.throw||((r=s.return)&&r.call(s),0):s.next)&&!(r=r.call(s,l[1])).done)return r;switch(s=0,r&&(l=[2&l[0],r.value]),l[0]){case 0:case 1:r=l;break;case 4:return n.label++,{value:l[1],done:!1};case 5:n.label++,s=l[1],l=[0];continue;case 7:l=n.ops.pop(),n.trys.pop();continue;default:if(r=n.trys,!((r=r.length>0&&r[r.length-1])||l[0]!==6&&l[0]!==2)){n=0;continue}if(l[0]===3&&(!r||l[1]>r[0]&&l[1]<r[3])){n.label=l[1];break}if(l[0]===6&&n.label<r[1]){n.label=r[1],r=l;break}if(r&&n.label<r[2]){n.label=r[2],n.ops.push(l);break}r[2]&&n.ops.pop(),n.trys.pop();continue}l=e.call(o,n)}catch(d){l=[6,d],s=0}finally{t=r=0}if(5&l[0])throw l[1];return{value:l[0]?l[1]:void 0,done:!0}})([c,p])}}}function E(){for(var o=0,e=0,t=arguments.length;e<t;e++)o+=arguments[e].length;var s=Array(o),r=0;for(e=0;e<t;e++)for(var i=arguments[e],n=0,a=i.length;n<a;n++,r++)s[r]=i[n];return s}var h=(function(){function o(){}return o.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},o.setAttributes=function(e,t){for(var s=0,r=t;s<r.length;s++){var i=r[s],n=i[0],a=i[1];e.setAttribute(n,a)}},o.createRect=function(e,t,s){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");return r.setAttribute("width",e.toString()),r.setAttribute("height",t.toString()),s&&o.setAttributes(r,s),r},o.createLine=function(e,t,s,r,i){var n=document.createElementNS("http://www.w3.org/2000/svg","line");return n.setAttribute("x1",e.toString()),n.setAttribute("y1",t.toString()),n.setAttribute("x2",s.toString()),n.setAttribute("y2",r.toString()),i&&o.setAttributes(n,i),n},o.createPolygon=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","polygon");return s.setAttribute("points",e),t&&o.setAttributes(s,t),s},o.createCircle=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","circle");return s.setAttribute("cx",(e/2).toString()),s.setAttribute("cy",(e/2).toString()),s.setAttribute("r",e.toString()),t&&o.setAttributes(s,t),s},o.createEllipse=function(e,t,s){var r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",(e/2).toString()),r.setAttribute("cy",(t/2).toString()),r.setAttribute("rx",(e/2).toString()),r.setAttribute("ry",(t/2).toString()),s&&o.setAttributes(r,s),r},o.createGroup=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","g");return e&&o.setAttributes(t,e),t},o.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},o.createMarker=function(e,t,s,r,i,n,a){var c=document.createElementNS("http://www.w3.org/2000/svg","marker");return o.setAttributes(c,[["id",e],["orient",t],["markerWidth",s.toString()],["markerHeight",r.toString()],["refX",i.toString()],["refY",n.toString()]]),c.appendChild(a),c},o.createText=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","text");return t.setAttribute("x","0"),t.setAttribute("y","0"),e&&o.setAttributes(t,e),t},o.createTSpan=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","tspan");return s.textContent=e,t&&o.setAttributes(s,t),s},o.createImage=function(e){var t=document.createElementNS("http://www.w3.org/2000/svg","image");return e&&o.setAttributes(t,e),t},o.createPoint=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return s.x=e,s.y=t,s},o.createPath=function(e,t){var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttribute("d",e),t&&o.setAttributes(s,t),s},o})(),R=(function(){function o(){}return o.addKey=function(e){o.key=e},Object.defineProperty(o,"isLicensed",{get:function(){return!!o.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(o.key)},enumerable:!1,configurable:!0}),o})(),J=(function(){function o(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return o.prototype.rasterize=function(e,t,s){var r=this;return new Promise((function(i){var n=s!==void 0?s:document.createElement("canvas");e===null&&(r.markersOnly=!0,r.naturalSize=!1);var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("width",t.width.baseVal.valueAsString),a.setAttribute("height",t.height.baseVal.valueAsString),a.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),a.innerHTML=t.innerHTML,r.naturalSize===!0?(a.width.baseVal.value=e.naturalWidth,a.height.baseVal.value=e.naturalHeight):r.width!==void 0&&r.height!==void 0&&(a.width.baseVal.value=r.width,a.height.baseVal.value=r.height),n.width=a.width.baseVal.value,n.height=a.height.baseVal.value;var c=a.outerHTML,p=n.getContext("2d");r.markersOnly!==!0&&p.drawImage(e,0,0,n.width,n.height);var l=window.URL,d=new Image(n.width,n.height);d.setAttribute("crossOrigin","anonymous");var f=new Blob([c],{type:"image/svg+xml"}),C=l.createObjectURL(f);d.onload=function(){p.drawImage(d,0,0),l.revokeObjectURL(C);var K=n.toDataURL(r.imageType,r.imageQuality);i(K)},d.src=C}))},o})(),O=function(){},Q=(function(){function o(e){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(o.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),o.prototype.addClass=function(e){return this.styleSheet===void 0&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},o.prototype.addRule=function(e){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},o.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),((e=this.styleSheetRoot)!==null&&e!==void 0?e:document.head).appendChild(this.styleSheet),this.addRule(new m("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new m("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
3
- from {
4
- opacity: 0;
5
- }
6
- to {
7
- opacity: 1;
8
- }
9
- `)),this.addRule(new m("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
10
- from {
11
- opacity: 1;
12
- }
13
- to {
14
- opacity: 0;
15
- }
16
- `)),this.addClass(new y("fade_in",`
17
- animation-duration: 0.3s;
18
- animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
19
- `)),this.addClass(new y("fade_out",`
20
- animation-duration: 0.3s;
21
- animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
22
- `))},o.prototype.removeStyleSheet=function(){var e;this.styleSheet&&(((e=this.styleSheetRoot)!==null&&e!==void 0?e:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},o})(),m=function(o,e){this.selector=o,this.style=e},y=function(o,e){this.localName=o,this.style=e},q=(function(){function o(e,t,s,r,i){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=e,this.displayMode=t,this.markerItems=s,this.uiStyleSettings=r,this.styles=i,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return o.prototype.show=function(e){var t=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var s=document.createElement("div");s.className=this.toolbarBlockStyleClass.name,s.style.whiteSpace="nowrap",this.uiContainer.appendChild(s),this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select","Select mode"),this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete","Delete marker"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear","Delete all markers"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo","Undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo","Redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom","Zoom in"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out","Zoom out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(s,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes","Notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(i){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",i.typeName),n.setAttribute("aria-label",i.title),n.setAttribute("title",i.title),n.innerHTML=i.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,i)})),t.buttons.push(n),t.markerButtons.push(n)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var r=document.createElement("div");r.className=this.toolbarBlockStyleClass.name,r.style.whiteSpace="nowrap",r.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(r),this.addActionButton(r,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render","Save and close"),this.addActionButton(r,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close","Close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},o.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},o.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},o.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},o.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t<this.markerButtons.length;t++)t<e||t===e&&this.markerButtons.length-1===e?this.markerButtonBlock.appendChild(this.markerButtons[t]):(t===e&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[t]))}},o.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},o.prototype.resetButtonStyles=function(){var e=this;this.buttons.forEach((function(t){t.className=t.className.replace(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name,"").trim(),t.className=t.className.replace(e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:e.toolbarActiveButtonStyleColorsClass.name,"").trim(),t.className+=" "+(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name)}))},o.prototype.addActionButton=function(e,t,s,r){var i=this,n=document.createElement("div");switch(n.className=""+this.toolbarButtonStyleClass.name,n.innerHTML=t,n.setAttribute("role","button"),n.setAttribute("data-action",s),n.title=r,n.setAttribute("aria-label",r),n.addEventListener("click",(function(){i.actionToolbarButtonClicked(n,s)})),s){case"select":n.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":n.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":n.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":n.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":n.style.fill=this.uiStyleSettings.closeButtonColor}e.appendChild(n),this.buttons.push(n)},o.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new y("toolbar",`
23
- width: 100%;
24
- flex-shrink: 0;
25
- display: flex;
26
- flex-direction: row;
27
- justify-content: space-between;
28
- height: `+this.uiStyleSettings.toolbarHeight+`px;
29
- box-sizing: content-box;
30
- `+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
31
- `+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
32
- overflow: hidden;
33
- `)),this.toolbarStyleColorsClass=this.styles.addClass(new y("toolbar_colors",`
34
- background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
35
- box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
36
- `)),this.toolbarBlockStyleClass=this.styles.addClass(new y("toolbar-block",`
37
- display: inline-block;
38
- box-sizing: content-box;
39
- `)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new y("toolbar-overflow-block",`
40
- position: absolute;
41
- top: `+this.uiStyleSettings.toolbarHeight+`px;
42
- max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
43
- z-index: 10;
44
- box-sizing: content-box;
45
- `)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new y("toolbar-overflow-block_colors",`
46
- background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
47
- `));var e=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new y("toolbar_button",`
48
- display: inline-block;
49
- width: `+(this.uiStyleSettings.toolbarHeight-2*e)+`px;
50
- height: `+(this.uiStyleSettings.toolbarHeight-2*e)+`px;
51
- padding: `+e+`px;
52
- box-sizing: content-box;
53
- `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new y("toolbar_button_colors",`
54
- fill: `+this.uiStyleSettings.toolbarColor+`;
55
- `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new y("toolbar_active_button",`
56
- fill: `+this.uiStyleSettings.toolbarColor+`;
57
- background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
58
- `)),this.styles.addRule(new m("."+this.toolbarButtonStyleClass.name+" svg",`
59
- height: `+this.uiStyleSettings.toolbarHeight/2+`px;
60
- `)),this.styles.addRule(new m("."+this.toolbarButtonStyleColorsClass.name+":hover",`
61
- background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
62
- `))},o.prototype.markerToolbarButtonClicked=function(e,t){this.setActiveButton(e),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(s){return s("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},o.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(s){return s("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},o.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},o.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(s){return s.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},o.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(s){return/delete|notes/.test(s.getAttribute("data-action"))})).forEach((function(s){t.currentMarker===void 0?(s.style.fillOpacity="0.4",s.style.pointerEvents="none"):(s.style.fillOpacity="1",s.style.pointerEvents="all")}))},o})(),$=(function(){function o(e,t,s,r){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=s,this.styles=r,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return o.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new y("toolbox",`
63
- width: 100%;
64
- flex-shrink: 0;
65
- display: flex;
66
- flex-direction: column;
67
- font-family: sans-serif;
68
- `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
69
- box-sizing: content-box;
70
- `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
71
- `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
72
- `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
73
- overflow: hidden;
74
- `)),this.toolboxStyleColorsClass=this.styles.addClass(new y("toolbox_colors",`
75
- color: `+this.uiStyleSettings.toolboxColor+`;
76
- `));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new y("toolbox-button-row",`
77
- display: flex;
78
- cursor: default;
79
- box-sizing: content-box;
80
- `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new y("toolbox-button-row_colors",`
81
- background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
82
- `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new y("toolbox-panel-row",`
83
- display: flex;
84
- `+(this.displayMode==="inline"?"position: absolute;":"")+`
85
- `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
86
- cursor: default;
87
- height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
88
- `+(this.displayMode==="inline"?"width: 100%;":"")+`
89
- box-sizing: content-box;
90
- `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new y("toolbox-panel-row_colors",`
91
- background-color: `+((e=this.uiStyleSettings.toolboxBackgroundColor)!==null&&e!==void 0?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
92
- `)),this.toolboxButtonStyleClass=this.styles.addClass(new y("toolbox_button",`
93
- display: inline-block;
94
- width: `+(this.uiStyleSettings.toolbarHeight-2*t)+`px;
95
- height: `+(this.uiStyleSettings.toolbarHeight-2*t)+`px;
96
- padding: `+t+`px;
97
- box-sizing: content-box;
98
- `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new y("toolbox-button_colors",`
99
- fill: `+this.uiStyleSettings.toolbarColor+`;
100
- `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new y("toolbox-active-button_colors",`
101
- background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
102
- fill: `+this.uiStyleSettings.toolbarColor+`;
103
- `)),this.styles.addRule(new m("."+this.toolboxButtonStyleColorsClass.name+":hover",`
104
- background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
105
- `)),this.styles.addRule(new m("."+this.toolboxButtonStyleClass.name+" svg",`
106
- height: `+this.uiStyleSettings.toolbarHeight/2+`px;
107
- `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div",`
108
- scrollbar-width: thin;
109
- `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar",`
110
- height: 10px;
111
- width: 10px;
112
- `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-track",`
113
- background-color: transparent;
114
- `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-thumb",`
115
- background-color: #444;
116
- border-radius: 20px;
117
- border: 2px solid #aaa;
118
- `))},o.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+((t=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&t!==void 0?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},o.prototype.setPanelButtons=function(e){var t,s,r=this;this.panels=e,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&t!==void 0?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((s=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&s!==void 0?s:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(i){var n;i.uiStyleSettings=r.uiStyleSettings;var a=document.createElement("div");a.className=r.toolboxButtonStyleClass.name+" "+((n=r.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&n!==void 0?n:r.toolboxButtonStyleColorsClass.name),a.innerHTML=i.icon,a.title=i.title,a.setAttribute("role","button"),a.setAttribute("aria-label",i.title),i.id&&a.setAttribute("data-action",i.id),a.addEventListener("click",(function(){r.panelButtonClick(i)})),r.panelButtons.push(a),r.buttonRow.appendChild(a)})),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},o.prototype.panelButtonClick=function(e){var t=this,s=-1;if(e!==this.activePanel){s=this.panels.indexOf(e),this.panelRow.innerHTML="";var r=e.getUi();r.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(r),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){t.displayMode==="inline"?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(i,n){var a,c;i.className=t.toolboxButtonStyleClass.name+" "+(n===s?""+((a=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&a!==void 0?a:t.toolboxActiveButtonStyleColorsClass.name):""+((c=t.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&c!==void 0?c:t.toolboxButtonStyleColorsClass.name))}))},o})(),x=(function(){function o(e,t,s){this.title=e,this.icon=t,this._id=s}return Object.defineProperty(o.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),o})(),g=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>',n||"color-picker-panel")||this;return a.colors=[],a.addTransparent=!1,a.colorBoxes=[],a.colors=s,a.currentColor=r,a.setCurrentColor=a.setCurrentColor.bind(a),a.getColorBox=a.getColorBox.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.overflow="hidden",s.style.overflowX="auto",s.style.whiteSpace="nowrap",this.colors.forEach((function(r){var i=t.getColorBox(r);s.appendChild(i),t.colorBoxes.push(i)})),s},e.prototype.getColorBox=function(t){var s=this,r=this.uiStyleSettings.toolbarHeight/4,i=this.uiStyleSettings.toolbarHeight-r,n=document.createElement("div");n.style.display="inline-block",n.style.boxSizing="content-box",n.style.width=i-2+"px",n.style.height=i-2+"px",n.style.padding="1px",n.style.marginRight="2px",n.style.marginBottom="2px",n.style.borderWidth="2px",n.style.borderStyle="solid",n.style.borderRadius=(i+2)/2+"px",n.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",n.addEventListener("click",(function(){s.setCurrentColor(t,n)}));var a=document.createElement("div");return a.style.display="inline-block",a.style.width=i-2+"px",a.style.height=i-2+"px",a.style.backgroundColor=t,a.style.borderRadius=i/2+"px",t==="transparent"&&(a.style.fill=this.uiStyleSettings.toolboxAccentColor,a.innerHTML=`<svg viewBox="0 0 24 24">
119
- <path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
120
- </svg>`),n.appendChild(a),n},e.prototype.setCurrentColor=function(t,s){var r=this;this.currentColor=t,this.colorBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e})(x),F=(function(){function o(e,t,s){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=s,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(o.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),o.prototype.ownsTarget=function(e){return!1},Object.defineProperty(o.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),o.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},o.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},o.prototype.pointerDown=function(e,t){},o.prototype.dblClick=function(e,t){},o.prototype.manipulate=function(e){},o.prototype.pointerUp=function(e){this.stateChanged()},o.prototype.dispose=function(){},o.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},o.prototype.getState=function(){return{typeName:o.typeName,state:this.state,notes:this.notes}},o.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},o.prototype.scale=function(e,t){},o.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},o.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},o.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var e=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},o.typeName="MarkerBase",o})(),tt=(function(){function o(){this.findGripByVisual=this.findGripByVisual.bind(this)}return o.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},o})(),_=(function(){function o(){this.GRIP_SIZE=10,this.visual=h.createGroup(),this.visual.appendChild(h.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(h.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return o.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},o})(),T=(function(){function o(){}return o.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},o.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},o})(),B=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.left=0,i.top=0,i.width=0,i.height=0,i.defaultSize={x:50,y:20},i.offsetX=0,i.offsetY=0,i.rotationAngle=0,i.CB_DISTANCE=10,i._suppressMarkerCreateEvent=!1,i.container.transform.baseVal.appendItem(h.createTransform()),i.setupControlBox(),i}return u(e,o),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var s=h.createTransform();this._visual.transform.baseVal.appendItem(s)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(t){return!!o.prototype.ownsTarget.call(this,t)||!!(this.controlGrips.findGripByVisual(t)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(t))},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var r=this.unrotatePoint(t);if(this.manipulationStartX=r.x,this.manipulationStartY=r.y,this.offsetX=r.x-this.left,this.offsetY=r.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(s),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(s)){this.activeGrip=this.rotatorGrip;var i=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=i.x-this.width/2,this.top=i.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var n=this.container.transform.baseVal.getItem(0);n.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(n,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(t){var s=this.state;o.prototype.pointerUp.call(this,t),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select",s==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var s=this.unrotatePoint(t);this.state==="creating"?this.resize(t):this.state==="move"?(this.left=this.manipulationStartLeft+(s.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(s.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(s):this.state==="rotate"&&this.rotate(t)},e.prototype.resize=function(t){var s=this.manipulationStartLeft,r=this.manipulationStartWidth,i=this.manipulationStartTop,n=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:s=this.manipulationStartLeft+t.x-this.manipulationStartX,r=this.manipulationStartWidth+this.manipulationStartLeft-s;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:r=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:i=this.manipulationStartTop+t.y-this.manipulationStartY,n=this.manipulationStartHeight+this.manipulationStartTop-i;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:n=this.manipulationStartHeight+t.y-this.manipulationStartY}r>=0?(this.left=s,this.width=r):(this.left=s+r,this.width=-r),n>=0?(this.top=i,this.height=n):(this.top=i+n,this.height=-n),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var s=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*s,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(this.rotationAngle===0)return t;var s=this.container.getCTM(),r=h.createPoint(t.x,t.y);return{x:(r=r.matrixTransform(s)).x,y:r.y}},e.prototype.unrotatePoint=function(t){if(this.rotationAngle===0)return t;var s=this.container.getCTM();s=s.inverse();var r=h.createPoint(t.x,t.y);return{x:(r=r.matrixTransform(s)).x,y:r.y}},e.prototype.select=function(){o.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){o.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=h.createGroup();var t=h.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=h.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=h.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new tt,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},e.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new _;return t.visual.transform.baseVal.appendItem(h.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,s=-t/2,r=s,i=(this.width+this.CB_DISTANCE)/2-t/2,n=(this.height+this.CB_DISTANCE)/2-t/2,a=this.height+this.CB_DISTANCE-t/2,c=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,s,r),this.positionGrip(this.controlGrips.topCenter.visual,i,r),this.positionGrip(this.controlGrips.topRight.visual,c,r),this.positionGrip(this.controlGrips.centerLeft.visual,s,n),this.positionGrip(this.controlGrips.centerRight.visual,c,n),this.positionGrip(this.controlGrips.bottomLeft.visual,s,a),this.positionGrip(this.controlGrips.bottomCenter.visual,i,a),this.positionGrip(this.controlGrips.bottomRight.visual,c,a),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,i,r-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,s,r){var i=t.transform.baseVal.getItem(0);i.setTranslate(s,r),t.transform.baseVal.replaceItem(i,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:T.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:T.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},o.prototype.getState.call(this))},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.left=s.left,this.top=s.top,this.width=s.width,this.height=s.height,this.rotationAngle=s.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(T.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,s.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(T.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,s.containerTransformMatrix))},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s);var r=this.rotatePoint({x:this.left,y:this.top}),i=this.unrotatePoint({x:r.x*t,y:r.y*s});this.left=i.x,this.top=i.y,this.width=this.width*t,this.height=this.height*s,this.adjustControlBox()},e})(F),j=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual)},e.prototype.createVisual=function(){this.visual=h.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&h.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&h.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&h.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&h.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},o.prototype.getState.call(this))},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.opacity=s.opacity,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.title="Rectangle marker",e})(B),S=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>',n||"line-width-panel")||this;return a.widths=[],a.widthBoxes=[],a.widths=s,a.currentWidth=r,a.setCurrentWidth=a.setCurrentWidth.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2",this.widths.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.flexGrow="2",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentWidth(r,i)})),s.appendChild(i);var n=document.createElement("div");n.innerText=r.toString(),n.style.marginRight="5px",i.appendChild(n);var a=document.createElement("div");a.style.minHeight="20px",a.style.flexGrow="2",a.style.display="flex",a.style.alignItems="center";var c=document.createElement("hr");c.style.minWidth="20px",c.style.border="0px",c.style.borderTop=r+"px solid "+t.uiStyleSettings.toolboxColor,c.style.flexGrow="2",a.appendChild(c),i.appendChild(a),t.widthBoxes.push(i)})),s},e.prototype.setCurrentWidth=function(t,s){var r=this;this.currentWidth=t,this.widthBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e})(x),M=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>',n||"line-style-panel")||this;return a.styles=[],a.styleBoxes=[],a.styles=s,a.currentStyle=r,a.setCurrentStyle=a.setCurrentStyle.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2",this.styles.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.styles.length-5+"%",i.style.borderColor=r===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentStyle(r,i)})),s.appendChild(i);var n=document.createElement("div");n.style.minHeight="20px",n.style.flexGrow="2",n.style.overflow="hidden";var a=`<svg width="100" height="20">
121
- <line x1="0" y1="10" x2="100" y2="10" stroke="`+t.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(r!==""?'stroke-dasharray="'+r+'"':"")+` />
122
- </svg>`;n.innerHTML=a,i.appendChild(n),t.styleBoxes.push(i)})),s},e.prototype.setCurrentStyle=function(t,s){var r=this;this.currentStyle=t,this.styleBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e})(x),P=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new g("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="FrameMarker",e.title="Frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',e})(j),et=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text",this.wrapText=!1,this.defaultText="Your text here"},U=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.x1=0,i.y1=0,i.x2=0,i.y2=0,i.defaultLength=50,i.manipulationStartX=0,i.manipulationStartY=0,i.manipulationStartX1=0,i.manipulationStartY1=0,i.manipulationStartX2=0,i.manipulationStartY2=0,i.setupControlBox(),i}return u(e,o),e.prototype.ownsTarget=function(t){return!!o.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.manipulationStartX=t.x,this.manipulationStartY=t.y,this.state==="new"&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(s)?this.activeGrip=this.grip1:this.grip2.ownsTarget(s)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(t){var s=this.state;o.prototype.pointerUp.call(this,t),this.state==="creating"&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(t),this._state="select",s==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){this.state==="creating"?this.resize(t):this.state==="move"?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){o.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){o.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=h.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new _;return t.visual.transform.baseVal.appendItem(h.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,s,r){var i=t.transform.baseVal.getItem(0);i.setTranslate(s,r),t.transform.baseVal.replaceItem(i,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},o.prototype.getState.call(this))},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.x1=s.x1,this.y1=s.y1,this.x2=s.x2,this.y2=s.y2},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.x1=this.x1*t,this.y1=this.y1*s,this.x2=this.x2*t,this.y2=this.y2*s,this.adjustVisual(),this.adjustControlBox()},e})(F),I=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new g("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.selectorLine=h.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=h.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),h.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),h.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',e})(U),W=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>',n||"font-family-panel")||this;return a.fonts=[],a.fontBoxes=[],a.fonts=s,a.currentFont=r,a.setCurrentFont=a.setCurrentFont.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.overflow="hidden",s.style.flexGrow="2",this.fonts.forEach((function(r){var i=document.createElement("div");i.style.display="inline-block",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.fonts.length-5+"%",i.style.borderColor=r===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentFont(r,i)})),s.appendChild(i);var n=document.createElement("div");n.style.display="flex",n.style.minHeight="20px",n.style.flexGrow="2",n.style.fontFamily=r,n.style.overflow="hidden";var a=document.createElement("div");a.style.whiteSpace="nowrap",a.style.overflow="hidden",a.style.textOverflow="ellipsis",a.innerHTML="The quick brown fox jumps over the lazy dog",n.appendChild(a),i.appendChild(n),t.fontBoxes.push(i)})),s},e.prototype.setCurrentFont=function(t,s){var r=this;this.currentFont=t,this.fontBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e})(x),w=(function(o){function e(t,s,r){var i,n=o.call(this,t,s,r)||this;return n.color="transparent",n.padding=5,n.DEFAULT_TEXT="your text here",n.isMoved=!1,n.color=r.defaultColor,n.fontFamily=r.defaultFontFamily,n.text=(i=r.defaultText)!==null&&i!==void 0?i:n.DEFAULT_TEXT,n.defaultSize={x:100,y:30},n.setColor=n.setColor.bind(n),n.setFont=n.setFont.bind(n),n.renderText=n.renderText.bind(n),n.sizeText=n.sizeText.bind(n),n.textEditDivClicked=n.textEditDivClicked.bind(n),n.showTextEditor=n.showTextEditor.bind(n),n.setSize=n.setSize.bind(n),n.positionTextEditor=n.positionTextEditor.bind(n),n.wrapText=n.wrapText.bind(n),n.colorPanel=new g("Color",r.defaultColorSet,r.defaultColor),n.colorPanel.onColorChanged=n.setColor,n.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),n.fontFamilyPanel.onFontChanged=n.setFont,n}return u(e,o),e.prototype.ownsTarget=function(t){if(o.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var s=!1;return this.textElement.childNodes.forEach((function(r){r===t&&(s=!0)})),s},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.bgRectangle=h.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=h.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(h.createTransform()),this.textElement.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.wrapText=function(){function t(p){var l=p[0].length;return p.forEach((function(d){d.length>l&&(l=d.length)})),.35*l/p.length}if(this.text!==""){for(var s=this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/),r=1*this.width/this.height,i=new(Array.bind.apply(Array,E([void 0],s))),n=t(i),a=Number.MAX_VALUE,c=function(){var p=i[0];i.forEach((function(l){l.length>p.length&&(p=l)})),(a=p.lastIndexOf(" ",a-1))>0?(i=[],s.forEach((function(l){for(var d=l;d.length>a;){var f=d.lastIndexOf(" ",a);f<0&&(f=d.indexOf(" ")),f>0?(i.push(d.substring(0,f)),d=d.substring(f).trim()):(i.push(d),d="")}i.push(d)})),n=t(i)):n=-1};n>r;)c();return i.join(`\r
123
- `)}return this.text},e.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);(this.globalSettings.wrapText?this.wrapText():this.text).split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(s){t.textElement.appendChild(h.createTSpan(s.trim()===""?" ":s.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),s=1;if(t.width>0&&t.height>0){var r=(1*this.width-this.width*this.padding*2/100)/t.width,i=(1*this.height-this.height*this.padding*2/100)/t.height;s=Math.min(r,i)}return s},e.prototype.getTextPosition=function(t){var s=window.getComputedStyle(this.textElement).direction==="rtl"?1:-1,r=this.textElement.getBBox(),i=0,n=0;return r.width>0&&r.height>0&&(i=(this.width+s*r.width*t)/2,n=this.height/2-r.height*t/2),{x:i,y:n}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),s=this.getTextScale(),r=this.getTextPosition(s);r.y-=t.y*s,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+r.x+"px, "+r.y+"px) scale("+s+", "+s+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(r.x,r.y),this.textElement.transform.baseVal.getItem(1).setScale(s,s))},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.globalSettings.wrapText?this.renderText():this.sizeText()},e.prototype.setSize=function(){o.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(h.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),h.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(t){var s=this.state;s==="creating"&&(this._suppressMarkerCreateEvent=!0),o.prototype.pointerUp.call(this,t),this.setSize(),(s==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(s){s.stopPropagation()})),this.globalSettings.wrapText||this.textEditor.addEventListener("input",(function(){for(var s=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&s>.9;)s-=.1,t.textEditor.style.fontSize=Math.max(s,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(s){s.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(s){if(s.clipboardData){var r=s.clipboardData.getData("text"),i=window.getSelection();if(!i.rangeCount)return!1;i.deleteFromDocument(),i.getRangeAt(0).insertNode(document.createTextNode(r)),s.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else if(this.globalSettings.wrapText)this.textEditor.style.left=this.left+this.padding+"px",this.textEditor.style.top=this.top+this.padding+"px",this.textEditor.style.width=this.width-2*this.padding+"px",this.textEditor.style.height=this.height-2*this.padding+"px",this.textEditor.style.maxHeight=this.textEditor.style.height,this.textEditor.style.whiteSpace="wrap";else{this.textElement.style.display="";var t=this.getTextScale(),s=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),r=this.textElement.getBBox(),i={x:r.width*t,y:r.height*t};s.x-=i.x/2,s.y-=i.y/2,this.textEditor.style.top=s.y+"px",this.textEditor.style.left=s.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-s.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){o.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),o.prototype.deselect.call(this)},e.prototype.dblClick=function(t,s){o.prototype.dblClick.call(this,t,s),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&h.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&h.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text,wrapText:this.globalSettings.wrapText},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.color=s.color,this.fontFamily=s.fontFamily,this.padding=s.padding,this.text=s.text,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize(),this.globalSettings.wrapText&&this.renderText()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',e})(B),k=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.color="transparent",i.lineWidth=3,i.drawing=!1,i.pixelRatio=1,i.color=r.defaultColor,i.lineWidth=r.defaultStrokeWidth,i.pixelRatio=r.freehandPixelRatio,i.setColor=i.setColor.bind(i),i.addCanvas=i.addCanvas.bind(i),i.finishCreation=i.finishCreation.bind(i),i.setLineWidth=i.setLineWidth.bind(i),i.colorPanel=new g("Color",r.defaultColorSet,r.defaultColor),i.colorPanel.onColorChanged=i.setColor,i.lineWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.lineWidthPanel.onWidthChanged=i.setLineWidth,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.drawingImage=h.createImage(),this.visual.appendChild(this.drawingImage);var t=h.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):o.prototype.pointerDown.call(this,t,s)},e.prototype.manipulate=function(t){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),h.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),h.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(t){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):o.prototype.pointerUp.call(this,t)},e.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},e.prototype.select=function(){this.state==="creating"&&this.finishCreation(),o.prototype.select.call(this)},e.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),o.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),s=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],r=s[0],i=s[1],n=s[2],a=s[3],c=!1,p=0;p<this.canvasElement.height;p++)for(var l=0;l<this.canvasElement.width;l++)t.data[p*this.canvasElement.width*4+4*l+3]>0&&(c=!0,p<i&&(i=p),l<r&&(r=l),p>a&&(a=p),l>n&&(n=l));if(c){this.left=r/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(n-r)/this.pixelRatio,this.height=(a-i)/this.pixelRatio;var d=document.createElement("canvas");d.width=n-r,d.height=a-i,d.getContext("2d").putImageData(this.canvasContext.getImageData(r,i,n-r,a-i),0,0),this.drawingImgUrl=d.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){h.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),h.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({drawingImgUrl:this.drawingImgUrl},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){this.createVisual(),o.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',e})(B),it=(function(o){function e(t,s,r,i){var n=o.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>',i||"arrow-type-panel")||this;return n.typeBoxes=[],n.currentType=s,n.setCurrentType=n.setCurrentType.bind(n),n}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2";for(var r=function(a){var c="both";switch(a){case 0:c="both";break;case 1:c="start";break;case 2:c="end";break;case 3:c="none"}var p=document.createElement("div");if(p.style.display="flex",p.style.flexGrow="2",p.style.alignItems="center",p.style.justifyContent="space-between",p.style.padding="5px",p.style.borderWidth="2px",p.style.borderStyle="solid",p.style.borderColor=c===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",p.addEventListener("click",(function(){t.setCurrentType(c,p)})),s.appendChild(p),c==="both"||c==="start"){var l=document.createElement("div");l.style.display="flex",l.style.alignItems="center",l.style.minHeight="20px",l.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
124
- <polygon points="0,5 10,0 10,10" fill="`+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
125
- </svg>`,l.style.marginLeft="5px",p.appendChild(l)}var d=document.createElement("div");d.style.display="flex",d.style.alignItems="center",d.style.minHeight="20px",d.style.flexGrow="2";var f=document.createElement("hr");if(f.style.minWidth="20px",f.style.border="0px",f.style.borderTop="3px solid "+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee"),f.style.flexGrow="2",d.appendChild(f),p.appendChild(d),c==="both"||c==="end"){var C=document.createElement("div");C.style.display="flex",C.style.alignItems="center",C.style.minHeight="20px",C.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
126
- <polygon points="0,0 10,5 0,10" fill="`+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
127
- </svg>`,C.style.marginRight="5px",p.appendChild(C)}i.typeBoxes.push(p)},i=this,n=0;n<4;n++)r(n);return s},e.prototype.setCurrentType=function(t,s){var r=this;this.currentType=t,this.typeBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings!==void 0?r.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e})(x),L=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.arrowType="end",i.arrowBaseHeight=10,i.arrowBaseWidth=10,i.getArrowPoints=i.getArrowPoints.bind(i),i.setArrowType=i.setArrowType.bind(i),i.arrowTypePanel=new it("Arrow type","end"),i.arrowTypePanel.onArrowTypeChanged=i.setArrowType,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},e.prototype.getArrowPoints=function(t,s){var r=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return t-r/2+","+(s+i/2)+" "+t+","+(s-i/2)+" "+(t+r/2)+","+(s+i/2)},e.prototype.createTips=function(){this.arrow1=h.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=h.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="creating"&&this.createTips()},e.prototype.adjustVisual=function(){if(o.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",h.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),h.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var t=0;Math.abs(this.x1-this.x2)>.1&&(t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var s=this.arrow1.transform.baseVal.getItem(0);s.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(s,0);var r=this.arrow2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(r,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({arrowType:this.arrowType},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.arrowType=s.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',e})(I),X=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor=r.defaultFillColor,i.strokeWidth=0,i.fillPanel=new g("Color",r.defaultColorSet,r.defaultFillColor),i.fillPanel.onColorChanged=i.setFillColor,i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="CoverMarker",e.title="Cover marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',e})(j),Y=(function(o){function e(t,s,r,i,n){var a=o.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>',n||"opacity-panel")||this;return a.opacities=[],a.opacityBoxes=[],a.opacities=s,a.currentOpacity=r,a.setCurrentOpacity=a.setCurrentOpacity.bind(a),a}return u(e,o),e.prototype.getUi=function(){var t=this,s=document.createElement("div");return s.style.display="flex",s.style.overflow="hidden",s.style.flexGrow="2",s.style.justifyContent="space-between",this.opacities.forEach((function(r){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=r===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentOpacity(r,i)})),s.appendChild(i);var n=document.createElement("div");n.innerText=100*r+"%",i.appendChild(n),t.opacityBoxes.push(i)})),s},e.prototype.setCurrentOpacity=function(t,s){var r=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(i){i.style.borderColor=i===s?r.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e})(x),D=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.setOpacity=i.setOpacity.bind(i),i.fillColor=r.defaultHighlightColor,i.strokeWidth=0,i.opacity=r.defaultHighlightOpacity,i.fillPanel=new g("Color",r.defaultColorSet,i.fillColor),i.fillPanel.onColorChanged=i.setFillColor,i.opacityPanel=new Y("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return u(e,o),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&h.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',e})(X),Z='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',N='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',V=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.bgColor="transparent",i.tipPosition={x:0,y:0},i.tipBase1Position={x:0,y:0},i.tipBase2Position={x:0,y:0},i.tipMoving=!1,i.color=r.defaultStrokeColor,i.bgColor=r.defaultFillColor,i.fontFamily=r.defaultFontFamily,i.defaultSize={x:100,y:30},i.setBgColor=i.setBgColor.bind(i),i.getTipPoints=i.getTipPoints.bind(i),i.positionTip=i.positionTip.bind(i),i.setTipPoints=i.setTipPoints.bind(i),i.colorPanel=new g("Text color",r.defaultColorSet,i.color,Z,"text-color-panel"),i.colorPanel.onColorChanged=i.setColor,i.bgColorPanel=new g("Fill color",r.defaultColorSet,i.bgColor,N,"fill-color-panel"),i.bgColorPanel.onColorChanged=i.setBgColor,i.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.tipGrip=new _,i.tipGrip.visual.transform.baseVal.appendItem(h.createTransform()),i.controlBox.appendChild(i.tipGrip.visual),i}return u(e,o),e.prototype.ownsTarget=function(t){return o.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},e.prototype.createTip=function(){h.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=h.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(t,s){this.state==="new"&&o.prototype.pointerDown.call(this,t,s),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(s)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):o.prototype.pointerDown.call(this,t,s)},e.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,o.prototype.pointerUp.call(this,t);else{var s=this.state==="creating";o.prototype.pointerUp.call(this,t),this.setTipPoints(s),this.positionTip()}},e.prototype.manipulate=function(t){if(this.tipMoving){var s=this.unrotatePoint(t);this.tipPosition={x:s.x-this.manipulationStartLeft,y:s.y-this.manipulationStartTop},this.positionTip()}else o.prototype.manipulate.call(this,t)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(h.setAttributes(this.bgRectangle,[["fill",t]]),h.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){t===void 0&&(t=!1);var s=Math.min(this.height/2,15),r=this.height/5;t&&(this.tipPosition={x:s+r/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:s,y:0},this.tipBase2Position={x:s+r,y:0}):(this.tipBase1Position={x:0,y:s},this.tipBase2Position={x:0,y:s+r}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-s-r,y:0},this.tipBase2Position={x:this.width-s,y:0}):(this.tipBase1Position={x:this.width,y:s},this.tipBase2Position={x:this.width,y:s+r}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?i<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-s-r,y:this.height},this.tipBase2Position={x:this.width-s,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-s-r},this.tipBase2Position={x:this.width,y:this.height-s}):i<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(r=this.width/5,s=Math.min(this.width/2,15),this.tipBase1Position={x:s,y:this.height},this.tipBase2Position={x:s+r,y:this.height}):(this.tipBase1Position={x:0,y:this.height-s},this.tipBase2Position={x:0,y:this.height-s-r})},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.positionTip()},e.prototype.positionTip=function(){h.setAttributes(this.tip,[["points",this.getTipPoints()]]);var t=this.tipGrip.visual.transform.baseVal.getItem(0);t.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(t,0)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.positionTip(),o.prototype.select.call(this)},e.prototype.getState=function(){var t=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.bgColor=s.bgColor,this.tipPosition=s.tipPosition,o.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*s},this.positionTip()},e.typeName="CalloutMarker",e.title="Callout marker",e.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',e})(w),A=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.opacity=1,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.setOpacity=i.setOpacity.bind(i),i.createVisual=i.createVisual.bind(i),i.strokePanel=new g("Line color",E(r.defaultColorSet,["transparent"]),r.defaultColor,void 0,"stroke-color-panel"),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new g("Fill color",E(r.defaultColorSet,["transparent"]),i.fillColor,N,"fill-color-panel"),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.opacityPanel=new Y("Opacity",r.defaultOpacitySteps,i.opacity),i.opacityPanel.onOpacityChanged=i.setOpacity,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual)},e.prototype.createVisual=function(){this.visual=h.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&h.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&h.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&h.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&h.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&h.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.opacity=s.opacity,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.typeName="EllipseMarker",e.title="Ellipse marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e})(B),st=(function(o){function e(t,s,r){return o.call(this,t,s,r)||this}return u(e,o),Object.defineProperty(e.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},e.prototype.createTips=function(){this.tip1=h.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.tip1),this.tip2=h.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(h.createTransform()),this.visual.appendChild(this.tip2)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.state==="creating"&&this.createTips()},e.prototype.adjustVisual=function(){if(o.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(h.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),s=this.tip1.transform.baseVal.getItem(0);s.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(s,0);var r=this.tip2.transform.baseVal.getItem(0);r.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(r,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',e})(I),ot=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokePanel.colors=r.defaultColorSet,i.fillColor="transparent",i}return u(e,o),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=o.prototype.getState.call(this);return t.typeName=e.typeName,t},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',e})(A),rt=(function(){function o(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(o.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),o.prototype.addUndoStep=function(e){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},o.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},o.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},o.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return e!==void 0&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},o.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},o})(),nt=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.curveX=0,i.curveY=0,i.manipulationStartCurveX=0,i.manipulationStartCurveY=0,i.setStrokeColor=i.setStrokeColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.positionGrips=i.positionGrips.bind(i),i.addControlGrips=i.addControlGrips.bind(i),i.adjustVisual=i.adjustVisual.bind(i),i.setupControlBox=i.setupControlBox.bind(i),i.resize=i.resize.bind(i),i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.strokePanel=new g("Line color",r.defaultColorSet,r.defaultColor),i.strokePanel.onColorChanged=i.setStrokeColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.selectorCurve=h.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=h.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=t.x,this.curveY=t.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(s)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),h.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),h.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),h.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){o.prototype.setupControlBox.call(this),this.curveControlLine1=h.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=h.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,o.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){o.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},e.prototype.manipulate=function(t){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),o.prototype.manipulate.call(this,t)},e.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),o.prototype.resize.call(this,t),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(t,s){this.curveX=this.curveX*t,this.curveY=this.curveY*s,o.prototype.scale.call(this,t,s)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},o.prototype.getState.call(this));return t.typeName=e.typeName,t},e.prototype.restoreState=function(t){o.prototype.restoreState.call(this,t);var s=t;this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.curveX=s.curveX,this.curveY=s.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',e})(U),at=(function(o){function e(t,s,r){var i=o.call(this,t,s,r)||this;return i.fillColor="transparent",i.strokeColor="transparent",i.strokeWidth=0,i.strokeDasharray="",i.textColor="transparent",i.fontSize="1rem",i.isMoved=!1,i.captionText="Caption",i.PADDING=5,i.captionBoxWidth=0,i.captionBoxHeight=0,i.strokeColor=r.defaultColor,i.strokeWidth=r.defaultStrokeWidth,i.strokeDasharray=r.defaultStrokeDasharray,i.fillColor=r.defaultFillColor,i.textColor=r.defaultStrokeColor,i.fontFamily=r.defaultFontFamily,i.fontSize=r.defaultCaptionFontSize,i.captionText=r.defaultCaptionText,i.setStrokeColor=i.setStrokeColor.bind(i),i.setFillColor=i.setFillColor.bind(i),i.setStrokeWidth=i.setStrokeWidth.bind(i),i.setStrokeDasharray=i.setStrokeDasharray.bind(i),i.createVisual=i.createVisual.bind(i),i.sizeCaption=i.sizeCaption.bind(i),i.setCaptionText=i.setCaptionText.bind(i),i.showTextEditor=i.showTextEditor.bind(i),i.positionTextEditor=i.positionTextEditor.bind(i),i.finishTextEditing=i.finishTextEditing.bind(i),i.setFont=i.setFont.bind(i),i.setTextColor=i.setTextColor.bind(i),i.strokePanel=new g("Line color",E(r.defaultColorSet,["transparent"]),i.strokeColor,void 0,"stroke-color-panel"),i.strokePanel.onColorChanged=i.setStrokeColor,i.fillPanel=new g("Fill color",E(r.defaultColorSet,["transparent"]),i.fillColor,N,"fill-color-panel"),i.fillPanel.onColorChanged=i.setFillColor,i.strokeWidthPanel=new S("Line width",r.defaultStrokeWidths,r.defaultStrokeWidth),i.strokeWidthPanel.onWidthChanged=i.setStrokeWidth,i.strokeStylePanel=new M("Line style",r.defaultStrokeDasharrays,r.defaultStrokeDasharray),i.strokeStylePanel.onStyleChanged=i.setStrokeDasharray,i.fontFamilyPanel=new W("Font",r.defaultFontFamilies,r.defaultFontFamily),i.fontFamilyPanel.onFontChanged=i.setFont,i.textColorPanel=new g("Text color",r.defaultColorSet,i.textColor,Z,"text-color-panel"),i.textColorPanel.onColorChanged=i.setTextColor,i}return u(e,o),e.prototype.ownsTarget=function(t){return!(!o.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.frame&&t!==this.captionBg&&t!==this.captionElement)},e.prototype.createVisual=function(){this.visual=h.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=h.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=h.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=h.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},e.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},e.prototype.pointerDown=function(t,s){o.prototype.pointerDown.call(this,t,s),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(t),this._state="creating")},e.prototype.manipulate=function(t){o.prototype.manipulate.call(this,t),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(t){o.prototype.resize.call(this,t),this.setSize()},e.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),h.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),h.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(s){s.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(s){s.key==="Enter"&&t.finishTextEditing(t.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(s){s.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){t.finishTextEditing(t.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){t.finishTextEditing(t.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},e.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},e.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},e.prototype.setFont=function(t){this.captionElement&&h.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},e.prototype.setTextColor=function(t){this.captionElement&&h.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},e.prototype.setSize=function(){o.prototype.setSize.call(this),h.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},e.prototype.pointerUp=function(t){o.prototype.pointerUp.call(this,t),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.dblClick=function(t,s){o.prototype.dblClick.call(this,t,s),this.showTextEditor()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&h.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&h.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&h.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&h.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},o.prototype.getState.call(this));return t.typeName=this.typeName,t},e.prototype.restoreState=function(t){var s=t;this.fillColor=s.fillColor,this.strokeColor=s.strokeColor,this.strokeWidth=s.strokeWidth,this.strokeDasharray=s.strokeDasharray,this.textColor=s.textColor,this.fontFamily=s.fontFamily,this.captionText=s.captionText,this.fontSize=s.fontSize,this.createVisual(),o.prototype.restoreState.call(this,t),this.setSize()},e.prototype.scale=function(t,s){o.prototype.scale.call(this,t,s),this.setSize()},e.typeName="CaptionFrameMarker",e.title="Caption frame marker",e.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',e})(B),v=(function(){function o(e,t){t===void 0&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(o.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),o.prototype.preventDefault=function(){this._defaultPrevented=!0},o})(),ht=(function(o){function e(t,s,r){var i=o.call(this,t,!1)||this;return i.dataUrl=s,i.state=r,i}return u(e,o),e})(v),b=(function(o){function e(t,s,r){r===void 0&&(r=!1);var i=o.call(this,t,r)||this;return i.marker=s,i}return u(e,o),e})(v),lt=(function(){function o(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return o.prototype.addEventListener=function(e,t){this[e].push(t)},o.prototype.removeEventListener=function(e,t){var s=this[e].indexOf(t);s>-1&&this[e].splice(s,1)},o})(),pt=(function(){function o(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new et,this._isOpen=!1,this.undoRedoManager=new rt,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new lt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=o.instanceCounter++,this.styles=new Q(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this),this.addMarkerEvents=this.addMarkerEvents.bind(this)}return Object.defineProperty(o.prototype,"ALL_MARKER_TYPES",{get:function(){return[P,k,L,w,ot,A,D,V,st,X,I,nt,at]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[P,k,L,w,A,D,V]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"BASIC_MARKER_TYPES",{get:function(){return[P,k,L,w,D]},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(s){if(typeof s=="string"){var r=t.ALL_MARKER_TYPES.find((function(i){return i.typeName===s}));r!==void 0&&t._availableMarkerTypes.push(r)}else t._availableMarkerTypes.push(s)}))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(o.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),o.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),R.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},o.prototype.show=function(){var e=this;this.styles.styleSheetRoot===void 0&&O.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=O.styleSheetRoot),this.markers.splice(0),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new v(e))}))},o.prototype.render=function(){return H(this,void 0,void 0,(function(){var e;return z(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new J).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},o.prototype.close=function(e){var t=this;if(e===void 0&&(e=!1),this.isOpen){var s=!1;e||this.eventListeners.beforeclose.forEach((function(r){var i=new v(t,!0);r(i),i.defaultPrevented&&(s=!0)})),s||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(r){return r(new v(t))})),this.detachEvents(),this._isOpen=!1)}},o.prototype.addMarkersToToolbar=function(){for(var e,t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];(e=this._availableMarkerTypes).push.apply(e,t)},o.prototype.addRenderEventListener=function(e){this.addEventListener("render",(function(t){e(t.dataUrl,t.state)}))},o.prototype.removeRenderEventListener=function(e){},o.prototype.addCloseEventListener=function(e){this.addEventListener("close",(function(){e()}))},o.prototype.removeCloseEventListener=function(e){},o.prototype.setupResizeObserver=function(){var e=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return e.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},o.prototype.onPopupTargetResize=function(){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/e>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,s=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/e;this.resize(t,s)},o.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},o.prototype.resize=function(e,t){this._isResizing=!0;var s=e/this.imageWidth,r=t/this.imageHeight;this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(s,r),this._isResizing=!1},o.prototype.scaleMarkers=function(e,t){var s,r=this;this._currentMarker&&this._currentMarker instanceof w?this._currentMarker.scale(e,t):(s=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(i){i!==r._currentMarker&&i.scale(e,t)})),s!==void 0&&this.setCurrentMarker(s)},o.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},o.prototype.setTopLeft=function(){var e=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left,this.top=e.top-t.top},o.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},o.prototype.addDefs=function(){for(var e,t=[],s=0;s<arguments.length;s++)t[s]=arguments[s];this.defs=h.createDefs(),this.addDefsToImage(),(e=this.defs).append.apply(e,t)},o.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},o.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},o.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},o.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("touchmove",(function(e){return e.preventDefault()})),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},o.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},o.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},o.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},o.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var e=document.createElement("a");e.href="https://markerjs.com/",e.target="_blank",e.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},o.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},o.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},o.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},o.prototype.showUI=function(){var e;switch(this.settings.displayMode==="popup"&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=this.settings.uiOffsetTop!==void 0?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0,s=this.target.offsetLeft+((e=this.settings.uiOffsetLeft)!==null&&e!==void 0?e:0);this.coverDiv.style.top=t+"px",this.coverDiv.style.left=s+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="fixed",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.settings.displayMode==="popup"&&(this.uiDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px"),this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new q(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1",this.settings.displayMode==="popup"&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex",this.settings.displayMode==="popup"&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),this.settings.displayMode==="inline"&&this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new $(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},o.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv),this.coverDiv.remove(),this.coverDiv=null},o.prototype.removeMarker=function(e){this.markerImage.removeChild(e.container),this.markers.indexOf(e)>-1&&this.markers.splice(this.markers.indexOf(e),1),e.dispose()},o.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep()),this.toolbar.setSelectMode()},o.prototype.toolbarButtonClicked=function(e,t){if(e==="marker"&&t!==void 0)this.createNewMarker(t);else if(e==="action")switch(t){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},o.prototype.deleteSelectedMarker=function(){var e=this;if(this._currentMarker!==void 0&&this._currentMarker.state==="select"){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(r){var i=new b(e,e._currentMarker,!0);r(i),i.defaultPrevented&&(t=!0)})),!t){var s=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(r){return r(new b(e,s))}))}}},o.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var a=new b(e,void 0,!0);n(a),a.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var s=function(n){var a=r.markers[n];r.setCurrentMarker(r.markers[n]),r._currentMarker.dispose(),r.markerImage.removeChild(r._currentMarker.container),r.markers.splice(r.markers.indexOf(r._currentMarker),1),r.eventListeners.markerdelete.forEach((function(c){return c(new b(e,a))}))},r=this,i=this.markers.length-1;i>=0;i--)s(i);this.addUndoStep()}},Object.defineProperty(o.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),o.prototype.showNotesEditor=function(){var e;this._currentMarker!==void 0&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=(e=this._currentMarker.notes)!==null&&e!==void 0?e:"",this.overlayContainer.appendChild(this.notesArea))},o.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},o.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},o.prototype.addUndoStep=function(){var e=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var t=this.getState(),s=this.undoRedoManager.getLastUndoStep();if(!s||s.width===t.width&&s.height===t.height){var r=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),r<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(i){return i(new v(e))}))}else this.undoRedoManager.replaceLastUndoStep(t)}},o.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},o.prototype.undoStep=function(){var e=this,t=this.undoRedoManager.undo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(s){return s(new v(e))})))},o.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},o.prototype.redoStep=function(){var e=this,t=this.undoRedoManager.redo();t!==void 0&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(s){return s(new v(e))})))},o.prototype.stepZoom=function(){var e=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=e<this.zoomSteps.length-1?this.zoomSteps[e+1]:this.zoomSteps[0]},o.prototype.panTo=function(e){this.contentDiv.scrollBy({left:this.prevPanPoint.x-e.x,top:this.prevPanPoint.y-e.y}),this.prevPanPoint=e},o.prototype.startRenderAndClose=function(){return H(this,void 0,void 0,(function(){var e,t,s=this;return z(this,(function(r){switch(r.label){case 0:return[4,this.render()];case 1:return e=r.sent(),t=this.getState(),this.eventListeners.render.forEach((function(i){return i(new ht(s,e,t))})),this.close(!0),[2]}}))}))},o.prototype.getState=function(e){e===!0&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(s){return t.markers.push(s.getState())})),t},o.prototype.restoreState=function(e){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);e.markers.forEach((function(s){var r=t._availableMarkerTypes.find((function(n){return n.typeName===s.typeName}));if(r!==void 0){var i=t.addNewMarker(r);i.restoreState(s),t.addMarkerEvents(i),t.markers.push(i)}})),e.width&&e.height&&(e.width!==this.imageWidth||e.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/e.width,this.imageHeight/e.height),this.eventListeners.restorestate.forEach((function(s){return s(new v(t))}))},o.prototype.addNewMarker=function(e){var t=h.createGroup();return this.markerImage.appendChild(t),new e(t,this.overlayContainer,this.settings)},o.prototype.createNewMarker=function(e){var t,s=this;(t=typeof e=="string"?this._availableMarkerTypes.find((function(r){return r.typeName===e})):e)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),this.addMarkerEvents(this._currentMarker),this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(r){return r(new b(s,s._currentMarker))})))},o.prototype.addMarkerEvents=function(e){e.onMarkerCreated=this.markerCreated,e.onColorChanged=this.colorChanged,e.onFillColorChanged=this.fillColorChanged,e.onStateChanged=this.markerStateChanged},o.prototype.markerCreated=function(e){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(e),this.setCurrentMarker(e),e instanceof k&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(k):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(s){return s(new b(t,e))}))},o.prototype.colorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=e,this.settings.defaultStrokeColor=e)},o.prototype.fillColorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=e)},o.prototype.markerStateChanged=function(e){var t=this;this.eventListeners.markerchange.forEach((function(s){return s(new b(t,e))}))},o.prototype.setCurrentMarker=function(e){var t=this;this._currentMarker!==e&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(s){return s(new b(t,t._currentMarker))}))),this._currentMarker=e,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(s){return s(new b(t,t._currentMarker))})))},o.prototype.onPointerDown=function(e){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||e.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var t=this.markers.find((function(s){return s.ownsTarget(e.target)}));t!==void 0?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:e.clientX,y:e.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY))},o.prototype.onDblClick=function(e){if(this._isFocused||this.focus(),this.mode==="select"){var t=this.markers.find((function(s){return s.ownsTarget(e.target)}));t!==void 0&&t!==this._currentMarker&&this.setCurrentMarker(t),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target):this.setCurrentMarker()}},o.prototype.onPointerMove=function(e){this.touchPoints!==1&&e.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||e.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(e.clientX,e.clientY)):this.zoomLevel>1&&this.panTo({x:e.clientX,y:e.clientY}))},o.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&(this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep())},o.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},o.prototype.onKeyUp=function(e){this._currentMarker===void 0||this.notesArea!==void 0||e.key!=="Delete"&&e.key!=="Backspace"||this.deleteSelectedMarker()},o.prototype.clientToLocalCoordinates=function(e,t){var s=this.markerImage.getBoundingClientRect(),r=s.width/this.imageWidth/this.zoomLevel,i=s.height/this.imageHeight/this.zoomLevel;return{x:(e-s.left)/this.zoomLevel/r,y:(t-s.top)/this.zoomLevel/i}},o.prototype.onWindowResize=function(){this.positionUI()},o.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects(),t=e.length>0&&e.item(0)&&e.item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},o.prototype.addLicenseKey=function(e){R.addKey(e)},o.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},o.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},o.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(o.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),o.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new v(e))})))},o.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new v(e))})))},o.instanceCounter=0,o})();export{R as Activator,L as ArrowMarker,it as ArrowTypePanel,V as CalloutMarker,at as CaptionFrameMarker,g as ColorPickerPanel,X as CoverMarker,nt as CurveMarker,ot as EllipseFrameMarker,A as EllipseMarker,lt as EventListenerRepository,W as FontFamilyPanel,P as FrameMarker,k as FreehandMarker,D as HighlightMarker,I as LineMarker,M as LineStylePanel,S as LineWidthPanel,U as LinearMarkerBase,pt as MarkerArea,v as MarkerAreaEvent,ht as MarkerAreaRenderEvent,F as MarkerBase,b as MarkerEvent,st as MeasurementMarker,Y as OpacityPanel,j as RectangleMarker,B as RectangularBoxMarkerBase,tt as RectangularBoxMarkerGrips,_ as ResizeGrip,et as Settings,O as Style,y as StyleClass,Q as StyleManager,h as SvgHelper,w as TextMarker,x as ToolboxPanel,T as TransformMatrix};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import f from"./MF3FGXHI.js";import e from"./26FWESH3.js";import d from"./2K4ODNJ4.js";import{c as re}from"./Y7HBWU3M.js";import c from"./N5ERJZPG.js";import b from"./JHYH555K.js";import{g as fe,i as I,j as v,k as N,l as pe,m as li,n as ci}from"./WNKDEOFZ.js";import a from"./5FMEOIBS.js";import{e as J,f as Ve}from"./EZV7JSQJ.js";import{c as Y,d as R,n as E}from"./LRNADJJG.js";import{$ as Oe,G as ce,H as ge,I as Ne,V as we,_ as Re,ba as Ee,f as Le,wa as Me}from"./PAIRUVLU.js";import{a as qe,f as ke}from"./KX7KGXKQ.js";import{d as Te,g as Z,k as Ie}from"./SP2IPHWF.js";import{a as se}from"./QP5UAIC6.js";import{a as le}from"./XJFVSX2E.js";import{a as C,b as A,e as ve,h as Ce,k as G,n as W,o as Ae,v as q}from"./547RDEMV.js";export default $arcgis.t(([{substitute:D},{$a:He,Ab:ii,B:$e,H:je,Jb:si,K:We,Q:Ye,R:ie,S:Ue,Sa:ze,T:$,U:Xe,Ua:ye,V:k,_b:ti,ac:ri,cb:Qe,cc:ai,d:Pe,dc:ni,fb:Ze,gc:oi,m:K,mb:Ge,n:De,nb:Je,ob:j,pb:Ke,qb:U,rb:ei,sa:_e,sb:ue,t:ee,tb:me,wb:de},{a:V,b:te,d:L,e:Se,f:gi,g:Fe,r:yi},{a:ui},{a:mi,e:di},{b:_},{a:fi,b:xe,f:P,g:X,i:Be}])=>{var is=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.size),e},Bi=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.unit),e},ss=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.timeAggregationType),e},ts=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.trimIncompleteTimeInterval),e},rs=i=>{let e,s=i.series[0];return k(s)&&(e=s.temporalBinning?.nullPolicy),e},hi=(i,e)=>{e?.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.size=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},bi=(i,e)=>{e?.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.nullPolicy=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},as=(i,e)=>{e.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.unit=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},ns=(i,e)=>{e.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.timeAggregationType=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},os=(i,e)=>{e.series?.forEach(s=>{k(s)&&(s.temporalBinning??={},s.temporalBinning.trimIncompleteTimeInterval=i)}),L({config:e,value:null,axisIndex:1,isMax:!1}),L({config:e,value:null,axisIndex:1,isMax:!0})},ls=i=>{hi(0,i)};function cs(i,e){let s;return e!==void 0&&(s={...e},s.legend!==void 0&&(s.legend.position=i)),s}function gs(i,e){let s;return e!==void 0&&(s={...e},s.legend!==void 0&&(s.legend.visible=i)),s}function ys(i,e){let s;return e!==void 0&&(s={...e,rotated:i}),s}function Ti(i){let e;return i!==void 0&&(e={...i},delete e.axes?.[0]?.minimum,delete e.axes?.[0]?.maximum,delete e.axes?.[1]?.minimum,delete e.axes?.[1]?.maximum),e}function us(i,e){return e!=null||fe(i)}async function ms(i){let{config:e,layer:s,abortSignal:a}=i,r=!1;return J(s)||Ve(e)?e&&J(s)&&(r=await Ze({config:e,layer:s,abortSignal:a})):r=!0,r}async function Ii(i){let{queryObject:e,chartConfig:s,splitByField:a,errorStrings:r,abortSignal:t,runtimeDataFilters:o,ignoreViewExtent:c,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F}=i,n=[],m,u=Z(s),y=u.series[0],g=ii({queryObject:e,chartConfig:u,runtimeDataFilters:o,ignoreViewExtent:c});if(g.outStatistics?.[0]?.outStatisticFieldName&&(g.outStatistics[0].outStatisticFieldName=Le.outStatistics.outStatisticFieldName),k(y)&&Xe({xAxisValueFormatType:Pe(u),setTimeBinningInfoWhenNotProvided:l,seriesConfig:y,queryObject:e})&&je(a,e)){let{temporalBinning:p,x:b}=y,{uniqueQuery:T}=ye({chartConfig:u,queryConfig:g,queryObject:e,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F}),x=s.axes?.[0].valueFormat.type===C.DateAxisFormat?s.axes[0].valueFormat.intlOptions.timeZone:void 0;m=await Qe({queryObject:e,dateField:b,splitByField:a,queryConfig:T,axisTimeZone:x,temporalBinning:p,errorStrings:r,abortSignal:t}),n=Array.from(new Set(m.flatMap(S=>{let{stackedAttributes:w}=S,d=[];return w&&(d=w.map(B=>B[a]).filter(B=>B!==void 0)),d})).values())}else{let{uniqueQuery:p}=ye({chartConfig:u,queryObject:e,queryConfig:g,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F}),{elementCount:b}=await ti({chartConfig:u,queryObject:e,queryConfig:g,behaviorAfterLimit:F?.behaviorAfterLimit,numberMaxOfFeaturesToFetch:p.num,abortSignal:t});m=await He({queryObject:e,queryConfig:p,featureCount:b,errorStrings:r,abortSignal:t}),n=Array.from(new Set(m.map(T=>T.attributes[a]).filter(T=>T!==void 0)).values())}return{allValues:n,preFetchedQueryResponse:m}}function vi(i,e){let s=new Map;return i.series.forEach(a=>{let r=ie({where:a.query?.where,normalize:!0,escape:!1});e&&r!==null&&(r=Number(r));let t=le([a]);t!==void 0&&s.set(t,[...s.get(t)??[],r])}),s}function Ci(i){let{allValues:e,configUniqueValuesPerSeriesType:s,initialConfigWasEmpty:a}=i,r=new Map;return Array.from(s.keys()).forEach(t=>{let o=s.get(t)??[],c=[];a?c=e:e.forEach(l=>{o.includes(l)||c.push(l)}),r.set(t,c)}),r}function Ai(i){let{chartConfig:e,missingValue:s,splitByField:a,seriesTemplate:r}=i,t=JSON.parse(JSON.stringify({...e.series[0],...r}));if(t.query){if(t.id=`${s}-${e.series.length}-${Date.now()}`,t.name=`${s}`,t.query.outStatistics?.[0]!==void 0){let c=t.id;t.query.outStatistics[0].outStatisticFieldName=c,"y"in t&&(t.y=c)}let o=typeof s=="number"||s===null?s:`'${s}'`;t.query.where=`${a}=${o}`}return t}async function qi(i){let{updateSplitBySeries:e,config:s,queryObject:a,errorStrings:r,abortSignal:t,runtimeDataFilters:o,ignoreViewExtent:c,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F}=i,{seriesTemplate:n}=e??{},m;if(a&&!J(a)&&e!==void 0&&s!==void 0&&(s.series.length>0||n!==void 0)&&e.addMissingSeries){let u=s.series.length===0;s.series.length===0&&n!==void 0&&s.series.push(n);let y=$(s.series);if(y===R.BoxPlotMonoFieldAndSplitBy||y===R.BoxPlotMultiFieldsAndSplitBy||y===R.BoxPlotMonoFieldAndCategoryAndSplitBy||y===R.BarAndLineSplitBy||y===R.BarAndLineSplitByNoAggregation){let g=Ye(s.series[0]?.query?.where),p=Ge(a),b=Je(g,p),T=b?Ke(b):!1,x=await Ii({queryObject:a,chartConfig:s,splitByField:g,abortSignal:t,runtimeDataFilters:o,ignoreViewExtent:c,setTimeBinningInfoWhenNotProvided:l,returnFeaturesExtent:f,chartLimits:F,errorStrings:r}),{allValues:S}=x;if({preFetchedQueryResponse:m}=x,S.length>0){let w=vi(s,T),d=Ci({allValues:S,configUniqueValuesPerSeriesType:w,initialConfigWasEmpty:u});Array.from(d.keys()).forEach(B=>{(d.get(B)??[]).forEach(M=>{s.series.push(Ai({chartConfig:s,seriesTemplate:n,missingValue:M,splitByField:g}))}),u&&s.series.shift()})}}}return m}function ki(i,e){e&&!fe(e)&&(e=We({chartConfig:e,queryObject:i}))}async function ds(i){let{configToAlter:e,layer:s,addMissingSeries:a,updateSplitBySeries:r,chartContainer:t,queryObject:o,abortSignal:c,runtimeDataFilters:l,ignoreViewExtent:f,setTimeBinningInfoWhenNotProvided:F,returnFeaturesExtent:n,chartLimits:m,errorStrings:u}=i,y=e,g;return y&&(ki(s,y),y=await ui(y,s,void 0,c),a&&o&&(g=await qi({updateSplitBySeries:r,config:y,queryObject:o,errorStrings:u,abortSignal:c,runtimeDataFilters:l,ignoreViewExtent:f,setTimeBinningInfoWhenNotProvided:F,returnFeaturesExtent:n,chartLimits:m})),y=_e(y,t)),{alteredConfig:y,preFetchedQueryResponse:g}}function Li(i,e){let s=!1;if(e!==void 0){let a=ai({key:$e.Average,splitBy:e});s=Number.isFinite(i[a])}return s}function fs(i){let{data:e,config:s,showEmptySeries:a}=i,r=s.series.length,t=Z(s),o=!1;if(!a&&r>1&&e){let c=ri(e),l=le(s?.series),f=$(s?.series),F=new Set;switch(l){case C.ComboLineAndBarSeries:case C.BarSeries:case C.RadarSeries:case C.LineSeries:{t.series.forEach(m=>{if(Array.isArray(c)){let u="";"y"in m&&(u=Array.isArray(m.y)?m.y[0]:m.y,f===R.BarAndLineSplitByNoAggregation&&(u=`${u}_${ie({where:m.query?.where,keepSurroundingQuotes:!1,escape:!1})}`),c.some(y=>oi({dataItem:y,x:m.x,y:u,aggregationType:s.series[0].query?.outStatistics?.[0]?.statisticType}))&&F.add(m))}});break}case C.BoxPlotSeries:{if(De(s)){let m=ze(s);s.series.forEach(u=>{let y,g;u.type===C.BoxPlotSeries?(y=e.dataItems,g=y?.some(p=>ni({dataItem:p,splitBy:u.query?.where,showOutliers:m}))):u.type===C.LineSeries&&(y=e.meanLines,g=y?.some(p=>Li(p,u.query?.where))),g&&F.add(u)})}break}}let n=Array.from(F.values());o=n.length>0&&n.length<r,o&&(t.series=n)}return{seriesFilteredOut:o,filteredConfig:t}}var ps=i=>i.hideEmptyRowsAndColumns,Ss=(i,e)=>{i.hideEmptyRowsAndColumns=e},Fs=(i,e)=>{let s=i.series[0];s.heatRulesType=e},xs=i=>i.series[0].heatRulesType,Bs=(i,e)=>{let s=i.series[0];s.gradientRules=e},hs=i=>i.series[0].gradientRules,bs=i=>{let{yField:e,config:s,layerInfo:a}=i,{layerFieldsInfo:r}=a,t=re(1,s),o=Ni(s),c=_(s),l=s.series[0];if(typeof e=="string"&&o!==e&&l&&(l.y=e,Ti(s),o===t||c)){let f=E(r,e);V(s,1,f)}},Ni=i=>i.series[0].y??"",Ts=i=>{let{binning:e,config:s,commonStrings:a}=i,r=s.series[0];if(r.xTemporalBinning=e,e?.unit!==void 0&&e.unit in a.utilsStrings.heatChartCalendarDatePartsUnits){let t=a.utilsStrings.heatChartCalendarDatePartsUnits[e.unit];V(s,0,t)}},Is=i=>i.series[0].xTemporalBinning,vs=i=>{let{binning:e,config:s,commonStrings:a}=i,r=s.series[0];if(r.yTemporalBinning=e,e?.unit!==void 0&&e.unit in a.utilsStrings.heatChartCalendarDatePartsUnits){let t=a.utilsStrings.heatChartCalendarDatePartsUnits[e.unit];V(s,1,t)}},Cs=i=>i.series[0].yTemporalBinning,wi=(i,e)=>{e.orderOptions??={};let s=e.axes?.[0]?.valueFormat?.type==="category"?q.Category:q.YValue,a=he(e)[0],r=e.axes?.[1]?.valueFormat?.type==="category"?q.Category:q.YValue,t=he(e)[1],o={...e.orderOptions.data??{},orderType:q.MultiAxes};a===se.customSort&&s===q.Category&&(o.orderByX=[...i]),t===se.customSort&&r===q.Category&&(o.orderByY=[...i]),Object.keys(o).length>1&&(e.orderOptions.data=o)},As=(i,e)=>{let s=e.series[0];s.gridLine&&(s.gridLine.width=i)},qs=i=>i.series[0].gridLine?.width,ks=(i,e)=>{let s=e.series[0],a=i?.length===4&&i.every(r=>typeof r=="number");s.gridLine&&a&&(s.gridLine.color=i)},Ls=i=>i.series[0].gridLine?.color,Ns=(i,e)=>{let s=e.legend;s&&(s.position=i)},ws=i=>i.legend?.position??ve.Bottom,Rs=i=>i.series[0].query?.outStatistics?.[0]?.onStatisticField,Os=i=>{let{field:e,config:s,layerInfo:a,commonStrings:r}=i,t=s.series[0].query?.outStatistics?.[0],o=ne(s,a,r);t?(t.onStatisticField=e,t.outStatisticFieldName=`${t.statisticType}_${e}`):s.series[0].query={outStatistics:[{onStatisticField:e,outStatisticFieldName:`${A.Count}_${e}`,statisticType:A.Count}]},o&&s.title&&(s.title.content.text=Q(s,a,r))},Es=i=>i.series[0].query?.outStatistics?.[0].statisticType??A.Count,Ms=i=>{let{aggregationType:e,config:s,layerInfo:a,commonStrings:r}=i,t=s.series[0]?.query?.outStatistics?.[0],o=ne(s,a,r);t&&e!==A.NoAggregation&&(t.statisticType=e,t.outStatisticFieldName=`${e}_${t.onStatisticField}`),(e===A.Count||e===A.Sum)&&Ri(W.Zero,s),o&&s.title&&(s.title.content.text=Q(s,a,r))},Vs=i=>i.nullPolicy,Ri=(i,e)=>{e.nullPolicy=i},Ps=i=>i.series[0].emptyCells,Ds=(i,e)=>{e.series[0].emptyCells=i},$s=i=>i.series[0].emptyCells?.text,js=(i,e)=>{e.series[0].emptyCells?e.series[0].emptyCells.text=i:e.series[0].emptyCells={text:i}},Ws=i=>i.includeLeapDay,Ys=(i,e)=>{e.includeLeapDay=i},Us=i=>i.series[0].emptyCells?.symbol,Xs=(i,e)=>{e.series[0].emptyCells?e.series[0].emptyCells.symbol=i:e.series[0].emptyCells={symbol:i}};function _s(i){return i.viewType}function zs(i,e){si(e)||(e.viewType=i)}function Hs(i){return i.series[0].classBreaksRules?.breaksCount??Y.classBreaks.breaksCount}function Qs(i,e){e.series[0].classBreaksRules!==void 0?e.series[0].classBreaksRules.breaksCount=i??Y.classBreaks.breaksCount:e.series[0].classBreaksRules={breaksCount:i??Y.classBreaks.breaksCount}}function Zs(i){return i.series[0].classBreaksRules?.classificationMethod}function Gs(i,e){e.series[0].classBreaksRules!==void 0?e.series[0].classBreaksRules.classificationMethod=i:e.series[0].classBreaksRules={classificationMethod:i},e.series[0].classBreaksRules.breaksCount=e.series[0].classBreaksRules.breaksCount??Y.classBreaks.breaksCount}function Js(i,e){e.firstDayOfWeek=i}function Ks(i){return i.firstDayOfWeek}function et(i){return i.series[0].classBreaksRules?.colorRampInfo?.name}function it(i,e){e.series[0].classBreaksRules!==void 0?e.series[0].classBreaksRules.colorRampInfo={...e.series[0].classBreaksRules.colorRampInfo,name:i}:e.series[0].classBreaksRules={colorRampInfo:{name:i,flipped:!1}}}function st(i){return i.series[0].classBreaksRules?.colorRampInfo?.flipped??!1}function tt(i,e){e.series[0].classBreaksRules!==void 0?e.series[0].classBreaksRules.colorRampInfo={...e.series[0].classBreaksRules.colorRampInfo,flipped:i}:e.series[0].classBreaksRules={colorRampInfo:{flipped:i}}}function z(i){let{seriesIndex:e,xAxisField:s,aggregationType:a,config:r,layerInfo:t,commonStrings:o}=i,c=j(t?.layer).idField,l,f=r.series[e??0],F=!1,n=!1,m=!1;if(f===void 0){let g=r.series;F=g.slice(0,e).every(p=>I(p)),n=g.slice(0,e).every(p=>v(p)),m=g.slice(0,e).every(p=>pe(p))}else F=I(f),n=v(f),m=pe(f);F?l=Re({commonStrings:o,seriesIndex:e,objectIDField:c}):n?l=Oe({commonStrings:o,seriesIndex:e,objectIDField:c}):m?l=we(o,c):l=Ee({seriesIndex:e,objectIDField:c,commonStrings:o});let u=r.series[0]?.dataLabels,y={...l,x:s,y:"",dataLabels:{...l.dataLabels,type:l.dataLabels?.type??C.Text,content:{...l.dataLabels?.content,...u?.content,type:ke.TS},visible:u?.visible??!1}};if(y.query={groupByFieldsForStatistics:[s]},a!==A.NoAggregation&&c!==void 0){let g=`${a}_${c}_0`.toUpperCase();y.y=g,y.query.outStatistics=[{statisticType:a,onStatisticField:c,outStatisticFieldName:g}]}if(k(r.series[0])&&k(y)){let g;if(r?.series?.[0]!==void 0&&(g=$(r.series)),g!==R.BarAndLineNoAggregation&&g!==R.BarAndLineSplitByNoAggregation){let p=Bi(r);p===G.Quarter&&(p=G.Month),y.temporalBinning={...r.series[0]?.temporalBinning,unit:p}}}return Z(y)}function Q(i,e,s){let{layerFieldsInfo:a}=e,{idField:r,isTraditionalTypeOID:t}=j(e.layer),o=P(i),c=ae(i),l=Si(i),f=be(i),F=t&&(c.length===0||c.includes(r)),n=Me(l,s),m=F?"":c.map(x=>E(a??[],x)).join(", "),u=E(a??[],o),y=E(a??[],f),g=i.series.some(x=>N(x)),p=g?"category":"xAxisField",b=u,T="";if(Be({fieldName:o,numericFields:c,fieldList:a}))T=D(s.titleLabels.aggrTypeOfAggrFields,{aggregationType:n,aggregationFields:m});else if(l===A.NoAggregation){let x=F?r:m;if(f===""){let S=g?"aggrTypeCategory":"aggrTypeXAxisField";T=D(s.titleLabels[S],{aggregationType:x,[p]:b})}else{let S=g?"aggrTypeCategoryBySplitBy":"aggrTypeXAxisFieldBySplitBy";T=D(s.titleLabels[S],{aggregationType:x,[p]:b,splitByField:y})}}else if(l===A.Count)if(f===""){let x=g?"aggrTypeCategory":"aggrTypeXAxisField";T=D(s.titleLabels[x],{aggregationType:n,[p]:b})}else{let x=g?"aggrTypeCategoryBySplitBy":"aggrTypeXAxisFieldBySplitBy";T=D(s.titleLabels[x],{aggregationType:n,[p]:b,splitByField:y})}else if(f!==""){let x=g?"aggrTypeOfAggrFieldByCategoryBySplitByField":"aggrTypeOfAggrFieldByXAxisFieldBySplitByField";T=D(s.titleLabels[x],{aggregationType:n,aggregationField:m,[p]:b,splitByField:y})}else if(c.length>0){let x=g?"aggrTypeOfAggrFieldsByCategory":"aggrTypeOfAggrFieldsByXAxisField";T=D(s.titleLabels[x],{aggregationType:n,aggregationFields:m,[p]:b})}return T}var pi=i=>ie({where:i.query?.where,normalize:!1,escape:!1})??"",Si=i=>i?.series?.[0]?.query?.outStatistics?.[0]?.statisticType??A.NoAggregation,be=Te(i=>{let e=i?.series?.[0]?.query?.where?.split("=")[0].trim()??"";return Ue(i?.series?.[0]?.query?.where)?"":e},i=>i?.series?.[0]?.query?.where),ae=i=>{let e=[];if(be(i)==="")e=i?.series.map(s=>{let a=s.query?.outStatistics?.map(r=>r.onStatisticField)??[];return a?.length>0?a:s.y}).flat()??[];else{let s=i?.series?.[0],a=s?.query?.outStatistics?.[0]?.onStatisticField??[s?.y].flat()[0];e=a!==void 0?[a]:[]}return e.filter(s=>s!=="")};function Oi(i){let{numericFields:e,aggregationType:s,config:a,layerInfo:r}=i,t=!1;s===A.Count?t=!0:s===A.NoAggregation&&(t=e.every(l=>{let f=r.layerFieldsInfo.find(F=>F.name===l);return f!==void 0?me(f):!1})),Fe(a,1,t);let o=a.series.some(l=>I(l)),c=a.series.some(l=>v(l));if(o||c){let l=P(a),f=r.layerFieldsInfo.find(n=>n.name===l),F=f!==void 0&&me(f);Fe(a,0,F)}}var he=i=>{let e;if(K(i)){let s=i.orderOptions?.data?.orderByX??[""],a=i.orderOptions?.data?.orderByY??[""],r=i.axes?.[0]?.valueFormat?.type==="category"?q.Category:q.YValue,t=i.axes?.[1]?.valueFormat?.type==="category"?q.Category:q.YValue;e=[xe(s,r),xe(a,t)]}else{let s=i.orderOptions?.data?.orderType??q.Category,a=i.orderOptions?.data&&"orderBy"in i.orderOptions.data?i.orderOptions.data.orderBy:Ce.Ascending;e=[fi(a,s)]}return e};function Ei(i){let{xAxisField:e,numericFields:s,aggregationType:a,config:r,layerInfo:t,commonStrings:o}=i,{layerFieldsInfo:c}=t,l=!1,f=z({config:r,xAxisField:e,aggregationType:a,layerInfo:t,seriesIndex:0,commonStrings:o}),F=X({config:r,xAxisField:e,numericFields:s,aggregationType:a,layer:t.layer,fieldList:c}).name,n={...f,id:`series_${Date.now()}`,name:o.axisLabels.values,x:ee,y:F},m=[];for(let y of s)m.push({onStatisticField:y,outStatisticFieldName:`${y}_0`.toUpperCase(),statisticType:a});n.query={outStatistics:m};let u=r.series[0];return u!==void 0&&(n.id=u.id,(I(n)&&I(u)||v(n)&&v(u))&&H(n,u),r.colorMatch||(N(u)&&N(n)?n.fillSymbol=u.fillSymbol:(I(n)&&I(u)||v(n)&&v(u))&&(n.lineSymbol=u.lineSymbol,n.markerSymbol=u.markerSymbol),l=!0),n.id=u.id,u.name!==f.name&&(n.name=u.name)),r.series.length===1&&((I(n)||v(n))&&H(n,r.series[0]),r.colorMatch||(N(n)?n.fillSymbol=r.series[0].fillSymbol:(I(n)||v(n))&&(n.lineSymbol=r.series[0].lineSymbol,n.markerSymbol=r.series[0].markerSymbol),l=!0)),r.colorMatch=!l,[n]}function Fi(i){let{xAxisField:e,numericFields:s,aggregationType:a,config:r,layerInfo:t,commonStrings:o}=i,{layerFieldsInfo:c}=t,l=j(t.layer).idField,f=[],F=!1;for(let g=0;g<s.length;g+=1){let p=z({config:r,xAxisField:e,aggregationType:a,layerInfo:t,seriesIndex:g,commonStrings:o}),b=r.series[g]?.y,T=typeof b=="string"?b:X({config:r,xAxisField:e,numericFields:s,aggregationType:a,layer:t.layer,numericFieldIndex:g,fieldList:c}).name,x=s[g],S={...p,query:{...p.query}};s&&x!==l&&(S={...S,id:x,name:E(c,x)});let w=x;S.query!==void 0&&(a!==A.NoAggregation?(w=T,S.query.outStatistics=[{...p.query?.outStatistics?.[0]??{},onStatisticField:x,outStatisticFieldName:T,statisticType:a}]):delete S.query.outStatistics),S.y=w;let d=r.series.find(B=>B.query?.outStatistics?.[0]?.onStatisticField===x&&B.query.where===void 0||B.query?.outStatistics===void 0&&(B.y===x||B.x===x));if(d!==void 0&&typeof d.y=="string"&&d.y.trim()!==""){(I(S)&&I(d)||v(S)&&v(d))&&H(S,d),r.colorMatch||(N(S)&&N(d)?S.fillSymbol=d.fillSymbol:(I(S)&&I(d)||v(S)&&v(d))&&(S.lineSymbol=d.lineSymbol,S.markerSymbol=d.markerSymbol),F=!0);let B=z({config:r,xAxisField:e,aggregationType:a,layerInfo:t,seriesIndex:g,commonStrings:o});S.id=d.id,d.id!==B.id&&d.name!==B.name&&(S.id=d.id,S.name=d.name),S.assignToSecondValueAxis=d.assignToSecondValueAxis,S.type===C.HeatSeries&&d.type===C.HeatSeries&&(S.y=d.y,S.heatRulesType=d.heatRulesType)}f.push(S)}let n=f.filter(g=>N(g)),m=f.filter(g=>I(g)||v(g)),u=r.series.filter(g=>N(g)),y=r.series.filter(g=>I(g)||v(g));return u.length===1&&n.length===1&&!r.colorMatch&&(N(u[0])&&N(n[0])&&(n[0].fillSymbol=u[0].fillSymbol),F=!0),y.length===1&&m.length===1&&((I(y[0])&&I(m[0])||v(y[0])&&v(m[0]))&&H(m[0],y[0]),r.colorMatch||((I(y[0])&&I(m[0])||v(y[0])&&v(m[0]))&&(m[0].lineSymbol=y[0].lineSymbol,m[0].markerSymbol=y[0].markerSymbol),F=!0)),r.colorMatch=!F,f}function rt(i){let{aggregationType:e,config:s,layerInfo:a,commonStrings:r}=i,{layerFieldsInfo:t,layer:o}=a,c=P(s),l=ae(s),f=ne(s,a,r),F=xi(s,a,r);if(s.series.forEach((n,m)=>{let u=X({config:s,xAxisField:c,numericFields:l,aggregationType:e,layer:o,seriesIndex:m,numericFieldIndex:m,fieldList:t}).name;e!==A.NoAggregation?(n.y=u,n.query={...n.query,outStatistics:[{...n.query?.outStatistics?.[0],outStatisticFieldName:u,statisticType:e,onStatisticField:n.query?.outStatistics?.[0]?.onStatisticField??l[m]}]}):(delete n.query?.outStatistics,n.y=l[m])}),f&&s.title&&(s.title.content.text=Q(s,a,r)),F&&s.series[0].type!==C.HeatSeries){let n=te({config:s,layerInfo:a,commonStrings:r,numericFields:l,aggregationType:e});V(s,1,n)}}function Mi(i){let{splitByField:e,xAxisField:s,numericFields:a,aggregationType:r,config:t,layerInfo:o,commonStrings:c,splitByFieldInfos:l}=i,{layer:f,layerFieldsInfo:F}=o,{categoriesArray:n,splitByFieldType:m}=l,u=a.length===0?j(f).idField:a[0],y=[],g=!1;if(n.length===0){y=Fi({xAxisField:s,numericFields:a,aggregationType:r,config:t,layerInfo:o,commonStrings:c});for(let p of y)p.query&&(p.query.where=`${e}=''`)}else for(let p=0;p<n.length;p+=1){let b=n[p],T=X({config:t,xAxisField:s,numericFields:a,aggregationType:r,layer:o.layer,seriesIndex:p,splitByField:e,fieldList:F}).name,x=z({config:t,xAxisField:s,aggregationType:r,layerInfo:o,seriesIndex:p,commonStrings:c}),S=de({queryObject:o.layer,fieldName:e,fieldValue:b??""}),w=`${b}`,d={...x,id:w,name:S??w,y:T,query:{...x.query,where:`${e}=${m===qe.String&&b!==null?`'${b}'`:b}`,outStatistics:r!==A.NoAggregation?[{...x.query?.outStatistics?.[0]??{},onStatisticField:u,outStatisticFieldName:T,statisticType:r}]:void 0}};r===A.NoAggregation&&(d.query!==void 0&&(delete d.query.outStatistics,delete d.query.groupByFieldsForStatistics),d.y=u);let B=t.series.find(M=>String(pi(M)).trim().replace(/'/gu,"")===w);B!==void 0&&((I(d)&&I(B)||v(d)&&v(B))&&H(d,B),t.colorMatch||(N(d)&&N(B)?d.fillSymbol=B.fillSymbol:(I(d)&&I(B)||v(d)&&v(B))&&(d.lineSymbol=B.lineSymbol,d.markerSymbol=B.markerSymbol),g=!0),d.id=B.id,d.name=B.name,d.assignToSecondValueAxis=B.assignToSecondValueAxis),d.query&&(d.query.fetchNullValues=t.series.some(M=>M.query?.fetchNullValues)),y.push(d)}return t.colorMatch=!g,y}var at=i=>{let{xAxisFieldName:e,splitByField:s,numericFields:a,aggregationType:r,config:t,layerInfo:o,commonStrings:c,splitByFieldInfos:l}=i,{layerFieldsInfo:f}=o??{},F=di(t),n=P(t),m=f.find(h=>h.name===n),u=t.series[0].query?.fetchNullValues,y="nullCategory"in t.series?.[0]?t.series[0].nullCategory:void 0,g=t.series[0]?.query===void 0,p=f.find(h=>h.name===e),b=ne(t,o,c),T=xi(t,o,c),x=Vi(t,o),S=Se(t),w=t.series.some(h=>N(h)),d=li(t.series),B=ci(t.series),M=K(t),O={};M&&(O.classBreaksRules=t.series[0]?.classBreaksRules,O.xTemporalBinning=t.series[0]?.xTemporalBinning,O.yTemporalBinning=t.series[0]?.yTemporalBinning,O.emptyCells=t.series[0]?.emptyCells,O.nullPolicy=t.nullPolicy);let oe=!1;if(ei(p)?S=ce():!ue(m)&&ue(p)?S=ge():!U(m)&&U(p)?(S=ge(),oe=!0):U(m)&&!U(p)&&(w?S=ce():S=Ne(),oe=!0),S!==void 0&&gi(t,c,S),F===0&&(t.series=[z({config:t,xAxisField:e,aggregationType:r,layerInfo:o,commonStrings:c})]),t.series.forEach(h=>{h.x=e,h.query!==void 0&&(h.query.groupByFieldsForStatistics=[e])}),s===""||a.length>1?Be({fieldName:e,numericFields:a,fieldList:f})?t.series=Ei({config:t,layerInfo:o,xAxisField:e,numericFields:a,aggregationType:r,commonStrings:c}):t.series=Fi({config:t,layerInfo:o,xAxisField:e,numericFields:a,aggregationType:r,commonStrings:c}):l&&(t.series=Mi({config:t,layerInfo:o,splitByField:s,xAxisField:e,numericFields:a,aggregationType:r,commonStrings:c,splitByFieldInfos:l})),x&&t.series[0].type!==C.HeatSeries){let h=E(f,e);V(t,0,h)}if(T&&t.series[0].type!==C.HeatSeries){let h=te({config:t,layerInfo:o,commonStrings:c,numericFields:a,aggregationType:r});V(t,1,h)}if(b&&t.title&&(t.title.content.text=Q(t,o,c)),L({config:t,value:null,axisIndex:1,isMax:!1}),L({config:t,value:null,axisIndex:1,isMax:!0}),Oi({numericFields:a,aggregationType:r,config:t,layerInfo:o}),(d||B)&&(L({config:t,value:null,axisIndex:0,isMax:!1}),L({config:t,value:null,axisIndex:0,isMax:!0}),oe)){let h=S?.type===C.DateAxisFormat?W.Null:W.Interpolate;bi(h,t)}M&&(t.series[0].classBreaksRules=O.classBreaksRules,t.series[0].xTemporalBinning=O.xTemporalBinning,t.series[0].yTemporalBinning=O.yTemporalBinning,t.series[0].emptyCells=O.emptyCells,t.nullPolicy=O.nullPolicy),g?t.series.forEach(h=>{delete h.query}):u&&t.series.forEach(h=>{h.query&&(h.query.fetchNullValues=u)}),y&&t.series.forEach(h=>{(h.type===C.BarSeries||h.type===C.LineSeries||h.type===C.RadarSeries)&&(h.nullCategory=y)})},H=(i,e)=>{i.markerVisible=e.markerVisible,i.lineSmoothed=e.lineSmoothed,i.showArea=e.showArea,i.areaColor=e.areaColor,i.stackNegativeValuesToBaseline=e.stackNegativeValuesToBaseline,e.lineSymbol&&(i.lineSymbol={...e.lineSymbol,color:i.lineSymbol?.color}),e.markerSymbol&&(i.markerSymbol={...e.markerSymbol,color:i.markerSymbol?.color})},nt=i=>{let{config:e,seriesIndex:s,layerInfo:a,commonStrings:r}=i,t=e.series?.[s],o=be(e),c;if($(e.series)===R.BarAndLineFromFields)c=r.axisLabels.values;else if(Ie(o)){let l=t.query?.outStatistics?.[0]?.onStatisticField;l!==void 0&&l!==j(a.layer).idField&&(c=E(a.layerFieldsInfo,l))}else{let l=String(pi(t)).trim().replace(/'/gu,"");c=de({queryObject:a.layer,fieldName:o,fieldValue:l??""})??l}return c??t.id},ot=(i,e)=>{if(K(e))wi(i,e);else{e.orderOptions??={};let s=e.orderOptions?.data?.orderType;he(e)[0]===se.customSort&&s===q.Category&&(e.orderOptions.data={orderType:q.Category,orderBy:[...i]})}},lt=async i=>{let{config:e,layerInfo:s,errorStrings:a}=i,r=P(e),t=Se(e)?.type,o=ae(e),c=$(e.series),l=[];return t===C.CategoryAxisFormat&&(c===R.BarAndLineFromFields||r===ee?l=o.map(f=>E(s?.layerFieldsInfo,f)):r.trim()!==""&&r!==ee&&s!==void 0&&(l=await yi({layerInfo:s,config:e,category:r,errorStrings:a}))),l};function ne(i,e,s){let a=Q(i,e,s),r=mi(i),t=_(i);return a===r||t}function xi(i,e,s){let a=te({config:i,layerInfo:e,commonStrings:s,numericFields:ae(i),aggregationType:Si(i)}),r=re(1,i),t=_(i);return a===r||t}function Vi(i,e){let s=E(e.layerFieldsInfo,P(i)),a=re(0,i),r=_(i);return s===a||r}function ct(i){return k(i.series[0])?i.series[0].binTemporalData??!0:!1}function gt(i,e){e?.series.forEach(s=>{(s?.type===C.BarSeries||s?.type===C.LineSeries)&&(s.binTemporalData=i,i?s.temporalBinning={unit:G.Day,size:0,timeAggregationType:Ae.Start,trimIncompleteTimeInterval:!0,nullPolicy:W.Null}:delete s.temporalBinning)})}return{a:is,b:Bi,c:ss,d:ts,e:rs,f:hi,g:bi,h:as,i:ns,j:os,k:ls,l:cs,m:gs,n:ys,o:Ti,p:us,q:ms,r:ds,s:fs,t:ps,u:Ss,v:Fs,w:xs,x:Bs,y:hs,z:bs,A:Ni,B:Ts,C:Is,D:vs,E:Cs,F:As,G:qs,H:ks,I:Ls,J:Ns,K:ws,L:Rs,M:Os,N:Es,O:Ms,P:Vs,Q:Ri,R:Ps,S:Ds,T:$s,U:js,V:Ws,W:Ys,X:Us,Y:Xs,Z:_s,_:zs,$:Hs,aa:Qs,ba:Zs,ca:Gs,da:Js,ea:Ks,fa:et,ga:it,ha:st,ia:tt,ja:Q,ka:Si,la:be,ma:ae,na:he,oa:rt,pa:at,qa:nt,ra:ot,sa:lt,ta:ct,ua:gt}},"intl",a,b,c,d,e,f)
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{k as d}from"./WNKDEOFZ.js";var o=(s,e)=>d(e.series?.[s])?e.series?.[s].hideOversizedSideBySideLabels:void 0,v=(s,e,i)=>{d(i.series?.[e])&&(i.series[e].hideOversizedSideBySideLabels=s)},t=(s,e)=>d(e.series?.[s])?e.series?.[s].hideOversizedStackedLabels:void 0,S=(s,e,i)=>{[e!==void 0?i.series?.[e]:i.series].flat().forEach(r=>{d(r)&&(r.hideOversizedStackedLabels=s)})};export{o as a,v as b,t as c,S as d};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import{b as g}from"./IHO3OLL3.js";import{a as h}from"./MRTKZZTF.js";import{f as r}from"./KX7KGXKQ.js";import"./SP2IPHWF.js";import"./NZR4L5AA.js";import{A as n,B as p,G as c,i as t,n as o,y as a,z as l}from"./CHQDKVVQ.js";import"./U67P6YAZ.js";var m={jsAppFlyout:"js-app-flyout"},i=class extends n{constructor(){super(...arguments),this._messages=h(),this.popoverElement=a(),this.placement="leading",this.open=!1,this.arcgisChartsConfigFormatPopoverColorChange=o(),this.arcgisChartsConfigFormatPopoverSymbolChange=o(),this.arcgisChartsConfigFormatPopoverTextChange=o(),this.arcgisChartsConfigPopoverClose=o()}static{this.properties={messageOverrides:0,selectedElement:0,referenceElement:0,placement:1,open:5}}async reposition(){await this.popoverElement.value?.reposition()}updated(){g(this.popoverElement.value,this.open)}closePopover(){this.open=!1,this.arcgisChartsConfigPopoverClose.emit()}updateSymbolProperties(e){this.selectedElement=e.target.lineStyle,this.arcgisChartsConfigFormatPopoverSymbolChange.emit(e.detail)}updateTextProperties(e){this.selectedElement=e.target.fontStyle,this.arcgisChartsConfigFormatPopoverTextChange.emit(e.detail)}updateColorProperties(e){this.selectedElement=e.detail,this.arcgisChartsConfigFormatPopoverColorChange.emit(e.detail)}render(){let e=this.selectedElement,s=this.selectedElement;return t`<div class=${p(m.jsAppFlyout)}><calcite-popover .referenceElement=${this.referenceElement??document.body} .placement=${this.placement} .open=${!this.open} label @calcitePopoverClose=${this.closePopover} pointer-disabled auto-close ${l(this.popoverElement)}>${Array.isArray(e)?t`<arcgis-charts-config-color-style .header=${this._messages.backgroundElement} enable-close .open=${this.open} .selectedColor=${e} @arcgisChartsConfigColorStyleClose=${this.closePopover} @arcgisChartsConfigColorStyleChange=${this.updateColorProperties}></arcgis-charts-config-color-style>`:null}${s?.type===r.SLS?t`<arcgis-charts-config-line-style .header=${this._messages.lineStyle} .open=${this.open} enable-close .lineStyle=${s} @arcgisChartsConfigLineStyleClose=${this.closePopover} @arcgisChartsConfigLineStyleChange=${this.updateSymbolProperties}></arcgis-charts-config-line-style>`:null}${s?.type===r.TS?t`<arcgis-charts-config-font-style .header=${this._messages.textStyle} .open=${this.open} enable-close .fontStyle=${s} @arcgisChartsConfigFontStyleClose=${this.closePopover} @arcgisChartsConfigFontStyleChange=${this.updateTextProperties}></arcgis-charts-config-font-style>`:null}</calcite-popover></div>`}};c("arcgis-charts-config-format-popover",i);export{i as ArcgisChartsConfigFormatPopover};
@@ -1,2 +0,0 @@
1
- /* COPYRIGHT Esri - https://js.arcgis.com/5.2/LICENSE.txt */
2
- import e from"./2K4ODNJ4.js";import d from"./N5ERJZPG.js";import c from"./JHYH555K.js";import b from"./5FMEOIBS.js";import{w as k}from"./LRNADJJG.js";import{C as f,E as p,c as a}from"./PAIRUVLU.js";export default $arcgis.t(([{T:E},{q:N},{b:i,c:l},{a:R,b:q,d:U,f:M}])=>{var G=Object.defineProperty,W=Object.getOwnPropertyDescriptor,X=(e,t,o,c)=>{for(var r=W(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&G(t,o,r),r},Z=e=>e.title?.content,H=(e,t)=>{if(e){let o=R(t);t.title===void 0&&(t.title=p({text:"",visible:!0,font:f(a.ChartTitle),type:a.ChartTitle})),t.title.content=e,t.title.content.text=o}},b=class extends i{get titleSymbol(){return Z(this._config)}set titleSymbol(t){H(t,this._config)}};X([l],b.prototype,"titleSymbol");var J=Object.defineProperty,K=Object.getOwnPropertyDescriptor,Q=(e,t,o,c)=>{for(var r=K(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&J(t,o,r),r},g=class extends i{get config(){return this._config}set config(t){this._config=t}};Q([l],g.prototype,"config");var S=class extends i{get layer(){return this.layerInfo?.layer}},$=e=>e.id,A=(e,t)=>{t.id=e},V=class extends i{get chartId(){return $(this._config)}set chartId(t){A(t,this._config)}},tt=e=>e.version,w=class extends i{get version(){return tt(this._config)}},et=Object.defineProperty,rt=Object.getOwnPropertyDescriptor,ot=(e,t,o,c)=>{for(var r=rt(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&et(t,o,r),r},Y=e=>e.subtitle?.content.text??"",st=(e,t)=>{t.subtitle!==void 0?t.subtitle.content.text=e:e!==void 0&&(t.subtitle=p({text:e,visible:!0,font:f(a.ChartSubtitle)}))},d=class extends i{get subtitleText(){return Y(this._config)}set subtitleText(t){st(t,this._config)}};ot([l],d.prototype,"subtitleText");var nt=Object.defineProperty,it=Object.getOwnPropertyDescriptor,ct=(e,t,o,c)=>{for(var r=it(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&nt(t,o,r),r},lt=e=>e.subtitle?.content,at=(e,t)=>{if(e){let o=Y(t);t.subtitle===void 0&&(t.subtitle=p({text:"",visible:!0,font:f(a.ChartSubtitle),type:a.ChartSubtitle})),t.subtitle.content=e,t.subtitle.content.text=o}},u=class extends i{get subtitleSymbol(){return lt(this._config)}set subtitleSymbol(t){at(t,this._config)}};ct([l],u.prototype,"subtitleSymbol");var ft=Object.defineProperty,pt=Object.getOwnPropertyDescriptor,bt=(e,t,o,c)=>{for(var r=pt(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&ft(t,o,r),r},z=e=>e.footer?.content.text??"",gt=(e,t)=>{t.footer!==void 0?t.footer.content.text=e:e!==void 0&&(t.footer=p({text:e,visible:!0,font:f(a.DescriptionText)}))},h=class extends i{get descriptionText(){return z(this._config)}set descriptionText(t){gt(t,this._config)}};bt([l],h.prototype,"descriptionText");var dt=Object.defineProperty,ut=Object.getOwnPropertyDescriptor,ht=(e,t,o,c)=>{for(var r=ut(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&dt(t,o,r),r},yt=e=>e.footer?.content,vt=(e,t)=>{if(e){let o=z(t);t.footer===void 0&&(t.footer=p({text:"",visible:!0,font:f(a.DescriptionText),type:a.DescriptionText})),t.footer.content=e,t.footer.content.text=o}},y=class extends i{get descriptionSymbol(){return yt(this._config)}set descriptionSymbol(t){vt(t,this._config)}};ht([l],y.prototype,"descriptionSymbol");var xt=Object.defineProperty,Ot=Object.getOwnPropertyDescriptor,_t=(e,t,o,c)=>{for(var r=Ot(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&xt(t,o,r),r},jt=e=>e.title?e.title.visible??!0:!1,Pt=(e,t)=>{t.title!==void 0?t.title.visible=e:t.title=p({text:"",visible:e,font:f(a.ChartTitle)})},v=class extends i{get chartTitleVisibility(){return jt(this._config)}set chartTitleVisibility(t){Pt(t,this._config)}};_t([l],v.prototype,"chartTitleVisibility");var mt=Object.defineProperty,Dt=Object.getOwnPropertyDescriptor,Tt=(e,t,o,c)=>{for(var r=Dt(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&mt(t,o,r),r},St=e=>e.subtitle?e.subtitle.visible??!0:!1,Vt=(e,t)=>{t.subtitle!==void 0?t.subtitle.visible=e:t.subtitle=p({text:"",visible:e,font:f(a.ChartSubtitle)})},x=class extends i{get chartSubtitleVisibility(){return St(this._config)}set chartSubtitleVisibility(t){Vt(t,this._config)}};Tt([l],x.prototype,"chartSubtitleVisibility");var wt=Object.defineProperty,Ct=Object.getOwnPropertyDescriptor,Ft=(e,t,o,c)=>{for(var r=Ct(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&wt(t,o,r),r},B=e=>e.footer?.visible??!1,It=(e,t)=>{t.footer!==void 0?t.footer.visible=e:e!==B(t)&&(t.footer=p({text:"",visible:!0,font:f(a.DescriptionText)}))},O=class extends i{get descriptionVisibility(){return B(this._config)}set descriptionVisibility(t){It(t,this._config)}};Ft([l],O.prototype,"descriptionVisibility");var Lt=Object.defineProperty,kt=Object.getOwnPropertyDescriptor,Et=(e,t,o,c)=>{for(var r=kt(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&Lt(t,o,r),r},Nt=e=>e.chartRenderer,Rt=(e,t)=>{t.chartRenderer=e},_=class extends i{get chartRenderer(){return Nt(this._config)}set chartRenderer(t){Rt(t,this._config)}};Et([l],_.prototype,"chartRenderer");var qt=Object.defineProperty,Ut=Object.getOwnPropertyDescriptor,Mt=(e,t,o,c)=>{for(var r=Ut(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&qt(t,o,r),r},Yt=e=>e.background,zt=(e,t)=>{t.background=e},j=class extends i{get backgroundColor(){return Yt(this._config)}set backgroundColor(t){zt(t,this._config)}};Mt([l],j.prototype,"backgroundColor");var Bt=Object.defineProperty,Gt=Object.getOwnPropertyDescriptor,Wt=(e,t,o,c)=>{for(var r=Gt(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&Bt(t,o,r),r},Xt=(e,t)=>t.series[e].visible??!0,Zt=(e,t)=>{k({detail:e},t)},P=class extends i{getSeriesVisibility(t){return Xt(t,this._config)}setSeriesVisibility(t){Zt(t,this._config)}};Wt([l],P.prototype,"setSeriesVisibility");var Ht=(e,t)=>t.series[e]?.id,C=class extends i{getSeriesId(t){return Ht(t,this._config)}},Jt=(e,t)=>t.series.findIndex(o=>o.id===e),F=class extends i{getSeriesIndex(t){return Jt(t,this._config)}},Kt=e=>E(e.series),I=class extends i{get chartSubType(){return Kt(this._config)}},Qt=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,At=(e,t,o,c)=>{for(var r=$t(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&Qt(t,o,r),r},te=(e,t)=>{let o;return e.length!==0&&t<e.length&&(o=e[t].dataTooltipValueFormat),o},ee=e=>{let{series:t,seriesIndex:o,valueFormat:c}=e;t.length!==0&&o<t.length&&(t[o].dataTooltipValueFormat=c)},m=class extends i{getDataTooltipValueFormat(t){return te(this._config.series,t)}setDataTooltipValueFormat(t,o){ee({series:this._config.series,seriesIndex:t,valueFormat:o})}};At([l],m.prototype,"setDataTooltipValueFormat");var re=Object.defineProperty,oe=Object.getOwnPropertyDescriptor,se=(e,t,o,c)=>{for(var r=oe(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&re(t,o,r),r},ne=(e,t)=>{t.series.forEach(o=>{o.query&&(o.query.fetchNullValues=e)})},ie=e=>e.series.some(t=>t.query?.fetchNullValues),D=class extends i{get fetchNULLValues(){return ie(this._config)}set fetchNULLValues(t){ne(t,this._config)}};se([l],D.prototype,"fetchNULLValues");var ce=Object.defineProperty,le=Object.getOwnPropertyDescriptor,ae=(e,t,o,c)=>{for(var r=le(t,o),s=e.length-1,n;s>=0;s--)(n=e[s])&&(r=n(t,o,r)||r);return r&&ce(t,o,r),r},fe=e=>e.dataFilters,pe=(e,t)=>{e!==void 0?t.dataFilters=e:delete t.dataFilters},T=class extends i{getDataFilters(){return fe(this._config)}async setDataFilters(t){pe(t,this._config),this.dispatchEvent(new CustomEvent("arcgisChartsModelDataChange"))}};ae([l],T.prototype,"setDataFilters");var L=class extends i{},be=[g,S,V,q,b,w,d,u,h,y,v,x,O,_,j,P,C,F,M,I,m,D,U,T];N(L,be);return L},b,c,d,e)