@supersoniks/concorde 4.9.98-visual-stack.0 → 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-3d.bundle.js +201 -152
- package/concorde-3d.es.js +14687 -13905
- package/concorde-core.bundle.js +311 -293
- package/concorde-core.es.js +5195 -5129
- package/concorde-hugging-face-infer.bundle.js +1 -1
- package/concorde-hugging-face-infer.es.js +1 -1
- package/concorde-shader.bundle.js +31 -20
- package/concorde-shader.es.js +2773 -2547
- package/concorde-webgpu.bundle.js +43 -32
- package/concorde-webgpu.es.js +1819 -1553
- 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 -1790
- 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 +79 -353
- package/src/docs/docs.ts +1 -7
- 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 +884 -2354
- package/src/tsconfig.json +313 -490
- 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 -3911
- package/dist/concorde-3d.es.js +0 -32651
- 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 -105
- package/dist/concorde-shader.es.js +0 -8127
- package/dist/concorde-webgpu.bundle.js +0 -296
- package/dist/concorde-webgpu.es.js +0 -8361
- 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 -161
- 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 -90
- 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 -73
- 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 -67
- 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 -55
- 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 -103
- 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 -56
- 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/props.js +0 -105
- 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 -63
- package/dist/js/core/components/functional/3d/reload.js.map +0 -1
- package/dist/js/core/components/functional/3d/runtime.js +0 -116
- 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 -42
- 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 -58
- 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 -738
- package/dist/js/core/components/functional/shader/gl-runtime.js.map +0 -1
- package/dist/js/core/components/functional/shader/shader.js +0 -1642
- package/dist/js/core/components/functional/shader/shader.js.map +0 -1
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js +0 -48
- package/dist/js/core/components/functional/shader/shadertoy-prelude.js.map +0 -1
- package/dist/js/core/components/functional/shader/types.js +0 -179
- 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 -135
- package/dist/js/core/components/functional/webgpu/gl-fallback.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js +0 -305
- package/dist/js/core/components/functional/webgpu/gpu-runtime.js.map +0 -1
- package/dist/js/core/components/functional/webgpu/helpers.js +0 -44
- 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 -676
- 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 -169
- 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 -71
- 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 -36
- 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 -41
- 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 -47
- 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 -26
- 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/props.d.ts +0 -30
- 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 -75
- 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 -32
- package/dist/types/core/components/functional/3d/tune.d.ts.map +0 -1
- package/dist/types/core/components/functional/3d/types.d.ts +0 -140
- 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 -90
- 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 -285
- 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 -6
- 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 -262
- 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 -31
- 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 -53
- 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 -9
- 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 -127
- 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 -53
- 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 -128
- package/src/core/components/functional/3d/3d.spec.ts +0 -171
- package/src/core/components/functional/3d/3d.ts +0 -186
- 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 -100
- package/src/core/components/functional/3d/demo-content.ts +0 -45
- package/src/core/components/functional/3d/ensure.ts +0 -99
- 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 -97
- 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 -101
- 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 -140
- 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 -70
- package/src/core/components/functional/3d/pointer.ts +0 -79
- package/src/core/components/functional/3d/props.ts +0 -50
- package/src/core/components/functional/3d/publisher-listen.ts +0 -13
- package/src/core/components/functional/3d/reload.ts +0 -94
- package/src/core/components/functional/3d/runtime.ts +0 -148
- package/src/core/components/functional/3d/scene-runtime.ts +0 -9
- 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 -72
- package/src/core/components/functional/3d/types.ts +0 -150
- package/src/core/components/functional/3d/updated.ts +0 -70
- 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 -963
- package/src/core/components/functional/shader/shader.md +0 -209
- package/src/core/components/functional/shader/shader.spec.ts +0 -368
- package/src/core/components/functional/shader/shader.ts +0 -1624
- package/src/core/components/functional/shader/shadertoy-prelude.ts +0 -52
- package/src/core/components/functional/shader/types.ts +0 -448
- 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 -158
- package/src/core/components/functional/webgpu/gpu-runtime.ts +0 -349
- package/src/core/components/functional/webgpu/helpers.ts +0 -47
- 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 -75
- package/src/core/components/functional/webgpu/webgpu.spec.ts +0 -141
- package/src/core/components/functional/webgpu/webgpu.ts +0 -668
- package/src/core/components/functional/webgpu/wgsl-prelude.ts +0 -81
- package/src/core/utils/mediaRef.spec.ts +0 -121
- package/src/core/utils/mediaRef.ts +0 -193
- 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 -65
- 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-shader-live-demo.ts +0 -98
- package/src/docs/example/docs-3d-shared.ts +0 -15
- package/src/docs/example/docs-harris-webgpu-demo.ts +0 -482
- 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,296 +0,0 @@
|
|
|
1
|
-
var ConcordeWebGpu=(function(ue){"use strict";/**
|
|
2
|
-
* @license
|
|
3
|
-
* Copyright 2019 Google LLC
|
|
4
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
5
|
-
*/var fe,Ue;const Qt=globalThis,Er=Qt.ShadowRoot&&(Qt.ShadyCSS===void 0||Qt.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,_r=Symbol(),Jr=new WeakMap;let Kr=class{constructor(e,t,r){if(this._$cssResult$=!0,r!==_r)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=e,this.t=t}get styleSheet(){let e=this.o;const t=this.t;if(Er&&e===void 0){const r=t!==void 0&&t.length===1;r&&(e=Jr.get(t)),e===void 0&&((this.o=e=new CSSStyleSheet).replaceSync(this.cssText),r&&Jr.set(t,e))}return e}toString(){return this.cssText}};const Zn=n=>new Kr(typeof n=="string"?n:n+"",void 0,_r),Qn=(n,...e)=>{const t=n.length===1?n[0]:e.reduce(((r,i,u)=>r+(a=>{if(a._$cssResult$===!0)return a.cssText;if(typeof a=="number")return a;throw Error("Value passed to 'css' function must be a 'css' function result: "+a+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(i)+n[u+1]),n[0]);return new Kr(t,n,_r)},ei=(n,e)=>{if(Er)n.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet));else for(const t of e){const r=document.createElement("style"),i=Qt.litNonce;i!==void 0&&r.setAttribute("nonce",i),r.textContent=t.cssText,n.appendChild(r)}},Zr=Er?n=>n:n=>n instanceof CSSStyleSheet?(e=>{let t="";for(const r of e.cssRules)t+=r.cssText;return Zn(t)})(n):n;/**
|
|
6
|
-
* @license
|
|
7
|
-
* Copyright 2017 Google LLC
|
|
8
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
9
|
-
*/const{is:ti,defineProperty:ri,getOwnPropertyDescriptor:ni,getOwnPropertyNames:ii,getOwnPropertySymbols:si,getPrototypeOf:ai}=Object,er=globalThis,Qr=er.trustedTypes,oi=Qr?Qr.emptyScript:"",ui=er.reactiveElementPolyfillSupport,Dt=(n,e)=>n,tr={toAttribute(n,e){switch(e){case Boolean:n=n?oi:null;break;case Object:case Array:n=n==null?n:JSON.stringify(n)}return n},fromAttribute(n,e){let t=n;switch(e){case Boolean:t=n!==null;break;case Number:t=n===null?null:Number(n);break;case Object:case Array:try{t=JSON.parse(n)}catch{t=null}}return t}},Ar=(n,e)=>!ti(n,e),en={attribute:!0,type:String,converter:tr,reflect:!1,useDefault:!1,hasChanged:Ar};Symbol.metadata??=Symbol("metadata"),er.litPropertyMetadata??=new WeakMap;let _t=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,t=en){if(t.state&&(t.attribute=!1),this._$Ei(),this.prototype.hasOwnProperty(e)&&((t=Object.create(t)).wrapped=!0),this.elementProperties.set(e,t),!t.noAccessor){const r=Symbol(),i=this.getPropertyDescriptor(e,r,t);i!==void 0&&ri(this.prototype,e,i)}}static getPropertyDescriptor(e,t,r){const{get:i,set:u}=ni(this.prototype,e)??{get(){return this[t]},set(a){this[t]=a}};return{get:i,set(a){const h=i?.call(this);u?.call(this,a),this.requestUpdate(e,h,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(e){return this.elementProperties.get(e)??en}static _$Ei(){if(this.hasOwnProperty(Dt("elementProperties")))return;const e=ai(this);e.finalize(),e.l!==void 0&&(this.l=[...e.l]),this.elementProperties=new Map(e.elementProperties)}static finalize(){if(this.hasOwnProperty(Dt("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(Dt("properties"))){const t=this.properties,r=[...ii(t),...si(t)];for(const i of r)this.createProperty(i,t[i])}const e=this[Symbol.metadata];if(e!==null){const t=litPropertyMetadata.get(e);if(t!==void 0)for(const[r,i]of t)this.elementProperties.set(r,i)}this._$Eh=new Map;for(const[t,r]of this.elementProperties){const i=this._$Eu(t,r);i!==void 0&&this._$Eh.set(i,t)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(e){const t=[];if(Array.isArray(e)){const r=new Set(e.flat(1/0).reverse());for(const i of r)t.unshift(Zr(i))}else e!==void 0&&t.push(Zr(e));return t}static _$Eu(e,t){const r=t.attribute;return r===!1?void 0:typeof r=="string"?r: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,t=this.constructor.elementProperties;for(const r of t.keys())this.hasOwnProperty(r)&&(e.set(r,this[r]),delete this[r]);e.size>0&&(this._$Ep=e)}createRenderRoot(){const e=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return ei(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,t,r){this._$AK(e,r)}_$ET(e,t){const r=this.constructor.elementProperties.get(e),i=this.constructor._$Eu(e,r);if(i!==void 0&&r.reflect===!0){const u=(r.converter?.toAttribute!==void 0?r.converter:tr).toAttribute(t,r.type);this._$Em=e,u==null?this.removeAttribute(i):this.setAttribute(i,u),this._$Em=null}}_$AK(e,t){const r=this.constructor,i=r._$Eh.get(e);if(i!==void 0&&this._$Em!==i){const u=r.getPropertyOptions(i),a=typeof u.converter=="function"?{fromAttribute:u.converter}:u.converter?.fromAttribute!==void 0?u.converter:tr;this._$Em=i;const h=a.fromAttribute(t,u.type);this[i]=h??this._$Ej?.get(i)??h,this._$Em=null}}requestUpdate(e,t,r){if(e!==void 0){const i=this.constructor,u=this[e];if(r??=i.getPropertyOptions(e),!((r.hasChanged??Ar)(u,t)||r.useDefault&&r.reflect&&u===this._$Ej?.get(e)&&!this.hasAttribute(i._$Eu(e,r))))return;this.C(e,t,r)}this.isUpdatePending===!1&&(this._$ES=this._$EP())}C(e,t,{useDefault:r,reflect:i,wrapped:u},a){r&&!(this._$Ej??=new Map).has(e)&&(this._$Ej.set(e,a??t??this[e]),u!==!0||a!==void 0)||(this._$AL.has(e)||(this.hasUpdated||r||(t=void 0),this._$AL.set(e,t)),i===!0&&this._$Em!==e&&(this._$Eq??=new Set).add(e))}async _$EP(){this.isUpdatePending=!0;try{await this._$ES}catch(t){Promise.reject(t)}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[i,u]of this._$Ep)this[i]=u;this._$Ep=void 0}const r=this.constructor.elementProperties;if(r.size>0)for(const[i,u]of r){const{wrapped:a}=u,h=this[i];a!==!0||this._$AL.has(i)||h===void 0||this.C(i,void 0,u,h)}}let e=!1;const t=this._$AL;try{e=this.shouldUpdate(t),e?(this.willUpdate(t),this._$EO?.forEach((r=>r.hostUpdate?.())),this.update(t)):this._$EM()}catch(r){throw e=!1,this._$EM(),r}e&&this._$AE(t)}willUpdate(e){}_$AE(e){this._$EO?.forEach((t=>t.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((t=>this._$ET(t,this[t]))),this._$EM()}updated(e){}firstUpdated(e){}};_t.elementStyles=[],_t.shadowRootOptions={mode:"open"},_t[Dt("elementProperties")]=new Map,_t[Dt("finalized")]=new Map,ui?.({ReactiveElement:_t}),(er.reactiveElementVersions??=[]).push("2.1.1");/**
|
|
10
|
-
* @license
|
|
11
|
-
* Copyright 2017 Google LLC
|
|
12
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
13
|
-
*/const Sr=globalThis,rr=Sr.trustedTypes,tn=rr?rr.createPolicy("lit-html",{createHTML:n=>n}):void 0,rn="$lit$",lt=`lit$${Math.random().toFixed(9).slice(2)}$`,nn="?"+lt,ci=`<${nn}>`,mt=document,Lt=()=>mt.createComment(""),Ot=n=>n===null||typeof n!="object"&&typeof n!="function",Tr=Array.isArray,li=n=>Tr(n)||typeof n?.[Symbol.iterator]=="function",kr=`[
|
|
14
|
-
\f\r]`,Mt=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,sn=/-->/g,an=/>/g,gt=RegExp(`>|${kr}(?:([^\\s"'>=/]+)(${kr}*=${kr}*(?:[^
|
|
15
|
-
\f\r"'\`<>=]|("|')|))|$)`,"g"),on=/'/g,un=/"/g,cn=/^(?:script|style|textarea|title)$/i,fi=n=>(e,...t)=>({_$litType$:n,strings:e,values:t}),Pr=fi(1),At=Symbol.for("lit-noChange"),Fe=Symbol.for("lit-nothing"),ln=new WeakMap,vt=mt.createTreeWalker(mt,129);function fn(n,e){if(!Tr(n)||!n.hasOwnProperty("raw"))throw Error("invalid template strings array");return tn!==void 0?tn.createHTML(e):e}const hi=(n,e)=>{const t=n.length-1,r=[];let i,u=e===2?"<svg>":e===3?"<math>":"",a=Mt;for(let h=0;h<t;h++){const b=n[h];let P,L,x=-1,_=0;for(;_<b.length&&(a.lastIndex=_,L=a.exec(b),L!==null);)_=a.lastIndex,a===Mt?L[1]==="!--"?a=sn:L[1]!==void 0?a=an:L[2]!==void 0?(cn.test(L[2])&&(i=RegExp("</"+L[2],"g")),a=gt):L[3]!==void 0&&(a=gt):a===gt?L[0]===">"?(a=i??Mt,x=-1):L[1]===void 0?x=-2:(x=a.lastIndex-L[2].length,P=L[1],a=L[3]===void 0?gt:L[3]==='"'?un:on):a===un||a===on?a=gt:a===sn||a===an?a=Mt:(a=gt,i=void 0);const R=a===gt&&n[h+1].startsWith("/>")?" ":"";u+=a===Mt?b+ci:x>=0?(r.push(P),b.slice(0,x)+rn+b.slice(x)+lt+R):b+lt+(x===-2?h:R)}return[fn(n,u+(n[t]||"<?>")+(e===2?"</svg>":e===3?"</math>":"")),r]};class Ft{constructor({strings:e,_$litType$:t},r){let i;this.parts=[];let u=0,a=0;const h=e.length-1,b=this.parts,[P,L]=hi(e,t);if(this.el=Ft.createElement(P,r),vt.currentNode=this.el.content,t===2||t===3){const x=this.el.content.firstChild;x.replaceWith(...x.childNodes)}for(;(i=vt.nextNode())!==null&&b.length<h;){if(i.nodeType===1){if(i.hasAttributes())for(const x of i.getAttributeNames())if(x.endsWith(rn)){const _=L[a++],R=i.getAttribute(x).split(lt),O=/([.?@])?(.*)/.exec(_);b.push({type:1,index:u,name:O[2],strings:R,ctor:O[1]==="."?pi:O[1]==="?"?mi:O[1]==="@"?gi:nr}),i.removeAttribute(x)}else x.startsWith(lt)&&(b.push({type:6,index:u}),i.removeAttribute(x));if(cn.test(i.tagName)){const x=i.textContent.split(lt),_=x.length-1;if(_>0){i.textContent=rr?rr.emptyScript:"";for(let R=0;R<_;R++)i.append(x[R],Lt()),vt.nextNode(),b.push({type:2,index:++u});i.append(x[_],Lt())}}}else if(i.nodeType===8)if(i.data===nn)b.push({type:2,index:u});else{let x=-1;for(;(x=i.data.indexOf(lt,x+1))!==-1;)b.push({type:7,index:u}),x+=lt.length-1}u++}}static createElement(e,t){const r=mt.createElement("template");return r.innerHTML=e,r}}function St(n,e,t=n,r){if(e===At)return e;let i=r!==void 0?t._$Co?.[r]:t._$Cl;const u=Ot(e)?void 0:e._$litDirective$;return i?.constructor!==u&&(i?._$AO?.(!1),u===void 0?i=void 0:(i=new u(n),i._$AT(n,t,r)),r!==void 0?(t._$Co??=[])[r]=i:t._$Cl=i),i!==void 0&&(e=St(n,i._$AS(n,e.values),i,r)),e}class di{constructor(e,t){this._$AV=[],this._$AN=void 0,this._$AD=e,this._$AM=t}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}u(e){const{el:{content:t},parts:r}=this._$AD,i=(e?.creationScope??mt).importNode(t,!0);vt.currentNode=i;let u=vt.nextNode(),a=0,h=0,b=r[0];for(;b!==void 0;){if(a===b.index){let P;b.type===2?P=new $t(u,u.nextSibling,this,e):b.type===1?P=new b.ctor(u,b.name,b.strings,this,e):b.type===6&&(P=new vi(u,this,e)),this._$AV.push(P),b=r[++h]}a!==b?.index&&(u=vt.nextNode(),a++)}return vt.currentNode=mt,i}p(e){let t=0;for(const r of this._$AV)r!==void 0&&(r.strings!==void 0?(r._$AI(e,r,t),t+=r.strings.length-2):r._$AI(e[t])),t++}}class $t{get _$AU(){return this._$AM?._$AU??this._$Cv}constructor(e,t,r,i){this.type=2,this._$AH=Fe,this._$AN=void 0,this._$AA=e,this._$AB=t,this._$AM=r,this.options=i,this._$Cv=i?.isConnected??!0}get parentNode(){let e=this._$AA.parentNode;const t=this._$AM;return t!==void 0&&e?.nodeType===11&&(e=t.parentNode),e}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(e,t=this){e=St(this,e,t),Ot(e)?e===Fe||e==null||e===""?(this._$AH!==Fe&&this._$AR(),this._$AH=Fe):e!==this._$AH&&e!==At&&this._(e):e._$litType$!==void 0?this.$(e):e.nodeType!==void 0?this.T(e):li(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!==Fe&&Ot(this._$AH)?this._$AA.nextSibling.data=e:this.T(mt.createTextNode(e)),this._$AH=e}$(e){const{values:t,_$litType$:r}=e,i=typeof r=="number"?this._$AC(e):(r.el===void 0&&(r.el=Ft.createElement(fn(r.h,r.h[0]),this.options)),r);if(this._$AH?._$AD===i)this._$AH.p(t);else{const u=new di(i,this),a=u.u(this.options);u.p(t),this.T(a),this._$AH=u}}_$AC(e){let t=ln.get(e.strings);return t===void 0&&ln.set(e.strings,t=new Ft(e)),t}k(e){Tr(this._$AH)||(this._$AH=[],this._$AR());const t=this._$AH;let r,i=0;for(const u of e)i===t.length?t.push(r=new $t(this.O(Lt()),this.O(Lt()),this,this.options)):r=t[i],r._$AI(u),i++;i<t.length&&(this._$AR(r&&r._$AB.nextSibling,i),t.length=i)}_$AR(e=this._$AA.nextSibling,t){for(this._$AP?.(!1,!0,t);e!==this._$AB;){const r=e.nextSibling;e.remove(),e=r}}setConnected(e){this._$AM===void 0&&(this._$Cv=e,this._$AP?.(e))}}class nr{get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}constructor(e,t,r,i,u){this.type=1,this._$AH=Fe,this._$AN=void 0,this.element=e,this.name=t,this._$AM=i,this.options=u,r.length>2||r[0]!==""||r[1]!==""?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=Fe}_$AI(e,t=this,r,i){const u=this.strings;let a=!1;if(u===void 0)e=St(this,e,t,0),a=!Ot(e)||e!==this._$AH&&e!==At,a&&(this._$AH=e);else{const h=e;let b,P;for(e=u[0],b=0;b<u.length-1;b++)P=St(this,h[r+b],t,b),P===At&&(P=this._$AH[b]),a||=!Ot(P)||P!==this._$AH[b],P===Fe?e=Fe:e!==Fe&&(e+=(P??"")+u[b+1]),this._$AH[b]=P}a&&!i&&this.j(e)}j(e){e===Fe?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,e??"")}}class pi extends nr{constructor(){super(...arguments),this.type=3}j(e){this.element[this.name]=e===Fe?void 0:e}}class mi extends nr{constructor(){super(...arguments),this.type=4}j(e){this.element.toggleAttribute(this.name,!!e&&e!==Fe)}}class gi extends nr{constructor(e,t,r,i,u){super(e,t,r,i,u),this.type=5}_$AI(e,t=this){if((e=St(this,e,t,0)??Fe)===At)return;const r=this._$AH,i=e===Fe&&r!==Fe||e.capture!==r.capture||e.once!==r.once||e.passive!==r.passive,u=e!==Fe&&(r===Fe||i);i&&this.element.removeEventListener(this.name,this,r),u&&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 vi{constructor(e,t,r){this.element=e,this.type=6,this._$AN=void 0,this._$AM=t,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(e){St(this,e)}}const yi=Sr.litHtmlPolyfillSupport;yi?.(Ft,$t),(Sr.litHtmlVersions??=[]).push("3.3.1");const bi=(n,e,t)=>{const r=t?.renderBefore??e;let i=r._$litPart$;if(i===void 0){const u=t?.renderBefore??null;r._$litPart$=i=new $t(e.insertBefore(Lt(),u),u,void 0,t??{})}return i._$AI(n),i};/**
|
|
16
|
-
* @license
|
|
17
|
-
* Copyright 2017 Google LLC
|
|
18
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
19
|
-
*/const xr=globalThis;class Nt extends _t{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 t=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(e),this._$Do=bi(t,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this._$Do?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this._$Do?.setConnected(!1)}render(){return At}}Nt._$litElement$=!0,Nt.finalized=!0,xr.litElementHydrateSupport?.({LitElement:Nt});const wi=xr.litElementPolyfillSupport;wi?.({LitElement:Nt}),(xr.litElementVersions??=[]).push("4.2.1");/**
|
|
20
|
-
* @license
|
|
21
|
-
* Copyright 2017 Google LLC
|
|
22
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
23
|
-
*/const Ei=n=>(e,t)=>{t!==void 0?t.addInitializer((()=>{customElements.define(n,e)})):customElements.define(n,e)};/**
|
|
24
|
-
* @license
|
|
25
|
-
* Copyright 2017 Google LLC
|
|
26
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
27
|
-
*/const _i={attribute:!0,type:String,converter:tr,reflect:!1,hasChanged:Ar},Ai=(n=_i,e,t)=>{const{kind:r,metadata:i}=t;let u=globalThis.litPropertyMetadata.get(i);if(u===void 0&&globalThis.litPropertyMetadata.set(i,u=new Map),r==="setter"&&((n=Object.create(n)).wrapped=!0),u.set(t.name,n),r==="accessor"){const{name:a}=t;return{set(h){const b=e.get.call(this);e.set.call(this,h),this.requestUpdate(a,b,n)},init(h){return h!==void 0&&this.C(a,void 0,n,h),h}}}if(r==="setter"){const{name:a}=t;return function(h){const b=this[a];e.call(this,h),this.requestUpdate(a,b,n)}}throw Error("Unsupported decorator location: "+r)};function Re(n){return(e,t)=>typeof t=="object"?Ai(n,e,t):((r,i,u)=>{const a=i.hasOwnProperty(u);return i.constructor.createProperty(u,r),a?Object.getOwnPropertyDescriptor(i,u):void 0})(n,e,t)}/**
|
|
28
|
-
* @license
|
|
29
|
-
* Copyright 2017 Google LLC
|
|
30
|
-
* SPDX-License-Identifier: BSD-3-Clause
|
|
31
|
-
*/function hn(n){return Re({...n,state:!0,attribute:!1})}const Si=4,Ti=.001,ki=.45,Pi="rgb(38, 89, 217)";class Cr{constructor(e,t){this.backend="canvas2d",this.images=[null,null,null,null],this.channelUrls=["","","",""],this.channelSizes=[null,null,null,null],this.channelLoadTokens=[0,0,0,0],this.disposed=!1,this.canvas=e,this.ctx=t}static create(e){const t=e.getContext("2d",{alpha:!0});if(!t)throw new Error("Canvas2D indisponible");return new Cr(e,t)}async setShader(e){this.assertAlive()}async setChannel(e,t){this.assertAlive();const r=t.trim();if(this.channelUrls[e]===r&&this.images[e])return;this.channelUrls[e]=r;const i=++this.channelLoadTokens[e];if(!r){this.images[e]=null,this.channelSizes[e]=null;return}const u=await xi(r);i!==this.channelLoadTokens[e]||this.disposed||(this.images[e]=u,this.channelSizes[e]={width:u.naturalWidth,height:u.naturalHeight})}getTextureSize(e){const t=this.channelUrls.indexOf(e.trim());return t<0?null:this.channelSizes[t]}resize(e,t){this.assertAlive();const r=Math.max(1,Math.floor(e)),i=Math.max(1,Math.floor(t));this.canvas.width===r&&this.canvas.height===i||(this.canvas.width=r,this.canvas.height=i)}draw(e){this.assertAlive();const{ctx:t,canvas:r}=this,i=r.width,u=r.height;t.clearRect(0,0,i,u);const a=this.images[0],h=Math.min(1,Math.max(0,e.params[0]??0));if(a)t.drawImage(a,0,0,i,u),h>Ti&&(t.save(),t.globalAlpha=h*ki,t.fillStyle=Pi,t.fillRect(0,0,i,u),t.restore());else{const b=t.createLinearGradient(0,0,i,u);b.addColorStop(0,`rgb(38,${Math.round(40+h*80)},80)`),b.addColorStop(1,`rgb(90,${Math.round(60+h*40)},120)`),t.fillStyle=b,t.fillRect(0,0,i,u)}}dispose(e=!1){if(!this.disposed){this.disposed=!0;for(let t=0;t<Si;t++)this.channelLoadTokens[t]++;this.images=[null,null,null,null]}}assertAlive(){if(this.disposed)throw new Error("Canvas2D fallback disposed")}}async function xi(n){const e=new Image;return e.crossOrigin="anonymous",await new Promise((t,r)=>{e.onload=()=>t(),e.onerror=()=>r(new Error(`Failed to load texture: ${n}`)),e.src=n}),e}const Rr="1";function Ci(n){const e=n.trim();if(!e)return!1;try{const t=new URL(e,"https://example.invalid/");return t.protocol==="http:"||t.protocol==="https:"||t.protocol==="blob:"}catch{return!1}}let st=class We{static getLanguage(){const e=document.documentElement.lang;return localStorage.getItem("SonicSelectedLanguage")||e}static getCookies(){return document.cookie.split(";").reduce((e,t)=>{const r=t.indexOf("=");return e[t.substring(0,r).trim()]=t.substring(r+1),e},{})}static nextComposedAncestor(e){return e instanceof Element&&e.assignedSlot?e.assignedSlot:e.parentNode||e.host||null}static everyAncestors(e,t){let r=e;for(;r;){if(!t(r))return;r=r.parentNode||r.host}}static overflowMatches(e,t){return t.includes(e.overflowY)||t.includes(e.overflowX)}static findAncestorByOverflow(e,t){let r=e;for(;r;){if(r instanceof Element&&r.nodeType===1){const i=window.getComputedStyle(r);if(We.overflowMatches(i,t))return r}r=We.nextComposedAncestor(r)}return null}static getScrollableAncestor(e){return We.findAncestorByOverflow(e,["auto","scroll","hidden","overlay"])}static getScrollingAncestor(e){return We.findAncestorByOverflow(e,["auto","scroll","overlay"])}static scopeAttributeNames(e){const t=e.toLowerCase();return t===e?[e]:[e,t]}static readScopeAttributeOnElement(e,t){for(const r of We.scopeAttributeNames(t))if(e.hasAttribute(r))return e.getAttribute(r)??"";return null}static getAncestorAttributeValue(e,t){if(!e)return null;let r=e;for(;r;){if(r instanceof HTMLElement){const u=We.readScopeAttributeOnElement(r,t);if(u!=null)return u}const i=r.parentNode||r.host;if(!i)break;r=i}return null}static getApiConfiguration(e){const t=We.getAncestorAttributeValue(e,"token"),r=We.getAncestorAttributeValue(e,"addHTTPResponse")!=null,i=We.getAncestorAttributeValue(e,"serviceURL");let u=null,a=null;const h=We.getAncestorAttributeValue(e,"tokenProvider"),b=We.getAncestorAttributeValue(e,"eventsApiToken");t||(u=We.getAncestorAttributeValue(e,"userName"),a=We.getAncestorAttributeValue(e,"password"));const P=We.getAncestorAttributeValue(e,"credentials")||void 0,L=e.getAttribute("cache"),x=e.hasAttribute("blockUntilDone"),_=e.hasAttribute("keepAlive");return{serviceURL:i,token:t,userName:u,password:a,authToken:b,tokenProvider:h,addHTTPResponse:r,credentials:P,cache:L,blockUntilDone:x,keepAlive:_}}static getClosestElement(e,t){let r=e;for(;r&&!(r.nodeName&&r.nodeName.toLowerCase()===t);){const i=r.parentNode||r.host;if(!i){r=null;break}r=i}return r?.nodeName?r:null}static getClosestForm(e){return We.getClosestElement(e,"form")}static getAncestorsByTagNames(e,t){const r=new Set(t.map(a=>a.toLowerCase())),i=[];let u=e.parentNode||e.host;for(;u;)u instanceof Element&&r.has(u.tagName.toLowerCase())&&i.push(u),u=u.parentNode||u.host;return i}static getAncestorsBySelectors(e,t){const r=[];let i=e.parentNode||e.host;for(;i;){if(i instanceof Element)for(const u of t)try{if(i.matches(u)){r.push(i);break}}catch{}i=i.parentNode||i.host}return r}static async loadJS(e){if(!Ci(e))return!1;const t=typeof document<"u"?new URL(e,document.baseURI).href:e,r=Array.from(document.scripts).find(u=>u.src===t);if(r)return r.dataset.concordeLoaded===Rr?!0:new Promise(u=>{let a=!1;const h=P=>{a||(a=!0,P&&(r.dataset.concordeLoaded=Rr),u(P))};r.addEventListener("load",()=>h(!0),{once:!0}),r.addEventListener("error",()=>h(!1),{once:!0});const b=r.readyState;if(b==="complete"||b==="loaded"){h(!0);return}Promise.resolve().then(()=>{Promise.resolve().then(()=>{a||h(!0)})})});const i=/\.es\.js(\?|#|$)/.test(e)||/[?&]module(?:&|=|$)/.test(e);return new Promise(u=>{const a=document.createElement("script");a.src=e,i&&(a.type="module"),a.onload=()=>{a.dataset.concordeLoaded=Rr,u(!0)},a.onerror=()=>u(!1),document.head.appendChild(a)})}static async loadCSS(e){return new Promise(t=>{const r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,r.onload=()=>t(!0),r.onerror=()=>t(!0),document.head.appendChild(r)})}},Ri=class{static async queueTaskPromise(){return new Promise(e=>{window.queueMicrotask(()=>e(null))})}static async delayPromise(e){return new Promise(t=>{setTimeout(t,e)})}},dn="sonic";typeof __SONIC_PREFIX__<"u"&&(dn=__SONIC_PREFIX__);let pn=dn.replace(/-([a-z])/g,n=>n[1].toUpperCase());const Ui=pn.charAt(0).toUpperCase()+pn.slice(1);let Di=class Et{static areEqual(e,t){return e.length===t.length?e.every((r,i)=>r===t[i]):!1}static from2d(e){return{to1D:()=>{let t=[];return e.forEach(r=>t=t.concat(r)),this.from(t)}}}static from(e){return{get:()=>e||[],everyItem:()=>({has:()=>({same:()=>({value:()=>({forKey:t=>{if(e.length<1)return!0;const r=(e[0]||{})[t];return e.every(i=>(i||{})[t]==r)}})})}),value:()=>({forKey:t=>Et.from(e.map(r=>r[t]))}),copy:()=>({fromKey:t=>({toKey:r=>{e.forEach(i=>{i[r]=Array.isArray(i[t])?[...i[t]]:typeof i[t]=="object"&&i[t]!=null?{...i[t]}:i[t]})}})})}),map:t=>Et.from(e.map(t)),filter:t=>Et.from(e.filter(t)),find:t=>e.find(t),some:t=>e.some(t),every:t=>e.every(t),group:()=>({byKey:t=>{const r=[],i=new Map;for(const u of e){const a=u[t];if(!i.has(a)){const h=r.length;i.set(a,h);const b={items:[]};b[t]=a,r.push(b)}r[i.get(a)].items.push(u)}return Et.from(r)}}),without:()=>({duplicates:()=>({forKey:t=>{const r=[...new Set(e.map(i=>i[t]))];return Et.from(r.map(i=>e.find(u=>u[t]==i)))}}),itemsIn:t=>({havingSameValue:()=>({forKey:r=>{const i=(u,a)=>h=>u[a]!=h[a];return Et.from(e.filter(u=>t.every(i(u,r))))}})})})}}},Ur=class{static ucFirst(e){return typeof e!="string"?e:e.charAt(0).toUpperCase()+e.substring(1)}static minutesDuration(e,t="",r="long"){t||(t=st.getLanguage());const i=(P,L)=>[Math.floor(P/L),P%L];function u(P,L,x){return new Intl.NumberFormat(P,{style:"unit",unit:L,unitDisplay:x}).format}const[a,h]=i(e,60),b=[];return a&&b.push(u(t,"hour",r)(a)),h&&b.push(u(t,"minute",r)(h)),new Intl.ListFormat(t,{style:"long",type:"conjunction"}).format(b)}static js(e){try{return Function("return "+e)()}catch{return""}}};class mn{constructor(e){this.path=e}toString(){return this.path}}function gn(n){return new Proxy(n,{get(e,t){if(t==="path")return e.path;if(t==="toString")return e.toString.bind(e);if(t===Symbol.toStringTag)return"DataProviderKey";if(typeof t=="symbol")return e[t];const r=e.path?`${e.path}.${String(t)}`:String(t);return gn(new mn(r))}})}const Li=/\$\{|\{\$/;function Oi(n){return Li.test(n)}function Mi(n){const e=n;if(Oi(e))throw new Error("Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths.");return e}const ir=function(n){return this instanceof ir?gn(new mn(n)):new ir(n)};let sr=class ct{static shallowEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const a of i){const h=e[a],b=t[a];if(r?h!==b:h!=b)return!1}return!0}static deepEqual(e,t,r=!0){const i=Object.keys(e),u=Object.keys(t);if(i.length!==u.length&&r)return!1;for(const a of i){const h=e[a],b=t[a],P=ct.isObject(h)&&ct.isObject(b),L=r?h!==b:h!=b;if(P&&!ct.deepEqual(h,b)||!P&&L)return!1}return!0}static isObject(e){return e!=null&&typeof e=="object"}static isUndefindOrNull(e){return e==null}static isEmpty(e){return ct.isUndefindOrNull(e)?!0:Object.keys(e).length===0}static traverse(e,t,r=!1){for(const i of t){const u=e[i];if(u===void 0)return;r&&ct.isObject(u)?e=Object.assign(Array.isArray(u)?[]:{},e,u):e=e[i]}return e}static traverseDotNotation(e,t,r=!1){return ct.traverse(e,t.split("."),r)}static getURLSearchArray(e,t=""){let r=[];for(let i in e){const u=e[i];t&&(i=t+"["+i+"]"),ct.isObject(u)?r=[...r,...this.getURLSearchArray(u,i)]:r.push(`${i}=${u}`)}return r}static getURLSearchString(e){return ct.getURLSearchArray(e,"").join("&")}};sr.traverseDotNotation;function Fi(n){return!1}function ar(n){return Object.prototype.hasOwnProperty.call(n,"__value")}function ft(n){return typeof n=="object"&&n!==null}let Tt="sonic";typeof __SONIC_PREFIX__>"u"&&(Tt="sonic");const Dr=Tt=="sonic"?"publisher-proxies-data":Tt+"-publisher-proxies-data",ht=class ht{constructor(e,t,r){for(this._proxies_=new Map,this._is_savable_=!1,this._expiration_delay_=432e5,this._invalidate_on_page_show_=!1,this._invalidateListeners_=new Set,this._formInvalidateListeners_=new Set,this._assignListeners_=new Set,this._mutationListeners_=new Set,this._fillListeners_=new Set,this._templateFillListeners_=new Set,this._lockInternalMutationPublishing_=!1,this._instanceCounter_=0,this._assignmentId_=0,this._value_=e,this.parent=t||null,this._parentKey_=r,this.root=this,this._instanceCounter_=0;this.root.parent;)this.root=this.root.parent}delete(){for(const e in this._proxies_.keys())e!="_parent_"&&this._proxies_.get(e)?.delete();this._invalidateListeners_.clear(),this._formInvalidateListeners_.clear(),this._assignListeners_.clear(),this._mutationListeners_.clear(),this._fillListeners_.clear(),this._templateFillListeners_.clear(),this._proxies_.clear(),ht.instances.delete(this._instanceCounter_)}hasListener(){return this._templateFillListeners_.size>0||this._assignListeners_.size>0||this._invalidateListeners_.size>0||this._formInvalidateListeners_.size>0||this._mutationListeners_.size>0||this._fillListeners_.size>0}_publishInternalMutation_(e=!1){if(this._mutationListeners_.forEach(t=>t()),this._is_savable_&&!$e.changed){$e.changed=!0,$e.saveId++;const t=$e.saveId;setTimeout(()=>$e.getInstance().saveToLocalStorage(t),1e3)}e||this.parent&&this.parent._publishInternalMutation_()}async _publishAssignement_(e=!1){if(this._assignmentId_++,this._assignmentId_!==this._assignmentId_)return;const r=this.get();this._assignListeners_.forEach(i=>{i(r)}),this._publishInternalMutation_(e)}_publishInvalidation_(){this._invalidateListeners_.forEach(e=>e())}_publishFormInvalidation_(){this._formInvalidateListeners_.forEach(e=>e())}_publishDynamicFilling_(e,t){this._fillListeners_.forEach(r=>{r[e]!==t&&(r[e]=t)}),this._publishTemplateFilling_(e,t)}_publishTemplateFilling_(e,t){this._templateFillListeners_.forEach(r=>{const i=Object.getOwnPropertyDescriptor(r,e);i&&!i.set&&!i.writable||(r.propertyMap&&r.propertyMap[e]&&(e=r.propertyMap[e]),typeof r[e]<"u"&&r[e]!==t&&(r[e]=t))})}onAssign(e,t=!0){typeof e=="function"&&(this._assignListeners_.has(e)||(this._assignListeners_.add(e),t&&e(this.get())))}offAssign(e){this._assignListeners_.delete(e)}onInvalidate(e){typeof e=="function"&&this._invalidateListeners_.add(e)}offInvalidate(e){typeof e=="function"&&this._invalidateListeners_.delete(e)}invalidate(){this._publishInvalidation_()}onFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.add(e)}offFormInvalidate(e){typeof e=="function"&&this._formInvalidateListeners_.delete(e)}invalidateForm(){this._publishFormInvalidation_()}onInternalMutation(e){typeof e=="function"&&(this._mutationListeners_.add(e),e())}offInternalMutation(e){typeof e=="function"&&this._mutationListeners_.delete(e)}startTemplateFilling(e){if(this._templateFillListeners_.add(e),typeof this._value_=="object")for(const t in this._value_){let r=t;const i=this._value_[t];e.propertyMap&&e.propertyMap[t]&&(r=e.propertyMap[t]),typeof e[t]<"u"&&e[t]!==i&&(e[r]=i)}}stopTemplateFilling(e){this._templateFillListeners_.delete(e)}startDynamicFilling(e){this._fillListeners_.add(e);for(const t in this._value_){const r=this._value_[t];e[t]!==r&&(e[t]=r)}}stopDynamicFilling(e){this._fillListeners_.delete(e)}set(e,t=!1){if(this._value_===e||ft(this._value_)&&ft(e)&&e&&ar(this._value_)&&ar(e)&&this._value_.__value===e.__value||!ft(e)&&e===this._value_.__value)return!0;this._value_=ft(e)?e:{__value:e},this._cachedGet_=void 0;const r=ar(this._value_);if(this._parentKey_&&this.parent){const i=ar(this._value_)?this._value_.__value:this._value_;if(this.parent?.get()==null&&this.parent?.get()==null)if(isNaN(Number(this._parentKey_)))this.parent.set({[this._parentKey_]:i});else{const u=[];u[Number(this._parentKey_)]=i,this.parent.set(u)}else this.parent._value_[this._parentKey_]=i}if(r)return this._proxies_.forEach((i,u)=>{u!="_parent_"&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(t),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_.__value),!0;for(const i in this._value_)this._value_[i]===void 0&&delete this._value_[i];if(this._proxies_.forEach((i,u)=>{const a=this._value_[u];u!="_parent_"&&a===void 0&&a!==null&&isNaN(Number(u))&&(i.set(null),this._publishDynamicFilling_(u,null))}),this._publishAssignement_(),this.parent&&this._parentKey_&&this.parent._publishDynamicFilling_(this._parentKey_,this._value_),ft(this._value_))for(const i in this._value_){const u=e[i],h=ft(u)?u:{__value:u};if(!this._proxies_.has(i)){this._publishDynamicFilling_(i,u);continue}this._proxies_.get(i)?.set(h,!0),this._publishDynamicFilling_(i,u)}return!0}get(){if($i(this),this._cachedGet_!==void 0)return this._cachedGet_;if(Object.prototype.hasOwnProperty.call(this._value_,"__value")){const e=this._value_.__value;return this._cachedGet_=e??null}return this._cachedGet_=this._value_!=null?this._value_:null}get $tag(){return this._instanceCounter_||(ht.instancesCounter++,this._instanceCounter_=ht.instancesCounter),ht.instances.set(this._instanceCounter_,this),"<"+Tt+'-publisher-proxy publisher="'+this._instanceCounter_+'"></'+Tt+"-publisher-proxy>"}};ht.instances=new Map,ht.instancesCounter=0;let or=ht;const vn=[];function $i(n){vn.length>0&&vn[0].add(n)}const me=class me{constructor(){if(this.enabledLocaStorageProxies=[],this.publishers=new Map,this.localStorageData={},this.isLocalStrorageReady=null,this.initialisedData=[],me.instance!=null)throw"Singleton / use getInstance";me.instance=this,this.isLocalStrorageReady=this.cleanStorageData(),me.initPageShowHandler()}static initPageShowHandler(){me.pageShowHandlerInitialized||(me.pageShowHandlerInitialized=!0,window.addEventListener("pageshow",e=>{e.persisted&&me.getInstance().invalidateAll()}))}invalidateAll(){this.publishers.forEach(e=>{e._invalidate_on_page_show_&&e.invalidate()})}async cleanStorageData(){return new Promise(e=>{(async()=>{try{let r=localStorage.getItem(Dr),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(Dr,r),this.localStorageData={};const u=1e3*60*60*12;for(const a in this.localStorageData){const h=this.localStorageData[a],b=new Date().getTime()-(h.expirationDelayMs||u);h.lastModifiationMS<b&&delete this.localStorageData[a]}e(!0)}catch{window.requestAnimationFrame(()=>{e(!1)}),console.warn("no publisher cache in this browser")}})()})}static getInstance(e){if(e){const t=me.instances.get(e);return t||(console.warn("No PublisherManager instance registered with id:",e,"creating new one"),new me)}return me.instance==null?new me:me.instance}static get(e,t){return me.getInstance().get(e,t)}async setLocalData(e,t){await this.isLocalStrorageReady,e.set(this.localStorageData[t+"¤lang_"+st.getLanguage()]?.data||e.get())}get(e,t){const r=t?.localStorageMode==="enabled",i=t?.invalidateOnPageShow===!0;if(!this.publishers.has(e)){const h=Lr({});this.set(e,h)}const u=this.publishers.get(e);return r&&this.initialisedData.indexOf(e)===-1&&(t?.expirationDelayMs&&(u._expiration_delay_=t.expirationDelayMs),u._is_savable_=!0,this.initialisedData.push(e),this.setLocalData(u,e)),i&&(u._invalidate_on_page_show_=i),this.publishers.get(e)}set(e,t){this.publishers.set(e,t)}delete(e){return this.publishers.has(e)?(this.publishers.delete(e),!0):!1}async saveToLocalStorage(e=0){if(!(e!==me.saveId&&e%10!=0))try{if(!me.changed||me.saving)return;me.saving=!0,me.changed=!1;const t=Array.from(this.publishers.keys());let r=!1;for(const i of t){const u=this.publishers.get(i);if(!u?._is_savable_)continue;const a=u?.get();a&&(this.localStorageData[i+"¤lang_"+st.getLanguage()]={lastModifiationMS:new Date().getTime(),expirationDelayMs:u._expiration_delay_,data:a},r=!0)}if(r){const i=await this.compress(JSON.stringify(this.localStorageData),"gzip");localStorage.setItem(Dr,i)}if(me.saving=!1,me.changed){me.saveId++;const i=me.saveId;setTimeout(()=>this.saveToLocalStorage(i),1e3)}}catch{me.saving=!1}}async compress(e,t){const r=new TextEncoder().encode(e),i=window,u=new i.CompressionStream(t),a=u.writable.getWriter();a.write(r),a.close();const h=await new Response(u.readable).arrayBuffer(),b=new Uint8Array(h);let P="";for(let L=0;L<b.length;L++)P+=String.fromCharCode(b[L]);return btoa(P)}async decompress(e,t){const r=atob(e),u=Uint8Array.from(r,L=>L.charCodeAt(0)).buffer,a=window,h=new a.DecompressionStream(t),b=h.writable.getWriter();b.write(u),b.close();const P=await new Response(h.readable).arrayBuffer();return new TextDecoder().decode(P)}};me.buildDate="Tue Sep 29 2026 21:11:54 GMT+0200 (Central European Summer Time)",me.changed=!1,me.saving=!1,me.saveId=0,me.instance=null,me.instances=new Map,me.pageShowHandlerInitialized=!1;let $e=me;if(typeof window<"u"){const n=window,e=Ui+"PublisherManager",t=n[e]||$e;if(n[e]||(n[e]=$e),t!==$e){const r=["instance","instances","changed","saving","saveId","pageShowHandlerInitialized"];for(const i of r)Object.defineProperty($e,i,{configurable:!0,get(){return t[i]},set(u){t[i]=u}})}}const Ni=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 Ii(n,e){return{get:function(t,r){if(typeof r=="string"&&Ni.has(r))return n[r];if(r==Symbol.toPrimitive)return()=>e().get();if(!n._proxies_.has(r)){const i=n._value_[r],u=Lr(ft(i)?i:{__value:i},n,r);u._proxies_.set("_parent_",e()),n._proxies_.set(r,u)}return n._proxies_.get(r)},set:function(t,r,i){if(r=="_value_")return n._value_=i,!0;if(r=="_cachedGet_")return n._cachedGet_=i,!0;if(r=="_assignmentId_")return n._assignmentId_=i,!0;if(r=="_is_savable_")return n._is_savable_=i,!0;if(r=="_expiration_delay_")return n._expiration_delay_=i,!0;if(r=="_invalidate_on_page_show_")return n._invalidate_on_page_show_=i,!0;if(r=="_instanceCounter_")return n._instanceCounter_=i,!0;if(!n._proxies_.has(r)){const a=Lr({},n,r);a._proxies_.set("_parent_",e()),n._proxies_.set(r,a)}return n._value_[r]!==i&&(n._value_[r]=i,n._publishDynamicFilling_(r,i),n._proxies_.get(r)?.set(ft(i)?i:{__value:i})),!0},deleteProperty:function(t,r){return n._publishDynamicFilling_(r,null),n._proxies_.get(r)?.set(null),delete n._value_[r]},has:function(t,r){return r in n._value_&&r!="_lockInternalMutationPublishing_"},defineProperty:function(t,r,i){return i&&"value"in i&&(n._value_[r]=i.value),!0},getOwnPropertyDescriptor:function(t,r){return{enumerable:!0,configurable:!0}},ownKeys:function(t){return n._value_.__value?Object.keys(n._value_.__value):Object.keys(n._value_)}}}function Lr(n,e=null,t){const r=new or(n,e,t);let i=null;const u=Ii(r,()=>i);return i=new Proxy(r,u),i}class Gi extends HTMLElement{constructor(){super(),this.publisherId="",this.onAssign=e=>{this.innerHTML=e.toString()}}connectedCallback(){this.publisherId=this.getAttribute("publisher")||"",this.publisher=or.instances.get(parseInt(this.publisherId)),this.publisher?.onAssign(this.onAssign)}disconnectedCallback(){this.publisher?.offAssign(this.onAssign)}}try{customElements.define(Tt+"-publisher-proxy",Gi)}catch{}const Bi=(n,e)=>{{const t=n.split("."),r=t.shift()||"";let i=$e.get(r,e);i=sr.traverse(i,t);const u=new Set;return u.add(i),u}};function yn(n,e,t){const r=Mi(n);return Bi(r,t).values().next().value}function ji(n,e){return Fi()?yn(n,void 0,e):yn(n)}let Or=(fe=class{static disable(){this.enabled&&(this.enabled=!1,Array.from(fe.observedElements.keys()).forEach(e=>fe.unObserve(e)))}static observe(e){if(!e||!fe.enabled||fe.observedElements.has(e))return;const t=new MutationObserver(fe.onMutation),r={};r.childList=!0,r.subtree=!0,r.attributes=!0,r.attributeFilter=["data-bind"],t.observe(e,r),e.querySelectorAll("[data-bind]").forEach(i=>fe.addPublisherListeners(i)),fe.observedElements.set(e,t)}static unObserve(e){if(!e)return;const t=this.observedElements.get(e);t&&(t.disconnect(),e.querySelectorAll("[data-bind]").forEach(r=>fe.removePublisherListeners(r)))}static onAdded(e){e.hasAttribute&&e.hasAttribute("data-bind")&&fe.addPublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>fe.addPublisherListeners(t)):e.childNodes.forEach(t=>fe.onAdded(t))}static onRemoved(e){e.hasAttribute&&e.hasAttribute("data-bind")&&fe.removePublisherListeners(e),e.querySelectorAll?e.querySelectorAll("[data-bind]").forEach(t=>fe.removePublisherListeners(t)):e.childNodes.forEach(t=>fe.onRemoved(t))}static onMutation(e){for(const t of e)switch(t.type){case"attributes":fe.addPublisherListeners(t.target);break;case"childList":t.addedNodes.forEach(r=>{fe.onAdded(r)}),t.removedNodes.forEach(r=>{fe.onRemoved(r)});break}}static removePublisherListeners(e){const t=fe.publisherListeners.get(e);t&&(fe.publisherListeners.delete(e),t.forEach(r=>{r.publisher?.offAssign(r.onAssign)}))}static getVariablesDescriptor(e){let t=e.match(/(\$(?:\w+\\?\.?)+)/g);return t?t=t.map(r=>r.replace("$","")):t=[e],t=t.filter(r=>r.length>0),{expression:e.replace("\\",""),variables:t.map(r=>r.split(/\b\.\b/).map(i=>i.replace("\\","")))}}static getDataBindItems(e){return"attributes"in e?Array.from(e.attributes).filter(t=>t.name.indexOf("::")==0).map(t=>({propertyToUpdate:t.name.substring(2).replace(/-((html)|\w)/g,i=>i.substring(1).toUpperCase()),bindedVariablesDescriptor:fe.getVariablesDescriptor(t.value)})):[]}static getSubPublisher(e,t){if(!t)return e;for(const r of t)if(r!="_self_"){if(!e)return null;e=e[r]}return e}static addPublisherListeners(e){fe.removePublisherListeners(e);const t=st.getAncestorAttributeValue(e.parentNode||e.host||e,"dataProvider");if(!t)return;const r=$e.getInstance().get(t),i=fe.getDataBindItems(e),u=[];i.forEach(a=>{const h=a.bindedVariablesDescriptor,b=a.propertyToUpdate;for(const P of h.variables){const L=P;let x=r;x=fe.getSubPublisher(r,L);const _=e,R={publisher:x,onAssign:()=>{const O=h.variables.map(J=>fe.getSubPublisher(r,J)?.get());let G=h.expression,ee=!1;if(O.length==1&&h.variables[0].join(".")==G.substring(1)){let J=O[0];J===null&&(J=""),_[b]=J;return}for(let J=0;J<O.length;J++){let E=O[J];const g=h.variables[J];E===null&&(ee=!0,E=void 0),G=G.replace("$"+g.join("."),E)}if(G.indexOf("|")!=-1){const J=G.indexOf("|");if(J==0)G=Ur.js(G.substring(1));else{const E=G.substring(0,J),g=G.substring(J+1),D=Ur[E];G=ee?"":D?D(g):G}}else G=ee?"":G;_[b]=G}};x?.onAssign(R.onAssign),u.push(R)}}),fe.publisherListeners.set(e,u)}},fe.observedElements=new Map,fe.enabled=!0,fe.publisherListeners=new Map,fe);Or.observe(document.documentElement),window.SonicDataBindObserver||(window.SonicDataBindObserver=Or);let qi=(Ue=class{static listen(){if(!Ue.listening)return;const e=document.location?.href.replace(document.location.origin,"");Ue.prevURL&&Ue.prevURL!=e&&(Ue.prevURL=e,Ue.listeners.forEach(t=>{t.location=e})),window.requestAnimationFrame(Ue.listen)}static offChange(e){const t=Ue.listeners.indexOf(e);t!=-1&&(Ue.listeners.splice(t,1),Ue.listeners.length==0&&(Ue.listening=!1))}static onChange(e){Ue.listening||(Ue.listening=!0,Ue.listen()),Ue.listeners.push(e),e.location=this.prevURL}static changeFromComponent(e){const t=e.goBack,r=document.referrer;if(t!=null){const P=document.location.origin,L=(t||P).toString(),_=r.indexOf("http")==0?new URL(r).origin!=P:!1,R=r=="",O=history.length<3,G=R&&O,ee=L!=document.location.href;if(_&&ee||G){const E=history.state||{};E.concorde=E.concorde||{},E.concorde.hasDoneHistoryBack=!0,history.pushState(E,document.title),history.back(),document.location.replace(L)}else history.back();return}let i=e.getAttribute("to")||"";if(i||(i=e.href?.toString()||""),!i)return;if(i.indexOf("#")==0){document.location.hash=i.substring(1);return}const u=new URL(i,document.location.href),a=u.pathname.split("/"),h=[];let b="";for(const P of a)P!=b&&h.push(P),b=P;i="/"+h.join("/")+u.search+(u.hash?+u.hash:""),e.hasAttribute("pushState")?history.pushState(null,"",i):e.hasAttribute("replaceState")?history.replaceState(null,"",i):document.location.href=i}static updateComponentActiveState(e){if(e.autoActive=="disabled")return;const t=e.href?.toString()||"";if(e.href&&t.indexOf("http")!=0){const r=new URL(t,document.location.href),i=new URL(e.location||"",document.location.origin);let u=!1;e.autoActive=="strict"?u=r.pathname==i.pathname&&r.hash==i.hash&&r.search==i.search:e.autoActive=="strict-path-only"?u=r.pathname==i.pathname&&r.hash==i.hash:u=i.href.indexOf(r.href)==0,u?e.setAttribute("active","true"):e.removeAttribute("active")}}},Ue.listeners=[],Ue.listening=!1,Ue.prevURL=document.location?.href.replace(document.location.origin,""),Ue);function bn(n){if(n==null||typeof n!="object"||Array.isArray(n))return n;const e={...n};return delete e._sonic_http_response_,e}const ve=class ve{constructor(e){this.addHTTPResponse=!1,this.cache="default",this.isServiceSimulated=!1,this.blockUntilDone=!1,this.keepAlive=!1,this.serviceURL=e.serviceURL,this.blockUntilDone=e.blockUntilDone||!1,this.serviceURL=="publisher://"&&(this.isServiceSimulated=!0),this.serviceURL||(this.serviceURL=document.location.origin),this.userName=e.userName,this.password=e.password,e.token&&(this.token=e.token),this.tokenProvider=e.tokenProvider,this.authToken=e.authToken,this.addHTTPResponse=e.addHTTPResponse||!1,this.credentials=e.credentials,this.cache=e.cache||"default",this.keepAlive=e.keepAlive||!1}set token(e){if(this._token=e,!e){ve.tokens.delete(this.serviceURL);return}ve.invalidTokens.includes(e)||ve.tokens.set(this.serviceURL,e)}get token(){return ve.invalidTokens.includes(this._token)?ve.tokens.get(this.serviceURL):this._token}handleInvalidToken(e){e&&(ve.invalidTokens.includes(e)||(ve.invalidTokens.push(e),this.token=null))}async handleResult(e,t){ve.firstCallDoneFlags.set(this.serviceURL,"done"),this.lastResult=e;const r=e.headers.get("content-type")?.toLowerCase(),i=e.status;let u={};if(!r||r.indexOf("text/")==0)u={text:await e.text()};else try{u=await e.json()}catch{u={}}if(this.addHTTPResponse&&sr.isObject(u)&&(u._sonic_http_response_=e),i===498&&!ve.failledTokenUpdates.has(this.serviceURL))if(this.handleInvalidToken(this.token),t.apiMethod==="get"){const h=await this.get(t.path,t.additionalHeaders);if(h==null)throw new Error("GET retry failed after token refresh");u=h}else u=await this[t.apiMethod](t.path,t.data,t.method,t.additionalHeaders);return ji("sonic-api").lastResponse.set({http:e,processed:u}),u}async auth(){if(this.token)return;if(ve.tokens.has(this.serviceURL)){this.token=ve.tokens.get(this.serviceURL);return}if(!this.tokenProvider)return;let e={};this.userName&&this.password?e={Authorization:"Basic "+window.btoa(unescape(encodeURIComponent(this.userName+":"+this.password)))}:this.authToken&&(e={Authorization:"Bearer "+this.authToken});const t=new URL(this.serviceURL),r=t.protocol+"//"+t.host,i=await fetch(this.computeURL(this.tokenProvider,{serviceHost:r}),{headers:e,credentials:this.credentials,keepalive:this.keepAlive});try{const u=await i.json();u.token?this.token=u.token:ve.failledTokenUpdates.set(this.serviceURL,!0)}catch{ve.failledTokenUpdates.set(this.serviceURL,!0)}}async localGet(e,t){const r=$e.get(e),i=new URLSearchParams(t.split("?")[1]||""),u=r.get();let a=[];Array.isArray(u)?a=u:a=[u];const h=[];let b=Number.POSITIVE_INFINITY,P=0,L=0;if(i.has("limit")&&(b=parseInt(i.get("limit")||"0"),L++),i.has("offset")&&(P=parseInt(i.get("offset")||"0"),L++),L>0&&(i.delete("limit"),i.delete("offset")),i.size===0)return a.slice(P,P+b);for(const[x,_]of i.entries()){const R=_.split(",").map(O=>O.trim());for(const O of R)for(const G of a)if(typeof G!="object")isNaN(+G)?G.toString().toLowerCase().includes(_.toLowerCase())&&h.push(G):G===_&&h.push(G);else{const ee=G;if(!ee[x])continue;isNaN(+ee[x])?ee[x]?.toString().toLowerCase().includes(O.toLowerCase())&&h.push(G):ee[x]===O&&h.push(G)}}return h.slice(P,P+b)}firstCallDone(){return new Promise(e=>{if(!ve.firstCallDoneFlags.has(this.serviceURL))ve.firstCallDoneFlags.set(this.serviceURL,"loading"),e(!0);else{const t=()=>{[void 0,"loading"].includes(ve.firstCallDoneFlags.get(this.serviceURL))?window.requestAnimationFrame(t):e(!0)};t()}})}async get(e,t){const r=/dataProvider\((.*?)\)(.*?)$/;if(r.test(e)){this.blockUntilDone&&(await this.firstCallDone(),ve.firstCallDoneFlags.set(this.serviceURL,"loading"));const P=e.match(r);if(!P)throw new Error("dataProvider path is not valid");return await this.localGet(P[1],P[2])}const i={apiMethod:"get",path:e,additionalHeaders:t},u=await this.createHeaders(t),a=this.computeURL(e),h=JSON.stringify({url:a,headers:u,credentials:this.credentials,cache:this.cache,keepAlive:this.keepAlive});if(this.blockUntilDone&&(await this.firstCallDone(),ve.firstCallDoneFlags.set(this.serviceURL,"loading")),!ve.loadingGetPromises.has(h)){const P=new Promise(async L=>{try{const x=await fetch(a,{headers:u,credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),_=await this.handleResult(x,i);L({processed:_,response:this.lastResult})}catch{ve.firstCallDoneFlags.set(this.serviceURL,"error"),L(null)}});ve.loadingGetPromises.set(h,P)}const b=await ve.loadingGetPromises.get(h);return ve.loadingGetPromises.delete(h),b?(this.lastResult=b.response,b.processed):null}async getDetailed(e,t){const r=/dataProvider\((.*?)\)(.*?)$/.test(e),i=await this.get(e,t);if(i==null)return;const u=bn(i),a=this.computeURL(e);if(r)return{request:new Request(a,{method:"GET"}),result:u};const h=await this.createHeaders(t);return{request:new Request(a,{method:"GET",headers:new Headers(h),credentials:this.credentials,cache:this.cache,keepalive:this.keepAlive}),response:this.lastResult,result:u}}async sendDetailed(e,t,r,i){const u=await this.send(e,t,r,i);if(u==null)return;const a=bn(u),h=this.computeURL(e),b=await this.createHeaders({Accept:"application/json","Content-Type":"application/json",...i});return{request:new Request(h,{method:r,headers:new Headers(b),credentials:this.credentials,body:JSON.stringify(t),keepalive:this.keepAlive}),response:this.lastResult,result:a}}async postDetailed(e,t,r){return this.sendDetailed(e,t,"POST",r)}async putDetailed(e,t,r){return this.sendDetailed(e,t,"PUT",r)}async patchDetailed(e,t,r){return this.sendDetailed(e,t,"PATCH",r)}async createHeaders(e){await this.auth();const t={};return this.token&&(t.Authorization="Bearer "+this.token),t["Accept-Language"]=st.getLanguage(),e&&Object.assign(t,e),t}computeURL(e,t={}){let r="";e.startsWith("http")?r=e:r=this.serviceURL+"/"+e,r.startsWith("http")||(r=window.location.origin+r);const i=new URL(r);for(const u in t)i.searchParams.set(u,t[u]);return i.toString().replace(/([^(https?:)])\/{2,}/g,"$1/")}async send(e,t,r="POST",i){const u={apiMethod:"send",path:e,additionalHeaders:i,method:r,data:t},a=await this.createHeaders(i);a.Accept="application/json",a["Content-Type"]="application/json";const h=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:r,body:JSON.stringify(t),keepalive:this.keepAlive});return await this.handleResult(h,u)}async submitFormData(e,t,r="POST",i){const u={apiMethod:"submitFormData",path:e,additionalHeaders:i,method:r,data:t},a=await this.createHeaders(i);a.Accept="application/json";const h=new FormData,b=t;for(const L in b)h.set(L,b[L]);const P=await fetch(this.computeURL(e),{headers:a,credentials:this.credentials,method:r,body:h,keepalive:this.keepAlive});return await this.handleResult(P,u)}async put(e,t,r){return this.send(e,t,"PUT",r)}async post(e,t,r){return this.send(e,t,"POST",r)}async patch(e,t,r){return this.send(e,t,"PATCH",r)}async delete(e,t,r){return this.send(e,t,"delete",r)}};ve.loadingGetPromises=new Map,ve.tokens=new Map,ve.invalidTokens=[],ve.failledTokenUpdates=new Map,ve.firstCallDoneFlags=new Map;let Mr=ve;st.getApiConfiguration(document.body||document.documentElement);var wn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function zi(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var It={exports:{}},Wi=It.exports,En;function Hi(){return En||(En=1,(function(n,e){var t=[].slice;(function(r,i){return e!==null?n.exports=i():r.UrlPattern=i()})(Wi,function(){var r,i,u,a,h,b,P,L,x,_,R,O,G,ee,J;return x=function(E){return E.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")},P=function(E,g){var D,w,k;for(k=[],D=-1,w=E.length;++D<w;)k=k.concat(g(E[D]));return k},ee=function(E,g){var D,w,k;for(k="",D=-1,w=E.length;++D<w;)k+=g(E[D]);return k},G=function(E){return new RegExp(E.toString()+"|").exec("").length-1},R=function(E,g){var D,w,k,z,F;for(z={},D=-1,k=E.length;++D<k;)w=E[D],F=g[D],F!=null&&(z[w]!=null?(Array.isArray(z[w])||(z[w]=[z[w]]),z[w].push(F)):z[w]=F);return z},r={},r.Result=function(E,g){this.value=E,this.rest=g},r.Tagged=function(E,g){this.tag=E,this.value=g},r.tag=function(E,g){return function(D){var w,k;if(w=g(D),w!=null)return k=new r.Tagged(E,w.value),new r.Result(k,w.rest)}},r.regex=function(E){return function(g){var D,w;if(D=E.exec(g),D!=null)return w=D[0],new r.Result(w,g.slice(w.length))}},r.sequence=function(){var E;return E=1<=arguments.length?t.call(arguments,0):[],function(g){var D,w,k,z,F,Z;for(D=-1,w=E.length,Z=[],z=g;++D<w;){if(k=E[D],F=k(z),F==null)return;Z.push(F.value),z=F.rest}return new r.Result(Z,z)}},r.pick=function(){var E,g;return E=arguments[0],g=2<=arguments.length?t.call(arguments,1):[],function(D){var w,k;if(k=r.sequence.apply(r,g)(D),k!=null)return w=k.value,k.value=w[E],k}},r.string=function(E){var g;return g=E.length,function(D){if(D.slice(0,g)===E)return new r.Result(E,D.slice(g))}},r.lazy=function(E){var g;return g=null,function(D){return g==null&&(g=E()),g(D)}},r.baseMany=function(E,g,D,w,k){var z,F,Z,ne;for(Z=k,ne=D?"":[];!(g!=null&&(z=g(Z),z!=null)||(F=E(Z),F==null));)D?ne+=F.value:ne.push(F.value),Z=F.rest;if(!(w&&ne.length===0))return new r.Result(ne,Z)},r.many1=function(E){return function(g){return r.baseMany(E,null,!1,!0,g)}},r.concatMany1Till=function(E,g){return function(D){return r.baseMany(E,g,!0,!0,D)}},r.firstChoice=function(){var E;return E=1<=arguments.length?t.call(arguments,0):[],function(g){var D,w,k,z;for(D=-1,w=E.length;++D<w;)if(k=E[D],z=k(g),z!=null)return z}},O=function(E){var g;return g={},g.wildcard=r.tag("wildcard",r.string(E.wildcardChar)),g.optional=r.tag("optional",r.pick(1,r.string(E.optionalSegmentStartChar),r.lazy(function(){return g.pattern}),r.string(E.optionalSegmentEndChar))),g.name=r.regex(new RegExp("^["+E.segmentNameCharset+"]+")),g.named=r.tag("named",r.pick(1,r.string(E.segmentNameStartChar),r.lazy(function(){return g.name}))),g.escapedChar=r.pick(1,r.string(E.escapeChar),r.regex(/^./)),g.static=r.tag("static",r.concatMany1Till(r.firstChoice(r.lazy(function(){return g.escapedChar}),r.regex(/^./)),r.firstChoice(r.string(E.segmentNameStartChar),r.string(E.optionalSegmentStartChar),r.string(E.optionalSegmentEndChar),g.wildcard))),g.token=r.lazy(function(){return r.firstChoice(g.wildcard,g.optional,g.named,g.static)}),g.pattern=r.many1(r.lazy(function(){return g.token})),g},L={escapeChar:"\\",segmentNameStartChar:":",segmentValueCharset:"a-zA-Z0-9-_~ %",segmentNameCharset:"a-zA-Z0-9",optionalSegmentStartChar:"(",optionalSegmentEndChar:")",wildcardChar:"*"},b=function(E,g){if(Array.isArray(E))return ee(E,function(D){return b(D,g)});switch(E.tag){case"wildcard":return"(.*?)";case"named":return"(["+g+"]+)";case"static":return x(E.value);case"optional":return"(?:"+b(E.value,g)+")?"}},h=function(E,g){return g==null&&(g=L.segmentValueCharset),"^"+b(E,g)+"$"},a=function(E){if(Array.isArray(E))return P(E,a);switch(E.tag){case"wildcard":return["_"];case"named":return[E.value];case"static":return[];case"optional":return a(E.value)}},_=function(E,g,D,w){var k,z,F,Z;if(w==null&&(w=!1),Z=E[g],Z==null){if(w)throw new Error("no values provided for key `"+g+"`");return}if(k=D[g]||0,z=Array.isArray(Z)?Z.length-1:0,k>z){if(w)throw new Error("too few values provided for key `"+g+"`");return}return F=Array.isArray(Z)?Z[k]:Z,w&&(D[g]=k+1),F},u=function(E,g,D){var w,k;if(Array.isArray(E)){for(w=-1,k=E.length;++w<k;)if(u(E[w],g,D))return!0;return!1}switch(E.tag){case"wildcard":return _(g,"_",D,!1)!=null;case"named":return _(g,E.value,D,!1)!=null;case"static":return!1;case"optional":return u(E.value,g,D)}},J=function(E,g,D){if(Array.isArray(E))return ee(E,function(w){return J(w,g,D)});switch(E.tag){case"wildcard":return _(g,"_",D,!0);case"named":return _(g,E.value,D,!0);case"static":return E.value;case"optional":return u(E.value,g,D)?J(E.value,g,D):""}},i=function(E,g){var D,w,k,z,F;if(E instanceof i){this.isRegex=E.isRegex,this.regex=E.regex,this.ast=E.ast,this.names=E.names;return}if(this.isRegex=E instanceof RegExp,!(typeof E=="string"||this.isRegex))throw new TypeError("argument must be a regex or a string");if(this.isRegex){if(this.regex=E,g!=null){if(!Array.isArray(g))throw new Error("if first argument is a regex the second argument may be an array of group names but you provided something else");if(D=G(this.regex),g.length!==D)throw new Error("regex contains "+D+" groups but array of group names contains "+g.length);this.names=g}return}if(E==="")throw new Error("argument must not be the empty string");if(F=E.replace(/\s+/g,""),F!==E)throw new Error("argument must not contain whitespace");if(w={escapeChar:g?.escapeChar||L.escapeChar,segmentNameStartChar:g?.segmentNameStartChar||L.segmentNameStartChar,segmentNameCharset:g?.segmentNameCharset||L.segmentNameCharset,segmentValueCharset:g?.segmentValueCharset||L.segmentValueCharset,optionalSegmentStartChar:g?.optionalSegmentStartChar||L.optionalSegmentStartChar,optionalSegmentEndChar:g?.optionalSegmentEndChar||L.optionalSegmentEndChar,wildcardChar:g?.wildcardChar||L.wildcardChar},z=O(w),k=z.pattern(E),k==null)throw new Error("couldn't parse pattern");if(k.rest!=="")throw new Error("could only partially parse pattern");this.ast=k.value,this.regex=new RegExp(h(this.ast,w.segmentValueCharset)),this.names=a(this.ast)},i.prototype.match=function(E){var g,D;return D=this.regex.exec(E),D==null?null:(g=D.slice(1),this.names?R(this.names,g):g)},i.prototype.stringify=function(E){if(E==null&&(E={}),this.isRegex)throw new Error("can't stringify patterns generated from a regex");if(E!==Object(E))throw new Error("argument must be an object or undefined");return J(this.ast,E,{})},i.escapeForRegex=x,i.concatMap=P,i.stringConcatMap=ee,i.regexGroupCount=G,i.keysAndValuesToObject=R,i.P=r,i.newParser=O,i.defaultOptions=L,i.astNodeToRegexString=h,i.astNodeToNames=a,i.getParam=_,i.astNodeContainsSegmentsForProvidedParams=u,i.stringify=J,i})})(It,It.exports)),It.exports}var Vi=Hi();const Xi=zi(Vi);class Fr{constructor(e){this.path=Fr.normalizePath(e)}getDataProviderKey(){return new ir(this.path)}static normalizePath(e){const t=String(e).trim();if(!t)throw new RangeError("Endpoint: path cannot be empty");if(/^https?:\/\//i.test(t)){let b;try{b=new URL(t)}catch{throw new RangeError("Endpoint: invalid absolute URL")}return b.pathname=b.pathname.replace(/\/+/g,"/"),b.href}const r=t.indexOf("?"),i=t.indexOf("#");let u=t.length;r>=0&&(u=Math.min(u,r)),i>=0&&(u=Math.min(u,i));let a=t.slice(0,u);const h=t.slice(u);if(a=a.replace(/^\/+/,""),a=a.replace(/\/+/g,"/"),!a&&h)throw new RangeError("Endpoint: path cannot be empty");return a+h}static isNonEmpty(e){return String(e).trim().length>0}static looksLikeDataProviderPath(e){return/^\s*dataProvider\s*\(/i.test(String(e))}toString(){return this.path}}function ur(n){throw new Error('Could not dynamically require "'+n+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var $r={exports:{}},_n;function Yi(){return _n||(_n=1,(function(n,e){(function(t){n.exports=t()})(function(){return(function(){function t(r,i,u){function a(P,L){if(!i[P]){if(!r[P]){var x=typeof ur=="function"&&ur;if(!L&&x)return x(P,!0);if(h)return h(P,!0);var _=new Error("Cannot find module '"+P+"'");throw _.code="MODULE_NOT_FOUND",_}var R=i[P]={exports:{}};r[P][0].call(R.exports,function(O){var G=r[P][1][O];return a(G||O)},R,R.exports,t,r,i,u)}return i[P].exports}for(var h=typeof ur=="function"&&ur,b=0;b<u.length;b++)a(u[b]);return a}return t})()({1:[function(t,r,i){const u=t("./utils"),a=(function(){const h=u.stringToArray,b=["Zero","One","Two","Three","Four","Five","Six","Seven","Eight","Nine","Ten","Eleven","Twelve","Thirteen","Fourteen","Fifteen","Sixteen","Seventeen","Eighteen","Nineteen"],P=["Zeroth","First","Second","Third","Fourth","Fifth","Sixth","Seventh","Eighth","Ninth","Tenth","Eleventh","Twelfth","Thirteenth","Fourteenth","Fifteenth","Sixteenth","Seventeenth","Eighteenth","Nineteenth"],L=["Twenty","Thirty","Forty","Fifty","Sixty","Seventy","Eighty","Ninety","Hundred"],x=["Thousand","Million","Billion","Trillion"];function _(A,C){var T=function(B,N,U){var j="";if(B<=19)j=(N?" and ":"")+(U?P[B]:b[B]);else if(B<100){const le=Math.floor(B/10),se=B%10;j=(N?" and ":"")+L[le-2],se>0?j+="-"+T(se,!1,U):U&&(j=j.substring(0,j.length-1)+"ieth")}else if(B<1e3){const le=Math.floor(B/100),se=B%100;j=(N?", ":"")+b[le]+" Hundred",se>0?j+=T(se,!0,U):U&&(j+="th")}else{var V=Math.floor(Math.log10(B)/3);V>x.length&&(V=x.length);const le=Math.pow(10,V*3),se=Math.floor(B/le),K=B-se*le;j=(N?", ":"")+T(se,!1,!1)+" "+x[V-1],K>0?j+=T(K,!0,U):U&&(j+="th")}return j},M=T(A,!1,C);return M}const R=Object.create(null);b.forEach(function(A,C){R[A.toLowerCase()]=C}),P.forEach(function(A,C){R[A.toLowerCase()]=C}),L.forEach(function(A,C){const T=A.toLowerCase();R[T]=(C+2)*10,R[T.substring(0,A.length-1)+"ieth"]=R[T]}),R.hundredth=100,x.forEach(function(A,C){const T=A.toLowerCase(),M=Math.pow(10,(C+1)*3);R[T]=M,R[T+"th"]=M});function O(A){const T=A.split(/,\s|\sand\s|[\s\\-]/).map(N=>R[N]);let M=[0];return T.forEach(N=>{if(N<100){let U=M.pop();U>=1e3&&(M.push(U),U=0),M.push(U+N)}else M.push(M.pop()*N)}),M.reduce((N,U)=>N+U,0)}const G=[[1e3,"m"],[900,"cm"],[500,"d"],[400,"cd"],[100,"c"],[90,"xc"],[50,"l"],[40,"xl"],[10,"x"],[9,"ix"],[5,"v"],[4,"iv"],[1,"i"]],ee={M:1e3,D:500,C:100,L:50,X:10,V:5,I:1};function J(A){for(var C=0;C<G.length;C++){const T=G[C];if(A>=T[0])return T[1]+J(A-T[0])}return""}function E(A){for(var C=0,T=1,M=A.length-1;M>=0;M--){const B=A[M],N=ee[B];N<T?C-=N:(T=N,C+=N)}return C}function g(A,C){for(var T=[],M=C.charCodeAt(0);A>0;)T.unshift(String.fromCharCode((A-1)%26+M)),A=Math.floor((A-1)/26);return T.join("")}function D(A,C){for(var T=C.charCodeAt(0),M=0,B=0;B<A.length;B++)M+=(A.charCodeAt(A.length-B-1)-T+1)*Math.pow(26,B);return M}function w(A,C){if(typeof A>"u")return;A=Math.floor(A);const T=ne(C);return F(A,T)}const k={DECIMAL:"decimal",LETTERS:"letters",ROMAN:"roman",WORDS:"words",SEQUENCE:"sequence"},z={UPPER:"upper",LOWER:"lower",TITLE:"title"};function F(A,C){let T;const M=A<0;switch(A=Math.abs(A),C.primary){case k.LETTERS:T=g(A,C.case===z.UPPER?"A":"a");break;case k.ROMAN:T=J(A),C.case===z.UPPER&&(T=T.toUpperCase());break;case k.WORDS:T=_(A,C.ordinal),C.case===z.UPPER?T=T.toUpperCase():C.case===z.LOWER&&(T=T.toLowerCase());break;case k.DECIMAL:T=""+A;var B=C.mandatoryDigits-T.length;if(B>0){var N=new Array(B+1).join("0");T=N+T}if(C.zeroCode!==48&&(T=h(T).map(le=>String.fromCodePoint(le.codePointAt(0)+C.zeroCode-48)).join("")),C.regular){const le=Math.floor((T.length-1)/C.groupingSeparators.position);for(let se=le;se>0;se--){const K=T.length-se*C.groupingSeparators.position;T=T.substr(0,K)+C.groupingSeparators.character+T.substr(K)}}else C.groupingSeparators.reverse().forEach(le=>{const se=T.length-le.position;T=T.substr(0,se)+le.character+T.substr(se)});if(C.ordinal){var U={1:"st",2:"nd",3:"rd"},j=T[T.length-1],V=U[j];(!V||T.length>1&&T[T.length-2]==="1")&&(V="th"),T=T+V}break;case k.SEQUENCE:throw{code:"D3130",value:C.token}}return M&&(T="-"+T),T}const Z=[48,1632,1776,1984,2406,2534,2662,2790,2918,3046,3174,3302,3430,3558,3664,3792,3872,4160,4240,6112,6160,6470,6608,6784,6800,6992,7088,7232,7248,42528,43216,43264,43472,43504,43600,44016,65296];function ne(A){const C={type:"integer",primary:k.DECIMAL,case:z.LOWER,ordinal:!1};let T,M;const B=A.lastIndexOf(";");switch(B===-1?T=A:(T=A.substring(0,B),M=A.substring(B+1),M[0]==="o"&&(C.ordinal=!0)),T){case"A":C.case=z.UPPER;case"a":C.primary=k.LETTERS;break;case"I":C.case=z.UPPER;case"i":C.primary=k.ROMAN;break;case"W":C.case=z.UPPER,C.primary=k.WORDS;break;case"Ww":C.case=z.TITLE,C.primary=k.WORDS;break;case"w":C.primary=k.WORDS;break;default:{let N=null,U=0,j=0,V=[],le=0;if(h(T).map(K=>K.codePointAt(0)).reverse().forEach(K=>{let X=!1;for(let oe=0;oe<Z.length;oe++){const Y=Z[oe];if(K>=Y&&K<=Y+9){if(X=!0,U++,le++,N===null)N=Y;else if(Y!==N)throw{code:"D3131"};break}}X||(K===35?(le++,j++):V.push({position:le,character:String.fromCodePoint(K)}))}),U>0){C.primary=k.DECIMAL,C.zeroCode=N,C.mandatoryDigits=U,C.optionalDigits=j;const X=function(oe){if(oe.length===0)return 0;const Y=oe[0].character;for(let De=1;De<oe.length;De++)if(oe[De].character!==Y)return 0;const Ne=oe.map(De=>De.position),Ze=function(De,Be){return Be===0?De:Ze(Be,De%Be)},Ge=Ne.reduce(Ze);for(let De=1;De<=Ne.length;De++)if(Ne.indexOf(De*Ge)===-1)return 0;return Ge}(V);X>0?(C.regular=!0,C.groupingSeparators={position:X,character:V[0].character}):(C.regular=!1,C.groupingSeparators=V)}else C.primary=k.SEQUENCE,C.token=T}}return C}const we={Y:"1",M:"1",D:"1",d:"1",F:"n",W:"1",w:"1",X:"1",x:"1",H:"1",h:"1",P:"n",m:"01",s:"01",f:"1",Z:"01:01",z:"01:01",C:"n",E:"n"};function pe(A){var C=[];const T={type:"datetime",parts:C},M=function(X,oe){if(oe>X){let Y=A.substring(X,oe);Y=Y.split("]]").join("]"),C.push({type:"literal",value:Y})}};for(var B=0,N=0;N<A.length;){if(A.charAt(N)==="["){if(A.charAt(N+1)==="["){M(B,N),C.push({type:"literal",value:"["}),N+=2,B=N;continue}if(M(B,N),B=N,N=A.indexOf("]",B),N===-1)throw{code:"D3135"};let X=A.substring(B+1,N);X=X.split(/\s+/).join("");var U={type:"marker",component:X.charAt(0)},j=X.lastIndexOf(","),V;if(j!==-1){const oe=X.substring(j+1),Y=oe.indexOf("-");let Ne,Ze;const Ge=function(Be){if(!(typeof Be>"u"||Be==="*"))return parseInt(Be)};Y===-1?Ne=oe:(Ne=oe.substring(0,Y),Ze=oe.substring(Y+1));const De={min:Ge(Ne),max:Ge(Ze)};U.width=De,V=X.substring(1,j)}else V=X.substring(1);if(V.length===1)U.presentation1=V;else if(V.length>1){var le=V.charAt(V.length-1);"atco".indexOf(le)!==-1?(U.presentation2=le,le==="o"&&(U.ordinal=!0),U.presentation1=V.substring(0,V.length-1)):U.presentation1=V}else U.presentation1=we[U.component];if(typeof U.presentation1>"u")throw{code:"D3132",value:U.component};if(U.presentation1[0]==="n")U.names=z.LOWER;else if(U.presentation1[0]==="N")U.presentation1[1]==="n"?U.names=z.TITLE:U.names=z.UPPER;else if("YMDdFWwXxHhmsf".indexOf(U.component)!==-1){var se=U.presentation1;if(U.presentation2&&(se+=";"+U.presentation2),U.integerFormat=ne(se),U.width&&U.width.min!==void 0&&U.integerFormat.mandatoryDigits<U.width.min&&(U.integerFormat.mandatoryDigits=U.width.min),U.component==="Y")if(U.n=-1,U.width&&U.width.max!==void 0)U.n=U.width.max,U.integerFormat.mandatoryDigits=U.n;else{var K=U.integerFormat.mandatoryDigits+U.integerFormat.optionalDigits;K>=2&&(U.n=K)}const oe=C[C.length-1];oe&&oe.integerFormat&&(oe.integerFormat.parseWidth=oe.integerFormat.mandatoryDigits)}(U.component==="Z"||U.component==="z")&&(U.integerFormat=ne(U.presentation1)),C.push(U),B=N+1}N++}return M(B,N),T}const he=["","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Pe=["January","February","March","April","May","June","July","August","September","October","November","December"],Ye=1e3*60*60*24,ae=function(A){const C=Date.UTC(A.year,A.month);var T=new Date(C).getUTCDay();return T===0&&(T=7),T>4?C+(8-T)*Ye:C-(T-1)*Ye},de=function(A,C){return{year:A,month:C,nextMonth:function(){return C===11?de(A+1,0):de(A,C+1)},previousMonth:function(){return C===0?de(A-1,11):de(A,C-1)},nextYear:function(){return de(A+1,C)},previousYear:function(){return de(A-1,C)}}},He=function(A,C){return(C-A)/(Ye*7)+1},te=(A,C)=>{let T;switch(C){case"Y":T=A.getUTCFullYear();break;case"M":T=A.getUTCMonth()+1;break;case"D":T=A.getUTCDate();break;case"d":{const M=Date.UTC(A.getUTCFullYear(),A.getUTCMonth(),A.getUTCDate()),B=Date.UTC(A.getUTCFullYear(),0);T=(M-B)/Ye+1;break}case"F":T=A.getUTCDay(),T===0&&(T=7);break;case"W":{const M=de(A.getUTCFullYear(),0),B=ae(M),N=Date.UTC(M.year,A.getUTCMonth(),A.getUTCDate());let U=He(B,N);if(U>52){const j=ae(M.nextYear());N>=j&&(U=1)}else if(U<1){const j=ae(M.previousYear());U=He(j,N)}T=Math.floor(U);break}case"w":{const M=de(A.getUTCFullYear(),A.getUTCMonth()),B=ae(M),N=Date.UTC(M.year,M.month,A.getUTCDate());let U=He(B,N);if(U>4){const j=ae(M.nextMonth());N>=j&&(U=1)}else if(U<1){const j=ae(M.previousMonth());U=He(j,N)}T=Math.floor(U);break}case"X":{const M=de(A.getUTCFullYear(),0),B=ae(M),N=ae(M.nextYear()),U=A.getTime();U<B?T=M.year-1:U>=N?T=M.year+1:T=M.year;break}case"x":{const M=de(A.getUTCFullYear(),A.getUTCMonth()),B=ae(M),N=M.nextMonth(),U=ae(N),j=A.getTime();j<B?T=M.previousMonth().month+1:j>=U?T=N.month+1:T=M.month+1;break}case"H":T=A.getUTCHours();break;case"h":T=A.getUTCHours(),T=T%12,T===0&&(T=12);break;case"P":T=A.getUTCHours()>=12?"pm":"am";break;case"m":T=A.getUTCMinutes();break;case"s":T=A.getUTCSeconds();break;case"f":T=A.getUTCMilliseconds();break;case"Z":case"z":break;case"C":T="ISO";break;case"E":T="ISO";break}return T};let xe=null;function rt(A,C,T){var M=0,B=0;if(typeof T<"u"){const se=parseInt(T);M=Math.floor(se/100),B=se%100}var N=function(se,K){var X=te(se,K.component);if("YMDdFWwXxHhms".indexOf(K.component)!==-1)if(K.component==="Y"&&K.n!==-1&&(X=X%Math.pow(10,K.n)),K.names){if(K.component==="M"||K.component==="x")X=Pe[X-1];else if(K.component==="F")X=he[X];else throw{code:"D3133",value:K.component};K.names===z.UPPER?X=X.toUpperCase():K.names===z.LOWER&&(X=X.toLowerCase()),K.width&&X.length>K.width.max&&(X=X.substring(0,K.width.max))}else X=F(X,K.integerFormat);else if(K.component==="f")X=F(X,K.integerFormat);else if(K.component==="Z"||K.component==="z"){const oe=M*100+B;if(K.integerFormat.regular)X=F(oe,K.integerFormat);else{const Y=K.integerFormat.mandatoryDigits;if(Y===1||Y===2)X=F(M,K.integerFormat),B!==0&&(X+=":"+w(B,"00"));else if(Y===3||Y===4)X=F(oe,K.integerFormat);else throw{code:"D3134",value:Y}}oe>=0&&(X="+"+X),K.component==="z"&&(X="GMT"+X),oe===0&&K.presentation2==="t"&&(X="Z")}else K.component==="P"&&K.names===z.UPPER&&(X=X.toUpperCase());return X};let U;typeof C>"u"?(xe===null&&(xe=pe("[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01].[f001][Z01:01t]")),U=xe):U=pe(C);const j=(60*M+B)*60*1e3,V=new Date(A+j);let le="";return U.parts.forEach(function(se){se.type==="literal"?le+=se.value:le+=N(V,se)}),le}function d(A){var C=Object.create(null);if(A.type==="datetime")C.type="datetime",C.parts=A.parts.map(function(T){var M=Object.create(null);if(T.type==="literal")M.regex=T.value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");else if(T.component==="Z"||T.component==="z"){let N;Array.isArray(T.integerFormat.groupingSeparators)||(N=T.integerFormat.groupingSeparators),M.regex="",T.component==="z"&&(M.regex="GMT"),M.regex+="[-+][0-9]+",N&&(M.regex+=N.character+"[0-9]+"),M.parse=function(U){T.component==="z"&&(U=U.substring(3));let j=0,V=0;return N?(j=Number.parseInt(U.substring(0,U.indexOf(N.character))),V=Number.parseInt(U.substring(U.indexOf(N.character)+1))):U.length-1<=2?j=Number.parseInt(U):(j=Number.parseInt(U.substring(0,3)),V=Number.parseInt(U.substring(3))),j*60+V}}else if(T.component==="f")M.regex="[0-9]+",M.parse=function(N){return parseFloat("0."+N.substring(0,3))*1e3};else if(T.integerFormat)M=d(T.integerFormat);else{M.regex="[a-zA-Z]+";var B=Object.create(null);if(T.component==="M"||T.component==="x")Pe.forEach(function(N,U){T.width&&T.width.max?B[N.substring(0,T.width.max)]=U+1:B[N]=U+1});else if(T.component==="F")he.forEach(function(N,U){U>0&&(T.width&&T.width.max?B[N.substring(0,T.width.max)]=U:B[N]=U)});else if(T.component==="P")B={am:0,AM:0,pm:1,PM:1};else throw{code:"D3133",value:T.component};M.parse=function(N){return B[N]}}return M.component=T.component,M});else{C.type="integer";const T=A.case===z.UPPER;switch(A.primary){case k.LETTERS:C.regex=T?"[A-Z]+":"[a-z]+",C.parse=function(M){return D(M,T?"A":"a")};break;case k.ROMAN:C.regex=T?"[MDCLXVI]+":"[mdclxvi]+",C.parse=function(M){return E(T?M:M.toUpperCase())};break;case k.WORDS:C.regex="(?:"+u.keys(R).concat("and","[\\-, ]").join("|")+")+",C.parse=function(M){return O(M.toLowerCase())};break;case k.DECIMAL:C.regex="[0-9]",A.parseWidth?C.regex+=`{${A.parseWidth}}`:C.regex+="+",A.ordinal&&(C.regex+="(?:th|st|nd|rd)"),C.parse=function(M){let B=M;return A.ordinal&&(B=M.substring(0,M.length-2)),A.regular?B=B.split(",").join(""):A.groupingSeparators.forEach(N=>{B=B.split(N.character).join("")}),A.zeroCode!==48&&(B=B.split("").map(N=>String.fromCodePoint(N.codePointAt(0)-A.zeroCode+48)).join("")),parseInt(B)};break;case k.SEQUENCE:throw{code:"D3130",value:A.token}}}return C}function y(A,C){if(typeof A>"u")return;const T=ne(C);return d(T).parse(A)}function W(A,C){const T=pe(C),M=d(T),B="^"+M.parts.map(V=>"("+V.regex+")").join("")+"$";var U=new RegExp(B,"i").exec(A);if(U!==null){const Y=Object.create(null);for(let c=1;c<U.length;c++){const f=M.parts[c-1];f.parse&&(Y[f.component]=f.parse(U[c]))}if(Object.getOwnPropertyNames(Y).length===0)return;let Ne=0;const Ze=c=>{Ne<<=1,Ne+=c?1:0},Ge=c=>!(~c&Ne)&&!!(c&Ne);"YXMxWwdD".split("").forEach(c=>Ze(Y[c]));const Be=!Ge(161)&&Ge(130),ot=Ge(84),xt=!ot&&Ge(72);Ne=0,"PHhmsf".split("").forEach(c=>Ze(Y[c]));const q=!Ge(23)&&Ge(47),et=(Be?"YD":ot?"XxwF":xt?"XWF":"YMD")+(q?"Phmsf":"Hmsf"),Yt=this.environment.timestamp;let nt=!1,bt=!1;if(et.split("").forEach(c=>{if(typeof Y[c]>"u")nt?(Y[c]="MDd".indexOf(c)!==-1?1:0,bt=!0):Y[c]=te(Yt,c);else if(nt=!0,bt)throw{code:"D3136"}}),Y.M>0?Y.M-=1:Y.M=0,Be){const c=Date.UTC(Y.Y,0),f=(Y.d-1)*1e3*60*60*24,p=new Date(c+f);Y.M=p.getUTCMonth(),Y.D=p.getUTCDate()}if(ot)throw{code:"D3136"};if(xt)throw{code:"D3136"};q&&(Y.H=Y.h===12?0:Y.h,Y.P===1&&(Y.H+=12));var j=Date.UTC(Y.Y,Y.M,Y.D,Y.H,Y.m,Y.s,Y.f);return(Y.Z||Y.z)&&(j-=(Y.Z||Y.z)*60*1e3),j}}var ce=new RegExp("^\\d{4}(-[01]\\d)?(-[0-3]\\d)?(T[0-2]\\d:[0-5]\\d:[0-5]\\d)?(\\.\\d+)?([+-][0-2]\\d:?[0-5]\\d|Z)?$");function Ee(A,C){if(!(typeof A>"u"))if(typeof C>"u"){if(!ce.test(A))throw{stack:new Error().stack,code:"D3110",value:A};return Date.parse(A)}else return W.call(this,A,C)}function ye(A,C,T){if(!(typeof A>"u"))return rt.call(this,A,C,T)}return{formatInteger:w,parseInteger:y,fromMillis:ye,toMillis:Ee}})();r.exports=a},{"./utils":6}],2:[function(t,r,i){(function(u){(function(){var a=t("./utils");const h=(()=>{var b=a.isNumeric,P=a.isArrayOfStrings,L=a.isArrayOfNumbers,x=a.isSequence,_=a.isFunction,R=a.isLambda,O=a.isPromise,G=a.getFunctionArity,ee=a.isDeepEqual,J=a.stringToArray;function E(s){if(!(typeof s>"u")){var o=0;return s.forEach(function(l){o+=l}),o}}function g(s){return typeof s>"u"?0:s.length}function D(s){if(!(typeof s>"u"||s.length===0))return Math.max.apply(Math,s)}function w(s){if(!(typeof s>"u"||s.length===0))return Math.min.apply(Math,s)}function k(s){if(!(typeof s>"u"||s.length===0)){var o=0;return s.forEach(function(l){o+=l}),o/s.length}}function z(s,o=!1){if(!(typeof s>"u")){var l;if(typeof s=="string")l=s;else if(_(s))l="";else{if(typeof s=="number"&&!isFinite(s))throw{code:"D3001",value:s,stack:new Error().stack};var v=o?2:0;Array.isArray(s)&&s.outerWrapper&&(s=s[0]),l=JSON.stringify(s,function(m,S){return typeof S<"u"&&S!==null&&b(S)?S.toPrecision&&!Number.isInteger(S)?Number(S.toPrecision(15)):S:S&&_(S)?"":S},v)}return l}}function F(s,o,l){if(!(typeof s>"u")){var v=J(s),m=v.length;if(m+o<0&&(o=0),typeof l<"u"){if(l<=0)return"";var S=o>=0?o+l:m+o+l;return v.slice(o,S).join("")}return v.slice(o).join("")}}function Z(s,o){if(!(typeof s>"u")){var l=s.indexOf(o);return l>-1?s.substr(0,l):s}}function ne(s,o){if(!(typeof s>"u")){var l=s.indexOf(o);return l>-1?s.substr(l+o.length):s}}function we(s){if(!(typeof s>"u"))return s.toLowerCase()}function pe(s){if(!(typeof s>"u"))return s.toUpperCase()}function he(s){if(!(typeof s>"u"))return J(s).length}function Pe(s){if(!(typeof s>"u")){var o=s.replace(/[ \t\n\r]+/gm," ");return o.charAt(0)===" "&&(o=o.substring(1)),o.charAt(o.length-1)===" "&&(o=o.substring(0,o.length-1)),o}}function Ye(s,o,l){if(!(typeof s>"u")){(typeof l>"u"||l.length===0)&&(l=" ");var v;o=Math.trunc(o);var m=Math.abs(o)-he(s);if(m>0){var S=new Array(m+1).join(l);l.length>1&&(S=F(S,0,m)),o>0?v=s+S:v=S+s}else v=s;return v}}async function ae(s,o){var l=s.apply(this,[o]);if(O(l)&&(l=await l),l&&!(typeof l.start=="number"||l.end==="number"||Array.isArray(l.groups)||_(l.next)))throw{code:"T1010",stack:new Error().stack};return l}async function de(s,o){if(!(typeof s>"u"||typeof o>"u")){var l;if(typeof o=="string")l=s.indexOf(o)!==-1;else{var v=await ae(o,s);l=typeof v<"u"}return l}}async function He(s,o,l){if(!(typeof s>"u")){if(l<0)throw{stack:new Error().stack,value:l,code:"D3040",index:3};var v=this.createSequence();if(typeof l>"u"||l>0){var m=0,S=await ae(o,s);if(typeof S<"u")for(;typeof S<"u"&&(typeof l>"u"||m<l);)v.push({match:S.match,index:S.start,groups:S.groups}),S=await ae(S.next),m++}return v}}async function te(s,o,l,v){if(!(typeof s>"u")){var m=this;if(o==="")throw{code:"D3010",stack:new Error().stack,value:o,index:2};if(v<0)throw{code:"D3011",stack:new Error().stack,value:v,index:4};var S;typeof l=="string"?S=function(Ae){for(var Le="",ge=0,Ce=l.indexOf("$",ge);Ce!==-1&&ge<l.length;){Le+=l.substring(ge,Ce),ge=Ce+1;var Qe=l.charAt(ge);if(Qe==="$")Le+="$",ge++;else if(Qe==="0")Le+=Ae.match,ge++;else{var je;if(Ae.groups.length===0?je=1:je=Math.floor(Math.log(Ae.groups.length)*Math.LOG10E)+1,Ce=parseInt(l.substring(ge,ge+je),10),je>1&&Ce>Ae.groups.length&&(Ce=parseInt(l.substring(ge,ge+je-1),10)),isNaN(Ce))Le+="$";else{if(Ae.groups.length>0){var it=Ae.groups[Ce-1];typeof it<"u"&&(Le+=it)}ge+=Ce.toString().length}}Ce=l.indexOf("$",ge)}return Le+=l.substring(ge),Le}:S=l;var $="",I=0;if(typeof v>"u"||v>0){var re=0;if(typeof o=="string"){for(var H=s.indexOf(o,I);H!==-1&&(typeof v>"u"||re<v);)$+=s.substring(I,H),$+=l,I=H+o.length,re++,H=s.indexOf(o,I);$+=s.substring(I)}else{var be=await ae(o,s);if(typeof be<"u"){for(;typeof be<"u"&&(typeof v>"u"||re<v);){$+=s.substring(I,be.start);var _e=S.apply(m,[be]);if(O(_e)&&(_e=await _e),typeof _e=="string")$+=_e;else throw{code:"D3012",stack:new Error().stack,value:_e};I=be.start+be.match.length,re++,be=await ae(be.next)}$+=s.substring(I)}else $=s}}else $=s;return $}}function xe(s){if(!(typeof s>"u")){var o=typeof window<"u"?window.btoa:function(l){return new u.Buffer.from(l,"binary").toString("base64")};return o(s)}}function rt(s){if(!(typeof s>"u")){var o=typeof window<"u"?window.atob:function(l){return new u.Buffer.from(l,"base64").toString("binary")};return o(s)}}function d(s){if(!(typeof s>"u")){var o;try{o=encodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrlComponent"}}return o}}function y(s){if(!(typeof s>"u")){var o;try{o=encodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"encodeUrl"}}return o}}function W(s){if(!(typeof s>"u")){var o;try{o=decodeURIComponent(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrlComponent"}}return o}}function ce(s){if(!(typeof s>"u")){var o;try{o=decodeURI(s)}catch{throw{code:"D3140",stack:new Error().stack,value:s,functionName:"decodeUrl"}}return o}}async function Ee(s,o,l){if(!(typeof s>"u")){if(l<0)throw{code:"D3020",stack:new Error().stack,value:l,index:3};var v=[];if(typeof l>"u"||l>0)if(typeof o=="string")v=s.split(o,l);else{var m=0,S=await ae(o,s);if(typeof S<"u"){for(var $=0;typeof S<"u"&&(typeof l>"u"||m<l);)v.push(s.substring($,S.start)),$=S.end,S=await ae(S.next),m++;(typeof l>"u"||m<l)&&v.push(s.substring($))}else v.push(s)}return v}}function ye(s,o){if(!(typeof s>"u"))return typeof o>"u"&&(o=""),s.join(o)}function A(s,o,l){if(!(typeof s>"u")){var v={"decimal-separator":".","grouping-separator":",","exponent-separator":"e",infinity:"Infinity","minus-sign":"-",NaN:"NaN",percent:"%","per-mille":"‰","zero-digit":"0",digit:"#","pattern-separator":";"},m=v;typeof l<"u"&&a.keys(l).forEach(function(Q){m[Q]=l[Q]});for(var S=[],$=m["zero-digit"].charCodeAt(0),I=$;I<$+10;I++)S.push(String.fromCharCode(I));var re=S.concat([m["decimal-separator"],m["exponent-separator"],m["grouping-separator"],m.digit,m["pattern-separator"]]),H=o.split(m["pattern-separator"]);if(H.length>2)throw{code:"D3080",stack:new Error().stack};var be=function(Q){var ke=(function(){for(var Me,Ke=0;Ke<Q.length;Ke++)if(Me=Q.charAt(Ke),re.indexOf(Me)!==-1&&Me!==m["exponent-separator"])return Q.substring(0,Ke);return""})(),ze=(function(){for(var Me,Ke=Q.length-1;Ke>=0;Ke--)if(Me=Q.charAt(Ke),re.indexOf(Me)!==-1&&Me!==m["exponent-separator"])return Q.substring(Ke+1);return""})(),Se=Q.substring(ke.length,Q.length-ze.length),Ve,pt,Xe,wt,Je=Q.indexOf(m["exponent-separator"],ke.length);Je===-1||Je>Q.length-ze.length?(Ve=Se,pt=void 0):(Ve=Se.substring(0,Je),pt=Se.substring(Je+1));var tt=Ve.indexOf(m["decimal-separator"]);return tt===-1?(Xe=Ve,wt=ze):(Xe=Ve.substring(0,tt),wt=Ve.substring(tt+1)),{prefix:ke,suffix:ze,activePart:Se,mantissaPart:Ve,exponentPart:pt,integerPart:Xe,fractionalPart:wt,subpicture:Q}},_e=function(Q){var ke,ze,Se=Q.subpicture,Ve=Se.indexOf(m["decimal-separator"]);Ve!==Se.lastIndexOf(m["decimal-separator"])&&(ke="D3081"),Se.indexOf(m.percent)!==Se.lastIndexOf(m.percent)&&(ke="D3082"),Se.indexOf(m["per-mille"])!==Se.lastIndexOf(m["per-mille"])&&(ke="D3083"),Se.indexOf(m.percent)!==-1&&Se.indexOf(m["per-mille"])!==-1&&(ke="D3084");var pt=!1;for(ze=0;ze<Q.mantissaPart.length;ze++){var Xe=Q.mantissaPart.charAt(ze);if(S.indexOf(Xe)!==-1||Xe===m.digit){pt=!0;break}}pt||(ke="D3085");var wt=Q.activePart.split("").map(function(Me){return re.indexOf(Me)===-1?"p":"a"}).join("");wt.indexOf("p")!==-1&&(ke="D3086"),Ve!==-1?(Se.charAt(Ve-1)===m["grouping-separator"]||Se.charAt(Ve+1)===m["grouping-separator"])&&(ke="D3087"):Q.integerPart.charAt(Q.integerPart.length-1)===m["grouping-separator"]&&(ke="D3088"),Se.indexOf(m["grouping-separator"]+m["grouping-separator"])!==-1&&(ke="D3089");var Je=Q.integerPart.indexOf(m.digit);Je!==-1&&Q.integerPart.substring(0,Je).split("").filter(function(Me){return S.indexOf(Me)>-1}).length>0&&(ke="D3090"),Je=Q.fractionalPart.lastIndexOf(m.digit),Je!==-1&&Q.fractionalPart.substring(Je).split("").filter(function(Me){return S.indexOf(Me)>-1}).length>0&&(ke="D3091");var tt=typeof Q.exponentPart=="string";if(tt&&Q.exponentPart.length>0&&(Se.indexOf(m.percent)!==-1||Se.indexOf(m["per-mille"])!==-1)&&(ke="D3092"),tt&&(Q.exponentPart.length===0||Q.exponentPart.split("").filter(function(Me){return S.indexOf(Me)===-1}).length>0)&&(ke="D3093"),ke)throw{code:ke,stack:new Error().stack}},Ae=function(Q){var ke=function(Ie,br){for(var Zt=[],ut=Ie.indexOf(m["grouping-separator"]);ut!==-1;){var wr=(br?Ie.substring(0,ut):Ie.substring(ut)).split("").filter(function(Ut){return S.indexOf(Ut)!==-1||Ut===m.digit}).length;Zt.push(wr),ut=Q.integerPart.indexOf(m["grouping-separator"],ut+1)}return Zt},ze=ke(Q.integerPart),Se=function(Ie){if(Ie.length===0)return 0;for(var br=function(wr,Ut){return Ut===0?wr:br(Ut,wr%Ut)},Zt=Ie.reduce(br),ut=1;ut<=Ie.length;ut++)if(Ie.indexOf(ut*Zt)===-1)return 0;return Zt},Ve=Se(ze),pt=ke(Q.fractionalPart,!0),Xe=Q.integerPart.split("").filter(function(Ie){return S.indexOf(Ie)!==-1}).length,wt=Xe,Je=Q.fractionalPart.split(""),tt=Je.filter(function(Ie){return S.indexOf(Ie)!==-1}).length,Me=Je.filter(function(Ie){return S.indexOf(Ie)!==-1||Ie===m.digit}).length,Ke=typeof Q.exponentPart=="string";Xe===0&&Me===0&&(Ke?(tt=1,Me=1):Xe=1),Ke&&Xe===0&&Q.integerPart.indexOf(m.digit)!==-1&&(Xe=1),Xe===0&&tt===0&&(tt=1);var Kn=0;return Ke&&(Kn=Q.exponentPart.split("").filter(function(Ie){return S.indexOf(Ie)!==-1}).length),{integerPartGroupingPositions:ze,regularGrouping:Ve,minimumIntegerPartSize:Xe,scalingFactor:wt,prefix:Q.prefix,fractionalPartGroupingPositions:pt,minimumFactionalPartSize:tt,maximumFactionalPartSize:Me,minimumExponentSize:Kn,suffix:Q.suffix,picture:Q.subpicture}},Le=H.map(be);Le.forEach(_e);var ge=Le.map(Ae),Ce=m["minus-sign"],Qe=m["zero-digit"],je=m["decimal-separator"],it=m["grouping-separator"];ge.length===1&&(ge.push(JSON.parse(JSON.stringify(ge[0]))),ge[1].prefix=Ce+ge[1].prefix);var Oe;s>=0?Oe=ge[0]:Oe=ge[1];var Jt;Oe.picture.indexOf(m.percent)!==-1?Jt=s*100:Oe.picture.indexOf(m["per-mille"])!==-1?Jt=s*1e3:Jt=s;var dt,Rt;if(Oe.minimumExponentSize===0)dt=Jt;else{var Zs=Math.pow(10,Oe.scalingFactor),Qs=Math.pow(10,Oe.scalingFactor-1);if(dt=Jt,Rt=0,dt!==0){for(;Math.abs(dt)<Qs;)dt*=10,Rt-=1;for(;Math.abs(dt)>Zs;)dt/=10,Rt+=1}}var ea=U(dt,Oe.maximumFactionalPartSize),Yn=function(Q,ke){var ze=Math.abs(Q).toFixed(ke);return Qe!=="0"&&(ze=ze.split("").map(function(Se){return Se>="0"&&Se<="9"?S[Se.charCodeAt(0)-48]:Se}).join("")),ze},ie=Yn(ea,Oe.maximumFactionalPartSize),qe=ie.indexOf(".");for(qe===-1?ie=ie+je:ie=ie.replace(".",je);ie.charAt(0)===Qe;)ie=ie.substring(1);for(;ie.charAt(ie.length-1)===Qe;)ie=ie.substring(0,ie.length-1);qe=ie.indexOf(je);var Kt=Oe.minimumIntegerPartSize-qe,Jn=Oe.minimumFactionalPartSize-(ie.length-qe-1);if(ie=(Kt>0?new Array(Kt+1).join(Qe):"")+ie,ie=ie+(Jn>0?new Array(Jn+1).join(Qe):""),qe=ie.indexOf(je),Oe.regularGrouping>0)for(var ta=Math.floor((qe-1)/Oe.regularGrouping),vr=1;vr<=ta;vr++)ie=[ie.slice(0,qe-vr*Oe.regularGrouping),it,ie.slice(qe-vr*Oe.regularGrouping)].join("");else Oe.integerPartGroupingPositions.forEach(function(Q){ie=[ie.slice(0,qe-Q),it,ie.slice(qe-Q)].join(""),qe++});if(qe=ie.indexOf(je),Oe.fractionalPartGroupingPositions.forEach(function(Q){ie=[ie.slice(0,Q+qe+1),it,ie.slice(Q+qe+1)].join("")}),qe=ie.indexOf(je),(Oe.picture.indexOf(je)===-1||qe===ie.length-1)&&(ie=ie.substring(0,ie.length-1)),typeof Rt<"u"){var yr=Yn(Rt,0);Kt=Oe.minimumExponentSize-yr.length,Kt>0&&(yr=new Array(Kt+1).join(Qe)+yr),ie=ie+m["exponent-separator"]+(Rt<0?Ce:"")+yr}return ie=Oe.prefix+ie+Oe.suffix,ie}}function C(s,o){if(!(typeof s>"u")){if(s=U(s),typeof o>"u"?o=10:o=U(o),o<2||o>36)throw{code:"D3100",stack:new Error().stack,value:o};var l=s.toString(o);return l}}function T(s){var o;if(!(typeof s>"u")){if(typeof s=="number")o=s;else if(typeof s=="string"&&/^-?[0-9]+(\.[0-9]+)?([Ee][-+]?[0-9]+)?$/.test(s)&&!isNaN(parseFloat(s))&&isFinite(s))o=parseFloat(s);else if(typeof s=="string"&&/^(0[xX][0-9A-Fa-f]+)|(0[oO][0-7]+)|(0[bB][0-1]+)$/.test(s))o=Number(s);else if(s===!0)o=1;else if(s===!1)o=0;else throw{code:"D3030",value:s,stack:new Error().stack,index:1};return o}}function M(s){var o;if(!(typeof s>"u"))return o=Math.abs(s),o}function B(s){var o;if(!(typeof s>"u"))return o=Math.floor(s),o}function N(s){var o;if(!(typeof s>"u"))return o=Math.ceil(s),o}function U(s,o){var l;if(!(typeof s>"u")){if(o){var v=s.toString().split("e");s=+(v[0]+"e"+(v[1]?+v[1]+o:o))}l=Math.round(s);var m=l-s;return Math.abs(m)===.5&&Math.abs(l%2)===1&&(l=l-1),o&&(v=l.toString().split("e"),l=+(v[0]+"e"+(v[1]?+v[1]-o:-o))),Object.is(l,-0)&&(l=0),l}}function j(s){var o;if(!(typeof s>"u")){if(s<0)throw{stack:new Error().stack,code:"D3060",index:1,value:s};return o=Math.sqrt(s),o}}function V(s,o){var l;if(!(typeof s>"u")){if(l=Math.pow(s,o),!isFinite(l))throw{stack:new Error().stack,code:"D3061",index:1,value:s,exp:o};return l}}function le(){return Math.random()}function se(s){if(!(typeof s>"u")){var o=!1;if(Array.isArray(s)){if(s.length===1)o=se(s[0]);else if(s.length>1){var l=s.filter(function(v){return se(v)});o=l.length>0}}else typeof s=="string"?s.length>0&&(o=!0):b(s)?s!==0&&(o=!0):s!==null&&typeof s=="object"&&!_(s)?a.keys(s).length>0&&(o=!0):typeof s=="boolean"&&s===!0&&(o=!0);return o}}function K(s){if(!(typeof s>"u"))return!se(s)}function X(s,o,l,v){var m=[o],S=G(s);return S>=2&&m.push(l),S>=3&&m.push(v),m}async function oe(s,o){if(!(typeof s>"u")){for(var l=this.createSequence(),v=0;v<s.length;v++){var m=X(o,s[v],v,s),S=await o.apply(this,m);typeof S<"u"&&l.push(S)}return l}}async function Y(s,o){if(!(typeof s>"u")){for(var l=this.createSequence(),v=0;v<s.length;v++){var m=s[v],S=X(o,m,v,s),$=await o.apply(this,S);se($)&&l.push(m)}return l}}async function Ne(s,o){if(!(typeof s>"u")){for(var l=!1,v,m=0;m<s.length;m++){var S=s[m],$=!0;if(typeof o<"u"){var I=X(o,S,m,s),re=await o.apply(this,I);$=se(re)}if($)if(!l)v=S,l=!0;else throw{stack:new Error().stack,code:"D3138",index:m}}if(!l)throw{stack:new Error().stack,code:"D3139"};return v}}function Ze(){for(var s=[],o=Array.prototype.slice.call(arguments),l=Math.min.apply(Math,o.map(function(S){return Array.isArray(S)?S.length:0})),v=0;v<l;v++){var m=o.map(S=>S[v]);s.push(m)}return s}async function Ge(s,o,l){if(!(typeof s>"u")){var v,m=G(o);if(m<2)throw{stack:new Error().stack,code:"D3050",index:1};var S;for(typeof l>"u"&&s.length>0?(v=s[0],S=1):(v=l,S=0);S<s.length;){var $=[v,s[S]];m>=3&&$.push(S),m>=4&&$.push(s),v=await o.apply(this,$),S++}return v}}function De(s){var o=this.createSequence();if(Array.isArray(s)){for(var l=Object.create(null),v=0;v<s.length;v++){var m=De.call(this,s[v]);m.forEach(function(S){l[S]=!0})}o=De.call(this,l)}else s!==null&&typeof s=="object"&&!_(s)&&a.keys(s).forEach(S=>o.push(S));return o}function Be(s,o){var l;if(Array.isArray(s)){l=this.createSequence();for(var v=0;v<s.length;v++){var m=Be.call(this,s[v],o);typeof m<"u"&&(Array.isArray(m)?m.forEach(S=>l.push(S)):l.push(m))}}else s!==null&&typeof s=="object"&&Object.prototype.hasOwnProperty.call(s,o)&&!_(s)&&(l=s[o]);return l}function ot(s,o){if(typeof s>"u")return o;if(typeof o>"u")return s;Array.isArray(s)||(s=this.createSequence(s)),Array.isArray(o)||(o=[o]);const l=s.length+o.length;if(this.options&&l>this.options.sequence)throw{code:"D2015",stack:new Error().stack,value:l};return s.concat(o)}function xt(s){return!(typeof s>"u")}function Ct(s){var o=this.createSequence();if(Array.isArray(s))for(var l=0;l<s.length;l++)o=ot.call(this,o,Ct.call(this,s[l]));else if(s!==null&&typeof s=="object"&&!R(s))for(const m of a.keys(s)){var v=Object.create(null);v[m]=s[m],o.push(v)}else o=s;return o}function q(s){if(!(typeof s>"u")){var o=Object.create(null);return s.forEach(function(l){for(const v of a.keys(l))o[v]=l[v]}),o}}function mr(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var o=s.length,l=new Array(o),v=0;v<o;v++)l[o-v-1]=s[v];return l}}async function gr(s,o){var l=this.createSequence();for(const S of a.keys(s)){var v=X(o,s[S],S,s),m=await o.apply(this,v);typeof m<"u"&&l.push(m)}return l}function et(s){throw{code:"D3137",stack:new Error().stack,message:s||"$error() function evaluated"}}function Yt(s,o){if(!s)throw{code:"D3141",stack:new Error().stack,message:o||"$assert() statement failed"}}function nt(s){if(s!==void 0)return s===null?"null":b(s)?"number":typeof s=="string"?"string":typeof s=="boolean"?"boolean":Array.isArray(s)?"array":_(s)?"function":"object"}async function bt(s,o){if(!(typeof s>"u")){if(s.length<=1)return s;var l;if(typeof o>"u"){if(!L(s)&&!P(s))throw{stack:new Error().stack,code:"D3070",index:1};l=async function($,I){return $>I}}else l=o;var v=async function($,I){var re=async function(be,_e,Ae){_e.length===0?Array.prototype.push.apply(be,Ae):Ae.length===0?Array.prototype.push.apply(be,_e):await l(_e[0],Ae[0])?(be.push(Ae[0]),await re(be,_e,Ae.slice(1))):(be.push(_e[0]),await re(be,_e.slice(1),Ae))},H=[];return await re(H,$,I),H},m=async function($){if(!Array.isArray($)||$.length<=1)return $;var I=Math.floor($.length/2),re=$.slice(0,I),H=$.slice(I);return re=await m(re),H=await m(H),await v(re,H)},S=await m(s);return S}}function c(s){if(!(typeof s>"u")){if(s.length<=1)return s;for(var o=new Array(s.length),l=0;l<s.length;l++){var v=Math.floor(Math.random()*(l+1));l!==v&&(o[l]=o[v]),o[v]=s[l]}return o}}function f(s){if(!(typeof s>"u")){if(!Array.isArray(s)||s.length<=1)return s;for(var o=x(s)?this.createSequence():[],l=0;l<s.length;l++){for(var v=s[l],m=!1,S=0;S<o.length;S++)if(ee(v,o[S])){m=!0;break}m||o.push(v)}return o}}async function p(s,o){var l=Object.create(null);for(const $ of a.keys(s)){var v=s[$],m=X(o,v,$,s),S=await o.apply(this,m);se(S)&&(l[$]=v)}return a.keys(l).length===0&&(l=void 0),l}return{sum:E,count:g,max:D,min:w,average:k,string:z,substring:F,substringBefore:Z,substringAfter:ne,lowercase:we,uppercase:pe,length:he,trim:Pe,pad:Ye,match:He,contains:de,replace:te,split:Ee,join:ye,formatNumber:A,formatBase:C,number:T,floor:B,ceil:N,round:U,abs:M,sqrt:j,power:V,random:le,boolean:se,not:K,map:oe,zip:Ze,filter:Y,single:Ne,foldLeft:Ge,sift:p,keys:De,lookup:Be,append:ot,exists:xt,spread:Ct,merge:q,reverse:mr,each:gr,error:et,assert:Yt,type:nt,sort:bt,shuffle:c,distinct:f,base64encode:xe,base64decode:rt,encodeUrlComponent:d,encodeUrl:y,decodeUrlComponent:W,decodeUrl:ce}})();r.exports=h}).call(this)}).call(this,typeof wn<"u"?wn:typeof self<"u"?self:typeof window<"u"?window:{})},{"./utils":6}],3:[function(t,r,i){var u=t("./datetime"),a=t("./functions"),h=t("./utils"),b=t("./parser"),P=t("./signature"),L=(function(){var x=h.isNumeric,_=h.isArrayOfStrings,R=h.isArrayOfNumbers,O=h.isSequence,G=h.isFunction,ee=h.isLambda,J=h.isIterable,E=h.isPromise,g=h.getFunctionArity,D=h.isDeepEqual,w=et(null);async function k(c,f,p){var s;p.base.depth++,p.base.guardrails();var o=p.lookup(Symbol.for("jsonata.__evaluate_entry"));switch(o&&await o(c,f,p),c.type){case"path":s=await z(c,f,p);break;case"binary":s=await he(c,f,p);break;case"unary":s=await Pe(c,f,p);break;case"name":s=Ye(c,f,p);break;case"string":case"number":case"value":s=ae(c);break;case"wildcard":s=de(c,f,p);break;case"descendant":s=te(c,f,p);break;case"parent":s=p.lookup(c.slot.label);break;case"condition":s=await B(c,f,p);break;case"block":s=await N(c,f,p);break;case"bind":s=await M(c,f,p);break;case"regex":s=U(c,f,p);break;case"function":s=await X(c,f,p);break;case"variable":s=j(c,f,p);break;case"lambda":s=Ne(c,f,p);break;case"partial":s=await Ze(c,f,p);break;case"apply":s=await K(c,f,p);break;case"transform":s=le(c,f,p);break}if(Object.prototype.hasOwnProperty.call(c,"predicate"))for(var l=0;l<c.predicate.length;l++)s=await pe(c.predicate[l].expr,s,p);c.type!=="path"&&Object.prototype.hasOwnProperty.call(c,"group")&&(s=await A(c.group,s,p));var v=p.lookup(Symbol.for("jsonata.__evaluate_exit"));return v&&await v(c,f,p,s),s&&O(s)&&!s.tupleStream&&(c.keepArray&&(s.keepSingleton=!0),s.length===0?s=void 0:s.length===1&&(s=s.keepSingleton?s:s[0])),p.base.depth--,s}async function z(c,f,p){var s;Array.isArray(f)&&c.steps[0].type!=="variable"?s=f:s=p.base.createSequence(f);for(var o,l=!1,v=void 0,m=0;m<c.steps.length;m++){var S=c.steps[m];if(S.tuple&&(l=!0),m===0&&S.consarray?o=await k(S,s,p):l?v=await we(S,s,v,p):o=await Z(S,s,p,m===c.steps.length-1),!l&&(typeof o>"u"||o.length===0))break;typeof S.focus>"u"&&(s=o)}if(l)if(c.tuple)o=v;else for(o=p.base.createSequence(),m=0;m<v.length;m++)o.push(v[m]["@"]);return c.keepSingletonArray&&(Array.isArray(o)&&o.cons&&!o.sequence&&(o=p.base.createSequence(o)),o.keepSingleton=!0),Object.prototype.hasOwnProperty.call(c,"group")&&(o=await A(c.group,l?v:o,p)),o}function F(c,f){var p=et(c);for(const s of h.keys(f))p.bind(s,f[s]);return p}async function Z(c,f,p,s){var o;if(c.type==="sort")return o=await V(c,f,p),c.stages&&(o=await ne(c.stages,o,p)),o;o=p.base.createSequence();for(var l=0;l<f.length;l++){var v=await k(c,f[l],p);if(c.stages)for(var m=0;m<c.stages.length;m++)v=await pe(c.stages[m].expr,v,p);typeof v<"u"&&o.push(v)}var S=p.base.createSequence();return s&&o.length===1&&Array.isArray(o[0])&&!O(o[0])?S=o[0]:Array.prototype.forEach.call(o,function($){!Array.isArray($)||$.cons?S.push($):Array.prototype.forEach.call($,I=>S.push(I))}),S}async function ne(c,f,p){for(var s=f,o=0;o<c.length;o++){var l=c[o];switch(l.type){case"filter":s=await pe(l.expr,s,p);break;case"index":for(var v=0;v<s.length;v++){var m=s[v];m[l.value]=v}break}}return s}async function we(c,f,p,s){var o;if(c.type==="sort"){if(p)o=await V(c,p,s);else{var l=await V(c,f,s);o=s.base.createSequence(),o.tupleStream=!0;for(var v=0;v<l.length;v++){var m={"@":l[v]};m[c.index]=v,o.push(m)}}return c.stages&&(o=await ne(c.stages,o,s)),o}o=s.base.createSequence(),o.tupleStream=!0;var S=s;p===void 0&&(p=f.map(H=>({"@":H})));for(var $=0;$<p.length;$++){S=F(s,p[$]);var I=await k(c,p[$]["@"],S);if(typeof I<"u"){Array.isArray(I)||(I=[I]);for(var re=0;re<I.length;re++)m=Object.create(null),Object.assign(m,p[$]),I.tupleStream?Object.assign(m,I[re]):(c.focus?(m[c.focus]=I[re],m["@"]=p[$]["@"]):m["@"]=I[re],c.index&&(m[c.index]=re),c.ancestor&&(m[c.ancestor.label]=p[$]["@"])),o.push(m)}}return c.stages&&(o=await ne(c.stages,o,s)),o}async function pe(c,f,p){var s=p.base.createSequence();if(f&&f.tupleStream&&(s.tupleStream=!0),Array.isArray(f)||(f=p.base.createSequence(f)),c.type==="number"){var o=Math.floor(c.value);o<0&&(o=f.length+o);var l=await f[o];typeof l<"u"&&(Array.isArray(l)?s=l:s.push(l))}else for(o=0;o<f.length;o++){var l=f[o],v=l,m=p;f.tupleStream&&(v=l["@"],m=F(p,l));var S=await k(c,v,m);x(S)&&(S=[S]),R(S)?Array.prototype.forEach.call(S,function(I){var re=Math.floor(I);re<0&&(re=f.length+re),re===o&&s.push(l)}):a.boolean(S)&&s.push(l)}return s}async function he(c,f,p){var s,o=await k(c.lhs,f,p),l=c.value,v=async()=>await k(c.rhs,f,p);if(l==="and"||l==="or")try{return await ce(o,v,l)}catch(S){throw S.position=c.position,S.token=l,S}var m=await v();try{switch(l){case"+":case"-":case"*":case"/":case"%":s=rt(o,m,l);break;case"=":case"!=":s=d(o,m,l);break;case"<":case"<=":case">":case">=":s=y(o,m,l);break;case"&":s=ye(o,m);break;case"..":s=T(o,m,p);break;case"in":s=W(o,m);break}}catch(S){throw S.position=c.position,S.token=l,S}return s}async function Pe(c,f,p){var s,o={options:p.base.options,createSequence:p.base.createSequence};switch(c.value){case"-":if(s=await k(c.expression,f,p),typeof s>"u")s=void 0;else if(x(s))s=-s;else throw{code:"D1002",stack:new Error().stack,position:c.position,token:c.value,value:s};break;case"[":s=[];let m=await Promise.all(c.expressions.map(async(S,$)=>(p.isParallelCall=$>0,[S,await k(S,f,p)])));for(let S of m){var[l,v]=S;typeof v<"u"&&(l.value==="["?s.push(v):s=a.append.call(o,s,v))}c.consarray&&Object.defineProperty(s,"cons",{enumerable:!1,configurable:!1,value:!0});break;case"{":s=await A(c,f,p);break}return s}function Ye(c,f,p){var s={createSequence:p.base.createSequence};return a.lookup.call(s,f,c.value)}function ae(c){return c.value}function de(c,f,p){var s={options:p.base.options,createSequence:p.base.createSequence},o=s.createSequence();return Array.isArray(f)&&f.outerWrapper&&f.length>0&&(f=f[0]),f!==null&&typeof f=="object"&&!G(f)&&h.keys(f).forEach(function(l){var v=f[l];Array.isArray(v)?(v=He(v),o=a.append.call(s,o,v)):o.push(v)}),o}function He(c,f){return typeof f>"u"&&(f=[]),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){He(p,f)}):f.push(c),f}function te(c,f,p){var s,o=p.base.createSequence();return typeof f<"u"&&(xe(f,o),o.length===1?s=o[0]:s=o),s}function xe(c,f){Array.isArray(c)||f.push(c),Array.isArray(c)?Array.prototype.forEach.call(c,function(p){xe(p,f)}):c!==null&&typeof c=="object"&&!G(c)&&h.keys(c).forEach(function(p){xe(c[p],f)})}function rt(c,f,p){var s;if(typeof c<"u"&&!x(c))throw{code:"T2001",stack:new Error().stack,value:c};if(typeof f<"u"&&!x(f))throw{code:"T2002",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u")return s;switch(p){case"+":s=c+f;break;case"-":s=c-f;break;case"*":s=c*f;break;case"/":s=c/f;break;case"%":s=c%f;break}return s}function d(c,f,p){var s,o=typeof c,l=typeof f;if(o==="undefined"||l==="undefined")return!1;switch(p){case"=":s=D(c,f);break;case"!=":s=!D(c,f);break}return s}function y(c,f,p){var s,o=typeof c,l=typeof f,v=o==="undefined"||o==="string"||o==="number",m=l==="undefined"||l==="string"||l==="number";if(!v||!m)throw{code:"T2010",stack:new Error().stack,value:o==="string"||o==="number"?f:c};if(!(o==="undefined"||l==="undefined")){if(o!==l)throw{code:"T2009",stack:new Error().stack,value:c,value2:f};switch(p){case"<":s=c<f;break;case"<=":s=c<=f;break;case">":s=c>f;break;case">=":s=c>=f;break}return s}}function W(c,f){var p=!1;if(typeof c>"u"||typeof f>"u")return!1;Array.isArray(f)||(f=[f]);for(var s=0;s<f.length;s++)if(f[s]===c){p=!0;break}return p}async function ce(c,f,p){var s,o=Ee(c);switch(p){case"and":s=o&&Ee(await f());break;case"or":s=o||Ee(await f());break}return s}function Ee(c){var f=a.boolean(c);return typeof f>"u"?!1:f}function ye(c,f){var p,s="",o="";return typeof c<"u"&&(s=a.string(c)),typeof f<"u"&&(o=a.string(f)),p=s.concat(o),p}async function A(c,f,p){var s=Object.create(null),o=Object.create(null),l=!!(f&&f.tupleStream),v={options:p.base.options,createSequence:p.base.createSequence};Array.isArray(f)||(p.base.options,f=v.createSequence(f)),f.length===0&&!l&&f.push(void 0);for(var m=0;m<f.length;m++)for(var S=f[m],$=l?F(p,S):p,I=0;I<c.lhs.length;I++){var re=c.lhs[I],H=await k(re[0],l?S["@"]:S,$);if(typeof H!="string"&&H!==void 0)throw{code:"T1003",stack:new Error().stack,position:c.position,value:H};if(H!==void 0){if(H==="_jsonata_lambda"||H==="_jsonata_function")throw{code:"D1013",stack:new Error().stack,position:c.position,value:H};var be={data:S,exprIndex:I};if(Object.prototype.hasOwnProperty.call(o,H)){if(o[H].exprIndex!==I)throw{code:"D1009",stack:new Error().stack,position:c.position,value:H};o[H].data=a.append.call(v,o[H].data,S)}else o[H]=be}}let _e=await Promise.all(h.keys(o).map(async(Le,ge)=>{let Ce=o[Le];var Qe=Ce.data,je=p;if(l){var it=C(Ce.data,p);Qe=it["@"],delete it["@"],je=F(p,it)}return p.isParallelCall=ge>0,[Le,await k(c.lhs[Ce.exprIndex][1],Qe,je)]}));for(let Le of _e){var[H,Ae]=await Le;typeof Ae<"u"&&(s[H]=Ae)}return s}function C(c,f){if(!Array.isArray(c))return c;var p=Object.create(null),s={options:f.base.options,createSequence:f.base.createSequence};Object.assign(p,c[0]);for(var o=1;o<c.length;o++)for(const l of h.keys(c[o]))p[l]=a.append.call(s,p[l],c[o][l]);return p}function T(c,f,p){var s;if(typeof c<"u"&&!Number.isInteger(c))throw{code:"T2003",stack:new Error().stack,value:c};if(typeof f<"u"&&!Number.isInteger(f))throw{code:"T2004",stack:new Error().stack,value:f};if(typeof c>"u"||typeof f>"u"||c>f)return s;var o=f-c+1;if(o>1e7)throw{code:"D2014",stack:new Error().stack,value:o};if(p.base.options&&o>p.base.options.sequence)throw{code:"D2015",stack:new Error().stack,value:o};s=new Array(o);for(var l=c,v=0;l<=f;l++,v++)s[v]=l;return s.sequence=!0,s}async function M(c,f,p){var s=await k(c.rhs,f,p);return p.bind(c.lhs.value,s),s}async function B(c,f,p){var s,o=await k(c.condition,f,p);return a.boolean(o)?s=await k(c.then,f,p):typeof c.else<"u"&&(s=await k(c.else,f,p)),s}async function N(c,f,p){for(var s,o=et(p),l=0;l<c.expressions.length;l++)s=await k(c.expressions[l],f,o);return s}function U(c,f,p){var s=new p.base.RegexEngine(c.value),o=function(l,v){var m;s.lastIndex=v||0;var S=s.exec(l);if(S!==null){if(m={match:S[0],start:S.index,end:S.index+S[0].length,groups:[]},S.length>1)for(var $=1;$<S.length;$++)m.groups.push(S[$]);m.next=function(){if(!(s.lastIndex>=l.length)){var I=o(l,s.lastIndex);if(I&&I.match==="")throw{code:"D1004",stack:new Error().stack,position:c.position,value:c.value.source};return I}}}return m};return o}function j(c,f,p){var s;return c.value===""?s=f&&f.outerWrapper?f[0]:f:s=p.lookup(c.value),s}async function V(c,f,p){var s,o=f,l=!!f.tupleStream,v=async function(S,$){for(var I=0,re=0;I===0&&re<c.terms.length;re++){var H=c.terms[re],be=S,_e=p;l&&(be=S["@"],_e=F(p,S));var Ae=await k(H.expression,be,_e);be=$,_e=p,l&&(be=$["@"],_e=F(p,$));var Le=await k(H.expression,be,_e),ge=typeof Ae,Ce=typeof Le;if(ge==="undefined"){I=Ce==="undefined"?0:1;continue}if(Ce==="undefined"){I=-1;continue}if(!(ge==="string"||ge==="number")||!(Ce==="string"||Ce==="number"))throw{code:"T2008",stack:new Error().stack,position:c.position,value:ge==="string"||ge==="number"?Le:Ae};if(ge!==Ce)throw{code:"T2007",stack:new Error().stack,position:c.position,value:Ae,value2:Le};Ae!==Le&&(Ae<Le?I=-1:I=1,H.descending===!0&&(I=-I))}return I===1},m={environment:p,input:f};return s=await a.sort.apply(m,[o,v]),s}function le(c,f,p){var s=async function(o){if(!(typeof o>"u")){var l=p.lookup("clone");if(!G(l))throw{code:"T2013",stack:new Error().stack,position:c.position};var v=await oe(l,[o],null,p),m=await k(c.pattern,v,p);if(typeof m<"u"){Array.isArray(m)||(m=[m]);for(var S=0;S<m.length;S++){var $=m[S],I=await k(c.update,$,p),re=typeof I;if(re!=="undefined"){if(re!=="object"||I===null||Array.isArray(I))throw{code:"T2011",stack:new Error().stack,position:c.update.position,value:I};for(const Ae of h.keys(I))$[Ae]=I[Ae]}if(typeof c.delete<"u"){var H=await k(c.delete,$,p);if(typeof H<"u"){var be=H;if(Array.isArray(H)||(H=[H]),!_(H))throw{code:"T2012",stack:new Error().stack,position:c.delete.position,value:be};for(var _e=0;_e<H.length;_e++)typeof $=="object"&&$!==null&&delete $[H[_e]]}}}}return v}};return q(s,"<(oa):o>")}var se=b("function($f, $g) { function($x){ $g($f($x)) } }");async function K(c,f,p){var s,o=await k(c.lhs,f,p);if(c.rhs.type==="function")s=await X(c.rhs,f,p,{context:o});else{var l=await k(c.rhs,f,p);if(!G(l))throw{code:"T2006",stack:new Error().stack,position:c.position,value:l};if(G(o)){var v=await k(se,null,p);s=await oe(v,[o,l],null,p)}else s=await oe(l,[o],null,p)}return s}async function X(c,f,p,s){var o,l=await k(c.procedure,f,p);if(typeof l>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1005",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};var v=[];typeof s<"u"&&v.push(s.context);for(var m=0;m<c.arguments.length;m++){const $=await k(c.arguments[m],f,p);if(G($)){const I=async function(...re){return await oe($,re,null,p)};I.arity=g($),v.push(I)}else v.push($)}var S=c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value;try{typeof l=="object"&&(l.token=S,l.position=c.position),o=await oe(l,v,f,p)}catch($){throw $.position||($.position=c.position),$.token||($.token=S),$}return o}async function oe(c,f,p,s){var o;for(o=await Y(c,f,p,s);ee(o)&&o.thunk===!0;){var l=await k(o.body.procedure,o.input,o.environment);o.body.procedure.type==="variable"&&(l.token=o.body.procedure.value),l.position=o.body.procedure.position;for(var v=[],m=0;m<o.body.arguments.length;m++)v.push(await k(o.body.arguments[m],o.input,o.environment));o=await Y(l,v,p,s)}return o}async function Y(c,f,p,s){var o;try{var l=f;if(c&&(l=Ge(c.signature,f,p)),ee(c))o=await De(c,l);else if(c&&c._jsonata_function===!0){var v={environment:s,input:p,options:s.base.options,createSequence:s.base.createSequence};o=c.implementation.apply(v,l),J(o)&&(o=o.next().value),E(o)&&(o=await o)}else if(typeof c=="function")o=c.apply(p,l),E(o)&&(o=await o);else throw{code:"T1006",stack:new Error().stack}}catch(m){throw c&&(typeof m.token>"u"&&typeof c.token<"u"&&(m.token=c.token),m.position=c.position||m.position),m}return o}function Ne(c,f,p){var s={_jsonata_lambda:!0,input:f,environment:p,arguments:c.arguments,signature:c.signature,body:c.body};return c.thunk===!0&&(s.thunk=!0),s.apply=async function(o,l){return await oe(s,l,f,o?o.environment:p)},s}async function Ze(c,f,p){for(var s,o=[],l=0;l<c.arguments.length;l++){var v=c.arguments[l];v.type==="operator"&&v.value==="?"?o.push(v):o.push(await k(v,f,p))}var m=await k(c.procedure,f,p);if(typeof m>"u"&&c.procedure.type==="path"&&p.lookup(c.procedure.steps[0].value))throw{code:"T1007",stack:new Error().stack,position:c.position,token:c.procedure.steps[0].value};if(ee(m))s=Be(m,o,p);else if(m&&m._jsonata_function===!0)s=ot(m.implementation,o,p);else if(typeof m=="function")s=ot(m,o,p);else throw{code:"T1008",stack:new Error().stack,position:c.position,token:c.procedure.type==="path"?c.procedure.steps[0].value:c.procedure.value};return s}function Ge(c,f,p){if(typeof c>"u")return f;var s=c.validate(f,p);return s}async function De(c,f){var p,s=et(c.environment);return Array.prototype.forEach.call(c.arguments,function(o,l){s.bind(o.value,f[l])}),typeof c.body=="function"?p=await xt(c.body,s):p=await k(c.body,c.input,s),p}function Be(c,f,p){var s=et(c.environment||p),o=[];Array.prototype.forEach.call(c.arguments,function(v,m){var S=f[m];S&&S.type==="operator"&&S.value==="?"?o.push(v):s.bind(v.value,S)});var l={_jsonata_lambda:!0,input:c.input,environment:s,arguments:o,body:c.body};return l}function ot(c,f,p){var s=Ct(c);s=s.map(function(m){return"$"+m.trim()});var o="function("+s.join(", ")+"){ _ }",l=b(o);l.body=c;var v=Be(l,f,p);return v}async function xt(c,f){var p=Ct(c),s=p.map(function(v){return f.lookup(v.trim())}),o={environment:f,createSequence:f.base.createSequence},l=c.apply(o,s);return E(l)&&(l=await l),l}function Ct(c){var f=c.toString(),p=/\(([^)]*)\)/.exec(f)[1],s=p.split(",");return s}function q(c,f){var p={_jsonata_function:!0,implementation:c};return typeof f<"u"&&(p.signature=P(f)),p}async function mr(c,f){if(!(typeof c>"u")){var p=this.input;typeof f<"u"&&(p=f,Array.isArray(p)&&!O(p)&&(p=this.createSequence(p),p.outerWrapper=!0));try{var s=b(c,!1)}catch(l){throw nt(l),{stack:new Error().stack,code:"D3120",value:l.message,error:l}}try{var o=await k(s,p,this.environment)}catch(l){throw nt(l),{stack:new Error().stack,code:"D3121",value:l.message,error:l}}return o}}function gr(c){if(!(typeof c>"u"))return JSON.parse(a.string(c))}function et(c){var f=Object.create(null);const p={bind:function(o,l){f[o]=l},lookup:function(o){var l;return Object.prototype.hasOwnProperty.call(f,o)?l=f[o]:c&&(l=c.lookup(o)),l},timestamp:c?c.timestamp:null,async:c?c.async:!1,isParallelCall:c?c.isParallelCall:!1,global:c?c.global:{ancestry:[null]}};if(c){var s=c.lookup(Symbol.for("jsonata.__createFrame_push"));s&&s(c,p),p.base=c.base}return p}w.bind("sum",q(a.sum,"<a<n>:n>")),w.bind("count",q(a.count,"<a:n>")),w.bind("max",q(a.max,"<a<n>:n>")),w.bind("min",q(a.min,"<a<n>:n>")),w.bind("average",q(a.average,"<a<n>:n>")),w.bind("string",q(a.string,"<x-b?:s>")),w.bind("substring",q(a.substring,"<s-nn?:s>")),w.bind("substringBefore",q(a.substringBefore,"<s-s:s>")),w.bind("substringAfter",q(a.substringAfter,"<s-s:s>")),w.bind("lowercase",q(a.lowercase,"<s-:s>")),w.bind("uppercase",q(a.uppercase,"<s-:s>")),w.bind("length",q(a.length,"<s-:n>")),w.bind("trim",q(a.trim,"<s-:s>")),w.bind("pad",q(a.pad,"<s-ns?:s>")),w.bind("match",q(a.match,"<s-f<s:o>n?:a<o>>")),w.bind("contains",q(a.contains,"<s-(sf):b>")),w.bind("replace",q(a.replace,"<s-(sf)(sf)n?:s>")),w.bind("split",q(a.split,"<s-(sf)n?:a<s>>")),w.bind("join",q(a.join,"<a<s>s?:s>")),w.bind("formatNumber",q(a.formatNumber,"<n-so?:s>")),w.bind("formatBase",q(a.formatBase,"<n-n?:s>")),w.bind("formatInteger",q(u.formatInteger,"<n-s:s>")),w.bind("parseInteger",q(u.parseInteger,"<s-s:n>")),w.bind("number",q(a.number,"<(nsb)-:n>")),w.bind("floor",q(a.floor,"<n-:n>")),w.bind("ceil",q(a.ceil,"<n-:n>")),w.bind("round",q(a.round,"<n-n?:n>")),w.bind("abs",q(a.abs,"<n-:n>")),w.bind("sqrt",q(a.sqrt,"<n-:n>")),w.bind("power",q(a.power,"<n-n:n>")),w.bind("random",q(a.random,"<:n>")),w.bind("boolean",q(a.boolean,"<x-:b>")),w.bind("not",q(a.not,"<x-:b>")),w.bind("map",q(a.map,"<af>")),w.bind("zip",q(a.zip,"<a+>")),w.bind("filter",q(a.filter,"<af>")),w.bind("single",q(a.single,"<af?>")),w.bind("reduce",q(a.foldLeft,"<afj?:j>")),w.bind("sift",q(a.sift,"<o-f?:o>")),w.bind("keys",q(a.keys,"<x-:a<s>>")),w.bind("lookup",q(a.lookup,"<x-s:x>")),w.bind("append",q(a.append,"<xx:a>")),w.bind("exists",q(a.exists,"<x:b>")),w.bind("spread",q(a.spread,"<x-:a<o>>")),w.bind("merge",q(a.merge,"<a<o>:o>")),w.bind("reverse",q(a.reverse,"<a:a>")),w.bind("each",q(a.each,"<o-f:a>")),w.bind("error",q(a.error,"<s?:x>")),w.bind("assert",q(a.assert,"<bs?:x>")),w.bind("type",q(a.type,"<x:s>")),w.bind("sort",q(a.sort,"<af?:a>")),w.bind("shuffle",q(a.shuffle,"<a:a>")),w.bind("distinct",q(a.distinct,"<x:x>")),w.bind("base64encode",q(a.base64encode,"<s-:s>")),w.bind("base64decode",q(a.base64decode,"<s-:s>")),w.bind("encodeUrlComponent",q(a.encodeUrlComponent,"<s-:s>")),w.bind("encodeUrl",q(a.encodeUrl,"<s-:s>")),w.bind("decodeUrlComponent",q(a.decodeUrlComponent,"<s-:s>")),w.bind("decodeUrl",q(a.decodeUrl,"<s-:s>")),w.bind("eval",q(mr,"<sx?:x>")),w.bind("toMillis",q(u.toMillis,"<s-s?:n>")),w.bind("fromMillis",q(u.fromMillis,"<n-s?s?:s>")),w.bind("clone",q(gr,"<(oa)-:o>"));var Yt={S0101:"String literal must be terminated by a matching quote",S0102:"Number out of range: {{token}}",S0103:"Unsupported escape sequence: \\{{token}}",S0104:"The escape sequence \\u must be followed by 4 hex digits",S0105:"Quoted property name must be terminated with a backquote (`)",S0106:"Comment has no closing tag",S0201:"Syntax error: {{token}}",S0202:"Expected {{value}}, got {{token}}",S0203:"Expected {{value}} before end of expression",S0204:"Unknown operator: {{token}}",S0205:"Unexpected token: {{token}}",S0206:"Unknown expression type: {{token}}",S0207:"Unexpected end of expression",S0208:"Parameter {{value}} of function definition must be a variable name (start with $)",S0209:"A predicate cannot follow a grouping expression in a step",S0210:"Each step can only have one grouping expression",S0211:"The symbol {{token}} cannot be used as a unary operator",S0212:"The left side of := must be a variable name (start with $)",S0213:"The literal value {{value}} cannot be used as a step within a path expression",S0214:"The right side of {{token}} must be a variable name (start with $)",S0215:"A context variable binding must precede any predicates on a step",S0216:"A context variable binding must precede the 'order-by' clause on a step",S0217:"The object representing the 'parent' cannot be derived from this expression",S0301:"Empty regular expressions are not allowed",S0302:"No terminating / in regular expression",S0402:"Choice groups containing parameterized types are not supported",S0401:"Type parameters can only be applied to functions and arrays",S0500:"Attempted to evaluate an expression containing syntax error(s)",T0410:"Argument {{index}} of function {{token}} does not match function signature",T0411:"Context value is not a compatible type with argument {{index}} of function {{token}}",T0412:"Argument {{index}} of function {{token}} must be an array of {{type}}",D1001:"Number out of range: {{value}}",D1002:"Cannot negate a non-numeric value: {{value}}",T1003:"Key in object structure must evaluate to a string; got: {{value}}",D1004:"Regular expression matches zero length string",T1005:"Attempted to invoke a non-function. Did you mean ${{{token}}}?",T1006:"Attempted to invoke a non-function",T1007:"Attempted to partially apply a non-function. Did you mean ${{{token}}}?",T1008:"Attempted to partially apply a non-function",D1009:"Multiple key definitions evaluate to same key: {{value}}",T1010:"The matcher function argument passed to function {{token}} does not return the correct object structure",D1011:"Stack overflow. Check for non-terminating recursive function. Consider rewriting as tail-recursive",D1012:"Evaluation timeout after {{value}} milliseconds. Check for infinite loop",D1013:"Object property names starting with _jsonata_ are reserved for internal use: {{value}}",T2001:"The left side of the {{token}} operator must evaluate to a number",T2002:"The right side of the {{token}} operator must evaluate to a number",T2003:"The left side of the range operator (..) must evaluate to an integer",T2004:"The right side of the range operator (..) must evaluate to an integer",D2005:"The left side of := must be a variable name (start with $)",T2006:"The right side of the function application operator ~> must be a function",T2007:"Type mismatch when comparing values {{value}} and {{value2}} in order-by clause",T2008:"The expressions within an order-by clause must evaluate to numeric or string values",T2009:"The values {{value}} and {{value2}} either side of operator {{token}} must be of the same data type",T2010:"The expressions either side of operator {{token}} must evaluate to numeric or string values",T2011:"The insert/update clause of the transform expression must evaluate to an object: {{value}}",T2012:"The delete clause of the transform expression must evaluate to a string or array of strings: {{value}}",T2013:"The transform expression clones the input object using the $clone() function. This has been overridden in the current scope by a non-function.",D2014:"The size of the sequence allocated by the range operator (..) must not exceed 1e7. Attempted to allocate {{value}}.",D2015:"The maximum sequence length of {{value}} was exceeded.",D3001:"Attempting to invoke string function on Infinity or NaN",D3010:"Second argument of replace function cannot be an empty string",D3011:"Fourth argument of replace function must evaluate to a positive number",D3012:"Attempted to replace a matched string with a non-string value",D3020:"Third argument of split function must evaluate to a positive number",D3030:"Unable to cast value to a number: {{value}}",D3040:"Third argument of match function must evaluate to a positive number",D3050:"The second argument of reduce function must be a function with at least two arguments",D3060:"The sqrt function cannot be applied to a negative number: {{value}}",D3061:"The power function has resulted in a value that cannot be represented as a JSON number: base={{value}}, exponent={{exp}}",D3070:"The single argument form of the sort function can only be applied to an array of strings or an array of numbers. Use the second argument to specify a comparison function",D3080:"The picture string must only contain a maximum of two sub-pictures",D3081:"The sub-picture must not contain more than one instance of the 'decimal-separator' character",D3082:"The sub-picture must not contain more than one instance of the 'percent' character",D3083:"The sub-picture must not contain more than one instance of the 'per-mille' character",D3084:"The sub-picture must not contain both a 'percent' and a 'per-mille' character",D3085:"The mantissa part of a sub-picture must contain at least one character that is either an 'optional digit character' or a member of the 'decimal digit family'",D3086:"The sub-picture must not contain a passive character that is preceded by an active character and that is followed by another active character",D3087:"The sub-picture must not contain a 'grouping-separator' character that appears adjacent to a 'decimal-separator' character",D3088:"The sub-picture must not contain a 'grouping-separator' at the end of the integer part",D3089:"The sub-picture must not contain two adjacent instances of the 'grouping-separator' character",D3090:"The integer part of the sub-picture must not contain a member of the 'decimal digit family' that is followed by an instance of the 'optional digit character'",D3091:"The fractional part of the sub-picture must not contain an instance of the 'optional digit character' that is followed by a member of the 'decimal digit family'",D3092:"A sub-picture that contains a 'percent' or 'per-mille' character must not contain a character treated as an 'exponent-separator'",D3093:"The exponent part of the sub-picture must comprise only of one or more characters that are members of the 'decimal digit family'",D3100:"The radix of the formatBase function must be between 2 and 36. It was given {{value}}",D3110:"The argument of the toMillis function must be an ISO 8601 formatted timestamp. Given {{value}}",D3120:"Syntax error in expression passed to function eval: {{value}}",D3121:"Dynamic error evaluating the expression passed to function eval: {{value}}",D3130:"Formatting or parsing an integer as a sequence starting with {{value}} is not supported by this implementation",D3131:"In a decimal digit pattern, all digits must be from the same decimal group",D3132:"Unknown component specifier {{value}} in date/time picture string",D3133:"The 'name' modifier can only be applied to months and days in the date/time picture string, not {{value}}",D3134:"The timezone integer format specifier cannot have more than four digits",D3135:"No matching closing bracket ']' in date/time picture string",D3136:"The date/time picture string is missing specifiers required to parse the timestamp",D3137:"{{{message}}}",D3138:"The $single() function expected exactly 1 matching result. Instead it matched more.",D3139:"The $single() function expected exactly 1 matching result. Instead it matched 0.",D3140:"Malformed URL passed to ${{{functionName}}}(): {{value}}",D3141:"{{{message}}}"};function nt(c){var f=Yt[c.code];if(typeof f<"u"){var p=f.replace(/\{\{\{([^}]+)}}}/g,function(){return c[arguments[1]]});p=p.replace(/\{\{([^}]+)}}/g,function(){return JSON.stringify(c[arguments[1]])}),c.message=p}}function bt(c,f){var p,s;try{p=b(c,f&&f.recover),s=p.errors,delete p.errors}catch(v){throw nt(v),v}var o=et(w),l=new Date;return o.bind("now",q(function(v,m){return u.fromMillis(l.getTime(),v,m)},"<s?s?:s>")),o.bind("millis",q(function(){return l.getTime()},"<:n>")),{evaluate:async function(v,m,S){if(typeof s<"u"){var $={code:"S0500",position:0};throw nt($),$}const I=et(o);for(const H of h.keys(m))I.bind(H,m[H]);if(I.bind("$",v),l=new Date,I.timestamp=l,I.options=f,I.createSequence=function(){var H=[];return f&&f.sequence&&(H.push=function(...be){if(H.length+be.length>f.sequence)throw{code:"D2015",stack:new Error().stack,value:f.sequence};return Array.prototype.push.apply(H,be)}),H.sequence=!0,arguments.length===1&&H.push(arguments[0]),H},Array.isArray(v)&&!O(v)&&(v=I.createSequence(v),v.outerWrapper=!0),f&&(f.timeout||f.stack)){const H=Date.now();I.guardrails=function(){if(f.stack>0&&I.depth>f.stack)throw{code:"D1011",value:f.stack,stack:new Error().stack};if(f.timeout>0&&Date.now()-H>f.timeout)throw{code:"D1012",value:f.timeout,stack:new Error().stack}}}else I.guardrails=function(){};I.base=I,I.depth=0,f&&f.RegexEngine?I.RegexEngine=f.RegexEngine:I.RegexEngine=RegExp;var re;try{return re=await k(p,v,I),typeof S=="function"&&S(null,re),re}catch(H){throw nt(H),H}},assign:function(v,m){o.bind(v,m)},registerFunction:function(v,m,S){var $=q(m,S);o.bind(v,$)},ast:function(){return p},errors:function(){return s}}}return bt.parser=b,bt})();r.exports=L},{"./datetime":1,"./functions":2,"./parser":4,"./signature":5,"./utils":6}],4:[function(t,r,i){var u=t("./signature");const a=(()=>{var h={".":75,"[":80,"]":0,"{":70,"}":0,"(":80,")":0,",":0,"@":80,"#":80,";":80,":":80,"?":20,"+":50,"-":50,"*":60,"/":60,"%":60,"|":20,"=":40,"<":40,">":40,"^":40,"**":60,"..":20,":=":10,"!=":40,"<=":40,">=":40,"~>":40,"?:":40,"??":40,and:30,or:25,in:40,"&":50,"!":0,"~":0},b={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:`
|
|
32
|
-
`,r:"\r",t:" "},P=function(x){var _=0,R=x.length,O=function(J,E){var g={type:J,value:E,position:_};return g},G=function(){for(var J=_,E=0,g,D,w=function(z){if(x.charAt(z)==="/"&&E===0){for(var F=0;x.charAt(z-(F+1))==="\\";)F++;if(F%2===0)return!0}return!1};_<R;){var k=x.charAt(_);if(w(_)){if(g=x.substring(J,_),g==="")throw{code:"S0301",stack:new Error().stack,position:_};for(_++,k=x.charAt(_),J=_;k==="i"||k==="m";)_++,k=x.charAt(_);return D=x.substring(J,_)+"g",new RegExp(g,D)}(k==="("||k==="["||k==="{")&&x.charAt(_-1)!=="\\"&&E++,(k===")"||k==="]"||k==="}")&&x.charAt(_-1)!=="\\"&&E--,_++}throw{code:"S0302",stack:new Error().stack,position:_}},ee=function(J){if(_>=R)return null;for(var E=x.charAt(_);_<R&&`
|
|
33
|
-
\r\v`.indexOf(E)>-1;)_++,E=x.charAt(_);if(E==="/"&&x.charAt(_+1)==="*"){var g=_;for(_+=2,E=x.charAt(_);!(E==="*"&&x.charAt(_+1)==="/");)if(E=x.charAt(++_),_>=R)throw{code:"S0106",stack:new Error().stack,position:g};return _+=2,E=x.charAt(_),ee(J)}if(J!==!0&&E==="/")return _++,O("regex",G());if(E==="."&&x.charAt(_+1)===".")return _+=2,O("operator","..");if(E===":"&&x.charAt(_+1)==="=")return _+=2,O("operator",":=");if(E==="!"&&x.charAt(_+1)==="=")return _+=2,O("operator","!=");if(E===">"&&x.charAt(_+1)==="=")return _+=2,O("operator",">=");if(E==="<"&&x.charAt(_+1)==="=")return _+=2,O("operator","<=");if(E==="*"&&x.charAt(_+1)==="*")return _+=2,O("operator","**");if(E==="~"&&x.charAt(_+1)===">")return _+=2,O("operator","~>");if(E==="?"&&x.charAt(_+1)===":")return _+=2,O("operator","?:");if(E==="?"&&x.charAt(_+1)==="?")return _+=2,O("operator","??");if(Object.prototype.hasOwnProperty.call(h,E))return _++,O("operator",E);if(E==='"'||E==="'"){var D=E;_++;for(var w="";_<R;){if(E=x.charAt(_),E==="\\")if(_++,E=x.charAt(_),Object.prototype.hasOwnProperty.call(b,E))w+=b[E];else if(E==="u"){var k=x.substr(_+1,4);if(/^[0-9a-fA-F]+$/.test(k)){var z=parseInt(k,16);w+=String.fromCharCode(z),_+=4}else throw{code:"S0104",stack:new Error().stack,position:_}}else throw{code:"S0103",stack:new Error().stack,position:_,token:E};else{if(E===D)return _++,O("string",w);w+=E}_++}throw{code:"S0101",stack:new Error().stack,position:_}}var F=/^-?(0|([1-9][0-9]*))(\.[0-9]+)?([Ee][-+]?[0-9]+)?/,Z=F.exec(x.substring(_));if(Z!==null){var ne=parseFloat(Z[0]);if(!isNaN(ne)&&isFinite(ne))return _+=Z[0].length,O("number",ne);throw{code:"S0102",stack:new Error().stack,position:_,token:Z[0]}}var we;if(E==="`"){_++;var pe=x.indexOf("`",_);if(pe!==-1)return we=x.substring(_,pe),_=pe+1,O("name",we);throw _=R,{code:"S0105",stack:new Error().stack,position:_}}for(var he=_,Pe;;)if(Pe=x.charAt(he),he===R||`
|
|
34
|
-
\r\v`.indexOf(Pe)>-1||Object.prototype.hasOwnProperty.call(h,Pe)){if(x.charAt(_)==="$")return we=x.substring(_+1,he),_=he,O("variable",we);switch(we=x.substring(_,he),_=he,we){case"or":case"in":case"and":return O("operator",we);case"true":return O("value",!0);case"false":return O("value",!1);case"null":return O("value",null);default:return _===R&&we===""?null:O("name",we)}}else he++};return ee},L=function(x,_){var R,O,G=Object.create(null),ee=[],J=function(){var d=[];R.id!=="(end)"&&d.push({type:R.type,value:R.value,position:R.position});for(var y=O();y!==null;)d.push(y),y=O();return d},E={nud:function(){var d={code:"S0211",token:this.value,position:this.position};if(_)return d.remaining=J(),d.type="error",ee.push(d),d;throw d.stack=new Error().stack,d}},g=function(d,y){var W=G[d];return y=y||0,W?y>=W.lbp&&(W.lbp=y):(W=Object.create(E),W.id=W.value=d,W.lbp=y,G[d]=W),W},D=function(d){if(_){d.remaining=J(),ee.push(d);var y=G["(error)"];return R=Object.create(y),R.error=d,R.type="(error)",R}else throw d.stack=new Error().stack,d},w=function(d,y){if(d&&R.id!==d){var W;R.id==="(end)"?W="S0203":W="S0202";var ce={code:W,position:R.position,token:R.value,value:d};return D(ce)}var Ee=O(y);if(Ee===null)return R=G["(end)"],R.position=x.length,R;var ye=Ee.value,A=Ee.type,C;switch(A){case"name":case"variable":C=G["(name)"];break;case"operator":if(C=G[ye],!C)return D({code:"S0204",stack:new Error().stack,position:Ee.position,token:ye});break;case"string":case"number":case"value":C=G["(literal)"];break;case"regex":A="regex",C=G["(regex)"];break;default:return D({code:"S0205",stack:new Error().stack,position:Ee.position,token:ye})}return R=Object.create(C),R.value=ye,R.type=A,R.position=Ee.position,R},k=function(d){var y,W=R;for(w(null,!0),y=W.nud();d<R.lbp;)W=R,w(),y=W.led(y);return y},z=function(d){var y=g(d,0);y.nud=function(){return this}},F=function(d,y,W){var ce=y||h[d],Ee=g(d,ce);return Ee.led=W||function(ye){return this.lhs=ye,this.rhs=k(ce),this.type="binary",this},Ee},Z=function(d,y,W){var ce=g(d,y);return ce.led=W,ce},ne=function(d,y){var W=g(d);return W.nud=y||function(){return this.expression=k(70),this.type="unary",this},W};z("(end)"),z("(name)"),z("(literal)"),z("(regex)"),g(":"),g(";"),g(","),g(")"),g("]"),g("}"),g(".."),F("."),F("+"),F("-"),F("*"),F("/"),F("%"),F("="),F("<"),F(">"),F("!="),F("<="),F(">="),F("&"),F("and"),F("or"),F("in"),z("and"),z("or"),z("in"),ne("-"),F("~>"),F("??",h["??"],function(d){return this.type="condition",this.condition={type:"function",value:"(",procedure:{type:"variable",value:"exists"},arguments:[JSON.parse(JSON.stringify(d))]},this.then=d,this.else=k(0),this}),Z("(error)",10,function(d){return this.lhs=d,this.error=R.error,this.remaining=J(),this.type="error",this}),ne("*",function(){return this.type="wildcard",this}),ne("**",function(){return this.type="descendant",this}),ne("%",function(){return this.type="parent",this}),F("(",h["("],function(d){if(this.procedure=d,this.type="function",this.arguments=[],R.id!==")")for(;R.type==="operator"&&R.id==="?"?(this.type="partial",this.arguments.push(R),w("?")):this.arguments.push(k(0)),R.id===",";)w(",");if(w(")",!0),d.type==="name"&&(d.value==="function"||d.value==="λ")){if(this.arguments.forEach(function(ye,A){if(ye.type!=="variable")return D({code:"S0208",stack:new Error().stack,position:ye.position,token:ye.value,value:A+1})}),this.type="lambda",R.id==="<"){for(var y=R.position,W=1,ce="<";W>0&&R.id!=="{"&&R.id!=="(end)";){var Ee=w();Ee.id===">"?W--:Ee.id==="<"&&W++,ce+=Ee.value}w(">");try{this.signature=u(ce)}catch(ye){return ye.position=y+ye.offset,D(ye)}}w("{"),this.body=k(0),w("}")}return this}),ne("(",function(){for(var d=[];R.id!==")"&&(d.push(k(0)),R.id===";");)w(";");return w(")",!0),this.type="block",this.expressions=d,this}),ne("[",function(){var d=[];if(R.id!=="]")for(;;){var y=k(0);if(R.id===".."){var W={type:"binary",value:"..",position:R.position,lhs:y};w(".."),W.rhs=k(0),y=W}if(d.push(y),R.id!==",")break;w(",")}return w("]",!0),this.expressions=d,this.type="unary",this}),F("[",h["["],function(d){if(R.id==="]"){for(var y=d;y&&y.type==="binary"&&y.value==="[";)y=y.lhs;return y.keepArray=!0,w("]"),d}else return this.lhs=d,this.rhs=k(h["]"]),this.type="binary",w("]",!0),this}),F("^",h["^"],function(d){w("(");for(var y=[];;){var W={descending:!1};if(R.id==="<"?w("<"):R.id===">"&&(W.descending=!0,w(">")),W.expression=k(0),y.push(W),R.id!==",")break;w(",")}return w(")"),this.lhs=d,this.rhs=y,this.type="binary",this});var we=function(d){var y=[];if(R.id!=="}")for(;;){var W=k(0);w(":");var ce=k(0);if(y.push([W,ce]),R.id!==",")break;w(",")}return w("}",!0),typeof d>"u"?(this.lhs=y,this.type="unary"):(this.lhs=d,this.rhs=y,this.type="binary"),this};ne("{",we),F("{",h["{"],we),Z(":=",h[":="],function(d){return d.type!=="variable"?D({code:"S0212",stack:new Error().stack,position:d.position,token:d.value}):(this.lhs=d,this.rhs=k(h[":="]-1),this.type="binary",this)}),F("@",h["@"],function(d){return this.lhs=d,this.rhs=k(h["@"]),this.rhs.type!=="variable"?D({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"@"}):(this.type="binary",this)}),F("#",h["#"],function(d){return this.lhs=d,this.rhs=k(h["#"]),this.rhs.type!=="variable"?D({code:"S0214",stack:new Error().stack,position:this.rhs.position,token:"#"}):(this.type="binary",this)}),F("?",h["?"],function(d){return this.type="condition",this.condition=d,this.then=k(0),R.id===":"&&(w(":"),this.else=k(0)),this}),F("?:",h["?:"],function(d){return this.type="condition",this.condition=JSON.parse(JSON.stringify(d)),this.then=d,this.else=k(0),this}),ne("|",function(){return this.type="transform",this.pattern=k(0),w("|"),this.update=k(0),R.id===","&&(w(","),this.delete=k(0)),w("|"),this});var pe=function(d){var y;if(d.type==="function"&&!d.predicate){var W={type:"lambda",thunk:!0,arguments:[],position:d.position};W.body=d,y=W}else if(d.type==="condition")d.then=pe(d.then),typeof d.else<"u"&&(d.else=pe(d.else)),y=d;else if(d.type==="block"){var ce=d.expressions.length;ce>0&&(d.expressions[ce-1]=pe(d.expressions[ce-1])),y=d}else y=d;return y},he=0,Pe=0,Ye=[],ae=function(d,y){switch(d.type){case"name":case"wildcard":y.level--,y.level===0&&(typeof d.ancestor>"u"||(Ye[y.index].slot.label=d.ancestor.label),d.ancestor=y,d.tuple=!0);break;case"parent":y.level++;break;case"block":d.expressions.length>0&&(d.tuple=!0,y=ae(d.expressions[d.expressions.length-1],y));break;case"path":d.tuple=!0;var W=d.steps.length-1;for(y=ae(d.steps[W--],y);y.level>0&&W>=0;)y=ae(d.steps[W--],y);break;default:throw{code:"S0217",token:d.type,position:d.position}}return y},de=function(d,y){if(typeof y.seekingParent<"u"||y.type==="parent"){var W=typeof y.seekingParent<"u"?y.seekingParent:[];y.type==="parent"&&W.push(y.slot),typeof d.seekingParent>"u"?d.seekingParent=W:Array.prototype.push.apply(d.seekingParent,W)}},He=function(d){var y=d.steps.length-1,W=d.steps[y],ce=typeof W.seekingParent<"u"?W.seekingParent:[];W.type==="parent"&&ce.push(W.slot);for(var Ee=0;Ee<ce.length;Ee++){var ye=ce[Ee];for(y=d.steps.length-2;ye.level>0;){if(y<0){typeof d.seekingParent>"u"?d.seekingParent=[ye]:d.seekingParent.push(ye);break}for(var A=d.steps[y--];y>=0&&A.focus&&d.steps[y].focus;)A=d.steps[y--];ye=ae(A,ye)}}},te=function(d){var y;switch(d.type){case"binary":switch(d.value){case".":var W=te(d.lhs);W.type==="path"?y=W:y={type:"path",steps:[W]},W.type==="parent"&&(y.seekingParent=[W.slot]);var ce=te(d.rhs);ce.type==="path"?Array.prototype.push.apply(y.steps,ce.steps):(typeof ce.predicate<"u"&&(ce.stages=ce.predicate,delete ce.predicate),y.steps.push(ce)),y.steps.filter(function(j){if(j.type==="number"||j.type==="value")throw{code:"S0213",stack:new Error().stack,position:j.position,value:j.value};return j.type==="string"}).forEach(function(j){j.type="name"}),y.steps.filter(function(j){return j.keepArray===!0}).length>0&&(y.keepSingletonArray=!0);var Ee=y.steps[0];Ee.type==="unary"&&Ee.value==="["&&(Ee.consarray=!0);var ye=y.steps[y.steps.length-1];ye.type==="unary"&&ye.value==="["&&(ye.consarray=!0),He(y);break;case"[":y=te(d.lhs);var A=y,C="predicate";if(y.type==="path"&&(A=y.steps[y.steps.length-1],C="stages"),typeof A.group<"u")throw{code:"S0209",stack:new Error().stack,position:d.position};typeof A[C]>"u"&&(A[C]=[]);var T=te(d.rhs);typeof T.seekingParent<"u"&&(T.seekingParent.forEach(j=>{j.level===1?ae(A,j):j.level--}),de(A,T)),A[C].push({type:"filter",expr:T,position:d.position});break;case"{":if(y=te(d.lhs),typeof y.group<"u")throw{code:"S0210",stack:new Error().stack,position:d.position};y.group={lhs:d.rhs.map(function(j){return[te(j[0]),te(j[1])]}),position:d.position};break;case"^":y=te(d.lhs),y.type!=="path"&&(y={type:"path",steps:[y]});var M={type:"sort",position:d.position};M.terms=d.rhs.map(function(j){var V=te(j.expression);return de(M,V),{descending:j.descending,expression:V}}),y.steps.push(M),He(y);break;case":=":y={type:"bind",value:d.value,position:d.position},y.lhs=te(d.lhs),y.rhs=te(d.rhs),de(y,y.rhs);break;case"@":if(y=te(d.lhs),A=y,y.type==="path"&&(A=y.steps[y.steps.length-1]),typeof A.stages<"u"||typeof A.predicate<"u")throw{code:"S0215",stack:new Error().stack,position:d.position};if(A.type==="sort")throw{code:"S0216",stack:new Error().stack,position:d.position};d.keepArray&&(A.keepArray=!0),A.focus=d.rhs.value,A.tuple=!0;break;case"#":y=te(d.lhs),A=y,y.type==="path"?A=y.steps[y.steps.length-1]:(y={type:"path",steps:[y]},typeof A.predicate<"u"&&(A.stages=A.predicate,delete A.predicate)),typeof A.stages>"u"?A.index=d.rhs.value:A.stages.push({type:"index",value:d.rhs.value,position:d.position}),A.tuple=!0;break;case"~>":y={type:"apply",value:d.value,position:d.position},y.lhs=te(d.lhs),y.rhs=te(d.rhs),y.keepArray=y.lhs.keepArray||y.rhs.keepArray;break;default:y={type:d.type,value:d.value,position:d.position},y.lhs=te(d.lhs),y.rhs=te(d.rhs),de(y,y.lhs),de(y,y.rhs)}break;case"unary":y={type:d.type,value:d.value,position:d.position},d.value==="["?y.expressions=d.expressions.map(function(j){var V=te(j);return de(y,V),V}):d.value==="{"?y.lhs=d.lhs.map(function(j){var V=te(j[0]);de(y,V);var le=te(j[1]);return de(y,le),[V,le]}):(y.expression=te(d.expression),d.value==="-"&&y.expression.type==="number"?(y=y.expression,y.value=-y.value):de(y,y.expression));break;case"function":case"partial":y={type:d.type,name:d.name,value:d.value,position:d.position},y.arguments=d.arguments.map(function(j){var V=te(j);return de(y,V),V}),y.procedure=te(d.procedure);break;case"lambda":y={type:d.type,arguments:d.arguments,signature:d.signature,position:d.position};var B=te(d.body);y.body=pe(B);break;case"condition":y={type:d.type,position:d.position},y.condition=te(d.condition),de(y,y.condition),y.then=te(d.then),de(y,y.then),typeof d.else<"u"&&(y.else=te(d.else),de(y,y.else));break;case"transform":y={type:d.type,position:d.position},y.pattern=te(d.pattern),y.update=te(d.update),typeof d.delete<"u"&&(y.delete=te(d.delete));break;case"block":y={type:d.type,position:d.position},y.expressions=d.expressions.map(function(j){var V=te(j);return de(y,V),(V.consarray||V.type==="path"&&V.steps[0].consarray)&&(y.consarray=!0),V});break;case"name":y={type:"path",steps:[d]},d.keepArray&&(y.keepSingletonArray=!0);break;case"parent":y={type:"parent",slot:{label:"!"+he++,level:1,index:Pe++}},Ye.push(y);break;case"string":case"number":case"value":case"wildcard":case"descendant":case"variable":case"regex":y=d;break;case"operator":if(d.value==="and"||d.value==="or"||d.value==="in")d.type="name",y=te(d);else if(d.value==="?")y=d;else throw{code:"S0201",stack:new Error().stack,position:d.position,token:d.value};break;case"error":y=d,d.lhs&&(y=te(d.lhs));break;default:var N="S0206";d.id==="(end)"&&(N="S0207");var U={code:N,position:d.position,token:d.value};if(_)return ee.push(U),{type:"error",error:U};throw U.stack=new Error().stack,U}return d.keepArray&&(y.keepArray=!0),y};O=P(x),w();var xe=k(0);if(R.id!=="(end)"){var rt={code:"S0201",position:R.position,token:R.value};D(rt)}if(xe=te(xe),xe.type==="parent"||typeof xe.seekingParent<"u")throw{code:"S0217",token:xe.type,position:xe.position};return ee.length>0&&(xe.errors=ee),xe};return L})();r.exports=a},{"./signature":5}],5:[function(t,r,i){var u=t("./utils");const a=(()=>{var h={a:"arrays",b:"booleans",f:"functions",n:"numbers",o:"objects",s:"strings"};function b(P){for(var L=1,x=[],_=Object.create(null),R=_;L<P.length;){var O=P.charAt(L);if(O===":")break;var G=function(){x.push(_),R=_,_=Object.create(null)},ee=function(F,Z,ne,we){for(var pe=1,he=Z;he<F.length;)if(he++,O=F.charAt(he),O===we){if(pe--,pe===0)break}else O===ne&&pe++;return he};switch(O){case"s":case"n":case"b":case"l":case"o":_.regex="["+O+"m]",_.type=O,G();break;case"a":_.regex="[asnblfom]",_.type=O,_.array=!0,G();break;case"f":_.regex="f",_.type=O,G();break;case"j":_.regex="[asnblom]",_.type=O,G();break;case"x":_.regex="[asnblfom]",_.type=O,G();break;case"-":R.context=!0,R.contextRegex=new RegExp(R.regex),R.regex+="?";break;case"?":case"+":R.regex+=O;break;case"(":var J=ee(P,L,"(",")"),E=P.substring(L+1,J);if(E.indexOf("<")===-1)_.regex="["+E+"m]";else throw{code:"S0402",stack:new Error().stack,value:E,offset:L};_.type="("+E+")",L=J,G();break;case"<":if(R.type==="a"||R.type==="f"){var g=ee(P,L,"<",">");R.subtype=P.substring(L+1,g),L=g}else throw{code:"S0401",stack:new Error().stack,value:R.type,offset:L};break}L++}var D="^"+x.map(function(F){return"("+F.regex+")"}).join("")+"$",w=new RegExp(D),k=function(F){var Z;if(u.isFunction(F))Z="f";else{var ne=typeof F;switch(ne){case"string":Z="s";break;case"number":Z="n";break;case"boolean":Z="b";break;case"object":F===null?Z="l":Array.isArray(F)?Z="a":Z="o";break;case"undefined":default:Z="m"}}return Z},z=function(F,Z){for(var ne="^",we=0,pe=0;pe<x.length;pe++){ne+=x[pe].regex;var he=Z.match(ne);if(he===null)throw{code:"T0410",stack:new Error().stack,value:F[we],index:we+1};we=he[0].length}throw{code:"T0410",stack:new Error().stack,value:F[we],index:we+1}};return{definition:P,validate:function(F,Z){var ne="";F.forEach(function(Pe){ne+=k(Pe)});var we=w.exec(ne);if(we){var pe=[],he=0;return x.forEach(function(Pe,Ye){var ae=F[he],de=we[Ye+1];if(de==="")if(Pe.context&&Pe.contextRegex){var He=k(Z);if(Pe.contextRegex.test(He))pe.push(Z);else throw{code:"T0411",stack:new Error().stack,value:Z,index:he+1}}else pe.push(ae),he++;else de.split("").forEach(function(te){if(ae=F[he],Pe.type==="a"){if(te==="m")ae=void 0;else{var xe=!0;if(typeof Pe.subtype<"u"){if(te!=="a"&&de!==Pe.subtype)xe=!1;else if(te==="a"&&ae.length>0){var rt=k(ae[0]);if(rt!==Pe.subtype.charAt(0))xe=!1;else{var d=ae.filter(function(y){return k(y)!==rt});xe=d.length===0}}}if(!xe)throw{code:"T0412",stack:new Error().stack,value:ae,index:he+1,type:h[Pe.subtype]};te!=="a"&&(ae=[ae])}pe.push(ae),he++}else pe.push(ae),he++})}),pe}z(F,ne)}}}return b})();r.exports=a},{"./utils":6}],6:[function(t,r,i){const u=(()=>{function a(g){var D=!1;if(typeof g=="number"&&(D=!isNaN(g),D&&!isFinite(g)))throw{code:"D1001",value:g,stack:new Error().stack};return D}function h(g){var D=!1;return Array.isArray(g)&&(D=g.filter(function(w){return typeof w!="string"}).length===0),D}function b(g){var D=!1;return Array.isArray(g)&&(D=g.filter(function(w){return!a(w)}).length===0),D}function P(g){return g.sequence===!0&&Array.isArray(g)}function L(g){return g&&(g._jsonata_function===!0||g._jsonata_lambda===!0)||typeof g=="function"}function x(g){var D=typeof g.arity=="number"?g.arity:typeof g.implementation=="function"?g.implementation.length:typeof g.length=="number"?g.length:g.arguments.length;return D}function _(g){return g&&g._jsonata_lambda===!0}var R=(typeof Symbol=="function"?Symbol:{}).iterator||"@@iterator";function O(g){return typeof g=="object"&&g!==null&&R in g&&"next"in g&&typeof g.next=="function"}function G(g,D){if(g===D)return!0;if(typeof g=="object"&&typeof D=="object"&&g!==null&&D!==null){if(Array.isArray(g)&&Array.isArray(D)){if(g.length!==D.length)return!1;for(var w=0;w<g.length;w++)if(!G(g[w],D[w]))return!1;return!0}var k=Object.getOwnPropertyNames(g),z=Object.getOwnPropertyNames(D);if(k.length!==z.length)return!1;for(k=k.sort(),z=z.sort(),w=0;w<k.length;w++)if(k[w]!==z[w])return!1;for(w=0;w<k.length;w++){var F=k[w];if(!G(g[F],D[F]))return!1}return!0}return!1}function ee(g){return typeof g=="object"&&g!==null&&"then"in g&&typeof g.then=="function"}function J(g){var D=[];for(let w of g)D.push(w);return D}function E(g){return typeof g=="object"&&g!==null?Object.keys(g):[]}return{isNumeric:a,isArrayOfStrings:h,isArrayOfNumbers:b,isSequence:P,isFunction:L,isLambda:_,isIterable:O,getFunctionArity:x,isDeepEqual:G,stringToArray:J,isPromise:ee,keys:E}})();r.exports=u},{}]},{},[3])(3)})})($r)),$r.exports}Yi();function An(n){if(!n||typeof n!="object")return!1;const e=n;return typeof e.getFrameCanvas=="function"&&typeof e.frameSeq=="number"}function Nr(n){return typeof n!="string"?null:n.trim()||null}function Ji(n){if(n==null||n==="")return null;if(typeof n=="string")return Nr(n);if(typeof n!="object")return null;const e=n;return Nr(e.url)??Nr(e.blobUrl)}function Ki(n){for(const e of n)try{URL.revokeObjectURL(e)}catch{}}const Zi=150,Sn=10,Qi=200,es=16,Tn=new WeakMap;let kn=!1;function cr(){return typeof navigator>"u"?!1:/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function Gt(n){if(n===window)return{x:window.scrollX,y:window.scrollY};const e=n;return{x:e.scrollLeft,y:e.scrollTop}}function ts(n,e,t){if(n===window){window.scrollTo(e,t);return}const r=n;typeof r.scrollTo=="function"?r.scrollTo(e,t):(r.scrollLeft=e,r.scrollTop=t)}function rs(n){if(n===window){const t=document.documentElement;return Math.max(0,t.scrollHeight-window.innerHeight)}const e=n;return Math.max(0,e.scrollHeight-e.clientHeight)}function kt(n){let e=Tn.get(n);if(!e){const t=Gt(n);e={x:t.x,y:t.y,restoring:!1,watching:!1,userEngaged:!1,raf:0,stickyFrames:0},Tn.set(n,e)}return e}function lr(n){kt(n).userEngaged=!0}function fr(n){const e=kt(n);clearTimeout(e.settleTimer),e.settleTimer=setTimeout(()=>{e.userEngaged=!1,e.settleTimer=void 0},Zi)}function Pn(n,e){return e-n>=Qi}function Pt(n){if(!cr())return;const e=kt(n);if(e.restoring)return;const t=Gt(n);if(Pn(t.y,e.y)){Ir(n);return}e.x=t.x,e.y=t.y}function ns(n){if(!cr())return;const e=kt(n),t=rs(n),r=e.x,i=t>0?Math.min(e.y,t):e.y,{x:u,y:a}=Gt(n);if(!(Math.abs(r-u)<=Sn&&Math.abs(i-a)<=Sn)){e.restoring=!0;try{ts(n,r,i)}finally{requestAnimationFrame(()=>{e.restoring=!1})}}}function Ir(n){const e=kt(n);if(e.stickyFrames=es,e.raf)return;const t=()=>{e.raf=0,ns(n),e.stickyFrames>0&&(e.stickyFrames--,e.raf=requestAnimationFrame(t))};e.raf=requestAnimationFrame(t)}function Gr(n){Ir(n)}function Bt(n){if(!cr())return;const e=kt(n);if(e.watching)return;e.watching=!0;const t=n===window?window:n,r=()=>{if(e.restoring)return;const{y:O}=Gt(n);if(Pn(O,e.y)){Ir(n);return}if(e.userEngaged){Pt(n),fr(n);return}Pt(n)},i=O=>xn(O)===n,u=O=>{i(O)&&(Pt(n),lr(n))},a=O=>{i(O)&&fr(n)},h=O=>{i(O)&&(Pt(n),lr(n),fr(n))};t.addEventListener("scroll",r,{passive:!0}),t.addEventListener("touchstart",u,{passive:!0}),t.addEventListener("touchend",a,{passive:!0}),t.addEventListener("touchcancel",a,{passive:!0}),t.addEventListener("wheel",h,{passive:!0}),t.addEventListener("pointerdown",u,{passive:!0}),t.addEventListener("pointerup",a,{passive:!0}),t.addEventListener("pointercancel",a,{passive:!0});const b=Gt(n);if(e.x=b.x,e.y=b.y,n===window){const O=new ResizeObserver(()=>Gr(window));O.observe(document.documentElement),e.resizeObserver=O;return}const P=n,L=new ResizeObserver(()=>Gr(P));L.observe(P);for(const O of Array.from(P.children))L.observe(O);e.resizeObserver=L;const x=()=>Gr(P),_=new MutationObserver(O=>{for(const G of O)if(G.type==="childList")for(const ee of Array.from(G.addedNodes))ee instanceof Element&&L.observe(ee);x()});_.observe(P,{childList:!0,subtree:!0,characterData:!0});const R=P.getRootNode();R instanceof ShadowRoot&&R.host&&_.observe(R.host,{childList:!0,subtree:!0,characterData:!0}),e.mutationObserver=_}function xn(n){for(const e of n.composedPath())if(!(e===window||e===document)&&e instanceof HTMLElement&&Cn(e))return e;return window}function Cn(n){if(!(n instanceof HTMLElement)||n===document.documentElement||n===document.body)return!1;const e=getComputedStyle(n).overflowY;return e==="auto"||e==="scroll"||e==="overlay"}function Br(n){for(const t of n.composedPath())t===window||t===document||t instanceof HTMLElement&&Cn(t)&&Bt(t);const e=xn(n);Bt(e),n.type==="wheel"?(Pt(e),lr(e),fr(e)):(n.type==="touchstart"||n.type==="pointerdown")&&(Pt(e),lr(e))}function hr(n){n instanceof Element&&n.classList?.contains("custom-scroll")&&Bt(n),n.querySelectorAll?.(".custom-scroll").forEach(e=>{e instanceof HTMLElement&&Bt(e)})}function jr(n){hr(n),new MutationObserver(t=>{for(const r of t)for(const i of Array.from(r.addedNodes))i instanceof Element&&hr(i)}).observe(n,{childList:!0,subtree:!0})}function qr(n){n.querySelectorAll?.("*").forEach(e=>{e.shadowRoot&&(jr(e.shadowRoot),qr(e.shadowRoot))})}function is(){const n=Element.prototype;if(n.__safariScrollGuardPatched)return;n.__safariScrollGuardPatched=!0;const e=n.attachShadow;n.attachShadow=function(r){const i=e.call(this,r);return jr(i),i}}function ss(){if(typeof window>"u"||kn||(kn=!0,!cr()))return;Bt(window),is();const n={capture:!0,passive:!0};window.addEventListener("wheel",Br,n),window.addEventListener("touchstart",Br,n),window.addEventListener("pointerdown",Br,n);const e=()=>{hr(document),qr(document)};document.readyState==="loading"?document.addEventListener("DOMContentLoaded",e,{once:!0}):e(),new MutationObserver(r=>{for(const i of r)for(const u of Array.from(i.addedNodes))u instanceof Element&&(hr(u),u.shadowRoot&&jr(u.shadowRoot),qr(u))}).observe(document.documentElement,{childList:!0,subtree:!0})}const as=Ri,os=Di,us=Or,cs=Ur,ls=st,fs=qi,hs=sr,ds=Mr,ps=Xi;ss(),window["concorde-utils"]=window["concorde-utils"]||{},window["concorde-utils"]={Utils:as,Arrays:os,DataBindObserver:us,Format:cs,HTML:ls,LocationHandler:fs,Objects:hs,PublisherManager:$e,api:ds,URLPattern:ps,Endpoint:Fr,DataProviderKey:ir};const jt="[sonic-webgpu]",ms=["time","frame","mouseX","mouseY","hovering"],Rn=["param0","param1","param2","param3"],Un=["channel0","channel1","channel2","channel3"],gs=["frameUrl","snapshot"];function vs(){return typeof matchMedia=="function"&&matchMedia("(prefers-reduced-motion: reduce)").matches}function zr(n,e){if(typeof n=="number"&&Number.isFinite(n))return n;if(typeof n=="string"&&n.trim()!==""){const t=Number(n);if(Number.isFinite(t))return t}return e}function ys(n){if(n===null||n==="")return"";if(typeof n=="string")return n.trim();const e=Ji(n);if(e)return e;if(!(n&&typeof n=="object"))return""}function Wr(n){const e=n.dataProvider?.trim();return e||st.getAncestorAttributeValue(n,"dataProvider")||st.getAncestorAttributeValue(n,"formDataProvider")||""}function Dn(n){n.formPublisher&&(n.formPublisher.offInternalMutation(n.onFormMutation),n.formPublisher=null)}function bs(n){Dn(n);const e=Wr(n);e&&(n.formPublisher=$e.get(e),n.formPublisher.onInternalMutation(n.onFormMutation),n.onFormMutation())}function ws(n){const e=n.outDataProvider?.trim()||Wr(n)||"";n.outPublisher=e?$e.get(e):null}function Es(n,e){for(const t of Un){if(!(t in e))continue;const r=ys(e[t]);r!==void 0&&n[t]!==r&&(n[t]=r)}for(const t of Rn){if(!(t in e))continue;const r=zr(e[t],NaN);Number.isFinite(r)&&n[t]!==r&&(n[t]=r)}if("targetX"in e||"targetY"in e){const t=zr(e.targetX,NaN),r=zr(e.targetY,NaN);Number.isFinite(t)&&Number.isFinite(r)&&t>=0&&t<=1&&r>=0&&r<=1?(n.remoteTarget={x:t,y:r},Ln(n)):(n.remoteTarget=null,n.mouseVec[0]=0,n.mouseVec[1]=0)}}function Ln(n){if(!n.remoteTarget||!n.runtime||n.mouse&&n.hovering)return;const e=n.runtime.canvas.width,t=n.runtime.canvas.height;e<2||t<2||(n.mouseVec[0]=n.remoteTarget.x*e,n.mouseVec[1]=(1-n.remoteTarget.y)*t)}const yt={resolveFormProviderId:Wr,unbindFormProvider:Dn,bindFormProvider:bs,bindOutPublisher:ws,applyFormParams:Es,applyRemoteMouse:Ln},_s=`#version 300 es
|
|
35
|
-
precision highp float;
|
|
36
|
-
precision highp int;
|
|
37
|
-
precision mediump sampler2D;
|
|
38
|
-
|
|
39
|
-
uniform vec3 iResolution;
|
|
40
|
-
uniform float iTime;
|
|
41
|
-
uniform float iTimeDelta;
|
|
42
|
-
uniform float iFrameRate;
|
|
43
|
-
uniform int iFrame;
|
|
44
|
-
uniform float iChannelTime[4];
|
|
45
|
-
uniform vec3 iChannelResolution[4];
|
|
46
|
-
uniform vec4 iMouse;
|
|
47
|
-
uniform vec4 iDate;
|
|
48
|
-
uniform float iSampleRate;
|
|
49
|
-
uniform sampler2D iChannel0;
|
|
50
|
-
uniform sampler2D iChannel1;
|
|
51
|
-
uniform sampler2D iChannel2;
|
|
52
|
-
uniform sampler2D iChannel3;
|
|
53
|
-
uniform float uParam0;
|
|
54
|
-
uniform float uParam1;
|
|
55
|
-
uniform float uParam2;
|
|
56
|
-
uniform float uParam3;
|
|
57
|
-
|
|
58
|
-
out vec4 sonicFragColor;
|
|
59
|
-
|
|
60
|
-
`,As=`
|
|
61
|
-
void main() {
|
|
62
|
-
mainImage(sonicFragColor, gl_FragCoord.xy);
|
|
63
|
-
}
|
|
64
|
-
`,Ss=`#version 300 es
|
|
65
|
-
precision highp float;
|
|
66
|
-
layout(location = 0) in vec2 aPos;
|
|
67
|
-
void main() {
|
|
68
|
-
gl_Position = vec4(aPos, 0.0, 1.0);
|
|
69
|
-
}
|
|
70
|
-
`;function Ts(n,e){return _s+(n?n+`
|
|
71
|
-
`:"")+e+`
|
|
72
|
-
`+As}class qt extends Error{constructor(e,t,r){super(e),this.pass=t,this.infoLog=r,this.name="ShaderCompileError"}}const ks=["bufferA","bufferB","bufferC","bufferD","image"],Ps=["bufferA","bufferB","bufferC","bufferD"];function xs(n,e,t){if(!n)return{upload:!1,texSource:null};if(typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement){const r=n.currentSrc||n.src||"";return!r||!n.complete||n.naturalWidth<1?{upload:!1,texSource:null}:t===r&&e>0?{upload:!1,texSource:null,nextSrc:r}:{upload:!0,texSource:n,nextSrc:r}}if(typeof HTMLVideoElement<"u"&&n instanceof HTMLVideoElement)return n.readyState<2||n.videoWidth<1?{upload:!1,texSource:null}:{upload:!0,texSource:n};if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement)return n.width<1||n.height<1?{upload:!1,texSource:null}:{upload:!0,texSource:n};if(An(n)){if(n.frameSeq===e)return{upload:!1,texSource:null};const r=n.getFrameCanvas();return!r||r.width<1||r.height<1?{upload:!1,texSource:null}:{upload:!0,texSource:r}}return{upload:!1,texSource:null}}function Cs(n){return/\.(webm|mp4|ogg|mov)(\?|#|$)/i.test(n)}function Rs(n){return typeof HTMLVideoElement<"u"&&n instanceof HTMLVideoElement?{width:n.videoWidth||1,height:n.videoHeight||1}:typeof HTMLImageElement<"u"&&n instanceof HTMLImageElement?{width:n.naturalWidth||n.width||1,height:n.naturalHeight||n.height||1}:"width"in n&&"height"in n?{width:Math.max(1,Number(n.width)||1),height:Math.max(1,Number(n.height)||1)}:{width:1,height:1}}function On(n,e,t,r){const i=n.createShader(e);if(!i)throw new qt("Unable to create shader",r,"");if(n.shaderSource(i,t),n.compileShader(i),!n.getShaderParameter(i,n.COMPILE_STATUS)){const u=n.getShaderInfoLog(i)||"";throw n.deleteShader(i),new qt(`Compile error (${r}): ${u}`,r,u)}return i}function Us(n,e,t,r){const i=n.createProgram();if(!i)throw new qt("Unable to create program","link","");if(n.attachShader(i,e),n.attachShader(i,t),n.linkProgram(i),!n.getProgramParameter(i,n.LINK_STATUS)){const u=n.getProgramInfoLog(i)||"";throw n.deleteProgram(i),new qt(`Link error (${r}): ${u}`,"link",u)}return i}function Ds(n,e){return{iResolution:n.getUniformLocation(e,"iResolution"),iTime:n.getUniformLocation(e,"iTime"),iTimeDelta:n.getUniformLocation(e,"iTimeDelta"),iFrameRate:n.getUniformLocation(e,"iFrameRate"),iFrame:n.getUniformLocation(e,"iFrame"),iMouse:n.getUniformLocation(e,"iMouse"),iDate:n.getUniformLocation(e,"iDate"),iSampleRate:n.getUniformLocation(e,"iSampleRate"),iChannelTime:n.getUniformLocation(e,"iChannelTime[0]")||n.getUniformLocation(e,"iChannelTime"),iChannelResolution:n.getUniformLocation(e,"iChannelResolution[0]")||n.getUniformLocation(e,"iChannelResolution"),iChannel:[0,1,2,3].map(t=>n.getUniformLocation(e,`iChannel${t}`)),uParam:[0,1,2,3].map(t=>n.getUniformLocation(e,`uParam${t}`))}}function Hr(n,e,t){const r=n.createTexture();if(!r)throw new Error("Unable to create texture");return n.bindTexture(n.TEXTURE_2D,r),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MIN_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_MAG_FILTER,n.LINEAR),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_S,n.CLAMP_TO_EDGE),n.texParameteri(n.TEXTURE_2D,n.TEXTURE_WRAP_T,n.CLAMP_TO_EDGE),n.texImage2D(n.TEXTURE_2D,0,n.RGBA8,e,t,0,n.RGBA,n.UNSIGNED_BYTE,null),r}function Mn(n,e){const t=n.createFramebuffer();if(!t)throw new Error("Unable to create framebuffer");n.bindFramebuffer(n.FRAMEBUFFER,t),n.framebufferTexture2D(n.FRAMEBUFFER,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,e,0);const r=n.checkFramebufferStatus(n.FRAMEBUFFER);if(r!==n.FRAMEBUFFER_COMPLETE)throw new Error(`Incomplete framebuffer: ${r}`);return n.bindFramebuffer(n.FRAMEBUFFER,null),t}function Fn(n,e,t){const r=[Hr(n,e,t),Hr(n,e,t)],i=[Mn(n,r[0]),Mn(n,r[1])];return{textures:r,framebuffers:i,index:0}}function Vr(n,e){for(const t of e.textures)n.deleteTexture(t);for(const t of e.framebuffers)n.deleteFramebuffer(t)}function dr(n,e){const t=(n??"").trim();if(!t){const i=e.trim();return i.startsWith("#")?{kind:"element",key:i}:i?{kind:"url",url:i}:{kind:"none"}}if(t.startsWith("#"))return{kind:"element",key:t};const r=t.toLowerCase();return r==="self"?{kind:"self"}:r==="buffer-a"||r==="buffera"||r==="a"?{kind:"buffer",buffer:"bufferA"}:r==="buffer-b"||r==="bufferb"||r==="b"?{kind:"buffer",buffer:"bufferB"}:r==="buffer-c"||r==="bufferc"||r==="c"?{kind:"buffer",buffer:"bufferC"}:r==="buffer-d"||r==="bufferd"||r==="d"?{kind:"buffer",buffer:"bufferD"}:r==="none"||r==="null"?{kind:"none"}:{kind:"url",url:t}}class Ls{constructor(e){this.vao=null,this.vertexShader=null,this.programs=new Map,this.buffers=new Map,this.external=new Map,this.width=0,this.height=0,this.passChannels=new Map,this.activePasses=[],this.blackTexture=null,this.elementResolver=null;const t=e.getContext("webgl2",{antialias:!1,alpha:!0,premultipliedAlpha:!1,preserveDrawingBuffer:!0,powerPreference:"default"});if(!t||t.isContextLost())throw new Error("WebGL2 not available");this.canvas=e,this.gl=t,this.initGeometry(),this.blackTexture=Hr(t,1,1),t.bindTexture(t.TEXTURE_2D,this.blackTexture),t.texImage2D(t.TEXTURE_2D,0,t.RGBA8,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([0,0,0,255]))}get isLost(){return this.gl.isContextLost()}initGeometry(){const e=this.gl,t=e.createVertexArray();if(!t)throw new Error("Unable to create VAO");this.vao=t,e.bindVertexArray(t);const r=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,r),e.bufferData(e.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),e.STATIC_DRAW),e.enableVertexAttribArray(0),e.vertexAttribPointer(0,2,e.FLOAT,!1,0,0),e.bindVertexArray(null)}resize(e,t){const r=Math.max(1,Math.floor(e)),i=Math.max(1,Math.floor(t));if(!(r===this.width&&i===this.height)){this.width=r,this.height=i,this.canvas.width=r,this.canvas.height=i;for(const u of Ps){const a=this.buffers.get(u);a&&Vr(this.gl,a),this.programs.has(u)&&this.buffers.set(u,Fn(this.gl,r,i))}}}setSources(e,t){if(this.gl.isContextLost())throw new Error("WebGL context lost");this.disposePrograms(),this.passChannels=t,this.activePasses=[],this.vertexShader=On(this.gl,this.gl.VERTEX_SHADER,Ss,"vertex");for(const r of ks){const i=r==="image"?e.image:e[r];if(!i?.trim())continue;const u=Ts(e.common||"",i),a=On(this.gl,this.gl.FRAGMENT_SHADER,u,r),h=Us(this.gl,this.vertexShader,a,r);if(this.gl.deleteShader(a),this.programs.set(r,{program:h,uniforms:Ds(this.gl,h)}),this.activePasses.push(r),r!=="image"&&this.width>0){const b=this.buffers.get(r);b&&Vr(this.gl,b),this.buffers.set(r,Fn(this.gl,this.width,this.height))}}if(!this.programs.has("image"))throw new qt("image pass is required","image","Missing image shader source")}async ensureTextures(e){const t=[...new Set(e.filter(Boolean))];await Promise.all(t.map(r=>this.loadTexture(r)))}ensureElementTexture(e){if(this.external.has(e))return;const t=this.gl,r=t.createTexture();r&&(t.bindTexture(t.TEXTURE_2D,r),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MIN_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_MAG_FILTER,t.LINEAR),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_S,t.CLAMP_TO_EDGE),t.texParameteri(t.TEXTURE_2D,t.TEXTURE_WRAP_T,t.CLAMP_TO_EDGE),t.texImage2D(t.TEXTURE_2D,0,t.RGBA8,1,1,0,t.RGBA,t.UNSIGNED_BYTE,new Uint8Array([0,0,0,255])),this.external.set(e,{texture:r,width:1,height:1,url:e,lastSeq:0}))}updateElementTextures(e){const t=this.gl;for(const[r,i]of this.external){let u=i.video??i.source??null;r.startsWith("#")&&e&&(u=e(r),i.source=u),typeof HTMLVideoElement<"u"&&u instanceof HTMLVideoElement&&(i.video=u);const a=xs(u,i.lastSeq,i.lastSrc);if(!a.upload||!a.texSource)continue;const h=Rs(a.texSource);t.bindTexture(t.TEXTURE_2D,i.texture),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,1),i.width===h.width&&i.height===h.height&&i.lastSeq>0?t.texSubImage2D(t.TEXTURE_2D,0,0,0,t.RGBA,t.UNSIGNED_BYTE,a.texSource):(t.texImage2D(t.TEXTURE_2D,0,t.RGBA8,t.RGBA,t.UNSIGNED_BYTE,a.texSource),i.width=h.width,i.height=h.height),t.pixelStorei(t.UNPACK_FLIP_Y_WEBGL,0),An(u)?i.lastSeq=u.frameSeq:i.lastSeq=(i.lastSeq||0)+1,a.nextSrc!==void 0&&(i.lastSrc=a.nextSrc)}}updateVideoTextures(){this.updateElementTextures()}setVideosPlaying(e){for(const t of this.external.values()){const r=t.video||(typeof HTMLVideoElement<"u"&&t.source instanceof HTMLVideoElement?t.source:null);r&&(e?r.play().catch(()=>{}):r.pause())}}getTextureSize(e){const t=this.external.get(e);return!t||t.width<1||t.height<1?null:{width:t.width,height:t.height}}loadTexture(e){return this.external.get(e)?Promise.resolve():Cs(e)?this.loadVideoTexture(e):new Promise((r,i)=>{const u=new Image;u.crossOrigin="anonymous",u.onload=()=>{const a=this.gl,h=a.createTexture();if(!h){i(new Error("Unable to create texture"));return}a.bindTexture(a.TEXTURE_2D,h),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,1),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MIN_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_MAG_FILTER,a.LINEAR),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_S,a.CLAMP_TO_EDGE),a.texParameteri(a.TEXTURE_2D,a.TEXTURE_WRAP_T,a.CLAMP_TO_EDGE),a.texImage2D(a.TEXTURE_2D,0,a.RGBA8,a.RGBA,a.UNSIGNED_BYTE,u),a.pixelStorei(a.UNPACK_FLIP_Y_WEBGL,0),this.external.set(e,{texture:h,width:u.naturalWidth||u.width,height:u.naturalHeight||u.height,url:e,lastSeq:0}),r()},u.onerror=()=>i(new Error(`Failed to load texture: ${e}`)),u.src=e})}loadVideoTexture(e){return new Promise((t,r)=>{const i=document.createElement("video");i.crossOrigin="anonymous",i.muted=!0,i.loop=!0,i.playsInline=!0,i.preload="auto";let u=!1;const a=()=>{u||(u=!0,r(new Error(`Failed to load video: ${e}`)))},h=()=>{if(u||!i.videoWidth)return;u=!0;const b=this.gl,P=b.createTexture();if(!P){r(new Error("Unable to create texture"));return}b.bindTexture(b.TEXTURE_2D,P),b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,1),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MIN_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_MAG_FILTER,b.LINEAR),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_S,b.CLAMP_TO_EDGE),b.texParameteri(b.TEXTURE_2D,b.TEXTURE_WRAP_T,b.CLAMP_TO_EDGE),b.texImage2D(b.TEXTURE_2D,0,b.RGBA8,b.RGBA,b.UNSIGNED_BYTE,i),b.pixelStorei(b.UNPACK_FLIP_Y_WEBGL,0),this.external.set(e,{texture:P,width:i.videoWidth,height:i.videoHeight,url:e,video:i,lastSeq:0}),i.play().catch(()=>{}),t()};i.addEventListener("loadeddata",h),i.addEventListener("error",a),i.src=e,i.load()})}resolveChannel(e,t){const r={texture:this.blackTexture,width:1,height:1};if(t.kind==="none")return r;if(t.kind==="url"||t.kind==="element"){const a=t.kind==="url"?t.url:t.key,h=this.external.get(a);return h?{texture:h.texture,width:h.width,height:h.height}:r}const i=t.kind==="self"?e==="image"?null:e:t.buffer;if(!i)return r;const u=this.buffers.get(i);return u?{texture:u.textures[u.index],width:this.width,height:this.height}:r}bindChannels(e,t){const r=this.gl,i=this.passChannels.get(e)||[{kind:"none"},{kind:"none"},{kind:"none"},{kind:"none"}],u=[];for(let a=0;a<4;a++){const h=this.resolveChannel(e,i[a]);r.activeTexture(r.TEXTURE0+a),r.bindTexture(r.TEXTURE_2D,h.texture),t.iChannel[a]&&r.uniform1i(t.iChannel[a],a),u.push(h.width,h.height,1)}t.iChannelResolution&&r.uniform3fv(t.iChannelResolution,u),t.iChannelTime&&r.uniform1fv(t.iChannelTime,[0,0,0,0])}setCommonUniforms(e,t){const r=this.gl,i=this.width,u=this.height;if(e.iResolution&&r.uniform3f(e.iResolution,i,u,1),e.iTime&&r.uniform1f(e.iTime,t.time),e.iTimeDelta&&r.uniform1f(e.iTimeDelta,t.timeDelta),e.iFrameRate&&r.uniform1f(e.iFrameRate,t.timeDelta>0?1/t.timeDelta:60),e.iFrame&&r.uniform1i(e.iFrame,t.frame),e.iMouse&&r.uniform4f(e.iMouse,t.mouse[0],t.mouse[1],t.mouse[2],t.mouse[3]),e.iDate){const a=new Date;r.uniform4f(e.iDate,a.getFullYear(),a.getMonth(),a.getDate(),a.getHours()*3600+a.getMinutes()*60+a.getSeconds()+a.getMilliseconds()*.001)}e.iSampleRate&&r.uniform1f(e.iSampleRate,44100);for(let a=0;a<4;a++)e.uParam[a]&&r.uniform1f(e.uParam[a],t.params[a])}setElementResolver(e){this.elementResolver=e}render(e){const t=this.gl;if(!this.vao||this.width<1||this.height<1)return;this.updateElementTextures(this.elementResolver??void 0),t.bindVertexArray(this.vao),t.viewport(0,0,this.width,this.height),t.disable(t.DEPTH_TEST),t.disable(t.BLEND);for(const i of this.activePasses){if(i==="image")continue;const u=this.programs.get(i),a=this.buffers.get(i);if(!u||!a)continue;const h=1-a.index;t.bindFramebuffer(t.FRAMEBUFFER,a.framebuffers[h]),t.viewport(0,0,this.width,this.height),t.useProgram(u.program),this.setCommonUniforms(u.uniforms,e),this.bindChannels(i,u.uniforms),t.drawArrays(t.TRIANGLES,0,3),a.index=h}const r=this.programs.get("image");r&&(t.bindFramebuffer(t.FRAMEBUFFER,null),t.viewport(0,0,this.width,this.height),t.useProgram(r.program),this.setCommonUniforms(r.uniforms,e),this.bindChannels("image",r.uniforms),t.drawArrays(t.TRIANGLES,0,3),t.bindVertexArray(null))}readRect(e,t,r,i){return this.readFramebufferRect(null,e,t,r,i)}readBufferRect(e,t,r,i,u){if(e==="image")return this.readRect(t,r,i,u);const a=this.buffers.get(e);return a?this.readFramebufferRect(a.framebuffers[a.index],t,r,i,u):null}readPixel(e,t){const r=this.readRect(Math.floor(e),Math.floor(t),1,1);return!r||r.data.length<4?[0,0,0,0]:[r.data[0],r.data[1],r.data[2],r.data[3]]}readFramebufferRect(e,t,r,i,u){const a=this.gl;if(a.isContextLost()||this.width<1||this.height<1)return null;let h=Math.floor(t),b=Math.floor(r),P=Math.floor(i),L=Math.floor(u);if(P<1||L<1||(h<0&&(P+=h,h=0),b<0&&(L+=b,b=0),h+P>this.width&&(P=this.width-h),b+L>this.height&&(L=this.height-b),P<1||L<1))return null;const x=new Uint8Array(P*L*4);return a.bindFramebuffer(a.FRAMEBUFFER,e),a.readPixels(h,b,P,L,a.RGBA,a.UNSIGNED_BYTE,x),a.bindFramebuffer(a.FRAMEBUFFER,null),{x:h,y:b,width:P,height:L,data:x}}get size(){return{width:this.width,height:this.height}}disposePrograms(){for(const e of this.programs.values())this.gl.deleteProgram(e.program);this.programs.clear(),this.activePasses=[],this.vertexShader&&(this.gl.deleteShader(this.vertexShader),this.vertexShader=null)}dispose(e=!0){if(this.gl.isContextLost())this.programs.clear(),this.buffers.clear(),this.external.clear(),this.blackTexture=null,this.vao=null,this.vertexShader=null;else{this.disposePrograms();for(const t of this.buffers.values())Vr(this.gl,t);this.buffers.clear();for(const t of this.external.values())t.video&&(t.video.pause(),t.video.removeAttribute("src"),t.video.load()),this.gl.deleteTexture(t.texture);this.external.clear(),this.blackTexture&&(this.gl.deleteTexture(this.blackTexture),this.blackTexture=null),this.vao&&(this.gl.deleteVertexArray(this.vao),this.vao=null),e&&this.gl.getExtension("WEBGL_lose_context")?.loseContext()}}}const Os={common:"",image:`
|
|
73
|
-
void mainImage(out vec4 fragColor, in vec2 fragCoord) {
|
|
74
|
-
vec2 uv = fragCoord / iResolution.xy;
|
|
75
|
-
vec4 c = texture(iChannel0, uv);
|
|
76
|
-
float has = step(0.001, c.a + c.r + c.g + c.b);
|
|
77
|
-
// Souris en UV (origine bas-gauche, comme fragCoord)
|
|
78
|
-
vec2 muv = iMouse.xy / max(iResolution.xy, vec2(1.0));
|
|
79
|
-
float m = length(uv - muv);
|
|
80
|
-
// Halo souris toujours visible + mix global via uParam0
|
|
81
|
-
float glow = exp(-m * 8.0) * (0.35 + 0.65 * uParam0);
|
|
82
|
-
vec4 tint = vec4(0.15, 0.45, 0.95, 1.0);
|
|
83
|
-
vec4 mixed = mix(c, tint, clamp(uParam0 * 0.35 + glow, 0.0, 1.0));
|
|
84
|
-
float g = 0.15 + 0.25 * uv.y;
|
|
85
|
-
vec4 grad = vec4(g, g * 0.85 + 0.08 * uParam0, 0.35 + 0.4 * uv.x, 1.0);
|
|
86
|
-
fragColor = mix(grad, mixed, has);
|
|
87
|
-
}
|
|
88
|
-
`,bufferA:"",bufferB:"",bufferC:"",bufferD:""};class zt{constructor(e,t){this.backend="webgl2",this.channelUrls=["","","",""],this.lastTime=0,this.disposed=!1,this.channelQueue=Promise.resolve(),this.canvas=e,this.toy=t,this.applySources()}static create(e){const t=new Ls(e);return new zt(e,t)}async setShader(e){this.assertAlive()}async setChannel(e,t){return this.channelQueue=this.channelQueue.then(()=>this.setChannelNow(e,t)),this.channelQueue}async setChannelNow(e,t){this.assertAlive();const r=t.trim();if(this.channelUrls[e]===r){r&&!this.toy.getTextureSize(r)&&await this.toy.ensureTextures([r]);return}this.channelUrls[e]=r,this.applySources();const i=this.channelUrls.filter(Boolean);i.length&&await this.toy.ensureTextures(i)}async setChannels(e){return this.channelQueue=this.channelQueue.then(async()=>{this.assertAlive(),this.channelUrls=[e[0].trim(),e[1].trim(),e[2].trim(),e[3].trim()],this.applySources();const t=this.channelUrls.filter(Boolean);t.length&&await this.toy.ensureTextures(t)}),this.channelQueue}getTextureSize(e){return this.toy.getTextureSize(e.trim())}resize(e,t){this.assertAlive(),this.toy.resize(e,t)}draw(e){if(this.assertAlive(),this.toy.isLost)return;const t=this.lastTime>0?Math.max(0,e.time-this.lastTime):0;this.lastTime=e.time;const r={time:e.time,timeDelta:t,frame:Math.floor(e.frame),mouse:e.mouse,params:e.params};this.toy.render(r)}dispose(e=!0){this.disposed||(this.disposed=!0,this.toy.dispose(e))}applySources(){const e=new Map([["image",[dr(this.channelUrls[0],""),dr(this.channelUrls[1],""),dr(this.channelUrls[2],""),dr(this.channelUrls[3],"")]]]);this.toy.setSources(Os,e)}assertAlive(){if(this.disposed)throw new Error("WebGL2 fallback disposed")}}class Wt extends Error{constructor(e,t){super(e),this.infoLog=t,this.name="WebGpuCompileError"}}function $n(n){const e=String(n??"auto").trim().toLowerCase();return e==="webgpu"||e==="webgl2"||e==="auto"?e:"auto"}function Ms(n){const e=String(n??"").trim().toLowerCase();return e==="particles"||e==="image"?e:""}const Nn=`
|
|
89
|
-
fn mainImage(uv: vec2f, fragCoord: vec2f) -> vec4f {
|
|
90
|
-
_ = fragCoord;
|
|
91
|
-
let c = iChannel0(uv);
|
|
92
|
-
if (c.a > 0.001 || c.r + c.g + c.b > 0.001) {
|
|
93
|
-
return c;
|
|
94
|
-
}
|
|
95
|
-
let g = 0.15 + 0.25 * uv.y;
|
|
96
|
-
return vec4f(g, g * 0.85 + 0.08 * u.params.x, 0.35 + 0.4 * uv.x, 1.0);
|
|
97
|
-
}
|
|
98
|
-
`.trim(),Fs=`
|
|
99
|
-
struct SonicUniforms {
|
|
100
|
-
resolution: vec2f,
|
|
101
|
-
time: f32,
|
|
102
|
-
frame: f32,
|
|
103
|
-
mouse: vec4f,
|
|
104
|
-
params: vec4f,
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
@group(0) @binding(0) var<uniform> u: SonicUniforms;
|
|
108
|
-
@group(0) @binding(1) var channel0Tex: texture_2d<f32>;
|
|
109
|
-
@group(0) @binding(2) var channel1Tex: texture_2d<f32>;
|
|
110
|
-
@group(0) @binding(3) var channel2Tex: texture_2d<f32>;
|
|
111
|
-
@group(0) @binding(4) var channel3Tex: texture_2d<f32>;
|
|
112
|
-
@group(0) @binding(5) var texSampler: sampler;
|
|
113
|
-
|
|
114
|
-
fn iChannel0(uv: vec2f) -> vec4f {
|
|
115
|
-
return textureSample(channel0Tex, texSampler, uv);
|
|
116
|
-
}
|
|
117
|
-
fn iChannel1(uv: vec2f) -> vec4f {
|
|
118
|
-
return textureSample(channel1Tex, texSampler, uv);
|
|
119
|
-
}
|
|
120
|
-
fn iChannel2(uv: vec2f) -> vec4f {
|
|
121
|
-
return textureSample(channel2Tex, texSampler, uv);
|
|
122
|
-
}
|
|
123
|
-
fn iChannel3(uv: vec2f) -> vec4f {
|
|
124
|
-
return textureSample(channel3Tex, texSampler, uv);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
struct VsOut {
|
|
128
|
-
@builtin(position) position: vec4f,
|
|
129
|
-
@location(0) uv: vec2f,
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
@vertex
|
|
133
|
-
fn vs_main(@builtin(vertex_index) vi: u32) -> VsOut {
|
|
134
|
-
var pos = array<vec2f, 3>(
|
|
135
|
-
vec2f(-1.0, -1.0),
|
|
136
|
-
vec2f(3.0, -1.0),
|
|
137
|
-
vec2f(-1.0, 3.0),
|
|
138
|
-
);
|
|
139
|
-
var out: VsOut;
|
|
140
|
-
out.position = vec4f(pos[vi], 0.0, 1.0);
|
|
141
|
-
out.uv = pos[vi] * 0.5 + vec2f(0.5);
|
|
142
|
-
return out;
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
@fragment
|
|
146
|
-
fn fs_main(in: VsOut) -> @location(0) vec4f {
|
|
147
|
-
let fragCoord = vec2f(in.uv.x * u.resolution.x, in.uv.y * u.resolution.y);
|
|
148
|
-
return mainImage(in.uv, fragCoord);
|
|
149
|
-
}
|
|
150
|
-
`.trim();function In(n){const e=n.trim()||Nn;if(!/\bfn\s+mainImage\s*\(/.test(e))throw new Error("WGSL invalide : définir `fn mainImage(uv: vec2f, fragCoord: vec2f) -> vec4f`.");return`${Fs}
|
|
151
|
-
|
|
152
|
-
${e}
|
|
153
|
-
`}const Gn=64,$s=4;async function Xr(n=navigator.gpu){return await n.requestAdapter({powerPreference:"high-performance"})??await n.requestAdapter({powerPreference:"low-power"})??await n.requestAdapter()}async function Ns(n){const e=n.createTexture({size:[1,1],format:"rgba8unorm",usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT});return n.queue.writeTexture({texture:e},new Uint8Array([0,0,0,0]),{bytesPerRow:4},[1,1]),e}class Ht{constructor(e,t,r,i){this.backend="webgpu",this.pipeline=null,this.channelTextures=[null,null,null,null],this.channelViews=[null,null,null,null],this.channelSizes=[null,null,null,null],this.channelUrls=["","","",""],this.placeholder=null,this.placeholderView=null,this.bindGroup=null,this.disposed=!1,this.channelLoadTokens=[0,0,0,0],this.canvas=e,this.device=t,this.context=r,this.format=i,this.uniformBuffer=t.createBuffer({size:Gn,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.sampler=t.createSampler({magFilter:"linear",minFilter:"linear",addressModeU:"clamp-to-edge",addressModeV:"clamp-to-edge"})}static async probe(){const e=navigator.gpu;if(!e)return"WebGPU indisponible (pas de navigator.gpu)";try{const t=await Xr(e);return t?((await t.requestDevice()).destroy(),null):"WebGPU adapter indisponible"}catch(t){return t instanceof Error?t.message:String(t)}}static async create(e){const t=navigator.gpu;if(!t)throw new Error("WebGPU indisponible (pas de navigator.gpu)");const r=await Xr(t);if(!r)throw new Error("WebGPU adapter indisponible");const i=await r.requestDevice(),u=e.getContext("webgpu");if(!u)throw i.destroy(),new Error("WebGPU canvas context indisponible");const a=navigator.gpu.getPreferredCanvasFormat();u.configure({device:i,format:a,alphaMode:"premultiplied"});const h=new Ht(e,i,u,a);return h.placeholder=await Ns(i),h.placeholderView=h.placeholder.createView(),h}async setShader(e){this.assertAlive();let t;try{t=In(e)}catch(a){const h=a instanceof Error?a.message:String(a);throw new Wt(h)}const r=this.device.createShaderModule({code:t}),u=(await r.getCompilationInfo()).messages.filter(a=>a.type==="error");if(u.length)throw new Wt("WGSL compile error",u.map(a=>a.message).join(`
|
|
154
|
-
`));this.pipeline=this.device.createRenderPipeline({layout:"auto",vertex:{module:r,entryPoint:"vs_main"},fragment:{module:r,entryPoint:"fs_main",targets:[{format:this.format}]},primitive:{topology:"triangle-list"}}),this.bindGroup=null}async setChannel(e,t){this.assertAlive();const r=t.trim();if(this.channelUrls[e]===r&&this.channelTextures[e])return;this.channelUrls[e]=r;const i=++this.channelLoadTokens[e];if(!r){this.destroyChannel(e),this.bindGroup=null;return}const u=await Is(r);if(i!==this.channelLoadTokens[e]||this.disposed)return;const a=this.device.createTexture({size:[u.width,u.height],format:"rgba8unorm",usage:GPUTextureUsage.TEXTURE_BINDING|GPUTextureUsage.COPY_DST|GPUTextureUsage.RENDER_ATTACHMENT});this.device.queue.copyExternalImageToTexture({source:u},{texture:a},[u.width,u.height]),this.destroyChannel(e),this.channelTextures[e]=a,this.channelViews[e]=a.createView(),this.channelSizes[e]={width:u.width,height:u.height},this.bindGroup=null}getTextureSize(e){const t=this.channelUrls.indexOf(e.trim());return t<0?null:this.channelSizes[t]}resize(e,t){this.assertAlive();const r=Math.max(1,Math.floor(e)),i=Math.max(1,Math.floor(t));this.canvas.width===r&&this.canvas.height===i||(this.canvas.width=r,this.canvas.height=i,this.context.configure({device:this.device,format:this.format,alphaMode:"premultiplied"}))}draw(e){if(this.assertAlive(),!this.pipeline||!this.placeholderView)return;this.writeUniforms(e),this.bindGroup||(this.bindGroup=this.device.createBindGroup({layout:this.pipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this.uniformBuffer}},{binding:1,resource:this.channelViews[0]??this.placeholderView},{binding:2,resource:this.channelViews[1]??this.placeholderView},{binding:3,resource:this.channelViews[2]??this.placeholderView},{binding:4,resource:this.channelViews[3]??this.placeholderView},{binding:5,resource:this.sampler}]}));const t=this.device.createCommandEncoder(),r=t.beginRenderPass({colorAttachments:[{view:this.context.getCurrentTexture().createView(),clearValue:{r:0,g:0,b:0,a:1},loadOp:"clear",storeOp:"store"}]});r.setPipeline(this.pipeline),r.setBindGroup(0,this.bindGroup),r.draw(3),r.end(),this.device.queue.submit([t.finish()])}dispose(e=!1){if(!this.disposed){this.disposed=!0;for(let t=0;t<$s;t++)this.channelLoadTokens[t]++,this.destroyChannel(t);this.placeholder?.destroy(),this.placeholder=null,this.placeholderView=null,this.uniformBuffer.destroy(),this.pipeline=null,this.bindGroup=null;try{this.context.unconfigure()}catch{}if(e)try{this.device.destroy()}catch{}}}writeUniforms(e){const t=new ArrayBuffer(Gn),r=new Float32Array(t);r[0]=e.width,r[1]=e.height,r[2]=e.time,r[3]=e.frame,r[4]=e.mouse[0],r[5]=e.mouse[1],r[6]=e.mouse[2],r[7]=e.mouse[3],r[8]=e.params[0],r[9]=e.params[1],r[10]=e.params[2],r[11]=e.params[3],this.device.queue.writeBuffer(this.uniformBuffer,0,t)}destroyChannel(e){this.channelTextures[e]?.destroy(),this.channelTextures[e]=null,this.channelViews[e]=null,this.channelSizes[e]=null}assertAlive(){if(this.disposed)throw new Error("WebGPU runtime disposed")}}async function Is(n){const e=await fetch(n);if(!e.ok)throw new Error(`Failed to load texture: ${n}`);const t=await e.blob();return createImageBitmap(t)}function Bn(n){if(n.outEventListeners>0||n.frameOut&&n.outPublisher)return!0;const e=n.outPublisher;if(!e?._proxies_)return!1;for(const t of[...ms,...gs])if(e._proxies_.get(t)?.hasListener?.())return!0;return!1}function Gs(n,e,t){if(!Bn(n)||e-n.lastOutAt<n.outInterval)return;n.lastOutAt=e;const r={time:t,frame:n.frame,mouseX:n.mouseVec[0],mouseY:n.mouseVec[1],hovering:n.hovering,param0:n.param0,param1:n.param1,param2:n.param2,param3:n.param3,backend:n.runtime?.backend};n.dispatchEvent(new CustomEvent("out",{detail:r,bubbles:!0,composed:!0}));const i=n.outPublisher;if(i){const u=yt.resolveFormProviderId(n)===(n.outDataProvider?.trim()||yt.resolveFormProviderId(n)),a={time:r.time,frame:r.frame,mouseX:r.mouseX,mouseY:r.mouseY,hovering:r.hovering};if(!u)for(const h of Rn)a[h]=r[h];i.set(a)}n.frameOut&&jn(n)}async function jn(n){if(n.frameOutBusy||!n.runtime)return;const e=n.runtime.canvas;if(e.width<1||e.height<1)return;n.frameOutBusy=!0;const t=++n.frameOutSeq,r=e.width,i=e.height;try{const u=await new Promise(h=>{try{e.toBlob(b=>h(b),"image/png")}catch{h(null)}});if(t!==n.frameOutSeq||!u||!n.outPublisher)return;const a=URL.createObjectURL(u);qn(n),n.lastFrameUrl=a,n.outPublisher.set({frameUrl:a,snapshot:{url:a,width:r,height:i,mime:"image/png"}})}finally{t===n.frameOutSeq&&(n.frameOutBusy=!1)}}function qn(n){n.lastFrameUrl&&(Ki([n.lastFrameUrl]),n.lastFrameUrl="")}const zn={hasOutConsumer:Bn,maybePublishOut:Gs,publishFrameSnapshot:jn,revokeFrameUrl:qn},at=1200,Vt=4,Wn=4,Hn=64,Bs=6,Vn=16,Xn=`
|
|
155
|
-
struct Uniforms {
|
|
156
|
-
resolution: vec2f,
|
|
157
|
-
time: f32,
|
|
158
|
-
dt: f32,
|
|
159
|
-
mouse: vec2f,
|
|
160
|
-
_pad: vec2f,
|
|
161
|
-
params: vec4f,
|
|
162
|
-
}
|
|
163
|
-
`,js=`
|
|
164
|
-
${Xn}
|
|
165
|
-
struct Particle {
|
|
166
|
-
pos: vec2f,
|
|
167
|
-
vel: vec2f,
|
|
168
|
-
}
|
|
169
|
-
const COUNT: u32 = ${at}u;
|
|
170
|
-
@group(0) @binding(0) var<uniform> u: Uniforms;
|
|
171
|
-
@group(0) @binding(1) var<storage, read_write> particles: array<Particle, COUNT>;
|
|
172
|
-
|
|
173
|
-
@compute @workgroup_size(${Hn})
|
|
174
|
-
fn cs_main(@builtin(global_invocation_id) id: vec3u) {
|
|
175
|
-
let i = id.x;
|
|
176
|
-
if (i >= COUNT) { return; }
|
|
177
|
-
var p = particles[i];
|
|
178
|
-
let speed = 0.35 + u.params.x * 2.2;
|
|
179
|
-
let attract = u.params.y;
|
|
180
|
-
let damp = 0.98;
|
|
181
|
-
var force = vec2f(0.0);
|
|
182
|
-
if (attract > 0.001 && length(u.mouse) > 0.5) {
|
|
183
|
-
let toM = u.mouse - p.pos;
|
|
184
|
-
let d = max(length(toM), 12.0);
|
|
185
|
-
force += normalize(toM) * (attract * 6000.0 / (d * d));
|
|
186
|
-
}
|
|
187
|
-
let c = u.resolution * 0.5;
|
|
188
|
-
let toC = p.pos - c;
|
|
189
|
-
force += vec2f(-toC.y, toC.x) * 0.0025 * speed;
|
|
190
|
-
let stepDt = max(u.dt, 0.008);
|
|
191
|
-
p.vel = (p.vel + force * stepDt) * damp;
|
|
192
|
-
p.pos += p.vel * stepDt * 60.0 * speed;
|
|
193
|
-
if (p.pos.x < 0.0) { p.pos.x += u.resolution.x; }
|
|
194
|
-
if (p.pos.x > u.resolution.x) { p.pos.x -= u.resolution.x; }
|
|
195
|
-
if (p.pos.y < 0.0) { p.pos.y += u.resolution.y; }
|
|
196
|
-
if (p.pos.y > u.resolution.y) { p.pos.y -= u.resolution.y; }
|
|
197
|
-
particles[i] = p;
|
|
198
|
-
}
|
|
199
|
-
`,qs=`
|
|
200
|
-
${Xn}
|
|
201
|
-
struct Particle {
|
|
202
|
-
pos: vec2f,
|
|
203
|
-
vel: vec2f,
|
|
204
|
-
}
|
|
205
|
-
const COUNT: u32 = ${at}u;
|
|
206
|
-
struct VsOut {
|
|
207
|
-
@builtin(position) position: vec4f,
|
|
208
|
-
@location(0) speed: f32,
|
|
209
|
-
@location(1) local: vec2f,
|
|
210
|
-
}
|
|
211
|
-
@group(0) @binding(0) var<uniform> u: Uniforms;
|
|
212
|
-
@group(0) @binding(1) var<storage, read> particles: array<Particle, COUNT>;
|
|
213
|
-
|
|
214
|
-
@vertex
|
|
215
|
-
fn vs_main(@builtin(vertex_index) vi: u32) -> VsOut {
|
|
216
|
-
let i = vi / 6u;
|
|
217
|
-
let c = vi % 6u;
|
|
218
|
-
var local = vec2f(0.0);
|
|
219
|
-
if (c == 0u) { local = vec2f(-1.0, -1.0); }
|
|
220
|
-
else if (c == 1u) { local = vec2f(1.0, -1.0); }
|
|
221
|
-
else if (c == 2u) { local = vec2f(-1.0, 1.0); }
|
|
222
|
-
else if (c == 3u) { local = vec2f(-1.0, 1.0); }
|
|
223
|
-
else if (c == 4u) { local = vec2f(1.0, -1.0); }
|
|
224
|
-
else { local = vec2f(1.0, 1.0); }
|
|
225
|
-
|
|
226
|
-
let p = particles[i];
|
|
227
|
-
let radius = 2.8;
|
|
228
|
-
let pos = p.pos + local * radius;
|
|
229
|
-
let ndc = (pos / max(u.resolution, vec2f(1.0))) * 2.0 - vec2f(1.0);
|
|
230
|
-
var out: VsOut;
|
|
231
|
-
out.position = vec4f(ndc.x, -ndc.y, 0.0, 1.0);
|
|
232
|
-
out.speed = length(p.vel);
|
|
233
|
-
out.local = local;
|
|
234
|
-
return out;
|
|
235
|
-
}
|
|
236
|
-
|
|
237
|
-
@fragment
|
|
238
|
-
fn fs_main(in: VsOut) -> @location(0) vec4f {
|
|
239
|
-
let d = length(in.local);
|
|
240
|
-
if (d > 1.0) { discard; }
|
|
241
|
-
let soft = 1.0 - smoothstep(0.55, 1.0, d);
|
|
242
|
-
let t = clamp(in.speed * 0.08, 0.0, 1.0);
|
|
243
|
-
let col = mix(vec3f(0.25, 0.65, 1.0), vec3f(1.0, 0.5, 0.2), t);
|
|
244
|
-
return vec4f(col * soft, soft);
|
|
245
|
-
}
|
|
246
|
-
`;class pr{constructor(e,t){this.device=null,this.context=null,this.format="bgra8unorm",this.uniformBuffer=null,this.particleBuffer=null,this.computePipeline=null,this.renderPipeline=null,this.bindGroup=null,this.ctx2d=null,this.lastTime=0,this.disposed=!1,this.seeded=!1,this.canvas=e,this.backend=t,this.cpu=new Float32Array(at*Vt)}static async create(e){const t=navigator.gpu;if(t)try{const u=await Xr(t);if(u){const a=await u.requestDevice(),h=e.getContext("webgpu");if(h){const b=t.getPreferredCanvasFormat();h.configure({device:a,format:b,alphaMode:"premultiplied"});const P=new pr(e,"webgpu");return P.device=a,P.context=h,P.format=b,P.initGpu(),P}a.destroy()}}catch{}const r=e.getContext("2d",{alpha:!0});if(!r)throw new Error("Particles: ni WebGPU ni Canvas2D");const i=new pr(e,"canvas2d");return i.ctx2d=r,i}async setShader(e){}async setChannel(e,t){}getTextureSize(e){return null}resize(e,t){const r=Math.max(1,Math.floor(e)),i=Math.max(1,Math.floor(t));this.canvas.width===r&&this.canvas.height===i||(this.canvas.width=r,this.canvas.height=i,this.context&&this.device&&this.context.configure({device:this.device,format:this.format,alphaMode:"premultiplied"}),this.seed(r,i))}draw(e){if(this.disposed||e.width<2||e.height<2)return;this.seeded||this.seed(e.width,e.height);const t=this.lastTime>0?Math.min(.05,Math.max(.001,e.time-this.lastTime)):.016;this.lastTime=e.time,this.backend==="webgpu"?this.drawGpu(e,t):this.drawCpu(e,t)}dispose(e=!0){if(!this.disposed){this.disposed=!0,this.uniformBuffer?.destroy(),this.particleBuffer?.destroy();try{this.context?.unconfigure()}catch{}this.device?.destroy(),this.device=null}}initGpu(){const e=this.device;this.uniformBuffer=e.createBuffer({size:Vn*Wn,usage:GPUBufferUsage.UNIFORM|GPUBufferUsage.COPY_DST}),this.particleBuffer=e.createBuffer({size:at*Vt*Wn,usage:GPUBufferUsage.STORAGE|GPUBufferUsage.COPY_DST});const t=e.createShaderModule({code:js}),r=e.createShaderModule({code:qs});this.computePipeline=e.createComputePipeline({layout:"auto",compute:{module:t,entryPoint:"cs_main"}}),this.renderPipeline=e.createRenderPipeline({layout:"auto",vertex:{module:r,entryPoint:"vs_main"},fragment:{module:r,entryPoint:"fs_main",targets:[{format:this.format,blend:{color:{srcFactor:"src-alpha",dstFactor:"one-minus-src-alpha",operation:"add"},alpha:{srcFactor:"one",dstFactor:"one-minus-src-alpha",operation:"add"}}}]},primitive:{topology:"triangle-list"}})}ensureBindGroups(){const e=this.device;!this.computePipeline||!this.renderPipeline||this.bindGroup||(this.bindGroup=e.createBindGroup({layout:this.computePipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this.uniformBuffer}},{binding:1,resource:{buffer:this.particleBuffer}}]}))}drawGpu(e,t){const r=this.device,i=this.context;if(!this.computePipeline||!this.renderPipeline)return;const u={...e,mouse:[e.mouse[0],e.height-e.mouse[1],e.mouse[2],e.height-e.mouse[3]]};this.writeUniforms(u,t),this.ensureBindGroups();const a=r.createBindGroup({layout:this.renderPipeline.getBindGroupLayout(0),entries:[{binding:0,resource:{buffer:this.uniformBuffer}},{binding:1,resource:{buffer:this.particleBuffer}}]}),h=r.createCommandEncoder(),b=h.beginComputePass();b.setPipeline(this.computePipeline),b.setBindGroup(0,this.bindGroup),b.dispatchWorkgroups(Math.ceil(at/Hn)),b.end();const P=h.beginRenderPass({colorAttachments:[{view:i.getCurrentTexture().createView(),clearValue:{r:.04,g:.05,b:.08,a:1},loadOp:"clear",storeOp:"store"}]});P.setPipeline(this.renderPipeline),P.setBindGroup(0,a),P.draw(at*Bs),P.end(),r.queue.submit([h.finish()])}drawCpu(e,t){const r=this.ctx2d,i=e.width,u=e.height,a=.35+e.params[0]*2.2,h=e.params[1],b=e.mouse[0],P=u-e.mouse[1];for(let L=0;L<at;L++){const x=L*Vt;let _=this.cpu[x],R=this.cpu[x+1],O=this.cpu[x+2],G=this.cpu[x+3],ee=0,J=0;if(h>.001&&(b>.5||P>.5)){const D=b-_,w=P-R,k=Math.max(Math.hypot(D,w),8),z=h*4e3/(k*k);ee+=D/k*z,J+=w/k*z}const E=i*.5,g=u*.5;ee+=-(R-g)*8e-4*a,J+=(_-E)*8e-4*a,O=(O+ee*t)*.985,G=(G+J*t)*.985,_+=O*t*60*a,R+=G*t*60*a,_<0&&(_+=i),_>i&&(_-=i),R<0&&(R+=u),R>u&&(R-=u),this.cpu[x]=_,this.cpu[x+1]=R,this.cpu[x+2]=O,this.cpu[x+3]=G}r.fillStyle="rgb(10, 12, 20)",r.fillRect(0,0,i,u);for(let L=0;L<at;L++){const x=L*Vt,_=Math.hypot(this.cpu[x+2],this.cpu[x+3]),R=Math.min(1,_*.08),O=Math.round(51+R*204),G=Math.round(140-R*25),ee=Math.round(255-R*204);r.fillStyle=`rgba(${O},${G},${ee},0.85)`,r.fillRect(this.cpu[x],this.cpu[x+1],2,2)}}writeUniforms(e,t){const r=new Float32Array(Vn);r[0]=e.width,r[1]=e.height,r[2]=e.time,r[3]=t,r[4]=e.mouse[0],r[5]=e.mouse[1],r[6]=0,r[7]=0,r[8]=e.params[0],r[9]=e.params[1],r[10]=e.params[2],r[11]=e.params[3],this.device.queue.writeBuffer(this.uniformBuffer,0,r.buffer,r.byteOffset,r.byteLength)}seed(e,t){for(let r=0;r<at;r++){const i=r*Vt;this.cpu[i]=Math.random()*e,this.cpu[i+1]=Math.random()*t,this.cpu[i+2]=(Math.random()-.5)*2,this.cpu[i+3]=(Math.random()-.5)*2}this.device&&this.particleBuffer&&this.device.queue.writeBuffer(this.particleBuffer,0,this.cpu.buffer,this.cpu.byteOffset,this.cpu.byteLength),this.seeded=!0}}function Yr(n,e){if(!n.mouse||!n.runtime)return;const t=n.getBoundingClientRect();if(t.width<1||t.height<1)return;const r=n.runtime.canvas.width/Math.max(t.width,1),i=(e.clientX-t.left)*r,u=(t.height-(e.clientY-t.top))*r;if(n.mouseVec[0]=i,n.mouseVec[1]=u,!n.raf&&n.ready&&n.runtime){const a=n.startTime?(performance.now()-n.startTime)/1e3:0;n.runtime.draw({width:n.runtime.canvas.width,height:n.runtime.canvas.height,time:a,frame:n.frame,mouse:n.mouseVec,params:[n.param0,n.param1,n.param2,n.param3]})}}function zs(n,e){Yr(n,e)}function Ws(n,e){Yr(n,e),n.mouseVec[2]=n.mouseVec[0],n.mouseVec[3]=n.mouseVec[1]}function Hs(n){n.mouseVec[2]=0,n.mouseVec[3]=0}function Vs(n){n.hovering=!0}function Xs(n){n.hovering=!1,n.mouseVec[2]=0,n.mouseVec[3]=0}const Xt={pointerToMouse:Yr,onMove:zs,onDown:Ws,onUp:Hs,onEnter:Vs,onLeave:Xs};var Ys=Object.defineProperty,Js=Object.getOwnPropertyDescriptor,Te=(n,e,t,r)=>{for(var i=r>1?void 0:r?Js(e,t):e,u=n.length-1,a;u>=0;u--)(a=n[u])&&(i=(r?a(e,t,i):a(i))||i);return r&&i&&Ys(e,t,i),i};const Ks="sonic-webgpu";return ue.SonicWebGpu=class extends Nt{constructor(){super(...arguments),this.shader="",this.kernel="",this.backendPrefer="auto",this.activeBackend="",this.channel0="",this.channel1="",this.channel2="",this.channel3="",this.play=!0,this.mouse=!0,this.releaseOffscreen=!1,this.dprMax=2,this.param0=0,this.param1=0,this.param2=0,this.param3=0,this.dataProvider="",this.outDataProvider="",this.outInterval=80,this.frameOut=!1,this.aspectRatio="",this.errorMessage="",this.fallbackNotice="",this.canvasEl=null,this.runtime=null,this.raf=0,this.startTime=0,this.frame=0,this.frameSeq=0,this.mouseVec=[0,0,0,0],this.remoteTarget=null,this.hovering=!1,this.outEventListeners=0,this.releasing=!1,this.inView=!0,this.resizeObserver=null,this.intersectionObserver=null,this.rebuildToken=0,this.ready=!1,this.boot=null,this.formPublisher=null,this.outPublisher=null,this.lastOutAt=0,this.lastFrameUrl="",this.frameOutBusy=!1,this.frameOutSeq=0,this.onFormMutation=()=>{const e=this.formPublisher?.get()??{};yt.applyFormParams(this,e)},this.onPointerMove=e=>Xt.onMove(this,e),this.onPointerDown=e=>Xt.onDown(this,e),this.onPointerUp=()=>Xt.onUp(this),this.onPointerEnter=()=>Xt.onEnter(this),this.onPointerLeave=()=>Xt.onLeave(this)}connectedCallback(){super.connectedCallback(),this.addEventListener("pointermove",this.onPointerMove),this.addEventListener("pointerdown",this.onPointerDown),this.addEventListener("pointerup",this.onPointerUp),this.addEventListener("pointerleave",this.onPointerLeave),this.addEventListener("pointerenter",this.onPointerEnter),this.bindFormProvider(),this.bindOutPublisher()}addEventListener(e,t,r){e==="out"&&t&&this.outEventListeners++,super.addEventListener(e,t,r)}removeEventListener(e,t,r){e==="out"&&t&&(this.outEventListeners=Math.max(0,this.outEventListeners-1)),super.removeEventListener(e,t,r)}disconnectedCallback(){super.disconnectedCallback(),this.removeEventListener("pointermove",this.onPointerMove),this.removeEventListener("pointerdown",this.onPointerDown),this.removeEventListener("pointerup",this.onPointerUp),this.removeEventListener("pointerleave",this.onPointerLeave),this.removeEventListener("pointerenter",this.onPointerEnter),this.unbindFormProvider(),this.revokeFrameUrl(),this.frameOutSeq++,this.frameOutBusy=!1,this.resizeObserver?.disconnect(),this.intersectionObserver?.disconnect(),this.rebuildToken++,this.releasing=!0,this.releaseRuntime(),this.outPublisher=null,this.releasing=!1}firstUpdated(){this.ensureCanvas(),this.resizeObserver=new ResizeObserver(()=>{this.syncSize(),this.ready&&this.runtime&&this.syncPlayback()}),this.resizeObserver.observe(this),this.intersectionObserver=new IntersectionObserver(e=>{this.inView=e.some(t=>t.isIntersecting),this.syncVisibility()},{threshold:0,rootMargin:"80px 0px"}),this.intersectionObserver.observe(this),this.bindFormProvider(),this.bindOutPublisher(),requestAnimationFrame(()=>{this.ensureRuntime()})}updated(e){if((e.has("backendPrefer")||e.has("kernel"))&&(this.runtime||this.boot)){this.releaseRuntime(),this.activeBackend="",this.ensureRuntime();return}if(!this.runtime)return;["shader",...Un].some(r=>e.has(r))&&(e.has("shader")&&this.runtime.backend==="webgl2"&&(this.fallbackNotice=this.shader.trim()?"WebGL2 (fallback) — WGSL ignoré, canaux/params OK":"WebGL2 (fallback)"),this.rebuild()),e.has("play")&&this.syncPlayback(),(e.has("dataProvider")||e.has("outDataProvider"))&&(this.bindFormProvider(),this.bindOutPublisher()),e.has("aspectRatio")&&this.applyAspectRatio()}applyAspectRatio(e){const t=this.aspectRatio.trim();if(t){this.style.setProperty("--sonic-webgpu-ar",t.includes("/")?t:t.replace(":"," / "));return}const r=e||this.channel0,i=r?this.runtime?.getTextureSize(r):null;if(i){this.style.setProperty("--sonic-webgpu-ar",`${i.width} / ${i.height}`);return}this.style.removeProperty("--sonic-webgpu-ar")}unbindFormProvider(){yt.unbindFormProvider(this)}bindFormProvider(){yt.bindFormProvider(this)}bindOutPublisher(){yt.bindOutPublisher(this)}applyRemoteMouse(){yt.applyRemoteMouse(this)}ensureRuntime(){return this.runtime||this.releasing?this.boot??Promise.resolve():(this.boot||(this.boot=this.bootRuntime().finally(()=>{this.boot=null})),this.boot)}async bootRuntime(){this.ensureCanvas();const e=$n(this.backendPrefer),t=Ms(this.kernel),r=[];try{let i=null;if(t==="particles")try{i=await pr.create(this.ensureCanvas()),r.push(`particles:${i.backend}`)}catch(h){const b=h instanceof Error?h.message:String(h);throw new Error(`particles:${b}`)}else{const h=()=>{try{return i=zt.create(this.ensureCanvas()),r.push("webgl2:ok"),!0}catch(P){const L=P instanceof Error?P.message:String(P);return r.push(`webgl2:${L}`),console.warn(`${jt} WebGL2 failed:`,L),this.replaceCanvas(),!1}},b=async()=>{if(typeof navigator.gpu>"u")return r.push("webgpu:no-navigator.gpu"),!1;const P=await Ht.probe();if(P)return r.push(`webgpu:probe:${P}`),!1;try{return i=await Ht.create(this.ensureCanvas()),r.push("webgpu:ok"),!0}catch(L){const x=L instanceof Error?L.message:String(L);return r.push(`webgpu:create:${x}`),console.warn(`${jt} WebGPU failed:`,x),this.replaceCanvas(),!1}};if(e==="webgpu"){if(!await b())throw new Error(r.join(" → ")||"WebGPU indisponible")}else if(e==="webgl2"){if(!h())throw new Error(r.join(" → ")||"WebGL2 indisponible")}else if(!(!!this.shader.trim()?await b()||h():h()||await b()))try{i=Cr.create(this.ensureCanvas()),r.push("canvas2d:ok")}catch(x){const _=x instanceof Error?x.message:String(x);throw new Error([...r,`canvas2d:${_}`].join(" → "))}}if(!i)throw new Error(r.join(" → ")||"Aucun backend GPU");if(this.releasing){i.dispose(!0);return}this.runtime=i;const u=i.backend;this.activeBackend=u;let a="";t==="particles"?a=u==="webgpu"?"Compute particles (WebGPU)":"Particles (Canvas2D fallback)":u==="webgl2"&&this.shader.trim()?a="WebGL2 — WGSL ignoré (canaux/params OK)":u==="canvas2d"&&(a=`Canvas2D — ${r.filter(h=>!h.endsWith(":ok")).join(" · ")||"GPU indisponible"}`),this.fallbackNotice=a,this.errorMessage="",console.info(`${jt} backend:`,u,"kernel:",t,r),this.dispatchEvent(new CustomEvent("backend",{detail:{backend:u,prefer:e,kernel:t,log:r},bubbles:!0,composed:!0})),await this.rebuild()}catch(i){this.errorMessage=i instanceof Error?i.message:String(i),this.activeBackend="",this.fallbackNotice="",console.error(`${jt} boot failed:`,this.errorMessage,r),this.dispatchEvent(new CustomEvent("error",{detail:{message:this.errorMessage,log:r},bubbles:!0,composed:!0}))}}ensureCanvas(){if(this.canvasEl?.isConnected)return this.canvasEl;const e=this.renderRoot.querySelector(".stage")??this.renderRoot;let t=e.querySelector?.("canvas");return t||(t=document.createElement("canvas"),t.setAttribute("part","canvas"),e.appendChild(t)),t.style.touchAction="none",t.style.cursor=this.mouse?"crosshair":"default",this.canvasEl=t,t}replaceCanvas(){const e=this.renderRoot.querySelector(".stage")??this.renderRoot;this.canvasEl?.parentNode&&this.canvasEl.parentNode.removeChild(this.canvasEl);const t=document.createElement("canvas");return t.setAttribute("part","canvas"),e.appendChild(t),this.canvasEl=t,t}releaseRuntime(){this.stopLoop(),this.ready=!1,this.runtime?.dispose(!0),this.runtime=null,this.canvasEl?.parentNode&&this.canvasEl.parentNode.removeChild(this.canvasEl),this.canvasEl=null}async rebuild(){if(!this.runtime)return;const e=++this.rebuildToken;this.ready=!1;try{if(await this.runtime.setShader(this.shader),e!==this.rebuildToken||(this.runtime instanceof zt?await this.runtime.setChannels([this.channel0,this.channel1,this.channel2,this.channel3]):await Promise.all([this.runtime.setChannel(0,this.channel0),this.runtime.setChannel(1,this.channel1),this.runtime.setChannel(2,this.channel2),this.runtime.setChannel(3,this.channel3)]),e!==this.rebuildToken))return;this.errorMessage="",this.ready=!0,this.syncSize(),this.applyAspectRatio(this.channel0),this.startTime=performance.now(),this.frame=0,this.syncPlayback()}catch(t){const r=t instanceof Wt?t.infoLog?`${t.message}
|
|
247
|
-
${t.infoLog}`:t.message:t instanceof Error?t.message:String(t);this.errorMessage=r,this.dispatchEvent(new CustomEvent("error",{detail:{message:r,infoLog:t instanceof Wt?t.infoLog:void 0},bubbles:!0,composed:!0}))}}syncSize(){if(!this.runtime)return;const e=this.getBoundingClientRect(),t=Math.min(typeof devicePixelRatio=="number"?devicePixelRatio:1,Number.isFinite(this.dprMax)&&this.dprMax>0?this.dprMax:2);this.runtime.resize(e.width*t,e.height*t)}syncVisibility(){if(!this.inView&&this.releaseOffscreen){this.stopLoop();return}if(!this.runtime){this.ensureRuntime();return}this.syncSize(),this.syncPlayback()}shouldPlay(){return!!this.play&&!!this.runtime&&this.ready&&!this.errorMessage&&!vs()&&(this.inView||!this.releaseOffscreen)}syncPlayback(){!this.ready||!this.runtime||(this.shouldPlay()?this.startLoop():this.stopLoop())}startLoop(){if(this.raf)return;const e=t=>{if(this.raf=0,this.runtime&&this.ready){this.syncSize();const r=this.runtime.canvas.width,i=this.runtime.canvas.height;if(r>=2&&i>=2)try{this.startTime||(this.startTime=t);const u=(t-this.startTime)/1e3;this.applyRemoteMouse(),this.runtime.draw({width:r,height:i,time:u,frame:this.frame,mouse:this.mouseVec,params:[this.param0,this.param1,this.param2,this.param3]}),this.frame++,this.frameSeq++,this.maybePublishOut(t,u)}catch(u){console.warn(`${jt} frame skip:`,u)}}this.shouldPlay()&&(this.raf=requestAnimationFrame(e))};this.raf=requestAnimationFrame(e)}stopLoop(){this.raf&&(cancelAnimationFrame(this.raf),this.raf=0)}maybePublishOut(e,t){zn.maybePublishOut(this,e,t)}getFrameCanvas(){return!this.ready||this.errorMessage?null:this.canvasEl}revokeFrameUrl(){zn.revokeFrameUrl(this)}render(){return Pr`
|
|
248
|
-
<div class="stage" part="stage"></div>
|
|
249
|
-
${this.errorMessage?Pr`<div class="err" part="error">${this.errorMessage}</div>`:this.fallbackNotice?Pr`<div class="notice" part="notice">${this.fallbackNotice}</div>`:null}
|
|
250
|
-
`}},ue.SonicWebGpu.styles=Qn`
|
|
251
|
-
:host {
|
|
252
|
-
display: block;
|
|
253
|
-
position: relative;
|
|
254
|
-
width: 100%;
|
|
255
|
-
max-width: 100%;
|
|
256
|
-
height: auto;
|
|
257
|
-
aspect-ratio: var(--sonic-webgpu-ar, 16 / 9);
|
|
258
|
-
overflow: hidden;
|
|
259
|
-
background: #0a0a0a;
|
|
260
|
-
color: #f87171;
|
|
261
|
-
font: 12px/1.4 ui-monospace, monospace;
|
|
262
|
-
}
|
|
263
|
-
canvas {
|
|
264
|
-
position: absolute;
|
|
265
|
-
inset: 0;
|
|
266
|
-
width: 100%;
|
|
267
|
-
height: 100%;
|
|
268
|
-
display: block;
|
|
269
|
-
touch-action: none;
|
|
270
|
-
}
|
|
271
|
-
.stage {
|
|
272
|
-
position: absolute;
|
|
273
|
-
inset: 0;
|
|
274
|
-
}
|
|
275
|
-
.err {
|
|
276
|
-
position: absolute;
|
|
277
|
-
inset: 0;
|
|
278
|
-
z-index: 1;
|
|
279
|
-
padding: 0.75rem;
|
|
280
|
-
background: rgba(0, 0, 0, 0.85);
|
|
281
|
-
white-space: pre-wrap;
|
|
282
|
-
overflow: auto;
|
|
283
|
-
}
|
|
284
|
-
.notice {
|
|
285
|
-
position: absolute;
|
|
286
|
-
left: 0.5rem;
|
|
287
|
-
bottom: 0.5rem;
|
|
288
|
-
z-index: 1;
|
|
289
|
-
padding: 0.25rem 0.5rem;
|
|
290
|
-
border-radius: 0.25rem;
|
|
291
|
-
background: rgba(0, 0, 0, 0.65);
|
|
292
|
-
color: #fbbf24;
|
|
293
|
-
font-size: 11px;
|
|
294
|
-
pointer-events: none;
|
|
295
|
-
}
|
|
296
|
-
`,Te([Re()],ue.SonicWebGpu.prototype,"shader",2),Te([Re({type:String})],ue.SonicWebGpu.prototype,"kernel",2),Te([Re({type:String,attribute:"backend"})],ue.SonicWebGpu.prototype,"backendPrefer",2),Te([Re({type:String,reflect:!0,attribute:"active-backend"})],ue.SonicWebGpu.prototype,"activeBackend",2),Te([Re()],ue.SonicWebGpu.prototype,"channel0",2),Te([Re()],ue.SonicWebGpu.prototype,"channel1",2),Te([Re()],ue.SonicWebGpu.prototype,"channel2",2),Te([Re()],ue.SonicWebGpu.prototype,"channel3",2),Te([Re({type:Boolean,reflect:!0})],ue.SonicWebGpu.prototype,"play",2),Te([Re({type:Boolean})],ue.SonicWebGpu.prototype,"mouse",2),Te([Re({type:Boolean,attribute:"release-offscreen"})],ue.SonicWebGpu.prototype,"releaseOffscreen",2),Te([Re({type:Number,attribute:"dpr-max"})],ue.SonicWebGpu.prototype,"dprMax",2),Te([Re({type:Number,attribute:"param0"})],ue.SonicWebGpu.prototype,"param0",2),Te([Re({type:Number,attribute:"param1"})],ue.SonicWebGpu.prototype,"param1",2),Te([Re({type:Number,attribute:"param2"})],ue.SonicWebGpu.prototype,"param2",2),Te([Re({type:Number,attribute:"param3"})],ue.SonicWebGpu.prototype,"param3",2),Te([Re({type:String})],ue.SonicWebGpu.prototype,"dataProvider",2),Te([Re({type:String,attribute:"out-data-provider"})],ue.SonicWebGpu.prototype,"outDataProvider",2),Te([Re({type:Number,attribute:"out-interval"})],ue.SonicWebGpu.prototype,"outInterval",2),Te([Re({type:Boolean,attribute:"frame-out"})],ue.SonicWebGpu.prototype,"frameOut",2),Te([Re({type:String,attribute:"aspect-ratio"})],ue.SonicWebGpu.prototype,"aspectRatio",2),Te([hn()],ue.SonicWebGpu.prototype,"errorMessage",2),Te([hn()],ue.SonicWebGpu.prototype,"fallbackNotice",2),ue.SonicWebGpu=Te([Ei(Ks)],ue.SonicWebGpu),ue.DEFAULT_MAIN_IMAGE=Nn,ue.WebGl2FallbackRuntime=zt,ue.WebGpuCompileError=Wt,ue.WebGpuRuntime=Ht,ue.buildWgslSource=In,ue.parseBackendPrefer=$n,Object.defineProperty(ue,Symbol.toStringTag,{value:"Module"}),ue})({});
|