@formio/js 5.2.3 → 5.2.4-rc.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (510) hide show
  1. package/dist/formio.builder.css +161 -50
  2. package/dist/formio.builder.min.css +1 -1
  3. package/dist/formio.embed.js +1 -1
  4. package/dist/formio.embed.min.js +1 -1
  5. package/dist/formio.embed.min.js.LICENSE.txt +1 -1
  6. package/dist/formio.form.css +158 -49
  7. package/dist/formio.form.js +152 -108
  8. package/dist/formio.form.min.css +1 -1
  9. package/dist/formio.form.min.js +1 -1
  10. package/dist/formio.form.min.js.LICENSE.txt +1 -1
  11. package/dist/formio.full.css +161 -50
  12. package/dist/formio.full.js +401 -227
  13. package/dist/formio.full.min.css +1 -1
  14. package/dist/formio.full.min.js +1 -1
  15. package/dist/formio.full.min.js.LICENSE.txt +1 -1
  16. package/dist/formio.js +51 -18
  17. package/dist/formio.min.js +1 -1
  18. package/dist/formio.min.js.LICENSE.txt +1 -1
  19. package/dist/formio.utils.js +47 -14
  20. package/dist/formio.utils.min.js +1 -1
  21. package/dist/formio.utils.min.js.LICENSE.txt +1 -1
  22. package/lib/cjs/CDN.js +12 -12
  23. package/lib/cjs/Element.d.ts +3 -2
  24. package/lib/cjs/Element.js +27 -21
  25. package/lib/cjs/Embed.js +74 -40
  26. package/lib/cjs/EventEmitter.js +1 -1
  27. package/lib/cjs/Form.d.ts +371 -341
  28. package/lib/cjs/Form.js +153 -39
  29. package/lib/cjs/FormBuilder.d.ts +3 -3
  30. package/lib/cjs/FormBuilder.js +2 -3
  31. package/lib/cjs/Formio.js +26 -23
  32. package/lib/cjs/InlineEmbed.js +23 -17
  33. package/lib/cjs/PDF.d.ts +1 -0
  34. package/lib/cjs/PDF.js +18 -15
  35. package/lib/cjs/PDFBuilder.js +51 -36
  36. package/lib/cjs/Webform.d.ts +8 -366
  37. package/lib/cjs/Webform.js +176 -235
  38. package/lib/cjs/WebformBuilder.js +217 -144
  39. package/lib/cjs/Wizard.js +92 -62
  40. package/lib/cjs/WizardBuilder.js +27 -19
  41. package/lib/cjs/addons/FormioAddon.js +1 -1
  42. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +59 -57
  43. package/lib/cjs/addons/PasswordStrength/PasswordStrengthAddon.js +24 -16
  44. package/lib/cjs/addons/index.js +3 -3
  45. package/lib/cjs/components/Components.js +0 -4
  46. package/lib/cjs/components/_classes/component/Component.form.js +11 -11
  47. package/lib/cjs/components/_classes/component/Component.js +298 -179
  48. package/lib/cjs/components/_classes/component/editForm/Component.edit.addons.js +2 -4
  49. package/lib/cjs/components/_classes/component/editForm/Component.edit.api.js +5 -5
  50. package/lib/cjs/components/_classes/component/editForm/Component.edit.conditional.js +9 -11
  51. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.d.ts +37 -0
  52. package/lib/cjs/components/_classes/component/editForm/Component.edit.data.js +39 -25
  53. package/lib/cjs/components/_classes/component/editForm/Component.edit.display.js +47 -29
  54. package/lib/cjs/components/_classes/component/editForm/Component.edit.layout.js +9 -9
  55. package/lib/cjs/components/_classes/component/editForm/Component.edit.logic.js +5 -7
  56. package/lib/cjs/components/_classes/component/editForm/Component.edit.validation.js +37 -34
  57. package/lib/cjs/components/_classes/component/editForm/utils.js +12 -16
  58. package/lib/cjs/components/_classes/componentModal/ComponentModal.js +6 -6
  59. package/lib/cjs/components/_classes/field/Field.js +7 -1
  60. package/lib/cjs/components/_classes/input/Input.js +30 -26
  61. package/lib/cjs/components/_classes/list/ListComponent.form.js +1 -1
  62. package/lib/cjs/components/_classes/list/ListComponent.js +27 -18
  63. package/lib/cjs/components/_classes/list/editForm/ListComponent.edit.data.js +36 -9
  64. package/lib/cjs/components/_classes/multivalue/Multivalue.js +32 -13
  65. package/lib/cjs/components/_classes/nested/NestedComponent.form.js +3 -3
  66. package/lib/cjs/components/_classes/nested/NestedComponent.js +36 -32
  67. package/lib/cjs/components/_classes/nestedarray/NestedArrayComponent.js +19 -14
  68. package/lib/cjs/components/_classes/nesteddata/NestedDataComponent.js +19 -17
  69. package/lib/cjs/components/address/Address.js +52 -45
  70. package/lib/cjs/components/address/editForm/Address.edit.data.js +2 -2
  71. package/lib/cjs/components/address/editForm/Address.edit.display.js +2 -2
  72. package/lib/cjs/components/address/editForm/Address.edit.provider.js +53 -11
  73. package/lib/cjs/components/alert/Alert.js +21 -15
  74. package/lib/cjs/components/button/Button.form.js +1 -1
  75. package/lib/cjs/components/button/Button.js +50 -27
  76. package/lib/cjs/components/button/editForm/Button.edit.display.js +49 -9
  77. package/lib/cjs/components/checkbox/Checkbox.d.ts +1 -1
  78. package/lib/cjs/components/checkbox/Checkbox.form.js +3 -3
  79. package/lib/cjs/components/checkbox/Checkbox.js +28 -20
  80. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.data.js +1 -1
  81. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.display.js +13 -3
  82. package/lib/cjs/components/checkbox/editForm/Checkbox.edit.validation.js +2 -2
  83. package/lib/cjs/components/columns/Columns.form.js +1 -1
  84. package/lib/cjs/components/columns/Columns.js +24 -12
  85. package/lib/cjs/components/columns/editForm/Columns.edit.display.js +17 -17
  86. package/lib/cjs/components/container/Container.form.js +2 -2
  87. package/lib/cjs/components/container/Container.js +6 -4
  88. package/lib/cjs/components/container/editForm/Container.edit.data.js +3 -3
  89. package/lib/cjs/components/container/editForm/Container.edit.display.js +4 -4
  90. package/lib/cjs/components/content/Content.form.js +4 -2
  91. package/lib/cjs/components/content/Content.js +10 -8
  92. package/lib/cjs/components/content/editForm/Content.edit.display.js +10 -10
  93. package/lib/cjs/components/currency/Currency.form.js +3 -3
  94. package/lib/cjs/components/currency/Currency.js +19 -10
  95. package/lib/cjs/components/currency/editForm/Currency.edit.data.js +5 -5
  96. package/lib/cjs/components/currency/editForm/Currency.edit.display.js +8 -8
  97. package/lib/cjs/components/datagrid/DataGrid.form.js +3 -3
  98. package/lib/cjs/components/datagrid/DataGrid.js +89 -38
  99. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.data.js +1 -1
  100. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.display.js +14 -14
  101. package/lib/cjs/components/datagrid/editForm/DataGrid.edit.validation.js +3 -3
  102. package/lib/cjs/components/datamap/DataMap.form.js +2 -2
  103. package/lib/cjs/components/datamap/DataMap.js +44 -31
  104. package/lib/cjs/components/datamap/editForm/DataMap.edit.data.js +1 -1
  105. package/lib/cjs/components/datamap/editForm/DataMap.edit.display.js +8 -8
  106. package/lib/cjs/components/datetime/DateTime.form.js +5 -5
  107. package/lib/cjs/components/datetime/DateTime.js +30 -15
  108. package/lib/cjs/components/datetime/editForm/DateTime.edit.data.js +4 -3
  109. package/lib/cjs/components/datetime/editForm/DateTime.edit.date.js +10 -10
  110. package/lib/cjs/components/datetime/editForm/DateTime.edit.display.js +22 -17
  111. package/lib/cjs/components/datetime/editForm/DateTime.edit.time.js +5 -5
  112. package/lib/cjs/components/datetime/editForm/DateTime.edit.validation.js +3 -3
  113. package/lib/cjs/components/day/Day.form.js +5 -5
  114. package/lib/cjs/components/day/Day.js +146 -56
  115. package/lib/cjs/components/day/editForm/Day.edit.day.js +13 -9
  116. package/lib/cjs/components/day/editForm/Day.edit.display.js +7 -7
  117. package/lib/cjs/components/day/editForm/Day.edit.month.js +12 -8
  118. package/lib/cjs/components/day/editForm/Day.edit.validation.js +7 -7
  119. package/lib/cjs/components/day/editForm/Day.edit.year.js +8 -8
  120. package/lib/cjs/components/editgrid/EditGrid.form.js +2 -2
  121. package/lib/cjs/components/editgrid/EditGrid.js +137 -89
  122. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.data.js +2 -2
  123. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.display.js +7 -2
  124. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.templates.js +16 -16
  125. package/lib/cjs/components/editgrid/editForm/EditGrid.edit.validation.js +3 -3
  126. package/lib/cjs/components/email/Email.js +4 -4
  127. package/lib/cjs/components/email/editForm/Email.edit.display.js +3 -3
  128. package/lib/cjs/components/email/editForm/Email.edit.validation.js +6 -6
  129. package/lib/cjs/components/fieldset/Fieldset.form.js +1 -1
  130. package/lib/cjs/components/fieldset/Fieldset.js +2 -2
  131. package/lib/cjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -8
  132. package/lib/cjs/components/file/File.form.js +4 -4
  133. package/lib/cjs/components/file/File.js +126 -80
  134. package/lib/cjs/components/file/editForm/File.edit.display.js +9 -5
  135. package/lib/cjs/components/file/editForm/File.edit.file.d.ts +37 -16
  136. package/lib/cjs/components/file/editForm/File.edit.file.js +169 -72
  137. package/lib/cjs/components/file/editForm/File.edit.validation.js +2 -2
  138. package/lib/cjs/components/form/Form.form.js +3 -3
  139. package/lib/cjs/components/form/Form.js +67 -51
  140. package/lib/cjs/components/form/editForm/Form.edit.data.js +1 -3
  141. package/lib/cjs/components/form/editForm/Form.edit.display.js +6 -7
  142. package/lib/cjs/components/form/editForm/Form.edit.form.js +11 -9
  143. package/lib/cjs/components/hidden/Hidden.form.js +4 -4
  144. package/lib/cjs/components/hidden/Hidden.js +2 -2
  145. package/lib/cjs/components/hidden/editForm/Hidden.edit.data.js +3 -3
  146. package/lib/cjs/components/hidden/editForm/Hidden.edit.display.js +10 -10
  147. package/lib/cjs/components/html/HTML.js +23 -17
  148. package/lib/cjs/components/html/editForm/HTML.edit.display.js +17 -17
  149. package/lib/cjs/components/html/editForm/HTML.edit.logic.js +2 -2
  150. package/lib/cjs/components/number/Number.form.js +3 -3
  151. package/lib/cjs/components/number/Number.js +27 -11
  152. package/lib/cjs/components/number/editForm/Number.edit.data.js +3 -3
  153. package/lib/cjs/components/number/editForm/Number.edit.display.js +4 -4
  154. package/lib/cjs/components/number/editForm/Number.edit.validation.js +9 -9
  155. package/lib/cjs/components/panel/Panel.form.js +1 -1
  156. package/lib/cjs/components/panel/Panel.js +2 -2
  157. package/lib/cjs/components/panel/editForm/Panel.edit.conditional.js +5 -7
  158. package/lib/cjs/components/panel/editForm/Panel.edit.display.js +55 -29
  159. package/lib/cjs/components/password/Password.form.js +3 -3
  160. package/lib/cjs/components/password/Password.js +5 -2
  161. package/lib/cjs/components/password/editForm/Password.edit.data.js +11 -11
  162. package/lib/cjs/components/password/editForm/Password.edit.display.js +3 -3
  163. package/lib/cjs/components/password/editForm/Password.edit.validation.js +3 -3
  164. package/lib/cjs/components/phonenumber/PhoneNumber.form.js +8 -8
  165. package/lib/cjs/components/phonenumber/PhoneNumber.js +3 -3
  166. package/lib/cjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +6 -6
  167. package/lib/cjs/components/radio/Radio.form.js +3 -3
  168. package/lib/cjs/components/radio/Radio.js +55 -26
  169. package/lib/cjs/components/radio/editForm/Radio.edit.data.js +23 -9
  170. package/lib/cjs/components/radio/editForm/Radio.edit.display.js +6 -6
  171. package/lib/cjs/components/radio/editForm/Radio.edit.validation.js +2 -2
  172. package/lib/cjs/components/recaptcha/ReCaptcha.form.js +5 -5
  173. package/lib/cjs/components/recaptcha/ReCaptcha.js +7 -5
  174. package/lib/cjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +24 -24
  175. package/lib/cjs/components/select/Select.form.js +3 -3
  176. package/lib/cjs/components/select/Select.js +235 -129
  177. package/lib/cjs/components/select/editForm/Select.edit.data.d.ts +1 -1
  178. package/lib/cjs/components/select/editForm/Select.edit.data.js +191 -57
  179. package/lib/cjs/components/select/editForm/Select.edit.display.js +2 -2
  180. package/lib/cjs/components/select/editForm/Select.edit.validation.js +4 -4
  181. package/lib/cjs/components/selectboxes/SelectBoxes.form.js +3 -3
  182. package/lib/cjs/components/selectboxes/SelectBoxes.js +31 -15
  183. package/lib/cjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +5 -5
  184. package/lib/cjs/components/signature/Signature.form.js +3 -3
  185. package/lib/cjs/components/signature/Signature.js +25 -15
  186. package/lib/cjs/components/signature/editForm/Signature.edit.display.js +19 -10
  187. package/lib/cjs/components/survey/Survey.form.js +3 -3
  188. package/lib/cjs/components/survey/Survey.js +30 -17
  189. package/lib/cjs/components/survey/editForm/Survey.edit.data.js +23 -11
  190. package/lib/cjs/components/survey/editForm/Survey.edit.display.js +1 -1
  191. package/lib/cjs/components/survey/editForm/Survey.edit.validation.js +1 -1
  192. package/lib/cjs/components/table/Table.form.js +1 -1
  193. package/lib/cjs/components/table/Table.js +7 -5
  194. package/lib/cjs/components/table/editForm/Table.edit.display.js +22 -22
  195. package/lib/cjs/components/tabs/Tabs.form.js +1 -1
  196. package/lib/cjs/components/tabs/Tabs.js +26 -8
  197. package/lib/cjs/components/tabs/editForm/Tabs.edit.display.js +21 -17
  198. package/lib/cjs/components/tags/Tags.form.js +1 -1
  199. package/lib/cjs/components/tags/Tags.js +28 -12
  200. package/lib/cjs/components/tags/editForm/Tags.edit.data.js +7 -7
  201. package/lib/cjs/components/textarea/TextArea.form.js +2 -2
  202. package/lib/cjs/components/textarea/TextArea.js +63 -45
  203. package/lib/cjs/components/textarea/editForm/TextArea.edit.display.js +96 -72
  204. package/lib/cjs/components/textarea/editForm/TextArea.edit.validation.js +3 -3
  205. package/lib/cjs/components/textfield/TextField.form.js +3 -3
  206. package/lib/cjs/components/textfield/TextField.js +32 -21
  207. package/lib/cjs/components/textfield/editForm/TextField.edit.data.js +15 -13
  208. package/lib/cjs/components/textfield/editForm/TextField.edit.display.js +31 -21
  209. package/lib/cjs/components/textfield/editForm/TextField.edit.validation.js +6 -6
  210. package/lib/cjs/components/time/Time.js +17 -10
  211. package/lib/cjs/components/time/editForm/Time.edit.display.js +2 -2
  212. package/lib/cjs/components/unknown/Unknown.form.js +5 -5
  213. package/lib/cjs/components/unknown/Unknown.js +2 -2
  214. package/lib/cjs/components/unknown/editForm/Unknown.edit.display.js +3 -3
  215. package/lib/cjs/components/url/Url.form.js +3 -3
  216. package/lib/cjs/components/url/Url.js +2 -2
  217. package/lib/cjs/components/url/editForm/Url.edit.display.js +3 -3
  218. package/lib/cjs/components/url/editForm/Url.edit.validation.js +1 -1
  219. package/lib/cjs/components/well/Well.form.js +1 -1
  220. package/lib/cjs/components/well/Well.js +2 -2
  221. package/lib/cjs/components/well/editForm/Well.edit.display.js +10 -10
  222. package/lib/cjs/formio.form.d.ts +2 -1
  223. package/lib/cjs/formio.form.js +38 -12
  224. package/lib/cjs/i18n.d.ts +4 -0
  225. package/lib/cjs/i18n.js +7 -3
  226. package/lib/cjs/package.json +1 -1
  227. package/lib/cjs/providers/address/AddressProvider.js +8 -5
  228. package/lib/cjs/providers/address/GoogleAddressProvider.d.ts +3 -3
  229. package/lib/cjs/providers/address/GoogleAddressProvider.js +24 -13
  230. package/lib/cjs/providers/processor/fileProcessor.js +3 -1
  231. package/lib/cjs/providers/storage/azure.js +5 -2
  232. package/lib/cjs/providers/storage/dropbox.js +4 -5
  233. package/lib/cjs/providers/storage/googleDrive.js +3 -4
  234. package/lib/cjs/providers/storage/index.js +1 -1
  235. package/lib/cjs/providers/storage/indexeddb.js +16 -6
  236. package/lib/cjs/providers/storage/s3.js +17 -6
  237. package/lib/cjs/providers/storage/uploadAdapter.js +17 -11
  238. package/lib/cjs/providers/storage/url.js +13 -11
  239. package/lib/cjs/providers/storage/xhr.js +17 -9
  240. package/lib/cjs/templates/index.js +1 -1
  241. package/lib/cjs/translations/de.d.ts +80 -0
  242. package/lib/cjs/translations/de.js +81 -0
  243. package/lib/cjs/translations/en.d.ts +0 -2
  244. package/lib/cjs/translations/en.js +7 -9
  245. package/lib/cjs/utils/ChoicesWrapper.js +2 -2
  246. package/lib/cjs/utils/builder.js +31 -7
  247. package/lib/cjs/utils/calendarUtils.js +7 -5
  248. package/lib/cjs/utils/conditionOperators/ConditionOperator.js +1 -1
  249. package/lib/cjs/utils/conditionOperators/DateGreaterThan.js +12 -4
  250. package/lib/cjs/utils/conditionOperators/IsEmptyValue.js +3 -1
  251. package/lib/cjs/utils/conditionOperators/IsEqualTo.js +10 -6
  252. package/lib/cjs/utils/conditionOperators/index.js +1 -1
  253. package/lib/cjs/utils/formUtils.js +1 -1
  254. package/lib/cjs/utils/i18n.js +7 -1
  255. package/lib/cjs/utils/index.d.ts +2 -1
  256. package/lib/cjs/utils/index.js +2 -2
  257. package/lib/cjs/utils/utils.d.ts +10 -1
  258. package/lib/cjs/utils/utils.js +175 -92
  259. package/lib/cjs/widgets/CalendarWidget.js +66 -49
  260. package/lib/cjs/widgets/InputWidget.js +6 -4
  261. package/lib/cjs/widgets/index.js +1 -1
  262. package/lib/mjs/CDN.js +12 -12
  263. package/lib/mjs/Element.d.ts +3 -2
  264. package/lib/mjs/Element.js +27 -21
  265. package/lib/mjs/Embed.js +76 -42
  266. package/lib/mjs/EventEmitter.js +1 -1
  267. package/lib/mjs/Form.d.ts +371 -341
  268. package/lib/mjs/Form.js +142 -126
  269. package/lib/mjs/FormBuilder.d.ts +3 -3
  270. package/lib/mjs/FormBuilder.js +2 -3
  271. package/lib/mjs/Formio.js +26 -23
  272. package/lib/mjs/InlineEmbed.js +23 -17
  273. package/lib/mjs/PDF.d.ts +1 -0
  274. package/lib/mjs/PDF.js +18 -15
  275. package/lib/mjs/PDFBuilder.js +51 -36
  276. package/lib/mjs/Webform.d.ts +8 -366
  277. package/lib/mjs/Webform.js +183 -250
  278. package/lib/mjs/WebformBuilder.js +220 -147
  279. package/lib/mjs/Wizard.js +93 -63
  280. package/lib/mjs/WizardBuilder.js +27 -19
  281. package/lib/mjs/addons/FormioAddon.js +1 -1
  282. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.form.js +59 -57
  283. package/lib/mjs/addons/PasswordStrength/PasswordStrengthAddon.js +24 -16
  284. package/lib/mjs/addons/index.js +3 -3
  285. package/lib/mjs/components/Components.js +0 -4
  286. package/lib/mjs/components/_classes/component/Component.form.js +11 -11
  287. package/lib/mjs/components/_classes/component/Component.js +303 -184
  288. package/lib/mjs/components/_classes/component/editForm/Component.edit.addons.js +2 -4
  289. package/lib/mjs/components/_classes/component/editForm/Component.edit.api.js +5 -5
  290. package/lib/mjs/components/_classes/component/editForm/Component.edit.conditional.js +9 -11
  291. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.d.ts +37 -0
  292. package/lib/mjs/components/_classes/component/editForm/Component.edit.data.js +39 -25
  293. package/lib/mjs/components/_classes/component/editForm/Component.edit.display.js +47 -29
  294. package/lib/mjs/components/_classes/component/editForm/Component.edit.layout.js +9 -9
  295. package/lib/mjs/components/_classes/component/editForm/Component.edit.logic.js +5 -7
  296. package/lib/mjs/components/_classes/component/editForm/Component.edit.validation.js +37 -34
  297. package/lib/mjs/components/_classes/component/editForm/utils.js +12 -16
  298. package/lib/mjs/components/_classes/componentModal/ComponentModal.js +2 -2
  299. package/lib/mjs/components/_classes/field/Field.js +8 -2
  300. package/lib/mjs/components/_classes/input/Input.js +27 -23
  301. package/lib/mjs/components/_classes/list/ListComponent.form.js +1 -1
  302. package/lib/mjs/components/_classes/list/ListComponent.js +27 -18
  303. package/lib/mjs/components/_classes/list/editForm/ListComponent.edit.data.js +36 -9
  304. package/lib/mjs/components/_classes/multivalue/Multivalue.js +32 -13
  305. package/lib/mjs/components/_classes/nested/NestedComponent.form.js +3 -3
  306. package/lib/mjs/components/_classes/nested/NestedComponent.js +32 -28
  307. package/lib/mjs/components/_classes/nestedarray/NestedArrayComponent.js +20 -15
  308. package/lib/mjs/components/_classes/nesteddata/NestedDataComponent.js +19 -17
  309. package/lib/mjs/components/address/Address.js +57 -46
  310. package/lib/mjs/components/address/editForm/Address.edit.data.js +2 -2
  311. package/lib/mjs/components/address/editForm/Address.edit.display.js +2 -2
  312. package/lib/mjs/components/address/editForm/Address.edit.provider.js +53 -11
  313. package/lib/mjs/components/alert/Alert.js +22 -16
  314. package/lib/mjs/components/button/Button.form.js +1 -1
  315. package/lib/mjs/components/button/Button.js +51 -28
  316. package/lib/mjs/components/button/editForm/Button.edit.display.js +49 -9
  317. package/lib/mjs/components/checkbox/Checkbox.d.ts +1 -1
  318. package/lib/mjs/components/checkbox/Checkbox.form.js +3 -3
  319. package/lib/mjs/components/checkbox/Checkbox.js +29 -21
  320. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.data.js +1 -1
  321. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.display.js +13 -3
  322. package/lib/mjs/components/checkbox/editForm/Checkbox.edit.validation.js +2 -2
  323. package/lib/mjs/components/columns/Columns.form.js +1 -1
  324. package/lib/mjs/components/columns/Columns.js +24 -12
  325. package/lib/mjs/components/columns/editForm/Columns.edit.display.js +17 -17
  326. package/lib/mjs/components/container/Container.form.js +2 -2
  327. package/lib/mjs/components/container/Container.js +6 -4
  328. package/lib/mjs/components/container/editForm/Container.edit.data.js +3 -3
  329. package/lib/mjs/components/container/editForm/Container.edit.display.js +4 -4
  330. package/lib/mjs/components/content/Content.form.js +4 -2
  331. package/lib/mjs/components/content/Content.js +10 -8
  332. package/lib/mjs/components/content/editForm/Content.edit.display.js +10 -10
  333. package/lib/mjs/components/currency/Currency.form.js +3 -3
  334. package/lib/mjs/components/currency/Currency.js +19 -10
  335. package/lib/mjs/components/currency/editForm/Currency.edit.data.js +5 -5
  336. package/lib/mjs/components/currency/editForm/Currency.edit.display.js +8 -8
  337. package/lib/mjs/components/datagrid/DataGrid.form.js +3 -3
  338. package/lib/mjs/components/datagrid/DataGrid.js +90 -39
  339. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.data.js +1 -1
  340. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.display.js +14 -14
  341. package/lib/mjs/components/datagrid/editForm/DataGrid.edit.validation.js +3 -3
  342. package/lib/mjs/components/datamap/DataMap.form.js +2 -2
  343. package/lib/mjs/components/datamap/DataMap.js +44 -31
  344. package/lib/mjs/components/datamap/editForm/DataMap.edit.data.js +1 -1
  345. package/lib/mjs/components/datamap/editForm/DataMap.edit.display.js +8 -8
  346. package/lib/mjs/components/datetime/DateTime.form.js +5 -5
  347. package/lib/mjs/components/datetime/DateTime.js +31 -16
  348. package/lib/mjs/components/datetime/editForm/DateTime.edit.data.js +4 -3
  349. package/lib/mjs/components/datetime/editForm/DateTime.edit.date.js +10 -10
  350. package/lib/mjs/components/datetime/editForm/DateTime.edit.display.js +22 -17
  351. package/lib/mjs/components/datetime/editForm/DateTime.edit.time.js +5 -5
  352. package/lib/mjs/components/datetime/editForm/DateTime.edit.validation.js +3 -3
  353. package/lib/mjs/components/day/Day.form.js +5 -5
  354. package/lib/mjs/components/day/Day.js +147 -57
  355. package/lib/mjs/components/day/editForm/Day.edit.day.js +13 -9
  356. package/lib/mjs/components/day/editForm/Day.edit.display.js +7 -7
  357. package/lib/mjs/components/day/editForm/Day.edit.month.js +12 -8
  358. package/lib/mjs/components/day/editForm/Day.edit.validation.js +7 -7
  359. package/lib/mjs/components/day/editForm/Day.edit.year.js +8 -8
  360. package/lib/mjs/components/editgrid/EditGrid.form.js +2 -2
  361. package/lib/mjs/components/editgrid/EditGrid.js +138 -90
  362. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.data.js +2 -2
  363. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.display.js +7 -2
  364. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.templates.js +16 -16
  365. package/lib/mjs/components/editgrid/editForm/EditGrid.edit.validation.js +3 -3
  366. package/lib/mjs/components/email/Email.js +4 -4
  367. package/lib/mjs/components/email/editForm/Email.edit.display.js +3 -3
  368. package/lib/mjs/components/email/editForm/Email.edit.validation.js +6 -6
  369. package/lib/mjs/components/fieldset/Fieldset.form.js +1 -1
  370. package/lib/mjs/components/fieldset/Fieldset.js +2 -2
  371. package/lib/mjs/components/fieldset/editForm/Fieldset.edit.display.js +8 -8
  372. package/lib/mjs/components/file/File.form.js +4 -4
  373. package/lib/mjs/components/file/File.js +131 -84
  374. package/lib/mjs/components/file/editForm/File.edit.display.js +9 -5
  375. package/lib/mjs/components/file/editForm/File.edit.file.d.ts +37 -16
  376. package/lib/mjs/components/file/editForm/File.edit.file.js +169 -72
  377. package/lib/mjs/components/file/editForm/File.edit.validation.js +2 -2
  378. package/lib/mjs/components/form/Form.form.js +3 -3
  379. package/lib/mjs/components/form/Form.js +67 -51
  380. package/lib/mjs/components/form/editForm/Form.edit.data.js +1 -3
  381. package/lib/mjs/components/form/editForm/Form.edit.display.js +6 -7
  382. package/lib/mjs/components/form/editForm/Form.edit.form.js +10 -8
  383. package/lib/mjs/components/hidden/Hidden.form.js +4 -4
  384. package/lib/mjs/components/hidden/Hidden.js +2 -2
  385. package/lib/mjs/components/hidden/editForm/Hidden.edit.data.js +3 -3
  386. package/lib/mjs/components/hidden/editForm/Hidden.edit.display.js +10 -10
  387. package/lib/mjs/components/html/HTML.js +23 -17
  388. package/lib/mjs/components/html/editForm/HTML.edit.display.js +17 -17
  389. package/lib/mjs/components/html/editForm/HTML.edit.logic.js +2 -2
  390. package/lib/mjs/components/number/Number.form.js +3 -3
  391. package/lib/mjs/components/number/Number.js +28 -12
  392. package/lib/mjs/components/number/editForm/Number.edit.data.js +3 -3
  393. package/lib/mjs/components/number/editForm/Number.edit.display.js +4 -4
  394. package/lib/mjs/components/number/editForm/Number.edit.validation.js +9 -9
  395. package/lib/mjs/components/panel/Panel.form.js +1 -1
  396. package/lib/mjs/components/panel/Panel.js +2 -2
  397. package/lib/mjs/components/panel/editForm/Panel.edit.conditional.js +6 -8
  398. package/lib/mjs/components/panel/editForm/Panel.edit.display.js +55 -29
  399. package/lib/mjs/components/password/Password.form.js +3 -3
  400. package/lib/mjs/components/password/Password.js +5 -2
  401. package/lib/mjs/components/password/editForm/Password.edit.data.js +11 -11
  402. package/lib/mjs/components/password/editForm/Password.edit.display.js +3 -3
  403. package/lib/mjs/components/password/editForm/Password.edit.validation.js +3 -3
  404. package/lib/mjs/components/phonenumber/PhoneNumber.form.js +8 -8
  405. package/lib/mjs/components/phonenumber/PhoneNumber.js +3 -3
  406. package/lib/mjs/components/phonenumber/editForm/PhoneNumber.edit.validation.js +6 -6
  407. package/lib/mjs/components/radio/Radio.form.js +3 -3
  408. package/lib/mjs/components/radio/Radio.js +56 -27
  409. package/lib/mjs/components/radio/editForm/Radio.edit.data.js +23 -9
  410. package/lib/mjs/components/radio/editForm/Radio.edit.display.js +6 -6
  411. package/lib/mjs/components/radio/editForm/Radio.edit.validation.js +2 -2
  412. package/lib/mjs/components/recaptcha/ReCaptcha.form.js +5 -5
  413. package/lib/mjs/components/recaptcha/ReCaptcha.js +7 -5
  414. package/lib/mjs/components/recaptcha/editForm/ReCaptcha.edit.display.js +24 -24
  415. package/lib/mjs/components/select/Select.form.js +3 -3
  416. package/lib/mjs/components/select/Select.js +240 -134
  417. package/lib/mjs/components/select/editForm/Select.edit.data.d.ts +1 -1
  418. package/lib/mjs/components/select/editForm/Select.edit.data.js +191 -57
  419. package/lib/mjs/components/select/editForm/Select.edit.display.js +2 -2
  420. package/lib/mjs/components/select/editForm/Select.edit.validation.js +4 -4
  421. package/lib/mjs/components/selectboxes/SelectBoxes.form.js +3 -3
  422. package/lib/mjs/components/selectboxes/SelectBoxes.js +32 -16
  423. package/lib/mjs/components/selectboxes/editForm/SelectBoxes.edit.validation.js +5 -5
  424. package/lib/mjs/components/signature/Signature.form.js +3 -3
  425. package/lib/mjs/components/signature/Signature.js +25 -15
  426. package/lib/mjs/components/signature/editForm/Signature.edit.display.js +19 -10
  427. package/lib/mjs/components/survey/Survey.form.js +3 -3
  428. package/lib/mjs/components/survey/Survey.js +30 -17
  429. package/lib/mjs/components/survey/editForm/Survey.edit.data.js +23 -11
  430. package/lib/mjs/components/survey/editForm/Survey.edit.display.js +1 -1
  431. package/lib/mjs/components/survey/editForm/Survey.edit.validation.js +1 -1
  432. package/lib/mjs/components/table/Table.form.js +1 -1
  433. package/lib/mjs/components/table/Table.js +7 -5
  434. package/lib/mjs/components/table/editForm/Table.edit.display.js +22 -22
  435. package/lib/mjs/components/tabs/Tabs.form.js +1 -1
  436. package/lib/mjs/components/tabs/Tabs.js +26 -8
  437. package/lib/mjs/components/tabs/editForm/Tabs.edit.display.js +21 -17
  438. package/lib/mjs/components/tags/Tags.form.js +1 -1
  439. package/lib/mjs/components/tags/Tags.js +28 -12
  440. package/lib/mjs/components/tags/editForm/Tags.edit.data.js +7 -7
  441. package/lib/mjs/components/textarea/TextArea.form.js +2 -2
  442. package/lib/mjs/components/textarea/TextArea.js +75 -51
  443. package/lib/mjs/components/textarea/editForm/TextArea.edit.display.js +96 -72
  444. package/lib/mjs/components/textarea/editForm/TextArea.edit.validation.js +3 -3
  445. package/lib/mjs/components/textfield/TextField.form.js +3 -3
  446. package/lib/mjs/components/textfield/TextField.js +34 -23
  447. package/lib/mjs/components/textfield/editForm/TextField.edit.data.js +15 -13
  448. package/lib/mjs/components/textfield/editForm/TextField.edit.display.js +31 -21
  449. package/lib/mjs/components/textfield/editForm/TextField.edit.validation.js +6 -6
  450. package/lib/mjs/components/time/Time.js +17 -10
  451. package/lib/mjs/components/time/editForm/Time.edit.display.js +2 -2
  452. package/lib/mjs/components/unknown/Unknown.form.js +5 -5
  453. package/lib/mjs/components/unknown/Unknown.js +2 -2
  454. package/lib/mjs/components/unknown/editForm/Unknown.edit.display.js +3 -3
  455. package/lib/mjs/components/url/Url.form.js +3 -3
  456. package/lib/mjs/components/url/Url.js +2 -2
  457. package/lib/mjs/components/url/editForm/Url.edit.display.js +3 -3
  458. package/lib/mjs/components/url/editForm/Url.edit.validation.js +1 -1
  459. package/lib/mjs/components/well/Well.form.js +1 -1
  460. package/lib/mjs/components/well/Well.js +2 -2
  461. package/lib/mjs/components/well/editForm/Well.edit.display.js +10 -10
  462. package/lib/mjs/formio.form.d.ts +2 -1
  463. package/lib/mjs/formio.form.js +10 -8
  464. package/lib/mjs/i18n.d.ts +4 -0
  465. package/lib/mjs/i18n.js +7 -3
  466. package/lib/mjs/package.json +1 -1
  467. package/lib/mjs/providers/address/AddressProvider.js +8 -5
  468. package/lib/mjs/providers/address/GoogleAddressProvider.d.ts +3 -3
  469. package/lib/mjs/providers/address/GoogleAddressProvider.js +24 -13
  470. package/lib/mjs/providers/processor/fileProcessor.js +3 -1
  471. package/lib/mjs/providers/storage/azure.js +5 -2
  472. package/lib/mjs/providers/storage/dropbox.js +4 -5
  473. package/lib/mjs/providers/storage/googleDrive.js +3 -4
  474. package/lib/mjs/providers/storage/index.js +1 -1
  475. package/lib/mjs/providers/storage/indexeddb.js +16 -6
  476. package/lib/mjs/providers/storage/s3.js +19 -8
  477. package/lib/mjs/providers/storage/uploadAdapter.js +17 -11
  478. package/lib/mjs/providers/storage/url.js +13 -11
  479. package/lib/mjs/providers/storage/xhr.js +17 -9
  480. package/lib/mjs/templates/index.js +1 -1
  481. package/lib/mjs/translations/de.d.ts +80 -0
  482. package/lib/mjs/translations/de.js +79 -0
  483. package/lib/mjs/translations/en.d.ts +0 -2
  484. package/lib/mjs/translations/en.js +7 -9
  485. package/lib/mjs/utils/ChoicesWrapper.js +2 -2
  486. package/lib/mjs/utils/builder.js +31 -7
  487. package/lib/mjs/utils/calendarUtils.js +7 -5
  488. package/lib/mjs/utils/conditionOperators/ConditionOperator.js +1 -1
  489. package/lib/mjs/utils/conditionOperators/DateGreaterThan.js +16 -5
  490. package/lib/mjs/utils/conditionOperators/IsEmptyValue.js +3 -1
  491. package/lib/mjs/utils/conditionOperators/IsEqualTo.js +10 -6
  492. package/lib/mjs/utils/conditionOperators/index.js +1 -1
  493. package/lib/mjs/utils/formUtils.js +2 -2
  494. package/lib/mjs/utils/i18n.js +7 -1
  495. package/lib/mjs/utils/index.d.ts +2 -1
  496. package/lib/mjs/utils/index.js +3 -3
  497. package/lib/mjs/utils/utils.d.ts +10 -1
  498. package/lib/mjs/utils/utils.js +178 -91
  499. package/lib/mjs/widgets/CalendarWidget.js +67 -50
  500. package/lib/mjs/widgets/InputWidget.js +6 -4
  501. package/lib/mjs/widgets/index.js +1 -1
  502. package/package.json +3 -3
  503. package/lib/cjs/pdf.image.d.ts +0 -2
  504. package/lib/cjs/pdf.image.js +0 -94
  505. package/lib/cjs/utils/jsonlogic/operators.d.ts +0 -1
  506. package/lib/cjs/utils/jsonlogic/operators.js +0 -265
  507. package/lib/mjs/pdf.image.d.ts +0 -2
  508. package/lib/mjs/pdf.image.js +0 -94
  509. package/lib/mjs/utils/jsonlogic/operators.d.ts +0 -1
  510. package/lib/mjs/utils/jsonlogic/operators.js +0 -262
@@ -1784,7 +1784,7 @@ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argumen
1784
1784
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1785
1785
 
1786
1786
  "use strict";
1787
- eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.filterProcessInfo = exports.filterPostProcess = exports.filterPostProcessSync = exports.filterProcess = exports.filterProcessSync = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst lodash_2 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"../core/lib/utils/formUtil/index.js\");\nconst filterProcessSync = (context) => {\n const { scope, path, value } = context;\n if (!scope.filter)\n scope.filter = {};\n if (value !== undefined) {\n scope.filter[path] = true;\n }\n};\nexports.filterProcessSync = filterProcessSync;\nconst filterProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.filterProcessSync)(context);\n});\nexports.filterProcess = filterProcess;\nconst filterPostProcessSync = (context) => {\n const { scope, path, data, component, value } = context;\n if (!scope.filter)\n scope.filter = {};\n if (value === undefined || !scope.filter[path]) {\n return;\n }\n scope.filtered = scope.filtered || {};\n const modelType = (0, formUtil_1.getModelType)(component);\n if (component.type === 'address' ||\n (modelType !== 'dataObject' &&\n modelType !== 'nestedArray' &&\n modelType !== 'nestedDataArray' &&\n modelType !== 'object')) {\n (0, lodash_1.set)(scope.filtered, path, value);\n }\n else {\n if (modelType === 'dataObject') {\n (0, lodash_1.set)(data, `${path}.data`, (0, lodash_2.get)(scope.filtered, `${path}.data`, (value === null || value === void 0 ? void 0 : value.data) || {}));\n (0, lodash_1.set)(scope.filtered, path, (0, lodash_2.get)(data, path));\n }\n else if (modelType === 'nestedDataArray') {\n const filtered = (0, lodash_2.get)(scope.filtered, path, []);\n (0, lodash_1.set)(scope.filtered, path, value.map((item, index) => {\n var _a;\n return Object.assign(Object.assign({}, item), { data: ((_a = filtered[index]) === null || _a === void 0 ? void 0 : _a.data) || {} });\n }));\n }\n else if (!(0, lodash_1.has)(scope.filtered, path)) {\n (0, lodash_1.set)(scope.filtered, path, value);\n }\n else {\n (0, lodash_1.set)(data, path, (0, lodash_2.get)(scope.filtered, path, value));\n }\n }\n};\nexports.filterPostProcessSync = filterPostProcessSync;\nconst filterPostProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.filterPostProcessSync)(context);\n});\nexports.filterPostProcess = filterPostProcess;\nexports.filterProcessInfo = {\n name: 'filter',\n process: exports.filterProcess,\n processSync: exports.filterProcessSync,\n postProcess: exports.filterPostProcess,\n postProcessSync: exports.filterPostProcessSync,\n shouldProcess: () => true,\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/filter/index.js?\n}");
1787
+ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.filterProcessInfo = exports.filterPostProcess = exports.filterPostProcessSync = exports.getModelTypeDefaultValue = exports.filterProcess = exports.filterProcessSync = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst lodash_2 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ../../utils/formUtil */ \"../core/lib/utils/formUtil/index.js\");\nconst filterProcessSync = (context) => {\n const { scope, path, value } = context;\n if (!scope.filter)\n scope.filter = {};\n if (value !== undefined) {\n scope.filter[path] = true;\n }\n};\nexports.filterProcessSync = filterProcessSync;\nconst filterProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.filterProcessSync)(context);\n});\nexports.filterProcess = filterProcess;\nconst getModelTypeDefaultValue = (modelType, context) => {\n const modelTypeDefaultValues = {\n dataObject: () => ({ data: {} }),\n nestedArray: () => [],\n nestedDataArray: () => {\n const { value } = context;\n return Array.isArray(value) ? value.map((v) => (Object.assign(Object.assign({}, v), { data: {} }))) : [];\n },\n object: () => {\n const { component } = context;\n return component.type === 'address' ? false : {};\n },\n };\n if (modelTypeDefaultValues[modelType]) {\n return modelTypeDefaultValues[modelType]();\n }\n return;\n};\nexports.getModelTypeDefaultValue = getModelTypeDefaultValue;\nconst filterPostProcessSync = (context) => {\n const { scope, path, data, component, value } = context;\n scope.filtered = scope.filtered || {};\n if (!scope.filter)\n scope.filter = {};\n if (value === undefined || !scope.filter[path]) {\n return;\n }\n const modelType = (0, formUtil_1.getModelType)(component);\n if (component.type === 'address' ||\n (modelType !== 'dataObject' &&\n modelType !== 'nestedArray' &&\n modelType !== 'nestedDataArray' &&\n modelType !== 'object')) {\n (0, lodash_1.set)(scope.filtered, path, value);\n }\n else {\n if (modelType === 'dataObject') {\n (0, lodash_1.set)(data, `${path}.data`, (0, lodash_2.get)(scope.filtered, `${path}.data`, (0, exports.getModelTypeDefaultValue)(modelType, context).data));\n (0, lodash_1.set)(scope.filtered, path, (0, lodash_2.get)(data, path));\n }\n else if (modelType === 'nestedDataArray') {\n const filtered = (0, lodash_2.get)(scope.filtered, path);\n (0, lodash_1.set)(scope.filtered, path, filtered\n ? (value || []).map((item, index) => {\n var _a;\n return Object.assign(Object.assign({}, item), { data: ((_a = filtered[index]) === null || _a === void 0 ? void 0 : _a.data) || {} });\n })\n : (0, exports.getModelTypeDefaultValue)(modelType, context));\n }\n else if (!(0, lodash_1.has)(scope.filtered, path)) {\n (0, lodash_1.set)(scope.filtered, path, (0, exports.getModelTypeDefaultValue)(modelType, context) || value);\n }\n else {\n (0, lodash_1.set)(data, path, (0, lodash_2.get)(scope.filtered, path, (0, exports.getModelTypeDefaultValue)(modelType, context) || value));\n }\n }\n};\nexports.filterPostProcessSync = filterPostProcessSync;\nconst filterPostProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.filterPostProcessSync)(context);\n});\nexports.filterPostProcess = filterPostProcess;\nexports.filterProcessInfo = {\n name: 'filter',\n process: exports.filterProcess,\n processSync: exports.filterProcessSync,\n postProcess: exports.filterPostProcess,\n postProcessSync: exports.filterPostProcessSync,\n shouldProcess: () => true,\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/filter/index.js?\n}");
1788
1788
 
1789
1789
  /***/ }),
1790
1790
 
@@ -1839,7 +1839,7 @@ eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexp
1839
1839
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1840
1840
 
1841
1841
  "use strict";
1842
- eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ProcessTargets = exports.Processors = exports.ProcessorMap = void 0;\nexports.process = process;\nexports.processSync = processSync;\nconst formUtil_1 = __webpack_require__(/*! ../utils/formUtil */ \"../core/lib/utils/formUtil/index.js\");\nconst processOne_1 = __webpack_require__(/*! ./processOne */ \"../core/lib/process/processOne.js\");\nconst defaultValue_1 = __webpack_require__(/*! ./defaultValue */ \"../core/lib/process/defaultValue/index.js\");\nconst fetch_1 = __webpack_require__(/*! ./fetch */ \"../core/lib/process/fetch/index.js\");\nconst calculation_1 = __webpack_require__(/*! ./calculation */ \"../core/lib/process/calculation/index.js\");\nconst logic_1 = __webpack_require__(/*! ./logic */ \"../core/lib/process/logic/index.js\");\nconst conditions_1 = __webpack_require__(/*! ./conditions */ \"../core/lib/process/conditions/index.js\");\nconst validation_1 = __webpack_require__(/*! ./validation */ \"../core/lib/process/validation/index.js\");\nconst filter_1 = __webpack_require__(/*! ./filter */ \"../core/lib/process/filter/index.js\");\nconst normalize_1 = __webpack_require__(/*! ./normalize */ \"../core/lib/process/normalize/index.js\");\nconst dereference_1 = __webpack_require__(/*! ./dereference */ \"../core/lib/process/dereference/index.js\");\nconst clearHidden_1 = __webpack_require__(/*! ./clearHidden */ \"../core/lib/process/clearHidden/index.js\");\nfunction process(context) {\n return __awaiter(this, void 0, void 0, function* () {\n const { instances, components, data, scope, flat, local, parent, parentPaths } = context;\n yield (0, formUtil_1.eachComponentDataAsync)(components, data, (component, compData, row, path, components, index, parent, paths) => __awaiter(this, void 0, void 0, function* () {\n yield (0, processOne_1.processOne)(Object.assign(Object.assign({}, context), { data: compData, component,\n components,\n path,\n paths,\n row,\n index, instance: instances\n ? instances[component.modelType === 'none' && (paths === null || paths === void 0 ? void 0 : paths.fullPath) ? paths.fullPath : path]\n : undefined, parent }));\n if (flat) {\n return true;\n }\n if (scope.noRecurse) {\n scope.noRecurse = false;\n return true;\n }\n }), false, local, parent, parentPaths, false, (component, compData, row, path, components, index, parent, paths) => __awaiter(this, void 0, void 0, function* () {\n yield (0, processOne_1.postProcessOne)(Object.assign(Object.assign({}, context), { data: compData, component,\n components,\n path,\n paths,\n row,\n index, instance: instances\n ? instances[component.modelType === 'none' && (paths === null || paths === void 0 ? void 0 : paths.fullPath) ? paths.fullPath : path]\n : undefined, parent }));\n }));\n if (scope.filtered) {\n context.data = scope.filtered || {};\n }\n return scope;\n });\n}\nfunction processSync(context) {\n const { instances, components, data, scope, flat, local, parent, parentPaths } = context;\n (0, formUtil_1.eachComponentData)(components, data, (component, compData, row, path, components, index, parent, paths) => {\n (0, processOne_1.processOneSync)(Object.assign(Object.assign({}, context), { data: compData, component,\n components,\n path,\n paths,\n row,\n index, instance: instances\n ? instances[component.modelType === 'none' && (paths === null || paths === void 0 ? void 0 : paths.fullPath) ? paths.fullPath : path]\n : undefined, parent }));\n if (flat) {\n return true;\n }\n if (scope.noRecurse) {\n scope.noRecurse = false;\n return true;\n }\n }, false, local, parent, parentPaths, false, (component, compData, row, path, components, index, parent, paths) => {\n (0, processOne_1.postProcessOneSync)(Object.assign(Object.assign({}, context), { data: compData, component,\n components,\n path,\n paths,\n row,\n index, instance: instances\n ? instances[component.modelType === 'none' && (paths === null || paths === void 0 ? void 0 : paths.fullPath) ? paths.fullPath : path]\n : undefined, parent }));\n });\n if (scope.filtered) {\n context.data = scope.filtered || {};\n }\n return scope;\n}\nexports.ProcessorMap = {\n filter: filter_1.filterProcessInfo,\n defaultValue: defaultValue_1.defaultValueProcessInfo,\n serverDefaultValue: defaultValue_1.serverDefaultValueProcessInfo,\n customDefaultValue: defaultValue_1.customDefaultValueProcessInfo,\n calculate: calculation_1.calculateProcessInfo,\n conditions: conditions_1.conditionProcessInfo,\n customConditions: conditions_1.customConditionProcessInfo,\n simpleConditions: conditions_1.simpleConditionProcessInfo,\n normalize: normalize_1.normalizeProcessInfo,\n dereference: dereference_1.dereferenceProcessInfo,\n clearHidden: clearHidden_1.clearHiddenProcessInfo,\n fetch: fetch_1.fetchProcessInfo,\n logic: logic_1.logicProcessInfo,\n validate: validation_1.validateProcessInfo,\n validateCustom: validation_1.validateCustomProcessInfo,\n validateServer: validation_1.validateServerProcessInfo,\n};\nexports.Processors = [\n filter_1.filterProcessInfo,\n defaultValue_1.defaultValueProcessInfo,\n normalize_1.normalizeProcessInfo,\n dereference_1.dereferenceProcessInfo,\n fetch_1.fetchProcessInfo,\n calculation_1.calculateProcessInfo,\n conditions_1.conditionProcessInfo,\n logic_1.logicProcessInfo,\n clearHidden_1.clearHiddenProcessInfo,\n validation_1.postValidateProcessInfo,\n];\n// Deprecated: Use Processors instead\nexports.ProcessTargets = {\n submission: [\n filter_1.filterProcessInfo,\n defaultValue_1.serverDefaultValueProcessInfo,\n normalize_1.normalizeProcessInfo,\n dereference_1.dereferenceProcessInfo,\n fetch_1.fetchProcessInfo,\n conditions_1.simpleConditionProcessInfo,\n validation_1.validateServerProcessInfo,\n ],\n evaluator: [\n defaultValue_1.customDefaultValueProcessInfo,\n calculation_1.calculateProcessInfo,\n logic_1.logicProcessInfo,\n conditions_1.conditionProcessInfo,\n clearHidden_1.clearHiddenProcessInfo,\n validation_1.validateProcessInfo,\n ],\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/process.js?\n}");
1842
+ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.ProcessTargets = exports.Processors = exports.ProcessorMap = void 0;\nexports.process = process;\nexports.processSync = processSync;\nconst formUtil_1 = __webpack_require__(/*! ../utils/formUtil */ \"../core/lib/utils/formUtil/index.js\");\nconst processOne_1 = __webpack_require__(/*! ./processOne */ \"../core/lib/process/processOne.js\");\nconst defaultValue_1 = __webpack_require__(/*! ./defaultValue */ \"../core/lib/process/defaultValue/index.js\");\nconst fetch_1 = __webpack_require__(/*! ./fetch */ \"../core/lib/process/fetch/index.js\");\nconst calculation_1 = __webpack_require__(/*! ./calculation */ \"../core/lib/process/calculation/index.js\");\nconst logic_1 = __webpack_require__(/*! ./logic */ \"../core/lib/process/logic/index.js\");\nconst conditions_1 = __webpack_require__(/*! ./conditions */ \"../core/lib/process/conditions/index.js\");\nconst validation_1 = __webpack_require__(/*! ./validation */ \"../core/lib/process/validation/index.js\");\nconst filter_1 = __webpack_require__(/*! ./filter */ \"../core/lib/process/filter/index.js\");\nconst normalize_1 = __webpack_require__(/*! ./normalize */ \"../core/lib/process/normalize/index.js\");\nconst dereference_1 = __webpack_require__(/*! ./dereference */ \"../core/lib/process/dereference/index.js\");\nconst clearHidden_1 = __webpack_require__(/*! ./clearHidden */ \"../core/lib/process/clearHidden/index.js\");\nconst serverOverride_1 = __webpack_require__(/*! ./serverOverride */ \"../core/lib/process/serverOverride/index.js\");\nfunction process(context) {\n return __awaiter(this, void 0, void 0, function* () {\n const { instances, components, data, scope, flat, local, parent, parentPaths } = context;\n yield (0, formUtil_1.eachComponentDataAsync)(components, data, (component, compData, row, path, components, index, parent, paths) => __awaiter(this, void 0, void 0, function* () {\n yield (0, processOne_1.processOne)(Object.assign(Object.assign({}, context), { data: compData, component,\n components,\n path,\n paths,\n row,\n index, instance: instances\n ? instances[component.modelType === 'none' && (paths === null || paths === void 0 ? void 0 : paths.fullPath) ? paths.fullPath : path]\n : undefined, parent }));\n if (flat) {\n return true;\n }\n if (scope.noRecurse) {\n scope.noRecurse = false;\n return true;\n }\n }), false, local, parent, parentPaths, false, (component, compData, row, path, components, index, parent, paths) => __awaiter(this, void 0, void 0, function* () {\n yield (0, processOne_1.postProcessOne)(Object.assign(Object.assign({}, context), { data: compData, component,\n components,\n path,\n paths,\n row,\n index, instance: instances\n ? instances[component.modelType === 'none' && (paths === null || paths === void 0 ? void 0 : paths.fullPath) ? paths.fullPath : path]\n : undefined, parent }));\n }));\n if (scope.filtered) {\n context.data = scope.filtered || {};\n }\n return scope;\n });\n}\nfunction processSync(context) {\n const { instances, components, data, scope, flat, local, parent, parentPaths } = context;\n (0, formUtil_1.eachComponentData)(components, data, (component, compData, row, path, components, index, parent, paths) => {\n (0, processOne_1.processOneSync)(Object.assign(Object.assign({}, context), { data: compData, component,\n components,\n path,\n paths,\n row,\n index, instance: instances\n ? instances[component.modelType === 'none' && (paths === null || paths === void 0 ? void 0 : paths.fullPath) ? paths.fullPath : path]\n : undefined, parent }));\n if (flat) {\n return true;\n }\n if (scope.noRecurse) {\n scope.noRecurse = false;\n return true;\n }\n }, false, local, parent, parentPaths, false, (component, compData, row, path, components, index, parent, paths) => {\n (0, processOne_1.postProcessOneSync)(Object.assign(Object.assign({}, context), { data: compData, component,\n components,\n path,\n paths,\n row,\n index, instance: instances\n ? instances[component.modelType === 'none' && (paths === null || paths === void 0 ? void 0 : paths.fullPath) ? paths.fullPath : path]\n : undefined, parent }));\n });\n if (scope.filtered) {\n context.data = scope.filtered || {};\n }\n return scope;\n}\nexports.ProcessorMap = {\n serverOverride: serverOverride_1.serverOverrideProcessInfo,\n filter: filter_1.filterProcessInfo,\n defaultValue: defaultValue_1.defaultValueProcessInfo,\n serverDefaultValue: defaultValue_1.serverDefaultValueProcessInfo,\n customDefaultValue: defaultValue_1.customDefaultValueProcessInfo,\n calculate: calculation_1.calculateProcessInfo,\n conditions: conditions_1.conditionProcessInfo,\n customConditions: conditions_1.customConditionProcessInfo,\n simpleConditions: conditions_1.simpleConditionProcessInfo,\n normalize: normalize_1.normalizeProcessInfo,\n dereference: dereference_1.dereferenceProcessInfo,\n clearHidden: clearHidden_1.clearHiddenProcessInfo,\n fetch: fetch_1.fetchProcessInfo,\n logic: logic_1.logicProcessInfo,\n validate: validation_1.validateProcessInfo,\n validateCustom: validation_1.validateCustomProcessInfo,\n validateServer: validation_1.validateServerProcessInfo,\n};\nexports.Processors = [\n serverOverride_1.serverOverrideProcessInfo,\n filter_1.filterProcessInfo,\n defaultValue_1.defaultValueProcessInfo,\n normalize_1.normalizeProcessInfo,\n dereference_1.dereferenceProcessInfo,\n fetch_1.fetchProcessInfo,\n calculation_1.calculateProcessInfo,\n conditions_1.conditionProcessInfo,\n logic_1.logicProcessInfo,\n clearHidden_1.clearHiddenProcessInfo,\n validation_1.postValidateProcessInfo,\n];\n// Deprecated: Use Processors instead\nexports.ProcessTargets = {\n submission: [\n serverOverride_1.serverOverrideProcessInfo,\n filter_1.filterProcessInfo,\n defaultValue_1.serverDefaultValueProcessInfo,\n normalize_1.normalizeProcessInfo,\n dereference_1.dereferenceProcessInfo,\n fetch_1.fetchProcessInfo,\n conditions_1.simpleConditionProcessInfo,\n validation_1.validateServerProcessInfo,\n ],\n evaluator: [\n defaultValue_1.customDefaultValueProcessInfo,\n calculation_1.calculateProcessInfo,\n logic_1.logicProcessInfo,\n conditions_1.conditionProcessInfo,\n clearHidden_1.clearHiddenProcessInfo,\n validation_1.validateProcessInfo,\n ],\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/process.js?\n}");
1843
1843
 
1844
1844
  /***/ }),
1845
1845
 
@@ -1854,6 +1854,17 @@ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argumen
1854
1854
 
1855
1855
  /***/ }),
1856
1856
 
1857
+ /***/ "../core/lib/process/serverOverride/index.js":
1858
+ /*!***************************************************!*\
1859
+ !*** ../core/lib/process/serverOverride/index.js ***!
1860
+ \***************************************************/
1861
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1862
+
1863
+ "use strict";
1864
+ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.serverOverrideProcessInfo = exports.serverOverrideProcessSync = exports.serverOverrideProcess = void 0;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst serverOverrideProcess = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.serverOverrideProcessSync)(context);\n});\nexports.serverOverrideProcess = serverOverrideProcess;\nconst serverOverrideProcessSync = (context) => {\n const { component } = context;\n (0, lodash_1.assign)(component, component.serverOverride || {});\n};\nexports.serverOverrideProcessSync = serverOverrideProcessSync;\nexports.serverOverrideProcessInfo = {\n name: 'serverOverride',\n shouldProcess: () => true,\n process: exports.serverOverrideProcess,\n processSync: exports.serverOverrideProcessSync,\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/serverOverride/index.js?\n}");
1865
+
1866
+ /***/ }),
1867
+
1857
1868
  /***/ "../core/lib/process/validation/i18n/en.js":
1858
1869
  /*!*************************************************!*\
1859
1870
  !*** ../core/lib/process/validation/i18n/en.js ***!
@@ -1905,7 +1916,7 @@ eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexp
1905
1916
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1906
1917
 
1907
1918
  "use strict";
1908
- eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.clientRules = void 0;\nconst validateDate_1 = __webpack_require__(/*! ./validateDate */ \"../core/lib/process/validation/rules/validateDate.js\");\nconst validateDay_1 = __webpack_require__(/*! ./validateDay */ \"../core/lib/process/validation/rules/validateDay.js\");\nconst validateEmail_1 = __webpack_require__(/*! ./validateEmail */ \"../core/lib/process/validation/rules/validateEmail.js\");\nconst validateJson_1 = __webpack_require__(/*! ./validateJson */ \"../core/lib/process/validation/rules/validateJson.js\");\nconst validateMask_1 = __webpack_require__(/*! ./validateMask */ \"../core/lib/process/validation/rules/validateMask.js\");\nconst validateMaximumDay_1 = __webpack_require__(/*! ./validateMaximumDay */ \"../core/lib/process/validation/rules/validateMaximumDay.js\");\nconst validateMaximumLength_1 = __webpack_require__(/*! ./validateMaximumLength */ \"../core/lib/process/validation/rules/validateMaximumLength.js\");\nconst validateMaximumSelectedCount_1 = __webpack_require__(/*! ./validateMaximumSelectedCount */ \"../core/lib/process/validation/rules/validateMaximumSelectedCount.js\");\nconst validateMaximumValue_1 = __webpack_require__(/*! ./validateMaximumValue */ \"../core/lib/process/validation/rules/validateMaximumValue.js\");\nconst validateMaximumWords_1 = __webpack_require__(/*! ./validateMaximumWords */ \"../core/lib/process/validation/rules/validateMaximumWords.js\");\nconst validateMaximumYear_1 = __webpack_require__(/*! ./validateMaximumYear */ \"../core/lib/process/validation/rules/validateMaximumYear.js\");\nconst validateMinimumDay_1 = __webpack_require__(/*! ./validateMinimumDay */ \"../core/lib/process/validation/rules/validateMinimumDay.js\");\nconst validateMinimumLength_1 = __webpack_require__(/*! ./validateMinimumLength */ \"../core/lib/process/validation/rules/validateMinimumLength.js\");\nconst validateMinimumSelectedCount_1 = __webpack_require__(/*! ./validateMinimumSelectedCount */ \"../core/lib/process/validation/rules/validateMinimumSelectedCount.js\");\nconst validateMinimumValue_1 = __webpack_require__(/*! ./validateMinimumValue */ \"../core/lib/process/validation/rules/validateMinimumValue.js\");\nconst validateMinimumWords_1 = __webpack_require__(/*! ./validateMinimumWords */ \"../core/lib/process/validation/rules/validateMinimumWords.js\");\nconst validateMinimumYear_1 = __webpack_require__(/*! ./validateMinimumYear */ \"../core/lib/process/validation/rules/validateMinimumYear.js\");\nconst validateMultiple_1 = __webpack_require__(/*! ./validateMultiple */ \"../core/lib/process/validation/rules/validateMultiple.js\");\nconst validateRegexPattern_1 = __webpack_require__(/*! ./validateRegexPattern */ \"../core/lib/process/validation/rules/validateRegexPattern.js\");\nconst validateRequired_1 = __webpack_require__(/*! ./validateRequired */ \"../core/lib/process/validation/rules/validateRequired.js\");\nconst validateRequiredDay_1 = __webpack_require__(/*! ./validateRequiredDay */ \"../core/lib/process/validation/rules/validateRequiredDay.js\");\nconst validateTime_1 = __webpack_require__(/*! ./validateTime */ \"../core/lib/process/validation/rules/validateTime.js\");\nconst validateUrl_1 = __webpack_require__(/*! ./validateUrl */ \"../core/lib/process/validation/rules/validateUrl.js\");\nconst validateValueProperty_1 = __webpack_require__(/*! ./validateValueProperty */ \"../core/lib/process/validation/rules/validateValueProperty.js\");\nconst validateNumber_1 = __webpack_require__(/*! ./validateNumber */ \"../core/lib/process/validation/rules/validateNumber.js\");\n// These are the validations that are performed in the client.\nexports.clientRules = [\n validateDate_1.validateDateInfo,\n validateDay_1.validateDayInfo,\n validateEmail_1.validateEmailInfo,\n validateJson_1.validateJsonInfo,\n validateMask_1.validateMaskInfo,\n validateMaximumDay_1.validateMaximumDayInfo,\n validateMaximumLength_1.validateMaximumLengthInfo,\n validateMaximumSelectedCount_1.validateMaximumSelectedCountInfo,\n validateMaximumValue_1.validateMaximumValueInfo,\n validateMaximumWords_1.validateMaximumWordsInfo,\n validateMaximumYear_1.validateMaximumYearInfo,\n validateMinimumDay_1.validateMinimumDayInfo,\n validateMinimumLength_1.validateMinimumLengthInfo,\n validateMinimumSelectedCount_1.validateMinimumSelectedCountInfo,\n validateMinimumValue_1.validateMinimumValueInfo,\n validateMinimumWords_1.validateMinimumWordsInfo,\n validateMinimumYear_1.validateMinimumYearInfo,\n validateMultiple_1.validateMultipleInfo,\n validateRegexPattern_1.validateRegexPatternInfo,\n validateRequired_1.validateRequiredInfo,\n validateRequiredDay_1.validateRequiredDayInfo,\n validateTime_1.validateTimeInfo,\n validateUrl_1.validateUrlInfo,\n validateValueProperty_1.validateValuePropertyInfo,\n validateNumber_1.validateNumberInfo,\n];\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/validation/rules/clientRules.js?\n}");
1919
+ eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.clientRules = void 0;\nconst validateDate_1 = __webpack_require__(/*! ./validateDate */ \"../core/lib/process/validation/rules/validateDate.js\");\nconst validateDay_1 = __webpack_require__(/*! ./validateDay */ \"../core/lib/process/validation/rules/validateDay.js\");\nconst validateEmail_1 = __webpack_require__(/*! ./validateEmail */ \"../core/lib/process/validation/rules/validateEmail.js\");\nconst validateJson_1 = __webpack_require__(/*! ./validateJson */ \"../core/lib/process/validation/rules/validateJson.js\");\nconst validateMask_1 = __webpack_require__(/*! ./validateMask */ \"../core/lib/process/validation/rules/validateMask.js\");\nconst validateMaximumDay_1 = __webpack_require__(/*! ./validateMaximumDay */ \"../core/lib/process/validation/rules/validateMaximumDay.js\");\nconst validateMaximumDate_1 = __webpack_require__(/*! ./validateMaximumDate */ \"../core/lib/process/validation/rules/validateMaximumDate.js\");\nconst validateMaximumLength_1 = __webpack_require__(/*! ./validateMaximumLength */ \"../core/lib/process/validation/rules/validateMaximumLength.js\");\nconst validateMaximumSelectedCount_1 = __webpack_require__(/*! ./validateMaximumSelectedCount */ \"../core/lib/process/validation/rules/validateMaximumSelectedCount.js\");\nconst validateMaximumValue_1 = __webpack_require__(/*! ./validateMaximumValue */ \"../core/lib/process/validation/rules/validateMaximumValue.js\");\nconst validateMaximumWords_1 = __webpack_require__(/*! ./validateMaximumWords */ \"../core/lib/process/validation/rules/validateMaximumWords.js\");\nconst validateMaximumYear_1 = __webpack_require__(/*! ./validateMaximumYear */ \"../core/lib/process/validation/rules/validateMaximumYear.js\");\nconst validateMinimumDay_1 = __webpack_require__(/*! ./validateMinimumDay */ \"../core/lib/process/validation/rules/validateMinimumDay.js\");\nconst validateMinimumDate_1 = __webpack_require__(/*! ./validateMinimumDate */ \"../core/lib/process/validation/rules/validateMinimumDate.js\");\nconst validateMinimumLength_1 = __webpack_require__(/*! ./validateMinimumLength */ \"../core/lib/process/validation/rules/validateMinimumLength.js\");\nconst validateMinimumSelectedCount_1 = __webpack_require__(/*! ./validateMinimumSelectedCount */ \"../core/lib/process/validation/rules/validateMinimumSelectedCount.js\");\nconst validateMinimumValue_1 = __webpack_require__(/*! ./validateMinimumValue */ \"../core/lib/process/validation/rules/validateMinimumValue.js\");\nconst validateMinimumWords_1 = __webpack_require__(/*! ./validateMinimumWords */ \"../core/lib/process/validation/rules/validateMinimumWords.js\");\nconst validateMinimumYear_1 = __webpack_require__(/*! ./validateMinimumYear */ \"../core/lib/process/validation/rules/validateMinimumYear.js\");\nconst validateMultiple_1 = __webpack_require__(/*! ./validateMultiple */ \"../core/lib/process/validation/rules/validateMultiple.js\");\nconst validateRegexPattern_1 = __webpack_require__(/*! ./validateRegexPattern */ \"../core/lib/process/validation/rules/validateRegexPattern.js\");\nconst validateRequired_1 = __webpack_require__(/*! ./validateRequired */ \"../core/lib/process/validation/rules/validateRequired.js\");\nconst validateRequiredDay_1 = __webpack_require__(/*! ./validateRequiredDay */ \"../core/lib/process/validation/rules/validateRequiredDay.js\");\nconst validateTime_1 = __webpack_require__(/*! ./validateTime */ \"../core/lib/process/validation/rules/validateTime.js\");\nconst validateUrl_1 = __webpack_require__(/*! ./validateUrl */ \"../core/lib/process/validation/rules/validateUrl.js\");\nconst validateValueProperty_1 = __webpack_require__(/*! ./validateValueProperty */ \"../core/lib/process/validation/rules/validateValueProperty.js\");\nconst validateNumber_1 = __webpack_require__(/*! ./validateNumber */ \"../core/lib/process/validation/rules/validateNumber.js\");\n// These are the validations that are performed in the client.\nexports.clientRules = [\n validateDate_1.validateDateInfo,\n validateDay_1.validateDayInfo,\n validateEmail_1.validateEmailInfo,\n validateJson_1.validateJsonInfo,\n validateMask_1.validateMaskInfo,\n validateMaximumDay_1.validateMaximumDayInfo,\n validateMaximumDate_1.validateMaximumDateInfo,\n validateMaximumLength_1.validateMaximumLengthInfo,\n validateMaximumSelectedCount_1.validateMaximumSelectedCountInfo,\n validateMaximumValue_1.validateMaximumValueInfo,\n validateMaximumWords_1.validateMaximumWordsInfo,\n validateMaximumYear_1.validateMaximumYearInfo,\n validateMinimumDay_1.validateMinimumDayInfo,\n validateMinimumDate_1.validateMinimumDateInfo,\n validateMinimumLength_1.validateMinimumLengthInfo,\n validateMinimumSelectedCount_1.validateMinimumSelectedCountInfo,\n validateMinimumValue_1.validateMinimumValueInfo,\n validateMinimumWords_1.validateMinimumWordsInfo,\n validateMinimumYear_1.validateMinimumYearInfo,\n validateMultiple_1.validateMultipleInfo,\n validateRegexPattern_1.validateRegexPatternInfo,\n validateRequired_1.validateRequiredInfo,\n validateRequiredDay_1.validateRequiredDayInfo,\n validateTime_1.validateTimeInfo,\n validateUrl_1.validateUrlInfo,\n validateValueProperty_1.validateValuePropertyInfo,\n validateNumber_1.validateNumberInfo,\n];\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/validation/rules/clientRules.js?\n}");
1909
1920
 
1910
1921
  /***/ }),
1911
1922
 
@@ -1960,7 +1971,7 @@ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argumen
1960
1971
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
1961
1972
 
1962
1973
  "use strict";
1963
- eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateCustomInfo = exports.validateCustomSync = exports.shouldValidate = exports.validateCustom = void 0;\nconst error_1 = __webpack_require__(/*! ../../../error */ \"../core/lib/error/index.js\");\nconst utils_1 = __webpack_require__(/*! ../../../utils */ \"../core/lib/utils/index.js\");\nconst validateCustom = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.validateCustomSync)(context);\n});\nexports.validateCustom = validateCustom;\nconst shouldValidate = (context) => {\n var _a;\n const { component } = context;\n const customValidation = (_a = component.validate) === null || _a === void 0 ? void 0 : _a.custom;\n if (!customValidation) {\n return false;\n }\n return true;\n};\nexports.shouldValidate = shouldValidate;\nconst validateCustomSync = (context) => {\n var _a;\n const { component, index, instance, value, data, row } = context;\n const customValidation = (_a = component.validate) === null || _a === void 0 ? void 0 : _a.custom;\n try {\n if (!(0, exports.shouldValidate)(context) || !customValidation) {\n return null;\n }\n const validationContext = (instance === null || instance === void 0 ? void 0 : instance.evalContext) ? instance.evalContext() : context;\n // We have to augment some of the evalContext values here if the evalContext comes from the instance\n const isValid = (0, utils_1.evaluate)(customValidation, validationContext, 'valid', true, (context) => {\n context.component = component;\n context.data = data;\n context.row = row;\n context.rowIndex = typeof index === 'number' ? index : validationContext.rowIndex;\n context.instance = instance;\n context.valid = true;\n context.input = value;\n });\n if (isValid === null || isValid === true) {\n return null;\n }\n return new error_1.FieldError(typeof isValid === 'string' ? isValid : 'custom', Object.assign(Object.assign({}, context), { hasLabel: false, setting: customValidation }), 'custom');\n }\n catch (err) {\n throw new error_1.ProcessorError(err.message || err, context, 'validate:validateCustom');\n }\n};\nexports.validateCustomSync = validateCustomSync;\nexports.validateCustomInfo = {\n name: 'validateCustom',\n process: exports.validateCustom,\n processSync: exports.validateCustomSync,\n shouldProcess: exports.shouldValidate,\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/validation/rules/validateCustom.js?\n}");
1974
+ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateCustomInfo = exports.validateCustomSync = exports.shouldValidate = exports.validateCustom = void 0;\nconst error_1 = __webpack_require__(/*! ../../../error */ \"../core/lib/error/index.js\");\nconst utils_1 = __webpack_require__(/*! ../../../utils */ \"../core/lib/utils/index.js\");\nconst validateCustom = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.validateCustomSync)(context);\n});\nexports.validateCustom = validateCustom;\nconst shouldValidate = (context) => {\n var _a;\n const { component } = context;\n const customValidation = (_a = component.validate) === null || _a === void 0 ? void 0 : _a.custom;\n if (!customValidation) {\n return false;\n }\n return true;\n};\nexports.shouldValidate = shouldValidate;\nconst validateCustomSync = (context) => {\n var _a;\n const { component, index, instance, value, data, row } = context;\n const customValidation = (_a = component.validate) === null || _a === void 0 ? void 0 : _a.custom;\n try {\n if (!(0, exports.shouldValidate)(context) || !customValidation) {\n return null;\n }\n const validationContext = (instance === null || instance === void 0 ? void 0 : instance.evalContext) ? instance.evalContext() : context;\n // We have to augment some of the evalContext values here if the evalContext comes from the instance\n const isValid = (0, utils_1.evaluate)(customValidation, validationContext, 'valid', true, (context) => {\n context.component = component;\n context.data = data;\n context.row = row;\n context.rowIndex = typeof index === 'number' ? index : validationContext.rowIndex;\n context.instance = instance;\n context.valid = true;\n context.input = value;\n });\n if (isValid === null || isValid === true || isValid === undefined) {\n return null;\n }\n return new error_1.FieldError(typeof isValid === 'string' ? isValid : 'custom', Object.assign(Object.assign({}, context), { hasLabel: false, setting: customValidation }), 'custom');\n }\n catch (err) {\n throw new error_1.ProcessorError(err.message || err, context, 'validate:validateCustom');\n }\n};\nexports.validateCustomSync = validateCustomSync;\nexports.validateCustomInfo = {\n name: 'validateCustom',\n process: exports.validateCustom,\n processSync: exports.validateCustomSync,\n shouldProcess: exports.shouldValidate,\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/validation/rules/validateCustom.js?\n}");
1964
1975
 
1965
1976
  /***/ }),
1966
1977
 
@@ -2019,6 +2030,17 @@ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argumen
2019
2030
 
2020
2031
  /***/ }),
2021
2032
 
2033
+ /***/ "../core/lib/process/validation/rules/validateMaximumDate.js":
2034
+ /*!*******************************************************************!*\
2035
+ !*** ../core/lib/process/validation/rules/validateMaximumDate.js ***!
2036
+ \*******************************************************************/
2037
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2038
+
2039
+ "use strict";
2040
+ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateMaximumDateInfo = exports.validateMaximumDateSync = exports.validateMaximumDate = exports.shouldValidate = void 0;\nconst error_1 = __webpack_require__(/*! ../../../error */ \"../core/lib/error/index.js\");\nconst date_1 = __webpack_require__(/*! ../../../utils/date */ \"../core/lib/utils/date.js\");\nconst isValidatableDateComponent = (component) => {\n var _a;\n return component && component.type === 'datetime' && ((_a = component.widget) === null || _a === void 0 ? void 0 : _a.hasOwnProperty('maxDate'));\n};\nconst shouldValidate = (context) => {\n var _a;\n const { component, value } = context;\n if (!isValidatableDateComponent(component) || !value) {\n return false;\n }\n if (!(0, date_1.getDateSetting)((_a = component.widget) === null || _a === void 0 ? void 0 : _a.maxDate)) {\n return false;\n }\n return true;\n};\nexports.shouldValidate = shouldValidate;\nconst validateMaximumDate = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.validateMaximumDateSync)(context);\n});\nexports.validateMaximumDate = validateMaximumDate;\nconst validateMaximumDateSync = (context) => {\n var _a;\n const { component, value } = context;\n if (!(0, exports.shouldValidate)(context)) {\n return null;\n }\n if (typeof value !== 'string') {\n throw new error_1.ProcessorError(`Cannot validate day value ${value} because it is not a string`, context, 'validate:validateMaximumDate');\n }\n const date = (0, date_1.dayjs)(value);\n let maxDate = (0, date_1.getDateSetting)((_a = component.widget) === null || _a === void 0 ? void 0 : _a.maxDate);\n if (maxDate === null) {\n return null;\n }\n maxDate = component.enableTime ? (0, date_1.dayjs)(maxDate) : (0, date_1.dayjs)(maxDate).endOf('day');\n const error = new error_1.FieldError('maxDate', Object.assign(Object.assign({}, context), { maxDate: maxDate, setting: String(maxDate) }));\n return date.isBefore(maxDate) || date.isSame(maxDate) ? null : error;\n};\nexports.validateMaximumDateSync = validateMaximumDateSync;\nexports.validateMaximumDateInfo = {\n name: 'validateMaximumDate',\n process: exports.validateMaximumDate,\n processSync: exports.validateMaximumDateSync,\n shouldProcess: exports.shouldValidate,\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/validation/rules/validateMaximumDate.js?\n}");
2041
+
2042
+ /***/ }),
2043
+
2022
2044
  /***/ "../core/lib/process/validation/rules/validateMaximumDay.js":
2023
2045
  /*!******************************************************************!*\
2024
2046
  !*** ../core/lib/process/validation/rules/validateMaximumDay.js ***!
@@ -2085,6 +2107,17 @@ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argumen
2085
2107
 
2086
2108
  /***/ }),
2087
2109
 
2110
+ /***/ "../core/lib/process/validation/rules/validateMinimumDate.js":
2111
+ /*!*******************************************************************!*\
2112
+ !*** ../core/lib/process/validation/rules/validateMinimumDate.js ***!
2113
+ \*******************************************************************/
2114
+ /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2115
+
2116
+ "use strict";
2117
+ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.validateMinimumDateInfo = exports.validateMinimumDateSync = exports.validateMinimumDate = exports.shouldValidate = void 0;\nconst error_1 = __webpack_require__(/*! ../../../error */ \"../core/lib/error/index.js\");\nconst date_1 = __webpack_require__(/*! ../../../utils/date */ \"../core/lib/utils/date.js\");\nconst isValidatableDateComponent = (component) => {\n var _a;\n return component && component.type === 'datetime' && ((_a = component.widget) === null || _a === void 0 ? void 0 : _a.hasOwnProperty('minDate'));\n};\nconst shouldValidate = (context) => {\n var _a;\n const { component, value } = context;\n if (!isValidatableDateComponent(component) || !value) {\n return false;\n }\n if (!(0, date_1.getDateSetting)((_a = component.widget) === null || _a === void 0 ? void 0 : _a.minDate)) {\n return false;\n }\n return true;\n};\nexports.shouldValidate = shouldValidate;\nconst validateMinimumDate = (context) => __awaiter(void 0, void 0, void 0, function* () {\n return (0, exports.validateMinimumDateSync)(context);\n});\nexports.validateMinimumDate = validateMinimumDate;\nconst validateMinimumDateSync = (context) => {\n var _a;\n const { component, value } = context;\n if (!(0, exports.shouldValidate)(context)) {\n return null;\n }\n if (typeof value !== 'string') {\n throw new error_1.ProcessorError(`Cannot validate day value ${value} because it is not a string`, context, 'validate:validateMinimumDate');\n }\n const date = (0, date_1.dayjs)(value);\n let minDate = (0, date_1.getDateSetting)((_a = component.widget) === null || _a === void 0 ? void 0 : _a.minDate);\n if (minDate === null) {\n return null;\n }\n minDate = component.enableTime ? (0, date_1.dayjs)(minDate) : (0, date_1.dayjs)(minDate).startOf('day');\n const error = new error_1.FieldError('minDate', Object.assign(Object.assign({}, context), { minDate: minDate, setting: String(minDate) }));\n return date.isAfter(minDate) || date.isSame(minDate) ? null : error;\n};\nexports.validateMinimumDateSync = validateMinimumDateSync;\nexports.validateMinimumDateInfo = {\n name: 'validateMinimumDate',\n process: exports.validateMinimumDate,\n processSync: exports.validateMinimumDateSync,\n shouldProcess: exports.shouldValidate,\n};\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/validation/rules/validateMinimumDate.js?\n}");
2118
+
2119
+ /***/ }),
2120
+
2088
2121
  /***/ "../core/lib/process/validation/rules/validateMinimumDay.js":
2089
2122
  /*!******************************************************************!*\
2090
2123
  !*** ../core/lib/process/validation/rules/validateMinimumDay.js ***!
@@ -2279,7 +2312,7 @@ eval("{\nvar __awaiter = (this && this.__awaiter) || function (thisArg, _argumen
2279
2312
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2280
2313
 
2281
2314
  "use strict";
2282
- eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.doesArrayDataHaveValue = exports.hasValue = exports.interpolateErrors = void 0;\nexports.isComponentPersistent = isComponentPersistent;\nexports.isComponentProtected = isComponentProtected;\nexports.isEmptyObject = isEmptyObject;\nexports.toBoolean = toBoolean;\nexports.isPromise = isPromise;\nexports.isObject = isObject;\nconst utils_1 = __webpack_require__(/*! ../../utils */ \"../core/lib/utils/index.js\");\nconst i18n_1 = __webpack_require__(/*! ./i18n */ \"../core/lib/process/validation/i18n/index.js\");\nconst isEmpty_1 = __importDefault(__webpack_require__(/*! lodash/isEmpty */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js\"));\nconst isObject_1 = __importDefault(__webpack_require__(/*! lodash/isObject */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js\"));\nconst isPlainObject_1 = __importDefault(__webpack_require__(/*! lodash/isPlainObject */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js\"));\nfunction isComponentPersistent(component) {\n return component.persistent ? component.persistent : true;\n}\nfunction isComponentProtected(component) {\n return component.protected ? component.protected : false;\n}\nfunction isEmptyObject(obj) {\n return !!obj && Object.keys(obj).length === 0 && obj.constructor === Object;\n}\nfunction toBoolean(value) {\n switch (typeof value) {\n case 'string':\n if (value === 'true' || value === '1') {\n return true;\n }\n else if (value === 'false' || value === '0') {\n return false;\n }\n else {\n throw `Cannot coerce string ${value} to boolean}`;\n }\n case 'boolean':\n return value;\n default:\n return !!value;\n }\n}\nfunction isPromise(value) {\n return (value &&\n value.then &&\n typeof value.then === 'function' &&\n Object.prototype.toString.call(value) === '[object Promise]');\n}\nfunction isObject(obj) {\n return obj != null && (typeof obj === 'object' || typeof obj === 'function');\n}\nconst getCustomErrorMessage = ({ errorKeyOrMessage, context }) => { var _a, _b; return ((_b = (_a = context.component) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b[errorKeyOrMessage]) || ''; };\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 = (errors, lang = 'en') => {\n return errors.map((error) => {\n const { errorKeyOrMessage, context } = error;\n const i18n = i18n_1.VALIDATION_ERRORS[lang] || {};\n const toInterpolate = getCustomErrorMessage(error) || i18n[errorKeyOrMessage] || errorKeyOrMessage;\n const paths = [];\n context.path.split('.').forEach((part) => {\n const match = part.match(/\\[([0-9]+)\\]$/);\n if (match) {\n paths.push(part.substring(0, match.index));\n paths.push(parseInt(match[1]));\n }\n else {\n paths.push(part);\n }\n });\n return {\n message: (0, utils_1.unescapeHTML)(utils_1.Evaluator.interpolateString(toInterpolate, context)),\n level: error.level,\n path: paths,\n context: {\n validator: error.ruleName,\n hasLabel: context.hasLabel,\n key: context.component.key,\n label: context.component.label || context.component.placeholder || context.component.key,\n path: context.path,\n value: context.value,\n setting: context.setting,\n index: context.index || 0,\n },\n };\n });\n};\nexports.interpolateErrors = interpolateErrors;\nconst hasValue = (value) => {\n if ((0, isObject_1.default)(value)) {\n return !(0, isEmpty_1.default)(value);\n }\n return (typeof value === 'number' && !Number.isNaN(value)) || !!value;\n};\nexports.hasValue = hasValue;\nconst doesArrayDataHaveValue = (dataValue = []) => {\n if (!Array.isArray(dataValue)) {\n return !!dataValue;\n }\n if (!dataValue.length) {\n return false;\n }\n const isArrayDataComponent = dataValue.every(isPlainObject_1.default);\n if (isArrayDataComponent) {\n return dataValue.some((value) => Object.values(value).some(exports.hasValue));\n }\n return dataValue.some(exports.hasValue);\n};\nexports.doesArrayDataHaveValue = doesArrayDataHaveValue;\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/validation/util.js?\n}");
2315
+ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.doesArrayDataHaveValue = exports.hasValue = exports.interpolateErrors = void 0;\nexports.isComponentPersistent = isComponentPersistent;\nexports.isComponentProtected = isComponentProtected;\nexports.isEmptyObject = isEmptyObject;\nexports.toBoolean = toBoolean;\nexports.isPromise = isPromise;\nexports.keepErrorSettingInSecret = keepErrorSettingInSecret;\nexports.isObject = isObject;\nconst utils_1 = __webpack_require__(/*! ../../utils */ \"../core/lib/utils/index.js\");\nconst i18n_1 = __webpack_require__(/*! ./i18n */ \"../core/lib/process/validation/i18n/index.js\");\nconst isEmpty_1 = __importDefault(__webpack_require__(/*! lodash/isEmpty */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isEmpty.js\"));\nconst isObject_1 = __importDefault(__webpack_require__(/*! lodash/isObject */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isObject.js\"));\nconst isPlainObject_1 = __importDefault(__webpack_require__(/*! lodash/isPlainObject */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/isPlainObject.js\"));\nfunction isComponentPersistent(component) {\n return component.persistent ? component.persistent : true;\n}\nfunction isComponentProtected(component) {\n return component.protected ? component.protected : false;\n}\nfunction isEmptyObject(obj) {\n return !!obj && Object.keys(obj).length === 0 && obj.constructor === Object;\n}\nfunction toBoolean(value) {\n switch (typeof value) {\n case 'string':\n if (value === 'true' || value === '1') {\n return true;\n }\n else if (value === 'false' || value === '0') {\n return false;\n }\n else {\n throw `Cannot coerce string ${value} to boolean}`;\n }\n case 'boolean':\n return value;\n default:\n return !!value;\n }\n}\nfunction isPromise(value) {\n return (value &&\n value.then &&\n typeof value.then === 'function' &&\n Object.prototype.toString.call(value) === '[object Promise]');\n}\nfunction keepErrorSettingInSecret(rule, component) {\n var _a;\n return rule === 'custom' && !!((_a = component.validate) === null || _a === void 0 ? void 0 : _a.customPrivate);\n}\nfunction isObject(obj) {\n return obj != null && (typeof obj === 'object' || typeof obj === 'function');\n}\nconst getCustomErrorMessage = ({ errorKeyOrMessage, context }) => { var _a, _b; return ((_b = (_a = context.component) === null || _a === void 0 ? void 0 : _a.errors) === null || _b === void 0 ? void 0 : _b[errorKeyOrMessage]) || ''; };\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 = (errors, lang = 'en') => {\n return errors.map((error) => {\n const { errorKeyOrMessage, context } = error;\n const i18n = i18n_1.VALIDATION_ERRORS[lang] || {};\n const toInterpolate = getCustomErrorMessage(error) || i18n[errorKeyOrMessage] || errorKeyOrMessage;\n const paths = [];\n context.path.split('.').forEach((part) => {\n const match = part.match(/\\[([0-9]+)\\]$/);\n if (match) {\n paths.push(part.substring(0, match.index));\n paths.push(parseInt(match[1]));\n }\n else {\n paths.push(part);\n }\n });\n return {\n message: (0, utils_1.unescapeHTML)(utils_1.Evaluator.interpolateString(toInterpolate, context)),\n level: error.level,\n path: paths,\n context: {\n validator: error.ruleName,\n hasLabel: context.hasLabel,\n key: context.component.key,\n label: context.component.label || context.component.placeholder || context.component.key,\n path: context.path,\n value: context.value,\n setting: keepErrorSettingInSecret(error.ruleName, context.component) ? '' : context.setting,\n index: context.index || 0,\n },\n };\n });\n};\nexports.interpolateErrors = interpolateErrors;\nconst hasValue = (value) => {\n if ((0, isObject_1.default)(value)) {\n return !(0, isEmpty_1.default)(value);\n }\n return (typeof value === 'number' && !Number.isNaN(value)) || !!value;\n};\nexports.hasValue = hasValue;\nconst doesArrayDataHaveValue = (dataValue = []) => {\n if (!Array.isArray(dataValue)) {\n return !!dataValue;\n }\n if (!dataValue.length) {\n return false;\n }\n const isArrayDataComponent = dataValue.every(isPlainObject_1.default);\n if (isArrayDataComponent) {\n return dataValue.some((value) => Object.values(value).some(exports.hasValue));\n }\n return dataValue.some(exports.hasValue);\n};\nexports.doesArrayDataHaveValue = doesArrayDataHaveValue;\n\n\n//# sourceURL=webpack://Formio/../core/lib/process/validation/util.js?\n}");
2283
2316
 
2284
2317
  /***/ }),
2285
2318
 
@@ -2895,7 +2928,7 @@ eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexp
2895
2928
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
2896
2929
 
2897
2930
  "use strict";
2898
- eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isSimpleConditional = exports.isLegacyConditional = exports.isJSONConditional = void 0;\nexports.conditionallyHidden = conditionallyHidden;\nexports.checkCustomConditional = checkCustomConditional;\nexports.checkLegacyConditional = checkLegacyConditional;\nexports.checkJsonConditional = checkJsonConditional;\nexports.convertShowToBoolean = convertShowToBoolean;\nexports.checkSimpleConditional = checkSimpleConditional;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ./formUtil */ \"../core/lib/utils/formUtil/index.js\");\nconst operators_1 = __importDefault(__webpack_require__(/*! ./operators */ \"../core/lib/utils/operators/index.js\"));\nconst utils_1 = __webpack_require__(/*! ./utils */ \"../core/lib/utils/utils.js\");\nconst isJSONConditional = (conditional) => {\n return conditional && conditional.json && (0, lodash_1.isObject)(conditional.json);\n};\nexports.isJSONConditional = isJSONConditional;\nconst isLegacyConditional = (conditional) => {\n return conditional && conditional.when;\n};\nexports.isLegacyConditional = isLegacyConditional;\nconst isSimpleConditional = (conditional) => {\n return conditional && conditional.conjunction && conditional.conditions;\n};\nexports.isSimpleConditional = isSimpleConditional;\nfunction conditionallyHidden(context) {\n const { scope, path } = context;\n if (scope.conditionals && path) {\n const hidden = (0, lodash_1.find)(scope.conditionals, (conditional) => {\n return conditional.path === path;\n });\n return hidden === null || hidden === void 0 ? void 0 : hidden.conditionallyHidden;\n }\n return false;\n}\n/**\n * Check custom javascript conditional.\n *\n * @param component\n * @param custom\n * @param row\n * @param data\n * @returns {*}\n */\nfunction checkCustomConditional(condition, context, variable = 'show') {\n if (!condition) {\n return null;\n }\n const value = (0, utils_1.evaluate)(condition, context, variable);\n if (value === null) {\n return null;\n }\n return value;\n}\n/**\n * Checks the legacy conditionals.\n *\n * @param conditional\n * @param context\n * @param checkDefault\n * @returns\n */\nfunction checkLegacyConditional(conditional, context) {\n const { data, form, paths, local } = context;\n if (!conditional || !(0, exports.isLegacyConditional)(conditional) || !conditional.when) {\n return null;\n }\n const value = (0, formUtil_1.getComponentValue)(form, data, conditional.when, paths === null || paths === void 0 ? void 0 : paths.dataIndex, local);\n const eq = String(conditional.eq);\n const show = String(conditional.show);\n if ((0, lodash_1.isObject)(value) && (0, lodash_1.has)(value, eq)) {\n return String(value[eq]) === show;\n }\n if (Array.isArray(value) && value.map(String).includes(eq)) {\n return show === 'true';\n }\n return (String(value) === eq) === (show === 'true');\n}\n/**\n * Checks the JSON Conditionals.\n * @param conditional\n * @param context\n * @returns\n */\nfunction checkJsonConditional(conditional, context) {\n if (!conditional || !(0, exports.isJSONConditional)(conditional)) {\n return null;\n }\n return (0, utils_1.evaluate)(conditional.json, context);\n}\n/**\n * Convert the 'show' property of simple conditional to boolean\n * @param show\n * @returns {boolean}\n */\nfunction convertShowToBoolean(show) {\n let shouldShow = show;\n if ((0, lodash_1.isString)(show)) {\n try {\n shouldShow = JSON.parse(show);\n }\n catch (e) {\n console.log(e);\n shouldShow = show;\n }\n }\n return !!shouldShow;\n}\n/**\n * Checks the simple conditionals.\n * @param conditional\n * @param context\n * @returns\n */\nfunction checkSimpleConditional(conditional, context) {\n const { component, data, instance, form, paths, local } = context;\n if (!conditional || !(0, exports.isSimpleConditional)(conditional)) {\n return null;\n }\n const { conditions = [], conjunction = 'all', show = true } = conditional;\n if (!conditions.length) {\n return null;\n }\n const conditionsResult = (0, lodash_1.filter)((0, lodash_1.map)(conditions, (cond) => {\n const { operator } = cond;\n const { value: comparedValue, component: conditionComponentPath } = cond;\n if (!conditionComponentPath) {\n // Ignore conditions if there is no component path.\n return null;\n }\n const formComponents = (form === null || form === void 0 ? void 0 : form.components) || [];\n const conditionComponent = (0, formUtil_1.getComponent)(formComponents, conditionComponentPath, true, paths === null || paths === void 0 ? void 0 : paths.dataIndex);\n const value = conditionComponent\n ? (0, formUtil_1.getComponentValue)(form, data, conditionComponentPath, paths === null || paths === void 0 ? void 0 : paths.dataIndex, local)\n : null;\n const ConditionOperator = operators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({\n value,\n comparedValue,\n instance,\n component,\n conditionComponent,\n conditionComponentPath,\n data,\n })\n : true;\n }), (res) => res !== null);\n let result = false;\n switch (conjunction) {\n case 'any':\n result = (0, lodash_1.some)(conditionsResult, (res) => !!res);\n break;\n default:\n result = (0, lodash_1.every)(conditionsResult, (res) => !!res);\n }\n return convertShowToBoolean(show) ? result : !result;\n}\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/conditions.js?\n}");
2931
+ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.isSimpleConditional = exports.isLegacyConditional = exports.isJSONConditional = void 0;\nexports.conditionallyHidden = conditionallyHidden;\nexports.checkCustomConditional = checkCustomConditional;\nexports.checkLegacyConditional = checkLegacyConditional;\nexports.checkJsonConditional = checkJsonConditional;\nexports.convertShowToBoolean = convertShowToBoolean;\nexports.checkSimpleConditional = checkSimpleConditional;\nconst lodash_1 = __webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\");\nconst formUtil_1 = __webpack_require__(/*! ./formUtil */ \"../core/lib/utils/formUtil/index.js\");\nconst operators_1 = __importDefault(__webpack_require__(/*! ./operators */ \"../core/lib/utils/operators/index.js\"));\nconst utils_1 = __webpack_require__(/*! ./utils */ \"../core/lib/utils/utils.js\");\nconst isJSONConditional = (conditional) => {\n return conditional && conditional.json && (0, lodash_1.isObject)(conditional.json);\n};\nexports.isJSONConditional = isJSONConditional;\nconst isLegacyConditional = (conditional) => {\n return conditional && conditional.when;\n};\nexports.isLegacyConditional = isLegacyConditional;\nconst isSimpleConditional = (conditional) => {\n return conditional && conditional.conjunction && conditional.conditions;\n};\nexports.isSimpleConditional = isSimpleConditional;\nfunction conditionallyHidden(context) {\n const { scope, path } = context;\n if (scope.conditionals && path) {\n const hidden = (0, lodash_1.find)(scope.conditionals, (conditional) => {\n return conditional.path === path;\n });\n return hidden === null || hidden === void 0 ? void 0 : hidden.conditionallyHidden;\n }\n return false;\n}\n/**\n * Check custom javascript conditional.\n *\n * @param component\n * @param custom\n * @param row\n * @param data\n * @returns {*}\n */\nfunction checkCustomConditional(condition, context, variable = 'show') {\n if (!condition) {\n return null;\n }\n let value;\n if (typeof condition === 'function') {\n value = (0, utils_1.evaluate)(condition, context, variable);\n }\n else {\n // For reverse compatability... if \"show\" is never set, then it should be shown. This\n // comes from the following legacy behavior\n // https://github.com/formio/formio.js/blob/973b214ec6bf23d8679d0f5007b3522528abd36d/src/utils/utils.js#L311C33-L311C37\n value = (0, utils_1.evaluate)(`${variable} = true; ${condition};`, context, variable);\n }\n if (value === null) {\n return null;\n }\n return value;\n}\n/**\n * Checks the legacy conditionals.\n *\n * @param conditional\n * @param context\n * @param checkDefault\n * @returns\n */\nfunction checkLegacyConditional(conditional, context) {\n const { data, form, paths, local } = context;\n if (!conditional || !(0, exports.isLegacyConditional)(conditional) || !conditional.when) {\n return null;\n }\n const value = (0, formUtil_1.getComponentValue)(form, data, conditional.when, paths === null || paths === void 0 ? void 0 : paths.dataIndex, local);\n const eq = String(conditional.eq);\n const show = String(conditional.show);\n if ((0, lodash_1.isObject)(value) && (0, lodash_1.has)(value, eq)) {\n return String(value[eq]) === show;\n }\n if (Array.isArray(value) && value.map(String).includes(eq)) {\n return show === 'true';\n }\n return (String(value) === eq) === (show === 'true');\n}\n/**\n * Checks the JSON Conditionals.\n * @param conditional\n * @param context\n * @returns\n */\nfunction checkJsonConditional(conditional, context) {\n if (!conditional || !(0, exports.isJSONConditional)(conditional)) {\n return null;\n }\n return (0, utils_1.evaluate)(conditional.json, context);\n}\n/**\n * Convert the 'show' property of simple conditional to boolean\n * @param show\n * @returns {boolean}\n */\nfunction convertShowToBoolean(show) {\n let shouldShow = show;\n if ((0, lodash_1.isString)(show)) {\n try {\n shouldShow = JSON.parse(show);\n }\n catch (e) {\n console.log(e);\n shouldShow = show;\n }\n }\n return !!shouldShow;\n}\n/**\n * Checks the simple conditionals.\n * @param conditional\n * @param context\n * @returns\n */\nfunction checkSimpleConditional(conditional, context) {\n const { component, data, instance, form, paths, local } = context;\n if (!conditional || !(0, exports.isSimpleConditional)(conditional)) {\n return null;\n }\n const { conditions = [], conjunction = 'all', show = true } = conditional;\n if (!conditions.length) {\n return null;\n }\n const conditionsResult = (0, lodash_1.filter)((0, lodash_1.map)(conditions, (cond) => {\n const { operator } = cond;\n const { value: comparedValue, component: conditionComponentPath } = cond;\n if (!conditionComponentPath) {\n // Ignore conditions if there is no component path.\n return null;\n }\n const formComponents = (form === null || form === void 0 ? void 0 : form.components) || [];\n const conditionComponent = (0, formUtil_1.getComponent)(formComponents, conditionComponentPath, true, paths === null || paths === void 0 ? void 0 : paths.dataIndex);\n const value = conditionComponent\n ? (0, formUtil_1.getComponentValue)(form, data, conditionComponentPath, paths === null || paths === void 0 ? void 0 : paths.dataIndex, local)\n : null;\n const ConditionOperator = operators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({\n value,\n comparedValue,\n instance,\n component,\n conditionComponent,\n conditionComponentPath,\n data,\n })\n : true;\n }), (res) => res !== null);\n let result = false;\n switch (conjunction) {\n case 'any':\n result = (0, lodash_1.some)(conditionsResult, (res) => !!res);\n break;\n default:\n result = (0, lodash_1.every)(conditionsResult, (res) => !!res);\n }\n return convertShowToBoolean(show) ? result : !result;\n}\n\n\n//# sourceURL=webpack://Formio/../core/lib/utils/conditions.js?\n}");
2899
2932
 
2900
2933
  /***/ }),
2901
2934
 
@@ -3368,7 +3401,7 @@ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod)
3368
3401
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3369
3402
 
3370
3403
  "use strict";
3371
- eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\n/* eslint-disable no-unused-vars */\nclass ConditionOperator {\n static get operatorKey() {\n return '';\n }\n static get displayedName() {\n return '';\n }\n static get requireValue() {\n return true;\n }\n execute(options) {\n return true;\n }\n getResult(options = {}) {\n const { value } = options;\n if (lodash_1.default.isArray(value)) {\n return lodash_1.default.some(value, valueItem => this.execute(Object.assign(Object.assign({}, options), { value: valueItem })));\n }\n return this.execute(options);\n }\n}\nexports[\"default\"] = ConditionOperator;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/ConditionOperator.js?\n}");
3404
+ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\n/* eslint-disable no-unused-vars */\nclass ConditionOperator {\n static get operatorKey() {\n return '';\n }\n static get displayedName() {\n return '';\n }\n static get requireValue() {\n return true;\n }\n execute(options) {\n return true;\n }\n getResult(options = {}) {\n const { value } = options;\n if (lodash_1.default.isArray(value)) {\n return lodash_1.default.some(value, (valueItem) => this.execute(Object.assign(Object.assign({}, options), { value: valueItem })));\n }\n return this.execute(options);\n }\n}\nexports[\"default\"] = ConditionOperator;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/ConditionOperator.js?\n}");
3372
3405
 
3373
3406
  /***/ }),
3374
3407
 
@@ -3379,7 +3412,7 @@ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod)
3379
3412
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3380
3413
 
3381
3414
  "use strict";
3382
- eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst ConditionOperator_1 = __importDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/cjs/utils/conditionOperators/ConditionOperator.js\"));\nconst moment_1 = __importDefault(__webpack_require__(/*! moment */ \"../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/moment.js\"));\nclass DateGeaterThan extends ConditionOperator_1.default {\n static get operatorKey() {\n return 'dateGreaterThan';\n }\n static get displayedName() {\n return 'Greater Than';\n }\n getFormattedDates({ value, comparedValue, conditionTriggerComponent }) {\n const hasValidationFormat = conditionTriggerComponent ? conditionTriggerComponent.getValidationFormat : null;\n const date = hasValidationFormat ? (0, moment_1.default)(value, conditionTriggerComponent.getValidationFormat()) : (0, moment_1.default)(value);\n const comparedDate = hasValidationFormat ? (0, moment_1.default)(comparedValue, conditionTriggerComponent.getValidationFormat()) : (0, moment_1.default)(comparedValue);\n return { date, comparedDate };\n }\n execute(options, functionName = 'isAfter') {\n var _a;\n const { value, instance, path } = options;\n if (!value) {\n return false;\n }\n let conditionTriggerComponent = null;\n if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {\n conditionTriggerComponent = instance.root.getComponent(path);\n }\n if (conditionTriggerComponent && conditionTriggerComponent.isPartialDay && conditionTriggerComponent.isPartialDay(value)) {\n return false;\n }\n const { date, comparedDate } = this.getFormattedDates(Object.assign(Object.assign({}, options), { conditionTriggerComponent }));\n return date[functionName](comparedDate);\n }\n}\nexports[\"default\"] = DateGeaterThan;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/DateGreaterThan.js?\n}");
3415
+ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst ConditionOperator_1 = __importDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/cjs/utils/conditionOperators/ConditionOperator.js\"));\nconst moment_1 = __importDefault(__webpack_require__(/*! moment */ \"../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/moment.js\"));\nclass DateGeaterThan extends ConditionOperator_1.default {\n static get operatorKey() {\n return 'dateGreaterThan';\n }\n static get displayedName() {\n return 'Greater Than';\n }\n getFormattedDates({ value, comparedValue, conditionTriggerComponent }) {\n const hasValidationFormat = conditionTriggerComponent\n ? conditionTriggerComponent.getValidationFormat\n : null;\n const date = hasValidationFormat\n ? (0, moment_1.default)(value, conditionTriggerComponent.getValidationFormat())\n : (0, moment_1.default)(value);\n const comparedDate = hasValidationFormat\n ? (0, moment_1.default)(comparedValue, conditionTriggerComponent.getValidationFormat())\n : (0, moment_1.default)(comparedValue);\n return { date, comparedDate };\n }\n execute(options, functionName = 'isAfter') {\n var _a;\n const { value, instance, path } = options;\n if (!value) {\n return false;\n }\n let conditionTriggerComponent = null;\n if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {\n conditionTriggerComponent = instance.root.getComponent(path);\n }\n if (conditionTriggerComponent &&\n conditionTriggerComponent.isPartialDay &&\n conditionTriggerComponent.isPartialDay(value)) {\n return false;\n }\n const { date, comparedDate } = this.getFormattedDates(Object.assign(Object.assign({}, options), { conditionTriggerComponent }));\n return date[functionName](comparedDate);\n }\n}\nexports[\"default\"] = DateGeaterThan;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/DateGreaterThan.js?\n}");
3383
3416
 
3384
3417
  /***/ }),
3385
3418
 
@@ -3478,7 +3511,7 @@ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod)
3478
3511
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3479
3512
 
3480
3513
  "use strict";
3481
- eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst ConditionOperator_1 = __importDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/cjs/utils/conditionOperators/ConditionOperator.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\nclass IsEmptyValue extends ConditionOperator_1.default {\n static get operatorKey() {\n return 'isEmpty';\n }\n static get displayedName() {\n return 'Is Empty';\n }\n static get requireValue() {\n return false;\n }\n execute({ value, instance, path }) {\n var _a;\n const isEmptyValue = lodash_1.default.isEmpty(lodash_1.default.isNumber(value) ? String(value) : value);\n if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {\n const conditionTriggerComponent = instance.root.getComponent(path);\n return (conditionTriggerComponent === null || conditionTriggerComponent === void 0 ? void 0 : conditionTriggerComponent.isEmpty) ? conditionTriggerComponent.isEmpty() : isEmptyValue;\n }\n return isEmptyValue;\n }\n getResult(options) {\n return this.execute(options);\n }\n}\nexports[\"default\"] = IsEmptyValue;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/IsEmptyValue.js?\n}");
3514
+ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst ConditionOperator_1 = __importDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/cjs/utils/conditionOperators/ConditionOperator.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\nclass IsEmptyValue extends ConditionOperator_1.default {\n static get operatorKey() {\n return 'isEmpty';\n }\n static get displayedName() {\n return 'Is Empty';\n }\n static get requireValue() {\n return false;\n }\n execute({ value, instance, path }) {\n var _a;\n const isEmptyValue = lodash_1.default.isEmpty(lodash_1.default.isNumber(value) ? String(value) : value);\n if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {\n const conditionTriggerComponent = instance.root.getComponent(path);\n return (conditionTriggerComponent === null || conditionTriggerComponent === void 0 ? void 0 : conditionTriggerComponent.isEmpty)\n ? conditionTriggerComponent.isEmpty()\n : isEmptyValue;\n }\n return isEmptyValue;\n }\n getResult(options) {\n return this.execute(options);\n }\n}\nexports[\"default\"] = IsEmptyValue;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/IsEmptyValue.js?\n}");
3482
3515
 
3483
3516
  /***/ }),
3484
3517
 
@@ -3489,7 +3522,7 @@ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod)
3489
3522
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3490
3523
 
3491
3524
  "use strict";
3492
- eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst ConditionOperator_1 = __importDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/cjs/utils/conditionOperators/ConditionOperator.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\nconst __1 = __webpack_require__(/*! ../ */ \"./lib/cjs/utils/index.js\");\nclass IsEqualTo extends ConditionOperator_1.default {\n static get operatorKey() {\n return 'isEqual';\n }\n static get displayedName() {\n return 'Is Equal To';\n }\n execute({ value, comparedValue, instance, path }) {\n var _a, _b;\n if ((value || value === false) && comparedValue && typeof value !== typeof comparedValue && lodash_1.default.isString(comparedValue)) {\n try {\n comparedValue = JSON.parse(comparedValue);\n }\n // eslint-disable-next-line no-empty\n catch (e) { }\n }\n if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {\n const conditionTriggerComponent = instance.root.getComponent(path);\n if (conditionTriggerComponent\n && (0, __1.isSelectResourceWithObjectValue)(conditionTriggerComponent.component)\n && ((_b = conditionTriggerComponent.component) === null || _b === void 0 ? void 0 : _b.template)) {\n return (0, __1.compareSelectResourceWithObjectTypeValues)(value, comparedValue, conditionTriggerComponent.component);\n }\n }\n //special check for select boxes\n if (lodash_1.default.isObject(value) && comparedValue && lodash_1.default.isBoolean(value[comparedValue])) {\n return value[comparedValue];\n }\n return lodash_1.default.isEqual(value, comparedValue);\n }\n}\nexports[\"default\"] = IsEqualTo;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/IsEqualTo.js?\n}");
3525
+ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst ConditionOperator_1 = __importDefault(__webpack_require__(/*! ./ConditionOperator */ \"./lib/cjs/utils/conditionOperators/ConditionOperator.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\nconst __1 = __webpack_require__(/*! ../ */ \"./lib/cjs/utils/index.js\");\nclass IsEqualTo extends ConditionOperator_1.default {\n static get operatorKey() {\n return 'isEqual';\n }\n static get displayedName() {\n return 'Is Equal To';\n }\n execute({ value, comparedValue, instance, path }) {\n var _a, _b;\n if ((value || value === false) &&\n comparedValue &&\n typeof value !== typeof comparedValue &&\n lodash_1.default.isString(comparedValue)) {\n try {\n comparedValue = JSON.parse(comparedValue);\n }\n catch (ignoreErr) {\n // ignore\n }\n }\n if ((_a = instance === null || instance === void 0 ? void 0 : instance.root) === null || _a === void 0 ? void 0 : _a.getComponent) {\n const conditionTriggerComponent = instance.root.getComponent(path);\n if (conditionTriggerComponent &&\n (0, __1.isSelectResourceWithObjectValue)(conditionTriggerComponent.component) &&\n ((_b = conditionTriggerComponent.component) === null || _b === void 0 ? void 0 : _b.template)) {\n return (0, __1.compareSelectResourceWithObjectTypeValues)(value, comparedValue, conditionTriggerComponent.component);\n }\n }\n //special check for select boxes\n if (lodash_1.default.isObject(value) && comparedValue && lodash_1.default.isBoolean(value[comparedValue])) {\n return value[comparedValue];\n }\n return lodash_1.default.isEqual(value, comparedValue);\n }\n}\nexports[\"default\"] = IsEqualTo;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/IsEqualTo.js?\n}");
3493
3526
 
3494
3527
  /***/ }),
3495
3528
 
@@ -3577,7 +3610,7 @@ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod)
3577
3610
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3578
3611
 
3579
3612
  "use strict";
3580
- eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst IsNotEqualTo_1 = __importDefault(__webpack_require__(/*! ./IsNotEqualTo */ \"./lib/cjs/utils/conditionOperators/IsNotEqualTo.js\"));\nconst IsEmptyValue_1 = __importDefault(__webpack_require__(/*! ./IsEmptyValue */ \"./lib/cjs/utils/conditionOperators/IsEmptyValue.js\"));\nconst IsNotEmptyValue_1 = __importDefault(__webpack_require__(/*! ./IsNotEmptyValue */ \"./lib/cjs/utils/conditionOperators/IsNotEmptyValue.js\"));\nconst LessThan_1 = __importDefault(__webpack_require__(/*! ./LessThan */ \"./lib/cjs/utils/conditionOperators/LessThan.js\"));\nconst GreaterThan_1 = __importDefault(__webpack_require__(/*! ./GreaterThan */ \"./lib/cjs/utils/conditionOperators/GreaterThan.js\"));\nconst IsEqualTo_1 = __importDefault(__webpack_require__(/*! ./IsEqualTo */ \"./lib/cjs/utils/conditionOperators/IsEqualTo.js\"));\nconst DateGreaterThan_1 = __importDefault(__webpack_require__(/*! ./DateGreaterThan */ \"./lib/cjs/utils/conditionOperators/DateGreaterThan.js\"));\nconst DateLessThan_1 = __importDefault(__webpack_require__(/*! ./DateLessThan */ \"./lib/cjs/utils/conditionOperators/DateLessThan.js\"));\nconst Includes_1 = __importDefault(__webpack_require__(/*! ./Includes */ \"./lib/cjs/utils/conditionOperators/Includes.js\"));\nconst StartsWith_1 = __importDefault(__webpack_require__(/*! ./StartsWith */ \"./lib/cjs/utils/conditionOperators/StartsWith.js\"));\nconst NotIncludes_1 = __importDefault(__webpack_require__(/*! ./NotIncludes */ \"./lib/cjs/utils/conditionOperators/NotIncludes.js\"));\nconst EndsWith_1 = __importDefault(__webpack_require__(/*! ./EndsWith */ \"./lib/cjs/utils/conditionOperators/EndsWith.js\"));\nconst DateGreaterThanOrEqual_1 = __importDefault(__webpack_require__(/*! ./DateGreaterThanOrEqual */ \"./lib/cjs/utils/conditionOperators/DateGreaterThanOrEqual.js\"));\nconst DateLessThanOrEqual_1 = __importDefault(__webpack_require__(/*! ./DateLessThanOrEqual */ \"./lib/cjs/utils/conditionOperators/DateLessThanOrEqual.js\"));\nconst LessThanOrEqual_1 = __importDefault(__webpack_require__(/*! ./LessThanOrEqual */ \"./lib/cjs/utils/conditionOperators/LessThanOrEqual.js\"));\nconst GreaterThanOrEqual_1 = __importDefault(__webpack_require__(/*! ./GreaterThanOrEqual */ \"./lib/cjs/utils/conditionOperators/GreaterThanOrEqual.js\"));\nconst IsDateEqual_1 = __importDefault(__webpack_require__(/*! ./IsDateEqual */ \"./lib/cjs/utils/conditionOperators/IsDateEqual.js\"));\nconst IsNotDateEqual_1 = __importDefault(__webpack_require__(/*! ./IsNotDateEqual */ \"./lib/cjs/utils/conditionOperators/IsNotDateEqual.js\"));\nconst ConditionOperators = {\n [`${IsNotEqualTo_1.default.operatorKey}`]: IsNotEqualTo_1.default,\n [`${IsEqualTo_1.default.operatorKey}`]: IsEqualTo_1.default,\n [`${IsEmptyValue_1.default.operatorKey}`]: IsEmptyValue_1.default,\n [`${IsNotEmptyValue_1.default.operatorKey}`]: IsNotEmptyValue_1.default,\n [`${LessThan_1.default.operatorKey}`]: LessThan_1.default,\n [`${GreaterThan_1.default.operatorKey}`]: GreaterThan_1.default,\n [`${DateGreaterThan_1.default.operatorKey}`]: DateGreaterThan_1.default,\n [`${DateLessThan_1.default.operatorKey}`]: DateLessThan_1.default,\n [`${Includes_1.default.operatorKey}`]: Includes_1.default,\n [`${StartsWith_1.default.operatorKey}`]: StartsWith_1.default,\n [`${EndsWith_1.default.operatorKey}`]: EndsWith_1.default,\n [`${NotIncludes_1.default.operatorKey}`]: NotIncludes_1.default,\n [`${DateGreaterThanOrEqual_1.default.operatorKey}`]: DateGreaterThanOrEqual_1.default,\n [`${DateLessThanOrEqual_1.default.operatorKey}`]: DateLessThanOrEqual_1.default,\n [`${LessThanOrEqual_1.default.operatorKey}`]: LessThanOrEqual_1.default,\n [`${GreaterThanOrEqual_1.default.operatorKey}`]: GreaterThanOrEqual_1.default,\n [`${IsDateEqual_1.default.operatorKey}`]: IsDateEqual_1.default,\n [`${IsNotDateEqual_1.default.operatorKey}`]: IsNotDateEqual_1.default\n};\nexports[\"default\"] = ConditionOperators;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/index.js?\n}");
3613
+ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nconst IsNotEqualTo_1 = __importDefault(__webpack_require__(/*! ./IsNotEqualTo */ \"./lib/cjs/utils/conditionOperators/IsNotEqualTo.js\"));\nconst IsEmptyValue_1 = __importDefault(__webpack_require__(/*! ./IsEmptyValue */ \"./lib/cjs/utils/conditionOperators/IsEmptyValue.js\"));\nconst IsNotEmptyValue_1 = __importDefault(__webpack_require__(/*! ./IsNotEmptyValue */ \"./lib/cjs/utils/conditionOperators/IsNotEmptyValue.js\"));\nconst LessThan_1 = __importDefault(__webpack_require__(/*! ./LessThan */ \"./lib/cjs/utils/conditionOperators/LessThan.js\"));\nconst GreaterThan_1 = __importDefault(__webpack_require__(/*! ./GreaterThan */ \"./lib/cjs/utils/conditionOperators/GreaterThan.js\"));\nconst IsEqualTo_1 = __importDefault(__webpack_require__(/*! ./IsEqualTo */ \"./lib/cjs/utils/conditionOperators/IsEqualTo.js\"));\nconst DateGreaterThan_1 = __importDefault(__webpack_require__(/*! ./DateGreaterThan */ \"./lib/cjs/utils/conditionOperators/DateGreaterThan.js\"));\nconst DateLessThan_1 = __importDefault(__webpack_require__(/*! ./DateLessThan */ \"./lib/cjs/utils/conditionOperators/DateLessThan.js\"));\nconst Includes_1 = __importDefault(__webpack_require__(/*! ./Includes */ \"./lib/cjs/utils/conditionOperators/Includes.js\"));\nconst StartsWith_1 = __importDefault(__webpack_require__(/*! ./StartsWith */ \"./lib/cjs/utils/conditionOperators/StartsWith.js\"));\nconst NotIncludes_1 = __importDefault(__webpack_require__(/*! ./NotIncludes */ \"./lib/cjs/utils/conditionOperators/NotIncludes.js\"));\nconst EndsWith_1 = __importDefault(__webpack_require__(/*! ./EndsWith */ \"./lib/cjs/utils/conditionOperators/EndsWith.js\"));\nconst DateGreaterThanOrEqual_1 = __importDefault(__webpack_require__(/*! ./DateGreaterThanOrEqual */ \"./lib/cjs/utils/conditionOperators/DateGreaterThanOrEqual.js\"));\nconst DateLessThanOrEqual_1 = __importDefault(__webpack_require__(/*! ./DateLessThanOrEqual */ \"./lib/cjs/utils/conditionOperators/DateLessThanOrEqual.js\"));\nconst LessThanOrEqual_1 = __importDefault(__webpack_require__(/*! ./LessThanOrEqual */ \"./lib/cjs/utils/conditionOperators/LessThanOrEqual.js\"));\nconst GreaterThanOrEqual_1 = __importDefault(__webpack_require__(/*! ./GreaterThanOrEqual */ \"./lib/cjs/utils/conditionOperators/GreaterThanOrEqual.js\"));\nconst IsDateEqual_1 = __importDefault(__webpack_require__(/*! ./IsDateEqual */ \"./lib/cjs/utils/conditionOperators/IsDateEqual.js\"));\nconst IsNotDateEqual_1 = __importDefault(__webpack_require__(/*! ./IsNotDateEqual */ \"./lib/cjs/utils/conditionOperators/IsNotDateEqual.js\"));\nconst ConditionOperators = {\n [`${IsNotEqualTo_1.default.operatorKey}`]: IsNotEqualTo_1.default,\n [`${IsEqualTo_1.default.operatorKey}`]: IsEqualTo_1.default,\n [`${IsEmptyValue_1.default.operatorKey}`]: IsEmptyValue_1.default,\n [`${IsNotEmptyValue_1.default.operatorKey}`]: IsNotEmptyValue_1.default,\n [`${LessThan_1.default.operatorKey}`]: LessThan_1.default,\n [`${GreaterThan_1.default.operatorKey}`]: GreaterThan_1.default,\n [`${DateGreaterThan_1.default.operatorKey}`]: DateGreaterThan_1.default,\n [`${DateLessThan_1.default.operatorKey}`]: DateLessThan_1.default,\n [`${Includes_1.default.operatorKey}`]: Includes_1.default,\n [`${StartsWith_1.default.operatorKey}`]: StartsWith_1.default,\n [`${EndsWith_1.default.operatorKey}`]: EndsWith_1.default,\n [`${NotIncludes_1.default.operatorKey}`]: NotIncludes_1.default,\n [`${DateGreaterThanOrEqual_1.default.operatorKey}`]: DateGreaterThanOrEqual_1.default,\n [`${DateLessThanOrEqual_1.default.operatorKey}`]: DateLessThanOrEqual_1.default,\n [`${LessThanOrEqual_1.default.operatorKey}`]: LessThanOrEqual_1.default,\n [`${GreaterThanOrEqual_1.default.operatorKey}`]: GreaterThanOrEqual_1.default,\n [`${IsDateEqual_1.default.operatorKey}`]: IsDateEqual_1.default,\n [`${IsNotDateEqual_1.default.operatorKey}`]: IsNotDateEqual_1.default,\n};\nexports[\"default\"] = ConditionOperators;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/conditionOperators/index.js?\n}");
3581
3614
 
3582
3615
  /***/ }),
3583
3616
 
@@ -3588,7 +3621,7 @@ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod)
3588
3621
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3589
3622
 
3590
3623
  "use strict";
3591
- eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getItemTemplateKeys = exports.compareSelectResourceWithObjectTypeValues = exports.isSelectResourceWithObjectValue = exports.isComponentDataEmpty = exports.getEmptyValue = exports.findComponent = exports.applyFormChanges = exports.generateFormChange = exports.getStrings = exports.getValue = exports.escapeRegExCharacters = exports.formatAsCurrency = exports.parseFloatExt = exports.hasCondition = exports.removeComponent = exports.searchComponents = exports.getComponent = exports.matchComponent = exports.isLayoutComponent = exports.getComponentActualValue = exports.getComponentData = exports.eachComponentAsync = exports.eachComponent = exports.componentInfo = exports.getContextualRowData = exports.getContextualRowPath = exports.getComponentKey = exports.eachComponentData = exports.eachComponentDataAsync = exports.findComponents = exports.getComponentValue = exports.getComponentFromPath = exports.getBestMatch = exports.componentMatches = exports.getComponentPaths = exports.componentPath = exports.isComponentNestedDataType = exports.resetComponentScope = exports.setComponentScope = exports.getComponentPath = exports.getModelType = exports.MODEL_TYPES_OF_KNOWN_COMPONENTS = exports.uniqueName = exports.guid = exports.flattenComponents = void 0;\nconst core_1 = __webpack_require__(/*! @formio/core */ \"../core/lib/index.js\");\nconst { flattenComponents, guid, uniqueName, MODEL_TYPES_OF_KNOWN_COMPONENTS, getModelType, getComponentPath, setComponentScope, resetComponentScope, isComponentNestedDataType, componentPath, getComponentPaths, componentMatches, getBestMatch, getComponentFromPath, getComponentValue, findComponents, eachComponentDataAsync, eachComponentData, getComponentKey, getContextualRowPath, getContextualRowData, componentInfo, eachComponent, eachComponentAsync, getComponentData, getComponentActualValue, isLayoutComponent, matchComponent, getComponent, searchComponents, removeComponent, hasCondition, parseFloatExt, formatAsCurrency, escapeRegExCharacters, getValue, getStrings, generateFormChange, applyFormChanges, findComponent, getEmptyValue, isComponentDataEmpty, isSelectResourceWithObjectValue, compareSelectResourceWithObjectTypeValues, getItemTemplateKeys } = core_1.Utils;\nexports.flattenComponents = flattenComponents;\nexports.guid = guid;\nexports.uniqueName = uniqueName;\nexports.MODEL_TYPES_OF_KNOWN_COMPONENTS = MODEL_TYPES_OF_KNOWN_COMPONENTS;\nexports.getModelType = getModelType;\nexports.getComponentPath = getComponentPath;\nexports.setComponentScope = setComponentScope;\nexports.resetComponentScope = resetComponentScope;\nexports.isComponentNestedDataType = isComponentNestedDataType;\nexports.componentPath = componentPath;\nexports.getComponentPaths = getComponentPaths;\nexports.componentMatches = componentMatches;\nexports.getBestMatch = getBestMatch;\nexports.getComponentFromPath = getComponentFromPath;\nexports.getComponentValue = getComponentValue;\nexports.findComponents = findComponents;\nexports.eachComponentDataAsync = eachComponentDataAsync;\nexports.eachComponentData = eachComponentData;\nexports.getComponentKey = getComponentKey;\nexports.getContextualRowPath = getContextualRowPath;\nexports.getContextualRowData = getContextualRowData;\nexports.componentInfo = componentInfo;\nexports.eachComponent = eachComponent;\nexports.eachComponentAsync = eachComponentAsync;\nexports.getComponentData = getComponentData;\nexports.getComponentActualValue = getComponentActualValue;\nexports.isLayoutComponent = isLayoutComponent;\nexports.matchComponent = matchComponent;\nexports.getComponent = getComponent;\nexports.searchComponents = searchComponents;\nexports.removeComponent = removeComponent;\nexports.hasCondition = hasCondition;\nexports.parseFloatExt = parseFloatExt;\nexports.formatAsCurrency = formatAsCurrency;\nexports.escapeRegExCharacters = escapeRegExCharacters;\nexports.getValue = getValue;\nexports.getStrings = getStrings;\nexports.generateFormChange = generateFormChange;\nexports.applyFormChanges = applyFormChanges;\nexports.findComponent = findComponent;\nexports.getEmptyValue = getEmptyValue;\nexports.isComponentDataEmpty = isComponentDataEmpty;\nexports.isSelectResourceWithObjectValue = isSelectResourceWithObjectValue;\nexports.compareSelectResourceWithObjectTypeValues = compareSelectResourceWithObjectTypeValues;\nexports.getItemTemplateKeys = getItemTemplateKeys;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/formUtils.js?\n}");
3624
+ eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getItemTemplateKeys = exports.compareSelectResourceWithObjectTypeValues = exports.isSelectResourceWithObjectValue = exports.isComponentDataEmpty = exports.getEmptyValue = exports.findComponent = exports.applyFormChanges = exports.generateFormChange = exports.getStrings = exports.getValue = exports.escapeRegExCharacters = exports.formatAsCurrency = exports.parseFloatExt = exports.hasCondition = exports.removeComponent = exports.searchComponents = exports.getComponent = exports.matchComponent = exports.isLayoutComponent = exports.getComponentActualValue = exports.getComponentData = exports.eachComponentAsync = exports.eachComponent = exports.componentInfo = exports.getContextualRowData = exports.getContextualRowPath = exports.getComponentKey = exports.eachComponentData = exports.eachComponentDataAsync = exports.findComponents = exports.getComponentValue = exports.getComponentFromPath = exports.getBestMatch = exports.componentMatches = exports.getComponentPaths = exports.componentPath = exports.isComponentNestedDataType = exports.resetComponentScope = exports.setComponentScope = exports.getComponentPath = exports.getModelType = exports.MODEL_TYPES_OF_KNOWN_COMPONENTS = exports.uniqueName = exports.guid = exports.flattenComponents = void 0;\nconst core_1 = __webpack_require__(/*! @formio/core */ \"../core/lib/index.js\");\nconst { flattenComponents, guid, uniqueName, MODEL_TYPES_OF_KNOWN_COMPONENTS, getModelType, getComponentPath, setComponentScope, resetComponentScope, isComponentNestedDataType, componentPath, getComponentPaths, componentMatches, getBestMatch, getComponentFromPath, getComponentValue, findComponents, eachComponentDataAsync, eachComponentData, getComponentKey, getContextualRowPath, getContextualRowData, componentInfo, eachComponent, eachComponentAsync, getComponentData, getComponentActualValue, isLayoutComponent, matchComponent, getComponent, searchComponents, removeComponent, hasCondition, parseFloatExt, formatAsCurrency, escapeRegExCharacters, getValue, getStrings, generateFormChange, applyFormChanges, findComponent, getEmptyValue, isComponentDataEmpty, isSelectResourceWithObjectValue, compareSelectResourceWithObjectTypeValues, getItemTemplateKeys, } = core_1.Utils;\nexports.flattenComponents = flattenComponents;\nexports.guid = guid;\nexports.uniqueName = uniqueName;\nexports.MODEL_TYPES_OF_KNOWN_COMPONENTS = MODEL_TYPES_OF_KNOWN_COMPONENTS;\nexports.getModelType = getModelType;\nexports.getComponentPath = getComponentPath;\nexports.setComponentScope = setComponentScope;\nexports.resetComponentScope = resetComponentScope;\nexports.isComponentNestedDataType = isComponentNestedDataType;\nexports.componentPath = componentPath;\nexports.getComponentPaths = getComponentPaths;\nexports.componentMatches = componentMatches;\nexports.getBestMatch = getBestMatch;\nexports.getComponentFromPath = getComponentFromPath;\nexports.getComponentValue = getComponentValue;\nexports.findComponents = findComponents;\nexports.eachComponentDataAsync = eachComponentDataAsync;\nexports.eachComponentData = eachComponentData;\nexports.getComponentKey = getComponentKey;\nexports.getContextualRowPath = getContextualRowPath;\nexports.getContextualRowData = getContextualRowData;\nexports.componentInfo = componentInfo;\nexports.eachComponent = eachComponent;\nexports.eachComponentAsync = eachComponentAsync;\nexports.getComponentData = getComponentData;\nexports.getComponentActualValue = getComponentActualValue;\nexports.isLayoutComponent = isLayoutComponent;\nexports.matchComponent = matchComponent;\nexports.getComponent = getComponent;\nexports.searchComponents = searchComponents;\nexports.removeComponent = removeComponent;\nexports.hasCondition = hasCondition;\nexports.parseFloatExt = parseFloatExt;\nexports.formatAsCurrency = formatAsCurrency;\nexports.escapeRegExCharacters = escapeRegExCharacters;\nexports.getValue = getValue;\nexports.getStrings = getStrings;\nexports.generateFormChange = generateFormChange;\nexports.applyFormChanges = applyFormChanges;\nexports.findComponent = findComponent;\nexports.getEmptyValue = getEmptyValue;\nexports.isComponentDataEmpty = isComponentDataEmpty;\nexports.isSelectResourceWithObjectValue = isSelectResourceWithObjectValue;\nexports.compareSelectResourceWithObjectTypeValues = compareSelectResourceWithObjectTypeValues;\nexports.getItemTemplateKeys = getItemTemplateKeys;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/formUtils.js?\n}");
3592
3625
 
3593
3626
  /***/ }),
3594
3627
 
@@ -3599,7 +3632,7 @@ eval("{\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexp
3599
3632
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3600
3633
 
3601
3634
  "use strict";
3602
- 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 __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.DefaultEvaluator = exports.registerEvaluator = exports.Evaluator = exports.Utils = void 0;\nconst utils = __importStar(__webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\"));\nconst formUtils = __importStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"));\nconst Evaluator_1 = __webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\");\nObject.defineProperty(exports, \"Evaluator\", ({ enumerable: true, get: function () { return Evaluator_1.Evaluator; } }));\nObject.defineProperty(exports, \"registerEvaluator\", ({ enumerable: true, get: function () { return Evaluator_1.registerEvaluator; } }));\nObject.defineProperty(exports, \"DefaultEvaluator\", ({ enumerable: true, get: function () { return Evaluator_1.DefaultEvaluator; } }));\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\nconst moment_1 = __importDefault(__webpack_require__(/*! moment */ \"../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/moment.js\"));\nconst FormioUtils = Object.assign(Object.assign(Object.assign({}, utils), formUtils), { Evaluator: Evaluator_1.Evaluator,\n interpolate: Evaluator_1.interpolate,\n ConditionOperators: conditionOperators_1.default,\n _: lodash_1.default,\n moment: moment_1.default });\nexports.Utils = FormioUtils;\nif (typeof __webpack_require__.g === 'object') {\n __webpack_require__.g.FormioUtils = FormioUtils;\n}\n__exportStar(__webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\"), exports);\n__exportStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"), exports);\nexports[\"default\"] = FormioUtils;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/index.js?\n}");
3635
+ 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 __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.DefaultEvaluator = exports.registerEvaluator = exports.Evaluator = exports.Utils = void 0;\nconst utils = __importStar(__webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\"));\nconst formUtils = __importStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"));\nconst Evaluator_1 = __webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\");\nObject.defineProperty(exports, \"Evaluator\", ({ enumerable: true, get: function () { return Evaluator_1.Evaluator; } }));\nObject.defineProperty(exports, \"registerEvaluator\", ({ enumerable: true, get: function () { return Evaluator_1.registerEvaluator; } }));\nObject.defineProperty(exports, \"DefaultEvaluator\", ({ enumerable: true, get: function () { return Evaluator_1.DefaultEvaluator; } }));\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\nconst moment_1 = __importDefault(__webpack_require__(/*! moment */ \"../../node_modules/.pnpm/moment@2.30.1/node_modules/moment/moment.js\"));\nconst FormioUtils = Object.assign(Object.assign(Object.assign({}, utils), formUtils), { Evaluator: Evaluator_1.Evaluator,\n interpolate: Evaluator_1.interpolate,\n ConditionOperators: conditionOperators_1.default,\n _: lodash_1.default,\n moment: moment_1.default });\nexports.Utils = FormioUtils;\nif (typeof globalThis === 'object') {\n globalThis.FormioUtils = FormioUtils;\n}\n__exportStar(__webpack_require__(/*! ./utils */ \"./lib/cjs/utils/utils.js\"), exports);\n__exportStar(__webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\"), exports);\nexports[\"default\"] = FormioUtils;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/index.js?\n}");
3603
3636
 
3604
3637
  /***/ }),
3605
3638
 
@@ -3610,7 +3643,7 @@ eval("{\nvar __createBinding = (this && this.__createBinding) || (Object.create
3610
3643
  /***/ (function(__unused_webpack_module, exports, __webpack_require__) {
3611
3644
 
3612
3645
  "use strict";
3613
- eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getContextComponents = exports.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.removeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getScriptPlugin = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = void 0;\nexports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports.getFocusableElements = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = void 0;\n/* global jQuery */\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\nconst moment_timezone_1 = __importDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"../../node_modules/.pnpm/moment-timezone@0.5.48/node_modules/moment-timezone/moment-timezone.js\"));\nconst jstimezonedetect_1 = __importDefault(__webpack_require__(/*! jstimezonedetect */ \"../../node_modules/.pnpm/jstimezonedetect@1.0.7/node_modules/jstimezonedetect/dist/jstz.min.js\"));\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"../../node_modules/.pnpm/dompurify@3.2.6/node_modules/dompurify/dist/purify.cjs.js\"));\nconst formUtils_1 = __webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst Evaluator_1 = __webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\");\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nconst core_1 = __webpack_require__(/*! @formio/core */ \"../core/lib/index.js\");\n/**\n * Evaluate a method.\n * @param {Function|string|object} func - The function to evaluate.\n * @param {*} args - A map of arguments to pass to the function.\n * @param {string} ret - The name of the \"return\" variable in the script.\n * @param {boolean} interpolate - True if the script should be interpolated before being executed.\n * @param {import('@formio/core').EvaluatorOptions} options - The evaluator options.\n * @returns {*} - The result of the evaluation.\n */\nfunction evaluate(func, args, ret, interpolate, options = {}) {\n return Evaluator_1.Evaluator.evaluate(func, args, ret, interpolate, undefined, options);\n}\nexports.evaluate = evaluate;\n/**\n * Returns a random compoennt ID.\n * @returns {string} - A random component ID.\n */\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 * @param {CSSStyleDeclaration} style - The style element to get the property value from.\n * @param {string} prop - The property to get the value for.\n * @returns {number} - The value of the property.\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 * @param {HTMLElement} element - A DOM element to get the bounding rectangle for.\n * @returns {{x: number, y: number, width: number, height: number}} - The bounding rectangle.\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 * Get non HTMLElement property in the window object\n * @param {string} property - The window property to fetch the script plugin from.\n * @returns {any | undefined} - The HTML Element property on the window object.\n */\nfunction getScriptPlugin(property) {\n const obj = window[property];\n if (typeof HTMLElement === 'object' ? obj instanceof HTMLElement : //DOM2\n obj && typeof obj === 'object' && true && obj.nodeType === 1 && typeof obj.nodeName === 'string') {\n return undefined;\n }\n return obj;\n}\nexports.getScriptPlugin = getScriptPlugin;\n/**\n * Determines the boolean value of a setting.\n * @param {string|boolean} value - A string or boolean value to convert to boolean.\n * @returns {boolean} - The boolean value of the setting.\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 {string} text - The text to check if it is a mongoID.\n * @returns {boolean} - TRUE if the text is a mongoID; FALSE otherwise.\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 * @param {import('@formio/core').Component} component - The component to check for the calculated value.\n * @param {import('@formio/core').Submission} submission - A submission object.\n * @param {*} rowData - The contextual row data for the component.\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 * @param {import('@formio/core').Component} component - The component to check for the conditional.\n * @param {import('@formio/core').SimpleConditional} condition - The condition to check.\n * @param {*} row - The row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The instance of the component.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\n/**\n *\n * @param conditionPaths\n * @param data\n */\nfunction getConditionalPathsRecursive(conditionPaths, data) {\n let currentGlobalIndex = 0;\n const conditionalPathsArray = [];\n const getConditionalPaths = (data, currentPath = '', localIndex = 0) => {\n currentPath = currentPath.replace(/^\\.+|\\.+$/g, '');\n const currentLocalIndex = localIndex;\n const currentData = lodash_1.default.get(data, currentPath);\n if (Array.isArray(currentData) && currentData.filter(Boolean).length > 0) {\n if (currentData.some(element => typeof element !== 'object')) {\n return;\n }\n const hasInnerDataArray = currentData.find(x => Array.isArray(x[conditionPaths[currentLocalIndex]]));\n if (hasInnerDataArray) {\n currentData.forEach((_, indexOutside) => {\n const innerCompDataPath = `${currentPath}[${indexOutside}].${conditionPaths[currentLocalIndex]}`;\n getConditionalPaths(data, innerCompDataPath, currentLocalIndex + 1);\n });\n }\n else {\n currentData.forEach((x, index) => {\n if (!lodash_1.default.isNil(x[conditionPaths[currentLocalIndex]])) {\n const compDataPath = `${currentPath}[${index}].${conditionPaths[currentLocalIndex]}`;\n conditionalPathsArray.push(compDataPath);\n }\n });\n }\n }\n else {\n if (!conditionPaths[currentGlobalIndex]) {\n return;\n }\n currentGlobalIndex = currentGlobalIndex + 1;\n getConditionalPaths(data, `${currentPath}.${conditionPaths[currentGlobalIndex - 1]}`, currentGlobalIndex);\n }\n };\n getConditionalPaths(data);\n return conditionalPathsArray;\n}\n/**\n *\n * @param component\n * @param condition\n * @param row\n * @param data\n * @param instance\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 var _a, _b;\n const { value: comparedValue, operator, component: conditionComponentPath } = cond;\n if (!conditionComponentPath) {\n return true;\n }\n const splittedConditionPath = conditionComponentPath.split('.');\n const conditionalPaths = ((_a = instance === null || instance === void 0 ? void 0 : instance.parent) === null || _a === void 0 ? void 0 : _a.type) === 'datagrid' || ((_b = instance === null || instance === void 0 ? void 0 : instance.parent) === null || _b === void 0 ? void 0 : _b.type) === 'editgrid' ? [] : getConditionalPathsRecursive(splittedConditionPath, data);\n if (conditionalPaths.length > 0) {\n return conditionalPaths.map((path) => {\n const value = getComponentActualValue(path, data, row);\n const ConditionOperator = conditionOperators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({ value, comparedValue, instance, component, path })\n : true;\n });\n }\n else {\n const value = getComponentActualValue(conditionComponentPath, data, row);\n const СonditionOperator = conditionOperators_1.default[operator];\n return СonditionOperator\n ? new СonditionOperator().getResult({ value, comparedValue, instance, component, path: conditionComponentPath })\n : true;\n }\n });\n let result = false;\n switch (conjunction) {\n case 'any':\n result = lodash_1.default.some(conditionsResult.flat(), res => !!res);\n break;\n default:\n result = lodash_1.default.every(conditionsResult.flat(), res => !!res);\n }\n return (0, core_1.convertShowToBoolean)(show) ? result : !result;\n }\n}\nexports.checkSimpleConditional = checkSimpleConditional;\n/**\n * Returns a components normalized value.\n * @param {string} compPath - The full path to the component.\n * @param {*} data - The data object to get the value from.\n * @param {*} row - The contextual row data for the component.\n * @returns {*} - The normalized value of the component.\n */\nfunction getComponentActualValue(compPath, data, row) {\n let value = null;\n if (data) {\n value = (0, formUtils_1.getValue)({ data }, compPath);\n }\n if (row && lodash_1.default.isNil(value)) {\n value = (0, formUtils_1.getValue)({ data: row }, 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 * @param {import('@formio/core').Component} component - The component to check for the conditional.\n * @param {string} custom - The custom conditional string to evaluate.\n * @param {*} row - The row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {string} variable - The variable name for the result of the custom conditional.\n * @param {*} onError - A custom return if there is an error or the value is null from the evaluation.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @returns {*} - The result of the evaulation.\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;\n/**\n * Check a component for JSON conditionals.\n * @param {import('@formio/core').Component} component - The component\n * @param {import('@formio/core').JSONConditional} json - The json conditional to check.\n * @param {*} row - The contextual row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The Form JSON of the form.\n * @param {*} onError - Custom return value if there is an error.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return core_1.jsonLogic.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;\n/**\n * Returns the contextual row data for a component.\n * @param {import('@formio/core').Component} component - The component to get the row data for.\n * @param {*} row - The row data for the component.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @param {*} conditional - The component conditional.\n * @returns {*} - The contextual row data for the component.\n */\nfunction getRow(component, row, instance, conditional) {\n var _a, _b, _c;\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 }\n const dataParent = getDataParentComponent(instance);\n if (dataParent) {\n const parentPath = (_a = dataParent.paths) === null || _a === void 0 ? void 0 : _a.localDataPath;\n const isTriggerCondtionComponentPath = condition.when || !condition.conditions\n ? (_b = condition.when) === null || _b === void 0 ? void 0 : _b.startsWith((_c = dataParent.paths) === null || _c === void 0 ? void 0 : _c.localPath)\n : lodash_1.default.some(condition.conditions, cond => { var _a; return cond.component.startsWith((_a = dataParent.paths) === null || _a === void 0 ? void 0 : _a.localPath); });\n if (isTriggerCondtionComponentPath) {\n const newRow = {};\n lodash_1.default.set(newRow, parentPath, row);\n row = newRow;\n }\n }\n return row;\n}\n/**\n * Checks the conditions for a provided component and data.\n * @param {import('@formio/core').Component} component - The component to check for the condition.\n * @param {*} row - The data within a row\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\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 * @param {import('@formio/core').Component} component - The component to test the trigger against.\n * @param {import('@formio/core').LogicTrigger} trigger - The trigger configuration.\n * @param {import('@formio/core').DataObject} row - The contextual row data.\n * @param {import('@formio/core').DataObject} data - The root data object.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {any} instance - The component that is performing the trigger.\n * @returns {boolean} - TRUE if the trigger should fire; FALSE otherwise.\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;\n/**\n * Sets a property on a component via an executed Logic action.\n * @param {import('@formio/core').Component} component - The component to set the property on.\n * @param {import('@formio/core').LogicAction} action - The action to perform on the component.\n * @param {string} result - The name of the variable in the evaulation to use as the result.\n * @param {import('@formio/core').DataObject} row - The contextual row data.\n * @param {import('@formio/core').DataObject} data - The full submission data.\n * @param {any} instance - The component instance.\n * @returns {import('@formio/core').Component} - The modified component.\n */\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.Evaluator.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 * Removes HTML tags from string e.g. <div>Hello World</div> => Hello World\n * @param {string} str - The string to remove HTML tags from.\n * @returns {string} - The string without HTML tags.\n */\nfunction removeHTML(str) {\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return (doc.body.textContent || '').trim();\n}\nexports.removeHTML = removeHTML;\n/**\n * Unescape HTML characters like &lt, &gt, &amp and etc.\n * @param {string} str - The string to unescape.\n * @returns {string} - The unescaped string.\n */\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n const elem = document.createElement('textarea');\n elem.innerHTML = str;\n return elem.value;\n}\nexports.unescapeHTML = unescapeHTML;\n/**\n * Make HTML element from string\n * @param {string} str - The string to convert to an HTML element.\n * @param {string} selector - The selector to use to get the element once it is created.\n * @returns {HTMLElement} - The HTML element that was created.\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 {string} name - The original name of the file.\n * @param {string} template - The template to use for the unique name.\n * @param {object} evalContext - The context to use for the evaluation.\n * @returns {string} - A unique filename.\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.Evaluator.interpolate(template, evalContext)}${extension}`.replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\nexports.uniqueName = uniqueName;\n/**\n * Returns a GUID\n * @returns {string} - A GUID.\n */\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 * @param {string|Date} date - The date to translate.\n * @returns {(null|Date)} - The translated 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.Evaluator.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;\n/**\n * Returns true if the date is a valid date. False otherwise.\n * @param {Date|string} date - The date to check for validity.\n * @returns {boolean} - TRUE if the date is valid; FALSE otherwise.\n */\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 * @returns {string} - The current timezone.\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 * @param {Date} date - The date to offset.\n * @param {string} timezone - The timezone to offset the date to.\n * @returns {Date} - The offset 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 * @returns {boolean} - TRUE if the zones are loaded; FALSE otherwise.\n */\nfunction zonesLoaded() {\n return moment_timezone_1.default.zonesLoaded;\n}\nexports.zonesLoaded = zonesLoaded;\n/**\n * Returns if we should load the zones.\n * @param {string} timezone - The timezone to check if we should load the zones.\n * @returns {boolean} - TRUE if we should load the zones; FALSE otherwise.\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 * @param {string} url - The URL to load the timezone data from.\n * @param {string} timezone - The timezone to load.\n * @returns {Promise<any> | *} - Resolves when the zones for this timezone are loaded.\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 * @param {string|Date} value - The value to convert into a moment date.\n * @param {string} format - The format to convert the date to.\n * @param {string} timezone - The timezone to convert the date to.\n * @param {object} options - The options object\n * @returns {Date} - The moment date object.\n */\nfunction momentDate(value, format, timezone, options) {\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 || (options === null || options === void 0 ? void 0 : options.email))) {\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 * @param {string} timezonesUrl - The URL to load the timezone data from.\n * @param {string|Date} value - The value to format.\n * @param {string} format - The format to format the date to.\n * @param {string} timezone - The timezone to format the date to.\n * @param {string} flatPickrInputFormat - The format to use for flatpickr input.\n * @returns {string} - The formatted date.\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 * @param {string} timezonesUrl - The URL to load the timezone data from.\n * @param {Function} formatFn - The format function to use.\n * @param {Date|string} date - The date to format.\n * @param {string} format - The format to format the date to.\n * @param {string} timezone - The timezone to format the date to.\n * @returns {string} - The formatted date.\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;\n/**\n * Returns the local date format information.\n * @param {Intl.LocalesArgument} locale - The locale to get the date format for.\n * @returns {object} - The local date format information.\n */\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 {string} format - The format to convert.\n * @returns {string} - The converted format.\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 {string} format - The format to convert.\n * @returns {string} - The converted format.\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 * Convert the format from the angular-datepicker module to mask format.\n * @param {string} format - The format to convert.\n * @returns {string} - The converted format.\n */\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;\n/**\n * Unmasks a value using the provided mask and placeholder characters.\n * @param {string} value - The value to unmask.\n * @param {string} mask - The mask to use for unmasking.\n * @param {string} placeholderChar - The placeholder character to use for unmasking.\n * @returns {string} - The unmasked value.\n */\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;\n/**\n * Returns true if the value matches the input mask format.\n * @param {string} value - The value to check.\n * @param {string} inputMask - The input mask to check against.\n * @returns {boolean} - TRUE if the value matches the input mask; FALSE otherwise.\n */\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;\n/**\n * Returns the number separators (i.e. 1,000) for the provided language.\n * @param {string} lang - The language code to get the number separators for.\n * @returns {{delimiter: string, decimalSeparator: string}} - The number separators.\n */\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;\n/**\n * Returns the number for the maximum amount of decimal places for a number.\n * @param {import('@formio/core').Component} component - The component to check for decimal limits.\n * @param {number} defaultLimit - The default limit to use if none is provided in the component.\n * @returns {number} - The number of decimal places allowed.\n */\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;\n/**\n * Returns the currency affixes for a specific language.\n * @param {object} arg0 - The arguments object.\n * @param {string} arg0.currency - The currency code to get the affixes for.\n * @param {number} arg0.decimalLimit - The number of decimal places to use.\n * @param {string} arg0.decimalSeparator - The decimal separator to use.\n * @param {string} arg0.lang - The language code to use.\n * @returns {{prefix: string, suffix: string}} - The currency affixes.\n */\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 * @param {import('@formio/core').DataObject} data - The data object to fetch the field data from.\n * @param {import('@formio/core').Component} component - The component to fetch the field data for.\n * @returns {*} - The field data.\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 * @param {Function} fn - Function to delay\n * @param {number} delay - Delay time\n * @param {...any} args - Arguments to pass to the function\n * @returns {*} - Function to cancel the delay\n */\nfunction delay(fn, delay = 0, ...args) {\n const timer = setTimeout(fn, delay, ...args);\n /**\n *\n */\n function cancel() {\n clearTimeout(timer);\n }\n /**\n * Execute the function early.\n * @returns {*} - The result of the function.\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 * @param {string} key\n * Modify the component key to be unique.\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 * @param {Record<string, string>} map - The map to check for uniqueness.\n * @param {string} base - The base path of the key.\n * @returns {string} - The unique key.\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 * @param {object} options - The options to check for bootstrap version.\n * @param {string} options.bootstrap - The bootstrap version to use.\n * @returns {number} - The bootstrap version.\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 {Function|any} e - The argument to check if a function and call if so.\n * @returns {any} - Either the result of the function call (e) or e if it is not a function.\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 - The collection to map through unfold.;\n * @returns {T} - The first non-nil value.\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. Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @returns {Functions[]} -- [get, toggle];\n */\nfunction withSwitch(a, b) {\n let state = a;\n let next = b;\n /**\n * Returns the state of the switch.\n * @returns {*} - The current state.\n */\n function get() {\n return state;\n }\n /**\n * Toggles the state of the switch.\n */\n function toggle() {\n const prev = state;\n state = next;\n next = prev;\n }\n return [get, toggle];\n}\nexports.withSwitch = withSwitch;\n/**\n * Create a function that will call the provided function only the provided limit.\n * @param {Function} callback - The callback to call.\n * @param {object} options - The options to use.\n * @param {number} options.limit - The limit to call the callback.\n * @param {number} options.delay - The delay to wait before resetting the call count.\n * @returns {Function} - The function that will call the callback only the provided limit.\n */\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;\n/**\n * Returns the components that are provided within an evaluation context.\n * @param {any} context - The evaluation context to get the components from.\n * @param {boolean} excludeNested - Exclude nested components.\n * @param {Array<string>} excludedTypes - The types of components to exclude.\n * @returns {Array} - The components within the evaluation context.\n */\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;\n/**\n * Returns the button components that are within an evaluation context.\n * @param {any} context - The evaluation context to get the components from.\n * @returns {Array} - The button components within the evaluation context.\n */\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 * @param {HTMLElement} elem - The element to translate.\n * @param {Function} translate - The translation function.\n * @returns {string} - 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.Evaluator.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 * @param {HTMLElement} tag - The tag to translate.\n * @param {Function} translate - The translation function.\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 * @param {string} template - The template to translate.\n * @param {Function} translate - The translation function.\n * @returns {string} - 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 * @param {string} string - The string to sanitize.\n * @param {any} options - The options to use for sanitization.\n * @returns {string} - The sanitized html string.\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 const allowedUriRegex = options.sanitizeConfig.allowedUriRegex;\n sanitizeOptions.ALLOWED_URI_REGEXP = lodash_1.default.isString(allowedUriRegex) ? new RegExp(allowedUriRegex) : 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 * @param {any} obj - The object to perform a fast clone deep against.\n * @returns {any} - The cloned object.\n */\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\n}\nexports.fastCloneDeep = fastCloneDeep;\n/**\n * Returns if the component is an input component.\n * @param {import('@formio/core').Component} componentJson - The JSON of a component.\n * @returns {boolean} - TRUE if the component is an input component; FALSE otherwise.\n */\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;\n/**\n * Takes a component path, and returns a component path array.\n * @param {string} pathStr - The path string to convert to an array.\n * @returns {Array<string>} - The array of paths.\n */\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;\n/**\n * Returns true if the component is a child of the parent.\n * @param {any} child - The child component to check.\n * @param {any} parent - The parent component to check.\n * @returns {boolean} - TRUE if the child is a child of the parent; FALSE otherwise.\n */\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;\n/**\n * Takes an array of component path indexes, and returns a string version of that array.\n * @param {Array<number>} path - The path array to convert to a string.\n * @returns {string} - The string version of the path.\n */\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;\n/**\n * Takes a number and rounds it to the provided precision amount.\n * @param {number} number - The number to round.\n * @param {number} precision - The precision to round the number to.\n * @returns {string} - The rounded number.\n */\nfunction round(number, precision) {\n if (lodash_1.default.isNumber(number)) {\n return number.toFixed(precision);\n }\n return number.toString();\n}\nexports.round = round;\n/**\n * Check for Internet Explorer browser version\n * @returns {(number|null)} - The IE browser version or null if not IE\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 * @returns {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;\n/**\n * Takes a component path, which may include array indicies (i.e. [0][1]), and returns the compoennt path without the indicies.\n * @param {string} path - The path to remove the indicies from.\n * @returns {string} - The path without the indicies.\n */\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 {import('@formio/core').Component} component - Component containing link to its parent's schema in the 'parent' property\n * @returns {string} - Path to the component\n */\nfunction getComponentPath(component) {\n return component.paths.localDataPath;\n}\nexports.getComponentPath = getComponentPath;\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {Component} componentInstance - The component to check for the parent.\n * @returns {Component|undefined} - The parent data component.\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 {any} value - The value to check\n * @returns {boolean} - TRUE if the value is a promise; FALSE otherwise\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 * Returns all the focusable elements within the provided dom element.\n * @param {HTMLElement} element - The element to get the focusable elements from.\n * @returns {NodeList<HTMLElement>} - The focusable elements within the provided element.\n */\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};\n/**\n * Returns the saved types for the component\n * @param {import('@formio/core').Component} fullSchema - The component schema\n * @returns {Array<string>|null} - The saved types for the component\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 {Component} component - The component to interpolate the errors for\n * @param {FieldError[]} errors - The errors to interpolate\n * @param {Function} interpolateFn - The interpolation function\n * @returns {[]} - The interpolated errors\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?\n}");
3646
+ eval("{\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", ({ value: true }));\nexports.getContextComponents = exports.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.removeHTML = exports.setActionProperty = exports.checkTrigger = exports.checkCondition = exports.checkJsonConditional = exports.checkCustomConditional = exports.getComponentActualValue = exports.checkSimpleConditional = exports.checkCalculated = exports.isMongoId = exports.boolValue = exports.getScriptPlugin = exports.getElementRect = exports.getPropertyValue = exports.getRandomComponentId = exports.evaluate = void 0;\nexports.hasEncodedTimezone = exports.interpolateErrors = exports.getComponentSavedTypes = exports.componentValueTypes = exports.getFocusableElements = exports.isPromise = exports.getDataParentComponent = exports.getComponentPath = exports.getComponentPathWithoutIndicies = exports.getBrowserInfo = exports.getIEBrowserVersion = exports.round = exports.getStringFromComponentPath = exports.isChildOf = exports.getArrayFromComponentPath = exports.isInputComponent = exports.fastCloneDeep = exports.sanitize = exports.translateHTMLTemplate = exports.getContextButtons = void 0;\nconst lodash_1 = __importDefault(__webpack_require__(/*! lodash */ \"../../node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js\"));\nconst moment_timezone_1 = __importDefault(__webpack_require__(/*! moment-timezone/moment-timezone */ \"../../node_modules/.pnpm/moment-timezone@0.5.48/node_modules/moment-timezone/moment-timezone.js\"));\nconst jstimezonedetect_1 = __importDefault(__webpack_require__(/*! jstimezonedetect */ \"../../node_modules/.pnpm/jstimezonedetect@1.0.7/node_modules/jstimezonedetect/dist/jstz.min.js\"));\nconst dompurify_1 = __importDefault(__webpack_require__(/*! dompurify */ \"../../node_modules/.pnpm/dompurify@3.2.6/node_modules/dompurify/dist/purify.cjs.js\"));\nconst formUtils_1 = __webpack_require__(/*! ./formUtils */ \"./lib/cjs/utils/formUtils.js\");\nconst Evaluator_1 = __webpack_require__(/*! ./Evaluator */ \"./lib/cjs/utils/Evaluator.js\");\nconst conditionOperators_1 = __importDefault(__webpack_require__(/*! ./conditionOperators */ \"./lib/cjs/utils/conditionOperators/index.js\"));\nconst core_1 = __webpack_require__(/*! @formio/core */ \"../core/lib/index.js\");\n/**\n * Evaluate a method.\n * @param {Function|string|object} func - The function to evaluate.\n * @param {*} args - A map of arguments to pass to the function.\n * @param {string} ret - The name of the \"return\" variable in the script.\n * @param {boolean} interpolate - True if the script should be interpolated before being executed.\n * @param {import('@formio/core').EvaluatorOptions} options - The evaluator options.\n * @returns {*} - The result of the evaluation.\n */\nfunction evaluate(func, args, ret, interpolate, options = {}) {\n return Evaluator_1.Evaluator.evaluate(func, args, ret, interpolate, undefined, options);\n}\nexports.evaluate = evaluate;\n/**\n * Returns a random compoennt ID.\n * @returns {string} - A random component ID.\n */\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 * @param {CSSStyleDeclaration} style - The style element to get the property value from.\n * @param {string} prop - The property to get the value for.\n * @returns {number} - The value of the property.\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 * @param {HTMLElement} element - A DOM element to get the bounding rectangle for.\n * @returns {{x: number, y: number, width: number, height: number}} - The bounding rectangle.\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 * Get non HTMLElement property in the window object\n * @param {string} property - The window property to fetch the script plugin from.\n * @returns {any | undefined} - The HTML Element property on the window object.\n */\nfunction getScriptPlugin(property) {\n const obj = window[property];\n if (typeof HTMLElement === 'object'\n ? obj instanceof HTMLElement //DOM2\n : obj &&\n typeof obj === 'object' &&\n true &&\n obj.nodeType === 1 &&\n typeof obj.nodeName === 'string') {\n return undefined;\n }\n return obj;\n}\nexports.getScriptPlugin = getScriptPlugin;\n/**\n * Determines the boolean value of a setting.\n * @param {string|boolean} value - A string or boolean value to convert to boolean.\n * @returns {boolean} - The boolean value of the setting.\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 {string} text - The text to check if it is a mongoID.\n * @returns {boolean} - TRUE if the text is a mongoID; FALSE otherwise.\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 * @param {import('@formio/core').Component} component - The component to check for the calculated value.\n * @param {import('@formio/core').Submission} submission - A submission object.\n * @param {*} rowData - The contextual row data for the component.\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 * @param {import('@formio/core').Component} component - The component to check for the conditional.\n * @param {import('@formio/core').SimpleConditional} condition - The condition to check.\n * @param {*} row - The row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The instance of the component.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\n/**\n *\n * @param conditionPaths\n * @param data\n */\nfunction getConditionalPathsRecursive(conditionPaths, data) {\n let currentGlobalIndex = 0;\n const conditionalPathsArray = [];\n const getConditionalPaths = (data, currentPath = '', localIndex = 0) => {\n currentPath = currentPath.replace(/^\\.+|\\.+$/g, '');\n const currentLocalIndex = localIndex;\n const currentData = lodash_1.default.get(data, currentPath);\n if (Array.isArray(currentData) && currentData.filter(Boolean).length > 0) {\n if (currentData.some((element) => typeof element !== 'object')) {\n return;\n }\n const hasInnerDataArray = currentData.find((x) => Array.isArray(x[conditionPaths[currentLocalIndex]]));\n if (hasInnerDataArray) {\n currentData.forEach((_, indexOutside) => {\n const innerCompDataPath = `${currentPath}[${indexOutside}].${conditionPaths[currentLocalIndex]}`;\n getConditionalPaths(data, innerCompDataPath, currentLocalIndex + 1);\n });\n }\n else {\n currentData.forEach((x, index) => {\n if (!lodash_1.default.isNil(x[conditionPaths[currentLocalIndex]])) {\n const compDataPath = `${currentPath}[${index}].${conditionPaths[currentLocalIndex]}`;\n conditionalPathsArray.push(compDataPath);\n }\n });\n }\n }\n else {\n if (!conditionPaths[currentGlobalIndex]) {\n return;\n }\n currentGlobalIndex = currentGlobalIndex + 1;\n getConditionalPaths(data, `${currentPath}.${conditionPaths[currentGlobalIndex - 1]}`, currentGlobalIndex);\n }\n };\n getConditionalPaths(data);\n return conditionalPathsArray;\n}\n/**\n *\n * @param component\n * @param condition\n * @param row\n * @param data\n * @param instance\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 splittedConditionPath = conditionComponentPath.split('.');\n const checkParentTypeInTree = (instance, componentType) => {\n if (!(instance === null || instance === void 0 ? void 0 : instance.parent)) {\n return false;\n }\n return ((instance === null || instance === void 0 ? void 0 : instance.parent.type) === componentType ||\n checkParentTypeInTree(instance.parent, componentType));\n };\n const conditionalPaths = checkParentTypeInTree(instance, 'datagrid') || checkParentTypeInTree(instance, 'editgrid')\n ? []\n : getConditionalPathsRecursive(splittedConditionPath, data);\n if (conditionalPaths.length > 0) {\n return conditionalPaths.map((path) => {\n const value = getComponentActualValue(path, data, row);\n const ConditionOperator = conditionOperators_1.default[operator];\n return ConditionOperator\n ? new ConditionOperator().getResult({ value, comparedValue, instance, component, path })\n : true;\n });\n }\n else {\n const value = getComponentActualValue(conditionComponentPath, data, row);\n const СonditionOperator = conditionOperators_1.default[operator];\n return СonditionOperator\n ? new СonditionOperator().getResult({\n value,\n comparedValue,\n instance,\n component,\n path: conditionComponentPath,\n })\n : true;\n }\n });\n let result = false;\n switch (conjunction) {\n case 'any':\n result = lodash_1.default.some(conditionsResult.flat(), (res) => !!res);\n break;\n default:\n result = lodash_1.default.every(conditionsResult.flat(), (res) => !!res);\n }\n return (0, core_1.convertShowToBoolean)(show) ? result : !result;\n }\n}\nexports.checkSimpleConditional = checkSimpleConditional;\n/**\n * Returns a components normalized value.\n * @param {string} compPath - The full path to the component.\n * @param {*} data - The data object to get the value from.\n * @param {*} row - The contextual row data for the component.\n * @returns {*} - The normalized value of the component.\n */\nfunction getComponentActualValue(compPath, data, row) {\n let value = null;\n if (data) {\n value = (0, formUtils_1.getValue)({ data }, compPath);\n }\n if (row && lodash_1.default.isNil(value)) {\n value = (0, formUtils_1.getValue)({ data: row }, 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 * @param {import('@formio/core').Component} component - The component to check for the conditional.\n * @param {string} custom - The custom conditional string to evaluate.\n * @param {*} row - The row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {string} variable - The variable name for the result of the custom conditional.\n * @param {*} onError - A custom return if there is an error or the value is null from the evaluation.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @returns {*} - The result of the evaulation.\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;\n/**\n * Check a component for JSON conditionals.\n * @param {import('@formio/core').Component} component - The component\n * @param {import('@formio/core').JSONConditional} json - The json conditional to check.\n * @param {*} row - The contextual row data for the component.\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The Form JSON of the form.\n * @param {*} onError - Custom return value if there is an error.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\n */\nfunction checkJsonConditional(component, json, row, data, form, onError) {\n try {\n return core_1.jsonLogic.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;\n/**\n * Returns the contextual row data for a component.\n * @param {import('@formio/core').Component} component - The component to get the row data for.\n * @param {*} row - The row data for the component.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @param {*} conditional - The component conditional.\n * @returns {*} - The contextual row data for the component.\n */\nfunction getRow(component, row, instance, conditional) {\n var _a, _b, _c;\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 }\n const dataParent = getDataParentComponent(instance);\n if (dataParent) {\n const parentPath = (_a = dataParent.paths) === null || _a === void 0 ? void 0 : _a.localPath;\n const isTriggerCondtionComponentPath = condition.when || !condition.conditions\n ? (_b = condition.when) === null || _b === void 0 ? void 0 : _b.startsWith((_c = dataParent.paths) === null || _c === void 0 ? void 0 : _c.localPath)\n : lodash_1.default.some(condition.conditions, (cond) => { var _a; return cond.component.startsWith((_a = dataParent.paths) === null || _a === void 0 ? void 0 : _a.localPath); });\n if (isTriggerCondtionComponentPath) {\n const newRow = {};\n lodash_1.default.set(newRow, parentPath, row);\n row = newRow;\n }\n }\n return row;\n}\n/**\n * Checks the conditions for a provided component and data.\n * @param {import('@formio/core').Component} component - The component to check for the condition.\n * @param {*} row - The data within a row\n * @param {*} data - The full submission data.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {import('../../src/components/_classes/component/Component').Component} instance - The component instance.\n * @returns {boolean} - TRUE if the condition is true; FALSE otherwise.\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 &&\n (conditional.when ||\n 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 * @param {import('@formio/core').Component} component - The component to test the trigger against.\n * @param {import('@formio/core').LogicTrigger} trigger - The trigger configuration.\n * @param {import('@formio/core').DataObject} row - The contextual row data.\n * @param {import('@formio/core').DataObject} data - The root data object.\n * @param {import('@formio/core').Form} form - The form object.\n * @param {any} instance - The component that is performing the trigger.\n * @returns {boolean} - TRUE if the trigger should fire; FALSE otherwise.\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;\n/**\n * Sets a property on a component via an executed Logic action.\n * @param {import('@formio/core').Component} component - The component to set the property on.\n * @param {import('@formio/core').LogicAction} action - The action to perform on the component.\n * @param {string} result - The name of the variable in the evaulation to use as the result.\n * @param {import('@formio/core').DataObject} row - The contextual row data.\n * @param {import('@formio/core').DataObject} data - The full submission data.\n * @param {any} instance - The component instance.\n * @returns {import('@formio/core').Component} - The modified component.\n */\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.Evaluator.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 * Removes HTML tags from string e.g. <div>Hello World</div> => Hello World\n * @param {string} str - The string to remove HTML tags from.\n * @returns {string} - The string without HTML tags.\n */\nfunction removeHTML(str) {\n const doc = new window.DOMParser().parseFromString(str, 'text/html');\n return (doc.body.textContent || '').trim();\n}\nexports.removeHTML = removeHTML;\n/**\n * Unescape HTML characters like &lt, &gt, &amp and etc.\n * @param {string} str - The string to unescape.\n * @returns {string} - The unescaped string.\n */\nfunction unescapeHTML(str) {\n if (typeof window === 'undefined' || !('DOMParser' in window)) {\n return str;\n }\n const elem = document.createElement('textarea');\n elem.innerHTML = str;\n return elem.value;\n}\nexports.unescapeHTML = unescapeHTML;\n/**\n * Make HTML element from string\n * @param {string} str - The string to convert to an HTML element.\n * @param {string} selector - The selector to use to get the element once it is created.\n * @returns {HTMLElement} - The HTML element that was created.\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 {string} name - The original name of the file.\n * @param {string} template - The template to use for the unique name.\n * @param {object} evalContext - The context to use for the evaluation.\n * @returns {string} - A unique filename.\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 ? `.${lodash_1.default.last(parts)}` : '';\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.Evaluator.interpolate(template, evalContext)}${extension}`.replace(/[^0-9a-zA-Z.\\-_ ]/g, '-');\n return uniqueName;\n}\nexports.uniqueName = uniqueName;\n/**\n * Returns a GUID\n * @returns {string} - A GUID.\n */\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' ? r : (r & 0x3) | 0x8;\n return v.toString(16);\n });\n}\nexports.guid = guid;\n/**\n * Return a translated date setting.\n * @param {string|Date} date - The date to translate.\n * @returns {(null|Date)} - The translated 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 = evaluate(`value=${date};`, { moment: moment_timezone_1.default }, 'value');\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 (ignoreErr) {\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;\n/**\n * Returns true if the date is a valid date. False otherwise.\n * @param {Date|string} date - The date to check for validity.\n * @returns {boolean} - TRUE if the date is valid; FALSE otherwise.\n */\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 * @returns {string} - The current timezone.\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 * @param {Date} date - The date to offset.\n * @param {string} timezone - The timezone to offset the date to.\n * @returns {Date} - The offset 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 * @returns {boolean} - TRUE if the zones are loaded; FALSE otherwise.\n */\nfunction zonesLoaded() {\n return moment_timezone_1.default.zonesLoaded;\n}\nexports.zonesLoaded = zonesLoaded;\n/**\n * Returns if we should load the zones.\n * @param {string} timezone - The timezone to check if we should load the zones.\n * @returns {boolean} - TRUE if we should load the zones; FALSE otherwise.\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 * @param {string} url - The URL to load the timezone data from.\n * @param {string} timezone - The timezone to load.\n * @returns {Promise<any> | *} - Resolves when the zones for this timezone are loaded.\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).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 * @param {string|Date} value - The value to convert into a moment date.\n * @param {string} format - The format to convert the date to.\n * @param {string} timezone - The timezone to convert the date to.\n * @param {object} options - The options object\n * @returns {Date} - The moment date object.\n */\nfunction momentDate(value, format, timezone, options) {\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)/))) &&\n (moment_timezone_1.default.zonesLoaded || (options === null || options === void 0 ? void 0 : options.email))) {\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 * @param {string} timezonesUrl - The URL to load the timezone data from.\n * @param {string|Date} value - The value to format.\n * @param {string} format - The format to format the date to.\n * @param {string} timezone - The timezone to format the date to.\n * @param {string} flatPickrInputFormat - The format to use for flatpickr input.\n * @returns {string} - The formatted date.\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 * @param {string} timezonesUrl - The URL to load the timezone data from.\n * @param {Function} formatFn - The format function to use.\n * @param {Date|string} date - The date to format.\n * @param {string} format - The format to format the date to.\n * @param {string} timezone - The timezone to format the date to.\n * @returns {string} - The formatted date.\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;\n/**\n * Returns the local date format information.\n * @param {Intl.LocalesArgument} locale - The locale to get the date format for.\n * @returns {object} - The local date format information.\n */\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 {string} format - The format to convert.\n * @returns {string} - The converted format.\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 {string} format - The format to convert.\n * @returns {string} - The converted format.\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 * Convert the format from the angular-datepicker module to mask format.\n * @param {string} format - The format to convert.\n * @returns {string} - The converted format.\n */\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;\n/**\n * Unmasks a value using the provided mask and placeholder characters.\n * @param {string} value - The value to unmask.\n * @param {string} mask - The mask to use for unmasking.\n * @param {string} placeholderChar - The placeholder character to use for unmasking.\n * @returns {string} - The unmasked value.\n */\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;\n/**\n * Returns true if the value matches the input mask format.\n * @param {string} value - The value to check.\n * @param {string} inputMask - The input mask to check against.\n * @returns {boolean} - TRUE if the value matches the input mask; FALSE otherwise.\n */\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;\n/**\n * Returns the number separators (i.e. 1,000) for the provided language.\n * @param {string} lang - The language code to get the number separators for.\n * @returns {{delimiter: string, decimalSeparator: string}} - The number separators.\n */\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;\n/**\n * Returns the number for the maximum amount of decimal places for a number.\n * @param {import('@formio/core').Component} component - The component to check for decimal limits.\n * @param {number} defaultLimit - The default limit to use if none is provided in the component.\n * @returns {number} - The number of decimal places allowed.\n */\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;\n/**\n * Returns the currency affixes for a specific language.\n * @param {object} arg0 - The arguments object.\n * @param {string} arg0.currency - The currency code to get the affixes for.\n * @param {number} arg0.decimalLimit - The number of decimal places to use.\n * @param {string} arg0.decimalSeparator - The decimal separator to use.\n * @param {string} arg0.lang - The language code to use.\n * @returns {{prefix: string, suffix: string}} - The currency affixes.\n */\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)\n .toLocaleString(lang, {\n style: 'currency',\n currency: currency ? currency : 'USD',\n useGrouping: true,\n maximumFractionDigits: decimalLimit || 0,\n minimumFractionDigits: decimalLimit || 0,\n })\n .replace('.', decimalSeparator)\n .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 * @param {import('@formio/core').DataObject} data - The data object to fetch the field data from.\n * @param {import('@formio/core').Component} component - The component to fetch the field data for.\n * @returns {*} - The field data.\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] = [\n value[key],\n ];\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] = [\n data[component.key],\n ];\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 * @param {Function} fn - Function to delay\n * @param {number} delay - Delay time\n * @param {...any} args - Arguments to pass to the function\n * @returns {*} - Function to cancel the delay\n */\nfunction delay(fn, delay = 0, ...args) {\n const timer = setTimeout(fn, delay, ...args);\n /**\n *\n */\n function cancel() {\n clearTimeout(timer);\n }\n /**\n * Execute the function early.\n * @returns {*} - The result of the function.\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 * @param {string} key\n * Modify the component key to be unique.\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 * @param {Record<string, string>} map - The map to check for uniqueness.\n * @param {string} base - The base path of the key.\n * @returns {string} - The unique key.\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 * @param {object} options - The options to check for bootstrap version.\n * @param {string} options.bootstrap - The bootstrap version to use.\n * @returns {number} - The bootstrap version.\n */\nfunction bootstrapVersion(options) {\n if (options.bootstrap) {\n return options.bootstrap;\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 {Function|any} e - The argument to check if a function and call if so.\n * @returns {any} - Either the result of the function call (e) or e if it is not a function.\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 - The collection to map through unfold.;\n * @returns {T} - The first non-nil value.\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. Returns functions to getting and cycling between states.\n * @param {*} a - initial state.\n * @param {*} b - next state.\n * @returns {Functions[]} -- [get, toggle];\n */\nfunction withSwitch(a, b) {\n let state = a;\n let next = b;\n /**\n * Returns the state of the switch.\n * @returns {*} - The current state.\n */\n function get() {\n return state;\n }\n /**\n * Toggles the state of the switch.\n */\n function toggle() {\n const prev = state;\n state = next;\n next = prev;\n }\n return [\n get,\n toggle,\n ];\n}\nexports.withSwitch = withSwitch;\n/**\n * Create a function that will call the provided function only the provided limit.\n * @param {Function} callback - The callback to call.\n * @param {object} options - The options to use.\n * @param {number} options.limit - The limit to call the callback.\n * @param {number} options.delay - The delay to wait before resetting the call count.\n * @returns {Function} - The function that will call the callback only the provided limit.\n */\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;\n/**\n * Returns the components that are provided within an evaluation context.\n * @param {any} context - The evaluation context to get the components from.\n * @param {boolean} excludeNested - Exclude nested components.\n * @param {Array<string>} excludedTypes - The types of components to exclude.\n * @returns {Array} - The components within the evaluation context.\n */\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 &&\n addToContextComponents &&\n !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;\n/**\n * Returns the button components that are within an evaluation context.\n * @param {any} context - The evaluation context to get the components from.\n * @returns {Array} - The button components within the evaluation context.\n */\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 = [\n '#text',\n 'A',\n 'B',\n 'EM',\n 'I',\n 'SMALL',\n 'STRONG',\n 'SUB',\n 'SUP',\n 'INS',\n 'DEL',\n 'MARK',\n 'CODE',\n];\n/**\n * Helper function for 'translateHTMLTemplate'. Translates text value of the passed html element.\n * @param {HTMLElement} elem - The element to translate.\n * @param {Function} translate - The translation function.\n * @returns {string} - Translated element template.\n */\nfunction translateElemValue(elem, translate) {\n if (!elem.innerText) {\n return elem.innerHTML;\n }\n const elemValue = elem.innerText\n .replace(Evaluator_1.Evaluator.templateSettings.interpolate, '')\n .replace(/\\s\\s+/g, ' ')\n .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 * @param {HTMLElement} tag - The tag to translate.\n * @param {Function} translate - The translation function.\n * @returns {void}\n */\nfunction translateDeepTag(tag, translate) {\n const children = tag.children.length && [\n ...tag.children,\n ];\n const shouldTranslateEntireContent = children &&\n children.every((child) => child.children.length === 0 && 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 * @param {string} template - The template to translate.\n * @param {Function} translate - The translation function.\n * @returns {string} - 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 * @param {string} string - The string to sanitize.\n * @param {any} options - The options to use for sanitization.\n * @returns {string} - The sanitized html string.\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: [\n 'ref',\n 'target',\n ],\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 &&\n Array.isArray(options.sanitizeConfig.addAttr) &&\n 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 &&\n Array.isArray(options.sanitizeConfig.addTags) &&\n options.sanitizeConfig.addTags.length > 0) {\n sanitizeOptions.ADD_TAGS = options.sanitizeConfig.addTags;\n }\n // Allow tags\n if (options.sanitizeConfig &&\n Array.isArray(options.sanitizeConfig.allowedTags) &&\n options.sanitizeConfig.allowedTags.length > 0) {\n sanitizeOptions.ALLOWED_TAGS = options.sanitizeConfig.allowedTags;\n }\n // Allow attributes\n if (options.sanitizeConfig &&\n Array.isArray(options.sanitizeConfig.allowedAttrs) &&\n 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 const allowedUriRegex = options.sanitizeConfig.allowedUriRegex;\n sanitizeOptions.ALLOWED_URI_REGEXP = lodash_1.default.isString(allowedUriRegex)\n ? new RegExp(allowedUriRegex)\n : allowedUriRegex;\n }\n // Allow to extend the existing array of elements that are safe for URI-like values\n if (options.sanitizeConfig &&\n Array.isArray(options.sanitizeConfig.addUriSafeAttr) &&\n 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 * @param {any} obj - The object to perform a fast clone deep against.\n * @returns {any} - The cloned object.\n */\nfunction fastCloneDeep(obj) {\n return obj ? JSON.parse(JSON.stringify(obj)) : obj;\n}\nexports.fastCloneDeep = fastCloneDeep;\n/**\n * Returns if the component is an input component.\n * @param {import('@formio/core').Component} componentJson - The JSON of a component.\n * @returns {boolean} - TRUE if the component is an input component; FALSE otherwise.\n */\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;\n/**\n * Takes a component path, and returns a component path array.\n * @param {string} pathStr - The path string to convert to an array.\n * @returns {Array<string>} - The array of paths.\n */\nfunction getArrayFromComponentPath(pathStr) {\n if (!pathStr || !lodash_1.default.isString(pathStr)) {\n if (!lodash_1.default.isArray(pathStr)) {\n return [\n pathStr,\n ];\n }\n return pathStr;\n }\n return pathStr\n .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;\n/**\n * Returns true if the component is a child of the parent.\n * @param {any} child - The child component to check.\n * @param {any} parent - The parent component to check.\n * @returns {boolean} - TRUE if the child is a child of the parent; FALSE otherwise.\n */\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;\n/**\n * Takes an array of component path indexes, and returns a string version of that array.\n * @param {Array<number>} path - The path array to convert to a string.\n * @returns {string} - The string version of the path.\n */\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;\n/**\n * Takes a number and rounds it to the provided precision amount.\n * @param {number} number - The number to round.\n * @param {number} precision - The precision to round the number to.\n * @returns {string} - The rounded number.\n */\nfunction round(number, precision) {\n if (lodash_1.default.isNumber(number)) {\n return number.toFixed(precision);\n }\n return number.toString();\n}\nexports.round = round;\n/**\n * Check for Internet Explorer browser version\n * @returns {(number|null)} - The IE browser version or null if not IE\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 * @returns {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;\n/**\n * Takes a component path, which may include array indicies (i.e. [0][1]), and returns the compoennt path without the indicies.\n * @param {string} path - The path to remove the indicies from.\n * @returns {string} - The path without the indicies.\n */\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 {import('@formio/core').Component} component - Component containing link to its parent's schema in the 'parent' property\n * @returns {string} - Path to the component\n */\nfunction getComponentPath(component) {\n return component.paths.localDataPath;\n}\nexports.getComponentPath = getComponentPath;\n/**\n * Returns a parent component of the passed component instance skipping all the Layout components\n * @param {Component} componentInstance - The component to check for the parent.\n * @returns {Component|undefined} - The parent data component.\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 {any} value - The value to check\n * @returns {boolean} - TRUE if the value is a promise; FALSE otherwise\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 * Returns all the focusable elements within the provided dom element.\n * @param {HTMLElement} element - The element to get the focusable elements from.\n * @returns {NodeList<HTMLElement>} - The focusable elements within the provided element.\n */\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};\n/**\n * Returns the saved types for the component\n * @param {import('@formio/core').Component} fullSchema - The component schema\n * @returns {Array<string>|null} - The saved types for the component\n */\nfunction getComponentSavedTypes(fullSchema) {\n const schema = fullSchema || {};\n if (schema.persistent !== true) {\n return [];\n }\n if (schema.multiple) {\n return [\n exports.componentValueTypes.array,\n ];\n }\n return null;\n}\nexports.getComponentSavedTypes = getComponentSavedTypes;\n/**\n * Interpolates @formio/core errors so that they are compatible with the renderer\n * @param {Component} component - The component to interpolate the errors for\n * @param {FieldError[]} errors - The errors to interpolate\n * @param {Function} interpolateFn - The interpolation function\n * @returns {[]} - The interpolated errors\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]\n ? component.errors[errorKeyOrMessage]\n : errorKeyOrMessage;\n return Object.assign(Object.assign({}, error), { message: unescapeHTML(interpolateFn(toInterpolate, context)), context: Object.assign({}, context) });\n });\n};\nexports.interpolateErrors = interpolateErrors;\n/**\n * Checks if a string has timezone information encoded in it\n * Example: 2024-01-01T00:00:00Z -> true\n * Example: 2024-01-01T00:00:00+03:00 -> true\n * Example: 2011-05-03T00:00:00 -> false\n * @param {string} value the string value to check\n * @returns {boolean} if value has encoded timezone\n */\nfunction hasEncodedTimezone(value) {\n if (typeof value !== 'string') {\n return false;\n }\n return (value.substring(value.length - 1) === 'z' ||\n value.substring(value.length - 1) === 'Z' ||\n value.match(/[+|-][0-9]{2}:[0-9]{2}$/));\n}\nexports.hasEncodedTimezone = hasEncodedTimezone;\n\n\n//# sourceURL=webpack://Formio/./lib/cjs/utils/utils.js?\n}");
3614
3647
 
3615
3648
  /***/ })
3616
3649