@supersoniks/concorde 4.9.98-visual-stack.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -34
- package/build-infos.json +1 -1
- package/concorde-core.bundle.js +311 -293
- package/concorde-core.es.js +5195 -5129
- package/dist/concorde-core.bundle.js +311 -293
- package/dist/concorde-core.es.js +5195 -5129
- package/dist/docs-mock-api-sw.js +5 -1
- package/dist/docs-mock-api-sw.js.map +2 -2
- package/package.json +384 -1826
- package/public/docs-mock-api-sw.js +5 -1
- package/public/docs-mock-api-sw.js.map +2 -2
- package/scripts/post-build.mjs +10 -116
- package/scripts/pre-build.mjs +36 -119
- package/scripts/pre-publish.mjs +54 -76
- package/src/core/components/functional/jsonata/jsonata.md +2 -4
- package/src/core/components/functional/sdui/sdui.md +2 -2
- package/src/core/components/functional/sdui/sdui.ts +29 -40
- package/src/core/components/ui/button/button.ts +1 -2
- 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/input/input.ts +7 -13
- 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.ts +1 -2
- package/src/core/components/ui/pop/pop.ts +9 -0
- package/src/core/components/ui/toast/render-content.ts +13 -0
- package/src/core/components/ui/toast/toast-item.ts +40 -12
- package/src/core/components/ui/toast/toast.ts +54 -14
- package/src/core/components/ui/toast/types.ts +14 -2
- 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/utils/HTML.ts +74 -107
- package/src/core/utils/PublisherProxy.ts +6 -29
- package/src/core/utils/jsonataHelpers.ts +0 -36
- package/src/docs/_core-concept/dataFlow.md +1 -3
- package/src/docs/_getting-started/create-a-component.md +1 -1
- package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
- package/src/docs/_misc/html-integration.md +2 -0
- package/src/docs/components/docs-demo-sources.ts +75 -377
- package/src/docs/docs.ts +1 -9
- 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 -25
- package/src/docs/search/docs-search.json +864 -2584
- package/src/tsconfig.json +313 -517
- package/src/tsconfig.tsbuildinfo +1 -1
- package/vite/config.js +30 -42
- package/vite.config.mts +12 -51
- package/dist/concorde-3d.bundle.js +0 -3960
- package/dist/concorde-3d.es.js +0 -33433
- package/dist/concorde-hugging-face-infer.bundle.js +0 -32
- package/dist/concorde-hugging-face-infer.es.js +0 -2952
- package/dist/concorde-shader.bundle.js +0 -116
- package/dist/concorde-shader.es.js +0 -8353
- package/dist/concorde-webgpu.bundle.js +0 -307
- package/dist/concorde-webgpu.es.js +0 -8627
- package/dist/docs/hf-samples/beach.jpg +0 -0
- package/dist/docs/hf-samples/cats.jpg +0 -0
- package/dist/docs/hf-samples/corgi.jpg +0 -0
- package/dist/docs/hf-samples/portrait.jpg +0 -0
- package/dist/docs/hf-samples/scene.jpg +0 -0
- package/dist/docs/hf-samples/singer.jpg +0 -0
- package/dist/docs/shader-samples/color.jpg +0 -0
- package/dist/docs/shader-samples/depth.png +0 -0
- package/dist/docs/shader-samples/impact.jpg +0 -0
- package/dist/docs/shader-samples/video.webm +0 -0
- package/dist/js/addons/3d.js +0 -6
- package/dist/js/addons/3d.js.map +0 -1
- package/dist/js/addons/hugging-face-infer.js +0 -8
- package/dist/js/addons/hugging-face-infer.js.map +0 -1
- package/dist/js/addons/shader.js +0 -6
- package/dist/js/addons/shader.js.map +0 -1
- package/dist/js/addons/webgpu.js +0 -7
- package/dist/js/addons/webgpu.js.map +0 -1
- package/dist/js/components.js +0 -12
- package/dist/js/components.js.map +0 -1
- package/dist/js/concorde-loaded.js +0 -5
- package/dist/js/concorde-loaded.js.map +0 -1
- package/dist/js/core/_types/endpoint.js +0 -5
- package/dist/js/core/_types/endpoint.js.map +0 -1
- package/dist/js/core/_types/key.js +0 -2
- package/dist/js/core/_types/key.js.map +0 -1
- package/dist/js/core/_types/types.js +0 -3
- package/dist/js/core/_types/types.js.map +0 -1
- package/dist/js/core/components/functional/3d/3d.js +0 -249
- package/dist/js/core/components/functional/3d/3d.js.map +0 -1
- package/dist/js/core/components/functional/3d/asset.js +0 -20
- package/dist/js/core/components/functional/3d/asset.js.map +0 -1
- package/dist/js/core/components/functional/3d/boot.js +0 -47
- package/dist/js/core/components/functional/3d/boot.js.map +0 -1
- package/dist/js/core/components/functional/3d/constants.js +0 -91
- package/dist/js/core/components/functional/3d/constants.js.map +0 -1
- package/dist/js/core/components/functional/3d/demo-content.js +0 -38
- package/dist/js/core/components/functional/3d/demo-content.js.map +0 -1
- package/dist/js/core/components/functional/3d/ensure.js +0 -76
- package/dist/js/core/components/functional/3d/ensure.js.map +0 -1
- package/dist/js/core/components/functional/3d/form-bind.js +0 -25
- package/dist/js/core/components/functional/3d/form-bind.js.map +0 -1
- package/dist/js/core/components/functional/3d/form-fields.js +0 -76
- package/dist/js/core/components/functional/3d/form-fields.js.map +0 -1
- package/dist/js/core/components/functional/3d/form-params.js +0 -69
- package/dist/js/core/components/functional/3d/form-params.js.map +0 -1
- package/dist/js/core/components/functional/3d/frame-capture.js +0 -108
- package/dist/js/core/components/functional/3d/frame-capture.js.map +0 -1
- package/dist/js/core/components/functional/3d/frame-source.js +0 -22
- package/dist/js/core/components/functional/3d/frame-source.js.map +0 -1
- package/dist/js/core/components/functional/3d/gl.js +0 -34
- package/dist/js/core/components/functional/3d/gl.js.map +0 -1
- package/dist/js/core/components/functional/3d/life.js +0 -56
- package/dist/js/core/components/functional/3d/life.js.map +0 -1
- package/dist/js/core/components/functional/3d/load.js +0 -109
- package/dist/js/core/components/functional/3d/load.js.map +0 -1
- package/dist/js/core/components/functional/3d/ops.js +0 -78
- package/dist/js/core/components/functional/3d/ops.js.map +0 -1
- package/dist/js/core/components/functional/3d/opts.js +0 -2
- package/dist/js/core/components/functional/3d/opts.js.map +0 -1
- package/dist/js/core/components/functional/3d/orbit.js +0 -136
- package/dist/js/core/components/functional/3d/orbit.js.map +0 -1
- package/dist/js/core/components/functional/3d/out-publish.js +0 -104
- package/dist/js/core/components/functional/3d/out-publish.js.map +0 -1
- package/dist/js/core/components/functional/3d/parse.js +0 -95
- package/dist/js/core/components/functional/3d/parse.js.map +0 -1
- package/dist/js/core/components/functional/3d/pick.js +0 -62
- package/dist/js/core/components/functional/3d/pick.js.map +0 -1
- package/dist/js/core/components/functional/3d/playback.js +0 -61
- package/dist/js/core/components/functional/3d/playback.js.map +0 -1
- package/dist/js/core/components/functional/3d/pointer.js +0 -58
- package/dist/js/core/components/functional/3d/pointer.js.map +0 -1
- package/dist/js/core/components/functional/3d/post-bind.js +0 -207
- package/dist/js/core/components/functional/3d/post-bind.js.map +0 -1
- package/dist/js/core/components/functional/3d/post-channels.js +0 -39
- package/dist/js/core/components/functional/3d/post-channels.js.map +0 -1
- package/dist/js/core/components/functional/3d/post-fx.js +0 -495
- package/dist/js/core/components/functional/3d/post-fx.js.map +0 -1
- package/dist/js/core/components/functional/3d/props.js +0 -247
- package/dist/js/core/components/functional/3d/props.js.map +0 -1
- package/dist/js/core/components/functional/3d/publisher-listen.js +0 -6
- package/dist/js/core/components/functional/3d/publisher-listen.js.map +0 -1
- package/dist/js/core/components/functional/3d/reload.js +0 -65
- package/dist/js/core/components/functional/3d/reload.js.map +0 -1
- package/dist/js/core/components/functional/3d/runtime.js +0 -193
- package/dist/js/core/components/functional/3d/runtime.js.map +0 -1
- package/dist/js/core/components/functional/3d/scene-runtime.js +0 -6
- package/dist/js/core/components/functional/3d/scene-runtime.js.map +0 -1
- package/dist/js/core/components/functional/3d/snapshot.js +0 -47
- package/dist/js/core/components/functional/3d/snapshot.js.map +0 -1
- package/dist/js/core/components/functional/3d/styles.js +0 -38
- package/dist/js/core/components/functional/3d/styles.js.map +0 -1
- package/dist/js/core/components/functional/3d/tune.js +0 -63
- package/dist/js/core/components/functional/3d/tune.js.map +0 -1
- package/dist/js/core/components/functional/3d/types.js +0 -8
- package/dist/js/core/components/functional/3d/types.js.map +0 -1
- package/dist/js/core/components/functional/3d/updated.js +0 -70
- package/dist/js/core/components/functional/3d/updated.js.map +0 -1
- package/dist/js/core/components/functional/3d/view.js +0 -40
- package/dist/js/core/components/functional/3d/view.js.map +0 -1
- package/dist/js/core/components/functional/3d/wire.js +0 -34
- package/dist/js/core/components/functional/3d/wire.js.map +0 -1
- package/dist/js/core/components/functional/date/date.js +0 -272
- package/dist/js/core/components/functional/date/date.js.map +0 -1
- package/dist/js/core/components/functional/example/example.js +0 -44
- package/dist/js/core/components/functional/example/example.js.map +0 -1
- package/dist/js/core/components/functional/fetch/fetch.js +0 -79
- package/dist/js/core/components/functional/fetch/fetch.js.map +0 -1
- package/dist/js/core/components/functional/functional.js +0 -18
- package/dist/js/core/components/functional/functional.js.map +0 -1
- package/dist/js/core/components/functional/if/if.js +0 -39
- package/dist/js/core/components/functional/if/if.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hf-cache.js +0 -183
- package/dist/js/core/components/functional/infer/hugging-face/hf-cache.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hf-config.js +0 -50
- package/dist/js/core/components/functional/infer/hugging-face/hf-config.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hf-controller.js +0 -460
- package/dist/js/core/components/functional/infer/hugging-face/hf-controller.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hf-engine.js +0 -116
- package/dist/js/core/components/functional/infer/hugging-face/hf-engine.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hf-input.js +0 -170
- package/dist/js/core/components/functional/infer/hugging-face/hf-input.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hf-protocol.js +0 -2
- package/dist/js/core/components/functional/infer/hugging-face/hf-protocol.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hf-registry.js +0 -367
- package/dist/js/core/components/functional/infer/hugging-face/hf-registry.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hf-schema.js +0 -288
- package/dist/js/core/components/functional/infer/hugging-face/hf-schema.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hf-worker-runtime.js +0 -309
- package/dist/js/core/components/functional/infer/hugging-face/hf-worker-runtime.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face-infer.js +0 -213
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face-infer.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face.js +0 -76
- package/dist/js/core/components/functional/infer/hugging-face/hugging-face.js.map +0 -1
- package/dist/js/core/components/functional/infer/hugging-face/types.js +0 -62
- package/dist/js/core/components/functional/infer/hugging-face/types.js.map +0 -1
- package/dist/js/core/components/functional/jsonata/jsonata.js +0 -119
- package/dist/js/core/components/functional/jsonata/jsonata.js.map +0 -1
- package/dist/js/core/components/functional/list/list.js +0 -341
- package/dist/js/core/components/functional/list/list.js.map +0 -1
- package/dist/js/core/components/functional/mix/mix.js +0 -103
- package/dist/js/core/components/functional/mix/mix.js.map +0 -1
- package/dist/js/core/components/functional/queue/queue.js +0 -450
- package/dist/js/core/components/functional/queue/queue.js.map +0 -1
- package/dist/js/core/components/functional/router/redirect.js +0 -54
- package/dist/js/core/components/functional/router/redirect.js.map +0 -1
- package/dist/js/core/components/functional/router/router.js +0 -179
- package/dist/js/core/components/functional/router/router.js.map +0 -1
- package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js +0 -216
- package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js.map +0 -1
- package/dist/js/core/components/functional/sdui/default-library.json +0 -108
- package/dist/js/core/components/functional/sdui/sdui-utils.js +0 -64
- package/dist/js/core/components/functional/sdui/sdui-utils.js.map +0 -1
- package/dist/js/core/components/functional/sdui/sdui.js +0 -271
- package/dist/js/core/components/functional/sdui/sdui.js.map +0 -1
- package/dist/js/core/components/functional/sdui/types.js +0 -2
- package/dist/js/core/components/functional/sdui/types.js.map +0 -1
- package/dist/js/core/components/functional/shader/gl-runtime.js +0 -852
- package/dist/js/core/components/functional/shader/gl-runtime.js.map +0 -1
- package/dist/js/core/components/functional/shader/shader.js +0 -1739
- package/dist/js/core/components/functional/shader/shader.js.map +0 -1
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js +0 -82
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js.map +0 -1
- package/dist/js/core/components/functional/shader/types.js +0 -230
- package/dist/js/core/components/functional/shader/types.js.map +0 -1
- package/dist/js/core/components/functional/sonic-scope/sonic-scope.js +0 -22
- package/dist/js/core/components/functional/sonic-scope/sonic-scope.js.map +0 -1
- package/dist/js/core/components/functional/states/states.js +0 -172
- package/dist/js/core/components/functional/states/states.js.map +0 -1
- package/dist/js/core/components/functional/submit/submit.js +0 -284
- package/dist/js/core/components/functional/submit/submit.js.map +0 -1
- package/dist/js/core/components/functional/subscriber/subscriber.js +0 -39
- package/dist/js/core/components/functional/subscriber/subscriber.js.map +0 -1
- package/dist/js/core/components/functional/translation/translation.js +0 -28
- package/dist/js/core/components/functional/translation/translation.js.map +0 -1
- package/dist/js/core/components/functional/value/value.js +0 -28
- package/dist/js/core/components/functional/value/value.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/canvas2d-fallback.js +0 -117
- package/dist/js/core/components/functional/webgpu/canvas2d-fallback.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/form-bind.js +0 -92
- package/dist/js/core/components/functional/webgpu/form-bind.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/gl-fallback.js +0 -156
- package/dist/js/core/components/functional/webgpu/gl-fallback.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js +0 -407
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/helpers.js +0 -50
- package/dist/js/core/components/functional/webgpu/helpers.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/out-frame.js +0 -117
- package/dist/js/core/components/functional/webgpu/out-frame.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/particles-runtime.js +0 -407
- package/dist/js/core/components/functional/webgpu/particles-runtime.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/pointer.js +0 -56
- package/dist/js/core/components/functional/webgpu/pointer.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/types.js +0 -24
- package/dist/js/core/components/functional/webgpu/types.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/webgpu.js +0 -709
- package/dist/js/core/components/functional/webgpu/webgpu.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/wgsl-prelude.js +0 -77
- package/dist/js/core/components/functional/webgpu/wgsl-prelude.js.map +0 -1
- package/dist/js/core/components/ui/_css/scroll.js +0 -27
- package/dist/js/core/components/ui/_css/scroll.js.map +0 -1
- package/dist/js/core/components/ui/_css/shadow.js +0 -22
- package/dist/js/core/components/ui/_css/shadow.js.map +0 -1
- package/dist/js/core/components/ui/_css/size.js +0 -36
- package/dist/js/core/components/ui/_css/size.js.map +0 -1
- package/dist/js/core/components/ui/_css/type.js +0 -92
- package/dist/js/core/components/ui/_css/type.js.map +0 -1
- package/dist/js/core/components/ui/alert/alert.js +0 -213
- package/dist/js/core/components/ui/alert/alert.js.map +0 -1
- package/dist/js/core/components/ui/alert-messages/alert-messages.js +0 -68
- package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +0 -1
- package/dist/js/core/components/ui/badge/badge.js +0 -199
- package/dist/js/core/components/ui/badge/badge.js.map +0 -1
- package/dist/js/core/components/ui/button/button.js +0 -697
- package/dist/js/core/components/ui/button/button.js.map +0 -1
- package/dist/js/core/components/ui/captcha/altchaStyles.js +0 -226
- package/dist/js/core/components/ui/captcha/altchaStyles.js.map +0 -1
- package/dist/js/core/components/ui/captcha/captcha.js +0 -167
- package/dist/js/core/components/ui/captcha/captcha.js.map +0 -1
- package/dist/js/core/components/ui/card/card-footer.js +0 -26
- package/dist/js/core/components/ui/card/card-footer.js.map +0 -1
- package/dist/js/core/components/ui/card/card-header-descripton.js +0 -30
- package/dist/js/core/components/ui/card/card-header-descripton.js.map +0 -1
- package/dist/js/core/components/ui/card/card-header.js +0 -79
- package/dist/js/core/components/ui/card/card-header.js.map +0 -1
- package/dist/js/core/components/ui/card/card-main.js +0 -26
- package/dist/js/core/components/ui/card/card-main.js.map +0 -1
- package/dist/js/core/components/ui/card/card.js +0 -67
- package/dist/js/core/components/ui/card/card.js.map +0 -1
- package/dist/js/core/components/ui/divider/divider.js +0 -200
- package/dist/js/core/components/ui/divider/divider.js.map +0 -1
- package/dist/js/core/components/ui/form/checkbox/checkbox.js +0 -257
- package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +0 -1
- package/dist/js/core/components/ui/form/css/form-control.js +0 -393
- package/dist/js/core/components/ui/form/css/form-control.js.map +0 -1
- package/dist/js/core/components/ui/form/fieldset/fieldset.js +0 -124
- package/dist/js/core/components/ui/form/fieldset/fieldset.js.map +0 -1
- package/dist/js/core/components/ui/form/fieldset/legend-description.js +0 -38
- package/dist/js/core/components/ui/form/fieldset/legend-description.js.map +0 -1
- package/dist/js/core/components/ui/form/fieldset/legend.js +0 -130
- package/dist/js/core/components/ui/form/fieldset/legend.js.map +0 -1
- package/dist/js/core/components/ui/form/form-actions/form-actions.js +0 -47
- package/dist/js/core/components/ui/form/form-actions/form-actions.js.map +0 -1
- package/dist/js/core/components/ui/form/form-layout/form-layout.js +0 -84
- package/dist/js/core/components/ui/form/form-layout/form-layout.js.map +0 -1
- package/dist/js/core/components/ui/form/input/input.js +0 -316
- package/dist/js/core/components/ui/form/input/input.js.map +0 -1
- package/dist/js/core/components/ui/form/input/password-helper.js +0 -134
- package/dist/js/core/components/ui/form/input/password-helper.js.map +0 -1
- package/dist/js/core/components/ui/form/input/same-value-helper.js +0 -85
- package/dist/js/core/components/ui/form/input/same-value-helper.js.map +0 -1
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +0 -405
- package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +0 -1
- package/dist/js/core/components/ui/form/radio/radio.js +0 -63
- package/dist/js/core/components/ui/form/radio/radio.js.map +0 -1
- package/dist/js/core/components/ui/form/select/select.js +0 -323
- package/dist/js/core/components/ui/form/select/select.js.map +0 -1
- package/dist/js/core/components/ui/form/switch/switch.js +0 -90
- package/dist/js/core/components/ui/form/switch/switch.js.map +0 -1
- package/dist/js/core/components/ui/form/textarea/textarea.js +0 -162
- package/dist/js/core/components/ui/form/textarea/textarea.js.map +0 -1
- package/dist/js/core/components/ui/group/group.js +0 -128
- package/dist/js/core/components/ui/group/group.js.map +0 -1
- package/dist/js/core/components/ui/icon/icon.js +0 -145
- package/dist/js/core/components/ui/icon/icon.js.map +0 -1
- package/dist/js/core/components/ui/icon/icons.js +0 -184
- package/dist/js/core/components/ui/icon/icons.js.map +0 -1
- package/dist/js/core/components/ui/icon/icons.json +0 -1
- package/dist/js/core/components/ui/image/image.js +0 -160
- package/dist/js/core/components/ui/image/image.js.map +0 -1
- package/dist/js/core/components/ui/link/link.js +0 -125
- package/dist/js/core/components/ui/link/link.js.map +0 -1
- package/dist/js/core/components/ui/loader/loader.js +0 -106
- package/dist/js/core/components/ui/loader/loader.js.map +0 -1
- package/dist/js/core/components/ui/loader/styles/fixed.js +0 -56
- package/dist/js/core/components/ui/loader/styles/fixed.js.map +0 -1
- package/dist/js/core/components/ui/loader/styles/inline.js +0 -70
- package/dist/js/core/components/ui/loader/styles/inline.js.map +0 -1
- package/dist/js/core/components/ui/menu/menu-item.js +0 -35
- package/dist/js/core/components/ui/menu/menu-item.js.map +0 -1
- package/dist/js/core/components/ui/menu/menu.js +0 -436
- package/dist/js/core/components/ui/menu/menu.js.map +0 -1
- package/dist/js/core/components/ui/modal/modal-actions.js +0 -44
- package/dist/js/core/components/ui/modal/modal-actions.js.map +0 -1
- package/dist/js/core/components/ui/modal/modal-close.js +0 -56
- package/dist/js/core/components/ui/modal/modal-close.js.map +0 -1
- package/dist/js/core/components/ui/modal/modal-content.js +0 -27
- package/dist/js/core/components/ui/modal/modal-content.js.map +0 -1
- package/dist/js/core/components/ui/modal/modal-subtitle.js +0 -34
- package/dist/js/core/components/ui/modal/modal-subtitle.js.map +0 -1
- package/dist/js/core/components/ui/modal/modal-title.js +0 -35
- package/dist/js/core/components/ui/modal/modal-title.js.map +0 -1
- package/dist/js/core/components/ui/modal/modal-utils.js +0 -32
- package/dist/js/core/components/ui/modal/modal-utils.js.map +0 -1
- package/dist/js/core/components/ui/modal/modal.js +0 -568
- package/dist/js/core/components/ui/modal/modal.js.map +0 -1
- package/dist/js/core/components/ui/pop/pop.js +0 -337
- package/dist/js/core/components/ui/pop/pop.js.map +0 -1
- package/dist/js/core/components/ui/progress/progress.js +0 -164
- package/dist/js/core/components/ui/progress/progress.js.map +0 -1
- package/dist/js/core/components/ui/table/table-caption.js +0 -29
- package/dist/js/core/components/ui/table/table-caption.js.map +0 -1
- package/dist/js/core/components/ui/table/table-tbody.js +0 -41
- package/dist/js/core/components/ui/table/table-tbody.js.map +0 -1
- package/dist/js/core/components/ui/table/table-td.js +0 -69
- package/dist/js/core/components/ui/table/table-td.js.map +0 -1
- package/dist/js/core/components/ui/table/table-tfoot.js +0 -28
- package/dist/js/core/components/ui/table/table-tfoot.js.map +0 -1
- package/dist/js/core/components/ui/table/table-th.js +0 -80
- package/dist/js/core/components/ui/table/table-th.js.map +0 -1
- package/dist/js/core/components/ui/table/table-thead.js +0 -26
- package/dist/js/core/components/ui/table/table-thead.js.map +0 -1
- package/dist/js/core/components/ui/table/table-tr.js +0 -67
- package/dist/js/core/components/ui/table/table-tr.js.map +0 -1
- package/dist/js/core/components/ui/table/table.js +0 -106
- package/dist/js/core/components/ui/table/table.js.map +0 -1
- package/dist/js/core/components/ui/theme/theme-collection/core-variables.js +0 -74
- package/dist/js/core/components/ui/theme/theme-collection/core-variables.js.map +0 -1
- package/dist/js/core/components/ui/theme/theme-collection/dark.js +0 -39
- package/dist/js/core/components/ui/theme/theme-collection/dark.js.map +0 -1
- package/dist/js/core/components/ui/theme/theme-collection/light.js +0 -32
- package/dist/js/core/components/ui/theme/theme-collection/light.js.map +0 -1
- package/dist/js/core/components/ui/theme/theme.js +0 -150
- package/dist/js/core/components/ui/theme/theme.js.map +0 -1
- package/dist/js/core/components/ui/toast/message-subscriber.js +0 -41
- package/dist/js/core/components/ui/toast/message-subscriber.js.map +0 -1
- package/dist/js/core/components/ui/toast/toast-item.js +0 -379
- package/dist/js/core/components/ui/toast/toast-item.js.map +0 -1
- package/dist/js/core/components/ui/toast/toast.js +0 -269
- package/dist/js/core/components/ui/toast/toast.js.map +0 -1
- package/dist/js/core/components/ui/toast/types.js +0 -2
- package/dist/js/core/components/ui/toast/types.js.map +0 -1
- package/dist/js/core/components/ui/tooltip/tooltip.js +0 -219
- package/dist/js/core/components/ui/tooltip/tooltip.js.map +0 -1
- package/dist/js/core/components/ui/ui.js +0 -41
- package/dist/js/core/components/ui/ui.js.map +0 -1
- package/dist/js/core/core.js +0 -14
- package/dist/js/core/core.js.map +0 -1
- package/dist/js/core/decorators/Subscriber.js +0 -10
- package/dist/js/core/decorators/Subscriber.js.map +0 -1
- package/dist/js/core/decorators/api.js +0 -806
- package/dist/js/core/decorators/api.js.map +0 -1
- package/dist/js/core/decorators/lifecycle.js +0 -67
- package/dist/js/core/decorators/lifecycle.js.map +0 -1
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js +0 -27
- package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +0 -1
- package/dist/js/core/decorators/subscriber/autoFill.js +0 -26
- package/dist/js/core/decorators/subscriber/autoFill.js.map +0 -1
- package/dist/js/core/decorators/subscriber/autoSubscribe.js +0 -46
- package/dist/js/core/decorators/subscriber/autoSubscribe.js.map +0 -1
- package/dist/js/core/decorators/subscriber/bind.js +0 -150
- package/dist/js/core/decorators/subscriber/bind.js.map +0 -1
- package/dist/js/core/decorators/subscriber/common.js +0 -44
- package/dist/js/core/decorators/subscriber/common.js.map +0 -1
- package/dist/js/core/decorators/subscriber/derive.js +0 -60
- package/dist/js/core/decorators/subscriber/derive.js.map +0 -1
- package/dist/js/core/decorators/subscriber/dynamicPath.js +0 -75
- package/dist/js/core/decorators/subscriber/dynamicPath.js.map +0 -1
- package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js +0 -138
- package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js.map +0 -1
- package/dist/js/core/decorators/subscriber/handle.js +0 -22
- package/dist/js/core/decorators/subscriber/handle.js.map +0 -1
- package/dist/js/core/decorators/subscriber/onAssign.js +0 -199
- package/dist/js/core/decorators/subscriber/onAssign.js.map +0 -1
- package/dist/js/core/decorators/subscriber/publish.js +0 -108
- package/dist/js/core/decorators/subscriber/publish.js.map +0 -1
- package/dist/js/core/decorators/subscriber/publisherPath.js +0 -16
- package/dist/js/core/decorators/subscriber/publisherPath.js.map +0 -1
- package/dist/js/core/decorators/subscriber/subscribe.js +0 -20
- package/dist/js/core/decorators/subscriber/subscribe.js.map +0 -1
- package/dist/js/core/directives/DataProvider.js +0 -127
- package/dist/js/core/directives/DataProvider.js.map +0 -1
- package/dist/js/core/directives/Wording.js +0 -221
- package/dist/js/core/directives/Wording.js.map +0 -1
- package/dist/js/core/mixins/Fetcher.js +0 -325
- package/dist/js/core/mixins/Fetcher.js.map +0 -1
- package/dist/js/core/mixins/FormCheckable.js +0 -313
- package/dist/js/core/mixins/FormCheckable.js.map +0 -1
- package/dist/js/core/mixins/FormElement.js +0 -304
- package/dist/js/core/mixins/FormElement.js.map +0 -1
- package/dist/js/core/mixins/FormInput.js +0 -82
- package/dist/js/core/mixins/FormInput.js.map +0 -1
- package/dist/js/core/mixins/Subscriber.js +0 -354
- package/dist/js/core/mixins/Subscriber.js.map +0 -1
- package/dist/js/core/mixins/TemplatesContainer.js +0 -70
- package/dist/js/core/mixins/TemplatesContainer.js.map +0 -1
- package/dist/js/core/mixins/mixins.js +0 -7
- package/dist/js/core/mixins/mixins.js.map +0 -1
- package/dist/js/core/utils/AncestorAttributeObserver.js +0 -140
- package/dist/js/core/utils/AncestorAttributeObserver.js.map +0 -1
- package/dist/js/core/utils/Arrays.js +0 -141
- package/dist/js/core/utils/Arrays.js.map +0 -1
- package/dist/js/core/utils/DataBindObserver.js +0 -265
- package/dist/js/core/utils/DataBindObserver.js.map +0 -1
- package/dist/js/core/utils/Electron.js +0 -14
- package/dist/js/core/utils/Electron.js.map +0 -1
- package/dist/js/core/utils/Format.js +0 -43
- package/dist/js/core/utils/Format.js.map +0 -1
- package/dist/js/core/utils/HTML.js +0 -307
- package/dist/js/core/utils/HTML.js.map +0 -1
- package/dist/js/core/utils/LocationHandler.js +0 -143
- package/dist/js/core/utils/LocationHandler.js.map +0 -1
- package/dist/js/core/utils/Objects.js +0 -111
- package/dist/js/core/utils/Objects.js.map +0 -1
- package/dist/js/core/utils/PublisherProxy.js +0 -970
- package/dist/js/core/utils/PublisherProxy.js.map +0 -1
- package/dist/js/core/utils/SafariScrollGuard.js +0 -384
- package/dist/js/core/utils/SafariScrollGuard.js.map +0 -1
- package/dist/js/core/utils/Utils.js +0 -19
- package/dist/js/core/utils/Utils.js.map +0 -1
- package/dist/js/core/utils/aesCrypto.js +0 -98
- package/dist/js/core/utils/aesCrypto.js.map +0 -1
- package/dist/js/core/utils/api.js +0 -595
- package/dist/js/core/utils/api.js.map +0 -1
- package/dist/js/core/utils/dataProviderKey.js +0 -64
- package/dist/js/core/utils/dataProviderKey.js.map +0 -1
- package/dist/js/core/utils/derive.js +0 -246
- package/dist/js/core/utils/derive.js.map +0 -1
- package/dist/js/core/utils/endpoint.js +0 -74
- package/dist/js/core/utils/endpoint.js.map +0 -1
- package/dist/js/core/utils/jsonataHelpers.js +0 -84
- package/dist/js/core/utils/jsonataHelpers.js.map +0 -1
- package/dist/js/core/utils/jsonataRuntime.js +0 -75
- package/dist/js/core/utils/jsonataRuntime.js.map +0 -1
- package/dist/js/core/utils/mediaRef.js +0 -206
- package/dist/js/core/utils/mediaRef.js.map +0 -1
- package/dist/js/core/utils/route.js +0 -149
- package/dist/js/core/utils/route.js.map +0 -1
- package/dist/js/core/utils/similarity.js +0 -44
- package/dist/js/core/utils/similarity.js.map +0 -1
- package/dist/js/core/utils/url-pattern.js +0 -3
- package/dist/js/core/utils/url-pattern.js.map +0 -1
- package/dist/js/dataprovider.js +0 -2
- package/dist/js/dataprovider.js.map +0 -1
- package/dist/js/decorators.js +0 -43
- package/dist/js/decorators.js.map +0 -1
- package/dist/js/directives.js +0 -30
- package/dist/js/directives.js.map +0 -1
- package/dist/js/index.js +0 -8
- package/dist/js/index.js.map +0 -1
- package/dist/js/mixins.js +0 -23
- package/dist/js/mixins.js.map +0 -1
- package/dist/js/test-utils/TestUtils.js +0 -10
- package/dist/js/test-utils/TestUtils.js.map +0 -1
- package/dist/js/utils.js +0 -46
- package/dist/js/utils.js.map +0 -1
- package/dist/types/addons/3d.d.ts +0 -6
- package/dist/types/addons/3d.d.ts.map +0 -1
- package/dist/types/addons/hugging-face-infer.d.ts +0 -8
- package/dist/types/addons/hugging-face-infer.d.ts.map +0 -1
- package/dist/types/addons/shader.d.ts +0 -6
- package/dist/types/addons/shader.d.ts.map +0 -1
- package/dist/types/addons/webgpu.d.ts +0 -7
- package/dist/types/addons/webgpu.d.ts.map +0 -1
- package/dist/types/components.d.ts +0 -5
- package/dist/types/components.d.ts.map +0 -1
- package/dist/types/concorde-loaded.d.ts +0 -2
- package/dist/types/concorde-loaded.d.ts.map +0 -1
- package/dist/types/core/_types/endpoint.d.ts +0 -5
- package/dist/types/core/_types/endpoint.d.ts.map +0 -1
- package/dist/types/core/_types/key.d.ts +0 -2
- package/dist/types/core/_types/key.d.ts.map +0 -1
- package/dist/types/core/_types/types.d.ts +0 -28
- package/dist/types/core/_types/types.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/3d.d.ts +0 -94
- package/dist/types/core/components/functional/3d/3d.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/asset.d.ts +0 -12
- package/dist/types/core/components/functional/3d/asset.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/boot.d.ts +0 -23
- package/dist/types/core/components/functional/3d/boot.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/constants.d.ts +0 -43
- package/dist/types/core/components/functional/3d/constants.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/demo-content.d.ts +0 -10
- package/dist/types/core/components/functional/3d/demo-content.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/ensure.d.ts +0 -39
- package/dist/types/core/components/functional/3d/ensure.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/form-bind.d.ts +0 -20
- package/dist/types/core/components/functional/3d/form-bind.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/form-fields.d.ts +0 -14
- package/dist/types/core/components/functional/3d/form-fields.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/form-params.d.ts +0 -37
- package/dist/types/core/components/functional/3d/form-params.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/frame-capture.d.ts +0 -33
- package/dist/types/core/components/functional/3d/frame-capture.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/frame-source.d.ts +0 -23
- package/dist/types/core/components/functional/3d/frame-source.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/gl.d.ts +0 -4
- package/dist/types/core/components/functional/3d/gl.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/life.d.ts +0 -43
- package/dist/types/core/components/functional/3d/life.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/load.d.ts +0 -36
- package/dist/types/core/components/functional/3d/load.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/ops.d.ts +0 -48
- package/dist/types/core/components/functional/3d/ops.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/opts.d.ts +0 -16
- package/dist/types/core/components/functional/3d/opts.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/orbit.d.ts +0 -55
- package/dist/types/core/components/functional/3d/orbit.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/out-publish.d.ts +0 -48
- package/dist/types/core/components/functional/3d/out-publish.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/parse.d.ts +0 -23
- package/dist/types/core/components/functional/3d/parse.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/pick.d.ts +0 -32
- package/dist/types/core/components/functional/3d/pick.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/playback.d.ts +0 -35
- package/dist/types/core/components/functional/3d/playback.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/pointer.d.ts +0 -27
- package/dist/types/core/components/functional/3d/pointer.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/post-bind.d.ts +0 -52
- package/dist/types/core/components/functional/3d/post-bind.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/post-channels.d.ts +0 -40
- package/dist/types/core/components/functional/3d/post-channels.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/post-fx.d.ts +0 -73
- package/dist/types/core/components/functional/3d/post-fx.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/props.d.ts +0 -72
- package/dist/types/core/components/functional/3d/props.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/publisher-listen.d.ts +0 -8
- package/dist/types/core/components/functional/3d/publisher-listen.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/reload.d.ts +0 -38
- package/dist/types/core/components/functional/3d/reload.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/runtime.d.ts +0 -90
- package/dist/types/core/components/functional/3d/runtime.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts +0 -6
- package/dist/types/core/components/functional/3d/scene-runtime.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/snapshot.d.ts +0 -29
- package/dist/types/core/components/functional/3d/snapshot.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/styles.d.ts +0 -2
- package/dist/types/core/components/functional/3d/styles.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/tune.d.ts +0 -37
- package/dist/types/core/components/functional/3d/tune.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/types.d.ts +0 -149
- package/dist/types/core/components/functional/3d/types.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/updated.d.ts +0 -7
- package/dist/types/core/components/functional/3d/updated.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/view.d.ts +0 -25
- package/dist/types/core/components/functional/3d/view.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/wire.d.ts +0 -32
- package/dist/types/core/components/functional/3d/wire.d.ts.map +0 -1
- package/dist/types/core/components/functional/date/date.d.ts +0 -52
- package/dist/types/core/components/functional/date/date.d.ts.map +0 -1
- package/dist/types/core/components/functional/example/example.d.ts +0 -15
- package/dist/types/core/components/functional/example/example.d.ts.map +0 -1
- package/dist/types/core/components/functional/fetch/fetch.d.ts +0 -102
- package/dist/types/core/components/functional/fetch/fetch.d.ts.map +0 -1
- package/dist/types/core/components/functional/functional.d.ts +0 -18
- package/dist/types/core/components/functional/functional.d.ts.map +0 -1
- package/dist/types/core/components/functional/if/if.d.ts +0 -13
- package/dist/types/core/components/functional/if/if.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hf-cache.d.ts +0 -21
- package/dist/types/core/components/functional/infer/hugging-face/hf-cache.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hf-config.d.ts +0 -133
- package/dist/types/core/components/functional/infer/hugging-face/hf-config.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hf-controller.d.ts +0 -79
- package/dist/types/core/components/functional/infer/hugging-face/hf-controller.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hf-engine.d.ts +0 -43
- package/dist/types/core/components/functional/infer/hugging-face/hf-engine.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hf-input.d.ts +0 -47
- package/dist/types/core/components/functional/infer/hugging-face/hf-input.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hf-protocol.d.ts +0 -95
- package/dist/types/core/components/functional/infer/hugging-face/hf-protocol.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hf-registry.d.ts +0 -77
- package/dist/types/core/components/functional/infer/hugging-face/hf-registry.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hf-schema.d.ts +0 -1251
- package/dist/types/core/components/functional/infer/hugging-face/hf-schema.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hf-worker-runtime.d.ts +0 -56
- package/dist/types/core/components/functional/infer/hugging-face/hf-worker-runtime.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face-infer.d.ts +0 -67
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face-infer.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face.d.ts +0 -116
- package/dist/types/core/components/functional/infer/hugging-face/hugging-face.d.ts.map +0 -1
- package/dist/types/core/components/functional/infer/hugging-face/types.d.ts +0 -167
- package/dist/types/core/components/functional/infer/hugging-face/types.d.ts.map +0 -1
- package/dist/types/core/components/functional/jsonata/jsonata.d.ts +0 -29
- package/dist/types/core/components/functional/jsonata/jsonata.d.ts.map +0 -1
- package/dist/types/core/components/functional/list/list.d.ts +0 -149
- package/dist/types/core/components/functional/list/list.d.ts.map +0 -1
- package/dist/types/core/components/functional/mix/mix.d.ts +0 -23
- package/dist/types/core/components/functional/mix/mix.d.ts.map +0 -1
- package/dist/types/core/components/functional/queue/queue.d.ts +0 -93
- package/dist/types/core/components/functional/queue/queue.d.ts.map +0 -1
- package/dist/types/core/components/functional/router/redirect.d.ts +0 -19
- package/dist/types/core/components/functional/router/redirect.d.ts.map +0 -1
- package/dist/types/core/components/functional/router/router.d.ts +0 -46
- package/dist/types/core/components/functional/router/router.d.ts.map +0 -1
- package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -59
- package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts.map +0 -1
- package/dist/types/core/components/functional/sdui/sdui-utils.d.ts +0 -6
- package/dist/types/core/components/functional/sdui/sdui-utils.d.ts.map +0 -1
- package/dist/types/core/components/functional/sdui/sdui.d.ts +0 -148
- package/dist/types/core/components/functional/sdui/sdui.d.ts.map +0 -1
- package/dist/types/core/components/functional/sdui/types.d.ts +0 -38
- package/dist/types/core/components/functional/sdui/types.d.ts.map +0 -1
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts +0 -122
- package/dist/types/core/components/functional/shader/gl-runtime.d.ts.map +0 -1
- package/dist/types/core/components/functional/shader/shader.d.ts +0 -306
- package/dist/types/core/components/functional/shader/shader.d.ts.map +0 -1
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts +0 -20
- package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts.map +0 -1
- package/dist/types/core/components/functional/shader/types.d.ts +0 -286
- package/dist/types/core/components/functional/shader/types.d.ts.map +0 -1
- package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -6
- package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts.map +0 -1
- package/dist/types/core/components/functional/states/states.d.ts +0 -42
- package/dist/types/core/components/functional/states/states.d.ts.map +0 -1
- package/dist/types/core/components/functional/submit/submit.d.ts +0 -37
- package/dist/types/core/components/functional/submit/submit.d.ts.map +0 -1
- package/dist/types/core/components/functional/subscriber/subscriber.d.ts +0 -13
- package/dist/types/core/components/functional/subscriber/subscriber.d.ts.map +0 -1
- package/dist/types/core/components/functional/translation/translation.d.ts +0 -7
- package/dist/types/core/components/functional/translation/translation.d.ts.map +0 -1
- package/dist/types/core/components/functional/value/value.d.ts +0 -8
- package/dist/types/core/components/functional/value/value.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/canvas2d-fallback.d.ts +0 -29
- package/dist/types/core/components/functional/webgpu/canvas2d-fallback.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/form-bind.d.ts +0 -43
- package/dist/types/core/components/functional/webgpu/form-bind.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts +0 -35
- package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts +0 -67
- package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/helpers.d.ts +0 -10
- package/dist/types/core/components/functional/webgpu/helpers.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/out-frame.d.ts +0 -29
- package/dist/types/core/components/functional/webgpu/out-frame.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/particles-runtime.d.ts +0 -37
- package/dist/types/core/components/functional/webgpu/particles-runtime.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/pointer.d.ts +0 -41
- package/dist/types/core/components/functional/webgpu/pointer.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/types.d.ts +0 -75
- package/dist/types/core/components/functional/webgpu/types.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts +0 -133
- package/dist/types/core/components/functional/webgpu/webgpu.d.ts.map +0 -1
- package/dist/types/core/components/functional/webgpu/wgsl-prelude.d.ts +0 -8
- package/dist/types/core/components/functional/webgpu/wgsl-prelude.d.ts.map +0 -1
- package/dist/types/core/components/ui/_css/scroll.d.ts +0 -2
- package/dist/types/core/components/ui/_css/scroll.d.ts.map +0 -1
- package/dist/types/core/components/ui/_css/shadow.d.ts +0 -3
- package/dist/types/core/components/ui/_css/shadow.d.ts.map +0 -1
- package/dist/types/core/components/ui/_css/size.d.ts +0 -3
- package/dist/types/core/components/ui/_css/size.d.ts.map +0 -1
- package/dist/types/core/components/ui/_css/type.d.ts +0 -3
- package/dist/types/core/components/ui/_css/type.d.ts.map +0 -1
- package/dist/types/core/components/ui/alert/alert.d.ts +0 -37
- package/dist/types/core/components/ui/alert/alert.d.ts.map +0 -1
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts +0 -15
- package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +0 -1
- package/dist/types/core/components/ui/badge/badge.d.ts +0 -27
- package/dist/types/core/components/ui/badge/badge.d.ts.map +0 -1
- package/dist/types/core/components/ui/button/button.d.ts +0 -180
- package/dist/types/core/components/ui/button/button.d.ts.map +0 -1
- package/dist/types/core/components/ui/captcha/altchaStyles.d.ts +0 -2
- package/dist/types/core/components/ui/captcha/altchaStyles.d.ts.map +0 -1
- package/dist/types/core/components/ui/captcha/captcha.d.ts +0 -30
- package/dist/types/core/components/ui/captcha/captcha.d.ts.map +0 -1
- package/dist/types/core/components/ui/card/card-footer.d.ts +0 -6
- package/dist/types/core/components/ui/card/card-footer.d.ts.map +0 -1
- package/dist/types/core/components/ui/card/card-header-descripton.d.ts +0 -6
- package/dist/types/core/components/ui/card/card-header-descripton.d.ts.map +0 -1
- package/dist/types/core/components/ui/card/card-header.d.ts +0 -9
- package/dist/types/core/components/ui/card/card-header.d.ts.map +0 -1
- package/dist/types/core/components/ui/card/card-main.d.ts +0 -6
- package/dist/types/core/components/ui/card/card-main.d.ts.map +0 -1
- package/dist/types/core/components/ui/card/card.d.ts +0 -13
- package/dist/types/core/components/ui/card/card.d.ts.map +0 -1
- package/dist/types/core/components/ui/divider/divider.d.ts +0 -16
- package/dist/types/core/components/ui/divider/divider.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +0 -176
- package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/css/form-control.d.ts +0 -5
- package/dist/types/core/components/ui/form/css/form-control.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts +0 -24
- package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts +0 -6
- package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/fieldset/legend.d.ts +0 -17
- package/dist/types/core/components/ui/form/fieldset/legend.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts +0 -8
- package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts +0 -13
- package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/input/input.d.ts +0 -123
- package/dist/types/core/components/ui/form/input/input.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/input/password-helper.d.ts +0 -26
- package/dist/types/core/components/ui/form/input/password-helper.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/input/same-value-helper.d.ts +0 -17
- package/dist/types/core/components/ui/form/input/same-value-helper.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +0 -155
- package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/radio/radio.d.ts +0 -15
- package/dist/types/core/components/ui/form/radio/radio.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/select/select.d.ts +0 -59
- package/dist/types/core/components/ui/form/select/select.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/switch/switch.d.ts +0 -6
- package/dist/types/core/components/ui/form/switch/switch.d.ts.map +0 -1
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts +0 -94
- package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +0 -1
- package/dist/types/core/components/ui/group/group.d.ts +0 -17
- package/dist/types/core/components/ui/group/group.d.ts.map +0 -1
- package/dist/types/core/components/ui/icon/icon.d.ts +0 -30
- package/dist/types/core/components/ui/icon/icon.d.ts.map +0 -1
- package/dist/types/core/components/ui/icon/icons.d.ts +0 -13
- package/dist/types/core/components/ui/icon/icons.d.ts.map +0 -1
- package/dist/types/core/components/ui/image/image.d.ts +0 -16
- package/dist/types/core/components/ui/image/image.d.ts.map +0 -1
- package/dist/types/core/components/ui/link/link.d.ts +0 -30
- package/dist/types/core/components/ui/link/link.d.ts.map +0 -1
- package/dist/types/core/components/ui/loader/loader.d.ts +0 -24
- package/dist/types/core/components/ui/loader/loader.d.ts.map +0 -1
- package/dist/types/core/components/ui/loader/styles/fixed.d.ts +0 -2
- package/dist/types/core/components/ui/loader/styles/fixed.d.ts.map +0 -1
- package/dist/types/core/components/ui/loader/styles/inline.d.ts +0 -2
- package/dist/types/core/components/ui/loader/styles/inline.d.ts.map +0 -1
- package/dist/types/core/components/ui/menu/menu-item.d.ts +0 -6
- package/dist/types/core/components/ui/menu/menu-item.d.ts.map +0 -1
- package/dist/types/core/components/ui/menu/menu.d.ts +0 -52
- package/dist/types/core/components/ui/menu/menu.d.ts.map +0 -1
- package/dist/types/core/components/ui/modal/modal-actions.d.ts +0 -9
- package/dist/types/core/components/ui/modal/modal-actions.d.ts.map +0 -1
- package/dist/types/core/components/ui/modal/modal-close.d.ts +0 -11
- package/dist/types/core/components/ui/modal/modal-close.d.ts.map +0 -1
- package/dist/types/core/components/ui/modal/modal-content.d.ts +0 -6
- package/dist/types/core/components/ui/modal/modal-content.d.ts.map +0 -1
- package/dist/types/core/components/ui/modal/modal-subtitle.d.ts +0 -6
- package/dist/types/core/components/ui/modal/modal-subtitle.d.ts.map +0 -1
- package/dist/types/core/components/ui/modal/modal-title.d.ts +0 -6
- package/dist/types/core/components/ui/modal/modal-title.d.ts.map +0 -1
- package/dist/types/core/components/ui/modal/modal-utils.d.ts +0 -4
- package/dist/types/core/components/ui/modal/modal-utils.d.ts.map +0 -1
- package/dist/types/core/components/ui/modal/modal.d.ts +0 -79
- package/dist/types/core/components/ui/modal/modal.d.ts.map +0 -1
- package/dist/types/core/components/ui/pop/pop.d.ts +0 -42
- package/dist/types/core/components/ui/pop/pop.d.ts.map +0 -1
- package/dist/types/core/components/ui/progress/progress.d.ts +0 -12
- package/dist/types/core/components/ui/progress/progress.d.ts.map +0 -1
- package/dist/types/core/components/ui/table/table-caption.d.ts +0 -6
- package/dist/types/core/components/ui/table/table-caption.d.ts.map +0 -1
- package/dist/types/core/components/ui/table/table-tbody.d.ts +0 -6
- package/dist/types/core/components/ui/table/table-tbody.d.ts.map +0 -1
- package/dist/types/core/components/ui/table/table-td.d.ts +0 -13
- package/dist/types/core/components/ui/table/table-td.d.ts.map +0 -1
- package/dist/types/core/components/ui/table/table-tfoot.d.ts +0 -6
- package/dist/types/core/components/ui/table/table-tfoot.d.ts.map +0 -1
- package/dist/types/core/components/ui/table/table-th.d.ts +0 -12
- package/dist/types/core/components/ui/table/table-th.d.ts.map +0 -1
- package/dist/types/core/components/ui/table/table-thead.d.ts +0 -6
- package/dist/types/core/components/ui/table/table-thead.d.ts.map +0 -1
- package/dist/types/core/components/ui/table/table-tr.d.ts +0 -14
- package/dist/types/core/components/ui/table/table-tr.d.ts.map +0 -1
- package/dist/types/core/components/ui/table/table.d.ts +0 -18
- package/dist/types/core/components/ui/table/table.d.ts.map +0 -1
- package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -2
- package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts.map +0 -1
- package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts +0 -2
- package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts.map +0 -1
- package/dist/types/core/components/ui/theme/theme-collection/light.d.ts +0 -2
- package/dist/types/core/components/ui/theme/theme-collection/light.d.ts.map +0 -1
- package/dist/types/core/components/ui/theme/theme.d.ts +0 -20
- package/dist/types/core/components/ui/theme/theme.d.ts.map +0 -1
- package/dist/types/core/components/ui/toast/message-subscriber.d.ts +0 -19
- package/dist/types/core/components/ui/toast/message-subscriber.d.ts.map +0 -1
- package/dist/types/core/components/ui/toast/toast-item.d.ts +0 -41
- package/dist/types/core/components/ui/toast/toast-item.d.ts.map +0 -1
- package/dist/types/core/components/ui/toast/toast.d.ts +0 -28
- package/dist/types/core/components/ui/toast/toast.d.ts.map +0 -1
- package/dist/types/core/components/ui/toast/types.d.ts +0 -12
- package/dist/types/core/components/ui/toast/types.d.ts.map +0 -1
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts +0 -21
- package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +0 -1
- package/dist/types/core/components/ui/ui.d.ts +0 -35
- package/dist/types/core/components/ui/ui.d.ts.map +0 -1
- package/dist/types/core/core.d.ts +0 -5
- package/dist/types/core/core.d.ts.map +0 -1
- package/dist/types/core/decorators/Subscriber.d.ts +0 -13
- package/dist/types/core/decorators/Subscriber.d.ts.map +0 -1
- package/dist/types/core/decorators/api.d.ts +0 -155
- package/dist/types/core/decorators/api.d.ts.map +0 -1
- package/dist/types/core/decorators/lifecycle.d.ts +0 -19
- package/dist/types/core/decorators/lifecycle.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +0 -11
- package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/autoFill.d.ts +0 -2
- package/dist/types/core/decorators/subscriber/autoFill.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts +0 -2
- package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/bind.d.ts +0 -28
- package/dist/types/core/decorators/subscriber/bind.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/common.d.ts +0 -14
- package/dist/types/core/decorators/subscriber/common.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/derive.d.ts +0 -30
- package/dist/types/core/decorators/subscriber/derive.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/dynamicPath.d.ts +0 -23
- package/dist/types/core/decorators/subscriber/dynamicPath.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts +0 -42
- package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/handle.d.ts +0 -74
- package/dist/types/core/decorators/subscriber/handle.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/onAssign.d.ts +0 -53
- package/dist/types/core/decorators/subscriber/onAssign.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/publish.d.ts +0 -23
- package/dist/types/core/decorators/subscriber/publish.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/publisherPath.d.ts +0 -3
- package/dist/types/core/decorators/subscriber/publisherPath.d.ts.map +0 -1
- package/dist/types/core/decorators/subscriber/subscribe.d.ts +0 -20
- package/dist/types/core/decorators/subscriber/subscribe.d.ts.map +0 -1
- package/dist/types/core/directives/DataProvider.d.ts +0 -45
- package/dist/types/core/directives/DataProvider.d.ts.map +0 -1
- package/dist/types/core/directives/Wording.d.ts +0 -44
- package/dist/types/core/directives/Wording.d.ts.map +0 -1
- package/dist/types/core/mixins/Fetcher.d.ts +0 -108
- package/dist/types/core/mixins/Fetcher.d.ts.map +0 -1
- package/dist/types/core/mixins/FormCheckable.d.ts +0 -95
- package/dist/types/core/mixins/FormCheckable.d.ts.map +0 -1
- package/dist/types/core/mixins/FormElement.d.ts +0 -37
- package/dist/types/core/mixins/FormElement.d.ts.map +0 -1
- package/dist/types/core/mixins/FormInput.d.ts +0 -79
- package/dist/types/core/mixins/FormInput.d.ts.map +0 -1
- package/dist/types/core/mixins/Subscriber.d.ts +0 -38
- package/dist/types/core/mixins/Subscriber.d.ts.map +0 -1
- package/dist/types/core/mixins/TemplatesContainer.d.ts +0 -14
- package/dist/types/core/mixins/TemplatesContainer.d.ts.map +0 -1
- package/dist/types/core/mixins/mixins.d.ts +0 -7
- package/dist/types/core/mixins/mixins.d.ts.map +0 -1
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts +0 -38
- package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +0 -1
- package/dist/types/core/utils/Arrays.d.ts +0 -98
- package/dist/types/core/utils/Arrays.d.ts.map +0 -1
- package/dist/types/core/utils/DataBindObserver.d.ts +0 -84
- package/dist/types/core/utils/DataBindObserver.d.ts.map +0 -1
- package/dist/types/core/utils/Electron.d.ts +0 -8
- package/dist/types/core/utils/Electron.d.ts.map +0 -1
- package/dist/types/core/utils/Format.d.ts +0 -13
- package/dist/types/core/utils/Format.d.ts.map +0 -1
- package/dist/types/core/utils/HTML.d.ts +0 -59
- package/dist/types/core/utils/HTML.d.ts.map +0 -1
- package/dist/types/core/utils/LocationHandler.d.ts +0 -48
- package/dist/types/core/utils/LocationHandler.d.ts.map +0 -1
- package/dist/types/core/utils/Objects.d.ts +0 -31
- package/dist/types/core/utils/Objects.d.ts.map +0 -1
- package/dist/types/core/utils/PublisherProxy.d.ts +0 -230
- package/dist/types/core/utils/PublisherProxy.d.ts.map +0 -1
- package/dist/types/core/utils/SafariScrollGuard.d.ts +0 -36
- package/dist/types/core/utils/SafariScrollGuard.d.ts.map +0 -1
- package/dist/types/core/utils/Utils.d.ts +0 -6
- package/dist/types/core/utils/Utils.d.ts.map +0 -1
- package/dist/types/core/utils/aesCrypto.d.ts +0 -53
- package/dist/types/core/utils/aesCrypto.d.ts.map +0 -1
- package/dist/types/core/utils/api.d.ts +0 -173
- package/dist/types/core/utils/api.d.ts.map +0 -1
- package/dist/types/core/utils/dataProviderKey.d.ts +0 -56
- package/dist/types/core/utils/dataProviderKey.d.ts.map +0 -1
- package/dist/types/core/utils/derive.d.ts +0 -40
- package/dist/types/core/utils/derive.d.ts.map +0 -1
- package/dist/types/core/utils/endpoint.d.ts +0 -37
- package/dist/types/core/utils/endpoint.d.ts.map +0 -1
- package/dist/types/core/utils/jsonataHelpers.d.ts +0 -15
- package/dist/types/core/utils/jsonataHelpers.d.ts.map +0 -1
- package/dist/types/core/utils/jsonataRuntime.d.ts +0 -13
- package/dist/types/core/utils/jsonataRuntime.d.ts.map +0 -1
- package/dist/types/core/utils/mediaRef.d.ts +0 -68
- package/dist/types/core/utils/mediaRef.d.ts.map +0 -1
- package/dist/types/core/utils/route.d.ts +0 -41
- package/dist/types/core/utils/route.d.ts.map +0 -1
- package/dist/types/core/utils/similarity.d.ts +0 -15
- package/dist/types/core/utils/similarity.d.ts.map +0 -1
- package/dist/types/core/utils/url-pattern.d.ts +0 -3
- package/dist/types/core/utils/url-pattern.d.ts.map +0 -1
- package/dist/types/dataprovider.d.ts +0 -2
- package/dist/types/dataprovider.d.ts.map +0 -1
- package/dist/types/decorators.d.ts +0 -30
- package/dist/types/decorators.d.ts.map +0 -1
- package/dist/types/directives.d.ts +0 -21
- package/dist/types/directives.d.ts.map +0 -1
- package/dist/types/index.d.ts +0 -8
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/mixins.d.ts +0 -204
- package/dist/types/mixins.d.ts.map +0 -1
- package/dist/types/test-utils/TestUtils.d.ts +0 -4
- package/dist/types/test-utils/TestUtils.d.ts.map +0 -1
- package/dist/types/utils.d.ts +0 -20
- package/dist/types/utils.d.ts.map +0 -1
- package/public/docs/hf-samples/beach.jpg +0 -0
- package/public/docs/hf-samples/cats.jpg +0 -0
- package/public/docs/hf-samples/corgi.jpg +0 -0
- package/public/docs/hf-samples/portrait.jpg +0 -0
- package/public/docs/hf-samples/scene.jpg +0 -0
- package/public/docs/hf-samples/singer.jpg +0 -0
- package/public/docs/shader-samples/color.jpg +0 -0
- package/public/docs/shader-samples/depth.png +0 -0
- package/public/docs/shader-samples/impact.jpg +0 -0
- package/public/docs/shader-samples/video.webm +0 -0
- package/scripts/build-addons.mjs +0 -26
- package/scripts/gen-shader-depth.mjs +0 -85
- package/scripts/gen-shader-harris-video.mjs +0 -17
- package/scripts/gen-shader-harris-video.py +0 -84
- package/scripts/hf-vendor.mjs +0 -154
- package/src/addons/3d.ts +0 -5
- package/src/addons/hugging-face-infer.ts +0 -11
- package/src/addons/shader.ts +0 -5
- package/src/addons/webgpu.ts +0 -15
- package/src/core/components/functional/3d/3d.md +0 -161
- package/src/core/components/functional/3d/3d.spec.ts +0 -213
- package/src/core/components/functional/3d/3d.ts +0 -284
- package/src/core/components/functional/3d/asset.ts +0 -22
- package/src/core/components/functional/3d/boot.ts +0 -77
- package/src/core/components/functional/3d/constants.ts +0 -101
- package/src/core/components/functional/3d/demo-content.ts +0 -45
- package/src/core/components/functional/3d/ensure.ts +0 -107
- package/src/core/components/functional/3d/form-bind.ts +0 -40
- package/src/core/components/functional/3d/form-fields.ts +0 -80
- package/src/core/components/functional/3d/form-params.ts +0 -99
- package/src/core/components/functional/3d/frame-capture.spec.ts +0 -72
- package/src/core/components/functional/3d/frame-capture.ts +0 -135
- package/src/core/components/functional/3d/frame-source.ts +0 -30
- package/src/core/components/functional/3d/gl.ts +0 -35
- package/src/core/components/functional/3d/life.ts +0 -104
- package/src/core/components/functional/3d/load.ts +0 -129
- package/src/core/components/functional/3d/ops.ts +0 -126
- package/src/core/components/functional/3d/opts.ts +0 -16
- package/src/core/components/functional/3d/orbit.ts +0 -185
- package/src/core/components/functional/3d/out-publish.ts +0 -141
- package/src/core/components/functional/3d/parse.ts +0 -95
- package/src/core/components/functional/3d/pick.ts +0 -92
- package/src/core/components/functional/3d/playback.ts +0 -82
- package/src/core/components/functional/3d/pointer.ts +0 -79
- package/src/core/components/functional/3d/post-bind.ts +0 -262
- package/src/core/components/functional/3d/post-channels.spec.ts +0 -36
- package/src/core/components/functional/3d/post-channels.ts +0 -69
- package/src/core/components/functional/3d/post-fx.ts +0 -594
- package/src/core/components/functional/3d/props.ts +0 -95
- package/src/core/components/functional/3d/publisher-listen.ts +0 -13
- package/src/core/components/functional/3d/reload.ts +0 -96
- package/src/core/components/functional/3d/runtime.ts +0 -237
- package/src/core/components/functional/3d/scene-runtime.ts +0 -12
- package/src/core/components/functional/3d/snapshot.ts +0 -73
- package/src/core/components/functional/3d/styles.ts +0 -38
- package/src/core/components/functional/3d/tune.ts +0 -93
- package/src/core/components/functional/3d/types.ts +0 -159
- package/src/core/components/functional/3d/updated.ts +0 -86
- package/src/core/components/functional/3d/view.ts +0 -63
- package/src/core/components/functional/3d/wire.ts +0 -65
- package/src/core/components/functional/infer/hugging-face/hf-cache.ts +0 -198
- package/src/core/components/functional/infer/hugging-face/hf-config.ts +0 -188
- package/src/core/components/functional/infer/hugging-face/hf-controller.spec.ts +0 -350
- package/src/core/components/functional/infer/hugging-face/hf-controller.ts +0 -622
- package/src/core/components/functional/infer/hugging-face/hf-engine.ts +0 -178
- package/src/core/components/functional/infer/hugging-face/hf-input.spec.ts +0 -99
- package/src/core/components/functional/infer/hugging-face/hf-input.ts +0 -218
- package/src/core/components/functional/infer/hugging-face/hf-protocol.ts +0 -76
- package/src/core/components/functional/infer/hugging-face/hf-registry.ts +0 -457
- package/src/core/components/functional/infer/hugging-face/hf-schema.spec.ts +0 -124
- package/src/core/components/functional/infer/hugging-face/hf-schema.ts +0 -390
- package/src/core/components/functional/infer/hugging-face/hf-worker-runtime.spec.ts +0 -147
- package/src/core/components/functional/infer/hugging-face/hf-worker-runtime.ts +0 -381
- package/src/core/components/functional/infer/hugging-face/hugging-face-infer.md +0 -304
- package/src/core/components/functional/infer/hugging-face/hugging-face-infer.ts +0 -202
- package/src/core/components/functional/infer/hugging-face/hugging-face.ts +0 -282
- package/src/core/components/functional/infer/hugging-face/types.ts +0 -325
- package/src/core/components/functional/shader/gl-runtime.ts +0 -1120
- package/src/core/components/functional/shader/shader.md +0 -232
- package/src/core/components/functional/shader/shader.spec.ts +0 -635
- package/src/core/components/functional/shader/shader.ts +0 -1746
- package/src/core/components/functional/shader/shadertoy-prelude.ts +0 -96
- package/src/core/components/functional/shader/types.ts +0 -525
- package/src/core/components/functional/webgpu/canvas2d-fallback.ts +0 -125
- package/src/core/components/functional/webgpu/form-bind.ts +0 -116
- package/src/core/components/functional/webgpu/gl-fallback.ts +0 -182
- package/src/core/components/functional/webgpu/gpu-runtime.ts +0 -485
- package/src/core/components/functional/webgpu/helpers.ts +0 -53
- package/src/core/components/functional/webgpu/out-frame.ts +0 -137
- package/src/core/components/functional/webgpu/particles-runtime.ts +0 -426
- package/src/core/components/functional/webgpu/pointer.ts +0 -85
- package/src/core/components/functional/webgpu/types.ts +0 -96
- package/src/core/components/functional/webgpu/webgpu.md +0 -86
- package/src/core/components/functional/webgpu/webgpu.spec.ts +0 -178
- package/src/core/components/functional/webgpu/webgpu.ts +0 -706
- package/src/core/components/functional/webgpu/wgsl-prelude.ts +0 -81
- package/src/core/utils/mediaRef.spec.ts +0 -146
- package/src/core/utils/mediaRef.ts +0 -238
- package/src/core/utils/similarity.spec.ts +0 -34
- package/src/core/utils/similarity.ts +0 -54
- package/src/docs/_getting-started/cdn-addons.md +0 -73
- package/src/docs/_misc/visual-stack.md +0 -83
- package/src/docs/example/docs-3d-demos.ts +0 -8
- package/src/docs/example/docs-3d-form.ts +0 -95
- package/src/docs/example/docs-3d-orbit.ts +0 -44
- package/src/docs/example/docs-3d-out.ts +0 -56
- package/src/docs/example/docs-3d-post-depth-demo.ts +0 -68
- package/src/docs/example/docs-3d-shader-live-demo.ts +0 -98
- package/src/docs/example/docs-3d-shared.ts +0 -15
- package/src/docs/example/docs-3d-webgpu-live-demo.ts +0 -83
- package/src/docs/example/docs-harris-webgpu-demo.ts +0 -480
- package/src/docs/example/docs-hugging-face-demos.ts +0 -516
- package/src/docs/example/docs-shader-demos.ts +0 -357
- package/src/docs/example/docs-visual-stack-demo.ts +0 -394
- package/src/docs/example/docs-webgpu-demo.ts +0 -77
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(an){typeof define=="function"&&define.amd?define(an):an()})((function(){"use strict";var Oe,et;function vl(t){const e=t.trim();if(!e)return!1;try{const s=new URL(e,"https://example.invalid/");return s.protocol==="http:"||s.protocol==="https:"||s.protocol==="blob:"}catch{return!1}}let Je=class Ct{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const r=s.indexOf("=");return e[s.substring(0,r).trim()]=s.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,s){let r=e;for(;r;){if(!s(r))return;r=r.parentNode||r.host}}static overflowMatches(e,s){return s.includes(e.overflowY)||s.includes(e.overflowX)}static findAncestorByOverflow(e,s){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(Ct.overflowMatches(i,s))return r}r=Ct.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return Ct.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const s=e.toLowerCase();return s===e?[e]:[e,s]}static readScopeAttributeOnElement(e,s){for(const r of Ct.scopeAttributeNames(s))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,s){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const n=Ct.readScopeAttributeOnElement(r,s);if(n!=null)return n}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const s=Ct.getAncestorAttributeValue(e,"token"),r=Ct.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=Ct.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const c=Ct.getAncestorAttributeValue(e,"tokenProvider"),h=Ct.getAncestorAttributeValue(e,"eventsApiToken");s||(n=Ct.getAncestorAttributeValue(e,"userName"),o=Ct.getAncestorAttributeValue(e,"password"));const b=Ct.getAncestorAttributeValue(e,"credentials")||void 0,k=e.getAttribute("cache"),g=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:i,token:s,userName:n,password:o,authToken:h,tokenProvider:c,addHTTPResponse:r,credentials:b,cache:k,blockUntilDone:g,keepAlive:f}}static getClosestElement(e,s){let r=e;for(;r&&!(r.nodeName&&r.nodeName.toLowerCase()===s);){const i=r.parentNode||r.host;if(!i){r=null;break}r=i}return r?.nodeName?r:null}static getClosestForm(e){return Ct.getClosestElement(e,"form")}static getAncestorsByTagNames(e,s){const r=new Set(s.map(o=>o.toLowerCase())),i=[];let n=e.parentNode||e.host;for(;n;)n instanceof Element&&r.has(n.tagName.toLowerCase())&&i.push(n),n=n.parentNode||n.host;return i}static getAncestorsBySelectors(e,s){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const n of s)try{if(i.matches(n)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){if(!vl(e))return!1;const s=typeof document<"u"?new URL(e,document.baseURI).href:e,r=Array.from(document.scripts).find(n=>n.src===s);if(r)return r.dataset.concordeLoaded==="1"?!0:new Promise(n=>{let o=!1;const c=b=>{o||(o=!0,b&&(r.dataset.concordeLoaded="1"),n(b))};r.addEventListener("load",()=>c(!0),{once:!0}),r.addEventListener("error",()=>c(!1),{once:!0});const h=r.readyState;if(h==="complete"||h==="loaded"){c(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{o||c(!0)})})});const i=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(n=>{const o=document.createElement("script");o.src=e,i&&(o.type="module"),o.onload=()=>{o.dataset.concordeLoaded="1",n(!0)},o.onerror=()=>n(!1),document.head.appendChild(o)})}static async loadCSS(e){return new Promise(s=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>s(!0),r.onerror=()=>s(!0),document.head.appendChild(r)})}};const ln=t=>{const e=document.documentElement;new MutationObserver(r=>{for(const i of r)i.type==="attributes"&&i.attributeName==="lang"&&t()}).observe(e,{attributes:!0,attributeFilter:["lang"]})};let Tr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",r="long"){s||(s=Je.getLanguage());const i=(b,k)=>[Math.floor(b/k),b%k];function n(b,k,g){return new Intl.NumberFormat(b,{style:"unit",unit:k,unitDisplay:g}).format}const[o,c]=i(e,60),h=[];return o&&h.push(n(s,"hour",r)(o)),c&&h.push(n(s,"minute",r)(c)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(h)}static js(e){try{return Function("return "+e)()}catch{return""}}};class xo{constructor(e){this.path=e}toString(){return this.path}}function So(t){return new Proxy(t,{get(e,s){if(s==="path")return e.path;if(s==="toString")return e.toString.bind(e);if(s===Symbol.toStringTag)return"DataProviderKey";if(typeof s=="symbol")return e[s];const r=e.path?`${e.path}.${String(s)}`:String(s);return So(new xo(r))}})}const yl=/\$\{|\{\$/;function wl(t){return yl.test(t)}function di(t){const e=typeof t=="string"?t:t.path;if(wl(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const Ss=function(t){return this instanceof Ss?So(new xo(t)):new Ss(t)};let at=class xs{static shallowEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const c=e[o],h=s[o];if(r?c!==h:c!=h)return!1}return!0}static deepEqual(e,s,r=!0){const i=Object.keys(e),n=Object.keys(s);if(i.length!==n.length&&r)return!1;for(const o of i){const c=e[o],h=s[o],b=xs.isObject(c)&&xs.isObject(h),k=r?c!==h:c!=h;if(b&&!xs.deepEqual(c,h)||!b&&k)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return xs.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,r=!1){for(const i of s){const n=e[i];if(n===void 0)return;r&&xs.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[i]}return e}static traverseDotNotation(e,s,r=!1){return xs.traverse(e,s.split("."),r)}static getURLSearchArray(e,s=""){let r=[];for(let i in e){const n=e[i];s&&(i=s+"["+i+"]"),xs.isObject(n)?r=[...r,...this.getURLSearchArray(n,i)]:r.push(`${i}=${n}`)}return r}static getURLSearchString(e){return xs.getURLSearchArray(e,"").join("&")}};const kt=at.traverseDotNotation;let _l=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(s=>{setTimeout(s,e)})}},Ao="sonic";typeof __SONIC_PREFIX__<"u"&&(Ao=__SONIC_PREFIX__);let Co=Ao.replace(/-([a-z])/g,t=>t[1].toUpperCase());const cn=Co.charAt(0).toUpperCase()+Co.slice(1),Pl=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function ko(t){return t==null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).some(e=>Pl.has(e))}function pi(t){return Object.prototype.hasOwnProperty.call(t,"__value")}function As(t){return typeof t=="object"&&t!==null}let ur="sonic";typeof __SONIC_PREFIX__>"u"&&(ur="sonic");const un=ur=="sonic"?"publisher-proxies-data":ur+"-publisher-proxies-data",Us=class Us{constructor(e,s,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,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=s||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(),Us.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(s=>s()),this._is_savable_&&!be.changed){be.changed=!0,be.saveId++;const s=be.saveId;setTimeout(()=>be.getInstance().saveToLocalStorage(s),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,s){this._fillListeners_.forEach(r=>{r[e]!==s&&(r[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){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]!==s&&(r[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&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 s in this._value_){let r=s;const i=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(r=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const r=this._value_[s];e[s]!==r&&(e[s]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,s=!1){if(this._value_===e||As(this._value_)&&As(e)&&e&&pi(this._value_)&&pi(e)&&this._value_.__value===e.__value||!As(e)&&e===this._value_.__value)return!0;this._value_=As(e)?e:{__value:e},this._cachedGet_=void 0;const r=pi(this._value_);if(this._parentKey_&&this.parent){const i=pi(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 n=[];n[Number(this._parentKey_)]=i,this.parent.set(n)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,n)=>{n!="_parent_"&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(s),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,n)=>{const o=this._value_[n];n!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(n))&&(i.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),As(this._value_))for(const i in this._value_){const n=e[i],c=As(n)?n:{__value:n};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,n);continue}this._proxies_.get(i)?.set(c,!0),this._publishDynamicFilling_(i,n)}return!0}get(){if(xl(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_||(Us.instancesCounter++,this._instanceCounter_=Us.instancesCounter),Us.instances.set(this._instanceCounter_,this),"<"+ur+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+ur+"-publisher-proxy>"}};Us.instances=new Map,Us.instancesCounter=0;let Lr=Us;const fi=[];function xl(t){fi.length>0&&fi[0].add(t)}function $o(){fi.unshift(new Set)}function Do(){return fi.shift()}const Te=class Te{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],Te.instance!=null)throw"Singleton / use getInstance";Te.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),Te.initPageShowHandler()}static initPageShowHandler(){Te.pageShowHandlerInitialized||(Te.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&Te.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(un),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(un,r),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const c=this.localStorageData[o],h=new Date().getTime()-(c.expirationDelayMs||n);c.lastModifiationMS<h&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const s=Te.instances.get(e);return s||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new Te)}return Te.instance==null?new Te:Te.instance}static get(e,s){return Te.getInstance().get(e,s)}async setLocalData(e,s){await this.isLocalStrorageReady,e.set(this.localStorageData[s+"¤lang_"+Je.getLanguage()]?.data||e.get())}get(e,s){const r=s?.localStorageMode==="enabled",i=s?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const c=hn({});this.set(e,c)}const n=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(n,e)),i&&(n._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==Te.saveId&&e%10!=0))try{if(!Te.changed||Te.saving)return;Te.saving=!0,Te.changed=!1;const s=Array.from(this.publishers.keys());let r=!1;for(const i of s){const n=this.publishers.get(i);if(!n?._is_savable_)continue;const o=n?.get();o&&(this.localStorageData[i+"¤lang_"+Je.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:n._expiration_delay_,data:o},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(un,i)}if(Te.saving=!1,Te.changed){Te.saveId++;const i=Te.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{Te.saving=!1}}async compress(e,s){const r=new TextEncoder().encode(e),i=window,n=new i.CompressionStream(s),o=n.writable.getWriter();o.write(r),o.close();const c=await new Response(n.readable).arrayBuffer(),h=new Uint8Array(c);let b="";for(let k=0;k<h.length;k++)b+=String.fromCharCode(h[k]);return btoa(b)}async decompress(e,s){const r=atob(e),n=Uint8Array.from(r,k=>k.charCodeAt(0)).buffer,o=window,c=new o.DecompressionStream(s),h=c.writable.getWriter();h.write(n),h.close();const b=await new Response(c.readable).arrayBuffer();return new TextDecoder().decode(b)}};Te.buildDate="Wed Sep 30 2026 10:44:48 GMT+0200 (Central European Summer Time)",Te.changed=!1,Te.saving=!1,Te.saveId=0,Te.instance=null,Te.instances=new Map,Te.pageShowHandlerInitialized=!1;let be=Te;if(typeof window<"u"){const t=window,e=cn+"PublisherManager",s=t[e]||be;if(t[e]||(t[e]=be),s!==be){const r=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const i of r)Object.defineProperty(be,i,{configurable:!0,get(){return s[i]},set(n){s[i]=n}})}}const Sl=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 Al(t,e){return{get:function(s,r){if(typeof r=="string"&&Sl.has(r))return t[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!t._proxies_.has(r)){const i=t._value_[r],n=hn(As(i)?i:{__value:i},t,r);n._proxies_.set("_parent_",e()),t._proxies_.set(r,n)}return t._proxies_.get(r)},set:function(s,r,i){if(r=="_value_")return t._value_=i,!0;if(r=="_cachedGet_")return t._cachedGet_=i,!0;if(r=="_assignmentId_")return t._assignmentId_=i,!0;if(r=="_is_savable_")return t._is_savable_=i,!0;if(r=="_expiration_delay_")return t._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return t._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return t._instanceCounter_=i,!0;if(!t._proxies_.has(r)){const o=hn({},t,r);o._proxies_.set("_parent_",e()),t._proxies_.set(r,o)}return t._value_[r]!==i&&(t._value_[r]=i,t._publishDynamicFilling_(r,i),t._proxies_.get(r)?.set(As(i)?i:{__value:i})),!0},deleteProperty:function(s,r){return t._publishDynamicFilling_(r,null),t._proxies_.get(r)?.set(null),delete t._value_[r]},has:function(s,r){return r in t._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(s,r,i){return i&&"value"in i&&(t._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(s,r){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}}}function hn(t,e=null,s){const r=new Lr(t,e,s);let i=null;const n=Al(r,()=>i);return i=new Proxy(r,n),i}class Cl extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Lr.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(ur+"-publisher-proxy",Cl)}catch{}const gi=(t,e)=>{if(typeof t=="function"){const s=t;return $o(),s(),Do()}if(typeof t=="string"){const s=t.split("."),r=s.shift()||"";let i=be.get(r,e);i=at.traverse(i,s);const n=new Set;return n.add(i),n}return new Set([t])};function kl(t){const e=di(t);return gi(e).values().next().value?.get()}function bi(t,e,s){const r=di(t);return gi(r,s).values().next().value}function $l(t,e){return ko(e)?bi(t,void 0,e):bi(t)}function mi(t,e){return ko(e)?bi(t,void 0,e):bi(t)}function Dl(t,e){const s=di(t);gi(s).values().next().value?.set(e)}let vi=(Oe=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(Oe.observedElements.keys()).forEach(e=>Oe.unObserve(e)))}static observe(e){if(!e||!Oe.enabled||Oe.observedElements.has(e))return;const s=new MutationObserver(Oe.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],s.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>Oe.addPublisherListeners(i)),Oe.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>Oe.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Oe.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Oe.addPublisherListeners(s)):e.childNodes.forEach(s=>Oe.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Oe.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Oe.removePublisherListeners(s)):e.childNodes.forEach(s=>Oe.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":Oe.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(r=>{Oe.onAdded(r)}),s.removedNodes.forEach(r=>{Oe.onRemoved(r)});break}}static removePublisherListeners(e){const s=Oe.publisherListeners.get(e);s&&(Oe.publisherListeners.delete(e),s.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(r=>r.replace("$","")):s=[e],s=s.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:s.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:Oe.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const r of s)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){Oe.removePublisherListeners(e);const s=Je.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const r=be.getInstance().get(s),i=Oe.getDataBindItems(e),n=[];i.forEach(o=>{const c=o.bindedVariablesDescriptor,h=o.propertyToUpdate;for(const b of c.variables){const k=b;let g=r;g=Oe.getSubPublisher(r,k);const f=e,A={publisher:g,onAssign:()=>{const E=c.variables.map(U=>Oe.getSubPublisher(r,U)?.get());let O=c.expression,N=!1;if(E.length==1&&c.variables[0].join(".")==O.substring(1)){let U=E[0];U===null&&(U=""),f[h]=U;return}for(let U=0;U<E.length;U++){let P=E[U];const y=c.variables[U];P===null&&(N=!0,P=void 0),O=O.replace("$"+y.join("."),P)}if(O.indexOf("|")!=-1){const U=O.indexOf("|");if(U==0)O=Tr.js(O.substring(1));else{const P=O.substring(0,U),y=O.substring(U+1),I=Tr[P];O=N?"":I?I(y):O}}else O=N?"":O;f[h]=O}};g?.onAssign(A.onAssign),n.push(A)}}),Oe.publisherListeners.set(e,n)}},Oe.observedElements=new Map,Oe.enabled=!0,Oe.publisherListeners=new Map,Oe);vi.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=vi);/**
|
|
1
|
+
(function(qe){typeof define=="function"&&define.amd?define(qe):qe()})((function(){"use strict";var Oe,tt;let qe=class At{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,s)=>{const i=s.indexOf("=");return e[s.substring(0,i).trim()]=s.substring(i+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,s){for(;e;){if(!s(e))return;e=e.parentNode||e.host}}static overflowMatches(e,s){return s.includes(e.overflowY)||s.includes(e.overflowX)}static findAncestorByOverflow(e,s){let i=e;for(;i;){if(i instanceof Element&&i.nodeType===1){const r=window.getComputedStyle(i);if(At.overflowMatches(r,s))return i}i=At.nextComposedAncestor(i)}return null}static getScrollableAncestor(e){return At.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return At.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const s=e.toLowerCase();return s===e?[e]:[e,s]}static readScopeAttributeOnElement(e,s){for(const i of At.scopeAttributeNames(s))if(e.hasAttribute(i))return e.getAttribute(i)??"";return null}static getAncestorAttributeValue(e,s){if(!e)return null;let i=e;for(;i;){if(i instanceof HTMLElement){const n=At.readScopeAttributeOnElement(i,s);if(n!=null)return n}const r=i.parentNode||i.host;if(!r)break;i=r}return null}static getApiConfiguration(e){const s=At.getAncestorAttributeValue(e,"token"),i=At.getAncestorAttributeValue(e,"addHTTPResponse")!=null,r=At.getAncestorAttributeValue(e,"serviceURL");let n=null,o=null;const c=At.getAncestorAttributeValue(e,"tokenProvider"),d=At.getAncestorAttributeValue(e,"eventsApiToken");s||(n=At.getAncestorAttributeValue(e,"userName"),o=At.getAncestorAttributeValue(e,"password"));const b=At.getAncestorAttributeValue(e,"credentials")||void 0,k=e.getAttribute("cache"),g=e.hasAttribute("blockUntilDone"),f=e.hasAttribute("keepAlive");return{serviceURL:r,token:s,userName:n,password:o,authToken:d,tokenProvider:c,addHTTPResponse:i,credentials:b,cache:k,blockUntilDone:g,keepAlive:f}}static getClosestElement(e,s){for(;!(e.nodeName&&e.nodeName.toLowerCase()===s)&&(e.parentNode||e.host);)e=e.parentNode||e.host;return e.nodeName?e:null}static getClosestForm(e){return At.getClosestElement(e,"form")}static getAncestorsByTagNames(e,s){const i=new Set(s.map(o=>o.toLowerCase())),r=[];let n=e.parentNode||e.host;for(;n;)n instanceof Element&&i.has(n.tagName.toLowerCase())&&r.push(n),n=n.parentNode||n.host;return r}static getAncestorsBySelectors(e,s){const i=[];let r=e.parentNode||e.host;for(;r;){if(r instanceof Element)for(const n of s)try{if(r.matches(n)){i.push(r);break}}catch{}r=r.parentNode||r.host}return i}static async loadJS(e){return new Promise(async i=>{const r=document.createElement("script");r.src=e,r.onload=()=>i(!0),r.onerror=()=>i(!0),document.head.appendChild(r)})}static async loadCSS(e){return new Promise(async i=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>i(!0),r.onerror=()=>i(!0),document.head.appendChild(r)})}};const ln=t=>{const e=document.documentElement,s=new MutationObserver(r=>{for(let n of r)n.type==="attributes"&&n.attributeName==="lang"&&t()}),i={attributes:!0,attributeFilter:["lang"]};s.observe(e,i)};let Tr=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,s="",i="long"){s||(s=qe.getLanguage());const r=(b,k)=>[Math.floor(b/k),b%k];function n(b,k,g){return new Intl.NumberFormat(b,{style:"unit",unit:k,unitDisplay:g}).format}const[o,c]=r(e,60),d=[];return o&&d.push(n(s,"hour",i)(o)),c&&d.push(n(s,"minute",i)(c)),new Intl.ListFormat(s,{style:"long",type:"conjunction"}).format(d)}static js(e){try{return Function("return "+e)()}catch{return""}}};class So{constructor(e){this.path=e}toString(){return this.path}}function Po(t){return new Proxy(t,{get(e,s){if(s==="path")return e.path;if(s==="toString")return e.toString.bind(e);if(s===Symbol.toStringTag)return"DataProviderKey";if(typeof s=="symbol")return e[s];const i=e.path?`${e.path}.${String(s)}`:String(s);return Po(new So(i))}})}const bl=/\$\{|\{\$/;function vl(t){return bl.test(t)}function di(t){const e=typeof t=="string"?t:t.path;if(vl(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const xs=function(t){return this instanceof xs?Po(new So(t)):new xs(t)};let at=class Ps{static shallowEqual(e,s,i=!0){const r=Object.keys(e),n=Object.keys(s);if(r.length!==n.length&&i)return!1;for(const o of r){const c=e[o],d=s[o];if(i?c!==d:c!=d)return!1}return!0}static deepEqual(e,s,i=!0){const r=Object.keys(e),n=Object.keys(s);if(r.length!==n.length&&i)return!1;for(const o of r){const c=e[o],d=s[o],b=Ps.isObject(c)&&Ps.isObject(d),k=i?c!==d:c!=d;if(b&&!Ps.deepEqual(c,d)||!b&&k)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return Ps.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,s,i=!1){for(const r of s){const n=e[r];if(n===void 0)return;i&&Ps.isObject(n)?e=Object.assign(Array.isArray(n)?[]:{},e,n):e=e[r]}return e}static traverseDotNotation(e,s,i=!1){return Ps.traverse(e,s.split("."),i)}static getURLSearchArray(e,s=""){let i=[];for(let r in e){const n=e[r];s&&(r=s+"["+r+"]"),Ps.isObject(n)?i=[...i,...this.getURLSearchArray(n,r)]:i.push(`${r}=${n}`)}return i}static getURLSearchString(e){return Ps.getURLSearchArray(e,"").join("&")}};const Ut=at.traverseDotNotation;let yl=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(s=>{setTimeout(s,e)})}},xo="sonic";typeof __SONIC_PREFIX__<"u"&&(xo=__SONIC_PREFIX__);let Ao=xo.replace(/-([a-z])/g,t=>t[1].toUpperCase());const pi=Ao.charAt(0).toUpperCase()+Ao.slice(1),wl=new Set(["localStorageMode","expirationDelayMs","invalidateOnPageShow"]);function Co(t){return t==null||typeof t!="object"||Array.isArray(t)?!1:Object.keys(t).some(e=>wl.has(e))}function fi(t){return Object.prototype.hasOwnProperty.call(t,"__value")}function As(t){return typeof t=="object"&&t!==null}let hr="sonic";typeof __SONIC_PREFIX__>"u"&&(hr="sonic");const cn=hr=="sonic"?"publisher-proxies-data":hr+"-publisher-proxies-data",zs=class zs{constructor(e,s,i){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=1e3*60*60*12,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=s||null,this._parentKey_=i,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(),zs.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(s=>s()),this._is_savable_&&!ve.changed){ve.changed=!0,ve.saveId++;const s=ve.saveId;setTimeout(()=>ve.getInstance().saveToLocalStorage(s),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const i=this.get();this._assignListeners_.forEach(r=>{r(i)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,s){this._fillListeners_.forEach(i=>{i[e]!==s&&(i[e]=s)}),this._publishTemplateFilling_(e,s)}_publishTemplateFilling_(e,s){this._templateFillListeners_.forEach(i=>{const r=Object.getOwnPropertyDescriptor(i,e);r&&!r.set&&!r.writable||(i.propertyMap&&i.propertyMap[e]&&(e=i.propertyMap[e]),typeof i[e]<"u"&&i[e]!==s&&(i[e]=s))})}onAssign(e,s=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),s&&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 s in this._value_){let i=s;const r=this._value_[s];e.propertyMap&&e.propertyMap[s]&&(i=e.propertyMap[s]),typeof e[s]<"u"&&e[s]!==r&&(e[i]=r)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const s in this._value_){const i=this._value_[s];e[s]!==i&&(e[s]=i)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,s=!1){if(this._value_===e||As(this._value_)&&As(e)&&e&&fi(this._value_)&&fi(e)&&this._value_.__value===e.__value||!As(e)&&e===this._value_.__value)return!0;this._value_=As(e)?e:{__value:e},this._cachedGet_=void 0;const i=fi(this._value_);if(this._parentKey_&&this.parent){const r=fi(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_]:r});else{const n=[];n[Number(this._parentKey_)]=r,this.parent.set(n)}else this.parent._value_[this._parentKey_]=r}if(i)return this._proxies_.forEach((r,n)=>{n!="_parent_"&&(r.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(s),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const r in this._value_)this._value_[r]===void 0&&delete this._value_[r];if(this._proxies_.forEach((r,n)=>{const o=this._value_[n];n!="_parent_"&&o===void 0&&o!==null&&isNaN(Number(n))&&(r.set(null),this._publishDynamicFilling_(n,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),As(this._value_))for(const r in this._value_){const n=e[r],c=As(n)?n:{__value:n};if(!this._proxies_.has(r)){this._publishDynamicFilling_(r,n);continue}this._proxies_.get(r)?.set(c,!0),this._publishDynamicFilling_(r,n)}return!0}get(){if(_l(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_||(zs.instancesCounter++,this._instanceCounter_=zs.instancesCounter),zs.instances.set(this._instanceCounter_,this),"<"+hr+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+hr+"-publisher-proxy>"}};zs.instances=new Map,zs.instancesCounter=0;let Lr=zs;const gi=[];function _l(t){gi.length>0&&gi[0].add(t)}function ko(){gi.unshift(new Set)}function $o(){return gi.shift()}const Te=class Te{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],Te.instance!=null)throw"Singleton / use getInstance";Te.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),Te.initPageShowHandler()}static initPageShowHandler(){Te.pageShowHandlerInitialized||(Te.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&Te.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let i=localStorage.getItem(cn),r=null;if(i&&(r=await this.decompress(i,"gzip")),r)try{this.localStorageData=JSON.parse(r)}catch{this.localStorageData={}}else i=await this.compress("{}","gzip"),localStorage.setItem(cn,i),this.localStorageData={};const n=1e3*60*60*12;for(const o in this.localStorageData){const c=this.localStorageData[o],d=new Date().getTime()-(c.expirationDelayMs||n);c.lastModifiationMS<d&&delete this.localStorageData[o]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const s=Te.instances.get(e);return s||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new Te)}return Te.instance==null?new Te:Te.instance}static get(e,s){return Te.getInstance().get(e,s)}async setLocalData(e,s){await this.isLocalStrorageReady,e.set(this.localStorageData[s+"¤lang_"+qe.getLanguage()]?.data||e.get())}get(e,s){const i=s?.localStorageMode==="enabled",r=s?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const c=hn({});this.set(e,c)}const n=this.publishers.get(e);return i&&this.initialisedData.indexOf(e)===-1&&(s?.expirationDelayMs&&(n._expiration_delay_=s.expirationDelayMs),n._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(n,e)),r&&(n._invalidate_on_page_show_=r),this.publishers.get(e)}set(e,s){this.publishers.set(e,s)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==Te.saveId&&e%10!=0))try{if(!Te.changed||Te.saving)return;Te.saving=!0,Te.changed=!1;const s=Array.from(this.publishers.keys());let i=!1;for(const r of s){const n=this.publishers.get(r);if(!n?._is_savable_)continue;const o=n?.get();o&&(this.localStorageData[r+"¤lang_"+qe.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:n._expiration_delay_,data:o},i=!0)}if(i){const r=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(cn,r)}if(Te.saving=!1,Te.changed){Te.saveId++;const r=Te.saveId;setTimeout(()=>this.saveToLocalStorage(r),1e3)}}catch{Te.saving=!1}}async compress(e,s){const i=new TextEncoder().encode(e),r=window,n=new r.CompressionStream(s),o=n.writable.getWriter();o.write(i),o.close();const c=await new Response(n.readable).arrayBuffer(),d=new Uint8Array(c);let b="";for(let k=0;k<d.length;k++)b+=String.fromCharCode(d[k]);return btoa(b)}async decompress(e,s){const i=atob(e),n=Uint8Array.from(i,k=>k.charCodeAt(0)).buffer,o=window,c=new o.DecompressionStream(s),d=c.writable.getWriter();d.write(n),d.close();const b=await new Response(c.readable).arrayBuffer();return new TextDecoder().decode(b)}};Te.buildDate="Wed Sep 30 2026 10:59:09 GMT+0200 (Central European Summer Time)",Te.changed=!1,Te.saving=!1,Te.saveId=0,Te.instance=null,Te.instances=new Map,Te.pageShowHandlerInitialized=!1;let ve=Te;if(typeof window<"u"){const t=window;t[pi+"PublisherManager"]=t[pi+"PublisherManager"]||ve}const Sl=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 Pl(t,e){return{get:function(s,i){if(typeof i=="string"&&Sl.has(i))return t[i];if(i==Symbol.toPrimitive)return()=>e().get();if(!t._proxies_.has(i)){const r=t._value_[i],n=hn(As(r)?r:{__value:r},t,i);n._proxies_.set("_parent_",e()),t._proxies_.set(i,n)}return t._proxies_.get(i)},set:function(s,i,r){if(i=="_value_")return t._value_=r,!0;if(i=="_cachedGet_")return t._cachedGet_=r,!0;if(i=="_assignmentId_")return t._assignmentId_=r,!0;if(i=="_is_savable_")return t._is_savable_=r,!0;if(i=="_expiration_delay_")return t._expiration_delay_=r,!0;if(i=="_invalidate_on_page_show_")return t._invalidate_on_page_show_=r,!0;if(i=="_instanceCounter_")return t._instanceCounter_=r,!0;if(!t._proxies_.has(i)){const o=hn({},t,i);o._proxies_.set("_parent_",e()),t._proxies_.set(i,o)}return t._value_[i]!==r&&(t._value_[i]=r,t._publishDynamicFilling_(i,r),t._proxies_.get(i)?.set(As(r)?r:{__value:r})),!0},deleteProperty:function(s,i){return t._publishDynamicFilling_(i,null),t._proxies_.get(i)?.set(null),delete t._value_[i]},has:function(s,i){return i in t._value_&&i!="_lockInternalMutationPublishing_"},defineProperty:function(s,i,r){return r&&"value"in r&&(t._value_[i]=r.value),!0},getOwnPropertyDescriptor:function(s,i){return{enumerable:!0,configurable:!0}},ownKeys:function(s){return t._value_.__value?Object.keys(t._value_.__value):Object.keys(t._value_)}}}function hn(t,e=null,s){const i=new Lr(t,e,s);let r=null;const n=Pl(i,()=>r);return r=new Proxy(i,n),r}class xl extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=Lr.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(hr+"-publisher-proxy",xl)}catch{}const mi=(t,e)=>{if(typeof t=="function"){const s=t;return ko(),s(),$o()}if(typeof t=="string"){const s=t.split("."),i=s.shift()||"";let r=ve.get(i,e);r=at.traverse(r,s);const n=new Set;return n.add(r),n}return new Set([t])};function Al(t){const e=di(t);return mi(e).values().next().value?.get()}function bi(t,e,s){const i=di(t);return mi(i,s).values().next().value}function Cl(t,e){return Co(e)?bi(t,void 0,e):bi(t)}function vi(t,e){return Co(e)?bi(t,void 0,e):bi(t)}function kl(t,e){const s=di(t);mi(s).values().next().value?.set(e)}let yi=(Oe=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(Oe.observedElements.keys()).forEach(e=>Oe.unObserve(e)))}static observe(e){if(!e||!Oe.enabled||Oe.observedElements.has(e))return;const s=new MutationObserver(Oe.onMutation),i={};i.childList=!0,i.subtree=!0,i.attributes=!0,i.attributeFilter=["data-bind"],s.observe(e,i),e.querySelectorAll("[data-bind]").forEach(r=>Oe.addPublisherListeners(r)),Oe.observedElements.set(e,s)}static unObserve(e){if(!e)return;const s=this.observedElements.get(e);s&&(s.disconnect(),e.querySelectorAll("[data-bind]").forEach(i=>Oe.removePublisherListeners(i)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Oe.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Oe.addPublisherListeners(s)):e.childNodes.forEach(s=>Oe.onAdded(s))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&Oe.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(s=>Oe.removePublisherListeners(s)):e.childNodes.forEach(s=>Oe.onRemoved(s))}static onMutation(e){for(const s of e)switch(s.type){case"attributes":Oe.addPublisherListeners(s.target);break;case"childList":s.addedNodes.forEach(i=>{Oe.onAdded(i)}),s.removedNodes.forEach(i=>{Oe.onRemoved(i)});break}}static removePublisherListeners(e){const s=Oe.publisherListeners.get(e);s&&(Oe.publisherListeners.delete(e),s.forEach(i=>{i.publisher?.offAssign(i.onAssign)}))}static getVariablesDescriptor(e){let s=e.match(/(\$(?:\w+\\?\.?)+)/g);return s?s=s.map(i=>i.replace("$","")):s=[e],s=s.filter(i=>i.length>0),{expression:e.replace("\\",""),variables:s.map(i=>i.split(/\b\.\b/).map(r=>r.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(s=>s.name.indexOf("::")==0).map(s=>({propertyToUpdate:s.name.substring(2).replace(/-((html)|\w)/g,r=>r.substring(1).toUpperCase()),bindedVariablesDescriptor:Oe.getVariablesDescriptor(s.value)})):[]}static getSubPublisher(e,s){if(!s)return e;for(const i of s)if(i!="_self_"){if(!e)return null;e=e[i]}return e}static addPublisherListeners(e){Oe.removePublisherListeners(e);const s=qe.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!s)return;const i=ve.getInstance().get(s),r=Oe.getDataBindItems(e),n=[];r.forEach(o=>{const c=o.bindedVariablesDescriptor,d=o.propertyToUpdate;for(const b of c.variables){const k=b;let g=i;g=Oe.getSubPublisher(i,k);const f=e,A={publisher:g,onAssign:()=>{const E=c.variables.map(U=>Oe.getSubPublisher(i,U)?.get());let O=c.expression,I=!1;if(E.length==1&&c.variables[0].join(".")==O.substring(1)){let U=E[0];U===null&&(U=""),f[d]=U;return}for(let U=0;U<E.length;U++){let S=E[U];const y=c.variables[U];S===null&&(I=!0,S=void 0),O=O.replace("$"+y.join("."),S)}if(O.indexOf("|")!=-1){const U=O.indexOf("|");if(U==0)O=Tr.js(O.substring(1));else{const S=O.substring(0,U),y=O.substring(U+1),N=Tr[S];O=I?"":N?N(y):O}}else O=I?"":O;f[d]=O}};g?.onAssign(A.onAssign),n.push(A)}}),Oe.publisherListeners.set(e,n)}},Oe.observedElements=new Map,Oe.enabled=!0,Oe.publisherListeners=new Map,Oe);yi.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=yi);/**
|
|
2
2
|
* @license
|
|
3
3
|
* Copyright 2017 Google LLC
|
|
4
4
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
@@ -6,77 +6,77 @@
|
|
|
6
6
|
* @license
|
|
7
7
|
* Copyright 2019 Google LLC
|
|
8
8
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const
|
|
9
|
+
*/const wi=globalThis,un=wi.ShadowRoot&&(wi.ShadyCSS===void 0||wi.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,dn=Symbol(),Do=new WeakMap;let pn=class{constructor(e,s,i){if(this._$cssResult$=!0,i!==dn)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=s}get styleSheet(){let e=this.o;const s=this.t;if(un&&e===void 0){const i=s!==void 0&&s.length===1;i&&(e=Do.get(s)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),i&&Do.set(s,e))}return e}toString(){return this.cssText}};const $l=t=>new pn(typeof t=="string"?t:t+"",void 0,dn),ee=(t,...e)=>{const s=t.length===1?t[0]:e.reduce(((i,r,n)=>i+(o=>{if(o._$cssResult$===!0)return o.cssText;if(typeof o=="number")return o;throw Error("Value passed to 'css' function must be a 'css' function result: "+o+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[n+1]),t[0]);return new pn(s,t,dn)},Dl=(t,e)=>{if(un)t.adoptedStyleSheets=e.map((s=>s instanceof CSSStyleSheet?s:s.styleSheet));else for(const s of e){const i=document.createElement("style"),r=wi.litNonce;r!==void 0&&i.setAttribute("nonce",r),i.textContent=s.cssText,t.appendChild(i)}},Eo=un?t=>t:t=>t instanceof CSSStyleSheet?(e=>{let s="";for(const i of e.cssRules)s+=i.cssText;return $l(s)})(t):t;/**
|
|
10
10
|
* @license
|
|
11
11
|
* Copyright 2017 Google LLC
|
|
12
12
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const{is:
|
|
13
|
+
*/const{is:El,defineProperty:Ol,getOwnPropertyDescriptor:Tl,getOwnPropertyNames:Ll,getOwnPropertySymbols:Ml,getPrototypeOf:Nl}=Object,_i=globalThis,Oo=_i.trustedTypes,Il=Oo?Oo.emptyScript:"",Fl=_i.reactiveElementPolyfillSupport,Mr=(t,e)=>t,Si={toAttribute(t,e){switch(e){case Boolean:t=t?Il:null;break;case Object:case Array:t=t==null?t:JSON.stringify(t)}return t},fromAttribute(t,e){let s=t;switch(e){case Boolean:s=t!==null;break;case Number:s=t===null?null:Number(t);break;case Object:case Array:try{s=JSON.parse(t)}catch{s=null}}return s}},fn=(t,e)=>!El(t,e),To={attribute:!0,type:String,converter:Si,reflect:!1,useDefault:!1,hasChanged:fn};Symbol.metadata??=Symbol("metadata"),_i.litPropertyMetadata??=new WeakMap;let ur=class extends HTMLElement{static addInitializer(e){this._$Ei(),(this.l??=[]).push(e)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(e,s=To){if(s.state&&(s.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((s=Object.create(s)).wrapped=!0),this.elementProperties.set(e,s),!s.noAccessor){const i=Symbol(),r=this.getPropertyDescriptor(e,i,s);r!==void 0&&Ol(this.prototype,e,r)}}static getPropertyDescriptor(e,s,i){const{get:r,set:n}=Tl(this.prototype,e)??{get(){return this[s]},set(o){this[s]=o}};return{get:r,set(o){const c=r?.call(this);n?.call(this,o),this.requestUpdate(e,c,i)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??To}static _$Ei(){if(this.hasOwnProperty(Mr("elementProperties")))return;const e=Nl(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Mr("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Mr("properties"))){const s=this.properties,i=[...Ll(s),...Ml(s)];for(const r of i)this.createProperty(r,s[r])}const e=this[Symbol.metadata];if(e!==null){const s=litPropertyMetadata.get(e);if(s!==void 0)for(const[i,r]of s)this.elementProperties.set(i,r)}this._$Eh=new Map;for(const[s,i]of this.elementProperties){const r=this._$Eu(s,i);r!==void 0&&this._$Eh.set(r,s)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const s=[];if(Array.isArray(e)){const i=new Set(e.flat(1/0).reverse());for(const r of i)s.unshift(Eo(r))}else e!==void 0&&s.push(Eo(e));return s}static _$Eu(e,s){const i=s.attribute;return i===!1?void 0:typeof i=="string"?i:typeof e=="string"?e.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise((e=>this.enableUpdating=e)),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach((e=>e(this)))}addController(e){(this._$EO??=new Set).add(e),this.renderRoot!==void 0&&this.isConnected&&e.hostConnected?.()}removeController(e){this._$EO?.delete(e)}_$E_(){const e=new Map,s=this.constructor.elementProperties;for(const i of s.keys())this.hasOwnProperty(i)&&(e.set(i,this[i]),delete this[i]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Dl(e,this.constructor.elementStyles),e}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach((e=>e.hostConnected?.()))}enableUpdating(e){}disconnectedCallback(){this._$EO?.forEach((e=>e.hostDisconnected?.()))}attributeChangedCallback(e,s,i){this._$AK(e,i)}_$ET(e,s){const i=this.constructor.elementProperties.get(e),r=this.constructor._$Eu(e,i);if(r!==void 0&&i.reflect===!0){const n=(i.converter?.toAttribute!==void 0?i.converter:Si).toAttribute(s,i.type);this._$Em=e,n==null?this.removeAttribute(r):this.setAttribute(r,n),this._$Em=null}}_$AK(e,s){const i=this.constructor,r=i._$Eh.get(e);if(r!==void 0&&this._$Em!==r){const n=i.getPropertyOptions(r),o=typeof n.converter=="function"?{fromAttribute:n.converter}:n.converter?.fromAttribute!==void 0?n.converter:Si;this._$Em=r;const c=o.fromAttribute(s,n.type);this[r]=c??this._$Ej?.get(r)??c,this._$Em=null}}requestUpdate(e,s,i){if(e!==void 0){const r=this.constructor,n=this[e];if(i??=r.getPropertyOptions(e),!((i.hasChanged??fn)(n,s)||i.useDefault&&i.reflect&&n===this._$Ej?.get(e)&&!this.hasAttribute(r._$Eu(e,i))))return;this.C(e,s,i)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,s,{useDefault:i,reflect:r,wrapped:n},o){i&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,o??s??this[e]),n!==!0||o!==void 0)||(this._$AL.has(e)||(this.hasUpdated||i||(s=void 0),this._$AL.set(e,s)),r===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(s){Promise.reject(s)}const e=this.scheduleUpdate();return e!=null&&await e,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(const[r,n]of this._$Ep)this[r]=n;this._$Ep=void 0}const i=this.constructor.elementProperties;if(i.size>0)for(const[r,n]of i){const{wrapped:o}=n,c=this[r];o!==!0||this._$AL.has(r)||c===void 0||this.C(r,void 0,n,c)}}let e=!1;const s=this._$AL;try{e=this.shouldUpdate(s),e?(this.willUpdate(s),this._$EO?.forEach((i=>i.hostUpdate?.())),this.update(s)):this._$EM()}catch(i){throw e=!1,this._$EM(),i}e&&this._$AE(s)}willUpdate(e){}_$AE(e){this._$EO?.forEach((s=>s.hostUpdated?.())),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(e)),this.updated(e)}_$EM(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(e){return!0}update(e){this._$Eq&&=this._$Eq.forEach((s=>this._$ET(s,this[s]))),this._$EM()}updated(e){}firstUpdated(e){}};ur.elementStyles=[],ur.shadowRootOptions={mode:"open"},ur[Mr("elementProperties")]=new Map,ur[Mr("finalized")]=new Map,Fl?.({ReactiveElement:ur}),(_i.reactiveElementVersions??=[]).push("2.1.1");/**
|
|
14
14
|
* @license
|
|
15
15
|
* Copyright 2017 Google LLC
|
|
16
16
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
17
|
-
*/const
|
|
17
|
+
*/const Rl={attribute:!0,type:String,converter:Si,reflect:!1,hasChanged:fn},jl=(t=Rl,e,s)=>{const{kind:i,metadata:r}=s;let n=globalThis.litPropertyMetadata.get(r);if(n===void 0&&globalThis.litPropertyMetadata.set(r,n=new Map),i==="setter"&&((t=Object.create(t)).wrapped=!0),n.set(s.name,t),i==="accessor"){const{name:o}=s;return{set(c){const d=e.get.call(this);e.set.call(this,c),this.requestUpdate(o,d,t)},init(c){return c!==void 0&&this.C(o,void 0,t,c),c}}}if(i==="setter"){const{name:o}=s;return function(c){const d=this[o];e.call(this,c),this.requestUpdate(o,d,t)}}throw Error("Unsupported decorator location: "+i)};function h(t){return(e,s)=>typeof s=="object"?jl(t,e,s):((i,r,n)=>{const o=r.hasOwnProperty(n);return r.constructor.createProperty(n,i),o?Object.getOwnPropertyDescriptor(r,n):void 0})(t,e,s)}/**
|
|
18
18
|
* @license
|
|
19
19
|
* Copyright 2017 Google LLC
|
|
20
20
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
21
|
-
*/function
|
|
21
|
+
*/function Ce(t){return h({...t,state:!0,attribute:!1})}/**
|
|
22
22
|
* @license
|
|
23
23
|
* Copyright 2017 Google LLC
|
|
24
24
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
25
|
-
*/const
|
|
25
|
+
*/const gn=(t,e,s)=>(s.configurable=!0,s.enumerable=!0,Reflect.decorate&&typeof e!="object"&&Object.defineProperty(t,e,s),s);/**
|
|
26
26
|
* @license
|
|
27
27
|
* Copyright 2017 Google LLC
|
|
28
28
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
29
|
-
*/function Cs(t,e){return(s,r
|
|
29
|
+
*/function Cs(t,e){return(s,i,r)=>{const n=o=>o.renderRoot?.querySelector(t)??null;return gn(s,i,{get(){return n(this)}})}}/**
|
|
30
30
|
* @license
|
|
31
31
|
* Copyright 2021 Google LLC
|
|
32
32
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
33
|
-
*/function
|
|
33
|
+
*/function Nr(t){return(e,s)=>{const{slot:i,selector:r}=t??{},n="slot"+(i?`[name=${i}]`:":not([name])");return gn(e,s,{get(){const o=this.renderRoot?.querySelector(n),c=o?.assignedElements(t)??[];return r===void 0?c:c.filter((d=>d.matches(r)))}})}}/**
|
|
34
34
|
* @license
|
|
35
35
|
* Copyright 2017 Google LLC
|
|
36
36
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
37
|
-
*/function
|
|
37
|
+
*/function mt(t){return(e,s)=>{const{slot:i}=t??{},r="slot"+(i?`[name=${i}]`:":not([name])");return gn(e,s,{get(){return this.renderRoot?.querySelector(r)?.assignedNodes(t)??[]}})}}/**
|
|
38
38
|
* @license
|
|
39
39
|
* Copyright 2017 Google LLC
|
|
40
40
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
41
|
-
*/const mn=globalThis,Pi=mn.trustedTypes,
|
|
42
|
-
\f\r]`,
|
|
43
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ro=/'/g,
|
|
41
|
+
*/const mn=globalThis,Pi=mn.trustedTypes,Lo=Pi?Pi.createPolicy("lit-html",{createHTML:t=>t}):void 0,Mo="$lit$",ks=`lit$${Math.random().toFixed(9).slice(2)}$`,No="?"+ks,zl=`<${No}>`,Bs=document,Ir=()=>Bs.createComment(""),Fr=t=>t===null||typeof t!="object"&&typeof t!="function",bn=Array.isArray,Ul=t=>bn(t)||typeof t?.[Symbol.iterator]=="function",vn=`[
|
|
42
|
+
\f\r]`,Rr=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Io=/-->/g,Fo=/>/g,Hs=RegExp(`>|${vn}(?:([^\\s"'>=/]+)(${vn}*=${vn}*(?:[^
|
|
43
|
+
\f\r"'\`<>=]|("|')|))|$)`,"g"),Ro=/'/g,jo=/"/g,zo=/^(?:script|style|textarea|title)$/i,ql=t=>(e,...s)=>({_$litType$:t,strings:e,values:s}),j=ql(1),It=Symbol.for("lit-noChange"),te=Symbol.for("lit-nothing"),Uo=new WeakMap,Vs=Bs.createTreeWalker(Bs,129);function qo(t,e){if(!bn(t)||!t.hasOwnProperty("raw"))throw Error("invalid template strings array");return Lo!==void 0?Lo.createHTML(e):e}const Bl=(t,e)=>{const s=t.length-1,i=[];let r,n=e===2?"<svg>":e===3?"<math>":"",o=Rr;for(let c=0;c<s;c++){const d=t[c];let b,k,g=-1,f=0;for(;f<d.length&&(o.lastIndex=f,k=o.exec(d),k!==null);)f=o.lastIndex,o===Rr?k[1]==="!--"?o=Io:k[1]!==void 0?o=Fo:k[2]!==void 0?(zo.test(k[2])&&(r=RegExp("</"+k[2],"g")),o=Hs):k[3]!==void 0&&(o=Hs):o===Hs?k[0]===">"?(o=r??Rr,g=-1):k[1]===void 0?g=-2:(g=o.lastIndex-k[2].length,b=k[1],o=k[3]===void 0?Hs:k[3]==='"'?jo:Ro):o===jo||o===Ro?o=Hs:o===Io||o===Fo?o=Rr:(o=Hs,r=void 0);const A=o===Hs&&t[c+1].startsWith("/>")?" ":"";n+=o===Rr?d+zl:g>=0?(i.push(b),d.slice(0,g)+Mo+d.slice(g)+ks+A):d+ks+(g===-2?c:A)}return[qo(t,n+(t[s]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),i]};let yn=class ml{constructor({strings:e,_$litType$:s},i){let r;this.parts=[];let n=0,o=0;const c=e.length-1,d=this.parts,[b,k]=Bl(e,s);if(this.el=ml.createElement(b,i),Vs.currentNode=this.el.content,s===2||s===3){const g=this.el.content.firstChild;g.replaceWith(...g.childNodes)}for(;(r=Vs.nextNode())!==null&&d.length<c;){if(r.nodeType===1){if(r.hasAttributes())for(const g of r.getAttributeNames())if(g.endsWith(Mo)){const f=k[o++],A=r.getAttribute(g).split(ks),E=/([.?@])?(.*)/.exec(f);d.push({type:1,index:n,name:E[2],strings:A,ctor:E[1]==="."?Vl:E[1]==="?"?Wl:E[1]==="@"?Kl:xi}),r.removeAttribute(g)}else g.startsWith(ks)&&(d.push({type:6,index:n}),r.removeAttribute(g));if(zo.test(r.tagName)){const g=r.textContent.split(ks),f=g.length-1;if(f>0){r.textContent=Pi?Pi.emptyScript:"";for(let A=0;A<f;A++)r.append(g[A],Ir()),Vs.nextNode(),d.push({type:2,index:++n});r.append(g[f],Ir())}}}else if(r.nodeType===8)if(r.data===No)d.push({type:2,index:n});else{let g=-1;for(;(g=r.data.indexOf(ks,g+1))!==-1;)d.push({type:7,index:n}),g+=ks.length-1}n++}}static createElement(e,s){const i=Bs.createElement("template");return i.innerHTML=e,i}};function dr(t,e,s=t,i){if(e===It)return e;let r=i!==void 0?s._$Co?.[i]:s._$Cl;const n=Fr(e)?void 0:e._$litDirective$;return r?.constructor!==n&&(r?._$AO?.(!1),n===void 0?r=void 0:(r=new n(t),r._$AT(t,s,i)),i!==void 0?(s._$Co??=[])[i]=r:s._$Cl=r),r!==void 0&&(e=dr(t,r._$AS(t,e.values),r,i)),e}let Hl=class{constructor(e,s){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=s}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:s},parts:i}=this._$AD,r=(e?.creationScope??Bs).importNode(s,!0);Vs.currentNode=r;let n=Vs.nextNode(),o=0,c=0,d=i[0];for(;d!==void 0;){if(o===d.index){let b;d.type===2?b=new pr(n,n.nextSibling,this,e):d.type===1?b=new d.ctor(n,d.name,d.strings,this,e):d.type===6&&(b=new Yl(n,this,e)),this._$AV.push(b),d=i[++c]}o!==d?.index&&(n=Vs.nextNode(),o++)}return Vs.currentNode=Bs,r}p(e){let s=0;for(const i of this._$AV)i!==void 0&&(i.strings!==void 0?(i._$AI(e,i,s),s+=i.strings.length-2):i._$AI(e[s])),s++}};class pr{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,s,i,r){this.type=2,this._$AH=te,this._$AN=void 0,this._$AA=e,this._$AB=s,this._$AM=i,this.options=r,this._$Cv=r?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const s=this._$AM;return s!==void 0&&e?.nodeType===11&&(e=s.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,s=this){e=dr(this,e,s),Fr(e)?e===te||e==null||e===""?(this._$AH!==te&&this._$AR(),this._$AH=te):e!==this._$AH&&e!==It&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):Ul(e)?this.k(e):this._(e)}O(e){return this._$AA.parentNode.insertBefore(e,this._$AB)}T(e){this._$AH!==e&&(this._$AR(),this._$AH=this.O(e))}_(e){this._$AH!==te&&Fr(this._$AH)?this._$AA.nextSibling.data=e:this.T(Bs.createTextNode(e)),this._$AH=e}$(e){const{values:s,_$litType$:i}=e,r=typeof i=="number"?this._$AC(e):(i.el===void 0&&(i.el=yn.createElement(qo(i.h,i.h[0]),this.options)),i);if(this._$AH?._$AD===r)this._$AH.p(s);else{const n=new Hl(r,this),o=n.u(this.options);n.p(s),this.T(o),this._$AH=n}}_$AC(e){let s=Uo.get(e.strings);return s===void 0&&Uo.set(e.strings,s=new yn(e)),s}k(e){bn(this._$AH)||(this._$AH=[],this._$AR());const s=this._$AH;let i,r=0;for(const n of e)r===s.length?s.push(i=new pr(this.O(Ir()),this.O(Ir()),this,this.options)):i=s[r],i._$AI(n),r++;r<s.length&&(this._$AR(i&&i._$AB.nextSibling,r),s.length=r)}_$AR(e=this._$AA.nextSibling,s){for(this._$AP?.(!1,!0,s);e!==this._$AB;){const i=e.nextSibling;e.remove(),e=i}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class xi{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,s,i,r,n){this.type=1,this._$AH=te,this._$AN=void 0,this.element=e,this.name=s,this._$AM=r,this.options=n,i.length>2||i[0]!==""||i[1]!==""?(this._$AH=Array(i.length-1).fill(new String),this.strings=i):this._$AH=te}_$AI(e,s=this,i,r){const n=this.strings;let o=!1;if(n===void 0)e=dr(this,e,s,0),o=!Fr(e)||e!==this._$AH&&e!==It,o&&(this._$AH=e);else{const c=e;let d,b;for(e=n[0],d=0;d<n.length-1;d++)b=dr(this,c[i+d],s,d),b===It&&(b=this._$AH[d]),o||=!Fr(b)||b!==this._$AH[d],b===te?e=te:e!==te&&(e+=(b??"")+n[d+1]),this._$AH[d]=b}o&&!r&&this.j(e)}j(e){e===te?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class Vl extends xi{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===te?void 0:e}}class Wl extends xi{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==te)}}class Kl extends xi{constructor(e,s,i,r,n){super(e,s,i,r,n),this.type=5}_$AI(e,s=this){if((e=dr(this,e,s,0)??te)===It)return;const i=this._$AH,r=e===te&&i!==te||e.capture!==i.capture||e.once!==i.once||e.passive!==i.passive,n=e!==te&&(i===te||r);r&&this.element.removeEventListener(this.name,this,i),n&&this.element.addEventListener(this.name,this,e),this._$AH=e}handleEvent(e){typeof this._$AH=="function"?this._$AH.call(this.options?.host??this.element,e):this._$AH.handleEvent(e)}}class Yl{constructor(e,s,i){this.element=e,this.type=6,this._$AN=void 0,this._$AM=s,this.options=i}get _$AU(){return this._$AM._$AU}_$AI(e){dr(this,e)}}const Gl={I:pr},Zl=mn.litHtmlPolyfillSupport;Zl?.(yn,pr),(mn.litHtmlVersions??=[]).push("3.3.1");const Jl=(t,e,s)=>{const i=s?.renderBefore??e;let r=i._$litPart$;if(r===void 0){const n=s?.renderBefore??null;i._$litPart$=r=new pr(e.insertBefore(Ir(),n),n,void 0,s??{})}return r._$AI(t),r};/**
|
|
44
44
|
* @license
|
|
45
45
|
* Copyright 2020 Google LLC
|
|
46
46
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
47
|
-
*/const{I:
|
|
47
|
+
*/const{I:Xl}=Gl,Ql=t=>t.strings===void 0,Bo=()=>document.createComment(""),jr=(t,e,s)=>{const i=t._$AA.parentNode,r=e===void 0?t._$AB:e._$AA;if(s===void 0){const n=i.insertBefore(Bo(),r),o=i.insertBefore(Bo(),r);s=new Xl(n,o,t,t.options)}else{const n=s._$AB.nextSibling,o=s._$AM,c=o!==t;if(c){let d;s._$AQ?.(t),s._$AM=t,s._$AP!==void 0&&(d=t._$AU)!==o._$AU&&s._$AP(d)}if(n!==r||c){let d=s._$AA;for(;d!==n;){const b=d.nextSibling;i.insertBefore(d,r),d=b}}}return s},Ws=(t,e,s=t)=>(t._$AI(e,s),t),ec={},tc=(t,e=ec)=>t._$AH=e,sc=t=>t._$AH,wn=t=>{t._$AR(),t._$AA.remove()};/**
|
|
48
48
|
* @license
|
|
49
49
|
* Copyright 2017 Google LLC
|
|
50
50
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
51
|
-
*/const
|
|
51
|
+
*/const Ks={ATTRIBUTE:1,CHILD:2},$s=t=>(...e)=>({_$litDirective$:t,values:e});let fr=class{constructor(e){}get _$AU(){return this._$AM._$AU}_$AT(e,s,i){this._$Ct=e,this._$AM=s,this._$Ci=i}_$AS(e,s){return this.update(e,s)}update(e,s){return this.render(...s)}};/**
|
|
52
52
|
* @license
|
|
53
53
|
* Copyright 2017 Google LLC
|
|
54
54
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
55
|
-
*/const zr=(t,e)=>{const s=t._$AN;if(s===void 0)return!1;for(const
|
|
55
|
+
*/const zr=(t,e)=>{const s=t._$AN;if(s===void 0)return!1;for(const i of s)i._$AO?.(e,!1),zr(i,e);return!0},Ai=t=>{let e,s;do{if((e=t._$AM)===void 0)break;s=e._$AN,s.delete(t),t=e}while(s?.size===0)},Ho=t=>{for(let e;e=t._$AM;t=e){let s=e._$AN;if(s===void 0)e._$AN=s=new Set;else if(s.has(t))break;s.add(t),nc(e)}};function rc(t){this._$AN!==void 0?(Ai(this),this._$AM=t,Ho(this)):this._$AM=t}function ic(t,e=!1,s=0){const i=this._$AH,r=this._$AN;if(r!==void 0&&r.size!==0)if(e)if(Array.isArray(i))for(let n=s;n<i.length;n++)zr(i[n],!1),Ai(i[n]);else i!=null&&(zr(i,!1),Ai(i));else zr(this,t)}const nc=t=>{t.type==Ks.CHILD&&(t._$AP??=ic,t._$AQ??=rc)};class _n extends fr{constructor(){super(...arguments),this._$AN=void 0}_$AT(e,s,i){super._$AT(e,s,i),Ho(this),this.isConnected=e._$AU}_$AO(e,s=!0){e!==this.isConnected&&(this.isConnected=e,e?this.reconnected?.():this.disconnected?.()),s&&(zr(this,e),Ai(this))}setValue(e){if(Ql(this._$Ct))this._$Ct._$AI(e,this);else{const s=[...this._$Ct._$AH];s[this._$Ci]=e,this._$Ct._$AI(s,this,0)}}disconnected(){}reconnected(){}}/**
|
|
56
56
|
* @license
|
|
57
57
|
* Copyright 2017 Google LLC
|
|
58
58
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
59
|
-
*/const
|
|
59
|
+
*/const Sn=globalThis;let J=class extends ur{constructor(){super(...arguments),this.renderOptions={host:this},this._$Do=void 0}createRenderRoot(){const e=super.createRenderRoot();return this.renderOptions.renderBefore??=e.firstChild,e}update(e){const s=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=Jl(s,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return It}};J._$litElement$=!0,J.finalized=!0,Sn.litElementHydrateSupport?.({LitElement:J});const oc=Sn.litElementPolyfillSupport;oc?.({LitElement:J}),(Sn.litElementVersions??=[]).push("4.2.1");function Vo(t){if(t==null||typeof t!="object"||Array.isArray(t))return t;const e={...t};return delete e._sonic_http_response_,e}const Ie=class Ie{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){Ie.tokens.delete(this.serviceURL);return}Ie.invalidTokens.includes(e)||Ie.tokens.set(this.serviceURL,e)}get token(){return Ie.invalidTokens.includes(this._token)?Ie.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(Ie.invalidTokens.includes(e)||(Ie.invalidTokens.push(e),this.token=null))}async handleResult(e,s){Ie.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const i=e.headers.get("content-type")?.toLowerCase(),r=e.status;let n={};if(!i||i.indexOf("text/")==0)n={text:await e.text()};else try{n=await e.json()}catch{n={}}if(this.addHTTPResponse&&at.isObject(n)&&(n._sonic_http_response_=e),r===498&&!Ie.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),s.apiMethod==="get"){const c=await this.get(s.path,s.additionalHeaders);if(c==null)throw new Error("GET retry failed after token refresh");n=c}else n=await this[s.apiMethod](s.path,s.data,s.method,s.additionalHeaders);return vi("sonic-api").lastResponse.set({http:e,processed:n}),n}async auth(){if(this.token)return;if(Ie.tokens.has(this.serviceURL)){this.token=Ie.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 s=new URL(this.serviceURL),i=s.protocol+"//"+s.host,r=await fetch(this.computeURL(this.tokenProvider,{serviceHost:i}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const n=await r.json();n.token?this.token=n.token:Ie.failledTokenUpdates.set(this.serviceURL,!0)}catch{Ie.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,s){const i=ve.get(e),r=new URLSearchParams(s.split("?")[1]||""),n=i.get();let o=[];Array.isArray(n)?o=n:o=[n];const c=[];let d=Number.POSITIVE_INFINITY,b=0,k=0;if(r.has("limit")&&(d=parseInt(r.get("limit")||"0"),k++),r.has("offset")&&(b=parseInt(r.get("offset")||"0"),k++),k>0&&(r.delete("limit"),r.delete("offset")),r.size===0)return o.slice(b,b+d);for(const[g,f]of r.entries()){const A=f.split(",").map(E=>E.trim());for(const E of A)for(const O of o)if(typeof O!="object")isNaN(+O)?O.toString().toLowerCase().includes(f.toLowerCase())&&c.push(O):O===f&&c.push(O);else{const I=O;if(!I[g])continue;isNaN(+I[g])?I[g]?.toString().toLowerCase().includes(E.toLowerCase())&&c.push(O):I[g]===E&&c.push(O)}}return c.slice(b,b+d)}firstCallDone(){return new Promise(e=>{if(!Ie.firstCallDoneFlags.has(this.serviceURL))Ie.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const s=()=>{[void 0,"loading"].includes(Ie.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(s):e(!0)};s()}})}async get(e,s){const i=/dataProvider\((.*?)\)(.*?)$/;if(i.test(e)){this.blockUntilDone&&(await this.firstCallDone(),Ie.firstCallDoneFlags.set(this.serviceURL,"loading"));const b=e.match(i);if(!b)throw new Error("dataProvider path is not valid");return await this.localGet(b[1],b[2])}const r={apiMethod:"get",path:e,additionalHeaders:s},n=await this.createHeaders(s),o=this.computeURL(e),c=JSON.stringify({url:o,headers:n,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),Ie.firstCallDoneFlags.set(this.serviceURL,"loading")),!Ie.loadingGetPromises.has(c)){const b=new Promise(async k=>{try{const g=await fetch(o,{headers:n,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),f=await this.handleResult(g,r);k({processed:f,response:this.lastResult})}catch{Ie.firstCallDoneFlags.set(this.serviceURL,"error"),k(null)}});Ie.loadingGetPromises.set(c,b)}const d=await Ie.loadingGetPromises.get(c);return Ie.loadingGetPromises.delete(c),d?(this.lastResult=d.response,d.processed):null}async getDetailed(e,s){const i=/dataProvider\((.*?)\)(.*?)$/.test(e),r=await this.get(e,s);if(r==null)return;const n=Vo(r),o=this.computeURL(e);if(i)return{request:new Request(o,{method:"GET"}),result:n};const c=await this.createHeaders(s);return{request:new Request(o,{method:"GET",headers:new Headers(c),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:n}}async sendDetailed(e,s,i,r){const n=await this.send(e,s,i,r);if(n==null)return;const o=Vo(n),c=this.computeURL(e),d=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...r});return{request:new Request(c,{method:i,headers:new Headers(d),credentials:this.credentials,body:JSON.stringify(s),keepalive:this.keepAlive}),response:this.lastResult,result:o}}async postDetailed(e,s,i){return this.sendDetailed(e,s,"POST",i)}async putDetailed(e,s,i){return this.sendDetailed(e,s,"PUT",i)}async patchDetailed(e,s,i){return this.sendDetailed(e,s,"PATCH",i)}async createHeaders(e){await this.auth();const s={};return this.token&&(s.Authorization="Bearer "+this.token),s["Accept-Language"]=qe.getLanguage(),e&&Object.assign(s,e),s}computeURL(e,s={}){let i="";e.startsWith("http")?i=e:i=this.serviceURL+"/"+e,i.startsWith("http")||(i=window.location.origin+i);const r=new URL(i);for(const n in s)r.searchParams.set(n,s[n]);return r.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,s,i="POST",r){const n={apiMethod:"send",path:e,additionalHeaders:r,method:i,data:s},o=await this.createHeaders(r);o.Accept="application/json",o["Content-Type"]="application/json";const c=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:i,body:JSON.stringify(s),keepalive:this.keepAlive});return await this.handleResult(c,n)}async submitFormData(e,s,i="POST",r){const n={apiMethod:"submitFormData",path:e,additionalHeaders:r,method:i,data:s},o=await this.createHeaders(r);o.Accept="application/json";const c=new FormData,d=s;for(const k in d)c.set(k,d[k]);const b=await fetch(this.computeURL(e),{headers:o,credentials:this.credentials,method:i,body:c,keepalive:this.keepAlive});return await this.handleResult(b,n)}async put(e,s,i){return this.send(e,s,"PUT",i)}async post(e,s,i){return this.send(e,s,"POST",i)}async patch(e,s,i){return this.send(e,s,"PATCH",i)}async delete(e,s,i){return this.send(e,s,"delete",i)}};Ie.loadingGetPromises=new Map,Ie.tokens=new Map,Ie.invalidTokens=[],Ie.failledTokenUpdates=new Map,Ie.firstCallDoneFlags=new Map;let Ds=Ie;qe.getApiConfiguration(document.body||document.documentElement);const ac=async(t,e)=>{};/**
|
|
60
60
|
* @license
|
|
61
61
|
* Copyright 2017 Google LLC
|
|
62
62
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
63
|
-
*/let
|
|
63
|
+
*/let Pn=class extends fr{constructor(e){if(super(e),this.it=te,e.type!==Ks.CHILD)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(e){if(e===te||e==null)return this._t=void 0,this.it=e;if(e===It)return e;if(typeof e!="string")throw Error(this.constructor.directiveName+"() called with a non-string value");if(e===this.it)return this._t;this.it=e;const s=[e];return s.raw=s,this._t={_$litType$:this.constructor.resultType,strings:s,values:[]}}};Pn.directiveName="unsafeHTML",Pn.resultType=1;const Re=$s(Pn),xn=new Map,Wo=t=>{if(!t)return null;const e=qe.getApiConfiguration(t),s=qe.getAncestorAttributeValue(t,"wordingProvider"),i=qe.getAncestorAttributeValue(t,"wordingVersionProvider"),r={apiConfiguration:e,wordingProvider:s,wordingVersionProvider:i};let n=null;for(const[o,c]of xn)if(at.deepEqual(o,r)){n=c;break}return n||(n={api:new Ds(e),keysToTranslate:new Set,translatedKeys:new Set,wordingProvider:s,callIndex:0,wordingVersionProvider:i,apiCallKey:r},xn.set(r,n)),n},Ko="",He=class He extends _n{constructor(e){super(e),this.useUnsafeHTML=!1,this.onAssign=s=>{const i=this.useUnsafeHTML?Re(s):s;this.setValue(i)},this.node=e.options.host}unsubscribe(){He.publisher["wording_"+this.key].offAssign(this.onAssign)}render(e,s=!1){return this.useUnsafeHTML=s,this.key!==e&&(this.key=e,this.isConnected&&this.subscribe(e)),It}static async callApi(e,s,i=!0,r){if(await ve.getInstance().isLocalStrorageReady,He.firstCall){He.firstCall=!1,ln(He.reloadWordings);const k=Object.keys(He.publisher.get());for(const g of k)He.publisher.get()[g]===Ko&&delete He.publisher[g]}if(e){const k=qe.getAncestorAttributeValue(e,"wordingVersionProvider");k&&vi(k).onAssign(He.handleVersionProvider(e))}let n=He.publisher.get()["wording_"+s]!=null;const o=r||Wo(e);if(!o)return;if(n&&s!==""){o.translatedKeys.add(s);return}o.callIndex++;const c=o.callIndex,d=o.wordingProvider??"";if(!d&&i){window.setTimeout(async()=>{He.callApi(null,s,!1,o)},1e3);return}const b=o.api;window.queueMicrotask(async()=>{if(n=He.publisher["wording_"+s].get()!=null,!n&&s!==""&&(o.keysToTranslate.add(s),He.publisher["wording_"+s].set(Ko)),c!==o.callIndex)return;const k=Array.from(o.keysToTranslate);if(!k.length)return;const g=d.split("?"),f=g.shift(),A=(g.length>0?g.join("?")+"&":"")+"labels[]="+k.join("&labels[]="),E=f+"?"+A;o.translatedKeys=new Set([...o.translatedKeys,...o.keysToTranslate]),o.keysToTranslate.clear();const O=await b.get(E);for(const I in O)He.publisher["wording_"+I].set(O[I])})}static reloadWordings(){for(const e of xn.values())e.keysToTranslate=new Set(e.translatedKeys),e.keysToTranslate.size>0&&He.callApi(null,"",!1,e)}static handleVersionProvider(e){const s=Wo(e),i=n=>{};if(!s)return i;if(He.versionProviderHandlers.has(s))return He.versionProviderHandlers.get(s)||i;const r=function(n){if(!s.wordingVersionProvider)return;const c=He.publisher.get().__wording_versions__??[];if(n==null)return;const d=c.find(b=>b.serviceURL===s.api.serviceURL)||{serviceURL:s.api.serviceURL,version:0};c.includes(d)||c.push(d),n!==d.version&&(d.version=n,He.publisher.set({__wording_versions__:c}),He.reloadWordings())};return He.versionProviderHandlers.set(s,r),r}subscribe(e){this.unsubscribe(),He.publisher["wording_"+e].onAssign(this.onAssign),He.callApi(this.node,e)}disconnected(){this.unsubscribe()}reconnected(){this.key&&this.subscribe(this.key)}};He.publisher=ve.get("sonic-wording",{localStorageMode:"enabled"}),He.firstCall=!0,He.versionProviderHandlers=new Map;let gr=He;const lc=$s(gr);var cc=Object.defineProperty,hc=Object.getOwnPropertyDescriptor,ts=(t,e,s,i)=>{for(var r=i>1?void 0:i?hc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&cc(e,s,r),r};let Ci=!1,An=new Set;const Ct=(t,e)=>{var r;const s=(r=class extends t{constructor(...o){super(),this.collectDependenciesVersion=0,this.displayContents=!1,this.noAutoFill=!1,this.forceAutoFill=!1,this.renderOnPropsInternalChange=!1,this.noShadowDom=null,this.propertyMap=null,this.title="",this.dataProvider=null,this.bindPublisher=null,this._props=null,this.shouldRenderLazy=!0,this.defferedDebug=null,this.debug=null,this.onAssign=c=>{this.props=c}}hasAncestorAttribute(o){return this.getAncestorAttributeValue(o)!=null}getAncestorAttributeValue(o){return qe.getAncestorAttributeValue(this,o)}get props(){return this._props!==null||!this.publisher?this._props:this.publisher.get()}set props(o){typeof o=="string"&&["{","["].includes(o.trim().charAt(0))&&(o=JSON.parse(o)),o!=this._props&&(this._props=o,this.publisher&&this.publisher.get()!=o&&this.publisher.set(o),this.requestUpdate())}updated(o){super.updated(o);const d=[...(this.shadowRoot||this).children].filter(k=>k.tagName!="STYLE"),b=this.displayContents?"contents":d.length==0?"none":null;b?this.style.display=b:this.style.removeProperty("display")}connectedCallback(){if(r.instanceCounter++,this.hasAttribute("lazyRendering")){const o={root:null,threshold:.9};let c=!0;const d=new IntersectionObserver(b=>{for(const k of b)if(c&&k.isIntersecting){c=!1,d.disconnect(),this.initWording(),this.shouldRenderLazy=!1,this.startPublisher();break}},o);d.observe(this)}else this.initWording(),this.shouldRenderLazy=!1;this.initPublisher(),this.addDebugger(),super.connectedCallback()}disconnectedCallback(){this.removeDebugger(),super.disconnectedCallback(),this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate)),gr.publisher.stopTemplateFilling(this),this.onAssign&&this.publisher?.offAssign(this.onAssign)}addDebugger(){if(this.hasAttribute("debug")&&!this.defferedDebug){if(!this.debug){this.debug=document.createElement("div");const o=this.debug.style;o.position="fixed",o.top="0",o.right="0",o.margin="auto",o.borderRadius=".7rem",o.backgroundColor="#0f1729",o.color="#c5d4f9",o.padding="16px 16px",o.margin="16px 16px",o.boxShadow="0 10px 30px -18px rgba(0,0,0,.3)",o.overflowY="auto",o.zIndex="99999999",o.maxHeight="calc(100vh - 32px)",o.fontFamily="Consolas, monospace",o.maxWidth="min(50vw,25rem)",o.fontSize="12px",o.minWidth="300px",o.overflowWrap="break-word",o.resize="vertical"}this.addEventListener("click",o=>{o.ctrlKey&&(o.preventDefault(),Ci=!Ci)}),this.dataProvider&&(window[this.dataProvider]=this.publisher),this.addEventListener("mouseover",()=>{Ci||this.removeDebugger(),document.body.appendChild(this.debug),An.add(this.debug)}),this.addEventListener("mouseout",()=>{Ci||this.removeDebugger()}),this.publisher?.onInternalMutation(()=>{this.debug.innerHTML=`🤖 DataProvider : "<b style="font-weight:bold;color:#fff;">${this.dataProvider}</b>"<br>
|
|
64
64
|
<div style="font-size:10px;border-top:1px dashed;margin-top:5px;padding-left:23px;opacity:.6;padding-top:5px;">
|
|
65
65
|
Variable disponible dans la console<br>
|
|
66
66
|
ctrl + Clique : épingler / désépingler
|
|
67
67
|
</div>
|
|
68
|
-
<pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){Cn.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),Cn=new Set}getApiConfiguration(){return Je.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const c of o)c.indexOf("wording_")==0&&gr.callApi(this,c.substring(8));gr.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return vi.observe(o),o}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const o=be.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let c=this.dataProvider;if(!c&&this._props&&(this.dataProvider=c="__subscriber__"+i.instanceCounter),c){this.bindPublisher&&o.set(c,this.bindPublisher());let h=o.get(c,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=c,this.hasAttribute("subDataProvider")){const b=this.getAttribute("subDataProvider");this.dataProvider=c+"/"+b,h=at.traverse(h,b.split(".")),o.set(this.dataProvider,h),this.publisher=h}this.publisher=h}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},i.instanceCounter=0,i);return es([u({type:Number})],s.prototype,"collectDependenciesVersion",2),es([u({type:Boolean})],s.prototype,"displayContents",2),es([u({type:Boolean})],s.prototype,"noAutoFill",2),es([u({type:Boolean})],s.prototype,"forceAutoFill",2),es([u({type:Object})],s.prototype,"propertyMap",2),es([u({type:String,attribute:"data-title"})],s.prototype,"title",2),es([u({reflect:!0})],s.prototype,"dataProvider",2),es([u()],s.prototype,"bindPublisher",2),es([u()],s.prototype,"props",1),es([Ae()],s.prototype,"shouldRenderLazy",2),s};var pc=Object.defineProperty,fc=(t,e,s,r)=>{for(var i=void 0,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(e,s,i)||i);return i&&pc(e,s,i),i};const Ur=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const r=this.templates||[...this.querySelectorAll("template")];for(const i of r)i.hasAttribute(this.templateValueAttribute)&&(this.templateParts[i.getAttribute(this.templateValueAttribute)]=i,this.templatePartsList.push(i)),i.hasAttribute("skeleton")&&(this.templateParts.skeleton=i),i.hasAttribute("no-result")&&(this.templateParts["no-result"]=i),i.hasAttribute("no-item")&&(this.templateParts["no-item"]=i);this.templateList=r.filter(i=>!i.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=r),super.connectedCallback()}}return fc([u({type:Array})],e.prototype,"templates"),e};var gc=Object.defineProperty,bc=Object.getOwnPropertyDescriptor,Xe=(t,e,s,r)=>{for(var i=r>1?void 0:r?bc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&gc(e,s,i),i};const mc="sonic-date";ln(()=>Re.updateComponentsLanguage());let Re=class extends nt(Ur(J)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){Re.dateCompnents.forEach(t=>t.pageLanguage=Je.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){t||(t="Du %s au %s"),this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite?.split("%s").map(e=>e.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=Je.getLanguage(),Re.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),Re.dateCompnents.delete(this)}getDatesParts(t,e,s){const r=this.startDateObject;r.setTime(t*1e3);let i=[];if(e>0){const n=this.endDateObject;n.setTime(e*1e3);const o=r.toDateString()==n.toDateString();if((!o||this.hide_hours)&&(delete s.hour,delete s.minute),i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(r,n),!o){const h=i.find(b=>b.type=="literal"&&b.source=="shared"&&b.value.trim().length>0);h&&(h.value=" "+this.duAu[1]+" ",h.type="to"),this.designMode||i.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else i=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(r);return this.designMode&&i.forEach(n=>n.value=n.value.replace(/,/g," ")),i[0].value=Tr.ucFirst(i[0].value),i.filter(n=>n.hidden!==!0)}dateStringToSeconds(t){return new Date(t).getTime()/1e3}willUpdate(t){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const e=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=e}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return re;const t={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(t.weekday=this.weekday||"short"),this.hour!=="hidden"&&(t.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(t.minute=this.minute||"2-digit"),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.computedStartDate,this.computedEndDate,t);return je(`${e.map(s=>{const r=this.templateParts[s.type];if(r){const o=document.importNode(r.content,!0).children[0];return o.innerText.trim()==""&&(o.innerText=s.value),o.outerHTML}const i=document.createElement("span");return i.innerText=s.value,i.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};Re.dateCompnents=new Set,Xe([u()],Re.prototype,"wording_billet_periode_validite",1),Xe([u({type:Boolean})],Re.prototype,"designMode",2),Xe([u({type:String})],Re.prototype,"time_zone",2),Xe([u({type:Number})],Re.prototype,"date",2),Xe([u({type:String})],Re.prototype,"date_string",2),Xe([u({type:String})],Re.prototype,"start_date_string",2),Xe([u({type:String})],Re.prototype,"end_date_string",2),Xe([u({type:Number})],Re.prototype,"start_date",2),Xe([u({type:Number})],Re.prototype,"end_date",2),Xe([u({type:Boolean})],Re.prototype,"hide_hours",2),Xe([u({type:String})],Re.prototype,"era",2),Xe([u({type:String})],Re.prototype,"year",2),Xe([u({type:String})],Re.prototype,"month",2),Xe([u({type:String})],Re.prototype,"day",2),Xe([u({type:String})],Re.prototype,"weekday",2),Xe([u({type:String})],Re.prototype,"hour",2),Xe([u({type:Boolean})],Re.prototype,"hour12",2),Xe([u({type:String})],Re.prototype,"minute",2),Xe([u({type:String})],Re.prototype,"language",2),Xe([u({type:Boolean})],Re.prototype,"renderIf",2),Xe([u({type:Boolean})],Re.prototype,"now",2),Re=Xe([X(mc)],Re);let ct=(et=class{static listen(){if(!et.listening)return;const e=document.location?.href.replace(document.location.origin,"");et.prevURL&&et.prevURL!=e&&(et.prevURL=e,et.listeners.forEach(s=>{s.location=e})),window.requestAnimationFrame(et.listen)}static offChange(e){const s=et.listeners.indexOf(e);s!=-1&&(et.listeners.splice(s,1),et.listeners.length==0&&(et.listening=!1))}static onChange(e){et.listening||(et.listening=!0,et.listen()),et.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const s=e.goBack,r=document.referrer;if(s!=null){const b=document.location.origin,k=(s||b).toString(),f=r.indexOf("http")==0?new URL(r).origin!=b:!1,A=r=="",E=history.length<3,O=A&&E,N=k!=document.location.href;if(f&&N||O){const P=history.state||{};P.concorde=P.concorde||{},P.concorde.hasDoneHistoryBack=!0,history.pushState(P,document.title),history.back(),document.location.replace(k)}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 n=new URL(i,document.location.href),o=n.pathname.split("/"),c=[];let h="";for(const b of o)b!=h&&c.push(b),h=b;i="/"+c.join("/")+n.search+(n.hash?+n.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 s=e.href?.toString()||"";if(e.href&&s.indexOf("http")!=0){const r=new URL(s,document.location.href),i=new URL(e.location||"",document.location.origin);let n=!1;e.autoActive=="strict"?n=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?n=r.pathname==i.pathname&&r.hash==i.hash:n=i.href.indexOf(r.href)==0,n?e.setAttribute("active","true"):e.removeAttribute("active")}}},et.listeners=[],et.listening=!1,et.prevURL=document.location?.href.replace(document.location.origin,""),et);/**
|
|
68
|
+
<pre style="margin-top:10px;background:transparent;padding:0;font-size:inherit;color:inherit;">${JSON.stringify(this.publisher?.get(),null," ")}</pre>`})}}removeDebugger(){An.forEach(o=>{document.body.contains(o)&&document.body.removeChild(o)}),An=new Set}getApiConfiguration(){return qe.getApiConfiguration(this)}async initWording(){const o=Object.getOwnPropertyNames(this.constructor.prototype);for(const c of o)c.indexOf("wording_")==0&&gr.callApi(this,c.substring(8));gr.publisher.startTemplateFilling(this)}createRenderRoot(){if(this.noShadowDom===""||this.getAttribute("noShadowDom")==="")return this;const o=super.createRenderRoot();return yi.observe(o),o}initPublisher(){if(!document)return;this.publisher&&(this.publisher.stopTemplateFilling(this),this.publisher.offInternalMutation(this.requestUpdate),this.onAssign&&this.publisher.offAssign(this.onAssign));const o=ve.getInstance();this.dataProvider||(this.dataProvider=this.getAncestorAttributeValue("dataProvider"));let c=this.dataProvider;if(!c&&this._props&&(this.dataProvider=c="__subscriber__"+r.instanceCounter),c){this.bindPublisher&&o.set(c,this.bindPublisher());let d=o.get(c,{localStorageMode:this.getAttribute("localStorage")||"disabled",invalidateOnPageShow:this.hasAttribute("invalidateOnPageShow")});if(this.dataProvider=c,this.hasAttribute("subDataProvider")){const b=this.getAttribute("subDataProvider");this.dataProvider=c+"/"+b,d=at.traverse(d,b.split(".")),o.set(this.dataProvider,d),this.publisher=d}this.publisher=d}this.hasAttribute("lazyRendering")||this.startPublisher()}startPublisher(){this.publisher&&(this._props&&this.publisher.set(this._props),this.noAutoFill||this.publisher.startTemplateFilling(this),this.renderOnPropsInternalChange&&this.publisher.onInternalMutation(this.requestUpdate),this.publisher.onAssign(this.onAssign))}},r.instanceCounter=0,r);return ts([h({type:Number})],s.prototype,"collectDependenciesVersion",2),ts([h({type:Boolean})],s.prototype,"displayContents",2),ts([h({type:Boolean})],s.prototype,"noAutoFill",2),ts([h({type:Boolean})],s.prototype,"forceAutoFill",2),ts([h({type:Object})],s.prototype,"propertyMap",2),ts([h({type:String,attribute:"data-title"})],s.prototype,"title",2),ts([h({reflect:!0})],s.prototype,"dataProvider",2),ts([h()],s.prototype,"bindPublisher",2),ts([h()],s.prototype,"props",1),ts([Ce()],s.prototype,"shouldRenderLazy",2),s};var uc=Object.defineProperty,dc=(t,e,s,i)=>{for(var r=void 0,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(e,s,r)||r);return r&&uc(e,s,r),r};const Ur=t=>{class e extends t{constructor(){super(...arguments),this.templates=null,this.templateValueAttribute="data-value",this.templateList=[],this.templateParts={},this.templatePartsList=[]}connectedCallback(){const i=this.templates||[...this.querySelectorAll("template")];for(const r of i)r.hasAttribute(this.templateValueAttribute)&&(this.templateParts[r.getAttribute(this.templateValueAttribute)]=r,this.templatePartsList.push(r)),r.hasAttribute("skeleton")&&(this.templateParts.skeleton=r),r.hasAttribute("no-result")&&(this.templateParts["no-result"]=r),r.hasAttribute("no-item")&&(this.templateParts["no-item"]=r);this.templateList=i.filter(r=>!r.getAttribute("data-value")),this.templateList.length==0&&(this.templateList=i),super.connectedCallback()}}return dc([h({type:Array})],e.prototype,"templates"),e};var pc=Object.defineProperty,fc=Object.getOwnPropertyDescriptor,Xe=(t,e,s,i)=>{for(var r=i>1?void 0:i?fc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&pc(e,s,r),r};const gc="sonic-date";ln(()=>je.updateComponentsLanguage());let je=class extends Ct(Ur(J)){constructor(){super(...arguments),this.pageLanguage="fr",this.duAu=[],this._wording_billet_periode_validite="",this.designMode=null,this.time_zone=null,this.date=null,this.date_string=null,this.start_date_string=null,this.end_date_string=null,this.start_date=0,this.computedStartDate=0,this.end_date=0,this.computedEndDate=0,this.hide_hours=!1,this.era="",this.year="numeric",this.month="short",this.day="2-digit",this.weekday="short",this.hour="2-digit",this.hour12=!1,this.minute="2-digit",this.language="",this.renderIf=!0,this.now=!1,this.startDateObject=new Date,this.endDateObject=new Date}static updateComponentsLanguage(){je.dateCompnents.forEach(t=>t.pageLanguage=qe.getLanguage())}get wording_billet_periode_validite(){return this._wording_billet_periode_validite}set wording_billet_periode_validite(t){t||(t="Du %s au %s"),this._wording_billet_periode_validite=t,this.duAu=this.wording_billet_periode_validite?.split("%s").map(e=>e.trim()),this.duAu.pop(),this.requestUpdate()}connectedCallback(){this.hasAttribute("wording_billet_periode_validite")||(this.wording_billet_periode_validite="Du %s au %s"),this.pageLanguage=qe.getLanguage(),je.dateCompnents.add(this),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback(),je.dateCompnents.delete(this)}getDatesParts(t,e,s){const i=this.startDateObject;i.setTime(t*1e3);let r=[];if(e>0){const n=this.endDateObject;n.setTime(e*1e3);const o=i.toDateString()==n.toDateString();if((!o||this.hide_hours)&&(delete s.hour,delete s.minute),r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatRangeToParts(i,n),!o){const d=r.find(b=>b.type=="literal"&&b.source=="shared"&&b.value.trim().length>0);d&&(d.value=" "+this.duAu[1]+" ",d.type="to"),this.designMode||r.unshift({type:"from",value:this.duAu[0]+" ",source:"shared"})}}else r=new Intl.DateTimeFormat(this.language||this.pageLanguage,s).formatToParts(i);return this.designMode&&r.forEach(n=>n.value=n.value.replace(/,/g," ")),r[0].value=Tr.ucFirst(r[0].value),r.filter(n=>n.hidden!==!0)}dateStringToSeconds(t){return new Date(t).getTime()/1e3}willUpdate(t){if(this.computedStartDate=0,this.computedEndDate=0,this.date_string&&(this.date=this.dateStringToSeconds(this.date_string)),this.date&&(this.computedStartDate=this.date),this.start_date_string&&(this.computedStartDate=this.dateStringToSeconds(this.start_date_string)),this.end_date_string&&(this.end_date=this.dateStringToSeconds(this.end_date_string)),this.start_date&&(this.computedStartDate=this.start_date),!(!this.computedStartDate&&!this.now&&!this.end_date)&&(this.computedStartDate||(this.computedStartDate=Date.now()/1e3),this.end_date&&(this.computedEndDate=this.end_date),this.computedEndDate>0&&this.computedEndDate<this.computedStartDate)){const e=this.computedStartDate;this.computedStartDate=this.computedEndDate,this.computedEndDate=e}}render(){if(!this.renderIf||!this.computedStartDate&&!this.now&&!this.computedEndDate)return te;const t={year:this.year||"numeric",month:this.month||"short",day:this.day||"2-digit",hour12:this.hour12||!1};this.weekday!=="hidden"&&(t.weekday=this.weekday||"short"),this.hour!=="hidden"&&(t.hour=this.hour||"2-digit"),this.minute!=="hidden"&&(t.minute=this.minute||"2-digit"),this.era&&(t.era=this.era),this.time_zone&&(t.timeZone=this.time_zone);const e=this.getDatesParts(this.computedStartDate,this.computedEndDate,t);return Re(`${e.map(s=>{const i=this.templateParts[s.type];if(i){const o=document.importNode(i.content,!0).children[0];return o.innerText.trim()==""&&(o.innerText=s.value),o.outerHTML}const r=document.createElement("span");return r.innerText=s.value,r.className=s.type,`<span class="${s.type}">${s.value}</span>`}).join("")}`)}};je.dateCompnents=new Set,Xe([h()],je.prototype,"wording_billet_periode_validite",1),Xe([h({type:Boolean})],je.prototype,"designMode",2),Xe([h({type:String})],je.prototype,"time_zone",2),Xe([h({type:Number})],je.prototype,"date",2),Xe([h({type:String})],je.prototype,"date_string",2),Xe([h({type:String})],je.prototype,"start_date_string",2),Xe([h({type:String})],je.prototype,"end_date_string",2),Xe([h({type:Number})],je.prototype,"start_date",2),Xe([h({type:Number})],je.prototype,"end_date",2),Xe([h({type:Boolean})],je.prototype,"hide_hours",2),Xe([h({type:String})],je.prototype,"era",2),Xe([h({type:String})],je.prototype,"year",2),Xe([h({type:String})],je.prototype,"month",2),Xe([h({type:String})],je.prototype,"day",2),Xe([h({type:String})],je.prototype,"weekday",2),Xe([h({type:String})],je.prototype,"hour",2),Xe([h({type:Boolean})],je.prototype,"hour12",2),Xe([h({type:String})],je.prototype,"minute",2),Xe([h({type:String})],je.prototype,"language",2),Xe([h({type:Boolean})],je.prototype,"renderIf",2),Xe([h({type:Boolean})],je.prototype,"now",2),je=Xe([X(gc)],je);let ct=(tt=class{static listen(){if(!tt.listening)return;const e=document.location?.href.replace(document.location.origin,"");tt.prevURL&&tt.prevURL!=e&&(tt.prevURL=e,tt.listeners.forEach(s=>{s.location=e})),window.requestAnimationFrame(tt.listen)}static offChange(e){const s=tt.listeners.indexOf(e);s!=-1&&(tt.listeners.splice(s,1),tt.listeners.length==0&&(tt.listening=!1))}static onChange(e){tt.listening||(tt.listening=!0,tt.listen()),tt.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const s=e.goBack,i=document.referrer;if(s!=null){const b=document.location.origin,k=(s||b).toString(),f=i.indexOf("http")==0?new URL(i).origin!=b:!1,A=i=="",E=history.length<3,O=A&&E,I=k!=document.location.href;if(f&&I||O){const S=history.state||{};S.concorde=S.concorde||{},S.concorde.hasDoneHistoryBack=!0,history.pushState(S,document.title),history.back(),document.location.replace(k)}else history.back();return}let r=e.getAttribute("to")||"";if(r||(r=e.href?.toString()||""),!r)return;if(r.indexOf("#")==0){document.location.hash=r.substring(1);return}const n=new URL(r,document.location.href),o=n.pathname.split("/"),c=[];let d="";for(const b of o)b!=d&&c.push(b),d=b;r="/"+c.join("/")+n.search+(n.hash?+n.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",r):e.hasAttribute("replaceState")?history.replaceState(null,"",r):document.location.href=r}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const s=e.href?.toString()||"";if(e.href&&s.indexOf("http")!=0){const i=new URL(s,document.location.href),r=new URL(e.location||"",document.location.origin);let n=!1;e.autoActive=="strict"?n=i.pathname==r.pathname&&i.hash==r.hash&&i.search==r.search:e.autoActive=="strict-path-only"?n=i.pathname==r.pathname&&i.hash==r.hash:n=r.href.indexOf(i.href)==0,n?e.setAttribute("active","true"):e.removeAttribute("active")}}},tt.listeners=[],tt.listening=!1,tt.prevURL=document.location?.href.replace(document.location.origin,""),tt);/**
|
|
69
69
|
* @license
|
|
70
70
|
* Copyright 2018 Google LLC
|
|
71
71
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
72
|
-
*/const Go="important",vc=" !"+Go,$t=$s(class extends fr{constructor(t){if(super(t),t.type!==Ys.ATTRIBUTE||t.name!=="style"||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const r=t[s];return r==null?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${r};`}),"")}update(t,[e]){const{style:s}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const r of this.ft)e[r]==null&&(this.ft.delete(r),r.includes("-")?s.removeProperty(r):s[r]=null);for(const r in e){const i=e[r];if(i!=null){this.ft.add(r);const n=typeof i=="string"&&i.endsWith(vc);r.includes("-")||n?s.setProperty(r,n?i.slice(0,-11):i,n?Go:""):s[r]=i}}return Nt}});var yc=Object.defineProperty,wc=Object.getOwnPropertyDescriptor,ts=(t,e,s,r)=>{for(var i=r>1?void 0:r?wc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&yc(e,s,i),i};const Ci=new Map,br=t=>{class e extends t{constructor(...r){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.formDataProvider="",this._name="",this._value="",this.onValueAssign=i=>{this.setValueFromPublisher(i)},this.onFormValueAssign=async i=>{this.setFormValueFromPublisher(i)},this.onFormDataInValidate=()=>{const i=this.getFormPublisher();i&&i.isFormValid.get()&&this.validateFormElement()}}get name(){return this._name}set name(r){this.hasAttribute("name")&&!this.forceAutoFill&&(r=this.getAttribute("name")),this._name=r,this.requestUpdate()}validateFormElement(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}updateDataValue(){this.getAttribute("name")&&this.getFormPublisher()&&(this.setFormPublisherValue(this.getValueForFormPublisher()),this.setFormValueFromPublisher(this.getFormPublisherValue()))}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")),this.formDataProvider?be.get(this.formDataProvider):null}setFormPublisherValue(r){const i=this.getFormPublisher();i&&kt(i,this.name).set(r)}getFormPublisherValue(){const r=this.getFormPublisher();return r?kt(r,this.name).get():null}getValueForFormPublisher(){return this.value}setValueFromPublisher(r){this.value=r}setFormValueFromPublisher(r){this.value=r}get value(){return this._value}set value(r){r==null&&(r=""),at.isObject(r)&&Object.prototype.hasOwnProperty.call(r,"__value")&&r._value==null&&(r=""),this._value!=r&&(this._value=r,this.updateDataValue(),this.requestUpdate())}initPublisher(){let r=this.getFormPublisher();const i=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&this.publisher&&kt(this.publisher,this._name).offAssign(this.onValueAssign),this._name&&r&&kt(r,this._name).offAssign(this.onFormValueAssign),super.initPublisher(),this.name||(this._name=this.getAttribute("name")),this.value||(this._value=this.getAttribute("value")),this.publisher&&this._name&&kt(this.publisher,this._name).onAssign(this.onValueAssign),r=this.getFormPublisher(),this._name&&r&&(kt(r,this._name).onAssign(this.onFormValueAssign),r.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),i&&(this.value=i)}handleBlur(){this.touched=!0}handleChange(r){this.value=r.target.value;const i=new Event("change");this.dispatchEvent(i)}addKeyboardNavigation(){const r=this.getAncestorAttributeValue("data-keyboard-nav");if(!r)return;const i=r.split(" "),n=i[0];if(!n)return;for(const c of i){Ci.has(c)||Ci.set(c,[]);const h=Ci.get(c);h?.indexOf(this)==-1&&h.push(this)}const o=Ci.get(n);this.addEventListener("keydown",c=>{const h=c;if(!["ArrowDown","ArrowUp"].includes(h.key))return;const b="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",k=o?.filter(A=>{const E=A.shadowRoot?.querySelector(b);if(!E)return!1;const O=window.getComputedStyle(E);return O.display!=="none"&&O.display!==""&&O.pointerEvents!="none"&&O.visibility!=="hidden"&&E.getBoundingClientRect().width>0});let g=null;if(h.key=="ArrowDown"&&k){const A=k.indexOf(this);A==k.length-1?g=k[0]:g=k[A+1]}else if(h.key=="ArrowUp"&&k){const A=k.indexOf(this);A==0?g=k[k.length-1]:g=k[A-1]}const f=g?.shadowRoot?.querySelector(b);f&&f.focus&&(f.focus(),c.preventDefault(),c.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"),super.connectedCallback(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback(),this._name&&this.publisher&&kt(this.publisher,this._name).offAssign(this.onValueAssign);const r=this.getFormPublisher();this._name&&r&&(kt(r,this._name).offAssign(this.onFormValueAssign),r.offFormInvalidate(this.onFormDataInValidate))}}return ts([u({type:Boolean,reflect:!0})],e.prototype,"touched",2),ts([u({type:Boolean})],e.prototype,"error",2),ts([u({type:Boolean})],e.prototype,"autofocus",2),ts([u({type:Boolean})],e.prototype,"required",2),ts([u({type:Boolean})],e.prototype,"forceAutoFill",2),ts([u({type:Boolean,reflect:!0})],e.prototype,"disabled",2),ts([u({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),ts([u({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),ts([u()],e.prototype,"name",1),ts([u()],e.prototype,"value",1),e};let _c=class cr{static areEqual(e,s){return e.length===s.length?e.every((r,i)=>r===s[i]):!1}static from2d(e){return{to1D:()=>{let s=[];return e.forEach(r=>s=s.concat(r)),this.from(s)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(e.length<1)return!0;const r=(e[0]||{})[s];return e.every(i=>(i||{})[s]==r)}})})}),value:()=>({forKey:s=>cr.from(e.map(r=>r[s]))}),copy:()=>({fromKey:s=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[s])?[...i[s]]:typeof i[s]=="object"&&i[s]!=null?{...i[s]}:i[s]})}})})}),map:s=>cr.from(e.map(s)),filter:s=>cr.from(e.filter(s)),find:s=>e.find(s),some:s=>e.some(s),every:s=>e.every(s),group:()=>({byKey:s=>{const r=[],i=new Map;for(const n of e){const o=n[s];if(!i.has(o)){const c=r.length;i.set(o,c);const h={items:[]};h[s]=o,r.push(h)}r[i.get(o)].items.push(n)}return cr.from(r)}}),without:()=>({duplicates:()=>({forKey:s=>{const r=[...new Set(e.map(i=>i[s]))];return cr.from(r.map(i=>e.find(n=>n[s]==i)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:r=>{const i=(n,o)=>c=>n[o]!=c[o];return cr.from(e.filter(n=>s.every(i(n,r))))}})})})}}};var Zo=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qr={exports:{}},Pc=qr.exports,Xo;function xc(){return Xo||(Xo=1,(function(t,e){var s=[].slice;(function(r,i){return e!==null?t.exports=i():r.UrlPattern=i()})(Pc,function(){var r,i,n,o,c,h,b,k,g,f,A,E,O,N,U;return g=function(P){return P.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},b=function(P,y){var I,C,$;for($=[],I=-1,C=P.length;++I<C;)$=$.concat(y(P[I]));return $},N=function(P,y){var I,C,$;for($="",I=-1,C=P.length;++I<C;)$+=y(P[I]);return $},O=function(P){return new RegExp(P.toString()+"|").exec("").length-1},A=function(P,y){var I,C,$,G,z;for(G={},I=-1,$=P.length;++I<$;)C=P[I],z=y[I],z!=null&&(G[C]!=null?(Array.isArray(G[C])||(G[C]=[G[C]]),G[C].push(z)):G[C]=z);return G},r={},r.Result=function(P,y){this.value=P,this.rest=y},r.Tagged=function(P,y){this.tag=P,this.value=y},r.tag=function(P,y){return function(I){var C,$;if(C=y(I),C!=null)return $=new r.Tagged(P,C.value),new r.Result($,C.rest)}},r.regex=function(P){return function(y){var I,C;if(I=P.exec(y),I!=null)return C=I[0],new r.Result(C,y.slice(C.length))}},r.sequence=function(){var P;return P=1<=arguments.length?s.call(arguments,0):[],function(y){var I,C,$,G,z,ne;for(I=-1,C=P.length,ne=[],G=y;++I<C;){if($=P[I],z=$(G),z==null)return;ne.push(z.value),G=z.rest}return new r.Result(ne,G)}},r.pick=function(){var P,y;return P=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],function(I){var C,$;if($=r.sequence.apply(r,y)(I),$!=null)return C=$.value,$.value=C[P],$}},r.string=function(P){var y;return y=P.length,function(I){if(I.slice(0,y)===P)return new r.Result(P,I.slice(y))}},r.lazy=function(P){var y;return y=null,function(I){return y==null&&(y=P()),y(I)}},r.baseMany=function(P,y,I,C,$){var G,z,ne,se;for(ne=$,se=I?"":[];!(y!=null&&(G=y(ne),G!=null)||(z=P(ne),z==null));)I?se+=z.value:se.push(z.value),ne=z.rest;if(!(C&&se.length===0))return new r.Result(se,ne)},r.many1=function(P){return function(y){return r.baseMany(P,null,!1,!0,y)}},r.concatMany1Till=function(P,y){return function(I){return r.baseMany(P,y,!0,!0,I)}},r.firstChoice=function(){var P;return P=1<=arguments.length?s.call(arguments,0):[],function(y){var I,C,$,G;for(I=-1,C=P.length;++I<C;)if($=P[I],G=$(y),G!=null)return G}},E=function(P){var y;return y={},y.wildcard=r.tag("wildcard",r.string(P.wildcardChar)),y.optional=r.tag("optional",r.pick(1,r.string(P.optionalSegmentStartChar),r.lazy(function(){return y.pattern}),r.string(P.optionalSegmentEndChar))),y.name=r.regex(new RegExp("^["+P.segmentNameCharset+"]+")),y.named=r.tag("named",r.pick(1,r.string(P.segmentNameStartChar),r.lazy(function(){return y.name}))),y.escapedChar=r.pick(1,r.string(P.escapeChar),r.regex(/^./)),y.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return y.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(P.segmentNameStartChar),r.string(P.optionalSegmentStartChar),r.string(P.optionalSegmentEndChar),y.wildcard))),y.token=r.lazy(function(){return r.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=r.many1(r.lazy(function(){return y.token})),y},k={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},h=function(P,y){if(Array.isArray(P))return N(P,function(I){return h(I,y)});switch(P.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return g(P.value);case"optional":return"(?:"+h(P.value,y)+")?"}},c=function(P,y){return y==null&&(y=k.segmentValueCharset),"^"+h(P,y)+"$"},o=function(P){if(Array.isArray(P))return b(P,o);switch(P.tag){case"wildcard":return["_"];case"named":return[P.value];case"static":return[];case"optional":return o(P.value)}},f=function(P,y,I,C){var $,G,z,ne;if(C==null&&(C=!1),ne=P[y],ne==null){if(C)throw new Error("no values provided for key `"+y+"`");return}if($=I[y]||0,G=Array.isArray(ne)?ne.length-1:0,$>G){if(C)throw new Error("too few values provided for key `"+y+"`");return}return z=Array.isArray(ne)?ne[$]:ne,C&&(I[y]=$+1),z},n=function(P,y,I){var C,$;if(Array.isArray(P)){for(C=-1,$=P.length;++C<$;)if(n(P[C],y,I))return!0;return!1}switch(P.tag){case"wildcard":return f(y,"_",I,!1)!=null;case"named":return f(y,P.value,I,!1)!=null;case"static":return!1;case"optional":return n(P.value,y,I)}},U=function(P,y,I){if(Array.isArray(P))return N(P,function(C){return U(C,y,I)});switch(P.tag){case"wildcard":return f(y,"_",I,!0);case"named":return f(y,P.value,I,!0);case"static":return P.value;case"optional":return n(P.value,y,I)?U(P.value,y,I):""}},i=function(P,y){var I,C,$,G,z;if(P instanceof i){this.isRegex=P.isRegex,this.regex=P.regex,this.ast=P.ast,this.names=P.names;return}if(this.isRegex=P instanceof RegExp,!(typeof P=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=P,y!=null){if(!Array.isArray(y))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(I=O(this.regex),y.length!==I)throw new Error("regex contains "+I+" groups but array of group names contains "+y.length);this.names=y}return}if(P==="")throw new Error("argument must not be the empty string");if(z=P.replace(/\s+/g,""),z!==P)throw new Error("argument must not contain whitespace");if(C={escapeChar:y?.escapeChar||k.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||k.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||k.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||k.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||k.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||k.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||k.wildcardChar},G=E(C),$=G.pattern(P),$==null)throw new Error("couldn't parse pattern");if($.rest!=="")throw new Error("could only partially parse pattern");this.ast=$.value,this.regex=new RegExp(c(this.ast,C.segmentValueCharset)),this.names=o(this.ast)},i.prototype.match=function(P){var y,I;return I=this.regex.exec(P),I==null?null:(y=I.slice(1),this.names?A(this.names,y):y)},i.prototype.stringify=function(P){if(P==null&&(P={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(P!==Object(P))throw new Error("argument must be an object or undefined");return U(this.ast,P,{})},i.escapeForRegex=g,i.concatMap=b,i.stringConcatMap=N,i.regexGroupCount=O,i.keysAndValuesToObject=A,i.P=r,i.newParser=E,i.defaultOptions=k,i.astNodeToRegexString=c,i.astNodeToNames=o,i.getParam=f,i.astNodeContainsSegmentsForProvidedParams=n,i.stringify=U,i})})(qr,qr.exports)),qr.exports}var Sc=xc();const ps=Jo(Sc);class ki{constructor(e){this.path=ki.normalizePath(e)}getDataProviderKey(){return new Ss(this.path)}static normalizePath(e){const s=String(e).trim();if(!s)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(s)){let h;try{h=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return h.pathname=h.pathname.replace(/\/+/g,"/"),h.href}const r=s.indexOf("?"),i=s.indexOf("#");let n=s.length;r>=0&&(n=Math.min(n,r)),i>=0&&(n=Math.min(n,i));let o=s.slice(0,n);const c=s.slice(n);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&c)throw new RangeError("Endpoint: path cannot be empty");return o+c}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}const Ac=50,Cc=1e4,kc=100,kn=new Map;function $i(t){return di(t)}function Vr(t){return t.split(".")[0]??t}function Di(t){const e=t.split("."),s=e.shift();let r=be.get(s);return e.length&&(r=at.traverse(r,e)),r}function $c(t){return t==null?!0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.length===0:!1}function Dc(t){return Array.isArray(t)?t.length:0}function Ec(t,e){for(const o of e)if(o===t||t.startsWith(o+".")||o.startsWith(t+"."))throw new Error(`[derive] Cycle détecté : la sortie "${t}" chevauche l'entrée "${o}".`);const s=Vr(t),r=new Map;for(const[o,c]of kn)r.set(Vr(o),new Set(c));r.set(s,new Set(e.map(Vr)));const i=new Set,n=o=>{if(i.has(o))return!0;i.add(o);for(const c of r.get(o)??[])if(n(c))return!0;return i.delete(o),!1};if(n(s))throw new Error(`[derive] Cycle détecté (chaîne) : la sortie "${t}" dépend indirectement d'elle-même.`)}function Oc(t,e){kn.set(t,new Set(e.map(s=>Vr(s))))}function Tc(t){kn.delete(t)}function Lc(t){return`${Vr($i(t))}/_state_`}function Ei(t,e){const s=Lc(t);be.get(s).set(e)}function Mc(t,e,s,r){const i=typeof t.compute=="function"?t:{inputs:t,compute:e,output:s,variables:r},n=i.debounceMs??Ac,o=i.maxInputItems??Cc,c=i.isEmpty??$c,h=$i(i.output),b=Object.entries(i.inputs).map(([ie,q])=>({alias:ie,path:$i(q)})),k=b.map(ie=>ie.path),g=i.variables?$i(i.variables):null;Ec(h,k),Oc(h,k);const f=Di(h);let A,E=!1,O=0,N=null,U=!1,P="";const y=ie=>{E=!0,A=ie,f.set(ie),E=!1},I=()=>{E||U||(typeof console<"u"&&console.warn&&console.warn(`[derive] Écriture ignorée sur la sortie readonly "${h}".`),A!==void 0&&(E=!0,f.set(A),E=!1))};f.onAssign(I,!1);const C=()=>{const ie={};for(const{alias:q,path:le}of b){const pe=Di(le).get(),Ue=Dc(pe);Ue>o&&typeof console<"u"&&console.warn&&console.warn(`[derive] Entrée "${le}" : ${Ue} éléments (> ${o}). Agrégation lourde — envisager un plafond côté fetch.`),ie[q]=pe}return ie},$=()=>g?Di(g).get()??{}:{},G=async()=>{if(U)return;const ie=++O;Ei(h,{status:"loading",error:null});const q=C(),le=$(),pe=JSON.stringify({inputs:q,vars:le});if(pe===P&&A!==void 0){Ei(h,{status:c(A)?"empty":"ready",error:null});return}const Ue=typeof performance<"u"?performance.now():Date.now();try{const ue=await Promise.resolve(i.compute(q,le));if(U||ie!==O)return;const me=(typeof performance<"u"?performance.now():Date.now())-Ue;me>kc&&typeof console<"u"&&console.warn&&console.warn(`[derive] Évaluation longue (${Math.round(me)} ms) → "${h}".`),P=pe,y(ue),Ei(h,{status:c(ue)?"empty":"ready",error:null})}catch(ue){if(U||ie!==O)return;const me=ue instanceof Error?ue.message:String(ue);typeof console<"u"&&console.error&&console.error(`[derive] Erreur sur "${h}" :`,me),Ei(h,{status:"error",error:me})}},z=()=>{U||(N&&clearTimeout(N),N=setTimeout(()=>{N=null,G()},n))},ne=[],se=ie=>{const q=Di(ie),le=()=>z();q.onInternalMutation(le),ne.push({pub:q,handler:le})};for(const{path:ie}of b)se(ie);return g&&se(g),z(),{stop(){if(!U){U=!0,N&&clearTimeout(N);for(const{pub:ie,handler:q}of ne)ie.offInternalMutation(q);f.offAssign(I),Tc(h)}},recompute(){P="",G()}}}function Oi(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $n={exports:{}},Qo;function Ic(){return Qo||(Qo=1,(function(t,e){(function(s){t.exports=s()})(function(){return(function(){function s(r,i,n){function o(b,k){if(!i[b]){if(!r[b]){var g=typeof Oi=="function"&&Oi;if(!k&&g)return g(b,!0);if(c)return c(b,!0);var f=new Error("Cannot find module '"+b+"'");throw f.code="MODULE_NOT_FOUND",f}var A=i[b]={exports:{}};r[b][0].call(A.exports,function(E){var O=r[b][1][E];return o(O||E)},A,A.exports,s,r,i,n)}return i[b].exports}for(var c=typeof Oi=="function"&&Oi,h=0;h<n.length;h++)o(n[h]);return o}return s})()({1:[function(s,r,i){const n=s("./utils"),o=(function(){const c=n.stringToArray,h=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],b=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],k=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],g=["Thousand","Million","Billion","Trillion"];function f(T,M){var D=function(V,H,F){var Y="";if(V<=19)Y=(H?" and ":"")+(F?b[V]:h[V]);else if(V<100){const xe=Math.floor(V/10),ge=V%10;Y=(H?" and ":"")+k[xe-2],ge>0?Y+="-"+D(ge,!1,F):F&&(Y=Y.substring(0,Y.length-1)+"ieth")}else if(V<1e3){const xe=Math.floor(V/100),ge=V%100;Y=(H?", ":"")+h[xe]+" Hundred",ge>0?Y+=D(ge,!0,F):F&&(Y+="th")}else{var ae=Math.floor(Math.log10(V)/3);ae>g.length&&(ae=g.length);const xe=Math.pow(10,ae*3),ge=Math.floor(V/xe),fe=V-ge*xe;Y=(H?", ":"")+D(ge,!1,!1)+" "+g[ae-1],fe>0?Y+=D(fe,!0,F):F&&(Y+="th")}return Y},j=D(T,!1,M);return j}const A=Object.create(null);h.forEach(function(T,M){A[T.toLowerCase()]=M}),b.forEach(function(T,M){A[T.toLowerCase()]=M}),k.forEach(function(T,M){const D=T.toLowerCase();A[D]=(M+2)*10,A[D.substring(0,T.length-1)+"ieth"]=A[D]}),A.hundredth=100,g.forEach(function(T,M){const D=T.toLowerCase(),j=Math.pow(10,(M+1)*3);A[D]=j,A[D+"th"]=j});function E(T){const D=T.split(/,\s|\sand\s|[\s\\-]/).map(H=>A[H]);let j=[0];return D.forEach(H=>{if(H<100){let F=j.pop();F>=1e3&&(j.push(F),F=0),j.push(F+H)}else j.push(j.pop()*H)}),j.reduce((H,F)=>H+F,0)}const O=[[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"]],N={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function U(T){for(var M=0;M<O.length;M++){const D=O[M];if(T>=D[0])return D[1]+U(T-D[0])}return""}function P(T){for(var M=0,D=1,j=T.length-1;j>=0;j--){const V=T[j],H=N[V];H<D?M-=H:(D=H,M+=H)}return M}function y(T,M){for(var D=[],j=M.charCodeAt(0);T>0;)D.unshift(String.fromCharCode((T-1)%26+j)),T=Math.floor((T-1)/26);return D.join("")}function I(T,M){for(var D=M.charCodeAt(0),j=0,V=0;V<T.length;V++)j+=(T.charCodeAt(T.length-V-1)-D+1)*Math.pow(26,V);return j}function C(T,M){if(typeof T>"u")return;T=Math.floor(T);const D=se(M);return z(T,D)}const $={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},G={UPPER:"upper",LOWER:"lower",TITLE:"title"};function z(T,M){let D;const j=T<0;switch(T=Math.abs(T),M.primary){case $.LETTERS:D=y(T,M.case===G.UPPER?"A":"a");break;case $.ROMAN:D=U(T),M.case===G.UPPER&&(D=D.toUpperCase());break;case $.WORDS:D=f(T,M.ordinal),M.case===G.UPPER?D=D.toUpperCase():M.case===G.LOWER&&(D=D.toLowerCase());break;case $.DECIMAL:D=""+T;var V=M.mandatoryDigits-D.length;if(V>0){var H=new Array(V+1).join("0");D=H+D}if(M.zeroCode!==48&&(D=c(D).map(xe=>String.fromCodePoint(xe.codePointAt(0)+M.zeroCode-48)).join("")),M.regular){const xe=Math.floor((D.length-1)/M.groupingSeparators.position);for(let ge=xe;ge>0;ge--){const fe=D.length-ge*M.groupingSeparators.position;D=D.substr(0,fe)+M.groupingSeparators.character+D.substr(fe)}}else M.groupingSeparators.reverse().forEach(xe=>{const ge=D.length-xe.position;D=D.substr(0,ge)+xe.character+D.substr(ge)});if(M.ordinal){var F={1:"st",2:"nd",3:"rd"},Y=D[D.length-1],ae=F[Y];(!ae||D.length>1&&D[D.length-2]==="1")&&(ae="th"),D=D+ae}break;case $.SEQUENCE:throw{code:"D3130",value:M.token}}return j&&(D="-"+D),D}const ne=[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 se(T){const M={type:"integer",primary:$.DECIMAL,case:G.LOWER,ordinal:!1};let D,j;const V=T.lastIndexOf(";");switch(V===-1?D=T:(D=T.substring(0,V),j=T.substring(V+1),j[0]==="o"&&(M.ordinal=!0)),D){case"A":M.case=G.UPPER;case"a":M.primary=$.LETTERS;break;case"I":M.case=G.UPPER;case"i":M.primary=$.ROMAN;break;case"W":M.case=G.UPPER,M.primary=$.WORDS;break;case"Ww":M.case=G.TITLE,M.primary=$.WORDS;break;case"w":M.primary=$.WORDS;break;default:{let H=null,F=0,Y=0,ae=[],xe=0;if(c(D).map(fe=>fe.codePointAt(0)).reverse().forEach(fe=>{let he=!1;for(let $e=0;$e<ne.length;$e++){const de=ne[$e];if(fe>=de&&fe<=de+9){if(he=!0,F++,xe++,H===null)H=de;else if(de!==H)throw{code:"D3131"};break}}he||(fe===35?(xe++,Y++):ae.push({position:xe,character:String.fromCodePoint(fe)}))}),F>0){M.primary=$.DECIMAL,M.zeroCode=H,M.mandatoryDigits=F,M.optionalDigits=Y;const he=function($e){if($e.length===0)return 0;const de=$e[0].character;for(let st=1;st<$e.length;st++)if($e[st].character!==de)return 0;const ft=$e.map(st=>st.position),Kt=function(st,Pt){return Pt===0?st:Kt(Pt,st%Pt)},_t=ft.reduce(Kt);for(let st=1;st<=ft.length;st++)if(ft.indexOf(st*_t)===-1)return 0;return _t}(ae);he>0?(M.regular=!0,M.groupingSeparators={position:he,character:ae[0].character}):(M.regular=!1,M.groupingSeparators=ae)}else M.primary=$.SEQUENCE,M.token=D}}return M}const ie={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 q(T){var M=[];const D={type:"datetime",parts:M},j=function(he,$e){if($e>he){let de=T.substring(he,$e);de=de.split("]]").join("]"),M.push({type:"literal",value:de})}};for(var V=0,H=0;H<T.length;){if(T.charAt(H)==="["){if(T.charAt(H+1)==="["){j(V,H),M.push({type:"literal",value:"["}),H+=2,V=H;continue}if(j(V,H),V=H,H=T.indexOf("]",V),H===-1)throw{code:"D3135"};let he=T.substring(V+1,H);he=he.split(/\s+/).join("");var F={type:"marker",component:he.charAt(0)},Y=he.lastIndexOf(","),ae;if(Y!==-1){const $e=he.substring(Y+1),de=$e.indexOf("-");let ft,Kt;const _t=function(Pt){if(!(typeof Pt>"u"||Pt==="*"))return parseInt(Pt)};de===-1?ft=$e:(ft=$e.substring(0,de),Kt=$e.substring(de+1));const st={min:_t(ft),max:_t(Kt)};F.width=st,ae=he.substring(1,Y)}else ae=he.substring(1);if(ae.length===1)F.presentation1=ae;else if(ae.length>1){var xe=ae.charAt(ae.length-1);"atco".indexOf(xe)!==-1?(F.presentation2=xe,xe==="o"&&(F.ordinal=!0),F.presentation1=ae.substring(0,ae.length-1)):F.presentation1=ae}else F.presentation1=ie[F.component];if(typeof F.presentation1>"u")throw{code:"D3132",value:F.component};if(F.presentation1[0]==="n")F.names=G.LOWER;else if(F.presentation1[0]==="N")F.presentation1[1]==="n"?F.names=G.TITLE:F.names=G.UPPER;else if("YMDdFWwXxHhmsf".indexOf(F.component)!==-1){var ge=F.presentation1;if(F.presentation2&&(ge+=";"+F.presentation2),F.integerFormat=se(ge),F.width&&F.width.min!==void 0&&F.integerFormat.mandatoryDigits<F.width.min&&(F.integerFormat.mandatoryDigits=F.width.min),F.component==="Y")if(F.n=-1,F.width&&F.width.max!==void 0)F.n=F.width.max,F.integerFormat.mandatoryDigits=F.n;else{var fe=F.integerFormat.mandatoryDigits+F.integerFormat.optionalDigits;fe>=2&&(F.n=fe)}const $e=M[M.length-1];$e&&$e.integerFormat&&($e.integerFormat.parseWidth=$e.integerFormat.mandatoryDigits)}(F.component==="Z"||F.component==="z")&&(F.integerFormat=se(F.presentation1)),M.push(F),V=H+1}H++}return j(V,H),D}const le=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Ue=1e3*60*60*24,ue=function(T){const M=Date.UTC(T.year,T.month);var D=new Date(M).getUTCDay();return D===0&&(D=7),D>4?M+(8-D)*Ue:M-(D-1)*Ue},me=function(T,M){return{year:T,month:M,nextMonth:function(){return M===11?me(T+1,0):me(T,M+1)},previousMonth:function(){return M===0?me(T-1,11):me(T,M-1)},nextYear:function(){return me(T+1,M)},previousYear:function(){return me(T-1,M)}}},ke=function(T,M){return(M-T)/(Ue*7)+1},ce=(T,M)=>{let D;switch(M){case"Y":D=T.getUTCFullYear();break;case"M":D=T.getUTCMonth()+1;break;case"D":D=T.getUTCDate();break;case"d":{const j=Date.UTC(T.getUTCFullYear(),T.getUTCMonth(),T.getUTCDate()),V=Date.UTC(T.getUTCFullYear(),0);D=(j-V)/Ue+1;break}case"F":D=T.getUTCDay(),D===0&&(D=7);break;case"W":{const j=me(T.getUTCFullYear(),0),V=ue(j),H=Date.UTC(j.year,T.getUTCMonth(),T.getUTCDate());let F=ke(V,H);if(F>52){const Y=ue(j.nextYear());H>=Y&&(F=1)}else if(F<1){const Y=ue(j.previousYear());F=ke(Y,H)}D=Math.floor(F);break}case"w":{const j=me(T.getUTCFullYear(),T.getUTCMonth()),V=ue(j),H=Date.UTC(j.year,j.month,T.getUTCDate());let F=ke(V,H);if(F>4){const Y=ue(j.nextMonth());H>=Y&&(F=1)}else if(F<1){const Y=ue(j.previousMonth());F=ke(Y,H)}D=Math.floor(F);break}case"X":{const j=me(T.getUTCFullYear(),0),V=ue(j),H=ue(j.nextYear()),F=T.getTime();F<V?D=j.year-1:F>=H?D=j.year+1:D=j.year;break}case"x":{const j=me(T.getUTCFullYear(),T.getUTCMonth()),V=ue(j),H=j.nextMonth(),F=ue(H),Y=T.getTime();Y<V?D=j.previousMonth().month+1:Y>=F?D=H.month+1:D=j.month+1;break}case"H":D=T.getUTCHours();break;case"h":D=T.getUTCHours(),D=D%12,D===0&&(D=12);break;case"P":D=T.getUTCHours()>=12?"pm":"am";break;case"m":D=T.getUTCMinutes();break;case"s":D=T.getUTCSeconds();break;case"f":D=T.getUTCMilliseconds();break;case"Z":case"z":break;case"C":D="ISO";break;case"E":D="ISO";break}return D};let W=null;function Pe(T,M,D){var j=0,V=0;if(typeof D<"u"){const ge=parseInt(D);j=Math.floor(ge/100),V=ge%100}var H=function(ge,fe){var he=ce(ge,fe.component);if("YMDdFWwXxHhms".indexOf(fe.component)!==-1)if(fe.component==="Y"&&fe.n!==-1&&(he=he%Math.pow(10,fe.n)),fe.names){if(fe.component==="M"||fe.component==="x")he=pe[he-1];else if(fe.component==="F")he=le[he];else throw{code:"D3133",value:fe.component};fe.names===G.UPPER?he=he.toUpperCase():fe.names===G.LOWER&&(he=he.toLowerCase()),fe.width&&he.length>fe.width.max&&(he=he.substring(0,fe.width.max))}else he=z(he,fe.integerFormat);else if(fe.component==="f")he=z(he,fe.integerFormat);else if(fe.component==="Z"||fe.component==="z"){const $e=j*100+V;if(fe.integerFormat.regular)he=z($e,fe.integerFormat);else{const de=fe.integerFormat.mandatoryDigits;if(de===1||de===2)he=z(j,fe.integerFormat),V!==0&&(he+=":"+C(V,"00"));else if(de===3||de===4)he=z($e,fe.integerFormat);else throw{code:"D3134",value:de}}$e>=0&&(he="+"+he),fe.component==="z"&&(he="GMT"+he),$e===0&&fe.presentation2==="t"&&(he="Z")}else fe.component==="P"&&fe.names===G.UPPER&&(he=he.toUpperCase());return he};let F;typeof M>"u"?(W===null&&(W=q("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),F=W):F=q(M);const Y=(60*j+V)*60*1e3,ae=new Date(T+Y);let xe="";return F.parts.forEach(function(ge){ge.type==="literal"?xe+=ge.value:xe+=H(ae,ge)}),xe}function m(T){var M=Object.create(null);if(T.type==="datetime")M.type="datetime",M.parts=T.parts.map(function(D){var j=Object.create(null);if(D.type==="literal")j.regex=D.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(D.component==="Z"||D.component==="z"){let H;Array.isArray(D.integerFormat.groupingSeparators)||(H=D.integerFormat.groupingSeparators),j.regex="",D.component==="z"&&(j.regex="GMT"),j.regex+="[-+][0-9]+",H&&(j.regex+=H.character+"[0-9]+"),j.parse=function(F){D.component==="z"&&(F=F.substring(3));let Y=0,ae=0;return H?(Y=Number.parseInt(F.substring(0,F.indexOf(H.character))),ae=Number.parseInt(F.substring(F.indexOf(H.character)+1))):F.length-1<=2?Y=Number.parseInt(F):(Y=Number.parseInt(F.substring(0,3)),ae=Number.parseInt(F.substring(3))),Y*60+ae}}else if(D.component==="f")j.regex="[0-9]+",j.parse=function(H){return parseFloat("0."+H.substring(0,3))*1e3};else if(D.integerFormat)j=m(D.integerFormat);else{j.regex="[a-zA-Z]+";var V=Object.create(null);if(D.component==="M"||D.component==="x")pe.forEach(function(H,F){D.width&&D.width.max?V[H.substring(0,D.width.max)]=F+1:V[H]=F+1});else if(D.component==="F")le.forEach(function(H,F){F>0&&(D.width&&D.width.max?V[H.substring(0,D.width.max)]=F:V[H]=F)});else if(D.component==="P")V={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:D.component};j.parse=function(H){return V[H]}}return j.component=D.component,j});else{M.type="integer";const D=T.case===G.UPPER;switch(T.primary){case $.LETTERS:M.regex=D?"[A-Z]+":"[a-z]+",M.parse=function(j){return I(j,D?"A":"a")};break;case $.ROMAN:M.regex=D?"[MDCLXVI]+":"[mdclxvi]+",M.parse=function(j){return P(D?j:j.toUpperCase())};break;case $.WORDS:M.regex="(?:"+n.keys(A).concat("and","[\\-, ]").join("|")+")+",M.parse=function(j){return E(j.toLowerCase())};break;case $.DECIMAL:M.regex="[0-9]",T.parseWidth?M.regex+=`{${T.parseWidth}}`:M.regex+="+",T.ordinal&&(M.regex+="(?:th|st|nd|rd)"),M.parse=function(j){let V=j;return T.ordinal&&(V=j.substring(0,j.length-2)),T.regular?V=V.split(",").join(""):T.groupingSeparators.forEach(H=>{V=V.split(H.character).join("")}),T.zeroCode!==48&&(V=V.split("").map(H=>String.fromCodePoint(H.codePointAt(0)-T.zeroCode+48)).join("")),parseInt(V)};break;case $.SEQUENCE:throw{code:"D3130",value:T.token}}}return M}function _(T,M){if(typeof T>"u")return;const D=se(M);return m(D).parse(T)}function Q(T,M){const D=q(M),j=m(D),V="^"+j.parts.map(ae=>"("+ae.regex+")").join("")+"$";var F=new RegExp(V,"i").exec(T);if(F!==null){const de=Object.create(null);for(let d=1;d<F.length;d++){const v=j.parts[d-1];v.parse&&(de[v.component]=v.parse(F[d]))}if(Object.getOwnPropertyNames(de).length===0)return;let ft=0;const Kt=d=>{ft<<=1,ft+=d?1:0},_t=d=>!(~d&ft)&&!!(d&ft);"YXMxWwdD".split("").forEach(d=>Kt(de[d]));const Pt=!_t(161)&&_t(130),_s=_t(84),$r=!_s&&_t(72);ft=0,"PHhmsf".split("").forEach(d=>Kt(de[d]));const Z=!_t(23)&&_t(47),Xt=(Pt?"YD":_s?"XxwF":$r?"XWF":"YMD")+(Z?"Phmsf":"Hmsf"),li=this.environment.timestamp;let hs=!1,ar=!1;if(Xt.split("").forEach(d=>{if(typeof de[d]>"u")hs?(de[d]="MDd".indexOf(d)!==-1?1:0,ar=!0):de[d]=ce(li,d);else if(hs=!0,ar)throw{code:"D3136"}}),de.M>0?de.M-=1:de.M=0,Pt){const d=Date.UTC(de.Y,0),v=(de.d-1)*1e3*60*60*24,w=new Date(d+v);de.M=w.getUTCMonth(),de.D=w.getUTCDate()}if(_s)throw{code:"D3136"};if($r)throw{code:"D3136"};Z&&(de.H=de.h===12?0:de.h,de.P===1&&(de.H+=12));var Y=Date.UTC(de.Y,de.M,de.D,de.H,de.m,de.s,de.f);return(de.Z||de.z)&&(Y-=(de.Z||de.z)*60*1e3),Y}}var ye=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 _e(T,M){if(!(typeof T>"u"))if(typeof M>"u"){if(!ye.test(T))throw{stack:new Error().stack,code:"D3110",value:T};return Date.parse(T)}else return Q.call(this,T,M)}function De(T,M,D){if(!(typeof T>"u"))return Pe.call(this,T,M,D)}return{formatInteger:C,parseInteger:_,fromMillis:De,toMillis:_e}})();r.exports=o},{"./utils":6}],2:[function(s,r,i){(function(n){(function(){var o=s("./utils");const c=(()=>{var h=o.isNumeric,b=o.isArrayOfStrings,k=o.isArrayOfNumbers,g=o.isSequence,f=o.isFunction,A=o.isLambda,E=o.isPromise,O=o.getFunctionArity,N=o.isDeepEqual,U=o.stringToArray;function P(a){if(!(typeof a>"u")){var l=0;return a.forEach(function(p){l+=p}),l}}function y(a){return typeof a>"u"?0:a.length}function I(a){if(!(typeof a>"u"||a.length===0))return Math.max.apply(Math,a)}function C(a){if(!(typeof a>"u"||a.length===0))return Math.min.apply(Math,a)}function $(a){if(!(typeof a>"u"||a.length===0)){var l=0;return a.forEach(function(p){l+=p}),l/a.length}}function G(a,l=!1){if(!(typeof a>"u")){var p;if(typeof a=="string")p=a;else if(f(a))p="";else{if(typeof a=="number"&&!isFinite(a))throw{code:"D3001",value:a,stack:new Error().stack};var S=l?2:0;Array.isArray(a)&&a.outerWrapper&&(a=a[0]),p=JSON.stringify(a,function(x,L){return typeof L<"u"&&L!==null&&h(L)?L.toPrecision&&!Number.isInteger(L)?Number(L.toPrecision(15)):L:L&&f(L)?"":L},S)}return p}}function z(a,l,p){if(!(typeof a>"u")){var S=U(a),x=S.length;if(x+l<0&&(l=0),typeof p<"u"){if(p<=0)return"";var L=l>=0?l+p:x+l+p;return S.slice(l,L).join("")}return S.slice(l).join("")}}function ne(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(0,p):a}}function se(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(p+l.length):a}}function ie(a){if(!(typeof a>"u"))return a.toLowerCase()}function q(a){if(!(typeof a>"u"))return a.toUpperCase()}function le(a){if(!(typeof a>"u"))return U(a).length}function pe(a){if(!(typeof a>"u")){var l=a.replace(/[ \t\n\r]+/gm," ");return l.charAt(0)===" "&&(l=l.substring(1)),l.charAt(l.length-1)===" "&&(l=l.substring(0,l.length-1)),l}}function Ue(a,l,p){if(!(typeof a>"u")){(typeof p>"u"||p.length===0)&&(p=" ");var S;l=Math.trunc(l);var x=Math.abs(l)-le(a);if(x>0){var L=new Array(x+1).join(p);p.length>1&&(L=z(L,0,x)),l>0?S=a+L:S=L+a}else S=a;return S}}async function ue(a,l){var p=a.apply(this,[l]);if(E(p)&&(p=await p),p&&!(typeof p.start=="number"||p.end==="number"||Array.isArray(p.groups)||f(p.next)))throw{code:"T1010",stack:new Error().stack};return p}async function me(a,l){if(!(typeof a>"u"||typeof l>"u")){var p;if(typeof l=="string")p=a.indexOf(l)!==-1;else{var S=await ue(l,a);p=typeof S<"u"}return p}}async function ke(a,l,p){if(!(typeof a>"u")){if(p<0)throw{stack:new Error().stack,value:p,code:"D3040",index:3};var S=this.createSequence();if(typeof p>"u"||p>0){var x=0,L=await ue(l,a);if(typeof L<"u")for(;typeof L<"u"&&(typeof p>"u"||x<p);)S.push({match:L.match,index:L.start,groups:L.groups}),L=await ue(L.next),x++}return S}}async function ce(a,l,p,S){if(!(typeof a>"u")){var x=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(S<0)throw{code:"D3011",stack:new Error().stack,value:S,index:4};var L;typeof p=="string"?L=function(We){for(var rt="",Le=0,Ze=p.indexOf("$",Le);Ze!==-1&&Le<p.length;){rt+=p.substring(Le,Ze),Le=Ze+1;var Yt=p.charAt(Le);if(Yt==="$")rt+="$",Le++;else if(Yt==="0")rt+=We.match,Le++;else{var xt;if(We.groups.length===0?xt=1:xt=Math.floor(Math.log(We.groups.length)*Math.LOG10E)+1,Ze=parseInt(p.substring(Le,Le+xt),10),xt>1&&Ze>We.groups.length&&(Ze=parseInt(p.substring(Le,Le+xt-1),10)),isNaN(Ze))rt+="$";else{if(We.groups.length>0){var ds=We.groups[Ze-1];typeof ds<"u"&&(rt+=ds)}Le+=Ze.toString().length}}Ze=p.indexOf("$",Le)}return rt+=p.substring(Le),rt}:L=p;var B="",K=0;if(typeof S>"u"||S>0){var we=0;if(typeof l=="string"){for(var oe=a.indexOf(l,K);oe!==-1&&(typeof S>"u"||we<S);)B+=a.substring(K,oe),B+=p,K=oe+l.length,we++,oe=a.indexOf(l,K);B+=a.substring(K)}else{var Fe=await ue(l,a);if(typeof Fe<"u"){for(;typeof Fe<"u"&&(typeof S>"u"||we<S);){B+=a.substring(K,Fe.start);var He=L.apply(x,[Fe]);if(E(He)&&(He=await He),typeof He=="string")B+=He;else throw{code:"D3012",stack:new Error().stack,value:He};K=Fe.start+Fe.match.length,we++,Fe=await ue(Fe.next)}B+=a.substring(K)}else B=a}}else B=a;return B}}function W(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.btoa:function(p){return new n.Buffer.from(p,"binary").toString("base64")};return l(a)}}function Pe(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.atob:function(p){return new n.Buffer.from(p,"base64").toString("binary")};return l(a)}}function m(a){if(!(typeof a>"u")){var l;try{l=encodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrlComponent"}}return l}}function _(a){if(!(typeof a>"u")){var l;try{l=encodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrl"}}return l}}function Q(a){if(!(typeof a>"u")){var l;try{l=decodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrlComponent"}}return l}}function ye(a){if(!(typeof a>"u")){var l;try{l=decodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrl"}}return l}}async function _e(a,l,p){if(!(typeof a>"u")){if(p<0)throw{code:"D3020",stack:new Error().stack,value:p,index:3};var S=[];if(typeof p>"u"||p>0)if(typeof l=="string")S=a.split(l,p);else{var x=0,L=await ue(l,a);if(typeof L<"u"){for(var B=0;typeof L<"u"&&(typeof p>"u"||x<p);)S.push(a.substring(B,L.start)),B=L.end,L=await ue(L.next),x++;(typeof p>"u"||x<p)&&S.push(a.substring(B))}else S.push(a)}return S}}function De(a,l){if(!(typeof a>"u"))return typeof l>"u"&&(l=""),a.join(l)}function T(a,l,p){if(!(typeof a>"u")){var S={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},x=S;typeof p<"u"&&o.keys(p).forEach(function(ve){x[ve]=p[ve]});for(var L=[],B=x["zero-digit"].charCodeAt(0),K=B;K<B+10;K++)L.push(String.fromCharCode(K));var we=L.concat([x["decimal-separator"],x["exponent-separator"],x["grouping-separator"],x.digit,x["pattern-separator"]]),oe=l.split(x["pattern-separator"]);if(oe.length>2)throw{code:"D3080",stack:new Error().stack};var Fe=function(ve){var Ye=(function(){for(var lt,zt=0;zt<ve.length;zt++)if(lt=ve.charAt(zt),we.indexOf(lt)!==-1&<!==x["exponent-separator"])return ve.substring(0,zt);return""})(),At=(function(){for(var lt,zt=ve.length-1;zt>=0;zt--)if(lt=ve.charAt(zt),we.indexOf(lt)!==-1&<!==x["exponent-separator"])return ve.substring(zt+1);return""})(),Ke=ve.substring(Ye.length,ve.length-At.length),Mt,Vs,It,lr,Rt=ve.indexOf(x["exponent-separator"],Ye.length);Rt===-1||Rt>ve.length-At.length?(Mt=Ke,Vs=void 0):(Mt=Ke.substring(0,Rt),Vs=Ke.substring(Rt+1));var Qt=Mt.indexOf(x["decimal-separator"]);return Qt===-1?(It=Mt,lr=At):(It=Mt.substring(0,Qt),lr=Mt.substring(Qt+1)),{prefix:Ye,suffix:At,activePart:Ke,mantissaPart:Mt,exponentPart:Vs,integerPart:It,fractionalPart:lr,subpicture:ve}},He=function(ve){var Ye,At,Ke=ve.subpicture,Mt=Ke.indexOf(x["decimal-separator"]);Mt!==Ke.lastIndexOf(x["decimal-separator"])&&(Ye="D3081"),Ke.indexOf(x.percent)!==Ke.lastIndexOf(x.percent)&&(Ye="D3082"),Ke.indexOf(x["per-mille"])!==Ke.lastIndexOf(x["per-mille"])&&(Ye="D3083"),Ke.indexOf(x.percent)!==-1&&Ke.indexOf(x["per-mille"])!==-1&&(Ye="D3084");var Vs=!1;for(At=0;At<ve.mantissaPart.length;At++){var It=ve.mantissaPart.charAt(At);if(L.indexOf(It)!==-1||It===x.digit){Vs=!0;break}}Vs||(Ye="D3085");var lr=ve.activePart.split("").map(function(lt){return we.indexOf(lt)===-1?"p":"a"}).join("");lr.indexOf("p")!==-1&&(Ye="D3086"),Mt!==-1?(Ke.charAt(Mt-1)===x["grouping-separator"]||Ke.charAt(Mt+1)===x["grouping-separator"])&&(Ye="D3087"):ve.integerPart.charAt(ve.integerPart.length-1)===x["grouping-separator"]&&(Ye="D3088"),Ke.indexOf(x["grouping-separator"]+x["grouping-separator"])!==-1&&(Ye="D3089");var Rt=ve.integerPart.indexOf(x.digit);Rt!==-1&&ve.integerPart.substring(0,Rt).split("").filter(function(lt){return L.indexOf(lt)>-1}).length>0&&(Ye="D3090"),Rt=ve.fractionalPart.lastIndexOf(x.digit),Rt!==-1&&ve.fractionalPart.substring(Rt).split("").filter(function(lt){return L.indexOf(lt)>-1}).length>0&&(Ye="D3091");var Qt=typeof ve.exponentPart=="string";if(Qt&&ve.exponentPart.length>0&&(Ke.indexOf(x.percent)!==-1||Ke.indexOf(x["per-mille"])!==-1)&&(Ye="D3092"),Qt&&(ve.exponentPart.length===0||ve.exponentPart.split("").filter(function(lt){return L.indexOf(lt)===-1}).length>0)&&(Ye="D3093"),Ye)throw{code:Ye,stack:new Error().stack}},We=function(ve){var Ye=function(gt,nn){for(var hi=[],Ps=gt.indexOf(x["grouping-separator"]);Ps!==-1;){var on=(nn?gt.substring(0,Ps):gt.substring(Ps)).split("").filter(function(Or){return L.indexOf(Or)!==-1||Or===x.digit}).length;hi.push(on),Ps=ve.integerPart.indexOf(x["grouping-separator"],Ps+1)}return hi},At=Ye(ve.integerPart),Ke=function(gt){if(gt.length===0)return 0;for(var nn=function(on,Or){return Or===0?on:nn(Or,on%Or)},hi=gt.reduce(nn),Ps=1;Ps<=gt.length;Ps++)if(gt.indexOf(Ps*hi)===-1)return 0;return hi},Mt=Ke(At),Vs=Ye(ve.fractionalPart,!0),It=ve.integerPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length,lr=It,Rt=ve.fractionalPart.split(""),Qt=Rt.filter(function(gt){return L.indexOf(gt)!==-1}).length,lt=Rt.filter(function(gt){return L.indexOf(gt)!==-1||gt===x.digit}).length,zt=typeof ve.exponentPart=="string";It===0&<===0&&(zt?(Qt=1,lt=1):It=1),zt&&It===0&&ve.integerPart.indexOf(x.digit)!==-1&&(It=1),It===0&&Qt===0&&(Qt=1);var bl=0;return zt&&(bl=ve.exponentPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length),{integerPartGroupingPositions:At,regularGrouping:Mt,minimumIntegerPartSize:It,scalingFactor:lr,prefix:ve.prefix,fractionalPartGroupingPositions:Vs,minimumFactionalPartSize:Qt,maximumFactionalPartSize:lt,minimumExponentSize:bl,suffix:ve.suffix,picture:ve.subpicture}},rt=oe.map(Fe);rt.forEach(He);var Le=rt.map(We),Ze=x["minus-sign"],Yt=x["zero-digit"],xt=x["decimal-separator"],ds=x["grouping-separator"];Le.length===1&&(Le.push(JSON.parse(JSON.stringify(Le[0]))),Le[1].prefix=Ze+Le[1].prefix);var it;a>=0?it=Le[0]:it=Le[1];var ci;it.picture.indexOf(x.percent)!==-1?ci=a*100:it.picture.indexOf(x["per-mille"])!==-1?ci=a*1e3:ci=a;var qs,Er;if(it.minimumExponentSize===0)qs=ci;else{var mg=Math.pow(10,it.scalingFactor),vg=Math.pow(10,it.scalingFactor-1);if(qs=ci,Er=0,qs!==0){for(;Math.abs(qs)<vg;)qs*=10,Er-=1;for(;Math.abs(qs)>mg;)qs/=10,Er+=1}}var yg=F(qs,it.maximumFactionalPartSize),fl=function(ve,Ye){var At=Math.abs(ve).toFixed(Ye);return Yt!=="0"&&(At=At.split("").map(function(Ke){return Ke>="0"&&Ke<="9"?L[Ke.charCodeAt(0)-48]:Ke}).join("")),At},Se=fl(yg,it.maximumFactionalPartSize),St=Se.indexOf(".");for(St===-1?Se=Se+xt:Se=Se.replace(".",xt);Se.charAt(0)===Yt;)Se=Se.substring(1);for(;Se.charAt(Se.length-1)===Yt;)Se=Se.substring(0,Se.length-1);St=Se.indexOf(xt);var ui=it.minimumIntegerPartSize-St,gl=it.minimumFactionalPartSize-(Se.length-St-1);if(Se=(ui>0?new Array(ui+1).join(Yt):"")+Se,Se=Se+(gl>0?new Array(gl+1).join(Yt):""),St=Se.indexOf(xt),it.regularGrouping>0)for(var wg=Math.floor((St-1)/it.regularGrouping),sn=1;sn<=wg;sn++)Se=[Se.slice(0,St-sn*it.regularGrouping),ds,Se.slice(St-sn*it.regularGrouping)].join("");else it.integerPartGroupingPositions.forEach(function(ve){Se=[Se.slice(0,St-ve),ds,Se.slice(St-ve)].join(""),St++});if(St=Se.indexOf(xt),it.fractionalPartGroupingPositions.forEach(function(ve){Se=[Se.slice(0,ve+St+1),ds,Se.slice(ve+St+1)].join("")}),St=Se.indexOf(xt),(it.picture.indexOf(xt)===-1||St===Se.length-1)&&(Se=Se.substring(0,Se.length-1)),typeof Er<"u"){var rn=fl(Er,0);ui=it.minimumExponentSize-rn.length,ui>0&&(rn=new Array(ui+1).join(Yt)+rn),Se=Se+x["exponent-separator"]+(Er<0?Ze:"")+rn}return Se=it.prefix+Se+it.suffix,Se}}function M(a,l){if(!(typeof a>"u")){if(a=F(a),typeof l>"u"?l=10:l=F(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var p=a.toString(l);return p}}function D(a){var l;if(!(typeof a>"u")){if(typeof a=="number")l=a;else if(typeof a=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(a)&&!isNaN(parseFloat(a))&&isFinite(a))l=parseFloat(a);else if(typeof a=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(a))l=Number(a);else if(a===!0)l=1;else if(a===!1)l=0;else throw{code:"D3030",value:a,stack:new Error().stack,index:1};return l}}function j(a){var l;if(!(typeof a>"u"))return l=Math.abs(a),l}function V(a){var l;if(!(typeof a>"u"))return l=Math.floor(a),l}function H(a){var l;if(!(typeof a>"u"))return l=Math.ceil(a),l}function F(a,l){var p;if(!(typeof a>"u")){if(l){var S=a.toString().split("e");a=+(S[0]+"e"+(S[1]?+S[1]+l:l))}p=Math.round(a);var x=p-a;return Math.abs(x)===.5&&Math.abs(p%2)===1&&(p=p-1),l&&(S=p.toString().split("e"),p=+(S[0]+"e"+(S[1]?+S[1]-l:-l))),Object.is(p,-0)&&(p=0),p}}function Y(a){var l;if(!(typeof a>"u")){if(a<0)throw{stack:new Error().stack,code:"D3060",index:1,value:a};return l=Math.sqrt(a),l}}function ae(a,l){var p;if(!(typeof a>"u")){if(p=Math.pow(a,l),!isFinite(p))throw{stack:new Error().stack,code:"D3061",index:1,value:a,exp:l};return p}}function xe(){return Math.random()}function ge(a){if(!(typeof a>"u")){var l=!1;if(Array.isArray(a)){if(a.length===1)l=ge(a[0]);else if(a.length>1){var p=a.filter(function(S){return ge(S)});l=p.length>0}}else typeof a=="string"?a.length>0&&(l=!0):h(a)?a!==0&&(l=!0):a!==null&&typeof a=="object"&&!f(a)?o.keys(a).length>0&&(l=!0):typeof a=="boolean"&&a===!0&&(l=!0);return l}}function fe(a){if(!(typeof a>"u"))return!ge(a)}function he(a,l,p,S){var x=[l],L=O(a);return L>=2&&x.push(p),L>=3&&x.push(S),x}async function $e(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),S=0;S<a.length;S++){var x=he(l,a[S],S,a),L=await l.apply(this,x);typeof L<"u"&&p.push(L)}return p}}async function de(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),S=0;S<a.length;S++){var x=a[S],L=he(l,x,S,a),B=await l.apply(this,L);ge(B)&&p.push(x)}return p}}async function ft(a,l){if(!(typeof a>"u")){for(var p=!1,S,x=0;x<a.length;x++){var L=a[x],B=!0;if(typeof l<"u"){var K=he(l,L,x,a),we=await l.apply(this,K);B=ge(we)}if(B)if(!p)S=L,p=!0;else throw{stack:new Error().stack,code:"D3138",index:x}}if(!p)throw{stack:new Error().stack,code:"D3139"};return S}}function Kt(){for(var a=[],l=Array.prototype.slice.call(arguments),p=Math.min.apply(Math,l.map(function(L){return Array.isArray(L)?L.length:0})),S=0;S<p;S++){var x=l.map(L=>L[S]);a.push(x)}return a}async function _t(a,l,p){if(!(typeof a>"u")){var S,x=O(l);if(x<2)throw{stack:new Error().stack,code:"D3050",index:1};var L;for(typeof p>"u"&&a.length>0?(S=a[0],L=1):(S=p,L=0);L<a.length;){var B=[S,a[L]];x>=3&&B.push(L),x>=4&&B.push(a),S=await l.apply(this,B),L++}return S}}function st(a){var l=this.createSequence();if(Array.isArray(a)){for(var p=Object.create(null),S=0;S<a.length;S++){var x=st.call(this,a[S]);x.forEach(function(L){p[L]=!0})}l=st.call(this,p)}else a!==null&&typeof a=="object"&&!f(a)&&o.keys(a).forEach(L=>l.push(L));return l}function Pt(a,l){var p;if(Array.isArray(a)){p=this.createSequence();for(var S=0;S<a.length;S++){var x=Pt.call(this,a[S],l);typeof x<"u"&&(Array.isArray(x)?x.forEach(L=>p.push(L)):p.push(x))}}else a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,l)&&!f(a)&&(p=a[l]);return p}function _s(a,l){if(typeof a>"u")return l;if(typeof l>"u")return a;Array.isArray(a)||(a=this.createSequence(a)),Array.isArray(l)||(l=[l]);const p=a.length+l.length;if(this.options&&p>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:p};return a.concat(l)}function $r(a){return!(typeof a>"u")}function Dr(a){var l=this.createSequence();if(Array.isArray(a))for(var p=0;p<a.length;p++)l=_s.call(this,l,Dr.call(this,a[p]));else if(a!==null&&typeof a=="object"&&!A(a))for(const x of o.keys(a)){var S=Object.create(null);S[x]=a[x],l.push(S)}else l=a;return l}function Z(a){if(!(typeof a>"u")){var l=Object.create(null);return a.forEach(function(p){for(const S of o.keys(p))l[S]=p[S]}),l}}function en(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=a.length,p=new Array(l),S=0;S<l;S++)p[l-S-1]=a[S];return p}}async function tn(a,l){var p=this.createSequence();for(const L of o.keys(a)){var S=he(l,a[L],L,a),x=await l.apply(this,S);typeof x<"u"&&p.push(x)}return p}function Xt(a){throw{code:"D3137",stack:new Error().stack,message:a||"$error() function evaluated"}}function li(a,l){if(!a)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function hs(a){if(a!==void 0)return a===null?"null":h(a)?"number":typeof a=="string"?"string":typeof a=="boolean"?"boolean":Array.isArray(a)?"array":f(a)?"function":"object"}async function ar(a,l){if(!(typeof a>"u")){if(a.length<=1)return a;var p;if(typeof l>"u"){if(!k(a)&&!b(a))throw{stack:new Error().stack,code:"D3070",index:1};p=async function(B,K){return B>K}}else p=l;var S=async function(B,K){var we=async function(Fe,He,We){He.length===0?Array.prototype.push.apply(Fe,We):We.length===0?Array.prototype.push.apply(Fe,He):await p(He[0],We[0])?(Fe.push(We[0]),await we(Fe,He,We.slice(1))):(Fe.push(He[0]),await we(Fe,He.slice(1),We))},oe=[];return await we(oe,B,K),oe},x=async function(B){if(!Array.isArray(B)||B.length<=1)return B;var K=Math.floor(B.length/2),we=B.slice(0,K),oe=B.slice(K);return we=await x(we),oe=await x(oe),await S(we,oe)},L=await x(a);return L}}function d(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=new Array(a.length),p=0;p<a.length;p++){var S=Math.floor(Math.random()*(p+1));p!==S&&(l[p]=l[S]),l[S]=a[p]}return l}}function v(a){if(!(typeof a>"u")){if(!Array.isArray(a)||a.length<=1)return a;for(var l=g(a)?this.createSequence():[],p=0;p<a.length;p++){for(var S=a[p],x=!1,L=0;L<l.length;L++)if(N(S,l[L])){x=!0;break}x||l.push(S)}return l}}async function w(a,l){var p=Object.create(null);for(const B of o.keys(a)){var S=a[B],x=he(l,S,B,a),L=await l.apply(this,x);ge(L)&&(p[B]=S)}return o.keys(p).length===0&&(p=void 0),p}return{sum:P,count:y,max:I,min:C,average:$,string:G,substring:z,substringBefore:ne,substringAfter:se,lowercase:ie,uppercase:q,length:le,trim:pe,pad:Ue,match:ke,contains:me,replace:ce,split:_e,join:De,formatNumber:T,formatBase:M,number:D,floor:V,ceil:H,round:F,abs:j,sqrt:Y,power:ae,random:xe,boolean:ge,not:fe,map:$e,zip:Kt,filter:de,single:ft,foldLeft:_t,sift:w,keys:st,lookup:Pt,append:_s,exists:$r,spread:Dr,merge:Z,reverse:en,each:tn,error:Xt,assert:li,type:hs,sort:ar,shuffle:d,distinct:v,base64encode:W,base64decode:Pe,encodeUrlComponent:m,encodeUrl:_,decodeUrlComponent:Q,decodeUrl:ye}})();r.exports=c}).call(this)}).call(this,typeof Zo<"u"?Zo:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(s,r,i){var n=s("./datetime"),o=s("./functions"),c=s("./utils"),h=s("./parser"),b=s("./signature"),k=(function(){var g=c.isNumeric,f=c.isArrayOfStrings,A=c.isArrayOfNumbers,E=c.isSequence,O=c.isFunction,N=c.isLambda,U=c.isIterable,P=c.isPromise,y=c.getFunctionArity,I=c.isDeepEqual,C=Xt(null);async function $(d,v,w){var a;w.base.depth++,w.base.guardrails();var l=w.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(d,v,w),d.type){case"path":a=await G(d,v,w);break;case"binary":a=await le(d,v,w);break;case"unary":a=await pe(d,v,w);break;case"name":a=Ue(d,v,w);break;case"string":case"number":case"value":a=ue(d);break;case"wildcard":a=me(d,v,w);break;case"descendant":a=ce(d,v,w);break;case"parent":a=w.lookup(d.slot.label);break;case"condition":a=await V(d,v,w);break;case"block":a=await H(d,v,w);break;case"bind":a=await j(d,v,w);break;case"regex":a=F(d,v,w);break;case"function":a=await he(d,v,w);break;case"variable":a=Y(d,v,w);break;case"lambda":a=ft(d,v,w);break;case"partial":a=await Kt(d,v,w);break;case"apply":a=await fe(d,v,w);break;case"transform":a=xe(d,v,w);break}if(Object.prototype.hasOwnProperty.call(d,"predicate"))for(var p=0;p<d.predicate.length;p++)a=await q(d.predicate[p].expr,a,w);d.type!=="path"&&Object.prototype.hasOwnProperty.call(d,"group")&&(a=await T(d.group,a,w));var S=w.lookup(Symbol.for("jsonata.__evaluate_exit"));return S&&await S(d,v,w,a),a&&E(a)&&!a.tupleStream&&(d.keepArray&&(a.keepSingleton=!0),a.length===0?a=void 0:a.length===1&&(a=a.keepSingleton?a:a[0])),w.base.depth--,a}async function G(d,v,w){var a;Array.isArray(v)&&d.steps[0].type!=="variable"?a=v:a=w.base.createSequence(v);for(var l,p=!1,S=void 0,x=0;x<d.steps.length;x++){var L=d.steps[x];if(L.tuple&&(p=!0),x===0&&L.consarray?l=await $(L,a,w):p?S=await ie(L,a,S,w):l=await ne(L,a,w,x===d.steps.length-1),!p&&(typeof l>"u"||l.length===0))break;typeof L.focus>"u"&&(a=l)}if(p)if(d.tuple)l=S;else for(l=w.base.createSequence(),x=0;x<S.length;x++)l.push(S[x]["@"]);return d.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=w.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(d,"group")&&(l=await T(d.group,p?S:l,w)),l}function z(d,v){var w=Xt(d);for(const a of c.keys(v))w.bind(a,v[a]);return w}async function ne(d,v,w,a){var l;if(d.type==="sort")return l=await ae(d,v,w),d.stages&&(l=await se(d.stages,l,w)),l;l=w.base.createSequence();for(var p=0;p<v.length;p++){var S=await $(d,v[p],w);if(d.stages)for(var x=0;x<d.stages.length;x++)S=await q(d.stages[x].expr,S,w);typeof S<"u"&&l.push(S)}var L=w.base.createSequence();return a&&l.length===1&&Array.isArray(l[0])&&!E(l[0])?L=l[0]:Array.prototype.forEach.call(l,function(B){!Array.isArray(B)||B.cons?L.push(B):Array.prototype.forEach.call(B,K=>L.push(K))}),L}async function se(d,v,w){for(var a=v,l=0;l<d.length;l++){var p=d[l];switch(p.type){case"filter":a=await q(p.expr,a,w);break;case"index":for(var S=0;S<a.length;S++){var x=a[S];x[p.value]=S}break}}return a}async function ie(d,v,w,a){var l;if(d.type==="sort"){if(w)l=await ae(d,w,a);else{var p=await ae(d,v,a);l=a.base.createSequence(),l.tupleStream=!0;for(var S=0;S<p.length;S++){var x={"@":p[S]};x[d.index]=S,l.push(x)}}return d.stages&&(l=await se(d.stages,l,a)),l}l=a.base.createSequence(),l.tupleStream=!0;var L=a;w===void 0&&(w=v.map(oe=>({"@":oe})));for(var B=0;B<w.length;B++){L=z(a,w[B]);var K=await $(d,w[B]["@"],L);if(typeof K<"u"){Array.isArray(K)||(K=[K]);for(var we=0;we<K.length;we++)x=Object.create(null),Object.assign(x,w[B]),K.tupleStream?Object.assign(x,K[we]):(d.focus?(x[d.focus]=K[we],x["@"]=w[B]["@"]):x["@"]=K[we],d.index&&(x[d.index]=we),d.ancestor&&(x[d.ancestor.label]=w[B]["@"])),l.push(x)}}return d.stages&&(l=await se(d.stages,l,a)),l}async function q(d,v,w){var a=w.base.createSequence();if(v&&v.tupleStream&&(a.tupleStream=!0),Array.isArray(v)||(v=w.base.createSequence(v)),d.type==="number"){var l=Math.floor(d.value);l<0&&(l=v.length+l);var p=await v[l];typeof p<"u"&&(Array.isArray(p)?a=p:a.push(p))}else for(l=0;l<v.length;l++){var p=v[l],S=p,x=w;v.tupleStream&&(S=p["@"],x=z(w,p));var L=await $(d,S,x);g(L)&&(L=[L]),A(L)?Array.prototype.forEach.call(L,function(K){var we=Math.floor(K);we<0&&(we=v.length+we),we===l&&a.push(p)}):o.boolean(L)&&a.push(p)}return a}async function le(d,v,w){var a,l=await $(d.lhs,v,w),p=d.value,S=async()=>await $(d.rhs,v,w);if(p==="and"||p==="or")try{return await ye(l,S,p)}catch(L){throw L.position=d.position,L.token=p,L}var x=await S();try{switch(p){case"+":case"-":case"*":case"/":case"%":a=Pe(l,x,p);break;case"=":case"!=":a=m(l,x,p);break;case"<":case"<=":case">":case">=":a=_(l,x,p);break;case"&":a=De(l,x);break;case"..":a=D(l,x,w);break;case"in":a=Q(l,x);break}}catch(L){throw L.position=d.position,L.token=p,L}return a}async function pe(d,v,w){var a,l={options:w.base.options,createSequence:w.base.createSequence};switch(d.value){case"-":if(a=await $(d.expression,v,w),typeof a>"u")a=void 0;else if(g(a))a=-a;else throw{code:"D1002",stack:new Error().stack,position:d.position,token:d.value,value:a};break;case"[":a=[];let x=await Promise.all(d.expressions.map(async(L,B)=>(w.isParallelCall=B>0,[L,await $(L,v,w)])));for(let L of x){var[p,S]=L;typeof S<"u"&&(p.value==="["?a.push(S):a=o.append.call(l,a,S))}d.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=await T(d,v,w);break}return a}function Ue(d,v,w){var a={createSequence:w.base.createSequence};return o.lookup.call(a,v,d.value)}function ue(d){return d.value}function me(d,v,w){var a={options:w.base.options,createSequence:w.base.createSequence},l=a.createSequence();return Array.isArray(v)&&v.outerWrapper&&v.length>0&&(v=v[0]),v!==null&&typeof v=="object"&&!O(v)&&c.keys(v).forEach(function(p){var S=v[p];Array.isArray(S)?(S=ke(S),l=o.append.call(a,l,S)):l.push(S)}),l}function ke(d,v){return typeof v>"u"&&(v=[]),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){ke(w,v)}):v.push(d),v}function ce(d,v,w){var a,l=w.base.createSequence();return typeof v<"u"&&(W(v,l),l.length===1?a=l[0]:a=l),a}function W(d,v){Array.isArray(d)||v.push(d),Array.isArray(d)?Array.prototype.forEach.call(d,function(w){W(w,v)}):d!==null&&typeof d=="object"&&!O(d)&&c.keys(d).forEach(function(w){W(d[w],v)})}function Pe(d,v,w){var a;if(typeof d<"u"&&!g(d))throw{code:"T2001",stack:new Error().stack,value:d};if(typeof v<"u"&&!g(v))throw{code:"T2002",stack:new Error().stack,value:v};if(typeof d>"u"||typeof v>"u")return a;switch(w){case"+":a=d+v;break;case"-":a=d-v;break;case"*":a=d*v;break;case"/":a=d/v;break;case"%":a=d%v;break}return a}function m(d,v,w){var a,l=typeof d,p=typeof v;if(l==="undefined"||p==="undefined")return!1;switch(w){case"=":a=I(d,v);break;case"!=":a=!I(d,v);break}return a}function _(d,v,w){var a,l=typeof d,p=typeof v,S=l==="undefined"||l==="string"||l==="number",x=p==="undefined"||p==="string"||p==="number";if(!S||!x)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?v:d};if(!(l==="undefined"||p==="undefined")){if(l!==p)throw{code:"T2009",stack:new Error().stack,value:d,value2:v};switch(w){case"<":a=d<v;break;case"<=":a=d<=v;break;case">":a=d>v;break;case">=":a=d>=v;break}return a}}function Q(d,v){var w=!1;if(typeof d>"u"||typeof v>"u")return!1;Array.isArray(v)||(v=[v]);for(var a=0;a<v.length;a++)if(v[a]===d){w=!0;break}return w}async function ye(d,v,w){var a,l=_e(d);switch(w){case"and":a=l&&_e(await v());break;case"or":a=l||_e(await v());break}return a}function _e(d){var v=o.boolean(d);return typeof v>"u"?!1:v}function De(d,v){var w,a="",l="";return typeof d<"u"&&(a=o.string(d)),typeof v<"u"&&(l=o.string(v)),w=a.concat(l),w}async function T(d,v,w){var a=Object.create(null),l=Object.create(null),p=!!(v&&v.tupleStream),S={options:w.base.options,createSequence:w.base.createSequence};Array.isArray(v)||(w.base.options,v=S.createSequence(v)),v.length===0&&!p&&v.push(void 0);for(var x=0;x<v.length;x++)for(var L=v[x],B=p?z(w,L):w,K=0;K<d.lhs.length;K++){var we=d.lhs[K],oe=await $(we[0],p?L["@"]:L,B);if(typeof oe!="string"&&oe!==void 0)throw{code:"T1003",stack:new Error().stack,position:d.position,value:oe};if(oe!==void 0){if(oe==="_jsonata_lambda"||oe==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:d.position,value:oe};var Fe={data:L,exprIndex:K};if(Object.prototype.hasOwnProperty.call(l,oe)){if(l[oe].exprIndex!==K)throw{code:"D1009",stack:new Error().stack,position:d.position,value:oe};l[oe].data=o.append.call(S,l[oe].data,L)}else l[oe]=Fe}}let He=await Promise.all(c.keys(l).map(async(rt,Le)=>{let Ze=l[rt];var Yt=Ze.data,xt=w;if(p){var ds=M(Ze.data,w);Yt=ds["@"],delete ds["@"],xt=z(w,ds)}return w.isParallelCall=Le>0,[rt,await $(d.lhs[Ze.exprIndex][1],Yt,xt)]}));for(let rt of He){var[oe,We]=await rt;typeof We<"u"&&(a[oe]=We)}return a}function M(d,v){if(!Array.isArray(d))return d;var w=Object.create(null),a={options:v.base.options,createSequence:v.base.createSequence};Object.assign(w,d[0]);for(var l=1;l<d.length;l++)for(const p of c.keys(d[l]))w[p]=o.append.call(a,w[p],d[l][p]);return w}function D(d,v,w){var a;if(typeof d<"u"&&!Number.isInteger(d))throw{code:"T2003",stack:new Error().stack,value:d};if(typeof v<"u"&&!Number.isInteger(v))throw{code:"T2004",stack:new Error().stack,value:v};if(typeof d>"u"||typeof v>"u"||d>v)return a;var l=v-d+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(w.base.options&&l>w.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};a=new Array(l);for(var p=d,S=0;p<=v;p++,S++)a[S]=p;return a.sequence=!0,a}async function j(d,v,w){var a=await $(d.rhs,v,w);return w.bind(d.lhs.value,a),a}async function V(d,v,w){var a,l=await $(d.condition,v,w);return o.boolean(l)?a=await $(d.then,v,w):typeof d.else<"u"&&(a=await $(d.else,v,w)),a}async function H(d,v,w){for(var a,l=Xt(w),p=0;p<d.expressions.length;p++)a=await $(d.expressions[p],v,l);return a}function F(d,v,w){var a=new w.base.RegexEngine(d.value),l=function(p,S){var x;a.lastIndex=S||0;var L=a.exec(p);if(L!==null){if(x={match:L[0],start:L.index,end:L.index+L[0].length,groups:[]},L.length>1)for(var B=1;B<L.length;B++)x.groups.push(L[B]);x.next=function(){if(!(a.lastIndex>=p.length)){var K=l(p,a.lastIndex);if(K&&K.match==="")throw{code:"D1004",stack:new Error().stack,position:d.position,value:d.value.source};return K}}}return x};return l}function Y(d,v,w){var a;return d.value===""?a=v&&v.outerWrapper?v[0]:v:a=w.lookup(d.value),a}async function ae(d,v,w){var a,l=v,p=!!v.tupleStream,S=async function(L,B){for(var K=0,we=0;K===0&&we<d.terms.length;we++){var oe=d.terms[we],Fe=L,He=w;p&&(Fe=L["@"],He=z(w,L));var We=await $(oe.expression,Fe,He);Fe=B,He=w,p&&(Fe=B["@"],He=z(w,B));var rt=await $(oe.expression,Fe,He),Le=typeof We,Ze=typeof rt;if(Le==="undefined"){K=Ze==="undefined"?0:1;continue}if(Ze==="undefined"){K=-1;continue}if(!(Le==="string"||Le==="number")||!(Ze==="string"||Ze==="number"))throw{code:"T2008",stack:new Error().stack,position:d.position,value:Le==="string"||Le==="number"?rt:We};if(Le!==Ze)throw{code:"T2007",stack:new Error().stack,position:d.position,value:We,value2:rt};We!==rt&&(We<rt?K=-1:K=1,oe.descending===!0&&(K=-K))}return K===1},x={environment:w,input:v};return a=await o.sort.apply(x,[l,S]),a}function xe(d,v,w){var a=async function(l){if(!(typeof l>"u")){var p=w.lookup("clone");if(!O(p))throw{code:"T2013",stack:new Error().stack,position:d.position};var S=await $e(p,[l],null,w),x=await $(d.pattern,S,w);if(typeof x<"u"){Array.isArray(x)||(x=[x]);for(var L=0;L<x.length;L++){var B=x[L],K=await $(d.update,B,w),we=typeof K;if(we!=="undefined"){if(we!=="object"||K===null||Array.isArray(K))throw{code:"T2011",stack:new Error().stack,position:d.update.position,value:K};for(const We of c.keys(K))B[We]=K[We]}if(typeof d.delete<"u"){var oe=await $(d.delete,B,w);if(typeof oe<"u"){var Fe=oe;if(Array.isArray(oe)||(oe=[oe]),!f(oe))throw{code:"T2012",stack:new Error().stack,position:d.delete.position,value:Fe};for(var He=0;He<oe.length;He++)typeof B=="object"&&B!==null&&delete B[oe[He]]}}}}return S}};return Z(a,"<(oa):o>")}var ge=h("function($f, $g) { function($x){ $g($f($x)) } }");async function fe(d,v,w){var a,l=await $(d.lhs,v,w);if(d.rhs.type==="function")a=await he(d.rhs,v,w,{context:l});else{var p=await $(d.rhs,v,w);if(!O(p))throw{code:"T2006",stack:new Error().stack,position:d.position,value:p};if(O(l)){var S=await $(ge,null,w);a=await $e(S,[l,p],null,w)}else a=await $e(p,[l],null,w)}return a}async function he(d,v,w,a){var l,p=await $(d.procedure,v,w);if(typeof p>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};var S=[];typeof a<"u"&&S.push(a.context);for(var x=0;x<d.arguments.length;x++){const B=await $(d.arguments[x],v,w);if(O(B)){const K=async function(...we){return await $e(B,we,null,w)};K.arity=y(B),S.push(K)}else S.push(B)}var L=d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value;try{typeof p=="object"&&(p.token=L,p.position=d.position),l=await $e(p,S,v,w)}catch(B){throw B.position||(B.position=d.position),B.token||(B.token=L),B}return l}async function $e(d,v,w,a){var l;for(l=await de(d,v,w,a);N(l)&&l.thunk===!0;){var p=await $(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(p.token=l.body.procedure.value),p.position=l.body.procedure.position;for(var S=[],x=0;x<l.body.arguments.length;x++)S.push(await $(l.body.arguments[x],l.input,l.environment));l=await de(p,S,w,a)}return l}async function de(d,v,w,a){var l;try{var p=v;if(d&&(p=_t(d.signature,v,w)),N(d))l=await st(d,p);else if(d&&d._jsonata_function===!0){var S={environment:a,input:w,options:a.base.options,createSequence:a.base.createSequence};l=d.implementation.apply(S,p),U(l)&&(l=l.next().value),P(l)&&(l=await l)}else if(typeof d=="function")l=d.apply(w,p),P(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(x){throw d&&(typeof x.token>"u"&&typeof d.token<"u"&&(x.token=d.token),x.position=d.position||x.position),x}return l}function ft(d,v,w){var a={_jsonata_lambda:!0,input:v,environment:w,arguments:d.arguments,signature:d.signature,body:d.body};return d.thunk===!0&&(a.thunk=!0),a.apply=async function(l,p){return await $e(a,p,v,l?l.environment:w)},a}async function Kt(d,v,w){for(var a,l=[],p=0;p<d.arguments.length;p++){var S=d.arguments[p];S.type==="operator"&&S.value==="?"?l.push(S):l.push(await $(S,v,w))}var x=await $(d.procedure,v,w);if(typeof x>"u"&&d.procedure.type==="path"&&w.lookup(d.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:d.position,token:d.procedure.steps[0].value};if(N(x))a=Pt(x,l,w);else if(x&&x._jsonata_function===!0)a=_s(x.implementation,l,w);else if(typeof x=="function")a=_s(x,l,w);else throw{code:"T1008",stack:new Error().stack,position:d.position,token:d.procedure.type==="path"?d.procedure.steps[0].value:d.procedure.value};return a}function _t(d,v,w){if(typeof d>"u")return v;var a=d.validate(v,w);return a}async function st(d,v){var w,a=Xt(d.environment);return Array.prototype.forEach.call(d.arguments,function(l,p){a.bind(l.value,v[p])}),typeof d.body=="function"?w=await $r(d.body,a):w=await $(d.body,d.input,a),w}function Pt(d,v,w){var a=Xt(d.environment||w),l=[];Array.prototype.forEach.call(d.arguments,function(S,x){var L=v[x];L&&L.type==="operator"&&L.value==="?"?l.push(S):a.bind(S.value,L)});var p={_jsonata_lambda:!0,input:d.input,environment:a,arguments:l,body:d.body};return p}function _s(d,v,w){var a=Dr(d);a=a.map(function(x){return"$"+x.trim()});var l="function("+a.join(", ")+"){ _ }",p=h(l);p.body=d;var S=Pt(p,v,w);return S}async function $r(d,v){var w=Dr(d),a=w.map(function(S){return v.lookup(S.trim())}),l={environment:v,createSequence:v.base.createSequence},p=d.apply(l,a);return P(p)&&(p=await p),p}function Dr(d){var v=d.toString(),w=/\(([^)]*)\)/.exec(v)[1],a=w.split(",");return a}function Z(d,v){var w={_jsonata_function:!0,implementation:d};return typeof v<"u"&&(w.signature=b(v)),w}async function en(d,v){if(!(typeof d>"u")){var w=this.input;typeof v<"u"&&(w=v,Array.isArray(w)&&!E(w)&&(w=this.createSequence(w),w.outerWrapper=!0));try{var a=h(d,!1)}catch(p){throw hs(p),{stack:new Error().stack,code:"D3120",value:p.message,error:p}}try{var l=await $(a,w,this.environment)}catch(p){throw hs(p),{stack:new Error().stack,code:"D3121",value:p.message,error:p}}return l}}function tn(d){if(!(typeof d>"u"))return JSON.parse(o.string(d))}function Xt(d){var v=Object.create(null);const w={bind:function(l,p){v[l]=p},lookup:function(l){var p;return Object.prototype.hasOwnProperty.call(v,l)?p=v[l]:d&&(p=d.lookup(l)),p},timestamp:d?d.timestamp:null,async:d?d.async:!1,isParallelCall:d?d.isParallelCall:!1,global:d?d.global:{ancestry:[null]}};if(d){var a=d.lookup(Symbol.for("jsonata.__createFrame_push"));a&&a(d,w),w.base=d.base}return w}C.bind("sum",Z(o.sum,"<a<n>:n>")),C.bind("count",Z(o.count,"<a:n>")),C.bind("max",Z(o.max,"<a<n>:n>")),C.bind("min",Z(o.min,"<a<n>:n>")),C.bind("average",Z(o.average,"<a<n>:n>")),C.bind("string",Z(o.string,"<x-b?:s>")),C.bind("substring",Z(o.substring,"<s-nn?:s>")),C.bind("substringBefore",Z(o.substringBefore,"<s-s:s>")),C.bind("substringAfter",Z(o.substringAfter,"<s-s:s>")),C.bind("lowercase",Z(o.lowercase,"<s-:s>")),C.bind("uppercase",Z(o.uppercase,"<s-:s>")),C.bind("length",Z(o.length,"<s-:n>")),C.bind("trim",Z(o.trim,"<s-:s>")),C.bind("pad",Z(o.pad,"<s-ns?:s>")),C.bind("match",Z(o.match,"<s-f<s:o>n?:a<o>>")),C.bind("contains",Z(o.contains,"<s-(sf):b>")),C.bind("replace",Z(o.replace,"<s-(sf)(sf)n?:s>")),C.bind("split",Z(o.split,"<s-(sf)n?:a<s>>")),C.bind("join",Z(o.join,"<a<s>s?:s>")),C.bind("formatNumber",Z(o.formatNumber,"<n-so?:s>")),C.bind("formatBase",Z(o.formatBase,"<n-n?:s>")),C.bind("formatInteger",Z(n.formatInteger,"<n-s:s>")),C.bind("parseInteger",Z(n.parseInteger,"<s-s:n>")),C.bind("number",Z(o.number,"<(nsb)-:n>")),C.bind("floor",Z(o.floor,"<n-:n>")),C.bind("ceil",Z(o.ceil,"<n-:n>")),C.bind("round",Z(o.round,"<n-n?:n>")),C.bind("abs",Z(o.abs,"<n-:n>")),C.bind("sqrt",Z(o.sqrt,"<n-:n>")),C.bind("power",Z(o.power,"<n-n:n>")),C.bind("random",Z(o.random,"<:n>")),C.bind("boolean",Z(o.boolean,"<x-:b>")),C.bind("not",Z(o.not,"<x-:b>")),C.bind("map",Z(o.map,"<af>")),C.bind("zip",Z(o.zip,"<a+>")),C.bind("filter",Z(o.filter,"<af>")),C.bind("single",Z(o.single,"<af?>")),C.bind("reduce",Z(o.foldLeft,"<afj?:j>")),C.bind("sift",Z(o.sift,"<o-f?:o>")),C.bind("keys",Z(o.keys,"<x-:a<s>>")),C.bind("lookup",Z(o.lookup,"<x-s:x>")),C.bind("append",Z(o.append,"<xx:a>")),C.bind("exists",Z(o.exists,"<x:b>")),C.bind("spread",Z(o.spread,"<x-:a<o>>")),C.bind("merge",Z(o.merge,"<a<o>:o>")),C.bind("reverse",Z(o.reverse,"<a:a>")),C.bind("each",Z(o.each,"<o-f:a>")),C.bind("error",Z(o.error,"<s?:x>")),C.bind("assert",Z(o.assert,"<bs?:x>")),C.bind("type",Z(o.type,"<x:s>")),C.bind("sort",Z(o.sort,"<af?:a>")),C.bind("shuffle",Z(o.shuffle,"<a:a>")),C.bind("distinct",Z(o.distinct,"<x:x>")),C.bind("base64encode",Z(o.base64encode,"<s-:s>")),C.bind("base64decode",Z(o.base64decode,"<s-:s>")),C.bind("encodeUrlComponent",Z(o.encodeUrlComponent,"<s-:s>")),C.bind("encodeUrl",Z(o.encodeUrl,"<s-:s>")),C.bind("decodeUrlComponent",Z(o.decodeUrlComponent,"<s-:s>")),C.bind("decodeUrl",Z(o.decodeUrl,"<s-:s>")),C.bind("eval",Z(en,"<sx?:x>")),C.bind("toMillis",Z(n.toMillis,"<s-s?:n>")),C.bind("fromMillis",Z(n.fromMillis,"<n-s?s?:s>")),C.bind("clone",Z(tn,"<(oa)-:o>"));var li={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 hs(d){var v=li[d.code];if(typeof v<"u"){var w=v.replace(/\{\{\{([^}]+)}}}/g,function(){return d[arguments[1]]});w=w.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(d[arguments[1]])}),d.message=w}}function ar(d,v){var w,a;try{w=h(d,v&&v.recover),a=w.errors,delete w.errors}catch(S){throw hs(S),S}var l=Xt(C),p=new Date;return l.bind("now",Z(function(S,x){return n.fromMillis(p.getTime(),S,x)},"<s?s?:s>")),l.bind("millis",Z(function(){return p.getTime()},"<:n>")),{evaluate:async function(S,x,L){if(typeof a<"u"){var B={code:"S0500",position:0};throw hs(B),B}const K=Xt(l);for(const oe of c.keys(x))K.bind(oe,x[oe]);if(K.bind("$",S),p=new Date,K.timestamp=p,K.options=v,K.createSequence=function(){var oe=[];return v&&v.sequence&&(oe.push=function(...Fe){if(oe.length+Fe.length>v.sequence)throw{code:"D2015",stack:new Error().stack,value:v.sequence};return Array.prototype.push.apply(oe,Fe)}),oe.sequence=!0,arguments.length===1&&oe.push(arguments[0]),oe},Array.isArray(S)&&!E(S)&&(S=K.createSequence(S),S.outerWrapper=!0),v&&(v.timeout||v.stack)){const oe=Date.now();K.guardrails=function(){if(v.stack>0&&K.depth>v.stack)throw{code:"D1011",value:v.stack,stack:new Error().stack};if(v.timeout>0&&Date.now()-oe>v.timeout)throw{code:"D1012",value:v.timeout,stack:new Error().stack}}}else K.guardrails=function(){};K.base=K,K.depth=0,v&&v.RegexEngine?K.RegexEngine=v.RegexEngine:K.RegexEngine=RegExp;var we;try{return we=await $(w,S,K),typeof L=="function"&&L(null,we),we}catch(oe){throw hs(oe),oe}},assign:function(S,x){l.bind(S,x)},registerFunction:function(S,x,L){var B=Z(x,L);l.bind(S,B)},ast:function(){return w},errors:function(){return a}}}return ar.parser=h,ar})();r.exports=k},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(s,r,i){var n=s("./signature");const o=(()=>{var c={".":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},h={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
73
|
-
`,r:"\r",t:" "},b=function(g){var f=0,A=g.length,E=function(U,
|
|
74
|
-
\r\v`.indexOf(
|
|
75
|
-
\r\v`.indexOf(pe)>-1||Object.prototype.hasOwnProperty.call(c,pe)){if(g.charAt(f)==="$")return ie=g.substring(f+1,le),f=le,E("variable",ie);switch(ie=g.substring(f,le),f=le,ie){case"or":case"in":case"and":return E("operator",ie);case"true":return E("value",!0);case"false":return E("value",!1);case"null":return E("value",null);default:return f===A&&ie===""?null:E("name",ie)}}else le++};return N},k=function(g,f){var A,E,O=Object.create(null),N=[],U=function(){var m=[];A.id!=="(end)"&&m.push({type:A.type,value:A.value,position:A.position});for(var _=E();_!==null;)m.push(_),_=E();return m},P={nud:function(){var m={code:"S0211",token:this.value,position:this.position};if(f)return m.remaining=U(),m.type="error",N.push(m),m;throw m.stack=new Error().stack,m}},y=function(m,_){var Q=O[m];return _=_||0,Q?_>=Q.lbp&&(Q.lbp=_):(Q=Object.create(P),Q.id=Q.value=m,Q.lbp=_,O[m]=Q),Q},I=function(m){if(f){m.remaining=U(),N.push(m);var _=O["(error)"];return A=Object.create(_),A.error=m,A.type="(error)",A}else throw m.stack=new Error().stack,m},C=function(m,_){if(m&&A.id!==m){var Q;A.id==="(end)"?Q="S0203":Q="S0202";var ye={code:Q,position:A.position,token:A.value,value:m};return I(ye)}var _e=E(_);if(_e===null)return A=O["(end)"],A.position=g.length,A;var De=_e.value,T=_e.type,M;switch(T){case"name":case"variable":M=O["(name)"];break;case"operator":if(M=O[De],!M)return I({code:"S0204",stack:new Error().stack,position:_e.position,token:De});break;case"string":case"number":case"value":M=O["(literal)"];break;case"regex":T="regex",M=O["(regex)"];break;default:return I({code:"S0205",stack:new Error().stack,position:_e.position,token:De})}return A=Object.create(M),A.value=De,A.type=T,A.position=_e.position,A},$=function(m){var _,Q=A;for(C(null,!0),_=Q.nud();m<A.lbp;)Q=A,C(),_=Q.led(_);return _},G=function(m){var _=y(m,0);_.nud=function(){return this}},z=function(m,_,Q){var ye=_||c[m],_e=y(m,ye);return _e.led=Q||function(De){return this.lhs=De,this.rhs=$(ye),this.type="binary",this},_e},ne=function(m,_,Q){var ye=y(m,_);return ye.led=Q,ye},se=function(m,_){var Q=y(m);return Q.nud=_||function(){return this.expression=$(70),this.type="unary",this},Q};G("(end)"),G("(name)"),G("(literal)"),G("(regex)"),y(":"),y(";"),y(","),y(")"),y("]"),y("}"),y(".."),z("."),z("+"),z("-"),z("*"),z("/"),z("%"),z("="),z("<"),z(">"),z("!="),z("<="),z(">="),z("&"),z("and"),z("or"),z("in"),G("and"),G("or"),G("in"),se("-"),z("~>"),z("??",c["??"],function(m){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(m))]},this.then=m,this.else=$(0),this}),ne("(error)",10,function(m){return this.lhs=m,this.error=A.error,this.remaining=U(),this.type="error",this}),se("*",function(){return this.type="wildcard",this}),se("**",function(){return this.type="descendant",this}),se("%",function(){return this.type="parent",this}),z("(",c["("],function(m){if(this.procedure=m,this.type="function",this.arguments=[],A.id!==")")for(;A.type==="operator"&&A.id==="?"?(this.type="partial",this.arguments.push(A),C("?")):this.arguments.push($(0)),A.id===",";)C(",");if(C(")",!0),m.type==="name"&&(m.value==="function"||m.value==="λ")){if(this.arguments.forEach(function(De,T){if(De.type!=="variable")return I({code:"S0208",stack:new Error().stack,position:De.position,token:De.value,value:T+1})}),this.type="lambda",A.id==="<"){for(var _=A.position,Q=1,ye="<";Q>0&&A.id!=="{"&&A.id!=="(end)";){var _e=C();_e.id===">"?Q--:_e.id==="<"&&Q++,ye+=_e.value}C(">");try{this.signature=n(ye)}catch(De){return De.position=_+De.offset,I(De)}}C("{"),this.body=$(0),C("}")}return this}),se("(",function(){for(var m=[];A.id!==")"&&(m.push($(0)),A.id===";");)C(";");return C(")",!0),this.type="block",this.expressions=m,this}),se("[",function(){var m=[];if(A.id!=="]")for(;;){var _=$(0);if(A.id===".."){var Q={type:"binary",value:"..",position:A.position,lhs:_};C(".."),Q.rhs=$(0),_=Q}if(m.push(_),A.id!==",")break;C(",")}return C("]",!0),this.expressions=m,this.type="unary",this}),z("[",c["["],function(m){if(A.id==="]"){for(var _=m;_&&_.type==="binary"&&_.value==="[";)_=_.lhs;return _.keepArray=!0,C("]"),m}else return this.lhs=m,this.rhs=$(c["]"]),this.type="binary",C("]",!0),this}),z("^",c["^"],function(m){C("(");for(var _=[];;){var Q={descending:!1};if(A.id==="<"?C("<"):A.id===">"&&(Q.descending=!0,C(">")),Q.expression=$(0),_.push(Q),A.id!==",")break;C(",")}return C(")"),this.lhs=m,this.rhs=_,this.type="binary",this});var ie=function(m){var _=[];if(A.id!=="}")for(;;){var Q=$(0);C(":");var ye=$(0);if(_.push([Q,ye]),A.id!==",")break;C(",")}return C("}",!0),typeof m>"u"?(this.lhs=_,this.type="unary"):(this.lhs=m,this.rhs=_,this.type="binary"),this};se("{",ie),z("{",c["{"],ie),ne(":=",c[":="],function(m){return m.type!=="variable"?I({code:"S0212",stack:new Error().stack,position:m.position,token:m.value}):(this.lhs=m,this.rhs=$(c[":="]-1),this.type="binary",this)}),z("@",c["@"],function(m){return this.lhs=m,this.rhs=$(c["@"]),this.rhs.type!=="variable"?I({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),z("#",c["#"],function(m){return this.lhs=m,this.rhs=$(c["#"]),this.rhs.type!=="variable"?I({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),z("?",c["?"],function(m){return this.type="condition",this.condition=m,this.then=$(0),A.id===":"&&(C(":"),this.else=$(0)),this}),z("?:",c["?:"],function(m){return this.type="condition",this.condition=JSON.parse(JSON.stringify(m)),this.then=m,this.else=$(0),this}),se("|",function(){return this.type="transform",this.pattern=$(0),C("|"),this.update=$(0),A.id===","&&(C(","),this.delete=$(0)),C("|"),this});var q=function(m){var _;if(m.type==="function"&&!m.predicate){var Q={type:"lambda",thunk:!0,arguments:[],position:m.position};Q.body=m,_=Q}else if(m.type==="condition")m.then=q(m.then),typeof m.else<"u"&&(m.else=q(m.else)),_=m;else if(m.type==="block"){var ye=m.expressions.length;ye>0&&(m.expressions[ye-1]=q(m.expressions[ye-1])),_=m}else _=m;return _},le=0,pe=0,Ue=[],ue=function(m,_){switch(m.type){case"name":case"wildcard":_.level--,_.level===0&&(typeof m.ancestor>"u"||(Ue[_.index].slot.label=m.ancestor.label),m.ancestor=_,m.tuple=!0);break;case"parent":_.level++;break;case"block":m.expressions.length>0&&(m.tuple=!0,_=ue(m.expressions[m.expressions.length-1],_));break;case"path":m.tuple=!0;var Q=m.steps.length-1;for(_=ue(m.steps[Q--],_);_.level>0&&Q>=0;)_=ue(m.steps[Q--],_);break;default:throw{code:"S0217",token:m.type,position:m.position}}return _},me=function(m,_){if(typeof _.seekingParent<"u"||_.type==="parent"){var Q=typeof _.seekingParent<"u"?_.seekingParent:[];_.type==="parent"&&Q.push(_.slot),typeof m.seekingParent>"u"?m.seekingParent=Q:Array.prototype.push.apply(m.seekingParent,Q)}},ke=function(m){var _=m.steps.length-1,Q=m.steps[_],ye=typeof Q.seekingParent<"u"?Q.seekingParent:[];Q.type==="parent"&&ye.push(Q.slot);for(var _e=0;_e<ye.length;_e++){var De=ye[_e];for(_=m.steps.length-2;De.level>0;){if(_<0){typeof m.seekingParent>"u"?m.seekingParent=[De]:m.seekingParent.push(De);break}for(var T=m.steps[_--];_>=0&&T.focus&&m.steps[_].focus;)T=m.steps[_--];De=ue(T,De)}}},ce=function(m){var _;switch(m.type){case"binary":switch(m.value){case".":var Q=ce(m.lhs);Q.type==="path"?_=Q:_={type:"path",steps:[Q]},Q.type==="parent"&&(_.seekingParent=[Q.slot]);var ye=ce(m.rhs);ye.type==="path"?Array.prototype.push.apply(_.steps,ye.steps):(typeof ye.predicate<"u"&&(ye.stages=ye.predicate,delete ye.predicate),_.steps.push(ye)),_.steps.filter(function(Y){if(Y.type==="number"||Y.type==="value")throw{code:"S0213",stack:new Error().stack,position:Y.position,value:Y.value};return Y.type==="string"}).forEach(function(Y){Y.type="name"}),_.steps.filter(function(Y){return Y.keepArray===!0}).length>0&&(_.keepSingletonArray=!0);var _e=_.steps[0];_e.type==="unary"&&_e.value==="["&&(_e.consarray=!0);var De=_.steps[_.steps.length-1];De.type==="unary"&&De.value==="["&&(De.consarray=!0),ke(_);break;case"[":_=ce(m.lhs);var T=_,M="predicate";if(_.type==="path"&&(T=_.steps[_.steps.length-1],M="stages"),typeof T.group<"u")throw{code:"S0209",stack:new Error().stack,position:m.position};typeof T[M]>"u"&&(T[M]=[]);var D=ce(m.rhs);typeof D.seekingParent<"u"&&(D.seekingParent.forEach(Y=>{Y.level===1?ue(T,Y):Y.level--}),me(T,D)),T[M].push({type:"filter",expr:D,position:m.position});break;case"{":if(_=ce(m.lhs),typeof _.group<"u")throw{code:"S0210",stack:new Error().stack,position:m.position};_.group={lhs:m.rhs.map(function(Y){return[ce(Y[0]),ce(Y[1])]}),position:m.position};break;case"^":_=ce(m.lhs),_.type!=="path"&&(_={type:"path",steps:[_]});var j={type:"sort",position:m.position};j.terms=m.rhs.map(function(Y){var ae=ce(Y.expression);return me(j,ae),{descending:Y.descending,expression:ae}}),_.steps.push(j),ke(_);break;case":=":_={type:"bind",value:m.value,position:m.position},_.lhs=ce(m.lhs),_.rhs=ce(m.rhs),me(_,_.rhs);break;case"@":if(_=ce(m.lhs),T=_,_.type==="path"&&(T=_.steps[_.steps.length-1]),typeof T.stages<"u"||typeof T.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:m.position};if(T.type==="sort")throw{code:"S0216",stack:new Error().stack,position:m.position};m.keepArray&&(T.keepArray=!0),T.focus=m.rhs.value,T.tuple=!0;break;case"#":_=ce(m.lhs),T=_,_.type==="path"?T=_.steps[_.steps.length-1]:(_={type:"path",steps:[_]},typeof T.predicate<"u"&&(T.stages=T.predicate,delete T.predicate)),typeof T.stages>"u"?T.index=m.rhs.value:T.stages.push({type:"index",value:m.rhs.value,position:m.position}),T.tuple=!0;break;case"~>":_={type:"apply",value:m.value,position:m.position},_.lhs=ce(m.lhs),_.rhs=ce(m.rhs),_.keepArray=_.lhs.keepArray||_.rhs.keepArray;break;default:_={type:m.type,value:m.value,position:m.position},_.lhs=ce(m.lhs),_.rhs=ce(m.rhs),me(_,_.lhs),me(_,_.rhs)}break;case"unary":_={type:m.type,value:m.value,position:m.position},m.value==="["?_.expressions=m.expressions.map(function(Y){var ae=ce(Y);return me(_,ae),ae}):m.value==="{"?_.lhs=m.lhs.map(function(Y){var ae=ce(Y[0]);me(_,ae);var xe=ce(Y[1]);return me(_,xe),[ae,xe]}):(_.expression=ce(m.expression),m.value==="-"&&_.expression.type==="number"?(_=_.expression,_.value=-_.value):me(_,_.expression));break;case"function":case"partial":_={type:m.type,name:m.name,value:m.value,position:m.position},_.arguments=m.arguments.map(function(Y){var ae=ce(Y);return me(_,ae),ae}),_.procedure=ce(m.procedure);break;case"lambda":_={type:m.type,arguments:m.arguments,signature:m.signature,position:m.position};var V=ce(m.body);_.body=q(V);break;case"condition":_={type:m.type,position:m.position},_.condition=ce(m.condition),me(_,_.condition),_.then=ce(m.then),me(_,_.then),typeof m.else<"u"&&(_.else=ce(m.else),me(_,_.else));break;case"transform":_={type:m.type,position:m.position},_.pattern=ce(m.pattern),_.update=ce(m.update),typeof m.delete<"u"&&(_.delete=ce(m.delete));break;case"block":_={type:m.type,position:m.position},_.expressions=m.expressions.map(function(Y){var ae=ce(Y);return me(_,ae),(ae.consarray||ae.type==="path"&&ae.steps[0].consarray)&&(_.consarray=!0),ae});break;case"name":_={type:"path",steps:[m]},m.keepArray&&(_.keepSingletonArray=!0);break;case"parent":_={type:"parent",slot:{label:"!"+le++,level:1,index:pe++}},Ue.push(_);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":_=m;break;case"operator":if(m.value==="and"||m.value==="or"||m.value==="in")m.type="name",_=ce(m);else if(m.value==="?")_=m;else throw{code:"S0201",stack:new Error().stack,position:m.position,token:m.value};break;case"error":_=m,m.lhs&&(_=ce(m.lhs));break;default:var H="S0206";m.id==="(end)"&&(H="S0207");var F={code:H,position:m.position,token:m.value};if(f)return N.push(F),{type:"error",error:F};throw F.stack=new Error().stack,F}return m.keepArray&&(_.keepArray=!0),_};E=b(g),C();var W=$(0);if(A.id!=="(end)"){var Pe={code:"S0201",position:A.position,token:A.value};I(Pe)}if(W=ce(W),W.type==="parent"||typeof W.seekingParent<"u")throw{code:"S0217",token:W.type,position:W.position};return N.length>0&&(W.errors=N),W};return k})();r.exports=o},{"./signature":5}],5:[function(s,r,i){var n=s("./utils");const o=(()=>{var c={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function h(b){for(var k=1,g=[],f=Object.create(null),A=f;k<b.length;){var E=b.charAt(k);if(E===":")break;var O=function(){g.push(f),A=f,f=Object.create(null)},N=function(z,ne,se,ie){for(var q=1,le=ne;le<z.length;)if(le++,E=z.charAt(le),E===ie){if(q--,q===0)break}else E===se&&q++;return le};switch(E){case"s":case"n":case"b":case"l":case"o":f.regex="["+E+"m]",f.type=E,O();break;case"a":f.regex="[asnblfom]",f.type=E,f.array=!0,O();break;case"f":f.regex="f",f.type=E,O();break;case"j":f.regex="[asnblom]",f.type=E,O();break;case"x":f.regex="[asnblfom]",f.type=E,O();break;case"-":A.context=!0,A.contextRegex=new RegExp(A.regex),A.regex+="?";break;case"?":case"+":A.regex+=E;break;case"(":var U=N(b,k,"(",")"),P=b.substring(k+1,U);if(P.indexOf("<")===-1)f.regex="["+P+"m]";else throw{code:"S0402",stack:new Error().stack,value:P,offset:k};f.type="("+P+")",k=U,O();break;case"<":if(A.type==="a"||A.type==="f"){var y=N(b,k,"<",">");A.subtype=b.substring(k+1,y),k=y}else throw{code:"S0401",stack:new Error().stack,value:A.type,offset:k};break}k++}var I="^"+g.map(function(z){return"("+z.regex+")"}).join("")+"$",C=new RegExp(I),$=function(z){var ne;if(n.isFunction(z))ne="f";else{var se=typeof z;switch(se){case"string":ne="s";break;case"number":ne="n";break;case"boolean":ne="b";break;case"object":z===null?ne="l":Array.isArray(z)?ne="a":ne="o";break;case"undefined":default:ne="m"}}return ne},G=function(z,ne){for(var se="^",ie=0,q=0;q<g.length;q++){se+=g[q].regex;var le=ne.match(se);if(le===null)throw{code:"T0410",stack:new Error().stack,value:z[ie],index:ie+1};ie=le[0].length}throw{code:"T0410",stack:new Error().stack,value:z[ie],index:ie+1}};return{definition:b,validate:function(z,ne){var se="";z.forEach(function(pe){se+=$(pe)});var ie=C.exec(se);if(ie){var q=[],le=0;return g.forEach(function(pe,Ue){var ue=z[le],me=ie[Ue+1];if(me==="")if(pe.context&&pe.contextRegex){var ke=$(ne);if(pe.contextRegex.test(ke))q.push(ne);else throw{code:"T0411",stack:new Error().stack,value:ne,index:le+1}}else q.push(ue),le++;else me.split("").forEach(function(ce){if(ue=z[le],pe.type==="a"){if(ce==="m")ue=void 0;else{var W=!0;if(typeof pe.subtype<"u"){if(ce!=="a"&&me!==pe.subtype)W=!1;else if(ce==="a"&&ue.length>0){var Pe=$(ue[0]);if(Pe!==pe.subtype.charAt(0))W=!1;else{var m=ue.filter(function(_){return $(_)!==Pe});W=m.length===0}}}if(!W)throw{code:"T0412",stack:new Error().stack,value:ue,index:le+1,type:c[pe.subtype]};ce!=="a"&&(ue=[ue])}q.push(ue),le++}else q.push(ue),le++})}),q}G(z,se)}}}return h})();r.exports=o},{"./utils":6}],6:[function(s,r,i){const n=(()=>{function o(y){var I=!1;if(typeof y=="number"&&(I=!isNaN(y),I&&!isFinite(y)))throw{code:"D1001",value:y,stack:new Error().stack};return I}function c(y){var I=!1;return Array.isArray(y)&&(I=y.filter(function(C){return typeof C!="string"}).length===0),I}function h(y){var I=!1;return Array.isArray(y)&&(I=y.filter(function(C){return!o(C)}).length===0),I}function b(y){return y.sequence===!0&&Array.isArray(y)}function k(y){return y&&(y._jsonata_function===!0||y._jsonata_lambda===!0)||typeof y=="function"}function g(y){var I=typeof y.arity=="number"?y.arity:typeof y.implementation=="function"?y.implementation.length:typeof y.length=="number"?y.length:y.arguments.length;return I}function f(y){return y&&y._jsonata_lambda===!0}var A=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function E(y){return typeof y=="object"&&y!==null&&A in y&&"next"in y&&typeof y.next=="function"}function O(y,I){if(y===I)return!0;if(typeof y=="object"&&typeof I=="object"&&y!==null&&I!==null){if(Array.isArray(y)&&Array.isArray(I)){if(y.length!==I.length)return!1;for(var C=0;C<y.length;C++)if(!O(y[C],I[C]))return!1;return!0}var $=Object.getOwnPropertyNames(y),G=Object.getOwnPropertyNames(I);if($.length!==G.length)return!1;for($=$.sort(),G=G.sort(),C=0;C<$.length;C++)if($[C]!==G[C])return!1;for(C=0;C<$.length;C++){var z=$[C];if(!O(y[z],I[z]))return!1}return!0}return!1}function N(y){return typeof y=="object"&&y!==null&&"then"in y&&typeof y.then=="function"}function U(y){var I=[];for(let C of y)I.push(C);return I}function P(y){return typeof y=="object"&&y!==null?Object.keys(y):[]}return{isNumeric:o,isArrayOfStrings:c,isArrayOfNumbers:h,isSequence:b,isFunction:k,isLambda:f,isIterable:E,getFunctionArity:g,isDeepEqual:O,stringToArray:U,isPromise:N,keys:P}})();r.exports=n},{}]},{},[3])(3)})})($n)),$n.exports}var Nc=Ic();const Fc=Jo(Nc);function Dn(t){return typeof t!="string"?null:t.trim()||null}function jc(t){if(t==null||t==="")return null;if(typeof t=="string")return Dn(t);if(typeof t!="object")return null;const e=t;return Dn(e.url)??Dn(e.blobUrl)}function En(t){return Array.isArray(t)&&t.length>0&&t.every(e=>typeof e=="number"&&Number.isFinite(e))}function ea(t,e){if(!En(t)||!En(e)||t.length!==e.length)return null;let s=0,r=0,i=0;for(let n=0;n<t.length;n++)s+=t[n]*e[n],r+=t[n]*t[n],i+=e[n]*e[n];return!r||!i?null:s/Math.sqrt(r*i)}function Rc(t,e,s,r=10,i=-1){if(!Array.isArray(t)||!Array.isArray(e)||!En(s))return[];const n=[];return t.forEach((o,c)=>{const h=ea(e[c],s);if(h===null||h<i)return;const b=o&&typeof o=="object"?o:{value:o};n.push({...b,_score:Math.round(h*1e4)/1e4})}),n.sort((o,c)=>c._score-o._score),n.slice(0,Math.max(0,r))}function zc(t){t.registerFunction("ucFirst",e=>Tr.ucFirst(String(e??""))),t.registerFunction("currency",(e,s="fr-FR",r="EUR")=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"currency",currency:String(r)}).format(i)}),t.registerFunction("percent",(e,s="fr-FR",r=0)=>{const i=Number(e);return Number.isNaN(i)?String(e??""):new Intl.NumberFormat(String(s),{style:"percent",maximumFractionDigits:Number(r)||0}).format(i)}),t.registerFunction("date",(e,s="fr-FR",r)=>{const i=e instanceof Date?e:new Date(String(e));if(Number.isNaN(i.getTime()))return String(e??"");let n={dateStyle:"medium"};if(r)try{n=JSON.parse(String(r))}catch{}return new Intl.DateTimeFormat(String(s),n).format(i)}),t.registerFunction("toChart",(e,s="label",r="value",i="")=>{const n=Array.isArray(e)?e:[],o=[],c=[];for(const h of n){if(!h||typeof h!="object")continue;const b=h;o.push(String(b[String(s)]??"")),c.push(Number(b[String(r)]??0))}return{labels:o,datasets:[{label:String(i||""),data:c}]}}),t.registerFunction("cosine",(e,s)=>ea(e,s)),t.registerFunction("rankBySimilarity",(e,s,r,i=10,n=-1)=>Rc(e,s,r,Number(i),Number(n))),t.registerFunction("mediaUrl",e=>jc(e))}const ta=new Map,sa=8e3;function Uc(t){if(!t||!t.trim())throw new Error("[sonic-jsonata] expression vide.");if(t.length>sa)throw new Error(`[sonic-jsonata] expression trop longue (${t.length} > ${sa}).`);const e=ta.get(t);if(e)return e;try{const s=Fc(t);return zc(s),ta.set(t,s),s}catch(s){const r=s instanceof Error?s.message:typeof s=="object"&&s&&"message"in s?String(s.message):String(s);throw new Error(`[sonic-jsonata] Syntaxe JSONata invalide : ${r}`)}}function qc(t,e){if(!e||typeof e!="object")return;const s=e.type;if(typeof s=="string"&&!(s==="array"&&Array.isArray(t)||s==="object"&&t!==null&&typeof t=="object"&&!Array.isArray(t)||s==="string"&&typeof t=="string"||s==="number"&&typeof t=="number"||s==="boolean"&&typeof t=="boolean"||s==="null"&&t===null))throw new Error(`[sonic-jsonata] outputSchema : type attendu "${s}", reçu ${Vc(t)}.`);if(Array.isArray(e.required)&&t&&typeof t=="object"){const r=t;for(const i of e.required)if(typeof i=="string"&&!(i in r))throw new Error(`[sonic-jsonata] outputSchema : propriété requise manquante "${i}".`)}}function Vc(t){return t===null?"null":Array.isArray(t)?"array":typeof t}const Bc=150,ra=10,Hc=200,Wc=16,ia=new WeakMap;let na=!1;function fs(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function mr(t){if(t===window)return{x:window.scrollX,y:window.scrollY};const e=t;return{x:e.scrollLeft,y:e.scrollTop}}function Kc(t,e,s){if(t===window){window.scrollTo(e,s);return}const r=t;typeof r.scrollTo=="function"?r.scrollTo(e,s):(r.scrollLeft=e,r.scrollTop=s)}function Yc(t){if(t===window){const s=document.documentElement;return Math.max(0,s.scrollHeight-window.innerHeight)}const e=t;return Math.max(0,e.scrollHeight-e.clientHeight)}function Gs(t){let e=ia.get(t);if(!e){const s=mr(t);e={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},ia.set(t,e)}return e}function Ti(t){Gs(t).userEngaged=!0}function Li(t){const e=Gs(t);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},Bc)}function oa(t,e){return e-t>=Hc}function vr(t){if(!fs())return;const e=Gs(t);if(e.restoring)return;const s=mr(t);if(oa(s.y,e.y)){Tn(t);return}e.x=s.x,e.y=s.y}function On(t){if(!fs())return;const e=Gs(t),s=Yc(t),r=e.x,i=s>0?Math.min(e.y,s):e.y,{x:n,y:o}=mr(t);if(!(Math.abs(r-n)<=ra&&Math.abs(i-o)<=ra)){e.restoring=!0;try{Kc(t,r,i)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Gc(t,e={x:0,y:0}){if(!fs())return;const s=Gs(t);if(e==="current"){const r=mr(t);s.x=r.x,s.y=r.y;return}s.x=e.x??0,s.y=e.y??0}function Tn(t){const e=Gs(t);if(e.stickyFrames=Wc,e.raf)return;const s=()=>{e.raf=0,On(t),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(s))};e.raf=requestAnimationFrame(s)}function Ln(t){Tn(t)}function Zs(t){if(!fs())return;const e=Gs(t);if(e.watching)return;e.watching=!0;const s=t===window?window:t,r=()=>{if(e.restoring)return;const{y:E}=mr(t);if(oa(E,e.y)){Tn(t);return}if(e.userEngaged){vr(t),Li(t);return}vr(t)},i=E=>aa(E)===t,n=E=>{i(E)&&(vr(t),Ti(t))},o=E=>{i(E)&&Li(t)},c=E=>{i(E)&&(vr(t),Ti(t),Li(t))};s.addEventListener("scroll",r,{passive:!0}),s.addEventListener("touchstart",n,{passive:!0}),s.addEventListener("touchend",o,{passive:!0}),s.addEventListener("touchcancel",o,{passive:!0}),s.addEventListener("wheel",c,{passive:!0}),s.addEventListener("pointerdown",n,{passive:!0}),s.addEventListener("pointerup",o,{passive:!0}),s.addEventListener("pointercancel",o,{passive:!0});const h=mr(t);if(e.x=h.x,e.y=h.y,t===window){const E=new ResizeObserver(()=>Ln(window));E.observe(document.documentElement),e.resizeObserver=E;return}const b=t,k=new ResizeObserver(()=>Ln(b));k.observe(b);for(const E of Array.from(b.children))k.observe(E);e.resizeObserver=k;const g=()=>Ln(b),f=new MutationObserver(E=>{for(const O of E)if(O.type==="childList")for(const N of Array.from(O.addedNodes))N instanceof Element&&k.observe(N);g()});f.observe(b,{childList:!0,subtree:!0,characterData:!0});const A=b.getRootNode();A instanceof ShadowRoot&&A.host&&f.observe(A.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function aa(t){for(const e of t.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&la(e))return e;return window}function la(t){if(!(t instanceof HTMLElement)||t===document.documentElement||t===document.body)return!1;const e=getComputedStyle(t).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Mn(t){for(const s of t.composedPath())s===window||s===document||s instanceof HTMLElement&&la(s)&&Zs(s);const e=aa(t);Zs(e),t.type==="wheel"?(vr(e),Ti(e),Li(e)):(t.type==="touchstart"||t.type==="pointerdown")&&(vr(e),Ti(e))}function Mi(t){t instanceof Element&&t.classList?.contains("custom-scroll")&&Zs(t),t.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&Zs(e)})}function In(t){Mi(t),new MutationObserver(s=>{for(const r of s)for(const i of Array.from(r.addedNodes))i instanceof Element&&Mi(i)}).observe(t,{childList:!0,subtree:!0})}function Nn(t){t.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(In(e.shadowRoot),Nn(e.shadowRoot))})}function Zc(){const t=Element.prototype;if(t.__safariScrollGuardPatched)return;t.__safariScrollGuardPatched=!0;const e=t.attachShadow;t.attachShadow=function(r){const i=e.call(this,r);return In(i),i}}function ca(){if(typeof window>"u"||na||(na=!0,!fs()))return;Zs(window),Zc();const t={capture:!0,passive:!0};window.addEventListener("wheel",Mn,t),window.addEventListener("touchstart",Mn,t),window.addEventListener("pointerdown",Mn,t);const e=()=>{Mi(document),Nn(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const i of r)for(const n of Array.from(i.addedNodes))n instanceof Element&&(Mi(n),n.shadowRoot&&In(n.shadowRoot),Nn(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Jc=_l,Xc=_c,Qc=vi,eu=Tr,gs=Je,tu=ct,Br=at,su=Ds,ru=ps;ca(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Jc,Arrays:Xc,DataBindObserver:Qc,Format:eu,HTML:gs,LocationHandler:tu,Objects:Br,PublisherManager:be,api:su,URLPattern:ru,Endpoint:ki,DataProviderKey:Ss};var iu=Object.defineProperty,nu=Object.getOwnPropertyDescriptor,Hr=(t,e,s,r)=>{for(var i=r>1?void 0:r?nu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&iu(e,s,i),i};const Fn=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const r=this.getAttribute("name"),i=this.getCheckAllPublisher(),n=this.getFormPublisher();if(i?.hasCheckAll.get()&&!this.checksAll()&&i&&n&&r){if(this.getFormPublisherValue()?.length)(this.checked===null||i.checkMode.get()=="noneChecked"||i.checkMode.get()==null)&&i.checkMode.set("someUnchecked");else{i.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),c=i.values.get();if(c&&c.length){let h=c.length;for(const b of c)o.indexOf(b)==-1&&(h-=1);h==c.length&&i.checkMode.set("allChecked"),h==0&&i.checkMode.set("noneChecked")}c.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=r=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),r=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),r=="noneChecked"&&(this.checked=null),r=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(r){if(this.value==r||(this.hasAttribute("value")&&!this.forceAutoFill&&(r=this.getAttribute("value")),this._value==r)||r==null||(this._value=r,!this.value))return;if(this.getFormPublisher()&&this.name){let n=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=n==r?!0:null),Array.isArray(n)||(n=[]),n.indexOf(r)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(r){if(this.setCheckedValue(r),this.checksAll()){const i=this.getCheckAllPublisher();i&&(this.checked===!0?i.checkMode.set("allChecked"):this.checked===null&&(i.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const r=this.shadowRoot?.querySelector("input");if(!r||r.checkValidity())return;const i=this.getFormPublisher();if(i){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;i.isFormValid=!1,r.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(r){this._checked!=r&&(this._checked=r,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const r=this.checked===!0?this.radio?!0:null:!0;this.checked=r;const i=new Event("change");this.dispatchEvent(i)}getValueForFormPublisher(){let r=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:r;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(r)||(r=[]);const i=r.slice(0),n=i.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&i.push(this.value),this.checked===null&&n!==-1&&i.splice(n,1),i}setFormValueFromPublisher(r){if(this.unique||this.radio){this.checked=this.value==r?!0:null;return}Array.isArray(r)||(r=[]),!this.checksAll()&&(this.checked=r.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const r=this.formDataProvider,i=this.getAttribute("name");return!r||!i?null:be.get(r+"/"+i+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const r=this.getCheckAllPublisher();if(r&&(r.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const i=r.values.get().slice(0),n=i.indexOf(this.value);n!=-1&&(i.splice(n,1),r.values.set(i))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const n=this.getFormPublisherValue();n&&Array.isArray(n)&&n.indexOf(this.value)!==-1&&(this.checked=!0)}const i=this.getCheckAllPublisher();i&&(i.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&i.hasCheckAll.set(!0),i.values.get()||i.values.set([]),this.checksAll()||i.values.set([...i.values.get(),this.value])),this.hasAttribute("checked")&&(!this.publisher||this.publisher.get().checked!==!1)&&setTimeout(()=>this.checked=!0,1)}}return Hr([u()],e.prototype,"value",1),Hr([u()],e.prototype,"forceAutoFill",2),Hr([u({type:Boolean})],e.prototype,"unique",2),Hr([u({type:Boolean})],e.prototype,"radio",2),Hr([u()],e.prototype,"checked",1),e};/**
|
|
72
|
+
*/const Yo="important",mc=" !"+Yo,kt=$s(class extends fr{constructor(t){if(super(t),t.type!==Ks.ATTRIBUTE||t.name!=="style"||t.strings?.length>2)throw Error("The `styleMap` directive must be used in the `style` attribute and must be the only part in the attribute.")}render(t){return Object.keys(t).reduce(((e,s)=>{const i=t[s];return i==null?e:e+`${s=s.includes("-")?s:s.replace(/(?:^(webkit|moz|ms|o)|)(?=[A-Z])/g,"-$&").toLowerCase()}:${i};`}),"")}update(t,[e]){const{style:s}=t.element;if(this.ft===void 0)return this.ft=new Set(Object.keys(e)),this.render(e);for(const i of this.ft)e[i]==null&&(this.ft.delete(i),i.includes("-")?s.removeProperty(i):s[i]=null);for(const i in e){const r=e[i];if(r!=null){this.ft.add(i);const n=typeof r=="string"&&r.endsWith(mc);i.includes("-")||n?s.setProperty(i,n?r.slice(0,-11):r,n?Yo:""):s[i]=r}}return It}});var bc=Object.defineProperty,vc=Object.getOwnPropertyDescriptor,Zt=(t,e,s,i)=>{for(var r=i>1?void 0:i?vc(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&bc(e,s,r),r};const ki=new Map,mr=t=>{class e extends t{constructor(...i){super(),this.touched=!1,this.error=!1,this.autofocus=!1,this.required=!1,this.forceAutoFill=!1,this.disabled=!1,this.ariaLabel=null,this.ariaLabelledby=null,this.formDataProvider="",this._name="",this._value="",this.onFormValueAssign=async r=>{this.setFormValueFromPublisher(r)},this.onFormDataInValidate=()=>{const r=this.getFormPublisher();r&&r.isFormValid.get()&&this.validateFormElement()}}hasAncestorAttribute(i){return qe.getAncestorAttributeValue(this,i)!=null}getAncestorAttributeValue(i){return qe.getAncestorAttributeValue(this,i)||""}get name(){return this._name}set name(i){this.hasAttribute("name")&&!this.forceAutoFill&&(i=this.getAttribute("name")),this._name=i,this.requestUpdate()}validateFormElement(){}unsetOnDisconnect(){return this.hasAttribute("unsetOnDisconnect")}updateDataValue(){this.getAttribute("name")&&this.getFormPublisher()&&(this.setFormPublisherValue(this.getValueForFormPublisher()),this.setFormValueFromPublisher(this.getFormPublisherValue()))}getFormPublisher(){return this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),this.formDataProvider?ve.get(this.formDataProvider):null}setFormPublisherValue(i){const r=this.getFormPublisher();r&&Ut(r,this.name).set(i)}getFormPublisherValue(){const i=this.getFormPublisher();return i?Ut(i,this.name).get():null}getValueForFormPublisher(){return this.value}setFormValueFromPublisher(i){this.value=i}get value(){return this._value}set value(i){i==null&&(i=""),at.isObject(i)&&Object.prototype.hasOwnProperty.call(i,"__value")&&i._value==null&&(i=""),this._value!=i&&(this._value=i,this.updateDataValue(),this.requestUpdate())}initFormPublisher(){let i=this.getFormPublisher();const r=this.hasAncestorAttribute("initFromPublisher")&&this._name&&this.getFormPublisherValue()?this.getFormPublisherValue():this.getAttribute("value");this._name&&i&&Ut(i,this._name).offAssign(this.onFormValueAssign),this.name||(this._name=this.getAttribute("name")||""),this.value||(this._value=this.getAttribute("value")),i=this.getFormPublisher(),this._name&&i&&(Ut(i,this._name).onAssign(this.onFormValueAssign),i.onFormInvalidate(this.onFormDataInValidate)),this.updateDataValue(),r&&(this.value=r)}handleBlur(){this.touched=!0}handleChange(i){this.value=i.target.value;const r=new Event("change");this.dispatchEvent(r)}addKeyboardNavigation(){const i=this.getAncestorAttributeValue("data-keyboard-nav")||"";if(!i)return;const r=i.split(" "),n=r[0];if(!n)return;for(const c of r){ki.has(c)||ki.set(c,[]);const d=ki.get(c);d?.indexOf(this)==-1&&d.push(this)}const o=ki.get(n);this.addEventListener("keydown",c=>{const d=c;if(!["ArrowDown","ArrowUp"].includes(d.key))return;const b="input:not([disabled]), button:not([disabled]), select:not([disabled]), textarea:not([disabled])",k=o?.filter(A=>{const E=A.shadowRoot?.querySelector(b);if(!E)return!1;const O=window.getComputedStyle(E);return O.display!=="none"&&O.display!==""&&O.pointerEvents!="none"&&O.visibility!=="hidden"&&E.getBoundingClientRect().width>0});let g=null;if(d.key=="ArrowDown"&&k){const A=k.indexOf(this);A==k.length-1?g=k[0]:g=k[A+1]}else if(d.key=="ArrowUp"&&k){const A=k.indexOf(this);A==0?g=k[k.length-1]:g=k[A-1]}const f=g?.shadowRoot?.querySelector(b);f&&f.focus&&(f.focus(),c.preventDefault(),c.stopPropagation())})}focus(){this.shadowRoot?.querySelector("[data-form-element], button")?.focus()}connectedCallback(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider")||""),super.connectedCallback(),this.initFormPublisher(),this.addKeyboardNavigation()}unset(){this.value=null}disconnectedCallback(){this.unsetOnDisconnect()&&this.unset(),super.disconnectedCallback();const i=this.getFormPublisher();this._name&&i&&(Ut(i,this._name).offAssign(this.onFormValueAssign),i.offFormInvalidate(this.onFormDataInValidate))}}return Zt([h({type:Boolean,reflect:!0})],e.prototype,"touched",2),Zt([h({type:Boolean})],e.prototype,"error",2),Zt([h({type:Boolean})],e.prototype,"autofocus",2),Zt([h({type:Boolean})],e.prototype,"required",2),Zt([h({type:Boolean})],e.prototype,"forceAutoFill",2),Zt([h({type:Boolean,reflect:!0})],e.prototype,"disabled",2),Zt([h({type:String,attribute:"data-aria-label"})],e.prototype,"ariaLabel",2),Zt([h({type:String,attribute:"data-aria-labelledby"})],e.prototype,"ariaLabelledby",2),Zt([h({type:String})],e.prototype,"formDataProvider",2),Zt([h()],e.prototype,"name",1),Zt([h()],e.prototype,"value",1),e};let yc=class cr{static areEqual(e,s){return e.length===s.length?e.every((i,r)=>i===s[r]):!1}static from2d(e){return{to1D:()=>{let s=[];return e.forEach(i=>s=s.concat(i)),this.from(s)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:s=>{if(e.length<1)return!0;const i=(e[0]||{})[s];return e.every(r=>(r||{})[s]==i)}})})}),value:()=>({forKey:s=>cr.from(e.map(i=>i[s]))}),copy:()=>({fromKey:s=>({toKey:i=>{e.forEach(r=>{r[i]=Array.isArray(r[s])?[...r[s]]:typeof r[s]=="object"&&r[s]!=null?{...r[s]}:r[s]})}})})}),map:s=>cr.from(e.map(s)),filter:s=>cr.from(e.filter(s)),find:s=>e.find(s),some:s=>e.some(s),every:s=>e.every(s),group:()=>({byKey:s=>{const i=[],r=new Map;for(const n of e){const o=n[s];if(!r.has(o)){const c=i.length;r.set(o,c);const d={items:[]};d[s]=o,i.push(d)}i[r.get(o)].items.push(n)}return cr.from(i)}}),without:()=>({duplicates:()=>({forKey:s=>{const i=[...new Set(e.map(r=>r[s]))];return cr.from(i.map(r=>e.find(n=>n[s]==r)))}}),itemsIn:s=>({havingSameValue:()=>({forKey:i=>{const r=(n,o)=>c=>n[o]!=c[o];return cr.from(e.filter(n=>s.every(r(n,i))))}})})})}}};var Go=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Zo(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var qr={exports:{}},wc=qr.exports,Jo;function _c(){return Jo||(Jo=1,(function(t,e){var s=[].slice;(function(i,r){return e!==null?t.exports=r():i.UrlPattern=r()})(wc,function(){var i,r,n,o,c,d,b,k,g,f,A,E,O,I,U;return g=function(S){return S.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},b=function(S,y){var N,C,$;for($=[],N=-1,C=S.length;++N<C;)$=$.concat(y(S[N]));return $},I=function(S,y){var N,C,$;for($="",N=-1,C=S.length;++N<C;)$+=y(S[N]);return $},O=function(S){return new RegExp(S.toString()+"|").exec("").length-1},A=function(S,y){var N,C,$,G,z;for(G={},N=-1,$=S.length;++N<$;)C=S[N],z=y[N],z!=null&&(G[C]!=null?(Array.isArray(G[C])||(G[C]=[G[C]]),G[C].push(z)):G[C]=z);return G},i={},i.Result=function(S,y){this.value=S,this.rest=y},i.Tagged=function(S,y){this.tag=S,this.value=y},i.tag=function(S,y){return function(N){var C,$;if(C=y(N),C!=null)return $=new i.Tagged(S,C.value),new i.Result($,C.rest)}},i.regex=function(S){return function(y){var N,C;if(N=S.exec(y),N!=null)return C=N[0],new i.Result(C,y.slice(C.length))}},i.sequence=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var N,C,$,G,z,ne;for(N=-1,C=S.length,ne=[],G=y;++N<C;){if($=S[N],z=$(G),z==null)return;ne.push(z.value),G=z.rest}return new i.Result(ne,G)}},i.pick=function(){var S,y;return S=arguments[0],y=2<=arguments.length?s.call(arguments,1):[],function(N){var C,$;if($=i.sequence.apply(i,y)(N),$!=null)return C=$.value,$.value=C[S],$}},i.string=function(S){var y;return y=S.length,function(N){if(N.slice(0,y)===S)return new i.Result(S,N.slice(y))}},i.lazy=function(S){var y;return y=null,function(N){return y==null&&(y=S()),y(N)}},i.baseMany=function(S,y,N,C,$){var G,z,ne,re;for(ne=$,re=N?"":[];!(y!=null&&(G=y(ne),G!=null)||(z=S(ne),z==null));)N?re+=z.value:re.push(z.value),ne=z.rest;if(!(C&&re.length===0))return new i.Result(re,ne)},i.many1=function(S){return function(y){return i.baseMany(S,null,!1,!0,y)}},i.concatMany1Till=function(S,y){return function(N){return i.baseMany(S,y,!0,!0,N)}},i.firstChoice=function(){var S;return S=1<=arguments.length?s.call(arguments,0):[],function(y){var N,C,$,G;for(N=-1,C=S.length;++N<C;)if($=S[N],G=$(y),G!=null)return G}},E=function(S){var y;return y={},y.wildcard=i.tag("wildcard",i.string(S.wildcardChar)),y.optional=i.tag("optional",i.pick(1,i.string(S.optionalSegmentStartChar),i.lazy(function(){return y.pattern}),i.string(S.optionalSegmentEndChar))),y.name=i.regex(new RegExp("^["+S.segmentNameCharset+"]+")),y.named=i.tag("named",i.pick(1,i.string(S.segmentNameStartChar),i.lazy(function(){return y.name}))),y.escapedChar=i.pick(1,i.string(S.escapeChar),i.regex(/^./)),y.static=i.tag("static",i.concatMany1Till(i.firstChoice(i.lazy(function(){return y.escapedChar}),i.regex(/^./)),i.firstChoice(i.string(S.segmentNameStartChar),i.string(S.optionalSegmentStartChar),i.string(S.optionalSegmentEndChar),y.wildcard))),y.token=i.lazy(function(){return i.firstChoice(y.wildcard,y.optional,y.named,y.static)}),y.pattern=i.many1(i.lazy(function(){return y.token})),y},k={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},d=function(S,y){if(Array.isArray(S))return I(S,function(N){return d(N,y)});switch(S.tag){case"wildcard":return"(.*?)";case"named":return"(["+y+"]+)";case"static":return g(S.value);case"optional":return"(?:"+d(S.value,y)+")?"}},c=function(S,y){return y==null&&(y=k.segmentValueCharset),"^"+d(S,y)+"$"},o=function(S){if(Array.isArray(S))return b(S,o);switch(S.tag){case"wildcard":return["_"];case"named":return[S.value];case"static":return[];case"optional":return o(S.value)}},f=function(S,y,N,C){var $,G,z,ne;if(C==null&&(C=!1),ne=S[y],ne==null){if(C)throw new Error("no values provided for key `"+y+"`");return}if($=N[y]||0,G=Array.isArray(ne)?ne.length-1:0,$>G){if(C)throw new Error("too few values provided for key `"+y+"`");return}return z=Array.isArray(ne)?ne[$]:ne,C&&(N[y]=$+1),z},n=function(S,y,N){var C,$;if(Array.isArray(S)){for(C=-1,$=S.length;++C<$;)if(n(S[C],y,N))return!0;return!1}switch(S.tag){case"wildcard":return f(y,"_",N,!1)!=null;case"named":return f(y,S.value,N,!1)!=null;case"static":return!1;case"optional":return n(S.value,y,N)}},U=function(S,y,N){if(Array.isArray(S))return I(S,function(C){return U(C,y,N)});switch(S.tag){case"wildcard":return f(y,"_",N,!0);case"named":return f(y,S.value,N,!0);case"static":return S.value;case"optional":return n(S.value,y,N)?U(S.value,y,N):""}},r=function(S,y){var N,C,$,G,z;if(S instanceof r){this.isRegex=S.isRegex,this.regex=S.regex,this.ast=S.ast,this.names=S.names;return}if(this.isRegex=S instanceof RegExp,!(typeof S=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=S,y!=null){if(!Array.isArray(y))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(N=O(this.regex),y.length!==N)throw new Error("regex contains "+N+" groups but array of group names contains "+y.length);this.names=y}return}if(S==="")throw new Error("argument must not be the empty string");if(z=S.replace(/\s+/g,""),z!==S)throw new Error("argument must not contain whitespace");if(C={escapeChar:y?.escapeChar||k.escapeChar,segmentNameStartChar:y?.segmentNameStartChar||k.segmentNameStartChar,segmentNameCharset:y?.segmentNameCharset||k.segmentNameCharset,segmentValueCharset:y?.segmentValueCharset||k.segmentValueCharset,optionalSegmentStartChar:y?.optionalSegmentStartChar||k.optionalSegmentStartChar,optionalSegmentEndChar:y?.optionalSegmentEndChar||k.optionalSegmentEndChar,wildcardChar:y?.wildcardChar||k.wildcardChar},G=E(C),$=G.pattern(S),$==null)throw new Error("couldn't parse pattern");if($.rest!=="")throw new Error("could only partially parse pattern");this.ast=$.value,this.regex=new RegExp(c(this.ast,C.segmentValueCharset)),this.names=o(this.ast)},r.prototype.match=function(S){var y,N;return N=this.regex.exec(S),N==null?null:(y=N.slice(1),this.names?A(this.names,y):y)},r.prototype.stringify=function(S){if(S==null&&(S={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(S!==Object(S))throw new Error("argument must be an object or undefined");return U(this.ast,S,{})},r.escapeForRegex=g,r.concatMap=b,r.stringConcatMap=I,r.regexGroupCount=O,r.keysAndValuesToObject=A,r.P=i,r.newParser=E,r.defaultOptions=k,r.astNodeToRegexString=c,r.astNodeToNames=o,r.getParam=f,r.astNodeContainsSegmentsForProvidedParams=n,r.stringify=U,r})})(qr,qr.exports)),qr.exports}var Sc=_c();const ps=Zo(Sc);class $i{constructor(e){this.path=$i.normalizePath(e)}getDataProviderKey(){return new xs(this.path)}static normalizePath(e){const s=String(e).trim();if(!s)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(s)){let d;try{d=new URL(s)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return d.pathname=d.pathname.replace(/\/+/g,"/"),d.href}const i=s.indexOf("?"),r=s.indexOf("#");let n=s.length;i>=0&&(n=Math.min(n,i)),r>=0&&(n=Math.min(n,r));let o=s.slice(0,n);const c=s.slice(n);if(o=o.replace(/^\/+/,""),o=o.replace(/\/+/g,"/"),!o&&c)throw new RangeError("Endpoint: path cannot be empty");return o+c}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}const Pc=50,xc=1e4,Ac=100,Cn=new Map;function Di(t){return di(t)}function Br(t){return t.split(".")[0]??t}function Ei(t){const e=t.split("."),s=e.shift();let i=ve.get(s);return e.length&&(i=at.traverse(i,e)),i}function Cc(t){return t==null?!0:Array.isArray(t)?t.length===0:typeof t=="object"?Object.keys(t).length===0:typeof t=="string"?t.length===0:!1}function kc(t){return Array.isArray(t)?t.length:0}function $c(t,e){for(const o of e)if(o===t||t.startsWith(o+".")||o.startsWith(t+"."))throw new Error(`[derive] Cycle détecté : la sortie "${t}" chevauche l'entrée "${o}".`);const s=Br(t),i=new Map;for(const[o,c]of Cn)i.set(Br(o),new Set(c));i.set(s,new Set(e.map(Br)));const r=new Set,n=o=>{if(r.has(o))return!0;r.add(o);for(const c of i.get(o)??[])if(n(c))return!0;return r.delete(o),!1};if(n(s))throw new Error(`[derive] Cycle détecté (chaîne) : la sortie "${t}" dépend indirectement d'elle-même.`)}function Dc(t,e){Cn.set(t,new Set(e.map(s=>Br(s))))}function Ec(t){Cn.delete(t)}function Oc(t){return`${Br(Di(t))}/_state_`}function Oi(t,e){const s=Oc(t);ve.get(s).set(e)}function Tc(t,e,s,i){const r=typeof t.compute=="function"?t:{inputs:t,compute:e,output:s,variables:i},n=r.debounceMs??Pc,o=r.maxInputItems??xc,c=r.isEmpty??Cc,d=Di(r.output),b=Object.entries(r.inputs).map(([ie,q])=>({alias:ie,path:Di(q)})),k=b.map(ie=>ie.path),g=r.variables?Di(r.variables):null;$c(d,k),Dc(d,k);const f=Ei(d);let A,E=!1,O=0,I=null,U=!1,S="";const y=ie=>{E=!0,A=ie,f.set(ie),E=!1},N=()=>{E||U||(typeof console<"u"&&console.warn&&console.warn(`[derive] Écriture ignorée sur la sortie readonly "${d}".`),A!==void 0&&(E=!0,f.set(A),E=!1))};f.onAssign(N,!1);const C=()=>{const ie={};for(const{alias:q,path:le}of b){const pe=Ei(le).get(),Ue=kc(pe);Ue>o&&typeof console<"u"&&console.warn&&console.warn(`[derive] Entrée "${le}" : ${Ue} éléments (> ${o}). Agrégation lourde — envisager un plafond côté fetch.`),ie[q]=pe}return ie},$=()=>g?Ei(g).get()??{}:{},G=async()=>{if(U)return;const ie=++O;Oi(d,{status:"loading",error:null});const q=C(),le=$(),pe=JSON.stringify({inputs:q,vars:le});if(pe===S&&A!==void 0){Oi(d,{status:c(A)?"empty":"ready",error:null});return}const Ue=typeof performance<"u"?performance.now():Date.now();try{const he=await Promise.resolve(r.compute(q,le));if(U||ie!==O)return;const me=(typeof performance<"u"?performance.now():Date.now())-Ue;me>Ac&&typeof console<"u"&&console.warn&&console.warn(`[derive] Évaluation longue (${Math.round(me)} ms) → "${d}".`),S=pe,y(he),Oi(d,{status:c(he)?"empty":"ready",error:null})}catch(he){if(U||ie!==O)return;const me=he instanceof Error?he.message:String(he);typeof console<"u"&&console.error&&console.error(`[derive] Erreur sur "${d}" :`,me),Oi(d,{status:"error",error:me})}},z=()=>{U||(I&&clearTimeout(I),I=setTimeout(()=>{I=null,G()},n))},ne=[],re=ie=>{const q=Ei(ie),le=()=>z();q.onInternalMutation(le),ne.push({pub:q,handler:le})};for(const{path:ie}of b)re(ie);return g&&re(g),z(),{stop(){if(!U){U=!0,I&&clearTimeout(I);for(const{pub:ie,handler:q}of ne)ie.offInternalMutation(q);f.offAssign(N),Ec(d)}},recompute(){S="",G()}}}function Ti(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var kn={exports:{}},Xo;function Lc(){return Xo||(Xo=1,(function(t,e){(function(s){t.exports=s()})(function(){return(function(){function s(i,r,n){function o(b,k){if(!r[b]){if(!i[b]){var g=typeof Ti=="function"&&Ti;if(!k&&g)return g(b,!0);if(c)return c(b,!0);var f=new Error("Cannot find module '"+b+"'");throw f.code="MODULE_NOT_FOUND",f}var A=r[b]={exports:{}};i[b][0].call(A.exports,function(E){var O=i[b][1][E];return o(O||E)},A,A.exports,s,i,r,n)}return r[b].exports}for(var c=typeof Ti=="function"&&Ti,d=0;d<n.length;d++)o(n[d]);return o}return s})()({1:[function(s,i,r){const n=s("./utils"),o=(function(){const c=n.stringToArray,d=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],b=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],k=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],g=["Thousand","Million","Billion","Trillion"];function f(T,M){var D=function(B,V,F){var Y="";if(B<=19)Y=(V?" and ":"")+(F?b[B]:d[B]);else if(B<100){const xe=Math.floor(B/10),ge=B%10;Y=(V?" and ":"")+k[xe-2],ge>0?Y+="-"+D(ge,!1,F):F&&(Y=Y.substring(0,Y.length-1)+"ieth")}else if(B<1e3){const xe=Math.floor(B/100),ge=B%100;Y=(V?", ":"")+d[xe]+" Hundred",ge>0?Y+=D(ge,!0,F):F&&(Y+="th")}else{var ae=Math.floor(Math.log10(B)/3);ae>g.length&&(ae=g.length);const xe=Math.pow(10,ae*3),ge=Math.floor(B/xe),fe=B-ge*xe;Y=(V?", ":"")+D(ge,!1,!1)+" "+g[ae-1],fe>0?Y+=D(fe,!0,F):F&&(Y+="th")}return Y},R=D(T,!1,M);return R}const A=Object.create(null);d.forEach(function(T,M){A[T.toLowerCase()]=M}),b.forEach(function(T,M){A[T.toLowerCase()]=M}),k.forEach(function(T,M){const D=T.toLowerCase();A[D]=(M+2)*10,A[D.substring(0,T.length-1)+"ieth"]=A[D]}),A.hundredth=100,g.forEach(function(T,M){const D=T.toLowerCase(),R=Math.pow(10,(M+1)*3);A[D]=R,A[D+"th"]=R});function E(T){const D=T.split(/,\s|\sand\s|[\s\\-]/).map(V=>A[V]);let R=[0];return D.forEach(V=>{if(V<100){let F=R.pop();F>=1e3&&(R.push(F),F=0),R.push(F+V)}else R.push(R.pop()*V)}),R.reduce((V,F)=>V+F,0)}const O=[[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"]],I={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function U(T){for(var M=0;M<O.length;M++){const D=O[M];if(T>=D[0])return D[1]+U(T-D[0])}return""}function S(T){for(var M=0,D=1,R=T.length-1;R>=0;R--){const B=T[R],V=I[B];V<D?M-=V:(D=V,M+=V)}return M}function y(T,M){for(var D=[],R=M.charCodeAt(0);T>0;)D.unshift(String.fromCharCode((T-1)%26+R)),T=Math.floor((T-1)/26);return D.join("")}function N(T,M){for(var D=M.charCodeAt(0),R=0,B=0;B<T.length;B++)R+=(T.charCodeAt(T.length-B-1)-D+1)*Math.pow(26,B);return R}function C(T,M){if(typeof T>"u")return;T=Math.floor(T);const D=re(M);return z(T,D)}const $={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},G={UPPER:"upper",LOWER:"lower",TITLE:"title"};function z(T,M){let D;const R=T<0;switch(T=Math.abs(T),M.primary){case $.LETTERS:D=y(T,M.case===G.UPPER?"A":"a");break;case $.ROMAN:D=U(T),M.case===G.UPPER&&(D=D.toUpperCase());break;case $.WORDS:D=f(T,M.ordinal),M.case===G.UPPER?D=D.toUpperCase():M.case===G.LOWER&&(D=D.toLowerCase());break;case $.DECIMAL:D=""+T;var B=M.mandatoryDigits-D.length;if(B>0){var V=new Array(B+1).join("0");D=V+D}if(M.zeroCode!==48&&(D=c(D).map(xe=>String.fromCodePoint(xe.codePointAt(0)+M.zeroCode-48)).join("")),M.regular){const xe=Math.floor((D.length-1)/M.groupingSeparators.position);for(let ge=xe;ge>0;ge--){const fe=D.length-ge*M.groupingSeparators.position;D=D.substr(0,fe)+M.groupingSeparators.character+D.substr(fe)}}else M.groupingSeparators.reverse().forEach(xe=>{const ge=D.length-xe.position;D=D.substr(0,ge)+xe.character+D.substr(ge)});if(M.ordinal){var F={1:"st",2:"nd",3:"rd"},Y=D[D.length-1],ae=F[Y];(!ae||D.length>1&&D[D.length-2]==="1")&&(ae="th"),D=D+ae}break;case $.SEQUENCE:throw{code:"D3130",value:M.token}}return R&&(D="-"+D),D}const ne=[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 re(T){const M={type:"integer",primary:$.DECIMAL,case:G.LOWER,ordinal:!1};let D,R;const B=T.lastIndexOf(";");switch(B===-1?D=T:(D=T.substring(0,B),R=T.substring(B+1),R[0]==="o"&&(M.ordinal=!0)),D){case"A":M.case=G.UPPER;case"a":M.primary=$.LETTERS;break;case"I":M.case=G.UPPER;case"i":M.primary=$.ROMAN;break;case"W":M.case=G.UPPER,M.primary=$.WORDS;break;case"Ww":M.case=G.TITLE,M.primary=$.WORDS;break;case"w":M.primary=$.WORDS;break;default:{let V=null,F=0,Y=0,ae=[],xe=0;if(c(D).map(fe=>fe.codePointAt(0)).reverse().forEach(fe=>{let ue=!1;for(let $e=0;$e<ne.length;$e++){const de=ne[$e];if(fe>=de&&fe<=de+9){if(ue=!0,F++,xe++,V===null)V=de;else if(de!==V)throw{code:"D3131"};break}}ue||(fe===35?(xe++,Y++):ae.push({position:xe,character:String.fromCodePoint(fe)}))}),F>0){M.primary=$.DECIMAL,M.zeroCode=V,M.mandatoryDigits=F,M.optionalDigits=Y;const ue=function($e){if($e.length===0)return 0;const de=$e[0].character;for(let rt=1;rt<$e.length;rt++)if($e[rt].character!==de)return 0;const ft=$e.map(rt=>rt.position),Yt=function(rt,_t){return _t===0?rt:Yt(_t,rt%_t)},wt=ft.reduce(Yt);for(let rt=1;rt<=ft.length;rt++)if(ft.indexOf(rt*wt)===-1)return 0;return wt}(ae);ue>0?(M.regular=!0,M.groupingSeparators={position:ue,character:ae[0].character}):(M.regular=!1,M.groupingSeparators=ae)}else M.primary=$.SEQUENCE,M.token=D}}return M}const ie={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 q(T){var M=[];const D={type:"datetime",parts:M},R=function(ue,$e){if($e>ue){let de=T.substring(ue,$e);de=de.split("]]").join("]"),M.push({type:"literal",value:de})}};for(var B=0,V=0;V<T.length;){if(T.charAt(V)==="["){if(T.charAt(V+1)==="["){R(B,V),M.push({type:"literal",value:"["}),V+=2,B=V;continue}if(R(B,V),B=V,V=T.indexOf("]",B),V===-1)throw{code:"D3135"};let ue=T.substring(B+1,V);ue=ue.split(/\s+/).join("");var F={type:"marker",component:ue.charAt(0)},Y=ue.lastIndexOf(","),ae;if(Y!==-1){const $e=ue.substring(Y+1),de=$e.indexOf("-");let ft,Yt;const wt=function(_t){if(!(typeof _t>"u"||_t==="*"))return parseInt(_t)};de===-1?ft=$e:(ft=$e.substring(0,de),Yt=$e.substring(de+1));const rt={min:wt(ft),max:wt(Yt)};F.width=rt,ae=ue.substring(1,Y)}else ae=ue.substring(1);if(ae.length===1)F.presentation1=ae;else if(ae.length>1){var xe=ae.charAt(ae.length-1);"atco".indexOf(xe)!==-1?(F.presentation2=xe,xe==="o"&&(F.ordinal=!0),F.presentation1=ae.substring(0,ae.length-1)):F.presentation1=ae}else F.presentation1=ie[F.component];if(typeof F.presentation1>"u")throw{code:"D3132",value:F.component};if(F.presentation1[0]==="n")F.names=G.LOWER;else if(F.presentation1[0]==="N")F.presentation1[1]==="n"?F.names=G.TITLE:F.names=G.UPPER;else if("YMDdFWwXxHhmsf".indexOf(F.component)!==-1){var ge=F.presentation1;if(F.presentation2&&(ge+=";"+F.presentation2),F.integerFormat=re(ge),F.width&&F.width.min!==void 0&&F.integerFormat.mandatoryDigits<F.width.min&&(F.integerFormat.mandatoryDigits=F.width.min),F.component==="Y")if(F.n=-1,F.width&&F.width.max!==void 0)F.n=F.width.max,F.integerFormat.mandatoryDigits=F.n;else{var fe=F.integerFormat.mandatoryDigits+F.integerFormat.optionalDigits;fe>=2&&(F.n=fe)}const $e=M[M.length-1];$e&&$e.integerFormat&&($e.integerFormat.parseWidth=$e.integerFormat.mandatoryDigits)}(F.component==="Z"||F.component==="z")&&(F.integerFormat=re(F.presentation1)),M.push(F),B=V+1}V++}return R(B,V),D}const le=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Ue=1e3*60*60*24,he=function(T){const M=Date.UTC(T.year,T.month);var D=new Date(M).getUTCDay();return D===0&&(D=7),D>4?M+(8-D)*Ue:M-(D-1)*Ue},me=function(T,M){return{year:T,month:M,nextMonth:function(){return M===11?me(T+1,0):me(T,M+1)},previousMonth:function(){return M===0?me(T-1,11):me(T,M-1)},nextYear:function(){return me(T+1,M)},previousYear:function(){return me(T-1,M)}}},ke=function(T,M){return(M-T)/(Ue*7)+1},ce=(T,M)=>{let D;switch(M){case"Y":D=T.getUTCFullYear();break;case"M":D=T.getUTCMonth()+1;break;case"D":D=T.getUTCDate();break;case"d":{const R=Date.UTC(T.getUTCFullYear(),T.getUTCMonth(),T.getUTCDate()),B=Date.UTC(T.getUTCFullYear(),0);D=(R-B)/Ue+1;break}case"F":D=T.getUTCDay(),D===0&&(D=7);break;case"W":{const R=me(T.getUTCFullYear(),0),B=he(R),V=Date.UTC(R.year,T.getUTCMonth(),T.getUTCDate());let F=ke(B,V);if(F>52){const Y=he(R.nextYear());V>=Y&&(F=1)}else if(F<1){const Y=he(R.previousYear());F=ke(Y,V)}D=Math.floor(F);break}case"w":{const R=me(T.getUTCFullYear(),T.getUTCMonth()),B=he(R),V=Date.UTC(R.year,R.month,T.getUTCDate());let F=ke(B,V);if(F>4){const Y=he(R.nextMonth());V>=Y&&(F=1)}else if(F<1){const Y=he(R.previousMonth());F=ke(Y,V)}D=Math.floor(F);break}case"X":{const R=me(T.getUTCFullYear(),0),B=he(R),V=he(R.nextYear()),F=T.getTime();F<B?D=R.year-1:F>=V?D=R.year+1:D=R.year;break}case"x":{const R=me(T.getUTCFullYear(),T.getUTCMonth()),B=he(R),V=R.nextMonth(),F=he(V),Y=T.getTime();Y<B?D=R.previousMonth().month+1:Y>=F?D=V.month+1:D=R.month+1;break}case"H":D=T.getUTCHours();break;case"h":D=T.getUTCHours(),D=D%12,D===0&&(D=12);break;case"P":D=T.getUTCHours()>=12?"pm":"am";break;case"m":D=T.getUTCMinutes();break;case"s":D=T.getUTCSeconds();break;case"f":D=T.getUTCMilliseconds();break;case"Z":case"z":break;case"C":D="ISO";break;case"E":D="ISO";break}return D};let W=null;function Pe(T,M,D){var R=0,B=0;if(typeof D<"u"){const ge=parseInt(D);R=Math.floor(ge/100),B=ge%100}var V=function(ge,fe){var ue=ce(ge,fe.component);if("YMDdFWwXxHhms".indexOf(fe.component)!==-1)if(fe.component==="Y"&&fe.n!==-1&&(ue=ue%Math.pow(10,fe.n)),fe.names){if(fe.component==="M"||fe.component==="x")ue=pe[ue-1];else if(fe.component==="F")ue=le[ue];else throw{code:"D3133",value:fe.component};fe.names===G.UPPER?ue=ue.toUpperCase():fe.names===G.LOWER&&(ue=ue.toLowerCase()),fe.width&&ue.length>fe.width.max&&(ue=ue.substring(0,fe.width.max))}else ue=z(ue,fe.integerFormat);else if(fe.component==="f")ue=z(ue,fe.integerFormat);else if(fe.component==="Z"||fe.component==="z"){const $e=R*100+B;if(fe.integerFormat.regular)ue=z($e,fe.integerFormat);else{const de=fe.integerFormat.mandatoryDigits;if(de===1||de===2)ue=z(R,fe.integerFormat),B!==0&&(ue+=":"+C(B,"00"));else if(de===3||de===4)ue=z($e,fe.integerFormat);else throw{code:"D3134",value:de}}$e>=0&&(ue="+"+ue),fe.component==="z"&&(ue="GMT"+ue),$e===0&&fe.presentation2==="t"&&(ue="Z")}else fe.component==="P"&&fe.names===G.UPPER&&(ue=ue.toUpperCase());return ue};let F;typeof M>"u"?(W===null&&(W=q("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),F=W):F=q(M);const Y=(60*R+B)*60*1e3,ae=new Date(T+Y);let xe="";return F.parts.forEach(function(ge){ge.type==="literal"?xe+=ge.value:xe+=V(ae,ge)}),xe}function m(T){var M=Object.create(null);if(T.type==="datetime")M.type="datetime",M.parts=T.parts.map(function(D){var R=Object.create(null);if(D.type==="literal")R.regex=D.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(D.component==="Z"||D.component==="z"){let V;Array.isArray(D.integerFormat.groupingSeparators)||(V=D.integerFormat.groupingSeparators),R.regex="",D.component==="z"&&(R.regex="GMT"),R.regex+="[-+][0-9]+",V&&(R.regex+=V.character+"[0-9]+"),R.parse=function(F){D.component==="z"&&(F=F.substring(3));let Y=0,ae=0;return V?(Y=Number.parseInt(F.substring(0,F.indexOf(V.character))),ae=Number.parseInt(F.substring(F.indexOf(V.character)+1))):F.length-1<=2?Y=Number.parseInt(F):(Y=Number.parseInt(F.substring(0,3)),ae=Number.parseInt(F.substring(3))),Y*60+ae}}else if(D.component==="f")R.regex="[0-9]+",R.parse=function(V){return parseFloat("0."+V.substring(0,3))*1e3};else if(D.integerFormat)R=m(D.integerFormat);else{R.regex="[a-zA-Z]+";var B=Object.create(null);if(D.component==="M"||D.component==="x")pe.forEach(function(V,F){D.width&&D.width.max?B[V.substring(0,D.width.max)]=F+1:B[V]=F+1});else if(D.component==="F")le.forEach(function(V,F){F>0&&(D.width&&D.width.max?B[V.substring(0,D.width.max)]=F:B[V]=F)});else if(D.component==="P")B={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:D.component};R.parse=function(V){return B[V]}}return R.component=D.component,R});else{M.type="integer";const D=T.case===G.UPPER;switch(T.primary){case $.LETTERS:M.regex=D?"[A-Z]+":"[a-z]+",M.parse=function(R){return N(R,D?"A":"a")};break;case $.ROMAN:M.regex=D?"[MDCLXVI]+":"[mdclxvi]+",M.parse=function(R){return S(D?R:R.toUpperCase())};break;case $.WORDS:M.regex="(?:"+n.keys(A).concat("and","[\\-, ]").join("|")+")+",M.parse=function(R){return E(R.toLowerCase())};break;case $.DECIMAL:M.regex="[0-9]",T.parseWidth?M.regex+=`{${T.parseWidth}}`:M.regex+="+",T.ordinal&&(M.regex+="(?:th|st|nd|rd)"),M.parse=function(R){let B=R;return T.ordinal&&(B=R.substring(0,R.length-2)),T.regular?B=B.split(",").join(""):T.groupingSeparators.forEach(V=>{B=B.split(V.character).join("")}),T.zeroCode!==48&&(B=B.split("").map(V=>String.fromCodePoint(V.codePointAt(0)-T.zeroCode+48)).join("")),parseInt(B)};break;case $.SEQUENCE:throw{code:"D3130",value:T.token}}}return M}function _(T,M){if(typeof T>"u")return;const D=re(M);return m(D).parse(T)}function Q(T,M){const D=q(M),R=m(D),B="^"+R.parts.map(ae=>"("+ae.regex+")").join("")+"$";var F=new RegExp(B,"i").exec(T);if(F!==null){const de=Object.create(null);for(let u=1;u<F.length;u++){const v=R.parts[u-1];v.parse&&(de[v.component]=v.parse(F[u]))}if(Object.getOwnPropertyNames(de).length===0)return;let ft=0;const Yt=u=>{ft<<=1,ft+=u?1:0},wt=u=>!(~u&ft)&&!!(u&ft);"YXMxWwdD".split("").forEach(u=>Yt(de[u]));const _t=!wt(161)&&wt(130),_s=wt(84),$r=!_s&&wt(72);ft=0,"PHhmsf".split("").forEach(u=>Yt(de[u]));const Z=!wt(23)&&wt(47),Qt=(_t?"YD":_s?"XxwF":$r?"XWF":"YMD")+(Z?"Phmsf":"Hmsf"),li=this.environment.timestamp;let us=!1,ar=!1;if(Qt.split("").forEach(u=>{if(typeof de[u]>"u")us?(de[u]="MDd".indexOf(u)!==-1?1:0,ar=!0):de[u]=ce(li,u);else if(us=!0,ar)throw{code:"D3136"}}),de.M>0?de.M-=1:de.M=0,_t){const u=Date.UTC(de.Y,0),v=(de.d-1)*1e3*60*60*24,w=new Date(u+v);de.M=w.getUTCMonth(),de.D=w.getUTCDate()}if(_s)throw{code:"D3136"};if($r)throw{code:"D3136"};Z&&(de.H=de.h===12?0:de.h,de.P===1&&(de.H+=12));var Y=Date.UTC(de.Y,de.M,de.D,de.H,de.m,de.s,de.f);return(de.Z||de.z)&&(Y-=(de.Z||de.z)*60*1e3),Y}}var ye=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 Se(T,M){if(!(typeof T>"u"))if(typeof M>"u"){if(!ye.test(T))throw{stack:new Error().stack,code:"D3110",value:T};return Date.parse(T)}else return Q.call(this,T,M)}function De(T,M,D){if(!(typeof T>"u"))return Pe.call(this,T,M,D)}return{formatInteger:C,parseInteger:_,fromMillis:De,toMillis:Se}})();i.exports=o},{"./utils":6}],2:[function(s,i,r){(function(n){(function(){var o=s("./utils");const c=(()=>{var d=o.isNumeric,b=o.isArrayOfStrings,k=o.isArrayOfNumbers,g=o.isSequence,f=o.isFunction,A=o.isLambda,E=o.isPromise,O=o.getFunctionArity,I=o.isDeepEqual,U=o.stringToArray;function S(a){if(!(typeof a>"u")){var l=0;return a.forEach(function(p){l+=p}),l}}function y(a){return typeof a>"u"?0:a.length}function N(a){if(!(typeof a>"u"||a.length===0))return Math.max.apply(Math,a)}function C(a){if(!(typeof a>"u"||a.length===0))return Math.min.apply(Math,a)}function $(a){if(!(typeof a>"u"||a.length===0)){var l=0;return a.forEach(function(p){l+=p}),l/a.length}}function G(a,l=!1){if(!(typeof a>"u")){var p;if(typeof a=="string")p=a;else if(f(a))p="";else{if(typeof a=="number"&&!isFinite(a))throw{code:"D3001",value:a,stack:new Error().stack};var x=l?2:0;Array.isArray(a)&&a.outerWrapper&&(a=a[0]),p=JSON.stringify(a,function(P,L){return typeof L<"u"&&L!==null&&d(L)?L.toPrecision&&!Number.isInteger(L)?Number(L.toPrecision(15)):L:L&&f(L)?"":L},x)}return p}}function z(a,l,p){if(!(typeof a>"u")){var x=U(a),P=x.length;if(P+l<0&&(l=0),typeof p<"u"){if(p<=0)return"";var L=l>=0?l+p:P+l+p;return x.slice(l,L).join("")}return x.slice(l).join("")}}function ne(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(0,p):a}}function re(a,l){if(!(typeof a>"u")){var p=a.indexOf(l);return p>-1?a.substr(p+l.length):a}}function ie(a){if(!(typeof a>"u"))return a.toLowerCase()}function q(a){if(!(typeof a>"u"))return a.toUpperCase()}function le(a){if(!(typeof a>"u"))return U(a).length}function pe(a){if(!(typeof a>"u")){var l=a.replace(/[ \t\n\r]+/gm," ");return l.charAt(0)===" "&&(l=l.substring(1)),l.charAt(l.length-1)===" "&&(l=l.substring(0,l.length-1)),l}}function Ue(a,l,p){if(!(typeof a>"u")){(typeof p>"u"||p.length===0)&&(p=" ");var x;l=Math.trunc(l);var P=Math.abs(l)-le(a);if(P>0){var L=new Array(P+1).join(p);p.length>1&&(L=z(L,0,P)),l>0?x=a+L:x=L+a}else x=a;return x}}async function he(a,l){var p=a.apply(this,[l]);if(E(p)&&(p=await p),p&&!(typeof p.start=="number"||p.end==="number"||Array.isArray(p.groups)||f(p.next)))throw{code:"T1010",stack:new Error().stack};return p}async function me(a,l){if(!(typeof a>"u"||typeof l>"u")){var p;if(typeof l=="string")p=a.indexOf(l)!==-1;else{var x=await he(l,a);p=typeof x<"u"}return p}}async function ke(a,l,p){if(!(typeof a>"u")){if(p<0)throw{stack:new Error().stack,value:p,code:"D3040",index:3};var x=this.createSequence();if(typeof p>"u"||p>0){var P=0,L=await he(l,a);if(typeof L<"u")for(;typeof L<"u"&&(typeof p>"u"||P<p);)x.push({match:L.match,index:L.start,groups:L.groups}),L=await he(L.next),P++}return x}}async function ce(a,l,p,x){if(!(typeof a>"u")){var P=this;if(l==="")throw{code:"D3010",stack:new Error().stack,value:l,index:2};if(x<0)throw{code:"D3011",stack:new Error().stack,value:x,index:4};var L;typeof p=="string"?L=function(Ke){for(var it="",Le=0,Je=p.indexOf("$",Le);Je!==-1&&Le<p.length;){it+=p.substring(Le,Je),Le=Je+1;var Gt=p.charAt(Le);if(Gt==="$")it+="$",Le++;else if(Gt==="0")it+=Ke.match,Le++;else{var St;if(Ke.groups.length===0?St=1:St=Math.floor(Math.log(Ke.groups.length)*Math.LOG10E)+1,Je=parseInt(p.substring(Le,Le+St),10),St>1&&Je>Ke.groups.length&&(Je=parseInt(p.substring(Le,Le+St-1),10)),isNaN(Je))it+="$";else{if(Ke.groups.length>0){var ds=Ke.groups[Je-1];typeof ds<"u"&&(it+=ds)}Le+=Je.toString().length}}Je=p.indexOf("$",Le)}return it+=p.substring(Le),it}:L=p;var H="",K=0;if(typeof x>"u"||x>0){var we=0;if(typeof l=="string"){for(var oe=a.indexOf(l,K);oe!==-1&&(typeof x>"u"||we<x);)H+=a.substring(K,oe),H+=p,K=oe+l.length,we++,oe=a.indexOf(l,K);H+=a.substring(K)}else{var Fe=await he(l,a);if(typeof Fe<"u"){for(;typeof Fe<"u"&&(typeof x>"u"||we<x);){H+=a.substring(K,Fe.start);var We=L.apply(P,[Fe]);if(E(We)&&(We=await We),typeof We=="string")H+=We;else throw{code:"D3012",stack:new Error().stack,value:We};K=Fe.start+Fe.match.length,we++,Fe=await he(Fe.next)}H+=a.substring(K)}else H=a}}else H=a;return H}}function W(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.btoa:function(p){return new n.Buffer.from(p,"binary").toString("base64")};return l(a)}}function Pe(a){if(!(typeof a>"u")){var l=typeof window<"u"?window.atob:function(p){return new n.Buffer.from(p,"base64").toString("binary")};return l(a)}}function m(a){if(!(typeof a>"u")){var l;try{l=encodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrlComponent"}}return l}}function _(a){if(!(typeof a>"u")){var l;try{l=encodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"encodeUrl"}}return l}}function Q(a){if(!(typeof a>"u")){var l;try{l=decodeURIComponent(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrlComponent"}}return l}}function ye(a){if(!(typeof a>"u")){var l;try{l=decodeURI(a)}catch{throw{code:"D3140",stack:new Error().stack,value:a,functionName:"decodeUrl"}}return l}}async function Se(a,l,p){if(!(typeof a>"u")){if(p<0)throw{code:"D3020",stack:new Error().stack,value:p,index:3};var x=[];if(typeof p>"u"||p>0)if(typeof l=="string")x=a.split(l,p);else{var P=0,L=await he(l,a);if(typeof L<"u"){for(var H=0;typeof L<"u"&&(typeof p>"u"||P<p);)x.push(a.substring(H,L.start)),H=L.end,L=await he(L.next),P++;(typeof p>"u"||P<p)&&x.push(a.substring(H))}else x.push(a)}return x}}function De(a,l){if(!(typeof a>"u"))return typeof l>"u"&&(l=""),a.join(l)}function T(a,l,p){if(!(typeof a>"u")){var x={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},P=x;typeof p<"u"&&o.keys(p).forEach(function(be){P[be]=p[be]});for(var L=[],H=P["zero-digit"].charCodeAt(0),K=H;K<H+10;K++)L.push(String.fromCharCode(K));var we=L.concat([P["decimal-separator"],P["exponent-separator"],P["grouping-separator"],P.digit,P["pattern-separator"]]),oe=l.split(P["pattern-separator"]);if(oe.length>2)throw{code:"D3080",stack:new Error().stack};var Fe=function(be){var Ge=(function(){for(var lt,zt=0;zt<be.length;zt++)if(lt=be.charAt(zt),we.indexOf(lt)!==-1&<!==P["exponent-separator"])return be.substring(0,zt);return""})(),xt=(function(){for(var lt,zt=be.length-1;zt>=0;zt--)if(lt=be.charAt(zt),we.indexOf(lt)!==-1&<!==P["exponent-separator"])return be.substring(zt+1);return""})(),Ye=be.substring(Ge.length,be.length-xt.length),Mt,qs,Nt,lr,jt=be.indexOf(P["exponent-separator"],Ge.length);jt===-1||jt>be.length-xt.length?(Mt=Ye,qs=void 0):(Mt=Ye.substring(0,jt),qs=Ye.substring(jt+1));var es=Mt.indexOf(P["decimal-separator"]);return es===-1?(Nt=Mt,lr=xt):(Nt=Mt.substring(0,es),lr=Mt.substring(es+1)),{prefix:Ge,suffix:xt,activePart:Ye,mantissaPart:Mt,exponentPart:qs,integerPart:Nt,fractionalPart:lr,subpicture:be}},We=function(be){var Ge,xt,Ye=be.subpicture,Mt=Ye.indexOf(P["decimal-separator"]);Mt!==Ye.lastIndexOf(P["decimal-separator"])&&(Ge="D3081"),Ye.indexOf(P.percent)!==Ye.lastIndexOf(P.percent)&&(Ge="D3082"),Ye.indexOf(P["per-mille"])!==Ye.lastIndexOf(P["per-mille"])&&(Ge="D3083"),Ye.indexOf(P.percent)!==-1&&Ye.indexOf(P["per-mille"])!==-1&&(Ge="D3084");var qs=!1;for(xt=0;xt<be.mantissaPart.length;xt++){var Nt=be.mantissaPart.charAt(xt);if(L.indexOf(Nt)!==-1||Nt===P.digit){qs=!0;break}}qs||(Ge="D3085");var lr=be.activePart.split("").map(function(lt){return we.indexOf(lt)===-1?"p":"a"}).join("");lr.indexOf("p")!==-1&&(Ge="D3086"),Mt!==-1?(Ye.charAt(Mt-1)===P["grouping-separator"]||Ye.charAt(Mt+1)===P["grouping-separator"])&&(Ge="D3087"):be.integerPart.charAt(be.integerPart.length-1)===P["grouping-separator"]&&(Ge="D3088"),Ye.indexOf(P["grouping-separator"]+P["grouping-separator"])!==-1&&(Ge="D3089");var jt=be.integerPart.indexOf(P.digit);jt!==-1&&be.integerPart.substring(0,jt).split("").filter(function(lt){return L.indexOf(lt)>-1}).length>0&&(Ge="D3090"),jt=be.fractionalPart.lastIndexOf(P.digit),jt!==-1&&be.fractionalPart.substring(jt).split("").filter(function(lt){return L.indexOf(lt)>-1}).length>0&&(Ge="D3091");var es=typeof be.exponentPart=="string";if(es&&be.exponentPart.length>0&&(Ye.indexOf(P.percent)!==-1||Ye.indexOf(P["per-mille"])!==-1)&&(Ge="D3092"),es&&(be.exponentPart.length===0||be.exponentPart.split("").filter(function(lt){return L.indexOf(lt)===-1}).length>0)&&(Ge="D3093"),Ge)throw{code:Ge,stack:new Error().stack}},Ke=function(be){var Ge=function(gt,on){for(var ui=[],Ss=gt.indexOf(P["grouping-separator"]);Ss!==-1;){var an=(on?gt.substring(0,Ss):gt.substring(Ss)).split("").filter(function(Or){return L.indexOf(Or)!==-1||Or===P.digit}).length;ui.push(an),Ss=be.integerPart.indexOf(P["grouping-separator"],Ss+1)}return ui},xt=Ge(be.integerPart),Ye=function(gt){if(gt.length===0)return 0;for(var on=function(an,Or){return Or===0?an:on(Or,an%Or)},ui=gt.reduce(on),Ss=1;Ss<=gt.length;Ss++)if(gt.indexOf(Ss*ui)===-1)return 0;return ui},Mt=Ye(xt),qs=Ge(be.fractionalPart,!0),Nt=be.integerPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length,lr=Nt,jt=be.fractionalPart.split(""),es=jt.filter(function(gt){return L.indexOf(gt)!==-1}).length,lt=jt.filter(function(gt){return L.indexOf(gt)!==-1||gt===P.digit}).length,zt=typeof be.exponentPart=="string";Nt===0&<===0&&(zt?(es=1,lt=1):Nt=1),zt&&Nt===0&&be.integerPart.indexOf(P.digit)!==-1&&(Nt=1),Nt===0&&es===0&&(es=1);var gl=0;return zt&&(gl=be.exponentPart.split("").filter(function(gt){return L.indexOf(gt)!==-1}).length),{integerPartGroupingPositions:xt,regularGrouping:Mt,minimumIntegerPartSize:Nt,scalingFactor:lr,prefix:be.prefix,fractionalPartGroupingPositions:qs,minimumFactionalPartSize:es,maximumFactionalPartSize:lt,minimumExponentSize:gl,suffix:be.suffix,picture:be.subpicture}},it=oe.map(Fe);it.forEach(We);var Le=it.map(Ke),Je=P["minus-sign"],Gt=P["zero-digit"],St=P["decimal-separator"],ds=P["grouping-separator"];Le.length===1&&(Le.push(JSON.parse(JSON.stringify(Le[0]))),Le[1].prefix=Je+Le[1].prefix);var nt;a>=0?nt=Le[0]:nt=Le[1];var ci;nt.picture.indexOf(P.percent)!==-1?ci=a*100:nt.picture.indexOf(P["per-mille"])!==-1?ci=a*1e3:ci=a;var Us,Er;if(nt.minimumExponentSize===0)Us=ci;else{var gg=Math.pow(10,nt.scalingFactor),mg=Math.pow(10,nt.scalingFactor-1);if(Us=ci,Er=0,Us!==0){for(;Math.abs(Us)<mg;)Us*=10,Er-=1;for(;Math.abs(Us)>gg;)Us/=10,Er+=1}}var bg=F(Us,nt.maximumFactionalPartSize),pl=function(be,Ge){var xt=Math.abs(be).toFixed(Ge);return Gt!=="0"&&(xt=xt.split("").map(function(Ye){return Ye>="0"&&Ye<="9"?L[Ye.charCodeAt(0)-48]:Ye}).join("")),xt},Ae=pl(bg,nt.maximumFactionalPartSize),Pt=Ae.indexOf(".");for(Pt===-1?Ae=Ae+St:Ae=Ae.replace(".",St);Ae.charAt(0)===Gt;)Ae=Ae.substring(1);for(;Ae.charAt(Ae.length-1)===Gt;)Ae=Ae.substring(0,Ae.length-1);Pt=Ae.indexOf(St);var hi=nt.minimumIntegerPartSize-Pt,fl=nt.minimumFactionalPartSize-(Ae.length-Pt-1);if(Ae=(hi>0?new Array(hi+1).join(Gt):"")+Ae,Ae=Ae+(fl>0?new Array(fl+1).join(Gt):""),Pt=Ae.indexOf(St),nt.regularGrouping>0)for(var vg=Math.floor((Pt-1)/nt.regularGrouping),rn=1;rn<=vg;rn++)Ae=[Ae.slice(0,Pt-rn*nt.regularGrouping),ds,Ae.slice(Pt-rn*nt.regularGrouping)].join("");else nt.integerPartGroupingPositions.forEach(function(be){Ae=[Ae.slice(0,Pt-be),ds,Ae.slice(Pt-be)].join(""),Pt++});if(Pt=Ae.indexOf(St),nt.fractionalPartGroupingPositions.forEach(function(be){Ae=[Ae.slice(0,be+Pt+1),ds,Ae.slice(be+Pt+1)].join("")}),Pt=Ae.indexOf(St),(nt.picture.indexOf(St)===-1||Pt===Ae.length-1)&&(Ae=Ae.substring(0,Ae.length-1)),typeof Er<"u"){var nn=pl(Er,0);hi=nt.minimumExponentSize-nn.length,hi>0&&(nn=new Array(hi+1).join(Gt)+nn),Ae=Ae+P["exponent-separator"]+(Er<0?Je:"")+nn}return Ae=nt.prefix+Ae+nt.suffix,Ae}}function M(a,l){if(!(typeof a>"u")){if(a=F(a),typeof l>"u"?l=10:l=F(l),l<2||l>36)throw{code:"D3100",stack:new Error().stack,value:l};var p=a.toString(l);return p}}function D(a){var l;if(!(typeof a>"u")){if(typeof a=="number")l=a;else if(typeof a=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(a)&&!isNaN(parseFloat(a))&&isFinite(a))l=parseFloat(a);else if(typeof a=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(a))l=Number(a);else if(a===!0)l=1;else if(a===!1)l=0;else throw{code:"D3030",value:a,stack:new Error().stack,index:1};return l}}function R(a){var l;if(!(typeof a>"u"))return l=Math.abs(a),l}function B(a){var l;if(!(typeof a>"u"))return l=Math.floor(a),l}function V(a){var l;if(!(typeof a>"u"))return l=Math.ceil(a),l}function F(a,l){var p;if(!(typeof a>"u")){if(l){var x=a.toString().split("e");a=+(x[0]+"e"+(x[1]?+x[1]+l:l))}p=Math.round(a);var P=p-a;return Math.abs(P)===.5&&Math.abs(p%2)===1&&(p=p-1),l&&(x=p.toString().split("e"),p=+(x[0]+"e"+(x[1]?+x[1]-l:-l))),Object.is(p,-0)&&(p=0),p}}function Y(a){var l;if(!(typeof a>"u")){if(a<0)throw{stack:new Error().stack,code:"D3060",index:1,value:a};return l=Math.sqrt(a),l}}function ae(a,l){var p;if(!(typeof a>"u")){if(p=Math.pow(a,l),!isFinite(p))throw{stack:new Error().stack,code:"D3061",index:1,value:a,exp:l};return p}}function xe(){return Math.random()}function ge(a){if(!(typeof a>"u")){var l=!1;if(Array.isArray(a)){if(a.length===1)l=ge(a[0]);else if(a.length>1){var p=a.filter(function(x){return ge(x)});l=p.length>0}}else typeof a=="string"?a.length>0&&(l=!0):d(a)?a!==0&&(l=!0):a!==null&&typeof a=="object"&&!f(a)?o.keys(a).length>0&&(l=!0):typeof a=="boolean"&&a===!0&&(l=!0);return l}}function fe(a){if(!(typeof a>"u"))return!ge(a)}function ue(a,l,p,x){var P=[l],L=O(a);return L>=2&&P.push(p),L>=3&&P.push(x),P}async function $e(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),x=0;x<a.length;x++){var P=ue(l,a[x],x,a),L=await l.apply(this,P);typeof L<"u"&&p.push(L)}return p}}async function de(a,l){if(!(typeof a>"u")){for(var p=this.createSequence(),x=0;x<a.length;x++){var P=a[x],L=ue(l,P,x,a),H=await l.apply(this,L);ge(H)&&p.push(P)}return p}}async function ft(a,l){if(!(typeof a>"u")){for(var p=!1,x,P=0;P<a.length;P++){var L=a[P],H=!0;if(typeof l<"u"){var K=ue(l,L,P,a),we=await l.apply(this,K);H=ge(we)}if(H)if(!p)x=L,p=!0;else throw{stack:new Error().stack,code:"D3138",index:P}}if(!p)throw{stack:new Error().stack,code:"D3139"};return x}}function Yt(){for(var a=[],l=Array.prototype.slice.call(arguments),p=Math.min.apply(Math,l.map(function(L){return Array.isArray(L)?L.length:0})),x=0;x<p;x++){var P=l.map(L=>L[x]);a.push(P)}return a}async function wt(a,l,p){if(!(typeof a>"u")){var x,P=O(l);if(P<2)throw{stack:new Error().stack,code:"D3050",index:1};var L;for(typeof p>"u"&&a.length>0?(x=a[0],L=1):(x=p,L=0);L<a.length;){var H=[x,a[L]];P>=3&&H.push(L),P>=4&&H.push(a),x=await l.apply(this,H),L++}return x}}function rt(a){var l=this.createSequence();if(Array.isArray(a)){for(var p=Object.create(null),x=0;x<a.length;x++){var P=rt.call(this,a[x]);P.forEach(function(L){p[L]=!0})}l=rt.call(this,p)}else a!==null&&typeof a=="object"&&!f(a)&&o.keys(a).forEach(L=>l.push(L));return l}function _t(a,l){var p;if(Array.isArray(a)){p=this.createSequence();for(var x=0;x<a.length;x++){var P=_t.call(this,a[x],l);typeof P<"u"&&(Array.isArray(P)?P.forEach(L=>p.push(L)):p.push(P))}}else a!==null&&typeof a=="object"&&Object.prototype.hasOwnProperty.call(a,l)&&!f(a)&&(p=a[l]);return p}function _s(a,l){if(typeof a>"u")return l;if(typeof l>"u")return a;Array.isArray(a)||(a=this.createSequence(a)),Array.isArray(l)||(l=[l]);const p=a.length+l.length;if(this.options&&p>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:p};return a.concat(l)}function $r(a){return!(typeof a>"u")}function Dr(a){var l=this.createSequence();if(Array.isArray(a))for(var p=0;p<a.length;p++)l=_s.call(this,l,Dr.call(this,a[p]));else if(a!==null&&typeof a=="object"&&!A(a))for(const P of o.keys(a)){var x=Object.create(null);x[P]=a[P],l.push(x)}else l=a;return l}function Z(a){if(!(typeof a>"u")){var l=Object.create(null);return a.forEach(function(p){for(const x of o.keys(p))l[x]=p[x]}),l}}function tn(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=a.length,p=new Array(l),x=0;x<l;x++)p[l-x-1]=a[x];return p}}async function sn(a,l){var p=this.createSequence();for(const L of o.keys(a)){var x=ue(l,a[L],L,a),P=await l.apply(this,x);typeof P<"u"&&p.push(P)}return p}function Qt(a){throw{code:"D3137",stack:new Error().stack,message:a||"$error() function evaluated"}}function li(a,l){if(!a)throw{code:"D3141",stack:new Error().stack,message:l||"$assert() statement failed"}}function us(a){if(a!==void 0)return a===null?"null":d(a)?"number":typeof a=="string"?"string":typeof a=="boolean"?"boolean":Array.isArray(a)?"array":f(a)?"function":"object"}async function ar(a,l){if(!(typeof a>"u")){if(a.length<=1)return a;var p;if(typeof l>"u"){if(!k(a)&&!b(a))throw{stack:new Error().stack,code:"D3070",index:1};p=async function(H,K){return H>K}}else p=l;var x=async function(H,K){var we=async function(Fe,We,Ke){We.length===0?Array.prototype.push.apply(Fe,Ke):Ke.length===0?Array.prototype.push.apply(Fe,We):await p(We[0],Ke[0])?(Fe.push(Ke[0]),await we(Fe,We,Ke.slice(1))):(Fe.push(We[0]),await we(Fe,We.slice(1),Ke))},oe=[];return await we(oe,H,K),oe},P=async function(H){if(!Array.isArray(H)||H.length<=1)return H;var K=Math.floor(H.length/2),we=H.slice(0,K),oe=H.slice(K);return we=await P(we),oe=await P(oe),await x(we,oe)},L=await P(a);return L}}function u(a){if(!(typeof a>"u")){if(a.length<=1)return a;for(var l=new Array(a.length),p=0;p<a.length;p++){var x=Math.floor(Math.random()*(p+1));p!==x&&(l[p]=l[x]),l[x]=a[p]}return l}}function v(a){if(!(typeof a>"u")){if(!Array.isArray(a)||a.length<=1)return a;for(var l=g(a)?this.createSequence():[],p=0;p<a.length;p++){for(var x=a[p],P=!1,L=0;L<l.length;L++)if(I(x,l[L])){P=!0;break}P||l.push(x)}return l}}async function w(a,l){var p=Object.create(null);for(const H of o.keys(a)){var x=a[H],P=ue(l,x,H,a),L=await l.apply(this,P);ge(L)&&(p[H]=x)}return o.keys(p).length===0&&(p=void 0),p}return{sum:S,count:y,max:N,min:C,average:$,string:G,substring:z,substringBefore:ne,substringAfter:re,lowercase:ie,uppercase:q,length:le,trim:pe,pad:Ue,match:ke,contains:me,replace:ce,split:Se,join:De,formatNumber:T,formatBase:M,number:D,floor:B,ceil:V,round:F,abs:R,sqrt:Y,power:ae,random:xe,boolean:ge,not:fe,map:$e,zip:Yt,filter:de,single:ft,foldLeft:wt,sift:w,keys:rt,lookup:_t,append:_s,exists:$r,spread:Dr,merge:Z,reverse:tn,each:sn,error:Qt,assert:li,type:us,sort:ar,shuffle:u,distinct:v,base64encode:W,base64decode:Pe,encodeUrlComponent:m,encodeUrl:_,decodeUrlComponent:Q,decodeUrl:ye}})();i.exports=c}).call(this)}).call(this,typeof Go<"u"?Go:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(s,i,r){var n=s("./datetime"),o=s("./functions"),c=s("./utils"),d=s("./parser"),b=s("./signature"),k=(function(){var g=c.isNumeric,f=c.isArrayOfStrings,A=c.isArrayOfNumbers,E=c.isSequence,O=c.isFunction,I=c.isLambda,U=c.isIterable,S=c.isPromise,y=c.getFunctionArity,N=c.isDeepEqual,C=Qt(null);async function $(u,v,w){var a;w.base.depth++,w.base.guardrails();var l=w.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(l&&await l(u,v,w),u.type){case"path":a=await G(u,v,w);break;case"binary":a=await le(u,v,w);break;case"unary":a=await pe(u,v,w);break;case"name":a=Ue(u,v,w);break;case"string":case"number":case"value":a=he(u);break;case"wildcard":a=me(u,v,w);break;case"descendant":a=ce(u,v,w);break;case"parent":a=w.lookup(u.slot.label);break;case"condition":a=await B(u,v,w);break;case"block":a=await V(u,v,w);break;case"bind":a=await R(u,v,w);break;case"regex":a=F(u,v,w);break;case"function":a=await ue(u,v,w);break;case"variable":a=Y(u,v,w);break;case"lambda":a=ft(u,v,w);break;case"partial":a=await Yt(u,v,w);break;case"apply":a=await fe(u,v,w);break;case"transform":a=xe(u,v,w);break}if(Object.prototype.hasOwnProperty.call(u,"predicate"))for(var p=0;p<u.predicate.length;p++)a=await q(u.predicate[p].expr,a,w);u.type!=="path"&&Object.prototype.hasOwnProperty.call(u,"group")&&(a=await T(u.group,a,w));var x=w.lookup(Symbol.for("jsonata.__evaluate_exit"));return x&&await x(u,v,w,a),a&&E(a)&&!a.tupleStream&&(u.keepArray&&(a.keepSingleton=!0),a.length===0?a=void 0:a.length===1&&(a=a.keepSingleton?a:a[0])),w.base.depth--,a}async function G(u,v,w){var a;Array.isArray(v)&&u.steps[0].type!=="variable"?a=v:a=w.base.createSequence(v);for(var l,p=!1,x=void 0,P=0;P<u.steps.length;P++){var L=u.steps[P];if(L.tuple&&(p=!0),P===0&&L.consarray?l=await $(L,a,w):p?x=await ie(L,a,x,w):l=await ne(L,a,w,P===u.steps.length-1),!p&&(typeof l>"u"||l.length===0))break;typeof L.focus>"u"&&(a=l)}if(p)if(u.tuple)l=x;else for(l=w.base.createSequence(),P=0;P<x.length;P++)l.push(x[P]["@"]);return u.keepSingletonArray&&(Array.isArray(l)&&l.cons&&!l.sequence&&(l=w.base.createSequence(l)),l.keepSingleton=!0),Object.prototype.hasOwnProperty.call(u,"group")&&(l=await T(u.group,p?x:l,w)),l}function z(u,v){var w=Qt(u);for(const a of c.keys(v))w.bind(a,v[a]);return w}async function ne(u,v,w,a){var l;if(u.type==="sort")return l=await ae(u,v,w),u.stages&&(l=await re(u.stages,l,w)),l;l=w.base.createSequence();for(var p=0;p<v.length;p++){var x=await $(u,v[p],w);if(u.stages)for(var P=0;P<u.stages.length;P++)x=await q(u.stages[P].expr,x,w);typeof x<"u"&&l.push(x)}var L=w.base.createSequence();return a&&l.length===1&&Array.isArray(l[0])&&!E(l[0])?L=l[0]:Array.prototype.forEach.call(l,function(H){!Array.isArray(H)||H.cons?L.push(H):Array.prototype.forEach.call(H,K=>L.push(K))}),L}async function re(u,v,w){for(var a=v,l=0;l<u.length;l++){var p=u[l];switch(p.type){case"filter":a=await q(p.expr,a,w);break;case"index":for(var x=0;x<a.length;x++){var P=a[x];P[p.value]=x}break}}return a}async function ie(u,v,w,a){var l;if(u.type==="sort"){if(w)l=await ae(u,w,a);else{var p=await ae(u,v,a);l=a.base.createSequence(),l.tupleStream=!0;for(var x=0;x<p.length;x++){var P={"@":p[x]};P[u.index]=x,l.push(P)}}return u.stages&&(l=await re(u.stages,l,a)),l}l=a.base.createSequence(),l.tupleStream=!0;var L=a;w===void 0&&(w=v.map(oe=>({"@":oe})));for(var H=0;H<w.length;H++){L=z(a,w[H]);var K=await $(u,w[H]["@"],L);if(typeof K<"u"){Array.isArray(K)||(K=[K]);for(var we=0;we<K.length;we++)P=Object.create(null),Object.assign(P,w[H]),K.tupleStream?Object.assign(P,K[we]):(u.focus?(P[u.focus]=K[we],P["@"]=w[H]["@"]):P["@"]=K[we],u.index&&(P[u.index]=we),u.ancestor&&(P[u.ancestor.label]=w[H]["@"])),l.push(P)}}return u.stages&&(l=await re(u.stages,l,a)),l}async function q(u,v,w){var a=w.base.createSequence();if(v&&v.tupleStream&&(a.tupleStream=!0),Array.isArray(v)||(v=w.base.createSequence(v)),u.type==="number"){var l=Math.floor(u.value);l<0&&(l=v.length+l);var p=await v[l];typeof p<"u"&&(Array.isArray(p)?a=p:a.push(p))}else for(l=0;l<v.length;l++){var p=v[l],x=p,P=w;v.tupleStream&&(x=p["@"],P=z(w,p));var L=await $(u,x,P);g(L)&&(L=[L]),A(L)?Array.prototype.forEach.call(L,function(K){var we=Math.floor(K);we<0&&(we=v.length+we),we===l&&a.push(p)}):o.boolean(L)&&a.push(p)}return a}async function le(u,v,w){var a,l=await $(u.lhs,v,w),p=u.value,x=async()=>await $(u.rhs,v,w);if(p==="and"||p==="or")try{return await ye(l,x,p)}catch(L){throw L.position=u.position,L.token=p,L}var P=await x();try{switch(p){case"+":case"-":case"*":case"/":case"%":a=Pe(l,P,p);break;case"=":case"!=":a=m(l,P,p);break;case"<":case"<=":case">":case">=":a=_(l,P,p);break;case"&":a=De(l,P);break;case"..":a=D(l,P,w);break;case"in":a=Q(l,P);break}}catch(L){throw L.position=u.position,L.token=p,L}return a}async function pe(u,v,w){var a,l={options:w.base.options,createSequence:w.base.createSequence};switch(u.value){case"-":if(a=await $(u.expression,v,w),typeof a>"u")a=void 0;else if(g(a))a=-a;else throw{code:"D1002",stack:new Error().stack,position:u.position,token:u.value,value:a};break;case"[":a=[];let P=await Promise.all(u.expressions.map(async(L,H)=>(w.isParallelCall=H>0,[L,await $(L,v,w)])));for(let L of P){var[p,x]=L;typeof x<"u"&&(p.value==="["?a.push(x):a=o.append.call(l,a,x))}u.consarray&&Object.defineProperty(a,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":a=await T(u,v,w);break}return a}function Ue(u,v,w){var a={createSequence:w.base.createSequence};return o.lookup.call(a,v,u.value)}function he(u){return u.value}function me(u,v,w){var a={options:w.base.options,createSequence:w.base.createSequence},l=a.createSequence();return Array.isArray(v)&&v.outerWrapper&&v.length>0&&(v=v[0]),v!==null&&typeof v=="object"&&!O(v)&&c.keys(v).forEach(function(p){var x=v[p];Array.isArray(x)?(x=ke(x),l=o.append.call(a,l,x)):l.push(x)}),l}function ke(u,v){return typeof v>"u"&&(v=[]),Array.isArray(u)?Array.prototype.forEach.call(u,function(w){ke(w,v)}):v.push(u),v}function ce(u,v,w){var a,l=w.base.createSequence();return typeof v<"u"&&(W(v,l),l.length===1?a=l[0]:a=l),a}function W(u,v){Array.isArray(u)||v.push(u),Array.isArray(u)?Array.prototype.forEach.call(u,function(w){W(w,v)}):u!==null&&typeof u=="object"&&!O(u)&&c.keys(u).forEach(function(w){W(u[w],v)})}function Pe(u,v,w){var a;if(typeof u<"u"&&!g(u))throw{code:"T2001",stack:new Error().stack,value:u};if(typeof v<"u"&&!g(v))throw{code:"T2002",stack:new Error().stack,value:v};if(typeof u>"u"||typeof v>"u")return a;switch(w){case"+":a=u+v;break;case"-":a=u-v;break;case"*":a=u*v;break;case"/":a=u/v;break;case"%":a=u%v;break}return a}function m(u,v,w){var a,l=typeof u,p=typeof v;if(l==="undefined"||p==="undefined")return!1;switch(w){case"=":a=N(u,v);break;case"!=":a=!N(u,v);break}return a}function _(u,v,w){var a,l=typeof u,p=typeof v,x=l==="undefined"||l==="string"||l==="number",P=p==="undefined"||p==="string"||p==="number";if(!x||!P)throw{code:"T2010",stack:new Error().stack,value:l==="string"||l==="number"?v:u};if(!(l==="undefined"||p==="undefined")){if(l!==p)throw{code:"T2009",stack:new Error().stack,value:u,value2:v};switch(w){case"<":a=u<v;break;case"<=":a=u<=v;break;case">":a=u>v;break;case">=":a=u>=v;break}return a}}function Q(u,v){var w=!1;if(typeof u>"u"||typeof v>"u")return!1;Array.isArray(v)||(v=[v]);for(var a=0;a<v.length;a++)if(v[a]===u){w=!0;break}return w}async function ye(u,v,w){var a,l=Se(u);switch(w){case"and":a=l&&Se(await v());break;case"or":a=l||Se(await v());break}return a}function Se(u){var v=o.boolean(u);return typeof v>"u"?!1:v}function De(u,v){var w,a="",l="";return typeof u<"u"&&(a=o.string(u)),typeof v<"u"&&(l=o.string(v)),w=a.concat(l),w}async function T(u,v,w){var a=Object.create(null),l=Object.create(null),p=!!(v&&v.tupleStream),x={options:w.base.options,createSequence:w.base.createSequence};Array.isArray(v)||(w.base.options,v=x.createSequence(v)),v.length===0&&!p&&v.push(void 0);for(var P=0;P<v.length;P++)for(var L=v[P],H=p?z(w,L):w,K=0;K<u.lhs.length;K++){var we=u.lhs[K],oe=await $(we[0],p?L["@"]:L,H);if(typeof oe!="string"&&oe!==void 0)throw{code:"T1003",stack:new Error().stack,position:u.position,value:oe};if(oe!==void 0){if(oe==="_jsonata_lambda"||oe==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:u.position,value:oe};var Fe={data:L,exprIndex:K};if(Object.prototype.hasOwnProperty.call(l,oe)){if(l[oe].exprIndex!==K)throw{code:"D1009",stack:new Error().stack,position:u.position,value:oe};l[oe].data=o.append.call(x,l[oe].data,L)}else l[oe]=Fe}}let We=await Promise.all(c.keys(l).map(async(it,Le)=>{let Je=l[it];var Gt=Je.data,St=w;if(p){var ds=M(Je.data,w);Gt=ds["@"],delete ds["@"],St=z(w,ds)}return w.isParallelCall=Le>0,[it,await $(u.lhs[Je.exprIndex][1],Gt,St)]}));for(let it of We){var[oe,Ke]=await it;typeof Ke<"u"&&(a[oe]=Ke)}return a}function M(u,v){if(!Array.isArray(u))return u;var w=Object.create(null),a={options:v.base.options,createSequence:v.base.createSequence};Object.assign(w,u[0]);for(var l=1;l<u.length;l++)for(const p of c.keys(u[l]))w[p]=o.append.call(a,w[p],u[l][p]);return w}function D(u,v,w){var a;if(typeof u<"u"&&!Number.isInteger(u))throw{code:"T2003",stack:new Error().stack,value:u};if(typeof v<"u"&&!Number.isInteger(v))throw{code:"T2004",stack:new Error().stack,value:v};if(typeof u>"u"||typeof v>"u"||u>v)return a;var l=v-u+1;if(l>1e7)throw{code:"D2014",stack:new Error().stack,value:l};if(w.base.options&&l>w.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};a=new Array(l);for(var p=u,x=0;p<=v;p++,x++)a[x]=p;return a.sequence=!0,a}async function R(u,v,w){var a=await $(u.rhs,v,w);return w.bind(u.lhs.value,a),a}async function B(u,v,w){var a,l=await $(u.condition,v,w);return o.boolean(l)?a=await $(u.then,v,w):typeof u.else<"u"&&(a=await $(u.else,v,w)),a}async function V(u,v,w){for(var a,l=Qt(w),p=0;p<u.expressions.length;p++)a=await $(u.expressions[p],v,l);return a}function F(u,v,w){var a=new w.base.RegexEngine(u.value),l=function(p,x){var P;a.lastIndex=x||0;var L=a.exec(p);if(L!==null){if(P={match:L[0],start:L.index,end:L.index+L[0].length,groups:[]},L.length>1)for(var H=1;H<L.length;H++)P.groups.push(L[H]);P.next=function(){if(!(a.lastIndex>=p.length)){var K=l(p,a.lastIndex);if(K&&K.match==="")throw{code:"D1004",stack:new Error().stack,position:u.position,value:u.value.source};return K}}}return P};return l}function Y(u,v,w){var a;return u.value===""?a=v&&v.outerWrapper?v[0]:v:a=w.lookup(u.value),a}async function ae(u,v,w){var a,l=v,p=!!v.tupleStream,x=async function(L,H){for(var K=0,we=0;K===0&&we<u.terms.length;we++){var oe=u.terms[we],Fe=L,We=w;p&&(Fe=L["@"],We=z(w,L));var Ke=await $(oe.expression,Fe,We);Fe=H,We=w,p&&(Fe=H["@"],We=z(w,H));var it=await $(oe.expression,Fe,We),Le=typeof Ke,Je=typeof it;if(Le==="undefined"){K=Je==="undefined"?0:1;continue}if(Je==="undefined"){K=-1;continue}if(!(Le==="string"||Le==="number")||!(Je==="string"||Je==="number"))throw{code:"T2008",stack:new Error().stack,position:u.position,value:Le==="string"||Le==="number"?it:Ke};if(Le!==Je)throw{code:"T2007",stack:new Error().stack,position:u.position,value:Ke,value2:it};Ke!==it&&(Ke<it?K=-1:K=1,oe.descending===!0&&(K=-K))}return K===1},P={environment:w,input:v};return a=await o.sort.apply(P,[l,x]),a}function xe(u,v,w){var a=async function(l){if(!(typeof l>"u")){var p=w.lookup("clone");if(!O(p))throw{code:"T2013",stack:new Error().stack,position:u.position};var x=await $e(p,[l],null,w),P=await $(u.pattern,x,w);if(typeof P<"u"){Array.isArray(P)||(P=[P]);for(var L=0;L<P.length;L++){var H=P[L],K=await $(u.update,H,w),we=typeof K;if(we!=="undefined"){if(we!=="object"||K===null||Array.isArray(K))throw{code:"T2011",stack:new Error().stack,position:u.update.position,value:K};for(const Ke of c.keys(K))H[Ke]=K[Ke]}if(typeof u.delete<"u"){var oe=await $(u.delete,H,w);if(typeof oe<"u"){var Fe=oe;if(Array.isArray(oe)||(oe=[oe]),!f(oe))throw{code:"T2012",stack:new Error().stack,position:u.delete.position,value:Fe};for(var We=0;We<oe.length;We++)typeof H=="object"&&H!==null&&delete H[oe[We]]}}}}return x}};return Z(a,"<(oa):o>")}var ge=d("function($f, $g) { function($x){ $g($f($x)) } }");async function fe(u,v,w){var a,l=await $(u.lhs,v,w);if(u.rhs.type==="function")a=await ue(u.rhs,v,w,{context:l});else{var p=await $(u.rhs,v,w);if(!O(p))throw{code:"T2006",stack:new Error().stack,position:u.position,value:p};if(O(l)){var x=await $(ge,null,w);a=await $e(x,[l,p],null,w)}else a=await $e(p,[l],null,w)}return a}async function ue(u,v,w,a){var l,p=await $(u.procedure,v,w);if(typeof p>"u"&&u.procedure.type==="path"&&w.lookup(u.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};var x=[];typeof a<"u"&&x.push(a.context);for(var P=0;P<u.arguments.length;P++){const H=await $(u.arguments[P],v,w);if(O(H)){const K=async function(...we){return await $e(H,we,null,w)};K.arity=y(H),x.push(K)}else x.push(H)}var L=u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value;try{typeof p=="object"&&(p.token=L,p.position=u.position),l=await $e(p,x,v,w)}catch(H){throw H.position||(H.position=u.position),H.token||(H.token=L),H}return l}async function $e(u,v,w,a){var l;for(l=await de(u,v,w,a);I(l)&&l.thunk===!0;){var p=await $(l.body.procedure,l.input,l.environment);l.body.procedure.type==="variable"&&(p.token=l.body.procedure.value),p.position=l.body.procedure.position;for(var x=[],P=0;P<l.body.arguments.length;P++)x.push(await $(l.body.arguments[P],l.input,l.environment));l=await de(p,x,w,a)}return l}async function de(u,v,w,a){var l;try{var p=v;if(u&&(p=wt(u.signature,v,w)),I(u))l=await rt(u,p);else if(u&&u._jsonata_function===!0){var x={environment:a,input:w,options:a.base.options,createSequence:a.base.createSequence};l=u.implementation.apply(x,p),U(l)&&(l=l.next().value),S(l)&&(l=await l)}else if(typeof u=="function")l=u.apply(w,p),S(l)&&(l=await l);else throw{code:"T1006",stack:new Error().stack}}catch(P){throw u&&(typeof P.token>"u"&&typeof u.token<"u"&&(P.token=u.token),P.position=u.position||P.position),P}return l}function ft(u,v,w){var a={_jsonata_lambda:!0,input:v,environment:w,arguments:u.arguments,signature:u.signature,body:u.body};return u.thunk===!0&&(a.thunk=!0),a.apply=async function(l,p){return await $e(a,p,v,l?l.environment:w)},a}async function Yt(u,v,w){for(var a,l=[],p=0;p<u.arguments.length;p++){var x=u.arguments[p];x.type==="operator"&&x.value==="?"?l.push(x):l.push(await $(x,v,w))}var P=await $(u.procedure,v,w);if(typeof P>"u"&&u.procedure.type==="path"&&w.lookup(u.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:u.position,token:u.procedure.steps[0].value};if(I(P))a=_t(P,l,w);else if(P&&P._jsonata_function===!0)a=_s(P.implementation,l,w);else if(typeof P=="function")a=_s(P,l,w);else throw{code:"T1008",stack:new Error().stack,position:u.position,token:u.procedure.type==="path"?u.procedure.steps[0].value:u.procedure.value};return a}function wt(u,v,w){if(typeof u>"u")return v;var a=u.validate(v,w);return a}async function rt(u,v){var w,a=Qt(u.environment);return Array.prototype.forEach.call(u.arguments,function(l,p){a.bind(l.value,v[p])}),typeof u.body=="function"?w=await $r(u.body,a):w=await $(u.body,u.input,a),w}function _t(u,v,w){var a=Qt(u.environment||w),l=[];Array.prototype.forEach.call(u.arguments,function(x,P){var L=v[P];L&&L.type==="operator"&&L.value==="?"?l.push(x):a.bind(x.value,L)});var p={_jsonata_lambda:!0,input:u.input,environment:a,arguments:l,body:u.body};return p}function _s(u,v,w){var a=Dr(u);a=a.map(function(P){return"$"+P.trim()});var l="function("+a.join(", ")+"){ _ }",p=d(l);p.body=u;var x=_t(p,v,w);return x}async function $r(u,v){var w=Dr(u),a=w.map(function(x){return v.lookup(x.trim())}),l={environment:v,createSequence:v.base.createSequence},p=u.apply(l,a);return S(p)&&(p=await p),p}function Dr(u){var v=u.toString(),w=/\(([^)]*)\)/.exec(v)[1],a=w.split(",");return a}function Z(u,v){var w={_jsonata_function:!0,implementation:u};return typeof v<"u"&&(w.signature=b(v)),w}async function tn(u,v){if(!(typeof u>"u")){var w=this.input;typeof v<"u"&&(w=v,Array.isArray(w)&&!E(w)&&(w=this.createSequence(w),w.outerWrapper=!0));try{var a=d(u,!1)}catch(p){throw us(p),{stack:new Error().stack,code:"D3120",value:p.message,error:p}}try{var l=await $(a,w,this.environment)}catch(p){throw us(p),{stack:new Error().stack,code:"D3121",value:p.message,error:p}}return l}}function sn(u){if(!(typeof u>"u"))return JSON.parse(o.string(u))}function Qt(u){var v=Object.create(null);const w={bind:function(l,p){v[l]=p},lookup:function(l){var p;return Object.prototype.hasOwnProperty.call(v,l)?p=v[l]:u&&(p=u.lookup(l)),p},timestamp:u?u.timestamp:null,async:u?u.async:!1,isParallelCall:u?u.isParallelCall:!1,global:u?u.global:{ancestry:[null]}};if(u){var a=u.lookup(Symbol.for("jsonata.__createFrame_push"));a&&a(u,w),w.base=u.base}return w}C.bind("sum",Z(o.sum,"<a<n>:n>")),C.bind("count",Z(o.count,"<a:n>")),C.bind("max",Z(o.max,"<a<n>:n>")),C.bind("min",Z(o.min,"<a<n>:n>")),C.bind("average",Z(o.average,"<a<n>:n>")),C.bind("string",Z(o.string,"<x-b?:s>")),C.bind("substring",Z(o.substring,"<s-nn?:s>")),C.bind("substringBefore",Z(o.substringBefore,"<s-s:s>")),C.bind("substringAfter",Z(o.substringAfter,"<s-s:s>")),C.bind("lowercase",Z(o.lowercase,"<s-:s>")),C.bind("uppercase",Z(o.uppercase,"<s-:s>")),C.bind("length",Z(o.length,"<s-:n>")),C.bind("trim",Z(o.trim,"<s-:s>")),C.bind("pad",Z(o.pad,"<s-ns?:s>")),C.bind("match",Z(o.match,"<s-f<s:o>n?:a<o>>")),C.bind("contains",Z(o.contains,"<s-(sf):b>")),C.bind("replace",Z(o.replace,"<s-(sf)(sf)n?:s>")),C.bind("split",Z(o.split,"<s-(sf)n?:a<s>>")),C.bind("join",Z(o.join,"<a<s>s?:s>")),C.bind("formatNumber",Z(o.formatNumber,"<n-so?:s>")),C.bind("formatBase",Z(o.formatBase,"<n-n?:s>")),C.bind("formatInteger",Z(n.formatInteger,"<n-s:s>")),C.bind("parseInteger",Z(n.parseInteger,"<s-s:n>")),C.bind("number",Z(o.number,"<(nsb)-:n>")),C.bind("floor",Z(o.floor,"<n-:n>")),C.bind("ceil",Z(o.ceil,"<n-:n>")),C.bind("round",Z(o.round,"<n-n?:n>")),C.bind("abs",Z(o.abs,"<n-:n>")),C.bind("sqrt",Z(o.sqrt,"<n-:n>")),C.bind("power",Z(o.power,"<n-n:n>")),C.bind("random",Z(o.random,"<:n>")),C.bind("boolean",Z(o.boolean,"<x-:b>")),C.bind("not",Z(o.not,"<x-:b>")),C.bind("map",Z(o.map,"<af>")),C.bind("zip",Z(o.zip,"<a+>")),C.bind("filter",Z(o.filter,"<af>")),C.bind("single",Z(o.single,"<af?>")),C.bind("reduce",Z(o.foldLeft,"<afj?:j>")),C.bind("sift",Z(o.sift,"<o-f?:o>")),C.bind("keys",Z(o.keys,"<x-:a<s>>")),C.bind("lookup",Z(o.lookup,"<x-s:x>")),C.bind("append",Z(o.append,"<xx:a>")),C.bind("exists",Z(o.exists,"<x:b>")),C.bind("spread",Z(o.spread,"<x-:a<o>>")),C.bind("merge",Z(o.merge,"<a<o>:o>")),C.bind("reverse",Z(o.reverse,"<a:a>")),C.bind("each",Z(o.each,"<o-f:a>")),C.bind("error",Z(o.error,"<s?:x>")),C.bind("assert",Z(o.assert,"<bs?:x>")),C.bind("type",Z(o.type,"<x:s>")),C.bind("sort",Z(o.sort,"<af?:a>")),C.bind("shuffle",Z(o.shuffle,"<a:a>")),C.bind("distinct",Z(o.distinct,"<x:x>")),C.bind("base64encode",Z(o.base64encode,"<s-:s>")),C.bind("base64decode",Z(o.base64decode,"<s-:s>")),C.bind("encodeUrlComponent",Z(o.encodeUrlComponent,"<s-:s>")),C.bind("encodeUrl",Z(o.encodeUrl,"<s-:s>")),C.bind("decodeUrlComponent",Z(o.decodeUrlComponent,"<s-:s>")),C.bind("decodeUrl",Z(o.decodeUrl,"<s-:s>")),C.bind("eval",Z(tn,"<sx?:x>")),C.bind("toMillis",Z(n.toMillis,"<s-s?:n>")),C.bind("fromMillis",Z(n.fromMillis,"<n-s?s?:s>")),C.bind("clone",Z(sn,"<(oa)-:o>"));var li={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 us(u){var v=li[u.code];if(typeof v<"u"){var w=v.replace(/\{\{\{([^}]+)}}}/g,function(){return u[arguments[1]]});w=w.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(u[arguments[1]])}),u.message=w}}function ar(u,v){var w,a;try{w=d(u,v&&v.recover),a=w.errors,delete w.errors}catch(x){throw us(x),x}var l=Qt(C),p=new Date;return l.bind("now",Z(function(x,P){return n.fromMillis(p.getTime(),x,P)},"<s?s?:s>")),l.bind("millis",Z(function(){return p.getTime()},"<:n>")),{evaluate:async function(x,P,L){if(typeof a<"u"){var H={code:"S0500",position:0};throw us(H),H}const K=Qt(l);for(const oe of c.keys(P))K.bind(oe,P[oe]);if(K.bind("$",x),p=new Date,K.timestamp=p,K.options=v,K.createSequence=function(){var oe=[];return v&&v.sequence&&(oe.push=function(...Fe){if(oe.length+Fe.length>v.sequence)throw{code:"D2015",stack:new Error().stack,value:v.sequence};return Array.prototype.push.apply(oe,Fe)}),oe.sequence=!0,arguments.length===1&&oe.push(arguments[0]),oe},Array.isArray(x)&&!E(x)&&(x=K.createSequence(x),x.outerWrapper=!0),v&&(v.timeout||v.stack)){const oe=Date.now();K.guardrails=function(){if(v.stack>0&&K.depth>v.stack)throw{code:"D1011",value:v.stack,stack:new Error().stack};if(v.timeout>0&&Date.now()-oe>v.timeout)throw{code:"D1012",value:v.timeout,stack:new Error().stack}}}else K.guardrails=function(){};K.base=K,K.depth=0,v&&v.RegexEngine?K.RegexEngine=v.RegexEngine:K.RegexEngine=RegExp;var we;try{return we=await $(w,x,K),typeof L=="function"&&L(null,we),we}catch(oe){throw us(oe),oe}},assign:function(x,P){l.bind(x,P)},registerFunction:function(x,P,L){var H=Z(P,L);l.bind(x,H)},ast:function(){return w},errors:function(){return a}}}return ar.parser=d,ar})();i.exports=k},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(s,i,r){var n=s("./signature");const o=(()=>{var c={".":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},d={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
73
|
+
`,r:"\r",t:" "},b=function(g){var f=0,A=g.length,E=function(U,S){var y={type:U,value:S,position:f};return y},O=function(){for(var U=f,S=0,y,N,C=function(G){if(g.charAt(G)==="/"&&S===0){for(var z=0;g.charAt(G-(z+1))==="\\";)z++;if(z%2===0)return!0}return!1};f<A;){var $=g.charAt(f);if(C(f)){if(y=g.substring(U,f),y==="")throw{code:"S0301",stack:new Error().stack,position:f};for(f++,$=g.charAt(f),U=f;$==="i"||$==="m";)f++,$=g.charAt(f);return N=g.substring(U,f)+"g",new RegExp(y,N)}($==="("||$==="["||$==="{")&&g.charAt(f-1)!=="\\"&&S++,($===")"||$==="]"||$==="}")&&g.charAt(f-1)!=="\\"&&S--,f++}throw{code:"S0302",stack:new Error().stack,position:f}},I=function(U){if(f>=A)return null;for(var S=g.charAt(f);f<A&&`
|
|
74
|
+
\r\v`.indexOf(S)>-1;)f++,S=g.charAt(f);if(S==="/"&&g.charAt(f+1)==="*"){var y=f;for(f+=2,S=g.charAt(f);!(S==="*"&&g.charAt(f+1)==="/");)if(S=g.charAt(++f),f>=A)throw{code:"S0106",stack:new Error().stack,position:y};return f+=2,S=g.charAt(f),I(U)}if(U!==!0&&S==="/")return f++,E("regex",O());if(S==="."&&g.charAt(f+1)===".")return f+=2,E("operator","..");if(S===":"&&g.charAt(f+1)==="=")return f+=2,E("operator",":=");if(S==="!"&&g.charAt(f+1)==="=")return f+=2,E("operator","!=");if(S===">"&&g.charAt(f+1)==="=")return f+=2,E("operator",">=");if(S==="<"&&g.charAt(f+1)==="=")return f+=2,E("operator","<=");if(S==="*"&&g.charAt(f+1)==="*")return f+=2,E("operator","**");if(S==="~"&&g.charAt(f+1)===">")return f+=2,E("operator","~>");if(S==="?"&&g.charAt(f+1)===":")return f+=2,E("operator","?:");if(S==="?"&&g.charAt(f+1)==="?")return f+=2,E("operator","??");if(Object.prototype.hasOwnProperty.call(c,S))return f++,E("operator",S);if(S==='"'||S==="'"){var N=S;f++;for(var C="";f<A;){if(S=g.charAt(f),S==="\\")if(f++,S=g.charAt(f),Object.prototype.hasOwnProperty.call(d,S))C+=d[S];else if(S==="u"){var $=g.substr(f+1,4);if(/^[0-9a-fA-F]+$/.test($)){var G=parseInt($,16);C+=String.fromCharCode(G),f+=4}else throw{code:"S0104",stack:new Error().stack,position:f}}else throw{code:"S0103",stack:new Error().stack,position:f,token:S};else{if(S===N)return f++,E("string",C);C+=S}f++}throw{code:"S0101",stack:new Error().stack,position:f}}var z=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,ne=z.exec(g.substring(f));if(ne!==null){var re=parseFloat(ne[0]);if(!isNaN(re)&&isFinite(re))return f+=ne[0].length,E("number",re);throw{code:"S0102",stack:new Error().stack,position:f,token:ne[0]}}var ie;if(S==="`"){f++;var q=g.indexOf("`",f);if(q!==-1)return ie=g.substring(f,q),f=q+1,E("name",ie);throw f=A,{code:"S0105",stack:new Error().stack,position:f}}for(var le=f,pe;;)if(pe=g.charAt(le),le===A||`
|
|
75
|
+
\r\v`.indexOf(pe)>-1||Object.prototype.hasOwnProperty.call(c,pe)){if(g.charAt(f)==="$")return ie=g.substring(f+1,le),f=le,E("variable",ie);switch(ie=g.substring(f,le),f=le,ie){case"or":case"in":case"and":return E("operator",ie);case"true":return E("value",!0);case"false":return E("value",!1);case"null":return E("value",null);default:return f===A&&ie===""?null:E("name",ie)}}else le++};return I},k=function(g,f){var A,E,O=Object.create(null),I=[],U=function(){var m=[];A.id!=="(end)"&&m.push({type:A.type,value:A.value,position:A.position});for(var _=E();_!==null;)m.push(_),_=E();return m},S={nud:function(){var m={code:"S0211",token:this.value,position:this.position};if(f)return m.remaining=U(),m.type="error",I.push(m),m;throw m.stack=new Error().stack,m}},y=function(m,_){var Q=O[m];return _=_||0,Q?_>=Q.lbp&&(Q.lbp=_):(Q=Object.create(S),Q.id=Q.value=m,Q.lbp=_,O[m]=Q),Q},N=function(m){if(f){m.remaining=U(),I.push(m);var _=O["(error)"];return A=Object.create(_),A.error=m,A.type="(error)",A}else throw m.stack=new Error().stack,m},C=function(m,_){if(m&&A.id!==m){var Q;A.id==="(end)"?Q="S0203":Q="S0202";var ye={code:Q,position:A.position,token:A.value,value:m};return N(ye)}var Se=E(_);if(Se===null)return A=O["(end)"],A.position=g.length,A;var De=Se.value,T=Se.type,M;switch(T){case"name":case"variable":M=O["(name)"];break;case"operator":if(M=O[De],!M)return N({code:"S0204",stack:new Error().stack,position:Se.position,token:De});break;case"string":case"number":case"value":M=O["(literal)"];break;case"regex":T="regex",M=O["(regex)"];break;default:return N({code:"S0205",stack:new Error().stack,position:Se.position,token:De})}return A=Object.create(M),A.value=De,A.type=T,A.position=Se.position,A},$=function(m){var _,Q=A;for(C(null,!0),_=Q.nud();m<A.lbp;)Q=A,C(),_=Q.led(_);return _},G=function(m){var _=y(m,0);_.nud=function(){return this}},z=function(m,_,Q){var ye=_||c[m],Se=y(m,ye);return Se.led=Q||function(De){return this.lhs=De,this.rhs=$(ye),this.type="binary",this},Se},ne=function(m,_,Q){var ye=y(m,_);return ye.led=Q,ye},re=function(m,_){var Q=y(m);return Q.nud=_||function(){return this.expression=$(70),this.type="unary",this},Q};G("(end)"),G("(name)"),G("(literal)"),G("(regex)"),y(":"),y(";"),y(","),y(")"),y("]"),y("}"),y(".."),z("."),z("+"),z("-"),z("*"),z("/"),z("%"),z("="),z("<"),z(">"),z("!="),z("<="),z(">="),z("&"),z("and"),z("or"),z("in"),G("and"),G("or"),G("in"),re("-"),z("~>"),z("??",c["??"],function(m){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(m))]},this.then=m,this.else=$(0),this}),ne("(error)",10,function(m){return this.lhs=m,this.error=A.error,this.remaining=U(),this.type="error",this}),re("*",function(){return this.type="wildcard",this}),re("**",function(){return this.type="descendant",this}),re("%",function(){return this.type="parent",this}),z("(",c["("],function(m){if(this.procedure=m,this.type="function",this.arguments=[],A.id!==")")for(;A.type==="operator"&&A.id==="?"?(this.type="partial",this.arguments.push(A),C("?")):this.arguments.push($(0)),A.id===",";)C(",");if(C(")",!0),m.type==="name"&&(m.value==="function"||m.value==="λ")){if(this.arguments.forEach(function(De,T){if(De.type!=="variable")return N({code:"S0208",stack:new Error().stack,position:De.position,token:De.value,value:T+1})}),this.type="lambda",A.id==="<"){for(var _=A.position,Q=1,ye="<";Q>0&&A.id!=="{"&&A.id!=="(end)";){var Se=C();Se.id===">"?Q--:Se.id==="<"&&Q++,ye+=Se.value}C(">");try{this.signature=n(ye)}catch(De){return De.position=_+De.offset,N(De)}}C("{"),this.body=$(0),C("}")}return this}),re("(",function(){for(var m=[];A.id!==")"&&(m.push($(0)),A.id===";");)C(";");return C(")",!0),this.type="block",this.expressions=m,this}),re("[",function(){var m=[];if(A.id!=="]")for(;;){var _=$(0);if(A.id===".."){var Q={type:"binary",value:"..",position:A.position,lhs:_};C(".."),Q.rhs=$(0),_=Q}if(m.push(_),A.id!==",")break;C(",")}return C("]",!0),this.expressions=m,this.type="unary",this}),z("[",c["["],function(m){if(A.id==="]"){for(var _=m;_&&_.type==="binary"&&_.value==="[";)_=_.lhs;return _.keepArray=!0,C("]"),m}else return this.lhs=m,this.rhs=$(c["]"]),this.type="binary",C("]",!0),this}),z("^",c["^"],function(m){C("(");for(var _=[];;){var Q={descending:!1};if(A.id==="<"?C("<"):A.id===">"&&(Q.descending=!0,C(">")),Q.expression=$(0),_.push(Q),A.id!==",")break;C(",")}return C(")"),this.lhs=m,this.rhs=_,this.type="binary",this});var ie=function(m){var _=[];if(A.id!=="}")for(;;){var Q=$(0);C(":");var ye=$(0);if(_.push([Q,ye]),A.id!==",")break;C(",")}return C("}",!0),typeof m>"u"?(this.lhs=_,this.type="unary"):(this.lhs=m,this.rhs=_,this.type="binary"),this};re("{",ie),z("{",c["{"],ie),ne(":=",c[":="],function(m){return m.type!=="variable"?N({code:"S0212",stack:new Error().stack,position:m.position,token:m.value}):(this.lhs=m,this.rhs=$(c[":="]-1),this.type="binary",this)}),z("@",c["@"],function(m){return this.lhs=m,this.rhs=$(c["@"]),this.rhs.type!=="variable"?N({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),z("#",c["#"],function(m){return this.lhs=m,this.rhs=$(c["#"]),this.rhs.type!=="variable"?N({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),z("?",c["?"],function(m){return this.type="condition",this.condition=m,this.then=$(0),A.id===":"&&(C(":"),this.else=$(0)),this}),z("?:",c["?:"],function(m){return this.type="condition",this.condition=JSON.parse(JSON.stringify(m)),this.then=m,this.else=$(0),this}),re("|",function(){return this.type="transform",this.pattern=$(0),C("|"),this.update=$(0),A.id===","&&(C(","),this.delete=$(0)),C("|"),this});var q=function(m){var _;if(m.type==="function"&&!m.predicate){var Q={type:"lambda",thunk:!0,arguments:[],position:m.position};Q.body=m,_=Q}else if(m.type==="condition")m.then=q(m.then),typeof m.else<"u"&&(m.else=q(m.else)),_=m;else if(m.type==="block"){var ye=m.expressions.length;ye>0&&(m.expressions[ye-1]=q(m.expressions[ye-1])),_=m}else _=m;return _},le=0,pe=0,Ue=[],he=function(m,_){switch(m.type){case"name":case"wildcard":_.level--,_.level===0&&(typeof m.ancestor>"u"||(Ue[_.index].slot.label=m.ancestor.label),m.ancestor=_,m.tuple=!0);break;case"parent":_.level++;break;case"block":m.expressions.length>0&&(m.tuple=!0,_=he(m.expressions[m.expressions.length-1],_));break;case"path":m.tuple=!0;var Q=m.steps.length-1;for(_=he(m.steps[Q--],_);_.level>0&&Q>=0;)_=he(m.steps[Q--],_);break;default:throw{code:"S0217",token:m.type,position:m.position}}return _},me=function(m,_){if(typeof _.seekingParent<"u"||_.type==="parent"){var Q=typeof _.seekingParent<"u"?_.seekingParent:[];_.type==="parent"&&Q.push(_.slot),typeof m.seekingParent>"u"?m.seekingParent=Q:Array.prototype.push.apply(m.seekingParent,Q)}},ke=function(m){var _=m.steps.length-1,Q=m.steps[_],ye=typeof Q.seekingParent<"u"?Q.seekingParent:[];Q.type==="parent"&&ye.push(Q.slot);for(var Se=0;Se<ye.length;Se++){var De=ye[Se];for(_=m.steps.length-2;De.level>0;){if(_<0){typeof m.seekingParent>"u"?m.seekingParent=[De]:m.seekingParent.push(De);break}for(var T=m.steps[_--];_>=0&&T.focus&&m.steps[_].focus;)T=m.steps[_--];De=he(T,De)}}},ce=function(m){var _;switch(m.type){case"binary":switch(m.value){case".":var Q=ce(m.lhs);Q.type==="path"?_=Q:_={type:"path",steps:[Q]},Q.type==="parent"&&(_.seekingParent=[Q.slot]);var ye=ce(m.rhs);ye.type==="path"?Array.prototype.push.apply(_.steps,ye.steps):(typeof ye.predicate<"u"&&(ye.stages=ye.predicate,delete ye.predicate),_.steps.push(ye)),_.steps.filter(function(Y){if(Y.type==="number"||Y.type==="value")throw{code:"S0213",stack:new Error().stack,position:Y.position,value:Y.value};return Y.type==="string"}).forEach(function(Y){Y.type="name"}),_.steps.filter(function(Y){return Y.keepArray===!0}).length>0&&(_.keepSingletonArray=!0);var Se=_.steps[0];Se.type==="unary"&&Se.value==="["&&(Se.consarray=!0);var De=_.steps[_.steps.length-1];De.type==="unary"&&De.value==="["&&(De.consarray=!0),ke(_);break;case"[":_=ce(m.lhs);var T=_,M="predicate";if(_.type==="path"&&(T=_.steps[_.steps.length-1],M="stages"),typeof T.group<"u")throw{code:"S0209",stack:new Error().stack,position:m.position};typeof T[M]>"u"&&(T[M]=[]);var D=ce(m.rhs);typeof D.seekingParent<"u"&&(D.seekingParent.forEach(Y=>{Y.level===1?he(T,Y):Y.level--}),me(T,D)),T[M].push({type:"filter",expr:D,position:m.position});break;case"{":if(_=ce(m.lhs),typeof _.group<"u")throw{code:"S0210",stack:new Error().stack,position:m.position};_.group={lhs:m.rhs.map(function(Y){return[ce(Y[0]),ce(Y[1])]}),position:m.position};break;case"^":_=ce(m.lhs),_.type!=="path"&&(_={type:"path",steps:[_]});var R={type:"sort",position:m.position};R.terms=m.rhs.map(function(Y){var ae=ce(Y.expression);return me(R,ae),{descending:Y.descending,expression:ae}}),_.steps.push(R),ke(_);break;case":=":_={type:"bind",value:m.value,position:m.position},_.lhs=ce(m.lhs),_.rhs=ce(m.rhs),me(_,_.rhs);break;case"@":if(_=ce(m.lhs),T=_,_.type==="path"&&(T=_.steps[_.steps.length-1]),typeof T.stages<"u"||typeof T.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:m.position};if(T.type==="sort")throw{code:"S0216",stack:new Error().stack,position:m.position};m.keepArray&&(T.keepArray=!0),T.focus=m.rhs.value,T.tuple=!0;break;case"#":_=ce(m.lhs),T=_,_.type==="path"?T=_.steps[_.steps.length-1]:(_={type:"path",steps:[_]},typeof T.predicate<"u"&&(T.stages=T.predicate,delete T.predicate)),typeof T.stages>"u"?T.index=m.rhs.value:T.stages.push({type:"index",value:m.rhs.value,position:m.position}),T.tuple=!0;break;case"~>":_={type:"apply",value:m.value,position:m.position},_.lhs=ce(m.lhs),_.rhs=ce(m.rhs),_.keepArray=_.lhs.keepArray||_.rhs.keepArray;break;default:_={type:m.type,value:m.value,position:m.position},_.lhs=ce(m.lhs),_.rhs=ce(m.rhs),me(_,_.lhs),me(_,_.rhs)}break;case"unary":_={type:m.type,value:m.value,position:m.position},m.value==="["?_.expressions=m.expressions.map(function(Y){var ae=ce(Y);return me(_,ae),ae}):m.value==="{"?_.lhs=m.lhs.map(function(Y){var ae=ce(Y[0]);me(_,ae);var xe=ce(Y[1]);return me(_,xe),[ae,xe]}):(_.expression=ce(m.expression),m.value==="-"&&_.expression.type==="number"?(_=_.expression,_.value=-_.value):me(_,_.expression));break;case"function":case"partial":_={type:m.type,name:m.name,value:m.value,position:m.position},_.arguments=m.arguments.map(function(Y){var ae=ce(Y);return me(_,ae),ae}),_.procedure=ce(m.procedure);break;case"lambda":_={type:m.type,arguments:m.arguments,signature:m.signature,position:m.position};var B=ce(m.body);_.body=q(B);break;case"condition":_={type:m.type,position:m.position},_.condition=ce(m.condition),me(_,_.condition),_.then=ce(m.then),me(_,_.then),typeof m.else<"u"&&(_.else=ce(m.else),me(_,_.else));break;case"transform":_={type:m.type,position:m.position},_.pattern=ce(m.pattern),_.update=ce(m.update),typeof m.delete<"u"&&(_.delete=ce(m.delete));break;case"block":_={type:m.type,position:m.position},_.expressions=m.expressions.map(function(Y){var ae=ce(Y);return me(_,ae),(ae.consarray||ae.type==="path"&&ae.steps[0].consarray)&&(_.consarray=!0),ae});break;case"name":_={type:"path",steps:[m]},m.keepArray&&(_.keepSingletonArray=!0);break;case"parent":_={type:"parent",slot:{label:"!"+le++,level:1,index:pe++}},Ue.push(_);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":_=m;break;case"operator":if(m.value==="and"||m.value==="or"||m.value==="in")m.type="name",_=ce(m);else if(m.value==="?")_=m;else throw{code:"S0201",stack:new Error().stack,position:m.position,token:m.value};break;case"error":_=m,m.lhs&&(_=ce(m.lhs));break;default:var V="S0206";m.id==="(end)"&&(V="S0207");var F={code:V,position:m.position,token:m.value};if(f)return I.push(F),{type:"error",error:F};throw F.stack=new Error().stack,F}return m.keepArray&&(_.keepArray=!0),_};E=b(g),C();var W=$(0);if(A.id!=="(end)"){var Pe={code:"S0201",position:A.position,token:A.value};N(Pe)}if(W=ce(W),W.type==="parent"||typeof W.seekingParent<"u")throw{code:"S0217",token:W.type,position:W.position};return I.length>0&&(W.errors=I),W};return k})();i.exports=o},{"./signature":5}],5:[function(s,i,r){var n=s("./utils");const o=(()=>{var c={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function d(b){for(var k=1,g=[],f=Object.create(null),A=f;k<b.length;){var E=b.charAt(k);if(E===":")break;var O=function(){g.push(f),A=f,f=Object.create(null)},I=function(z,ne,re,ie){for(var q=1,le=ne;le<z.length;)if(le++,E=z.charAt(le),E===ie){if(q--,q===0)break}else E===re&&q++;return le};switch(E){case"s":case"n":case"b":case"l":case"o":f.regex="["+E+"m]",f.type=E,O();break;case"a":f.regex="[asnblfom]",f.type=E,f.array=!0,O();break;case"f":f.regex="f",f.type=E,O();break;case"j":f.regex="[asnblom]",f.type=E,O();break;case"x":f.regex="[asnblfom]",f.type=E,O();break;case"-":A.context=!0,A.contextRegex=new RegExp(A.regex),A.regex+="?";break;case"?":case"+":A.regex+=E;break;case"(":var U=I(b,k,"(",")"),S=b.substring(k+1,U);if(S.indexOf("<")===-1)f.regex="["+S+"m]";else throw{code:"S0402",stack:new Error().stack,value:S,offset:k};f.type="("+S+")",k=U,O();break;case"<":if(A.type==="a"||A.type==="f"){var y=I(b,k,"<",">");A.subtype=b.substring(k+1,y),k=y}else throw{code:"S0401",stack:new Error().stack,value:A.type,offset:k};break}k++}var N="^"+g.map(function(z){return"("+z.regex+")"}).join("")+"$",C=new RegExp(N),$=function(z){var ne;if(n.isFunction(z))ne="f";else{var re=typeof z;switch(re){case"string":ne="s";break;case"number":ne="n";break;case"boolean":ne="b";break;case"object":z===null?ne="l":Array.isArray(z)?ne="a":ne="o";break;case"undefined":default:ne="m"}}return ne},G=function(z,ne){for(var re="^",ie=0,q=0;q<g.length;q++){re+=g[q].regex;var le=ne.match(re);if(le===null)throw{code:"T0410",stack:new Error().stack,value:z[ie],index:ie+1};ie=le[0].length}throw{code:"T0410",stack:new Error().stack,value:z[ie],index:ie+1}};return{definition:b,validate:function(z,ne){var re="";z.forEach(function(pe){re+=$(pe)});var ie=C.exec(re);if(ie){var q=[],le=0;return g.forEach(function(pe,Ue){var he=z[le],me=ie[Ue+1];if(me==="")if(pe.context&&pe.contextRegex){var ke=$(ne);if(pe.contextRegex.test(ke))q.push(ne);else throw{code:"T0411",stack:new Error().stack,value:ne,index:le+1}}else q.push(he),le++;else me.split("").forEach(function(ce){if(he=z[le],pe.type==="a"){if(ce==="m")he=void 0;else{var W=!0;if(typeof pe.subtype<"u"){if(ce!=="a"&&me!==pe.subtype)W=!1;else if(ce==="a"&&he.length>0){var Pe=$(he[0]);if(Pe!==pe.subtype.charAt(0))W=!1;else{var m=he.filter(function(_){return $(_)!==Pe});W=m.length===0}}}if(!W)throw{code:"T0412",stack:new Error().stack,value:he,index:le+1,type:c[pe.subtype]};ce!=="a"&&(he=[he])}q.push(he),le++}else q.push(he),le++})}),q}G(z,re)}}}return d})();i.exports=o},{"./utils":6}],6:[function(s,i,r){const n=(()=>{function o(y){var N=!1;if(typeof y=="number"&&(N=!isNaN(y),N&&!isFinite(y)))throw{code:"D1001",value:y,stack:new Error().stack};return N}function c(y){var N=!1;return Array.isArray(y)&&(N=y.filter(function(C){return typeof C!="string"}).length===0),N}function d(y){var N=!1;return Array.isArray(y)&&(N=y.filter(function(C){return!o(C)}).length===0),N}function b(y){return y.sequence===!0&&Array.isArray(y)}function k(y){return y&&(y._jsonata_function===!0||y._jsonata_lambda===!0)||typeof y=="function"}function g(y){var N=typeof y.arity=="number"?y.arity:typeof y.implementation=="function"?y.implementation.length:typeof y.length=="number"?y.length:y.arguments.length;return N}function f(y){return y&&y._jsonata_lambda===!0}var A=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function E(y){return typeof y=="object"&&y!==null&&A in y&&"next"in y&&typeof y.next=="function"}function O(y,N){if(y===N)return!0;if(typeof y=="object"&&typeof N=="object"&&y!==null&&N!==null){if(Array.isArray(y)&&Array.isArray(N)){if(y.length!==N.length)return!1;for(var C=0;C<y.length;C++)if(!O(y[C],N[C]))return!1;return!0}var $=Object.getOwnPropertyNames(y),G=Object.getOwnPropertyNames(N);if($.length!==G.length)return!1;for($=$.sort(),G=G.sort(),C=0;C<$.length;C++)if($[C]!==G[C])return!1;for(C=0;C<$.length;C++){var z=$[C];if(!O(y[z],N[z]))return!1}return!0}return!1}function I(y){return typeof y=="object"&&y!==null&&"then"in y&&typeof y.then=="function"}function U(y){var N=[];for(let C of y)N.push(C);return N}function S(y){return typeof y=="object"&&y!==null?Object.keys(y):[]}return{isNumeric:o,isArrayOfStrings:c,isArrayOfNumbers:d,isSequence:b,isFunction:k,isLambda:f,isIterable:E,getFunctionArity:g,isDeepEqual:O,stringToArray:U,isPromise:I,keys:S}})();i.exports=n},{}]},{},[3])(3)})})(kn)),kn.exports}var Mc=Lc();const Nc=Zo(Mc);function Ic(t){t.registerFunction("ucFirst",e=>Tr.ucFirst(String(e??""))),t.registerFunction("currency",(e,s="fr-FR",i="EUR")=>{const r=Number(e);return Number.isNaN(r)?String(e??""):new Intl.NumberFormat(String(s),{style:"currency",currency:String(i)}).format(r)}),t.registerFunction("percent",(e,s="fr-FR",i=0)=>{const r=Number(e);return Number.isNaN(r)?String(e??""):new Intl.NumberFormat(String(s),{style:"percent",maximumFractionDigits:Number(i)||0}).format(r)}),t.registerFunction("date",(e,s="fr-FR",i)=>{const r=e instanceof Date?e:new Date(String(e));if(Number.isNaN(r.getTime()))return String(e??"");let n={dateStyle:"medium"};if(i)try{n=JSON.parse(String(i))}catch{}return new Intl.DateTimeFormat(String(s),n).format(r)}),t.registerFunction("toChart",(e,s="label",i="value",r="")=>{const n=Array.isArray(e)?e:[],o=[],c=[];for(const d of n){if(!d||typeof d!="object")continue;const b=d;o.push(String(b[String(s)]??"")),c.push(Number(b[String(i)]??0))}return{labels:o,datasets:[{label:String(r||""),data:c}]}})}const Qo=new Map,ea=8e3;function Fc(t){if(!t||!t.trim())throw new Error("[sonic-jsonata] expression vide.");if(t.length>ea)throw new Error(`[sonic-jsonata] expression trop longue (${t.length} > ${ea}).`);const e=Qo.get(t);if(e)return e;try{const s=Nc(t);return Ic(s),Qo.set(t,s),s}catch(s){const i=s instanceof Error?s.message:typeof s=="object"&&s&&"message"in s?String(s.message):String(s);throw new Error(`[sonic-jsonata] Syntaxe JSONata invalide : ${i}`)}}function Rc(t,e){if(!e||typeof e!="object")return;const s=e.type;if(typeof s=="string"&&!(s==="array"&&Array.isArray(t)||s==="object"&&t!==null&&typeof t=="object"&&!Array.isArray(t)||s==="string"&&typeof t=="string"||s==="number"&&typeof t=="number"||s==="boolean"&&typeof t=="boolean"||s==="null"&&t===null))throw new Error(`[sonic-jsonata] outputSchema : type attendu "${s}", reçu ${jc(t)}.`);if(Array.isArray(e.required)&&t&&typeof t=="object"){const i=t;for(const r of e.required)if(typeof r=="string"&&!(r in i))throw new Error(`[sonic-jsonata] outputSchema : propriété requise manquante "${r}".`)}}function jc(t){return t===null?"null":Array.isArray(t)?"array":typeof t}const zc=150,ta=10,Uc=200,qc=16,sa=new WeakMap;let ra=!1;function fs(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function br(t){if(t===window)return{x:window.scrollX,y:window.scrollY};const e=t;return{x:e.scrollLeft,y:e.scrollTop}}function Bc(t,e,s){if(t===window){window.scrollTo(e,s);return}const i=t;typeof i.scrollTo=="function"?i.scrollTo(e,s):(i.scrollLeft=e,i.scrollTop=s)}function Hc(t){if(t===window){const s=document.documentElement;return Math.max(0,s.scrollHeight-window.innerHeight)}const e=t;return Math.max(0,e.scrollHeight-e.clientHeight)}function Ys(t){let e=sa.get(t);if(!e){const s=br(t);e={x:s.x,y:s.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},sa.set(t,e)}return e}function Li(t){Ys(t).userEngaged=!0}function Mi(t){const e=Ys(t);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},zc)}function ia(t,e){return e-t>=Uc}function vr(t){if(!fs())return;const e=Ys(t);if(e.restoring)return;const s=br(t);if(ia(s.y,e.y)){Dn(t);return}e.x=s.x,e.y=s.y}function $n(t){if(!fs())return;const e=Ys(t),s=Hc(t),i=e.x,r=s>0?Math.min(e.y,s):e.y,{x:n,y:o}=br(t);if(!(Math.abs(i-n)<=ta&&Math.abs(r-o)<=ta)){e.restoring=!0;try{Bc(t,i,r)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Vc(t,e={x:0,y:0}){if(!fs())return;const s=Ys(t);if(e==="current"){const i=br(t);s.x=i.x,s.y=i.y;return}s.x=e.x??0,s.y=e.y??0}function Dn(t){const e=Ys(t);if(e.stickyFrames=qc,e.raf)return;const s=()=>{e.raf=0,$n(t),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(s))};e.raf=requestAnimationFrame(s)}function En(t){Dn(t)}function Gs(t){if(!fs())return;const e=Ys(t);if(e.watching)return;e.watching=!0;const s=t===window?window:t,i=()=>{if(e.restoring)return;const{y:E}=br(t);if(ia(E,e.y)){Dn(t);return}if(e.userEngaged){vr(t),Mi(t);return}vr(t)},r=E=>na(E)===t,n=E=>{r(E)&&(vr(t),Li(t))},o=E=>{r(E)&&Mi(t)},c=E=>{r(E)&&(vr(t),Li(t),Mi(t))};s.addEventListener("scroll",i,{passive:!0}),s.addEventListener("touchstart",n,{passive:!0}),s.addEventListener("touchend",o,{passive:!0}),s.addEventListener("touchcancel",o,{passive:!0}),s.addEventListener("wheel",c,{passive:!0}),s.addEventListener("pointerdown",n,{passive:!0}),s.addEventListener("pointerup",o,{passive:!0}),s.addEventListener("pointercancel",o,{passive:!0});const d=br(t);if(e.x=d.x,e.y=d.y,t===window){const E=new ResizeObserver(()=>En(window));E.observe(document.documentElement),e.resizeObserver=E;return}const b=t,k=new ResizeObserver(()=>En(b));k.observe(b);for(const E of Array.from(b.children))k.observe(E);e.resizeObserver=k;const g=()=>En(b),f=new MutationObserver(E=>{for(const O of E)if(O.type==="childList")for(const I of Array.from(O.addedNodes))I instanceof Element&&k.observe(I);g()});f.observe(b,{childList:!0,subtree:!0,characterData:!0});const A=b.getRootNode();A instanceof ShadowRoot&&A.host&&f.observe(A.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=f}function na(t){for(const e of t.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&oa(e))return e;return window}function oa(t){if(!(t instanceof HTMLElement)||t===document.documentElement||t===document.body)return!1;const e=getComputedStyle(t).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function On(t){for(const s of t.composedPath())s===window||s===document||s instanceof HTMLElement&&oa(s)&&Gs(s);const e=na(t);Gs(e),t.type==="wheel"?(vr(e),Li(e),Mi(e)):(t.type==="touchstart"||t.type==="pointerdown")&&(vr(e),Li(e))}function Ni(t){t instanceof Element&&t.classList?.contains("custom-scroll")&&Gs(t),t.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&Gs(e)})}function Tn(t){Ni(t),new MutationObserver(s=>{for(const i of s)for(const r of Array.from(i.addedNodes))r instanceof Element&&Ni(r)}).observe(t,{childList:!0,subtree:!0})}function Ln(t){t.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(Tn(e.shadowRoot),Ln(e.shadowRoot))})}function Wc(){const t=Element.prototype;if(t.__safariScrollGuardPatched)return;t.__safariScrollGuardPatched=!0;const e=t.attachShadow;t.attachShadow=function(i){const r=e.call(this,i);return Tn(r),r}}function aa(){if(typeof window>"u"||ra||(ra=!0,!fs()))return;Gs(window),Wc();const t={capture:!0,passive:!0};window.addEventListener("wheel",On,t),window.addEventListener("touchstart",On,t),window.addEventListener("pointerdown",On,t);const e=()=>{Ni(document),Ln(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(i=>{for(const r of i)for(const n of Array.from(r.addedNodes))n instanceof Element&&(Ni(n),n.shadowRoot&&Tn(n.shadowRoot),Ln(n))}).observe(document.documentElement,{childList:!0,subtree:!0})}const Kc=yl,Yc=yc,Gc=yi,Zc=Tr,gs=qe,Jc=ct,Hr=at,Xc=Ds,Qc=ps;aa(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:Kc,Arrays:Yc,DataBindObserver:Gc,Format:Zc,HTML:gs,LocationHandler:Jc,Objects:Hr,PublisherManager:ve,api:Xc,URLPattern:Qc,Endpoint:$i,DataProviderKey:xs};var eh=Object.defineProperty,th=Object.getOwnPropertyDescriptor,Vr=(t,e,s,i)=>{for(var r=i>1?void 0:i?th(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&eh(e,s,r),r};const Mn=t=>{class e extends t{constructor(){super(...arguments),this._value="",this.forceAutoFill=!1,this.unique=null,this.radio=null,this._checked=null,this.updateAllChecked=()=>{const i=this.getAttribute("name"),r=this.getCheckAllPublisher(),n=this.getFormPublisher();if(r?.hasCheckAll.get()&&!this.checksAll()&&r&&n&&i){if(this.getFormPublisherValue()?.length)(this.checked===null||r.checkMode.get()=="noneChecked"||r.checkMode.get()==null)&&r.checkMode.set("someUnchecked");else{r.checkMode.set("noneChecked");return}const o=this.getFormPublisherValue(),c=r.values.get();if(c&&c.length){let d=c.length;for(const b of c)o.indexOf(b)==-1&&(d-=1);d==c.length&&r.checkMode.set("allChecked"),d==0&&r.checkMode.set("noneChecked")}c.indexOf(this.value)==-1&&this.unsetOnDisconnect()&&(this.checked=null)}},this.onChecksAllRequest=i=>{this.removeAttribute("allChecked"),this.removeAttribute("indeterminate"),i=="allChecked"&&(this.checked=!0,this.setAttribute("allChecked","")),i=="noneChecked"&&(this.checked=null),i=="someUnchecked"&&(this.checksAll()&&(this.checked="indeterminate"),this.setAttribute("indeterminate",""))}}get value(){return this._value}set value(i){if(this.value==i||(this.hasAttribute("value")&&!this.forceAutoFill&&(i=this.getAttribute("value")),this._value==i)||i==null||(this._value=i,!this.value))return;if(this.getFormPublisher()&&this.name){let n=this.getFormPublisherValue();(this.radio||this.unique)&&(this.checked=n==i?!0:null),Array.isArray(n)||(n=[]),n.indexOf(i)!=-1&&(this.checked=!0)}this.checked==!0&&this.updateDataValue(),this.requestUpdate()}get checked(){return this._checked}set checked(i){if(this.setCheckedValue(i),this.checksAll()){const r=this.getCheckAllPublisher();r&&(this.checked===!0?r.checkMode.set("allChecked"):this.checked===null&&(r.checkMode.set("noneChecked"),this.getFormPublisher()&&this.setFormPublisherValue([])))}this.requestUpdate()}validateFormElement(){const i=this.shadowRoot?.querySelector("input");if(!i||i.checkValidity())return;const r=this.getFormPublisher();if(r){const n=this.getFormPublisherValue();if((this.unique||this.radio)&&n!==null&&n!==void 0&&n.toString().length>0)return;r.isFormValid=!1,i.reportValidity()}}checksAll(){return this.hasAttribute("checksAll")}setCheckedValue(i){this._checked!=i&&(this._checked=i,this.updateDataValue(),this.requestUpdate(),setTimeout(()=>this.updateAllChecked(),1))}handleChange(){const i=this.checked===!0?this.radio?!0:null:!0;this.checked=i;const r=new Event("change");this.dispatchEvent(r)}getValueForFormPublisher(){let i=this.getFormPublisherValue();if(this.radio)return this.checked===!0&&this.value!=null?this.value:i;if(this.unique)return this.checked===!0&&this.value!=null?this.value:null;Array.isArray(i)||(i=[]);const r=i.slice(0),n=r.indexOf(this.value);return this.checked===!0&&n===-1&&!this.checksAll()&&r.push(this.value),this.checked===null&&n!==-1&&r.splice(n,1),r}setFormValueFromPublisher(i){if(this.unique||this.radio){this.checked=this.value==i?!0:null;return}Array.isArray(i)||(i=[]),!this.checksAll()&&(this.checked=i.indexOf(this.value)!==-1?!0:null)}getCheckAllPublisher(){this.formDataProvider||(this.formDataProvider=this.getAncestorAttributeValue("formDataProvider"));const i=this.formDataProvider,r=this.getAttribute("name");return!i||!r?null:ve.get(i+"/"+r+"/_available_values_")}unset(){this.checked=null}disconnectedCallback(){super.disconnectedCallback();const i=this.getCheckAllPublisher();if(i&&(i.checkMode.offAssign(this.onChecksAllRequest),!this.checksAll())){const r=i.values.get().slice(0),n=r.indexOf(this.value);n!=-1&&(r.splice(n,1),i.values.set(r))}setTimeout(()=>this.updateAllChecked(),1)}connectedCallback(){if(super.connectedCallback(),this.getFormPublisher()&&this.name){const n=this.getFormPublisherValue();n&&Array.isArray(n)&&n.indexOf(this.value)!==-1&&(this.checked=!0)}const r=this.getCheckAllPublisher();r&&(r.checkMode.onAssign(this.onChecksAllRequest),this.checksAll()&&r.hasCheckAll.set(!0),r.values.get()||r.values.set([]),this.checksAll()||r.values.set([...r.values.get(),this.value])),this.hasAttribute("checked")&&setTimeout(()=>this.checked=!0,1)}}return Vr([h()],e.prototype,"value",1),Vr([h()],e.prototype,"forceAutoFill",2),Vr([h({type:Boolean})],e.prototype,"unique",2),Vr([h({type:Boolean})],e.prototype,"radio",2),Vr([h()],e.prototype,"checked",1),e};/**
|
|
76
76
|
* @license
|
|
77
77
|
* Copyright 2018 Google LLC
|
|
78
78
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
79
|
-
*/const
|
|
79
|
+
*/const se=t=>t??te,ss=ee`
|
|
80
80
|
/*SIZES*/
|
|
81
81
|
:host {
|
|
82
82
|
--sc-_fs: 1rem;
|
|
@@ -109,15 +109,15 @@
|
|
|
109
109
|
:host([size="inherit"]) {
|
|
110
110
|
--sc-_fs: 1em;
|
|
111
111
|
}
|
|
112
|
-
`;var
|
|
112
|
+
`;var sh=Object.defineProperty,rh=Object.getOwnPropertyDescriptor,Be=(t,e,s,i)=>{for(var r=i>1?void 0:i?rh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&sh(e,s,r),r};const ih="sonic-button";let Me=class extends Mn(mr(J)){constructor(){super(...arguments),this.type="default",this.variant="default",this.shape="default",this.direction="row",this.alignItems="center",this.justify="center",this.minWidth="0",this.icon=!1,this.download=null,this.autoActive="partial",this.loading=!1,this.hasPrefix=!1,this.hasSuffix=!1,this._href="",this.goBack=null,this.pushState=!1,this.active=!1,this.autoRepeat=!1,this.pointerDownTime=0,this.lastRepeatTime=0,this.isRepeating=!1,this.handleRepeatend=()=>{window.removeEventListener("pointerup",this.handleRepeatend),window.removeEventListener("blur",this.handleRepeatend),this.autoRepeat&&(this.isRepeating=!1)},this.location=""}set href(t){this._href=t??"";const e=this._href.toString();e&&e.indexOf("http")!=0?ct.onChange(this):ct.offChange(this),this.requestUpdate()}get href(){return this._href}handleNavigation(t){t.preventDefault(),ct.changeFromComponent(this)}handleChange(t){if(!(t?.type=="click"&&this.autoRepeat)&&(super.handleChange(),(this.pushState||this.goBack!==null)&&(t?.preventDefault(),t?.stopPropagation(),ct.changeFromComponent(this)),this.hasAttribute("reset"))){const e=this.getAttribute("reset"),s=e?ve.get(e):this.getFormPublisher();s&&s.set({})}}handleRepeatStart(t){this.autoRepeat&&(this.handleChange(t),this.pointerDownTime=Date.now(),this.isRepeating=!0,this.repeat()),window.addEventListener("pointerup",this.handleRepeatend),window.addEventListener("blur",this.handleRepeatend)}repeat(){if(this.isRepeating){if(this.hasAttribute("disabled")){this.isRepeating=!1;return}window.requestAnimationFrame(this.repeat.bind(this)),!(Date.now()-this.pointerDownTime<500)&&(Date.now()-this.lastRepeatTime<100||(this.handleChange(),this.lastRepeatTime=Date.now()))}}connectedCallback(){super.connectedCallback()}setCheckedValue(t){if(this.name){if(t?this.setAttribute("active","true"):this.removeAttribute("active"),t==this._checked)return;super.setCheckedValue(t)}}disconnectedCallback(){ct.offChange(this),super.disconnectedCallback()}willUpdate(t){(t.has("href")||t.has("autoActive"))&&ct.updateComponentActiveState(this),t.has("location")&&ct.updateComponentActiveState(this)}render(){const t={flexDirection:this.direction,alignItems:this.alignItems,justifyContent:this.justify,align:this.align,minWidth:this.minWidth},e=j`
|
|
113
113
|
<button
|
|
114
114
|
part="button"
|
|
115
115
|
class=${this.hasPrefix||this.hasSuffix?"has-prefix-or-suffix":""}
|
|
116
|
-
style=${
|
|
117
|
-
aria-controls=${
|
|
118
|
-
aria-expanded=${
|
|
119
|
-
aria-label=${
|
|
120
|
-
aria-labelledby=${
|
|
116
|
+
style=${kt(t)}
|
|
117
|
+
aria-controls=${se(this.ariaControls)}
|
|
118
|
+
aria-expanded=${se(this.sonicAriaExpanded)}
|
|
119
|
+
aria-label=${se(this.ariaLabel)}
|
|
120
|
+
aria-labelledby=${se(this.ariaLabelledby)}
|
|
121
121
|
?disabled=${this.disabled}
|
|
122
122
|
@click=${this.handleChange}
|
|
123
123
|
@pointerdown=${this.handleRepeatStart}
|
|
@@ -133,17 +133,17 @@
|
|
|
133
133
|
part="suffix"
|
|
134
134
|
name="suffix"
|
|
135
135
|
></slot>
|
|
136
|
-
${this.loading==!0?
|
|
136
|
+
${this.loading==!0?j`<sonic-icon name="loader" class="loader"></sonic-icon>`:""}
|
|
137
137
|
</button>
|
|
138
|
-
`;return this.href?
|
|
138
|
+
`;return this.href?j`<a
|
|
139
139
|
href="${this.href}"
|
|
140
|
-
download=${
|
|
141
|
-
target=${
|
|
142
|
-
aria-label=${
|
|
143
|
-
aria-labelledby=${
|
|
140
|
+
download=${se(this.download)}
|
|
141
|
+
target=${se(this.target)}
|
|
142
|
+
aria-label=${se(this.ariaLabel)}
|
|
143
|
+
aria-labelledby=${se(this.ariaLabelledby)}
|
|
144
144
|
@click=${this.pushState||this.goBack!==null?this.handleNavigation:null}
|
|
145
145
|
>${e}</a
|
|
146
|
-
>`:
|
|
146
|
+
>`:j`${e}`}onSlotChange(){this.hasPrefix=!!this.prefixes?.length,this.hasSuffix=!!this.suffixes?.length}};Me.styles=[ss,ee`
|
|
147
147
|
* {
|
|
148
148
|
box-sizing: border-box;
|
|
149
149
|
}
|
|
@@ -509,11 +509,11 @@
|
|
|
509
509
|
transform: translate(-50%, -50%) rotate(359deg);
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
|
-
`],
|
|
512
|
+
`],Be([h({type:String,reflect:!0})],Me.prototype,"type",2),Be([h({type:String,reflect:!0})],Me.prototype,"variant",2),Be([h({type:String,reflect:!0})],Me.prototype,"size",2),Be([h({type:String,reflect:!0})],Me.prototype,"shape",2),Be([h({type:String})],Me.prototype,"direction",2),Be([h({type:String,reflect:!0})],Me.prototype,"alignItems",2),Be([h({type:String})],Me.prototype,"justify",2),Be([h({type:String,reflect:!0})],Me.prototype,"align",2),Be([h({type:String})],Me.prototype,"minWidth",2),Be([h({type:Boolean,reflect:!0})],Me.prototype,"icon",2),Be([h({type:String})],Me.prototype,"download",2),Be([h({type:String})],Me.prototype,"autoActive",2),Be([h({type:Boolean,reflect:!0})],Me.prototype,"loading",2),Be([Ce()],Me.prototype,"hasPrefix",2),Be([Ce()],Me.prototype,"hasSuffix",2),Be([Nr({flatten:!0,slot:"prefix"})],Me.prototype,"prefixes",2),Be([Nr({flatten:!0,slot:"suffix"})],Me.prototype,"suffixes",2),Be([h({type:String})],Me.prototype,"target",2),Be([h({type:String})],Me.prototype,"href",1),Be([h({type:String})],Me.prototype,"goBack",2),Be([h({type:Boolean})],Me.prototype,"pushState",2),Be([h({type:Boolean,reflect:!0})],Me.prototype,"active",2),Be([h({type:Boolean,reflect:!0})],Me.prototype,"autoRepeat",2),Be([h({type:String,attribute:"data-aria-controls"})],Me.prototype,"ariaControls",2),Be([h({type:Boolean,attribute:"data-aria-expanded"})],Me.prototype,"sonicAriaExpanded",2),Be([Ce()],Me.prototype,"location",2),Me=Be([X(ih)],Me);/**
|
|
513
513
|
* @license
|
|
514
514
|
* Copyright 2017 Google LLC
|
|
515
515
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
516
|
-
*/const
|
|
516
|
+
*/const la=(t,e,s)=>{const i=new Map;for(let r=e;r<=s;r++)i.set(t[r],r);return i},Ii=$s(class extends fr{constructor(t){if(super(t),t.type!==Ks.CHILD)throw Error("repeat() can only be used in text expressions")}dt(t,e,s){let i;s===void 0?s=e:e!==void 0&&(i=e);const r=[],n=[];let o=0;for(const c of t)r[o]=i?i(c,o):o,n[o]=s(c,o),o++;return{values:n,keys:r}}render(t,e,s){return this.dt(t,e,s).values}update(t,[e,s,i]){const r=sc(t),{values:n,keys:o}=this.dt(e,s,i);if(!Array.isArray(r))return this.ut=o,n;const c=this.ut??=[],d=[];let b,k,g=0,f=r.length-1,A=0,E=n.length-1;for(;g<=f&&A<=E;)if(r[g]===null)g++;else if(r[f]===null)f--;else if(c[g]===o[A])d[A]=Ws(r[g],n[A]),g++,A++;else if(c[f]===o[E])d[E]=Ws(r[f],n[E]),f--,E--;else if(c[g]===o[E])d[E]=Ws(r[g],n[E]),jr(t,d[E+1],r[g]),g++,E--;else if(c[f]===o[A])d[A]=Ws(r[f],n[A]),jr(t,r[g],r[f]),f--,A++;else if(b===void 0&&(b=la(o,A,E),k=la(c,g,f)),b.has(c[g]))if(b.has(c[f])){const O=k.get(o[A]),I=O!==void 0?r[O]:null;if(I===null){const U=jr(t,r[g]);Ws(U,n[A]),d[A]=U}else d[A]=Ws(I,n[A]),jr(t,r[g],I),r[O]=null;A++}else wn(r[f]),f--;else wn(r[g]),g++;for(;A<=E;){const O=jr(t,d[E+1]);Ws(O,n[A]),d[A++]=O}for(;g<=f;){const O=r[g++];O!==null&&wn(O)}return this.ut=o,tc(t,d),It}}),nh=new WeakMap;let ca=0;const Nn=new Map,ha=new WeakSet,ua=()=>new Promise((t=>requestAnimationFrame(t))),da=(t,e)=>{const s=t-e;return s===0?void 0:s},pa=(t,e)=>{const s=t/e;return s===1?void 0:s},In={left:(t,e)=>{const s=da(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateX(${s}px)`}},top:(t,e)=>{const s=da(t,e);return{value:s,transform:s==null||isNaN(s)?void 0:`translateY(${s}px)`}},width:(t,e)=>{let s;e===0&&(e=1,s={width:"1px"});const i=pa(t,e);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleX(${i})`}},height:(t,e)=>{let s;e===0&&(e=1,s={height:"1px"});const i=pa(t,e);return{value:i,overrideFrom:s,transform:i==null||isNaN(i)?void 0:`scaleY(${i})`}}},oh={duration:333,easing:"ease-in-out"},ah=["left","top","width","height","opacity","color","background"],fa=new WeakMap;class lh extends _n{constructor(e){if(super(e),this.t=!1,this.i=null,this.o=null,this.h=!0,this.shouldLog=!1,e.type===Ks.CHILD)throw Error("The `animate` directive must be used in attribute position.");this.createFinished()}createFinished(){this.resolveFinished?.(),this.finished=new Promise((e=>{this.l=e}))}async resolveFinished(){this.l?.(),this.l=void 0}render(e){return te}getController(){return nh.get(this.u)}isDisabled(){return this.options.disabled||this.getController()?.disabled}update(e,[s]){const i=this.u===void 0;return i&&(this.u=e.options?.host,this.u.addController(this),this.u.updateComplete.then((r=>this.t=!0)),this.element=e.element,fa.set(this.element,this)),this.optionsOrCallback=s,(i||typeof s!="function")&&this.p(s),this.render(s)}p(e){e=e??{};const s=this.getController();s!==void 0&&((e={...s.defaultOptions,...e}).keyframeOptions={...s.defaultOptions.keyframeOptions,...e.keyframeOptions}),e.properties??=ah,this.options=e}m(){const e={},s=this.element.getBoundingClientRect(),i=getComputedStyle(this.element);return this.options.properties.forEach((r=>{const n=s[r]??(In[r]?void 0:i[r]),o=Number(n);e[r]=isNaN(o)?n+"":o})),e}v(){let e,s=!0;return this.options.guard&&(e=this.options.guard(),s=((i,r)=>{if(Array.isArray(i)){if(Array.isArray(r)&&r.length===i.length&&i.every(((n,o)=>n===r[o])))return!1}else if(r===i)return!1;return!0})(e,this._)),this.h=this.t&&!this.isDisabled()&&!this.isAnimating()&&s&&this.element.isConnected,this.h&&(this._=Array.isArray(e)?Array.from(e):e),this.h}hostUpdate(){typeof this.optionsOrCallback=="function"&&this.p(this.optionsOrCallback()),this.v()&&(this.A=this.m(),this.i=this.i??this.element.parentNode,this.o=this.element.nextSibling)}async hostUpdated(){if(!this.h||!this.element.isConnected||this.options.skipInitial&&!this.isHostRendered)return;let e;this.prepare(),await ua;const s=this.O(),i=this.j(this.options.keyframeOptions,s),r=this.m();if(this.A!==void 0){const{from:n,to:o}=this.N(this.A,r,s);this.log("measured",[this.A,r,n,o]),e=this.calculateKeyframes(n,o)}else{const n=Nn.get(this.options.inId);if(n){Nn.delete(this.options.inId);const{from:o,to:c}=this.N(n,r,s);e=this.calculateKeyframes(o,c),e=this.options.in?[{...this.options.in[0],...e[0]},...this.options.in.slice(1),e[1]]:e,ca++,e.forEach((d=>d.zIndex=ca))}else this.options.in&&(e=[...this.options.in,{}])}this.animate(e,i)}resetStyles(){this.P!==void 0&&(this.element.setAttribute("style",this.P??""),this.P=void 0)}commitStyles(){this.P=this.element.getAttribute("style"),this.webAnimation?.commitStyles(),this.webAnimation?.cancel()}reconnected(){}async disconnected(){if(!this.h||(this.options.id!==void 0&&Nn.set(this.options.id,this.A),this.options.out===void 0))return;if(this.prepare(),await ua(),this.i?.isConnected){const s=this.o&&this.o.parentNode===this.i?this.o:null;if(this.i.insertBefore(this.element,s),this.options.stabilizeOut){const i=this.m();this.log("stabilizing out");const r=this.A.left-i.left,n=this.A.top-i.top;getComputedStyle(this.element).position!=="static"||r===0&&n===0||(this.element.style.position="relative"),r!==0&&(this.element.style.left=r+"px"),n!==0&&(this.element.style.top=n+"px")}}const e=this.j(this.options.keyframeOptions);await this.animate(this.options.out,e),this.element.remove()}prepare(){this.createFinished()}start(){this.options.onStart?.(this)}didFinish(e){e&&this.options.onComplete?.(this),this.A=void 0,this.animatingProperties=void 0,this.frames=void 0,this.resolveFinished()}O(){const e=[];for(let s=this.element.parentNode;s;s=s?.parentNode){const i=fa.get(s);i&&!i.isDisabled()&&i&&e.push(i)}return e}get isHostRendered(){const e=ha.has(this.u);return e||this.u.updateComplete.then((()=>{ha.add(this.u)})),e}j(e,s=this.O()){const i={...oh};return s.forEach((r=>Object.assign(i,r.options.keyframeOptions))),Object.assign(i,e),i}N(e,s,i){e={...e},s={...s};const r=i.map((c=>c.animatingProperties)).filter((c=>c!==void 0));let n=1,o=1;return r.length>0&&(r.forEach((c=>{c.width&&(n/=c.width),c.height&&(o/=c.height)})),e.left!==void 0&&s.left!==void 0&&(e.left=n*e.left,s.left=n*s.left),e.top!==void 0&&s.top!==void 0&&(e.top=o*e.top,s.top=o*s.top)),{from:e,to:s}}calculateKeyframes(e,s,i=!1){const r={},n={};let o=!1;const c={};for(const d in s){const b=e[d],k=s[d];if(d in In){const g=In[d];if(b===void 0||k===void 0)continue;const f=g(b,k);f.transform!==void 0&&(c[d]=f.value,o=!0,r.transform=`${r.transform??""} ${f.transform}`,f.overrideFrom!==void 0&&Object.assign(r,f.overrideFrom))}else b!==k&&b!==void 0&&k!==void 0&&(o=!0,r[d]=b,n[d]=k)}return r.transformOrigin=n.transformOrigin=i?"center center":"top left",this.animatingProperties=c,o?[r,n]:void 0}async animate(e,s=this.options.keyframeOptions){this.start(),this.frames=e;let i=!1;if(!this.isAnimating()&&!this.isDisabled()&&(this.options.onFrames&&(this.frames=e=this.options.onFrames(this),this.log("modified frames",e)),e!==void 0)){this.log("animate",[e,s]),i=!0,this.webAnimation=this.element.animate(e,s);const r=this.getController();r?.add(this);try{await this.webAnimation.finished}catch{}r?.remove(this)}return this.didFinish(i),i}isAnimating(){return this.webAnimation?.playState==="running"||this.webAnimation?.pending}log(e,s){this.shouldLog&&!this.isDisabled()&&console.log(e,this.options.id,s)}}const ch=$s(lh),hh={core:{cancel:`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
517
517
|
<path d="M6.75827 17.2426L12.0009 12M17.2435 6.75736L12.0009 12M12.0009 12L6.75827 6.75736M12.0009 12L17.2435 17.2426" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
518
518
|
</svg>
|
|
519
519
|
`,"check-circled-outline":`<svg width="24" height="24" stroke-width="1.5" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
@@ -549,7 +549,7 @@
|
|
|
549
549
|
<path d="M12 17.01L12.01 16.9989" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
550
550
|
<path d="M12 22C17.5228 22 22 17.5228 22 12C22 6.47715 17.5228 2 12 2C6.47715 2 2 6.47715 2 12C2 17.5228 6.47715 22 12 22Z" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round"/>
|
|
551
551
|
</svg>
|
|
552
|
-
`}},Ni=new Map,ma={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};function gu(t){let e=t.customLibraryPath,s=t.customLibraryDefaultPrefix;if(e==null){const r=document.querySelector("[customIconLibraryPath]");e=r?.getAttribute("customIconLibraryPath")??"",s==null&&(s=r?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:s||""}}function bu(t,e){return t in ma?t!=="custom"?ma[t]:gu(e):null}const va=sessionStorage.getItem("sonicIconsCache"),bs=va?JSON.parse(va):{icons:{},names:[]},mu=100,Po=class Po{};Po.default={get:async e=>{const s=e.library;if(!e.name)return"";const r=e.name,i=fu;if(!s)return je(i.core[e.name]||"");const n=bu(s,e);if(n){if(s==="custom"&&!n.url)return"";const o=e.prefix||n.defaultPrefix||"",c=i[s]||{};i[s]=c;const h=s==="custom"?`${n.url}|${o}-${r}`:`${o}-${r}`;if(c[h])return je(c[h]);const b=(n.url||"").replace("$prefix",o).replace("$name",r);if(bs.icons[b]){const g=bs.icons[b];if(/^\s*<svg[\s>]/i.test(g||""))return c[h]=g,je(g);delete bs.icons[b]}if(!Ni.has(b)){const g=new Promise(async f=>{try{const A=await fetch(b);if(!A.ok){f("");return}try{const E=A.headers.get("content-type")||"";if(!E.includes("image/svg+xml")&&!E.includes("svg")){f("");return}const O=await A.text(),N=/^\s*<svg[\s>]/i.test(O);f(N?O:"")}catch{f("")}}catch{cc(),f("")}});Ni.set(b,g)}const k=await Ni.get(b);if(Ni.delete(b),c[h]=k||"",k&&/^\s*<svg[\s>]/i.test(k)&&(bs.icons[b]=k,bs.names.push(b)),bs.names.length>mu){const g=bs.names.shift();delete bs.icons[g]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(bs)),k?je(k):""}return je(i.core[e.name]||"")}};let zn=Po;function vu(t){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(t)}function yu(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function wu(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function Js(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onBeforeConnected__=vu,t.__onConnected__=yu,t.__onDisconnected__=wu;const e=t.connectedCallback;t.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(r=>r(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(r=>r(this))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(r=>r(this))}}function _u(t){return t.trim().replace(/^this\./,"")}function Un(t,e){if(!e)return;const s=e.split(".").filter(Boolean);if(s.length===0)return;let r=t;for(const i of s){if(r==null||typeof r!="object")return;r=r[i]}return r}function Pu(t,e){return!!(t==null||e?.skipEmptyPlaceholder&&t==="")}function Ot(t,e,s){let r=!1;const i=(c,h)=>{const b=_u(h),k=Un(t,b);return Pu(k,s)?(r=!0,""):`${k}`},n=e.replace(/\$\{([^}]+)\}/g,i).replace(/\{\$([^}]+)\}/g,i).trim();if(r||!n.length)return{ready:!1,path:null};const o=n.split(".").filter(Boolean);return o.length===0||!o[0]?{ready:!1,path:null}:{ready:!0,path:n}}function Ut(t){const e=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const r of e){let i;for(;(i=r.exec(t))!==null;){const n=(i[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function ya(t){return typeof t=="object"&&t!==null&&"path"in t&&typeof t.path=="string"}const Wr=new WeakMap,Kr=new Set;let yr=null;const xu=8;function Su(t){let e=Wr.get(t);return e||(e=new Map,Wr.set(t,e)),e}function Au(t,e){const s=new Set;for(const[r,i]of e){const n=Un(t,r);Object.is(i.lastValue,n)||(i.lastValue=n,i.onChangeHandlers.forEach(o=>s.add(o)))}return s}function Cu(){yr=null;let t=0,e=!0;for(;e&&t<xu;){e=!1,t+=1;for(const s of Kr){const r=Wr.get(s);if(!r||r.size===0)continue;const i=Au(s,r);i.size!==0&&(e=!0,i.forEach(n=>n()))}}e&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),Kr.size>0&&wa()}function wa(){yr===null&&(yr=requestAnimationFrame(Cu))}function ku(){Kr.size===0&&yr!==null&&(cancelAnimationFrame(yr),yr=null)}function Es(t,e,s,r,i){const n=String(r),o=Su(s);let c=o.get(n);return c||(c={lastValue:Un(s,n),onChangeHandlers:new Set},o.set(n,c)),c.onChangeHandlers.add(i),Kr.add(s),wa(),()=>{const h=Wr.get(s);if(!h)return;const b=h.get(n);b&&(b.onChangeHandlers.delete(i),b.onChangeHandlers.size===0&&h.delete(n),h.size===0&&(Wr.delete(s),Kr.delete(s),ku()))}}const Fi={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},_a={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Os={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},Pa={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function Gt(t){const e=t.split(".").filter(i=>i.length>0);if(e.length===0)return null;const s=e.shift()||"";if(!s)return null;let r=be.get(s);return r?(r=Br.traverse(r,e),r):null}function $u(t,e){const s=e?.reflect??!1,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ut(t),n=i.length>0;return function(o,c){if(!o)return;Js(o);const h=`__bind_state_${c}`,b=`__bind_${c}_publisher__`,k=s?`__bind_${c}_updating_from_publisher__`:null;if(s){const g=Object.getOwnPropertyDescriptor(o,c),f=`__bind_${c}_value__`,A=`__bind_${c}_updating_from_publisher__`,E=g&&!g.get&&!g.set?g.value:void 0;Object.defineProperty(o,c,{get(){return g?.get?g.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&E!==void 0&&(this[f]=E),this[f])},set(O){g?.set?g.set.call(this,O):this[f]=O,!this[A]&&this[b]&&this[b].set(O)},enumerable:g?.enumerable??!0,configurable:g?.configurable??!0})}o.__onConnected__(g=>{const f=g[h]||(g[h]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(O=>O()),f.cleanupWatchers=[],f.currentPath=null;const A=O=>{if(!O){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,g[b]=null;return}if(O===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const N=Gt(O);if(!N){f.currentPath=null,g[b]=null;return}const U=P=>{s&&k&&(g[k]=!0),g[c]=P,s&&k&&(g[k]=!1)};N.onAssign(U),f.unsubscribePublisher=()=>{N.offAssign(U),g[b]===N&&(g[b]=null)},f.currentPath=O,g[b]=N},E=()=>{if(n){const O=Ot(g,t,r);if(!O.ready){A(null);return}A(O.path);return}A(t)};if(n)for(const O of i){const N=Es(Fi.watcherStore,Fi.hooked,g,O,()=>E());f.cleanupWatchers.push(N)}E()}),o.__onDisconnected__(g=>{const f=g[h];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(A=>A()),f.cleanupWatchers=[],f.currentPath=null,g[b]=null)})}}function xa(t,e){const s=ya(t)?t.path:t;return $u(s,e)}function Sa(t,e){const s=t.path,r={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},i=Ut(s);return function(n,o){Js(n);const c=`__publish_${o}_publisher__`,h=`__publish_${o}_value__`,b=Object.getOwnPropertyDescriptor(n,o),k=b&&!b.get&&!b.set?b.value:void 0;Object.defineProperty(n,o,{get(){return b?.get?b.get.call(this):(!Object.prototype.hasOwnProperty.call(this,h)&&k!==void 0&&(this[h]=k),this[h])},set(g){b?.set?b.set.call(this,g):this[h]=g;const f=this[c];f&&f.set(g)},enumerable:b?.enumerable??!0,configurable:b?.configurable??!0}),n.__onConnected__(g=>{const f=g,A=`__publish_state_${o}`,E=f[A]||(f[A]={cleanupWatchers:[]}),O=()=>{let N;if(i.length){const P=Ot(g,s,r);N=P.ready?P.path:null}else N=s;const U=N?Gt(N):void 0;if(f[c]=U??null,U&&o in g){const P=f[o];P!==void 0&&U.set(P)}};if(E.cleanupWatchers.forEach(N=>N()),E.cleanupWatchers=[],i.length)for(const N of i)E.cleanupWatchers.push(Es(_a.watcherStore,_a.hooked,f,N,O));O()}),n.__onDisconnected__(g=>{const f=g,A=`__publish_state_${o}`,E=f[A];E?.cleanupWatchers&&E.cleanupWatchers.forEach(O=>O()),f[c]=void 0})}}function Aa(t){return xa(t)}const Du={nullish:t=>t==null,emptyString:t=>t==="",emptyObject:t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===0,emptyArray:t=>Array.isArray(t)&&t.length===0};function Eu(t,e){return e.some(s=>Du[s](t))}function Ou(t,e,s){if(!s.dispatchWhenUndefined&&t.slice(0,e).filter(i=>i!=null).length!==e)return!1;if(s.skip&&s.skip.length>0){for(let r=0;r<e;r++)if(Eu(t[r],s.skip))return!1}return!0}function Tu(...t){return Ca({},t)}function Ca(t,e){const s=e.map(i=>{const n=Ut(i);return{originalPath:i,dynamicDependencies:n,isDynamic:n.length>0}}),r={skipEmptyPlaceholder:t.skipEmptyPlaceholder};return function(i,n,o){Js(i);const c=`__onAssign_state_${n}__`;let h;i.__onConnected__(b=>{const k=b[c]||(b[c]={cleanupWatchers:[],configurations:[]});k.cleanupWatchers.forEach(O=>O()),k.cleanupWatchers=[],k.configurations.forEach(O=>{O.unsubscribePublisher&&O.unsubscribePublisher()}),k.configurations=[];const g=[],f=[];for(let O=0;O<e.length;O++){const N=s[O],U=new Set,P=y=>{g[O]=y,Ou(g,e.length,t)&&U.forEach(I=>I(...g))};f.push({publisher:null,onAssign:P,callbacks:U,unsubscribePublisher:null,pathConfig:N,index:O})}const A=(O,N)=>{if(O.unsubscribePublisher&&(O.unsubscribePublisher(),O.unsubscribePublisher=null),g[O.index]=null,O.publisher=null,!N)return;const U=Gt(N);U&&(U.onAssign(O.onAssign),O.unsubscribePublisher=()=>{U.offAssign(O.onAssign),O.publisher===U&&(O.publisher=null)},O.publisher=U)},E=()=>{for(const O of f)if(O.pathConfig.isDynamic){const N=Ot(b,O.pathConfig.originalPath,r);if(!N.ready){A(O,null);continue}A(O,N.path)}else A(O,O.pathConfig.originalPath)};for(const O of f)if(O.pathConfig.isDynamic)for(const N of O.pathConfig.dynamicDependencies){const U=Es(Pa.watcherStore,Pa.hooked,b,N,()=>E());k.cleanupWatchers.push(U)}h=o.value.bind(b);for(const O of f)O.callbacks.add(h);E(),k.configurations=f}),i.__onDisconnected__(b=>{const k=b[c];k&&(k.cleanupWatchers.forEach(g=>g()),k.cleanupWatchers=[],k.configurations.forEach(g=>{g.unsubscribePublisher&&g.unsubscribePublisher(),g.callbacks.delete(h)}),k.configurations=[])})}}function Lu(t){return Object.prototype.toString.call(t)==="[object DataProviderKey]"}function Mu(...t){const e=t[t.length-1],s=e!==void 0&&!Lu(e),r=s?e:{},n=(s?t.slice(0,-1):t).map(o=>o.path);return Ca({dispatchWhenUndefined:!r.waitForAllDefined,skip:r.skip,skipEmptyPlaceholder:r.skipEmptyPlaceholder},n)}function Iu(){return function(t,e,s){let r=0;const i=s.value,n=t.constructor.prototype.disconnectedCallback;t.constructor.prototype.disconnectedCallback=function(){n?.apply(this),this.__removeAutoSubscribe__()};const o=t.connectedCallback;t.connectedCallback=function(){o?.call(this),this[e]()},s.value=function(...c){let h=new Set;const b=()=>{r++;const g=r;window.queueMicrotask(()=>{g===r&&this[e]()})};h.forEach(g=>{g.offAssign(b)}),$o();const k=i.apply(this,c);return h=Do()||new Set,h.forEach(g=>{g.onAssign(b,!1)}),this.__removeAutoSubscribe__=()=>{h.forEach(g=>{g.offAssign(b)})},k}}}function Nu(t){return function(e){Js(e);for(const s of t){const r=s.split(".");if(r.length===0)continue;const i=r.shift()||"";let n=be.get(i);n=Br.traverse(n,r),e.__onConnected__(o=>{n.startTemplateFilling(o)}),e.__onDisconnected__(()=>{})}}}function Fu(t){const e=[];let s=t;for(;s;)s instanceof Element&&e.push(s),s=s.parentNode||(s.host??null);return e}function ju(t,e){const s=[];let r=!1;const i=Je.scopeAttributeNames(t.attributeName),n=()=>{for(const o of s)o.disconnect();if(s.length=0,!r)for(const o of Fu(t.component)){const c=new MutationObserver(h=>{r||(h.some(b=>b.type==="childList")&&n(),e())});c.observe(o,{attributes:!0,attributeFilter:i,childList:!0,subtree:!1}),s.push(c)}};return n(),()=>{r=!0;for(const o of s)o.disconnect();s.length=0}}function ka(t,e,s,r){const i=t,n=Je.getAncestorAttributeValue(t,e);!r.assignNull&&n===null||Object.is(i[s],n)||(i[s]=n)}const Be=class Be{static subscribe(e,s,r,i={assignNull:!0}){const n={component:e,attributeName:s,propertyKey:r,syncOptions:i,disconnectObservers:null};return n.disconnectObservers=ju(n,()=>{Be.subscriptions.has(n)&&(Be.pendingRefresh.add(n),Be.scheduleRefresh())}),Be.subscriptions.add(n),()=>{Be.unsubscribe(n)}}static unsubscribe(e){Be.subscriptions.has(e)&&(e.disconnectObservers?.(),e.disconnectObservers=null,Be.subscriptions.delete(e),Be.pendingRefresh.delete(e),Be.subscriptions.size===0&&Be.cancelScheduledRefresh())}static scheduleRefresh(){Be.pendingRefresh.size!==0&&Be.animationFrameId===null&&(Be.animationFrameId=requestAnimationFrame(()=>{Be.flushRefresh()}))}static cancelScheduledRefresh(){Be.animationFrameId!==null&&(cancelAnimationFrame(Be.animationFrameId),Be.animationFrameId=null),Be.pendingRefresh.clear()}static flushRefresh(){Be.animationFrameId=null;const e=Array.from(Be.pendingRefresh);Be.pendingRefresh.clear();for(const s of e)Be.subscriptions.has(s)&&s.component.isConnected&&ka(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};Be.subscriptions=new Set,Be.pendingRefresh=new Set,Be.animationFrameId=null;let qn=Be;function Vn(t,e){const s=e?.dynamic??!1,r=s;return function(i,n){if(!i||(Js(i),i.__onBeforeConnected__(c=>{ka(c,t,n,{assignNull:r})}),!s))return;let o=null;i.__onConnected__(c=>{o=qn.subscribe(c,t,n,{assignNull:!0})}),i.__onDisconnected__(()=>{o?.(),o=null})}}var Ru=Object.defineProperty,zu=Object.getOwnPropertyDescriptor,Xs=(t,e,s,r)=>{for(var i=r>1?void 0:r?zu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&Ru(e,s,i),i};const Bn=t=>u(t),Uu="sonic-icon";let ms=class extends J{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await zn.default.get({name:this.name,prefix:this.prefix,library:this.library,customLibraryPath:this.customIconLibraryPath,customLibraryDefaultPrefix:this.customIconDefaultPrefix})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library")||this.library==="custom"&&(t.has("customIconLibraryPath")||t.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:re}};ms.styles=ee`
|
|
552
|
+
`}},Fi=new Map,ga={heroicons:{url:"https://cdn.jsdelivr.net/npm/heroicons@2.0.4/24/$prefix/$name.svg",defaultPrefix:"outline"},iconoir:{url:"https://cdnjs.cloudflare.com/ajax/libs/iconoir/5.1.4/icons/$name.svg"},feathers:{url:"https://cdn.jsdelivr.net/npm/feather-icons@4.29.0/dist/icons/$name.svg"},lucide:{url:"https://cdn.jsdelivr.net/npm/lucide-static@0.16.29/icons/$name.svg"},material:{url:"https://cdn.jsdelivr.net/npm/@material-icons/svg@1.0.5/svg/$name/$prefix.svg",defaultPrefix:"regular"},fontAwesome:{url:"https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@5.15.1/svgs/$prefix/$name.svg",defaultPrefix:"regular"},custom:{url:"",defaultPrefix:""}};function uh(t){let e=t.customLibraryPath,s=t.customLibraryDefaultPrefix;if(e==null){const i=document.querySelector("[customIconLibraryPath]");e=i?.getAttribute("customIconLibraryPath")??"",s==null&&(s=i?.getAttribute("customIconDefaultPrefix")??document.querySelector("[customIconDefaultPrefix]")?.getAttribute("customIconDefaultPrefix")??"")}return{url:e||"",defaultPrefix:s||""}}function dh(t,e){return t in ga?t!=="custom"?ga[t]:uh(e):null}const ma=sessionStorage.getItem("sonicIconsCache"),ms=ma?JSON.parse(ma):{icons:{},names:[]},ph=100,_o=class _o{};_o.default={get:async e=>{const s=e.library;if(!e.name)return"";const i=e.name,r=hh;if(!s)return Re(r.core[e.name]||"");const n=dh(s,e);if(n){if(s==="custom"&&!n.url)return"";const o=e.prefix||n.defaultPrefix||"",c=r[s]||{};r[s]=c;const d=s==="custom"?`${n.url}|${o}-${i}`:`${o}-${i}`;if(c[d])return Re(c[d]);const b=(n.url||"").replace("$prefix",o).replace("$name",i);if(ms.icons[b]){const g=ms.icons[b];if(/^\s*<svg[\s>]/i.test(g||""))return c[d]=g,Re(g);delete ms.icons[b]}if(!Fi.has(b)){const g=new Promise(async f=>{try{const A=await fetch(b);if(!A.ok){f("");return}try{const E=A.headers.get("content-type")||"";if(!E.includes("image/svg+xml")&&!E.includes("svg")){f("");return}const O=await A.text(),I=/^\s*<svg[\s>]/i.test(O);f(I?O:"")}catch{f("")}}catch{ac(),f("")}});Fi.set(b,g)}const k=await Fi.get(b);if(Fi.delete(b),c[d]=k||"",k&&/^\s*<svg[\s>]/i.test(k)&&(ms.icons[b]=k,ms.names.push(b)),ms.names.length>ph){const g=ms.names.shift();delete ms.icons[g]}return sessionStorage.setItem("sonicIconsCache",JSON.stringify(ms)),k?Re(k):""}return Re(r.core[e.name]||"")}};let Fn=_o;function fh(t){this.__beforeConnectedCallbackCalls__||(this.__beforeConnectedCallbackCalls__=new Set),this.__beforeConnectedCallbackCalls__.add(t)}function gh(t){this.__connectedCallbackCalls__||(this.__connectedCallbackCalls__=new Set),this.__connectedCallbackCalls__.add(t)}function mh(t){this.__disconnectedCallbackCalls__||(this.__disconnectedCallbackCalls__=new Set),this.__disconnectedCallbackCalls__.add(t)}function Zs(t){if(t.__is__setSubscribable__)return;t.__is__setSubscribable__=!0,t.__onBeforeConnected__=fh,t.__onConnected__=gh,t.__onDisconnected__=mh;const e=t.connectedCallback;t.connectedCallback=function(){this.__beforeConnectedCallbackCalls__&&this.__beforeConnectedCallbackCalls__.forEach(i=>i(this)),e?.call(this),this.__connectedCallbackCalls__&&this.__connectedCallbackCalls__.forEach(i=>i(this))};const s=t.disconnectedCallback;t.disconnectedCallback=function(){s?.call(this),this.__disconnectedCallbackCalls__&&this.__disconnectedCallbackCalls__.forEach(i=>i(this))}}function bh(t){return t.trim().replace(/^this\./,"")}function Rn(t,e){if(!e)return;const s=e.split(".").filter(Boolean);if(s.length===0)return;let i=t;for(const r of s){if(i==null||typeof i!="object")return;i=i[r]}return i}function vh(t,e){return!!(t==null||e?.skipEmptyPlaceholder&&t==="")}function Ot(t,e,s){let i=!1;const r=(c,d)=>{const b=bh(d),k=Rn(t,b);return vh(k,s)?(i=!0,""):`${k}`},n=e.replace(/\$\{([^}]+)\}/g,r).replace(/\{\$([^}]+)\}/g,r).trim();if(i||!n.length)return{ready:!1,path:null};const o=n.split(".").filter(Boolean);return o.length===0||!o[0]?{ready:!1,path:null}:{ready:!0,path:n}}function qt(t){const e=[/\$\{([^}]+)\}/g,/\{\$([^}]+)\}/g],s=new Set;for(const i of e){let r;for(;(r=i.exec(t))!==null;){const n=(r[1]||"").trim().replace(/^this\./,"");if(!n)continue;const[o]=n.split(".");o&&s.add(o)}}return Array.from(s)}function ba(t){return typeof t=="object"&&t!==null&&"path"in t&&typeof t.path=="string"}const Wr=new WeakMap,Kr=new Set;let yr=null;const yh=8;function wh(t){let e=Wr.get(t);return e||(e=new Map,Wr.set(t,e)),e}function _h(t,e){const s=new Set;for(const[i,r]of e){const n=Rn(t,i);Object.is(r.lastValue,n)||(r.lastValue=n,r.onChangeHandlers.forEach(o=>s.add(o)))}return s}function Sh(){yr=null;let t=0,e=!0;for(;e&&t<yh;){e=!1,t+=1;for(const s of Kr){const i=Wr.get(s);if(!i||i.size===0)continue;const r=_h(s,i);r.size!==0&&(e=!0,r.forEach(n=>n()))}}e&&console.warn("[concorde] dynamic property watch: limite de passes atteinte, boucle infinie probable"),Kr.size>0&&va()}function va(){yr===null&&(yr=requestAnimationFrame(Sh))}function Ph(){Kr.size===0&&yr!==null&&(cancelAnimationFrame(yr),yr=null)}function Es(t,e,s,i,r){const n=String(i),o=wh(s);let c=o.get(n);return c||(c={lastValue:Rn(s,n),onChangeHandlers:new Set},o.set(n,c)),c.onChangeHandlers.add(r),Kr.add(s),va(),()=>{const d=Wr.get(s);if(!d)return;const b=d.get(n);b&&(b.onChangeHandlers.delete(r),b.onChangeHandlers.size===0&&d.delete(n),d.size===0&&(Wr.delete(s),Kr.delete(s),Ph()))}}const Ri={watcherStore:Symbol("__bindDynamicWatcherStore__"),hooked:Symbol("__bindDynamicWillUpdateHooked__")},ya={watcherStore:"__publishDynamicWatcherStore__",hooked:"__publishDynamicWillUpdateHooked__"},Os={watcherStore:"__getDynamicWatcherStore__",hooked:"__getDynamicWillUpdateHooked__"},wa={watcherStore:Symbol("__onAssignDynamicWatcherStore__"),hooked:Symbol("__onAssignDynamicWillUpdateHooked__")};function Jt(t){const e=t.split(".").filter(r=>r.length>0);if(e.length===0)return null;const s=e.shift()||"";if(!s)return null;let i=ve.get(s);return i?(i=Hr.traverse(i,e),i):null}function xh(t,e){const s=e?.reflect??!1,i={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},r=qt(t),n=r.length>0;return function(o,c){if(!o)return;Zs(o);const d=`__bind_state_${c}`,b=`__bind_${c}_publisher__`,k=s?`__bind_${c}_updating_from_publisher__`:null;if(s){const g=Object.getOwnPropertyDescriptor(o,c),f=`__bind_${c}_value__`,A=`__bind_${c}_updating_from_publisher__`,E=g&&!g.get&&!g.set?g.value:void 0;Object.defineProperty(o,c,{get(){return g?.get?g.get.call(this):(!Object.prototype.hasOwnProperty.call(this,f)&&E!==void 0&&(this[f]=E),this[f])},set(O){g?.set?g.set.call(this,O):this[f]=O,!this[A]&&this[b]&&this[b].set(O)},enumerable:g?.enumerable??!0,configurable:g?.configurable??!0})}o.__onConnected__(g=>{const f=g[d]||(g[d]={cleanupWatchers:[],unsubscribePublisher:null,currentPath:null});f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(O=>O()),f.cleanupWatchers=[],f.currentPath=null;const A=O=>{if(!O){f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.currentPath=null,g[b]=null;return}if(O===f.currentPath)return;f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null);const I=Jt(O);if(!I){f.currentPath=null,g[b]=null;return}const U=S=>{s&&k&&(g[k]=!0),g[c]=S,s&&k&&(g[k]=!1)};I.onAssign(U),f.unsubscribePublisher=()=>{I.offAssign(U),g[b]===I&&(g[b]=null)},f.currentPath=O,g[b]=I},E=()=>{if(n){const O=Ot(g,t,i);if(!O.ready){A(null);return}A(O.path);return}A(t)};if(n)for(const O of r){const I=Es(Ri.watcherStore,Ri.hooked,g,O,()=>E());f.cleanupWatchers.push(I)}E()}),o.__onDisconnected__(g=>{const f=g[d];f&&(f.unsubscribePublisher&&(f.unsubscribePublisher(),f.unsubscribePublisher=null),f.cleanupWatchers.forEach(A=>A()),f.cleanupWatchers=[],f.currentPath=null,g[b]=null)})}}function _a(t,e){const s=ba(t)?t.path:t;return xh(s,e)}function Sa(t,e){const s=t.path,i={skipEmptyPlaceholder:e?.skipEmptyPlaceholder},r=qt(s);return function(n,o){Zs(n);const c=`__publish_${o}_publisher__`,d=`__publish_${o}_value__`,b=Object.getOwnPropertyDescriptor(n,o),k=b&&!b.get&&!b.set?b.value:void 0;Object.defineProperty(n,o,{get(){return b?.get?b.get.call(this):(!Object.prototype.hasOwnProperty.call(this,d)&&k!==void 0&&(this[d]=k),this[d])},set(g){b?.set?b.set.call(this,g):this[d]=g;const f=this[c];f&&f.set(g)},enumerable:b?.enumerable??!0,configurable:b?.configurable??!0}),n.__onConnected__(g=>{const f=g,A=`__publish_state_${o}`,E=f[A]||(f[A]={cleanupWatchers:[]}),O=()=>{let I;if(r.length){const S=Ot(g,s,i);I=S.ready?S.path:null}else I=s;const U=I?Jt(I):void 0;if(f[c]=U??null,U&&o in g){const S=f[o];S!==void 0&&U.set(S)}};if(E.cleanupWatchers.forEach(I=>I()),E.cleanupWatchers=[],r.length)for(const I of r)E.cleanupWatchers.push(Es(ya.watcherStore,ya.hooked,f,I,O));O()}),n.__onDisconnected__(g=>{const f=g,A=`__publish_state_${o}`,E=f[A];E?.cleanupWatchers&&E.cleanupWatchers.forEach(O=>O()),f[c]=void 0})}}function Pa(t){return _a(t)}const Ah={nullish:t=>t==null,emptyString:t=>t==="",emptyObject:t=>typeof t=="object"&&t!==null&&!Array.isArray(t)&&Object.keys(t).length===0,emptyArray:t=>Array.isArray(t)&&t.length===0};function Ch(t,e){return e.some(s=>Ah[s](t))}function kh(t,e,s){if(!s.dispatchWhenUndefined&&t.slice(0,e).filter(r=>r!=null).length!==e)return!1;if(s.skip&&s.skip.length>0){for(let i=0;i<e;i++)if(Ch(t[i],s.skip))return!1}return!0}function $h(...t){return xa({},t)}function xa(t,e){const s=e.map(r=>{const n=qt(r);return{originalPath:r,dynamicDependencies:n,isDynamic:n.length>0}}),i={skipEmptyPlaceholder:t.skipEmptyPlaceholder};return function(r,n,o){Zs(r);const c=`__onAssign_state_${n}__`;let d;r.__onConnected__(b=>{const k=b[c]||(b[c]={cleanupWatchers:[],configurations:[]});k.cleanupWatchers.forEach(O=>O()),k.cleanupWatchers=[],k.configurations.forEach(O=>{O.unsubscribePublisher&&O.unsubscribePublisher()}),k.configurations=[];const g=[],f=[];for(let O=0;O<e.length;O++){const I=s[O],U=new Set,S=y=>{g[O]=y,kh(g,e.length,t)&&U.forEach(N=>N(...g))};f.push({publisher:null,onAssign:S,callbacks:U,unsubscribePublisher:null,pathConfig:I,index:O})}const A=(O,I)=>{if(O.unsubscribePublisher&&(O.unsubscribePublisher(),O.unsubscribePublisher=null),g[O.index]=null,O.publisher=null,!I)return;const U=Jt(I);U&&(U.onAssign(O.onAssign),O.unsubscribePublisher=()=>{U.offAssign(O.onAssign),O.publisher===U&&(O.publisher=null)},O.publisher=U)},E=()=>{for(const O of f)if(O.pathConfig.isDynamic){const I=Ot(b,O.pathConfig.originalPath,i);if(!I.ready){A(O,null);continue}A(O,I.path)}else A(O,O.pathConfig.originalPath)};for(const O of f)if(O.pathConfig.isDynamic)for(const I of O.pathConfig.dynamicDependencies){const U=Es(wa.watcherStore,wa.hooked,b,I,()=>E());k.cleanupWatchers.push(U)}d=o.value.bind(b);for(const O of f)O.callbacks.add(d);E(),k.configurations=f}),r.__onDisconnected__(b=>{const k=b[c];k&&(k.cleanupWatchers.forEach(g=>g()),k.cleanupWatchers=[],k.configurations.forEach(g=>{g.unsubscribePublisher&&g.unsubscribePublisher(),g.callbacks.delete(d)}),k.configurations=[])})}}function Dh(t){return Object.prototype.toString.call(t)==="[object DataProviderKey]"}function Eh(...t){const e=t[t.length-1],s=e!==void 0&&!Dh(e),i=s?e:{},n=(s?t.slice(0,-1):t).map(o=>o.path);return xa({dispatchWhenUndefined:!i.waitForAllDefined,skip:i.skip,skipEmptyPlaceholder:i.skipEmptyPlaceholder},n)}function Oh(){return function(t,e,s){let i=0;const r=s.value,n=t.constructor.prototype.disconnectedCallback;t.constructor.prototype.disconnectedCallback=function(){n?.apply(this),this.__removeAutoSubscribe__()};const o=t.connectedCallback;t.connectedCallback=function(){o?.call(this),this[e]()},s.value=function(...c){let d=new Set;const b=()=>{i++;const g=i;window.queueMicrotask(()=>{g===i&&this[e]()})};d.forEach(g=>{g.offAssign(b)}),ko();const k=r.apply(this,c);return d=$o()||new Set,d.forEach(g=>{g.onAssign(b,!1)}),this.__removeAutoSubscribe__=()=>{d.forEach(g=>{g.offAssign(b)})},k}}}function Th(t){return function(e){Zs(e);for(const s of t){const i=s.split(".");if(i.length===0)continue;const r=i.shift()||"";let n=ve.get(r);n=Hr.traverse(n,i),e.__onConnected__(o=>{n.startTemplateFilling(o)}),e.__onDisconnected__(()=>{})}}}function Lh(t){const e=[];let s=t;for(;s;)s instanceof Element&&e.push(s),s=s.parentNode||(s.host??null);return e}function Mh(t,e){const s=[];let i=!1;const r=qe.scopeAttributeNames(t.attributeName),n=()=>{for(const o of s)o.disconnect();if(s.length=0,!i)for(const o of Lh(t.component)){const c=new MutationObserver(d=>{i||(d.some(b=>b.type==="childList")&&n(),e())});c.observe(o,{attributes:!0,attributeFilter:r,childList:!0,subtree:!1}),s.push(c)}};return n(),()=>{i=!0;for(const o of s)o.disconnect();s.length=0}}function Aa(t,e,s,i){const r=t,n=qe.getAncestorAttributeValue(t,e);!i.assignNull&&n===null||Object.is(r[s],n)||(r[s]=n)}const Ve=class Ve{static subscribe(e,s,i,r={assignNull:!0}){const n={component:e,attributeName:s,propertyKey:i,syncOptions:r,disconnectObservers:null};return n.disconnectObservers=Mh(n,()=>{Ve.subscriptions.has(n)&&(Ve.pendingRefresh.add(n),Ve.scheduleRefresh())}),Ve.subscriptions.add(n),()=>{Ve.unsubscribe(n)}}static unsubscribe(e){Ve.subscriptions.has(e)&&(e.disconnectObservers?.(),e.disconnectObservers=null,Ve.subscriptions.delete(e),Ve.pendingRefresh.delete(e),Ve.subscriptions.size===0&&Ve.cancelScheduledRefresh())}static scheduleRefresh(){Ve.pendingRefresh.size!==0&&Ve.animationFrameId===null&&(Ve.animationFrameId=requestAnimationFrame(()=>{Ve.flushRefresh()}))}static cancelScheduledRefresh(){Ve.animationFrameId!==null&&(cancelAnimationFrame(Ve.animationFrameId),Ve.animationFrameId=null),Ve.pendingRefresh.clear()}static flushRefresh(){Ve.animationFrameId=null;const e=Array.from(Ve.pendingRefresh);Ve.pendingRefresh.clear();for(const s of e)Ve.subscriptions.has(s)&&s.component.isConnected&&Aa(s.component,s.attributeName,s.propertyKey,s.syncOptions)}};Ve.subscriptions=new Set,Ve.pendingRefresh=new Set,Ve.animationFrameId=null;let jn=Ve;function zn(t,e){const s=e?.dynamic??!1,i=s;return function(r,n){if(!r||(Zs(r),r.__onBeforeConnected__(c=>{Aa(c,t,n,{assignNull:i})}),!s))return;let o=null;r.__onConnected__(c=>{o=jn.subscribe(c,t,n,{assignNull:!0})}),r.__onDisconnected__(()=>{o?.(),o=null})}}var Nh=Object.defineProperty,Ih=Object.getOwnPropertyDescriptor,Js=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ih(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Nh(e,s,r),r};const Un=t=>h(t),Fh="sonic-icon";let bs=class extends J{constructor(){super(...arguments),this.iconText="",this.name="",this.prefix="",this.library="",this.customIconLibraryPath=null,this.customIconDefaultPrefix=null}async updateIcon(){this.iconText=await Fn.default.get({name:this.name,prefix:this.prefix,library:this.library,customLibraryPath:this.customIconLibraryPath,customLibraryDefaultPrefix:this.customIconDefaultPrefix})}connectedCallback(){this.setAttribute("aria-hidden","true"),super.connectedCallback()}willUpdate(t){(t.has("name")||t.has("prefix")||t.has("library")||this.library==="custom"&&(t.has("customIconLibraryPath")||t.has("customIconDefaultPrefix")))&&this.updateIcon(),super.willUpdate(t)}render(){return this.iconText?this.iconText:te}};bs.styles=ee`
|
|
553
553
|
:host {
|
|
554
554
|
line-height: 0.1em;
|
|
555
555
|
width: fit-content;
|
|
@@ -599,7 +599,7 @@
|
|
|
599
599
|
:host([size="3xl"]) svg {
|
|
600
600
|
--_sc-icon-size: 2.8em;
|
|
601
601
|
}
|
|
602
|
-
`,
|
|
602
|
+
`,Js([Ce()],bs.prototype,"iconText",2),Js([Un({type:String})],bs.prototype,"name",2),Js([Un({type:String})],bs.prototype,"prefix",2),Js([Un({type:String})],bs.prototype,"library",2),Js([zn("customIconLibraryPath",{dynamic:!0}),Ce()],bs.prototype,"customIconLibraryPath",2),Js([zn("customIconDefaultPrefix",{dynamic:!0}),Ce()],bs.prototype,"customIconDefaultPrefix",2),bs=Js([X(Fh)],bs);function qn(t){return t?t instanceof Object?t:Re(t):te}const Ca=new WeakMap;function Rh(t){const e=Ca.get(t);if(e)return e;const s=new CSSStyleSheet;return s.replaceSync(t.cssText),Ca.set(t,s),s}function jh(t){return t instanceof pn}function Bn(t){return t?(Array.isArray(t)?t:[t]).flatMap(s=>Array.isArray(s)?Bn(s):s instanceof CSSStyleSheet?[s]:jh(s)?[Rh(s)]:[]):[]}aa();const Yr=ee`
|
|
603
603
|
.custom-scroll {
|
|
604
604
|
overflow: auto !important;
|
|
605
605
|
overflow-y: overlay !important;
|
|
@@ -621,12 +621,12 @@
|
|
|
621
621
|
border: solid 0.15rem transparent;
|
|
622
622
|
}
|
|
623
623
|
}
|
|
624
|
-
`;var
|
|
624
|
+
`;var zh=Object.defineProperty,Uh=Object.getOwnPropertyDescriptor,Ft=(t,e,s,i)=>{for(var r=i>1?void 0:i?Uh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&zh(e,s,r),r};const qh={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty"},Bh="sonic-toast-item";let $t=class extends J{constructor(){super(...arguments),this.label="",this.id="",this.text="",this.status="",this.ghost=!1,this.preserve=!1,this.dismissForever=!1,this.maxHeight="10rem",this.useSlot=!1,this.visible=!0,this._titleId="",this._adoptedStyleSheets=[]}getAriaRole(){return this.status==="error"?"alert":"status"}getAriaLive(){return this.status==="error"?null:"polite"}getTitleId(){return this._titleId?this._titleId:(this._titleId=this.id?`toast-title-${this.id}`:`toast-title-${Date.now()}-${Math.random().toString(36).slice(2,11)}`,this._titleId)}getCloseButtonLabel(){const t={error:"Fermer le message d'erreur",warning:"Fermer l'avertissement",success:"Fermer le message de succès",info:"Fermer l'information"};return this.status&&t[this.status]||"Fermer la notification"}render(){if(this.dismissForever){const i=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(i)[this.id])return te}if(!this.visible)return te;const t=this.label?this.getTitleId():void 0,e=!this.label&&typeof this.text=="string"?this.text.length>100?this.text.substring(0,100).replace(/\s+\S*$/,"")+"...":this.text:void 0,s=this.getAriaLive();return j`<div
|
|
625
625
|
class="sonic-toast ${this.status} ${this.ghost?"ghost":""}"
|
|
626
626
|
role=${this.getAriaRole()}
|
|
627
|
-
aria-live=${s||
|
|
627
|
+
aria-live=${s||te}
|
|
628
628
|
aria-atomic="true"
|
|
629
|
-
aria-label=${e||
|
|
629
|
+
aria-label=${e||te}
|
|
630
630
|
>
|
|
631
631
|
<button
|
|
632
632
|
aria-label=${this.getCloseButtonLabel()}
|
|
@@ -639,24 +639,24 @@
|
|
|
639
639
|
class="sonic-toast-content custom-scroll"
|
|
640
640
|
style="max-height: ${this.maxHeight} ;"
|
|
641
641
|
>
|
|
642
|
-
${this.status&&
|
|
643
|
-
name=${
|
|
642
|
+
${this.status&&j`<sonic-icon
|
|
643
|
+
name=${qh[this.status]}
|
|
644
644
|
class="sonic-toast-icon"
|
|
645
645
|
size="2xl"
|
|
646
646
|
aria-hidden="true"
|
|
647
647
|
></sonic-icon>`}
|
|
648
648
|
|
|
649
649
|
<div class="sonic-toast-text">
|
|
650
|
-
${this.
|
|
651
|
-
${this.
|
|
650
|
+
${this.label?j`<div class="sonic-toast-title" id=${t}>
|
|
651
|
+
${qn(this.label)}
|
|
652
652
|
</div>`:""}
|
|
653
|
-
${this.
|
|
653
|
+
${this.useSlot?te:qn(this.text)}
|
|
654
654
|
<slot></slot>
|
|
655
655
|
</div>
|
|
656
656
|
|
|
657
657
|
${this.preserve?"":this.autoHide()}
|
|
658
658
|
</div>
|
|
659
|
-
</div>`}hide(){if(gs.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},6e3)}}
|
|
659
|
+
</div>`}updated(t){t.has("styleSheet")&&this.syncAdoptedStyleSheets()}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=Bn(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}hide(){if(gs.getClosestElement(this,"sonic-toast")||(this.visible=!1),this.dismissForever){const t=localStorage.getItem("sonic-toast-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-toast-dismissed",JSON.stringify(e))}this.dispatchEvent(new CustomEvent("hide",{bubbles:!0}))}show(){this.visible=!0}autoHide(){setTimeout(()=>{this.hide()},6e3)}};$t.styles=[Yr,ee`
|
|
660
660
|
* {
|
|
661
661
|
box-sizing: border-box;
|
|
662
662
|
}
|
|
@@ -836,7 +836,7 @@
|
|
|
836
836
|
opacity: 0.85;
|
|
837
837
|
pointer-events: none;
|
|
838
838
|
}
|
|
839
|
-
`],
|
|
839
|
+
`],Ft([h()],$t.prototype,"label",2),Ft([h({type:String})],$t.prototype,"id",2),Ft([h()],$t.prototype,"text",2),Ft([h({type:String})],$t.prototype,"status",2),Ft([h({type:Boolean})],$t.prototype,"ghost",2),Ft([h({type:Boolean})],$t.prototype,"preserve",2),Ft([h({type:Boolean})],$t.prototype,"dismissForever",2),Ft([h({type:String})],$t.prototype,"maxHeight",2),Ft([h({type:Boolean})],$t.prototype,"useSlot",2),Ft([h({attribute:!1})],$t.prototype,"styleSheet",2),Ft([Ce()],$t.prototype,"visible",2),Ft([Ce()],$t.prototype,"_titleId",2),$t=Ft([X(Bh)],$t);const Hh=ee`
|
|
840
840
|
:host {
|
|
841
841
|
/* POLICES */
|
|
842
842
|
/*
|
|
@@ -907,7 +907,7 @@
|
|
|
907
907
|
--sc-contrast-content: #fff;
|
|
908
908
|
--sc-contrast: #000000;
|
|
909
909
|
}
|
|
910
|
-
`,
|
|
910
|
+
`,Vh=ee`
|
|
911
911
|
:host([theme="light"]) {
|
|
912
912
|
/*Boutons*/
|
|
913
913
|
--sc-primary: var(--sc-base-800);
|
|
@@ -936,7 +936,7 @@
|
|
|
936
936
|
--sc-base-900: #0f172a;
|
|
937
937
|
--sc-base-content: var(--sc-base-700);
|
|
938
938
|
}
|
|
939
|
-
|
|
939
|
+
`,ka=ee`
|
|
940
940
|
--sc-primary: var(--sc-dark-primary, var(--sc-base-700));
|
|
941
941
|
--sc-info: var(--sc-dark-info, #3abff8);
|
|
942
942
|
--sc-danger: var(--sc-dark-danger, #f87272);
|
|
@@ -961,17 +961,17 @@
|
|
|
961
961
|
--sc-base-800: var(--sc-dark-base-800, #d9dce0);
|
|
962
962
|
--sc-base-900: var(--sc-dark-base-900, #e5e7eb);
|
|
963
963
|
--sc-base-content: var(--sc-dark-base-content, #e5e7eb);
|
|
964
|
-
`,
|
|
964
|
+
`,Wh=ee`
|
|
965
965
|
:host([theme="dark"]) {
|
|
966
|
-
${
|
|
966
|
+
${ka}
|
|
967
967
|
}
|
|
968
968
|
|
|
969
969
|
@media (prefers-color-scheme: dark) {
|
|
970
970
|
:host([theme="auto"]) {
|
|
971
|
-
${
|
|
971
|
+
${ka}
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
|
-
`;var
|
|
974
|
+
`;var Kh=Object.defineProperty,Yh=Object.getOwnPropertyDescriptor,Gr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Yh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Kh(e,s,r),r};const Gh="sonic-theme";let Rt=class extends J{constructor(){super(),this.background=!1,this.color=!1,this.font=!1,Rt.instance=this}static getPopContainer(){return Rt.instance||document.body}connectedCallback(){super.connectedCallback(),window.addEventListener("message",t=>this.receiveMessage(t),!1),window.dispatchEvent(new CustomEvent("SonicThemeReady")),this.postCSSVars()}postCSSVars(){const t=document.styleSheets,e=t.length,s=[];for(let r=0;r<e;r++){const n=t[r];n.href&&(n.href.includes("googleapis")||n.href.includes("typekit.net"))&&s.push(n.href)}const i={variables:this.getCssVariables(),fonts:s};ve.get("sonic-theme")?.set(i),document.querySelectorAll("iframe").forEach(r=>r.contentWindow?.postMessage({type:"SonicTheme",...i},"*"))}receiveMessage(t){const e=t.data;!e.type||e.type!="GetSonicTheme"||this.postCSSVars()}getCssVariables(){const t=[],e=[...Rt.styles.map(r=>r.styleSheet),...Array.from(document.styleSheets)];for(const r of e)try{if(!r)continue;const n=r.cssRules;for(const o of n){if(!("style"in o))continue;const c=o.style;for(const d of c)t.includes(d)||d.indexOf("--sc")!==0||t.push(d)}}catch{console.warn("Erreur lors de la récupération des variables CSS")}const s=window.getComputedStyle(this),i={};return t.forEach(r=>i[r]=s.getPropertyValue(r)),i}render(){return j`<slot></slot>`}};Rt.styles=[Vh,Wh,Hh,ee`
|
|
975
975
|
:host([color]) {
|
|
976
976
|
color: var(--sc-base-content, #000);
|
|
977
977
|
}
|
|
@@ -1003,39 +1003,41 @@
|
|
|
1003
1003
|
transition-property: scale, opacity;
|
|
1004
1004
|
transition-timing-function: cubic-bezier(0.25, 0.25, 0.42, 1.225);
|
|
1005
1005
|
}
|
|
1006
|
-
`],Gr([
|
|
1007
|
-
${Ii(this.toasts,
|
|
1006
|
+
`],Gr([h({type:String,reflect:!0})],Rt.prototype,"theme",2),Gr([h({type:Boolean,reflect:!0})],Rt.prototype,"background",2),Gr([h({type:Boolean,reflect:!0})],Rt.prototype,"color",2),Gr([h({type:Boolean,reflect:!0})],Rt.prototype,"font",2),Rt=Gr([X(Gh)],Rt);var Zh=Object.defineProperty,Jh=Object.getOwnPropertyDescriptor,$a=(t,e,s,i)=>{for(var r=i>1?void 0:i?Jh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Zh(e,s,r),r};let Da=!1;function Ea(t){if(t.label!==void 0)return t.label;if(t.title!==void 0)return Da||(Da=!0,console.warn("[concorde] Toast.title est déprécié, utiliser Toast.label.")),t.title}const Xh="sonic-toast";let _e=class extends J{constructor(){super(...arguments),this.toasts=[]}createRenderRoot(){return this}render(){const e=window.parent!=window;let s={pointerEvents:"none",gap:"1rem",display:"flex",margin:this.toasts.length?"1rem":"0"};return e||(s={...s,margin:"0",width:"calc(100% - 2.5rem)",position:"fixed",bottom:"1.25rem",right:"1.25rem",zIndex:"10000",maxWidth:"64ch",flexDirection:"column-reverse"}),_e.handleExistingToastDelegation(),this.toasts?j`<div style=${kt(s)}>
|
|
1007
|
+
${Ii(this.toasts,i=>i.id,i=>j`
|
|
1008
1008
|
<sonic-toast-item
|
|
1009
1009
|
maxHeight=${e?"none":"10rem"}
|
|
1010
|
-
status=${
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
?
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1010
|
+
status=${se(i.status)}
|
|
1011
|
+
.label=${Ea(i)}
|
|
1012
|
+
.text=${i.useSlot?void 0:i.text}
|
|
1013
|
+
.styleSheet=${i.styleSheet}
|
|
1014
|
+
?useSlot=${i.useSlot}
|
|
1015
|
+
?ghost=${i.ghost}
|
|
1016
|
+
?dismissForever=${i.dismissForever}
|
|
1017
|
+
?preserve=${i.preserve}
|
|
1018
|
+
id=${se(i.id)}
|
|
1019
|
+
@hide=${()=>this.removeItem(i)}
|
|
1020
|
+
${ch({keyframeOptions:{duration:250,easing:"cubic-bezier(0.250, 0.250, 0.420, 1.225)"},in:[{transform:"translateY(0) scale(1.25)",boxShadow:"0 0 0 rgba(0,0,0,0)",opacity:0}],out:[{transform:"scale(.90) ",opacity:0,duration:3e3,easing:"ease-in-out"}],stabilizeOut:!0})}
|
|
1018
1021
|
>
|
|
1019
|
-
|
|
1020
|
-
${r.text?je(r.text):""}
|
|
1022
|
+
${i.useSlot?qn(i.text):te}
|
|
1021
1023
|
</sonic-toast-item>
|
|
1022
1024
|
`)}
|
|
1023
|
-
</div>`:
|
|
1025
|
+
</div>`:te}static removeAll(){if(_e.delegateToasts){_e.handleExistingToastDelegation(),window.parent.postMessage({type:"removeAllToasts"},"*");return}const e=_e.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.ghost))}static removeItemsByStatus(e){if(_e.delegateToasts){_e.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemsByStatus",status:e},"*");return}const s=_e.getInstance();s&&(s.toasts=s.toasts.filter(i=>i.status!==e))}static removeItemById(e){if(_e.delegateToasts){_e.handleExistingToastDelegation(),window.parent.postMessage({type:"removeItemById",id:e},"*");return}const s=_e.getInstance();s&&(s.toasts=s.toasts.filter(i=>i.id!==e))}static removeTemporaryItems(){if(_e.delegateToasts){_e.handleExistingToastDelegation(),window.parent.postMessage({type:"removeTemporaryItems"},"*");return}const e=_e.getInstance();e&&(e.toasts=e.toasts.filter(s=>s.preserve))}static getInstance(){return _e.instance||(_e.instance=document.createElement("sonic-toast"),Rt.getPopContainer().prepend(_e.instance)),_e.instance}static add(e){if(_e.delegateToasts){_e.handleExistingToastDelegation(),window.parent.postMessage({type:"addToast",toast:e},"*");return}const s=_e.getInstance(),i=e.id??new Date().valueOf(),r=new RegExp("</a>|</.*?button>|</.*?input>|</.*?textarea>|</.*?select>"),n=typeof e.text=="string"&&r.test(e.text),o={id:i,text:e.text,label:Ea(e),status:e.status,preserve:n?!0:e.preserve,ghost:e.ghost,dismissForever:e.dismissForever,styleSheet:e.styleSheet,useSlot:e.useSlot};if(e.dismissForever&&e.id){const c=localStorage.getItem("sonic-toast-dismissed")||"{}";if(JSON.parse(c)[e.id])return null}if(s?.toasts.length){const c={...o};for(const d of s.toasts){const b={...d};if(c.id=b.id=0,at.shallowEqual(c,b))return null}}return s&&(s.toasts=[...s.toasts,o]),o}static handleExistingToastDelegation(){if(!this.delegateToasts)return;const e=_e.getInstance();window.parent.postMessage({type:"addToasts",toasts:e.toasts},"*"),e.toasts=[]}static removeItem(e){if(_e.delegateToasts){_e.handleExistingToastDelegation(),window.parent.postMessage({type:"removeToast",toast:e},"*");return}const s=_e.getInstance();s&&s.removeItem(e)}removeItem(e){e&&(this.toasts=this.toasts.filter(s=>(s={...s},delete s.id,!at.shallowEqual(s,e,!1))))}};_e.delegateToasts=!1,$a([h({type:Array})],_e.prototype,"toasts",2),_e=$a([X(Xh)],_e),typeof window<"u"&&(window[pi+"Toast"]=window[pi+"Toast"]||_e);function Qh(){const t=s=>{s.data.type=="querySonicToastAvailability"&&s.source.postMessage({type:"sonicToastAvailable"},"*"),s.data.type=="removeItemsByStatus"&&_e.removeItemsByStatus(s.data.status),s.data.type=="removeItemById"&&_e.removeItemById(s.data.id),s.data.type=="removeTemporaryItems"&&_e.removeTemporaryItems(),s.data.type=="sonicToastAvailable"&&(_e.delegateToasts=!0,_e.handleExistingToastDelegation()),s.data.type=="addToasts"&&(_e.getInstance().toasts=[..._e.getInstance().toasts,...s.data.toasts]),s.data.type=="removeAllToasts"&&_e.removeAll(),s.data.type=="removeToast"&&_e.removeItem(s.data.toast),s.data.type=="addToast"&&_e.add(s.data.toast)},e=window.parent!=window;if(window.addEventListener("message",t,!1),e&&window.parent.postMessage({type:"querySonicToastAvailability"},"*"),!e)for(const s of document.querySelectorAll("iframe"))s.contentWindow?.postMessage({type:"sonicToastAvailable"},"*")}Qh();var eu=Object.defineProperty,tu=Object.getOwnPropertyDescriptor,Zr=(t,e,s,i)=>{for(var r=i>1?void 0:i?tu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&eu(e,s,r),r};const su=new Set,ru=new Set,iu=t=>{for(const e of ru)e(t)},Hn=new Set;let Vn=0;ln(async()=>{Vn++;const t=Vn,e=Array.from(Hn);for(;e.length>0;){if(t!=Vn)return;const s=e.splice(0,4);await Promise.all(s.map(i=>i.refetch()))}});const Wn=(t,e)=>{class s extends t{constructor(...r){super(),this.api=null,this.key="",this.isFirstLoad=!0,this.isLoading=!1,this.iObserver=null,this.isFetchEnabled=!0,this.fetchedData=null,this._endPoint="",this.noErrorsRecordings=!1,this.requestId=0,this.refetchEveryMs=0,this._isFetching=!1,this._mustRefetch=!1,this.dataProvider=""}get props(){return super.props}set props(r){super.props=r}set endPoint(r){this._endPoint=r,this.isConnected&&this._fetchData()}get endPoint(){return this._endPoint}handleStartFetching(){return this._isFetching?(this._mustRefetch=!0,"fetching"):(this._isFetching=!0,"okToFetch")}handleEndFetching(){this._isFetching=!1,this._mustRefetch&&(this._mustRefetch=!1,this._fetchData())}refetch(){return this._fetchData()}async _fetchData(){if(this.requestUpdate(),!this.isFetchEnabled||(this.api=new Ds(this.getApiConfiguration()),!this.api)||(this.dispatchEvent(new CustomEvent("loading",{detail:this})),this.getAttribute("localStorage")==="enabled"&&await ve.getInstance().isLocalStrorageReady,!this.isConnected))return;const r=ve.getInstance().get(this.getAncestorAttributeValue("headersDataProvider")).get();if(this.isLoading=!0,at.isObject(this.props)&&Object.keys(this.props||{}).length>0&&this.isFirstLoad&&window.requestAnimationFrame(()=>{this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1}),this.handleStartFetching()==="fetching")return;let o=null;try{o=await this.api.get(this.endPoint||this.dataProvider||"",r)}catch{}if(this.handleEndFetching(),this.fetchedData=o,this.api.lastResult&&!this.api.lastResult.ok&&(this.noErrorsRecordings||su.add(this),iu(this.api.lastResult)),!!this.isConnected){if(o)o._sonic_http_response_&&!o._sonic_http_response_.ok&&Object.keys(o).length===1&&_e.add({text:"Network Error",status:"error"});else{this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs));return}if(this.key){const c=o._sonic_http_response_,d=this.key.split(".");o=at.traverse(o,d,this.hasAttribute("preserveOtherKeys")),o&&at.isObject(o)&&c&&(o._sonic_http_response_=c)}this.props=o,this.dispatchEvent(new CustomEvent("load",{detail:this})),this.isFirstLoad=!1,this.isLoading=!1,this.refetchEveryMs&&this.isConnected&&(this.refetchTimeOutId=setTimeout(()=>this._fetchData(),this.refetchEveryMs))}}disconnectedCallback(){super.disconnectedCallback(),Hn.delete(this),this.publisher?.offInvalidate(this.onInvalidate),clearTimeout(this.refetchTimeOutId),this.isFirstLoad=!1}connectedCallback(){this.lazyLoad=this.lazyLoad!==void 0?this.lazyLoad:this.hasAttribute("lazyload"),Hn.add(this),super.connectedCallback(),this.isFetchEnabled&&(this.key=this.key!=""?this.key:this.getAttribute("key"),this.props&&this.publisher.set(this.props),this.onInvalidate=()=>this._fetchData(),this.publisher?.onInvalidate(this.onInvalidate),this.lazyLoad?this.handleLazyLoad():this._fetchData())}handleLazyLoad(){if(!this.lazyLoad)return;const r=parseFloat(this.getAttribute("lazyBoundsRatio")||"1"),n={root:null,rootMargin:Math.max(window.innerWidth*r,window.innerHeight*r)+"px",threshold:.9};this.iObserver=new IntersectionObserver(d=>this.onIntersection(d),n);let c=[...(this.shadowRoot?this.shadowRoot:this).children].filter(d=>d.nodeName.toLowerCase()!="style")[0];if(c?.nodeName.toLocaleLowerCase()=="slot"&&(c=[...c.children].filter(d=>d.nodeName.toLowerCase()!="style")[0]),!c||c.nodeName.toLocaleLowerCase()=="template"){c=document.createElement("div");const d=c.style;d.pointerEvents="none",d.width="1px",d.height="1px",this.lazyLoadPlaceHolder=c,this.appendChild(c)}c?this.iObserver.observe(c):this.isFirstLoad&&this._fetchData()}onIntersection(r){for(const n of r)if(n.isIntersecting&&this.isFirstLoad){this._fetchData(),this.lazyLoadPlaceHolder?.remove(),this.lazyLoadPlaceHolder=void 0,this.iObserver?.disconnect();break}}}return Zr([h()],s.prototype,"noErrorsRecordings",2),Zr([h()],s.prototype,"props",1),Zr([h({type:String})],s.prototype,"endPoint",1),Zr([h()],s.prototype,"requestId",2),Zr([h({type:Number})],s.prototype,"refetchEveryMs",2),s};var nu=Object.defineProperty,ou=Object.getOwnPropertyDescriptor,Xs=(t,e,s,i)=>{for(var r=i>1?void 0:i?ou(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&nu(e,s,r),r};const ji=t=>{class e extends t{constructor(...i){super(),this.forceAutoFill=!1,this._type="text",this.status="default"}validateFormElement(){const i=this.shadowRoot?.querySelector("input");if(!i||i.checkValidity())return;const r=this.getFormPublisher();r&&(r.isFormValid=!1),i.reportValidity()}set type(i){this.hasAttribute("type")&&!this.forceAutoFill&&(i=this.getAttribute("type")),this._type=i,this.requestUpdate()}get type(){return this._type}get description(){return this._description}set description(i){this.hasAttribute("description")&&!this.forceAutoFill&&(i=this.getAttribute("description")),this._description=i,this.requestUpdate()}get label(){return this._label}set label(i){this.hasAttribute("label")&&!this.forceAutoFill&&(i=this.getAttribute("label")),this._label=i,this.requestUpdate()}}return Xs([h()],e.prototype,"forceAutoFill",2),Xs([h({type:String})],e.prototype,"type",1),Xs([h()],e.prototype,"description",1),Xs([h()],e.prototype,"label",1),Xs([h({type:String,reflect:!0})],e.prototype,"status",2),Xs([h({type:Number})],e.prototype,"tabindex",2),Xs([h({type:String})],e.prototype,"autocomplete",2),e},Oa=Wn,au=Mn,Ta=mr,La=ji,Qs=Ct,Kn=Ur;window["concorde-mixins"]=window["concorde-mixins"]||{},window["concorde-mixins"]={Fetcher:Oa,FormCheckable:au,FormElement:Ta,FormInput:La,Subscriber:Qs,TemplatesContainer:Kn};/**
|
|
1024
1026
|
* @license
|
|
1025
1027
|
* Copyright 2020 Google LLC
|
|
1026
1028
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1027
|
-
*/const rs=$s(class extends fr{constructor(t){if(super(t),t.type!==
|
|
1029
|
+
*/const rs=$s(class extends fr{constructor(t){if(super(t),t.type!==Ks.CHILD)throw Error("templateContent can only be used in child bindings")}render(t){return this.vt===t?It:(this.vt=t,document.importNode(t.content,!0))}});var lu=Object.defineProperty,cu=Object.getOwnPropertyDescriptor,Ma=(t,e,s,i)=>{for(var r=i>1?void 0:i?cu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&lu(e,s,r),r};const hu="sonic-fetch";let zi=class extends Wn(Ct(Kn(J))){renderLoader(){if(!(this.isLoading&&this.loader!==void 0))return te;const t=this.loader===!0||this.loader===""?"fixed":this.loader;return j`<sonic-loader mode=${t}></sonic-loader>`}renderSkeleton(){const t=this.templateParts.skeleton;return this.isLoading&&t?rs(t):te}render(){return j`
|
|
1028
1030
|
${this.renderSkeleton()} ${this.renderLoader()}
|
|
1029
|
-
${this.isLoading?
|
|
1030
|
-
`}};
|
|
1031
|
+
${this.isLoading?te:j`<slot></slot>`}
|
|
1032
|
+
`}};zi.styles=[ee`
|
|
1031
1033
|
:host {
|
|
1032
1034
|
display: contents;
|
|
1033
1035
|
}
|
|
1034
|
-
`],
|
|
1036
|
+
`],Ma([h()],zi.prototype,"loader",2),zi=Ma([X(hu)],zi);var uu=Object.defineProperty,du=Object.getOwnPropertyDescriptor,Na=(t,e,s,i)=>{for(var r=i>1?void 0:i?du(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&uu(e,s,r),r};const pu="sonic-if";let Ui=class extends J{constructor(){super(...arguments),this.condition=!1}render(){return this.condition?j` <slot></slot> `:te}};Ui.styles=ee`
|
|
1035
1037
|
:host {
|
|
1036
1038
|
display: contents;
|
|
1037
1039
|
}
|
|
1038
|
-
`,
|
|
1040
|
+
`,Na([h({type:Boolean})],Ui.prototype,"condition",2),Ui=Na([X(pu)],Ui);const fu=ee`
|
|
1039
1041
|
:host([align="left"]) .sonic-loader--inline {
|
|
1040
1042
|
margin-left: 0;
|
|
1041
1043
|
}
|
|
@@ -1102,7 +1104,7 @@
|
|
|
1102
1104
|
transform: translate(24px, 0);
|
|
1103
1105
|
}
|
|
1104
1106
|
}
|
|
1105
|
-
`,
|
|
1107
|
+
`,gu=ee`
|
|
1106
1108
|
@keyframes sonic-loader--fixed {
|
|
1107
1109
|
0% {
|
|
1108
1110
|
transform: scale(0);
|
|
@@ -1155,14 +1157,14 @@
|
|
|
1155
1157
|
height: 5rem;
|
|
1156
1158
|
animation: sonic-loader--fixed 1s 0s linear infinite;
|
|
1157
1159
|
}
|
|
1158
|
-
`;var
|
|
1160
|
+
`;var mu=Object.defineProperty,bu=Object.getOwnPropertyDescriptor,Yn=(t,e,s,i)=>{for(var r=i>1?void 0:i?bu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&mu(e,s,r),r};const vu="sonic-loader";let ht=class extends J{constructor(){super(...arguments),this.mode="fixed",this.noDelay=!1}static show(t){ht.loader||(ht.loader=document.createElement("sonic-loader"));const e=ht.loader;t||(t={}),t.mode&&e.setAttribute("mode",t.mode),t.noDelay&&e.setAttribute("noDelay",""),t.container||(t.container=Rt.getPopContainer(),t.mode="fixed"),t.container.appendChild(e),ht.callCounter++}static hide(){ht.callCounter--,!(ht.callCounter>0)&&ht.loader&&ht.loader.remove()}render(){return j`<div
|
|
1159
1161
|
class="sonic-loader sonic-loader--${this.mode} ${this.noDelay?"sonic-loader--nodelay":""} "
|
|
1160
1162
|
>
|
|
1161
1163
|
<div></div>
|
|
1162
1164
|
<div></div>
|
|
1163
1165
|
<div></div>
|
|
1164
1166
|
<div></div>
|
|
1165
|
-
</div>`}};
|
|
1167
|
+
</div>`}};ht.styles=[fu,gu,ee`
|
|
1166
1168
|
:host {
|
|
1167
1169
|
--sc-_loader-bg: var(--sc-primary, currentColor);
|
|
1168
1170
|
pointer-events: none;
|
|
@@ -1190,7 +1192,7 @@
|
|
|
1190
1192
|
opacity: 1;
|
|
1191
1193
|
}
|
|
1192
1194
|
}
|
|
1193
|
-
`],
|
|
1195
|
+
`],ht.callCounter=0,Yn([h({type:String})],ht.prototype,"mode",2),Yn([h({type:Boolean})],ht.prototype,"noDelay",2),ht=Yn([X(vu)],ht);var yu=Object.getOwnPropertyDescriptor,wu=(t,e,s,i)=>{for(var r=i>1?void 0:i?yu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const _u="sonic-subscriber";let Ia=class extends Ct(J){constructor(){super(...arguments),this.noAutofill=!0}connectedCallback(){this.noShadowDom="",super.connectedCallback()}updated(t){super.updated(t),this.children.length==0?this.style.display="none":this.style.display="contents"}render(){return j`<slot></slot> `}};Ia=wu([X(_u)],Ia);var Su=Object.defineProperty,Pu=Object.getOwnPropertyDescriptor,Xt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Pu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Su(e,s,r),r};const xu="sonic-list";let Bt=class extends Wn(Ct(Ur(J))){constructor(){super(...arguments),this.templateKey="template",this.idKey="id",this.limit=Number.POSITIVE_INFINITY,this.offset=0,this.loadingSize={width:0,height:0}}get items(){return this._items}set items(t){typeof t!="function"&&t!==void 0||(this._items=t,this.requestUpdate())}connectedCallback(){this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.isFetchEnabled=this.hasAttribute("fetch"),this.isFetchEnabled&&(this.isLoading=!0),super.connectedCallback()}disconnectedCallback(){super.disconnectedCallback()}renderLoader(){if(!(this.isLoading&&this.loader!==void 0)||this.templateParts.skeleton)return te;const e=this.loader===!0||this.loader===""?"fixed":this.loader;return j`<sonic-loader mode=${e}></sonic-loader>`}renderSkeleton(){if(this.skeleton)return this.skeleton();const t=this.templateParts.skeleton;return this.isLoading&&t?rs(t):te}renderSeparator(){if(this.separator)return this.separator();const t=this.templateParts.separator;return t?rs(t):te}renderLoadingState(){return j`${this.renderSkeleton()} ${this.renderLoader()} `}renderNoResultState(){return j` <div
|
|
1194
1196
|
style="color: var(--sc-base-400);
|
|
1195
1197
|
font-size: 1.5em;
|
|
1196
1198
|
margin: 4rem 0;
|
|
@@ -1201,36 +1203,36 @@
|
|
|
1201
1203
|
><span class="sonic-no-result-text"
|
|
1202
1204
|
>${typeof this.props=="string"&&this.props==""?"Aucun résultat":this.props}</span
|
|
1203
1205
|
>
|
|
1204
|
-
</div>`}formatProps(){let t=this.props;if(t==null)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(s?t=Object.entries(t).map(([r
|
|
1206
|
+
</div>`}formatProps(){let t=this.props;if(t==null)return null;const e=t._sonic_http_response_,s=this.hasAttribute("extractValues");return Array.isArray(t)||(s?t=Object.entries(t).map(([i,r])=>({key:i,value:r})):at.isObject(t)&&Object.keys(t).length>0&&(!e||e.ok)?t=[t]:t=[]),t=t.filter(i=>i!=null),e&&(t._sonic_http_response_=e),t}updated(t){window.requestAnimationFrame(()=>{if(!this.isLoading){this.style.setProperty("--list-loader-height-display","none");return}this.style.setProperty("--list-loader-height-display","block"),this.loadingSize=this.getDisplayContentsSize(this)}),super.updated(t)}getAllRenderableElements(t){let e=[];function s(i){if(i.nodeType===Node.ELEMENT_NODE){const r=i.getBoundingClientRect();(r.width>0||r.height>0)&&e.push(i),i.childNodes.forEach(s),i.shadowRoot&&i.shadowRoot.childNodes.forEach(s)}}return s(t),e}getDisplayContentsSize(t){const e=this.getAllRenderableElements(t);if(e.length===0)return{width:0,height:0};const s=e.map(c=>c.getBoundingClientRect()),i=Math.min(...s.map(c=>c.left)),r=Math.max(...s.map(c=>c.right)),n=Math.min(...s.map(c=>c.top)),o=Math.max(...s.map(c=>c.bottom));return{width:r-i,height:o-n}}render(){return j`
|
|
1205
1207
|
${this.renderContent()}
|
|
1206
1208
|
<div
|
|
1207
1209
|
style="grid-column: 1 / -1;min-height:${this.isLoading?0:this.loadingSize.height}px; width:0;float:left;display: var(--list-loader-height-display);"
|
|
1208
1210
|
></div>
|
|
1209
|
-
`}handleProgrammaticTemplates(t,e,s){return this.items?
|
|
1211
|
+
`}handleProgrammaticTemplates(t,e,s){return this.items?j`<sonic-subscriber
|
|
1210
1212
|
?debug=${this.defferedDebug===!0}
|
|
1211
1213
|
.bindPublisher=${()=>this.publisher[s]}
|
|
1212
1214
|
.propertyMap?=${this.itemPropertyMap}
|
|
1213
1215
|
dataProvider="${this.dataProvider}/list-item/${s}"
|
|
1214
1216
|
>
|
|
1215
1217
|
${this.items(t,e)}
|
|
1216
|
-
</sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!at.isObject(this.props))return
|
|
1217
|
-
${b?.map((k,g)=>{if(k==null)return
|
|
1218
|
+
</sonic-subscriber>`:null}renderContent(){if(this.isLoading&&!Array.isArray(this.props))return this.renderLoadingState();if(typeof this.props=="string")return this.renderNoResultState();if(!at.isObject(this.props))return j`<div></div>`;const i=this.formatProps();if((i?.length||0)==0){if(this.noItems)return this.noItems();if(this.templateParts["no-items"]=this.templateParts["no-items"]||this.templateParts["no-item"],this.templateParts["no-items"])return rs(this.templateParts["no-items"])}const r=this.templateList.length;let n=-1;const o=this.hasAttribute("extractValues"),c=this.renderSeparator(),d=i?.length||0,b=i?.slice(this.offset,this.offset+this.limit);return j`
|
|
1219
|
+
${b?.map((k,g)=>{if(k==null)return te;let f=g,A=null;if(typeof k=="object"&&!Array.isArray(k)){o&&(f=k?.key);const y=k[this.templateKey];y&&typeof y=="string"&&(A=this.templateParts[y])}if(f=="_sonic_http_response_"||typeof f!="string"&&typeof f!="number")return te;const E=g>=d-1,O=g%2,I=this.publisher[f],U={key:f,even:O==0,odd:O==1,onlyChild:d==1,firstChild:g==0,lastChild:E};I._key_=f+"",I._metadata_={...I._metadata_.get(),...U};const S=this.handleProgrammaticTemplates(k,U,f);return S?j`${S}${E?te:c}`:(n++,A&&(n=-1),j`
|
|
1218
1220
|
<sonic-subscriber
|
|
1219
1221
|
?debug=${this.defferedDebug===!0}
|
|
1220
|
-
.bindPublisher=${function(){return
|
|
1222
|
+
.bindPublisher=${function(){return I}}
|
|
1221
1223
|
.propertyMap?=${this.itemPropertyMap}
|
|
1222
1224
|
dataProvider="${this.dataProvider}/list-item/${f}"
|
|
1223
1225
|
>
|
|
1224
|
-
${rs(A||this.templateList[n%
|
|
1226
|
+
${rs(A||this.templateList[n%r])}
|
|
1225
1227
|
</sonic-subscriber>
|
|
1226
|
-
${E?
|
|
1228
|
+
${E?te:c}
|
|
1227
1229
|
`)})}
|
|
1228
|
-
`}};
|
|
1230
|
+
`}};Xt([h({type:Object})],Bt.prototype,"itemPropertyMap",2),Xt([h({type:String})],Bt.prototype,"templateKey",2),Xt([h({type:String})],Bt.prototype,"idKey",2),Xt([h()],Bt.prototype,"loader",2),Xt([h()],Bt.prototype,"limit",2),Xt([h()],Bt.prototype,"offset",2),Xt([h({type:Function,attribute:!1})],Bt.prototype,"items",1),Xt([h({type:Function,attribute:!1})],Bt.prototype,"noItems",2),Xt([h({type:Function,attribute:!1})],Bt.prototype,"skeleton",2),Xt([h({type:Function,attribute:!1})],Bt.prototype,"separator",2),Bt=Xt([X(xu)],Bt);/**
|
|
1229
1231
|
* @license
|
|
1230
1232
|
* Copyright 2021 Google LLC
|
|
1231
1233
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1232
|
-
*/function*
|
|
1233
|
-
${
|
|
1234
|
+
*/function*Fa(t,e){if(t!==void 0){let s=0;for(const i of t)yield e(i,s++)}}var Au=Object.defineProperty,Cu=Object.getOwnPropertyDescriptor,ut=(t,e,s,i)=>{for(var r=i>1?void 0:i?Cu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Au(e,s,r),r};const ku="sonic-queue";let st=class extends Ct(J){constructor(){super(...arguments),this.templates=null,this.items=null,this.noItems=null,this.skeleton=null,this.lastRequestTime=0,this.key="",this.itemPropertyMap=null,this.cache="default",this.targetRequestDuration=500,this.limit=5,this.lazyBoundsRatio=1,this.offset=0,this.resultCount=0,this.noLazyload=!1,this.loader="inline",this.filteredFields="",this.instanceId=0,this.localStorage="disabled",this.filterPublisher=null,this.filterTimeoutMs=400,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.updateFilteredContent=()=>{const e=this.dataProviderExpression.split("?");e.shift();const s=new URLSearchParams(e.join("?")),i=this.filterPublisher?.get(),r=this.filteredFields.split(" ");for(const o in i){let c=i[o];Array.isArray(c)&&(c=c.filter(d=>d!==null)),!(this.filteredFields&&r.includes(o)||c==null||c.toString()==="")&&s.set(o,i[o].toString())}const n=s.toString();if(!(n==this.searchHash&&!this.isFirstRequest)){this.searchHash=n,Vc(this.resolveScrollRoot(),{x:0,y:0});for(const o of this.listDataProviders)ve.getInstance().delete(o);this.listDataProviders=[],clearTimeout(this.filterTimeoutId),this.filterTimeoutId=setTimeout(async()=>{const o=this.resultCount;this.props=null,this.requestId++,this.resultCount=o,await ve.getInstance().isLocalStrorageReady,window.requestAnimationFrame(()=>this.next())},this.isFirstRequest?0:this.filterTimeoutMs),this.isFirstRequest=!1}},this.scrollRoot=null,this.scrollSyncActive=!1,this.mutationObserver=null,this.restoreGeneration=0,this.dataProviderExpression="",this.invalidateOnPageShow=!1,this.idKey="id",this.listDataProviders=[],this.nextHadEvent=!1}disconnectedCallback(){for(const t of this.listDataProviders)ve.getInstance().delete(t),this.listDataProviders=[];this.filterPublisher?.offInternalMutation(this.updateFilteredContent),this.props=null,this.limit=5,this.offset=0,this.resultCount=0,this.searchHash="",this.requestId=0,this.isFirstRequest=!0,this.nextHadEvent=!1,this.teardownScrollSync(),this.publisher.set({}),super.disconnectedCallback()}async connectedCallback(){this.instanceId=st.instanceCounter++,this.localStorage=this.getAttribute("localStorage")||this.localStorage,this.filterTimeoutMs=parseInt(this.getAttribute("filterTimeoutMs")||"400"),this.removeAttribute("localStorage"),this.noShadowDom="",this.defferedDebug=this.hasAttribute("debug")||null,this.dataProvider||(this.dataProvider=this.dataProviderExpression||"sonic-queue-"+this.instanceId+"-"+Math.random().toString(36).substring(7)),this.dataProviderExpression||(this.dataProviderExpression=gs.getAncestorAttributeValue(this.parentElement,"dataProvider")||""),this.ensureScrollSync(),super.connectedCallback(),this.publisher.set({}),this.key=this.getAttribute("key"),await ve.getInstance().isLocalStrorageReady,this.templates||(this.templates=Array.from(this.querySelectorAll("template"))),this.lastRequestTime=new Date().getTime(),this.configFilter()}configFilter(){const t=this.getAncestorAttributeValue("dataFilterProvider");if(!t){this.next();return}this.filterPublisher=ve.getInstance().get(t),this.filterPublisher?.onInternalMutation(this.updateFilteredContent)}resolveScrollRoot(){const t=gs.getScrollingAncestor(this);return!t||t===document.documentElement||t===document.body?window:t}isSafari(){return fs()}ensureScrollSync(){if(!fs()||!this.isConnected)return;const t=this.resolveScrollRoot();this.scrollRoot=t,Gs(t),!this.scrollSyncActive&&(this.scrollSyncActive=!0,this.mutationObserver=new MutationObserver(()=>{this.scheduleRestoreAfterChildren()}),this.mutationObserver.observe(this,{childList:!0,subtree:!0,characterData:!0}))}teardownScrollSync(){this.restoreGeneration++,this.mutationObserver?.disconnect(),this.mutationObserver=null,this.scrollSyncActive=!1,this.scrollRoot=null}scheduleRestoreAfterChildren(){if(!fs()||!this.isConnected)return;const t=++this.restoreGeneration;(async()=>{if(await this.updateComplete,t!==this.restoreGeneration||!this.isConnected)return;const e=Array.from(this.querySelectorAll("sonic-list"));if(e.length&&await Promise.all(e.map(i=>i.updateComplete)),t!==this.restoreGeneration||!this.isConnected||(await new Promise(i=>requestAnimationFrame(()=>i())),await new Promise(i=>requestAnimationFrame(()=>i())),t!==this.restoreGeneration||!this.isConnected))return;const s=this.scrollRoot??this.resolveScrollRoot();Gs(s),$n(s)})()}updated(t){if(fs()){this.ensureScrollSync();const e=this.scrollRoot??this.resolveScrollRoot();$n(e),this.scheduleRestoreAfterChildren()}super.updated(t)}resetDuration(){this.lastRequestTime=new Date().getTime()}next(t){let e=this.offset;const i=new Date().getTime()-this.lastRequestTime;if(!this.nextHadEvent&&t&&(this.publisher.resultCount=0,this.resultCount=0),this.nextHadEvent=!!t,t){if(this.publisher.lastFetchedData=t.detail.fetchedData,t.detail.requestId<this.requestId)return;if(this.resultCount+=t.detail.props?.length||0,!t.detail.isFirstLoad||!t.detail.props?.length||this.dataProviderExpression.indexOf("$offset")==-1){this.publisher.resultCount=this.resultCount;return}}if(Array.isArray(this.props)){const g=this.props,f=g[g.length-1];e=parseInt(f.offset.toString())+parseInt(f.limit.toString())}else{const g=[];g.resultCount=this.resultCount,g.lastFetchedData=t?.detail.fetchedData||{},this.props=g}i>0&&t&&!this.localStorage&&(this.limit=Math.round(this.limit/i*this.targetRequestDuration)),this.limit<1&&(this.limit=1),this.limit>15&&(this.limit=15);let r=this.dataProviderExpression.replace("$offset",e+"").replace("$limit",this.limit+"");const n=r.split("?");let o=n.shift();const c=new URLSearchParams(n.join("?")),d=this.filterPublisher?.get(),b=this.filteredFields.split(" ");for(const g in d)this.filteredFields&&b.includes(g)||d[g]==null||d[g]==""||c.set(g,d[g]);this.searchHash||(this.searchHash=c.toString()),o=o+"?"+c.toString(),r=r+"_item_from_queue_"+this.instanceId,this.listDataProviders.push(r);const k=[...this.props,{id:c.toString()+"/"+this.props.length,dataProvider:r,endPoint:o,offset:e,limit:this.limit}];k.resultCount=this.resultCount,k.lastFetchedData=t?.detail.fetchedData||{},this.props=k,this.lastRequestTime=new Date().getTime()}render(){if(this.isSafari()&&(this.scrollRoot=this.resolveScrollRoot(),this.ensureScrollSync()),!Array.isArray(this.props))return te;let t=!this.noLazyload;return this.props.length==1&&(t=!1),this.style.display="block",j`
|
|
1235
|
+
${Fa(this.props,(e,s)=>{const i=s==0?this.templates:this.templates?.filter(r=>r.getAttribute("data-value")!="no-item");return j`
|
|
1234
1236
|
<sonic-list
|
|
1235
1237
|
fetch
|
|
1236
1238
|
loader="${this.loader}"
|
|
@@ -1249,43 +1251,43 @@
|
|
|
1249
1251
|
dataProvider="${e.dataProvider}"
|
|
1250
1252
|
endPoint="${e.endPoint}"
|
|
1251
1253
|
idKey=${this.idKey}
|
|
1252
|
-
.templates=${
|
|
1254
|
+
.templates=${i}
|
|
1253
1255
|
.items=${this.items}
|
|
1254
1256
|
.noItems=${s==0?this.noItems:void 0}
|
|
1255
1257
|
.skeleton=${this.skeleton}
|
|
1256
1258
|
>
|
|
1257
1259
|
</sonic-list>
|
|
1258
1260
|
`})}
|
|
1259
|
-
`}};
|
|
1261
|
+
`}};st.instanceCounter=0,ut([h({type:Array})],st.prototype,"templates",2),ut([h({type:Function,attribute:!1})],st.prototype,"items",2),ut([h({type:Function,attribute:!1})],st.prototype,"noItems",2),ut([h({type:Function,attribute:!1})],st.prototype,"skeleton",2),ut([h({type:Object})],st.prototype,"itemPropertyMap",2),ut([h()],st.prototype,"cache",2),ut([h()],st.prototype,"targetRequestDuration",2),ut([h()],st.prototype,"limit",2),ut([h()],st.prototype,"lazyBoundsRatio",2),ut([h()],st.prototype,"offset",2),ut([h()],st.prototype,"resultCount",2),ut([h({type:Boolean})],st.prototype,"noLazyload",2),ut([h({type:String})],st.prototype,"loader",2),ut([h()],st.prototype,"filteredFields",2),ut([h({type:String})],st.prototype,"dataProviderExpression",2),ut([h({type:Boolean})],st.prototype,"invalidateOnPageShow",2),ut([h({type:String})],st.prototype,"idKey",2),st=ut([X(ku)],st);var $u=Object.defineProperty,Du=Object.getOwnPropertyDescriptor,wr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Du(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&$u(e,s,r),r};const Eu="sonic-submit";let Ts=class extends Ct(J){constructor(){super(...arguments),this.submitResultKey=null,this.disabled=!1,this.endPoint=null,this.name="",this.value="",this.api=null,this.clickTimeStamp=0,this.submit=async t=>{if(this.disabled||t instanceof KeyboardEvent&&t.key!=="Enter")return;t instanceof MouseEvent&&t.stopPropagation();const e=ve.getInstance().get(this.getAncestorAttributeValue("formDataProvider"));if(e.isFormValid.set(!0),e.invalidateForm(),!e.isFormValid.get())return;if(this.disabled=!0,ht.show(),e.isFormValid,this.hasAttribute("native")){this.submitNativeForm(),ht.hide(),this.disabled=!1;return}const i=this.getAttribute("method")?.toLocaleLowerCase()||"post",r=this.hasAttribute("sendAsFormData"),n=e.get();delete n.isFormValid;const o=this.getAncestorAttributeValue("headersDataProvider"),c=o?ve.getInstance().get(o):null;let d={};c&&(d=c.get());let b=null;const k=this.getAncestorAttributeValue("dataProvider"),g=this.endPoint||k,f=async()=>{const E={...n};if(delete E.needsCaptchaValidation,delete d.needsCaptchaValidation,r)b=await this.api?.submitFormData(g,E,i,d);else switch(i){case"put":b=await this.api?.put(g,E,d);break;case"patch":b=await this.api?.patch(g,E,d);break;case"delete":b=await this.api?.delete(g,E,d);break;case"get":const y=new URLSearchParams;if(E)for(const C in E)y.append(C,E[C]);const N="?"+y.toString();b=await this.api?.get(g+N,d);break;default:b=await this.api?.post(g,E,d);break}ht.hide(),b?b._sonic_http_response_&&!b._sonic_http_response_.ok&&Object.keys(b).length===1&&(b.messages=[{content:"Network Error",status:"error"}]):b={messages:[{content:"Network Error",status:"error"}]};const O=this.getAncestorAttributeValue("clearedDataOnSuccess");O&&O.split(" ").forEach(y=>ve.get(y).set({}));const I=this.hasAttribute("usernameKey")?this.getAttribute("usernameKey"):"username",U=this.hasAttribute("passwordKey")?this.getAttribute("passwordKey"):"password";this.api?.lastResult?.ok&&E[I]&&E[U]&&this.saveCredentials(E[I],E[U]),this.submitResultKey&&(b=at.traverse(b,this.submitResultKey.split("."),!0));const S=this.getAncestorAttributeValue("submitResultDataProvider");S&&ve.get(S).set(b),this.disabled=!1,this.dispatchEvent(new CustomEvent("submit",{detail:b,bubbles:!0,composed:!0}))},A=c?.needsCaptchaValidation.get()?c:e.needsCaptchaValidation.get()?e:null;if(A){A.captchaToken.set("request_token");const E=O=>{O!="request_token"?(f(),A.captchaToken.offAssign(E)):(ht.hide(),this.disabled=!1)};A.captchaToken.onAssign(E)}else f()}}connectedCallback(){this.hasAttribute("onClick")&&this.addEventListener("click",this.submit),this.hasAttribute("onEnterKey")&&this.addEventListener("keydown",this.submit),super.connectedCallback(),this.api=new Ds(this.getApiConfiguration())}submitNativeForm(){const t=gs.getClosestForm(this);if(!t)return;const e=this.getAncestorAttributeValue("formDataProvider"),s={...ve.get(e).get()};delete s.needsCaptchaValidation;for(const r in s){if(r=="isFormValid")continue;let n=t.querySelector('input[name="'+r+'"], select[name="'+r+'"], textarea[name="'+r+'"]');n||(n=document.createElement("input"),n.type="hidden",n.name=r,t.appendChild(n));let o=s[r];Array.isArray(o)&&(o=o.join(",")),n.type==="checkbox"||n.type==="radio"?o&&(n.checked=!0):n.value=o}const i=document.createElement("input");i.name=this.name,i.style.display="none",i.value=this.value,i.type="submit",t.appendChild(i),i&&i.click()}async saveCredentials(t,e){if("PasswordCredential"in window){const s=new window.PasswordCredential({id:t,password:e});await navigator.credentials.store(s)}}render(){return j`<div ?data-disabled=${this.disabled}><slot></slot></div>`}};Ts.styles=ee`
|
|
1260
1262
|
[data-disabled] {
|
|
1261
1263
|
opacity: 0.3;
|
|
1262
1264
|
pointer-events: none;
|
|
1263
1265
|
user-select: none;
|
|
1264
1266
|
}
|
|
1265
|
-
`,wr([
|
|
1267
|
+
`,wr([h({type:String})],Ts.prototype,"submitResultKey",2),wr([h({type:Boolean})],Ts.prototype,"disabled",2),wr([h({type:String})],Ts.prototype,"endPoint",2),wr([h()],Ts.prototype,"name",2),wr([h()],Ts.prototype,"value",2),Ts=wr([X(Eu)],Ts);var Ou=Object.defineProperty,Tu=Object.getOwnPropertyDescriptor,Jr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Tu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ou(e,s,r),r};const Lu="sonic-router";let _r=class extends Ur(J){constructor(){super(...arguments),this.templateValueAttribute="data-route",this._location=document.location.href.replace(document.location.origin,"")}createRenderRoot(){return this}connectedCallback(){ct.onChange(this),super.connectedCallback()}disconnectedCallback(){ct.offChange(this),super.disconnectedCallback()}set location(t){this._location=t,this.requestUpdate()}get location(){return this._location}get cleanLocation(){const t=new URL(this.location,document.location.origin);return t.pathname+t.hash}get patternBasePath(){return this.basePath!==void 0?this.basePath:"(/)*"}get regExpBasePath(){return this.basePath!==void 0?"^"+this.basePath:""}handleroutes(){if(!this.routes)return[];const t=[];for(let[e,s]of Object.entries(this.routes)){if(e==="fallback"||!s)continue;const i=new RegExp(this.regExpBasePath+e);if(i.test(this.cleanLocation)){const r=i.exec(this.cleanLocation)||[e];r.shift(),t.push(s([...r]))}else try{const n=new ps(this.patternBasePath+e).match(this.cleanLocation);if(n){const o=n||{};t.push(s(o))}}catch{this.cleanLocation.indexOf((this.basePath||"")+e.replace(document.location.origin,""))!=-1&&t.push(s({}))}}return t.length==0&&this.routes?.fallback&&this.isConnected&&t.push(this.routes.fallback()),t}render(){const t=this.handleroutes();if(t.length>0)return j`${t}`;const e=[];for(const s of this.templatePartsList){const i=s.getAttribute(this.templateValueAttribute)||"";if(new RegExp(this.regExpBasePath+i).test(this.cleanLocation))e.push(s);else try{new ps(this.patternBasePath+i+"(/*)").match(this.cleanLocation)&&(s.setAttribute("mode","patternMatching"),e.push(s))}catch{this.cleanLocation.indexOf((this.basePath||"")+i.replace(document.location.origin,""))!=-1&&e.push(s)}}if(e.length==0){this.fallBackRoute&&this.isConnected&&(document.location.href=this.fallBackRoute);const s=this.templateList.find(i=>i.hasAttribute("data-fallback"));s&&e.push(s)}return j`${Ii(e,(s,i)=>i+new Date().getTime(),s=>{if(s.title&&(document.title=s.title),s.hasAttribute("dataProviderExpression")){let i="";const r=s.getAttribute("dataProviderExpression")||"";if(s.getAttribute("mode")=="patternMatching"){const n=new ps("(/)*"+(s.getAttribute(this.templateValueAttribute)||"")+"*");i=new ps(r).stringify(n.match(this.cleanLocation))}else{const n=new RegExp(s.getAttribute(this.templateValueAttribute)||""),o=(this.cleanLocation+"").match(n);o&&(i=o.shift()?.replace(n,r)||"")}return j`<div
|
|
1266
1268
|
style="display:contents"
|
|
1267
|
-
dataProvider="${
|
|
1269
|
+
dataProvider="${i}"
|
|
1268
1270
|
>
|
|
1269
1271
|
${rs(s)}
|
|
1270
|
-
</div>`}return rs(s)})}`}};Jr([
|
|
1272
|
+
</div>`}return rs(s)})}`}};Jr([h({type:String})],_r.prototype,"fallBackRoute",2),Jr([h({type:Object,attribute:!1})],_r.prototype,"routes",2),Jr([h({type:String})],_r.prototype,"basePath",2),Jr([h()],_r.prototype,"location",1),_r=Jr([X(Lu)],_r);var Mu=Object.getOwnPropertyDescriptor,Nu=(t,e,s,i)=>{for(var r=i>1?void 0:i?Mu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Iu="sonic-redirect";let Ra=class extends Ct(J){connectedCallback(){this.noShadowDom="",this.style.display="none",super.connectedCallback(),this.udpateCallBack=()=>this.update(),this.publisher&&this.publisher.onInternalMutation(this.udpateCallBack)}disconnectedCallback(){this.publisher&&this.publisher.offInternalMutation(this.udpateCallBack),super.disconnectedCallback()}update(){if(this.hasAttribute("onAdded")){ct.changeFromComponent(this);return}if(!this.props)return;const t=this.getAttribute("onData").split("."),e=at.traverse(this.props,t);e&&!(at.isObject(e)&&e)&&ct.changeFromComponent(this)}};Ra=Nu([X(Iu)],Ra);var Fu=Object.defineProperty,Ru=Object.getOwnPropertyDescriptor,qi=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ru(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Fu(e,s,r),r};const ju="sonic-states";let Xr=class extends Ct(Ur(J)){constructor(){super(...arguments),this.state="",this.inverted=!1,this.statePath="",this.onStateAssign=t=>{this.state=t,this.requestUpdate()}}connectedCallback(){if(this.noShadowDom="",super.connectedCallback(),this.hasAttribute("data-path")&&(this.statePath=this.getAttribute("data-path")),this.statePath){this.statePublisher=this.publisher;const t=this.statePath.split(".");for(const e of t)this.statePublisher=this.statePublisher[e];this.statePublisher.onAssign(this.onStateAssign)}}disconnectedCallback(){this.statePath&&this.statePublisher?.offAssign(this.onStateAssign),super.disconnectedCallback()}handleStates(t){if(!this.states)return[];const e=[];for(const[s,i]of Object.entries(this.states)){if(s==="fallback"||!i)continue;const r=new RegExp(s);if(r.test(t)){const n=r.exec(t)||[s];n.shift(),e.push(i([...n]))}else try{const n=new ps("(/)*"+s+"*");if(n.match(t)){const o=n.match(t)||{};e.push(i(o))}}catch{t.indexOf(s.replace(document.location.origin,""))!=-1&&e.push(i({}))}}return e.length==0&&this.states?.fallback&&this.isConnected&&e.push(this.states.fallback()),e}render(){let t=this.state;(!Array.isArray(t)&&at.isObject(t)||t===void 0)&&(t="");const e=this.handleStates(t);if(e.length>0)return j`${e}`;const s=[];for(const i of this.templatePartsList){let r=i.getAttribute(this.templateValueAttribute),n=t;if(this.inverted&&(n=r,r=t),r==""&&(r=this.inverted?".*?":"^$"),new RegExp(r).test(n+""))s.push(i),i.removeAttribute("mode");else{const c=new ps(r);c.names.length>0&&c.match(n)&&(i.setAttribute("mode","patternMatching"),s.push(i))}}return j`${Ii(s,(i,r)=>r+new Date().getTime(),i=>{if(i?.hasAttribute("dataProviderExpression")){const r=i.getAttribute("dataProviderExpression");let n="",o=t,c=i.getAttribute(this.templateValueAttribute);if(this.inverted&&(o=c,c=t),c==""&&(c=this.inverted?"*":"^$"),i.getAttribute("mode")=="patternMatching"){const d=new ps(c);n=new ps(r).stringify(d.match(o))}else{const d=new RegExp(c),b=(o+"").match(d);b&&(n=b.shift()?.replace(d,r))}return j`<div
|
|
1271
1273
|
style="display:contents"
|
|
1272
1274
|
dataProvider="${n}"
|
|
1273
1275
|
>
|
|
1274
|
-
${rs(
|
|
1275
|
-
</div>`}return rs(r)})}`}};Ui([u()],Xr.prototype,"state",2),Ui([u({type:Boolean,reflect:!0})],Xr.prototype,"inverted",2),Ui([u({type:Object})],Xr.prototype,"states",2),Xr=Ui([X(Uh)],Xr);var qh=Object.getOwnPropertyDescriptor,Vh=(t,e,s,r)=>{for(var i=r>1?void 0:r?qh(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=o(i)||i);return i};const Bh="sonic-scope";let ja=class extends J{createRenderRoot(){return this}render(){return R`<slot></slot>`}};ja=Vh([X(Bh)],ja);function Ra(t){return t instanceof HTMLElement||t instanceof ShadowRoot?t:null}function za(t){if(!t||typeof t.get!="function")return null;const e=t.get();return!e||typeof e!="object"||!("serviceURL"in e)?null:e}function Zn(t){const e=Ra(t);return e?Je.getApiConfiguration(e):null}function Jn(t){return typeof t?.serviceURL=="string"&&t.serviceURL.length>0}const Hh=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function Wh(t){return t instanceof HTMLElement&&typeof t.updateComplete<"u"}function Ua(t){let e=null,s=[];return()=>{const r=new Promise((i,n)=>{s.push({resolve:i,reject:n})});return e!==null||(e=requestAnimationFrame(()=>{e=null;const i=s;s=[],t().then(n=>i.forEach(({resolve:o})=>o(n)),n=>i.forEach(({reject:o})=>o(n)))})),r}}function qa(t,e){if(Wh(t)){let s=!1;return t.updateComplete.then(()=>{s||e()}),()=>{s=!0}}return e(),()=>{}}function Va(t,e){const s=Ra(t);if(!s)return()=>{};let r=!1;const i=()=>{r||Jn(Zn(t))&&(r=!0,e())};if(i(),r)return()=>{};const n=[],o=requestAnimationFrame(()=>i());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>i());const c=new MutationObserver(()=>i());let h=s;for(;h;)h instanceof Element&&c.observe(h,{attributes:!0,attributeFilter:[...Hh]}),h=h.parentNode||h.host;return n.push(()=>c.disconnect()),()=>{r=!0,n.forEach(b=>b())}}class Ba{constructor(){this.bindings=new WeakMap}bind(e,s){const r={run:s};let i=this.bindings.get(e);return i||(i=new Set,this.bindings.set(e,i)),i.add(r),()=>{const n=this.bindings.get(e);n&&(n.delete(r),n.size===0&&this.bindings.delete(e))}}run(e){const s=[...this.bindings.get(e)??[]].map(({run:r})=>r());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}let Ha=0;function Kh(t){return t!==null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function Wa(t,e){const s=e?.when??"after";return(r,i,n)=>{const o=n.value;if(!o)return;const c=function(...h){if(s==="before")return t(this).then(()=>o.apply(this,h));const b=o.apply(this,h);return Kh(b)?b.then(k=>t(this).then(()=>k)):t(this).then(()=>b)};n.value=c}}function Yh(t,e){return Wa(s=>t.refetch(s),e)}function Gh(t,e){return Wa(s=>t.send(s),e)}function qi(t){t.configPublisher&&t.configMutationHandler&&t.configPublisher.offInternalMutation(t.configMutationHandler),t.configPublisher=null,t.configMutationHandler=null}function Ka(t,e,s){const r=t.path,i=Ya(e)?void 0:e,n=Ya(e)?e:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},c=i?.path,h=n?.triggerKey?.path,b=Ut(r),k=c?Ut(c):[],g=h?Ut(h):[],f=[...new Set([...b,...k,...g])],A=b.length>0,E=!!c,O=n?.refetchEveryMs??0,N=new Ba,U=new WeakMap,P=new WeakSet,y=new WeakMap;let I;const C=function($,G,z){if(z){const se=z.value;if(!se)return;C.registerResultHandler($,(ie,q)=>se.call(ie,q));return}if(!$)return;if(P.has($)){y.get($)?.add(G);return}P.add($),y.set($,new Set([G])),Js($);const ne=`__get_state_${G}`;$.__onConnected__(se=>{const ie=se;let q=ie[ne];q||(q={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:O},ie[ne]=q),q.cleanupOperation?.(),q.cleanupOperation=null,q.cleanupWatchers.forEach(Pe=>Pe()),q.cleanupWatchers=[],q.requestGeneration++,q.refetchEveryMs=O,Pr(q);const le=()=>{Pr(q),!(!q.refetchEveryMs||q.refetchEveryMs<=0)&&(q.refetchTimeoutId=setTimeout(()=>{q.refetchTimeoutId=null,Ue().catch(()=>{})},q.refetchEveryMs))},pe=Pe=>{y.get($)?.forEach(m=>{ie[m]=Pe})},Ue=async()=>{const Pe=A?Ot(se,r,o):{ready:!0,path:r};if(!Pe.ready||!Pe.path){pe(void 0),le();return}let m=null;if(E&&c){const _e=Ot(se,c,o);if(!_e.ready||!_e.path){pe(void 0),le();return}const De=Gt(_e.path);m=za(De)}else m=Zn(se);if(!Jn(m)){if(!E&&!q.scopeWatchCleanup){const _e=Va(se,me);q.scopeWatchCleanup=_e,q.cleanupWatchers.push(()=>{_e(),q.scopeWatchCleanup=null})}le();return}const _=++q.requestGeneration,ye=await new Ds(m).getDetailed(Pe.path);return _!==q.requestGeneration||(y.get($)?.forEach(_e=>{ie[_e]=ye}),le(),U.get($)?.forEach(_e=>_e(se,ye))),ye},ue=Ua(Ue),me=()=>{ue().catch(()=>{})};q.cleanupOperation=N.bind(se,ue);const ke=()=>{if(Vi(q),!h)return;const Pe=Ot(se,h,o);if(!Pe.ready||!Pe.path)return;const m=Gt(Pe.path);if(!m)return;const _=me;m.onInvalidate(_),q.triggerPublisher=m,q.triggerInvalidateHandler=_},ce=()=>{if(!E||!c)return;qi(q);const Pe=Ot(se,c,o);if(!Pe.ready||!Pe.path){pe(void 0);return}const m=Gt(Pe.path);if(!m){pe(void 0);return}const _=me;m.onInternalMutation(_),q.configPublisher=m,q.configMutationHandler=_},W=()=>{ke(),ce(),E||me()};if(E||g.length){for(const Pe of f){const m=Es(Os.watcherStore,Os.hooked,se,Pe,()=>W());q.cleanupWatchers.push(m)}W()}else{const Pe=()=>{if(A)for(const m of b){const _=Es(Os.watcherStore,Os.hooked,se,m,me);q.cleanupWatchers.push(_)}ke(),Ue().catch(()=>{})};q.cleanupWatchers.push(qa(se,Pe))}}),$.__onDisconnected__(se=>{const ie=se,q=ie[ne];q&&(q.cleanupOperation?.(),q.cleanupOperation=null,qi(q),Vi(q),Pr(q),q.cleanupWatchers.forEach(le=>le()),q.cleanupWatchers=[],q.requestGeneration++,y.get($)?.forEach(le=>{ie[le]=void 0}))})};return C.refetch=$=>N.run($),C.registerResultHandler=($,G)=>{let z=U.get($);z||(z=new Set,U.set($,z)),z.add(G),P.has($)||(I??=`__get_handler_${Ha++}`,C($,I))},C}function Ya(t){return!t||typeof t!="object"?!1:"skipEmptyPlaceholder"in t||"refetchEveryMs"in t||"triggerKey"in t}function Ga(t){return!t||typeof t!="object"?!1:"refetchEveryMs"in t||"skipIfBodyMissing"in t||"autoPostOnBodyMutation"in t||"skipEmptyPlaceholder"in t||"triggerKey"in t}function Za(t){t.bodyPublisher&&t.bodyMutationHandler&&t.bodyPublisher.offInternalMutation(t.bodyMutationHandler),t.bodyPublisher=null,t.bodyMutationHandler=null}function Vi(t){t.triggerPublisher&&t.triggerInvalidateHandler&&t.triggerPublisher.offInvalidate(t.triggerInvalidateHandler),t.triggerPublisher=null,t.triggerInvalidateHandler=null}function Pr(t){t.refetchTimeoutId&&(clearTimeout(t.refetchTimeoutId),t.refetchTimeoutId=null)}function Zh(t){if(!(!t||typeof t.get!="function"))return t.get()}function Xn(t,e){return function(s,r,i,n){const o=s.path,c=r.path,h=Ga(i)?void 0:i,b=Ga(i)?i:n,k=h?.path,g=b?.triggerKey?.path,f=Ut(o),A=Ut(c),E=k?Ut(k):[],O=g?Ut(g):[],N=[...new Set([...f,...A,...E,...O])],U=f.length>0,P=!!k,y=b?.refetchEveryMs??0,I=b?.skipIfBodyMissing??!0,C=b?.autoPostOnBodyMutation??!0,$={skipEmptyPlaceholder:b?.skipEmptyPlaceholder},G=`__${t.toLowerCase()}_state_`,z=new Ba,ne=new WeakMap,se=new WeakSet,ie=new WeakMap;let q;const le=function(pe,Ue,ue){if(ue){const ke=ue.value;if(!ke)return;le.registerResultHandler(pe,(ce,W)=>ke.call(ce,W));return}if(!pe)return;if(se.has(pe)){ie.get(pe)?.add(Ue);return}se.add(pe),ie.set(pe,new Set([Ue])),Js(pe);const me=`${G}${Ue}`;pe.__onConnected__(ke=>{const ce=ke;let W=ce[me];W||(W={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:y,skipIfBodyMissing:I,autoPostOnBodyMutation:C},ce[me]=W),W.cleanupOperation?.(),W.cleanupOperation=null,W.cleanupWatchers.forEach(D=>D()),W.cleanupWatchers=[],W.requestGeneration++,W.refetchEveryMs=y,W.skipIfBodyMissing=I,W.autoPostOnBodyMutation=C,Pr(W);const Pe=()=>{Pr(W),!(!W.refetchEveryMs||W.refetchEveryMs<=0)&&(W.refetchTimeoutId=setTimeout(()=>{W.refetchTimeoutId=null,_().catch(()=>{})},W.refetchEveryMs))},m=D=>{ie.get(pe)?.forEach(j=>{ce[j]=D})},_=async()=>{const D=U?Ot(ke,o,$):{ready:!0,path:o};if(!D.ready||!D.path){m(void 0),Pe();return}const j=Ot(ke,c,$);if(!j.ready||!j.path){m(void 0),Pe();return}const V=Gt(j.path),H=Zh(V);if(W.skipIfBodyMissing&&H==null){Pe();return}let F=null;if(P&&k){const ge=Ot(ke,k,$);if(!ge.ready||!ge.path){m(void 0),Pe();return}const fe=Gt(ge.path);F=za(fe)}else F=Zn(ke);if(!Jn(F)){if(!P&&!W.scopeWatchCleanup){const ge=Va(ke,ye);W.scopeWatchCleanup=ge,W.cleanupWatchers.push(()=>{ge(),W.scopeWatchCleanup=null})}Pe();return}const Y=++W.requestGeneration,ae=new Ds(F);let xe;try{xe=await e(ae,D.path,H)}catch(ge){throw Y===W.requestGeneration&&ne.get(pe)?.forEach(fe=>fe(ke,void 0)),ge}return Y!==W.requestGeneration||(m(xe),Pe(),ne.get(pe)?.forEach(ge=>ge(ke,xe))),xe},Q=Ua(_),ye=()=>{Q().catch(()=>{})};W.cleanupOperation=z.bind(ke,Q);const _e=()=>{if(Za(W),!W.autoPostOnBodyMutation)return;const D=Ot(ke,c,$);if(!D.ready||!D.path)return;const j=Gt(D.path);if(!j)return;const V=ye;j.onInternalMutation(V),W.bodyPublisher=j,W.bodyMutationHandler=V},De=()=>{if(Vi(W),!g)return;const D=Ot(ke,g,$);if(!D.ready||!D.path)return;const j=Gt(D.path);if(!j)return;const V=ye;j.onInvalidate(V),W.triggerPublisher=j,W.triggerInvalidateHandler=V},T=()=>{if(!P||!k)return;qi(W);const D=Ot(ke,k,$);if(!D.ready||!D.path){m(void 0);return}const j=Gt(D.path);if(!j){m(void 0);return}const V=ye;j.onInternalMutation(V),W.configPublisher=j,W.configMutationHandler=V},M=()=>{_e(),De(),T(),W.autoPostOnBodyMutation&&ye()};if(P||A.length||O.length){for(const D of N){const j=Es(Os.watcherStore,Os.hooked,ke,D,()=>M());W.cleanupWatchers.push(j)}M()}else{const D=()=>{if(U)for(const j of f){const V=Es(Os.watcherStore,Os.hooked,ke,j,ye);W.cleanupWatchers.push(V)}_e(),De(),W.autoPostOnBodyMutation&&ye()};W.cleanupWatchers.push(qa(ke,D))}}),pe.__onDisconnected__(ke=>{const ce=ke,W=ce[me];W&&(W.cleanupOperation?.(),W.cleanupOperation=null,qi(W),Za(W),Vi(W),Pr(W),W.cleanupWatchers.forEach(Pe=>Pe()),W.cleanupWatchers=[],W.requestGeneration++,ie.get(pe)?.forEach(Pe=>{ce[Pe]=void 0}))})};return le.send=pe=>z.run(pe),le.registerResultHandler=(pe,Ue)=>{let ue=ne.get(pe);ue||(ue=new Set,ne.set(pe,ue)),ue.add(Ue),se.has(pe)||(q??=`__${t.toLowerCase()}_handler_${Ha++}`,le(pe,q))},le}}function Jh(t,e,s,r){return Xn("POST",(i,n,o)=>i.postDetailed(n,o))(t,e,s,r)}function Xh(t,e,s,r){return Xn("PUT",(i,n,o)=>i.putDetailed(n,o))(t,e,s,r)}function Qh(t,e,s,r){return Xn("PATCH",(i,n,o)=>i.patchDetailed(n,o))(t,e,s,r)}const ed=Sa,td=Aa,sd=Ka;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:xa,publish:Sa,subscribe:Aa,onAssing:Tu,handle:Mu,ancestorAttribute:Vn,autoSubscribe:Iu,autoFill:Nu,get:Ka,post:Jh,put:Xh,patch:Qh,refetch:Yh,send:Gh};var rd=Object.defineProperty,id=Object.getOwnPropertyDescriptor,Bi=(t,e,s,r)=>{for(var i=r>1?void 0:r?id(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(i=(r?o(e,s,i):o(i))||i);return r&&i&&rd(e,s,i),i};const Ja=new ki("communes?limit=$limit&fields=nom,code"),Xa=new Ss(Ja.path),nd="sonic-example";let Qr=class extends J{constructor(){super(...arguments),this.limit=5}render(){return R` <span part="api-get-demo">
|
|
1276
|
+
${rs(i)}
|
|
1277
|
+
</div>`}return rs(i)})}`}};qi([h()],Xr.prototype,"state",2),qi([h({type:Boolean,reflect:!0})],Xr.prototype,"inverted",2),qi([h({type:Object})],Xr.prototype,"states",2),Xr=qi([X(ju)],Xr);var zu=Object.getOwnPropertyDescriptor,Uu=(t,e,s,i)=>{for(var r=i>1?void 0:i?zu(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const qu="sonic-scope";let ja=class extends J{createRenderRoot(){return this}render(){return j`<slot></slot>`}};ja=Uu([X(qu)],ja);function za(t){return t instanceof HTMLElement||t instanceof ShadowRoot?t:null}function Ua(t){if(!t||typeof t.get!="function")return null;const e=t.get();return!e||typeof e!="object"||!("serviceURL"in e)?null:e}function Gn(t){const e=za(t);return e?qe.getApiConfiguration(e):null}function Zn(t){return typeof t?.serviceURL=="string"&&t.serviceURL.length>0}const Bu=["serviceURL","serviceurl","token","credentials","tokenProvider","tokenprovider","userName","username","password","eventsApiToken","eventsapitoken"];function Hu(t){return t instanceof HTMLElement&&typeof t.updateComplete<"u"}function qa(t){let e=null,s=[];return()=>{const i=new Promise((r,n)=>{s.push({resolve:r,reject:n})});return e!==null||(e=requestAnimationFrame(()=>{e=null;const r=s;s=[],t().then(n=>r.forEach(({resolve:o})=>o(n)),n=>r.forEach(({reject:o})=>o(n)))})),i}}function Ba(t,e){if(Hu(t)){let s=!1;return t.updateComplete.then(()=>{s||e()}),()=>{s=!0}}return e(),()=>{}}function Ha(t,e){const s=za(t);if(!s)return()=>{};let i=!1;const r=()=>{i||Zn(Gn(t))&&(i=!0,e())};if(r(),i)return()=>{};const n=[],o=requestAnimationFrame(()=>r());n.push(()=>cancelAnimationFrame(o)),queueMicrotask(()=>r());const c=new MutationObserver(()=>r());let d=s;for(;d;)d instanceof Element&&c.observe(d,{attributes:!0,attributeFilter:[...Bu]}),d=d.parentNode||d.host;return n.push(()=>c.disconnect()),()=>{i=!0,n.forEach(b=>b())}}class Va{constructor(){this.bindings=new WeakMap}bind(e,s){const i={run:s};let r=this.bindings.get(e);return r||(r=new Set,this.bindings.set(e,r)),r.add(i),()=>{const n=this.bindings.get(e);n&&(n.delete(i),n.size===0&&this.bindings.delete(e))}}run(e){const s=[...this.bindings.get(e)??[]].map(({run:i})=>i());return s.length===0?Promise.resolve(void 0):s.length===1?s[0]:Promise.all(s).then(()=>{})}}let Wa=0;function Vu(t){return t!==null&&(typeof t=="object"||typeof t=="function")&&typeof t.then=="function"}function Ka(t,e){const s=e?.when??"after";return(i,r,n)=>{const o=n.value;if(!o)return;const c=function(...d){if(s==="before")return t(this).then(()=>o.apply(this,d));const b=o.apply(this,d);return Vu(b)?b.then(k=>t(this).then(()=>k)):t(this).then(()=>b)};n.value=c}}function Wu(t,e){return Ka(s=>t.refetch(s),e)}function Ku(t,e){return Ka(s=>t.send(s),e)}function Bi(t){t.configPublisher&&t.configMutationHandler&&t.configPublisher.offInternalMutation(t.configMutationHandler),t.configPublisher=null,t.configMutationHandler=null}function Ya(t,e,s){const i=t.path,r=Ga(e)?void 0:e,n=Ga(e)?e:s,o={skipEmptyPlaceholder:n?.skipEmptyPlaceholder},c=r?.path,d=n?.triggerKey?.path,b=qt(i),k=c?qt(c):[],g=d?qt(d):[],f=[...new Set([...b,...k,...g])],A=b.length>0,E=!!c,O=n?.refetchEveryMs??0,I=new Va,U=new WeakMap,S=new WeakSet,y=new WeakMap;let N;const C=function($,G,z){if(z){const re=z.value;if(!re)return;C.registerResultHandler($,(ie,q)=>re.call(ie,q));return}if(!$)return;if(S.has($)){y.get($)?.add(G);return}S.add($),y.set($,new Set([G])),Zs($);const ne=`__get_state_${G}`;$.__onConnected__(re=>{const ie=re;let q=ie[ne];q||(q={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:O},ie[ne]=q),q.cleanupOperation?.(),q.cleanupOperation=null,q.cleanupWatchers.forEach(Pe=>Pe()),q.cleanupWatchers=[],q.requestGeneration++,q.refetchEveryMs=O,Sr(q);const le=()=>{Sr(q),!(!q.refetchEveryMs||q.refetchEveryMs<=0)&&(q.refetchTimeoutId=setTimeout(()=>{q.refetchTimeoutId=null,Ue().catch(()=>{})},q.refetchEveryMs))},pe=Pe=>{y.get($)?.forEach(m=>{ie[m]=Pe})},Ue=async()=>{const Pe=A?Ot(re,i,o):{ready:!0,path:i};if(!Pe.ready||!Pe.path){pe(void 0),le();return}let m=null;if(E&&c){const Se=Ot(re,c,o);if(!Se.ready||!Se.path){pe(void 0),le();return}const De=Jt(Se.path);m=Ua(De)}else m=Gn(re);if(!Zn(m)){if(!E&&!q.scopeWatchCleanup){const Se=Ha(re,me);q.scopeWatchCleanup=Se,q.cleanupWatchers.push(()=>{Se(),q.scopeWatchCleanup=null})}le();return}const _=++q.requestGeneration,ye=await new Ds(m).getDetailed(Pe.path);return _!==q.requestGeneration||(y.get($)?.forEach(Se=>{ie[Se]=ye}),le(),U.get($)?.forEach(Se=>Se(re,ye))),ye},he=qa(Ue),me=()=>{he().catch(()=>{})};q.cleanupOperation=I.bind(re,he);const ke=()=>{if(Hi(q),!d)return;const Pe=Ot(re,d,o);if(!Pe.ready||!Pe.path)return;const m=Jt(Pe.path);if(!m)return;const _=me;m.onInvalidate(_),q.triggerPublisher=m,q.triggerInvalidateHandler=_},ce=()=>{if(!E||!c)return;Bi(q);const Pe=Ot(re,c,o);if(!Pe.ready||!Pe.path){pe(void 0);return}const m=Jt(Pe.path);if(!m){pe(void 0);return}const _=me;m.onInternalMutation(_),q.configPublisher=m,q.configMutationHandler=_},W=()=>{ke(),ce(),E||me()};if(E||g.length){for(const Pe of f){const m=Es(Os.watcherStore,Os.hooked,re,Pe,()=>W());q.cleanupWatchers.push(m)}W()}else{const Pe=()=>{if(A)for(const m of b){const _=Es(Os.watcherStore,Os.hooked,re,m,me);q.cleanupWatchers.push(_)}ke(),Ue().catch(()=>{})};q.cleanupWatchers.push(Ba(re,Pe))}}),$.__onDisconnected__(re=>{const ie=re,q=ie[ne];q&&(q.cleanupOperation?.(),q.cleanupOperation=null,Bi(q),Hi(q),Sr(q),q.cleanupWatchers.forEach(le=>le()),q.cleanupWatchers=[],q.requestGeneration++,y.get($)?.forEach(le=>{ie[le]=void 0}))})};return C.refetch=$=>I.run($),C.registerResultHandler=($,G)=>{let z=U.get($);z||(z=new Set,U.set($,z)),z.add(G),S.has($)||(N??=`__get_handler_${Wa++}`,C($,N))},C}function Ga(t){return!t||typeof t!="object"?!1:"skipEmptyPlaceholder"in t||"refetchEveryMs"in t||"triggerKey"in t}function Za(t){return!t||typeof t!="object"?!1:"refetchEveryMs"in t||"skipIfBodyMissing"in t||"autoPostOnBodyMutation"in t||"skipEmptyPlaceholder"in t||"triggerKey"in t}function Ja(t){t.bodyPublisher&&t.bodyMutationHandler&&t.bodyPublisher.offInternalMutation(t.bodyMutationHandler),t.bodyPublisher=null,t.bodyMutationHandler=null}function Hi(t){t.triggerPublisher&&t.triggerInvalidateHandler&&t.triggerPublisher.offInvalidate(t.triggerInvalidateHandler),t.triggerPublisher=null,t.triggerInvalidateHandler=null}function Sr(t){t.refetchTimeoutId&&(clearTimeout(t.refetchTimeoutId),t.refetchTimeoutId=null)}function Yu(t){if(!(!t||typeof t.get!="function"))return t.get()}function Jn(t,e){return function(s,i,r,n){const o=s.path,c=i.path,d=Za(r)?void 0:r,b=Za(r)?r:n,k=d?.path,g=b?.triggerKey?.path,f=qt(o),A=qt(c),E=k?qt(k):[],O=g?qt(g):[],I=[...new Set([...f,...A,...E,...O])],U=f.length>0,S=!!k,y=b?.refetchEveryMs??0,N=b?.skipIfBodyMissing??!0,C=b?.autoPostOnBodyMutation??!0,$={skipEmptyPlaceholder:b?.skipEmptyPlaceholder},G=`__${t.toLowerCase()}_state_`,z=new Va,ne=new WeakMap,re=new WeakSet,ie=new WeakMap;let q;const le=function(pe,Ue,he){if(he){const ke=he.value;if(!ke)return;le.registerResultHandler(pe,(ce,W)=>ke.call(ce,W));return}if(!pe)return;if(re.has(pe)){ie.get(pe)?.add(Ue);return}re.add(pe),ie.set(pe,new Set([Ue])),Zs(pe);const me=`${G}${Ue}`;pe.__onConnected__(ke=>{const ce=ke;let W=ce[me];W||(W={cleanupWatchers:[],cleanupOperation:null,requestGeneration:0,configPublisher:null,configMutationHandler:null,scopeWatchCleanup:null,bodyPublisher:null,bodyMutationHandler:null,triggerPublisher:null,triggerInvalidateHandler:null,refetchTimeoutId:null,refetchEveryMs:y,skipIfBodyMissing:N,autoPostOnBodyMutation:C},ce[me]=W),W.cleanupOperation?.(),W.cleanupOperation=null,W.cleanupWatchers.forEach(D=>D()),W.cleanupWatchers=[],W.requestGeneration++,W.refetchEveryMs=y,W.skipIfBodyMissing=N,W.autoPostOnBodyMutation=C,Sr(W);const Pe=()=>{Sr(W),!(!W.refetchEveryMs||W.refetchEveryMs<=0)&&(W.refetchTimeoutId=setTimeout(()=>{W.refetchTimeoutId=null,_().catch(()=>{})},W.refetchEveryMs))},m=D=>{ie.get(pe)?.forEach(R=>{ce[R]=D})},_=async()=>{const D=U?Ot(ke,o,$):{ready:!0,path:o};if(!D.ready||!D.path){m(void 0),Pe();return}const R=Ot(ke,c,$);if(!R.ready||!R.path){m(void 0),Pe();return}const B=Jt(R.path),V=Yu(B);if(W.skipIfBodyMissing&&V==null){Pe();return}let F=null;if(S&&k){const ge=Ot(ke,k,$);if(!ge.ready||!ge.path){m(void 0),Pe();return}const fe=Jt(ge.path);F=Ua(fe)}else F=Gn(ke);if(!Zn(F)){if(!S&&!W.scopeWatchCleanup){const ge=Ha(ke,ye);W.scopeWatchCleanup=ge,W.cleanupWatchers.push(()=>{ge(),W.scopeWatchCleanup=null})}Pe();return}const Y=++W.requestGeneration,ae=new Ds(F);let xe;try{xe=await e(ae,D.path,V)}catch(ge){throw Y===W.requestGeneration&&ne.get(pe)?.forEach(fe=>fe(ke,void 0)),ge}return Y!==W.requestGeneration||(m(xe),Pe(),ne.get(pe)?.forEach(ge=>ge(ke,xe))),xe},Q=qa(_),ye=()=>{Q().catch(()=>{})};W.cleanupOperation=z.bind(ke,Q);const Se=()=>{if(Ja(W),!W.autoPostOnBodyMutation)return;const D=Ot(ke,c,$);if(!D.ready||!D.path)return;const R=Jt(D.path);if(!R)return;const B=ye;R.onInternalMutation(B),W.bodyPublisher=R,W.bodyMutationHandler=B},De=()=>{if(Hi(W),!g)return;const D=Ot(ke,g,$);if(!D.ready||!D.path)return;const R=Jt(D.path);if(!R)return;const B=ye;R.onInvalidate(B),W.triggerPublisher=R,W.triggerInvalidateHandler=B},T=()=>{if(!S||!k)return;Bi(W);const D=Ot(ke,k,$);if(!D.ready||!D.path){m(void 0);return}const R=Jt(D.path);if(!R){m(void 0);return}const B=ye;R.onInternalMutation(B),W.configPublisher=R,W.configMutationHandler=B},M=()=>{Se(),De(),T(),W.autoPostOnBodyMutation&&ye()};if(S||A.length||O.length){for(const D of I){const R=Es(Os.watcherStore,Os.hooked,ke,D,()=>M());W.cleanupWatchers.push(R)}M()}else{const D=()=>{if(U)for(const R of f){const B=Es(Os.watcherStore,Os.hooked,ke,R,ye);W.cleanupWatchers.push(B)}Se(),De(),W.autoPostOnBodyMutation&&ye()};W.cleanupWatchers.push(Ba(ke,D))}}),pe.__onDisconnected__(ke=>{const ce=ke,W=ce[me];W&&(W.cleanupOperation?.(),W.cleanupOperation=null,Bi(W),Ja(W),Hi(W),Sr(W),W.cleanupWatchers.forEach(Pe=>Pe()),W.cleanupWatchers=[],W.requestGeneration++,ie.get(pe)?.forEach(Pe=>{ce[Pe]=void 0}))})};return le.send=pe=>z.run(pe),le.registerResultHandler=(pe,Ue)=>{let he=ne.get(pe);he||(he=new Set,ne.set(pe,he)),he.add(Ue),re.has(pe)||(q??=`__${t.toLowerCase()}_handler_${Wa++}`,le(pe,q))},le}}function Gu(t,e,s,i){return Jn("POST",(r,n,o)=>r.postDetailed(n,o))(t,e,s,i)}function Zu(t,e,s,i){return Jn("PUT",(r,n,o)=>r.putDetailed(n,o))(t,e,s,i)}function Ju(t,e,s,i){return Jn("PATCH",(r,n,o)=>r.patchDetailed(n,o))(t,e,s,i)}const Xu=Sa,Qu=Pa,ed=Ya;window["concorde-decorator-subscriber"]=window["concorde-decorator-subscriber"]||{},window["concorde-decorator-subscriber"]={bind:_a,publish:Sa,subscribe:Pa,onAssing:$h,handle:Eh,ancestorAttribute:zn,autoSubscribe:Oh,autoFill:Th,get:Ya,post:Gu,put:Zu,patch:Ju,refetch:Wu,send:Ku};var td=Object.defineProperty,sd=Object.getOwnPropertyDescriptor,Vi=(t,e,s,i)=>{for(var r=i>1?void 0:i?sd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&td(e,s,r),r};const Xa=new $i("communes?limit=$limit&fields=nom,code"),Qa=new xs(Xa.path),rd="sonic-example";let Qr=class extends J{constructor(){super(...arguments),this.limit=5}render(){return j` <span part="api-get-demo">
|
|
1276
1278
|
· get: ${JSON.stringify(this.geoCommunesPayload?.result??null)} · HTTP
|
|
1277
1279
|
${this.geoCommunesPayload?.response?.status??"—"} · subscribe:
|
|
1278
1280
|
${JSON.stringify(this.geoCommunesResult??null)}</span
|
|
1279
|
-
>`}};
|
|
1281
|
+
>`}};Vi([h({type:Number})],Qr.prototype,"limit",2),Vi([ed(Xa),Xu(Qa)],Qr.prototype,"geoCommunesPayload",2),Vi([Ce(),Qu(Qa.result)],Qr.prototype,"geoCommunesResult",2),Qr=Vi([X(rd)],Qr);const id={checkbox:{tagName:"sonic-checkbox"},date:{tagName:"sonic-input",attributes:{type:"date"}},fieldset:{tagName:"sonic-fieldset",nodes:[{libraryKey:"formLayout"}],contentElementSelector:"sonic-form-layout"},managed_file:{tagName:"sonic-input",attributes:{variant:"ghost",type:"file"}},password:{tagName:"sonic-input",attributes:{type:"password"}},radio:{tagName:"sonic-radio"},select:{tagName:"sonic-select"},textarea:{tagName:"sonic-textarea"},textfield:{tagName:"sonic-input",attributes:{type:"text"}},hidden:{tagName:"sonic-input",attributes:{type:"hidden"}},button:{tagName:"sonic-button"},form:{tagName:"sonic-submit",attributes:{onEnterKey:!0}},submit:{tagName:"sonic-submit",attributes:{onClick:!0},contentElementSelector:"sonic-button",nodes:[{libraryKey:"button",attributes:{type:"success"},nodes:[{tagName:"sonic-icon",attributes:{name:"check",slot:"prefix"}}]}]},email:{tagName:"sonic-input",attributes:{type:"email"}},formItemContainer:{tagName:"div",attributes:{class:"form-item-container"}},formLayout:{tagName:"sonic-form-layout"},formActions:{tagName:"sonic-form-actions"},passwordHelper:{tagName:"sonic-password-helper"},sameValueHelper:{tagName:"sonic-same-value-helper"},divider:{tagName:"sonic-divider"}};class nd{async transform(e,s){if(this.sduiDescriptor=e,this.sduiDescriptor.library)for(const i in s.library)this.sduiDescriptor.library[i]=s.library[i];for(const i of s.transforms)this.transformAction(i)}transformAction(e){const s=this.getNodesMatchingPatterns(e.patterns,this.sduiDescriptor);this[e.action](e,s)}getNodesMatchingPatterns(e,s){if(!e)return[];if(!s)return[];const i=s.nodes;if(!i)return[];let r=[],n=0;for(const o of e)for(const c of i)this.nodeMatchesPattern(o,c)&&r.push({parent:s,child:c,index:n}),r=r.concat(this.getNodesMatchingPatterns([o],c)),n++;return r}stringMatchesExpression(e,s){return!s||e&&e.match(s)}nodeMatchesPattern(e,s){const i=e,r=s,n=["libraryKey","innerHTML","prefix","suffix","markup"];for(const d of n)if(!this.stringMatchesExpression(r[d],i[d]))return!1;const o=e.attributes,c=s.attributes;if(o&&!c)return!1;if(o){for(const d in o)if(!c||!this.stringMatchesExpression(c[d],o[d]))return!1}return!0}unwrap(e,s){for(const i of s)i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1),i.child.nodes&&i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),0,...i.child.nodes)}wrap(e,s){const i={...e.ui};i.nodes||(i.nodes=[]);let r=0;for(const o of s)i.nodes?.push(o.child),r>0&&o.parent.nodes?.splice(o.parent.nodes.indexOf(o.child),1),r++;const n=s[0]?.parent.nodes?.indexOf(s[0].child);n&&(s[0].parent.nodes?.splice(n,1),s[0].parent.nodes?.splice(n,0,i))}move(e,s){for(const i of s){i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1);let r=[];e.after&&(r=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor)),e.before&&(r=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor));const n=r[0];n&&n.parent.nodes?.splice(n.parent.nodes.indexOf(n.child)+(e.after?1:0),0,i.child)}}remap(e,s){for(const i of s){const r={...e.ui};r.attributes||(r.attributes={});const n=i.child.attributes;if(n)for(const g in n)Object.prototype.hasOwnProperty.call(r.attributes,"key")||(r.attributes[g]=n[g]);const o=["libraryKey","innerHTML","prefix","suffix","markup"],c=i.child,d=r;for(const g of o)!Object.prototype.hasOwnProperty.call(r,g)&&c[g]&&(d[g]=c[g]);r.nodes||(r.nodes=[]);const b=i.child.nodes;if(b)for(const g of b)r.nodes.push(g);const k=i.parent.nodes?.indexOf(i.child)||-1;k!=-1&&(i.parent.nodes?.splice(k,1),i.parent.nodes?.splice(k,0,r))}}delete(e,s){for(const i of s)i.parent.nodes?.splice(i.parent.nodes.indexOf(i.child),1)}insert(e,s){const i=e.after?"after":e.before?"before":"in";s=[],e.after?s=this.getNodesMatchingPatterns([e.after],this.sduiDescriptor):e.before?s=this.getNodesMatchingPatterns([e.before],this.sduiDescriptor):e.in&&(s=this.getNodesMatchingPatterns([e.in],this.sduiDescriptor));const r=s[0];r&&(i=="in"?(r.child.nodes||(r.child.nodes=[]),r.child.nodes.push({...e.ui})):r.parent.nodes?.splice(r.parent.nodes.indexOf(r.child)+(i=="after"?1:0),0,{...e.ui}))}}var od=Object.defineProperty,ad=Object.getOwnPropertyDescriptor,Xn=(t,e,s,i)=>{for(var r=i>1?void 0:i?ad(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&od(e,s,r),r};const ld="sonic-sdui";let Wi=class extends Oa(Qs(J)){constructor(){super(...arguments),this.sduiDescriptor={}}connectedCallback(){this.noShadowDom="",this.displayContents=!0,this.isFetchEnabled=this.hasAttribute("fetch"),super.connectedCallback()}willUpdate(t){this.props==null&&(this.sduiDescriptor={});{const e=this.sduiKey?this.props[this.sduiKey]:this.props;if(this.sduiDescriptor==e)return;this.sduiDescriptor=e,this.updateContents()}super.willUpdate(t)}async updateContents(){if(!this.sduiDescriptor)return;const t={};Object.assign(t,id,this.sduiDescriptor.library),this.sduiDescriptor.library=t,this.loadAssets(),await this.loadLibrary(),await this.transformSDUIDescriptor(),this.parseRootNodes()}removeChildren(){for(;[...this.children].filter(t=>t.nodeName!="SLOT").length>0;)this.removeChild(this.children[0])}loadAssets(){if(this.sduiDescriptor){if(this.sduiDescriptor.js)for(const t of this.sduiDescriptor.js)gs.loadJS(t);if(this.sduiDescriptor.css)for(const t of this.sduiDescriptor.css)gs.loadCSS(t)}}async transformSDUIDescriptor(){if(!this.hasAttribute("transformation"))return;const e=await(await fetch(this.getAttribute("transformation"))).json();await new nd().transform(this.sduiDescriptor,e)}async loadLibrary(){if(!this.hasAttribute("library"))return;const e=await(await fetch(this.getAttribute("library"))).json();this.sduiDescriptor.library=e}parseRootNodes(){if(this.removeChildren(),!this.sduiDescriptor)return;let t=this.sduiDescriptor.nodes;t||(t=[]);const e={tagName:"sonic-toast-message-subscriber",attributes:{}};this.messagesKey&&(e.attributes={subDataProvider:this.messagesKey}),t.push(e),t.forEach(s=>this.appendChild(this.parseChild(s)))}parseChild(t){const e=t.tagName||"div";let{element:s,contentElement:i}=this.handleLibrary(t,e);return this.handleAttributes(t,s),s=this.handleMarkup(t,s),i||(i=s),this.handleChildNodes(t,i,s),this.handleInnerHTML(t,i),t.prefix||t.suffix?this.handlePrefixSuffix(t,s):s}handlePrefixSuffix(t,e){const s=document.createElement("div");return s.innerHTML=(t.prefix||"")+e.outerHTML+(t.suffix||""),s.style.display="contents",s}handleChildNodes(t,e,s){if(t.nodes){const i=t.nodes;for(const r of i){const n=this.parseChild(r);let o=e;r.parentElementSelector&&(o=s.querySelector(r.parentElementSelector)||e),o.shadowRoot?o.shadowRoot.appendChild(n):o.tagName.toLocaleLowerCase()=="template"?o.content.appendChild(n):o.appendChild(n)}}}handleLibrary(t,e){let s,i;if(t.libraryKey&&this.sduiDescriptor.library){s=this.parseChild(this.sduiDescriptor.library[t.libraryKey]||{tagName:"div"});const r=(this.sduiDescriptor.library[t.libraryKey]||{}).contentElementSelector;r&&(i=s.querySelector(r))}else s=document.createElement(e);return{element:s,contentElement:i}}handleAttributes(t,e){const s=t.attributes;for(const i in s){const r=s[i],n=Hr.isObject(r)?JSON.stringify(r):r;e.setAttribute(i,n)}}handleMarkup(t,e){return t.markup&&(e=document.createElement("div"),e.style.display="contents",e.innerHTML=t.markup),e}handleInnerHTML(t,e){if(t.innerHTML)if(t.innerHTML.indexOf("wording_")!=-1){const s=this.getAncestorAttributeValue("wordingProvider");this.api?.post(s,{labels:[t.innerHTML.substring(8)]}).then(i=>{e&&(e.innerHTML+=i)})}else e&&(e.innerHTML+=t.innerHTML)}};Xn([h()],Wi.prototype,"sduiKey",2),Xn([h()],Wi.prototype,"messagesKey",2),Wi=Xn([X(ld)],Wi);var cd=Object.defineProperty,hd=Object.getOwnPropertyDescriptor,el=(t,e,s,i)=>{for(var r=i>1?void 0:i?hd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&cd(e,s,r),r};let Ki=class extends Qs(J){constructor(){super(...arguments),this._composition={},this.listeners=[]}get composition(){return this._composition}set composition(t){this._composition=t,this.updateComposition()}connectedCallback(){super.connectedCallback(),this.updateComposition()}disconnectedCallback(){this.removePublisherListeners(),super.disconnectedCallback()}updateComposition(){this.removePublisherListeners(),this.publisher&&(this.publisher.set({}),this.parseComposition(this.composition,this.publisher))}removePublisherListeners(){const t=this.listeners;this.listeners=[],t.forEach(e=>{this.publisher.offAssign(e.subscriber)})}parseComposition(t,e){if(t)for(const s in t){const i=t[s];if(typeof i=="string"){const r=i.split("."),n=r.shift();if(!n)continue;let o=ve.get(n);o=Hr.traverse(o,r);const c={publisher:o,subscriber:d=>{e[s]=d}};this.listeners.push(c),o.onAssign(c.subscriber),e._proxies_.set(s,o)}else{this.publisher[s]={};const r=new Lr({},e);e._proxies_.set(s,r);const n={publisher:r,subscriber:o=>{e[s]=o}};this.listeners.push(n),r.onAssign(n.subscriber),this.parseComposition(i,r)}}}render(){return j`<slot></slot>`}};Ki.styles=[ee`
|
|
1280
1282
|
:host {
|
|
1281
1283
|
display: contents;
|
|
1282
1284
|
}
|
|
1283
|
-
`],
|
|
1285
|
+
`],el([h({type:Object})],Ki.prototype,"composition",1),Ki=el([X("sonic-mix")],Ki);var ud=Object.defineProperty,dd=Object.getOwnPropertyDescriptor,Pr=(t,e,s,i)=>{for(var r=i>1?void 0:i?dd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ud(e,s,r),r};let Ls=class extends J{constructor(){super(...arguments),this.inputProvider="",this.outputProvider="",this.formDataProvider="",this.expression="",this.outputSchema=null,this.handle=null}connectedCallback(){super.connectedCallback(),this.restart()}disconnectedCallback(){this.handle?.stop(),this.handle=null,super.disconnectedCallback()}updated(t){(t.has("expression")||t.has("inputProvider")||t.has("outputProvider")||t.has("formDataProvider")||t.has("outputSchema"))&&this.restart()}restart(){if(this.handle?.stop(),this.handle=null,!this.isConnected||!this.inputProvider||!this.outputProvider||!this.expression?.trim())return;const t=this.expression,e=this.outputSchema;this.handle=Tc({inputs:{input:new xs(this.inputProvider)},output:new xs(this.outputProvider),variables:this.formDataProvider?new xs(this.formDataProvider):void 0,compute:async({input:s},i)=>{const r=Fc(t),n={...i??{},input:s};let o;try{o=await r.evaluate({},n)}catch(c){const d=c instanceof Error?c.message:String(c);throw new Error(`[sonic-jsonata] Évaluation : ${d}`)}return Rc(o,e),o}})}render(){return j`<slot></slot>`}};Ls.styles=[ee`
|
|
1284
1286
|
:host {
|
|
1285
1287
|
display: contents;
|
|
1286
1288
|
}
|
|
1287
|
-
`],
|
|
1288
|
-
><slot name="suffix"></slot>`}};
|
|
1289
|
+
`],Pr([h({type:String})],Ls.prototype,"inputProvider",2),Pr([h({type:String})],Ls.prototype,"outputProvider",2),Pr([h({type:String})],Ls.prototype,"formDataProvider",2),Pr([h({type:String})],Ls.prototype,"expression",2),Pr([h({type:Object})],Ls.prototype,"outputSchema",2),Ls=Pr([X("sonic-jsonata")],Ls);var pd=Object.getOwnPropertyDescriptor,fd=(t,e,s,i)=>{for(var r=i>1?void 0:i?pd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const gd="sonic-value";let tl=class extends Qs(J){connectedCallback(){this.setAttribute("subDataProvider",this.getAttribute("key")),super.connectedCallback()}render(){return typeof this.props=="object"||this.props===void 0?j`<slot name="prefix"></slot><slot></slot><slot name="suffix"></slot>`:j`${Re(this.props.toString())}<slot name="prefix"></slot><slot></slot
|
|
1290
|
+
><slot name="suffix"></slot>`}};tl=fd([X(gd)],tl);var md=Object.defineProperty,bd=Object.getOwnPropertyDescriptor,Qn=(t,e,s,i)=>{for(var r=i>1?void 0:i?bd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&md(e,s,r),r};const vd="sonic-t";let Yi=class extends J{render(){return this.key?j`${lc(this.key,this.unsafeHTML)}`:te}};Qn([h({type:String})],Yi.prototype,"key",2),Qn([h({type:Boolean})],Yi.prototype,"unsafeHTML",2),Yi=Qn([X(vd)],Yi);var yd=Object.defineProperty,wd=Object.getOwnPropertyDescriptor,ei=(t,e,s,i)=>{for(var r=i>1?void 0:i?wd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&yd(e,s,r),r};const _d="sonic-badge";let er=class extends J{constructor(){super(...arguments),this.type="default",this.variant="default",this.ellipsis=!1}render(){return j`
|
|
1289
1291
|
<slot name="prefix"></slot>
|
|
1290
1292
|
<slot></slot>
|
|
1291
1293
|
<slot name="suffix"></slot>
|
|
@@ -1429,23 +1431,23 @@
|
|
|
1429
1431
|
slot[name="prefix"] {
|
|
1430
1432
|
flex-shrink: 0;
|
|
1431
1433
|
}
|
|
1432
|
-
`],ei([
|
|
1434
|
+
`],ei([h({type:String,reflect:!0})],er.prototype,"type",2),ei([h({type:String,reflect:!0})],er.prototype,"variant",2),ei([h({type:String,reflect:!0})],er.prototype,"size",2),ei([h({type:Boolean,reflect:!0})],er.prototype,"ellipsis",2),er=ei([X(_d)],er);class Sd{static fixBlankLink(e){const i=typeof require>"u"||typeof process!="object"?null:require("electron");e.target=="_blank"&&e.addEventListener("click",()=>{i?.shell.openExternal(e.href)})}}var Pd=Object.defineProperty,xd=Object.getOwnPropertyDescriptor,xr=(t,e,s,i)=>{for(var r=i>1?void 0:i?xd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Pd(e,s,r),r};const Ad="sonic-link";let Ms=class extends J{constructor(){super(...arguments),this.href="",this._location="",this.ariaLabel=null,this.autoActive="partial",this._target=null,this.pushState=null}get location(){return this._location}set location(t){this._location=t,ct.updateComponentActiveState(this)}connectedCallback(){this.href&&this.href.indexOf("http")!=0&&(ct.onChange(this),this.location=document.location.href.replace(document.location.origin,"")),this.addEventListener("keypress",t=>{t.key==="Enter"&&this.shadowRoot?.querySelector("a")?.click()}),this.setFocusable(),super.connectedCallback()}setFocusable(){this.href?this.setAttribute("tabIndex","0"):this.removeAttribute("tabIndex")}disconnectedCallback(){ct.offChange(this),super.disconnectedCallback()}set target(t){this._target=t,Sd.fixBlankLink(this),this.requestUpdate()}get target(){return this._target}handlePushState(t){t.preventDefault(),ct.changeFromComponent(this)}updated(t){t.has("href")&&this.setFocusable()}render(){return this.href?j`
|
|
1433
1435
|
<a
|
|
1434
1436
|
href="${this.href}"
|
|
1435
|
-
aria-label=${this.ariaLabel||
|
|
1436
|
-
target=${
|
|
1437
|
+
aria-label=${this.ariaLabel||te}
|
|
1438
|
+
target=${se(this.target)}
|
|
1437
1439
|
@click=${this.pushState?this.handlePushState:null}
|
|
1438
1440
|
>
|
|
1439
1441
|
<slot></slot>
|
|
1440
1442
|
</a>
|
|
1441
|
-
`:
|
|
1443
|
+
`:j`<slot></slot>`}};Ms.styles=[ee`
|
|
1442
1444
|
a {
|
|
1443
1445
|
color: inherit;
|
|
1444
1446
|
text-decoration: none;
|
|
1445
1447
|
display: contents;
|
|
1446
1448
|
}
|
|
1447
|
-
`],
|
|
1448
|
-
<progress value=${
|
|
1449
|
+
`],xr([h({type:String})],Ms.prototype,"href",2),xr([h({type:String,attribute:"data-aria-label"})],Ms.prototype,"ariaLabel",2),xr([h({type:String})],Ms.prototype,"autoActive",2),xr([h({type:String})],Ms.prototype,"target",1),xr([h({type:Boolean})],Ms.prototype,"pushState",2),Ms=xr([X(Ad)],Ms);var Cd=Object.defineProperty,kd=Object.getOwnPropertyDescriptor,Ar=(t,e,s,i)=>{for(var r=i>1?void 0:i?kd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Cd(e,s,r),r};const $d="sonic-progress";let Ns=class extends J{constructor(){super(...arguments),this.max=100,this.invert=!1,this.type="default"}render(){return j`
|
|
1450
|
+
<progress value=${se(this.value)} max=${this.max}></progress>
|
|
1449
1451
|
<div class="slot-container">
|
|
1450
1452
|
<slot></slot>
|
|
1451
1453
|
<slot name="remaining"></slot>
|
|
@@ -1562,7 +1564,7 @@
|
|
|
1562
1564
|
gap: 0.5em;
|
|
1563
1565
|
margin-top: 0.15em;
|
|
1564
1566
|
}
|
|
1565
|
-
`],Ar([
|
|
1567
|
+
`],Ar([h({type:Number})],Ns.prototype,"value",2),Ar([h({type:Number})],Ns.prototype,"max",2),Ar([h({type:Boolean})],Ns.prototype,"invert",2),Ar([h({type:String,reflect:!0})],Ns.prototype,"type",2),Ar([h({type:String,reflect:!0})],Ns.prototype,"size",2),Ns=Ar([X($d)],Ns);const Dd=ee`
|
|
1566
1568
|
.password-toggle {
|
|
1567
1569
|
color: var(--sc-input-c);
|
|
1568
1570
|
font-size: var(--sc-input-fs);
|
|
@@ -1573,7 +1575,7 @@
|
|
|
1573
1575
|
:host([inlineContent]) .has-suffix .password-toggle {
|
|
1574
1576
|
margin-right: 0;
|
|
1575
1577
|
}
|
|
1576
|
-
`,
|
|
1578
|
+
`,Gi=ee`
|
|
1577
1579
|
:host {
|
|
1578
1580
|
--sc-label-fs: var(--sc-_fs, 1rem);
|
|
1579
1581
|
--sc-label-fw: var(--sc-label-font-weight, 500);
|
|
@@ -1587,14 +1589,14 @@
|
|
|
1587
1589
|
margin-bottom: 0.22em;
|
|
1588
1590
|
display: block;
|
|
1589
1591
|
}
|
|
1590
|
-
`,
|
|
1592
|
+
`,Zi=ee`
|
|
1591
1593
|
.form-description {
|
|
1592
1594
|
color: var(--sc-base-400, var(--sc-base-content, #000));
|
|
1593
1595
|
font-size: 0.85em;
|
|
1594
1596
|
margin-top: 0.2em;
|
|
1595
1597
|
display: block;
|
|
1596
1598
|
}
|
|
1597
|
-
`,
|
|
1599
|
+
`,eo=ee`
|
|
1598
1600
|
* {
|
|
1599
1601
|
box-sizing: border-box;
|
|
1600
1602
|
}
|
|
@@ -1953,21 +1955,21 @@
|
|
|
1953
1955
|
* @license
|
|
1954
1956
|
* Copyright 2018 Google LLC
|
|
1955
1957
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
1956
|
-
*/const
|
|
1958
|
+
*/const to=$s(class extends fr{constructor(t){if(super(t),t.type!==Ks.ATTRIBUTE||t.name!=="class"||t.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(t){return" "+Object.keys(t).filter((e=>t[e])).join(" ")+" "}update(t,[e]){if(this.st===void 0){this.st=new Set,t.strings!==void 0&&(this.nt=new Set(t.strings.join(" ").split(/\s/).filter((i=>i!==""))));for(const i in e)e[i]&&!this.nt?.has(i)&&this.st.add(i);return this.render(e)}const s=t.element.classList;for(const i of this.st)i in e||(s.remove(i),this.st.delete(i));for(const i in e){const r=!!e[i];r===this.st.has(i)||this.nt?.has(i)||(r?(s.add(i),this.st.add(i)):(s.remove(i),this.st.delete(i)))}return It}});var Ed=Object.defineProperty,Od=Object.getOwnPropertyDescriptor,ze=(t,e,s,i)=>{for(var r=i>1?void 0:i?Od(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ed(e,s,r),r};const Td="sonic-input";let Ne=class extends ji(mr(J)){constructor(){super(...arguments),this.readonly=!1,this.inlineContent=!1,this.disableInlineContentFocus=!1,this.showPasswordToggle=!1,this.autoActive=!1,this.active=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1,this.isPassword=!1}connectedCallback(){if(super.connectedCallback(),this.hasSlotOrProps(),this.hasAttribute("sameValueAs")){this.sameValueAsName=this.getAttribute("sameValueAs")||void 0,this.sameValueAsHandle=e=>this.pattern=this.escapeRegExp(e);const t=this.getFormPublisher();if(!t||!this.sameValueAsName)return;t[this.sameValueAsName].onAssign(this.sameValueAsHandle)}this.type=="password"&&(this.isPassword=!0,this.showPasswordToggle=!0,this.inlineContent=!0)}disconnectedCallback(){if(super.disconnectedCallback(),this.hasAttribute("sameValueAs")&&this.sameValueAsName){const t=this.getFormPublisher();if(!t)return;t[this.sameValueAsName].offAssign(this.sameValueAsHandle)}}escapeRegExp(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}willUpdate(t){this.hasSlotOrProps(),this.autoActive&&t.has("value")&&(this.active=!!this.value),super.willUpdate(t)}setSelectionRange(t,e){this.input.setSelectionRange(t,e)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}inlineContentFocus(){!this.inlineContent||this.disableInlineContentFocus||this.input?.focus()}handleChange(t){if(!this.hasAttribute("inputDelayMs")){super.handleChange(t);return}this.changeTimeoutId&&clearTimeout(this.changeTimeoutId),this.changeTimeoutId=setTimeout(()=>super.handleChange(t),parseInt(this.getAttribute("inputDelayMs")||"0"))}togglePasswordVisibility(t){t.preventDefault(),t.stopPropagation(),this.isPassword=!this.isPassword,this._type=this.isPassword?"password":"text"}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix,"no-suffix":!this.hasSuffix,"no-prefix":!this.hasPrefix};return j`
|
|
1957
1959
|
<label for="${this.id||"form-element"}" class="${this.hasLabel?"form-label":"hidden"}"
|
|
1958
|
-
>${this.label?
|
|
1960
|
+
>${this.label?Re(this.label):""}<slot
|
|
1959
1961
|
name="label"
|
|
1960
1962
|
@slotchange=${this.hasSlotOrProps}
|
|
1961
1963
|
></slot
|
|
1962
1964
|
></label>
|
|
1963
1965
|
|
|
1964
|
-
<div @click=${this.inlineContentFocus} class="form-control ${
|
|
1966
|
+
<div @click=${this.inlineContentFocus} class="form-control ${to(t)}">
|
|
1965
1967
|
<div part="content" class="${this.inlineContent?"form-element form-element-wrapper":"contents"}">
|
|
1966
1968
|
<slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
|
|
1967
1969
|
<input
|
|
1968
1970
|
data-form-element
|
|
1969
1971
|
part="input"
|
|
1970
|
-
id=${
|
|
1972
|
+
id=${se(this.id||"form-element")}
|
|
1971
1973
|
part="input"
|
|
1972
1974
|
class="form-element input"
|
|
1973
1975
|
@input=${this.handleChange}
|
|
@@ -1976,25 +1978,25 @@
|
|
|
1976
1978
|
?disabled=${this.disabled}
|
|
1977
1979
|
?readonly=${this.readonly}
|
|
1978
1980
|
?autofocus=${this.autofocus}
|
|
1979
|
-
list=${
|
|
1980
|
-
tabindex=${
|
|
1981
|
-
pattern=${
|
|
1982
|
-
min=${
|
|
1983
|
-
max=${
|
|
1984
|
-
step=${
|
|
1985
|
-
inputmode=${
|
|
1986
|
-
src=${
|
|
1987
|
-
minlength=${
|
|
1988
|
-
maxlength=${
|
|
1989
|
-
placeholder=${
|
|
1981
|
+
list=${se(this.list)}
|
|
1982
|
+
tabindex=${se(this.tabindex)}
|
|
1983
|
+
pattern=${se(this.pattern)}
|
|
1984
|
+
min=${se(this.min)}
|
|
1985
|
+
max=${se(this.max)}
|
|
1986
|
+
step=${se(this.step)}
|
|
1987
|
+
inputmode=${se(this.inputmode)}
|
|
1988
|
+
src=${se(this.src)}
|
|
1989
|
+
minlength=${se(this.minlength)}
|
|
1990
|
+
maxlength=${se(this.maxlength)}
|
|
1991
|
+
placeholder=${se(this.placeholder)}
|
|
1990
1992
|
?required=${this.required}
|
|
1991
|
-
autocomplete=${
|
|
1992
|
-
aria-label=${
|
|
1993
|
-
aria-labelledby=${
|
|
1993
|
+
autocomplete=${se(this.autocomplete)}
|
|
1994
|
+
aria-label=${se(this.ariaLabel)}
|
|
1995
|
+
aria-labelledby=${se(this.ariaLabelledby)}
|
|
1994
1996
|
.name=${this.name}
|
|
1995
1997
|
.value=${this.value}
|
|
1996
1998
|
/>
|
|
1997
|
-
${this.showPasswordToggle?
|
|
1999
|
+
${this.showPasswordToggle?j`<sonic-button
|
|
1998
2000
|
shape="circle"
|
|
1999
2001
|
class="password-toggle"
|
|
2000
2002
|
@click=${this.togglePasswordVisibility}
|
|
@@ -2015,10 +2017,10 @@
|
|
|
2015
2017
|
name="description"
|
|
2016
2018
|
@slotchange=${this.hasSlotOrProps}
|
|
2017
2019
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2018
|
-
>${this.description?
|
|
2020
|
+
>${this.description?j`${Re(this.description)}`:te}</slot>
|
|
2019
2021
|
<slot name="list"></slot>
|
|
2020
2022
|
</div>
|
|
2021
|
-
`}};
|
|
2023
|
+
`}};Ne.styles=[ss,eo,Gi,Zi,Dd,ee`
|
|
2022
2024
|
:host([type="hidden"]) {
|
|
2023
2025
|
appearance: none !important;
|
|
2024
2026
|
display: none !important;
|
|
@@ -2026,7 +2028,7 @@
|
|
|
2026
2028
|
:host > .form-control {
|
|
2027
2029
|
position: relative;
|
|
2028
2030
|
}
|
|
2029
|
-
`],ze([
|
|
2031
|
+
`],ze([h({type:String,reflect:!0})],Ne.prototype,"size",2),ze([h({type:String})],Ne.prototype,"inputmode",2),ze([h({type:String})],Ne.prototype,"list",2),ze([h({type:String})],Ne.prototype,"placeholder",2),ze([h({type:String})],Ne.prototype,"pattern",2),ze([h({type:String})],Ne.prototype,"min",2),ze([h({type:String})],Ne.prototype,"max",2),ze([h({type:Boolean,reflect:!0})],Ne.prototype,"readonly",2),ze([h({type:Number})],Ne.prototype,"step",2),ze([h({type:Number})],Ne.prototype,"minlength",2),ze([h({type:Number})],Ne.prototype,"maxlength",2),ze([h({type:String})],Ne.prototype,"src",2),ze([h({type:Boolean,reflect:!0})],Ne.prototype,"inlineContent",2),ze([h({type:Boolean})],Ne.prototype,"disableInlineContentFocus",2),ze([h({type:Boolean})],Ne.prototype,"showPasswordToggle",2),ze([h({type:Boolean})],Ne.prototype,"autoActive",2),ze([h({type:Boolean,reflect:!0})],Ne.prototype,"active",2),ze([mt({slot:"label",flatten:!0})],Ne.prototype,"slotLabelNodes",2),ze([mt({slot:"description",flatten:!0})],Ne.prototype,"slotDescriptionNodes",2),ze([mt({slot:"suffix",flatten:!0})],Ne.prototype,"slotSuffixNodes",2),ze([mt({slot:"prefix",flatten:!0})],Ne.prototype,"slotPrefixNodes",2),ze([Cs("input")],Ne.prototype,"input",2),ze([Ce()],Ne.prototype,"hasDescription",2),ze([Ce()],Ne.prototype,"hasLabel",2),ze([Ce()],Ne.prototype,"hasSuffix",2),ze([Ce()],Ne.prototype,"hasPrefix",2),ze([Ce()],Ne.prototype,"isPassword",2),Ne=ze([X(Td)],Ne);const sl=ee`
|
|
2030
2032
|
/*OMBRE*/
|
|
2031
2033
|
:host([shadow]) .shadowable,
|
|
2032
2034
|
:host([shadow="md"]) .shadowable,
|
|
@@ -2045,7 +2047,7 @@
|
|
|
2045
2047
|
:host([shadow="none"]) .shadowable {
|
|
2046
2048
|
box-shadow: none;
|
|
2047
2049
|
}
|
|
2048
|
-
`;var
|
|
2050
|
+
`;var Ld=Object.defineProperty,Md=Object.getOwnPropertyDescriptor,is=(t,e,s,i)=>{for(var r=i>1?void 0:i?Md(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ld(e,s,r),r};const Nd="sonic-pop";let dt=class extends J{constructor(){super(...arguments),this.open=!1,this.noToggle=!1,this.inline=!1,this.manual=!1,this.shadow="lg",this.placement="bottom",this.positioningRuns=!1,this.lastContentX=0,this.lastContentY=0,this.resizeObserver=new ResizeObserver(()=>this.computePosition(this.placement)),this.triggerElement=null,this.ancestorsHavingZIndex=new Set,this._handleKeyDown=t=>{t.key==="Escape"&&this.open&&(t.stopPropagation(),this.hide())}}runPositioningLoop(){this.positioningRuns&&(this.positioningRuns=!0,this.computePosition(this.placement),window.requestAnimationFrame(()=>this.runPositioningLoop()))}toggle(t){if(this.open&&this.noToggle)return;const e=t;t.type=="keydown"&&(e.key!="ArrowDown"||this.open)||(this.open||(this.triggerElement=t.target),this.open=!this.open,this.open?this.show():this.hide())}show(){this.setMaxZindex(),this.popContent?.style?.removeProperty("display"),this.open=!0,this.popContent.setAttribute("tabindex","0"),this.popBtn&&this.popContent&&!this.positioningRuns&&(this.positioningRuns=!0,this.lastContentX=0,this.lastContentY=0,this.runPositioningLoop()),this.dispatchEvent(new CustomEvent("show"))}hide(){this.resetZindexes(),this.open=!1,this.popContent.setAttribute("tabindex","-1"),this.positioningRuns=!1,this.triggerElement&&(this.triggerElement.focus(),this.triggerElement=null),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),this.dispatchEvent(new CustomEvent("hide"))}updated(t){super.updated(t),this.open&&this.popContent?.style?.removeProperty("display")}setMaxZindex(){qe.everyAncestors(this,t=>{const e=t;if(!e.className)return!0;if([...e.classList].includes("@container")){const s=e.style;s.zIndex="999999999";const i=getComputedStyle(e);return i.position!=="relative"&&i.position!=="absolute"&&(s.position="relative"),this.ancestorsHavingZIndex.add(t),!1}return!0})}resetZindexes(){this.ancestorsHavingZIndex.forEach(t=>{t.style.removeProperty("position"),t.style.removeProperty("z-index")}),this.ancestorsHavingZIndex.clear()}_handleClosePop(t){const e=t.composedPath(),s=e[0];dt.pops.forEach(i=>{const r=e.includes(i),n=e.includes(i.querySelector('[slot="content"]')),o=qe.getAncestorAttributeValue(s,"data-on-select")==="keep";t.type=="pointerdown"&&r||t.type=="click"&&(r&&o||!n)||i.hide()})}connectedCallback(){super.connectedCallback(),dt.pops.size==0&&(document.addEventListener("pointerdown",this._handleClosePop),document.addEventListener("click",this._handleClosePop),document.addEventListener("keydown",this._handleKeyDown)),dt.pops.add(this)}firstUpdated(t){super.firstUpdated(t),this.resizeObserver.observe(this.popContent)}disconnectedCallback(){this.popContent&&this.resizeObserver.unobserve(this.popContent),super.disconnectedCallback(),dt.pops.delete(this),dt.pops.size==0&&(document.removeEventListener("pointerdown",this._handleClosePop),document.removeEventListener("click",this._handleClosePop),document.removeEventListener("keydown",this._handleKeyDown))}computePosition(t){const e=t.split(" "),s=e[0];let i=e[1];const r=5,n=this.getBoundingClientRect(),c=qe.getScrollableAncestor(this.popContent)?.getBoundingClientRect(),d=Math.max(0,c?.left||0)+r,b=Math.max(0,c?.top||0)+r,k=Math.min(window.innerWidth,c?.right||window.innerWidth)-r,g=Math.min(window.innerHeight,c?.bottom||window.innerHeight)-r,f=n.left,A=n.top;let E=f,O=A,I=this.popContent?.getBoundingClientRect();const U=A-I.height,S=f-I.width,y=f+n.width,N=A+n.height,C=f+(n.width-I.width)*.5,$=A+(n.height-I.height)*.5;switch(s){case"bottom":O=N,i=="center"&&(E=C);break;case"top":O=U,i=="center"&&(E=C);break;case"left":E=S,i=="center"&&(O=$);break;case"right":E=y,i=="center"&&(O=$);break}this.lastContentX+=E-I.x,this.lastContentY+=O-I.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),I=this.popContent?.getBoundingClientRect(),I.x<d&&s=="left"&&(E=y),I.y<b&&s=="top"&&(O=N),I.x+I.width>k&&s=="right"&&(E=S),I.y+I.height>g&&s=="bottom"&&(O=U),this.lastContentX+=E-I.x,this.lastContentY+=O-I.y,Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),I=this.popContent?.getBoundingClientRect(),I.x<d&&(this.lastContentX+=d-I.x),I.y<b&&(this.lastContentY+=b-I.y),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`}),I=this.popContent?.getBoundingClientRect(),I.x+I.width>k&&(this.lastContentX+=k-(I.x+I.width)),I.y+I.height>g&&(this.lastContentY+=g-(I.y+I.height)),Object.assign(this.popContent.style,{left:`${this.lastContentX}px`,top:`${this.lastContentY}px`})}render(){return j`
|
|
2049
2051
|
<slot
|
|
2050
2052
|
@click=${this.manual?()=>{}:this.toggle}
|
|
2051
2053
|
@keydown=${this.manual?()=>{}:this.toggle}
|
|
@@ -2091,31 +2093,30 @@
|
|
|
2091
2093
|
:host([inline]) {
|
|
2092
2094
|
vertical-align: baseline;
|
|
2093
2095
|
}
|
|
2094
|
-
`,
|
|
2096
|
+
`,sl],is([Ce()],dt.prototype,"open",2),is([Cs("slot:not([name=content])")],dt.prototype,"popBtn",2),is([Cs("slot[name=content]")],dt.prototype,"popContent",2),is([h({type:Boolean})],dt.prototype,"noToggle",2),is([h({type:Boolean,reflect:!0})],dt.prototype,"inline",2),is([h({type:Boolean})],dt.prototype,"manual",2),is([h({type:String,reflect:!0})],dt.prototype,"shadow",2),is([h({type:String})],dt.prototype,"placement",2),is([Ce()],dt.prototype,"triggerElement",2),dt=is([X(Nd)],dt);var Id=Object.getOwnPropertyDescriptor,Fd=(t,e,s,i)=>{for(var r=i>1?void 0:i?Id(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Rd="sonic-menu-item";let rl=class extends Me{constructor(){super()}connectedCallback(){this.hasAttribute("variant")||(this.variant="ghost"),this.hasAttribute("type")||(this.type="default"),this.hasAttribute("shape")||(this.shape="block");const t=this.shape==="square"||this.shape==="circle";!this.hasAttribute("align")&&!t&&(this.align="left"),super.connectedCallback()}};rl=Fd([X(Rd)],rl);/**
|
|
2095
2097
|
* @license
|
|
2096
2098
|
* Copyright 2021 Google LLC
|
|
2097
2099
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
2098
|
-
*/class
|
|
2100
|
+
*/class il{constructor(e,{target:s,config:i,callback:r,skipInitial:n}){this.t=new Set,this.o=!1,this.i=!1,this.h=e,s!==null&&this.t.add(s??e),this.l=i,this.o=n??this.o,this.callback=r,window.ResizeObserver?(this.u=new ResizeObserver((o=>{this.handleChanges(o),this.h.requestUpdate()})),e.addController(this)):console.warn("ResizeController error: browser does not support ResizeObserver.")}handleChanges(e){this.value=this.callback?.(e,this.u)}hostConnected(){for(const e of this.t)this.observe(e)}hostDisconnected(){this.disconnect()}async hostUpdated(){!this.o&&this.i&&this.handleChanges([]),this.i=!1}observe(e){this.t.add(e),this.u.observe(e,this.l),this.i=!0,this.h.requestUpdate()}unobserve(e){this.t.delete(e),this.u.unobserve(e)}disconnect(){this.u.disconnect()}}var jd=Object.defineProperty,zd=Object.getOwnPropertyDescriptor,pt=(t,e,s,i)=>{for(var r=i>1?void 0:i?zd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&jd(e,s,r),r};const Ud="data-autocomplete-value",qd="data-autocomplete-label";let Qe=class extends Kn(La(Ta(J))){constructor(){super(...arguments),this.size="md",this.placeholder="",this.filteredFields="",this.readonly=null,this.dataProviderExpression="",this.serviceURL="",this.minSearchLength=3,this.key="",this.searchParameter="",this.propertyName="",this.items=null,this.hasInputPrefix=!1,this._resizeController=new il(this,{}),this.searchText="",this.searchDataProvider="",this.queueFilterDataProvider="",this.initSearchDataProvider="",this.queueDataProvider="",this.initQueueDataProvider="",this.lastValidSearch="",this.providersReady=!1,this.suppressPopOpen=!1,this.filterArmed=!1,this.updateSearchParameter=t=>{if(t==""||t==null){this.isSearchParameter()&&(this.lastValidSearch="",this.setSearchText(""));return}this.queryQueueListItem(this.queueDataProvider,s=>(this.propertyName==="_self"?s:s[this.propertyName||this.name])==t,this.setSearchFromSelection)||!this.queryQueueListItem(this.initQueueDataProvider,i=>(this.propertyName==="_self"?i:i[this.propertyName||this.name])==t,this.setSearchFromSelection)&&this.isSearchParameter()&&(this.lastValidSearch=t,this.setSearchText(String(t)))},this.onSearchPublisherAssign=t=>{const e=t==null?"":String(t);this.searchText!==e&&(this.searchText=e),this.syncQueueFilter(e),this.openPopIfNeeded(e)},this.handleSearchActivity=()=>{const t=String(this.searchPublisher?.get()??this.searchText??"");this.openPopIfNeeded(t,!0)},this.handleSearchKeyUp=t=>{t.ctrlKey||t.metaKey||t.altKey||["Escape","Tab","Enter","ArrowUp","ArrowDown"].includes(t.key)||this.handleSearchActivity()},this.handleSearchKeyDown=t=>{const e=t.composedPath(),s=e.some(o=>o?.tagName==="SONIC-MENU-ITEM");if(s&&(t.key==="Enter"||t.key===" ")){const o=e.find(c=>c?.tagName==="SONIC-MENU-ITEM");if(!o)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o);return}if(s)return;const i=String(this.searchPublisher?.get()??this.searchText??"");if(!this.shouldShowSuggestions(i))return;if(t.key==="Enter"){const o=this.getSuggestionItems();if(!o.length)return;t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(o[0]);return}if(t.key!=="ArrowDown"&&t.key!=="ArrowUp")return;t.preventDefault(),t.stopPropagation(),this.suppressPopOpen=!1,this.popElement?.show(),requestAnimationFrame(()=>this.popElement?.show());const r=this.getSuggestionItems();if(!r.length)return;(t.key==="ArrowDown"?r[0]:r[r.length-1]).focus?.()},this.handleSuggestionPointerDown=t=>{const e=t.composedPath().find(s=>s?.tagName==="SONIC-MENU-ITEM");e&&(t.preventDefault(),t.stopPropagation(),this.selectSuggestionItem(e))},this.initSearchParameter=()=>{this.queryQueueListItem(this.initQueueDataProvider,this.findSelection,this.setSearchFromSelection)},this.findSelection=t=>(this.propertyName==="_self"?t:t[this.propertyName||this.name])==this.value,this.setSearchFromSelection=t=>{this.lastValidSearch=this.propertyName==="_self"?t:t[this.searchParameter||this.propertyName||this.name],this.setSearchText(this.lastValidSearch)},this.handleFocusOut=t=>{const e=t.relatedTarget;this.deepContains(this.popElement,e)||this.deepContains(this,e)||setTimeout(()=>{if(this.suppressPopOpen)return;const s=document.activeElement;!s||this.deepContains(this.popElement,s)||this.deepContains(this,s)||this.popElement?.hide()},0)}}hasSlotOrProps(){this.hasInputPrefix=!!this.slotInputPrefixNodes?.length}searchFieldName(){return this.searchParameter||this.name}isSearchParameter(){return!this.searchParameter||this.searchParameter===this.name}shouldShowSuggestions(t){return(t?.length||0)>=this.minSearchLength||this.minSearchLength===0}isSearchFocused(){const t=document.activeElement;if(!t)return!1;const e=this.renderRoot?.querySelector("sonic-input.form-element");return!!(e&&(t===e||e.contains(t)||e.shadowRoot?.contains(t)))}openPopIfNeeded(t,e=!1){if(!this.suppressPopOpen){if(!this.shouldShowSuggestions(t)){this.popElement?.hide();return}(e||this.isSearchFocused()||this.popElement?.open)&&(this.popElement?.show(),requestAnimationFrame(()=>{if(this.suppressPopOpen)return;const s=String(this.searchPublisher?.get()??this.searchText??"");this.shouldShowSuggestions(s)&&this.popElement?.show()}))}}setSearchText(t){const e=t==null||t===""?"":typeof t=="string"?t:String(t);this.searchText=e,this.searchPublisher&&this.searchPublisher.get()!==e&&this.searchPublisher.set(e),this.syncQueueFilter(e)}syncQueueFilter(t){if(!this.queueFilterPublisher)return;if(this.minSearchLength===0||t.length>=this.minSearchLength){(!this.filterArmed||this.queueFilterPublisher.get()!==t)&&this.queueFilterPublisher.set(t),this.filterArmed=!0;return}this.filterArmed&&(this.filterArmed=!1,this.clearSearchQueueResults())}clearSearchQueueResults(){if(!this.queueDataProvider)return;const t=ve.get(this.queueDataProvider),e=t.get();if(Array.isArray(e))for(const s of e)s?.dataProvider&&ve.getInstance().delete(s.dataProvider);t.set([])}applySuggestion(t,e){this.suppressPopOpen=!0;const s=t,i=e||(typeof s=="string"?s:String(s??""));this.formValuePublisher?.set(s),this.lastValidSearch=this.isSearchParameter()?s:i,this.setSearchText(this.isSearchParameter()?String(s??""):i),this.popElement?.hide(),requestAnimationFrame(()=>{this.suppressPopOpen=!1})}getSuggestionItems(){return[...this.renderRoot?.querySelectorAll("sonic-menu-item")??[]]}selectSuggestionItem(t){const e=t.getAttribute(Ud)??t.value??null,s=t.getAttribute(qd)??(t.textContent||"").trim();e==null&&!s||this.applySuggestion(e??s,s)}setupProviders(){const t=this.searchFieldName(),e=this.formDataProvider||this.getAncestorAttributeValue("formDataProvider")||"",s=Qe.instanceCounter++,i=(e||"form")+"__"+(this.name||"field")+"__autocomplete__"+s;this.initSearchDataProvider=`${i}_init_search__`,this.initQueueDataProvider=`${i}_init_queue__`,this.searchDataProvider=`${i}_search__`,this.queueFilterDataProvider=`${i}_queue_filter__`,this.queueDataProvider=`${i}_queue__`;const r=ve.get;this.searchPublisher=r(this.searchDataProvider)[t],this.queueFilterPublisher=r(this.queueFilterDataProvider)[t],this.formValuePublisher=Ut(r(e),this.name),this.initCountPublisher=r(this.initQueueDataProvider).resultCount,this.value&&r(this.initSearchDataProvider)[this.name].set(this.value),this.initCountPublisher?.onAssign(this.initSearchParameter),this.formValuePublisher?.onAssign(this.updateSearchParameter),this.searchPublisher?.onAssign(this.onSearchPublisherAssign);const n=this.searchPublisher?.get();n!=null&&n!==""&&(this.searchText=String(n),this.syncQueueFilter(this.searchText)),this.providersReady=!0}teardownProviders(){this.initCountPublisher?.offAssign(this.initSearchParameter),this.formValuePublisher?.offAssign(this.updateSearchParameter),this.searchPublisher?.offAssign(this.onSearchPublisherAssign);const t=ve.get;this.initSearchDataProvider&&t(this.initSearchDataProvider).delete(),this.initQueueDataProvider&&t(this.initQueueDataProvider).delete(),this.searchDataProvider&&t(this.searchDataProvider).delete(),this.queueFilterDataProvider&&t(this.queueFilterDataProvider).delete(),this.queueDataProvider&&t(this.queueDataProvider).delete(),this.providersReady=!1}connectedCallback(){super.connectedCallback(),this.setupProviders(),this.addEventListener("keyup",this.handleSearchKeyUp),this.addEventListener("keydown",this.handleSearchKeyDown,!0)}firstUpdated(t){super.firstUpdated(t),this.popElement.addEventListener("focusout",this.handleFocusOut)}disconnectedCallback(){this.removeEventListener("keyup",this.handleSearchKeyUp),this.removeEventListener("keydown",this.handleSearchKeyDown,!0),this.teardownProviders(),this.popElement?.removeEventListener("focusout",this.handleFocusOut),super.disconnectedCallback()}queryQueueListItem(t,e,s){const i=ve.get(t);let r;const n=i.get();if(!n||!Array.isArray(n)||!n.length)return!1;for(const o of n){const c=ve.get(o.dataProvider).get();if(Array.isArray(c)&&(r=c.find(e),r))break}return r?(s(r),!0):!1}setSelectionRange(t,e){this.renderRoot?.querySelector("sonic-input.form-element")?.setSelectionRange(t,e)}handleHide(){if(this.select){if(!this.searchText){this.lastValidSearch="",this.formValuePublisher?.set("");return}this.setSearchText(this.lastValidSearch)}}deepContains(t,e){if(!t||!e)return!1;let s=e;for(;s;){if(s===t||t.contains(s))return!0;const i=s.getRootNode();if(i instanceof ShadowRoot)s=i.host;else break}return!1}handleFocus(){const t=String(this.searchText??"");this.shouldShowSuggestions(t)&&(this.suppressPopOpen=!1,this.popElement?.show())}render(){if(!this.providersReady||!this.searchDataProvider)return te;const t=this.templateList.concat(this.templatePartsList);return j`
|
|
2099
2101
|
<sonic-pop manual style="display:block;" @hide=${this.handleHide}>
|
|
2100
2102
|
<sonic-input
|
|
2101
2103
|
class="form-element"
|
|
2102
|
-
|
|
2103
|
-
|
|
2104
|
-
formDataProvider="${this.searchDataProvider}"
|
|
2104
|
+
.formDataProvider=${this.searchDataProvider}
|
|
2105
|
+
.value=${this.searchText}
|
|
2105
2106
|
type="search"
|
|
2106
|
-
data-keyboard-nav="
|
|
2107
|
-
label="${
|
|
2108
|
-
description="${
|
|
2109
|
-
name="${
|
|
2107
|
+
data-keyboard-nav=""
|
|
2108
|
+
label="${se(this.label)}"
|
|
2109
|
+
description="${se(this.description)}"
|
|
2110
|
+
name="${se(this.searchFieldName())}"
|
|
2110
2111
|
?required=${this.required}
|
|
2111
|
-
placeholder="${
|
|
2112
|
+
placeholder="${se(this.placeholder)}"
|
|
2112
2113
|
?readonly="${this.readonly}"
|
|
2113
2114
|
autocomplete="off"
|
|
2114
2115
|
clearable
|
|
2115
2116
|
inlineContent
|
|
2116
2117
|
size=${this.size}
|
|
2117
2118
|
@focus=${this.handleFocus}
|
|
2118
|
-
|
|
2119
|
+
@change=${this.handleSearchActivity}
|
|
2119
2120
|
>
|
|
2120
2121
|
<slot
|
|
2121
2122
|
name="prefix"
|
|
@@ -2123,48 +2124,56 @@
|
|
|
2123
2124
|
@slotchange=${this.hasSlotOrProps}
|
|
2124
2125
|
></slot>
|
|
2125
2126
|
|
|
2126
|
-
${this.select?
|
|
2127
|
+
${this.select?j`
|
|
2127
2128
|
<sonic-icon
|
|
2128
2129
|
slot="suffix"
|
|
2129
2130
|
class="select-chevron"
|
|
2130
2131
|
name="nav-arrow-down"
|
|
2131
2132
|
.size=${this.size}
|
|
2132
2133
|
></sonic-icon>
|
|
2133
|
-
`:
|
|
2134
|
+
`:te}
|
|
2134
2135
|
</sonic-input>
|
|
2135
2136
|
<sonic-menu
|
|
2136
2137
|
slot="content"
|
|
2137
2138
|
class="custom-scroll"
|
|
2138
|
-
|
|
2139
|
+
data-on-select="keep"
|
|
2140
|
+
style="${this.offsetWidth?`width: ${this.offsetWidth}px`:""}"
|
|
2141
|
+
@pointerdown=${this.handleSuggestionPointerDown}
|
|
2139
2142
|
>
|
|
2140
2143
|
<sonic-queue
|
|
2141
2144
|
dataProvider="${this.queueDataProvider}"
|
|
2142
2145
|
filteredFields=${this.filteredFields}
|
|
2143
2146
|
dataProviderExpression="${this.dataProviderExpression}"
|
|
2144
|
-
dataFilterProvider="${this.
|
|
2145
|
-
|
|
2146
|
-
.templates=${this.templateList.concat(this.templatePartsList)}
|
|
2147
|
-
displayContents
|
|
2148
|
-
>
|
|
2149
|
-
</sonic-queue>
|
|
2150
|
-
<sonic-queue
|
|
2151
|
-
noLazyload
|
|
2152
|
-
loader="no-loader"
|
|
2153
|
-
dataProvider="${this.initQueueDataProvider}"
|
|
2154
|
-
filteredFields=${this.filteredFields}
|
|
2155
|
-
dataProviderExpression="${this.dataProviderExpression}"
|
|
2156
|
-
dataFilterProvider="${this.initSearchDataProvider}"
|
|
2147
|
+
dataFilterProvider="${this.queueFilterDataProvider}"
|
|
2148
|
+
serviceURL=${se(this.serviceURL||void 0)}
|
|
2157
2149
|
key="${this.key}"
|
|
2150
|
+
.templates=${t}
|
|
2151
|
+
.items=${this.items}
|
|
2158
2152
|
displayContents
|
|
2159
2153
|
>
|
|
2160
2154
|
</sonic-queue>
|
|
2161
2155
|
</sonic-menu>
|
|
2162
2156
|
</sonic-pop>
|
|
2163
|
-
|
|
2157
|
+
<!-- Lookup valeur initiale : hors menu, jamais displayContents (sinon visible). -->
|
|
2158
|
+
<sonic-queue
|
|
2159
|
+
class="init-queue"
|
|
2160
|
+
hidden
|
|
2161
|
+
noLazyload
|
|
2162
|
+
loader="no-loader"
|
|
2163
|
+
dataProvider="${this.initQueueDataProvider}"
|
|
2164
|
+
filteredFields=${this.filteredFields}
|
|
2165
|
+
dataProviderExpression="${this.dataProviderExpression}"
|
|
2166
|
+
dataFilterProvider="${this.initSearchDataProvider}"
|
|
2167
|
+
serviceURL=${se(this.serviceURL||void 0)}
|
|
2168
|
+
key="${this.key}"
|
|
2169
|
+
.templates=${t}
|
|
2170
|
+
.items=${this.items}
|
|
2171
|
+
>
|
|
2172
|
+
</sonic-queue>
|
|
2173
|
+
`}};Qe.styles=[Yr,ee`
|
|
2164
2174
|
:host {
|
|
2165
2175
|
display: block;
|
|
2166
2176
|
}
|
|
2167
|
-
/**disable mouse if there is an attribute readonly */
|
|
2168
2177
|
:host([readonly]),
|
|
2169
2178
|
:host([disabled]) {
|
|
2170
2179
|
pointer-events: none;
|
|
@@ -2181,7 +2190,16 @@
|
|
|
2181
2190
|
min-width: 14rem;
|
|
2182
2191
|
width: 100%;
|
|
2183
2192
|
}
|
|
2184
|
-
|
|
2193
|
+
|
|
2194
|
+
.init-queue {
|
|
2195
|
+
display: none !important;
|
|
2196
|
+
position: absolute;
|
|
2197
|
+
width: 0;
|
|
2198
|
+
height: 0;
|
|
2199
|
+
overflow: hidden;
|
|
2200
|
+
pointer-events: none;
|
|
2201
|
+
}
|
|
2202
|
+
`],Qe.instanceCounter=0,pt([h({type:String})],Qe.prototype,"size",2),pt([h({type:String})],Qe.prototype,"placeholder",2),pt([h()],Qe.prototype,"filteredFields",2),pt([h({type:Boolean,reflect:!0})],Qe.prototype,"readonly",2),pt([h({type:String})],Qe.prototype,"dataProviderExpression",2),pt([h({type:String})],Qe.prototype,"serviceURL",2),pt([h({type:Number})],Qe.prototype,"minSearchLength",2),pt([h({type:Boolean})],Qe.prototype,"select",2),pt([h({type:String})],Qe.prototype,"key",2),pt([h({type:String})],Qe.prototype,"searchParameter",2),pt([h({type:String})],Qe.prototype,"propertyName",2),pt([h({type:Function,attribute:!1})],Qe.prototype,"items",2),pt([mt({slot:"prefix",flatten:!0})],Qe.prototype,"slotInputPrefixNodes",2),pt([Ce()],Qe.prototype,"hasInputPrefix",2),pt([Cs("sonic-pop")],Qe.prototype,"popElement",2),pt([Ce()],Qe.prototype,"searchText",2),pt([Ce()],Qe.prototype,"searchDataProvider",2),Qe=pt([X("sonic-input-autocomplete")],Qe);var Bd=Object.defineProperty,Hd=Object.getOwnPropertyDescriptor,Dt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Hd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Bd(e,s,r),r};const Vd="sonic-password-helper";let bt=class extends Qs(J){constructor(){super(...arguments),this.minChars=8,this.hasNoChar=!0,this.hasEnoughChars=!1,this.hasMinuscule=!1,this.hasMajuscule=!1,this.hasNumber=!1,this.hasSpecialChar=!1,this.wording_password_helper_decription="Le mot de passe doit contenir au moins :",this.wording_password_helper_min_length="8 caractères",this.wording_password_helper_lower_case="1 minuscule",this.wording_password_helper_upper_case="1 majuscule",this.wording_password_helper_number="1 chiffre",this.wording_password_helper_special_char="1 caractère spécial"}connectedCallback(){super.connectedCallback(),this.name&&(this.checkValue=e=>{e?(this.hasNoChar=e.length==0,this.hasEnoughChars=e.length>this.minChars):(this.hasNoChar=!0,this.hasEnoughChars=!1),this.hasMinuscule=/[a-z]/.test(e),this.hasMajuscule=/[A-Z]/.test(e),this.hasNumber=/[0-9]/.test(e),this.hasSpecialChar=/[!"#$%&'()*+,\-./:;<=>?@[\]^_`{|}~]/.test(e)},ve.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].onAssign(this.checkValue))}disconnectedCallback(){this.checkValue&&this.name&&ve.get(this.getAncestorAttributeValue("formDataProvider"))[this.name].offAssign(this.checkValue),super.disconnectedCallback()}getIcon(e){return e?j`<sonic-icon library="heroicons" name="face-smile"></sonic-icon>`:j`<sonic-icon library="heroicons" name="x-mark"></sonic-icon>`}render(){return this.hasNoChar?te:j`
|
|
2185
2203
|
<div>${this.wording_password_helper_decription}</div>
|
|
2186
2204
|
<div>
|
|
2187
2205
|
${this.getIcon(this.hasEnoughChars)}
|
|
@@ -2202,11 +2220,11 @@
|
|
|
2202
2220
|
${this.getIcon(this.hasSpecialChar)}
|
|
2203
2221
|
${this.wording_password_helper_special_char}
|
|
2204
2222
|
</div>
|
|
2205
|
-
`}};Dt([
|
|
2223
|
+
`}};Dt([h()],bt.prototype,"name",2),Dt([h()],bt.prototype,"minChars",2),Dt([Ce()],bt.prototype,"hasNoChar",2),Dt([Ce()],bt.prototype,"hasEnoughChars",2),Dt([Ce()],bt.prototype,"hasMinuscule",2),Dt([Ce()],bt.prototype,"hasMajuscule",2),Dt([Ce()],bt.prototype,"hasNumber",2),Dt([Ce()],bt.prototype,"hasSpecialChar",2),Dt([h()],bt.prototype,"wording_password_helper_decription",2),Dt([h()],bt.prototype,"wording_password_helper_min_length",2),Dt([h()],bt.prototype,"wording_password_helper_lower_case",2),Dt([h()],bt.prototype,"wording_password_helper_upper_case",2),Dt([h()],bt.prototype,"wording_password_helper_number",2),Dt([h()],bt.prototype,"wording_password_helper_special_char",2),bt=Dt([X(Vd)],bt);var Wd=Object.defineProperty,Kd=Object.getOwnPropertyDescriptor,tr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Kd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Wd(e,s,r),r};const Yd="sonic-same-value-helper";let Is=class extends Qs(J){constructor(){super(...arguments),this.descriptionWhenEqual="Correspondance : oui",this.descriptionWhenNotEqual="Correspondance : non",this.areEqual=!1,this.hasNoChar=!0}connectedCallback(){super.connectedCallback();const t=ve.get(this.getAncestorAttributeValue("formDataProvider"));this.name&&this.sameValueAs&&(this.checkValue=e=>{e?this.hasNoChar=e.length==0:this.hasNoChar=!0,this.name&&this.sameValueAs&&(this.areEqual=Ut(t,this.name).get()==Ut(t,this.sameValueAs).get())},Ut(t,this.name).onAssign(this.checkValue),Ut(t,this.sameValueAs).onAssign(this.checkValue))}disconnectedCallback(){if(this.checkValue&&this.name&&this.sameValueAs){const t=ve.get(this.getAncestorAttributeValue("formDataProvider"));Ut(t,this.name).offAssign(this.checkValue),Ut(t,this.sameValueAs).offAssign(this.checkValue)}super.disconnectedCallback()}render(){return this.hasNoChar?te:j`
|
|
2206
2224
|
<span>
|
|
2207
|
-
${this.areEqual?
|
|
2225
|
+
${this.areEqual?Re(this.descriptionWhenEqual):Re(this.descriptionWhenNotEqual)}
|
|
2208
2226
|
</span>
|
|
2209
|
-
`}};tr([
|
|
2227
|
+
`}};tr([h()],Is.prototype,"name",2),tr([h()],Is.prototype,"sameValueAs",2),tr([h()],Is.prototype,"descriptionWhenEqual",2),tr([h()],Is.prototype,"descriptionWhenNotEqual",2),tr([Ce()],Is.prototype,"areEqual",2),tr([Ce()],Is.prototype,"hasNoChar",2),Is=tr([X(Yd)],Is);var Gd=Object.defineProperty,Zd=Object.getOwnPropertyDescriptor,vs=(t,e,s,i)=>{for(var r=i>1?void 0:i?Zd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Gd(e,s,r),r};const Jd="sonic-checkbox";let Et=class extends Mn(ji(mr(J))){constructor(){super(...arguments),this.touched=!1,this.iconName="check",this.indeterminateIconName="minus-small",this.showAsIndeterminate=!1,this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){this.type="checkbox",this.hasSlotOrProps(),super.connectedCallback()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t),t.has("type")&&(this.type="checkbox")}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){return j`
|
|
2210
2228
|
<label class="checkbox-container ${this.disabled?"disabled":""}">
|
|
2211
2229
|
|
|
2212
2230
|
<span class="icon-container">
|
|
@@ -2217,20 +2235,20 @@
|
|
|
2217
2235
|
?required=${this.required}
|
|
2218
2236
|
?data-indeterminate=${this.showAsIndeterminate}
|
|
2219
2237
|
?disabled=${this.disabled}
|
|
2220
|
-
.checked=${
|
|
2238
|
+
.checked=${se(this.checked)}
|
|
2221
2239
|
.name=${this.name}
|
|
2222
2240
|
.value=${this.value}
|
|
2223
2241
|
?autofocus=${this.autofocus}
|
|
2224
|
-
aria-label=${
|
|
2225
|
-
aria-labelledby=${
|
|
2242
|
+
aria-label=${se(this.ariaLabel)}
|
|
2243
|
+
aria-labelledby=${se(this.ariaLabelledby)}
|
|
2226
2244
|
/>
|
|
2227
2245
|
<sonic-icon name="${this.checked=="indeterminate"||this.showAsIndeterminate?this.indeterminateIconName:this.iconName}" class="sc-input-icon"></sonic-icon>
|
|
2228
2246
|
</span>
|
|
2229
2247
|
|
|
2230
2248
|
<div class="checkbox-text ${!this.hasDescription&&!this.hasLabel?"hidden":"checkbox-text"}">
|
|
2231
|
-
${this.label?
|
|
2249
|
+
${this.label?Re(this.label):""}
|
|
2232
2250
|
<slot @slotchange=${this.hasSlotOrProps}></slot>
|
|
2233
|
-
<slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?
|
|
2251
|
+
<slot @slotchange=${this.hasSlotOrProps} name="description" class="${this.hasDescription?"description":"hidden"} ">${this.description?j`${Re(this.description)}`:""}</slot>
|
|
2234
2252
|
</div>
|
|
2235
2253
|
</label>
|
|
2236
2254
|
</label>
|
|
@@ -2356,7 +2374,7 @@
|
|
|
2356
2374
|
.hidden {
|
|
2357
2375
|
display: none;
|
|
2358
2376
|
}
|
|
2359
|
-
`],vs([
|
|
2377
|
+
`],vs([h({type:Boolean,reflect:!0})],Et.prototype,"touched",2),vs([h({type:String})],Et.prototype,"iconName",2),vs([h({type:String})],Et.prototype,"indeterminateIconName",2),vs([h({type:Boolean})],Et.prototype,"showAsIndeterminate",2),vs([h({type:Boolean})],Et.prototype,"hasDescription",2),vs([h({type:Boolean})],Et.prototype,"hasLabel",2),vs([mt({flatten:!0})],Et.prototype,"slotLabelNodes",2),vs([mt({slot:"description",flatten:!0})],Et.prototype,"slotDescriptionNodes",2),Et=vs([X(Jd)],Et);var Xd=Object.getOwnPropertyDescriptor,Qd=(t,e,s,i)=>{for(var r=i>1?void 0:i?Xd(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const ep="sonic-radio";let so=class extends Et{constructor(){super(),this.radio=!0}willUpdate(t){const e=t.has("type");super.willUpdate(t),e&&(this.type="radio")}connectedCallback(){super.connectedCallback(),this.type="radio"}};so.styles=[Et.styles,ee`
|
|
2360
2378
|
:host input {
|
|
2361
2379
|
border-radius: 50%;
|
|
2362
2380
|
}
|
|
@@ -2372,7 +2390,7 @@
|
|
|
2372
2390
|
width: 0.6em;
|
|
2373
2391
|
width: round(0.6em, 1px);
|
|
2374
2392
|
}
|
|
2375
|
-
`],
|
|
2393
|
+
`],so=Qd([X(ep)],so);var tp=Object.getOwnPropertyDescriptor,sp=(t,e,s,i)=>{for(var r=i>1?void 0:i?tp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const rp="sonic-switch";let ro=class extends Et{constructor(){super(),this.unique=!0}};ro.styles=[Et.styles,ee`
|
|
2376
2394
|
sonic-icon {
|
|
2377
2395
|
display: none;
|
|
2378
2396
|
}
|
|
@@ -2437,17 +2455,17 @@
|
|
|
2437
2455
|
input + sonic-icon {
|
|
2438
2456
|
display: none;
|
|
2439
2457
|
}
|
|
2440
|
-
`],
|
|
2458
|
+
`],ro=sp([X(rp)],ro);var ip=Object.defineProperty,np=Object.getOwnPropertyDescriptor,ot=(t,e,s,i)=>{for(var r=i>1?void 0:i?np(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ip(e,s,r),r};const op="sonic-select";let et=class extends mr(J){constructor(){super(...arguments),this.valueKey="value",this.wordingKey="wording",this.multiple=!1,this.status="default",this._options=[],this.hasDoneFirstUpdate=!1,this._value="",this.updateOptions=()=>{const t=this.querySelectorAll("option");t.length>0&&(this.options=Array.from(t).map(e=>({value:e.value,wording:e.text,selected:e.hasAttribute("selected")})))},this.forceAutoFill=!1,this.hasDescription=!1,this.hasLabel=!1,this.hasSuffix=!1,this.hasPrefix=!1}set options(t){this._options=t;for(const s of t)s.selected&&(this.value=s[this.valueKey]||"");!(this.value||this.getAttribute("value"))&&this._options.length>0&&(this.value=this._options[0][this.valueKey]),this.requestUpdate()}get options(){return this._options}firstUpdated(t){this.hasDoneFirstUpdate=!0,super.firstUpdated(t)}set value(t){t==null&&!this.hasDoneFirstUpdate||(t||(t=""),this._value!=t&&(this._value=t,this.updateFormPublisherValue(),this.requestUpdate()))}get value(){return this._value}updateFormPublisherValue(){this.setFormPublisherValue(this.value)}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps(),this.updateOptions()}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length),this.hasSuffix=!!this.slotSuffixNodes?.length,this.hasPrefix=!!this.slotPrefixNodes?.length}validateFormElement(){const t=this.shadowRoot?.querySelector("select");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={"has-prefix":this.hasPrefix,"has-suffix":this.hasSuffix};return j`
|
|
2441
2459
|
<label
|
|
2442
2460
|
for="form-element"
|
|
2443
2461
|
class="${this.hasLabel?"form-label":"hidden"}"
|
|
2444
|
-
>${this.label?
|
|
2462
|
+
>${this.label?Re(this.label):""}<slot
|
|
2445
2463
|
name="label"
|
|
2446
2464
|
@slotchange=${this.hasSlotOrProps}
|
|
2447
2465
|
></slot
|
|
2448
2466
|
></label>
|
|
2449
2467
|
|
|
2450
|
-
<div class="form-control ${
|
|
2468
|
+
<div class="form-control ${to(t)}">
|
|
2451
2469
|
<slot name="prefix" @slotchange=${this.hasSlotOrProps}></slot>
|
|
2452
2470
|
<div class="form-select-wrapper">
|
|
2453
2471
|
<select
|
|
@@ -2458,14 +2476,14 @@
|
|
|
2458
2476
|
?disabled=${this.disabled}
|
|
2459
2477
|
?required=${this.required}
|
|
2460
2478
|
?multiple=${this.multiple}
|
|
2461
|
-
size=${
|
|
2479
|
+
size=${se(this.selectSize)}
|
|
2462
2480
|
?autofocus=${this.autofocus}
|
|
2463
2481
|
.value="${this.value}"
|
|
2464
2482
|
class="form-element"
|
|
2465
|
-
aria-label=${
|
|
2466
|
-
aria-labelledby=${
|
|
2483
|
+
aria-label=${se(this.ariaLabel)}
|
|
2484
|
+
aria-labelledby=${se(this.ariaLabelledby)}
|
|
2467
2485
|
>
|
|
2468
|
-
${Ii(this.options,e=>e[this.valueKey],e=>{const s=this.value==e[this.valueKey];return
|
|
2486
|
+
${Ii(this.options,e=>e[this.valueKey],e=>{const s=this.value==e[this.valueKey];return j`<option
|
|
2469
2487
|
?selected=${s}
|
|
2470
2488
|
value="${e[this.valueKey]}"
|
|
2471
2489
|
>
|
|
@@ -2486,9 +2504,9 @@
|
|
|
2486
2504
|
name="description"
|
|
2487
2505
|
@slotchange=${this.hasSlotOrProps}
|
|
2488
2506
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2489
|
-
>${this.description?
|
|
2507
|
+
>${this.description?j`${Re(this.description)}`:""}</slot
|
|
2490
2508
|
>
|
|
2491
|
-
`}};
|
|
2509
|
+
`}};et.styles=[ss,eo,Gi,Zi,ee`
|
|
2492
2510
|
.form-element {
|
|
2493
2511
|
appearance: none;
|
|
2494
2512
|
white-space: nowrap;
|
|
@@ -2541,11 +2559,11 @@
|
|
|
2541
2559
|
:host([multiple]) sonic-icon {
|
|
2542
2560
|
display: none !important;
|
|
2543
2561
|
}
|
|
2544
|
-
`],ot([
|
|
2562
|
+
`],ot([h({type:String})],et.prototype,"valueKey",2),ot([h({type:String})],et.prototype,"wordingKey",2),ot([h({type:Boolean})],et.prototype,"multiple",2),ot([h({type:String,reflect:!0})],et.prototype,"size",2),ot([h({type:Number})],et.prototype,"selectSize",2),ot([h({type:String,reflect:!0})],et.prototype,"status",2),ot([h({type:Array})],et.prototype,"options",1),ot([h({reflect:!0})],et.prototype,"value",1),ot([h({type:Boolean})],et.prototype,"forceAutoFill",2),ot([h()],et.prototype,"description",1),ot([h()],et.prototype,"label",1),ot([mt({slot:"label",flatten:!0})],et.prototype,"slotLabelNodes",2),ot([mt({slot:"description",flatten:!0})],et.prototype,"slotDescriptionNodes",2),ot([mt({slot:"suffix",flatten:!0})],et.prototype,"slotSuffixNodes",2),ot([mt({slot:"prefix",flatten:!0})],et.prototype,"slotPrefixNodes",2),ot([Ce()],et.prototype,"hasDescription",2),ot([Ce()],et.prototype,"hasLabel",2),ot([Ce()],et.prototype,"hasSuffix",2),ot([Ce()],et.prototype,"hasPrefix",2),et=ot([X(op)],et);var ap=Object.defineProperty,lp=Object.getOwnPropertyDescriptor,Tt=(t,e,s,i)=>{for(var r=i>1?void 0:i?lp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ap(e,s,r),r};const cp="sonic-textarea";let vt=class extends ji(mr(J)){constructor(){super(...arguments),this.size="md",this.readonly=!1,this.resize="vertical",this.hasDescription=!1,this.hasLabel=!1}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}validateFormElement(){const t=this.shadowRoot?.querySelector("textarea");if(!t||t.checkValidity())return;const e=this.getFormPublisher();e&&(e.isFormValid=!1),t.reportValidity()}render(){const t={resize:this.resize};return j`
|
|
2545
2563
|
<label
|
|
2546
2564
|
for="${this.id||"form-element"}"
|
|
2547
2565
|
class="${this.hasLabel?"form-label":"hidden"}"
|
|
2548
|
-
>${this.label?
|
|
2566
|
+
>${this.label?Re(this.label):""}<slot
|
|
2549
2567
|
name="label"
|
|
2550
2568
|
@slotchange=${this.hasSlotOrProps}
|
|
2551
2569
|
></slot
|
|
@@ -2560,20 +2578,20 @@
|
|
|
2560
2578
|
?disabled=${this.disabled}
|
|
2561
2579
|
?required=${this.required}
|
|
2562
2580
|
?autofocus=${this.autofocus}
|
|
2563
|
-
rows=${
|
|
2564
|
-
cols=${
|
|
2565
|
-
maxlength=${
|
|
2566
|
-
minlength=${
|
|
2581
|
+
rows=${se(this.rows)}
|
|
2582
|
+
cols=${se(this.cols)}
|
|
2583
|
+
maxlength=${se(this.maxlength)}
|
|
2584
|
+
minlength=${se(this.minlength)}
|
|
2567
2585
|
?readonly=${this.readonly}
|
|
2568
|
-
spellcheck=${
|
|
2569
|
-
autocomplete=${
|
|
2570
|
-
tabindex=${
|
|
2571
|
-
wrap=${
|
|
2586
|
+
spellcheck=${se(this.spellcheck)}
|
|
2587
|
+
autocomplete=${se(this.autocomplete)}
|
|
2588
|
+
tabindex=${se(this.tabindex)}
|
|
2589
|
+
wrap=${se(this.wrap)}
|
|
2572
2590
|
placeholder="${this.placeholder}"
|
|
2573
2591
|
class="form-element textarea custom-scroll"
|
|
2574
|
-
aria-label=${
|
|
2575
|
-
aria-labelledby=${
|
|
2576
|
-
style=${
|
|
2592
|
+
aria-label=${se(this.ariaLabel)}
|
|
2593
|
+
aria-labelledby=${se(this.ariaLabelledby)}
|
|
2594
|
+
style=${kt(t)}
|
|
2577
2595
|
>
|
|
2578
2596
|
${this.value}</textarea
|
|
2579
2597
|
>
|
|
@@ -2583,14 +2601,14 @@ ${this.value}</textarea
|
|
|
2583
2601
|
name="description"
|
|
2584
2602
|
@slotchange=${this.hasSlotOrProps}
|
|
2585
2603
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2586
|
-
>${this.description?
|
|
2604
|
+
>${this.description?j`${Re(this.description)}`:""}</slot
|
|
2587
2605
|
>
|
|
2588
|
-
`}};
|
|
2606
|
+
`}};vt.styles=[ss,eo,Gi,Zi,Yr,ee`
|
|
2589
2607
|
textarea {
|
|
2590
2608
|
overflow-y: auto !important;
|
|
2591
2609
|
font-size: inherit;
|
|
2592
2610
|
}
|
|
2593
|
-
`],Tt([
|
|
2611
|
+
`],Tt([h({type:String})],vt.prototype,"size",2),Tt([h({type:Number})],vt.prototype,"rows",2),Tt([h({type:Number})],vt.prototype,"cols",2),Tt([h({type:Number})],vt.prototype,"maxlength",2),Tt([h({type:Number})],vt.prototype,"minlength",2),Tt([h({type:String})],vt.prototype,"wrap",2),Tt([h({type:Boolean})],vt.prototype,"readonly",2),Tt([h({type:String})],vt.prototype,"placeholder",2),Tt([h({type:String})],vt.prototype,"resize",2),Tt([mt({slot:"label",flatten:!0})],vt.prototype,"slotLabelNodes",2),Tt([mt({slot:"description",flatten:!0})],vt.prototype,"slotDescriptionNodes",2),Tt([Ce()],vt.prototype,"hasDescription",2),Tt([Ce()],vt.prototype,"hasLabel",2),vt=Tt([X(cp)],vt);var hp=Object.getOwnPropertyDescriptor,up=(t,e,s,i)=>{for(var r=i>1?void 0:i?hp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};let io=class extends J{render(){return j`<slot></slot>`}};io.styles=[ee`
|
|
2594
2612
|
:host {
|
|
2595
2613
|
font-size: 1.15rem;
|
|
2596
2614
|
line-height: 1.2;
|
|
@@ -2607,19 +2625,19 @@ ${this.value}</textarea
|
|
|
2607
2625
|
font-size: 1rem;
|
|
2608
2626
|
}
|
|
2609
2627
|
}
|
|
2610
|
-
`],
|
|
2611
|
-
${this.iconName?
|
|
2628
|
+
`],io=up([X("sonic-legend-description")],io);var dp=Object.defineProperty,pp=Object.getOwnPropertyDescriptor,sr=(t,e,s,i)=>{for(var r=i>1?void 0:i?pp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&dp(e,s,r),r};const fp="sonic-legend";let ys=class extends J{constructor(){super(...arguments),this.forceAutoFill=!1}get description(){return this._description}set description(t){this.hasAttribute("description")&&!this.forceAutoFill&&(t=this.getAttribute("description")),this._description=t,this.requestUpdate()}get label(){return this._label}set label(t){this.hasAttribute("label")&&!this.forceAutoFill&&(t=this.getAttribute("label")),this._label=t,this.requestUpdate()}render(){return j`<legend part="legend">
|
|
2629
|
+
${this.iconName?j`<div class="icon">
|
|
2612
2630
|
<sonic-icon
|
|
2613
2631
|
name=${this.iconName}
|
|
2614
|
-
prefix=${
|
|
2615
|
-
library=${
|
|
2632
|
+
prefix=${se(this.iconPrefix)}
|
|
2633
|
+
library=${se(this.iconLibrary)}
|
|
2616
2634
|
></sonic-icon>
|
|
2617
2635
|
</div>`:""}
|
|
2618
2636
|
|
|
2619
2637
|
<div class="legend-content">
|
|
2620
|
-
${
|
|
2621
|
-
${this.description?
|
|
2622
|
-
>${
|
|
2638
|
+
${Re(this.label?this.label:"")}
|
|
2639
|
+
${this.description?j`<sonic-legend-description
|
|
2640
|
+
>${Re(this.description)}</sonic-legend-description
|
|
2623
2641
|
>`:""}
|
|
2624
2642
|
<slot></slot>
|
|
2625
2643
|
</div>
|
|
@@ -2668,19 +2686,19 @@ ${this.value}</textarea
|
|
|
2668
2686
|
.legend-content {
|
|
2669
2687
|
flex-grow: 1;
|
|
2670
2688
|
}
|
|
2671
|
-
`],sr([
|
|
2672
|
-
form="${
|
|
2689
|
+
`],sr([h({type:Boolean})],ys.prototype,"forceAutoFill",2),sr([h()],ys.prototype,"description",1),sr([h()],ys.prototype,"label",1),sr([h({type:String})],ys.prototype,"iconName",2),sr([h({type:String})],ys.prototype,"iconLibrary",2),sr([h({type:String})],ys.prototype,"iconPrefix",2),ys=sr([X(fp)],ys);var gp=Object.defineProperty,mp=Object.getOwnPropertyDescriptor,ns=(t,e,s,i)=>{for(var r=i>1?void 0:i?mp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&gp(e,s,r),r};const bp="sonic-fieldset";let Ht=class extends Ct(J){constructor(){super(...arguments),this.disabled=!1,this.variant="default"}render(){return j`<fieldset
|
|
2690
|
+
form="${se(this.form)}"
|
|
2673
2691
|
?disabled="${this.disabled}"
|
|
2674
2692
|
>
|
|
2675
|
-
${this.label?
|
|
2676
|
-
label=${
|
|
2677
|
-
description=${
|
|
2678
|
-
iconName=${
|
|
2679
|
-
iconPrefix=${
|
|
2680
|
-
iconLibrary=${
|
|
2681
|
-
></sonic-legend>`:
|
|
2693
|
+
${this.label?j` <sonic-legend
|
|
2694
|
+
label=${se(this.label)}
|
|
2695
|
+
description=${se(this.description)}
|
|
2696
|
+
iconName=${se(this.iconName)}
|
|
2697
|
+
iconPrefix=${se(this.iconPrefix)}
|
|
2698
|
+
iconLibrary=${se(this.iconLibrary)}
|
|
2699
|
+
></sonic-legend>`:te}
|
|
2682
2700
|
<slot></slot>
|
|
2683
|
-
</fieldset>`}};
|
|
2701
|
+
</fieldset>`}};Ht.styles=[ee`
|
|
2684
2702
|
:host {
|
|
2685
2703
|
--sc-fieldset-mt: 0;
|
|
2686
2704
|
--sc-fieldset-mb: 1rem;
|
|
@@ -2729,7 +2747,7 @@ ${this.value}</textarea
|
|
|
2729
2747
|
::slotted(sonic-legend:last-child) {
|
|
2730
2748
|
margin-bottom: 0;
|
|
2731
2749
|
}
|
|
2732
|
-
`],ns([
|
|
2750
|
+
`],ns([h({type:Boolean,reflect:!0})],Ht.prototype,"disabled",2),ns([h({type:String})],Ht.prototype,"form",2),ns([h({type:String})],Ht.prototype,"label",2),ns([h({type:String})],Ht.prototype,"description",2),ns([h({type:String})],Ht.prototype,"iconName",2),ns([h({type:String})],Ht.prototype,"iconLibrary",2),ns([h({type:String})],Ht.prototype,"iconPrefix",2),ns([h({type:Boolean,reflect:!0})],Ht.prototype,"tight",2),ns([h({type:String,reflect:!0})],Ht.prototype,"variant",2),Ht=ns([X(bp)],Ht);var vp=Object.defineProperty,yp=Object.getOwnPropertyDescriptor,no=(t,e,s,i)=>{for(var r=i>1?void 0:i?yp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&vp(e,s,r),r};const wp="sonic-form-layout";let ti=class extends Ct(J){constructor(){super(...arguments),this._resizeController=new il(this,{}),this.oneFormElement=!1}onSlotChange(){let t=this.slottedElements;const e=["sonic-input","sonic-select","sonic-input-autocomplete",".form-item-container"];t=t.filter(s=>e.includes(s.nodeName.toLowerCase())),this.oneFormElement=t.length==1}render(){const t={"cq--md":this.offsetWidth>440,"one-form-element":this.oneFormElement};return j`<div class=${to(t)}>
|
|
2733
2751
|
<slot @slotchange=${this.onSlotChange}></slot>
|
|
2734
2752
|
</div>`}};ti.styles=[ee`
|
|
2735
2753
|
:host {
|
|
@@ -2766,7 +2784,7 @@ ${this.value}</textarea
|
|
|
2766
2784
|
::slotted(sonic-divider) {
|
|
2767
2785
|
--sc-divider-my: 0;
|
|
2768
2786
|
}
|
|
2769
|
-
`],
|
|
2787
|
+
`],no([Nr({flatten:!0})],ti.prototype,"slottedElements",2),no([h({type:Boolean})],ti.prototype,"oneFormElement",2),ti=no([X(wp)],ti);var _p=Object.defineProperty,Sp=Object.getOwnPropertyDescriptor,oo=(t,e,s,i)=>{for(var r=i>1?void 0:i?Sp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&_p(e,s,r),r};const Pp="sonic-form-actions";let si=class extends J{constructor(){super(...arguments),this.direction="row",this.justify="flex-start"}render(){const t={flexDirection:this.direction,justifyContent:this.justify};return j`<slot style=${kt(t)}></slot>`}};si.styles=[ee`
|
|
2770
2788
|
:host {
|
|
2771
2789
|
display: block;
|
|
2772
2790
|
}
|
|
@@ -2775,20 +2793,20 @@ ${this.value}</textarea
|
|
|
2775
2793
|
flex-wrap: wrap;
|
|
2776
2794
|
gap: 0.3rem;
|
|
2777
2795
|
}
|
|
2778
|
-
`],
|
|
2779
|
-
>${this.label?
|
|
2796
|
+
`],oo([h({type:String})],si.prototype,"direction",2),oo([h({type:String})],si.prototype,"justify",2),si=oo([X(Pp)],si);var xp=Object.defineProperty,Ap=Object.getOwnPropertyDescriptor,Fs=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ap(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&xp(e,s,r),r};const Cp="sonic-group";let os=class extends J{constructor(){super(...arguments),this.alignItems="center",this.hasDescription=!1,this.hasLabel=!1}updated(){const t=this.querySelectorAll("sonic-input, sonic-button, sonic-select"),e=t.length;e>1&&t.forEach((s,i)=>{const r=s;i===0?(r.style.setProperty("--sc-item-rounded-tr","0"),r.style.setProperty("--sc-item-rounded-br","0")):i===e-1?(r.style.setProperty("--sc-item-rounded-tl","0"),r.style.setProperty("--sc-item-rounded-bl","0")):(r.style.setProperty("--sc-item-rounded-tr","0"),r.style.setProperty("--sc-item-rounded-br","0"),r.style.setProperty("--sc-item-rounded-tl","0"),r.style.setProperty("--sc-item-rounded-bl","0"))})}connectedCallback(){super.connectedCallback(),this.hasSlotOrProps()}willUpdate(t){this.hasSlotOrProps(),super.willUpdate(t)}hasSlotOrProps(){this.hasLabel=!!(this.label||this.slotLabelNodes?.length),this.hasDescription=!!(this.description||this.slotDescriptionNodes?.length)}render(){const t={alignItems:this.alignItems};return j`<span class="${this.hasLabel?"form-label":"hidden"}"
|
|
2797
|
+
>${this.label?Re(this.label):""}<slot
|
|
2780
2798
|
name="label"
|
|
2781
2799
|
@slotchange=${this.hasSlotOrProps}
|
|
2782
2800
|
></slot
|
|
2783
2801
|
></span>
|
|
2784
|
-
<slot class="main-slot" style=${
|
|
2802
|
+
<slot class="main-slot" style=${kt(t)}></slot>
|
|
2785
2803
|
<slot
|
|
2786
2804
|
name="description"
|
|
2787
2805
|
@slotchange=${this.hasSlotOrProps}
|
|
2788
2806
|
class="${this.hasDescription?"form-description":"hidden"}"
|
|
2789
2807
|
>
|
|
2790
|
-
${this.description?
|
|
2791
|
-
</slot>`}};os.styles=[ss,
|
|
2808
|
+
${this.description?j`${Re(this.description)}`:""}
|
|
2809
|
+
</slot>`}};os.styles=[ss,Gi,Zi,ee`
|
|
2792
2810
|
:host {
|
|
2793
2811
|
display: inline-block;
|
|
2794
2812
|
vertical-align: middle;
|
|
@@ -2808,16 +2826,16 @@ ${this.value}</textarea
|
|
|
2808
2826
|
::slotted(sonic-select) {
|
|
2809
2827
|
flex-grow: 1;
|
|
2810
2828
|
}
|
|
2811
|
-
`],
|
|
2829
|
+
`],Fs([h({type:String})],os.prototype,"alignItems",2),Fs([h({type:String})],os.prototype,"label",2),Fs([h({type:String})],os.prototype,"description",2),Fs([mt({slot:"label",flatten:!0})],os.prototype,"slotLabelNodes",2),Fs([mt({slot:"description",flatten:!0})],os.prototype,"slotDescriptionNodes",2),Fs([Ce()],os.prototype,"hasDescription",2),Fs([Ce()],os.prototype,"hasLabel",2),os=Fs([X(Cp)],os);var kp=Object.defineProperty,$p=Object.getOwnPropertyDescriptor,as=(t,e,s,i)=>{for(var r=i>1?void 0:i?$p(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&kp(e,s,r),r};const Dp="sonic-image";let Vt=class extends J{constructor(){super(...arguments),this.rounded="none",this.src="",this.alt="",this.loading="lazy",this.ratio="auto",this.objectPosition="center center",this.imageRendering="auto",this.cover=!1}firstUpdated(t){if(this.transition){const e=this.shadowRoot?.querySelector("img");if(!e)return;e.onload=function(){e.classList.add("loaded")}}super.firstUpdated(t)}render(){const t={aspectRatio:this.cover?"auto":this.ratio,imageRendering:this.imageRendering,objectPosition:this.objectPosition};return j`<div part="image">
|
|
2812
2830
|
<picture part="picture"
|
|
2813
2831
|
><img
|
|
2814
2832
|
part="img"
|
|
2815
2833
|
src="${this.src}"
|
|
2816
2834
|
loading="${this.loading}"
|
|
2817
2835
|
alt="${this.alt}"
|
|
2818
|
-
style=${
|
|
2836
|
+
style=${kt(t)}
|
|
2819
2837
|
/></picture>
|
|
2820
|
-
</div>`}};
|
|
2838
|
+
</div>`}};Vt.styles=[ee`
|
|
2821
2839
|
:host {
|
|
2822
2840
|
--sc-img-radius: 0;
|
|
2823
2841
|
--sc-img-bg: var(--sc-placeholder-bg, rgba(12, 12, 12, 0.05));
|
|
@@ -2891,22 +2909,22 @@ ${this.value}</textarea
|
|
|
2891
2909
|
opacity: 1;
|
|
2892
2910
|
scale: 1;
|
|
2893
2911
|
}
|
|
2894
|
-
`],as([
|
|
2912
|
+
`],as([h({type:String})],Vt.prototype,"rounded",2),as([h({type:String})],Vt.prototype,"src",2),as([h({type:String})],Vt.prototype,"alt",2),as([h({type:String})],Vt.prototype,"loading",2),as([h({type:String,reflect:!0})],Vt.prototype,"transition",2),as([h({type:String})],Vt.prototype,"ratio",2),as([h({type:String})],Vt.prototype,"objectPosition",2),as([h({type:String})],Vt.prototype,"imageRendering",2),as([h({type:Boolean,reflect:!0})],Vt.prototype,"cover",2),Vt=as([X(Dp)],Vt);var Ep=Object.defineProperty,Op=Object.getOwnPropertyDescriptor,Lt=(t,e,s,i)=>{for(var r=i>1?void 0:i?Op(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ep(e,s,r),r};const nl=t=>Nr(t),Tp="sonic-menu";let yt=class extends J{constructor(){super(...arguments),this.direction="column",this.gap="var(--sc-menu-gap)",this.align="left",this.shadow=null,this.moreShape="circle",this.scrollable=!1,this.observer=null,this.attributeObserver=null,this.minWidth="0",this.hasMoreElements=!1,this.handleScrollEnd=()=>{this.setScrollShadow(this.menuContent,this.direction)},this.updateIsScollable=()=>{this.scrollable&&(this.initScrollable(),this.setScrollShadow(this.menuContent,this.direction))}}checkIfMore(){this.hasMoreElements=!!this.moreElements?.length}moreSlotChange(){this.checkIfMore(),this.updateIsScollable()}updated(t){const e=this.querySelector(".more-btn");this.size&&e&&e.setAttribute("size",this.size),super.updated(t)}setDividersSize(t){t.forEach(e=>{e.setAttribute("size","sm"),this.direction=="row"?e.style.setProperty("margin","0 .1rem "):e.style.setProperty("margin"," 0.1rem 0")})}mainSlotChange(){this.setChildrenSize(this.menuChildren),this.setDividersSize(this.menuChildren),this.updateIsScollable(),this.updateScrollPosition(),this.observeMenuItemsAttributes()}observeMenuItemsAttributes(){this.attributeObserver?.disconnect(),this.attributeObserver=new MutationObserver(()=>{this.updateScrollPosition()}),this.menuChildren.forEach(t=>{this.attributeObserver.observe(t,{attributes:!0,attributeFilter:["active"]})})}updateScrollPosition(){if(this.scrollable){const t=this.menuChildren.filter(e=>e.hasAttribute("active")&&e.getAttribute("active")!=="false");t.length===1&&requestAnimationFrame(()=>{t[0].scrollIntoView({behavior:"smooth",block:"nearest",inline:"center"})})}}connectedCallback(){this.observer=new ResizeObserver(this.updateIsScollable),this.observer.observe(this),super.connectedCallback()}firstUpdated(t){this.menuContent.addEventListener("scrollend",this.handleScrollEnd)}disconnectedCallback(){this.observer?.disconnect(),this.attributeObserver?.disconnect(),this.menuContent.removeEventListener("scrollend",this.handleScrollEnd),super.disconnectedCallback()}initScrollable(){let t=!1,e,s;this.scrollable&&(this.addEventListener("mousedown",i=>{t=!0,this.classList.add("active"),e=i.pageX-this.menuContent.offsetLeft,s=this.menuContent.scrollLeft}),this.addEventListener("mouseleave",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mouseup",()=>{t=!1,this.classList.remove("active")}),this.addEventListener("mousemove",i=>{if(!t)return;i.preventDefault();const n=(i.pageX-this.menuContent.offsetLeft-e)*1.5;this.menuContent.scrollLeft=s-n,this.setScrollShadow(this.menuContent,this.direction)}),this.addEventListener("scroll",i=>{i.preventDefault(),this.setScrollShadow(this.menuContent,this.direction)}))}setScrollShadow(t,e){e=="row"?(t.scrollLeft>0?this.classList.add("shadow-left"):this.classList.remove("shadow-left"),t.scrollLeft<t.scrollWidth-t.offsetWidth?this.classList.add("shadow-right"):this.classList.remove("shadow-right")):e=="column"&&(t.scrollTop>0?this.classList.add("shadow-top"):this.classList.remove("shadow-top"),t.scrollTop<t.scrollHeight-(t.offsetHeight+1)?this.classList.add("shadow-bottom"):this.classList.remove("shadow-bottom"))}setChildrenSize(t){t.forEach(e=>{this.size&&e.setAttribute("size",this.size),this.align&&e.getAttribute("shape")!="square"&&e.getAttribute("shape")!="circle"&&e.setAttribute("align",this.align),this.direction=="row"&&e.getAttribute("shape")=="block"&&e.setAttribute("shape","default")})}render(){const t={minWidth:this.minWidth,flexDirection:this.direction},e=this.direction=="row",s={gap:this.gap,flexDirection:this.direction},i={display:"block",alignSelf:e?"center":"flex-start",justifySelf:"center",flexDirection:this.direction},r={marginLeft:e?"":".55em"};return j`<menu
|
|
2895
2913
|
part="menu"
|
|
2896
2914
|
class="shadowable"
|
|
2897
|
-
style=${
|
|
2915
|
+
style=${kt(t)}
|
|
2898
2916
|
>
|
|
2899
2917
|
<slot
|
|
2900
2918
|
@slotchange=${this.mainSlotChange}
|
|
2901
2919
|
id="menu-content"
|
|
2902
|
-
style=${
|
|
2920
|
+
style=${kt(s)}
|
|
2903
2921
|
></slot>
|
|
2904
2922
|
<sonic-pop
|
|
2905
|
-
style=${
|
|
2923
|
+
style=${kt(i)}
|
|
2906
2924
|
class=${this.hasMoreElements?"":"hidden"}
|
|
2907
2925
|
>
|
|
2908
2926
|
<sonic-menu-item
|
|
2909
|
-
style=${
|
|
2927
|
+
style=${kt(r)}
|
|
2910
2928
|
class="more-btn"
|
|
2911
2929
|
shape=${this.moreShape}
|
|
2912
2930
|
align="center"
|
|
@@ -2922,7 +2940,7 @@ ${this.value}</textarea
|
|
|
2922
2940
|
slot="content"
|
|
2923
2941
|
></slot>
|
|
2924
2942
|
</sonic-pop>
|
|
2925
|
-
</menu>`}};
|
|
2943
|
+
</menu>`}};yt.styles=[ee`
|
|
2926
2944
|
:host {
|
|
2927
2945
|
display: block;
|
|
2928
2946
|
--sc-menu-gap: 0.15rem;
|
|
@@ -3050,27 +3068,27 @@ ${this.value}</textarea
|
|
|
3050
3068
|
rgba(0, 0, 0, 0) 100%
|
|
3051
3069
|
);
|
|
3052
3070
|
}
|
|
3053
|
-
`,
|
|
3071
|
+
`,sl],Lt([h({type:String,reflect:!0})],yt.prototype,"size",2),Lt([h({type:String,reflect:!0})],yt.prototype,"direction",2),Lt([h({type:String})],yt.prototype,"gap",2),Lt([h({type:String,reflect:!0})],yt.prototype,"align",2),Lt([h({type:String,reflect:!0})],yt.prototype,"shadow",2),Lt([h({type:String})],yt.prototype,"moreShape",2),Lt([h({type:Boolean})],yt.prototype,"scrollable",2),Lt([h({type:String})],yt.prototype,"minWidth",2),Lt([Cs("menu")],yt.prototype,"menu",2),Lt([Cs("#menu-content")],yt.prototype,"menuContent",2),Lt([nl({selector:"*"})],yt.prototype,"menuChildren",2),Lt([nl({slot:"more",selector:"*"})],yt.prototype,"moreElements",2),Lt([Ce()],yt.prototype,"hasMoreElements",2),yt=Lt([X(Tp)],yt);var Lp=Object.defineProperty,Mp=Object.getOwnPropertyDescriptor,ol=(t,e,s,i)=>{for(var r=i>1?void 0:i?Mp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Lp(e,s,r),r};const Np="sonic-modal-actions";let Ji=class extends J{firstUpdated(t){this.buttons?.forEach(e=>{e.hasAttribute("hideModal")&&e.addEventListener("click",()=>{gs.getClosestElement(this,"sonic-modal")?.hide()})}),super.firstUpdated(t)}render(){return j`<slot></slot>`}};Ji.styles=[ee`
|
|
3054
3072
|
:host {
|
|
3055
3073
|
display: flex;
|
|
3056
3074
|
gap: 0.5rem;
|
|
3057
3075
|
margin-top: auto;
|
|
3058
3076
|
padding-top: 1.5rem;
|
|
3059
3077
|
}
|
|
3060
|
-
`],
|
|
3078
|
+
`],ol([Nr({selector:"sonic-button"})],Ji.prototype,"buttons",2),Ji=ol([X(Np)],Ji);var Ip=Object.defineProperty,Fp=Object.getOwnPropertyDescriptor,Xi=(t,e,s,i)=>{for(var r=i>1?void 0:i?Fp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Ip(e,s,r),r};const Rp="sonic-modal-close";let ri=class extends J{constructor(){super(...arguments),this.translation={fr:"Fermer la fenêtre",en:"Close window",de:"Fenster schließen",nl:"Venster sluiten",es:"Cerrar"}}connectedCallback(){super.connectedCallback(),this.lang=document.documentElement.lang?.split("-")[0]??"fr"}render(){return j`<sonic-button
|
|
3061
3079
|
noAutoFill
|
|
3062
3080
|
data-aria-label=${this.translation[this.lang]}
|
|
3063
|
-
reset=${
|
|
3081
|
+
reset=${se(this.reset)}
|
|
3064
3082
|
shape="circle"
|
|
3065
3083
|
@click=${this.handleClick}
|
|
3066
|
-
type=${
|
|
3084
|
+
type=${se(this.type)}
|
|
3067
3085
|
><sonic-icon name="cancel" size="lg"></sonic-icon
|
|
3068
|
-
></sonic-button>`}handleClick(){
|
|
3086
|
+
></sonic-button>`}handleClick(){qe.getClosestElement(this,"sonic-modal").hide()}};Xi([h()],ri.prototype,"translation",2),Xi([h()],ri.prototype,"reset",2),Xi([h()],ri.prototype,"type",2),ri=Xi([X(Rp)],ri);var jp=Object.getOwnPropertyDescriptor,zp=(t,e,s,i)=>{for(var r=i>1?void 0:i?jp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Up="sonic-modal-content";let ao=class extends J{render(){return j`<slot></slot>`}};ao.styles=[ee`
|
|
3069
3087
|
:host {
|
|
3070
3088
|
display: block;
|
|
3071
3089
|
width: 100%;
|
|
3072
3090
|
}
|
|
3073
|
-
`],
|
|
3091
|
+
`],ao=zp([X(Up)],ao);var qp=Object.getOwnPropertyDescriptor,Bp=(t,e,s,i)=>{for(var r=i>1?void 0:i?qp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Hp="sonic-modal-subtitle";let lo=class extends J{render(){return j`<slot></slot>`}};lo.styles=[ee`
|
|
3074
3092
|
:host {
|
|
3075
3093
|
font-size: 1.25rem;
|
|
3076
3094
|
display: block;
|
|
@@ -3082,7 +3100,7 @@ ${this.value}</textarea
|
|
|
3082
3100
|
font-weight: var(--sc-headings-font-weight, 700);
|
|
3083
3101
|
font-style: var(--sc-headings-font-style, normal);
|
|
3084
3102
|
}
|
|
3085
|
-
`],
|
|
3103
|
+
`],lo=Bp([X(Hp)],lo);var Vp=Object.getOwnPropertyDescriptor,Wp=(t,e,s,i)=>{for(var r=i>1?void 0:i?Vp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Kp="sonic-modal-title";let co=class extends J{render(){return j`<slot></slot>`}};co.styles=[ee`
|
|
3086
3104
|
:host {
|
|
3087
3105
|
font-weight: bold;
|
|
3088
3106
|
font-size: 1.5rem;
|
|
@@ -3095,30 +3113,30 @@ ${this.value}</textarea
|
|
|
3095
3113
|
font-weight: var(--sc-headings-font-weight, 700);
|
|
3096
3114
|
font-style: var(--sc-headings-font-style, normal);
|
|
3097
3115
|
}
|
|
3098
|
-
`],
|
|
3116
|
+
`],co=Wp([X(Kp)],co);var Yp=Object.defineProperty,Gp=Object.getOwnPropertyDescriptor,Ze=(t,e,s,i)=>{for(var r=i>1?void 0:i?Gp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Yp(e,s,r),r};const al="sonic-modal";let Ee=class extends Ct(J){constructor(){super(...arguments),this.forceAction=!1,this.noCloseButton=!1,this.removeOnHide=!1,this.removeHashOnHide=!1,this.align="left",this.maxWidth="min(100vw, 40rem)",this.maxHeight="90vh",this.width="100%",this.height="fit-content",this.effect="slide",this.fullScreen=!1,this.visible=!1,this.closeOnLocationChange=!1,this.location="",this._animationState="hidden",this._adoptedStyleSheets=[],this._animationConfig={quartOut:"cubic-bezier(0.165, 0.84, 0.44, 1)",quadOut:"cubic-bezier(0.25, 0.46, 0.45, 0.94)",linear:"linear",translateY:"translateY(2.5rem)",durationIn:300,durationOut:300}}static create(t){const e=document.createElement(al);return e.options=t,t.removeHashOnHide===!0&&e.setAttribute("removeHashOnHide","true"),t.removeOnHide===!0&&e.setAttribute("removeOnHide","true"),t.closeOnLocationChange===!0&&e.setAttribute("closeOnLocationChange","true"),t.maxWidth&&(e.maxWidth=t?.maxWidth),t.width&&(e.width=t?.width),t.maxHeight&&(e.maxHeight=t?.maxHeight),t.height&&(e.height=t?.height),t.forceAction&&(e.forceAction=!0),t.fullScreen&&(e.fullScreen=t?.fullScreen),t.effect&&(e.effect=t?.effect),t.noCloseButton&&(e.noCloseButton=!0),t.closeButtonType&&(e.closeButtonType=t?.closeButtonType),t.styleSheet&&(e.styleSheet=t?.styleSheet),t.paddingX&&(e.paddingX=t?.paddingX),t.paddingY&&(e.paddingY=t?.paddingY),t.zIndex&&(e.zIndex=t?.zIndex),Rt.getPopContainer().appendChild(e),e.updateComplete.then(()=>{e.show()}),e}connectedCallback(){Ee.modals.push(this),ct.onChange(this),super.connectedCallback()}disconnectedCallback(){ct.offChange(this),Ee.modals.splice(Ee.modals.indexOf(this),1),this.removeEventListener("keydown",this.handleEscape),super.disconnectedCallback()}firstUpdated(){this.addEventListener("keydown",this.handleEscape)}willUpdate(t){if(this.closeOnLocationChange&&t.has("location")){const e=t.get("location");e&&this.location&&this.location!==e&&setTimeout(()=>{this.hide()},50)}t.has("zIndex")&&this.style.setProperty("--sc_z-index",this.zIndex||"990"),t.has("paddingX")&&this.style.setProperty("--sc-modal-px",this.paddingX||""),t.has("paddingY")&&this.style.setProperty("--sc-modal-py",this.paddingY||""),super.willUpdate(t)}updated(t){const e=!t.get("visible")&&this.visible,s=t.get("visible")&&!this.visible;e&&this._animationState==="hidden"?this.show():s&&this._animationState==="visible"&&this.hide(),t.has("styleSheet")&&this.syncAdoptedStyleSheets()}handleOverlayClick(t){!this.forceAction&&this._animationState==="visible"&&this.hide()}render(){const t={maxWidth:this.maxWidth,maxHeight:this.maxHeight,width:this.width,height:this.height,pointerEvents:this._animationState!=="hidden"?"auto":"none"},e={display:this.fullScreen?"none":"block",pointerEvents:this._animationState==="visible"?"auto":"none"};return j`
|
|
3099
3117
|
<div
|
|
3100
3118
|
id="backdrop"
|
|
3101
3119
|
@click=${this.handleOverlayClick}
|
|
3102
|
-
style=${
|
|
3120
|
+
style=${kt(e)}
|
|
3103
3121
|
></div>
|
|
3104
3122
|
<dialog
|
|
3105
3123
|
id="modal"
|
|
3106
3124
|
part="modal"
|
|
3107
3125
|
class="custom-scroll"
|
|
3108
3126
|
aria-modal="true"
|
|
3109
|
-
style=${
|
|
3127
|
+
style=${kt(t)}
|
|
3110
3128
|
>
|
|
3111
|
-
${this._animationState!=="hidden"?
|
|
3112
|
-
${!this.forceAction&&!this.noCloseButton?
|
|
3129
|
+
${this._animationState!=="hidden"?j`<div id="modal-content">
|
|
3130
|
+
${!this.forceAction&&!this.noCloseButton?j`<sonic-modal-close
|
|
3113
3131
|
class="${this._animationState=="visible"?"animate-in":"animate-out"}"
|
|
3114
|
-
type=${
|
|
3115
|
-
></sonic-modal-close>`:
|
|
3132
|
+
type=${se(this.closeButtonType)}
|
|
3133
|
+
></sonic-modal-close>`:te}
|
|
3116
3134
|
${this.modalFragment("title")} ${this.modalFragment("subtitle")}
|
|
3117
3135
|
${this.modalFragment("content")} ${this.modalFragment("actions")}
|
|
3118
3136
|
<slot></slot>
|
|
3119
|
-
</div>`:
|
|
3137
|
+
</div>`:te}
|
|
3120
3138
|
</dialog>
|
|
3121
|
-
`}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=
|
|
3139
|
+
`}syncAdoptedStyleSheets(){if(!(this.renderRoot instanceof ShadowRoot))return;const t=Bn(this.styleSheet),e=this.renderRoot.adoptedStyleSheets.filter(s=>!this._adoptedStyleSheets.includes(s));this.renderRoot.adoptedStyleSheets=[...e,...t],this._adoptedStyleSheets=t}modalFragment(t){const e=this.options?.[t];if(!e)return te;let s;switch(e instanceof Object?s=e:s=Re(e),t){case"title":return j`<sonic-modal-title>${s}</sonic-modal-title>`;case"subtitle":return j`<sonic-modal-subtitle>${s}</sonic-modal-subtitle>`;case"content":return j`<sonic-modal-content>${s}</sonic-modal-content>`;case"actions":return j`<sonic-modal-actions>${s}</sonic-modal-actions>`;default:return te}}async show(){this._modalElement.show(),this._animationState="in",await this.animation("in"),this._animationState="visible",this.visible=!0,this.dispatchEvent(new CustomEvent("show")),this._modalElement.focus()}async hide(){this._animationState="out",this.dispatchEvent(new CustomEvent("hide")),await this.animation("out"),this._modalElement.close(),this._animationState="hidden",this.visible=!1,this.hasAttribute("resetDataProviderOnHide")&&ve.get(this.getAttribute("resetDataProviderOnHide")).set({}),this.removeHashOnHide&&window.history.replaceState({},"",window.location.pathname),this.removeOnHide&&this.remove(),this.dispatchEvent(new CustomEvent("hidden"))}async dispose(){await this.hide(),this.remove()}static disposeAll(){Ee.modals.forEach(t=>{t.dispose()})}handleEscape(t){if(t.key==="Escape"){t.preventDefault();const e=Ee.modals.filter(s=>s._animationState!=="hidden"&&!s.forceAction);e.length>0&&e[e.length-1].hide()}}animation(t){return new Promise(e=>{const{quartOut:s,linear:i,translateY:r,durationIn:n,durationOut:o,quadOut:c}=this._animationConfig,d=this._modalElement;if(!d)return e();const b=t==="in",k=b?n:o,g=!this.fullScreen&&b?100:0;this.fullScreen||(b?this.style.setProperty("--sc_backdrop-opacity","0.8"):setTimeout(()=>{this.style.setProperty("--sc_backdrop-opacity","0")},150));const f=[];this.effect==="slide"&&(f.push(d.animate([{transform:b?r:"translateY(0)"},{transform:b?"translateY(0)":r}],{duration:k,easing:b?s:c,fill:"both",delay:g})),f.push(d.animate([{opacity:b?0:1},{opacity:b?1:0}],{duration:k,easing:i,fill:"both",delay:g}))),Promise.all(f.map(A=>A.finished)).then(()=>e())})}};Ee.styles=[Yr,ee`
|
|
3122
3140
|
:host {
|
|
3123
3141
|
--sc-modal-py: 2.5rem;
|
|
3124
3142
|
--sc-modal-px: 1.5rem;
|
|
@@ -3269,17 +3287,17 @@ ${this.value}</textarea
|
|
|
3269
3287
|
transform: scale(0) !important;
|
|
3270
3288
|
transition: 0.2s linear !important;
|
|
3271
3289
|
}
|
|
3272
|
-
`],Ee.modals=[],
|
|
3290
|
+
`],Ee.modals=[],Ze([h({type:Boolean})],Ee.prototype,"forceAction",2),Ze([h({type:Boolean})],Ee.prototype,"noCloseButton",2),Ze([h({type:Boolean})],Ee.prototype,"removeOnHide",2),Ze([h({type:Boolean})],Ee.prototype,"removeHashOnHide",2),Ze([h({type:String,reflect:!0})],Ee.prototype,"align",2),Ze([h({type:String})],Ee.prototype,"paddingX",2),Ze([h({type:String})],Ee.prototype,"paddingY",2),Ze([h({type:String})],Ee.prototype,"maxWidth",2),Ze([h({type:String})],Ee.prototype,"maxHeight",2),Ze([h({type:String})],Ee.prototype,"zIndex",2),Ze([h({type:String})],Ee.prototype,"width",2),Ze([h({type:String})],Ee.prototype,"height",2),Ze([h({type:String})],Ee.prototype,"effect",2),Ze([h({attribute:!1})],Ee.prototype,"styleSheet",2),Ze([h({type:Object})],Ee.prototype,"options",2),Ze([h({type:Boolean,reflect:!0})],Ee.prototype,"fullScreen",2),Ze([h({type:Boolean,reflect:!0})],Ee.prototype,"visible",2),Ze([h({type:String})],Ee.prototype,"closeButtonType",2),Ze([Cs("#modal")],Ee.prototype,"_modalElement",2),Ze([h({type:Boolean})],Ee.prototype,"closeOnLocationChange",2),Ze([Ce()],Ee.prototype,"location",2),Ze([Ce()],Ee.prototype,"_animationState",2),Ee=Ze([X(al)],Ee),typeof window<"u"&&(window.SonicModal=Ee);var Zp=Object.defineProperty,Jp=Object.getOwnPropertyDescriptor,ls=(t,e,s,i)=>{for(var r=i>1?void 0:i?Jp(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Zp(e,s,r),r};const Xp={warning:"warning-circled-outline",success:"check-circled-outline",error:"warning-circled-outline",info:"info-empty",default:"info-empty"},Qp="sonic-alert";let Wt=class extends J{constructor(){super(...arguments),this.label="",this.noIcon=!1,this.text="",this.id=new Date().getTime().toString(),this.dismissible=!1,this.background=!1,this.status="default",this.dismissForever=!1}connectedCallback(){if(this.dismissForever){const t=localStorage.getItem("sonic-alert-dismissed")||"{}";JSON.parse(t)[this.id]&&this.remove()}super.connectedCallback()}render(){return j`
|
|
3273
3291
|
<slot name="icon" class="${this.noIcon?"hidden":""}"
|
|
3274
|
-
>${this.noIcon?
|
|
3275
|
-
${this.status&&
|
|
3292
|
+
>${this.noIcon?te:j`<div>
|
|
3293
|
+
${this.status&&j`<sonic-icon name=${Xp[this.status]}></sonic-icon>`}
|
|
3276
3294
|
</div>`}</slot
|
|
3277
3295
|
>
|
|
3278
3296
|
<div class="content">
|
|
3279
|
-
${this.label?
|
|
3297
|
+
${this.label?j`<span class="label">${Re(this.label)}</span>`:te}
|
|
3280
3298
|
<div>${this.text}<slot></slot></div>
|
|
3281
3299
|
</div>
|
|
3282
|
-
${this.dismissible?
|
|
3300
|
+
${this.dismissible?j`<sonic-button
|
|
3283
3301
|
@click=${this.close}
|
|
3284
3302
|
class="close-btn"
|
|
3285
3303
|
variant="unstyled"
|
|
@@ -3287,8 +3305,8 @@ ${this.value}</textarea
|
|
|
3287
3305
|
icon
|
|
3288
3306
|
>
|
|
3289
3307
|
<sonic-icon name="cancel"></sonic-icon>
|
|
3290
|
-
</sonic-button>`:
|
|
3291
|
-
`}close(){if(this.remove(),this.dismissForever){const t=localStorage.getItem("sonic-alert-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(e))}}};
|
|
3308
|
+
</sonic-button>`:te}
|
|
3309
|
+
`}close(){if(this.remove(),this.dismissForever){const t=localStorage.getItem("sonic-alert-dismissed")||"{}",e=JSON.parse(t);e[this.id]=!0,localStorage.setItem("sonic-alert-dismissed",JSON.stringify(e))}}};Wt.styles=[ss,ee`
|
|
3292
3310
|
:host {
|
|
3293
3311
|
--sc_color: var(--sc-base-content, #000);
|
|
3294
3312
|
--sc_rounded: var(--sc-rounded);
|
|
@@ -3375,22 +3393,22 @@ ${this.value}</textarea
|
|
|
3375
3393
|
top: 0.4rem;
|
|
3376
3394
|
right: 0.3rem;
|
|
3377
3395
|
}
|
|
3378
|
-
`],ls([
|
|
3379
|
-
${
|
|
3396
|
+
`],ls([h({type:String})],Wt.prototype,"label",2),ls([h({type:Boolean,reflect:!0})],Wt.prototype,"noIcon",2),ls([h({type:String})],Wt.prototype,"text",2),ls([h({type:String})],Wt.prototype,"id",2),ls([h({type:String,reflect:!0})],Wt.prototype,"size",2),ls([h({type:Boolean,reflect:!0})],Wt.prototype,"dismissible",2),ls([h({type:Boolean,reflect:!0})],Wt.prototype,"background",2),ls([h({type:String,reflect:!0})],Wt.prototype,"status",2),ls([h({type:Boolean,reflect:!0})],Wt.prototype,"dismissForever",2),Wt=ls([X(Qp)],Wt);var ef=Object.defineProperty,tf=Object.getOwnPropertyDescriptor,ii=(t,e,s,i)=>{for(var r=i>1?void 0:i?tf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ef(e,s,r),r};const sf="sonic-alert-messages";let rr=class extends Ct(J){constructor(){super(...arguments),this.size="md",this.background=!1,this.noIcon=!1,this.messages=[]}render(){return this.messages?.length?j`<div class="container">
|
|
3397
|
+
${Fa(this.messages,t=>t.type=="public"?j`<sonic-alert
|
|
3380
3398
|
status=${t.status||"default"}
|
|
3381
|
-
text=${
|
|
3399
|
+
text=${se(t.content)}
|
|
3382
3400
|
size=${this.size}
|
|
3383
3401
|
?noIcon=${this.noIcon}
|
|
3384
3402
|
?background=${this.background}
|
|
3385
|
-
></sonic-alert>`:
|
|
3386
|
-
</div>`:
|
|
3403
|
+
></sonic-alert>`:te)}
|
|
3404
|
+
</div>`:te}};rr.styles=[ee`
|
|
3387
3405
|
.container {
|
|
3388
3406
|
display: grid;
|
|
3389
3407
|
gap: 0.5em;
|
|
3390
3408
|
grid-template-columns: minmax(0, 1fr);
|
|
3391
3409
|
width: 100%;
|
|
3392
3410
|
}
|
|
3393
|
-
`],ii([
|
|
3411
|
+
`],ii([h({type:String})],rr.prototype,"size",2),ii([h({type:Boolean})],rr.prototype,"background",2),ii([h({type:Boolean})],rr.prototype,"noIcon",2),ii([h({type:Array})],rr.prototype,"messages",2),rr=ii([X(sf)],rr);var rf=Object.defineProperty,nf=Object.getOwnPropertyDescriptor,ll=(t,e,s,i)=>{for(var r=i>1?void 0:i?nf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&rf(e,s,r),r};const of="sonic-toast-message-subscriber";let ho=class extends Ct(J){constructor(){super(...arguments),this._messages=[]}get messages(){return this._messages}set messages(t){this._messages=t,this.messages&&t.forEach(e=>{e.type=="public"&&_e.add({text:e.content||"",status:e.status})})}render(){return te}};ll([h({type:Array})],ho.prototype,"messages",1),ho=ll([X(of)],ho);var af=Object.defineProperty,lf=Object.getOwnPropertyDescriptor,ni=(t,e,s,i)=>{for(var r=i>1?void 0:i?lf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&af(e,s,r),r};const cf="sonic-tooltip";let ir=class extends J{constructor(){super(),this.label="",this.disabled=!1,this.focusable=!1,this.lastKeyWasTab=!1,this.handleKeyDown=t=>{t.key==="Tab"&&(this.lastKeyWasTab=!0)},this.handleMouseDown=()=>{this.lastKeyWasTab=!1,this.classList.remove("keyboard-focus")},this.handleFocusIn=()=>{this.lastKeyWasTab&&this.classList.add("keyboard-focus"),this.lastKeyWasTab=!1},this.handleFocusOut=()=>{this.classList.remove("keyboard-focus"),this.lastKeyWasTab=!1},this.boundHandleKeyDown=this.handleKeyDown.bind(this),this.boundHandleMouseDown=this.handleMouseDown.bind(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("focusin",this.handleFocusIn),this.addEventListener("focusout",this.handleFocusOut),document.addEventListener("keydown",this.boundHandleKeyDown,!0),document.addEventListener("mousedown",this.boundHandleMouseDown,!0)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("focusin",this.handleFocusIn),this.removeEventListener("focusout",this.handleFocusOut),document.removeEventListener("keydown",this.boundHandleKeyDown,!0),document.removeEventListener("mousedown",this.boundHandleMouseDown,!0)}willUpdate(t){if(t.has("disabled")){const e=t.get("disabled")===!0;this.disabled?(this.setAttribute("tabindex","-1"),this.classList.remove("keyboard-focus")):!this.disabled&&e&&(this.focusable?this.setAttribute("tabindex","0"):this.removeAttribute("tabindex"))}t.has("focusable")&&(this.focusable&&!this.disabled?this.setAttribute("tabindex","0"):!this.focusable&&!this.disabled&&this.removeAttribute("tabindex")),super.willUpdate(t)}render(){const t=this.disabled||this.label==""?"disabled":"";return j`<div
|
|
3394
3412
|
data-tooltip-text="${this.label.trim().replace(" "," ")}"
|
|
3395
3413
|
class="tooltip ${t}"
|
|
3396
3414
|
>
|
|
@@ -3501,11 +3519,11 @@ ${this.value}</textarea
|
|
|
3501
3519
|
bottom: 0;
|
|
3502
3520
|
left: var(--sc-tooltip-position);
|
|
3503
3521
|
}
|
|
3504
|
-
`],ni([
|
|
3522
|
+
`],ni([h({type:String})],ir.prototype,"label",2),ni([h({type:String,reflect:!0})],ir.prototype,"placement",2),ni([h({type:Boolean})],ir.prototype,"disabled",2),ni([h({type:Boolean})],ir.prototype,"focusable",2),ir=ni([X(cf)],ir);var hf=Object.defineProperty,uf=Object.getOwnPropertyDescriptor,cs=(t,e,s,i)=>{for(var r=i>1?void 0:i?uf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&hf(e,s,r),r};const df="sonic-divider";let Kt=class extends J{constructor(){super(...arguments),this.label="",this.align="center",this.vertical=!1,this.noMargin=!1,this.dashed=!1,this.dotted=!1}firstUpdated(t){super.firstUpdated(t),(this.label||this.slotNodes?.length)&&this.divider?.classList.add("has-text")}render(){return j`<div part="divider">
|
|
3505
3523
|
<span class="text"
|
|
3506
|
-
>${
|
|
3524
|
+
>${Re(this.label?this.label:"")}<slot></slot
|
|
3507
3525
|
></span>
|
|
3508
|
-
</div>`}};
|
|
3526
|
+
</div>`}};Kt.styles=[ee`
|
|
3509
3527
|
:host {
|
|
3510
3528
|
--sc-divider-my: 0.5rem;
|
|
3511
3529
|
--sc-divider-mx: 0;
|
|
@@ -3636,7 +3654,7 @@ ${this.value}</textarea
|
|
|
3636
3654
|
:host([dashed]) {
|
|
3637
3655
|
--sc-divider-border-style: dashed;
|
|
3638
3656
|
}
|
|
3639
|
-
`],cs([
|
|
3657
|
+
`],cs([mt({flatten:!0})],Kt.prototype,"slotNodes",2),cs([Cs("div")],Kt.prototype,"divider",2),cs([h({type:String})],Kt.prototype,"label",2),cs([h({type:String,reflect:!0})],Kt.prototype,"size",2),cs([h({type:String,reflect:!0})],Kt.prototype,"align",2),cs([h({type:Boolean,reflect:!0})],Kt.prototype,"vertical",2),cs([h({type:Boolean,reflect:!0})],Kt.prototype,"noMargin",2),cs([h({type:Boolean,reflect:!0})],Kt.prototype,"dashed",2),cs([h({type:Boolean,reflect:!0})],Kt.prototype,"dotted",2),Kt=cs([X(df)],Kt);var pf=Object.getOwnPropertyDescriptor,ff=(t,e,s,i)=>{for(var r=i>1?void 0:i?pf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const gf="sonic-card-header-description";let uo=class extends J{render(){return j`<slot></slot>`}};uo.styles=[ee`
|
|
3640
3658
|
:host() {
|
|
3641
3659
|
display: block;
|
|
3642
3660
|
font-size: 0.7em;
|
|
@@ -3644,12 +3662,12 @@ ${this.value}</textarea
|
|
|
3644
3662
|
font-family: var(--sc-font-family-base, sans-serif);
|
|
3645
3663
|
font-weight: var(--sc-font-style-base, normal);
|
|
3646
3664
|
}
|
|
3647
|
-
`],
|
|
3665
|
+
`],uo=ff([X(gf)],uo);var mf=Object.defineProperty,bf=Object.getOwnPropertyDescriptor,po=(t,e,s,i)=>{for(var r=i>1?void 0:i?bf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&mf(e,s,r),r};const vf="sonic-card-header";let oi=class extends J{render(){return j`
|
|
3648
3666
|
<div class="header-content">
|
|
3649
|
-
${
|
|
3650
|
-
${this.description?
|
|
3651
|
-
>${
|
|
3652
|
-
>`:
|
|
3667
|
+
${Re(this.label)}
|
|
3668
|
+
${this.description?j`<sonic-card-header-description
|
|
3669
|
+
>${Re(this.description)}</sonic-card-header-description
|
|
3670
|
+
>`:te}
|
|
3653
3671
|
<slot></slot>
|
|
3654
3672
|
</div>
|
|
3655
3673
|
<slot name="suffix"></slot>
|
|
@@ -3691,15 +3709,15 @@ ${this.value}</textarea
|
|
|
3691
3709
|
::slotted(sonic-card-header-description) {
|
|
3692
3710
|
margin-top: 0.1em;
|
|
3693
3711
|
}
|
|
3694
|
-
`],
|
|
3712
|
+
`],po([h()],oi.prototype,"label",2),po([h()],oi.prototype,"description",2),oi=po([X(vf)],oi);var yf=Object.getOwnPropertyDescriptor,wf=(t,e,s,i)=>{for(var r=i>1?void 0:i?yf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const _f="sonic-card-main";let fo=class extends J{render(){return j`<slot></slot>`}};fo.styles=[ee`
|
|
3695
3713
|
:host {
|
|
3696
3714
|
display: block;
|
|
3697
3715
|
}
|
|
3698
|
-
`],
|
|
3716
|
+
`],fo=wf([X(_f)],fo);var Sf=Object.getOwnPropertyDescriptor,Pf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Sf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const xf="sonic-card-footer";let go=class extends J{render(){return j` <slot></slot> `}};go.styles=[ee`
|
|
3699
3717
|
:host {
|
|
3700
3718
|
display: block;
|
|
3701
3719
|
}
|
|
3702
|
-
`],
|
|
3720
|
+
`],go=Pf([X(xf)],go);const mo=ee`
|
|
3703
3721
|
:host {
|
|
3704
3722
|
--sc-_color: inherit;
|
|
3705
3723
|
color: var(--sc-_color);
|
|
@@ -3724,7 +3742,7 @@ ${this.value}</textarea
|
|
|
3724
3742
|
.inherit-color {
|
|
3725
3743
|
color: var(--sc-_color);
|
|
3726
3744
|
}
|
|
3727
|
-
`,
|
|
3745
|
+
`,Af=ee`
|
|
3728
3746
|
:host {
|
|
3729
3747
|
--sc-_color: inherit;
|
|
3730
3748
|
--sc-_bg: inherit;
|
|
@@ -3787,7 +3805,7 @@ ${this.value}</textarea
|
|
|
3787
3805
|
.inherit-bg {
|
|
3788
3806
|
color: inherit;
|
|
3789
3807
|
}
|
|
3790
|
-
`;var
|
|
3808
|
+
`;var Cf=Object.defineProperty,kf=Object.getOwnPropertyDescriptor,cl=(t,e,s,i)=>{for(var r=i>1?void 0:i?kf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Cf(e,s,r),r};const $f="sonic-card";let Qi=class extends J{constructor(){super(...arguments),this.type="base"}render(){return j`<slot></slot> `}};Qi.styles=[Af,ee`
|
|
3791
3809
|
* {
|
|
3792
3810
|
box-sizing: border-box;
|
|
3793
3811
|
}
|
|
@@ -3817,7 +3835,7 @@ ${this.value}</textarea
|
|
|
3817
3835
|
box-shadow: var(--sc-_shadow);
|
|
3818
3836
|
color: var(--sc-_color);
|
|
3819
3837
|
}
|
|
3820
|
-
`],
|
|
3838
|
+
`],cl([h({type:String,reflect:!0})],Qi.prototype,"type",2),Qi=cl([X($f)],Qi);var Df=Object.defineProperty,Ef=Object.getOwnPropertyDescriptor,ai=(t,e,s,i)=>{for(var r=i>1?void 0:i?Ef(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Df(e,s,r),r};const Of="sonic-tr";let nr=class extends Ct(J){constructor(){super(...arguments),this._metadata_={}}willUpdate(t){t.has("_metadata_")&&(this.even=!!this._metadata_.even,this.odd=!!this._metadata_.odd,this.last=!!this._metadata_.lastChild),super.willUpdate(t)}render(){return j`<slot></slot>`}};nr.styles=[mo,ee`
|
|
3821
3839
|
:host {
|
|
3822
3840
|
display: table-row;
|
|
3823
3841
|
}
|
|
@@ -3835,11 +3853,11 @@ ${this.value}</textarea
|
|
|
3835
3853
|
:host(:hover) {
|
|
3836
3854
|
background: var(--sc-table-hover-bg) !important;
|
|
3837
3855
|
}
|
|
3838
|
-
`],ai([
|
|
3856
|
+
`],ai([h({type:Object})],nr.prototype,"_metadata_",2),ai([h({type:Boolean,reflect:!0})],nr.prototype,"even",2),ai([h({type:Boolean,reflect:!0})],nr.prototype,"odd",2),ai([h({type:Boolean,reflect:!0})],nr.prototype,"last",2),nr=ai([X(Of)],nr);var Tf=Object.defineProperty,Lf=Object.getOwnPropertyDescriptor,or=(t,e,s,i)=>{for(var r=i>1?void 0:i?Lf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Tf(e,s,r),r};const Mf="sonic-th";let ws=class extends J{render(){const t={textAlign:this.align,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return j`<th
|
|
3839
3857
|
part="th"
|
|
3840
|
-
style=${
|
|
3841
|
-
colspan=${
|
|
3842
|
-
rowspan=${
|
|
3858
|
+
style=${kt(t)}
|
|
3859
|
+
colspan=${se(this.colSpan)}
|
|
3860
|
+
rowspan=${se(this.rowSpan)}
|
|
3843
3861
|
>
|
|
3844
3862
|
<slot></slot>
|
|
3845
3863
|
</th> `}};ws.styles=[mo,ee`
|
|
@@ -3865,9 +3883,9 @@ ${this.value}</textarea
|
|
|
3865
3883
|
:host([noBorder]) th {
|
|
3866
3884
|
border-bottom: none;
|
|
3867
3885
|
}
|
|
3868
|
-
`],or([
|
|
3886
|
+
`],or([h({type:Number})],ws.prototype,"colSpan",2),or([h({type:Number})],ws.prototype,"rowSpan",2),or([h({type:String})],ws.prototype,"align",2),or([h({type:String})],ws.prototype,"minWidth",2),or([h({type:String})],ws.prototype,"maxWidth",2),or([h({type:String})],ws.prototype,"width",2),ws=or([X(Mf)],ws);var Nf=Object.defineProperty,If=Object.getOwnPropertyDescriptor,Rs=(t,e,s,i)=>{for(var r=i>1?void 0:i?If(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Nf(e,s,r),r};const Ff="sonic-td";let hs=class extends J{render(){const t={textAlign:this.align,verticalAlign:this.vAlign,minWidth:this.minWidth,maxWidth:this.maxWidth,width:this.width};return j`<td part="td" style=${kt(t)} colspan=${se(this.colSpan)} rowspan=${se(this.rowSpan)}>
|
|
3869
3887
|
<slot></slot>
|
|
3870
|
-
</td>`}};
|
|
3888
|
+
</td>`}};hs.styles=[mo,ee`
|
|
3871
3889
|
:host {
|
|
3872
3890
|
display: contents;
|
|
3873
3891
|
}
|
|
@@ -3880,13 +3898,13 @@ ${this.value}</textarea
|
|
|
3880
3898
|
border-right: var(--sc-table-td-border-r, none);
|
|
3881
3899
|
border-left: var(--sc-table-td-border-l, none);
|
|
3882
3900
|
}
|
|
3883
|
-
`],Rs([
|
|
3901
|
+
`],Rs([h({type:Number})],hs.prototype,"colSpan",2),Rs([h({type:Number})],hs.prototype,"rowSpan",2),Rs([h({type:String})],hs.prototype,"align",2),Rs([h({type:String})],hs.prototype,"vAlign",2),Rs([h({type:String})],hs.prototype,"minWidth",2),Rs([h({type:String})],hs.prototype,"maxWidth",2),Rs([h({type:String})],hs.prototype,"width",2),hs=Rs([X(Ff)],hs);var Rf=Object.getOwnPropertyDescriptor,jf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Rf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const zf="sonic-thead";let bo=class extends J{render(){return j`<slot></slot>`}};bo.styles=[ee`
|
|
3884
3902
|
:host {
|
|
3885
3903
|
display: table-header-group;
|
|
3886
3904
|
}
|
|
3887
|
-
`],
|
|
3905
|
+
`],bo=jf([X(zf)],bo);var Uf=Object.getOwnPropertyDescriptor,qf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Uf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Bf="sonic-tbody";let vo=class extends J{render(){return j`<tbody part="tbody">
|
|
3888
3906
|
<slot></slot>
|
|
3889
|
-
</tbody>`}};
|
|
3907
|
+
</tbody>`}};vo.styles=[ee`
|
|
3890
3908
|
:host {
|
|
3891
3909
|
display: table-row-group;
|
|
3892
3910
|
}
|
|
@@ -3903,29 +3921,29 @@ ${this.value}</textarea
|
|
|
3903
3921
|
border-bottom: var(--sc-form-border-width) solid
|
|
3904
3922
|
var(--sc-base-200, rgba(0, 0, 0, 0.12)) !important;
|
|
3905
3923
|
}
|
|
3906
|
-
`],
|
|
3924
|
+
`],vo=qf([X(Bf)],vo);var Hf=Object.getOwnPropertyDescriptor,Vf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Hf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Wf="sonic-tfoot";let yo=class extends J{render(){return j`<tfoot>
|
|
3907
3925
|
<slot></slot>
|
|
3908
|
-
</tfoot>`}};
|
|
3926
|
+
</tfoot>`}};yo.styles=[ee`
|
|
3909
3927
|
:host {
|
|
3910
3928
|
display: contents;
|
|
3911
3929
|
}
|
|
3912
|
-
`],
|
|
3930
|
+
`],yo=Vf([X(Wf)],yo);var Kf=Object.getOwnPropertyDescriptor,Yf=(t,e,s,i)=>{for(var r=i>1?void 0:i?Kf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=o(r)||r);return r};const Gf="sonic-caption";let wo=class extends J{render(){return j`<slot></slot>`}};wo.styles=[ee`
|
|
3913
3931
|
:host {
|
|
3914
3932
|
display: table-caption;
|
|
3915
3933
|
font-size: 0.75rem;
|
|
3916
3934
|
color: var(--sc-table-caption-color);
|
|
3917
3935
|
padding: var(--sc-table-td-py) var(--sc-table-td-px) calc(2 * var(--sc-table-td-py));
|
|
3918
3936
|
}
|
|
3919
|
-
`],
|
|
3937
|
+
`],wo=Yf([X(Gf)],wo);var Zf=Object.defineProperty,Jf=Object.getOwnPropertyDescriptor,Cr=(t,e,s,i)=>{for(var r=i>1?void 0:i?Jf(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&Zf(e,s,r),r};const Xf="sonic-table";let js=class extends J{render(){const t={maxHeight:this.maxHeight};return j`
|
|
3920
3938
|
<div
|
|
3921
3939
|
class="table-container ${this.noCustomScroll?"":"custom-scroll"}"
|
|
3922
|
-
style=${
|
|
3940
|
+
style=${kt(t)}
|
|
3923
3941
|
>
|
|
3924
3942
|
<div class="table">
|
|
3925
3943
|
<slot></slot>
|
|
3926
3944
|
</div>
|
|
3927
3945
|
</div>
|
|
3928
|
-
`}};
|
|
3946
|
+
`}};js.styles=[Yr,ss,ee`
|
|
3929
3947
|
:host {
|
|
3930
3948
|
--sc-table-fw: var(--sc-font-weight-base, 400);
|
|
3931
3949
|
--sc-table-fst: var(--sc-font-style-base, normal);
|
|
@@ -3970,7 +3988,7 @@ ${this.value}</textarea
|
|
|
3970
3988
|
--sc-table-td-border-b: var(--sc-table-bw) solid
|
|
3971
3989
|
var(--sc-table-border-color);
|
|
3972
3990
|
}
|
|
3973
|
-
`],Cr([
|
|
3991
|
+
`],Cr([h({type:String,reflect:!0})],js.prototype,"size",2),Cr([h({type:Boolean,reflect:!0})],js.prototype,"bordered",2),Cr([h({type:Boolean,reflect:!0})],js.prototype,"rounded",2),Cr([h({type:Boolean,reflect:!0})],js.prototype,"noCustomScroll",2),Cr([h({type:String})],js.prototype,"maxHeight",2),js=Cr([X(Xf)],js);const hl="AES-CBC",Qf=256;async function eg(){return crypto.subtle.generateKey({name:hl,length:Qf},!0,["encrypt","decrypt"])}function tg(t){return btoa(String.fromCharCode(...new Uint8Array(t)))}async function sg(t,e,s){const i=new TextEncoder().encode(t),r=await crypto.subtle.encrypt({name:hl,iv:s.buffer},e,i);return tg(r)}const rg=ee`
|
|
3974
3992
|
@keyframes altcha-spinner {
|
|
3975
3993
|
to {
|
|
3976
3994
|
transform: rotate(360deg);
|
|
@@ -4193,7 +4211,7 @@ ${this.value}</textarea
|
|
|
4193
4211
|
animation: altcha-spinner 0.75s infinite linear;
|
|
4194
4212
|
transform-origin: center;
|
|
4195
4213
|
}
|
|
4196
|
-
`;var
|
|
4214
|
+
`;var ig=Object.defineProperty,ng=Object.getOwnPropertyDescriptor,en=(t,e,s,i)=>{for(var r=i>1?void 0:i?ng(e,s):e,n=t.length-1,o;n>=0;n--)(o=t[n])&&(r=(i?o(e,s,r):o(r))||r);return i&&r&&ig(e,s,r),r};const og="supersoniks_altcha",ag="Si2\\]X8M4!n9DCLd";let ul=!1;const lg="sonic-captcha";let kr=class extends Qs(J){constructor(){super(...arguments),this.key="",this.action=null,this.zIndex=9999,this.onCaptchaTokenChanged=t=>{t=="request_token"&&(this.formPublisher&&this.formPublisher.captchaToken.set(""),this.requestToken())},this.maxNumber=5e4,this.chalengeUrl="https://altcha.supersoniks.org/get-challenge"}connectedCallback(){if(document.location.protocol.includes("https")){if(!ul){const t=document.createElement("script");t.type="module",this.setAttribute("async",""),this.setAttribute("defer",""),t.src="https://cdn.jsdelivr.net/gh/altcha-org/altcha/dist/altcha.min.js",ul=!0,document.head.appendChild(t)}this.generateEncryptedKey(),super.connectedCallback(),this.formPublisher=vi(this.getAncestorAttributeValue("headersDataProvider")??this.getAncestorAttributeValue("formDataProvider")),this.formPublisher&&!this.formPublisher.captchaToken.get()&&(this.formPublisher.needsCaptchaValidation.set(!0),this.formPublisher.captchaToken.onAssign(this.onCaptchaTokenChanged))}}disconnectedCallback(){this.formPublisher&&(this.formPublisher.captchaToken.offAssign(this.onCaptchaTokenChanged),this.formPublisher.captchaToken.set(""),this.formPublisher.needsCaptchaValidation.set(!1)),super.disconnectedCallback()}requestToken(){if(!this.formPublisher)return;const t=this.shadowRoot.querySelector("form");if(!t)return;const e=new FormData(t);this.formPublisher.captchaKey.set(this.key),this.formPublisher.captchaToken.set(e.get("altcha")?.toString()||"")}async generateEncryptedKey(){if(this.key)return;const t=await eg(),e=new TextEncoder().encode(ag),s=await sg(og,t,e);this.key=s}render(){if(!this.key)return te;const e=gs.getLanguage().match("^fr\\b")?{aria:"Visitez altcha.org",error:"La vérification a échoué, réessayez plus tard.",expired:"La vérification a expiré, réessayez.",footer:"Protégé par Altcha",label:"Je ne suis pas un robot.",verified:"Vérifié",verifying:"Vérification en cours...",wait:"Vérification en cours… Veuillez patienter."}:{aria:"Visit altcha.org",error:"Verification failed, try again later.",expired:"Verification expired, try again.",footer:"Protected by Altcha",label:"I'm not a robot.",verified:"Verified",verifying:"Verifying...",wait:"Verifying... Please wait."};return j`
|
|
4197
4215
|
<form>
|
|
4198
4216
|
<altcha-widget
|
|
4199
4217
|
challengeurl="${this.chalengeUrl}?key=${this.key}&maxNumber=${this.maxNumber}"
|
|
@@ -4205,7 +4223,7 @@ ${this.value}</textarea
|
|
|
4205
4223
|
></altcha-widget>
|
|
4206
4224
|
</form>
|
|
4207
4225
|
<slot></slot>
|
|
4208
|
-
`}};kr.styles=[
|
|
4226
|
+
`}};kr.styles=[rg,ee`
|
|
4209
4227
|
:host {
|
|
4210
4228
|
--altcha-border-width: var(--sc-border-width, 1px);
|
|
4211
4229
|
--altcha-border-radius: var(--sc-rounded);
|
|
@@ -4224,4 +4242,4 @@ ${this.value}</textarea
|
|
|
4224
4242
|
--altcha-color-footer-bg: var(--sc-base-100, #000);
|
|
4225
4243
|
--altcha-max-width: 260px;
|
|
4226
4244
|
}
|
|
4227
|
-
`],
|
|
4245
|
+
`],en([h()],kr.prototype,"key",2),en([h()],kr.prototype,"action",2),en([h({type:Number})],kr.prototype,"zIndex",2),kr=en([X(lg)],kr),window.queueMicrotask=window.queueMicrotask||function(t){Promise.resolve().then(t).catch(e=>setTimeout(()=>{throw e}))};class cg extends _n{constructor(e){super(e),this.observables=new Set,this.cleanupWatchers=[],this.onAssign=s=>{this.setValue(s)},this.node=e.options?.host}teardownWatchers(){this.cleanupWatchers.forEach(e=>e()),this.cleanupWatchers=[]}normalizeInput(e){return ba(e)?e.path:e}render(e){const s=this.normalizeInput(e),i=this.pathTemplate!==s;return i&&(this.pathTemplate=s,this.teardownWatchers()),(i||!this.resolvedPath)&&queueMicrotask(()=>{!this.isConnected||!this.pathTemplate||this.setupSubscription()}),It}setupSubscription(){const e=this.node,s=this.pathTemplate;if(!e||!s)return;this.teardownWatchers();const i=qt(s);if(i.length>0)for(const r of i)this.cleanupWatchers.push(Es(Ri.watcherStore,Ri.hooked,e,r,()=>this.refreshSubscription()));this.refreshSubscription()}refreshSubscription(){const e=this.node,s=this.pathTemplate;if(!s)return;const i=qt(s).length>0;let r=s;if(i)if(!e)r=null;else{const n=Ot(e,s);r=n.ready?n.path:null}if(r!==this.resolvedPath){if(!r){this.unsubscribe(),this.resolvedPath=void 0,this.setValue(void 0);return}this.resolvedPath=r,this.subscribe(r)}}subscribe(e){this.unsubscribe(),this.onAssign=s=>{this.setValue(s)},this.observables=mi(e),this.observables.forEach(s=>{s.onAssign(this.onAssign)})}unsubscribe(){this.observables.forEach(e=>e.offAssign(this.onAssign)),this.observables.clear()}disconnected(){this.teardownWatchers(),this.unsubscribe(),this.resolvedPath=void 0}reconnected(){this.pathTemplate&&this.setupSubscription()}}const dl=$s(cg),hg=dl,ug=dl;window["concorde-directives-data-provider"]=window["concorde-directives-data-provider"]||{},window["concorde-directives-data-provider"]={dp:vi,dataProvider:Cl,sub:ug,subscribe:hg,get:Al,set:kl};const dg=_e,pg=Ee;window["concorde-components"]=window["concorde-components"]||{},window["concorde-components"]={SonicToast:dg,SonicModal:pg};const fg=window;fg.concordeIsLoaded=!0,window.dispatchEvent(new CustomEvent("concorde-loaded"))}));
|