@supersoniks/concorde 4.9.98-visual-stack.1 → 4.9.98-visual-stack.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitlab-ci.yml +0 -13
- package/build-infos.json +1 -1
- package/concorde-3d.bundle.js +1 -1
- package/concorde-3d.es.js +2 -2
- package/concorde-core.bundle.js +557 -622
- package/concorde-core.es.js +6025 -5575
- package/concorde-hugging-face-infer.bundle.js +1 -1
- package/concorde-hugging-face-infer.es.js +1 -1
- package/concorde-interactive.bundle.js +1162 -0
- package/concorde-interactive.es.js +10723 -0
- package/concorde-shader.bundle.js +1 -1
- package/concorde-shader.es.js +2 -2
- package/concorde-webgpu.bundle.js +1 -1
- package/concorde-webgpu.es.js +2 -2
- package/dist/concorde-3d.bundle.js +1 -1
- package/dist/concorde-3d.es.js +2 -2
- package/dist/concorde-core.bundle.js +557 -622
- package/dist/concorde-core.es.js +6025 -5575
- package/dist/concorde-hugging-face-infer.bundle.js +1 -1
- package/dist/concorde-hugging-face-infer.es.js +1 -1
- package/dist/concorde-interactive.bundle.js +1162 -0
- package/dist/concorde-interactive.es.js +10723 -0
- package/dist/concorde-shader.bundle.js +1 -1
- package/dist/concorde-shader.es.js +2 -2
- package/dist/concorde-webgpu.bundle.js +1 -1
- package/dist/concorde-webgpu.es.js +2 -2
- package/dist/docs-mock-api-sw.js +5 -1
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/dist/js/addons/interactive.js +6 -0
- package/dist/js/addons/interactive.js.map +1 -0
- package/dist/js/core/components/functional/if/if.js +65 -7
- package/dist/js/core/components/functional/if/if.js.map +1 -1
- package/dist/js/core/components/functional/interactive/action.js +96 -0
- package/dist/js/core/components/functional/interactive/action.js.map +1 -0
- package/dist/js/core/components/functional/interactive/gamepad.js +206 -0
- package/dist/js/core/components/functional/interactive/gamepad.js.map +1 -0
- package/dist/js/core/components/functional/interactive/gesture.js +148 -0
- package/dist/js/core/components/functional/interactive/gesture.js.map +1 -0
- package/dist/js/core/components/functional/interactive/helpers.js +82 -0
- package/dist/js/core/components/functional/interactive/helpers.js.map +1 -0
- package/dist/js/core/components/functional/interactive/index.js +20 -0
- package/dist/js/core/components/functional/interactive/index.js.map +1 -0
- package/dist/js/core/components/functional/interactive/keyboard.js +183 -0
- package/dist/js/core/components/functional/interactive/keyboard.js.map +1 -0
- package/dist/js/core/components/functional/interactive/matrix.js +201 -0
- package/dist/js/core/components/functional/interactive/matrix.js.map +1 -0
- package/dist/js/core/components/functional/interactive/registry.js +28 -0
- package/dist/js/core/components/functional/interactive/registry.js.map +1 -0
- package/dist/js/core/components/functional/interactive/store.js +264 -0
- package/dist/js/core/components/functional/interactive/store.js.map +1 -0
- package/dist/js/core/components/functional/interactive/ticker.js +182 -0
- package/dist/js/core/components/functional/interactive/ticker.js.map +1 -0
- package/dist/js/core/components/functional/value/value.js +49 -4
- package/dist/js/core/components/functional/value/value.js.map +1 -1
- package/dist/js/core/components/ui/_css/rounded.js +34 -0
- package/dist/js/core/components/ui/_css/rounded.js.map +1 -0
- package/dist/js/core/components/ui/_css/type.js +44 -0
- package/dist/js/core/components/ui/_css/type.js.map +1 -1
- package/dist/js/core/components/ui/_i18n/ui-aria-labels.js +95 -0
- package/dist/js/core/components/ui/_i18n/ui-aria-labels.js.map +1 -0
- package/dist/js/core/components/ui/alert/alert.js +72 -87
- package/dist/js/core/components/ui/alert/alert.js.map +1 -1
- package/dist/js/core/components/ui/alert-messages/alert-messages.js +1 -0
- package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +1 -1
- package/dist/js/core/components/ui/badge/badge.js +29 -80
- package/dist/js/core/components/ui/badge/badge.js.map +1 -1
- package/dist/js/core/components/ui/button/button.js +8 -7
- package/dist/js/core/components/ui/button/button.js.map +1 -1
- package/dist/js/core/components/ui/card/card-header.js +7 -2
- package/dist/js/core/components/ui/card/card-header.js.map +1 -1
- package/dist/js/core/components/ui/divider/divider.js +1 -1
- package/dist/js/core/components/ui/divider/divider.js.map +1 -1
- package/dist/js/core/components/ui/form/checkbox/checkbox.js +4 -20
- package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +1 -1
- package/dist/js/core/components/ui/form/fieldset/legend-description.js +1 -1
- package/dist/js/core/components/ui/form/fieldset/legend.js +1 -1
- package/dist/js/core/components/ui/form/input/input.js +12 -15
- package/dist/js/core/components/ui/form/input/input.js.map +1 -1
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +363 -158
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +1 -1
- package/dist/js/core/components/ui/form/radio/radio.js +1 -1
- package/dist/js/core/components/ui/form/select/select.js +3 -6
- package/dist/js/core/components/ui/form/select/select.js.map +1 -1
- package/dist/js/core/components/ui/form/textarea/textarea.js +1 -2
- package/dist/js/core/components/ui/form/textarea/textarea.js.map +1 -1
- package/dist/js/core/components/ui/image/image.js +9 -37
- package/dist/js/core/components/ui/image/image.js.map +1 -1
- package/dist/js/core/components/ui/link/link.js +25 -26
- package/dist/js/core/components/ui/link/link.js.map +1 -1
- package/dist/js/core/components/ui/modal/modal-close.js +3 -12
- package/dist/js/core/components/ui/modal/modal-close.js.map +1 -1
- package/dist/js/core/components/ui/modal/modal.js +18 -18
- package/dist/js/core/components/ui/modal/modal.js.map +1 -1
- package/dist/js/core/components/ui/pop/pop.js +131 -112
- package/dist/js/core/components/ui/pop/pop.js.map +1 -1
- package/dist/js/core/components/ui/table/table.js.map +1 -1
- package/dist/js/core/components/ui/theme/theme.js +1 -1
- package/dist/js/core/components/ui/toast/dismissed.js +9 -0
- package/dist/js/core/components/ui/toast/dismissed.js.map +1 -0
- package/dist/js/core/components/ui/toast/render-content.js +14 -0
- package/dist/js/core/components/ui/toast/render-content.js.map +1 -0
- package/dist/js/core/components/ui/toast/toast-item.js +150 -96
- package/dist/js/core/components/ui/toast/toast-item.js.map +1 -1
- package/dist/js/core/components/ui/toast/toast.js +41 -13
- package/dist/js/core/components/ui/toast/toast.js.map +1 -1
- package/dist/js/core/components/ui/tooltip/tooltip.js +144 -143
- package/dist/js/core/components/ui/tooltip/tooltip.js.map +1 -1
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +1 -1
- package/dist/js/core/decorators/subscriber/derive.js +3 -1
- package/dist/js/core/decorators/subscriber/derive.js.map +1 -1
- package/dist/js/core/mixins/Fetcher.js.map +1 -1
- package/dist/js/core/mixins/FormCheckable.js +1 -8
- package/dist/js/core/mixins/FormCheckable.js.map +1 -1
- package/dist/js/core/mixins/FormElement.js +26 -53
- package/dist/js/core/mixins/FormElement.js.map +1 -1
- package/dist/js/core/utils/AncestorAttributeObserver.js +130 -55
- package/dist/js/core/utils/AncestorAttributeObserver.js.map +1 -1
- package/dist/js/core/utils/LocationHandler.js +1 -1
- package/dist/js/core/utils/LocationHandler.js.map +1 -1
- package/dist/js/core/utils/dismissed.js +23 -0
- package/dist/js/core/utils/dismissed.js.map +1 -0
- package/dist/js/core/utils/positioning.js +110 -0
- package/dist/js/core/utils/positioning.js.map +1 -0
- package/dist/js/directives.js +1 -2
- package/dist/js/directives.js.map +1 -1
- package/dist/types/addons/interactive.d.ts +6 -0
- package/dist/types/addons/interactive.d.ts.map +1 -0
- package/dist/types/core/components/functional/if/if.d.ts +14 -5
- package/dist/types/core/components/functional/if/if.d.ts.map +1 -1
- package/dist/types/core/components/functional/interactive/action.d.ts +22 -0
- package/dist/types/core/components/functional/interactive/action.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/gamepad.d.ts +37 -0
- package/dist/types/core/components/functional/interactive/gamepad.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/gesture.d.ts +26 -0
- package/dist/types/core/components/functional/interactive/gesture.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/helpers.d.ts +23 -0
- package/dist/types/core/components/functional/interactive/helpers.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/index.d.ts +20 -0
- package/dist/types/core/components/functional/interactive/index.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/keyboard.d.ts +37 -0
- package/dist/types/core/components/functional/interactive/keyboard.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/matrix.d.ts +31 -0
- package/dist/types/core/components/functional/interactive/matrix.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/registry.d.ts +23 -0
- package/dist/types/core/components/functional/interactive/registry.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/store.d.ts +46 -0
- package/dist/types/core/components/functional/interactive/store.d.ts.map +1 -0
- package/dist/types/core/components/functional/interactive/ticker.d.ts +33 -0
- package/dist/types/core/components/functional/interactive/ticker.d.ts.map +1 -0
- package/dist/types/core/components/functional/value/value.d.ts +6 -0
- package/dist/types/core/components/functional/value/value.d.ts.map +1 -1
- package/dist/types/core/components/ui/_css/rounded.d.ts +3 -0
- package/dist/types/core/components/ui/_css/rounded.d.ts.map +1 -0
- package/dist/types/core/components/ui/_css/type.d.ts +13 -0
- package/dist/types/core/components/ui/_css/type.d.ts.map +1 -1
- package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts +83 -0
- package/dist/types/core/components/ui/_i18n/ui-aria-labels.d.ts.map +1 -0
- package/dist/types/core/components/ui/alert/alert.d.ts +14 -12
- package/dist/types/core/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +1 -1
- package/dist/types/core/components/ui/badge/badge.d.ts +1 -1
- package/dist/types/core/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/types/core/components/ui/button/button.d.ts +13 -29
- package/dist/types/core/components/ui/button/button.d.ts.map +1 -1
- package/dist/types/core/components/ui/card/card-header.d.ts.map +1 -1
- package/dist/types/core/components/ui/divider/divider.d.ts +2 -1
- package/dist/types/core/components/ui/divider/divider.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +25 -73
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/input/input.d.ts +14 -29
- package/dist/types/core/components/ui/form/input/input.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +63 -65
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/radio/radio.d.ts +1 -1
- package/dist/types/core/components/ui/form/select/select.d.ts +3 -5
- package/dist/types/core/components/ui/form/select/select.d.ts.map +1 -1
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts +12 -28
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +1 -1
- package/dist/types/core/components/ui/image/image.d.ts +2 -1
- package/dist/types/core/components/ui/image/image.d.ts.map +1 -1
- package/dist/types/core/components/ui/link/link.d.ts +10 -9
- package/dist/types/core/components/ui/link/link.d.ts.map +1 -1
- package/dist/types/core/components/ui/modal/modal-close.d.ts +2 -2
- package/dist/types/core/components/ui/modal/modal-close.d.ts.map +1 -1
- package/dist/types/core/components/ui/pop/pop.d.ts +12 -4
- package/dist/types/core/components/ui/pop/pop.d.ts.map +1 -1
- package/dist/types/core/components/ui/table/table.d.ts +2 -1
- package/dist/types/core/components/ui/table/table.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/dismissed.d.ts +3 -0
- package/dist/types/core/components/ui/toast/dismissed.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/render-content.d.ts +7 -0
- package/dist/types/core/components/ui/toast/render-content.d.ts.map +1 -0
- package/dist/types/core/components/ui/toast/toast-item.d.ts +26 -9
- package/dist/types/core/components/ui/toast/toast-item.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/toast.d.ts +6 -3
- package/dist/types/core/components/ui/toast/toast.d.ts.map +1 -1
- package/dist/types/core/components/ui/toast/types.d.ts +12 -2
- package/dist/types/core/components/ui/toast/types.d.ts.map +1 -1
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts +19 -11
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +3 -4
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +1 -1
- package/dist/types/core/decorators/subscriber/derive.d.ts.map +1 -1
- package/dist/types/core/mixins/FormCheckable.d.ts +10 -27
- package/dist/types/core/mixins/FormCheckable.d.ts.map +1 -1
- package/dist/types/core/mixins/FormElement.d.ts +21 -10
- package/dist/types/core/mixins/FormElement.d.ts.map +1 -1
- package/dist/types/core/mixins/FormInput.d.ts +11 -27
- package/dist/types/core/mixins/FormInput.d.ts.map +1 -1
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts +17 -9
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +1 -1
- package/dist/types/core/utils/LocationHandler.d.ts +3 -2
- package/dist/types/core/utils/LocationHandler.d.ts.map +1 -1
- package/dist/types/core/utils/dismissed.d.ts +3 -0
- package/dist/types/core/utils/dismissed.d.ts.map +1 -0
- package/dist/types/core/utils/positioning.d.ts +44 -0
- package/dist/types/core/utils/positioning.d.ts.map +1 -0
- package/dist/types/directives.d.ts +1 -3
- package/dist/types/directives.d.ts.map +1 -1
- package/dist/types/mixins.d.ts +22 -55
- package/dist/types/mixins.d.ts.map +1 -1
- package/docs/assets/{index-FmK4JaIM.js → index-D8MVWqY6.js} +946 -687
- package/docs/assets/index-DiD0qYvE.css +1 -0
- package/docs/crawl/core/components/ui/form/input-autocomplete/input-autocomplete.html +17 -85
- package/docs/crawl/docs/_misc/formelement-subscriber-removal.html +1 -1
- package/docs/crawl/hubs/form-components.html +13 -11
- package/docs/docs-mock-api-sw.js +5 -1
- package/docs/docs-mock-api-sw.js.map +2 -2
- package/docs/index.html +2 -2
- package/docs/llms-full.txt +12 -38
- package/docs/llms.txt +1 -1
- package/docs/src/core/components/functional/sdui/sdui.md +0 -0
- package/docs/src/core/components/ui/form/checkbox/checkbox.md +0 -0
- package/docs/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
- package/docs/src/docs/_getting-started/create-a-component.md +0 -0
- package/docs/src/docs/_misc/formelement-subscriber-removal.md +1 -1
- package/docs/src/docs/search/docs-search.json +195 -200
- package/docs/src/tsconfig.json +324 -0
- package/gitlab/job_tests.sh +25 -12
- package/index.html +3 -3
- package/package.json +181 -9
- package/public/docs-mock-api-sw.js +5 -1
- package/public/docs-mock-api-sw.js.map +2 -2
- package/scripts/build-addons.mjs +2 -2
- package/scripts/post-build.mjs +9 -0
- package/src/addons/interactive.ts +5 -0
- package/src/core/components/functional/if/if.ts +54 -7
- package/src/core/components/functional/interactive/action.ts +84 -0
- package/src/core/components/functional/interactive/gamepad.ts +197 -0
- package/src/core/components/functional/interactive/gesture.ts +136 -0
- package/src/core/components/functional/interactive/helpers.spec.ts +50 -0
- package/src/core/components/functional/interactive/helpers.ts +97 -0
- package/src/core/components/functional/interactive/index.ts +25 -0
- package/src/core/components/functional/interactive/interactive.md +33 -0
- package/src/core/components/functional/interactive/keyboard.ts +171 -0
- package/src/core/components/functional/interactive/matrix.ts +185 -0
- package/src/core/components/functional/interactive/registry.ts +46 -0
- package/src/core/components/functional/interactive/store.ts +264 -0
- package/src/core/components/functional/interactive/ticker.ts +171 -0
- package/src/core/components/functional/list/list.ts +0 -0
- package/src/core/components/functional/subscriber/subscriber.ts +0 -0
- package/src/core/components/functional/value/value.ts +44 -4
- package/src/core/components/ui/_css/rounded.ts +36 -0
- package/src/core/components/ui/_css/type.ts +49 -0
- package/src/core/components/ui/_i18n/ui-aria-labels.ts +104 -0
- package/src/core/components/ui/alert/alert.md +128 -72
- package/src/core/components/ui/alert/alert.spec.ts +145 -0
- package/src/core/components/ui/alert/alert.ts +86 -91
- package/src/core/components/ui/alert-messages/alert-messages.ts +1 -1
- package/src/core/components/ui/badge/badge.md +126 -78
- package/src/core/components/ui/badge/badge.ts +29 -81
- package/src/core/components/ui/button/button.md +1 -0
- package/src/core/components/ui/button/button.ts +12 -10
- package/src/core/components/ui/card/card-header.ts +7 -2
- package/src/core/components/ui/card/card.md +120 -65
- package/src/core/components/ui/divider/divider.ts +4 -9
- package/src/core/components/ui/form/checkbox/checkbox.md +1 -1
- package/src/core/components/ui/form/checkbox/checkbox.ts +4 -20
- package/src/core/components/ui/form/fieldset/legend-description.ts +1 -1
- package/src/core/components/ui/form/fieldset/legend.ts +1 -1
- package/src/core/components/ui/form/input/input.md +1 -1
- package/src/core/components/ui/form/input/input.ts +25 -27
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
- package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +419 -187
- package/src/core/components/ui/form/radio/radio.ts +1 -1
- package/src/core/components/ui/form/select/select.ts +3 -6
- package/src/core/components/ui/form/textarea/textarea.md +1 -1
- package/src/core/components/ui/form/textarea/textarea.ts +1 -2
- package/src/core/components/ui/image/image.md +147 -53
- package/src/core/components/ui/image/image.ts +10 -44
- package/src/core/components/ui/link/link.md +2 -2
- package/src/core/components/ui/link/link.ts +42 -37
- package/src/core/components/ui/modal/modal-close.ts +8 -12
- package/src/core/components/ui/modal/modal.ts +18 -18
- package/src/core/components/ui/pop/pop.md +105 -1
- package/src/core/components/ui/pop/pop.ts +145 -141
- package/src/core/components/ui/table/table.ts +2 -8
- package/src/core/components/ui/theme/theme.ts +1 -1
- package/src/core/components/ui/toast/dismissed.ts +14 -0
- package/src/core/components/ui/toast/render-content.ts +13 -0
- package/src/core/components/ui/toast/toast-item.ts +179 -103
- package/src/core/components/ui/toast/toast.ts +58 -21
- package/src/core/components/ui/toast/types.ts +14 -2
- package/src/core/components/ui/tooltip/tooltip.ts +176 -154
- package/src/core/decorators/subscriber/ancestorAttribute.spec.ts +26 -0
- package/src/core/decorators/subscriber/ancestorAttribute.ts +3 -4
- package/src/core/decorators/subscriber/derive.ts +3 -3
- package/src/core/mixins/Fetcher.ts +1 -1
- package/src/core/mixins/FormCheckable.ts +1 -8
- package/src/core/mixins/FormElement.ts +74 -76
- package/src/core/mixins/Subscriber.ts +0 -0
- package/src/core/utils/AncestorAttributeObserver.ts +183 -70
- package/src/core/utils/DataBindObserver.ts +0 -0
- package/src/core/utils/LocationHandler.ts +12 -5
- package/src/core/utils/Objects.ts +0 -0
- package/src/core/utils/dismissed.ts +22 -0
- package/src/core/utils/positioning.spec.ts +208 -0
- package/src/core/utils/positioning.ts +183 -0
- package/src/directives.ts +1 -3
- package/src/docs/_core-concept/dataFlow.md +1 -1
- package/src/docs/_decorators/ancestor-attribute.md +3 -2
- package/src/docs/_getting-started/concorde-outside.md +3 -3
- package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
- package/src/docs/_misc/html-integration.md +2 -0
- package/src/docs/code.ts +3 -1
- package/src/docs/components/docs-demo-sources.ts +60 -0
- package/src/docs/docs.ts +1 -0
- package/src/docs/example/docs-input-autocomplete-demos.ts +110 -0
- package/src/docs/mock-api/router.ts +17 -1
- package/src/docs/navigation/navigation.ts +4 -0
- package/src/docs/search/docs-search.json +943 -2033
- package/src/docs/tailwind/css/tailwind.css +13 -6
- package/src/tsconfig.json +135 -6
- package/src/tsconfig.tsbuildinfo +1 -1
- package/tailwind.config.js +50 -3
- package/vite/config.js +23 -35
- package/vite.config.mts +5 -0
- package/vitest.setup.ts +49 -13
- package/docs/assets/index-BZiZXMU-.css +0 -1
|
@@ -28,7 +28,7 @@ var ConcordeWebGpu=(function(ue){"use strict";/**
|
|
|
28
28
|
* @license
|
|
29
29
|
* Copyright 2017 Google LLC
|
|
30
30
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function gn(n){return Re({...n,state:!0,attribute:!1})}function Rr(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.getFrameCanvas=="function"&&typeof e.frameSeq=="number"}function vn(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.registerFrameConsumer=="function"&&typeof e.unregisterFrameConsumer=="function"}class Di{constructor(){this.tokens=new Map}sync(e){const t=new Set;for(const r of e)r&&vn(r)&&t.add(r);for(const[r,i]of[...this.tokens])t.has(r)||(vn(r)&&r.unregisterFrameConsumer(i),this.tokens.delete(r));for(const r of t){if(this.tokens.has(r))continue;const i={};r.registerFrameConsumer(i),this.tokens.set(r,i)}}clear(){this.sync([])}}const yn="#__sonic_frame_";let Oi=0;const Lr=new Map,bn=new WeakMap;function Mi(n){const e=bn.get(n);if(e)return e;const t=`${yn}${++Oi}`;return Lr.set(t,n),bn.set(n,t),t}function Fi(n){if(!n.startsWith(yn))return null;const e=Lr.get(n)??null;return e&&!e.isConnected?(Lr.delete(n),null):e}function $i(n){if(n==null)return null;if(typeof n=="string"){const e=n.trim();return e?e.startsWith("#")?e:`#${e}`:null}return typeof Element<"u"&&n instanceof Element?n.id?`#${n.id}`:Mi(n):null}function Ur(n){return typeof n!="string"?null:n.trim()||null}function Ni(n){if(n==null||n==="")return null;if(typeof n=="string")return Ur(n);if(typeof n!="object")return null;const e=n;return Ur(e.url)??Ur(e.blobUrl)}function Ii(n){for(const e of n)try{URL.revokeObjectURL(e)}catch{}}const Gi=4,Bi=.001,qi=.45,ji="rgb(38, 89, 217)";class Dr{constructor(e,t){this.backend="canvas2d",this.images=[null,null,null,null],this.channelUrls=["","","",""],this.channelSizes=[null,null,null,null],this.channelLoadTokens=[0,0,0,0],this.disposed=!1,this.canvas=e,this.ctx=t}static create(e){const t=e.getContext("2d",{alpha:!0});if(!t)throw new Error("Canvas2D indisponible");return new Dr(e,t)}async setShader(e){this.assertAlive()}async setChannel(e,t){this.assertAlive();const r=t.trim();if(this.channelUrls[e]===r&&this.images[e])return;this.channelUrls[e]=r;const i=++this.channelLoadTokens[e];if(!r){this.images[e]=null,this.channelSizes[e]=null;return}const u=await Wi(r);i!==this.channelLoadTokens[e]||this.disposed||(this.images[e]=u,this.channelSizes[e]={width:u.naturalWidth,height:u.naturalHeight})}getTextureSize(e){const t=this.channelUrls.indexOf(e.trim());return t<0?null:this.channelSizes[t]}resize(e,t){this.assertAlive();const r=Math.max(1,Math.floor(e)),i=Math.max(1,Math.floor(t));this.canvas.width===r&&this.canvas.height===i||(this.canvas.width=r,this.canvas.height=i)}draw(e){this.assertAlive();const{ctx:t,canvas:r}=this,i=r.width,u=r.height;t.clearRect(0,0,i,u);const a=this.images[0],h=Math.min(1,Math.max(0,e.params[0]??0));if(a)t.drawImage(a,0,0,i,u),h>Bi&&(t.save(),t.globalAlpha=h*qi,t.fillStyle=ji,t.fillRect(0,0,i,u),t.restore());else{const v=t.createLinearGradient(0,0,i,u);v.addColorStop(0,`rgb(38,${Math.round(40+h*80)},80)`),v.addColorStop(1,`rgb(90,${Math.round(60+h*40)},120)`),t.fillStyle=v,t.fillRect(0,0,i,u)}}dispose(e=!1){if(!this.disposed){this.disposed=!0;for(let t=0;t<Gi;t++)this.channelLoadTokens[t]++;this.images=[null,null,null,null]}}assertAlive(){if(this.disposed)throw new Error("Canvas2D fallback disposed")}}async function Wi(n){const e=new Image;return e.crossOrigin="anonymous",await new Promise((t,r)=>{e.onload=()=>t(),e.onerror=()=>r(new Error(`Failed to load texture: ${n}`)),e.src=n}),e}const Or="1";function zi(n){const e=n.trim();if(!e)return!1;try{const t=new URL(e,"https://example.invalid/");return t.protocol==="http:"||t.protocol==="https:"||t.protocol==="blob:"}catch{return!1}}let st=class ze{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const r=t.indexOf("=");return e[t.substring(0,r).trim()]=t.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let r=e;for(;r;){if(!t(r))return;r=r.parentNode||r.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(ze.overflowMatches(i,t))return r}r=ze.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return ze.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return ze.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const r of ze.scopeAttributeNames(t))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const u=ze.readScopeAttributeOnElement(r,t);if(u!=null)return u}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const t=ze.getAncestorAttributeValue(e,"token"),r=ze.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=ze.getAncestorAttributeValue(e,"serviceURL");let u=null,a=null;const h=ze.getAncestorAttributeValue(e,"tokenProvider"),v=ze.getAncestorAttributeValue(e,"eventsApiToken");t||(u=ze.getAncestorAttributeValue(e,"userName"),a=ze.getAncestorAttributeValue(e,"password"));const x=ze.getAncestorAttributeValue(e,"credentials")||void 0,D=e.getAttribute("cache"),P=e.hasAttribute("blockUntilDone"),E=e.hasAttribute("keepAlive");return{serviceURL:i,token:t,userName:u,password:a,authToken:v,tokenProvider:h,addHTTPResponse:r,credentials:x,cache:D,blockUntilDone:P,keepAlive:E}}static getClosestElement(e,t){let r=e;for(;r&&!(r.nodeName&&r.nodeName.toLowerCase()===t);){const i=r.parentNode||r.host;if(!i){r=null;break}r=i}return r?.nodeName?r:null}static getClosestForm(e){return ze.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const r=new Set(t.map(a=>a.toLowerCase())),i=[];let u=e.parentNode||e.host;for(;u;)u instanceof Element&&r.has(u.tagName.toLowerCase())&&i.push(u),u=u.parentNode||u.host;return i}static getAncestorsBySelectors(e,t){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const u of t)try{if(i.matches(u)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){if(!zi(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,r=Array.from(document.scripts).find(u=>u.src===t);if(r)return r.dataset.concordeLoaded===Or?!0:new Promise(u=>{let a=!1;const h=x=>{a||(a=!0,x&&(r.dataset.concordeLoaded=Or),u(x))};r.addEventListener("load",()=>h(!0),{once:!0}),r.addEventListener("error",()=>h(!1),{once:!0});const v=r.readyState;if(v==="complete"||v==="loaded"){h(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{a||h(!0)})})});const i=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(u=>{const a=document.createElement("script");a.src=e,i&&(a.type="module"),a.onload=()=>{a.dataset.concordeLoaded=Or,u(!0)},a.onerror=()=>u(!1),document.head.appendChild(a)})}static async loadCSS(e){return new Promise(t=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>t(!0),r.onerror=()=>t(!0),document.head.appendChild(r)})}},Hi=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},wn="sonic";typeof __SONIC_PREFIX__<"u"&&(wn=__SONIC_PREFIX__);let En=wn.replace(/-([a-z])/g,n=>n[1].toUpperCase());const Vi=En.charAt(0).toUpperCase()+En.slice(1);let Xi=class Et{static areEqual(e,t){return e.length===t.length?e.every((r,i)=>r===t[i]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(r=>t=t.concat(r)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const r=(e[0]||{})[t];return e.every(i=>(i||{})[t]==r)}})})}),value:()=>({forKey:t=>Et.from(e.map(r=>r[t]))}),copy:()=>({fromKey:t=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[t])?[...i[t]]:typeof i[t]=="object"&&i[t]!=null?{...i[t]}:i[t]})}})})}),map:t=>Et.from(e.map(t)),filter:t=>Et.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const r=[],i=new Map;for(const u of e){const a=u[t];if(!i.has(a)){const h=r.length;i.set(a,h);const v={items:[]};v[t]=a,r.push(v)}r[i.get(a)].items.push(u)}return Et.from(r)}}),without:()=>({duplicates:()=>({forKey:t=>{const r=[...new Set(e.map(i=>i[t]))];return Et.from(r.map(i=>e.find(u=>u[t]==i)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:r=>{const i=(u,a)=>h=>u[a]!=h[a];return Et.from(e.filter(u=>t.every(i(u,r))))}})})})}}},Mr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",r="long"){t||(t=st.getLanguage());const i=(x,D)=>[Math.floor(x/D),x%D];function u(x,D,P){return new Intl.NumberFormat(x,{style:"unit",unit:D,unitDisplay:P}).format}const[a,h]=i(e,60),v=[];return a&&v.push(u(t,"hour",r)(a)),h&&v.push(u(t,"minute",r)(h)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(v)}static js(e){try{return Function("return "+e)()}catch{return""}}};class _n{constructor(e){this.path=e}toString(){return this.path}}function Sn(n){return new Proxy(n,{get(e,t){if(t==="path")return e.path;if(t==="toString")return e.toString.bind(e);if(t===Symbol.toStringTag)return"DataProviderKey";if(typeof t=="symbol")return e[t];const r=e.path?`${e.path}.${String(t)}`:String(t);return Sn(new _n(r))}})}const Yi=/\$\{|\{\$/;function Ji(n){return Yi.test(n)}function Ki(n){const e=n;if(Ji(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const ir=function(n){return this instanceof ir?Sn(new _n(n)):new ir(n)};let sr=class ct{static shallowEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const a of i){const h=e[a],v=t[a];if(r?h!==v:h!=v)return!1}return!0}static deepEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const a of i){const h=e[a],v=t[a],x=ct.isObject(h)&&ct.isObject(v),D=r?h!==v:h!=v;if(x&&!ct.deepEqual(h,v)||!x&&D)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return ct.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,r=!1){for(const i of t){const u=e[i];if(u===void 0)return;r&&ct.isObject(u)?e=Object.assign(Array.isArray(u)?[]:{},e,u):e=e[i]}return e}static traverseDotNotation(e,t,r=!1){return ct.traverse(e,t.split("."),r)}static getURLSearchArray(e,t=""){let r=[];for(let i in e){const u=e[i];t&&(i=t+"["+i+"]"),ct.isObject(u)?r=[...r,...this.getURLSearchArray(u,i)]:r.push(`${i}=${u}`)}return r}static getURLSearchString(e){return ct.getURLSearchArray(e,"").join("&")}};sr.traverseDotNotation;function Zi(n){return!1}function ar(n){return Object.prototype.hasOwnProperty.call(n,"__value")}function ft(n){return typeof n=="object"&&n!==null}let Tt="sonic";typeof __SONIC_PREFIX__>"u"&&(Tt="sonic");const Fr=Tt=="sonic"?"publisher-proxies-data":Tt+"-publisher-proxies-data",ht=class ht{constructor(e,t,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=432e5,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=t||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),ht.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(t=>t()),this._is_savable_&&!$e.changed){$e.changed=!0,$e.saveId++;const t=$e.saveId;setTimeout(()=>$e.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(r=>{r[e]!==t&&(r[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==t&&(r[e]=t))})}onAssign(e,t=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),t&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const t in this._value_){let r=t;const i=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(r=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const r=this._value_[t];e[t]!==r&&(e[t]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||ft(this._value_)&&ft(e)&&e&&ar(this._value_)&&ar(e)&&this._value_.__value===e.__value||!ft(e)&&e===this._value_.__value)return!0;this._value_=ft(e)?e:{__value:e},this._cachedGet_=void 0;const r=ar(this._value_);if(this._parentKey_&&this.parent){const i=ar(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:i});else{const u=[];u[Number(this._parentKey_)]=i,this.parent.set(u)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,u)=>{u!="_parent_"&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const i in this._value_)this._value_[i]===void 0&&delete this._value_[i];if(this._proxies_.forEach((i,u)=>{const a=this._value_[u];u!="_parent_"&&a===void 0&&a!==null&&isNaN(Number(u))&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),ft(this._value_))for(const i in this._value_){const u=e[i],h=ft(u)?u:{__value:u};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,u);continue}this._proxies_.get(i)?.set(h,!0),this._publishDynamicFilling_(i,u)}return!0}get(){if(Qi(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(ht.instancesCounter++,this._instanceCounter_=ht.instancesCounter),ht.instances.set(this._instanceCounter_,this),"<"+Tt+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Tt+"-publisher-proxy>"}};ht.instances=new Map,ht.instancesCounter=0;let or=ht;const An=[];function Qi(n){An.length>0&&An[0].add(n)}const me=class me{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],me.instance!=null)throw"Singleton / use getInstance";me.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),me.initPageShowHandler()}static initPageShowHandler(){me.pageShowHandlerInitialized||(me.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&me.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(Fr),i=null;if(r&&(i=await this.decompress(r,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(Fr,r),this.localStorageData={};const u=1e3*60*60*12;for(const a in this.localStorageData){const h=this.localStorageData[a],v=new Date().getTime()-(h.expirationDelayMs||u);h.lastModifiationMS<v&&delete this.localStorageData[a]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=me.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new me)}return me.instance==null?new me:me.instance}static get(e,t){return me.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+st.getLanguage()]?.data||e.get())}get(e,t){const r=t?.localStorageMode==="enabled",i=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const h=$r({});this.set(e,h)}const u=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(u._expiration_delay_=t.expirationDelayMs),u._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(u,e)),i&&(u._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,t){this.publishers.set(e,t)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==me.saveId&&e%10!=0))try{if(!me.changed||me.saving)return;me.saving=!0,me.changed=!1;const t=Array.from(this.publishers.keys());let r=!1;for(const i of t){const u=this.publishers.get(i);if(!u?._is_savable_)continue;const a=u?.get();a&&(this.localStorageData[i+"¤lang_"+st.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:u._expiration_delay_,data:a},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Fr,i)}if(me.saving=!1,me.changed){me.saveId++;const i=me.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{me.saving=!1}}async compress(e,t){const r=new TextEncoder().encode(e),i=window,u=new i.CompressionStream(t),a=u.writable.getWriter();a.write(r),a.close();const h=await new Response(u.readable).arrayBuffer(),v=new Uint8Array(h);let x="";for(let D=0;D<v.length;D++)x+=String.fromCharCode(v[D]);return btoa(x)}async decompress(e,t){const r=atob(e),u=Uint8Array.from(r,D=>D.charCodeAt(0)).buffer,a=window,h=new a.DecompressionStream(t),v=h.writable.getWriter();v.write(u),v.close();const x=await new Response(h.readable).arrayBuffer();return new TextDecoder().decode(x)}};me.buildDate="Wed Sep 30 2026 10:44:53 GMT+0200 (Central European Summer Time)",me.changed=!1,me.saving=!1,me.saveId=0,me.instance=null,me.instances=new Map,me.pageShowHandlerInitialized=!1;let $e=me;if(typeof window<"u"){const n=window,e=Vi+"PublisherManager",t=n[e]||$e;if(n[e]||(n[e]=$e),t!==$e){const r=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const i of r)Object.defineProperty($e,i,{configurable:!0,get(){return t[i]},set(u){t[i]=u}})}}const es=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function ts(n,e){return{get:function(t,r){if(typeof r=="string"&&es.has(r))return n[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!n._proxies_.has(r)){const i=n._value_[r],u=$r(ft(i)?i:{__value:i},n,r);u._proxies_.set("_parent_",e()),n._proxies_.set(r,u)}return n._proxies_.get(r)},set:function(t,r,i){if(r=="_value_")return n._value_=i,!0;if(r=="_cachedGet_")return n._cachedGet_=i,!0;if(r=="_assignmentId_")return n._assignmentId_=i,!0;if(r=="_is_savable_")return n._is_savable_=i,!0;if(r=="_expiration_delay_")return n._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return n._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return n._instanceCounter_=i,!0;if(!n._proxies_.has(r)){const a=$r({},n,r);a._proxies_.set("_parent_",e()),n._proxies_.set(r,a)}return n._value_[r]!==i&&(n._value_[r]=i,n._publishDynamicFilling_(r,i),n._proxies_.get(r)?.set(ft(i)?i:{__value:i})),!0},deleteProperty:function(t,r){return n._publishDynamicFilling_(r,null),n._proxies_.get(r)?.set(null),delete n._value_[r]},has:function(t,r){return r in n._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(t,r,i){return i&&"value"in i&&(n._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(t,r){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return n._value_.__value?Object.keys(n._value_.__value):Object.keys(n._value_)}}}function $r(n,e=null,t){const r=new or(n,e,t);let i=null;const u=ts(r,()=>i);return i=new Proxy(r,u),i}class rs extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=or.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(Tt+"-publisher-proxy",rs)}catch{}const ns=(n,e)=>{{const t=n.split("."),r=t.shift()||"";let i=$e.get(r,e);i=sr.traverse(i,t);const u=new Set;return u.add(i),u}};function Tn(n,e,t){const r=Ki(n);return ns(r,t).values().next().value}function is(n,e){return Zi()?Tn(n,void 0,e):Tn(n)}let Nr=(fe=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(fe.observedElements.keys()).forEach(e=>fe.unObserve(e)))}static observe(e){if(!e||!fe.enabled||fe.observedElements.has(e))return;const t=new MutationObserver(fe.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],t.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>fe.addPublisherListeners(i)),fe.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>fe.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&fe.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>fe.addPublisherListeners(t)):e.childNodes.forEach(t=>fe.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&fe.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>fe.removePublisherListeners(t)):e.childNodes.forEach(t=>fe.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":fe.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(r=>{fe.onAdded(r)}),t.removedNodes.forEach(r=>{fe.onRemoved(r)});break}}static removePublisherListeners(e){const t=fe.publisherListeners.get(e);t&&(fe.publisherListeners.delete(e),t.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(r=>r.replace("$","")):t=[e],t=t.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:t.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:fe.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const r of t)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){fe.removePublisherListeners(e);const t=st.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const r=$e.getInstance().get(t),i=fe.getDataBindItems(e),u=[];i.forEach(a=>{const h=a.bindedVariablesDescriptor,v=a.propertyToUpdate;for(const x of h.variables){const D=x;let P=r;P=fe.getSubPublisher(r,D);const E=e,C={publisher:P,onAssign:()=>{const O=h.variables.map(J=>fe.getSubPublisher(r,J)?.get());let G=h.expression,ee=!1;if(O.length==1&&h.variables[0].join(".")==G.substring(1)){let J=O[0];J===null&&(J=""),E[v]=J;return}for(let J=0;J<O.length;J++){let _=O[J];const g=h.variables[J];_===null&&(ee=!0,_=void 0),G=G.replace("$"+g.join("."),_)}if(G.indexOf("|")!=-1){const J=G.indexOf("|");if(J==0)G=Mr.js(G.substring(1));else{const _=G.substring(0,J),g=G.substring(J+1),U=Mr[_];G=ee?"":U?U(g):G}}else G=ee?"":G;E[v]=G}};P?.onAssign(C.onAssign),u.push(C)}}),fe.publisherListeners.set(e,u)}},fe.observedElements=new Map,fe.enabled=!0,fe.publisherListeners=new Map,fe);Nr.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Nr);let ss=(Le=class{static listen(){if(!Le.listening)return;const e=document.location?.href.replace(document.location.origin,"");Le.prevURL&&Le.prevURL!=e&&(Le.prevURL=e,Le.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(Le.listen)}static offChange(e){const t=Le.listeners.indexOf(e);t!=-1&&(Le.listeners.splice(t,1),Le.listeners.length==0&&(Le.listening=!1))}static onChange(e){Le.listening||(Le.listening=!0,Le.listen()),Le.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,r=document.referrer;if(t!=null){const x=document.location.origin,D=(t||x).toString(),E=r.indexOf("http")==0?new URL(r).origin!=x:!1,C=r=="",O=history.length<3,G=C&&O,ee=D!=document.location.href;if(E&&ee||G){const _=history.state||{};_.concorde=_.concorde||{},_.concorde.hasDoneHistoryBack=!0,history.pushState(_,document.title),history.back(),document.location.replace(D)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const u=new URL(i,document.location.href),a=u.pathname.split("/"),h=[];let v="";for(const x of a)x!=v&&h.push(x),v=x;i="/"+h.join("/")+u.search+(u.hash?+u.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const r=new URL(t,document.location.href),i=new URL(e.location||"",document.location.origin);let u=!1;e.autoActive=="strict"?u=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?u=r.pathname==i.pathname&&r.hash==i.hash:u=i.href.indexOf(r.href)==0,u?e.setAttribute("active","true"):e.removeAttribute("active")}}},Le.listeners=[],Le.listening=!1,Le.prevURL=document.location?.href.replace(document.location.origin,""),Le);function kn(n){if(n==null||typeof n!="object"||Array.isArray(n))return n;const e={...n};return delete e._sonic_http_response_,e}const ve=class ve{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){ve.tokens.delete(this.serviceURL);return}ve.invalidTokens.includes(e)||ve.tokens.set(this.serviceURL,e)}get token(){return ve.invalidTokens.includes(this._token)?ve.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(ve.invalidTokens.includes(e)||(ve.invalidTokens.push(e),this.token=null))}async handleResult(e,t){ve.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let u={};if(!r||r.indexOf("text/")==0)u={text:await e.text()};else try{u=await e.json()}catch{u={}}if(this.addHTTPResponse&&sr.isObject(u)&&(u._sonic_http_response_=e),i===498&&!ve.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const h=await this.get(t.path,t.additionalHeaders);if(h==null)throw new Error("GET retry failed after token refresh");u=h}else u=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return is("sonic-api").lastResponse.set({http:e,processed:u}),u}async auth(){if(this.token)return;if(ve.tokens.has(this.serviceURL)){this.token=ve.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const t=new URL(this.serviceURL),r=t.protocol+"//"+t.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const u=await i.json();u.token?this.token=u.token:ve.failledTokenUpdates.set(this.serviceURL,!0)}catch{ve.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const r=$e.get(e),i=new URLSearchParams(t.split("?")[1]||""),u=r.get();let a=[];Array.isArray(u)?a=u:a=[u];const h=[];let v=Number.POSITIVE_INFINITY,x=0,D=0;if(i.has("limit")&&(v=parseInt(i.get("limit")||"0"),D++),i.has("offset")&&(x=parseInt(i.get("offset")||"0"),D++),D>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return a.slice(x,x+v);for(const[P,E]of i.entries()){const C=E.split(",").map(O=>O.trim());for(const O of C)for(const G of a)if(typeof G!="object")isNaN(+G)?G.toString().toLowerCase().includes(E.toLowerCase())&&h.push(G):G===E&&h.push(G);else{const ee=G;if(!ee[P])continue;isNaN(+ee[P])?ee[P]?.toString().toLowerCase().includes(O.toLowerCase())&&h.push(G):ee[P]===O&&h.push(G)}}return h.slice(x,x+v)}firstCallDone(){return new Promise(e=>{if(!ve.firstCallDoneFlags.has(this.serviceURL))ve.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(ve.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),ve.firstCallDoneFlags.set(this.serviceURL,"loading"));const x=e.match(r);if(!x)throw new Error("dataProvider path is not valid");return await this.localGet(x[1],x[2])}const i={apiMethod:"get",path:e,additionalHeaders:t},u=await this.createHeaders(t),a=this.computeURL(e),h=JSON.stringify({url:a,headers:u,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),ve.firstCallDoneFlags.set(this.serviceURL,"loading")),!ve.loadingGetPromises.has(h)){const x=new Promise(async D=>{try{const P=await fetch(a,{headers:u,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),E=await this.handleResult(P,i);D({processed:E,response:this.lastResult})}catch{ve.firstCallDoneFlags.set(this.serviceURL,"error"),D(null)}});ve.loadingGetPromises.set(h,x)}const v=await ve.loadingGetPromises.get(h);return ve.loadingGetPromises.delete(h),v?(this.lastResult=v.response,v.processed):null}async getDetailed(e,t){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,t);if(i==null)return;const u=kn(i),a=this.computeURL(e);if(r)return{request:new Request(a,{method:"GET"}),result:u};const h=await this.createHeaders(t);return{request:new Request(a,{method:"GET",headers:new Headers(h),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:u}}async sendDetailed(e,t,r,i){const u=await this.send(e,t,r,i);if(u==null)return;const a=kn(u),h=this.computeURL(e),v=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(h,{method:r,headers:new Headers(v),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:a}}async postDetailed(e,t,r){return this.sendDetailed(e,t,"POST",r)}async putDetailed(e,t,r){return this.sendDetailed(e,t,"PUT",r)}async patchDetailed(e,t,r){return this.sendDetailed(e,t,"PATCH",r)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=st.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const u in t)i.searchParams.set(u,t[u]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,r="POST",i){const u={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:t},a=await this.createHeaders(i);a.Accept="application/json",a["Content-Type"]="application/json";const h=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:r,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(h,u)}async submitFormData(e,t,r="POST",i){const u={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:t},a=await this.createHeaders(i);a.Accept="application/json";const h=new FormData,v=t;for(const D in v)h.set(D,v[D]);const x=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:r,body:h,keepalive:this.keepAlive});return await this.handleResult(x,u)}async put(e,t,r){return this.send(e,t,"PUT",r)}async post(e,t,r){return this.send(e,t,"POST",r)}async patch(e,t,r){return this.send(e,t,"PATCH",r)}async delete(e,t,r){return this.send(e,t,"delete",r)}};ve.loadingGetPromises=new Map,ve.tokens=new Map,ve.invalidTokens=[],ve.failledTokenUpdates=new Map,ve.firstCallDoneFlags=new Map;let Ir=ve;st.getApiConfiguration(document.body||document.documentElement);var Pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function as(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Gt={exports:{}},os=Gt.exports,xn;function us(){return xn||(xn=1,(function(n,e){var t=[].slice;(function(r,i){return e!==null?n.exports=i():r.UrlPattern=i()})(os,function(){var r,i,u,a,h,v,x,D,P,E,C,O,G,ee,J;return P=function(_){return _.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},x=function(_,g){var U,w,k;for(k=[],U=-1,w=_.length;++U<w;)k=k.concat(g(_[U]));return k},ee=function(_,g){var U,w,k;for(k="",U=-1,w=_.length;++U<w;)k+=g(_[U]);return k},G=function(_){return new RegExp(_.toString()+"|").exec("").length-1},C=function(_,g){var U,w,k,W,F;for(W={},U=-1,k=_.length;++U<k;)w=_[U],F=g[U],F!=null&&(W[w]!=null?(Array.isArray(W[w])||(W[w]=[W[w]]),W[w].push(F)):W[w]=F);return W},r={},r.Result=function(_,g){this.value=_,this.rest=g},r.Tagged=function(_,g){this.tag=_,this.value=g},r.tag=function(_,g){return function(U){var w,k;if(w=g(U),w!=null)return k=new r.Tagged(_,w.value),new r.Result(k,w.rest)}},r.regex=function(_){return function(g){var U,w;if(U=_.exec(g),U!=null)return w=U[0],new r.Result(w,g.slice(w.length))}},r.sequence=function(){var _;return _=1<=arguments.length?t.call(arguments,0):[],function(g){var U,w,k,W,F,Z;for(U=-1,w=_.length,Z=[],W=g;++U<w;){if(k=_[U],F=k(W),F==null)return;Z.push(F.value),W=F.rest}return new r.Result(Z,W)}},r.pick=function(){var _,g;return _=arguments[0],g=2<=arguments.length?t.call(arguments,1):[],function(U){var w,k;if(k=r.sequence.apply(r,g)(U),k!=null)return w=k.value,k.value=w[_],k}},r.string=function(_){var g;return g=_.length,function(U){if(U.slice(0,g)===_)return new r.Result(_,U.slice(g))}},r.lazy=function(_){var g;return g=null,function(U){return g==null&&(g=_()),g(U)}},r.baseMany=function(_,g,U,w,k){var W,F,Z,ne;for(Z=k,ne=U?"":[];!(g!=null&&(W=g(Z),W!=null)||(F=_(Z),F==null));)U?ne+=F.value:ne.push(F.value),Z=F.rest;if(!(w&&ne.length===0))return new r.Result(ne,Z)},r.many1=function(_){return function(g){return r.baseMany(_,null,!1,!0,g)}},r.concatMany1Till=function(_,g){return function(U){return r.baseMany(_,g,!0,!0,U)}},r.firstChoice=function(){var _;return _=1<=arguments.length?t.call(arguments,0):[],function(g){var U,w,k,W;for(U=-1,w=_.length;++U<w;)if(k=_[U],W=k(g),W!=null)return W}},O=function(_){var g;return g={},g.wildcard=r.tag("wildcard",r.string(_.wildcardChar)),g.optional=r.tag("optional",r.pick(1,r.string(_.optionalSegmentStartChar),r.lazy(function(){return g.pattern}),r.string(_.optionalSegmentEndChar))),g.name=r.regex(new RegExp("^["+_.segmentNameCharset+"]+")),g.named=r.tag("named",r.pick(1,r.string(_.segmentNameStartChar),r.lazy(function(){return g.name}))),g.escapedChar=r.pick(1,r.string(_.escapeChar),r.regex(/^./)),g.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return g.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(_.segmentNameStartChar),r.string(_.optionalSegmentStartChar),r.string(_.optionalSegmentEndChar),g.wildcard))),g.token=r.lazy(function(){return r.firstChoice(g.wildcard,g.optional,g.named,g.static)}),g.pattern=r.many1(r.lazy(function(){return g.token})),g},D={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},v=function(_,g){if(Array.isArray(_))return ee(_,function(U){return v(U,g)});switch(_.tag){case"wildcard":return"(.*?)";case"named":return"(["+g+"]+)";case"static":return P(_.value);case"optional":return"(?:"+v(_.value,g)+")?"}},h=function(_,g){return g==null&&(g=D.segmentValueCharset),"^"+v(_,g)+"$"},a=function(_){if(Array.isArray(_))return x(_,a);switch(_.tag){case"wildcard":return["_"];case"named":return[_.value];case"static":return[];case"optional":return a(_.value)}},E=function(_,g,U,w){var k,W,F,Z;if(w==null&&(w=!1),Z=_[g],Z==null){if(w)throw new Error("no values provided for key `"+g+"`");return}if(k=U[g]||0,W=Array.isArray(Z)?Z.length-1:0,k>W){if(w)throw new Error("too few values provided for key `"+g+"`");return}return F=Array.isArray(Z)?Z[k]:Z,w&&(U[g]=k+1),F},u=function(_,g,U){var w,k;if(Array.isArray(_)){for(w=-1,k=_.length;++w<k;)if(u(_[w],g,U))return!0;return!1}switch(_.tag){case"wildcard":return E(g,"_",U,!1)!=null;case"named":return E(g,_.value,U,!1)!=null;case"static":return!1;case"optional":return u(_.value,g,U)}},J=function(_,g,U){if(Array.isArray(_))return ee(_,function(w){return J(w,g,U)});switch(_.tag){case"wildcard":return E(g,"_",U,!0);case"named":return E(g,_.value,U,!0);case"static":return _.value;case"optional":return u(_.value,g,U)?J(_.value,g,U):""}},i=function(_,g){var U,w,k,W,F;if(_ instanceof i){this.isRegex=_.isRegex,this.regex=_.regex,this.ast=_.ast,this.names=_.names;return}if(this.isRegex=_ instanceof RegExp,!(typeof _=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=_,g!=null){if(!Array.isArray(g))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(U=G(this.regex),g.length!==U)throw new Error("regex contains "+U+" groups but array of group names contains "+g.length);this.names=g}return}if(_==="")throw new Error("argument must not be the empty string");if(F=_.replace(/\s+/g,""),F!==_)throw new Error("argument must not contain whitespace");if(w={escapeChar:g?.escapeChar||D.escapeChar,segmentNameStartChar:g?.segmentNameStartChar||D.segmentNameStartChar,segmentNameCharset:g?.segmentNameCharset||D.segmentNameCharset,segmentValueCharset:g?.segmentValueCharset||D.segmentValueCharset,optionalSegmentStartChar:g?.optionalSegmentStartChar||D.optionalSegmentStartChar,optionalSegmentEndChar:g?.optionalSegmentEndChar||D.optionalSegmentEndChar,wildcardChar:g?.wildcardChar||D.wildcardChar},W=O(w),k=W.pattern(_),k==null)throw new Error("couldn't parse pattern");if(k.rest!=="")throw new Error("could only partially parse pattern");this.ast=k.value,this.regex=new RegExp(h(this.ast,w.segmentValueCharset)),this.names=a(this.ast)},i.prototype.match=function(_){var g,U;return U=this.regex.exec(_),U==null?null:(g=U.slice(1),this.names?C(this.names,g):g)},i.prototype.stringify=function(_){if(_==null&&(_={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(_!==Object(_))throw new Error("argument must be an object or undefined");return J(this.ast,_,{})},i.escapeForRegex=P,i.concatMap=x,i.stringConcatMap=ee,i.regexGroupCount=G,i.keysAndValuesToObject=C,i.P=r,i.newParser=O,i.defaultOptions=D,i.astNodeToRegexString=h,i.astNodeToNames=a,i.getParam=E,i.astNodeContainsSegmentsForProvidedParams=u,i.stringify=J,i})})(Gt,Gt.exports)),Gt.exports}var cs=us();const ls=as(cs);class Gr{constructor(e){this.path=Gr.normalizePath(e)}getDataProviderKey(){return new ir(this.path)}static normalizePath(e){const t=String(e).trim();if(!t)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(t)){let v;try{v=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return v.pathname=v.pathname.replace(/\/+/g,"/"),v.href}const r=t.indexOf("?"),i=t.indexOf("#");let u=t.length;r>=0&&(u=Math.min(u,r)),i>=0&&(u=Math.min(u,i));let a=t.slice(0,u);const h=t.slice(u);if(a=a.replace(/^\/+/,""),a=a.replace(/\/+/g,"/"),!a&&h)throw new RangeError("Endpoint: path cannot be empty");return a+h}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}function ur(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Br={exports:{}},Cn;function fs(){return Cn||(Cn=1,(function(n,e){(function(t){n.exports=t()})(function(){return(function(){function t(r,i,u){function a(x,D){if(!i[x]){if(!r[x]){var P=typeof ur=="function"&&ur;if(!D&&P)return P(x,!0);if(h)return h(x,!0);var E=new Error("Cannot find module '"+x+"'");throw E.code="MODULE_NOT_FOUND",E}var C=i[x]={exports:{}};r[x][0].call(C.exports,function(O){var G=r[x][1][O];return a(G||O)},C,C.exports,t,r,i,u)}return i[x].exports}for(var h=typeof ur=="function"&&ur,v=0;v<u.length;v++)a(u[v]);return a}return t})()({1:[function(t,r,i){const u=t("./utils"),a=(function(){const h=u.stringToArray,v=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],x=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],D=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],P=["Thousand","Million","Billion","Trillion"];function E(S,R){var T=function(B,N,L){var q="";if(B<=19)q=(N?" and ":"")+(L?x[B]:v[B]);else if(B<100){const le=Math.floor(B/10),se=B%10;q=(N?" and ":"")+D[le-2],se>0?q+="-"+T(se,!1,L):L&&(q=q.substring(0,q.length-1)+"ieth")}else if(B<1e3){const le=Math.floor(B/100),se=B%100;q=(N?", ":"")+v[le]+" Hundred",se>0?q+=T(se,!0,L):L&&(q+="th")}else{var V=Math.floor(Math.log10(B)/3);V>P.length&&(V=P.length);const le=Math.pow(10,V*3),se=Math.floor(B/le),K=B-se*le;q=(N?", ":"")+T(se,!1,!1)+" "+P[V-1],K>0?q+=T(K,!0,L):L&&(q+="th")}return q},M=T(S,!1,R);return M}const C=Object.create(null);v.forEach(function(S,R){C[S.toLowerCase()]=R}),x.forEach(function(S,R){C[S.toLowerCase()]=R}),D.forEach(function(S,R){const T=S.toLowerCase();C[T]=(R+2)*10,C[T.substring(0,S.length-1)+"ieth"]=C[T]}),C.hundredth=100,P.forEach(function(S,R){const T=S.toLowerCase(),M=Math.pow(10,(R+1)*3);C[T]=M,C[T+"th"]=M});function O(S){const T=S.split(/,\s|\sand\s|[\s\\-]/).map(N=>C[N]);let M=[0];return T.forEach(N=>{if(N<100){let L=M.pop();L>=1e3&&(M.push(L),L=0),M.push(L+N)}else M.push(M.pop()*N)}),M.reduce((N,L)=>N+L,0)}const G=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],ee={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function J(S){for(var R=0;R<G.length;R++){const T=G[R];if(S>=T[0])return T[1]+J(S-T[0])}return""}function _(S){for(var R=0,T=1,M=S.length-1;M>=0;M--){const B=S[M],N=ee[B];N<T?R-=N:(T=N,R+=N)}return R}function g(S,R){for(var T=[],M=R.charCodeAt(0);S>0;)T.unshift(String.fromCharCode((S-1)%26+M)),S=Math.floor((S-1)/26);return T.join("")}function U(S,R){for(var T=R.charCodeAt(0),M=0,B=0;B<S.length;B++)M+=(S.charCodeAt(S.length-B-1)-T+1)*Math.pow(26,B);return M}function w(S,R){if(typeof S>"u")return;S=Math.floor(S);const T=ne(R);return F(S,T)}const k={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},W={UPPER:"upper",LOWER:"lower",TITLE:"title"};function F(S,R){let T;const M=S<0;switch(S=Math.abs(S),R.primary){case k.LETTERS:T=g(S,R.case===W.UPPER?"A":"a");break;case k.ROMAN:T=J(S),R.case===W.UPPER&&(T=T.toUpperCase());break;case k.WORDS:T=E(S,R.ordinal),R.case===W.UPPER?T=T.toUpperCase():R.case===W.LOWER&&(T=T.toLowerCase());break;case k.DECIMAL:T=""+S;var B=R.mandatoryDigits-T.length;if(B>0){var N=new Array(B+1).join("0");T=N+T}if(R.zeroCode!==48&&(T=h(T).map(le=>String.fromCodePoint(le.codePointAt(0)+R.zeroCode-48)).join("")),R.regular){const le=Math.floor((T.length-1)/R.groupingSeparators.position);for(let se=le;se>0;se--){const K=T.length-se*R.groupingSeparators.position;T=T.substr(0,K)+R.groupingSeparators.character+T.substr(K)}}else R.groupingSeparators.reverse().forEach(le=>{const se=T.length-le.position;T=T.substr(0,se)+le.character+T.substr(se)});if(R.ordinal){var L={1:"st",2:"nd",3:"rd"},q=T[T.length-1],V=L[q];(!V||T.length>1&&T[T.length-2]==="1")&&(V="th"),T=T+V}break;case k.SEQUENCE:throw{code:"D3130",value:R.token}}return M&&(T="-"+T),T}const Z=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function ne(S){const R={type:"integer",primary:k.DECIMAL,case:W.LOWER,ordinal:!1};let T,M;const B=S.lastIndexOf(";");switch(B===-1?T=S:(T=S.substring(0,B),M=S.substring(B+1),M[0]==="o"&&(R.ordinal=!0)),T){case"A":R.case=W.UPPER;case"a":R.primary=k.LETTERS;break;case"I":R.case=W.UPPER;case"i":R.primary=k.ROMAN;break;case"W":R.case=W.UPPER,R.primary=k.WORDS;break;case"Ww":R.case=W.TITLE,R.primary=k.WORDS;break;case"w":R.primary=k.WORDS;break;default:{let N=null,L=0,q=0,V=[],le=0;if(h(T).map(K=>K.codePointAt(0)).reverse().forEach(K=>{let X=!1;for(let oe=0;oe<Z.length;oe++){const Y=Z[oe];if(K>=Y&&K<=Y+9){if(X=!0,L++,le++,N===null)N=Y;else if(Y!==N)throw{code:"D3131"};break}}X||(K===35?(le++,q++):V.push({position:le,character:String.fromCodePoint(K)}))}),L>0){R.primary=k.DECIMAL,R.zeroCode=N,R.mandatoryDigits=L,R.optionalDigits=q;const X=function(oe){if(oe.length===0)return 0;const Y=oe[0].character;for(let Ue=1;Ue<oe.length;Ue++)if(oe[Ue].character!==Y)return 0;const Ne=oe.map(Ue=>Ue.position),Ze=function(Ue,Be){return Be===0?Ue:Ze(Be,Ue%Be)},Ge=Ne.reduce(Ze);for(let Ue=1;Ue<=Ne.length;Ue++)if(Ne.indexOf(Ue*Ge)===-1)return 0;return Ge}(V);X>0?(R.regular=!0,R.groupingSeparators={position:X,character:V[0].character}):(R.regular=!1,R.groupingSeparators=V)}else R.primary=k.SEQUENCE,R.token=T}}return R}const we={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function pe(S){var R=[];const T={type:"datetime",parts:R},M=function(X,oe){if(oe>X){let Y=S.substring(X,oe);Y=Y.split("]]").join("]"),R.push({type:"literal",value:Y})}};for(var B=0,N=0;N<S.length;){if(S.charAt(N)==="["){if(S.charAt(N+1)==="["){M(B,N),R.push({type:"literal",value:"["}),N+=2,B=N;continue}if(M(B,N),B=N,N=S.indexOf("]",B),N===-1)throw{code:"D3135"};let X=S.substring(B+1,N);X=X.split(/\s+/).join("");var L={type:"marker",component:X.charAt(0)},q=X.lastIndexOf(","),V;if(q!==-1){const oe=X.substring(q+1),Y=oe.indexOf("-");let Ne,Ze;const Ge=function(Be){if(!(typeof Be>"u"||Be==="*"))return parseInt(Be)};Y===-1?Ne=oe:(Ne=oe.substring(0,Y),Ze=oe.substring(Y+1));const Ue={min:Ge(Ne),max:Ge(Ze)};L.width=Ue,V=X.substring(1,q)}else V=X.substring(1);if(V.length===1)L.presentation1=V;else if(V.length>1){var le=V.charAt(V.length-1);"atco".indexOf(le)!==-1?(L.presentation2=le,le==="o"&&(L.ordinal=!0),L.presentation1=V.substring(0,V.length-1)):L.presentation1=V}else L.presentation1=we[L.component];if(typeof L.presentation1>"u")throw{code:"D3132",value:L.component};if(L.presentation1[0]==="n")L.names=W.LOWER;else if(L.presentation1[0]==="N")L.presentation1[1]==="n"?L.names=W.TITLE:L.names=W.UPPER;else if("YMDdFWwXxHhmsf".indexOf(L.component)!==-1){var se=L.presentation1;if(L.presentation2&&(se+=";"+L.presentation2),L.integerFormat=ne(se),L.width&&L.width.min!==void 0&&L.integerFormat.mandatoryDigits<L.width.min&&(L.integerFormat.mandatoryDigits=L.width.min),L.component==="Y")if(L.n=-1,L.width&&L.width.max!==void 0)L.n=L.width.max,L.integerFormat.mandatoryDigits=L.n;else{var K=L.integerFormat.mandatoryDigits+L.integerFormat.optionalDigits;K>=2&&(L.n=K)}const oe=R[R.length-1];oe&&oe.integerFormat&&(oe.integerFormat.parseWidth=oe.integerFormat.mandatoryDigits)}(L.component==="Z"||L.component==="z")&&(L.integerFormat=ne(L.presentation1)),R.push(L),B=N+1}N++}return M(B,N),T}const he=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Ye=1e3*60*60*24,ae=function(S){const R=Date.UTC(S.year,S.month);var T=new Date(R).getUTCDay();return T===0&&(T=7),T>4?R+(8-T)*Ye:R-(T-1)*Ye},de=function(S,R){return{year:S,month:R,nextMonth:function(){return R===11?de(S+1,0):de(S,R+1)},previousMonth:function(){return R===0?de(S-1,11):de(S,R-1)},nextYear:function(){return de(S+1,R)},previousYear:function(){return de(S-1,R)}}},He=function(S,R){return(R-S)/(Ye*7)+1},te=(S,R)=>{let T;switch(R){case"Y":T=S.getUTCFullYear();break;case"M":T=S.getUTCMonth()+1;break;case"D":T=S.getUTCDate();break;case"d":{const M=Date.UTC(S.getUTCFullYear(),S.getUTCMonth(),S.getUTCDate()),B=Date.UTC(S.getUTCFullYear(),0);T=(M-B)/Ye+1;break}case"F":T=S.getUTCDay(),T===0&&(T=7);break;case"W":{const M=de(S.getUTCFullYear(),0),B=ae(M),N=Date.UTC(M.year,S.getUTCMonth(),S.getUTCDate());let L=He(B,N);if(L>52){const q=ae(M.nextYear());N>=q&&(L=1)}else if(L<1){const q=ae(M.previousYear());L=He(q,N)}T=Math.floor(L);break}case"w":{const M=de(S.getUTCFullYear(),S.getUTCMonth()),B=ae(M),N=Date.UTC(M.year,M.month,S.getUTCDate());let L=He(B,N);if(L>4){const q=ae(M.nextMonth());N>=q&&(L=1)}else if(L<1){const q=ae(M.previousMonth());L=He(q,N)}T=Math.floor(L);break}case"X":{const M=de(S.getUTCFullYear(),0),B=ae(M),N=ae(M.nextYear()),L=S.getTime();L<B?T=M.year-1:L>=N?T=M.year+1:T=M.year;break}case"x":{const M=de(S.getUTCFullYear(),S.getUTCMonth()),B=ae(M),N=M.nextMonth(),L=ae(N),q=S.getTime();q<B?T=M.previousMonth().month+1:q>=L?T=N.month+1:T=M.month+1;break}case"H":T=S.getUTCHours();break;case"h":T=S.getUTCHours(),T=T%12,T===0&&(T=12);break;case"P":T=S.getUTCHours()>=12?"pm":"am";break;case"m":T=S.getUTCMinutes();break;case"s":T=S.getUTCSeconds();break;case"f":T=S.getUTCMilliseconds();break;case"Z":case"z":break;case"C":T="ISO";break;case"E":T="ISO";break}return T};let xe=null;function rt(S,R,T){var M=0,B=0;if(typeof T<"u"){const se=parseInt(T);M=Math.floor(se/100),B=se%100}var N=function(se,K){var X=te(se,K.component);if("YMDdFWwXxHhms".indexOf(K.component)!==-1)if(K.component==="Y"&&K.n!==-1&&(X=X%Math.pow(10,K.n)),K.names){if(K.component==="M"||K.component==="x")X=Pe[X-1];else if(K.component==="F")X=he[X];else throw{code:"D3133",value:K.component};K.names===W.UPPER?X=X.toUpperCase():K.names===W.LOWER&&(X=X.toLowerCase()),K.width&&X.length>K.width.max&&(X=X.substring(0,K.width.max))}else X=F(X,K.integerFormat);else if(K.component==="f")X=F(X,K.integerFormat);else if(K.component==="Z"||K.component==="z"){const oe=M*100+B;if(K.integerFormat.regular)X=F(oe,K.integerFormat);else{const Y=K.integerFormat.mandatoryDigits;if(Y===1||Y===2)X=F(M,K.integerFormat),B!==0&&(X+=":"+w(B,"00"));else if(Y===3||Y===4)X=F(oe,K.integerFormat);else throw{code:"D3134",value:Y}}oe>=0&&(X="+"+X),K.component==="z"&&(X="GMT"+X),oe===0&&K.presentation2==="t"&&(X="Z")}else K.component==="P"&&K.names===W.UPPER&&(X=X.toUpperCase());return X};let L;typeof R>"u"?(xe===null&&(xe=pe("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),L=xe):L=pe(R);const q=(60*M+B)*60*1e3,V=new Date(S+q);let le="";return L.parts.forEach(function(se){se.type==="literal"?le+=se.value:le+=N(V,se)}),le}function d(S){var R=Object.create(null);if(S.type==="datetime")R.type="datetime",R.parts=S.parts.map(function(T){var M=Object.create(null);if(T.type==="literal")M.regex=T.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(T.component==="Z"||T.component==="z"){let N;Array.isArray(T.integerFormat.groupingSeparators)||(N=T.integerFormat.groupingSeparators),M.regex="",T.component==="z"&&(M.regex="GMT"),M.regex+="[-+][0-9]+",N&&(M.regex+=N.character+"[0-9]+"),M.parse=function(L){T.component==="z"&&(L=L.substring(3));let q=0,V=0;return N?(q=Number.parseInt(L.substring(0,L.indexOf(N.character))),V=Number.parseInt(L.substring(L.indexOf(N.character)+1))):L.length-1<=2?q=Number.parseInt(L):(q=Number.parseInt(L.substring(0,3)),V=Number.parseInt(L.substring(3))),q*60+V}}else if(T.component==="f")M.regex="[0-9]+",M.parse=function(N){return parseFloat("0."+N.substring(0,3))*1e3};else if(T.integerFormat)M=d(T.integerFormat);else{M.regex="[a-zA-Z]+";var B=Object.create(null);if(T.component==="M"||T.component==="x")Pe.forEach(function(N,L){T.width&&T.width.max?B[N.substring(0,T.width.max)]=L+1:B[N]=L+1});else if(T.component==="F")he.forEach(function(N,L){L>0&&(T.width&&T.width.max?B[N.substring(0,T.width.max)]=L:B[N]=L)});else if(T.component==="P")B={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:T.component};M.parse=function(N){return B[N]}}return M.component=T.component,M});else{R.type="integer";const T=S.case===W.UPPER;switch(S.primary){case k.LETTERS:R.regex=T?"[A-Z]+":"[a-z]+",R.parse=function(M){return U(M,T?"A":"a")};break;case k.ROMAN:R.regex=T?"[MDCLXVI]+":"[mdclxvi]+",R.parse=function(M){return _(T?M:M.toUpperCase())};break;case k.WORDS:R.regex="(?:"+u.keys(C).concat("and","[\\-, ]").join("|")+")+",R.parse=function(M){return O(M.toLowerCase())};break;case k.DECIMAL:R.regex="[0-9]",S.parseWidth?R.regex+=`{${S.parseWidth}}`:R.regex+="+",S.ordinal&&(R.regex+="(?:th|st|nd|rd)"),R.parse=function(M){let B=M;return S.ordinal&&(B=M.substring(0,M.length-2)),S.regular?B=B.split(",").join(""):S.groupingSeparators.forEach(N=>{B=B.split(N.character).join("")}),S.zeroCode!==48&&(B=B.split("").map(N=>String.fromCodePoint(N.codePointAt(0)-S.zeroCode+48)).join("")),parseInt(B)};break;case k.SEQUENCE:throw{code:"D3130",value:S.token}}}return R}function b(S,R){if(typeof S>"u")return;const T=ne(R);return d(T).parse(S)}function z(S,R){const T=pe(R),M=d(T),B="^"+M.parts.map(V=>"("+V.regex+")").join("")+"$";var L=new RegExp(B,"i").exec(S);if(L!==null){const Y=Object.create(null);for(let c=1;c<L.length;c++){const f=M.parts[c-1];f.parse&&(Y[f.component]=f.parse(L[c]))}if(Object.getOwnPropertyNames(Y).length===0)return;let Ne=0;const Ze=c=>{Ne<<=1,Ne+=c?1:0},Ge=c=>!(~c&Ne)&&!!(c&Ne);"YXMxWwdD".split("").forEach(c=>Ze(Y[c]));const Be=!Ge(161)&&Ge(130),ot=Ge(84),Ct=!ot&&Ge(72);Ne=0,"PHhmsf".split("").forEach(c=>Ze(Y[c]));const j=!Ge(23)&&Ge(47),et=(Be?"YD":ot?"XxwF":Ct?"XWF":"YMD")+(j?"Phmsf":"Hmsf"),Yt=this.environment.timestamp;let nt=!1,bt=!1;if(et.split("").forEach(c=>{if(typeof Y[c]>"u")nt?(Y[c]="MDd".indexOf(c)!==-1?1:0,bt=!0):Y[c]=te(Yt,c);else if(nt=!0,bt)throw{code:"D3136"}}),Y.M>0?Y.M-=1:Y.M=0,Be){const c=Date.UTC(Y.Y,0),f=(Y.d-1)*1e3*60*60*24,p=new Date(c+f);Y.M=p.getUTCMonth(),Y.D=p.getUTCDate()}if(ot)throw{code:"D3136"};if(Ct)throw{code:"D3136"};j&&(Y.H=Y.h===12?0:Y.h,Y.P===1&&(Y.H+=12));var q=Date.UTC(Y.Y,Y.M,Y.D,Y.H,Y.m,Y.s,Y.f);return(Y.Z||Y.z)&&(q-=(Y.Z||Y.z)*60*1e3),q}}var ce=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function Ee(S,R){if(!(typeof S>"u"))if(typeof R>"u"){if(!ce.test(S))throw{stack:new Error().stack,code:"D3110",value:S};return Date.parse(S)}else return z.call(this,S,R)}function ye(S,R,T){if(!(typeof S>"u"))return rt.call(this,S,R,T)}return{formatInteger:w,parseInteger:b,fromMillis:ye,toMillis:Ee}})();r.exports=a},{"./utils":6}],2:[function(t,r,i){(function(u){(function(){var a=t("./utils");const h=(()=>{var v=a.isNumeric,x=a.isArrayOfStrings,D=a.isArrayOfNumbers,P=a.isSequence,E=a.isFunction,C=a.isLambda,O=a.isPromise,G=a.getFunctionArity,ee=a.isDeepEqual,J=a.stringToArray;function _(s){if(!(typeof s>"u")){var o=0;return s.forEach(function(l){o+=l}),o}}function g(s){return typeof s>"u"?0:s.length}function U(s){if(!(typeof s>"u"||s.length===0))return Math.max.apply(Math,s)}function w(s){if(!(typeof s>"u"||s.length===0))return Math.min.apply(Math,s)}function k(s){if(!(typeof s>"u"||s.length===0)){var o=0;return s.forEach(function(l){o+=l}),o/s.length}}function W(s,o=!1){if(!(typeof s>"u")){var l;if(typeof s=="string")l=s;else if(E(s))l="";else{if(typeof s=="number"&&!isFinite(s))throw{code:"D3001",value:s,stack:new Error().stack};var y=o?2:0;Array.isArray(s)&&s.outerWrapper&&(s=s[0]),l=JSON.stringify(s,function(m,A){return typeof A<"u"&&A!==null&&v(A)?A.toPrecision&&!Number.isInteger(A)?Number(A.toPrecision(15)):A:A&&E(A)?"":A},y)}return l}}function F(s,o,l){if(!(typeof s>"u")){var y=J(s),m=y.length;if(m+o<0&&(o=0),typeof l<"u"){if(l<=0)return"";var A=o>=0?o+l:m+o+l;return y.slice(o,A).join("")}return y.slice(o).join("")}}function Z(s,o){if(!(typeof s>"u")){var l=s.indexOf(o);return l>-1?s.substr(0,l):s}}function ne(s,o){if(!(typeof s>"u")){var l=s.indexOf(o);return l>-1?s.substr(l+o.length):s}}function we(s){if(!(typeof s>"u"))return s.toLowerCase()}function pe(s){if(!(typeof s>"u"))return s.toUpperCase()}function he(s){if(!(typeof s>"u"))return J(s).length}function Pe(s){if(!(typeof s>"u")){var o=s.replace(/[ \t\n\r]+/gm," ");return o.charAt(0)===" "&&(o=o.substring(1)),o.charAt(o.length-1)===" "&&(o=o.substring(0,o.length-1)),o}}function Ye(s,o,l){if(!(typeof s>"u")){(typeof l>"u"||l.length===0)&&(l=" ");var y;o=Math.trunc(o);var m=Math.abs(o)-he(s);if(m>0){var A=new Array(m+1).join(l);l.length>1&&(A=F(A,0,m)),o>0?y=s+A:y=A+s}else y=s;return y}}async function ae(s,o){var l=s.apply(this,[o]);if(O(l)&&(l=await l),l&&!(typeof l.start=="number"||l.end==="number"||Array.isArray(l.groups)||E(l.next)))throw{code:"T1010",stack:new Error().stack};return l}async function de(s,o){if(!(typeof s>"u"||typeof o>"u")){var l;if(typeof o=="string")l=s.indexOf(o)!==-1;else{var y=await ae(o,s);l=typeof y<"u"}return l}}async function He(s,o,l){if(!(typeof s>"u")){if(l<0)throw{stack:new Error().stack,value:l,code:"D3040",index:3};var y=this.createSequence();if(typeof l>"u"||l>0){var m=0,A=await ae(o,s);if(typeof A<"u")for(;typeof A<"u"&&(typeof l>"u"||m<l);)y.push({match:A.match,index:A.start,groups:A.groups}),A=await ae(A.next),m++}return y}}async function te(s,o,l,y){if(!(typeof s>"u")){var m=this;if(o==="")throw{code:"D3010",stack:new Error().stack,value:o,index:2};if(y<0)throw{code:"D3011",stack:new Error().stack,value:y,index:4};var A;typeof l=="string"?A=function(Se){for(var De="",ge=0,Ce=l.indexOf("$",ge);Ce!==-1&&ge<l.length;){De+=l.substring(ge,Ce),ge=Ce+1;var Qe=l.charAt(ge);if(Qe==="$")De+="$",ge++;else if(Qe==="0")De+=Se.match,ge++;else{var qe;if(Se.groups.length===0?qe=1:qe=Math.floor(Math.log(Se.groups.length)*Math.LOG10E)+1,Ce=parseInt(l.substring(ge,ge+qe),10),qe>1&&Ce>Se.groups.length&&(Ce=parseInt(l.substring(ge,ge+qe-1),10)),isNaN(Ce))De+="$";else{if(Se.groups.length>0){var it=Se.groups[Ce-1];typeof it<"u"&&(De+=it)}ge+=Ce.toString().length}}Ce=l.indexOf("$",ge)}return De+=l.substring(ge),De}:A=l;var $="",I=0;if(typeof y>"u"||y>0){var re=0;if(typeof o=="string"){for(var H=s.indexOf(o,I);H!==-1&&(typeof y>"u"||re<y);)$+=s.substring(I,H),$+=l,I=H+o.length,re++,H=s.indexOf(o,I);$+=s.substring(I)}else{var be=await ae(o,s);if(typeof be<"u"){for(;typeof be<"u"&&(typeof y>"u"||re<y);){$+=s.substring(I,be.start);var _e=A.apply(m,[be]);if(O(_e)&&(_e=await _e),typeof _e=="string")$+=_e;else throw{code:"D3012",stack:new Error().stack,value:_e};I=be.start+be.match.length,re++,be=await ae(be.next)}$+=s.substring(I)}else $=s}}else $=s;return $}}function xe(s){if(!(typeof s>"u")){var o=typeof window<"u"?window.btoa:function(l){return new u.Buffer.from(l,"binary").toString("base64")};return o(s)}}function rt(s){if(!(typeof s>"u")){var o=typeof window<"u"?window.atob:function(l){return new u.Buffer.from(l,"base64").toString("binary")};return o(s)}}function d(s){if(!(typeof s>"u")){var o;try{o=encodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrlComponent"}}return o}}function b(s){if(!(typeof s>"u")){var o;try{o=encodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrl"}}return o}}function z(s){if(!(typeof s>"u")){var o;try{o=decodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrlComponent"}}return o}}function ce(s){if(!(typeof s>"u")){var o;try{o=decodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrl"}}return o}}async function Ee(s,o,l){if(!(typeof s>"u")){if(l<0)throw{code:"D3020",stack:new Error().stack,value:l,index:3};var y=[];if(typeof l>"u"||l>0)if(typeof o=="string")y=s.split(o,l);else{var m=0,A=await ae(o,s);if(typeof A<"u"){for(var $=0;typeof A<"u"&&(typeof l>"u"||m<l);)y.push(s.substring($,A.start)),$=A.end,A=await ae(A.next),m++;(typeof l>"u"||m<l)&&y.push(s.substring($))}else y.push(s)}return y}}function ye(s,o){if(!(typeof s>"u"))return typeof o>"u"&&(o=""),s.join(o)}function S(s,o,l){if(!(typeof s>"u")){var y={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},m=y;typeof l<"u"&&a.keys(l).forEach(function(Q){m[Q]=l[Q]});for(var A=[],$=m["zero-digit"].charCodeAt(0),I=$;I<$+10;I++)A.push(String.fromCharCode(I));var re=A.concat([m["decimal-separator"],m["exponent-separator"],m["grouping-separator"],m.digit,m["pattern-separator"]]),H=o.split(m["pattern-separator"]);if(H.length>2)throw{code:"D3080",stack:new Error().stack};var be=function(Q){var ke=(function(){for(var Me,Ke=0;Ke<Q.length;Ke++)if(Me=Q.charAt(Ke),re.indexOf(Me)!==-1&&Me!==m["exponent-separator"])return Q.substring(0,Ke);return""})(),We=(function(){for(var Me,Ke=Q.length-1;Ke>=0;Ke--)if(Me=Q.charAt(Ke),re.indexOf(Me)!==-1&&Me!==m["exponent-separator"])return Q.substring(Ke+1);return""})(),Ae=Q.substring(ke.length,Q.length-We.length),Ve,pt,Xe,wt,Je=Q.indexOf(m["exponent-separator"],ke.length);Je===-1||Je>Q.length-We.length?(Ve=Ae,pt=void 0):(Ve=Ae.substring(0,Je),pt=Ae.substring(Je+1));var tt=Ve.indexOf(m["decimal-separator"]);return tt===-1?(Xe=Ve,wt=We):(Xe=Ve.substring(0,tt),wt=Ve.substring(tt+1)),{prefix:ke,suffix:We,activePart:Ae,mantissaPart:Ve,exponentPart:pt,integerPart:Xe,fractionalPart:wt,subpicture:Q}},_e=function(Q){var ke,We,Ae=Q.subpicture,Ve=Ae.indexOf(m["decimal-separator"]);Ve!==Ae.lastIndexOf(m["decimal-separator"])&&(ke="D3081"),Ae.indexOf(m.percent)!==Ae.lastIndexOf(m.percent)&&(ke="D3082"),Ae.indexOf(m["per-mille"])!==Ae.lastIndexOf(m["per-mille"])&&(ke="D3083"),Ae.indexOf(m.percent)!==-1&&Ae.indexOf(m["per-mille"])!==-1&&(ke="D3084");var pt=!1;for(We=0;We<Q.mantissaPart.length;We++){var Xe=Q.mantissaPart.charAt(We);if(A.indexOf(Xe)!==-1||Xe===m.digit){pt=!0;break}}pt||(ke="D3085");var wt=Q.activePart.split("").map(function(Me){return re.indexOf(Me)===-1?"p":"a"}).join("");wt.indexOf("p")!==-1&&(ke="D3086"),Ve!==-1?(Ae.charAt(Ve-1)===m["grouping-separator"]||Ae.charAt(Ve+1)===m["grouping-separator"])&&(ke="D3087"):Q.integerPart.charAt(Q.integerPart.length-1)===m["grouping-separator"]&&(ke="D3088"),Ae.indexOf(m["grouping-separator"]+m["grouping-separator"])!==-1&&(ke="D3089");var Je=Q.integerPart.indexOf(m.digit);Je!==-1&&Q.integerPart.substring(0,Je).split("").filter(function(Me){return A.indexOf(Me)>-1}).length>0&&(ke="D3090"),Je=Q.fractionalPart.lastIndexOf(m.digit),Je!==-1&&Q.fractionalPart.substring(Je).split("").filter(function(Me){return A.indexOf(Me)>-1}).length>0&&(ke="D3091");var tt=typeof Q.exponentPart=="string";if(tt&&Q.exponentPart.length>0&&(Ae.indexOf(m.percent)!==-1||Ae.indexOf(m["per-mille"])!==-1)&&(ke="D3092"),tt&&(Q.exponentPart.length===0||Q.exponentPart.split("").filter(function(Me){return A.indexOf(Me)===-1}).length>0)&&(ke="D3093"),ke)throw{code:ke,stack:new Error().stack}},Se=function(Q){var ke=function(Ie,wr){for(var Zt=[],ut=Ie.indexOf(m["grouping-separator"]);ut!==-1;){var Er=(wr?Ie.substring(0,ut):Ie.substring(ut)).split("").filter(function(Ut){return A.indexOf(Ut)!==-1||Ut===m.digit}).length;Zt.push(Er),ut=Q.integerPart.indexOf(m["grouping-separator"],ut+1)}return Zt},We=ke(Q.integerPart),Ae=function(Ie){if(Ie.length===0)return 0;for(var wr=function(Er,Ut){return Ut===0?Er:wr(Ut,Er%Ut)},Zt=Ie.reduce(wr),ut=1;ut<=Ie.length;ut++)if(Ie.indexOf(ut*Zt)===-1)return 0;return Zt},Ve=Ae(We),pt=ke(Q.fractionalPart,!0),Xe=Q.integerPart.split("").filter(function(Ie){return A.indexOf(Ie)!==-1}).length,wt=Xe,Je=Q.fractionalPart.split(""),tt=Je.filter(function(Ie){return A.indexOf(Ie)!==-1}).length,Me=Je.filter(function(Ie){return A.indexOf(Ie)!==-1||Ie===m.digit}).length,Ke=typeof Q.exponentPart=="string";Xe===0&&Me===0&&(Ke?(tt=1,Me=1):Xe=1),Ke&&Xe===0&&Q.integerPart.indexOf(m.digit)!==-1&&(Xe=1),Xe===0&&tt===0&&(tt=1);var ai=0;return Ke&&(ai=Q.exponentPart.split("").filter(function(Ie){return A.indexOf(Ie)!==-1}).length),{integerPartGroupingPositions:We,regularGrouping:Ve,minimumIntegerPartSize:Xe,scalingFactor:wt,prefix:Q.prefix,fractionalPartGroupingPositions:pt,minimumFactionalPartSize:tt,maximumFactionalPartSize:Me,minimumExponentSize:ai,suffix:Q.suffix,picture:Q.subpicture}},De=H.map(be);De.forEach(_e);var ge=De.map(Se),Ce=m["minus-sign"],Qe=m["zero-digit"],qe=m["decimal-separator"],it=m["grouping-separator"];ge.length===1&&(ge.push(JSON.parse(JSON.stringify(ge[0]))),ge[1].prefix=Ce+ge[1].prefix);var Oe;s>=0?Oe=ge[0]:Oe=ge[1];var Jt;Oe.picture.indexOf(m.percent)!==-1?Jt=s*100:Oe.picture.indexOf(m["per-mille"])!==-1?Jt=s*1e3:Jt=s;var dt,Lt;if(Oe.minimumExponentSize===0)dt=Jt;else{var pa=Math.pow(10,Oe.scalingFactor),ma=Math.pow(10,Oe.scalingFactor-1);if(dt=Jt,Lt=0,dt!==0){for(;Math.abs(dt)<ma;)dt*=10,Lt-=1;for(;Math.abs(dt)>pa;)dt/=10,Lt+=1}}var ga=L(dt,Oe.maximumFactionalPartSize),ii=function(Q,ke){var We=Math.abs(Q).toFixed(ke);return Qe!=="0"&&(We=We.split("").map(function(Ae){return Ae>="0"&&Ae<="9"?A[Ae.charCodeAt(0)-48]:Ae}).join("")),We},ie=ii(ga,Oe.maximumFactionalPartSize),je=ie.indexOf(".");for(je===-1?ie=ie+qe:ie=ie.replace(".",qe);ie.charAt(0)===Qe;)ie=ie.substring(1);for(;ie.charAt(ie.length-1)===Qe;)ie=ie.substring(0,ie.length-1);je=ie.indexOf(qe);var Kt=Oe.minimumIntegerPartSize-je,si=Oe.minimumFactionalPartSize-(ie.length-je-1);if(ie=(Kt>0?new Array(Kt+1).join(Qe):"")+ie,ie=ie+(si>0?new Array(si+1).join(Qe):""),je=ie.indexOf(qe),Oe.regularGrouping>0)for(var va=Math.floor((je-1)/Oe.regularGrouping),yr=1;yr<=va;yr++)ie=[ie.slice(0,je-yr*Oe.regularGrouping),it,ie.slice(je-yr*Oe.regularGrouping)].join("");else Oe.integerPartGroupingPositions.forEach(function(Q){ie=[ie.slice(0,je-Q),it,ie.slice(je-Q)].join(""),je++});if(je=ie.indexOf(qe),Oe.fractionalPartGroupingPositions.forEach(function(Q){ie=[ie.slice(0,Q+je+1),it,ie.slice(Q+je+1)].join("")}),je=ie.indexOf(qe),(Oe.picture.indexOf(qe)===-1||je===ie.length-1)&&(ie=ie.substring(0,ie.length-1)),typeof Lt<"u"){var br=ii(Lt,0);Kt=Oe.minimumExponentSize-br.length,Kt>0&&(br=new Array(Kt+1).join(Qe)+br),ie=ie+m["exponent-separator"]+(Lt<0?Ce:"")+br}return ie=Oe.prefix+ie+Oe.suffix,ie}}function R(s,o){if(!(typeof s>"u")){if(s=L(s),typeof o>"u"?o=10:o=L(o),o<2||o>36)throw{code:"D3100",stack:new Error().stack,value:o};var l=s.toString(o);return l}}function T(s){var o;if(!(typeof s>"u")){if(typeof s=="number")o=s;else if(typeof s=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(s)&&!isNaN(parseFloat(s))&&isFinite(s))o=parseFloat(s);else if(typeof s=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(s))o=Number(s);else if(s===!0)o=1;else if(s===!1)o=0;else throw{code:"D3030",value:s,stack:new Error().stack,index:1};return o}}function M(s){var o;if(!(typeof s>"u"))return o=Math.abs(s),o}function B(s){var o;if(!(typeof s>"u"))return o=Math.floor(s),o}function N(s){var o;if(!(typeof s>"u"))return o=Math.ceil(s),o}function L(s,o){var l;if(!(typeof s>"u")){if(o){var y=s.toString().split("e");s=+(y[0]+"e"+(y[1]?+y[1]+o:o))}l=Math.round(s);var m=l-s;return Math.abs(m)===.5&&Math.abs(l%2)===1&&(l=l-1),o&&(y=l.toString().split("e"),l=+(y[0]+"e"+(y[1]?+y[1]-o:-o))),Object.is(l,-0)&&(l=0),l}}function q(s){var o;if(!(typeof s>"u")){if(s<0)throw{stack:new Error().stack,code:"D3060",index:1,value:s};return o=Math.sqrt(s),o}}function V(s,o){var l;if(!(typeof s>"u")){if(l=Math.pow(s,o),!isFinite(l))throw{stack:new Error().stack,code:"D3061",index:1,value:s,exp:o};return l}}function le(){return Math.random()}function se(s){if(!(typeof s>"u")){var o=!1;if(Array.isArray(s)){if(s.length===1)o=se(s[0]);else if(s.length>1){var l=s.filter(function(y){return se(y)});o=l.length>0}}else typeof s=="string"?s.length>0&&(o=!0):v(s)?s!==0&&(o=!0):s!==null&&typeof s=="object"&&!E(s)?a.keys(s).length>0&&(o=!0):typeof s=="boolean"&&s===!0&&(o=!0);return o}}function K(s){if(!(typeof s>"u"))return!se(s)}function X(s,o,l,y){var m=[o],A=G(s);return A>=2&&m.push(l),A>=3&&m.push(y),m}async function oe(s,o){if(!(typeof s>"u")){for(var l=this.createSequence(),y=0;y<s.length;y++){var m=X(o,s[y],y,s),A=await o.apply(this,m);typeof A<"u"&&l.push(A)}return l}}async function Y(s,o){if(!(typeof s>"u")){for(var l=this.createSequence(),y=0;y<s.length;y++){var m=s[y],A=X(o,m,y,s),$=await o.apply(this,A);se($)&&l.push(m)}return l}}async function Ne(s,o){if(!(typeof s>"u")){for(var l=!1,y,m=0;m<s.length;m++){var A=s[m],$=!0;if(typeof o<"u"){var I=X(o,A,m,s),re=await o.apply(this,I);$=se(re)}if($)if(!l)y=A,l=!0;else throw{stack:new Error().stack,code:"D3138",index:m}}if(!l)throw{stack:new Error().stack,code:"D3139"};return y}}function Ze(){for(var s=[],o=Array.prototype.slice.call(arguments),l=Math.min.apply(Math,o.map(function(A){return Array.isArray(A)?A.length:0})),y=0;y<l;y++){var m=o.map(A=>A[y]);s.push(m)}return s}async function Ge(s,o,l){if(!(typeof s>"u")){var y,m=G(o);if(m<2)throw{stack:new Error().stack,code:"D3050",index:1};var A;for(typeof l>"u"&&s.length>0?(y=s[0],A=1):(y=l,A=0);A<s.length;){var $=[y,s[A]];m>=3&&$.push(A),m>=4&&$.push(s),y=await o.apply(this,$),A++}return y}}function Ue(s){var o=this.createSequence();if(Array.isArray(s)){for(var l=Object.create(null),y=0;y<s.length;y++){var m=Ue.call(this,s[y]);m.forEach(function(A){l[A]=!0})}o=Ue.call(this,l)}else s!==null&&typeof s=="object"&&!E(s)&&a.keys(s).forEach(A=>o.push(A));return o}function Be(s,o){var l;if(Array.isArray(s)){l=this.createSequence();for(var y=0;y<s.length;y++){var m=Be.call(this,s[y],o);typeof m<"u"&&(Array.isArray(m)?m.forEach(A=>l.push(A)):l.push(m))}}else s!==null&&typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,o)&&!E(s)&&(l=s[o]);return l}function ot(s,o){if(typeof s>"u")return o;if(typeof o>"u")return s;Array.isArray(s)||(s=this.createSequence(s)),Array.isArray(o)||(o=[o]);const l=s.length+o.length;if(this.options&&l>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};return s.concat(o)}function Ct(s){return!(typeof s>"u")}function Rt(s){var o=this.createSequence();if(Array.isArray(s))for(var l=0;l<s.length;l++)o=ot.call(this,o,Rt.call(this,s[l]));else if(s!==null&&typeof s=="object"&&!C(s))for(const m of a.keys(s)){var y=Object.create(null);y[m]=s[m],o.push(y)}else o=s;return o}function j(s){if(!(typeof s>"u")){var o=Object.create(null);return s.forEach(function(l){for(const y of a.keys(l))o[y]=l[y]}),o}}function gr(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var o=s.length,l=new Array(o),y=0;y<o;y++)l[o-y-1]=s[y];return l}}async function vr(s,o){var l=this.createSequence();for(const A of a.keys(s)){var y=X(o,s[A],A,s),m=await o.apply(this,y);typeof m<"u"&&l.push(m)}return l}function et(s){throw{code:"D3137",stack:new Error().stack,message:s||"$error() function evaluated"}}function Yt(s,o){if(!s)throw{code:"D3141",stack:new Error().stack,message:o||"$assert() statement failed"}}function nt(s){if(s!==void 0)return s===null?"null":v(s)?"number":typeof s=="string"?"string":typeof s=="boolean"?"boolean":Array.isArray(s)?"array":E(s)?"function":"object"}async function bt(s,o){if(!(typeof s>"u")){if(s.length<=1)return s;var l;if(typeof o>"u"){if(!D(s)&&!x(s))throw{stack:new Error().stack,code:"D3070",index:1};l=async function($,I){return $>I}}else l=o;var y=async function($,I){var re=async function(be,_e,Se){_e.length===0?Array.prototype.push.apply(be,Se):Se.length===0?Array.prototype.push.apply(be,_e):await l(_e[0],Se[0])?(be.push(Se[0]),await re(be,_e,Se.slice(1))):(be.push(_e[0]),await re(be,_e.slice(1),Se))},H=[];return await re(H,$,I),H},m=async function($){if(!Array.isArray($)||$.length<=1)return $;var I=Math.floor($.length/2),re=$.slice(0,I),H=$.slice(I);return re=await m(re),H=await m(H),await y(re,H)},A=await m(s);return A}}function c(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var o=new Array(s.length),l=0;l<s.length;l++){var y=Math.floor(Math.random()*(l+1));l!==y&&(o[l]=o[y]),o[y]=s[l]}return o}}function f(s){if(!(typeof s>"u")){if(!Array.isArray(s)||s.length<=1)return s;for(var o=P(s)?this.createSequence():[],l=0;l<s.length;l++){for(var y=s[l],m=!1,A=0;A<o.length;A++)if(ee(y,o[A])){m=!0;break}m||o.push(y)}return o}}async function p(s,o){var l=Object.create(null);for(const $ of a.keys(s)){var y=s[$],m=X(o,y,$,s),A=await o.apply(this,m);se(A)&&(l[$]=y)}return a.keys(l).length===0&&(l=void 0),l}return{sum:_,count:g,max:U,min:w,average:k,string:W,substring:F,substringBefore:Z,substringAfter:ne,lowercase:we,uppercase:pe,length:he,trim:Pe,pad:Ye,match:He,contains:de,replace:te,split:Ee,join:ye,formatNumber:S,formatBase:R,number:T,floor:B,ceil:N,round:L,abs:M,sqrt:q,power:V,random:le,boolean:se,not:K,map:oe,zip:Ze,filter:Y,single:Ne,foldLeft:Ge,sift:p,keys:Ue,lookup:Be,append:ot,exists:Ct,spread:Rt,merge:j,reverse:gr,each:vr,error:et,assert:Yt,type:nt,sort:bt,shuffle:c,distinct:f,base64encode:xe,base64decode:rt,encodeUrlComponent:d,encodeUrl:b,decodeUrlComponent:z,decodeUrl:ce}})();r.exports=h}).call(this)}).call(this,typeof Pn<"u"?Pn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,r,i){var u=t("./datetime"),a=t("./functions"),h=t("./utils"),v=t("./parser"),x=t("./signature"),D=(function(){var P=h.isNumeric,E=h.isArrayOfStrings,C=h.isArrayOfNumbers,O=h.isSequence,G=h.isFunction,ee=h.isLambda,J=h.isIterable,_=h.isPromise,g=h.getFunctionArity,U=h.isDeepEqual,w=et(null);async function k(c,f,p){var s;p.base.depth++,p.base.guardrails();var o=p.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(o&&await o(c,f,p),c.type){case"path":s=await W(c,f,p);break;case"binary":s=await he(c,f,p);break;case"unary":s=await Pe(c,f,p);break;case"name":s=Ye(c,f,p);break;case"string":case"number":case"value":s=ae(c);break;case"wildcard":s=de(c,f,p);break;case"descendant":s=te(c,f,p);break;case"parent":s=p.lookup(c.slot.label);break;case"condition":s=await B(c,f,p);break;case"block":s=await N(c,f,p);break;case"bind":s=await M(c,f,p);break;case"regex":s=L(c,f,p);break;case"function":s=await X(c,f,p);break;case"variable":s=q(c,f,p);break;case"lambda":s=Ne(c,f,p);break;case"partial":s=await Ze(c,f,p);break;case"apply":s=await K(c,f,p);break;case"transform":s=le(c,f,p);break}if(Object.prototype.hasOwnProperty.call(c,"predicate"))for(var l=0;l<c.predicate.length;l++)s=await pe(c.predicate[l].expr,s,p);c.type!=="path"&&Object.prototype.hasOwnProperty.call(c,"group")&&(s=await S(c.group,s,p));var y=p.lookup(Symbol.for("jsonata.__evaluate_exit"));return y&&await y(c,f,p,s),s&&O(s)&&!s.tupleStream&&(c.keepArray&&(s.keepSingleton=!0),s.length===0?s=void 0:s.length===1&&(s=s.keepSingleton?s:s[0])),p.base.depth--,s}async function W(c,f,p){var s;Array.isArray(f)&&c.steps[0].type!=="variable"?s=f:s=p.base.createSequence(f);for(var o,l=!1,y=void 0,m=0;m<c.steps.length;m++){var A=c.steps[m];if(A.tuple&&(l=!0),m===0&&A.consarray?o=await k(A,s,p):l?y=await we(A,s,y,p):o=await Z(A,s,p,m===c.steps.length-1),!l&&(typeof o>"u"||o.length===0))break;typeof A.focus>"u"&&(s=o)}if(l)if(c.tuple)o=y;else for(o=p.base.createSequence(),m=0;m<y.length;m++)o.push(y[m]["@"]);return c.keepSingletonArray&&(Array.isArray(o)&&o.cons&&!o.sequence&&(o=p.base.createSequence(o)),o.keepSingleton=!0),Object.prototype.hasOwnProperty.call(c,"group")&&(o=await S(c.group,l?y:o,p)),o}function F(c,f){var p=et(c);for(const s of h.keys(f))p.bind(s,f[s]);return p}async function Z(c,f,p,s){var o;if(c.type==="sort")return o=await V(c,f,p),c.stages&&(o=await ne(c.stages,o,p)),o;o=p.base.createSequence();for(var l=0;l<f.length;l++){var y=await k(c,f[l],p);if(c.stages)for(var m=0;m<c.stages.length;m++)y=await pe(c.stages[m].expr,y,p);typeof y<"u"&&o.push(y)}var A=p.base.createSequence();return s&&o.length===1&&Array.isArray(o[0])&&!O(o[0])?A=o[0]:Array.prototype.forEach.call(o,function($){!Array.isArray($)||$.cons?A.push($):Array.prototype.forEach.call($,I=>A.push(I))}),A}async function ne(c,f,p){for(var s=f,o=0;o<c.length;o++){var l=c[o];switch(l.type){case"filter":s=await pe(l.expr,s,p);break;case"index":for(var y=0;y<s.length;y++){var m=s[y];m[l.value]=y}break}}return s}async function we(c,f,p,s){var o;if(c.type==="sort"){if(p)o=await V(c,p,s);else{var l=await V(c,f,s);o=s.base.createSequence(),o.tupleStream=!0;for(var y=0;y<l.length;y++){var m={"@":l[y]};m[c.index]=y,o.push(m)}}return c.stages&&(o=await ne(c.stages,o,s)),o}o=s.base.createSequence(),o.tupleStream=!0;var A=s;p===void 0&&(p=f.map(H=>({"@":H})));for(var $=0;$<p.length;$++){A=F(s,p[$]);var I=await k(c,p[$]["@"],A);if(typeof I<"u"){Array.isArray(I)||(I=[I]);for(var re=0;re<I.length;re++)m=Object.create(null),Object.assign(m,p[$]),I.tupleStream?Object.assign(m,I[re]):(c.focus?(m[c.focus]=I[re],m["@"]=p[$]["@"]):m["@"]=I[re],c.index&&(m[c.index]=re),c.ancestor&&(m[c.ancestor.label]=p[$]["@"])),o.push(m)}}return c.stages&&(o=await ne(c.stages,o,s)),o}async function pe(c,f,p){var s=p.base.createSequence();if(f&&f.tupleStream&&(s.tupleStream=!0),Array.isArray(f)||(f=p.base.createSequence(f)),c.type==="number"){var o=Math.floor(c.value);o<0&&(o=f.length+o);var l=await f[o];typeof l<"u"&&(Array.isArray(l)?s=l:s.push(l))}else for(o=0;o<f.length;o++){var l=f[o],y=l,m=p;f.tupleStream&&(y=l["@"],m=F(p,l));var A=await k(c,y,m);P(A)&&(A=[A]),C(A)?Array.prototype.forEach.call(A,function(I){var re=Math.floor(I);re<0&&(re=f.length+re),re===o&&s.push(l)}):a.boolean(A)&&s.push(l)}return s}async function he(c,f,p){var s,o=await k(c.lhs,f,p),l=c.value,y=async()=>await k(c.rhs,f,p);if(l==="and"||l==="or")try{return await ce(o,y,l)}catch(A){throw A.position=c.position,A.token=l,A}var m=await y();try{switch(l){case"+":case"-":case"*":case"/":case"%":s=rt(o,m,l);break;case"=":case"!=":s=d(o,m,l);break;case"<":case"<=":case">":case">=":s=b(o,m,l);break;case"&":s=ye(o,m);break;case"..":s=T(o,m,p);break;case"in":s=z(o,m);break}}catch(A){throw A.position=c.position,A.token=l,A}return s}async function Pe(c,f,p){var s,o={options:p.base.options,createSequence:p.base.createSequence};switch(c.value){case"-":if(s=await k(c.expression,f,p),typeof s>"u")s=void 0;else if(P(s))s=-s;else throw{code:"D1002",stack:new Error().stack,position:c.position,token:c.value,value:s};break;case"[":s=[];let m=await Promise.all(c.expressions.map(async(A,$)=>(p.isParallelCall=$>0,[A,await k(A,f,p)])));for(let A of m){var[l,y]=A;typeof y<"u"&&(l.value==="["?s.push(y):s=a.append.call(o,s,y))}c.consarray&&Object.defineProperty(s,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":s=await S(c,f,p);break}return s}function Ye(c,f,p){var s={createSequence:p.base.createSequence};return a.lookup.call(s,f,c.value)}function ae(c){return c.value}function de(c,f,p){var s={options:p.base.options,createSequence:p.base.createSequence},o=s.createSequence();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&!G(f)&&h.keys(f).forEach(function(l){var y=f[l];Array.isArray(y)?(y=He(y),o=a.append.call(s,o,y)):o.push(y)}),o}function He(c,f){return typeof f>"u"&&(f=[]),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){He(p,f)}):f.push(c),f}function te(c,f,p){var s,o=p.base.createSequence();return typeof f<"u"&&(xe(f,o),o.length===1?s=o[0]:s=o),s}function xe(c,f){Array.isArray(c)||f.push(c),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){xe(p,f)}):c!==null&&typeof c=="object"&&!G(c)&&h.keys(c).forEach(function(p){xe(c[p],f)})}function rt(c,f,p){var s;if(typeof c<"u"&&!P(c))throw{code:"T2001",stack:new Error().stack,value:c};if(typeof f<"u"&&!P(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u")return s;switch(p){case"+":s=c+f;break;case"-":s=c-f;break;case"*":s=c*f;break;case"/":s=c/f;break;case"%":s=c%f;break}return s}function d(c,f,p){var s,o=typeof c,l=typeof f;if(o==="undefined"||l==="undefined")return!1;switch(p){case"=":s=U(c,f);break;case"!=":s=!U(c,f);break}return s}function b(c,f,p){var s,o=typeof c,l=typeof f,y=o==="undefined"||o==="string"||o==="number",m=l==="undefined"||l==="string"||l==="number";if(!y||!m)throw{code:"T2010",stack:new Error().stack,value:o==="string"||o==="number"?f:c};if(!(o==="undefined"||l==="undefined")){if(o!==l)throw{code:"T2009",stack:new Error().stack,value:c,value2:f};switch(p){case"<":s=c<f;break;case"<=":s=c<=f;break;case">":s=c>f;break;case">=":s=c>=f;break}return s}}function z(c,f){var p=!1;if(typeof c>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var s=0;s<f.length;s++)if(f[s]===c){p=!0;break}return p}async function ce(c,f,p){var s,o=Ee(c);switch(p){case"and":s=o&&Ee(await f());break;case"or":s=o||Ee(await f());break}return s}function Ee(c){var f=a.boolean(c);return typeof f>"u"?!1:f}function ye(c,f){var p,s="",o="";return typeof c<"u"&&(s=a.string(c)),typeof f<"u"&&(o=a.string(f)),p=s.concat(o),p}async function S(c,f,p){var s=Object.create(null),o=Object.create(null),l=!!(f&&f.tupleStream),y={options:p.base.options,createSequence:p.base.createSequence};Array.isArray(f)||(p.base.options,f=y.createSequence(f)),f.length===0&&!l&&f.push(void 0);for(var m=0;m<f.length;m++)for(var A=f[m],$=l?F(p,A):p,I=0;I<c.lhs.length;I++){var re=c.lhs[I],H=await k(re[0],l?A["@"]:A,$);if(typeof H!="string"&&H!==void 0)throw{code:"T1003",stack:new Error().stack,position:c.position,value:H};if(H!==void 0){if(H==="_jsonata_lambda"||H==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:c.position,value:H};var be={data:A,exprIndex:I};if(Object.prototype.hasOwnProperty.call(o,H)){if(o[H].exprIndex!==I)throw{code:"D1009",stack:new Error().stack,position:c.position,value:H};o[H].data=a.append.call(y,o[H].data,A)}else o[H]=be}}let _e=await Promise.all(h.keys(o).map(async(De,ge)=>{let Ce=o[De];var Qe=Ce.data,qe=p;if(l){var it=R(Ce.data,p);Qe=it["@"],delete it["@"],qe=F(p,it)}return p.isParallelCall=ge>0,[De,await k(c.lhs[Ce.exprIndex][1],Qe,qe)]}));for(let De of _e){var[H,Se]=await De;typeof Se<"u"&&(s[H]=Se)}return s}function R(c,f){if(!Array.isArray(c))return c;var p=Object.create(null),s={options:f.base.options,createSequence:f.base.createSequence};Object.assign(p,c[0]);for(var o=1;o<c.length;o++)for(const l of h.keys(c[o]))p[l]=a.append.call(s,p[l],c[o][l]);return p}function T(c,f,p){var s;if(typeof c<"u"&&!Number.isInteger(c))throw{code:"T2003",stack:new Error().stack,value:c};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u"||c>f)return s;var o=f-c+1;if(o>1e7)throw{code:"D2014",stack:new Error().stack,value:o};if(p.base.options&&o>p.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:o};s=new Array(o);for(var l=c,y=0;l<=f;l++,y++)s[y]=l;return s.sequence=!0,s}async function M(c,f,p){var s=await k(c.rhs,f,p);return p.bind(c.lhs.value,s),s}async function B(c,f,p){var s,o=await k(c.condition,f,p);return a.boolean(o)?s=await k(c.then,f,p):typeof c.else<"u"&&(s=await k(c.else,f,p)),s}async function N(c,f,p){for(var s,o=et(p),l=0;l<c.expressions.length;l++)s=await k(c.expressions[l],f,o);return s}function L(c,f,p){var s=new p.base.RegexEngine(c.value),o=function(l,y){var m;s.lastIndex=y||0;var A=s.exec(l);if(A!==null){if(m={match:A[0],start:A.index,end:A.index+A[0].length,groups:[]},A.length>1)for(var $=1;$<A.length;$++)m.groups.push(A[$]);m.next=function(){if(!(s.lastIndex>=l.length)){var I=o(l,s.lastIndex);if(I&&I.match==="")throw{code:"D1004",stack:new Error().stack,position:c.position,value:c.value.source};return I}}}return m};return o}function q(c,f,p){var s;return c.value===""?s=f&&f.outerWrapper?f[0]:f:s=p.lookup(c.value),s}async function V(c,f,p){var s,o=f,l=!!f.tupleStream,y=async function(A,$){for(var I=0,re=0;I===0&&re<c.terms.length;re++){var H=c.terms[re],be=A,_e=p;l&&(be=A["@"],_e=F(p,A));var Se=await k(H.expression,be,_e);be=$,_e=p,l&&(be=$["@"],_e=F(p,$));var De=await k(H.expression,be,_e),ge=typeof Se,Ce=typeof De;if(ge==="undefined"){I=Ce==="undefined"?0:1;continue}if(Ce==="undefined"){I=-1;continue}if(!(ge==="string"||ge==="number")||!(Ce==="string"||Ce==="number"))throw{code:"T2008",stack:new Error().stack,position:c.position,value:ge==="string"||ge==="number"?De:Se};if(ge!==Ce)throw{code:"T2007",stack:new Error().stack,position:c.position,value:Se,value2:De};Se!==De&&(Se<De?I=-1:I=1,H.descending===!0&&(I=-I))}return I===1},m={environment:p,input:f};return s=await a.sort.apply(m,[o,y]),s}function le(c,f,p){var s=async function(o){if(!(typeof o>"u")){var l=p.lookup("clone");if(!G(l))throw{code:"T2013",stack:new Error().stack,position:c.position};var y=await oe(l,[o],null,p),m=await k(c.pattern,y,p);if(typeof m<"u"){Array.isArray(m)||(m=[m]);for(var A=0;A<m.length;A++){var $=m[A],I=await k(c.update,$,p),re=typeof I;if(re!=="undefined"){if(re!=="object"||I===null||Array.isArray(I))throw{code:"T2011",stack:new Error().stack,position:c.update.position,value:I};for(const Se of h.keys(I))$[Se]=I[Se]}if(typeof c.delete<"u"){var H=await k(c.delete,$,p);if(typeof H<"u"){var be=H;if(Array.isArray(H)||(H=[H]),!E(H))throw{code:"T2012",stack:new Error().stack,position:c.delete.position,value:be};for(var _e=0;_e<H.length;_e++)typeof $=="object"&&$!==null&&delete $[H[_e]]}}}}return y}};return j(s,"<(oa):o>")}var se=v("function($f, $g) { function($x){ $g($f($x)) } }");async function K(c,f,p){var s,o=await k(c.lhs,f,p);if(c.rhs.type==="function")s=await X(c.rhs,f,p,{context:o});else{var l=await k(c.rhs,f,p);if(!G(l))throw{code:"T2006",stack:new Error().stack,position:c.position,value:l};if(G(o)){var y=await k(se,null,p);s=await oe(y,[o,l],null,p)}else s=await oe(l,[o],null,p)}return s}async function X(c,f,p,s){var o,l=await k(c.procedure,f,p);if(typeof l>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};var y=[];typeof s<"u"&&y.push(s.context);for(var m=0;m<c.arguments.length;m++){const $=await k(c.arguments[m],f,p);if(G($)){const I=async function(...re){return await oe($,re,null,p)};I.arity=g($),y.push(I)}else y.push($)}var A=c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value;try{typeof l=="object"&&(l.token=A,l.position=c.position),o=await oe(l,y,f,p)}catch($){throw $.position||($.position=c.position),$.token||($.token=A),$}return o}async function oe(c,f,p,s){var o;for(o=await Y(c,f,p,s);ee(o)&&o.thunk===!0;){var l=await k(o.body.procedure,o.input,o.environment);o.body.procedure.type==="variable"&&(l.token=o.body.procedure.value),l.position=o.body.procedure.position;for(var y=[],m=0;m<o.body.arguments.length;m++)y.push(await k(o.body.arguments[m],o.input,o.environment));o=await Y(l,y,p,s)}return o}async function Y(c,f,p,s){var o;try{var l=f;if(c&&(l=Ge(c.signature,f,p)),ee(c))o=await Ue(c,l);else if(c&&c._jsonata_function===!0){var y={environment:s,input:p,options:s.base.options,createSequence:s.base.createSequence};o=c.implementation.apply(y,l),J(o)&&(o=o.next().value),_(o)&&(o=await o)}else if(typeof c=="function")o=c.apply(p,l),_(o)&&(o=await o);else throw{code:"T1006",stack:new Error().stack}}catch(m){throw c&&(typeof m.token>"u"&&typeof c.token<"u"&&(m.token=c.token),m.position=c.position||m.position),m}return o}function Ne(c,f,p){var s={_jsonata_lambda:!0,input:f,environment:p,arguments:c.arguments,signature:c.signature,body:c.body};return c.thunk===!0&&(s.thunk=!0),s.apply=async function(o,l){return await oe(s,l,f,o?o.environment:p)},s}async function Ze(c,f,p){for(var s,o=[],l=0;l<c.arguments.length;l++){var y=c.arguments[l];y.type==="operator"&&y.value==="?"?o.push(y):o.push(await k(y,f,p))}var m=await k(c.procedure,f,p);if(typeof m>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};if(ee(m))s=Be(m,o,p);else if(m&&m._jsonata_function===!0)s=ot(m.implementation,o,p);else if(typeof m=="function")s=ot(m,o,p);else throw{code:"T1008",stack:new Error().stack,position:c.position,token:c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value};return s}function Ge(c,f,p){if(typeof c>"u")return f;var s=c.validate(f,p);return s}async function Ue(c,f){var p,s=et(c.environment);return Array.prototype.forEach.call(c.arguments,function(o,l){s.bind(o.value,f[l])}),typeof c.body=="function"?p=await Ct(c.body,s):p=await k(c.body,c.input,s),p}function Be(c,f,p){var s=et(c.environment||p),o=[];Array.prototype.forEach.call(c.arguments,function(y,m){var A=f[m];A&&A.type==="operator"&&A.value==="?"?o.push(y):s.bind(y.value,A)});var l={_jsonata_lambda:!0,input:c.input,environment:s,arguments:o,body:c.body};return l}function ot(c,f,p){var s=Rt(c);s=s.map(function(m){return"$"+m.trim()});var o="function("+s.join(", ")+"){ _ }",l=v(o);l.body=c;var y=Be(l,f,p);return y}async function Ct(c,f){var p=Rt(c),s=p.map(function(y){return f.lookup(y.trim())}),o={environment:f,createSequence:f.base.createSequence},l=c.apply(o,s);return _(l)&&(l=await l),l}function Rt(c){var f=c.toString(),p=/\(([^)]*)\)/.exec(f)[1],s=p.split(",");return s}function j(c,f){var p={_jsonata_function:!0,implementation:c};return typeof f<"u"&&(p.signature=x(f)),p}async function gr(c,f){if(!(typeof c>"u")){var p=this.input;typeof f<"u"&&(p=f,Array.isArray(p)&&!O(p)&&(p=this.createSequence(p),p.outerWrapper=!0));try{var s=v(c,!1)}catch(l){throw nt(l),{stack:new Error().stack,code:"D3120",value:l.message,error:l}}try{var o=await k(s,p,this.environment)}catch(l){throw nt(l),{stack:new Error().stack,code:"D3121",value:l.message,error:l}}return o}}function vr(c){if(!(typeof c>"u"))return JSON.parse(a.string(c))}function et(c){var f=Object.create(null);const p={bind:function(o,l){f[o]=l},lookup:function(o){var l;return Object.prototype.hasOwnProperty.call(f,o)?l=f[o]:c&&(l=c.lookup(o)),l},timestamp:c?c.timestamp:null,async:c?c.async:!1,isParallelCall:c?c.isParallelCall:!1,global:c?c.global:{ancestry:[null]}};if(c){var s=c.lookup(Symbol.for("jsonata.__createFrame_push"));s&&s(c,p),p.base=c.base}return p}w.bind("sum",j(a.sum,"<a<n>:n>")),w.bind("count",j(a.count,"<a:n>")),w.bind("max",j(a.max,"<a<n>:n>")),w.bind("min",j(a.min,"<a<n>:n>")),w.bind("average",j(a.average,"<a<n>:n>")),w.bind("string",j(a.string,"<x-b?:s>")),w.bind("substring",j(a.substring,"<s-nn?:s>")),w.bind("substringBefore",j(a.substringBefore,"<s-s:s>")),w.bind("substringAfter",j(a.substringAfter,"<s-s:s>")),w.bind("lowercase",j(a.lowercase,"<s-:s>")),w.bind("uppercase",j(a.uppercase,"<s-:s>")),w.bind("length",j(a.length,"<s-:n>")),w.bind("trim",j(a.trim,"<s-:s>")),w.bind("pad",j(a.pad,"<s-ns?:s>")),w.bind("match",j(a.match,"<s-f<s:o>n?:a<o>>")),w.bind("contains",j(a.contains,"<s-(sf):b>")),w.bind("replace",j(a.replace,"<s-(sf)(sf)n?:s>")),w.bind("split",j(a.split,"<s-(sf)n?:a<s>>")),w.bind("join",j(a.join,"<a<s>s?:s>")),w.bind("formatNumber",j(a.formatNumber,"<n-so?:s>")),w.bind("formatBase",j(a.formatBase,"<n-n?:s>")),w.bind("formatInteger",j(u.formatInteger,"<n-s:s>")),w.bind("parseInteger",j(u.parseInteger,"<s-s:n>")),w.bind("number",j(a.number,"<(nsb)-:n>")),w.bind("floor",j(a.floor,"<n-:n>")),w.bind("ceil",j(a.ceil,"<n-:n>")),w.bind("round",j(a.round,"<n-n?:n>")),w.bind("abs",j(a.abs,"<n-:n>")),w.bind("sqrt",j(a.sqrt,"<n-:n>")),w.bind("power",j(a.power,"<n-n:n>")),w.bind("random",j(a.random,"<:n>")),w.bind("boolean",j(a.boolean,"<x-:b>")),w.bind("not",j(a.not,"<x-:b>")),w.bind("map",j(a.map,"<af>")),w.bind("zip",j(a.zip,"<a+>")),w.bind("filter",j(a.filter,"<af>")),w.bind("single",j(a.single,"<af?>")),w.bind("reduce",j(a.foldLeft,"<afj?:j>")),w.bind("sift",j(a.sift,"<o-f?:o>")),w.bind("keys",j(a.keys,"<x-:a<s>>")),w.bind("lookup",j(a.lookup,"<x-s:x>")),w.bind("append",j(a.append,"<xx:a>")),w.bind("exists",j(a.exists,"<x:b>")),w.bind("spread",j(a.spread,"<x-:a<o>>")),w.bind("merge",j(a.merge,"<a<o>:o>")),w.bind("reverse",j(a.reverse,"<a:a>")),w.bind("each",j(a.each,"<o-f:a>")),w.bind("error",j(a.error,"<s?:x>")),w.bind("assert",j(a.assert,"<bs?:x>")),w.bind("type",j(a.type,"<x:s>")),w.bind("sort",j(a.sort,"<af?:a>")),w.bind("shuffle",j(a.shuffle,"<a:a>")),w.bind("distinct",j(a.distinct,"<x:x>")),w.bind("base64encode",j(a.base64encode,"<s-:s>")),w.bind("base64decode",j(a.base64decode,"<s-:s>")),w.bind("encodeUrlComponent",j(a.encodeUrlComponent,"<s-:s>")),w.bind("encodeUrl",j(a.encodeUrl,"<s-:s>")),w.bind("decodeUrlComponent",j(a.decodeUrlComponent,"<s-:s>")),w.bind("decodeUrl",j(a.decodeUrl,"<s-:s>")),w.bind("eval",j(gr,"<sx?:x>")),w.bind("toMillis",j(u.toMillis,"<s-s?:n>")),w.bind("fromMillis",j(u.fromMillis,"<n-s?s?:s>")),w.bind("clone",j(vr,"<(oa)-:o>"));var Yt={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function nt(c){var f=Yt[c.code];if(typeof f<"u"){var p=f.replace(/\{\{\{([^}]+)}}}/g,function(){return c[arguments[1]]});p=p.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(c[arguments[1]])}),c.message=p}}function bt(c,f){var p,s;try{p=v(c,f&&f.recover),s=p.errors,delete p.errors}catch(y){throw nt(y),y}var o=et(w),l=new Date;return o.bind("now",j(function(y,m){return u.fromMillis(l.getTime(),y,m)},"<s?s?:s>")),o.bind("millis",j(function(){return l.getTime()},"<:n>")),{evaluate:async function(y,m,A){if(typeof s<"u"){var $={code:"S0500",position:0};throw nt($),$}const I=et(o);for(const H of h.keys(m))I.bind(H,m[H]);if(I.bind("$",y),l=new Date,I.timestamp=l,I.options=f,I.createSequence=function(){var H=[];return f&&f.sequence&&(H.push=function(...be){if(H.length+be.length>f.sequence)throw{code:"D2015",stack:new Error().stack,value:f.sequence};return Array.prototype.push.apply(H,be)}),H.sequence=!0,arguments.length===1&&H.push(arguments[0]),H},Array.isArray(y)&&!O(y)&&(y=I.createSequence(y),y.outerWrapper=!0),f&&(f.timeout||f.stack)){const H=Date.now();I.guardrails=function(){if(f.stack>0&&I.depth>f.stack)throw{code:"D1011",value:f.stack,stack:new Error().stack};if(f.timeout>0&&Date.now()-H>f.timeout)throw{code:"D1012",value:f.timeout,stack:new Error().stack}}}else I.guardrails=function(){};I.base=I,I.depth=0,f&&f.RegexEngine?I.RegexEngine=f.RegexEngine:I.RegexEngine=RegExp;var re;try{return re=await k(p,y,I),typeof A=="function"&&A(null,re),re}catch(H){throw nt(H),H}},assign:function(y,m){o.bind(y,m)},registerFunction:function(y,m,A){var $=j(m,A);o.bind(y,$)},ast:function(){return p},errors:function(){return s}}}return bt.parser=v,bt})();r.exports=D},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,r,i){var u=t("./signature");const a=(()=>{var h={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},v={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
31
|
+
*/function gn(n){return Re({...n,state:!0,attribute:!1})}function Rr(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.getFrameCanvas=="function"&&typeof e.frameSeq=="number"}function vn(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.registerFrameConsumer=="function"&&typeof e.unregisterFrameConsumer=="function"}class Di{constructor(){this.tokens=new Map}sync(e){const t=new Set;for(const r of e)r&&vn(r)&&t.add(r);for(const[r,i]of[...this.tokens])t.has(r)||(vn(r)&&r.unregisterFrameConsumer(i),this.tokens.delete(r));for(const r of t){if(this.tokens.has(r))continue;const i={};r.registerFrameConsumer(i),this.tokens.set(r,i)}}clear(){this.sync([])}}const yn="#__sonic_frame_";let Oi=0;const Lr=new Map,bn=new WeakMap;function Mi(n){const e=bn.get(n);if(e)return e;const t=`${yn}${++Oi}`;return Lr.set(t,n),bn.set(n,t),t}function Fi(n){if(!n.startsWith(yn))return null;const e=Lr.get(n)??null;return e&&!e.isConnected?(Lr.delete(n),null):e}function $i(n){if(n==null)return null;if(typeof n=="string"){const e=n.trim();return e?e.startsWith("#")?e:`#${e}`:null}return typeof Element<"u"&&n instanceof Element?n.id?`#${n.id}`:Mi(n):null}function Ur(n){return typeof n!="string"?null:n.trim()||null}function Ni(n){if(n==null||n==="")return null;if(typeof n=="string")return Ur(n);if(typeof n!="object")return null;const e=n;return Ur(e.url)??Ur(e.blobUrl)}function Ii(n){for(const e of n)try{URL.revokeObjectURL(e)}catch{}}const Gi=4,Bi=.001,qi=.45,ji="rgb(38, 89, 217)";class Dr{constructor(e,t){this.backend="canvas2d",this.images=[null,null,null,null],this.channelUrls=["","","",""],this.channelSizes=[null,null,null,null],this.channelLoadTokens=[0,0,0,0],this.disposed=!1,this.canvas=e,this.ctx=t}static create(e){const t=e.getContext("2d",{alpha:!0});if(!t)throw new Error("Canvas2D indisponible");return new Dr(e,t)}async setShader(e){this.assertAlive()}async setChannel(e,t){this.assertAlive();const r=t.trim();if(this.channelUrls[e]===r&&this.images[e])return;this.channelUrls[e]=r;const i=++this.channelLoadTokens[e];if(!r){this.images[e]=null,this.channelSizes[e]=null;return}const u=await Wi(r);i!==this.channelLoadTokens[e]||this.disposed||(this.images[e]=u,this.channelSizes[e]={width:u.naturalWidth,height:u.naturalHeight})}getTextureSize(e){const t=this.channelUrls.indexOf(e.trim());return t<0?null:this.channelSizes[t]}resize(e,t){this.assertAlive();const r=Math.max(1,Math.floor(e)),i=Math.max(1,Math.floor(t));this.canvas.width===r&&this.canvas.height===i||(this.canvas.width=r,this.canvas.height=i)}draw(e){this.assertAlive();const{ctx:t,canvas:r}=this,i=r.width,u=r.height;t.clearRect(0,0,i,u);const a=this.images[0],h=Math.min(1,Math.max(0,e.params[0]??0));if(a)t.drawImage(a,0,0,i,u),h>Bi&&(t.save(),t.globalAlpha=h*qi,t.fillStyle=ji,t.fillRect(0,0,i,u),t.restore());else{const v=t.createLinearGradient(0,0,i,u);v.addColorStop(0,`rgb(38,${Math.round(40+h*80)},80)`),v.addColorStop(1,`rgb(90,${Math.round(60+h*40)},120)`),t.fillStyle=v,t.fillRect(0,0,i,u)}}dispose(e=!1){if(!this.disposed){this.disposed=!0;for(let t=0;t<Gi;t++)this.channelLoadTokens[t]++;this.images=[null,null,null,null]}}assertAlive(){if(this.disposed)throw new Error("Canvas2D fallback disposed")}}async function Wi(n){const e=new Image;return e.crossOrigin="anonymous",await new Promise((t,r)=>{e.onload=()=>t(),e.onerror=()=>r(new Error(`Failed to load texture: ${n}`)),e.src=n}),e}const Or="1";function zi(n){const e=n.trim();if(!e)return!1;try{const t=new URL(e,"https://example.invalid/");return t.protocol==="http:"||t.protocol==="https:"||t.protocol==="blob:"}catch{return!1}}let st=class ze{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const r=t.indexOf("=");return e[t.substring(0,r).trim()]=t.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let r=e;for(;r;){if(!t(r))return;r=r.parentNode||r.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(ze.overflowMatches(i,t))return r}r=ze.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return ze.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return ze.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const r of ze.scopeAttributeNames(t))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const u=ze.readScopeAttributeOnElement(r,t);if(u!=null)return u}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const t=ze.getAncestorAttributeValue(e,"token"),r=ze.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=ze.getAncestorAttributeValue(e,"serviceURL");let u=null,a=null;const h=ze.getAncestorAttributeValue(e,"tokenProvider"),v=ze.getAncestorAttributeValue(e,"eventsApiToken");t||(u=ze.getAncestorAttributeValue(e,"userName"),a=ze.getAncestorAttributeValue(e,"password"));const x=ze.getAncestorAttributeValue(e,"credentials")||void 0,D=e.getAttribute("cache"),P=e.hasAttribute("blockUntilDone"),E=e.hasAttribute("keepAlive");return{serviceURL:i,token:t,userName:u,password:a,authToken:v,tokenProvider:h,addHTTPResponse:r,credentials:x,cache:D,blockUntilDone:P,keepAlive:E}}static getClosestElement(e,t){let r=e;for(;r&&!(r.nodeName&&r.nodeName.toLowerCase()===t);){const i=r.parentNode||r.host;if(!i){r=null;break}r=i}return r?.nodeName?r:null}static getClosestForm(e){return ze.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const r=new Set(t.map(a=>a.toLowerCase())),i=[];let u=e.parentNode||e.host;for(;u;)u instanceof Element&&r.has(u.tagName.toLowerCase())&&i.push(u),u=u.parentNode||u.host;return i}static getAncestorsBySelectors(e,t){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const u of t)try{if(i.matches(u)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){if(!zi(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,r=Array.from(document.scripts).find(u=>u.src===t);if(r)return r.dataset.concordeLoaded===Or?!0:new Promise(u=>{let a=!1;const h=x=>{a||(a=!0,x&&(r.dataset.concordeLoaded=Or),u(x))};r.addEventListener("load",()=>h(!0),{once:!0}),r.addEventListener("error",()=>h(!1),{once:!0});const v=r.readyState;if(v==="complete"||v==="loaded"){h(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{a||h(!0)})})});const i=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(u=>{const a=document.createElement("script");a.src=e,i&&(a.type="module"),a.onload=()=>{a.dataset.concordeLoaded=Or,u(!0)},a.onerror=()=>u(!1),document.head.appendChild(a)})}static async loadCSS(e){return new Promise(t=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>t(!0),r.onerror=()=>t(!0),document.head.appendChild(r)})}},Hi=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},wn="sonic";typeof __SONIC_PREFIX__<"u"&&(wn=__SONIC_PREFIX__);let En=wn.replace(/-([a-z])/g,n=>n[1].toUpperCase());const Vi=En.charAt(0).toUpperCase()+En.slice(1);let Xi=class Et{static areEqual(e,t){return e.length===t.length?e.every((r,i)=>r===t[i]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(r=>t=t.concat(r)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const r=(e[0]||{})[t];return e.every(i=>(i||{})[t]==r)}})})}),value:()=>({forKey:t=>Et.from(e.map(r=>r[t]))}),copy:()=>({fromKey:t=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[t])?[...i[t]]:typeof i[t]=="object"&&i[t]!=null?{...i[t]}:i[t]})}})})}),map:t=>Et.from(e.map(t)),filter:t=>Et.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const r=[],i=new Map;for(const u of e){const a=u[t];if(!i.has(a)){const h=r.length;i.set(a,h);const v={items:[]};v[t]=a,r.push(v)}r[i.get(a)].items.push(u)}return Et.from(r)}}),without:()=>({duplicates:()=>({forKey:t=>{const r=[...new Set(e.map(i=>i[t]))];return Et.from(r.map(i=>e.find(u=>u[t]==i)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:r=>{const i=(u,a)=>h=>u[a]!=h[a];return Et.from(e.filter(u=>t.every(i(u,r))))}})})})}}},Mr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",r="long"){t||(t=st.getLanguage());const i=(x,D)=>[Math.floor(x/D),x%D];function u(x,D,P){return new Intl.NumberFormat(x,{style:"unit",unit:D,unitDisplay:P}).format}const[a,h]=i(e,60),v=[];return a&&v.push(u(t,"hour",r)(a)),h&&v.push(u(t,"minute",r)(h)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(v)}static js(e){try{return Function("return "+e)()}catch{return""}}};class _n{constructor(e){this.path=e}toString(){return this.path}}function Sn(n){return new Proxy(n,{get(e,t){if(t==="path")return e.path;if(t==="toString")return e.toString.bind(e);if(t===Symbol.toStringTag)return"DataProviderKey";if(typeof t=="symbol")return e[t];const r=e.path?`${e.path}.${String(t)}`:String(t);return Sn(new _n(r))}})}const Yi=/\$\{|\{\$/;function Ji(n){return Yi.test(n)}function Ki(n){const e=n;if(Ji(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const ir=function(n){return this instanceof ir?Sn(new _n(n)):new ir(n)};let sr=class ct{static shallowEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const a of i){const h=e[a],v=t[a];if(r?h!==v:h!=v)return!1}return!0}static deepEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const a of i){const h=e[a],v=t[a],x=ct.isObject(h)&&ct.isObject(v),D=r?h!==v:h!=v;if(x&&!ct.deepEqual(h,v)||!x&&D)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return ct.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,r=!1){for(const i of t){const u=e[i];if(u===void 0)return;r&&ct.isObject(u)?e=Object.assign(Array.isArray(u)?[]:{},e,u):e=e[i]}return e}static traverseDotNotation(e,t,r=!1){return ct.traverse(e,t.split("."),r)}static getURLSearchArray(e,t=""){let r=[];for(let i in e){const u=e[i];t&&(i=t+"["+i+"]"),ct.isObject(u)?r=[...r,...this.getURLSearchArray(u,i)]:r.push(`${i}=${u}`)}return r}static getURLSearchString(e){return ct.getURLSearchArray(e,"").join("&")}};sr.traverseDotNotation;function Zi(n){return!1}function ar(n){return Object.prototype.hasOwnProperty.call(n,"__value")}function ft(n){return typeof n=="object"&&n!==null}let Tt="sonic";typeof __SONIC_PREFIX__>"u"&&(Tt="sonic");const Fr=Tt=="sonic"?"publisher-proxies-data":Tt+"-publisher-proxies-data",ht=class ht{constructor(e,t,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=432e5,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=t||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),ht.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(t=>t()),this._is_savable_&&!$e.changed){$e.changed=!0,$e.saveId++;const t=$e.saveId;setTimeout(()=>$e.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(r=>{r[e]!==t&&(r[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==t&&(r[e]=t))})}onAssign(e,t=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),t&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const t in this._value_){let r=t;const i=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(r=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const r=this._value_[t];e[t]!==r&&(e[t]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||ft(this._value_)&&ft(e)&&e&&ar(this._value_)&&ar(e)&&this._value_.__value===e.__value||!ft(e)&&e===this._value_.__value)return!0;this._value_=ft(e)?e:{__value:e},this._cachedGet_=void 0;const r=ar(this._value_);if(this._parentKey_&&this.parent){const i=ar(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:i});else{const u=[];u[Number(this._parentKey_)]=i,this.parent.set(u)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,u)=>{u!="_parent_"&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const i in this._value_)this._value_[i]===void 0&&delete this._value_[i];if(this._proxies_.forEach((i,u)=>{const a=this._value_[u];u!="_parent_"&&a===void 0&&a!==null&&isNaN(Number(u))&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),ft(this._value_))for(const i in this._value_){const u=e[i],h=ft(u)?u:{__value:u};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,u);continue}this._proxies_.get(i)?.set(h,!0),this._publishDynamicFilling_(i,u)}return!0}get(){if(Qi(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(ht.instancesCounter++,this._instanceCounter_=ht.instancesCounter),ht.instances.set(this._instanceCounter_,this),"<"+Tt+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Tt+"-publisher-proxy>"}};ht.instances=new Map,ht.instancesCounter=0;let or=ht;const An=[];function Qi(n){An.length>0&&An[0].add(n)}const me=class me{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],me.instance!=null)throw"Singleton / use getInstance";me.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),me.initPageShowHandler()}static initPageShowHandler(){me.pageShowHandlerInitialized||(me.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&me.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(Fr),i=null;if(r&&(i=await this.decompress(r,"gzip")),i)try{this.localStorageData=JSON.parse(i)}catch{this.localStorageData={}}else r=await this.compress("{}","gzip"),localStorage.setItem(Fr,r),this.localStorageData={};const u=1e3*60*60*12;for(const a in this.localStorageData){const h=this.localStorageData[a],v=new Date().getTime()-(h.expirationDelayMs||u);h.lastModifiationMS<v&&delete this.localStorageData[a]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=me.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new me)}return me.instance==null?new me:me.instance}static get(e,t){return me.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+st.getLanguage()]?.data||e.get())}get(e,t){const r=t?.localStorageMode==="enabled",i=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const h=$r({});this.set(e,h)}const u=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(u._expiration_delay_=t.expirationDelayMs),u._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(u,e)),i&&(u._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,t){this.publishers.set(e,t)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==me.saveId&&e%10!=0))try{if(!me.changed||me.saving)return;me.saving=!0,me.changed=!1;const t=Array.from(this.publishers.keys());let r=!1;for(const i of t){const u=this.publishers.get(i);if(!u?._is_savable_)continue;const a=u?.get();a&&(this.localStorageData[i+"¤lang_"+st.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:u._expiration_delay_,data:a},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Fr,i)}if(me.saving=!1,me.changed){me.saveId++;const i=me.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{me.saving=!1}}async compress(e,t){const r=new TextEncoder().encode(e),i=window,u=new i.CompressionStream(t),a=u.writable.getWriter();a.write(r),a.close();const h=await new Response(u.readable).arrayBuffer(),v=new Uint8Array(h);let x="";for(let D=0;D<v.length;D++)x+=String.fromCharCode(v[D]);return btoa(x)}async decompress(e,t){const r=atob(e),u=Uint8Array.from(r,D=>D.charCodeAt(0)).buffer,a=window,h=new a.DecompressionStream(t),v=h.writable.getWriter();v.write(u),v.close();const x=await new Response(h.readable).arrayBuffer();return new TextDecoder().decode(x)}};me.buildDate="Thu Oct 01 2026 19:01:53 GMT+0200 (Central European Summer Time)",me.changed=!1,me.saving=!1,me.saveId=0,me.instance=null,me.instances=new Map,me.pageShowHandlerInitialized=!1;let $e=me;if(typeof window<"u"){const n=window,e=Vi+"PublisherManager",t=n[e]||$e;if(n[e]||(n[e]=$e),t!==$e){const r=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const i of r)Object.defineProperty($e,i,{configurable:!0,get(){return t[i]},set(u){t[i]=u}})}}const es=new Set(["invalidate","onInvalidate","offInvalidate","invalidateForm","onFormInvalidate","offFormInvalidate","onAssign","offAssign","startDynamicFilling","stopDynamicFilling","startTemplateFilling","stopTemplateFilling","onInternalMutation","offInternalMutation","set","get","$tag","_cachedGet_","_templateFillListeners_","_fillListeners_","_assignListeners_","_invalidateListeners_","_formInvalidateListeners_","_publishInternalMutation_","hasListener","delete","_mutationListeners_","_publishDynamicFilling_","_publishInvalidation_","_publishFormInvalidation_","_publishTemplateFilling_","_publishAssignement_","_proxies_","parent","_parentKey_","_value_","_is_savable_","_expiration_delay_","_lockInternalMutationPublishing_","_instanceCounter_","_assignmentId_","_invalidate_on_page_show_"]);function ts(n,e){return{get:function(t,r){if(typeof r=="string"&&es.has(r))return n[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!n._proxies_.has(r)){const i=n._value_[r],u=$r(ft(i)?i:{__value:i},n,r);u._proxies_.set("_parent_",e()),n._proxies_.set(r,u)}return n._proxies_.get(r)},set:function(t,r,i){if(r=="_value_")return n._value_=i,!0;if(r=="_cachedGet_")return n._cachedGet_=i,!0;if(r=="_assignmentId_")return n._assignmentId_=i,!0;if(r=="_is_savable_")return n._is_savable_=i,!0;if(r=="_expiration_delay_")return n._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return n._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return n._instanceCounter_=i,!0;if(!n._proxies_.has(r)){const a=$r({},n,r);a._proxies_.set("_parent_",e()),n._proxies_.set(r,a)}return n._value_[r]!==i&&(n._value_[r]=i,n._publishDynamicFilling_(r,i),n._proxies_.get(r)?.set(ft(i)?i:{__value:i})),!0},deleteProperty:function(t,r){return n._publishDynamicFilling_(r,null),n._proxies_.get(r)?.set(null),delete n._value_[r]},has:function(t,r){return r in n._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(t,r,i){return i&&"value"in i&&(n._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(t,r){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return n._value_.__value?Object.keys(n._value_.__value):Object.keys(n._value_)}}}function $r(n,e=null,t){const r=new or(n,e,t);let i=null;const u=ts(r,()=>i);return i=new Proxy(r,u),i}class rs extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=or.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(Tt+"-publisher-proxy",rs)}catch{}const ns=(n,e)=>{{const t=n.split("."),r=t.shift()||"";let i=$e.get(r,e);i=sr.traverse(i,t);const u=new Set;return u.add(i),u}};function Tn(n,e,t){const r=Ki(n);return ns(r,t).values().next().value}function is(n,e){return Zi()?Tn(n,void 0,e):Tn(n)}let Nr=(fe=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(fe.observedElements.keys()).forEach(e=>fe.unObserve(e)))}static observe(e){if(!e||!fe.enabled||fe.observedElements.has(e))return;const t=new MutationObserver(fe.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],t.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>fe.addPublisherListeners(i)),fe.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>fe.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&fe.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>fe.addPublisherListeners(t)):e.childNodes.forEach(t=>fe.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&fe.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>fe.removePublisherListeners(t)):e.childNodes.forEach(t=>fe.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":fe.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(r=>{fe.onAdded(r)}),t.removedNodes.forEach(r=>{fe.onRemoved(r)});break}}static removePublisherListeners(e){const t=fe.publisherListeners.get(e);t&&(fe.publisherListeners.delete(e),t.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(r=>r.replace("$","")):t=[e],t=t.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:t.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:fe.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const r of t)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){fe.removePublisherListeners(e);const t=st.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const r=$e.getInstance().get(t),i=fe.getDataBindItems(e),u=[];i.forEach(a=>{const h=a.bindedVariablesDescriptor,v=a.propertyToUpdate;for(const x of h.variables){const D=x;let P=r;P=fe.getSubPublisher(r,D);const E=e,C={publisher:P,onAssign:()=>{const O=h.variables.map(J=>fe.getSubPublisher(r,J)?.get());let G=h.expression,ee=!1;if(O.length==1&&h.variables[0].join(".")==G.substring(1)){let J=O[0];J===null&&(J=""),E[v]=J;return}for(let J=0;J<O.length;J++){let _=O[J];const g=h.variables[J];_===null&&(ee=!0,_=void 0),G=G.replace("$"+g.join("."),_)}if(G.indexOf("|")!=-1){const J=G.indexOf("|");if(J==0)G=Mr.js(G.substring(1));else{const _=G.substring(0,J),g=G.substring(J+1),U=Mr[_];G=ee?"":U?U(g):G}}else G=ee?"":G;E[v]=G}};P?.onAssign(C.onAssign),u.push(C)}}),fe.publisherListeners.set(e,u)}},fe.observedElements=new Map,fe.enabled=!0,fe.publisherListeners=new Map,fe);Nr.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Nr);let ss=(Le=class{static listen(){if(!Le.listening)return;const e=document.location?.href.replace(document.location.origin,"");Le.prevURL&&Le.prevURL!=e&&(Le.prevURL=e,Le.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(Le.listen)}static offChange(e){const t=Le.listeners.indexOf(e);t!=-1&&(Le.listeners.splice(t,1),Le.listeners.length==0&&(Le.listening=!1))}static onChange(e){Le.listening||(Le.listening=!0,Le.listen()),Le.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,r=document.referrer;if(t!=null){const x=document.location.origin,D=(t||x).toString(),E=r.indexOf("http")==0?new URL(r).origin!=x:!1,C=r=="",O=history.length<3,G=C&&O,ee=D!=document.location.href;if(E&&ee||G){const _=history.state||{};_.concorde=_.concorde||{},_.concorde.hasDoneHistoryBack=!0,history.pushState(_,document.title),history.back(),document.location.replace(D)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const u=new URL(i,document.location.href),a=u.pathname.split("/"),h=[];let v="";for(const x of a)x!=v&&h.push(x),v=x;i="/"+h.join("/")+u.search+(u.hash?u.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const r=new URL(t,document.location.href),i=new URL(e.location||"",document.location.origin);let u=!1;e.autoActive=="strict"?u=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?u=r.pathname==i.pathname&&r.hash==i.hash:u=i.href.indexOf(r.href)==0,u?e.setAttribute("active","true"):e.removeAttribute("active")}}},Le.listeners=[],Le.listening=!1,Le.prevURL=document.location?.href.replace(document.location.origin,""),Le);function kn(n){if(n==null||typeof n!="object"||Array.isArray(n))return n;const e={...n};return delete e._sonic_http_response_,e}const ve=class ve{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){ve.tokens.delete(this.serviceURL);return}ve.invalidTokens.includes(e)||ve.tokens.set(this.serviceURL,e)}get token(){return ve.invalidTokens.includes(this._token)?ve.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(ve.invalidTokens.includes(e)||(ve.invalidTokens.push(e),this.token=null))}async handleResult(e,t){ve.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let u={};if(!r||r.indexOf("text/")==0)u={text:await e.text()};else try{u=await e.json()}catch{u={}}if(this.addHTTPResponse&&sr.isObject(u)&&(u._sonic_http_response_=e),i===498&&!ve.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const h=await this.get(t.path,t.additionalHeaders);if(h==null)throw new Error("GET retry failed after token refresh");u=h}else u=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return is("sonic-api").lastResponse.set({http:e,processed:u}),u}async auth(){if(this.token)return;if(ve.tokens.has(this.serviceURL)){this.token=ve.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const t=new URL(this.serviceURL),r=t.protocol+"//"+t.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const u=await i.json();u.token?this.token=u.token:ve.failledTokenUpdates.set(this.serviceURL,!0)}catch{ve.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const r=$e.get(e),i=new URLSearchParams(t.split("?")[1]||""),u=r.get();let a=[];Array.isArray(u)?a=u:a=[u];const h=[];let v=Number.POSITIVE_INFINITY,x=0,D=0;if(i.has("limit")&&(v=parseInt(i.get("limit")||"0"),D++),i.has("offset")&&(x=parseInt(i.get("offset")||"0"),D++),D>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return a.slice(x,x+v);for(const[P,E]of i.entries()){const C=E.split(",").map(O=>O.trim());for(const O of C)for(const G of a)if(typeof G!="object")isNaN(+G)?G.toString().toLowerCase().includes(E.toLowerCase())&&h.push(G):G===E&&h.push(G);else{const ee=G;if(!ee[P])continue;isNaN(+ee[P])?ee[P]?.toString().toLowerCase().includes(O.toLowerCase())&&h.push(G):ee[P]===O&&h.push(G)}}return h.slice(x,x+v)}firstCallDone(){return new Promise(e=>{if(!ve.firstCallDoneFlags.has(this.serviceURL))ve.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(ve.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),ve.firstCallDoneFlags.set(this.serviceURL,"loading"));const x=e.match(r);if(!x)throw new Error("dataProvider path is not valid");return await this.localGet(x[1],x[2])}const i={apiMethod:"get",path:e,additionalHeaders:t},u=await this.createHeaders(t),a=this.computeURL(e),h=JSON.stringify({url:a,headers:u,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),ve.firstCallDoneFlags.set(this.serviceURL,"loading")),!ve.loadingGetPromises.has(h)){const x=new Promise(async D=>{try{const P=await fetch(a,{headers:u,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),E=await this.handleResult(P,i);D({processed:E,response:this.lastResult})}catch{ve.firstCallDoneFlags.set(this.serviceURL,"error"),D(null)}});ve.loadingGetPromises.set(h,x)}const v=await ve.loadingGetPromises.get(h);return ve.loadingGetPromises.delete(h),v?(this.lastResult=v.response,v.processed):null}async getDetailed(e,t){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,t);if(i==null)return;const u=kn(i),a=this.computeURL(e);if(r)return{request:new Request(a,{method:"GET"}),result:u};const h=await this.createHeaders(t);return{request:new Request(a,{method:"GET",headers:new Headers(h),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:u}}async sendDetailed(e,t,r,i){const u=await this.send(e,t,r,i);if(u==null)return;const a=kn(u),h=this.computeURL(e),v=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(h,{method:r,headers:new Headers(v),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:a}}async postDetailed(e,t,r){return this.sendDetailed(e,t,"POST",r)}async putDetailed(e,t,r){return this.sendDetailed(e,t,"PUT",r)}async patchDetailed(e,t,r){return this.sendDetailed(e,t,"PATCH",r)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=st.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const u in t)i.searchParams.set(u,t[u]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,r="POST",i){const u={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:t},a=await this.createHeaders(i);a.Accept="application/json",a["Content-Type"]="application/json";const h=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:r,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(h,u)}async submitFormData(e,t,r="POST",i){const u={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:t},a=await this.createHeaders(i);a.Accept="application/json";const h=new FormData,v=t;for(const D in v)h.set(D,v[D]);const x=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:r,body:h,keepalive:this.keepAlive});return await this.handleResult(x,u)}async put(e,t,r){return this.send(e,t,"PUT",r)}async post(e,t,r){return this.send(e,t,"POST",r)}async patch(e,t,r){return this.send(e,t,"PATCH",r)}async delete(e,t,r){return this.send(e,t,"delete",r)}};ve.loadingGetPromises=new Map,ve.tokens=new Map,ve.invalidTokens=[],ve.failledTokenUpdates=new Map,ve.firstCallDoneFlags=new Map;let Ir=ve;st.getApiConfiguration(document.body||document.documentElement);var Pn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function as(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Gt={exports:{}},os=Gt.exports,xn;function us(){return xn||(xn=1,(function(n,e){var t=[].slice;(function(r,i){return e!==null?n.exports=i():r.UrlPattern=i()})(os,function(){var r,i,u,a,h,v,x,D,P,E,C,O,G,ee,J;return P=function(_){return _.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},x=function(_,g){var U,w,k;for(k=[],U=-1,w=_.length;++U<w;)k=k.concat(g(_[U]));return k},ee=function(_,g){var U,w,k;for(k="",U=-1,w=_.length;++U<w;)k+=g(_[U]);return k},G=function(_){return new RegExp(_.toString()+"|").exec("").length-1},C=function(_,g){var U,w,k,W,F;for(W={},U=-1,k=_.length;++U<k;)w=_[U],F=g[U],F!=null&&(W[w]!=null?(Array.isArray(W[w])||(W[w]=[W[w]]),W[w].push(F)):W[w]=F);return W},r={},r.Result=function(_,g){this.value=_,this.rest=g},r.Tagged=function(_,g){this.tag=_,this.value=g},r.tag=function(_,g){return function(U){var w,k;if(w=g(U),w!=null)return k=new r.Tagged(_,w.value),new r.Result(k,w.rest)}},r.regex=function(_){return function(g){var U,w;if(U=_.exec(g),U!=null)return w=U[0],new r.Result(w,g.slice(w.length))}},r.sequence=function(){var _;return _=1<=arguments.length?t.call(arguments,0):[],function(g){var U,w,k,W,F,Z;for(U=-1,w=_.length,Z=[],W=g;++U<w;){if(k=_[U],F=k(W),F==null)return;Z.push(F.value),W=F.rest}return new r.Result(Z,W)}},r.pick=function(){var _,g;return _=arguments[0],g=2<=arguments.length?t.call(arguments,1):[],function(U){var w,k;if(k=r.sequence.apply(r,g)(U),k!=null)return w=k.value,k.value=w[_],k}},r.string=function(_){var g;return g=_.length,function(U){if(U.slice(0,g)===_)return new r.Result(_,U.slice(g))}},r.lazy=function(_){var g;return g=null,function(U){return g==null&&(g=_()),g(U)}},r.baseMany=function(_,g,U,w,k){var W,F,Z,ne;for(Z=k,ne=U?"":[];!(g!=null&&(W=g(Z),W!=null)||(F=_(Z),F==null));)U?ne+=F.value:ne.push(F.value),Z=F.rest;if(!(w&&ne.length===0))return new r.Result(ne,Z)},r.many1=function(_){return function(g){return r.baseMany(_,null,!1,!0,g)}},r.concatMany1Till=function(_,g){return function(U){return r.baseMany(_,g,!0,!0,U)}},r.firstChoice=function(){var _;return _=1<=arguments.length?t.call(arguments,0):[],function(g){var U,w,k,W;for(U=-1,w=_.length;++U<w;)if(k=_[U],W=k(g),W!=null)return W}},O=function(_){var g;return g={},g.wildcard=r.tag("wildcard",r.string(_.wildcardChar)),g.optional=r.tag("optional",r.pick(1,r.string(_.optionalSegmentStartChar),r.lazy(function(){return g.pattern}),r.string(_.optionalSegmentEndChar))),g.name=r.regex(new RegExp("^["+_.segmentNameCharset+"]+")),g.named=r.tag("named",r.pick(1,r.string(_.segmentNameStartChar),r.lazy(function(){return g.name}))),g.escapedChar=r.pick(1,r.string(_.escapeChar),r.regex(/^./)),g.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return g.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(_.segmentNameStartChar),r.string(_.optionalSegmentStartChar),r.string(_.optionalSegmentEndChar),g.wildcard))),g.token=r.lazy(function(){return r.firstChoice(g.wildcard,g.optional,g.named,g.static)}),g.pattern=r.many1(r.lazy(function(){return g.token})),g},D={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},v=function(_,g){if(Array.isArray(_))return ee(_,function(U){return v(U,g)});switch(_.tag){case"wildcard":return"(.*?)";case"named":return"(["+g+"]+)";case"static":return P(_.value);case"optional":return"(?:"+v(_.value,g)+")?"}},h=function(_,g){return g==null&&(g=D.segmentValueCharset),"^"+v(_,g)+"$"},a=function(_){if(Array.isArray(_))return x(_,a);switch(_.tag){case"wildcard":return["_"];case"named":return[_.value];case"static":return[];case"optional":return a(_.value)}},E=function(_,g,U,w){var k,W,F,Z;if(w==null&&(w=!1),Z=_[g],Z==null){if(w)throw new Error("no values provided for key `"+g+"`");return}if(k=U[g]||0,W=Array.isArray(Z)?Z.length-1:0,k>W){if(w)throw new Error("too few values provided for key `"+g+"`");return}return F=Array.isArray(Z)?Z[k]:Z,w&&(U[g]=k+1),F},u=function(_,g,U){var w,k;if(Array.isArray(_)){for(w=-1,k=_.length;++w<k;)if(u(_[w],g,U))return!0;return!1}switch(_.tag){case"wildcard":return E(g,"_",U,!1)!=null;case"named":return E(g,_.value,U,!1)!=null;case"static":return!1;case"optional":return u(_.value,g,U)}},J=function(_,g,U){if(Array.isArray(_))return ee(_,function(w){return J(w,g,U)});switch(_.tag){case"wildcard":return E(g,"_",U,!0);case"named":return E(g,_.value,U,!0);case"static":return _.value;case"optional":return u(_.value,g,U)?J(_.value,g,U):""}},i=function(_,g){var U,w,k,W,F;if(_ instanceof i){this.isRegex=_.isRegex,this.regex=_.regex,this.ast=_.ast,this.names=_.names;return}if(this.isRegex=_ instanceof RegExp,!(typeof _=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=_,g!=null){if(!Array.isArray(g))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(U=G(this.regex),g.length!==U)throw new Error("regex contains "+U+" groups but array of group names contains "+g.length);this.names=g}return}if(_==="")throw new Error("argument must not be the empty string");if(F=_.replace(/\s+/g,""),F!==_)throw new Error("argument must not contain whitespace");if(w={escapeChar:g?.escapeChar||D.escapeChar,segmentNameStartChar:g?.segmentNameStartChar||D.segmentNameStartChar,segmentNameCharset:g?.segmentNameCharset||D.segmentNameCharset,segmentValueCharset:g?.segmentValueCharset||D.segmentValueCharset,optionalSegmentStartChar:g?.optionalSegmentStartChar||D.optionalSegmentStartChar,optionalSegmentEndChar:g?.optionalSegmentEndChar||D.optionalSegmentEndChar,wildcardChar:g?.wildcardChar||D.wildcardChar},W=O(w),k=W.pattern(_),k==null)throw new Error("couldn't parse pattern");if(k.rest!=="")throw new Error("could only partially parse pattern");this.ast=k.value,this.regex=new RegExp(h(this.ast,w.segmentValueCharset)),this.names=a(this.ast)},i.prototype.match=function(_){var g,U;return U=this.regex.exec(_),U==null?null:(g=U.slice(1),this.names?C(this.names,g):g)},i.prototype.stringify=function(_){if(_==null&&(_={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(_!==Object(_))throw new Error("argument must be an object or undefined");return J(this.ast,_,{})},i.escapeForRegex=P,i.concatMap=x,i.stringConcatMap=ee,i.regexGroupCount=G,i.keysAndValuesToObject=C,i.P=r,i.newParser=O,i.defaultOptions=D,i.astNodeToRegexString=h,i.astNodeToNames=a,i.getParam=E,i.astNodeContainsSegmentsForProvidedParams=u,i.stringify=J,i})})(Gt,Gt.exports)),Gt.exports}var cs=us();const ls=as(cs);class Gr{constructor(e){this.path=Gr.normalizePath(e)}getDataProviderKey(){return new ir(this.path)}static normalizePath(e){const t=String(e).trim();if(!t)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(t)){let v;try{v=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return v.pathname=v.pathname.replace(/\/+/g,"/"),v.href}const r=t.indexOf("?"),i=t.indexOf("#");let u=t.length;r>=0&&(u=Math.min(u,r)),i>=0&&(u=Math.min(u,i));let a=t.slice(0,u);const h=t.slice(u);if(a=a.replace(/^\/+/,""),a=a.replace(/\/+/g,"/"),!a&&h)throw new RangeError("Endpoint: path cannot be empty");return a+h}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}function ur(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Br={exports:{}},Cn;function fs(){return Cn||(Cn=1,(function(n,e){(function(t){n.exports=t()})(function(){return(function(){function t(r,i,u){function a(x,D){if(!i[x]){if(!r[x]){var P=typeof ur=="function"&&ur;if(!D&&P)return P(x,!0);if(h)return h(x,!0);var E=new Error("Cannot find module '"+x+"'");throw E.code="MODULE_NOT_FOUND",E}var C=i[x]={exports:{}};r[x][0].call(C.exports,function(O){var G=r[x][1][O];return a(G||O)},C,C.exports,t,r,i,u)}return i[x].exports}for(var h=typeof ur=="function"&&ur,v=0;v<u.length;v++)a(u[v]);return a}return t})()({1:[function(t,r,i){const u=t("./utils"),a=(function(){const h=u.stringToArray,v=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],x=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],D=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],P=["Thousand","Million","Billion","Trillion"];function E(S,R){var T=function(B,N,L){var q="";if(B<=19)q=(N?" and ":"")+(L?x[B]:v[B]);else if(B<100){const le=Math.floor(B/10),se=B%10;q=(N?" and ":"")+D[le-2],se>0?q+="-"+T(se,!1,L):L&&(q=q.substring(0,q.length-1)+"ieth")}else if(B<1e3){const le=Math.floor(B/100),se=B%100;q=(N?", ":"")+v[le]+" Hundred",se>0?q+=T(se,!0,L):L&&(q+="th")}else{var V=Math.floor(Math.log10(B)/3);V>P.length&&(V=P.length);const le=Math.pow(10,V*3),se=Math.floor(B/le),K=B-se*le;q=(N?", ":"")+T(se,!1,!1)+" "+P[V-1],K>0?q+=T(K,!0,L):L&&(q+="th")}return q},M=T(S,!1,R);return M}const C=Object.create(null);v.forEach(function(S,R){C[S.toLowerCase()]=R}),x.forEach(function(S,R){C[S.toLowerCase()]=R}),D.forEach(function(S,R){const T=S.toLowerCase();C[T]=(R+2)*10,C[T.substring(0,S.length-1)+"ieth"]=C[T]}),C.hundredth=100,P.forEach(function(S,R){const T=S.toLowerCase(),M=Math.pow(10,(R+1)*3);C[T]=M,C[T+"th"]=M});function O(S){const T=S.split(/,\s|\sand\s|[\s\\-]/).map(N=>C[N]);let M=[0];return T.forEach(N=>{if(N<100){let L=M.pop();L>=1e3&&(M.push(L),L=0),M.push(L+N)}else M.push(M.pop()*N)}),M.reduce((N,L)=>N+L,0)}const G=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],ee={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function J(S){for(var R=0;R<G.length;R++){const T=G[R];if(S>=T[0])return T[1]+J(S-T[0])}return""}function _(S){for(var R=0,T=1,M=S.length-1;M>=0;M--){const B=S[M],N=ee[B];N<T?R-=N:(T=N,R+=N)}return R}function g(S,R){for(var T=[],M=R.charCodeAt(0);S>0;)T.unshift(String.fromCharCode((S-1)%26+M)),S=Math.floor((S-1)/26);return T.join("")}function U(S,R){for(var T=R.charCodeAt(0),M=0,B=0;B<S.length;B++)M+=(S.charCodeAt(S.length-B-1)-T+1)*Math.pow(26,B);return M}function w(S,R){if(typeof S>"u")return;S=Math.floor(S);const T=ne(R);return F(S,T)}const k={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},W={UPPER:"upper",LOWER:"lower",TITLE:"title"};function F(S,R){let T;const M=S<0;switch(S=Math.abs(S),R.primary){case k.LETTERS:T=g(S,R.case===W.UPPER?"A":"a");break;case k.ROMAN:T=J(S),R.case===W.UPPER&&(T=T.toUpperCase());break;case k.WORDS:T=E(S,R.ordinal),R.case===W.UPPER?T=T.toUpperCase():R.case===W.LOWER&&(T=T.toLowerCase());break;case k.DECIMAL:T=""+S;var B=R.mandatoryDigits-T.length;if(B>0){var N=new Array(B+1).join("0");T=N+T}if(R.zeroCode!==48&&(T=h(T).map(le=>String.fromCodePoint(le.codePointAt(0)+R.zeroCode-48)).join("")),R.regular){const le=Math.floor((T.length-1)/R.groupingSeparators.position);for(let se=le;se>0;se--){const K=T.length-se*R.groupingSeparators.position;T=T.substr(0,K)+R.groupingSeparators.character+T.substr(K)}}else R.groupingSeparators.reverse().forEach(le=>{const se=T.length-le.position;T=T.substr(0,se)+le.character+T.substr(se)});if(R.ordinal){var L={1:"st",2:"nd",3:"rd"},q=T[T.length-1],V=L[q];(!V||T.length>1&&T[T.length-2]==="1")&&(V="th"),T=T+V}break;case k.SEQUENCE:throw{code:"D3130",value:R.token}}return M&&(T="-"+T),T}const Z=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function ne(S){const R={type:"integer",primary:k.DECIMAL,case:W.LOWER,ordinal:!1};let T,M;const B=S.lastIndexOf(";");switch(B===-1?T=S:(T=S.substring(0,B),M=S.substring(B+1),M[0]==="o"&&(R.ordinal=!0)),T){case"A":R.case=W.UPPER;case"a":R.primary=k.LETTERS;break;case"I":R.case=W.UPPER;case"i":R.primary=k.ROMAN;break;case"W":R.case=W.UPPER,R.primary=k.WORDS;break;case"Ww":R.case=W.TITLE,R.primary=k.WORDS;break;case"w":R.primary=k.WORDS;break;default:{let N=null,L=0,q=0,V=[],le=0;if(h(T).map(K=>K.codePointAt(0)).reverse().forEach(K=>{let X=!1;for(let oe=0;oe<Z.length;oe++){const Y=Z[oe];if(K>=Y&&K<=Y+9){if(X=!0,L++,le++,N===null)N=Y;else if(Y!==N)throw{code:"D3131"};break}}X||(K===35?(le++,q++):V.push({position:le,character:String.fromCodePoint(K)}))}),L>0){R.primary=k.DECIMAL,R.zeroCode=N,R.mandatoryDigits=L,R.optionalDigits=q;const X=function(oe){if(oe.length===0)return 0;const Y=oe[0].character;for(let Ue=1;Ue<oe.length;Ue++)if(oe[Ue].character!==Y)return 0;const Ne=oe.map(Ue=>Ue.position),Ze=function(Ue,Be){return Be===0?Ue:Ze(Be,Ue%Be)},Ge=Ne.reduce(Ze);for(let Ue=1;Ue<=Ne.length;Ue++)if(Ne.indexOf(Ue*Ge)===-1)return 0;return Ge}(V);X>0?(R.regular=!0,R.groupingSeparators={position:X,character:V[0].character}):(R.regular=!1,R.groupingSeparators=V)}else R.primary=k.SEQUENCE,R.token=T}}return R}const we={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function pe(S){var R=[];const T={type:"datetime",parts:R},M=function(X,oe){if(oe>X){let Y=S.substring(X,oe);Y=Y.split("]]").join("]"),R.push({type:"literal",value:Y})}};for(var B=0,N=0;N<S.length;){if(S.charAt(N)==="["){if(S.charAt(N+1)==="["){M(B,N),R.push({type:"literal",value:"["}),N+=2,B=N;continue}if(M(B,N),B=N,N=S.indexOf("]",B),N===-1)throw{code:"D3135"};let X=S.substring(B+1,N);X=X.split(/\s+/).join("");var L={type:"marker",component:X.charAt(0)},q=X.lastIndexOf(","),V;if(q!==-1){const oe=X.substring(q+1),Y=oe.indexOf("-");let Ne,Ze;const Ge=function(Be){if(!(typeof Be>"u"||Be==="*"))return parseInt(Be)};Y===-1?Ne=oe:(Ne=oe.substring(0,Y),Ze=oe.substring(Y+1));const Ue={min:Ge(Ne),max:Ge(Ze)};L.width=Ue,V=X.substring(1,q)}else V=X.substring(1);if(V.length===1)L.presentation1=V;else if(V.length>1){var le=V.charAt(V.length-1);"atco".indexOf(le)!==-1?(L.presentation2=le,le==="o"&&(L.ordinal=!0),L.presentation1=V.substring(0,V.length-1)):L.presentation1=V}else L.presentation1=we[L.component];if(typeof L.presentation1>"u")throw{code:"D3132",value:L.component};if(L.presentation1[0]==="n")L.names=W.LOWER;else if(L.presentation1[0]==="N")L.presentation1[1]==="n"?L.names=W.TITLE:L.names=W.UPPER;else if("YMDdFWwXxHhmsf".indexOf(L.component)!==-1){var se=L.presentation1;if(L.presentation2&&(se+=";"+L.presentation2),L.integerFormat=ne(se),L.width&&L.width.min!==void 0&&L.integerFormat.mandatoryDigits<L.width.min&&(L.integerFormat.mandatoryDigits=L.width.min),L.component==="Y")if(L.n=-1,L.width&&L.width.max!==void 0)L.n=L.width.max,L.integerFormat.mandatoryDigits=L.n;else{var K=L.integerFormat.mandatoryDigits+L.integerFormat.optionalDigits;K>=2&&(L.n=K)}const oe=R[R.length-1];oe&&oe.integerFormat&&(oe.integerFormat.parseWidth=oe.integerFormat.mandatoryDigits)}(L.component==="Z"||L.component==="z")&&(L.integerFormat=ne(L.presentation1)),R.push(L),B=N+1}N++}return M(B,N),T}const he=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Ye=1e3*60*60*24,ae=function(S){const R=Date.UTC(S.year,S.month);var T=new Date(R).getUTCDay();return T===0&&(T=7),T>4?R+(8-T)*Ye:R-(T-1)*Ye},de=function(S,R){return{year:S,month:R,nextMonth:function(){return R===11?de(S+1,0):de(S,R+1)},previousMonth:function(){return R===0?de(S-1,11):de(S,R-1)},nextYear:function(){return de(S+1,R)},previousYear:function(){return de(S-1,R)}}},He=function(S,R){return(R-S)/(Ye*7)+1},te=(S,R)=>{let T;switch(R){case"Y":T=S.getUTCFullYear();break;case"M":T=S.getUTCMonth()+1;break;case"D":T=S.getUTCDate();break;case"d":{const M=Date.UTC(S.getUTCFullYear(),S.getUTCMonth(),S.getUTCDate()),B=Date.UTC(S.getUTCFullYear(),0);T=(M-B)/Ye+1;break}case"F":T=S.getUTCDay(),T===0&&(T=7);break;case"W":{const M=de(S.getUTCFullYear(),0),B=ae(M),N=Date.UTC(M.year,S.getUTCMonth(),S.getUTCDate());let L=He(B,N);if(L>52){const q=ae(M.nextYear());N>=q&&(L=1)}else if(L<1){const q=ae(M.previousYear());L=He(q,N)}T=Math.floor(L);break}case"w":{const M=de(S.getUTCFullYear(),S.getUTCMonth()),B=ae(M),N=Date.UTC(M.year,M.month,S.getUTCDate());let L=He(B,N);if(L>4){const q=ae(M.nextMonth());N>=q&&(L=1)}else if(L<1){const q=ae(M.previousMonth());L=He(q,N)}T=Math.floor(L);break}case"X":{const M=de(S.getUTCFullYear(),0),B=ae(M),N=ae(M.nextYear()),L=S.getTime();L<B?T=M.year-1:L>=N?T=M.year+1:T=M.year;break}case"x":{const M=de(S.getUTCFullYear(),S.getUTCMonth()),B=ae(M),N=M.nextMonth(),L=ae(N),q=S.getTime();q<B?T=M.previousMonth().month+1:q>=L?T=N.month+1:T=M.month+1;break}case"H":T=S.getUTCHours();break;case"h":T=S.getUTCHours(),T=T%12,T===0&&(T=12);break;case"P":T=S.getUTCHours()>=12?"pm":"am";break;case"m":T=S.getUTCMinutes();break;case"s":T=S.getUTCSeconds();break;case"f":T=S.getUTCMilliseconds();break;case"Z":case"z":break;case"C":T="ISO";break;case"E":T="ISO";break}return T};let xe=null;function rt(S,R,T){var M=0,B=0;if(typeof T<"u"){const se=parseInt(T);M=Math.floor(se/100),B=se%100}var N=function(se,K){var X=te(se,K.component);if("YMDdFWwXxHhms".indexOf(K.component)!==-1)if(K.component==="Y"&&K.n!==-1&&(X=X%Math.pow(10,K.n)),K.names){if(K.component==="M"||K.component==="x")X=Pe[X-1];else if(K.component==="F")X=he[X];else throw{code:"D3133",value:K.component};K.names===W.UPPER?X=X.toUpperCase():K.names===W.LOWER&&(X=X.toLowerCase()),K.width&&X.length>K.width.max&&(X=X.substring(0,K.width.max))}else X=F(X,K.integerFormat);else if(K.component==="f")X=F(X,K.integerFormat);else if(K.component==="Z"||K.component==="z"){const oe=M*100+B;if(K.integerFormat.regular)X=F(oe,K.integerFormat);else{const Y=K.integerFormat.mandatoryDigits;if(Y===1||Y===2)X=F(M,K.integerFormat),B!==0&&(X+=":"+w(B,"00"));else if(Y===3||Y===4)X=F(oe,K.integerFormat);else throw{code:"D3134",value:Y}}oe>=0&&(X="+"+X),K.component==="z"&&(X="GMT"+X),oe===0&&K.presentation2==="t"&&(X="Z")}else K.component==="P"&&K.names===W.UPPER&&(X=X.toUpperCase());return X};let L;typeof R>"u"?(xe===null&&(xe=pe("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),L=xe):L=pe(R);const q=(60*M+B)*60*1e3,V=new Date(S+q);let le="";return L.parts.forEach(function(se){se.type==="literal"?le+=se.value:le+=N(V,se)}),le}function d(S){var R=Object.create(null);if(S.type==="datetime")R.type="datetime",R.parts=S.parts.map(function(T){var M=Object.create(null);if(T.type==="literal")M.regex=T.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(T.component==="Z"||T.component==="z"){let N;Array.isArray(T.integerFormat.groupingSeparators)||(N=T.integerFormat.groupingSeparators),M.regex="",T.component==="z"&&(M.regex="GMT"),M.regex+="[-+][0-9]+",N&&(M.regex+=N.character+"[0-9]+"),M.parse=function(L){T.component==="z"&&(L=L.substring(3));let q=0,V=0;return N?(q=Number.parseInt(L.substring(0,L.indexOf(N.character))),V=Number.parseInt(L.substring(L.indexOf(N.character)+1))):L.length-1<=2?q=Number.parseInt(L):(q=Number.parseInt(L.substring(0,3)),V=Number.parseInt(L.substring(3))),q*60+V}}else if(T.component==="f")M.regex="[0-9]+",M.parse=function(N){return parseFloat("0."+N.substring(0,3))*1e3};else if(T.integerFormat)M=d(T.integerFormat);else{M.regex="[a-zA-Z]+";var B=Object.create(null);if(T.component==="M"||T.component==="x")Pe.forEach(function(N,L){T.width&&T.width.max?B[N.substring(0,T.width.max)]=L+1:B[N]=L+1});else if(T.component==="F")he.forEach(function(N,L){L>0&&(T.width&&T.width.max?B[N.substring(0,T.width.max)]=L:B[N]=L)});else if(T.component==="P")B={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:T.component};M.parse=function(N){return B[N]}}return M.component=T.component,M});else{R.type="integer";const T=S.case===W.UPPER;switch(S.primary){case k.LETTERS:R.regex=T?"[A-Z]+":"[a-z]+",R.parse=function(M){return U(M,T?"A":"a")};break;case k.ROMAN:R.regex=T?"[MDCLXVI]+":"[mdclxvi]+",R.parse=function(M){return _(T?M:M.toUpperCase())};break;case k.WORDS:R.regex="(?:"+u.keys(C).concat("and","[\\-, ]").join("|")+")+",R.parse=function(M){return O(M.toLowerCase())};break;case k.DECIMAL:R.regex="[0-9]",S.parseWidth?R.regex+=`{${S.parseWidth}}`:R.regex+="+",S.ordinal&&(R.regex+="(?:th|st|nd|rd)"),R.parse=function(M){let B=M;return S.ordinal&&(B=M.substring(0,M.length-2)),S.regular?B=B.split(",").join(""):S.groupingSeparators.forEach(N=>{B=B.split(N.character).join("")}),S.zeroCode!==48&&(B=B.split("").map(N=>String.fromCodePoint(N.codePointAt(0)-S.zeroCode+48)).join("")),parseInt(B)};break;case k.SEQUENCE:throw{code:"D3130",value:S.token}}}return R}function b(S,R){if(typeof S>"u")return;const T=ne(R);return d(T).parse(S)}function z(S,R){const T=pe(R),M=d(T),B="^"+M.parts.map(V=>"("+V.regex+")").join("")+"$";var L=new RegExp(B,"i").exec(S);if(L!==null){const Y=Object.create(null);for(let c=1;c<L.length;c++){const f=M.parts[c-1];f.parse&&(Y[f.component]=f.parse(L[c]))}if(Object.getOwnPropertyNames(Y).length===0)return;let Ne=0;const Ze=c=>{Ne<<=1,Ne+=c?1:0},Ge=c=>!(~c&Ne)&&!!(c&Ne);"YXMxWwdD".split("").forEach(c=>Ze(Y[c]));const Be=!Ge(161)&&Ge(130),ot=Ge(84),Ct=!ot&&Ge(72);Ne=0,"PHhmsf".split("").forEach(c=>Ze(Y[c]));const j=!Ge(23)&&Ge(47),et=(Be?"YD":ot?"XxwF":Ct?"XWF":"YMD")+(j?"Phmsf":"Hmsf"),Yt=this.environment.timestamp;let nt=!1,bt=!1;if(et.split("").forEach(c=>{if(typeof Y[c]>"u")nt?(Y[c]="MDd".indexOf(c)!==-1?1:0,bt=!0):Y[c]=te(Yt,c);else if(nt=!0,bt)throw{code:"D3136"}}),Y.M>0?Y.M-=1:Y.M=0,Be){const c=Date.UTC(Y.Y,0),f=(Y.d-1)*1e3*60*60*24,p=new Date(c+f);Y.M=p.getUTCMonth(),Y.D=p.getUTCDate()}if(ot)throw{code:"D3136"};if(Ct)throw{code:"D3136"};j&&(Y.H=Y.h===12?0:Y.h,Y.P===1&&(Y.H+=12));var q=Date.UTC(Y.Y,Y.M,Y.D,Y.H,Y.m,Y.s,Y.f);return(Y.Z||Y.z)&&(q-=(Y.Z||Y.z)*60*1e3),q}}var ce=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function Ee(S,R){if(!(typeof S>"u"))if(typeof R>"u"){if(!ce.test(S))throw{stack:new Error().stack,code:"D3110",value:S};return Date.parse(S)}else return z.call(this,S,R)}function ye(S,R,T){if(!(typeof S>"u"))return rt.call(this,S,R,T)}return{formatInteger:w,parseInteger:b,fromMillis:ye,toMillis:Ee}})();r.exports=a},{"./utils":6}],2:[function(t,r,i){(function(u){(function(){var a=t("./utils");const h=(()=>{var v=a.isNumeric,x=a.isArrayOfStrings,D=a.isArrayOfNumbers,P=a.isSequence,E=a.isFunction,C=a.isLambda,O=a.isPromise,G=a.getFunctionArity,ee=a.isDeepEqual,J=a.stringToArray;function _(s){if(!(typeof s>"u")){var o=0;return s.forEach(function(l){o+=l}),o}}function g(s){return typeof s>"u"?0:s.length}function U(s){if(!(typeof s>"u"||s.length===0))return Math.max.apply(Math,s)}function w(s){if(!(typeof s>"u"||s.length===0))return Math.min.apply(Math,s)}function k(s){if(!(typeof s>"u"||s.length===0)){var o=0;return s.forEach(function(l){o+=l}),o/s.length}}function W(s,o=!1){if(!(typeof s>"u")){var l;if(typeof s=="string")l=s;else if(E(s))l="";else{if(typeof s=="number"&&!isFinite(s))throw{code:"D3001",value:s,stack:new Error().stack};var y=o?2:0;Array.isArray(s)&&s.outerWrapper&&(s=s[0]),l=JSON.stringify(s,function(m,A){return typeof A<"u"&&A!==null&&v(A)?A.toPrecision&&!Number.isInteger(A)?Number(A.toPrecision(15)):A:A&&E(A)?"":A},y)}return l}}function F(s,o,l){if(!(typeof s>"u")){var y=J(s),m=y.length;if(m+o<0&&(o=0),typeof l<"u"){if(l<=0)return"";var A=o>=0?o+l:m+o+l;return y.slice(o,A).join("")}return y.slice(o).join("")}}function Z(s,o){if(!(typeof s>"u")){var l=s.indexOf(o);return l>-1?s.substr(0,l):s}}function ne(s,o){if(!(typeof s>"u")){var l=s.indexOf(o);return l>-1?s.substr(l+o.length):s}}function we(s){if(!(typeof s>"u"))return s.toLowerCase()}function pe(s){if(!(typeof s>"u"))return s.toUpperCase()}function he(s){if(!(typeof s>"u"))return J(s).length}function Pe(s){if(!(typeof s>"u")){var o=s.replace(/[ \t\n\r]+/gm," ");return o.charAt(0)===" "&&(o=o.substring(1)),o.charAt(o.length-1)===" "&&(o=o.substring(0,o.length-1)),o}}function Ye(s,o,l){if(!(typeof s>"u")){(typeof l>"u"||l.length===0)&&(l=" ");var y;o=Math.trunc(o);var m=Math.abs(o)-he(s);if(m>0){var A=new Array(m+1).join(l);l.length>1&&(A=F(A,0,m)),o>0?y=s+A:y=A+s}else y=s;return y}}async function ae(s,o){var l=s.apply(this,[o]);if(O(l)&&(l=await l),l&&!(typeof l.start=="number"||l.end==="number"||Array.isArray(l.groups)||E(l.next)))throw{code:"T1010",stack:new Error().stack};return l}async function de(s,o){if(!(typeof s>"u"||typeof o>"u")){var l;if(typeof o=="string")l=s.indexOf(o)!==-1;else{var y=await ae(o,s);l=typeof y<"u"}return l}}async function He(s,o,l){if(!(typeof s>"u")){if(l<0)throw{stack:new Error().stack,value:l,code:"D3040",index:3};var y=this.createSequence();if(typeof l>"u"||l>0){var m=0,A=await ae(o,s);if(typeof A<"u")for(;typeof A<"u"&&(typeof l>"u"||m<l);)y.push({match:A.match,index:A.start,groups:A.groups}),A=await ae(A.next),m++}return y}}async function te(s,o,l,y){if(!(typeof s>"u")){var m=this;if(o==="")throw{code:"D3010",stack:new Error().stack,value:o,index:2};if(y<0)throw{code:"D3011",stack:new Error().stack,value:y,index:4};var A;typeof l=="string"?A=function(Se){for(var De="",ge=0,Ce=l.indexOf("$",ge);Ce!==-1&&ge<l.length;){De+=l.substring(ge,Ce),ge=Ce+1;var Qe=l.charAt(ge);if(Qe==="$")De+="$",ge++;else if(Qe==="0")De+=Se.match,ge++;else{var qe;if(Se.groups.length===0?qe=1:qe=Math.floor(Math.log(Se.groups.length)*Math.LOG10E)+1,Ce=parseInt(l.substring(ge,ge+qe),10),qe>1&&Ce>Se.groups.length&&(Ce=parseInt(l.substring(ge,ge+qe-1),10)),isNaN(Ce))De+="$";else{if(Se.groups.length>0){var it=Se.groups[Ce-1];typeof it<"u"&&(De+=it)}ge+=Ce.toString().length}}Ce=l.indexOf("$",ge)}return De+=l.substring(ge),De}:A=l;var $="",I=0;if(typeof y>"u"||y>0){var re=0;if(typeof o=="string"){for(var H=s.indexOf(o,I);H!==-1&&(typeof y>"u"||re<y);)$+=s.substring(I,H),$+=l,I=H+o.length,re++,H=s.indexOf(o,I);$+=s.substring(I)}else{var be=await ae(o,s);if(typeof be<"u"){for(;typeof be<"u"&&(typeof y>"u"||re<y);){$+=s.substring(I,be.start);var _e=A.apply(m,[be]);if(O(_e)&&(_e=await _e),typeof _e=="string")$+=_e;else throw{code:"D3012",stack:new Error().stack,value:_e};I=be.start+be.match.length,re++,be=await ae(be.next)}$+=s.substring(I)}else $=s}}else $=s;return $}}function xe(s){if(!(typeof s>"u")){var o=typeof window<"u"?window.btoa:function(l){return new u.Buffer.from(l,"binary").toString("base64")};return o(s)}}function rt(s){if(!(typeof s>"u")){var o=typeof window<"u"?window.atob:function(l){return new u.Buffer.from(l,"base64").toString("binary")};return o(s)}}function d(s){if(!(typeof s>"u")){var o;try{o=encodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrlComponent"}}return o}}function b(s){if(!(typeof s>"u")){var o;try{o=encodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrl"}}return o}}function z(s){if(!(typeof s>"u")){var o;try{o=decodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrlComponent"}}return o}}function ce(s){if(!(typeof s>"u")){var o;try{o=decodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrl"}}return o}}async function Ee(s,o,l){if(!(typeof s>"u")){if(l<0)throw{code:"D3020",stack:new Error().stack,value:l,index:3};var y=[];if(typeof l>"u"||l>0)if(typeof o=="string")y=s.split(o,l);else{var m=0,A=await ae(o,s);if(typeof A<"u"){for(var $=0;typeof A<"u"&&(typeof l>"u"||m<l);)y.push(s.substring($,A.start)),$=A.end,A=await ae(A.next),m++;(typeof l>"u"||m<l)&&y.push(s.substring($))}else y.push(s)}return y}}function ye(s,o){if(!(typeof s>"u"))return typeof o>"u"&&(o=""),s.join(o)}function S(s,o,l){if(!(typeof s>"u")){var y={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},m=y;typeof l<"u"&&a.keys(l).forEach(function(Q){m[Q]=l[Q]});for(var A=[],$=m["zero-digit"].charCodeAt(0),I=$;I<$+10;I++)A.push(String.fromCharCode(I));var re=A.concat([m["decimal-separator"],m["exponent-separator"],m["grouping-separator"],m.digit,m["pattern-separator"]]),H=o.split(m["pattern-separator"]);if(H.length>2)throw{code:"D3080",stack:new Error().stack};var be=function(Q){var ke=(function(){for(var Me,Ke=0;Ke<Q.length;Ke++)if(Me=Q.charAt(Ke),re.indexOf(Me)!==-1&&Me!==m["exponent-separator"])return Q.substring(0,Ke);return""})(),We=(function(){for(var Me,Ke=Q.length-1;Ke>=0;Ke--)if(Me=Q.charAt(Ke),re.indexOf(Me)!==-1&&Me!==m["exponent-separator"])return Q.substring(Ke+1);return""})(),Ae=Q.substring(ke.length,Q.length-We.length),Ve,pt,Xe,wt,Je=Q.indexOf(m["exponent-separator"],ke.length);Je===-1||Je>Q.length-We.length?(Ve=Ae,pt=void 0):(Ve=Ae.substring(0,Je),pt=Ae.substring(Je+1));var tt=Ve.indexOf(m["decimal-separator"]);return tt===-1?(Xe=Ve,wt=We):(Xe=Ve.substring(0,tt),wt=Ve.substring(tt+1)),{prefix:ke,suffix:We,activePart:Ae,mantissaPart:Ve,exponentPart:pt,integerPart:Xe,fractionalPart:wt,subpicture:Q}},_e=function(Q){var ke,We,Ae=Q.subpicture,Ve=Ae.indexOf(m["decimal-separator"]);Ve!==Ae.lastIndexOf(m["decimal-separator"])&&(ke="D3081"),Ae.indexOf(m.percent)!==Ae.lastIndexOf(m.percent)&&(ke="D3082"),Ae.indexOf(m["per-mille"])!==Ae.lastIndexOf(m["per-mille"])&&(ke="D3083"),Ae.indexOf(m.percent)!==-1&&Ae.indexOf(m["per-mille"])!==-1&&(ke="D3084");var pt=!1;for(We=0;We<Q.mantissaPart.length;We++){var Xe=Q.mantissaPart.charAt(We);if(A.indexOf(Xe)!==-1||Xe===m.digit){pt=!0;break}}pt||(ke="D3085");var wt=Q.activePart.split("").map(function(Me){return re.indexOf(Me)===-1?"p":"a"}).join("");wt.indexOf("p")!==-1&&(ke="D3086"),Ve!==-1?(Ae.charAt(Ve-1)===m["grouping-separator"]||Ae.charAt(Ve+1)===m["grouping-separator"])&&(ke="D3087"):Q.integerPart.charAt(Q.integerPart.length-1)===m["grouping-separator"]&&(ke="D3088"),Ae.indexOf(m["grouping-separator"]+m["grouping-separator"])!==-1&&(ke="D3089");var Je=Q.integerPart.indexOf(m.digit);Je!==-1&&Q.integerPart.substring(0,Je).split("").filter(function(Me){return A.indexOf(Me)>-1}).length>0&&(ke="D3090"),Je=Q.fractionalPart.lastIndexOf(m.digit),Je!==-1&&Q.fractionalPart.substring(Je).split("").filter(function(Me){return A.indexOf(Me)>-1}).length>0&&(ke="D3091");var tt=typeof Q.exponentPart=="string";if(tt&&Q.exponentPart.length>0&&(Ae.indexOf(m.percent)!==-1||Ae.indexOf(m["per-mille"])!==-1)&&(ke="D3092"),tt&&(Q.exponentPart.length===0||Q.exponentPart.split("").filter(function(Me){return A.indexOf(Me)===-1}).length>0)&&(ke="D3093"),ke)throw{code:ke,stack:new Error().stack}},Se=function(Q){var ke=function(Ie,wr){for(var Zt=[],ut=Ie.indexOf(m["grouping-separator"]);ut!==-1;){var Er=(wr?Ie.substring(0,ut):Ie.substring(ut)).split("").filter(function(Ut){return A.indexOf(Ut)!==-1||Ut===m.digit}).length;Zt.push(Er),ut=Q.integerPart.indexOf(m["grouping-separator"],ut+1)}return Zt},We=ke(Q.integerPart),Ae=function(Ie){if(Ie.length===0)return 0;for(var wr=function(Er,Ut){return Ut===0?Er:wr(Ut,Er%Ut)},Zt=Ie.reduce(wr),ut=1;ut<=Ie.length;ut++)if(Ie.indexOf(ut*Zt)===-1)return 0;return Zt},Ve=Ae(We),pt=ke(Q.fractionalPart,!0),Xe=Q.integerPart.split("").filter(function(Ie){return A.indexOf(Ie)!==-1}).length,wt=Xe,Je=Q.fractionalPart.split(""),tt=Je.filter(function(Ie){return A.indexOf(Ie)!==-1}).length,Me=Je.filter(function(Ie){return A.indexOf(Ie)!==-1||Ie===m.digit}).length,Ke=typeof Q.exponentPart=="string";Xe===0&&Me===0&&(Ke?(tt=1,Me=1):Xe=1),Ke&&Xe===0&&Q.integerPart.indexOf(m.digit)!==-1&&(Xe=1),Xe===0&&tt===0&&(tt=1);var ai=0;return Ke&&(ai=Q.exponentPart.split("").filter(function(Ie){return A.indexOf(Ie)!==-1}).length),{integerPartGroupingPositions:We,regularGrouping:Ve,minimumIntegerPartSize:Xe,scalingFactor:wt,prefix:Q.prefix,fractionalPartGroupingPositions:pt,minimumFactionalPartSize:tt,maximumFactionalPartSize:Me,minimumExponentSize:ai,suffix:Q.suffix,picture:Q.subpicture}},De=H.map(be);De.forEach(_e);var ge=De.map(Se),Ce=m["minus-sign"],Qe=m["zero-digit"],qe=m["decimal-separator"],it=m["grouping-separator"];ge.length===1&&(ge.push(JSON.parse(JSON.stringify(ge[0]))),ge[1].prefix=Ce+ge[1].prefix);var Oe;s>=0?Oe=ge[0]:Oe=ge[1];var Jt;Oe.picture.indexOf(m.percent)!==-1?Jt=s*100:Oe.picture.indexOf(m["per-mille"])!==-1?Jt=s*1e3:Jt=s;var dt,Lt;if(Oe.minimumExponentSize===0)dt=Jt;else{var pa=Math.pow(10,Oe.scalingFactor),ma=Math.pow(10,Oe.scalingFactor-1);if(dt=Jt,Lt=0,dt!==0){for(;Math.abs(dt)<ma;)dt*=10,Lt-=1;for(;Math.abs(dt)>pa;)dt/=10,Lt+=1}}var ga=L(dt,Oe.maximumFactionalPartSize),ii=function(Q,ke){var We=Math.abs(Q).toFixed(ke);return Qe!=="0"&&(We=We.split("").map(function(Ae){return Ae>="0"&&Ae<="9"?A[Ae.charCodeAt(0)-48]:Ae}).join("")),We},ie=ii(ga,Oe.maximumFactionalPartSize),je=ie.indexOf(".");for(je===-1?ie=ie+qe:ie=ie.replace(".",qe);ie.charAt(0)===Qe;)ie=ie.substring(1);for(;ie.charAt(ie.length-1)===Qe;)ie=ie.substring(0,ie.length-1);je=ie.indexOf(qe);var Kt=Oe.minimumIntegerPartSize-je,si=Oe.minimumFactionalPartSize-(ie.length-je-1);if(ie=(Kt>0?new Array(Kt+1).join(Qe):"")+ie,ie=ie+(si>0?new Array(si+1).join(Qe):""),je=ie.indexOf(qe),Oe.regularGrouping>0)for(var va=Math.floor((je-1)/Oe.regularGrouping),yr=1;yr<=va;yr++)ie=[ie.slice(0,je-yr*Oe.regularGrouping),it,ie.slice(je-yr*Oe.regularGrouping)].join("");else Oe.integerPartGroupingPositions.forEach(function(Q){ie=[ie.slice(0,je-Q),it,ie.slice(je-Q)].join(""),je++});if(je=ie.indexOf(qe),Oe.fractionalPartGroupingPositions.forEach(function(Q){ie=[ie.slice(0,Q+je+1),it,ie.slice(Q+je+1)].join("")}),je=ie.indexOf(qe),(Oe.picture.indexOf(qe)===-1||je===ie.length-1)&&(ie=ie.substring(0,ie.length-1)),typeof Lt<"u"){var br=ii(Lt,0);Kt=Oe.minimumExponentSize-br.length,Kt>0&&(br=new Array(Kt+1).join(Qe)+br),ie=ie+m["exponent-separator"]+(Lt<0?Ce:"")+br}return ie=Oe.prefix+ie+Oe.suffix,ie}}function R(s,o){if(!(typeof s>"u")){if(s=L(s),typeof o>"u"?o=10:o=L(o),o<2||o>36)throw{code:"D3100",stack:new Error().stack,value:o};var l=s.toString(o);return l}}function T(s){var o;if(!(typeof s>"u")){if(typeof s=="number")o=s;else if(typeof s=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(s)&&!isNaN(parseFloat(s))&&isFinite(s))o=parseFloat(s);else if(typeof s=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(s))o=Number(s);else if(s===!0)o=1;else if(s===!1)o=0;else throw{code:"D3030",value:s,stack:new Error().stack,index:1};return o}}function M(s){var o;if(!(typeof s>"u"))return o=Math.abs(s),o}function B(s){var o;if(!(typeof s>"u"))return o=Math.floor(s),o}function N(s){var o;if(!(typeof s>"u"))return o=Math.ceil(s),o}function L(s,o){var l;if(!(typeof s>"u")){if(o){var y=s.toString().split("e");s=+(y[0]+"e"+(y[1]?+y[1]+o:o))}l=Math.round(s);var m=l-s;return Math.abs(m)===.5&&Math.abs(l%2)===1&&(l=l-1),o&&(y=l.toString().split("e"),l=+(y[0]+"e"+(y[1]?+y[1]-o:-o))),Object.is(l,-0)&&(l=0),l}}function q(s){var o;if(!(typeof s>"u")){if(s<0)throw{stack:new Error().stack,code:"D3060",index:1,value:s};return o=Math.sqrt(s),o}}function V(s,o){var l;if(!(typeof s>"u")){if(l=Math.pow(s,o),!isFinite(l))throw{stack:new Error().stack,code:"D3061",index:1,value:s,exp:o};return l}}function le(){return Math.random()}function se(s){if(!(typeof s>"u")){var o=!1;if(Array.isArray(s)){if(s.length===1)o=se(s[0]);else if(s.length>1){var l=s.filter(function(y){return se(y)});o=l.length>0}}else typeof s=="string"?s.length>0&&(o=!0):v(s)?s!==0&&(o=!0):s!==null&&typeof s=="object"&&!E(s)?a.keys(s).length>0&&(o=!0):typeof s=="boolean"&&s===!0&&(o=!0);return o}}function K(s){if(!(typeof s>"u"))return!se(s)}function X(s,o,l,y){var m=[o],A=G(s);return A>=2&&m.push(l),A>=3&&m.push(y),m}async function oe(s,o){if(!(typeof s>"u")){for(var l=this.createSequence(),y=0;y<s.length;y++){var m=X(o,s[y],y,s),A=await o.apply(this,m);typeof A<"u"&&l.push(A)}return l}}async function Y(s,o){if(!(typeof s>"u")){for(var l=this.createSequence(),y=0;y<s.length;y++){var m=s[y],A=X(o,m,y,s),$=await o.apply(this,A);se($)&&l.push(m)}return l}}async function Ne(s,o){if(!(typeof s>"u")){for(var l=!1,y,m=0;m<s.length;m++){var A=s[m],$=!0;if(typeof o<"u"){var I=X(o,A,m,s),re=await o.apply(this,I);$=se(re)}if($)if(!l)y=A,l=!0;else throw{stack:new Error().stack,code:"D3138",index:m}}if(!l)throw{stack:new Error().stack,code:"D3139"};return y}}function Ze(){for(var s=[],o=Array.prototype.slice.call(arguments),l=Math.min.apply(Math,o.map(function(A){return Array.isArray(A)?A.length:0})),y=0;y<l;y++){var m=o.map(A=>A[y]);s.push(m)}return s}async function Ge(s,o,l){if(!(typeof s>"u")){var y,m=G(o);if(m<2)throw{stack:new Error().stack,code:"D3050",index:1};var A;for(typeof l>"u"&&s.length>0?(y=s[0],A=1):(y=l,A=0);A<s.length;){var $=[y,s[A]];m>=3&&$.push(A),m>=4&&$.push(s),y=await o.apply(this,$),A++}return y}}function Ue(s){var o=this.createSequence();if(Array.isArray(s)){for(var l=Object.create(null),y=0;y<s.length;y++){var m=Ue.call(this,s[y]);m.forEach(function(A){l[A]=!0})}o=Ue.call(this,l)}else s!==null&&typeof s=="object"&&!E(s)&&a.keys(s).forEach(A=>o.push(A));return o}function Be(s,o){var l;if(Array.isArray(s)){l=this.createSequence();for(var y=0;y<s.length;y++){var m=Be.call(this,s[y],o);typeof m<"u"&&(Array.isArray(m)?m.forEach(A=>l.push(A)):l.push(m))}}else s!==null&&typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,o)&&!E(s)&&(l=s[o]);return l}function ot(s,o){if(typeof s>"u")return o;if(typeof o>"u")return s;Array.isArray(s)||(s=this.createSequence(s)),Array.isArray(o)||(o=[o]);const l=s.length+o.length;if(this.options&&l>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};return s.concat(o)}function Ct(s){return!(typeof s>"u")}function Rt(s){var o=this.createSequence();if(Array.isArray(s))for(var l=0;l<s.length;l++)o=ot.call(this,o,Rt.call(this,s[l]));else if(s!==null&&typeof s=="object"&&!C(s))for(const m of a.keys(s)){var y=Object.create(null);y[m]=s[m],o.push(y)}else o=s;return o}function j(s){if(!(typeof s>"u")){var o=Object.create(null);return s.forEach(function(l){for(const y of a.keys(l))o[y]=l[y]}),o}}function gr(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var o=s.length,l=new Array(o),y=0;y<o;y++)l[o-y-1]=s[y];return l}}async function vr(s,o){var l=this.createSequence();for(const A of a.keys(s)){var y=X(o,s[A],A,s),m=await o.apply(this,y);typeof m<"u"&&l.push(m)}return l}function et(s){throw{code:"D3137",stack:new Error().stack,message:s||"$error() function evaluated"}}function Yt(s,o){if(!s)throw{code:"D3141",stack:new Error().stack,message:o||"$assert() statement failed"}}function nt(s){if(s!==void 0)return s===null?"null":v(s)?"number":typeof s=="string"?"string":typeof s=="boolean"?"boolean":Array.isArray(s)?"array":E(s)?"function":"object"}async function bt(s,o){if(!(typeof s>"u")){if(s.length<=1)return s;var l;if(typeof o>"u"){if(!D(s)&&!x(s))throw{stack:new Error().stack,code:"D3070",index:1};l=async function($,I){return $>I}}else l=o;var y=async function($,I){var re=async function(be,_e,Se){_e.length===0?Array.prototype.push.apply(be,Se):Se.length===0?Array.prototype.push.apply(be,_e):await l(_e[0],Se[0])?(be.push(Se[0]),await re(be,_e,Se.slice(1))):(be.push(_e[0]),await re(be,_e.slice(1),Se))},H=[];return await re(H,$,I),H},m=async function($){if(!Array.isArray($)||$.length<=1)return $;var I=Math.floor($.length/2),re=$.slice(0,I),H=$.slice(I);return re=await m(re),H=await m(H),await y(re,H)},A=await m(s);return A}}function c(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var o=new Array(s.length),l=0;l<s.length;l++){var y=Math.floor(Math.random()*(l+1));l!==y&&(o[l]=o[y]),o[y]=s[l]}return o}}function f(s){if(!(typeof s>"u")){if(!Array.isArray(s)||s.length<=1)return s;for(var o=P(s)?this.createSequence():[],l=0;l<s.length;l++){for(var y=s[l],m=!1,A=0;A<o.length;A++)if(ee(y,o[A])){m=!0;break}m||o.push(y)}return o}}async function p(s,o){var l=Object.create(null);for(const $ of a.keys(s)){var y=s[$],m=X(o,y,$,s),A=await o.apply(this,m);se(A)&&(l[$]=y)}return a.keys(l).length===0&&(l=void 0),l}return{sum:_,count:g,max:U,min:w,average:k,string:W,substring:F,substringBefore:Z,substringAfter:ne,lowercase:we,uppercase:pe,length:he,trim:Pe,pad:Ye,match:He,contains:de,replace:te,split:Ee,join:ye,formatNumber:S,formatBase:R,number:T,floor:B,ceil:N,round:L,abs:M,sqrt:q,power:V,random:le,boolean:se,not:K,map:oe,zip:Ze,filter:Y,single:Ne,foldLeft:Ge,sift:p,keys:Ue,lookup:Be,append:ot,exists:Ct,spread:Rt,merge:j,reverse:gr,each:vr,error:et,assert:Yt,type:nt,sort:bt,shuffle:c,distinct:f,base64encode:xe,base64decode:rt,encodeUrlComponent:d,encodeUrl:b,decodeUrlComponent:z,decodeUrl:ce}})();r.exports=h}).call(this)}).call(this,typeof Pn<"u"?Pn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,r,i){var u=t("./datetime"),a=t("./functions"),h=t("./utils"),v=t("./parser"),x=t("./signature"),D=(function(){var P=h.isNumeric,E=h.isArrayOfStrings,C=h.isArrayOfNumbers,O=h.isSequence,G=h.isFunction,ee=h.isLambda,J=h.isIterable,_=h.isPromise,g=h.getFunctionArity,U=h.isDeepEqual,w=et(null);async function k(c,f,p){var s;p.base.depth++,p.base.guardrails();var o=p.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(o&&await o(c,f,p),c.type){case"path":s=await W(c,f,p);break;case"binary":s=await he(c,f,p);break;case"unary":s=await Pe(c,f,p);break;case"name":s=Ye(c,f,p);break;case"string":case"number":case"value":s=ae(c);break;case"wildcard":s=de(c,f,p);break;case"descendant":s=te(c,f,p);break;case"parent":s=p.lookup(c.slot.label);break;case"condition":s=await B(c,f,p);break;case"block":s=await N(c,f,p);break;case"bind":s=await M(c,f,p);break;case"regex":s=L(c,f,p);break;case"function":s=await X(c,f,p);break;case"variable":s=q(c,f,p);break;case"lambda":s=Ne(c,f,p);break;case"partial":s=await Ze(c,f,p);break;case"apply":s=await K(c,f,p);break;case"transform":s=le(c,f,p);break}if(Object.prototype.hasOwnProperty.call(c,"predicate"))for(var l=0;l<c.predicate.length;l++)s=await pe(c.predicate[l].expr,s,p);c.type!=="path"&&Object.prototype.hasOwnProperty.call(c,"group")&&(s=await S(c.group,s,p));var y=p.lookup(Symbol.for("jsonata.__evaluate_exit"));return y&&await y(c,f,p,s),s&&O(s)&&!s.tupleStream&&(c.keepArray&&(s.keepSingleton=!0),s.length===0?s=void 0:s.length===1&&(s=s.keepSingleton?s:s[0])),p.base.depth--,s}async function W(c,f,p){var s;Array.isArray(f)&&c.steps[0].type!=="variable"?s=f:s=p.base.createSequence(f);for(var o,l=!1,y=void 0,m=0;m<c.steps.length;m++){var A=c.steps[m];if(A.tuple&&(l=!0),m===0&&A.consarray?o=await k(A,s,p):l?y=await we(A,s,y,p):o=await Z(A,s,p,m===c.steps.length-1),!l&&(typeof o>"u"||o.length===0))break;typeof A.focus>"u"&&(s=o)}if(l)if(c.tuple)o=y;else for(o=p.base.createSequence(),m=0;m<y.length;m++)o.push(y[m]["@"]);return c.keepSingletonArray&&(Array.isArray(o)&&o.cons&&!o.sequence&&(o=p.base.createSequence(o)),o.keepSingleton=!0),Object.prototype.hasOwnProperty.call(c,"group")&&(o=await S(c.group,l?y:o,p)),o}function F(c,f){var p=et(c);for(const s of h.keys(f))p.bind(s,f[s]);return p}async function Z(c,f,p,s){var o;if(c.type==="sort")return o=await V(c,f,p),c.stages&&(o=await ne(c.stages,o,p)),o;o=p.base.createSequence();for(var l=0;l<f.length;l++){var y=await k(c,f[l],p);if(c.stages)for(var m=0;m<c.stages.length;m++)y=await pe(c.stages[m].expr,y,p);typeof y<"u"&&o.push(y)}var A=p.base.createSequence();return s&&o.length===1&&Array.isArray(o[0])&&!O(o[0])?A=o[0]:Array.prototype.forEach.call(o,function($){!Array.isArray($)||$.cons?A.push($):Array.prototype.forEach.call($,I=>A.push(I))}),A}async function ne(c,f,p){for(var s=f,o=0;o<c.length;o++){var l=c[o];switch(l.type){case"filter":s=await pe(l.expr,s,p);break;case"index":for(var y=0;y<s.length;y++){var m=s[y];m[l.value]=y}break}}return s}async function we(c,f,p,s){var o;if(c.type==="sort"){if(p)o=await V(c,p,s);else{var l=await V(c,f,s);o=s.base.createSequence(),o.tupleStream=!0;for(var y=0;y<l.length;y++){var m={"@":l[y]};m[c.index]=y,o.push(m)}}return c.stages&&(o=await ne(c.stages,o,s)),o}o=s.base.createSequence(),o.tupleStream=!0;var A=s;p===void 0&&(p=f.map(H=>({"@":H})));for(var $=0;$<p.length;$++){A=F(s,p[$]);var I=await k(c,p[$]["@"],A);if(typeof I<"u"){Array.isArray(I)||(I=[I]);for(var re=0;re<I.length;re++)m=Object.create(null),Object.assign(m,p[$]),I.tupleStream?Object.assign(m,I[re]):(c.focus?(m[c.focus]=I[re],m["@"]=p[$]["@"]):m["@"]=I[re],c.index&&(m[c.index]=re),c.ancestor&&(m[c.ancestor.label]=p[$]["@"])),o.push(m)}}return c.stages&&(o=await ne(c.stages,o,s)),o}async function pe(c,f,p){var s=p.base.createSequence();if(f&&f.tupleStream&&(s.tupleStream=!0),Array.isArray(f)||(f=p.base.createSequence(f)),c.type==="number"){var o=Math.floor(c.value);o<0&&(o=f.length+o);var l=await f[o];typeof l<"u"&&(Array.isArray(l)?s=l:s.push(l))}else for(o=0;o<f.length;o++){var l=f[o],y=l,m=p;f.tupleStream&&(y=l["@"],m=F(p,l));var A=await k(c,y,m);P(A)&&(A=[A]),C(A)?Array.prototype.forEach.call(A,function(I){var re=Math.floor(I);re<0&&(re=f.length+re),re===o&&s.push(l)}):a.boolean(A)&&s.push(l)}return s}async function he(c,f,p){var s,o=await k(c.lhs,f,p),l=c.value,y=async()=>await k(c.rhs,f,p);if(l==="and"||l==="or")try{return await ce(o,y,l)}catch(A){throw A.position=c.position,A.token=l,A}var m=await y();try{switch(l){case"+":case"-":case"*":case"/":case"%":s=rt(o,m,l);break;case"=":case"!=":s=d(o,m,l);break;case"<":case"<=":case">":case">=":s=b(o,m,l);break;case"&":s=ye(o,m);break;case"..":s=T(o,m,p);break;case"in":s=z(o,m);break}}catch(A){throw A.position=c.position,A.token=l,A}return s}async function Pe(c,f,p){var s,o={options:p.base.options,createSequence:p.base.createSequence};switch(c.value){case"-":if(s=await k(c.expression,f,p),typeof s>"u")s=void 0;else if(P(s))s=-s;else throw{code:"D1002",stack:new Error().stack,position:c.position,token:c.value,value:s};break;case"[":s=[];let m=await Promise.all(c.expressions.map(async(A,$)=>(p.isParallelCall=$>0,[A,await k(A,f,p)])));for(let A of m){var[l,y]=A;typeof y<"u"&&(l.value==="["?s.push(y):s=a.append.call(o,s,y))}c.consarray&&Object.defineProperty(s,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":s=await S(c,f,p);break}return s}function Ye(c,f,p){var s={createSequence:p.base.createSequence};return a.lookup.call(s,f,c.value)}function ae(c){return c.value}function de(c,f,p){var s={options:p.base.options,createSequence:p.base.createSequence},o=s.createSequence();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&!G(f)&&h.keys(f).forEach(function(l){var y=f[l];Array.isArray(y)?(y=He(y),o=a.append.call(s,o,y)):o.push(y)}),o}function He(c,f){return typeof f>"u"&&(f=[]),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){He(p,f)}):f.push(c),f}function te(c,f,p){var s,o=p.base.createSequence();return typeof f<"u"&&(xe(f,o),o.length===1?s=o[0]:s=o),s}function xe(c,f){Array.isArray(c)||f.push(c),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){xe(p,f)}):c!==null&&typeof c=="object"&&!G(c)&&h.keys(c).forEach(function(p){xe(c[p],f)})}function rt(c,f,p){var s;if(typeof c<"u"&&!P(c))throw{code:"T2001",stack:new Error().stack,value:c};if(typeof f<"u"&&!P(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u")return s;switch(p){case"+":s=c+f;break;case"-":s=c-f;break;case"*":s=c*f;break;case"/":s=c/f;break;case"%":s=c%f;break}return s}function d(c,f,p){var s,o=typeof c,l=typeof f;if(o==="undefined"||l==="undefined")return!1;switch(p){case"=":s=U(c,f);break;case"!=":s=!U(c,f);break}return s}function b(c,f,p){var s,o=typeof c,l=typeof f,y=o==="undefined"||o==="string"||o==="number",m=l==="undefined"||l==="string"||l==="number";if(!y||!m)throw{code:"T2010",stack:new Error().stack,value:o==="string"||o==="number"?f:c};if(!(o==="undefined"||l==="undefined")){if(o!==l)throw{code:"T2009",stack:new Error().stack,value:c,value2:f};switch(p){case"<":s=c<f;break;case"<=":s=c<=f;break;case">":s=c>f;break;case">=":s=c>=f;break}return s}}function z(c,f){var p=!1;if(typeof c>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var s=0;s<f.length;s++)if(f[s]===c){p=!0;break}return p}async function ce(c,f,p){var s,o=Ee(c);switch(p){case"and":s=o&&Ee(await f());break;case"or":s=o||Ee(await f());break}return s}function Ee(c){var f=a.boolean(c);return typeof f>"u"?!1:f}function ye(c,f){var p,s="",o="";return typeof c<"u"&&(s=a.string(c)),typeof f<"u"&&(o=a.string(f)),p=s.concat(o),p}async function S(c,f,p){var s=Object.create(null),o=Object.create(null),l=!!(f&&f.tupleStream),y={options:p.base.options,createSequence:p.base.createSequence};Array.isArray(f)||(p.base.options,f=y.createSequence(f)),f.length===0&&!l&&f.push(void 0);for(var m=0;m<f.length;m++)for(var A=f[m],$=l?F(p,A):p,I=0;I<c.lhs.length;I++){var re=c.lhs[I],H=await k(re[0],l?A["@"]:A,$);if(typeof H!="string"&&H!==void 0)throw{code:"T1003",stack:new Error().stack,position:c.position,value:H};if(H!==void 0){if(H==="_jsonata_lambda"||H==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:c.position,value:H};var be={data:A,exprIndex:I};if(Object.prototype.hasOwnProperty.call(o,H)){if(o[H].exprIndex!==I)throw{code:"D1009",stack:new Error().stack,position:c.position,value:H};o[H].data=a.append.call(y,o[H].data,A)}else o[H]=be}}let _e=await Promise.all(h.keys(o).map(async(De,ge)=>{let Ce=o[De];var Qe=Ce.data,qe=p;if(l){var it=R(Ce.data,p);Qe=it["@"],delete it["@"],qe=F(p,it)}return p.isParallelCall=ge>0,[De,await k(c.lhs[Ce.exprIndex][1],Qe,qe)]}));for(let De of _e){var[H,Se]=await De;typeof Se<"u"&&(s[H]=Se)}return s}function R(c,f){if(!Array.isArray(c))return c;var p=Object.create(null),s={options:f.base.options,createSequence:f.base.createSequence};Object.assign(p,c[0]);for(var o=1;o<c.length;o++)for(const l of h.keys(c[o]))p[l]=a.append.call(s,p[l],c[o][l]);return p}function T(c,f,p){var s;if(typeof c<"u"&&!Number.isInteger(c))throw{code:"T2003",stack:new Error().stack,value:c};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u"||c>f)return s;var o=f-c+1;if(o>1e7)throw{code:"D2014",stack:new Error().stack,value:o};if(p.base.options&&o>p.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:o};s=new Array(o);for(var l=c,y=0;l<=f;l++,y++)s[y]=l;return s.sequence=!0,s}async function M(c,f,p){var s=await k(c.rhs,f,p);return p.bind(c.lhs.value,s),s}async function B(c,f,p){var s,o=await k(c.condition,f,p);return a.boolean(o)?s=await k(c.then,f,p):typeof c.else<"u"&&(s=await k(c.else,f,p)),s}async function N(c,f,p){for(var s,o=et(p),l=0;l<c.expressions.length;l++)s=await k(c.expressions[l],f,o);return s}function L(c,f,p){var s=new p.base.RegexEngine(c.value),o=function(l,y){var m;s.lastIndex=y||0;var A=s.exec(l);if(A!==null){if(m={match:A[0],start:A.index,end:A.index+A[0].length,groups:[]},A.length>1)for(var $=1;$<A.length;$++)m.groups.push(A[$]);m.next=function(){if(!(s.lastIndex>=l.length)){var I=o(l,s.lastIndex);if(I&&I.match==="")throw{code:"D1004",stack:new Error().stack,position:c.position,value:c.value.source};return I}}}return m};return o}function q(c,f,p){var s;return c.value===""?s=f&&f.outerWrapper?f[0]:f:s=p.lookup(c.value),s}async function V(c,f,p){var s,o=f,l=!!f.tupleStream,y=async function(A,$){for(var I=0,re=0;I===0&&re<c.terms.length;re++){var H=c.terms[re],be=A,_e=p;l&&(be=A["@"],_e=F(p,A));var Se=await k(H.expression,be,_e);be=$,_e=p,l&&(be=$["@"],_e=F(p,$));var De=await k(H.expression,be,_e),ge=typeof Se,Ce=typeof De;if(ge==="undefined"){I=Ce==="undefined"?0:1;continue}if(Ce==="undefined"){I=-1;continue}if(!(ge==="string"||ge==="number")||!(Ce==="string"||Ce==="number"))throw{code:"T2008",stack:new Error().stack,position:c.position,value:ge==="string"||ge==="number"?De:Se};if(ge!==Ce)throw{code:"T2007",stack:new Error().stack,position:c.position,value:Se,value2:De};Se!==De&&(Se<De?I=-1:I=1,H.descending===!0&&(I=-I))}return I===1},m={environment:p,input:f};return s=await a.sort.apply(m,[o,y]),s}function le(c,f,p){var s=async function(o){if(!(typeof o>"u")){var l=p.lookup("clone");if(!G(l))throw{code:"T2013",stack:new Error().stack,position:c.position};var y=await oe(l,[o],null,p),m=await k(c.pattern,y,p);if(typeof m<"u"){Array.isArray(m)||(m=[m]);for(var A=0;A<m.length;A++){var $=m[A],I=await k(c.update,$,p),re=typeof I;if(re!=="undefined"){if(re!=="object"||I===null||Array.isArray(I))throw{code:"T2011",stack:new Error().stack,position:c.update.position,value:I};for(const Se of h.keys(I))$[Se]=I[Se]}if(typeof c.delete<"u"){var H=await k(c.delete,$,p);if(typeof H<"u"){var be=H;if(Array.isArray(H)||(H=[H]),!E(H))throw{code:"T2012",stack:new Error().stack,position:c.delete.position,value:be};for(var _e=0;_e<H.length;_e++)typeof $=="object"&&$!==null&&delete $[H[_e]]}}}}return y}};return j(s,"<(oa):o>")}var se=v("function($f, $g) { function($x){ $g($f($x)) } }");async function K(c,f,p){var s,o=await k(c.lhs,f,p);if(c.rhs.type==="function")s=await X(c.rhs,f,p,{context:o});else{var l=await k(c.rhs,f,p);if(!G(l))throw{code:"T2006",stack:new Error().stack,position:c.position,value:l};if(G(o)){var y=await k(se,null,p);s=await oe(y,[o,l],null,p)}else s=await oe(l,[o],null,p)}return s}async function X(c,f,p,s){var o,l=await k(c.procedure,f,p);if(typeof l>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};var y=[];typeof s<"u"&&y.push(s.context);for(var m=0;m<c.arguments.length;m++){const $=await k(c.arguments[m],f,p);if(G($)){const I=async function(...re){return await oe($,re,null,p)};I.arity=g($),y.push(I)}else y.push($)}var A=c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value;try{typeof l=="object"&&(l.token=A,l.position=c.position),o=await oe(l,y,f,p)}catch($){throw $.position||($.position=c.position),$.token||($.token=A),$}return o}async function oe(c,f,p,s){var o;for(o=await Y(c,f,p,s);ee(o)&&o.thunk===!0;){var l=await k(o.body.procedure,o.input,o.environment);o.body.procedure.type==="variable"&&(l.token=o.body.procedure.value),l.position=o.body.procedure.position;for(var y=[],m=0;m<o.body.arguments.length;m++)y.push(await k(o.body.arguments[m],o.input,o.environment));o=await Y(l,y,p,s)}return o}async function Y(c,f,p,s){var o;try{var l=f;if(c&&(l=Ge(c.signature,f,p)),ee(c))o=await Ue(c,l);else if(c&&c._jsonata_function===!0){var y={environment:s,input:p,options:s.base.options,createSequence:s.base.createSequence};o=c.implementation.apply(y,l),J(o)&&(o=o.next().value),_(o)&&(o=await o)}else if(typeof c=="function")o=c.apply(p,l),_(o)&&(o=await o);else throw{code:"T1006",stack:new Error().stack}}catch(m){throw c&&(typeof m.token>"u"&&typeof c.token<"u"&&(m.token=c.token),m.position=c.position||m.position),m}return o}function Ne(c,f,p){var s={_jsonata_lambda:!0,input:f,environment:p,arguments:c.arguments,signature:c.signature,body:c.body};return c.thunk===!0&&(s.thunk=!0),s.apply=async function(o,l){return await oe(s,l,f,o?o.environment:p)},s}async function Ze(c,f,p){for(var s,o=[],l=0;l<c.arguments.length;l++){var y=c.arguments[l];y.type==="operator"&&y.value==="?"?o.push(y):o.push(await k(y,f,p))}var m=await k(c.procedure,f,p);if(typeof m>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};if(ee(m))s=Be(m,o,p);else if(m&&m._jsonata_function===!0)s=ot(m.implementation,o,p);else if(typeof m=="function")s=ot(m,o,p);else throw{code:"T1008",stack:new Error().stack,position:c.position,token:c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value};return s}function Ge(c,f,p){if(typeof c>"u")return f;var s=c.validate(f,p);return s}async function Ue(c,f){var p,s=et(c.environment);return Array.prototype.forEach.call(c.arguments,function(o,l){s.bind(o.value,f[l])}),typeof c.body=="function"?p=await Ct(c.body,s):p=await k(c.body,c.input,s),p}function Be(c,f,p){var s=et(c.environment||p),o=[];Array.prototype.forEach.call(c.arguments,function(y,m){var A=f[m];A&&A.type==="operator"&&A.value==="?"?o.push(y):s.bind(y.value,A)});var l={_jsonata_lambda:!0,input:c.input,environment:s,arguments:o,body:c.body};return l}function ot(c,f,p){var s=Rt(c);s=s.map(function(m){return"$"+m.trim()});var o="function("+s.join(", ")+"){ _ }",l=v(o);l.body=c;var y=Be(l,f,p);return y}async function Ct(c,f){var p=Rt(c),s=p.map(function(y){return f.lookup(y.trim())}),o={environment:f,createSequence:f.base.createSequence},l=c.apply(o,s);return _(l)&&(l=await l),l}function Rt(c){var f=c.toString(),p=/\(([^)]*)\)/.exec(f)[1],s=p.split(",");return s}function j(c,f){var p={_jsonata_function:!0,implementation:c};return typeof f<"u"&&(p.signature=x(f)),p}async function gr(c,f){if(!(typeof c>"u")){var p=this.input;typeof f<"u"&&(p=f,Array.isArray(p)&&!O(p)&&(p=this.createSequence(p),p.outerWrapper=!0));try{var s=v(c,!1)}catch(l){throw nt(l),{stack:new Error().stack,code:"D3120",value:l.message,error:l}}try{var o=await k(s,p,this.environment)}catch(l){throw nt(l),{stack:new Error().stack,code:"D3121",value:l.message,error:l}}return o}}function vr(c){if(!(typeof c>"u"))return JSON.parse(a.string(c))}function et(c){var f=Object.create(null);const p={bind:function(o,l){f[o]=l},lookup:function(o){var l;return Object.prototype.hasOwnProperty.call(f,o)?l=f[o]:c&&(l=c.lookup(o)),l},timestamp:c?c.timestamp:null,async:c?c.async:!1,isParallelCall:c?c.isParallelCall:!1,global:c?c.global:{ancestry:[null]}};if(c){var s=c.lookup(Symbol.for("jsonata.__createFrame_push"));s&&s(c,p),p.base=c.base}return p}w.bind("sum",j(a.sum,"<a<n>:n>")),w.bind("count",j(a.count,"<a:n>")),w.bind("max",j(a.max,"<a<n>:n>")),w.bind("min",j(a.min,"<a<n>:n>")),w.bind("average",j(a.average,"<a<n>:n>")),w.bind("string",j(a.string,"<x-b?:s>")),w.bind("substring",j(a.substring,"<s-nn?:s>")),w.bind("substringBefore",j(a.substringBefore,"<s-s:s>")),w.bind("substringAfter",j(a.substringAfter,"<s-s:s>")),w.bind("lowercase",j(a.lowercase,"<s-:s>")),w.bind("uppercase",j(a.uppercase,"<s-:s>")),w.bind("length",j(a.length,"<s-:n>")),w.bind("trim",j(a.trim,"<s-:s>")),w.bind("pad",j(a.pad,"<s-ns?:s>")),w.bind("match",j(a.match,"<s-f<s:o>n?:a<o>>")),w.bind("contains",j(a.contains,"<s-(sf):b>")),w.bind("replace",j(a.replace,"<s-(sf)(sf)n?:s>")),w.bind("split",j(a.split,"<s-(sf)n?:a<s>>")),w.bind("join",j(a.join,"<a<s>s?:s>")),w.bind("formatNumber",j(a.formatNumber,"<n-so?:s>")),w.bind("formatBase",j(a.formatBase,"<n-n?:s>")),w.bind("formatInteger",j(u.formatInteger,"<n-s:s>")),w.bind("parseInteger",j(u.parseInteger,"<s-s:n>")),w.bind("number",j(a.number,"<(nsb)-:n>")),w.bind("floor",j(a.floor,"<n-:n>")),w.bind("ceil",j(a.ceil,"<n-:n>")),w.bind("round",j(a.round,"<n-n?:n>")),w.bind("abs",j(a.abs,"<n-:n>")),w.bind("sqrt",j(a.sqrt,"<n-:n>")),w.bind("power",j(a.power,"<n-n:n>")),w.bind("random",j(a.random,"<:n>")),w.bind("boolean",j(a.boolean,"<x-:b>")),w.bind("not",j(a.not,"<x-:b>")),w.bind("map",j(a.map,"<af>")),w.bind("zip",j(a.zip,"<a+>")),w.bind("filter",j(a.filter,"<af>")),w.bind("single",j(a.single,"<af?>")),w.bind("reduce",j(a.foldLeft,"<afj?:j>")),w.bind("sift",j(a.sift,"<o-f?:o>")),w.bind("keys",j(a.keys,"<x-:a<s>>")),w.bind("lookup",j(a.lookup,"<x-s:x>")),w.bind("append",j(a.append,"<xx:a>")),w.bind("exists",j(a.exists,"<x:b>")),w.bind("spread",j(a.spread,"<x-:a<o>>")),w.bind("merge",j(a.merge,"<a<o>:o>")),w.bind("reverse",j(a.reverse,"<a:a>")),w.bind("each",j(a.each,"<o-f:a>")),w.bind("error",j(a.error,"<s?:x>")),w.bind("assert",j(a.assert,"<bs?:x>")),w.bind("type",j(a.type,"<x:s>")),w.bind("sort",j(a.sort,"<af?:a>")),w.bind("shuffle",j(a.shuffle,"<a:a>")),w.bind("distinct",j(a.distinct,"<x:x>")),w.bind("base64encode",j(a.base64encode,"<s-:s>")),w.bind("base64decode",j(a.base64decode,"<s-:s>")),w.bind("encodeUrlComponent",j(a.encodeUrlComponent,"<s-:s>")),w.bind("encodeUrl",j(a.encodeUrl,"<s-:s>")),w.bind("decodeUrlComponent",j(a.decodeUrlComponent,"<s-:s>")),w.bind("decodeUrl",j(a.decodeUrl,"<s-:s>")),w.bind("eval",j(gr,"<sx?:x>")),w.bind("toMillis",j(u.toMillis,"<s-s?:n>")),w.bind("fromMillis",j(u.fromMillis,"<n-s?s?:s>")),w.bind("clone",j(vr,"<(oa)-:o>"));var Yt={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function nt(c){var f=Yt[c.code];if(typeof f<"u"){var p=f.replace(/\{\{\{([^}]+)}}}/g,function(){return c[arguments[1]]});p=p.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(c[arguments[1]])}),c.message=p}}function bt(c,f){var p,s;try{p=v(c,f&&f.recover),s=p.errors,delete p.errors}catch(y){throw nt(y),y}var o=et(w),l=new Date;return o.bind("now",j(function(y,m){return u.fromMillis(l.getTime(),y,m)},"<s?s?:s>")),o.bind("millis",j(function(){return l.getTime()},"<:n>")),{evaluate:async function(y,m,A){if(typeof s<"u"){var $={code:"S0500",position:0};throw nt($),$}const I=et(o);for(const H of h.keys(m))I.bind(H,m[H]);if(I.bind("$",y),l=new Date,I.timestamp=l,I.options=f,I.createSequence=function(){var H=[];return f&&f.sequence&&(H.push=function(...be){if(H.length+be.length>f.sequence)throw{code:"D2015",stack:new Error().stack,value:f.sequence};return Array.prototype.push.apply(H,be)}),H.sequence=!0,arguments.length===1&&H.push(arguments[0]),H},Array.isArray(y)&&!O(y)&&(y=I.createSequence(y),y.outerWrapper=!0),f&&(f.timeout||f.stack)){const H=Date.now();I.guardrails=function(){if(f.stack>0&&I.depth>f.stack)throw{code:"D1011",value:f.stack,stack:new Error().stack};if(f.timeout>0&&Date.now()-H>f.timeout)throw{code:"D1012",value:f.timeout,stack:new Error().stack}}}else I.guardrails=function(){};I.base=I,I.depth=0,f&&f.RegexEngine?I.RegexEngine=f.RegexEngine:I.RegexEngine=RegExp;var re;try{return re=await k(p,y,I),typeof A=="function"&&A(null,re),re}catch(H){throw nt(H),H}},assign:function(y,m){o.bind(y,m)},registerFunction:function(y,m,A){var $=j(m,A);o.bind(y,$)},ast:function(){return p},errors:function(){return s}}}return bt.parser=v,bt})();r.exports=D},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,r,i){var u=t("./signature");const a=(()=>{var h={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},v={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
32
32
|
`,r:"\r",t:" "},x=function(P){var E=0,C=P.length,O=function(J,_){var g={type:J,value:_,position:E};return g},G=function(){for(var J=E,_=0,g,U,w=function(W){if(P.charAt(W)==="/"&&_===0){for(var F=0;P.charAt(W-(F+1))==="\\";)F++;if(F%2===0)return!0}return!1};E<C;){var k=P.charAt(E);if(w(E)){if(g=P.substring(J,E),g==="")throw{code:"S0301",stack:new Error().stack,position:E};for(E++,k=P.charAt(E),J=E;k==="i"||k==="m";)E++,k=P.charAt(E);return U=P.substring(J,E)+"g",new RegExp(g,U)}(k==="("||k==="["||k==="{")&&P.charAt(E-1)!=="\\"&&_++,(k===")"||k==="]"||k==="}")&&P.charAt(E-1)!=="\\"&&_--,E++}throw{code:"S0302",stack:new Error().stack,position:E}},ee=function(J){if(E>=C)return null;for(var _=P.charAt(E);E<C&&`
|
|
33
33
|
\r\v`.indexOf(_)>-1;)E++,_=P.charAt(E);if(_==="/"&&P.charAt(E+1)==="*"){var g=E;for(E+=2,_=P.charAt(E);!(_==="*"&&P.charAt(E+1)==="/");)if(_=P.charAt(++E),E>=C)throw{code:"S0106",stack:new Error().stack,position:g};return E+=2,_=P.charAt(E),ee(J)}if(J!==!0&&_==="/")return E++,O("regex",G());if(_==="."&&P.charAt(E+1)===".")return E+=2,O("operator","..");if(_===":"&&P.charAt(E+1)==="=")return E+=2,O("operator",":=");if(_==="!"&&P.charAt(E+1)==="=")return E+=2,O("operator","!=");if(_===">"&&P.charAt(E+1)==="=")return E+=2,O("operator",">=");if(_==="<"&&P.charAt(E+1)==="=")return E+=2,O("operator","<=");if(_==="*"&&P.charAt(E+1)==="*")return E+=2,O("operator","**");if(_==="~"&&P.charAt(E+1)===">")return E+=2,O("operator","~>");if(_==="?"&&P.charAt(E+1)===":")return E+=2,O("operator","?:");if(_==="?"&&P.charAt(E+1)==="?")return E+=2,O("operator","??");if(Object.prototype.hasOwnProperty.call(h,_))return E++,O("operator",_);if(_==='"'||_==="'"){var U=_;E++;for(var w="";E<C;){if(_=P.charAt(E),_==="\\")if(E++,_=P.charAt(E),Object.prototype.hasOwnProperty.call(v,_))w+=v[_];else if(_==="u"){var k=P.substr(E+1,4);if(/^[0-9a-fA-F]+$/.test(k)){var W=parseInt(k,16);w+=String.fromCharCode(W),E+=4}else throw{code:"S0104",stack:new Error().stack,position:E}}else throw{code:"S0103",stack:new Error().stack,position:E,token:_};else{if(_===U)return E++,O("string",w);w+=_}E++}throw{code:"S0101",stack:new Error().stack,position:E}}var F=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,Z=F.exec(P.substring(E));if(Z!==null){var ne=parseFloat(Z[0]);if(!isNaN(ne)&&isFinite(ne))return E+=Z[0].length,O("number",ne);throw{code:"S0102",stack:new Error().stack,position:E,token:Z[0]}}var we;if(_==="`"){E++;var pe=P.indexOf("`",E);if(pe!==-1)return we=P.substring(E,pe),E=pe+1,O("name",we);throw E=C,{code:"S0105",stack:new Error().stack,position:E}}for(var he=E,Pe;;)if(Pe=P.charAt(he),he===C||`
|
|
34
34
|
\r\v`.indexOf(Pe)>-1||Object.prototype.hasOwnProperty.call(h,Pe)){if(P.charAt(E)==="$")return we=P.substring(E+1,he),E=he,O("variable",we);switch(we=P.substring(E,he),E=he,we){case"or":case"in":case"and":return O("operator",we);case"true":return O("value",!0);case"false":return O("value",!1);case"null":return O("value",null);default:return E===C&&we===""?null:O("name",we)}}else he++};return ee},D=function(P,E){var C,O,G=Object.create(null),ee=[],J=function(){var d=[];C.id!=="(end)"&&d.push({type:C.type,value:C.value,position:C.position});for(var b=O();b!==null;)d.push(b),b=O();return d},_={nud:function(){var d={code:"S0211",token:this.value,position:this.position};if(E)return d.remaining=J(),d.type="error",ee.push(d),d;throw d.stack=new Error().stack,d}},g=function(d,b){var z=G[d];return b=b||0,z?b>=z.lbp&&(z.lbp=b):(z=Object.create(_),z.id=z.value=d,z.lbp=b,G[d]=z),z},U=function(d){if(E){d.remaining=J(),ee.push(d);var b=G["(error)"];return C=Object.create(b),C.error=d,C.type="(error)",C}else throw d.stack=new Error().stack,d},w=function(d,b){if(d&&C.id!==d){var z;C.id==="(end)"?z="S0203":z="S0202";var ce={code:z,position:C.position,token:C.value,value:d};return U(ce)}var Ee=O(b);if(Ee===null)return C=G["(end)"],C.position=P.length,C;var ye=Ee.value,S=Ee.type,R;switch(S){case"name":case"variable":R=G["(name)"];break;case"operator":if(R=G[ye],!R)return U({code:"S0204",stack:new Error().stack,position:Ee.position,token:ye});break;case"string":case"number":case"value":R=G["(literal)"];break;case"regex":S="regex",R=G["(regex)"];break;default:return U({code:"S0205",stack:new Error().stack,position:Ee.position,token:ye})}return C=Object.create(R),C.value=ye,C.type=S,C.position=Ee.position,C},k=function(d){var b,z=C;for(w(null,!0),b=z.nud();d<C.lbp;)z=C,w(),b=z.led(b);return b},W=function(d){var b=g(d,0);b.nud=function(){return this}},F=function(d,b,z){var ce=b||h[d],Ee=g(d,ce);return Ee.led=z||function(ye){return this.lhs=ye,this.rhs=k(ce),this.type="binary",this},Ee},Z=function(d,b,z){var ce=g(d,b);return ce.led=z,ce},ne=function(d,b){var z=g(d);return z.nud=b||function(){return this.expression=k(70),this.type="unary",this},z};W("(end)"),W("(name)"),W("(literal)"),W("(regex)"),g(":"),g(";"),g(","),g(")"),g("]"),g("}"),g(".."),F("."),F("+"),F("-"),F("*"),F("/"),F("%"),F("="),F("<"),F(">"),F("!="),F("<="),F(">="),F("&"),F("and"),F("or"),F("in"),W("and"),W("or"),W("in"),ne("-"),F("~>"),F("??",h["??"],function(d){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(d))]},this.then=d,this.else=k(0),this}),Z("(error)",10,function(d){return this.lhs=d,this.error=C.error,this.remaining=J(),this.type="error",this}),ne("*",function(){return this.type="wildcard",this}),ne("**",function(){return this.type="descendant",this}),ne("%",function(){return this.type="parent",this}),F("(",h["("],function(d){if(this.procedure=d,this.type="function",this.arguments=[],C.id!==")")for(;C.type==="operator"&&C.id==="?"?(this.type="partial",this.arguments.push(C),w("?")):this.arguments.push(k(0)),C.id===",";)w(",");if(w(")",!0),d.type==="name"&&(d.value==="function"||d.value==="λ")){if(this.arguments.forEach(function(ye,S){if(ye.type!=="variable")return U({code:"S0208",stack:new Error().stack,position:ye.position,token:ye.value,value:S+1})}),this.type="lambda",C.id==="<"){for(var b=C.position,z=1,ce="<";z>0&&C.id!=="{"&&C.id!=="(end)";){var Ee=w();Ee.id===">"?z--:Ee.id==="<"&&z++,ce+=Ee.value}w(">");try{this.signature=u(ce)}catch(ye){return ye.position=b+ye.offset,U(ye)}}w("{"),this.body=k(0),w("}")}return this}),ne("(",function(){for(var d=[];C.id!==")"&&(d.push(k(0)),C.id===";");)w(";");return w(")",!0),this.type="block",this.expressions=d,this}),ne("[",function(){var d=[];if(C.id!=="]")for(;;){var b=k(0);if(C.id===".."){var z={type:"binary",value:"..",position:C.position,lhs:b};w(".."),z.rhs=k(0),b=z}if(d.push(b),C.id!==",")break;w(",")}return w("]",!0),this.expressions=d,this.type="unary",this}),F("[",h["["],function(d){if(C.id==="]"){for(var b=d;b&&b.type==="binary"&&b.value==="[";)b=b.lhs;return b.keepArray=!0,w("]"),d}else return this.lhs=d,this.rhs=k(h["]"]),this.type="binary",w("]",!0),this}),F("^",h["^"],function(d){w("(");for(var b=[];;){var z={descending:!1};if(C.id==="<"?w("<"):C.id===">"&&(z.descending=!0,w(">")),z.expression=k(0),b.push(z),C.id!==",")break;w(",")}return w(")"),this.lhs=d,this.rhs=b,this.type="binary",this});var we=function(d){var b=[];if(C.id!=="}")for(;;){var z=k(0);w(":");var ce=k(0);if(b.push([z,ce]),C.id!==",")break;w(",")}return w("}",!0),typeof d>"u"?(this.lhs=b,this.type="unary"):(this.lhs=d,this.rhs=b,this.type="binary"),this};ne("{",we),F("{",h["{"],we),Z(":=",h[":="],function(d){return d.type!=="variable"?U({code:"S0212",stack:new Error().stack,position:d.position,token:d.value}):(this.lhs=d,this.rhs=k(h[":="]-1),this.type="binary",this)}),F("@",h["@"],function(d){return this.lhs=d,this.rhs=k(h["@"]),this.rhs.type!=="variable"?U({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),F("#",h["#"],function(d){return this.lhs=d,this.rhs=k(h["#"]),this.rhs.type!=="variable"?U({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),F("?",h["?"],function(d){return this.type="condition",this.condition=d,this.then=k(0),C.id===":"&&(w(":"),this.else=k(0)),this}),F("?:",h["?:"],function(d){return this.type="condition",this.condition=JSON.parse(JSON.stringify(d)),this.then=d,this.else=k(0),this}),ne("|",function(){return this.type="transform",this.pattern=k(0),w("|"),this.update=k(0),C.id===","&&(w(","),this.delete=k(0)),w("|"),this});var pe=function(d){var b;if(d.type==="function"&&!d.predicate){var z={type:"lambda",thunk:!0,arguments:[],position:d.position};z.body=d,b=z}else if(d.type==="condition")d.then=pe(d.then),typeof d.else<"u"&&(d.else=pe(d.else)),b=d;else if(d.type==="block"){var ce=d.expressions.length;ce>0&&(d.expressions[ce-1]=pe(d.expressions[ce-1])),b=d}else b=d;return b},he=0,Pe=0,Ye=[],ae=function(d,b){switch(d.type){case"name":case"wildcard":b.level--,b.level===0&&(typeof d.ancestor>"u"||(Ye[b.index].slot.label=d.ancestor.label),d.ancestor=b,d.tuple=!0);break;case"parent":b.level++;break;case"block":d.expressions.length>0&&(d.tuple=!0,b=ae(d.expressions[d.expressions.length-1],b));break;case"path":d.tuple=!0;var z=d.steps.length-1;for(b=ae(d.steps[z--],b);b.level>0&&z>=0;)b=ae(d.steps[z--],b);break;default:throw{code:"S0217",token:d.type,position:d.position}}return b},de=function(d,b){if(typeof b.seekingParent<"u"||b.type==="parent"){var z=typeof b.seekingParent<"u"?b.seekingParent:[];b.type==="parent"&&z.push(b.slot),typeof d.seekingParent>"u"?d.seekingParent=z:Array.prototype.push.apply(d.seekingParent,z)}},He=function(d){var b=d.steps.length-1,z=d.steps[b],ce=typeof z.seekingParent<"u"?z.seekingParent:[];z.type==="parent"&&ce.push(z.slot);for(var Ee=0;Ee<ce.length;Ee++){var ye=ce[Ee];for(b=d.steps.length-2;ye.level>0;){if(b<0){typeof d.seekingParent>"u"?d.seekingParent=[ye]:d.seekingParent.push(ye);break}for(var S=d.steps[b--];b>=0&&S.focus&&d.steps[b].focus;)S=d.steps[b--];ye=ae(S,ye)}}},te=function(d){var b;switch(d.type){case"binary":switch(d.value){case".":var z=te(d.lhs);z.type==="path"?b=z:b={type:"path",steps:[z]},z.type==="parent"&&(b.seekingParent=[z.slot]);var ce=te(d.rhs);ce.type==="path"?Array.prototype.push.apply(b.steps,ce.steps):(typeof ce.predicate<"u"&&(ce.stages=ce.predicate,delete ce.predicate),b.steps.push(ce)),b.steps.filter(function(q){if(q.type==="number"||q.type==="value")throw{code:"S0213",stack:new Error().stack,position:q.position,value:q.value};return q.type==="string"}).forEach(function(q){q.type="name"}),b.steps.filter(function(q){return q.keepArray===!0}).length>0&&(b.keepSingletonArray=!0);var Ee=b.steps[0];Ee.type==="unary"&&Ee.value==="["&&(Ee.consarray=!0);var ye=b.steps[b.steps.length-1];ye.type==="unary"&&ye.value==="["&&(ye.consarray=!0),He(b);break;case"[":b=te(d.lhs);var S=b,R="predicate";if(b.type==="path"&&(S=b.steps[b.steps.length-1],R="stages"),typeof S.group<"u")throw{code:"S0209",stack:new Error().stack,position:d.position};typeof S[R]>"u"&&(S[R]=[]);var T=te(d.rhs);typeof T.seekingParent<"u"&&(T.seekingParent.forEach(q=>{q.level===1?ae(S,q):q.level--}),de(S,T)),S[R].push({type:"filter",expr:T,position:d.position});break;case"{":if(b=te(d.lhs),typeof b.group<"u")throw{code:"S0210",stack:new Error().stack,position:d.position};b.group={lhs:d.rhs.map(function(q){return[te(q[0]),te(q[1])]}),position:d.position};break;case"^":b=te(d.lhs),b.type!=="path"&&(b={type:"path",steps:[b]});var M={type:"sort",position:d.position};M.terms=d.rhs.map(function(q){var V=te(q.expression);return de(M,V),{descending:q.descending,expression:V}}),b.steps.push(M),He(b);break;case":=":b={type:"bind",value:d.value,position:d.position},b.lhs=te(d.lhs),b.rhs=te(d.rhs),de(b,b.rhs);break;case"@":if(b=te(d.lhs),S=b,b.type==="path"&&(S=b.steps[b.steps.length-1]),typeof S.stages<"u"||typeof S.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:d.position};if(S.type==="sort")throw{code:"S0216",stack:new Error().stack,position:d.position};d.keepArray&&(S.keepArray=!0),S.focus=d.rhs.value,S.tuple=!0;break;case"#":b=te(d.lhs),S=b,b.type==="path"?S=b.steps[b.steps.length-1]:(b={type:"path",steps:[b]},typeof S.predicate<"u"&&(S.stages=S.predicate,delete S.predicate)),typeof S.stages>"u"?S.index=d.rhs.value:S.stages.push({type:"index",value:d.rhs.value,position:d.position}),S.tuple=!0;break;case"~>":b={type:"apply",value:d.value,position:d.position},b.lhs=te(d.lhs),b.rhs=te(d.rhs),b.keepArray=b.lhs.keepArray||b.rhs.keepArray;break;default:b={type:d.type,value:d.value,position:d.position},b.lhs=te(d.lhs),b.rhs=te(d.rhs),de(b,b.lhs),de(b,b.rhs)}break;case"unary":b={type:d.type,value:d.value,position:d.position},d.value==="["?b.expressions=d.expressions.map(function(q){var V=te(q);return de(b,V),V}):d.value==="{"?b.lhs=d.lhs.map(function(q){var V=te(q[0]);de(b,V);var le=te(q[1]);return de(b,le),[V,le]}):(b.expression=te(d.expression),d.value==="-"&&b.expression.type==="number"?(b=b.expression,b.value=-b.value):de(b,b.expression));break;case"function":case"partial":b={type:d.type,name:d.name,value:d.value,position:d.position},b.arguments=d.arguments.map(function(q){var V=te(q);return de(b,V),V}),b.procedure=te(d.procedure);break;case"lambda":b={type:d.type,arguments:d.arguments,signature:d.signature,position:d.position};var B=te(d.body);b.body=pe(B);break;case"condition":b={type:d.type,position:d.position},b.condition=te(d.condition),de(b,b.condition),b.then=te(d.then),de(b,b.then),typeof d.else<"u"&&(b.else=te(d.else),de(b,b.else));break;case"transform":b={type:d.type,position:d.position},b.pattern=te(d.pattern),b.update=te(d.update),typeof d.delete<"u"&&(b.delete=te(d.delete));break;case"block":b={type:d.type,position:d.position},b.expressions=d.expressions.map(function(q){var V=te(q);return de(b,V),(V.consarray||V.type==="path"&&V.steps[0].consarray)&&(b.consarray=!0),V});break;case"name":b={type:"path",steps:[d]},d.keepArray&&(b.keepSingletonArray=!0);break;case"parent":b={type:"parent",slot:{label:"!"+he++,level:1,index:Pe++}},Ye.push(b);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":b=d;break;case"operator":if(d.value==="and"||d.value==="or"||d.value==="in")d.type="name",b=te(d);else if(d.value==="?")b=d;else throw{code:"S0201",stack:new Error().stack,position:d.position,token:d.value};break;case"error":b=d,d.lhs&&(b=te(d.lhs));break;default:var N="S0206";d.id==="(end)"&&(N="S0207");var L={code:N,position:d.position,token:d.value};if(E)return ee.push(L),{type:"error",error:L};throw L.stack=new Error().stack,L}return d.keepArray&&(b.keepArray=!0),b};O=x(P),w();var xe=k(0);if(C.id!=="(end)"){var rt={code:"S0201",position:C.position,token:C.value};U(rt)}if(xe=te(xe),xe.type==="parent"||typeof xe.seekingParent<"u")throw{code:"S0217",token:xe.type,position:xe.position};return ee.length>0&&(xe.errors=ee),xe};return D})();r.exports=a},{"./signature":5}],5:[function(t,r,i){var u=t("./utils");const a=(()=>{var h={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function v(x){for(var D=1,P=[],E=Object.create(null),C=E;D<x.length;){var O=x.charAt(D);if(O===":")break;var G=function(){P.push(E),C=E,E=Object.create(null)},ee=function(F,Z,ne,we){for(var pe=1,he=Z;he<F.length;)if(he++,O=F.charAt(he),O===we){if(pe--,pe===0)break}else O===ne&&pe++;return he};switch(O){case"s":case"n":case"b":case"l":case"o":E.regex="["+O+"m]",E.type=O,G();break;case"a":E.regex="[asnblfom]",E.type=O,E.array=!0,G();break;case"f":E.regex="f",E.type=O,G();break;case"j":E.regex="[asnblom]",E.type=O,G();break;case"x":E.regex="[asnblfom]",E.type=O,G();break;case"-":C.context=!0,C.contextRegex=new RegExp(C.regex),C.regex+="?";break;case"?":case"+":C.regex+=O;break;case"(":var J=ee(x,D,"(",")"),_=x.substring(D+1,J);if(_.indexOf("<")===-1)E.regex="["+_+"m]";else throw{code:"S0402",stack:new Error().stack,value:_,offset:D};E.type="("+_+")",D=J,G();break;case"<":if(C.type==="a"||C.type==="f"){var g=ee(x,D,"<",">");C.subtype=x.substring(D+1,g),D=g}else throw{code:"S0401",stack:new Error().stack,value:C.type,offset:D};break}D++}var U="^"+P.map(function(F){return"("+F.regex+")"}).join("")+"$",w=new RegExp(U),k=function(F){var Z;if(u.isFunction(F))Z="f";else{var ne=typeof F;switch(ne){case"string":Z="s";break;case"number":Z="n";break;case"boolean":Z="b";break;case"object":F===null?Z="l":Array.isArray(F)?Z="a":Z="o";break;case"undefined":default:Z="m"}}return Z},W=function(F,Z){for(var ne="^",we=0,pe=0;pe<P.length;pe++){ne+=P[pe].regex;var he=Z.match(ne);if(he===null)throw{code:"T0410",stack:new Error().stack,value:F[we],index:we+1};we=he[0].length}throw{code:"T0410",stack:new Error().stack,value:F[we],index:we+1}};return{definition:x,validate:function(F,Z){var ne="";F.forEach(function(Pe){ne+=k(Pe)});var we=w.exec(ne);if(we){var pe=[],he=0;return P.forEach(function(Pe,Ye){var ae=F[he],de=we[Ye+1];if(de==="")if(Pe.context&&Pe.contextRegex){var He=k(Z);if(Pe.contextRegex.test(He))pe.push(Z);else throw{code:"T0411",stack:new Error().stack,value:Z,index:he+1}}else pe.push(ae),he++;else de.split("").forEach(function(te){if(ae=F[he],Pe.type==="a"){if(te==="m")ae=void 0;else{var xe=!0;if(typeof Pe.subtype<"u"){if(te!=="a"&&de!==Pe.subtype)xe=!1;else if(te==="a"&&ae.length>0){var rt=k(ae[0]);if(rt!==Pe.subtype.charAt(0))xe=!1;else{var d=ae.filter(function(b){return k(b)!==rt});xe=d.length===0}}}if(!xe)throw{code:"T0412",stack:new Error().stack,value:ae,index:he+1,type:h[Pe.subtype]};te!=="a"&&(ae=[ae])}pe.push(ae),he++}else pe.push(ae),he++})}),pe}W(F,ne)}}}return v})();r.exports=a},{"./utils":6}],6:[function(t,r,i){const u=(()=>{function a(g){var U=!1;if(typeof g=="number"&&(U=!isNaN(g),U&&!isFinite(g)))throw{code:"D1001",value:g,stack:new Error().stack};return U}function h(g){var U=!1;return Array.isArray(g)&&(U=g.filter(function(w){return typeof w!="string"}).length===0),U}function v(g){var U=!1;return Array.isArray(g)&&(U=g.filter(function(w){return!a(w)}).length===0),U}function x(g){return g.sequence===!0&&Array.isArray(g)}function D(g){return g&&(g._jsonata_function===!0||g._jsonata_lambda===!0)||typeof g=="function"}function P(g){var U=typeof g.arity=="number"?g.arity:typeof g.implementation=="function"?g.implementation.length:typeof g.length=="number"?g.length:g.arguments.length;return U}function E(g){return g&&g._jsonata_lambda===!0}var C=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function O(g){return typeof g=="object"&&g!==null&&C in g&&"next"in g&&typeof g.next=="function"}function G(g,U){if(g===U)return!0;if(typeof g=="object"&&typeof U=="object"&&g!==null&&U!==null){if(Array.isArray(g)&&Array.isArray(U)){if(g.length!==U.length)return!1;for(var w=0;w<g.length;w++)if(!G(g[w],U[w]))return!1;return!0}var k=Object.getOwnPropertyNames(g),W=Object.getOwnPropertyNames(U);if(k.length!==W.length)return!1;for(k=k.sort(),W=W.sort(),w=0;w<k.length;w++)if(k[w]!==W[w])return!1;for(w=0;w<k.length;w++){var F=k[w];if(!G(g[F],U[F]))return!1}return!0}return!1}function ee(g){return typeof g=="object"&&g!==null&&"then"in g&&typeof g.then=="function"}function J(g){var U=[];for(let w of g)U.push(w);return U}function _(g){return typeof g=="object"&&g!==null?Object.keys(g):[]}return{isNumeric:a,isArrayOfStrings:h,isArrayOfNumbers:v,isSequence:x,isFunction:D,isLambda:E,isIterable:O,getFunctionArity:P,isDeepEqual:G,stringToArray:J,isPromise:ee,keys:_}})();r.exports=u},{}]},{},[3])(3)})})(Br)),Br.exports}fs();const hs=150,Rn=10,ds=200,ps=16,Ln=new WeakMap;let Un=!1;function cr(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Bt(n){if(n===window)return{x:window.scrollX,y:window.scrollY};const e=n;return{x:e.scrollLeft,y:e.scrollTop}}function ms(n,e,t){if(n===window){window.scrollTo(e,t);return}const r=n;typeof r.scrollTo=="function"?r.scrollTo(e,t):(r.scrollLeft=e,r.scrollTop=t)}function gs(n){if(n===window){const t=document.documentElement;return Math.max(0,t.scrollHeight-window.innerHeight)}const e=n;return Math.max(0,e.scrollHeight-e.clientHeight)}function kt(n){let e=Ln.get(n);if(!e){const t=Bt(n);e={x:t.x,y:t.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},Ln.set(n,e)}return e}function lr(n){kt(n).userEngaged=!0}function fr(n){const e=kt(n);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},hs)}function Dn(n,e){return e-n>=ds}function Pt(n){if(!cr())return;const e=kt(n);if(e.restoring)return;const t=Bt(n);if(Dn(t.y,e.y)){qr(n);return}e.x=t.x,e.y=t.y}function vs(n){if(!cr())return;const e=kt(n),t=gs(n),r=e.x,i=t>0?Math.min(e.y,t):e.y,{x:u,y:a}=Bt(n);if(!(Math.abs(r-u)<=Rn&&Math.abs(i-a)<=Rn)){e.restoring=!0;try{ms(n,r,i)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function qr(n){const e=kt(n);if(e.stickyFrames=ps,e.raf)return;const t=()=>{e.raf=0,vs(n),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(t))};e.raf=requestAnimationFrame(t)}function jr(n){qr(n)}function qt(n){if(!cr())return;const e=kt(n);if(e.watching)return;e.watching=!0;const t=n===window?window:n,r=()=>{if(e.restoring)return;const{y:O}=Bt(n);if(Dn(O,e.y)){qr(n);return}if(e.userEngaged){Pt(n),fr(n);return}Pt(n)},i=O=>On(O)===n,u=O=>{i(O)&&(Pt(n),lr(n))},a=O=>{i(O)&&fr(n)},h=O=>{i(O)&&(Pt(n),lr(n),fr(n))};t.addEventListener("scroll",r,{passive:!0}),t.addEventListener("touchstart",u,{passive:!0}),t.addEventListener("touchend",a,{passive:!0}),t.addEventListener("touchcancel",a,{passive:!0}),t.addEventListener("wheel",h,{passive:!0}),t.addEventListener("pointerdown",u,{passive:!0}),t.addEventListener("pointerup",a,{passive:!0}),t.addEventListener("pointercancel",a,{passive:!0});const v=Bt(n);if(e.x=v.x,e.y=v.y,n===window){const O=new ResizeObserver(()=>jr(window));O.observe(document.documentElement),e.resizeObserver=O;return}const x=n,D=new ResizeObserver(()=>jr(x));D.observe(x);for(const O of Array.from(x.children))D.observe(O);e.resizeObserver=D;const P=()=>jr(x),E=new MutationObserver(O=>{for(const G of O)if(G.type==="childList")for(const ee of Array.from(G.addedNodes))ee instanceof Element&&D.observe(ee);P()});E.observe(x,{childList:!0,subtree:!0,characterData:!0});const C=x.getRootNode();C instanceof ShadowRoot&&C.host&&E.observe(C.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=E}function On(n){for(const e of n.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&Mn(e))return e;return window}function Mn(n){if(!(n instanceof HTMLElement)||n===document.documentElement||n===document.body)return!1;const e=getComputedStyle(n).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Wr(n){for(const t of n.composedPath())t===window||t===document||t instanceof HTMLElement&&Mn(t)&&qt(t);const e=On(n);qt(e),n.type==="wheel"?(Pt(e),lr(e),fr(e)):(n.type==="touchstart"||n.type==="pointerdown")&&(Pt(e),lr(e))}function hr(n){n instanceof Element&&n.classList?.contains("custom-scroll")&&qt(n),n.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&qt(e)})}function zr(n){hr(n),new MutationObserver(t=>{for(const r of t)for(const i of Array.from(r.addedNodes))i instanceof Element&&hr(i)}).observe(n,{childList:!0,subtree:!0})}function Hr(n){n.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(zr(e.shadowRoot),Hr(e.shadowRoot))})}function ys(){const n=Element.prototype;if(n.__safariScrollGuardPatched)return;n.__safariScrollGuardPatched=!0;const e=n.attachShadow;n.attachShadow=function(r){const i=e.call(this,r);return zr(i),i}}function bs(){if(typeof window>"u"||Un||(Un=!0,!cr()))return;qt(window),ys();const n={capture:!0,passive:!0};window.addEventListener("wheel",Wr,n),window.addEventListener("touchstart",Wr,n),window.addEventListener("pointerdown",Wr,n);const e=()=>{hr(document),Hr(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const i of r)for(const u of Array.from(i.addedNodes))u instanceof Element&&(hr(u),u.shadowRoot&&zr(u.shadowRoot),Hr(u))}).observe(document.documentElement,{childList:!0,subtree:!0})}const ws=Hi,Es=Xi,_s=Nr,Ss=Mr,As=st,Ts=ss,ks=sr,Ps=Ir,xs=ls;bs(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:ws,Arrays:Es,DataBindObserver:_s,Format:Ss,HTML:As,LocationHandler:Ts,Objects:ks,PublisherManager:$e,api:Ps,URLPattern:xs,Endpoint:Gr,DataProviderKey:ir};const jt="[sonic-webgpu]",Cs=["time","frame","mouseX","mouseY","hovering"],Fn=["param0","param1","param2","param3"],$n=["channel0","channel1","channel2","channel3"],Rs=["frameUrl","snapshot"];function Ls(){return typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches}function Vr(n,e){if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"&&n.trim()!==""){const t=Number(n);if(Number.isFinite(t))return t}return e}function Us(n){if(n===null||n==="")return"";if(typeof n=="string")return n.trim();const e=Ni(n);if(e)return e;if(n&&typeof n=="object"){const t=n.element,r=$i(t);return r||void 0}return""}function Xr(n){const e=n.dataProvider?.trim();return e||st.getAncestorAttributeValue(n,"dataProvider")||st.getAncestorAttributeValue(n,"formDataProvider")||""}function Nn(n){n.formPublisher&&(n.formPublisher.offInternalMutation(n.onFormMutation),n.formPublisher=null)}function Ds(n){Nn(n);const e=Xr(n);e&&(n.formPublisher=$e.get(e),n.formPublisher.onInternalMutation(n.onFormMutation),n.onFormMutation())}function Os(n){const e=n.outDataProvider?.trim()||Xr(n)||"";n.outPublisher=e?$e.get(e):null}function Ms(n,e){for(const t of $n){if(!(t in e))continue;const r=Us(e[t]);r!==void 0&&n[t]!==r&&(n[t]=r)}for(const t of Fn){if(!(t in e))continue;const r=Vr(e[t],NaN);Number.isFinite(r)&&n[t]!==r&&(n[t]=r)}if("targetX"in e||"targetY"in e){const t=Vr(e.targetX,NaN),r=Vr(e.targetY,NaN);Number.isFinite(t)&&Number.isFinite(r)&&t>=0&&t<=1&&r>=0&&r<=1?(n.remoteTarget={x:t,y:r},In(n)):(n.remoteTarget=null,n.mouseVec[0]=0,n.mouseVec[1]=0)}}function In(n){if(!n.remoteTarget||!n.runtime||n.mouse&&n.hovering)return;const e=n.runtime.canvas.width,t=n.runtime.canvas.height;e<2||t<2||(n.mouseVec[0]=n.remoteTarget.x*e,n.mouseVec[1]=(1-n.remoteTarget.y)*t)}const yt={resolveFormProviderId:Xr,unbindFormProvider:Nn,bindFormProvider:Ds,bindOutPublisher:Os,applyFormParams:Ms,applyRemoteMouse:In},Fs=`#version 300 es
|