@formio/js 5.0.0-rc.29 → 5.0.0-rc.31

Sign up to get free protection for your applications and to get access to all the features.
Files changed (1101) hide show
  1. package/dist/formio.embed.js +1 -1
  2. package/dist/formio.embed.min.js +1 -1
  3. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  4. package/dist/formio.form.js +68 -112
  5. package/dist/formio.form.min.js +1 -1
  6. package/dist/formio.form.min.js.LICENSE.txt +1 -3
  7. package/dist/formio.full.js +70 -114
  8. package/dist/formio.full.min.js +1 -1
  9. package/dist/formio.full.min.js.LICENSE.txt +1 -3
  10. package/dist/formio.js +46 -90
  11. package/dist/formio.min.js +1 -1
  12. package/dist/formio.min.js.LICENSE.txt +1 -1
  13. package/dist/formio.utils.js +21 -87
  14. package/dist/formio.utils.min.js +1 -1
  15. package/dist/formio.utils.min.js.LICENSE.txt +1 -3
  16. package/lib/cjs/CDN.js +6 -2
  17. package/lib/cjs/Embed.js +105 -68
  18. package/lib/cjs/Formio.js +10 -0
  19. package/lib/cjs/Wizard.js +9 -10
  20. package/lib/cjs/components/_classes/component/Component.js +1 -3
  21. package/lib/cjs/components/_classes/component/fixtures/comp5.js +26 -0
  22. package/lib/cjs/components/_classes/component/fixtures/index.js +3 -1
  23. package/lib/cjs/components/columns/editForm/Columns.edit.display.js +0 -18
  24. package/lib/cjs/components/file/File.js +13 -1
  25. package/lib/cjs/components/file/editForm/File.edit.file.js +40 -0
  26. package/lib/cjs/components/select/Select.js +7 -3
  27. package/lib/cjs/formio.form.js +3 -1
  28. package/lib/cjs/providers/storage/azure.js +24 -22
  29. package/lib/cjs/providers/storage/base64.js +29 -27
  30. package/lib/cjs/providers/storage/dropbox.js +51 -49
  31. package/lib/cjs/providers/storage/googleDrive.js +50 -48
  32. package/lib/cjs/providers/storage/indexeddb.js +106 -104
  33. package/lib/cjs/providers/storage/s3.js +137 -37
  34. package/lib/cjs/providers/storage/url.js +2 -2
  35. package/lib/cjs/providers/storage/util.js +21 -0
  36. package/lib/cjs/providers/storage/xhr.js +81 -64
  37. package/lib/cjs/utils/formUtils.js +1 -1
  38. package/lib/cjs/utils/utils.js +6 -0
  39. package/lib/mjs/CDN.js +6 -2
  40. package/lib/mjs/Embed.js +101 -69
  41. package/lib/mjs/Formio.js +35 -25
  42. package/lib/mjs/Wizard.js +9 -10
  43. package/lib/mjs/components/_classes/component/Component.js +1 -3
  44. package/lib/mjs/components/_classes/component/fixtures/comp5.js +24 -0
  45. package/lib/mjs/components/_classes/component/fixtures/index.js +2 -1
  46. package/lib/mjs/components/columns/editForm/Columns.edit.display.js +0 -18
  47. package/lib/mjs/components/file/File.js +17 -1
  48. package/lib/mjs/components/file/editForm/File.edit.file.js +40 -0
  49. package/lib/mjs/components/select/Select.js +7 -3
  50. package/lib/mjs/formio.form.js +3 -1
  51. package/lib/mjs/providers/storage/azure.js +24 -22
  52. package/lib/mjs/providers/storage/base64.js +29 -27
  53. package/lib/mjs/providers/storage/dropbox.js +51 -49
  54. package/lib/mjs/providers/storage/googleDrive.js +50 -48
  55. package/lib/mjs/providers/storage/indexeddb.js +106 -104
  56. package/lib/mjs/providers/storage/s3.js +122 -29
  57. package/lib/mjs/providers/storage/url.js +2 -2
  58. package/lib/mjs/providers/storage/util.js +6 -0
  59. package/lib/mjs/providers/storage/xhr.js +75 -65
  60. package/lib/mjs/utils/formUtils.js +1 -1
  61. package/lib/mjs/utils/utils.js +6 -0
  62. package/package.json +7 -4
  63. package/types/Embed.d.ts +13 -0
  64. package/types/Plugins.d.ts +95 -0
  65. package/types/components/_classes/component/component.d.ts +2 -1
  66. package/types/components/schema.d.ts +2 -68
  67. package/types/formio.d.ts +1220 -118
  68. package/types/index.d.ts +1 -1
  69. package/types/utils.d.ts +1 -1
  70. package/lib/cjs/CDN.d.ts +0 -29
  71. package/lib/cjs/Element.d.ts +0 -255
  72. package/lib/cjs/Embed.d.ts +0 -52
  73. package/lib/cjs/EventEmitter.d.ts +0 -7
  74. package/lib/cjs/Form.d.ts +0 -93
  75. package/lib/cjs/FormBuilder.d.ts +0 -6
  76. package/lib/cjs/Formio.d.ts +0 -1
  77. package/lib/cjs/PDF.d.ts +0 -40
  78. package/lib/cjs/PDFBuilder.d.ts +0 -55
  79. package/lib/cjs/Webform.d.ts +0 -402
  80. package/lib/cjs/WebformBuilder.d.ts +0 -126
  81. package/lib/cjs/Wizard.d.ts +0 -97
  82. package/lib/cjs/WizardBuilder.d.ts +0 -49
  83. package/lib/cjs/addons/FormioAddon.d.ts +0 -19
  84. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +0 -716
  85. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +0 -590
  86. package/lib/cjs/addons/index.d.ts +0 -626
  87. package/lib/cjs/builders/Builders.d.ts +0 -18
  88. package/lib/cjs/builders/index.d.ts +0 -2
  89. package/lib/cjs/components/Components.d.ts +0 -265
  90. package/lib/cjs/components/_classes/component/Component.d.ts +0 -828
  91. package/lib/cjs/components/_classes/component/Component.form.d.ts +0 -3
  92. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.d.ts +0 -653
  93. package/lib/cjs/components/_classes/component/editForm/Component.edit.api.d.ts +0 -42
  94. package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +0 -113
  95. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +0 -219
  96. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.d.ts +0 -160
  97. package/lib/cjs/components/_classes/component/editForm/Component.edit.layout.d.ts +0 -44
  98. package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.d.ts +0 -368
  99. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.d.ts +0 -140
  100. package/lib/cjs/components/_classes/component/editForm/utils.d.ts +0 -83
  101. package/lib/cjs/components/_classes/component/fixtures/comp1.d.ts +0 -33
  102. package/lib/cjs/components/_classes/component/fixtures/comp2.d.ts +0 -33
  103. package/lib/cjs/components/_classes/component/fixtures/comp3.d.ts +0 -14
  104. package/lib/cjs/components/_classes/component/fixtures/comp4.d.ts +0 -17
  105. package/lib/cjs/components/_classes/component/fixtures/index.d.ts +0 -5
  106. package/lib/cjs/components/_classes/componentModal/ComponentModal.d.ts +0 -46
  107. package/lib/cjs/components/_classes/field/Field.d.ts +0 -5
  108. package/lib/cjs/components/_classes/input/Input.d.ts +0 -42
  109. package/lib/cjs/components/_classes/list/ListComponent.d.ts +0 -18
  110. package/lib/cjs/components/_classes/list/ListComponent.form.d.ts +0 -3
  111. package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.d.ts +0 -183
  112. package/lib/cjs/components/_classes/multivalue/Multivalue.d.ts +0 -29
  113. package/lib/cjs/components/_classes/nested/NestedComponent.d.ts +0 -150
  114. package/lib/cjs/components/_classes/nested/NestedComponent.form.d.ts +0 -3
  115. package/lib/cjs/components/_classes/nested/fixtures/comp1.d.ts +0 -8
  116. package/lib/cjs/components/_classes/nested/fixtures/comp2.d.ts +0 -236
  117. package/lib/cjs/components/_classes/nested/fixtures/comp3.d.ts +0 -26
  118. package/lib/cjs/components/_classes/nested/fixtures/index.d.ts +0 -3
  119. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +0 -16
  120. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -12
  121. package/lib/cjs/components/address/Address.d.ts +0 -66
  122. package/lib/cjs/components/address/Address.form.d.ts +0 -3
  123. package/lib/cjs/components/address/editForm/Address.edit.data.d.ts +0 -31
  124. package/lib/cjs/components/address/editForm/Address.edit.display.d.ts +0 -49
  125. package/lib/cjs/components/address/editForm/Address.edit.provider.d.ts +0 -164
  126. package/lib/cjs/components/address/fixtures/comp1.d.ts +0 -34
  127. package/lib/cjs/components/address/fixtures/comp2.d.ts +0 -62
  128. package/lib/cjs/components/address/fixtures/comp3.d.ts +0 -44
  129. package/lib/cjs/components/address/fixtures/comp4.d.ts +0 -56
  130. package/lib/cjs/components/address/fixtures/index.d.ts +0 -5
  131. package/lib/cjs/components/address/fixtures/values.d.ts +0 -22
  132. package/lib/cjs/components/alert/Alert.d.ts +0 -30
  133. package/lib/cjs/components/builder.d.ts +0 -2
  134. package/lib/cjs/components/button/Button.d.ts +0 -45
  135. package/lib/cjs/components/button/Button.form.d.ts +0 -3
  136. package/lib/cjs/components/button/editForm/Button.edit.display.d.ts +0 -360
  137. package/lib/cjs/components/button/fixtures/comp1.d.ts +0 -15
  138. package/lib/cjs/components/button/fixtures/comp2.d.ts +0 -25
  139. package/lib/cjs/components/button/fixtures/comp3.d.ts +0 -113
  140. package/lib/cjs/components/button/fixtures/index.d.ts +0 -4
  141. package/lib/cjs/components/button/fixtures/values.d.ts +0 -2
  142. package/lib/cjs/components/checkbox/Checkbox.d.ts +0 -77
  143. package/lib/cjs/components/checkbox/Checkbox.form.d.ts +0 -3
  144. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.data.d.ts +0 -5
  145. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.d.ts +0 -75
  146. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.validation.d.ts +0 -5
  147. package/lib/cjs/components/checkbox/fixtures/comp1.d.ts +0 -24
  148. package/lib/cjs/components/checkbox/fixtures/comp2.d.ts +0 -12
  149. package/lib/cjs/components/checkbox/fixtures/comp3.d.ts +0 -15
  150. package/lib/cjs/components/checkbox/fixtures/comp4.d.ts +0 -46
  151. package/lib/cjs/components/checkbox/fixtures/customDefaultComponent.d.ts +0 -25
  152. package/lib/cjs/components/checkbox/fixtures/index.d.ts +0 -6
  153. package/lib/cjs/components/checkbox/fixtures/values.d.ts +0 -2
  154. package/lib/cjs/components/columns/Columns.d.ts +0 -28
  155. package/lib/cjs/components/columns/Columns.form.d.ts +0 -3
  156. package/lib/cjs/components/columns/editForm/Columns.edit.display.d.ts +0 -87
  157. package/lib/cjs/components/columns/fixtures/comp1.d.ts +0 -45
  158. package/lib/cjs/components/columns/fixtures/comp2.d.ts +0 -24
  159. package/lib/cjs/components/columns/fixtures/comp3.d.ts +0 -45
  160. package/lib/cjs/components/columns/fixtures/index.d.ts +0 -4
  161. package/lib/cjs/components/container/Container.d.ts +0 -16
  162. package/lib/cjs/components/container/Container.form.d.ts +0 -3
  163. package/lib/cjs/components/container/editForm/Container.edit.data.d.ts +0 -5
  164. package/lib/cjs/components/container/editForm/Container.edit.display.d.ts +0 -5
  165. package/lib/cjs/components/container/fixtures/comp1.d.ts +0 -49
  166. package/lib/cjs/components/container/fixtures/comp2.d.ts +0 -30
  167. package/lib/cjs/components/container/fixtures/comp3.d.ts +0 -77
  168. package/lib/cjs/components/container/fixtures/index.d.ts +0 -4
  169. package/lib/cjs/components/content/Content.d.ts +0 -18
  170. package/lib/cjs/components/content/Content.form.d.ts +0 -3
  171. package/lib/cjs/components/content/editForm/Content.edit.display.d.ts +0 -18
  172. package/lib/cjs/components/content/editForm/Content.edit.logic.d.ts +0 -48
  173. package/lib/cjs/components/content/fixtures/comp1.d.ts +0 -13
  174. package/lib/cjs/components/content/fixtures/index.d.ts +0 -2
  175. package/lib/cjs/components/currency/Currency.d.ts +0 -8
  176. package/lib/cjs/components/currency/Currency.form.d.ts +0 -3
  177. package/lib/cjs/components/currency/editForm/Currency.edit.data.d.ts +0 -29
  178. package/lib/cjs/components/currency/editForm/Currency.edit.display.d.ts +0 -18
  179. package/lib/cjs/components/currency/fixtures/comp1.d.ts +0 -31
  180. package/lib/cjs/components/currency/fixtures/comp2.d.ts +0 -20
  181. package/lib/cjs/components/currency/fixtures/comp3.d.ts +0 -13
  182. package/lib/cjs/components/currency/fixtures/comp4.d.ts +0 -17
  183. package/lib/cjs/components/currency/fixtures/index.d.ts +0 -5
  184. package/lib/cjs/components/currency/fixtures/values.d.ts +0 -2
  185. package/lib/cjs/components/datagrid/DataGrid.d.ts +0 -80
  186. package/lib/cjs/components/datagrid/DataGrid.form.d.ts +0 -3
  187. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.data.d.ts +0 -5
  188. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.display.d.ts +0 -283
  189. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.validation.d.ts +0 -20
  190. package/lib/cjs/components/datagrid/fixtures/comp-modal-with-required-fields.d.ts +0 -37
  191. package/lib/cjs/components/datagrid/fixtures/comp-on-blur-validation.d.ts +0 -0
  192. package/lib/cjs/components/datagrid/fixtures/comp-row-groups-with-def-value.d.ts +0 -63
  193. package/lib/cjs/components/datagrid/fixtures/comp-with-collapsible-groups.d.ts +0 -76
  194. package/lib/cjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.d.ts +0 -197
  195. package/lib/cjs/components/datagrid/fixtures/comp-with-def-value.d.ts +0 -61
  196. package/lib/cjs/components/datagrid/fixtures/comp-with-logic.d.ts +0 -165
  197. package/lib/cjs/components/datagrid/fixtures/comp1.d.ts +0 -93
  198. package/lib/cjs/components/datagrid/fixtures/comp2.d.ts +0 -18
  199. package/lib/cjs/components/datagrid/fixtures/comp3.d.ts +0 -14
  200. package/lib/cjs/components/datagrid/fixtures/comp4.d.ts +0 -27
  201. package/lib/cjs/components/datagrid/fixtures/comp5.d.ts +0 -67
  202. package/lib/cjs/components/datagrid/fixtures/comp6.d.ts +0 -567
  203. package/lib/cjs/components/datagrid/fixtures/comp7.d.ts +0 -28
  204. package/lib/cjs/components/datagrid/fixtures/comp8.d.ts +0 -35
  205. package/lib/cjs/components/datagrid/fixtures/index.d.ts +0 -15
  206. package/lib/cjs/components/datamap/DataMap.d.ts +0 -36
  207. package/lib/cjs/components/datamap/DataMap.form.d.ts +0 -3
  208. package/lib/cjs/components/datamap/editForm/DataMap.edit.data.d.ts +0 -5
  209. package/lib/cjs/components/datamap/editForm/DataMap.edit.display.d.ts +0 -30
  210. package/lib/cjs/components/datamap/fixtures/comp1.d.ts +0 -18
  211. package/lib/cjs/components/datamap/fixtures/formWithConditionalPanel.d.ts +0 -87
  212. package/lib/cjs/components/datamap/fixtures/index.d.ts +0 -3
  213. package/lib/cjs/components/datetime/DateTime.d.ts +0 -39
  214. package/lib/cjs/components/datetime/DateTime.form.d.ts +0 -3
  215. package/lib/cjs/components/datetime/editForm/DateTime.edit.data.d.ts +0 -24
  216. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.d.ts +0 -61
  217. package/lib/cjs/components/datetime/editForm/DateTime.edit.display.d.ts +0 -128
  218. package/lib/cjs/components/datetime/editForm/DateTime.edit.time.d.ts +0 -9
  219. package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.d.ts +0 -40
  220. package/lib/cjs/components/datetime/fixtures/comp1.d.ts +0 -45
  221. package/lib/cjs/components/datetime/fixtures/comp10.d.ts +0 -102
  222. package/lib/cjs/components/datetime/fixtures/comp11.d.ts +0 -58
  223. package/lib/cjs/components/datetime/fixtures/comp12.d.ts +0 -57
  224. package/lib/cjs/components/datetime/fixtures/comp2.d.ts +0 -42
  225. package/lib/cjs/components/datetime/fixtures/comp3.d.ts +0 -51
  226. package/lib/cjs/components/datetime/fixtures/comp5.d.ts +0 -57
  227. package/lib/cjs/components/datetime/fixtures/comp6.d.ts +0 -55
  228. package/lib/cjs/components/datetime/fixtures/comp7.d.ts +0 -59
  229. package/lib/cjs/components/datetime/fixtures/comp8.d.ts +0 -59
  230. package/lib/cjs/components/datetime/fixtures/comp9.d.ts +0 -64
  231. package/lib/cjs/components/datetime/fixtures/index.d.ts +0 -12
  232. package/lib/cjs/components/datetime/fixtures/values.d.ts +0 -2
  233. package/lib/cjs/components/day/Day.d.ts +0 -163
  234. package/lib/cjs/components/day/Day.form.d.ts +0 -3
  235. package/lib/cjs/components/day/editForm/Day.edit.data.d.ts +0 -5
  236. package/lib/cjs/components/day/editForm/Day.edit.day.d.ts +0 -40
  237. package/lib/cjs/components/day/editForm/Day.edit.display.d.ts +0 -40
  238. package/lib/cjs/components/day/editForm/Day.edit.month.d.ts +0 -40
  239. package/lib/cjs/components/day/editForm/Day.edit.validation.d.ts +0 -29
  240. package/lib/cjs/components/day/editForm/Day.edit.year.d.ts +0 -40
  241. package/lib/cjs/components/day/fixtures/comp1.d.ts +0 -46
  242. package/lib/cjs/components/day/fixtures/comp2.d.ts +0 -46
  243. package/lib/cjs/components/day/fixtures/comp3.d.ts +0 -48
  244. package/lib/cjs/components/day/fixtures/comp4.d.ts +0 -53
  245. package/lib/cjs/components/day/fixtures/comp5.d.ts +0 -29
  246. package/lib/cjs/components/day/fixtures/comp6.d.ts +0 -81
  247. package/lib/cjs/components/day/fixtures/index.d.ts +0 -7
  248. package/lib/cjs/components/day/fixtures/values.d.ts +0 -2
  249. package/lib/cjs/components/editgrid/EditGrid.d.ts +0 -103
  250. package/lib/cjs/components/editgrid/EditGrid.form.d.ts +0 -3
  251. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.data.d.ts +0 -18
  252. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.d.ts +0 -82
  253. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +0 -58
  254. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.validation.d.ts +0 -29
  255. package/lib/cjs/components/editgrid/fixtures/comp-openWhenEmpty.d.ts +0 -34
  256. package/lib/cjs/components/editgrid/fixtures/comp-with-basic-components.d.ts +0 -327
  257. package/lib/cjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.d.ts +0 -77
  258. package/lib/cjs/components/editgrid/fixtures/comp-with-custom-default-value.d.ts +0 -190
  259. package/lib/cjs/components/editgrid/fixtures/comp1.d.ts +0 -89
  260. package/lib/cjs/components/editgrid/fixtures/comp10.d.ts +0 -49
  261. package/lib/cjs/components/editgrid/fixtures/comp11.d.ts +0 -53
  262. package/lib/cjs/components/editgrid/fixtures/comp12.d.ts +0 -57
  263. package/lib/cjs/components/editgrid/fixtures/comp13.d.ts +0 -64
  264. package/lib/cjs/components/editgrid/fixtures/comp14.d.ts +0 -88
  265. package/lib/cjs/components/editgrid/fixtures/comp15.d.ts +0 -54
  266. package/lib/cjs/components/editgrid/fixtures/comp2.d.ts +0 -112
  267. package/lib/cjs/components/editgrid/fixtures/comp3.d.ts +0 -27
  268. package/lib/cjs/components/editgrid/fixtures/comp4.d.ts +0 -23
  269. package/lib/cjs/components/editgrid/fixtures/comp5.d.ts +0 -19
  270. package/lib/cjs/components/editgrid/fixtures/comp6.d.ts +0 -50
  271. package/lib/cjs/components/editgrid/fixtures/comp7.d.ts +0 -129
  272. package/lib/cjs/components/editgrid/fixtures/comp8.d.ts +0 -148
  273. package/lib/cjs/components/editgrid/fixtures/comp9.d.ts +0 -86
  274. package/lib/cjs/components/editgrid/fixtures/index.d.ts +0 -19
  275. package/lib/cjs/components/email/Email.d.ts +0 -4
  276. package/lib/cjs/components/email/Email.form.d.ts +0 -3
  277. package/lib/cjs/components/email/editForm/Email.edit.display.d.ts +0 -5
  278. package/lib/cjs/components/email/editForm/Email.edit.validation.d.ts +0 -24
  279. package/lib/cjs/components/email/fixtures/comp1.d.ts +0 -26
  280. package/lib/cjs/components/email/fixtures/comp2.d.ts +0 -23
  281. package/lib/cjs/components/email/fixtures/index.d.ts +0 -3
  282. package/lib/cjs/components/email/fixtures/values.d.ts +0 -2
  283. package/lib/cjs/components/fieldset/Fieldset.d.ts +0 -15
  284. package/lib/cjs/components/fieldset/Fieldset.form.d.ts +0 -3
  285. package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.d.ts +0 -33
  286. package/lib/cjs/components/fieldset/fixtures/comp1.d.ts +0 -46
  287. package/lib/cjs/components/fieldset/fixtures/index.d.ts +0 -2
  288. package/lib/cjs/components/file/File.d.ts +0 -81
  289. package/lib/cjs/components/file/File.form.d.ts +0 -3
  290. package/lib/cjs/components/file/editForm/File.edit.data.d.ts +0 -5
  291. package/lib/cjs/components/file/editForm/File.edit.display.d.ts +0 -5
  292. package/lib/cjs/components/file/editForm/File.edit.file.d.ts +0 -275
  293. package/lib/cjs/components/file/editForm/File.edit.validation.d.ts +0 -5
  294. package/lib/cjs/components/file/fixtures/comp1.d.ts +0 -15
  295. package/lib/cjs/components/file/fixtures/comp2.d.ts +0 -35
  296. package/lib/cjs/components/file/fixtures/comp3.d.ts +0 -29
  297. package/lib/cjs/components/file/fixtures/index.d.ts +0 -3
  298. package/lib/cjs/components/file/fixtures/values.d.ts +0 -10
  299. package/lib/cjs/components/form/Form.d.ts +0 -94
  300. package/lib/cjs/components/form/Form.form.d.ts +0 -3
  301. package/lib/cjs/components/form/editForm/Form.edit.data.d.ts +0 -82
  302. package/lib/cjs/components/form/editForm/Form.edit.display.d.ts +0 -5
  303. package/lib/cjs/components/form/editForm/Form.edit.form.d.ts +0 -89
  304. package/lib/cjs/components/form/fixtures/comp1.d.ts +0 -45
  305. package/lib/cjs/components/form/fixtures/comp2.d.ts +0 -14
  306. package/lib/cjs/components/form/fixtures/comp3.d.ts +0 -187
  307. package/lib/cjs/components/form/fixtures/comp4.d.ts +0 -107
  308. package/lib/cjs/components/form/fixtures/comp5.d.ts +0 -42
  309. package/lib/cjs/components/form/fixtures/comp6.d.ts +0 -74
  310. package/lib/cjs/components/form/fixtures/formModalEdit.d.ts +0 -42
  311. package/lib/cjs/components/form/fixtures/index.d.ts +0 -8
  312. package/lib/cjs/components/form/fixtures/values.d.ts +0 -6
  313. package/lib/cjs/components/hidden/Hidden.d.ts +0 -26
  314. package/lib/cjs/components/hidden/Hidden.form.d.ts +0 -3
  315. package/lib/cjs/components/hidden/editForm/Hidden.edit.data.d.ts +0 -5
  316. package/lib/cjs/components/hidden/editForm/Hidden.edit.display.d.ts +0 -5
  317. package/lib/cjs/components/hidden/fixtures/comp1.d.ts +0 -18
  318. package/lib/cjs/components/hidden/fixtures/index.d.ts +0 -2
  319. package/lib/cjs/components/hidden/fixtures/values.d.ts +0 -2
  320. package/lib/cjs/components/html/HTML.d.ts +0 -18
  321. package/lib/cjs/components/html/HTML.form.d.ts +0 -3
  322. package/lib/cjs/components/html/editForm/HTML.edit.display.d.ts +0 -77
  323. package/lib/cjs/components/html/editForm/HTML.edit.logic.d.ts +0 -48
  324. package/lib/cjs/components/html/fixtures/comp1.d.ts +0 -19
  325. package/lib/cjs/components/html/fixtures/comp2.d.ts +0 -21
  326. package/lib/cjs/components/html/fixtures/index.d.ts +0 -3
  327. package/lib/cjs/components/index.d.ts +0 -98
  328. package/lib/cjs/components/number/Number.d.ts +0 -53
  329. package/lib/cjs/components/number/Number.form.d.ts +0 -3
  330. package/lib/cjs/components/number/editForm/Number.edit.data.d.ts +0 -18
  331. package/lib/cjs/components/number/editForm/Number.edit.display.d.ts +0 -5
  332. package/lib/cjs/components/number/editForm/Number.edit.validation.d.ts +0 -20
  333. package/lib/cjs/components/number/fixtures/comp1.d.ts +0 -33
  334. package/lib/cjs/components/number/fixtures/comp2.d.ts +0 -32
  335. package/lib/cjs/components/number/fixtures/comp3.d.ts +0 -14
  336. package/lib/cjs/components/number/fixtures/comp4.d.ts +0 -14
  337. package/lib/cjs/components/number/fixtures/comp5.d.ts +0 -20
  338. package/lib/cjs/components/number/fixtures/comp6.d.ts +0 -40
  339. package/lib/cjs/components/number/fixtures/comp7.d.ts +0 -15
  340. package/lib/cjs/components/number/fixtures/index.d.ts +0 -8
  341. package/lib/cjs/components/number/fixtures/values.d.ts +0 -2
  342. package/lib/cjs/components/panel/Panel.d.ts +0 -14
  343. package/lib/cjs/components/panel/Panel.form.d.ts +0 -3
  344. package/lib/cjs/components/panel/editForm/Panel.edit.conditional.d.ts +0 -75
  345. package/lib/cjs/components/panel/editForm/Panel.edit.display.d.ts +0 -196
  346. package/lib/cjs/components/panel/fixtures/comp1.d.ts +0 -46
  347. package/lib/cjs/components/panel/fixtures/comp2.d.ts +0 -80
  348. package/lib/cjs/components/panel/fixtures/index.d.ts +0 -3
  349. package/lib/cjs/components/password/Password.d.ts +0 -3
  350. package/lib/cjs/components/password/Password.form.d.ts +0 -3
  351. package/lib/cjs/components/password/editForm/Password.edit.data.d.ts +0 -18
  352. package/lib/cjs/components/password/editForm/Password.edit.display.d.ts +0 -5
  353. package/lib/cjs/components/password/editForm/Password.edit.validation.d.ts +0 -5
  354. package/lib/cjs/components/password/fixtures/comp1.d.ts +0 -22
  355. package/lib/cjs/components/password/fixtures/comp2.d.ts +0 -27
  356. package/lib/cjs/components/password/fixtures/index.d.ts +0 -3
  357. package/lib/cjs/components/password/fixtures/values.d.ts +0 -2
  358. package/lib/cjs/components/phonenumber/PhoneNumber.d.ts +0 -3
  359. package/lib/cjs/components/phonenumber/PhoneNumber.form.d.ts +0 -3
  360. package/lib/cjs/components/phonenumber/editForm/PhoneNumber.edit.validation.d.ts +0 -5
  361. package/lib/cjs/components/phonenumber/fixtures/comp1.d.ts +0 -27
  362. package/lib/cjs/components/phonenumber/fixtures/index.d.ts +0 -2
  363. package/lib/cjs/components/phonenumber/fixtures/values.d.ts +0 -2
  364. package/lib/cjs/components/radio/Radio.d.ts +0 -65
  365. package/lib/cjs/components/radio/Radio.form.d.ts +0 -3
  366. package/lib/cjs/components/radio/editForm/Radio.edit.data.d.ts +0 -134
  367. package/lib/cjs/components/radio/editForm/Radio.edit.display.d.ts +0 -40
  368. package/lib/cjs/components/radio/editForm/Radio.edit.validation.d.ts +0 -18
  369. package/lib/cjs/components/radio/fixtures/comp1.d.ts +0 -28
  370. package/lib/cjs/components/radio/fixtures/comp2.d.ts +0 -85
  371. package/lib/cjs/components/radio/fixtures/comp3.d.ts +0 -85
  372. package/lib/cjs/components/radio/fixtures/comp4.d.ts +0 -19
  373. package/lib/cjs/components/radio/fixtures/comp5.d.ts +0 -39
  374. package/lib/cjs/components/radio/fixtures/comp6.d.ts +0 -38
  375. package/lib/cjs/components/radio/fixtures/comp7.d.ts +0 -23
  376. package/lib/cjs/components/radio/fixtures/comp8.d.ts +0 -118
  377. package/lib/cjs/components/radio/fixtures/comp9.d.ts +0 -35
  378. package/lib/cjs/components/radio/fixtures/index.d.ts +0 -10
  379. package/lib/cjs/components/radio/fixtures/values.d.ts +0 -2
  380. package/lib/cjs/components/recaptcha/ReCaptcha.d.ts +0 -23
  381. package/lib/cjs/components/recaptcha/ReCaptcha.form.d.ts +0 -3
  382. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +0 -44
  383. package/lib/cjs/components/recaptcha/fixtures/comp1.d.ts +0 -8
  384. package/lib/cjs/components/recaptcha/fixtures/index.d.ts +0 -2
  385. package/lib/cjs/components/resource/Resource.d.ts +0 -10
  386. package/lib/cjs/components/resource/Resource.form.d.ts +0 -3
  387. package/lib/cjs/components/resource/editForm/Resource.edit.display.d.ts +0 -173
  388. package/lib/cjs/components/resource/fixtures/comp1.d.ts +0 -30
  389. package/lib/cjs/components/resource/fixtures/comp2.d.ts +0 -35
  390. package/lib/cjs/components/resource/fixtures/index.d.ts +0 -3
  391. package/lib/cjs/components/select/Select.d.ts +0 -145
  392. package/lib/cjs/components/select/Select.form.d.ts +0 -3
  393. package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +0 -1039
  394. package/lib/cjs/components/select/editForm/Select.edit.display.d.ts +0 -27
  395. package/lib/cjs/components/select/editForm/Select.edit.validation.d.ts +0 -30
  396. package/lib/cjs/components/select/fixtures/comp1.d.ts +0 -40
  397. package/lib/cjs/components/select/fixtures/comp10.d.ts +0 -41
  398. package/lib/cjs/components/select/fixtures/comp11.d.ts +0 -28
  399. package/lib/cjs/components/select/fixtures/comp12.d.ts +0 -53
  400. package/lib/cjs/components/select/fixtures/comp13.d.ts +0 -28
  401. package/lib/cjs/components/select/fixtures/comp14.d.ts +0 -40
  402. package/lib/cjs/components/select/fixtures/comp15.d.ts +0 -50
  403. package/lib/cjs/components/select/fixtures/comp16.d.ts +0 -34
  404. package/lib/cjs/components/select/fixtures/comp17.d.ts +0 -51
  405. package/lib/cjs/components/select/fixtures/comp18.d.ts +0 -49
  406. package/lib/cjs/components/select/fixtures/comp19.d.ts +0 -23
  407. package/lib/cjs/components/select/fixtures/comp2.d.ts +0 -41
  408. package/lib/cjs/components/select/fixtures/comp3.d.ts +0 -35
  409. package/lib/cjs/components/select/fixtures/comp4.d.ts +0 -103
  410. package/lib/cjs/components/select/fixtures/comp5.d.ts +0 -21
  411. package/lib/cjs/components/select/fixtures/comp6.d.ts +0 -20
  412. package/lib/cjs/components/select/fixtures/comp7.d.ts +0 -63
  413. package/lib/cjs/components/select/fixtures/comp8.d.ts +0 -72
  414. package/lib/cjs/components/select/fixtures/comp9.d.ts +0 -88
  415. package/lib/cjs/components/select/fixtures/index.d.ts +0 -20
  416. package/lib/cjs/components/select/fixtures/values.d.ts +0 -2
  417. package/lib/cjs/components/selectboxes/SelectBoxes.d.ts +0 -51
  418. package/lib/cjs/components/selectboxes/SelectBoxes.form.d.ts +0 -3
  419. package/lib/cjs/components/selectboxes/editForm/SelectBoxes.edit.validation.d.ts +0 -9
  420. package/lib/cjs/components/selectboxes/fixtures/comp1.d.ts +0 -24
  421. package/lib/cjs/components/selectboxes/fixtures/comp2.d.ts +0 -24
  422. package/lib/cjs/components/selectboxes/fixtures/comp3.d.ts +0 -23
  423. package/lib/cjs/components/selectboxes/fixtures/comp4.d.ts +0 -66
  424. package/lib/cjs/components/selectboxes/fixtures/comp5.d.ts +0 -37
  425. package/lib/cjs/components/selectboxes/fixtures/comp6.d.ts +0 -14
  426. package/lib/cjs/components/selectboxes/fixtures/comp7.d.ts +0 -18
  427. package/lib/cjs/components/selectboxes/fixtures/index.d.ts +0 -8
  428. package/lib/cjs/components/selectboxes/fixtures/values.d.ts +0 -6
  429. package/lib/cjs/components/signature/Signature.d.ts +0 -46
  430. package/lib/cjs/components/signature/Signature.form.d.ts +0 -3
  431. package/lib/cjs/components/signature/editForm/Signature.edit.data.d.ts +0 -5
  432. package/lib/cjs/components/signature/editForm/Signature.edit.display.d.ts +0 -51
  433. package/lib/cjs/components/signature/editForm/Signature.edit.validation.d.ts +0 -5
  434. package/lib/cjs/components/signature/fixtures/comp1.d.ts +0 -30
  435. package/lib/cjs/components/signature/fixtures/index.d.ts +0 -2
  436. package/lib/cjs/components/signature/fixtures/values.d.ts +0 -2
  437. package/lib/cjs/components/survey/Survey.d.ts +0 -37
  438. package/lib/cjs/components/survey/Survey.form.d.ts +0 -3
  439. package/lib/cjs/components/survey/editForm/Survey.edit.data.d.ts +0 -44
  440. package/lib/cjs/components/survey/editForm/Survey.edit.display.d.ts +0 -5
  441. package/lib/cjs/components/survey/editForm/Survey.edit.validation.d.ts +0 -5
  442. package/lib/cjs/components/survey/fixtures/comp1.d.ts +0 -31
  443. package/lib/cjs/components/survey/fixtures/comp2.d.ts +0 -31
  444. package/lib/cjs/components/survey/fixtures/index.d.ts +0 -3
  445. package/lib/cjs/components/survey/fixtures/values.d.ts +0 -5
  446. package/lib/cjs/components/table/Table.d.ts +0 -23
  447. package/lib/cjs/components/table/Table.form.d.ts +0 -3
  448. package/lib/cjs/components/table/editForm/Table.edit.display.d.ts +0 -84
  449. package/lib/cjs/components/table/fixtures/comp1.d.ts +0 -53
  450. package/lib/cjs/components/table/fixtures/index.d.ts +0 -2
  451. package/lib/cjs/components/tabs/Tabs.d.ts +0 -30
  452. package/lib/cjs/components/tabs/Tabs.form.d.ts +0 -3
  453. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.d.ts +0 -77
  454. package/lib/cjs/components/tabs/fixtures/comp1.d.ts +0 -23
  455. package/lib/cjs/components/tabs/fixtures/index.d.ts +0 -2
  456. package/lib/cjs/components/tags/Tags.d.ts +0 -41
  457. package/lib/cjs/components/tags/Tags.form.d.ts +0 -3
  458. package/lib/cjs/components/tags/editForm/Tags.edit.data.d.ts +0 -51
  459. package/lib/cjs/components/tags/fixtures/comp1.d.ts +0 -20
  460. package/lib/cjs/components/tags/fixtures/comp2.d.ts +0 -10
  461. package/lib/cjs/components/tags/fixtures/comp3.d.ts +0 -23
  462. package/lib/cjs/components/tags/fixtures/comp4.d.ts +0 -9
  463. package/lib/cjs/components/tags/fixtures/comp5.d.ts +0 -24
  464. package/lib/cjs/components/tags/fixtures/comp6.d.ts +0 -17
  465. package/lib/cjs/components/tags/fixtures/index.d.ts +0 -7
  466. package/lib/cjs/components/tags/fixtures/values.d.ts +0 -2
  467. package/lib/cjs/components/textarea/TextArea.d.ts +0 -37
  468. package/lib/cjs/components/textarea/TextArea.form.d.ts +0 -3
  469. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.d.ts +0 -355
  470. package/lib/cjs/components/textarea/editForm/TextArea.edit.validation.d.ts +0 -10
  471. package/lib/cjs/components/textarea/fixtures/comp1.d.ts +0 -31
  472. package/lib/cjs/components/textarea/fixtures/comp2.d.ts +0 -29
  473. package/lib/cjs/components/textarea/fixtures/comp3.d.ts +0 -27
  474. package/lib/cjs/components/textarea/fixtures/comp4.d.ts +0 -30
  475. package/lib/cjs/components/textarea/fixtures/index.d.ts +0 -5
  476. package/lib/cjs/components/textarea/fixtures/values.d.ts +0 -2
  477. package/lib/cjs/components/textfield/TextField.d.ts +0 -60
  478. package/lib/cjs/components/textfield/TextField.form.d.ts +0 -3
  479. package/lib/cjs/components/textfield/editForm/TextField.edit.data.d.ts +0 -46
  480. package/lib/cjs/components/textfield/editForm/TextField.edit.display.d.ts +0 -248
  481. package/lib/cjs/components/textfield/editForm/TextField.edit.validation.d.ts +0 -10
  482. package/lib/cjs/components/textfield/fixtures/comp-with-display-and-value-masks.d.ts +0 -47
  483. package/lib/cjs/components/textfield/fixtures/comp1.d.ts +0 -33
  484. package/lib/cjs/components/textfield/fixtures/comp2.d.ts +0 -33
  485. package/lib/cjs/components/textfield/fixtures/comp3.d.ts +0 -33
  486. package/lib/cjs/components/textfield/fixtures/comp4.d.ts +0 -23
  487. package/lib/cjs/components/textfield/fixtures/comp5.d.ts +0 -12
  488. package/lib/cjs/components/textfield/fixtures/comp6.d.ts +0 -25
  489. package/lib/cjs/components/textfield/fixtures/comp7.d.ts +0 -37
  490. package/lib/cjs/components/textfield/fixtures/index.d.ts +0 -9
  491. package/lib/cjs/components/textfield/fixtures/values.d.ts +0 -2
  492. package/lib/cjs/components/time/Time.d.ts +0 -27
  493. package/lib/cjs/components/time/Time.form.d.ts +0 -3
  494. package/lib/cjs/components/time/editForm/Time.edit.data.d.ts +0 -10
  495. package/lib/cjs/components/time/editForm/Time.edit.display.d.ts +0 -52
  496. package/lib/cjs/components/time/fixtures/comp1.d.ts +0 -24
  497. package/lib/cjs/components/time/fixtures/comp2.d.ts +0 -10
  498. package/lib/cjs/components/time/fixtures/comp3.d.ts +0 -15
  499. package/lib/cjs/components/time/fixtures/index.d.ts +0 -6
  500. package/lib/cjs/components/time/fixtures/timeForm.d.ts +0 -47
  501. package/lib/cjs/components/time/fixtures/timeForm2.d.ts +0 -38
  502. package/lib/cjs/components/time/fixtures/values.d.ts +0 -2
  503. package/lib/cjs/components/unknown/Unknown.d.ts +0 -28
  504. package/lib/cjs/components/unknown/Unknown.form.d.ts +0 -34
  505. package/lib/cjs/components/unknown/editForm/Unknown.edit.display.d.ts +0 -24
  506. package/lib/cjs/components/unknown/fixtures/comp1.d.ts +0 -7
  507. package/lib/cjs/components/unknown/fixtures/index.d.ts +0 -2
  508. package/lib/cjs/components/url/Url.d.ts +0 -3
  509. package/lib/cjs/components/url/Url.form.d.ts +0 -3
  510. package/lib/cjs/components/url/editForm/Url.edit.data.d.ts +0 -5
  511. package/lib/cjs/components/url/editForm/Url.edit.display.d.ts +0 -5
  512. package/lib/cjs/components/url/editForm/Url.edit.validation.d.ts +0 -5
  513. package/lib/cjs/components/url/fixtures/comp1.d.ts +0 -26
  514. package/lib/cjs/components/url/fixtures/comp2.d.ts +0 -26
  515. package/lib/cjs/components/url/fixtures/index.d.ts +0 -3
  516. package/lib/cjs/components/url/fixtures/values.d.ts +0 -2
  517. package/lib/cjs/components/well/Well.d.ts +0 -15
  518. package/lib/cjs/components/well/Well.form.d.ts +0 -3
  519. package/lib/cjs/components/well/editForm/Well.edit.display.d.ts +0 -28
  520. package/lib/cjs/components/well/fixtures/comp1.d.ts +0 -43
  521. package/lib/cjs/components/well/fixtures/index.d.ts +0 -2
  522. package/lib/cjs/displays/Displays.d.ts +0 -18
  523. package/lib/cjs/displays/index.d.ts +0 -2
  524. package/lib/cjs/formio.embed.d.ts +0 -2
  525. package/lib/cjs/formio.form.d.ts +0 -17
  526. package/lib/cjs/i18n.d.ts +0 -13
  527. package/lib/cjs/index.d.ts +0 -5
  528. package/lib/cjs/licenses/Licenses.d.ts +0 -7
  529. package/lib/cjs/licenses/index.d.ts +0 -2
  530. package/lib/cjs/pdf.image.d.ts +0 -2
  531. package/lib/cjs/providers/Providers.d.ts +0 -80
  532. package/lib/cjs/providers/address/AddressProvider.d.ts +0 -17
  533. package/lib/cjs/providers/address/AzureAddressProvider.d.ts +0 -12
  534. package/lib/cjs/providers/address/CustomAddressProvider.d.ts +0 -7
  535. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +0 -18
  536. package/lib/cjs/providers/address/NominatimAddressProvider.d.ts +0 -11
  537. package/lib/cjs/providers/address/index.d.ts +0 -6
  538. package/lib/cjs/providers/auth/index.d.ts +0 -2
  539. package/lib/cjs/providers/index.d.ts +0 -2
  540. package/lib/cjs/providers/processor/fileProcessor.d.ts +0 -2
  541. package/lib/cjs/providers/storage/azure.d.ts +0 -15
  542. package/lib/cjs/providers/storage/base64.d.ts +0 -10
  543. package/lib/cjs/providers/storage/dropbox.d.ts +0 -8
  544. package/lib/cjs/providers/storage/googleDrive.d.ts +0 -8
  545. package/lib/cjs/providers/storage/index.d.ts +0 -15
  546. package/lib/cjs/providers/storage/indexeddb.d.ts +0 -11
  547. package/lib/cjs/providers/storage/s3.d.ts +0 -17
  548. package/lib/cjs/providers/storage/uploadAdapter.d.ts +0 -1
  549. package/lib/cjs/providers/storage/url.d.ts +0 -11
  550. package/lib/cjs/providers/storage/xhr.d.ts +0 -7
  551. package/lib/cjs/templates/Templates.d.ts +0 -1
  552. package/lib/cjs/templates/index.d.ts +0 -229
  553. package/lib/cjs/translations/en.d.ts +0 -71
  554. package/lib/cjs/utils/ChoicesWrapper.d.ts +0 -38
  555. package/lib/cjs/utils/Evaluator.d.ts +0 -4
  556. package/lib/cjs/utils/builder.d.ts +0 -22
  557. package/lib/cjs/utils/calendarUtils.d.ts +0 -41
  558. package/lib/cjs/utils/conditionOperators/ConditionOperator.d.ts +0 -7
  559. package/lib/cjs/utils/conditionOperators/DateGreaterThan.d.ts +0 -13
  560. package/lib/cjs/utils/conditionOperators/DateGreaterThanOrEqual.d.ts +0 -4
  561. package/lib/cjs/utils/conditionOperators/DateLessThan.d.ts +0 -4
  562. package/lib/cjs/utils/conditionOperators/DateLessThanOrEqual.d.ts +0 -4
  563. package/lib/cjs/utils/conditionOperators/EndsWith.d.ts +0 -7
  564. package/lib/cjs/utils/conditionOperators/GreaterThan.d.ts +0 -7
  565. package/lib/cjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +0 -7
  566. package/lib/cjs/utils/conditionOperators/Includes.d.ts +0 -7
  567. package/lib/cjs/utils/conditionOperators/IsDateEqual.d.ts +0 -4
  568. package/lib/cjs/utils/conditionOperators/IsEmptyValue.d.ts +0 -9
  569. package/lib/cjs/utils/conditionOperators/IsEqualTo.d.ts +0 -7
  570. package/lib/cjs/utils/conditionOperators/IsNotDateEqual.d.ts +0 -4
  571. package/lib/cjs/utils/conditionOperators/IsNotEmptyValue.d.ts +0 -4
  572. package/lib/cjs/utils/conditionOperators/IsNotEqualTo.d.ts +0 -7
  573. package/lib/cjs/utils/conditionOperators/LessThan.d.ts +0 -7
  574. package/lib/cjs/utils/conditionOperators/LessThanOrEqual.d.ts +0 -7
  575. package/lib/cjs/utils/conditionOperators/NotIncludes.d.ts +0 -4
  576. package/lib/cjs/utils/conditionOperators/StartsWith.d.ts +0 -7
  577. package/lib/cjs/utils/conditionOperators/index.d.ts +0 -7
  578. package/lib/cjs/utils/formUtils.d.ts +0 -173
  579. package/lib/cjs/utils/i18n.d.ts +0 -16
  580. package/lib/cjs/utils/index.d.ts +0 -3
  581. package/lib/cjs/utils/jsonlogic/operators.d.ts +0 -1
  582. package/lib/cjs/utils/utils.d.ts +0 -375
  583. package/lib/cjs/widgets/CalendarWidget.d.ts +0 -97
  584. package/lib/cjs/widgets/InputWidget.d.ts +0 -24
  585. package/lib/cjs/widgets/index.d.ts +0 -7
  586. package/lib/mjs/CDN.d.ts +0 -29
  587. package/lib/mjs/Element.d.ts +0 -255
  588. package/lib/mjs/Embed.d.ts +0 -52
  589. package/lib/mjs/EventEmitter.d.ts +0 -7
  590. package/lib/mjs/Form.d.ts +0 -93
  591. package/lib/mjs/FormBuilder.d.ts +0 -6
  592. package/lib/mjs/Formio.d.ts +0 -1
  593. package/lib/mjs/PDF.d.ts +0 -40
  594. package/lib/mjs/PDFBuilder.d.ts +0 -55
  595. package/lib/mjs/Webform.d.ts +0 -402
  596. package/lib/mjs/WebformBuilder.d.ts +0 -126
  597. package/lib/mjs/Wizard.d.ts +0 -97
  598. package/lib/mjs/WizardBuilder.d.ts +0 -49
  599. package/lib/mjs/addons/FormioAddon.d.ts +0 -19
  600. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.d.ts +0 -716
  601. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.d.ts +0 -590
  602. package/lib/mjs/addons/index.d.ts +0 -626
  603. package/lib/mjs/builders/Builders.d.ts +0 -18
  604. package/lib/mjs/builders/index.d.ts +0 -2
  605. package/lib/mjs/components/Components.d.ts +0 -265
  606. package/lib/mjs/components/_classes/component/Component.d.ts +0 -828
  607. package/lib/mjs/components/_classes/component/Component.form.d.ts +0 -3
  608. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.d.ts +0 -653
  609. package/lib/mjs/components/_classes/component/editForm/Component.edit.api.d.ts +0 -42
  610. package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.d.ts +0 -113
  611. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +0 -219
  612. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.d.ts +0 -160
  613. package/lib/mjs/components/_classes/component/editForm/Component.edit.layout.d.ts +0 -44
  614. package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.d.ts +0 -368
  615. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.d.ts +0 -140
  616. package/lib/mjs/components/_classes/component/editForm/utils.d.ts +0 -83
  617. package/lib/mjs/components/_classes/component/fixtures/comp1.d.ts +0 -33
  618. package/lib/mjs/components/_classes/component/fixtures/comp2.d.ts +0 -33
  619. package/lib/mjs/components/_classes/component/fixtures/comp3.d.ts +0 -14
  620. package/lib/mjs/components/_classes/component/fixtures/comp4.d.ts +0 -17
  621. package/lib/mjs/components/_classes/component/fixtures/index.d.ts +0 -5
  622. package/lib/mjs/components/_classes/componentModal/ComponentModal.d.ts +0 -46
  623. package/lib/mjs/components/_classes/field/Field.d.ts +0 -5
  624. package/lib/mjs/components/_classes/input/Input.d.ts +0 -42
  625. package/lib/mjs/components/_classes/list/ListComponent.d.ts +0 -18
  626. package/lib/mjs/components/_classes/list/ListComponent.form.d.ts +0 -3
  627. package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.d.ts +0 -183
  628. package/lib/mjs/components/_classes/multivalue/Multivalue.d.ts +0 -29
  629. package/lib/mjs/components/_classes/nested/NestedComponent.d.ts +0 -150
  630. package/lib/mjs/components/_classes/nested/NestedComponent.form.d.ts +0 -3
  631. package/lib/mjs/components/_classes/nested/fixtures/comp1.d.ts +0 -8
  632. package/lib/mjs/components/_classes/nested/fixtures/comp2.d.ts +0 -236
  633. package/lib/mjs/components/_classes/nested/fixtures/comp3.d.ts +0 -26
  634. package/lib/mjs/components/_classes/nested/fixtures/index.d.ts +0 -3
  635. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.d.ts +0 -16
  636. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.d.ts +0 -12
  637. package/lib/mjs/components/address/Address.d.ts +0 -66
  638. package/lib/mjs/components/address/Address.form.d.ts +0 -3
  639. package/lib/mjs/components/address/editForm/Address.edit.data.d.ts +0 -31
  640. package/lib/mjs/components/address/editForm/Address.edit.display.d.ts +0 -49
  641. package/lib/mjs/components/address/editForm/Address.edit.provider.d.ts +0 -164
  642. package/lib/mjs/components/address/fixtures/comp1.d.ts +0 -34
  643. package/lib/mjs/components/address/fixtures/comp2.d.ts +0 -62
  644. package/lib/mjs/components/address/fixtures/comp3.d.ts +0 -44
  645. package/lib/mjs/components/address/fixtures/comp4.d.ts +0 -56
  646. package/lib/mjs/components/address/fixtures/index.d.ts +0 -5
  647. package/lib/mjs/components/address/fixtures/values.d.ts +0 -22
  648. package/lib/mjs/components/alert/Alert.d.ts +0 -30
  649. package/lib/mjs/components/builder.d.ts +0 -2
  650. package/lib/mjs/components/button/Button.d.ts +0 -45
  651. package/lib/mjs/components/button/Button.form.d.ts +0 -3
  652. package/lib/mjs/components/button/editForm/Button.edit.display.d.ts +0 -360
  653. package/lib/mjs/components/button/fixtures/comp1.d.ts +0 -15
  654. package/lib/mjs/components/button/fixtures/comp2.d.ts +0 -25
  655. package/lib/mjs/components/button/fixtures/comp3.d.ts +0 -113
  656. package/lib/mjs/components/button/fixtures/index.d.ts +0 -4
  657. package/lib/mjs/components/button/fixtures/values.d.ts +0 -2
  658. package/lib/mjs/components/checkbox/Checkbox.d.ts +0 -77
  659. package/lib/mjs/components/checkbox/Checkbox.form.d.ts +0 -3
  660. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.data.d.ts +0 -5
  661. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.d.ts +0 -75
  662. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.validation.d.ts +0 -5
  663. package/lib/mjs/components/checkbox/fixtures/comp1.d.ts +0 -24
  664. package/lib/mjs/components/checkbox/fixtures/comp2.d.ts +0 -12
  665. package/lib/mjs/components/checkbox/fixtures/comp3.d.ts +0 -15
  666. package/lib/mjs/components/checkbox/fixtures/comp4.d.ts +0 -46
  667. package/lib/mjs/components/checkbox/fixtures/customDefaultComponent.d.ts +0 -25
  668. package/lib/mjs/components/checkbox/fixtures/index.d.ts +0 -6
  669. package/lib/mjs/components/checkbox/fixtures/values.d.ts +0 -2
  670. package/lib/mjs/components/columns/Columns.d.ts +0 -28
  671. package/lib/mjs/components/columns/Columns.form.d.ts +0 -3
  672. package/lib/mjs/components/columns/editForm/Columns.edit.display.d.ts +0 -87
  673. package/lib/mjs/components/columns/fixtures/comp1.d.ts +0 -45
  674. package/lib/mjs/components/columns/fixtures/comp2.d.ts +0 -24
  675. package/lib/mjs/components/columns/fixtures/comp3.d.ts +0 -45
  676. package/lib/mjs/components/columns/fixtures/index.d.ts +0 -4
  677. package/lib/mjs/components/container/Container.d.ts +0 -16
  678. package/lib/mjs/components/container/Container.form.d.ts +0 -3
  679. package/lib/mjs/components/container/editForm/Container.edit.data.d.ts +0 -5
  680. package/lib/mjs/components/container/editForm/Container.edit.display.d.ts +0 -5
  681. package/lib/mjs/components/container/fixtures/comp1.d.ts +0 -49
  682. package/lib/mjs/components/container/fixtures/comp2.d.ts +0 -30
  683. package/lib/mjs/components/container/fixtures/comp3.d.ts +0 -77
  684. package/lib/mjs/components/container/fixtures/index.d.ts +0 -4
  685. package/lib/mjs/components/content/Content.d.ts +0 -18
  686. package/lib/mjs/components/content/Content.form.d.ts +0 -3
  687. package/lib/mjs/components/content/editForm/Content.edit.display.d.ts +0 -18
  688. package/lib/mjs/components/content/editForm/Content.edit.logic.d.ts +0 -48
  689. package/lib/mjs/components/content/fixtures/comp1.d.ts +0 -13
  690. package/lib/mjs/components/content/fixtures/index.d.ts +0 -2
  691. package/lib/mjs/components/currency/Currency.d.ts +0 -8
  692. package/lib/mjs/components/currency/Currency.form.d.ts +0 -3
  693. package/lib/mjs/components/currency/editForm/Currency.edit.data.d.ts +0 -29
  694. package/lib/mjs/components/currency/editForm/Currency.edit.display.d.ts +0 -18
  695. package/lib/mjs/components/currency/fixtures/comp1.d.ts +0 -31
  696. package/lib/mjs/components/currency/fixtures/comp2.d.ts +0 -20
  697. package/lib/mjs/components/currency/fixtures/comp3.d.ts +0 -13
  698. package/lib/mjs/components/currency/fixtures/comp4.d.ts +0 -17
  699. package/lib/mjs/components/currency/fixtures/index.d.ts +0 -5
  700. package/lib/mjs/components/currency/fixtures/values.d.ts +0 -2
  701. package/lib/mjs/components/datagrid/DataGrid.d.ts +0 -80
  702. package/lib/mjs/components/datagrid/DataGrid.form.d.ts +0 -3
  703. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.data.d.ts +0 -5
  704. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.display.d.ts +0 -283
  705. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.validation.d.ts +0 -20
  706. package/lib/mjs/components/datagrid/fixtures/comp-modal-with-required-fields.d.ts +0 -37
  707. package/lib/mjs/components/datagrid/fixtures/comp-on-blur-validation.d.ts +0 -0
  708. package/lib/mjs/components/datagrid/fixtures/comp-row-groups-with-def-value.d.ts +0 -63
  709. package/lib/mjs/components/datagrid/fixtures/comp-with-collapsible-groups.d.ts +0 -76
  710. package/lib/mjs/components/datagrid/fixtures/comp-with-conditional-components-and-validations.d.ts +0 -197
  711. package/lib/mjs/components/datagrid/fixtures/comp-with-def-value.d.ts +0 -61
  712. package/lib/mjs/components/datagrid/fixtures/comp-with-logic.d.ts +0 -165
  713. package/lib/mjs/components/datagrid/fixtures/comp1.d.ts +0 -93
  714. package/lib/mjs/components/datagrid/fixtures/comp2.d.ts +0 -18
  715. package/lib/mjs/components/datagrid/fixtures/comp3.d.ts +0 -14
  716. package/lib/mjs/components/datagrid/fixtures/comp4.d.ts +0 -27
  717. package/lib/mjs/components/datagrid/fixtures/comp5.d.ts +0 -67
  718. package/lib/mjs/components/datagrid/fixtures/comp6.d.ts +0 -567
  719. package/lib/mjs/components/datagrid/fixtures/comp7.d.ts +0 -28
  720. package/lib/mjs/components/datagrid/fixtures/comp8.d.ts +0 -35
  721. package/lib/mjs/components/datagrid/fixtures/index.d.ts +0 -15
  722. package/lib/mjs/components/datamap/DataMap.d.ts +0 -36
  723. package/lib/mjs/components/datamap/DataMap.form.d.ts +0 -3
  724. package/lib/mjs/components/datamap/editForm/DataMap.edit.data.d.ts +0 -5
  725. package/lib/mjs/components/datamap/editForm/DataMap.edit.display.d.ts +0 -30
  726. package/lib/mjs/components/datamap/fixtures/comp1.d.ts +0 -18
  727. package/lib/mjs/components/datamap/fixtures/formWithConditionalPanel.d.ts +0 -87
  728. package/lib/mjs/components/datamap/fixtures/index.d.ts +0 -3
  729. package/lib/mjs/components/datetime/DateTime.d.ts +0 -39
  730. package/lib/mjs/components/datetime/DateTime.form.d.ts +0 -3
  731. package/lib/mjs/components/datetime/editForm/DateTime.edit.data.d.ts +0 -24
  732. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.d.ts +0 -61
  733. package/lib/mjs/components/datetime/editForm/DateTime.edit.display.d.ts +0 -128
  734. package/lib/mjs/components/datetime/editForm/DateTime.edit.time.d.ts +0 -9
  735. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.d.ts +0 -40
  736. package/lib/mjs/components/datetime/fixtures/comp1.d.ts +0 -45
  737. package/lib/mjs/components/datetime/fixtures/comp10.d.ts +0 -102
  738. package/lib/mjs/components/datetime/fixtures/comp11.d.ts +0 -58
  739. package/lib/mjs/components/datetime/fixtures/comp12.d.ts +0 -57
  740. package/lib/mjs/components/datetime/fixtures/comp2.d.ts +0 -42
  741. package/lib/mjs/components/datetime/fixtures/comp3.d.ts +0 -51
  742. package/lib/mjs/components/datetime/fixtures/comp5.d.ts +0 -57
  743. package/lib/mjs/components/datetime/fixtures/comp6.d.ts +0 -55
  744. package/lib/mjs/components/datetime/fixtures/comp7.d.ts +0 -59
  745. package/lib/mjs/components/datetime/fixtures/comp8.d.ts +0 -59
  746. package/lib/mjs/components/datetime/fixtures/comp9.d.ts +0 -64
  747. package/lib/mjs/components/datetime/fixtures/index.d.ts +0 -12
  748. package/lib/mjs/components/datetime/fixtures/values.d.ts +0 -2
  749. package/lib/mjs/components/day/Day.d.ts +0 -163
  750. package/lib/mjs/components/day/Day.form.d.ts +0 -3
  751. package/lib/mjs/components/day/editForm/Day.edit.data.d.ts +0 -5
  752. package/lib/mjs/components/day/editForm/Day.edit.day.d.ts +0 -40
  753. package/lib/mjs/components/day/editForm/Day.edit.display.d.ts +0 -40
  754. package/lib/mjs/components/day/editForm/Day.edit.month.d.ts +0 -40
  755. package/lib/mjs/components/day/editForm/Day.edit.validation.d.ts +0 -29
  756. package/lib/mjs/components/day/editForm/Day.edit.year.d.ts +0 -40
  757. package/lib/mjs/components/day/fixtures/comp1.d.ts +0 -46
  758. package/lib/mjs/components/day/fixtures/comp2.d.ts +0 -46
  759. package/lib/mjs/components/day/fixtures/comp3.d.ts +0 -48
  760. package/lib/mjs/components/day/fixtures/comp4.d.ts +0 -53
  761. package/lib/mjs/components/day/fixtures/comp5.d.ts +0 -29
  762. package/lib/mjs/components/day/fixtures/comp6.d.ts +0 -81
  763. package/lib/mjs/components/day/fixtures/index.d.ts +0 -7
  764. package/lib/mjs/components/day/fixtures/values.d.ts +0 -2
  765. package/lib/mjs/components/editgrid/EditGrid.d.ts +0 -103
  766. package/lib/mjs/components/editgrid/EditGrid.form.d.ts +0 -3
  767. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.data.d.ts +0 -18
  768. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.d.ts +0 -82
  769. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.d.ts +0 -58
  770. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.validation.d.ts +0 -29
  771. package/lib/mjs/components/editgrid/fixtures/comp-openWhenEmpty.d.ts +0 -34
  772. package/lib/mjs/components/editgrid/fixtures/comp-with-basic-components.d.ts +0 -327
  773. package/lib/mjs/components/editgrid/fixtures/comp-with-conditions-and-openWhenEmpty.d.ts +0 -77
  774. package/lib/mjs/components/editgrid/fixtures/comp-with-custom-default-value.d.ts +0 -190
  775. package/lib/mjs/components/editgrid/fixtures/comp1.d.ts +0 -89
  776. package/lib/mjs/components/editgrid/fixtures/comp10.d.ts +0 -49
  777. package/lib/mjs/components/editgrid/fixtures/comp11.d.ts +0 -53
  778. package/lib/mjs/components/editgrid/fixtures/comp12.d.ts +0 -57
  779. package/lib/mjs/components/editgrid/fixtures/comp13.d.ts +0 -64
  780. package/lib/mjs/components/editgrid/fixtures/comp14.d.ts +0 -88
  781. package/lib/mjs/components/editgrid/fixtures/comp15.d.ts +0 -54
  782. package/lib/mjs/components/editgrid/fixtures/comp2.d.ts +0 -112
  783. package/lib/mjs/components/editgrid/fixtures/comp3.d.ts +0 -27
  784. package/lib/mjs/components/editgrid/fixtures/comp4.d.ts +0 -23
  785. package/lib/mjs/components/editgrid/fixtures/comp5.d.ts +0 -19
  786. package/lib/mjs/components/editgrid/fixtures/comp6.d.ts +0 -50
  787. package/lib/mjs/components/editgrid/fixtures/comp7.d.ts +0 -129
  788. package/lib/mjs/components/editgrid/fixtures/comp8.d.ts +0 -148
  789. package/lib/mjs/components/editgrid/fixtures/comp9.d.ts +0 -86
  790. package/lib/mjs/components/editgrid/fixtures/index.d.ts +0 -19
  791. package/lib/mjs/components/email/Email.d.ts +0 -4
  792. package/lib/mjs/components/email/Email.form.d.ts +0 -3
  793. package/lib/mjs/components/email/editForm/Email.edit.display.d.ts +0 -5
  794. package/lib/mjs/components/email/editForm/Email.edit.validation.d.ts +0 -24
  795. package/lib/mjs/components/email/fixtures/comp1.d.ts +0 -26
  796. package/lib/mjs/components/email/fixtures/comp2.d.ts +0 -23
  797. package/lib/mjs/components/email/fixtures/index.d.ts +0 -3
  798. package/lib/mjs/components/email/fixtures/values.d.ts +0 -2
  799. package/lib/mjs/components/fieldset/Fieldset.d.ts +0 -15
  800. package/lib/mjs/components/fieldset/Fieldset.form.d.ts +0 -3
  801. package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.d.ts +0 -33
  802. package/lib/mjs/components/fieldset/fixtures/comp1.d.ts +0 -46
  803. package/lib/mjs/components/fieldset/fixtures/index.d.ts +0 -2
  804. package/lib/mjs/components/file/File.d.ts +0 -81
  805. package/lib/mjs/components/file/File.form.d.ts +0 -3
  806. package/lib/mjs/components/file/editForm/File.edit.data.d.ts +0 -5
  807. package/lib/mjs/components/file/editForm/File.edit.display.d.ts +0 -5
  808. package/lib/mjs/components/file/editForm/File.edit.file.d.ts +0 -275
  809. package/lib/mjs/components/file/editForm/File.edit.validation.d.ts +0 -5
  810. package/lib/mjs/components/file/fixtures/comp1.d.ts +0 -15
  811. package/lib/mjs/components/file/fixtures/comp2.d.ts +0 -35
  812. package/lib/mjs/components/file/fixtures/comp3.d.ts +0 -29
  813. package/lib/mjs/components/file/fixtures/index.d.ts +0 -3
  814. package/lib/mjs/components/file/fixtures/values.d.ts +0 -10
  815. package/lib/mjs/components/form/Form.d.ts +0 -94
  816. package/lib/mjs/components/form/Form.form.d.ts +0 -3
  817. package/lib/mjs/components/form/editForm/Form.edit.data.d.ts +0 -82
  818. package/lib/mjs/components/form/editForm/Form.edit.display.d.ts +0 -5
  819. package/lib/mjs/components/form/editForm/Form.edit.form.d.ts +0 -89
  820. package/lib/mjs/components/form/fixtures/comp1.d.ts +0 -45
  821. package/lib/mjs/components/form/fixtures/comp2.d.ts +0 -14
  822. package/lib/mjs/components/form/fixtures/comp3.d.ts +0 -187
  823. package/lib/mjs/components/form/fixtures/comp4.d.ts +0 -107
  824. package/lib/mjs/components/form/fixtures/comp5.d.ts +0 -42
  825. package/lib/mjs/components/form/fixtures/comp6.d.ts +0 -74
  826. package/lib/mjs/components/form/fixtures/formModalEdit.d.ts +0 -42
  827. package/lib/mjs/components/form/fixtures/index.d.ts +0 -8
  828. package/lib/mjs/components/form/fixtures/values.d.ts +0 -6
  829. package/lib/mjs/components/hidden/Hidden.d.ts +0 -26
  830. package/lib/mjs/components/hidden/Hidden.form.d.ts +0 -3
  831. package/lib/mjs/components/hidden/editForm/Hidden.edit.data.d.ts +0 -5
  832. package/lib/mjs/components/hidden/editForm/Hidden.edit.display.d.ts +0 -5
  833. package/lib/mjs/components/hidden/fixtures/comp1.d.ts +0 -18
  834. package/lib/mjs/components/hidden/fixtures/index.d.ts +0 -2
  835. package/lib/mjs/components/hidden/fixtures/values.d.ts +0 -2
  836. package/lib/mjs/components/html/HTML.d.ts +0 -18
  837. package/lib/mjs/components/html/HTML.form.d.ts +0 -3
  838. package/lib/mjs/components/html/editForm/HTML.edit.display.d.ts +0 -77
  839. package/lib/mjs/components/html/editForm/HTML.edit.logic.d.ts +0 -48
  840. package/lib/mjs/components/html/fixtures/comp1.d.ts +0 -19
  841. package/lib/mjs/components/html/fixtures/comp2.d.ts +0 -21
  842. package/lib/mjs/components/html/fixtures/index.d.ts +0 -3
  843. package/lib/mjs/components/index.d.ts +0 -98
  844. package/lib/mjs/components/number/Number.d.ts +0 -53
  845. package/lib/mjs/components/number/Number.form.d.ts +0 -3
  846. package/lib/mjs/components/number/editForm/Number.edit.data.d.ts +0 -18
  847. package/lib/mjs/components/number/editForm/Number.edit.display.d.ts +0 -5
  848. package/lib/mjs/components/number/editForm/Number.edit.validation.d.ts +0 -20
  849. package/lib/mjs/components/number/fixtures/comp1.d.ts +0 -33
  850. package/lib/mjs/components/number/fixtures/comp2.d.ts +0 -32
  851. package/lib/mjs/components/number/fixtures/comp3.d.ts +0 -14
  852. package/lib/mjs/components/number/fixtures/comp4.d.ts +0 -14
  853. package/lib/mjs/components/number/fixtures/comp5.d.ts +0 -20
  854. package/lib/mjs/components/number/fixtures/comp6.d.ts +0 -40
  855. package/lib/mjs/components/number/fixtures/comp7.d.ts +0 -15
  856. package/lib/mjs/components/number/fixtures/index.d.ts +0 -8
  857. package/lib/mjs/components/number/fixtures/values.d.ts +0 -2
  858. package/lib/mjs/components/panel/Panel.d.ts +0 -14
  859. package/lib/mjs/components/panel/Panel.form.d.ts +0 -3
  860. package/lib/mjs/components/panel/editForm/Panel.edit.conditional.d.ts +0 -75
  861. package/lib/mjs/components/panel/editForm/Panel.edit.display.d.ts +0 -196
  862. package/lib/mjs/components/panel/fixtures/comp1.d.ts +0 -46
  863. package/lib/mjs/components/panel/fixtures/comp2.d.ts +0 -80
  864. package/lib/mjs/components/panel/fixtures/index.d.ts +0 -3
  865. package/lib/mjs/components/password/Password.d.ts +0 -3
  866. package/lib/mjs/components/password/Password.form.d.ts +0 -3
  867. package/lib/mjs/components/password/editForm/Password.edit.data.d.ts +0 -18
  868. package/lib/mjs/components/password/editForm/Password.edit.display.d.ts +0 -5
  869. package/lib/mjs/components/password/editForm/Password.edit.validation.d.ts +0 -5
  870. package/lib/mjs/components/password/fixtures/comp1.d.ts +0 -22
  871. package/lib/mjs/components/password/fixtures/comp2.d.ts +0 -27
  872. package/lib/mjs/components/password/fixtures/index.d.ts +0 -3
  873. package/lib/mjs/components/password/fixtures/values.d.ts +0 -2
  874. package/lib/mjs/components/phonenumber/PhoneNumber.d.ts +0 -3
  875. package/lib/mjs/components/phonenumber/PhoneNumber.form.d.ts +0 -3
  876. package/lib/mjs/components/phonenumber/editForm/PhoneNumber.edit.validation.d.ts +0 -5
  877. package/lib/mjs/components/phonenumber/fixtures/comp1.d.ts +0 -27
  878. package/lib/mjs/components/phonenumber/fixtures/index.d.ts +0 -2
  879. package/lib/mjs/components/phonenumber/fixtures/values.d.ts +0 -2
  880. package/lib/mjs/components/radio/Radio.d.ts +0 -65
  881. package/lib/mjs/components/radio/Radio.form.d.ts +0 -3
  882. package/lib/mjs/components/radio/editForm/Radio.edit.data.d.ts +0 -134
  883. package/lib/mjs/components/radio/editForm/Radio.edit.display.d.ts +0 -40
  884. package/lib/mjs/components/radio/editForm/Radio.edit.validation.d.ts +0 -18
  885. package/lib/mjs/components/radio/fixtures/comp1.d.ts +0 -28
  886. package/lib/mjs/components/radio/fixtures/comp2.d.ts +0 -85
  887. package/lib/mjs/components/radio/fixtures/comp3.d.ts +0 -85
  888. package/lib/mjs/components/radio/fixtures/comp4.d.ts +0 -19
  889. package/lib/mjs/components/radio/fixtures/comp5.d.ts +0 -39
  890. package/lib/mjs/components/radio/fixtures/comp6.d.ts +0 -38
  891. package/lib/mjs/components/radio/fixtures/comp7.d.ts +0 -23
  892. package/lib/mjs/components/radio/fixtures/comp8.d.ts +0 -118
  893. package/lib/mjs/components/radio/fixtures/comp9.d.ts +0 -35
  894. package/lib/mjs/components/radio/fixtures/index.d.ts +0 -10
  895. package/lib/mjs/components/radio/fixtures/values.d.ts +0 -2
  896. package/lib/mjs/components/recaptcha/ReCaptcha.d.ts +0 -23
  897. package/lib/mjs/components/recaptcha/ReCaptcha.form.d.ts +0 -3
  898. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.d.ts +0 -44
  899. package/lib/mjs/components/recaptcha/fixtures/comp1.d.ts +0 -8
  900. package/lib/mjs/components/recaptcha/fixtures/index.d.ts +0 -2
  901. package/lib/mjs/components/resource/Resource.d.ts +0 -10
  902. package/lib/mjs/components/resource/Resource.form.d.ts +0 -3
  903. package/lib/mjs/components/resource/editForm/Resource.edit.display.d.ts +0 -173
  904. package/lib/mjs/components/resource/fixtures/comp1.d.ts +0 -30
  905. package/lib/mjs/components/resource/fixtures/comp2.d.ts +0 -35
  906. package/lib/mjs/components/resource/fixtures/index.d.ts +0 -3
  907. package/lib/mjs/components/select/Select.d.ts +0 -145
  908. package/lib/mjs/components/select/Select.form.d.ts +0 -3
  909. package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +0 -1039
  910. package/lib/mjs/components/select/editForm/Select.edit.display.d.ts +0 -27
  911. package/lib/mjs/components/select/editForm/Select.edit.validation.d.ts +0 -30
  912. package/lib/mjs/components/select/fixtures/comp1.d.ts +0 -40
  913. package/lib/mjs/components/select/fixtures/comp10.d.ts +0 -41
  914. package/lib/mjs/components/select/fixtures/comp11.d.ts +0 -28
  915. package/lib/mjs/components/select/fixtures/comp12.d.ts +0 -53
  916. package/lib/mjs/components/select/fixtures/comp13.d.ts +0 -28
  917. package/lib/mjs/components/select/fixtures/comp14.d.ts +0 -40
  918. package/lib/mjs/components/select/fixtures/comp15.d.ts +0 -50
  919. package/lib/mjs/components/select/fixtures/comp16.d.ts +0 -34
  920. package/lib/mjs/components/select/fixtures/comp17.d.ts +0 -51
  921. package/lib/mjs/components/select/fixtures/comp18.d.ts +0 -49
  922. package/lib/mjs/components/select/fixtures/comp19.d.ts +0 -23
  923. package/lib/mjs/components/select/fixtures/comp2.d.ts +0 -41
  924. package/lib/mjs/components/select/fixtures/comp3.d.ts +0 -35
  925. package/lib/mjs/components/select/fixtures/comp4.d.ts +0 -103
  926. package/lib/mjs/components/select/fixtures/comp5.d.ts +0 -21
  927. package/lib/mjs/components/select/fixtures/comp6.d.ts +0 -20
  928. package/lib/mjs/components/select/fixtures/comp7.d.ts +0 -63
  929. package/lib/mjs/components/select/fixtures/comp8.d.ts +0 -72
  930. package/lib/mjs/components/select/fixtures/comp9.d.ts +0 -88
  931. package/lib/mjs/components/select/fixtures/index.d.ts +0 -20
  932. package/lib/mjs/components/select/fixtures/values.d.ts +0 -2
  933. package/lib/mjs/components/selectboxes/SelectBoxes.d.ts +0 -51
  934. package/lib/mjs/components/selectboxes/SelectBoxes.form.d.ts +0 -3
  935. package/lib/mjs/components/selectboxes/editForm/SelectBoxes.edit.validation.d.ts +0 -9
  936. package/lib/mjs/components/selectboxes/fixtures/comp1.d.ts +0 -24
  937. package/lib/mjs/components/selectboxes/fixtures/comp2.d.ts +0 -24
  938. package/lib/mjs/components/selectboxes/fixtures/comp3.d.ts +0 -23
  939. package/lib/mjs/components/selectboxes/fixtures/comp4.d.ts +0 -66
  940. package/lib/mjs/components/selectboxes/fixtures/comp5.d.ts +0 -37
  941. package/lib/mjs/components/selectboxes/fixtures/comp6.d.ts +0 -14
  942. package/lib/mjs/components/selectboxes/fixtures/comp7.d.ts +0 -18
  943. package/lib/mjs/components/selectboxes/fixtures/index.d.ts +0 -8
  944. package/lib/mjs/components/selectboxes/fixtures/values.d.ts +0 -6
  945. package/lib/mjs/components/signature/Signature.d.ts +0 -46
  946. package/lib/mjs/components/signature/Signature.form.d.ts +0 -3
  947. package/lib/mjs/components/signature/editForm/Signature.edit.data.d.ts +0 -5
  948. package/lib/mjs/components/signature/editForm/Signature.edit.display.d.ts +0 -51
  949. package/lib/mjs/components/signature/editForm/Signature.edit.validation.d.ts +0 -5
  950. package/lib/mjs/components/signature/fixtures/comp1.d.ts +0 -30
  951. package/lib/mjs/components/signature/fixtures/index.d.ts +0 -2
  952. package/lib/mjs/components/signature/fixtures/values.d.ts +0 -2
  953. package/lib/mjs/components/survey/Survey.d.ts +0 -37
  954. package/lib/mjs/components/survey/Survey.form.d.ts +0 -3
  955. package/lib/mjs/components/survey/editForm/Survey.edit.data.d.ts +0 -44
  956. package/lib/mjs/components/survey/editForm/Survey.edit.display.d.ts +0 -5
  957. package/lib/mjs/components/survey/editForm/Survey.edit.validation.d.ts +0 -5
  958. package/lib/mjs/components/survey/fixtures/comp1.d.ts +0 -31
  959. package/lib/mjs/components/survey/fixtures/comp2.d.ts +0 -31
  960. package/lib/mjs/components/survey/fixtures/index.d.ts +0 -3
  961. package/lib/mjs/components/survey/fixtures/values.d.ts +0 -5
  962. package/lib/mjs/components/table/Table.d.ts +0 -23
  963. package/lib/mjs/components/table/Table.form.d.ts +0 -3
  964. package/lib/mjs/components/table/editForm/Table.edit.display.d.ts +0 -84
  965. package/lib/mjs/components/table/fixtures/comp1.d.ts +0 -53
  966. package/lib/mjs/components/table/fixtures/index.d.ts +0 -2
  967. package/lib/mjs/components/tabs/Tabs.d.ts +0 -30
  968. package/lib/mjs/components/tabs/Tabs.form.d.ts +0 -3
  969. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.d.ts +0 -77
  970. package/lib/mjs/components/tabs/fixtures/comp1.d.ts +0 -23
  971. package/lib/mjs/components/tabs/fixtures/index.d.ts +0 -2
  972. package/lib/mjs/components/tags/Tags.d.ts +0 -41
  973. package/lib/mjs/components/tags/Tags.form.d.ts +0 -3
  974. package/lib/mjs/components/tags/editForm/Tags.edit.data.d.ts +0 -51
  975. package/lib/mjs/components/tags/fixtures/comp1.d.ts +0 -20
  976. package/lib/mjs/components/tags/fixtures/comp2.d.ts +0 -10
  977. package/lib/mjs/components/tags/fixtures/comp3.d.ts +0 -23
  978. package/lib/mjs/components/tags/fixtures/comp4.d.ts +0 -9
  979. package/lib/mjs/components/tags/fixtures/comp5.d.ts +0 -24
  980. package/lib/mjs/components/tags/fixtures/comp6.d.ts +0 -17
  981. package/lib/mjs/components/tags/fixtures/index.d.ts +0 -7
  982. package/lib/mjs/components/tags/fixtures/values.d.ts +0 -2
  983. package/lib/mjs/components/textarea/TextArea.d.ts +0 -37
  984. package/lib/mjs/components/textarea/TextArea.form.d.ts +0 -3
  985. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.d.ts +0 -355
  986. package/lib/mjs/components/textarea/editForm/TextArea.edit.validation.d.ts +0 -10
  987. package/lib/mjs/components/textarea/fixtures/comp1.d.ts +0 -31
  988. package/lib/mjs/components/textarea/fixtures/comp2.d.ts +0 -29
  989. package/lib/mjs/components/textarea/fixtures/comp3.d.ts +0 -27
  990. package/lib/mjs/components/textarea/fixtures/comp4.d.ts +0 -30
  991. package/lib/mjs/components/textarea/fixtures/index.d.ts +0 -5
  992. package/lib/mjs/components/textarea/fixtures/values.d.ts +0 -2
  993. package/lib/mjs/components/textfield/TextField.d.ts +0 -60
  994. package/lib/mjs/components/textfield/TextField.form.d.ts +0 -3
  995. package/lib/mjs/components/textfield/editForm/TextField.edit.data.d.ts +0 -46
  996. package/lib/mjs/components/textfield/editForm/TextField.edit.display.d.ts +0 -248
  997. package/lib/mjs/components/textfield/editForm/TextField.edit.validation.d.ts +0 -10
  998. package/lib/mjs/components/textfield/fixtures/comp-with-display-and-value-masks.d.ts +0 -47
  999. package/lib/mjs/components/textfield/fixtures/comp1.d.ts +0 -33
  1000. package/lib/mjs/components/textfield/fixtures/comp2.d.ts +0 -33
  1001. package/lib/mjs/components/textfield/fixtures/comp3.d.ts +0 -33
  1002. package/lib/mjs/components/textfield/fixtures/comp4.d.ts +0 -23
  1003. package/lib/mjs/components/textfield/fixtures/comp5.d.ts +0 -12
  1004. package/lib/mjs/components/textfield/fixtures/comp6.d.ts +0 -25
  1005. package/lib/mjs/components/textfield/fixtures/comp7.d.ts +0 -37
  1006. package/lib/mjs/components/textfield/fixtures/index.d.ts +0 -9
  1007. package/lib/mjs/components/textfield/fixtures/values.d.ts +0 -2
  1008. package/lib/mjs/components/time/Time.d.ts +0 -27
  1009. package/lib/mjs/components/time/Time.form.d.ts +0 -3
  1010. package/lib/mjs/components/time/editForm/Time.edit.data.d.ts +0 -10
  1011. package/lib/mjs/components/time/editForm/Time.edit.display.d.ts +0 -52
  1012. package/lib/mjs/components/time/fixtures/comp1.d.ts +0 -24
  1013. package/lib/mjs/components/time/fixtures/comp2.d.ts +0 -10
  1014. package/lib/mjs/components/time/fixtures/comp3.d.ts +0 -15
  1015. package/lib/mjs/components/time/fixtures/index.d.ts +0 -6
  1016. package/lib/mjs/components/time/fixtures/timeForm.d.ts +0 -47
  1017. package/lib/mjs/components/time/fixtures/timeForm2.d.ts +0 -38
  1018. package/lib/mjs/components/time/fixtures/values.d.ts +0 -2
  1019. package/lib/mjs/components/unknown/Unknown.d.ts +0 -28
  1020. package/lib/mjs/components/unknown/Unknown.form.d.ts +0 -34
  1021. package/lib/mjs/components/unknown/editForm/Unknown.edit.display.d.ts +0 -24
  1022. package/lib/mjs/components/unknown/fixtures/comp1.d.ts +0 -7
  1023. package/lib/mjs/components/unknown/fixtures/index.d.ts +0 -2
  1024. package/lib/mjs/components/url/Url.d.ts +0 -3
  1025. package/lib/mjs/components/url/Url.form.d.ts +0 -3
  1026. package/lib/mjs/components/url/editForm/Url.edit.data.d.ts +0 -5
  1027. package/lib/mjs/components/url/editForm/Url.edit.display.d.ts +0 -5
  1028. package/lib/mjs/components/url/editForm/Url.edit.validation.d.ts +0 -5
  1029. package/lib/mjs/components/url/fixtures/comp1.d.ts +0 -26
  1030. package/lib/mjs/components/url/fixtures/comp2.d.ts +0 -26
  1031. package/lib/mjs/components/url/fixtures/index.d.ts +0 -3
  1032. package/lib/mjs/components/url/fixtures/values.d.ts +0 -2
  1033. package/lib/mjs/components/well/Well.d.ts +0 -15
  1034. package/lib/mjs/components/well/Well.form.d.ts +0 -3
  1035. package/lib/mjs/components/well/editForm/Well.edit.display.d.ts +0 -28
  1036. package/lib/mjs/components/well/fixtures/comp1.d.ts +0 -43
  1037. package/lib/mjs/components/well/fixtures/index.d.ts +0 -2
  1038. package/lib/mjs/displays/Displays.d.ts +0 -18
  1039. package/lib/mjs/displays/index.d.ts +0 -2
  1040. package/lib/mjs/formio.embed.d.ts +0 -2
  1041. package/lib/mjs/formio.form.d.ts +0 -17
  1042. package/lib/mjs/i18n.d.ts +0 -13
  1043. package/lib/mjs/index.d.ts +0 -5
  1044. package/lib/mjs/licenses/Licenses.d.ts +0 -7
  1045. package/lib/mjs/licenses/index.d.ts +0 -2
  1046. package/lib/mjs/pdf.image.d.ts +0 -2
  1047. package/lib/mjs/providers/Providers.d.ts +0 -80
  1048. package/lib/mjs/providers/address/AddressProvider.d.ts +0 -17
  1049. package/lib/mjs/providers/address/AzureAddressProvider.d.ts +0 -12
  1050. package/lib/mjs/providers/address/CustomAddressProvider.d.ts +0 -7
  1051. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +0 -18
  1052. package/lib/mjs/providers/address/NominatimAddressProvider.d.ts +0 -11
  1053. package/lib/mjs/providers/address/index.d.ts +0 -6
  1054. package/lib/mjs/providers/auth/index.d.ts +0 -2
  1055. package/lib/mjs/providers/index.d.ts +0 -2
  1056. package/lib/mjs/providers/processor/fileProcessor.d.ts +0 -2
  1057. package/lib/mjs/providers/storage/azure.d.ts +0 -15
  1058. package/lib/mjs/providers/storage/base64.d.ts +0 -10
  1059. package/lib/mjs/providers/storage/dropbox.d.ts +0 -8
  1060. package/lib/mjs/providers/storage/googleDrive.d.ts +0 -8
  1061. package/lib/mjs/providers/storage/index.d.ts +0 -15
  1062. package/lib/mjs/providers/storage/indexeddb.d.ts +0 -11
  1063. package/lib/mjs/providers/storage/s3.d.ts +0 -17
  1064. package/lib/mjs/providers/storage/uploadAdapter.d.ts +0 -1
  1065. package/lib/mjs/providers/storage/url.d.ts +0 -11
  1066. package/lib/mjs/providers/storage/xhr.d.ts +0 -7
  1067. package/lib/mjs/templates/Templates.d.ts +0 -1
  1068. package/lib/mjs/templates/index.d.ts +0 -229
  1069. package/lib/mjs/translations/en.d.ts +0 -71
  1070. package/lib/mjs/utils/ChoicesWrapper.d.ts +0 -38
  1071. package/lib/mjs/utils/Evaluator.d.ts +0 -4
  1072. package/lib/mjs/utils/builder.d.ts +0 -22
  1073. package/lib/mjs/utils/calendarUtils.d.ts +0 -41
  1074. package/lib/mjs/utils/conditionOperators/ConditionOperator.d.ts +0 -7
  1075. package/lib/mjs/utils/conditionOperators/DateGreaterThan.d.ts +0 -13
  1076. package/lib/mjs/utils/conditionOperators/DateGreaterThanOrEqual.d.ts +0 -4
  1077. package/lib/mjs/utils/conditionOperators/DateLessThan.d.ts +0 -4
  1078. package/lib/mjs/utils/conditionOperators/DateLessThanOrEqual.d.ts +0 -4
  1079. package/lib/mjs/utils/conditionOperators/EndsWith.d.ts +0 -7
  1080. package/lib/mjs/utils/conditionOperators/GreaterThan.d.ts +0 -7
  1081. package/lib/mjs/utils/conditionOperators/GreaterThanOrEqual.d.ts +0 -7
  1082. package/lib/mjs/utils/conditionOperators/Includes.d.ts +0 -7
  1083. package/lib/mjs/utils/conditionOperators/IsDateEqual.d.ts +0 -4
  1084. package/lib/mjs/utils/conditionOperators/IsEmptyValue.d.ts +0 -9
  1085. package/lib/mjs/utils/conditionOperators/IsEqualTo.d.ts +0 -7
  1086. package/lib/mjs/utils/conditionOperators/IsNotDateEqual.d.ts +0 -4
  1087. package/lib/mjs/utils/conditionOperators/IsNotEmptyValue.d.ts +0 -4
  1088. package/lib/mjs/utils/conditionOperators/IsNotEqualTo.d.ts +0 -7
  1089. package/lib/mjs/utils/conditionOperators/LessThan.d.ts +0 -7
  1090. package/lib/mjs/utils/conditionOperators/LessThanOrEqual.d.ts +0 -7
  1091. package/lib/mjs/utils/conditionOperators/NotIncludes.d.ts +0 -4
  1092. package/lib/mjs/utils/conditionOperators/StartsWith.d.ts +0 -7
  1093. package/lib/mjs/utils/conditionOperators/index.d.ts +0 -7
  1094. package/lib/mjs/utils/formUtils.d.ts +0 -173
  1095. package/lib/mjs/utils/i18n.d.ts +0 -16
  1096. package/lib/mjs/utils/index.d.ts +0 -3
  1097. package/lib/mjs/utils/jsonlogic/operators.d.ts +0 -1
  1098. package/lib/mjs/utils/utils.d.ts +0 -375
  1099. package/lib/mjs/widgets/CalendarWidget.d.ts +0 -97
  1100. package/lib/mjs/widgets/InputWidget.d.ts +0 -24
  1101. package/lib/mjs/widgets/index.d.ts +0 -7
@@ -37,7 +37,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
37
37
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
38
38
 
39
39
  "use strict";
40
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Evaluator = exports.BaseEvaluator = void 0;\nconst _ = __importStar(__webpack_require__(/*! @formio/lodash */ \"../core/node_modules/@formio/lodash/lib/index.js\"));\n// BaseEvaluator is for extending.\nclass BaseEvaluator {\n static evaluator(func, ...params) {\n if (Evaluator.noeval) {\n console.warn('No evaluations allowed for this renderer.');\n return _.noop;\n }\n if (typeof func === 'function') {\n return func;\n }\n if (typeof params[0] === 'object') {\n params = _.keys(params[0]);\n }\n return new Function(...params, func);\n }\n ;\n static interpolateString(rawTemplate, data, options = {}) {\n return rawTemplate.replace(/({{\\s*(.*?)\\s*}})/g, (match, $1, $2) => {\n // If this is a function call and we allow evals.\n if ($2.indexOf('(') !== -1) {\n return $2.replace(/([^\\(]+)\\(([^\\)]+)\\s*\\);?/, (evalMatch, funcName, args) => {\n funcName = _.trim(funcName);\n const func = _.get(data, funcName);\n if (func) {\n if (args) {\n args = args.split(',').map((arg) => {\n arg = _.trim(arg);\n if ((arg.indexOf('\"') === 0) || (arg.indexOf(\"'\") === 0)) {\n return arg.substring(1, arg.length - 1);\n }\n return _.get(data, arg);\n });\n }\n return Evaluator.evaluate(func, args, '', false, data, options);\n }\n return '';\n });\n }\n else {\n let dataPath = $2;\n if ($2.indexOf('?') !== -1) {\n dataPath = $2.replace(/\\?\\./g, '.');\n }\n // Allow for conditional values.\n const parts = dataPath.split('||').map((item) => item.trim());\n let value = '';\n let path = '';\n for (let i = 0; i < parts.length; i++) {\n path = parts[i];\n value = _.get(data, path);\n if (value) {\n break;\n }\n }\n if (options.data) {\n _.set(options.data, path, value);\n }\n return value;\n }\n });\n }\n static interpolate(rawTemplate, data, options = {}) {\n if (typeof rawTemplate === 'function') {\n try {\n return rawTemplate(data);\n }\n catch (err) {\n console.warn('Error interpolating template', err, data);\n return err.message;\n }\n }\n return Evaluator.interpolateString(String(rawTemplate), data, options);\n }\n ;\n /**\n * Evaluate a method.\n *\n * @param func\n * @param args\n * @return {*}\n */\n static evaluate(func, args = {}, ret = '', interpolate = false, context = {}, options = {}) {\n let returnVal = null;\n options = _.isObject(options) ? options : { noeval: options };\n const component = args.component ? args.component : { key: 'unknown' };\n if (!args.form && args.instance) {\n args.form = _.get(args.instance, 'root._form', {});\n }\n const componentKey = component.key;\n if (typeof func === 'string') {\n if (ret) {\n func += `;return ${ret}`;\n }\n if (interpolate) {\n func = BaseEvaluator.interpolate(func, args, options);\n }\n try {\n if (Evaluator.noeval || options.noeval) {\n func = _.noop;\n }\n else {\n func = Evaluator.evaluator(func, args, context);\n }\n args = _.values(args);\n }\n catch (err) {\n console.warn(`An error occured within the custom function for ${componentKey}`, err);\n returnVal = null;\n func = false;\n }\n }\n if (typeof func === 'function') {\n try {\n returnVal = Evaluator.execute(func, args, context, options);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (func) {\n console.warn(`Unknown function type for ${componentKey}`);\n }\n return returnVal;\n }\n /**\n * Execute a function.\n *\n * @param func\n * @param args\n * @returns\n */\n static execute(func, args, context = {}, options = {}) {\n options = _.isObject(options) ? options : { noeval: options };\n if (Evaluator.noeval || options.noeval) {\n console.warn('No evaluations allowed for this renderer.');\n return;\n }\n return Array.isArray(args) ? func.apply(context, args) : func.call(context, args);\n }\n ;\n}\nexports.BaseEvaluator = BaseEvaluator;\nBaseEvaluator.templateSettings = {\n interpolate: /{{([\\s\\S]+?)}}/g,\n evaluate: /\\{%([\\s\\S]+?)%\\}/g,\n escape: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g\n};\nBaseEvaluator.noeval = false;\n// The extendable evaluator\nclass Evaluator extends BaseEvaluator {\n /**\n * Allow external modules the ability to extend the Evaluator.\n * @param evaluator\n */\n static registerEvaluator(evaluator) {\n Object.keys(evaluator).forEach((key) => {\n Evaluator[key] = evaluator[key];\n });\n }\n}\nexports.Evaluator = Evaluator;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/Evaluator.js?");
40
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.Evaluator = exports.BaseEvaluator = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../core/node_modules/lodash/lodash.js\");\n// BaseEvaluator is for extending.\nclass BaseEvaluator {\n static evaluator(func, ...params) {\n if (Evaluator.noeval) {\n console.warn('No evaluations allowed for this renderer.');\n return lodash_1.noop;\n }\n if (typeof func === 'function') {\n return func;\n }\n if (typeof params[0] === 'object') {\n params = (0, lodash_1.keys)(params[0]);\n }\n return new Function(...params, func);\n }\n ;\n static interpolateString(rawTemplate, data, options = {}) {\n return rawTemplate.replace(/({{\\s*(.*?)\\s*}})/g, (match, $1, $2) => {\n // If this is a function call and we allow evals.\n if ($2.indexOf('(') !== -1) {\n return $2.replace(/([^\\(]+)\\(([^\\)]+)\\s*\\);?/, (evalMatch, funcName, args) => {\n funcName = (0, lodash_1.trim)(funcName);\n const func = (0, lodash_1.get)(data, funcName);\n if (func) {\n if (args) {\n args = args.split(',').map((arg) => {\n arg = (0, lodash_1.trim)(arg);\n if ((arg.indexOf('\"') === 0) || (arg.indexOf(\"'\") === 0)) {\n return arg.substring(1, arg.length - 1);\n }\n return (0, lodash_1.get)(data, arg);\n });\n }\n return Evaluator.evaluate(func, args, '', false, data, options);\n }\n return '';\n });\n }\n else {\n let dataPath = $2;\n if ($2.indexOf('?') !== -1) {\n dataPath = $2.replace(/\\?\\./g, '.');\n }\n // Allow for conditional values.\n const parts = dataPath.split('||').map((item) => item.trim());\n let value = '';\n let path = '';\n for (let i = 0; i < parts.length; i++) {\n path = parts[i];\n value = (0, lodash_1.get)(data, path);\n if (value) {\n break;\n }\n }\n if (options.data) {\n (0, lodash_1.set)(options.data, path, value);\n }\n return value;\n }\n });\n }\n static interpolate(rawTemplate, data, options = {}) {\n if (typeof rawTemplate === 'function') {\n try {\n return rawTemplate(data);\n }\n catch (err) {\n console.warn('Error interpolating template', err, data);\n return err.message;\n }\n }\n return Evaluator.interpolateString(String(rawTemplate), data, options);\n }\n ;\n /**\n * Evaluate a method.\n *\n * @param func\n * @param args\n * @return {*}\n */\n static evaluate(func, args = {}, ret = '', interpolate = false, context = {}, options = {}) {\n let returnVal = null;\n options = (0, lodash_1.isObject)(options) ? options : { noeval: options };\n const component = args.component ? args.component : { key: 'unknown' };\n if (!args.form && args.instance) {\n args.form = (0, lodash_1.get)(args.instance, 'root._form', {});\n }\n const componentKey = component.key;\n if (typeof func === 'string') {\n if (ret) {\n func += `;return ${ret}`;\n }\n if (interpolate) {\n func = BaseEvaluator.interpolate(func, args, options);\n }\n try {\n if (Evaluator.noeval || options.noeval) {\n func = lodash_1.noop;\n }\n else {\n func = Evaluator.evaluator(func, args, context);\n }\n args = (0, lodash_1.values)(args);\n }\n catch (err) {\n console.warn(`An error occured within the custom function for ${componentKey}`, err);\n returnVal = null;\n func = false;\n }\n }\n if (typeof func === 'function') {\n try {\n returnVal = Evaluator.execute(func, args, context, options);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (func) {\n console.warn(`Unknown function type for ${componentKey}`);\n }\n return returnVal;\n }\n /**\n * Execute a function.\n *\n * @param func\n * @param args\n * @returns\n */\n static execute(func, args, context = {}, options = {}) {\n options = (0, lodash_1.isObject)(options) ? options : { noeval: options };\n if (Evaluator.noeval || options.noeval) {\n console.warn('No evaluations allowed for this renderer.');\n return;\n }\n return Array.isArray(args) ? func.apply(context, args) : func.call(context, args);\n }\n ;\n}\nexports.BaseEvaluator = BaseEvaluator;\nBaseEvaluator.templateSettings = {\n interpolate: /{{([\\s\\S]+?)}}/g,\n evaluate: /\\{%([\\s\\S]+?)%\\}/g,\n escape: /\\{\\{\\{([\\s\\S]+?)\\}\\}\\}/g\n};\nBaseEvaluator.noeval = false;\n// The extendable evaluator\nclass Evaluator extends BaseEvaluator {\n /**\n * Allow external modules the ability to extend the Evaluator.\n * @param evaluator\n */\n static registerEvaluator(evaluator) {\n Object.keys(evaluator).forEach((key) => {\n Evaluator[key] = evaluator[key];\n });\n }\n}\nexports.Evaluator = Evaluator;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/Evaluator.js?");
41
41
 
42
42
  /***/ }),
43
43
 
@@ -48,7 +48,7 @@ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ?
48
48
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
49
49
 
50
50
  "use strict";
51
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.dayjs = exports.isPartialDay = exports.getDateValidationFormat = exports.getDateSetting = exports.formatDate = exports.momentDate = exports.convertFormatToMoment = exports.currentTimezone = void 0;\nconst dayjs_1 = __importDefault(__webpack_require__(/*! dayjs */ \"../core/node_modules/dayjs/dayjs.min.js\"));\nexports.dayjs = dayjs_1.default;\nconst timezone_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/timezone */ \"../core/node_modules/dayjs/plugin/timezone.js\"));\nconst utc_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/utc */ \"../core/node_modules/dayjs/plugin/utc.js\"));\nconst customParseFormat_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/customParseFormat */ \"../core/node_modules/dayjs/plugin/customParseFormat.js\"));\nconst lodash_1 = __webpack_require__(/*! @formio/lodash */ \"../core/node_modules/@formio/lodash/lib/index.js\");\nconst Evaluator_1 = __webpack_require__(/*! ./Evaluator */ \"../core/lib/utils/Evaluator.js\");\ndayjs_1.default.extend(utc_1.default);\ndayjs_1.default.extend(timezone_1.default);\ndayjs_1.default.extend(customParseFormat_1.default);\n/**\n * Get the current timezone string.\n *\n * @return {string}\n */\nfunction currentTimezone() {\n return dayjs_1.default.tz.guess();\n}\nexports.currentTimezone = currentTimezone;\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToMoment(format) {\n return format\n // Year conversion.\n .replace(/y/g, 'Y')\n // Day in month.\n .replace(/d/g, 'D')\n // Day in week.\n .replace(/E/g, 'd')\n // AM/PM marker\n .replace(/a/g, 'A')\n // Unix Timestamp\n .replace(/U/g, 'X');\n}\nexports.convertFormatToMoment = convertFormatToMoment;\n/**\n * Get the moment date object for translating dates with timezones.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {*}\n */\nfunction momentDate(value, format, timezone) {\n const momentDate = (0, dayjs_1.default)(value);\n if (timezone === 'UTC') {\n return dayjs_1.default.utc();\n }\n if (timezone !== currentTimezone() || (format && format.match(/\\s(z$|z\\s)/))) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\nexports.momentDate = momentDate;\n/**\n * Format a date provided a value, format, and timezone object.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatDate(value, format, timezone) {\n const momentDate = (0, dayjs_1.default)(value);\n if (timezone === 'UTC') {\n return `${dayjs_1.default.utc().format(convertFormatToMoment(format))} UTC`;\n }\n if (timezone) {\n return momentDate.tz(timezone).format(`${convertFormatToMoment(format)} z`);\n }\n return momentDate.format(convertFormatToMoment(format));\n}\nexports.formatDate = formatDate;\n/**\n * Return a translated date setting.\n *\n * @param date\n * @return {(null|Date)}\n */\nfunction getDateSetting(date) {\n if ((0, lodash_1.isNil)(date) || (0, lodash_1.isNaN)(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n }\n else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n let dateSetting = ((typeof date !== 'string') || (date.indexOf('moment(') === -1)) ? (0, dayjs_1.default)(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n const value = Evaluator_1.Evaluator.evaluator(`return ${date};`, 'moment')(dayjs_1.default);\n if (typeof value === 'string') {\n dateSetting = (0, dayjs_1.default)(value);\n }\n else if (typeof value.toDate === 'function') {\n dateSetting = (0, dayjs_1.default)(value.toDate().toUTCString());\n }\n else if (value instanceof Date) {\n dateSetting = (0, dayjs_1.default)(value);\n }\n }\n catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nexports.getDateSetting = getDateSetting;\nconst getDateValidationFormat = (component) => {\n return component.dayFirst ? 'DD-MM-YYYY' : 'MM-DD-YYYY';\n};\nexports.getDateValidationFormat = getDateValidationFormat;\nconst isPartialDay = (component, value) => {\n if (!value) {\n return false;\n }\n const [DAY, MONTH, YEAR] = component.dayFirst ? [0, 1, 2] : [1, 0, 2];\n const values = value.split('/');\n return values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000';\n};\nexports.isPartialDay = isPartialDay;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/date.js?");
51
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.dayjs = exports.isPartialDay = exports.getDateValidationFormat = exports.getDateSetting = exports.formatDate = exports.momentDate = exports.convertFormatToMoment = exports.currentTimezone = void 0;\nconst dayjs_1 = __importDefault(__webpack_require__(/*! dayjs */ \"../core/node_modules/dayjs/dayjs.min.js\"));\nexports.dayjs = dayjs_1.default;\nconst timezone_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/timezone */ \"../core/node_modules/dayjs/plugin/timezone.js\"));\nconst utc_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/utc */ \"../core/node_modules/dayjs/plugin/utc.js\"));\nconst customParseFormat_1 = __importDefault(__webpack_require__(/*! dayjs/plugin/customParseFormat */ \"../core/node_modules/dayjs/plugin/customParseFormat.js\"));\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../core/node_modules/lodash/lodash.js\");\nconst Evaluator_1 = __webpack_require__(/*! ./Evaluator */ \"../core/lib/utils/Evaluator.js\");\ndayjs_1.default.extend(utc_1.default);\ndayjs_1.default.extend(timezone_1.default);\ndayjs_1.default.extend(customParseFormat_1.default);\n/**\n * Get the current timezone string.\n *\n * @return {string}\n */\nfunction currentTimezone() {\n return dayjs_1.default.tz.guess();\n}\nexports.currentTimezone = currentTimezone;\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToMoment(format) {\n return format\n // Year conversion.\n .replace(/y/g, 'Y')\n // Day in month.\n .replace(/d/g, 'D')\n // Day in week.\n .replace(/E/g, 'd')\n // AM/PM marker\n .replace(/a/g, 'A')\n // Unix Timestamp\n .replace(/U/g, 'X');\n}\nexports.convertFormatToMoment = convertFormatToMoment;\n/**\n * Get the moment date object for translating dates with timezones.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {*}\n */\nfunction momentDate(value, format, timezone) {\n const momentDate = (0, dayjs_1.default)(value);\n if (timezone === 'UTC') {\n return dayjs_1.default.utc();\n }\n if (timezone !== currentTimezone() || (format && format.match(/\\s(z$|z\\s)/))) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\nexports.momentDate = momentDate;\n/**\n * Format a date provided a value, format, and timezone object.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatDate(value, format, timezone) {\n const momentDate = (0, dayjs_1.default)(value);\n if (timezone === 'UTC') {\n return `${dayjs_1.default.utc().format(convertFormatToMoment(format))} UTC`;\n }\n if (timezone) {\n return momentDate.tz(timezone).format(`${convertFormatToMoment(format)} z`);\n }\n return momentDate.format(convertFormatToMoment(format));\n}\nexports.formatDate = formatDate;\n/**\n * Return a translated date setting.\n *\n * @param date\n * @return {(null|Date)}\n */\nfunction getDateSetting(date) {\n if ((0, lodash_1.isNil)(date) || (0, lodash_1.isNaN)(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n }\n else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n let dateSetting = ((typeof date !== 'string') || (date.indexOf('moment(') === -1)) ? (0, dayjs_1.default)(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n const value = Evaluator_1.Evaluator.evaluator(`return ${date};`, 'moment')(dayjs_1.default);\n if (typeof value === 'string') {\n dateSetting = (0, dayjs_1.default)(value);\n }\n else if (typeof value.toDate === 'function') {\n dateSetting = (0, dayjs_1.default)(value.toDate().toUTCString());\n }\n else if (value instanceof Date) {\n dateSetting = (0, dayjs_1.default)(value);\n }\n }\n catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nexports.getDateSetting = getDateSetting;\nconst getDateValidationFormat = (component) => {\n return component.dayFirst ? 'DD-MM-YYYY' : 'MM-DD-YYYY';\n};\nexports.getDateValidationFormat = getDateValidationFormat;\nconst isPartialDay = (component, value) => {\n if (!value) {\n return false;\n }\n const [DAY, MONTH, YEAR] = component.dayFirst ? [0, 1, 2] : [1, 0, 2];\n const values = value.split('/');\n return values[DAY] === '00' || values[MONTH] === '00' || values[YEAR] === '0000';\n};\nexports.isPartialDay = isPartialDay;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/date.js?");
52
52
 
53
53
  /***/ }),
54
54
 
@@ -63,6 +63,17 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
63
63
 
64
64
  /***/ }),
65
65
 
66
+ /***/ "../core/lib/utils/fastCloneDeep.js":
67
+ /*!******************************************!*\
68
+ !*** ../core/lib/utils/fastCloneDeep.js ***!
69
+ \******************************************/
70
+ /***/ (function(__unused_webpack_module, exports) {
71
+
72
+ "use strict";
73
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.fastCloneDeep = void 0;\n/**\n * Performs a fast clone deep operation.\n *\n * @param obj\n */\nfunction fastCloneDeep(obj) {\n try {\n return JSON.parse(JSON.stringify(obj));\n }\n catch (err) {\n console.log(`Clone Failed: ${err.message}`);\n return null;\n }\n}\nexports.fastCloneDeep = fastCloneDeep;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/fastCloneDeep.js?");
74
+
75
+ /***/ }),
76
+
66
77
  /***/ "../core/lib/utils/formUtil.js":
67
78
  /*!*************************************!*\
68
79
  !*** ../core/lib/utils/formUtil.js ***!
@@ -92,7 +103,7 @@ eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ?
92
103
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
93
104
 
94
105
  "use strict";
95
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.matchInputMask = exports.getInputMask = void 0;\nconst lodash_1 = __webpack_require__(/*! @formio/lodash */ \"../core/node_modules/@formio/lodash/lib/index.js\");\n/**\n * Returns an input mask that is compatible with the input mask library.\n * @param {string} mask - The Form.io input mask.\n * @param {string} placeholderChar - Char which is used as a placeholder.\n * @returns {Array} - The input mask for the mask library.\n */\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n maskArray.numeric = true;\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nexports.getInputMask = getInputMask;\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i];\n const charPart = inputMask[i];\n if (!((0, lodash_1.isRegExp)(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/mask.js?");
106
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.matchInputMask = exports.getInputMask = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../core/node_modules/lodash/lodash.js\");\n/**\n * Returns an input mask that is compatible with the input mask library.\n * @param {string} mask - The Form.io input mask.\n * @param {string} placeholderChar - Char which is used as a placeholder.\n * @returns {Array} - The input mask for the mask library.\n */\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n maskArray.numeric = true;\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nexports.getInputMask = getInputMask;\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i];\n const charPart = inputMask[i];\n if (!((0, lodash_1.isRegExp)(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/mask.js?");
96
107
 
97
108
  /***/ }),
98
109
 
@@ -125,7 +136,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
125
136
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
126
137
 
127
138
  "use strict";
128
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.unwind = exports.rewind = exports.mergeArray = exports.mergeObject = void 0;\nconst lodash_1 = __webpack_require__(/*! @formio/lodash */ \"../core/node_modules/@formio/lodash/lib/index.js\");\nconst formUtil_1 = __webpack_require__(/*! ./formUtil */ \"../core/lib/utils/formUtil.js\");\nfunction mergeObject(src, dst) {\n (0, lodash_1.each)(src, function (value, key) {\n if (!Array.isArray(value)) {\n dst[key] = value;\n }\n else {\n if (!dst[key]) {\n dst[key] = [];\n }\n mergeArray(value, dst[key]);\n }\n });\n}\nexports.mergeObject = mergeObject;\nfunction mergeArray(src, dst) {\n src.forEach(function (value) {\n var query = {};\n (0, lodash_1.each)(value, function (subValue, key) {\n if (!Array.isArray(subValue)) {\n query[key] = subValue;\n }\n });\n var dstValue = (0, lodash_1.find)(dst, query);\n if (dstValue) {\n mergeObject(value, dstValue);\n }\n else {\n dst.push(value);\n }\n });\n}\nexports.mergeArray = mergeArray;\nfunction rewind(submissions) {\n var submission = { data: {} };\n if (submissions && submissions.length) {\n submissions.forEach((sub) => mergeObject(sub.data, submission.data));\n }\n return submission;\n}\nexports.rewind = rewind;\nfunction unwind(form, submission) {\n var dataPaths = {};\n var locked = {};\n var submissions = [(0, lodash_1.fastCloneDeep)(submission)];\n // Set the data value for a data path.\n /* eslint-disable no-use-before-define */\n var setDataValue = function (dataPath, values, parent, offset, current) {\n offset = offset || 0;\n current = current || 0;\n // Make sure we don't overwrite any locked values.\n while ((0, lodash_1.has)(locked, \"[\" + current + \"].\" + parent)) {\n if ((current + 1) >= submissions.length) {\n submissions.push((0, lodash_1.fastCloneDeep)(submissions[current]));\n }\n current++;\n }\n // Ensure that all parents have been copied over to this path.\n /* eslint-disable no-useless-escape */\n var parentPath = parent.replace(/\\.[^\\.]+$/, '');\n if (!(0, lodash_1.has)(submissions[current].data, parentPath) &&\n submissions[current - 1] &&\n (0, lodash_1.has)(submissions[(current - 1)].data, parentPath)) {\n (0, lodash_1.set)(submissions[current].data, parentPath, (0, lodash_1.fastCloneDeep)((0, lodash_1.get)(submissions[(current - 1)].data, parentPath)));\n }\n /* eslint-enable no-useless-escape */\n var pathValue = [];\n (0, lodash_1.set)(submissions[current].data, parent, pathValue);\n (0, lodash_1.set)(locked, \"[\" + current + \"].\" + parent, true);\n for (var i = offset; i < values.length; i++) {\n if ((i - offset) <= dataPath.max) {\n pathValue.push(values[i]);\n if (dataPath.paths && Object.keys(dataPath.paths).length) {\n addData(dataPath.paths, values[i], parent + \"[\" + (i - offset) + \"]\", current);\n }\n }\n else {\n setDataValue(dataPath, values, parent, i, current);\n break;\n }\n }\n };\n /* eslint-enable no-use-before-define */\n // Add data to a series of data paths.\n var addData = function (dataPaths, data, parent, current) {\n for (var path in dataPaths) {\n var dataPath = dataPaths[path];\n if (data[path] && Array.isArray(data[path])) {\n setDataValue(dataPath, data[path], (parent ? parent + \".\" + path : path), 0, current);\n }\n }\n };\n var addDataPaths = function (dataPath, paths, index, parentDataPath) {\n index = index || 0;\n var path = paths[index];\n /* eslint-disable no-useless-escape */\n var matches = path.match(/([^\\[]+)\\[?([0-9]+)?\\]?/);\n /* eslint-enable no-useless-escape */\n if (matches && (matches.length === 3)) {\n var dataParam = matches[1];\n var dataIndex = parseInt(matches[2], 10) || 0;\n if (dataPath[dataParam]) {\n if (dataIndex > dataPath[dataParam].max) {\n dataPath[dataParam].max = dataIndex;\n }\n }\n else {\n dataPath[dataParam] = {\n max: dataIndex,\n param: dataParam,\n parent: parentDataPath || null,\n paths: {}\n };\n }\n if ((index + 1) < paths.length) {\n addDataPaths(dataPath[dataParam].paths, paths, (index + 1), dataPath[dataParam]);\n }\n }\n };\n // Iterate through all components.\n (0, formUtil_1.eachComponent)(form.components, function (component, path) {\n var _a;\n if (component.type === 'form' && ((_a = component.components) === null || _a === void 0 ? void 0 : _a.length)) {\n (0, formUtil_1.eachComponent)(component.components, (comp) => {\n comp.isInsideNestedForm = true;\n });\n }\n if (!component.overlay || (!component.overlay.width && !component.overlay.height)) {\n return;\n }\n var hasDataPath = component.properties && component.properties.dataPath;\n var key = component.key;\n if (hasDataPath) {\n path = component.properties.dataPath;\n key = component.properties.dataPath;\n }\n /* eslint-disable no-useless-escape */\n var paths = (0, lodash_1.filter)(path.replace(new RegExp(\".?\" + component.key + \"$\"), '').split('.'));\n /* eslint-enable no-useless-escape */\n if (!hasDataPath && paths.length && !component.isInsideNestedForm) {\n key = paths.map(function (subpath) { return subpath + \"[0]\"; }).join('.') + \".\" + component.key;\n }\n if (component.multiple) {\n paths.push(component.key);\n }\n component.key = key;\n if (paths && paths.length) {\n addDataPaths(dataPaths, paths);\n }\n }, true);\n addData(dataPaths, submission.data);\n return submissions;\n}\nexports.unwind = unwind;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/unwind.js?");
139
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.unwind = exports.rewind = exports.mergeArray = exports.mergeObject = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../core/node_modules/lodash/lodash.js\");\nconst fastCloneDeep_1 = __webpack_require__(/*! ./fastCloneDeep */ \"../core/lib/utils/fastCloneDeep.js\");\nconst formUtil_1 = __webpack_require__(/*! ./formUtil */ \"../core/lib/utils/formUtil.js\");\nfunction mergeObject(src, dst) {\n (0, lodash_1.each)(src, function (value, key) {\n if (!Array.isArray(value)) {\n dst[key] = value;\n }\n else {\n if (!dst[key]) {\n dst[key] = [];\n }\n mergeArray(value, dst[key]);\n }\n });\n}\nexports.mergeObject = mergeObject;\nfunction mergeArray(src, dst) {\n src.forEach(function (value) {\n var query = {};\n (0, lodash_1.each)(value, function (subValue, key) {\n if (!Array.isArray(subValue)) {\n query[key] = subValue;\n }\n });\n var dstValue = (0, lodash_1.find)(dst, query);\n if (dstValue) {\n mergeObject(value, dstValue);\n }\n else {\n dst.push(value);\n }\n });\n}\nexports.mergeArray = mergeArray;\nfunction rewind(submissions) {\n var submission = { data: {} };\n if (submissions && submissions.length) {\n submissions.forEach((sub) => mergeObject(sub.data, submission.data));\n }\n return submission;\n}\nexports.rewind = rewind;\nfunction unwind(form, submission) {\n var dataPaths = {};\n var locked = {};\n var submissions = [(0, fastCloneDeep_1.fastCloneDeep)(submission)];\n // Set the data value for a data path.\n /* eslint-disable no-use-before-define */\n var setDataValue = function (dataPath, values, parent, offset, current) {\n offset = offset || 0;\n current = current || 0;\n // Make sure we don't overwrite any locked values.\n while ((0, lodash_1.has)(locked, \"[\" + current + \"].\" + parent)) {\n if ((current + 1) >= submissions.length) {\n submissions.push((0, fastCloneDeep_1.fastCloneDeep)(submissions[current]));\n }\n current++;\n }\n // Ensure that all parents have been copied over to this path.\n /* eslint-disable no-useless-escape */\n var parentPath = parent.replace(/\\.[^\\.]+$/, '');\n if (!(0, lodash_1.has)(submissions[current].data, parentPath) &&\n submissions[current - 1] &&\n (0, lodash_1.has)(submissions[(current - 1)].data, parentPath)) {\n (0, lodash_1.set)(submissions[current].data, parentPath, (0, fastCloneDeep_1.fastCloneDeep)((0, lodash_1.get)(submissions[(current - 1)].data, parentPath)));\n }\n /* eslint-enable no-useless-escape */\n var pathValue = [];\n (0, lodash_1.set)(submissions[current].data, parent, pathValue);\n (0, lodash_1.set)(locked, \"[\" + current + \"].\" + parent, true);\n for (var i = offset; i < values.length; i++) {\n if ((i - offset) <= dataPath.max) {\n pathValue.push(values[i]);\n if (dataPath.paths && Object.keys(dataPath.paths).length) {\n addData(dataPath.paths, values[i], parent + \"[\" + (i - offset) + \"]\", current);\n }\n }\n else {\n setDataValue(dataPath, values, parent, i, current);\n break;\n }\n }\n };\n /* eslint-enable no-use-before-define */\n // Add data to a series of data paths.\n var addData = function (dataPaths, data, parent, current) {\n for (var path in dataPaths) {\n var dataPath = dataPaths[path];\n if (data[path] && Array.isArray(data[path])) {\n setDataValue(dataPath, data[path], (parent ? parent + \".\" + path : path), 0, current);\n }\n }\n };\n var addDataPaths = function (dataPath, paths, index, parentDataPath) {\n index = index || 0;\n var path = paths[index];\n /* eslint-disable no-useless-escape */\n var matches = path.match(/([^\\[]+)\\[?([0-9]+)?\\]?/);\n /* eslint-enable no-useless-escape */\n if (matches && (matches.length === 3)) {\n var dataParam = matches[1];\n var dataIndex = parseInt(matches[2], 10) || 0;\n if (dataPath[dataParam]) {\n if (dataIndex > dataPath[dataParam].max) {\n dataPath[dataParam].max = dataIndex;\n }\n }\n else {\n dataPath[dataParam] = {\n max: dataIndex,\n param: dataParam,\n parent: parentDataPath || null,\n paths: {}\n };\n }\n if ((index + 1) < paths.length) {\n addDataPaths(dataPath[dataParam].paths, paths, (index + 1), dataPath[dataParam]);\n }\n }\n };\n // Iterate through all components.\n (0, formUtil_1.eachComponent)(form.components, function (component, path) {\n var _a;\n if (component.type === 'form' && ((_a = component.components) === null || _a === void 0 ? void 0 : _a.length)) {\n (0, formUtil_1.eachComponent)(component.components, (comp) => {\n comp.isInsideNestedForm = true;\n });\n }\n if (!component.overlay || (!component.overlay.width && !component.overlay.height)) {\n return;\n }\n var hasDataPath = component.properties && component.properties.dataPath;\n var key = component.key;\n if (hasDataPath) {\n path = component.properties.dataPath;\n key = component.properties.dataPath;\n }\n /* eslint-disable no-useless-escape */\n var paths = (0, lodash_1.filter)(path.replace(new RegExp(\".?\" + component.key + \"$\"), '').split('.'));\n /* eslint-enable no-useless-escape */\n if (!hasDataPath && paths.length && !component.isInsideNestedForm) {\n key = paths.map(function (subpath) { return subpath + \"[0]\"; }).join('.') + \".\" + component.key;\n }\n if (component.multiple) {\n paths.push(component.key);\n }\n component.key = key;\n if (paths && paths.length) {\n addDataPaths(dataPaths, paths);\n }\n }, true);\n addData(dataPaths, submission.data);\n return submissions;\n}\nexports.unwind = unwind;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/unwind.js?");
129
140
 
130
141
  /***/ }),
131
142
 
@@ -136,84 +147,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
136
147
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
137
148
 
138
149
  "use strict";
139
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.boolValue = exports.escapeRegExCharacters = void 0;\nconst _ = __importStar(__webpack_require__(/*! @formio/lodash */ \"../core/node_modules/@formio/lodash/lib/index.js\"));\n/**\n * Escapes RegEx characters in provided String value.\n *\n * @param {String} value\n * String for escaping RegEx characters.\n * @returns {string}\n * String with escaped RegEx characters.\n */\nfunction escapeRegExCharacters(value) {\n return value.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n}\nexports.escapeRegExCharacters = escapeRegExCharacters;\n/**\n * Determines the boolean value of a setting.\n *\n * @param value\n * @return {boolean}\n */\nfunction boolValue(value) {\n if (_.isBoolean(value)) {\n return value;\n }\n else if (_.isString(value)) {\n return (value.toLowerCase() === 'true');\n }\n else {\n return !!value;\n }\n}\nexports.boolValue = boolValue;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/utils.js?");
140
-
141
- /***/ }),
142
-
143
- /***/ "../core/node_modules/@formio/lodash/lib/array.js":
144
- /*!********************************************************!*\
145
- !*** ../core/node_modules/@formio/lodash/lib/array.js ***!
146
- \********************************************************/
147
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
148
-
149
- "use strict";
150
- eval("\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.intersection = exports.map = exports.head = exports.last = exports.filter = exports.findEach = exports.matches = exports.findIndex = exports.find = exports.each = exports.dropRight = exports.drop = exports.difference = exports.concat = exports.compact = exports.chunk = void 0;\nvar lang_1 = __webpack_require__(/*! ./lang */ \"../core/node_modules/@formio/lodash/lib/lang.js\");\nvar object_1 = __webpack_require__(/*! ./object */ \"../core/node_modules/@formio/lodash/lib/object.js\");\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_chunk\nfunction chunk(input, size) {\n return input.reduce(function (arr, item, idx) {\n return idx % size === 0\n ? __spreadArray(__spreadArray([], arr, true), [[item]], false) : __spreadArray(__spreadArray([], arr.slice(0, -1), true), [__spreadArray(__spreadArray([], arr.slice(-1)[0], true), [item], false)], false);\n }, []);\n}\nexports.chunk = chunk;\n;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_compact\nfunction compact(input) {\n return input.filter(Boolean);\n}\nexports.compact = compact;\n/**\n * @link https://lodash.com/docs/4.17.15#concat\n * @param input\n * @param args\n * @returns\n */\nfunction concat(input) {\n var args = [];\n for (var _i = 1; _i < arguments.length; _i++) {\n args[_i - 1] = arguments[_i];\n }\n return input.concat.apply(input, args);\n}\nexports.concat = concat;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_difference\nfunction difference() {\n var arrays = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n arrays[_i] = arguments[_i];\n }\n return arrays.reduce(function (a, b) {\n return a.filter(function (value) {\n return !b.includes(value);\n });\n });\n}\nexports.difference = difference;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_drop\nfunction drop(arr, index) {\n if (index === void 0) { index = 1; }\n return (index > 0) ? arr.slice(index) : arr;\n}\nexports.drop = drop;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_dropright\nfunction dropRight(arr, index) {\n if (index === void 0) { index = 1; }\n return (index > 0) ? arr.slice(0, -index) : arr;\n}\nexports.dropRight = dropRight;\n/**\n * Iterate through a collection or array.\n * @param collection\n * @param _each\n */\nfunction each(collection, _each) {\n var isArray = Array.isArray(collection);\n for (var i in collection) {\n if (collection.hasOwnProperty(i)) {\n if (_each(collection[i], isArray ? Number(i) : i) === true) {\n break;\n }\n ;\n }\n }\n}\nexports.each = each;\n/**\n * Perform a find operation.\n * @param arr\n * @param query\n */\nfunction find(arr, query, findIndex) {\n if (findIndex === void 0) { findIndex = false; }\n if (!arr) {\n return undefined;\n }\n if (Array.isArray(arr) && typeof query === 'function') {\n return findIndex ? arr.findIndex(query) : arr.find(query);\n }\n var found = undefined;\n var foundIndex = 0;\n findEach(arr, query, function (item, index) {\n found = item;\n foundIndex = index;\n return true;\n });\n return findIndex ? foundIndex : found;\n}\nexports.find = find;\n/**\n * Find an index.\n *\n * @param arr\n * @param query\n * @returns\n */\nfunction findIndex(arr, query) {\n return find(arr, query, true);\n}\nexports.findIndex = findIndex;\n/**\n * Returns a function to perform matches.\n * @param query\n * @returns\n */\nfunction matches(query) {\n var keys = [];\n var compare = {};\n if (typeof query === 'string') {\n keys = [query];\n compare[query] = true;\n }\n else {\n keys = Object.keys(query);\n compare = query;\n }\n return function (comp) {\n return (0, lang_1.isEqual)((0, object_1.pick)(comp, keys), compare);\n };\n}\nexports.matches = matches;\n/**\n * Perform a find operation on each item in an array.\n * @param arr\n * @param query\n * @param fn\n */\nfunction findEach(arr, query, fn) {\n each(arr, function (item, index) {\n if (matches(query)(item)) {\n if (fn(item, index) === true) {\n return true;\n }\n }\n });\n}\nexports.findEach = findEach;\n/**\n * Perform a filter operation.\n * @param arr\n * @param fn\n */\nfunction filter(arr, fn) {\n if (!arr) {\n return [];\n }\n if (!fn) {\n fn = function (val) { return !!val; };\n }\n if (Array.isArray(arr) && typeof fn === 'function') {\n return arr.filter(fn);\n }\n var found = [];\n findEach(arr, fn, function (item, index) {\n found.push(item);\n if (Array.isArray(item)) {\n arr.splice(index, 1);\n }\n else {\n delete arr[index];\n }\n });\n return found;\n}\nexports.filter = filter;\n/**\n * Get the last item in an array.\n * @param arr\n */\nfunction last(arr) {\n return arr[arr.length - 1];\n}\nexports.last = last;\n/**\n * https://lodash.com/docs/4.17.15#head\n * @param arr\n * @returns\n */\nfunction head(arr) {\n return arr[0];\n}\nexports.head = head;\n/**\n * https://lodash.com/docs/4.17.15#map\n * @param arr\n * @param fn\n * @returns\n */\nfunction map(arr, fn) {\n return arr.map(fn);\n}\nexports.map = map;\n/**\n * Get the intersection of two objects.\n * @param a\n * @param b\n */\nfunction intersection(a, b) {\n return a.filter(function (value) { return b.includes(value); });\n}\nexports.intersection = intersection;\n\n\n//# sourceURL=webpack://Formio/../core/node_modules/@formio/lodash/lib/array.js?");
151
-
152
- /***/ }),
153
-
154
- /***/ "../core/node_modules/@formio/lodash/lib/function.js":
155
- /*!***********************************************************!*\
156
- !*** ../core/node_modules/@formio/lodash/lib/function.js ***!
157
- \***********************************************************/
158
- /***/ (function(__unused_webpack_module, exports) {
159
-
160
- "use strict";
161
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.debounce = void 0;\n/**\n * Debounc the call of a function for a given amount of time.\n *\n * @param func\n * @param wait\n * @returns\n */\nfunction debounce(func, wait) {\n if (wait === void 0) { wait = 100; }\n var timeout;\n return function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n if (timeout) {\n clearTimeout(timeout);\n }\n timeout = setTimeout(function () {\n timeout = null;\n func.apply(void 0, args);\n }, wait);\n };\n}\nexports.debounce = debounce;\n\n\n//# sourceURL=webpack://Formio/../core/node_modules/@formio/lodash/lib/function.js?");
162
-
163
- /***/ }),
164
-
165
- /***/ "../core/node_modules/@formio/lodash/lib/index.js":
166
- /*!********************************************************!*\
167
- !*** ../core/node_modules/@formio/lodash/lib/index.js ***!
168
- \********************************************************/
169
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
170
-
171
- "use strict";
172
- eval("\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.chain = void 0;\nvar ArrayFunctions = __importStar(__webpack_require__(/*! ./array */ \"../core/node_modules/@formio/lodash/lib/array.js\"));\nvar Chainable = /** @class */ (function () {\n function Chainable(val) {\n this.chain = [];\n this.currentValue = [];\n this.currentValue = val;\n }\n Chainable.prototype.value = function () {\n return this.chain.reduce(function (current, func) {\n var _a;\n return (_a = ArrayFunctions)[func.method].apply(_a, __spreadArray([current], func.args, false));\n }, this.currentValue);\n };\n return Chainable;\n}());\nvar _loop_1 = function (method) {\n if (ArrayFunctions.hasOwnProperty(method)) {\n Chainable.prototype[method] = function () {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n this.chain.push({ method: method, args: args });\n return this;\n };\n }\n};\nfor (var method in ArrayFunctions) {\n _loop_1(method);\n}\n/**\n * Create a chainable array of methods.\n * @param val\n * @returns\n */\nfunction chain(val) {\n return new Chainable(val);\n}\nexports.chain = chain;\nexports[\"default\"] = chain;\n__exportStar(__webpack_require__(/*! ./array */ \"../core/node_modules/@formio/lodash/lib/array.js\"), exports);\n__exportStar(__webpack_require__(/*! ./function */ \"../core/node_modules/@formio/lodash/lib/function.js\"), exports);\n__exportStar(__webpack_require__(/*! ./lang */ \"../core/node_modules/@formio/lodash/lib/lang.js\"), exports);\n__exportStar(__webpack_require__(/*! ./math */ \"../core/node_modules/@formio/lodash/lib/math.js\"), exports);\n__exportStar(__webpack_require__(/*! ./object */ \"../core/node_modules/@formio/lodash/lib/object.js\"), exports);\n__exportStar(__webpack_require__(/*! ./string */ \"../core/node_modules/@formio/lodash/lib/string.js\"), exports);\n\n\n//# sourceURL=webpack://Formio/../core/node_modules/@formio/lodash/lib/index.js?");
173
-
174
- /***/ }),
175
-
176
- /***/ "../core/node_modules/@formio/lodash/lib/lang.js":
177
- /*!*******************************************************!*\
178
- !*** ../core/node_modules/@formio/lodash/lib/lang.js ***!
179
- \*******************************************************/
180
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
181
-
182
- "use strict";
183
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isRegExp = exports.isBoolean = exports.isNumber = exports.isPlainObject = exports.isObject = exports.isObjectLike = exports.isArray = exports.isNull = exports.isNil = exports.isNaN = exports.isInteger = exports.isEmpty = exports.isString = exports.isEqual = exports.noop = void 0;\nvar array_1 = __webpack_require__(/*! ./array */ \"../core/node_modules/@formio/lodash/lib/array.js\");\n/**\n * Gets the `toStringTag` of `value`.\n *\n * @private\n * @param {*} value The value to query.\n * @returns {string} Returns the `toStringTag`.\n */\nfunction getTag(value) {\n if (value == null) {\n return value === undefined ? '[object Undefined]' : '[object Null]';\n }\n return Object.prototype.toString.call(value);\n}\n/**\n * A no-operation function.\n */\nfunction noop() {\n return;\n}\nexports.noop = noop;\n;\n/**\n * Determines equality of a value or complex object.\n * @param a\n * @param b\n */\nfunction isEqual(a, b) {\n var equal = false;\n if (a === b) {\n return true;\n }\n if (a && b && (Array.isArray(a) || isObject(a)) && Object.keys(a).length === Object.keys(b).length) {\n equal = true;\n (0, array_1.each)(a, function (val, key) {\n if ((Array.isArray(val) || isObject(val)) && !isEqual(b[key], val)) {\n equal = false;\n return true;\n }\n if (b[key] !== val) {\n equal = false;\n return true;\n }\n });\n }\n return equal;\n}\nexports.isEqual = isEqual;\nfunction isString(val) {\n return typeof val === 'string';\n}\nexports.isString = isString;\n// https://github.com/you-dont-need/You-Dont-Need-Lodash-Underscore#_isempty\nfunction isEmpty(val) {\n return [Object, Array].includes((val || {}).constructor) && !Object.entries((val || {})).length;\n}\nexports.isEmpty = isEmpty;\nfunction isInteger(val) {\n return Number.isInteger(val);\n}\nexports.isInteger = isInteger;\nfunction isNaN(val) {\n return Number.isNaN(val);\n}\nexports.isNaN = isNaN;\nfunction isNil(val) {\n return val == null;\n}\nexports.isNil = isNil;\nfunction isNull(val) {\n return val === null;\n}\nexports.isNull = isNull;\nfunction isArray(val) {\n return Array.isArray(val);\n}\nexports.isArray = isArray;\nfunction isObjectLike(val) {\n return typeof val === 'object' && (val !== null);\n}\nexports.isObjectLike = isObjectLike;\nfunction isObject(val) {\n var type = typeof val;\n return val != null && (type === 'object' || type === 'function');\n}\nexports.isObject = isObject;\nfunction isPlainObject(value) {\n if (!isObjectLike(value) || getTag(value) != '[object Object]') {\n return false;\n }\n if (Object.getPrototypeOf(value) === null) {\n return true;\n }\n var proto = value;\n while (Object.getPrototypeOf(proto) !== null) {\n proto = Object.getPrototypeOf(proto);\n }\n return Object.getPrototypeOf(value) === proto;\n}\nexports.isPlainObject = isPlainObject;\nfunction isNumber(val) {\n return typeof val === 'number' || (isObjectLike(val) && getTag(val) == '[object Number]');\n}\nexports.isNumber = isNumber;\nfunction isBoolean(val) {\n return val === true || val === false || (isObjectLike(val) && getTag(val) == '[object Boolean]');\n}\nexports.isBoolean = isBoolean;\nfunction isRegExp(val) {\n return isObjectLike(val) && getTag(val) == '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\n\n//# sourceURL=webpack://Formio/../core/node_modules/@formio/lodash/lib/lang.js?");
184
-
185
- /***/ }),
186
-
187
- /***/ "../core/node_modules/@formio/lodash/lib/math.js":
188
- /*!*******************************************************!*\
189
- !*** ../core/node_modules/@formio/lodash/lib/math.js ***!
190
- \*******************************************************/
191
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
192
-
193
- "use strict";
194
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.sumBy = exports.sum = exports.mod = exports.subtract = exports.round = exports.multiply = exports.minBy = exports.min = exports.meanBy = exports.mean = exports.maxBy = exports.max = exports.floor = exports.divide = exports.ceil = exports.add = void 0;\nvar lang_1 = __webpack_require__(/*! ./lang */ \"../core/node_modules/@formio/lodash/lib/lang.js\");\nvar object_1 = __webpack_require__(/*! ./object */ \"../core/node_modules/@formio/lodash/lib/object.js\");\nfunction mathOp(a, op, precision) {\n if (precision === void 0) { precision = 0; }\n if (!precision) {\n return op(a);\n }\n precision = Math.pow(10, precision);\n return op(a * precision) / precision;\n}\nfunction compareBy(arr, fn, op) {\n var first = arr[0];\n if (arr.length <= 1) {\n return first;\n }\n var fnString = (0, lang_1.isString)(fn);\n return arr.slice(1).reduce(function (current, next) {\n var currentValue = fnString ? (0, object_1.get)(current, fn) : fn(current);\n var nextValue = fnString ? (0, object_1.get)(next, fn) : fn(next);\n var result = op(currentValue, nextValue);\n return (result === nextValue) ? next : current;\n }, first);\n}\nfunction valueBy(arr, fn, op) {\n var first = arr[0];\n if (arr.length <= 1) {\n return first;\n }\n var fnString = (0, lang_1.isString)(fn);\n return arr.slice(1).reduce(function (current, next) { return op(current, fnString ? (0, object_1.get)(next, fn) : fn(next)); }, fnString ? (0, object_1.get)(first, fn) : fn(first));\n}\n/**\n * @link https://lodash.com/docs/4.17.15#add\n * @param augend\n * @param addend\n * @returns\n */\nfunction add(augend, addend) {\n return augend + addend;\n}\nexports.add = add;\n/**\n * @link https://lodash.com/docs/4.17.15#ceil\n * @param num\n * @param precision\n * @returns\n */\nfunction ceil(num, precision) {\n if (precision === void 0) { precision = 0; }\n return mathOp(num, Math.ceil, precision);\n}\nexports.ceil = ceil;\n/**\n * https://lodash.com/docs/4.17.15#divide\n * @param dividend\n * @param divisor\n * @returns\n */\nfunction divide(dividend, divisor) {\n return dividend / divisor;\n}\nexports.divide = divide;\n/**\n * @link https://lodash.com/docs/4.17.15#floor\n * @param num\n * @param precision\n * @returns\n */\nfunction floor(num, precision) {\n if (precision === void 0) { precision = 0; }\n return mathOp(num, Math.floor, precision);\n}\nexports.floor = floor;\n/**\n * @link https://lodash.com/docs/4.17.15#max\n * @param arr\n * @returns\n */\nfunction max(arr) {\n return Math.max.apply(Math, arr);\n}\nexports.max = max;\n/**\n * @link https://lodash.com/docs/4.17.15#maxBy\n */\nfunction maxBy(arr, fn) {\n return compareBy(arr, fn, Math.max);\n}\nexports.maxBy = maxBy;\n/**\n * @link https://lodash.com/docs/4.17.15#mean\n * @param arr\n * @returns\n */\nfunction mean(arr) {\n return sum(arr) / arr.length;\n}\nexports.mean = mean;\n/**\n * @link https://lodash.com/docs/4.17.15#meanBy\n * @param arr\n * @param fn\n * @returns\n */\nfunction meanBy(arr, fn) {\n return sumBy(arr, fn) / arr.length;\n}\nexports.meanBy = meanBy;\n/**\n * @link https://lodash.com/docs/4.17.15#min\n * @param arr\n * @returns\n */\nfunction min(arr) {\n return Math.min.apply(Math, arr);\n}\nexports.min = min;\n/**\n * @link https://lodash.com/docs/4.17.15#minBy\n * @param arr\n * @param fn\n * @returns\n */\nfunction minBy(arr, fn) {\n return compareBy(arr, fn, Math.min);\n}\nexports.minBy = minBy;\n/**\n * @link https://lodash.com/docs/4.17.15#multiply\n * @param multiplier\n * @param multiplicand\n * @returns\n */\nfunction multiply(multiplier, multiplicand) {\n return multiplier * multiplicand;\n}\nexports.multiply = multiply;\n/**\n * @link https://lodash.com/docs/4.17.15#round\n * @param num\n * @param precision\n * @returns\n */\nfunction round(num, precision) {\n if (precision === void 0) { precision = 0; }\n return mathOp(num, Math.round, precision);\n}\nexports.round = round;\n/**\n * @link https://lodash.com/docs/4.17.15#subtract\n * @param a\n * @param b\n * @returns\n */\nfunction subtract(minuend, subtrahend) {\n return minuend - subtrahend;\n}\nexports.subtract = subtract;\n/**\n * Perform a modulus operation between two numbers.\n * @param a\n * @param b\n * @returns\n */\nfunction mod(a, b) {\n return a % b;\n}\nexports.mod = mod;\n/**\n * @link https://lodash.com/docs/4.17.15#sum\n * @param arr\n * @returns\n */\nfunction sum(arr) {\n return arr.reduce(add, 0);\n}\nexports.sum = sum;\n/**\n * @link https://lodash.com/docs/4.17.15#sumBy\n * @param arr\n * @param fn\n * @returns\n */\nfunction sumBy(arr, fn) {\n return valueBy(arr, fn, function (a, b) { return (a + b); });\n}\nexports.sumBy = sumBy;\n\n\n//# sourceURL=webpack://Formio/../core/node_modules/@formio/lodash/lib/math.js?");
195
-
196
- /***/ }),
197
-
198
- /***/ "../core/node_modules/@formio/lodash/lib/object.js":
199
- /*!*********************************************************!*\
200
- !*** ../core/node_modules/@formio/lodash/lib/object.js ***!
201
- \*********************************************************/
202
- /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
203
-
204
- "use strict";
205
- eval("\nvar __assign = (this && this.__assign) || function () {\n __assign = Object.assign || function(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))\n t[p] = s[p];\n }\n return t;\n };\n return __assign.apply(this, arguments);\n};\nvar __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.pick = exports.defaults = exports.cloneDeep = exports.clone = exports.fastCloneDeep = exports.merge = exports.set = exports.has = exports.propertyOf = exports.property = exports.get = exports.pathParts = exports.values = exports.keys = void 0;\nvar lang_1 = __webpack_require__(/*! ./lang */ \"../core/node_modules/@formio/lodash/lib/lang.js\");\nvar array_1 = __webpack_require__(/*! ./array */ \"../core/node_modules/@formio/lodash/lib/array.js\");\n/**\n * Get the keys of an Object.\n * @param obj\n */\nfunction keys(obj) {\n return Object.keys(obj);\n}\nexports.keys = keys;\n;\n/**\n * Return the values of an object or an array.\n * @param obj\n * @returns\n */\nfunction values(obj) {\n return (0, lang_1.isArray)(obj) ? obj : Object.values(obj);\n}\nexports.values = values;\n/**\n * Retrieve the path parts provided a path string.\n * @param path\n */\nfunction pathParts(path) {\n if (!path) {\n return [];\n }\n if (path[0] === '[') {\n path = path.replace(/^\\[([^\\]]+)\\]/, '$1');\n }\n return path.\n replace(/\\[/g, '.').\n replace(/\\]/g, '').\n split('.');\n}\nexports.pathParts = pathParts;\n/**\n * Get the value from an object or an array provided a path.\n *\n * @param obj\n * @param path\n * @param def\n */\nfunction get(obj, path, def) {\n var val = pathParts(path).reduce(function (o, k) { return (o || {})[k]; }, obj);\n return (typeof def !== 'undefined' &&\n typeof val === 'undefined') ? def : val;\n}\nexports.get = get;\nfunction property(path) {\n return function (obj) { return get(obj, path); };\n}\nexports.property = property;\nfunction propertyOf(obj) {\n return function (path) { return get(obj, path); };\n}\nexports.propertyOf = propertyOf;\n/**\n * Determine if a value is set.\n *\n * @param obj\n * @param path\n */\nfunction has(obj, path) {\n return get(obj, path, undefined) !== undefined;\n}\nexports.has = has;\n/**\n * Sets the value of an item within an array or object.\n * @param obj\n * @param path\n * @param value\n */\nfunction set(obj, path, value) {\n var parts = pathParts(path);\n parts.reduce(function (o, k, i) {\n if (!isNaN(Number(k))) {\n k = Number(k);\n }\n if ((Array.isArray(o) ? (k >= o.length) : !o.hasOwnProperty(k)) ||\n ((i < (parts.length - 1)) && !Array.isArray(o[k]) && !(0, lang_1.isObject)(o[k]))) {\n o[k] = !isNaN(Number(parts[i + 1])) ? [] : {};\n }\n if (i === (parts.length - 1)) {\n o[k] = value;\n }\n return o[k];\n }, obj);\n return obj;\n}\nexports.set = set;\n;\nfunction propertyIsOnObject(object, property) {\n try {\n return property in object;\n }\n catch (_) {\n return false;\n }\n}\n// Protects from prototype poisoning and unexpected merging up the prototype chain.\nfunction propertyIsUnsafe(target, key) {\n return propertyIsOnObject(target, key) // Properties are safe to merge if they don't exist in the target yet,\n && !(Object.hasOwnProperty.call(target, key) // unsafe if they exist up the prototype chain,\n && Object.propertyIsEnumerable.call(target, key)); // and also unsafe if they're nonenumerable.\n}\n/**\n * Merge a single object.\n *\n * @param target\n * @param source\n * @returns\n */\nfunction mergeObject(target, source) {\n for (var key in source) {\n if (source.hasOwnProperty(key)) {\n if (propertyIsUnsafe(target, key)) {\n return;\n }\n if (propertyIsOnObject(target, key)) {\n target[key] = merge(target[key], source[key]);\n }\n else {\n target[key] = cloneDeep(source[key]);\n }\n }\n }\n return target;\n}\n/**\n * Merge two arrays.\n * @param target\n * @param source\n */\nfunction mergeArray(target, source) {\n source.forEach(function (subSource, index) {\n target[index] = merge(target[index], subSource);\n });\n return target;\n}\n/**\n * Merges a complex data object.\n *\n * @param a\n * @param b\n * @param options\n */\nfunction merge() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var first = args.shift();\n return args.reduce(function (target, source, index) {\n if (!target || (target === source)) {\n return cloneDeep(source);\n }\n else if ((0, lang_1.isArray)(source)) {\n // If there is no target array, then make it one.\n if (!(0, lang_1.isArray)(target)) {\n args[index] = target = [];\n }\n return mergeArray(target, source);\n }\n else if ((0, lang_1.isPlainObject)(source)) {\n return mergeObject(target, source);\n }\n else {\n return cloneDeep(source);\n }\n }, first);\n}\nexports.merge = merge;\n/**\n * Performs a fast clone deep operation.\n *\n * @param obj\n */\nfunction fastCloneDeep(obj) {\n try {\n return JSON.parse(JSON.stringify(obj));\n }\n catch (err) {\n console.log(\"Clone Failed: \".concat(err.message));\n return null;\n }\n}\nexports.fastCloneDeep = fastCloneDeep;\n/**\n * Performs a shallow clone of an object.\n * @param src\n */\nfunction clone(src) {\n if (Array.isArray(src)) { // for arrays\n return __spreadArray([], src, true);\n }\n else {\n return __assign({}, src);\n }\n}\nexports.clone = clone;\n/**\n * Performs a recursive cloneDeep operation.\n * @param src\n * @returns\n */\nfunction cloneDeep(src) {\n if (Array.isArray(src)) { // for arrays\n return src.map(cloneDeep);\n }\n if (src === null || typeof src !== 'object') { // for primitives / functions / non-references/pointers\n return src;\n }\n return Object.fromEntries(Object.entries(src).map(function (_a) {\n var key = _a[0], val = _a[1];\n return ([key, cloneDeep(val)]);\n }));\n}\nexports.cloneDeep = cloneDeep;\n/**\n * Sets the defaults of an object.\n *\n * @param obj\n * @param defs\n */\nfunction defaults(obj, defs) {\n (0, array_1.each)(defs, function (value, key) {\n if (!obj.hasOwnProperty(key)) {\n obj[key] = value;\n }\n });\n return obj;\n}\nexports.defaults = defaults;\n/**\n * Pick an item in an object.\n * @param object\n * @param keys\n */\nfunction pick(object, keys) {\n return keys.reduce(function (obj, key) {\n if (object && object.hasOwnProperty(key)) {\n obj[key] = object[key];\n }\n return obj;\n }, {});\n}\nexports.pick = pick;\n;\n\n\n//# sourceURL=webpack://Formio/../core/node_modules/@formio/lodash/lib/object.js?");
206
-
207
- /***/ }),
208
-
209
- /***/ "../core/node_modules/@formio/lodash/lib/string.js":
210
- /*!*********************************************************!*\
211
- !*** ../core/node_modules/@formio/lodash/lib/string.js ***!
212
- \*********************************************************/
213
- /***/ (function(__unused_webpack_module, exports) {
214
-
215
- "use strict";
216
- eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.endsWith = exports.trim = void 0;\n// From https://youmightnotneed.com/lodash/#trim\nfunction trim(str, c) {\n if (c === void 0) { c = '\\\\s'; }\n return str.replace(new RegExp(\"^([\".concat(c, \"]*)(.*?)([\").concat(c, \"]*)$\")), '$2');\n}\nexports.trim = trim;\n// Polyfill from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith\nif (!String.prototype.endsWith) {\n String.prototype.endsWith = function (search, this_len) {\n if (this_len === undefined || this_len > this.length) {\n this_len = this.length;\n }\n // @ts-ignore: Object is possibly 'undefined'\n return this.substring(this_len - search.length, this_len) === search;\n };\n}\n// From https://youmightnotneed.com/lodash/#endsWith\nfunction endsWith(str, c) {\n return str.endsWith(c);\n}\nexports.endsWith = endsWith;\n\n\n//# sourceURL=webpack://Formio/../core/node_modules/@formio/lodash/lib/string.js?");
150
+ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.boolValue = exports.escapeRegExCharacters = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../core/node_modules/lodash/lodash.js\");\n/**\n * Escapes RegEx characters in provided String value.\n *\n * @param {String} value\n * String for escaping RegEx characters.\n * @returns {string}\n * String with escaped RegEx characters.\n */\nfunction escapeRegExCharacters(value) {\n return value.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n}\nexports.escapeRegExCharacters = escapeRegExCharacters;\n/**\n * Determines the boolean value of a setting.\n *\n * @param value\n * @return {boolean}\n */\nfunction boolValue(value) {\n if ((0, lodash_1.isBoolean)(value)) {\n return value;\n }\n else if ((0, lodash_1.isString)(value)) {\n return (value.toLowerCase() === 'true');\n }\n else {\n return !!value;\n }\n}\nexports.boolValue = boolValue;\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/utils.js?");
217
151
 
218
152
  /***/ }),
219
153
 
@@ -223,7 +157,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
223
157
  \***********************************************/
224
158
  /***/ (function(module) {
225
159
 
226
- eval("!function(t,e){ true?module.exports=e():0}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",f=\"month\",h=\"quarter\",c=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,f),s=n-i<0,u=e.clone().add(r+(s?-1:1),f);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:f,y:c,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:h}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=function(t){return t instanceof _},S=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},w=function(t,e){if(p(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},O=v;O.l=S,O.i=p,O.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=S(t.locale,null,!0),this.parse(t)}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(O.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.$x=t.x||{},this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return O},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=w(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,n){return O.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!O.u(e)||e,h=O.p(t),l=function(t,e){var i=O.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return O.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(h){case c:return r?l(1,0):l(31,11);case f:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=O.p(t),h=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=h+\"Date\",n[d]=h+\"Date\",n[f]=h+\"Month\",n[c]=h+\"FullYear\",n[u]=h+\"Hours\",n[s]=h+\"Minutes\",n[i]=h+\"Seconds\",n[r]=h+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===f||o===c){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[O.p(t)]()},m.add=function(r,h){var d,l=this;r=Number(r);var $=O.p(h),y=function(t){var e=w(l);return O.w(e.date(e.date()+Math.round(t*r)),l)};if($===f)return this.set(f,this.$M+r);if($===c)return this.set(c,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return O.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=O.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,f=n.months,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},c=function(t){return O.s(s%12||12,t,\"0\")},d=n.meridiem||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r},$={YY:String(this.$y).slice(-2),YYYY:O.s(this.$y,4,\"0\"),M:a+1,MM:O.s(a+1,2,\"0\"),MMM:h(n.monthsShort,a,f,3),MMMM:h(f,a),D:this.$D,DD:O.s(this.$D,2,\"0\"),d:String(this.$W),dd:h(n.weekdaysMin,this.$W,o,2),ddd:h(n.weekdaysShort,this.$W,o,3),dddd:o[this.$W],H:String(s),HH:O.s(s,2,\"0\"),h:c(1),hh:c(2),a:d(s,u,!0),A:d(s,u,!1),m:String(u),mm:O.s(u,2,\"0\"),s:String(this.$s),ss:O.s(this.$s,2,\"0\"),SSS:O.s(this.$ms,3,\"0\"),Z:i};return r.replace(y,(function(t,e){return e||$[t]||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=O.p(d),M=w(r),m=(M.utcOffset()-this.utcOffset())*e,v=this-M,g=O.m(this,M);return g=($={},$[c]=g/12,$[f]=g,$[h]=g/3,$[o]=(v-m)/6048e5,$[a]=(v-m)/864e5,$[u]=v/n,$[s]=v/e,$[i]=v/t,$)[y]||v,l?g:O.a(g)},m.daysInMonth=function(){return this.endOf(f).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=S(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return O.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),T=_.prototype;return w.prototype=T,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",f],[\"$y\",c],[\"$D\",d]].forEach((function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),w.extend=function(t,e){return t.$i||(t(e,_,w),t.$i=!0),w},w.locale=S,w.isDayjs=p,w.unix=function(t){return w(1e3*t)},w.en=D[g],w.Ls=D,w.p={},w}));\n\n//# sourceURL=webpack://Formio/../core/node_modules/dayjs/dayjs.min.js?");
160
+ eval("!function(t,e){ true?module.exports=e():0}(this,(function(){\"use strict\";var t=1e3,e=6e4,n=36e5,r=\"millisecond\",i=\"second\",s=\"minute\",u=\"hour\",a=\"day\",o=\"week\",c=\"month\",f=\"quarter\",h=\"year\",d=\"date\",l=\"Invalid Date\",$=/^(\\d{4})[-/]?(\\d{1,2})?[-/]?(\\d{0,2})[Tt\\s]*(\\d{1,2})?:?(\\d{1,2})?:?(\\d{1,2})?[.:]?(\\d+)?$/,y=/\\[([^\\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:\"en\",weekdays:\"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday\".split(\"_\"),months:\"January_February_March_April_May_June_July_August_September_October_November_December\".split(\"_\"),ordinal:function(t){var e=[\"th\",\"st\",\"nd\",\"rd\"],n=t%100;return\"[\"+t+(e[(n-20)%10]||e[n]||e[0])+\"]\"}},m=function(t,e,n){var r=String(t);return!r||r.length>=e?t:\"\"+Array(e+1-r.length).join(n)+t},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return(e<=0?\"+\":\"-\")+m(r,2,\"0\")+\":\"+m(i,2,\"0\")},m:function t(e,n){if(e.date()<n.date())return-t(n,e);var r=12*(n.year()-e.year())+(n.month()-e.month()),i=e.clone().add(r,c),s=n-i<0,u=e.clone().add(r+(s?-1:1),c);return+(-(r+(n-i)/(s?i-u:u-i))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:c,y:h,w:o,d:a,D:d,h:u,m:s,s:i,ms:r,Q:f}[t]||String(t||\"\").toLowerCase().replace(/s$/,\"\")},u:function(t){return void 0===t}},g=\"en\",D={};D[g]=M;var p=\"$isDayjsObject\",S=function(t){return t instanceof _||!(!t||!t[p])},w=function t(e,n,r){var i;if(!e)return g;if(\"string\"==typeof e){var s=e.toLowerCase();D[s]&&(i=s),n&&(D[s]=n,i=s);var u=e.split(\"-\");if(!i&&u.length>1)return t(u[0])}else{var a=e.name;D[a]=e,i=a}return!r&&i&&(g=i),i||!r&&g},O=function(t,e){if(S(t))return t.clone();var n=\"object\"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n)},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date;if(e instanceof Date)return new Date(e);if(\"string\"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||\"0\").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return b},m.isValid=function(){return!(this.$d.toString()===l)},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e)},m.isAfter=function(t,e){return O(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<O(t)},m.$g=function(t,e,n){return b.u(t)?this[e]:this.set(n,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var n=this,r=!!b.u(e)||e,f=b.p(t),l=function(t,e){var i=b.w(n.$u?Date.UTC(n.$y,e,t):new Date(n.$y,e,t),n);return r?i:i.endOf(a)},$=function(t,e){return b.w(n.toDate()[t].apply(n.toDate(\"s\"),(r?[0,0,0,0]:[23,59,59,999]).slice(e)),n)},y=this.$W,M=this.$M,m=this.$D,v=\"set\"+(this.$u?\"UTC\":\"\");switch(f){case h:return r?l(1,0):l(31,11);case c:return r?l(1,M):l(0,M+1);case o:var g=this.$locale().weekStart||0,D=(y<g?y+7:y)-g;return l(r?m-D:m+(6-D),M);case a:case d:return $(v+\"Hours\",0);case u:return $(v+\"Minutes\",1);case s:return $(v+\"Seconds\",2);case i:return $(v+\"Milliseconds\",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var n,o=b.p(t),f=\"set\"+(this.$u?\"UTC\":\"\"),l=(n={},n[a]=f+\"Date\",n[d]=f+\"Date\",n[c]=f+\"Month\",n[h]=f+\"FullYear\",n[u]=f+\"Hours\",n[s]=f+\"Minutes\",n[i]=f+\"Seconds\",n[r]=f+\"Milliseconds\",n)[o],$=o===a?this.$D+(e-this.$W):e;if(o===c||o===h){var y=this.clone().set(d,1);y.$d[l]($),y.init(),this.$d=y.set(d,Math.min(this.$D,y.daysInMonth())).$d}else l&&this.$d[l]($);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[b.p(t)]()},m.add=function(r,f){var d,l=this;r=Number(r);var $=b.p(f),y=function(t){var e=O(l);return b.w(e.date(e.date()+Math.round(t*r)),l)};if($===c)return this.set(c,this.$M+r);if($===h)return this.set(h,this.$y+r);if($===a)return y(1);if($===o)return y(7);var M=(d={},d[s]=e,d[u]=n,d[i]=t,d)[$]||1,m=this.$d.getTime()+r*M;return b.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,n=this.$locale();if(!this.isValid())return n.invalidDate||l;var r=t||\"YYYY-MM-DDTHH:mm:ssZ\",i=b.z(this),s=this.$H,u=this.$m,a=this.$M,o=n.weekdays,c=n.months,f=n.meridiem,h=function(t,n,i,s){return t&&(t[n]||t(e,r))||i[n].slice(0,s)},d=function(t){return b.s(s%12||12,t,\"0\")},$=f||function(t,e,n){var r=t<12?\"AM\":\"PM\";return n?r.toLowerCase():r};return r.replace(y,(function(t,r){return r||function(t){switch(t){case\"YY\":return String(e.$y).slice(-2);case\"YYYY\":return b.s(e.$y,4,\"0\");case\"M\":return a+1;case\"MM\":return b.s(a+1,2,\"0\");case\"MMM\":return h(n.monthsShort,a,c,3);case\"MMMM\":return h(c,a);case\"D\":return e.$D;case\"DD\":return b.s(e.$D,2,\"0\");case\"d\":return String(e.$W);case\"dd\":return h(n.weekdaysMin,e.$W,o,2);case\"ddd\":return h(n.weekdaysShort,e.$W,o,3);case\"dddd\":return o[e.$W];case\"H\":return String(s);case\"HH\":return b.s(s,2,\"0\");case\"h\":return d(1);case\"hh\":return d(2);case\"a\":return $(s,u,!0);case\"A\":return $(s,u,!1);case\"m\":return String(u);case\"mm\":return b.s(u,2,\"0\");case\"s\":return String(e.$s);case\"ss\":return b.s(e.$s,2,\"0\");case\"SSS\":return b.s(e.$ms,3,\"0\");case\"Z\":return i}return null}(t)||i.replace(\":\",\"\")}))},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,d,l){var $,y=this,M=b.p(d),m=O(r),v=(m.utcOffset()-this.utcOffset())*e,g=this-m,D=function(){return b.m(y,m)};switch(M){case h:$=D()/12;break;case c:$=D();break;case f:$=D()/3;break;case o:$=(g-v)/6048e5;break;case a:$=(g-v)/864e5;break;case u:$=g/n;break;case s:$=g/e;break;case i:$=g/t;break;default:$=g}return l?$:b.a($)},m.daysInMonth=function(){return this.endOf(c).$D},m.$locale=function(){return D[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var n=this.clone(),r=w(t,e,!0);return r&&(n.$L=r),n},m.clone=function(){return b.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},M}(),k=_.prototype;return O.prototype=k,[[\"$ms\",r],[\"$s\",i],[\"$m\",s],[\"$H\",u],[\"$W\",a],[\"$M\",c],[\"$y\",h],[\"$D\",d]].forEach((function(t){k[t[1]]=function(e){return this.$g(e,t[0],t[1])}})),O.extend=function(t,e){return t.$i||(t(e,_,O),t.$i=!0),O},O.locale=w,O.isDayjs=S,O.unix=function(t){return O(1e3*t)},O.en=D[g],O.Ls=D,O.p={},O}));\n\n//# sourceURL=webpack://Formio/../core/node_modules/dayjs/dayjs.min.js?");
227
161
 
228
162
  /***/ }),
229
163
 
@@ -243,7 +177,7 @@ eval("!function(e,t){ true?module.exports=t():0}(this,(function(){\"use strict\"
243
177
  \*****************************************************/
244
178
  /***/ (function(module) {
245
179
 
246
- eval("!function(t,e){ true?module.exports=e():0}(this,(function(){\"use strict\";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||\"short\",o=t+\"|\"+i,r=e[o];return r||(r=new Intl.DateTimeFormat(\"en-US\",{hour12:!1,timeZone:t,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,v=r[0]+\"-\"+r[1]+\"-\"+r[2]+\" \"+l+\":\"+r[4]+\":\"+r[5]+\":000\",h=+e;return(o.utc(v).valueOf()-(h-=h%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString(\"en-US\",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a).$set(\"millisecond\",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,\"minute\")}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return\"timezonename\"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\"));return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if(\"string\"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}));\n\n//# sourceURL=webpack://Formio/../core/node_modules/dayjs/plugin/timezone.js?");
180
+ eval("!function(t,e){ true?module.exports=e():0}(this,(function(){\"use strict\";var t={year:0,month:1,day:2,hour:3,minute:4,second:5},e={};return function(n,i,o){var r,a=function(t,n,i){void 0===i&&(i={});var o=new Date(t),r=function(t,n){void 0===n&&(n={});var i=n.timeZoneName||\"short\",o=t+\"|\"+i,r=e[o];return r||(r=new Intl.DateTimeFormat(\"en-US\",{hour12:!1,timeZone:t,year:\"numeric\",month:\"2-digit\",day:\"2-digit\",hour:\"2-digit\",minute:\"2-digit\",second:\"2-digit\",timeZoneName:i}),e[o]=r),r}(n,i);return r.formatToParts(o)},u=function(e,n){for(var i=a(e,n),r=[],u=0;u<i.length;u+=1){var f=i[u],s=f.type,m=f.value,c=t[s];c>=0&&(r[c]=parseInt(m,10))}var d=r[3],l=24===d?0:d,h=r[0]+\"-\"+r[1]+\"-\"+r[2]+\" \"+l+\":\"+r[4]+\":\"+r[5]+\":000\",v=+e;return(o.utc(h).valueOf()-(v-=v%1e3))/6e4},f=i.prototype;f.tz=function(t,e){void 0===t&&(t=r);var n=this.utcOffset(),i=this.toDate(),a=i.toLocaleString(\"en-US\",{timeZone:t}),u=Math.round((i-new Date(a))/1e3/60),f=o(a,{locale:this.$L}).$set(\"millisecond\",this.$ms).utcOffset(15*-Math.round(i.getTimezoneOffset()/15)-u,!0);if(e){var s=f.utcOffset();f=f.add(n-s,\"minute\")}return f.$x.$timezone=t,f},f.offsetName=function(t){var e=this.$x.$timezone||o.tz.guess(),n=a(this.valueOf(),e,{timeZoneName:t}).find((function(t){return\"timezonename\"===t.type.toLowerCase()}));return n&&n.value};var s=f.startOf;f.startOf=function(t,e){if(!this.$x||!this.$x.$timezone)return s.call(this,t,e);var n=o(this.format(\"YYYY-MM-DD HH:mm:ss:SSS\"),{locale:this.$L});return s.call(n,t,e).tz(this.$x.$timezone,!0)},o.tz=function(t,e,n){var i=n&&e,a=n||e||r,f=u(+o(),a);if(\"string\"!=typeof t)return o(t).tz(a);var s=function(t,e,n){var i=t-60*e*1e3,o=u(i,n);if(e===o)return[i,e];var r=u(i-=60*(o-e)*1e3,n);return o===r?[i,o]:[t-60*Math.min(o,r)*1e3,Math.max(o,r)]}(o.utc(t,i).valueOf(),f,a),m=s[0],c=s[1],d=o(m).utcOffset(c);return d.$x.$timezone=a,d},o.tz.guess=function(){return Intl.DateTimeFormat().resolvedOptions().timeZone},o.tz.setDefault=function(t){r=t}}}));\n\n//# sourceURL=webpack://Formio/../core/node_modules/dayjs/plugin/timezone.js?");
247
181
 
248
182
  /***/ }),
249
183
 
@@ -263,7 +197,7 @@ eval("!function(t,i){ true?module.exports=i():0}(this,(function(){\"use strict\"
263
197
  \*****************************************************/
264
198
  /***/ (function(module) {
265
199
 
266
- eval("/*! @license DOMPurify 2.4.7 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.7/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, _typeof(obj);\n }\n\n function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n }\n\n function _isNativeReflectConstruct() {\n if (typeof Reflect === \"undefined\" || !Reflect.construct) return false;\n if (Reflect.construct.sham) return false;\n if (typeof Proxy === \"function\") return true;\n\n try {\n Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n return true;\n } catch (e) {\n return false;\n }\n }\n\n function _construct(Parent, args, Class) {\n if (_isNativeReflectConstruct()) {\n _construct = Reflect.construct;\n } else {\n _construct = function _construct(Parent, args, Class) {\n var a = [null];\n a.push.apply(a, args);\n var Constructor = Function.bind.apply(Parent, a);\n var instance = new Constructor();\n if (Class) _setPrototypeOf(instance, Class.prototype);\n return instance;\n };\n }\n\n return _construct.apply(null, arguments);\n }\n\n function _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();\n }\n\n function _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) return _arrayLikeToArray(arr);\n }\n\n function _iterableToArray(iter) {\n if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter);\n }\n\n function _unsupportedIterableToArray(o, minLen) {\n if (!o) return;\n if (typeof o === \"string\") return _arrayLikeToArray(o, minLen);\n var n = Object.prototype.toString.call(o).slice(8, -1);\n if (n === \"Object\" && o.constructor) n = o.constructor.name;\n if (n === \"Map\" || n === \"Set\") return Array.from(o);\n if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);\n }\n\n function _arrayLikeToArray(arr, len) {\n if (len == null || len > arr.length) len = arr.length;\n\n for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n\n function _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");\n }\n\n var hasOwnProperty = Object.hasOwnProperty,\n setPrototypeOf = Object.setPrototypeOf,\n isFrozen = Object.isFrozen,\n getPrototypeOf = Object.getPrototypeOf,\n getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor;\n var freeze = Object.freeze,\n seal = Object.seal,\n create = Object.create; // eslint-disable-line import/no-mutable-exports\n\n var _ref = typeof Reflect !== 'undefined' && Reflect,\n apply = _ref.apply,\n construct = _ref.construct;\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return _construct(Func, _toConsumableArray(args));\n };\n }\n\n var arrayForEach = unapply(Array.prototype.forEach);\n var arrayPop = unapply(Array.prototype.pop);\n var arrayPush = unapply(Array.prototype.push);\n var stringToLowerCase = unapply(String.prototype.toLowerCase);\n var stringToString = unapply(String.prototype.toString);\n var stringMatch = unapply(String.prototype.match);\n var stringReplace = unapply(String.prototype.replace);\n var stringIndexOf = unapply(String.prototype.indexOf);\n var stringTrim = unapply(String.prototype.trim);\n var regExpTest = unapply(RegExp.prototype.test);\n var typeErrorCreate = unconstruct(TypeError);\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n /* Add properties to a lookup table */\n\n function addToSet(set, array, transformCaseFunc) {\n var _transformCaseFunc;\n\n transformCaseFunc = (_transformCaseFunc = transformCaseFunc) !== null && _transformCaseFunc !== void 0 ? _transformCaseFunc : stringToLowerCase;\n\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n var l = array.length;\n\n while (l--) {\n var element = array[l];\n\n if (typeof element === 'string') {\n var lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n /* Shallow clone an object */\n\n function clone(object) {\n var newObject = create(null);\n var property;\n\n for (property in object) {\n if (apply(hasOwnProperty, object, [property]) === true) {\n newObject[property] = object[property];\n }\n }\n\n return newObject;\n }\n /* IE10 doesn't support __lookupGetter__ so lets'\n * simulate it. It also automatically checks\n * if the prop is function or getter and behaves\n * accordingly. */\n\n function lookupGetter(object, prop) {\n while (object !== null) {\n var desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n var html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\n var svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n var svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n\n var svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'fedropshadow', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n var mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover']); // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n\n var mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n var text = freeze(['#text']);\n\n var html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n var svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n var mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n var xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n var MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n var ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n var TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n var DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n var ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n var IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n var IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n var ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n var DOCTYPE_NAME = seal(/^html$/i);\n\n var getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {Document} document The document object (to determine policy name suffix)\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported).\n */\n\n\n var _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, document) {\n if (_typeof(trustedTypes) !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n\n var suffix = null;\n var ATTR_NAME = 'data-tt-policy-suffix';\n\n if (document.currentScript && document.currentScript.hasAttribute(ATTR_NAME)) {\n suffix = document.currentScript.getAttribute(ATTR_NAME);\n }\n\n var policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML: function createHTML(html) {\n return html;\n },\n createScriptURL: function createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n var window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n var DOMPurify = function DOMPurify(root) {\n return createDOMPurify(root);\n };\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n\n DOMPurify.version = '2.4.7';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n\n var originalDocument = window.document;\n var document = window.document;\n var DocumentFragment = window.DocumentFragment,\n HTMLTemplateElement = window.HTMLTemplateElement,\n Node = window.Node,\n Element = window.Element,\n NodeFilter = window.NodeFilter,\n _window$NamedNodeMap = window.NamedNodeMap,\n NamedNodeMap = _window$NamedNodeMap === void 0 ? window.NamedNodeMap || window.MozNamedAttrMap : _window$NamedNodeMap,\n HTMLFormElement = window.HTMLFormElement,\n DOMParser = window.DOMParser,\n trustedTypes = window.trustedTypes;\n var ElementPrototype = Element.prototype;\n var cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n var getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n var getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n var getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n var template = document.createElement('template');\n\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n var trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, originalDocument);\n\n var emptyHTML = trustedTypesPolicy ? trustedTypesPolicy.createHTML('') : '';\n var _document = document,\n implementation = _document.implementation,\n createNodeIterator = _document.createNodeIterator,\n createDocumentFragment = _document.createDocumentFragment,\n getElementsByTagName = _document.getElementsByTagName;\n var importNode = originalDocument.importNode;\n var documentMode = {};\n\n try {\n documentMode = clone(document).documentMode ? document.documentMode : {};\n } catch (_) {}\n\n var hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined && documentMode !== 9;\n var MUSTACHE_EXPR$1 = MUSTACHE_EXPR,\n ERB_EXPR$1 = ERB_EXPR,\n TMPLIT_EXPR$1 = TMPLIT_EXPR,\n DATA_ATTR$1 = DATA_ATTR,\n ARIA_ATTR$1 = ARIA_ATTR,\n IS_SCRIPT_OR_DATA$1 = IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE$1 = ATTR_WHITESPACE;\n var IS_ALLOWED_URI$1 = IS_ALLOWED_URI;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n var ALLOWED_TAGS = null;\n var DEFAULT_ALLOWED_TAGS = addToSet({}, [].concat(_toConsumableArray(html$1), _toConsumableArray(svg$1), _toConsumableArray(svgFilters), _toConsumableArray(mathMl$1), _toConsumableArray(text)));\n /* Allowed attribute names */\n\n var ALLOWED_ATTR = null;\n var DEFAULT_ALLOWED_ATTR = addToSet({}, [].concat(_toConsumableArray(html), _toConsumableArray(svg), _toConsumableArray(mathMl), _toConsumableArray(xml)));\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n var CUSTOM_ELEMENT_HANDLING = Object.seal(Object.create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n var FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n var FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n var ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n var ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n var ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n\n var ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n var SAFE_FOR_TEMPLATES = false;\n /* Decide if document with <html>... should be returned */\n\n var WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n var SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n var FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n var RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n var RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n var RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n\n var SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n\n var SANITIZE_NAMED_PROPS = false;\n var SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n\n var KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n var IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n var USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n var FORBID_CONTENTS = null;\n var DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n\n var DATA_URI_TAGS = null;\n var DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n var URI_SAFE_ATTRIBUTES = null;\n var DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n var MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n var HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n var NAMESPACE = HTML_NAMESPACE;\n var IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n\n var ALLOWED_NAMESPACES = null;\n var DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n /* Parsing of strict XHTML documents */\n\n var PARSER_MEDIA_TYPE;\n var SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n var DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n var transformCaseFunc;\n /* Keep a reference to config to pass to hooks */\n\n var CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n var formElement = document.createElement('form');\n\n var isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n\n var _parseConfig = function _parseConfig(cfg) {\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n\n if (!cfg || _typeof(cfg) !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI$1;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, _toConsumableArray(text));\n ALLOWED_ATTR = [];\n\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n var MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n var HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n var COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n var ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n var ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n *\n *\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n var _checkValidNamespace = function _checkValidNamespace(element) {\n var parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n\n var tagName = stringToLowerCase(element.tagName);\n var parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via`\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // For XHTML and XML documents that support custom namespaces\n\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n\n var _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n try {\n node.outerHTML = emptyHTML;\n } catch (_) {\n node.remove();\n }\n }\n };\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n\n\n var _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n\n var _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n var doc;\n var leadingWhitespace;\n\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n var matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n\n var dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n\n var body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * _createIterator\n *\n * @param {Document} root document/fragment to create iterator for\n * @return {Iterator} iterator instance\n */\n\n\n var _createIterator = function _createIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null, false);\n };\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n\n\n var _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n /**\n * _isNode\n *\n * @param {Node} obj object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n\n var _isNode = function _isNode(object) {\n return _typeof(Node) === 'object' ? object instanceof Node : object && _typeof(object) === 'object' && typeof object.nodeType === 'number' && typeof object.nodeName === 'string';\n };\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n\n\n var _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], function (hook) {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n\n\n var _sanitizeElements = function _sanitizeElements(currentNode) {\n var content;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check if tagname contains Unicode */\n\n\n if (regExpTest(/[\\u0080-\\uFFFF]/, currentNode.nodeName)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Now let's check the element's type and name */\n\n\n var tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName: tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && (!_isNode(currentNode.content) || !_isNode(currentNode.content.firstElementChild)) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Mitigate a problem with templates inside select */\n\n\n if (tagName === 'select' && regExpTest(/<template/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Remove element if anything forbids its presence */\n\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _basicCustomElementTest(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) return false;\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) return false;\n }\n /* Keep content except for bad-listed elements */\n\n\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n var parentNode = getParentNode(currentNode) || currentNode.parentNode;\n var childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n var childCount = childNodes.length;\n\n for (var i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check whether element has a valid namespace */\n\n\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Make sure that older browsers don't get fallback-tag mXSS */\n\n\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Sanitize element content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n content = stringReplace(content, MUSTACHE_EXPR$1, ' ');\n content = stringReplace(content, ERB_EXPR$1, ' ');\n content = stringReplace(content, TMPLIT_EXPR$1, ' ');\n\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n\n\n var _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n\n\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR$1, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR$1, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _basicCustomElementTest(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA$1, stringReplace(value, ATTR_WHITESPACE$1, ''))) ; else if (value) {\n return false;\n } else ;\n\n return true;\n };\n /**\n * _basicCustomElementCheck\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n * @param {string} tagName name of the tag of the node to sanitize\n */\n\n\n var _basicCustomElementTest = function _basicCustomElementTest(tagName) {\n return tagName.indexOf('-') > 0;\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n\n\n var _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n var attr;\n var value;\n var lcName;\n var l;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n var attributes = currentNode.attributes;\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n\n var hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n l = attributes.length;\n /* Go backwards over all attributes; safely remove bad ones */\n\n while (l--) {\n attr = attributes[l];\n var _attr = attr,\n name = _attr.name,\n namespaceURI = _attr.namespaceURI;\n value = name === 'value' ? attr.value : stringTrim(attr.value);\n lcName = transformCaseFunc(name);\n /* Execute a hook if present */\n\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Remove attribute */\n\n\n _removeAttribute(name, currentNode);\n /* Did the hooks approve of the attribute? */\n\n\n if (!hookEvent.keepAttr) {\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n\n\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n value = stringReplace(value, MUSTACHE_EXPR$1, ' ');\n value = stringReplace(value, ERB_EXPR$1, ' ');\n value = stringReplace(value, TMPLIT_EXPR$1, ' ');\n }\n /* Is `value` valid for this attribute? */\n\n\n var lcTag = transformCaseFunc(currentNode.nodeName);\n\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n\n\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value\n\n\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n /* Handle attributes that require Trusted Types */\n\n\n if (trustedTypesPolicy && _typeof(trustedTypes) === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n /* Handle invalid data-* attribute set by try-catching it */\n\n\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n\n\n var _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n var shadowNode;\n\n var shadowIterator = _createIterator(fragment);\n /* Execute a hook if present */\n\n\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n /* Sanitize tags and elements */\n\n\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n /* Deep shadow DOM detected */\n\n\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(shadowNode);\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} configuration object\n */\n // eslint-disable-next-line complexity\n\n\n DOMPurify.sanitize = function (dirty) {\n var cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n var body;\n var importedNode;\n var currentNode;\n var oldNode;\n var returnNode;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n\n IS_EMPTY_INPUT = !dirty;\n\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n /* Stringify, in case dirty is an object */\n\n\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n /* Check we can run. Otherwise fall back or ignore */\n\n\n if (!DOMPurify.isSupported) {\n if (_typeof(window.toStaticHTML) === 'object' || typeof window.toStaticHTML === 'function') {\n if (typeof dirty === 'string') {\n return window.toStaticHTML(dirty);\n }\n\n if (_isNode(dirty)) {\n return window.toStaticHTML(dirty.outerHTML);\n }\n }\n\n return dirty;\n }\n /* Assign config vars */\n\n\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n /* Clean up removed elements */\n\n\n DOMPurify.removed = [];\n /* Check if dirty is correctly typed for IN_PLACE */\n\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n var tagName = transformCaseFunc(dirty.nodeName);\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n\n\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n\n\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n\n\n var nodeIterator = _createIterator(IN_PLACE ? dirty : body);\n /* Now start iterating over the created document */\n\n\n while (currentNode = nodeIterator.nextNode()) {\n /* Fix IE's strange behavior with manipulated textNodes #89 */\n if (currentNode.nodeType === 3 && currentNode === oldNode) {\n continue;\n }\n /* Sanitize tags and elements */\n\n\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n /* Shadow DOM detected, sanitize it */\n\n\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(currentNode);\n\n oldNode = currentNode;\n }\n\n oldNode = null;\n /* If we sanitized `dirty` in-place, return it. */\n\n if (IN_PLACE) {\n return dirty;\n }\n /* Return sanitized string or DOM */\n\n\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmod) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n var serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n serializedHTML = stringReplace(serializedHTML, MUSTACHE_EXPR$1, ' ');\n serializedHTML = stringReplace(serializedHTML, ERB_EXPR$1, ' ');\n serializedHTML = stringReplace(serializedHTML, TMPLIT_EXPR$1, ' ');\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n\n\n DOMPurify.setConfig = function (cfg) {\n _parseConfig(cfg);\n\n SET_CONFIG = true;\n };\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n\n\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {string} tag Tag name of containing element.\n * @param {string} attr Attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n\n\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n var lcTag = transformCaseFunc(tag);\n var lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n\n\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n\n\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n\n\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n *\n */\n\n\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n }\n\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n\n\n//# sourceURL=webpack://Formio/../core/node_modules/dompurify/dist/purify.js?");
200
+ eval("/*! @license DOMPurify 3.0.6 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.0.6/LICENSE */\n\n(function (global, factory) {\n true ? module.exports = factory() :\n 0;\n})(this, (function () { 'use strict';\n\n const {\n entries,\n setPrototypeOf,\n isFrozen,\n getPrototypeOf,\n getOwnPropertyDescriptor\n } = Object;\n let {\n freeze,\n seal,\n create\n } = Object; // eslint-disable-line import/no-mutable-exports\n\n let {\n apply,\n construct\n } = typeof Reflect !== 'undefined' && Reflect;\n\n if (!freeze) {\n freeze = function freeze(x) {\n return x;\n };\n }\n\n if (!seal) {\n seal = function seal(x) {\n return x;\n };\n }\n\n if (!apply) {\n apply = function apply(fun, thisValue, args) {\n return fun.apply(thisValue, args);\n };\n }\n\n if (!construct) {\n construct = function construct(Func, args) {\n return new Func(...args);\n };\n }\n\n const arrayForEach = unapply(Array.prototype.forEach);\n const arrayPop = unapply(Array.prototype.pop);\n const arrayPush = unapply(Array.prototype.push);\n const stringToLowerCase = unapply(String.prototype.toLowerCase);\n const stringToString = unapply(String.prototype.toString);\n const stringMatch = unapply(String.prototype.match);\n const stringReplace = unapply(String.prototype.replace);\n const stringIndexOf = unapply(String.prototype.indexOf);\n const stringTrim = unapply(String.prototype.trim);\n const regExpTest = unapply(RegExp.prototype.test);\n const typeErrorCreate = unconstruct(TypeError);\n /**\n * Creates a new function that calls the given function with a specified thisArg and arguments.\n *\n * @param {Function} func - The function to be wrapped and called.\n * @returns {Function} A new function that calls the given function with a specified thisArg and arguments.\n */\n\n function unapply(func) {\n return function (thisArg) {\n for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n args[_key - 1] = arguments[_key];\n }\n\n return apply(func, thisArg, args);\n };\n }\n /**\n * Creates a new function that constructs an instance of the given constructor function with the provided arguments.\n *\n * @param {Function} func - The constructor function to be wrapped and called.\n * @returns {Function} A new function that constructs an instance of the given constructor function with the provided arguments.\n */\n\n\n function unconstruct(func) {\n return function () {\n for (var _len2 = arguments.length, args = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {\n args[_key2] = arguments[_key2];\n }\n\n return construct(func, args);\n };\n }\n /**\n * Add properties to a lookup table\n *\n * @param {Object} set - The set to which elements will be added.\n * @param {Array} array - The array containing elements to be added to the set.\n * @param {Function} transformCaseFunc - An optional function to transform the case of each element before adding to the set.\n * @returns {Object} The modified set with added elements.\n */\n\n\n function addToSet(set, array) {\n let transformCaseFunc = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : stringToLowerCase;\n\n if (setPrototypeOf) {\n // Make 'in' and truthy checks like Boolean(set.constructor)\n // independent of any properties defined on Object.prototype.\n // Prevent prototype setters from intercepting set as a this value.\n setPrototypeOf(set, null);\n }\n\n let l = array.length;\n\n while (l--) {\n let element = array[l];\n\n if (typeof element === 'string') {\n const lcElement = transformCaseFunc(element);\n\n if (lcElement !== element) {\n // Config presets (e.g. tags.js, attrs.js) are immutable.\n if (!isFrozen(array)) {\n array[l] = lcElement;\n }\n\n element = lcElement;\n }\n }\n\n set[element] = true;\n }\n\n return set;\n }\n /**\n * Shallow clone an object\n *\n * @param {Object} object - The object to be cloned.\n * @returns {Object} A new object that copies the original.\n */\n\n\n function clone(object) {\n const newObject = create(null);\n\n for (const [property, value] of entries(object)) {\n if (getOwnPropertyDescriptor(object, property) !== undefined) {\n newObject[property] = value;\n }\n }\n\n return newObject;\n }\n /**\n * This method automatically checks if the prop is function or getter and behaves accordingly.\n *\n * @param {Object} object - The object to look up the getter function in its prototype chain.\n * @param {String} prop - The property name for which to find the getter function.\n * @returns {Function} The getter function found in the prototype chain or a fallback function.\n */\n\n function lookupGetter(object, prop) {\n while (object !== null) {\n const desc = getOwnPropertyDescriptor(object, prop);\n\n if (desc) {\n if (desc.get) {\n return unapply(desc.get);\n }\n\n if (typeof desc.value === 'function') {\n return unapply(desc.value);\n }\n }\n\n object = getPrototypeOf(object);\n }\n\n function fallbackValue(element) {\n console.warn('fallback value for', element);\n return null;\n }\n\n return fallbackValue;\n }\n\n const html$1 = freeze(['a', 'abbr', 'acronym', 'address', 'area', 'article', 'aside', 'audio', 'b', 'bdi', 'bdo', 'big', 'blink', 'blockquote', 'body', 'br', 'button', 'canvas', 'caption', 'center', 'cite', 'code', 'col', 'colgroup', 'content', 'data', 'datalist', 'dd', 'decorator', 'del', 'details', 'dfn', 'dialog', 'dir', 'div', 'dl', 'dt', 'element', 'em', 'fieldset', 'figcaption', 'figure', 'font', 'footer', 'form', 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'head', 'header', 'hgroup', 'hr', 'html', 'i', 'img', 'input', 'ins', 'kbd', 'label', 'legend', 'li', 'main', 'map', 'mark', 'marquee', 'menu', 'menuitem', 'meter', 'nav', 'nobr', 'ol', 'optgroup', 'option', 'output', 'p', 'picture', 'pre', 'progress', 'q', 'rp', 'rt', 'ruby', 's', 'samp', 'section', 'select', 'shadow', 'small', 'source', 'spacer', 'span', 'strike', 'strong', 'style', 'sub', 'summary', 'sup', 'table', 'tbody', 'td', 'template', 'textarea', 'tfoot', 'th', 'thead', 'time', 'tr', 'track', 'tt', 'u', 'ul', 'var', 'video', 'wbr']); // SVG\n\n const svg$1 = freeze(['svg', 'a', 'altglyph', 'altglyphdef', 'altglyphitem', 'animatecolor', 'animatemotion', 'animatetransform', 'circle', 'clippath', 'defs', 'desc', 'ellipse', 'filter', 'font', 'g', 'glyph', 'glyphref', 'hkern', 'image', 'line', 'lineargradient', 'marker', 'mask', 'metadata', 'mpath', 'path', 'pattern', 'polygon', 'polyline', 'radialgradient', 'rect', 'stop', 'style', 'switch', 'symbol', 'text', 'textpath', 'title', 'tref', 'tspan', 'view', 'vkern']);\n const svgFilters = freeze(['feBlend', 'feColorMatrix', 'feComponentTransfer', 'feComposite', 'feConvolveMatrix', 'feDiffuseLighting', 'feDisplacementMap', 'feDistantLight', 'feDropShadow', 'feFlood', 'feFuncA', 'feFuncB', 'feFuncG', 'feFuncR', 'feGaussianBlur', 'feImage', 'feMerge', 'feMergeNode', 'feMorphology', 'feOffset', 'fePointLight', 'feSpecularLighting', 'feSpotLight', 'feTile', 'feTurbulence']); // List of SVG elements that are disallowed by default.\n // We still need to know them so that we can do namespace\n // checks properly in case one wants to add them to\n // allow-list.\n\n const svgDisallowed = freeze(['animate', 'color-profile', 'cursor', 'discard', 'font-face', 'font-face-format', 'font-face-name', 'font-face-src', 'font-face-uri', 'foreignobject', 'hatch', 'hatchpath', 'mesh', 'meshgradient', 'meshpatch', 'meshrow', 'missing-glyph', 'script', 'set', 'solidcolor', 'unknown', 'use']);\n const mathMl$1 = freeze(['math', 'menclose', 'merror', 'mfenced', 'mfrac', 'mglyph', 'mi', 'mlabeledtr', 'mmultiscripts', 'mn', 'mo', 'mover', 'mpadded', 'mphantom', 'mroot', 'mrow', 'ms', 'mspace', 'msqrt', 'mstyle', 'msub', 'msup', 'msubsup', 'mtable', 'mtd', 'mtext', 'mtr', 'munder', 'munderover', 'mprescripts']); // Similarly to SVG, we want to know all MathML elements,\n // even those that we disallow by default.\n\n const mathMlDisallowed = freeze(['maction', 'maligngroup', 'malignmark', 'mlongdiv', 'mscarries', 'mscarry', 'msgroup', 'mstack', 'msline', 'msrow', 'semantics', 'annotation', 'annotation-xml', 'mprescripts', 'none']);\n const text = freeze(['#text']);\n\n const html = freeze(['accept', 'action', 'align', 'alt', 'autocapitalize', 'autocomplete', 'autopictureinpicture', 'autoplay', 'background', 'bgcolor', 'border', 'capture', 'cellpadding', 'cellspacing', 'checked', 'cite', 'class', 'clear', 'color', 'cols', 'colspan', 'controls', 'controlslist', 'coords', 'crossorigin', 'datetime', 'decoding', 'default', 'dir', 'disabled', 'disablepictureinpicture', 'disableremoteplayback', 'download', 'draggable', 'enctype', 'enterkeyhint', 'face', 'for', 'headers', 'height', 'hidden', 'high', 'href', 'hreflang', 'id', 'inputmode', 'integrity', 'ismap', 'kind', 'label', 'lang', 'list', 'loading', 'loop', 'low', 'max', 'maxlength', 'media', 'method', 'min', 'minlength', 'multiple', 'muted', 'name', 'nonce', 'noshade', 'novalidate', 'nowrap', 'open', 'optimum', 'pattern', 'placeholder', 'playsinline', 'poster', 'preload', 'pubdate', 'radiogroup', 'readonly', 'rel', 'required', 'rev', 'reversed', 'role', 'rows', 'rowspan', 'spellcheck', 'scope', 'selected', 'shape', 'size', 'sizes', 'span', 'srclang', 'start', 'src', 'srcset', 'step', 'style', 'summary', 'tabindex', 'title', 'translate', 'type', 'usemap', 'valign', 'value', 'width', 'xmlns', 'slot']);\n const svg = freeze(['accent-height', 'accumulate', 'additive', 'alignment-baseline', 'ascent', 'attributename', 'attributetype', 'azimuth', 'basefrequency', 'baseline-shift', 'begin', 'bias', 'by', 'class', 'clip', 'clippathunits', 'clip-path', 'clip-rule', 'color', 'color-interpolation', 'color-interpolation-filters', 'color-profile', 'color-rendering', 'cx', 'cy', 'd', 'dx', 'dy', 'diffuseconstant', 'direction', 'display', 'divisor', 'dur', 'edgemode', 'elevation', 'end', 'fill', 'fill-opacity', 'fill-rule', 'filter', 'filterunits', 'flood-color', 'flood-opacity', 'font-family', 'font-size', 'font-size-adjust', 'font-stretch', 'font-style', 'font-variant', 'font-weight', 'fx', 'fy', 'g1', 'g2', 'glyph-name', 'glyphref', 'gradientunits', 'gradienttransform', 'height', 'href', 'id', 'image-rendering', 'in', 'in2', 'k', 'k1', 'k2', 'k3', 'k4', 'kerning', 'keypoints', 'keysplines', 'keytimes', 'lang', 'lengthadjust', 'letter-spacing', 'kernelmatrix', 'kernelunitlength', 'lighting-color', 'local', 'marker-end', 'marker-mid', 'marker-start', 'markerheight', 'markerunits', 'markerwidth', 'maskcontentunits', 'maskunits', 'max', 'mask', 'media', 'method', 'mode', 'min', 'name', 'numoctaves', 'offset', 'operator', 'opacity', 'order', 'orient', 'orientation', 'origin', 'overflow', 'paint-order', 'path', 'pathlength', 'patterncontentunits', 'patterntransform', 'patternunits', 'points', 'preservealpha', 'preserveaspectratio', 'primitiveunits', 'r', 'rx', 'ry', 'radius', 'refx', 'refy', 'repeatcount', 'repeatdur', 'restart', 'result', 'rotate', 'scale', 'seed', 'shape-rendering', 'specularconstant', 'specularexponent', 'spreadmethod', 'startoffset', 'stddeviation', 'stitchtiles', 'stop-color', 'stop-opacity', 'stroke-dasharray', 'stroke-dashoffset', 'stroke-linecap', 'stroke-linejoin', 'stroke-miterlimit', 'stroke-opacity', 'stroke', 'stroke-width', 'style', 'surfacescale', 'systemlanguage', 'tabindex', 'targetx', 'targety', 'transform', 'transform-origin', 'text-anchor', 'text-decoration', 'text-rendering', 'textlength', 'type', 'u1', 'u2', 'unicode', 'values', 'viewbox', 'visibility', 'version', 'vert-adv-y', 'vert-origin-x', 'vert-origin-y', 'width', 'word-spacing', 'wrap', 'writing-mode', 'xchannelselector', 'ychannelselector', 'x', 'x1', 'x2', 'xmlns', 'y', 'y1', 'y2', 'z', 'zoomandpan']);\n const mathMl = freeze(['accent', 'accentunder', 'align', 'bevelled', 'close', 'columnsalign', 'columnlines', 'columnspan', 'denomalign', 'depth', 'dir', 'display', 'displaystyle', 'encoding', 'fence', 'frame', 'height', 'href', 'id', 'largeop', 'length', 'linethickness', 'lspace', 'lquote', 'mathbackground', 'mathcolor', 'mathsize', 'mathvariant', 'maxsize', 'minsize', 'movablelimits', 'notation', 'numalign', 'open', 'rowalign', 'rowlines', 'rowspacing', 'rowspan', 'rspace', 'rquote', 'scriptlevel', 'scriptminsize', 'scriptsizemultiplier', 'selection', 'separator', 'separators', 'stretchy', 'subscriptshift', 'supscriptshift', 'symmetric', 'voffset', 'width', 'xmlns']);\n const xml = freeze(['xlink:href', 'xml:id', 'xlink:title', 'xml:space', 'xmlns:xlink']);\n\n const MUSTACHE_EXPR = seal(/\\{\\{[\\w\\W]*|[\\w\\W]*\\}\\}/gm); // Specify template detection regex for SAFE_FOR_TEMPLATES mode\n\n const ERB_EXPR = seal(/<%[\\w\\W]*|[\\w\\W]*%>/gm);\n const TMPLIT_EXPR = seal(/\\${[\\w\\W]*}/gm);\n const DATA_ATTR = seal(/^data-[\\-\\w.\\u00B7-\\uFFFF]/); // eslint-disable-line no-useless-escape\n\n const ARIA_ATTR = seal(/^aria-[\\-\\w]+$/); // eslint-disable-line no-useless-escape\n\n const IS_ALLOWED_URI = seal(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\\-]+(?:[^a-z+.\\-:]|$))/i // eslint-disable-line no-useless-escape\n );\n const IS_SCRIPT_OR_DATA = seal(/^(?:\\w+script|data):/i);\n const ATTR_WHITESPACE = seal(/[\\u0000-\\u0020\\u00A0\\u1680\\u180E\\u2000-\\u2029\\u205F\\u3000]/g // eslint-disable-line no-control-regex\n );\n const DOCTYPE_NAME = seal(/^html$/i);\n\n var EXPRESSIONS = /*#__PURE__*/Object.freeze({\n __proto__: null,\n MUSTACHE_EXPR: MUSTACHE_EXPR,\n ERB_EXPR: ERB_EXPR,\n TMPLIT_EXPR: TMPLIT_EXPR,\n DATA_ATTR: DATA_ATTR,\n ARIA_ATTR: ARIA_ATTR,\n IS_ALLOWED_URI: IS_ALLOWED_URI,\n IS_SCRIPT_OR_DATA: IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE: ATTR_WHITESPACE,\n DOCTYPE_NAME: DOCTYPE_NAME\n });\n\n const getGlobal = function getGlobal() {\n return typeof window === 'undefined' ? null : window;\n };\n /**\n * Creates a no-op policy for internal use only.\n * Don't export this function outside this module!\n * @param {?TrustedTypePolicyFactory} trustedTypes The policy factory.\n * @param {HTMLScriptElement} purifyHostElement The Script element used to load DOMPurify (to determine policy name suffix).\n * @return {?TrustedTypePolicy} The policy created (or null, if Trusted Types\n * are not supported or creating the policy failed).\n */\n\n\n const _createTrustedTypesPolicy = function _createTrustedTypesPolicy(trustedTypes, purifyHostElement) {\n if (typeof trustedTypes !== 'object' || typeof trustedTypes.createPolicy !== 'function') {\n return null;\n } // Allow the callers to control the unique policy name\n // by adding a data-tt-policy-suffix to the script element with the DOMPurify.\n // Policy creation with duplicate names throws in Trusted Types.\n\n\n let suffix = null;\n const ATTR_NAME = 'data-tt-policy-suffix';\n\n if (purifyHostElement && purifyHostElement.hasAttribute(ATTR_NAME)) {\n suffix = purifyHostElement.getAttribute(ATTR_NAME);\n }\n\n const policyName = 'dompurify' + (suffix ? '#' + suffix : '');\n\n try {\n return trustedTypes.createPolicy(policyName, {\n createHTML(html) {\n return html;\n },\n\n createScriptURL(scriptUrl) {\n return scriptUrl;\n }\n\n });\n } catch (_) {\n // Policy creation failed (most likely another DOMPurify script has\n // already run). Skip creating the policy, as this will only cause errors\n // if TT are enforced.\n console.warn('TrustedTypes policy ' + policyName + ' could not be created.');\n return null;\n }\n };\n\n function createDOMPurify() {\n let window = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : getGlobal();\n\n const DOMPurify = root => createDOMPurify(root);\n /**\n * Version label, exposed for easier checks\n * if DOMPurify is up to date or not\n */\n\n\n DOMPurify.version = '3.0.6';\n /**\n * Array of elements that DOMPurify removed during sanitation.\n * Empty if nothing was removed.\n */\n\n DOMPurify.removed = [];\n\n if (!window || !window.document || window.document.nodeType !== 9) {\n // Not running in a browser, provide a factory function\n // so that you can pass your own Window\n DOMPurify.isSupported = false;\n return DOMPurify;\n }\n\n let {\n document\n } = window;\n const originalDocument = document;\n const currentScript = originalDocument.currentScript;\n const {\n DocumentFragment,\n HTMLTemplateElement,\n Node,\n Element,\n NodeFilter,\n NamedNodeMap = window.NamedNodeMap || window.MozNamedAttrMap,\n HTMLFormElement,\n DOMParser,\n trustedTypes\n } = window;\n const ElementPrototype = Element.prototype;\n const cloneNode = lookupGetter(ElementPrototype, 'cloneNode');\n const getNextSibling = lookupGetter(ElementPrototype, 'nextSibling');\n const getChildNodes = lookupGetter(ElementPrototype, 'childNodes');\n const getParentNode = lookupGetter(ElementPrototype, 'parentNode'); // As per issue #47, the web-components registry is inherited by a\n // new document created via createHTMLDocument. As per the spec\n // (http://w3c.github.io/webcomponents/spec/custom/#creating-and-passing-registries)\n // a new empty registry is used when creating a template contents owner\n // document, so we use that as our parent document to ensure nothing\n // is inherited.\n\n if (typeof HTMLTemplateElement === 'function') {\n const template = document.createElement('template');\n\n if (template.content && template.content.ownerDocument) {\n document = template.content.ownerDocument;\n }\n }\n\n let trustedTypesPolicy;\n let emptyHTML = '';\n const {\n implementation,\n createNodeIterator,\n createDocumentFragment,\n getElementsByTagName\n } = document;\n const {\n importNode\n } = originalDocument;\n let hooks = {};\n /**\n * Expose whether this browser supports running the full DOMPurify.\n */\n\n DOMPurify.isSupported = typeof entries === 'function' && typeof getParentNode === 'function' && implementation && implementation.createHTMLDocument !== undefined;\n const {\n MUSTACHE_EXPR,\n ERB_EXPR,\n TMPLIT_EXPR,\n DATA_ATTR,\n ARIA_ATTR,\n IS_SCRIPT_OR_DATA,\n ATTR_WHITESPACE\n } = EXPRESSIONS;\n let {\n IS_ALLOWED_URI: IS_ALLOWED_URI$1\n } = EXPRESSIONS;\n /**\n * We consider the elements and attributes below to be safe. Ideally\n * don't add any new ones but feel free to remove unwanted ones.\n */\n\n /* allowed element names */\n\n let ALLOWED_TAGS = null;\n const DEFAULT_ALLOWED_TAGS = addToSet({}, [...html$1, ...svg$1, ...svgFilters, ...mathMl$1, ...text]);\n /* Allowed attribute names */\n\n let ALLOWED_ATTR = null;\n const DEFAULT_ALLOWED_ATTR = addToSet({}, [...html, ...svg, ...mathMl, ...xml]);\n /*\n * Configure how DOMPUrify should handle custom elements and their attributes as well as customized built-in elements.\n * @property {RegExp|Function|null} tagNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any custom elements)\n * @property {RegExp|Function|null} attributeNameCheck one of [null, regexPattern, predicate]. Default: `null` (disallow any attributes not on the allow list)\n * @property {boolean} allowCustomizedBuiltInElements allow custom elements derived from built-ins if they pass CUSTOM_ELEMENT_HANDLING.tagNameCheck. Default: `false`.\n */\n\n let CUSTOM_ELEMENT_HANDLING = Object.seal(create(null, {\n tagNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n attributeNameCheck: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: null\n },\n allowCustomizedBuiltInElements: {\n writable: true,\n configurable: false,\n enumerable: true,\n value: false\n }\n }));\n /* Explicitly forbidden tags (overrides ALLOWED_TAGS/ADD_TAGS) */\n\n let FORBID_TAGS = null;\n /* Explicitly forbidden attributes (overrides ALLOWED_ATTR/ADD_ATTR) */\n\n let FORBID_ATTR = null;\n /* Decide if ARIA attributes are okay */\n\n let ALLOW_ARIA_ATTR = true;\n /* Decide if custom data attributes are okay */\n\n let ALLOW_DATA_ATTR = true;\n /* Decide if unknown protocols are okay */\n\n let ALLOW_UNKNOWN_PROTOCOLS = false;\n /* Decide if self-closing tags in attributes are allowed.\n * Usually removed due to a mXSS issue in jQuery 3.0 */\n\n let ALLOW_SELF_CLOSE_IN_ATTR = true;\n /* Output should be safe for common template engines.\n * This means, DOMPurify removes data attributes, mustaches and ERB\n */\n\n let SAFE_FOR_TEMPLATES = false;\n /* Decide if document with <html>... should be returned */\n\n let WHOLE_DOCUMENT = false;\n /* Track whether config is already set on this instance of DOMPurify. */\n\n let SET_CONFIG = false;\n /* Decide if all elements (e.g. style, script) must be children of\n * document.body. By default, browsers might move them to document.head */\n\n let FORCE_BODY = false;\n /* Decide if a DOM `HTMLBodyElement` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported).\n * If `WHOLE_DOCUMENT` is enabled a `HTMLHtmlElement` will be returned instead\n */\n\n let RETURN_DOM = false;\n /* Decide if a DOM `DocumentFragment` should be returned, instead of a html\n * string (or a TrustedHTML object if Trusted Types are supported) */\n\n let RETURN_DOM_FRAGMENT = false;\n /* Try to return a Trusted Type object instead of a string, return a string in\n * case Trusted Types are not supported */\n\n let RETURN_TRUSTED_TYPE = false;\n /* Output should be free from DOM clobbering attacks?\n * This sanitizes markups named with colliding, clobberable built-in DOM APIs.\n */\n\n let SANITIZE_DOM = true;\n /* Achieve full DOM Clobbering protection by isolating the namespace of named\n * properties and JS variables, mitigating attacks that abuse the HTML/DOM spec rules.\n *\n * HTML/DOM spec rules that enable DOM Clobbering:\n * - Named Access on Window (§7.3.3)\n * - DOM Tree Accessors (§3.1.5)\n * - Form Element Parent-Child Relations (§4.10.3)\n * - Iframe srcdoc / Nested WindowProxies (§4.8.5)\n * - HTMLCollection (§4.2.10.2)\n *\n * Namespace isolation is implemented by prefixing `id` and `name` attributes\n * with a constant string, i.e., `user-content-`\n */\n\n let SANITIZE_NAMED_PROPS = false;\n const SANITIZE_NAMED_PROPS_PREFIX = 'user-content-';\n /* Keep element content when removing element? */\n\n let KEEP_CONTENT = true;\n /* If a `Node` is passed to sanitize(), then performs sanitization in-place instead\n * of importing it into a new Document and returning a sanitized copy */\n\n let IN_PLACE = false;\n /* Allow usage of profiles like html, svg and mathMl */\n\n let USE_PROFILES = {};\n /* Tags to ignore content of when KEEP_CONTENT is true */\n\n let FORBID_CONTENTS = null;\n const DEFAULT_FORBID_CONTENTS = addToSet({}, ['annotation-xml', 'audio', 'colgroup', 'desc', 'foreignobject', 'head', 'iframe', 'math', 'mi', 'mn', 'mo', 'ms', 'mtext', 'noembed', 'noframes', 'noscript', 'plaintext', 'script', 'style', 'svg', 'template', 'thead', 'title', 'video', 'xmp']);\n /* Tags that are safe for data: URIs */\n\n let DATA_URI_TAGS = null;\n const DEFAULT_DATA_URI_TAGS = addToSet({}, ['audio', 'video', 'img', 'source', 'image', 'track']);\n /* Attributes safe for values like \"javascript:\" */\n\n let URI_SAFE_ATTRIBUTES = null;\n const DEFAULT_URI_SAFE_ATTRIBUTES = addToSet({}, ['alt', 'class', 'for', 'id', 'label', 'name', 'pattern', 'placeholder', 'role', 'summary', 'title', 'value', 'style', 'xmlns']);\n const MATHML_NAMESPACE = 'http://www.w3.org/1998/Math/MathML';\n const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';\n const HTML_NAMESPACE = 'http://www.w3.org/1999/xhtml';\n /* Document namespace */\n\n let NAMESPACE = HTML_NAMESPACE;\n let IS_EMPTY_INPUT = false;\n /* Allowed XHTML+XML namespaces */\n\n let ALLOWED_NAMESPACES = null;\n const DEFAULT_ALLOWED_NAMESPACES = addToSet({}, [MATHML_NAMESPACE, SVG_NAMESPACE, HTML_NAMESPACE], stringToString);\n /* Parsing of strict XHTML documents */\n\n let PARSER_MEDIA_TYPE = null;\n const SUPPORTED_PARSER_MEDIA_TYPES = ['application/xhtml+xml', 'text/html'];\n const DEFAULT_PARSER_MEDIA_TYPE = 'text/html';\n let transformCaseFunc = null;\n /* Keep a reference to config to pass to hooks */\n\n let CONFIG = null;\n /* Ideally, do not touch anything below this line */\n\n /* ______________________________________________ */\n\n const formElement = document.createElement('form');\n\n const isRegexOrFunction = function isRegexOrFunction(testValue) {\n return testValue instanceof RegExp || testValue instanceof Function;\n };\n /**\n * _parseConfig\n *\n * @param {Object} cfg optional config literal\n */\n // eslint-disable-next-line complexity\n\n\n const _parseConfig = function _parseConfig() {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n if (CONFIG && CONFIG === cfg) {\n return;\n }\n /* Shield configuration object from tampering */\n\n\n if (!cfg || typeof cfg !== 'object') {\n cfg = {};\n }\n /* Shield configuration object from prototype pollution */\n\n\n cfg = clone(cfg);\n PARSER_MEDIA_TYPE = // eslint-disable-next-line unicorn/prefer-includes\n SUPPORTED_PARSER_MEDIA_TYPES.indexOf(cfg.PARSER_MEDIA_TYPE) === -1 ? PARSER_MEDIA_TYPE = DEFAULT_PARSER_MEDIA_TYPE : PARSER_MEDIA_TYPE = cfg.PARSER_MEDIA_TYPE; // HTML tags and attributes are not case-sensitive, converting to lowercase. Keeping XHTML as is.\n\n transformCaseFunc = PARSER_MEDIA_TYPE === 'application/xhtml+xml' ? stringToString : stringToLowerCase;\n /* Set configuration parameters */\n\n ALLOWED_TAGS = 'ALLOWED_TAGS' in cfg ? addToSet({}, cfg.ALLOWED_TAGS, transformCaseFunc) : DEFAULT_ALLOWED_TAGS;\n ALLOWED_ATTR = 'ALLOWED_ATTR' in cfg ? addToSet({}, cfg.ALLOWED_ATTR, transformCaseFunc) : DEFAULT_ALLOWED_ATTR;\n ALLOWED_NAMESPACES = 'ALLOWED_NAMESPACES' in cfg ? addToSet({}, cfg.ALLOWED_NAMESPACES, stringToString) : DEFAULT_ALLOWED_NAMESPACES;\n URI_SAFE_ATTRIBUTES = 'ADD_URI_SAFE_ATTR' in cfg ? addToSet(clone(DEFAULT_URI_SAFE_ATTRIBUTES), // eslint-disable-line indent\n cfg.ADD_URI_SAFE_ATTR, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_URI_SAFE_ATTRIBUTES;\n DATA_URI_TAGS = 'ADD_DATA_URI_TAGS' in cfg ? addToSet(clone(DEFAULT_DATA_URI_TAGS), // eslint-disable-line indent\n cfg.ADD_DATA_URI_TAGS, // eslint-disable-line indent\n transformCaseFunc // eslint-disable-line indent\n ) // eslint-disable-line indent\n : DEFAULT_DATA_URI_TAGS;\n FORBID_CONTENTS = 'FORBID_CONTENTS' in cfg ? addToSet({}, cfg.FORBID_CONTENTS, transformCaseFunc) : DEFAULT_FORBID_CONTENTS;\n FORBID_TAGS = 'FORBID_TAGS' in cfg ? addToSet({}, cfg.FORBID_TAGS, transformCaseFunc) : {};\n FORBID_ATTR = 'FORBID_ATTR' in cfg ? addToSet({}, cfg.FORBID_ATTR, transformCaseFunc) : {};\n USE_PROFILES = 'USE_PROFILES' in cfg ? cfg.USE_PROFILES : false;\n ALLOW_ARIA_ATTR = cfg.ALLOW_ARIA_ATTR !== false; // Default true\n\n ALLOW_DATA_ATTR = cfg.ALLOW_DATA_ATTR !== false; // Default true\n\n ALLOW_UNKNOWN_PROTOCOLS = cfg.ALLOW_UNKNOWN_PROTOCOLS || false; // Default false\n\n ALLOW_SELF_CLOSE_IN_ATTR = cfg.ALLOW_SELF_CLOSE_IN_ATTR !== false; // Default true\n\n SAFE_FOR_TEMPLATES = cfg.SAFE_FOR_TEMPLATES || false; // Default false\n\n WHOLE_DOCUMENT = cfg.WHOLE_DOCUMENT || false; // Default false\n\n RETURN_DOM = cfg.RETURN_DOM || false; // Default false\n\n RETURN_DOM_FRAGMENT = cfg.RETURN_DOM_FRAGMENT || false; // Default false\n\n RETURN_TRUSTED_TYPE = cfg.RETURN_TRUSTED_TYPE || false; // Default false\n\n FORCE_BODY = cfg.FORCE_BODY || false; // Default false\n\n SANITIZE_DOM = cfg.SANITIZE_DOM !== false; // Default true\n\n SANITIZE_NAMED_PROPS = cfg.SANITIZE_NAMED_PROPS || false; // Default false\n\n KEEP_CONTENT = cfg.KEEP_CONTENT !== false; // Default true\n\n IN_PLACE = cfg.IN_PLACE || false; // Default false\n\n IS_ALLOWED_URI$1 = cfg.ALLOWED_URI_REGEXP || IS_ALLOWED_URI;\n NAMESPACE = cfg.NAMESPACE || HTML_NAMESPACE;\n CUSTOM_ELEMENT_HANDLING = cfg.CUSTOM_ELEMENT_HANDLING || {};\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.tagNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.tagNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && isRegexOrFunction(cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)) {\n CUSTOM_ELEMENT_HANDLING.attributeNameCheck = cfg.CUSTOM_ELEMENT_HANDLING.attributeNameCheck;\n }\n\n if (cfg.CUSTOM_ELEMENT_HANDLING && typeof cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements === 'boolean') {\n CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements = cfg.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements;\n }\n\n if (SAFE_FOR_TEMPLATES) {\n ALLOW_DATA_ATTR = false;\n }\n\n if (RETURN_DOM_FRAGMENT) {\n RETURN_DOM = true;\n }\n /* Parse profile info */\n\n\n if (USE_PROFILES) {\n ALLOWED_TAGS = addToSet({}, [...text]);\n ALLOWED_ATTR = [];\n\n if (USE_PROFILES.html === true) {\n addToSet(ALLOWED_TAGS, html$1);\n addToSet(ALLOWED_ATTR, html);\n }\n\n if (USE_PROFILES.svg === true) {\n addToSet(ALLOWED_TAGS, svg$1);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.svgFilters === true) {\n addToSet(ALLOWED_TAGS, svgFilters);\n addToSet(ALLOWED_ATTR, svg);\n addToSet(ALLOWED_ATTR, xml);\n }\n\n if (USE_PROFILES.mathMl === true) {\n addToSet(ALLOWED_TAGS, mathMl$1);\n addToSet(ALLOWED_ATTR, mathMl);\n addToSet(ALLOWED_ATTR, xml);\n }\n }\n /* Merge configuration parameters */\n\n\n if (cfg.ADD_TAGS) {\n if (ALLOWED_TAGS === DEFAULT_ALLOWED_TAGS) {\n ALLOWED_TAGS = clone(ALLOWED_TAGS);\n }\n\n addToSet(ALLOWED_TAGS, cfg.ADD_TAGS, transformCaseFunc);\n }\n\n if (cfg.ADD_ATTR) {\n if (ALLOWED_ATTR === DEFAULT_ALLOWED_ATTR) {\n ALLOWED_ATTR = clone(ALLOWED_ATTR);\n }\n\n addToSet(ALLOWED_ATTR, cfg.ADD_ATTR, transformCaseFunc);\n }\n\n if (cfg.ADD_URI_SAFE_ATTR) {\n addToSet(URI_SAFE_ATTRIBUTES, cfg.ADD_URI_SAFE_ATTR, transformCaseFunc);\n }\n\n if (cfg.FORBID_CONTENTS) {\n if (FORBID_CONTENTS === DEFAULT_FORBID_CONTENTS) {\n FORBID_CONTENTS = clone(FORBID_CONTENTS);\n }\n\n addToSet(FORBID_CONTENTS, cfg.FORBID_CONTENTS, transformCaseFunc);\n }\n /* Add #text in case KEEP_CONTENT is set to true */\n\n\n if (KEEP_CONTENT) {\n ALLOWED_TAGS['#text'] = true;\n }\n /* Add html, head and body to ALLOWED_TAGS in case WHOLE_DOCUMENT is true */\n\n\n if (WHOLE_DOCUMENT) {\n addToSet(ALLOWED_TAGS, ['html', 'head', 'body']);\n }\n /* Add tbody to ALLOWED_TAGS in case tables are permitted, see #286, #365 */\n\n\n if (ALLOWED_TAGS.table) {\n addToSet(ALLOWED_TAGS, ['tbody']);\n delete FORBID_TAGS.tbody;\n }\n\n if (cfg.TRUSTED_TYPES_POLICY) {\n if (typeof cfg.TRUSTED_TYPES_POLICY.createHTML !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.');\n }\n\n if (typeof cfg.TRUSTED_TYPES_POLICY.createScriptURL !== 'function') {\n throw typeErrorCreate('TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.');\n } // Overwrite existing TrustedTypes policy.\n\n\n trustedTypesPolicy = cfg.TRUSTED_TYPES_POLICY; // Sign local variables required by `sanitize`.\n\n emptyHTML = trustedTypesPolicy.createHTML('');\n } else {\n // Uninitialized policy, attempt to initialize the internal dompurify policy.\n if (trustedTypesPolicy === undefined) {\n trustedTypesPolicy = _createTrustedTypesPolicy(trustedTypes, currentScript);\n } // If creating the internal policy succeeded sign internal variables.\n\n\n if (trustedTypesPolicy !== null && typeof emptyHTML === 'string') {\n emptyHTML = trustedTypesPolicy.createHTML('');\n }\n } // Prevent further manipulation of configuration.\n // Not available in IE8, Safari 5, etc.\n\n\n if (freeze) {\n freeze(cfg);\n }\n\n CONFIG = cfg;\n };\n\n const MATHML_TEXT_INTEGRATION_POINTS = addToSet({}, ['mi', 'mo', 'mn', 'ms', 'mtext']);\n const HTML_INTEGRATION_POINTS = addToSet({}, ['foreignobject', 'desc', 'title', 'annotation-xml']); // Certain elements are allowed in both SVG and HTML\n // namespace. We need to specify them explicitly\n // so that they don't get erroneously deleted from\n // HTML namespace.\n\n const COMMON_SVG_AND_HTML_ELEMENTS = addToSet({}, ['title', 'style', 'font', 'a', 'script']);\n /* Keep track of all possible SVG and MathML tags\n * so that we can perform the namespace checks\n * correctly. */\n\n const ALL_SVG_TAGS = addToSet({}, svg$1);\n addToSet(ALL_SVG_TAGS, svgFilters);\n addToSet(ALL_SVG_TAGS, svgDisallowed);\n const ALL_MATHML_TAGS = addToSet({}, mathMl$1);\n addToSet(ALL_MATHML_TAGS, mathMlDisallowed);\n /**\n * @param {Element} element a DOM element whose namespace is being checked\n * @returns {boolean} Return false if the element has a\n * namespace that a spec-compliant parser would never\n * return. Return true otherwise.\n */\n\n const _checkValidNamespace = function _checkValidNamespace(element) {\n let parent = getParentNode(element); // In JSDOM, if we're inside shadow DOM, then parentNode\n // can be null. We just simulate parent in this case.\n\n if (!parent || !parent.tagName) {\n parent = {\n namespaceURI: NAMESPACE,\n tagName: 'template'\n };\n }\n\n const tagName = stringToLowerCase(element.tagName);\n const parentTagName = stringToLowerCase(parent.tagName);\n\n if (!ALLOWED_NAMESPACES[element.namespaceURI]) {\n return false;\n }\n\n if (element.namespaceURI === SVG_NAMESPACE) {\n // The only way to switch from HTML namespace to SVG\n // is via <svg>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'svg';\n } // The only way to switch from MathML to SVG is via`\n // svg if parent is either <annotation-xml> or MathML\n // text integration points.\n\n\n if (parent.namespaceURI === MATHML_NAMESPACE) {\n return tagName === 'svg' && (parentTagName === 'annotation-xml' || MATHML_TEXT_INTEGRATION_POINTS[parentTagName]);\n } // We only allow elements that are defined in SVG\n // spec. All others are disallowed in SVG namespace.\n\n\n return Boolean(ALL_SVG_TAGS[tagName]);\n }\n\n if (element.namespaceURI === MATHML_NAMESPACE) {\n // The only way to switch from HTML namespace to MathML\n // is via <math>. If it happens via any other tag, then\n // it should be killed.\n if (parent.namespaceURI === HTML_NAMESPACE) {\n return tagName === 'math';\n } // The only way to switch from SVG to MathML is via\n // <math> and HTML integration points\n\n\n if (parent.namespaceURI === SVG_NAMESPACE) {\n return tagName === 'math' && HTML_INTEGRATION_POINTS[parentTagName];\n } // We only allow elements that are defined in MathML\n // spec. All others are disallowed in MathML namespace.\n\n\n return Boolean(ALL_MATHML_TAGS[tagName]);\n }\n\n if (element.namespaceURI === HTML_NAMESPACE) {\n // The only way to switch from SVG to HTML is via\n // HTML integration points, and from MathML to HTML\n // is via MathML text integration points\n if (parent.namespaceURI === SVG_NAMESPACE && !HTML_INTEGRATION_POINTS[parentTagName]) {\n return false;\n }\n\n if (parent.namespaceURI === MATHML_NAMESPACE && !MATHML_TEXT_INTEGRATION_POINTS[parentTagName]) {\n return false;\n } // We disallow tags that are specific for MathML\n // or SVG and should never appear in HTML namespace\n\n\n return !ALL_MATHML_TAGS[tagName] && (COMMON_SVG_AND_HTML_ELEMENTS[tagName] || !ALL_SVG_TAGS[tagName]);\n } // For XHTML and XML documents that support custom namespaces\n\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && ALLOWED_NAMESPACES[element.namespaceURI]) {\n return true;\n } // The code should never reach this place (this means\n // that the element somehow got namespace that is not\n // HTML, SVG, MathML or allowed via ALLOWED_NAMESPACES).\n // Return false just in case.\n\n\n return false;\n };\n /**\n * _forceRemove\n *\n * @param {Node} node a DOM node\n */\n\n\n const _forceRemove = function _forceRemove(node) {\n arrayPush(DOMPurify.removed, {\n element: node\n });\n\n try {\n // eslint-disable-next-line unicorn/prefer-dom-node-remove\n node.parentNode.removeChild(node);\n } catch (_) {\n node.remove();\n }\n };\n /**\n * _removeAttribute\n *\n * @param {String} name an Attribute name\n * @param {Node} node a DOM node\n */\n\n\n const _removeAttribute = function _removeAttribute(name, node) {\n try {\n arrayPush(DOMPurify.removed, {\n attribute: node.getAttributeNode(name),\n from: node\n });\n } catch (_) {\n arrayPush(DOMPurify.removed, {\n attribute: null,\n from: node\n });\n }\n\n node.removeAttribute(name); // We void attribute values for unremovable \"is\"\" attributes\n\n if (name === 'is' && !ALLOWED_ATTR[name]) {\n if (RETURN_DOM || RETURN_DOM_FRAGMENT) {\n try {\n _forceRemove(node);\n } catch (_) {}\n } else {\n try {\n node.setAttribute(name, '');\n } catch (_) {}\n }\n }\n };\n /**\n * _initDocument\n *\n * @param {String} dirty a string of dirty markup\n * @return {Document} a DOM, filled with the dirty markup\n */\n\n\n const _initDocument = function _initDocument(dirty) {\n /* Create a HTML document */\n let doc = null;\n let leadingWhitespace = null;\n\n if (FORCE_BODY) {\n dirty = '<remove></remove>' + dirty;\n } else {\n /* If FORCE_BODY isn't used, leading whitespace needs to be preserved manually */\n const matches = stringMatch(dirty, /^[\\r\\n\\t ]+/);\n leadingWhitespace = matches && matches[0];\n }\n\n if (PARSER_MEDIA_TYPE === 'application/xhtml+xml' && NAMESPACE === HTML_NAMESPACE) {\n // Root of XHTML doc must contain xmlns declaration (see https://www.w3.org/TR/xhtml1/normative.html#strict)\n dirty = '<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>' + dirty + '</body></html>';\n }\n\n const dirtyPayload = trustedTypesPolicy ? trustedTypesPolicy.createHTML(dirty) : dirty;\n /*\n * Use the DOMParser API by default, fallback later if needs be\n * DOMParser not work for svg when has multiple root element.\n */\n\n if (NAMESPACE === HTML_NAMESPACE) {\n try {\n doc = new DOMParser().parseFromString(dirtyPayload, PARSER_MEDIA_TYPE);\n } catch (_) {}\n }\n /* Use createHTMLDocument in case DOMParser is not available */\n\n\n if (!doc || !doc.documentElement) {\n doc = implementation.createDocument(NAMESPACE, 'template', null);\n\n try {\n doc.documentElement.innerHTML = IS_EMPTY_INPUT ? emptyHTML : dirtyPayload;\n } catch (_) {// Syntax error if dirtyPayload is invalid xml\n }\n }\n\n const body = doc.body || doc.documentElement;\n\n if (dirty && leadingWhitespace) {\n body.insertBefore(document.createTextNode(leadingWhitespace), body.childNodes[0] || null);\n }\n /* Work on whole document or just its body */\n\n\n if (NAMESPACE === HTML_NAMESPACE) {\n return getElementsByTagName.call(doc, WHOLE_DOCUMENT ? 'html' : 'body')[0];\n }\n\n return WHOLE_DOCUMENT ? doc.documentElement : body;\n };\n /**\n * Creates a NodeIterator object that you can use to traverse filtered lists of nodes or elements in a document.\n *\n * @param {Node} root The root element or node to start traversing on.\n * @return {NodeIterator} The created NodeIterator\n */\n\n\n const _createNodeIterator = function _createNodeIterator(root) {\n return createNodeIterator.call(root.ownerDocument || root, root, // eslint-disable-next-line no-bitwise\n NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT | NodeFilter.SHOW_TEXT, null);\n };\n /**\n * _isClobbered\n *\n * @param {Node} elm element to check for clobbering attacks\n * @return {Boolean} true if clobbered, false if safe\n */\n\n\n const _isClobbered = function _isClobbered(elm) {\n return elm instanceof HTMLFormElement && (typeof elm.nodeName !== 'string' || typeof elm.textContent !== 'string' || typeof elm.removeChild !== 'function' || !(elm.attributes instanceof NamedNodeMap) || typeof elm.removeAttribute !== 'function' || typeof elm.setAttribute !== 'function' || typeof elm.namespaceURI !== 'string' || typeof elm.insertBefore !== 'function' || typeof elm.hasChildNodes !== 'function');\n };\n /**\n * Checks whether the given object is a DOM node.\n *\n * @param {Node} object object to check whether it's a DOM node\n * @return {Boolean} true is object is a DOM node\n */\n\n\n const _isNode = function _isNode(object) {\n return typeof Node === 'function' && object instanceof Node;\n };\n /**\n * _executeHook\n * Execute user configurable hooks\n *\n * @param {String} entryPoint Name of the hook's entry point\n * @param {Node} currentNode node to work on with the hook\n * @param {Object} data additional hook parameters\n */\n\n\n const _executeHook = function _executeHook(entryPoint, currentNode, data) {\n if (!hooks[entryPoint]) {\n return;\n }\n\n arrayForEach(hooks[entryPoint], hook => {\n hook.call(DOMPurify, currentNode, data, CONFIG);\n });\n };\n /**\n * _sanitizeElements\n *\n * @protect nodeName\n * @protect textContent\n * @protect removeChild\n *\n * @param {Node} currentNode to check for permission to exist\n * @return {Boolean} true if node was killed, false if left alive\n */\n\n\n const _sanitizeElements = function _sanitizeElements(currentNode) {\n let content = null;\n /* Execute a hook if present */\n\n _executeHook('beforeSanitizeElements', currentNode, null);\n /* Check if element is clobbered or can clobber */\n\n\n if (_isClobbered(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Now let's check the element's type and name */\n\n\n const tagName = transformCaseFunc(currentNode.nodeName);\n /* Execute a hook if present */\n\n _executeHook('uponSanitizeElement', currentNode, {\n tagName,\n allowedTags: ALLOWED_TAGS\n });\n /* Detect mXSS attempts abusing namespace confusion */\n\n\n if (currentNode.hasChildNodes() && !_isNode(currentNode.firstElementChild) && regExpTest(/<[/\\w]/g, currentNode.innerHTML) && regExpTest(/<[/\\w]/g, currentNode.textContent)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Remove element if anything forbids its presence */\n\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n /* Check if we have a custom element to handle */\n if (!FORBID_TAGS[tagName] && _isBasicCustomElement(tagName)) {\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, tagName)) {\n return false;\n }\n\n if (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(tagName)) {\n return false;\n }\n }\n /* Keep content except for bad-listed elements */\n\n\n if (KEEP_CONTENT && !FORBID_CONTENTS[tagName]) {\n const parentNode = getParentNode(currentNode) || currentNode.parentNode;\n const childNodes = getChildNodes(currentNode) || currentNode.childNodes;\n\n if (childNodes && parentNode) {\n const childCount = childNodes.length;\n\n for (let i = childCount - 1; i >= 0; --i) {\n parentNode.insertBefore(cloneNode(childNodes[i], true), getNextSibling(currentNode));\n }\n }\n }\n\n _forceRemove(currentNode);\n\n return true;\n }\n /* Check whether element has a valid namespace */\n\n\n if (currentNode instanceof Element && !_checkValidNamespace(currentNode)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Make sure that older browsers don't get fallback-tag mXSS */\n\n\n if ((tagName === 'noscript' || tagName === 'noembed' || tagName === 'noframes') && regExpTest(/<\\/no(script|embed|frames)/i, currentNode.innerHTML)) {\n _forceRemove(currentNode);\n\n return true;\n }\n /* Sanitize element content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES && currentNode.nodeType === 3) {\n /* Get the element's text content */\n content = currentNode.textContent;\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n content = stringReplace(content, expr, ' ');\n });\n\n if (currentNode.textContent !== content) {\n arrayPush(DOMPurify.removed, {\n element: currentNode.cloneNode()\n });\n currentNode.textContent = content;\n }\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeElements', currentNode, null);\n\n return false;\n };\n /**\n * _isValidAttribute\n *\n * @param {string} lcTag Lowercase tag name of containing element.\n * @param {string} lcName Lowercase attribute name.\n * @param {string} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid, otherwise false.\n */\n // eslint-disable-next-line complexity\n\n\n const _isValidAttribute = function _isValidAttribute(lcTag, lcName, value) {\n /* Make sure attribute cannot clobber */\n if (SANITIZE_DOM && (lcName === 'id' || lcName === 'name') && (value in document || value in formElement)) {\n return false;\n }\n /* Allow valid data-* attributes: At least one character after \"-\"\n (https://html.spec.whatwg.org/multipage/dom.html#embedding-custom-non-visible-data-with-the-data-*-attributes)\n XML-compatible (https://html.spec.whatwg.org/multipage/infrastructure.html#xml-compatible and http://www.w3.org/TR/xml/#d0e804)\n We don't need to check the value; it's always URI safe. */\n\n\n if (ALLOW_DATA_ATTR && !FORBID_ATTR[lcName] && regExpTest(DATA_ATTR, lcName)) ; else if (ALLOW_ARIA_ATTR && regExpTest(ARIA_ATTR, lcName)) ; else if (!ALLOWED_ATTR[lcName] || FORBID_ATTR[lcName]) {\n if ( // First condition does a very basic check if a) it's basically a valid custom element tagname AND\n // b) if the tagName passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n // and c) if the attribute name passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.attributeNameCheck\n _isBasicCustomElement(lcTag) && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, lcTag) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(lcTag)) && (CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.attributeNameCheck, lcName) || CUSTOM_ELEMENT_HANDLING.attributeNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.attributeNameCheck(lcName)) || // Alternative, second condition checks if it's an `is`-attribute, AND\n // the value passes whatever the user has configured for CUSTOM_ELEMENT_HANDLING.tagNameCheck\n lcName === 'is' && CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements && (CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof RegExp && regExpTest(CUSTOM_ELEMENT_HANDLING.tagNameCheck, value) || CUSTOM_ELEMENT_HANDLING.tagNameCheck instanceof Function && CUSTOM_ELEMENT_HANDLING.tagNameCheck(value))) ; else {\n return false;\n }\n /* Check value is safe. First, is attr inert? If so, is safe */\n\n } else if (URI_SAFE_ATTRIBUTES[lcName]) ; else if (regExpTest(IS_ALLOWED_URI$1, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if ((lcName === 'src' || lcName === 'xlink:href' || lcName === 'href') && lcTag !== 'script' && stringIndexOf(value, 'data:') === 0 && DATA_URI_TAGS[lcTag]) ; else if (ALLOW_UNKNOWN_PROTOCOLS && !regExpTest(IS_SCRIPT_OR_DATA, stringReplace(value, ATTR_WHITESPACE, ''))) ; else if (value) {\n return false;\n } else ;\n\n return true;\n };\n /**\n * _isBasicCustomElement\n * checks if at least one dash is included in tagName, and it's not the first char\n * for more sophisticated checking see https://github.com/sindresorhus/validate-element-name\n *\n * @param {string} tagName name of the tag of the node to sanitize\n * @returns {boolean} Returns true if the tag name meets the basic criteria for a custom element, otherwise false.\n */\n\n\n const _isBasicCustomElement = function _isBasicCustomElement(tagName) {\n return tagName.indexOf('-') > 0;\n };\n /**\n * _sanitizeAttributes\n *\n * @protect attributes\n * @protect nodeName\n * @protect removeAttribute\n * @protect setAttribute\n *\n * @param {Node} currentNode to sanitize\n */\n\n\n const _sanitizeAttributes = function _sanitizeAttributes(currentNode) {\n /* Execute a hook if present */\n _executeHook('beforeSanitizeAttributes', currentNode, null);\n\n const {\n attributes\n } = currentNode;\n /* Check if we have attributes; if not we might have a text node */\n\n if (!attributes) {\n return;\n }\n\n const hookEvent = {\n attrName: '',\n attrValue: '',\n keepAttr: true,\n allowedAttributes: ALLOWED_ATTR\n };\n let l = attributes.length;\n /* Go backwards over all attributes; safely remove bad ones */\n\n while (l--) {\n const attr = attributes[l];\n const {\n name,\n namespaceURI,\n value: attrValue\n } = attr;\n const lcName = transformCaseFunc(name);\n let value = name === 'value' ? attrValue : stringTrim(attrValue);\n /* Execute a hook if present */\n\n hookEvent.attrName = lcName;\n hookEvent.attrValue = value;\n hookEvent.keepAttr = true;\n hookEvent.forceKeepAttr = undefined; // Allows developers to see this is a property they can set\n\n _executeHook('uponSanitizeAttribute', currentNode, hookEvent);\n\n value = hookEvent.attrValue;\n /* Did the hooks approve of the attribute? */\n\n if (hookEvent.forceKeepAttr) {\n continue;\n }\n /* Remove attribute */\n\n\n _removeAttribute(name, currentNode);\n /* Did the hooks approve of the attribute? */\n\n\n if (!hookEvent.keepAttr) {\n continue;\n }\n /* Work around a security issue in jQuery 3.0 */\n\n\n if (!ALLOW_SELF_CLOSE_IN_ATTR && regExpTest(/\\/>/i, value)) {\n _removeAttribute(name, currentNode);\n\n continue;\n }\n /* Sanitize attribute content to be template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n value = stringReplace(value, expr, ' ');\n });\n }\n /* Is `value` valid for this attribute? */\n\n\n const lcTag = transformCaseFunc(currentNode.nodeName);\n\n if (!_isValidAttribute(lcTag, lcName, value)) {\n continue;\n }\n /* Full DOM Clobbering protection via namespace isolation,\n * Prefix id and name attributes with `user-content-`\n */\n\n\n if (SANITIZE_NAMED_PROPS && (lcName === 'id' || lcName === 'name')) {\n // Remove the attribute with this value\n _removeAttribute(name, currentNode); // Prefix the value and later re-create the attribute with the sanitized value\n\n\n value = SANITIZE_NAMED_PROPS_PREFIX + value;\n }\n /* Handle attributes that require Trusted Types */\n\n\n if (trustedTypesPolicy && typeof trustedTypes === 'object' && typeof trustedTypes.getAttributeType === 'function') {\n if (namespaceURI) ; else {\n switch (trustedTypes.getAttributeType(lcTag, lcName)) {\n case 'TrustedHTML':\n {\n value = trustedTypesPolicy.createHTML(value);\n break;\n }\n\n case 'TrustedScriptURL':\n {\n value = trustedTypesPolicy.createScriptURL(value);\n break;\n }\n }\n }\n }\n /* Handle invalid data-* attribute set by try-catching it */\n\n\n try {\n if (namespaceURI) {\n currentNode.setAttributeNS(namespaceURI, name, value);\n } else {\n /* Fallback to setAttribute() for browser-unrecognized namespaces e.g. \"x-schema\". */\n currentNode.setAttribute(name, value);\n }\n\n arrayPop(DOMPurify.removed);\n } catch (_) {}\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeAttributes', currentNode, null);\n };\n /**\n * _sanitizeShadowDOM\n *\n * @param {DocumentFragment} fragment to iterate over recursively\n */\n\n\n const _sanitizeShadowDOM = function _sanitizeShadowDOM(fragment) {\n let shadowNode = null;\n\n const shadowIterator = _createNodeIterator(fragment);\n /* Execute a hook if present */\n\n\n _executeHook('beforeSanitizeShadowDOM', fragment, null);\n\n while (shadowNode = shadowIterator.nextNode()) {\n /* Execute a hook if present */\n _executeHook('uponSanitizeShadowNode', shadowNode, null);\n /* Sanitize tags and elements */\n\n\n if (_sanitizeElements(shadowNode)) {\n continue;\n }\n /* Deep shadow DOM detected */\n\n\n if (shadowNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(shadowNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(shadowNode);\n }\n /* Execute a hook if present */\n\n\n _executeHook('afterSanitizeShadowDOM', fragment, null);\n };\n /**\n * Sanitize\n * Public method providing core sanitation functionality\n *\n * @param {String|Node} dirty string or DOM node\n * @param {Object} cfg object\n */\n // eslint-disable-next-line complexity\n\n\n DOMPurify.sanitize = function (dirty) {\n let cfg = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n let body = null;\n let importedNode = null;\n let currentNode = null;\n let returnNode = null;\n /* Make sure we have a string to sanitize.\n DO NOT return early, as this will return the wrong type if\n the user has requested a DOM object rather than a string */\n\n IS_EMPTY_INPUT = !dirty;\n\n if (IS_EMPTY_INPUT) {\n dirty = '<!-->';\n }\n /* Stringify, in case dirty is an object */\n\n\n if (typeof dirty !== 'string' && !_isNode(dirty)) {\n if (typeof dirty.toString === 'function') {\n dirty = dirty.toString();\n\n if (typeof dirty !== 'string') {\n throw typeErrorCreate('dirty is not a string, aborting');\n }\n } else {\n throw typeErrorCreate('toString is not a function');\n }\n }\n /* Return dirty HTML if DOMPurify cannot run */\n\n\n if (!DOMPurify.isSupported) {\n return dirty;\n }\n /* Assign config vars */\n\n\n if (!SET_CONFIG) {\n _parseConfig(cfg);\n }\n /* Clean up removed elements */\n\n\n DOMPurify.removed = [];\n /* Check if dirty is correctly typed for IN_PLACE */\n\n if (typeof dirty === 'string') {\n IN_PLACE = false;\n }\n\n if (IN_PLACE) {\n /* Do some early pre-sanitization to avoid unsafe root nodes */\n if (dirty.nodeName) {\n const tagName = transformCaseFunc(dirty.nodeName);\n\n if (!ALLOWED_TAGS[tagName] || FORBID_TAGS[tagName]) {\n throw typeErrorCreate('root node is forbidden and cannot be sanitized in-place');\n }\n }\n } else if (dirty instanceof Node) {\n /* If dirty is a DOM element, append to an empty document to avoid\n elements being stripped by the parser */\n body = _initDocument('<!---->');\n importedNode = body.ownerDocument.importNode(dirty, true);\n\n if (importedNode.nodeType === 1 && importedNode.nodeName === 'BODY') {\n /* Node is already a body, use as is */\n body = importedNode;\n } else if (importedNode.nodeName === 'HTML') {\n body = importedNode;\n } else {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n body.appendChild(importedNode);\n }\n } else {\n /* Exit directly if we have nothing to do */\n if (!RETURN_DOM && !SAFE_FOR_TEMPLATES && !WHOLE_DOCUMENT && // eslint-disable-next-line unicorn/prefer-includes\n dirty.indexOf('<') === -1) {\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(dirty) : dirty;\n }\n /* Initialize the document to work on */\n\n\n body = _initDocument(dirty);\n /* Check we have a DOM node from the data */\n\n if (!body) {\n return RETURN_DOM ? null : RETURN_TRUSTED_TYPE ? emptyHTML : '';\n }\n }\n /* Remove first element node (ours) if FORCE_BODY is set */\n\n\n if (body && FORCE_BODY) {\n _forceRemove(body.firstChild);\n }\n /* Get node iterator */\n\n\n const nodeIterator = _createNodeIterator(IN_PLACE ? dirty : body);\n /* Now start iterating over the created document */\n\n\n while (currentNode = nodeIterator.nextNode()) {\n /* Sanitize tags and elements */\n if (_sanitizeElements(currentNode)) {\n continue;\n }\n /* Shadow DOM detected, sanitize it */\n\n\n if (currentNode.content instanceof DocumentFragment) {\n _sanitizeShadowDOM(currentNode.content);\n }\n /* Check attributes, sanitize if necessary */\n\n\n _sanitizeAttributes(currentNode);\n }\n /* If we sanitized `dirty` in-place, return it. */\n\n\n if (IN_PLACE) {\n return dirty;\n }\n /* Return sanitized string or DOM */\n\n\n if (RETURN_DOM) {\n if (RETURN_DOM_FRAGMENT) {\n returnNode = createDocumentFragment.call(body.ownerDocument);\n\n while (body.firstChild) {\n // eslint-disable-next-line unicorn/prefer-dom-node-append\n returnNode.appendChild(body.firstChild);\n }\n } else {\n returnNode = body;\n }\n\n if (ALLOWED_ATTR.shadowroot || ALLOWED_ATTR.shadowrootmode) {\n /*\n AdoptNode() is not used because internal state is not reset\n (e.g. the past names map of a HTMLFormElement), this is safe\n in theory but we would rather not risk another attack vector.\n The state that is cloned by importNode() is explicitly defined\n by the specs.\n */\n returnNode = importNode.call(originalDocument, returnNode, true);\n }\n\n return returnNode;\n }\n\n let serializedHTML = WHOLE_DOCUMENT ? body.outerHTML : body.innerHTML;\n /* Serialize doctype if allowed */\n\n if (WHOLE_DOCUMENT && ALLOWED_TAGS['!doctype'] && body.ownerDocument && body.ownerDocument.doctype && body.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, body.ownerDocument.doctype.name)) {\n serializedHTML = '<!DOCTYPE ' + body.ownerDocument.doctype.name + '>\\n' + serializedHTML;\n }\n /* Sanitize final string template-safe */\n\n\n if (SAFE_FOR_TEMPLATES) {\n arrayForEach([MUSTACHE_EXPR, ERB_EXPR, TMPLIT_EXPR], expr => {\n serializedHTML = stringReplace(serializedHTML, expr, ' ');\n });\n }\n\n return trustedTypesPolicy && RETURN_TRUSTED_TYPE ? trustedTypesPolicy.createHTML(serializedHTML) : serializedHTML;\n };\n /**\n * Public method to set the configuration once\n * setConfig\n *\n * @param {Object} cfg configuration object\n */\n\n\n DOMPurify.setConfig = function () {\n let cfg = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n\n _parseConfig(cfg);\n\n SET_CONFIG = true;\n };\n /**\n * Public method to remove the configuration\n * clearConfig\n *\n */\n\n\n DOMPurify.clearConfig = function () {\n CONFIG = null;\n SET_CONFIG = false;\n };\n /**\n * Public method to check if an attribute value is valid.\n * Uses last set config, if any. Otherwise, uses config defaults.\n * isValidAttribute\n *\n * @param {String} tag Tag name of containing element.\n * @param {String} attr Attribute name.\n * @param {String} value Attribute value.\n * @return {Boolean} Returns true if `value` is valid. Otherwise, returns false.\n */\n\n\n DOMPurify.isValidAttribute = function (tag, attr, value) {\n /* Initialize shared config vars if necessary. */\n if (!CONFIG) {\n _parseConfig({});\n }\n\n const lcTag = transformCaseFunc(tag);\n const lcName = transformCaseFunc(attr);\n return _isValidAttribute(lcTag, lcName, value);\n };\n /**\n * AddHook\n * Public method to add DOMPurify hooks\n *\n * @param {String} entryPoint entry point for the hook to add\n * @param {Function} hookFunction function to execute\n */\n\n\n DOMPurify.addHook = function (entryPoint, hookFunction) {\n if (typeof hookFunction !== 'function') {\n return;\n }\n\n hooks[entryPoint] = hooks[entryPoint] || [];\n arrayPush(hooks[entryPoint], hookFunction);\n };\n /**\n * RemoveHook\n * Public method to remove a DOMPurify hook at a given entryPoint\n * (pops it from the stack of hooks if more are present)\n *\n * @param {String} entryPoint entry point for the hook to remove\n * @return {Function} removed(popped) hook\n */\n\n\n DOMPurify.removeHook = function (entryPoint) {\n if (hooks[entryPoint]) {\n return arrayPop(hooks[entryPoint]);\n }\n };\n /**\n * RemoveHooks\n * Public method to remove all DOMPurify hooks at a given entryPoint\n *\n * @param {String} entryPoint entry point for the hooks to remove\n */\n\n\n DOMPurify.removeHooks = function (entryPoint) {\n if (hooks[entryPoint]) {\n hooks[entryPoint] = [];\n }\n };\n /**\n * RemoveAllHooks\n * Public method to remove all DOMPurify hooks\n */\n\n\n DOMPurify.removeAllHooks = function () {\n hooks = {};\n };\n\n return DOMPurify;\n }\n\n var purify = createDOMPurify();\n\n return purify;\n\n}));\n//# sourceMappingURL=purify.js.map\n\n\n//# sourceURL=webpack://Formio/../core/node_modules/dompurify/dist/purify.js?");
267
201
 
268
202
  /***/ }),
269
203
 
@@ -2176,7 +2110,7 @@ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {
2176
2110
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2177
2111
 
2178
2112
  "use strict";
2179
- eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getStrings = exports.getValue = exports.escapeRegExCharacters = exports.formatAsCurrency = exports.parseFloatExt = exports.hasCondition = exports.flattenComponents = exports.applyFormChanges = exports.generateFormChange = exports.removeComponent = exports.findComponent = exports.findComponents = exports.searchComponents = exports.getComponent = exports.matchComponent = exports.eachComponent = exports.isLayoutComponent = void 0;\nconst get_1 = __importDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\nconst set_1 = __importDefault(__webpack_require__(/*! lodash/set */ \"./node_modules/lodash/set.js\"));\nconst has_1 = __importDefault(__webpack_require__(/*! lodash/has */ \"./node_modules/lodash/has.js\"));\nconst clone_1 = __importDefault(__webpack_require__(/*! lodash/clone */ \"./node_modules/lodash/clone.js\"));\nconst forOwn_1 = __importDefault(__webpack_require__(/*! lodash/forOwn */ \"./node_modules/lodash/forOwn.js\"));\nconst isString_1 = __importDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\nconst isNaN_1 = __importDefault(__webpack_require__(/*! lodash/isNaN */ \"./node_modules/lodash/isNaN.js\"));\nconst isNil_1 = __importDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\nconst isPlainObject_1 = __importDefault(__webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\"));\nconst round_1 = __importDefault(__webpack_require__(/*! lodash/round */ \"./node_modules/lodash/round.js\"));\nconst chunk_1 = __importDefault(__webpack_require__(/*! lodash/chunk */ \"./node_modules/lodash/chunk.js\"));\nconst pad_1 = __importDefault(__webpack_require__(/*! lodash/pad */ \"./node_modules/lodash/pad.js\"));\nconst fast_json_patch_1 = __webpack_require__(/*! fast-json-patch */ \"./node_modules/fast-json-patch/index.mjs\");\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst utils_1 = __webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\");\n/**\n * Determine if a component is a layout component or not.\n *\n * @param {Object} component\n * The component to check.\n *\n * @returns {Boolean}\n * Whether or not the component is a layout component.\n */\nfunction isLayoutComponent(component) {\n return Boolean((component.columns && Array.isArray(component.columns)) ||\n (component.rows && Array.isArray(component.rows)) ||\n (component.components && Array.isArray(component.components)));\n}\nexports.isLayoutComponent = isLayoutComponent;\n/**\n * Iterate through each component within a form.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Function} fn\n * The iteration function to invoke for each component.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n * @param {String} path\n * The current data path of the element. Example: data.user.firstName\n * @param {Object} parent\n * The parent object.\n */\nfunction eachComponent(components, fn, includeAll, path, parent, inRecursion) {\n if (!components)\n return;\n path = path || '';\n if (inRecursion) {\n if (components.noRecurse) {\n delete components.noRecurse;\n return;\n }\n components.noRecurse = true;\n }\n components.forEach((component) => {\n if (!component) {\n return;\n }\n const hasColumns = component.columns && Array.isArray(component.columns);\n const hasRows = component.rows && Array.isArray(component.rows);\n const hasComps = component.components && Array.isArray(component.components);\n let noRecurse = false;\n const newPath = component.key ? (path ? (`${path}.${component.key}`) : component.key) : '';\n // Keep track of parent references.\n if (parent) {\n // Ensure we don't create infinite JSON structures.\n component.parent = (0, clone_1.default)(parent);\n delete component.parent.components;\n delete component.parent.componentMap;\n delete component.parent.columns;\n delete component.parent.rows;\n }\n // there's no need to add other layout components here because we expect that those would either have columns, rows or components\n const layoutTypes = ['htmlelement', 'content'];\n const isLayoutComponent = hasColumns || hasRows || (hasComps && !component.input) || layoutTypes.indexOf(component.type) > -1;\n if (includeAll || component.tree || !isLayoutComponent) {\n noRecurse = fn(component, newPath, components);\n }\n const subPath = () => {\n if (component.key &&\n !['panel', 'table', 'well', 'columns', 'fieldset', 'tabs', 'form'].includes(component.type) &&\n (['datagrid', 'container', 'editgrid', 'address', 'dynamicWizard', 'datatable', 'tagpad'].includes(component.type) ||\n component.tree)) {\n return newPath;\n }\n else if (component.key &&\n component.type === 'form') {\n return `${newPath}.data`;\n }\n return path;\n };\n if (!noRecurse) {\n if (hasColumns) {\n component.columns.forEach((column) => eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null), true);\n }\n else if (hasRows) {\n component.rows.forEach((row) => {\n if (Array.isArray(row)) {\n row.forEach((column) => eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null), true);\n }\n });\n }\n else if (hasComps) {\n eachComponent(component.components, fn, includeAll, subPath(), parent ? component : null, true);\n }\n }\n });\n if (components.noRecurse) {\n delete components.noRecurse;\n }\n}\nexports.eachComponent = eachComponent;\n/**\n * Matches if a component matches the query.\n *\n * @param component\n * @param query\n * @return {boolean}\n */\nfunction matchComponent(component, query) {\n if ((0, isString_1.default)(query)) {\n return (component.key === query) || (component.path === query);\n }\n else {\n let matches = false;\n (0, forOwn_1.default)(query, (value, key) => {\n matches = ((0, get_1.default)(component, key) === value);\n if (!matches) {\n return false;\n }\n });\n return matches;\n }\n}\nexports.matchComponent = matchComponent;\n/**\n * Get a component by its key\n *\n * @param {Object} components\n * The components to iterate.\n * @param {String|Object} key\n * The key of the component to get, or a query of the component to search.\n *\n * @returns {Object}\n * The component that matches the given key, or undefined if not found.\n */\nfunction getComponent(components, key, includeAll) {\n let result;\n eachComponent(components, (component, path) => {\n if ((path === key) || (component.path === key)) {\n result = component;\n return true;\n }\n }, includeAll);\n return result;\n}\nexports.getComponent = getComponent;\n/**\n * Finds a component provided a query of properties of that component.\n *\n * @param components\n * @param query\n * @return {*}\n */\nfunction searchComponents(components, query) {\n const results = [];\n eachComponent(components, (component) => {\n if (matchComponent(component, query)) {\n results.push(component);\n }\n }, true);\n return results;\n}\nexports.searchComponents = searchComponents;\n/**\n * Deprecated version of findComponents. Renamed to searchComponents.\n *\n * @param components\n * @param query\n * @returns {*}\n */\nfunction findComponents(components, query) {\n console.warn('formio.js/utils findComponents is deprecated. Use searchComponents instead.');\n return searchComponents(components, query);\n}\nexports.findComponents = findComponents;\n/**\n * This function will find a component in a form and return the component AND THE PATH to the component in the form.\n * Path to the component is stored as an array of nested components and their indexes.The Path is being filled recursively\n * when you iterating through the nested structure.\n * If the component is not found the callback won't be called and function won't return anything.\n *\n * @param components\n * @param key\n * @param fn\n * @param path\n * @returns {*}\n */\nfunction findComponent(components, key, path, fn) {\n if (!components)\n return;\n path = path || [];\n if (!key) {\n return fn(components);\n }\n components.forEach(function (component, index) {\n var newPath = path.slice();\n // Add an index of the component it iterates through in nested structure\n newPath.push(index);\n if (!component)\n return;\n if (component.hasOwnProperty('columns') && Array.isArray(component.columns)) {\n newPath.push('columns');\n component.columns.forEach(function (column, index) {\n var colPath = newPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n }\n if (component.hasOwnProperty('rows') && Array.isArray(component.rows)) {\n newPath.push('rows');\n component.rows.forEach(function (row, index) {\n var rowPath = newPath.slice();\n rowPath.push(index);\n row.forEach(function (column, index) {\n var colPath = rowPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n });\n }\n if (component.hasOwnProperty('components') && Array.isArray(component.components)) {\n newPath.push('components');\n findComponent(component.components, key, newPath, fn);\n }\n if (component.key === key) {\n //Final callback if the component is found\n fn(component, newPath, components);\n }\n });\n}\nexports.findComponent = findComponent;\n/**\n * Remove a component by path.\n *\n * @param components\n * @param path\n */\nfunction removeComponent(components, path) {\n // Using _.unset() leave a null value. Use Array splice instead.\n var index = path.pop();\n if (path.length !== 0) {\n components = (0, get_1.default)(components, path);\n }\n components.splice(index, 1);\n}\nexports.removeComponent = removeComponent;\nfunction generateFormChange(type, data) {\n let change;\n switch (type) {\n case 'add':\n change = {\n op: 'add',\n key: data.component.key,\n container: data.parent.key,\n path: data.path,\n index: data.index,\n component: data.component\n };\n break;\n case 'edit':\n change = {\n op: 'edit',\n key: data.originalComponent.key,\n patches: (0, fast_json_patch_1.compare)(data.originalComponent, data.component)\n };\n // Don't save if nothing changed.\n if (!change.patches.length) {\n change = null;\n }\n break;\n case 'remove':\n change = {\n op: 'remove',\n key: data.component.key,\n };\n break;\n }\n return change;\n}\nexports.generateFormChange = generateFormChange;\nfunction applyFormChanges(form, changes) {\n const failed = [];\n changes.forEach(function (change) {\n var found = false;\n switch (change.op) {\n case 'add':\n var newComponent = change.component;\n // Find the container to set the component in.\n findComponent(form.components, change.container, null, function (parent) {\n if (!change.container) {\n parent = form;\n }\n // A move will first run an add so remove any existing components with matching key before inserting.\n findComponent(form.components, change.key, null, function (component, path) {\n // If found, use the existing component. (If someone else edited it, the changes would be here)\n newComponent = component;\n removeComponent(form.components, path);\n });\n found = true;\n var container = (0, get_1.default)(parent, change.path);\n container.splice(change.index, 0, newComponent);\n });\n break;\n case 'remove':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n const oldComponent = (0, get_1.default)(form.components, path);\n if (oldComponent.key !== component.key) {\n path.pop();\n }\n removeComponent(form.components, path);\n });\n break;\n case 'edit':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n try {\n const oldComponent = (0, get_1.default)(form.components, path);\n const newComponent = (0, fast_json_patch_1.applyPatch)(component, change.patches).newDocument;\n if (oldComponent.key !== newComponent.key) {\n path.pop();\n }\n (0, set_1.default)(form.components, path, newComponent);\n }\n catch (err) {\n failed.push(change);\n }\n });\n break;\n case 'move':\n break;\n }\n if (!found) {\n failed.push(change);\n }\n });\n return {\n form,\n failed\n };\n}\nexports.applyFormChanges = applyFormChanges;\n/**\n * Flatten the form components for data manipulation.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n *\n * @returns {Object}\n * The flattened components map.\n */\nfunction flattenComponents(components, includeAll) {\n const flattened = {};\n eachComponent(components, (component, path) => {\n flattened[path] = component;\n }, includeAll);\n return flattened;\n}\nexports.flattenComponents = flattenComponents;\n/**\n * Returns if this component has a conditional statement.\n *\n * @param component - The component JSON schema.\n *\n * @returns {boolean} - TRUE - This component has a conditional, FALSE - No conditional provided.\n */\nfunction hasCondition(component) {\n return Boolean((component.customConditional) ||\n (component.conditional && (component.conditional.when ||\n (lodash_1.default.some(component.conditional.conditions || [], (condition => condition.component && condition.operator))) ||\n component.conditional.json ||\n component.conditional.condition)));\n}\nexports.hasCondition = hasCondition;\n/**\n * Extension of standard #parseFloat(value) function, that also clears input string.\n *\n * @param {any} value\n * The value to parse.\n *\n * @returns {Number}\n * Parsed value.\n */\nfunction parseFloatExt(value) {\n return parseFloat((0, isString_1.default)(value)\n ? value.replace(/[^\\de.+-]/gi, '')\n : value);\n}\nexports.parseFloatExt = parseFloatExt;\n/**\n * Formats provided value in way how Currency component uses it.\n *\n * @param {any} value\n * The value to format.\n *\n * @returns {String}\n * Value formatted for Currency component.\n */\nfunction formatAsCurrency(value) {\n const parsedValue = parseFloatExt(value);\n if ((0, isNaN_1.default)(parsedValue)) {\n return '';\n }\n const parts = (0, round_1.default)(parsedValue, 2)\n .toString()\n .split('.');\n parts[0] = (0, chunk_1.default)(Array.from(parts[0]).reverse(), 3)\n .reverse()\n .map((part) => part\n .reverse()\n .join(''))\n .join(',');\n parts[1] = (0, pad_1.default)(parts[1], 2, '0');\n return parts.join('.');\n}\nexports.formatAsCurrency = formatAsCurrency;\n/**\n * Escapes RegEx characters in provided String value.\n *\n * @param {String} value\n * String for escaping RegEx characters.\n * @returns {string}\n * String with escaped RegEx characters.\n */\nfunction escapeRegExCharacters(value) {\n return value.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n}\nexports.escapeRegExCharacters = escapeRegExCharacters;\n/**\n * Get the value for a component key, in the given submission.\n *\n * @param {Object} submission\n * A submission object to search.\n * @param {String} key\n * A for components API key to search for.\n */\nfunction getValue(submission, key) {\n const search = (data) => {\n if ((0, isPlainObject_1.default)(data)) {\n if ((0, has_1.default)(data, key)) {\n return lodash_1.default.get(data, key);\n }\n let value = null;\n (0, forOwn_1.default)(data, (prop) => {\n const result = search(prop);\n if (!(0, isNil_1.default)(result)) {\n value = result;\n return false;\n }\n });\n return value;\n }\n else {\n return null;\n }\n };\n return search(submission.data);\n}\nexports.getValue = getValue;\n/**\n * Iterate over all components in a form and get string values for translation.\n * @param form\n */\nfunction getStrings(form) {\n const properties = ['label', 'title', 'legend', 'tooltip', 'description', 'placeholder', 'prefix', 'suffix', 'errorLabel', 'content', 'html'];\n const strings = [];\n eachComponent(form.components, component => {\n properties.forEach(property => {\n if (component.hasOwnProperty(property) && component[property]) {\n strings.push({\n key: component.key,\n type: component.type,\n property,\n string: component[property]\n });\n }\n });\n if ((!component.dataSrc || component.dataSrc === 'values') && component.hasOwnProperty('values') && Array.isArray(component.values) && component.values.length) {\n component.values.forEach((value, index) => {\n strings.push({\n key: component.key,\n property: `value[${index}].label`,\n string: component.values[index].label\n });\n });\n }\n // Hard coded values from Day component\n if (component.type === 'day') {\n [\n 'day',\n 'month',\n 'year',\n 'Day',\n 'Month',\n 'Year',\n 'january',\n 'february',\n 'march',\n 'april',\n 'may',\n 'june',\n 'july',\n 'august',\n 'september',\n 'october',\n 'november',\n 'december'\n ].forEach(string => {\n strings.push({\n key: component.key,\n property: 'day',\n string,\n });\n });\n if (component.fields.day.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.day.placeholder',\n string: component.fields.day.placeholder,\n });\n }\n if (component.fields.month.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.month.placeholder',\n string: component.fields.month.placeholder,\n });\n }\n if (component.fields.year.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.year.placeholder',\n string: component.fields.year.placeholder,\n });\n }\n }\n if (component.type === 'editgrid') {\n const string = component.addAnother || 'Add Another';\n if (component.addAnother) {\n strings.push({\n key: component.key,\n property: 'addAnother',\n string,\n });\n }\n }\n if (component.type === 'select') {\n [\n 'loading...',\n 'Type to search'\n ].forEach(string => {\n strings.push({\n key: component.key,\n property: 'select',\n string,\n });\n });\n }\n }, true);\n return strings;\n}\nexports.getStrings = getStrings;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/formUtils.js?");
2113
+ eval("\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getStrings = exports.getValue = exports.escapeRegExCharacters = exports.formatAsCurrency = exports.parseFloatExt = exports.hasCondition = exports.flattenComponents = exports.applyFormChanges = exports.generateFormChange = exports.removeComponent = exports.findComponent = exports.findComponents = exports.searchComponents = exports.getComponent = exports.matchComponent = exports.eachComponent = exports.isLayoutComponent = void 0;\nconst get_1 = __importDefault(__webpack_require__(/*! lodash/get */ \"./node_modules/lodash/get.js\"));\nconst set_1 = __importDefault(__webpack_require__(/*! lodash/set */ \"./node_modules/lodash/set.js\"));\nconst has_1 = __importDefault(__webpack_require__(/*! lodash/has */ \"./node_modules/lodash/has.js\"));\nconst clone_1 = __importDefault(__webpack_require__(/*! lodash/clone */ \"./node_modules/lodash/clone.js\"));\nconst forOwn_1 = __importDefault(__webpack_require__(/*! lodash/forOwn */ \"./node_modules/lodash/forOwn.js\"));\nconst isString_1 = __importDefault(__webpack_require__(/*! lodash/isString */ \"./node_modules/lodash/isString.js\"));\nconst isNaN_1 = __importDefault(__webpack_require__(/*! lodash/isNaN */ \"./node_modules/lodash/isNaN.js\"));\nconst isNil_1 = __importDefault(__webpack_require__(/*! lodash/isNil */ \"./node_modules/lodash/isNil.js\"));\nconst isPlainObject_1 = __importDefault(__webpack_require__(/*! lodash/isPlainObject */ \"./node_modules/lodash/isPlainObject.js\"));\nconst round_1 = __importDefault(__webpack_require__(/*! lodash/round */ \"./node_modules/lodash/round.js\"));\nconst chunk_1 = __importDefault(__webpack_require__(/*! lodash/chunk */ \"./node_modules/lodash/chunk.js\"));\nconst pad_1 = __importDefault(__webpack_require__(/*! lodash/pad */ \"./node_modules/lodash/pad.js\"));\nconst fast_json_patch_1 = __webpack_require__(/*! fast-json-patch */ \"./node_modules/fast-json-patch/index.mjs\");\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nconst utils_1 = __webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\");\n/**\n * Determine if a component is a layout component or not.\n *\n * @param {Object} component\n * The component to check.\n *\n * @returns {Boolean}\n * Whether or not the component is a layout component.\n */\nfunction isLayoutComponent(component) {\n return Boolean((component.columns && Array.isArray(component.columns)) ||\n (component.rows && Array.isArray(component.rows)) ||\n (component.components && Array.isArray(component.components)));\n}\nexports.isLayoutComponent = isLayoutComponent;\n/**\n * Iterate through each component within a form.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Function} fn\n * The iteration function to invoke for each component.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n * @param {String} path\n * The current data path of the element. Example: data.user.firstName\n * @param {Object} parent\n * The parent object.\n */\nfunction eachComponent(components, fn, includeAll, path, parent, inRecursion) {\n if (!components)\n return;\n path = path || '';\n if (inRecursion) {\n if (components.noRecurse) {\n delete components.noRecurse;\n return;\n }\n components.noRecurse = true;\n }\n components.forEach((component) => {\n if (!component) {\n return;\n }\n const hasColumns = component.columns && Array.isArray(component.columns);\n const hasRows = component.rows && Array.isArray(component.rows);\n const hasComps = component.components && Array.isArray(component.components);\n let noRecurse = false;\n const newPath = component.key ? (path ? (`${path}.${component.key}`) : component.key) : '';\n // Keep track of parent references.\n if (parent) {\n // Ensure we don't create infinite JSON structures.\n component.parent = (0, clone_1.default)(parent);\n delete component.parent.components;\n delete component.parent.componentMap;\n delete component.parent.columns;\n delete component.parent.rows;\n }\n // there's no need to add other layout components here because we expect that those would either have columns, rows or components\n const layoutTypes = ['htmlelement', 'content'];\n const isLayoutComponent = hasColumns || hasRows || (hasComps && !component.input) || layoutTypes.indexOf(component.type) > -1;\n if (includeAll || component.tree || !isLayoutComponent) {\n noRecurse = fn(component, newPath, components);\n }\n const subPath = () => {\n if (component.key &&\n !['panel', 'table', 'well', 'columns', 'fieldset', 'tabs', 'form'].includes(component.type) &&\n (['datagrid', 'container', 'editgrid', 'address', 'dynamicWizard', 'datatable', 'tagpad'].includes(component.type) ||\n component.tree)) {\n return newPath;\n }\n else if (component.key &&\n component.type === 'form') {\n return `${newPath}.data`;\n }\n return path;\n };\n if (!noRecurse) {\n if (hasColumns) {\n component.columns.forEach((column) => eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null), true);\n }\n else if (hasRows) {\n component.rows.forEach((row) => {\n if (Array.isArray(row)) {\n row.forEach((column) => eachComponent(column.components, fn, includeAll, subPath(), parent ? component : null), true);\n }\n });\n }\n else if (hasComps) {\n eachComponent(component.components, fn, includeAll, subPath(), parent ? component : null, true);\n }\n }\n });\n if (components.noRecurse) {\n delete components.noRecurse;\n }\n}\nexports.eachComponent = eachComponent;\n/**\n * Matches if a component matches the query.\n *\n * @param component\n * @param query\n * @return {boolean}\n */\nfunction matchComponent(component, query) {\n if ((0, isString_1.default)(query)) {\n return (component.key === query) || (component.path === query);\n }\n else {\n let matches = false;\n (0, forOwn_1.default)(query, (value, key) => {\n matches = ((0, get_1.default)(component, key) === value);\n if (!matches) {\n return false;\n }\n });\n return matches;\n }\n}\nexports.matchComponent = matchComponent;\n/**\n * Get a component by its key\n *\n * @param {Object} components\n * The components to iterate.\n * @param {String|Object} key\n * The key of the component to get, or a query of the component to search.\n *\n * @returns {Object}\n * The component that matches the given key, or undefined if not found.\n */\nfunction getComponent(components, key, includeAll) {\n let result;\n eachComponent(components, (component, path) => {\n if ((path === key) || (component.path === key)) {\n result = component;\n return true;\n }\n }, includeAll);\n return result;\n}\nexports.getComponent = getComponent;\n/**\n * Finds a component provided a query of properties of that component.\n *\n * @param components\n * @param query\n * @return {*}\n */\nfunction searchComponents(components, query) {\n const results = [];\n eachComponent(components, (component) => {\n if (matchComponent(component, query)) {\n results.push(component);\n }\n }, true);\n return results;\n}\nexports.searchComponents = searchComponents;\n/**\n * Deprecated version of findComponents. Renamed to searchComponents.\n *\n * @param components\n * @param query\n * @returns {*}\n */\nfunction findComponents(components, query) {\n console.warn('formio.js/utils findComponents is deprecated. Use searchComponents instead.');\n return searchComponents(components, query);\n}\nexports.findComponents = findComponents;\n/**\n * This function will find a component in a form and return the component AND THE PATH to the component in the form.\n * Path to the component is stored as an array of nested components and their indexes.The Path is being filled recursively\n * when you iterating through the nested structure.\n * If the component is not found the callback won't be called and function won't return anything.\n *\n * @param components\n * @param key\n * @param fn\n * @param path\n * @returns {*}\n */\nfunction findComponent(components, key, path, fn) {\n if (!components)\n return;\n path = path || [];\n if (!key) {\n return fn(components);\n }\n components.forEach(function (component, index) {\n var newPath = path.slice();\n // Add an index of the component it iterates through in nested structure\n newPath.push(index);\n if (!component)\n return;\n if (component.hasOwnProperty('columns') && Array.isArray(component.columns)) {\n newPath.push('columns');\n component.columns.forEach(function (column, index) {\n var colPath = newPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n }\n if (component.hasOwnProperty('rows') && Array.isArray(component.rows)) {\n newPath.push('rows');\n component.rows.forEach(function (row, index) {\n var rowPath = newPath.slice();\n rowPath.push(index);\n row.forEach(function (column, index) {\n var colPath = rowPath.slice();\n colPath.push(index);\n colPath.push('components');\n findComponent(column.components, key, colPath, fn);\n });\n });\n }\n if (component.hasOwnProperty('components') && Array.isArray(component.components)) {\n newPath.push('components');\n findComponent(component.components, key, newPath, fn);\n }\n if (component.key === key) {\n //Final callback if the component is found\n fn(component, newPath, components);\n }\n });\n}\nexports.findComponent = findComponent;\n/**\n * Remove a component by path.\n *\n * @param components\n * @param path\n */\nfunction removeComponent(components, path) {\n // Using _.unset() leave a null value. Use Array splice instead.\n var index = path.pop();\n if (path.length !== 0) {\n components = (0, get_1.default)(components, path);\n }\n components.splice(index, 1);\n}\nexports.removeComponent = removeComponent;\nfunction generateFormChange(type, data) {\n let change;\n switch (type) {\n case 'add':\n change = {\n op: 'add',\n key: data.component.key,\n container: data.parent.key,\n path: data.path,\n index: data.index,\n component: data.component\n };\n break;\n case 'edit':\n change = {\n op: 'edit',\n key: data.originalComponent.key,\n patches: (0, fast_json_patch_1.compare)(data.originalComponent, data.component)\n };\n // Don't save if nothing changed.\n if (!change.patches.length) {\n change = null;\n }\n break;\n case 'remove':\n change = {\n op: 'remove',\n key: data.component.key,\n };\n break;\n }\n return change;\n}\nexports.generateFormChange = generateFormChange;\nfunction applyFormChanges(form, changes) {\n const failed = [];\n changes.forEach(function (change) {\n var found = false;\n switch (change.op) {\n case 'add':\n var newComponent = change.component;\n // Find the container to set the component in.\n findComponent(form.components, change.container, null, function (parent) {\n if (!change.container) {\n parent = form;\n }\n // A move will first run an add so remove any existing components with matching key before inserting.\n findComponent(form.components, change.key, null, function (component, path) {\n // If found, use the existing component. (If someone else edited it, the changes would be here)\n newComponent = component;\n removeComponent(form.components, path);\n });\n found = true;\n var container = (0, get_1.default)(parent, change.path);\n container.splice(change.index, 0, newComponent);\n });\n break;\n case 'remove':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n const oldComponent = (0, get_1.default)(form.components, path);\n if (oldComponent.key !== component.key) {\n path.pop();\n }\n removeComponent(form.components, path);\n });\n break;\n case 'edit':\n findComponent(form.components, change.key, null, function (component, path) {\n found = true;\n try {\n const oldComponent = (0, get_1.default)(form.components, path);\n const newComponent = (0, fast_json_patch_1.applyPatch)(component, change.patches).newDocument;\n if (oldComponent.key !== newComponent.key) {\n path.pop();\n }\n (0, set_1.default)(form.components, path, newComponent);\n }\n catch (err) {\n failed.push(change);\n }\n });\n break;\n case 'move':\n break;\n }\n if (!found) {\n failed.push(change);\n }\n });\n return {\n form,\n failed\n };\n}\nexports.applyFormChanges = applyFormChanges;\n/**\n * Flatten the form components for data manipulation.\n *\n * @param {Object} components\n * The components to iterate.\n * @param {Boolean} includeAll\n * Whether or not to include layout components.\n *\n * @returns {Object}\n * The flattened components map.\n */\nfunction flattenComponents(components, includeAll = false) {\n const flattened = {};\n eachComponent(components, (component, path) => {\n flattened[path] = component;\n }, includeAll);\n return flattened;\n}\nexports.flattenComponents = flattenComponents;\n/**\n * Returns if this component has a conditional statement.\n *\n * @param component - The component JSON schema.\n *\n * @returns {boolean} - TRUE - This component has a conditional, FALSE - No conditional provided.\n */\nfunction hasCondition(component) {\n return Boolean((component.customConditional) ||\n (component.conditional && (component.conditional.when ||\n (lodash_1.default.some(component.conditional.conditions || [], (condition => condition.component && condition.operator))) ||\n component.conditional.json ||\n component.conditional.condition)));\n}\nexports.hasCondition = hasCondition;\n/**\n * Extension of standard #parseFloat(value) function, that also clears input string.\n *\n * @param {any} value\n * The value to parse.\n *\n * @returns {Number}\n * Parsed value.\n */\nfunction parseFloatExt(value) {\n return parseFloat((0, isString_1.default)(value)\n ? value.replace(/[^\\de.+-]/gi, '')\n : value);\n}\nexports.parseFloatExt = parseFloatExt;\n/**\n * Formats provided value in way how Currency component uses it.\n *\n * @param {any} value\n * The value to format.\n *\n * @returns {String}\n * Value formatted for Currency component.\n */\nfunction formatAsCurrency(value) {\n const parsedValue = parseFloatExt(value);\n if ((0, isNaN_1.default)(parsedValue)) {\n return '';\n }\n const parts = (0, round_1.default)(parsedValue, 2)\n .toString()\n .split('.');\n parts[0] = (0, chunk_1.default)(Array.from(parts[0]).reverse(), 3)\n .reverse()\n .map((part) => part\n .reverse()\n .join(''))\n .join(',');\n parts[1] = (0, pad_1.default)(parts[1], 2, '0');\n return parts.join('.');\n}\nexports.formatAsCurrency = formatAsCurrency;\n/**\n * Escapes RegEx characters in provided String value.\n *\n * @param {String} value\n * String for escaping RegEx characters.\n * @returns {string}\n * String with escaped RegEx characters.\n */\nfunction escapeRegExCharacters(value) {\n return value.replace(/[-[\\]/{}()*+?.\\\\^$|]/g, '\\\\$&');\n}\nexports.escapeRegExCharacters = escapeRegExCharacters;\n/**\n * Get the value for a component key, in the given submission.\n *\n * @param {Object} submission\n * A submission object to search.\n * @param {String} key\n * A for components API key to search for.\n */\nfunction getValue(submission, key) {\n const search = (data) => {\n if ((0, isPlainObject_1.default)(data)) {\n if ((0, has_1.default)(data, key)) {\n return lodash_1.default.get(data, key);\n }\n let value = null;\n (0, forOwn_1.default)(data, (prop) => {\n const result = search(prop);\n if (!(0, isNil_1.default)(result)) {\n value = result;\n return false;\n }\n });\n return value;\n }\n else {\n return null;\n }\n };\n return search(submission.data);\n}\nexports.getValue = getValue;\n/**\n * Iterate over all components in a form and get string values for translation.\n * @param form\n */\nfunction getStrings(form) {\n const properties = ['label', 'title', 'legend', 'tooltip', 'description', 'placeholder', 'prefix', 'suffix', 'errorLabel', 'content', 'html'];\n const strings = [];\n eachComponent(form.components, component => {\n properties.forEach(property => {\n if (component.hasOwnProperty(property) && component[property]) {\n strings.push({\n key: component.key,\n type: component.type,\n property,\n string: component[property]\n });\n }\n });\n if ((!component.dataSrc || component.dataSrc === 'values') && component.hasOwnProperty('values') && Array.isArray(component.values) && component.values.length) {\n component.values.forEach((value, index) => {\n strings.push({\n key: component.key,\n property: `value[${index}].label`,\n string: component.values[index].label\n });\n });\n }\n // Hard coded values from Day component\n if (component.type === 'day') {\n [\n 'day',\n 'month',\n 'year',\n 'Day',\n 'Month',\n 'Year',\n 'january',\n 'february',\n 'march',\n 'april',\n 'may',\n 'june',\n 'july',\n 'august',\n 'september',\n 'october',\n 'november',\n 'december'\n ].forEach(string => {\n strings.push({\n key: component.key,\n property: 'day',\n string,\n });\n });\n if (component.fields.day.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.day.placeholder',\n string: component.fields.day.placeholder,\n });\n }\n if (component.fields.month.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.month.placeholder',\n string: component.fields.month.placeholder,\n });\n }\n if (component.fields.year.placeholder) {\n strings.push({\n key: component.key,\n property: 'fields.year.placeholder',\n string: component.fields.year.placeholder,\n });\n }\n }\n if (component.type === 'editgrid') {\n const string = component.addAnother || 'Add Another';\n if (component.addAnother) {\n strings.push({\n key: component.key,\n property: 'addAnother',\n string,\n });\n }\n }\n if (component.type === 'select') {\n [\n 'loading...',\n 'Type to search'\n ].forEach(string => {\n strings.push({\n key: component.key,\n property: 'select',\n string,\n });\n });\n }\n }, true);\n return strings;\n}\nexports.getStrings = getStrings;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/formUtils.js?");
2180
2114
 
2181
2115
  /***/ }),
2182
2116
 
@@ -2198,7 +2132,7 @@ eval("\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexpo
2198
2132
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2199
2133
 
2200
2134
  "use strict";
2201
- eval("\n/* global jQuery */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.observeOverload = exports.withSwitch = exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.uniqueKey = exports.iterateKey = exports.delay = exports.fieldData = exports.getCurrencyAffixes = exports.getNumberDecimalLimit = exports.getNumberSeparators = exports.matchInputMask = exports.unmaskValue = exports.getInputMask = exports.convertFormatToMask = exports.convertFormatToMoment = exports.convertFormatToFlatpickr = exports.getLocaleDateFormatInfo = exports.formatOffset = exports.formatDate = exports.momentDate = exports.loadZones = exports.shouldLoadZones = exports.zonesLoaded = exports.offsetDate = exports.currentTimezone = exports.isValidDate = exports.getDateSetting = exports.guid = exports.uniqueName = exports.convertStringToHTMLElement = exports.unescapeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = exports.moment = exports.ConditionOperators = exports.jsonLogic = void 0;\nexports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = void 0;\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nexports._ = lodash_1.default;\nconst fetch_ponyfill_1 = __importDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nconst json_logic_js_1 = __importDefault(__webpack_require__(/*! json-logic-js */ \"./node_modules/json-logic-js/logic.js\"));\nexports.jsonLogic = json_logic_js_1.default;\nconst moment_timezone_1 = __importDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nconst jstimezonedetect_1 = __importDefault(__webpack_require__(/*! jstimezonedetect */ \"./node_modules/jstimezonedetect/dist/jstz.min.js\"));\nconst operators_1 = __webpack_require__(/*! ./jsonlogic/operators */ \"./lib/cjs/utils/jsonlogic/operators.js\");\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\"));\nconst formUtils_1 = __webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst Evaluator_1 = __importDefault(__webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\"));\nexports.Evaluator = Evaluator_1.default;\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nexports.ConditionOperators = conditionOperators_1.default;\nconst interpolate = Evaluator_1.default.interpolate;\nexports.interpolate = interpolate;\nconst { fetch } = (0, fetch_ponyfill_1.default)({\n Promise: Promise\n});\n__exportStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"), exports);\n// Configure JsonLogic\noperators_1.lodashOperators.forEach((name) => json_logic_js_1.default.add_operation(`_${name}`, lodash_1.default[name]));\n// Retrieve Any Date\njson_logic_js_1.default.add_operation('getDate', (date) => {\n return (0, moment_timezone_1.default)(date).toISOString();\n});\n// Set Relative Minimum Date\njson_logic_js_1.default.add_operation('relativeMinDate', (relativeMinDate) => {\n return (0, moment_timezone_1.default)().subtract(relativeMinDate, 'days').toISOString();\n});\n// Set Relative Maximum Date\njson_logic_js_1.default.add_operation('relativeMaxDate', (relativeMaxDate) => {\n return (0, moment_timezone_1.default)().add(relativeMaxDate, 'days').toISOString();\n});\nexports.moment = __importStar(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nfunction setPathToComponentAndPerentSchema(component) {\n component.path = getComponentPath(component);\n const dataParent = getDataParentComponent(component);\n if (dataParent && typeof dataParent === 'object') {\n dataParent.path = getComponentPath(dataParent);\n }\n}\n/**\n * Evaluate a method.\n *\n * @param func\n * @param args\n * @return {*}\n */\nfunction evaluate(func, args, ret, tokenize) {\n let returnVal = null;\n const component = args.component ? args.component : { key: 'unknown' };\n if (!args.form && args.instance) {\n args.form = lodash_1.default.get(args.instance, 'root._form', {});\n }\n const componentKey = component.key;\n if (typeof func === 'string') {\n if (ret) {\n func += `;return ${ret}`;\n }\n if (tokenize) {\n // Replace all {{ }} references with actual data.\n func = func.replace(/({{\\s+(.*)\\s+}})/, (match, $1, $2) => {\n if ($2.indexOf('data.') === 0) {\n return lodash_1.default.get(args.data, $2.replace('data.', ''));\n }\n else if ($2.indexOf('row.') === 0) {\n return lodash_1.default.get(args.row, $2.replace('row.', ''));\n }\n // Support legacy...\n return lodash_1.default.get(args.data, $2);\n });\n }\n try {\n func = Evaluator_1.default.evaluator(func, args);\n args = lodash_1.default.values(args);\n }\n catch (err) {\n console.warn(`An error occured within the custom function for ${componentKey}`, err);\n returnVal = null;\n func = false;\n }\n }\n if (typeof func === 'function') {\n try {\n returnVal = Evaluator_1.default.evaluate(func, args);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (typeof func === 'object') {\n try {\n returnVal = json_logic_js_1.default.apply(func, args);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (func) {\n console.warn(`Unknown function type for ${componentKey}`);\n }\n return returnVal;\n}\nexports.evaluate = evaluate;\nfunction getRandomComponentId() {\n return `e${Math.random().toString(36).substring(7)}`;\n}\nexports.getRandomComponentId = getRandomComponentId;\n/**\n * Get a property value of an element.\n *\n * @param style\n * @param prop\n * @return {number}\n */\nfunction getPropertyValue(style, prop) {\n let value = style.getPropertyValue(prop);\n value = value ? value.replace(/[^0-9.]/g, '') : '0';\n return parseFloat(value);\n}\nexports.getPropertyValue = getPropertyValue;\n/**\n * Get an elements bounding rectagle.\n *\n * @param element\n * @return {{x: string, y: string, width: string, height: string}}\n */\nfunction getElementRect(element) {\n const style = window.getComputedStyle(element, null);\n return {\n x: getPropertyValue(style, 'left'),\n y: getPropertyValue(style, 'top'),\n width: getPropertyValue(style, 'width'),\n height: getPropertyValue(style, 'height')\n };\n}\nexports.getElementRect = getElementRect;\n/**\n * Determines the boolean value of a setting.\n *\n * @param value\n * @return {boolean}\n */\nfunction boolValue(value) {\n if (lodash_1.default.isBoolean(value)) {\n return value;\n }\n else if (lodash_1.default.isString(value)) {\n return (value.toLowerCase() === 'true');\n }\n else {\n return !!value;\n }\n}\nexports.boolValue = boolValue;\n/**\n * Check to see if an ID is a mongoID.\n * @param text\n * @return {Array|{index: number, input: string}|Boolean|*}\n */\nfunction isMongoId(text) {\n return text.toString().match(/^[0-9a-fA-F]{24}$/);\n}\nexports.isMongoId = isMongoId;\n/**\n * Checks the calculated value for a provided component and data.\n *\n * @param {Object} component\n * The component to check for the calculated value.\n * @param {Object} submission\n * A submission object.\n * @param data\n * The full submission data.\n */\nfunction checkCalculated(component, submission, rowData) {\n // Process calculated value stuff if present.\n if (component.calculateValue) {\n lodash_1.default.set(rowData, component.key, evaluate(component.calculateValue, {\n value: undefined,\n data: submission ? submission.data : rowData,\n row: rowData,\n util: this,\n component\n }, 'value'));\n }\n}\nexports.checkCalculated = checkCalculated;\n/**\n * Check if a simple conditional evaluates to true.\n *\n * @param condition\n * @param condition\n * @param row\n * @param data\n * @param instance\n * @returns {boolean}\n */\nfunction checkSimpleConditional(component, condition, row, data, instance) {\n if (condition.when) {\n const value = getComponentActualValue(condition.when, data, row);\n const eq = String(condition.eq);\n const show = String(condition.show);\n // Special check for selectboxes component.\n if (lodash_1.default.isObject(value) && lodash_1.default.has(value, condition.eq)) {\n return String(value[condition.eq]) === show;\n }\n // FOR-179 - Check for multiple values.\n if (Array.isArray(value) && value.map(String).includes(eq)) {\n return show === 'true';\n }\n return (String(value) === eq) === (show === 'true');\n }\n else {\n const { conditions = [], conjunction = 'all', show = true } = condition;\n if (!conditions.length) {\n return true;\n }\n const conditionsResult = lodash_1.default.map(conditions, (cond) => {\n const { value: comparedValue, operator, component: conditionComponentPath } = cond;\n if (!conditionComponentPath) {\n return true;\n }\n const value = getComponentActualValue(conditionComponentPath, data, row);\n const ConditionOperator = conditionOperators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({ value, comparedValue, instance, component, conditionComponentPath })\n : true;\n });\n let result = false;\n switch (conjunction) {\n case 'any':\n result = lodash_1.default.some(conditionsResult, res => !!res);\n break;\n default:\n result = lodash_1.default.every(conditionsResult, res => !!res);\n }\n return show ? result : !result;\n }\n}\nexports.checkSimpleConditional = checkSimpleConditional;\nfunction getComponentActualValue(compPath, data, row) {\n let value = null;\n if (row) {\n value = (0, formUtils_1.getValue)({ data: row }, compPath);\n }\n if (data && lodash_1.default.isNil(value)) {\n value = (0, formUtils_1.getValue)({ data }, compPath);\n }\n // FOR-400 - Fix issue where falsey values were being evaluated as show=true\n if (lodash_1.default.isNil(value) || (lodash_1.default.isObject(value) && lodash_1.default.isEmpty(value))) {\n value = '';\n }\n return value;\n}\nexports.getComponentActualValue = getComponentActualValue;\n/**\n * Check custom javascript conditional.\n *\n * @param component\n * @param custom\n * @param row\n * @param data\n * @returns {*}\n */\nfunction checkCustomConditional(component, custom, row, data, form, variable, onError, instance) {\n if (typeof custom === 'string') {\n custom = `var ${variable} = true; ${custom}; return ${variable};`;\n }\n const value = (instance && instance.evaluate) ?\n instance.evaluate(custom, { row, data, form }) :\n evaluate(custom, { row, data, form });\n if (value === null) {\n return onError;\n }\n return value;\n}\nexports.checkCustomConditional = checkCustomConditional;\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return json_logic_js_1.default.apply(json, {\n data,\n row,\n form,\n _: lodash_1.default,\n });\n }\n catch (err) {\n console.warn(`An error occurred in jsonLogic advanced condition for ${component.key}`, err);\n return onError;\n }\n}\nexports.checkJsonConditional = checkJsonConditional;\nfunction getRow(component, row, instance, conditional) {\n var _a;\n const condition = conditional || component.conditional;\n // If no component's instance passed (happens only in 6.x server), calculate its path based on the schema\n if (!instance) {\n instance = lodash_1.default.cloneDeep(component);\n setPathToComponentAndPerentSchema(instance);\n }\n const dataParent = getDataParentComponent(instance);\n const parentPath = dataParent ? getComponentPath(dataParent) : null;\n const isTriggerCondtionComponentPath = condition.when || !condition.conditions\n ? (_a = condition.when) === null || _a === void 0 ? void 0 : _a.startsWith(parentPath)\n : lodash_1.default.some(condition.conditions, cond => cond.component.startsWith(parentPath));\n if (dataParent && isTriggerCondtionComponentPath) {\n const newRow = {};\n lodash_1.default.set(newRow, parentPath, row);\n row = newRow;\n }\n return row;\n}\n/**\n * Checks the conditions for a provided component and data.\n *\n * @param component\n * The component to check for the condition.\n * @param row\n * The data within a row\n * @param data\n * The full submission data.\n *\n * @returns {boolean}\n */\nfunction checkCondition(component, row, data, form, instance) {\n const { customConditional, conditional } = component;\n if (customConditional) {\n return checkCustomConditional(component, customConditional, row, data, form, 'show', true, instance);\n }\n else if (conditional && (conditional.when || lodash_1.default.some(conditional.conditions || [], condition => condition.component && condition.operator))) {\n row = getRow(component, row, instance);\n return checkSimpleConditional(component, conditional, row, data, instance);\n }\n else if (conditional && conditional.json) {\n return checkJsonConditional(component, conditional.json, row, data, form, true);\n }\n // Default to show.\n return true;\n}\nexports.checkCondition = checkCondition;\n/**\n * Test a trigger on a component.\n *\n * @param component\n * @param action\n * @param data\n * @param row\n * @returns {mixed}\n */\nfunction checkTrigger(component, trigger, row, data, form, instance) {\n // If trigger is empty, don't fire it\n if (!trigger || !trigger[trigger.type]) {\n return false;\n }\n switch (trigger.type) {\n case 'simple':\n row = getRow(component, row, instance, trigger.simple);\n return checkSimpleConditional(component, trigger.simple, row, data, instance);\n case 'javascript':\n return checkCustomConditional(component, trigger.javascript, row, data, form, 'result', false, instance);\n case 'json':\n return checkJsonConditional(component, trigger.json, row, data, form, false);\n }\n // If none of the types matched, don't fire the trigger.\n return false;\n}\nexports.checkTrigger = checkTrigger;\nfunction setActionProperty(component, action, result, row, data, instance) {\n const property = action.property.value;\n switch (action.property.type) {\n case 'boolean': {\n const currentValue = lodash_1.default.get(component, property, false).toString();\n const newValue = action.state.toString();\n if (currentValue !== newValue) {\n lodash_1.default.set(component, property, newValue === 'true');\n }\n break;\n }\n case 'string': {\n const evalData = {\n data,\n row,\n component,\n result,\n };\n const textValue = action.property.component ? action[action.property.component] : action.text;\n const currentValue = lodash_1.default.get(component, property, '');\n const newValue = (instance && instance.interpolate)\n ? instance.interpolate(textValue, evalData)\n : Evaluator_1.default.interpolate(textValue, evalData);\n if (newValue !== currentValue) {\n lodash_1.default.set(component, property, newValue);\n }\n break;\n }\n }\n return component;\n}\nexports.setActionProperty = setActionProperty;\n/**\n * Unescape HTML characters like &lt, &gt, &amp and etc.\n * @param str\n * @returns {string}\n */\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.documentElement.textContent;\n}\nexports.unescapeHTML = unescapeHTML;\n/**\n * Make HTML element from string\n * @param str\n * @param selector\n * @returns {HTMLElement}\n */\nfunction convertStringToHTMLElement(str, selector) {\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.body.querySelector(selector);\n}\nexports.convertStringToHTMLElement = convertStringToHTMLElement;\n/**\n * Make a filename guaranteed to be unique.\n * @param name\n * @param template\n * @param evalContext\n * @returns {string}\n */\nfunction uniqueName(name, template, evalContext) {\n template = template || '{{fileName}}-{{guid}}';\n //include guid in template anyway, to prevent overwriting issue if filename matches existing file\n if (!template.includes('{{guid}}')) {\n template = `${template}-{{guid}}`;\n }\n const parts = name.split('.');\n let fileName = parts.slice(0, parts.length - 1).join('.');\n const extension = parts.length > 1\n ? `.${lodash_1.default.last(parts)}`\n : '';\n //allow only 100 characters from original name to avoid issues with filename length restrictions\n fileName = fileName.substr(0, 100);\n evalContext = Object.assign(evalContext || {}, {\n fileName,\n guid: guid()\n });\n //only letters, numbers, dots, dashes, underscores and spaces are allowed. Anything else will be replaced with dash\n const uniqueName = `${Evaluator_1.default.interpolate(template, evalContext)}${extension}`.replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\nexports.uniqueName = uniqueName;\nfunction guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.random() * 16 | 0;\n const v = c === 'x'\n ? r\n : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\nexports.guid = guid;\n/**\n * Return a translated date setting.\n *\n * @param date\n * @return {(null|Date)}\n */\nfunction getDateSetting(date) {\n if (lodash_1.default.isNil(date) || lodash_1.default.isNaN(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n }\n else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n let dateSetting = ((typeof date !== 'string') || (date.indexOf('moment(') === -1)) ? (0, moment_timezone_1.default)(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n const value = Evaluator_1.default.evaluator(`return ${date};`, 'moment')(moment_timezone_1.default);\n if (typeof value === 'string') {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n else if (typeof value.toDate === 'function') {\n dateSetting = (0, moment_timezone_1.default)(value.toDate().toUTCString());\n }\n else if (value instanceof Date) {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n }\n catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nexports.getDateSetting = getDateSetting;\nfunction isValidDate(date) {\n return lodash_1.default.isDate(date) && !lodash_1.default.isNaN(date.getDate());\n}\nexports.isValidDate = isValidDate;\n/**\n * Get the current timezone string.\n *\n * @return {string}\n */\nfunction currentTimezone() {\n if (moment_timezone_1.default.currentTimezone) {\n return moment_timezone_1.default.currentTimezone;\n }\n moment_timezone_1.default.currentTimezone = jstimezonedetect_1.default.determine().name();\n return moment_timezone_1.default.currentTimezone;\n}\nexports.currentTimezone = currentTimezone;\n/**\n * Get an offset date provided a date object and timezone object.\n *\n * @param date\n * @param timezone\n * @return {Date}\n */\nfunction offsetDate(date, timezone) {\n if (timezone === 'UTC') {\n return {\n date: new Date(date.getTime() + (date.getTimezoneOffset() * 60000)),\n abbr: 'UTC'\n };\n }\n const dateMoment = (0, moment_timezone_1.default)(date).tz(timezone);\n return {\n date: new Date(date.getTime() + ((dateMoment.utcOffset() + date.getTimezoneOffset()) * 60000)),\n abbr: dateMoment.format('z')\n };\n}\nexports.offsetDate = offsetDate;\n/**\n * Returns if the zones are loaded.\n *\n * @return {boolean}\n */\nfunction zonesLoaded() {\n return moment_timezone_1.default.zonesLoaded;\n}\nexports.zonesLoaded = zonesLoaded;\n/**\n * Returns if we should load the zones.\n *\n * @param timezone\n * @return {boolean}\n */\nfunction shouldLoadZones(timezone) {\n if (timezone === currentTimezone() || timezone === 'UTC') {\n return false;\n }\n return true;\n}\nexports.shouldLoadZones = shouldLoadZones;\n/**\n * Externally load the timezone data.\n *\n * @return {Promise<any> | *}\n */\nfunction loadZones(url, timezone) {\n if (timezone && !shouldLoadZones(timezone)) {\n // Return non-resolving promise.\n return new Promise(lodash_1.default.noop);\n }\n if (moment_timezone_1.default.zonesPromise) {\n return moment_timezone_1.default.zonesPromise;\n }\n return moment_timezone_1.default.zonesPromise = fetch(url)\n .then(resp => resp.json().then(zones => {\n moment_timezone_1.default.tz.load(zones);\n moment_timezone_1.default.zonesLoaded = true;\n // Trigger a global event that the timezones have finished loading.\n if (document && document.createEvent && document.body && document.body.dispatchEvent) {\n var event = document.createEvent('Event');\n event.initEvent('zonesLoaded', true, true);\n document.body.dispatchEvent(event);\n }\n }));\n}\nexports.loadZones = loadZones;\n/**\n * Get the moment date object for translating dates with timezones.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {*}\n */\nfunction momentDate(value, format, timezone) {\n const momentDate = (0, moment_timezone_1.default)(value);\n if (!timezone) {\n return momentDate;\n }\n if (timezone === 'UTC') {\n timezone = 'Etc/UTC';\n }\n if ((timezone !== currentTimezone() || (format && format.match(/\\s(z$|z\\s)/))) && moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\nexports.momentDate = momentDate;\n/**\n * Format a date provided a value, format, and timezone object.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatDate(timezonesUrl, value, format, timezone, flatPickrInputFormat) {\n const momentDate = (0, moment_timezone_1.default)(value, flatPickrInputFormat || undefined);\n if (timezone === currentTimezone()) {\n // See if our format contains a \"z\" timezone character.\n if (format.match(/\\s(z$|z\\s)/)) {\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone).format(convertFormatToMoment(format));\n }\n else {\n return momentDate.format(convertFormatToMoment(format.replace(/\\s(z$|z\\s)/, '')));\n }\n }\n // Return the standard format.\n return momentDate.format(convertFormatToMoment(format));\n }\n if (timezone === 'UTC') {\n const offset = offsetDate(momentDate.toDate(), 'UTC');\n return `${(0, moment_timezone_1.default)(offset.date).format(convertFormatToMoment(format))} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded && timezone) {\n return momentDate.tz(timezone).format(`${convertFormatToMoment(format)} z`);\n }\n else {\n return momentDate.format(convertFormatToMoment(format));\n }\n}\nexports.formatDate = formatDate;\n/**\n * Pass a format function to format within a timezone.\n *\n * @param formatFn\n * @param date\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatOffset(timezonesUrl, formatFn, date, format, timezone) {\n if (timezone === currentTimezone()) {\n return formatFn(date, format);\n }\n if (timezone === 'UTC') {\n return `${formatFn(offsetDate(date, 'UTC').date, format)} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n const offset = offsetDate(date, timezone);\n return `${formatFn(offset.date, format)} ${offset.abbr}`;\n }\n else {\n return formatFn(date, format);\n }\n}\nexports.formatOffset = formatOffset;\nfunction getLocaleDateFormatInfo(locale) {\n const formatInfo = {};\n const day = 21;\n const exampleDate = new Date(2017, 11, day);\n const localDateString = exampleDate.toLocaleDateString(locale);\n formatInfo.dayFirst = localDateString.slice(0, 2) === day.toString();\n return formatInfo;\n}\nexports.getLocaleDateFormatInfo = getLocaleDateFormatInfo;\n/**\n * Convert the format from the angular-datepicker module to flatpickr format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToFlatpickr(format) {\n return format\n // Remove the Z timezone offset, not supported by flatpickr.\n .replace(/Z/g, '')\n // Year conversion.\n .replace(/y/g, 'Y')\n .replace('YYYY', 'Y')\n .replace('YY', 'y')\n // Month conversion.\n .replace('MMMM', 'F')\n .replace(/M/g, 'n')\n .replace('nnn', 'M')\n .replace('nn', 'm')\n // Day in month.\n .replace(/d/g, 'j')\n .replace(/jj/g, 'd')\n // Day in week.\n .replace('EEEE', 'l')\n .replace('EEE', 'D')\n // Hours, minutes, seconds\n .replace('HH', 'H')\n .replace('hh', 'G')\n .replace('mm', 'i')\n .replace('ss', 'S')\n .replace(/a/g, 'K');\n}\nexports.convertFormatToFlatpickr = convertFormatToFlatpickr;\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToMoment(format) {\n return format\n // Year conversion.\n .replace(/y/g, 'Y')\n // Day in month.\n .replace(/d/g, 'D')\n // Day in week.\n .replace(/E/g, 'd')\n // AM/PM marker\n .replace(/a/g, 'A')\n // Unix Timestamp\n .replace(/U/g, 'X');\n}\nexports.convertFormatToMoment = convertFormatToMoment;\nfunction convertFormatToMask(format) {\n return format\n // Long month replacement.\n .replace(/M{4}/g, 'MM')\n // Initial short month conversion.\n .replace(/M{3}/g, '***')\n // Short month conversion if input as text.\n .replace(/e/g, 'Q')\n // Month number conversion.\n .replace(/W/g, '99')\n // Year conversion.\n .replace(/[ydhmswHMG]/g, '9')\n // AM/PM conversion.\n .replace(/a/g, 'AA');\n}\nexports.convertFormatToMask = convertFormatToMask;\n/**\n * Returns an input mask that is compatible with the input mask library.\n * @param {string} mask - The Form.io input mask.\n * @param {string} placeholderChar - Char which is used as a placeholder.\n * @returns {Array} - The input mask for the mask library.\n */\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n maskArray.numeric = true;\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nexports.getInputMask = getInputMask;\nfunction unmaskValue(value, mask, placeholderChar) {\n if (!mask || !value || value.length > mask.length) {\n return value;\n }\n let unmaskedValue = value.split('');\n for (let i = 0; i < mask.length; i++) {\n const char = value[i] || '';\n const charPart = mask[i];\n if (!lodash_1.default.isRegExp(charPart) && char === charPart) {\n unmaskedValue[i] = '';\n }\n }\n unmaskedValue = unmaskedValue.join('').replace(placeholderChar, '');\n return unmaskedValue;\n}\nexports.unmaskValue = unmaskValue;\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i] || '';\n const charPart = inputMask[i];\n if (!(lodash_1.default.isRegExp(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\nfunction getNumberSeparators(lang = 'en') {\n const formattedNumberString = (12345.6789).toLocaleString(lang);\n const delimeters = formattedNumberString.match(/..(.)...(.)../);\n if (!delimeters) {\n return {\n delimiter: ',',\n decimalSeparator: '.'\n };\n }\n return {\n delimiter: (delimeters.length > 1) ? delimeters[1] : ',',\n decimalSeparator: (delimeters.length > 2) ? delimeters[2] : '.',\n };\n}\nexports.getNumberSeparators = getNumberSeparators;\nfunction getNumberDecimalLimit(component, defaultLimit) {\n if (lodash_1.default.has(component, 'decimalLimit')) {\n return lodash_1.default.get(component, 'decimalLimit');\n }\n // Determine the decimal limit. Defaults to 20 but can be overridden by validate.step or decimalLimit settings.\n let decimalLimit = defaultLimit || 20;\n const step = lodash_1.default.get(component, 'validate.step', 'any');\n if (step !== 'any') {\n const parts = step.toString().split('.');\n if (parts.length > 1) {\n decimalLimit = parts[1].length;\n }\n }\n return decimalLimit;\n}\nexports.getNumberDecimalLimit = getNumberDecimalLimit;\nfunction getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, lang, }) {\n // Get the prefix and suffix from the localized string.\n let regex = `(.*)?${(100).toLocaleString(lang)}`;\n if (decimalLimit) {\n regex += `${decimalSeparator === '.' ? '\\\\.' : decimalSeparator}${(0).toLocaleString(lang)}{${decimalLimit}}`;\n }\n regex += '(.*)?';\n const parts = (100).toLocaleString(lang, {\n style: 'currency',\n currency: currency ? currency : 'USD',\n useGrouping: true,\n maximumFractionDigits: decimalLimit || 0,\n minimumFractionDigits: decimalLimit || 0\n }).replace('.', decimalSeparator).match(new RegExp(regex));\n return {\n prefix: (parts === null || parts === void 0 ? void 0 : parts[1]) || '',\n suffix: (parts === null || parts === void 0 ? void 0 : parts[2]) || ''\n };\n}\nexports.getCurrencyAffixes = getCurrencyAffixes;\n/**\n * Fetch the field data provided a component.\n *\n * @param data\n * @param component\n * @return {*}\n */\nfunction fieldData(data, component) {\n if (!data) {\n return '';\n }\n if (!component || !component.key) {\n return data;\n }\n if (component.key.includes('.')) {\n let value = data;\n const parts = component.key.split('.');\n let key = '';\n for (let i = 0; i < parts.length; i++) {\n key = parts[i];\n // Handle nested resources\n if (value.hasOwnProperty('_id')) {\n value = value.data;\n }\n // Return if the key is not found on the value.\n if (!value.hasOwnProperty(key)) {\n return;\n }\n // Convert old single field data in submissions to multiple\n if (key === parts[parts.length - 1] && component.multiple && !Array.isArray(value[key])) {\n value[key] = [value[key]];\n }\n // Set the value of this key.\n value = value[key];\n }\n return value;\n }\n else {\n // Convert old single field data in submissions to multiple\n if (component.multiple && !Array.isArray(data[component.key])) {\n data[component.key] = [data[component.key]];\n }\n // Fix for checkbox type radio submission values in tableView\n if (component.type === 'checkbox' && component.inputType === 'radio') {\n return data[component.name] === component.value;\n }\n return data[component.key];\n }\n}\nexports.fieldData = fieldData;\n/**\n * Delays function execution with possibility to execute function synchronously or cancel it.\n *\n * @param fn Function to delay\n * @param delay Delay time\n * @return {*}\n */\nfunction delay(fn, delay = 0, ...args) {\n const timer = setTimeout(fn, delay, ...args);\n function cancel() {\n clearTimeout(timer);\n }\n function earlyCall() {\n cancel();\n return fn(...args);\n }\n earlyCall.timer = timer;\n earlyCall.cancel = cancel;\n return earlyCall;\n}\nexports.delay = delay;\n/**\n * Iterate the given key to make it unique.\n *\n * @param {String} key\n * Modify the component key to be unique.\n *\n * @returns {String}\n * The new component key.\n */\nfunction iterateKey(key) {\n if (!key.match(/(\\d+)$/)) {\n return `${key}1`;\n }\n return key.replace(/(\\d+)$/, function (suffix) {\n return Number(suffix) + 1;\n });\n}\nexports.iterateKey = iterateKey;\n/**\n * Determines a unique key within a map provided the base key.\n *\n * @param map\n * @param base\n * @return {*}\n */\nfunction uniqueKey(map, base) {\n let newKey = base;\n while (map.hasOwnProperty(newKey)) {\n newKey = iterateKey(newKey);\n }\n return newKey;\n}\nexports.uniqueKey = uniqueKey;\n/**\n * Determines the major version number of bootstrap.\n *\n * @return {number}\n */\nfunction bootstrapVersion(options) {\n if (options.bootstrap) {\n return options.bootstrap;\n }\n if ((typeof jQuery === 'function') && (typeof jQuery().collapse === 'function')) {\n return parseInt(jQuery.fn.collapse.Constructor.VERSION.split('.')[0], 10);\n }\n if (window.bootstrap && window.bootstrap.Collapse) {\n return parseInt(window.bootstrap.Collapse.VERSION.split('.')[0], 10);\n }\n return 0;\n}\nexports.bootstrapVersion = bootstrapVersion;\n/**\n * Retrun provided argument.\n * If argument is a function, returns the result of a function call.\n * @param {*} e;\n *\n * @return {*}\n */\nfunction unfold(e) {\n if (typeof e === 'function') {\n return e();\n }\n return e;\n}\nexports.unfold = unfold;\n/**\n * Map values through unfold and return first non-nil value.\n * @param {Array<T>} collection;\n *\n * @return {T}\n */\nexports.firstNonNil = lodash_1.default.flow([\n lodash_1.default.partialRight(lodash_1.default.map, unfold),\n lodash_1.default.partialRight(lodash_1.default.find, v => !lodash_1.default.isUndefined(v))\n]);\n/*\n * Create enclosed state.\n * Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @return {Functions[]} -- [get, toggle];\n */\nfunction withSwitch(a, b) {\n let state = a;\n let next = b;\n function get() {\n return state;\n }\n function toggle() {\n const prev = state;\n state = next;\n next = prev;\n }\n return [get, toggle];\n}\nexports.withSwitch = withSwitch;\nfunction observeOverload(callback, options = {}) {\n const { limit = 50, delay = 500 } = options;\n let callCount = 0;\n let timeoutID = 0;\n const reset = () => callCount = 0;\n return () => {\n if (timeoutID !== 0) {\n clearTimeout(timeoutID);\n timeoutID = 0;\n }\n timeoutID = setTimeout(reset, delay);\n callCount += 1;\n if (callCount >= limit) {\n clearTimeout(timeoutID);\n reset();\n return callback();\n }\n };\n}\nexports.observeOverload = observeOverload;\nfunction getContextComponents(context, excludeNested, excludedTypes = []) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component, path) => {\n const addToContextComponents = excludeNested ? !component.tree : true;\n if (component.key !== context.data.key && addToContextComponents && !lodash_1.default.includes(excludedTypes, component.type)) {\n values.push({\n label: `${component.label || component.key} (${path})`,\n value: path,\n });\n }\n });\n return values;\n}\nexports.getContextComponents = getContextComponents;\nfunction getContextButtons(context) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component) => {\n if (component.type === 'button') {\n values.push({\n label: `${component.key} (${component.label})`,\n value: component.key,\n });\n }\n });\n return values;\n}\nexports.getContextButtons = getContextButtons;\n// Tags that could be in text, that should be ommited or handled in a special way\nconst inTextTags = ['#text', 'A', 'B', 'EM', 'I', 'SMALL', 'STRONG', 'SUB', 'SUP', 'INS', 'DEL', 'MARK', 'CODE'];\n/**\n * Helper function for 'translateHTMLTemplate'. Translates text value of the passed html element.\n *\n * @param {HTMLElement} elem\n * @param {Function} translate\n *\n * @returns {String}\n * Translated element template.\n */\nfunction translateElemValue(elem, translate) {\n if (!elem.innerText) {\n return elem.innerHTML;\n }\n const elemValue = elem.innerText.replace(Evaluator_1.default.templateSettings.interpolate, '').replace(/\\s\\s+/g, ' ').trim();\n const translatedValue = translate(elemValue);\n if (elemValue !== translatedValue) {\n const links = elem.innerHTML.match(/<a[^>]*>(.*?)<\\/a>/g);\n if (links && links.length) {\n if (links.length === 1 && links[0].length === elem.innerHTML.length) {\n return elem.innerHTML.replace(elemValue, translatedValue);\n }\n const translatedLinks = links.map(link => {\n const linkElem = document.createElement('a');\n linkElem.innerHTML = link;\n return translateElemValue(linkElem, translate);\n });\n return `${translatedValue} (${translatedLinks.join(', ')})`;\n }\n else {\n return elem.innerText.replace(elemValue, translatedValue);\n }\n }\n else {\n return elem.innerHTML;\n }\n}\n/**\n * Helper function for 'translateHTMLTemplate'. Goes deep through html tag children and calls function to translate their text values.\n *\n * @param {HTMLElement} tag\n * @param {Function} translate\n *\n * @returns {void}\n */\nfunction translateDeepTag(tag, translate) {\n const children = tag.children.length && [...tag.children];\n const shouldTranslateEntireContent = children && children.every(child => child.children.length === 0\n && inTextTags.some(tag => child.nodeName === tag));\n if (!children || shouldTranslateEntireContent) {\n tag.innerHTML = translateElemValue(tag, translate);\n }\n else {\n children.forEach(child => translateDeepTag(child, translate));\n }\n}\n/**\n * Translates text values in html template.\n *\n * @param {String} template\n * @param {Function} translate\n *\n * @returns {String}\n * Html template with translated values.\n */\nfunction translateHTMLTemplate(template, translate) {\n const isHTML = /<[^>]*>/.test(template);\n if (!isHTML) {\n return translate(template);\n }\n const tempElem = document.createElement('div');\n tempElem.innerHTML = template;\n if (tempElem.innerText && tempElem.children.length) {\n translateDeepTag(tempElem, translate);\n return tempElem.innerHTML;\n }\n return template;\n}\nexports.translateHTMLTemplate = translateHTMLTemplate;\n/**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\nfunction sanitize(string, options) {\n if (typeof dompurify_1.default.sanitize !== 'function') {\n return string;\n }\n // Dompurify configuration\n const sanitizeOptions = {\n ADD_ATTR: ['ref', 'target'],\n USE_PROFILES: { html: true }\n };\n // Add attrs\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach((attr) => {\n sanitizeOptions.ADD_ATTR.push(attr);\n });\n }\n // Add tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addTags) && options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n }\n // Allow tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedTags) && options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n }\n // Allow attributes\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedAttrs) && options.sanitizeConfig.allowedAttrs.length > 0) {\n sanitizeOptions.ALLOWED_ATTR = options.sanitizeConfig.allowedAttrs;\n }\n // Allowd URI Regex\n if (options.sanitizeConfig && options.sanitizeConfig.allowedUriRegex) {\n sanitizeOptions.ALLOWED_URI_REGEXP = options.sanitizeConfig.allowedUriRegex;\n }\n // Allow to extend the existing array of elements that are safe for URI-like values\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addUriSafeAttr) && options.sanitizeConfig.addUriSafeAttr.length > 0) {\n sanitizeOptions.ADD_URI_SAFE_ATTR = options.sanitizeConfig.addUriSafeAttr;\n }\n return dompurify_1.default.sanitize(string, sanitizeOptions);\n}\nexports.sanitize = sanitize;\n/**\n * Fast cloneDeep for JSON objects only.\n */\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\n}\nexports.fastCloneDeep = fastCloneDeep;\nfunction isInputComponent(componentJson) {\n if (componentJson.input === false || componentJson.input === true) {\n return componentJson.input;\n }\n switch (componentJson.type) {\n case 'htmlelement':\n case 'content':\n case 'columns':\n case 'fieldset':\n case 'panel':\n case 'table':\n case 'tabs':\n case 'well':\n case 'button':\n return false;\n default:\n return true;\n }\n}\nexports.isInputComponent = isInputComponent;\nfunction getArrayFromComponentPath(pathStr) {\n if (!pathStr || !lodash_1.default.isString(pathStr)) {\n if (!lodash_1.default.isArray(pathStr)) {\n return [pathStr];\n }\n return pathStr;\n }\n return pathStr.replace(/[[\\]]/g, '.')\n .replace(/\\.\\./g, '.')\n .replace(/(^\\.)|(\\.$)/g, '')\n .split('.')\n .map(part => lodash_1.default.defaultTo(lodash_1.default.toNumber(part), part));\n}\nexports.getArrayFromComponentPath = getArrayFromComponentPath;\nfunction isChildOf(child, parent) {\n while (child && child.parent) {\n if (child.parent === parent) {\n return true;\n }\n child = child.parent;\n }\n return false;\n}\nexports.isChildOf = isChildOf;\nfunction getStringFromComponentPath(path) {\n if (!lodash_1.default.isArray(path)) {\n return path;\n }\n let strPath = '';\n path.forEach((part, i) => {\n if (lodash_1.default.isNumber(part)) {\n strPath += `[${part}]`;\n }\n else {\n strPath += i === 0 ? part : `.${part}`;\n }\n });\n return strPath;\n}\nexports.getStringFromComponentPath = getStringFromComponentPath;\nfunction round(number, precision) {\n if (lodash_1.default.isNumber(number)) {\n return number.toFixed(precision);\n }\n return number;\n}\nexports.round = round;\n/**\n * Check for Internet Explorer browser version\n *\n * @return {(number|null)}\n */\nfunction getIEBrowserVersion() {\n const { ie, version } = getBrowserInfo();\n return ie ? version : null;\n}\nexports.getIEBrowserVersion = getIEBrowserVersion;\n/**\n * Get browser name and version (modified from 'jquery-browser-plugin')\n *\n * @return {Object} -- {{browser name, version, isWebkit?}}\n * Possible browser names: chrome, safari, ie, edge, opera, mozilla, yabrowser\n */\nfunction getBrowserInfo() {\n const browser = {};\n if (typeof window === 'undefined') {\n return browser;\n }\n const ua = window.navigator.userAgent.toLowerCase();\n const match = /(edge|edg)\\/([\\w.]+)/.exec(ua) ||\n /(opr)[/]([\\w.]+)/.exec(ua) ||\n /(yabrowser)[ /]([\\w.]+)/.exec(ua) ||\n /(chrome)[ /]([\\w.]+)/.exec(ua) ||\n /(iemobile)[/]([\\w.]+)/.exec(ua) ||\n /(version)(applewebkit)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+).*(version)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+)/.exec(ua) ||\n /(opera)(?:.*version|)[ /]([\\w.]+)/.exec(ua) ||\n /(msie) ([\\w.]+)/.exec(ua) ||\n ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) ||\n ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) ||\n [];\n const matched = {\n browser: match[5] || match[3] || match[1] || '',\n version: match[4] || match[2] || '0'\n };\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = parseInt(matched.version, 10);\n }\n // Chrome, Opera 15+, Safari and Yandex.Browser are webkit based browsers\n if (browser.chrome || browser.opr || browser.safari || browser.edg || browser.yabrowser) {\n browser.isWebkit = true;\n }\n // IE11 has a new token so we will assign it ie to avoid breaking changes\n if (browser.rv || browser.iemobile) {\n browser.ie = true;\n }\n // Edge has a new token since it became webkit based\n if (browser.edg) {\n browser.edge = true;\n }\n // Opera 15+ are identified as opr\n if (browser.opr) {\n browser.opera = true;\n }\n return browser;\n}\nexports.getBrowserInfo = getBrowserInfo;\nfunction getComponentPathWithoutIndicies(path = '') {\n return path.replace(/\\[\\d+\\]/, '');\n}\nexports.getComponentPathWithoutIndicies = getComponentPathWithoutIndicies;\n/**\n * Returns a path to the component which based on its schema\n * @param {*} component is a component's schema containing link to its parent's schema in the 'parent' property\n */\nfunction getComponentPath(component, path = '') {\n var _a;\n if (!component || !component.key || ((_a = component === null || component === void 0 ? void 0 : component._form) === null || _a === void 0 ? void 0 : _a.display) === 'wizard') { // unlike the Webform, the Wizard has the key and it is a duplicate of the panel key\n return path;\n }\n path = component.isInputComponent || component.input === true ? `${component.key}${path ? '.' : ''}${path}` : path;\n return getComponentPath(component.parent, path);\n}\nexports.getComponentPath = getComponentPath;\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {*} componentInstance\n * @return {(Component|undefined)}\n */\nfunction getDataParentComponent(componentInstance) {\n if (!componentInstance) {\n return;\n }\n const { parent } = componentInstance;\n if (parent && (parent.isInputComponent || parent.input)) {\n return parent;\n }\n else {\n return getDataParentComponent(parent);\n }\n}\nexports.getDataParentComponent = getDataParentComponent;\n/**\n * Returns whether the value is a promise\n * @param value\n * @return {boolean}\n */\nfunction isPromise(value) {\n return value\n && value.then\n && typeof value.then === 'function'\n && Object.prototype.toString.call(value) === '[object Promise]';\n}\nexports.isPromise = isPromise;\n/**\n * Determines if the component has a scoping parent in tree (a component which scopes its children and manages its\n * changes by itself, e.g. EditGrid)\n * @param componentInstance\n * @param firstPass\n * @returns {boolean|boolean|*}\n */\nfunction isInsideScopingComponent(componentInstance, firstPass = true) {\n if (!firstPass && (componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.hasScopedChildren)) {\n return true;\n }\n const dataParent = getDataParentComponent(componentInstance);\n if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.hasScopedChildren) {\n return true;\n }\n else if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.parent) {\n return isInsideScopingComponent(dataParent.parent, false);\n }\n return false;\n}\nexports.isInsideScopingComponent = isInsideScopingComponent;\nfunction getFocusableElements(element) {\n const focusableSelector = `button:not([disabled]), input:not([disabled]), select:not([disabled]),\n textarea:not([disabled]), button:not([disabled]), [href]`;\n return element.querySelectorAll(focusableSelector);\n}\nexports.getFocusableElements = getFocusableElements;\nexports.componentValueTypes = {\n number: 'number',\n string: 'string',\n boolean: 'boolean',\n array: 'array',\n object: 'object',\n date: 'date',\n any: 'any',\n};\nfunction getComponentSavedTypes(fullSchema) {\n const schema = fullSchema || {};\n if (schema.persistent !== true) {\n return [];\n }\n if (schema.multiple) {\n return [exports.componentValueTypes.array];\n }\n return null;\n}\nexports.getComponentSavedTypes = getComponentSavedTypes;\n/**\n * Interpolates @formio/core errors so that they are compatible with the renderer\n * @param {FieldError[]} errors\n * @param firstPass\n * @returns {[]}\n */\nconst interpolateErrors = (component, errors, interpolateFn) => {\n return errors.map((error) => {\n error.component = component;\n const { errorKeyOrMessage, context } = error;\n const toInterpolate = component.errors && component.errors[errorKeyOrMessage] ? component.errors[errorKeyOrMessage] : errorKeyOrMessage;\n return Object.assign(Object.assign({}, error), { message: unescapeHTML(interpolateFn(toInterpolate, context)), context: Object.assign({}, context) });\n });\n};\nexports.interpolateErrors = interpolateErrors;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/utils.js?");
2135
+ eval("\n/* global jQuery */\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.observeOverload = exports.withSwitch = exports.firstNonNil = exports.unfold = exports.bootstrapVersion = exports.uniqueKey = exports.iterateKey = exports.delay = exports.fieldData = exports.getCurrencyAffixes = exports.getNumberDecimalLimit = exports.getNumberSeparators = exports.matchInputMask = exports.unmaskValue = exports.getInputMask = exports.convertFormatToMask = exports.convertFormatToMoment = exports.convertFormatToFlatpickr = exports.getLocaleDateFormatInfo = exports.formatOffset = exports.formatDate = exports.momentDate = exports.loadZones = exports.shouldLoadZones = exports.zonesLoaded = exports.offsetDate = exports.currentTimezone = exports.isValidDate = exports.getDateSetting = exports.guid = exports.uniqueName = exports.convertStringToHTMLElement = exports.unescapeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = exports.moment = exports.ConditionOperators = exports.jsonLogic = void 0;\nexports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports._ = exports.getFocusableElements = exports.isInsideScopingComponent = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.interpolate = exports.Evaluator = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = exports.getContextComponents = void 0;\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"./node_modules/lodash/lodash.js\"));\nexports._ = lodash_1.default;\nconst fetch_ponyfill_1 = __importDefault(__webpack_require__(/*! fetch-ponyfill */ \"./node_modules/fetch-ponyfill/build/fetch-browser.js\"));\nconst json_logic_js_1 = __importDefault(__webpack_require__(/*! json-logic-js */ \"./node_modules/json-logic-js/logic.js\"));\nexports.jsonLogic = json_logic_js_1.default;\nconst moment_timezone_1 = __importDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nconst jstimezonedetect_1 = __importDefault(__webpack_require__(/*! jstimezonedetect */ \"./node_modules/jstimezonedetect/dist/jstz.min.js\"));\nconst operators_1 = __webpack_require__(/*! ./jsonlogic/operators */ \"./lib/cjs/utils/jsonlogic/operators.js\");\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"./node_modules/dompurify/dist/purify.js\"));\nconst formUtils_1 = __webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst Evaluator_1 = __importDefault(__webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\"));\nexports.Evaluator = Evaluator_1.default;\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nexports.ConditionOperators = conditionOperators_1.default;\nconst interpolate = Evaluator_1.default.interpolate;\nexports.interpolate = interpolate;\nconst { fetch } = (0, fetch_ponyfill_1.default)({\n Promise: Promise\n});\n__exportStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"), exports);\n// Configure JsonLogic\noperators_1.lodashOperators.forEach((name) => json_logic_js_1.default.add_operation(`_${name}`, lodash_1.default[name]));\n// Retrieve Any Date\njson_logic_js_1.default.add_operation('getDate', (date) => {\n return (0, moment_timezone_1.default)(date).toISOString();\n});\n// Set Relative Minimum Date\njson_logic_js_1.default.add_operation('relativeMinDate', (relativeMinDate) => {\n return (0, moment_timezone_1.default)().subtract(relativeMinDate, 'days').toISOString();\n});\n// Set Relative Maximum Date\njson_logic_js_1.default.add_operation('relativeMaxDate', (relativeMaxDate) => {\n return (0, moment_timezone_1.default)().add(relativeMaxDate, 'days').toISOString();\n});\nexports.moment = __importStar(__webpack_require__(/*! moment-timezone/moment-timezone */ \"./node_modules/moment-timezone/moment-timezone.js\"));\nfunction setPathToComponentAndPerentSchema(component) {\n component.path = getComponentPath(component);\n const dataParent = getDataParentComponent(component);\n if (dataParent && typeof dataParent === 'object') {\n dataParent.path = getComponentPath(dataParent);\n }\n}\n/**\n * Evaluate a method.\n *\n * @param func\n * @param args\n * @return {*}\n */\nfunction evaluate(func, args, ret, tokenize) {\n let returnVal = null;\n const component = args.component ? args.component : { key: 'unknown' };\n if (!args.form && args.instance) {\n args.form = lodash_1.default.get(args.instance, 'root._form', {});\n }\n const componentKey = component.key;\n if (typeof func === 'string') {\n if (ret) {\n func += `;return ${ret}`;\n }\n if (tokenize) {\n // Replace all {{ }} references with actual data.\n func = func.replace(/({{\\s+(.*)\\s+}})/, (match, $1, $2) => {\n if ($2.indexOf('data.') === 0) {\n return lodash_1.default.get(args.data, $2.replace('data.', ''));\n }\n else if ($2.indexOf('row.') === 0) {\n return lodash_1.default.get(args.row, $2.replace('row.', ''));\n }\n // Support legacy...\n return lodash_1.default.get(args.data, $2);\n });\n }\n try {\n func = Evaluator_1.default.evaluator(func, args);\n args = lodash_1.default.values(args);\n }\n catch (err) {\n console.warn(`An error occured within the custom function for ${componentKey}`, err);\n returnVal = null;\n func = false;\n }\n }\n if (typeof func === 'function') {\n try {\n returnVal = Evaluator_1.default.evaluate(func, args);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (typeof func === 'object') {\n try {\n returnVal = json_logic_js_1.default.apply(func, args);\n }\n catch (err) {\n returnVal = null;\n console.warn(`An error occured within custom function for ${componentKey}`, err);\n }\n }\n else if (func) {\n console.warn(`Unknown function type for ${componentKey}`);\n }\n return returnVal;\n}\nexports.evaluate = evaluate;\nfunction getRandomComponentId() {\n return `e${Math.random().toString(36).substring(7)}`;\n}\nexports.getRandomComponentId = getRandomComponentId;\n/**\n * Get a property value of an element.\n *\n * @param style\n * @param prop\n * @return {number}\n */\nfunction getPropertyValue(style, prop) {\n let value = style.getPropertyValue(prop);\n value = value ? value.replace(/[^0-9.]/g, '') : '0';\n return parseFloat(value);\n}\nexports.getPropertyValue = getPropertyValue;\n/**\n * Get an elements bounding rectagle.\n *\n * @param element\n * @return {{x: string, y: string, width: string, height: string}}\n */\nfunction getElementRect(element) {\n const style = window.getComputedStyle(element, null);\n return {\n x: getPropertyValue(style, 'left'),\n y: getPropertyValue(style, 'top'),\n width: getPropertyValue(style, 'width'),\n height: getPropertyValue(style, 'height')\n };\n}\nexports.getElementRect = getElementRect;\n/**\n * Determines the boolean value of a setting.\n *\n * @param value\n * @return {boolean}\n */\nfunction boolValue(value) {\n if (lodash_1.default.isBoolean(value)) {\n return value;\n }\n else if (lodash_1.default.isString(value)) {\n return (value.toLowerCase() === 'true');\n }\n else {\n return !!value;\n }\n}\nexports.boolValue = boolValue;\n/**\n * Check to see if an ID is a mongoID.\n * @param text\n * @return {Array|{index: number, input: string}|Boolean|*}\n */\nfunction isMongoId(text) {\n return text.toString().match(/^[0-9a-fA-F]{24}$/);\n}\nexports.isMongoId = isMongoId;\n/**\n * Checks the calculated value for a provided component and data.\n *\n * @param {Object} component\n * The component to check for the calculated value.\n * @param {Object} submission\n * A submission object.\n * @param data\n * The full submission data.\n */\nfunction checkCalculated(component, submission, rowData) {\n // Process calculated value stuff if present.\n if (component.calculateValue) {\n lodash_1.default.set(rowData, component.key, evaluate(component.calculateValue, {\n value: undefined,\n data: submission ? submission.data : rowData,\n row: rowData,\n util: this,\n component\n }, 'value'));\n }\n}\nexports.checkCalculated = checkCalculated;\n/**\n * Check if a simple conditional evaluates to true.\n *\n * @param condition\n * @param condition\n * @param row\n * @param data\n * @param instance\n * @returns {boolean}\n */\nfunction checkSimpleConditional(component, condition, row, data, instance) {\n if (condition.when) {\n const value = getComponentActualValue(condition.when, data, row);\n const eq = String(condition.eq);\n const show = String(condition.show);\n // Special check for selectboxes component.\n if (lodash_1.default.isObject(value) && lodash_1.default.has(value, condition.eq)) {\n return String(value[condition.eq]) === show;\n }\n // FOR-179 - Check for multiple values.\n if (Array.isArray(value) && value.map(String).includes(eq)) {\n return show === 'true';\n }\n return (String(value) === eq) === (show === 'true');\n }\n else {\n const { conditions = [], conjunction = 'all', show = true } = condition;\n if (!conditions.length) {\n return true;\n }\n const conditionsResult = lodash_1.default.map(conditions, (cond) => {\n const { value: comparedValue, operator, component: conditionComponentPath } = cond;\n if (!conditionComponentPath) {\n return true;\n }\n const value = getComponentActualValue(conditionComponentPath, data, row);\n const ConditionOperator = conditionOperators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({ value, comparedValue, instance, component, conditionComponentPath })\n : true;\n });\n let result = false;\n switch (conjunction) {\n case 'any':\n result = lodash_1.default.some(conditionsResult, res => !!res);\n break;\n default:\n result = lodash_1.default.every(conditionsResult, res => !!res);\n }\n return show ? result : !result;\n }\n}\nexports.checkSimpleConditional = checkSimpleConditional;\nfunction getComponentActualValue(compPath, data, row) {\n let value = null;\n if (row) {\n value = (0, formUtils_1.getValue)({ data: row }, compPath);\n }\n if (data && lodash_1.default.isNil(value)) {\n value = (0, formUtils_1.getValue)({ data }, compPath);\n }\n // FOR-400 - Fix issue where falsey values were being evaluated as show=true\n if (lodash_1.default.isNil(value) || (lodash_1.default.isObject(value) && lodash_1.default.isEmpty(value))) {\n value = '';\n }\n return value;\n}\nexports.getComponentActualValue = getComponentActualValue;\n/**\n * Check custom javascript conditional.\n *\n * @param component\n * @param custom\n * @param row\n * @param data\n * @returns {*}\n */\nfunction checkCustomConditional(component, custom, row, data, form, variable, onError, instance) {\n if (typeof custom === 'string') {\n custom = `var ${variable} = true; ${custom}; return ${variable};`;\n }\n const value = (instance && instance.evaluate) ?\n instance.evaluate(custom, { row, data, form }) :\n evaluate(custom, { row, data, form });\n if (value === null) {\n return onError;\n }\n return value;\n}\nexports.checkCustomConditional = checkCustomConditional;\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return json_logic_js_1.default.apply(json, {\n data,\n row,\n form,\n _: lodash_1.default,\n });\n }\n catch (err) {\n console.warn(`An error occurred in jsonLogic advanced condition for ${component.key}`, err);\n return onError;\n }\n}\nexports.checkJsonConditional = checkJsonConditional;\nfunction getRow(component, row, instance, conditional) {\n var _a;\n const condition = conditional || component.conditional;\n // If no component's instance passed (happens only in 6.x server), calculate its path based on the schema\n if (!instance) {\n instance = lodash_1.default.cloneDeep(component);\n setPathToComponentAndPerentSchema(instance);\n }\n const dataParent = getDataParentComponent(instance);\n const parentPath = dataParent ? getComponentPath(dataParent) : null;\n const isTriggerCondtionComponentPath = condition.when || !condition.conditions\n ? (_a = condition.when) === null || _a === void 0 ? void 0 : _a.startsWith(parentPath)\n : lodash_1.default.some(condition.conditions, cond => cond.component.startsWith(parentPath));\n if (dataParent && isTriggerCondtionComponentPath) {\n const newRow = {};\n lodash_1.default.set(newRow, parentPath, row);\n row = newRow;\n }\n return row;\n}\n/**\n * Checks the conditions for a provided component and data.\n *\n * @param component\n * The component to check for the condition.\n * @param row\n * The data within a row\n * @param data\n * The full submission data.\n *\n * @returns {boolean}\n */\nfunction checkCondition(component, row, data, form, instance) {\n const { customConditional, conditional } = component;\n if (customConditional) {\n return checkCustomConditional(component, customConditional, row, data, form, 'show', true, instance);\n }\n else if (conditional && (conditional.when || lodash_1.default.some(conditional.conditions || [], condition => condition.component && condition.operator))) {\n row = getRow(component, row, instance);\n return checkSimpleConditional(component, conditional, row, data, instance);\n }\n else if (conditional && conditional.json) {\n return checkJsonConditional(component, conditional.json, row, data, form, true);\n }\n // Default to show.\n return true;\n}\nexports.checkCondition = checkCondition;\n/**\n * Test a trigger on a component.\n *\n * @param component\n * @param action\n * @param data\n * @param row\n * @returns {mixed}\n */\nfunction checkTrigger(component, trigger, row, data, form, instance) {\n // If trigger is empty, don't fire it\n if (!trigger || !trigger[trigger.type]) {\n return false;\n }\n switch (trigger.type) {\n case 'simple':\n row = getRow(component, row, instance, trigger.simple);\n return checkSimpleConditional(component, trigger.simple, row, data, instance);\n case 'javascript':\n return checkCustomConditional(component, trigger.javascript, row, data, form, 'result', false, instance);\n case 'json':\n return checkJsonConditional(component, trigger.json, row, data, form, false);\n }\n // If none of the types matched, don't fire the trigger.\n return false;\n}\nexports.checkTrigger = checkTrigger;\nfunction setActionProperty(component, action, result, row, data, instance) {\n const property = action.property.value;\n switch (action.property.type) {\n case 'boolean': {\n const currentValue = lodash_1.default.get(component, property, false).toString();\n const newValue = action.state.toString();\n if (currentValue !== newValue) {\n lodash_1.default.set(component, property, newValue === 'true');\n }\n break;\n }\n case 'string': {\n const evalData = {\n data,\n row,\n component,\n result,\n };\n const textValue = action.property.component ? action[action.property.component] : action.text;\n const currentValue = lodash_1.default.get(component, property, '');\n const newValue = (instance && instance.interpolate)\n ? instance.interpolate(textValue, evalData)\n : Evaluator_1.default.interpolate(textValue, evalData);\n if (newValue !== currentValue) {\n lodash_1.default.set(component, property, newValue);\n }\n break;\n }\n }\n return component;\n}\nexports.setActionProperty = setActionProperty;\n/**\n * Unescape HTML characters like &lt, &gt, &amp and etc.\n * @param str\n * @returns {string}\n */\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.documentElement.textContent;\n}\nexports.unescapeHTML = unescapeHTML;\n/**\n * Make HTML element from string\n * @param str\n * @param selector\n * @returns {HTMLElement}\n */\nfunction convertStringToHTMLElement(str, selector) {\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return doc.body.querySelector(selector);\n}\nexports.convertStringToHTMLElement = convertStringToHTMLElement;\n/**\n * Make a filename guaranteed to be unique.\n * @param name\n * @param template\n * @param evalContext\n * @returns {string}\n */\nfunction uniqueName(name, template, evalContext) {\n template = template || '{{fileName}}-{{guid}}';\n //include guid in template anyway, to prevent overwriting issue if filename matches existing file\n if (!template.includes('{{guid}}')) {\n template = `${template}-{{guid}}`;\n }\n const parts = name.split('.');\n let fileName = parts.slice(0, parts.length - 1).join('.');\n const extension = parts.length > 1\n ? `.${lodash_1.default.last(parts)}`\n : '';\n //allow only 100 characters from original name to avoid issues with filename length restrictions\n fileName = fileName.substr(0, 100);\n evalContext = Object.assign(evalContext || {}, {\n fileName,\n guid: guid()\n });\n //only letters, numbers, dots, dashes, underscores and spaces are allowed. Anything else will be replaced with dash\n const uniqueName = `${Evaluator_1.default.interpolate(template, evalContext)}${extension}`.replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\nexports.uniqueName = uniqueName;\nfunction guid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => {\n const r = Math.random() * 16 | 0;\n const v = c === 'x'\n ? r\n : (r & 0x3 | 0x8);\n return v.toString(16);\n });\n}\nexports.guid = guid;\n/**\n * Return a translated date setting.\n *\n * @param date\n * @return {(null|Date)}\n */\nfunction getDateSetting(date) {\n if (lodash_1.default.isNil(date) || lodash_1.default.isNaN(date) || date === '') {\n return null;\n }\n if (date instanceof Date) {\n return date;\n }\n else if (typeof date.toDate === 'function') {\n return date.isValid() ? date.toDate() : null;\n }\n let dateSetting = ((typeof date !== 'string') || (date.indexOf('moment(') === -1)) ? (0, moment_timezone_1.default)(date) : null;\n if (dateSetting && dateSetting.isValid()) {\n return dateSetting.toDate();\n }\n dateSetting = null;\n try {\n const value = Evaluator_1.default.evaluator(`return ${date};`, 'moment')(moment_timezone_1.default);\n if (typeof value === 'string') {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n else if (typeof value.toDate === 'function') {\n dateSetting = (0, moment_timezone_1.default)(value.toDate().toUTCString());\n }\n else if (value instanceof Date) {\n dateSetting = (0, moment_timezone_1.default)(value);\n }\n }\n catch (e) {\n return null;\n }\n if (!dateSetting) {\n return null;\n }\n // Ensure this is a date.\n if (!dateSetting.isValid()) {\n return null;\n }\n return dateSetting.toDate();\n}\nexports.getDateSetting = getDateSetting;\nfunction isValidDate(date) {\n return lodash_1.default.isDate(date) && !lodash_1.default.isNaN(date.getDate());\n}\nexports.isValidDate = isValidDate;\n/**\n * Get the current timezone string.\n *\n * @return {string}\n */\nfunction currentTimezone() {\n if (moment_timezone_1.default.currentTimezone) {\n return moment_timezone_1.default.currentTimezone;\n }\n moment_timezone_1.default.currentTimezone = jstimezonedetect_1.default.determine().name();\n return moment_timezone_1.default.currentTimezone;\n}\nexports.currentTimezone = currentTimezone;\n/**\n * Get an offset date provided a date object and timezone object.\n *\n * @param date\n * @param timezone\n * @return {Date}\n */\nfunction offsetDate(date, timezone) {\n if (timezone === 'UTC') {\n return {\n date: new Date(date.getTime() + (date.getTimezoneOffset() * 60000)),\n abbr: 'UTC'\n };\n }\n const dateMoment = (0, moment_timezone_1.default)(date).tz(timezone);\n return {\n date: new Date(date.getTime() + ((dateMoment.utcOffset() + date.getTimezoneOffset()) * 60000)),\n abbr: dateMoment.format('z')\n };\n}\nexports.offsetDate = offsetDate;\n/**\n * Returns if the zones are loaded.\n *\n * @return {boolean}\n */\nfunction zonesLoaded() {\n return moment_timezone_1.default.zonesLoaded;\n}\nexports.zonesLoaded = zonesLoaded;\n/**\n * Returns if we should load the zones.\n *\n * @param timezone\n * @return {boolean}\n */\nfunction shouldLoadZones(timezone) {\n if (timezone === currentTimezone() || timezone === 'UTC') {\n return false;\n }\n return true;\n}\nexports.shouldLoadZones = shouldLoadZones;\n/**\n * Externally load the timezone data.\n *\n * @return {Promise<any> | *}\n */\nfunction loadZones(url, timezone) {\n if (timezone && !shouldLoadZones(timezone)) {\n // Return non-resolving promise.\n return new Promise(lodash_1.default.noop);\n }\n if (moment_timezone_1.default.zonesPromise) {\n return moment_timezone_1.default.zonesPromise;\n }\n return moment_timezone_1.default.zonesPromise = fetch(url)\n .then(resp => resp.json().then(zones => {\n moment_timezone_1.default.tz.load(zones);\n moment_timezone_1.default.zonesLoaded = true;\n // Trigger a global event that the timezones have finished loading.\n if (document && document.createEvent && document.body && document.body.dispatchEvent) {\n var event = document.createEvent('Event');\n event.initEvent('zonesLoaded', true, true);\n document.body.dispatchEvent(event);\n }\n }));\n}\nexports.loadZones = loadZones;\n/**\n * Get the moment date object for translating dates with timezones.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {*}\n */\nfunction momentDate(value, format, timezone) {\n const momentDate = (0, moment_timezone_1.default)(value);\n if (!timezone) {\n return momentDate;\n }\n if (timezone === 'UTC') {\n timezone = 'Etc/UTC';\n }\n if ((timezone !== currentTimezone() || (format && format.match(/\\s(z$|z\\s)/))) && moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone);\n }\n return momentDate;\n}\nexports.momentDate = momentDate;\n/**\n * Format a date provided a value, format, and timezone object.\n *\n * @param value\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatDate(timezonesUrl, value, format, timezone, flatPickrInputFormat) {\n const momentDate = (0, moment_timezone_1.default)(value, flatPickrInputFormat || undefined);\n if (timezone === currentTimezone()) {\n // See if our format contains a \"z\" timezone character.\n if (format.match(/\\s(z$|z\\s)/)) {\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n return momentDate.tz(timezone).format(convertFormatToMoment(format));\n }\n else {\n return momentDate.format(convertFormatToMoment(format.replace(/\\s(z$|z\\s)/, '')));\n }\n }\n // Return the standard format.\n return momentDate.format(convertFormatToMoment(format));\n }\n if (timezone === 'UTC') {\n const offset = offsetDate(momentDate.toDate(), 'UTC');\n return `${(0, moment_timezone_1.default)(offset.date).format(convertFormatToMoment(format))} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded && timezone) {\n return momentDate.tz(timezone).format(`${convertFormatToMoment(format)} z`);\n }\n else {\n return momentDate.format(convertFormatToMoment(format));\n }\n}\nexports.formatDate = formatDate;\n/**\n * Pass a format function to format within a timezone.\n *\n * @param formatFn\n * @param date\n * @param format\n * @param timezone\n * @return {string}\n */\nfunction formatOffset(timezonesUrl, formatFn, date, format, timezone) {\n if (timezone === currentTimezone()) {\n return formatFn(date, format);\n }\n if (timezone === 'UTC') {\n return `${formatFn(offsetDate(date, 'UTC').date, format)} UTC`;\n }\n // Load the zones since we need timezone information.\n loadZones(timezonesUrl);\n if (moment_timezone_1.default.zonesLoaded) {\n const offset = offsetDate(date, timezone);\n return `${formatFn(offset.date, format)} ${offset.abbr}`;\n }\n else {\n return formatFn(date, format);\n }\n}\nexports.formatOffset = formatOffset;\nfunction getLocaleDateFormatInfo(locale) {\n const formatInfo = {};\n const day = 21;\n const exampleDate = new Date(2017, 11, day);\n const localDateString = exampleDate.toLocaleDateString(locale);\n formatInfo.dayFirst = localDateString.slice(0, 2) === day.toString();\n return formatInfo;\n}\nexports.getLocaleDateFormatInfo = getLocaleDateFormatInfo;\n/**\n * Convert the format from the angular-datepicker module to flatpickr format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToFlatpickr(format) {\n return format\n // Remove the Z timezone offset, not supported by flatpickr.\n .replace(/Z/g, '')\n // Year conversion.\n .replace(/y/g, 'Y')\n .replace('YYYY', 'Y')\n .replace('YY', 'y')\n // Month conversion.\n .replace('MMMM', 'F')\n .replace(/M/g, 'n')\n .replace('nnn', 'M')\n .replace('nn', 'm')\n // Day in month.\n .replace(/d/g, 'j')\n .replace(/jj/g, 'd')\n // Day in week.\n .replace('EEEE', 'l')\n .replace('EEE', 'D')\n // Hours, minutes, seconds\n .replace('HH', 'H')\n .replace('hh', 'G')\n .replace('mm', 'i')\n .replace('ss', 'S')\n .replace(/a/g, 'K');\n}\nexports.convertFormatToFlatpickr = convertFormatToFlatpickr;\n/**\n * Convert the format from the angular-datepicker module to moment format.\n * @param format\n * @return {string}\n */\nfunction convertFormatToMoment(format) {\n return format\n // Year conversion.\n .replace(/y/g, 'Y')\n // Day in month.\n .replace(/d/g, 'D')\n // Day in week.\n .replace(/E/g, 'd')\n // AM/PM marker\n .replace(/a/g, 'A')\n // Unix Timestamp\n .replace(/U/g, 'X');\n}\nexports.convertFormatToMoment = convertFormatToMoment;\nfunction convertFormatToMask(format) {\n return format\n // Long month replacement.\n .replace(/M{4}/g, 'MM')\n // Initial short month conversion.\n .replace(/M{3}/g, '***')\n // Short month conversion if input as text.\n .replace(/e/g, 'Q')\n // Month number conversion.\n .replace(/W/g, '99')\n // Year conversion.\n .replace(/[ydhmswHMG]/g, '9')\n // AM/PM conversion.\n .replace(/a/g, 'AA');\n}\nexports.convertFormatToMask = convertFormatToMask;\n/**\n * Returns an input mask that is compatible with the input mask library.\n * @param {string} mask - The Form.io input mask.\n * @param {string} placeholderChar - Char which is used as a placeholder.\n * @returns {Array} - The input mask for the mask library.\n */\nfunction getInputMask(mask, placeholderChar) {\n if (mask instanceof Array) {\n return mask;\n }\n const maskArray = [];\n maskArray.numeric = true;\n for (let i = 0; i < mask.length; i++) {\n switch (mask[i]) {\n case '9':\n maskArray.push(/\\d/);\n break;\n case 'A':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z]/);\n break;\n case 'a':\n maskArray.numeric = false;\n maskArray.push(/[a-z]/);\n break;\n case '*':\n maskArray.numeric = false;\n maskArray.push(/[a-zA-Z0-9]/);\n break;\n // If char which is used inside mask placeholder was used in the mask, replace it with space to prevent errors\n case placeholderChar:\n maskArray.numeric = false;\n maskArray.push(' ');\n break;\n default:\n maskArray.numeric = false;\n maskArray.push(mask[i]);\n break;\n }\n }\n return maskArray;\n}\nexports.getInputMask = getInputMask;\nfunction unmaskValue(value, mask, placeholderChar) {\n if (!mask || !value || value.length > mask.length) {\n return value;\n }\n let unmaskedValue = value.split('');\n for (let i = 0; i < mask.length; i++) {\n const char = value[i] || '';\n const charPart = mask[i];\n if (!lodash_1.default.isRegExp(charPart) && char === charPart) {\n unmaskedValue[i] = '';\n }\n }\n unmaskedValue = unmaskedValue.join('').replace(placeholderChar, '');\n return unmaskedValue;\n}\nexports.unmaskValue = unmaskValue;\nfunction matchInputMask(value, inputMask) {\n if (!inputMask) {\n return true;\n }\n // If value is longer than mask, it isn't valid.\n if (value.length > inputMask.length) {\n return false;\n }\n for (let i = 0; i < inputMask.length; i++) {\n const char = value[i] || '';\n const charPart = inputMask[i];\n if (!(lodash_1.default.isRegExp(charPart) && charPart.test(char) || charPart === char)) {\n return false;\n }\n }\n return true;\n}\nexports.matchInputMask = matchInputMask;\nfunction getNumberSeparators(lang = 'en') {\n const formattedNumberString = (12345.6789).toLocaleString(lang);\n const delimeters = formattedNumberString.match(/..(.)...(.)../);\n if (!delimeters) {\n return {\n delimiter: ',',\n decimalSeparator: '.'\n };\n }\n return {\n delimiter: (delimeters.length > 1) ? delimeters[1] : ',',\n decimalSeparator: (delimeters.length > 2) ? delimeters[2] : '.',\n };\n}\nexports.getNumberSeparators = getNumberSeparators;\nfunction getNumberDecimalLimit(component, defaultLimit) {\n if (lodash_1.default.has(component, 'decimalLimit')) {\n return lodash_1.default.get(component, 'decimalLimit');\n }\n // Determine the decimal limit. Defaults to 20 but can be overridden by validate.step or decimalLimit settings.\n let decimalLimit = defaultLimit || 20;\n const step = lodash_1.default.get(component, 'validate.step', 'any');\n if (step !== 'any') {\n const parts = step.toString().split('.');\n if (parts.length > 1) {\n decimalLimit = parts[1].length;\n }\n }\n return decimalLimit;\n}\nexports.getNumberDecimalLimit = getNumberDecimalLimit;\nfunction getCurrencyAffixes({ currency, decimalLimit, decimalSeparator, lang, }) {\n // Get the prefix and suffix from the localized string.\n let regex = `(.*)?${(100).toLocaleString(lang)}`;\n if (decimalLimit) {\n regex += `${decimalSeparator === '.' ? '\\\\.' : decimalSeparator}${(0).toLocaleString(lang)}{${decimalLimit}}`;\n }\n regex += '(.*)?';\n const parts = (100).toLocaleString(lang, {\n style: 'currency',\n currency: currency ? currency : 'USD',\n useGrouping: true,\n maximumFractionDigits: decimalLimit || 0,\n minimumFractionDigits: decimalLimit || 0\n }).replace('.', decimalSeparator).match(new RegExp(regex));\n return {\n prefix: (parts === null || parts === void 0 ? void 0 : parts[1]) || '',\n suffix: (parts === null || parts === void 0 ? void 0 : parts[2]) || ''\n };\n}\nexports.getCurrencyAffixes = getCurrencyAffixes;\n/**\n * Fetch the field data provided a component.\n *\n * @param data\n * @param component\n * @return {*}\n */\nfunction fieldData(data, component) {\n if (!data) {\n return '';\n }\n if (!component || !component.key) {\n return data;\n }\n if (component.key.includes('.')) {\n let value = data;\n const parts = component.key.split('.');\n let key = '';\n for (let i = 0; i < parts.length; i++) {\n key = parts[i];\n // Handle nested resources\n if (value.hasOwnProperty('_id')) {\n value = value.data;\n }\n // Return if the key is not found on the value.\n if (!value.hasOwnProperty(key)) {\n return;\n }\n // Convert old single field data in submissions to multiple\n if (key === parts[parts.length - 1] && component.multiple && !Array.isArray(value[key])) {\n value[key] = [value[key]];\n }\n // Set the value of this key.\n value = value[key];\n }\n return value;\n }\n else {\n // Convert old single field data in submissions to multiple\n if (component.multiple && !Array.isArray(data[component.key])) {\n data[component.key] = [data[component.key]];\n }\n // Fix for checkbox type radio submission values in tableView\n if (component.type === 'checkbox' && component.inputType === 'radio') {\n return data[component.name] === component.value;\n }\n return data[component.key];\n }\n}\nexports.fieldData = fieldData;\n/**\n * Delays function execution with possibility to execute function synchronously or cancel it.\n *\n * @param fn Function to delay\n * @param delay Delay time\n * @return {*}\n */\nfunction delay(fn, delay = 0, ...args) {\n const timer = setTimeout(fn, delay, ...args);\n function cancel() {\n clearTimeout(timer);\n }\n function earlyCall() {\n cancel();\n return fn(...args);\n }\n earlyCall.timer = timer;\n earlyCall.cancel = cancel;\n return earlyCall;\n}\nexports.delay = delay;\n/**\n * Iterate the given key to make it unique.\n *\n * @param {String} key\n * Modify the component key to be unique.\n *\n * @returns {String}\n * The new component key.\n */\nfunction iterateKey(key) {\n if (!key.match(/(\\d+)$/)) {\n return `${key}1`;\n }\n return key.replace(/(\\d+)$/, function (suffix) {\n return Number(suffix) + 1;\n });\n}\nexports.iterateKey = iterateKey;\n/**\n * Determines a unique key within a map provided the base key.\n *\n * @param map\n * @param base\n * @return {*}\n */\nfunction uniqueKey(map, base) {\n let newKey = base;\n while (map.hasOwnProperty(newKey)) {\n newKey = iterateKey(newKey);\n }\n return newKey;\n}\nexports.uniqueKey = uniqueKey;\n/**\n * Determines the major version number of bootstrap.\n *\n * @return {number}\n */\nfunction bootstrapVersion(options) {\n if (options.bootstrap) {\n return options.bootstrap;\n }\n if ((typeof jQuery === 'function') && (typeof jQuery().collapse === 'function')) {\n return parseInt(jQuery.fn.collapse.Constructor.VERSION.split('.')[0], 10);\n }\n if (window.bootstrap && window.bootstrap.Collapse) {\n return parseInt(window.bootstrap.Collapse.VERSION.split('.')[0], 10);\n }\n return 0;\n}\nexports.bootstrapVersion = bootstrapVersion;\n/**\n * Retrun provided argument.\n * If argument is a function, returns the result of a function call.\n * @param {*} e;\n *\n * @return {*}\n */\nfunction unfold(e) {\n if (typeof e === 'function') {\n return e();\n }\n return e;\n}\nexports.unfold = unfold;\n/**\n * Map values through unfold and return first non-nil value.\n * @param {Array<T>} collection;\n *\n * @return {T}\n */\nexports.firstNonNil = lodash_1.default.flow([\n lodash_1.default.partialRight(lodash_1.default.map, unfold),\n lodash_1.default.partialRight(lodash_1.default.find, v => !lodash_1.default.isUndefined(v))\n]);\n/*\n * Create enclosed state.\n * Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @return {Functions[]} -- [get, toggle];\n */\nfunction withSwitch(a, b) {\n let state = a;\n let next = b;\n function get() {\n return state;\n }\n function toggle() {\n const prev = state;\n state = next;\n next = prev;\n }\n return [get, toggle];\n}\nexports.withSwitch = withSwitch;\nfunction observeOverload(callback, options = {}) {\n const { limit = 50, delay = 500 } = options;\n let callCount = 0;\n let timeoutID = 0;\n const reset = () => callCount = 0;\n return () => {\n if (timeoutID !== 0) {\n clearTimeout(timeoutID);\n timeoutID = 0;\n }\n timeoutID = setTimeout(reset, delay);\n callCount += 1;\n if (callCount >= limit) {\n clearTimeout(timeoutID);\n reset();\n return callback();\n }\n };\n}\nexports.observeOverload = observeOverload;\nfunction getContextComponents(context, excludeNested, excludedTypes = []) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component, path) => {\n const addToContextComponents = excludeNested ? !component.tree : true;\n if (component.key !== context.data.key && addToContextComponents && !lodash_1.default.includes(excludedTypes, component.type)) {\n values.push({\n label: `${component.label || component.key} (${path})`,\n value: path,\n });\n }\n });\n return values;\n}\nexports.getContextComponents = getContextComponents;\nfunction getContextButtons(context) {\n const values = [];\n context.utils.eachComponent(context.instance.options.editForm.components, (component) => {\n if (component.type === 'button') {\n values.push({\n label: `${component.key} (${component.label})`,\n value: component.key,\n });\n }\n });\n return values;\n}\nexports.getContextButtons = getContextButtons;\n// Tags that could be in text, that should be ommited or handled in a special way\nconst inTextTags = ['#text', 'A', 'B', 'EM', 'I', 'SMALL', 'STRONG', 'SUB', 'SUP', 'INS', 'DEL', 'MARK', 'CODE'];\n/**\n * Helper function for 'translateHTMLTemplate'. Translates text value of the passed html element.\n *\n * @param {HTMLElement} elem\n * @param {Function} translate\n *\n * @returns {String}\n * Translated element template.\n */\nfunction translateElemValue(elem, translate) {\n if (!elem.innerText) {\n return elem.innerHTML;\n }\n const elemValue = elem.innerText.replace(Evaluator_1.default.templateSettings.interpolate, '').replace(/\\s\\s+/g, ' ').trim();\n const translatedValue = translate(elemValue);\n if (elemValue !== translatedValue) {\n const links = elem.innerHTML.match(/<a[^>]*>(.*?)<\\/a>/g);\n if (links && links.length) {\n if (links.length === 1 && links[0].length === elem.innerHTML.length) {\n return elem.innerHTML.replace(elemValue, translatedValue);\n }\n const translatedLinks = links.map(link => {\n const linkElem = document.createElement('a');\n linkElem.innerHTML = link;\n return translateElemValue(linkElem, translate);\n });\n return `${translatedValue} (${translatedLinks.join(', ')})`;\n }\n else {\n return elem.innerText.replace(elemValue, translatedValue);\n }\n }\n else {\n return elem.innerHTML;\n }\n}\n/**\n * Helper function for 'translateHTMLTemplate'. Goes deep through html tag children and calls function to translate their text values.\n *\n * @param {HTMLElement} tag\n * @param {Function} translate\n *\n * @returns {void}\n */\nfunction translateDeepTag(tag, translate) {\n const children = tag.children.length && [...tag.children];\n const shouldTranslateEntireContent = children && children.every(child => child.children.length === 0\n && inTextTags.some(tag => child.nodeName === tag));\n if (!children || shouldTranslateEntireContent) {\n tag.innerHTML = translateElemValue(tag, translate);\n }\n else {\n children.forEach(child => translateDeepTag(child, translate));\n }\n}\n/**\n * Translates text values in html template.\n *\n * @param {String} template\n * @param {Function} translate\n *\n * @returns {String}\n * Html template with translated values.\n */\nfunction translateHTMLTemplate(template, translate) {\n const isHTML = /<[^>]*>/.test(template);\n if (!isHTML) {\n return translate(template);\n }\n const tempElem = document.createElement('div');\n tempElem.innerHTML = template;\n if (tempElem.innerText && tempElem.children.length) {\n translateDeepTag(tempElem, translate);\n return tempElem.innerHTML;\n }\n return template;\n}\nexports.translateHTMLTemplate = translateHTMLTemplate;\n/**\n * Sanitize an html string.\n *\n * @param string\n * @returns {*}\n */\nfunction sanitize(string, options) {\n if (typeof dompurify_1.default.sanitize !== 'function') {\n return string;\n }\n // Dompurify configuration\n const sanitizeOptions = {\n ADD_ATTR: ['ref', 'target'],\n USE_PROFILES: { html: true }\n };\n // Use profiles\n if (options.sanitizeConfig && options.sanitizeConfig.useProfiles) {\n Object.keys(options.sanitizeConfig.useProfiles).forEach(key => {\n sanitizeOptions.USE_PROFILES[key] = options.sanitizeConfig.useProfiles[key];\n });\n }\n // Add attrs\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addAttr) && options.sanitizeConfig.addAttr.length > 0) {\n options.sanitizeConfig.addAttr.forEach((attr) => {\n sanitizeOptions.ADD_ATTR.push(attr);\n });\n }\n // Add tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addTags) && options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n }\n // Allow tags\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedTags) && options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n }\n // Allow attributes\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.allowedAttrs) && options.sanitizeConfig.allowedAttrs.length > 0) {\n sanitizeOptions.ALLOWED_ATTR = options.sanitizeConfig.allowedAttrs;\n }\n // Allowd URI Regex\n if (options.sanitizeConfig && options.sanitizeConfig.allowedUriRegex) {\n sanitizeOptions.ALLOWED_URI_REGEXP = options.sanitizeConfig.allowedUriRegex;\n }\n // Allow to extend the existing array of elements that are safe for URI-like values\n if (options.sanitizeConfig && Array.isArray(options.sanitizeConfig.addUriSafeAttr) && options.sanitizeConfig.addUriSafeAttr.length > 0) {\n sanitizeOptions.ADD_URI_SAFE_ATTR = options.sanitizeConfig.addUriSafeAttr;\n }\n return dompurify_1.default.sanitize(string, sanitizeOptions);\n}\nexports.sanitize = sanitize;\n/**\n * Fast cloneDeep for JSON objects only.\n */\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\n}\nexports.fastCloneDeep = fastCloneDeep;\nfunction isInputComponent(componentJson) {\n if (componentJson.input === false || componentJson.input === true) {\n return componentJson.input;\n }\n switch (componentJson.type) {\n case 'htmlelement':\n case 'content':\n case 'columns':\n case 'fieldset':\n case 'panel':\n case 'table':\n case 'tabs':\n case 'well':\n case 'button':\n return false;\n default:\n return true;\n }\n}\nexports.isInputComponent = isInputComponent;\nfunction getArrayFromComponentPath(pathStr) {\n if (!pathStr || !lodash_1.default.isString(pathStr)) {\n if (!lodash_1.default.isArray(pathStr)) {\n return [pathStr];\n }\n return pathStr;\n }\n return pathStr.replace(/[[\\]]/g, '.')\n .replace(/\\.\\./g, '.')\n .replace(/(^\\.)|(\\.$)/g, '')\n .split('.')\n .map(part => lodash_1.default.defaultTo(lodash_1.default.toNumber(part), part));\n}\nexports.getArrayFromComponentPath = getArrayFromComponentPath;\nfunction isChildOf(child, parent) {\n while (child && child.parent) {\n if (child.parent === parent) {\n return true;\n }\n child = child.parent;\n }\n return false;\n}\nexports.isChildOf = isChildOf;\nfunction getStringFromComponentPath(path) {\n if (!lodash_1.default.isArray(path)) {\n return path;\n }\n let strPath = '';\n path.forEach((part, i) => {\n if (lodash_1.default.isNumber(part)) {\n strPath += `[${part}]`;\n }\n else {\n strPath += i === 0 ? part : `.${part}`;\n }\n });\n return strPath;\n}\nexports.getStringFromComponentPath = getStringFromComponentPath;\nfunction round(number, precision) {\n if (lodash_1.default.isNumber(number)) {\n return number.toFixed(precision);\n }\n return number;\n}\nexports.round = round;\n/**\n * Check for Internet Explorer browser version\n *\n * @return {(number|null)}\n */\nfunction getIEBrowserVersion() {\n const { ie, version } = getBrowserInfo();\n return ie ? version : null;\n}\nexports.getIEBrowserVersion = getIEBrowserVersion;\n/**\n * Get browser name and version (modified from 'jquery-browser-plugin')\n *\n * @return {Object} -- {{browser name, version, isWebkit?}}\n * Possible browser names: chrome, safari, ie, edge, opera, mozilla, yabrowser\n */\nfunction getBrowserInfo() {\n const browser = {};\n if (typeof window === 'undefined') {\n return browser;\n }\n const ua = window.navigator.userAgent.toLowerCase();\n const match = /(edge|edg)\\/([\\w.]+)/.exec(ua) ||\n /(opr)[/]([\\w.]+)/.exec(ua) ||\n /(yabrowser)[ /]([\\w.]+)/.exec(ua) ||\n /(chrome)[ /]([\\w.]+)/.exec(ua) ||\n /(iemobile)[/]([\\w.]+)/.exec(ua) ||\n /(version)(applewebkit)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+).*(version)[ /]([\\w.]+).*(safari)[ /]([\\w.]+)/.exec(ua) ||\n /(webkit)[ /]([\\w.]+)/.exec(ua) ||\n /(opera)(?:.*version|)[ /]([\\w.]+)/.exec(ua) ||\n /(msie) ([\\w.]+)/.exec(ua) ||\n ua.indexOf('trident') >= 0 && /(rv)(?::| )([\\w.]+)/.exec(ua) ||\n ua.indexOf('compatible') < 0 && /(mozilla)(?:.*? rv:([\\w.]+)|)/.exec(ua) ||\n [];\n const matched = {\n browser: match[5] || match[3] || match[1] || '',\n version: match[4] || match[2] || '0'\n };\n if (matched.browser) {\n browser[matched.browser] = true;\n browser.version = parseInt(matched.version, 10);\n }\n // Chrome, Opera 15+, Safari and Yandex.Browser are webkit based browsers\n if (browser.chrome || browser.opr || browser.safari || browser.edg || browser.yabrowser) {\n browser.isWebkit = true;\n }\n // IE11 has a new token so we will assign it ie to avoid breaking changes\n if (browser.rv || browser.iemobile) {\n browser.ie = true;\n }\n // Edge has a new token since it became webkit based\n if (browser.edg) {\n browser.edge = true;\n }\n // Opera 15+ are identified as opr\n if (browser.opr) {\n browser.opera = true;\n }\n return browser;\n}\nexports.getBrowserInfo = getBrowserInfo;\nfunction getComponentPathWithoutIndicies(path = '') {\n return path.replace(/\\[\\d+\\]/, '');\n}\nexports.getComponentPathWithoutIndicies = getComponentPathWithoutIndicies;\n/**\n * Returns a path to the component which based on its schema\n * @param {*} component is a component's schema containing link to its parent's schema in the 'parent' property\n */\nfunction getComponentPath(component, path = '') {\n var _a;\n if (!component || !component.key || ((_a = component === null || component === void 0 ? void 0 : component._form) === null || _a === void 0 ? void 0 : _a.display) === 'wizard') { // unlike the Webform, the Wizard has the key and it is a duplicate of the panel key\n return path;\n }\n path = component.isInputComponent || component.input === true ? `${component.key}${path ? '.' : ''}${path}` : path;\n return getComponentPath(component.parent, path);\n}\nexports.getComponentPath = getComponentPath;\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {*} componentInstance\n * @return {(Component|undefined)}\n */\nfunction getDataParentComponent(componentInstance) {\n if (!componentInstance) {\n return;\n }\n const { parent } = componentInstance;\n if (parent && (parent.isInputComponent || parent.input)) {\n return parent;\n }\n else {\n return getDataParentComponent(parent);\n }\n}\nexports.getDataParentComponent = getDataParentComponent;\n/**\n * Returns whether the value is a promise\n * @param value\n * @return {boolean}\n */\nfunction isPromise(value) {\n return value\n && value.then\n && typeof value.then === 'function'\n && Object.prototype.toString.call(value) === '[object Promise]';\n}\nexports.isPromise = isPromise;\n/**\n * Determines if the component has a scoping parent in tree (a component which scopes its children and manages its\n * changes by itself, e.g. EditGrid)\n * @param componentInstance\n * @param firstPass\n * @returns {boolean|boolean|*}\n */\nfunction isInsideScopingComponent(componentInstance, firstPass = true) {\n if (!firstPass && (componentInstance === null || componentInstance === void 0 ? void 0 : componentInstance.hasScopedChildren)) {\n return true;\n }\n const dataParent = getDataParentComponent(componentInstance);\n if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.hasScopedChildren) {\n return true;\n }\n else if (dataParent === null || dataParent === void 0 ? void 0 : dataParent.parent) {\n return isInsideScopingComponent(dataParent.parent, false);\n }\n return false;\n}\nexports.isInsideScopingComponent = isInsideScopingComponent;\nfunction getFocusableElements(element) {\n const focusableSelector = `button:not([disabled]), input:not([disabled]), select:not([disabled]),\n textarea:not([disabled]), button:not([disabled]), [href]`;\n return element.querySelectorAll(focusableSelector);\n}\nexports.getFocusableElements = getFocusableElements;\nexports.componentValueTypes = {\n number: 'number',\n string: 'string',\n boolean: 'boolean',\n array: 'array',\n object: 'object',\n date: 'date',\n any: 'any',\n};\nfunction getComponentSavedTypes(fullSchema) {\n const schema = fullSchema || {};\n if (schema.persistent !== true) {\n return [];\n }\n if (schema.multiple) {\n return [exports.componentValueTypes.array];\n }\n return null;\n}\nexports.getComponentSavedTypes = getComponentSavedTypes;\n/**\n * Interpolates @formio/core errors so that they are compatible with the renderer\n * @param {FieldError[]} errors\n * @param firstPass\n * @returns {[]}\n */\nconst interpolateErrors = (component, errors, interpolateFn) => {\n return errors.map((error) => {\n error.component = component;\n const { errorKeyOrMessage, context } = error;\n const toInterpolate = component.errors && component.errors[errorKeyOrMessage] ? component.errors[errorKeyOrMessage] : errorKeyOrMessage;\n return Object.assign(Object.assign({}, error), { message: unescapeHTML(interpolateFn(toInterpolate, context)), context: Object.assign({}, context) });\n });\n};\nexports.interpolateErrors = interpolateErrors;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/utils.js?");
2202
2136
 
2203
2137
  /***/ }),
2204
2138