@zipify/wysiwyg 1.2.0 → 1.2.1-2

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 (1153) hide show
  1. package/.github/actions/lint-css/action.yaml +1 -3
  2. package/dist/cli.js +3 -3
  3. package/dist/wysiwyg.css +24 -25
  4. package/dist/wysiwyg.mjs +641 -618
  5. package/jest.config.js +3 -0
  6. package/lib/components/base/Modal.vue +21 -2
  7. package/lib/components/base/__tests__/Modal.test.js +1 -0
  8. package/lib/components/toolbar/controls/link/LinkControl.vue +22 -10
  9. package/lib/components/toolbar/controls/link/LinkControlHeader.vue +3 -3
  10. package/lib/components/toolbar/controls/link/__tests__/LinkControl.test.js +8 -8
  11. package/lib/components/toolbar/controls/link/__tests__/LinkControlHeader.test.js +1 -1
  12. package/lib/components/toolbar/controls/link/composables/useLink.js +10 -6
  13. package/lib/composables/__tests__/__snapshots__/useEditor.test.js.snap +1 -1
  14. package/lib/composables/useEditor.js +4 -3
  15. package/lib/enums/TextSettings.js +2 -0
  16. package/lib/extensions/FontStyle.js +2 -2
  17. package/lib/extensions/FontWeight.js +2 -0
  18. package/lib/extensions/Link.js +13 -15
  19. package/lib/extensions/StylePreset.js +33 -3
  20. package/lib/extensions/TextDecoration.js +6 -12
  21. package/lib/extensions/__tests__/FontFamily.test.js +7 -6
  22. package/lib/extensions/__tests__/FontWeight.test.js +19 -10
  23. package/lib/extensions/__tests__/StylePreset.test.js +52 -2
  24. package/lib/extensions/__tests__/TextDecoration.test.js +11 -40
  25. package/lib/extensions/__tests__/__snapshots__/Alignment.test.js.snap +2 -2
  26. package/lib/extensions/__tests__/__snapshots__/BackgroundColor.test.js.snap +1 -1
  27. package/lib/extensions/__tests__/__snapshots__/FontColor.test.js.snap +1 -1
  28. package/lib/extensions/__tests__/__snapshots__/FontFamily.test.js.snap +19 -1
  29. package/lib/extensions/__tests__/__snapshots__/FontSize.test.js.snap +2 -2
  30. package/lib/extensions/__tests__/__snapshots__/FontStyle.test.js.snap +17 -1
  31. package/lib/extensions/__tests__/__snapshots__/FontWeight.test.js.snap +26 -1
  32. package/lib/extensions/__tests__/__snapshots__/LineHeight.test.js.snap +2 -2
  33. package/lib/extensions/__tests__/__snapshots__/Margin.test.js.snap +2 -2
  34. package/lib/extensions/__tests__/__snapshots__/StylePreset.test.js.snap +22 -2
  35. package/lib/extensions/__tests__/__snapshots__/TextDecoration.test.js.snap +3 -46
  36. package/package.json +23 -28
  37. package/config/build/lambda.config.js +0 -39
  38. package/dist/lambda-to-json.zip +0 -0
  39. package/lib/components/toolbar/controls/link/LinkControlApply.vue +0 -35
  40. package/lib/entry-lambda-to-json.js +0 -8
  41. package/node_modules_lambda/.bin/acorn +0 -4
  42. package/node_modules_lambda/.bin/escodegen +0 -77
  43. package/node_modules_lambda/.bin/esgenerate +0 -64
  44. package/node_modules_lambda/.bin/esparse +0 -139
  45. package/node_modules_lambda/.bin/esvalidate +0 -236
  46. package/node_modules_lambda/.package-lock.json +0 -602
  47. package/node_modules_lambda/@tootallnate/once/LICENSE +0 -21
  48. package/node_modules_lambda/@tootallnate/once/README.md +0 -93
  49. package/node_modules_lambda/@tootallnate/once/dist/index.d.ts +0 -7
  50. package/node_modules_lambda/@tootallnate/once/dist/index.js +0 -24
  51. package/node_modules_lambda/@tootallnate/once/dist/index.js.map +0 -1
  52. package/node_modules_lambda/@tootallnate/once/dist/overloaded-parameters.d.ts +0 -231
  53. package/node_modules_lambda/@tootallnate/once/dist/overloaded-parameters.js +0 -3
  54. package/node_modules_lambda/@tootallnate/once/dist/overloaded-parameters.js.map +0 -1
  55. package/node_modules_lambda/@tootallnate/once/dist/types.d.ts +0 -17
  56. package/node_modules_lambda/@tootallnate/once/dist/types.js +0 -3
  57. package/node_modules_lambda/@tootallnate/once/dist/types.js.map +0 -1
  58. package/node_modules_lambda/@tootallnate/once/package.json +0 -52
  59. package/node_modules_lambda/abab/LICENSE.md +0 -13
  60. package/node_modules_lambda/abab/README.md +0 -51
  61. package/node_modules_lambda/abab/index.d.ts +0 -2
  62. package/node_modules_lambda/abab/index.js +0 -9
  63. package/node_modules_lambda/abab/lib/atob.js +0 -101
  64. package/node_modules_lambda/abab/lib/btoa.js +0 -62
  65. package/node_modules_lambda/abab/package.json +0 -42
  66. package/node_modules_lambda/acorn/CHANGELOG.md +0 -798
  67. package/node_modules_lambda/acorn/LICENSE +0 -21
  68. package/node_modules_lambda/acorn/README.md +0 -273
  69. package/node_modules_lambda/acorn/bin/acorn +0 -4
  70. package/node_modules_lambda/acorn/dist/acorn.d.ts +0 -252
  71. package/node_modules_lambda/acorn/dist/acorn.js +0 -5608
  72. package/node_modules_lambda/acorn/dist/acorn.mjs +0 -5577
  73. package/node_modules_lambda/acorn/dist/acorn.mjs.d.ts +0 -2
  74. package/node_modules_lambda/acorn/dist/bin.js +0 -91
  75. package/node_modules_lambda/acorn/package.json +0 -50
  76. package/node_modules_lambda/acorn-globals/LICENSE +0 -19
  77. package/node_modules_lambda/acorn-globals/README.md +0 -81
  78. package/node_modules_lambda/acorn-globals/index.js +0 -179
  79. package/node_modules_lambda/acorn-globals/node_modules/.bin/acorn +0 -4
  80. package/node_modules_lambda/acorn-globals/node_modules/acorn/CHANGELOG.md +0 -620
  81. package/node_modules_lambda/acorn-globals/node_modules/acorn/LICENSE +0 -21
  82. package/node_modules_lambda/acorn-globals/node_modules/acorn/README.md +0 -269
  83. package/node_modules_lambda/acorn-globals/node_modules/acorn/bin/acorn +0 -4
  84. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.d.ts +0 -209
  85. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.js +0 -5186
  86. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.js.map +0 -1
  87. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs +0 -5155
  88. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs.d.ts +0 -2
  89. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/acorn.mjs.map +0 -1
  90. package/node_modules_lambda/acorn-globals/node_modules/acorn/dist/bin.js +0 -64
  91. package/node_modules_lambda/acorn-globals/node_modules/acorn/package.json +0 -35
  92. package/node_modules_lambda/acorn-globals/package.json +0 -35
  93. package/node_modules_lambda/acorn-walk/CHANGELOG.md +0 -131
  94. package/node_modules_lambda/acorn-walk/LICENSE +0 -19
  95. package/node_modules_lambda/acorn-walk/README.md +0 -126
  96. package/node_modules_lambda/acorn-walk/dist/walk.d.ts +0 -112
  97. package/node_modules_lambda/acorn-walk/dist/walk.js +0 -463
  98. package/node_modules_lambda/acorn-walk/dist/walk.js.map +0 -1
  99. package/node_modules_lambda/acorn-walk/dist/walk.mjs +0 -443
  100. package/node_modules_lambda/acorn-walk/dist/walk.mjs.map +0 -1
  101. package/node_modules_lambda/acorn-walk/package.json +0 -34
  102. package/node_modules_lambda/agent-base/README.md +0 -145
  103. package/node_modules_lambda/agent-base/dist/src/index.d.ts +0 -78
  104. package/node_modules_lambda/agent-base/dist/src/index.js +0 -203
  105. package/node_modules_lambda/agent-base/dist/src/index.js.map +0 -1
  106. package/node_modules_lambda/agent-base/dist/src/promisify.d.ts +0 -4
  107. package/node_modules_lambda/agent-base/dist/src/promisify.js +0 -18
  108. package/node_modules_lambda/agent-base/dist/src/promisify.js.map +0 -1
  109. package/node_modules_lambda/agent-base/package.json +0 -64
  110. package/node_modules_lambda/agent-base/src/index.ts +0 -345
  111. package/node_modules_lambda/agent-base/src/promisify.ts +0 -33
  112. package/node_modules_lambda/asynckit/LICENSE +0 -21
  113. package/node_modules_lambda/asynckit/README.md +0 -233
  114. package/node_modules_lambda/asynckit/bench.js +0 -76
  115. package/node_modules_lambda/asynckit/index.js +0 -6
  116. package/node_modules_lambda/asynckit/lib/abort.js +0 -29
  117. package/node_modules_lambda/asynckit/lib/async.js +0 -34
  118. package/node_modules_lambda/asynckit/lib/defer.js +0 -26
  119. package/node_modules_lambda/asynckit/lib/iterate.js +0 -75
  120. package/node_modules_lambda/asynckit/lib/readable_asynckit.js +0 -91
  121. package/node_modules_lambda/asynckit/lib/readable_parallel.js +0 -25
  122. package/node_modules_lambda/asynckit/lib/readable_serial.js +0 -25
  123. package/node_modules_lambda/asynckit/lib/readable_serial_ordered.js +0 -29
  124. package/node_modules_lambda/asynckit/lib/state.js +0 -37
  125. package/node_modules_lambda/asynckit/lib/streamify.js +0 -141
  126. package/node_modules_lambda/asynckit/lib/terminator.js +0 -29
  127. package/node_modules_lambda/asynckit/package.json +0 -63
  128. package/node_modules_lambda/asynckit/parallel.js +0 -43
  129. package/node_modules_lambda/asynckit/serial.js +0 -17
  130. package/node_modules_lambda/asynckit/serialOrdered.js +0 -75
  131. package/node_modules_lambda/asynckit/stream.js +0 -21
  132. package/node_modules_lambda/browser-process-hrtime/LICENSE +0 -9
  133. package/node_modules_lambda/browser-process-hrtime/README.md +0 -27
  134. package/node_modules_lambda/browser-process-hrtime/index.d.ts +0 -4
  135. package/node_modules_lambda/browser-process-hrtime/index.js +0 -28
  136. package/node_modules_lambda/browser-process-hrtime/package.json +0 -15
  137. package/node_modules_lambda/combined-stream/License +0 -19
  138. package/node_modules_lambda/combined-stream/Readme.md +0 -138
  139. package/node_modules_lambda/combined-stream/lib/combined_stream.js +0 -208
  140. package/node_modules_lambda/combined-stream/package.json +0 -25
  141. package/node_modules_lambda/combined-stream/yarn.lock +0 -17
  142. package/node_modules_lambda/cssom/LICENSE.txt +0 -20
  143. package/node_modules_lambda/cssom/README.mdown +0 -67
  144. package/node_modules_lambda/cssom/lib/CSSConditionRule.js +0 -25
  145. package/node_modules_lambda/cssom/lib/CSSDocumentRule.js +0 -39
  146. package/node_modules_lambda/cssom/lib/CSSFontFaceRule.js +0 -36
  147. package/node_modules_lambda/cssom/lib/CSSGroupingRule.js +0 -68
  148. package/node_modules_lambda/cssom/lib/CSSHostRule.js +0 -37
  149. package/node_modules_lambda/cssom/lib/CSSImportRule.js +0 -132
  150. package/node_modules_lambda/cssom/lib/CSSKeyframeRule.js +0 -37
  151. package/node_modules_lambda/cssom/lib/CSSKeyframesRule.js +0 -39
  152. package/node_modules_lambda/cssom/lib/CSSMediaRule.js +0 -53
  153. package/node_modules_lambda/cssom/lib/CSSOM.js +0 -3
  154. package/node_modules_lambda/cssom/lib/CSSRule.js +0 -43
  155. package/node_modules_lambda/cssom/lib/CSSStyleDeclaration.js +0 -148
  156. package/node_modules_lambda/cssom/lib/CSSStyleRule.js +0 -190
  157. package/node_modules_lambda/cssom/lib/CSSStyleSheet.js +0 -88
  158. package/node_modules_lambda/cssom/lib/CSSSupportsRule.js +0 -36
  159. package/node_modules_lambda/cssom/lib/CSSValue.js +0 -43
  160. package/node_modules_lambda/cssom/lib/CSSValueExpression.js +0 -344
  161. package/node_modules_lambda/cssom/lib/MatcherList.js +0 -62
  162. package/node_modules_lambda/cssom/lib/MediaList.js +0 -61
  163. package/node_modules_lambda/cssom/lib/StyleSheet.js +0 -17
  164. package/node_modules_lambda/cssom/lib/clone.js +0 -74
  165. package/node_modules_lambda/cssom/lib/index.js +0 -23
  166. package/node_modules_lambda/cssom/lib/parse.js +0 -465
  167. package/node_modules_lambda/cssom/package.json +0 -18
  168. package/node_modules_lambda/cssstyle/LICENSE +0 -20
  169. package/node_modules_lambda/cssstyle/README.md +0 -15
  170. package/node_modules_lambda/cssstyle/lib/CSSStyleDeclaration.js +0 -260
  171. package/node_modules_lambda/cssstyle/lib/CSSStyleDeclaration.test.js +0 -556
  172. package/node_modules_lambda/cssstyle/lib/allExtraProperties.js +0 -67
  173. package/node_modules_lambda/cssstyle/lib/allProperties.js +0 -462
  174. package/node_modules_lambda/cssstyle/lib/allWebkitProperties.js +0 -194
  175. package/node_modules_lambda/cssstyle/lib/constants.js +0 -6
  176. package/node_modules_lambda/cssstyle/lib/implementedProperties.js +0 -90
  177. package/node_modules_lambda/cssstyle/lib/named_colors.json +0 -152
  178. package/node_modules_lambda/cssstyle/lib/parsers.js +0 -722
  179. package/node_modules_lambda/cssstyle/lib/parsers.test.js +0 -139
  180. package/node_modules_lambda/cssstyle/lib/properties/azimuth.js +0 -67
  181. package/node_modules_lambda/cssstyle/lib/properties/background.js +0 -19
  182. package/node_modules_lambda/cssstyle/lib/properties/backgroundAttachment.js +0 -24
  183. package/node_modules_lambda/cssstyle/lib/properties/backgroundColor.js +0 -36
  184. package/node_modules_lambda/cssstyle/lib/properties/backgroundImage.js +0 -32
  185. package/node_modules_lambda/cssstyle/lib/properties/backgroundPosition.js +0 -58
  186. package/node_modules_lambda/cssstyle/lib/properties/backgroundRepeat.js +0 -32
  187. package/node_modules_lambda/cssstyle/lib/properties/border.js +0 -33
  188. package/node_modules_lambda/cssstyle/lib/properties/borderBottom.js +0 -17
  189. package/node_modules_lambda/cssstyle/lib/properties/borderBottomColor.js +0 -16
  190. package/node_modules_lambda/cssstyle/lib/properties/borderBottomStyle.js +0 -21
  191. package/node_modules_lambda/cssstyle/lib/properties/borderBottomWidth.js +0 -16
  192. package/node_modules_lambda/cssstyle/lib/properties/borderCollapse.js +0 -26
  193. package/node_modules_lambda/cssstyle/lib/properties/borderColor.js +0 -30
  194. package/node_modules_lambda/cssstyle/lib/properties/borderLeft.js +0 -17
  195. package/node_modules_lambda/cssstyle/lib/properties/borderLeftColor.js +0 -16
  196. package/node_modules_lambda/cssstyle/lib/properties/borderLeftStyle.js +0 -21
  197. package/node_modules_lambda/cssstyle/lib/properties/borderLeftWidth.js +0 -16
  198. package/node_modules_lambda/cssstyle/lib/properties/borderRight.js +0 -17
  199. package/node_modules_lambda/cssstyle/lib/properties/borderRightColor.js +0 -16
  200. package/node_modules_lambda/cssstyle/lib/properties/borderRightStyle.js +0 -21
  201. package/node_modules_lambda/cssstyle/lib/properties/borderRightWidth.js +0 -16
  202. package/node_modules_lambda/cssstyle/lib/properties/borderSpacing.js +0 -41
  203. package/node_modules_lambda/cssstyle/lib/properties/borderStyle.js +0 -38
  204. package/node_modules_lambda/cssstyle/lib/properties/borderTop.js +0 -17
  205. package/node_modules_lambda/cssstyle/lib/properties/borderTopColor.js +0 -16
  206. package/node_modules_lambda/cssstyle/lib/properties/borderTopStyle.js +0 -21
  207. package/node_modules_lambda/cssstyle/lib/properties/borderTopWidth.js +0 -17
  208. package/node_modules_lambda/cssstyle/lib/properties/borderWidth.js +0 -46
  209. package/node_modules_lambda/cssstyle/lib/properties/bottom.js +0 -14
  210. package/node_modules_lambda/cssstyle/lib/properties/clear.js +0 -16
  211. package/node_modules_lambda/cssstyle/lib/properties/clip.js +0 -47
  212. package/node_modules_lambda/cssstyle/lib/properties/color.js +0 -14
  213. package/node_modules_lambda/cssstyle/lib/properties/cssFloat.js +0 -12
  214. package/node_modules_lambda/cssstyle/lib/properties/flex.js +0 -45
  215. package/node_modules_lambda/cssstyle/lib/properties/flexBasis.js +0 -28
  216. package/node_modules_lambda/cssstyle/lib/properties/flexGrow.js +0 -19
  217. package/node_modules_lambda/cssstyle/lib/properties/flexShrink.js +0 -19
  218. package/node_modules_lambda/cssstyle/lib/properties/float.js +0 -12
  219. package/node_modules_lambda/cssstyle/lib/properties/floodColor.js +0 -14
  220. package/node_modules_lambda/cssstyle/lib/properties/font.js +0 -43
  221. package/node_modules_lambda/cssstyle/lib/properties/fontFamily.js +0 -33
  222. package/node_modules_lambda/cssstyle/lib/properties/fontSize.js +0 -38
  223. package/node_modules_lambda/cssstyle/lib/properties/fontStyle.js +0 -18
  224. package/node_modules_lambda/cssstyle/lib/properties/fontVariant.js +0 -18
  225. package/node_modules_lambda/cssstyle/lib/properties/fontWeight.js +0 -33
  226. package/node_modules_lambda/cssstyle/lib/properties/height.js +0 -24
  227. package/node_modules_lambda/cssstyle/lib/properties/left.js +0 -14
  228. package/node_modules_lambda/cssstyle/lib/properties/lightingColor.js +0 -14
  229. package/node_modules_lambda/cssstyle/lib/properties/lineHeight.js +0 -26
  230. package/node_modules_lambda/cssstyle/lib/properties/margin.js +0 -68
  231. package/node_modules_lambda/cssstyle/lib/properties/marginBottom.js +0 -13
  232. package/node_modules_lambda/cssstyle/lib/properties/marginLeft.js +0 -13
  233. package/node_modules_lambda/cssstyle/lib/properties/marginRight.js +0 -13
  234. package/node_modules_lambda/cssstyle/lib/properties/marginTop.js +0 -13
  235. package/node_modules_lambda/cssstyle/lib/properties/opacity.js +0 -14
  236. package/node_modules_lambda/cssstyle/lib/properties/outlineColor.js +0 -14
  237. package/node_modules_lambda/cssstyle/lib/properties/padding.js +0 -61
  238. package/node_modules_lambda/cssstyle/lib/properties/paddingBottom.js +0 -13
  239. package/node_modules_lambda/cssstyle/lib/properties/paddingLeft.js +0 -13
  240. package/node_modules_lambda/cssstyle/lib/properties/paddingRight.js +0 -13
  241. package/node_modules_lambda/cssstyle/lib/properties/paddingTop.js +0 -13
  242. package/node_modules_lambda/cssstyle/lib/properties/right.js +0 -14
  243. package/node_modules_lambda/cssstyle/lib/properties/stopColor.js +0 -14
  244. package/node_modules_lambda/cssstyle/lib/properties/textLineThroughColor.js +0 -14
  245. package/node_modules_lambda/cssstyle/lib/properties/textOverlineColor.js +0 -14
  246. package/node_modules_lambda/cssstyle/lib/properties/textUnderlineColor.js +0 -14
  247. package/node_modules_lambda/cssstyle/lib/properties/top.js +0 -14
  248. package/node_modules_lambda/cssstyle/lib/properties/webkitBorderAfterColor.js +0 -14
  249. package/node_modules_lambda/cssstyle/lib/properties/webkitBorderBeforeColor.js +0 -14
  250. package/node_modules_lambda/cssstyle/lib/properties/webkitBorderEndColor.js +0 -14
  251. package/node_modules_lambda/cssstyle/lib/properties/webkitBorderStartColor.js +0 -14
  252. package/node_modules_lambda/cssstyle/lib/properties/webkitColumnRuleColor.js +0 -14
  253. package/node_modules_lambda/cssstyle/lib/properties/webkitMatchNearestMailBlockquoteColor.js +0 -14
  254. package/node_modules_lambda/cssstyle/lib/properties/webkitTapHighlightColor.js +0 -14
  255. package/node_modules_lambda/cssstyle/lib/properties/webkitTextEmphasisColor.js +0 -14
  256. package/node_modules_lambda/cssstyle/lib/properties/webkitTextFillColor.js +0 -14
  257. package/node_modules_lambda/cssstyle/lib/properties/webkitTextStrokeColor.js +0 -14
  258. package/node_modules_lambda/cssstyle/lib/properties/width.js +0 -24
  259. package/node_modules_lambda/cssstyle/lib/properties.js +0 -1833
  260. package/node_modules_lambda/cssstyle/lib/utils/colorSpace.js +0 -21
  261. package/node_modules_lambda/cssstyle/lib/utils/getBasicPropertyDescriptor.js +0 -14
  262. package/node_modules_lambda/cssstyle/node_modules/cssom/LICENSE.txt +0 -20
  263. package/node_modules_lambda/cssstyle/node_modules/cssom/README.mdown +0 -67
  264. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSDocumentRule.js +0 -39
  265. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSFontFaceRule.js +0 -36
  266. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSHostRule.js +0 -37
  267. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSImportRule.js +0 -132
  268. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSKeyframeRule.js +0 -37
  269. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSKeyframesRule.js +0 -39
  270. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSMediaRule.js +0 -41
  271. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSOM.js +0 -3
  272. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSRule.js +0 -43
  273. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleDeclaration.js +0 -148
  274. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleRule.js +0 -190
  275. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSStyleSheet.js +0 -88
  276. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSSupportsRule.js +0 -36
  277. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSValue.js +0 -43
  278. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/CSSValueExpression.js +0 -344
  279. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/MatcherList.js +0 -62
  280. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/MediaList.js +0 -61
  281. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/StyleSheet.js +0 -17
  282. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/clone.js +0 -82
  283. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/index.js +0 -21
  284. package/node_modules_lambda/cssstyle/node_modules/cssom/lib/parse.js +0 -464
  285. package/node_modules_lambda/cssstyle/node_modules/cssom/package.json +0 -18
  286. package/node_modules_lambda/cssstyle/package.json +0 -72
  287. package/node_modules_lambda/data-urls/LICENSE.txt +0 -7
  288. package/node_modules_lambda/data-urls/README.md +0 -62
  289. package/node_modules_lambda/data-urls/lib/parser.js +0 -69
  290. package/node_modules_lambda/data-urls/lib/utils.js +0 -18
  291. package/node_modules_lambda/data-urls/node_modules/whatwg-url/LICENSE.txt +0 -21
  292. package/node_modules_lambda/data-urls/node_modules/whatwg-url/README.md +0 -106
  293. package/node_modules_lambda/data-urls/node_modules/whatwg-url/index.js +0 -27
  294. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/Function.js +0 -42
  295. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URL-impl.js +0 -209
  296. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URL.js +0 -442
  297. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URLSearchParams-impl.js +0 -130
  298. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/URLSearchParams.js +0 -472
  299. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/VoidFunction.js +0 -26
  300. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/encoding.js +0 -16
  301. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/infra.js +0 -26
  302. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/percent-encoding.js +0 -142
  303. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/url-state-machine.js +0 -1244
  304. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/urlencoded.js +0 -106
  305. package/node_modules_lambda/data-urls/node_modules/whatwg-url/lib/utils.js +0 -190
  306. package/node_modules_lambda/data-urls/node_modules/whatwg-url/package.json +0 -58
  307. package/node_modules_lambda/data-urls/node_modules/whatwg-url/webidl2js-wrapper.js +0 -7
  308. package/node_modules_lambda/data-urls/package.json +0 -54
  309. package/node_modules_lambda/debug/LICENSE +0 -20
  310. package/node_modules_lambda/debug/README.md +0 -481
  311. package/node_modules_lambda/debug/package.json +0 -59
  312. package/node_modules_lambda/debug/src/browser.js +0 -269
  313. package/node_modules_lambda/debug/src/common.js +0 -274
  314. package/node_modules_lambda/debug/src/index.js +0 -10
  315. package/node_modules_lambda/debug/src/node.js +0 -263
  316. package/node_modules_lambda/decimal.js/CHANGELOG.md +0 -231
  317. package/node_modules_lambda/decimal.js/LICENCE.md +0 -23
  318. package/node_modules_lambda/decimal.js/README.md +0 -246
  319. package/node_modules_lambda/decimal.js/decimal.d.ts +0 -300
  320. package/node_modules_lambda/decimal.js/decimal.js +0 -4934
  321. package/node_modules_lambda/decimal.js/decimal.mjs +0 -4898
  322. package/node_modules_lambda/decimal.js/package.json +0 -40
  323. package/node_modules_lambda/deep-is/.travis.yml +0 -5
  324. package/node_modules_lambda/deep-is/LICENSE +0 -22
  325. package/node_modules_lambda/deep-is/README.markdown +0 -70
  326. package/node_modules_lambda/deep-is/example/cmp.js +0 -11
  327. package/node_modules_lambda/deep-is/index.js +0 -102
  328. package/node_modules_lambda/deep-is/package.json +0 -58
  329. package/node_modules_lambda/deep-is/test/NaN.js +0 -16
  330. package/node_modules_lambda/deep-is/test/cmp.js +0 -23
  331. package/node_modules_lambda/deep-is/test/neg-vs-pos-0.js +0 -15
  332. package/node_modules_lambda/delayed-stream/License +0 -19
  333. package/node_modules_lambda/delayed-stream/Makefile +0 -7
  334. package/node_modules_lambda/delayed-stream/Readme.md +0 -141
  335. package/node_modules_lambda/delayed-stream/lib/delayed_stream.js +0 -107
  336. package/node_modules_lambda/delayed-stream/package.json +0 -27
  337. package/node_modules_lambda/domexception/LICENSE.txt +0 -21
  338. package/node_modules_lambda/domexception/README.md +0 -31
  339. package/node_modules_lambda/domexception/index.js +0 -7
  340. package/node_modules_lambda/domexception/lib/DOMException-impl.js +0 -22
  341. package/node_modules_lambda/domexception/lib/DOMException.js +0 -222
  342. package/node_modules_lambda/domexception/lib/Function.js +0 -42
  343. package/node_modules_lambda/domexception/lib/VoidFunction.js +0 -26
  344. package/node_modules_lambda/domexception/lib/legacy-error-codes.json +0 -24
  345. package/node_modules_lambda/domexception/lib/utils.js +0 -190
  346. package/node_modules_lambda/domexception/package.json +0 -42
  347. package/node_modules_lambda/domexception/webidl2js-wrapper.js +0 -15
  348. package/node_modules_lambda/escodegen/LICENSE.BSD +0 -21
  349. package/node_modules_lambda/escodegen/README.md +0 -84
  350. package/node_modules_lambda/escodegen/bin/escodegen.js +0 -77
  351. package/node_modules_lambda/escodegen/bin/esgenerate.js +0 -64
  352. package/node_modules_lambda/escodegen/escodegen.js +0 -2647
  353. package/node_modules_lambda/escodegen/node_modules/estraverse/.jshintrc +0 -16
  354. package/node_modules_lambda/escodegen/node_modules/estraverse/LICENSE.BSD +0 -19
  355. package/node_modules_lambda/escodegen/node_modules/estraverse/README.md +0 -153
  356. package/node_modules_lambda/escodegen/node_modules/estraverse/estraverse.js +0 -805
  357. package/node_modules_lambda/escodegen/node_modules/estraverse/gulpfile.js +0 -70
  358. package/node_modules_lambda/escodegen/node_modules/estraverse/package.json +0 -40
  359. package/node_modules_lambda/escodegen/node_modules/levn/LICENSE +0 -22
  360. package/node_modules_lambda/escodegen/node_modules/levn/README.md +0 -196
  361. package/node_modules_lambda/escodegen/node_modules/levn/lib/cast.js +0 -298
  362. package/node_modules_lambda/escodegen/node_modules/levn/lib/coerce.js +0 -285
  363. package/node_modules_lambda/escodegen/node_modules/levn/lib/index.js +0 -22
  364. package/node_modules_lambda/escodegen/node_modules/levn/lib/parse-string.js +0 -113
  365. package/node_modules_lambda/escodegen/node_modules/levn/lib/parse.js +0 -102
  366. package/node_modules_lambda/escodegen/node_modules/levn/package.json +0 -47
  367. package/node_modules_lambda/escodegen/node_modules/optionator/CHANGELOG.md +0 -56
  368. package/node_modules_lambda/escodegen/node_modules/optionator/LICENSE +0 -22
  369. package/node_modules_lambda/escodegen/node_modules/optionator/README.md +0 -238
  370. package/node_modules_lambda/escodegen/node_modules/optionator/lib/help.js +0 -260
  371. package/node_modules_lambda/escodegen/node_modules/optionator/lib/index.js +0 -465
  372. package/node_modules_lambda/escodegen/node_modules/optionator/lib/util.js +0 -54
  373. package/node_modules_lambda/escodegen/node_modules/optionator/package.json +0 -44
  374. package/node_modules_lambda/escodegen/node_modules/prelude-ls/CHANGELOG.md +0 -99
  375. package/node_modules_lambda/escodegen/node_modules/prelude-ls/LICENSE +0 -22
  376. package/node_modules_lambda/escodegen/node_modules/prelude-ls/README.md +0 -15
  377. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Func.js +0 -65
  378. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/List.js +0 -686
  379. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Num.js +0 -130
  380. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Obj.js +0 -154
  381. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/Str.js +0 -92
  382. package/node_modules_lambda/escodegen/node_modules/prelude-ls/lib/index.js +0 -178
  383. package/node_modules_lambda/escodegen/node_modules/prelude-ls/package.json +0 -52
  384. package/node_modules_lambda/escodegen/node_modules/source-map/CHANGELOG.md +0 -301
  385. package/node_modules_lambda/escodegen/node_modules/source-map/LICENSE +0 -28
  386. package/node_modules_lambda/escodegen/node_modules/source-map/README.md +0 -742
  387. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.debug.js +0 -3234
  388. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.js +0 -3233
  389. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.min.js +0 -2
  390. package/node_modules_lambda/escodegen/node_modules/source-map/dist/source-map.min.js.map +0 -1
  391. package/node_modules_lambda/escodegen/node_modules/source-map/lib/array-set.js +0 -121
  392. package/node_modules_lambda/escodegen/node_modules/source-map/lib/base64-vlq.js +0 -140
  393. package/node_modules_lambda/escodegen/node_modules/source-map/lib/base64.js +0 -67
  394. package/node_modules_lambda/escodegen/node_modules/source-map/lib/binary-search.js +0 -111
  395. package/node_modules_lambda/escodegen/node_modules/source-map/lib/mapping-list.js +0 -79
  396. package/node_modules_lambda/escodegen/node_modules/source-map/lib/quick-sort.js +0 -114
  397. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-map-consumer.js +0 -1145
  398. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-map-generator.js +0 -425
  399. package/node_modules_lambda/escodegen/node_modules/source-map/lib/source-node.js +0 -413
  400. package/node_modules_lambda/escodegen/node_modules/source-map/lib/util.js +0 -488
  401. package/node_modules_lambda/escodegen/node_modules/source-map/package.json +0 -73
  402. package/node_modules_lambda/escodegen/node_modules/source-map/source-map.d.ts +0 -98
  403. package/node_modules_lambda/escodegen/node_modules/source-map/source-map.js +0 -8
  404. package/node_modules_lambda/escodegen/node_modules/type-check/LICENSE +0 -22
  405. package/node_modules_lambda/escodegen/node_modules/type-check/README.md +0 -210
  406. package/node_modules_lambda/escodegen/node_modules/type-check/lib/check.js +0 -126
  407. package/node_modules_lambda/escodegen/node_modules/type-check/lib/index.js +0 -16
  408. package/node_modules_lambda/escodegen/node_modules/type-check/lib/parse-type.js +0 -196
  409. package/node_modules_lambda/escodegen/node_modules/type-check/package.json +0 -40
  410. package/node_modules_lambda/escodegen/package.json +0 -62
  411. package/node_modules_lambda/esprima/ChangeLog +0 -235
  412. package/node_modules_lambda/esprima/LICENSE.BSD +0 -21
  413. package/node_modules_lambda/esprima/README.md +0 -46
  414. package/node_modules_lambda/esprima/bin/esparse.js +0 -139
  415. package/node_modules_lambda/esprima/bin/esvalidate.js +0 -236
  416. package/node_modules_lambda/esprima/dist/esprima.js +0 -6709
  417. package/node_modules_lambda/esprima/package.json +0 -112
  418. package/node_modules_lambda/esutils/LICENSE.BSD +0 -19
  419. package/node_modules_lambda/esutils/README.md +0 -174
  420. package/node_modules_lambda/esutils/lib/ast.js +0 -144
  421. package/node_modules_lambda/esutils/lib/code.js +0 -135
  422. package/node_modules_lambda/esutils/lib/keyword.js +0 -165
  423. package/node_modules_lambda/esutils/lib/utils.js +0 -33
  424. package/node_modules_lambda/esutils/package.json +0 -44
  425. package/node_modules_lambda/fast-levenshtein/LICENSE.md +0 -25
  426. package/node_modules_lambda/fast-levenshtein/README.md +0 -104
  427. package/node_modules_lambda/fast-levenshtein/levenshtein.js +0 -136
  428. package/node_modules_lambda/fast-levenshtein/package.json +0 -39
  429. package/node_modules_lambda/form-data/License +0 -19
  430. package/node_modules_lambda/form-data/README.md.bak +0 -358
  431. package/node_modules_lambda/form-data/Readme.md +0 -358
  432. package/node_modules_lambda/form-data/index.d.ts +0 -62
  433. package/node_modules_lambda/form-data/lib/browser.js +0 -2
  434. package/node_modules_lambda/form-data/lib/form_data.js +0 -501
  435. package/node_modules_lambda/form-data/lib/populate.js +0 -10
  436. package/node_modules_lambda/form-data/package.json +0 -68
  437. package/node_modules_lambda/html-encoding-sniffer/LICENSE.txt +0 -7
  438. package/node_modules_lambda/html-encoding-sniffer/README.md +0 -40
  439. package/node_modules_lambda/html-encoding-sniffer/lib/html-encoding-sniffer.js +0 -295
  440. package/node_modules_lambda/html-encoding-sniffer/package.json +0 -31
  441. package/node_modules_lambda/http-proxy-agent/README.md +0 -74
  442. package/node_modules_lambda/http-proxy-agent/dist/agent.d.ts +0 -32
  443. package/node_modules_lambda/http-proxy-agent/dist/agent.js +0 -145
  444. package/node_modules_lambda/http-proxy-agent/dist/agent.js.map +0 -1
  445. package/node_modules_lambda/http-proxy-agent/dist/index.d.ts +0 -21
  446. package/node_modules_lambda/http-proxy-agent/dist/index.js +0 -14
  447. package/node_modules_lambda/http-proxy-agent/dist/index.js.map +0 -1
  448. package/node_modules_lambda/http-proxy-agent/package.json +0 -57
  449. package/node_modules_lambda/https-proxy-agent/README.md +0 -137
  450. package/node_modules_lambda/https-proxy-agent/dist/agent.d.ts +0 -30
  451. package/node_modules_lambda/https-proxy-agent/dist/agent.js +0 -177
  452. package/node_modules_lambda/https-proxy-agent/dist/agent.js.map +0 -1
  453. package/node_modules_lambda/https-proxy-agent/dist/index.d.ts +0 -23
  454. package/node_modules_lambda/https-proxy-agent/dist/index.js +0 -14
  455. package/node_modules_lambda/https-proxy-agent/dist/index.js.map +0 -1
  456. package/node_modules_lambda/https-proxy-agent/dist/parse-proxy-response.d.ts +0 -7
  457. package/node_modules_lambda/https-proxy-agent/dist/parse-proxy-response.js +0 -66
  458. package/node_modules_lambda/https-proxy-agent/dist/parse-proxy-response.js.map +0 -1
  459. package/node_modules_lambda/https-proxy-agent/package.json +0 -56
  460. package/node_modules_lambda/is-potential-custom-element-name/LICENSE-MIT.txt +0 -20
  461. package/node_modules_lambda/is-potential-custom-element-name/README.md +0 -40
  462. package/node_modules_lambda/is-potential-custom-element-name/index.js +0 -9
  463. package/node_modules_lambda/is-potential-custom-element-name/package.json +0 -35
  464. package/node_modules_lambda/jsdom/LICENSE.txt +0 -22
  465. package/node_modules_lambda/jsdom/README.md +0 -522
  466. package/node_modules_lambda/jsdom/lib/api.js +0 -333
  467. package/node_modules_lambda/jsdom/lib/jsdom/browser/Window.js +0 -933
  468. package/node_modules_lambda/jsdom/lib/jsdom/browser/default-stylesheet.js +0 -789
  469. package/node_modules_lambda/jsdom/lib/jsdom/browser/js-globals.json +0 -307
  470. package/node_modules_lambda/jsdom/lib/jsdom/browser/not-implemented.js +0 -13
  471. package/node_modules_lambda/jsdom/lib/jsdom/browser/parser/html.js +0 -224
  472. package/node_modules_lambda/jsdom/lib/jsdom/browser/parser/index.js +0 -37
  473. package/node_modules_lambda/jsdom/lib/jsdom/browser/parser/xml.js +0 -202
  474. package/node_modules_lambda/jsdom/lib/jsdom/browser/resources/async-resource-queue.js +0 -114
  475. package/node_modules_lambda/jsdom/lib/jsdom/browser/resources/no-op-resource-loader.js +0 -8
  476. package/node_modules_lambda/jsdom/lib/jsdom/browser/resources/per-document-resource-loader.js +0 -95
  477. package/node_modules_lambda/jsdom/lib/jsdom/browser/resources/request-manager.js +0 -33
  478. package/node_modules_lambda/jsdom/lib/jsdom/browser/resources/resource-loader.js +0 -142
  479. package/node_modules_lambda/jsdom/lib/jsdom/browser/resources/resource-queue.js +0 -142
  480. package/node_modules_lambda/jsdom/lib/jsdom/level2/style.js +0 -57
  481. package/node_modules_lambda/jsdom/lib/jsdom/level3/xpath.js +0 -1874
  482. package/node_modules_lambda/jsdom/lib/jsdom/living/aborting/AbortController-impl.js +0 -17
  483. package/node_modules_lambda/jsdom/lib/jsdom/living/aborting/AbortSignal-impl.js +0 -69
  484. package/node_modules_lambda/jsdom/lib/jsdom/living/attributes/Attr-impl.js +0 -60
  485. package/node_modules_lambda/jsdom/lib/jsdom/living/attributes/NamedNodeMap-impl.js +0 -78
  486. package/node_modules_lambda/jsdom/lib/jsdom/living/attributes.js +0 -312
  487. package/node_modules_lambda/jsdom/lib/jsdom/living/constraint-validation/DefaultConstraintValidation-impl.js +0 -75
  488. package/node_modules_lambda/jsdom/lib/jsdom/living/constraint-validation/ValidityState-impl.js +0 -66
  489. package/node_modules_lambda/jsdom/lib/jsdom/living/cssom/StyleSheetList-impl.js +0 -38
  490. package/node_modules_lambda/jsdom/lib/jsdom/living/custom-elements/CustomElementRegistry-impl.js +0 -265
  491. package/node_modules_lambda/jsdom/lib/jsdom/living/documents.js +0 -15
  492. package/node_modules_lambda/jsdom/lib/jsdom/living/domparsing/DOMParser-impl.js +0 -58
  493. package/node_modules_lambda/jsdom/lib/jsdom/living/domparsing/InnerHTML-impl.js +0 -29
  494. package/node_modules_lambda/jsdom/lib/jsdom/living/domparsing/XMLSerializer-impl.js +0 -18
  495. package/node_modules_lambda/jsdom/lib/jsdom/living/domparsing/parse5-adapter-serialization.js +0 -63
  496. package/node_modules_lambda/jsdom/lib/jsdom/living/domparsing/serialization.js +0 -45
  497. package/node_modules_lambda/jsdom/lib/jsdom/living/events/CloseEvent-impl.js +0 -10
  498. package/node_modules_lambda/jsdom/lib/jsdom/living/events/CompositionEvent-impl.js +0 -20
  499. package/node_modules_lambda/jsdom/lib/jsdom/living/events/CustomEvent-impl.js +0 -21
  500. package/node_modules_lambda/jsdom/lib/jsdom/living/events/ErrorEvent-impl.js +0 -14
  501. package/node_modules_lambda/jsdom/lib/jsdom/living/events/Event-impl.js +0 -197
  502. package/node_modules_lambda/jsdom/lib/jsdom/living/events/EventModifierMixin-impl.js +0 -18
  503. package/node_modules_lambda/jsdom/lib/jsdom/living/events/EventTarget-impl.js +0 -405
  504. package/node_modules_lambda/jsdom/lib/jsdom/living/events/FocusEvent-impl.js +0 -9
  505. package/node_modules_lambda/jsdom/lib/jsdom/living/events/HashChangeEvent-impl.js +0 -14
  506. package/node_modules_lambda/jsdom/lib/jsdom/living/events/InputEvent-impl.js +0 -11
  507. package/node_modules_lambda/jsdom/lib/jsdom/living/events/KeyboardEvent-impl.js +0 -29
  508. package/node_modules_lambda/jsdom/lib/jsdom/living/events/MessageEvent-impl.js +0 -25
  509. package/node_modules_lambda/jsdom/lib/jsdom/living/events/MouseEvent-impl.js +0 -49
  510. package/node_modules_lambda/jsdom/lib/jsdom/living/events/PageTransitionEvent-impl.js +0 -20
  511. package/node_modules_lambda/jsdom/lib/jsdom/living/events/PopStateEvent-impl.js +0 -9
  512. package/node_modules_lambda/jsdom/lib/jsdom/living/events/ProgressEvent-impl.js +0 -14
  513. package/node_modules_lambda/jsdom/lib/jsdom/living/events/StorageEvent-impl.js +0 -26
  514. package/node_modules_lambda/jsdom/lib/jsdom/living/events/TouchEvent-impl.js +0 -14
  515. package/node_modules_lambda/jsdom/lib/jsdom/living/events/UIEvent-impl.js +0 -59
  516. package/node_modules_lambda/jsdom/lib/jsdom/living/events/WheelEvent-impl.js +0 -12
  517. package/node_modules_lambda/jsdom/lib/jsdom/living/fetch/Headers-impl.js +0 -170
  518. package/node_modules_lambda/jsdom/lib/jsdom/living/fetch/header-list.js +0 -54
  519. package/node_modules_lambda/jsdom/lib/jsdom/living/fetch/header-types.js +0 -103
  520. package/node_modules_lambda/jsdom/lib/jsdom/living/file-api/Blob-impl.js +0 -93
  521. package/node_modules_lambda/jsdom/lib/jsdom/living/file-api/File-impl.js +0 -12
  522. package/node_modules_lambda/jsdom/lib/jsdom/living/file-api/FileList-impl.js +0 -15
  523. package/node_modules_lambda/jsdom/lib/jsdom/living/file-api/FileReader-impl.js +0 -130
  524. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/AbortController.js +0 -143
  525. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/AbortSignal.js +0 -184
  526. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/AbstractRange.js +0 -171
  527. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/AddEventListenerOptions.js +0 -44
  528. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/AssignedNodesOptions.js +0 -28
  529. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Attr.js +0 -217
  530. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/BarProp.js +0 -117
  531. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/BinaryType.js +0 -12
  532. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Blob.js +0 -203
  533. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/BlobCallback.js +0 -30
  534. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/BlobPropertyBag.js +0 -42
  535. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CDATASection.js +0 -109
  536. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CanPlayTypeResult.js +0 -12
  537. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CharacterData.js +0 -453
  538. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CloseEvent.js +0 -168
  539. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CloseEventInit.js +0 -65
  540. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Comment.js +0 -120
  541. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CompositionEvent.js +0 -219
  542. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CompositionEventInit.js +0 -32
  543. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CustomElementConstructor.js +0 -34
  544. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CustomElementRegistry.js +0 -242
  545. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CustomEvent.js +0 -206
  546. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/CustomEventInit.js +0 -32
  547. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/DOMImplementation.js +0 -237
  548. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/DOMParser.js +0 -140
  549. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/DOMStringMap.js +0 -323
  550. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/DOMTokenList.js +0 -563
  551. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Document.js +0 -3593
  552. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/DocumentFragment.js +0 -334
  553. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/DocumentReadyState.js +0 -12
  554. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/DocumentType.js +0 -252
  555. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Element.js +0 -1718
  556. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ElementCreationOptions.js +0 -26
  557. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ElementDefinitionOptions.js +0 -29
  558. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/EndingType.js +0 -12
  559. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ErrorEvent.js +0 -192
  560. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ErrorEventInit.js +0 -92
  561. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Event.js +0 -430
  562. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/EventHandlerNonNull.js +0 -36
  563. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/EventInit.js +0 -58
  564. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/EventListener.js +0 -35
  565. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/EventListenerOptions.js +0 -28
  566. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/EventModifierInit.js +0 -221
  567. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/EventTarget.js +0 -259
  568. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/External.js +0 -130
  569. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/File.js +0 -177
  570. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/FileList.js +0 -324
  571. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/FilePropertyBag.js +0 -33
  572. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/FileReader.js +0 -468
  573. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/FocusEvent.js +0 -144
  574. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/FocusEventInit.js +0 -36
  575. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/FormData.js +0 -452
  576. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Function.js +0 -42
  577. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/GetRootNodeOptions.js +0 -31
  578. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLAnchorElement.js +0 -1023
  579. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLAreaElement.js +0 -822
  580. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLAudioElement.js +0 -110
  581. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLBRElement.js +0 -153
  582. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLBaseElement.js +0 -193
  583. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLBodyElement.js +0 -877
  584. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLButtonElement.js +0 -522
  585. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLCanvasElement.js +0 -304
  586. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLCollection.js +0 -378
  587. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLDListElement.js +0 -156
  588. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLDataElement.js +0 -153
  589. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLDataListElement.js +0 -125
  590. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLDetailsElement.js +0 -156
  591. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLDialogElement.js +0 -156
  592. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLDirectoryElement.js +0 -156
  593. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLDivElement.js +0 -153
  594. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLElement.js +0 -2549
  595. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLEmbedElement.js +0 -371
  596. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLFieldSetElement.js +0 -329
  597. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLFontElement.js +0 -236
  598. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLFormElement.js +0 -501
  599. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLFrameElement.js +0 -494
  600. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLFrameSetElement.js +0 -708
  601. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLHRElement.js +0 -320
  602. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLHeadElement.js +0 -110
  603. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLHeadingElement.js +0 -153
  604. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLHtmlElement.js +0 -153
  605. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLIFrameElement.js +0 -670
  606. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLImageElement.js +0 -870
  607. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLInputElement.js +0 -1875
  608. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLLIElement.js +0 -199
  609. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLLabelElement.js +0 -179
  610. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLLegendElement.js +0 -166
  611. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLLinkElement.js +0 -542
  612. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLMapElement.js +0 -168
  613. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLMarqueeElement.js +0 -546
  614. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLMediaElement.js +0 -888
  615. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLMenuElement.js +0 -156
  616. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLMetaElement.js +0 -276
  617. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLMeterElement.js +0 -365
  618. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLModElement.js +0 -207
  619. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLOListElement.js +0 -281
  620. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLObjectElement.js +0 -921
  621. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLOptGroupElement.js +0 -197
  622. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLOptionElement.js +0 -376
  623. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLOptionsCollection.js +0 -537
  624. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLOutputElement.js +0 -392
  625. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLParagraphElement.js +0 -153
  626. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLParamElement.js +0 -276
  627. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLPictureElement.js +0 -110
  628. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLPreElement.js +0 -158
  629. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLProgressElement.js +0 -218
  630. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLQuoteElement.js +0 -166
  631. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLScriptElement.js +0 -459
  632. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLSelectElement.js +0 -1013
  633. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLSlotElement.js +0 -192
  634. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLSourceElement.js +0 -330
  635. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLSpanElement.js +0 -110
  636. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLStyleElement.js +0 -207
  637. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTableCaptionElement.js +0 -153
  638. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTableCellElement.js +0 -700
  639. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTableColElement.js +0 -364
  640. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTableElement.js +0 -799
  641. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTableRowElement.js +0 -414
  642. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTableSectionElement.js +0 -346
  643. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTemplateElement.js +0 -123
  644. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTextAreaElement.js +0 -1171
  645. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTimeElement.js +0 -153
  646. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTitleElement.js +0 -152
  647. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLTrackElement.js +0 -356
  648. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLUListElement.js +0 -197
  649. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLUnknownElement.js +0 -109
  650. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HTMLVideoElement.js +0 -329
  651. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HashChangeEvent.js +0 -157
  652. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/HashChangeEventInit.js +0 -50
  653. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Headers.js +0 -408
  654. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/History.js +0 -266
  655. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/InputEvent.js +0 -168
  656. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/InputEventInit.js +0 -68
  657. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/KeyboardEvent.js +0 -445
  658. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/KeyboardEventInit.js +0 -116
  659. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Location.js +0 -404
  660. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MessageEvent.js +0 -317
  661. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MessageEventInit.js +0 -100
  662. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MimeType.js +0 -156
  663. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MimeTypeArray.js +0 -352
  664. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MouseEvent.js +0 -499
  665. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MouseEventInit.js +0 -111
  666. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MutationCallback.js +0 -34
  667. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MutationObserver.js +0 -178
  668. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MutationObserverInit.js +0 -121
  669. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/MutationRecord.js +0 -229
  670. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/NamedNodeMap.js +0 -553
  671. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Navigator.js +0 -326
  672. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Node.js +0 -763
  673. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/NodeFilter.js +0 -75
  674. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/NodeIterator.js +0 -207
  675. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/NodeList.js +0 -328
  676. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/OnBeforeUnloadEventHandlerNonNull.js +0 -42
  677. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/OnErrorEventHandlerNonNull.js +0 -56
  678. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/PageTransitionEvent.js +0 -144
  679. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/PageTransitionEventInit.js +0 -35
  680. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Performance.js +0 -142
  681. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Plugin.js +0 -385
  682. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/PluginArray.js +0 -362
  683. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/PopStateEvent.js +0 -144
  684. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/PopStateEventInit.js +0 -32
  685. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ProcessingInstruction.js +0 -122
  686. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ProgressEvent.js +0 -170
  687. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ProgressEventInit.js +0 -65
  688. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Range.js +0 -641
  689. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SVGAnimatedString.js +0 -149
  690. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SVGBoundingBoxOptions.js +0 -64
  691. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SVGElement.js +0 -2227
  692. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SVGGraphicsElement.js +0 -139
  693. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SVGNumber.js +0 -132
  694. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SVGSVGElement.js +0 -737
  695. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SVGStringList.js +0 -537
  696. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SVGTitleElement.js +0 -109
  697. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Screen.js +0 -180
  698. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ScrollBehavior.js +0 -12
  699. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ScrollIntoViewOptions.js +0 -45
  700. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ScrollLogicalPosition.js +0 -14
  701. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ScrollOptions.js +0 -30
  702. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ScrollRestoration.js +0 -12
  703. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Selection.js +0 -569
  704. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SelectionMode.js +0 -12
  705. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ShadowRoot.js +0 -187
  706. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ShadowRootInit.js +0 -30
  707. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ShadowRootMode.js +0 -12
  708. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/StaticRange.js +0 -123
  709. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/StaticRangeInit.js +0 -72
  710. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Storage.js +0 -423
  711. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/StorageEvent.js +0 -318
  712. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/StorageEventInit.js +0 -99
  713. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/StyleSheetList.js +0 -326
  714. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/SupportedType.js +0 -18
  715. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/Text.js +0 -170
  716. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/TextTrackKind.js +0 -12
  717. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/TouchEvent.js +0 -222
  718. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/TouchEventInit.js +0 -89
  719. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/TreeWalker.js +0 -255
  720. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/UIEvent.js +0 -235
  721. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/UIEventInit.js +0 -62
  722. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/ValidityState.js +0 -249
  723. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/VisibilityState.js +0 -12
  724. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/VoidFunction.js +0 -26
  725. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/WebSocket.js +0 -476
  726. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/WheelEvent.js +0 -191
  727. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/WheelEventInit.js +0 -71
  728. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/XMLDocument.js +0 -109
  729. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/XMLHttpRequest.js +0 -655
  730. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/XMLHttpRequestEventTarget.js +0 -334
  731. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/XMLHttpRequestResponseType.js +0 -14
  732. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/XMLHttpRequestUpload.js +0 -109
  733. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/XMLSerializer.js +0 -132
  734. package/node_modules_lambda/jsdom/lib/jsdom/living/generated/utils.js +0 -190
  735. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/agent-factory.js +0 -15
  736. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/binary-data.js +0 -9
  737. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/create-element.js +0 -320
  738. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/create-event-accessor.js +0 -188
  739. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/custom-elements.js +0 -270
  740. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/dates-and-times.js +0 -270
  741. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/details.js +0 -15
  742. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/document-base-url.js +0 -54
  743. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/events.js +0 -24
  744. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/focusing.js +0 -104
  745. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/form-controls.js +0 -306
  746. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/html-constructor.js +0 -78
  747. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/http-request.js +0 -254
  748. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/internal-constants.js +0 -12
  749. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/iterable-weak-set.js +0 -48
  750. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/json.js +0 -12
  751. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/mutation-observers.js +0 -198
  752. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/namespaces.js +0 -15
  753. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/node.js +0 -68
  754. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/number-and-date-inputs.js +0 -195
  755. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/ordered-set.js +0 -104
  756. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/page-transition-event.js +0 -9
  757. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/runtime-script-errors.js +0 -76
  758. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/selectors.js +0 -47
  759. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/shadow-dom.js +0 -285
  760. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/strings.js +0 -148
  761. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/style-rules.js +0 -114
  762. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/stylesheets.js +0 -113
  763. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/svg/basic-types.js +0 -41
  764. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/svg/render.js +0 -46
  765. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/text.js +0 -19
  766. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/traversal.js +0 -72
  767. package/node_modules_lambda/jsdom/lib/jsdom/living/helpers/validate-names.js +0 -65
  768. package/node_modules_lambda/jsdom/lib/jsdom/living/hr-time/Performance-impl.js +0 -25
  769. package/node_modules_lambda/jsdom/lib/jsdom/living/interfaces.js +0 -217
  770. package/node_modules_lambda/jsdom/lib/jsdom/living/mutation-observer/MutationObserver-impl.js +0 -95
  771. package/node_modules_lambda/jsdom/lib/jsdom/living/mutation-observer/MutationRecord-impl.js +0 -37
  772. package/node_modules_lambda/jsdom/lib/jsdom/living/named-properties-window.js +0 -141
  773. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/MimeType-impl.js +0 -3
  774. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/MimeTypeArray-impl.js +0 -21
  775. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/Navigator-impl.js +0 -29
  776. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/NavigatorConcurrentHardware-impl.js +0 -8
  777. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/NavigatorCookies-impl.js +0 -7
  778. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/NavigatorID-impl.js +0 -37
  779. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/NavigatorLanguage-impl.js +0 -9
  780. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/NavigatorOnLine-impl.js +0 -7
  781. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/NavigatorPlugins-impl.js +0 -8
  782. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/Plugin-impl.js +0 -3
  783. package/node_modules_lambda/jsdom/lib/jsdom/living/navigator/PluginArray-impl.js +0 -23
  784. package/node_modules_lambda/jsdom/lib/jsdom/living/node-document-position.js +0 -10
  785. package/node_modules_lambda/jsdom/lib/jsdom/living/node-type.js +0 -16
  786. package/node_modules_lambda/jsdom/lib/jsdom/living/node.js +0 -331
  787. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/CDATASection-impl.js +0 -16
  788. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/CharacterData-impl.js +0 -118
  789. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/ChildNode-impl.js +0 -80
  790. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/Comment-impl.js +0 -20
  791. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/DOMImplementation-impl.js +0 -120
  792. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/DOMStringMap-impl.js +0 -64
  793. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/DOMTokenList-impl.js +0 -171
  794. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/Document-impl.js +0 -946
  795. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/DocumentFragment-impl.js +0 -44
  796. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/DocumentOrShadowRoot-impl.js +0 -28
  797. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/DocumentType-impl.js +0 -24
  798. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/Element-impl.js +0 -582
  799. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/ElementCSSInlineStyle-impl.js +0 -25
  800. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/ElementContentEditable-impl.js +0 -7
  801. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/GlobalEventHandlers-impl.js +0 -95
  802. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLAnchorElement-impl.js +0 -50
  803. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLAreaElement-impl.js +0 -43
  804. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLAudioElement-impl.js +0 -9
  805. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLBRElement-impl.js +0 -9
  806. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLBaseElement-impl.js +0 -27
  807. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLBodyElement-impl.js +0 -17
  808. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLButtonElement-impl.js +0 -79
  809. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLCanvasElement-impl.js +0 -130
  810. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLCollection-impl.js +0 -96
  811. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLDListElement-impl.js +0 -9
  812. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLDataElement-impl.js +0 -9
  813. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLDataListElement-impl.js +0 -20
  814. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLDetailsElement-impl.js +0 -35
  815. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLDialogElement-impl.js +0 -9
  816. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLDirectoryElement-impl.js +0 -9
  817. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLDivElement-impl.js +0 -9
  818. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLElement-impl.js +0 -160
  819. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLEmbedElement-impl.js +0 -8
  820. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLFieldSetElement-impl.js +0 -43
  821. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLFontElement-impl.js +0 -9
  822. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLFormElement-impl.js +0 -232
  823. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLFrameElement-impl.js +0 -261
  824. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLFrameSetElement-impl.js +0 -17
  825. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLHRElement-impl.js +0 -9
  826. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLHeadElement-impl.js +0 -9
  827. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLHeadingElement-impl.js +0 -9
  828. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLHtmlElement-impl.js +0 -9
  829. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLHyperlinkElementUtils-impl.js +0 -371
  830. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLIFrameElement-impl.js +0 -9
  831. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLImageElement-impl.js +0 -132
  832. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLInputElement-impl.js +0 -1129
  833. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLLIElement-impl.js +0 -9
  834. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLLabelElement-impl.js +0 -94
  835. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLLegendElement-impl.js +0 -18
  836. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLLinkElement-impl.js +0 -101
  837. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLMapElement-impl.js +0 -13
  838. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLMarqueeElement-impl.js +0 -9
  839. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLMediaElement-impl.js +0 -138
  840. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLMenuElement-impl.js +0 -9
  841. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLMetaElement-impl.js +0 -9
  842. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLMeterElement-impl.js +0 -180
  843. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLModElement-impl.js +0 -9
  844. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLOListElement-impl.js +0 -22
  845. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLObjectElement-impl.js +0 -26
  846. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLOptGroupElement-impl.js +0 -9
  847. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLOptionElement-impl.js +0 -146
  848. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLOptionsCollection-impl.js +0 -110
  849. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLOrSVGElement-impl.js +0 -85
  850. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLOutputElement-impl.js +0 -88
  851. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLParagraphElement-impl.js +0 -9
  852. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLParamElement-impl.js +0 -9
  853. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLPictureElement-impl.js +0 -9
  854. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLPreElement-impl.js +0 -9
  855. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLProgressElement-impl.js +0 -74
  856. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLQuoteElement-impl.js +0 -9
  857. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLScriptElement-impl.js +0 -265
  858. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLSelectElement-impl.js +0 -283
  859. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLSlotElement-impl.js +0 -59
  860. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLSourceElement-impl.js +0 -8
  861. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLSpanElement-impl.js +0 -9
  862. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLStyleElement-impl.js +0 -74
  863. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTableCaptionElement-impl.js +0 -9
  864. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTableCellElement-impl.js +0 -73
  865. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTableColElement-impl.js +0 -9
  866. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTableElement-impl.js +0 -236
  867. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTableRowElement-impl.js +0 -88
  868. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTableSectionElement-impl.js +0 -61
  869. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTemplateElement-impl.js +0 -67
  870. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTextAreaElement-impl.js +0 -272
  871. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTimeElement-impl.js +0 -9
  872. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTitleElement-impl.js +0 -18
  873. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLTrackElement-impl.js +0 -13
  874. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLUListElement-impl.js +0 -9
  875. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLUnknownElement-impl.js +0 -9
  876. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/HTMLVideoElement-impl.js +0 -17
  877. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/LinkStyle-impl.js +0 -2
  878. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/Node-impl.js +0 -1159
  879. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/NodeList-impl.js +0 -43
  880. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/NonDocumentTypeChildNode-impl.js +0 -28
  881. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/NonElementParentNode-impl.js +0 -11
  882. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/ParentNode-impl.js +0 -91
  883. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/ProcessingInstruction-impl.js +0 -22
  884. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/SVGElement-impl.js +0 -64
  885. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/SVGGraphicsElement-impl.js +0 -16
  886. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/SVGSVGElement-impl.js +0 -42
  887. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/SVGTests-impl.js +0 -42
  888. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/SVGTitleElement-impl.js +0 -9
  889. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/ShadowRoot-impl.js +0 -40
  890. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/Slotable-impl.js +0 -48
  891. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/Text-impl.js +0 -96
  892. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/WindowEventHandlers-impl.js +0 -52
  893. package/node_modules_lambda/jsdom/lib/jsdom/living/nodes/XMLDocument-impl.js +0 -4
  894. package/node_modules_lambda/jsdom/lib/jsdom/living/post-message.js +0 -39
  895. package/node_modules_lambda/jsdom/lib/jsdom/living/range/AbstractRange-impl.js +0 -43
  896. package/node_modules_lambda/jsdom/lib/jsdom/living/range/Range-impl.js +0 -897
  897. package/node_modules_lambda/jsdom/lib/jsdom/living/range/StaticRange-impl.js +0 -39
  898. package/node_modules_lambda/jsdom/lib/jsdom/living/range/boundary-point.js +0 -47
  899. package/node_modules_lambda/jsdom/lib/jsdom/living/selection/Selection-impl.js +0 -342
  900. package/node_modules_lambda/jsdom/lib/jsdom/living/svg/SVGAnimatedString-impl.js +0 -38
  901. package/node_modules_lambda/jsdom/lib/jsdom/living/svg/SVGListBase.js +0 -195
  902. package/node_modules_lambda/jsdom/lib/jsdom/living/svg/SVGNumber-impl.js +0 -48
  903. package/node_modules_lambda/jsdom/lib/jsdom/living/svg/SVGStringList-impl.js +0 -16
  904. package/node_modules_lambda/jsdom/lib/jsdom/living/traversal/NodeIterator-impl.js +0 -127
  905. package/node_modules_lambda/jsdom/lib/jsdom/living/traversal/TreeWalker-impl.js +0 -217
  906. package/node_modules_lambda/jsdom/lib/jsdom/living/traversal/helpers.js +0 -44
  907. package/node_modules_lambda/jsdom/lib/jsdom/living/websockets/WebSocket-impl-browser.js +0 -175
  908. package/node_modules_lambda/jsdom/lib/jsdom/living/websockets/WebSocket-impl.js +0 -328
  909. package/node_modules_lambda/jsdom/lib/jsdom/living/webstorage/Storage-impl.js +0 -102
  910. package/node_modules_lambda/jsdom/lib/jsdom/living/window/BarProp-impl.js +0 -10
  911. package/node_modules_lambda/jsdom/lib/jsdom/living/window/External-impl.js +0 -9
  912. package/node_modules_lambda/jsdom/lib/jsdom/living/window/History-impl.js +0 -134
  913. package/node_modules_lambda/jsdom/lib/jsdom/living/window/Location-impl.js +0 -238
  914. package/node_modules_lambda/jsdom/lib/jsdom/living/window/Screen-impl.js +0 -13
  915. package/node_modules_lambda/jsdom/lib/jsdom/living/window/SessionHistory.js +0 -163
  916. package/node_modules_lambda/jsdom/lib/jsdom/living/window/navigation.js +0 -85
  917. package/node_modules_lambda/jsdom/lib/jsdom/living/xhr/FormData-impl.js +0 -171
  918. package/node_modules_lambda/jsdom/lib/jsdom/living/xhr/XMLHttpRequest-impl.js +0 -1023
  919. package/node_modules_lambda/jsdom/lib/jsdom/living/xhr/XMLHttpRequestEventTarget-impl.js +0 -17
  920. package/node_modules_lambda/jsdom/lib/jsdom/living/xhr/XMLHttpRequestUpload-impl.js +0 -4
  921. package/node_modules_lambda/jsdom/lib/jsdom/living/xhr/xhr-sync-worker.js +0 -60
  922. package/node_modules_lambda/jsdom/lib/jsdom/living/xhr/xhr-utils.js +0 -438
  923. package/node_modules_lambda/jsdom/lib/jsdom/named-properties-tracker.js +0 -158
  924. package/node_modules_lambda/jsdom/lib/jsdom/utils.js +0 -165
  925. package/node_modules_lambda/jsdom/lib/jsdom/virtual-console.js +0 -34
  926. package/node_modules_lambda/jsdom/lib/jsdom/vm-shim.js +0 -106
  927. package/node_modules_lambda/jsdom/package.json +0 -116
  928. package/node_modules_lambda/mime-db/HISTORY.md +0 -507
  929. package/node_modules_lambda/mime-db/LICENSE +0 -23
  930. package/node_modules_lambda/mime-db/README.md +0 -100
  931. package/node_modules_lambda/mime-db/db.json +0 -8519
  932. package/node_modules_lambda/mime-db/index.js +0 -12
  933. package/node_modules_lambda/mime-db/package.json +0 -60
  934. package/node_modules_lambda/mime-types/HISTORY.md +0 -397
  935. package/node_modules_lambda/mime-types/LICENSE +0 -23
  936. package/node_modules_lambda/mime-types/README.md +0 -113
  937. package/node_modules_lambda/mime-types/index.js +0 -188
  938. package/node_modules_lambda/mime-types/package.json +0 -44
  939. package/node_modules_lambda/ms/index.js +0 -162
  940. package/node_modules_lambda/ms/license.md +0 -21
  941. package/node_modules_lambda/ms/package.json +0 -37
  942. package/node_modules_lambda/ms/readme.md +0 -60
  943. package/node_modules_lambda/nwsapi/LICENSE +0 -22
  944. package/node_modules_lambda/nwsapi/README.md +0 -132
  945. package/node_modules_lambda/nwsapi/dist/lint.log +0 -0
  946. package/node_modules_lambda/nwsapi/package.json +0 -38
  947. package/node_modules_lambda/nwsapi/src/modules/nwsapi-jquery.js +0 -135
  948. package/node_modules_lambda/nwsapi/src/modules/nwsapi-traversal.js +0 -90
  949. package/node_modules_lambda/nwsapi/src/nwsapi.js +0 -1800
  950. package/node_modules_lambda/parse5/LICENSE +0 -19
  951. package/node_modules_lambda/parse5/README.md +0 -38
  952. package/node_modules_lambda/parse5/lib/common/doctype.js +0 -162
  953. package/node_modules_lambda/parse5/lib/common/error-codes.js +0 -65
  954. package/node_modules_lambda/parse5/lib/common/foreign-content.js +0 -265
  955. package/node_modules_lambda/parse5/lib/common/html.js +0 -272
  956. package/node_modules_lambda/parse5/lib/common/unicode.js +0 -109
  957. package/node_modules_lambda/parse5/lib/extensions/error-reporting/mixin-base.js +0 -43
  958. package/node_modules_lambda/parse5/lib/extensions/error-reporting/parser-mixin.js +0 -52
  959. package/node_modules_lambda/parse5/lib/extensions/error-reporting/preprocessor-mixin.js +0 -24
  960. package/node_modules_lambda/parse5/lib/extensions/error-reporting/tokenizer-mixin.js +0 -17
  961. package/node_modules_lambda/parse5/lib/extensions/location-info/open-element-stack-mixin.js +0 -35
  962. package/node_modules_lambda/parse5/lib/extensions/location-info/parser-mixin.js +0 -223
  963. package/node_modules_lambda/parse5/lib/extensions/location-info/tokenizer-mixin.js +0 -146
  964. package/node_modules_lambda/parse5/lib/extensions/position-tracking/preprocessor-mixin.js +0 -64
  965. package/node_modules_lambda/parse5/lib/index.js +0 -29
  966. package/node_modules_lambda/parse5/lib/parser/formatting-element-list.js +0 -181
  967. package/node_modules_lambda/parse5/lib/parser/index.js +0 -2956
  968. package/node_modules_lambda/parse5/lib/parser/open-element-stack.js +0 -482
  969. package/node_modules_lambda/parse5/lib/serializer/index.js +0 -176
  970. package/node_modules_lambda/parse5/lib/tokenizer/index.js +0 -2196
  971. package/node_modules_lambda/parse5/lib/tokenizer/named-entity-data.js +0 -5
  972. package/node_modules_lambda/parse5/lib/tokenizer/preprocessor.js +0 -159
  973. package/node_modules_lambda/parse5/lib/tree-adapters/default.js +0 -221
  974. package/node_modules_lambda/parse5/lib/utils/merge-options.js +0 -13
  975. package/node_modules_lambda/parse5/lib/utils/mixin.js +0 -39
  976. package/node_modules_lambda/parse5/package.json +0 -35
  977. package/node_modules_lambda/psl/LICENSE +0 -9
  978. package/node_modules_lambda/psl/README.md +0 -215
  979. package/node_modules_lambda/psl/browserstack-logo.svg +0 -90
  980. package/node_modules_lambda/psl/data/rules.json +0 -8834
  981. package/node_modules_lambda/psl/dist/psl.js +0 -9645
  982. package/node_modules_lambda/psl/dist/psl.min.js +0 -1
  983. package/node_modules_lambda/psl/index.js +0 -269
  984. package/node_modules_lambda/psl/package.json +0 -44
  985. package/node_modules_lambda/punycode/LICENSE-MIT.txt +0 -20
  986. package/node_modules_lambda/punycode/README.md +0 -122
  987. package/node_modules_lambda/punycode/package.json +0 -58
  988. package/node_modules_lambda/punycode/punycode.es6.js +0 -441
  989. package/node_modules_lambda/punycode/punycode.js +0 -440
  990. package/node_modules_lambda/safer-buffer/LICENSE +0 -21
  991. package/node_modules_lambda/safer-buffer/Porting-Buffer.md +0 -268
  992. package/node_modules_lambda/safer-buffer/Readme.md +0 -156
  993. package/node_modules_lambda/safer-buffer/dangerous.js +0 -58
  994. package/node_modules_lambda/safer-buffer/package.json +0 -34
  995. package/node_modules_lambda/safer-buffer/safer.js +0 -77
  996. package/node_modules_lambda/safer-buffer/tests.js +0 -406
  997. package/node_modules_lambda/saxes/README.md +0 -323
  998. package/node_modules_lambda/saxes/package.json +0 -70
  999. package/node_modules_lambda/saxes/saxes.d.ts +0 -635
  1000. package/node_modules_lambda/saxes/saxes.js +0 -2064
  1001. package/node_modules_lambda/saxes/saxes.js.map +0 -1
  1002. package/node_modules_lambda/symbol-tree/LICENSE +0 -21
  1003. package/node_modules_lambda/symbol-tree/README.md +0 -545
  1004. package/node_modules_lambda/symbol-tree/lib/SymbolTree.js +0 -838
  1005. package/node_modules_lambda/symbol-tree/lib/SymbolTreeNode.js +0 -54
  1006. package/node_modules_lambda/symbol-tree/lib/TreeIterator.js +0 -69
  1007. package/node_modules_lambda/symbol-tree/lib/TreePosition.js +0 -11
  1008. package/node_modules_lambda/symbol-tree/package.json +0 -47
  1009. package/node_modules_lambda/tough-cookie/LICENSE +0 -12
  1010. package/node_modules_lambda/tough-cookie/README.md +0 -582
  1011. package/node_modules_lambda/tough-cookie/lib/cookie.js +0 -1671
  1012. package/node_modules_lambda/tough-cookie/lib/memstore.js +0 -190
  1013. package/node_modules_lambda/tough-cookie/lib/pathMatch.js +0 -61
  1014. package/node_modules_lambda/tough-cookie/lib/permuteDomain.js +0 -70
  1015. package/node_modules_lambda/tough-cookie/lib/pubsuffix-psl.js +0 -38
  1016. package/node_modules_lambda/tough-cookie/lib/store.js +0 -76
  1017. package/node_modules_lambda/tough-cookie/lib/version.js +0 -2
  1018. package/node_modules_lambda/tough-cookie/package.json +0 -109
  1019. package/node_modules_lambda/tr46/LICENSE.md +0 -21
  1020. package/node_modules_lambda/tr46/README.md +0 -78
  1021. package/node_modules_lambda/tr46/index.js +0 -298
  1022. package/node_modules_lambda/tr46/lib/mappingTable.json +0 -1
  1023. package/node_modules_lambda/tr46/lib/regexes.js +0 -29
  1024. package/node_modules_lambda/tr46/lib/statusMapping.js +0 -11
  1025. package/node_modules_lambda/tr46/package.json +0 -47
  1026. package/node_modules_lambda/universalify/LICENSE +0 -20
  1027. package/node_modules_lambda/universalify/README.md +0 -76
  1028. package/node_modules_lambda/universalify/index.js +0 -25
  1029. package/node_modules_lambda/universalify/package.json +0 -34
  1030. package/node_modules_lambda/w3c-hr-time/CHANGELOG.md +0 -19
  1031. package/node_modules_lambda/w3c-hr-time/LICENSE.md +0 -21
  1032. package/node_modules_lambda/w3c-hr-time/README.md +0 -130
  1033. package/node_modules_lambda/w3c-hr-time/index.js +0 -11
  1034. package/node_modules_lambda/w3c-hr-time/lib/calculate-clock-offset.js +0 -39
  1035. package/node_modules_lambda/w3c-hr-time/lib/clock-is-accurate.js +0 -61
  1036. package/node_modules_lambda/w3c-hr-time/lib/global-monotonic-clock.js +0 -10
  1037. package/node_modules_lambda/w3c-hr-time/lib/performance.js +0 -53
  1038. package/node_modules_lambda/w3c-hr-time/lib/utils.js +0 -11
  1039. package/node_modules_lambda/w3c-hr-time/package.json +0 -26
  1040. package/node_modules_lambda/w3c-xmlserializer/LICENSE.md +0 -25
  1041. package/node_modules_lambda/w3c-xmlserializer/README.md +0 -41
  1042. package/node_modules_lambda/w3c-xmlserializer/lib/attributes.js +0 -125
  1043. package/node_modules_lambda/w3c-xmlserializer/lib/constants.js +0 -44
  1044. package/node_modules_lambda/w3c-xmlserializer/lib/serialize.js +0 -365
  1045. package/node_modules_lambda/w3c-xmlserializer/package.json +0 -33
  1046. package/node_modules_lambda/webidl-conversions/LICENSE.md +0 -12
  1047. package/node_modules_lambda/webidl-conversions/README.md +0 -99
  1048. package/node_modules_lambda/webidl-conversions/lib/index.js +0 -450
  1049. package/node_modules_lambda/webidl-conversions/package.json +0 -35
  1050. package/node_modules_lambda/whatwg-encoding/LICENSE.txt +0 -7
  1051. package/node_modules_lambda/whatwg-encoding/README.md +0 -50
  1052. package/node_modules_lambda/whatwg-encoding/lib/labels-to-names.json +0 -216
  1053. package/node_modules_lambda/whatwg-encoding/lib/supported-names.json +0 -37
  1054. package/node_modules_lambda/whatwg-encoding/lib/whatwg-encoding.js +0 -47
  1055. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/.github/dependabot.yml +0 -11
  1056. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/Changelog.md +0 -212
  1057. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/LICENSE +0 -21
  1058. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/README.md +0 -130
  1059. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-codec.js +0 -597
  1060. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/dbcs-data.js +0 -188
  1061. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/index.js +0 -23
  1062. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/internal.js +0 -198
  1063. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-codec.js +0 -72
  1064. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data-generated.js +0 -451
  1065. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/sbcs-data.js +0 -179
  1066. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/big5-added.json +0 -122
  1067. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp936.json +0 -264
  1068. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp949.json +0 -273
  1069. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/cp950.json +0 -177
  1070. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/eucjp.json +0 -182
  1071. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +0 -1
  1072. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/gbk-added.json +0 -56
  1073. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/tables/shiftjis.json +0 -125
  1074. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf16.js +0 -197
  1075. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf32.js +0 -319
  1076. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/encodings/utf7.js +0 -290
  1077. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/bom-handling.js +0 -52
  1078. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/index.d.ts +0 -41
  1079. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/index.js +0 -180
  1080. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/lib/streams.js +0 -109
  1081. package/node_modules_lambda/whatwg-encoding/node_modules/iconv-lite/package.json +0 -44
  1082. package/node_modules_lambda/whatwg-encoding/package.json +0 -33
  1083. package/node_modules_lambda/whatwg-mimetype/LICENSE.txt +0 -7
  1084. package/node_modules_lambda/whatwg-mimetype/README.md +0 -101
  1085. package/node_modules_lambda/whatwg-mimetype/lib/mime-type-parameters.js +0 -70
  1086. package/node_modules_lambda/whatwg-mimetype/lib/mime-type.js +0 -127
  1087. package/node_modules_lambda/whatwg-mimetype/lib/parser.js +0 -105
  1088. package/node_modules_lambda/whatwg-mimetype/lib/serializer.js +0 -25
  1089. package/node_modules_lambda/whatwg-mimetype/lib/utils.js +0 -60
  1090. package/node_modules_lambda/whatwg-mimetype/package.json +0 -47
  1091. package/node_modules_lambda/whatwg-url/LICENSE.txt +0 -21
  1092. package/node_modules_lambda/whatwg-url/README.md +0 -105
  1093. package/node_modules_lambda/whatwg-url/index.js +0 -25
  1094. package/node_modules_lambda/whatwg-url/lib/Function.js +0 -42
  1095. package/node_modules_lambda/whatwg-url/lib/URL-impl.js +0 -217
  1096. package/node_modules_lambda/whatwg-url/lib/URL.js +0 -442
  1097. package/node_modules_lambda/whatwg-url/lib/URLSearchParams-impl.js +0 -130
  1098. package/node_modules_lambda/whatwg-url/lib/URLSearchParams.js +0 -472
  1099. package/node_modules_lambda/whatwg-url/lib/VoidFunction.js +0 -26
  1100. package/node_modules_lambda/whatwg-url/lib/encoding.js +0 -16
  1101. package/node_modules_lambda/whatwg-url/lib/infra.js +0 -26
  1102. package/node_modules_lambda/whatwg-url/lib/percent-encoding.js +0 -142
  1103. package/node_modules_lambda/whatwg-url/lib/url-state-machine.js +0 -1234
  1104. package/node_modules_lambda/whatwg-url/lib/urlencoded.js +0 -106
  1105. package/node_modules_lambda/whatwg-url/lib/utils.js +0 -190
  1106. package/node_modules_lambda/whatwg-url/package.json +0 -58
  1107. package/node_modules_lambda/whatwg-url/webidl2js-wrapper.js +0 -7
  1108. package/node_modules_lambda/word-wrap/LICENSE +0 -21
  1109. package/node_modules_lambda/word-wrap/README.md +0 -182
  1110. package/node_modules_lambda/word-wrap/index.d.ts +0 -50
  1111. package/node_modules_lambda/word-wrap/index.js +0 -46
  1112. package/node_modules_lambda/word-wrap/package.json +0 -77
  1113. package/node_modules_lambda/ws/LICENSE +0 -19
  1114. package/node_modules_lambda/ws/README.md +0 -495
  1115. package/node_modules_lambda/ws/browser.js +0 -8
  1116. package/node_modules_lambda/ws/index.js +0 -13
  1117. package/node_modules_lambda/ws/lib/buffer-util.js +0 -127
  1118. package/node_modules_lambda/ws/lib/constants.js +0 -12
  1119. package/node_modules_lambda/ws/lib/event-target.js +0 -266
  1120. package/node_modules_lambda/ws/lib/extension.js +0 -203
  1121. package/node_modules_lambda/ws/lib/limiter.js +0 -55
  1122. package/node_modules_lambda/ws/lib/permessage-deflate.js +0 -511
  1123. package/node_modules_lambda/ws/lib/receiver.js +0 -618
  1124. package/node_modules_lambda/ws/lib/sender.js +0 -478
  1125. package/node_modules_lambda/ws/lib/stream.js +0 -159
  1126. package/node_modules_lambda/ws/lib/subprotocol.js +0 -62
  1127. package/node_modules_lambda/ws/lib/validation.js +0 -125
  1128. package/node_modules_lambda/ws/lib/websocket-server.js +0 -535
  1129. package/node_modules_lambda/ws/lib/websocket.js +0 -1296
  1130. package/node_modules_lambda/ws/package.json +0 -61
  1131. package/node_modules_lambda/ws/wrapper.mjs +0 -8
  1132. package/node_modules_lambda/xml-name-validator/LICENSE.txt +0 -176
  1133. package/node_modules_lambda/xml-name-validator/README.md +0 -35
  1134. package/node_modules_lambda/xml-name-validator/lib/xml-name-validator.js +0 -9
  1135. package/node_modules_lambda/xml-name-validator/package.json +0 -30
  1136. package/node_modules_lambda/xmlchars/LICENSE +0 -18
  1137. package/node_modules_lambda/xmlchars/README.md +0 -33
  1138. package/node_modules_lambda/xmlchars/package.json +0 -51
  1139. package/node_modules_lambda/xmlchars/xml/1.0/ed4.d.ts +0 -31
  1140. package/node_modules_lambda/xmlchars/xml/1.0/ed4.js +0 -44
  1141. package/node_modules_lambda/xmlchars/xml/1.0/ed4.js.map +0 -1
  1142. package/node_modules_lambda/xmlchars/xml/1.0/ed5.d.ts +0 -51
  1143. package/node_modules_lambda/xmlchars/xml/1.0/ed5.js +0 -105
  1144. package/node_modules_lambda/xmlchars/xml/1.0/ed5.js.map +0 -1
  1145. package/node_modules_lambda/xmlchars/xml/1.1/ed2.d.ts +0 -73
  1146. package/node_modules_lambda/xmlchars/xml/1.1/ed2.js +0 -145
  1147. package/node_modules_lambda/xmlchars/xml/1.1/ed2.js.map +0 -1
  1148. package/node_modules_lambda/xmlchars/xmlchars.d.ts +0 -170
  1149. package/node_modules_lambda/xmlchars/xmlchars.js +0 -191
  1150. package/node_modules_lambda/xmlchars/xmlchars.js.map +0 -1
  1151. package/node_modules_lambda/xmlchars/xmlns/1.0/ed3.d.ts +0 -28
  1152. package/node_modules_lambda/xmlchars/xmlns/1.0/ed3.js +0 -65
  1153. package/node_modules_lambda/xmlchars/xmlns/1.0/ed3.js.map +0 -1
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";var e=require("path"),t=require("events"),n=require("child_process"),r=require("fs"),o=require("process"),i=require("jsdom");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(e),l=s(t),c=s(n),u=s(r),p=s(o),d={exports:{}},h={},f={};class m extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}f.CommanderError=m,f.InvalidArgumentError=class extends m{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};const{InvalidArgumentError:g}=f;h.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new g(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},h.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"};var v={},y={};const{humanReadableArgName:b}=h;y.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));if(e._hasImplicitHelpCommand()){const[,n,r]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),o=e.createCommand(n).helpOption(!1);o.description(e._helpCommandDescription),r&&o.arguments(r),t.push(o)}return this.sortSubcommands&&t.sort(((e,t)=>e.name().localeCompare(t.name()))),t}visibleOptions(e){const t=e.options.filter((e=>!e.hidden)),n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),r=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||r){let o;o=n?r?e.createOption(e._helpFlags,e._helpDescription):e.createOption(e._helpShortFlag,e._helpDescription):e.createOption(e._helpLongFlag,e._helpDescription),t.push(o)}if(this.sortOptions){const e=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");t.sort(((t,n)=>e(t).localeCompare(e(n))))}return t}visibleArguments(e){return e._argsDescription&&e._args.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""})),e._args.find((e=>e.description))?e._args:[]}subcommandTerm(e){const t=e._args.map((e=>b(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,n)=>Math.max(e,t.subcommandTerm(n).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,n)=>Math.max(e,t.argumentTerm(n).length)),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let t=e.parent;t;t=t.parent)n=t.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}return void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){const n=t.padWidth(e,t),r=t.helpWidth||80;function o(e,o){if(o){const i=`${e.padEnd(n+2)}${o}`;return t.wrap(i,r-2,n+2)}return e}function i(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let s=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);a.length>0&&(s=s.concat([a,""]));const l=t.visibleArguments(e).map((e=>o(t.argumentTerm(e),t.argumentDescription(e))));l.length>0&&(s=s.concat(["Arguments:",i(l),""]));const c=t.visibleOptions(e).map((e=>o(t.optionTerm(e),t.optionDescription(e))));c.length>0&&(s=s.concat(["Options:",i(c),""]));const u=t.visibleCommands(e).map((e=>o(t.subcommandTerm(e),t.subcommandDescription(e))));return u.length>0&&(s=s.concat(["Commands:",i(u),""])),s.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,r=40){if(e.match(/[\n]\s+/))return e;const o=t-n;if(o<r)return e;const i=e.slice(0,n),s=e.slice(n),a=" ".repeat(n),l=new RegExp(".{1,"+(o-1)+"}([\\s​]|$)|[^\\s​]+?([\\s​]|$)","g");return i+(s.match(l)||[]).map(((e,t)=>("\n"===e.slice(-1)&&(e=e.slice(0,e.length-1)),(t>0?a:"")+e.trimRight()))).join("\n")}};var D={};const{InvalidArgumentError:E}=f;function w(e){let t,n;const r=e.split(/[ |,]+/);return r.length>1&&!/^[[<]/.test(r[1])&&(t=r.shift()),n=r.shift(),!t&&/^-[^-]$/.test(n)&&(t=n,n=void 0),{shortFlag:t,longFlag:n}}D.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const n=w(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){return this.implied=Object.assign(this.implied||{},e),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new E(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},D.splitOptionFlags=w,D.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach((e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)})),this.negativeOptions.forEach(((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)}))}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return!0;const r=this.negativeOptions.get(n).presetArg,o=void 0!==r&&r;return t.negate===(o===e)}};var C={};C.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const n=e.startsWith("--");n&&(e=e.slice(2),t=t.map((e=>e.slice(2))));let r=[],o=3;return t.forEach((t=>{if(t.length<=1)return;const n=function(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);const n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let o=1;o<=e.length;o++){let i=1;i=e[o-1]===t[r-1]?0:1,n[o][r]=Math.min(n[o-1][r]+1,n[o][r-1]+1,n[o-1][r-1]+i),o>1&&r>1&&e[o-1]===t[r-2]&&e[o-2]===t[r-1]&&(n[o][r]=Math.min(n[o][r],n[o-2][r-2]+1))}return n[e.length][t.length]}(e,t),i=Math.max(e.length,t.length);(i-n)/i>.4&&(n<o?(o=n,r=[t]):n===o&&r.push(t))})),r.sort(((e,t)=>e.localeCompare(t))),n&&(r=r.map((e=>`--${e}`))),r.length>1?`\n(Did you mean one of ${r.join(", ")}?)`:1===r.length?`\n(Did you mean ${r[0]}?)`:""};const A=l.default.EventEmitter,x=c.default,k=a.default,_=u.default,O=p.default,{Argument:S,humanReadableArgName:N}=h,{CommanderError:T}=f,{Help:F}=y,{Option:M,splitOptionFlags:I,DualOptions:$}=D,{suggestSimilar:L}=C;class B extends A{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:e=>O.stdout.write(e),writeErr:e=>O.stderr.write(e),getOutHelpWidth:()=>O.stdout.isTTY?O.stdout.columns:void 0,getErrHelpWidth:()=>O.stderr.isTTY?O.stderr.columns:void 0,outputError:(e,t)=>t(e)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,t,n){let r=t,o=n;"object"==typeof r&&null!==r&&(o=r,r=null),o=o||{};const[,i,s]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(i);return r&&(a.description(r),a._executableHandler=!0),o.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!o.noHelp&&!o.hidden),a._executableFile=o.executableFile||null,s&&a.arguments(s),this.commands.push(a),a.parent=this,a.copyInheritedSettings(this),r?this:a}createCommand(e){return new B(e)}createHelp(){return Object.assign(new F,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,t){return new S(e,t)}argument(e,t,n,r){const o=this.createArgument(e,t);return"function"==typeof n?o.default(r).argParser(n):o.default(n),this.addArgument(o),this}arguments(e){return e.split(/ +/).forEach((e=>{this.argument(e)})),this}addArgument(e){const t=this._args.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,t){return!1===e?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,"string"==typeof e&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return void 0===this._addImplicitHelpCommand?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new T(e,t,n)),O.exit(e)}action(e){return this._actionHandler=t=>{const n=this._args.length,r=t.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)},this}createOption(e,t){return new M(e,t)}addOption(e){const t=e.name(),n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(n,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(n,e.defaultValue,"default");this.options.push(e);const r=(t,r,o)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const i=this.getOptionValue(n);if(null!==t&&e.parseArg)try{t=e.parseArg(t,i)}catch(e){if("commander.invalidArgument"===e.code){const t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}else null!==t&&e.variadic&&(t=e._concatValue(t,i));null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(n,t,o)};return this.on("option:"+t,(t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;r(t,n,"cli")})),e.envVar&&this.on("optionEnv:"+t,(t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;r(t,n,"env")})),this}_optionEx(e,t,n,r,o){if("object"==typeof t&&t instanceof M)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const i=this.createOption(t,n);if(i.makeOptionMandatory(!!e.mandatory),"function"==typeof r)i.default(o).argParser(r);else if(r instanceof RegExp){const e=r;r=(t,n)=>{const r=e.exec(t);return r?r[0]:n},i.default(o).argParser(r)}else i.default(r);return this.addOption(i)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this}setOptionValueWithSource(e,t,n){return this.setOptionValue(e,t),this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");let n;switch(t=t||{},void 0===e&&(e=O.argv,O.versions&&O.versions.electron&&(t.from="electron")),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":O.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){const n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){const n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1;const r=[".js",".ts",".tsx",".mjs",".cjs"];function o(e,t){const n=k.resolve(e,t);if(_.existsSync(n))return n;if(r.includes(k.extname(t)))return;const o=r.find((e=>_.existsSync(`${n}${e}`)));return o?`${n}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i,s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let e;try{e=_.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}a=k.resolve(k.dirname(e),a)}if(a){let t=o(a,s);if(!t&&!e._executableFile&&this._scriptPath){const n=k.basename(this._scriptPath,k.extname(this._scriptPath));n!==this._name&&(t=o(a,`${n}-${e._name}`))}s=t||s}if(n=r.includes(k.extname(s)),"win32"!==O.platform?n?(t.unshift(s),t=R(O.execArgv).concat(t),i=x.spawn(O.argv[0],t,{stdio:"inherit"})):i=x.spawn(s,t,{stdio:"inherit"}):(t.unshift(s),t=R(O.execArgv).concat(t),i=x.spawn(O.execPath,t,{stdio:"inherit"})),!i.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{O.on(e,(()=>{!1===i.killed&&null===i.exitCode&&i.kill(e)}))}))}const l=this._exitCallback;l?i.on("close",(()=>{l(new T(O.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):i.on("close",O.exit.bind(O)),i.on("error",(t=>{if("ENOENT"===t.code){const t=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${s}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(n)}if("EACCES"===t.code)throw new Error(`'${s}' not executable`);if(l){const e=new T(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,l(e)}else O.exit(1)})),this.runningCommand=i}_dispatchSubcommand(e,t,n){const r=this._findCommand(e);let o;return r||this.help({error:!0}),o=this._chainOrCallSubCommandHook(o,r,"preSubcommand"),o=this._chainOrCall(o,(()=>{if(!r._executableHandler)return r._parseCommand(t,n);this._executeSubCommand(r,t.concat(n))})),o}_checkNumberOfArguments(){this._args.forEach(((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())})),this._args.length>0&&this._args[this._args.length-1].variadic||this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,n)=>{let r=t;if(null!==t&&e.parseArg)try{r=e.parseArg(t,n)}catch(n){if("commander.invalidArgument"===n.code){const r=`error: command-argument value '${t}' is invalid for argument '${e.name()}'. ${n.message}`;this.error(r,{exitCode:n.exitCode,code:n.code})}throw n}return r};this._checkNumberOfArguments();const t=[];this._args.forEach(((n,r)=>{let o=n.defaultValue;n.variadic?r<this.args.length?(o=this.args.slice(r),n.parseArg&&(o=o.reduce(((t,r)=>e(n,r,t)),n.defaultValue))):void 0===o&&(o=[]):r<this.args.length&&(o=this.args[r],n.parseArg&&(o=e(n,o,n.defaultValue))),t[r]=o})),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&"function"==typeof e.then?e.then((()=>t())):t()}_chainOrCallHooks(e,t){let n=e;const r=[];return j(this).reverse().filter((e=>void 0!==e._lifeCycleHooks[t])).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{r.push({hookedCommand:e,callback:t})}))})),"postAction"===t&&r.reverse(),r.forEach((e=>{n=this._chainOrCall(n,(()=>e.callback(e.hookedCommand,this)))})),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return void 0!==this._lifeCycleHooks[n]&&this._lifeCycleHooks[n].forEach((e=>{r=this._chainOrCall(r,(()=>e(this,t)))})),r}_parseCommand(e,t){const n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return 1===e.length&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return P(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),P(this,n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){let n;return r(),this._processArguments(),n=this._chainOrCallHooks(n,"preAction"),n=this._chainOrCall(n,(()=>this._actionHandler(this.processedArgs))),this.parent&&(n=this._chainOrCall(n,(()=>{this.parent.emit(o,e,t)}))),n=this._chainOrCallHooks(n,"postAction"),n}if(this.parent&&this.parent.listenerCount(o))r(),this._processArguments(),this.parent.emit(o,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach((t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)})),t=e.filter((e=>e.conflictsWith.length>0));t.forEach((t=>{const n=e.find((e=>t.conflictsWith.includes(e.attributeName())));n&&this._conflictingOption(t,n)}))}_checkForConflictingOptions(){for(let e=this;e;e=e.parent)e._checkForConflictingLocalOptions()}parseOptions(e){const t=[],n=[];let r=t;const o=e.slice();function i(e){return e.length>1&&"-"===e[0]}let s=null;for(;o.length;){const e=o.shift();if("--"===e){r===n&&r.push(e),r.push(...o);break}if(!s||i(e)){if(s=null,i(e)){const t=this._findOption(e);if(t){if(t.required){const e=o.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;o.length>0&&!i(o[0])&&(e=o.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);s=t.variadic?t:null;continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),o.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(i(e)&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===n.length){if(this._findCommand(e)){t.push(e),o.length>0&&n.push(...o);break}if(e===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(e),o.length>0&&t.push(...o);break}if(this._defaultCommandName){n.push(e),o.length>0&&n.push(...o);break}}if(this._passThroughOptions){r.push(e),o.length>0&&r.push(...o);break}r.push(e)}else this.emit(`option:${s.name()}`,e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return j(this).reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const n=t||{},r=n.exitCode||1,o=n.code||"commander.error";this._exit(r,o,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in O.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,O.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}}))}_parseOptionsImplied(){const e=new $(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((n=>void 0!==n.implied&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n))).forEach((e=>{Object.keys(e.implied).filter((e=>!t(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const n=e=>{const t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find((e=>e.negate&&t===e.attributeName())),o=this.options.find((e=>!e.negate&&t===e.attributeName()));return r&&(void 0===r.presetArg&&!1===n||void 0!==r.presetArg&&n===r.presetArg)?r:o||e},r=e=>{const t=n(e),r=t.attributeName();return"env"===this.getOptionValueSource(r)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},o=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],r=this;do{const e=r.createHelp().visibleOptions(r).filter((e=>e.long)).map((e=>e.long));n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=L(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this._args.length,n=1===t?"":"s",r=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach((e=>{n.push(e.name()),e.alias()&&n.push(e.alias())})),t=L(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";const r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this.options.push(r),this.on("option:"+r.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this._args.map((e=>N(e)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=k.basename(e,k.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp();return void 0===t.helpWidth&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){const t={error:!!(e=e||{}).error};let n;return n=t.error?e=>this._outputConfiguration.writeErr(e):e=>this._outputConfiguration.writeOut(e),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const n=this._getHelpContext(e);j(this).reverse().forEach((e=>e.emit("beforeAllHelp",n))),this.emit("beforeHelp",n);let r=this.helpInformation(n);if(t&&(r=t(r),"string"!=typeof r&&!Buffer.isBuffer(r)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(r),this.emit(this._helpLongFlag),this.emit("afterHelp",n),j(this).forEach((e=>e.emit("afterAllHelp",n)))}helpOption(e,t){if("boolean"==typeof e)return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;const n=I(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e);let t=O.exitCode||0;0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`);const r=`${e}Help`;return this.on(r,(e=>{let n;n="function"==typeof t?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)})),this}}function P(e,t){e._hasHelpOption&&t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag))&&(e.outputHelp(),e._exit(0,"commander.helpDisplayed","(outputHelp)"))}function R(e){return e.map((e=>{if(!e.startsWith("--inspect"))return e;let t,n,r="127.0.0.1",o="9229";return null!==(n=e.match(/^(--inspect(-brk)?)$/))?t=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=n[1],/^\d+$/.test(n[3])?o=n[3]:r=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=n[1],r=n[3],o=n[4]),t&&"0"!==o?`${t}=${r}:${parseInt(o)+1}`:e}))}function j(e){const t=[];for(let n=e;n;n=n.parent)t.push(n);return t}v.Command=B,function(e,t){const{Argument:n}=h,{Command:r}=v,{CommanderError:o,InvalidArgumentError:i}=f,{Help:s}=y,{Option:a}=D;(t=e.exports=new r).program=t,t.Argument=n,t.Command=r,t.CommanderError=o,t.Help=s,t.InvalidArgumentError=i,t.InvalidOptionArgumentError=i,t.Option=a}(d,d.exports);var H=d.exports;const{program:V,createCommand:z,createArgument:q,createOption:W,CommanderError:K,InvalidArgumentError:U,InvalidOptionArgumentError:J,Command:G,Argument:Y,Option:X,Help:Q}=H;
1
+ "use strict";var e=require("path"),t=require("events"),n=require("child_process"),r=require("fs"),o=require("process"),i=require("jsdom");function s(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var a=s(e),l=s(t),c=s(n),u=s(r),d=s(o),p={exports:{}},h={},f={};class m extends Error{constructor(e,t,n){super(n),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name,this.code=t,this.exitCode=e,this.nestedError=void 0}}f.CommanderError=m,f.InvalidArgumentError=class extends m{constructor(e){super(1,"commander.invalidArgument",e),Error.captureStackTrace(this,this.constructor),this.name=this.constructor.name}};const{InvalidArgumentError:g}=f;h.Argument=class{constructor(e,t){switch(this.description=t||"",this.variadic=!1,this.parseArg=void 0,this.defaultValue=void 0,this.defaultValueDescription=void 0,this.argChoices=void 0,e[0]){case"<":this.required=!0,this._name=e.slice(1,-1);break;case"[":this.required=!1,this._name=e.slice(1,-1);break;default:this.required=!0,this._name=e}this._name.length>3&&"..."===this._name.slice(-3)&&(this.variadic=!0,this._name=this._name.slice(0,-3))}name(){return this._name}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}argParser(e){return this.parseArg=e,this}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new g(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}argRequired(){return this.required=!0,this}argOptional(){return this.required=!1,this}},h.humanReadableArgName=function(e){const t=e.name()+(!0===e.variadic?"...":"");return e.required?"<"+t+">":"["+t+"]"};var v={},y={};const{humanReadableArgName:b}=h;y.Help=class{constructor(){this.helpWidth=void 0,this.sortSubcommands=!1,this.sortOptions=!1}visibleCommands(e){const t=e.commands.filter((e=>!e._hidden));if(e._hasImplicitHelpCommand()){const[,n,r]=e._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/),o=e.createCommand(n).helpOption(!1);o.description(e._helpCommandDescription),r&&o.arguments(r),t.push(o)}return this.sortSubcommands&&t.sort(((e,t)=>e.name().localeCompare(t.name()))),t}visibleOptions(e){const t=e.options.filter((e=>!e.hidden)),n=e._hasHelpOption&&e._helpShortFlag&&!e._findOption(e._helpShortFlag),r=e._hasHelpOption&&!e._findOption(e._helpLongFlag);if(n||r){let o;o=n?r?e.createOption(e._helpFlags,e._helpDescription):e.createOption(e._helpShortFlag,e._helpDescription):e.createOption(e._helpLongFlag,e._helpDescription),t.push(o)}if(this.sortOptions){const e=e=>e.short?e.short.replace(/^-/,""):e.long.replace(/^--/,"");t.sort(((t,n)=>e(t).localeCompare(e(n))))}return t}visibleArguments(e){return e._argsDescription&&e._args.forEach((t=>{t.description=t.description||e._argsDescription[t.name()]||""})),e._args.find((e=>e.description))?e._args:[]}subcommandTerm(e){const t=e._args.map((e=>b(e))).join(" ");return e._name+(e._aliases[0]?"|"+e._aliases[0]:"")+(e.options.length?" [options]":"")+(t?" "+t:"")}optionTerm(e){return e.flags}argumentTerm(e){return e.name()}longestSubcommandTermLength(e,t){return t.visibleCommands(e).reduce(((e,n)=>Math.max(e,t.subcommandTerm(n).length)),0)}longestOptionTermLength(e,t){return t.visibleOptions(e).reduce(((e,n)=>Math.max(e,t.optionTerm(n).length)),0)}longestArgumentTermLength(e,t){return t.visibleArguments(e).reduce(((e,n)=>Math.max(e,t.argumentTerm(n).length)),0)}commandUsage(e){let t=e._name;e._aliases[0]&&(t=t+"|"+e._aliases[0]);let n="";for(let t=e.parent;t;t=t.parent)n=t.name()+" "+n;return n+t+" "+e.usage()}commandDescription(e){return e.description()}subcommandDescription(e){return e.summary()||e.description()}optionDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue){(e.required||e.optional||e.isBoolean()&&"boolean"==typeof e.defaultValue)&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`)}return void 0!==e.presetArg&&e.optional&&t.push(`preset: ${JSON.stringify(e.presetArg)}`),void 0!==e.envVar&&t.push(`env: ${e.envVar}`),t.length>0?`${e.description} (${t.join(", ")})`:e.description}argumentDescription(e){const t=[];if(e.argChoices&&t.push(`choices: ${e.argChoices.map((e=>JSON.stringify(e))).join(", ")}`),void 0!==e.defaultValue&&t.push(`default: ${e.defaultValueDescription||JSON.stringify(e.defaultValue)}`),t.length>0){const n=`(${t.join(", ")})`;return e.description?`${e.description} ${n}`:n}return e.description}formatHelp(e,t){const n=t.padWidth(e,t),r=t.helpWidth||80;function o(e,o){if(o){const i=`${e.padEnd(n+2)}${o}`;return t.wrap(i,r-2,n+2)}return e}function i(e){return e.join("\n").replace(/^/gm," ".repeat(2))}let s=[`Usage: ${t.commandUsage(e)}`,""];const a=t.commandDescription(e);a.length>0&&(s=s.concat([a,""]));const l=t.visibleArguments(e).map((e=>o(t.argumentTerm(e),t.argumentDescription(e))));l.length>0&&(s=s.concat(["Arguments:",i(l),""]));const c=t.visibleOptions(e).map((e=>o(t.optionTerm(e),t.optionDescription(e))));c.length>0&&(s=s.concat(["Options:",i(c),""]));const u=t.visibleCommands(e).map((e=>o(t.subcommandTerm(e),t.subcommandDescription(e))));return u.length>0&&(s=s.concat(["Commands:",i(u),""])),s.join("\n")}padWidth(e,t){return Math.max(t.longestOptionTermLength(e,t),t.longestSubcommandTermLength(e,t),t.longestArgumentTermLength(e,t))}wrap(e,t,n,r=40){if(e.match(/[\n]\s+/))return e;const o=t-n;if(o<r)return e;const i=e.slice(0,n),s=e.slice(n),a=" ".repeat(n),l=new RegExp(".{1,"+(o-1)+"}([\\s​]|$)|[^\\s​]+?([\\s​]|$)","g");return i+(s.match(l)||[]).map(((e,t)=>("\n"===e.slice(-1)&&(e=e.slice(0,e.length-1)),(t>0?a:"")+e.trimRight()))).join("\n")}};var D={};const{InvalidArgumentError:E}=f;function C(e){let t,n;const r=e.split(/[ |,]+/);return r.length>1&&!/^[[<]/.test(r[1])&&(t=r.shift()),n=r.shift(),!t&&/^-[^-]$/.test(n)&&(t=n,n=void 0),{shortFlag:t,longFlag:n}}D.Option=class{constructor(e,t){this.flags=e,this.description=t||"",this.required=e.includes("<"),this.optional=e.includes("["),this.variadic=/\w\.\.\.[>\]]$/.test(e),this.mandatory=!1;const n=C(e);this.short=n.shortFlag,this.long=n.longFlag,this.negate=!1,this.long&&(this.negate=this.long.startsWith("--no-")),this.defaultValue=void 0,this.defaultValueDescription=void 0,this.presetArg=void 0,this.envVar=void 0,this.parseArg=void 0,this.hidden=!1,this.argChoices=void 0,this.conflictsWith=[],this.implied=void 0}default(e,t){return this.defaultValue=e,this.defaultValueDescription=t,this}preset(e){return this.presetArg=e,this}conflicts(e){return this.conflictsWith=this.conflictsWith.concat(e),this}implies(e){return this.implied=Object.assign(this.implied||{},e),this}env(e){return this.envVar=e,this}argParser(e){return this.parseArg=e,this}makeOptionMandatory(e=!0){return this.mandatory=!!e,this}hideHelp(e=!0){return this.hidden=!!e,this}_concatValue(e,t){return t!==this.defaultValue&&Array.isArray(t)?t.concat(e):[e]}choices(e){return this.argChoices=e.slice(),this.parseArg=(e,t)=>{if(!this.argChoices.includes(e))throw new E(`Allowed choices are ${this.argChoices.join(", ")}.`);return this.variadic?this._concatValue(e,t):e},this}name(){return this.long?this.long.replace(/^--/,""):this.short.replace(/^-/,"")}attributeName(){return this.name().replace(/^no-/,"").split("-").reduce(((e,t)=>e+t[0].toUpperCase()+t.slice(1)))}is(e){return this.short===e||this.long===e}isBoolean(){return!this.required&&!this.optional&&!this.negate}},D.splitOptionFlags=C,D.DualOptions=class{constructor(e){this.positiveOptions=new Map,this.negativeOptions=new Map,this.dualOptions=new Set,e.forEach((e=>{e.negate?this.negativeOptions.set(e.attributeName(),e):this.positiveOptions.set(e.attributeName(),e)})),this.negativeOptions.forEach(((e,t)=>{this.positiveOptions.has(t)&&this.dualOptions.add(t)}))}valueFromOption(e,t){const n=t.attributeName();if(!this.dualOptions.has(n))return!0;const r=this.negativeOptions.get(n).presetArg,o=void 0!==r&&r;return t.negate===(o===e)}};var w={};w.suggestSimilar=function(e,t){if(!t||0===t.length)return"";t=Array.from(new Set(t));const n=e.startsWith("--");n&&(e=e.slice(2),t=t.map((e=>e.slice(2))));let r=[],o=3;return t.forEach((t=>{if(t.length<=1)return;const n=function(e,t){if(Math.abs(e.length-t.length)>3)return Math.max(e.length,t.length);const n=[];for(let t=0;t<=e.length;t++)n[t]=[t];for(let e=0;e<=t.length;e++)n[0][e]=e;for(let r=1;r<=t.length;r++)for(let o=1;o<=e.length;o++){let i=1;i=e[o-1]===t[r-1]?0:1,n[o][r]=Math.min(n[o-1][r]+1,n[o][r-1]+1,n[o-1][r-1]+i),o>1&&r>1&&e[o-1]===t[r-2]&&e[o-2]===t[r-1]&&(n[o][r]=Math.min(n[o][r],n[o-2][r-2]+1))}return n[e.length][t.length]}(e,t),i=Math.max(e.length,t.length);(i-n)/i>.4&&(n<o?(o=n,r=[t]):n===o&&r.push(t))})),r.sort(((e,t)=>e.localeCompare(t))),n&&(r=r.map((e=>`--${e}`))),r.length>1?`\n(Did you mean one of ${r.join(", ")}?)`:1===r.length?`\n(Did you mean ${r[0]}?)`:""};const A=l.default.EventEmitter,_=c.default,k=a.default,x=u.default,O=d.default,{Argument:S,humanReadableArgName:N}=h,{CommanderError:F}=f,{Help:T}=y,{Option:M,splitOptionFlags:I,DualOptions:$}=D,{suggestSimilar:B}=w;class L extends A{constructor(e){super(),this.commands=[],this.options=[],this.parent=null,this._allowUnknownOption=!1,this._allowExcessArguments=!0,this._args=[],this.args=[],this.rawArgs=[],this.processedArgs=[],this._scriptPath=null,this._name=e||"",this._optionValues={},this._optionValueSources={},this._storeOptionsAsProperties=!1,this._actionHandler=null,this._executableHandler=!1,this._executableFile=null,this._executableDir=null,this._defaultCommandName=null,this._exitCallback=null,this._aliases=[],this._combineFlagAndOptionalValue=!0,this._description="",this._summary="",this._argsDescription=void 0,this._enablePositionalOptions=!1,this._passThroughOptions=!1,this._lifeCycleHooks={},this._showHelpAfterError=!1,this._showSuggestionAfterError=!0,this._outputConfiguration={writeOut:e=>O.stdout.write(e),writeErr:e=>O.stderr.write(e),getOutHelpWidth:()=>O.stdout.isTTY?O.stdout.columns:void 0,getErrHelpWidth:()=>O.stderr.isTTY?O.stderr.columns:void 0,outputError:(e,t)=>t(e)},this._hidden=!1,this._hasHelpOption=!0,this._helpFlags="-h, --help",this._helpDescription="display help for command",this._helpShortFlag="-h",this._helpLongFlag="--help",this._addImplicitHelpCommand=void 0,this._helpCommandName="help",this._helpCommandnameAndArgs="help [command]",this._helpCommandDescription="display help for command",this._helpConfiguration={}}copyInheritedSettings(e){return this._outputConfiguration=e._outputConfiguration,this._hasHelpOption=e._hasHelpOption,this._helpFlags=e._helpFlags,this._helpDescription=e._helpDescription,this._helpShortFlag=e._helpShortFlag,this._helpLongFlag=e._helpLongFlag,this._helpCommandName=e._helpCommandName,this._helpCommandnameAndArgs=e._helpCommandnameAndArgs,this._helpCommandDescription=e._helpCommandDescription,this._helpConfiguration=e._helpConfiguration,this._exitCallback=e._exitCallback,this._storeOptionsAsProperties=e._storeOptionsAsProperties,this._combineFlagAndOptionalValue=e._combineFlagAndOptionalValue,this._allowExcessArguments=e._allowExcessArguments,this._enablePositionalOptions=e._enablePositionalOptions,this._showHelpAfterError=e._showHelpAfterError,this._showSuggestionAfterError=e._showSuggestionAfterError,this}command(e,t,n){let r=t,o=n;"object"==typeof r&&null!==r&&(o=r,r=null),o=o||{};const[,i,s]=e.match(/([^ ]+) *(.*)/),a=this.createCommand(i);return r&&(a.description(r),a._executableHandler=!0),o.isDefault&&(this._defaultCommandName=a._name),a._hidden=!(!o.noHelp&&!o.hidden),a._executableFile=o.executableFile||null,s&&a.arguments(s),this.commands.push(a),a.parent=this,a.copyInheritedSettings(this),r?this:a}createCommand(e){return new L(e)}createHelp(){return Object.assign(new T,this.configureHelp())}configureHelp(e){return void 0===e?this._helpConfiguration:(this._helpConfiguration=e,this)}configureOutput(e){return void 0===e?this._outputConfiguration:(Object.assign(this._outputConfiguration,e),this)}showHelpAfterError(e=!0){return"string"!=typeof e&&(e=!!e),this._showHelpAfterError=e,this}showSuggestionAfterError(e=!0){return this._showSuggestionAfterError=!!e,this}addCommand(e,t){if(!e._name)throw new Error("Command passed to .addCommand() must have a name\n- specify the name in Command constructor or using .name()");return(t=t||{}).isDefault&&(this._defaultCommandName=e._name),(t.noHelp||t.hidden)&&(e._hidden=!0),this.commands.push(e),e.parent=this,this}createArgument(e,t){return new S(e,t)}argument(e,t,n,r){const o=this.createArgument(e,t);return"function"==typeof n?o.default(r).argParser(n):o.default(n),this.addArgument(o),this}arguments(e){return e.split(/ +/).forEach((e=>{this.argument(e)})),this}addArgument(e){const t=this._args.slice(-1)[0];if(t&&t.variadic)throw new Error(`only the last argument can be variadic '${t.name()}'`);if(e.required&&void 0!==e.defaultValue&&void 0===e.parseArg)throw new Error(`a default value for a required argument is never used: '${e.name()}'`);return this._args.push(e),this}addHelpCommand(e,t){return!1===e?this._addImplicitHelpCommand=!1:(this._addImplicitHelpCommand=!0,"string"==typeof e&&(this._helpCommandName=e.split(" ")[0],this._helpCommandnameAndArgs=e),this._helpCommandDescription=t||this._helpCommandDescription),this}_hasImplicitHelpCommand(){return void 0===this._addImplicitHelpCommand?this.commands.length&&!this._actionHandler&&!this._findCommand("help"):this._addImplicitHelpCommand}hook(e,t){const n=["preSubcommand","preAction","postAction"];if(!n.includes(e))throw new Error(`Unexpected value for event passed to hook : '${e}'.\nExpecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._lifeCycleHooks[e].push(t):this._lifeCycleHooks[e]=[t],this}exitOverride(e){return this._exitCallback=e||(e=>{if("commander.executeSubCommandAsync"!==e.code)throw e}),this}_exit(e,t,n){this._exitCallback&&this._exitCallback(new F(e,t,n)),O.exit(e)}action(e){return this._actionHandler=t=>{const n=this._args.length,r=t.slice(0,n);return this._storeOptionsAsProperties?r[n]=this:r[n]=this.opts(),r.push(this),e.apply(this,r)},this}createOption(e,t){return new M(e,t)}addOption(e){const t=e.name(),n=e.attributeName();if(e.negate){const t=e.long.replace(/^--no-/,"--");this._findOption(t)||this.setOptionValueWithSource(n,void 0===e.defaultValue||e.defaultValue,"default")}else void 0!==e.defaultValue&&this.setOptionValueWithSource(n,e.defaultValue,"default");this.options.push(e);const r=(t,r,o)=>{null==t&&void 0!==e.presetArg&&(t=e.presetArg);const i=this.getOptionValue(n);if(null!==t&&e.parseArg)try{t=e.parseArg(t,i)}catch(e){if("commander.invalidArgument"===e.code){const t=`${r} ${e.message}`;this.error(t,{exitCode:e.exitCode,code:e.code})}throw e}else null!==t&&e.variadic&&(t=e._concatValue(t,i));null==t&&(t=!e.negate&&(!(!e.isBoolean()&&!e.optional)||"")),this.setOptionValueWithSource(n,t,o)};return this.on("option:"+t,(t=>{const n=`error: option '${e.flags}' argument '${t}' is invalid.`;r(t,n,"cli")})),e.envVar&&this.on("optionEnv:"+t,(t=>{const n=`error: option '${e.flags}' value '${t}' from env '${e.envVar}' is invalid.`;r(t,n,"env")})),this}_optionEx(e,t,n,r,o){if("object"==typeof t&&t instanceof M)throw new Error("To add an Option object use addOption() instead of option() or requiredOption()");const i=this.createOption(t,n);if(i.makeOptionMandatory(!!e.mandatory),"function"==typeof r)i.default(o).argParser(r);else if(r instanceof RegExp){const e=r;r=(t,n)=>{const r=e.exec(t);return r?r[0]:n},i.default(o).argParser(r)}else i.default(r);return this.addOption(i)}option(e,t,n,r){return this._optionEx({},e,t,n,r)}requiredOption(e,t,n,r){return this._optionEx({mandatory:!0},e,t,n,r)}combineFlagAndOptionalValue(e=!0){return this._combineFlagAndOptionalValue=!!e,this}allowUnknownOption(e=!0){return this._allowUnknownOption=!!e,this}allowExcessArguments(e=!0){return this._allowExcessArguments=!!e,this}enablePositionalOptions(e=!0){return this._enablePositionalOptions=!!e,this}passThroughOptions(e=!0){if(this._passThroughOptions=!!e,this.parent&&e&&!this.parent._enablePositionalOptions)throw new Error("passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)");return this}storeOptionsAsProperties(e=!0){if(this._storeOptionsAsProperties=!!e,this.options.length)throw new Error("call .storeOptionsAsProperties() before adding options");return this}getOptionValue(e){return this._storeOptionsAsProperties?this[e]:this._optionValues[e]}setOptionValue(e,t){return this._storeOptionsAsProperties?this[e]=t:this._optionValues[e]=t,this}setOptionValueWithSource(e,t,n){return this.setOptionValue(e,t),this._optionValueSources[e]=n,this}getOptionValueSource(e){return this._optionValueSources[e]}_prepareUserArgs(e,t){if(void 0!==e&&!Array.isArray(e))throw new Error("first parameter to parse must be array or undefined");let n;switch(t=t||{},void 0===e&&(e=O.argv,O.versions&&O.versions.electron&&(t.from="electron")),this.rawArgs=e.slice(),t.from){case void 0:case"node":this._scriptPath=e[1],n=e.slice(2);break;case"electron":O.defaultApp?(this._scriptPath=e[1],n=e.slice(2)):n=e.slice(1);break;case"user":n=e.slice(0);break;default:throw new Error(`unexpected parse option { from: '${t.from}' }`)}return!this._name&&this._scriptPath&&this.nameFromFilename(this._scriptPath),this._name=this._name||"program",n}parse(e,t){const n=this._prepareUserArgs(e,t);return this._parseCommand([],n),this}async parseAsync(e,t){const n=this._prepareUserArgs(e,t);return await this._parseCommand([],n),this}_executeSubCommand(e,t){t=t.slice();let n=!1;const r=[".js",".ts",".tsx",".mjs",".cjs"];function o(e,t){const n=k.resolve(e,t);if(x.existsSync(n))return n;if(r.includes(k.extname(t)))return;const o=r.find((e=>x.existsSync(`${n}${e}`)));return o?`${n}${o}`:void 0}this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();let i,s=e._executableFile||`${this._name}-${e._name}`,a=this._executableDir||"";if(this._scriptPath){let e;try{e=x.realpathSync(this._scriptPath)}catch(t){e=this._scriptPath}a=k.resolve(k.dirname(e),a)}if(a){let t=o(a,s);if(!t&&!e._executableFile&&this._scriptPath){const n=k.basename(this._scriptPath,k.extname(this._scriptPath));n!==this._name&&(t=o(a,`${n}-${e._name}`))}s=t||s}if(n=r.includes(k.extname(s)),"win32"!==O.platform?n?(t.unshift(s),t=R(O.execArgv).concat(t),i=_.spawn(O.argv[0],t,{stdio:"inherit"})):i=_.spawn(s,t,{stdio:"inherit"}):(t.unshift(s),t=R(O.execArgv).concat(t),i=_.spawn(O.execPath,t,{stdio:"inherit"})),!i.killed){["SIGUSR1","SIGUSR2","SIGTERM","SIGINT","SIGHUP"].forEach((e=>{O.on(e,(()=>{!1===i.killed&&null===i.exitCode&&i.kill(e)}))}))}const l=this._exitCallback;l?i.on("close",(()=>{l(new F(O.exitCode||0,"commander.executeSubCommandAsync","(close)"))})):i.on("close",O.exit.bind(O)),i.on("error",(t=>{if("ENOENT"===t.code){const t=a?`searched for local subcommand relative to directory '${a}'`:"no directory for search for local subcommand, use .executableDir() to supply a custom directory",n=`'${s}' does not exist\n - if '${e._name}' is not meant to be an executable command, remove description parameter from '.command()' and use '.description()' instead\n - if the default executable name is not suitable, use the executableFile option to supply a custom name or path\n - ${t}`;throw new Error(n)}if("EACCES"===t.code)throw new Error(`'${s}' not executable`);if(l){const e=new F(1,"commander.executeSubCommandAsync","(error)");e.nestedError=t,l(e)}else O.exit(1)})),this.runningCommand=i}_dispatchSubcommand(e,t,n){const r=this._findCommand(e);let o;return r||this.help({error:!0}),o=this._chainOrCallSubCommandHook(o,r,"preSubcommand"),o=this._chainOrCall(o,(()=>{if(!r._executableHandler)return r._parseCommand(t,n);this._executeSubCommand(r,t.concat(n))})),o}_checkNumberOfArguments(){this._args.forEach(((e,t)=>{e.required&&null==this.args[t]&&this.missingArgument(e.name())})),this._args.length>0&&this._args[this._args.length-1].variadic||this.args.length>this._args.length&&this._excessArguments(this.args)}_processArguments(){const e=(e,t,n)=>{let r=t;if(null!==t&&e.parseArg)try{r=e.parseArg(t,n)}catch(n){if("commander.invalidArgument"===n.code){const r=`error: command-argument value '${t}' is invalid for argument '${e.name()}'. ${n.message}`;this.error(r,{exitCode:n.exitCode,code:n.code})}throw n}return r};this._checkNumberOfArguments();const t=[];this._args.forEach(((n,r)=>{let o=n.defaultValue;n.variadic?r<this.args.length?(o=this.args.slice(r),n.parseArg&&(o=o.reduce(((t,r)=>e(n,r,t)),n.defaultValue))):void 0===o&&(o=[]):r<this.args.length&&(o=this.args[r],n.parseArg&&(o=e(n,o,n.defaultValue))),t[r]=o})),this.processedArgs=t}_chainOrCall(e,t){return e&&e.then&&"function"==typeof e.then?e.then((()=>t())):t()}_chainOrCallHooks(e,t){let n=e;const r=[];return z(this).reverse().filter((e=>void 0!==e._lifeCycleHooks[t])).forEach((e=>{e._lifeCycleHooks[t].forEach((t=>{r.push({hookedCommand:e,callback:t})}))})),"postAction"===t&&r.reverse(),r.forEach((e=>{n=this._chainOrCall(n,(()=>e.callback(e.hookedCommand,this)))})),n}_chainOrCallSubCommandHook(e,t,n){let r=e;return void 0!==this._lifeCycleHooks[n]&&this._lifeCycleHooks[n].forEach((e=>{r=this._chainOrCall(r,(()=>e(this,t)))})),r}_parseCommand(e,t){const n=this.parseOptions(t);if(this._parseOptionsEnv(),this._parseOptionsImplied(),e=e.concat(n.operands),t=n.unknown,this.args=e.concat(t),e&&this._findCommand(e[0]))return this._dispatchSubcommand(e[0],e.slice(1),t);if(this._hasImplicitHelpCommand()&&e[0]===this._helpCommandName)return 1===e.length&&this.help(),this._dispatchSubcommand(e[1],[],[this._helpLongFlag]);if(this._defaultCommandName)return P(this,t),this._dispatchSubcommand(this._defaultCommandName,e,t);!this.commands.length||0!==this.args.length||this._actionHandler||this._defaultCommandName||this.help({error:!0}),P(this,n.unknown),this._checkForMissingMandatoryOptions(),this._checkForConflictingOptions();const r=()=>{n.unknown.length>0&&this.unknownOption(n.unknown[0])},o=`command:${this.name()}`;if(this._actionHandler){let n;return r(),this._processArguments(),n=this._chainOrCallHooks(n,"preAction"),n=this._chainOrCall(n,(()=>this._actionHandler(this.processedArgs))),this.parent&&(n=this._chainOrCall(n,(()=>{this.parent.emit(o,e,t)}))),n=this._chainOrCallHooks(n,"postAction"),n}if(this.parent&&this.parent.listenerCount(o))r(),this._processArguments(),this.parent.emit(o,e,t);else if(e.length){if(this._findCommand("*"))return this._dispatchSubcommand("*",e,t);this.listenerCount("command:*")?this.emit("command:*",e,t):this.commands.length?this.unknownCommand():(r(),this._processArguments())}else this.commands.length?(r(),this.help({error:!0})):(r(),this._processArguments())}_findCommand(e){if(e)return this.commands.find((t=>t._name===e||t._aliases.includes(e)))}_findOption(e){return this.options.find((t=>t.is(e)))}_checkForMissingMandatoryOptions(){for(let e=this;e;e=e.parent)e.options.forEach((t=>{t.mandatory&&void 0===e.getOptionValue(t.attributeName())&&e.missingMandatoryOptionValue(t)}))}_checkForConflictingLocalOptions(){const e=this.options.filter((e=>{const t=e.attributeName();return void 0!==this.getOptionValue(t)&&"default"!==this.getOptionValueSource(t)})),t=e.filter((e=>e.conflictsWith.length>0));t.forEach((t=>{const n=e.find((e=>t.conflictsWith.includes(e.attributeName())));n&&this._conflictingOption(t,n)}))}_checkForConflictingOptions(){for(let e=this;e;e=e.parent)e._checkForConflictingLocalOptions()}parseOptions(e){const t=[],n=[];let r=t;const o=e.slice();function i(e){return e.length>1&&"-"===e[0]}let s=null;for(;o.length;){const e=o.shift();if("--"===e){r===n&&r.push(e),r.push(...o);break}if(!s||i(e)){if(s=null,i(e)){const t=this._findOption(e);if(t){if(t.required){const e=o.shift();void 0===e&&this.optionMissingArgument(t),this.emit(`option:${t.name()}`,e)}else if(t.optional){let e=null;o.length>0&&!i(o[0])&&(e=o.shift()),this.emit(`option:${t.name()}`,e)}else this.emit(`option:${t.name()}`);s=t.variadic?t:null;continue}}if(e.length>2&&"-"===e[0]&&"-"!==e[1]){const t=this._findOption(`-${e[1]}`);if(t){t.required||t.optional&&this._combineFlagAndOptionalValue?this.emit(`option:${t.name()}`,e.slice(2)):(this.emit(`option:${t.name()}`),o.unshift(`-${e.slice(2)}`));continue}}if(/^--[^=]+=/.test(e)){const t=e.indexOf("="),n=this._findOption(e.slice(0,t));if(n&&(n.required||n.optional)){this.emit(`option:${n.name()}`,e.slice(t+1));continue}}if(i(e)&&(r=n),(this._enablePositionalOptions||this._passThroughOptions)&&0===t.length&&0===n.length){if(this._findCommand(e)){t.push(e),o.length>0&&n.push(...o);break}if(e===this._helpCommandName&&this._hasImplicitHelpCommand()){t.push(e),o.length>0&&t.push(...o);break}if(this._defaultCommandName){n.push(e),o.length>0&&n.push(...o);break}}if(this._passThroughOptions){r.push(e),o.length>0&&r.push(...o);break}r.push(e)}else this.emit(`option:${s.name()}`,e)}return{operands:t,unknown:n}}opts(){if(this._storeOptionsAsProperties){const e={},t=this.options.length;for(let n=0;n<t;n++){const t=this.options[n].attributeName();e[t]=t===this._versionOptionName?this._version:this[t]}return e}return this._optionValues}optsWithGlobals(){return z(this).reduce(((e,t)=>Object.assign(e,t.opts())),{})}error(e,t){this._outputConfiguration.outputError(`${e}\n`,this._outputConfiguration.writeErr),"string"==typeof this._showHelpAfterError?this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`):this._showHelpAfterError&&(this._outputConfiguration.writeErr("\n"),this.outputHelp({error:!0}));const n=t||{},r=n.exitCode||1,o=n.code||"commander.error";this._exit(r,o,e)}_parseOptionsEnv(){this.options.forEach((e=>{if(e.envVar&&e.envVar in O.env){const t=e.attributeName();(void 0===this.getOptionValue(t)||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,O.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}}))}_parseOptionsImplied(){const e=new $(this.options),t=e=>void 0!==this.getOptionValue(e)&&!["default","implied"].includes(this.getOptionValueSource(e));this.options.filter((n=>void 0!==n.implied&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n))).forEach((e=>{Object.keys(e.implied).filter((e=>!t(e))).forEach((t=>{this.setOptionValueWithSource(t,e.implied[t],"implied")}))}))}missingArgument(e){const t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){const t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){const t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){const n=e=>{const t=e.attributeName(),n=this.getOptionValue(t),r=this.options.find((e=>e.negate&&t===e.attributeName())),o=this.options.find((e=>!e.negate&&t===e.attributeName()));return r&&(void 0===r.presetArg&&!1===n||void 0!==r.presetArg&&n===r.presetArg)?r:o||e},r=e=>{const t=n(e),r=t.attributeName();return"env"===this.getOptionValueSource(r)?`environment variable '${t.envVar}'`:`option '${t.flags}'`},o=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(o,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let n=[],r=this;do{const e=r.createHelp().visibleOptions(r).filter((e=>e.long)).map((e=>e.long));n=n.concat(e),r=r.parent}while(r&&!r._enablePositionalOptions);t=B(e,n)}const n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;const t=this._args.length,n=1===t?"":"s",r=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(r,{code:"commander.excessArguments"})}unknownCommand(){const e=this.args[0];let t="";if(this._showSuggestionAfterError){const n=[];this.createHelp().visibleCommands(this).forEach((e=>{n.push(e.name()),e.alias()&&n.push(e.alias())})),t=B(e,n)}const n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(void 0===e)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";const r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this.options.push(r),this.on("option:"+r.name(),(()=>{this._outputConfiguration.writeOut(`${e}\n`),this._exit(0,"commander.version",e)})),this}description(e,t){return void 0===e&&void 0===t?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return void 0===e?this._summary:(this._summary=e,this)}alias(e){if(void 0===e)return this._aliases[0];let t=this;if(0!==this.commands.length&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");return t._aliases.push(e),this}aliases(e){return void 0===e?this._aliases:(e.forEach((e=>this.alias(e))),this)}usage(e){if(void 0===e){if(this._usage)return this._usage;const e=this._args.map((e=>N(e)));return[].concat(this.options.length||this._hasHelpOption?"[options]":[],this.commands.length?"[command]":[],this._args.length?e:[]).join(" ")}return this._usage=e,this}name(e){return void 0===e?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=k.basename(e,k.extname(e)),this}executableDir(e){return void 0===e?this._executableDir:(this._executableDir=e,this)}helpInformation(e){const t=this.createHelp();return void 0===t.helpWidth&&(t.helpWidth=e&&e.error?this._outputConfiguration.getErrHelpWidth():this._outputConfiguration.getOutHelpWidth()),t.formatHelp(this,t)}_getHelpContext(e){const t={error:!!(e=e||{}).error};let n;return n=t.error?e=>this._outputConfiguration.writeErr(e):e=>this._outputConfiguration.writeOut(e),t.write=e.write||n,t.command=this,t}outputHelp(e){let t;"function"==typeof e&&(t=e,e=void 0);const n=this._getHelpContext(e);z(this).reverse().forEach((e=>e.emit("beforeAllHelp",n))),this.emit("beforeHelp",n);let r=this.helpInformation(n);if(t&&(r=t(r),"string"!=typeof r&&!Buffer.isBuffer(r)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(r),this.emit(this._helpLongFlag),this.emit("afterHelp",n),z(this).forEach((e=>e.emit("afterAllHelp",n)))}helpOption(e,t){if("boolean"==typeof e)return this._hasHelpOption=e,this;this._helpFlags=e||this._helpFlags,this._helpDescription=t||this._helpDescription;const n=I(this._helpFlags);return this._helpShortFlag=n.shortFlag,this._helpLongFlag=n.longFlag,this}help(e){this.outputHelp(e);let t=O.exitCode||0;0===t&&e&&"function"!=typeof e&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){const n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.\nExpecting one of '${n.join("', '")}'`);const r=`${e}Help`;return this.on(r,(e=>{let n;n="function"==typeof t?t({error:e.error,command:e.command}):t,n&&e.write(`${n}\n`)})),this}}function P(e,t){e._hasHelpOption&&t.find((t=>t===e._helpLongFlag||t===e._helpShortFlag))&&(e.outputHelp(),e._exit(0,"commander.helpDisplayed","(outputHelp)"))}function R(e){return e.map((e=>{if(!e.startsWith("--inspect"))return e;let t,n,r="127.0.0.1",o="9229";return null!==(n=e.match(/^(--inspect(-brk)?)$/))?t=n[1]:null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))?(t=n[1],/^\d+$/.test(n[3])?o=n[3]:r=n[3]):null!==(n=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))&&(t=n[1],r=n[3],o=n[4]),t&&"0"!==o?`${t}=${r}:${parseInt(o)+1}`:e}))}function z(e){const t=[];for(let n=e;n;n=n.parent)t.push(n);return t}v.Command=L,function(e,t){const{Argument:n}=h,{Command:r}=v,{CommanderError:o,InvalidArgumentError:i}=f,{Help:s}=y,{Option:a}=D;(t=e.exports=new r).program=t,t.Argument=n,t.Command=r,t.CommanderError=o,t.Help=s,t.InvalidArgumentError=i,t.InvalidOptionArgumentError=i,t.Option=a}(p,p.exports);var j=p.exports;const{program:H,createCommand:V,createArgument:K,createOption:q,CommanderError:W,InvalidArgumentError:U,InvalidOptionArgumentError:G,Command:J,Argument:Y,Option:X,Help:Q}=j;
2
2
  /*!
3
- * Vue.js v2.7.8
3
+ * Vue.js v2.7.10
4
4
  * (c) 2014-2022 Evan You
5
5
  * Released under the MIT License.
6
- */var Z=Object.freeze({}),ee=Array.isArray;function te(e){return null==e}function ne(e){return null!=e}function re(e){return!0===e}function oe(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function ie(e){return"function"==typeof e}function se(e){return null!==e&&"object"==typeof e}var ae=Object.prototype.toString;function le(e){return ae.call(e).slice(8,-1)}function ce(e){return"[object Object]"===ae.call(e)}function ue(e){return"[object RegExp]"===ae.call(e)}function pe(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function de(e){return ne(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function he(e){return null==e?"":Array.isArray(e)||ce(e)&&e.toString===ae?JSON.stringify(e,null,2):String(e)}function fe(e){var t=parseFloat(e);return isNaN(t)?e:t}function me(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var ge=me("slot,component",!0),ve=me("key,ref,slot,slot-scope,is");function ye(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var be=Object.prototype.hasOwnProperty;function De(e,t){return be.call(e,t)}function Ee(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var we=/-(\w)/g,Ce=Ee((function(e){return e.replace(we,(function(e,t){return t?t.toUpperCase():""}))})),Ae=Ee((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),xe=/\B([A-Z])/g,ke=Ee((function(e){return e.replace(xe,"-$1").toLowerCase()}));var _e=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function Oe(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function Se(e,t){for(var n in t)e[n]=t[n];return e}function Ne(e){for(var t={},n=0;n<e.length;n++)e[n]&&Se(t,e[n]);return t}function Te(e,t,n){}var Fe=function(e,t,n){return!1},Me=function(e){return e};function Ie(e,t){if(e===t)return!0;var n=se(e),r=se(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),i=Array.isArray(t);if(o&&i)return e.length===t.length&&e.every((function(e,n){return Ie(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(o||i)return!1;var s=Object.keys(e),a=Object.keys(t);return s.length===a.length&&s.every((function(n){return Ie(e[n],t[n])}))}catch(e){return!1}}function $e(e,t){for(var n=0;n<e.length;n++)if(Ie(e[n],t))return n;return-1}function Le(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}function Be(e,t){return e===t?0===e&&1/e!=1/t:e==e||t==t}var Pe=["component","directive","filter"],Re=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch","renderTracked","renderTriggered"],je={optionMergeStrategies:Object.create(null),silent:!1,productionTip:"production"!==process.env.NODE_ENV,devtools:"production"!==process.env.NODE_ENV,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Fe,isReservedAttr:Fe,isUnknownElement:Fe,getTagNamespace:Te,parsePlatformTagName:Me,mustUseProp:Fe,async:!0,_lifecycleHooks:Re},He=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function Ve(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function ze(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var qe=new RegExp("[^".concat(He.source,".$_\\d]"));var We="__proto__"in{},Ke="undefined"!=typeof window,Ue=Ke&&window.navigator.userAgent.toLowerCase(),Je=Ue&&/msie|trident/.test(Ue),Ge=Ue&&Ue.indexOf("msie 9.0")>0,Ye=Ue&&Ue.indexOf("edge/")>0;Ue&&Ue.indexOf("android");var Xe=Ue&&/iphone|ipad|ipod|ios/.test(Ue);Ue&&/chrome\/\d+/.test(Ue),Ue&&/phantomjs/.test(Ue);var Qe,Ze=Ue&&Ue.match(/firefox\/(\d+)/),et={}.watch,tt=!1;if(Ke)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){tt=!0}}),window.addEventListener("test-passive",null,nt)}catch(e){}var rt=function(){return void 0===Qe&&(Qe=!Ke&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),Qe},ot=Ke&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(e){return"function"==typeof e&&/native code/.test(e.toString())}var st,at="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);st="undefined"!=typeof Set&&it(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var lt=null;function ct(e){void 0===e&&(e=null),e||lt&&lt._scope.off(),lt=e,e&&e._scope.on()}var ut=function(){function e(e,t,n,r,o,i,s,a){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(e.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),e}(),pt=function(e){void 0===e&&(e="");var t=new ut;return t.text=e,t.isComment=!0,t};function dt(e){return new ut(void 0,void 0,void 0,String(e))}function ht(e){var t=new ut(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ft=function(){return ft=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ft.apply(this,arguments)},mt=0,gt=function(){function e(){this.id=mt++,this.subs=[]}return e.prototype.addSub=function(e){this.subs.push(e)},e.prototype.removeSub=function(e){ye(this.subs,e)},e.prototype.depend=function(t){e.target&&(e.target.addDep(this),"production"!==process.env.NODE_ENV&&t&&e.target.onTrack&&e.target.onTrack(ft({effect:e.target},t)))},e.prototype.notify=function(e){var t=this.subs.slice();"production"===process.env.NODE_ENV||je.async||t.sort((function(e,t){return e.id-t.id}));for(var n=0,r=t.length;n<r;n++){if("production"!==process.env.NODE_ENV&&e){var o=t[n];o.onTrigger&&o.onTrigger(ft({effect:t[n]},e))}t[n].update()}},e}();gt.target=null;var vt=[];function yt(e){vt.push(e),gt.target=e}function bt(){vt.pop(),gt.target=vt[vt.length-1]}var Dt=Array.prototype,Et=Object.create(Dt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(e){var t=Dt[e];ze(Et,e,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o,i=t.apply(this,n),s=this.__ob__;switch(e){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&s.observeArray(o),"production"!==process.env.NODE_ENV?s.dep.notify({type:"array mutation",target:this,key:e}):s.dep.notify(),i}))}));var wt=Object.getOwnPropertyNames(Et),Ct={},At=!0;function xt(e){At=e}var kt={notify:Te,depend:Te,addSub:Te,removeSub:Te},_t=function(){function e(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this.value=e,this.shallow=t,this.mock=n,this.dep=n?kt:new gt,this.vmCount=0,ze(e,"__ob__",this),ee(e)){if(!n)if(We)e.__proto__=Et;else for(var r=0,o=wt.length;r<o;r++){ze(e,s=wt[r],Et[s])}t||this.observeArray(e)}else{var i=Object.keys(e);for(r=0;r<i.length;r++){var s;St(e,s=i[r],Ct,void 0,t,n)}}}return e.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Ot(e[t],!1,this.mock)},e}();function Ot(e,t,n){var r;if(!(!se(e)||Lt(e)||e instanceof ut))return De(e,"__ob__")&&e.__ob__ instanceof _t?r=e.__ob__:!At||!n&&rt()||!ee(e)&&!ce(e)||!Object.isExtensible(e)||e.__v_skip||(r=new _t(e,t,n)),r}function St(e,t,n,r,o,i){var s=new gt,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var l=a&&a.get,c=a&&a.set;l&&!c||n!==Ct&&2!==arguments.length||(n=e[t]);var u=!o&&Ot(n,!1,i);return Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var r=l?l.call(e):n;return gt.target&&("production"!==process.env.NODE_ENV?s.depend({target:e,type:"get",key:t}):s.depend(),u&&(u.dep.depend(),ee(r)&&Ft(r))),Lt(r)&&!o?r.value:r},set:function(a){var p=l?l.call(e):n;if(Be(p,a)){if("production"!==process.env.NODE_ENV&&r&&r(),c)c.call(e,a);else{if(l)return;if(!o&&Lt(p)&&!Lt(a))return void(p.value=a);n=a}u=!o&&Ot(a,!1,i),"production"!==process.env.NODE_ENV?s.notify({type:"set",target:e,key:t,newValue:a,oldValue:p}):s.notify()}}}),s}}function Nt(e,t,n){if("production"!==process.env.NODE_ENV&&(te(e)||oe(e))&&Fr("Cannot set reactive property on undefined, null, or primitive value: ".concat(e)),!It(e)){var r=e.__ob__;return ee(e)&&pe(t)?(e.length=Math.max(e.length,t),e.splice(t,1,n),r&&!r.shallow&&r.mock&&Ot(n,!1,!0),n):t in e&&!(t in Object.prototype)?(e[t]=n,n):e._isVue||r&&r.vmCount?("production"!==process.env.NODE_ENV&&Fr("Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option."),n):r?(St(r.value,t,n,void 0,r.shallow,r.mock),"production"!==process.env.NODE_ENV?r.dep.notify({type:"add",target:e,key:t,newValue:n,oldValue:void 0}):r.dep.notify(),n):(e[t]=n,n)}"production"!==process.env.NODE_ENV&&Fr('Set operation on key "'.concat(t,'" failed: target is readonly.'))}function Tt(e,t){if("production"!==process.env.NODE_ENV&&(te(e)||oe(e))&&Fr("Cannot delete reactive property on undefined, null, or primitive value: ".concat(e)),ee(e)&&pe(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount?"production"!==process.env.NODE_ENV&&Fr("Avoid deleting properties on a Vue instance or its root $data - just set it to null."):It(e)?"production"!==process.env.NODE_ENV&&Fr('Delete operation on key "'.concat(t,'" failed: target is readonly.')):De(e,t)&&(delete e[t],n&&("production"!==process.env.NODE_ENV?n.dep.notify({type:"delete",target:e,key:t}):n.dep.notify()))}}function Ft(e){for(var t=void 0,n=0,r=e.length;n<r;n++)(t=e[n])&&t.__ob__&&t.__ob__.dep.depend(),ee(t)&&Ft(t)}function Mt(e){return function(e,t){if(!It(e)){if("production"!==process.env.NODE_ENV){ee(e)&&Fr("Avoid using Array as root value for ".concat(t?"shallowReactive()":"reactive()"," as it cannot be tracked in watch() or watchEffect(). Use ").concat(t?"shallowRef()":"ref()"," instead. This is a Vue-2-only limitation."));var n=e&&e.__ob__;n&&n.shallow!==t&&Fr("Target is already a ".concat(n.shallow?"":"non-","shallow reactive object, and cannot be converted to ").concat(t?"":"non-","shallow."))}var r=Ot(e,t,rt());"production"===process.env.NODE_ENV||r||((null==e||oe(e))&&Fr("value cannot be made reactive: ".concat(String(e))),("Map"===(o=le(e))||"WeakMap"===o||"Set"===o||"WeakSet"===o)&&Fr("Vue 2 does not support reactive collection types such as Map or Set."))}var o}(e,!0),ze(e,"__v_isShallow",!0),e}function It(e){return!(!e||!e.__v_isReadonly)}var $t;function Lt(e){return!(!e||!0!==e.__v_isRef)}function Bt(e){return function(e,t){if(Lt(e))return e;var n={};return ze(n,"__v_isRef",!0),ze(n,"__v_isShallow",t),ze(n,"dep",St(n,"value",e,null,t,rt())),n}(e,!1)}function Pt(e){return Lt(e)?e.value:e}function Rt(e,t,n){Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:function(){var e=t[n];if(Lt(e))return e.value;var r=e&&e.__ob__;return r&&r.dep.depend(),e},set:function(e){var r=t[n];Lt(r)&&!Lt(e)?r.value=e:t[n]=e}})}function jt(e,t,n){var r=e[t];if(Lt(r))return r;var o={get value(){var r=e[t];return void 0===r?n:r},set value(n){e[t]=n}};return ze(o,"__v_isRef",!0),o}function Ht(e,t){var n,r,o=ie(e);o?(n=e,r="production"!==process.env.NODE_ENV?function(){Fr("Write operation failed: computed value is readonly")}:Te):(n=e.get,r=e.set);var i=rt()?null:new Gn(lt,n,Te,{lazy:!0});"production"!==process.env.NODE_ENV&&i&&t&&(i.onTrack=t.onTrack,i.onTrigger=t.onTrigger);var s={effect:i,get value(){return i?(i.dirty&&i.evaluate(),gt.target&&("production"!==process.env.NODE_ENV&&gt.target.onTrack&&gt.target.onTrack({effect:gt.target,target:s,type:"get",key:"value"}),i.depend()),i.value):n()},set value(e){r(e)}};return ze(s,"__v_isRef",!0),ze(s,"__v_isReadonly",o),s}var Vt=function(){function e(e){void 0===e&&(e=!1),this.active=!0,this.effects=[],this.cleanups=[],!e&&$t&&(this.parent=$t,this.index=($t.scopes||($t.scopes=[])).push(this)-1)}return e.prototype.run=function(e){if(this.active){var t=$t;try{return $t=this,e()}finally{$t=t}}else"production"!==process.env.NODE_ENV&&Fr("cannot run an inactive effect scope.")},e.prototype.on=function(){$t=this},e.prototype.off=function(){$t=this.parent},e.prototype.stop=function(e){if(this.active){var t=void 0,n=void 0;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].teardown();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.active=!1}},e}();var zt=Ee((function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}}));function qt(e,t){function n(){var e=n.fns;if(!ee(e))return Sn(e,null,arguments,t,"v-on handler");for(var r=e.slice(),o=0;o<r.length;o++)Sn(r[o],null,arguments,t,"v-on handler")}return n.fns=e,n}function Wt(e,t,n,r,o,i){var s,a,l,c;for(s in e)a=e[s],l=t[s],c=zt(s),te(a)?"production"!==process.env.NODE_ENV&&Fr('Invalid handler for event "'.concat(c.name,'": got ')+String(a),i):te(l)?(te(a.fns)&&(a=e[s]=qt(a,i)),re(c.once)&&(a=e[s]=o(c.name,a,c.capture)),n(c.name,a,c.capture,c.passive,c.params)):a!==l&&(l.fns=a,e[s]=l);for(s in t)te(e[s])&&r((c=zt(s)).name,t[s],c.capture)}function Kt(e,t,n){var r;e instanceof ut&&(e=e.data.hook||(e.data.hook={}));var o=e[t];function i(){n.apply(this,arguments),ye(r.fns,i)}te(o)?r=qt([i]):ne(o.fns)&&re(o.merged)?(r=o).fns.push(i):r=qt([o,i]),r.merged=!0,e[t]=r}function Ut(e,t,n,r,o){if(ne(t)){if(De(t,n))return e[n]=t[n],o||delete t[n],!0;if(De(t,r))return e[n]=t[r],o||delete t[r],!0}return!1}function Jt(e){return oe(e)?[dt(e)]:ee(e)?Yt(e):void 0}function Gt(e){return ne(e)&&ne(e.text)&&!1===e.isComment}function Yt(e,t){var n,r,o,i,s=[];for(n=0;n<e.length;n++)te(r=e[n])||"boolean"==typeof r||(i=s[o=s.length-1],ee(r)?r.length>0&&(Gt((r=Yt(r,"".concat(t||"","_").concat(n)))[0])&&Gt(i)&&(s[o]=dt(i.text+r[0].text),r.shift()),s.push.apply(s,r)):oe(r)?Gt(i)?s[o]=dt(i.text+r):""!==r&&s.push(dt(r)):Gt(r)&&Gt(i)?s[o]=dt(i.text+r.text):(re(e._isVList)&&ne(r.tag)&&te(r.key)&&ne(t)&&(r.key="__vlist".concat(t,"_").concat(n,"__")),s.push(r)));return s}function Xt(e,t){var n,r,o,i,s=null;if(ee(e)||"string"==typeof e)for(s=new Array(e.length),n=0,r=e.length;n<r;n++)s[n]=t(e[n],n);else if("number"==typeof e)for(s=new Array(e),n=0;n<e;n++)s[n]=t(n+1,n);else if(se(e))if(at&&e[Symbol.iterator]){s=[];for(var a=e[Symbol.iterator](),l=a.next();!l.done;)s.push(t(l.value,s.length)),l=a.next()}else for(o=Object.keys(e),s=new Array(o.length),n=0,r=o.length;n<r;n++)i=o[n],s[n]=t(e[i],i,n);return ne(s)||(s=[]),s._isVList=!0,s}function Qt(e,t,n,r){var o,i=this.$scopedSlots[e];i?(n=n||{},r&&("production"===process.env.NODE_ENV||se(r)||Fr("slot v-bind without argument expects an Object",this),n=Se(Se({},r),n)),o=i(n)||(ie(t)?t():t)):o=this.$slots[e]||(ie(t)?t():t);var s=n&&n.slot;return s?this.$createElement("template",{slot:s},o):o}function Zt(e){return Wr(this.$options,"filters",e,!0)||Me}function en(e,t){return ee(e)?-1===e.indexOf(t):e!==t}function tn(e,t,n,r,o){var i=je.keyCodes[t]||n;return o&&r&&!je.keyCodes[t]?en(o,r):i?en(i,e):r?ke(r)!==t:void 0===e}function nn(e,t,n,r,o){if(n)if(se(n)){ee(n)&&(n=Ne(n));var i=void 0,s=function(s){if("class"===s||"style"===s||ve(s))i=e;else{var a=e.attrs&&e.attrs.type;i=r||je.mustUseProp(t,a,s)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var l=Ce(s),c=ke(s);l in i||c in i||(i[s]=n[s],o&&((e.on||(e.on={}))["update:".concat(s)]=function(e){n[s]=e}))};for(var a in n)s(a)}else"production"!==process.env.NODE_ENV&&Fr("v-bind without argument expects an Object or Array value",this);return e}function rn(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||sn(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,this._c,this),"__static__".concat(e),!1),r}function on(e,t,n){return sn(e,"__once__".concat(t).concat(n?"_".concat(n):""),!0),e}function sn(e,t,n){if(ee(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&an(e[r],"".concat(t,"_").concat(r),n);else an(e,t,n)}function an(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function ln(e,t){if(t)if(ce(t)){var n=e.on=e.on?Se({},e.on):{};for(var r in t){var o=n[r],i=t[r];n[r]=o?[].concat(o,i):i}}else"production"!==process.env.NODE_ENV&&Fr("v-on without argument expects an Object value",this);return e}function cn(e,t,n,r){t=t||{$stable:!n};for(var o=0;o<e.length;o++){var i=e[o];ee(i)?cn(i,t,n):i&&(i.proxy&&(i.fn.proxy=!0),t[i.key]=i.fn)}return r&&(t.$key=r),t}function un(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r?e[t[n]]=t[n+1]:"production"!==process.env.NODE_ENV&&""!==r&&null!==r&&Fr("Invalid value for dynamic directive argument (expected string or null): ".concat(r),this)}return e}function pn(e,t){return"string"==typeof e?t+e:e}function dn(e){e._o=on,e._n=fe,e._s=he,e._l=Xt,e._t=Qt,e._q=Ie,e._i=$e,e._m=rn,e._f=Zt,e._k=tn,e._b=nn,e._v=dt,e._e=pt,e._u=cn,e._g=ln,e._d=un,e._p=pn}function hn(e,t){if(!e||!e.length)return{};for(var n={},r=0,o=e.length;r<o;r++){var i=e[r],s=i.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,i.context!==t&&i.fnContext!==t||!s||null==s.slot)(n.default||(n.default=[])).push(i);else{var a=s.slot,l=n[a]||(n[a]=[]);"template"===i.tag?l.push.apply(l,i.children||[]):l.push(i)}}for(var c in n)n[c].every(fn)&&delete n[c];return n}function fn(e){return e.isComment&&!e.asyncFactory||" "===e.text}function mn(e){return e.isComment&&e.asyncFactory}function gn(e,t,n,r){var o,i=Object.keys(n).length>0,s=t?!!t.$stable:!i,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&r&&r!==Z&&a===r.$key&&!i&&!r.$hasNormal)return r;for(var l in o={},t)t[l]&&"$"!==l[0]&&(o[l]=vn(e,n,l,t[l]))}else o={};for(var c in n)c in o||(o[c]=yn(n,c));return t&&Object.isExtensible(t)&&(t._normalized=o),ze(o,"$stable",s),ze(o,"$key",a),ze(o,"$hasNormal",i),o}function vn(e,t,n,r){var o=function(){var t=lt;ct(e);var n=arguments.length?r.apply(null,arguments):r({}),o=(n=n&&"object"==typeof n&&!ee(n)?[n]:Jt(n))&&n[0];return ct(t),n&&(!o||1===n.length&&o.isComment&&!mn(o))?void 0:n};return r.proxy&&Object.defineProperty(t,n,{get:o,enumerable:!0,configurable:!0}),o}function yn(e,t){return function(){return e[t]}}function bn(e){var t=e.$options,n=t.setup;if(n){var r=e._setupContext=function(e){var t=!1;return{get attrs(){if(!e._attrsProxy){var t=e._attrsProxy={};ze(t,"_v_attr_proxy",!0),Dn(t,e.$attrs,Z,e,"$attrs")}return e._attrsProxy},get listeners(){e._listenersProxy||Dn(e._listenersProxy={},e.$listeners,Z,e,"$listeners");return e._listenersProxy},get slots(){return function(e){e._slotsProxy||wn(e._slotsProxy={},e.$scopedSlots);return e._slotsProxy}(e)},emit:_e(e.$emit,e),expose:function(n){"production"!==process.env.NODE_ENV&&(t&&Fr("expose() should be called only once per setup().",e),t=!0),n&&Object.keys(n).forEach((function(t){return Rt(e,n,t)}))}}}(e);ct(e),yt();var o=Sn(n,null,[e._props||Mt({}),r],e,"setup");if(bt(),ct(),ie(o))t.render=o;else if(se(o))if("production"!==process.env.NODE_ENV&&o instanceof ut&&Fr("setup() should not return VNodes directly - return a render function instead."),e._setupState=o,o.__sfc){var i=e._setupProxy={};for(var s in o)"__sfc"!==s&&Rt(i,o,s)}else for(var s in o)Ve(s)?"production"!==process.env.NODE_ENV&&Fr("Avoid using variables that start with _ or $ in setup()."):Rt(e,o,s);else"production"!==process.env.NODE_ENV&&void 0!==o&&Fr("setup() should return an object. Received: ".concat(null===o?"null":typeof o))}}function Dn(e,t,n,r,o){var i=!1;for(var s in t)s in e?t[s]!==n[s]&&(i=!0):(i=!0,En(e,s,r,o));for(var s in e)s in t||(i=!0,delete e[s]);return i}function En(e,t,n,r){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return n[r][t]}})}function wn(e,t){for(var n in t)e[n]=t[n];for(var n in e)n in t||delete e[n]}var Cn=null;function An(e,t){return(e.__esModule||at&&"Module"===e[Symbol.toStringTag])&&(e=e.default),se(e)?t.extend(e):e}function xn(e){if(ee(e))for(var t=0;t<e.length;t++){var n=e[t];if(ne(n)&&(ne(n.componentOptions)||mn(n)))return n}}function kn(e,t,n,r,o,i){return(ee(n)||oe(n))&&(o=r,r=n,n=void 0),re(i)&&(o=2),function(e,t,n,r,o){if(ne(n)&&ne(n.__ob__))return"production"!==process.env.NODE_ENV&&Fr("Avoid using observed data object as vnode data: ".concat(JSON.stringify(n),"\n")+"Always create fresh vnode data objects in each render!",e),pt();ne(n)&&ne(n.is)&&(t=n.is);if(!t)return pt();"production"!==process.env.NODE_ENV&&ne(n)&&ne(n.key)&&!oe(n.key)&&Fr("Avoid using non-primitive value as key, use string/number value instead.",e);ee(r)&&ie(r[0])&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);2===o?r=Jt(r):1===o&&(r=function(e){for(var t=0;t<e.length;t++)if(ee(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var i,s;if("string"==typeof t){var a=void 0;s=e.$vnode&&e.$vnode.ns||je.getTagNamespace(t),je.isReservedTag(t)?("production"!==process.env.NODE_ENV&&ne(n)&&ne(n.nativeOn)&&"component"!==n.tag&&Fr("The .native modifier for v-on is only valid on components but it was used on <".concat(t,">."),e),i=new ut(je.parsePlatformTagName(t),n,r,void 0,void 0,e)):i=n&&n.pre||!ne(a=Wr(e.$options,"components",t))?new ut(t,n,r,void 0,void 0,e):Or(a,n,e,r,t)}else i=Or(t,n,e,r);return ee(i)?i:ne(i)?(ne(s)&&_n(i,s),ne(n)&&function(e){se(e.style)&&zn(e.style);se(e.class)&&zn(e.class)}(n),i):pt()}(e,t,n,r,o)}function _n(e,t,n){if(e.ns=t,"foreignObject"===e.tag&&(t=void 0,n=!0),ne(e.children))for(var r=0,o=e.children.length;r<o;r++){var i=e.children[r];ne(i.tag)&&(te(i.ns)||re(n)&&"svg"!==i.tag)&&_n(i,t,n)}}function On(e,t,n){yt();try{if(t)for(var r=t;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,e,t,n))return}catch(e){Nn(e,r,"errorCaptured hook")}}Nn(e,t,n)}finally{bt()}}function Sn(e,t,n,r,o){var i;try{(i=n?e.apply(t,n):e.call(t))&&!i._isVue&&de(i)&&!i._handled&&(i.catch((function(e){return On(e,r,o+" (Promise/async)")})),i._handled=!0)}catch(e){On(e,r,o)}return i}function Nn(e,t,n){if(je.errorHandler)try{return je.errorHandler.call(null,e,t,n)}catch(t){t!==e&&Tn(t,null,"config.errorHandler")}Tn(e,t,n)}function Tn(e,t,n){if("production"!==process.env.NODE_ENV&&Fr("Error in ".concat(n,': "').concat(e.toString(),'"'),t),!Ke||"undefined"==typeof console)throw e;console.error(e)}var Fn,Mn=!1,In=[],$n=!1;function Ln(){$n=!1;var e=In.slice(0);In.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&it(Promise)){var Bn=Promise.resolve();Fn=function(){Bn.then(Ln),Xe&&setTimeout(Te)},Mn=!0}else if(Je||"undefined"==typeof MutationObserver||!it(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Fn="undefined"!=typeof setImmediate&&it(setImmediate)?function(){setImmediate(Ln)}:function(){setTimeout(Ln,0)};else{var Pn=1,Rn=new MutationObserver(Ln),jn=document.createTextNode(String(Pn));Rn.observe(jn,{characterData:!0}),Fn=function(){Pn=(Pn+1)%2,jn.data=String(Pn)},Mn=!0}function Hn(e,t){var n;if(In.push((function(){if(e)try{e.call(t)}catch(e){On(e,t,"nextTick")}else n&&n(t)})),$n||($n=!0,Fn()),!e&&"undefined"!=typeof Promise)return new Promise((function(e){n=e}))}var Vn=new st;function zn(e){return qn(e,Vn),Vn.clear(),e}function qn(e,t){var n,r,o=ee(e);if(!(!o&&!se(e)||Object.isFrozen(e)||e instanceof ut)){if(e.__ob__){var i=e.__ob__.dep.id;if(t.has(i))return;t.add(i)}if(o)for(n=e.length;n--;)qn(e[n],t);else if(Lt(e))qn(e.value,t);else for(n=(r=Object.keys(e)).length;n--;)qn(e[r[n]],t)}}var Wn,Kn,Un,Jn=0,Gn=function(){function e(e,t,n,r,o){!function(e,t){void 0===t&&(t=$t),t&&t.active&&t.effects.push(e)}(this,$t||(e?e._scope:void 0)),(this.vm=e)&&o&&(e._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before,"production"!==process.env.NODE_ENV&&(this.onTrack=r.onTrack,this.onTrigger=r.onTrigger)):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Jn,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new st,this.newDepIds=new st,this.expression="production"!==process.env.NODE_ENV?t.toString():"",ie(t)?this.getter=t:(this.getter=function(e){if(!qe.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=Te,"production"!==process.env.NODE_ENV&&Fr('Failed watching path: "'.concat(t,'" ')+"Watcher only accepts simple dot-delimited paths. For full control, use a function instead.",e))),this.value=this.lazy?void 0:this.get()}return e.prototype.get=function(){var e;yt(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;On(e,t,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&zn(e),bt(),this.cleanupDeps()}return e},e.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},e.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},e.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null!=ur[t])return;if(e===gt.target&&e.noRecurse)return;if(ur[t]=!0,hr){for(var n=lr.length-1;n>fr&&lr[n].id>e.id;)n--;lr.splice(n+1,0,e)}else lr.push(e);if(!dr){if(dr=!0,"production"!==process.env.NODE_ENV&&!je.async)return void br();Hn(br)}}(this)},e.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||se(e)||this.deep){var t=this.value;if(this.value=e,this.user){var n='callback for watcher "'.concat(this.expression,'"');Sn(this.cb,this.vm,[e,t],this.vm,n)}else this.cb.call(this.vm,e,t)}}},e.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},e.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},e.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&ye(this.vm._scope.effects,this),this.active){for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},e}();if("production"!==process.env.NODE_ENV){var Yn=Ke&&window.performance;Yn&&Yn.mark&&Yn.measure&&Yn.clearMarks&&Yn.clearMeasures&&(Wn=function(e){return Yn.mark(e)},Kn=function(e,t,n){Yn.measure(e,t,n),Yn.clearMarks(t),Yn.clearMarks(n)})}function Xn(e,t){Un.$on(e,t)}function Qn(e,t){Un.$off(e,t)}function Zn(e,t){var n=Un;return function r(){var o=t.apply(null,arguments);null!==o&&n.$off(e,r)}}function er(e,t,n){Un=e,Wt(t,n||{},Xn,Qn,Zn,e),Un=void 0}var tr=null,nr=!1;function rr(e){var t=tr;return tr=e,function(){tr=t}}function or(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function ir(e,t){if(t){if(e._directInactive=!1,or(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)ir(e.$children[n]);ar(e,"activated")}}function sr(e,t){if(!(t&&(e._directInactive=!0,or(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)sr(e.$children[n]);ar(e,"deactivated")}}function ar(e,t,n,r){void 0===r&&(r=!0),yt();var o=lt;r&&ct(e);var i=e.$options[t],s="".concat(t," hook");if(i)for(var a=0,l=i.length;a<l;a++)Sn(i[a],e,n||null,e,s);e._hasHookEvent&&e.$emit("hook:"+t),r&&ct(o),bt()}var lr=[],cr=[],ur={},pr={},dr=!1,hr=!1,fr=0;var mr=0,gr=Date.now;if(Ke&&!Je){var vr=window.performance;vr&&"function"==typeof vr.now&&gr()>document.createEvent("Event").timeStamp&&(gr=function(){return vr.now()})}var yr=function(e,t){if(e.post){if(!t.post)return 1}else if(t.post)return-1;return e.id-t.id};function br(){var e,t;for(mr=gr(),hr=!0,lr.sort(yr),fr=0;fr<lr.length;fr++)if((e=lr[fr]).before&&e.before(),t=e.id,ur[t]=null,e.run(),"production"!==process.env.NODE_ENV&&null!=ur[t]&&(pr[t]=(pr[t]||0)+1,pr[t]>100)){Fr("You may have an infinite update loop "+(e.user?'in watcher with expression "'.concat(e.expression,'"'):"in a component render function."),e.vm);break}var n=cr.slice(),r=lr.slice();fr=lr.length=cr.length=0,ur={},"production"!==process.env.NODE_ENV&&(pr={}),dr=hr=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,ir(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&ar(r,"updated")}}(r),ot&&je.devtools&&ot.emit("flush")}function Dr(e){var t=e.$options.provide;if(t){var n=ie(t)?t.call(e):t;if(!se(n))return;for(var r=function(e){var t=e._provided,n=e.$parent&&e.$parent._provided;return n===t?e._provided=Object.create(n):t}(e),o=at?Reflect.ownKeys(n):Object.keys(n),i=0;i<o.length;i++){var s=o[i];Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(n,s))}}}function Er(e,t){if(e){for(var n=Object.create(null),r=at?Reflect.ownKeys(e):Object.keys(e),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){var s=e[i].from;if(s in t._provided)n[i]=t._provided[s];else if("default"in e[i]){var a=e[i].default;n[i]=ie(a)?a.call(t):a}else"production"!==process.env.NODE_ENV&&Fr('Injection "'.concat(i,'" not found'),t)}}return n}}function wr(e,t,n,r,o){var i,s=this,a=o.options;De(r,"_uid")?(i=Object.create(r))._original=r:(i=r,r=r._original);var l=re(a._compiled),c=!l;this.data=e,this.props=t,this.children=n,this.parent=r,this.listeners=e.on||Z,this.injections=Er(a.inject,r),this.slots=function(){return s.$slots||gn(r,e.scopedSlots,s.$slots=hn(n,r)),s.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return gn(r,e.scopedSlots,this.slots())}}),l&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=gn(r,e.scopedSlots,this.$slots)),a._scopeId?this._c=function(e,t,n,o){var s=kn(i,e,t,n,o,c);return s&&!ee(s)&&(s.fnScopeId=a._scopeId,s.fnContext=r),s}:this._c=function(e,t,n,r){return kn(i,e,t,n,r,c)}}function Cr(e,t,n,r,o){var i=ht(e);return i.fnContext=n,i.fnOptions=r,"production"!==process.env.NODE_ENV&&((i.devtoolsMeta=i.devtoolsMeta||{}).renderContext=o),t.slot&&((i.data||(i.data={})).slot=t.slot),i}function Ar(e,t){for(var n in t)e[Ce(n)]=t[n]}function xr(e){return e.name||e.__name||e._componentTag}dn(wr.prototype);var kr={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;kr.prepatch(n,n)}else{(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;ne(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns);return new e.componentOptions.Ctor(n)}(e,tr)).$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,o){"production"!==process.env.NODE_ENV&&(nr=!0);var i=r.data.scopedSlots,s=e.$scopedSlots,a=!!(i&&!i.$stable||s!==Z&&!s.$stable||i&&e.$scopedSlots.$key!==i.$key||!i&&e.$scopedSlots.$key),l=!!(o||e.$options._renderChildren||a),c=e.$vnode;e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=o;var u=r.data.attrs||Z;e._attrsProxy&&Dn(e._attrsProxy,u,c.data&&c.data.attrs||Z,e,"$attrs")&&(l=!0),e.$attrs=u,n=n||Z;var p=e.$options._parentListeners;if(e._listenersProxy&&Dn(e._listenersProxy,n,p||Z,e,"$listeners"),e.$listeners=e.$options._parentListeners=n,er(e,n,p),t&&e.$options.props){xt(!1);for(var d=e._props,h=e.$options._propKeys||[],f=0;f<h.length;f++){var m=h[f],g=e.$options.props;d[m]=Kr(m,g,t,e)}xt(!0),e.$options.propsData=t}l&&(e.$slots=hn(o,r.context),e.$forceUpdate()),"production"!==process.env.NODE_ENV&&(nr=!1)}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,ar(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,cr.push(t)):ir(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?sr(t,!0):t.$destroy())}},_r=Object.keys(kr);function Or(e,t,n,r,o){if(!te(e)){var i=n.$options._base;if(se(e)&&(e=i.extend(e)),"function"==typeof e){var s;if(te(e.cid)&&(e=function(e,t){if(re(e.error)&&ne(e.errorComp))return e.errorComp;if(ne(e.resolved))return e.resolved;var n=Cn;if(n&&ne(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n),re(e.loading)&&ne(e.loadingComp))return e.loadingComp;if(n&&!ne(e.owners)){var r=e.owners=[n],o=!0,i=null,s=null;n.$on("hook:destroyed",(function(){return ye(r,n)}));var a=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==i&&(clearTimeout(i),i=null),null!==s&&(clearTimeout(s),s=null))},l=Le((function(n){e.resolved=An(n,t),o?r.length=0:a(!0)})),c=Le((function(t){"production"!==process.env.NODE_ENV&&Fr("Failed to resolve async component: ".concat(String(e))+(t?"\nReason: ".concat(t):"")),ne(e.errorComp)&&(e.error=!0,a(!0))})),u=e(l,c);return se(u)&&(de(u)?te(e.resolved)&&u.then(l,c):de(u.component)&&(u.component.then(l,c),ne(u.error)&&(e.errorComp=An(u.error,t)),ne(u.loading)&&(e.loadingComp=An(u.loading,t),0===u.delay?e.loading=!0:i=setTimeout((function(){i=null,te(e.resolved)&&te(e.error)&&(e.loading=!0,a(!1))}),u.delay||200)),ne(u.timeout)&&(s=setTimeout((function(){s=null,te(e.resolved)&&c("production"!==process.env.NODE_ENV?"timeout (".concat(u.timeout,"ms)"):null)}),u.timeout)))),o=!1,e.loading?e.loadingComp:e.resolved}}(s=e,i),void 0===e))return function(e,t,n,r,o){var i=pt();return i.asyncFactory=e,i.asyncMeta={data:t,context:n,children:r,tag:o},i}(s,t,n,r,o);t=t||{},Do(e),ne(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var o=t.on||(t.on={}),i=o[r],s=t.model.callback;ne(i)?(ee(i)?-1===i.indexOf(s):i!==s)&&(o[r]=[s].concat(i)):o[r]=s}(e.options,t);var a=function(e,t,n){var r=t.options.props;if(!te(r)){var o={},i=e.attrs,s=e.props;if(ne(i)||ne(s))for(var a in r){var l=ke(a);if("production"!==process.env.NODE_ENV){var c=a.toLowerCase();a!==c&&i&&De(i,c)&&Mr('Prop "'.concat(c,'" is passed to component ')+"".concat(Tr(n||t),", but the declared prop name is")+' "'.concat(a,'". ')+"Note that HTML attributes are case-insensitive and camelCased props need to use their kebab-case equivalents when using in-DOM "+'templates. You should probably use "'.concat(l,'" instead of "').concat(a,'".'))}Ut(o,s,a,l,!0)||Ut(o,i,a,l,!1)}return o}}(t,e,o);if(re(e.options.functional))return function(e,t,n,r,o){var i=e.options,s={},a=i.props;if(ne(a))for(var l in a)s[l]=Kr(l,a,t||Z);else ne(n.attrs)&&Ar(s,n.attrs),ne(n.props)&&Ar(s,n.props);var c=new wr(n,s,o,r,e),u=i.render.call(null,c._c,c);if(u instanceof ut)return Cr(u,n,c.parent,i,c);if(ee(u)){for(var p=Jt(u)||[],d=new Array(p.length),h=0;h<p.length;h++)d[h]=Cr(p[h],n,c.parent,i,c);return d}}(e,a,t,n,r);var l=t.on;if(t.on=t.nativeOn,re(e.options.abstract)){var c=t.slot;t={},c&&(t.slot=c)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<_r.length;n++){var r=_r[n],o=t[r],i=kr[r];o===i||o&&o._merged||(t[r]=o?Sr(i,o):i)}}(t);var u=xr(e.options)||o;return new ut("vue-component-".concat(e.cid).concat(u?"-".concat(u):""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:a,listeners:l,tag:o,children:r},s)}"production"!==process.env.NODE_ENV&&Fr("Invalid Component definition: ".concat(String(e)),n)}}function Sr(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}var Nr,Tr,Fr=Te,Mr=Te;if("production"!==process.env.NODE_ENV){var Ir="undefined"!=typeof console,$r=/(?:^|[-_])(\w)/g;Fr=function(e,t){void 0===t&&(t=lt);var n=t?Nr(t):"";je.warnHandler?je.warnHandler.call(null,e,t,n):Ir&&!je.silent&&console.error("[Vue warn]: ".concat(e).concat(n))},Mr=function(e,t){Ir&&!je.silent&&console.warn("[Vue tip]: ".concat(e)+(t?Nr(t):""))},Tr=function(e,t){if(e.$root===e)return"<Root>";var n=ie(e)&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e,r=xr(n),o=n.__file;if(!r&&o){var i=o.match(/([^/\\]+)\.vue$/);r=i&&i[1]}return(r?"<".concat(r.replace($r,(function(e){return e.toUpperCase()})).replace(/[-_]/g,""),">"):"<Anonymous>")+(o&&!1!==t?" at ".concat(o):"")};Nr=function(e){if(e._isVue&&e.$parent){for(var t=[],n=0;e;){if(t.length>0){var r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return"\n\nfound in\n\n"+t.map((function(e,t){return"".concat(0===t?"---\x3e ":function(e,t){for(var n="";t;)t%2==1&&(n+=e),t>1&&(e+=e),t>>=1;return n}(" ",5+2*t)).concat(ee(e)?"".concat(Tr(e[0]),"... (").concat(e[1]," recursive calls)"):Tr(e))})).join("\n")}return"\n\n(found in ".concat(Tr(e),")")}}var Lr=je.optionMergeStrategies;function Br(e,t){if(!t)return e;for(var n,r,o,i=at?Reflect.ownKeys(t):Object.keys(t),s=0;s<i.length;s++)"__ob__"!==(n=i[s])&&(r=e[n],o=t[n],De(e,n)?r!==o&&ce(r)&&ce(o)&&Br(r,o):Nt(e,n,o));return e}function Pr(e,t,n){return n?function(){var r=ie(t)?t.call(n,n):t,o=ie(e)?e.call(n,n):e;return r?Br(r,o):o}:t?e?function(){return Br(ie(t)?t.call(this,this):t,ie(e)?e.call(this,this):e)}:t:e}function Rr(e,t){var n=t?e?e.concat(t):ee(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function jr(e,t,n,r){var o=Object.create(e||null);return t?("production"!==process.env.NODE_ENV&&zr(r,t,n),Se(o,t)):o}"production"!==process.env.NODE_ENV&&(Lr.el=Lr.propsData=function(e,t,n,r){return n||Fr('option "'.concat(r,'" can only be used during instance ')+"creation with the `new` keyword."),Hr(e,t)}),Lr.data=function(e,t,n){return n?Pr(e,t,n):t&&"function"!=typeof t?("production"!==process.env.NODE_ENV&&Fr('The "data" option should be a function that returns a per-instance value in component definitions.',n),e):Pr(e,t)},Re.forEach((function(e){Lr[e]=Rr})),Pe.forEach((function(e){Lr[e+"s"]=jr})),Lr.watch=function(e,t,n,r){if(e===et&&(e=void 0),t===et&&(t=void 0),!t)return Object.create(e||null);if("production"!==process.env.NODE_ENV&&zr(r,t,n),!e)return t;var o={};for(var i in Se(o,e),t){var s=o[i],a=t[i];s&&!ee(s)&&(s=[s]),o[i]=s?s.concat(a):ee(a)?a:[a]}return o},Lr.props=Lr.methods=Lr.inject=Lr.computed=function(e,t,n,r){if(t&&"production"!==process.env.NODE_ENV&&zr(r,t,n),!e)return t;var o=Object.create(null);return Se(o,e),t&&Se(o,t),o},Lr.provide=Pr;var Hr=function(e,t){return void 0===t?e:t};function Vr(e){new RegExp("^[a-zA-Z][\\-\\.0-9_".concat(He.source,"]*$")).test(e)||Fr('Invalid component name: "'+e+'". Component names should conform to valid custom element name in html5 specification.'),(ge(e)||je.isReservedTag(e))&&Fr("Do not use built-in or reserved HTML elements as component id: "+e)}function zr(e,t,n){ce(t)||Fr('Invalid value for option "'.concat(e,'": expected an Object, ')+"but got ".concat(le(t),"."),n)}function qr(e,t,n){if("production"!==process.env.NODE_ENV&&function(e){for(var t in e.components)Vr(t)}(t),ie(t)&&(t=t.options),function(e,t){var n=e.props;if(n){var r,o,i={};if(ee(n))for(r=n.length;r--;)"string"==typeof(o=n[r])?i[Ce(o)]={type:null}:"production"!==process.env.NODE_ENV&&Fr("props must be strings when using array syntax.");else if(ce(n))for(var s in n)o=n[s],i[Ce(s)]=ce(o)?o:{type:o};else"production"!==process.env.NODE_ENV&&Fr('Invalid value for option "props": expected an Array or an Object, '+"but got ".concat(le(n),"."),t);e.props=i}}(t,n),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(ee(n))for(var o=0;o<n.length;o++)r[n[o]]={from:n[o]};else if(ce(n))for(var i in n){var s=n[i];r[i]=ce(s)?Se({from:i},s):{from:s}}else"production"!==process.env.NODE_ENV&&Fr('Invalid value for option "inject": expected an Array or an Object, '+"but got ".concat(le(n),"."),t)}}(t,n),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];ie(r)&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=qr(e,t.extends,n)),t.mixins))for(var r=0,o=t.mixins.length;r<o;r++)e=qr(e,t.mixins[r],n);var i,s={};for(i in e)a(i);for(i in t)De(e,i)||a(i);function a(r){var o=Lr[r]||Hr;s[r]=o(e[r],t[r],n,r)}return s}function Wr(e,t,n,r){if("string"==typeof n){var o=e[t];if(De(o,n))return o[n];var i=Ce(n);if(De(o,i))return o[i];var s=Ae(i);if(De(o,s))return o[s];var a=o[n]||o[i]||o[s];return"production"!==process.env.NODE_ENV&&r&&!a&&Fr("Failed to resolve "+t.slice(0,-1)+": "+n),a}}function Kr(e,t,n,r){var o=t[e],i=!De(n,e),s=n[e],a=Qr(Boolean,o.type);if(a>-1)if(i&&!De(o,"default"))s=!1;else if(""===s||s===ke(e)){var l=Qr(String,o.type);(l<0||a<l)&&(s=!0)}if(void 0===s){s=function(e,t,n){if(!De(t,"default"))return;var r=t.default;"production"!==process.env.NODE_ENV&&se(r)&&Fr('Invalid default value for prop "'+n+'": Props with type Object/Array must use a factory function to return the default value.',e);if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return ie(r)&&"Function"!==Yr(t.type)?r.call(e):r}(r,o,e);var c=At;xt(!0),Ot(s),xt(c)}return"production"!==process.env.NODE_ENV&&function(e,t,n,r,o){if(e.required&&o)return void Fr('Missing required prop: "'+t+'"',r);if(null==n&&!e.required)return;var i=e.type,s=!i||!0===i,a=[];if(i){ee(i)||(i=[i]);for(var l=0;l<i.length&&!s;l++){var c=Jr(n,i[l],r);a.push(c.expectedType||""),s=c.valid}}var u=a.some((function(e){return e}));if(!s&&u)return void Fr(function(e,t,n){var r='Invalid prop: type check failed for prop "'.concat(e,'".')+" Expected ".concat(n.map(Ae).join(", ")),o=n[0],i=le(t);1===n.length&&no(o)&&no(typeof t)&&!function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.some((function(e){return"boolean"===e.toLowerCase()}))}(o,i)&&(r+=" with value ".concat(Zr(t,o)));r+=", got ".concat(i," "),no(i)&&(r+="with value ".concat(Zr(t,i),"."));return r}(t,n,a),r);var p=e.validator;p&&(p(n)||Fr('Invalid prop: custom validator check failed for prop "'+t+'".',r))}(o,e,s,r,i),s}var Ur=/^(String|Number|Boolean|Function|Symbol|BigInt)$/;function Jr(e,t,n){var r,o=Yr(t);if(Ur.test(o)){var i=typeof e;(r=i===o.toLowerCase())||"object"!==i||(r=e instanceof t)}else if("Object"===o)r=ce(e);else if("Array"===o)r=ee(e);else try{r=e instanceof t}catch(e){Fr('Invalid prop type: "'+String(t)+'" is not a constructor',n),r=!1}return{valid:r,expectedType:o}}var Gr=/^\s*function (\w+)/;function Yr(e){var t=e&&e.toString().match(Gr);return t?t[1]:""}function Xr(e,t){return Yr(e)===Yr(t)}function Qr(e,t){if(!ee(t))return Xr(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Xr(t[n],e))return n;return-1}function Zr(e,t){return"String"===t?'"'.concat(e,'"'):"".concat("Number"===t?Number(e):e)}var eo,to=["string","number","boolean"];function no(e){return to.some((function(t){return e.toLowerCase()===t}))}if("production"!==process.env.NODE_ENV){var ro=me("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,require"),oo=function(e,t){Fr('Property or method "'.concat(t,'" is not defined on the instance but ')+"referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.",e)},io=function(e,t){Fr('Property "'.concat(t,'" must be accessed with "$data.').concat(t,'" because ')+'properties starting with "$" or "_" are not proxied in the Vue instance to prevent conflicts with Vue internals. See: https://vuejs.org/v2/api/#data',e)},so="undefined"!=typeof Proxy&&it(Proxy);if(so){var ao=me("stop,prevent,self,ctrl,shift,alt,meta,exact");je.keyCodes=new Proxy(je.keyCodes,{set:function(e,t,n){return ao(t)?(Fr("Avoid overwriting built-in modifier in config.keyCodes: .".concat(t)),!1):(e[t]=n,!0)}})}var lo={has:function(e,t){var n=t in e,r=ro(t)||"string"==typeof t&&"_"===t.charAt(0)&&!(t in e.$data);return n||r||(t in e.$data?io(e,t):oo(e,t)),n||!r}},co={get:function(e,t){return"string"!=typeof t||t in e||(t in e.$data?io(e,t):oo(e,t)),e[t]}};eo=function(e){if(so){var t=e.$options,n=t.render&&t.render._withStripped?co:lo;e._renderProxy=new Proxy(e,n)}else e._renderProxy=e}}var uo={enumerable:!0,configurable:!0,get:Te,set:Te};function po(e,t,n){uo.get=function(){return this[t][n]},uo.set=function(e){this[t][n]=e},Object.defineProperty(e,n,uo)}function ho(e){var t=e.$options;if(t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props=Mt({}),o=e.$options._propKeys=[],i=!e.$parent;i||xt(!1);var s=function(s){o.push(s);var a=Kr(s,t,n,e);if("production"!==process.env.NODE_ENV){var l=ke(s);(ve(l)||je.isReservedAttr(l))&&Fr('"'.concat(l,'" is a reserved attribute and cannot be used as component prop.'),e),St(r,s,a,(function(){i||nr||Fr("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's "+'value. Prop being mutated: "'.concat(s,'"'),e)}))}else St(r,s,a);s in e||po(e,"_props",s)};for(var a in t)s(a);xt(!0)}(e,t.props),bn(e),t.methods&&function(e,t){var n=e.$options.props;for(var r in t)"production"!==process.env.NODE_ENV&&("function"!=typeof t[r]&&Fr('Method "'.concat(r,'" has type "').concat(typeof t[r],'" in the component definition. ')+"Did you reference the function correctly?",e),n&&De(n,r)&&Fr('Method "'.concat(r,'" has already been defined as a prop.'),e),r in e&&Ve(r)&&Fr('Method "'.concat(r,'" conflicts with an existing Vue instance method. ')+"Avoid defining component methods that start with _ or $.")),e[r]="function"!=typeof t[r]?Te:_e(t[r],e)}(e,t.methods),t.data)!function(e){var t=e.$options.data;ce(t=e._data=ie(t)?function(e,t){yt();try{return e.call(t,t)}catch(e){return On(e,t,"data()"),{}}finally{bt()}}(t,e):t||{})||(t={},"production"!==process.env.NODE_ENV&&Fr("data functions should return an object:\nhttps://vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));var n=Object.keys(t),r=e.$options.props,o=e.$options.methods,i=n.length;for(;i--;){var s=n[i];"production"!==process.env.NODE_ENV&&o&&De(o,s)&&Fr('Method "'.concat(s,'" has already been defined as a data property.'),e),r&&De(r,s)?"production"!==process.env.NODE_ENV&&Fr('The data property "'.concat(s,'" is already declared as a prop. ')+"Use prop default value instead.",e):Ve(s)||po(e,"_data",s)}var a=Ot(t);a&&a.vmCount++}(e);else{var n=Ot(e._data={});n&&n.vmCount++}t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=rt();for(var o in t){var i=t[o],s=ie(i)?i:i.get;"production"!==process.env.NODE_ENV&&null==s&&Fr('Getter is missing for computed property "'.concat(o,'".'),e),r||(n[o]=new Gn(e,s||Te,Te,fo)),o in e?"production"!==process.env.NODE_ENV&&(o in e.$data?Fr('The computed property "'.concat(o,'" is already defined in data.'),e):e.$options.props&&o in e.$options.props?Fr('The computed property "'.concat(o,'" is already defined as a prop.'),e):e.$options.methods&&o in e.$options.methods&&Fr('The computed property "'.concat(o,'" is already defined as a method.'),e)):mo(e,o,i)}}(e,t.computed),t.watch&&t.watch!==et&&function(e,t){for(var n in t){var r=t[n];if(ee(r))for(var o=0;o<r.length;o++)yo(e,n,r[o]);else yo(e,n,r)}}(e,t.watch)}var fo={lazy:!0};function mo(e,t,n){var r=!rt();ie(n)?(uo.get=r?go(t):vo(n),uo.set=Te):(uo.get=n.get?r&&!1!==n.cache?go(t):vo(n.get):Te,uo.set=n.set||Te),"production"!==process.env.NODE_ENV&&uo.set===Te&&(uo.set=function(){Fr('Computed property "'.concat(t,'" was assigned to but it has no setter.'),this)}),Object.defineProperty(e,t,uo)}function go(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),gt.target&&("production"!==process.env.NODE_ENV&&gt.target.onTrack&&gt.target.onTrack({effect:gt.target,target:this,type:"get",key:e}),t.depend()),t.value}}function vo(e){return function(){return e.call(this,this)}}function yo(e,t,n,r){return ce(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var bo=0;function Do(e){var t=e.options;if(e.super){var n=Do(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var o in n)n[o]!==r[o]&&(t||(t={}),t[o]=n[o]);return t}(e);r&&Se(e.extendOptions,r),(t=e.options=qr(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function Eo(e){"production"===process.env.NODE_ENV||this instanceof Eo||Fr("Vue is a constructor and should be called with the `new` keyword"),this._init(e)}function wo(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=xr(e)||xr(n.options);"production"!==process.env.NODE_ENV&&i&&Vr(i);var s=function(e){this._init(e)};return(s.prototype=Object.create(n.prototype)).constructor=s,s.cid=t++,s.options=qr(n.options,e),s.super=n,s.options.props&&function(e){var t=e.options.props;for(var n in t)po(e.prototype,"_props",n)}(s),s.options.computed&&function(e){var t=e.options.computed;for(var n in t)mo(e.prototype,n,t[n])}(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,Pe.forEach((function(e){s[e]=n[e]})),i&&(s.options.components[i]=s),s.superOptions=n.options,s.extendOptions=e,s.sealedOptions=Se({},s.options),o[r]=s,s}}function Co(e){return e&&(xr(e.Ctor.options)||e.tag)}function Ao(e,t){return ee(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!ue(e)&&e.test(t)}function xo(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var s=n[i];if(s){var a=s.name;a&&!t(a)&&ko(n,i,r,o)}}}function ko(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,ye(n,t)}!function(e){e.prototype._init=function(e){var t,n,r=this;r._uid=bo++,"production"!==process.env.NODE_ENV&&je.performance&&Wn&&(t="vue-perf-start:".concat(r._uid),n="vue-perf-end:".concat(r._uid),Wn(t)),r._isVue=!0,r.__v_skip=!0,r._scope=new Vt(!0),e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(r,e):r.$options=qr(Do(r.constructor),e||{},r),"production"!==process.env.NODE_ENV?eo(r):r._renderProxy=r,r._self=r,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._provided=n?n._provided:Object.create(null),e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(r),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&er(e,t)}(r),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,r=n&&n.context;e.$slots=hn(t._renderChildren,r),e.$scopedSlots=n?gn(e.$parent,n.data.scopedSlots,e.$slots):Z,e._c=function(t,n,r,o){return kn(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return kn(e,t,n,r,o,!0)};var o=n&&n.data;"production"!==process.env.NODE_ENV?(St(e,"$attrs",o&&o.attrs||Z,(function(){!nr&&Fr("$attrs is readonly.",e)}),!0),St(e,"$listeners",t._parentListeners||Z,(function(){!nr&&Fr("$listeners is readonly.",e)}),!0)):(St(e,"$attrs",o&&o.attrs||Z,null,!0),St(e,"$listeners",t._parentListeners||Z,null,!0))}(r),ar(r,"beforeCreate",void 0,!1),function(e){var t=Er(e.$options.inject,e);t&&(xt(!1),Object.keys(t).forEach((function(n){"production"!==process.env.NODE_ENV?St(e,n,t[n],(function(){Fr("Avoid mutating an injected value directly since the changes will be overwritten whenever the provided component re-renders. "+'injection being mutated: "'.concat(n,'"'),e)})):St(e,n,t[n])})),xt(!0))}(r),ho(r),Dr(r),ar(r,"created"),"production"!==process.env.NODE_ENV&&je.performance&&Wn&&(r._name=Tr(r,!1),Wn(n),Kn("vue ".concat(r._name," init"),t,n)),r.$options.el&&r.$mount(r.$options.el)}}(Eo),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};"production"!==process.env.NODE_ENV&&(t.set=function(){Fr("Avoid replacing instance root $data. Use nested data properties instead.",this)},n.set=function(){Fr("$props is readonly.",this)}),Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Nt,e.prototype.$delete=Tt,e.prototype.$watch=function(e,t,n){var r=this;if(ce(t))return yo(r,e,t,n);(n=n||{}).user=!0;var o=new Gn(r,e,t,n);if(n.immediate){var i='callback for immediate watcher "'.concat(o.expression,'"');yt(),Sn(t,r,[o.value],r,i),bt()}return function(){o.teardown()}}}(Eo),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(ee(e))for(var o=0,i=e.length;o<i;o++)r.$on(e[o],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(ee(e)){for(var r=0,o=e.length;r<o;r++)n.$off(e[r],t);return n}var i,s=n._events[e];if(!s)return n;if(!t)return n._events[e]=null,n;for(var a=s.length;a--;)if((i=s[a])===t||i.fn===t){s.splice(a,1);break}return n},e.prototype.$emit=function(e){var t=this;if("production"!==process.env.NODE_ENV){var n=e.toLowerCase();n!==e&&t._events[n]&&Mr('Event "'.concat(n,'" is emitted in component ')+"".concat(Tr(t),' but the handler is registered for "').concat(e,'". ')+"Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. "+'You should probably use "'.concat(ke(e),'" instead of "').concat(e,'".'))}var r=t._events[e];if(r){r=r.length>1?Oe(r):r;for(var o=Oe(arguments,1),i='event handler for "'.concat(e,'"'),s=0,a=r.length;s<a;s++)Sn(r[s],t,o,t,i)}return t}}(Eo),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,o=n._vnode,i=rr(n);n._vnode=e,n.$el=o?n.__patch__(o,e):n.__patch__(n.$el,e,t,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n),n.$vnode&&n.$parent&&n.$vnode===n.$parent._vnode&&(n.$parent.$el=n.$el)},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){ar(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||ye(t.$children,e),e._scope.stop(),e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),ar(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(Eo),function(e){dn(e.prototype),e.prototype.$nextTick=function(e){return Hn(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,o=n._parentVnode;o&&t._isMounted&&(t.$scopedSlots=gn(t.$parent,o.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&wn(t._slotsProxy,t.$scopedSlots)),t.$vnode=o;try{ct(t),Cn=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){if(On(n,t,"render"),"production"!==process.env.NODE_ENV&&t.$options.renderError)try{e=t.$options.renderError.call(t._renderProxy,t.$createElement,n)}catch(n){On(n,t,"renderError"),e=t._vnode}else e=t._vnode}finally{Cn=null,ct()}return ee(e)&&1===e.length&&(e=e[0]),e instanceof ut||("production"!==process.env.NODE_ENV&&ee(e)&&Fr("Multiple root nodes returned from render function. Render function should return a single root node.",t),e=pt()),e.parent=o,e}}(Eo);var _o=[String,RegExp,Array],Oo={name:"keep-alive",abstract:!0,props:{include:_o,exclude:_o,max:[String,Number]},methods:{cacheVNode:function(){var e=this,t=e.cache,n=e.keys,r=e.vnodeToCache,o=e.keyToCache;if(r){var i=r.tag,s=r.componentInstance,a=r.componentOptions;t[o]={name:Co(a),tag:i,componentInstance:s},n.push(o),this.max&&n.length>parseInt(this.max)&&ko(t,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)ko(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){xo(e,(function(e){return Ao(t,e)}))})),this.$watch("exclude",(function(t){xo(e,(function(e){return!Ao(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=xn(e),n=t&&t.componentOptions;if(n){var r=Co(n),o=this.include,i=this.exclude;if(o&&(!r||!Ao(o,r))||i&&r&&Ao(i,r))return t;var s=this.cache,a=this.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):t.key;s[l]?(t.componentInstance=s[l].componentInstance,ye(a,l),a.push(l)):(this.vnodeToCache=t,this.keyToCache=l),t.data.keepAlive=!0}return t||e&&e[0]}},So={KeepAlive:Oo};!function(e){var t={get:function(){return je}};"production"!==process.env.NODE_ENV&&(t.set=function(){Fr("Do not replace the Vue.config object, set individual fields instead.")}),Object.defineProperty(e,"config",t),e.util={warn:Fr,extend:Se,mergeOptions:qr,defineReactive:St},e.set=Nt,e.delete=Tt,e.nextTick=Hn,e.observable=function(e){return Ot(e),e},e.options=Object.create(null),Pe.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,Se(e.options.components,So),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=Oe(arguments,1);return n.unshift(this),ie(e.install)?e.install.apply(e,n):ie(e)&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=qr(this.options,e),this}}(e),wo(e),function(e){Pe.forEach((function(t){e[t]=function(e,n){return n?("production"!==process.env.NODE_ENV&&"component"===t&&Vr(e),"component"===t&&ce(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&ie(n)&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(Eo),Object.defineProperty(Eo.prototype,"$isServer",{get:rt}),Object.defineProperty(Eo.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Eo,"FunctionalRenderContext",{value:wr}),Eo.version="2.7.8";var No=me("style,class"),To=me("input,textarea,option,select,progress"),Fo=me("contenteditable,draggable,spellcheck"),Mo=me("events,caret,typing,plaintext-only"),Io=me("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),$o="http://www.w3.org/1999/xlink",Lo=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Bo=function(e){return Lo(e)?e.slice(6,e.length):""},Po=function(e){return null==e||!1===e};function Ro(e){for(var t=e.data,n=e,r=e;ne(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=jo(r.data,t));for(;ne(n=n.parent);)n&&n.data&&(t=jo(t,n.data));return function(e,t){if(ne(e)||ne(t))return Ho(e,Vo(t));return""}(t.staticClass,t.class)}function jo(e,t){return{staticClass:Ho(e.staticClass,t.staticClass),class:ne(e.class)?[e.class,t.class]:t.class}}function Ho(e,t){return e?t?e+" "+t:e:t||""}function Vo(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,o=e.length;r<o;r++)ne(t=Vo(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):se(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var zo={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},qo=me("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),Wo=me("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Ko=function(e){return qo(e)||Wo(e)};var Uo=Object.create(null);var Jo=me("text,number,password,search,email,tel,url");var Go=Object.freeze({__proto__:null,createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(zo[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Yo={create:function(e,t){Xo(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Xo(e,!0),Xo(t))},destroy:function(e){Xo(e,!0)}};function Xo(e,t){var n=e.data.ref;if(ne(n)){var r=e.context,o=e.componentInstance||e.elm,i=t?null:o,s=t?void 0:o;if(ie(n))Sn(n,r,[i],r,"template ref function");else{var a=e.data.refInFor,l="string"==typeof n||"number"==typeof n,c=Lt(n),u=r.$refs;if(l||c)if(a){var p=l?u[n]:n.value;t?ee(p)&&ye(p,o):ee(p)?p.includes(o)||p.push(o):l?(u[n]=[o],Qo(r,n,u[n])):n.value=[o]}else if(l){if(t&&u[n]!==o)return;u[n]=s,Qo(r,n,i)}else if(c){if(t&&n.value!==o)return;n.value=i}else"production"!==process.env.NODE_ENV&&Fr("Invalid template ref type: ".concat(typeof n))}}}function Qo(e,t,n){var r=e._setupState;r&&De(r,t)&&(Lt(r[t])?r[t].value=n:r[t]=n)}var Zo=new ut("",{},[]),ei=["create","activate","update","remove","destroy"];function ti(e,t){return e.key===t.key&&e.asyncFactory===t.asyncFactory&&(e.tag===t.tag&&e.isComment===t.isComment&&ne(e.data)===ne(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=ne(n=e.data)&&ne(n=n.attrs)&&n.type,o=ne(n=t.data)&&ne(n=n.attrs)&&n.type;return r===o||Jo(r)&&Jo(o)}(e,t)||re(e.isAsyncPlaceholder)&&te(t.asyncFactory.error))}function ni(e,t,n){var r,o,i={};for(r=t;r<=n;++r)ne(o=e[r].key)&&(i[o]=r);return i}var ri={create:oi,update:oi,destroy:function(e){oi(e,Zo)}};function oi(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,o,i=e===Zo,s=t===Zo,a=si(e.data.directives,e.context),l=si(t.data.directives,t.context),c=[],u=[];for(n in l)r=a[n],o=l[n],r?(o.oldValue=r.value,o.oldArg=r.arg,li(o,"update",t,e),o.def&&o.def.componentUpdated&&u.push(o)):(li(o,"bind",t,e),o.def&&o.def.inserted&&c.push(o));if(c.length){var p=function(){for(var n=0;n<c.length;n++)li(c[n],"inserted",t,e)};i?Kt(t,"insert",p):p()}u.length&&Kt(t,"postpatch",(function(){for(var n=0;n<u.length;n++)li(u[n],"componentUpdated",t,e)}));if(!i)for(n in a)l[n]||li(a[n],"unbind",e,e,s)}(e,t)}var ii=Object.create(null);function si(e,t){var n,r,o=Object.create(null);if(!e)return o;for(n=0;n<e.length;n++)(r=e[n]).modifiers||(r.modifiers=ii),o[ai(r)]=r,t._setupState&&t._setupState.__sfc&&(r.def=r.def||Wr(t,"_setupState","v-"+r.name)),r.def=r.def||Wr(t.$options,"directives",r.name,!0);return o}function ai(e){return e.rawName||"".concat(e.name,".").concat(Object.keys(e.modifiers||{}).join("."))}function li(e,t,n,r,o){var i=e.def&&e.def[t];if(i)try{i(n.elm,e,n,r,o)}catch(r){On(r,n.context,"directive ".concat(e.name," ").concat(t," hook"))}}var ci=[Yo,ri];function ui(e,t){var n=t.componentOptions;if(!(ne(n)&&!1===n.Ctor.options.inheritAttrs||te(e.data.attrs)&&te(t.data.attrs))){var r,o,i=t.elm,s=e.data.attrs||{},a=t.data.attrs||{};for(r in(ne(a.__ob__)||re(a._v_attr_proxy))&&(a=t.data.attrs=Se({},a)),a)o=a[r],s[r]!==o&&pi(i,r,o,t.data.pre);for(r in(Je||Ye)&&a.value!==s.value&&pi(i,"value",a.value),s)te(a[r])&&(Lo(r)?i.removeAttributeNS($o,Bo(r)):Fo(r)||i.removeAttribute(r))}}function pi(e,t,n,r){r||e.tagName.indexOf("-")>-1?di(e,t,n):Io(t)?Po(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):Fo(t)?e.setAttribute(t,function(e,t){return Po(t)||"false"===t?"false":"contenteditable"===e&&Mo(t)?t:"true"}(t,n)):Lo(t)?Po(n)?e.removeAttributeNS($o,Bo(t)):e.setAttributeNS($o,t,n):di(e,t,n)}function di(e,t,n){if(Po(n))e.removeAttribute(t);else{if(Je&&!Ge&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var hi={create:ui,update:ui};function fi(e,t){var n=t.elm,r=t.data,o=e.data;if(!(te(r.staticClass)&&te(r.class)&&(te(o)||te(o.staticClass)&&te(o.class)))){var i=Ro(t),s=n._transitionClasses;ne(s)&&(i=Ho(i,Vo(s))),i!==n._prevClass&&(n.setAttribute("class",i),n._prevClass=i)}}var mi,gi={create:fi,update:fi};function vi(e,t,n){var r=mi;return function o(){var i=t.apply(null,arguments);null!==i&&Di(e,o,n,r)}}var yi=Mn&&!(Ze&&Number(Ze[1])<=53);function bi(e,t,n,r){if(yi){var o=mr,i=t;t=i._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=o||e.timeStamp<=0||e.target.ownerDocument!==document)return i.apply(this,arguments)}}mi.addEventListener(e,t,tt?{capture:n,passive:r}:n)}function Di(e,t,n,r){(r||mi).removeEventListener(e,t._wrapper||t,n)}function Ei(e,t){if(!te(e.data.on)||!te(t.data.on)){var n=t.data.on||{},r=e.data.on||{};mi=t.elm||e.elm,function(e){if(ne(e.__r)){var t=Je?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}ne(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),Wt(n,r,bi,Di,vi,t.context),mi=void 0}}var wi,Ci={create:Ei,update:Ei,destroy:function(e){return Ei(e,Zo)}};function Ai(e,t){if(!te(e.data.domProps)||!te(t.data.domProps)){var n,r,o=t.elm,i=e.data.domProps||{},s=t.data.domProps||{};for(n in(ne(s.__ob__)||re(s._v_attr_proxy))&&(s=t.data.domProps=Se({},s)),i)n in s||(o[n]="");for(n in s){if(r=s[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===i[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var a=te(r)?"":String(r);xi(o,a)&&(o.value=a)}else if("innerHTML"===n&&Wo(o.tagName)&&te(o.innerHTML)){(wi=wi||document.createElement("div")).innerHTML="<svg>".concat(r,"</svg>");for(var l=wi.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}else if(r!==i[n])try{o[n]=r}catch(e){}}}}function xi(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(ne(r)){if(r.number)return fe(n)!==fe(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var ki={create:Ai,update:Ai},_i=Ee((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function Oi(e){var t=Si(e.style);return e.staticStyle?Se(e.staticStyle,t):t}function Si(e){return Array.isArray(e)?Ne(e):"string"==typeof e?_i(e):e}var Ni,Ti=/^--/,Fi=/\s*!important$/,Mi=function(e,t,n){if(Ti.test(t))e.style.setProperty(t,n);else if(Fi.test(n))e.style.setProperty(ke(t),n.replace(Fi,""),"important");else{var r=$i(t);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)e.style[r]=n[o];else e.style[r]=n}},Ii=["Webkit","Moz","ms"],$i=Ee((function(e){if(Ni=Ni||document.createElement("div").style,"filter"!==(e=Ce(e))&&e in Ni)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Ii.length;n++){var r=Ii[n]+t;if(r in Ni)return r}}));function Li(e,t){var n=t.data,r=e.data;if(!(te(n.staticStyle)&&te(n.style)&&te(r.staticStyle)&&te(r.style))){var o,i,s=t.elm,a=r.staticStyle,l=r.normalizedStyle||r.style||{},c=a||l,u=Si(t.data.style)||{};t.data.normalizedStyle=ne(u.__ob__)?Se({},u):u;var p=function(e,t){var n,r={};if(t)for(var o=e;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=Oi(o.data))&&Se(r,n);(n=Oi(e.data))&&Se(r,n);for(var i=e;i=i.parent;)i.data&&(n=Oi(i.data))&&Se(r,n);return r}(t,!0);for(i in c)te(p[i])&&Mi(s,i,"");for(i in p)(o=p[i])!==c[i]&&Mi(s,i,null==o?"":o)}}var Bi={create:Li,update:Li},Pi=/\s+/;function Ri(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Pi).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" ".concat(e.getAttribute("class")||""," ");n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function ji(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Pi).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" ".concat(e.getAttribute("class")||""," "),r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function Hi(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&Se(t,Vi(e.name||"v")),Se(t,e),t}return"string"==typeof e?Vi(e):void 0}}var Vi=Ee((function(e){return{enterClass:"".concat(e,"-enter"),enterToClass:"".concat(e,"-enter-to"),enterActiveClass:"".concat(e,"-enter-active"),leaveClass:"".concat(e,"-leave"),leaveToClass:"".concat(e,"-leave-to"),leaveActiveClass:"".concat(e,"-leave-active")}})),zi=Ke&&!Ge,qi="transition",Wi="transitionend",Ki="animation",Ui="animationend";zi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(qi="WebkitTransition",Wi="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Ki="WebkitAnimation",Ui="webkitAnimationEnd"));var Ji=Ke?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Gi(e){Ji((function(){Ji(e)}))}function Yi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Ri(e,t))}function Xi(e,t){e._transitionClasses&&ye(e._transitionClasses,t),ji(e,t)}function Qi(e,t,n){var r=es(e,t),o=r.type,i=r.timeout,s=r.propCount;if(!o)return n();var a="transition"===o?Wi:Ui,l=0,c=function(){e.removeEventListener(a,u),n()},u=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l<s&&c()}),i+1),e.addEventListener(a,u)}var Zi=/\b(transform|all)(,|$)/;function es(e,t){var n,r=window.getComputedStyle(e),o=(r[qi+"Delay"]||"").split(", "),i=(r[qi+"Duration"]||"").split(", "),s=ts(o,i),a=(r[Ki+"Delay"]||"").split(", "),l=(r[Ki+"Duration"]||"").split(", "),c=ts(a,l),u=0,p=0;return"transition"===t?s>0&&(n="transition",u=s,p=i.length):"animation"===t?c>0&&(n="animation",u=c,p=l.length):p=(n=(u=Math.max(s,c))>0?s>c?"transition":"animation":null)?"transition"===n?i.length:l.length:0,{type:n,timeout:u,propCount:p,hasTransform:"transition"===n&&Zi.test(r[qi+"Property"])}}function ts(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return ns(t)+ns(e[n])})))}function ns(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function rs(e,t){var n=e.elm;ne(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=Hi(e.data.transition);if(!te(r)&&!ne(n._enterCb)&&1===n.nodeType){for(var o=r.css,i=r.type,s=r.enterClass,a=r.enterToClass,l=r.enterActiveClass,c=r.appearClass,u=r.appearToClass,p=r.appearActiveClass,d=r.beforeEnter,h=r.enter,f=r.afterEnter,m=r.enterCancelled,g=r.beforeAppear,v=r.appear,y=r.afterAppear,b=r.appearCancelled,D=r.duration,E=tr,w=tr.$vnode;w&&w.parent;)E=w.context,w=w.parent;var C=!E._isMounted||!e.isRootInsert;if(!C||v||""===v){var A=C&&c?c:s,x=C&&p?p:l,k=C&&u?u:a,_=C&&g||d,O=C&&ie(v)?v:h,S=C&&y||f,N=C&&b||m,T=fe(se(D)?D.enter:D);"production"!==process.env.NODE_ENV&&null!=T&&ss(T,"enter",e);var F=!1!==o&&!Ge,M=ls(O),I=n._enterCb=Le((function(){F&&(Xi(n,k),Xi(n,x)),I.cancelled?(F&&Xi(n,A),N&&N(n)):S&&S(n),n._enterCb=null}));e.data.show||Kt(e,"insert",(function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),O&&O(n,I)})),_&&_(n),F&&(Yi(n,A),Yi(n,x),Gi((function(){Xi(n,A),I.cancelled||(Yi(n,k),M||(as(T)?setTimeout(I,T):Qi(n,i,I)))}))),e.data.show&&(t&&t(),O&&O(n,I)),F||M||I()}}}function is(e,t){var n=e.elm;ne(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=Hi(e.data.transition);if(te(r)||1!==n.nodeType)return t();if(!ne(n._leaveCb)){var o=r.css,i=r.type,s=r.leaveClass,a=r.leaveToClass,l=r.leaveActiveClass,c=r.beforeLeave,u=r.leave,p=r.afterLeave,d=r.leaveCancelled,h=r.delayLeave,f=r.duration,m=!1!==o&&!Ge,g=ls(u),v=fe(se(f)?f.leave:f);"production"!==process.env.NODE_ENV&&ne(v)&&ss(v,"leave",e);var y=n._leaveCb=Le((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),m&&(Xi(n,a),Xi(n,l)),y.cancelled?(m&&Xi(n,s),d&&d(n)):(t(),p&&p(n)),n._leaveCb=null}));h?h(b):b()}function b(){y.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),c&&c(n),m&&(Yi(n,s),Yi(n,l),Gi((function(){Xi(n,s),y.cancelled||(Yi(n,a),g||(as(v)?setTimeout(y,v):Qi(n,i,y)))}))),u&&u(n,y),m||g||y())}}function ss(e,t,n){"number"!=typeof e?Fr("<transition> explicit ".concat(t," duration is not a valid number - ")+"got ".concat(JSON.stringify(e),"."),n.context):isNaN(e)&&Fr("<transition> explicit ".concat(t," duration is NaN - ")+"the duration expression might be incorrect.",n.context)}function as(e){return"number"==typeof e&&!isNaN(e)}function ls(e){if(te(e))return!1;var t=e.fns;return ne(t)?ls(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function cs(e,t){!0!==t.data.show&&rs(t)}var us=function(e){var t,n,r={},o=e.modules,i=e.nodeOps;for(t=0;t<ei.length;++t)for(r[ei[t]]=[],n=0;n<o.length;++n)ne(o[n][ei[t]])&&r[ei[t]].push(o[n][ei[t]]);function s(e){var t=i.parentNode(e);ne(t)&&i.removeChild(t,e)}function a(e,t){return!t&&!e.ns&&!(je.ignoredElements.length&&je.ignoredElements.some((function(t){return ue(t)?t.test(e.tag):t===e.tag})))&&je.isUnknownElement(e.tag)}var l=0;function c(e,t,n,o,s,c,h){if(ne(e.elm)&&ne(c)&&(e=c[h]=ht(e)),e.isRootInsert=!s,!function(e,t,n,o){var i=e.data;if(ne(i)){var s=ne(e.componentInstance)&&i.keepAlive;if(ne(i=i.hook)&&ne(i=i.init)&&i(e,!1),ne(e.componentInstance))return u(e,t),p(n,e.elm,o),re(s)&&function(e,t,n,o){var i,s=e;for(;s.componentInstance;)if(ne(i=(s=s.componentInstance._vnode).data)&&ne(i=i.transition)){for(i=0;i<r.activate.length;++i)r.activate[i](Zo,s);t.push(s);break}p(n,e.elm,o)}(e,t,n,o),!0}}(e,t,n,o)){var g=e.data,v=e.children,y=e.tag;ne(y)?("production"!==process.env.NODE_ENV&&(g&&g.pre&&l++,a(e,l)&&Fr("Unknown custom element: <"+y+'> - did you register the component correctly? For recursive components, make sure to provide the "name" option.',e.context)),e.elm=e.ns?i.createElementNS(e.ns,y):i.createElement(y,e),m(e),d(e,v,t),ne(g)&&f(e,t),p(n,e.elm,o),"production"!==process.env.NODE_ENV&&g&&g.pre&&l--):re(e.isComment)?(e.elm=i.createComment(e.text),p(n,e.elm,o)):(e.elm=i.createTextNode(e.text),p(n,e.elm,o))}}function u(e,t){ne(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,h(e)?(f(e,t),m(e)):(Xo(e),t.push(e))}function p(e,t,n){ne(e)&&(ne(n)?i.parentNode(n)===e&&i.insertBefore(e,t,n):i.appendChild(e,t))}function d(e,t,n){if(ee(t)){"production"!==process.env.NODE_ENV&&D(t);for(var r=0;r<t.length;++r)c(t[r],n,e.elm,null,!0,t,r)}else oe(e.text)&&i.appendChild(e.elm,i.createTextNode(String(e.text)))}function h(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return ne(e.tag)}function f(e,n){for(var o=0;o<r.create.length;++o)r.create[o](Zo,e);ne(t=e.data.hook)&&(ne(t.create)&&t.create(Zo,e),ne(t.insert)&&n.push(e))}function m(e){var t;if(ne(t=e.fnScopeId))i.setStyleScope(e.elm,t);else for(var n=e;n;)ne(t=n.context)&&ne(t=t.$options._scopeId)&&i.setStyleScope(e.elm,t),n=n.parent;ne(t=tr)&&t!==e.context&&t!==e.fnContext&&ne(t=t.$options._scopeId)&&i.setStyleScope(e.elm,t)}function g(e,t,n,r,o,i){for(;r<=o;++r)c(n[r],i,e,t,!1,n,r)}function v(e){var t,n,o=e.data;if(ne(o))for(ne(t=o.hook)&&ne(t=t.destroy)&&t(e),t=0;t<r.destroy.length;++t)r.destroy[t](e);if(ne(t=e.children))for(n=0;n<e.children.length;++n)v(e.children[n])}function y(e,t,n){for(;t<=n;++t){var r=e[t];ne(r)&&(ne(r.tag)?(b(r),v(r)):s(r.elm))}}function b(e,t){if(ne(t)||ne(e.data)){var n,o=r.remove.length+1;for(ne(t)?t.listeners+=o:t=function(e,t){function n(){0==--n.listeners&&s(e)}return n.listeners=t,n}(e.elm,o),ne(n=e.componentInstance)&&ne(n=n._vnode)&&ne(n.data)&&b(n,t),n=0;n<r.remove.length;++n)r.remove[n](e,t);ne(n=e.data.hook)&&ne(n=n.remove)?n(e,t):t()}else s(e.elm)}function D(e){for(var t={},n=0;n<e.length;n++){var r=e[n],o=r.key;ne(o)&&(t[o]?Fr("Duplicate keys detected: '".concat(o,"'. This may cause an update error."),r.context):t[o]=!0)}}function E(e,t,n,r){for(var o=n;o<r;o++){var i=t[o];if(ne(i)&&ti(e,i))return o}}function w(e,t,n,o,s,a){if(e!==t){ne(t.elm)&&ne(o)&&(t=o[s]=ht(t));var l=t.elm=e.elm;if(re(e.isAsyncPlaceholder))ne(t.asyncFactory.resolved)?k(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(re(t.isStatic)&&re(e.isStatic)&&t.key===e.key&&(re(t.isCloned)||re(t.isOnce)))t.componentInstance=e.componentInstance;else{var u,p=t.data;ne(p)&&ne(u=p.hook)&&ne(u=u.prepatch)&&u(e,t);var d=e.children,f=t.children;if(ne(p)&&h(t)){for(u=0;u<r.update.length;++u)r.update[u](e,t);ne(u=p.hook)&&ne(u=u.update)&&u(e,t)}te(t.text)?ne(d)&&ne(f)?d!==f&&function(e,t,n,r,o){var s,a,l,u=0,p=0,d=t.length-1,h=t[0],f=t[d],m=n.length-1,v=n[0],b=n[m],C=!o;for("production"!==process.env.NODE_ENV&&D(n);u<=d&&p<=m;)te(h)?h=t[++u]:te(f)?f=t[--d]:ti(h,v)?(w(h,v,r,n,p),h=t[++u],v=n[++p]):ti(f,b)?(w(f,b,r,n,m),f=t[--d],b=n[--m]):ti(h,b)?(w(h,b,r,n,m),C&&i.insertBefore(e,h.elm,i.nextSibling(f.elm)),h=t[++u],b=n[--m]):ti(f,v)?(w(f,v,r,n,p),C&&i.insertBefore(e,f.elm,h.elm),f=t[--d],v=n[++p]):(te(s)&&(s=ni(t,u,d)),te(a=ne(v.key)?s[v.key]:E(v,t,u,d))?c(v,r,e,h.elm,!1,n,p):ti(l=t[a],v)?(w(l,v,r,n,p),t[a]=void 0,C&&i.insertBefore(e,l.elm,h.elm)):c(v,r,e,h.elm,!1,n,p),v=n[++p]);u>d?g(e,te(n[m+1])?null:n[m+1].elm,n,p,m,r):p>m&&y(t,u,d)}(l,d,f,n,a):ne(f)?("production"!==process.env.NODE_ENV&&D(f),ne(e.text)&&i.setTextContent(l,""),g(l,null,f,0,f.length-1,n)):ne(d)?y(d,0,d.length-1):ne(e.text)&&i.setTextContent(l,""):e.text!==t.text&&i.setTextContent(l,t.text),ne(p)&&ne(u=p.hook)&&ne(u=u.postpatch)&&u(e,t)}}}function C(e,t,n){if(re(n)&&ne(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var A=!1,x=me("attrs,class,staticClass,staticStyle,key");function k(e,t,n,r){var o,i=t.tag,s=t.data,l=t.children;if(r=r||s&&s.pre,t.elm=e,re(t.isComment)&&ne(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if("production"!==process.env.NODE_ENV&&!function(e,t,n){return ne(t.tag)?0===t.tag.indexOf("vue-component")||!a(t,n)&&t.tag.toLowerCase()===(e.tagName&&e.tagName.toLowerCase()):e.nodeType===(t.isComment?8:3)}(e,t,r))return!1;if(ne(s)&&(ne(o=s.hook)&&ne(o=o.init)&&o(t,!0),ne(o=t.componentInstance)))return u(t,n),!0;if(ne(i)){if(ne(l))if(e.hasChildNodes())if(ne(o=s)&&ne(o=o.domProps)&&ne(o=o.innerHTML)){if(o!==e.innerHTML)return"production"===process.env.NODE_ENV||"undefined"==typeof console||A||(A=!0,console.warn("Parent: ",e),console.warn("server innerHTML: ",o),console.warn("client innerHTML: ",e.innerHTML)),!1}else{for(var c=!0,p=e.firstChild,h=0;h<l.length;h++){if(!p||!k(p,l[h],n,r)){c=!1;break}p=p.nextSibling}if(!c||p)return"production"===process.env.NODE_ENV||"undefined"==typeof console||A||(A=!0,console.warn("Parent: ",e),console.warn("Mismatching childNodes vs. VNodes: ",e.childNodes,l)),!1}else d(t,l,n);if(ne(s)){var m=!1;for(var g in s)if(!x(g)){m=!0,f(t,n);break}!m&&s.class&&zn(s.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,o){if(!te(t)){var s,a=!1,l=[];if(te(e))a=!0,c(t,l);else{var u=ne(e.nodeType);if(!u&&ti(e,t))w(e,t,l,null,null,o);else{if(u){if(1===e.nodeType&&e.hasAttribute("data-server-rendered")&&(e.removeAttribute("data-server-rendered"),n=!0),re(n)){if(k(e,t,l))return C(t,l,!0),e;"production"!==process.env.NODE_ENV&&Fr("The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.")}s=e,e=new ut(i.tagName(s).toLowerCase(),{},[],void 0,s)}var p=e.elm,d=i.parentNode(p);if(c(t,l,p._leaveCb?null:d,i.nextSibling(p)),ne(t.parent))for(var f=t.parent,m=h(t);f;){for(var g=0;g<r.destroy.length;++g)r.destroy[g](f);if(f.elm=t.elm,m){for(var b=0;b<r.create.length;++b)r.create[b](Zo,f);var D=f.data.hook.insert;if(D.merged)for(var E=1;E<D.fns.length;E++)D.fns[E]()}else Xo(f);f=f.parent}ne(d)?y([e],0,0):ne(e.tag)&&v(e)}}return C(t,l,a),t.elm}ne(e)&&v(e)}}({nodeOps:Go,modules:[hi,gi,Ci,ki,Bi,Ke?{create:cs,activate:cs,remove:function(e,t){!0!==e.data.show?is(e,t):t()}}:{}].concat(ci)});Ge&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&ys(e,"input")}));var ps={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Kt(n,"postpatch",(function(){ps.componentUpdated(e,t,n)})):ds(e,t,n.context),e._vOptions=[].map.call(e.options,ms)):("textarea"===n.tag||Jo(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",gs),e.addEventListener("compositionend",vs),e.addEventListener("change",vs),Ge&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){ds(e,t,n.context);var r=e._vOptions,o=e._vOptions=[].map.call(e.options,ms);if(o.some((function(e,t){return!Ie(e,r[t])})))(e.multiple?t.value.some((function(e){return fs(e,o)})):t.value!==t.oldValue&&fs(t.value,o))&&ys(e,"change")}}};function ds(e,t,n){hs(e,t,n),(Je||Ye)&&setTimeout((function(){hs(e,t,n)}),0)}function hs(e,t,n){var r=t.value,o=e.multiple;if(!o||Array.isArray(r)){for(var i,s,a=0,l=e.options.length;a<l;a++)if(s=e.options[a],o)i=$e(r,ms(s))>-1,s.selected!==i&&(s.selected=i);else if(Ie(ms(s),r))return void(e.selectedIndex!==a&&(e.selectedIndex=a));o||(e.selectedIndex=-1)}else"production"!==process.env.NODE_ENV&&Fr('<select multiple v-model="'.concat(t.expression,'"> ')+"expects an Array value for its binding, but got ".concat(Object.prototype.toString.call(r).slice(8,-1)),n)}function fs(e,t){return t.every((function(t){return!Ie(t,e)}))}function ms(e){return"_value"in e?e._value:e.value}function gs(e){e.target.composing=!0}function vs(e){e.target.composing&&(e.target.composing=!1,ys(e.target,"input"))}function ys(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function bs(e){return!e.componentInstance||e.data&&e.data.transition?e:bs(e.componentInstance._vnode)}var Ds={bind:function(e,t,n){var r=t.value,o=(n=bs(n)).data&&n.data.transition,i=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&o?(n.data.show=!0,rs(n,(function(){e.style.display=i}))):e.style.display=r?i:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=bs(n)).data&&n.data.transition?(n.data.show=!0,r?rs(n,(function(){e.style.display=e.__vOriginalDisplay})):is(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,o){o||(e.style.display=e.__vOriginalDisplay)}},Es={model:ps,show:Ds},ws={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function Cs(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?Cs(xn(t.children)):e}function As(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var o=n._parentListeners;for(var r in o)t[Ce(r)]=o[r];return t}function xs(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var ks=function(e){return e.tag||mn(e)},_s=function(e){return"show"===e.name},Os={name:"transition",props:ws,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(ks)).length){"production"!==process.env.NODE_ENV&&n.length>1&&Fr("<transition> can only be used on a single element. Use <transition-group> for lists.",this.$parent);var r=this.mode;"production"!==process.env.NODE_ENV&&r&&"in-out"!==r&&"out-in"!==r&&Fr("invalid <transition> mode: "+r,this.$parent);var o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var i=Cs(o);if(!i)return o;if(this._leaving)return xs(e,o);var s="__transition-".concat(this._uid,"-");i.key=null==i.key?i.isComment?s+"comment":s+i.tag:oe(i.key)?0===String(i.key).indexOf(s)?i.key:s+i.key:i.key;var a=(i.data||(i.data={})).transition=As(this),l=this._vnode,c=Cs(l);if(i.data.directives&&i.data.directives.some(_s)&&(i.data.show=!0),c&&c.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(i,c)&&!mn(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var u=c.data.transition=Se({},a);if("out-in"===r)return this._leaving=!0,Kt(u,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),xs(e,o);if("in-out"===r){if(mn(i))return l;var p,d=function(){p()};Kt(a,"afterEnter",d),Kt(a,"enterCancelled",d),Kt(u,"delayLeave",(function(e){p=e}))}}return o}}},Ss=Se({tag:String,moveClass:String},ws);delete Ss.mode;var Ns={props:Ss,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var o=rr(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,o(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],s=As(this),a=0;a<o.length;a++){if((d=o[a]).tag)if(null!=d.key&&0!==String(d.key).indexOf("__vlist"))i.push(d),n[d.key]=d,(d.data||(d.data={})).transition=s;else if("production"!==process.env.NODE_ENV){var l=d.componentOptions,c=l?xr(l.Ctor.options)||l.tag||"":d.tag;Fr("<transition-group> children must be keyed: <".concat(c,">"))}}if(r){var u=[],p=[];for(a=0;a<r.length;a++){var d;(d=r[a]).data.transition=s,d.data.pos=d.elm.getBoundingClientRect(),n[d.key]?u.push(d):p.push(d)}this.kept=e(t,null,u),this.removed=p}return e(t,null,i)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(Ts),e.forEach(Fs),e.forEach(Ms),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,r=n.style;Yi(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(Wi,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(Wi,e),n._moveCb=null,Xi(n,t))})}})))},methods:{hasMove:function(e,t){if(!zi)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){ji(n,e)})),Ri(n,t),n.style.display="none",this.$el.appendChild(n);var r=es(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function Ts(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Fs(e){e.data.newPos=e.elm.getBoundingClientRect()}function Ms(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,o=t.top-n.top;if(r||o){e.data.moved=!0;var i=e.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}var Is={Transition:Os,TransitionGroup:Ns};function $s(e){this.content=e}function Ls(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let e=0;o.text[e]==i.text[e];e++)n++;return n}if(o.content.size||i.content.size){let e=Ls(o.content,i.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function Bs(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let e=0,t=Math.min(s.text.length,a.text.length);for(;e<t&&s.text[s.text.length-e-1]==a.text[a.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let e=Bs(s.content,a.content,n-1,r-1);if(e)return e}n-=l,r-=l}else n-=l,r-=l}}Eo.config.mustUseProp=function(e,t,n){return"value"===n&&To(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Eo.config.isReservedTag=Ko,Eo.config.isReservedAttr=No,Eo.config.getTagNamespace=function(e){return Wo(e)?"svg":"math"===e?"math":void 0},Eo.config.isUnknownElement=function(e){if(!Ke)return!0;if(Ko(e))return!1;if(e=e.toLowerCase(),null!=Uo[e])return Uo[e];var t=document.createElement(e);return e.indexOf("-")>-1?Uo[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Uo[e]=/HTMLUnknownElement/.test(t.toString())},Se(Eo.options.directives,Es),Se(Eo.options.components,Is),Eo.prototype.__patch__=Ke?us:Te,Eo.prototype.$mount=function(e,t){return function(e,t,n){var r;e.$el=t,e.$options.render||(e.$options.render=pt,"production"!==process.env.NODE_ENV&&(e.$options.template&&"#"!==e.$options.template.charAt(0)||e.$options.el||t?Fr("You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.",e):Fr("Failed to mount component: template or render function not defined.",e))),ar(e,"beforeMount"),r="production"!==process.env.NODE_ENV&&je.performance&&Wn?function(){var t=e._name,r=e._uid,o="vue-perf-start:".concat(r),i="vue-perf-end:".concat(r);Wn(o);var s=e._render();Wn(i),Kn("vue ".concat(t," render"),o,i),Wn(o),e._update(s,n),Wn(i),Kn("vue ".concat(t," patch"),o,i)}:function(){e._update(e._render(),n)};var o={before:function(){e._isMounted&&!e._isDestroyed&&ar(e,"beforeUpdate")}};"production"!==process.env.NODE_ENV&&(o.onTrack=function(t){return ar(e,"renderTracked",[t])},o.onTrigger=function(t){return ar(e,"renderTriggered",[t])}),new Gn(e,r,Te,o,!0),n=!1;var i=e._preWatchers;if(i)for(var s=0;s<i.length;s++)i[s].run();return null==e.$vnode&&(e._isMounted=!0,ar(e,"mounted")),e}(this,e=e&&Ke?function(e){if("string"==typeof e){return document.querySelector(e)||("production"!==process.env.NODE_ENV&&Fr("Cannot find element: "+e),document.createElement("div"))}return e}(e):void 0,t)},Ke&&setTimeout((function(){je.devtools&&(ot?ot.emit("init",Eo):"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&console[console.info?"info":"log"]("Download the Vue Devtools extension for a better development experience:\nhttps://github.com/vuejs/vue-devtools")),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&!1!==je.productionTip&&"undefined"!=typeof console&&console[console.info?"info":"log"]("You are running Vue in development mode.\nMake sure to turn on production mode when deploying for production.\nSee more tips at https://vuejs.org/guide/deployment.html")}),0),$s.prototype={constructor:$s,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new $s(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new $s(n)},addToStart:function(e,t){return new $s([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new $s(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new $s(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=$s.from(e)).size?new $s(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=$s.from(e)).size?new $s(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=$s.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},$s.from=function(e){if(e instanceof $s)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new $s(t)};class Ps{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,o){for(let i=0,s=0;s<t;i++){let a=this.content[i],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,e-o),Math.min(a.content.size,t-o),n,r+o)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf?(r?o+="function"==typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new Ps(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,i=0;i<t;o++){let s=this.content[o],a=i+s.nodeSize;a>e&&((i<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=a}return new Ps(n,r)}cutByIndex(e,t){return e==t?Ps.empty:0==e&&t==this.content.length?this:new Ps(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new Ps(r,o)}addToStart(e){return new Ps([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Ps(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return Ls(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Bs(this,e,t,n)}findIndex(e,t=-1){if(0==e)return js(0,e);if(e==this.size)return js(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?js(n+1,o):js(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return Ps.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ps(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Ps.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new Ps(t||e,n)}static from(e){if(!e)return Ps.empty;if(e instanceof Ps)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Ps([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ps.empty=new Ps([],0);const Rs={index:0,offset:0};function js(e,t){return Rs.index=e,Rs.offset=t,Rs}function Hs(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!Hs(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!Hs(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class Vs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Hs(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return Vs.none;if(e instanceof Vs)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}Vs.none=[];class zs extends Error{}class qs{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=Ks(this.content,e+this.openStart,t);return n&&new qs(n,this.openStart,this.openEnd)}removeBetween(e,t){return new qs(Ws(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return qs.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new qs(Ps.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new qs(e,n,r)}}function Ws(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(Ws(i.content,t-o-1,n-o-1)))}function Ks(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=Ks(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function Us(e,t,n){if(n.openStart>e.depth)throw new zs("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new zs("Inconsistent open depths");return Js(e,t,n,0)}function Js(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let s=Js(e,t,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(Ps.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return Zs(i,ea(e,o,s,t,r))}{let r=e.parent,o=r.content;return Zs(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return Zs(i,ta(e,t,r))}function Gs(e,t){if(!t.type.compatibleContent(e.type))throw new zs("Cannot join "+t.type.name+" onto "+e.type.name)}function Ys(e,t,n){let r=e.node(n);return Gs(r,t.node(n)),r}function Xs(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Qs(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Xs(e.nodeAfter,r),i++));for(let e=i;e<s;e++)Xs(o.child(e),r);t&&t.depth==n&&t.textOffset&&Xs(t.nodeBefore,r)}function Zs(e,t){if(!e.type.validContent(t))throw new zs("Invalid content for node "+e.type.name);return e.copy(t)}function ea(e,t,n,r,o){let i=e.depth>o&&Ys(e,t,o+1),s=r.depth>o&&Ys(n,r,o+1),a=[];return Qs(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(Gs(i,s),Xs(Zs(i,ea(e,t,n,r,o+1)),a)):(i&&Xs(Zs(i,ta(e,t,o+1)),a),Qs(t,n,o,a),s&&Xs(Zs(s,ta(n,r,o+1)),a)),Qs(r,null,o,a),new Ps(a)}function ta(e,t,n){let r=[];if(Qs(null,e,n,r),e.depth>n){Xs(Zs(Ys(e,t,n+1),ta(e,t,n+1)),r)}return Qs(t,null,n,r),new Ps(r)}qs.empty=new qs(Ps.empty,0,0);class na{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return Vs.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new sa(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let t=e;;){let{index:e,offset:i}=t.content.findIndex(o),s=o-i;if(n.push(t,e,r+i),!s)break;if(t=t.child(e),t.isText)break;o=s-1,r+=i+1}return new na(t,n,o)}static resolveCached(e,t){for(let n=0;n<ra.length;n++){let r=ra[n];if(r.pos==t&&r.doc==e)return r}let n=ra[oa]=na.resolve(e,t);return oa=(oa+1)%ia,n}}let ra=[],oa=0,ia=12;class sa{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const aa=Object.create(null);class la{constructor(e,t,n,r=Vs.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||Ps.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&Hs(this.attrs,t||e.defaultAttrs||aa)&&Vs.sameSet(this.marks,n||Vs.none)}copy(e=null){return e==this.content?this:new la(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new la(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return qs.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new qs(a,r.depth-i,o.depth-i)}replace(e,t,n){return Us(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return na.resolveCached(this,e)}resolveNoCache(e){return na.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ua(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=Ps.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<o;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){if(!this.type.validContent(this.content))throw new RangeError(`Invalid content for node ${this.type.name}: ${this.content.toString().slice(0,50)}`);let e=Vs.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Vs.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e=>e.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=Ps.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}la.prototype.text=void 0;class ca extends la{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ua(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ca(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ca(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ua(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class pa{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new da(e,t);if(null==n.next)return pa.empty;let r=ha(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return n(ba(e,0));function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);ba(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new pa(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(ya);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}}(function(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}function i(e,t){if("choice"==e.type)return e.exprs.reduce(((e,n)=>e.concat(i(n,t))),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return r(t,s),o(i(e.expr,s),s),[r(s)]}if("plus"==e.type){let s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){let s=t;for(let t=0;t<e.min;t++){let t=n();o(i(e.expr,s),t),s=t}if(-1==e.max)o(i(e.expr,s),s);else for(let t=e.min;t<e.max;t++){let t=n();r(s,t),o(i(e.expr,s),t),s=t}return[r(s)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=i(e.exprs[r],t);if(r==e.exprs.length-1)return s;o(s,t=n())}}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(i,s){let a=i.matchFragment(e,n);if(a&&(!t||a.validEnd))return Ps.from(s.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:i,next:s}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r})).join("\n")}}pa.empty=new pa(!0);class da{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ha(e){let t=[];do{t.push(fa(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function fa(e){let t=[];do{t.push(ma(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function ma(e){let t=function(e){if(e.eat("(")){let t=ha(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let e in n){let r=n[e];r.groups.indexOf(t)>-1&&o.push(r)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=va(e,t)}return t}function ga(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function va(e,t){let n=ga(e),r=n;return e.eat(",")&&(r="}"!=e.next?ga(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function ya(e,t){return t-e}function ba(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:i}=o[e];r||-1!=n.indexOf(i)||t(i)}}(t),n.sort(ya)}function Da(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Ea(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function wa(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new Aa(e[n]);return t}class Ca{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=wa(n.attrs),this.defaultAttrs=Da(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==pa.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Ea(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new la(this,this.computeAttrs(e),Ps.from(t),Vs.setFrom(n))}createChecked(e=null,t,n){if(t=Ps.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new la(this,this.computeAttrs(e),t,Vs.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=Ps.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(Ps.empty,!0);return o?new la(this,e,t.append(o),Vs.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:Vs.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new Ca(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class Aa{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class xa{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=wa(r.attrs),this.excluded=null;let o=Da(this.attrs);this.instance=o?new Vs(this,o):null}create(e=null){return!e&&this.instance?this.instance:new Vs(this,Ea(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new xa(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class ka{constructor(e){this.cached=Object.create(null),this.spec={nodes:$s.from(e.nodes),marks:$s.from(e.marks||{}),topNode:e.topNode},this.nodes=Ca.compile(this.spec.nodes,this),this.marks=xa.compile(this.spec.marks,this);let t=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let n=this.nodes[e],r=n.spec.content||"",o=n.spec.marks;n.contentMatch=t[r]||(t[r]=pa.parse(r,this.nodes)),n.inlineContent=n.contentMatch.inlineContent,n.markSet="_"==o?null:o?_a(this,o.split(" ")):""!=o&&n.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:_a(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof Ca))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new ca(n,n.defaultAttrs,e,Vs.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return la.fromJSON(this,e)}markFromJSON(e){return Vs.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function _a(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],s=i;if(i)n.push(i);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class Oa{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new Ia(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Ia(this,t,!0);return n.addAll(e,t.from,t.to),qs.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if($a(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(e)||r.context&&!n.matchesContext(r.context)||i.length>e.length&&(61!=i.charCodeAt(e.length)||i.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach((e=>{n(e=La(e)),e.mark=t}))}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach((e=>{n(e=La(e)),e.node=t}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Oa(e,Oa.schemaRules(e)))}}const Sa={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Na={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Ta={ol:!0,ul:!0};function Fa(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class Ma{constructor(e,t,n,r,o,i,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=Vs.none,this.stashMarks=[],this.match=i||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Ps.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=Ps.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Ps.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):Ba(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Sa.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ia{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,i=Fa(null,t.preserveWhitespace,0)|(n?4:0);r=o?new Ma(o.type,o.attrs,Vs.none,Vs.none,!0,t.topMatch||o.type.contentMatch,i):new Ma(n?null:e.schema.topNodeType,null,Vs.none,Vs.none,!0,null,i),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style"),n=t?this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(let e=0;e<n.length;e++)this.addPendingMark(n[e]);if(this.addElement(e),null!=n)for(let e=0;e<n.length;e++)this.removePendingMark(n[e],r)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();Ta.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&Ta.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:Na.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,i=this.needsBlock;if(Sa.hasOwnProperty(r))t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),t&&this.sync(n),this.needsBlock=i}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=Vs.none;e:for(let n=0;n<e.length;n+=2)for(let r;;){let o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}addElementByRule(e,t,n){let r,o,i;if(t.node)o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace);else{i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i)}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let i=Fa(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new Ma(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)){t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=o;s--)if(i(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function $a(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function La(e){let t={};for(let n in e)t[n]=e[n];return t}function Ba(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class Pa{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=ja(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,i=0;for(;n<o.length&&i<e.marks.length;){let t=e.marks[i];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],s=this.serializeMark(n,e.isInline,t);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=Pa.renderSpec(ja(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Pa.renderSpec(ja(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,o=t[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?e.createElementNS(n,o):e.createElement(o),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let o=l;o<t.length;o++){let i=t[o];if(0===i){if(o<t.length-1||o>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:o}=Pa.renderSpec(e,i,n);if(s.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Pa(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ra(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Ra(e.marks)}}function Ra(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function ja(e){return e.document||window.document}const Ha=Math.pow(2,16);function Va(e,t){return e+t*Ha}function za(e){return 65535&e}class qa{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class Wa{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&Wa.empty)return Wa.empty}recover(e){let t=0,n=za(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/Ha}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;let l=this.ranges[s+o],c=this.ranges[s+i],u=a+l;if(e<=u){let o=a+r+((l?e==a?-1:e==u?1:t:t)<0?0:c);if(n)return o;let i=e==(t<0?a:u)?null:Va(s/3,e-a),p=e==a?2:e==u?1:4;return(t<0?e!=a:e!=u)&&(p|=8),new qa(o,p,i)}r+=c-l}return n?e+r:new qa(e+r,0,null)}touches(e,t){let n=0,r=za(t),o=this.inverted?2:1,i=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?n:0);if(s>e)break;let a=this.ranges[t+o];if(e<=s+a&&t==3*r)return!0;n+=this.ranges[t+i]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),o+=c-l}}invert(){return new Wa(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?Wa.empty:new Wa(e<0?[0,-e,0]:[0,0,e])}}Wa.empty=new Wa([]);class Ka{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new Ka(this.maps,this.mirror,e,t)}copy(){return new Ka(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new Ka;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let o=this.maps[n].mapResult(e,t);if(null!=o.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this.maps[t].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new qa(e,r,null)}}const Ua=Object.create(null);class Ja{getMap(){return Wa.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Ua[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ua)throw new RangeError("Duplicate use of step JSON ID "+e);return Ua[e]=t,t.prototype.jsonID=e,t}}class Ga{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Ga(e,null)}static fail(e){return new Ga(null,e)}static fromReplace(e,t,n,r){try{return Ga.ok(e.replace(t,n,r))}catch(e){if(e instanceof zs)return Ga.fail(e.message);throw e}}}function Ya(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(Ya(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return Ps.fromArray(r)}class Xa extends Ja{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new qs(Ya(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return Ga.fromReplace(e,this.from,this.to,o)}invert(){return new Qa(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new Xa(t.pos,n.pos,this.mark)}merge(e){return e instanceof Xa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Xa(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Xa(t.from,t.to,e.markFromJSON(t.mark))}}Ja.jsonID("addMark",Xa);class Qa extends Ja{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new qs(Ya(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return Ga.fromReplace(e,this.from,this.to,n)}invert(){return new Xa(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new Qa(t.pos,n.pos,this.mark)}merge(e){return e instanceof Qa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Qa(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Qa(t.from,t.to,e.markFromJSON(t.mark))}}Ja.jsonID("removeMark",Qa);class Za extends Ja{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&tl(e,this.from,this.to)?Ga.fail("Structure replace would overwrite content"):Ga.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new Wa([this.from,this.to-this.from,this.slice.size])}invert(e){return new Za(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new Za(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof Za)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?qs.empty:new qs(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Za(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?qs.empty:new qs(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Za(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Za(t.from,t.to,qs.fromJSON(e,t.slice),!!t.structure)}}Ja.jsonID("replace",Za);class el extends Ja{constructor(e,t,n,r,o,i,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(e){if(this.structure&&(tl(e,this.from,this.gapFrom)||tl(e,this.gapTo,this.to)))return Ga.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ga.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?Ga.fromReplace(e,this.from,this.to,n):Ga.fail("Content does not fit in gap")}getMap(){return new Wa([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new el(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new el(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new el(t.from,t.to,t.gapFrom,t.gapTo,qs.fromJSON(e,t.slice),t.insert,!!t.structure)}}function tl(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let e=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function nl(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function rl(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!nl(r,o,i))break}return null}function ol(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<o;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return i?o.map(il).concat({type:t,attrs:n}).concat(i.map(il)):null}function il(e){return{type:e,attrs:null}}function sl(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=n-2;e>i;e--,t--){let n=o.node(e),i=o.index(e);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(i,n.childCount),a=r&&r[t]||n;if(a!=n&&(s=s.replaceChild(0,a.type.create(a.attrs))),!n.canReplace(i+1,n.childCount)||!a.type.validContent(s))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function al(e,t){let n=e.resolve(t),r=n.index();return o=n.nodeBefore,i=n.nodeAfter,!(!o||!i||o.isLeaf||!o.canAppend(i))&&n.parent.canReplace(r,r+1);var o,i}function ll(e,t,n=t,r=qs.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return cl(o,i,r)?new Za(t,n,r):new ul(o,i,r).fit()}function cl(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Ja.jsonID("replaceAround",el);class ul{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=Ps.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=Ps.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let o=this.placed,i=n.depth,s=r.depth;for(;i&&s&&1==o.childCount;)o=o.firstChild.content,i--,s--;let a=new qs(o,i,s);return e>-1?new el(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new Za(n.pos,r.pos,a):null}findFittable(){for(let e=1;e<=2;e++)for(let t=this.unplaced.openStart;t>=0;t--){let n,r=null;t?(r=hl(this.unplaced.content,t-1).firstChild,n=r.content):n=this.unplaced.content;let o=n.firstChild;for(let n=this.depth;n>=0;n--){let i,{type:s,match:a}=this.frontier[n],l=null;if(1==e&&(o?a.matchType(o.type)||(l=a.fillBefore(Ps.from(o),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:t,frontierDepth:n,parent:r,inject:l};if(2==e&&o&&(i=a.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:n,parent:r,wrap:i};if(r&&a.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=hl(e,t);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new qs(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=hl(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new qs(pl(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new qs(pl(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let i=this.unplaced,s=n?n.content:i.content,a=i.openStart-e,l=0,c=[],{match:u,type:p}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)c.push(r.child(e));u=u.matchFragment(r)}let d=s.size+e-(i.content.size-i.openEnd);for(;l<s.childCount;){let e=s.child(l),t=u.matchType(e.type);if(!t)break;l++,(l>1||0==a||e.content.size)&&(u=t,c.push(fl(e.mark(p.allowedMarks(e.marks)),1==l?a:0,l==s.childCount?d:-1)))}let h=l==s.childCount;h||(d=-1),this.placed=dl(this.placed,t,Ps.from(c)),this.frontier[t].match=u,h&&d<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<d;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=h?0==e?qs.empty:new qs(pl(i.content,e-1,1),e-1,d<0?i.openEnd:e-1):new qs(pl(i.content,e,l),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!ml(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=ml(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=ml(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:i,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=dl(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=dl(this.placed,this.depth,Ps.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(Ps.empty,!0);e.childCount&&(this.placed=dl(this.placed,this.frontier.length,e))}}function pl(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(pl(e.firstChild.content,t-1,n)))}function dl(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(dl(e.lastChild.content,t-1,n)))}function hl(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function fl(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,fl(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Ps.empty,!0)))),e.copy(r)}function ml(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,s)?a:null}function gl(e){return e.spec.defining||e.spec.definingForContent}function vl(e,t,n,r,o){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(vl(o.content,t+1,n,r,o)))}if(t>r){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(Ps.empty,!0))}return e}function yl(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}let bl=class extends Error{};bl=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(bl.prototype=Object.create(Error.prototype)).constructor=bl,bl.prototype.name="TransformError";class Dl{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Ka}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new bl(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=qs.empty){let r=ll(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new qs(Ps.from(n),0,0))}delete(e,t){return this.replace(e,t,qs.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(cl(o,i,r))return e.step(new Za(t,n,r));let s=yl(o,e.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(e)>-1?a=e:o.before(e)==t&&s.splice(1,0,-e)}let l=s.indexOf(a),c=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=c[e].type,n=gl(t);if(n&&o.node(l).type!=t)u=e;else if(n||!t.isTextblock)break}for(let t=r.openStart;t>=0;t--){let a=(t+u+1)%(r.openStart+1),p=c[a];if(p)for(let t=0;t<s.length;t++){let c=s[(t+l)%s.length],u=!0;c<0&&(u=!1,c=-c);let d=o.node(c-1),h=o.index(c-1);if(d.canReplaceWith(h,h,p.type,p.marks))return e.replace(o.before(c),u?i.after(c):n,new qs(vl(r.content,0,r.openStart,a),a,r.openEnd))}}let p=e.steps.length;for(let a=s.length-1;a>=0&&(e.replace(t,n,r),!(e.steps.length>p));a--){let e=s[a];e<0||(t=o.before(e),n=i.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new qs(Ps.from(r),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=yl(r,o);for(let t=0;t<i.length;t++){let n=i[t],s=t==i.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return e.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return e.delete(r.before(i),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:r,$to:o,depth:i}=t,s=r.before(i+1),a=o.after(i+1),l=s,c=a,u=Ps.empty,p=0;for(let e=i,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=Ps.from(r.node(e).copy(u)),p++):l--;let d=Ps.empty,h=0;for(let e=i,t=!1;e>n;e--)t||o.after(e+1)<o.end(e)?(t=!0,d=Ps.from(o.node(e).copy(d)),h++):c++;e.step(new el(l,c,s,a,new qs(u.append(d),p,h),u.size-p,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=new Za(t-n,t+n,qs.empty,!0);e.step(r)}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=Ps.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ps.from(n[e].type.create(n[e].attrs,r))}let o=t.start,i=t.end;e.step(new el(o,i,o,i,new qs(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);let s=e.mapping.slice(i),a=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new el(a,l,a+1,l-1,new qs(Ps.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r=[]){return function(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new el(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new qs(Ps.from(s),0,0),1,!0))}(this,e,t,n,r),this}split(e,t=1,n){return function(e,t,n=1,r){let o=e.doc.resolve(t),i=Ps.empty,s=Ps.empty;for(let e=o.depth,t=o.depth-n,a=n-1;e>t;e--,a--){i=Ps.from(o.node(e).copy(i));let t=r&&r[a];s=Ps.from(t?t.type.create(t.attrs,s):o.node(e).copy(s))}e.step(new Za(t,t,new qs(i.append(s),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,i,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),p=Math.min(l+e.nodeSize,n),d=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(d)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=p:s.push(o=new Qa(c,p,u[e])));i&&i.to==c?i.to=p:a.push(i=new Xa(c,p,r))}})),s.forEach((t=>e.step(t))),a.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,((e,s)=>{if(!e.isInline)return;i++;let a=null;if(r instanceof xa){let t,n=e.marks;for(;t=r.isInSet(n);)(a||(a=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(a=[r]):a=e.marks;if(a&&a.length){let r=Math.min(s+e.nodeSize,n);for(let e=0;e<a.length;e++){let n,l=a[e];for(let e=0;e<o.length;e++){let t=o[e];t.step==i-1&&l.eq(o[e].style)&&(n=t)}n?(n.to=r,n.step=i):o.push({style:l,from:Math.max(s,t),to:r,step:i})}}})),o.forEach((t=>e.step(new Qa(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let t=0;t<o.childCount;t++){let a=o.child(t),l=s+a.nodeSize,c=r.matchType(a.type);if(c){r=c;for(let t=0;t<a.marks.length;t++)n.allowsMarkType(a.marks[t].type)||e.step(new Qa(s,l,a.marks[t]))}else i.push(new Za(s,l,qs.empty));s=l}if(!r.validEnd){let t=r.fillBefore(Ps.empty,!0);e.replace(s,s,new qs(t,0,0))}for(let t=i.length-1;t>=0;t--)e.step(i[t])}(this,e,t,n),this}}const El=Object.create(null);class wl{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new Cl(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=qs.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let o=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:a,$to:l}=i[s],c=e.mapping.slice(o);e.replaceRange(c.map(a.pos),c.map(l.pos),s?qs.empty:t),0==s&&Ml(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],a=e.mapping.slice(n),l=a.map(i.pos),c=a.map(s.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),Ml(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new kl(e):Fl(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let o=t<0?Fl(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):Fl(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Nl(e.node(0))}static atStart(e){return Fl(e,e,0,0,1)||new Nl(e)}static atEnd(e){return Fl(e,e,e.content.size,e.childCount,-1)||new Nl(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=El[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in El)throw new RangeError("Duplicate use of selection JSON ID "+e);return El[e]=t,t.prototype.jsonID=e,t}getBookmark(){return kl.between(this.$anchor,this.$head).getBookmark()}}wl.prototype.visible=!0;class Cl{constructor(e,t){this.$from=e,this.$to=t}}let Al=!1;function xl(e){Al||e.parent.inlineContent||(Al=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class kl extends wl{constructor(e,t=e){xl(e),xl(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return wl.near(n);let r=e.resolve(t.map(this.anchor));return new kl(r.parent.inlineContent?r:n,n)}replace(e,t=qs.empty){if(super.replace(e,t),t==qs.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof kl&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new _l(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new kl(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=wl.findFrom(t,n,!0)||wl.findFrom(t,-n,!0);if(!e)return wl.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(wl.findFrom(e,-n,!0)||wl.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new kl(e,t)}}wl.jsonID("text",kl);class _l{constructor(e,t){this.anchor=e,this.head=t}map(e){return new _l(e.map(this.anchor),e.map(this.head))}resolve(e){return kl.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ol extends wl{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?wl.near(o):new Ol(o)}content(){return new qs(Ps.from(this.node),0,0)}eq(e){return e instanceof Ol&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Sl(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ol(e.resolve(t.anchor))}static create(e,t){return new Ol(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}Ol.prototype.visible=!1,wl.jsonID("node",Ol);class Sl{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new _l(n,n):new Sl(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Ol.isSelectable(n)?new Ol(t):wl.near(t)}}class Nl extends wl{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=qs.empty){if(t==qs.empty){e.delete(0,e.doc.content.size);let t=wl.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Nl(e)}map(e){return new Nl(e)}eq(e){return e instanceof Nl}getBookmark(){return Tl}}wl.jsonID("all",Nl);const Tl={map(){return this},resolve:e=>new Nl(e)};function Fl(e,t,n,r,o,i=!1){if(t.inlineContent)return kl.create(e,n);for(let s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){let r=t.child(s);if(r.isAtom){if(!i&&Ol.isSelectable(r))return Ol.create(e,n-(o<0?r.nodeSize:0))}else{let t=Fl(e,r,n+o,o<0?r.childCount:0,o,i);if(t)return t}n+=r.nodeSize*o}return null}function Ml(e,t,n){let r=e.steps.length-1;if(r<t)return;let o,i=e.steps[r];(i instanceof Za||i instanceof el)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==o&&(o=r)})),e.setSelection(wl.near(e.doc.resolve(o),n)))}function Il(e,t){return t&&e?e.bind(t):e}class $l{constructor(e,t,n){this.name=e,this.init=Il(t.init,n),this.apply=Il(t.apply,n)}}function Ll(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=Ll(o,t,{})),n[r]=o}return n}new $l("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new $l("selection",{init:(e,t)=>e.selection||wl.atStart(t.doc),apply:e=>e.selection}),new $l("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new $l("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t});class Bl{constructor(e){this.spec=e,this.props={},e.props&&Ll(e.props,this,this.props),this.key=e.key?e.key.key:Rl("plugin")}getState(e){return e[this.key]}}const Pl=Object.create(null);function Rl(e){return e in Pl?e+"$"+ ++Pl[e]:(Pl[e]=0,e+"$")}class jl{constructor(e="key"){this.key=Rl(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const Hl="undefined"!=typeof navigator?navigator:null,Vl="undefined"!=typeof document?document:null,zl=Hl&&Hl.userAgent||"",ql=/Edge\/(\d+)/.exec(zl),Wl=/MSIE \d/.exec(zl),Kl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(zl),Ul=!!(Wl||Kl||ql),Jl=Wl?document.documentMode:Kl?+Kl[1]:ql?+ql[1]:0,Gl=!Ul&&/gecko\/(\d+)/i.test(zl);Gl&&(/Firefox\/(\d+)/.exec(zl)||[0,0])[1];const Yl=!Ul&&/Chrome\/(\d+)/.exec(zl),Xl=!!Yl,Ql=Yl?+Yl[1]:0,Zl=!Ul&&!!Hl&&/Apple Computer/.test(Hl.vendor),ec=Zl&&(/Mobile\/\w+/.test(zl)||!!Hl&&Hl.maxTouchPoints>2),tc=ec||!!Hl&&/Mac/.test(Hl.platform),nc=/Android \d/.test(zl),rc=!!Vl&&"webkitFontSmoothing"in Vl.documentElement.style,oc=rc?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,ic=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},sc=/^(img|br|input|textarea|hr)$/i;function ac(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:lc(e))){let n=e.parentNode;if(!n||1!=n.nodeType||cc(e)||sc.test(e.nodeName)||"false"==e.contentEditable)return!1;t=ic(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?lc(e):0}}}function lc(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function cc(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const uc=function(e){let t=e.isCollapsed;return t&&Xl&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function pc(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function dc(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(uc(n)){for(a=c;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&Ol.isSelectable(e)&&o.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==lc(e);r||o;){if(e==n)return!0;let t=ic(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==lc(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;l=new Ol(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}if(!l){l=Dc(e,a,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1)}return l}function hc(e){return e.editable?e.hasFocus():function(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function fc(e,t=!1){let n=e.state.selection;if(function(e,t){if(t instanceof Ol){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(bc(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else bc(e)}(e,n),hc(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Xl){let t=e.domSelection(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&(r=t.anchorNode,o=t.anchorOffset,i=n.anchorNode,s=n.anchorOffset,i&&(ac(r,o,i,s,-1)||ac(r,o,i,s,1))))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}var r,o,i,s;if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,ic(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Ul&&Jl<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,o,{anchor:i,head:s}=n;!mc||n instanceof kl||(n.$from.parent.inlineContent||(r=gc(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=gc(e,n.to))),e.docView.setSelection(i,s,e.root,t),mc&&(r&&yc(r),o&&yc(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{hc(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const mc=Zl||Xl&&Ql<63;function gc(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Zl&&o&&"false"==o.contentEditable)return vc(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return vc(o);if(i)return vc(i)}}function vc(e){return e.contentEditable="true",Zl&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function yc(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function bc(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Dc(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||kl.between(t,n,r)}function Ec(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&wl.findFrom(i,t)}function wc(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function Cc(e,t,n){let r=e.state.selection;if(!(r instanceof kl)){if(r instanceof Ol&&r.node.isInline)return wc(e,new kl(t>0?r.$to:r.$from));{let n=Ec(e.state,t);return!!n&&wc(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=Ec(e.state,t);return!!(n&&n instanceof Ol)&&wc(e,n)}if(!(tc&&n.indexOf("m")>-1)){let n,o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText)return!1;let s=t<0?o.pos-i.nodeSize:o.pos;return!!(i.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(Ol.isSelectable(i)?wc(e,new Ol(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):!!rc&&wc(e,new kl(e.state.doc.resolve(t<0?s:s+i.nodeSize))))}}function Ac(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function xc(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function kc(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(Gl&&1==n.nodeType&&r<Ac(n)&&xc(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(xc(e))o=n,i=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Oc(n))break;{let t=n.previousSibling;for(;t&&xc(t);)o=n.parentNode,i=ic(t),t=t.previousSibling;if(t)n=t,r=Ac(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Sc(e,t,n,r):o&&Sc(e,t,o,i)}function _c(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=Ac(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!xc(n.childNodes[r]))break;o=n,i=++r}else{if(Oc(n))break;{let t=n.nextSibling;for(;t&&xc(t);)o=t.parentNode,i=ic(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=Ac(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}o&&Sc(e,t,o,i)}function Oc(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Sc(e,t,n,r){if(uc(t)){let e=document.createRange();e.setEnd(n,r),e.setStart(n,r),t.removeAllRanges(),t.addRange(e)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&fc(e)}),50)}function Nc(e,t,n){let r=e.state.selection;if(r instanceof kl&&!r.empty||n.indexOf("s")>-1)return!1;if(tc&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=Ec(e.state,t);if(n&&n instanceof Ol)return wc(e,n)}if(!o.parent.inlineContent){let n=t<0?o:i,s=r instanceof Nl?wl.near(n,t):wl.findFrom(n,t);return!!s&&wc(e,s)}return!1}function Tc(e,t){if(!(e.state.selection instanceof kl))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let r=e.state.tr;return t<0?r.delete(n.pos-i.nodeSize,n.pos):r.delete(n.pos,n.pos+i.nodeSize),e.dispatch(r),!0}return!1}function Fc(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Mc(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||tc&&72==n&&"c"==r?Tc(e,-1)||kc(e):46==n||tc&&68==n&&"c"==r?Tc(e,1)||_c(e):13==n||27==n||(37==n||tc&&66==n&&"c"==r?Cc(e,-1,r)||kc(e):39==n||tc&&70==n&&"c"==r?Cc(e,1,r)||_c(e):38==n||tc&&80==n&&"c"==r?Nc(e,-1,r)||kc(e):40==n||tc&&78==n&&"c"==r?function(e){if(!Zl||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Fc(e,n,"true"),setTimeout((()=>Fc(e,n,"false")),20)}return!1}(e)||Nc(e,1,r)||_c(e):r==(tc?"m":"c")&&(66==n||73==n||89==n||90==n))}function Ic(e,t){let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Pa.fromSchema(e.state.schema),a=qc(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,p=0;for(;u&&1==u.nodeType&&(c=Vc[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),p++}u=l.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${o} ${i}${p?` -${p}`:""} ${JSON.stringify(n)}`),{dom:l,text:e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n")}}function $c(e,t,n,r,o){let i,s,a=o.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(e=>{t=e(t,a||r)})),a)return t?new qs(Ps.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):qs.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,o,r)));if(n)s=n;else{let n=o.marks(),{schema:r}=e.state,s=Pa.fromSchema(r);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=i.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),i=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=qc().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Vc[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),rc&&function(e){let t=e.querySelectorAll(Xl?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);let c=i&&i.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let e=+u[3];e>0&&i.firstChild;e--)i=i.firstChild;if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||Oa.fromSchema(e.state.schema);s=t.parseSlice(i,{preserveWhitespace:!(!l&&!u),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Lc.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:o,openStart:i,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;o=Ps.from(t.create(n[e+1],o)),i++,s++}return new qs(o,i,s)}(Hc(s,+u[1],+u[2]),u[4]);else if(s=qs.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n).contentMatchAt(t.index(n)),i=[];if(e.forEach((e=>{if(!i)return;let t,n=o.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&r.length&&Pc(n,r,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=Rc(i[i.length-1],r.length));let t=Bc(e,n);i.push(t),o=o.matchType(t.type),r=n}})),i)return Ps.from(i)}return e}(s.content,o),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=Hc(s,e,t)}return e.someProp("transformPasted",(e=>{s=e(s)})),s}const Lc=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Bc(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Ps.from(e));return e}function Pc(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=Pc(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(Ps.from(Bc(n,e,o+1))))}}function Rc(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,Rc(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Ps.empty,!0);return e.copy(n.append(r))}function jc(e,t,n,r,o,i){let s=t<0?e.firstChild:e.lastChild,a=s.content;return o<r-1&&(a=jc(a,t,n,r,o+1,i)),o>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Ps.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function Hc(e,t,n){return t<e.openStart&&(e=new qs(jc(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new qs(jc(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const Vc={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let zc=null;function qc(){return zc||(zc=document.implementation.createHTMLDocument("title"))}const Wc={};let Kc={};function Uc(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Jc(e){return{left:e.clientX,top:e.clientY}}function Gc(e,t,n,r,o){if(-1==r)return!1;let i=e.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(e.someProp(t,(t=>r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function Yc(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Xc(e,t,n,r,o){return Gc(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(o?function(e,t){if(-1==t)return!1;let n,r,o=e.state.selection;o instanceof Ol&&(n=o.node);let i=e.state.doc.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e);if(Ol.isSelectable(t)){r=n&&o.$from.depth>0&&e>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(e);break}}return null!=r&&(Yc(e,Ol.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&Ol.isSelectable(r))&&(Yc(e,new Ol(n),"pointer"),!0)}(e,n))}function Qc(e,t,n,r){return Gc(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function Zc(e,t,n,r){return Gc(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(Yc(e,kl.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(t);for(let t=o.depth+1;t>0;t--){let n=t>o.depth?o.nodeAfter:o.node(t),i=o.before(t);if(n.inlineContent)Yc(e,kl.create(r,i+1,i+1+n.content.size),"pointer");else{if(!Ol.isSelectable(n))continue;Yc(e,Ol.create(r,i),"pointer")}return!0}}(e,n,r)}function eu(e){return au(e)}Kc.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!ru(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!nc||!Xl||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!ec||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||Mc(e,n)?n.preventDefault():Uc(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,pc(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},Kc.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},Kc.keypress=(e,t)=>{let n=t;if(ru(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||tc&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof kl&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const tu=tc?"metaKey":"ctrlKey";Wc.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=eu(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[tu]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(Jc(n));s&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new nu(e,s,n,!!r)):("doubleClick"==i?Qc:Zc)(e,s.pos,s.inside,n)?n.preventDefault():Uc(e,"pointer"))};class nu{constructor(e,t,n,r){let o,i;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[tu],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,i=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||l instanceof Ol&&l.from<=i&&l.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Gl||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Uc(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>fc(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Jc(e))),this.allowDefault||!t?Uc(this.view,"pointer"):Xc(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Zl&&this.mightDrag&&!this.mightDrag.node.isAtom||Xl&&!(this.view.state.selection instanceof kl)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Yc(this.view,wl.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Uc(this.view,"pointer")}move(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Uc(this.view,"pointer"),0==e.buttons&&this.done()}}function ru(e,t){return!!e.composing||!!(Zl&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}Wc.touchdown=e=>{eu(e),Uc(e,"pointer")},Wc.contextmenu=e=>eu(e);const ou=nc?5e3:-1;function iu(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>au(e)),t))}function su(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function au(e,t=!1){if(!(nc&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),su(e),t||e.docView&&e.docView.dirty){let t=dc(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}Kc.compositionstart=Kc.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),au(e,!0),e.markCursor=null;else if(au(e),Gl&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}iu(e,ou)},Kc.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,iu(e,20))};const lu=Ul&&Jl<15||ec&&oc<604;function cu(e,t,n,r){let o=$c(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,o||qs.empty))))return!0;if(!o)return!1;let i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),s=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}Wc.copy=Kc.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let i=lu?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Ic(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Kc.paste=(e,t)=>{let n=t;if(e.composing&&!nc)return;let r=lu?null:n.clipboardData;r&&cu(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?cu(e,r.value,null,t):cu(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class uu{constructor(e,t){this.slice=e,this.move=t}}const pu=tc?"altKey":"ctrlKey";Wc.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(Jc(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof Ol?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Ol.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(Ol.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=Ic(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(lu?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",lu||n.dataTransfer.setData("text/plain",l),e.dragging=new uu(s,!n[pu])},Wc.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},Kc.dragover=Kc.dragenter=(e,t)=>t.preventDefault(),Kc.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(Jc(n));if(!o)return;let i=e.state.doc.resolve(o.pos);if(!i)return;let s=r&&r.slice;s?e.someProp("transformPasted",(e=>{s=e(s)})):s=$c(e,n.dataTransfer.getData(lu?"Text":"text/plain"),lu?null:n.dataTransfer.getData("text/html"),!1,i);let a=!(!r||n[pu]);if(e.someProp("handleDrop",(t=>t(e,n,s||qs.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?function(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let e=0;e<n.openStart;e++)o=o.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,i=r.index(t)+(n>0?1:0),s=r.node(t),a=!1;if(1==e)a=s.canReplace(i,i,o);else{let e=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=e&&s.canReplaceWith(i,i,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}(e.state.doc,i.pos,s):i.pos;null==l&&(l=i.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),p=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,d=c.doc;if(p?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(d))return;let h=c.doc.resolve(u);if(p&&Ol.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Ol(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),c.setSelection(Dc(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},Wc.focus=e=>{e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&fc(e)}),20))},Wc.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},Wc.beforeinput=(e,t)=>{if(Xl&&nc&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,pc(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in Kc)Wc[e]=Kc[e];function du(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class hu{constructor(e,t){this.toDOM=e,this.spec=t||yu,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:i}=e.mapResult(t.from+r,this.side<0?-1:1);return i?null:new gu(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof hu&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&du(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class fu{constructor(e,t){this.attrs=e,this.spec=t||yu}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new gu(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof fu&&du(this.attrs,e.attrs)&&du(this.spec,e.spec)}static is(e){return e.type instanceof fu}destroy(){}}class mu{constructor(e,t){this.attrs=e,this.spec=t||yu}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new gu(o.pos-n,i.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof mu&&du(this.attrs,e.attrs)&&du(this.spec,e.spec)}destroy(){}}class gu{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new gu(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new gu(e,e,new hu(t,n))}static inline(e,t,n,r){return new gu(e,t,new fu(n,r))}static node(e,t,n,r){return new gu(e,t,new mu(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof fu}}const vu=[],yu={};class bu{constructor(e,t){this.local=e.length?e:vu,this.children=t.length?t:vu}static create(e,t){return t.length?xu(t,e,0,yu):Du}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let s=this.children[i]+1;this.children[i+2].findInner(e-s,t-s,n,r+s,o)}}map(e,t,n){return this==Du||0==e.maps.length?this:this.mapInner(e,t,0,0,n||yu)}mapInner(e,t,n,r,o){let i;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,s){let a=e.slice(),l=(e,t,n,r)=>{for(let s=0;s<a.length;s+=3){let l,c=a[s+1];if(c<0||e>c+i)continue;let u=a[s]+i;t>=u?a[s+1]=e<=u?-2:-1:n>=o&&(l=r-n-(t-e))&&(a[s]+=l,a[s+1]+=l)}};for(let e=0;e<n.maps.length;e++)n.maps[e].forEach(l);let c=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){c=!0,a[t+1]=-1;continue}let l=n.map(e[t]+i),u=l-o;if(u<0||u>=r.content.size){c=!0;continue}let p=n.map(e[t+1]+i,-1)-o,{index:d,offset:h}=r.content.findIndex(u),f=r.maybeChild(d);if(f&&h==u&&h+f.nodeSize==p){let r=a[t+2].mapInner(n,f,l+1,e[t]+i+1,s);r!=Du?(a[t]=u,a[t+1]=p,a[t+2]=r):(a[t+1]=-2,c=!0)}else c=!0}if(c){let l=function(e,t,n,r,o,i,s){function a(e,t){for(let i=0;i<e.local.length;i++){let a=e.local[i].map(r,o,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[i].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+i+1);return n}(a,e,t,n,o,i,s),c=xu(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new bu(t.sort(ku),a)}(this.children,i||[],e,t,n,r,o):i?new bu(i.sort(ku),vu):Du}add(e,t){return t.length?this==Du?bu.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,i)=>{let s,a=i+n;if(s=Cu(t,e,a)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(e,s,a+1):r.splice(o,0,i,i+e.nodeSize,xu(s,e,a+1,yu)),o+=3}}));let i=wu(o?Au(t):t,-n);for(let t=0;t<i.length;t++)i[t].type.valid(e,i[t])||i.splice(t--,1);return new bu(i.length?this.local.concat(i).sort(ku):this.local,r||this.children)}remove(e){return 0==e.length||this==Du?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o,i=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>i&&t.to<s&&(e[n]=null,(o||(o=[])).push(t));if(!o)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(o,i+1);a!=Du?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,o=0;o<e.length;o++)if(n=e[o])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new bu(r,n):Du}forChild(e,t){if(this==Du)return this;if(t.isLeaf)return bu.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let o=e+1,i=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<i&&t.to>o&&t.type instanceof fu){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new bu(r.sort(ku),vu);return n?new Eu([e,n]):e}return n||Du}eq(e){if(this==e)return!0;if(!(e instanceof bu)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return _u(this.localsInner(e))}localsInner(e){if(this==Du)return vu;if(e.inlineContent||!this.local.some(fu.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof fu||t.push(this.local[e]);return t}}bu.empty=new bu([],[]),bu.removeOverlap=_u;const Du=bu.empty;class Eu{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,yu)));return Eu.from(n)}forChild(e,t){if(t.isLeaf)return bu.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=Du&&(o instanceof Eu?n=n.concat(o.members):n.push(o))}return Eu.from(n)}eq(e){if(!(e instanceof Eu)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?_u(n?t:t.sort(ku)):vu}static from(e){switch(e.length){case 0:return Du;case 1:return e[0];default:return new Eu(e)}}}function wu(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new gu(o.from+t,o.to+t,o.type))}return n}function Cu(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let t,i=0;i<e.length;i++)(t=e[i])&&t.from>n&&t.to<r&&((o||(o=[])).push(t),e[i]=null);return o}function Au(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function xu(e,t,n,r){let o=[],i=!1;t.forEach(((t,s)=>{let a=Cu(e,t,s+n);if(a){i=!0;let e=xu(a,t,n+s+1,r);e!=Du&&o.push(s,s+t.nodeSize,e)}}));let s=wu(i?Au(e):e,-n).sort(ku);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||o.length?new bu(s,o):Du}function ku(e,t){return e.from-t.from||e.to-t.to}function _u(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Ou(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Ou(t,o+1,i.copy(r.to,i.to)))}}return t}function Ou(e,t,n){for(;t<e.length&&ku(n,e[t])>0;)t++;e.splice(t,0,n)}for(var Su={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Nu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Tu="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Fu="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Mu="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Iu="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),$u="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Lu=Tu&&(Iu||+Tu[1]<57)||Mu&&Iu,Bu=0;Bu<10;Bu++)Su[48+Bu]=Su[96+Bu]=String(Bu);for(Bu=1;Bu<=24;Bu++)Su[Bu+111]="F"+Bu;for(Bu=65;Bu<=90;Bu++)Su[Bu]=String.fromCharCode(Bu+32),Nu[Bu]=String.fromCharCode(Bu);for(var Pu in Su)Nu.hasOwnProperty(Pu)||(Nu[Pu]=Su[Pu]);const Ru="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function ju(e){let t,n,r,o,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let e=0;e<i.length-1;e++){let s=i[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);Ru?o=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function Hu(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function Vu(e){let t=function(e){let t=Object.create(null);for(let n in e)t[ju(n)]=e[n];return t}(e);return function(e,n){let r,o=function(e){var t=!(Lu&&(e.ctrlKey||e.altKey||e.metaKey)||(Fu||$u)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?Nu:Su)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,s=t[Hu(o,n,!i)];if(s&&s(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Su[n.keyCode])&&r!=o){let o=t[Hu(r,n,!0)];if(o&&o(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){let r=t[Hu(o,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}function zu(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function qu(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function Wu(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function Ku(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Uu(e,t,n){let r,o,i=t.nodeBefore,s=t.nodeAfter;if(i.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(i,i+1)||!o.isTextblock&&!al(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&o.matchType(r[0]||s.type).validEnd){if(n){let o=t.pos+s.nodeSize,a=Ps.empty;for(let e=r.length-1;e>=0;e--)a=Ps.from(r[e].create(null,a));a=Ps.from(i.copy(a));let l=e.tr.step(new el(t.pos-1,o,t.pos,o,new qs(a,1,0),r.length,!0)),c=o+2*r.length;al(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=wl.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&rl(c);if(null!=u&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&zu(s,"start",!0)&&zu(i,"end")){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=Ps.empty;for(let e=o.length-1;e>=0;e--)r=Ps.from(o[e].copy(r));n(e.tr.step(new el(t.pos-o.length,t.pos+s.nodeSize,t.pos+l,t.pos+s.nodeSize-l,new qs(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function Ju(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(kl.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}const Gu=Ju(-1),Yu=Ju(1);function Xu(e,t=null){return function(n,r){let{from:o,to:i}=n.selection,s=!1;return n.doc.nodesBetween(o,i,((r,o)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{let t=n.doc.resolve(o),r=t.index();s=t.parent.canReplaceWith(r,r+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(o,i,e,t).scrollIntoView()),!0)}}function Qu(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==o.index(s.depth-1))return!1;let e=n.doc.resolve(s.start-2);l=new sa(e,e,s.depth),s.endIndex<s.parent.childCount&&(s=new sa(o,n.doc.resolve(i.end(s.depth)),s.depth)),a=!0}let c=ol(l,e,t,s);return!!c&&(r&&r(function(e,t,n,r,o){let i=Ps.empty;for(let e=n.length-1;e>=0;e--)i=Ps.from(n[e].type.create(n[e].attrs,i));e.step(new el(t.start-(r?2:0),t.end,t.start,t.end,new qs(i,0,0),n.length,!0));let s=0;for(let e=0;e<n.length;e++)n[e].type==o&&(s=e+1);let a=n.length-s,l=t.start+n.length-(r?2:0),c=t.parent;for(let n=t.startIndex,r=t.endIndex,o=!0;n<r;n++,o=!1)!o&&sl(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(n).nodeSize;return e}(n.tr,s,c,a,e).scrollIntoView()),!0)}}function Zu(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!i&&(!n||(r.node(i.depth-1).type==e?function(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new el(i-1,s,i,s,new qs(Ps.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new sa(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));return t(o.lift(r,rl(r)).scrollIntoView()),!0}(t,n,e,i):function(e,t,n){let r=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,i=n.startIndex;t>i;t--)e-=o.child(t).nodeSize,r.delete(e-1,e+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?Ps.empty:Ps.from(o))))return!1;let p=i.pos,d=p+s.nodeSize;return r.step(new el(p-(a?1:0),d+(l?1:0),p+1,d-1,new qs((a?Ps.empty:Ps.from(o.copy(Ps.empty))).append(l?Ps.empty:Ps.from(o.copy(Ps.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}(t,n,i)))}}function ep(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class tp{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(...e)=>{const n=t(...e)(i);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],a=!!e,l=e||o.tr,c={...Object.fromEntries(Object.entries(n).map((([e,n])=>[e,(...e)=>{const r=this.buildProps(l,t),o=n(...e)(r);return s.push(o),c}]))),run:()=>(a||!t||l.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(l),s.every((e=>!0===e)))};return c}createCan(e){const{rawCommands:t,state:n}=this,r=void 0,o=e||n.tr,i=this.buildProps(o,r),s=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,(...e)=>t(...e)({...i,dispatch:r})])));return{...s,chain:()=>this.createChain(o,r)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r;o.storedMarks&&e.setStoredMarks(o.storedMarks);const s={tr:e,editor:r,view:i,state:ep({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map((([e,t])=>[e,(...e)=>t(...e)(s)])))}};return s}}function np(e,t,n){if(void 0===e.config[t]&&e.parent)return np(e.parent,t,n);if("function"==typeof e.config[t]){return e.config[t].bind({...n,parent:e.parent?np(e.parent,t,n):null})}return e.config[t]}function rp(e){return{baseExtensions:e.filter((e=>"extension"===e.type)),nodeExtensions:e.filter((e=>"node"===e.type)),markExtensions:e.filter((e=>"mark"===e.type))}}function op(e){const t=[],{nodeExtensions:n,markExtensions:r}=rp(e),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((e=>{const n=np(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});if(!n)return;n().forEach((e=>{e.types.forEach((n=>{Object.entries(e.attributes).forEach((([e,r])=>{t.push({type:n,name:e,attribute:{...i,...r}})}))}))}))})),o.forEach((e=>{const n={name:e.name,options:e.options,storage:e.storage},r=np(e,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...i,...r};r.isRequired&&void 0===r.default&&delete o.default,t.push({type:e.name,name:n,attribute:o})}))})),t}function ip(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function sp(...e){return e.filter((e=>!!e)).reduce(((e,t)=>{const n={...e};return Object.entries(t).forEach((([e,t])=>{n[e]?n[e]="class"===e?[n[e],t].join(" "):"style"===e?[n[e],t].join("; "):t:n[e]=t})),n}),{})}function ap(e,t){return t.filter((e=>e.attribute.rendered)).map((t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]})).reduce(((e,t)=>sp(e,t)),{})}function lp(e,t,...n){return function(e){return"function"==typeof e}(e)?t?e.bind(t)(...n):e(...n):e}function cp(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;const o=t.reduce(((e,t)=>{const r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!=typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null==r?e:{...e,[t.name]:r}}),{});return{...r,...o}}}}function up(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>("attrs"!==e||!function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t)))}function pp(e){var t;const n=op(e),{nodeExtensions:r,markExtensions:o}=rp(e),i=null===(t=r.find((e=>np(e,"topNode"))))||void 0===t?void 0:t.name,s=Object.fromEntries(r.map((t=>{const r=n.filter((e=>e.type===t.name)),o={name:t.name,options:t.options,storage:t.storage},i=up({...e.reduce(((e,n)=>{const r=np(n,"extendNodeSchema",o);return{...e,...r?r(t):{}}}),{}),content:lp(np(t,"content",o)),marks:lp(np(t,"marks",o)),group:lp(np(t,"group",o)),inline:lp(np(t,"inline",o)),atom:lp(np(t,"atom",o)),selectable:lp(np(t,"selectable",o)),draggable:lp(np(t,"draggable",o)),code:lp(np(t,"code",o)),defining:lp(np(t,"defining",o)),isolating:lp(np(t,"isolating",o)),attrs:Object.fromEntries(r.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),s=lp(np(t,"parseHTML",o));s&&(i.parseDOM=s.map((e=>cp(e,r))));const a=np(t,"renderHTML",o);a&&(i.toDOM=e=>a({node:e,HTMLAttributes:ap(e,r)}));const l=np(t,"renderText",o);return l&&(i.toText=l),[t.name,i]}))),a=Object.fromEntries(o.map((t=>{const r=n.filter((e=>e.type===t.name)),o={name:t.name,options:t.options,storage:t.storage},i=up({...e.reduce(((e,n)=>{const r=np(n,"extendMarkSchema",o);return{...e,...r?r(t):{}}}),{}),inclusive:lp(np(t,"inclusive",o)),excludes:lp(np(t,"excludes",o)),group:lp(np(t,"group",o)),spanning:lp(np(t,"spanning",o)),code:lp(np(t,"code",o)),attrs:Object.fromEntries(r.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),s=lp(np(t,"parseHTML",o));s&&(i.parseDOM=s.map((e=>cp(e,r))));const a=np(t,"renderHTML",o);return a&&(i.toDOM=e=>a({mark:e,HTMLAttributes:ap(e,r)})),[t.name,i]})));return new ka({topNode:i,nodes:s,marks:a})}function dp(e,t){return t.nodes[e]||t.marks[e]||null}function hp(e,t){return Array.isArray(t)?t.some((t=>("string"==typeof t?t:t.name)===e.name)):t}function fp(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class mp{constructor(e){this.find=e.find,this.handler=e.handler}}function gp(e){var t;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((e=>e.type.spec.code))))return!1;let u=!1;const p=((e,t=500)=>{let n="";return e.parent.nodesBetween(Math.max(0,e.parentOffset-t),e.parentOffset,((t,r,o,i)=>{var s,a,l;n+=(null===(a=(s=t.type.spec).toText)||void 0===a?void 0:a.call(s,{node:t,pos:r,parent:o,index:i}))||(null===(l=e.nodeBefore)||void 0===l?void 0:l.text)||"%leaf%"})),n})(c)+i;return s.forEach((e=>{if(u)return;const t=((e,t)=>{if(fp(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r})(p,e.find);if(!t)return;const s=l.state.tr,c=ep({state:l.state,transaction:s}),d={from:r-(t[0].length-i.length),to:o},{commands:h,chain:f,can:m}=new tp({editor:n,state:c});null!==e.handler({state:c,range:d,match:t,commands:h,chain:f,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:o,text:i}),l.dispatch(s),u=!0)})),u}function vp(e){const{editor:t,rules:n}=e,r=new Bl({state:{init:()=>null,apply(e,t){const n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(e,o,i,s)=>gp({editor:t,from:o,to:i,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout((()=>{const{$cursor:o}=e.state.selection;o&&gp({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1)},handleKeyDown(e,o){if("Enter"!==o.key)return!1;const{$cursor:i}=e.state.selection;return!!i&&gp({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}class yp{constructor(e){this.find=e.find,this.handler=e.handler}}function bp(e){const{editor:t,state:n,from:r,to:o,rule:i}=e,{commands:s,chain:a,can:l}=new tp({editor:t,state:n}),c=[];n.doc.nodesBetween(r,o,((e,t)=>{if(!e.isTextblock||e.type.spec.code)return;const u=Math.max(r,t),p=Math.min(o,t+e.content.size),d=((e,t)=>{if(fp(t))return[...e.matchAll(t)];const n=t(e);return n?n.map((t=>{const n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(u-t,p-t,void 0,""),i.find);d.forEach((e=>{if(void 0===e.index)return;const t=u+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},p=i.handler({state:n,range:o,match:e,commands:s,chain:a,can:l});c.push(p)}))}));return c.every((e=>null!==e))}function Dp(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1;return n.map((e=>new Bl({view(e){const t=t=>{var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:e=>(i=r===e.dom.parentElement,!1),paste:(e,t)=>{var n;const r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return o=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(n,r,s)=>{const a=n[0],l="paste"===a.getMeta("uiEvent")&&!o,c="drop"===a.getMeta("uiEvent")&&!i;if(!l&&!c)return;const u=r.doc.content.findDiffStart(s.doc.content),p=r.doc.content.findDiffEnd(s.doc.content);if("number"!=typeof u||!p||u===p.b)return;const d=s.tr,h=ep({state:s,transaction:d});return bp({editor:t,state:h,from:Math.max(u-1,0),to:p.b,rule:e})&&d.steps.length?d:void 0}})))}class Ep{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=Ep.resolve(e),this.schema=pp(this.extensions),this.extensions.forEach((e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:dp(e.name,this.schema)};if("mark"===e.type){(null===(t=lp(np(e,"keepOnSplit",n)))||void 0===t||t)&&this.splittableMarks.push(e.name)}const r=np(e,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);const o=np(e,"onCreate",n);o&&this.editor.on("create",o);const i=np(e,"onUpdate",n);i&&this.editor.on("update",i);const s=np(e,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);const a=np(e,"onTransaction",n);a&&this.editor.on("transaction",a);const l=np(e,"onFocus",n);l&&this.editor.on("focus",l);const c=np(e,"onBlur",n);c&&this.editor.on("blur",c);const u=np(e,"onDestroy",n);u&&this.editor.on("destroy",u)}))}static resolve(e){const t=Ep.sort(Ep.flatten(e)),n=function(e){const t=e.filter(((t,n)=>e.indexOf(t)!==n));return[...new Set(t)]}(t.map((e=>e.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((e=>`'${e}'`)).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map((e=>{const t=np(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return t?[e,...this.flatten(t())]:e})).flat(10)}static sort(e){return e.sort(((e,t)=>{const n=np(e,"priority")||100,r=np(t,"priority")||100;return n>r?-1:n<r?1:0}))}get commands(){return this.extensions.reduce(((e,t)=>{const n=np(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:dp(t.name,this.schema)});return n?{...e,...n()}:e}),{})}get plugins(){const{editor:e}=this,t=Ep.sort([...this.extensions].reverse()),n=[],r=[],o=t.map((t=>{const o={name:t.name,options:t.options,storage:t.storage,editor:e,type:dp(t.name,this.schema)},i=[],s=np(t,"addKeyboardShortcuts",o);if(s){const t=function(e){return new Bl({props:{handleKeyDown:Vu(e)}})}(Object.fromEntries(Object.entries(s()).map((([t,n])=>[t,()=>n({editor:e})]))));i.push(t)}const a=np(t,"addInputRules",o);hp(t,e.options.enableInputRules)&&a&&n.push(...a());const l=np(t,"addPasteRules",o);hp(t,e.options.enablePasteRules)&&l&&r.push(...l());const c=np(t,"addProseMirrorPlugins",o);if(c){const e=c();i.push(...e)}return i})).flat();return[vp({editor:e,rules:n}),...Dp({editor:e,rules:r}),...o]}get attributes(){return op(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=rp(this.extensions);return Object.fromEntries(t.filter((e=>!!np(e,"addNodeView"))).map((t=>{const n=this.attributes.filter((e=>e.type===t.name)),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:ip(t.name,this.schema)},o=np(t,"addNodeView",r);if(!o)return[];return[t.name,(r,i,s,a)=>{const l=ap(r,n);return o()({editor:e,node:r,getPos:s,decorations:a,HTMLAttributes:l,extension:t})}]})))}}function wp(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function Cp(e,t){const n={...e};return wp(e)&&wp(t)&&Object.keys(t).forEach((r=>{wp(t[r])?r in e?n[r]=Cp(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})})),n}class Ap{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=lp(np(this,"addOptions",{name:this.name}))),this.storage=lp(np(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ap(e)}configure(e={}){const t=this.extend();return t.options=Cp(this.options,e),t.storage=lp(np(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Ap(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=lp(np(t,"addOptions",{name:t.name})),t.storage=lp(np(t,"addStorage",{name:t.name,options:t.options})),t}}Ap.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Bl({key:new jl("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map((e=>e.$from.pos))),a=Math.max(...i.map((e=>e.$to.pos))),l=function(e){return Object.fromEntries(Object.entries(e.nodes).filter((([,e])=>e.spec.toText)).map((([e,t])=>[e,t.spec.toText])))}(n);return function(e,t,n){const{from:r,to:o}=t,{blockSeparator:i="\n\n",textSerializers:s={}}=n||{};let a="",l=!0;return e.nodesBetween(r,o,((e,n,c,u)=>{var p;const d=null==s?void 0:s[e.type.name];d?(e.isBlock&&!l&&(a+=i,l=!0),c&&(a+=d({node:e,pos:n,parent:c,index:u,range:t}))):e.isText?(a+=null===(p=null==e?void 0:e.text)||void 0===p?void 0:p.slice(Math.max(r,n)-n,o-n),l=!1):e.isBlock&&!l&&(a+=i,l=!0)})),a}(r,{from:s,to:a},{textSerializers:l})}}})]}});function xp(e,t,n={strict:!0}){const r=Object.keys(t);return!r.length||r.every((r=>n.strict?t[r]===e[r]:fp(t[r])?t[r].test(e[r]):t[r]===e[r]))}function kp(e,t,n={}){return e.find((e=>e.type===t&&xp(e.attrs,n)))}function _p(e,t,n={}){return!!kp(e,t,n)}function Op(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const o=kp([...r.node.marks],t,n);if(!o)return;let i=r.index,s=e.start()+r.offset,a=i+1,l=s+r.node.nodeSize;for(kp([...r.node.marks],t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,s-=e.parent.child(i).nodeSize;for(;a<e.parent.childCount&&_p([...e.parent.child(a).marks],t,n);)l+=e.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function Sp(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function Np(e){return e&&"object"==typeof e&&!Array.isArray(e)&&!function(e){var t;return"class"===(null===(t=e.constructor)||void 0===t?void 0:t.toString().substring(0,5))}(e)}function Tp(e){return Np(e)&&e instanceof kl}function Fp(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Mp(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function Ip(e){const t=`<body>${e}</body>`;return(new window.DOMParser).parseFromString(t,"text/html").body}function $p(e,t,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof e&&null!==e)try{return Array.isArray(e)?Ps.fromArray(e.map((e=>t.nodeFromJSON(e)))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),$p("",t,n)}if("string"==typeof e){const r=Oa.fromSchema(t);return n.slice?r.parseSlice(Ip(e),n.parseOptions).content:r.parse(Ip(e),n.parseOptions)}return $p("",t,n)}function Lp(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function Bp(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?ip(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,((e,t)=>{if(e.isText)return;const n=Math.max(r,t),i=Math.min(o,t+e.nodeSize);a.push({node:e,from:n,to:i})}));const l=o-r,c=a.filter((e=>!s||s.name===e.node.type.name)).filter((e=>xp(e.node.attrs,n,{strict:!1})));if(i)return!!c.length;return c.reduce(((e,t)=>e+t.to-t.from),0)>=l}function Pp(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Rp(e,t){const n="string"==typeof t?[t]:t;return Object.keys(e).reduce(((t,r)=>(n.includes(r)||(t[r]=e[r]),t)),{})}function jp(e,t){const n=Sp(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,(e=>{s.push(...e.marks)}));const a=s.find((e=>e.type.name===n.name));return a?{...a.attrs}:{}}function Hp(e,t,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=e.find((e=>e.type===t&&e.name===n));return!!r&&r.attribute.keepOnSplit})))}function Vp(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter((e=>null==t?void 0:t.includes(e.type.name)));e.tr.ensureMarks(r)}}function zp(e){return t=>function(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}function qp(e,t){const{nodeExtensions:n}=rp(t),r=n.find((t=>t.name===e));if(!r)return!1;const o=lp(np(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}const Wp=(e,t)=>{const n=zp((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!al(e.doc,n.pos)||(e.join(n.pos),!0)},Kp=(e,t)=>{const n=zp((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!al(e.doc,r)||(e.join(r),!0)};var Up=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame((()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return!n||(o.forEach((({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,((e,n)=>{if(e.type.isText)return;const{doc:r,mapping:o}=t,i=r.resolve(o.map(n)),s=r.resolve(o.map(n+e.nodeSize)),a=i.blockRange(s);if(!a)return;const l=rl(a);if(e.type.isTextblock){const{defaultType:e}=i.parent.contentMatchAt(i.index());t.setNodeMarkup(a.start,e)}(l||0===l)&&t.lift(a,l)}))})),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>((e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Nl||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Ku(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(n,i.createAndFill());s.setSelection(kl.create(s.doc,n+1)),t(s.scrollIntoView())}return!0})(e,t),deleteNode:e=>({tr:t,state:n,dispatch:r})=>{const o=ip(e,n.schema),i=t.selection.$anchor;for(let e=i.depth;e>0;e-=1){if(i.node(e).type===o){if(r){const n=i.before(e),r=i.after(e);t.delete(n,r).scrollIntoView()}return!0}}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},deleteSelection:()=>({state:e,dispatch:t})=>((e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0))(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Ku(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,s.createAndFill());o.setSelection(wl.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0})(e,t),extendMarkRange:(e,t={})=>({tr:n,state:r,dispatch:o})=>{const i=Sp(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:u}=a;if(o){const e=Op(l,i,t);if(e&&e.from<=c&&e.to>=u){const t=kl.create(s,e.from,e.to);n.setSelection(t)}}return!0},first:e=>t=>{const n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1},focus:(e=null,t={})=>({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const s=()=>{Mp()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===e||!1===e)return!0;if(i&&null===e&&!Tp(n.state.selection))return s(),!0;const a=function(e,t=null){if(!t)return null;const n=wl.atStart(e),r=wl.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;const o=n.from,i=r.to;return"all"===t?kl.create(e,Fp(0,o,i),Fp(e.content.size,o,i)):kl.create(e,Fp(t,o,i),Fp(t,o,i))}(o.doc,e)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},forEach:(e,t)=>n=>e.every(((e,r)=>t(e,{...n,index:r}))),insertContent:(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const o=$p(t,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===o.toString())return!0;let{from:s,to:a}="number"==typeof e?{from:e,to:e}:e,l=!0,c=!0;if((o.toString().startsWith("<")?o:[o]).forEach((e=>{e.check(),l=!!l&&(e.isText&&0===e.marks.length),c=!!c&&e.isBlock})),s===a&&c){const{parent:e}=r.doc.resolve(s);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(s-=1,a+=1)}l?r.insertText(t,s,a):r.replaceWith(s,a,o),n.updateSelection&&function(e,t,n){const r=e.steps.length-1;if(r<t)return;const o=e.steps[r];if(!(o instanceof Za||o instanceof el))return;const i=e.mapping.maps[r];let s=0;i.forEach(((e,t,n,r)=>{0===s&&(s=r)})),e.setSelection(wl.near(e.doc.resolve(s),n))}(r,r.steps.length-1,-1)}return!0},joinBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let o=qu(r);if(!o){let n=r.blockRange(),o=n&&rl(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&Uu(e,o,t))return!0;if(0==r.parent.content.size&&(zu(i,"end")||Ol.isSelectable(i))){let n=ll(e.doc,r.before(),r.after(),qs.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(zu(i,"end")?wl.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):Ol.create(r.doc,o.pos-i.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),0))})(e,t),joinForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;let o=Wu(r);if(!o)return!1;let i=o.nodeAfter;if(Uu(e,o,t))return!0;if(0==r.parent.content.size&&(zu(i,"start")||Ol.isSelectable(i))){let n=ll(e.doc,r.before(),r.after(),qs.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(zu(i,"start")?wl.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):Ol.create(r.doc,r.mapping.map(o.pos))),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),0))})(e,t),keyboardShortcut:e=>({editor:t,view:n,tr:r,dispatch:o})=>{const i=function(e){const t=e.split(/-(?!$)/);let n,r,o,i,s=t[t.length-1];"Space"===s&&(s=" ");for(let e=0;e<t.length-1;e+=1){const s=t[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))o=!0;else{if(!/^mod$/i.test(s))throw new Error(`Unrecognized modifier name: ${s}`);Mp()||Lp()?i=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),i&&(s=`Meta-${s}`),o&&(s=`Shift-${s}`),s}(e).split(/-(?!$)/),s=i.find((e=>!["Alt","Ctrl","Meta","Shift"].includes(e))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction((()=>{n.someProp("handleKeyDown",(e=>e(n,a)))}));return null==l||l.steps.forEach((e=>{const t=e.map(r.mapping);t&&o&&r.maybeStep(t)})),!0},lift:(e,t={})=>({state:n,dispatch:r})=>!!Bp(n,ip(e,n.schema),t)&&((e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&rl(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:e,dispatch:t})=>((e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(sl(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&rl(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)})(e,t),liftListItem:e=>({state:t,dispatch:n})=>Zu(ip(e,t.schema))(t,n),newlineInCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))})(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=Pp("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(i=ip(e,r.schema)),"mark"===a&&(s=Sp(e,r.schema)),o&&n.selection.ranges.forEach((e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,((e,r)=>{i&&i===e.type&&n.setNodeMarkup(r,void 0,Rp(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((o=>{s===o.type&&n.addMark(r,r+e.nodeSize,s.create(Rp(o.attrs,t)))}))}))})),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),selectNodeBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=qu(r)}let s=i&&i.nodeBefore;return!(!s||!Ol.isSelectable(s)||(t&&t(e.tr.setSelection(Ol.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),0))})(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=Wu(r)}let s=i&&i.nodeAfter;return!(!s||!Ol.isSelectable(s)||(t&&t(e.tr.setSelection(Ol.create(e.doc,i.pos)).scrollIntoView()),0))})(e,t),selectParentNode:()=>({state:e,dispatch:t})=>((e,t)=>{let n,{$from:r,to:o}=e.selection,i=r.sharedDepth(o);return 0!=i&&(n=r.before(i),t&&t(e.tr.setSelection(Ol.create(e.doc,n))),!0)})(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>Yu(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>Gu(e,t),setContent:(e,t=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=function(e,t,n={}){return $p(e,t,{slice:!1,parseOptions:n})}(e,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=Sp(e,r.schema);if(o)if(s){const e=jp(r,l);n.addStoredMark(l.create({...e,...t}))}else a.forEach((e=>{const o=e.$from.pos,i=e.$to.pos;r.doc.nodesBetween(o,i,((e,r)=>{const s=Math.max(r,o),a=Math.min(r+e.nodeSize,i),c=e.marks.find((e=>e.type===l));c?e.marks.forEach((e=>{l===e.type&&n.addMark(s,a,l.create({...e.attrs,...t}))})):n.addMark(s,a,l.create(t))}))}));return!0},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=ip(e,n.schema);return i.isTextblock?o().command((({commands:e})=>!!Xu(i,t)(n)||e.clearNodes())).command((({state:e})=>Xu(i,t)(e,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,r=wl.atStart(n).from,o=wl.atEnd(n).to,i=Fp(e,r,o),s=Ol.create(n,i);t.setSelection(s)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,{from:r,to:o}="number"==typeof e?{from:e,to:e}:e,i=kl.atStart(n).from,s=kl.atEnd(n).to,a=Fp(r,i,s),l=Fp(o,i,s),c=kl.create(n,a,l);t.setSelection(c)}return!0},sinkListItem:e=>({state:t,dispatch:n})=>{const r=ip(e,t.schema);return(o=r,function(e,t){let{$from:n,$to:r}=e.selection,i=n.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==o));if(!i)return!1;let s=i.startIndex;if(0==s)return!1;let a=i.parent,l=a.child(s-1);if(l.type!=o)return!1;if(t){let n=l.lastChild&&l.lastChild.type==a.type,r=Ps.from(n?o.create():null),s=new qs(Ps.from(o.create(null,Ps.from(a.type.create(null,r)))),n?3:1,0),c=i.start,u=i.end;t(e.tr.step(new el(c-(n?3:1),u,c,u,s,1,!0)).scrollIntoView())}return!0})(t,n);var o},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=t,{$from:a,$to:l}=i,c=Hp(o.extensionManager.attributes,a.node().type.name,a.node().attrs);if(i instanceof Ol&&i.node.isBlock)return!(!a.parentOffset||!sl(s,a.pos))&&(r&&(e&&Vp(n,o.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const r=l.parentOffset===l.parent.content.size;i instanceof kl&&t.deleteSelection();const s=0===a.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(a.node(-1).contentMatchAt(a.indexAfter(-1)));let u=r&&s?[{type:s,attrs:c}]:void 0,p=sl(t.doc,t.mapping.map(a.pos),1,u);if(u||p||!sl(t.doc,t.mapping.map(a.pos),1,s?[{type:s}]:void 0)||(p=!0,u=s?[{type:s,attrs:c}]:void 0),p&&(t.split(t.mapping.map(a.pos),1,u),s&&!r&&!a.parentOffset&&a.parent.type!==s)){const e=t.mapping.map(a.before()),n=t.doc.resolve(e);a.node(-1).canReplaceWith(n.index(),n.index()+1,s)&&t.setNodeMarkup(t.mapping.map(a.before()),s)}e&&Vp(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},splitListItem:e=>({tr:t,state:n,dispatch:r,editor:o})=>{var i;const s=ip(e,n.schema),{$from:a,$to:l}=n.selection,c=n.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const p=o.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let e=Ps.empty;const n=a.index(-1)?1:a.index(-2)?2:3;for(let t=a.depth-n;t>=a.depth-3;t-=1)e=Ps.from(a.node(t).copy(e));const r=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,o=Hp(p,a.node().type.name,a.node().attrs),l=(null===(i=s.contentMatch.defaultType)||void 0===i?void 0:i.createAndFill(o))||void 0;e=e.append(Ps.from(s.createAndFill(null,l)||void 0));const c=a.before(a.depth-(n-1));t.replace(c,a.after(-r),new qs(e,4-n,0));let u=-1;t.doc.nodesBetween(c,t.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0===e.content.size&&(u=t+1)})),u>-1&&t.setSelection(kl.near(t.doc.resolve(u))),t.scrollIntoView()}return!0}const d=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=Hp(p,u.type.name,u.attrs),f=Hp(p,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const m=d?[{type:s,attrs:h},{type:d,attrs:f}]:[{type:s,attrs:h}];return!!sl(t.doc,a.pos,2)&&(r&&t.split(a.pos,2,m).scrollIntoView(),!0)},toggleList:(e,t)=>({editor:n,tr:r,state:o,dispatch:i,chain:s,commands:a,can:l})=>{const{extensions:c}=n.extensionManager,u=ip(e,o.schema),p=ip(t,o.schema),{selection:d}=o,{$from:h,$to:f}=d,m=h.blockRange(f);if(!m)return!1;const g=zp((e=>qp(e.type.name,c)))(d);if(m.depth>=1&&g&&m.depth-g.depth<=1){if(g.node.type===u)return a.liftListItem(p);if(qp(g.node.type.name,c)&&u.validContent(g.node.content)&&i)return s().command((()=>(r.setNodeMarkup(g.pos,u),!0))).command((()=>Wp(r,u))).command((()=>Kp(r,u))).run()}return s().command((()=>!!l().wrapInList(u)||a.clearNodes())).wrapInList(u).command((()=>Wp(r,u))).command((()=>Kp(r,u))).run()},toggleMark:(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Sp(e,r.schema),a=function(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Sp(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter((e=>!i||i.name===e.type.name)).find((e=>xp(e.attrs,n,{strict:!1})));let s=0;const a=[];if(o.forEach((({$from:t,$to:n})=>{const r=t.pos,o=n.pos;e.doc.nodesBetween(r,o,((e,t)=>{if(!e.isText&&!e.marks.length)return;const n=Math.max(r,t),i=Math.min(o,t+e.nodeSize);s+=i-n,a.push(...e.marks.map((e=>({mark:e,from:n,to:i}))))}))})),0===s)return!1;const l=a.filter((e=>!i||i.name===e.mark.type.name)).filter((e=>xp(e.mark.attrs,n,{strict:!1}))).reduce(((e,t)=>e+t.to-t.from),0),c=a.filter((e=>!i||e.mark.type!==i&&e.mark.type.excludes(i))).reduce(((e,t)=>e+t.to-t.from),0);return(l>0?l+c:l)>=s}(r,s,t);return a?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},toggleNode:(e,t,n={})=>({state:r,commands:o})=>{const i=ip(e,r.schema),s=ip(t,r.schema);return Bp(r,i,n)?o.setNode(s):o.setNode(i,n)},toggleWrap:(e,t={})=>({state:n,commands:r})=>{const o=ip(e,n.schema);return Bp(n,o,t)?r.lift(o):r.wrapIn(o,t)},undoInputRule:()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){const t=e.tr,n=i.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(i.text){const n=t.doc.resolve(i.from).marks();t.replaceWith(i.from,i.to,e.schema.text(i.text,n))}else t.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos)})),!0},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=Sp(e,r.schema),{$from:c,empty:u,ranges:p}=a;if(!o)return!0;if(u&&s){let{from:e,to:t}=a;const r=null===(i=c.marks().find((e=>e.type===l)))||void 0===i?void 0:i.attrs,o=Op(c,l,r);o&&(e=o.from,t=o.to),n.removeMark(e,t,l)}else p.forEach((e=>{n.removeMark(e.$from.pos,e.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=Pp("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(i=ip(e,r.schema)),"mark"===a&&(s=Sp(e,r.schema)),o&&n.selection.ranges.forEach((e=>{const o=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(o,a,((e,r)=>{i&&i===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),s&&e.marks.length&&e.marks.forEach((i=>{if(s===i.type){const l=Math.max(r,o),c=Math.min(r+e.nodeSize,a);n.addMark(l,c,s.create({...i.attrs,...t}))}}))}))})),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&ol(s,e,t);return!!a&&(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0)}}(ip(e,n.schema),t)(n,r),wrapInList:(e,t={})=>({state:n,dispatch:r})=>Qu(ip(e,n.schema),t)(n,r)});function Jp(e,t){const n=Pp("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){const n=ip(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,(e=>{i.push(e)}));const s=i.reverse().find((e=>e.type.name===n.name));return s?{...s.attrs}:{}}(e,t):"mark"===n?jp(e,t):{}}function Gp(e){const t=function(e,t=JSON.stringify){const n={};return e.filter((e=>{const r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter(((e,n)=>{const r=t.filter(((e,t)=>t!==n));return!r.some((t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}))}function Yp(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach((t=>{const o=Op(n.resolve(e-1),t.type);o&&r.push({mark:t,...o})})):n.nodesBetween(e,t,((e,t)=>{r.push(...e.marks.map((n=>({from:t,to:t+e.nodeSize,mark:n}))))})),r}function Xp(e,t,n){const r=e.state.doc.content.size,o=Fp(t,0,r),i=Fp(n,0,r),s=e.coordsAtPos(o),a=e.coordsAtPos(i,-1),l=Math.min(s.top,a.top),c=Math.max(s.bottom,a.bottom),u=Math.min(s.left,a.left),p=Math.max(s.right,a.right),d={top:l,bottom:c,left:u,right:p,width:p-u,height:c-l,x:u,y:l};return{...d,toJSON:()=>d}}Ap.create({name:"commands",addCommands:()=>({...Up})}),Ap.create({name:"editable",addProseMirrorPlugins(){return[new Bl({key:new jl("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Ap.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Bl({key:new jl("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),Ap.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first((({commands:e})=>[()=>e.undoInputRule(),()=>e.command((({tr:t})=>{const{selection:n,doc:r}=t,{empty:o,$anchor:i}=n,{pos:s,parent:a}=i,l=wl.atStart(r).from===s;return!(!(o&&l&&a.type.isTextblock)||a.textContent.length)&&e.clearNodes()})),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()])),t=()=>this.editor.commands.first((({commands:e})=>[()=>e.deleteSelection(),()=>e.joinForward(),()=>e.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},o={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Mp()||Lp()?o:r},addProseMirrorPlugins(){return[new Bl({key:new jl("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some((e=>e.docChanged))&&!t.doc.eq(n.doc)))return;const{empty:r,from:o,to:i}=t.selection,s=wl.atStart(t.doc).from,a=wl.atEnd(t.doc).to,l=o===s&&i===a,c=0===n.doc.textBetween(0,n.doc.content.size," "," ").length;if(r||!l||!c)return;const u=n.tr,p=ep({state:n,transaction:u}),{commands:d}=new tp({editor:this.editor,state:p});return d.clearNodes(),u.steps.length?u:void 0}})]}}),Ap.create({name:"tabindex",addProseMirrorPlugins(){return[new Bl({key:new jl("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Qp{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=lp(np(this,"addOptions",{name:this.name}))),this.storage=lp(np(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Qp(e)}configure(e={}){const t=this.extend();return t.options=Cp(this.options,e),t.storage=lp(np(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Qp(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=lp(np(t,"addOptions",{name:t.name})),t.storage=lp(np(t,"addStorage",{name:t.name,options:t.options})),t}}class Zp{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=lp(np(this,"addOptions",{name:this.name}))),this.storage=lp(np(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Zp(e)}configure(e={}){const t=this.extend();return t.options=Cp(this.options,e),t.storage=lp(np(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Zp(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=lp(np(t,"addOptions",{name:t.name})),t.storage=lp(np(t,"addStorage",{name:t.name,options:t.options})),t}}function ed(e){return new yp({find:e.find,handler:({state:t,range:n,match:r})=>{const o=lp(e.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:i}=t,s=r[r.length-1],a=r[0];let l=n.to;if(s){const r=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(Yp(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>c)).length)return null;u<n.to&&i.delete(u,n.to),c>n.from&&i.delete(n.from+r,c),l=n.from+r+s.length,i.addMark(n.from+r,l,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}var td="top",nd="bottom",rd="right",od="left",id=[td,nd,rd,od],sd=id.reduce((function(e,t){return e.concat([t+"-start",t+"-end"])}),[]),ad=[].concat(id,["auto"]).reduce((function(e,t){return e.concat([t,t+"-start",t+"-end"])}),[]),ld=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function cd(e){return e?(e.nodeName||"").toLowerCase():null}function ud(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function pd(e){return e instanceof ud(e).Element||e instanceof Element}function dd(e){return e instanceof ud(e).HTMLElement||e instanceof HTMLElement}function hd(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ud(e).ShadowRoot||e instanceof ShadowRoot)}var fd={name:"applyStyles",enabled:!0,phase:"write",fn:function(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var n=t.styles[e]||{},r=t.attributes[e]||{},o=t.elements[e];dd(o)&&cd(o)&&(Object.assign(o.style,n),Object.keys(r).forEach((function(e){var t=r[e];!1===t?o.removeAttribute(e):o.setAttribute(e,!0===t?"":t)})))}))},effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow),function(){Object.keys(t.elements).forEach((function(e){var r=t.elements[e],o=t.attributes[e]||{},i=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:n[e]).reduce((function(e,t){return e[t]="",e}),{});dd(r)&&cd(r)&&(Object.assign(r.style,i),Object.keys(o).forEach((function(e){r.removeAttribute(e)})))}))}},requires:["computeStyles"]};function md(e){return e.split("-")[0]}var gd=Math.max,vd=Math.min,yd=Math.round;function bd(e,t){void 0===t&&(t=!1);var n=e.getBoundingClientRect(),r=1,o=1;if(dd(e)&&t){var i=e.offsetHeight,s=e.offsetWidth;s>0&&(r=yd(n.width)/s||1),i>0&&(o=yd(n.height)/i||1)}return{width:n.width/r,height:n.height/o,top:n.top/o,right:n.right/r,bottom:n.bottom/o,left:n.left/r,x:n.left/r,y:n.top/o}}function Dd(e){var t=bd(e),n=e.offsetWidth,r=e.offsetHeight;return Math.abs(t.width-n)<=1&&(n=t.width),Math.abs(t.height-r)<=1&&(r=t.height),{x:e.offsetLeft,y:e.offsetTop,width:n,height:r}}function Ed(e,t){var n=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(n&&hd(n)){var r=t;do{if(r&&e.isSameNode(r))return!0;r=r.parentNode||r.host}while(r)}return!1}function wd(e){return ud(e).getComputedStyle(e)}function Cd(e){return["table","td","th"].indexOf(cd(e))>=0}function Ad(e){return((pd(e)?e.ownerDocument:e.document)||window.document).documentElement}function xd(e){return"html"===cd(e)?e:e.assignedSlot||e.parentNode||(hd(e)?e.host:null)||Ad(e)}function kd(e){return dd(e)&&"fixed"!==wd(e).position?e.offsetParent:null}function _d(e){for(var t=ud(e),n=kd(e);n&&Cd(n)&&"static"===wd(n).position;)n=kd(n);return n&&("html"===cd(n)||"body"===cd(n)&&"static"===wd(n).position)?t:n||function(e){var t=-1!==navigator.userAgent.toLowerCase().indexOf("firefox");if(-1!==navigator.userAgent.indexOf("Trident")&&dd(e)&&"fixed"===wd(e).position)return null;var n=xd(e);for(hd(n)&&(n=n.host);dd(n)&&["html","body"].indexOf(cd(n))<0;){var r=wd(n);if("none"!==r.transform||"none"!==r.perspective||"paint"===r.contain||-1!==["transform","perspective"].indexOf(r.willChange)||t&&"filter"===r.willChange||t&&r.filter&&"none"!==r.filter)return n;n=n.parentNode}return null}(e)||t}function Od(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Sd(e,t,n){return gd(e,vd(t,n))}function Nd(e){return Object.assign({},{top:0,right:0,bottom:0,left:0},e)}function Td(e,t){return t.reduce((function(t,n){return t[n]=e,t}),{})}var Fd={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,n=e.state,r=e.name,o=e.options,i=n.elements.arrow,s=n.modifiersData.popperOffsets,a=md(n.placement),l=Od(a),c=[od,rd].indexOf(a)>=0?"height":"width";if(i&&s){var u=function(e,t){return Nd("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:Td(e,id))}(o.padding,n),p=Dd(i),d="y"===l?td:od,h="y"===l?nd:rd,f=n.rects.reference[c]+n.rects.reference[l]-s[l]-n.rects.popper[c],m=s[l]-n.rects.reference[l],g=_d(i),v=g?"y"===l?g.clientHeight||0:g.clientWidth||0:0,y=f/2-m/2,b=u[d],D=v-p[c]-u[h],E=v/2-p[c]/2+y,w=Sd(b,E,D),C=l;n.modifiersData[r]=((t={})[C]=w,t.centerOffset=w-E,t)}},effect:function(e){var t=e.state,n=e.options.element,r=void 0===n?"[data-popper-arrow]":n;null!=r&&("string"!=typeof r||(r=t.elements.popper.querySelector(r)))&&("production"!==process.env.NODE_ENV&&(dd(r)||console.error(['Popper: "arrow" element must be an HTMLElement (not an SVGElement).',"To use an SVG arrow, wrap it in an HTMLElement that will be used as","the arrow."].join(" "))),Ed(t.elements.popper,r)?t.elements.arrow=r:"production"!==process.env.NODE_ENV&&console.error(['Popper: "arrow" modifier\'s `element` must be a child of the popper',"element."].join(" ")))},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function Md(e){return e.split("-")[1]}var Id={top:"auto",right:"auto",bottom:"auto",left:"auto"};function $d(e){var t,n=e.popper,r=e.popperRect,o=e.placement,i=e.variation,s=e.offsets,a=e.position,l=e.gpuAcceleration,c=e.adaptive,u=e.roundOffsets,p=e.isFixed,d=s.x,h=void 0===d?0:d,f=s.y,m=void 0===f?0:f,g="function"==typeof u?u({x:h,y:m}):{x:h,y:m};h=g.x,m=g.y;var v=s.hasOwnProperty("x"),y=s.hasOwnProperty("y"),b=od,D=td,E=window;if(c){var w=_d(n),C="clientHeight",A="clientWidth";if(w===ud(n)&&"static"!==wd(w=Ad(n)).position&&"absolute"===a&&(C="scrollHeight",A="scrollWidth"),o===td||(o===od||o===rd)&&"end"===i)D=nd,m-=(p&&w===E&&E.visualViewport?E.visualViewport.height:w[C])-r.height,m*=l?1:-1;if(o===od||(o===td||o===nd)&&"end"===i)b=rd,h-=(p&&w===E&&E.visualViewport?E.visualViewport.width:w[A])-r.width,h*=l?1:-1}var x,k=Object.assign({position:a},c&&Id),_=!0===u?function(e){var t=e.x,n=e.y,r=window.devicePixelRatio||1;return{x:yd(t*r)/r||0,y:yd(n*r)/r||0}}({x:h,y:m}):{x:h,y:m};return h=_.x,m=_.y,l?Object.assign({},k,((x={})[D]=y?"0":"",x[b]=v?"0":"",x.transform=(E.devicePixelRatio||1)<=1?"translate("+h+"px, "+m+"px)":"translate3d("+h+"px, "+m+"px, 0)",x)):Object.assign({},k,((t={})[D]=y?m+"px":"",t[b]=v?h+"px":"",t.transform="",t))}var Ld={passive:!0};var Bd={left:"right",right:"left",bottom:"top",top:"bottom"};function Pd(e){return e.replace(/left|right|bottom|top/g,(function(e){return Bd[e]}))}var Rd={start:"end",end:"start"};function jd(e){return e.replace(/start|end/g,(function(e){return Rd[e]}))}function Hd(e){var t=ud(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function Vd(e){return bd(Ad(e)).left+Hd(e).scrollLeft}function zd(e){var t=wd(e),n=t.overflow,r=t.overflowX,o=t.overflowY;return/auto|scroll|overlay|hidden/.test(n+o+r)}function qd(e){return["html","body","#document"].indexOf(cd(e))>=0?e.ownerDocument.body:dd(e)&&zd(e)?e:qd(xd(e))}function Wd(e,t){var n;void 0===t&&(t=[]);var r=qd(e),o=r===(null==(n=e.ownerDocument)?void 0:n.body),i=ud(r),s=o?[i].concat(i.visualViewport||[],zd(r)?r:[]):r,a=t.concat(s);return o?a:a.concat(Wd(xd(s)))}function Kd(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function Ud(e,t){return"viewport"===t?Kd(function(e){var t=ud(e),n=Ad(e),r=t.visualViewport,o=n.clientWidth,i=n.clientHeight,s=0,a=0;return r&&(o=r.width,i=r.height,/^((?!chrome|android).)*safari/i.test(navigator.userAgent)||(s=r.offsetLeft,a=r.offsetTop)),{width:o,height:i,x:s+Vd(e),y:a}}(e)):pd(t)?function(e){var t=bd(e);return t.top=t.top+e.clientTop,t.left=t.left+e.clientLeft,t.bottom=t.top+e.clientHeight,t.right=t.left+e.clientWidth,t.width=e.clientWidth,t.height=e.clientHeight,t.x=t.left,t.y=t.top,t}(t):Kd(function(e){var t,n=Ad(e),r=Hd(e),o=null==(t=e.ownerDocument)?void 0:t.body,i=gd(n.scrollWidth,n.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),s=gd(n.scrollHeight,n.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),a=-r.scrollLeft+Vd(e),l=-r.scrollTop;return"rtl"===wd(o||n).direction&&(a+=gd(n.clientWidth,o?o.clientWidth:0)-i),{width:i,height:s,x:a,y:l}}(Ad(e)))}function Jd(e,t,n){var r="clippingParents"===t?function(e){var t=Wd(xd(e)),n=["absolute","fixed"].indexOf(wd(e).position)>=0&&dd(e)?_d(e):e;return pd(n)?t.filter((function(e){return pd(e)&&Ed(e,n)&&"body"!==cd(e)})):[]}(e):[].concat(t),o=[].concat(r,[n]),i=o[0],s=o.reduce((function(t,n){var r=Ud(e,n);return t.top=gd(r.top,t.top),t.right=vd(r.right,t.right),t.bottom=vd(r.bottom,t.bottom),t.left=gd(r.left,t.left),t}),Ud(e,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function Gd(e){var t,n=e.reference,r=e.element,o=e.placement,i=o?md(o):null,s=o?Md(o):null,a=n.x+n.width/2-r.width/2,l=n.y+n.height/2-r.height/2;switch(i){case td:t={x:a,y:n.y-r.height};break;case nd:t={x:a,y:n.y+n.height};break;case rd:t={x:n.x+n.width,y:l};break;case od:t={x:n.x-r.width,y:l};break;default:t={x:n.x,y:n.y}}var c=i?Od(i):null;if(null!=c){var u="y"===c?"height":"width";switch(s){case"start":t[c]=t[c]-(n[u]/2-r[u]/2);break;case"end":t[c]=t[c]+(n[u]/2-r[u]/2)}}return t}function Yd(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=void 0===r?e.placement:r,i=n.boundary,s=void 0===i?"clippingParents":i,a=n.rootBoundary,l=void 0===a?"viewport":a,c=n.elementContext,u=void 0===c?"popper":c,p=n.altBoundary,d=void 0!==p&&p,h=n.padding,f=void 0===h?0:h,m=Nd("number"!=typeof f?f:Td(f,id)),g="popper"===u?"reference":"popper",v=e.rects.popper,y=e.elements[d?g:u],b=Jd(pd(y)?y:y.contextElement||Ad(e.elements.popper),s,l),D=bd(e.elements.reference),E=Gd({reference:D,element:v,strategy:"absolute",placement:o}),w=Kd(Object.assign({},v,E)),C="popper"===u?w:D,A={top:b.top-C.top+m.top,bottom:C.bottom-b.bottom+m.bottom,left:b.left-C.left+m.left,right:C.right-b.right+m.right},x=e.modifiersData.offset;if("popper"===u&&x){var k=x[o];Object.keys(A).forEach((function(e){var t=[rd,nd].indexOf(e)>=0?1:-1,n=[td,nd].indexOf(e)>=0?"y":"x";A[e]+=k[n]*t}))}return A}function Xd(e,t){void 0===t&&(t={});var n=t,r=n.placement,o=n.boundary,i=n.rootBoundary,s=n.padding,a=n.flipVariations,l=n.allowedAutoPlacements,c=void 0===l?ad:l,u=Md(r),p=u?a?sd:sd.filter((function(e){return Md(e)===u})):id,d=p.filter((function(e){return c.indexOf(e)>=0}));0===d.length&&(d=p,"production"!==process.env.NODE_ENV&&console.error(["Popper: The `allowedAutoPlacements` option did not allow any","placements. Ensure the `placement` option matches the variation","of the allowed placements.",'For example, "auto" cannot be used to allow "bottom-start".','Use "auto-start" instead.'].join(" ")));var h=d.reduce((function(t,n){return t[n]=Yd(e,{placement:n,boundary:o,rootBoundary:i,padding:s})[md(n)],t}),{});return Object.keys(h).sort((function(e,t){return h[e]-h[t]}))}var Qd={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name;if(!t.modifiersData[r]._skip){for(var o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0===s||s,l=n.fallbackPlacements,c=n.padding,u=n.boundary,p=n.rootBoundary,d=n.altBoundary,h=n.flipVariations,f=void 0===h||h,m=n.allowedAutoPlacements,g=t.options.placement,v=md(g),y=l||(v===g||!f?[Pd(g)]:function(e){if("auto"===md(e))return[];var t=Pd(e);return[jd(e),t,jd(t)]}(g)),b=[g].concat(y).reduce((function(e,n){return e.concat("auto"===md(n)?Xd(t,{placement:n,boundary:u,rootBoundary:p,padding:c,flipVariations:f,allowedAutoPlacements:m}):n)}),[]),D=t.rects.reference,E=t.rects.popper,w=new Map,C=!0,A=b[0],x=0;x<b.length;x++){var k=b[x],_=md(k),O="start"===Md(k),S=[td,nd].indexOf(_)>=0,N=S?"width":"height",T=Yd(t,{placement:k,boundary:u,rootBoundary:p,altBoundary:d,padding:c}),F=S?O?rd:od:O?nd:td;D[N]>E[N]&&(F=Pd(F));var M=Pd(F),I=[];if(i&&I.push(T[_]<=0),a&&I.push(T[F]<=0,T[M]<=0),I.every((function(e){return e}))){A=k,C=!1;break}w.set(k,I)}if(C)for(var $=function(e){var t=b.find((function(t){var n=w.get(t);if(n)return n.slice(0,e).every((function(e){return e}))}));if(t)return A=t,"break"},L=f?3:1;L>0;L--){if("break"===$(L))break}t.placement!==A&&(t.modifiersData[r]._skip=!0,t.placement=A,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}};function Zd(e,t,n){return void 0===n&&(n={x:0,y:0}),{top:e.top-t.height-n.y,right:e.right-t.width+n.x,bottom:e.bottom-t.height+n.y,left:e.left-t.width-n.x}}function eh(e){return[td,rd,nd,od].some((function(t){return e[t]>=0}))}var th={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.offset,i=void 0===o?[0,0]:o,s=ad.reduce((function(e,n){return e[n]=function(e,t,n){var r=md(e),o=[od,td].indexOf(r)>=0?-1:1,i="function"==typeof n?n(Object.assign({},t,{placement:e})):n,s=i[0],a=i[1];return s=s||0,a=(a||0)*o,[od,rd].indexOf(r)>=0?{x:a,y:s}:{x:s,y:a}}(n,t.rects,i),e}),{}),a=s[t.placement],l=a.x,c=a.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=l,t.modifiersData.popperOffsets.y+=c),t.modifiersData[r]=s}};var nh={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,n=e.options,r=e.name,o=n.mainAxis,i=void 0===o||o,s=n.altAxis,a=void 0!==s&&s,l=n.boundary,c=n.rootBoundary,u=n.altBoundary,p=n.padding,d=n.tether,h=void 0===d||d,f=n.tetherOffset,m=void 0===f?0:f,g=Yd(t,{boundary:l,rootBoundary:c,padding:p,altBoundary:u}),v=md(t.placement),y=Md(t.placement),b=!y,D=Od(v),E="x"===D?"y":"x",w=t.modifiersData.popperOffsets,C=t.rects.reference,A=t.rects.popper,x="function"==typeof m?m(Object.assign({},t.rects,{placement:t.placement})):m,k="number"==typeof x?{mainAxis:x,altAxis:x}:Object.assign({mainAxis:0,altAxis:0},x),_=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,O={x:0,y:0};if(w){if(i){var S,N="y"===D?td:od,T="y"===D?nd:rd,F="y"===D?"height":"width",M=w[D],I=M+g[N],$=M-g[T],L=h?-A[F]/2:0,B="start"===y?C[F]:A[F],P="start"===y?-A[F]:-C[F],R=t.elements.arrow,j=h&&R?Dd(R):{width:0,height:0},H=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},V=H[N],z=H[T],q=Sd(0,C[F],j[F]),W=b?C[F]/2-L-q-V-k.mainAxis:B-q-V-k.mainAxis,K=b?-C[F]/2+L+q+z+k.mainAxis:P+q+z+k.mainAxis,U=t.elements.arrow&&_d(t.elements.arrow),J=U?"y"===D?U.clientTop||0:U.clientLeft||0:0,G=null!=(S=null==_?void 0:_[D])?S:0,Y=M+K-G,X=Sd(h?vd(I,M+W-G-J):I,M,h?gd($,Y):$);w[D]=X,O[D]=X-M}if(a){var Q,Z="x"===D?td:od,ee="x"===D?nd:rd,te=w[E],ne="y"===E?"height":"width",re=te+g[Z],oe=te-g[ee],ie=-1!==[td,od].indexOf(v),se=null!=(Q=null==_?void 0:_[E])?Q:0,ae=ie?re:te-C[ne]-A[ne]-se+k.altAxis,le=ie?te+C[ne]+A[ne]-se-k.altAxis:oe,ce=h&&ie?function(e,t,n){var r=Sd(e,t,n);return r>n?n:r}(ae,te,le):Sd(h?ae:re,te,h?le:oe);w[E]=ce,O[E]=ce-te}t.modifiersData[r]=O}},requiresIfExists:["offset"]};function rh(e,t,n){void 0===n&&(n=!1);var r,o,i=dd(t),s=dd(t)&&function(e){var t=e.getBoundingClientRect(),n=yd(t.width)/e.offsetWidth||1,r=yd(t.height)/e.offsetHeight||1;return 1!==n||1!==r}(t),a=Ad(t),l=bd(e,s),c={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(i||!i&&!n)&&(("body"!==cd(t)||zd(a))&&(c=(r=t)!==ud(r)&&dd(r)?{scrollLeft:(o=r).scrollLeft,scrollTop:o.scrollTop}:Hd(r)),dd(t)?((u=bd(t,!0)).x+=t.clientLeft,u.y+=t.clientTop):a&&(u.x=Vd(a))),{x:l.left+c.scrollLeft-u.x,y:l.top+c.scrollTop-u.y,width:l.width,height:l.height}}function oh(e){var t=new Map,n=new Set,r=[];function o(e){n.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!n.has(e)){var r=t.get(e);r&&o(r)}})),r.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){n.has(e.name)||o(e)})),r}function ih(e){var t;return function(){return t||(t=new Promise((function(n){Promise.resolve().then((function(){t=void 0,n(e())}))}))),t}}function sh(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return[].concat(n).reduce((function(e,t){return e.replace(/%s/,t)}),e)}var ah='Popper: modifier "%s" provided an invalid %s property, expected %s but got %s',lh=["name","enabled","phase","fn","effect","requires","options"];var ch="Popper: Invalid reference or popper argument provided. They must be either a DOM element or virtual element.",uh={placement:"bottom",modifiers:[],strategy:"absolute"};function ph(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function dh(e){void 0===e&&(e={});var t=e,n=t.defaultModifiers,r=void 0===n?[]:n,o=t.defaultOptions,i=void 0===o?uh:o;return function(e,t,n){void 0===n&&(n=i);var o={placement:"bottom",orderedModifiers:[],options:Object.assign({},uh,i),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},s=[],a=!1,l={state:o,setOptions:function(n){var a="function"==typeof n?n(o.options):n;c(),o.options=Object.assign({},i,o.options,a),o.scrollParents={reference:pd(e)?Wd(e):e.contextElement?Wd(e.contextElement):[],popper:Wd(t)};var u,p,d,h=function(e){var t=oh(e);return ld.reduce((function(e,n){return e.concat(t.filter((function(e){return e.phase===n})))}),[])}(function(e){var t=e.reduce((function(e,t){var n=e[t.name];return e[t.name]=n?Object.assign({},n,t,{options:Object.assign({},n.options,t.options),data:Object.assign({},n.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}([].concat(r,o.options.modifiers)));if(o.orderedModifiers=h.filter((function(e){return e.enabled})),"production"!==process.env.NODE_ENV){if(function(e){e.forEach((function(t){[].concat(Object.keys(t),lh).filter((function(e,t,n){return n.indexOf(e)===t})).forEach((function(n){switch(n){case"name":"string"!=typeof t.name&&console.error(sh(ah,String(t.name),'"name"','"string"','"'+String(t.name)+'"'));break;case"enabled":"boolean"!=typeof t.enabled&&console.error(sh(ah,t.name,'"enabled"','"boolean"','"'+String(t.enabled)+'"'));break;case"phase":ld.indexOf(t.phase)<0&&console.error(sh(ah,t.name,'"phase"',"either "+ld.join(", "),'"'+String(t.phase)+'"'));break;case"fn":"function"!=typeof t.fn&&console.error(sh(ah,t.name,'"fn"','"function"','"'+String(t.fn)+'"'));break;case"effect":null!=t.effect&&"function"!=typeof t.effect&&console.error(sh(ah,t.name,'"effect"','"function"','"'+String(t.fn)+'"'));break;case"requires":null==t.requires||Array.isArray(t.requires)||console.error(sh(ah,t.name,'"requires"','"array"','"'+String(t.requires)+'"'));break;case"requiresIfExists":Array.isArray(t.requiresIfExists)||console.error(sh(ah,t.name,'"requiresIfExists"','"array"','"'+String(t.requiresIfExists)+'"'));break;case"options":case"data":break;default:console.error('PopperJS: an invalid property has been provided to the "'+t.name+'" modifier, valid properties are '+lh.map((function(e){return'"'+e+'"'})).join(", ")+'; but "'+n+'" was provided.')}t.requires&&t.requires.forEach((function(n){null==e.find((function(e){return e.name===n}))&&console.error(sh('Popper: modifier "%s" requires "%s", but "%s" modifier is not available',String(t.name),n,n))}))}))}))}((u=[].concat(h,o.options.modifiers),p=function(e){return e.name},d=new Set,u.filter((function(e){var t=p(e);if(!d.has(t))return d.add(t),!0})))),"auto"===md(o.options.placement))o.orderedModifiers.find((function(e){return"flip"===e.name}))||console.error(['Popper: "auto" placements require the "flip" modifier be',"present and enabled to work."].join(" "));var f=wd(t);[f.marginTop,f.marginRight,f.marginBottom,f.marginLeft].some((function(e){return parseFloat(e)}))&&console.warn(['Popper: CSS "margin" styles cannot be used to apply padding',"between the popper and its reference element or boundary.","To replicate margin, use the `offset` modifier, as well as","the `padding` option in the `preventOverflow` and `flip`","modifiers."].join(" "))}return o.orderedModifiers.forEach((function(e){var t=e.name,n=e.options,r=void 0===n?{}:n,i=e.effect;if("function"==typeof i){var a=i({state:o,name:t,instance:l,options:r}),c=function(){};s.push(a||c)}})),l.update()},forceUpdate:function(){if(!a){var e=o.elements,t=e.reference,n=e.popper;if(ph(t,n)){o.rects={reference:rh(t,_d(n),"fixed"===o.options.strategy),popper:Dd(n)},o.reset=!1,o.placement=o.options.placement,o.orderedModifiers.forEach((function(e){return o.modifiersData[e.name]=Object.assign({},e.data)}));for(var r=0,i=0;i<o.orderedModifiers.length;i++){if("production"!==process.env.NODE_ENV&&(r+=1)>100){console.error("Popper: An infinite loop in the modifiers cycle has been detected! The cycle has been interrupted to prevent a browser crash.");break}if(!0!==o.reset){var s=o.orderedModifiers[i],c=s.fn,u=s.options,p=void 0===u?{}:u,d=s.name;"function"==typeof c&&(o=c({state:o,options:p,name:d,instance:l})||o)}else o.reset=!1,i=-1}}else"production"!==process.env.NODE_ENV&&console.error(ch)}},update:ih((function(){return new Promise((function(e){l.forceUpdate(),e(o)}))})),destroy:function(){c(),a=!0}};if(!ph(e,t))return"production"!==process.env.NODE_ENV&&console.error(ch),l;function c(){s.forEach((function(e){return e()})),s=[]}return l.setOptions(n).then((function(e){!a&&n.onFirstUpdate&&n.onFirstUpdate(e)})),l}}var hh=dh({defaultModifiers:[{name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,n=e.instance,r=e.options,o=r.scroll,i=void 0===o||o,s=r.resize,a=void 0===s||s,l=ud(t.elements.popper),c=[].concat(t.scrollParents.reference,t.scrollParents.popper);return i&&c.forEach((function(e){e.addEventListener("scroll",n.update,Ld)})),a&&l.addEventListener("resize",n.update,Ld),function(){i&&c.forEach((function(e){e.removeEventListener("scroll",n.update,Ld)})),a&&l.removeEventListener("resize",n.update,Ld)}},data:{}},{name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,n=e.name;t.modifiersData[n]=Gd({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}},{name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,n=e.options,r=n.gpuAcceleration,o=void 0===r||r,i=n.adaptive,s=void 0===i||i,a=n.roundOffsets,l=void 0===a||a;if("production"!==process.env.NODE_ENV){var c=wd(t.elements.popper).transitionProperty||"";s&&["transform","top","right","bottom","left"].some((function(e){return c.indexOf(e)>=0}))&&console.warn(["Popper: Detected CSS transitions on at least one of the following",'CSS properties: "transform", "top", "right", "bottom", "left".',"\n\n",'Disable the "computeStyles" modifier\'s `adaptive` option to allow',"for smooth transitions, or remove these properties from the CSS","transition declaration on the popper element if only transitioning","opacity or background-color for example.","\n\n","We recommend using the popper element as a wrapper around an inner","element that can have any CSS property transitioned for animations."].join(" "))}var u={placement:md(t.placement),variation:Md(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,$d(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:s,roundOffsets:l})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,$d(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:l})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}},fd,th,Qd,nh,Fd,{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,n=e.name,r=t.rects.reference,o=t.rects.popper,i=t.modifiersData.preventOverflow,s=Yd(t,{elementContext:"reference"}),a=Yd(t,{altBoundary:!0}),l=Zd(s,r),c=Zd(a,o,i),u=eh(l),p=eh(c);t.modifiersData[n]={referenceClippingOffsets:l,popperEscapeOffsets:c,isReferenceHidden:u,hasPopperEscaped:p},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":p})}}]}),fh={passive:!0,capture:!0},mh=function(){return document.body};function gh(e,t,n){if(Array.isArray(e)){var r=e[t];return null==r?Array.isArray(n)?n[t]:n:r}return e}function vh(e,t){var n={}.toString.call(e);return 0===n.indexOf("[object")&&n.indexOf(t+"]")>-1}function yh(e,t){return"function"==typeof e?e.apply(void 0,t):e}function bh(e,t){return 0===t?e:function(r){clearTimeout(n),n=setTimeout((function(){e(r)}),t)};var n}function Dh(e){return[].concat(e)}function Eh(e,t){-1===e.indexOf(t)&&e.push(t)}function wh(e){return[].slice.call(e)}function Ch(e){return Object.keys(e).reduce((function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t}),{})}function Ah(){return document.createElement("div")}function xh(e){return["Element","Fragment"].some((function(t){return vh(e,t)}))}function kh(e){return xh(e)?[e]:function(e){return vh(e,"NodeList")}(e)?wh(e):Array.isArray(e)?e:wh(document.querySelectorAll(e))}function _h(e,t){e.forEach((function(e){e&&(e.style.transitionDuration=t+"ms")}))}function Oh(e,t){e.forEach((function(e){e&&e.setAttribute("data-state",t)}))}function Sh(e,t,n){var r=t+"EventListener";["transitionend","webkitTransitionEnd"].forEach((function(t){e[r](t,n)}))}function Nh(e,t){for(var n=t;n;){var r;if(e.contains(n))return!0;n=null==n.getRootNode||null==(r=n.getRootNode())?void 0:r.host}return!1}var Th={isTouch:!1},Fh=0;function Mh(){Th.isTouch||(Th.isTouch=!0,window.performance&&document.addEventListener("mousemove",Ih))}function Ih(){var e=performance.now();e-Fh<20&&(Th.isTouch=!1,document.removeEventListener("mousemove",Ih)),Fh=e}function $h(){var e,t=document.activeElement;if((e=t)&&e._tippy&&e._tippy.reference===e){var n=t._tippy;t.blur&&!n.state.isVisible&&t.blur()}}var Lh,Bh=!!("undefined"!=typeof window&&"undefined"!=typeof document)&&!!window.msCrypto;function Ph(e){return[e+"() was called on a"+("destroy"===e?"n already-":" ")+"destroyed instance. This is a no-op but","indicates a potential memory leak."].join(" ")}function Rh(e){return e.replace(/[ \t]{2,}/g," ").replace(/^[ \t]*/gm,"").trim()}function jh(e){return Rh("\n %ctippy.js\n\n %c"+Rh(e)+"\n\n %c👷‍ This is a development-only message. It will be removed in production.\n ")}function Hh(e){return[jh(e),"color: #00C584; font-size: 1.3em; font-weight: bold;","line-height: 1.5","color: #a6a095;"]}function Vh(e,t){var n;e&&!Lh.has(t)&&(Lh.add(t),(n=console).warn.apply(n,Hh(t)))}function zh(e,t){var n;e&&!Lh.has(t)&&(Lh.add(t),(n=console).error.apply(n,Hh(t)))}"production"!==process.env.NODE_ENV&&(Lh=new Set);var qh={animateFill:!1,followCursor:!1,inlinePositioning:!1,sticky:!1},Wh=Object.assign({appendTo:mh,aria:{content:"auto",expanded:"auto"},delay:0,duration:[300,250],getReferenceClientRect:null,hideOnClick:!0,ignoreAttributes:!1,interactive:!1,interactiveBorder:2,interactiveDebounce:0,moveTransition:"",offset:[0,10],onAfterUpdate:function(){},onBeforeUpdate:function(){},onCreate:function(){},onDestroy:function(){},onHidden:function(){},onHide:function(){},onMount:function(){},onShow:function(){},onShown:function(){},onTrigger:function(){},onUntrigger:function(){},onClickOutside:function(){},placement:"top",plugins:[],popperOptions:{},render:null,showOnCreate:!1,touch:!0,trigger:"mouseenter focus",triggerTarget:null},qh,{allowHTML:!1,animation:"fade",arrow:!0,content:"",inertia:!1,maxWidth:350,role:"tooltip",theme:"",zIndex:9999}),Kh=Object.keys(Wh);function Uh(e){var t=(e.plugins||[]).reduce((function(t,n){var r,o=n.name,i=n.defaultValue;o&&(t[o]=void 0!==e[o]?e[o]:null!=(r=Wh[o])?r:i);return t}),{});return Object.assign({},e,t)}function Jh(e,t){var n=Object.assign({},t,{content:yh(t.content,[e])},t.ignoreAttributes?{}:function(e,t){return(t?Object.keys(Uh(Object.assign({},Wh,{plugins:t}))):Kh).reduce((function(t,n){var r=(e.getAttribute("data-tippy-"+n)||"").trim();if(!r)return t;if("content"===n)t[n]=r;else try{t[n]=JSON.parse(r)}catch(e){t[n]=r}return t}),{})}(e,t.plugins));return n.aria=Object.assign({},Wh.aria,n.aria),n.aria={expanded:"auto"===n.aria.expanded?t.interactive:n.aria.expanded,content:"auto"===n.aria.content?t.interactive?null:"describedby":n.aria.content},n}function Gh(e,t){void 0===e&&(e={}),void 0===t&&(t=[]),Object.keys(e).forEach((function(e){var n,r,o=function(e,t){var n=Object.assign({},e);return t.forEach((function(e){delete n[e]})),n}(Wh,Object.keys(qh)),i=(n=o,r=e,!{}.hasOwnProperty.call(n,r));i&&(i=0===t.filter((function(t){return t.name===e})).length),Vh(i,["`"+e+"`","is not a valid prop. You may have spelled it incorrectly, or if it's","a plugin, forgot to pass it in an array as props.plugins.","\n\n","All props: https://atomiks.github.io/tippyjs/v6/all-props/\n","Plugins: https://atomiks.github.io/tippyjs/v6/plugins/"].join(" "))}))}function Yh(e,t){e.innerHTML=t}function Xh(e){var t=Ah();return!0===e?t.className="tippy-arrow":(t.className="tippy-svg-arrow",xh(e)?t.appendChild(e):Yh(t,e)),t}function Qh(e,t){xh(t.content)?(Yh(e,""),e.appendChild(t.content)):"function"!=typeof t.content&&(t.allowHTML?Yh(e,t.content):e.textContent=t.content)}function Zh(e){var t=e.firstElementChild,n=wh(t.children);return{box:t,content:n.find((function(e){return e.classList.contains("tippy-content")})),arrow:n.find((function(e){return e.classList.contains("tippy-arrow")||e.classList.contains("tippy-svg-arrow")})),backdrop:n.find((function(e){return e.classList.contains("tippy-backdrop")}))}}function ef(e){var t=Ah(),n=Ah();n.className="tippy-box",n.setAttribute("data-state","hidden"),n.setAttribute("tabindex","-1");var r=Ah();function o(n,r){var o=Zh(t),i=o.box,s=o.content,a=o.arrow;r.theme?i.setAttribute("data-theme",r.theme):i.removeAttribute("data-theme"),"string"==typeof r.animation?i.setAttribute("data-animation",r.animation):i.removeAttribute("data-animation"),r.inertia?i.setAttribute("data-inertia",""):i.removeAttribute("data-inertia"),i.style.maxWidth="number"==typeof r.maxWidth?r.maxWidth+"px":r.maxWidth,r.role?i.setAttribute("role",r.role):i.removeAttribute("role"),n.content===r.content&&n.allowHTML===r.allowHTML||Qh(s,e.props),r.arrow?a?n.arrow!==r.arrow&&(i.removeChild(a),i.appendChild(Xh(r.arrow))):i.appendChild(Xh(r.arrow)):a&&i.removeChild(a)}return r.className="tippy-content",r.setAttribute("data-state","hidden"),Qh(r,e.props),t.appendChild(n),n.appendChild(r),o(e.props,e.props),{popper:t,onUpdate:o}}ef.$$tippy=!0;var tf=1,nf=[],rf=[];function of(e,t){var n,r,o,i,s,a,l,c,u=Jh(e,Object.assign({},Wh,Uh(Ch(t)))),p=!1,d=!1,h=!1,f=!1,m=[],g=bh(U,u.interactiveDebounce),v=tf++,y=(c=u.plugins).filter((function(e,t){return c.indexOf(e)===t})),b={id:v,reference:e,popper:Ah(),popperInstance:null,props:u,state:{isEnabled:!0,isVisible:!1,isDestroyed:!1,isMounted:!1,isShown:!1},plugins:y,clearDelayTimeouts:function(){clearTimeout(n),clearTimeout(r),cancelAnimationFrame(o)},setProps:function(t){"production"!==process.env.NODE_ENV&&Vh(b.state.isDestroyed,Ph("setProps"));if(b.state.isDestroyed)return;M("onBeforeUpdate",[b,t]),W();var n=b.props,r=Jh(e,Object.assign({},n,Ch(t),{ignoreAttributes:!0}));b.props=r,q(),n.interactiveDebounce!==r.interactiveDebounce&&(L(),g=bh(U,r.interactiveDebounce));n.triggerTarget&&!r.triggerTarget?Dh(n.triggerTarget).forEach((function(e){e.removeAttribute("aria-expanded")})):r.triggerTarget&&e.removeAttribute("aria-expanded");$(),F(),w&&w(n,r);b.popperInstance&&(X(),Z().forEach((function(e){requestAnimationFrame(e._tippy.popperInstance.forceUpdate)})));M("onAfterUpdate",[b,t])},setContent:function(e){b.setProps({content:e})},show:function(){"production"!==process.env.NODE_ENV&&Vh(b.state.isDestroyed,Ph("show"));var e=b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=Th.isTouch&&!b.props.touch,o=gh(b.props.duration,0,Wh.duration);if(e||t||n||r)return;if(O().hasAttribute("disabled"))return;if(M("onShow",[b],!1),!1===b.props.onShow(b))return;b.state.isVisible=!0,_()&&(E.style.visibility="visible");F(),j(),b.state.isMounted||(E.style.transition="none");if(_()){var i=N(),s=i.box,l=i.content;_h([s,l],0)}a=function(){var e;if(b.state.isVisible&&!f){if(f=!0,E.offsetHeight,E.style.transition=b.props.moveTransition,_()&&b.props.animation){var t=N(),n=t.box,r=t.content;_h([n,r],o),Oh([n,r],"visible")}I(),$(),Eh(rf,b),null==(e=b.popperInstance)||e.forceUpdate(),M("onMount",[b]),b.props.animation&&_()&&function(e,t){V(e,t)}(o,(function(){b.state.isShown=!0,M("onShown",[b])}))}},function(){var e,t=b.props.appendTo,n=O();e=b.props.interactive&&t===mh||"parent"===t?n.parentNode:yh(t,[n]);e.contains(E)||e.appendChild(E);b.state.isMounted=!0,X(),"production"!==process.env.NODE_ENV&&Vh(b.props.interactive&&t===Wh.appendTo&&n.nextElementSibling!==E,["Interactive tippy element may not be accessible via keyboard","navigation because it is not directly after the reference element","in the DOM source order.","\n\n","Using a wrapper <div> or <span> tag around the reference element","solves this by creating a new parentNode context.","\n\n","Specifying `appendTo: document.body` silences this warning, but it","assumes you are using a focus management solution to handle","keyboard navigation.","\n\n","See: https://atomiks.github.io/tippyjs/v6/accessibility/#interactivity"].join(" "))}()},hide:function(){"production"!==process.env.NODE_ENV&&Vh(b.state.isDestroyed,Ph("hide"));var e=!b.state.isVisible,t=b.state.isDestroyed,n=!b.state.isEnabled,r=gh(b.props.duration,1,Wh.duration);if(e||t||n)return;if(M("onHide",[b],!1),!1===b.props.onHide(b))return;b.state.isVisible=!1,b.state.isShown=!1,f=!1,p=!1,_()&&(E.style.visibility="hidden");if(L(),H(),F(!0),_()){var o=N(),i=o.box,s=o.content;b.props.animation&&(_h([i,s],r),Oh([i,s],"hidden"))}I(),$(),b.props.animation?_()&&function(e,t){V(e,(function(){!b.state.isVisible&&E.parentNode&&E.parentNode.contains(E)&&t()}))}(r,b.unmount):b.unmount()},hideWithInteractivity:function(e){"production"!==process.env.NODE_ENV&&Vh(b.state.isDestroyed,Ph("hideWithInteractivity"));S().addEventListener("mousemove",g),Eh(nf,g),g(e)},enable:function(){b.state.isEnabled=!0},disable:function(){b.hide(),b.state.isEnabled=!1},unmount:function(){"production"!==process.env.NODE_ENV&&Vh(b.state.isDestroyed,Ph("unmount"));b.state.isVisible&&b.hide();if(!b.state.isMounted)return;Q(),Z().forEach((function(e){e._tippy.unmount()})),E.parentNode&&E.parentNode.removeChild(E);rf=rf.filter((function(e){return e!==b})),b.state.isMounted=!1,M("onHidden",[b])},destroy:function(){"production"!==process.env.NODE_ENV&&Vh(b.state.isDestroyed,Ph("destroy"));if(b.state.isDestroyed)return;b.clearDelayTimeouts(),b.unmount(),W(),delete e._tippy,b.state.isDestroyed=!0,M("onDestroy",[b])}};if(!u.render)return"production"!==process.env.NODE_ENV&&zh(!0,"render() function has not been supplied."),b;var D=u.render(b),E=D.popper,w=D.onUpdate;E.setAttribute("data-tippy-root",""),E.id="tippy-"+b.id,b.popper=E,e._tippy=b,E._tippy=b;var C=y.map((function(e){return e.fn(b)})),A=e.hasAttribute("aria-expanded");return q(),$(),F(),M("onCreate",[b]),u.showOnCreate&&ee(),E.addEventListener("mouseenter",(function(){b.props.interactive&&b.state.isVisible&&b.clearDelayTimeouts()})),E.addEventListener("mouseleave",(function(){b.props.interactive&&b.props.trigger.indexOf("mouseenter")>=0&&S().addEventListener("mousemove",g)})),b;function x(){var e=b.props.touch;return Array.isArray(e)?e:[e,0]}function k(){return"hold"===x()[0]}function _(){var e;return!(null==(e=b.props.render)||!e.$$tippy)}function O(){return l||e}function S(){var e,t,n=O().parentNode;return n?null!=(t=Dh(n)[0])&&null!=(e=t.ownerDocument)&&e.body?t.ownerDocument:document:document}function N(){return Zh(E)}function T(e){return b.state.isMounted&&!b.state.isVisible||Th.isTouch||i&&"focus"===i.type?0:gh(b.props.delay,e?0:1,Wh.delay)}function F(e){void 0===e&&(e=!1),E.style.pointerEvents=b.props.interactive&&!e?"":"none",E.style.zIndex=""+b.props.zIndex}function M(e,t,n){var r;(void 0===n&&(n=!0),C.forEach((function(n){n[e]&&n[e].apply(n,t)})),n)&&(r=b.props)[e].apply(r,t)}function I(){var t=b.props.aria;if(t.content){var n="aria-"+t.content,r=E.id;Dh(b.props.triggerTarget||e).forEach((function(e){var t=e.getAttribute(n);if(b.state.isVisible)e.setAttribute(n,t?t+" "+r:r);else{var o=t&&t.replace(r,"").trim();o?e.setAttribute(n,o):e.removeAttribute(n)}}))}}function $(){!A&&b.props.aria.expanded&&Dh(b.props.triggerTarget||e).forEach((function(e){b.props.interactive?e.setAttribute("aria-expanded",b.state.isVisible&&e===O()?"true":"false"):e.removeAttribute("aria-expanded")}))}function L(){S().removeEventListener("mousemove",g),nf=nf.filter((function(e){return e!==g}))}function B(t){if(!Th.isTouch||!h&&"mousedown"!==t.type){var n=t.composedPath&&t.composedPath()[0]||t.target;if(!b.props.interactive||!Nh(E,n)){if(Dh(b.props.triggerTarget||e).some((function(e){return Nh(e,n)}))){if(Th.isTouch)return;if(b.state.isVisible&&b.props.trigger.indexOf("click")>=0)return}else M("onClickOutside",[b,t]);!0===b.props.hideOnClick&&(b.clearDelayTimeouts(),b.hide(),d=!0,setTimeout((function(){d=!1})),b.state.isMounted||H())}}}function P(){h=!0}function R(){h=!1}function j(){var e=S();e.addEventListener("mousedown",B,!0),e.addEventListener("touchend",B,fh),e.addEventListener("touchstart",R,fh),e.addEventListener("touchmove",P,fh)}function H(){var e=S();e.removeEventListener("mousedown",B,!0),e.removeEventListener("touchend",B,fh),e.removeEventListener("touchstart",R,fh),e.removeEventListener("touchmove",P,fh)}function V(e,t){var n=N().box;function r(e){e.target===n&&(Sh(n,"remove",r),t())}if(0===e)return t();Sh(n,"remove",s),Sh(n,"add",r),s=r}function z(t,n,r){void 0===r&&(r=!1),Dh(b.props.triggerTarget||e).forEach((function(e){e.addEventListener(t,n,r),m.push({node:e,eventType:t,handler:n,options:r})}))}function q(){var e;k()&&(z("touchstart",K,{passive:!0}),z("touchend",J,{passive:!0})),(e=b.props.trigger,e.split(/\s+/).filter(Boolean)).forEach((function(e){if("manual"!==e)switch(z(e,K),e){case"mouseenter":z("mouseleave",J);break;case"focus":z(Bh?"focusout":"blur",G);break;case"focusin":z("focusout",G)}}))}function W(){m.forEach((function(e){var t=e.node,n=e.eventType,r=e.handler,o=e.options;t.removeEventListener(n,r,o)})),m=[]}function K(e){var t,n=!1;if(b.state.isEnabled&&!Y(e)&&!d){var r="focus"===(null==(t=i)?void 0:t.type);i=e,l=e.currentTarget,$(),!b.state.isVisible&&vh(e,"MouseEvent")&&nf.forEach((function(t){return t(e)})),"click"===e.type&&(b.props.trigger.indexOf("mouseenter")<0||p)&&!1!==b.props.hideOnClick&&b.state.isVisible?n=!0:ee(e),"click"===e.type&&(p=!n),n&&!r&&te(e)}}function U(e){var t=e.target,n=O().contains(t)||E.contains(t);if("mousemove"!==e.type||!n){var r=Z().concat(E).map((function(e){var t,n=null==(t=e._tippy.popperInstance)?void 0:t.state;return n?{popperRect:e.getBoundingClientRect(),popperState:n,props:u}:null})).filter(Boolean);(function(e,t){var n=t.clientX,r=t.clientY;return e.every((function(e){var t=e.popperRect,o=e.popperState,i=e.props.interactiveBorder,s=o.placement.split("-")[0],a=o.modifiersData.offset;if(!a)return!0;var l="bottom"===s?a.top.y:0,c="top"===s?a.bottom.y:0,u="right"===s?a.left.x:0,p="left"===s?a.right.x:0,d=t.top-r+l>i,h=r-t.bottom-c>i,f=t.left-n+u>i,m=n-t.right-p>i;return d||h||f||m}))})(r,e)&&(L(),te(e))}}function J(e){Y(e)||b.props.trigger.indexOf("click")>=0&&p||(b.props.interactive?b.hideWithInteractivity(e):te(e))}function G(e){b.props.trigger.indexOf("focusin")<0&&e.target!==O()||b.props.interactive&&e.relatedTarget&&E.contains(e.relatedTarget)||te(e)}function Y(e){return!!Th.isTouch&&k()!==e.type.indexOf("touch")>=0}function X(){Q();var t=b.props,n=t.popperOptions,r=t.placement,o=t.offset,i=t.getReferenceClientRect,s=t.moveTransition,l=_()?Zh(E).arrow:null,c=i?{getBoundingClientRect:i,contextElement:i.contextElement||O()}:e,u={name:"$$tippy",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:function(e){var t=e.state;if(_()){var n=N().box;["placement","reference-hidden","escaped"].forEach((function(e){"placement"===e?n.setAttribute("data-placement",t.placement):t.attributes.popper["data-popper-"+e]?n.setAttribute("data-"+e,""):n.removeAttribute("data-"+e)})),t.attributes.popper={}}}},p=[{name:"offset",options:{offset:o}},{name:"preventOverflow",options:{padding:{top:2,bottom:2,left:5,right:5}}},{name:"flip",options:{padding:5}},{name:"computeStyles",options:{adaptive:!s}},u];_()&&l&&p.push({name:"arrow",options:{element:l,padding:3}}),p.push.apply(p,(null==n?void 0:n.modifiers)||[]),b.popperInstance=hh(c,E,Object.assign({},n,{placement:r,onFirstUpdate:a,modifiers:p}))}function Q(){b.popperInstance&&(b.popperInstance.destroy(),b.popperInstance=null)}function Z(){return wh(E.querySelectorAll("[data-tippy-root]"))}function ee(e){b.clearDelayTimeouts(),e&&M("onTrigger",[b,e]),j();var t=T(!0),r=x(),o=r[0],i=r[1];Th.isTouch&&"hold"===o&&i&&(t=i),t?n=setTimeout((function(){b.show()}),t):b.show()}function te(e){if(b.clearDelayTimeouts(),M("onUntrigger",[b,e]),b.state.isVisible){if(!(b.props.trigger.indexOf("mouseenter")>=0&&b.props.trigger.indexOf("click")>=0&&["mouseleave","mousemove"].indexOf(e.type)>=0&&p)){var t=T(!1);t?r=setTimeout((function(){b.state.isVisible&&b.hide()}),t):o=requestAnimationFrame((function(){b.hide()}))}}else H()}}function sf(e,t){void 0===t&&(t={});var n=Wh.plugins.concat(t.plugins||[]);"production"!==process.env.NODE_ENV&&(!function(e){var t=!e,n="[object Object]"===Object.prototype.toString.call(e)&&!e.addEventListener;zh(t,["tippy() was passed","`"+String(e)+"`","as its targets (first) argument. Valid types are: String, Element,","Element[], or NodeList."].join(" ")),zh(n,["tippy() was passed a plain object which is not supported as an argument","for virtual positioning. Use props.getReferenceClientRect instead."].join(" "))}(e),Gh(t,n)),document.addEventListener("touchstart",Mh,fh),window.addEventListener("blur",$h);var r=Object.assign({},t,{plugins:n}),o=kh(e);if("production"!==process.env.NODE_ENV){var i=xh(r.content),s=o.length>1;Vh(i&&s,["tippy() was passed an Element as the `content` prop, but more than","one tippy instance was created by this invocation. This means the","content element will only be appended to the last tippy instance.","\n\n","Instead, pass the .innerHTML of the element, or use a function that","returns a cloned version of the element instead.","\n\n","1) content: element.innerHTML\n","2) content: () => element.cloneNode(true)"].join(" "))}var a=o.reduce((function(e,t){var n=t&&of(t,r);return n&&e.push(n),e}),[]);return xh(e)?a[0]:a}sf.defaultProps=Wh,sf.setDefaultProps=function(e){"production"!==process.env.NODE_ENV&&Gh(e,[]),Object.keys(e).forEach((function(t){Wh[t]=e[t]}))},sf.currentInput=Th,Object.assign({},fd,{effect:function(e){var t=e.state,n={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};Object.assign(t.elements.popper.style,n.popper),t.styles=n,t.elements.arrow&&Object.assign(t.elements.arrow.style,n.arrow)}}),sf.setDefaultProps({render:ef});class af{constructor({editor:e,element:t,view:n,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:e,state:t,from:n,to:r})=>{const{doc:o,selection:i}=t,{empty:s}=i,a=!o.textBetween(n,r).length&&Tp(t.selection);return!(!e.hasFocus()||s||a)},this.mousedownHandler=()=>{this.preventHide=!0},this.dragstartHandler=()=>{this.hide()},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=n,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.addEventListener("dragstart",this.dragstartHandler),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=sf(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"top",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(e=>{this.blurHandler({event:e})})))}update(e,t){var n,r,o;const{state:i,composing:s}=e,{doc:a,selection:l}=i,c=t&&t.doc.eq(a)&&t.selection.eq(l);if(s||c)return;this.createTooltip();const{ranges:u}=l,p=Math.min(...u.map((e=>e.$from.pos))),d=Math.max(...u.map((e=>e.$to.pos)));(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t,from:p,to:d}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>{if(Np(t=i.selection)&&t instanceof Ol){const t=e.nodeDOM(p);if(t)return t.getBoundingClientRect()}var t;return Xp(e,p,d)})}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.view.dom.removeEventListener("dragstart",this.dragstartHandler),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}Ap.create({name:"bubbleMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"bubbleMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[(e={pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow},new Bl({key:"string"==typeof e.pluginKey?new jl(e.pluginKey):e.pluginKey,view:t=>new af({view:t,...e})}))]:[];var e}});class lf{constructor({editor:e,element:t,view:n,tippyOptions:r={},shouldShow:o}){this.preventHide=!1,this.shouldShow=({view:e,state:t})=>{const{selection:n}=t,{$anchor:r,empty:o}=n,i=1===r.depth,s=r.parent.isTextblock&&!r.parent.type.spec.code&&!r.parent.textContent;return!!(e.hasFocus()&&o&&i&&s)},this.mousedownHandler=()=>{this.preventHide=!0},this.focusHandler=()=>{setTimeout((()=>this.update(this.editor.view)))},this.blurHandler=({event:e})=>{var t;this.preventHide?this.preventHide=!1:(null==e?void 0:e.relatedTarget)&&(null===(t=this.element.parentNode)||void 0===t?void 0:t.contains(e.relatedTarget))||this.hide()},this.editor=e,this.element=t,this.view=n,o&&(this.shouldShow=o),this.element.addEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.on("focus",this.focusHandler),this.editor.on("blur",this.blurHandler),this.tippyOptions=r,this.element.remove(),this.element.style.visibility="visible"}createTooltip(){const{element:e}=this.editor.options,t=!!e.parentElement;!this.tippy&&t&&(this.tippy=sf(e,{duration:0,getReferenceClientRect:null,content:this.element,interactive:!0,trigger:"manual",placement:"right",hideOnClick:"toggle",...this.tippyOptions}),this.tippy.popper.firstChild&&this.tippy.popper.firstChild.addEventListener("blur",(e=>{this.blurHandler({event:e})})))}update(e,t){var n,r,o;const{state:i}=e,{doc:s,selection:a}=i,{from:l,to:c}=a;if(t&&t.doc.eq(s)&&t.selection.eq(a))return;this.createTooltip();(null===(n=this.shouldShow)||void 0===n?void 0:n.call(this,{editor:this.editor,view:e,state:i,oldState:t}))?(null===(r=this.tippy)||void 0===r||r.setProps({getReferenceClientRect:(null===(o=this.tippyOptions)||void 0===o?void 0:o.getReferenceClientRect)||(()=>Xp(e,l,c))}),this.show()):this.hide()}show(){var e;null===(e=this.tippy)||void 0===e||e.show()}hide(){var e;null===(e=this.tippy)||void 0===e||e.hide()}destroy(){var e;null===(e=this.tippy)||void 0===e||e.destroy(),this.element.removeEventListener("mousedown",this.mousedownHandler,{capture:!0}),this.editor.off("focus",this.focusHandler),this.editor.off("blur",this.blurHandler)}}function cf(e){return(...t)=>n=>e(n,...t)}function uf(e){const t=Object.entries(e).reduce(((e,[t,n])=>{if(!n)return e;return`${e}--zw-${t.replace(/_/g,"-")}:${n};`}),"");return t?{style:t}:null}function pf(e){const t=uf(e);return["span",t?{...t,class:"zw-style"}:{},0]}function df(e,...t){return({editor:n})=>(n.commands[e](...t),!0)}Ap.create({name:"floatingMenu",addOptions:()=>({element:null,tippyOptions:{},pluginKey:"floatingMenu",shouldShow:null}),addProseMirrorPlugins(){return this.options.element?[(e={pluginKey:this.options.pluginKey,editor:this.editor,element:this.options.element,tippyOptions:this.options.tippyOptions,shouldShow:this.options.shouldShow},new Bl({key:"string"==typeof e.pluginKey?new jl(e.pluginKey):e.pluginKey,view:t=>new lf({view:t,...e})}))]:[];var e}});var hf=Object.defineProperty,ff=(e,t,n)=>(((e,t,n)=>{t in e?hf(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function mf(e){return e>1||e<-1?e/100:e}const gf=e=>Number.parseFloat(e.toFixed(5).substr(0,5));function vf(e){const t=function(e,t=1){const n=[];let r=0;for(;r<e.length;)n.push(e.substr(r,t)),r+=t;return n}(e.slice(1),2).map((e=>parseInt(e,16))),n=void 0!==t[3]?Math.round(t[3]/255*100)/100:1;return{r:t[0],g:t[1],b:t[2],a:n}}function yf(e){const{h:t,s:n,v:r,a:o}=e,i=e=>{const o=(e+t/60)%6;return r-r*n*Math.max(Math.min(o,4-o,1),0)},s=[i(5),i(3),i(1)].map((e=>Math.round(255*e)));return{r:s[0],g:s[1],b:s[2],a:o}}function bf(e){if(!e)return{h:0,s:1,v:1,a:1};const t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),i=Math.min(t,n,r);let s=0;o!==i&&(o===t?s=60*(0+(n-r)/(o-i)):o===n?s=60*(2+(r-t)/(o-i)):o===r&&(s=60*(4+(t-n)/(o-i)))),s<0&&(s+=360);const a=[s,0===o?0:(o-i)/o,o],l=gf(a[1]),c=gf(a[2]);return{h:Math.floor(a[0]),s:l,v:c,a:e.a}}function Df(e){const t=function(e){return bf(vf(e))}(e),n=function(e){const{h:t,s:n,v:r,a:o}=e,i=r-r*n/2,s=1===i||0===i?0:(r-i)/Math.min(i,1-i);return{h:t,s:gf(s),l:gf(i),a:o}}(t),r=vf(e);return{alpha:t.a,hex:e.substr(0,7),hexa:e,hsla:n,hsva:t,hue:t.h,rgba:r}}function Ef(e,t,n="0"){return e+n.repeat(Math.max(0,t-e.length))}function wf(e){return Df(function(e){let t=e;return t.startsWith("#")&&(t=t.slice(1)),t=t.replace(/([^0-9a-f])/gi,"F"),(3===t.length||4===t.length)&&(t=t.split("").map((e=>e+e)).join("")),t=6===t.length?Ef(t,8,"F"):Ef(Ef(t,6),8,"F"),`#${t}`.toUpperCase().substr(0,9)}(e))}const Cf=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"}),Af="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",xf=`[\\s|\\(]+(${Af})[,|\\s]+(${Af})[,|\\s]+(${Af})\\s*\\)?`,kf=`[\\s|\\(]+(${Af})[,|\\s]+(${Af})[,|\\s]+(${Af})[,|\\s]+(${Af})\\s*\\)?`,_f=Object.freeze({CSS_UNIT:new RegExp(Af),RGB:new RegExp(`rgb${xf}`),RGBA:new RegExp(`rgba${kf}`),HSL:new RegExp(`hsl${xf}`),HSLA:new RegExp(`hsla${kf}`),HSV:new RegExp(`hsv${xf}`),HSVA:new RegExp(`hsva${kf}`),HEX3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,HEX6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,HEX4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,HEX8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}),Of=class{static create(e){if(!e)return Of.fromBlack();let t=e.replace(/^\s+/,"").replace(/\s+$/,"").toLowerCase();if(Cf[t])t=Cf[t];else if(t===this.TRANSPARENT)return Of.fromTransparent();const n=_f.RGB.exec(t)||_f.RGBA.exec(t);if(n){const e=void 0===n[4]?1:n[4];return Of.fromRgba({r:Number.parseInt(n[1]),g:Number.parseInt(n[2]),b:Number.parseInt(n[3]),a:Number.parseFloat(e)})}const r=_f.HSL.exec(t)||_f.HSLA.exec(t);if(r){const e=void 0===r[4]?1:r[4];return Of.fromHsla({h:Number.parseInt(r[1]),s:Number.parseFloat(r[2]),l:Number.parseFloat(r[3]),a:Number.parseFloat(e)})}const o=_f.HSV.exec(t)||_f.HSVA.exec(t);if(o){const e=void 0===o[4]?1:o[4];return Of.fromHsva({h:Number.parseInt(o[1]),s:Number.parseFloat(o[2]),v:Number.parseFloat(o[3]),a:Number.parseFloat(e)})}return _f.HEX8.exec(t)||_f.HEX6.exec(t)||_f.HEX4.exec(t)||_f.HEX3.exec(t)?Of.fromHex(t):Of.fromBlack()}static fromHex(e){const{rgba:t}=wf(e);return new Of(t)}static fromRgba({r:e,g:t,b:n,a:r}){const o=mf(r);return new Of({r:e,g:t,b:n,a:o})}static fromHsla({h:e,s:t,l:n,a:r}){const o=mf(t),i=mf(n),s=mf(r);return Of.fromHsva(function(e){const{h:t,s:n,l:r,a:o}=e,i=r+n*Math.min(r,1-r);return{h:t,s:gf(0===i?0:2-2*r/i),v:gf(i),a:o}}({h:e,s:o,l:i,a:s}))}static fromHsva({h:e,s:t,v:n,a:r}){const o=yf({h:e,s:mf(t),v:mf(n),a:mf(r)});return new Of(o)}static fromTransparent(){return new Of({r:0,g:0,b:0,a:0})}static fromWhite(){return new Of({r:255,g:255,b:255,a:1})}static fromBlack(){return new Of({r:0,g:0,b:0,a:1})}static isTransparent(e){return Of.create(e).isTransparent()}static isDark(e){return Of.create(e).isDark()}constructor(e){this._rgba=e,this._hsva=this._calcHsva(),this._alpha=e.a}get hex(){return this.toHexString()}get r(){return this._rgba.r}get b(){return this._rgba.b}get g(){return this._rgba.g}get h(){return this._hsva.h}get s(){return this._hsva.s}get v(){return this._hsva.v}get alpha(){return this._alpha}setAlpha(e){return this._alpha=e,this}toHexString(){return function(e){const t=e=>{const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()};return`#${[t(e.r),t(e.g),t(e.b)].join("")}`}({r:this.r,g:this.g,b:this.b,a:this.alpha})}toRgbaString(){const e=`${Math.floor(100*this.alpha)}%`;return`rgba(${[this.r,this.g,this.b,e].join(", ")})`}get rgba(){return this._rgba}updateRgb(e){this._rgba={...this._rgba,...e},this._hsva=this._calcHsva()}get hsva(){return this._hsva}updateHsv(e){this._hsva={...this._hsva,...e},this._rgba=this._calcRgba()}isTransparent(){return 0===this.alpha}isDark(){return this.getBrightness()<128}getBrightness(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3}_calcHsva(){return bf(this.rgba)}_calcRgba(){return yf(this.hsva)}};let Sf=Of;function Nf(e){const t=Sf.create(e);return 1===t.alpha?t.toHexString():t.toRgbaString()}function Tf(e,t){if(!e.includes("em"))return parseInt(e);const n=window.getComputedStyle(t).fontSize,r=parseFloat(e)*parseFloat(n);return Math.round(r)}function Ff(e,t,n){if(!e.includes("px"))return e;const r=function(e,t){return(e.firstElementChild||e).style.fontSize||window.getComputedStyle(t).fontSize}(t,n),o=Tf(r,n);return(parseInt(e)/o).toFixed(2)}ff(Sf,"TRANSPARENT","transparent"),ff(Sf,"NONE","none");const Mf=Object.freeze({COMMON:"common",DESKTOP:"desktop",TABLET:"tablet",MOBILE:"mobile",get values(){return[this.COMMON,this.MOBILE,this.TABLET,this.DESKTOP]}}),If=Object.freeze({UPPERCASE:"uppercase",LOWERCASE:"lowercase",CAPITALIZE:"capitalize"}),$f=Object.freeze({LEFT:"left",CENTER:"center",RIGHT:"right",JUSTIFY:"justify",get values(){return[this.LEFT,this.CENTER,this.RIGHT,this.JUSTIFY]}}),Lf=Object.freeze({DOCUMENT:"doc",PARAGRAPH:"paragraph",HEADING:"heading",LIST:"list",LIST_ITEM:"listItem",TEXT:"text",get blocks(){return[this.PARAGRAPH,this.LIST,this.HEADING]}}),Bf=Object.freeze({DISC:"disc",CIRCLE:"circle",SQUARE:"square",DECIMAL:"decimal",ROMAN:"roman",LATIN:"latin",get values(){return[this.DISC,this.CIRCLE,this.SQUARE,this.DECIMAL,this.ROMAN,this.LATIN]},get ordered(){return[this.DECIMAL,this.ROMAN,this.LATIN]}}),Pf=Object.freeze({ALIGNMENT:"alignment",BACKGROUND_COLOR:"background_color",FONT_COLOR:"font_color",FONT_FAMILY:"font_family",FONT_SIZE:"font_size",FONT_STYLE:"font_style",FONT_WEIGHT:"font_weight",LINE_HEIGHT:"line_height",TEXT_DECORATION:"text_decoration",SUPERSCRIPT:"superscript",MARGIN:"margin",get attributes(){return[this.ALIGNMENT,this.LINE_HEIGHT,this.MARGIN]},get marks(){return[this.BACKGROUND_COLOR,this.FONT_COLOR,this.FONT_FAMILY,this.FONT_SIZE,this.FONT_STYLE,this.FONT_WEIGHT,this.TEXT_DECORATION,this.SUPERSCRIPT]}}),Rf=Object.freeze({BLANK:"_blank",SELF:"_self"}),jf=Object.freeze({URL:"url",BLOCK:"block"}),Hf={start:$f.LEFT,end:$f.RIGHT};const Vf=Qp.create({name:Pf.FONT_FAMILY,addOptions:()=>({fonts:[],defaultFont:""}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:cf((({commands:e},t)=>{e.setMark(this.name,{value:t});const n=e.findFontByName(t);let r=Pt(e.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),e.applyFontWeight(r)),n.isItalicSupported(r)||e.removeItalic()})),getFont:cf((({commands:e})=>{const t=e.getFontFamily();return Ht((()=>e.findFontByName(Pt(t))))})),findFontByName:cf(((e,t)=>this.options.fonts.find((e=>e.name===t)))),getFontFamily:cf((({editor:e,commands:t})=>{const n=t.getDefaultFontFamily();return Ht((()=>e.getAttributes(this.name)?.value??Pt(n)))})),getDefaultFontFamily:cf((({commands:e})=>{const t=e.getPreset();return Ht((()=>Pt(t).common.font_family))}))}},parseHTML(){const e=e=>{const t=e.replace(/"/g,"");return{value:this.options.fonts.some((e=>e.name===t))?t:this.options.defaultFont}};return[{style:"--zw-font-family",getAttrs:e},{style:"font-family",getAttrs:e}]},renderHTML:({HTMLAttributes:e})=>pf({font_family:e.value?`"${e.value}"`:null})}),zf=Zp.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,sp(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>function(e){return new mp({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=lp(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}})}({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});class qf{#e=new DOMParser;types=window;parse(e){return this.#e.parseFromString(e,"text/html")}}class Wf{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static BLOCK_STYLES=["text-align","line-height","margin","margin-top","margin-bottom","margin-left","margin-right"];static ASSIGN_STYLE_RULES=[{tag:/^(b|strong)$/,ignore:/font-weight/},{tag:/^i$/,ignore:/font-style/},{tag:/^s$/,ignore:/text-decoration(.+)?/}];static build(e,t={}){return new Wf({content:e,parser:t.parser||new qf})}static normalize(e,t={}){return Wf.build(e,t).normalize()}constructor({content:e,parser:t}){this._content=e,this._parser=t,this.dom=null}normalize(){return"string"!=typeof this._content?this._content:(this.normalizeHTML(),this.normalizedHTML)}normalizeHTML(){this.dom=this._parser.parse(this._content.replace(/(\r)?\n/g,"")),this._removeComments(),this.iterateNodes(this._normalizeBreakLines,(e=>"BR"===e.tagName)),this.iterateNodes(this._removeEmptyNodes,this._isBlockNode),this.iterateNodes(this._normalizeListItems,(e=>"LI"===e.tagName)),this.iterateNodes(this._normalizeSettingsStructure,(e=>"SPAN"===e.tagName)),this.iterateNodes(this._normalizeStyles,(e=>"SPAN"!==e.tagName))}get normalizedHTML(){return this.dom.body.innerHTML}get _NodeFilter(){return this._parser.types.NodeFilter}get _Node(){return this._parser.types.Node}_removeComments(){const e=this.createNodeIterator(this._NodeFilter.SHOW_COMMENT);this.runIterator(e,(e=>e.remove()))}createNodeIterator(e,t){return this.dom.createNodeIterator(this.dom.body,e,t)}iterateNodes(e,t=(()=>!0)){const n=e=>"BODY"!==e.tagName&&t.call(this,e),r=this.createNodeIterator(this._NodeFilter.SHOW_ELEMENT,{acceptNode:e=>n(e)?this._NodeFilter.FILTER_ACCEPT:this._NodeFilter.FILTER_REJECT});this.runIterator(r,e)}runIterator(e,t){let n=e.nextNode();for(;n;)t.call(this,n),n=e.nextNode()}_removeEmptyNodes(e){e.innerHTML.trim()||e.remove()}_normalizeListItems(e){const t=this.dom.createDocumentFragment(),n=Array.from(e.childNodes);let r;const o=n=>{this._assignElementProperties(n,e,Wf.BLOCK_STYLES),t.append(n)};this._assignElementProperties(e,e.parentElement,Wf.BLOCK_STYLES);for(const e of n)this._isBlockNode(e)?(o(e),r=null):(r||(r=this.dom.createElement("p"),o(r)),r.append(e));e.append(t),this._removeStyleProperties(e,Wf.BLOCK_STYLES)}_normalizeSettingsStructure(e){if(this._isOnlyTextContent(e))return;const t=e.cloneNode(!0),n=this._getMigratingStyles(e,{customProperties:!0}),r=[];for(const e of t.childNodes){let o=e;n.length&&(o=this._wrapTextNode(t,e),this._assignElementProperties(o,t,n)),r.push(o)}e.replaceWith(...r)}_normalizeStyles(e){if(!this._isBlockNode(e)&&this._isOnlyTextContent(e))return;const t=this._getMigratingStyles(e);if(t.length){for(const n of e.childNodes){const r=this._wrapTextNode(e,n);this._assignElementProperties(r,e,t)}this._removeStyleProperties(e,t)}}_isOnlyTextContent(e){return Array.from(e.childNodes).every((e=>e.nodeType===this._Node.TEXT_NODE))}_isBlockNode(e){return Wf.BLOCK_NODE_NAMES.includes(e.tagName)}_getMigratingStyles(e,{customProperties:t}={}){const n=Wf.BLOCK_STYLES,r=[];for(let o=0;o<e.style.length;o++){const i=e.style.item(o);n.includes(i)||(!t&&i.startsWith("--")||r.push(i))}return r}_wrapTextNode(e,t){if(t.nodeType!==this._Node.TEXT_NODE)return t;const n=this.dom.createElement("span");return n.append(t.cloneNode()),e.replaceChild(n,t),n}_assignElementProperties(e,t,n){for(const r of n){const n=t.style.getPropertyValue(r);n&&this._canAssignElementProperty(e,t,r)&&e.style.setProperty(r,n)}}_canAssignElementProperty(e,t,n){return!e.style.getPropertyValue(n)&&Wf.ASSIGN_STYLE_RULES.every((t=>!t.tag.test(e.tagName.toLowerCase())||!t.ignore.test(n)))}_removeStyleProperties(e,t){for(const n of t)e.style.removeProperty(n);0===e.style.length&&e.removeAttribute("style")}_normalizeBreakLines({parentElement:e}){if(!this._isBlockNode(e))return;if(!e.textContent)return;const t=this.dom.createDocumentFragment(),n=Array.from(e.childNodes),r=e.cloneNode(!0);r.innerHTML="";let o=r.cloneNode();const i=n=>{this._assignElementProperties(n,e,Wf.BLOCK_STYLES),t.append(n)};for(const e of n)"BR"!==e.tagName?o.append(e):(i(o),o=r.cloneNode());t.append(o),e.replaceWith(t)}}class Kf{static window=globalThis.window;static use(e){this.window=e}static get document(){return this.window.document}static get body(){return this.document.body}static get head(){return this.document.head}static getComputedStyle(e){return this.window.getComputedStyle(e)}}function Uf(e,t){return e.split(" ").map((e=>`.${e}`)).join("")+t.id}const Jf=Ap.create({name:"style_preset",addExtensions:()=>[zf.configure({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})],addStorage:()=>({presetStyleEl:null}),addGlobalAttributes(){return[{types:[Lf.PARAGRAPH,Lf.HEADING],attributes:{preset:{isRequired:!1,default:{id:this.options.defaultId},parseHTML:e=>{const t=Pt(this.options.presets);if("LI"===e.parentElement.tagName)return null;for(const{id:n,node:r,fallbackClass:o}of t){if(o&&e.classList.contains(o))return{id:n};const t=Uf(this.options.baseClass,{id:n});if(e.matches(t))return{id:n};if(e.tagName===`H${r?.level}`)return{id:n}}return"P"===e.tagName?{id:this.options.defaultId}:null},renderHTML:e=>e.preset?{class:this.options.baseClass+e.preset.id}:null}}}]},addCommands(){function e(e,t){return e.find((e=>t===e.id))}return{getPresetList:cf((()=>Ht((()=>this.options.presets.filter((e=>!e.hidden)))))),getPreset:cf((({commands:t})=>{const n=t.getBlockAttributes("preset",{id:this.options.defaultId}),r=t.getPresetList();return Ht((()=>e(Pt(r),Pt(n).id)))})),applyPreset:cf((({commands:t,chain:n},r)=>{const o=e(Pt(t.getPresetList()),r),i=o.node?.type??Lf.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const e of Pf.attributes)s[e]=Pt(t.getBlockAttributes(e));n().removeList().setNode(i,s).run()})),applyDefaultPreset:cf((({commands:e})=>{e.applyPreset(this.options.defaultId)})),removePreset:cf((({commands:e})=>{e.setNode(Lf.PARAGRAPH,{preset:null})})),getPresetCustomization:cf((({editor:e})=>{const t=jt(e,"state");return Ht((()=>{const e=new Set,n=new Set,{from:r,to:o}=t.value.selection;return t.value.doc.nodesBetween(r,o,(t=>{for(const[n,r]of Object.entries(t.attrs)){Pf.attributes.includes(n)&&r&&e.add(n)}for(const{type:e}of t.marks)Pf.marks.includes(e.name)&&n.add(e.name)})),{attributes:Array.from(e),marks:Array.from(n)}}))})),removePresetCustomization:cf((({chain:e})=>{e().storeSelection().expandSelectionToBlock().unsetMarks(Pf.marks).resetAttributes(Lf.PARAGRAPH,Pf.attributes).resetAttributes(Lf.HEADING,Pf.attributes).restoreSelection().run()})),removeFormat:cf((({chain:e})=>{e().storeSelection().expandSelectionToBlock().unsetAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){const e=Kf.document.querySelector("[data-zw-styles]");if(e)this.storage.presetStyleEl=e;else{this.storage.presetStyleEl=Kf.document.createElement("style"),this.storage.presetStyleEl.dataset.zwStyles="";for(const e of this.options.presets){const t=[` ${Uf(this.options.baseClass,e)} {`];for(const n of Mf.values)for(const r of Object.keys(e[n])){const o=this.options.makeVariable({device:n,preset:e,property:r}),i=r.replace(/_/i,"-"),s=n===Mf.COMMON?"preset":`preset-${n}`;t.push(`--zw-${s}-${i}: var(${o}, inherit);`)}t.push("}"),this.storage.presetStyleEl.innerHTML+=t.join(" ")}Kf.head.append(this.storage.presetStyleEl)}}}),Gf=Qp.create({name:Pf.FONT_WEIGHT,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:cf((({commands:e},t)=>{e.setMark(this.name,{value:t});Pt(e.getFont()).isItalicSupported(t)||e.removeItalic()})),toggleBold:cf((({commands:e})=>{const t=Pt(e.getFontWeight()),n=Pt(e.getFont()),r=Number(t)>=600?"400":"700",o=n.findClosestWeight(r);e.applyFontWeight(o)})),getFontWeight:cf((({editor:e,commands:t})=>{const n=t.getDefaultFontWeight(),r=t.getFont();return Ht((()=>{const t=e.getAttributes(this.name)?.value??Pt(n),o=Pt(r);return o.isWeightSupported(t)?t:o.findClosestWeight(t)}))})),getDefaultFontWeight:cf((({commands:e})=>{const t=e.getPreset();return Ht((()=>Pt(t).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":df("toggleBold"),"Mod-B":df("toggleBold")}),parseHTML(){const e=e=>!!Number(e)&&{value:e};return[{style:"--zw-font-weight",getAttrs:e},{style:"font-weight",getAttrs:e},{tag:"b",attrs:{value:"700"}},{tag:"strong",attrs:{value:"700"}}]},renderHTML:({HTMLAttributes:e})=>pf({font_weight:e.value})}),Yf=Qp.create({name:Pf.FONT_SIZE,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:cf((({editor:e,commands:t})=>{const n=t.getDevice(),r=t.getDefaultFontSize();return Ht((()=>e.getAttributes(this.name)?.[Pt(n)]??Pt(r)))})),getDefaultFontSize:cf((({commands:e})=>{const t=e.getDevice(),n=e.getPreset();return Ht((()=>Pt(n)[Pt(t)].font_size.replace("px","")))})),applyFontSize:cf((({commands:e},t)=>{e.setMark(this.name,{desktop:t,tablet:t,mobile:null})})),increaseFontSize:cf((({commands:e})=>{const t=Number(Pt(e.getFontSize())),n=Math.min(t+1,this.options.maxSize);e.applyFontSize(String(n))})),decreaseFontSize:cf((({commands:e})=>{const t=Number(Pt(e.getFontSize())),n=Math.max(t-1,this.options.minSize);e.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":df("increaseFontSize"),"Mod-Shift--":df("decreaseFontSize")}),parseHTML(){const e=e=>{if(!e)return null;const t=Tf(e,Pt(this.options.wrapperRef));return String(t)};return[{tag:'[style*="--zw-font-size"]',getAttrs:({style:t})=>({mobile:e(t.getPropertyValue("--zw-font-size-mobile")),tablet:e(t.getPropertyValue("--zw-font-size-tablet")),desktop:e(t.getPropertyValue("--zw-font-size-desktop"))})},{style:"font-size",getAttrs:t=>{const n=e(t);return{desktop:n,tablet:n,mobile:null}}}]},renderHTML({HTMLAttributes:e}){const t=e=>e?`${e}px`:null;return pf({font_size_mobile:t(e.mobile),font_size_tablet:t(e.tablet),font_size_desktop:t(e.desktop)})}}),Xf=Qp.create({name:Pf.FONT_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:cf((({commands:e,editor:t})=>{const n=e.getDefaultFontColor();return Ht((()=>t.getAttributes(this.name)?.value??Pt(n)))})),getDefaultFontColor:cf((({commands:e})=>{const t=e.getPreset();return Ht((()=>Pt(t).common.color))})),applyFontColor:cf((({commands:e},t)=>{e.setMark(this.name,{value:t})}))}},parseHTML(){const e=e=>({value:Nf(e)});return[{style:"--zw-font-color",getAttrs:e},{style:"color",getAttrs:e}]},renderHTML:({HTMLAttributes:e})=>pf({font_color:e.value})}),Qf=Qp.create({name:Pf.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:cf((({editor:e})=>Ht((()=>e.getAttributes(this.name)?.value??"rgba(255, 255, 255, 0%)")))),applyBackgroundColor:cf((({commands:e},t)=>{e.setMark(this.name,{value:t})}))}},parseHTML(){const e=e=>({value:Nf(e)});return[{style:"--zw-background-color",getAttrs:e},{style:"background-color",getAttrs:e}]},renderHTML:({HTMLAttributes:e})=>pf({background_color:e.value})}),Zf=Ap.create({name:"device_manager",addCommands(){return{getDevice:cf((()=>jt(this.options,"device")))}}}),em=Qp.create({name:Pf.FONT_STYLE,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:cf((({editor:e,commands:t})=>{const n=t.getDefaultFontStyle();return Ht((()=>e.getAttributes(this.name)?.italic??Pt(n).italic))})),isItalicAvailable:cf((({commands:e})=>{const t=e.getFont(),n=e.getFontWeight();return Ht((()=>Pt(t).isItalicSupported(Pt(n))))})),getDefaultFontStyle:cf((({commands:e})=>{const t=e.getPreset();return Ht((()=>({italic:"italic"===Pt(t).common.font_style})))})),toggleItalic:cf((({commands:e})=>{Pt(this.editor.commands.isItalicAvailable())&&(Pt(e.isItalic())?e.removeItalic():e.applyItalic())})),applyItalic:cf((({commands:e})=>{e.setMark(this.name,{italic:!0})})),removeItalic:cf((({commands:e})=>{e.unsetMark(this.name)}))}},addKeyboardShortcuts:()=>({"Mod-i":df("toggleItalic"),"Mod-I":df("toggleItalic")}),parseHTML(){const e=e=>e.includes("italic")&&{italic:!0};return[{style:"--zw-font-style",getAttrs:e},{style:"font-style",getAttrs:e},{tag:"i",attrs:{italic:!0}}]},renderHTML:({HTMLAttributes:e})=>pf({font_style:e.italic?"italic":null})}),tm=Qp.create({name:Pf.TEXT_DECORATION,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:cf((({commands:e,editor:t})=>{const n=e.getTextDecoration();return Ht((()=>t.isActive("link")||Pt(n).underline))})),isStrikeThrough:cf((({commands:e})=>{const t=e.getTextDecoration();return Ht((()=>Pt(t).strike_through))})),getTextDecoration:cf((({editor:e,commands:t})=>{const n=t.getDefaultTextDecoration();return Ht((()=>{const t=e.getAttributes(this.name)??{};return{underline:t.underline??Pt(n).underline,strike_through:t.strike_through??Pt(n).strike_through}}))})),getDefaultTextDecoration:cf((({commands:e})=>{const t=e.getPreset();return Ht((()=>{const e=Pt(t).common.text_decoration;return{underline:e.includes("underline"),strike_through:e.includes("line-through")}}))})),toggleUnderline:cf((({commands:e,editor:t})=>{t.isActive("link")||e.toggleTextDecoration("underline")})),toggleStrikeThrough:cf((({commands:e})=>{e.toggleTextDecoration("strike_through")})),toggleTextDecoration:cf((({commands:e},t)=>{Pt(e.getTextDecoration())[t]?e.removeTextDecoration(t):e.applyTextDecoration(t)})),applyTextDecoration:cf((({commands:e},t)=>{e.setMark(this.name,{[t]:!0})})),removeTextDecoration:cf((({commands:e},t)=>{const n={...Pt(e.getTextDecoration()),[t]:!1};!n.underline&&!n.strike_through?e.unsetMark(this.name):e.setMark(this.name,n)}))}},addKeyboardShortcuts:()=>({"Mod-u":df("toggleUnderline"),"Mod-U":df("toggleUnderline")}),parseHTML(){const e=e=>{const t=e.includes("underline"),n=e.includes("line-through");return!(!t&&!n)&&{underline:t,strike_through:n}};return[{style:"--zw-text-decoration",getAttrs:e},{style:"text-decoration-line",getAttrs:e},{style:"text-decoration",getAttrs:e},{tag:"s",attrs:{underline:!1,strike_through:!0}},{tag:"u",attrs:{underline:!0,strike_through:!1}}]},renderHTML({HTMLAttributes:e}){const t=[];return e.underline&&t.push("underline"),e.strike_through&&t.push("line-through"),pf({text_decoration:t.join(" ")})}}),nm=Ap.create({name:"case_style",addCommands:()=>({applyCaseStyle:cf((({commands:e},t)=>{switch(t){case If.CAPITALIZE:return e.applyCapitalize();case If.LOWERCASE:return e.applyLowerCase();case If.UPPERCASE:return e.applyUpperCase()}})),applyCapitalize:cf((({commands:e})=>{e.transformText((({text:e})=>function(e){return e.toLowerCase().replace(/(?:^|\s)\S/g,(e=>e.toUpperCase()))}(e)))})),applyLowerCase:cf((({commands:e})=>{e.transformText((({text:e})=>e.toLowerCase()))})),applyUpperCase:cf((({commands:e})=>{e.transformText((({text:e})=>e.toUpperCase()))}))})}),rm={mobile:null,tablet:null,desktop:null},om=Ap.create({name:Pf.ALIGNMENT,addGlobalAttributes:()=>[{types:[Lf.PARAGRAPH,Lf.HEADING],attributes:{[Pf.ALIGNMENT]:{isRequired:!1,parseHTML({style:e}){const t=function(e){const t=Hf[e]||e;return $f.values.includes(t)?t:null}(e.textAlign);if(t)return{desktop:t,tablet:t,mobile:null};const n=e.getPropertyValue("--zw-text-align-tablet")||null,r=e.getPropertyValue("--zw-text-align-desktop")||null;return n||r?{desktop:r,tablet:n,mobile:null}:null},renderHTML:e=>e.alignment?uf({text_align_mobile:e.alignment.mobile,text_align_tablet:e.alignment.tablet,text_align_desktop:e.alignment.desktop}):null}}}],addCommands(){return{applyAlignment:cf((({commands:e},t)=>{e.setBlockAttributes(this.name,{desktop:t,tablet:t,mobile:null},rm)})),getAlignment:cf((({commands:e})=>{const t=e.getBlockAttributes(this.name,rm),n=e.getDevice(),r=e.getDefaultAlignment();return Ht((()=>Pt(t)?.[Pt(n)]??Pt(r)))})),getDefaultAlignment:cf((({commands:e})=>{const t=e.getDevice(),n=e.getPreset();return Ht((()=>Pt(n)[Pt(t)].alignment))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":df("applyAlignment",$f.LEFT),"Mod-Shift-e":df("applyAlignment",$f.CENTER),"Mod-Shift-r":df("applyAlignment",$f.RIGHT),"Mod-Shift-j":df("applyAlignment",$f.JUSTIFY)})}),im={mobile:null,tablet:null,desktop:null},sm=Ap.create({name:Pf.LINE_HEIGHT,addGlobalAttributes(){return[{types:[Lf.PARAGRAPH,Lf.HEADING],attributes:{[Pf.LINE_HEIGHT]:{isRequired:!1,parseHTML:e=>{if(e.matches('[style*="--zw-line-height"]')){return{mobile:null,tablet:e.style.getPropertyValue("--zw-line-height-tablet")||null,desktop:e.style.getPropertyValue("--zw-line-height-desktop")||null}}const t=e.style.lineHeight;if(!t)return null;const n=Ff(t,e,Pt(this.options.wrapperRef));return{desktop:n,tablet:n,mobile:null}},renderHTML:e=>e.line_height?uf({line_height_mobile:e.line_height.mobile,line_height_tablet:e.line_height.tablet,line_height_desktop:e.line_height.desktop}):null}}}]},addCommands(){return{getLineHeight:cf((({commands:e})=>{const t=e.getBlockAttributes(this.name,im),n=e.getDevice(),r=e.getDefaultLineHeight();return Ht((()=>Pt(t)?.[Pt(n)]??Pt(r)))})),getDefaultLineHeight:cf((({commands:e})=>{const t=e.getDevice(),n=e.getPreset();return Ht((()=>Pt(n)[Pt(t)].line_height))})),applyLineHeight:cf((({commands:e},t)=>{e.setBlockAttributes(this.name,{desktop:t,tablet:t,mobile:null},im)}))}}}),am=Zp.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",sp(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}).extend({name:Lf.LIST_ITEM,addKeyboardShortcuts(){const{Enter:e}=this.parent();return{Enter:e}}}),lm=Zp.create({name:Lf.LIST,content:`${Lf.LIST_ITEM}+`,group:"block list",addExtensions:()=>[am],addOptions:()=>({baseClass:""}),addAttributes:()=>({bullet:{default:{type:Bf.DISC}}}),parseHTML(){const e={a:Bf.ROMAN,i:Bf.LATIN,1:Bf.DECIMAL},t=t=>{for(const n of Bf.values){const r=`.${this.options.baseClass}${n}`;if(t.matches(r))return n;if(e[t.type.toLowerCase()]===n)return n}};return[{tag:"ol",getAttrs:e=>({bullet:{type:t(e)||Bf.DECIMAL}})},{tag:"ul",getAttrs:e=>({bullet:{type:t(e)||Bf.DISC}})}]},renderHTML({HTMLAttributes:e}){return[Bf.ordered.includes(e.bullet.type)?"ol":"ul",{class:this.options.baseClass+e.bullet.type},0]},addCommands:()=>({getListType:cf((({commands:e})=>{const t=e.getBlockAttributes("bullet",{type:null});return Ht((()=>Pt(t).type??null))})),applyList:cf((({commands:e,chain:t},n)=>{if(Pt(e.getListType())!==n)return t().applyDefaultPreset()._addList(n).run();e.applyDefaultPreset()})),_addList:cf((({chain:e},t)=>e().toggleList(Lf.LIST,Lf.LIST_ITEM).setBlockAttributes("bullet",{type:t}).run())),removeList:cf((({commands:e})=>{e.liftListItem(Lf.LIST_ITEM)}))}),addInputRules(){const e=(e,t)=>function(e){return new mp({find:e.find,handler:({state:t,range:n,match:r})=>{const o=lp(e.getAttributes,void 0,r)||{},i=t.tr.delete(n.from,n.to),s=i.doc.resolve(n.from).blockRange(),a=s&&ol(s,e.type,o);if(!a)return null;i.wrap(s,a);const l=i.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&al(i.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&i.join(n.from-1)}})}({find:t,type:this.type,getAttributes:{bullet:{type:e}},joinPredicate:(t,{attrs:n})=>n.bullet.type===e});return[e(Bf.DISC,/^\s*([-+*])\s$/),e(Bf.DECIMAL,/^(\d+)\.\s$/),e(Bf.LATIN,/^([ivx]{1,3})\.\s$/i),e(Bf.ROMAN,/^([a-z])\.\s$/i)]}});function cm(e){this.j={},this.jr=[],this.jd=null,this.t=e}cm.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=um();var o=fm(this,e);return o?(Object.assign(r.j,o.j),r.jr.append(o.jr),r.jr=o.jd,r.t=n||o.t):r.t=n,this.j[e]=r,r}};var um=function(){return new cm},pm=function(e){return new cm(e)},dm=function(e,t,n){e.j[t]||(e.j[t]=n)},hm=function(e,t,n){e.jr.push([t,n])},fm=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var o=e.jr[r][0],i=e.jr[r][1];if(o.test(t))return i}return e.jd},mm=function(e,t,n){for(var r=0;r<t.length;r++)dm(e,t[r],n)},gm=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],o=t[n][1];dm(e,r,o)}},vm=function(e,t,n,r){for(var o,i=0,s=t.length;i<s&&(o=e.j[t[i]]);)e=o,i++;if(i>=s)return[];for(;i<s-1;)o=r(),dm(e,t[i],o),e=o,i++;dm(e,t[s-1],n)},ym="DOMAIN",bm="TLD",Dm="NUM",Em="AT",wm="DOT",Cm="SLASH",Am=Object.freeze({__proto__:null,DOMAIN:ym,LOCALHOST:"LOCALHOST",TLD:bm,NUM:Dm,PROTOCOL:"PROTOCOL",MAILTO:"MAILTO",WS:"WS",NL:"NL",OPENBRACE:"OPENBRACE",OPENBRACKET:"OPENBRACKET",OPENANGLEBRACKET:"OPENANGLEBRACKET",OPENPAREN:"OPENPAREN",CLOSEBRACE:"CLOSEBRACE",CLOSEBRACKET:"CLOSEBRACKET",CLOSEANGLEBRACKET:"CLOSEANGLEBRACKET",CLOSEPAREN:"CLOSEPAREN",AMPERSAND:"AMPERSAND",APOSTROPHE:"APOSTROPHE",ASTERISK:"ASTERISK",AT:Em,BACKSLASH:"BACKSLASH",BACKTICK:"BACKTICK",CARET:"CARET",COLON:"COLON",COMMA:"COMMA",DOLLAR:"DOLLAR",DOT:wm,EQUALS:"EQUALS",EXCLAMATION:"EXCLAMATION",HYPHEN:"HYPHEN",PERCENT:"PERCENT",PIPE:"PIPE",PLUS:"PLUS",POUND:"POUND",QUERY:"QUERY",QUOTE:"QUOTE",SEMI:"SEMI",SLASH:Cm,TILDE:"TILDE",UNDERSCORE:"UNDERSCORE",SYM:"SYM"}),xm="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),km=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,_m=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,Om=/\uFE0F/,Sm=/\d/,Nm=/\s/;function Tm(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=um(),n=pm(Dm),r=pm(ym),o=um(),i=pm("WS"),s=[[Sm,r],[km,r],[_m,r],[Om,r]],a=function(){var e=pm(ym);return e.j={"-":o},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};gm(t,[["'",pm("APOSTROPHE")],["{",pm("OPENBRACE")],["[",pm("OPENBRACKET")],["<",pm("OPENANGLEBRACKET")],["(",pm("OPENPAREN")],["}",pm("CLOSEBRACE")],["]",pm("CLOSEBRACKET")],[">",pm("CLOSEANGLEBRACKET")],[")",pm("CLOSEPAREN")],["&",pm("AMPERSAND")],["*",pm("ASTERISK")],["@",pm(Em)],["`",pm("BACKTICK")],["^",pm("CARET")],[":",pm("COLON")],[",",pm("COMMA")],["$",pm("DOLLAR")],[".",pm(wm)],["=",pm("EQUALS")],["!",pm("EXCLAMATION")],["-",pm("HYPHEN")],["%",pm("PERCENT")],["|",pm("PIPE")],["+",pm("PLUS")],["#",pm("POUND")],["?",pm("QUERY")],['"',pm("QUOTE")],["/",pm(Cm)],[";",pm("SEMI")],["~",pm("TILDE")],["_",pm("UNDERSCORE")],["\\",pm("BACKSLASH")]]),dm(t,"\n",pm("NL")),hm(t,Nm,i),dm(i,"\n",um()),hm(i,Nm,i);for(var c=0;c<xm.length;c++)vm(t,xm[c],l(bm),a);var u=a(),p=a(),d=a(),h=a();vm(t,"file",u,a),vm(t,"ftp",p,a),vm(t,"http",d,a),vm(t,"mailto",h,a);var f=a(),m=pm("PROTOCOL"),g=pm("MAILTO");dm(p,"s",f),dm(p,":",m),dm(d,"s",f),dm(d,":",m),dm(u,":",m),dm(f,":",m),dm(h,":",g);for(var v=a(),y=0;y<e.length;y++)vm(t,e[y],v,a);return dm(v,":",m),vm(t,"localhost",l("LOCALHOST"),a),hm(t,Sm,n),hm(t,km,r),hm(t,_m,r),hm(t,Om,r),hm(n,Sm,n),hm(n,km,r),hm(n,_m,r),hm(n,Om,r),dm(n,"-",o),dm(r,"-",o),dm(o,"-",o),hm(r,Sm,r),hm(r,km,r),hm(r,_m,r),hm(r,Om,r),hm(o,Sm,r),hm(o,km,r),hm(o,_m,r),hm(o,Om,r),t.jd=pm("SYM"),t}var Fm={defaultProtocol:"http",events:null,format:Mm,formatHref:Mm,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function Mm(e){return e}function Im(){}function $m(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var o in n)r[o]=n[o];r.constructor=t,t.prototype=r}(Im,n,t),n}Im.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fm.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var Lm=$m("email",{isLink:!0}),Bm=$m("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),Pm=$m("text"),Rm=$m("nl"),jm=$m("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Fm.defaultProtocol,t=this.tk,n=!1,r=!1,o=[],i=0;"PROTOCOL"===t[i].t;)n=!0,o.push(t[i].v),i++;for(;t[i].t===Cm;)r=!0,o.push(t[i].v),i++;for(;i<t.length;i++)o.push(t[i].v);return o=o.join(""),n||r||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return"PROTOCOL"===this.tk[0].t}}),Hm=Object.freeze({__proto__:null,MultiToken:Im,Base:Im,createTokenClass:$m,MailtoEmail:Lm,Email:Bm,Text:Pm,Nl:Rm,Url:jm});function Vm(){var e=um(),t=um(),n=um(),r=um(),o=um(),i=um(),s=um(),a=pm(jm),l=um(),c=pm(jm),u=pm(jm),p=um(),d=um(),h=um(),f=um(),m=um(),g=pm(jm),v=pm(jm),y=pm(jm),b=pm(jm),D=um(),E=um(),w=um(),C=um(),A=um(),x=um(),k=pm(Bm),_=um(),O=pm(Bm),S=pm(Lm),N=um(),T=um(),F=um(),M=um(),I=pm(Rm);dm(e,"NL",I),dm(e,"PROTOCOL",t),dm(e,"MAILTO",n),dm(t,Cm,r),dm(r,Cm,o),dm(e,bm,i),dm(e,ym,i),dm(e,"LOCALHOST",a),dm(e,Dm,i),dm(o,bm,u),dm(o,ym,u),dm(o,Dm,u),dm(o,"LOCALHOST",u),dm(i,wm,s),dm(A,wm,x),dm(s,bm,a),dm(s,ym,i),dm(s,Dm,i),dm(s,"LOCALHOST",i),dm(x,bm,k),dm(x,ym,A),dm(x,Dm,A),dm(x,"LOCALHOST",A),dm(a,wm,s),dm(k,wm,x),dm(a,"COLON",l),dm(a,Cm,u),dm(l,Dm,c),dm(c,Cm,u),dm(k,"COLON",_),dm(_,Dm,O);var $=["AMPERSAND","ASTERISK",Em,"BACKSLASH","BACKTICK","CARET","DOLLAR",ym,"EQUALS","HYPHEN","LOCALHOST",Dm,"PERCENT","PIPE","PLUS","POUND","PROTOCOL",Cm,"SYM","TILDE",bm,"UNDERSCORE"],L=["APOSTROPHE","CLOSEANGLEBRACKET","CLOSEBRACE","CLOSEBRACKET","CLOSEPAREN","COLON","COMMA",wm,"EXCLAMATION","OPENANGLEBRACKET","OPENBRACE","OPENBRACKET","OPENPAREN","QUERY","QUOTE","SEMI"];dm(u,"OPENBRACE",d),dm(u,"OPENBRACKET",h),dm(u,"OPENANGLEBRACKET",f),dm(u,"OPENPAREN",m),dm(p,"OPENBRACE",d),dm(p,"OPENBRACKET",h),dm(p,"OPENANGLEBRACKET",f),dm(p,"OPENPAREN",m),dm(d,"CLOSEBRACE",u),dm(h,"CLOSEBRACKET",u),dm(f,"CLOSEANGLEBRACKET",u),dm(m,"CLOSEPAREN",u),dm(g,"CLOSEBRACE",u),dm(v,"CLOSEBRACKET",u),dm(y,"CLOSEANGLEBRACKET",u),dm(b,"CLOSEPAREN",u),dm(D,"CLOSEBRACE",u),dm(E,"CLOSEBRACKET",u),dm(w,"CLOSEANGLEBRACKET",u),dm(C,"CLOSEPAREN",u),mm(d,$,g),mm(h,$,v),mm(f,$,y),mm(m,$,b),mm(d,L,D),mm(h,L,E),mm(f,L,w),mm(m,L,C),mm(g,$,g),mm(v,$,v),mm(y,$,y),mm(b,$,b),mm(g,L,g),mm(v,L,v),mm(y,L,y),mm(b,L,b),mm(D,$,g),mm(E,$,v),mm(w,$,y),mm(C,$,b),mm(D,L,D),mm(E,L,E),mm(w,L,w),mm(C,L,C),mm(u,$,u),mm(p,$,u),mm(u,L,p),mm(p,L,p),dm(n,bm,S),dm(n,ym,S),dm(n,Dm,S),dm(n,"LOCALHOST",S),mm(S,$,S),mm(S,L,N),mm(N,$,S),mm(N,L,N);var B=["AMPERSAND","APOSTROPHE","ASTERISK","BACKSLASH","BACKTICK","CARET","CLOSEBRACE","DOLLAR",ym,"EQUALS","HYPHEN",Dm,"OPENBRACE","PERCENT","PIPE","PLUS","POUND","QUERY",Cm,"SYM","TILDE",bm,"UNDERSCORE"];return mm(i,B,T),dm(i,Em,F),mm(a,B,T),dm(a,Em,F),mm(s,B,T),mm(T,B,T),dm(T,Em,F),dm(T,wm,M),mm(M,B,T),dm(F,bm,A),dm(F,ym,A),dm(F,Dm,A),dm(F,"LOCALHOST",k),e}function zm(e,t,n){var r=n[0].s,o=n[n.length-1].e;return new e(t.substr(r,o-r),n)}var qm="undefined"!=typeof console&&console&&console.warn||function(){},Wm={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function Km(e){if(Wm.initialized&&qm('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");Wm.customProtocols.push(e)}function Um(e){return Wm.initialized||function(){Wm.scanner={start:Tm(Wm.customProtocols),tokens:Am},Wm.parser={start:Vm(),tokens:Hm};for(var e={createTokenClass:$m},t=0;t<Wm.pluginQueue.length;t++)Wm.pluginQueue[t][1]({scanner:Wm.scanner,parser:Wm.parser,utils:e});Wm.initialized=!0}(),function(e,t,n){for(var r=n.length,o=0,i=[],s=[];o<r;){for(var a=e,l=null,c=null,u=0,p=null,d=-1;o<r&&!(l=fm(a,n[o].t));)s.push(n[o++]);for(;o<r&&(c=l||fm(a,n[o].t));)l=null,(a=c).accepts()?(d=0,p=a):d>=0&&d++,o++,u++;if(d<0)for(var h=o-u;h<o;h++)s.push(n[h]);else{s.length>0&&(i.push(zm(Pm,t,s)),s=[]),o-=d,u-=d;var f=p.t,m=n.slice(o-u,o);i.push(zm(f,t,m))}}return s.length>0&&i.push(zm(Pm,t,s)),i}(Wm.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var o=e.charCodeAt(r),i=void 0,s=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,o=[],i=0,s=0;s<r;){for(var a=e,l=null,c=0,u=null,p=-1,d=-1;s<r&&(l=fm(a,n[s]));)(a=l).accepts()?(p=0,d=0,u=a):p>=0&&(p+=n[s].length,d++),c+=n[s].length,i+=n[s].length,s++;i-=p,s-=d,c-=p,o.push({t:u.t,v:t.substr(i-c,c),s:i-c,e:i})}return o}(Wm.scanner.start,e))}function Jm(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Um(e),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||t&&i.t!==t||r.push(i.toObject())}return r}function Gm(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Um(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function Ym(e){return new Bl({key:new jl("autolink"),appendTransaction:(t,n,r)=>{const o=t.some((e=>e.docChanged))&&!n.doc.eq(r.doc),i=t.some((e=>e.getMeta("preventAutolink")));if(!o||i)return;const{tr:s}=r,a=function(e,t){const n=new Dl(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),{mapping:l}=a,c=function(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,o)=>{const i=[];if(e.ranges.length)e.forEach(((e,t)=>{i.push({from:e,to:t})}));else{const{from:e,to:t}=n[o];if(void 0===e||void 0===t)return;i.push({from:e,to:t})}i.forEach((({from:e,to:n})=>{const i=t.slice(o).map(e,-1),s=t.slice(o).map(n),a=t.invert().map(i,-1),l=t.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,to:s}})}))})),Gp(r)}(a);return c.forEach((({oldRange:t,newRange:o})=>{Yp(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const o=Yp(l.map(t.from),l.map(t.to),r.doc).filter((t=>t.mark.type===e.type));if(!o.length)return;const i=o[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=r.doc.textBetween(i.from,i.to,void 0," "),u=Gm(a),p=Gm(c);u&&!p&&s.removeMark(i.from,i.to,e.type)})),function(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}(r.doc,o,(e=>e.isTextblock)).forEach((t=>{Jm(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:t.pos+e.start+1,to:t.pos+e.end+1}))).filter((e=>{const t=o.from>=e.from&&o.from<=e.to,n=o.to>=e.from&&o.to<=e.to;return t||n})).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),s.steps.length?s:void 0}})}const Xm=Qp.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(Km)},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",sp(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[ed({find:e=>Jm(e).filter((e=>!this.options.validate||this.options.validate(e.value))).filter((e=>e.isLink)).map((e=>({text:e.value,index:e.start,data:e}))),type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(Ym({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new Bl({key:new jl("handleClickLink"),props:{handleClick:(e,n,r)=>{var o;const i=Jp(e.state,t.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href||(window.open(i.href,i.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new Bl({key:new jl("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:o}=t,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach((e=>{a+=e.textContent}));const l=Jm(a).find((e=>e.isLink&&e.value===a));return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),Qm=Xm.extend({name:"link",addOptions(){return{...this.parent?.(),openOnClick:!1}},addAttributes(){return{href:{default:null,parseHTML:e=>{const t=e.getAttribute("href");return t.startsWith("#")?parseFloat(e.getAttribute("href").replace("#","")):t}},target:{default:Rf.SELF,parseHTML:e=>e.getAttribute("target")||Rf.SELF},destination:{default:jf.URL,parseHTML:e=>{const t=e.getAttribute("href");if(!t.startsWith("#"))return jf.URL;const n=t.replace("#","");return Pt(this.options.pageBlocks).find((e=>e.id===parseInt(n)))?jf.BLOCK:jf.URL}}}},addCommands(){return{...this.parent?.(),applyLink:cf((({commands:e,chain:t},n)=>e.getSelectedText()?t().setMark(this.name,n).transformText((()=>n.text)).extendMarkRange("link").run():e.insertContent({type:"text",marks:[{type:"link",attrs:{...n}}],text:n.text})))}},renderHTML({HTMLAttributes:e}){const t=e.destination===jf.BLOCK?`#${e.href}`:e.href,n=`${this.options.basePresetClass+this.options.preset.id} zw-style`;return["a",{href:t,target:e.target,class:n},0]}}),Zm=Qp.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],renderHTML({HTMLAttributes:e}){return["sup",sp(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),eg=Zm.extend({addKeyboardShortcuts:null,addOptions:()=>({HTMLAttributes:{class:"zw-superscript"}})}),tg=Zp.create({name:"doc",topNode:!0,content:"block+"}),ng=Zp.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",sp(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),rg=Zp.create({name:"text",group:"inline"}),og=Ap.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new Bl({props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];return n?(e.descendants(((e,t)=>{const n=r>=t&&r<=t+e.nodeSize,i=!e.isLeaf&&!e.childCount;if((n||!this.options.showOnlyCurrent)&&i){const r=[this.options.emptyNodeClass];this.editor.isEmpty&&r.push(this.options.emptyEditorClass);const i=gu.node(t,t+e.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder});o.push(i)}return this.options.includeChildren})),bu.create(e,o)):null}}})]}});var ig=function(){};ig.prototype.append=function(e){return e.length?(e=ig.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},ig.prototype.prepend=function(e){return e.length?ig.from(e).append(this):this},ig.prototype.appendInner=function(e){return new ag(this,e)},ig.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?ig.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},ig.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},ig.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},ig.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},ig.from=function(e){return e instanceof ig?e:e&&e.length?new sg(e):ig.empty};var sg=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(ig);ig.empty=new sg([]);var ag=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(ig),lg=ig;class cg{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new ug(e.map));let t,o=e.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new ug(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(i=n?e.selection.map(n.slice(r)):e.selection,s=new cg(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new ug(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?o.pop():s=s.slice(0,s.length-1)),o.push(u),t&&(i++,t=void 0),r||(a=u)}let l=i-n.depth;return l>dg&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),i-=l),new cg(s.append(o),i)}remapping(e,t){let n=new Ka;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new cg(this.items.append(e.map((e=>new ug(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(a+1,r));c&&s++,n.push(new ug(l,i,c))}else n.push(new ug(l))}),r);let l=[];for(let e=t;e<i;e++)l.push(new ug(o.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new cg(c,s);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach(((i,s)=>{if(s>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=i.selection&&i.selection.map(t.slice(n));a&&o++;let l,c=new ug(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new cg(lg.from(r.reverse()),o)}}cg.empty=new cg(lg.empty,0);class ug{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new ug(t.getMap().invert(),t,this.selection)}}}class pg{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const dg=20;function hg(e){let t=[];return e.forEach(((e,n,r,o)=>t.push(r,o))),t}function fg(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function mg(e,t,n,r){let o=yg(t),i=bg.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,o);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,o),c=new pg(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(bg,{redo:r,historyState:c}).scrollIntoView())}let gg=!1,vg=null;function yg(e){let t=e.plugins;if(vg!=t){gg=!1,vg=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){gg=!0;break}}return gg}const bg=new jl("history"),Dg=new jl("closeHistory");function Eg(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Bl({key:bg,state:{init:()=>new pg(cg.empty,cg.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let o,i=n.getMeta(bg);if(i)return i.historyState;n.getMeta(Dg)&&(e=new pg(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(bg))return s.getMeta(bg).redo?new pg(e.done.addTransform(n,void 0,r,yg(t)),e.undone,hg(n.mapping.maps[n.steps.length-1]),e.prevTime):new pg(e.done,e.undone.addTransform(n,void 0,r,yg(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new pg(e.done.rebased(n,o),e.undone.rebased(n,o),fg(e.prevRanges,n.mapping),e.prevTime):new pg(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),fg(e.prevRanges,n.mapping),e.prevTime);{let o=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),i=s?fg(e.prevRanges,n.mapping):hg(n.mapping.maps[n.steps.length-1]);return new pg(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,yg(t)),cg.empty,i,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?wg:"historyRedo"==n?Cg:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const wg=(e,t)=>{let n=bg.getState(e);return!(!n||0==n.done.eventCount)&&(t&&mg(n,e,t,!1),!0)},Cg=(e,t)=>{let n=bg.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&mg(n,e,t,!0),!0)},Ag=Ap.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>wg(e,t),redo:()=>({state:e,dispatch:t})=>Cg(e,t)}),addProseMirrorPlugins(){return[Eg(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),xg=Ap.create({name:"node_processor",addCommands:()=>({setBlockAttributes:cf((({commands:e},t,n,r={})=>{const o=Pt(e.getBlockAttributes(t))??{};for(const i of Lf.blocks)e.updateAttributes(i,{[t]:{...r,...o,...n}})})),getBlockAttributes:cf((({editor:e},t,n)=>Ht((()=>{let r=Object.assign({},n||{});for(const n of Lf.blocks)Object.assign(r,e.getAttributes(n)?.[t]||{});return Object.keys(r).length?r:null}))))})}),kg=Ap.create({name:"text_processor",addCommands:()=>({getSelectedText:cf((({state:e})=>{const{from:t,to:n}=e.selection;return e.doc.textBetween(t,n," ")})),unsetMarks:cf((({commands:e},t)=>{t.forEach((t=>e.unsetMark(t)))})),transformText:cf((({state:e},t)=>{const{selection:n}=e.tr;n.from!==n.to&&e.doc.nodesBetween(n.from,n.to,((r,o)=>{if(!r.isText)return;const i=Math.max(o,n.from),s=Math.min(o+r.nodeSize,n.to),a=Math.max(0,n.from-o),l=Math.max(0,n.to-o),c=t({text:r.textContent.substring(a,l),position:{start:i,end:s}}),u=e.schema.text(c,r.marks);e.tr.replaceWith(i,s,u)}))}))})}),_g=Ap.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:cf((({state:e})=>{this.storage.selection=e.selection})),restoreSelection:cf((({commands:e})=>{e.setTextSelection(this.storage.selection)})),expandSelectionToBlock:cf((({state:e,commands:t})=>{let n=e.selection.from,r=e.selection.to;e.doc.nodesBetween(n,r,((e,t,o)=>{o.type.name===Lf.DOCUMENT&&(n=Math.min(n,t+1),r=Math.max(r,t+e.nodeSize-1))})),t.setTextSelection({from:n,to:r})}))}}});class Og extends class{static create(e){const t=new this(e||{});return new Bl({key:new jl(this.name),props:t.buildProps()})}constructor(e){this.options=e}buildProps(){return{}}}{buildProps(){return{transformPastedHTML:this._transformPastedHTML.bind(this),handlePaste:this._handlePaste.bind(this)}}_transformPastedHTML(e){const t=Wf.build(e);return t.normalizeHTML(),this._removeDeprecatedStyles(t),t.normalizedHTML}_removeDeprecatedStyles(e){const t=e.dom.querySelectorAll('[style*="margin"]');for(const e of Array.from(t))e.style.removeProperty("margin"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-right"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("margin-left")}_handlePaste(e,t,n){const r=this._insertPastedContent(e,n).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");return e.dispatch(r),!0}_insertPastedContent({state:e,input:t},n){return this._isFullBlockSelected(e)?e.tr.replaceSelectionWith(n.content,t.shiftKey):e.tr.replaceSelection(n)}_isFullBlockSelected(e){const t=this._expandSelectionToBlocks(e),n=this._isMatchPosition(t.from,e.selection.from),r=this._isMatchPosition(t.to,e.selection.to);return n&&r}_expandSelectionToBlocks({selection:e,doc:t}){let n=e.from,r=e.to;return t.nodesBetween(n,r,((e,t,o)=>{o.type.name===Lf.DOCUMENT&&(n=Math.min(n,t+1),r=Math.max(r,t+e.nodeSize-1))})),{from:n,to:r}}_isMatchPosition(e,t){return Math.abs(e-t)<5}}const Sg=Ap.create({name:"copy_paste_processor",addProseMirrorPlugins:()=>[Og.create()]}),Ng=Ap.create({name:Pf.MARGIN,addGlobalAttributes:()=>[{types:[Lf.PARAGRAPH,Lf.HEADING],attributes:{[Pf.MARGIN]:{isRequired:!1,parseHTML(e){const{margin:t,marginTop:n,marginRight:r,marginBottom:o,marginLeft:i}=e.style;if(![t,n,r,o,i].some((e=>!!e)))return null;if(t)return{value:t};return{value:[n||0,r||0,o||0,i||0].join(" ")}},renderHTML:e=>e.margin?uf({margin:e.margin.value}):null}}}]});function Tg(e){const t=t=>e.presetsRef.value.find((e=>e.id===t)),n=t(e.defaultPresetId),r=t(e.linkPresetId);return[tg,ng.configure({HTMLAttributes:{class:"zw-style"}}),og.configure({placeholder:"Type your text here...",emptyNodeClass:"zw-wysiwyg__placeholder"}),rg,Ag,xg,kg,_g,Sg].concat([Jf.configure({presets:e.presetsRef,defaultId:e.defaultPresetId,baseClass:e.basePresetClass,makeVariable:e.makePresetVariable}),lm.configure({baseClass:e.baseListClass}),Zf.configure({device:e.deviceRef}),Yf.configure({minSize:e.minFontSize,maxSize:e.maxFontSize,wrapperRef:e.wrapperRef}),Vf.configure({fonts:e.fonts,defaultFont:n.common.font_family}),Gf,Xf,Qf,em,tm,nm,eg,om,sm.configure({wrapperRef:e.wrapperRef}),Qm.configure({preset:r,basePresetClass:e.basePresetClass,pageBlocks:e.pageBlocksRef}),Ng])}class Fg{types;parse(e){const{window:t}=new i.JSDOM(e);return this.types=t,t.document}}class Mg{static build(e){const t=function(e){return pp(Ep.resolve(e))}(Tg({fonts:e.fonts,minFontSize:0,maxFontSize:0,presetsRef:Bt(e.presets),defaultPresetId:e.defaultPresetId,linkPresetId:e.linkPresetId,makePresetVariable:()=>"",basePresetClass:e.basePresetClass,baseListClass:e.baseListClass,deviceRef:Bt(Mf.DESKTOP),pageBlocksRef:Bt([]),wrapperRef:i.JSDOM.fragment("<p></p>").firstElementChild}));return new Mg({schema:t,domParser:Oa.fromSchema(t)})}#t;#e;constructor({schema:e,domParser:t}){this.#t=e,this.#e=t}toJSON(e){const t=Wf.build(e,{parser:new Fg});return t.normalizeHTML(),this.#e.parse(t.dom.body)}}const Ig=new G;Ig.command("to-json").argument("<html>").option("--config <path>","generator config",e.resolve(__dirname,"../bin/zp.config.json")).action(((t,{config:n})=>{const r=e.resolve(process.cwd(),n),o=Mg.build(require(r).editor),i=(s=o.toJSON(t),JSON.stringify(s,((e,t)=>null===t?void 0:t),2).replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm,(e=>e.replace(/"/g,""))).replace(/: "(.+)"([,\n])/g,": '$1'$2"));var s;console.log(i)})),Ig.parse();
6
+ */var Z=Object.freeze({}),ee=Array.isArray;function te(e){return null==e}function ne(e){return null!=e}function re(e){return!0===e}function oe(e){return"string"==typeof e||"number"==typeof e||"symbol"==typeof e||"boolean"==typeof e}function ie(e){return"function"==typeof e}function se(e){return null!==e&&"object"==typeof e}var ae=Object.prototype.toString;function le(e){return ae.call(e).slice(8,-1)}function ce(e){return"[object Object]"===ae.call(e)}function ue(e){return"[object RegExp]"===ae.call(e)}function de(e){var t=parseFloat(String(e));return t>=0&&Math.floor(t)===t&&isFinite(e)}function pe(e){return ne(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function he(e){return null==e?"":Array.isArray(e)||ce(e)&&e.toString===ae?JSON.stringify(e,null,2):String(e)}function fe(e){var t=parseFloat(e);return isNaN(t)?e:t}function me(e,t){for(var n=Object.create(null),r=e.split(","),o=0;o<r.length;o++)n[r[o]]=!0;return t?function(e){return n[e.toLowerCase()]}:function(e){return n[e]}}var ge=me("slot,component",!0),ve=me("key,ref,slot,slot-scope,is");function ye(e,t){if(e.length){var n=e.indexOf(t);if(n>-1)return e.splice(n,1)}}var be=Object.prototype.hasOwnProperty;function De(e,t){return be.call(e,t)}function Ee(e){var t=Object.create(null);return function(n){return t[n]||(t[n]=e(n))}}var Ce=/-(\w)/g,we=Ee((function(e){return e.replace(Ce,(function(e,t){return t?t.toUpperCase():""}))})),Ae=Ee((function(e){return e.charAt(0).toUpperCase()+e.slice(1)})),_e=/\B([A-Z])/g,ke=Ee((function(e){return e.replace(_e,"-$1").toLowerCase()}));var xe=Function.prototype.bind?function(e,t){return e.bind(t)}:function(e,t){function n(n){var r=arguments.length;return r?r>1?e.apply(t,arguments):e.call(t,n):e.call(t)}return n._length=e.length,n};function Oe(e,t){t=t||0;for(var n=e.length-t,r=new Array(n);n--;)r[n]=e[n+t];return r}function Se(e,t){for(var n in t)e[n]=t[n];return e}function Ne(e){for(var t={},n=0;n<e.length;n++)e[n]&&Se(t,e[n]);return t}function Fe(e,t,n){}var Te=function(e,t,n){return!1},Me=function(e){return e};function Ie(e,t){if(e===t)return!0;var n=se(e),r=se(t);if(!n||!r)return!n&&!r&&String(e)===String(t);try{var o=Array.isArray(e),i=Array.isArray(t);if(o&&i)return e.length===t.length&&e.every((function(e,n){return Ie(e,t[n])}));if(e instanceof Date&&t instanceof Date)return e.getTime()===t.getTime();if(o||i)return!1;var s=Object.keys(e),a=Object.keys(t);return s.length===a.length&&s.every((function(n){return Ie(e[n],t[n])}))}catch(e){return!1}}function $e(e,t){for(var n=0;n<e.length;n++)if(Ie(e[n],t))return n;return-1}function Be(e){var t=!1;return function(){t||(t=!0,e.apply(this,arguments))}}function Le(e,t){return e===t?0===e&&1/e!=1/t:e==e||t==t}var Pe=["component","directive","filter"],Re=["beforeCreate","created","beforeMount","mounted","beforeUpdate","updated","beforeDestroy","destroyed","activated","deactivated","errorCaptured","serverPrefetch","renderTracked","renderTriggered"],ze={optionMergeStrategies:Object.create(null),silent:!1,productionTip:"production"!==process.env.NODE_ENV,devtools:"production"!==process.env.NODE_ENV,performance:!1,errorHandler:null,warnHandler:null,ignoredElements:[],keyCodes:Object.create(null),isReservedTag:Te,isReservedAttr:Te,isUnknownElement:Te,getTagNamespace:Fe,parsePlatformTagName:Me,mustUseProp:Te,async:!0,_lifecycleHooks:Re},je=/a-zA-Z\u00B7\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u037D\u037F-\u1FFF\u200C-\u200D\u203F-\u2040\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD/;function He(e){var t=(e+"").charCodeAt(0);return 36===t||95===t}function Ve(e,t,n,r){Object.defineProperty(e,t,{value:n,enumerable:!!r,writable:!0,configurable:!0})}var Ke=new RegExp("[^".concat(je.source,".$_\\d]"));var qe="__proto__"in{},We="undefined"!=typeof window,Ue=We&&window.navigator.userAgent.toLowerCase(),Ge=Ue&&/msie|trident/.test(Ue),Je=Ue&&Ue.indexOf("msie 9.0")>0,Ye=Ue&&Ue.indexOf("edge/")>0;Ue&&Ue.indexOf("android");var Xe=Ue&&/iphone|ipad|ipod|ios/.test(Ue);Ue&&/chrome\/\d+/.test(Ue),Ue&&/phantomjs/.test(Ue);var Qe,Ze=Ue&&Ue.match(/firefox\/(\d+)/),et={}.watch,tt=!1;if(We)try{var nt={};Object.defineProperty(nt,"passive",{get:function(){tt=!0}}),window.addEventListener("test-passive",null,nt)}catch(e){}var rt=function(){return void 0===Qe&&(Qe=!We&&"undefined"!=typeof global&&(global.process&&"server"===global.process.env.VUE_ENV)),Qe},ot=We&&window.__VUE_DEVTOOLS_GLOBAL_HOOK__;function it(e){return"function"==typeof e&&/native code/.test(e.toString())}var st,at="undefined"!=typeof Symbol&&it(Symbol)&&"undefined"!=typeof Reflect&&it(Reflect.ownKeys);st="undefined"!=typeof Set&&it(Set)?Set:function(){function e(){this.set=Object.create(null)}return e.prototype.has=function(e){return!0===this.set[e]},e.prototype.add=function(e){this.set[e]=!0},e.prototype.clear=function(){this.set=Object.create(null)},e}();var lt=null;function ct(e){void 0===e&&(e=null),e||lt&&lt._scope.off(),lt=e,e&&e._scope.on()}var ut=function(){function e(e,t,n,r,o,i,s,a){this.tag=e,this.data=t,this.children=n,this.text=r,this.elm=o,this.ns=void 0,this.context=i,this.fnContext=void 0,this.fnOptions=void 0,this.fnScopeId=void 0,this.key=t&&t.key,this.componentOptions=s,this.componentInstance=void 0,this.parent=void 0,this.raw=!1,this.isStatic=!1,this.isRootInsert=!0,this.isComment=!1,this.isCloned=!1,this.isOnce=!1,this.asyncFactory=a,this.asyncMeta=void 0,this.isAsyncPlaceholder=!1}return Object.defineProperty(e.prototype,"child",{get:function(){return this.componentInstance},enumerable:!1,configurable:!0}),e}(),dt=function(e){void 0===e&&(e="");var t=new ut;return t.text=e,t.isComment=!0,t};function pt(e){return new ut(void 0,void 0,void 0,String(e))}function ht(e){var t=new ut(e.tag,e.data,e.children&&e.children.slice(),e.text,e.elm,e.context,e.componentOptions,e.asyncFactory);return t.ns=e.ns,t.isStatic=e.isStatic,t.key=e.key,t.isComment=e.isComment,t.fnContext=e.fnContext,t.fnOptions=e.fnOptions,t.fnScopeId=e.fnScopeId,t.asyncMeta=e.asyncMeta,t.isCloned=!0,t}var ft=function(){return ft=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},ft.apply(this,arguments)},mt=0,gt=function(){function e(){this.id=mt++,this.subs=[]}return e.prototype.addSub=function(e){this.subs.push(e)},e.prototype.removeSub=function(e){ye(this.subs,e)},e.prototype.depend=function(t){e.target&&(e.target.addDep(this),"production"!==process.env.NODE_ENV&&t&&e.target.onTrack&&e.target.onTrack(ft({effect:e.target},t)))},e.prototype.notify=function(e){var t=this.subs.slice();"production"===process.env.NODE_ENV||ze.async||t.sort((function(e,t){return e.id-t.id}));for(var n=0,r=t.length;n<r;n++){if("production"!==process.env.NODE_ENV&&e){var o=t[n];o.onTrigger&&o.onTrigger(ft({effect:t[n]},e))}t[n].update()}},e}();gt.target=null;var vt=[];function yt(e){vt.push(e),gt.target=e}function bt(){vt.pop(),gt.target=vt[vt.length-1]}var Dt=Array.prototype,Et=Object.create(Dt);["push","pop","shift","unshift","splice","sort","reverse"].forEach((function(e){var t=Dt[e];Ve(Et,e,(function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];var o,i=t.apply(this,n),s=this.__ob__;switch(e){case"push":case"unshift":o=n;break;case"splice":o=n.slice(2)}return o&&s.observeArray(o),"production"!==process.env.NODE_ENV?s.dep.notify({type:"array mutation",target:this,key:e}):s.dep.notify(),i}))}));var Ct=Object.getOwnPropertyNames(Et),wt={},At=!0;function _t(e){At=e}var kt={notify:Fe,depend:Fe,addSub:Fe,removeSub:Fe},xt=function(){function e(e,t,n){if(void 0===t&&(t=!1),void 0===n&&(n=!1),this.value=e,this.shallow=t,this.mock=n,this.dep=n?kt:new gt,this.vmCount=0,Ve(e,"__ob__",this),ee(e)){if(!n)if(qe)e.__proto__=Et;else for(var r=0,o=Ct.length;r<o;r++){Ve(e,s=Ct[r],Et[s])}t||this.observeArray(e)}else{var i=Object.keys(e);for(r=0;r<i.length;r++){var s;St(e,s=i[r],wt,void 0,t,n)}}}return e.prototype.observeArray=function(e){for(var t=0,n=e.length;t<n;t++)Ot(e[t],!1,this.mock)},e}();function Ot(e,t,n){var r;if(!(!se(e)||Bt(e)||e instanceof ut))return De(e,"__ob__")&&e.__ob__ instanceof xt?r=e.__ob__:!At||!n&&rt()||!ee(e)&&!ce(e)||!Object.isExtensible(e)||e.__v_skip||(r=new xt(e,t,n)),r}function St(e,t,n,r,o,i){var s=new gt,a=Object.getOwnPropertyDescriptor(e,t);if(!a||!1!==a.configurable){var l=a&&a.get,c=a&&a.set;l&&!c||n!==wt&&2!==arguments.length||(n=e[t]);var u=!o&&Ot(n,!1,i);return Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){var r=l?l.call(e):n;return gt.target&&("production"!==process.env.NODE_ENV?s.depend({target:e,type:"get",key:t}):s.depend(),u&&(u.dep.depend(),ee(r)&&Tt(r))),Bt(r)&&!o?r.value:r},set:function(a){var d=l?l.call(e):n;if(Le(d,a)){if("production"!==process.env.NODE_ENV&&r&&r(),c)c.call(e,a);else{if(l)return;if(!o&&Bt(d)&&!Bt(a))return void(d.value=a);n=a}u=!o&&Ot(a,!1,i),"production"!==process.env.NODE_ENV?s.notify({type:"set",target:e,key:t,newValue:a,oldValue:d}):s.notify()}}}),s}}function Nt(e,t,n){if("production"!==process.env.NODE_ENV&&(te(e)||oe(e))&&Tr("Cannot set reactive property on undefined, null, or primitive value: ".concat(e)),!It(e)){var r=e.__ob__;return ee(e)&&de(t)?(e.length=Math.max(e.length,t),e.splice(t,1,n),r&&!r.shallow&&r.mock&&Ot(n,!1,!0),n):t in e&&!(t in Object.prototype)?(e[t]=n,n):e._isVue||r&&r.vmCount?("production"!==process.env.NODE_ENV&&Tr("Avoid adding reactive properties to a Vue instance or its root $data at runtime - declare it upfront in the data option."),n):r?(St(r.value,t,n,void 0,r.shallow,r.mock),"production"!==process.env.NODE_ENV?r.dep.notify({type:"add",target:e,key:t,newValue:n,oldValue:void 0}):r.dep.notify(),n):(e[t]=n,n)}"production"!==process.env.NODE_ENV&&Tr('Set operation on key "'.concat(t,'" failed: target is readonly.'))}function Ft(e,t){if("production"!==process.env.NODE_ENV&&(te(e)||oe(e))&&Tr("Cannot delete reactive property on undefined, null, or primitive value: ".concat(e)),ee(e)&&de(t))e.splice(t,1);else{var n=e.__ob__;e._isVue||n&&n.vmCount?"production"!==process.env.NODE_ENV&&Tr("Avoid deleting properties on a Vue instance or its root $data - just set it to null."):It(e)?"production"!==process.env.NODE_ENV&&Tr('Delete operation on key "'.concat(t,'" failed: target is readonly.')):De(e,t)&&(delete e[t],n&&("production"!==process.env.NODE_ENV?n.dep.notify({type:"delete",target:e,key:t}):n.dep.notify()))}}function Tt(e){for(var t=void 0,n=0,r=e.length;n<r;n++)(t=e[n])&&t.__ob__&&t.__ob__.dep.depend(),ee(t)&&Tt(t)}function Mt(e){return function(e,t){if(!It(e)){if("production"!==process.env.NODE_ENV){ee(e)&&Tr("Avoid using Array as root value for ".concat(t?"shallowReactive()":"reactive()"," as it cannot be tracked in watch() or watchEffect(). Use ").concat(t?"shallowRef()":"ref()"," instead. This is a Vue-2-only limitation."));var n=e&&e.__ob__;n&&n.shallow!==t&&Tr("Target is already a ".concat(n.shallow?"":"non-","shallow reactive object, and cannot be converted to ").concat(t?"":"non-","shallow."))}var r=Ot(e,t,rt());"production"===process.env.NODE_ENV||r||((null==e||oe(e))&&Tr("value cannot be made reactive: ".concat(String(e))),("Map"===(o=le(e))||"WeakMap"===o||"Set"===o||"WeakSet"===o)&&Tr("Vue 2 does not support reactive collection types such as Map or Set."))}var o}(e,!0),Ve(e,"__v_isShallow",!0),e}function It(e){return!(!e||!e.__v_isReadonly)}var $t;function Bt(e){return!(!e||!0!==e.__v_isRef)}function Lt(e){return function(e,t){if(Bt(e))return e;var n={};return Ve(n,"__v_isRef",!0),Ve(n,"__v_isShallow",t),Ve(n,"dep",St(n,"value",e,null,t,rt())),n}(e,!1)}function Pt(e){return Bt(e)?e.value:e}function Rt(e,t,n){Object.defineProperty(e,n,{enumerable:!0,configurable:!0,get:function(){var e=t[n];if(Bt(e))return e.value;var r=e&&e.__ob__;return r&&r.dep.depend(),e},set:function(e){var r=t[n];Bt(r)&&!Bt(e)?r.value=e:t[n]=e}})}function zt(e,t,n){var r=e[t];if(Bt(r))return r;var o={get value(){var r=e[t];return void 0===r?n:r},set value(n){e[t]=n}};return Ve(o,"__v_isRef",!0),o}function jt(e,t){var n,r,o=ie(e);o?(n=e,r="production"!==process.env.NODE_ENV?function(){Tr("Write operation failed: computed value is readonly")}:Fe):(n=e.get,r=e.set);var i=rt()?null:new Jn(lt,n,Fe,{lazy:!0});"production"!==process.env.NODE_ENV&&i&&t&&(i.onTrack=t.onTrack,i.onTrigger=t.onTrigger);var s={effect:i,get value(){return i?(i.dirty&&i.evaluate(),gt.target&&("production"!==process.env.NODE_ENV&&gt.target.onTrack&&gt.target.onTrack({effect:gt.target,target:s,type:"get",key:"value"}),i.depend()),i.value):n()},set value(e){r(e)}};return Ve(s,"__v_isRef",!0),Ve(s,"__v_isReadonly",o),s}var Ht=function(){function e(e){void 0===e&&(e=!1),this.active=!0,this.effects=[],this.cleanups=[],!e&&$t&&(this.parent=$t,this.index=($t.scopes||($t.scopes=[])).push(this)-1)}return e.prototype.run=function(e){if(this.active){var t=$t;try{return $t=this,e()}finally{$t=t}}else"production"!==process.env.NODE_ENV&&Tr("cannot run an inactive effect scope.")},e.prototype.on=function(){$t=this},e.prototype.off=function(){$t=this.parent},e.prototype.stop=function(e){if(this.active){var t=void 0,n=void 0;for(t=0,n=this.effects.length;t<n;t++)this.effects[t].teardown();for(t=0,n=this.cleanups.length;t<n;t++)this.cleanups[t]();if(this.scopes)for(t=0,n=this.scopes.length;t<n;t++)this.scopes[t].stop(!0);if(this.parent&&!e){var r=this.parent.scopes.pop();r&&r!==this&&(this.parent.scopes[this.index]=r,r.index=this.index)}this.active=!1}},e}();var Vt=Ee((function(e){var t="&"===e.charAt(0),n="~"===(e=t?e.slice(1):e).charAt(0),r="!"===(e=n?e.slice(1):e).charAt(0);return{name:e=r?e.slice(1):e,once:n,capture:r,passive:t}}));function Kt(e,t){function n(){var e=n.fns;if(!ee(e))return Sn(e,null,arguments,t,"v-on handler");for(var r=e.slice(),o=0;o<r.length;o++)Sn(r[o],null,arguments,t,"v-on handler")}return n.fns=e,n}function qt(e,t,n,r,o,i){var s,a,l,c;for(s in e)a=e[s],l=t[s],c=Vt(s),te(a)?"production"!==process.env.NODE_ENV&&Tr('Invalid handler for event "'.concat(c.name,'": got ')+String(a),i):te(l)?(te(a.fns)&&(a=e[s]=Kt(a,i)),re(c.once)&&(a=e[s]=o(c.name,a,c.capture)),n(c.name,a,c.capture,c.passive,c.params)):a!==l&&(l.fns=a,e[s]=l);for(s in t)te(e[s])&&r((c=Vt(s)).name,t[s],c.capture)}function Wt(e,t,n){var r;e instanceof ut&&(e=e.data.hook||(e.data.hook={}));var o=e[t];function i(){n.apply(this,arguments),ye(r.fns,i)}te(o)?r=Kt([i]):ne(o.fns)&&re(o.merged)?(r=o).fns.push(i):r=Kt([o,i]),r.merged=!0,e[t]=r}function Ut(e,t,n,r,o){if(ne(t)){if(De(t,n))return e[n]=t[n],o||delete t[n],!0;if(De(t,r))return e[n]=t[r],o||delete t[r],!0}return!1}function Gt(e){return oe(e)?[pt(e)]:ee(e)?Yt(e):void 0}function Jt(e){return ne(e)&&ne(e.text)&&!1===e.isComment}function Yt(e,t){var n,r,o,i,s=[];for(n=0;n<e.length;n++)te(r=e[n])||"boolean"==typeof r||(i=s[o=s.length-1],ee(r)?r.length>0&&(Jt((r=Yt(r,"".concat(t||"","_").concat(n)))[0])&&Jt(i)&&(s[o]=pt(i.text+r[0].text),r.shift()),s.push.apply(s,r)):oe(r)?Jt(i)?s[o]=pt(i.text+r):""!==r&&s.push(pt(r)):Jt(r)&&Jt(i)?s[o]=pt(i.text+r.text):(re(e._isVList)&&ne(r.tag)&&te(r.key)&&ne(t)&&(r.key="__vlist".concat(t,"_").concat(n,"__")),s.push(r)));return s}function Xt(e,t){var n,r,o,i,s=null;if(ee(e)||"string"==typeof e)for(s=new Array(e.length),n=0,r=e.length;n<r;n++)s[n]=t(e[n],n);else if("number"==typeof e)for(s=new Array(e),n=0;n<e;n++)s[n]=t(n+1,n);else if(se(e))if(at&&e[Symbol.iterator]){s=[];for(var a=e[Symbol.iterator](),l=a.next();!l.done;)s.push(t(l.value,s.length)),l=a.next()}else for(o=Object.keys(e),s=new Array(o.length),n=0,r=o.length;n<r;n++)i=o[n],s[n]=t(e[i],i,n);return ne(s)||(s=[]),s._isVList=!0,s}function Qt(e,t,n,r){var o,i=this.$scopedSlots[e];i?(n=n||{},r&&("production"===process.env.NODE_ENV||se(r)||Tr("slot v-bind without argument expects an Object",this),n=Se(Se({},r),n)),o=i(n)||(ie(t)?t():t)):o=this.$slots[e]||(ie(t)?t():t);var s=n&&n.slot;return s?this.$createElement("template",{slot:s},o):o}function Zt(e){return qr(this.$options,"filters",e,!0)||Me}function en(e,t){return ee(e)?-1===e.indexOf(t):e!==t}function tn(e,t,n,r,o){var i=ze.keyCodes[t]||n;return o&&r&&!ze.keyCodes[t]?en(o,r):i?en(i,e):r?ke(r)!==t:void 0===e}function nn(e,t,n,r,o){if(n)if(se(n)){ee(n)&&(n=Ne(n));var i=void 0,s=function(s){if("class"===s||"style"===s||ve(s))i=e;else{var a=e.attrs&&e.attrs.type;i=r||ze.mustUseProp(t,a,s)?e.domProps||(e.domProps={}):e.attrs||(e.attrs={})}var l=we(s),c=ke(s);l in i||c in i||(i[s]=n[s],o&&((e.on||(e.on={}))["update:".concat(s)]=function(e){n[s]=e}))};for(var a in n)s(a)}else"production"!==process.env.NODE_ENV&&Tr("v-bind without argument expects an Object or Array value",this);return e}function rn(e,t){var n=this._staticTrees||(this._staticTrees=[]),r=n[e];return r&&!t||sn(r=n[e]=this.$options.staticRenderFns[e].call(this._renderProxy,this._c,this),"__static__".concat(e),!1),r}function on(e,t,n){return sn(e,"__once__".concat(t).concat(n?"_".concat(n):""),!0),e}function sn(e,t,n){if(ee(e))for(var r=0;r<e.length;r++)e[r]&&"string"!=typeof e[r]&&an(e[r],"".concat(t,"_").concat(r),n);else an(e,t,n)}function an(e,t,n){e.isStatic=!0,e.key=t,e.isOnce=n}function ln(e,t){if(t)if(ce(t)){var n=e.on=e.on?Se({},e.on):{};for(var r in t){var o=n[r],i=t[r];n[r]=o?[].concat(o,i):i}}else"production"!==process.env.NODE_ENV&&Tr("v-on without argument expects an Object value",this);return e}function cn(e,t,n,r){t=t||{$stable:!n};for(var o=0;o<e.length;o++){var i=e[o];ee(i)?cn(i,t,n):i&&(i.proxy&&(i.fn.proxy=!0),t[i.key]=i.fn)}return r&&(t.$key=r),t}function un(e,t){for(var n=0;n<t.length;n+=2){var r=t[n];"string"==typeof r&&r?e[t[n]]=t[n+1]:"production"!==process.env.NODE_ENV&&""!==r&&null!==r&&Tr("Invalid value for dynamic directive argument (expected string or null): ".concat(r),this)}return e}function dn(e,t){return"string"==typeof e?t+e:e}function pn(e){e._o=on,e._n=fe,e._s=he,e._l=Xt,e._t=Qt,e._q=Ie,e._i=$e,e._m=rn,e._f=Zt,e._k=tn,e._b=nn,e._v=pt,e._e=dt,e._u=cn,e._g=ln,e._d=un,e._p=dn}function hn(e,t){if(!e||!e.length)return{};for(var n={},r=0,o=e.length;r<o;r++){var i=e[r],s=i.data;if(s&&s.attrs&&s.attrs.slot&&delete s.attrs.slot,i.context!==t&&i.fnContext!==t||!s||null==s.slot)(n.default||(n.default=[])).push(i);else{var a=s.slot,l=n[a]||(n[a]=[]);"template"===i.tag?l.push.apply(l,i.children||[]):l.push(i)}}for(var c in n)n[c].every(fn)&&delete n[c];return n}function fn(e){return e.isComment&&!e.asyncFactory||" "===e.text}function mn(e){return e.isComment&&e.asyncFactory}function gn(e,t,n,r){var o,i=Object.keys(n).length>0,s=t?!!t.$stable:!i,a=t&&t.$key;if(t){if(t._normalized)return t._normalized;if(s&&r&&r!==Z&&a===r.$key&&!i&&!r.$hasNormal)return r;for(var l in o={},t)t[l]&&"$"!==l[0]&&(o[l]=vn(e,n,l,t[l]))}else o={};for(var c in n)c in o||(o[c]=yn(n,c));return t&&Object.isExtensible(t)&&(t._normalized=o),Ve(o,"$stable",s),Ve(o,"$key",a),Ve(o,"$hasNormal",i),o}function vn(e,t,n,r){var o=function(){var t=lt;ct(e);var n=arguments.length?r.apply(null,arguments):r({}),o=(n=n&&"object"==typeof n&&!ee(n)?[n]:Gt(n))&&n[0];return ct(t),n&&(!o||1===n.length&&o.isComment&&!mn(o))?void 0:n};return r.proxy&&Object.defineProperty(t,n,{get:o,enumerable:!0,configurable:!0}),o}function yn(e,t){return function(){return e[t]}}function bn(e){var t=e.$options,n=t.setup;if(n){var r=e._setupContext=function(e){var t=!1;return{get attrs(){if(!e._attrsProxy){var t=e._attrsProxy={};Ve(t,"_v_attr_proxy",!0),Dn(t,e.$attrs,Z,e,"$attrs")}return e._attrsProxy},get listeners(){e._listenersProxy||Dn(e._listenersProxy={},e.$listeners,Z,e,"$listeners");return e._listenersProxy},get slots(){return function(e){e._slotsProxy||Cn(e._slotsProxy={},e.$scopedSlots);return e._slotsProxy}(e)},emit:xe(e.$emit,e),expose:function(n){"production"!==process.env.NODE_ENV&&(t&&Tr("expose() should be called only once per setup().",e),t=!0),n&&Object.keys(n).forEach((function(t){return Rt(e,n,t)}))}}}(e);ct(e),yt();var o=Sn(n,null,[e._props||Mt({}),r],e,"setup");if(bt(),ct(),ie(o))t.render=o;else if(se(o))if("production"!==process.env.NODE_ENV&&o instanceof ut&&Tr("setup() should not return VNodes directly - return a render function instead."),e._setupState=o,o.__sfc){var i=e._setupProxy={};for(var s in o)"__sfc"!==s&&Rt(i,o,s)}else for(var s in o)He(s)?"production"!==process.env.NODE_ENV&&Tr("Avoid using variables that start with _ or $ in setup()."):Rt(e,o,s);else"production"!==process.env.NODE_ENV&&void 0!==o&&Tr("setup() should return an object. Received: ".concat(null===o?"null":typeof o))}}function Dn(e,t,n,r,o){var i=!1;for(var s in t)s in e?t[s]!==n[s]&&(i=!0):(i=!0,En(e,s,r,o));for(var s in e)s in t||(i=!0,delete e[s]);return i}function En(e,t,n,r){Object.defineProperty(e,t,{enumerable:!0,configurable:!0,get:function(){return n[r][t]}})}function Cn(e,t){for(var n in t)e[n]=t[n];for(var n in e)n in t||delete e[n]}var wn=null;function An(e,t){return(e.__esModule||at&&"Module"===e[Symbol.toStringTag])&&(e=e.default),se(e)?t.extend(e):e}function _n(e){if(ee(e))for(var t=0;t<e.length;t++){var n=e[t];if(ne(n)&&(ne(n.componentOptions)||mn(n)))return n}}function kn(e,t,n,r,o,i){return(ee(n)||oe(n))&&(o=r,r=n,n=void 0),re(i)&&(o=2),function(e,t,n,r,o){if(ne(n)&&ne(n.__ob__))return"production"!==process.env.NODE_ENV&&Tr("Avoid using observed data object as vnode data: ".concat(JSON.stringify(n),"\n")+"Always create fresh vnode data objects in each render!",e),dt();ne(n)&&ne(n.is)&&(t=n.is);if(!t)return dt();"production"!==process.env.NODE_ENV&&ne(n)&&ne(n.key)&&!oe(n.key)&&Tr("Avoid using non-primitive value as key, use string/number value instead.",e);ee(r)&&ie(r[0])&&((n=n||{}).scopedSlots={default:r[0]},r.length=0);2===o?r=Gt(r):1===o&&(r=function(e){for(var t=0;t<e.length;t++)if(ee(e[t]))return Array.prototype.concat.apply([],e);return e}(r));var i,s;if("string"==typeof t){var a=void 0;s=e.$vnode&&e.$vnode.ns||ze.getTagNamespace(t),ze.isReservedTag(t)?("production"!==process.env.NODE_ENV&&ne(n)&&ne(n.nativeOn)&&"component"!==n.tag&&Tr("The .native modifier for v-on is only valid on components but it was used on <".concat(t,">."),e),i=new ut(ze.parsePlatformTagName(t),n,r,void 0,void 0,e)):i=n&&n.pre||!ne(a=qr(e.$options,"components",t))?new ut(t,n,r,void 0,void 0,e):Or(a,n,e,r,t)}else i=Or(t,n,e,r);return ee(i)?i:ne(i)?(ne(s)&&xn(i,s),ne(n)&&function(e){se(e.style)&&Vn(e.style);se(e.class)&&Vn(e.class)}(n),i):dt()}(e,t,n,r,o)}function xn(e,t,n){if(e.ns=t,"foreignObject"===e.tag&&(t=void 0,n=!0),ne(e.children))for(var r=0,o=e.children.length;r<o;r++){var i=e.children[r];ne(i.tag)&&(te(i.ns)||re(n)&&"svg"!==i.tag)&&xn(i,t,n)}}function On(e,t,n){yt();try{if(t)for(var r=t;r=r.$parent;){var o=r.$options.errorCaptured;if(o)for(var i=0;i<o.length;i++)try{if(!1===o[i].call(r,e,t,n))return}catch(e){Nn(e,r,"errorCaptured hook")}}Nn(e,t,n)}finally{bt()}}function Sn(e,t,n,r,o){var i;try{(i=n?e.apply(t,n):e.call(t))&&!i._isVue&&pe(i)&&!i._handled&&(i.catch((function(e){return On(e,r,o+" (Promise/async)")})),i._handled=!0)}catch(e){On(e,r,o)}return i}function Nn(e,t,n){if(ze.errorHandler)try{return ze.errorHandler.call(null,e,t,n)}catch(t){t!==e&&Fn(t,null,"config.errorHandler")}Fn(e,t,n)}function Fn(e,t,n){if("production"!==process.env.NODE_ENV&&Tr("Error in ".concat(n,': "').concat(e.toString(),'"'),t),!We||"undefined"==typeof console)throw e;console.error(e)}var Tn,Mn=!1,In=[],$n=!1;function Bn(){$n=!1;var e=In.slice(0);In.length=0;for(var t=0;t<e.length;t++)e[t]()}if("undefined"!=typeof Promise&&it(Promise)){var Ln=Promise.resolve();Tn=function(){Ln.then(Bn),Xe&&setTimeout(Fe)},Mn=!0}else if(Ge||"undefined"==typeof MutationObserver||!it(MutationObserver)&&"[object MutationObserverConstructor]"!==MutationObserver.toString())Tn="undefined"!=typeof setImmediate&&it(setImmediate)?function(){setImmediate(Bn)}:function(){setTimeout(Bn,0)};else{var Pn=1,Rn=new MutationObserver(Bn),zn=document.createTextNode(String(Pn));Rn.observe(zn,{characterData:!0}),Tn=function(){Pn=(Pn+1)%2,zn.data=String(Pn)},Mn=!0}function jn(e,t){var n;if(In.push((function(){if(e)try{e.call(t)}catch(e){On(e,t,"nextTick")}else n&&n(t)})),$n||($n=!0,Tn()),!e&&"undefined"!=typeof Promise)return new Promise((function(e){n=e}))}var Hn=new st;function Vn(e){return Kn(e,Hn),Hn.clear(),e}function Kn(e,t){var n,r,o=ee(e);if(!(!o&&!se(e)||Object.isFrozen(e)||e instanceof ut)){if(e.__ob__){var i=e.__ob__.dep.id;if(t.has(i))return;t.add(i)}if(o)for(n=e.length;n--;)Kn(e[n],t);else if(Bt(e))Kn(e.value,t);else for(n=(r=Object.keys(e)).length;n--;)Kn(e[r[n]],t)}}var qn,Wn,Un,Gn=0,Jn=function(){function e(e,t,n,r,o){var i,s;i=this,void 0===(s=$t&&!$t._vm?$t:e?e._scope:void 0)&&(s=$t),s&&s.active&&s.effects.push(i),(this.vm=e)&&o&&(e._watcher=this),r?(this.deep=!!r.deep,this.user=!!r.user,this.lazy=!!r.lazy,this.sync=!!r.sync,this.before=r.before,"production"!==process.env.NODE_ENV&&(this.onTrack=r.onTrack,this.onTrigger=r.onTrigger)):this.deep=this.user=this.lazy=this.sync=!1,this.cb=n,this.id=++Gn,this.active=!0,this.post=!1,this.dirty=this.lazy,this.deps=[],this.newDeps=[],this.depIds=new st,this.newDepIds=new st,this.expression="production"!==process.env.NODE_ENV?t.toString():"",ie(t)?this.getter=t:(this.getter=function(e){if(!Ke.test(e)){var t=e.split(".");return function(e){for(var n=0;n<t.length;n++){if(!e)return;e=e[t[n]]}return e}}}(t),this.getter||(this.getter=Fe,"production"!==process.env.NODE_ENV&&Tr('Failed watching path: "'.concat(t,'" ')+"Watcher only accepts simple dot-delimited paths. For full control, use a function instead.",e))),this.value=this.lazy?void 0:this.get()}return e.prototype.get=function(){var e;yt(this);var t=this.vm;try{e=this.getter.call(t,t)}catch(e){if(!this.user)throw e;On(e,t,'getter for watcher "'.concat(this.expression,'"'))}finally{this.deep&&Vn(e),bt(),this.cleanupDeps()}return e},e.prototype.addDep=function(e){var t=e.id;this.newDepIds.has(t)||(this.newDepIds.add(t),this.newDeps.push(e),this.depIds.has(t)||e.addSub(this))},e.prototype.cleanupDeps=function(){for(var e=this.deps.length;e--;){var t=this.deps[e];this.newDepIds.has(t.id)||t.removeSub(this)}var n=this.depIds;this.depIds=this.newDepIds,this.newDepIds=n,this.newDepIds.clear(),n=this.deps,this.deps=this.newDeps,this.newDeps=n,this.newDeps.length=0},e.prototype.update=function(){this.lazy?this.dirty=!0:this.sync?this.run():function(e){var t=e.id;if(null!=ur[t])return;if(e===gt.target&&e.noRecurse)return;if(ur[t]=!0,hr){for(var n=lr.length-1;n>fr&&lr[n].id>e.id;)n--;lr.splice(n+1,0,e)}else lr.push(e);if(!pr){if(pr=!0,"production"!==process.env.NODE_ENV&&!ze.async)return void br();jn(br)}}(this)},e.prototype.run=function(){if(this.active){var e=this.get();if(e!==this.value||se(e)||this.deep){var t=this.value;if(this.value=e,this.user){var n='callback for watcher "'.concat(this.expression,'"');Sn(this.cb,this.vm,[e,t],this.vm,n)}else this.cb.call(this.vm,e,t)}}},e.prototype.evaluate=function(){this.value=this.get(),this.dirty=!1},e.prototype.depend=function(){for(var e=this.deps.length;e--;)this.deps[e].depend()},e.prototype.teardown=function(){if(this.vm&&!this.vm._isBeingDestroyed&&ye(this.vm._scope.effects,this),this.active){for(var e=this.deps.length;e--;)this.deps[e].removeSub(this);this.active=!1,this.onStop&&this.onStop()}},e}();if("production"!==process.env.NODE_ENV){var Yn=We&&window.performance;Yn&&Yn.mark&&Yn.measure&&Yn.clearMarks&&Yn.clearMeasures&&(qn=function(e){return Yn.mark(e)},Wn=function(e,t,n){Yn.measure(e,t,n),Yn.clearMarks(t),Yn.clearMarks(n)})}function Xn(e,t){Un.$on(e,t)}function Qn(e,t){Un.$off(e,t)}function Zn(e,t){var n=Un;return function r(){var o=t.apply(null,arguments);null!==o&&n.$off(e,r)}}function er(e,t,n){Un=e,qt(t,n||{},Xn,Qn,Zn,e),Un=void 0}var tr=null,nr=!1;function rr(e){var t=tr;return tr=e,function(){tr=t}}function or(e){for(;e&&(e=e.$parent);)if(e._inactive)return!0;return!1}function ir(e,t){if(t){if(e._directInactive=!1,or(e))return}else if(e._directInactive)return;if(e._inactive||null===e._inactive){e._inactive=!1;for(var n=0;n<e.$children.length;n++)ir(e.$children[n]);ar(e,"activated")}}function sr(e,t){if(!(t&&(e._directInactive=!0,or(e))||e._inactive)){e._inactive=!0;for(var n=0;n<e.$children.length;n++)sr(e.$children[n]);ar(e,"deactivated")}}function ar(e,t,n,r){void 0===r&&(r=!0),yt();var o=lt;r&&ct(e);var i=e.$options[t],s="".concat(t," hook");if(i)for(var a=0,l=i.length;a<l;a++)Sn(i[a],e,n||null,e,s);e._hasHookEvent&&e.$emit("hook:"+t),r&&ct(o),bt()}var lr=[],cr=[],ur={},dr={},pr=!1,hr=!1,fr=0;var mr=0,gr=Date.now;if(We&&!Ge){var vr=window.performance;vr&&"function"==typeof vr.now&&gr()>document.createEvent("Event").timeStamp&&(gr=function(){return vr.now()})}var yr=function(e,t){if(e.post){if(!t.post)return 1}else if(t.post)return-1;return e.id-t.id};function br(){var e,t;for(mr=gr(),hr=!0,lr.sort(yr),fr=0;fr<lr.length;fr++)if((e=lr[fr]).before&&e.before(),t=e.id,ur[t]=null,e.run(),"production"!==process.env.NODE_ENV&&null!=ur[t]&&(dr[t]=(dr[t]||0)+1,dr[t]>100)){Tr("You may have an infinite update loop "+(e.user?'in watcher with expression "'.concat(e.expression,'"'):"in a component render function."),e.vm);break}var n=cr.slice(),r=lr.slice();fr=lr.length=cr.length=0,ur={},"production"!==process.env.NODE_ENV&&(dr={}),pr=hr=!1,function(e){for(var t=0;t<e.length;t++)e[t]._inactive=!0,ir(e[t],!0)}(n),function(e){var t=e.length;for(;t--;){var n=e[t],r=n.vm;r&&r._watcher===n&&r._isMounted&&!r._isDestroyed&&ar(r,"updated")}}(r),ot&&ze.devtools&&ot.emit("flush")}function Dr(e){var t=e.$options.provide;if(t){var n=ie(t)?t.call(e):t;if(!se(n))return;for(var r=function(e){var t=e._provided,n=e.$parent&&e.$parent._provided;return n===t?e._provided=Object.create(n):t}(e),o=at?Reflect.ownKeys(n):Object.keys(n),i=0;i<o.length;i++){var s=o[i];Object.defineProperty(r,s,Object.getOwnPropertyDescriptor(n,s))}}}function Er(e,t){if(e){for(var n=Object.create(null),r=at?Reflect.ownKeys(e):Object.keys(e),o=0;o<r.length;o++){var i=r[o];if("__ob__"!==i){var s=e[i].from;if(s in t._provided)n[i]=t._provided[s];else if("default"in e[i]){var a=e[i].default;n[i]=ie(a)?a.call(t):a}else"production"!==process.env.NODE_ENV&&Tr('Injection "'.concat(i,'" not found'),t)}}return n}}function Cr(e,t,n,r,o){var i,s=this,a=o.options;De(r,"_uid")?(i=Object.create(r))._original=r:(i=r,r=r._original);var l=re(a._compiled),c=!l;this.data=e,this.props=t,this.children=n,this.parent=r,this.listeners=e.on||Z,this.injections=Er(a.inject,r),this.slots=function(){return s.$slots||gn(r,e.scopedSlots,s.$slots=hn(n,r)),s.$slots},Object.defineProperty(this,"scopedSlots",{enumerable:!0,get:function(){return gn(r,e.scopedSlots,this.slots())}}),l&&(this.$options=a,this.$slots=this.slots(),this.$scopedSlots=gn(r,e.scopedSlots,this.$slots)),a._scopeId?this._c=function(e,t,n,o){var s=kn(i,e,t,n,o,c);return s&&!ee(s)&&(s.fnScopeId=a._scopeId,s.fnContext=r),s}:this._c=function(e,t,n,r){return kn(i,e,t,n,r,c)}}function wr(e,t,n,r,o){var i=ht(e);return i.fnContext=n,i.fnOptions=r,"production"!==process.env.NODE_ENV&&((i.devtoolsMeta=i.devtoolsMeta||{}).renderContext=o),t.slot&&((i.data||(i.data={})).slot=t.slot),i}function Ar(e,t){for(var n in t)e[we(n)]=t[n]}function _r(e){return e.name||e.__name||e._componentTag}pn(Cr.prototype);var kr={init:function(e,t){if(e.componentInstance&&!e.componentInstance._isDestroyed&&e.data.keepAlive){var n=e;kr.prepatch(n,n)}else{(e.componentInstance=function(e,t){var n={_isComponent:!0,_parentVnode:e,parent:t},r=e.data.inlineTemplate;ne(r)&&(n.render=r.render,n.staticRenderFns=r.staticRenderFns);return new e.componentOptions.Ctor(n)}(e,tr)).$mount(t?e.elm:void 0,t)}},prepatch:function(e,t){var n=t.componentOptions;!function(e,t,n,r,o){"production"!==process.env.NODE_ENV&&(nr=!0);var i=r.data.scopedSlots,s=e.$scopedSlots,a=!!(i&&!i.$stable||s!==Z&&!s.$stable||i&&e.$scopedSlots.$key!==i.$key||!i&&e.$scopedSlots.$key),l=!!(o||e.$options._renderChildren||a),c=e.$vnode;e.$options._parentVnode=r,e.$vnode=r,e._vnode&&(e._vnode.parent=r),e.$options._renderChildren=o;var u=r.data.attrs||Z;e._attrsProxy&&Dn(e._attrsProxy,u,c.data&&c.data.attrs||Z,e,"$attrs")&&(l=!0),e.$attrs=u,n=n||Z;var d=e.$options._parentListeners;if(e._listenersProxy&&Dn(e._listenersProxy,n,d||Z,e,"$listeners"),e.$listeners=e.$options._parentListeners=n,er(e,n,d),t&&e.$options.props){_t(!1);for(var p=e._props,h=e.$options._propKeys||[],f=0;f<h.length;f++){var m=h[f],g=e.$options.props;p[m]=Wr(m,g,t,e)}_t(!0),e.$options.propsData=t}l&&(e.$slots=hn(o,r.context),e.$forceUpdate()),"production"!==process.env.NODE_ENV&&(nr=!1)}(t.componentInstance=e.componentInstance,n.propsData,n.listeners,t,n.children)},insert:function(e){var t,n=e.context,r=e.componentInstance;r._isMounted||(r._isMounted=!0,ar(r,"mounted")),e.data.keepAlive&&(n._isMounted?((t=r)._inactive=!1,cr.push(t)):ir(r,!0))},destroy:function(e){var t=e.componentInstance;t._isDestroyed||(e.data.keepAlive?sr(t,!0):t.$destroy())}},xr=Object.keys(kr);function Or(e,t,n,r,o){if(!te(e)){var i=n.$options._base;if(se(e)&&(e=i.extend(e)),"function"==typeof e){var s;if(te(e.cid)&&(e=function(e,t){if(re(e.error)&&ne(e.errorComp))return e.errorComp;if(ne(e.resolved))return e.resolved;var n=wn;if(n&&ne(e.owners)&&-1===e.owners.indexOf(n)&&e.owners.push(n),re(e.loading)&&ne(e.loadingComp))return e.loadingComp;if(n&&!ne(e.owners)){var r=e.owners=[n],o=!0,i=null,s=null;n.$on("hook:destroyed",(function(){return ye(r,n)}));var a=function(e){for(var t=0,n=r.length;t<n;t++)r[t].$forceUpdate();e&&(r.length=0,null!==i&&(clearTimeout(i),i=null),null!==s&&(clearTimeout(s),s=null))},l=Be((function(n){e.resolved=An(n,t),o?r.length=0:a(!0)})),c=Be((function(t){"production"!==process.env.NODE_ENV&&Tr("Failed to resolve async component: ".concat(String(e))+(t?"\nReason: ".concat(t):"")),ne(e.errorComp)&&(e.error=!0,a(!0))})),u=e(l,c);return se(u)&&(pe(u)?te(e.resolved)&&u.then(l,c):pe(u.component)&&(u.component.then(l,c),ne(u.error)&&(e.errorComp=An(u.error,t)),ne(u.loading)&&(e.loadingComp=An(u.loading,t),0===u.delay?e.loading=!0:i=setTimeout((function(){i=null,te(e.resolved)&&te(e.error)&&(e.loading=!0,a(!1))}),u.delay||200)),ne(u.timeout)&&(s=setTimeout((function(){s=null,te(e.resolved)&&c("production"!==process.env.NODE_ENV?"timeout (".concat(u.timeout,"ms)"):null)}),u.timeout)))),o=!1,e.loading?e.loadingComp:e.resolved}}(s=e,i),void 0===e))return function(e,t,n,r,o){var i=dt();return i.asyncFactory=e,i.asyncMeta={data:t,context:n,children:r,tag:o},i}(s,t,n,r,o);t=t||{},Do(e),ne(t.model)&&function(e,t){var n=e.model&&e.model.prop||"value",r=e.model&&e.model.event||"input";(t.attrs||(t.attrs={}))[n]=t.model.value;var o=t.on||(t.on={}),i=o[r],s=t.model.callback;ne(i)?(ee(i)?-1===i.indexOf(s):i!==s)&&(o[r]=[s].concat(i)):o[r]=s}(e.options,t);var a=function(e,t,n){var r=t.options.props;if(!te(r)){var o={},i=e.attrs,s=e.props;if(ne(i)||ne(s))for(var a in r){var l=ke(a);if("production"!==process.env.NODE_ENV){var c=a.toLowerCase();a!==c&&i&&De(i,c)&&Mr('Prop "'.concat(c,'" is passed to component ')+"".concat(Fr(n||t),", but the declared prop name is")+' "'.concat(a,'". ')+"Note that HTML attributes are case-insensitive and camelCased props need to use their kebab-case equivalents when using in-DOM "+'templates. You should probably use "'.concat(l,'" instead of "').concat(a,'".'))}Ut(o,s,a,l,!0)||Ut(o,i,a,l,!1)}return o}}(t,e,o);if(re(e.options.functional))return function(e,t,n,r,o){var i=e.options,s={},a=i.props;if(ne(a))for(var l in a)s[l]=Wr(l,a,t||Z);else ne(n.attrs)&&Ar(s,n.attrs),ne(n.props)&&Ar(s,n.props);var c=new Cr(n,s,o,r,e),u=i.render.call(null,c._c,c);if(u instanceof ut)return wr(u,n,c.parent,i,c);if(ee(u)){for(var d=Gt(u)||[],p=new Array(d.length),h=0;h<d.length;h++)p[h]=wr(d[h],n,c.parent,i,c);return p}}(e,a,t,n,r);var l=t.on;if(t.on=t.nativeOn,re(e.options.abstract)){var c=t.slot;t={},c&&(t.slot=c)}!function(e){for(var t=e.hook||(e.hook={}),n=0;n<xr.length;n++){var r=xr[n],o=t[r],i=kr[r];o===i||o&&o._merged||(t[r]=o?Sr(i,o):i)}}(t);var u=_r(e.options)||o;return new ut("vue-component-".concat(e.cid).concat(u?"-".concat(u):""),t,void 0,void 0,void 0,n,{Ctor:e,propsData:a,listeners:l,tag:o,children:r},s)}"production"!==process.env.NODE_ENV&&Tr("Invalid Component definition: ".concat(String(e)),n)}}function Sr(e,t){var n=function(n,r){e(n,r),t(n,r)};return n._merged=!0,n}var Nr,Fr,Tr=Fe,Mr=Fe;if("production"!==process.env.NODE_ENV){var Ir="undefined"!=typeof console,$r=/(?:^|[-_])(\w)/g;Tr=function(e,t){void 0===t&&(t=lt);var n=t?Nr(t):"";ze.warnHandler?ze.warnHandler.call(null,e,t,n):Ir&&!ze.silent&&console.error("[Vue warn]: ".concat(e).concat(n))},Mr=function(e,t){Ir&&!ze.silent&&console.warn("[Vue tip]: ".concat(e)+(t?Nr(t):""))},Fr=function(e,t){if(e.$root===e)return"<Root>";var n=ie(e)&&null!=e.cid?e.options:e._isVue?e.$options||e.constructor.options:e,r=_r(n),o=n.__file;if(!r&&o){var i=o.match(/([^/\\]+)\.vue$/);r=i&&i[1]}return(r?"<".concat(r.replace($r,(function(e){return e.toUpperCase()})).replace(/[-_]/g,""),">"):"<Anonymous>")+(o&&!1!==t?" at ".concat(o):"")};Nr=function(e){if(e._isVue&&e.$parent){for(var t=[],n=0;e;){if(t.length>0){var r=t[t.length-1];if(r.constructor===e.constructor){n++,e=e.$parent;continue}n>0&&(t[t.length-1]=[r,n],n=0)}t.push(e),e=e.$parent}return"\n\nfound in\n\n"+t.map((function(e,t){return"".concat(0===t?"---\x3e ":function(e,t){for(var n="";t;)t%2==1&&(n+=e),t>1&&(e+=e),t>>=1;return n}(" ",5+2*t)).concat(ee(e)?"".concat(Fr(e[0]),"... (").concat(e[1]," recursive calls)"):Fr(e))})).join("\n")}return"\n\n(found in ".concat(Fr(e),")")}}var Br=ze.optionMergeStrategies;function Lr(e,t){if(!t)return e;for(var n,r,o,i=at?Reflect.ownKeys(t):Object.keys(t),s=0;s<i.length;s++)"__ob__"!==(n=i[s])&&(r=e[n],o=t[n],De(e,n)?r!==o&&ce(r)&&ce(o)&&Lr(r,o):Nt(e,n,o));return e}function Pr(e,t,n){return n?function(){var r=ie(t)?t.call(n,n):t,o=ie(e)?e.call(n,n):e;return r?Lr(r,o):o}:t?e?function(){return Lr(ie(t)?t.call(this,this):t,ie(e)?e.call(this,this):e)}:t:e}function Rr(e,t){var n=t?e?e.concat(t):ee(t)?t:[t]:e;return n?function(e){for(var t=[],n=0;n<e.length;n++)-1===t.indexOf(e[n])&&t.push(e[n]);return t}(n):n}function zr(e,t,n,r){var o=Object.create(e||null);return t?("production"!==process.env.NODE_ENV&&Vr(r,t,n),Se(o,t)):o}"production"!==process.env.NODE_ENV&&(Br.el=Br.propsData=function(e,t,n,r){return n||Tr('option "'.concat(r,'" can only be used during instance ')+"creation with the `new` keyword."),jr(e,t)}),Br.data=function(e,t,n){return n?Pr(e,t,n):t&&"function"!=typeof t?("production"!==process.env.NODE_ENV&&Tr('The "data" option should be a function that returns a per-instance value in component definitions.',n),e):Pr(e,t)},Re.forEach((function(e){Br[e]=Rr})),Pe.forEach((function(e){Br[e+"s"]=zr})),Br.watch=function(e,t,n,r){if(e===et&&(e=void 0),t===et&&(t=void 0),!t)return Object.create(e||null);if("production"!==process.env.NODE_ENV&&Vr(r,t,n),!e)return t;var o={};for(var i in Se(o,e),t){var s=o[i],a=t[i];s&&!ee(s)&&(s=[s]),o[i]=s?s.concat(a):ee(a)?a:[a]}return o},Br.props=Br.methods=Br.inject=Br.computed=function(e,t,n,r){if(t&&"production"!==process.env.NODE_ENV&&Vr(r,t,n),!e)return t;var o=Object.create(null);return Se(o,e),t&&Se(o,t),o},Br.provide=Pr;var jr=function(e,t){return void 0===t?e:t};function Hr(e){new RegExp("^[a-zA-Z][\\-\\.0-9_".concat(je.source,"]*$")).test(e)||Tr('Invalid component name: "'+e+'". Component names should conform to valid custom element name in html5 specification.'),(ge(e)||ze.isReservedTag(e))&&Tr("Do not use built-in or reserved HTML elements as component id: "+e)}function Vr(e,t,n){ce(t)||Tr('Invalid value for option "'.concat(e,'": expected an Object, ')+"but got ".concat(le(t),"."),n)}function Kr(e,t,n){if("production"!==process.env.NODE_ENV&&function(e){for(var t in e.components)Hr(t)}(t),ie(t)&&(t=t.options),function(e,t){var n=e.props;if(n){var r,o,i={};if(ee(n))for(r=n.length;r--;)"string"==typeof(o=n[r])?i[we(o)]={type:null}:"production"!==process.env.NODE_ENV&&Tr("props must be strings when using array syntax.");else if(ce(n))for(var s in n)o=n[s],i[we(s)]=ce(o)?o:{type:o};else"production"!==process.env.NODE_ENV&&Tr('Invalid value for option "props": expected an Array or an Object, '+"but got ".concat(le(n),"."),t);e.props=i}}(t,n),function(e,t){var n=e.inject;if(n){var r=e.inject={};if(ee(n))for(var o=0;o<n.length;o++)r[n[o]]={from:n[o]};else if(ce(n))for(var i in n){var s=n[i];r[i]=ce(s)?Se({from:i},s):{from:s}}else"production"!==process.env.NODE_ENV&&Tr('Invalid value for option "inject": expected an Array or an Object, '+"but got ".concat(le(n),"."),t)}}(t,n),function(e){var t=e.directives;if(t)for(var n in t){var r=t[n];ie(r)&&(t[n]={bind:r,update:r})}}(t),!t._base&&(t.extends&&(e=Kr(e,t.extends,n)),t.mixins))for(var r=0,o=t.mixins.length;r<o;r++)e=Kr(e,t.mixins[r],n);var i,s={};for(i in e)a(i);for(i in t)De(e,i)||a(i);function a(r){var o=Br[r]||jr;s[r]=o(e[r],t[r],n,r)}return s}function qr(e,t,n,r){if("string"==typeof n){var o=e[t];if(De(o,n))return o[n];var i=we(n);if(De(o,i))return o[i];var s=Ae(i);if(De(o,s))return o[s];var a=o[n]||o[i]||o[s];return"production"!==process.env.NODE_ENV&&r&&!a&&Tr("Failed to resolve "+t.slice(0,-1)+": "+n),a}}function Wr(e,t,n,r){var o=t[e],i=!De(n,e),s=n[e],a=Qr(Boolean,o.type);if(a>-1)if(i&&!De(o,"default"))s=!1;else if(""===s||s===ke(e)){var l=Qr(String,o.type);(l<0||a<l)&&(s=!0)}if(void 0===s){s=function(e,t,n){if(!De(t,"default"))return;var r=t.default;"production"!==process.env.NODE_ENV&&se(r)&&Tr('Invalid default value for prop "'+n+'": Props with type Object/Array must use a factory function to return the default value.',e);if(e&&e.$options.propsData&&void 0===e.$options.propsData[n]&&void 0!==e._props[n])return e._props[n];return ie(r)&&"Function"!==Yr(t.type)?r.call(e):r}(r,o,e);var c=At;_t(!0),Ot(s),_t(c)}return"production"!==process.env.NODE_ENV&&function(e,t,n,r,o){if(e.required&&o)return void Tr('Missing required prop: "'+t+'"',r);if(null==n&&!e.required)return;var i=e.type,s=!i||!0===i,a=[];if(i){ee(i)||(i=[i]);for(var l=0;l<i.length&&!s;l++){var c=Gr(n,i[l],r);a.push(c.expectedType||""),s=c.valid}}var u=a.some((function(e){return e}));if(!s&&u)return void Tr(function(e,t,n){var r='Invalid prop: type check failed for prop "'.concat(e,'".')+" Expected ".concat(n.map(Ae).join(", ")),o=n[0],i=le(t);1===n.length&&no(o)&&no(typeof t)&&!function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.some((function(e){return"boolean"===e.toLowerCase()}))}(o,i)&&(r+=" with value ".concat(Zr(t,o)));r+=", got ".concat(i," "),no(i)&&(r+="with value ".concat(Zr(t,i),"."));return r}(t,n,a),r);var d=e.validator;d&&(d(n)||Tr('Invalid prop: custom validator check failed for prop "'+t+'".',r))}(o,e,s,r,i),s}var Ur=/^(String|Number|Boolean|Function|Symbol|BigInt)$/;function Gr(e,t,n){var r,o=Yr(t);if(Ur.test(o)){var i=typeof e;(r=i===o.toLowerCase())||"object"!==i||(r=e instanceof t)}else if("Object"===o)r=ce(e);else if("Array"===o)r=ee(e);else try{r=e instanceof t}catch(e){Tr('Invalid prop type: "'+String(t)+'" is not a constructor',n),r=!1}return{valid:r,expectedType:o}}var Jr=/^\s*function (\w+)/;function Yr(e){var t=e&&e.toString().match(Jr);return t?t[1]:""}function Xr(e,t){return Yr(e)===Yr(t)}function Qr(e,t){if(!ee(t))return Xr(t,e)?0:-1;for(var n=0,r=t.length;n<r;n++)if(Xr(t[n],e))return n;return-1}function Zr(e,t){return"String"===t?'"'.concat(e,'"'):"".concat("Number"===t?Number(e):e)}var eo,to=["string","number","boolean"];function no(e){return to.some((function(t){return e.toLowerCase()===t}))}if("production"!==process.env.NODE_ENV){var ro=me("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,require"),oo=function(e,t){Tr('Property or method "'.concat(t,'" is not defined on the instance but ')+"referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. See: https://v2.vuejs.org/v2/guide/reactivity.html#Declaring-Reactive-Properties.",e)},io=function(e,t){Tr('Property "'.concat(t,'" must be accessed with "$data.').concat(t,'" because ')+'properties starting with "$" or "_" are not proxied in the Vue instance to prevent conflicts with Vue internals. See: https://v2.vuejs.org/v2/api/#data',e)},so="undefined"!=typeof Proxy&&it(Proxy);if(so){var ao=me("stop,prevent,self,ctrl,shift,alt,meta,exact");ze.keyCodes=new Proxy(ze.keyCodes,{set:function(e,t,n){return ao(t)?(Tr("Avoid overwriting built-in modifier in config.keyCodes: .".concat(t)),!1):(e[t]=n,!0)}})}var lo={has:function(e,t){var n=t in e,r=ro(t)||"string"==typeof t&&"_"===t.charAt(0)&&!(t in e.$data);return n||r||(t in e.$data?io(e,t):oo(e,t)),n||!r}},co={get:function(e,t){return"string"!=typeof t||t in e||(t in e.$data?io(e,t):oo(e,t)),e[t]}};eo=function(e){if(so){var t=e.$options,n=t.render&&t.render._withStripped?co:lo;e._renderProxy=new Proxy(e,n)}else e._renderProxy=e}}var uo={enumerable:!0,configurable:!0,get:Fe,set:Fe};function po(e,t,n){uo.get=function(){return this[t][n]},uo.set=function(e){this[t][n]=e},Object.defineProperty(e,n,uo)}function ho(e){var t=e.$options;if(t.props&&function(e,t){var n=e.$options.propsData||{},r=e._props=Mt({}),o=e.$options._propKeys=[],i=!e.$parent;i||_t(!1);var s=function(s){o.push(s);var a=Wr(s,t,n,e);if("production"!==process.env.NODE_ENV){var l=ke(s);(ve(l)||ze.isReservedAttr(l))&&Tr('"'.concat(l,'" is a reserved attribute and cannot be used as component prop.'),e),St(r,s,a,(function(){i||nr||Tr("Avoid mutating a prop directly since the value will be overwritten whenever the parent component re-renders. Instead, use a data or computed property based on the prop's "+'value. Prop being mutated: "'.concat(s,'"'),e)}))}else St(r,s,a);s in e||po(e,"_props",s)};for(var a in t)s(a);_t(!0)}(e,t.props),bn(e),t.methods&&function(e,t){var n=e.$options.props;for(var r in t)"production"!==process.env.NODE_ENV&&("function"!=typeof t[r]&&Tr('Method "'.concat(r,'" has type "').concat(typeof t[r],'" in the component definition. ')+"Did you reference the function correctly?",e),n&&De(n,r)&&Tr('Method "'.concat(r,'" has already been defined as a prop.'),e),r in e&&He(r)&&Tr('Method "'.concat(r,'" conflicts with an existing Vue instance method. ')+"Avoid defining component methods that start with _ or $.")),e[r]="function"!=typeof t[r]?Fe:xe(t[r],e)}(e,t.methods),t.data)!function(e){var t=e.$options.data;ce(t=e._data=ie(t)?function(e,t){yt();try{return e.call(t,t)}catch(e){return On(e,t,"data()"),{}}finally{bt()}}(t,e):t||{})||(t={},"production"!==process.env.NODE_ENV&&Tr("data functions should return an object:\nhttps://v2.vuejs.org/v2/guide/components.html#data-Must-Be-a-Function",e));var n=Object.keys(t),r=e.$options.props,o=e.$options.methods,i=n.length;for(;i--;){var s=n[i];"production"!==process.env.NODE_ENV&&o&&De(o,s)&&Tr('Method "'.concat(s,'" has already been defined as a data property.'),e),r&&De(r,s)?"production"!==process.env.NODE_ENV&&Tr('The data property "'.concat(s,'" is already declared as a prop. ')+"Use prop default value instead.",e):He(s)||po(e,"_data",s)}var a=Ot(t);a&&a.vmCount++}(e);else{var n=Ot(e._data={});n&&n.vmCount++}t.computed&&function(e,t){var n=e._computedWatchers=Object.create(null),r=rt();for(var o in t){var i=t[o],s=ie(i)?i:i.get;"production"!==process.env.NODE_ENV&&null==s&&Tr('Getter is missing for computed property "'.concat(o,'".'),e),r||(n[o]=new Jn(e,s||Fe,Fe,fo)),o in e?"production"!==process.env.NODE_ENV&&(o in e.$data?Tr('The computed property "'.concat(o,'" is already defined in data.'),e):e.$options.props&&o in e.$options.props?Tr('The computed property "'.concat(o,'" is already defined as a prop.'),e):e.$options.methods&&o in e.$options.methods&&Tr('The computed property "'.concat(o,'" is already defined as a method.'),e)):mo(e,o,i)}}(e,t.computed),t.watch&&t.watch!==et&&function(e,t){for(var n in t){var r=t[n];if(ee(r))for(var o=0;o<r.length;o++)yo(e,n,r[o]);else yo(e,n,r)}}(e,t.watch)}var fo={lazy:!0};function mo(e,t,n){var r=!rt();ie(n)?(uo.get=r?go(t):vo(n),uo.set=Fe):(uo.get=n.get?r&&!1!==n.cache?go(t):vo(n.get):Fe,uo.set=n.set||Fe),"production"!==process.env.NODE_ENV&&uo.set===Fe&&(uo.set=function(){Tr('Computed property "'.concat(t,'" was assigned to but it has no setter.'),this)}),Object.defineProperty(e,t,uo)}function go(e){return function(){var t=this._computedWatchers&&this._computedWatchers[e];if(t)return t.dirty&&t.evaluate(),gt.target&&("production"!==process.env.NODE_ENV&&gt.target.onTrack&&gt.target.onTrack({effect:gt.target,target:this,type:"get",key:e}),t.depend()),t.value}}function vo(e){return function(){return e.call(this,this)}}function yo(e,t,n,r){return ce(n)&&(r=n,n=n.handler),"string"==typeof n&&(n=e[n]),e.$watch(t,n,r)}var bo=0;function Do(e){var t=e.options;if(e.super){var n=Do(e.super);if(n!==e.superOptions){e.superOptions=n;var r=function(e){var t,n=e.options,r=e.sealedOptions;for(var o in n)n[o]!==r[o]&&(t||(t={}),t[o]=n[o]);return t}(e);r&&Se(e.extendOptions,r),(t=e.options=Kr(n,e.extendOptions)).name&&(t.components[t.name]=e)}}return t}function Eo(e){"production"===process.env.NODE_ENV||this instanceof Eo||Tr("Vue is a constructor and should be called with the `new` keyword"),this._init(e)}function Co(e){e.cid=0;var t=1;e.extend=function(e){e=e||{};var n=this,r=n.cid,o=e._Ctor||(e._Ctor={});if(o[r])return o[r];var i=_r(e)||_r(n.options);"production"!==process.env.NODE_ENV&&i&&Hr(i);var s=function(e){this._init(e)};return(s.prototype=Object.create(n.prototype)).constructor=s,s.cid=t++,s.options=Kr(n.options,e),s.super=n,s.options.props&&function(e){var t=e.options.props;for(var n in t)po(e.prototype,"_props",n)}(s),s.options.computed&&function(e){var t=e.options.computed;for(var n in t)mo(e.prototype,n,t[n])}(s),s.extend=n.extend,s.mixin=n.mixin,s.use=n.use,Pe.forEach((function(e){s[e]=n[e]})),i&&(s.options.components[i]=s),s.superOptions=n.options,s.extendOptions=e,s.sealedOptions=Se({},s.options),o[r]=s,s}}function wo(e){return e&&(_r(e.Ctor.options)||e.tag)}function Ao(e,t){return ee(e)?e.indexOf(t)>-1:"string"==typeof e?e.split(",").indexOf(t)>-1:!!ue(e)&&e.test(t)}function _o(e,t){var n=e.cache,r=e.keys,o=e._vnode;for(var i in n){var s=n[i];if(s){var a=s.name;a&&!t(a)&&ko(n,i,r,o)}}}function ko(e,t,n,r){var o=e[t];!o||r&&o.tag===r.tag||o.componentInstance.$destroy(),e[t]=null,ye(n,t)}!function(e){e.prototype._init=function(e){var t,n,r=this;r._uid=bo++,"production"!==process.env.NODE_ENV&&ze.performance&&qn&&(t="vue-perf-start:".concat(r._uid),n="vue-perf-end:".concat(r._uid),qn(t)),r._isVue=!0,r.__v_skip=!0,r._scope=new Ht(!0),r._scope._vm=!0,e&&e._isComponent?function(e,t){var n=e.$options=Object.create(e.constructor.options),r=t._parentVnode;n.parent=t.parent,n._parentVnode=r;var o=r.componentOptions;n.propsData=o.propsData,n._parentListeners=o.listeners,n._renderChildren=o.children,n._componentTag=o.tag,t.render&&(n.render=t.render,n.staticRenderFns=t.staticRenderFns)}(r,e):r.$options=Kr(Do(r.constructor),e||{},r),"production"!==process.env.NODE_ENV?eo(r):r._renderProxy=r,r._self=r,function(e){var t=e.$options,n=t.parent;if(n&&!t.abstract){for(;n.$options.abstract&&n.$parent;)n=n.$parent;n.$children.push(e)}e.$parent=n,e.$root=n?n.$root:e,e.$children=[],e.$refs={},e._provided=n?n._provided:Object.create(null),e._watcher=null,e._inactive=null,e._directInactive=!1,e._isMounted=!1,e._isDestroyed=!1,e._isBeingDestroyed=!1}(r),function(e){e._events=Object.create(null),e._hasHookEvent=!1;var t=e.$options._parentListeners;t&&er(e,t)}(r),function(e){e._vnode=null,e._staticTrees=null;var t=e.$options,n=e.$vnode=t._parentVnode,r=n&&n.context;e.$slots=hn(t._renderChildren,r),e.$scopedSlots=n?gn(e.$parent,n.data.scopedSlots,e.$slots):Z,e._c=function(t,n,r,o){return kn(e,t,n,r,o,!1)},e.$createElement=function(t,n,r,o){return kn(e,t,n,r,o,!0)};var o=n&&n.data;"production"!==process.env.NODE_ENV?(St(e,"$attrs",o&&o.attrs||Z,(function(){!nr&&Tr("$attrs is readonly.",e)}),!0),St(e,"$listeners",t._parentListeners||Z,(function(){!nr&&Tr("$listeners is readonly.",e)}),!0)):(St(e,"$attrs",o&&o.attrs||Z,null,!0),St(e,"$listeners",t._parentListeners||Z,null,!0))}(r),ar(r,"beforeCreate",void 0,!1),function(e){var t=Er(e.$options.inject,e);t&&(_t(!1),Object.keys(t).forEach((function(n){"production"!==process.env.NODE_ENV?St(e,n,t[n],(function(){Tr("Avoid mutating an injected value directly since the changes will be overwritten whenever the provided component re-renders. "+'injection being mutated: "'.concat(n,'"'),e)})):St(e,n,t[n])})),_t(!0))}(r),ho(r),Dr(r),ar(r,"created"),"production"!==process.env.NODE_ENV&&ze.performance&&qn&&(r._name=Fr(r,!1),qn(n),Wn("vue ".concat(r._name," init"),t,n)),r.$options.el&&r.$mount(r.$options.el)}}(Eo),function(e){var t={get:function(){return this._data}},n={get:function(){return this._props}};"production"!==process.env.NODE_ENV&&(t.set=function(){Tr("Avoid replacing instance root $data. Use nested data properties instead.",this)},n.set=function(){Tr("$props is readonly.",this)}),Object.defineProperty(e.prototype,"$data",t),Object.defineProperty(e.prototype,"$props",n),e.prototype.$set=Nt,e.prototype.$delete=Ft,e.prototype.$watch=function(e,t,n){var r=this;if(ce(t))return yo(r,e,t,n);(n=n||{}).user=!0;var o=new Jn(r,e,t,n);if(n.immediate){var i='callback for immediate watcher "'.concat(o.expression,'"');yt(),Sn(t,r,[o.value],r,i),bt()}return function(){o.teardown()}}}(Eo),function(e){var t=/^hook:/;e.prototype.$on=function(e,n){var r=this;if(ee(e))for(var o=0,i=e.length;o<i;o++)r.$on(e[o],n);else(r._events[e]||(r._events[e]=[])).push(n),t.test(e)&&(r._hasHookEvent=!0);return r},e.prototype.$once=function(e,t){var n=this;function r(){n.$off(e,r),t.apply(n,arguments)}return r.fn=t,n.$on(e,r),n},e.prototype.$off=function(e,t){var n=this;if(!arguments.length)return n._events=Object.create(null),n;if(ee(e)){for(var r=0,o=e.length;r<o;r++)n.$off(e[r],t);return n}var i,s=n._events[e];if(!s)return n;if(!t)return n._events[e]=null,n;for(var a=s.length;a--;)if((i=s[a])===t||i.fn===t){s.splice(a,1);break}return n},e.prototype.$emit=function(e){var t=this;if("production"!==process.env.NODE_ENV){var n=e.toLowerCase();n!==e&&t._events[n]&&Mr('Event "'.concat(n,'" is emitted in component ')+"".concat(Fr(t),' but the handler is registered for "').concat(e,'". ')+"Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. "+'You should probably use "'.concat(ke(e),'" instead of "').concat(e,'".'))}var r=t._events[e];if(r){r=r.length>1?Oe(r):r;for(var o=Oe(arguments,1),i='event handler for "'.concat(e,'"'),s=0,a=r.length;s<a;s++)Sn(r[s],t,o,t,i)}return t}}(Eo),function(e){e.prototype._update=function(e,t){var n=this,r=n.$el,o=n._vnode,i=rr(n);n._vnode=e,n.$el=o?n.__patch__(o,e):n.__patch__(n.$el,e,t,!1),i(),r&&(r.__vue__=null),n.$el&&(n.$el.__vue__=n);for(var s=n;s&&s.$vnode&&s.$parent&&s.$vnode===s.$parent._vnode;)s.$parent.$el=s.$el,s=s.$parent},e.prototype.$forceUpdate=function(){this._watcher&&this._watcher.update()},e.prototype.$destroy=function(){var e=this;if(!e._isBeingDestroyed){ar(e,"beforeDestroy"),e._isBeingDestroyed=!0;var t=e.$parent;!t||t._isBeingDestroyed||e.$options.abstract||ye(t.$children,e),e._scope.stop(),e._data.__ob__&&e._data.__ob__.vmCount--,e._isDestroyed=!0,e.__patch__(e._vnode,null),ar(e,"destroyed"),e.$off(),e.$el&&(e.$el.__vue__=null),e.$vnode&&(e.$vnode.parent=null)}}}(Eo),function(e){pn(e.prototype),e.prototype.$nextTick=function(e){return jn(e,this)},e.prototype._render=function(){var e,t=this,n=t.$options,r=n.render,o=n._parentVnode;o&&t._isMounted&&(t.$scopedSlots=gn(t.$parent,o.data.scopedSlots,t.$slots,t.$scopedSlots),t._slotsProxy&&Cn(t._slotsProxy,t.$scopedSlots)),t.$vnode=o;try{ct(t),wn=t,e=r.call(t._renderProxy,t.$createElement)}catch(n){if(On(n,t,"render"),"production"!==process.env.NODE_ENV&&t.$options.renderError)try{e=t.$options.renderError.call(t._renderProxy,t.$createElement,n)}catch(n){On(n,t,"renderError"),e=t._vnode}else e=t._vnode}finally{wn=null,ct()}return ee(e)&&1===e.length&&(e=e[0]),e instanceof ut||("production"!==process.env.NODE_ENV&&ee(e)&&Tr("Multiple root nodes returned from render function. Render function should return a single root node.",t),e=dt()),e.parent=o,e}}(Eo);var xo=[String,RegExp,Array],Oo={name:"keep-alive",abstract:!0,props:{include:xo,exclude:xo,max:[String,Number]},methods:{cacheVNode:function(){var e=this,t=e.cache,n=e.keys,r=e.vnodeToCache,o=e.keyToCache;if(r){var i=r.tag,s=r.componentInstance,a=r.componentOptions;t[o]={name:wo(a),tag:i,componentInstance:s},n.push(o),this.max&&n.length>parseInt(this.max)&&ko(t,n[0],n,this._vnode),this.vnodeToCache=null}}},created:function(){this.cache=Object.create(null),this.keys=[]},destroyed:function(){for(var e in this.cache)ko(this.cache,e,this.keys)},mounted:function(){var e=this;this.cacheVNode(),this.$watch("include",(function(t){_o(e,(function(e){return Ao(t,e)}))})),this.$watch("exclude",(function(t){_o(e,(function(e){return!Ao(t,e)}))}))},updated:function(){this.cacheVNode()},render:function(){var e=this.$slots.default,t=_n(e),n=t&&t.componentOptions;if(n){var r=wo(n),o=this.include,i=this.exclude;if(o&&(!r||!Ao(o,r))||i&&r&&Ao(i,r))return t;var s=this.cache,a=this.keys,l=null==t.key?n.Ctor.cid+(n.tag?"::".concat(n.tag):""):t.key;s[l]?(t.componentInstance=s[l].componentInstance,ye(a,l),a.push(l)):(this.vnodeToCache=t,this.keyToCache=l),t.data.keepAlive=!0}return t||e&&e[0]}},So={KeepAlive:Oo};!function(e){var t={get:function(){return ze}};"production"!==process.env.NODE_ENV&&(t.set=function(){Tr("Do not replace the Vue.config object, set individual fields instead.")}),Object.defineProperty(e,"config",t),e.util={warn:Tr,extend:Se,mergeOptions:Kr,defineReactive:St},e.set=Nt,e.delete=Ft,e.nextTick=jn,e.observable=function(e){return Ot(e),e},e.options=Object.create(null),Pe.forEach((function(t){e.options[t+"s"]=Object.create(null)})),e.options._base=e,Se(e.options.components,So),function(e){e.use=function(e){var t=this._installedPlugins||(this._installedPlugins=[]);if(t.indexOf(e)>-1)return this;var n=Oe(arguments,1);return n.unshift(this),ie(e.install)?e.install.apply(e,n):ie(e)&&e.apply(null,n),t.push(e),this}}(e),function(e){e.mixin=function(e){return this.options=Kr(this.options,e),this}}(e),Co(e),function(e){Pe.forEach((function(t){e[t]=function(e,n){return n?("production"!==process.env.NODE_ENV&&"component"===t&&Hr(e),"component"===t&&ce(n)&&(n.name=n.name||e,n=this.options._base.extend(n)),"directive"===t&&ie(n)&&(n={bind:n,update:n}),this.options[t+"s"][e]=n,n):this.options[t+"s"][e]}}))}(e)}(Eo),Object.defineProperty(Eo.prototype,"$isServer",{get:rt}),Object.defineProperty(Eo.prototype,"$ssrContext",{get:function(){return this.$vnode&&this.$vnode.ssrContext}}),Object.defineProperty(Eo,"FunctionalRenderContext",{value:Cr}),Eo.version="2.7.10";var No=me("style,class"),Fo=me("input,textarea,option,select,progress"),To=me("contenteditable,draggable,spellcheck"),Mo=me("events,caret,typing,plaintext-only"),Io=me("allowfullscreen,async,autofocus,autoplay,checked,compact,controls,declare,default,defaultchecked,defaultmuted,defaultselected,defer,disabled,enabled,formnovalidate,hidden,indeterminate,inert,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,pauseonexit,readonly,required,reversed,scoped,seamless,selected,sortable,truespeed,typemustmatch,visible"),$o="http://www.w3.org/1999/xlink",Bo=function(e){return":"===e.charAt(5)&&"xlink"===e.slice(0,5)},Lo=function(e){return Bo(e)?e.slice(6,e.length):""},Po=function(e){return null==e||!1===e};function Ro(e){for(var t=e.data,n=e,r=e;ne(r.componentInstance);)(r=r.componentInstance._vnode)&&r.data&&(t=zo(r.data,t));for(;ne(n=n.parent);)n&&n.data&&(t=zo(t,n.data));return function(e,t){if(ne(e)||ne(t))return jo(e,Ho(t));return""}(t.staticClass,t.class)}function zo(e,t){return{staticClass:jo(e.staticClass,t.staticClass),class:ne(e.class)?[e.class,t.class]:t.class}}function jo(e,t){return e?t?e+" "+t:e:t||""}function Ho(e){return Array.isArray(e)?function(e){for(var t,n="",r=0,o=e.length;r<o;r++)ne(t=Ho(e[r]))&&""!==t&&(n&&(n+=" "),n+=t);return n}(e):se(e)?function(e){var t="";for(var n in e)e[n]&&(t&&(t+=" "),t+=n);return t}(e):"string"==typeof e?e:""}var Vo={svg:"http://www.w3.org/2000/svg",math:"http://www.w3.org/1998/Math/MathML"},Ko=me("html,body,base,head,link,meta,style,title,address,article,aside,footer,header,h1,h2,h3,h4,h5,h6,hgroup,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,rtc,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,menuitem,summary,content,element,shadow,template,blockquote,iframe,tfoot"),qo=me("svg,animate,circle,clippath,cursor,defs,desc,ellipse,filter,font-face,foreignobject,g,glyph,image,line,marker,mask,missing-glyph,path,pattern,polygon,polyline,rect,switch,symbol,text,textpath,tspan,use,view",!0),Wo=function(e){return Ko(e)||qo(e)};var Uo=Object.create(null);var Go=me("text,number,password,search,email,tel,url");var Jo=Object.freeze({__proto__:null,createElement:function(e,t){var n=document.createElement(e);return"select"!==e||t.data&&t.data.attrs&&void 0!==t.data.attrs.multiple&&n.setAttribute("multiple","multiple"),n},createElementNS:function(e,t){return document.createElementNS(Vo[e],t)},createTextNode:function(e){return document.createTextNode(e)},createComment:function(e){return document.createComment(e)},insertBefore:function(e,t,n){e.insertBefore(t,n)},removeChild:function(e,t){e.removeChild(t)},appendChild:function(e,t){e.appendChild(t)},parentNode:function(e){return e.parentNode},nextSibling:function(e){return e.nextSibling},tagName:function(e){return e.tagName},setTextContent:function(e,t){e.textContent=t},setStyleScope:function(e,t){e.setAttribute(t,"")}}),Yo={create:function(e,t){Xo(t)},update:function(e,t){e.data.ref!==t.data.ref&&(Xo(e,!0),Xo(t))},destroy:function(e){Xo(e,!0)}};function Xo(e,t){var n=e.data.ref;if(ne(n)){var r=e.context,o=e.componentInstance||e.elm,i=t?null:o,s=t?void 0:o;if(ie(n))Sn(n,r,[i],r,"template ref function");else{var a=e.data.refInFor,l="string"==typeof n||"number"==typeof n,c=Bt(n),u=r.$refs;if(l||c)if(a){var d=l?u[n]:n.value;t?ee(d)&&ye(d,o):ee(d)?d.includes(o)||d.push(o):l?(u[n]=[o],Qo(r,n,u[n])):n.value=[o]}else if(l){if(t&&u[n]!==o)return;u[n]=s,Qo(r,n,i)}else if(c){if(t&&n.value!==o)return;n.value=i}else"production"!==process.env.NODE_ENV&&Tr("Invalid template ref type: ".concat(typeof n))}}}function Qo(e,t,n){var r=e._setupState;r&&De(r,t)&&(Bt(r[t])?r[t].value=n:r[t]=n)}var Zo=new ut("",{},[]),ei=["create","activate","update","remove","destroy"];function ti(e,t){return e.key===t.key&&e.asyncFactory===t.asyncFactory&&(e.tag===t.tag&&e.isComment===t.isComment&&ne(e.data)===ne(t.data)&&function(e,t){if("input"!==e.tag)return!0;var n,r=ne(n=e.data)&&ne(n=n.attrs)&&n.type,o=ne(n=t.data)&&ne(n=n.attrs)&&n.type;return r===o||Go(r)&&Go(o)}(e,t)||re(e.isAsyncPlaceholder)&&te(t.asyncFactory.error))}function ni(e,t,n){var r,o,i={};for(r=t;r<=n;++r)ne(o=e[r].key)&&(i[o]=r);return i}var ri={create:oi,update:oi,destroy:function(e){oi(e,Zo)}};function oi(e,t){(e.data.directives||t.data.directives)&&function(e,t){var n,r,o,i=e===Zo,s=t===Zo,a=si(e.data.directives,e.context),l=si(t.data.directives,t.context),c=[],u=[];for(n in l)r=a[n],o=l[n],r?(o.oldValue=r.value,o.oldArg=r.arg,li(o,"update",t,e),o.def&&o.def.componentUpdated&&u.push(o)):(li(o,"bind",t,e),o.def&&o.def.inserted&&c.push(o));if(c.length){var d=function(){for(var n=0;n<c.length;n++)li(c[n],"inserted",t,e)};i?Wt(t,"insert",d):d()}u.length&&Wt(t,"postpatch",(function(){for(var n=0;n<u.length;n++)li(u[n],"componentUpdated",t,e)}));if(!i)for(n in a)l[n]||li(a[n],"unbind",e,e,s)}(e,t)}var ii=Object.create(null);function si(e,t){var n,r,o=Object.create(null);if(!e)return o;for(n=0;n<e.length;n++){if((r=e[n]).modifiers||(r.modifiers=ii),o[ai(r)]=r,t._setupState&&t._setupState.__sfc){var i=r.def||qr(t,"_setupState","v-"+r.name);r.def="function"==typeof i?{bind:i,update:i}:i}r.def=r.def||qr(t.$options,"directives",r.name,!0)}return o}function ai(e){return e.rawName||"".concat(e.name,".").concat(Object.keys(e.modifiers||{}).join("."))}function li(e,t,n,r,o){var i=e.def&&e.def[t];if(i)try{i(n.elm,e,n,r,o)}catch(r){On(r,n.context,"directive ".concat(e.name," ").concat(t," hook"))}}var ci=[Yo,ri];function ui(e,t){var n=t.componentOptions;if(!(ne(n)&&!1===n.Ctor.options.inheritAttrs||te(e.data.attrs)&&te(t.data.attrs))){var r,o,i=t.elm,s=e.data.attrs||{},a=t.data.attrs||{};for(r in(ne(a.__ob__)||re(a._v_attr_proxy))&&(a=t.data.attrs=Se({},a)),a)o=a[r],s[r]!==o&&di(i,r,o,t.data.pre);for(r in(Ge||Ye)&&a.value!==s.value&&di(i,"value",a.value),s)te(a[r])&&(Bo(r)?i.removeAttributeNS($o,Lo(r)):To(r)||i.removeAttribute(r))}}function di(e,t,n,r){r||e.tagName.indexOf("-")>-1?pi(e,t,n):Io(t)?Po(n)?e.removeAttribute(t):(n="allowfullscreen"===t&&"EMBED"===e.tagName?"true":t,e.setAttribute(t,n)):To(t)?e.setAttribute(t,function(e,t){return Po(t)||"false"===t?"false":"contenteditable"===e&&Mo(t)?t:"true"}(t,n)):Bo(t)?Po(n)?e.removeAttributeNS($o,Lo(t)):e.setAttributeNS($o,t,n):pi(e,t,n)}function pi(e,t,n){if(Po(n))e.removeAttribute(t);else{if(Ge&&!Je&&"TEXTAREA"===e.tagName&&"placeholder"===t&&""!==n&&!e.__ieph){var r=function(t){t.stopImmediatePropagation(),e.removeEventListener("input",r)};e.addEventListener("input",r),e.__ieph=!0}e.setAttribute(t,n)}}var hi={create:ui,update:ui};function fi(e,t){var n=t.elm,r=t.data,o=e.data;if(!(te(r.staticClass)&&te(r.class)&&(te(o)||te(o.staticClass)&&te(o.class)))){var i=Ro(t),s=n._transitionClasses;ne(s)&&(i=jo(i,Ho(s))),i!==n._prevClass&&(n.setAttribute("class",i),n._prevClass=i)}}var mi,gi={create:fi,update:fi};function vi(e,t,n){var r=mi;return function o(){var i=t.apply(null,arguments);null!==i&&Di(e,o,n,r)}}var yi=Mn&&!(Ze&&Number(Ze[1])<=53);function bi(e,t,n,r){if(yi){var o=mr,i=t;t=i._wrapper=function(e){if(e.target===e.currentTarget||e.timeStamp>=o||e.timeStamp<=0||e.target.ownerDocument!==document)return i.apply(this,arguments)}}mi.addEventListener(e,t,tt?{capture:n,passive:r}:n)}function Di(e,t,n,r){(r||mi).removeEventListener(e,t._wrapper||t,n)}function Ei(e,t){if(!te(e.data.on)||!te(t.data.on)){var n=t.data.on||{},r=e.data.on||{};mi=t.elm||e.elm,function(e){if(ne(e.__r)){var t=Ge?"change":"input";e[t]=[].concat(e.__r,e[t]||[]),delete e.__r}ne(e.__c)&&(e.change=[].concat(e.__c,e.change||[]),delete e.__c)}(n),qt(n,r,bi,Di,vi,t.context),mi=void 0}}var Ci,wi={create:Ei,update:Ei,destroy:function(e){return Ei(e,Zo)}};function Ai(e,t){if(!te(e.data.domProps)||!te(t.data.domProps)){var n,r,o=t.elm,i=e.data.domProps||{},s=t.data.domProps||{};for(n in(ne(s.__ob__)||re(s._v_attr_proxy))&&(s=t.data.domProps=Se({},s)),i)n in s||(o[n]="");for(n in s){if(r=s[n],"textContent"===n||"innerHTML"===n){if(t.children&&(t.children.length=0),r===i[n])continue;1===o.childNodes.length&&o.removeChild(o.childNodes[0])}if("value"===n&&"PROGRESS"!==o.tagName){o._value=r;var a=te(r)?"":String(r);_i(o,a)&&(o.value=a)}else if("innerHTML"===n&&qo(o.tagName)&&te(o.innerHTML)){(Ci=Ci||document.createElement("div")).innerHTML="<svg>".concat(r,"</svg>");for(var l=Ci.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;l.firstChild;)o.appendChild(l.firstChild)}else if(r!==i[n])try{o[n]=r}catch(e){}}}}function _i(e,t){return!e.composing&&("OPTION"===e.tagName||function(e,t){var n=!0;try{n=document.activeElement!==e}catch(e){}return n&&e.value!==t}(e,t)||function(e,t){var n=e.value,r=e._vModifiers;if(ne(r)){if(r.number)return fe(n)!==fe(t);if(r.trim)return n.trim()!==t.trim()}return n!==t}(e,t))}var ki={create:Ai,update:Ai},xi=Ee((function(e){var t={},n=/:(.+)/;return e.split(/;(?![^(]*\))/g).forEach((function(e){if(e){var r=e.split(n);r.length>1&&(t[r[0].trim()]=r[1].trim())}})),t}));function Oi(e){var t=Si(e.style);return e.staticStyle?Se(e.staticStyle,t):t}function Si(e){return Array.isArray(e)?Ne(e):"string"==typeof e?xi(e):e}var Ni,Fi=/^--/,Ti=/\s*!important$/,Mi=function(e,t,n){if(Fi.test(t))e.style.setProperty(t,n);else if(Ti.test(n))e.style.setProperty(ke(t),n.replace(Ti,""),"important");else{var r=$i(t);if(Array.isArray(n))for(var o=0,i=n.length;o<i;o++)e.style[r]=n[o];else e.style[r]=n}},Ii=["Webkit","Moz","ms"],$i=Ee((function(e){if(Ni=Ni||document.createElement("div").style,"filter"!==(e=we(e))&&e in Ni)return e;for(var t=e.charAt(0).toUpperCase()+e.slice(1),n=0;n<Ii.length;n++){var r=Ii[n]+t;if(r in Ni)return r}}));function Bi(e,t){var n=t.data,r=e.data;if(!(te(n.staticStyle)&&te(n.style)&&te(r.staticStyle)&&te(r.style))){var o,i,s=t.elm,a=r.staticStyle,l=r.normalizedStyle||r.style||{},c=a||l,u=Si(t.data.style)||{};t.data.normalizedStyle=ne(u.__ob__)?Se({},u):u;var d=function(e,t){var n,r={};if(t)for(var o=e;o.componentInstance;)(o=o.componentInstance._vnode)&&o.data&&(n=Oi(o.data))&&Se(r,n);(n=Oi(e.data))&&Se(r,n);for(var i=e;i=i.parent;)i.data&&(n=Oi(i.data))&&Se(r,n);return r}(t,!0);for(i in c)te(d[i])&&Mi(s,i,"");for(i in d)(o=d[i])!==c[i]&&Mi(s,i,null==o?"":o)}}var Li={create:Bi,update:Bi},Pi=/\s+/;function Ri(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Pi).forEach((function(t){return e.classList.add(t)})):e.classList.add(t);else{var n=" ".concat(e.getAttribute("class")||""," ");n.indexOf(" "+t+" ")<0&&e.setAttribute("class",(n+t).trim())}}function zi(e,t){if(t&&(t=t.trim()))if(e.classList)t.indexOf(" ")>-1?t.split(Pi).forEach((function(t){return e.classList.remove(t)})):e.classList.remove(t),e.classList.length||e.removeAttribute("class");else{for(var n=" ".concat(e.getAttribute("class")||""," "),r=" "+t+" ";n.indexOf(r)>=0;)n=n.replace(r," ");(n=n.trim())?e.setAttribute("class",n):e.removeAttribute("class")}}function ji(e){if(e){if("object"==typeof e){var t={};return!1!==e.css&&Se(t,Hi(e.name||"v")),Se(t,e),t}return"string"==typeof e?Hi(e):void 0}}var Hi=Ee((function(e){return{enterClass:"".concat(e,"-enter"),enterToClass:"".concat(e,"-enter-to"),enterActiveClass:"".concat(e,"-enter-active"),leaveClass:"".concat(e,"-leave"),leaveToClass:"".concat(e,"-leave-to"),leaveActiveClass:"".concat(e,"-leave-active")}})),Vi=We&&!Je,Ki="transition",qi="transitionend",Wi="animation",Ui="animationend";Vi&&(void 0===window.ontransitionend&&void 0!==window.onwebkittransitionend&&(Ki="WebkitTransition",qi="webkitTransitionEnd"),void 0===window.onanimationend&&void 0!==window.onwebkitanimationend&&(Wi="WebkitAnimation",Ui="webkitAnimationEnd"));var Gi=We?window.requestAnimationFrame?window.requestAnimationFrame.bind(window):setTimeout:function(e){return e()};function Ji(e){Gi((function(){Gi(e)}))}function Yi(e,t){var n=e._transitionClasses||(e._transitionClasses=[]);n.indexOf(t)<0&&(n.push(t),Ri(e,t))}function Xi(e,t){e._transitionClasses&&ye(e._transitionClasses,t),zi(e,t)}function Qi(e,t,n){var r=es(e,t),o=r.type,i=r.timeout,s=r.propCount;if(!o)return n();var a="transition"===o?qi:Ui,l=0,c=function(){e.removeEventListener(a,u),n()},u=function(t){t.target===e&&++l>=s&&c()};setTimeout((function(){l<s&&c()}),i+1),e.addEventListener(a,u)}var Zi=/\b(transform|all)(,|$)/;function es(e,t){var n,r=window.getComputedStyle(e),o=(r[Ki+"Delay"]||"").split(", "),i=(r[Ki+"Duration"]||"").split(", "),s=ts(o,i),a=(r[Wi+"Delay"]||"").split(", "),l=(r[Wi+"Duration"]||"").split(", "),c=ts(a,l),u=0,d=0;return"transition"===t?s>0&&(n="transition",u=s,d=i.length):"animation"===t?c>0&&(n="animation",u=c,d=l.length):d=(n=(u=Math.max(s,c))>0?s>c?"transition":"animation":null)?"transition"===n?i.length:l.length:0,{type:n,timeout:u,propCount:d,hasTransform:"transition"===n&&Zi.test(r[Ki+"Property"])}}function ts(e,t){for(;e.length<t.length;)e=e.concat(e);return Math.max.apply(null,t.map((function(t,n){return ns(t)+ns(e[n])})))}function ns(e){return 1e3*Number(e.slice(0,-1).replace(",","."))}function rs(e,t){var n=e.elm;ne(n._leaveCb)&&(n._leaveCb.cancelled=!0,n._leaveCb());var r=ji(e.data.transition);if(!te(r)&&!ne(n._enterCb)&&1===n.nodeType){for(var o=r.css,i=r.type,s=r.enterClass,a=r.enterToClass,l=r.enterActiveClass,c=r.appearClass,u=r.appearToClass,d=r.appearActiveClass,p=r.beforeEnter,h=r.enter,f=r.afterEnter,m=r.enterCancelled,g=r.beforeAppear,v=r.appear,y=r.afterAppear,b=r.appearCancelled,D=r.duration,E=tr,C=tr.$vnode;C&&C.parent;)E=C.context,C=C.parent;var w=!E._isMounted||!e.isRootInsert;if(!w||v||""===v){var A=w&&c?c:s,_=w&&d?d:l,k=w&&u?u:a,x=w&&g||p,O=w&&ie(v)?v:h,S=w&&y||f,N=w&&b||m,F=fe(se(D)?D.enter:D);"production"!==process.env.NODE_ENV&&null!=F&&ss(F,"enter",e);var T=!1!==o&&!Je,M=ls(O),I=n._enterCb=Be((function(){T&&(Xi(n,k),Xi(n,_)),I.cancelled?(T&&Xi(n,A),N&&N(n)):S&&S(n),n._enterCb=null}));e.data.show||Wt(e,"insert",(function(){var t=n.parentNode,r=t&&t._pending&&t._pending[e.key];r&&r.tag===e.tag&&r.elm._leaveCb&&r.elm._leaveCb(),O&&O(n,I)})),x&&x(n),T&&(Yi(n,A),Yi(n,_),Ji((function(){Xi(n,A),I.cancelled||(Yi(n,k),M||(as(F)?setTimeout(I,F):Qi(n,i,I)))}))),e.data.show&&(t&&t(),O&&O(n,I)),T||M||I()}}}function is(e,t){var n=e.elm;ne(n._enterCb)&&(n._enterCb.cancelled=!0,n._enterCb());var r=ji(e.data.transition);if(te(r)||1!==n.nodeType)return t();if(!ne(n._leaveCb)){var o=r.css,i=r.type,s=r.leaveClass,a=r.leaveToClass,l=r.leaveActiveClass,c=r.beforeLeave,u=r.leave,d=r.afterLeave,p=r.leaveCancelled,h=r.delayLeave,f=r.duration,m=!1!==o&&!Je,g=ls(u),v=fe(se(f)?f.leave:f);"production"!==process.env.NODE_ENV&&ne(v)&&ss(v,"leave",e);var y=n._leaveCb=Be((function(){n.parentNode&&n.parentNode._pending&&(n.parentNode._pending[e.key]=null),m&&(Xi(n,a),Xi(n,l)),y.cancelled?(m&&Xi(n,s),p&&p(n)):(t(),d&&d(n)),n._leaveCb=null}));h?h(b):b()}function b(){y.cancelled||(!e.data.show&&n.parentNode&&((n.parentNode._pending||(n.parentNode._pending={}))[e.key]=e),c&&c(n),m&&(Yi(n,s),Yi(n,l),Ji((function(){Xi(n,s),y.cancelled||(Yi(n,a),g||(as(v)?setTimeout(y,v):Qi(n,i,y)))}))),u&&u(n,y),m||g||y())}}function ss(e,t,n){"number"!=typeof e?Tr("<transition> explicit ".concat(t," duration is not a valid number - ")+"got ".concat(JSON.stringify(e),"."),n.context):isNaN(e)&&Tr("<transition> explicit ".concat(t," duration is NaN - ")+"the duration expression might be incorrect.",n.context)}function as(e){return"number"==typeof e&&!isNaN(e)}function ls(e){if(te(e))return!1;var t=e.fns;return ne(t)?ls(Array.isArray(t)?t[0]:t):(e._length||e.length)>1}function cs(e,t){!0!==t.data.show&&rs(t)}var us=function(e){var t,n,r={},o=e.modules,i=e.nodeOps;for(t=0;t<ei.length;++t)for(r[ei[t]]=[],n=0;n<o.length;++n)ne(o[n][ei[t]])&&r[ei[t]].push(o[n][ei[t]]);function s(e){var t=i.parentNode(e);ne(t)&&i.removeChild(t,e)}function a(e,t){return!t&&!e.ns&&!(ze.ignoredElements.length&&ze.ignoredElements.some((function(t){return ue(t)?t.test(e.tag):t===e.tag})))&&ze.isUnknownElement(e.tag)}var l=0;function c(e,t,n,o,s,c,h){if(ne(e.elm)&&ne(c)&&(e=c[h]=ht(e)),e.isRootInsert=!s,!function(e,t,n,o){var i=e.data;if(ne(i)){var s=ne(e.componentInstance)&&i.keepAlive;if(ne(i=i.hook)&&ne(i=i.init)&&i(e,!1),ne(e.componentInstance))return u(e,t),d(n,e.elm,o),re(s)&&function(e,t,n,o){var i,s=e;for(;s.componentInstance;)if(ne(i=(s=s.componentInstance._vnode).data)&&ne(i=i.transition)){for(i=0;i<r.activate.length;++i)r.activate[i](Zo,s);t.push(s);break}d(n,e.elm,o)}(e,t,n,o),!0}}(e,t,n,o)){var g=e.data,v=e.children,y=e.tag;ne(y)?("production"!==process.env.NODE_ENV&&(g&&g.pre&&l++,a(e,l)&&Tr("Unknown custom element: <"+y+'> - did you register the component correctly? For recursive components, make sure to provide the "name" option.',e.context)),e.elm=e.ns?i.createElementNS(e.ns,y):i.createElement(y,e),m(e),p(e,v,t),ne(g)&&f(e,t),d(n,e.elm,o),"production"!==process.env.NODE_ENV&&g&&g.pre&&l--):re(e.isComment)?(e.elm=i.createComment(e.text),d(n,e.elm,o)):(e.elm=i.createTextNode(e.text),d(n,e.elm,o))}}function u(e,t){ne(e.data.pendingInsert)&&(t.push.apply(t,e.data.pendingInsert),e.data.pendingInsert=null),e.elm=e.componentInstance.$el,h(e)?(f(e,t),m(e)):(Xo(e),t.push(e))}function d(e,t,n){ne(e)&&(ne(n)?i.parentNode(n)===e&&i.insertBefore(e,t,n):i.appendChild(e,t))}function p(e,t,n){if(ee(t)){"production"!==process.env.NODE_ENV&&D(t);for(var r=0;r<t.length;++r)c(t[r],n,e.elm,null,!0,t,r)}else oe(e.text)&&i.appendChild(e.elm,i.createTextNode(String(e.text)))}function h(e){for(;e.componentInstance;)e=e.componentInstance._vnode;return ne(e.tag)}function f(e,n){for(var o=0;o<r.create.length;++o)r.create[o](Zo,e);ne(t=e.data.hook)&&(ne(t.create)&&t.create(Zo,e),ne(t.insert)&&n.push(e))}function m(e){var t;if(ne(t=e.fnScopeId))i.setStyleScope(e.elm,t);else for(var n=e;n;)ne(t=n.context)&&ne(t=t.$options._scopeId)&&i.setStyleScope(e.elm,t),n=n.parent;ne(t=tr)&&t!==e.context&&t!==e.fnContext&&ne(t=t.$options._scopeId)&&i.setStyleScope(e.elm,t)}function g(e,t,n,r,o,i){for(;r<=o;++r)c(n[r],i,e,t,!1,n,r)}function v(e){var t,n,o=e.data;if(ne(o))for(ne(t=o.hook)&&ne(t=t.destroy)&&t(e),t=0;t<r.destroy.length;++t)r.destroy[t](e);if(ne(t=e.children))for(n=0;n<e.children.length;++n)v(e.children[n])}function y(e,t,n){for(;t<=n;++t){var r=e[t];ne(r)&&(ne(r.tag)?(b(r),v(r)):s(r.elm))}}function b(e,t){if(ne(t)||ne(e.data)){var n,o=r.remove.length+1;for(ne(t)?t.listeners+=o:t=function(e,t){function n(){0==--n.listeners&&s(e)}return n.listeners=t,n}(e.elm,o),ne(n=e.componentInstance)&&ne(n=n._vnode)&&ne(n.data)&&b(n,t),n=0;n<r.remove.length;++n)r.remove[n](e,t);ne(n=e.data.hook)&&ne(n=n.remove)?n(e,t):t()}else s(e.elm)}function D(e){for(var t={},n=0;n<e.length;n++){var r=e[n],o=r.key;ne(o)&&(t[o]?Tr("Duplicate keys detected: '".concat(o,"'. This may cause an update error."),r.context):t[o]=!0)}}function E(e,t,n,r){for(var o=n;o<r;o++){var i=t[o];if(ne(i)&&ti(e,i))return o}}function C(e,t,n,o,s,a){if(e!==t){ne(t.elm)&&ne(o)&&(t=o[s]=ht(t));var l=t.elm=e.elm;if(re(e.isAsyncPlaceholder))ne(t.asyncFactory.resolved)?k(e.elm,t,n):t.isAsyncPlaceholder=!0;else if(re(t.isStatic)&&re(e.isStatic)&&t.key===e.key&&(re(t.isCloned)||re(t.isOnce)))t.componentInstance=e.componentInstance;else{var u,d=t.data;ne(d)&&ne(u=d.hook)&&ne(u=u.prepatch)&&u(e,t);var p=e.children,f=t.children;if(ne(d)&&h(t)){for(u=0;u<r.update.length;++u)r.update[u](e,t);ne(u=d.hook)&&ne(u=u.update)&&u(e,t)}te(t.text)?ne(p)&&ne(f)?p!==f&&function(e,t,n,r,o){var s,a,l,u=0,d=0,p=t.length-1,h=t[0],f=t[p],m=n.length-1,v=n[0],b=n[m],w=!o;for("production"!==process.env.NODE_ENV&&D(n);u<=p&&d<=m;)te(h)?h=t[++u]:te(f)?f=t[--p]:ti(h,v)?(C(h,v,r,n,d),h=t[++u],v=n[++d]):ti(f,b)?(C(f,b,r,n,m),f=t[--p],b=n[--m]):ti(h,b)?(C(h,b,r,n,m),w&&i.insertBefore(e,h.elm,i.nextSibling(f.elm)),h=t[++u],b=n[--m]):ti(f,v)?(C(f,v,r,n,d),w&&i.insertBefore(e,f.elm,h.elm),f=t[--p],v=n[++d]):(te(s)&&(s=ni(t,u,p)),te(a=ne(v.key)?s[v.key]:E(v,t,u,p))?c(v,r,e,h.elm,!1,n,d):ti(l=t[a],v)?(C(l,v,r,n,d),t[a]=void 0,w&&i.insertBefore(e,l.elm,h.elm)):c(v,r,e,h.elm,!1,n,d),v=n[++d]);u>p?g(e,te(n[m+1])?null:n[m+1].elm,n,d,m,r):d>m&&y(t,u,p)}(l,p,f,n,a):ne(f)?("production"!==process.env.NODE_ENV&&D(f),ne(e.text)&&i.setTextContent(l,""),g(l,null,f,0,f.length-1,n)):ne(p)?y(p,0,p.length-1):ne(e.text)&&i.setTextContent(l,""):e.text!==t.text&&i.setTextContent(l,t.text),ne(d)&&ne(u=d.hook)&&ne(u=u.postpatch)&&u(e,t)}}}function w(e,t,n){if(re(n)&&ne(e.parent))e.parent.data.pendingInsert=t;else for(var r=0;r<t.length;++r)t[r].data.hook.insert(t[r])}var A=!1,_=me("attrs,class,staticClass,staticStyle,key");function k(e,t,n,r){var o,i=t.tag,s=t.data,l=t.children;if(r=r||s&&s.pre,t.elm=e,re(t.isComment)&&ne(t.asyncFactory))return t.isAsyncPlaceholder=!0,!0;if("production"!==process.env.NODE_ENV&&!function(e,t,n){return ne(t.tag)?0===t.tag.indexOf("vue-component")||!a(t,n)&&t.tag.toLowerCase()===(e.tagName&&e.tagName.toLowerCase()):e.nodeType===(t.isComment?8:3)}(e,t,r))return!1;if(ne(s)&&(ne(o=s.hook)&&ne(o=o.init)&&o(t,!0),ne(o=t.componentInstance)))return u(t,n),!0;if(ne(i)){if(ne(l))if(e.hasChildNodes())if(ne(o=s)&&ne(o=o.domProps)&&ne(o=o.innerHTML)){if(o!==e.innerHTML)return"production"===process.env.NODE_ENV||"undefined"==typeof console||A||(A=!0,console.warn("Parent: ",e),console.warn("server innerHTML: ",o),console.warn("client innerHTML: ",e.innerHTML)),!1}else{for(var c=!0,d=e.firstChild,h=0;h<l.length;h++){if(!d||!k(d,l[h],n,r)){c=!1;break}d=d.nextSibling}if(!c||d)return"production"===process.env.NODE_ENV||"undefined"==typeof console||A||(A=!0,console.warn("Parent: ",e),console.warn("Mismatching childNodes vs. VNodes: ",e.childNodes,l)),!1}else p(t,l,n);if(ne(s)){var m=!1;for(var g in s)if(!_(g)){m=!0,f(t,n);break}!m&&s.class&&Vn(s.class)}}else e.data!==t.text&&(e.data=t.text);return!0}return function(e,t,n,o){if(!te(t)){var s,a=!1,l=[];if(te(e))a=!0,c(t,l);else{var u=ne(e.nodeType);if(!u&&ti(e,t))C(e,t,l,null,null,o);else{if(u){if(1===e.nodeType&&e.hasAttribute("data-server-rendered")&&(e.removeAttribute("data-server-rendered"),n=!0),re(n)){if(k(e,t,l))return w(t,l,!0),e;"production"!==process.env.NODE_ENV&&Tr("The client-side rendered virtual DOM tree is not matching server-rendered content. This is likely caused by incorrect HTML markup, for example nesting block-level elements inside <p>, or missing <tbody>. Bailing hydration and performing full client-side render.")}s=e,e=new ut(i.tagName(s).toLowerCase(),{},[],void 0,s)}var d=e.elm,p=i.parentNode(d);if(c(t,l,d._leaveCb?null:p,i.nextSibling(d)),ne(t.parent))for(var f=t.parent,m=h(t);f;){for(var g=0;g<r.destroy.length;++g)r.destroy[g](f);if(f.elm=t.elm,m){for(var b=0;b<r.create.length;++b)r.create[b](Zo,f);var D=f.data.hook.insert;if(D.merged)for(var E=1;E<D.fns.length;E++)D.fns[E]()}else Xo(f);f=f.parent}ne(p)?y([e],0,0):ne(e.tag)&&v(e)}}return w(t,l,a),t.elm}ne(e)&&v(e)}}({nodeOps:Jo,modules:[hi,gi,wi,ki,Li,We?{create:cs,activate:cs,remove:function(e,t){!0!==e.data.show?is(e,t):t()}}:{}].concat(ci)});Je&&document.addEventListener("selectionchange",(function(){var e=document.activeElement;e&&e.vmodel&&ys(e,"input")}));var ds={inserted:function(e,t,n,r){"select"===n.tag?(r.elm&&!r.elm._vOptions?Wt(n,"postpatch",(function(){ds.componentUpdated(e,t,n)})):ps(e,t,n.context),e._vOptions=[].map.call(e.options,ms)):("textarea"===n.tag||Go(e.type))&&(e._vModifiers=t.modifiers,t.modifiers.lazy||(e.addEventListener("compositionstart",gs),e.addEventListener("compositionend",vs),e.addEventListener("change",vs),Je&&(e.vmodel=!0)))},componentUpdated:function(e,t,n){if("select"===n.tag){ps(e,t,n.context);var r=e._vOptions,o=e._vOptions=[].map.call(e.options,ms);if(o.some((function(e,t){return!Ie(e,r[t])})))(e.multiple?t.value.some((function(e){return fs(e,o)})):t.value!==t.oldValue&&fs(t.value,o))&&ys(e,"change")}}};function ps(e,t,n){hs(e,t,n),(Ge||Ye)&&setTimeout((function(){hs(e,t,n)}),0)}function hs(e,t,n){var r=t.value,o=e.multiple;if(!o||Array.isArray(r)){for(var i,s,a=0,l=e.options.length;a<l;a++)if(s=e.options[a],o)i=$e(r,ms(s))>-1,s.selected!==i&&(s.selected=i);else if(Ie(ms(s),r))return void(e.selectedIndex!==a&&(e.selectedIndex=a));o||(e.selectedIndex=-1)}else"production"!==process.env.NODE_ENV&&Tr('<select multiple v-model="'.concat(t.expression,'"> ')+"expects an Array value for its binding, but got ".concat(Object.prototype.toString.call(r).slice(8,-1)),n)}function fs(e,t){return t.every((function(t){return!Ie(t,e)}))}function ms(e){return"_value"in e?e._value:e.value}function gs(e){e.target.composing=!0}function vs(e){e.target.composing&&(e.target.composing=!1,ys(e.target,"input"))}function ys(e,t){var n=document.createEvent("HTMLEvents");n.initEvent(t,!0,!0),e.dispatchEvent(n)}function bs(e){return!e.componentInstance||e.data&&e.data.transition?e:bs(e.componentInstance._vnode)}var Ds={bind:function(e,t,n){var r=t.value,o=(n=bs(n)).data&&n.data.transition,i=e.__vOriginalDisplay="none"===e.style.display?"":e.style.display;r&&o?(n.data.show=!0,rs(n,(function(){e.style.display=i}))):e.style.display=r?i:"none"},update:function(e,t,n){var r=t.value;!r!=!t.oldValue&&((n=bs(n)).data&&n.data.transition?(n.data.show=!0,r?rs(n,(function(){e.style.display=e.__vOriginalDisplay})):is(n,(function(){e.style.display="none"}))):e.style.display=r?e.__vOriginalDisplay:"none")},unbind:function(e,t,n,r,o){o||(e.style.display=e.__vOriginalDisplay)}},Es={model:ds,show:Ds},Cs={name:String,appear:Boolean,css:Boolean,mode:String,type:String,enterClass:String,leaveClass:String,enterToClass:String,leaveToClass:String,enterActiveClass:String,leaveActiveClass:String,appearClass:String,appearActiveClass:String,appearToClass:String,duration:[Number,String,Object]};function ws(e){var t=e&&e.componentOptions;return t&&t.Ctor.options.abstract?ws(_n(t.children)):e}function As(e){var t={},n=e.$options;for(var r in n.propsData)t[r]=e[r];var o=n._parentListeners;for(var r in o)t[we(r)]=o[r];return t}function _s(e,t){if(/\d-keep-alive$/.test(t.tag))return e("keep-alive",{props:t.componentOptions.propsData})}var ks=function(e){return e.tag||mn(e)},xs=function(e){return"show"===e.name},Os={name:"transition",props:Cs,abstract:!0,render:function(e){var t=this,n=this.$slots.default;if(n&&(n=n.filter(ks)).length){"production"!==process.env.NODE_ENV&&n.length>1&&Tr("<transition> can only be used on a single element. Use <transition-group> for lists.",this.$parent);var r=this.mode;"production"!==process.env.NODE_ENV&&r&&"in-out"!==r&&"out-in"!==r&&Tr("invalid <transition> mode: "+r,this.$parent);var o=n[0];if(function(e){for(;e=e.parent;)if(e.data.transition)return!0}(this.$vnode))return o;var i=ws(o);if(!i)return o;if(this._leaving)return _s(e,o);var s="__transition-".concat(this._uid,"-");i.key=null==i.key?i.isComment?s+"comment":s+i.tag:oe(i.key)?0===String(i.key).indexOf(s)?i.key:s+i.key:i.key;var a=(i.data||(i.data={})).transition=As(this),l=this._vnode,c=ws(l);if(i.data.directives&&i.data.directives.some(xs)&&(i.data.show=!0),c&&c.data&&!function(e,t){return t.key===e.key&&t.tag===e.tag}(i,c)&&!mn(c)&&(!c.componentInstance||!c.componentInstance._vnode.isComment)){var u=c.data.transition=Se({},a);if("out-in"===r)return this._leaving=!0,Wt(u,"afterLeave",(function(){t._leaving=!1,t.$forceUpdate()})),_s(e,o);if("in-out"===r){if(mn(i))return l;var d,p=function(){d()};Wt(a,"afterEnter",p),Wt(a,"enterCancelled",p),Wt(u,"delayLeave",(function(e){d=e}))}}return o}}},Ss=Se({tag:String,moveClass:String},Cs);delete Ss.mode;var Ns={props:Ss,beforeMount:function(){var e=this,t=this._update;this._update=function(n,r){var o=rr(e);e.__patch__(e._vnode,e.kept,!1,!0),e._vnode=e.kept,o(),t.call(e,n,r)}},render:function(e){for(var t=this.tag||this.$vnode.data.tag||"span",n=Object.create(null),r=this.prevChildren=this.children,o=this.$slots.default||[],i=this.children=[],s=As(this),a=0;a<o.length;a++){if((p=o[a]).tag)if(null!=p.key&&0!==String(p.key).indexOf("__vlist"))i.push(p),n[p.key]=p,(p.data||(p.data={})).transition=s;else if("production"!==process.env.NODE_ENV){var l=p.componentOptions,c=l?_r(l.Ctor.options)||l.tag||"":p.tag;Tr("<transition-group> children must be keyed: <".concat(c,">"))}}if(r){var u=[],d=[];for(a=0;a<r.length;a++){var p;(p=r[a]).data.transition=s,p.data.pos=p.elm.getBoundingClientRect(),n[p.key]?u.push(p):d.push(p)}this.kept=e(t,null,u),this.removed=d}return e(t,null,i)},updated:function(){var e=this.prevChildren,t=this.moveClass||(this.name||"v")+"-move";e.length&&this.hasMove(e[0].elm,t)&&(e.forEach(Fs),e.forEach(Ts),e.forEach(Ms),this._reflow=document.body.offsetHeight,e.forEach((function(e){if(e.data.moved){var n=e.elm,r=n.style;Yi(n,t),r.transform=r.WebkitTransform=r.transitionDuration="",n.addEventListener(qi,n._moveCb=function e(r){r&&r.target!==n||r&&!/transform$/.test(r.propertyName)||(n.removeEventListener(qi,e),n._moveCb=null,Xi(n,t))})}})))},methods:{hasMove:function(e,t){if(!Vi)return!1;if(this._hasMove)return this._hasMove;var n=e.cloneNode();e._transitionClasses&&e._transitionClasses.forEach((function(e){zi(n,e)})),Ri(n,t),n.style.display="none",this.$el.appendChild(n);var r=es(n);return this.$el.removeChild(n),this._hasMove=r.hasTransform}}};function Fs(e){e.elm._moveCb&&e.elm._moveCb(),e.elm._enterCb&&e.elm._enterCb()}function Ts(e){e.data.newPos=e.elm.getBoundingClientRect()}function Ms(e){var t=e.data.pos,n=e.data.newPos,r=t.left-n.left,o=t.top-n.top;if(r||o){e.data.moved=!0;var i=e.elm.style;i.transform=i.WebkitTransform="translate(".concat(r,"px,").concat(o,"px)"),i.transitionDuration="0s"}}var Is={Transition:Os,TransitionGroup:Ns};function $s(e){this.content=e}function Bs(e,t,n){for(let r=0;;r++){if(r==e.childCount||r==t.childCount)return e.childCount==t.childCount?null:n;let o=e.child(r),i=t.child(r);if(o!=i){if(!o.sameMarkup(i))return n;if(o.isText&&o.text!=i.text){for(let e=0;o.text[e]==i.text[e];e++)n++;return n}if(o.content.size||i.content.size){let e=Bs(o.content,i.content,n+1);if(null!=e)return e}n+=o.nodeSize}else n+=o.nodeSize}}function Ls(e,t,n,r){for(let o=e.childCount,i=t.childCount;;){if(0==o||0==i)return o==i?null:{a:n,b:r};let s=e.child(--o),a=t.child(--i),l=s.nodeSize;if(s!=a){if(!s.sameMarkup(a))return{a:n,b:r};if(s.isText&&s.text!=a.text){let e=0,t=Math.min(s.text.length,a.text.length);for(;e<t&&s.text[s.text.length-e-1]==a.text[a.text.length-e-1];)e++,n--,r--;return{a:n,b:r}}if(s.content.size||a.content.size){let e=Ls(s.content,a.content,n-1,r-1);if(e)return e}n-=l,r-=l}else n-=l,r-=l}}Eo.config.mustUseProp=function(e,t,n){return"value"===n&&Fo(e)&&"button"!==t||"selected"===n&&"option"===e||"checked"===n&&"input"===e||"muted"===n&&"video"===e},Eo.config.isReservedTag=Wo,Eo.config.isReservedAttr=No,Eo.config.getTagNamespace=function(e){return qo(e)?"svg":"math"===e?"math":void 0},Eo.config.isUnknownElement=function(e){if(!We)return!0;if(Wo(e))return!1;if(e=e.toLowerCase(),null!=Uo[e])return Uo[e];var t=document.createElement(e);return e.indexOf("-")>-1?Uo[e]=t.constructor===window.HTMLUnknownElement||t.constructor===window.HTMLElement:Uo[e]=/HTMLUnknownElement/.test(t.toString())},Se(Eo.options.directives,Es),Se(Eo.options.components,Is),Eo.prototype.__patch__=We?us:Fe,Eo.prototype.$mount=function(e,t){return function(e,t,n){var r;e.$el=t,e.$options.render||(e.$options.render=dt,"production"!==process.env.NODE_ENV&&(e.$options.template&&"#"!==e.$options.template.charAt(0)||e.$options.el||t?Tr("You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.",e):Tr("Failed to mount component: template or render function not defined.",e))),ar(e,"beforeMount"),r="production"!==process.env.NODE_ENV&&ze.performance&&qn?function(){var t=e._name,r=e._uid,o="vue-perf-start:".concat(r),i="vue-perf-end:".concat(r);qn(o);var s=e._render();qn(i),Wn("vue ".concat(t," render"),o,i),qn(o),e._update(s,n),qn(i),Wn("vue ".concat(t," patch"),o,i)}:function(){e._update(e._render(),n)};var o={before:function(){e._isMounted&&!e._isDestroyed&&ar(e,"beforeUpdate")}};"production"!==process.env.NODE_ENV&&(o.onTrack=function(t){return ar(e,"renderTracked",[t])},o.onTrigger=function(t){return ar(e,"renderTriggered",[t])}),new Jn(e,r,Fe,o,!0),n=!1;var i=e._preWatchers;if(i)for(var s=0;s<i.length;s++)i[s].run();return null==e.$vnode&&(e._isMounted=!0,ar(e,"mounted")),e}(this,e=e&&We?function(e){if("string"==typeof e){return document.querySelector(e)||("production"!==process.env.NODE_ENV&&Tr("Cannot find element: "+e),document.createElement("div"))}return e}(e):void 0,t)},We&&setTimeout((function(){ze.devtools&&(ot?ot.emit("init",Eo):"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&console[console.info?"info":"log"]("Download the Vue Devtools extension for a better development experience:\nhttps://github.com/vuejs/vue-devtools")),"production"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV&&!1!==ze.productionTip&&"undefined"!=typeof console&&console[console.info?"info":"log"]("You are running Vue in development mode.\nMake sure to turn on production mode when deploying for production.\nSee more tips at https://vuejs.org/guide/deployment.html")}),0),$s.prototype={constructor:$s,find:function(e){for(var t=0;t<this.content.length;t+=2)if(this.content[t]===e)return t;return-1},get:function(e){var t=this.find(e);return-1==t?void 0:this.content[t+1]},update:function(e,t,n){var r=n&&n!=e?this.remove(n):this,o=r.find(e),i=r.content.slice();return-1==o?i.push(n||e,t):(i[o+1]=t,n&&(i[o]=n)),new $s(i)},remove:function(e){var t=this.find(e);if(-1==t)return this;var n=this.content.slice();return n.splice(t,2),new $s(n)},addToStart:function(e,t){return new $s([e,t].concat(this.remove(e).content))},addToEnd:function(e,t){var n=this.remove(e).content.slice();return n.push(e,t),new $s(n)},addBefore:function(e,t,n){var r=this.remove(t),o=r.content.slice(),i=r.find(e);return o.splice(-1==i?o.length:i,0,t,n),new $s(o)},forEach:function(e){for(var t=0;t<this.content.length;t+=2)e(this.content[t],this.content[t+1])},prepend:function(e){return(e=$s.from(e)).size?new $s(e.content.concat(this.subtract(e).content)):this},append:function(e){return(e=$s.from(e)).size?new $s(this.subtract(e).content.concat(e.content)):this},subtract:function(e){var t=this;e=$s.from(e);for(var n=0;n<e.content.length;n+=2)t=t.remove(e.content[n]);return t},get size(){return this.content.length>>1}},$s.from=function(e){if(e instanceof $s)return e;var t=[];if(e)for(var n in e)t.push(n,e[n]);return new $s(t)};class Ps{constructor(e,t){if(this.content=e,this.size=t||0,null==t)for(let t=0;t<e.length;t++)this.size+=e[t].nodeSize}nodesBetween(e,t,n,r=0,o){for(let i=0,s=0;s<t;i++){let a=this.content[i],l=s+a.nodeSize;if(l>e&&!1!==n(a,r+s,o||null,i)&&a.content.size){let o=s+1;a.nodesBetween(Math.max(0,e-o),Math.min(a.content.size,t-o),n,r+o)}s=l}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,n,r){let o="",i=!0;return this.nodesBetween(e,t,((s,a)=>{s.isText?(o+=s.text.slice(Math.max(e,a)-a,t-a),i=!n):s.isLeaf?(r?o+="function"==typeof r?r(s):r:s.type.spec.leafText&&(o+=s.type.spec.leafText(s)),i=!n):!i&&s.isBlock&&(o+=n,i=!0)}),0),o}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,n=e.firstChild,r=this.content.slice(),o=0;for(t.isText&&t.sameMarkup(n)&&(r[r.length-1]=t.withText(t.text+n.text),o=1);o<e.content.length;o++)r.push(e.content[o]);return new Ps(r,this.size+e.size)}cut(e,t=this.size){if(0==e&&t==this.size)return this;let n=[],r=0;if(t>e)for(let o=0,i=0;i<t;o++){let s=this.content[o],a=i+s.nodeSize;a>e&&((i<e||a>t)&&(s=s.isText?s.cut(Math.max(0,e-i),Math.min(s.text.length,t-i)):s.cut(Math.max(0,e-i-1),Math.min(s.content.size,t-i-1))),n.push(s),r+=s.nodeSize),i=a}return new Ps(n,r)}cutByIndex(e,t){return e==t?Ps.empty:0==e&&t==this.content.length?this:new Ps(this.content.slice(e,t))}replaceChild(e,t){let n=this.content[e];if(n==t)return this;let r=this.content.slice(),o=this.size+t.nodeSize-n.nodeSize;return r[e]=t,new Ps(r,o)}addToStart(e){return new Ps([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new Ps(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,n=0;t<this.content.length;t++){let r=this.content[t];e(r,n,t),n+=r.nodeSize}}findDiffStart(e,t=0){return Bs(this,e,t)}findDiffEnd(e,t=this.size,n=e.size){return Ls(this,e,t,n)}findIndex(e,t=-1){if(0==e)return zs(0,e);if(e==this.size)return zs(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let n=0,r=0;;n++){let o=r+this.child(n).nodeSize;if(o>=e)return o==e||t>0?zs(n+1,o):zs(n,r);r=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map((e=>e.toJSON())):null}static fromJSON(e,t){if(!t)return Ps.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new Ps(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return Ps.empty;let t,n=0;for(let r=0;r<e.length;r++){let o=e[r];n+=o.nodeSize,r&&o.isText&&e[r-1].sameMarkup(o)?(t||(t=e.slice(0,r)),t[t.length-1]=o.withText(t[t.length-1].text+o.text)):t&&t.push(o)}return new Ps(t||e,n)}static from(e){if(!e)return Ps.empty;if(e instanceof Ps)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new Ps([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}Ps.empty=new Ps([],0);const Rs={index:0,offset:0};function zs(e,t){return Rs.index=e,Rs.offset=t,Rs}function js(e,t){if(e===t)return!0;if(!e||"object"!=typeof e||!t||"object"!=typeof t)return!1;let n=Array.isArray(e);if(Array.isArray(t)!=n)return!1;if(n){if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!js(e[n],t[n]))return!1}else{for(let n in e)if(!(n in t)||!js(e[n],t[n]))return!1;for(let n in t)if(!(n in e))return!1}return!0}class Hs{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,n=!1;for(let r=0;r<e.length;r++){let o=e[r];if(this.eq(o))return e;if(this.type.excludes(o.type))t||(t=e.slice(0,r));else{if(o.type.excludes(this.type))return e;!n&&o.type.rank>this.type.rank&&(t||(t=e.slice(0,r)),t.push(this),n=!0),t&&t.push(o)}}return t||(t=e.slice()),n||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&js(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let n=e.marks[t.type];if(!n)throw new RangeError(`There is no mark type ${t.type} in this schema`);return n.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let n=0;n<e.length;n++)if(!e[n].eq(t[n]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&0==e.length)return Hs.none;if(e instanceof Hs)return[e];let t=e.slice();return t.sort(((e,t)=>e.type.rank-t.type.rank)),t}}Hs.none=[];class Vs extends Error{}class Ks{constructor(e,t,n){this.content=e,this.openStart=t,this.openEnd=n}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let n=Ws(this.content,e+this.openStart,t);return n&&new Ks(n,this.openStart,this.openEnd)}removeBetween(e,t){return new Ks(qs(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return Ks.empty;let n=t.openStart||0,r=t.openEnd||0;if("number"!=typeof n||"number"!=typeof r)throw new RangeError("Invalid input for Slice.fromJSON");return new Ks(Ps.fromJSON(e,t.content),n,r)}static maxOpen(e,t=!0){let n=0,r=0;for(let r=e.firstChild;r&&!r.isLeaf&&(t||!r.type.spec.isolating);r=r.firstChild)n++;for(let n=e.lastChild;n&&!n.isLeaf&&(t||!n.type.spec.isolating);n=n.lastChild)r++;return new Ks(e,n,r)}}function qs(e,t,n){let{index:r,offset:o}=e.findIndex(t),i=e.maybeChild(r),{index:s,offset:a}=e.findIndex(n);if(o==t||i.isText){if(a!=n&&!e.child(s).isText)throw new RangeError("Removing non-flat range");return e.cut(0,t).append(e.cut(n))}if(r!=s)throw new RangeError("Removing non-flat range");return e.replaceChild(r,i.copy(qs(i.content,t-o-1,n-o-1)))}function Ws(e,t,n,r){let{index:o,offset:i}=e.findIndex(t),s=e.maybeChild(o);if(i==t||s.isText)return r&&!r.canReplace(o,o,n)?null:e.cut(0,t).append(n).append(e.cut(t));let a=Ws(s.content,t-i-1,n);return a&&e.replaceChild(o,s.copy(a))}function Us(e,t,n){if(n.openStart>e.depth)throw new Vs("Inserted content deeper than insertion position");if(e.depth-n.openStart!=t.depth-n.openEnd)throw new Vs("Inconsistent open depths");return Gs(e,t,n,0)}function Gs(e,t,n,r){let o=e.index(r),i=e.node(r);if(o==t.index(r)&&r<e.depth-n.openStart){let s=Gs(e,t,n,r+1);return i.copy(i.content.replaceChild(o,s))}if(n.content.size){if(n.openStart||n.openEnd||e.depth!=r||t.depth!=r){let{start:o,end:s}=function(e,t){let n=t.depth-e.openStart,r=t.node(n).copy(e.content);for(let e=n-1;e>=0;e--)r=t.node(e).copy(Ps.from(r));return{start:r.resolveNoCache(e.openStart+n),end:r.resolveNoCache(r.content.size-e.openEnd-n)}}(n,e);return Zs(i,ea(e,o,s,t,r))}{let r=e.parent,o=r.content;return Zs(r,o.cut(0,e.parentOffset).append(n.content).append(o.cut(t.parentOffset)))}}return Zs(i,ta(e,t,r))}function Js(e,t){if(!t.type.compatibleContent(e.type))throw new Vs("Cannot join "+t.type.name+" onto "+e.type.name)}function Ys(e,t,n){let r=e.node(n);return Js(r,t.node(n)),r}function Xs(e,t){let n=t.length-1;n>=0&&e.isText&&e.sameMarkup(t[n])?t[n]=e.withText(t[n].text+e.text):t.push(e)}function Qs(e,t,n,r){let o=(t||e).node(n),i=0,s=t?t.index(n):o.childCount;e&&(i=e.index(n),e.depth>n?i++:e.textOffset&&(Xs(e.nodeAfter,r),i++));for(let e=i;e<s;e++)Xs(o.child(e),r);t&&t.depth==n&&t.textOffset&&Xs(t.nodeBefore,r)}function Zs(e,t){if(!e.type.validContent(t))throw new Vs("Invalid content for node "+e.type.name);return e.copy(t)}function ea(e,t,n,r,o){let i=e.depth>o&&Ys(e,t,o+1),s=r.depth>o&&Ys(n,r,o+1),a=[];return Qs(null,e,o,a),i&&s&&t.index(o)==n.index(o)?(Js(i,s),Xs(Zs(i,ea(e,t,n,r,o+1)),a)):(i&&Xs(Zs(i,ta(e,t,o+1)),a),Qs(t,n,o,a),s&&Xs(Zs(s,ta(n,r,o+1)),a)),Qs(r,null,o,a),new Ps(a)}function ta(e,t,n){let r=[];if(Qs(null,e,n,r),e.depth>n){Xs(Zs(Ys(e,t,n+1),ta(e,t,n+1)),r)}return Qs(t,null,n,r),new Ps(r)}Ks.empty=new Ks(Ps.empty,0,0);class na{constructor(e,t,n){this.pos=e,this.path=t,this.parentOffset=n,this.depth=t.length/3-1}resolveDepth(e){return null==e?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[3*this.resolveDepth(e)]}index(e){return this.path[3*this.resolveDepth(e)+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e!=this.depth||this.textOffset?1:0)}start(e){return 0==(e=this.resolveDepth(e))?0:this.path[3*e-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]}after(e){if(!(e=this.resolveDepth(e)))throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[3*e-1]+this.path[3*e].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let n=this.pos-this.path[this.path.length-1],r=e.child(t);return n?e.child(t).cut(n):r}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):0==e?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let n=this.path[3*t],r=0==t?0:this.path[3*t-1]+1;for(let t=0;t<e;t++)r+=n.child(t).nodeSize;return r}marks(){let e=this.parent,t=this.index();if(0==e.content.size)return Hs.none;if(this.textOffset)return e.child(t).marks;let n=e.maybeChild(t-1),r=e.maybeChild(t);if(!n){let e=n;n=r,r=e}let o=n.marks;for(var i=0;i<o.length;i++)!1!==o[i].type.spec.inclusive||r&&o[i].isInSet(r.marks)||(o=o[i--].removeFromSet(o));return o}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let n=t.marks,r=e.parent.maybeChild(e.index());for(var o=0;o<n.length;o++)!1!==n[o].type.spec.inclusive||r&&n[o].isInSet(r.marks)||(n=n[o--].removeFromSet(n));return n}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let n=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);n>=0;n--)if(e.pos<=this.end(n)&&(!t||t(this.node(n))))return new sa(this,e,n);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let n=[],r=0,o=t;for(let t=e;;){let{index:e,offset:i}=t.content.findIndex(o),s=o-i;if(n.push(t,e,r+i),!s)break;if(t=t.child(e),t.isText)break;o=s-1,r+=i+1}return new na(t,n,o)}static resolveCached(e,t){for(let n=0;n<ra.length;n++){let r=ra[n];if(r.pos==t&&r.doc==e)return r}let n=ra[oa]=na.resolve(e,t);return oa=(oa+1)%ia,n}}let ra=[],oa=0,ia=12;class sa{constructor(e,t,n){this.$from=e,this.$to=t,this.depth=n}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const aa=Object.create(null);class la{constructor(e,t,n,r=Hs.none){this.type=e,this.attrs=t,this.marks=r,this.content=n||Ps.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,n,r=0){this.content.nodesBetween(e,t,n,r,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,n,r){return this.content.textBetween(e,t,n,r)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,n){return this.type==e&&js(this.attrs,t||e.defaultAttrs||aa)&&Hs.sameSet(this.marks,n||Hs.none)}copy(e=null){return e==this.content?this:new la(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new la(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return 0==e&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,n=!1){if(e==t)return Ks.empty;let r=this.resolve(e),o=this.resolve(t),i=n?0:r.sharedDepth(t),s=r.start(i),a=r.node(i).content.cut(r.pos-s,o.pos-s);return new Ks(a,r.depth-i,o.depth-i)}replace(e,t,n){return Us(this.resolve(e),this.resolve(t),n)}nodeAt(e){for(let t=this;;){let{index:n,offset:r}=t.content.findIndex(e);if(t=t.maybeChild(n),!t)return null;if(r==e||t.isText)return t;e-=r+1}}childAfter(e){let{index:t,offset:n}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:n}}childBefore(e){if(0==e)return{node:null,index:0,offset:0};let{index:t,offset:n}=this.content.findIndex(e);if(n<e)return{node:this.content.child(t),index:t,offset:n};let r=this.content.child(t-1);return{node:r,index:t-1,offset:n-r.nodeSize}}resolve(e){return na.resolveCached(this,e)}resolveNoCache(e){return na.resolve(this,e)}rangeHasMark(e,t,n){let r=!1;return t>e&&this.nodesBetween(e,t,(e=>(n.isInSet(e.marks)&&(r=!0),!r))),r}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),ua(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,n=Ps.empty,r=0,o=n.childCount){let i=this.contentMatchAt(e).matchFragment(n,r,o),s=i&&i.matchFragment(this.content,t);if(!s||!s.validEnd)return!1;for(let e=r;e<o;e++)if(!this.type.allowsMarks(n.child(e).marks))return!1;return!0}canReplaceWith(e,t,n,r){if(r&&!this.type.allowsMarks(r))return!1;let o=this.contentMatchAt(e).matchType(n),i=o&&o.matchFragment(this.content,t);return!!i&&i.validEnd}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){if(!this.type.validContent(this.content))throw new RangeError(`Invalid content for node ${this.type.name}: ${this.content.toString().slice(0,50)}`);let e=Hs.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!Hs.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map((e=>e.type.name))}`);this.content.forEach((e=>e.check()))}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map((e=>e.toJSON()))),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let n=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");n=t.marks.map(e.markFromJSON)}if("text"==t.type){if("string"!=typeof t.text)throw new RangeError("Invalid text node in JSON");return e.text(t.text,n)}let r=Ps.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,r,n)}}la.prototype.text=void 0;class ca extends la{constructor(e,t,n,r){if(super(e,t,null,r),!n)throw new RangeError("Empty text nodes are not allowed");this.text=n}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):ua(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new ca(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new ca(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return 0==e&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function ua(e,t){for(let n=e.length-1;n>=0;n--)t=e[n].type.name+"("+t+")";return t}class da{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let n=new pa(e,t);if(null==n.next)return da.empty;let r=ha(n);n.next&&n.err("Unexpected trailing text");let o=function(e){let t=Object.create(null);return n(ba(e,0));function n(r){let o=[];r.forEach((t=>{e[t].forEach((({term:t,to:n})=>{if(!t)return;let r;for(let e=0;e<o.length;e++)o[e][0]==t&&(r=o[e][1]);ba(e,n).forEach((e=>{r||o.push([t,r=[]]),-1==r.indexOf(e)&&r.push(e)}))}))}));let i=t[r.join(",")]=new da(r.indexOf(e.length-1)>-1);for(let e=0;e<o.length;e++){let r=o[e][1].sort(ya);i.next.push({type:o[e][0],next:t[r.join(",")]||n(r)})}return i}}(function(e){let t=[[]];return o(i(e,0),n()),t;function n(){return t.push([])-1}function r(e,n,r){let o={term:r,to:n};return t[e].push(o),o}function o(e,t){e.forEach((e=>e.to=t))}function i(e,t){if("choice"==e.type)return e.exprs.reduce(((e,n)=>e.concat(i(n,t))),[]);if("seq"!=e.type){if("star"==e.type){let s=n();return r(t,s),o(i(e.expr,s),s),[r(s)]}if("plus"==e.type){let s=n();return o(i(e.expr,t),s),o(i(e.expr,s),s),[r(s)]}if("opt"==e.type)return[r(t)].concat(i(e.expr,t));if("range"==e.type){let s=t;for(let t=0;t<e.min;t++){let t=n();o(i(e.expr,s),t),s=t}if(-1==e.max)o(i(e.expr,s),s);else for(let t=e.min;t<e.max;t++){let t=n();r(s,t),o(i(e.expr,s),t),s=t}return[r(s)]}if("name"==e.type)return[r(t,void 0,e.value)];throw new Error("Unknown expr type")}for(let r=0;;r++){let s=i(e.exprs[r],t);if(r==e.exprs.length-1)return s;o(s,t=n())}}}(r));return function(e,t){for(let n=0,r=[e];n<r.length;n++){let e=r[n],o=!e.validEnd,i=[];for(let t=0;t<e.next.length;t++){let{type:n,next:s}=e.next[t];i.push(n.name),!o||n.isText||n.hasRequiredAttrs()||(o=!1),-1==r.indexOf(s)&&r.push(s)}o&&t.err("Only non-generatable nodes ("+i.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}(o,n),o}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,n=e.childCount){let r=this;for(let o=t;r&&o<n;o++)r=r.matchType(e.child(o).type);return r}get inlineContent(){return this.next.length&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!t.isText&&!t.hasRequiredAttrs())return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let n=0;n<e.next.length;n++)if(this.next[t].type==e.next[n].type)return!0;return!1}fillBefore(e,t=!1,n=0){let r=[this];return function o(i,s){let a=i.matchFragment(e,n);if(a&&(!t||a.validEnd))return Ps.from(s.map((e=>e.createAndFill())));for(let e=0;e<i.next.length;e++){let{type:t,next:n}=i.next[e];if(!t.isText&&!t.hasRequiredAttrs()&&-1==r.indexOf(n)){r.push(n);let e=o(n,s.concat(t));if(e)return e}}return null}(this,[])}findWrapping(e){for(let t=0;t<this.wrapCache.length;t+=2)if(this.wrapCache[t]==e)return this.wrapCache[t+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),n=[{match:this,type:null,via:null}];for(;n.length;){let r=n.shift(),o=r.match;if(o.matchType(e)){let e=[];for(let t=r;t.type;t=t.via)e.push(t.type);return e.reverse()}for(let e=0;e<o.next.length;e++){let{type:i,next:s}=o.next[e];i.isLeaf||i.hasRequiredAttrs()||i.name in t||r.type&&!s.validEnd||(n.push({match:i.contentMatch,type:i,via:r}),t[i.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];return function t(n){e.push(n);for(let r=0;r<n.next.length;r++)-1==e.indexOf(n.next[r].next)&&t(n.next[r].next)}(this),e.map(((t,n)=>{let r=n+(t.validEnd?"*":" ")+" ";for(let n=0;n<t.next.length;n++)r+=(n?", ":"")+t.next[n].type.name+"->"+e.indexOf(t.next[n].next);return r})).join("\n")}}da.empty=new da(!0);class pa{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),""==this.tokens[this.tokens.length-1]&&this.tokens.pop(),""==this.tokens[0]&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ha(e){let t=[];do{t.push(fa(e))}while(e.eat("|"));return 1==t.length?t[0]:{type:"choice",exprs:t}}function fa(e){let t=[];do{t.push(ma(e))}while(e.next&&")"!=e.next&&"|"!=e.next);return 1==t.length?t[0]:{type:"seq",exprs:t}}function ma(e){let t=function(e){if(e.eat("(")){let t=ha(e);return e.eat(")")||e.err("Missing closing paren"),t}if(!/\W/.test(e.next)){let t=function(e,t){let n=e.nodeTypes,r=n[t];if(r)return[r];let o=[];for(let e in n){let r=n[e];r.groups.indexOf(t)>-1&&o.push(r)}0==o.length&&e.err("No node type or group '"+t+"' found");return o}(e,e.next).map((t=>(null==e.inline?e.inline=t.isInline:e.inline!=t.isInline&&e.err("Mixing inline and block content"),{type:"name",value:t})));return e.pos++,1==t.length?t[0]:{type:"choice",exprs:t}}e.err("Unexpected token '"+e.next+"'")}(e);for(;;)if(e.eat("+"))t={type:"plus",expr:t};else if(e.eat("*"))t={type:"star",expr:t};else if(e.eat("?"))t={type:"opt",expr:t};else{if(!e.eat("{"))break;t=va(e,t)}return t}function ga(e){/\D/.test(e.next)&&e.err("Expected number, got '"+e.next+"'");let t=Number(e.next);return e.pos++,t}function va(e,t){let n=ga(e),r=n;return e.eat(",")&&(r="}"!=e.next?ga(e):-1),e.eat("}")||e.err("Unclosed braced range"),{type:"range",min:n,max:r,expr:t}}function ya(e,t){return t-e}function ba(e,t){let n=[];return function t(r){let o=e[r];if(1==o.length&&!o[0].term)return t(o[0].to);n.push(r);for(let e=0;e<o.length;e++){let{term:r,to:i}=o[e];r||-1!=n.indexOf(i)||t(i)}}(t),n.sort(ya)}function Da(e){let t=Object.create(null);for(let n in e){let r=e[n];if(!r.hasDefault)return null;t[n]=r.default}return t}function Ea(e,t){let n=Object.create(null);for(let r in e){let o=t&&t[r];if(void 0===o){let t=e[r];if(!t.hasDefault)throw new RangeError("No value supplied for attribute "+r);o=t.default}n[r]=o}return n}function Ca(e){let t=Object.create(null);if(e)for(let n in e)t[n]=new Aa(e[n]);return t}class wa{constructor(e,t,n){this.name=e,this.schema=t,this.spec=n,this.markSet=null,this.groups=n.group?n.group.split(" "):[],this.attrs=Ca(n.attrs),this.defaultAttrs=Da(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(n.inline||"text"==e),this.isText="text"==e}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==da.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:Ea(this.attrs,e)}create(e=null,t,n){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new la(this,this.computeAttrs(e),Ps.from(t),Hs.setFrom(n))}createChecked(e=null,t,n){if(t=Ps.from(t),!this.validContent(t))throw new RangeError("Invalid content for node "+this.name);return new la(this,this.computeAttrs(e),t,Hs.setFrom(n))}createAndFill(e=null,t,n){if(e=this.computeAttrs(e),(t=Ps.from(t)).size){let e=this.contentMatch.fillBefore(t);if(!e)return null;t=e.append(t)}let r=this.contentMatch.matchFragment(t),o=r&&r.fillBefore(Ps.empty,!0);return o?new la(this,e,t.append(o),Hs.setFrom(n)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let t=0;t<e.childCount;t++)if(!this.allowsMarks(e.child(t).marks))return!1;return!0}allowsMarkType(e){return null==this.markSet||this.markSet.indexOf(e)>-1}allowsMarks(e){if(null==this.markSet)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(null==this.markSet)return e;let t;for(let n=0;n<e.length;n++)this.allowsMarkType(e[n].type)?t&&t.push(e[n]):t||(t=e.slice(0,n));return t?t.length?t:Hs.none:e}static compile(e,t){let n=Object.create(null);e.forEach(((e,r)=>n[e]=new wa(e,t,r)));let r=t.spec.topNode||"doc";if(!n[r])throw new RangeError("Schema is missing its top node type ('"+r+"')");if(!n.text)throw new RangeError("Every schema needs a 'text' type");for(let e in n.text.attrs)throw new RangeError("The text node type should not have attributes");return n}}class Aa{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class _a{constructor(e,t,n,r){this.name=e,this.rank=t,this.schema=n,this.spec=r,this.attrs=Ca(r.attrs),this.excluded=null;let o=Da(this.attrs);this.instance=o?new Hs(this,o):null}create(e=null){return!e&&this.instance?this.instance:new Hs(this,Ea(this.attrs,e))}static compile(e,t){let n=Object.create(null),r=0;return e.forEach(((e,o)=>n[e]=new _a(e,r++,t,o))),n}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class ka{constructor(e){this.cached=Object.create(null),this.spec={nodes:$s.from(e.nodes),marks:$s.from(e.marks||{}),topNode:e.topNode},this.nodes=wa.compile(this.spec.nodes,this),this.marks=_a.compile(this.spec.marks,this);let t=Object.create(null);for(let e in this.nodes){if(e in this.marks)throw new RangeError(e+" can not be both a node and a mark");let n=this.nodes[e],r=n.spec.content||"",o=n.spec.marks;n.contentMatch=t[r]||(t[r]=da.parse(r,this.nodes)),n.inlineContent=n.contentMatch.inlineContent,n.markSet="_"==o?null:o?xa(this,o.split(" ")):""!=o&&n.inlineContent?null:[]}for(let e in this.marks){let t=this.marks[e],n=t.spec.excludes;t.excluded=null==n?[t]:""==n?[]:xa(this,n.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,n,r){if("string"==typeof e)e=this.nodeType(e);else{if(!(e instanceof wa))throw new RangeError("Invalid node type: "+e);if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}return e.createChecked(t,n,r)}text(e,t){let n=this.nodes.text;return new ca(n,n.defaultAttrs,e,Hs.setFrom(t))}mark(e,t){return"string"==typeof e&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return la.fromJSON(this,e)}markFromJSON(e){return Hs.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function xa(e,t){let n=[];for(let r=0;r<t.length;r++){let o=t[r],i=e.marks[o],s=i;if(i)n.push(i);else for(let t in e.marks){let r=e.marks[t];("_"==o||r.spec.group&&r.spec.group.split(" ").indexOf(o)>-1)&&n.push(s=r)}if(!s)throw new SyntaxError("Unknown mark type: '"+t[r]+"'")}return n}class Oa{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach((e=>{e.tag?this.tags.push(e):e.style&&this.styles.push(e)})),this.normalizeLists=!this.tags.some((t=>{if(!/^(ul|ol)\b/.test(t.tag)||!t.node)return!1;let n=e.nodes[t.node];return n.contentMatch.matchType(n)}))}parse(e,t={}){let n=new Ia(this,t,!1);return n.addAll(e,t.from,t.to),n.finish()}parseSlice(e,t={}){let n=new Ia(this,t,!0);return n.addAll(e,t.from,t.to),Ks.maxOpen(n.finish())}matchTag(e,t,n){for(let r=n?this.tags.indexOf(n)+1:0;r<this.tags.length;r++){let n=this.tags[r];if($a(e,n.tag)&&(void 0===n.namespace||e.namespaceURI==n.namespace)&&(!n.context||t.matchesContext(n.context))){if(n.getAttrs){let t=n.getAttrs(e);if(!1===t)continue;n.attrs=t||void 0}return n}}}matchStyle(e,t,n,r){for(let o=r?this.styles.indexOf(r)+1:0;o<this.styles.length;o++){let r=this.styles[o],i=r.style;if(!(0!=i.indexOf(e)||r.context&&!n.matchesContext(r.context)||i.length>e.length&&(61!=i.charCodeAt(e.length)||i.slice(e.length+1)!=t))){if(r.getAttrs){let e=r.getAttrs(t);if(!1===e)continue;r.attrs=e||void 0}return r}}}static schemaRules(e){let t=[];function n(e){let n=null==e.priority?50:e.priority,r=0;for(;r<t.length;r++){let e=t[r];if((null==e.priority?50:e.priority)<n)break}t.splice(r,0,e)}for(let t in e.marks){let r=e.marks[t].spec.parseDOM;r&&r.forEach((e=>{n(e=Ba(e)),e.mark=t}))}for(let t in e.nodes){let r=e.nodes[t].spec.parseDOM;r&&r.forEach((e=>{n(e=Ba(e)),e.node=t}))}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new Oa(e,Oa.schemaRules(e)))}}const Sa={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},Na={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Fa={ol:!0,ul:!0};function Ta(e,t,n){return null!=t?(t?1:0)|("full"===t?2:0):e&&"pre"==e.whitespace?3:-5&n}class Ma{constructor(e,t,n,r,o,i,s){this.type=e,this.attrs=t,this.marks=n,this.pendingMarks=r,this.solid=o,this.options=s,this.content=[],this.activeMarks=Hs.none,this.stashMarks=[],this.match=i||(4&s?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(Ps.from(e));if(!t){let t,n=this.type.contentMatch;return(t=n.findWrapping(e.type))?(this.match=n,t):null}this.match=this.type.contentMatch.matchFragment(t)}return this.match.findWrapping(e.type)}finish(e){if(!(1&this.options)){let e,t=this.content[this.content.length-1];if(t&&t.isText&&(e=/[ \t\r\n\u000c]+$/.exec(t.text))){let n=t;t.text.length==e[0].length?this.content.pop():this.content[this.content.length-1]=n.withText(n.text.slice(0,n.text.length-e[0].length))}}let t=Ps.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(Ps.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,n=this.pendingMarks;t<n.length;t++){let r=n[t];(this.type?this.type.allowsMarkType(r.type):La(r.type,e))&&!r.isInSet(this.activeMarks)&&(this.activeMarks=r.addToSet(this.activeMarks),this.pendingMarks=r.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Sa.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ia{constructor(e,t,n){this.parser=e,this.options=t,this.isOpen=n,this.open=0;let r,o=t.topNode,i=Ta(null,t.preserveWhitespace,0)|(n?4:0);r=o?new Ma(o.type,o.attrs,Hs.none,Hs.none,!0,t.topMatch||o.type.contentMatch,i):new Ma(n?null:e.schema.topNodeType,null,Hs.none,Hs.none,!0,null,i),this.nodes=[r],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(3==e.nodeType)this.addTextNode(e);else if(1==e.nodeType){let t=e.getAttribute("style"),n=t?this.readStyles(function(e){let t,n=/\s*([\w-]+)\s*:\s*([^;]+)/g,r=[];for(;t=n.exec(e);)r.push(t[1],t[2].trim());return r}(t)):null,r=this.top;if(null!=n)for(let e=0;e<n.length;e++)this.addPendingMark(n[e]);if(this.addElement(e),null!=n)for(let e=0;e<n.length;e++)this.removePendingMark(n[e],r)}}addTextNode(e){let t=e.nodeValue,n=this.top;if(2&n.options||n.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(1&n.options)t=2&n.options?t.replace(/\r\n?/g,"\n"):t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let r=n.content[n.content.length-1],o=e.previousSibling;(!r||o&&"BR"==o.nodeName||r.isText&&/[ \t\r\n\u000c]$/.test(r.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let n,r=e.nodeName.toLowerCase();Fa.hasOwnProperty(r)&&this.parser.normalizeLists&&function(e){for(let t=e.firstChild,n=null;t;t=t.nextSibling){let e=1==t.nodeType?t.nodeName.toLowerCase():null;e&&Fa.hasOwnProperty(e)&&n?(n.appendChild(t),t=n):"li"==e?n=t:e&&(n=null)}}(e);let o=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(n=this.parser.matchTag(e,this,t));if(o?o.ignore:Na.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!o||o.skip||o.closeParent){o&&o.closeParent?this.open=Math.max(0,this.open-1):o&&o.skip.nodeType&&(e=o.skip);let t,n=this.top,i=this.needsBlock;if(Sa.hasOwnProperty(r))t=!0,n.type||(this.needsBlock=!0);else if(!e.firstChild)return void this.leafFallback(e);this.addAll(e),t&&this.sync(n),this.needsBlock=i}else this.addElementByRule(e,o,!1===o.consuming?n:void 0)}leafFallback(e){"BR"==e.nodeName&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode("\n"))}ignoreFallback(e){"BR"!=e.nodeName||this.top.type&&this.top.type.inlineContent||this.findPlace(this.parser.schema.text("-"))}readStyles(e){let t=Hs.none;e:for(let n=0;n<e.length;n+=2)for(let r;;){let o=this.parser.matchStyle(e[n],e[n+1],this,r);if(!o)continue e;if(o.ignore)return null;if(t=this.parser.schema.marks[o.mark].create(o.attrs).addToSet(t),!1!==o.consuming)break;r=o}return t}addElementByRule(e,t,n){let r,o,i;if(t.node)o=this.parser.schema.nodes[t.node],o.isLeaf?this.insertNode(o.create(t.attrs))||this.leafFallback(e):r=this.enter(o,t.attrs||null,t.preserveWhitespace);else{i=this.parser.schema.marks[t.mark].create(t.attrs),this.addPendingMark(i)}let s=this.top;if(o&&o.isLeaf)this.findInside(e);else if(n)this.addElement(e,n);else if(t.getContent)this.findInside(e),t.getContent(e,this.parser.schema).forEach((e=>this.insertNode(e)));else{let n=e;"string"==typeof t.contentElement?n=e.querySelector(t.contentElement):"function"==typeof t.contentElement?n=t.contentElement(e):t.contentElement&&(n=t.contentElement),this.findAround(e,n,!0),this.addAll(n)}r&&this.sync(s)&&this.open--,i&&this.removePendingMark(i,s)}addAll(e,t,n){let r=t||0;for(let o=t?e.childNodes[t]:e.firstChild,i=null==n?null:e.childNodes[n];o!=i;o=o.nextSibling,++r)this.findAtPoint(e,r),this.addDOM(o);this.findAtPoint(e,r)}findPlace(e){let t,n;for(let r=this.open;r>=0;r--){let o=this.nodes[r],i=o.findWrapping(e);if(i&&(!t||t.length>i.length)&&(t=i,n=o,!i.length))break;if(o.solid)break}if(!t)return!1;this.sync(n);for(let e=0;e<t.length;e++)this.enterInner(t[e],null,!1);return!0}insertNode(e){if(e.isInline&&this.needsBlock&&!this.top.type){let e=this.textblockFromContext();e&&this.enterInner(e)}if(this.findPlace(e)){this.closeExtra();let t=this.top;t.applyPending(e.type),t.match&&(t.match=t.match.matchType(e.type));let n=t.activeMarks;for(let r=0;r<e.marks.length;r++)t.type&&!t.type.allowsMarkType(e.marks[r].type)||(n=e.marks[r].addToSet(n));return t.content.push(e.mark(n)),!0}return!1}enter(e,t,n){let r=this.findPlace(e.create(t));return r&&this.enterInner(e,t,!0,n),r}enterInner(e,t=null,n=!1,r){this.closeExtra();let o=this.top;o.applyPending(e),o.match=o.match&&o.match.matchType(e);let i=Ta(e,r,o.options);4&o.options&&0==o.content.length&&(i|=4),this.nodes.push(new Ma(e,t,o.activeMarks,o.pendingMarks,n,null,i)),this.open++}closeExtra(e=!1){let t=this.nodes.length-1;if(t>this.open){for(;t>this.open;t--)this.nodes[t-1].content.push(this.nodes[t].finish(e));this.nodes.length=this.open+1}}finish(){return this.open=0,this.closeExtra(this.isOpen),this.nodes[0].finish(this.isOpen||this.options.topOpen)}sync(e){for(let t=this.open;t>=0;t--)if(this.nodes[t]==e)return this.open=t,!0;return!1}get currentPos(){this.closeExtra();let e=0;for(let t=this.open;t>=0;t--){let n=this.nodes[t].content;for(let t=n.length-1;t>=0;t--)e+=n[t].nodeSize;t&&e++}return e}findAtPoint(e,t){if(this.find)for(let n=0;n<this.find.length;n++)this.find[n].node==e&&this.find[n].offset==t&&(this.find[n].pos=this.currentPos)}findInside(e){if(this.find)for(let t=0;t<this.find.length;t++)null==this.find[t].pos&&1==e.nodeType&&e.contains(this.find[t].node)&&(this.find[t].pos=this.currentPos)}findAround(e,t,n){if(e!=t&&this.find)for(let r=0;r<this.find.length;r++)if(null==this.find[r].pos&&1==e.nodeType&&e.contains(this.find[r].node)){t.compareDocumentPosition(this.find[r].node)&(n?2:4)&&(this.find[r].pos=this.currentPos)}}findInText(e){if(this.find)for(let t=0;t<this.find.length;t++)this.find[t].node==e&&(this.find[t].pos=this.currentPos-(e.nodeValue.length-this.find[t].offset))}matchesContext(e){if(e.indexOf("|")>-1)return e.split(/\s*\|\s*/).some(this.matchesContext,this);let t=e.split("/"),n=this.options.context,r=!(this.isOpen||n&&n.parent.type!=this.nodes[0].type),o=-(n?n.depth+1:0)+(r?0:1),i=(e,s)=>{for(;e>=0;e--){let a=t[e];if(""==a){if(e==t.length-1||0==e)continue;for(;s>=o;s--)if(i(e-1,s))return!0;return!1}{let e=s>0||0==s&&r?this.nodes[s].type:n&&s>=o?n.node(s-o).type:null;if(!e||e.name!=a&&-1==e.groups.indexOf(a))return!1;s--}}return!0};return i(t.length-1,this.open)}textblockFromContext(){let e=this.options.context;if(e)for(let t=e.depth;t>=0;t--){let n=e.node(t).contentMatchAt(e.indexAfter(t)).defaultType;if(n&&n.isTextblock&&n.defaultAttrs)return n}for(let e in this.parser.schema.nodes){let t=this.parser.schema.nodes[e];if(t.isTextblock&&t.defaultAttrs)return t}}addPendingMark(e){let t=function(e,t){for(let n=0;n<t.length;n++)if(e.eq(t[n]))return t[n]}(e,this.top.pendingMarks);t&&this.top.stashMarks.push(t),this.top.pendingMarks=e.addToSet(this.top.pendingMarks)}removePendingMark(e,t){for(let n=this.open;n>=0;n--){let r=this.nodes[n];if(r.pendingMarks.lastIndexOf(e)>-1)r.pendingMarks=e.removeFromSet(r.pendingMarks);else{r.activeMarks=e.removeFromSet(r.activeMarks);let t=r.popFromStashMark(e);t&&r.type&&r.type.allowsMarkType(t.type)&&(r.activeMarks=t.addToSet(r.activeMarks))}if(r==t)break}}}function $a(e,t){return(e.matches||e.msMatchesSelector||e.webkitMatchesSelector||e.mozMatchesSelector).call(e,t)}function Ba(e){let t={};for(let n in e)t[n]=e[n];return t}function La(e,t){let n=t.schema.nodes;for(let r in n){let o=n[r];if(!o.allowsMarkType(e))continue;let i=[],s=e=>{i.push(e);for(let n=0;n<e.edgeCount;n++){let{type:r,next:o}=e.edge(n);if(r==t)return!0;if(i.indexOf(o)<0&&s(o))return!0}};if(s(o.contentMatch))return!0}}class Pa{constructor(e,t){this.nodes=e,this.marks=t}serializeFragment(e,t={},n){n||(n=za(t).createDocumentFragment());let r=n,o=[];return e.forEach((e=>{if(o.length||e.marks.length){let n=0,i=0;for(;n<o.length&&i<e.marks.length;){let t=e.marks[i];if(this.marks[t.type.name]){if(!t.eq(o[n][0])||!1===t.type.spec.spanning)break;n++,i++}else i++}for(;n<o.length;)r=o.pop()[1];for(;i<e.marks.length;){let n=e.marks[i++],s=this.serializeMark(n,e.isInline,t);s&&(o.push([n,r]),r.appendChild(s.dom),r=s.contentDOM||s.dom)}}r.appendChild(this.serializeNodeInner(e,t))})),n}serializeNodeInner(e,t){let{dom:n,contentDOM:r}=Pa.renderSpec(za(t),this.nodes[e.type.name](e));if(r){if(e.isLeaf)throw new RangeError("Content hole not allowed in a leaf node spec");this.serializeFragment(e.content,t,r)}return n}serializeNode(e,t={}){let n=this.serializeNodeInner(e,t);for(let r=e.marks.length-1;r>=0;r--){let o=this.serializeMark(e.marks[r],e.isInline,t);o&&((o.contentDOM||o.dom).appendChild(n),n=o.dom)}return n}serializeMark(e,t,n={}){let r=this.marks[e.type.name];return r&&Pa.renderSpec(za(n),r(e,t))}static renderSpec(e,t,n=null){if("string"==typeof t)return{dom:e.createTextNode(t)};if(null!=t.nodeType)return{dom:t};if(t.dom&&null!=t.dom.nodeType)return t;let r,o=t[0],i=o.indexOf(" ");i>0&&(n=o.slice(0,i),o=o.slice(i+1));let s=n?e.createElementNS(n,o):e.createElement(o),a=t[1],l=1;if(a&&"object"==typeof a&&null==a.nodeType&&!Array.isArray(a)){l=2;for(let e in a)if(null!=a[e]){let t=e.indexOf(" ");t>0?s.setAttributeNS(e.slice(0,t),e.slice(t+1),a[e]):s.setAttribute(e,a[e])}}for(let o=l;o<t.length;o++){let i=t[o];if(0===i){if(o<t.length-1||o>l)throw new RangeError("Content hole must be the only child of its parent node");return{dom:s,contentDOM:s}}{let{dom:t,contentDOM:o}=Pa.renderSpec(e,i,n);if(s.appendChild(t),o){if(r)throw new RangeError("Multiple content holes");r=o}}}return{dom:s,contentDOM:r}}static fromSchema(e){return e.cached.domSerializer||(e.cached.domSerializer=new Pa(this.nodesFromSchema(e),this.marksFromSchema(e)))}static nodesFromSchema(e){let t=Ra(e.nodes);return t.text||(t.text=e=>e.text),t}static marksFromSchema(e){return Ra(e.marks)}}function Ra(e){let t={};for(let n in e){let r=e[n].spec.toDOM;r&&(t[n]=r)}return t}function za(e){return e.document||window.document}const ja=Math.pow(2,16);function Ha(e,t){return e+t*ja}function Va(e){return 65535&e}class Ka{constructor(e,t,n){this.pos=e,this.delInfo=t,this.recover=n}get deleted(){return(8&this.delInfo)>0}get deletedBefore(){return(5&this.delInfo)>0}get deletedAfter(){return(6&this.delInfo)>0}get deletedAcross(){return(4&this.delInfo)>0}}class qa{constructor(e,t=!1){if(this.ranges=e,this.inverted=t,!e.length&&qa.empty)return qa.empty}recover(e){let t=0,n=Va(e);if(!this.inverted)for(let e=0;e<n;e++)t+=this.ranges[3*e+2]-this.ranges[3*e+1];return this.ranges[3*n]+t+function(e){return(e-(65535&e))/ja}(e)}mapResult(e,t=1){return this._map(e,t,!1)}map(e,t=1){return this._map(e,t,!0)}_map(e,t,n){let r=0,o=this.inverted?2:1,i=this.inverted?1:2;for(let s=0;s<this.ranges.length;s+=3){let a=this.ranges[s]-(this.inverted?r:0);if(a>e)break;let l=this.ranges[s+o],c=this.ranges[s+i],u=a+l;if(e<=u){let o=a+r+((l?e==a?-1:e==u?1:t:t)<0?0:c);if(n)return o;let i=e==(t<0?a:u)?null:Ha(s/3,e-a),d=e==a?2:e==u?1:4;return(t<0?e!=a:e!=u)&&(d|=8),new Ka(o,d,i)}r+=c-l}return n?e+r:new Ka(e+r,0,null)}touches(e,t){let n=0,r=Va(t),o=this.inverted?2:1,i=this.inverted?1:2;for(let t=0;t<this.ranges.length;t+=3){let s=this.ranges[t]-(this.inverted?n:0);if(s>e)break;let a=this.ranges[t+o];if(e<=s+a&&t==3*r)return!0;n+=this.ranges[t+i]-a}return!1}forEach(e){let t=this.inverted?2:1,n=this.inverted?1:2;for(let r=0,o=0;r<this.ranges.length;r+=3){let i=this.ranges[r],s=i-(this.inverted?o:0),a=i+(this.inverted?0:o),l=this.ranges[r+t],c=this.ranges[r+n];e(s,s+l,a,a+c),o+=c-l}}invert(){return new qa(this.ranges,!this.inverted)}toString(){return(this.inverted?"-":"")+JSON.stringify(this.ranges)}static offset(e){return 0==e?qa.empty:new qa(e<0?[0,-e,0]:[0,0,e])}}qa.empty=new qa([]);class Wa{constructor(e=[],t,n=0,r=e.length){this.maps=e,this.mirror=t,this.from=n,this.to=r}slice(e=0,t=this.maps.length){return new Wa(this.maps,this.mirror,e,t)}copy(){return new Wa(this.maps.slice(),this.mirror&&this.mirror.slice(),this.from,this.to)}appendMap(e,t){this.to=this.maps.push(e),null!=t&&this.setMirror(this.maps.length-1,t)}appendMapping(e){for(let t=0,n=this.maps.length;t<e.maps.length;t++){let r=e.getMirror(t);this.appendMap(e.maps[t],null!=r&&r<t?n+r:void 0)}}getMirror(e){if(this.mirror)for(let t=0;t<this.mirror.length;t++)if(this.mirror[t]==e)return this.mirror[t+(t%2?-1:1)]}setMirror(e,t){this.mirror||(this.mirror=[]),this.mirror.push(e,t)}appendMappingInverted(e){for(let t=e.maps.length-1,n=this.maps.length+e.maps.length;t>=0;t--){let r=e.getMirror(t);this.appendMap(e.maps[t].invert(),null!=r&&r>t?n-r-1:void 0)}}invert(){let e=new Wa;return e.appendMappingInverted(this),e}map(e,t=1){if(this.mirror)return this._map(e,t,!0);for(let n=this.from;n<this.to;n++)e=this.maps[n].map(e,t);return e}mapResult(e,t=1){return this._map(e,t,!1)}_map(e,t,n){let r=0;for(let n=this.from;n<this.to;n++){let o=this.maps[n].mapResult(e,t);if(null!=o.recover){let t=this.getMirror(n);if(null!=t&&t>n&&t<this.to){n=t,e=this.maps[t].recover(o.recover);continue}}r|=o.delInfo,e=o.pos}return n?e:new Ka(e,r,null)}}const Ua=Object.create(null);class Ga{getMap(){return qa.empty}merge(e){return null}static fromJSON(e,t){if(!t||!t.stepType)throw new RangeError("Invalid input for Step.fromJSON");let n=Ua[t.stepType];if(!n)throw new RangeError(`No step type ${t.stepType} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in Ua)throw new RangeError("Duplicate use of step JSON ID "+e);return Ua[e]=t,t.prototype.jsonID=e,t}}class Ja{constructor(e,t){this.doc=e,this.failed=t}static ok(e){return new Ja(e,null)}static fail(e){return new Ja(null,e)}static fromReplace(e,t,n,r){try{return Ja.ok(e.replace(t,n,r))}catch(e){if(e instanceof Vs)return Ja.fail(e.message);throw e}}}function Ya(e,t,n){let r=[];for(let o=0;o<e.childCount;o++){let i=e.child(o);i.content.size&&(i=i.copy(Ya(i.content,t,i))),i.isInline&&(i=t(i,n,o)),r.push(i)}return Ps.fromArray(r)}class Xa extends Ga{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=e.resolve(this.from),r=n.node(n.sharedDepth(this.to)),o=new Ks(Ya(t.content,((e,t)=>e.isAtom&&t.type.allowsMarkType(this.mark.type)?e.mark(this.mark.addToSet(e.marks)):e),r),t.openStart,t.openEnd);return Ja.fromReplace(e,this.from,this.to,o)}invert(){return new Qa(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new Xa(t.pos,n.pos,this.mark)}merge(e){return e instanceof Xa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Xa(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"addMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for AddMarkStep.fromJSON");return new Xa(t.from,t.to,e.markFromJSON(t.mark))}}Ga.jsonID("addMark",Xa);class Qa extends Ga{constructor(e,t,n){super(),this.from=e,this.to=t,this.mark=n}apply(e){let t=e.slice(this.from,this.to),n=new Ks(Ya(t.content,(e=>e.mark(this.mark.removeFromSet(e.marks))),e),t.openStart,t.openEnd);return Ja.fromReplace(e,this.from,this.to,n)}invert(){return new Xa(this.from,this.to,this.mark)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deleted&&n.deleted||t.pos>=n.pos?null:new Qa(t.pos,n.pos,this.mark)}merge(e){return e instanceof Qa&&e.mark.eq(this.mark)&&this.from<=e.to&&this.to>=e.from?new Qa(Math.min(this.from,e.from),Math.max(this.to,e.to),this.mark):null}toJSON(){return{stepType:"removeMark",mark:this.mark.toJSON(),from:this.from,to:this.to}}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for RemoveMarkStep.fromJSON");return new Qa(t.from,t.to,e.markFromJSON(t.mark))}}Ga.jsonID("removeMark",Qa);class Za extends Ga{constructor(e,t,n,r=!1){super(),this.from=e,this.to=t,this.slice=n,this.structure=r}apply(e){return this.structure&&tl(e,this.from,this.to)?Ja.fail("Structure replace would overwrite content"):Ja.fromReplace(e,this.from,this.to,this.slice)}getMap(){return new qa([this.from,this.to-this.from,this.slice.size])}invert(e){return new Za(this.from,this.from+this.slice.size,e.slice(this.from,this.to))}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1);return t.deletedAcross&&n.deletedAcross?null:new Za(t.pos,Math.max(t.pos,n.pos),this.slice)}merge(e){if(!(e instanceof Za)||e.structure||this.structure)return null;if(this.from+this.slice.size!=e.from||this.slice.openEnd||e.slice.openStart){if(e.to!=this.from||this.slice.openStart||e.slice.openEnd)return null;{let t=this.slice.size+e.slice.size==0?Ks.empty:new Ks(e.slice.content.append(this.slice.content),e.slice.openStart,this.slice.openEnd);return new Za(e.from,this.to,t,this.structure)}}{let t=this.slice.size+e.slice.size==0?Ks.empty:new Ks(this.slice.content.append(e.slice.content),this.slice.openStart,e.slice.openEnd);return new Za(this.from,this.to+(e.to-e.from),t,this.structure)}}toJSON(){let e={stepType:"replace",from:this.from,to:this.to};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to)throw new RangeError("Invalid input for ReplaceStep.fromJSON");return new Za(t.from,t.to,Ks.fromJSON(e,t.slice),!!t.structure)}}Ga.jsonID("replace",Za);class el extends Ga{constructor(e,t,n,r,o,i,s=!1){super(),this.from=e,this.to=t,this.gapFrom=n,this.gapTo=r,this.slice=o,this.insert=i,this.structure=s}apply(e){if(this.structure&&(tl(e,this.from,this.gapFrom)||tl(e,this.gapTo,this.to)))return Ja.fail("Structure gap-replace would overwrite content");let t=e.slice(this.gapFrom,this.gapTo);if(t.openStart||t.openEnd)return Ja.fail("Gap is not a flat range");let n=this.slice.insertAt(this.insert,t.content);return n?Ja.fromReplace(e,this.from,this.to,n):Ja.fail("Content does not fit in gap")}getMap(){return new qa([this.from,this.gapFrom-this.from,this.insert,this.gapTo,this.to-this.gapTo,this.slice.size-this.insert])}invert(e){let t=this.gapTo-this.gapFrom;return new el(this.from,this.from+this.slice.size+t,this.from+this.insert,this.from+this.insert+t,e.slice(this.from,this.to).removeBetween(this.gapFrom-this.from,this.gapTo-this.from),this.gapFrom-this.from,this.structure)}map(e){let t=e.mapResult(this.from,1),n=e.mapResult(this.to,-1),r=e.map(this.gapFrom,-1),o=e.map(this.gapTo,1);return t.deletedAcross&&n.deletedAcross||r<t.pos||o>n.pos?null:new el(t.pos,n.pos,r,o,this.slice,this.insert,this.structure)}toJSON(){let e={stepType:"replaceAround",from:this.from,to:this.to,gapFrom:this.gapFrom,gapTo:this.gapTo,insert:this.insert};return this.slice.size&&(e.slice=this.slice.toJSON()),this.structure&&(e.structure=!0),e}static fromJSON(e,t){if("number"!=typeof t.from||"number"!=typeof t.to||"number"!=typeof t.gapFrom||"number"!=typeof t.gapTo||"number"!=typeof t.insert)throw new RangeError("Invalid input for ReplaceAroundStep.fromJSON");return new el(t.from,t.to,t.gapFrom,t.gapTo,Ks.fromJSON(e,t.slice),t.insert,!!t.structure)}}function tl(e,t,n){let r=e.resolve(t),o=n-t,i=r.depth;for(;o>0&&i>0&&r.indexAfter(i)==r.node(i).childCount;)i--,o--;if(o>0){let e=r.node(i).maybeChild(r.indexAfter(i));for(;o>0;){if(!e||e.isLeaf)return!0;e=e.firstChild,o--}}return!1}function nl(e,t,n){return(0==t||e.canReplace(t,e.childCount))&&(n==e.childCount||e.canReplace(0,n))}function rl(e){let t=e.parent.content.cutByIndex(e.startIndex,e.endIndex);for(let n=e.depth;;--n){let r=e.$from.node(n),o=e.$from.index(n),i=e.$to.indexAfter(n);if(n<e.depth&&r.canReplace(o,i,t))return n;if(0==n||r.type.spec.isolating||!nl(r,o,i))break}return null}function ol(e,t,n=null,r=e){let o=function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.contentMatchAt(r).findWrapping(t);if(!i)return null;let s=i.length?i[0]:t;return n.canReplaceWith(r,o,s)?i:null}(e,t),i=o&&function(e,t){let{parent:n,startIndex:r,endIndex:o}=e,i=n.child(r),s=t.contentMatch.findWrapping(i.type);if(!s)return null;let a=(s.length?s[s.length-1]:t).contentMatch;for(let e=r;a&&e<o;e++)a=a.matchType(n.child(e).type);return a&&a.validEnd?s:null}(r,t);return i?o.map(il).concat({type:t,attrs:n}).concat(i.map(il)):null}function il(e){return{type:e,attrs:null}}function sl(e,t,n=1,r){let o=e.resolve(t),i=o.depth-n,s=r&&r[r.length-1]||o.parent;if(i<0||o.parent.type.spec.isolating||!o.parent.canReplace(o.index(),o.parent.childCount)||!s.type.validContent(o.parent.content.cutByIndex(o.index(),o.parent.childCount)))return!1;for(let e=o.depth-1,t=n-2;e>i;e--,t--){let n=o.node(e),i=o.index(e);if(n.type.spec.isolating)return!1;let s=n.content.cutByIndex(i,n.childCount),a=r&&r[t]||n;if(a!=n&&(s=s.replaceChild(0,a.type.create(a.attrs))),!n.canReplace(i+1,n.childCount)||!a.type.validContent(s))return!1}let a=o.indexAfter(i),l=r&&r[0];return o.node(i).canReplaceWith(a,a,l?l.type:o.node(i+1).type)}function al(e,t){let n=e.resolve(t),r=n.index();return o=n.nodeBefore,i=n.nodeAfter,!(!o||!i||o.isLeaf||!o.canAppend(i))&&n.parent.canReplace(r,r+1);var o,i}function ll(e,t,n=t,r=Ks.empty){if(t==n&&!r.size)return null;let o=e.resolve(t),i=e.resolve(n);return cl(o,i,r)?new Za(t,n,r):new ul(o,i,r).fit()}function cl(e,t,n){return!n.openStart&&!n.openEnd&&e.start()==t.start()&&e.parent.canReplace(e.index(),t.index(),n.content)}Ga.jsonID("replaceAround",el);class ul{constructor(e,t,n){this.$from=e,this.$to=t,this.unplaced=n,this.frontier=[],this.placed=Ps.empty;for(let t=0;t<=e.depth;t++){let n=e.node(t);this.frontier.push({type:n.type,match:n.contentMatchAt(e.indexAfter(t))})}for(let t=e.depth;t>0;t--)this.placed=Ps.from(e.node(t).copy(this.placed))}get depth(){return this.frontier.length-1}fit(){for(;this.unplaced.size;){let e=this.findFittable();e?this.placeNodes(e):this.openMore()||this.dropNode()}let e=this.mustMoveInline(),t=this.placed.size-this.depth-this.$from.depth,n=this.$from,r=this.close(e<0?this.$to:n.doc.resolve(e));if(!r)return null;let o=this.placed,i=n.depth,s=r.depth;for(;i&&s&&1==o.childCount;)o=o.firstChild.content,i--,s--;let a=new Ks(o,i,s);return e>-1?new el(n.pos,e,this.$to.pos,this.$to.end(),a,t):a.size||n.pos!=this.$to.pos?new Za(n.pos,r.pos,a):null}findFittable(){for(let e=1;e<=2;e++)for(let t=this.unplaced.openStart;t>=0;t--){let n,r=null;t?(r=hl(this.unplaced.content,t-1).firstChild,n=r.content):n=this.unplaced.content;let o=n.firstChild;for(let n=this.depth;n>=0;n--){let i,{type:s,match:a}=this.frontier[n],l=null;if(1==e&&(o?a.matchType(o.type)||(l=a.fillBefore(Ps.from(o),!1)):r&&s.compatibleContent(r.type)))return{sliceDepth:t,frontierDepth:n,parent:r,inject:l};if(2==e&&o&&(i=a.findWrapping(o.type)))return{sliceDepth:t,frontierDepth:n,parent:r,wrap:i};if(r&&a.matchType(r.type))break}}}openMore(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=hl(e,t);return!(!r.childCount||r.firstChild.isLeaf)&&(this.unplaced=new Ks(e,t+1,Math.max(n,r.size+t>=e.size-n?t+1:0)),!0)}dropNode(){let{content:e,openStart:t,openEnd:n}=this.unplaced,r=hl(e,t);if(r.childCount<=1&&t>0){let o=e.size-t<=t+r.size;this.unplaced=new Ks(dl(e,t-1,1),t-1,o?t-1:n)}else this.unplaced=new Ks(dl(e,t,1),t,n)}placeNodes({sliceDepth:e,frontierDepth:t,parent:n,inject:r,wrap:o}){for(;this.depth>t;)this.closeFrontierNode();if(o)for(let e=0;e<o.length;e++)this.openFrontierNode(o[e]);let i=this.unplaced,s=n?n.content:i.content,a=i.openStart-e,l=0,c=[],{match:u,type:d}=this.frontier[t];if(r){for(let e=0;e<r.childCount;e++)c.push(r.child(e));u=u.matchFragment(r)}let p=s.size+e-(i.content.size-i.openEnd);for(;l<s.childCount;){let e=s.child(l),t=u.matchType(e.type);if(!t)break;l++,(l>1||0==a||e.content.size)&&(u=t,c.push(fl(e.mark(d.allowedMarks(e.marks)),1==l?a:0,l==s.childCount?p:-1)))}let h=l==s.childCount;h||(p=-1),this.placed=pl(this.placed,t,Ps.from(c)),this.frontier[t].match=u,h&&p<0&&n&&n.type==this.frontier[this.depth].type&&this.frontier.length>1&&this.closeFrontierNode();for(let e=0,t=s;e<p;e++){let e=t.lastChild;this.frontier.push({type:e.type,match:e.contentMatchAt(e.childCount)}),t=e.content}this.unplaced=h?0==e?Ks.empty:new Ks(dl(i.content,e-1,1),e-1,p<0?i.openEnd:e-1):new Ks(dl(i.content,e,l),i.openStart,i.openEnd)}mustMoveInline(){if(!this.$to.parent.isTextblock)return-1;let e,t=this.frontier[this.depth];if(!t.type.isTextblock||!ml(this.$to,this.$to.depth,t.type,t.match,!1)||this.$to.depth==this.depth&&(e=this.findCloseLevel(this.$to))&&e.depth==this.depth)return-1;let{depth:n}=this.$to,r=this.$to.after(n);for(;n>1&&r==this.$to.end(--n);)++r;return r}findCloseLevel(e){e:for(let t=Math.min(this.depth,e.depth);t>=0;t--){let{match:n,type:r}=this.frontier[t],o=t<e.depth&&e.end(t+1)==e.pos+(e.depth-(t+1)),i=ml(e,t,r,n,o);if(i){for(let n=t-1;n>=0;n--){let{match:t,type:r}=this.frontier[n],o=ml(e,n,r,t,!0);if(!o||o.childCount)continue e}return{depth:t,fit:i,move:o?e.doc.resolve(e.after(t+1)):e}}}}close(e){let t=this.findCloseLevel(e);if(!t)return null;for(;this.depth>t.depth;)this.closeFrontierNode();t.fit.childCount&&(this.placed=pl(this.placed,t.depth,t.fit)),e=t.move;for(let n=t.depth+1;n<=e.depth;n++){let t=e.node(n),r=t.type.contentMatch.fillBefore(t.content,!0,e.index(n));this.openFrontierNode(t.type,t.attrs,r)}return e}openFrontierNode(e,t=null,n){let r=this.frontier[this.depth];r.match=r.match.matchType(e),this.placed=pl(this.placed,this.depth,Ps.from(e.create(t,n))),this.frontier.push({type:e,match:e.contentMatch})}closeFrontierNode(){let e=this.frontier.pop().match.fillBefore(Ps.empty,!0);e.childCount&&(this.placed=pl(this.placed,this.frontier.length,e))}}function dl(e,t,n){return 0==t?e.cutByIndex(n,e.childCount):e.replaceChild(0,e.firstChild.copy(dl(e.firstChild.content,t-1,n)))}function pl(e,t,n){return 0==t?e.append(n):e.replaceChild(e.childCount-1,e.lastChild.copy(pl(e.lastChild.content,t-1,n)))}function hl(e,t){for(let n=0;n<t;n++)e=e.firstChild.content;return e}function fl(e,t,n){if(t<=0)return e;let r=e.content;return t>1&&(r=r.replaceChild(0,fl(r.firstChild,t-1,1==r.childCount?n-1:0))),t>0&&(r=e.type.contentMatch.fillBefore(r).append(r),n<=0&&(r=r.append(e.type.contentMatch.matchFragment(r).fillBefore(Ps.empty,!0)))),e.copy(r)}function ml(e,t,n,r,o){let i=e.node(t),s=o?e.indexAfter(t):e.index(t);if(s==i.childCount&&!n.compatibleContent(i.type))return null;let a=r.fillBefore(i.content,!0,s);return a&&!function(e,t,n){for(let r=n;r<t.childCount;r++)if(!e.allowsMarks(t.child(r).marks))return!0;return!1}(n,i.content,s)?a:null}function gl(e){return e.spec.defining||e.spec.definingForContent}function vl(e,t,n,r,o){if(t<n){let o=e.firstChild;e=e.replaceChild(0,o.copy(vl(o.content,t+1,n,r,o)))}if(t>r){let t=o.contentMatchAt(0),n=t.fillBefore(e).append(e);e=n.append(t.matchFragment(n).fillBefore(Ps.empty,!0))}return e}function yl(e,t){let n=[];for(let r=Math.min(e.depth,t.depth);r>=0;r--){let o=e.start(r);if(o<e.pos-(e.depth-r)||t.end(r)>t.pos+(t.depth-r)||e.node(r).type.spec.isolating||t.node(r).type.spec.isolating)break;(o==t.start(r)||r==e.depth&&r==t.depth&&e.parent.inlineContent&&t.parent.inlineContent&&r&&t.start(r-1)==o-1)&&n.push(r)}return n}let bl=class extends Error{};bl=function e(t){let n=Error.call(this,t);return n.__proto__=e.prototype,n},(bl.prototype=Object.create(Error.prototype)).constructor=bl,bl.prototype.name="TransformError";class Dl{constructor(e){this.doc=e,this.steps=[],this.docs=[],this.mapping=new Wa}get before(){return this.docs.length?this.docs[0]:this.doc}step(e){let t=this.maybeStep(e);if(t.failed)throw new bl(t.failed);return this}maybeStep(e){let t=e.apply(this.doc);return t.failed||this.addStep(e,t.doc),t}get docChanged(){return this.steps.length>0}addStep(e,t){this.docs.push(this.doc),this.steps.push(e),this.mapping.appendMap(e.getMap()),this.doc=t}replace(e,t=e,n=Ks.empty){let r=ll(this.doc,e,t,n);return r&&this.step(r),this}replaceWith(e,t,n){return this.replace(e,t,new Ks(Ps.from(n),0,0))}delete(e,t){return this.replace(e,t,Ks.empty)}insert(e,t){return this.replaceWith(e,e,t)}replaceRange(e,t,n){return function(e,t,n,r){if(!r.size)return e.deleteRange(t,n);let o=e.doc.resolve(t),i=e.doc.resolve(n);if(cl(o,i,r))return e.step(new Za(t,n,r));let s=yl(o,e.doc.resolve(n));0==s[s.length-1]&&s.pop();let a=-(o.depth+1);s.unshift(a);for(let e=o.depth,t=o.pos-1;e>0;e--,t--){let n=o.node(e).type.spec;if(n.defining||n.definingAsContext||n.isolating)break;s.indexOf(e)>-1?a=e:o.before(e)==t&&s.splice(1,0,-e)}let l=s.indexOf(a),c=[],u=r.openStart;for(let e=r.content,t=0;;t++){let n=e.firstChild;if(c.push(n),t==r.openStart)break;e=n.content}for(let e=u-1;e>=0;e--){let t=c[e].type,n=gl(t);if(n&&o.node(l).type!=t)u=e;else if(n||!t.isTextblock)break}for(let t=r.openStart;t>=0;t--){let a=(t+u+1)%(r.openStart+1),d=c[a];if(d)for(let t=0;t<s.length;t++){let c=s[(t+l)%s.length],u=!0;c<0&&(u=!1,c=-c);let p=o.node(c-1),h=o.index(c-1);if(p.canReplaceWith(h,h,d.type,d.marks))return e.replace(o.before(c),u?i.after(c):n,new Ks(vl(r.content,0,r.openStart,a),a,r.openEnd))}}let d=e.steps.length;for(let a=s.length-1;a>=0&&(e.replace(t,n,r),!(e.steps.length>d));a--){let e=s[a];e<0||(t=o.before(e),n=i.after(e))}}(this,e,t,n),this}replaceRangeWith(e,t,n){return function(e,t,n,r){if(!r.isInline&&t==n&&e.doc.resolve(t).parent.content.size){let o=function(e,t,n){let r=e.resolve(t);if(r.parent.canReplaceWith(r.index(),r.index(),n))return t;if(0==r.parentOffset)for(let e=r.depth-1;e>=0;e--){let t=r.index(e);if(r.node(e).canReplaceWith(t,t,n))return r.before(e+1);if(t>0)return null}if(r.parentOffset==r.parent.content.size)for(let e=r.depth-1;e>=0;e--){let t=r.indexAfter(e);if(r.node(e).canReplaceWith(t,t,n))return r.after(e+1);if(t<r.node(e).childCount)return null}return null}(e.doc,t,r.type);null!=o&&(t=n=o)}e.replaceRange(t,n,new Ks(Ps.from(r),0,0))}(this,e,t,n),this}deleteRange(e,t){return function(e,t,n){let r=e.doc.resolve(t),o=e.doc.resolve(n),i=yl(r,o);for(let t=0;t<i.length;t++){let n=i[t],s=t==i.length-1;if(s&&0==n||r.node(n).type.contentMatch.validEnd)return e.delete(r.start(n),o.end(n));if(n>0&&(s||r.node(n-1).canReplace(r.index(n-1),o.indexAfter(n-1))))return e.delete(r.before(n),o.after(n))}for(let i=1;i<=r.depth&&i<=o.depth;i++)if(t-r.start(i)==r.depth-i&&n>r.end(i)&&o.end(i)-n!=o.depth-i)return e.delete(r.before(i),n);e.delete(t,n)}(this,e,t),this}lift(e,t){return function(e,t,n){let{$from:r,$to:o,depth:i}=t,s=r.before(i+1),a=o.after(i+1),l=s,c=a,u=Ps.empty,d=0;for(let e=i,t=!1;e>n;e--)t||r.index(e)>0?(t=!0,u=Ps.from(r.node(e).copy(u)),d++):l--;let p=Ps.empty,h=0;for(let e=i,t=!1;e>n;e--)t||o.after(e+1)<o.end(e)?(t=!0,p=Ps.from(o.node(e).copy(p)),h++):c++;e.step(new el(l,c,s,a,new Ks(u.append(p),d,h),u.size-d,!0))}(this,e,t),this}join(e,t=1){return function(e,t,n){let r=new Za(t-n,t+n,Ks.empty,!0);e.step(r)}(this,e,t),this}wrap(e,t){return function(e,t,n){let r=Ps.empty;for(let e=n.length-1;e>=0;e--){if(r.size){let t=n[e].type.contentMatch.matchFragment(r);if(!t||!t.validEnd)throw new RangeError("Wrapper type given to Transform.wrap does not form valid content of its parent wrapper")}r=Ps.from(n[e].type.create(n[e].attrs,r))}let o=t.start,i=t.end;e.step(new el(o,i,o,i,new Ks(r,0,0),n.length,!0))}(this,e,t),this}setBlockType(e,t=e,n,r=null){return function(e,t,n,r,o){if(!r.isTextblock)throw new RangeError("Type given to setBlockType should be a textblock");let i=e.steps.length;e.doc.nodesBetween(t,n,((t,n)=>{if(t.isTextblock&&!t.hasMarkup(r,o)&&function(e,t,n){let r=e.resolve(t),o=r.index();return r.parent.canReplaceWith(o,o+1,n)}(e.doc,e.mapping.slice(i).map(n),r)){e.clearIncompatible(e.mapping.slice(i).map(n,1),r);let s=e.mapping.slice(i),a=s.map(n,1),l=s.map(n+t.nodeSize,1);return e.step(new el(a,l,a+1,l-1,new Ks(Ps.from(r.create(o,null,t.marks)),0,0),1,!0)),!1}}))}(this,e,t,n,r),this}setNodeMarkup(e,t,n=null,r=[]){return function(e,t,n,r,o){let i=e.doc.nodeAt(t);if(!i)throw new RangeError("No node at given position");n||(n=i.type);let s=n.create(r,null,o||i.marks);if(i.isLeaf)return e.replaceWith(t,t+i.nodeSize,s);if(!n.validContent(i.content))throw new RangeError("Invalid content for node type "+n.name);e.step(new el(t,t+i.nodeSize,t+1,t+i.nodeSize-1,new Ks(Ps.from(s),0,0),1,!0))}(this,e,t,n,r),this}split(e,t=1,n){return function(e,t,n=1,r){let o=e.doc.resolve(t),i=Ps.empty,s=Ps.empty;for(let e=o.depth,t=o.depth-n,a=n-1;e>t;e--,a--){i=Ps.from(o.node(e).copy(i));let t=r&&r[a];s=Ps.from(t?t.type.create(t.attrs,s):o.node(e).copy(s))}e.step(new Za(t,t,new Ks(i.append(s),n,n),!0))}(this,e,t,n),this}addMark(e,t,n){return function(e,t,n,r){let o,i,s=[],a=[];e.doc.nodesBetween(t,n,((e,l,c)=>{if(!e.isInline)return;let u=e.marks;if(!r.isInSet(u)&&c.type.allowsMarkType(r.type)){let c=Math.max(l,t),d=Math.min(l+e.nodeSize,n),p=r.addToSet(u);for(let e=0;e<u.length;e++)u[e].isInSet(p)||(o&&o.to==c&&o.mark.eq(u[e])?o.to=d:s.push(o=new Qa(c,d,u[e])));i&&i.to==c?i.to=d:a.push(i=new Xa(c,d,r))}})),s.forEach((t=>e.step(t))),a.forEach((t=>e.step(t)))}(this,e,t,n),this}removeMark(e,t,n){return function(e,t,n,r){let o=[],i=0;e.doc.nodesBetween(t,n,((e,s)=>{if(!e.isInline)return;i++;let a=null;if(r instanceof _a){let t,n=e.marks;for(;t=r.isInSet(n);)(a||(a=[])).push(t),n=t.removeFromSet(n)}else r?r.isInSet(e.marks)&&(a=[r]):a=e.marks;if(a&&a.length){let r=Math.min(s+e.nodeSize,n);for(let e=0;e<a.length;e++){let n,l=a[e];for(let e=0;e<o.length;e++){let t=o[e];t.step==i-1&&l.eq(o[e].style)&&(n=t)}n?(n.to=r,n.step=i):o.push({style:l,from:Math.max(s,t),to:r,step:i})}}})),o.forEach((t=>e.step(new Qa(t.from,t.to,t.style))))}(this,e,t,n),this}clearIncompatible(e,t,n){return function(e,t,n,r=n.contentMatch){let o=e.doc.nodeAt(t),i=[],s=t+1;for(let t=0;t<o.childCount;t++){let a=o.child(t),l=s+a.nodeSize,c=r.matchType(a.type);if(c){r=c;for(let t=0;t<a.marks.length;t++)n.allowsMarkType(a.marks[t].type)||e.step(new Qa(s,l,a.marks[t]))}else i.push(new Za(s,l,Ks.empty));s=l}if(!r.validEnd){let t=r.fillBefore(Ps.empty,!0);e.replace(s,s,new Ks(t,0,0))}for(let t=i.length-1;t>=0;t--)e.step(i[t])}(this,e,t,n),this}}const El=Object.create(null);class Cl{constructor(e,t,n){this.$anchor=e,this.$head=t,this.ranges=n||[new wl(e.min(t),e.max(t))]}get anchor(){return this.$anchor.pos}get head(){return this.$head.pos}get from(){return this.$from.pos}get to(){return this.$to.pos}get $from(){return this.ranges[0].$from}get $to(){return this.ranges[0].$to}get empty(){let e=this.ranges;for(let t=0;t<e.length;t++)if(e[t].$from.pos!=e[t].$to.pos)return!1;return!0}content(){return this.$from.doc.slice(this.from,this.to,!0)}replace(e,t=Ks.empty){let n=t.content.lastChild,r=null;for(let e=0;e<t.openEnd;e++)r=n,n=n.lastChild;let o=e.steps.length,i=this.ranges;for(let s=0;s<i.length;s++){let{$from:a,$to:l}=i[s],c=e.mapping.slice(o);e.replaceRange(c.map(a.pos),c.map(l.pos),s?Ks.empty:t),0==s&&Ml(e,o,(n?n.isInline:r&&r.isTextblock)?-1:1)}}replaceWith(e,t){let n=e.steps.length,r=this.ranges;for(let o=0;o<r.length;o++){let{$from:i,$to:s}=r[o],a=e.mapping.slice(n),l=a.map(i.pos),c=a.map(s.pos);o?e.deleteRange(l,c):(e.replaceRangeWith(l,c,t),Ml(e,n,t.isInline?-1:1))}}static findFrom(e,t,n=!1){let r=e.parent.inlineContent?new kl(e):Tl(e.node(0),e.parent,e.pos,e.index(),t,n);if(r)return r;for(let r=e.depth-1;r>=0;r--){let o=t<0?Tl(e.node(0),e.node(r),e.before(r+1),e.index(r),t,n):Tl(e.node(0),e.node(r),e.after(r+1),e.index(r)+1,t,n);if(o)return o}return null}static near(e,t=1){return this.findFrom(e,t)||this.findFrom(e,-t)||new Nl(e.node(0))}static atStart(e){return Tl(e,e,0,0,1)||new Nl(e)}static atEnd(e){return Tl(e,e,e.content.size,e.childCount,-1)||new Nl(e)}static fromJSON(e,t){if(!t||!t.type)throw new RangeError("Invalid input for Selection.fromJSON");let n=El[t.type];if(!n)throw new RangeError(`No selection type ${t.type} defined`);return n.fromJSON(e,t)}static jsonID(e,t){if(e in El)throw new RangeError("Duplicate use of selection JSON ID "+e);return El[e]=t,t.prototype.jsonID=e,t}getBookmark(){return kl.between(this.$anchor,this.$head).getBookmark()}}Cl.prototype.visible=!0;class wl{constructor(e,t){this.$from=e,this.$to=t}}let Al=!1;function _l(e){Al||e.parent.inlineContent||(Al=!0,console.warn("TextSelection endpoint not pointing into a node with inline content ("+e.parent.type.name+")"))}class kl extends Cl{constructor(e,t=e){_l(e),_l(t),super(e,t)}get $cursor(){return this.$anchor.pos==this.$head.pos?this.$head:null}map(e,t){let n=e.resolve(t.map(this.head));if(!n.parent.inlineContent)return Cl.near(n);let r=e.resolve(t.map(this.anchor));return new kl(r.parent.inlineContent?r:n,n)}replace(e,t=Ks.empty){if(super.replace(e,t),t==Ks.empty){let t=this.$from.marksAcross(this.$to);t&&e.ensureMarks(t)}}eq(e){return e instanceof kl&&e.anchor==this.anchor&&e.head==this.head}getBookmark(){return new xl(this.anchor,this.head)}toJSON(){return{type:"text",anchor:this.anchor,head:this.head}}static fromJSON(e,t){if("number"!=typeof t.anchor||"number"!=typeof t.head)throw new RangeError("Invalid input for TextSelection.fromJSON");return new kl(e.resolve(t.anchor),e.resolve(t.head))}static create(e,t,n=t){let r=e.resolve(t);return new this(r,n==t?r:e.resolve(n))}static between(e,t,n){let r=e.pos-t.pos;if(n&&!r||(n=r>=0?1:-1),!t.parent.inlineContent){let e=Cl.findFrom(t,n,!0)||Cl.findFrom(t,-n,!0);if(!e)return Cl.near(t,n);t=e.$head}return e.parent.inlineContent||(0==r||(e=(Cl.findFrom(e,-n,!0)||Cl.findFrom(e,n,!0)).$anchor).pos<t.pos!=r<0)&&(e=t),new kl(e,t)}}Cl.jsonID("text",kl);class xl{constructor(e,t){this.anchor=e,this.head=t}map(e){return new xl(e.map(this.anchor),e.map(this.head))}resolve(e){return kl.between(e.resolve(this.anchor),e.resolve(this.head))}}class Ol extends Cl{constructor(e){let t=e.nodeAfter,n=e.node(0).resolve(e.pos+t.nodeSize);super(e,n),this.node=t}map(e,t){let{deleted:n,pos:r}=t.mapResult(this.anchor),o=e.resolve(r);return n?Cl.near(o):new Ol(o)}content(){return new Ks(Ps.from(this.node),0,0)}eq(e){return e instanceof Ol&&e.anchor==this.anchor}toJSON(){return{type:"node",anchor:this.anchor}}getBookmark(){return new Sl(this.anchor)}static fromJSON(e,t){if("number"!=typeof t.anchor)throw new RangeError("Invalid input for NodeSelection.fromJSON");return new Ol(e.resolve(t.anchor))}static create(e,t){return new Ol(e.resolve(t))}static isSelectable(e){return!e.isText&&!1!==e.type.spec.selectable}}Ol.prototype.visible=!1,Cl.jsonID("node",Ol);class Sl{constructor(e){this.anchor=e}map(e){let{deleted:t,pos:n}=e.mapResult(this.anchor);return t?new xl(n,n):new Sl(n)}resolve(e){let t=e.resolve(this.anchor),n=t.nodeAfter;return n&&Ol.isSelectable(n)?new Ol(t):Cl.near(t)}}class Nl extends Cl{constructor(e){super(e.resolve(0),e.resolve(e.content.size))}replace(e,t=Ks.empty){if(t==Ks.empty){e.delete(0,e.doc.content.size);let t=Cl.atStart(e.doc);t.eq(e.selection)||e.setSelection(t)}else super.replace(e,t)}toJSON(){return{type:"all"}}static fromJSON(e){return new Nl(e)}map(e){return new Nl(e)}eq(e){return e instanceof Nl}getBookmark(){return Fl}}Cl.jsonID("all",Nl);const Fl={map(){return this},resolve:e=>new Nl(e)};function Tl(e,t,n,r,o,i=!1){if(t.inlineContent)return kl.create(e,n);for(let s=r-(o>0?0:1);o>0?s<t.childCount:s>=0;s+=o){let r=t.child(s);if(r.isAtom){if(!i&&Ol.isSelectable(r))return Ol.create(e,n-(o<0?r.nodeSize:0))}else{let t=Tl(e,r,n+o,o<0?r.childCount:0,o,i);if(t)return t}n+=r.nodeSize*o}return null}function Ml(e,t,n){let r=e.steps.length-1;if(r<t)return;let o,i=e.steps[r];(i instanceof Za||i instanceof el)&&(e.mapping.maps[r].forEach(((e,t,n,r)=>{null==o&&(o=r)})),e.setSelection(Cl.near(e.doc.resolve(o),n)))}function Il(e,t){return t&&e?e.bind(t):e}class $l{constructor(e,t,n){this.name=e,this.init=Il(t.init,n),this.apply=Il(t.apply,n)}}function Bl(e,t,n){for(let r in e){let o=e[r];o instanceof Function?o=o.bind(t):"handleDOMEvents"==r&&(o=Bl(o,t,{})),n[r]=o}return n}new $l("doc",{init:e=>e.doc||e.schema.topNodeType.createAndFill(),apply:e=>e.doc}),new $l("selection",{init:(e,t)=>e.selection||Cl.atStart(t.doc),apply:e=>e.selection}),new $l("storedMarks",{init:e=>e.storedMarks||null,apply:(e,t,n,r)=>r.selection.$cursor?e.storedMarks:null}),new $l("scrollToSelection",{init:()=>0,apply:(e,t)=>e.scrolledIntoView?t+1:t});class Ll{constructor(e){this.spec=e,this.props={},e.props&&Bl(e.props,this,this.props),this.key=e.key?e.key.key:Rl("plugin")}getState(e){return e[this.key]}}const Pl=Object.create(null);function Rl(e){return e in Pl?e+"$"+ ++Pl[e]:(Pl[e]=0,e+"$")}class zl{constructor(e="key"){this.key=Rl(e)}get(e){return e.config.pluginsByKey[this.key]}getState(e){return e[this.key]}}const jl="undefined"!=typeof navigator?navigator:null,Hl="undefined"!=typeof document?document:null,Vl=jl&&jl.userAgent||"",Kl=/Edge\/(\d+)/.exec(Vl),ql=/MSIE \d/.exec(Vl),Wl=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Vl),Ul=!!(ql||Wl||Kl),Gl=ql?document.documentMode:Wl?+Wl[1]:Kl?+Kl[1]:0,Jl=!Ul&&/gecko\/(\d+)/i.test(Vl);Jl&&(/Firefox\/(\d+)/.exec(Vl)||[0,0])[1];const Yl=!Ul&&/Chrome\/(\d+)/.exec(Vl),Xl=!!Yl,Ql=Yl?+Yl[1]:0,Zl=!Ul&&!!jl&&/Apple Computer/.test(jl.vendor),ec=Zl&&(/Mobile\/\w+/.test(Vl)||!!jl&&jl.maxTouchPoints>2),tc=ec||!!jl&&/Mac/.test(jl.platform),nc=/Android \d/.test(Vl),rc=!!Hl&&"webkitFontSmoothing"in Hl.documentElement.style,oc=rc?+(/\bAppleWebKit\/(\d+)/.exec(navigator.userAgent)||[0,0])[1]:0,ic=function(e){for(var t=0;;t++)if(!(e=e.previousSibling))return t},sc=/^(img|br|input|textarea|hr)$/i;function ac(e,t,n,r,o){for(;;){if(e==n&&t==r)return!0;if(t==(o<0?0:lc(e))){let n=e.parentNode;if(!n||1!=n.nodeType||cc(e)||sc.test(e.nodeName)||"false"==e.contentEditable)return!1;t=ic(e)+(o<0?0:1),e=n}else{if(1!=e.nodeType)return!1;if("false"==(e=e.childNodes[t+(o<0?-1:0)]).contentEditable)return!1;t=o<0?lc(e):0}}}function lc(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function cc(e){let t;for(let n=e;n&&!(t=n.pmViewDesc);n=n.parentNode);return t&&t.node&&t.node.isBlock&&(t.dom==e||t.contentDOM==e)}const uc=function(e){let t=e.isCollapsed;return t&&Xl&&e.rangeCount&&!e.getRangeAt(0).collapsed&&(t=!1),t};function dc(e,t){let n=document.createEvent("Event");return n.initEvent("keydown",!0,!0),n.keyCode=e,n.key=n.code=t,n}function pc(e,t=null){let n=e.domSelection(),r=e.state.doc;if(!n.focusNode)return null;let o=e.docView.nearestDesc(n.focusNode),i=o&&0==o.size,s=e.docView.posFromDOM(n.focusNode,n.focusOffset,1);if(s<0)return null;let a,l,c=r.resolve(s);if(uc(n)){for(a=c;o&&!o.node;)o=o.parent;let e=o.node;if(o&&e.isAtom&&Ol.isSelectable(e)&&o.parent&&(!e.isInline||!function(e,t,n){for(let r=0==t,o=t==lc(e);r||o;){if(e==n)return!0;let t=ic(e);if(!(e=e.parentNode))return!1;r=r&&0==t,o=o&&t==lc(e)}}(n.focusNode,n.focusOffset,o.dom))){let e=o.posBefore;l=new Ol(s==e?c:r.resolve(e))}}else{let t=e.docView.posFromDOM(n.anchorNode,n.anchorOffset,1);if(t<0)return null;a=r.resolve(t)}if(!l){l=Dc(e,a,c,"pointer"==t||e.state.selection.head<c.pos&&!i?1:-1)}return l}function hc(e){return e.editable?e.hasFocus():function(e){let t=e.domSelection();if(!t.anchorNode)return!1;try{return e.dom.contains(3==t.anchorNode.nodeType?t.anchorNode.parentNode:t.anchorNode)&&(e.editable||e.dom.contains(3==t.focusNode.nodeType?t.focusNode.parentNode:t.focusNode))}catch(e){return!1}}(e)&&document.activeElement&&document.activeElement.contains(e.dom)}function fc(e,t=!1){let n=e.state.selection;if(function(e,t){if(t instanceof Ol){let n=e.docView.descAt(t.from);n!=e.lastSelectedViewDesc&&(bc(e),n&&n.selectNode(),e.lastSelectedViewDesc=n)}else bc(e)}(e,n),hc(e)){if(!t&&e.input.mouseDown&&e.input.mouseDown.allowDefault&&Xl){let t=e.domSelection(),n=e.domObserver.currentSelection;if(t.anchorNode&&n.anchorNode&&(r=t.anchorNode,o=t.anchorOffset,i=n.anchorNode,s=n.anchorOffset,i&&(ac(r,o,i,s,-1)||ac(r,o,i,s,1))))return e.input.mouseDown.delayedSelectionSync=!0,void e.domObserver.setCurSelection()}var r,o,i,s;if(e.domObserver.disconnectSelection(),e.cursorWrapper)!function(e){let t=e.domSelection(),n=document.createRange(),r=e.cursorWrapper.dom,o="IMG"==r.nodeName;o?n.setEnd(r.parentNode,ic(r)+1):n.setEnd(r,0);n.collapse(!1),t.removeAllRanges(),t.addRange(n),!o&&!e.state.selection.visible&&Ul&&Gl<=11&&(r.disabled=!0,r.disabled=!1)}(e);else{let r,o,{anchor:i,head:s}=n;!mc||n instanceof kl||(n.$from.parent.inlineContent||(r=gc(e,n.from)),n.empty||n.$from.parent.inlineContent||(o=gc(e,n.to))),e.docView.setSelection(i,s,e.root,t),mc&&(r&&yc(r),o&&yc(o)),n.visible?e.dom.classList.remove("ProseMirror-hideselection"):(e.dom.classList.add("ProseMirror-hideselection"),"onselectionchange"in document&&function(e){let t=e.dom.ownerDocument;t.removeEventListener("selectionchange",e.input.hideSelectionGuard);let n=e.domSelection(),r=n.anchorNode,o=n.anchorOffset;t.addEventListener("selectionchange",e.input.hideSelectionGuard=()=>{n.anchorNode==r&&n.anchorOffset==o||(t.removeEventListener("selectionchange",e.input.hideSelectionGuard),setTimeout((()=>{hc(e)&&!e.state.selection.visible||e.dom.classList.remove("ProseMirror-hideselection")}),20))})}(e))}e.domObserver.setCurSelection(),e.domObserver.connectSelection()}}const mc=Zl||Xl&&Ql<63;function gc(e,t){let{node:n,offset:r}=e.docView.domFromPos(t,0),o=r<n.childNodes.length?n.childNodes[r]:null,i=r?n.childNodes[r-1]:null;if(Zl&&o&&"false"==o.contentEditable)return vc(o);if(!(o&&"false"!=o.contentEditable||i&&"false"!=i.contentEditable)){if(o)return vc(o);if(i)return vc(i)}}function vc(e){return e.contentEditable="true",Zl&&e.draggable&&(e.draggable=!1,e.wasDraggable=!0),e}function yc(e){e.contentEditable="false",e.wasDraggable&&(e.draggable=!0,e.wasDraggable=null)}function bc(e){e.lastSelectedViewDesc&&(e.lastSelectedViewDesc.parent&&e.lastSelectedViewDesc.deselectNode(),e.lastSelectedViewDesc=void 0)}function Dc(e,t,n,r){return e.someProp("createSelectionBetween",(r=>r(e,t,n)))||kl.between(t,n,r)}function Ec(e,t){let{$anchor:n,$head:r}=e.selection,o=t>0?n.max(r):n.min(r),i=o.parent.inlineContent?o.depth?e.doc.resolve(t>0?o.after():o.before()):null:o;return i&&Cl.findFrom(i,t)}function Cc(e,t){return e.dispatch(e.state.tr.setSelection(t).scrollIntoView()),!0}function wc(e,t,n){let r=e.state.selection;if(!(r instanceof kl)){if(r instanceof Ol&&r.node.isInline)return Cc(e,new kl(t>0?r.$to:r.$from));{let n=Ec(e.state,t);return!!n&&Cc(e,n)}}if(!r.empty||n.indexOf("s")>-1)return!1;if(e.endOfTextblock(t>0?"right":"left")){let n=Ec(e.state,t);return!!(n&&n instanceof Ol)&&Cc(e,n)}if(!(tc&&n.indexOf("m")>-1)){let n,o=r.$head,i=o.textOffset?null:t<0?o.nodeBefore:o.nodeAfter;if(!i||i.isText)return!1;let s=t<0?o.pos-i.nodeSize:o.pos;return!!(i.isAtom||(n=e.docView.descAt(s))&&!n.contentDOM)&&(Ol.isSelectable(i)?Cc(e,new Ol(t<0?e.state.doc.resolve(o.pos-i.nodeSize):o)):!!rc&&Cc(e,new kl(e.state.doc.resolve(t<0?s:s+i.nodeSize))))}}function Ac(e){return 3==e.nodeType?e.nodeValue.length:e.childNodes.length}function _c(e){let t=e.pmViewDesc;return t&&0==t.size&&(e.nextSibling||"BR"!=e.nodeName)}function kc(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=!1;for(Jl&&1==n.nodeType&&r<Ac(n)&&_c(n.childNodes[r])&&(s=!0);;)if(r>0){if(1!=n.nodeType)break;{let e=n.childNodes[r-1];if(_c(e))o=n,i=--r;else{if(3!=e.nodeType)break;n=e,r=n.nodeValue.length}}}else{if(Oc(n))break;{let t=n.previousSibling;for(;t&&_c(t);)o=n.parentNode,i=ic(t),t=t.previousSibling;if(t)n=t,r=Ac(n);else{if(n=n.parentNode,n==e.dom)break;r=0}}}s?Sc(e,t,n,r):o&&Sc(e,t,o,i)}function xc(e){let t=e.domSelection(),n=t.focusNode,r=t.focusOffset;if(!n)return;let o,i,s=Ac(n);for(;;)if(r<s){if(1!=n.nodeType)break;if(!_c(n.childNodes[r]))break;o=n,i=++r}else{if(Oc(n))break;{let t=n.nextSibling;for(;t&&_c(t);)o=t.parentNode,i=ic(t)+1,t=t.nextSibling;if(t)n=t,r=0,s=Ac(n);else{if(n=n.parentNode,n==e.dom)break;r=s=0}}}o&&Sc(e,t,o,i)}function Oc(e){let t=e.pmViewDesc;return t&&t.node&&t.node.isBlock}function Sc(e,t,n,r){if(uc(t)){let e=document.createRange();e.setEnd(n,r),e.setStart(n,r),t.removeAllRanges(),t.addRange(e)}else t.extend&&t.extend(n,r);e.domObserver.setCurSelection();let{state:o}=e;setTimeout((()=>{e.state==o&&fc(e)}),50)}function Nc(e,t,n){let r=e.state.selection;if(r instanceof kl&&!r.empty||n.indexOf("s")>-1)return!1;if(tc&&n.indexOf("m")>-1)return!1;let{$from:o,$to:i}=r;if(!o.parent.inlineContent||e.endOfTextblock(t<0?"up":"down")){let n=Ec(e.state,t);if(n&&n instanceof Ol)return Cc(e,n)}if(!o.parent.inlineContent){let n=t<0?o:i,s=r instanceof Nl?Cl.near(n,t):Cl.findFrom(n,t);return!!s&&Cc(e,s)}return!1}function Fc(e,t){if(!(e.state.selection instanceof kl))return!0;let{$head:n,$anchor:r,empty:o}=e.state.selection;if(!n.sameParent(r))return!0;if(!o)return!1;if(e.endOfTextblock(t>0?"forward":"backward"))return!0;let i=!n.textOffset&&(t<0?n.nodeBefore:n.nodeAfter);if(i&&!i.isText){let r=e.state.tr;return t<0?r.delete(n.pos-i.nodeSize,n.pos):r.delete(n.pos,n.pos+i.nodeSize),e.dispatch(r),!0}return!1}function Tc(e,t,n){e.domObserver.stop(),t.contentEditable=n,e.domObserver.start()}function Mc(e,t){let n=t.keyCode,r=function(e){let t="";return e.ctrlKey&&(t+="c"),e.metaKey&&(t+="m"),e.altKey&&(t+="a"),e.shiftKey&&(t+="s"),t}(t);return 8==n||tc&&72==n&&"c"==r?Fc(e,-1)||kc(e):46==n||tc&&68==n&&"c"==r?Fc(e,1)||xc(e):13==n||27==n||(37==n||tc&&66==n&&"c"==r?wc(e,-1,r)||kc(e):39==n||tc&&70==n&&"c"==r?wc(e,1,r)||xc(e):38==n||tc&&80==n&&"c"==r?Nc(e,-1,r)||kc(e):40==n||tc&&78==n&&"c"==r?function(e){if(!Zl||e.state.selection.$head.parentOffset>0)return!1;let{focusNode:t,focusOffset:n}=e.domSelection();if(t&&1==t.nodeType&&0==n&&t.firstChild&&"false"==t.firstChild.contentEditable){let n=t.firstChild;Tc(e,n,"true"),setTimeout((()=>Tc(e,n,"false")),20)}return!1}(e)||Nc(e,1,r)||xc(e):r==(tc?"m":"c")&&(66==n||73==n||89==n||90==n))}function Ic(e,t){let n=[],{content:r,openStart:o,openEnd:i}=t;for(;o>1&&i>1&&1==r.childCount&&1==r.firstChild.childCount;){o--,i--;let e=r.firstChild;n.push(e.type.name,e.attrs!=e.type.defaultAttrs?e.attrs:null),r=e.content}let s=e.someProp("clipboardSerializer")||Pa.fromSchema(e.state.schema),a=Kc(),l=a.createElement("div");l.appendChild(s.serializeFragment(r,{document:a}));let c,u=l.firstChild,d=0;for(;u&&1==u.nodeType&&(c=Hc[u.nodeName.toLowerCase()]);){for(let e=c.length-1;e>=0;e--){let t=a.createElement(c[e]);for(;l.firstChild;)t.appendChild(l.firstChild);l.appendChild(t),d++}u=l.firstChild}return u&&1==u.nodeType&&u.setAttribute("data-pm-slice",`${o} ${i}${d?` -${d}`:""} ${JSON.stringify(n)}`),{dom:l,text:e.someProp("clipboardTextSerializer",(e=>e(t)))||t.content.textBetween(0,t.content.size,"\n\n")}}function $c(e,t,n,r,o){let i,s,a=o.parent.type.spec.code;if(!n&&!t)return null;let l=t&&(r||a||!n);if(l){if(e.someProp("transformPastedText",(e=>{t=e(t,a||r)})),a)return t?new Ks(Ps.from(e.state.schema.text(t.replace(/\r\n?/g,"\n"))),0,0):Ks.empty;let n=e.someProp("clipboardTextParser",(e=>e(t,o,r)));if(n)s=n;else{let n=o.marks(),{schema:r}=e.state,s=Pa.fromSchema(r);i=document.createElement("div"),t.split(/(?:\r\n?|\n)+/).forEach((e=>{let t=i.appendChild(document.createElement("p"));e&&t.appendChild(s.serializeNode(r.text(e,n)))}))}}else e.someProp("transformPastedHTML",(e=>{n=e(n)})),i=function(e){let t=/^(\s*<meta [^>]*>)*/.exec(e);t&&(e=e.slice(t[0].length));let n,r=Kc().createElement("div"),o=/<([a-z][^>\s]+)/i.exec(e);(n=o&&Hc[o[1].toLowerCase()])&&(e=n.map((e=>"<"+e+">")).join("")+e+n.map((e=>"</"+e+">")).reverse().join(""));if(r.innerHTML=e,n)for(let e=0;e<n.length;e++)r=r.querySelector(n[e])||r;return r}(n),rc&&function(e){let t=e.querySelectorAll(Xl?"span:not([class]):not([style])":"span.Apple-converted-space");for(let n=0;n<t.length;n++){let r=t[n];1==r.childNodes.length&&" "==r.textContent&&r.parentNode&&r.parentNode.replaceChild(e.ownerDocument.createTextNode(" "),r)}}(i);let c=i&&i.querySelector("[data-pm-slice]"),u=c&&/^(\d+) (\d+)(?: -(\d+))? (.*)/.exec(c.getAttribute("data-pm-slice")||"");if(u&&u[3])for(let e=+u[3];e>0&&i.firstChild;e--)i=i.firstChild;if(!s){let t=e.someProp("clipboardParser")||e.someProp("domParser")||Oa.fromSchema(e.state.schema);s=t.parseSlice(i,{preserveWhitespace:!(!l&&!u),context:o,ruleFromNode:e=>"BR"!=e.nodeName||e.nextSibling||!e.parentNode||Bc.test(e.parentNode.nodeName)?null:{ignore:!0}})}if(u)s=function(e,t){if(!e.size)return e;let n,r=e.content.firstChild.type.schema;try{n=JSON.parse(t)}catch(t){return e}let{content:o,openStart:i,openEnd:s}=e;for(let e=n.length-2;e>=0;e-=2){let t=r.nodes[n[e]];if(!t||t.hasRequiredAttrs())break;o=Ps.from(t.create(n[e+1],o)),i++,s++}return new Ks(o,i,s)}(jc(s,+u[1],+u[2]),u[4]);else if(s=Ks.maxOpen(function(e,t){if(e.childCount<2)return e;for(let n=t.depth;n>=0;n--){let r,o=t.node(n).contentMatchAt(t.index(n)),i=[];if(e.forEach((e=>{if(!i)return;let t,n=o.findWrapping(e.type);if(!n)return i=null;if(t=i.length&&r.length&&Pc(n,r,e,i[i.length-1],0))i[i.length-1]=t;else{i.length&&(i[i.length-1]=Rc(i[i.length-1],r.length));let t=Lc(e,n);i.push(t),o=o.matchType(t.type),r=n}})),i)return Ps.from(i)}return e}(s.content,o),!0),s.openStart||s.openEnd){let e=0,t=0;for(let t=s.content.firstChild;e<s.openStart&&!t.type.spec.isolating;e++,t=t.firstChild);for(let e=s.content.lastChild;t<s.openEnd&&!e.type.spec.isolating;t++,e=e.lastChild);s=jc(s,e,t)}return e.someProp("transformPasted",(e=>{s=e(s)})),s}const Bc=/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var)$/i;function Lc(e,t,n=0){for(let r=t.length-1;r>=n;r--)e=t[r].create(null,Ps.from(e));return e}function Pc(e,t,n,r,o){if(o<e.length&&o<t.length&&e[o]==t[o]){let i=Pc(e,t,n,r.lastChild,o+1);if(i)return r.copy(r.content.replaceChild(r.childCount-1,i));if(r.contentMatchAt(r.childCount).matchType(o==e.length-1?n.type:e[o+1]))return r.copy(r.content.append(Ps.from(Lc(n,e,o+1))))}}function Rc(e,t){if(0==t)return e;let n=e.content.replaceChild(e.childCount-1,Rc(e.lastChild,t-1)),r=e.contentMatchAt(e.childCount).fillBefore(Ps.empty,!0);return e.copy(n.append(r))}function zc(e,t,n,r,o,i){let s=t<0?e.firstChild:e.lastChild,a=s.content;return o<r-1&&(a=zc(a,t,n,r,o+1,i)),o>=n&&(a=t<0?s.contentMatchAt(0).fillBefore(a,e.childCount>1||i<=o).append(a):a.append(s.contentMatchAt(s.childCount).fillBefore(Ps.empty,!0))),e.replaceChild(t<0?0:e.childCount-1,s.copy(a))}function jc(e,t,n){return t<e.openStart&&(e=new Ks(zc(e.content,-1,t,e.openStart,0,e.openEnd),t,e.openEnd)),n<e.openEnd&&(e=new Ks(zc(e.content,1,n,e.openEnd,0,0),e.openStart,n)),e}const Hc={thead:["table"],tbody:["table"],tfoot:["table"],caption:["table"],colgroup:["table"],col:["table","colgroup"],tr:["table","tbody"],td:["table","tbody","tr"],th:["table","tbody","tr"]};let Vc=null;function Kc(){return Vc||(Vc=document.implementation.createHTMLDocument("title"))}const qc={};let Wc={};function Uc(e,t){e.input.lastSelectionOrigin=t,e.input.lastSelectionTime=Date.now()}function Gc(e){return{left:e.clientX,top:e.clientY}}function Jc(e,t,n,r,o){if(-1==r)return!1;let i=e.state.doc.resolve(r);for(let r=i.depth+1;r>0;r--)if(e.someProp(t,(t=>r>i.depth?t(e,n,i.nodeAfter,i.before(r),o,!0):t(e,n,i.node(r),i.before(r),o,!1))))return!0;return!1}function Yc(e,t,n){e.focused||e.focus();let r=e.state.tr.setSelection(t);"pointer"==n&&r.setMeta("pointer",!0),e.dispatch(r)}function Xc(e,t,n,r,o){return Jc(e,"handleClickOn",t,n,r)||e.someProp("handleClick",(n=>n(e,t,r)))||(o?function(e,t){if(-1==t)return!1;let n,r,o=e.state.selection;o instanceof Ol&&(n=o.node);let i=e.state.doc.resolve(t);for(let e=i.depth+1;e>0;e--){let t=e>i.depth?i.nodeAfter:i.node(e);if(Ol.isSelectable(t)){r=n&&o.$from.depth>0&&e>=o.$from.depth&&i.before(o.$from.depth+1)==o.$from.pos?i.before(o.$from.depth):i.before(e);break}}return null!=r&&(Yc(e,Ol.create(e.state.doc,r),"pointer"),!0)}(e,n):function(e,t){if(-1==t)return!1;let n=e.state.doc.resolve(t),r=n.nodeAfter;return!!(r&&r.isAtom&&Ol.isSelectable(r))&&(Yc(e,new Ol(n),"pointer"),!0)}(e,n))}function Qc(e,t,n,r){return Jc(e,"handleDoubleClickOn",t,n,r)||e.someProp("handleDoubleClick",(n=>n(e,t,r)))}function Zc(e,t,n,r){return Jc(e,"handleTripleClickOn",t,n,r)||e.someProp("handleTripleClick",(n=>n(e,t,r)))||function(e,t,n){if(0!=n.button)return!1;let r=e.state.doc;if(-1==t)return!!r.inlineContent&&(Yc(e,kl.create(r,0,r.content.size),"pointer"),!0);let o=r.resolve(t);for(let t=o.depth+1;t>0;t--){let n=t>o.depth?o.nodeAfter:o.node(t),i=o.before(t);if(n.inlineContent)Yc(e,kl.create(r,i+1,i+1+n.content.size),"pointer");else{if(!Ol.isSelectable(n))continue;Yc(e,Ol.create(r,i),"pointer")}return!0}}(e,n,r)}function eu(e){return au(e)}Wc.keydown=(e,t)=>{let n=t;if(e.input.shiftKey=16==n.keyCode||n.shiftKey,!ru(e,n)&&(e.input.lastKeyCode=n.keyCode,e.input.lastKeyCodeTime=Date.now(),!nc||!Xl||13!=n.keyCode))if(229!=n.keyCode&&e.domObserver.forceFlush(),!ec||13!=n.keyCode||n.ctrlKey||n.altKey||n.metaKey)e.someProp("handleKeyDown",(t=>t(e,n)))||Mc(e,n)?n.preventDefault():Uc(e,"key");else{let t=Date.now();e.input.lastIOSEnter=t,e.input.lastIOSEnterFallbackTimeout=setTimeout((()=>{e.input.lastIOSEnter==t&&(e.someProp("handleKeyDown",(t=>t(e,dc(13,"Enter")))),e.input.lastIOSEnter=0)}),200)}},Wc.keyup=(e,t)=>{16==t.keyCode&&(e.input.shiftKey=!1)},Wc.keypress=(e,t)=>{let n=t;if(ru(e,n)||!n.charCode||n.ctrlKey&&!n.altKey||tc&&n.metaKey)return;if(e.someProp("handleKeyPress",(t=>t(e,n))))return void n.preventDefault();let r=e.state.selection;if(!(r instanceof kl&&r.$from.sameParent(r.$to))){let t=String.fromCharCode(n.charCode);e.someProp("handleTextInput",(n=>n(e,r.$from.pos,r.$to.pos,t)))||e.dispatch(e.state.tr.insertText(t).scrollIntoView()),n.preventDefault()}};const tu=tc?"metaKey":"ctrlKey";qc.mousedown=(e,t)=>{let n=t;e.input.shiftKey=n.shiftKey;let r=eu(e),o=Date.now(),i="singleClick";o-e.input.lastClick.time<500&&function(e,t){let n=t.x-e.clientX,r=t.y-e.clientY;return n*n+r*r<100}(n,e.input.lastClick)&&!n[tu]&&("singleClick"==e.input.lastClick.type?i="doubleClick":"doubleClick"==e.input.lastClick.type&&(i="tripleClick")),e.input.lastClick={time:o,x:n.clientX,y:n.clientY,type:i};let s=e.posAtCoords(Gc(n));s&&("singleClick"==i?(e.input.mouseDown&&e.input.mouseDown.done(),e.input.mouseDown=new nu(e,s,n,!!r)):("doubleClick"==i?Qc:Zc)(e,s.pos,s.inside,n)?n.preventDefault():Uc(e,"pointer"))};class nu{constructor(e,t,n,r){let o,i;if(this.view=e,this.pos=t,this.event=n,this.flushed=r,this.delayedSelectionSync=!1,this.mightDrag=null,this.startDoc=e.state.doc,this.selectNode=!!n[tu],this.allowDefault=n.shiftKey,t.inside>-1)o=e.state.doc.nodeAt(t.inside),i=t.inside;else{let n=e.state.doc.resolve(t.pos);o=n.parent,i=n.depth?n.before():0}const s=r?null:n.target,a=s?e.docView.nearestDesc(s,!0):null;this.target=a?a.dom:null;let{selection:l}=e.state;(0==n.button&&o.type.spec.draggable&&!1!==o.type.spec.selectable||l instanceof Ol&&l.from<=i&&l.to>i)&&(this.mightDrag={node:o,pos:i,addAttr:!(!this.target||this.target.draggable),setUneditable:!(!this.target||!Jl||this.target.hasAttribute("contentEditable"))}),this.target&&this.mightDrag&&(this.mightDrag.addAttr||this.mightDrag.setUneditable)&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&(this.target.draggable=!0),this.mightDrag.setUneditable&&setTimeout((()=>{this.view.input.mouseDown==this&&this.target.setAttribute("contentEditable","false")}),20),this.view.domObserver.start()),e.root.addEventListener("mouseup",this.up=this.up.bind(this)),e.root.addEventListener("mousemove",this.move=this.move.bind(this)),Uc(e,"pointer")}done(){this.view.root.removeEventListener("mouseup",this.up),this.view.root.removeEventListener("mousemove",this.move),this.mightDrag&&this.target&&(this.view.domObserver.stop(),this.mightDrag.addAttr&&this.target.removeAttribute("draggable"),this.mightDrag.setUneditable&&this.target.removeAttribute("contentEditable"),this.view.domObserver.start()),this.delayedSelectionSync&&setTimeout((()=>fc(this.view))),this.view.input.mouseDown=null}up(e){if(this.done(),!this.view.dom.contains(e.target))return;let t=this.pos;this.view.state.doc!=this.startDoc&&(t=this.view.posAtCoords(Gc(e))),this.allowDefault||!t?Uc(this.view,"pointer"):Xc(this.view,t.pos,t.inside,e,this.selectNode)?e.preventDefault():0==e.button&&(this.flushed||Zl&&this.mightDrag&&!this.mightDrag.node.isAtom||Xl&&!(this.view.state.selection instanceof kl)&&Math.min(Math.abs(t.pos-this.view.state.selection.from),Math.abs(t.pos-this.view.state.selection.to))<=2)?(Yc(this.view,Cl.near(this.view.state.doc.resolve(t.pos)),"pointer"),e.preventDefault()):Uc(this.view,"pointer")}move(e){!this.allowDefault&&(Math.abs(this.event.x-e.clientX)>4||Math.abs(this.event.y-e.clientY)>4)&&(this.allowDefault=!0),Uc(this.view,"pointer"),0==e.buttons&&this.done()}}function ru(e,t){return!!e.composing||!!(Zl&&Math.abs(t.timeStamp-e.input.compositionEndedAt)<500)&&(e.input.compositionEndedAt=-2e8,!0)}qc.touchdown=e=>{eu(e),Uc(e,"pointer")},qc.contextmenu=e=>eu(e);const ou=nc?5e3:-1;function iu(e,t){clearTimeout(e.input.composingTimeout),t>-1&&(e.input.composingTimeout=setTimeout((()=>au(e)),t))}function su(e){for(e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=function(){let e=document.createEvent("Event");return e.initEvent("event",!0,!0),e.timeStamp}());e.input.compositionNodes.length>0;)e.input.compositionNodes.pop().markParentsDirty()}function au(e,t=!1){if(!(nc&&e.domObserver.flushingSoon>=0)){if(e.domObserver.forceFlush(),su(e),t||e.docView&&e.docView.dirty){let t=pc(e);return t&&!t.eq(e.state.selection)?e.dispatch(e.state.tr.setSelection(t)):e.updateState(e.state),!0}return!1}}Wc.compositionstart=Wc.compositionupdate=e=>{if(!e.composing){e.domObserver.flush();let{state:t}=e,n=t.selection.$from;if(t.selection.empty&&(t.storedMarks||!n.textOffset&&n.parentOffset&&n.nodeBefore.marks.some((e=>!1===e.type.spec.inclusive))))e.markCursor=e.state.storedMarks||n.marks(),au(e,!0),e.markCursor=null;else if(au(e),Jl&&t.selection.empty&&n.parentOffset&&!n.textOffset&&n.nodeBefore.marks.length){let t=e.domSelection();for(let e=t.focusNode,n=t.focusOffset;e&&1==e.nodeType&&0!=n;){let r=n<0?e.lastChild:e.childNodes[n-1];if(!r)break;if(3==r.nodeType){t.collapse(r,r.nodeValue.length);break}e=r,n=-1}}e.input.composing=!0}iu(e,ou)},Wc.compositionend=(e,t)=>{e.composing&&(e.input.composing=!1,e.input.compositionEndedAt=t.timeStamp,iu(e,20))};const lu=Ul&&Gl<15||ec&&oc<604;function cu(e,t,n,r){let o=$c(e,t,n,e.input.shiftKey,e.state.selection.$from);if(e.someProp("handlePaste",(t=>t(e,r,o||Ks.empty))))return!0;if(!o)return!1;let i=function(e){return 0==e.openStart&&0==e.openEnd&&1==e.content.childCount?e.content.firstChild:null}(o),s=i?e.state.tr.replaceSelectionWith(i,e.input.shiftKey):e.state.tr.replaceSelection(o);return e.dispatch(s.scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste")),!0}qc.copy=Wc.cut=(e,t)=>{let n=t,r=e.state.selection,o="cut"==n.type;if(r.empty)return;let i=lu?null:n.clipboardData,s=r.content(),{dom:a,text:l}=Ic(e,s);i?(n.preventDefault(),i.clearData(),i.setData("text/html",a.innerHTML),i.setData("text/plain",l)):function(e,t){if(!e.dom.parentNode)return;let n=e.dom.parentNode.appendChild(document.createElement("div"));n.appendChild(t),n.style.cssText="position: fixed; left: -10000px; top: 10px";let r=getSelection(),o=document.createRange();o.selectNodeContents(t),e.dom.blur(),r.removeAllRanges(),r.addRange(o),setTimeout((()=>{n.parentNode&&n.parentNode.removeChild(n),e.focus()}),50)}(e,a),o&&e.dispatch(e.state.tr.deleteSelection().scrollIntoView().setMeta("uiEvent","cut"))},Wc.paste=(e,t)=>{let n=t;if(e.composing&&!nc)return;let r=lu?null:n.clipboardData;r&&cu(e,r.getData("text/plain"),r.getData("text/html"),n)?n.preventDefault():function(e,t){if(!e.dom.parentNode)return;let n=e.input.shiftKey||e.state.selection.$from.parent.type.spec.code,r=e.dom.parentNode.appendChild(document.createElement(n?"textarea":"div"));n||(r.contentEditable="true"),r.style.cssText="position: fixed; left: -10000px; top: 10px",r.focus(),setTimeout((()=>{e.focus(),r.parentNode&&r.parentNode.removeChild(r),n?cu(e,r.value,null,t):cu(e,r.textContent,r.innerHTML,t)}),50)}(e,n)};class uu{constructor(e,t){this.slice=e,this.move=t}}const du=tc?"altKey":"ctrlKey";qc.dragstart=(e,t)=>{let n=t,r=e.input.mouseDown;if(r&&r.done(),!n.dataTransfer)return;let o=e.state.selection,i=o.empty?null:e.posAtCoords(Gc(n));if(i&&i.pos>=o.from&&i.pos<=(o instanceof Ol?o.to-1:o.to));else if(r&&r.mightDrag)e.dispatch(e.state.tr.setSelection(Ol.create(e.state.doc,r.mightDrag.pos)));else if(n.target&&1==n.target.nodeType){let t=e.docView.nearestDesc(n.target,!0);t&&t.node.type.spec.draggable&&t!=e.docView&&e.dispatch(e.state.tr.setSelection(Ol.create(e.state.doc,t.posBefore)))}let s=e.state.selection.content(),{dom:a,text:l}=Ic(e,s);n.dataTransfer.clearData(),n.dataTransfer.setData(lu?"Text":"text/html",a.innerHTML),n.dataTransfer.effectAllowed="copyMove",lu||n.dataTransfer.setData("text/plain",l),e.dragging=new uu(s,!n[du])},qc.dragend=e=>{let t=e.dragging;window.setTimeout((()=>{e.dragging==t&&(e.dragging=null)}),50)},Wc.dragover=Wc.dragenter=(e,t)=>t.preventDefault(),Wc.drop=(e,t)=>{let n=t,r=e.dragging;if(e.dragging=null,!n.dataTransfer)return;let o=e.posAtCoords(Gc(n));if(!o)return;let i=e.state.doc.resolve(o.pos);if(!i)return;let s=r&&r.slice;s?e.someProp("transformPasted",(e=>{s=e(s)})):s=$c(e,n.dataTransfer.getData(lu?"Text":"text/plain"),lu?null:n.dataTransfer.getData("text/html"),!1,i);let a=!(!r||n[du]);if(e.someProp("handleDrop",(t=>t(e,n,s||Ks.empty,a))))return void n.preventDefault();if(!s)return;n.preventDefault();let l=s?function(e,t,n){let r=e.resolve(t);if(!n.content.size)return t;let o=n.content;for(let e=0;e<n.openStart;e++)o=o.firstChild.content;for(let e=1;e<=(0==n.openStart&&n.size?2:1);e++)for(let t=r.depth;t>=0;t--){let n=t==r.depth?0:r.pos<=(r.start(t+1)+r.end(t+1))/2?-1:1,i=r.index(t)+(n>0?1:0),s=r.node(t),a=!1;if(1==e)a=s.canReplace(i,i,o);else{let e=s.contentMatchAt(i).findWrapping(o.firstChild.type);a=e&&s.canReplaceWith(i,i,e[0])}if(a)return 0==n?r.pos:n<0?r.before(t+1):r.after(t+1)}return null}(e.state.doc,i.pos,s):i.pos;null==l&&(l=i.pos);let c=e.state.tr;a&&c.deleteSelection();let u=c.mapping.map(l),d=0==s.openStart&&0==s.openEnd&&1==s.content.childCount,p=c.doc;if(d?c.replaceRangeWith(u,u,s.content.firstChild):c.replaceRange(u,u,s),c.doc.eq(p))return;let h=c.doc.resolve(u);if(d&&Ol.isSelectable(s.content.firstChild)&&h.nodeAfter&&h.nodeAfter.sameMarkup(s.content.firstChild))c.setSelection(new Ol(h));else{let t=c.mapping.map(l);c.mapping.maps[c.mapping.maps.length-1].forEach(((e,n,r,o)=>t=o)),c.setSelection(Dc(e,h,c.doc.resolve(t)))}e.focus(),e.dispatch(c.setMeta("uiEvent","drop"))},qc.focus=e=>{e.focused||(e.domObserver.stop(),e.dom.classList.add("ProseMirror-focused"),e.domObserver.start(),e.focused=!0,setTimeout((()=>{e.docView&&e.hasFocus()&&!e.domObserver.currentSelection.eq(e.domSelection())&&fc(e)}),20))},qc.blur=(e,t)=>{let n=t;e.focused&&(e.domObserver.stop(),e.dom.classList.remove("ProseMirror-focused"),e.domObserver.start(),n.relatedTarget&&e.dom.contains(n.relatedTarget)&&e.domObserver.currentSelection.clear(),e.focused=!1)},qc.beforeinput=(e,t)=>{if(Xl&&nc&&"deleteContentBackward"==t.inputType){e.domObserver.flushSoon();let{domChangeCount:t}=e.input;setTimeout((()=>{if(e.input.domChangeCount!=t)return;if(e.dom.blur(),e.focus(),e.someProp("handleKeyDown",(t=>t(e,dc(8,"Backspace")))))return;let{$cursor:n}=e.state.selection;n&&n.pos>0&&e.dispatch(e.state.tr.delete(n.pos-1,n.pos).scrollIntoView())}),50)}};for(let e in Wc)qc[e]=Wc[e];function pu(e,t){if(e==t)return!0;for(let n in e)if(e[n]!==t[n])return!1;for(let n in t)if(!(n in e))return!1;return!0}class hu{constructor(e,t){this.toDOM=e,this.spec=t||yu,this.side=this.spec.side||0}map(e,t,n,r){let{pos:o,deleted:i}=e.mapResult(t.from+r,this.side<0?-1:1);return i?null:new gu(o-n,o-n,this)}valid(){return!0}eq(e){return this==e||e instanceof hu&&(this.spec.key&&this.spec.key==e.spec.key||this.toDOM==e.toDOM&&pu(this.spec,e.spec))}destroy(e){this.spec.destroy&&this.spec.destroy(e)}}class fu{constructor(e,t){this.attrs=e,this.spec=t||yu}map(e,t,n,r){let o=e.map(t.from+r,this.spec.inclusiveStart?-1:1)-n,i=e.map(t.to+r,this.spec.inclusiveEnd?1:-1)-n;return o>=i?null:new gu(o,i,this)}valid(e,t){return t.from<t.to}eq(e){return this==e||e instanceof fu&&pu(this.attrs,e.attrs)&&pu(this.spec,e.spec)}static is(e){return e.type instanceof fu}destroy(){}}class mu{constructor(e,t){this.attrs=e,this.spec=t||yu}map(e,t,n,r){let o=e.mapResult(t.from+r,1);if(o.deleted)return null;let i=e.mapResult(t.to+r,-1);return i.deleted||i.pos<=o.pos?null:new gu(o.pos-n,i.pos-n,this)}valid(e,t){let n,{index:r,offset:o}=e.content.findIndex(t.from);return o==t.from&&!(n=e.child(r)).isText&&o+n.nodeSize==t.to}eq(e){return this==e||e instanceof mu&&pu(this.attrs,e.attrs)&&pu(this.spec,e.spec)}destroy(){}}class gu{constructor(e,t,n){this.from=e,this.to=t,this.type=n}copy(e,t){return new gu(e,t,this.type)}eq(e,t=0){return this.type.eq(e.type)&&this.from+t==e.from&&this.to+t==e.to}map(e,t,n){return this.type.map(e,this,t,n)}static widget(e,t,n){return new gu(e,e,new hu(t,n))}static inline(e,t,n,r){return new gu(e,t,new fu(n,r))}static node(e,t,n,r){return new gu(e,t,new mu(n,r))}get spec(){return this.type.spec}get inline(){return this.type instanceof fu}}const vu=[],yu={};class bu{constructor(e,t){this.local=e.length?e:vu,this.children=t.length?t:vu}static create(e,t){return t.length?_u(t,e,0,yu):Du}find(e,t,n){let r=[];return this.findInner(null==e?0:e,null==t?1e9:t,r,0,n),r}findInner(e,t,n,r,o){for(let i=0;i<this.local.length;i++){let s=this.local[i];s.from<=t&&s.to>=e&&(!o||o(s.spec))&&n.push(s.copy(s.from+r,s.to+r))}for(let i=0;i<this.children.length;i+=3)if(this.children[i]<t&&this.children[i+1]>e){let s=this.children[i]+1;this.children[i+2].findInner(e-s,t-s,n,r+s,o)}}map(e,t,n){return this==Du||0==e.maps.length?this:this.mapInner(e,t,0,0,n||yu)}mapInner(e,t,n,r,o){let i;for(let s=0;s<this.local.length;s++){let a=this.local[s].map(e,n,r);a&&a.type.valid(t,a)?(i||(i=[])).push(a):o.onRemove&&o.onRemove(this.local[s].spec)}return this.children.length?function(e,t,n,r,o,i,s){let a=e.slice(),l=(e,t,n,r)=>{for(let s=0;s<a.length;s+=3){let l,c=a[s+1];if(c<0||e>c+i)continue;let u=a[s]+i;t>=u?a[s+1]=e<=u?-2:-1:n>=o&&(l=r-n-(t-e))&&(a[s]+=l,a[s+1]+=l)}};for(let e=0;e<n.maps.length;e++)n.maps[e].forEach(l);let c=!1;for(let t=0;t<a.length;t+=3)if(a[t+1]<0){if(-2==a[t+1]){c=!0,a[t+1]=-1;continue}let l=n.map(e[t]+i),u=l-o;if(u<0||u>=r.content.size){c=!0;continue}let d=n.map(e[t+1]+i,-1)-o,{index:p,offset:h}=r.content.findIndex(u),f=r.maybeChild(p);if(f&&h==u&&h+f.nodeSize==d){let r=a[t+2].mapInner(n,f,l+1,e[t]+i+1,s);r!=Du?(a[t]=u,a[t+1]=d,a[t+2]=r):(a[t+1]=-2,c=!0)}else c=!0}if(c){let l=function(e,t,n,r,o,i,s){function a(e,t){for(let i=0;i<e.local.length;i++){let a=e.local[i].map(r,o,t);a?n.push(a):s.onRemove&&s.onRemove(e.local[i].spec)}for(let n=0;n<e.children.length;n+=3)a(e.children[n+2],e.children[n]+t+1)}for(let n=0;n<e.length;n+=3)-1==e[n+1]&&a(e[n+2],t[n]+i+1);return n}(a,e,t,n,o,i,s),c=_u(l,r,0,s);t=c.local;for(let e=0;e<a.length;e+=3)a[e+1]<0&&(a.splice(e,3),e-=3);for(let e=0,t=0;e<c.children.length;e+=3){let n=c.children[e];for(;t<a.length&&a[t]<n;)t+=3;a.splice(t,0,c.children[e],c.children[e+1],c.children[e+2])}}return new bu(t.sort(ku),a)}(this.children,i||[],e,t,n,r,o):i?new bu(i.sort(ku),vu):Du}add(e,t){return t.length?this==Du?bu.create(e,t):this.addInner(e,t,0):this}addInner(e,t,n){let r,o=0;e.forEach(((e,i)=>{let s,a=i+n;if(s=wu(t,e,a)){for(r||(r=this.children.slice());o<r.length&&r[o]<i;)o+=3;r[o]==i?r[o+2]=r[o+2].addInner(e,s,a+1):r.splice(o,0,i,i+e.nodeSize,_u(s,e,a+1,yu)),o+=3}}));let i=Cu(o?Au(t):t,-n);for(let t=0;t<i.length;t++)i[t].type.valid(e,i[t])||i.splice(t--,1);return new bu(i.length?this.local.concat(i).sort(ku):this.local,r||this.children)}remove(e){return 0==e.length||this==Du?this:this.removeInner(e,0)}removeInner(e,t){let n=this.children,r=this.local;for(let r=0;r<n.length;r+=3){let o,i=n[r]+t,s=n[r+1]+t;for(let t,n=0;n<e.length;n++)(t=e[n])&&t.from>i&&t.to<s&&(e[n]=null,(o||(o=[])).push(t));if(!o)continue;n==this.children&&(n=this.children.slice());let a=n[r+2].removeInner(o,i+1);a!=Du?n[r+2]=a:(n.splice(r,3),r-=3)}if(r.length)for(let n,o=0;o<e.length;o++)if(n=e[o])for(let e=0;e<r.length;e++)r[e].eq(n,t)&&(r==this.local&&(r=this.local.slice()),r.splice(e--,1));return n==this.children&&r==this.local?this:r.length||n.length?new bu(r,n):Du}forChild(e,t){if(this==Du)return this;if(t.isLeaf)return bu.empty;let n,r;for(let t=0;t<this.children.length;t+=3)if(this.children[t]>=e){this.children[t]==e&&(n=this.children[t+2]);break}let o=e+1,i=o+t.content.size;for(let e=0;e<this.local.length;e++){let t=this.local[e];if(t.from<i&&t.to>o&&t.type instanceof fu){let e=Math.max(o,t.from)-o,n=Math.min(i,t.to)-o;e<n&&(r||(r=[])).push(t.copy(e,n))}}if(r){let e=new bu(r.sort(ku),vu);return n?new Eu([e,n]):e}return n||Du}eq(e){if(this==e)return!0;if(!(e instanceof bu)||this.local.length!=e.local.length||this.children.length!=e.children.length)return!1;for(let t=0;t<this.local.length;t++)if(!this.local[t].eq(e.local[t]))return!1;for(let t=0;t<this.children.length;t+=3)if(this.children[t]!=e.children[t]||this.children[t+1]!=e.children[t+1]||!this.children[t+2].eq(e.children[t+2]))return!1;return!0}locals(e){return xu(this.localsInner(e))}localsInner(e){if(this==Du)return vu;if(e.inlineContent||!this.local.some(fu.is))return this.local;let t=[];for(let e=0;e<this.local.length;e++)this.local[e].type instanceof fu||t.push(this.local[e]);return t}}bu.empty=new bu([],[]),bu.removeOverlap=xu;const Du=bu.empty;class Eu{constructor(e){this.members=e}map(e,t){const n=this.members.map((n=>n.map(e,t,yu)));return Eu.from(n)}forChild(e,t){if(t.isLeaf)return bu.empty;let n=[];for(let r=0;r<this.members.length;r++){let o=this.members[r].forChild(e,t);o!=Du&&(o instanceof Eu?n=n.concat(o.members):n.push(o))}return Eu.from(n)}eq(e){if(!(e instanceof Eu)||e.members.length!=this.members.length)return!1;for(let t=0;t<this.members.length;t++)if(!this.members[t].eq(e.members[t]))return!1;return!0}locals(e){let t,n=!0;for(let r=0;r<this.members.length;r++){let o=this.members[r].localsInner(e);if(o.length)if(t){n&&(t=t.slice(),n=!1);for(let e=0;e<o.length;e++)t.push(o[e])}else t=o}return t?xu(n?t:t.sort(ku)):vu}static from(e){switch(e.length){case 0:return Du;case 1:return e[0];default:return new Eu(e)}}}function Cu(e,t){if(!t||!e.length)return e;let n=[];for(let r=0;r<e.length;r++){let o=e[r];n.push(new gu(o.from+t,o.to+t,o.type))}return n}function wu(e,t,n){if(t.isLeaf)return null;let r=n+t.nodeSize,o=null;for(let t,i=0;i<e.length;i++)(t=e[i])&&t.from>n&&t.to<r&&((o||(o=[])).push(t),e[i]=null);return o}function Au(e){let t=[];for(let n=0;n<e.length;n++)null!=e[n]&&t.push(e[n]);return t}function _u(e,t,n,r){let o=[],i=!1;t.forEach(((t,s)=>{let a=wu(e,t,s+n);if(a){i=!0;let e=_u(a,t,n+s+1,r);e!=Du&&o.push(s,s+t.nodeSize,e)}}));let s=Cu(i?Au(e):e,-n).sort(ku);for(let e=0;e<s.length;e++)s[e].type.valid(t,s[e])||(r.onRemove&&r.onRemove(s[e].spec),s.splice(e--,1));return s.length||o.length?new bu(s,o):Du}function ku(e,t){return e.from-t.from||e.to-t.to}function xu(e){let t=e;for(let n=0;n<t.length-1;n++){let r=t[n];if(r.from!=r.to)for(let o=n+1;o<t.length;o++){let i=t[o];if(i.from!=r.from){i.from<r.to&&(t==e&&(t=e.slice()),t[n]=r.copy(r.from,i.from),Ou(t,o,r.copy(i.from,r.to)));break}i.to!=r.to&&(t==e&&(t=e.slice()),t[o]=i.copy(i.from,r.to),Ou(t,o+1,i.copy(r.to,i.to)))}}return t}function Ou(e,t,n){for(;t<e.length&&ku(n,e[t])>0;)t++;e.splice(t,0,n)}for(var Su={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",229:"q"},Nu={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"',229:"Q"},Fu="undefined"!=typeof navigator&&/Chrome\/(\d+)/.exec(navigator.userAgent),Tu="undefined"!=typeof navigator&&/Apple Computer/.test(navigator.vendor),Mu="undefined"!=typeof navigator&&/Gecko\/\d+/.test(navigator.userAgent),Iu="undefined"!=typeof navigator&&/Mac/.test(navigator.platform),$u="undefined"!=typeof navigator&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent),Bu=Fu&&(Iu||+Fu[1]<57)||Mu&&Iu,Lu=0;Lu<10;Lu++)Su[48+Lu]=Su[96+Lu]=String(Lu);for(Lu=1;Lu<=24;Lu++)Su[Lu+111]="F"+Lu;for(Lu=65;Lu<=90;Lu++)Su[Lu]=String.fromCharCode(Lu+32),Nu[Lu]=String.fromCharCode(Lu);for(var Pu in Su)Nu.hasOwnProperty(Pu)||(Nu[Pu]=Su[Pu]);const Ru="undefined"!=typeof navigator&&/Mac|iP(hone|[oa]d)/.test(navigator.platform);function zu(e){let t,n,r,o,i=e.split(/-(?!$)/),s=i[i.length-1];"Space"==s&&(s=" ");for(let e=0;e<i.length-1;e++){let s=i[e];if(/^(cmd|meta|m)$/i.test(s))o=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))r=!0;else{if(!/^mod$/i.test(s))throw new Error("Unrecognized modifier name: "+s);Ru?o=!0:n=!0}}return t&&(s="Alt-"+s),n&&(s="Ctrl-"+s),o&&(s="Meta-"+s),r&&(s="Shift-"+s),s}function ju(e,t,n){return t.altKey&&(e="Alt-"+e),t.ctrlKey&&(e="Ctrl-"+e),t.metaKey&&(e="Meta-"+e),!1!==n&&t.shiftKey&&(e="Shift-"+e),e}function Hu(e){let t=function(e){let t=Object.create(null);for(let n in e)t[zu(n)]=e[n];return t}(e);return function(e,n){let r,o=function(e){var t=!(Bu&&(e.ctrlKey||e.altKey||e.metaKey)||(Tu||$u)&&e.shiftKey&&e.key&&1==e.key.length)&&e.key||(e.shiftKey?Nu:Su)[e.keyCode]||e.key||"Unidentified";return"Esc"==t&&(t="Escape"),"Del"==t&&(t="Delete"),"Left"==t&&(t="ArrowLeft"),"Up"==t&&(t="ArrowUp"),"Right"==t&&(t="ArrowRight"),"Down"==t&&(t="ArrowDown"),t}(n),i=1==o.length&&" "!=o,s=t[ju(o,n,!i)];if(s&&s(e.state,e.dispatch,e))return!0;if(i&&(n.shiftKey||n.altKey||n.metaKey||o.charCodeAt(0)>127)&&(r=Su[n.keyCode])&&r!=o){let o=t[ju(r,n,!0)];if(o&&o(e.state,e.dispatch,e))return!0}else if(i&&n.shiftKey){let r=t[ju(o,n,!0)];if(r&&r(e.state,e.dispatch,e))return!0}return!1}}function Vu(e,t,n=!1){for(let r=e;r;r="start"==t?r.firstChild:r.lastChild){if(r.isTextblock)return!0;if(n&&1!=r.childCount)return!1}return!1}function Ku(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){if(e.index(t)>0)return e.doc.resolve(e.before(t+1));if(e.node(t).type.spec.isolating)break}return null}function qu(e){if(!e.parent.type.spec.isolating)for(let t=e.depth-1;t>=0;t--){let n=e.node(t);if(e.index(t)+1<n.childCount)return e.doc.resolve(e.after(t+1));if(n.type.spec.isolating)break}return null}function Wu(e){for(let t=0;t<e.edgeCount;t++){let{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}function Uu(e,t,n){let r,o,i=t.nodeBefore,s=t.nodeAfter;if(i.type.spec.isolating||s.type.spec.isolating)return!1;if(function(e,t,n){let r=t.nodeBefore,o=t.nodeAfter,i=t.index();return!(!(r&&o&&r.type.compatibleContent(o.type))||(!r.content.size&&t.parent.canReplace(i-1,i)?(n&&n(e.tr.delete(t.pos-r.nodeSize,t.pos).scrollIntoView()),0):!t.parent.canReplace(i,i+1)||!o.isTextblock&&!al(e.doc,t.pos)||(n&&n(e.tr.clearIncompatible(t.pos,r.type,r.contentMatchAt(r.childCount)).join(t.pos).scrollIntoView()),0)))}(e,t,n))return!0;let a=t.parent.canReplace(t.index(),t.index()+1);if(a&&(r=(o=i.contentMatchAt(i.childCount)).findWrapping(s.type))&&o.matchType(r[0]||s.type).validEnd){if(n){let o=t.pos+s.nodeSize,a=Ps.empty;for(let e=r.length-1;e>=0;e--)a=Ps.from(r[e].create(null,a));a=Ps.from(i.copy(a));let l=e.tr.step(new el(t.pos-1,o,t.pos,o,new Ks(a,1,0),r.length,!0)),c=o+2*r.length;al(l.doc,c)&&l.join(c),n(l.scrollIntoView())}return!0}let l=Cl.findFrom(t,1),c=l&&l.$from.blockRange(l.$to),u=c&&rl(c);if(null!=u&&u>=t.depth)return n&&n(e.tr.lift(c,u).scrollIntoView()),!0;if(a&&Vu(s,"start",!0)&&Vu(i,"end")){let r=i,o=[];for(;o.push(r),!r.isTextblock;)r=r.lastChild;let a=s,l=1;for(;!a.isTextblock;a=a.firstChild)l++;if(r.canReplace(r.childCount,r.childCount,a.content)){if(n){let r=Ps.empty;for(let e=o.length-1;e>=0;e--)r=Ps.from(o[e].copy(r));n(e.tr.step(new el(t.pos-o.length,t.pos+s.nodeSize,t.pos+l,t.pos+s.nodeSize-l,new Ks(r,o.length,0),0,!0)).scrollIntoView())}return!0}}return!1}function Gu(e){return function(t,n){let r=t.selection,o=e<0?r.$from:r.$to,i=o.depth;for(;o.node(i).isInline;){if(!i)return!1;i--}return!!o.node(i).isTextblock&&(n&&n(t.tr.setSelection(kl.create(t.doc,e<0?o.start(i):o.end(i)))),!0)}}const Ju=Gu(-1),Yu=Gu(1);function Xu(e,t=null){return function(n,r){let{from:o,to:i}=n.selection,s=!1;return n.doc.nodesBetween(o,i,((r,o)=>{if(s)return!1;if(r.isTextblock&&!r.hasMarkup(e,t))if(r.type==e)s=!0;else{let t=n.doc.resolve(o),r=t.index();s=t.parent.canReplaceWith(r,r+1,e)}})),!!s&&(r&&r(n.tr.setBlockType(o,i,e,t).scrollIntoView()),!0)}}function Qu(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=!1,l=s;if(!s)return!1;if(s.depth>=2&&o.node(s.depth-1).type.compatibleContent(e)&&0==s.startIndex){if(0==o.index(s.depth-1))return!1;let e=n.doc.resolve(s.start-2);l=new sa(e,e,s.depth),s.endIndex<s.parent.childCount&&(s=new sa(o,n.doc.resolve(i.end(s.depth)),s.depth)),a=!0}let c=ol(l,e,t,s);return!!c&&(r&&r(function(e,t,n,r,o){let i=Ps.empty;for(let e=n.length-1;e>=0;e--)i=Ps.from(n[e].type.create(n[e].attrs,i));e.step(new el(t.start-(r?2:0),t.end,t.start,t.end,new Ks(i,0,0),n.length,!0));let s=0;for(let e=0;e<n.length;e++)n[e].type==o&&(s=e+1);let a=n.length-s,l=t.start+n.length-(r?2:0),c=t.parent;for(let n=t.startIndex,r=t.endIndex,o=!0;n<r;n++,o=!1)!o&&sl(e.doc,l,a)&&(e.split(l,a),l+=2*a),l+=c.child(n).nodeSize;return e}(n.tr,s,c,a,e).scrollIntoView()),!0)}}function Zu(e){return function(t,n){let{$from:r,$to:o}=t.selection,i=r.blockRange(o,(t=>t.childCount>0&&t.firstChild.type==e));return!!i&&(!n||(r.node(i.depth-1).type==e?function(e,t,n,r){let o=e.tr,i=r.end,s=r.$to.end(r.depth);i<s&&(o.step(new el(i-1,s,i,s,new Ks(Ps.from(n.create(null,r.parent.copy())),1,0),1,!0)),r=new sa(o.doc.resolve(r.$from.pos),o.doc.resolve(s),r.depth));return t(o.lift(r,rl(r)).scrollIntoView()),!0}(t,n,e,i):function(e,t,n){let r=e.tr,o=n.parent;for(let e=n.end,t=n.endIndex-1,i=n.startIndex;t>i;t--)e-=o.child(t).nodeSize,r.delete(e-1,e+1);let i=r.doc.resolve(n.start),s=i.nodeAfter;if(r.mapping.map(n.end)!=n.start+i.nodeAfter.nodeSize)return!1;let a=0==n.startIndex,l=n.endIndex==o.childCount,c=i.node(-1),u=i.index(-1);if(!c.canReplace(u+(a?0:1),u+1,s.content.append(l?Ps.empty:Ps.from(o))))return!1;let d=i.pos,p=d+s.nodeSize;return r.step(new el(d-(a?1:0),p+(l?1:0),d+1,p-1,new Ks((a?Ps.empty:Ps.from(o.copy(Ps.empty))).append(l?Ps.empty:Ps.from(o.copy(Ps.empty))),a?0:1,l?0:1),a?0:1)),t(r.scrollIntoView()),!0}(t,n,i)))}}function ed(e){const{state:t,transaction:n}=e;let{selection:r}=n,{doc:o}=n,{storedMarks:i}=n;return{...t,apply:t.apply.bind(t),applyTransaction:t.applyTransaction.bind(t),filterTransaction:t.filterTransaction,plugins:t.plugins,schema:t.schema,reconfigure:t.reconfigure.bind(t),toJSON:t.toJSON.bind(t),get storedMarks(){return i},get selection(){return r},get doc(){return o},get tr(){return r=n.selection,o=n.doc,i=n.storedMarks,n}}}"undefined"!=typeof navigator?/Mac|iP(hone|[oa]d)/.test(navigator.platform):"undefined"!=typeof os&&os.platform&&os.platform();class td{constructor(e){this.editor=e.editor,this.rawCommands=this.editor.extensionManager.commands,this.customState=e.state}get hasCustomState(){return!!this.customState}get state(){return this.customState||this.editor.state}get commands(){const{rawCommands:e,editor:t,state:n}=this,{view:r}=t,{tr:o}=n,i=this.buildProps(o);return Object.fromEntries(Object.entries(e).map((([e,t])=>[e,(...e)=>{const n=t(...e)(i);return o.getMeta("preventDispatch")||this.hasCustomState||r.dispatch(o),n}])))}get chain(){return()=>this.createChain()}get can(){return()=>this.createCan()}createChain(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r,s=[],a=!!e,l=e||o.tr,c={...Object.fromEntries(Object.entries(n).map((([e,n])=>[e,(...e)=>{const r=this.buildProps(l,t),o=n(...e)(r);return s.push(o),c}]))),run:()=>(a||!t||l.getMeta("preventDispatch")||this.hasCustomState||i.dispatch(l),s.every((e=>!0===e)))};return c}createCan(e){const{rawCommands:t,state:n}=this,r=e||n.tr,o=this.buildProps(r,false),i=Object.fromEntries(Object.entries(t).map((([e,t])=>[e,(...e)=>t(...e)({...o,dispatch:void 0})])));return{...i,chain:()=>this.createChain(r,false)}}buildProps(e,t=!0){const{rawCommands:n,editor:r,state:o}=this,{view:i}=r;o.storedMarks&&e.setStoredMarks(o.storedMarks);const s={tr:e,editor:r,view:i,state:ed({state:o,transaction:e}),dispatch:t?()=>{}:void 0,chain:()=>this.createChain(e),can:()=>this.createCan(e),get commands(){return Object.fromEntries(Object.entries(n).map((([e,t])=>[e,(...e)=>t(...e)(s)])))}};return s}}function nd(e,t,n){if(void 0===e.config[t]&&e.parent)return nd(e.parent,t,n);if("function"==typeof e.config[t]){return e.config[t].bind({...n,parent:e.parent?nd(e.parent,t,n):null})}return e.config[t]}function rd(e){return{baseExtensions:e.filter((e=>"extension"===e.type)),nodeExtensions:e.filter((e=>"node"===e.type)),markExtensions:e.filter((e=>"mark"===e.type))}}function od(e){const t=[],{nodeExtensions:n,markExtensions:r}=rd(e),o=[...n,...r],i={default:null,rendered:!0,renderHTML:null,parseHTML:null,keepOnSplit:!0,isRequired:!1};return e.forEach((e=>{const n=nd(e,"addGlobalAttributes",{name:e.name,options:e.options,storage:e.storage});if(!n)return;n().forEach((e=>{e.types.forEach((n=>{Object.entries(e.attributes).forEach((([e,r])=>{t.push({type:n,name:e,attribute:{...i,...r}})}))}))}))})),o.forEach((e=>{const n={name:e.name,options:e.options,storage:e.storage},r=nd(e,"addAttributes",n);if(!r)return;const o=r();Object.entries(o).forEach((([n,r])=>{const o={...i,...r};r.isRequired&&void 0===r.default&&delete o.default,t.push({type:e.name,name:n,attribute:o})}))})),t}function id(e,t){if("string"==typeof e){if(!t.nodes[e])throw Error(`There is no node type named '${e}'. Maybe you forgot to add the extension?`);return t.nodes[e]}return e}function sd(...e){return e.filter((e=>!!e)).reduce(((e,t)=>{const n={...e};return Object.entries(t).forEach((([e,t])=>{n[e]?n[e]="class"===e?[n[e],t].join(" "):"style"===e?[n[e],t].join("; "):t:n[e]=t})),n}),{})}function ad(e,t){return t.filter((e=>e.attribute.rendered)).map((t=>t.attribute.renderHTML?t.attribute.renderHTML(e.attrs)||{}:{[t.name]:e.attrs[t.name]})).reduce(((e,t)=>sd(e,t)),{})}function ld(e,t,...n){return function(e){return"function"==typeof e}(e)?t?e.bind(t)(...n):e(...n):e}function cd(e,t){return e.style?e:{...e,getAttrs:n=>{const r=e.getAttrs?e.getAttrs(n):e.attrs;if(!1===r)return!1;const o=t.reduce(((e,t)=>{const r=t.attribute.parseHTML?t.attribute.parseHTML(n):function(e){return"string"!=typeof e?e:e.match(/^[+-]?(?:\d*\.)?\d+$/)?Number(e):"true"===e||"false"!==e&&e}(n.getAttribute(t.name));return null==r?e:{...e,[t.name]:r}}),{});return{...r,...o}}}}function ud(e){return Object.fromEntries(Object.entries(e).filter((([e,t])=>("attrs"!==e||!function(e={}){return 0===Object.keys(e).length&&e.constructor===Object}(t))&&null!=t)))}function dd(e){var t;const n=od(e),{nodeExtensions:r,markExtensions:o}=rd(e),i=null===(t=r.find((e=>nd(e,"topNode"))))||void 0===t?void 0:t.name,s=Object.fromEntries(r.map((t=>{const r=n.filter((e=>e.type===t.name)),o={name:t.name,options:t.options,storage:t.storage},i=ud({...e.reduce(((e,n)=>{const r=nd(n,"extendNodeSchema",o);return{...e,...r?r(t):{}}}),{}),content:ld(nd(t,"content",o)),marks:ld(nd(t,"marks",o)),group:ld(nd(t,"group",o)),inline:ld(nd(t,"inline",o)),atom:ld(nd(t,"atom",o)),selectable:ld(nd(t,"selectable",o)),draggable:ld(nd(t,"draggable",o)),code:ld(nd(t,"code",o)),defining:ld(nd(t,"defining",o)),isolating:ld(nd(t,"isolating",o)),attrs:Object.fromEntries(r.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),s=ld(nd(t,"parseHTML",o));s&&(i.parseDOM=s.map((e=>cd(e,r))));const a=nd(t,"renderHTML",o);a&&(i.toDOM=e=>a({node:e,HTMLAttributes:ad(e,r)}));const l=nd(t,"renderText",o);return l&&(i.toText=l),[t.name,i]}))),a=Object.fromEntries(o.map((t=>{const r=n.filter((e=>e.type===t.name)),o={name:t.name,options:t.options,storage:t.storage},i=ud({...e.reduce(((e,n)=>{const r=nd(n,"extendMarkSchema",o);return{...e,...r?r(t):{}}}),{}),inclusive:ld(nd(t,"inclusive",o)),excludes:ld(nd(t,"excludes",o)),group:ld(nd(t,"group",o)),spanning:ld(nd(t,"spanning",o)),code:ld(nd(t,"code",o)),attrs:Object.fromEntries(r.map((e=>{var t;return[e.name,{default:null===(t=null==e?void 0:e.attribute)||void 0===t?void 0:t.default}]})))}),s=ld(nd(t,"parseHTML",o));s&&(i.parseDOM=s.map((e=>cd(e,r))));const a=nd(t,"renderHTML",o);return a&&(i.toDOM=e=>a({mark:e,HTMLAttributes:ad(e,r)})),[t.name,i]})));return new ka({topNode:i,nodes:s,marks:a})}function pd(e,t){return t.nodes[e]||t.marks[e]||null}function hd(e,t){return Array.isArray(t)?t.some((t=>("string"==typeof t?t:t.name)===e.name)):t}function fd(e){return"[object RegExp]"===Object.prototype.toString.call(e)}class md{constructor(e){this.find=e.find,this.handler=e.handler}}function gd(e){var t;const{editor:n,from:r,to:o,text:i,rules:s,plugin:a}=e,{view:l}=n;if(l.composing)return!1;const c=l.state.doc.resolve(r);if(c.parent.type.spec.code||(null===(t=c.nodeBefore||c.nodeAfter)||void 0===t?void 0:t.marks.find((e=>e.type.spec.code))))return!1;let u=!1;const d=((e,t=500)=>{let n="";return e.parent.nodesBetween(Math.max(0,e.parentOffset-t),e.parentOffset,((t,r,o,i)=>{var s,a,l;n+=(null===(a=(s=t.type.spec).toText)||void 0===a?void 0:a.call(s,{node:t,pos:r,parent:o,index:i}))||(null===(l=e.nodeBefore)||void 0===l?void 0:l.text)||"%leaf%"})),n})(c)+i;return s.forEach((e=>{if(u)return;const t=((e,t)=>{if(fd(t))return t.exec(e);const n=t(e);if(!n)return null;const r=[];return r.push(n.text),r.index=n.index,r.input=e,r.data=n.data,n.replaceWith&&(n.text.includes(n.replaceWith)||console.warn('[tiptap warn]: "inputRuleMatch.replaceWith" must be part of "inputRuleMatch.text".'),r.push(n.replaceWith)),r})(d,e.find);if(!t)return;const s=l.state.tr,c=ed({state:l.state,transaction:s}),p={from:r-(t[0].length-i.length),to:o},{commands:h,chain:f,can:m}=new td({editor:n,state:c});null!==e.handler({state:c,range:p,match:t,commands:h,chain:f,can:m})&&s.steps.length&&(s.setMeta(a,{transform:s,from:r,to:o,text:i}),l.dispatch(s),u=!0)})),u}function vd(e){const{editor:t,rules:n}=e,r=new Ll({state:{init:()=>null,apply(e,t){const n=e.getMeta(r);return n||(e.selectionSet||e.docChanged?null:t)}},props:{handleTextInput:(e,o,i,s)=>gd({editor:t,from:o,to:i,text:s,rules:n,plugin:r}),handleDOMEvents:{compositionend:e=>(setTimeout((()=>{const{$cursor:o}=e.state.selection;o&&gd({editor:t,from:o.pos,to:o.pos,text:"",rules:n,plugin:r})})),!1)},handleKeyDown(e,o){if("Enter"!==o.key)return!1;const{$cursor:i}=e.state.selection;return!!i&&gd({editor:t,from:i.pos,to:i.pos,text:"\n",rules:n,plugin:r})}},isInputRules:!0});return r}class yd{constructor(e){this.find=e.find,this.handler=e.handler}}function bd(e){const{editor:t,state:n,from:r,to:o,rule:i}=e,{commands:s,chain:a,can:l}=new td({editor:t,state:n}),c=[];n.doc.nodesBetween(r,o,((e,t)=>{if(!e.isTextblock||e.type.spec.code)return;const u=Math.max(r,t),d=Math.min(o,t+e.content.size),p=((e,t)=>{if(fd(t))return[...e.matchAll(t)];const n=t(e);return n?n.map((t=>{const n=[];return n.push(t.text),n.index=t.index,n.input=e,n.data=t.data,t.replaceWith&&(t.text.includes(t.replaceWith)||console.warn('[tiptap warn]: "pasteRuleMatch.replaceWith" must be part of "pasteRuleMatch.text".'),n.push(t.replaceWith)),n})):[]})(e.textBetween(u-t,d-t,void 0,""),i.find);p.forEach((e=>{if(void 0===e.index)return;const t=u+e.index+1,r=t+e[0].length,o={from:n.tr.mapping.map(t),to:n.tr.mapping.map(r)},d=i.handler({state:n,range:o,match:e,commands:s,chain:a,can:l});c.push(d)}))}));return c.every((e=>null!==e))}function Dd(e){const{editor:t,rules:n}=e;let r=null,o=!1,i=!1;return n.map((e=>new Ll({view(e){const t=t=>{var n;r=(null===(n=e.dom.parentElement)||void 0===n?void 0:n.contains(t.target))?e.dom.parentElement:null};return window.addEventListener("dragstart",t),{destroy(){window.removeEventListener("dragstart",t)}}},props:{handleDOMEvents:{drop:e=>(i=r===e.dom.parentElement,!1),paste:(e,t)=>{var n;const r=null===(n=t.clipboardData)||void 0===n?void 0:n.getData("text/html");return o=!!(null==r?void 0:r.includes("data-pm-slice")),!1}}},appendTransaction:(n,r,s)=>{const a=n[0],l="paste"===a.getMeta("uiEvent")&&!o,c="drop"===a.getMeta("uiEvent")&&!i;if(!l&&!c)return;const u=r.doc.content.findDiffStart(s.doc.content),d=r.doc.content.findDiffEnd(s.doc.content);if("number"!=typeof u||!d||u===d.b)return;const p=s.tr,h=ed({state:s,transaction:p});return bd({editor:t,state:h,from:Math.max(u-1,0),to:d.b-1,rule:e})&&p.steps.length?p:void 0}})))}class Ed{constructor(e,t){this.splittableMarks=[],this.editor=t,this.extensions=Ed.resolve(e),this.schema=dd(this.extensions),this.extensions.forEach((e=>{var t;this.editor.extensionStorage[e.name]=e.storage;const n={name:e.name,options:e.options,storage:e.storage,editor:this.editor,type:pd(e.name,this.schema)};if("mark"===e.type){(null===(t=ld(nd(e,"keepOnSplit",n)))||void 0===t||t)&&this.splittableMarks.push(e.name)}const r=nd(e,"onBeforeCreate",n);r&&this.editor.on("beforeCreate",r);const o=nd(e,"onCreate",n);o&&this.editor.on("create",o);const i=nd(e,"onUpdate",n);i&&this.editor.on("update",i);const s=nd(e,"onSelectionUpdate",n);s&&this.editor.on("selectionUpdate",s);const a=nd(e,"onTransaction",n);a&&this.editor.on("transaction",a);const l=nd(e,"onFocus",n);l&&this.editor.on("focus",l);const c=nd(e,"onBlur",n);c&&this.editor.on("blur",c);const u=nd(e,"onDestroy",n);u&&this.editor.on("destroy",u)}))}static resolve(e){const t=Ed.sort(Ed.flatten(e)),n=function(e){const t=e.filter(((t,n)=>e.indexOf(t)!==n));return[...new Set(t)]}(t.map((e=>e.name)));return n.length&&console.warn(`[tiptap warn]: Duplicate extension names found: [${n.map((e=>`'${e}'`)).join(", ")}]. This can lead to issues.`),t}static flatten(e){return e.map((e=>{const t=nd(e,"addExtensions",{name:e.name,options:e.options,storage:e.storage});return t?[e,...this.flatten(t())]:e})).flat(10)}static sort(e){return e.sort(((e,t)=>{const n=nd(e,"priority")||100,r=nd(t,"priority")||100;return n>r?-1:n<r?1:0}))}get commands(){return this.extensions.reduce(((e,t)=>{const n=nd(t,"addCommands",{name:t.name,options:t.options,storage:t.storage,editor:this.editor,type:pd(t.name,this.schema)});return n?{...e,...n()}:e}),{})}get plugins(){const{editor:e}=this,t=Ed.sort([...this.extensions].reverse()),n=[],r=[],o=t.map((t=>{const o={name:t.name,options:t.options,storage:t.storage,editor:e,type:pd(t.name,this.schema)},i=[],s=nd(t,"addKeyboardShortcuts",o);let a={};if("mark"===t.type&&t.config.exitable&&(a.ArrowRight=()=>Jd.handleExit({editor:e,mark:t})),s){const t=Object.fromEntries(Object.entries(s()).map((([t,n])=>[t,()=>n({editor:e})])));a={...a,...t}}const l=new Ll({props:{handleKeyDown:Hu(a)}});i.push(l);const c=nd(t,"addInputRules",o);hd(t,e.options.enableInputRules)&&c&&n.push(...c());const u=nd(t,"addPasteRules",o);hd(t,e.options.enablePasteRules)&&u&&r.push(...u());const d=nd(t,"addProseMirrorPlugins",o);if(d){const e=d();i.push(...e)}return i})).flat();return[vd({editor:e,rules:n}),...Dd({editor:e,rules:r}),...o]}get attributes(){return od(this.extensions)}get nodeViews(){const{editor:e}=this,{nodeExtensions:t}=rd(this.extensions);return Object.fromEntries(t.filter((e=>!!nd(e,"addNodeView"))).map((t=>{const n=this.attributes.filter((e=>e.type===t.name)),r={name:t.name,options:t.options,storage:t.storage,editor:e,type:id(t.name,this.schema)},o=nd(t,"addNodeView",r);if(!o)return[];return[t.name,(r,i,s,a)=>{const l=ad(r,n);return o()({editor:e,node:r,getPos:s,decorations:a,HTMLAttributes:l,extension:t})}]})))}}function Cd(e){return"Object"===function(e){return Object.prototype.toString.call(e).slice(8,-1)}(e)&&(e.constructor===Object&&Object.getPrototypeOf(e)===Object.prototype)}function wd(e,t){const n={...e};return Cd(e)&&Cd(t)&&Object.keys(t).forEach((r=>{Cd(t[r])?r in e?n[r]=wd(e[r],t[r]):Object.assign(n,{[r]:t[r]}):Object.assign(n,{[r]:t[r]})})),n}class Ad{constructor(e={}){this.type="extension",this.name="extension",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ld(nd(this,"addOptions",{name:this.name}))),this.storage=ld(nd(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Ad(e)}configure(e={}){const t=this.extend();return t.options=wd(this.options,e),t.storage=ld(nd(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Ad(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=ld(nd(t,"addOptions",{name:t.name})),t.storage=ld(nd(t,"addStorage",{name:t.name,options:t.options})),t}}Ad.create({name:"clipboardTextSerializer",addProseMirrorPlugins(){return[new Ll({key:new zl("clipboardTextSerializer"),props:{clipboardTextSerializer:()=>{const{editor:e}=this,{state:t,schema:n}=e,{doc:r,selection:o}=t,{ranges:i}=o,s=Math.min(...i.map((e=>e.$from.pos))),a=Math.max(...i.map((e=>e.$to.pos))),l=function(e){return Object.fromEntries(Object.entries(e.nodes).filter((([,e])=>e.spec.toText)).map((([e,t])=>[e,t.spec.toText])))}(n);return function(e,t,n){const{from:r,to:o}=t,{blockSeparator:i="\n\n",textSerializers:s={}}=n||{};let a="",l=!0;return e.nodesBetween(r,o,((e,n,c,u)=>{var d;const p=null==s?void 0:s[e.type.name];p?(e.isBlock&&!l&&(a+=i,l=!0),c&&(a+=p({node:e,pos:n,parent:c,index:u,range:t}))):e.isText?(a+=null===(d=null==e?void 0:e.text)||void 0===d?void 0:d.slice(Math.max(r,n)-n,o-n),l=!1):e.isBlock&&!l&&(a+=i,l=!0)})),a}(r,{from:s,to:a},{textSerializers:l})}}})]}});function _d(e,t,n={strict:!0}){const r=Object.keys(t);return!r.length||r.every((r=>n.strict?t[r]===e[r]:fd(t[r])?t[r].test(e[r]):t[r]===e[r]))}function kd(e,t,n={}){return e.find((e=>e.type===t&&_d(e.attrs,n)))}function xd(e,t,n={}){return!!kd(e,t,n)}function Od(e,t,n={}){if(!e||!t)return;let r=e.parent.childAfter(e.parentOffset);if(e.parentOffset===r.offset&&0!==r.offset&&(r=e.parent.childBefore(e.parentOffset)),!r.node)return;const o=kd([...r.node.marks],t,n);if(!o)return;let i=r.index,s=e.start()+r.offset,a=i+1,l=s+r.node.nodeSize;for(kd([...r.node.marks],t,n);i>0&&o.isInSet(e.parent.child(i-1).marks);)i-=1,s-=e.parent.child(i).nodeSize;for(;a<e.parent.childCount&&xd([...e.parent.child(a).marks],t,n);)l+=e.parent.child(a).nodeSize,a+=1;return{from:s,to:l}}function Sd(e,t){if("string"==typeof e){if(!t.marks[e])throw Error(`There is no mark type named '${e}'. Maybe you forgot to add the extension?`);return t.marks[e]}return e}function Nd(e=0,t=0,n=0){return Math.min(Math.max(e,t),n)}function Fd(){return["iPad Simulator","iPhone Simulator","iPod Simulator","iPad","iPhone","iPod"].includes(navigator.platform)||navigator.userAgent.includes("Mac")&&"ontouchend"in document}function Td(e){const t=`<body>${e}</body>`;return(new window.DOMParser).parseFromString(t,"text/html").body}function Md(e,t,n){if(n={slice:!0,parseOptions:{},...n},"object"==typeof e&&null!==e)try{return Array.isArray(e)?Ps.fromArray(e.map((e=>t.nodeFromJSON(e)))):t.nodeFromJSON(e)}catch(r){return console.warn("[tiptap warn]: Invalid content.","Passed value:",e,"Error:",r),Md("",t,n)}if("string"==typeof e){const r=Oa.fromSchema(t);return n.slice?r.parseSlice(Td(e),n.parseOptions).content:r.parse(Td(e),n.parseOptions)}return Md("",t,n)}function Id(){return"undefined"!=typeof navigator&&/Mac/.test(navigator.platform)}function $d(e,t,n={}){const{from:r,to:o,empty:i}=e.selection,s=t?id(t,e.schema):null,a=[];e.doc.nodesBetween(r,o,((e,t)=>{if(e.isText)return;const n=Math.max(r,t),i=Math.min(o,t+e.nodeSize);a.push({node:e,from:n,to:i})}));const l=o-r,c=a.filter((e=>!s||s.name===e.node.type.name)).filter((e=>_d(e.node.attrs,n,{strict:!1})));if(i)return!!c.length;return c.reduce(((e,t)=>e+t.to-t.from),0)>=l}function Bd(e,t){return t.nodes[e]?"node":t.marks[e]?"mark":null}function Ld(e,t){const n="string"==typeof t?[t]:t;return Object.keys(e).reduce(((t,r)=>(n.includes(r)||(t[r]=e[r]),t)),{})}function Pd(e,t){const n=Sd(t,e.schema),{from:r,to:o,empty:i}=e.selection,s=[];i?(e.storedMarks&&s.push(...e.storedMarks),s.push(...e.selection.$head.marks())):e.doc.nodesBetween(r,o,(e=>{s.push(...e.marks)}));const a=s.find((e=>e.type.name===n.name));return a?{...a.attrs}:{}}function Rd(e,t,n){return Object.fromEntries(Object.entries(n).filter((([n])=>{const r=e.find((e=>e.type===t&&e.name===n));return!!r&&r.attribute.keepOnSplit})))}function zd(e,t){const n=e.storedMarks||e.selection.$to.parentOffset&&e.selection.$from.marks();if(n){const r=n.filter((e=>null==t?void 0:t.includes(e.type.name)));e.tr.ensureMarks(r)}}function jd(e){return t=>function(e,t){for(let n=e.depth;n>0;n-=1){const r=e.node(n);if(t(r))return{pos:n>0?e.before(n):0,start:e.start(n),depth:n,node:r}}}(t.$from,e)}function Hd(e,t){const{nodeExtensions:n}=rd(t),r=n.find((t=>t.name===e));if(!r)return!1;const o=ld(nd(r,"group",{name:r.name,options:r.options,storage:r.storage}));return"string"==typeof o&&o.split(" ").includes("list")}const Vd=(e,t)=>{const n=jd((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(Math.max(0,n.pos-1)).before(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!al(e.doc,n.pos)||(e.join(n.pos),!0)},Kd=(e,t)=>{const n=jd((e=>e.type===t))(e.selection);if(!n)return!0;const r=e.doc.resolve(n.start).after(n.depth);if(void 0===r)return!0;const o=e.doc.nodeAt(r);return n.node.type!==(null==o?void 0:o.type)||!al(e.doc,r)||(e.join(r),!0)};var qd=Object.freeze({__proto__:null,blur:()=>({editor:e,view:t})=>(requestAnimationFrame((()=>{var n;e.isDestroyed||(t.dom.blur(),null===(n=null===window||void 0===window?void 0:window.getSelection())||void 0===n||n.removeAllRanges())})),!0),clearContent:(e=!1)=>({commands:t})=>t.setContent("",e),clearNodes:()=>({state:e,tr:t,dispatch:n})=>{const{selection:r}=t,{ranges:o}=r;return!n||(o.forEach((({$from:n,$to:r})=>{e.doc.nodesBetween(n.pos,r.pos,((e,n)=>{if(e.type.isText)return;const{doc:r,mapping:o}=t,i=r.resolve(o.map(n)),s=r.resolve(o.map(n+e.nodeSize)),a=i.blockRange(s);if(!a)return;const l=rl(a);if(e.type.isTextblock){const{defaultType:e}=i.parent.contentMatchAt(i.index());t.setNodeMarkup(a.start,e)}(l||0===l)&&t.lift(a,l)}))})),!0)},command:e=>t=>e(t),createParagraphNear:()=>({state:e,dispatch:t})=>((e,t)=>{let n=e.selection,{$from:r,$to:o}=n;if(n instanceof Nl||r.parent.inlineContent||o.parent.inlineContent)return!1;let i=Wu(o.parent.contentMatchAt(o.indexAfter()));if(!i||!i.isTextblock)return!1;if(t){let n=(!r.parentOffset&&o.index()<o.parent.childCount?r:o).pos,s=e.tr.insert(n,i.createAndFill());s.setSelection(kl.create(s.doc,n+1)),t(s.scrollIntoView())}return!0})(e,t),deleteNode:e=>({tr:t,state:n,dispatch:r})=>{const o=id(e,n.schema),i=t.selection.$anchor;for(let e=i.depth;e>0;e-=1){if(i.node(e).type===o){if(r){const n=i.before(e),r=i.after(e);t.delete(n,r).scrollIntoView()}return!0}}return!1},deleteRange:e=>({tr:t,dispatch:n})=>{const{from:r,to:o}=e;return n&&t.delete(r,o),!0},deleteSelection:()=>({state:e,dispatch:t})=>((e,t)=>!e.selection.empty&&(t&&t(e.tr.deleteSelection().scrollIntoView()),!0))(e,t),enter:()=>({commands:e})=>e.keyboardShortcut("Enter"),exitCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;if(!n.parent.type.spec.code||!n.sameParent(r))return!1;let o=n.node(-1),i=n.indexAfter(-1),s=Wu(o.contentMatchAt(i));if(!s||!o.canReplaceWith(i,i,s))return!1;if(t){let r=n.after(),o=e.tr.replaceWith(r,r,s.createAndFill());o.setSelection(Cl.near(o.doc.resolve(r),1)),t(o.scrollIntoView())}return!0})(e,t),extendMarkRange:(e,t={})=>({tr:n,state:r,dispatch:o})=>{const i=Sd(e,r.schema),{doc:s,selection:a}=n,{$from:l,from:c,to:u}=a;if(o){const e=Od(l,i,t);if(e&&e.from<=c&&e.to>=u){const t=kl.create(s,e.from,e.to);n.setSelection(t)}}return!0},first:e=>t=>{const n="function"==typeof e?e(t):e;for(let e=0;e<n.length;e+=1)if(n[e](t))return!0;return!1},focus:(e=null,t={})=>({editor:n,view:r,tr:o,dispatch:i})=>{t={scrollIntoView:!0,...t};const s=()=>{Fd()&&r.dom.focus(),requestAnimationFrame((()=>{n.isDestroyed||(r.focus(),(null==t?void 0:t.scrollIntoView)&&n.commands.scrollIntoView())}))};if(r.hasFocus()&&null===e||!1===e)return!0;if(i&&null===e&&!(n.state.selection instanceof kl))return s(),!0;const a=function(e,t=null){if(!t)return null;const n=Cl.atStart(e),r=Cl.atEnd(e);if("start"===t||!0===t)return n;if("end"===t)return r;const o=n.from,i=r.to;return"all"===t?kl.create(e,Nd(0,o,i),Nd(e.content.size,o,i)):kl.create(e,Nd(t,o,i),Nd(t,o,i))}(o.doc,e)||n.state.selection,l=n.state.selection.eq(a);return i&&(l||o.setSelection(a),l&&o.storedMarks&&o.setStoredMarks(o.storedMarks),s()),!0},forEach:(e,t)=>n=>e.every(((e,r)=>t(e,{...n,index:r}))),insertContent:(e,t)=>({tr:n,commands:r})=>r.insertContentAt({from:n.selection.from,to:n.selection.to},e,t),insertContentAt:(e,t,n)=>({tr:r,dispatch:o,editor:i})=>{if(o){n={parseOptions:{},updateSelection:!0,...n};const o=Md(t,i.schema,{parseOptions:{preserveWhitespace:"full",...n.parseOptions}});if("<>"===o.toString())return!0;let{from:s,to:a}="number"==typeof e?{from:e,to:e}:e,l=!0,c=!0;if((o.toString().startsWith("<")?o:[o]).forEach((e=>{e.check(),l=!!l&&(e.isText&&0===e.marks.length),c=!!c&&e.isBlock})),s===a&&c){const{parent:e}=r.doc.resolve(s);e.isTextblock&&!e.type.spec.code&&!e.childCount&&(s-=1,a+=1)}l?r.insertText(t,s,a):r.replaceWith(s,a,o),n.updateSelection&&function(e,t,n){const r=e.steps.length-1;if(r<t)return;const o=e.steps[r];if(!(o instanceof Za||o instanceof el))return;const i=e.mapping.maps[r];let s=0;i.forEach(((e,t,n,r)=>{0===s&&(s=r)})),e.setSelection(Cl.near(e.doc.resolve(s),n))}(r,r.steps.length-1,-1)}return!0},joinBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("backward",e):r.parentOffset>0))return!1;let o=Ku(r);if(!o){let n=r.blockRange(),o=n&&rl(n);return null!=o&&(t&&t(e.tr.lift(n,o).scrollIntoView()),!0)}let i=o.nodeBefore;if(!i.type.spec.isolating&&Uu(e,o,t))return!0;if(0==r.parent.content.size&&(Vu(i,"end")||Ol.isSelectable(i))){let n=ll(e.doc,r.before(),r.after(),Ks.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Vu(i,"end")?Cl.findFrom(r.doc.resolve(r.mapping.map(o.pos,-1)),-1):Ol.create(r.doc,o.pos-i.nodeSize)),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos-i.nodeSize,o.pos).scrollIntoView()),0))})(e,t),joinForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$cursor:r}=e.selection;if(!r||(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size))return!1;let o=qu(r);if(!o)return!1;let i=o.nodeAfter;if(Uu(e,o,t))return!0;if(0==r.parent.content.size&&(Vu(i,"start")||Ol.isSelectable(i))){let n=ll(e.doc,r.before(),r.after(),Ks.empty);if(n&&n.slice.size<n.to-n.from){if(t){let r=e.tr.step(n);r.setSelection(Vu(i,"start")?Cl.findFrom(r.doc.resolve(r.mapping.map(o.pos)),1):Ol.create(r.doc,r.mapping.map(o.pos))),t(r.scrollIntoView())}return!0}}return!(!i.isAtom||o.depth!=r.depth-1||(t&&t(e.tr.delete(o.pos,o.pos+i.nodeSize).scrollIntoView()),0))})(e,t),keyboardShortcut:e=>({editor:t,view:n,tr:r,dispatch:o})=>{const i=function(e){const t=e.split(/-(?!$)/);let n,r,o,i,s=t[t.length-1];"Space"===s&&(s=" ");for(let e=0;e<t.length-1;e+=1){const s=t[e];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))n=!0;else if(/^(c|ctrl|control)$/i.test(s))r=!0;else if(/^s(hift)?$/i.test(s))o=!0;else{if(!/^mod$/i.test(s))throw new Error(`Unrecognized modifier name: ${s}`);Fd()||Id()?i=!0:r=!0}}return n&&(s=`Alt-${s}`),r&&(s=`Ctrl-${s}`),i&&(s=`Meta-${s}`),o&&(s=`Shift-${s}`),s}(e).split(/-(?!$)/),s=i.find((e=>!["Alt","Ctrl","Meta","Shift"].includes(e))),a=new KeyboardEvent("keydown",{key:"Space"===s?" ":s,altKey:i.includes("Alt"),ctrlKey:i.includes("Ctrl"),metaKey:i.includes("Meta"),shiftKey:i.includes("Shift"),bubbles:!0,cancelable:!0}),l=t.captureTransaction((()=>{n.someProp("handleKeyDown",(e=>e(n,a)))}));return null==l||l.steps.forEach((e=>{const t=e.map(r.mapping);t&&o&&r.maybeStep(t)})),!0},lift:(e,t={})=>({state:n,dispatch:r})=>!!$d(n,id(e,n.schema),t)&&((e,t)=>{let{$from:n,$to:r}=e.selection,o=n.blockRange(r),i=o&&rl(o);return null!=i&&(t&&t(e.tr.lift(o,i).scrollIntoView()),!0)})(n,r),liftEmptyBlock:()=>({state:e,dispatch:t})=>((e,t)=>{let{$cursor:n}=e.selection;if(!n||n.parent.content.size)return!1;if(n.depth>1&&n.after()!=n.end(-1)){let r=n.before();if(sl(e.doc,r))return t&&t(e.tr.split(r).scrollIntoView()),!0}let r=n.blockRange(),o=r&&rl(r);return null!=o&&(t&&t(e.tr.lift(r,o).scrollIntoView()),!0)})(e,t),liftListItem:e=>({state:t,dispatch:n})=>Zu(id(e,t.schema))(t,n),newlineInCode:()=>({state:e,dispatch:t})=>((e,t)=>{let{$head:n,$anchor:r}=e.selection;return!(!n.parent.type.spec.code||!n.sameParent(r)||(t&&t(e.tr.insertText("\n").scrollIntoView()),0))})(e,t),resetAttributes:(e,t)=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=Bd("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(i=id(e,r.schema)),"mark"===a&&(s=Sd(e,r.schema)),o&&n.selection.ranges.forEach((e=>{r.doc.nodesBetween(e.$from.pos,e.$to.pos,((e,r)=>{i&&i===e.type&&n.setNodeMarkup(r,void 0,Ld(e.attrs,t)),s&&e.marks.length&&e.marks.forEach((o=>{s===o.type&&n.addMark(r,r+e.nodeSize,s.create(Ld(o.attrs,t)))}))}))})),!0)},scrollIntoView:()=>({tr:e,dispatch:t})=>(t&&e.scrollIntoView(),!0),selectAll:()=>({tr:e,commands:t})=>t.setTextSelection({from:0,to:e.doc.content.size}),selectNodeBackward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("backward",e):r.parentOffset>0)return!1;i=Ku(r)}let s=i&&i.nodeBefore;return!(!s||!Ol.isSelectable(s)||(t&&t(e.tr.setSelection(Ol.create(e.doc,i.pos-s.nodeSize)).scrollIntoView()),0))})(e,t),selectNodeForward:()=>({state:e,dispatch:t})=>((e,t,n)=>{let{$head:r,empty:o}=e.selection,i=r;if(!o)return!1;if(r.parent.isTextblock){if(n?!n.endOfTextblock("forward",e):r.parentOffset<r.parent.content.size)return!1;i=qu(r)}let s=i&&i.nodeAfter;return!(!s||!Ol.isSelectable(s)||(t&&t(e.tr.setSelection(Ol.create(e.doc,i.pos)).scrollIntoView()),0))})(e,t),selectParentNode:()=>({state:e,dispatch:t})=>((e,t)=>{let n,{$from:r,to:o}=e.selection,i=r.sharedDepth(o);return 0!=i&&(n=r.before(i),t&&t(e.tr.setSelection(Ol.create(e.doc,n))),!0)})(e,t),selectTextblockEnd:()=>({state:e,dispatch:t})=>Yu(e,t),selectTextblockStart:()=>({state:e,dispatch:t})=>Ju(e,t),setContent:(e,t=!1,n={})=>({tr:r,editor:o,dispatch:i})=>{const{doc:s}=r,a=function(e,t,n={}){return Md(e,t,{slice:!1,parseOptions:n})}(e,o.schema,n);return i&&r.replaceWith(0,s.content.size,a).setMeta("preventUpdate",!t),!0},setMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{const{selection:i}=n,{empty:s,ranges:a}=i,l=Sd(e,r.schema);if(o)if(s){const e=Pd(r,l);n.addStoredMark(l.create({...e,...t}))}else a.forEach((e=>{const o=e.$from.pos,i=e.$to.pos;r.doc.nodesBetween(o,i,((e,r)=>{const s=Math.max(r,o),a=Math.min(r+e.nodeSize,i),c=e.marks.find((e=>e.type===l));c?e.marks.forEach((e=>{l===e.type&&n.addMark(s,a,l.create({...e.attrs,...t}))})):n.addMark(s,a,l.create(t))}))}));return!0},setMeta:(e,t)=>({tr:n})=>(n.setMeta(e,t),!0),setNode:(e,t={})=>({state:n,dispatch:r,chain:o})=>{const i=id(e,n.schema);return i.isTextblock?o().command((({commands:e})=>!!Xu(i,t)(n)||e.clearNodes())).command((({state:e})=>Xu(i,t)(e,r))).run():(console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.'),!1)},setNodeSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,r=Nd(e,0,n.content.size),o=Ol.create(n,r);t.setSelection(o)}return!0},setTextSelection:e=>({tr:t,dispatch:n})=>{if(n){const{doc:n}=t,{from:r,to:o}="number"==typeof e?{from:e,to:e}:e,i=kl.atStart(n).from,s=kl.atEnd(n).to,a=Nd(r,i,s),l=Nd(o,i,s),c=kl.create(n,a,l);t.setSelection(c)}return!0},sinkListItem:e=>({state:t,dispatch:n})=>{const r=id(e,t.schema);return(o=r,function(e,t){let{$from:n,$to:r}=e.selection,i=n.blockRange(r,(e=>e.childCount>0&&e.firstChild.type==o));if(!i)return!1;let s=i.startIndex;if(0==s)return!1;let a=i.parent,l=a.child(s-1);if(l.type!=o)return!1;if(t){let n=l.lastChild&&l.lastChild.type==a.type,r=Ps.from(n?o.create():null),s=new Ks(Ps.from(o.create(null,Ps.from(a.type.create(null,r)))),n?3:1,0),c=i.start,u=i.end;t(e.tr.step(new el(c-(n?3:1),u,c,u,s,1,!0)).scrollIntoView())}return!0})(t,n);var o},splitBlock:({keepMarks:e=!0}={})=>({tr:t,state:n,dispatch:r,editor:o})=>{const{selection:i,doc:s}=t,{$from:a,$to:l}=i,c=Rd(o.extensionManager.attributes,a.node().type.name,a.node().attrs);if(i instanceof Ol&&i.node.isBlock)return!(!a.parentOffset||!sl(s,a.pos))&&(r&&(e&&zd(n,o.extensionManager.splittableMarks),t.split(a.pos).scrollIntoView()),!0);if(!a.parent.isBlock)return!1;if(r){const r=l.parentOffset===l.parent.content.size;i instanceof kl&&t.deleteSelection();const s=0===a.depth?void 0:function(e){for(let t=0;t<e.edgeCount;t+=1){const{type:n}=e.edge(t);if(n.isTextblock&&!n.hasRequiredAttrs())return n}return null}(a.node(-1).contentMatchAt(a.indexAfter(-1)));let u=r&&s?[{type:s,attrs:c}]:void 0,d=sl(t.doc,t.mapping.map(a.pos),1,u);if(u||d||!sl(t.doc,t.mapping.map(a.pos),1,s?[{type:s}]:void 0)||(d=!0,u=s?[{type:s,attrs:c}]:void 0),d&&(t.split(t.mapping.map(a.pos),1,u),s&&!r&&!a.parentOffset&&a.parent.type!==s)){const e=t.mapping.map(a.before()),n=t.doc.resolve(e);a.node(-1).canReplaceWith(n.index(),n.index()+1,s)&&t.setNodeMarkup(t.mapping.map(a.before()),s)}e&&zd(n,o.extensionManager.splittableMarks),t.scrollIntoView()}return!0},splitListItem:e=>({tr:t,state:n,dispatch:r,editor:o})=>{var i;const s=id(e,n.schema),{$from:a,$to:l}=n.selection,c=n.selection.node;if(c&&c.isBlock||a.depth<2||!a.sameParent(l))return!1;const u=a.node(-1);if(u.type!==s)return!1;const d=o.extensionManager.attributes;if(0===a.parent.content.size&&a.node(-1).childCount===a.indexAfter(-1)){if(2===a.depth||a.node(-3).type!==s||a.index(-2)!==a.node(-2).childCount-1)return!1;if(r){let e=Ps.empty;const n=a.index(-1)?1:a.index(-2)?2:3;for(let t=a.depth-n;t>=a.depth-3;t-=1)e=Ps.from(a.node(t).copy(e));const r=a.indexAfter(-1)<a.node(-2).childCount?1:a.indexAfter(-2)<a.node(-3).childCount?2:3,o=Rd(d,a.node().type.name,a.node().attrs),l=(null===(i=s.contentMatch.defaultType)||void 0===i?void 0:i.createAndFill(o))||void 0;e=e.append(Ps.from(s.createAndFill(null,l)||void 0));const c=a.before(a.depth-(n-1));t.replace(c,a.after(-r),new Ks(e,4-n,0));let u=-1;t.doc.nodesBetween(c,t.doc.content.size,((e,t)=>{if(u>-1)return!1;e.isTextblock&&0===e.content.size&&(u=t+1)})),u>-1&&t.setSelection(kl.near(t.doc.resolve(u))),t.scrollIntoView()}return!0}const p=l.pos===a.end()?u.contentMatchAt(0).defaultType:null,h=Rd(d,u.type.name,u.attrs),f=Rd(d,a.node().type.name,a.node().attrs);t.delete(a.pos,l.pos);const m=p?[{type:s,attrs:h},{type:p,attrs:f}]:[{type:s,attrs:h}];return!!sl(t.doc,a.pos,2)&&(r&&t.split(a.pos,2,m).scrollIntoView(),!0)},toggleList:(e,t)=>({editor:n,tr:r,state:o,dispatch:i,chain:s,commands:a,can:l})=>{const{extensions:c}=n.extensionManager,u=id(e,o.schema),d=id(t,o.schema),{selection:p}=o,{$from:h,$to:f}=p,m=h.blockRange(f);if(!m)return!1;const g=jd((e=>Hd(e.type.name,c)))(p);if(m.depth>=1&&g&&m.depth-g.depth<=1){if(g.node.type===u)return a.liftListItem(d);if(Hd(g.node.type.name,c)&&u.validContent(g.node.content)&&i)return s().command((()=>(r.setNodeMarkup(g.pos,u),!0))).command((()=>Vd(r,u))).command((()=>Kd(r,u))).run()}return s().command((()=>!!l().wrapInList(u)||a.clearNodes())).wrapInList(u).command((()=>Vd(r,u))).command((()=>Kd(r,u))).run()},toggleMark:(e,t={},n={})=>({state:r,commands:o})=>{const{extendEmptyMarkRange:i=!1}=n,s=Sd(e,r.schema),a=function(e,t,n={}){const{empty:r,ranges:o}=e.selection,i=t?Sd(t,e.schema):null;if(r)return!!(e.storedMarks||e.selection.$from.marks()).filter((e=>!i||i.name===e.type.name)).find((e=>_d(e.attrs,n,{strict:!1})));let s=0;const a=[];if(o.forEach((({$from:t,$to:n})=>{const r=t.pos,o=n.pos;e.doc.nodesBetween(r,o,((e,t)=>{if(!e.isText&&!e.marks.length)return;const n=Math.max(r,t),i=Math.min(o,t+e.nodeSize);s+=i-n,a.push(...e.marks.map((e=>({mark:e,from:n,to:i}))))}))})),0===s)return!1;const l=a.filter((e=>!i||i.name===e.mark.type.name)).filter((e=>_d(e.mark.attrs,n,{strict:!1}))).reduce(((e,t)=>e+t.to-t.from),0),c=a.filter((e=>!i||e.mark.type!==i&&e.mark.type.excludes(i))).reduce(((e,t)=>e+t.to-t.from),0);return(l>0?l+c:l)>=s}(r,s,t);return a?o.unsetMark(s,{extendEmptyMarkRange:i}):o.setMark(s,t)},toggleNode:(e,t,n={})=>({state:r,commands:o})=>{const i=id(e,r.schema),s=id(t,r.schema);return $d(r,i,n)?o.setNode(s):o.setNode(i,n)},toggleWrap:(e,t={})=>({state:n,commands:r})=>{const o=id(e,n.schema);return $d(n,o,t)?r.lift(o):r.wrapIn(o,t)},undoInputRule:()=>({state:e,dispatch:t})=>{const n=e.plugins;for(let r=0;r<n.length;r+=1){const o=n[r];let i;if(o.spec.isInputRules&&(i=o.getState(e))){if(t){const t=e.tr,n=i.transform;for(let e=n.steps.length-1;e>=0;e-=1)t.step(n.steps[e].invert(n.docs[e]));if(i.text){const n=t.doc.resolve(i.from).marks();t.replaceWith(i.from,i.to,e.schema.text(i.text,n))}else t.delete(i.from,i.to)}return!0}}return!1},unsetAllMarks:()=>({tr:e,dispatch:t})=>{const{selection:n}=e,{empty:r,ranges:o}=n;return r||t&&o.forEach((t=>{e.removeMark(t.$from.pos,t.$to.pos)})),!0},unsetMark:(e,t={})=>({tr:n,state:r,dispatch:o})=>{var i;const{extendEmptyMarkRange:s=!1}=t,{selection:a}=n,l=Sd(e,r.schema),{$from:c,empty:u,ranges:d}=a;if(!o)return!0;if(u&&s){let{from:e,to:t}=a;const r=null===(i=c.marks().find((e=>e.type===l)))||void 0===i?void 0:i.attrs,o=Od(c,l,r);o&&(e=o.from,t=o.to),n.removeMark(e,t,l)}else d.forEach((e=>{n.removeMark(e.$from.pos,e.$to.pos,l)}));return n.removeStoredMark(l),!0},updateAttributes:(e,t={})=>({tr:n,state:r,dispatch:o})=>{let i=null,s=null;const a=Bd("string"==typeof e?e:e.name,r.schema);return!!a&&("node"===a&&(i=id(e,r.schema)),"mark"===a&&(s=Sd(e,r.schema)),o&&n.selection.ranges.forEach((e=>{const o=e.$from.pos,a=e.$to.pos;r.doc.nodesBetween(o,a,((e,r)=>{i&&i===e.type&&n.setNodeMarkup(r,void 0,{...e.attrs,...t}),s&&e.marks.length&&e.marks.forEach((i=>{if(s===i.type){const l=Math.max(r,o),c=Math.min(r+e.nodeSize,a);n.addMark(l,c,s.create({...i.attrs,...t}))}}))}))})),!0)},wrapIn:(e,t={})=>({state:n,dispatch:r})=>function(e,t=null){return function(n,r){let{$from:o,$to:i}=n.selection,s=o.blockRange(i),a=s&&ol(s,e,t);return!!a&&(r&&r(n.tr.wrap(s,a).scrollIntoView()),!0)}}(id(e,n.schema),t)(n,r),wrapInList:(e,t={})=>({state:n,dispatch:r})=>Qu(id(e,n.schema),t)(n,r)});function Wd(e,t){const n=Bd("string"==typeof t?t:t.name,e.schema);return"node"===n?function(e,t){const n=id(t,e.schema),{from:r,to:o}=e.selection,i=[];e.doc.nodesBetween(r,o,(e=>{i.push(e)}));const s=i.reverse().find((e=>e.type.name===n.name));return s?{...s.attrs}:{}}(e,t):"mark"===n?Pd(e,t):{}}function Ud(e){const t=function(e,t=JSON.stringify){const n={};return e.filter((e=>{const r=t(e);return!Object.prototype.hasOwnProperty.call(n,r)&&(n[r]=!0)}))}(e);return 1===t.length?t:t.filter(((e,n)=>{const r=t.filter(((e,t)=>t!==n));return!r.some((t=>e.oldRange.from>=t.oldRange.from&&e.oldRange.to<=t.oldRange.to&&e.newRange.from>=t.newRange.from&&e.newRange.to<=t.newRange.to))}))}function Gd(e,t,n){const r=[];return e===t?n.resolve(e).marks().forEach((t=>{const o=Od(n.resolve(e-1),t.type);o&&r.push({mark:t,...o})})):n.nodesBetween(e,t,((e,t)=>{r.push(...e.marks.map((n=>({from:t,to:t+e.nodeSize,mark:n}))))})),r}Ad.create({name:"commands",addCommands:()=>({...qd})}),Ad.create({name:"editable",addProseMirrorPlugins(){return[new Ll({key:new zl("editable"),props:{editable:()=>this.editor.options.editable}})]}}),Ad.create({name:"focusEvents",addProseMirrorPlugins(){const{editor:e}=this;return[new Ll({key:new zl("focusEvents"),props:{handleDOMEvents:{focus:(t,n)=>{e.isFocused=!0;const r=e.state.tr.setMeta("focus",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1},blur:(t,n)=>{e.isFocused=!1;const r=e.state.tr.setMeta("blur",{event:n}).setMeta("addToHistory",!1);return t.dispatch(r),!1}}}})]}}),Ad.create({name:"keymap",addKeyboardShortcuts(){const e=()=>this.editor.commands.first((({commands:e})=>[()=>e.undoInputRule(),()=>e.command((({tr:t})=>{const{selection:n,doc:r}=t,{empty:o,$anchor:i}=n,{pos:s,parent:a}=i,l=Cl.atStart(r).from===s;return!(!(o&&l&&a.type.isTextblock)||a.textContent.length)&&e.clearNodes()})),()=>e.deleteSelection(),()=>e.joinBackward(),()=>e.selectNodeBackward()])),t=()=>this.editor.commands.first((({commands:e})=>[()=>e.deleteSelection(),()=>e.joinForward(),()=>e.selectNodeForward()])),n={Enter:()=>this.editor.commands.first((({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])),"Mod-Enter":()=>this.editor.commands.exitCode(),Backspace:e,"Mod-Backspace":e,"Shift-Backspace":e,Delete:t,"Mod-Delete":t,"Mod-a":()=>this.editor.commands.selectAll()},r={...n},o={...n,"Ctrl-h":e,"Alt-Backspace":e,"Ctrl-d":t,"Ctrl-Alt-Backspace":t,"Alt-Delete":t,"Alt-d":t,"Ctrl-a":()=>this.editor.commands.selectTextblockStart(),"Ctrl-e":()=>this.editor.commands.selectTextblockEnd()};return Fd()||Id()?o:r},addProseMirrorPlugins(){return[new Ll({key:new zl("clearDocument"),appendTransaction:(e,t,n)=>{if(!(e.some((e=>e.docChanged))&&!t.doc.eq(n.doc)))return;const{empty:r,from:o,to:i}=t.selection,s=Cl.atStart(t.doc).from,a=Cl.atEnd(t.doc).to,l=o===s&&i===a,c=0===n.doc.textBetween(0,n.doc.content.size," "," ").length;if(r||!l||!c)return;const u=n.tr,d=ed({state:n,transaction:u}),{commands:p}=new td({editor:this.editor,state:d});return p.clearNodes(),u.steps.length?u:void 0}})]}}),Ad.create({name:"tabindex",addProseMirrorPlugins(){return[new Ll({key:new zl("tabindex"),props:{attributes:this.editor.isEditable?{tabindex:"0"}:{}}})]}});class Jd{constructor(e={}){this.type="mark",this.name="mark",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ld(nd(this,"addOptions",{name:this.name}))),this.storage=ld(nd(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Jd(e)}configure(e={}){const t=this.extend();return t.options=wd(this.options,e),t.storage=ld(nd(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Jd(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=ld(nd(t,"addOptions",{name:t.name})),t.storage=ld(nd(t,"addStorage",{name:t.name,options:t.options})),t}static handleExit({editor:e,mark:t}){const{tr:n}=e.state,r=e.state.selection.$from;if(r.pos===r.end()){const o=r.marks();if(!!!o.find((e=>(null==e?void 0:e.type.name)===t.name)))return!1;const i=o.find((e=>(null==e?void 0:e.type.name)===t.name));return i&&n.removeStoredMark(i),n.insertText(" ",r.pos),e.view.dispatch(n),!0}return!1}}class Yd{constructor(e={}){this.type="node",this.name="node",this.parent=null,this.child=null,this.config={name:this.name,defaultOptions:{}},this.config={...this.config,...e},this.name=this.config.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${this.name}".`),this.options=this.config.defaultOptions,this.config.addOptions&&(this.options=ld(nd(this,"addOptions",{name:this.name}))),this.storage=ld(nd(this,"addStorage",{name:this.name,options:this.options}))||{}}static create(e={}){return new Yd(e)}configure(e={}){const t=this.extend();return t.options=wd(this.options,e),t.storage=ld(nd(t,"addStorage",{name:t.name,options:t.options})),t}extend(e={}){const t=new Yd(e);return t.parent=this,this.child=t,t.name=e.name?e.name:t.parent.name,e.defaultOptions&&console.warn(`[tiptap warn]: BREAKING CHANGE: "defaultOptions" is deprecated. Please use "addOptions" instead. Found in extension: "${t.name}".`),t.options=ld(nd(t,"addOptions",{name:t.name})),t.storage=ld(nd(t,"addStorage",{name:t.name,options:t.options})),t}}function Xd(e){return new yd({find:e.find,handler:({state:t,range:n,match:r})=>{const o=ld(e.getAttributes,void 0,r);if(!1===o||null===o)return null;const{tr:i}=t,s=r[r.length-1],a=r[0];let l=n.to;if(s){const r=a.search(/\S/),c=n.from+a.indexOf(s),u=c+s.length;if(Gd(n.from,n.to,t.doc).filter((t=>t.mark.type.excluded.find((n=>n===e.type&&n!==t.mark.type)))).filter((e=>e.to>c)).length)return null;u<n.to&&i.delete(u,n.to),c>n.from&&i.delete(n.from+r,c),l=n.from+r+s.length,i.addMark(n.from+r,l,e.type.create(o||{})),i.removeStoredMark(e.type)}}})}function Qd(e){return(...t)=>n=>e(n,...t)}function Zd(e){const t=Object.entries(e).reduce(((e,[t,n])=>{if(!n)return e;return`${e}--zw-${t.replace(/_/g,"-")}:${n};`}),"");return t?{style:t}:null}function ep(e){const t=Zd(e);return["span",t?{...t,class:"zw-style"}:{},0]}function tp(e,...t){return({editor:n})=>(n.commands[e](...t),!0)}var np=Object.defineProperty,rp=(e,t,n)=>(((e,t,n)=>{t in e?np(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n})(e,"symbol"!=typeof t?t+"":t,n),n);function op(e,t){let n=!1;return function(){n||(e.apply(this,arguments),n=!0,setTimeout((function(){n=!1}),t))}}function ip(e){return e>1||e<-1?e/100:e}const sp=e=>Number.parseFloat(e.toFixed(5).substr(0,5));function ap(e){const t=function(e,t=1){const n=[];let r=0;for(;r<e.length;)n.push(e.substr(r,t)),r+=t;return n}(e.slice(1),2).map((e=>parseInt(e,16))),n=void 0!==t[3]?Math.round(t[3]/255*100)/100:1;return{r:t[0],g:t[1],b:t[2],a:n}}function lp(e){const{h:t,s:n,v:r,a:o}=e,i=e=>{const o=(e+t/60)%6;return r-r*n*Math.max(Math.min(o,4-o,1),0)},s=[i(5),i(3),i(1)].map((e=>Math.round(255*e)));return{r:s[0],g:s[1],b:s[2],a:o}}function cp(e){if(!e)return{h:0,s:1,v:1,a:1};const t=e.r/255,n=e.g/255,r=e.b/255,o=Math.max(t,n,r),i=Math.min(t,n,r);let s=0;o!==i&&(o===t?s=60*(0+(n-r)/(o-i)):o===n?s=60*(2+(r-t)/(o-i)):o===r&&(s=60*(4+(t-n)/(o-i)))),s<0&&(s+=360);const a=[s,0===o?0:(o-i)/o,o],l=sp(a[1]),c=sp(a[2]);return{h:Math.floor(a[0]),s:l,v:c,a:e.a}}function up(e){const t=cp(ap(e));const n=function(e){const{h:t,s:n,v:r,a:o}=e,i=r-r*n/2,s=1===i||0===i?0:(r-i)/Math.min(i,1-i);return{h:t,s:sp(s),l:sp(i),a:o}}(t),r=ap(e);return{alpha:t.a,hex:e.substr(0,7),hexa:e,hsla:n,hsva:t,hue:t.h,rgba:r}}function dp(e,t,n="0"){return e+n.repeat(Math.max(0,t-e.length))}function pp(e){return up(function(e){let t=e;return t.startsWith("#")&&(t=t.slice(1)),t=t.replace(/([^0-9a-f])/gi,"F"),3!==t.length&&4!==t.length||(t=t.split("").map((e=>e+e)).join("")),t=6===t.length?dp(t,8,"F"):dp(dp(t,6),8,"F"),`#${t}`.toUpperCase().substr(0,9)}(e))}const hp=Object.freeze({aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"}),fp="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)",mp=`[\\s|\\(]+(${fp})[,|\\s]+(${fp})[,|\\s]+(${fp})\\s*\\)?`,gp=`[\\s|\\(]+(${fp})[,|\\s]+(${fp})[,|\\s]+(${fp})[,|\\s]+(${fp})\\s*\\)?`,vp=Object.freeze({CSS_UNIT:new RegExp(fp),RGB:new RegExp(`rgb${mp}`),RGBA:new RegExp(`rgba${gp}`),HSL:new RegExp(`hsl${mp}`),HSLA:new RegExp(`hsla${gp}`),HSV:new RegExp(`hsv${mp}`),HSVA:new RegExp(`hsva${gp}`),HEX3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,HEX6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,HEX4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,HEX8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/}),yp=Object.freeze({WINDOW:Symbol("window")});yp.WINDOW;yp.WINDOW,yp.WINDOW,op(((e,t)=>{e(t)}),20);const bp=class{static create(e){if(!e)return bp.fromBlack();let t=e.replace(/^\s+/,"").replace(/\s+$/,"").toLowerCase();if(hp[t])t=hp[t];else if(t===this.TRANSPARENT)return bp.fromTransparent();const n=vp.RGB.exec(t)||vp.RGBA.exec(t);if(n){const e=void 0===n[4]?1:n[4];return bp.fromRgba({r:Number.parseInt(n[1]),g:Number.parseInt(n[2]),b:Number.parseInt(n[3]),a:Number.parseFloat(e)})}const r=vp.HSL.exec(t)||vp.HSLA.exec(t);if(r){const e=void 0===r[4]?1:r[4];return bp.fromHsla({h:Number.parseInt(r[1]),s:Number.parseFloat(r[2]),l:Number.parseFloat(r[3]),a:Number.parseFloat(e)})}const o=vp.HSV.exec(t)||vp.HSVA.exec(t);if(o){const e=void 0===o[4]?1:o[4];return bp.fromHsva({h:Number.parseInt(o[1]),s:Number.parseFloat(o[2]),v:Number.parseFloat(o[3]),a:Number.parseFloat(e)})}return vp.HEX8.exec(t)||vp.HEX6.exec(t)||vp.HEX4.exec(t)||vp.HEX3.exec(t)?bp.fromHex(t):bp.fromBlack()}static fromHex(e){const{rgba:t}=pp(e);return new bp(t)}static fromRgba({r:e,g:t,b:n,a:r}){const o=ip(r);return new bp({r:e,g:t,b:n,a:o})}static fromHsla({h:e,s:t,l:n,a:r}){const o=ip(t),i=ip(n),s=ip(r);return bp.fromHsva(function(e){const{h:t,s:n,l:r,a:o}=e,i=r+n*Math.min(r,1-r);return{h:t,s:sp(0===i?0:2-2*r/i),v:sp(i),a:o}}({h:e,s:o,l:i,a:s}))}static fromHsva({h:e,s:t,v:n,a:r}){const o=lp({h:e,s:ip(t),v:ip(n),a:ip(r)});return new bp(o)}static fromTransparent(){return new bp({r:0,g:0,b:0,a:0})}static fromWhite(){return new bp({r:255,g:255,b:255,a:1})}static fromBlack(){return new bp({r:0,g:0,b:0,a:1})}static isTransparent(e){return bp.create(e).isTransparent()}static isDark(e){return bp.create(e).isDark()}constructor(e){this._rgba=e,this._hsva=this._calcHsva(),this._alpha=e.a}get hex(){return this.toHexString()}get r(){return this._rgba.r}get b(){return this._rgba.b}get g(){return this._rgba.g}get h(){return this._hsva.h}get s(){return this._hsva.s}get v(){return this._hsva.v}get alpha(){return this._alpha}setAlpha(e){return this._alpha=e,this}toHexString(){return function(e){const t=e=>{const t=Math.round(e).toString(16);return("00".substr(0,2-t.length)+t).toUpperCase()};return`#${[t(e.r),t(e.g),t(e.b)].join("")}`}({r:this.r,g:this.g,b:this.b,a:this.alpha})}toRgbaString(){const e=`${Math.floor(100*this.alpha)}%`;return`rgba(${[this.r,this.g,this.b,e].join(", ")})`}get rgba(){return this._rgba}updateRgb(e){this._rgba={...this._rgba,...e},this._hsva=this._calcHsva()}get hsva(){return this._hsva}updateHsv(e){this._hsva={...this._hsva,...e},this._rgba=this._calcRgba()}isTransparent(){return 0===this.alpha}isDark(){return this.getBrightness()<128}getBrightness(){return(299*this.rgba.r+587*this.rgba.g+114*this.rgba.b)/1e3}_calcHsva(){return cp(this.rgba)}_calcRgba(){return lp(this.hsva)}};let Dp=bp;function Ep(e){const t=Dp.create(e);return 1===t.alpha?t.toHexString():t.toRgbaString()}function Cp(e,t){if(!e.includes("em"))return parseInt(e);const n=window.getComputedStyle(t).fontSize,r=parseFloat(e)*parseFloat(n);return Math.round(r)}function wp(e,t,n){if(!e.includes("px"))return e;const r=function(e,t){return(e.firstElementChild||e).style.fontSize||window.getComputedStyle(t).fontSize}(t,n),o=Cp(r,n);return(parseInt(e)/o).toFixed(2)}rp(Dp,"TRANSPARENT","transparent"),rp(Dp,"NONE","none");const Ap=Object.freeze({COMMON:"common",DESKTOP:"desktop",TABLET:"tablet",MOBILE:"mobile",get values(){return[this.COMMON,this.MOBILE,this.TABLET,this.DESKTOP]}}),_p=Object.freeze({UPPERCASE:"uppercase",LOWERCASE:"lowercase",CAPITALIZE:"capitalize"}),kp=Object.freeze({LEFT:"left",CENTER:"center",RIGHT:"right",JUSTIFY:"justify",get values(){return[this.LEFT,this.CENTER,this.RIGHT,this.JUSTIFY]}}),xp=Object.freeze({DOCUMENT:"doc",PARAGRAPH:"paragraph",HEADING:"heading",LIST:"list",LIST_ITEM:"listItem",TEXT:"text",get blocks(){return[this.PARAGRAPH,this.LIST,this.HEADING]}}),Op=Object.freeze({DISC:"disc",CIRCLE:"circle",SQUARE:"square",DECIMAL:"decimal",ROMAN:"roman",LATIN:"latin",get values(){return[this.DISC,this.CIRCLE,this.SQUARE,this.DECIMAL,this.ROMAN,this.LATIN]},get ordered(){return[this.DECIMAL,this.ROMAN,this.LATIN]}}),Sp=Object.freeze({ALIGNMENT:"alignment",BACKGROUND_COLOR:"background_color",FONT_COLOR:"font_color",FONT_FAMILY:"font_family",FONT_SIZE:"font_size",FONT_STYLE:"font_style",FONT_WEIGHT:"font_weight",LINE_HEIGHT:"line_height",TEXT_DECORATION:"text_decoration",SUPERSCRIPT:"superscript",MARGIN:"margin",LINK:"link",STYLE_PRESET:"style_preset",get attributes(){return[this.ALIGNMENT,this.LINE_HEIGHT,this.MARGIN]},get marks(){return[this.BACKGROUND_COLOR,this.FONT_COLOR,this.FONT_FAMILY,this.FONT_SIZE,this.FONT_STYLE,this.FONT_WEIGHT,this.TEXT_DECORATION,this.SUPERSCRIPT]}}),Np=Object.freeze({BLANK:"_blank",SELF:"_self"}),Fp=Object.freeze({URL:"url",BLOCK:"block"}),Tp={start:kp.LEFT,end:kp.RIGHT};const Mp=Jd.create({name:Sp.FONT_FAMILY,addOptions:()=>({fonts:[],defaultFont:""}),addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontFamily:Qd((({commands:e},t)=>{e.setMark(this.name,{value:t});const n=e.findFontByName(t);let r=Pt(e.getFontWeight());n.isWeightSupported(r)||(r=n.findClosestWeight(r),e.applyFontWeight(r)),n.isItalicSupported(r)||e.removeItalic()})),getFont:Qd((({commands:e})=>{const t=e.getFontFamily();return jt((()=>e.findFontByName(Pt(t))))})),findFontByName:Qd(((e,t)=>this.options.fonts.find((e=>e.name===t)))),getFontFamily:Qd((({editor:e,commands:t})=>{const n=t.getDefaultFontFamily();return jt((()=>e.getAttributes(this.name)?.value??Pt(n)))})),getDefaultFontFamily:Qd((({commands:e})=>{const t=e.getPreset();return jt((()=>Pt(t).common.font_family))}))}},parseHTML(){const e=e=>{const t=e.replace(/"/g,"");return{value:this.options.fonts.some((e=>e.name===t))?t:this.options.defaultFont}};return[{style:"--zw-font-family",getAttrs:e},{style:"font-family",getAttrs:e}]},renderHTML:({HTMLAttributes:e})=>ep({font_family:e.value?`"${e.value}"`:null})}),Ip=Yd.create({name:"heading",addOptions:()=>({levels:[1,2,3,4,5,6],HTMLAttributes:{}}),content:"inline*",group:"block",defining:!0,addAttributes:()=>({level:{default:1,rendered:!1}}),parseHTML(){return this.options.levels.map((e=>({tag:`h${e}`,attrs:{level:e}})))},renderHTML({node:e,HTMLAttributes:t}){return[`h${this.options.levels.includes(e.attrs.level)?e.attrs.level:this.options.levels[0]}`,sd(this.options.HTMLAttributes,t),0]},addCommands(){return{setHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.setNode(this.name,e),toggleHeading:e=>({commands:t})=>!!this.options.levels.includes(e.level)&&t.toggleNode(this.name,"paragraph",e)}},addKeyboardShortcuts(){return this.options.levels.reduce(((e,t)=>({...e,[`Mod-Alt-${t}`]:()=>this.editor.commands.toggleHeading({level:t})})),{})},addInputRules(){return this.options.levels.map((e=>function(e){return new md({find:e.find,handler:({state:t,range:n,match:r})=>{const o=t.doc.resolve(n.from),i=ld(e.getAttributes,void 0,r)||{};if(!o.node(-1).canReplaceWith(o.index(-1),o.indexAfter(-1),e.type))return null;t.tr.delete(n.from,n.to).setBlockType(n.from,n.from,e.type,i)}})}({find:new RegExp(`^(#{1,${e}})\\s$`),type:this.type,getAttributes:{level:e}})))}});class $p{#e=new DOMParser;types=window;parse(e){return this.#e.parseFromString(e,"text/html")}}class Bp{static BLOCK_NODE_NAMES=["P","H1","H2","H3","H4"];static BLOCK_STYLES=["text-align","line-height","margin","margin-top","margin-bottom","margin-left","margin-right"];static ASSIGN_STYLE_RULES=[{tag:/^(b|strong)$/,ignore:/font-weight/},{tag:/^i$/,ignore:/font-style/},{tag:/^s$/,ignore:/text-decoration(.+)?/}];static build(e,t={}){return new Bp({content:e,parser:t.parser||new $p})}static normalize(e,t={}){return Bp.build(e,t).normalize()}constructor({content:e,parser:t}){this._content=e,this._parser=t,this.dom=null}normalize(){return"string"!=typeof this._content?this._content:(this.normalizeHTML(),this.normalizedHTML)}normalizeHTML(){this.dom=this._parser.parse(this._content.replace(/(\r)?\n/g,"")),this._removeComments(),this.iterateNodes(this._normalizeBreakLines,(e=>"BR"===e.tagName)),this.iterateNodes(this._removeEmptyNodes,this._isBlockNode),this.iterateNodes(this._normalizeListItems,(e=>"LI"===e.tagName)),this.iterateNodes(this._normalizeSettingsStructure,(e=>"SPAN"===e.tagName)),this.iterateNodes(this._normalizeStyles,(e=>"SPAN"!==e.tagName))}get normalizedHTML(){return this.dom.body.innerHTML}get _NodeFilter(){return this._parser.types.NodeFilter}get _Node(){return this._parser.types.Node}_removeComments(){const e=this.createNodeIterator(this._NodeFilter.SHOW_COMMENT);this.runIterator(e,(e=>e.remove()))}createNodeIterator(e,t){return this.dom.createNodeIterator(this.dom.body,e,t)}iterateNodes(e,t=(()=>!0)){const n=e=>"BODY"!==e.tagName&&t.call(this,e),r=this.createNodeIterator(this._NodeFilter.SHOW_ELEMENT,{acceptNode:e=>n(e)?this._NodeFilter.FILTER_ACCEPT:this._NodeFilter.FILTER_REJECT});this.runIterator(r,e)}runIterator(e,t){let n=e.nextNode();for(;n;)t.call(this,n),n=e.nextNode()}_removeEmptyNodes(e){e.innerHTML.trim()||e.remove()}_normalizeListItems(e){const t=this.dom.createDocumentFragment(),n=Array.from(e.childNodes);let r;const o=n=>{this._assignElementProperties(n,e,Bp.BLOCK_STYLES),t.append(n)};this._assignElementProperties(e,e.parentElement,Bp.BLOCK_STYLES);for(const e of n)this._isBlockNode(e)?(o(e),r=null):(r||(r=this.dom.createElement("p"),o(r)),r.append(e));e.append(t),this._removeStyleProperties(e,Bp.BLOCK_STYLES)}_normalizeSettingsStructure(e){if(this._isOnlyTextContent(e))return;const t=e.cloneNode(!0),n=this._getMigratingStyles(e,{customProperties:!0}),r=[];for(const e of t.childNodes){let o=e;n.length&&(o=this._wrapTextNode(t,e),this._assignElementProperties(o,t,n)),r.push(o)}e.replaceWith(...r)}_normalizeStyles(e){if(!this._isBlockNode(e)&&this._isOnlyTextContent(e))return;const t=this._getMigratingStyles(e);if(t.length){for(const n of e.childNodes){const r=this._wrapTextNode(e,n);this._assignElementProperties(r,e,t)}this._removeStyleProperties(e,t)}}_isOnlyTextContent(e){return Array.from(e.childNodes).every((e=>e.nodeType===this._Node.TEXT_NODE))}_isBlockNode(e){return Bp.BLOCK_NODE_NAMES.includes(e.tagName)}_getMigratingStyles(e,{customProperties:t}={}){const n=Bp.BLOCK_STYLES,r=[];for(let o=0;o<e.style.length;o++){const i=e.style.item(o);n.includes(i)||(!t&&i.startsWith("--")||r.push(i))}return r}_wrapTextNode(e,t){if(t.nodeType!==this._Node.TEXT_NODE)return t;const n=this.dom.createElement("span");return n.append(t.cloneNode()),e.replaceChild(n,t),n}_assignElementProperties(e,t,n){for(const r of n){const n=t.style.getPropertyValue(r);n&&this._canAssignElementProperty(e,t,r)&&e.style.setProperty(r,n)}}_canAssignElementProperty(e,t,n){return!e.style.getPropertyValue(n)&&Bp.ASSIGN_STYLE_RULES.every((t=>!t.tag.test(e.tagName.toLowerCase())||!t.ignore.test(n)))}_removeStyleProperties(e,t){for(const n of t)e.style.removeProperty(n);0===e.style.length&&e.removeAttribute("style")}_normalizeBreakLines({parentElement:e}){if(!this._isBlockNode(e))return;if(!e.textContent)return;const t=this.dom.createDocumentFragment(),n=Array.from(e.childNodes),r=e.cloneNode(!0);r.innerHTML="";let o=r.cloneNode();const i=n=>{this._assignElementProperties(n,e,Bp.BLOCK_STYLES),t.append(n)};for(const e of n)"BR"!==e.tagName?o.append(e):(i(o),o=r.cloneNode());t.append(o),e.replaceWith(t)}}class Lp{static window=globalThis.window;static use(e){this.window=e}static get document(){return this.window.document}static get body(){return this.document.body}static get head(){return this.document.head}static getComputedStyle(e){return this.window.getComputedStyle(e)}}class Pp{static doc(e){return{type:xp.DOCUMENT,content:e}}static list(e,t){return{type:xp.LIST,attrs:{bullet:{type:e}},content:t.map((e=>this.listItem([].concat(e))))}}static listItem(e){return{type:xp.LIST_ITEM,content:e}}static heading(e,...t){const n=this._textBlock(t);return n.attrs??={},n.attrs.level=e,{type:xp.HEADING,...n}}static paragraph(...e){return{type:xp.PARAGRAPH,...this._textBlock(e)}}static _textBlock(e){const t=1===e.length?null:e[0],n=1===e.length?e[0]:e[1];return{content:"string"==typeof n?[this.text(n)]:n,...t?{attrs:t}:{}}}static text(e,t){return{type:xp.TEXT,...t?{marks:t}:{},text:e}}static mark(e,t){return{type:e,attrs:t}}static populateAllDevices(e){return{mobile:null,tablet:e,desktop:e}}}function Rp(e,t){return e.split(" ").map((e=>`.${e}`)).join("")+t.id}const zp=Ad.create({name:"style_preset",addExtensions:()=>[Ip.configure({levels:[1,2,3,4],HTMLAttributes:{class:"zw-style"}})],addStorage:()=>({presetStyleEl:null}),addGlobalAttributes(){return[{types:[xp.PARAGRAPH,xp.HEADING],attributes:{preset:{isRequired:!1,default:{id:this.options.defaultId},parseHTML:e=>{const t=Pt(this.options.presets);if("LI"===e.parentElement.tagName)return null;for(const{id:n,node:r,fallbackClass:o}of t){if(o&&e.classList.contains(o))return{id:n};const t=Rp(this.options.baseClass,{id:n});if(e.matches(t))return{id:n};if(e.tagName===`H${r?.level}`)return{id:n}}return"P"===e.tagName?{id:this.options.defaultId}:null},renderHTML:e=>e.preset?{class:this.options.baseClass+e.preset.id}:null}}}]},addCommands(){function e(e,t){return e.find((e=>t===e.id))}function t(e,t){const n={};for(const r of Object.keys(e)){const o=e[r],i=t[r],s=!i||"inherit"===i.toLowerCase();n[r]=s?o:i}return n}return{getPresetList:Qd((()=>jt((()=>this.options.presets.filter((e=>!e.hidden)))))),getPreset:Qd((({commands:n})=>{const r=n.getBlockAttributes("preset",{id:this.options.defaultId}),o=n.getPresetList(),i=n.isLink(),s=n.getLinkPreset();return jt((()=>{const n=e(Pt(o),Pt(r).id);if(!Pt(i))return n;const a=Pt(s);return{id:n.id,common:t(n.common,a.common),mobile:t(n.mobile,a.mobile),tablet:t(n.tablet,a.tablet),desktop:t(n.desktop,a.desktop)}}))})),applyPreset:Qd((({commands:t,chain:n},r)=>{const o=e(Pt(t.getPresetList()),r),i=o.node?.type??xp.PARAGRAPH,s={preset:{id:r}};o.node&&(s.level=o.node.level);for(const e of Sp.attributes)s[e]=Pt(t.getBlockAttributes(e));n().removeList().setNode(i,s).run()})),applyDefaultPreset:Qd((({commands:e})=>{e.applyPreset(this.options.defaultId)})),removePreset:Qd((({commands:e})=>{e.setNode(xp.PARAGRAPH,{preset:null})})),getPresetCustomization:Qd((({editor:e})=>{const t=zt(e,"state");return jt((()=>{const e=new Set,n=new Set,{from:r,to:o}=t.value.selection;return t.value.doc.nodesBetween(r,o,(t=>{for(const[n,r]of Object.entries(t.attrs)){Sp.attributes.includes(n)&&r&&e.add(n)}for(const{type:e}of t.marks)Sp.marks.includes(e.name)&&n.add(e.name)})),{attributes:Array.from(e),marks:Array.from(n)}}))})),removePresetCustomization:Qd((({chain:e})=>{e().storeSelection().expandSelectionToBlock().unsetMarks(Sp.marks).resetAttributes(xp.PARAGRAPH,Sp.attributes).resetAttributes(xp.HEADING,Sp.attributes).restoreSelection().run()})),removeFormat:Qd((({chain:e})=>{e().storeSelection().expandSelectionToBlock().unsetAllMarks().applyDefaultPreset().restoreSelection().run()}))}},onCreate(){const e=Lp.document.querySelector("[data-zw-styles]");if(e)this.storage.presetStyleEl=e;else{this.storage.presetStyleEl=Lp.document.createElement("style"),this.storage.presetStyleEl.dataset.zwStyles="";for(const e of this.options.presets){const t=[` ${Rp(this.options.baseClass,e)} {`];for(const n of Ap.values)for(const r of Object.keys(e[n])){const o=this.options.makeVariable({device:n,preset:e,property:r}),i=r.replace(/_/i,"-"),s=n===Ap.COMMON?"preset":`preset-${n}`;t.push(`--zw-${s}-${i}: var(${o}, inherit);`)}t.push("}"),this.storage.presetStyleEl.innerHTML+=t.join(" ")}Lp.head.append(this.storage.presetStyleEl)}}}),jp=Jd.create({name:Sp.FONT_WEIGHT,addAttributes:()=>({value:{required:!0}}),addCommands(){return{applyFontWeight:Qd((({commands:e},t)=>{e.setMark(this.name,{value:t});Pt(e.getFont()).isItalicSupported(t)||e.removeItalic()})),toggleBold:Qd((({commands:e})=>{const t=Pt(e.getFontWeight()),n=Pt(e.getFont()),r=Number(t)>=600?"400":"700",o=n.findClosestWeight(r);e.applyFontWeight(o)})),getFontWeight:Qd((({editor:e,commands:t})=>{const n=t.getDefaultFontWeight(),r=t.getFont();return jt((()=>{const t=e.getAttributes(this.name)?.value??Pt(n),o=Pt(r);return o.isWeightSupported(t)?t:o.findClosestWeight(t)}))})),getDefaultFontWeight:Qd((({commands:e})=>{const t=e.getPreset();return jt((()=>Pt(t).common.font_weight))}))}},addKeyboardShortcuts:()=>({"Mod-b":tp("toggleBold"),"Mod-B":tp("toggleBold")}),parseHTML(){const e=e=>"bold"===e?{value:"700"}:!!Number(e)&&{value:e};return[{style:"--zw-font-weight",getAttrs:e},{style:"font-weight",getAttrs:e},{tag:"b",attrs:{value:"700"}},{tag:"strong",attrs:{value:"700"}}]},renderHTML:({HTMLAttributes:e})=>ep({font_weight:e.value})}),Hp=Jd.create({name:Sp.FONT_SIZE,addOptions:()=>({minSize:1,maxSize:100}),addAttributes:()=>({mobile:{default:null},tablet:{default:null},desktop:{default:null}}),addCommands(){return{getFontSize:Qd((({editor:e,commands:t})=>{const n=t.getDevice(),r=t.getDefaultFontSize();return jt((()=>e.getAttributes(this.name)?.[Pt(n)]??Pt(r)))})),getDefaultFontSize:Qd((({commands:e})=>{const t=e.getDevice(),n=e.getPreset();return jt((()=>Pt(n)[Pt(t)].font_size.replace("px","")))})),applyFontSize:Qd((({commands:e},t)=>{e.setMark(this.name,{desktop:t,tablet:t,mobile:null})})),increaseFontSize:Qd((({commands:e})=>{const t=Number(Pt(e.getFontSize())),n=Math.min(t+1,this.options.maxSize);e.applyFontSize(String(n))})),decreaseFontSize:Qd((({commands:e})=>{const t=Number(Pt(e.getFontSize())),n=Math.max(t-1,this.options.minSize);e.applyFontSize(String(n))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-=":tp("increaseFontSize"),"Mod-Shift--":tp("decreaseFontSize")}),parseHTML(){const e=e=>{if(!e)return null;const t=Cp(e,Pt(this.options.wrapperRef));return String(t)};return[{tag:'[style*="--zw-font-size"]',getAttrs:({style:t})=>({mobile:e(t.getPropertyValue("--zw-font-size-mobile")),tablet:e(t.getPropertyValue("--zw-font-size-tablet")),desktop:e(t.getPropertyValue("--zw-font-size-desktop"))})},{style:"font-size",getAttrs:t=>{const n=e(t);return{desktop:n,tablet:n,mobile:null}}}]},renderHTML({HTMLAttributes:e}){const t=e=>e?`${e}px`:null;return ep({font_size_mobile:t(e.mobile),font_size_tablet:t(e.tablet),font_size_desktop:t(e.desktop)})}}),Vp=Jd.create({name:Sp.FONT_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getFontColor:Qd((({commands:e,editor:t})=>{const n=e.getDefaultFontColor();return jt((()=>t.getAttributes(this.name)?.value??Pt(n)))})),getDefaultFontColor:Qd((({commands:e})=>{const t=e.getPreset();return jt((()=>Pt(t).common.color))})),applyFontColor:Qd((({commands:e},t)=>{e.setMark(this.name,{value:t})}))}},parseHTML(){const e=e=>({value:Ep(e)});return[{style:"--zw-font-color",getAttrs:e},{style:"color",getAttrs:e}]},renderHTML:({HTMLAttributes:e})=>ep({font_color:e.value})}),Kp=Jd.create({name:Sp.BACKGROUND_COLOR,addAttributes:()=>({value:{required:!0}}),addCommands(){return{getBackgroundColor:Qd((({editor:e})=>jt((()=>e.getAttributes(this.name)?.value??"rgba(255, 255, 255, 0%)")))),applyBackgroundColor:Qd((({commands:e},t)=>{e.setMark(this.name,{value:t})}))}},parseHTML(){const e=e=>({value:Ep(e)});return[{style:"--zw-background-color",getAttrs:e},{style:"background-color",getAttrs:e}]},renderHTML:({HTMLAttributes:e})=>ep({background_color:e.value})}),qp=Ad.create({name:"device_manager",addCommands(){return{getDevice:Qd((()=>zt(this.options,"device")))}}}),Wp=Jd.create({name:Sp.FONT_STYLE,addAttributes:()=>({italic:{required:!0}}),addCommands(){return{isItalic:Qd((({editor:e,commands:t})=>{const n=t.getDefaultFontStyle();return jt((()=>e.getAttributes(this.name)?.italic??Pt(n).italic))})),isItalicAvailable:Qd((({commands:e})=>{const t=e.getFont(),n=e.getFontWeight();return jt((()=>Pt(t).isItalicSupported(Pt(n))))})),getDefaultFontStyle:Qd((({commands:e})=>{const t=e.getPreset();return jt((()=>({italic:"italic"===Pt(t).common.font_style})))})),toggleItalic:Qd((({commands:e})=>{Pt(this.editor.commands.isItalicAvailable())&&(Pt(e.isItalic())?e.removeItalic():e.applyItalic())})),applyItalic:Qd((({commands:e})=>{e.setMark(this.name,{italic:!0})})),removeItalic:Qd((({commands:e})=>{e.setMark(this.name,{italic:!1})}))}},addKeyboardShortcuts:()=>({"Mod-i":tp("toggleItalic"),"Mod-I":tp("toggleItalic")}),parseHTML(){const e=e=>e.includes("italic")&&{italic:!0};return[{style:"--zw-font-style",getAttrs:e},{style:"font-style",getAttrs:e},{tag:"i",attrs:{italic:!0}}]},renderHTML:({HTMLAttributes:e})=>ep({font_style:e.italic?"italic":"normal"})}),Up=Jd.create({name:Sp.TEXT_DECORATION,priority:1e3,addAttributes:()=>({underline:{default:!1},strike_through:{default:!1}}),addCommands(){return{isUnderline:Qd((({commands:e})=>{const t=e.getTextDecoration();return jt((()=>Pt(t).underline))})),isStrikeThrough:Qd((({commands:e})=>{const t=e.getTextDecoration();return jt((()=>Pt(t).strike_through))})),getTextDecoration:Qd((({editor:e,commands:t})=>{const n=t.getDefaultTextDecoration();return jt((()=>{const t=e.getAttributes(this.name)??{};return{underline:t.underline??Pt(n).underline,strike_through:t.strike_through??Pt(n).strike_through}}))})),getDefaultTextDecoration:Qd((({commands:e})=>{const t=e.getPreset();return jt((()=>{const e=Pt(t).common.text_decoration;return{underline:e.includes("underline"),strike_through:e.includes("line-through")}}))})),toggleUnderline:Qd((({commands:e})=>{e.toggleTextDecoration("underline")})),toggleStrikeThrough:Qd((({commands:e})=>{e.toggleTextDecoration("strike_through")})),toggleTextDecoration:Qd((({commands:e},t)=>{Pt(e.getTextDecoration())[t]?e.removeTextDecoration(t):e.applyTextDecoration(t)})),applyTextDecoration:Qd((({commands:e},t)=>{e.setMark(this.name,{[t]:!0})})),removeTextDecoration:Qd((({commands:e},t)=>{e.setMark(this.name,{...Pt(e.getTextDecoration()),[t]:!1})}))}},addKeyboardShortcuts:()=>({"Mod-u":tp("toggleUnderline"),"Mod-U":tp("toggleUnderline")}),parseHTML(){const e=e=>{const t=e.includes("underline"),n=e.includes("line-through");return!(!t&&!n)&&{underline:t,strike_through:n}};return[{style:"--zw-text-decoration",getAttrs:e},{style:"text-decoration-line",getAttrs:e},{style:"text-decoration",getAttrs:e},{tag:"s",attrs:{underline:!1,strike_through:!0}},{tag:"u",attrs:{underline:!0,strike_through:!1}}]},renderHTML({HTMLAttributes:e}){const t=[];return e.underline&&t.push("underline"),e.strike_through&&t.push("line-through"),t.length||t.push("none"),ep({text_decoration:t.join(" ")})}}),Gp=Ad.create({name:"case_style",addCommands:()=>({applyCaseStyle:Qd((({commands:e},t)=>{switch(t){case _p.CAPITALIZE:return e.applyCapitalize();case _p.LOWERCASE:return e.applyLowerCase();case _p.UPPERCASE:return e.applyUpperCase()}})),applyCapitalize:Qd((({commands:e})=>{e.transformText((({text:e})=>function(e){return e.toLowerCase().replace(/(?:^|\s)\S/g,(e=>e.toUpperCase()))}(e)))})),applyLowerCase:Qd((({commands:e})=>{e.transformText((({text:e})=>e.toLowerCase()))})),applyUpperCase:Qd((({commands:e})=>{e.transformText((({text:e})=>e.toUpperCase()))}))})}),Jp={mobile:null,tablet:null,desktop:null},Yp=Ad.create({name:Sp.ALIGNMENT,addGlobalAttributes:()=>[{types:[xp.PARAGRAPH,xp.HEADING],attributes:{[Sp.ALIGNMENT]:{isRequired:!1,parseHTML({style:e}){const t=function(e){const t=Tp[e]||e;return kp.values.includes(t)?t:null}(e.textAlign);if(t)return{desktop:t,tablet:t,mobile:null};const n=e.getPropertyValue("--zw-text-align-tablet")||null,r=e.getPropertyValue("--zw-text-align-desktop")||null;return n||r?{desktop:r,tablet:n,mobile:null}:null},renderHTML:e=>e.alignment?Zd({text_align_mobile:e.alignment.mobile,text_align_tablet:e.alignment.tablet,text_align_desktop:e.alignment.desktop}):null}}}],addCommands(){return{applyAlignment:Qd((({commands:e},t)=>{e.setBlockAttributes(this.name,{desktop:t,tablet:t,mobile:null},Jp)})),getAlignment:Qd((({commands:e})=>{const t=e.getBlockAttributes(this.name,Jp),n=e.getDevice(),r=e.getDefaultAlignment();return jt((()=>Pt(t)?.[Pt(n)]??Pt(r)))})),getDefaultAlignment:Qd((({commands:e})=>{const t=e.getDevice(),n=e.getPreset();return jt((()=>Pt(n)[Pt(t)].alignment))}))}},addKeyboardShortcuts:()=>({"Mod-Shift-l":tp("applyAlignment",kp.LEFT),"Mod-Shift-e":tp("applyAlignment",kp.CENTER),"Mod-Shift-r":tp("applyAlignment",kp.RIGHT),"Mod-Shift-j":tp("applyAlignment",kp.JUSTIFY)})}),Xp={mobile:null,tablet:null,desktop:null},Qp=Ad.create({name:Sp.LINE_HEIGHT,addGlobalAttributes(){return[{types:[xp.PARAGRAPH,xp.HEADING],attributes:{[Sp.LINE_HEIGHT]:{isRequired:!1,parseHTML:e=>{if(e.matches('[style*="--zw-line-height"]')){return{mobile:null,tablet:e.style.getPropertyValue("--zw-line-height-tablet")||null,desktop:e.style.getPropertyValue("--zw-line-height-desktop")||null}}const t=e.style.lineHeight;if(!t)return null;const n=wp(t,e,Pt(this.options.wrapperRef));return{desktop:n,tablet:n,mobile:null}},renderHTML:e=>e.line_height?Zd({line_height_mobile:e.line_height.mobile,line_height_tablet:e.line_height.tablet,line_height_desktop:e.line_height.desktop}):null}}}]},addCommands(){return{getLineHeight:Qd((({commands:e})=>{const t=e.getBlockAttributes(this.name,Xp),n=e.getDevice(),r=e.getDefaultLineHeight();return jt((()=>Pt(t)?.[Pt(n)]??Pt(r)))})),getDefaultLineHeight:Qd((({commands:e})=>{const t=e.getDevice(),n=e.getPreset();return jt((()=>Pt(n)[Pt(t)].line_height))})),applyLineHeight:Qd((({commands:e},t)=>{e.setBlockAttributes(this.name,{desktop:t,tablet:t,mobile:null},Xp)}))}}}),Zp=Yd.create({name:"listItem",addOptions:()=>({HTMLAttributes:{}}),content:"paragraph block*",defining:!0,parseHTML:()=>[{tag:"li"}],renderHTML({HTMLAttributes:e}){return["li",sd(this.options.HTMLAttributes,e),0]},addKeyboardShortcuts(){return{Enter:()=>this.editor.commands.splitListItem(this.name),Tab:()=>this.editor.commands.sinkListItem(this.name),"Shift-Tab":()=>this.editor.commands.liftListItem(this.name)}}}).extend({name:xp.LIST_ITEM,addKeyboardShortcuts(){const{Enter:e}=this.parent();return{Enter:e}}}),eh=Yd.create({name:xp.LIST,content:`${xp.LIST_ITEM}+`,group:"block list",addExtensions:()=>[Zp],addOptions:()=>({baseClass:""}),addAttributes:()=>({bullet:{default:{type:Op.DISC}}}),parseHTML(){const e={a:Op.ROMAN,i:Op.LATIN,1:Op.DECIMAL},t=t=>{for(const n of Op.values){const r=`.${this.options.baseClass}${n}`;if(t.matches(r))return n;if(e[t.type.toLowerCase()]===n)return n}};return[{tag:"ol",getAttrs:e=>({bullet:{type:t(e)||Op.DECIMAL}})},{tag:"ul",getAttrs:e=>({bullet:{type:t(e)||Op.DISC}})}]},renderHTML({HTMLAttributes:e}){return[Op.ordered.includes(e.bullet.type)?"ol":"ul",{class:this.options.baseClass+e.bullet.type},0]},addCommands:()=>({getListType:Qd((({commands:e})=>{const t=e.getBlockAttributes("bullet",{type:null});return jt((()=>Pt(t).type??null))})),applyList:Qd((({commands:e,chain:t},n)=>{if(Pt(e.getListType())!==n)return t().applyDefaultPreset()._addList(n).run();e.applyDefaultPreset()})),_addList:Qd((({chain:e},t)=>e().toggleList(xp.LIST,xp.LIST_ITEM).setBlockAttributes("bullet",{type:t}).run())),removeList:Qd((({commands:e})=>{e.liftListItem(xp.LIST_ITEM)}))}),addInputRules(){const e=(e,t)=>function(e){return new md({find:e.find,handler:({state:t,range:n,match:r})=>{const o=ld(e.getAttributes,void 0,r)||{},i=t.tr.delete(n.from,n.to),s=i.doc.resolve(n.from).blockRange(),a=s&&ol(s,e.type,o);if(!a)return null;i.wrap(s,a);const l=i.doc.resolve(n.from-1).nodeBefore;l&&l.type===e.type&&al(i.doc,n.from-1)&&(!e.joinPredicate||e.joinPredicate(r,l))&&i.join(n.from-1)}})}({find:t,type:this.type,getAttributes:{bullet:{type:e}},joinPredicate:(t,{attrs:n})=>n.bullet.type===e});return[e(Op.DISC,/^\s*([-+*])\s$/),e(Op.DECIMAL,/^(\d+)\.\s$/),e(Op.LATIN,/^([ivx]{1,3})\.\s$/i),e(Op.ROMAN,/^([a-z])\.\s$/i)]}});function th(e){this.j={},this.jr=[],this.jd=null,this.t=e}th.prototype={accepts:function(){return!!this.t},tt:function(e,t){if(t&&t.j)return this.j[e]=t,t;var n=t,r=this.j[e];if(r)return n&&(r.t=n),r;r=nh();var o=sh(this,e);return o?(Object.assign(r.j,o.j),r.jr.append(o.jr),r.jr=o.jd,r.t=n||o.t):r.t=n,this.j[e]=r,r}};var nh=function(){return new th},rh=function(e){return new th(e)},oh=function(e,t,n){e.j[t]||(e.j[t]=n)},ih=function(e,t,n){e.jr.push([t,n])},sh=function(e,t){var n=e.j[t];if(n)return n;for(var r=0;r<e.jr.length;r++){var o=e.jr[r][0],i=e.jr[r][1];if(o.test(t))return i}return e.jd},ah=function(e,t,n){for(var r=0;r<t.length;r++)oh(e,t[r],n)},lh=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0],o=t[n][1];oh(e,r,o)}},ch=function(e,t,n,r){for(var o,i=0,s=t.length;i<s&&(o=e.j[t[i]]);)e=o,i++;if(i>=s)return[];for(;i<s-1;)o=r(),oh(e,t[i],o),e=o,i++;oh(e,t[s-1],n)},uh="DOMAIN",dh="TLD",ph="NUM",hh="AT",fh="DOT",mh="SLASH",gh=Object.freeze({__proto__:null,DOMAIN:uh,LOCALHOST:"LOCALHOST",TLD:dh,NUM:ph,PROTOCOL:"PROTOCOL",MAILTO:"MAILTO",WS:"WS",NL:"NL",OPENBRACE:"OPENBRACE",OPENBRACKET:"OPENBRACKET",OPENANGLEBRACKET:"OPENANGLEBRACKET",OPENPAREN:"OPENPAREN",CLOSEBRACE:"CLOSEBRACE",CLOSEBRACKET:"CLOSEBRACKET",CLOSEANGLEBRACKET:"CLOSEANGLEBRACKET",CLOSEPAREN:"CLOSEPAREN",AMPERSAND:"AMPERSAND",APOSTROPHE:"APOSTROPHE",ASTERISK:"ASTERISK",AT:hh,BACKSLASH:"BACKSLASH",BACKTICK:"BACKTICK",CARET:"CARET",COLON:"COLON",COMMA:"COMMA",DOLLAR:"DOLLAR",DOT:fh,EQUALS:"EQUALS",EXCLAMATION:"EXCLAMATION",HYPHEN:"HYPHEN",PERCENT:"PERCENT",PIPE:"PIPE",PLUS:"PLUS",POUND:"POUND",QUERY:"QUERY",QUOTE:"QUOTE",SEMI:"SEMI",SLASH:mh,TILDE:"TILDE",UNDERSCORE:"UNDERSCORE",SYM:"SYM"}),vh="aaa aarp abarth abb abbott abbvie abc able abogado abudhabi ac academy accenture accountant accountants aco actor ad adac ads adult ae aeg aero aetna af afamilycompany afl africa ag agakhan agency ai aig airbus airforce airtel akdn al alfaromeo alibaba alipay allfinanz allstate ally alsace alstom am amazon americanexpress americanfamily amex amfam amica amsterdam analytics android anquan anz ao aol apartments app apple aq aquarelle ar arab aramco archi army arpa art arte as asda asia associates at athleta attorney au auction audi audible audio auspost author auto autos avianca aw aws ax axa az azure ba baby baidu banamex bananarepublic band bank bar barcelona barclaycard barclays barefoot bargains baseball basketball bauhaus bayern bb bbc bbt bbva bcg bcn bd be beats beauty beer bentley berlin best bestbuy bet bf bg bh bharti bi bible bid bike bing bingo bio biz bj black blackfriday blockbuster blog bloomberg blue bm bms bmw bn bnpparibas bo boats boehringer bofa bom bond boo book booking bosch bostik boston bot boutique box br bradesco bridgestone broadway broker brother brussels bs bt budapest bugatti build builders business buy buzz bv bw by bz bzh ca cab cafe cal call calvinklein cam camera camp cancerresearch canon capetown capital capitalone car caravan cards care career careers cars casa case cash casino cat catering catholic cba cbn cbre cbs cc cd center ceo cern cf cfa cfd cg ch chanel channel charity chase chat cheap chintai christmas chrome church ci cipriani circle cisco citadel citi citic city cityeats ck cl claims cleaning click clinic clinique clothing cloud club clubmed cm cn co coach codes coffee college cologne com comcast commbank community company compare computer comsec condos construction consulting contact contractors cooking cookingchannel cool coop corsica country coupon coupons courses cpa cr credit creditcard creditunion cricket crown crs cruise cruises csc cu cuisinella cv cw cx cy cymru cyou cz dabur dad dance data date dating datsun day dclk dds de deal dealer deals degree delivery dell deloitte delta democrat dental dentist desi design dev dhl diamonds diet digital direct directory discount discover dish diy dj dk dm dnp do docs doctor dog domains dot download drive dtv dubai duck dunlop dupont durban dvag dvr dz earth eat ec eco edeka edu education ee eg email emerck energy engineer engineering enterprises epson equipment er ericsson erni es esq estate et etisalat eu eurovision eus events exchange expert exposed express extraspace fage fail fairwinds faith family fan fans farm farmers fashion fast fedex feedback ferrari ferrero fi fiat fidelity fido film final finance financial fire firestone firmdale fish fishing fit fitness fj fk flickr flights flir florist flowers fly fm fo foo food foodnetwork football ford forex forsale forum foundation fox fr free fresenius frl frogans frontdoor frontier ftr fujitsu fujixerox fun fund furniture futbol fyi ga gal gallery gallo gallup game games gap garden gay gb gbiz gd gdn ge gea gent genting george gf gg ggee gh gi gift gifts gives giving gl glade glass gle global globo gm gmail gmbh gmo gmx gn godaddy gold goldpoint golf goo goodyear goog google gop got gov gp gq gr grainger graphics gratis green gripe grocery group gs gt gu guardian gucci guge guide guitars guru gw gy hair hamburg hangout haus hbo hdfc hdfcbank health healthcare help helsinki here hermes hgtv hiphop hisamitsu hitachi hiv hk hkt hm hn hockey holdings holiday homedepot homegoods homes homesense honda horse hospital host hosting hot hoteles hotels hotmail house how hr hsbc ht hu hughes hyatt hyundai ibm icbc ice icu id ie ieee ifm ikano il im imamat imdb immo immobilien in inc industries infiniti info ing ink institute insurance insure int international intuit investments io ipiranga iq ir irish is ismaili ist istanbul it itau itv iveco jaguar java jcb je jeep jetzt jewelry jio jll jm jmp jnj jo jobs joburg jot joy jp jpmorgan jprs juegos juniper kaufen kddi ke kerryhotels kerrylogistics kerryproperties kfh kg kh ki kia kim kinder kindle kitchen kiwi km kn koeln komatsu kosher kp kpmg kpn kr krd kred kuokgroup kw ky kyoto kz la lacaixa lamborghini lamer lancaster lancia land landrover lanxess lasalle lat latino latrobe law lawyer lb lc lds lease leclerc lefrak legal lego lexus lgbt li lidl life lifeinsurance lifestyle lighting like lilly limited limo lincoln linde link lipsy live living lixil lk llc llp loan loans locker locus loft lol london lotte lotto love lpl lplfinancial lr ls lt ltd ltda lu lundbeck luxe luxury lv ly ma macys madrid maif maison makeup man management mango map market marketing markets marriott marshalls maserati mattel mba mc mckinsey md me med media meet melbourne meme memorial men menu merckmsd mg mh miami microsoft mil mini mint mit mitsubishi mk ml mlb mls mm mma mn mo mobi mobile moda moe moi mom monash money monster mormon mortgage moscow moto motorcycles mov movie mp mq mr ms msd mt mtn mtr mu museum mutual mv mw mx my mz na nab nagoya name nationwide natura navy nba nc ne nec net netbank netflix network neustar new news next nextdirect nexus nf nfl ng ngo nhk ni nico nike nikon ninja nissan nissay nl no nokia northwesternmutual norton now nowruz nowtv np nr nra nrw ntt nu nyc nz obi observer off office okinawa olayan olayangroup oldnavy ollo om omega one ong onl online onyourside ooo open oracle orange org organic origins osaka otsuka ott ovh pa page panasonic paris pars partners parts party passagens pay pccw pe pet pf pfizer pg ph pharmacy phd philips phone photo photography photos physio pics pictet pictures pid pin ping pink pioneer pizza pk pl place play playstation plumbing plus pm pn pnc pohl poker politie porn post pr pramerica praxi press prime pro prod productions prof progressive promo properties property protection pru prudential ps pt pub pw pwc py qa qpon quebec quest qvc racing radio raid re read realestate realtor realty recipes red redstone redumbrella rehab reise reisen reit reliance ren rent rentals repair report republican rest restaurant review reviews rexroth rich richardli ricoh ril rio rip rmit ro rocher rocks rodeo rogers room rs rsvp ru rugby ruhr run rw rwe ryukyu sa saarland safe safety sakura sale salon samsclub samsung sandvik sandvikcoromant sanofi sap sarl sas save saxo sb sbi sbs sc sca scb schaeffler schmidt scholarships school schule schwarz science scjohnson scot sd se search seat secure security seek select sener services ses seven sew sex sexy sfr sg sh shangrila sharp shaw shell shia shiksha shoes shop shopping shouji show showtime si silk sina singles site sj sk ski skin sky skype sl sling sm smart smile sn sncf so soccer social softbank software sohu solar solutions song sony soy spa space sport spot spreadbetting sr srl ss st stada staples star statebank statefarm stc stcgroup stockholm storage store stream studio study style su sucks supplies supply support surf surgery suzuki sv swatch swiftcover swiss sx sy sydney systems sz tab taipei talk taobao target tatamotors tatar tattoo tax taxi tc tci td tdk team tech technology tel temasek tennis teva tf tg th thd theater theatre tiaa tickets tienda tiffany tips tires tirol tj tjmaxx tjx tk tkmaxx tl tm tmall tn to today tokyo tools top toray toshiba total tours town toyota toys tr trade trading training travel travelchannel travelers travelersinsurance trust trv tt tube tui tunes tushu tv tvs tw tz ua ubank ubs ug uk unicom university uno uol ups us uy uz va vacations vana vanguard vc ve vegas ventures verisign versicherung vet vg vi viajes video vig viking villas vin vip virgin visa vision viva vivo vlaanderen vn vodka volkswagen volvo vote voting voto voyage vu vuelos wales walmart walter wang wanggou watch watches weather weatherchannel webcam weber website wed wedding weibo weir wf whoswho wien wiki williamhill win windows wine winners wme wolterskluwer woodside work works world wow ws wtc wtf xbox xerox xfinity xihuan xin xxx xyz yachts yahoo yamaxun yandex ye yodobashi yoga yokohama you youtube yt yun za zappos zara zero zip zm zone zuerich zw vermögensberater-ctb vermögensberatung-pwb ελ ευ бг бел дети ею католик ком қаз мкд мон москва онлайн орг рус рф сайт срб укр გე հայ ישראל קום ابوظبي اتصالات ارامكو الاردن البحرين الجزائر السعودية العليان المغرب امارات ایران بارت بازار بھارت بيتك پاکستان ڀارت تونس سودان سورية شبكة عراق عرب عمان فلسطين قطر كاثوليك كوم مصر مليسيا موريتانيا موقع همراه कॉम नेट भारत भारतम् भारोत संगठन বাংলা ভারত ভাৰত ਭਾਰਤ ભારત ଭାରତ இந்தியா இலங்கை சிங்கப்பூர் భారత్ ಭಾರತ ഭാരതം ලංකා คอม ไทย ລາວ 닷넷 닷컴 삼성 한국 アマゾン グーグル クラウド コム ストア セール ファッション ポイント みんな 世界 中信 中国 中國 中文网 亚马逊 企业 佛山 信息 健康 八卦 公司 公益 台湾 台灣 商城 商店 商标 嘉里 嘉里大酒店 在线 大众汽车 大拿 天主教 娱乐 家電 广东 微博 慈善 我爱你 手机 招聘 政务 政府 新加坡 新闻 时尚 書籍 机构 淡马锡 游戏 澳門 点看 移动 组织机构 网址 网店 网站 网络 联通 诺基亚 谷歌 购物 通販 集团 電訊盈科 飞利浦 食品 餐厅 香格里拉 香港".split(" "),yh=/(?:[A-Za-z\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16F1-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDE80-\uDE9C\uDEA0-\uDED0\uDF00-\uDF1F\uDF2D-\uDF40\uDF42-\uDF49\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF]|\uD801[\uDC00-\uDC9D\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC60-\uDC76\uDC80-\uDC9E\uDCE0-\uDCF2\uDCF4\uDCF5\uDD00-\uDD15\uDD20-\uDD39\uDD80-\uDDB7\uDDBE\uDDBF\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE60-\uDE7C\uDE80-\uDE9C\uDEC0-\uDEC7\uDEC9-\uDEE4\uDF00-\uDF35\uDF40-\uDF55\uDF60-\uDF72\uDF80-\uDF91]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDD00-\uDD23\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF1C\uDF27\uDF30-\uDF45\uDF70-\uDF81\uDFB0-\uDFC4\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDD03-\uDD26\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDDA\uDDDC\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE80-\uDEAA\uDEB8\uDF00-\uDF1A\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCDF\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDEE0-\uDEF2\uDFB0]|\uD808[\uDC00-\uDF99]|\uD809[\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE70-\uDEBE\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE7F\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDD00-\uDD43\uDD4B]|\uD83B[\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])/,bh=/(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEDD-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDDFF\uDE70-\uDE74\uDE78-\uDE7C\uDE80-\uDE86\uDE90-\uDEAC\uDEB0-\uDEBA\uDEC0-\uDEC5\uDED0-\uDED9\uDEE0-\uDEE7\uDEF0-\uDEF6])/,Dh=/\uFE0F/,Eh=/\d/,Ch=/\s/;function wh(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=nh(),n=rh(ph),r=rh(uh),o=nh(),i=rh("WS"),s=[[Eh,r],[yh,r],[bh,r],[Dh,r]],a=function(){var e=rh(uh);return e.j={"-":o},e.jr=[].concat(s),e},l=function(e){var t=a();return t.t=e,t};lh(t,[["'",rh("APOSTROPHE")],["{",rh("OPENBRACE")],["[",rh("OPENBRACKET")],["<",rh("OPENANGLEBRACKET")],["(",rh("OPENPAREN")],["}",rh("CLOSEBRACE")],["]",rh("CLOSEBRACKET")],[">",rh("CLOSEANGLEBRACKET")],[")",rh("CLOSEPAREN")],["&",rh("AMPERSAND")],["*",rh("ASTERISK")],["@",rh(hh)],["`",rh("BACKTICK")],["^",rh("CARET")],[":",rh("COLON")],[",",rh("COMMA")],["$",rh("DOLLAR")],[".",rh(fh)],["=",rh("EQUALS")],["!",rh("EXCLAMATION")],["-",rh("HYPHEN")],["%",rh("PERCENT")],["|",rh("PIPE")],["+",rh("PLUS")],["#",rh("POUND")],["?",rh("QUERY")],['"',rh("QUOTE")],["/",rh(mh)],[";",rh("SEMI")],["~",rh("TILDE")],["_",rh("UNDERSCORE")],["\\",rh("BACKSLASH")]]),oh(t,"\n",rh("NL")),ih(t,Ch,i),oh(i,"\n",nh()),ih(i,Ch,i);for(var c=0;c<vh.length;c++)ch(t,vh[c],l(dh),a);var u=a(),d=a(),p=a(),h=a();ch(t,"file",u,a),ch(t,"ftp",d,a),ch(t,"http",p,a),ch(t,"mailto",h,a);var f=a(),m=rh("PROTOCOL"),g=rh("MAILTO");oh(d,"s",f),oh(d,":",m),oh(p,"s",f),oh(p,":",m),oh(u,":",m),oh(f,":",m),oh(h,":",g);for(var v=a(),y=0;y<e.length;y++)ch(t,e[y],v,a);return oh(v,":",m),ch(t,"localhost",l("LOCALHOST"),a),ih(t,Eh,n),ih(t,yh,r),ih(t,bh,r),ih(t,Dh,r),ih(n,Eh,n),ih(n,yh,r),ih(n,bh,r),ih(n,Dh,r),oh(n,"-",o),oh(r,"-",o),oh(o,"-",o),ih(r,Eh,r),ih(r,yh,r),ih(r,bh,r),ih(r,Dh,r),ih(o,Eh,r),ih(o,yh,r),ih(o,bh,r),ih(o,Dh,r),t.jd=rh("SYM"),t}var Ah={defaultProtocol:"http",events:null,format:_h,formatHref:_h,nl2br:!1,tagName:"a",target:null,rel:null,validate:!0,truncate:0,className:null,attributes:null,ignoreTags:[]};function _h(e){return e}function kh(){}function xh(e,t){function n(t,n){this.t=e,this.v=t,this.tk=n}return function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=Object.create(e.prototype);for(var o in n)r[o]=n[o];r.constructor=t,t.prototype=r}(kh,n,t),n}kh.prototype={t:"token",isLink:!1,toString:function(){return this.v},toHref:function(){return this.toString()},startIndex:function(){return this.tk[0].s},endIndex:function(){return this.tk[this.tk.length-1].e},toObject:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ah.defaultProtocol;return{type:this.t,value:this.v,isLink:this.isLink,href:this.toHref(e),start:this.startIndex(),end:this.endIndex()}}};var Oh=xh("email",{isLink:!0}),Sh=xh("email",{isLink:!0,toHref:function(){return"mailto:"+this.toString()}}),Nh=xh("text"),Fh=xh("nl"),Th=xh("url",{isLink:!0,toHref:function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Ah.defaultProtocol,t=this.tk,n=!1,r=!1,o=[],i=0;"PROTOCOL"===t[i].t;)n=!0,o.push(t[i].v),i++;for(;t[i].t===mh;)r=!0,o.push(t[i].v),i++;for(;i<t.length;i++)o.push(t[i].v);return o=o.join(""),n||r||(o="".concat(e,"://").concat(o)),o},hasProtocol:function(){return"PROTOCOL"===this.tk[0].t}}),Mh=Object.freeze({__proto__:null,MultiToken:kh,Base:kh,createTokenClass:xh,MailtoEmail:Oh,Email:Sh,Text:Nh,Nl:Fh,Url:Th});function Ih(){var e=nh(),t=nh(),n=nh(),r=nh(),o=nh(),i=nh(),s=nh(),a=rh(Th),l=nh(),c=rh(Th),u=rh(Th),d=nh(),p=nh(),h=nh(),f=nh(),m=nh(),g=rh(Th),v=rh(Th),y=rh(Th),b=rh(Th),D=nh(),E=nh(),C=nh(),w=nh(),A=nh(),_=nh(),k=rh(Sh),x=nh(),O=rh(Sh),S=rh(Oh),N=nh(),F=nh(),T=nh(),M=nh(),I=rh(Fh);oh(e,"NL",I),oh(e,"PROTOCOL",t),oh(e,"MAILTO",n),oh(t,mh,r),oh(r,mh,o),oh(e,dh,i),oh(e,uh,i),oh(e,"LOCALHOST",a),oh(e,ph,i),oh(o,dh,u),oh(o,uh,u),oh(o,ph,u),oh(o,"LOCALHOST",u),oh(i,fh,s),oh(A,fh,_),oh(s,dh,a),oh(s,uh,i),oh(s,ph,i),oh(s,"LOCALHOST",i),oh(_,dh,k),oh(_,uh,A),oh(_,ph,A),oh(_,"LOCALHOST",A),oh(a,fh,s),oh(k,fh,_),oh(a,"COLON",l),oh(a,mh,u),oh(l,ph,c),oh(c,mh,u),oh(k,"COLON",x),oh(x,ph,O);var $=["AMPERSAND","ASTERISK",hh,"BACKSLASH","BACKTICK","CARET","DOLLAR",uh,"EQUALS","HYPHEN","LOCALHOST",ph,"PERCENT","PIPE","PLUS","POUND","PROTOCOL",mh,"SYM","TILDE",dh,"UNDERSCORE"],B=["APOSTROPHE","CLOSEANGLEBRACKET","CLOSEBRACE","CLOSEBRACKET","CLOSEPAREN","COLON","COMMA",fh,"EXCLAMATION","OPENANGLEBRACKET","OPENBRACE","OPENBRACKET","OPENPAREN","QUERY","QUOTE","SEMI"];oh(u,"OPENBRACE",p),oh(u,"OPENBRACKET",h),oh(u,"OPENANGLEBRACKET",f),oh(u,"OPENPAREN",m),oh(d,"OPENBRACE",p),oh(d,"OPENBRACKET",h),oh(d,"OPENANGLEBRACKET",f),oh(d,"OPENPAREN",m),oh(p,"CLOSEBRACE",u),oh(h,"CLOSEBRACKET",u),oh(f,"CLOSEANGLEBRACKET",u),oh(m,"CLOSEPAREN",u),oh(g,"CLOSEBRACE",u),oh(v,"CLOSEBRACKET",u),oh(y,"CLOSEANGLEBRACKET",u),oh(b,"CLOSEPAREN",u),oh(D,"CLOSEBRACE",u),oh(E,"CLOSEBRACKET",u),oh(C,"CLOSEANGLEBRACKET",u),oh(w,"CLOSEPAREN",u),ah(p,$,g),ah(h,$,v),ah(f,$,y),ah(m,$,b),ah(p,B,D),ah(h,B,E),ah(f,B,C),ah(m,B,w),ah(g,$,g),ah(v,$,v),ah(y,$,y),ah(b,$,b),ah(g,B,g),ah(v,B,v),ah(y,B,y),ah(b,B,b),ah(D,$,g),ah(E,$,v),ah(C,$,y),ah(w,$,b),ah(D,B,D),ah(E,B,E),ah(C,B,C),ah(w,B,w),ah(u,$,u),ah(d,$,u),ah(u,B,d),ah(d,B,d),oh(n,dh,S),oh(n,uh,S),oh(n,ph,S),oh(n,"LOCALHOST",S),ah(S,$,S),ah(S,B,N),ah(N,$,S),ah(N,B,N);var L=["AMPERSAND","APOSTROPHE","ASTERISK","BACKSLASH","BACKTICK","CARET","CLOSEBRACE","DOLLAR",uh,"EQUALS","HYPHEN",ph,"OPENBRACE","PERCENT","PIPE","PLUS","POUND","QUERY",mh,"SYM","TILDE",dh,"UNDERSCORE"];return ah(i,L,F),oh(i,hh,T),ah(a,L,F),oh(a,hh,T),ah(s,L,F),ah(F,L,F),oh(F,hh,T),oh(F,fh,M),ah(M,L,F),oh(T,dh,A),oh(T,uh,A),oh(T,ph,A),oh(T,"LOCALHOST",k),e}function $h(e,t,n){var r=n[0].s,o=n[n.length-1].e;return new e(t.substr(r,o-r),n)}var Bh="undefined"!=typeof console&&console&&console.warn||function(){},Lh={scanner:null,parser:null,pluginQueue:[],customProtocols:[],initialized:!1};function Ph(e){if(Lh.initialized&&Bh('linkifyjs: already initialized - will not register custom protocol "'.concat(e,'" until you manually call linkify.init(). To avoid this warning, please register all custom protocols before invoking linkify the first time.')),!/^[a-z-]+$/.test(e))throw Error("linkifyjs: protocols containing characters other than a-z or - (hyphen) are not supported");Lh.customProtocols.push(e)}function Rh(e){return Lh.initialized||function(){Lh.scanner={start:wh(Lh.customProtocols),tokens:gh},Lh.parser={start:Ih(),tokens:Mh};for(var e={createTokenClass:xh},t=0;t<Lh.pluginQueue.length;t++)Lh.pluginQueue[t][1]({scanner:Lh.scanner,parser:Lh.parser,utils:e});Lh.initialized=!0}(),function(e,t,n){for(var r=n.length,o=0,i=[],s=[];o<r;){for(var a=e,l=null,c=null,u=0,d=null,p=-1;o<r&&!(l=sh(a,n[o].t));)s.push(n[o++]);for(;o<r&&(c=l||sh(a,n[o].t));)l=null,(a=c).accepts()?(p=0,d=a):p>=0&&p++,o++,u++;if(p<0)for(var h=o-u;h<o;h++)s.push(n[h]);else{s.length>0&&(i.push($h(Nh,t,s)),s=[]),o-=p,u-=p;var f=d.t,m=n.slice(o-u,o);i.push($h(f,t,m))}}return s.length>0&&i.push($h(Nh,t,s)),i}(Lh.parser.start,e,function(e,t){for(var n=function(e){for(var t=[],n=e.length,r=0;r<n;){var o=e.charCodeAt(r),i=void 0,s=o<55296||o>56319||r+1===n||(i=e.charCodeAt(r+1))<56320||i>57343?e[r]:e.slice(r,r+2);t.push(s),r+=s.length}return t}(t.replace(/[A-Z]/g,(function(e){return e.toLowerCase()}))),r=n.length,o=[],i=0,s=0;s<r;){for(var a=e,l=null,c=0,u=null,d=-1,p=-1;s<r&&(l=sh(a,n[s]));)(a=l).accepts()?(d=0,p=0,u=a):d>=0&&(d+=n[s].length,p++),c+=n[s].length,i+=n[s].length,s++;i-=d,s-=p,c-=d,o.push({t:u.t,v:t.substr(i-c,c),s:i-c,e:i})}return o}(Lh.scanner.start,e))}function zh(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Rh(e),r=[],o=0;o<n.length;o++){var i=n[o];!i.isLink||t&&i.t!==t||r.push(i.toObject())}return r}function jh(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=Rh(e);return 1===n.length&&n[0].isLink&&(!t||n[0].t===t)}function Hh(e){return new Ll({key:new zl("autolink"),appendTransaction:(t,n,r)=>{const o=t.some((e=>e.docChanged))&&!n.doc.eq(r.doc),i=t.some((e=>e.getMeta("preventAutolink")));if(!o||i)return;const{tr:s}=r,a=function(e,t){const n=new Dl(e);return t.forEach((e=>{e.steps.forEach((e=>{n.step(e)}))})),n}(n.doc,[...t]),{mapping:l}=a,c=function(e){const{mapping:t,steps:n}=e,r=[];return t.maps.forEach(((e,o)=>{const i=[];if(e.ranges.length)e.forEach(((e,t)=>{i.push({from:e,to:t})}));else{const{from:e,to:t}=n[o];if(void 0===e||void 0===t)return;i.push({from:e,to:t})}i.forEach((({from:e,to:n})=>{const i=t.slice(o).map(e,-1),s=t.slice(o).map(n),a=t.invert().map(i,-1),l=t.invert().map(s);r.push({oldRange:{from:a,to:l},newRange:{from:i,to:s}})}))})),Ud(r)}(a);return c.forEach((({oldRange:t,newRange:o})=>{Gd(t.from,t.to,n.doc).filter((t=>t.mark.type===e.type)).forEach((t=>{const o=Gd(l.map(t.from),l.map(t.to),r.doc).filter((t=>t.mark.type===e.type));if(!o.length)return;const i=o[0],a=n.doc.textBetween(t.from,t.to,void 0," "),c=r.doc.textBetween(i.from,i.to,void 0," "),u=jh(a),d=jh(c);u&&!d&&s.removeMark(i.from,i.to,e.type)})),function(e,t,n){const r=[];return e.nodesBetween(t.from,t.to,((e,t)=>{n(e)&&r.push({node:e,pos:t})})),r}(r.doc,o,(e=>e.isTextblock)).forEach((t=>{zh(r.doc.textBetween(t.pos,t.pos+t.node.nodeSize,void 0," ")).filter((e=>e.isLink)).filter((t=>!e.validate||e.validate(t.value))).map((e=>({...e,from:t.pos+e.start+1,to:t.pos+e.end+1}))).filter((e=>{const t=o.from>=e.from&&o.from<=e.to,n=o.to>=e.from&&o.to<=e.to;return t||n})).forEach((t=>{s.addMark(t.from,t.to,e.type.create({href:t.href}))}))}))})),s.steps.length?s:void 0}})}const Vh=Jd.create({name:"link",priority:1e3,keepOnSplit:!1,onCreate(){this.options.protocols.forEach(Ph)},inclusive(){return this.options.autolink},addOptions:()=>({openOnClick:!0,linkOnPaste:!0,autolink:!0,protocols:[],HTMLAttributes:{target:"_blank",rel:"noopener noreferrer nofollow",class:null},validate:void 0}),addAttributes(){return{href:{default:null},target:{default:this.options.HTMLAttributes.target},class:{default:this.options.HTMLAttributes.class}}},parseHTML:()=>[{tag:'a[href]:not([href *= "javascript:" i])'}],renderHTML({HTMLAttributes:e}){return["a",sd(this.options.HTMLAttributes,e),0]},addCommands(){return{setLink:e=>({chain:t})=>t().setMark(this.name,e).setMeta("preventAutolink",!0).run(),toggleLink:e=>({chain:t})=>t().toggleMark(this.name,e,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run(),unsetLink:()=>({chain:e})=>e().unsetMark(this.name,{extendEmptyMarkRange:!0}).setMeta("preventAutolink",!0).run()}},addPasteRules(){return[Xd({find:e=>zh(e).filter((e=>!this.options.validate||this.options.validate(e.value))).filter((e=>e.isLink)).map((e=>({text:e.value,index:e.start,data:e}))),type:this.type,getAttributes:e=>{var t;return{href:null===(t=e.data)||void 0===t?void 0:t.href}}})]},addProseMirrorPlugins(){const e=[];var t;return this.options.autolink&&e.push(Hh({type:this.type,validate:this.options.validate})),this.options.openOnClick&&e.push((t={type:this.type},new Ll({key:new zl("handleClickLink"),props:{handleClick:(e,n,r)=>{var o;const i=Wd(e.state,t.type.name);return!(!(null===(o=r.target)||void 0===o?void 0:o.closest("a"))||!i.href||(window.open(i.href,i.target),0))}}}))),this.options.linkOnPaste&&e.push(function(e){return new Ll({key:new zl("handlePasteLink"),props:{handlePaste:(t,n,r)=>{const{state:o}=t,{selection:i}=o,{empty:s}=i;if(s)return!1;let a="";r.content.forEach((e=>{a+=e.textContent}));const l=zh(a).find((e=>e.isLink&&e.value===a));return!(!a||!l||(e.editor.commands.setMark(e.type,{href:l.href}),0))}}})}({editor:this.editor,type:this.type})),e}}),Kh=Vh.extend({name:Sp.LINK,addOptions(){return{...this.parent?.(),openOnClick:!1}},addAttributes(){return{href:{default:null,parseHTML:e=>{const t=e.getAttribute("href");return t.startsWith("#")?parseFloat(e.getAttribute("href").replace("#","")):t}},target:{default:Np.SELF,parseHTML:e=>e.getAttribute("target")||Np.SELF},destination:{default:Fp.URL,parseHTML:e=>{const t=e.getAttribute("href");if(!t.startsWith("#"))return Fp.URL;const n=t.replace("#","");return Pt(this.options.pageBlocks).find((e=>e.id===parseInt(n)))?Fp.BLOCK:Fp.URL}}}},addCommands(){return{...this.parent?.(),applyLink:Qd((({commands:e,chain:t},n)=>e.getSelectedText()?t().setMark(this.name,n).transformText((()=>n.text)).extendMarkRange(Sp.LINK).run():e.insertContent(Pp.text(n.text,[Pp.mark(Sp.LINK,n)])))),isLink:Qd((({editor:e})=>jt((()=>e.isActive(Sp.LINK))))),getLinkPreset:Qd((()=>jt((()=>this.options.preset))))}},renderHTML({HTMLAttributes:e}){const t=e.destination===Fp.BLOCK?`#${e.href}`:e.href,n=`${this.options.basePresetClass+this.options.preset.id} zw-style`;return["a",{href:t,target:e.target,class:n},0]}}),qh=Jd.create({name:"superscript",addOptions:()=>({HTMLAttributes:{}}),parseHTML:()=>[{tag:"sup"},{style:"vertical-align",getAttrs:e=>"super"===e&&null}],renderHTML({HTMLAttributes:e}){return["sup",sd(this.options.HTMLAttributes,e),0]},addCommands(){return{setSuperscript:()=>({commands:e})=>e.setMark(this.name),toggleSuperscript:()=>({commands:e})=>e.toggleMark(this.name),unsetSuperscript:()=>({commands:e})=>e.unsetMark(this.name)}},addKeyboardShortcuts(){return{"Mod-.":()=>this.editor.commands.toggleSuperscript()}}}),Wh=qh.extend({addKeyboardShortcuts:null,addOptions:()=>({HTMLAttributes:{class:"zw-superscript"}})}),Uh=Yd.create({name:"doc",topNode:!0,content:"block+"}),Gh=Yd.create({name:"paragraph",priority:1e3,addOptions:()=>({HTMLAttributes:{}}),group:"block",content:"inline*",parseHTML:()=>[{tag:"p"}],renderHTML({HTMLAttributes:e}){return["p",sd(this.options.HTMLAttributes,e),0]},addCommands(){return{setParagraph:()=>({commands:e})=>e.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),Jh=Yd.create({name:"text",group:"inline"}),Yh=Ad.create({name:"placeholder",addOptions:()=>({emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}),addProseMirrorPlugins(){return[new Ll({props:{decorations:({doc:e,selection:t})=>{const n=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=t,o=[];return n?(e.descendants(((e,t)=>{const n=r>=t&&r<=t+e.nodeSize,i=!e.isLeaf&&!e.childCount;if((n||!this.options.showOnlyCurrent)&&i){const r=[this.options.emptyNodeClass];this.editor.isEmpty&&r.push(this.options.emptyEditorClass);const i=gu.node(t,t+e.nodeSize,{class:r.join(" "),"data-placeholder":"function"==typeof this.options.placeholder?this.options.placeholder({editor:this.editor,node:e,pos:t,hasAnchor:n}):this.options.placeholder});o.push(i)}return this.options.includeChildren})),bu.create(e,o)):null}}})]}});var Xh=function(){};Xh.prototype.append=function(e){return e.length?(e=Xh.from(e),!this.length&&e||e.length<200&&this.leafAppend(e)||this.length<200&&e.leafPrepend(this)||this.appendInner(e)):this},Xh.prototype.prepend=function(e){return e.length?Xh.from(e).append(this):this},Xh.prototype.appendInner=function(e){return new Zh(this,e)},Xh.prototype.slice=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=this.length),e>=t?Xh.empty:this.sliceInner(Math.max(0,e),Math.min(this.length,t))},Xh.prototype.get=function(e){if(!(e<0||e>=this.length))return this.getInner(e)},Xh.prototype.forEach=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length),t<=n?this.forEachInner(e,t,n,0):this.forEachInvertedInner(e,t,n,0)},Xh.prototype.map=function(e,t,n){void 0===t&&(t=0),void 0===n&&(n=this.length);var r=[];return this.forEach((function(t,n){return r.push(e(t,n))}),t,n),r},Xh.from=function(e){return e instanceof Xh?e:e&&e.length?new Qh(e):Xh.empty};var Qh=function(e){function t(t){e.call(this),this.values=t}e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t;var n={length:{configurable:!0},depth:{configurable:!0}};return t.prototype.flatten=function(){return this.values},t.prototype.sliceInner=function(e,n){return 0==e&&n==this.length?this:new t(this.values.slice(e,n))},t.prototype.getInner=function(e){return this.values[e]},t.prototype.forEachInner=function(e,t,n,r){for(var o=t;o<n;o++)if(!1===e(this.values[o],r+o))return!1},t.prototype.forEachInvertedInner=function(e,t,n,r){for(var o=t-1;o>=n;o--)if(!1===e(this.values[o],r+o))return!1},t.prototype.leafAppend=function(e){if(this.length+e.length<=200)return new t(this.values.concat(e.flatten()))},t.prototype.leafPrepend=function(e){if(this.length+e.length<=200)return new t(e.flatten().concat(this.values))},n.length.get=function(){return this.values.length},n.depth.get=function(){return 0},Object.defineProperties(t.prototype,n),t}(Xh);Xh.empty=new Qh([]);var Zh=function(e){function t(t,n){e.call(this),this.left=t,this.right=n,this.length=t.length+n.length,this.depth=Math.max(t.depth,n.depth)+1}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t.prototype.flatten=function(){return this.left.flatten().concat(this.right.flatten())},t.prototype.getInner=function(e){return e<this.left.length?this.left.get(e):this.right.get(e-this.left.length)},t.prototype.forEachInner=function(e,t,n,r){var o=this.left.length;return!(t<o&&!1===this.left.forEachInner(e,t,Math.min(n,o),r))&&(!(n>o&&!1===this.right.forEachInner(e,Math.max(t-o,0),Math.min(this.length,n)-o,r+o))&&void 0)},t.prototype.forEachInvertedInner=function(e,t,n,r){var o=this.left.length;return!(t>o&&!1===this.right.forEachInvertedInner(e,t-o,Math.max(n,o)-o,r+o))&&(!(n<o&&!1===this.left.forEachInvertedInner(e,Math.min(t,o),n,r))&&void 0)},t.prototype.sliceInner=function(e,t){if(0==e&&t==this.length)return this;var n=this.left.length;return t<=n?this.left.slice(e,t):e>=n?this.right.slice(e-n,t-n):this.left.slice(e,n).append(this.right.slice(0,t-n))},t.prototype.leafAppend=function(e){var n=this.right.leafAppend(e);if(n)return new t(this.left,n)},t.prototype.leafPrepend=function(e){var n=this.left.leafPrepend(e);if(n)return new t(n,this.right)},t.prototype.appendInner=function(e){return this.left.depth>=Math.max(this.right.depth,e.depth)+1?new t(this.left,new t(this.right,e)):new t(this,e)},t}(Xh),ef=Xh;class tf{constructor(e,t){this.items=e,this.eventCount=t}popEvent(e,t){if(0==this.eventCount)return null;let n,r,o=this.items.length;for(;;o--){if(this.items.get(o-1).selection){--o;break}}t&&(n=this.remapping(o,this.items.length),r=n.maps.length);let i,s,a=e.tr,l=[],c=[];return this.items.forEach(((e,t)=>{if(!e.step)return n||(n=this.remapping(o,t+1),r=n.maps.length),r--,void c.push(e);if(n){c.push(new nf(e.map));let t,o=e.step.map(n.slice(r));o&&a.maybeStep(o).doc&&(t=a.mapping.maps[a.mapping.maps.length-1],l.push(new nf(t,void 0,void 0,l.length+c.length))),r--,t&&n.appendMap(t,r)}else a.maybeStep(e.step);return e.selection?(i=n?e.selection.map(n.slice(r)):e.selection,s=new tf(this.items.slice(0,o).append(c.reverse().concat(l)),this.eventCount-1),!1):void 0}),this.items.length,0),{remaining:s,transform:a,selection:i}}addTransform(e,t,n,r){let o=[],i=this.eventCount,s=this.items,a=!r&&s.length?s.get(s.length-1):null;for(let n=0;n<e.steps.length;n++){let l,c=e.steps[n].invert(e.docs[n]),u=new nf(e.mapping.maps[n],c,t);(l=a&&a.merge(u))&&(u=l,n?o.pop():s=s.slice(0,s.length-1)),o.push(u),t&&(i++,t=void 0),r||(a=u)}let l=i-n.depth;return l>of&&(s=function(e,t){let n;return e.forEach(((e,r)=>{if(e.selection&&0==t--)return n=r,!1})),e.slice(n)}(s,l),i-=l),new tf(s.append(o),i)}remapping(e,t){let n=new Wa;return this.items.forEach(((t,r)=>{let o=null!=t.mirrorOffset&&r-t.mirrorOffset>=e?n.maps.length-t.mirrorOffset:void 0;n.appendMap(t.map,o)}),e,t),n}addMaps(e){return 0==this.eventCount?this:new tf(this.items.append(e.map((e=>new nf(e)))),this.eventCount)}rebased(e,t){if(!this.eventCount)return this;let n=[],r=Math.max(0,this.items.length-t),o=e.mapping,i=e.steps.length,s=this.eventCount;this.items.forEach((e=>{e.selection&&s--}),r);let a=t;this.items.forEach((t=>{let r=o.getMirror(--a);if(null==r)return;i=Math.min(i,r);let l=o.maps[r];if(t.step){let i=e.steps[r].invert(e.docs[r]),c=t.selection&&t.selection.map(o.slice(a+1,r));c&&s++,n.push(new nf(l,i,c))}else n.push(new nf(l))}),r);let l=[];for(let e=t;e<i;e++)l.push(new nf(o.maps[e]));let c=this.items.slice(0,r).append(l).append(n),u=new tf(c,s);return u.emptyItemCount()>500&&(u=u.compress(this.items.length-n.length)),u}emptyItemCount(){let e=0;return this.items.forEach((t=>{t.step||e++})),e}compress(e=this.items.length){let t=this.remapping(0,e),n=t.maps.length,r=[],o=0;return this.items.forEach(((i,s)=>{if(s>=e)r.push(i),i.selection&&o++;else if(i.step){let e=i.step.map(t.slice(n)),s=e&&e.getMap();if(n--,s&&t.appendMap(s,n),e){let a=i.selection&&i.selection.map(t.slice(n));a&&o++;let l,c=new nf(s.invert(),e,a),u=r.length-1;(l=r.length&&r[u].merge(c))?r[u]=l:r.push(c)}}else i.map&&n--}),this.items.length,0),new tf(ef.from(r.reverse()),o)}}tf.empty=new tf(ef.empty,0);class nf{constructor(e,t,n,r){this.map=e,this.step=t,this.selection=n,this.mirrorOffset=r}merge(e){if(this.step&&e.step&&!e.selection){let t=e.step.merge(this.step);if(t)return new nf(t.getMap().invert(),t,this.selection)}}}class rf{constructor(e,t,n,r){this.done=e,this.undone=t,this.prevRanges=n,this.prevTime=r}}const of=20;function sf(e){let t=[];return e.forEach(((e,n,r,o)=>t.push(r,o))),t}function af(e,t){if(!e)return null;let n=[];for(let r=0;r<e.length;r+=2){let o=t.map(e[r],1),i=t.map(e[r+1],-1);o<=i&&n.push(o,i)}return n}function lf(e,t,n,r){let o=df(t),i=pf.get(t).spec.config,s=(r?e.undone:e.done).popEvent(t,o);if(!s)return;let a=s.selection.resolve(s.transform.doc),l=(r?e.done:e.undone).addTransform(s.transform,t.selection.getBookmark(),i,o),c=new rf(r?l:s.remaining,r?s.remaining:l,null,0);n(s.transform.setSelection(a).setMeta(pf,{redo:r,historyState:c}).scrollIntoView())}let cf=!1,uf=null;function df(e){let t=e.plugins;if(uf!=t){cf=!1,uf=t;for(let e=0;e<t.length;e++)if(t[e].spec.historyPreserveItems){cf=!0;break}}return cf}const pf=new zl("history"),hf=new zl("closeHistory");function ff(e={}){return e={depth:e.depth||100,newGroupDelay:e.newGroupDelay||500},new Ll({key:pf,state:{init:()=>new rf(tf.empty,tf.empty,null,0),apply:(t,n,r)=>function(e,t,n,r){let o,i=n.getMeta(pf);if(i)return i.historyState;n.getMeta(hf)&&(e=new rf(e.done,e.undone,null,0));let s=n.getMeta("appendedTransaction");if(0==n.steps.length)return e;if(s&&s.getMeta(pf))return s.getMeta(pf).redo?new rf(e.done.addTransform(n,void 0,r,df(t)),e.undone,sf(n.mapping.maps[n.steps.length-1]),e.prevTime):new rf(e.done,e.undone.addTransform(n,void 0,r,df(t)),null,e.prevTime);if(!1===n.getMeta("addToHistory")||s&&!1===s.getMeta("addToHistory"))return(o=n.getMeta("rebased"))?new rf(e.done.rebased(n,o),e.undone.rebased(n,o),af(e.prevRanges,n.mapping),e.prevTime):new rf(e.done.addMaps(n.mapping.maps),e.undone.addMaps(n.mapping.maps),af(e.prevRanges,n.mapping),e.prevTime);{let o=0==e.prevTime||!s&&(e.prevTime<(n.time||0)-r.newGroupDelay||!function(e,t){if(!t)return!1;if(!e.docChanged)return!0;let n=!1;return e.mapping.maps[0].forEach(((e,r)=>{for(let o=0;o<t.length;o+=2)e<=t[o+1]&&r>=t[o]&&(n=!0)})),n}(n,e.prevRanges)),i=s?af(e.prevRanges,n.mapping):sf(n.mapping.maps[n.steps.length-1]);return new rf(e.done.addTransform(n,o?t.selection.getBookmark():void 0,r,df(t)),tf.empty,i,n.time)}}(n,r,t,e)},config:e,props:{handleDOMEvents:{beforeinput(e,t){let n=t.inputType,r="historyUndo"==n?mf:"historyRedo"==n?gf:null;return!!r&&(t.preventDefault(),r(e.state,e.dispatch))}}}})}const mf=(e,t)=>{let n=pf.getState(e);return!(!n||0==n.done.eventCount)&&(t&&lf(n,e,t,!1),!0)},gf=(e,t)=>{let n=pf.getState(e);return!(!n||0==n.undone.eventCount)&&(t&&lf(n,e,t,!0),!0)},vf=Ad.create({name:"history",addOptions:()=>({depth:100,newGroupDelay:500}),addCommands:()=>({undo:()=>({state:e,dispatch:t})=>mf(e,t),redo:()=>({state:e,dispatch:t})=>gf(e,t)}),addProseMirrorPlugins(){return[ff(this.options)]},addKeyboardShortcuts(){return{"Mod-z":()=>this.editor.commands.undo(),"Mod-y":()=>this.editor.commands.redo(),"Shift-Mod-z":()=>this.editor.commands.redo(),"Mod-я":()=>this.editor.commands.undo(),"Shift-Mod-я":()=>this.editor.commands.redo()}}}),yf=Ad.create({name:"node_processor",addCommands:()=>({setBlockAttributes:Qd((({commands:e},t,n,r={})=>{const o=Pt(e.getBlockAttributes(t))??{};for(const i of xp.blocks)e.updateAttributes(i,{[t]:{...r,...o,...n}})})),getBlockAttributes:Qd((({editor:e},t,n)=>jt((()=>{let r=Object.assign({},n||{});for(const n of xp.blocks)Object.assign(r,e.getAttributes(n)?.[t]||{});return Object.keys(r).length?r:null}))))})}),bf=Ad.create({name:"text_processor",addCommands:()=>({getSelectedText:Qd((({state:e})=>{const{from:t,to:n}=e.selection;return e.doc.textBetween(t,n," ")})),unsetMarks:Qd((({commands:e},t)=>{t.forEach((t=>e.unsetMark(t)))})),transformText:Qd((({state:e},t)=>{const{selection:n}=e.tr;n.from!==n.to&&e.doc.nodesBetween(n.from,n.to,((r,o)=>{if(!r.isText)return;const i=Math.max(o,n.from),s=Math.min(o+r.nodeSize,n.to),a=Math.max(0,n.from-o),l=Math.max(0,n.to-o),c=t({text:r.textContent.substring(a,l),position:{start:i,end:s}}),u=e.schema.text(c,r.marks);e.tr.replaceWith(i,s,u)}))}))})}),Df=Ad.create({name:"selection_processor",addStorage:()=>({selection:null}),addCommands(){return{storeSelection:Qd((({state:e})=>{this.storage.selection=e.selection})),restoreSelection:Qd((({commands:e})=>{e.setTextSelection(this.storage.selection)})),expandSelectionToBlock:Qd((({state:e,commands:t})=>{let n=e.selection.from,r=e.selection.to;e.doc.nodesBetween(n,r,((e,t,o)=>{o.type.name===xp.DOCUMENT&&(n=Math.min(n,t+1),r=Math.max(r,t+e.nodeSize-1))})),t.setTextSelection({from:n,to:r})}))}}});class Ef extends class{static create(e){const t=new this(e||{});return new Ll({key:new zl(this.name),props:t.buildProps()})}constructor(e){this.options=e}buildProps(){return{}}}{buildProps(){return{transformPastedHTML:this._transformPastedHTML.bind(this),handlePaste:this._handlePaste.bind(this)}}_transformPastedHTML(e){const t=Bp.build(e);return t.normalizeHTML(),this._removeDeprecatedStyles(t),t.normalizedHTML}_removeDeprecatedStyles(e){const t=e.dom.querySelectorAll('[style*="margin"]');for(const e of Array.from(t))e.style.removeProperty("margin"),e.style.removeProperty("margin-top"),e.style.removeProperty("margin-right"),e.style.removeProperty("margin-bottom"),e.style.removeProperty("margin-left")}_handlePaste(e,t,n){const r=this._insertPastedContent(e,n).scrollIntoView().setMeta("paste",!0).setMeta("uiEvent","paste");return e.dispatch(r),!0}_insertPastedContent({state:e,input:t},n){return this._isFullBlockSelected(e)?e.tr.replaceSelectionWith(n.content,t.shiftKey):e.tr.replaceSelection(n)}_isFullBlockSelected(e){const t=this._expandSelectionToBlocks(e),n=this._isMatchPosition(t.from,e.selection.from),r=this._isMatchPosition(t.to,e.selection.to);return n&&r}_expandSelectionToBlocks({selection:e,doc:t}){let n=e.from,r=e.to;return t.nodesBetween(n,r,((e,t,o)=>{o.type.name===xp.DOCUMENT&&(n=Math.min(n,t+1),r=Math.max(r,t+e.nodeSize-1))})),{from:n,to:r}}_isMatchPosition(e,t){return Math.abs(e-t)<5}}const Cf=Ad.create({name:"copy_paste_processor",addProseMirrorPlugins:()=>[Ef.create()]}),wf=Ad.create({name:Sp.MARGIN,addGlobalAttributes:()=>[{types:[xp.PARAGRAPH,xp.HEADING],attributes:{[Sp.MARGIN]:{isRequired:!1,parseHTML(e){const{margin:t,marginTop:n,marginRight:r,marginBottom:o,marginLeft:i}=e.style;if(![t,n,r,o,i].some((e=>!!e)))return null;if(t)return{value:t};return{value:[n||0,r||0,o||0,i||0].join(" ")}},renderHTML:e=>e.margin?Zd({margin:e.margin.value}):null}}}]});function Af(e){const t=t=>e.presetsRef.value.find((e=>e.id===t)),n=t(e.defaultPresetId),r=t(e.linkPresetId);return[Uh,Gh.configure({HTMLAttributes:{class:"zw-style"}}),Yh.configure({placeholder:"Type your text here...",emptyNodeClass:"zw-wysiwyg__placeholder"}),Jh,vf,yf,bf,Df,Cf].concat([zp.configure({presets:e.presetsRef,defaultId:e.defaultPresetId,baseClass:e.basePresetClass,makeVariable:e.makePresetVariable}),eh.configure({baseClass:e.baseListClass}),qp.configure({device:e.deviceRef}),Hp.configure({minSize:e.minFontSize,maxSize:e.maxFontSize,wrapperRef:e.wrapperRef}),Mp.configure({fonts:e.fonts,defaultFont:n.common.font_family}),jp,Vp,Kp,Wp,Up,Gp,Wh,Yp,Qp.configure({wrapperRef:e.wrapperRef}),Kh.configure({preset:r,basePresetClass:e.basePresetClass,pageBlocks:e.pageBlocksRef}),wf])}class _f{types;parse(e){const{window:t}=new i.JSDOM(e);return this.types=t,t.document}}class kf{static build(e){const t=function(e){return dd(Ed.resolve(e))}(Af({fonts:e.fonts,minFontSize:0,maxFontSize:0,presetsRef:Lt(e.presets),defaultPresetId:e.defaultPresetId,linkPresetId:e.linkPresetId,makePresetVariable:()=>"",basePresetClass:e.basePresetClass,baseListClass:e.baseListClass,deviceRef:Lt(Ap.DESKTOP),pageBlocksRef:Lt([]),wrapperRef:i.JSDOM.fragment("<p></p>").firstElementChild}));return new kf({schema:t,domParser:Oa.fromSchema(t)})}#t;#e;constructor({schema:e,domParser:t}){this.#t=e,this.#e=t}toJSON(e){const t=Bp.build(e,{parser:new _f});return t.normalizeHTML(),this.#e.parse(t.dom.body)}}const xf=new J;xf.command("to-json").argument("<html>").option("--config <path>","generator config",e.resolve(__dirname,"../bin/zp.config.json")).action(((t,{config:n})=>{const r=e.resolve(process.cwd(),n),o=kf.build(require(r).editor),i=(s=o.toJSON(t),JSON.stringify(s,((e,t)=>null===t?void 0:t),2).replace(/^[\t ]*"[^:\n\r]+(?<!\\)":/gm,(e=>e.replace(/"/g,""))).replace(/: "(.+)"([,\n])/g,": '$1'$2"));var s;console.log(i)})),xf.parse();