@chili-publish/studio-sdk 1.25.1 → 1.27.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/_bundles/main.es.js +2403 -0
  2. package/_bundles/main.es.js.map +1 -0
  3. package/_bundles/main.js +21 -2
  4. package/_bundles/main.js.map +1 -1
  5. package/connector-types/src/Connector.Shared.d.ts +30 -0
  6. package/connector-types/src/Connector.Shared.js +2 -0
  7. package/connector-types/src/Connector.Shared.js.map +1 -0
  8. package/connector-types/src/DataConnector.d.ts +34 -0
  9. package/connector-types/src/DataConnector.js +2 -0
  10. package/connector-types/src/DataConnector.js.map +1 -0
  11. package/connector-types/src/FontConnector.d.ts +20 -0
  12. package/connector-types/src/FontConnector.js +2 -0
  13. package/connector-types/src/FontConnector.js.map +1 -0
  14. package/connector-types/src/MediaConnector.d.ts +20 -0
  15. package/connector-types/src/MediaConnector.js +2 -0
  16. package/connector-types/src/MediaConnector.js.map +1 -0
  17. package/connector-types/src/index.d.ts +4 -0
  18. package/connector-types/src/index.js +5 -0
  19. package/connector-types/src/index.js.map +1 -0
  20. package/lib/editor-engine.json +1 -1
  21. package/lib/package.json +10 -18
  22. package/lib/src/controllers/ActionController.d.ts +13 -13
  23. package/lib/src/controllers/ActionController.js.map +1 -1
  24. package/lib/src/controllers/AnimationController.d.ts +10 -10
  25. package/lib/src/controllers/AnimationController.js.map +1 -1
  26. package/lib/src/controllers/BarcodeController.d.ts +15 -15
  27. package/lib/src/controllers/BarcodeController.js.map +1 -1
  28. package/lib/src/controllers/BrandKitController.d.ts +103 -0
  29. package/lib/src/controllers/BrandKitController.js +357 -0
  30. package/lib/src/controllers/BrandKitController.js.map +1 -0
  31. package/lib/src/controllers/CanvasController.d.ts +4 -4
  32. package/lib/src/controllers/CanvasController.js.map +1 -1
  33. package/lib/src/controllers/CharacterStyleController.d.ts +8 -8
  34. package/lib/src/controllers/CharacterStyleController.js.map +1 -1
  35. package/lib/src/controllers/ClipboardController.d.ts +4 -4
  36. package/lib/src/controllers/ClipboardController.js.map +1 -1
  37. package/lib/src/controllers/ColorConversionController.d.ts +1 -1
  38. package/lib/src/controllers/ColorConversionController.js.map +1 -1
  39. package/lib/src/controllers/ColorStyleController.d.ts +8 -8
  40. package/lib/src/controllers/ColorStyleController.js.map +1 -1
  41. package/lib/src/controllers/ConfigurationController.d.ts +4 -4
  42. package/lib/src/controllers/ConfigurationController.js.map +1 -1
  43. package/lib/src/controllers/ConnectorController.d.ts +3 -3
  44. package/lib/src/controllers/ConnectorController.js +1 -1
  45. package/lib/src/controllers/ConnectorController.js.map +1 -1
  46. package/lib/src/controllers/DataConnectorController.d.ts +4 -3
  47. package/lib/src/controllers/DataConnectorController.js.map +1 -1
  48. package/lib/src/controllers/DataSourceController.d.ts +4 -4
  49. package/lib/src/controllers/DataSourceController.js.map +1 -1
  50. package/lib/src/controllers/DebugController.d.ts +4 -4
  51. package/lib/src/controllers/DebugController.js.map +1 -1
  52. package/lib/src/controllers/DocumentController.d.ts +4 -4
  53. package/lib/src/controllers/DocumentController.js.map +1 -1
  54. package/lib/src/controllers/ExperimentController.d.ts +8 -8
  55. package/lib/src/controllers/ExperimentController.js.map +1 -1
  56. package/lib/src/controllers/FontConnectorController.d.ts +2 -2
  57. package/lib/src/controllers/FontConnectorController.js +1 -1
  58. package/lib/src/controllers/FontConnectorController.js.map +1 -1
  59. package/lib/src/controllers/FontController.d.ts +13 -13
  60. package/lib/src/controllers/FontController.js.map +1 -1
  61. package/lib/src/controllers/FrameController.d.ts +1 -1
  62. package/lib/src/controllers/FrameController.js.map +1 -1
  63. package/lib/src/controllers/InfoController.js.map +1 -1
  64. package/lib/src/controllers/LayoutController.d.ts +1 -1
  65. package/lib/src/controllers/LayoutController.js.map +1 -1
  66. package/lib/src/controllers/MediaConnectorController.d.ts +9 -9
  67. package/lib/src/controllers/MediaConnectorController.js +8 -8
  68. package/lib/src/controllers/MediaConnectorController.js.map +1 -1
  69. package/lib/src/controllers/PageController.d.ts +4 -4
  70. package/lib/src/controllers/PageController.js +2 -2
  71. package/lib/src/controllers/PageController.js.map +1 -1
  72. package/lib/src/controllers/ParagraphStyleController.d.ts +8 -8
  73. package/lib/src/controllers/ParagraphStyleController.js.map +1 -1
  74. package/lib/src/controllers/ShapeController.d.ts +11 -11
  75. package/lib/src/controllers/ShapeController.js.map +1 -1
  76. package/lib/src/controllers/SubscriberController.d.ts +8 -2
  77. package/lib/src/controllers/SubscriberController.js +11 -3
  78. package/lib/src/controllers/SubscriberController.js.map +1 -1
  79. package/lib/src/controllers/TextStyleController.d.ts +3 -3
  80. package/lib/src/controllers/TextStyleController.js.map +1 -1
  81. package/lib/src/controllers/ToolController.d.ts +11 -11
  82. package/lib/src/controllers/ToolController.js.map +1 -1
  83. package/lib/src/controllers/UndoManagerController.d.ts +16 -10
  84. package/lib/src/controllers/UndoManagerController.js +11 -3
  85. package/lib/src/controllers/UndoManagerController.js.map +1 -1
  86. package/lib/src/controllers/UtilsController.d.ts +3 -3
  87. package/lib/src/controllers/UtilsController.js.map +1 -1
  88. package/lib/src/controllers/VariableController.d.ts +50 -50
  89. package/lib/src/controllers/VariableController.js +3 -1
  90. package/lib/src/controllers/VariableController.js.map +1 -1
  91. package/lib/src/index.d.ts +5 -3
  92. package/lib/src/index.js +3 -2
  93. package/lib/src/index.js.map +1 -1
  94. package/lib/src/interactions/Connector.d.ts +5 -1
  95. package/lib/src/interactions/Connector.js +2 -2
  96. package/lib/src/interactions/Connector.js.map +1 -1
  97. package/lib/src/next/NextInitiator.js.map +1 -1
  98. package/lib/src/next/controllers/CanvasController.d.ts +1 -1
  99. package/lib/src/next/controllers/CanvasController.js.map +1 -1
  100. package/lib/src/next/controllers/ConnectorController.d.ts +3 -3
  101. package/lib/src/next/controllers/ConnectorController.js.map +1 -1
  102. package/lib/src/next/controllers/PageController.d.ts +2 -2
  103. package/lib/src/next/controllers/PageController.js.map +1 -1
  104. package/lib/src/next/controllers/SubscriberController.d.ts +5 -0
  105. package/lib/src/next/controllers/SubscriberController.js +7 -0
  106. package/lib/src/next/controllers/SubscriberController.js.map +1 -1
  107. package/lib/src/next/controllers/VariableController.d.ts +8 -8
  108. package/lib/src/next/controllers/VariableController.js +3 -1
  109. package/lib/src/next/controllers/VariableController.js.map +1 -1
  110. package/lib/src/next/index.d.ts +2 -2
  111. package/lib/src/next/index.js.map +1 -1
  112. package/lib/src/next/tests/controllers/CanvasController.test.js.map +1 -1
  113. package/lib/src/next/tests/controllers/ConnectorController.test.js.map +1 -1
  114. package/lib/src/next/tests/controllers/PageController.test.js.map +1 -1
  115. package/lib/src/next/tests/controllers/SubscriberContoller.test.js +1 -0
  116. package/lib/src/next/tests/controllers/SubscriberContoller.test.js.map +1 -1
  117. package/lib/src/next/tests/controllers/VariableController.test.js.map +1 -1
  118. package/lib/src/next/types/ConnectorTypes.js.map +1 -1
  119. package/lib/src/next/types/NextSubscribers.js.map +1 -1
  120. package/lib/src/next/types/PageTypes.js.map +1 -1
  121. package/lib/src/next/types/VariableTypes.js.map +1 -1
  122. package/lib/src/sdk.d.ts +3 -1
  123. package/lib/src/sdk.js +4 -0
  124. package/lib/src/sdk.js.map +1 -1
  125. package/lib/src/setupTests.js.map +1 -1
  126. package/lib/src/tests/__mocks__/Animations.js.map +1 -1
  127. package/lib/src/tests/__mocks__/Brandkit.js +389 -0
  128. package/lib/src/tests/__mocks__/Brandkit.js.map +1 -0
  129. package/lib/src/tests/__mocks__/Config.js.map +1 -1
  130. package/lib/src/tests/__mocks__/FrameProperties.js.map +1 -1
  131. package/lib/src/tests/__mocks__/MockImageFrameSource.js.map +1 -1
  132. package/lib/src/tests/__mocks__/localConfig.js.map +1 -1
  133. package/lib/src/tests/__mocks__/mockDocument.js.map +1 -1
  134. package/lib/src/tests/controllers/ActionController.test.js.map +1 -1
  135. package/lib/src/tests/controllers/AnimationController.test.js.map +1 -1
  136. package/lib/src/tests/controllers/BarcodeController.test.js.map +1 -1
  137. package/lib/src/tests/controllers/BrandKitController.test.js +276 -0
  138. package/lib/src/tests/controllers/BrandKitController.test.js.map +1 -0
  139. package/lib/src/tests/controllers/CanvasController.test.js.map +1 -1
  140. package/lib/src/tests/controllers/CharacterStyleController.test.js +22 -0
  141. package/lib/src/tests/controllers/CharacterStyleController.test.js.map +1 -1
  142. package/lib/src/tests/controllers/ClipboardController.test.js.map +1 -1
  143. package/lib/src/tests/controllers/ColorConversionController.test.js.map +1 -1
  144. package/lib/src/tests/controllers/ColorStyleController.test.js.map +1 -1
  145. package/lib/src/tests/controllers/ConnectorController.test.js.map +1 -1
  146. package/lib/src/tests/controllers/DataConnectorController.test.js +1 -1
  147. package/lib/src/tests/controllers/DataConnectorController.test.js.map +1 -1
  148. package/lib/src/tests/controllers/DataSourceController.test.js.map +1 -1
  149. package/lib/src/tests/controllers/DebugController.test.js.map +1 -1
  150. package/lib/src/tests/controllers/DocumentController.test.js.map +1 -1
  151. package/lib/src/tests/controllers/ExperimentController.test.js.map +1 -1
  152. package/lib/src/tests/controllers/FontConnectorController.test.js.map +1 -1
  153. package/lib/src/tests/controllers/FontController.test.js.map +1 -1
  154. package/lib/src/tests/controllers/FrameController.test.js.map +1 -1
  155. package/lib/src/tests/controllers/InfoController.test.js.map +1 -1
  156. package/lib/src/tests/controllers/LayoutController.test.js.map +1 -1
  157. package/lib/src/tests/controllers/MediaConnectorController.test.js.map +1 -1
  158. package/lib/src/tests/controllers/PageController.test.js.map +1 -1
  159. package/lib/src/tests/controllers/ParagraphStyleController.test.js +25 -0
  160. package/lib/src/tests/controllers/ParagraphStyleController.test.js.map +1 -1
  161. package/lib/src/tests/controllers/ShapeController.test.js.map +1 -1
  162. package/lib/src/tests/controllers/SubscriberContoller.test.js +9 -3
  163. package/lib/src/tests/controllers/SubscriberContoller.test.js.map +1 -1
  164. package/lib/src/tests/controllers/TextStyleController.test.js.map +1 -1
  165. package/lib/src/tests/controllers/ToolController.test.js.map +1 -1
  166. package/lib/src/tests/controllers/UndoManagerController.test.js +2 -2
  167. package/lib/src/tests/controllers/UndoManagerController.test.js.map +1 -1
  168. package/lib/src/tests/controllers/UtilsController.test.js.map +1 -1
  169. package/lib/src/tests/controllers/VariableController.test.js.map +1 -1
  170. package/lib/src/tests/index.test.js.map +1 -1
  171. package/lib/src/tests/interactions/Connector.test.js.map +1 -1
  172. package/lib/src/tests/utils/ConnectorCompatibilityTools.test.js.map +1 -1
  173. package/lib/src/tests/utils/EditorResponseData.test.js.map +1 -1
  174. package/lib/src/tests/utils/EventSubscription.test.js.map +1 -1
  175. package/lib/src/tests/utils/LocalConfigurationDecorator.test.js.map +1 -1
  176. package/lib/src/tests/utils/Logging.test.js.map +1 -1
  177. package/lib/src/tests/utils/Round.test.js.map +1 -1
  178. package/lib/src/types/ActionTypes.js.map +1 -1
  179. package/lib/src/types/AnimationTypes.js.map +1 -1
  180. package/lib/src/types/BarcodeTypes.js.map +1 -1
  181. package/lib/src/types/BrandKitTypes.d.ts +129 -0
  182. package/lib/src/types/BrandKitTypes.js +2 -0
  183. package/lib/src/types/BrandKitTypes.js.map +1 -0
  184. package/lib/src/types/CharacterStyleTypes.d.ts +29 -14
  185. package/lib/src/types/CharacterStyleTypes.js.map +1 -1
  186. package/lib/src/types/ClipboardTypes.js.map +1 -1
  187. package/lib/src/types/ColorStyleTypes.d.ts +20 -5
  188. package/lib/src/types/ColorStyleTypes.js +18 -2
  189. package/lib/src/types/ColorStyleTypes.js.map +1 -1
  190. package/lib/src/types/CommonTypes.d.ts +9 -30
  191. package/lib/src/types/CommonTypes.js +0 -10
  192. package/lib/src/types/CommonTypes.js.map +1 -1
  193. package/lib/src/types/ConfigurationTypes.js.map +1 -1
  194. package/lib/src/types/ConnectorTypes.d.ts +16 -13
  195. package/lib/src/types/ConnectorTypes.js +10 -0
  196. package/lib/src/types/ConnectorTypes.js.map +1 -1
  197. package/lib/src/types/DataConnectorTypes.d.ts +2 -32
  198. package/lib/src/types/DataConnectorTypes.js.map +1 -1
  199. package/lib/src/types/DebugTypes.js.map +1 -1
  200. package/lib/src/types/DocumentTypes.d.ts +83 -4
  201. package/lib/src/types/DocumentTypes.js +6 -0
  202. package/lib/src/types/DocumentTypes.js.map +1 -1
  203. package/lib/src/types/EngineEditModeTypes.js.map +1 -1
  204. package/lib/src/types/FontConnectorTypes.d.ts +1 -19
  205. package/lib/src/types/FontConnectorTypes.js.map +1 -1
  206. package/lib/src/types/FontTypes.js.map +1 -1
  207. package/lib/src/types/FrameTypes.d.ts +8 -3
  208. package/lib/src/types/FrameTypes.js +1 -1
  209. package/lib/src/types/FrameTypes.js.map +1 -1
  210. package/lib/src/types/LayoutTypes.d.ts +18 -17
  211. package/lib/src/types/LayoutTypes.js.map +1 -1
  212. package/lib/src/types/MediaConnectorTypes.d.ts +7 -23
  213. package/lib/src/types/MediaConnectorTypes.js +2 -0
  214. package/lib/src/types/MediaConnectorTypes.js.map +1 -1
  215. package/lib/src/types/PageTypes.js.map +1 -1
  216. package/lib/src/types/ParagraphStyleTypes.d.ts +35 -17
  217. package/lib/src/types/ParagraphStyleTypes.js.map +1 -1
  218. package/lib/src/types/ShapeTypes.js.map +1 -1
  219. package/lib/src/types/TextStyleTypes.d.ts +8 -2
  220. package/lib/src/types/TextStyleTypes.js +2 -0
  221. package/lib/src/types/TextStyleTypes.js.map +1 -1
  222. package/lib/src/types/TextTypes.js.map +1 -1
  223. package/lib/src/types/VariableTypes.js.map +1 -1
  224. package/lib/src/types/ViewModeTypes.js.map +1 -1
  225. package/lib/src/types/ViewportTypes.js.map +1 -1
  226. package/lib/src/utils/BrandKitHelper.d.ts +9 -0
  227. package/lib/src/utils/BrandKitHelper.js +72 -0
  228. package/lib/src/utils/BrandKitHelper.js.map +1 -0
  229. package/lib/src/utils/ConfigHelper.js +1 -0
  230. package/lib/src/utils/ConfigHelper.js.map +1 -1
  231. package/lib/src/utils/ConnectorCompatibilityTools.js.map +1 -1
  232. package/lib/src/utils/DataItemMappingTools.js.map +1 -1
  233. package/lib/src/utils/EditorResponseData.d.ts +1 -1
  234. package/lib/src/utils/EditorResponseData.js.map +1 -1
  235. package/lib/src/utils/EngineCallbackHandler.js.map +1 -1
  236. package/lib/src/utils/EngineEvent.js.map +1 -1
  237. package/lib/src/utils/EngineEventTrigger.js.map +1 -1
  238. package/lib/src/utils/Enums.js.map +1 -1
  239. package/lib/src/utils/LocalConfigurationDecorator.d.ts +2 -2
  240. package/lib/src/utils/LocalConfigurationDecorator.js.map +1 -1
  241. package/lib/src/utils/MathUtils.js.map +1 -1
  242. package/package.json +10 -18
  243. package/_bundles/report.html +0 -38
  244. package/lib/src/next/tests/controllers/CanvasController.test.d.ts +0 -1
  245. package/lib/src/next/tests/controllers/ConnectorController.test.d.ts +0 -1
  246. package/lib/src/next/tests/controllers/PageController.test.d.ts +0 -1
  247. package/lib/src/next/tests/controllers/SubscriberContoller.test.d.ts +0 -1
  248. package/lib/src/next/tests/controllers/VariableController.test.d.ts +0 -1
  249. package/lib/src/setupTests.d.ts +0 -1
  250. package/lib/src/tests/__mocks__/Animations.d.ts +0 -2
  251. package/lib/src/tests/__mocks__/Config.d.ts +0 -4
  252. package/lib/src/tests/__mocks__/FrameProperties.d.ts +0 -52
  253. package/lib/src/tests/__mocks__/MockImageFrameSource.d.ts +0 -4
  254. package/lib/src/tests/__mocks__/localConfig.d.ts +0 -2
  255. package/lib/src/tests/__mocks__/mockDocument.d.ts +0 -1
  256. package/lib/src/tests/controllers/ActionController.test.d.ts +0 -1
  257. package/lib/src/tests/controllers/AnimationController.test.d.ts +0 -1
  258. package/lib/src/tests/controllers/BarcodeController.test.d.ts +0 -1
  259. package/lib/src/tests/controllers/CanvasController.test.d.ts +0 -1
  260. package/lib/src/tests/controllers/CharacterStyleController.test.d.ts +0 -1
  261. package/lib/src/tests/controllers/ClipboardController.test.d.ts +0 -1
  262. package/lib/src/tests/controllers/ColorConversionController.test.d.ts +0 -1
  263. package/lib/src/tests/controllers/ColorStyleController.test.d.ts +0 -1
  264. package/lib/src/tests/controllers/ConnectorController.test.d.ts +0 -1
  265. package/lib/src/tests/controllers/DataConnectorController.test.d.ts +0 -1
  266. package/lib/src/tests/controllers/DataSourceController.test.d.ts +0 -1
  267. package/lib/src/tests/controllers/DebugController.test.d.ts +0 -1
  268. package/lib/src/tests/controllers/DocumentController.test.d.ts +0 -1
  269. package/lib/src/tests/controllers/ExperimentController.test.d.ts +0 -1
  270. package/lib/src/tests/controllers/FontConnectorController.test.d.ts +0 -1
  271. package/lib/src/tests/controllers/FontController.test.d.ts +0 -1
  272. package/lib/src/tests/controllers/FrameController.test.d.ts +0 -1
  273. package/lib/src/tests/controllers/InfoController.test.d.ts +0 -1
  274. package/lib/src/tests/controllers/LayoutController.test.d.ts +0 -1
  275. package/lib/src/tests/controllers/MediaConnectorController.test.d.ts +0 -1
  276. package/lib/src/tests/controllers/PageController.test.d.ts +0 -1
  277. package/lib/src/tests/controllers/ParagraphStyleController.test.d.ts +0 -1
  278. package/lib/src/tests/controllers/ShapeController.test.d.ts +0 -1
  279. package/lib/src/tests/controllers/SubscriberContoller.test.d.ts +0 -1
  280. package/lib/src/tests/controllers/TextStyleController.test.d.ts +0 -1
  281. package/lib/src/tests/controllers/ToolController.test.d.ts +0 -1
  282. package/lib/src/tests/controllers/UndoManagerController.test.d.ts +0 -1
  283. package/lib/src/tests/controllers/UtilsController.test.d.ts +0 -1
  284. package/lib/src/tests/controllers/VariableController.test.d.ts +0 -1
  285. package/lib/src/tests/index.test.d.ts +0 -1
  286. package/lib/src/tests/interactions/Connector.test.d.ts +0 -1
  287. package/lib/src/tests/utils/ConnectorCompatibilityTools.test.d.ts +0 -1
  288. package/lib/src/tests/utils/EditorResponseData.test.d.ts +0 -1
  289. package/lib/src/tests/utils/EventSubscription.test.d.ts +0 -1
  290. package/lib/src/tests/utils/LocalConfigurationDecorator.test.d.ts +0 -1
  291. package/lib/src/tests/utils/Logging.test.d.ts +0 -1
  292. package/lib/src/tests/utils/Round.test.d.ts +0 -1
@@ -0,0 +1,2403 @@
1
+ var Ie = (s) => {
2
+ throw TypeError(s);
3
+ };
4
+ var ve = (s, i, t) => i.has(s) || Ie("Cannot " + t);
5
+ var a = (s, i, t) => (ve(s, i, "read from private field"), t ? t.call(s) : i.get(s)), u = (s, i, t) => i.has(s) ? Ie("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(s) : i.set(s, t), g = (s, i, t, e) => (ve(s, i, "write to private field"), e ? e.call(s, t) : i.set(s, t), t);
6
+ const bs = "2.10.latest", cs = {
7
+ current: bs
8
+ }, Is = "1.27.0", hs = {
9
+ version: Is
10
+ };
11
+ var _;
12
+ (function(s) {
13
+ s.Call = "call", s.Reply = "reply", s.Syn = "syn", s.SynAck = "synAck", s.Ack = "ack";
14
+ })(_ || (_ = {}));
15
+ var ct;
16
+ (function(s) {
17
+ s.Fulfilled = "fulfilled", s.Rejected = "rejected";
18
+ })(ct || (ct = {}));
19
+ var xt;
20
+ (function(s) {
21
+ s.ConnectionDestroyed = "ConnectionDestroyed", s.ConnectionTimeout = "ConnectionTimeout", s.NoIframeSrc = "NoIframeSrc";
22
+ })(xt || (xt = {}));
23
+ var Yt;
24
+ (function(s) {
25
+ s.DataCloneError = "DataCloneError";
26
+ })(Yt || (Yt = {}));
27
+ var ot;
28
+ (function(s) {
29
+ s.Message = "message";
30
+ })(ot || (ot = {}));
31
+ const vs = (s, i) => {
32
+ const t = [];
33
+ let e = !1;
34
+ return {
35
+ destroy(r) {
36
+ e || (e = !0, i(`${s}: Destroying connection`), t.forEach((n) => {
37
+ n(r);
38
+ }));
39
+ },
40
+ onDestroy(r) {
41
+ e ? r() : t.push(r);
42
+ }
43
+ };
44
+ }, Ps = (s) => (...i) => {
45
+ s && console.log("[Penpal]", ...i);
46
+ }, As = {
47
+ "http:": "80",
48
+ "https:": "443"
49
+ }, Fs = /^(https?:)?\/\/([^/:]+)?(:(\d+))?/, Es = ["file:", "data:"], Ds = (s) => {
50
+ if (s && Es.find((h) => s.startsWith(h)))
51
+ return "null";
52
+ const i = document.location, t = Fs.exec(s);
53
+ let e, r, n;
54
+ t ? (e = t[1] ? t[1] : i.protocol, r = t[2], n = t[4]) : (e = i.protocol, r = i.hostname, n = i.port);
55
+ const c = n && n !== As[e] ? `:${n}` : "";
56
+ return `${e}//${r}${c}`;
57
+ }, Pe = ({ name: s, message: i, stack: t }) => ({
58
+ name: s,
59
+ message: i,
60
+ stack: t
61
+ }), Ls = (s) => {
62
+ const i = new Error();
63
+ return Object.keys(s).forEach((t) => i[t] = s[t]), i;
64
+ }, Os = (s, i, t) => {
65
+ const { localName: e, local: r, remote: n, originForSending: c, originForReceiving: h } = s;
66
+ let l = !1;
67
+ const y = (p) => {
68
+ if (p.source !== n || p.data.penpal !== _.Call)
69
+ return;
70
+ if (p.origin !== h) {
71
+ t(`${e} received message from origin ${p.origin} which did not match expected origin ${h}`);
72
+ return;
73
+ }
74
+ const f = p.data, { methodName: I, args: S, id: b } = f;
75
+ t(`${e}: Received ${I}() call`);
76
+ const L = (P) => (N) => {
77
+ if (t(`${e}: Sending ${I}() reply`), l) {
78
+ t(`${e}: Unable to send ${I}() reply due to destroyed connection`);
79
+ return;
80
+ }
81
+ const M = {
82
+ penpal: _.Reply,
83
+ id: b,
84
+ resolution: P,
85
+ returnValue: N
86
+ };
87
+ P === ct.Rejected && N instanceof Error && (M.returnValue = Pe(N), M.returnValueIsError = !0);
88
+ try {
89
+ n.postMessage(M, c);
90
+ } catch (v) {
91
+ if (v.name === Yt.DataCloneError) {
92
+ const $ = {
93
+ penpal: _.Reply,
94
+ id: b,
95
+ resolution: ct.Rejected,
96
+ returnValue: Pe(v),
97
+ returnValueIsError: !0
98
+ };
99
+ n.postMessage($, c);
100
+ }
101
+ throw v;
102
+ }
103
+ };
104
+ new Promise((P) => P(i[I].apply(i, S))).then(L(ct.Fulfilled), L(ct.Rejected));
105
+ };
106
+ return r.addEventListener(ot.Message, y), () => {
107
+ l = !0, r.removeEventListener(ot.Message, y);
108
+ };
109
+ };
110
+ let Ns = 0;
111
+ const Ms = () => ++Ns, ls = ".", ds = (s) => s ? s.split(ls) : [], xs = (s) => s.join(ls), Rs = (s, i) => {
112
+ const t = ds(i || "");
113
+ return t.push(s), xs(t);
114
+ }, Vs = (s, i, t) => {
115
+ const e = ds(i);
116
+ return e.reduce((r, n, c) => (typeof r[n] > "u" && (r[n] = {}), c === e.length - 1 && (r[n] = t), r[n]), s), s;
117
+ }, us = (s, i) => {
118
+ const t = {};
119
+ return Object.keys(s).forEach((e) => {
120
+ const r = s[e], n = Rs(e, i);
121
+ typeof r == "object" && Object.assign(t, us(r, n)), typeof r == "function" && (t[n] = r);
122
+ }), t;
123
+ }, Bs = (s) => {
124
+ const i = {};
125
+ for (const t in s)
126
+ Vs(i, t, s[t]);
127
+ return i;
128
+ }, Js = (s, i, t, e, r) => {
129
+ const { localName: n, local: c, remote: h, originForSending: l, originForReceiving: y } = i;
130
+ let p = !1;
131
+ r(`${n}: Connecting call sender`);
132
+ const f = (S) => (...b) => {
133
+ r(`${n}: Sending ${S}() call`);
134
+ let L;
135
+ try {
136
+ h.closed && (L = !0);
137
+ } catch {
138
+ L = !0;
139
+ }
140
+ if (L && e(), p) {
141
+ const P = new Error(`Unable to send ${S}() call due to destroyed connection`);
142
+ throw P.code = xt.ConnectionDestroyed, P;
143
+ }
144
+ return new Promise((P, N) => {
145
+ const M = Ms(), v = (K) => {
146
+ if (K.source !== h || K.data.penpal !== _.Reply || K.data.id !== M)
147
+ return;
148
+ if (K.origin !== y) {
149
+ r(`${n} received message from origin ${K.origin} which did not match expected origin ${y}`);
150
+ return;
151
+ }
152
+ const mt = K.data;
153
+ r(`${n}: Received ${S}() reply`), c.removeEventListener(ot.Message, v);
154
+ let wt = mt.returnValue;
155
+ mt.returnValueIsError && (wt = Ls(wt)), (mt.resolution === ct.Fulfilled ? P : N)(wt);
156
+ };
157
+ c.addEventListener(ot.Message, v);
158
+ const $ = {
159
+ penpal: _.Call,
160
+ id: M,
161
+ methodName: S,
162
+ args: b
163
+ };
164
+ h.postMessage($, l);
165
+ });
166
+ }, I = t.reduce((S, b) => (S[b] = f(b), S), {});
167
+ return Object.assign(s, Bs(I)), () => {
168
+ p = !0;
169
+ };
170
+ }, Us = (s, i, t, e, r) => {
171
+ const { destroy: n, onDestroy: c } = e;
172
+ let h, l;
173
+ const y = {};
174
+ return (p) => {
175
+ if (p.origin !== i) {
176
+ r(`Parent: Handshake - Received ACK message from origin ${p.origin} which did not match expected origin ${i}`);
177
+ return;
178
+ }
179
+ r("Parent: Handshake - Received ACK");
180
+ const f = {
181
+ localName: "Parent",
182
+ local: window,
183
+ remote: p.source,
184
+ originForSending: t,
185
+ originForReceiving: i
186
+ };
187
+ h && h(), h = Os(f, s, r), c(h), l && l.forEach((S) => {
188
+ delete y[S];
189
+ }), l = p.data.methodNames;
190
+ const I = Js(y, f, l, n, r);
191
+ return c(I), y;
192
+ };
193
+ }, ks = (s, i, t, e) => (r) => {
194
+ if (r.origin !== t) {
195
+ s(`Parent: Handshake - Received SYN message from origin ${r.origin} which did not match expected origin ${t}`);
196
+ return;
197
+ }
198
+ s("Parent: Handshake - Received SYN, responding with SYN-ACK");
199
+ const n = {
200
+ penpal: _.SynAck,
201
+ methodNames: Object.keys(i)
202
+ };
203
+ r.source.postMessage(n, e);
204
+ }, Ts = 6e4, Gs = (s, i) => {
205
+ const { destroy: t, onDestroy: e } = i, r = setInterval(() => {
206
+ s.isConnected || (clearInterval(r), t());
207
+ }, Ts);
208
+ e(() => {
209
+ clearInterval(r);
210
+ });
211
+ }, Hs = (s, i) => {
212
+ let t;
213
+ return s !== void 0 && (t = window.setTimeout(() => {
214
+ const e = new Error(`Connection timed out after ${s}ms`);
215
+ e.code = xt.ConnectionTimeout, i(e);
216
+ }, s)), () => {
217
+ clearTimeout(t);
218
+ };
219
+ }, _s = (s) => {
220
+ if (!s.src && !s.srcdoc) {
221
+ const i = new Error("Iframe must have src or srcdoc property defined.");
222
+ throw i.code = xt.NoIframeSrc, i;
223
+ }
224
+ }, $s = (s) => {
225
+ let { iframe: i, methods: t = {}, childOrigin: e, timeout: r, debug: n = !1 } = s;
226
+ const c = Ps(n), h = vs("Parent", c), { onDestroy: l, destroy: y } = h;
227
+ e || (_s(i), e = Ds(i.src));
228
+ const p = e === "null" ? "*" : e, f = us(t), I = ks(c, f, e, p), S = Us(f, e, p, h, c);
229
+ return {
230
+ promise: new Promise((L, P) => {
231
+ const N = Hs(r, y), M = (v) => {
232
+ if (!(v.source !== i.contentWindow || !v.data)) {
233
+ if (v.data.penpal === _.Syn) {
234
+ I(v);
235
+ return;
236
+ }
237
+ if (v.data.penpal === _.Ack) {
238
+ const $ = S(v);
239
+ $ && (N(), L($));
240
+ return;
241
+ }
242
+ }
243
+ };
244
+ window.addEventListener(ot.Message, M), c("Parent: Awaiting handshake"), Gs(i, h), l((v) => {
245
+ window.removeEventListener(ot.Message, M), v && P(v);
246
+ });
247
+ }),
248
+ destroy() {
249
+ y();
250
+ }
251
+ };
252
+ }, Ks = (s) => {
253
+ const i = new RegExp(/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w]+\/$/);
254
+ let t = "";
255
+ return i.test(s) ? t = s : s.indexOf("/index.html") > -1 ? t = s.replace("/index.html", "/") : s.charAt(-1) !== "/" && (t = `${s}/`), t;
256
+ }, zs = (s, i, t) => {
257
+ const e = Ks(i), n = `<html>
258
+ <head>
259
+ <base href="/" />
260
+ <meta charset="UTF-8"/>
261
+ <!-- use this property to pass the StudioStyling to the engine -->
262
+ <meta name="studio-styling" content='${JSON.stringify(t || {})}'>
263
+ </head>
264
+ <body>
265
+ <script>
266
+ <\/script>
267
+ <script src="${e}init.js" async><\/script>
268
+ <script src="${e}flutter_bootstrap.js"><\/script>
269
+ <script>
270
+ initializeStudioEngine({
271
+ assetBase: '${e}',
272
+ });
273
+ <\/script>
274
+ </body>
275
+ </html>
276
+ `;
277
+ s.srcdoc = n;
278
+ }, Ws = (s, i, t, e = "chili-editor", r) => {
279
+ const n = `#${e}`, c = document.createElement("iframe");
280
+ c.setAttribute("srcdoc", " "), c.setAttribute("title", "Chili-Editor"), c.setAttribute("style", "width: 100%; height: 100%;"), c.setAttribute("frameBorder", "0"), c.setAttribute("referrerpolicy", "origin");
281
+ const h = () => {
282
+ const l = document.querySelector(n);
283
+ l && (l == null || l.appendChild(c), zs(c, s, r));
284
+ };
285
+ document.readyState === "complete" || document.readyState === "interactive" ? h() : document.addEventListener("DOMContentLoaded", () => {
286
+ h();
287
+ }), t(
288
+ $s({
289
+ // The iframe to which a connection should be made
290
+ iframe: c,
291
+ // All the methods that we want to expose to the child should be inside the methods object
292
+ // f.e. stateChange(documentJson)
293
+ methods: {
294
+ actionsChanged: i.onActionsChanged,
295
+ stateChanged: i.onStateChanged,
296
+ documentLoaded: i.onDocumentLoaded,
297
+ authExpired: i.onAuthExpired,
298
+ viewportRequested: i.onViewportRequested,
299
+ selectedFramesContent: i.onSelectedFramesContentChanged,
300
+ selectedFramesLayout: i.onSelectedFramesLayoutChanged,
301
+ allFramesLayout: i.onFramesLayoutChanged,
302
+ selectedLayoutProperties: i.onSelectedLayoutPropertiesChanged,
303
+ openLayoutPropertiesPanel: i.onPageSelectionChanged,
304
+ selectedLayoutUnit: i.onSelectedLayoutUnitChanged,
305
+ scrubberPositionChanged: i.onScrubberPositionChanged,
306
+ frameAnimationsChanged: i.onFrameAnimationsChanged,
307
+ selectedToolChanged: i.onSelectedToolChanged,
308
+ variableListChanged: i.onVariableListChanged,
309
+ undoStackStateChanged: i.onUndoStateChanged,
310
+ selectedLayoutFramesChanged: i.onSelectedLayoutFramesChanged,
311
+ selectedTextStyleChanged: i.onSelectedTextStyleChanged,
312
+ colorsChanged: i.onColorsChanged,
313
+ paragraphStylesChanged: i.onParagraphStylesChanged,
314
+ characterStylesChanged: i.onCharacterStylesChanged,
315
+ fontFamiliesChanged: i.onFontFamiliesChanged,
316
+ selectedLayoutId: i.onSelectedLayoutIdChanged,
317
+ layoutListChanged: i.onLayoutsChanged,
318
+ connectorEvent: i.onConnectorEvent,
319
+ connectorsChanged: i.onConnectorsChanged,
320
+ zoomChanged: i.onZoomChanged,
321
+ pageSnapshotInvalidated: i.onPageSnapshotInvalidated,
322
+ pagesChanged: i.onPagesChanged,
323
+ pageSizeChanged: i.onPageSizeChanged,
324
+ shapeCornerRadiusChanged: i.onShapeCornerRadiusChanged,
325
+ cropActiveFrameIdChanged: i.onCropActiveFrameIdChanged,
326
+ asyncError: i.onAsyncError,
327
+ viewModeChanged: i.onViewModeChanged,
328
+ barcodeValidationChanged: i.onBarcodeValidationChanged,
329
+ selectedPageIdChanged: i.onSelectedPageIdChanged,
330
+ dataSourceIdChanged: i.onDataSourceIdChanged,
331
+ documentIssueListChanged: i.onDocumentIssueListChanged,
332
+ customUndoDataChanged: i.onCustomUndoDataChanged,
333
+ engineEditingModeChanged: i.onEngineEditModeChanged,
334
+ brandKitMediaChanged: i.onBrandKitMediaChanged
335
+ }
336
+ })
337
+ );
338
+ };
339
+ var Z = /* @__PURE__ */ ((s) => (s.GraFxStudioEnvironmentApiUrl = "ENVIRONMENT_API", s.GraFxStudioSdkVersion = "SDK_VERSION", s.GraFxStudioDocumentType = "DOCUMENT_TYPE", s.GraFxStudioTemplateId = "TEMPLATE_ID", s.GraFxStudioAuthToken = "GRAFX_AUTH_TOKEN", s.QueryCallCacheEnabled = "ENABLE_QUERY_CALL_CACHE", s))(Z || {});
340
+ const qs = {
341
+ shortcutOptions: {
342
+ debugPanel: { enabled: !1 },
343
+ ellipse: { enabled: !1 },
344
+ hand: { enabled: !1 },
345
+ image: { enabled: !1 },
346
+ polygon: { enabled: !1 },
347
+ rectangle: { enabled: !1 },
348
+ select: { enabled: !1 },
349
+ text: { enabled: !1 },
350
+ zoom: { enabled: !1 },
351
+ copyPaste: { enabled: !1 },
352
+ viewMode: { enabled: !1 }
353
+ }
354
+ };
355
+ var js = /* @__PURE__ */ ((s) => (s.overflow = "overflow", s.fontLoading = "fontLoading", s.actionRegister = "actionRegister", s.actionExecution = "actionExecution", s.actionCircular = "actionCircular", s))(js || {}), gs = /* @__PURE__ */ ((s) => (s.project = "project", s.template = "template", s))(gs || {});
356
+ const Ys = 404075;
357
+ function o(s, i = !0) {
358
+ try {
359
+ if (!s.success) {
360
+ const e = s.error ?? "Yikes, something went wrong", r = {
361
+ cause: {
362
+ name: String(s.status),
363
+ message: s.error ?? "Yikes, something went wrong"
364
+ }
365
+ };
366
+ if (s.status === Ys) {
367
+ const c = JSON.parse(s.data).statusCode;
368
+ throw new Zs(c, e, r);
369
+ } else
370
+ throw new Error(e, r);
371
+ }
372
+ const t = s.data && i;
373
+ return {
374
+ ...s,
375
+ parsedData: t ? JSON.parse(s.data) : s.data
376
+ };
377
+ } catch (t) {
378
+ throw console.error(t), t;
379
+ }
380
+ }
381
+ class Zs extends Error {
382
+ constructor(i, t, e) {
383
+ super(t, e), this.statusCode = i;
384
+ }
385
+ }
386
+ var O;
387
+ class Ae {
388
+ /**
389
+ * @ignore
390
+ */
391
+ constructor(i) {
392
+ /**
393
+ * @ignore
394
+ */
395
+ u(this, O);
396
+ this.getAll = async () => (await a(this, O)).getActions().then((e) => o(e)), this.getById = async (t) => (await a(this, O)).getActionById(t).then((r) => o(r)), this.create = async () => (await a(this, O)).createAction().then((e) => o(e)), this.duplicate = async (t) => (await a(this, O)).duplicateAction(t).then((r) => o(r)), this.remove = async (t) => (await a(this, O)).removeAction(t).then((r) => o(r)), this.update = async (t, e) => (await a(this, O)).updateAction(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => this.update(t, { name: e }), this.updateScript = async (t, e) => this.update(t, { script: e }), this.updateTriggers = async (t, e) => this.update(t, { triggers: e }), this.move = async (t, e) => (await a(this, O)).moveActions(t, e).then((n) => o(n)), this.setTypeError = async (t, e) => this.update(t, { hasTypeError: e }), this.disable = async () => (await a(this, O)).disableActions().then((e) => o(e)), this.enable = async () => (await a(this, O)).enableActions().then((e) => o(e)), g(this, O, i);
397
+ }
398
+ }
399
+ O = new WeakMap();
400
+ var E;
401
+ class Fe {
402
+ /**
403
+ * @ignore
404
+ */
405
+ constructor(i) {
406
+ /**
407
+ * @ignore
408
+ */
409
+ u(this, E);
410
+ this.getAllOnSelectedLayout = async () => (await a(this, E)).getAnimationsOnSelectedLayout().then((e) => o(e)), this.getByFrameId = async (t, e) => (await a(this, E)).getAnimationByFrameId(t, e).then((n) => o(n)), this.getByLayoutId = async (t) => (await a(this, E)).getAnimationsByLayoutId(t).then((r) => o(r)), this.setFrameAnimation = async (t) => (await a(this, E)).setFrameAnimation(JSON.stringify(t)).then(
411
+ (r) => o({ ...r, data: JSON.stringify(t) })
412
+ ), this.play = async () => (await a(this, E)).playAnimation().then((e) => o(e)), this.pause = async () => (await a(this, E)).pauseAnimation().then((e) => o(e)), this.setScrubberPosition = async (t) => (await a(this, E)).setScrubberPosition(t).then((r) => o(r)), this.setDuration = async (t) => (await a(this, E)).setAnimationDuration(t).then((r) => o(r)), this.resetFrameAnimation = async (t) => (await a(this, E)).resetFrameAnimation(t).then((r) => o(r)), this.reset = async () => (await a(this, E)).resetAnimation().then((e) => o(e)), g(this, E, i);
413
+ }
414
+ }
415
+ E = new WeakMap();
416
+ var G = /* @__PURE__ */ ((s) => (s.code39 = "code39", s.code93 = "code93", s.code128 = "code128", s.dataMatrix = "dataMatrix", s.ean13 = "ean13", s.ean8 = "ean8", s.qr = "qr", s.upca = "upca", s.upce = "upce", s.gs1128 = "gs1128", s))(G || {}), Ot = /* @__PURE__ */ ((s) => (s.low = "low", s.medium = "medium", s.quartile = "quartile", s.high = "high", s))(Ot || {}), ft = /* @__PURE__ */ ((s) => (s.utf8 = "utf8", s.iso8859_1 = "iso8859_1", s.code128a = "code128a", s.code128b = "code128b", s.code128c = "code128c", s))(ft || {}), Qs = /* @__PURE__ */ ((s) => (s.success = "success", s.empty = "empty", s.invalidLength = "invalidLength", s.invalidCharacters = "invalidCharacters", s.invalidChecksum = "invalidChecksum", s.invalidUPCE = "invalidUPCE", s.otherError = "otherError", s))(Qs || {}), Y = /* @__PURE__ */ ((s) => (s.top = "top", s.right = "right", s.bottom = "bottom", s.left = "left", s))(Y || {}), Xs = /* @__PURE__ */ ((s) => (s.top = "top", s.child = "child", s))(Xs || {}), tr = /* @__PURE__ */ ((s) => (s.px = "px", s.mm = "mm", s.cm = "cm", s.inch = "inch", s.pt = "pt", s))(tr || {}), er = /* @__PURE__ */ ((s) => (s.print = "print", s.digitalStatic = "digitalStatic", s.digitalAnimated = "digitalAnimated", s))(er || {}), k;
417
+ class Ee {
418
+ /**
419
+ * @ignore
420
+ */
421
+ constructor(i) {
422
+ /**
423
+ * @ignore
424
+ */
425
+ u(this, k);
426
+ this.setBarcodeProperties = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableBackground = async (t, e) => {
427
+ const r = { enableBackground: e };
428
+ return this.setBarcodeProperties(t, r);
429
+ }, this.setBackgroundColor = async (t, e) => {
430
+ const r = { backgroundColor: e };
431
+ return this.setBarcodeProperties(t, r);
432
+ }, this.setEnableBars = async (t, e) => {
433
+ const r = { enableBars: e };
434
+ return this.setBarcodeProperties(t, r);
435
+ }, this.setBarColor = async (t, e) => {
436
+ const r = { barColor: e };
437
+ return this.setBarcodeProperties(t, r);
438
+ }, this.setBarcodeSource = async (t, e) => (await a(this, k)).setBarcodeSource(t, JSON.stringify(e)).then((n) => o(n)), this.removeBarcodeSource = async (t) => (await a(this, k)).setBarcodeSource(t, null).then((r) => o(r)), this.setEnableText = async (t, e) => {
439
+ const r = { enableText: e };
440
+ return this.setBarcodeProperties(t, r);
441
+ }, this.setBarHeight = async (t, e) => {
442
+ const r = { barHeight: e };
443
+ return this.setBarcodeProperties(t, r);
444
+ }, this.setMagnification = async (t, e) => {
445
+ const r = { magnification: e };
446
+ return this.setBarcodeProperties(t, r);
447
+ }, this.setQuietZoneValue = async (t, e, r) => {
448
+ const n = r ? {
449
+ left: r === Y.left ? e : void 0,
450
+ top: r === Y.top ? e : void 0,
451
+ right: r === Y.right ? e : void 0,
452
+ bottom: r === Y.bottom ? e : void 0
453
+ } : { left: e, top: e, right: e, bottom: e };
454
+ return (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ quietZone: n })).then((h) => o(h));
455
+ }, this.setAreQuietZoneValuesCombined = async (t, e) => {
456
+ const r = { areQuietZoneValuesCombined: e };
457
+ return (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ quietZone: r })).then((c) => o(c));
458
+ }, this.setErrorCorrectionLevel = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ errorCorrectionLevel: e })).then((n) => o(n)), this.setCharacterSet = async (t, e) => (await a(this, k)).setBarcodeProperties(t, JSON.stringify({ characterSet: e })).then((n) => o(n)), this.setDrawLightMarginIndicator = async (t, e) => {
459
+ const r = { drawStartStopChars: e };
460
+ return this.setBarcodeProperties(t, r);
461
+ }, this.setDrawStartStopChars = async (t, e) => {
462
+ const r = { drawStartStopChars: e };
463
+ return this.setBarcodeProperties(t, r);
464
+ }, this.getBarcodeConfigationOptions = (t) => {
465
+ let e = !0, r = !0, n = !0, c, h, l = !1, y = !1, p = !1;
466
+ switch (t) {
467
+ case G.qr:
468
+ c = [ft.iso8859_1, ft.utf8], h = [
469
+ Ot.low,
470
+ Ot.medium,
471
+ Ot.quartile,
472
+ Ot.high
473
+ ];
474
+ case G.dataMatrix:
475
+ e = !1, r = !1, n = !1, l = !0;
476
+ break;
477
+ case G.ean13:
478
+ e = !1, y = !0;
479
+ break;
480
+ case G.ean8:
481
+ y = !0;
482
+ case G.upca:
483
+ case G.upce:
484
+ e = !1;
485
+ break;
486
+ case G.code128:
487
+ case G.gs1128:
488
+ c = [
489
+ ft.code128a,
490
+ ft.code128b,
491
+ ft.code128c
492
+ ];
493
+ break;
494
+ case G.code39:
495
+ p = !0;
496
+ break;
497
+ }
498
+ return {
499
+ allowEnableMagnification: n,
500
+ allowBarHeight: r,
501
+ allowQuietZone: !0,
502
+ allowedCharacterSets: c,
503
+ allowedErrorCorrectionLevels: h,
504
+ allowToggleText: e,
505
+ quietZoneAlwaysCombined: l,
506
+ allowToggleLightMarginIndicator: y,
507
+ allowToggleDrawStartAndEndChar: p
508
+ };
509
+ }, g(this, k, i);
510
+ }
511
+ }
512
+ k = new WeakMap();
513
+ var T = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.spotCmyk = "spotCmyk", s.spotRgb = "spotRgb", s.spotHex = "spotHex", s))(T || {}), z = /* @__PURE__ */ ((s) => (s.rgb = "rgb", s.hex = "hex", s.cmyk = "cmyk", s.gray = "gray", s.hsl = "hsl", s.spot = "spot", s.spotCMYK = "spotCMYK", s.spotRGB = "spotRGB", s.spotHEX = "spotHEX", s))(z || {}), ys = /* @__PURE__ */ ((s) => (s.local = "local", s.brandKit = "brandKit", s.stylekit = "brandKit", s))(ys || {});
514
+ const De = (s) => s.type === T.hex, Zt = (s) => s.type === T.spotHex, sr = (s) => s.type === T.spotRgb, rr = (s) => s.type === T.spotCmyk, nr = (s) => sr(s) || rr(s) || Zt(s), ar = (s) => {
515
+ const i = ir(s.type);
516
+ return nr(s) ? {
517
+ ...Zt(s) && { value: s.displayValue },
518
+ ...!Zt(s) && { ...s.displayValue },
519
+ spotName: s.value,
520
+ type: i
521
+ } : {
522
+ ...De(s) && { value: s.value },
523
+ ...!De(s) && { ...s.value },
524
+ type: i
525
+ };
526
+ }, Le = (s, i, t) => {
527
+ const { brandKitColorGuid: e, brandKitFontFamilyGuid: r, fontStyleId: n, ...c } = s;
528
+ return {
529
+ ...Object.keys(c).reduce((l, y) => ({ ...l, [y]: { value: s[y] } }), {}),
530
+ ...i && {
531
+ color: {
532
+ value: {
533
+ id: i.id,
534
+ color: i.color,
535
+ type: ys.brandKit,
536
+ isApplied: c.fillColorApplied
537
+ }
538
+ }
539
+ },
540
+ fontKey: {
541
+ value: t ?? null
542
+ }
543
+ };
544
+ }, ir = (s) => {
545
+ switch (s) {
546
+ case T.rgb:
547
+ return z.rgb;
548
+ case T.cmyk:
549
+ return z.cmyk;
550
+ case T.hex:
551
+ return z.hex;
552
+ case T.spotRgb:
553
+ return z.spotRGB;
554
+ case T.spotCmyk:
555
+ return z.spotCMYK;
556
+ case T.spotHex:
557
+ return z.spotHEX;
558
+ }
559
+ }, Oe = (s, i) => {
560
+ if (!(s === null || i === void 0))
561
+ return (s || []).find((t) => t.id === i);
562
+ }, Ne = (s, i, t) => {
563
+ var e, r;
564
+ if (!(s === null || i === void 0 || t === void 0))
565
+ return (r = (e = (s || []).find((n) => n.id === i)) == null ? void 0 : e.fontStyles.find((n) => n.fontStyleId === t)) == null ? void 0 : r.id;
566
+ };
567
+ var D;
568
+ class Me {
569
+ /**
570
+ * @ignore
571
+ */
572
+ constructor(i, t) {
573
+ /**
574
+ * @ignore
575
+ */
576
+ u(this, D);
577
+ this.getId = async () => (await a(this, D)).getBrandKitId().then((r) => o(r)), this.getVersion = async () => (await a(this, D)).getBrandKitVersion().then((r) => o(r)), this.getName = async () => (await a(this, D)).getBrandKitName().then((r) => o(r)), this.rename = async (e) => (await a(this, D)).renameBrandKit(e).then((n) => o(n)), this.updateIdAndVersion = async (e, r) => (await a(this, D)).updateBrandKitIdAndVersion(e, r).then((c) => o(c)), this.get = async () => {
578
+ const e = await this.getId(), r = await this.getVersion(), n = await this.getName(), c = this.colorStyleController.getAll(), h = this.fontController.getFontFamilies(), l = this.characterStyleController.getAll(), y = this.paragraphStyleController.getAll(), p = this.getAllMedia(), [f, I, S, b, L] = await Promise.all([
579
+ c,
580
+ h,
581
+ y,
582
+ l,
583
+ p
584
+ ]), P = {
585
+ id: e.parsedData,
586
+ brandKit: {
587
+ id: e.parsedData,
588
+ name: n.parsedData,
589
+ lastModifiedDate: r.parsedData,
590
+ colors: f.parsedData,
591
+ fonts: I.parsedData,
592
+ paragraphStyles: S.parsedData,
593
+ characterStyles: b.parsedData,
594
+ media: L.parsedData
595
+ }
596
+ }, N = {
597
+ success: !0,
598
+ data: JSON.stringify(P),
599
+ parsedData: P,
600
+ status: 200
601
+ };
602
+ return o(N);
603
+ }, this.getAllMedia = async () => (await a(this, D)).getAllBrandKitMedia().then((r) => o(r)), this.addMedia = async (e, r, n) => (await a(this, D)).addBrandKitMedia(e, r, n).then((h) => o(h)), this.updateMedia = async (e, r, n) => (await a(this, D)).updateBrandKitMedia(e, r, n).then((h) => o(h)), this.renameMedia = async (e, r) => (await a(this, D)).renameBrandKitMedia(e, r).then((c) => o(c)), this.removeMedia = async (e) => (await a(this, D)).removeBrandKitMedia(e).then((n) => o(n)), this.remove = async () => {
604
+ const r = (await this.colorStyleController.getAll()).parsedData || [], c = (await this.paragraphStyleController.getAll()).parsedData || [], l = (await this.characterStyleController.getAll()).parsedData || [], p = (await this.fontController.getFontFamilies()).parsedData || [], I = (await this.getAllMedia()).parsedData || [];
605
+ await this.undoManagerController.record("brandKit.remove", async (S) => {
606
+ for (const b of r)
607
+ await S.colorStyle.remove(b.id);
608
+ for (const b of c)
609
+ await S.paragraphStyle.remove(b.id);
610
+ for (const b of l)
611
+ await S.characterStyle.remove(b.id);
612
+ for (const b of p)
613
+ await S.font.removeFontFamily(b.id);
614
+ for (const b of I)
615
+ await this.removeMedia(b.name);
616
+ });
617
+ }, this.set = async (e) => {
618
+ let r = {
619
+ success: !0,
620
+ status: 200,
621
+ parsedData: {
622
+ id: e.id,
623
+ version: e.brandKit.lastModifiedDate,
624
+ name: e.brandKit.name,
625
+ colors: [],
626
+ fonts: [],
627
+ paragraphStyles: [],
628
+ characterStyles: [],
629
+ media: []
630
+ }
631
+ };
632
+ return await this.undoManagerController.record("brandKit.set", async (n) => {
633
+ const c = await this.setColors(e, n), h = await this.setFonts(e, n), { parsedData: l = [] } = await n.colorStyle.getAll(), { parsedData: y } = await n.font.getFontFamilies();
634
+ await this.setParagraphStyles(e, n, {
635
+ localColors: l,
636
+ localFonts: y,
637
+ localColorGuidMap: c,
638
+ localFontGuidMap: h
639
+ }), await this.setCharacterStyles(e, n, {
640
+ localColors: l,
641
+ localFonts: y,
642
+ localColorGuidMap: c,
643
+ localFontGuidMap: h
644
+ }), await this.setMedia(e);
645
+ const { parsedData: p } = await n.paragraphStyle.getAll(), { parsedData: f } = await n.characterStyle.getAll(), { parsedData: I } = await this.getAllMedia();
646
+ await n.brandKit.updateIdAndVersion(e.id, e.brandKit.lastModifiedDate), await n.brandKit.rename(e.brandKit.name), r = {
647
+ success: !0,
648
+ status: 200,
649
+ parsedData: {
650
+ id: e.id,
651
+ version: e.brandKit.lastModifiedDate,
652
+ name: e.brandKit.name,
653
+ colors: l || [],
654
+ fonts: y || [],
655
+ paragraphStyles: p || [],
656
+ characterStyles: f || [],
657
+ media: I || []
658
+ }
659
+ };
660
+ }), r;
661
+ }, g(this, D, i), this.colorStyleController = t.colorStyle, this.fontController = t.font, this.mediaController = t.mediaConnector, this.paragraphStyleController = t.paragraphStyle, this.characterStyleController = t.characterStyle, this.undoManagerController = t.undoManager;
662
+ }
663
+ async setColors(i, t) {
664
+ const e = /* @__PURE__ */ new Map();
665
+ for (const r of i.brandKit.colors || []) {
666
+ const { parsedData: n } = await t.colorStyle.create();
667
+ if (!n) continue;
668
+ e.set(r.guid, n);
669
+ const c = ar(r);
670
+ await t.colorStyle.rename(n, r.name), await t.colorStyle.update(n, c);
671
+ }
672
+ return e;
673
+ }
674
+ async setFonts(i, t) {
675
+ const e = i.fontConnectorId, r = /* @__PURE__ */ new Map();
676
+ for (const n of i.brandKit.fonts || []) {
677
+ const { parsedData: c = [] } = await t.fontConnector.detail(e, n.fontFamilyId);
678
+ if (!(c != null && c[0])) throw new Error(`No font styles for family ID: ${n.fontFamilyId}`);
679
+ const { parsedData: h } = await t.font.addFontFamily(e, {
680
+ name: c[0].familyName,
681
+ fontFamilyId: n.fontFamilyId
682
+ });
683
+ h && r.set(n.fontFamilyBrandKitGuid, h);
684
+ }
685
+ return r;
686
+ }
687
+ async setParagraphStyles(i, t, e) {
688
+ const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
689
+ for (const l of i.brandKit.paragraphStyles || []) {
690
+ const y = c.get(l.brandKitColorGuid), p = h.get(l.brandKitFontFamilyGuid), f = Ne(n, p, l.fontStyleId);
691
+ if (!p || !f)
692
+ throw new Error(`Paragraph style could not be created with an empty font family: ${l.name}`);
693
+ const I = Oe(r, y);
694
+ if (!I) throw new Error(`Paragraph style could not be created with an empty color: ${l.name}`);
695
+ const { parsedData: S } = await t.paragraphStyle.create(), b = Le(
696
+ l,
697
+ I,
698
+ `${f}`
699
+ );
700
+ await t.paragraphStyle.rename(S, l.name), await t.paragraphStyle.update(S, b);
701
+ }
702
+ }
703
+ async setCharacterStyles(i, t, e) {
704
+ const { localColors: r, localFonts: n, localColorGuidMap: c, localFontGuidMap: h } = e;
705
+ for (const l of i.brandKit.characterStyles || []) {
706
+ const y = l.brandKitColorGuid ? c.get(l.brandKitColorGuid) : void 0, p = l.brandKitFontFamilyGuid ? h.get(l.brandKitFontFamilyGuid) : void 0, f = Oe(r, y), I = Ne(n, p, l.fontStyleId), { parsedData: S } = await t.characterStyle.create(), b = Le(
707
+ l,
708
+ f,
709
+ I
710
+ );
711
+ await t.characterStyle.rename(S, l.name), await t.characterStyle.update(S, b);
712
+ }
713
+ }
714
+ async setMedia(i) {
715
+ for (const t of i.brandKit.media || [])
716
+ await this.addMedia(t.name, t.mediaConnectorId, t.mediaId);
717
+ }
718
+ }
719
+ D = new WeakMap();
720
+ var X;
721
+ class Qt {
722
+ /**
723
+ * @ignore
724
+ */
725
+ constructor(i) {
726
+ /**
727
+ * @ignore
728
+ */
729
+ u(this, X);
730
+ this.zoomToPage = async (t, e, r, n, c) => (t !== void 0 && console.warn("id has no effect and will be deprecated in the future"), (await a(this, X)).zoomToPage(e, r, n, c).then((l) => o(l))), this.getZoomPercentage = async () => (await a(this, X)).getZoomPercentage().then((e) => o(e)), this.setZoomPercentage = async (t) => (await a(this, X)).setZoomPercentage(t).then((r) => o(r)), this.setViewMode = async (t) => (await a(this, X)).setViewMode(t).then((r) => o(r)), g(this, X, i);
731
+ }
732
+ }
733
+ X = new WeakMap();
734
+ var R;
735
+ class xe {
736
+ /**
737
+ * @ignore
738
+ */
739
+ constructor(i) {
740
+ /**
741
+ * @ignore
742
+ */
743
+ u(this, R);
744
+ this.getAll = async () => (await a(this, R)).getCharacterStyles().then((e) => o(e)), this.getById = async (t) => (await a(this, R)).getCharacterStyleById(t).then((r) => o(r)), this.create = async () => (await a(this, R)).createCharacterStyle().then((e) => o(e)), this.update = async (t, e) => (await a(this, R)).updateCharacterStyle(t, JSON.stringify(e)).then((n) => o(n)), this.remove = async (t) => (await a(this, R)).removeCharacterStyle(t).then((r) => o(r)), this.duplicate = async (t) => (await a(this, R)).duplicateCharacterStyle(t).then((r) => o(r)), this.rename = async (t, e) => (await a(this, R)).renameCharacterStyle(t, e).then((n) => o(n)), this.move = async (t, e) => (await a(this, R)).moveCharacterStyles(t, e).then((n) => o(n)), g(this, R, i);
745
+ }
746
+ }
747
+ R = new WeakMap();
748
+ var tt;
749
+ class Re {
750
+ /**
751
+ * @ignore
752
+ */
753
+ constructor(i) {
754
+ /**
755
+ * @ignore
756
+ */
757
+ u(this, tt);
758
+ this.copyFrames = async (t) => {
759
+ const r = await (await a(this, tt)).copyFrames(t);
760
+ return r.data && await navigator.clipboard.writeText(r.data), o(r);
761
+ }, this.cutFrames = async (t) => {
762
+ const r = await (await a(this, tt)).cutFrames(t);
763
+ return r.data && await navigator.clipboard.writeText(r.data), o(r);
764
+ }, this.pasteFrames = async () => {
765
+ const t = await a(this, tt), e = await navigator.clipboard.readText(), r = await t.pasteFrames(e);
766
+ return o(r);
767
+ }, this.getContentType = async () => {
768
+ const t = await a(this, tt), e = await navigator.clipboard.readText(), r = await t.getClipboardContentType(e);
769
+ return o(r);
770
+ }, g(this, tt, i);
771
+ }
772
+ }
773
+ tt = new WeakMap();
774
+ var Jt;
775
+ class Ve {
776
+ /**
777
+ * @ignore
778
+ */
779
+ constructor(i) {
780
+ /**
781
+ * @ignore
782
+ */
783
+ u(this, Jt);
784
+ this.convertToRgb = async (t) => (await a(this, Jt)).colorToRgb(JSON.stringify(t)).then((r) => o(r)), g(this, Jt, i);
785
+ }
786
+ }
787
+ Jt = new WeakMap();
788
+ var V;
789
+ class Be {
790
+ /**
791
+ * @ignore
792
+ */
793
+ constructor(i) {
794
+ /**
795
+ * @ignore
796
+ */
797
+ u(this, V);
798
+ this.getAll = async () => (await a(this, V)).getColors().then((e) => o(e)), this.getById = async (t) => (await a(this, V)).getColorById(t).then((r) => o(r)), this.create = async () => (await a(this, V)).createColor().then((e) => o(e)), this.duplicate = async (t) => (await a(this, V)).duplicateColor(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, V)).moveColors(t, e).then((n) => o(n)), this.rename = async (t, e) => (await a(this, V)).renameColor(t, e).then((n) => o(n)), this.update = async (t, e) => {
799
+ const r = await a(this, V), n = e;
800
+ return n.type === z.spot && (n.type = z.spotCMYK), r.updateColor(t, JSON.stringify(n)).then((c) => o(c));
801
+ }, this.remove = async (t) => (await a(this, V)).removeColor(t).then((r) => o(r)), g(this, V, i);
802
+ }
803
+ }
804
+ V = new WeakMap();
805
+ var Rt = /* @__PURE__ */ ((s) => (s[s.file = 0] = "file", s[s.collection = 1] = "collection", s))(Rt || {}), Xt = /* @__PURE__ */ ((s) => (s.LowResolutionWeb = "lowresWeb", s.HighResolutionWeb = "highresWeb", s))(Xt || {}), Vt = /* @__PURE__ */ ((s) => (s.file = "file", s.collection = "collection", s))(Vt || {}), or = /* @__PURE__ */ ((s) => (s.media = "media", s.fonts = "fonts", s.data = "data", s))(or || {}), cr = /* @__PURE__ */ ((s) => (s.name = "name", s.path = "relativePath", s.id = "id", s))(cr || {}), hr = /* @__PURE__ */ ((s) => (s.ascending = "asc", s.descending = "desc", s))(hr || {}), lr = /* @__PURE__ */ ((s) => (s.text = "text", s.boolean = "boolean", s))(lr || {}), dr = /* @__PURE__ */ ((s) => (s.query = "query", s.upload = "upload", s))(dr || {}), Nt = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Nt || {});
806
+ class bn {
807
+ constructor(i, t, e, r = "engineToConnector") {
808
+ this.direction = "engineToConnector", this.name = i, this.direction = r, t === "var" ? this.value = `${t}.${e}` : this.value = e;
809
+ }
810
+ }
811
+ var ur = /* @__PURE__ */ ((s) => (s.variable = "var", s.value = "value", s))(ur || {}), gr = /* @__PURE__ */ ((s) => (s.engineToConnector = "engineToConnector", s.connectorToEngine = "connectorToEngine", s))(gr || {}), te = /* @__PURE__ */ ((s) => (s.loading = "loading", s.loaded = "loaded", s.running = "running", s.ready = "ready", s.error = "error", s))(te || {}), yr = /* @__PURE__ */ ((s) => (s.stateChanged = "stateChanged", s.authChanged = "authChanged", s.reloadRequired = "reloadRequired", s.unloaded = "unloaded", s))(yr || {});
812
+ const In = {
813
+ url: "grafx-media.json",
814
+ source: "local"
815
+ /* local */
816
+ };
817
+ class vn {
818
+ constructor(i) {
819
+ this.type = "grafxToken", this.token = i;
820
+ }
821
+ }
822
+ class Pn {
823
+ constructor() {
824
+ this.type = "refreshed";
825
+ }
826
+ }
827
+ var pr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.refreshed = "refreshed", s))(pr || {}), Cr = /* @__PURE__ */ ((s) => (s.grafxToken = "grafxToken", s.any = "any", s))(Cr || {}), ps = /* @__PURE__ */ ((s) => (s.minDimension = "minDimension", s))(ps || {});
828
+ class mr extends Error {
829
+ constructor(i, t) {
830
+ super(i), this.type = t;
831
+ }
832
+ }
833
+ class ne {
834
+ constructor() {
835
+ this.makeConnectorSourceForwardsCompatible = (i) => {
836
+ if (i.source != Nt.grafx || this.isSourceMigrated(i))
837
+ return i;
838
+ let t = i.url;
839
+ for (; t.endsWith("/"); )
840
+ t = t.substring(0, t.length - 1);
841
+ const e = t.split("/");
842
+ return { id: e[e.length - 1], source: Nt.grafx };
843
+ }, this.makeMultipleConnectorsBackwardsCompatible = (i, t) => i.map((e) => this.makeSingleConnectorBackwardsCompatible(e, t)), this.makeSingleConnectorBackwardsCompatible = (i, t) => i.source.source != Nt.grafx ? i : {
844
+ id: i.id,
845
+ name: i.name,
846
+ iconUrl: i.iconUrl,
847
+ source: this.makeConnectorSourceBackwardsCompatible(i.source, t)
848
+ }, this.makeConnectorSourceBackwardsCompatible = (i, t) => {
849
+ let e = t;
850
+ for (; e != null && e.endsWith("/"); )
851
+ e = e.substring(0, e.length - 1);
852
+ return {
853
+ url: `${e}/connectors/${i.id}`,
854
+ source: Nt.grafx
855
+ };
856
+ }, this.isSourceMigrated = (i) => "id" in i;
857
+ }
858
+ }
859
+ var B, St, ht, as;
860
+ let Je = (as = class {
861
+ /**
862
+ * @ignore
863
+ */
864
+ constructor(i, t) {
865
+ /**
866
+ * @ignore
867
+ */
868
+ u(this, B);
869
+ u(this, St);
870
+ u(this, ht);
871
+ this.getById = async (e) => (await a(this, B)).getConnectorById(e).then((n) => o(n)).then((n) => {
872
+ const c = { ...n, parsedData: null };
873
+ return n.parsedData && (c.parsedData = a(this, ht).makeSingleConnectorBackwardsCompatible(
874
+ n.parsedData,
875
+ a(this, St).get(Z.GraFxStudioEnvironmentApiUrl)
876
+ )), c;
877
+ }), this.getAllByType = async (e) => (await a(this, B)).getConnectors(e).then((n) => o(n)).then((n) => {
878
+ const c = { ...n, parsedData: null };
879
+ return n.parsedData && (c.parsedData = a(this, ht).makeMultipleConnectorsBackwardsCompatible(
880
+ n.parsedData,
881
+ a(this, St).get(Z.GraFxStudioEnvironmentApiUrl)
882
+ )), c;
883
+ }), this.register = async (e) => {
884
+ const r = await a(this, B), n = a(this, ht).makeConnectorSourceForwardsCompatible(e);
885
+ return r.registerConnector(JSON.stringify(n)).then((c) => o(c));
886
+ }, this.unregister = async (e) => (await a(this, B)).unregisterConnector(e).then((n) => o(n)), this.configure = async (e, r) => {
887
+ const n = await a(this, B);
888
+ return await this.waitToBeReady(e), await r(new wr(e, n)), n.updateConnectorConfiguration(e).then((c) => o(c));
889
+ }, this.getState = async (e) => (await a(this, B)).getConnectorState(e).then((n) => o(n)), this.getOptions = async (e) => (await a(this, B)).getConnectorOptions(e).then((n) => o(n)), this.waitToBeReady = async (e, r = 2e3) => {
890
+ let n = Math.max(r, 500);
891
+ n = Math.min(n, 5e3);
892
+ const c = 100;
893
+ let h = 0;
894
+ try {
895
+ for (; h * c < n; ) {
896
+ const l = await this.getState(e);
897
+ if (l.success && l.parsedData && (l.parsedData.type === te.running || l.parsedData.type === te.ready))
898
+ return o(
899
+ { data: null, success: !0, error: void 0, status: 0, parsedData: void 0 },
900
+ !1
901
+ );
902
+ await new Promise((y) => setTimeout(y, c)), h++;
903
+ }
904
+ } catch (l) {
905
+ return o(
906
+ {
907
+ data: null,
908
+ success: !1,
909
+ error: `Error while getting connector state ${l}`,
910
+ status: 5e4,
911
+ parsedData: void 0
912
+ },
913
+ !1
914
+ );
915
+ }
916
+ return o(
917
+ {
918
+ data: null,
919
+ success: !1,
920
+ error: "Timed out waiting for connector",
921
+ status: 5e4,
922
+ parsedData: void 0
923
+ },
924
+ !1
925
+ );
926
+ }, this.updateMappings = async (e, r) => await this.configure(e, async (n) => {
927
+ const { parsedData: c } = await this.getMappings(e), h = (c == null ? void 0 : c.filter(
928
+ (p) => !r.some(
929
+ (f) => f.name === p.name && f.direction === p.direction
930
+ )
931
+ )) ?? [], l = r.filter((p) => p.name !== "" && p.value !== ""), y = [...h, ...l];
932
+ await n.setMappings(y);
933
+ }), g(this, B, i), g(this, St, t), g(this, ht, new ne());
934
+ }
935
+ async getMappings(i, t) {
936
+ return (await a(this, B)).getConnectorMappings(i).then((r) => o(r)).then(
937
+ (r) => {
938
+ var n;
939
+ return t ? {
940
+ ...r,
941
+ parsedData: (n = r.parsedData) == null ? void 0 : n.filter((c) => c.direction === t)
942
+ } : r;
943
+ }
944
+ );
945
+ }
946
+ }, B = new WeakMap(), St = new WeakMap(), ht = new WeakMap(), as);
947
+ var lt, dt;
948
+ class wr {
949
+ /**
950
+ * @ignore
951
+ */
952
+ constructor(i, t) {
953
+ /**
954
+ * @ignore
955
+ */
956
+ u(this, lt);
957
+ u(this, dt);
958
+ this.setOptions = async (e) => a(this, dt).setConnectorOptions(a(this, lt), JSON.stringify(e)).then((r) => o(r)), this.setMappings = async (e) => {
959
+ const r = await a(this, dt).setConnectorMappings(
960
+ a(this, lt),
961
+ e.map(function(n) {
962
+ return JSON.stringify(n);
963
+ })
964
+ );
965
+ return o(r);
966
+ }, this.setHttpHeader = async (e, r) => a(this, dt).connectorAuthenticationSetHttpHeader(a(this, lt), e, r).then((n) => o(n)), g(this, lt, i), g(this, dt, t);
967
+ }
968
+ }
969
+ lt = new WeakMap(), dt = new WeakMap();
970
+ var et, Ut;
971
+ class Ue {
972
+ /**
973
+ * @ignore
974
+ */
975
+ constructor(i, t) {
976
+ /**
977
+ * @ignore
978
+ */
979
+ u(this, et);
980
+ u(this, Ut);
981
+ this.getPage = async (e, r, n = {}) => (await a(this, et)).dataConnectorGetPage(e, JSON.stringify(r), JSON.stringify(n)).then((h) => o(h)).then((h) => {
982
+ const l = { ...h, parsedData: null };
983
+ return h.parsedData && (l.parsedData = {
984
+ data: h.parsedData.data.map(
985
+ (y) => a(this, Ut).mapEngineToDataItem(y)
986
+ ),
987
+ continuationToken: h.parsedData.continuationToken
988
+ }), l;
989
+ }), this.getModel = async (e, r = {}) => (await a(this, et)).dataConnectorGetModel(e, JSON.stringify(r)).then((c) => o(c)), this.getConfigurationOptions = async (e) => (await a(this, et)).dataConnectorGetConfigurationOptions(e).then((n) => o(n)), this.getCapabilities = async (e) => (await a(this, et)).dataConnectorGetCapabilities(e).then((n) => o(n)), g(this, et, i), g(this, Ut, t);
990
+ }
991
+ }
992
+ et = new WeakMap(), Ut = new WeakMap();
993
+ var st, kt;
994
+ class ke {
995
+ /**
996
+ * @ignore
997
+ */
998
+ constructor(i, t) {
999
+ /**
1000
+ * @ignore
1001
+ */
1002
+ u(this, st);
1003
+ u(this, kt);
1004
+ this.setDataSource = async (e) => (await a(this, st)).setDataSource(e).then((n) => o(n)), this.getDataSource = async () => (await a(this, st)).getDataSource().then((r) => o(r)), this.removeDataSource = async () => (await a(this, st)).removeDataSource().then((r) => o(r)), this.setDataRow = async (e) => {
1005
+ const r = await a(this, st), n = a(this, kt).mapDataItemToEngine(e);
1006
+ return r.setDataRow(JSON.stringify(n)).then((c) => o(c));
1007
+ }, g(this, st, i), g(this, kt, t);
1008
+ }
1009
+ }
1010
+ st = new WeakMap(), kt = new WeakMap();
1011
+ var rt;
1012
+ class Te {
1013
+ /**
1014
+ * @ignore
1015
+ */
1016
+ constructor(i) {
1017
+ /**
1018
+ * @ignore
1019
+ */
1020
+ u(this, rt);
1021
+ this.getAllLogs = async () => (await a(this, rt)).getLogs().then((e) => o(e)), this.toggleDebugPanel = async () => (await a(this, rt)).toggleDebugPanel().then((e) => o(e)), this.enableDebug = async () => (await a(this, rt)).enableDebug().then((e) => o(e)), this.disableDebug = async () => (await a(this, rt)).disableDebug().then((e) => o(e)), g(this, rt, i);
1022
+ }
1023
+ }
1024
+ rt = new WeakMap();
1025
+ var ut;
1026
+ class Ge {
1027
+ /**
1028
+ * @ignore
1029
+ */
1030
+ constructor(i) {
1031
+ /**
1032
+ * @ignore
1033
+ */
1034
+ u(this, ut);
1035
+ this.getCurrentState = async () => (await a(this, ut)).getCurrentDocumentState().then((e) => o(e)), this.load = async (t, e = { keepConnectors: !1 }) => {
1036
+ const r = await a(this, ut), n = typeof t != "string" ? JSON.stringify(t) : t;
1037
+ return r.loadDocument(n, JSON.stringify(e)).then((c) => o(c));
1038
+ }, this.createAndLoad = async (t) => {
1039
+ const e = await a(this, ut), r = JSON.stringify(t);
1040
+ return e.createAndLoadDocument(r).then((n) => o(n));
1041
+ }, g(this, ut, i);
1042
+ }
1043
+ }
1044
+ ut = new WeakMap();
1045
+ var fr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.left = "left", s.right = "right", s))(fr || {}), zt = /* @__PURE__ */ ((s) => (s.url = "url", s.variable = "variable", s.connector = "connector", s.brandKitMedia = "brandKitMedia", s))(zt || {}), Sr = /* @__PURE__ */ ((s) => (s.text = "text", s.image = "image", s.shape = "shape", s.barcode = "barcode", s))(Sr || {}), br = /* @__PURE__ */ ((s) => (s.variable = "variable", s.text = "text", s))(br || {}), Ir = /* @__PURE__ */ ((s) => (s.leftToRight = "leftToRight", s.rightToLeft = "rightToLeft", s.weak = "weak", s))(Ir || {}), vr = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s.onPath = "onPath", s))(vr || {}), Pr = /* @__PURE__ */ ((s) => (s.top = "top", s.bottom = "bottom", s.middle = "middle", s.justify = "justify", s))(Pr || {}), Ar = /* @__PURE__ */ ((s) => (s.normal = "normal", s.screen = "screen", s.overlay = "overlay", s.darken = "darken", s.lighten = "lighten", s.colorDodge = "colorDodge", s.colorBurn = "colorBurn", s.hardLight = "hardLight", s.softLight = "softLight", s.difference = "difference", s.exclusion = "exclusion", s.multiply = "multiply", s.hue = "hue", s.saturation = "saturation", s.color = "color", s.luminosity = "luminosity", s))(Ar || {}), Fr = /* @__PURE__ */ ((s) => (s.fill = "fill", s.fit = "fit", s.smartCrop = "smartCrop", s.manualCrop = "manualCrop", s))(Fr || {}), Er = /* @__PURE__ */ ((s) => (s.topLeft = "topLeft", s.topCenter = "topCenter", s.topRight = "topRight", s.centerLeft = "centerLeft", s.center = "center", s.centerRight = "centerRight", s.bottomLeft = "bottomLeft", s.bottomCenter = "bottomCenter", s.bottomRight = "bottomRight", s))(Er || {}), Dr = /* @__PURE__ */ ((s) => (s.bringToFront = "bringToFront", s.sendToBack = "sendToBack", s.bringForward = "bringForward", s.sendBackward = "sendBackward", s))(Dr || {}), Lr = /* @__PURE__ */ ((s) => (s.relative = "relative", s.start = "start", s.end = "end", s.startAndEnd = "startAndEnd", s.center = "center", s))(Lr || {}), Or = /* @__PURE__ */ ((s) => (s.page = "page", s.frame = "frame", s))(Or || {}), Nr = /* @__PURE__ */ ((s) => (s.start = "start", s.end = "end", s.center = "center", s))(Nr || {});
1046
+ class Fn {
1047
+ constructor() {
1048
+ this.type = "page";
1049
+ }
1050
+ }
1051
+ class En {
1052
+ constructor(i, t) {
1053
+ this.type = "frame", this.frameId = i, this.edge = t;
1054
+ }
1055
+ }
1056
+ var Cs = /* @__PURE__ */ ((s) => (s.frameCrop = "frameCrop", s.assetCrop = "assetCrop", s))(Cs || {}), J;
1057
+ class He {
1058
+ /**
1059
+ * @ignore
1060
+ */
1061
+ constructor(i) {
1062
+ /**
1063
+ * @ignore
1064
+ */
1065
+ u(this, J);
1066
+ this.insertImageVariableToFrame = async (t, e) => {
1067
+ const r = await a(this, J), n = { id: e, type: zt.variable };
1068
+ return r.setImageSource(t, JSON.stringify(n)).then((c) => o(c));
1069
+ }, this.insertTextVariable = async (t) => (await a(this, J)).insertTextVariable(t).then((r) => o(r)), this.enterTextEditMode = async (t) => (await a(this, J)).enterTextEditMode(t).then((r) => o(r)), this.exitTextEditMode = async () => (await a(this, J)).exitTextEditMode().then((e) => o(e)), this.getText = async (t, e) => (await a(this, J)).getTextByFrameId(t, e).then((n) => o(n)), this.setText = async (t, e) => (await a(this, J)).setTextByFrameId(t, e).then((n) => o(n)), this.selectText = async (t, e, r) => (await a(this, J)).selectTextById(t, e, r).then((c) => o(c)), this.addCustomUndoData = async (t, e, r) => (await a(this, J)).setCustomUndoData(t, e, r ?? !1).then((c) => o(c)), g(this, J, i);
1070
+ }
1071
+ }
1072
+ J = new WeakMap();
1073
+ var nt, bt;
1074
+ class _e {
1075
+ /**
1076
+ * @ignore
1077
+ */
1078
+ constructor(i) {
1079
+ /**
1080
+ * @ignore
1081
+ */
1082
+ u(this, nt);
1083
+ u(this, bt);
1084
+ this.query = async (t, e, r = {}) => (await a(this, nt)).fontConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, nt)).fontConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r = {}) => (await a(this, bt)).fontConnectorDownload(t, e, JSON.stringify(r)).then((c) => c ?? c), this.preview = async (t, e, r, n = {}) => (await a(this, bt)).fontConnectorPreview(t, e, r, JSON.stringify(n)).then((h) => h ?? h), this.getConfigurationOptions = async (t) => (await a(this, nt)).fontConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, nt)).fontConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedFontType = (t) => {
1085
+ if (t === Rt.file) return Vt.file;
1086
+ if (t === Rt.collection) return Vt.collection;
1087
+ }, g(this, nt, i), g(this, bt, i);
1088
+ }
1089
+ }
1090
+ nt = new WeakMap(), bt = new WeakMap();
1091
+ var A;
1092
+ class $e {
1093
+ /**
1094
+ * @ignore
1095
+ */
1096
+ constructor(i) {
1097
+ /**
1098
+ * @ignore
1099
+ */
1100
+ u(this, A);
1101
+ this.addFontFamily = async (t, e) => (await a(this, A)).addFontFamily(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontFamily = async (t) => (await a(this, A)).removeFontFamily(t).then((r) => o(r)), this.addFontStyle = async (t, e) => (await a(this, A)).addFontStyle(t, JSON.stringify(e)).then((n) => o(n)), this.removeFontStyle = async (t) => (await a(this, A)).removeFontStyle(t).then((r) => o(r)), this.getFontFamilies = async () => (await a(this, A)).getFontFamilies().then((e) => o(e)), this.getFontStyles = async (t) => (await a(this, A)).getFontStyles(t).then((r) => o(r)), this.getFontFamilyById = async (t) => (await a(this, A)).getFontFamilyById(t).then((r) => o(r)), this.getFontStyleById = async (t) => (await a(this, A)).getFontStyleById(t).then((r) => o(r)), this.getDefaultFontStyle = async () => (await a(this, A)).getDefaultFontStyle().then((e) => o(e)), this.getDefaultFontFamily = async () => (await a(this, A)).getDefaultFontFamily().then((e) => o(e)), this.isFontFamilyUsed = async (t) => (await a(this, A)).isFontFamilyUsed(t).then((r) => o(r)), this.isFontStyleUsed = async (t) => (await a(this, A)).isFontStyleUsed(t).then((r) => o(r)), this.moveFontFamilies = async (t, e) => (await a(this, A)).moveFontFamilies(t, e).then((n) => o(n)), g(this, A, i);
1102
+ }
1103
+ }
1104
+ A = new WeakMap();
1105
+ var It;
1106
+ class ee {
1107
+ /**
1108
+ * @ignore
1109
+ */
1110
+ constructor(i) {
1111
+ /**
1112
+ * @ignore
1113
+ */
1114
+ u(this, It);
1115
+ this.setShapeProperties = async (t, e) => (await a(this, It)).setShapeProperties(t, JSON.stringify(e)).then((n) => o(n)), this.setEnableFill = async (t, e) => {
1116
+ const r = { enableFill: e };
1117
+ return this.setShapeProperties(t, r);
1118
+ }, this.setFillColor = async (t, e) => {
1119
+ const r = { fillColor: e };
1120
+ return this.setShapeProperties(t, r);
1121
+ }, this.setEnableStroke = async (t, e) => {
1122
+ const r = { enableStroke: e };
1123
+ return this.setShapeProperties(t, r);
1124
+ }, this.setStrokeColor = async (t, e) => {
1125
+ const r = { strokeColor: e };
1126
+ return this.setShapeProperties(t, r);
1127
+ }, this.setStrokeWeight = async (t, e) => {
1128
+ const r = { strokeWeight: e };
1129
+ return this.setShapeProperties(t, r);
1130
+ }, this.setFlagAllCornersSame = async (t, e) => {
1131
+ const r = { allCornersSame: e };
1132
+ return this.setShapeProperties(t, r);
1133
+ }, this.setShapeCorners = async (t, e) => (await a(this, It)).setShapeCorners(t, JSON.stringify(e)).then((n) => o(n)), this.setRadiusAll = async (t, e) => {
1134
+ const r = { radiusAll: e };
1135
+ return this.setShapeCorners(t, r);
1136
+ }, this.setRadiusTopLeft = async (t, e) => {
1137
+ const r = { topLeft: e };
1138
+ return this.setShapeCorners(t, r);
1139
+ }, this.setRadiusBottomLeft = async (t, e) => {
1140
+ const r = { bottomLeft: e };
1141
+ return this.setShapeCorners(t, r);
1142
+ }, this.setRadiusTopRight = async (t, e) => {
1143
+ const r = { topRight: e };
1144
+ return this.setShapeCorners(t, r);
1145
+ }, this.setRadiusBottomRight = async (t, e) => {
1146
+ const r = { bottomRight: e };
1147
+ return this.setShapeCorners(t, r);
1148
+ }, g(this, It, i);
1149
+ }
1150
+ }
1151
+ It = new WeakMap();
1152
+ var d;
1153
+ class Ke {
1154
+ /**
1155
+ * @ignore
1156
+ */
1157
+ constructor(i) {
1158
+ /**
1159
+ * @ignore
1160
+ */
1161
+ u(this, d);
1162
+ this.getAll = async () => (await a(this, d)).getFrames().then((e) => o(e)), this.getSelected = async () => (await a(this, d)).getSelectedFrames().then((e) => o(e)), this.getAllByPageId = async (t) => (await a(this, d)).getFramesByPageId(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, d)).getFrameByName(t).then((r) => o(r)), this.getById = async (t) => (await a(this, d)).getFrameById(t).then((r) => o(r)), this.getPropertiesOnSelectedLayout = async () => (await a(this, d)).getFramePropertiesOnSelectedLayout().then((e) => o(e)), this.getLayoutProperties = async (t, e) => (await a(this, d)).getFramePropertiesByFrameId(t, e).then((n) => o(n)), this.getAllLayoutProperties = async (t) => (await a(this, d)).getFramesProperties(t).then((r) => o(r)), this.resetTransformation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetSize = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.select = async (t) => (await a(this, d)).selectFrames([t]).then((r) => o(r)), this.selectMultiple = async (t) => (await a(this, d)).selectFrames(t).then((r) => o(r)), this.deselectAll = async () => (await a(this, d)).deselectFrames().then((e) => o(e)), this.reorderFrames = async (t, e) => (await a(this, d)).reorderFrames(t, e).then((n) => o(n)), this.setZIndex = async (t, e) => (await a(this, d)).setFrameZIndex(t, e).then((n) => o(n)), this.setHeight = async (t, e) => (await a(this, d)).setFrameHeight(t, e).then((n) => o(n)), this.setRotation = async (t, e) => (await a(this, d)).setFrameRotation(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, d)).setFrameWidth(t, e).then((n) => o(n)), this.setX = async (t, e) => (await a(this, d)).setFrameX(t, e).then((n) => o(n)), this.setY = async (t, e) => (await a(this, d)).setFrameY(t, e).then((n) => o(n)), this.rename = async (t, e) => (await a(this, d)).renameFrame(t, e).then((n) => o(n)), this.reset = async (t) => (await a(this, d)).resetFrame(t).then((r) => o(r)), this.resetX = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetY = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetRotation = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetHeight = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetImageFrameFitMode = async (t) => (await a(this, d)).resetImageFrameFitMode(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.setIsVisible = async (t, e) => (await a(this, d)).setFrameIsVisible(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, d)).removeFrames([t]).then((r) => o(r)), this.removeFrames = async (t) => (await a(this, d)).removeFrames(t).then((r) => o(r)), this.create = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => o(l)), this.createShapeFrame = async (t, e, r, n, c) => (await a(this, d)).addFrame(t, e, r, n, c).then((l) => o(l)), this.createBarcodeFrame = async (t, e) => (await a(this, d)).addBarcodeFrame(t, e == null ? void 0 : e.x, e == null ? void 0 : e.y).then((n) => o(n)), this.duplicateFrames = async (t) => (await a(this, d)).duplicateFrames(t).then((r) => o(r)), this.updateImageSource = async (t, e) => {
1163
+ const r = await a(this, d), n = e !== null ? JSON.stringify(e) : null;
1164
+ return r.setImageSource(t, n).then((c) => o(c));
1165
+ }, this.removeImageSource = async (t) => this.updateImageSource(t, null), this.setImageFromConnector = async (t, e, r) => {
1166
+ const n = {
1167
+ id: e,
1168
+ assetId: r,
1169
+ type: zt.connector
1170
+ };
1171
+ return this.updateImageSource(t, n);
1172
+ }, this.setImageFromUrl = async (t, e) => {
1173
+ const r = { url: e, type: zt.url };
1174
+ return this.updateImageSource(t, r);
1175
+ }, this.setImageFrameFitMode = async (t, e) => (await a(this, d)).setImageFrameFitMode(t, e).then((n) => o(n)), this.setImageFrameFitModePosition = async (t, e) => (await a(this, d)).setImageFrameFitModePosition(t, e).then((n) => o(n)), this.setFrameConstrainProportions = async (t, e) => (console.error("setFrameConstrainProportions is not supported anymore"), o({
1176
+ success: !1,
1177
+ status: 0,
1178
+ error: "setFrameConstrainProportions is not supported anymore",
1179
+ parsedData: null
1180
+ })), this.setVerticalAlign = async (t, e) => (await a(this, d)).setVerticalAlignment(t, e).then((n) => o(n)), this.setMinCopyfitting = async (t, e) => (await a(this, d)).setMinCopyfitting(t, e).then((n) => o(n)), this.setMaxCopyfitting = async (t, e) => (await a(this, d)).setMaxCopyfitting(t, e).then((n) => o(n)), this.setEnableCopyfitting = async (t, e) => (await a(this, d)).setEnableCopyfitting(t, e).then((n) => o(n)), this.resetMinCopyfitting = async (t) => (await a(this, d)).resetMinCopyfitting(t).then((r) => o(r)), this.resetMaxCopyfitting = async (t) => (await a(this, d)).resetMaxCopyfitting(t).then((r) => o(r)), this.resetEnableCopyfitting = async (t) => (await a(this, d)).resetEnableCopyfitting(t).then((r) => o(r)), this.setShapeFrameEnableFill = async (t, e) => this.shapeController.setEnableFill(t, e), this.setShapeFrameFillColor = async (t, e) => this.shapeController.setFillColor(t, e), this.setShapeFrameEnableStroke = async (t, e) => this.shapeController.setEnableStroke(t, e), this.setShapeFrameStrokeColor = async (t, e) => this.shapeController.setStrokeColor(t, e), this.setShapeFrameStrokeWeight = async (t, e) => this.shapeController.setStrokeWeight(t, e), this.setBlendMode = async (t, e) => (await a(this, d)).setFrameBlendMode(t, e).then((n) => o(n)), this.enterCropMode = async (t, e = Cs.frameCrop) => (await a(this, d)).enterCropMode(t, e).then((n) => o(n)), this.applyCropMode = async () => (await a(this, d)).applyCropMode().then((e) => o(e)), this.exitCropMode = async () => (await a(this, d)).cancelCropMode().then((e) => o(e)), this.enterSubjectMode = async (t) => (await a(this, d)).enterSubjectMode(t).then((r) => o(r)), this.applySubjectMode = async () => (await a(this, d)).applySubjectMode().then((e) => o(e)), this.exitSubjectMode = async () => (await a(this, d)).cancelSubjectMode().then((e) => o(e)), this.resetCropMode = async (t) => (console.error("resetCropMode is not supported anymore"), o({
1181
+ success: !1,
1182
+ status: 0,
1183
+ error: "resetCropMode is not supported anymore",
1184
+ parsedData: null
1185
+ })), this.setEnableAutoGrow = async (t, e) => {
1186
+ const r = { enabled: { value: e } };
1187
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1188
+ }, this.setAutoGrowMinWidth = async (t, e) => {
1189
+ const r = { minWidth: { value: e } };
1190
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1191
+ }, this.setAutoGrowMaxWidth = async (t, e) => {
1192
+ const r = { maxWidth: { value: e } };
1193
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1194
+ }, this.setAutoGrowMinHeight = async (t, e) => {
1195
+ const r = { minHeight: { value: e } };
1196
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1197
+ }, this.setAutoGrowMaxHeight = async (t, e) => {
1198
+ const r = { maxHeight: { value: e } };
1199
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1200
+ }, this.setAutoGrowDirections = async (t, e) => {
1201
+ const r = { directions: { value: e } };
1202
+ return (await a(this, d)).updateAutoGrowSettings(t, JSON.stringify(r)).then((c) => o(c));
1203
+ }, this.resetAutoGrowSettingsEnabled = async (t) => (console.error("resetAutoGrowSettingsEnabled is not supported anymore"), o({
1204
+ success: !1,
1205
+ status: 0,
1206
+ error: "resetAutoGrowSettingsEnabled is not supported anymore",
1207
+ parsedData: null
1208
+ })), this.resetAutoGrowMinWidth = async (t) => (console.error("resetAutoGrowMinWidth is not supported anymore"), o({
1209
+ success: !1,
1210
+ status: 0,
1211
+ error: "resetAutoGrowMinWidth is not supported anymore",
1212
+ parsedData: null
1213
+ })), this.resetAutoGrowMaxWidth = async (t) => (console.error("resetAutoGrowMaxWidth is not supported anymore"), o({
1214
+ success: !1,
1215
+ status: 0,
1216
+ error: "resetAutoGrowMaxWidth is not supported anymore",
1217
+ parsedData: null
1218
+ })), this.resetAutoGrowMinHeight = async (t) => (console.error("resetAutoGrowMinHeight is not supported anymore"), o({
1219
+ success: !1,
1220
+ status: 0,
1221
+ error: "resetAutoGrowMinHeight is not supported anymore",
1222
+ parsedData: null
1223
+ })), this.resetAutoGrowMaxHeight = async (t) => (console.error("resetAutoGrowMaxHeight is not supported anymore"), o({
1224
+ success: !1,
1225
+ status: 0,
1226
+ error: "resetAutoGrowMaxHeight is not supported anymore",
1227
+ parsedData: null
1228
+ })), this.resetAutoGrowDirections = async (t) => (console.error("resetAutoGrowDirections is not supported anymore"), o({
1229
+ success: !1,
1230
+ status: 0,
1231
+ error: "resetAutoGrowDirections is not supported anymore",
1232
+ parsedData: null
1233
+ })), this.resetAutoGrow = async (t) => (console.error("resetAutoGrow is not supported anymore"), o({
1234
+ success: !1,
1235
+ status: 0,
1236
+ error: "resetAutoGrow is not supported anymore",
1237
+ parsedData: null
1238
+ })), this.setAnchor = async (t, e, r, n, c) => {
1239
+ const h = {
1240
+ horizontal: e,
1241
+ type: r,
1242
+ target: n,
1243
+ endTarget: c
1244
+ };
1245
+ return (await a(this, d)).setAnchorProperties(t, JSON.stringify(h)).then((y) => o(y));
1246
+ }, this.setVerticalAnchor = async (t, e, r, n) => this.setAnchor(t, !1, e, r, n), this.setHorizontalAnchor = async (t, e, r, n) => this.setAnchor(t, !0, e, r, n), this.resetAnchoring = async (t) => (await a(this, d)).resetFrameTransformation(t).then((r) => o(r)), this.resetVisibility = async (t) => (await a(this, d)).setFrameIsVisible(t, null).then((r) => o(r)), this.getConfiguration = async (t) => (await a(this, d)).getFrameConfiguration(t).then((r) => o(r)), this.resetAssetCropOverride = async (t) => (await a(this, d)).resetAssetCropOverride(t).then((r) => o(r)), this.resetAllAssetCropOverrides = async (t) => (await a(this, d)).resetAllAssetCropOverrides(t).then((r) => o(r)), g(this, d, i), this.shapeController = new ee(a(this, d));
1247
+ }
1248
+ }
1249
+ d = new WeakMap();
1250
+ class ze {
1251
+ constructor() {
1252
+ this.currentEngineVersion = cs.current, this.currentSDKVersion = hs.version;
1253
+ }
1254
+ }
1255
+ var m, Tt;
1256
+ class We {
1257
+ /**
1258
+ * @ignore
1259
+ */
1260
+ constructor(i) {
1261
+ /**
1262
+ * @ignore
1263
+ */
1264
+ u(this, m);
1265
+ u(this, Tt);
1266
+ this.getAll = async () => (await a(this, m)).getLayouts().then((e) => o(e)), this.getById = async (t) => (await a(this, m)).getLayoutById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, m)).getLayoutByName(t).then((r) => o(r)), this.getSelected = async () => (await a(this, m)).getSelectedLayout().then((e) => o(e)), this.remove = async (t) => (await a(this, m)).removeLayout(t).then((r) => o(r)), this.create = async (t, e) => {
1267
+ const r = await a(this, m);
1268
+ return e != null && e.length ? r.addLayouts(t, JSON.stringify(e)).then((n) => o(n)) : r.addLayout(t).then((n) => o(n));
1269
+ }, this.rename = async (t, e) => (await a(this, m)).renameLayout(t, e).then((n) => o(n)), this.select = async (t) => (await a(this, m)).selectLayout(t).then((r) => o(r)), this.duplicate = async (t) => (await a(this, m)).duplicateLayout(t).then((r) => o(r)), this.reset = async (t) => (await a(this, m)).resetLayout(t).then((r) => o(r)), this.setHeight = async (t, e) => (await a(this, m)).setLayoutHeight(t, e).then((n) => o(n)), this.setWidth = async (t, e) => (await a(this, m)).setLayoutWidth(t, e).then((n) => o(n)), this.setUnit = async (t, e) => (await a(this, m)).setLayoutUnit(t, e).then((n) => o(n)), this.resetHeight = async (t) => (await a(this, m)).resetLayoutHeight(t).then((r) => o(r)), this.resetWidth = async (t) => (await a(this, m)).resetLayoutWidth(t).then((r) => o(r)), this.resetUnit = async (t) => (await a(this, m)).resetLayoutUnit(t).then((r) => o(r)), this.getSelectedSnapshot = async () => (await a(this, Tt)).getPageSnapshot().then((e) => e ?? e), this.setIntent = async (t, e) => (await a(this, m)).setLayoutIntent(t, e).then((n) => o(n)), this.resetIntent = async (t) => (await a(this, m)).resetLayoutIntent(t).then((r) => o(r)), this.setFillColor = async (t, e) => (await a(this, m)).setLayoutFillColor(t, JSON.stringify(e)).then((n) => o(n)), this.setFillColorEnabled = async (t, e) => (await a(this, m)).setLayoutFillColorEnabled(t, e).then((n) => o(n)), this.resetFillColor = async (t) => (await a(this, m)).resetLayoutFillColor(t).then((r) => o(r)), this.setBleedValue = async (t, e, r) => {
1270
+ const n = r ? {
1271
+ left: r === Y.left ? e : void 0,
1272
+ top: r === Y.top ? e : void 0,
1273
+ right: r === Y.right ? e : void 0,
1274
+ bottom: r === Y.bottom ? e : void 0
1275
+ } : { left: e, top: e, right: e, bottom: e };
1276
+ return (await a(this, m)).updateLayoutBleed(t, JSON.stringify(n)).then((h) => o(h));
1277
+ }, this.setAreBleedValuesCombined = async (t, e) => {
1278
+ const r = { areBleedValuesCombined: e };
1279
+ return (await a(this, m)).updateLayoutBleed(t, JSON.stringify(r)).then((c) => o(c));
1280
+ }, this.resetBleedValues = async (t) => (await a(this, m)).updateLayoutBleed(t, null).then((r) => o(r)), this.setPrivateData = async (t, e) => (await a(this, m)).setLayoutPrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, m)).getLayoutPrivateData(t).then((r) => o(r)), this.setDisplayName = async (t, e) => (await a(this, m)).setLayoutDisplayName(t, e).then((n) => o(n)), this.getDisplayName = async (t) => (await a(this, m)).getLayoutDisplayName(t).then((r) => o(r)), this.resetDisplayName = async (t) => (await a(this, m)).setLayoutDisplayName(t, null).then((r) => o(r)), this.setAvailableForUser = async (t, e) => (await a(this, m)).setLayoutAvailableForUser(t, e).then((n) => o(n)), this.setSelectedByUser = async (t, e) => (await a(this, m)).setLayoutSelectedByUser(t, e).then((n) => o(n)), this.setResizableByUser = async (t, e) => (await a(this, m)).setLayoutResizableByUser(t, JSON.stringify(e)).then((n) => o(n)), g(this, m, i), g(this, Tt, i);
1281
+ }
1282
+ }
1283
+ m = new WeakMap(), Tt = new WeakMap();
1284
+ var se = /* @__PURE__ */ ((s) => (s.thumbnail = "thumbnail", s.mediumres = "mediumres", s.highres = "highres", s.original = "original", s))(se || {}), ms = /* @__PURE__ */ ((s) => (s.web = "web", s.print = "print", s.animation = "animation", s))(ms || {}), W, Gt;
1285
+ class qe {
1286
+ /**
1287
+ * @ignore
1288
+ */
1289
+ constructor(i) {
1290
+ /**
1291
+ * @ignore
1292
+ */
1293
+ u(this, W);
1294
+ u(this, Gt);
1295
+ this.query = async (t, e, r = {}) => (await a(this, W)).mediaConnectorQuery(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), this.detail = async (t, e, r = {}) => (await a(this, W)).mediaConnectorDetail(t, e, JSON.stringify(r)).then((c) => o(c)), this.download = async (t, e, r, n = {}) => {
1296
+ const c = this.parseDeprecatedMediaDownloadType(
1297
+ r
1298
+ );
1299
+ return (await a(this, Gt)).mediaConnectorDownload(
1300
+ t,
1301
+ e,
1302
+ c,
1303
+ ms.web,
1304
+ JSON.stringify(n)
1305
+ ).then((l) => l ?? l);
1306
+ }, this.getConfigurationOptions = async (t) => (await a(this, W)).mediaConnectorGetConfigurationOptions(t).then((r) => o(r)), this.getCapabilities = async (t) => (await a(this, W)).mediaConnectorGetCapabilities(t).then((r) => o(r)), this.parseDeprecatedMediaType = (t) => {
1307
+ if (t === Rt.file) return Vt.file;
1308
+ if (t === Rt.collection) return Vt.collection;
1309
+ }, this.upload = async (t, e, r = {}) => (await a(this, W)).mediaConnectorUpload(t, JSON.stringify(e), JSON.stringify(r)).then((c) => o(c)), g(this, W, i), g(this, Gt, i);
1310
+ }
1311
+ /**
1312
+ * This method will parse the deprecatedMediaDownloadType to the new media download type.
1313
+ * This method will be removed once the deprecatedMediaDownloadType is out of use
1314
+ * @param deprecatedMediaDownloadType legacy download type
1315
+ * @returns MediaDownloadType
1316
+ */
1317
+ parseDeprecatedMediaDownloadType(i) {
1318
+ switch (i) {
1319
+ case Xt.HighResolutionWeb:
1320
+ return se.highres;
1321
+ case Xt.LowResolutionWeb:
1322
+ return se.thumbnail;
1323
+ default:
1324
+ return i;
1325
+ }
1326
+ }
1327
+ }
1328
+ W = new WeakMap(), Gt = new WeakMap();
1329
+ var F, Ht, is;
1330
+ let je = (is = class {
1331
+ /**
1332
+ * @ignore
1333
+ */
1334
+ constructor(i) {
1335
+ /**
1336
+ * @ignore
1337
+ */
1338
+ u(this, F);
1339
+ /**
1340
+ * @ignore
1341
+ */
1342
+ u(this, Ht);
1343
+ this.add = async () => (await a(this, F)).addPage().then((e) => o(e)), this.remove = async (t) => (await a(this, F)).removePage(t).then((r) => o(r)), this.select = async (t) => (await a(this, F)).selectPage(t).then((r) => o(r)), this.setVisibility = async (t, e) => (await a(this, F)).setPageIsVisible(t, e).then((n) => o(n)), this.duplicate = async (t) => (await a(this, F)).duplicatePage(t).then((r) => o(r)), this.getAll = async () => (await a(this, F)).getPages().then((e) => o(e)), this.getById = async (t) => (await a(this, F)).getPageById(t).then((r) => o(r)), this.getSnapshot = async (t, e) => (await a(this, Ht)).getPageSnapshotWithSettings(t, e == null ? null : JSON.stringify(e)).then((n) => n ?? n), this.setWidth = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, F)).setPageWidth(e).then((n) => o(n))), this.setHeight = async (t, e) => (t !== void 0 && console.warn("pageId has no effect since all pages are being updated simultaneously."), (await a(this, F)).setPageHeight(e).then((n) => o(n))), this.setSize = async (t, e) => (await a(this, F)).setPageSize(t, e).then((n) => o(n)), this.move = async (t, e) => (await a(this, F)).reorderPages(t, e).then((n) => o(n)), g(this, F, i), g(this, Ht, i);
1344
+ }
1345
+ }, F = new WeakMap(), Ht = new WeakMap(), is);
1346
+ var U;
1347
+ class Ye {
1348
+ /**
1349
+ * @ignore
1350
+ */
1351
+ constructor(i) {
1352
+ /**
1353
+ * @ignore
1354
+ */
1355
+ u(this, U);
1356
+ this.getAll = async () => (await a(this, U)).getParagraphStyles().then((e) => o(e)), this.getById = async (t) => (await a(this, U)).getParagraphStyleById(t).then((r) => o(r)), this.create = async () => (await a(this, U)).createParagraphStyle().then((e) => o(e)), this.duplicate = async (t) => (await a(this, U)).duplicateParagraphStyle(t).then((r) => o(r)), this.update = async (t, e) => (await a(this, U)).updateParagraphStyle(t, JSON.stringify(e)).then((n) => o(n)), this.rename = async (t, e) => (await a(this, U)).renameParagraphStyle(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, U)).removeParagraphStyle(t).then((r) => o(r)), this.move = async (t, e) => (await a(this, U)).moveParagraphStyles(t, e).then((n) => o(n)), g(this, U, i);
1357
+ }
1358
+ }
1359
+ U = new WeakMap();
1360
+ var x = /* @__PURE__ */ ((s) => (s.info = "info", s.warn = "warn", s.error = "error", s))(x || {}), ws = /* @__PURE__ */ ((s) => (s.general = "general", s.connector = "connector", s.event = "event", s.engine = "engine", s))(ws || {}), Bt = /* @__PURE__ */ ((s) => (s.throw = "throw", s.log = "log", s))(Bt || {});
1361
+ class Mr {
1362
+ constructor(i, t, e, r) {
1363
+ this.type = "action", this.message = i, this.id = t, this.event = e, this.eventChain = r;
1364
+ }
1365
+ }
1366
+ class xr {
1367
+ constructor(i, t, e) {
1368
+ this.type = "dataRow", this.count = i, this.message = t, this.exceptions = e;
1369
+ }
1370
+ }
1371
+ var ae = /* @__PURE__ */ ((s) => (s.shortText = "shortText", s.longText = "longText", s.image = "image", s.list = "list", s.boolean = "boolean", s.group = "group", s.number = "number", s.date = "date", s))(ae || {}), Rr = /* @__PURE__ */ ((s) => (s.Monday = "monday", s.Tuesday = "tuesday", s.Wednesday = "wednesday", s.Thursday = "thursday", s.Friday = "friday", s.Saturday = "saturday", s.Sunday = "sunday", s))(Rr || {}), Vr = /* @__PURE__ */ ((s) => (s.en_US = "en_US", s.cs = "cs", s.da = "da", s.nl = "nl", s.fi = "fi", s.fr = "fr", s.de = "de", s.it = "it", s.no = "no", s.pl = "pl", s.pt_PT = "pt_PT", s.es_ES = "es_ES", s.sv = "sv", s))(Vr || {}), Mt = /* @__PURE__ */ ((s) => (s.visible = "visible", s.invisible = "invisible", s.conditional = "conditional", s))(Mt || {}), Br = /* @__PURE__ */ ((s) => (s.boolean = "boolean", s.text = "text", s.number = "number", s))(Br || {}), Jr = /* @__PURE__ */ ((s) => (s.equals = "=", s.notEquals = "!=", s.greaterThan = ">", s.greaterThanOrEquals = ">=", s.lessThan = "<", s.lessThanOrEquals = "<=", s))(Jr || {});
1372
+ let Ur = class {
1373
+ /**
1374
+ * @ignore
1375
+ */
1376
+ constructor(i, t) {
1377
+ this.onActionsChanged = (e) => {
1378
+ this.config.events.onActionsChanged.trigger(JSON.parse(e));
1379
+ }, this.onAnimationChanged = (e) => {
1380
+ this.config.events.onFrameAnimationsChanged.trigger(JSON.parse(e));
1381
+ }, this.onAnimationPlaybackChanged = (e) => {
1382
+ this.config.events.onScrubberPositionChanged.trigger(JSON.parse(e));
1383
+ }, this.onSelectedLayoutPropertiesChanged = (e) => {
1384
+ this.config.events.onSelectedLayoutPropertiesChanged.trigger(JSON.parse(e));
1385
+ }, this.onSelectedLayoutUnitChanged = (e) => {
1386
+ this.config.events.onSelectedLayoutUnitChanged.trigger(e);
1387
+ }, this.onFramesLayoutChanged = (e) => {
1388
+ const r = JSON.parse(e);
1389
+ this.config.events.onFramesLayoutChanged.trigger(r);
1390
+ }, this.onSelectedFramesLayoutChanged = (e) => {
1391
+ const r = JSON.parse(e);
1392
+ this.config.events.onSelectedFramesLayoutChanged.trigger(r);
1393
+ const n = this.config.onSelectedFrameLayoutChanged;
1394
+ n && n(r.length > 1 ? void 0 : r[0]);
1395
+ }, this.onSelectedFramesContentChanged = (e) => {
1396
+ const r = JSON.parse(e);
1397
+ this.config.events.onSelectedFramesContentChanged.trigger(r);
1398
+ const n = this.config.onSelectedFrameContentChanged;
1399
+ n && n(r.length > 1 ? null : r[0]);
1400
+ }, this.onStateChanged = () => {
1401
+ this.config.events.onStateChanged.trigger();
1402
+ }, this.onAuthExpired = async (e) => {
1403
+ const r = await this.config.handlers.onAuthExpired.trigger(JSON.parse(e));
1404
+ return r != null ? JSON.stringify(r) : null;
1405
+ }, this.onViewportRequested = () => {
1406
+ const e = this.config.handlers.onViewportRequested.trigger();
1407
+ return e != null ? JSON.stringify(e) : null;
1408
+ }, this.onDocumentLoaded = () => {
1409
+ this.config.events.onDocumentLoaded.trigger();
1410
+ }, this.onPageSelectionChanged = (e) => {
1411
+ this.config.events.onPageSelectionChanged.trigger(e);
1412
+ }, this.onVariableListChanged = (e) => {
1413
+ const n = JSON.parse(e).map(
1414
+ (c) => {
1415
+ var h;
1416
+ return c.type === ae.list ? {
1417
+ ...c,
1418
+ items: c.items.map(
1419
+ (l) => l.value
1420
+ ),
1421
+ selected: (h = c.selected) == null ? void 0 : h.value
1422
+ } : c;
1423
+ }
1424
+ );
1425
+ this.config.events.onVariableListChanged.trigger(n);
1426
+ }, this.onSelectedToolChanged = (e) => {
1427
+ this.config.events.onSelectedToolChanged.trigger(e);
1428
+ }, this.onUndoStateChanged = (e) => {
1429
+ this.config.events.onUndoStackStateChanged.trigger(JSON.parse(e));
1430
+ }, this.onCustomUndoDataChanged = (e) => {
1431
+ this.config.events.onCustomUndoDataChanged.trigger(JSON.parse(e));
1432
+ }, this.onSelectedLayoutFramesChanged = (e) => {
1433
+ this.config.events.onSelectedLayoutFramesChanged.trigger(JSON.parse(e));
1434
+ }, this.onSelectedTextStyleChanged = (e) => {
1435
+ this.config.events.onSelectedTextStyleChanged.trigger(JSON.parse(e));
1436
+ }, this.onColorsChanged = (e) => {
1437
+ this.config.events.onColorsChanged.trigger(JSON.parse(e));
1438
+ }, this.onParagraphStylesChanged = (e) => {
1439
+ this.config.events.onParagraphStylesChanged.trigger(JSON.parse(e));
1440
+ }, this.onCharacterStylesChanged = (e) => {
1441
+ this.config.events.onCharacterStylesChanged.trigger(JSON.parse(e));
1442
+ }, this.onFontFamiliesChanged = (e) => {
1443
+ this.config.events.onFontFamiliesChanged.trigger(JSON.parse(e));
1444
+ }, this.onSelectedLayoutIdChanged = (e) => {
1445
+ this.config.events.onSelectedLayoutIdChanged.trigger(e);
1446
+ }, this.onLayoutsChanged = (e) => {
1447
+ this.config.events.onLayoutsChanged.trigger(JSON.parse(e));
1448
+ }, this.onZoomChanged = (e) => {
1449
+ this.config.events.onZoomChanged.trigger(JSON.parse(e));
1450
+ }, this.onConnectorEvent = (e) => {
1451
+ this.config.events.onConnectorEvent.trigger(JSON.parse(e));
1452
+ }, this.onConnectorsChanged = (e) => {
1453
+ const n = new ne().makeMultipleConnectorsBackwardsCompatible(
1454
+ JSON.parse(e),
1455
+ this.localConfig.get(Z.GraFxStudioEnvironmentApiUrl)
1456
+ );
1457
+ this.config.events.onConnectorsChanged.trigger(n);
1458
+ }, this.onSelectedPageIdChanged = (e) => {
1459
+ this.config.events.onSelectedPageIdChanged.trigger(e);
1460
+ }, this.onPagesChanged = (e) => {
1461
+ this.config.events.onPagesChanged.trigger(JSON.parse(e));
1462
+ }, this.onPageSnapshotInvalidated = (e) => {
1463
+ this.config.events.onPageSnapshotInvalidated.trigger(e);
1464
+ }, this.onPageSizeChanged = (e) => {
1465
+ this.config.events.onPageSizeChanged.trigger(JSON.parse(e));
1466
+ }, this.onShapeCornerRadiusChanged = (e) => {
1467
+ this.config.events.onShapeCornerRadiusChanged.trigger(JSON.parse(e));
1468
+ }, this.onCropActiveFrameIdChanged = (e) => {
1469
+ this.config.events.onCropActiveFrameIdChanged.trigger(e);
1470
+ }, this.onAsyncError = (e) => {
1471
+ const r = JSON.parse(e);
1472
+ if ((r == null ? void 0 : r.type) === "dataRow") {
1473
+ const n = new xr(
1474
+ r.count,
1475
+ r.message,
1476
+ r.exceptions
1477
+ );
1478
+ this.config.events.onAsyncError.trigger(n);
1479
+ } else if ((r == null ? void 0 : r.type) === "action") {
1480
+ const n = new Mr(
1481
+ r.message,
1482
+ r.id,
1483
+ r.event,
1484
+ r.eventChain
1485
+ );
1486
+ this.config.events.onAsyncError.trigger(n);
1487
+ } else
1488
+ this.config.events.onAsyncError.trigger(r);
1489
+ }, this.onViewModeChanged = (e) => {
1490
+ this.config.events.onViewModeChanged.trigger(e);
1491
+ }, this.onBarcodeValidationChanged = (e) => {
1492
+ this.config.events.onBarcodeValidationChanged.trigger(JSON.parse(e));
1493
+ }, this.onDataSourceIdChanged = (e) => {
1494
+ this.config.events.onDataSourceIdChanged.trigger(e);
1495
+ }, this.onDocumentIssueListChanged = (e) => {
1496
+ this.config.events.onDocumentIssueListChanged.trigger(JSON.parse(e));
1497
+ }, this.onEngineEditModeChanged = (e) => {
1498
+ this.config.events.onEngineEditModeChanged.trigger(JSON.parse(e));
1499
+ }, this.onBrandKitMediaChanged = (e) => {
1500
+ this.config.events.onBrandKitMediaChanged.trigger(JSON.parse(e));
1501
+ }, this.config = i, this.localConfig = t;
1502
+ }
1503
+ };
1504
+ var gt;
1505
+ class Ze {
1506
+ /**
1507
+ * @ignore
1508
+ */
1509
+ constructor(i) {
1510
+ /**
1511
+ * @ignore
1512
+ */
1513
+ u(this, gt);
1514
+ this.set = async (t) => (await a(this, gt)).selectedTextStyleDeltaUpdate(JSON.stringify(t)).then((r) => o(r)), this.removeSelected = async () => (await a(this, gt)).selectedTextStyleClean().then((e) => o(e)), this.getSelected = async () => (await a(this, gt)).getSelectedTextStyle().then((e) => o(e)), g(this, gt, i);
1515
+ }
1516
+ }
1517
+ gt = new WeakMap();
1518
+ var kr = /* @__PURE__ */ ((s) => (s.FRAME_X = "frameX", s.FRAME_Y = "frameY", s.WIDTH = "width", s.HEIGHT = "height", s.FRAME_ROTATION = "frameRotation", s))(kr || {}), Tr = /* @__PURE__ */ ((s) => (s.LAYOUT_HEIGHT = "layoutHeight", s.LAYOUT_WIDTH = "layoutWidth", s.BLEED_TOP = "bleedTop", s.BLEED_BOTTOM = "bleedBottom", s.BLEED_LEFT = "bleedLeft", s.BLEED_RIGHT = "bleedRight", s.BLEED_VALUES_COMBINED = "areBleedValuesCombined", s))(Tr || {}), H = /* @__PURE__ */ ((s) => (s.SELECT = "select", s.ZOOM = "zoom", s.HAND = "hand", s.IMAGE_FRAME = "imageFrame", s.TEXT_FRAME = "textFrame", s.SHAPE_RECT = "rect", s.SHAPE_ELLIPSE = "ellipse", s.SHAPE_POLYGON = "polygon", s))(H || {}), Gr = /* @__PURE__ */ ((s) => (s.MP4 = "mp4", s.GIF = "gif", s.PNG = "png", s.JPG = "jpg", s.PDF = "pdf", s))(Gr || {}), re = /* @__PURE__ */ ((s) => (s.SANDBOX = "sandbox", s.PRODUCTION = "online", s))(re || {}), vt;
1519
+ class Qe {
1520
+ /**
1521
+ * @ignore
1522
+ */
1523
+ constructor(i) {
1524
+ /**
1525
+ * @ignore
1526
+ */
1527
+ u(this, vt);
1528
+ this.setTool = async (t) => (await a(this, vt)).setTool(t).then((r) => o(r)), this.getSelected = async () => (await a(this, vt)).getSelectedTool().then((e) => o(e)), this.setPointer = async () => this.setTool(H.SELECT), this.setSelect = async () => this.setTool(H.SELECT), this.setHand = async () => this.setTool(H.HAND), this.setZoom = async () => this.setTool(H.ZOOM), this.setTextFrame = async () => this.setTool(H.TEXT_FRAME), this.setImageFrame = async () => this.setTool(H.IMAGE_FRAME), this.setShapeRect = async () => this.setTool(H.SHAPE_RECT), this.setShapeEllipse = async () => this.setTool(H.SHAPE_ELLIPSE), this.setShapePolygon = async () => this.setTool(H.SHAPE_POLYGON), g(this, vt, i);
1529
+ }
1530
+ }
1531
+ vt = new WeakMap();
1532
+ var q, yt, _t;
1533
+ class Xe {
1534
+ /**
1535
+ * @ignore
1536
+ */
1537
+ constructor(i, t) {
1538
+ /**
1539
+ * @ignore
1540
+ */
1541
+ u(this, q);
1542
+ u(this, yt);
1543
+ u(this, _t);
1544
+ this.undo = async () => (await a(this, q)).undo().then((r) => o(r)), this.redo = async () => (await a(this, q)).redo().then((r) => o(r)), this.addCustomData = async (e, r) => (await a(this, q)).setCustomUndoData(e, r, !1).then((c) => o(c)), this.record = async (e, r) => {
1545
+ try {
1546
+ await a(this, yt).beginIfNoneActive(e), await r(a(this, _t)), await a(this, yt).end();
1547
+ } catch (n) {
1548
+ throw await a(this, yt).abort(), n;
1549
+ }
1550
+ }, this.pause = async () => (await a(this, q)).pause().then((r) => o(r)), this.resume = async () => (await a(this, q)).resume().then((r) => o(r)), g(this, q, i), g(this, _t, t), g(this, yt, new Hr(i));
1551
+ }
1552
+ }
1553
+ q = new WeakMap(), yt = new WeakMap(), _t = new WeakMap();
1554
+ var at;
1555
+ class Hr {
1556
+ /**
1557
+ * @ignore
1558
+ */
1559
+ constructor(i) {
1560
+ /**
1561
+ * @ignore
1562
+ */
1563
+ u(this, at);
1564
+ this.begin = async (t) => (await a(this, at)).begin(t).then((r) => o(r)), this.beginIfNoneActive = async (t) => (await a(this, at)).beginIfNoneActive(t).then((r) => o(r)), this.end = async () => (await a(this, at)).end().then((e) => o(e)), this.abort = async () => (await a(this, at)).abort().then((e) => o(e)), g(this, at, i);
1565
+ }
1566
+ }
1567
+ at = new WeakMap();
1568
+ const _r = (s, i = 2) => {
1569
+ const t = Math.pow(10, i);
1570
+ return Math.round(s * t) / t;
1571
+ };
1572
+ var Pt;
1573
+ class ts {
1574
+ constructor(i) {
1575
+ u(this, Pt);
1576
+ this.round = (t, e) => o({
1577
+ data: String(_r(t, e)),
1578
+ success: !0,
1579
+ status: 200,
1580
+ parsedData: null
1581
+ }), this.createEnvironmentBaseURL = (t) => {
1582
+ const { type: e = re.SANDBOX, environment: r = "ft-nostress", version: n = "1" } = t, c = e == re.SANDBOX ? "chili-publish-sandbox" : "chili-publish";
1583
+ return `https://${r}.${c}.online/grafx/api/v${n}/environment/${r}`;
1584
+ }, this.stageFiles = async (t, e, r) => {
1585
+ const n = a(this, Pt).get(Z.GraFxStudioEnvironmentApiUrl);
1586
+ if (!n)
1587
+ throw new Error("GraFx Studio Environment API URL is not set");
1588
+ const c = `${n}connectors/${e}/stage`, h = a(this, Pt).get(Z.GraFxStudioAuthToken);
1589
+ if (!h)
1590
+ throw new Error("GraFx Studio Auth Token is not set");
1591
+ const l = new FormData();
1592
+ t.forEach((f, I) => {
1593
+ const S = f instanceof File ? f.name : `blob-${I}`;
1594
+ l.append("files", f, S);
1595
+ }), r && l.append(
1596
+ "validationJson",
1597
+ JSON.stringify({
1598
+ allowedMimeTypes: r.mimeTypes,
1599
+ minDimensions: {
1600
+ width: r.minWidthPixels,
1601
+ height: r.minHeightPixels
1602
+ }
1603
+ })
1604
+ );
1605
+ const y = await fetch(c, {
1606
+ method: "POST",
1607
+ body: l,
1608
+ headers: {
1609
+ Authorization: `Bearer ${h}`
1610
+ }
1611
+ });
1612
+ if (y.status === 422) {
1613
+ const f = await y.json();
1614
+ throw new mr(f.message, ps.minDimension);
1615
+ }
1616
+ if (!y.ok)
1617
+ throw new Error("Failed to stage files");
1618
+ return await y.json();
1619
+ }, g(this, Pt, i);
1620
+ }
1621
+ }
1622
+ Pt = new WeakMap();
1623
+ var $t;
1624
+ class $r {
1625
+ constructor(i) {
1626
+ u(this, $t);
1627
+ this.setMinimum = async (t, e) => {
1628
+ const r = { minValue: { value: e } };
1629
+ return this.applyPropertiesUpdate(t, r);
1630
+ }, this.setMaximum = async (t, e) => {
1631
+ const r = { maxValue: { value: e } };
1632
+ return this.applyPropertiesUpdate(t, r);
1633
+ }, this.setShowStepper = async (t, e) => {
1634
+ const r = { showStepper: { value: e } };
1635
+ return this.applyPropertiesUpdate(t, r);
1636
+ }, this.setStepSize = async (t, e) => {
1637
+ const r = { stepSize: { value: e } };
1638
+ return this.applyPropertiesUpdate(t, r);
1639
+ }, this.setThousandsSeparator = async (t, e) => {
1640
+ const r = { thousandsSeparator: { value: e } };
1641
+ return this.applyPropertiesUpdate(t, r);
1642
+ }, this.setDecimalSeparator = async (t, e) => {
1643
+ const r = { decimalSeparator: { value: e } };
1644
+ return this.applyPropertiesUpdate(t, r);
1645
+ }, this.setDecimalCharacterStyle = async (t, e) => {
1646
+ const r = { decimalCharacterStyleId: { value: e } };
1647
+ return this.applyPropertiesUpdate(t, r);
1648
+ }, this.setNumberOfDecimals = async (t, e) => {
1649
+ const r = { numberOfDecimals: { value: e } };
1650
+ return this.applyPropertiesUpdate(t, r);
1651
+ }, g(this, $t, i);
1652
+ }
1653
+ async applyPropertiesUpdate(i, t) {
1654
+ const r = await (await a(this, $t)).updateNumberVariableProperties(i, JSON.stringify(t));
1655
+ return o(r);
1656
+ }
1657
+ }
1658
+ $t = new WeakMap();
1659
+ var Kt;
1660
+ class Kr {
1661
+ constructor(i) {
1662
+ u(this, Kt);
1663
+ this.setDisplayFormat = async (t, e) => {
1664
+ const r = { displayFormat: { value: e } };
1665
+ return this.applyPropertiesUpdate(t, r);
1666
+ }, this.setLocale = async (t, e) => {
1667
+ const r = { locale: { value: e } };
1668
+ return this.applyPropertiesUpdate(t, r);
1669
+ }, this.setStartDate = async (t, e) => {
1670
+ const r = { startDate: { value: e } };
1671
+ return this.applyPropertiesUpdate(t, r);
1672
+ }, this.setEndDate = async (t, e) => {
1673
+ const r = { endDate: { value: e } };
1674
+ return this.applyPropertiesUpdate(t, r);
1675
+ }, this.setExcludedDays = async (t, e) => {
1676
+ const r = { excludedDays: { value: e } };
1677
+ return this.applyPropertiesUpdate(t, r);
1678
+ }, g(this, Kt, i);
1679
+ }
1680
+ async applyPropertiesUpdate(i, t) {
1681
+ const r = await (await a(this, Kt)).updateDateVariableProperties(i, JSON.stringify(t));
1682
+ return o(r);
1683
+ }
1684
+ }
1685
+ Kt = new WeakMap();
1686
+ var w, At, Ft, os;
1687
+ let es = (os = class {
1688
+ /**
1689
+ * @ignore
1690
+ */
1691
+ constructor(i) {
1692
+ /**
1693
+ * @ignore
1694
+ */
1695
+ u(this, w);
1696
+ u(this, At);
1697
+ u(this, Ft);
1698
+ this.getAll = async () => (await a(this, w)).getVariables().then((e) => o(e)).then((e) => {
1699
+ const r = e;
1700
+ return r.parsedData && (r.parsedData = this.makeVariablesBackwardsCompatible(r.parsedData)), r;
1701
+ }), this.getById = async (t) => (await a(this, w)).getVariableById(t).then((r) => o(r)).then((r) => {
1702
+ const n = r;
1703
+ return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
1704
+ }), this.getByName = async (t) => (await a(this, w)).getVariableByName(t).then((r) => o(r)).then((r) => {
1705
+ const n = r;
1706
+ return n.parsedData && (n.parsedData = this.makeVariableBackwardsCompatible(n.parsedData)), n;
1707
+ }), this.create = async (t, e) => (await a(this, w)).addVariable(t, e).then((n) => o(n)), this.remove = async (t) => (await a(this, w)).removeVariables(t).then((r) => o(r)), this.rename = async (t, e) => (await a(this, w)).setVariableName(t, e).then((n) => o(n)), this.setLabel = async (t, e) => (await a(this, w)).setVariableLabel(t, e).then((n) => o(n)), g(this, At, async (t, e) => (await a(this, w)).setVariablePlaceholder(t, e).then((n) => o(n))), this.setPlaceholder = async (t, e) => a(this, At).call(this, t, e), this.resetPlaceholder = async (t) => a(this, At).call(this, t, null), g(this, Ft, async (t, e) => (await a(this, w)).setVariableHelpText(t, e).then((n) => o(n))), this.setHelpText = async (t, e) => a(this, Ft).call(this, t, e), this.resetHelpText = async (t) => a(this, Ft).call(this, t, null), this.setType = async (t, e) => (await a(this, w)).setVariableType(t, e).then((n) => o(n)), this.setListVariable = async (t, e) => (await a(this, w)).setListVariableItems(
1708
+ t,
1709
+ e.map((n) => JSON.stringify({ value: n }))
1710
+ ).then((n) => o(n)), this.setValue = async (t, e) => (await a(this, w)).setVariableValue(t, e).then((n) => o(n)), this.duplicate = async (t) => (await a(this, w)).duplicateVariable(t).then((r) => o(r)), this.groupVariables = async (t, e) => (await a(this, w)).groupVariables(t, e).then((n) => o(n)), this.ungroupVariables = async (t) => (await a(this, w)).ungroupVariable(t).then((r) => o(r)), this.move = async (t, e, r) => (await a(this, w)).moveVariable(e, r, t).then((c) => o(c)), this.moveVariables = async (t, e, r) => (await a(this, w)).moveVariables(e, r, t).then((c) => o(c)), this.setIsVisible = async (t, e) => {
1711
+ const r = e ? { type: Mt.visible } : { type: Mt.invisible };
1712
+ return this.setVariableVisibility(t, r);
1713
+ }, this.setIsHidden = async (t, e) => {
1714
+ const r = e ? { type: Mt.invisible } : { type: Mt.visible };
1715
+ return this.setVariableVisibility(t, r);
1716
+ }, this.setVariableVisibility = async (t, e) => (await a(this, w)).setVariableVisibility(t, JSON.stringify(e)).then((n) => o(n)), this.setLayoutsForVariableVisibility = async (t) => (await a(this, w)).setLayoutsForVariableVisibility(t ? JSON.stringify(t) : null).then((r) => o(r)), this.setIsRequired = async (t, e) => (await a(this, w)).setVariableIsRequired(t, e).then((n) => o(n)), this.setIsReadonly = async (t, e) => (await a(this, w)).setVariableIsReadonly(t, e).then((n) => o(n)), this.getImageVariableConnectorId = async (t) => (await a(this, w)).getImageVariableConnectorId(t).then((r) => o(r)), this.setImageVariableConnector = async (t, e) => {
1717
+ const r = await a(this, w), c = new ne().makeConnectorSourceForwardsCompatible(e);
1718
+ return r.setImageVariableConnector(t, JSON.stringify(c)).then((h) => o(h));
1719
+ }, this.removeSource = async (t) => this.setValue(t, null), this.setPrefix = async (t, e) => {
1720
+ const r = { prefix: { value: e } };
1721
+ return this.applyPrefixSuffixDeltaUpdate(t, r);
1722
+ }, this.setSuffix = async (t, e) => {
1723
+ const r = { suffix: { value: e } };
1724
+ return this.applyPrefixSuffixDeltaUpdate(t, r);
1725
+ }, this.setPrefixCharacterStyle = async (t, e) => {
1726
+ const r = { prefixCharacterStyleId: { value: e } };
1727
+ return this.applyPrefixSuffixDeltaUpdate(t, r);
1728
+ }, this.setSuffixCharacterStyle = async (t, e) => {
1729
+ const r = { suffixCharacterStyleId: { value: e } };
1730
+ return this.applyPrefixSuffixDeltaUpdate(t, r);
1731
+ }, this.setPrivateData = async (t, e) => (await a(this, w)).setVariablePrivateData(t, JSON.stringify(e)).then((n) => o(n)), this.getPrivateData = async (t) => (await a(this, w)).getVariablePrivateData(t).then((r) => o(r)), this.setAllowImageQuery = async (t, e) => (await a(this, w)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowImageUpload = async (t, e) => (await a(this, w)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinImageUploadSize = async (t, e, r) => (await a(this, w)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, w, i), this.number = new $r(a(this, w)), this.date = new Kr(a(this, w));
1732
+ }
1733
+ makeVariablesBackwardsCompatible(i) {
1734
+ return i.map((t) => this.makeVariableBackwardsCompatible(t));
1735
+ }
1736
+ makeVariableBackwardsCompatible(i) {
1737
+ return i.type !== ae.list ? i : this.makeListVariableBackwardsCompatible(i);
1738
+ }
1739
+ makeListVariableBackwardsCompatible(i) {
1740
+ const t = i, e = i.items, r = i.selected, n = e.map((c) => c.value);
1741
+ return t.items = n, t.selected = r == null ? void 0 : r.value, t;
1742
+ }
1743
+ async applyPrefixSuffixDeltaUpdate(i, t) {
1744
+ const r = await (await a(this, w)).updateVariablePrefixSuffixProperties(i, JSON.stringify(t));
1745
+ return o(r);
1746
+ }
1747
+ }, w = new WeakMap(), At = new WeakMap(), Ft = new WeakMap(), os);
1748
+ class zr {
1749
+ /**
1750
+ * @ignore
1751
+ */
1752
+ constructor(i) {
1753
+ this.onVariableListChanged = (t) => {
1754
+ this.config.events.onVariableListChanged.trigger(JSON.parse(t));
1755
+ }, this.onConnectorsChanged = (t) => {
1756
+ this.config.events.onConnectorsChanged.trigger(JSON.parse(t));
1757
+ }, this.onPageSizeChanged = (t) => {
1758
+ this.config.events.onPageSizeChanged.trigger(JSON.parse(t));
1759
+ }, this.onEngineEditModeChanged = (t) => {
1760
+ this.config.events.onEngineEditModeChanged.trigger(JSON.parse(t));
1761
+ }, this.config = i;
1762
+ }
1763
+ }
1764
+ var j;
1765
+ class Wr {
1766
+ /**
1767
+ * @ignore
1768
+ */
1769
+ constructor(i) {
1770
+ /**
1771
+ * @ignore
1772
+ */
1773
+ u(this, j);
1774
+ this.getAll = async () => (await a(this, j)).getVariables().then((e) => o(e)), this.getById = async (t) => (await a(this, j)).getVariableById(t).then((r) => o(r)), this.getByName = async (t) => (await a(this, j)).getVariableByName(t).then((r) => o(r)), this.setListVariable = async (t, e) => (await a(this, j)).setListVariableItems(
1775
+ t,
1776
+ e.map((n) => JSON.stringify(n))
1777
+ ).then((n) => o(n)), this.setImageVariableConnector = async (t, e) => (await a(this, j)).setImageVariableConnector(t, JSON.stringify(e)).then((n) => o(n)), g(this, j, i), this.image = new qr(i);
1778
+ }
1779
+ }
1780
+ j = new WeakMap();
1781
+ var pt;
1782
+ class qr {
1783
+ constructor(i) {
1784
+ u(this, pt);
1785
+ this.setAllowQuery = async (t, e) => (await a(this, pt)).setImageVariableAllowQuery(t, e).then((n) => o(n)), this.setAllowUpload = async (t, e) => (await a(this, pt)).setImageVariableAllowUpload(t, e).then((n) => o(n)), this.setMinUploadSize = async (t, e, r) => (await a(this, pt)).setImageVariableUploadMinSize(t, e, r).then((c) => o(c)), g(this, pt, i);
1786
+ }
1787
+ }
1788
+ pt = new WeakMap();
1789
+ var Ct;
1790
+ class jr {
1791
+ /**
1792
+ * @ignore
1793
+ */
1794
+ constructor(i) {
1795
+ /**
1796
+ * @ignore
1797
+ */
1798
+ u(this, Ct);
1799
+ this.register = async (t) => (await a(this, Ct)).registerConnector(JSON.stringify(t)).then((r) => o(r)), this.getById = async (t) => (await a(this, Ct)).getConnectorById(t).then((r) => o(r)), this.getAllByType = async (t) => (await a(this, Ct)).getConnectors(t).then((r) => o(r)), g(this, Ct, i);
1800
+ }
1801
+ }
1802
+ Ct = new WeakMap();
1803
+ var Et, Wt;
1804
+ class Yr {
1805
+ /**
1806
+ * @ignore
1807
+ */
1808
+ constructor(i) {
1809
+ /**
1810
+ * @ignore
1811
+ */
1812
+ u(this, Et);
1813
+ /**
1814
+ * @ignore
1815
+ */
1816
+ u(this, Wt);
1817
+ this.setWidth = async (t) => (await a(this, Et)).setPageWidth(t).then((r) => o(r)), this.setHeight = async (t) => (await a(this, Et)).setPageHeight(t).then((r) => o(r)), g(this, Et, i), g(this, Wt, i);
1818
+ }
1819
+ }
1820
+ Et = new WeakMap(), Wt = new WeakMap();
1821
+ class ss {
1822
+ /**
1823
+ * The next initiator is a split off on SDK level to tag next features
1824
+ * The SDK should be configured clientside and it exposes all controllers to work with in other applications
1825
+ * @param config The configuration object where the SDK and editor can get configured
1826
+ */
1827
+ constructor(i, t, e) {
1828
+ this.config = i, this.connection = t, this.editorAPI = e, this.subscriber = new zr(i), this.variable = new Wr(this.editorAPI), this.connector = new jr(this.editorAPI), this.page = new Yr(this.editorAPI), this.canvas = new Qt(this.editorAPI);
1829
+ }
1830
+ }
1831
+ class fs {
1832
+ constructor(i) {
1833
+ this.logger = i;
1834
+ }
1835
+ createEventHandlerFn(i, t) {
1836
+ return (...r) => {
1837
+ try {
1838
+ const n = i(...r);
1839
+ return n instanceof Promise ? n.catch((c) => this.handleError(c, t, i.name)) : n;
1840
+ } catch (n) {
1841
+ this.handleError(n, t, i.name);
1842
+ }
1843
+ };
1844
+ }
1845
+ handleError(i, t, e) {
1846
+ var r;
1847
+ if (t === Bt.log)
1848
+ (r = this.logger) == null || r.call(this, x.error, ws.event, `Error in callback ${e}: ${i}`);
1849
+ else
1850
+ throw i;
1851
+ }
1852
+ }
1853
+ class rs extends fs {
1854
+ constructor(i, t) {
1855
+ super(t), this.handler = i;
1856
+ }
1857
+ /**
1858
+ * Executes the defined handler with the provided arguments.
1859
+ *
1860
+ * @param args The arguments to pass to the callbacks.
1861
+ * @returns The result of executing the callbacks.
1862
+ */
1863
+ trigger(...i) {
1864
+ const t = this.handler();
1865
+ if (t)
1866
+ return this.createEventHandlerFn(t, Bt.throw)(...i);
1867
+ }
1868
+ }
1869
+ class C extends fs {
1870
+ constructor(i, t) {
1871
+ super(t), this.legacyHandler = i, this.subscriptions = /* @__PURE__ */ new Set();
1872
+ }
1873
+ /**
1874
+ * Executes the registered callbacks with provided arguments
1875
+ *
1876
+ * @param args The arguments to pass to the callbacks.
1877
+ * @returns The result of executing the callbacks.
1878
+ */
1879
+ trigger(...i) {
1880
+ const t = this.legacyHandler();
1881
+ t && this.createEventHandlerFn(t, Bt.log)(...i);
1882
+ for (const e of this.subscriptions)
1883
+ e(...i);
1884
+ }
1885
+ /**
1886
+ * Registers a callback function.
1887
+ *
1888
+ * @param callback - The callback function to register. This function will be invoked when the event occurs.
1889
+ * @param errorBehavior - An optional parameter to define how to handle errors that appear in the callback function.
1890
+ * Accepted values are:
1891
+ * - "log": Logs the error to the console (default behavior)
1892
+ * - "throw": Throws an error. Keep in mind that throwing of error in one of the callback will prevent calling of others
1893
+ * @returns A function to unsubscribe the callback, preventing it from being invoked in the future.
1894
+ */
1895
+ registerCallback(i, t = Bt.log) {
1896
+ const e = this.createEventHandlerFn(i, t);
1897
+ return this.subscriptions.add(e), () => {
1898
+ this.subscriptions.delete(e);
1899
+ };
1900
+ }
1901
+ }
1902
+ class ie {
1903
+ /**
1904
+ * Creates a runtime configuration object from the provided configuration object.
1905
+ *
1906
+ * @param config The configuration object to create the runtime configuration object from.
1907
+ * @returns The runtime configuration object.
1908
+ */
1909
+ static createRuntimeConfig(i) {
1910
+ var e, r, n, c, h, l, y, p, f, I, S, b, L, P, N, M, v, $, K, mt, wt, oe, ce, he, le, de, ue, ge, ye, pe, Ce, me, we, fe, Se;
1911
+ const t = { ...i };
1912
+ return t.logging = {
1913
+ logLevel: ((e = i.logging) == null ? void 0 : e.logLevel) || x.error,
1914
+ logger: ((r = i.logging) == null ? void 0 : r.logger) || ((Lt, qt, jt) => {
1915
+ var be;
1916
+ if (ie.isLoggingEnabled(Lt, ((be = t.logging) == null ? void 0 : be.logLevel) ?? x.error))
1917
+ switch (Lt) {
1918
+ case x.error:
1919
+ console.error(`[${qt}] [${Lt}] ${jt}`);
1920
+ break;
1921
+ case x.warn:
1922
+ console.warn(`[${qt}] [${Lt}] ${jt}`);
1923
+ break;
1924
+ default:
1925
+ console.log(`[${qt}] [${Lt}] ${jt}`);
1926
+ }
1927
+ })
1928
+ }, t.handlers = {
1929
+ onAuthExpired: new rs(() => t.onAuthExpired, (n = t.logging) == null ? void 0 : n.logger),
1930
+ onViewportRequested: new rs(
1931
+ () => t.onViewportRequested,
1932
+ (c = t.logging) == null ? void 0 : c.logger
1933
+ )
1934
+ }, t.events = {
1935
+ onActionsChanged: new C(
1936
+ () => t.onActionsChanged,
1937
+ (h = t.logging) == null ? void 0 : h.logger
1938
+ ),
1939
+ onStateChanged: new C(
1940
+ () => t.onStateChanged,
1941
+ (l = t.logging) == null ? void 0 : l.logger
1942
+ ),
1943
+ onDocumentLoaded: new C(
1944
+ () => t.onDocumentLoaded,
1945
+ (y = t.logging) == null ? void 0 : y.logger
1946
+ ),
1947
+ onSelectedFramesLayoutChanged: new C(
1948
+ () => t.onSelectedFramesLayoutChanged,
1949
+ (p = t.logging) == null ? void 0 : p.logger
1950
+ ),
1951
+ onFramesLayoutChanged: new C(
1952
+ () => t.onFramesLayoutChanged,
1953
+ (f = t.logging) == null ? void 0 : f.logger
1954
+ ),
1955
+ onSelectedFramesContentChanged: new C(
1956
+ () => t.onSelectedFramesContentChanged,
1957
+ (I = t.logging) == null ? void 0 : I.logger
1958
+ ),
1959
+ onPageSelectionChanged: new C(
1960
+ () => t.onPageSelectionChanged,
1961
+ (S = t.logging) == null ? void 0 : S.logger
1962
+ ),
1963
+ onSelectedLayoutPropertiesChanged: new C(
1964
+ () => t.onSelectedLayoutPropertiesChanged,
1965
+ (b = t.logging) == null ? void 0 : b.logger
1966
+ ),
1967
+ onSelectedLayoutUnitChanged: new C(
1968
+ () => t.onSelectedLayoutUnitChanged,
1969
+ (L = t.logging) == null ? void 0 : L.logger
1970
+ ),
1971
+ onScrubberPositionChanged: new C(
1972
+ () => t.onScrubberPositionChanged,
1973
+ (P = t.logging) == null ? void 0 : P.logger
1974
+ ),
1975
+ onFrameAnimationsChanged: new C(
1976
+ () => t.onFrameAnimationsChanged,
1977
+ (N = t.logging) == null ? void 0 : N.logger
1978
+ ),
1979
+ onVariableListChanged: new C(
1980
+ () => t.onVariableListChanged,
1981
+ (M = t.logging) == null ? void 0 : M.logger
1982
+ ),
1983
+ onSelectedToolChanged: new C(
1984
+ () => t.onSelectedToolChanged,
1985
+ (v = t.logging) == null ? void 0 : v.logger
1986
+ ),
1987
+ onUndoStackStateChanged: new C(
1988
+ () => t.onUndoStackStateChanged,
1989
+ ($ = t.logging) == null ? void 0 : $.logger
1990
+ ),
1991
+ onSelectedLayoutFramesChanged: new C(
1992
+ () => t.onSelectedLayoutFramesChanged,
1993
+ (K = t.logging) == null ? void 0 : K.logger
1994
+ ),
1995
+ onSelectedTextStyleChanged: new C(
1996
+ () => t.onSelectedTextStyleChanged,
1997
+ (mt = t.logging) == null ? void 0 : mt.logger
1998
+ ),
1999
+ onColorsChanged: new C(
2000
+ () => t.onColorsChanged,
2001
+ (wt = t.logging) == null ? void 0 : wt.logger
2002
+ ),
2003
+ onParagraphStylesChanged: new C(
2004
+ () => t.onParagraphStylesChanged,
2005
+ (oe = t.logging) == null ? void 0 : oe.logger
2006
+ ),
2007
+ onCharacterStylesChanged: new C(
2008
+ () => t.onCharacterStylesChanged,
2009
+ (ce = t.logging) == null ? void 0 : ce.logger
2010
+ ),
2011
+ onFontFamiliesChanged: new C(
2012
+ () => t.onFontFamiliesChanged,
2013
+ (he = t.logging) == null ? void 0 : he.logger
2014
+ ),
2015
+ onSelectedLayoutIdChanged: new C(
2016
+ () => t.onSelectedLayoutIdChanged,
2017
+ (le = t.logging) == null ? void 0 : le.logger
2018
+ ),
2019
+ onLayoutsChanged: new C(
2020
+ () => t.onLayoutsChanged,
2021
+ (de = t.logging) == null ? void 0 : de.logger
2022
+ ),
2023
+ onConnectorEvent: new C(
2024
+ () => t.onConnectorEvent,
2025
+ (ue = t.logging) == null ? void 0 : ue.logger
2026
+ ),
2027
+ onConnectorsChanged: new C(
2028
+ () => t.onConnectorsChanged,
2029
+ (ge = t.logging) == null ? void 0 : ge.logger
2030
+ ),
2031
+ onZoomChanged: new C(
2032
+ () => t.onZoomChanged,
2033
+ (ye = t.logging) == null ? void 0 : ye.logger
2034
+ ),
2035
+ onSelectedPageIdChanged: new C(
2036
+ () => t.onSelectedPageIdChanged,
2037
+ t.logging.logger
2038
+ ),
2039
+ onPagesChanged: new C(
2040
+ () => t.onPagesChanged,
2041
+ t.logging.logger
2042
+ ),
2043
+ onPageSnapshotInvalidated: new C(
2044
+ () => t.onPageSnapshotInvalidated,
2045
+ t.logging.logger
2046
+ ),
2047
+ onPageSizeChanged: new C(
2048
+ () => t.onPageSizeChanged,
2049
+ (pe = t.logging) == null ? void 0 : pe.logger
2050
+ ),
2051
+ onShapeCornerRadiusChanged: new C(
2052
+ () => t.onShapeCornerRadiusChanged,
2053
+ (Ce = t.logging) == null ? void 0 : Ce.logger
2054
+ ),
2055
+ onCropActiveFrameIdChanged: new C(
2056
+ () => t.onCropActiveFrameIdChanged,
2057
+ (me = t.logging) == null ? void 0 : me.logger
2058
+ ),
2059
+ onAsyncError: new C(
2060
+ () => t.onAsyncError,
2061
+ (we = t.logging) == null ? void 0 : we.logger
2062
+ ),
2063
+ onViewModeChanged: new C(
2064
+ () => t.onViewModeChanged,
2065
+ (fe = t.logging) == null ? void 0 : fe.logger
2066
+ ),
2067
+ onBarcodeValidationChanged: new C(() => t.onBarcodeValidationChanged, (Se = t.logging) == null ? void 0 : Se.logger),
2068
+ onDataSourceIdChanged: new C(
2069
+ () => t.onDataSourceIdChanged,
2070
+ t.logging.logger
2071
+ ),
2072
+ onDocumentIssueListChanged: new C(
2073
+ () => t.onDocumentIssueListChanged,
2074
+ t.logging.logger
2075
+ ),
2076
+ onCustomUndoDataChanged: new C(
2077
+ () => t.onCustomUndoDataChanged,
2078
+ t.logging.logger
2079
+ ),
2080
+ onEngineEditModeChanged: new C(
2081
+ () => t.onEngineEditModeChanged,
2082
+ t.logging.logger
2083
+ ),
2084
+ onBrandKitMediaChanged: new C(
2085
+ () => t.onBrandKitMediaChanged,
2086
+ t.logging.logger
2087
+ )
2088
+ }, t;
2089
+ }
2090
+ static isLoggingEnabled(i, t) {
2091
+ return t == x.info || t == x.warn && (i == x.warn || i == x.error) ? !0 : t == x.error && i == x.error;
2092
+ }
2093
+ }
2094
+ class Zr {
2095
+ /**
2096
+ * Checks if the given value is a `DatePropertyWrapper`.
2097
+ *
2098
+ * @param value The value to check.
2099
+ * @returns `true` if the value is a `DatePropertyWrapper`, otherwise `false`.
2100
+ */
2101
+ isDatePropertyWrapper(i) {
2102
+ return typeof i == "object" && (i == null ? void 0 : i.type) === "date";
2103
+ }
2104
+ /**
2105
+ * Checks if the given value is a `Date` object instance.
2106
+ *
2107
+ * @param value The value to check.
2108
+ * @returns `true` if the value is a `Date` object, otherwise `false`.
2109
+ */
2110
+ isDateObject(i) {
2111
+ return i instanceof Date;
2112
+ }
2113
+ /**
2114
+ * Transforms an `EngineDataItem` into a `DataItem`.
2115
+ *
2116
+ * Converts `DatePropertyWrapper` values to JavaScript `Date` objects
2117
+ * while keeping other values unchanged.
2118
+ *
2119
+ * @param dataItem the EngineDataItem to transform.
2120
+ * @returns the resulting `DataItem` with parsed date properties.
2121
+ */
2122
+ mapEngineToDataItem(i) {
2123
+ const t = {};
2124
+ return Object.entries(i).forEach(([e, r]) => {
2125
+ t[e] = this.isDatePropertyWrapper(r) ? new Date(r.value) : r;
2126
+ }), t;
2127
+ }
2128
+ /**
2129
+ * Transforms a `DataItem` into an `EngineDataItem`.
2130
+ *
2131
+ * Converts JavaScript `Date` objects to `DatePropertyWrapper` objects
2132
+ * while keeping other values unchanged.
2133
+ *
2134
+ * @param dataItem the `DataItem` to transform.
2135
+ * @returns the resulting `EngineDataItem` with parsed date properties.
2136
+ */
2137
+ mapDataItemToEngine(i) {
2138
+ const t = {};
2139
+ return Object.entries(i).forEach(([e, r]) => {
2140
+ t[e] = this.isDateObject(r) ? { value: r.getTime(), type: "date" } : r;
2141
+ }), t;
2142
+ }
2143
+ }
2144
+ var it;
2145
+ class Qr {
2146
+ /**
2147
+ * @ignore
2148
+ */
2149
+ constructor(i) {
2150
+ /**
2151
+ * @ignore
2152
+ */
2153
+ u(this, it);
2154
+ g(this, it, i);
2155
+ }
2156
+ /**
2157
+ * This method returns the value for a given configuration key. If a value was not found in the configuration store
2158
+ * this method returns an error. The key cannot be null.
2159
+ * @returns value for a given configuration key
2160
+ */
2161
+ async getValue(i) {
2162
+ return (await a(this, it)).getConfigValue(i).then((e) => o(e));
2163
+ }
2164
+ /**
2165
+ * This method sets, or overrides the value for a given key. Null values are not allowed for both key and value,
2166
+ * using them will result in an error.
2167
+ * @returns
2168
+ */
2169
+ async setValue(i, t) {
2170
+ return (await a(this, it)).setConfigValue(i, t).then((r) => o(r));
2171
+ }
2172
+ /**
2173
+ * This method updates the studio options. Only defined options are updated, null values are ignored.
2174
+ * @returns
2175
+ */
2176
+ async updateStudioOptions(i) {
2177
+ return (await a(this, it)).updateStudioOptions(JSON.stringify(i)).then((e) => o(e));
2178
+ }
2179
+ /**
2180
+ * This method returns the engine session id. This id is unique for this engine session
2181
+ * @returns the engine session id
2182
+ */
2183
+ async getEngineSessionId() {
2184
+ return (await a(this, it)).getEngineSessionId().then((t) => o(t));
2185
+ }
2186
+ }
2187
+ it = new WeakMap();
2188
+ var Dt;
2189
+ class ns extends Qr {
2190
+ /**
2191
+ * @ignore
2192
+ */
2193
+ constructor(t, e) {
2194
+ super(t);
2195
+ /**
2196
+ * @ignore
2197
+ */
2198
+ u(this, Dt);
2199
+ g(this, Dt, e);
2200
+ }
2201
+ /**
2202
+ * This method returns the value for a given configuration key. If a value was not found in the configuration store,
2203
+ * this method returns an error. The key cannot be null.
2204
+ * @returns value for a given configuration key
2205
+ */
2206
+ async getValue(t) {
2207
+ const e = a(this, Dt).get(t);
2208
+ return e != null ? o(
2209
+ {
2210
+ status: 200,
2211
+ success: !0,
2212
+ parsedData: e,
2213
+ data: e
2214
+ },
2215
+ !1
2216
+ ) : super.getValue(t);
2217
+ }
2218
+ /**
2219
+ * This method sets or overrides the value for a given key.
2220
+ * Null values are not allowed for both key and value,
2221
+ * using them will result in an error.
2222
+ * @returns
2223
+ */
2224
+ async setValue(t, e) {
2225
+ const r = super.setValue(t, e);
2226
+ return a(this, Dt).set(t, e), r;
2227
+ }
2228
+ }
2229
+ Dt = new WeakMap();
2230
+ const Xr = "studio-cdn.chiligrafx.com", tn = `https://${Xr}/editor/${cs.current}/web`;
2231
+ let Q;
2232
+ class Nn {
2233
+ /**
2234
+ * The SDK should be configured clientside and it exposes all controllers to work with in other applications
2235
+ * @param config The configuration object where the SDK and editor can get configured
2236
+ */
2237
+ constructor(i) {
2238
+ this.localConfig = /* @__PURE__ */ new Map(), this.dataItemMappingTools = new Zr(), this.loadEditor = () => {
2239
+ var t;
2240
+ Ws(
2241
+ this.config.editorLink || tn,
2242
+ {
2243
+ onActionsChanged: this.subscriber.onActionsChanged,
2244
+ onStateChanged: this.subscriber.onStateChanged,
2245
+ onAuthExpired: this.subscriber.onAuthExpired,
2246
+ onViewportRequested: this.subscriber.onViewportRequested,
2247
+ onDocumentLoaded: this.subscriber.onDocumentLoaded,
2248
+ onSelectedFramesContentChanged: this.subscriber.onSelectedFramesContentChanged,
2249
+ onSelectedFramesLayoutChanged: this.subscriber.onSelectedFramesLayoutChanged,
2250
+ onFramesLayoutChanged: this.subscriber.onFramesLayoutChanged,
2251
+ onSelectedLayoutPropertiesChanged: this.subscriber.onSelectedLayoutPropertiesChanged,
2252
+ onSelectedLayoutUnitChanged: this.subscriber.onSelectedLayoutUnitChanged,
2253
+ onPageSelectionChanged: this.subscriber.onPageSelectionChanged,
2254
+ onScrubberPositionChanged: this.subscriber.onAnimationPlaybackChanged,
2255
+ onFrameAnimationsChanged: this.subscriber.onAnimationChanged,
2256
+ onVariableListChanged: (e) => {
2257
+ var r;
2258
+ (r = this.enabledNextSubscribers) != null && r.onVariableListChanged ? this.next.subscriber.onVariableListChanged(e) : this.subscriber.onVariableListChanged(e);
2259
+ },
2260
+ onSelectedToolChanged: this.subscriber.onSelectedToolChanged,
2261
+ onUndoStateChanged: this.subscriber.onUndoStateChanged,
2262
+ onSelectedLayoutFramesChanged: this.subscriber.onSelectedLayoutFramesChanged,
2263
+ onSelectedTextStyleChanged: this.subscriber.onSelectedTextStyleChanged,
2264
+ onColorsChanged: this.subscriber.onColorsChanged,
2265
+ onParagraphStylesChanged: this.subscriber.onParagraphStylesChanged,
2266
+ onCharacterStylesChanged: this.subscriber.onCharacterStylesChanged,
2267
+ onFontFamiliesChanged: this.subscriber.onFontFamiliesChanged,
2268
+ onSelectedLayoutIdChanged: this.subscriber.onSelectedLayoutIdChanged,
2269
+ onLayoutsChanged: this.subscriber.onLayoutsChanged,
2270
+ onConnectorEvent: this.subscriber.onConnectorEvent,
2271
+ onConnectorsChanged: (e) => {
2272
+ var r;
2273
+ (r = this.enabledNextSubscribers) != null && r.onConnectorsChanged ? this.next.subscriber.onConnectorsChanged(e) : this.subscriber.onConnectorsChanged(e);
2274
+ },
2275
+ onZoomChanged: this.subscriber.onZoomChanged,
2276
+ onSelectedPageIdChanged: this.subscriber.onSelectedPageIdChanged,
2277
+ onPagesChanged: this.subscriber.onPagesChanged,
2278
+ onPageSnapshotInvalidated: this.subscriber.onPageSnapshotInvalidated,
2279
+ onPageSizeChanged: (e) => {
2280
+ var r;
2281
+ (r = this.enabledNextSubscribers) != null && r.onPageSizeChanged ? this.next.subscriber.onPageSizeChanged(e) : this.subscriber.onPageSizeChanged(e);
2282
+ },
2283
+ onShapeCornerRadiusChanged: this.subscriber.onShapeCornerRadiusChanged,
2284
+ onCropActiveFrameIdChanged: this.subscriber.onCropActiveFrameIdChanged,
2285
+ onAsyncError: this.subscriber.onAsyncError,
2286
+ onViewModeChanged: this.subscriber.onViewModeChanged,
2287
+ onBarcodeValidationChanged: this.subscriber.onBarcodeValidationChanged,
2288
+ onDataSourceIdChanged: this.subscriber.onDataSourceIdChanged,
2289
+ onDocumentIssueListChanged: this.subscriber.onDocumentIssueListChanged,
2290
+ onCustomUndoDataChanged: this.subscriber.onCustomUndoDataChanged,
2291
+ onEngineEditModeChanged: this.subscriber.onEngineEditModeChanged,
2292
+ onBrandKitMediaChanged: this.subscriber.onBrandKitMediaChanged
2293
+ },
2294
+ this.setConnection,
2295
+ this.config.editorId,
2296
+ this.config.studioStyling
2297
+ ), this.editorAPI = Q == null ? void 0 : Q.promise.then((e) => e), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new Ke(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.utils = new ts(this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new je(this.editorAPI), this.debug = new Te(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Be(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new xe(this.editorAPI), this.mediaConnector = new qe(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.connector = new Je(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.shape = new ee(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new ze(), this.clipboard = new Re(this.editorAPI), this.brandKit = new Me(this.editorAPI, this), this.next = new ss(this.config, this.connection, this.editorAPI), this.configuration.setValue(Z.GraFxStudioSdkVersion, hs.version), this.configuration.setValue(
2298
+ Z.GraFxStudioDocumentType,
2299
+ this.config.documentType || gs.template
2300
+ ), this.configuration.updateStudioOptions(this.config.studioOptions || qs), this.configuration.setValue(
2301
+ Z.QueryCallCacheEnabled,
2302
+ ((t = this.config.enableQueryCallCache) == null ? void 0 : t.toString()) || "false"
2303
+ );
2304
+ }, this.setConnection = (t) => {
2305
+ Q = t;
2306
+ }, this.config = ie.createRuntimeConfig(i), this.connection = Q, this.editorAPI = Q == null ? void 0 : Q.promise.then((t) => t), this.action = new Ae(this.editorAPI), this.layout = new We(this.editorAPI), this.frame = new Ke(this.editorAPI), this.shape = new ee(this.editorAPI), this.barcode = new Ee(this.editorAPI), this.undoManager = new Xe(this.editorAPI, this), this.connector = new Je(this.editorAPI, this.localConfig), this.mediaConnector = new qe(this.editorAPI), this.fontConnector = new _e(this.editorAPI), this.dataConnector = new Ue(this.editorAPI, this.dataItemMappingTools), this.dataSource = new ke(this.editorAPI, this.dataItemMappingTools), this.animation = new Fe(this.editorAPI), this.document = new Ge(this.editorAPI), this.configuration = new ns(this.editorAPI, this.localConfig), this.variable = new es(this.editorAPI), this.utils = new ts(this.localConfig), this.subscriber = new Ur(this.config, this.localConfig), this.tool = new Qe(this.editorAPI), this.page = new je(this.editorAPI), this.debug = new Te(this.editorAPI), this.textSelection = new Ze(this.editorAPI), this.colorStyle = new Be(this.editorAPI), this.paragraphStyle = new Ye(this.editorAPI), this.characterStyle = new xe(this.editorAPI), this.font = new $e(this.editorAPI), this.experiment = new He(this.editorAPI), this.canvas = new Qt(this.editorAPI), this.colorConversion = new Ve(this.editorAPI), this.info = new ze(), this.clipboard = new Re(this.editorAPI), this.next = new ss(this.config, this.connection, this.editorAPI), this.enabledNextSubscribers = this.config.enableNextSubscribers, this.brandKit = new Me(this.editorAPI, this);
2307
+ }
2308
+ }
2309
+ var en = /* @__PURE__ */ ((s) => (s.top = "top", s.left = "left", s.right = "right", s.bottom = "bottom", s.topLeft = "topLeft", s.topRight = "topRight", s.bottomLeft = "bottomLeft", s.bottomRight = "bottomRight", s))(en || {}), sn = /* @__PURE__ */ ((s) => (s.horizontal = "horizontal", s.vertical = "vertical", s))(sn || {}), rn = /* @__PURE__ */ ((s) => (s.easeIn = "easeIn", s.easeOut = "easeOut", s.easeInOut = "easeInOut", s))(rn || {}), nn = /* @__PURE__ */ ((s) => (s.quadratic = "Quadratic", s.cubic = "Cubic", s.quartic = "Quartic", s.quintic = "Quintic", s.sine = "Sine", s.exponential = "Exponential", s.circular = "Circular", s.elastic = "Elastic", s.bounce = "Bounce", s.back = "Back", s))(nn || {}), an = /* @__PURE__ */ ((s) => (s.bounce = "bounce", s.flash = "flash", s.headshake = "headShake", s.heartbeat = "heartbeat", s.pulse = "pulse", s.rubberBand = "rubberBand", s.vertical = "vertical", s.horizontal = "horizontal", s.swing = "swing", s.tada = "tada", s))(an || {}), on = /* @__PURE__ */ ((s) => (s.preview = "preview", s.normal = "normal", s))(on || {}), cn = /* @__PURE__ */ ((s) => (s.Square = "square", s.Line = "line", s))(cn || {}), hn = /* @__PURE__ */ ((s) => (s.BOLD = "Bold", s.ITALIC = "Italic", s.REGULAR = "Regular", s))(hn || {}), ln = /* @__PURE__ */ ((s) => (s.LEFT = "left", s.CENTER = "center", s.RIGHT = "right", s.JUSTIFY = "justify", s))(ln || {}), dn = /* @__PURE__ */ ((s) => (s.TOP = "top", s.CENTER = "center", s.BOTTOM = "bottom", s))(dn || {}), un = /* @__PURE__ */ ((s) => (s.TO_LOWER_CASE = "lowercase", s.TO_UPPER_CASE = "uppercase", s.NORMAL = "normal", s))(un || {}), gn = /* @__PURE__ */ ((s) => (s.SUPERSCRIPT = "superscript", s.SUBSCRIPT = "subscript", s.NORMAL = "normal", s))(gn || {}), yn = /* @__PURE__ */ ((s) => (s.STYLE = "textStyle", s.PROPERTIES = "textProperties", s.APPEARANCE = "appearance", s))(yn || {}), pn = /* @__PURE__ */ ((s) => (s.PARAGRAPH = "paragraphStyleId", s.CHARACTER = "characterStyleId", s.FONT_FAMILY = "fontKey", s.FONT_STYLE = "fontStyle", s.FONT_SIZE = "fontSize", s.LETTER_SPACING = "letterSpacing", s.LINE_HEIGHT = "lineHeight", s.TEXT_ALIGN = "textAlign", s.VERTICAL_ALIGN = "verticalAlign", s.TYPOGRAPHIC_CASE = "typographicCase", s.SUB_SUPER_SCRIPT = "subSuperScript", s.UNDERLINE = "underline", s.LINE_THROUGH = "lineThrough", s.FILL_COLOR = "fillColor", s.COLOR = "color", s.FILL_COLOR_APPLIED = "fillColorApplied", s.STROKE_COLOR = "strokeColor", s.STROKE_COLOR_APPLIED = "strokeColorApplied", s.DROP_SHADOW_COLOR = "dropShadowColor", s.BLEND_MODE = "blendMode", s.OPACITY = "opacity", s.TRACKING_RIGHT = "trackingRight", s.BASELINE_SHIFT = "baselineShiftValue", s.STROKE_WIDTH = "strokeWidth", s))(pn || {}), Cn = /* @__PURE__ */ ((s) => (s.selectedLayoutChanged = "selectedLayoutChanged", s.frameMoved = "frameMoved", s.pageSizeChanged = "pageSizeChanged", s.documentLoaded = "documentLoaded", s.variableValueChanged = "variableValueChanged", s))(Cn || {}), mn = /* @__PURE__ */ ((s) => (s.ellipse = "ellipse", s.rectangle = "rectangle", s.polygon = "polygon", s))(mn || {}), wn = /* @__PURE__ */ ((s) => (s.all = "all", s.only = "only", s.none = "none", s))(wn || {}), fn = /* @__PURE__ */ ((s) => (s.normal = "normal", s.textEdit = "textEdit", s.customCrop = "customCrop", s.frameSubjectArea = "frameSubjectArea", s.perAssetCrop = "perAssetCrop", s))(fn || {}), Ss = /* @__PURE__ */ ((s) => (s.url = "url", s.grafx = "grafx", s.local = "local", s))(Ss || {});
2310
+ const Mn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2311
+ __proto__: null,
2312
+ ConnectorRegistrationSource: Ss
2313
+ }, Symbol.toStringTag, { value: "Module" }));
2314
+ export {
2315
+ Mr as ActionAsyncError,
2316
+ Cn as ActionEditorEvent,
2317
+ ln as Alignment,
2318
+ Nr as AnchorTargetEdgeType,
2319
+ Or as AnchorTargetType,
2320
+ pr as AuthCredentialsTypeEnum,
2321
+ Cr as AuthRefreshTypeEnum,
2322
+ fr as AutoGrowDirection,
2323
+ ft as BarcodeCharacterSet,
2324
+ Ot as BarcodeErrorCorrectionLevel,
2325
+ br as BarcodeSourceTypeEnum,
2326
+ G as BarcodeType,
2327
+ Qs as BarcodeValidationResult,
2328
+ an as BasicAnimationsEmphasisStyles,
2329
+ Ar as BlendMode,
2330
+ un as Case,
2331
+ z as ColorType,
2332
+ ys as ColorUsageType,
2333
+ dr as ConnectorConfigContextType,
2334
+ lr as ConnectorConfigValueType,
2335
+ yr as ConnectorEventType,
2336
+ Zs as ConnectorHttpError,
2337
+ bn as ConnectorMapping,
2338
+ gr as ConnectorMappingDirection,
2339
+ ur as ConnectorMappingSource,
2340
+ Nt as ConnectorRegistrationSource,
2341
+ te as ConnectorStateType,
2342
+ or as ConnectorType,
2343
+ wn as CornerRadiusType,
2344
+ Cs as CropType,
2345
+ xr as DataRowAsyncError,
2346
+ Rr as Day,
2347
+ Xt as DeprecatedMediaConnectorDownloadType,
2348
+ Rt as DeprecatedMediaType,
2349
+ js as DocumentIssueTypeEnum,
2350
+ gs as DocumentType,
2351
+ Gr as DownloadFormats,
2352
+ rn as EaseTypes,
2353
+ fn as EngineEditModeType,
2354
+ re as EnvironmentType,
2355
+ Fr as FitMode,
2356
+ Er as FitModePosition,
2357
+ vr as FlowDirection,
2358
+ cn as FontPreviewFormat,
2359
+ hn as FontWeights,
2360
+ En as FrameAnchorTarget,
2361
+ Lr as FrameAnchorType,
2362
+ kr as FramePropertyNames,
2363
+ Sr as FrameTypeEnum,
2364
+ vn as GrafxTokenAuthCredentials,
2365
+ zt as ImageSourceTypeEnum,
2366
+ er as LayoutIntent,
2367
+ Tr as LayoutPropertyNames,
2368
+ Xs as LayoutType,
2369
+ Vr as Locale,
2370
+ tr as MeasurementUnit,
2371
+ ms as MediaDownloadIntent,
2372
+ se as MediaDownloadType,
2373
+ Vt as MediaType,
2374
+ Mn as Next,
2375
+ Fn as PageAnchorTarget,
2376
+ Y as PositionEnum,
2377
+ Pn as RefreshedAuthCredendentials,
2378
+ gn as Scripting,
2379
+ yn as SelectedTextStyleSections,
2380
+ pn as SelectedTextStyles,
2381
+ sn as ShakeDirections,
2382
+ mn as ShapeType,
2383
+ en as SlideDirections,
2384
+ cr as SortBy,
2385
+ hr as SortOrder,
2386
+ Ir as TextDirection,
2387
+ dn as TextPosition,
2388
+ H as ToolType,
2389
+ nn as TweenTypes,
2390
+ Dr as UpdateZIndexMethod,
2391
+ mr as UploadAssetValidationError,
2392
+ ps as UploadAssetValidationErrorType,
2393
+ ae as VariableType,
2394
+ Jr as VariableVisibilityOperator,
2395
+ Br as VariableVisibilityTargetType,
2396
+ Mt as VariableVisibilityType,
2397
+ Pr as VerticalAlign,
2398
+ on as ViewMode,
2399
+ Z as WellKnownConfigurationKeys,
2400
+ Nn as default,
2401
+ In as grafxMediaConnectorRegistration
2402
+ };
2403
+ //# sourceMappingURL=main.es.js.map