@arcgis/charts-components 5.0.0-next.56 → 5.0.0-next.58

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 (333) hide show
  1. package/dist/cdn/{OCQ56IN3.js → 25SE67UH.js} +2 -2
  2. package/dist/cdn/{GKOV7ERW.js → 2DIGHSF3.js} +2 -2
  3. package/dist/cdn/{AFF7FRLD.js → 2GC3XC3L.js} +2 -2
  4. package/dist/cdn/2OFWM34K.js +4 -0
  5. package/dist/cdn/{GSDYB2KH.js → 2RSVC3QA.js} +2 -2
  6. package/dist/cdn/{KJH6ZMOG.js → 2RYGC6OJ.js} +2 -2
  7. package/dist/cdn/{GMUHVH6Z.js → 2TT3DGEZ.js} +1 -1
  8. package/dist/cdn/{GXL3ZCDY.js → 3GOVA4KO.js} +2 -2
  9. package/dist/cdn/3NVWMJ76.js +244 -0
  10. package/dist/cdn/{GAAZJJGV.js → 45ZMZE6R.js} +2 -2
  11. package/dist/cdn/{HFCKNGFQ.js → 4BSCDP37.js} +2 -2
  12. package/dist/cdn/{TYDQTIX4.js → 5BT4RAHV.js} +2 -2
  13. package/dist/cdn/{CICRKJIG.js → 5FMYBMMQ.js} +2 -2
  14. package/dist/cdn/{3A7AY7XA.js → 5JREZGZL.js} +2 -2
  15. package/dist/cdn/{5QOHBE4V.js → 5WWFDWSF.js} +2 -2
  16. package/dist/cdn/{DW7I3ZQR.js → 63NFDA52.js} +2 -2
  17. package/dist/cdn/{XPTUWPG7.js → 6424IHSD.js} +2 -2
  18. package/dist/cdn/{ZEO7RCDZ.js → 65I5P6Q2.js} +2 -2
  19. package/dist/cdn/{Q4LXVBRB.js → 667OUZ6R.js} +2 -2
  20. package/dist/cdn/{EHINAW5B.js → 66B6RTQD.js} +2 -2
  21. package/dist/cdn/{QKUSO4YE.js → 6BUZUMY6.js} +2 -2
  22. package/dist/cdn/{U3X3PMFK.js → 6DR75BDD.js} +2 -2
  23. package/dist/cdn/{SUQN66EP.js → 6P6TYWDA.js} +2 -2
  24. package/dist/cdn/{G7HNFSWY.js → 6TWYP3YF.js} +2 -2
  25. package/dist/cdn/6UABNP57.js +144 -0
  26. package/dist/cdn/{DTMJAFOR.js → 6WHCSYZB.js} +2 -2
  27. package/dist/cdn/{BLJMWSEV.js → 7AS5KQUX.js} +2 -2
  28. package/dist/cdn/{VGNZUJKG.js → 7PAFMMEE.js} +1 -1
  29. package/dist/cdn/{PB7GF5L7.js → AGXKVLCX.js} +2 -2
  30. package/dist/cdn/{VT56F34Q.js → AI27KTBS.js} +2 -2
  31. package/dist/cdn/{FF2IP4RI.js → ATZXVZLN.js} +2 -2
  32. package/dist/cdn/{27RZOPVS.js → AUTYRWW3.js} +2 -2
  33. package/dist/cdn/{RJFZHVHY.js → AXZDKCPK.js} +2 -2
  34. package/dist/cdn/{3V7D373V.js → B6N76TFW.js} +2 -2
  35. package/dist/cdn/{NS6IEDEO.js → BJKTWNRZ.js} +2 -2
  36. package/dist/cdn/{IAVVUEPT.js → BJQ74AGU.js} +2 -2
  37. package/dist/cdn/{QKGW2NDZ.js → BJXNSOCT.js} +2 -2
  38. package/dist/cdn/{H5TZK3ZO.js → BV6TYCTW.js} +2 -2
  39. package/dist/cdn/{74YPTYRV.js → BW6K6WG2.js} +2 -2
  40. package/dist/cdn/{BASKS2B6.js → BXSIADN4.js} +1 -1
  41. package/dist/cdn/{AYANO4KE.js → C3MAZDCV.js} +2 -2
  42. package/dist/cdn/{Y52JG235.js → C43VAS2K.js} +2 -2
  43. package/dist/cdn/{KUQODRZJ.js → C75YRIMC.js} +2 -2
  44. package/dist/cdn/{3ZUWMHK7.js → CBZMG4LM.js} +2 -2
  45. package/dist/cdn/{CZWMORX4.js → CFLY44M4.js} +2 -2
  46. package/dist/cdn/{PWXOGXVV.js → CL4KUGMJ.js} +2 -2
  47. package/dist/cdn/{XWD3APWA.js → CMEXJMGS.js} +2 -2
  48. package/dist/cdn/{4IX2XMRG.js → CTD4FKEC.js} +2 -2
  49. package/dist/cdn/{WI3V2SZV.js → DLX47IZT.js} +2 -2
  50. package/dist/cdn/{AOGGQ3U2.js → DQ7MWSF4.js} +2 -2
  51. package/dist/cdn/{YCYBLPD2.js → DSRADP7M.js} +2 -2
  52. package/dist/cdn/{2DUXF5LJ.js → DXTHMWTF.js} +2 -2
  53. package/dist/cdn/{M7S4D6IT.js → E4UHYG6Z.js} +2 -2
  54. package/dist/cdn/{3IXYSYO7.js → E4WBQCOK.js} +2 -2
  55. package/dist/cdn/{7W5FHU27.js → E56IV3SL.js} +2 -2
  56. package/dist/cdn/{YXMRS6KU.js → E6Q2WODQ.js} +2 -2
  57. package/dist/cdn/{MWNILPAE.js → EBXWVD7M.js} +2 -2
  58. package/dist/cdn/{MKRCQQEA.js → ECJ5N4D6.js} +2 -2
  59. package/dist/cdn/{AP65LO4D.js → EMTFGO75.js} +2 -2
  60. package/dist/cdn/{G567A24Q.js → EP7IQVMM.js} +2 -2
  61. package/dist/cdn/{BHYPS3XR.js → ERPKJBHE.js} +2 -2
  62. package/dist/cdn/{JL5HJ7FV.js → ET6VTUT5.js} +2 -2
  63. package/dist/cdn/{GVQG4LJT.js → EUQOBTOV.js} +2 -2
  64. package/dist/cdn/{JQWPQF3C.js → EXIHXG4X.js} +2 -2
  65. package/dist/cdn/{Q26GKJB3.js → F42X5MU3.js} +2 -2
  66. package/dist/cdn/{4RIUYFLM.js → FPL4C7R5.js} +2 -2
  67. package/dist/cdn/{742KBVB7.js → FRSFYF4X.js} +2 -2
  68. package/dist/cdn/FSQVGF2C.js +129 -0
  69. package/dist/cdn/{J3MA5UYE.js → FYAETOQL.js} +2 -2
  70. package/dist/cdn/{AZ24FZP4.js → FYCTCU5X.js} +2 -2
  71. package/dist/cdn/{OOWKXAWG.js → GE2354OZ.js} +2 -2
  72. package/dist/cdn/{HRXV2VWU.js → GEPTMJQG.js} +2 -2
  73. package/dist/cdn/{WKBT4ULR.js → GF2CYFNS.js} +2 -2
  74. package/dist/cdn/{DXAGR7RU.js → GIN2ZJUH.js} +2 -2
  75. package/dist/cdn/{BRCVSRLH.js → GJHPUN54.js} +2 -2
  76. package/dist/cdn/{33J2VR2N.js → GODZBFLA.js} +2 -2
  77. package/dist/cdn/{HFUCYKQ2.js → GX5SIPQP.js} +2 -2
  78. package/dist/cdn/{OGKJE35J.js → GZ6W7JQ4.js} +2 -2
  79. package/dist/cdn/{S2XFSIXO.js → H3ISOTFE.js} +2 -2
  80. package/dist/cdn/{YD7ZGJCD.js → H3WKCP7P.js} +2 -2
  81. package/dist/cdn/{QAX2OVSC.js → HEP4OXVH.js} +2 -2
  82. package/dist/cdn/{SW7RZDND.js → HG3NBG6K.js} +2 -2
  83. package/dist/cdn/{W2TAFAXO.js → HOVKSP4Y.js} +2 -2
  84. package/dist/cdn/{MWTYLPPG.js → HQIKJ5KZ.js} +2 -2
  85. package/dist/cdn/{6LXDFDS3.js → HRY6LKRG.js} +2 -2
  86. package/dist/cdn/{UI7YSD4N.js → HV27QOQ7.js} +2 -2
  87. package/dist/cdn/{UTWS5SL4.js → I66KA6AD.js} +1 -1
  88. package/dist/cdn/{KZRAC3LI.js → IBEDAPEA.js} +2 -2
  89. package/dist/cdn/{H46YBPGM.js → IHMR26UC.js} +2 -2
  90. package/dist/cdn/{7AAWBK56.js → IJSVOI2R.js} +2 -2
  91. package/dist/cdn/{XKCWRRGG.js → INVHRPKW.js} +2 -2
  92. package/dist/cdn/{SBOH2EKN.js → JBX7Z4YI.js} +2 -2
  93. package/dist/cdn/{C7NNVUKK.js → JCHIAN6Z.js} +2 -2
  94. package/dist/cdn/{2PRC3XWT.js → JDEXHLE5.js} +2 -2
  95. package/dist/cdn/{B667IWIR.js → JF5QNS33.js} +2 -2
  96. package/dist/cdn/{OJLXL32R.js → JHPHMLFG.js} +2 -2
  97. package/dist/cdn/{TLSJ6PA3.js → JK7FL6C2.js} +2 -2
  98. package/dist/cdn/JU6RVISJ.js +6 -0
  99. package/dist/cdn/{BJMABXTC.js → KD46DTJT.js} +2 -2
  100. package/dist/cdn/{5D4ZIOXR.js → KE53ATZX.js} +2 -2
  101. package/dist/cdn/{F5SNGGG7.js → KU32RHTM.js} +2 -2
  102. package/dist/cdn/{243SNYSB.js → L5C7XW6M.js} +2 -2
  103. package/dist/cdn/{L5MWWYWW.js → LA57UWS3.js} +2 -2
  104. package/dist/cdn/{Q5LVOZIX.js → LAMOKE7N.js} +2 -2
  105. package/dist/cdn/{NJPYVON2.js → MM27VKGC.js} +2 -2
  106. package/dist/cdn/{BGA7SAKJ.js → MRYNJK3D.js} +2 -2
  107. package/dist/cdn/{F75DEKZ6.js → O54ZBUXY.js} +2 -2
  108. package/dist/cdn/{M5OHJ636.js → OD2MP7Q6.js} +2 -2
  109. package/dist/cdn/{XGJLBLVP.js → OJMQCHB3.js} +2 -2
  110. package/dist/cdn/{2ST2QQR3.js → OMXNSH5B.js} +2 -2
  111. package/dist/cdn/{5WIB6YOB.js → OSI7N4TD.js} +2 -2
  112. package/dist/cdn/{QLOCQ2BI.js → OULKSPXI.js} +2 -2
  113. package/dist/cdn/{KXRLHUIR.js → P2QQFLSX.js} +2 -2
  114. package/dist/cdn/{JF4VSPWJ.js → P3R6R77O.js} +2 -2
  115. package/dist/cdn/{5HIDDEI4.js → PAWNKDTW.js} +2 -2
  116. package/dist/cdn/{TNFMWPYT.js → PD3V6GI5.js} +2 -2
  117. package/dist/cdn/{NTTWGNZ7.js → PF4NJMPJ.js} +2 -2
  118. package/dist/cdn/{DQZ7M6RF.js → PQNSEJYO.js} +2 -2
  119. package/dist/cdn/PU3FOOFC.js +4 -0
  120. package/dist/cdn/{52BYS4NB.js → PUXM347L.js} +2 -2
  121. package/dist/cdn/{34VMXW35.js → PZGL6B7O.js} +2 -2
  122. package/dist/cdn/{JPLJCF3E.js → Q5ZIAB2N.js} +2 -2
  123. package/dist/cdn/{US4NL3NS.js → QASTYBLC.js} +2 -2
  124. package/dist/cdn/{6ZXKBXBC.js → QJUW7YBP.js} +2 -2
  125. package/dist/cdn/{MLVHGAAH.js → R4CYAMNK.js} +1 -1
  126. package/dist/cdn/{PEVD35RX.js → R53QRSGE.js} +2 -2
  127. package/dist/cdn/{TH5A5LGL.js → RHBRH6OC.js} +2 -2
  128. package/dist/cdn/{FIUSRHIH.js → RM7XBDKL.js} +2 -2
  129. package/dist/cdn/{RAWZOPYS.js → RU5M2VJX.js} +2 -2
  130. package/dist/cdn/{TI5GTGWO.js → RYNDSDWQ.js} +2 -2
  131. package/dist/cdn/{JE3IUSHP.js → RZJDRQFM.js} +2 -2
  132. package/dist/cdn/{NX2V5727.js → SECLWOII.js} +2 -2
  133. package/dist/cdn/{CEZUPLC2.js → SJU43TVP.js} +2 -2
  134. package/dist/cdn/{HHAZHD2J.js → SMSHSFQW.js} +2 -2
  135. package/dist/cdn/{F7DDAEBC.js → SVQGPMD6.js} +2 -2
  136. package/dist/cdn/SWYZI2NQ.js +42 -0
  137. package/dist/cdn/{OYGF5EY4.js → SYDMHHAI.js} +2 -2
  138. package/dist/cdn/{LKAH7XZU.js → SYFEW6MJ.js} +2 -2
  139. package/dist/cdn/{7PWFZ5D4.js → TAJQR2YY.js} +2 -2
  140. package/dist/cdn/{SQNLXET7.js → TAT7SJHQ.js} +2 -2
  141. package/dist/cdn/TNFELFPL.js +11 -0
  142. package/dist/cdn/{ANWNLUVU.js → TR3AGJKO.js} +2 -2
  143. package/dist/cdn/{PQTJ7GVY.js → UBBD5MVY.js} +2 -2
  144. package/dist/cdn/{H4IWL227.js → UF4VGTUC.js} +2 -2
  145. package/dist/cdn/{VHOX2KK5.js → UHSVXFGB.js} +2 -2
  146. package/dist/cdn/{DVJNMFDS.js → UKVMTKPB.js} +2 -2
  147. package/dist/cdn/{JEASYTI5.js → UN22XNI3.js} +2 -2
  148. package/dist/cdn/{C36YSMN6.js → UP346QPV.js} +2 -2
  149. package/dist/cdn/{NAHPZWOU.js → UTFTI4IK.js} +2 -2
  150. package/dist/cdn/{FJ2MGPQL.js → UYFGY35H.js} +2 -2
  151. package/dist/cdn/{33PPKYKN.js → UZANE6SG.js} +2 -2
  152. package/dist/cdn/{XWBKQL2E.js → VHSSV6C4.js} +2 -2
  153. package/dist/cdn/{F6EV6KH3.js → VJCG7VBN.js} +2 -2
  154. package/dist/cdn/{MNLHRPGB.js → VNILPGRQ.js} +2 -2
  155. package/dist/cdn/{2J2O3NRQ.js → VQTNZ6ZM.js} +2 -2
  156. package/dist/cdn/{WHBFD3YB.js → VXL6DFYB.js} +2 -2
  157. package/dist/cdn/{ZMGBLOW6.js → VZZLUMXQ.js} +2 -2
  158. package/dist/cdn/{ZUULIIJ4.js → WD3W2FPA.js} +2 -2
  159. package/dist/cdn/{7JVDACOT.js → WHNY46HQ.js} +2 -2
  160. package/dist/cdn/{UIVUHO5F.js → WN37UQMU.js} +2 -2
  161. package/dist/cdn/{GGAPOWNH.js → WPGQ5CKQ.js} +2 -2
  162. package/dist/cdn/{IAYYRV5Z.js → WRX7RPWM.js} +2 -2
  163. package/dist/cdn/{ME5SWVKO.js → XAYBSDAJ.js} +2 -2
  164. package/dist/cdn/XKITCKUT.js +58 -0
  165. package/dist/cdn/{W2GW7ZB5.js → XKM5LNVL.js} +1 -1
  166. package/dist/cdn/{JSIYEX6M.js → XXJ7R2S6.js} +2 -2
  167. package/dist/cdn/{IYONWWNZ.js → XZAZPKMF.js} +2 -2
  168. package/dist/cdn/{RXGCEJKK.js → XZFXOBEF.js} +2 -2
  169. package/dist/cdn/{GMLRPASO.js → Y5AVLOTU.js} +2 -2
  170. package/dist/cdn/{KPLJACZI.js → Y5SSC5Y3.js} +2 -2
  171. package/dist/cdn/{TUTESAFQ.js → YAFTFQ4A.js} +2 -2
  172. package/dist/cdn/{3TBNBYSD.js → YIDMZKI5.js} +2 -2
  173. package/dist/cdn/{LJUXFDCC.js → YTNLLE23.js} +2 -2
  174. package/dist/cdn/{HH3UD4ND.js → YUBXRUTA.js} +1 -1
  175. package/dist/cdn/{R7EL74GF.js → YW3E2UHZ.js} +2 -2
  176. package/dist/cdn/{6AEFIIUS.js → Z4Z6FVCY.js} +2 -2
  177. package/dist/cdn/{7L4VY22N.js → ZKJKNTKE.js} +2 -2
  178. package/dist/cdn/ZL62EIGK.js +144 -0
  179. package/dist/cdn/{BTOKCRCX.js → ZLH4LGIT.js} +2 -2
  180. package/dist/cdn/{WWUBOOAF.js → ZLLHJ3U2.js} +2 -2
  181. package/dist/cdn/index.js +2 -2
  182. package/dist/chart-rendering/common/defaults/interfaces.d.ts +1 -0
  183. package/dist/chart-rendering/stable/chart-library-elements/axes/utils/axis-renderer/index.d.ts +2 -3
  184. package/dist/chart-rendering/stable/chart-library-elements/cursor/index.d.ts +1 -1
  185. package/dist/chart-rendering/stable/chart-library-elements/guides-and-ticks/index.d.ts +0 -2
  186. package/dist/chart-rendering/stable/chart-library-elements/label/axis-label/index.d.ts +1 -2
  187. package/dist/chart-rendering/stable/chart-library-elements/label/data-label/index.d.ts +1 -1
  188. package/dist/chart-rendering/stable/chart-library-elements/label/data-label/interfaces.d.ts +3 -3
  189. package/dist/chart-rendering/stable/chart-library-elements/legends/index.d.ts +4 -4
  190. package/dist/chart-rendering/stable/chart-library-elements/line-fill-marker/index.d.ts +1 -1
  191. package/dist/chart-rendering/stable/chart-library-elements/line-fill-marker/interfaces.d.ts +2 -2
  192. package/dist/chart-rendering/stable/chart-library-elements/series/interfaces.d.ts +4 -6
  193. package/dist/chart-rendering/stable/chart-library-elements/series/utils/index.d.ts +3 -15
  194. package/dist/chart-rendering/stable/chart-library-elements/tooltips/interfaces.d.ts +3 -3
  195. package/dist/chart-rendering/stable/selection/switch/index.d.ts +1 -1
  196. package/dist/chart-rendering/stable/utils/misc/index.d.ts +1 -1
  197. package/dist/chunks/action-bar-utils.js +1 -1
  198. package/dist/chunks/axis-model-wrapper.js +1 -1
  199. package/dist/chunks/bar-chart-model.js +1 -1
  200. package/dist/chunks/bar-chart-series.js +1 -1
  201. package/dist/chunks/baseline-stacking.js +1 -1
  202. package/dist/chunks/bg_BG.js +1 -1
  203. package/dist/chunks/bg_BG2.js +1 -1
  204. package/dist/chunks/box-plot-data.js +1 -1
  205. package/dist/chunks/box-plot-model.js +1 -1
  206. package/dist/chunks/chart-ui-utils.js +1 -1
  207. package/dist/chunks/chart-ui-utils2.js +1 -1
  208. package/dist/chunks/combo-bar-line-chart-model.js +1 -1
  209. package/dist/chunks/common.js +1 -1
  210. package/dist/chunks/config-update.js +115 -100
  211. package/dist/chunks/data.js +1 -1
  212. package/dist/chunks/default.js +1 -1
  213. package/dist/chunks/gauge-model.js +1 -1
  214. package/dist/chunks/heat-chart-model.js +16 -23
  215. package/dist/chunks/histogram-data.js +1 -1
  216. package/dist/chunks/histogram-model.js +1 -1
  217. package/dist/chunks/index.js +853 -842
  218. package/dist/chunks/index2.js +1 -1
  219. package/dist/chunks/index3.js +1 -1
  220. package/dist/chunks/index4.js +1 -1
  221. package/dist/chunks/interfaces.js +1 -1
  222. package/dist/chunks/line-chart-model.js +1 -1
  223. package/dist/chunks/model-with-baseline-stacking.js +1 -1
  224. package/dist/chunks/model-with-data-labels.js +1 -1
  225. package/dist/chunks/model-with-multi-axes.js +1 -1
  226. package/dist/chunks/model-with-rotation.js +1 -1
  227. package/dist/chunks/pie-chart-data.js +1 -1
  228. package/dist/chunks/pie-chart-model.js +1 -1
  229. package/dist/chunks/popover-ui-utils.js +1 -1
  230. package/dist/chunks/radar-chart-model.js +1 -1
  231. package/dist/chunks/resource.js +1 -1
  232. package/dist/chunks/rest-js-object-literals.js +1 -1
  233. package/dist/chunks/runtime.js +1 -1
  234. package/dist/chunks/scatterplot-model.js +1 -1
  235. package/dist/chunks/serial-chart-data.js +1 -1
  236. package/dist/chunks/serial-chart-model.js +1 -1
  237. package/dist/chunks/series-types.js +1 -1
  238. package/dist/chunks/series.js +1 -1
  239. package/dist/chunks/sk_SK.js +1 -1
  240. package/dist/chunks/store.js +1 -1
  241. package/dist/chunks/type-guards.js +1 -1
  242. package/dist/chunks/useT9n.js +1 -1
  243. package/dist/chunks/web-component-utils.js +1 -1
  244. package/dist/components/arcgis-chart/customElement.d.ts +53 -1
  245. package/dist/components/arcgis-chart/customElement.js +6194 -7127
  246. package/dist/components/arcgis-charts-action-bar/customElement.js +1 -1
  247. package/dist/components/arcgis-charts-config-axes/customElement.js +1 -1
  248. package/dist/components/arcgis-charts-config-axis/customElement.js +1 -1
  249. package/dist/components/arcgis-charts-config-bar-chart/customElement.js +1 -1
  250. package/dist/components/arcgis-charts-config-bar-chart-data/customElement.js +1 -1
  251. package/dist/components/arcgis-charts-config-bar-chart-popover/customElement.js +1 -1
  252. package/dist/components/arcgis-charts-config-bar-chart-series/customElement.js +1 -1
  253. package/dist/components/arcgis-charts-config-bar-chart-series-popover/customElement.js +1 -1
  254. package/dist/components/arcgis-charts-config-box-plot/customElement.js +1 -1
  255. package/dist/components/arcgis-charts-config-box-plot-data/customElement.js +1 -1
  256. package/dist/components/arcgis-charts-config-box-plot-popover/customElement.js +1 -1
  257. package/dist/components/arcgis-charts-config-box-plot-series/customElement.js +1 -1
  258. package/dist/components/arcgis-charts-config-box-plot-series-popover/customElement.js +1 -1
  259. package/dist/components/arcgis-charts-config-category-format/customElement.js +1 -1
  260. package/dist/components/arcgis-charts-config-chart-rename-popover/customElement.js +1 -1
  261. package/dist/components/arcgis-charts-config-color-style/customElement.js +1 -1
  262. package/dist/components/arcgis-charts-config-colors/customElement.js +1 -1
  263. package/dist/components/arcgis-charts-config-create-flow/customElement.js +1 -1
  264. package/dist/components/arcgis-charts-config-field-select/customElement.js +1 -1
  265. package/dist/components/arcgis-charts-config-font-style/customElement.js +1 -1
  266. package/dist/components/arcgis-charts-config-format/customElement.js +1 -1
  267. package/dist/components/arcgis-charts-config-format-popover/customElement.js +1 -1
  268. package/dist/components/arcgis-charts-config-general/customElement.js +1 -1
  269. package/dist/components/arcgis-charts-config-guide/customElement.js +1 -1
  270. package/dist/components/arcgis-charts-config-guide-popover/customElement.js +1 -1
  271. package/dist/components/arcgis-charts-config-guides/customElement.js +1 -1
  272. package/dist/components/arcgis-charts-config-guides-type-popover/customElement.js +1 -1
  273. package/dist/components/arcgis-charts-config-histogram/customElement.js +1 -1
  274. package/dist/components/arcgis-charts-config-histogram-data/customElement.js +1 -1
  275. package/dist/components/arcgis-charts-config-histogram-popover/customElement.js +1 -1
  276. package/dist/components/arcgis-charts-config-invalid-input-message/customElement.js +1 -1
  277. package/dist/components/arcgis-charts-config-line-chart/customElement.js +1 -1
  278. package/dist/components/arcgis-charts-config-line-chart-data/customElement.js +1 -1
  279. package/dist/components/arcgis-charts-config-line-chart-popover/customElement.js +1 -1
  280. package/dist/components/arcgis-charts-config-line-chart-series/customElement.js +1 -1
  281. package/dist/components/arcgis-charts-config-line-chart-series-popover/customElement.js +1 -1
  282. package/dist/components/arcgis-charts-config-line-style/customElement.js +1 -1
  283. package/dist/components/arcgis-charts-config-number-format/customElement.js +1 -1
  284. package/dist/components/arcgis-charts-config-pie-chart/customElement.js +1 -1
  285. package/dist/components/arcgis-charts-config-pie-chart-data/customElement.js +1 -1
  286. package/dist/components/arcgis-charts-config-pie-chart-popover/customElement.js +1 -1
  287. package/dist/components/arcgis-charts-config-pie-chart-slices/customElement.js +1 -1
  288. package/dist/components/arcgis-charts-config-pie-chart-slices-popover/customElement.js +1 -1
  289. package/dist/components/arcgis-charts-config-scatter-plot/customElement.js +1 -1
  290. package/dist/components/arcgis-charts-config-scatter-plot-data/customElement.js +1 -1
  291. package/dist/components/arcgis-charts-config-scatter-plot-popover/customElement.js +1 -1
  292. package/dist/components/arcgis-charts-config-select-chart-type-popover/customElement.js +1 -1
  293. package/dist/components/arcgis-charts-config-view-charts/customElement.js +1 -1
  294. package/dist/docs/api.json +237 -4
  295. package/dist/docs/docs.json +179 -3
  296. package/dist/docs/vscode.html-custom-data.json +39 -1
  297. package/dist/docs/web-types.json +72 -2
  298. package/dist/index.js +1 -1
  299. package/dist/loader.js +2 -2
  300. package/dist/model/heat-chart-model/heat-chart-model.d.ts +0 -4
  301. package/dist/model.js +1 -1
  302. package/dist/types/lumina.d.ts +1 -1
  303. package/dist/types/preact.d.ts +1 -1
  304. package/dist/types/preact10.d.ts +1 -1
  305. package/dist/types/react.d.ts +1 -1
  306. package/dist/types/stencil.d.ts +1 -1
  307. package/dist/utils/components/config-update.d.ts +24 -1
  308. package/package.json +3 -3
  309. package/dist/cdn/6UATX4Y5.js +0 -129
  310. package/dist/cdn/BRX5BMVN.js +0 -4
  311. package/dist/cdn/COFZXW5W.js +0 -58
  312. package/dist/cdn/DRXYAFJ7.js +0 -6
  313. package/dist/cdn/FRYEDPJT.js +0 -144
  314. package/dist/cdn/I2YLJNBX.js +0 -42
  315. package/dist/cdn/M7HSOVWS.js +0 -144
  316. package/dist/cdn/NSCQJMFF.js +0 -244
  317. package/dist/cdn/RLK6RM6N.js +0 -11
  318. package/dist/cdn/YLP5FMZZ.js +0 -4
  319. package/dist/chart-rendering/stable/chart-library-elements/axes/histogram/index.d.ts +0 -23
  320. package/dist/chart-rendering/stable/chart-library-elements/axes/histogram/interfaces.d.ts +0 -18
  321. package/dist/chart-rendering/stable/chart-library-elements/axes/scatter-plot/index.d.ts +0 -15
  322. package/dist/chart-rendering/stable/chart-library-elements/guides-and-ticks/interfaces.d.ts +0 -14
  323. package/dist/chart-rendering/stable/chart-library-elements/label/data-label/histogram/index.d.ts +0 -15
  324. package/dist/chart-rendering/stable/chart-library-elements/label/data-label/scatter-plot/index.d.ts +0 -15
  325. package/dist/chart-rendering/stable/chart-library-elements/series/histogram/index.d.ts +0 -14
  326. package/dist/chart-rendering/stable/chart-library-elements/series/histogram/interfaces.d.ts +0 -58
  327. package/dist/chart-rendering/stable/chart-library-elements/series/scatter-plot/index.d.ts +0 -14
  328. package/dist/chart-rendering/stable/chart-library-elements/series/scatter-plot/interfaces.d.ts +0 -35
  329. package/dist/chart-rendering/stable/chart-library-elements/series/scatter-plot/size-policy/index.d.ts +0 -28
  330. package/dist/chart-rendering/stable/chart-library-elements/tooltips/histogram/index.d.ts +0 -15
  331. package/dist/chart-rendering/stable/chart-library-elements/tooltips/histogram/interfaces.d.ts +0 -5
  332. package/dist/chart-rendering/stable/chart-library-elements/tooltips/scatter-plot/index.d.ts +0 -16
  333. package/dist/chart-rendering/stable/chart-library-elements/tooltips/scatter-plot/interfaces.d.ts +0 -5
@@ -1,129 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.56 */
4
- import"./UTWS5SL4.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",`
5
- from {
6
- opacity: 0;
7
- }
8
- to {
9
- opacity: 1;
10
- }
11
- `)),this.addRule(new m("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
12
- from {
13
- opacity: 1;
14
- }
15
- to {
16
- opacity: 0;
17
- }
18
- `)),this.addClass(new y("fade_in",`
19
- animation-duration: 0.3s;
20
- animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
21
- `)),this.addClass(new y("fade_out",`
22
- animation-duration: 0.3s;
23
- animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
24
- `))},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",`
25
- width: 100%;
26
- flex-shrink: 0;
27
- display: flex;
28
- flex-direction: row;
29
- justify-content: space-between;
30
- height: `+this.uiStyleSettings.toolbarHeight+`px;
31
- box-sizing: content-box;
32
- `+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
33
- `+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
34
- overflow: hidden;
35
- `)),this.toolbarStyleColorsClass=this.styles.addClass(new y("toolbar_colors",`
36
- background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
37
- box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
38
- `)),this.toolbarBlockStyleClass=this.styles.addClass(new y("toolbar-block",`
39
- display: inline-block;
40
- box-sizing: content-box;
41
- `)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new y("toolbar-overflow-block",`
42
- position: absolute;
43
- top: `+this.uiStyleSettings.toolbarHeight+`px;
44
- max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
45
- z-index: 10;
46
- box-sizing: content-box;
47
- `)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new y("toolbar-overflow-block_colors",`
48
- background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
49
- `));var e=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new y("toolbar_button",`
50
- display: inline-block;
51
- width: `+(this.uiStyleSettings.toolbarHeight-2*e)+`px;
52
- height: `+(this.uiStyleSettings.toolbarHeight-2*e)+`px;
53
- padding: `+e+`px;
54
- box-sizing: content-box;
55
- `)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new y("toolbar_button_colors",`
56
- fill: `+this.uiStyleSettings.toolbarColor+`;
57
- `)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new y("toolbar_active_button",`
58
- fill: `+this.uiStyleSettings.toolbarColor+`;
59
- background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
60
- `)),this.styles.addRule(new m("."+this.toolbarButtonStyleClass.name+" svg",`
61
- height: `+this.uiStyleSettings.toolbarHeight/2+`px;
62
- `)),this.styles.addRule(new m("."+this.toolbarButtonStyleColorsClass.name+":hover",`
63
- background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
64
- `))},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",`
65
- width: 100%;
66
- flex-shrink: 0;
67
- display: flex;
68
- flex-direction: column;
69
- font-family: sans-serif;
70
- `+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
71
- box-sizing: content-box;
72
- `+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
73
- `+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
74
- `+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
75
- overflow: hidden;
76
- `)),this.toolboxStyleColorsClass=this.styles.addClass(new y("toolbox_colors",`
77
- color: `+this.uiStyleSettings.toolboxColor+`;
78
- `));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new y("toolbox-button-row",`
79
- display: flex;
80
- cursor: default;
81
- box-sizing: content-box;
82
- `)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new y("toolbox-button-row_colors",`
83
- background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
84
- `)),this.toolboxPanelRowStyleClass=this.styles.addClass(new y("toolbox-panel-row",`
85
- display: flex;
86
- `+(this.displayMode==="inline"?"position: absolute;":"")+`
87
- `+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
88
- cursor: default;
89
- height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
90
- `+(this.displayMode==="inline"?"width: 100%;":"")+`
91
- box-sizing: content-box;
92
- `)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new y("toolbox-panel-row_colors",`
93
- background-color: `+((e=this.uiStyleSettings.toolboxBackgroundColor)!==null&&e!==void 0?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
94
- `)),this.toolboxButtonStyleClass=this.styles.addClass(new y("toolbox_button",`
95
- display: inline-block;
96
- width: `+(this.uiStyleSettings.toolbarHeight-2*t)+`px;
97
- height: `+(this.uiStyleSettings.toolbarHeight-2*t)+`px;
98
- padding: `+t+`px;
99
- box-sizing: content-box;
100
- `)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new y("toolbox-button_colors",`
101
- fill: `+this.uiStyleSettings.toolbarColor+`;
102
- `)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new y("toolbox-active-button_colors",`
103
- background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
104
- fill: `+this.uiStyleSettings.toolbarColor+`;
105
- `)),this.styles.addRule(new m("."+this.toolboxButtonStyleColorsClass.name+":hover",`
106
- background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
107
- `)),this.styles.addRule(new m("."+this.toolboxButtonStyleClass.name+" svg",`
108
- height: `+this.uiStyleSettings.toolbarHeight/2+`px;
109
- `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div",`
110
- scrollbar-width: thin;
111
- `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar",`
112
- height: 10px;
113
- width: 10px;
114
- `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-track",`
115
- background-color: transparent;
116
- `)),this.styles.addRule(new m("."+this.toolboxPanelRowStyleClass.name+" > div::-webkit-scrollbar-thumb",`
117
- background-color: #444;
118
- border-radius: 20px;
119
- border: 2px solid #aaa;
120
- `))},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">
121
- <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" />
122
- </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">
123
- <line x1="0" y1="10" x2="100" y2="10" stroke="`+t.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(r!==""?'stroke-dasharray="'+r+'"':"")+` />
124
- </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
125
- `)}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">
126
- <polygon points="0,5 10,0 10,10" fill="`+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
127
- </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">
128
- <polygon points="0,0 10,5 0,10" fill="`+(i.uiStyleSettings!==void 0?i.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
129
- </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())},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,4 +0,0 @@
1
- /*! All material copyright Esri, All Rights Reserved, unless otherwise specified.
2
- See https://js.arcgis.com/5.0/esri/copyright.txt for details.
3
- v5.0.0-next.56 */
4
- var na=Array.isArray,d=na;function pa(r){var t=typeof r;return r!=null&&(t=="object"||t=="function")}var g=pa;var sa=/\s/;function ma(r){for(var t=r.length;t--&&sa.test(r.charAt(t)););return t}var bt=ma;var ua=/^\s+/;function la(r){return r&&r.slice(0,bt(r)+1).replace(ua,"")}var Tt=la;var da=typeof global=="object"&&global&&global.Object===Object&&global,Mr=da;var ca=typeof self=="object"&&self&&self.Object===Object&&self,xa=Mr||ca||Function("return this")(),y=xa;var ga=y.Symbol,O=ga;var St=Object.prototype,ya=St.hasOwnProperty,ha=St.toString,vr=O?O.toStringTag:void 0;function ba(r){var t=ya.call(r,vr),e=r[vr];try{r[vr]=void 0;var o=!0}catch{}var a=ha.call(r);return o&&(t?r[vr]=e:delete r[vr]),a}var At=ba;var Ta=Object.prototype,Sa=Ta.toString;function Aa(r){return Sa.call(r)}var vt=Aa;var va="[object Null]",Oa="[object Undefined]",Ot=O?O.toStringTag:void 0;function _a(r){return r==null?r===void 0?Oa:va:Ot&&Ot in Object(r)?At(r):vt(r)}var w=_a;function wa(r){return r!=null&&typeof r=="object"}var h=wa;var Ca="[object Symbol]";function Pa(r){return typeof r=="symbol"||h(r)&&w(r)==Ca}var I=Pa;var _t=NaN,Ia=/^[-+]0x[0-9a-f]+$/i,Ma=/^0b[01]+$/i,ja=/^0o[0-7]+$/i,Ea=parseInt;function La(r){if(typeof r=="number")return r;if(I(r))return _t;if(g(r)){var t=typeof r.valueOf=="function"?r.valueOf():r;r=g(t)?t+"":t}if(typeof r!="string")return r===0?r:+r;r=Tt(r);var e=Ma.test(r);return e||ja.test(r)?Ea(r.slice(2),e?2:8):Ia.test(r)?_t:+r}var jr=La;function Fa(){this.__data__=[],this.size=0}var wt=Fa;function Da(r,t){return r===t||r!==r&&t!==t}var F=Da;function Ba(r,t){for(var e=r.length;e--;)if(F(r[e][0],t))return e;return-1}var H=Ba;var Ra=Array.prototype,Na=Ra.splice;function Ga(r){var t=this.__data__,e=H(t,r);if(e<0)return!1;var o=t.length-1;return e==o?t.pop():Na.call(t,e,1),--this.size,!0}var Ct=Ga;function Ua(r){var t=this.__data__,e=H(t,r);return e<0?void 0:t[e][1]}var Pt=Ua;function Wa(r){return H(this.__data__,r)>-1}var It=Wa;function Ka(r,t){var e=this.__data__,o=H(e,r);return o<0?(++this.size,e.push([r,t])):e[o][1]=t,this}var Mt=Ka;function or(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}or.prototype.clear=wt;or.prototype.delete=Ct;or.prototype.get=Pt;or.prototype.has=It;or.prototype.set=Mt;var z=or;function qa(){this.__data__=new z,this.size=0}var jt=qa;function Ha(r){var t=this.__data__,e=t.delete(r);return this.size=t.size,e}var Et=Ha;function za(r){return this.__data__.get(r)}var Lt=za;function $a(r){return this.__data__.has(r)}var Ft=$a;var Xa="[object AsyncFunction]",Ja="[object Function]",Va="[object GeneratorFunction]",Ya="[object Proxy]";function Za(r){if(!g(r))return!1;var t=w(r);return t==Ja||t==Va||t==Xa||t==Ya}var ar=Za;var Qa=y["__core-js_shared__"],Er=Qa;var Dt=function(){var r=/[^.]+$/.exec(Er&&Er.keys&&Er.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function ka(r){return!!Dt&&Dt in r}var Bt=ka;var rf=Function.prototype,tf=rf.toString;function ef(r){if(r!=null){try{return tf.call(r)}catch{}try{return r+""}catch{}}return""}var G=ef;var of=/[\\^$.*+?()[\]{}|]/g,af=/^\[object .+?Constructor\]$/,ff=Function.prototype,nf=Object.prototype,pf=ff.toString,sf=nf.hasOwnProperty,mf=RegExp("^"+pf.call(sf).replace(of,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function uf(r){if(!g(r)||Bt(r))return!1;var t=ar(r)?mf:af;return t.test(G(r))}var Rt=uf;function lf(r,t){return r?.[t]}var Nt=lf;function df(r,t){var e=Nt(r,t);return Rt(e)?e:void 0}var C=df;var cf=C(y,"Map"),$=cf;var xf=C(Object,"create"),U=xf;function gf(){this.__data__=U?U(null):{},this.size=0}var Gt=gf;function yf(r){var t=this.has(r)&&delete this.__data__[r];return this.size-=t?1:0,t}var Ut=yf;var hf="__lodash_hash_undefined__",bf=Object.prototype,Tf=bf.hasOwnProperty;function Sf(r){var t=this.__data__;if(U){var e=t[r];return e===hf?void 0:e}return Tf.call(t,r)?t[r]:void 0}var Wt=Sf;var Af=Object.prototype,vf=Af.hasOwnProperty;function Of(r){var t=this.__data__;return U?t[r]!==void 0:vf.call(t,r)}var Kt=Of;var _f="__lodash_hash_undefined__";function wf(r,t){var e=this.__data__;return this.size+=this.has(r)?0:1,e[r]=U&&t===void 0?_f:t,this}var qt=wf;function fr(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}fr.prototype.clear=Gt;fr.prototype.delete=Ut;fr.prototype.get=Wt;fr.prototype.has=Kt;fr.prototype.set=qt;var mt=fr;function Cf(){this.size=0,this.__data__={hash:new mt,map:new($||z),string:new mt}}var Ht=Cf;function Pf(r){var t=typeof r;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?r!=="__proto__":r===null}var zt=Pf;function If(r,t){var e=r.__data__;return zt(t)?e[typeof t=="string"?"string":"hash"]:e.map}var X=If;function Mf(r){var t=X(this,r).delete(r);return this.size-=t?1:0,t}var $t=Mf;function jf(r){return X(this,r).get(r)}var Xt=jf;function Ef(r){return X(this,r).has(r)}var Jt=Ef;function Lf(r,t){var e=X(this,r),o=e.size;return e.set(r,t),this.size+=e.size==o?0:1,this}var Vt=Lf;function ir(r){var t=-1,e=r==null?0:r.length;for(this.clear();++t<e;){var o=r[t];this.set(o[0],o[1])}}ir.prototype.clear=Ht;ir.prototype.delete=$t;ir.prototype.get=Xt;ir.prototype.has=Jt;ir.prototype.set=Vt;var rr=ir;var Ff=200;function Df(r,t){var e=this.__data__;if(e instanceof z){var o=e.__data__;if(!$||o.length<Ff-1)return o.push([r,t]),this.size=++e.size,this;e=this.__data__=new rr(o)}return e.set(r,t),this.size=e.size,this}var Yt=Df;function nr(r){var t=this.__data__=new z(r);this.size=t.size}nr.prototype.clear=jt;nr.prototype.delete=Et;nr.prototype.get=Lt;nr.prototype.has=Ft;nr.prototype.set=Yt;var D=nr;function Bf(r,t){for(var e=-1,o=r==null?0:r.length;++e<o&&t(r[e],e,r)!==!1;);return r}var Zt=Bf;var Rf=function(){try{var r=C(Object,"defineProperty");return r({},"",{}),r}catch{}}(),pr=Rf;function Nf(r,t,e){t=="__proto__"&&pr?pr(r,t,{configurable:!0,enumerable:!0,value:e,writable:!0}):r[t]=e}var sr=Nf;var Gf=Object.prototype,Uf=Gf.hasOwnProperty;function Wf(r,t,e){var o=r[t];(!(Uf.call(r,t)&&F(o,e))||e===void 0&&!(t in r))&&sr(r,t,e)}var Lr=Wf;function Kf(r,t,e,o){var a=!e;e||(e={});for(var f=-1,i=t.length;++f<i;){var n=t[f],p=o?o(e[n],r[n],n,e,r):void 0;p===void 0&&(p=r[n]),a?sr(e,n,p):Lr(e,n,p)}return e}var B=Kf;function qf(r,t){for(var e=-1,o=Array(r);++e<r;)o[e]=t(e);return o}var Fr=qf;var Hf="[object Arguments]";function zf(r){return h(r)&&w(r)==Hf}var ut=zf;var Qt=Object.prototype,$f=Qt.hasOwnProperty,Xf=Qt.propertyIsEnumerable,Jf=ut(function(){return arguments}())?ut:function(r){return h(r)&&$f.call(r,"callee")&&!Xf.call(r,"callee")},M=Jf;function Vf(){return!1}var kt=Vf;var ee=typeof exports=="object"&&exports&&!exports.nodeType&&exports,re=ee&&typeof module=="object"&&module&&!module.nodeType&&module,Yf=re&&re.exports===ee,te=Yf?y.Buffer:void 0,Zf=te?te.isBuffer:void 0,Qf=Zf||kt,j=Qf;var kf=9007199254740991,ri=/^(?:0|[1-9]\d*)$/;function ti(r,t){var e=typeof r;return t=t??kf,!!t&&(e=="number"||e!="symbol"&&ri.test(r))&&r>-1&&r%1==0&&r<t}var mr=ti;var ei=9007199254740991;function oi(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ei}var ur=oi;var ai="[object Arguments]",fi="[object Array]",ii="[object Boolean]",ni="[object Date]",pi="[object Error]",si="[object Function]",mi="[object Map]",ui="[object Number]",li="[object Object]",di="[object RegExp]",ci="[object Set]",xi="[object String]",gi="[object WeakMap]",yi="[object ArrayBuffer]",hi="[object DataView]",bi="[object Float32Array]",Ti="[object Float64Array]",Si="[object Int8Array]",Ai="[object Int16Array]",vi="[object Int32Array]",Oi="[object Uint8Array]",_i="[object Uint8ClampedArray]",wi="[object Uint16Array]",Ci="[object Uint32Array]",x={};x[bi]=x[Ti]=x[Si]=x[Ai]=x[vi]=x[Oi]=x[_i]=x[wi]=x[Ci]=!0;x[ai]=x[fi]=x[yi]=x[ii]=x[hi]=x[ni]=x[pi]=x[si]=x[mi]=x[ui]=x[li]=x[di]=x[ci]=x[xi]=x[gi]=!1;function Pi(r){return h(r)&&ur(r.length)&&!!x[w(r)]}var oe=Pi;function Ii(r){return function(t){return r(t)}}var J=Ii;var ae=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Or=ae&&typeof module=="object"&&module&&!module.nodeType&&module,Mi=Or&&Or.exports===ae,lt=Mi&&Mr.process,ji=function(){try{var r=Or&&Or.require&&Or.require("util").types;return r||lt&&lt.binding&&lt.binding("util")}catch{}}(),W=ji;var fe=W&&W.isTypedArray,Ei=fe?J(fe):oe,V=Ei;var Li=Object.prototype,Fi=Li.hasOwnProperty;function Di(r,t){var e=d(r),o=!e&&M(r),a=!e&&!o&&j(r),f=!e&&!o&&!a&&V(r),i=e||o||a||f,n=i?Fr(r.length,String):[],p=n.length;for(var s in r)(t||Fi.call(r,s))&&!(i&&(s=="length"||a&&(s=="offset"||s=="parent")||f&&(s=="buffer"||s=="byteLength"||s=="byteOffset")||mr(s,p)))&&n.push(s);return n}var Dr=Di;var Bi=Object.prototype;function Ri(r){var t=r&&r.constructor,e=typeof t=="function"&&t.prototype||Bi;return r===e}var Y=Ri;function Ni(r,t){return function(e){return r(t(e))}}var Br=Ni;var Gi=Br(Object.keys,Object),ie=Gi;var Ui=Object.prototype,Wi=Ui.hasOwnProperty;function Ki(r){if(!Y(r))return ie(r);var t=[];for(var e in Object(r))Wi.call(r,e)&&e!="constructor"&&t.push(e);return t}var Rr=Ki;function qi(r){return r!=null&&ur(r.length)&&!ar(r)}var P=qi;function Hi(r){return P(r)?Dr(r):Rr(r)}var R=Hi;function zi(r,t){return r&&B(t,R(t),r)}var ne=zi;function $i(r){var t=[];if(r!=null)for(var e in Object(r))t.push(e);return t}var pe=$i;var Xi=Object.prototype,Ji=Xi.hasOwnProperty;function Vi(r){if(!g(r))return pe(r);var t=Y(r),e=[];for(var o in r)o=="constructor"&&(t||!Ji.call(r,o))||e.push(o);return e}var se=Vi;function Yi(r){return P(r)?Dr(r,!0):se(r)}var N=Yi;function Zi(r,t){return r&&B(t,N(t),r)}var me=Zi;var ce=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ue=ce&&typeof module=="object"&&module&&!module.nodeType&&module,Qi=ue&&ue.exports===ce,le=Qi?y.Buffer:void 0,de=le?le.allocUnsafe:void 0;function ki(r,t){if(t)return r.slice();var e=r.length,o=de?de(e):new r.constructor(e);return r.copy(o),o}var Nr=ki;function rn(r,t){var e=-1,o=r.length;for(t||(t=Array(o));++e<o;)t[e]=r[e];return t}var Gr=rn;function tn(r,t){for(var e=-1,o=r==null?0:r.length,a=0,f=[];++e<o;){var i=r[e];t(i,e,r)&&(f[a++]=i)}return f}var Ur=tn;function en(){return[]}var Wr=en;var on=Object.prototype,an=on.propertyIsEnumerable,xe=Object.getOwnPropertySymbols,fn=xe?function(r){return r==null?[]:(r=Object(r),Ur(xe(r),function(t){return an.call(r,t)}))}:Wr,lr=fn;function nn(r,t){return B(r,lr(r),t)}var ge=nn;function pn(r,t){for(var e=-1,o=t.length,a=r.length;++e<o;)r[a+e]=t[e];return r}var dr=pn;var sn=Br(Object.getPrototypeOf,Object),cr=sn;var mn=Object.getOwnPropertySymbols,un=mn?function(r){for(var t=[];r;)dr(t,lr(r)),r=cr(r);return t}:Wr,Kr=un;function ln(r,t){return B(r,Kr(r),t)}var ye=ln;function dn(r,t,e){var o=t(r);return d(r)?o:dr(o,e(r))}var qr=dn;function cn(r){return qr(r,R,lr)}var _r=cn;function xn(r){return qr(r,N,Kr)}var he=xn;var gn=C(y,"DataView"),Hr=gn;var yn=C(y,"Promise"),zr=yn;var hn=C(y,"Set"),$r=hn;var bn=C(y,"WeakMap"),Xr=bn;var be="[object Map]",Tn="[object Object]",Te="[object Promise]",Se="[object Set]",Ae="[object WeakMap]",ve="[object DataView]",Sn=G(Hr),An=G($),vn=G(zr),On=G($r),_n=G(Xr),tr=w;(Hr&&tr(new Hr(new ArrayBuffer(1)))!=ve||$&&tr(new $)!=be||zr&&tr(zr.resolve())!=Te||$r&&tr(new $r)!=Se||Xr&&tr(new Xr)!=Ae)&&(tr=function(r){var t=w(r),e=t==Tn?r.constructor:void 0,o=e?G(e):"";if(o)switch(o){case Sn:return ve;case An:return be;case vn:return Te;case On:return Se;case _n:return Ae}return t});var E=tr;var wn=Object.prototype,Cn=wn.hasOwnProperty;function Pn(r){var t=r.length,e=new r.constructor(t);return t&&typeof r[0]=="string"&&Cn.call(r,"index")&&(e.index=r.index,e.input=r.input),e}var Oe=Pn;var In=y.Uint8Array,xr=In;function Mn(r){var t=new r.constructor(r.byteLength);return new xr(t).set(new xr(r)),t}var gr=Mn;function jn(r,t){var e=t?gr(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.byteLength)}var _e=jn;var En=/\w*$/;function Ln(r){var t=new r.constructor(r.source,En.exec(r));return t.lastIndex=r.lastIndex,t}var we=Ln;var Ce=O?O.prototype:void 0,Pe=Ce?Ce.valueOf:void 0;function Fn(r){return Pe?Object(Pe.call(r)):{}}var Ie=Fn;function Dn(r,t){var e=t?gr(r.buffer):r.buffer;return new r.constructor(e,r.byteOffset,r.length)}var Jr=Dn;var Bn="[object Boolean]",Rn="[object Date]",Nn="[object Map]",Gn="[object Number]",Un="[object RegExp]",Wn="[object Set]",Kn="[object String]",qn="[object Symbol]",Hn="[object ArrayBuffer]",zn="[object DataView]",$n="[object Float32Array]",Xn="[object Float64Array]",Jn="[object Int8Array]",Vn="[object Int16Array]",Yn="[object Int32Array]",Zn="[object Uint8Array]",Qn="[object Uint8ClampedArray]",kn="[object Uint16Array]",rp="[object Uint32Array]";function tp(r,t,e){var o=r.constructor;switch(t){case Hn:return gr(r);case Bn:case Rn:return new o(+r);case zn:return _e(r,e);case $n:case Xn:case Jn:case Vn:case Yn:case Zn:case Qn:case kn:case rp:return Jr(r,e);case Nn:return new o;case Gn:case Kn:return new o(r);case Un:return we(r);case Wn:return new o;case qn:return Ie(r)}}var Me=tp;var je=Object.create,ep=function(){function r(){}return function(t){if(!g(t))return{};if(je)return je(t);r.prototype=t;var e=new r;return r.prototype=void 0,e}}(),Ee=ep;function op(r){return typeof r.constructor=="function"&&!Y(r)?Ee(cr(r)):{}}var Vr=op;var ap="[object Map]";function fp(r){return h(r)&&E(r)==ap}var Le=fp;var Fe=W&&W.isMap,ip=Fe?J(Fe):Le,De=ip;var np="[object Set]";function pp(r){return h(r)&&E(r)==np}var Be=pp;var Re=W&&W.isSet,sp=Re?J(Re):Be,Ne=sp;var mp=1,up=2,lp=4,Ge="[object Arguments]",dp="[object Array]",cp="[object Boolean]",xp="[object Date]",gp="[object Error]",Ue="[object Function]",yp="[object GeneratorFunction]",hp="[object Map]",bp="[object Number]",We="[object Object]",Tp="[object RegExp]",Sp="[object Set]",Ap="[object String]",vp="[object Symbol]",Op="[object WeakMap]",_p="[object ArrayBuffer]",wp="[object DataView]",Cp="[object Float32Array]",Pp="[object Float64Array]",Ip="[object Int8Array]",Mp="[object Int16Array]",jp="[object Int32Array]",Ep="[object Uint8Array]",Lp="[object Uint8ClampedArray]",Fp="[object Uint16Array]",Dp="[object Uint32Array]",c={};c[Ge]=c[dp]=c[_p]=c[wp]=c[cp]=c[xp]=c[Cp]=c[Pp]=c[Ip]=c[Mp]=c[jp]=c[hp]=c[bp]=c[We]=c[Tp]=c[Sp]=c[Ap]=c[vp]=c[Ep]=c[Lp]=c[Fp]=c[Dp]=!0;c[gp]=c[Ue]=c[Op]=!1;function Yr(r,t,e,o,a,f){var i,n=t&mp,p=t&up,s=t&lp;if(e&&(i=a?e(r,o,a,f):e(r)),i!==void 0)return i;if(!g(r))return r;var u=d(r);if(u){if(i=Oe(r),!n)return Gr(r,i)}else{var m=E(r),l=m==Ue||m==yp;if(j(r))return Nr(r,n);if(m==We||m==Ge||l&&!a){if(i=p||l?{}:Vr(r),!n)return p?ye(r,me(i,r)):ge(r,ne(i,r))}else{if(!c[m])return a?r:{};i=Me(r,m,n)}}f||(f=new D);var b=f.get(r);if(b)return b;f.set(r,i),Ne(r)?r.forEach(function(T){i.add(Yr(T,t,e,T,r,f))}):De(r)&&r.forEach(function(T,S){i.set(S,Yr(T,t,e,S,r,f))});var A=s?p?he:_r:p?N:R,_=u?void 0:A(r);return Zt(_||r,function(T,S){_&&(S=T,T=r[S]),Lr(i,S,Yr(T,t,e,S,r,f))}),i}var Ke=Yr;var Bp=1,Rp=4;function Np(r){return Ke(r,Bp|Rp)}var Gp=Np;var Up=function(){return y.Date.now()},Zr=Up;var Wp="Expected a function",Kp=Math.max,qp=Math.min;function Hp(r,t,e){var o,a,f,i,n,p,s=0,u=!1,m=!1,l=!0;if(typeof r!="function")throw new TypeError(Wp);t=jr(t)||0,g(e)&&(u=!!e.leading,m="maxWait"in e,f=m?Kp(jr(e.maxWait)||0,t):f,l="trailing"in e?!!e.trailing:l);function b(v){var q=o,Ar=a;return o=a=void 0,s=v,i=r.apply(Ar,q),i}function A(v){return s=v,n=setTimeout(S,t),u?b(v):i}function _(v){var q=v-p,Ar=v-s,ht=t-q;return m?qp(ht,f-Ar):ht}function T(v){var q=v-p,Ar=v-s;return p===void 0||q>=t||q<0||m&&Ar>=f}function S(){var v=Zr();if(T(v))return L(v);n=setTimeout(S,_(v))}function L(v){return n=void 0,l&&o?b(v):(o=a=void 0,i)}function Ir(){n!==void 0&&clearTimeout(n),s=0,o=p=a=n=void 0}function er(){return n===void 0?i:L(Zr())}function K(){var v=Zr(),q=T(v);if(o=arguments,a=this,p=v,q){if(n===void 0)return A(p);if(m)return clearTimeout(n),n=setTimeout(S,t),b(p)}return n===void 0&&(n=setTimeout(S,t)),i}return K.cancel=Ir,K.flush=er,K}var zp=Hp;function $p(r,t,e){(e!==void 0&&!F(r[t],e)||e===void 0&&!(t in r))&&sr(r,t,e)}var wr=$p;function Xp(r){return function(t,e,o){for(var a=-1,f=Object(t),i=o(t),n=i.length;n--;){var p=i[r?n:++a];if(e(f[p],p,f)===!1)break}return t}}var qe=Xp;var Jp=qe(),Qr=Jp;function Vp(r){return h(r)&&P(r)}var kr=Vp;var Yp="[object Object]",Zp=Function.prototype,Qp=Object.prototype,He=Zp.toString,kp=Qp.hasOwnProperty,rs=He.call(Object);function ts(r){if(!h(r)||w(r)!=Yp)return!1;var t=cr(r);if(t===null)return!0;var e=kp.call(t,"constructor")&&t.constructor;return typeof e=="function"&&e instanceof e&&He.call(e)==rs}var ze=ts;function es(r,t){if(!(t==="constructor"&&typeof r[t]=="function")&&t!="__proto__")return r[t]}var Cr=es;function os(r){return B(r,N(r))}var $e=os;function as(r,t,e,o,a,f,i){var n=Cr(r,e),p=Cr(t,e),s=i.get(p);if(s){wr(r,e,s);return}var u=f?f(n,p,e+"",r,t,i):void 0,m=u===void 0;if(m){var l=d(p),b=!l&&j(p),A=!l&&!b&&V(p);u=p,l||b||A?d(n)?u=n:kr(n)?u=Gr(n):b?(m=!1,u=Nr(p,!0)):A?(m=!1,u=Jr(p,!0)):u=[]:ze(p)||M(p)?(u=n,M(n)?u=$e(n):(!g(n)||ar(n))&&(u=Vr(p))):m=!1}m&&(i.set(p,u),a(u,p,o,f,i),i.delete(p)),wr(r,e,u)}var Xe=as;function Je(r,t,e,o,a){r!==t&&Qr(t,function(f,i){if(a||(a=new D),g(f))Xe(r,t,i,e,Je,o,a);else{var n=o?o(Cr(r,i),f,i+"",r,t,a):void 0;n===void 0&&(n=f),wr(r,i,n)}},N)}var rt=Je;function fs(r){return r}var Z=fs;function is(r,t,e){switch(e.length){case 0:return r.call(t);case 1:return r.call(t,e[0]);case 2:return r.call(t,e[0],e[1]);case 3:return r.call(t,e[0],e[1],e[2])}return r.apply(t,e)}var Ve=is;var Ye=Math.max;function ns(r,t,e){return t=Ye(t===void 0?r.length-1:t,0),function(){for(var o=arguments,a=-1,f=Ye(o.length-t,0),i=Array(f);++a<f;)i[a]=o[t+a];a=-1;for(var n=Array(t+1);++a<t;)n[a]=o[a];return n[t]=e(i),Ve(r,this,n)}}var Ze=ns;function ps(r){return function(){return r}}var Qe=ps;var ss=pr?function(r,t){return pr(r,"toString",{configurable:!0,enumerable:!1,value:Qe(t),writable:!0})}:Z,ke=ss;var ms=800,us=16,ls=Date.now;function ds(r){var t=0,e=0;return function(){var o=ls(),a=us-(o-e);if(e=o,a>0){if(++t>=ms)return arguments[0]}else t=0;return r.apply(void 0,arguments)}}var ro=ds;var cs=ro(ke),to=cs;function xs(r,t){return to(Ze(r,t,Z),r+"")}var yr=xs;function gs(r,t,e){if(!g(e))return!1;var o=typeof t;return(o=="number"?P(e)&&mr(t,e.length):o=="string"&&t in e)?F(e[t],r):!1}var Pr=gs;function ys(r){return yr(function(t,e){var o=-1,a=e.length,f=a>1?e[a-1]:void 0,i=a>2?e[2]:void 0;for(f=r.length>3&&typeof f=="function"?(a--,f):void 0,i&&Pr(e[0],e[1],i)&&(f=a<3?void 0:f,a=1),t=Object(t);++o<a;){var n=e[o];n&&r(t,n,o,f)}return t})}var tt=ys;var hs=tt(function(r,t,e,o){rt(r,t,e,o)}),bs=hs;var Ts="[object Map]",Ss="[object Set]",As=Object.prototype,vs=As.hasOwnProperty;function Os(r){if(r==null)return!0;if(P(r)&&(d(r)||typeof r=="string"||typeof r.splice=="function"||j(r)||V(r)||M(r)))return!r.length;var t=E(r);if(t==Ts||t==Ss)return!r.size;if(Y(r))return!Rr(r).length;for(var e in r)if(vs.call(r,e))return!1;return!0}var _s=Os;var ws="__lodash_hash_undefined__";function Cs(r){return this.__data__.set(r,ws),this}var eo=Cs;function Ps(r){return this.__data__.has(r)}var oo=Ps;function et(r){var t=-1,e=r==null?0:r.length;for(this.__data__=new rr;++t<e;)this.add(r[t])}et.prototype.add=et.prototype.push=eo;et.prototype.has=oo;var ao=et;function Is(r,t){for(var e=-1,o=r==null?0:r.length;++e<o;)if(t(r[e],e,r))return!0;return!1}var fo=Is;function Ms(r,t){return r.has(t)}var io=Ms;var js=1,Es=2;function Ls(r,t,e,o,a,f){var i=e&js,n=r.length,p=t.length;if(n!=p&&!(i&&p>n))return!1;var s=f.get(r),u=f.get(t);if(s&&u)return s==t&&u==r;var m=-1,l=!0,b=e&Es?new ao:void 0;for(f.set(r,t),f.set(t,r);++m<n;){var A=r[m],_=t[m];if(o)var T=i?o(_,A,m,t,r,f):o(A,_,m,r,t,f);if(T!==void 0){if(T)continue;l=!1;break}if(b){if(!fo(t,function(S,L){if(!io(b,L)&&(A===S||a(A,S,e,o,f)))return b.push(L)})){l=!1;break}}else if(!(A===_||a(A,_,e,o,f))){l=!1;break}}return f.delete(r),f.delete(t),l}var ot=Ls;function Fs(r){var t=-1,e=Array(r.size);return r.forEach(function(o,a){e[++t]=[a,o]}),e}var no=Fs;function Ds(r){var t=-1,e=Array(r.size);return r.forEach(function(o){e[++t]=o}),e}var po=Ds;var Bs=1,Rs=2,Ns="[object Boolean]",Gs="[object Date]",Us="[object Error]",Ws="[object Map]",Ks="[object Number]",qs="[object RegExp]",Hs="[object Set]",zs="[object String]",$s="[object Symbol]",Xs="[object ArrayBuffer]",Js="[object DataView]",so=O?O.prototype:void 0,dt=so?so.valueOf:void 0;function Vs(r,t,e,o,a,f,i){switch(e){case Js:if(r.byteLength!=t.byteLength||r.byteOffset!=t.byteOffset)return!1;r=r.buffer,t=t.buffer;case Xs:return!(r.byteLength!=t.byteLength||!f(new xr(r),new xr(t)));case Ns:case Gs:case Ks:return F(+r,+t);case Us:return r.name==t.name&&r.message==t.message;case qs:case zs:return r==t+"";case Ws:var n=no;case Hs:var p=o&Bs;if(n||(n=po),r.size!=t.size&&!p)return!1;var s=i.get(r);if(s)return s==t;o|=Rs,i.set(r,t);var u=ot(n(r),n(t),o,a,f,i);return i.delete(r),u;case $s:if(dt)return dt.call(r)==dt.call(t)}return!1}var mo=Vs;var Ys=1,Zs=Object.prototype,Qs=Zs.hasOwnProperty;function ks(r,t,e,o,a,f){var i=e&Ys,n=_r(r),p=n.length,s=_r(t),u=s.length;if(p!=u&&!i)return!1;for(var m=p;m--;){var l=n[m];if(!(i?l in t:Qs.call(t,l)))return!1}var b=f.get(r),A=f.get(t);if(b&&A)return b==t&&A==r;var _=!0;f.set(r,t),f.set(t,r);for(var T=i;++m<p;){l=n[m];var S=r[l],L=t[l];if(o)var Ir=i?o(L,S,l,t,r,f):o(S,L,l,r,t,f);if(!(Ir===void 0?S===L||a(S,L,e,o,f):Ir)){_=!1;break}T||(T=l=="constructor")}if(_&&!T){var er=r.constructor,K=t.constructor;er!=K&&"constructor"in r&&"constructor"in t&&!(typeof er=="function"&&er instanceof er&&typeof K=="function"&&K instanceof K)&&(_=!1)}return f.delete(r),f.delete(t),_}var uo=ks;var rm=1,lo="[object Arguments]",co="[object Array]",at="[object Object]",tm=Object.prototype,xo=tm.hasOwnProperty;function em(r,t,e,o,a,f){var i=d(r),n=d(t),p=i?co:E(r),s=n?co:E(t);p=p==lo?at:p,s=s==lo?at:s;var u=p==at,m=s==at,l=p==s;if(l&&j(r)){if(!j(t))return!1;i=!0,u=!1}if(l&&!u)return f||(f=new D),i||V(r)?ot(r,t,e,o,a,f):mo(r,t,p,e,o,a,f);if(!(e&rm)){var b=u&&xo.call(r,"__wrapped__"),A=m&&xo.call(t,"__wrapped__");if(b||A){var _=b?r.value():r,T=A?t.value():t;return f||(f=new D),a(_,T,e,o,f)}}return l?(f||(f=new D),uo(r,t,e,o,a,f)):!1}var go=em;function yo(r,t,e,o,a){return r===t?!0:r==null||t==null||!h(r)&&!h(t)?r!==r&&t!==t:go(r,t,e,o,yo,a)}var hr=yo;function om(r,t){return hr(r,t)}var am=om;var fm=tt(function(r,t,e){rt(r,t,e)}),im=fm;function nm(r,t){for(var e=-1,o=r==null?0:r.length,a=Array(o);++e<o;)a[e]=t(r[e],e,r);return a}var Q=nm;var pm=1/0,ho=O?O.prototype:void 0,bo=ho?ho.toString:void 0;function To(r){if(typeof r=="string")return r;if(d(r))return Q(r,To)+"";if(I(r))return bo?bo.call(r):"";var t=r+"";return t=="0"&&1/r==-pm?"-0":t}var So=To;var sm=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,mm=/^\w*$/;function um(r,t){if(d(r))return!1;var e=typeof r;return e=="number"||e=="symbol"||e=="boolean"||r==null||I(r)?!0:mm.test(r)||!sm.test(r)||t!=null&&r in Object(t)}var br=um;var lm="Expected a function";function ct(r,t){if(typeof r!="function"||t!=null&&typeof t!="function")throw new TypeError(lm);var e=function(){var o=arguments,a=t?t.apply(this,o):o[0],f=e.cache;if(f.has(a))return f.get(a);var i=r.apply(this,o);return e.cache=f.set(a,i)||f,i};return e.cache=new(ct.Cache||rr),e}ct.Cache=rr;var xt=ct;var dm=500;function cm(r){var t=xt(r,function(o){return e.size===dm&&e.clear(),o}),e=t.cache;return t}var Ao=cm;var xm=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,gm=/\\(\\)?/g,ym=Ao(function(r){var t=[];return r.charCodeAt(0)===46&&t.push(""),r.replace(xm,function(e,o,a,f){t.push(a?f.replace(gm,"$1"):o||e)}),t}),vo=ym;function hm(r){return r==null?"":So(r)}var Tr=hm;function bm(r,t){return d(r)?r:br(r,t)?[r]:vo(Tr(r))}var ft=bm;var Tm=1/0;function Sm(r){if(typeof r=="string"||I(r))return r;var t=r+"";return t=="0"&&1/r==-Tm?"-0":t}var k=Sm;function Am(r,t){t=ft(t,r);for(var e=0,o=t.length;r!=null&&e<o;)r=r[k(t[e++])];return e&&e==o?r:void 0}var Sr=Am;function vm(r,t,e){var o=r==null?void 0:Sr(r,t);return o===void 0?e:o}var Oo=vm;var _o=O?O.isConcatSpreadable:void 0;function Om(r){return d(r)||M(r)||!!(_o&&r&&r[_o])}var wo=Om;function Co(r,t,e,o,a){var f=-1,i=r.length;for(e||(e=wo),a||(a=[]);++f<i;){var n=r[f];t>0&&e(n)?t>1?Co(n,t-1,e,o,a):dr(a,n):o||(a[a.length]=n)}return a}var Po=Co;function _m(r,t,e){var o=-1,a=r.length;t<0&&(t=-t>a?0:a+t),e=e>a?a:e,e<0&&(e+=a),a=t>e?0:e-t>>>0,t>>>=0;for(var f=Array(a);++o<a;)f[o]=r[o+t];return f}var Io=_m;function wm(r,t,e){var o=r.length;return e=e===void 0?o:e,!t&&e>=o?r:Io(r,t,e)}var Mo=wm;var Cm="\\ud800-\\udfff",Pm="\\u0300-\\u036f",Im="\\ufe20-\\ufe2f",Mm="\\u20d0-\\u20ff",jm=Pm+Im+Mm,Em="\\ufe0e\\ufe0f",Lm="\\u200d",Fm=RegExp("["+Lm+Cm+jm+Em+"]");function Dm(r){return Fm.test(r)}var it=Dm;function Bm(r){return r.split("")}var jo=Bm;var Eo="\\ud800-\\udfff",Rm="\\u0300-\\u036f",Nm="\\ufe20-\\ufe2f",Gm="\\u20d0-\\u20ff",Um=Rm+Nm+Gm,Wm="\\ufe0e\\ufe0f",Km="["+Eo+"]",gt="["+Um+"]",yt="\\ud83c[\\udffb-\\udfff]",qm="(?:"+gt+"|"+yt+")",Lo="[^"+Eo+"]",Fo="(?:\\ud83c[\\udde6-\\uddff]){2}",Do="[\\ud800-\\udbff][\\udc00-\\udfff]",Hm="\\u200d",Bo=qm+"?",Ro="["+Wm+"]?",zm="(?:"+Hm+"(?:"+[Lo,Fo,Do].join("|")+")"+Ro+Bo+")*",$m=Ro+Bo+zm,Xm="(?:"+[Lo+gt+"?",gt,Fo,Do,Km].join("|")+")",Jm=RegExp(yt+"(?="+yt+")|"+Xm+$m,"g");function Vm(r){return r.match(Jm)||[]}var No=Vm;function Ym(r){return it(r)?No(r):jo(r)}var Go=Ym;function Zm(r){return function(t){t=Tr(t);var e=it(t)?Go(t):void 0,o=e?e[0]:t.charAt(0),a=e?Mo(e,1).join(""):t.slice(1);return o[r]()+a}}var Uo=Zm;var Qm=Uo("toUpperCase"),Wo=Qm;function km(r){return Wo(Tr(r).toLowerCase())}var ru=km;var tu=1,eu=2;function ou(r,t,e,o){var a=e.length,f=a,i=!o;if(r==null)return!f;for(r=Object(r);a--;){var n=e[a];if(i&&n[2]?n[1]!==r[n[0]]:!(n[0]in r))return!1}for(;++a<f;){n=e[a];var p=n[0],s=r[p],u=n[1];if(i&&n[2]){if(s===void 0&&!(p in r))return!1}else{var m=new D;if(o)var l=o(s,u,p,r,t,m);if(!(l===void 0?hr(u,s,tu|eu,o,m):l))return!1}}return!0}var Ko=ou;function au(r){return r===r&&!g(r)}var nt=au;function fu(r){for(var t=R(r),e=t.length;e--;){var o=t[e],a=r[o];t[e]=[o,a,nt(a)]}return t}var qo=fu;function iu(r,t){return function(e){return e==null?!1:e[r]===t&&(t!==void 0||r in Object(e))}}var pt=iu;function nu(r){var t=qo(r);return t.length==1&&t[0][2]?pt(t[0][0],t[0][1]):function(e){return e===r||Ko(e,r,t)}}var Ho=nu;function pu(r,t){return r!=null&&t in Object(r)}var zo=pu;function su(r,t,e){t=ft(t,r);for(var o=-1,a=t.length,f=!1;++o<a;){var i=k(t[o]);if(!(f=r!=null&&e(r,i)))break;r=r[i]}return f||++o!=a?f:(a=r==null?0:r.length,!!a&&ur(a)&&mr(i,a)&&(d(r)||M(r)))}var $o=su;function mu(r,t){return r!=null&&$o(r,t,zo)}var Xo=mu;var uu=1,lu=2;function du(r,t){return br(r)&&nt(t)?pt(k(r),t):function(e){var o=Oo(e,r);return o===void 0&&o===t?Xo(e,r):hr(t,o,uu|lu)}}var Jo=du;function cu(r){return function(t){return t?.[r]}}var st=cu;function xu(r){return function(t){return Sr(t,r)}}var Vo=xu;function gu(r){return br(r)?st(k(r)):Vo(r)}var Yo=gu;function yu(r){return typeof r=="function"?r:r==null?Z:typeof r=="object"?d(r)?Jo(r[0],r[1]):Ho(r):Yo(r)}var Zo=yu;function hu(r,t){return r&&Qr(r,t,R)}var Qo=hu;function bu(r,t){return function(e,o){if(e==null)return e;if(!P(e))return r(e,o);for(var a=e.length,f=t?a:-1,i=Object(e);(t?f--:++f<a)&&o(i[f],f,i)!==!1;);return e}}var ko=bu;var Tu=ko(Qo),ra=Tu;function Su(r,t){var e=-1,o=P(r)?Array(r.length):[];return ra(r,function(a,f,i){o[++e]=t(a,f,i)}),o}var ta=Su;var Au="[object Number]";function vu(r){return typeof r=="number"||h(r)&&w(r)==Au}var Ou=vu;function _u(r){return r==null}var wu=_u;function Cu(r){return r===null}var Pu=Cu;function Iu(r,t){var e=r.length;for(r.sort(t);e--;)r[e]=r[e].value;return r}var ea=Iu;function Mu(r,t){if(r!==t){var e=r!==void 0,o=r===null,a=r===r,f=I(r),i=t!==void 0,n=t===null,p=t===t,s=I(t);if(!n&&!s&&!f&&r>t||f&&i&&p&&!n&&!s||o&&i&&p||!e&&p||!a)return 1;if(!o&&!f&&!s&&r<t||s&&e&&a&&!o&&!f||n&&e&&a||!i&&a||!p)return-1}return 0}var oa=Mu;function ju(r,t,e){for(var o=-1,a=r.criteria,f=t.criteria,i=a.length,n=e.length;++o<i;){var p=oa(a[o],f[o]);if(p){if(o>=n)return p;var s=e[o];return p*(s=="desc"?-1:1)}}return r.index-t.index}var aa=ju;function Eu(r,t,e){t.length?t=Q(t,function(f){return d(f)?function(i){return Sr(i,f.length===1?f[0]:f)}:f}):t=[Z];var o=-1;t=Q(t,J(Zo));var a=ta(r,function(f,i,n){var p=Q(t,function(s){return s(f)});return{criteria:p,index:++o,value:f}});return ea(a,function(f,i){return aa(f,i,e)})}var fa=Eu;var Lu=yr(function(r,t){if(r==null)return[];var e=t.length;return e>1&&Pr(r,t[0],t[1])?t=[]:e>2&&Pr(t[0],t[1],t[2])&&(t=[t[0]]),fa(r,Po(t,1),[])}),Fu=Lu;var Du=Math.max;function Bu(r){if(!(r&&r.length))return[];var t=0;return r=Ur(r,function(e){if(kr(e))return t=Du(e.length,t),!0}),Fr(t,function(e){return Q(r,st(e))})}var ia=Bu;var Ru=yr(ia),Nu=Ru;var RA={Blob:"esriFieldTypeBlob",Date:"esriFieldTypeDate",DateOnly:"esriFieldTypeDateOnly",TimestampOffset:"esriFieldTypeTimestampOffset",Double:"esriFieldTypeDouble",Geometry:"esriFieldTypeGeometry",GlobalID:"esriFieldTypeGlobalID",GUID:"esriFieldTypeGUID",Integer:"esriFieldTypeInteger",SmallInteger:"esriFieldTypeSmallInteger",BigInteger:"esriFieldTypeBigInteger",OID:"esriFieldTypeOID",Raster:"esriFieldTypeRaster",Single:"esriFieldTypeSingle",String:"esriFieldTypeString",XML:"esriFieldTypeXML"},NA={Dash:"esriSLSDash",DashDot:"esriSLSDashDot",DashDotDot:"esriSLSDashDotDot",Dot:"esriSLSDot",Null:"esriSLSNull",Solid:"esriSLSSolid"},GA={Circle:"esriSMSCircle",Cross:"esriSMSCross",Diamond:"esriSMSDiamond",Square:"esriSMSSquare",X:"esriSMSX",Triangle:"esriSMSTriangle"},UA={BackwardDiagonal:"esriSFSBackwardDiagonal",Cross:"esriSFSCross",DiagonalCross:"esriSFSDiagonalCross",ForwardDiagonal:"esriSFSForwardDiagonal",Horizontal:"esriSFSHorizontal",Null:"esriSFSNull",Solid:"esriSFSSolid",Vertical:"esriSFSVertical"},WA={Left:"left",Right:"right",Center:"center",Justify:"justify"},KA={Baseline:"baseline",Top:"top",Middle:"middle",Bottom:"bottom"},qA={SLS:"esriSLS",SMS:"esriSMS",SFS:"esriSFS",PMS:"esriPMS",PFS:"esriPFS",TS:"esriTS"},HA={Italic:"italic",Normal:"normal",Oblique:"oblique"},zA={Bold:"bold",Bolder:"bolder",Lighter:"lighter",Normal:"normal"},$A={LineThrough:"line-through",Underline:"underline",None:"none"},XA={UniqueValue:"unique-value",Simple:"simple",ClassBreaks:"class-breaks",Heatmap:"heatmap",DotDensity:"dot-density",Dictionary:"dictionary",PieChart:"pie-chart"},JA={Feet:"feet",Miles:"miles",NauticalMiles:"nautical-miles",USNauticalMiles:"us-nautical-miles",Meters:"meters",Kilometers:"kilometers"};export{d as a,g as b,jr as c,xt as d,ru as e,Gp as f,zp as g,bs as h,_s as i,am as j,Ou as k,wu as l,Pu as m,im as n,Fu as o,Nu as p,RA as q,NA as r,GA as s,UA as t,WA as u,KA as v,qA as w,HA as x,zA as y,$A as z,XA as A,JA as B};