@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.
Files changed (1045) hide show
  1. package/README.md +17 -34
  2. package/build-infos.json +1 -1
  3. package/concorde-3d.bundle.js +201 -152
  4. package/concorde-3d.es.js +14687 -13905
  5. package/concorde-core.bundle.js +311 -293
  6. package/concorde-core.es.js +5195 -5129
  7. package/concorde-hugging-face-infer.bundle.js +1 -1
  8. package/concorde-hugging-face-infer.es.js +1 -1
  9. package/concorde-shader.bundle.js +31 -20
  10. package/concorde-shader.es.js +2773 -2547
  11. package/concorde-webgpu.bundle.js +43 -32
  12. package/concorde-webgpu.es.js +1819 -1553
  13. package/dist/concorde-core.bundle.js +311 -293
  14. package/dist/concorde-core.es.js +5195 -5129
  15. package/dist/docs-mock-api-sw.js +5 -1
  16. package/dist/docs-mock-api-sw.js.map +2 -2
  17. package/package.json +384 -1790
  18. package/public/docs-mock-api-sw.js +5 -1
  19. package/public/docs-mock-api-sw.js.map +2 -2
  20. package/scripts/post-build.mjs +10 -116
  21. package/scripts/pre-build.mjs +36 -119
  22. package/scripts/pre-publish.mjs +54 -76
  23. package/src/core/components/functional/jsonata/jsonata.md +2 -4
  24. package/src/core/components/functional/sdui/sdui.md +2 -2
  25. package/src/core/components/functional/sdui/sdui.ts +29 -40
  26. package/src/core/components/ui/button/button.ts +1 -2
  27. package/src/core/components/ui/form/checkbox/checkbox.md +1 -1
  28. package/src/core/components/ui/form/checkbox/checkbox.ts +4 -20
  29. package/src/core/components/ui/form/input/input.ts +7 -13
  30. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.md +14 -118
  31. package/src/core/components/ui/form/input-autocomplete/input-autocomplete.ts +419 -187
  32. package/src/core/components/ui/form/radio/radio.ts +1 -1
  33. package/src/core/components/ui/form/select/select.ts +3 -6
  34. package/src/core/components/ui/form/textarea/textarea.ts +1 -2
  35. package/src/core/components/ui/pop/pop.ts +9 -0
  36. package/src/core/components/ui/toast/render-content.ts +13 -0
  37. package/src/core/components/ui/toast/toast-item.ts +40 -12
  38. package/src/core/components/ui/toast/toast.ts +54 -14
  39. package/src/core/components/ui/toast/types.ts +14 -2
  40. package/src/core/decorators/subscriber/derive.ts +3 -3
  41. package/src/core/mixins/Fetcher.ts +1 -1
  42. package/src/core/mixins/FormCheckable.ts +1 -8
  43. package/src/core/mixins/FormElement.ts +74 -76
  44. package/src/core/utils/HTML.ts +74 -107
  45. package/src/core/utils/PublisherProxy.ts +6 -29
  46. package/src/core/utils/jsonataHelpers.ts +0 -36
  47. package/src/docs/_core-concept/dataFlow.md +1 -3
  48. package/src/docs/_getting-started/create-a-component.md +1 -1
  49. package/src/docs/_misc/formelement-subscriber-removal.md +115 -0
  50. package/src/docs/_misc/html-integration.md +2 -0
  51. package/src/docs/components/docs-demo-sources.ts +79 -353
  52. package/src/docs/docs.ts +1 -7
  53. package/src/docs/example/docs-input-autocomplete-demos.ts +110 -0
  54. package/src/docs/mock-api/router.ts +17 -1
  55. package/src/docs/navigation/navigation.ts +4 -25
  56. package/src/docs/search/docs-search.json +884 -2354
  57. package/src/tsconfig.json +313 -490
  58. package/src/tsconfig.tsbuildinfo +1 -1
  59. package/vite/config.js +30 -42
  60. package/vite.config.mts +12 -51
  61. package/dist/concorde-3d.bundle.js +0 -3911
  62. package/dist/concorde-3d.es.js +0 -32651
  63. package/dist/concorde-hugging-face-infer.bundle.js +0 -32
  64. package/dist/concorde-hugging-face-infer.es.js +0 -2952
  65. package/dist/concorde-shader.bundle.js +0 -105
  66. package/dist/concorde-shader.es.js +0 -8127
  67. package/dist/concorde-webgpu.bundle.js +0 -296
  68. package/dist/concorde-webgpu.es.js +0 -8361
  69. package/dist/docs/hf-samples/beach.jpg +0 -0
  70. package/dist/docs/hf-samples/cats.jpg +0 -0
  71. package/dist/docs/hf-samples/corgi.jpg +0 -0
  72. package/dist/docs/hf-samples/portrait.jpg +0 -0
  73. package/dist/docs/hf-samples/scene.jpg +0 -0
  74. package/dist/docs/hf-samples/singer.jpg +0 -0
  75. package/dist/docs/shader-samples/color.jpg +0 -0
  76. package/dist/docs/shader-samples/depth.png +0 -0
  77. package/dist/docs/shader-samples/impact.jpg +0 -0
  78. package/dist/docs/shader-samples/video.webm +0 -0
  79. package/dist/js/addons/3d.js +0 -6
  80. package/dist/js/addons/3d.js.map +0 -1
  81. package/dist/js/addons/hugging-face-infer.js +0 -8
  82. package/dist/js/addons/hugging-face-infer.js.map +0 -1
  83. package/dist/js/addons/shader.js +0 -6
  84. package/dist/js/addons/shader.js.map +0 -1
  85. package/dist/js/addons/webgpu.js +0 -7
  86. package/dist/js/addons/webgpu.js.map +0 -1
  87. package/dist/js/components.js +0 -12
  88. package/dist/js/components.js.map +0 -1
  89. package/dist/js/concorde-loaded.js +0 -5
  90. package/dist/js/concorde-loaded.js.map +0 -1
  91. package/dist/js/core/_types/endpoint.js +0 -5
  92. package/dist/js/core/_types/endpoint.js.map +0 -1
  93. package/dist/js/core/_types/key.js +0 -2
  94. package/dist/js/core/_types/key.js.map +0 -1
  95. package/dist/js/core/_types/types.js +0 -3
  96. package/dist/js/core/_types/types.js.map +0 -1
  97. package/dist/js/core/components/functional/3d/3d.js +0 -161
  98. package/dist/js/core/components/functional/3d/3d.js.map +0 -1
  99. package/dist/js/core/components/functional/3d/asset.js +0 -20
  100. package/dist/js/core/components/functional/3d/asset.js.map +0 -1
  101. package/dist/js/core/components/functional/3d/boot.js +0 -47
  102. package/dist/js/core/components/functional/3d/boot.js.map +0 -1
  103. package/dist/js/core/components/functional/3d/constants.js +0 -90
  104. package/dist/js/core/components/functional/3d/constants.js.map +0 -1
  105. package/dist/js/core/components/functional/3d/demo-content.js +0 -38
  106. package/dist/js/core/components/functional/3d/demo-content.js.map +0 -1
  107. package/dist/js/core/components/functional/3d/ensure.js +0 -73
  108. package/dist/js/core/components/functional/3d/ensure.js.map +0 -1
  109. package/dist/js/core/components/functional/3d/form-bind.js +0 -25
  110. package/dist/js/core/components/functional/3d/form-bind.js.map +0 -1
  111. package/dist/js/core/components/functional/3d/form-fields.js +0 -76
  112. package/dist/js/core/components/functional/3d/form-fields.js.map +0 -1
  113. package/dist/js/core/components/functional/3d/form-params.js +0 -67
  114. package/dist/js/core/components/functional/3d/form-params.js.map +0 -1
  115. package/dist/js/core/components/functional/3d/frame-capture.js +0 -108
  116. package/dist/js/core/components/functional/3d/frame-capture.js.map +0 -1
  117. package/dist/js/core/components/functional/3d/frame-source.js +0 -22
  118. package/dist/js/core/components/functional/3d/frame-source.js.map +0 -1
  119. package/dist/js/core/components/functional/3d/gl.js +0 -34
  120. package/dist/js/core/components/functional/3d/gl.js.map +0 -1
  121. package/dist/js/core/components/functional/3d/life.js +0 -55
  122. package/dist/js/core/components/functional/3d/life.js.map +0 -1
  123. package/dist/js/core/components/functional/3d/load.js +0 -109
  124. package/dist/js/core/components/functional/3d/load.js.map +0 -1
  125. package/dist/js/core/components/functional/3d/ops.js +0 -78
  126. package/dist/js/core/components/functional/3d/ops.js.map +0 -1
  127. package/dist/js/core/components/functional/3d/opts.js +0 -2
  128. package/dist/js/core/components/functional/3d/opts.js.map +0 -1
  129. package/dist/js/core/components/functional/3d/orbit.js +0 -136
  130. package/dist/js/core/components/functional/3d/orbit.js.map +0 -1
  131. package/dist/js/core/components/functional/3d/out-publish.js +0 -103
  132. package/dist/js/core/components/functional/3d/out-publish.js.map +0 -1
  133. package/dist/js/core/components/functional/3d/parse.js +0 -95
  134. package/dist/js/core/components/functional/3d/parse.js.map +0 -1
  135. package/dist/js/core/components/functional/3d/pick.js +0 -62
  136. package/dist/js/core/components/functional/3d/pick.js.map +0 -1
  137. package/dist/js/core/components/functional/3d/playback.js +0 -56
  138. package/dist/js/core/components/functional/3d/playback.js.map +0 -1
  139. package/dist/js/core/components/functional/3d/pointer.js +0 -58
  140. package/dist/js/core/components/functional/3d/pointer.js.map +0 -1
  141. package/dist/js/core/components/functional/3d/props.js +0 -105
  142. package/dist/js/core/components/functional/3d/props.js.map +0 -1
  143. package/dist/js/core/components/functional/3d/publisher-listen.js +0 -6
  144. package/dist/js/core/components/functional/3d/publisher-listen.js.map +0 -1
  145. package/dist/js/core/components/functional/3d/reload.js +0 -63
  146. package/dist/js/core/components/functional/3d/reload.js.map +0 -1
  147. package/dist/js/core/components/functional/3d/runtime.js +0 -116
  148. package/dist/js/core/components/functional/3d/runtime.js.map +0 -1
  149. package/dist/js/core/components/functional/3d/scene-runtime.js +0 -6
  150. package/dist/js/core/components/functional/3d/scene-runtime.js.map +0 -1
  151. package/dist/js/core/components/functional/3d/snapshot.js +0 -47
  152. package/dist/js/core/components/functional/3d/snapshot.js.map +0 -1
  153. package/dist/js/core/components/functional/3d/styles.js +0 -38
  154. package/dist/js/core/components/functional/3d/styles.js.map +0 -1
  155. package/dist/js/core/components/functional/3d/tune.js +0 -42
  156. package/dist/js/core/components/functional/3d/tune.js.map +0 -1
  157. package/dist/js/core/components/functional/3d/types.js +0 -8
  158. package/dist/js/core/components/functional/3d/types.js.map +0 -1
  159. package/dist/js/core/components/functional/3d/updated.js +0 -58
  160. package/dist/js/core/components/functional/3d/updated.js.map +0 -1
  161. package/dist/js/core/components/functional/3d/view.js +0 -40
  162. package/dist/js/core/components/functional/3d/view.js.map +0 -1
  163. package/dist/js/core/components/functional/3d/wire.js +0 -34
  164. package/dist/js/core/components/functional/3d/wire.js.map +0 -1
  165. package/dist/js/core/components/functional/date/date.js +0 -272
  166. package/dist/js/core/components/functional/date/date.js.map +0 -1
  167. package/dist/js/core/components/functional/example/example.js +0 -44
  168. package/dist/js/core/components/functional/example/example.js.map +0 -1
  169. package/dist/js/core/components/functional/fetch/fetch.js +0 -79
  170. package/dist/js/core/components/functional/fetch/fetch.js.map +0 -1
  171. package/dist/js/core/components/functional/functional.js +0 -18
  172. package/dist/js/core/components/functional/functional.js.map +0 -1
  173. package/dist/js/core/components/functional/if/if.js +0 -39
  174. package/dist/js/core/components/functional/if/if.js.map +0 -1
  175. package/dist/js/core/components/functional/infer/hugging-face/hf-cache.js +0 -183
  176. package/dist/js/core/components/functional/infer/hugging-face/hf-cache.js.map +0 -1
  177. package/dist/js/core/components/functional/infer/hugging-face/hf-config.js +0 -50
  178. package/dist/js/core/components/functional/infer/hugging-face/hf-config.js.map +0 -1
  179. package/dist/js/core/components/functional/infer/hugging-face/hf-controller.js +0 -460
  180. package/dist/js/core/components/functional/infer/hugging-face/hf-controller.js.map +0 -1
  181. package/dist/js/core/components/functional/infer/hugging-face/hf-engine.js +0 -116
  182. package/dist/js/core/components/functional/infer/hugging-face/hf-engine.js.map +0 -1
  183. package/dist/js/core/components/functional/infer/hugging-face/hf-input.js +0 -170
  184. package/dist/js/core/components/functional/infer/hugging-face/hf-input.js.map +0 -1
  185. package/dist/js/core/components/functional/infer/hugging-face/hf-protocol.js +0 -2
  186. package/dist/js/core/components/functional/infer/hugging-face/hf-protocol.js.map +0 -1
  187. package/dist/js/core/components/functional/infer/hugging-face/hf-registry.js +0 -367
  188. package/dist/js/core/components/functional/infer/hugging-face/hf-registry.js.map +0 -1
  189. package/dist/js/core/components/functional/infer/hugging-face/hf-schema.js +0 -288
  190. package/dist/js/core/components/functional/infer/hugging-face/hf-schema.js.map +0 -1
  191. package/dist/js/core/components/functional/infer/hugging-face/hf-worker-runtime.js +0 -309
  192. package/dist/js/core/components/functional/infer/hugging-face/hf-worker-runtime.js.map +0 -1
  193. package/dist/js/core/components/functional/infer/hugging-face/hugging-face-infer.js +0 -213
  194. package/dist/js/core/components/functional/infer/hugging-face/hugging-face-infer.js.map +0 -1
  195. package/dist/js/core/components/functional/infer/hugging-face/hugging-face.js +0 -76
  196. package/dist/js/core/components/functional/infer/hugging-face/hugging-face.js.map +0 -1
  197. package/dist/js/core/components/functional/infer/hugging-face/types.js +0 -62
  198. package/dist/js/core/components/functional/infer/hugging-face/types.js.map +0 -1
  199. package/dist/js/core/components/functional/jsonata/jsonata.js +0 -119
  200. package/dist/js/core/components/functional/jsonata/jsonata.js.map +0 -1
  201. package/dist/js/core/components/functional/list/list.js +0 -341
  202. package/dist/js/core/components/functional/list/list.js.map +0 -1
  203. package/dist/js/core/components/functional/mix/mix.js +0 -103
  204. package/dist/js/core/components/functional/mix/mix.js.map +0 -1
  205. package/dist/js/core/components/functional/queue/queue.js +0 -450
  206. package/dist/js/core/components/functional/queue/queue.js.map +0 -1
  207. package/dist/js/core/components/functional/router/redirect.js +0 -54
  208. package/dist/js/core/components/functional/router/redirect.js.map +0 -1
  209. package/dist/js/core/components/functional/router/router.js +0 -179
  210. package/dist/js/core/components/functional/router/router.js.map +0 -1
  211. package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js +0 -216
  212. package/dist/js/core/components/functional/sdui/SDUIDescriptorTransformer.js.map +0 -1
  213. package/dist/js/core/components/functional/sdui/default-library.json +0 -108
  214. package/dist/js/core/components/functional/sdui/sdui-utils.js +0 -64
  215. package/dist/js/core/components/functional/sdui/sdui-utils.js.map +0 -1
  216. package/dist/js/core/components/functional/sdui/sdui.js +0 -271
  217. package/dist/js/core/components/functional/sdui/sdui.js.map +0 -1
  218. package/dist/js/core/components/functional/sdui/types.js +0 -2
  219. package/dist/js/core/components/functional/sdui/types.js.map +0 -1
  220. package/dist/js/core/components/functional/shader/gl-runtime.js +0 -738
  221. package/dist/js/core/components/functional/shader/gl-runtime.js.map +0 -1
  222. package/dist/js/core/components/functional/shader/shader.js +0 -1642
  223. package/dist/js/core/components/functional/shader/shader.js.map +0 -1
  224. package/dist/js/core/components/functional/shader/shadertoy-prelude.js +0 -48
  225. package/dist/js/core/components/functional/shader/shadertoy-prelude.js.map +0 -1
  226. package/dist/js/core/components/functional/shader/types.js +0 -179
  227. package/dist/js/core/components/functional/shader/types.js.map +0 -1
  228. package/dist/js/core/components/functional/sonic-scope/sonic-scope.js +0 -22
  229. package/dist/js/core/components/functional/sonic-scope/sonic-scope.js.map +0 -1
  230. package/dist/js/core/components/functional/states/states.js +0 -172
  231. package/dist/js/core/components/functional/states/states.js.map +0 -1
  232. package/dist/js/core/components/functional/submit/submit.js +0 -284
  233. package/dist/js/core/components/functional/submit/submit.js.map +0 -1
  234. package/dist/js/core/components/functional/subscriber/subscriber.js +0 -39
  235. package/dist/js/core/components/functional/subscriber/subscriber.js.map +0 -1
  236. package/dist/js/core/components/functional/translation/translation.js +0 -28
  237. package/dist/js/core/components/functional/translation/translation.js.map +0 -1
  238. package/dist/js/core/components/functional/value/value.js +0 -28
  239. package/dist/js/core/components/functional/value/value.js.map +0 -1
  240. package/dist/js/core/components/functional/webgpu/canvas2d-fallback.js +0 -117
  241. package/dist/js/core/components/functional/webgpu/canvas2d-fallback.js.map +0 -1
  242. package/dist/js/core/components/functional/webgpu/form-bind.js +0 -92
  243. package/dist/js/core/components/functional/webgpu/form-bind.js.map +0 -1
  244. package/dist/js/core/components/functional/webgpu/gl-fallback.js +0 -135
  245. package/dist/js/core/components/functional/webgpu/gl-fallback.js.map +0 -1
  246. package/dist/js/core/components/functional/webgpu/gpu-runtime.js +0 -305
  247. package/dist/js/core/components/functional/webgpu/gpu-runtime.js.map +0 -1
  248. package/dist/js/core/components/functional/webgpu/helpers.js +0 -44
  249. package/dist/js/core/components/functional/webgpu/helpers.js.map +0 -1
  250. package/dist/js/core/components/functional/webgpu/out-frame.js +0 -117
  251. package/dist/js/core/components/functional/webgpu/out-frame.js.map +0 -1
  252. package/dist/js/core/components/functional/webgpu/particles-runtime.js +0 -407
  253. package/dist/js/core/components/functional/webgpu/particles-runtime.js.map +0 -1
  254. package/dist/js/core/components/functional/webgpu/pointer.js +0 -56
  255. package/dist/js/core/components/functional/webgpu/pointer.js.map +0 -1
  256. package/dist/js/core/components/functional/webgpu/types.js +0 -24
  257. package/dist/js/core/components/functional/webgpu/types.js.map +0 -1
  258. package/dist/js/core/components/functional/webgpu/webgpu.js +0 -676
  259. package/dist/js/core/components/functional/webgpu/webgpu.js.map +0 -1
  260. package/dist/js/core/components/functional/webgpu/wgsl-prelude.js +0 -77
  261. package/dist/js/core/components/functional/webgpu/wgsl-prelude.js.map +0 -1
  262. package/dist/js/core/components/ui/_css/scroll.js +0 -27
  263. package/dist/js/core/components/ui/_css/scroll.js.map +0 -1
  264. package/dist/js/core/components/ui/_css/shadow.js +0 -22
  265. package/dist/js/core/components/ui/_css/shadow.js.map +0 -1
  266. package/dist/js/core/components/ui/_css/size.js +0 -36
  267. package/dist/js/core/components/ui/_css/size.js.map +0 -1
  268. package/dist/js/core/components/ui/_css/type.js +0 -92
  269. package/dist/js/core/components/ui/_css/type.js.map +0 -1
  270. package/dist/js/core/components/ui/alert/alert.js +0 -213
  271. package/dist/js/core/components/ui/alert/alert.js.map +0 -1
  272. package/dist/js/core/components/ui/alert-messages/alert-messages.js +0 -68
  273. package/dist/js/core/components/ui/alert-messages/alert-messages.js.map +0 -1
  274. package/dist/js/core/components/ui/badge/badge.js +0 -199
  275. package/dist/js/core/components/ui/badge/badge.js.map +0 -1
  276. package/dist/js/core/components/ui/button/button.js +0 -697
  277. package/dist/js/core/components/ui/button/button.js.map +0 -1
  278. package/dist/js/core/components/ui/captcha/altchaStyles.js +0 -226
  279. package/dist/js/core/components/ui/captcha/altchaStyles.js.map +0 -1
  280. package/dist/js/core/components/ui/captcha/captcha.js +0 -167
  281. package/dist/js/core/components/ui/captcha/captcha.js.map +0 -1
  282. package/dist/js/core/components/ui/card/card-footer.js +0 -26
  283. package/dist/js/core/components/ui/card/card-footer.js.map +0 -1
  284. package/dist/js/core/components/ui/card/card-header-descripton.js +0 -30
  285. package/dist/js/core/components/ui/card/card-header-descripton.js.map +0 -1
  286. package/dist/js/core/components/ui/card/card-header.js +0 -79
  287. package/dist/js/core/components/ui/card/card-header.js.map +0 -1
  288. package/dist/js/core/components/ui/card/card-main.js +0 -26
  289. package/dist/js/core/components/ui/card/card-main.js.map +0 -1
  290. package/dist/js/core/components/ui/card/card.js +0 -67
  291. package/dist/js/core/components/ui/card/card.js.map +0 -1
  292. package/dist/js/core/components/ui/divider/divider.js +0 -200
  293. package/dist/js/core/components/ui/divider/divider.js.map +0 -1
  294. package/dist/js/core/components/ui/form/checkbox/checkbox.js +0 -257
  295. package/dist/js/core/components/ui/form/checkbox/checkbox.js.map +0 -1
  296. package/dist/js/core/components/ui/form/css/form-control.js +0 -393
  297. package/dist/js/core/components/ui/form/css/form-control.js.map +0 -1
  298. package/dist/js/core/components/ui/form/fieldset/fieldset.js +0 -124
  299. package/dist/js/core/components/ui/form/fieldset/fieldset.js.map +0 -1
  300. package/dist/js/core/components/ui/form/fieldset/legend-description.js +0 -38
  301. package/dist/js/core/components/ui/form/fieldset/legend-description.js.map +0 -1
  302. package/dist/js/core/components/ui/form/fieldset/legend.js +0 -130
  303. package/dist/js/core/components/ui/form/fieldset/legend.js.map +0 -1
  304. package/dist/js/core/components/ui/form/form-actions/form-actions.js +0 -47
  305. package/dist/js/core/components/ui/form/form-actions/form-actions.js.map +0 -1
  306. package/dist/js/core/components/ui/form/form-layout/form-layout.js +0 -84
  307. package/dist/js/core/components/ui/form/form-layout/form-layout.js.map +0 -1
  308. package/dist/js/core/components/ui/form/input/input.js +0 -316
  309. package/dist/js/core/components/ui/form/input/input.js.map +0 -1
  310. package/dist/js/core/components/ui/form/input/password-helper.js +0 -134
  311. package/dist/js/core/components/ui/form/input/password-helper.js.map +0 -1
  312. package/dist/js/core/components/ui/form/input/same-value-helper.js +0 -85
  313. package/dist/js/core/components/ui/form/input/same-value-helper.js.map +0 -1
  314. package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js +0 -405
  315. package/dist/js/core/components/ui/form/input-autocomplete/input-autocomplete.js.map +0 -1
  316. package/dist/js/core/components/ui/form/radio/radio.js +0 -63
  317. package/dist/js/core/components/ui/form/radio/radio.js.map +0 -1
  318. package/dist/js/core/components/ui/form/select/select.js +0 -323
  319. package/dist/js/core/components/ui/form/select/select.js.map +0 -1
  320. package/dist/js/core/components/ui/form/switch/switch.js +0 -90
  321. package/dist/js/core/components/ui/form/switch/switch.js.map +0 -1
  322. package/dist/js/core/components/ui/form/textarea/textarea.js +0 -162
  323. package/dist/js/core/components/ui/form/textarea/textarea.js.map +0 -1
  324. package/dist/js/core/components/ui/group/group.js +0 -128
  325. package/dist/js/core/components/ui/group/group.js.map +0 -1
  326. package/dist/js/core/components/ui/icon/icon.js +0 -145
  327. package/dist/js/core/components/ui/icon/icon.js.map +0 -1
  328. package/dist/js/core/components/ui/icon/icons.js +0 -184
  329. package/dist/js/core/components/ui/icon/icons.js.map +0 -1
  330. package/dist/js/core/components/ui/icon/icons.json +0 -1
  331. package/dist/js/core/components/ui/image/image.js +0 -160
  332. package/dist/js/core/components/ui/image/image.js.map +0 -1
  333. package/dist/js/core/components/ui/link/link.js +0 -125
  334. package/dist/js/core/components/ui/link/link.js.map +0 -1
  335. package/dist/js/core/components/ui/loader/loader.js +0 -106
  336. package/dist/js/core/components/ui/loader/loader.js.map +0 -1
  337. package/dist/js/core/components/ui/loader/styles/fixed.js +0 -56
  338. package/dist/js/core/components/ui/loader/styles/fixed.js.map +0 -1
  339. package/dist/js/core/components/ui/loader/styles/inline.js +0 -70
  340. package/dist/js/core/components/ui/loader/styles/inline.js.map +0 -1
  341. package/dist/js/core/components/ui/menu/menu-item.js +0 -35
  342. package/dist/js/core/components/ui/menu/menu-item.js.map +0 -1
  343. package/dist/js/core/components/ui/menu/menu.js +0 -436
  344. package/dist/js/core/components/ui/menu/menu.js.map +0 -1
  345. package/dist/js/core/components/ui/modal/modal-actions.js +0 -44
  346. package/dist/js/core/components/ui/modal/modal-actions.js.map +0 -1
  347. package/dist/js/core/components/ui/modal/modal-close.js +0 -56
  348. package/dist/js/core/components/ui/modal/modal-close.js.map +0 -1
  349. package/dist/js/core/components/ui/modal/modal-content.js +0 -27
  350. package/dist/js/core/components/ui/modal/modal-content.js.map +0 -1
  351. package/dist/js/core/components/ui/modal/modal-subtitle.js +0 -34
  352. package/dist/js/core/components/ui/modal/modal-subtitle.js.map +0 -1
  353. package/dist/js/core/components/ui/modal/modal-title.js +0 -35
  354. package/dist/js/core/components/ui/modal/modal-title.js.map +0 -1
  355. package/dist/js/core/components/ui/modal/modal-utils.js +0 -32
  356. package/dist/js/core/components/ui/modal/modal-utils.js.map +0 -1
  357. package/dist/js/core/components/ui/modal/modal.js +0 -568
  358. package/dist/js/core/components/ui/modal/modal.js.map +0 -1
  359. package/dist/js/core/components/ui/pop/pop.js +0 -337
  360. package/dist/js/core/components/ui/pop/pop.js.map +0 -1
  361. package/dist/js/core/components/ui/progress/progress.js +0 -164
  362. package/dist/js/core/components/ui/progress/progress.js.map +0 -1
  363. package/dist/js/core/components/ui/table/table-caption.js +0 -29
  364. package/dist/js/core/components/ui/table/table-caption.js.map +0 -1
  365. package/dist/js/core/components/ui/table/table-tbody.js +0 -41
  366. package/dist/js/core/components/ui/table/table-tbody.js.map +0 -1
  367. package/dist/js/core/components/ui/table/table-td.js +0 -69
  368. package/dist/js/core/components/ui/table/table-td.js.map +0 -1
  369. package/dist/js/core/components/ui/table/table-tfoot.js +0 -28
  370. package/dist/js/core/components/ui/table/table-tfoot.js.map +0 -1
  371. package/dist/js/core/components/ui/table/table-th.js +0 -80
  372. package/dist/js/core/components/ui/table/table-th.js.map +0 -1
  373. package/dist/js/core/components/ui/table/table-thead.js +0 -26
  374. package/dist/js/core/components/ui/table/table-thead.js.map +0 -1
  375. package/dist/js/core/components/ui/table/table-tr.js +0 -67
  376. package/dist/js/core/components/ui/table/table-tr.js.map +0 -1
  377. package/dist/js/core/components/ui/table/table.js +0 -106
  378. package/dist/js/core/components/ui/table/table.js.map +0 -1
  379. package/dist/js/core/components/ui/theme/theme-collection/core-variables.js +0 -74
  380. package/dist/js/core/components/ui/theme/theme-collection/core-variables.js.map +0 -1
  381. package/dist/js/core/components/ui/theme/theme-collection/dark.js +0 -39
  382. package/dist/js/core/components/ui/theme/theme-collection/dark.js.map +0 -1
  383. package/dist/js/core/components/ui/theme/theme-collection/light.js +0 -32
  384. package/dist/js/core/components/ui/theme/theme-collection/light.js.map +0 -1
  385. package/dist/js/core/components/ui/theme/theme.js +0 -150
  386. package/dist/js/core/components/ui/theme/theme.js.map +0 -1
  387. package/dist/js/core/components/ui/toast/message-subscriber.js +0 -41
  388. package/dist/js/core/components/ui/toast/message-subscriber.js.map +0 -1
  389. package/dist/js/core/components/ui/toast/toast-item.js +0 -379
  390. package/dist/js/core/components/ui/toast/toast-item.js.map +0 -1
  391. package/dist/js/core/components/ui/toast/toast.js +0 -269
  392. package/dist/js/core/components/ui/toast/toast.js.map +0 -1
  393. package/dist/js/core/components/ui/toast/types.js +0 -2
  394. package/dist/js/core/components/ui/toast/types.js.map +0 -1
  395. package/dist/js/core/components/ui/tooltip/tooltip.js +0 -219
  396. package/dist/js/core/components/ui/tooltip/tooltip.js.map +0 -1
  397. package/dist/js/core/components/ui/ui.js +0 -41
  398. package/dist/js/core/components/ui/ui.js.map +0 -1
  399. package/dist/js/core/core.js +0 -14
  400. package/dist/js/core/core.js.map +0 -1
  401. package/dist/js/core/decorators/Subscriber.js +0 -10
  402. package/dist/js/core/decorators/Subscriber.js.map +0 -1
  403. package/dist/js/core/decorators/api.js +0 -806
  404. package/dist/js/core/decorators/api.js.map +0 -1
  405. package/dist/js/core/decorators/lifecycle.js +0 -67
  406. package/dist/js/core/decorators/lifecycle.js.map +0 -1
  407. package/dist/js/core/decorators/subscriber/ancestorAttribute.js +0 -27
  408. package/dist/js/core/decorators/subscriber/ancestorAttribute.js.map +0 -1
  409. package/dist/js/core/decorators/subscriber/autoFill.js +0 -26
  410. package/dist/js/core/decorators/subscriber/autoFill.js.map +0 -1
  411. package/dist/js/core/decorators/subscriber/autoSubscribe.js +0 -46
  412. package/dist/js/core/decorators/subscriber/autoSubscribe.js.map +0 -1
  413. package/dist/js/core/decorators/subscriber/bind.js +0 -150
  414. package/dist/js/core/decorators/subscriber/bind.js.map +0 -1
  415. package/dist/js/core/decorators/subscriber/common.js +0 -44
  416. package/dist/js/core/decorators/subscriber/common.js.map +0 -1
  417. package/dist/js/core/decorators/subscriber/derive.js +0 -60
  418. package/dist/js/core/decorators/subscriber/derive.js.map +0 -1
  419. package/dist/js/core/decorators/subscriber/dynamicPath.js +0 -75
  420. package/dist/js/core/decorators/subscriber/dynamicPath.js.map +0 -1
  421. package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js +0 -138
  422. package/dist/js/core/decorators/subscriber/dynamicPropertyWatch.js.map +0 -1
  423. package/dist/js/core/decorators/subscriber/handle.js +0 -22
  424. package/dist/js/core/decorators/subscriber/handle.js.map +0 -1
  425. package/dist/js/core/decorators/subscriber/onAssign.js +0 -199
  426. package/dist/js/core/decorators/subscriber/onAssign.js.map +0 -1
  427. package/dist/js/core/decorators/subscriber/publish.js +0 -108
  428. package/dist/js/core/decorators/subscriber/publish.js.map +0 -1
  429. package/dist/js/core/decorators/subscriber/publisherPath.js +0 -16
  430. package/dist/js/core/decorators/subscriber/publisherPath.js.map +0 -1
  431. package/dist/js/core/decorators/subscriber/subscribe.js +0 -20
  432. package/dist/js/core/decorators/subscriber/subscribe.js.map +0 -1
  433. package/dist/js/core/directives/DataProvider.js +0 -127
  434. package/dist/js/core/directives/DataProvider.js.map +0 -1
  435. package/dist/js/core/directives/Wording.js +0 -221
  436. package/dist/js/core/directives/Wording.js.map +0 -1
  437. package/dist/js/core/mixins/Fetcher.js +0 -325
  438. package/dist/js/core/mixins/Fetcher.js.map +0 -1
  439. package/dist/js/core/mixins/FormCheckable.js +0 -313
  440. package/dist/js/core/mixins/FormCheckable.js.map +0 -1
  441. package/dist/js/core/mixins/FormElement.js +0 -304
  442. package/dist/js/core/mixins/FormElement.js.map +0 -1
  443. package/dist/js/core/mixins/FormInput.js +0 -82
  444. package/dist/js/core/mixins/FormInput.js.map +0 -1
  445. package/dist/js/core/mixins/Subscriber.js +0 -354
  446. package/dist/js/core/mixins/Subscriber.js.map +0 -1
  447. package/dist/js/core/mixins/TemplatesContainer.js +0 -70
  448. package/dist/js/core/mixins/TemplatesContainer.js.map +0 -1
  449. package/dist/js/core/mixins/mixins.js +0 -7
  450. package/dist/js/core/mixins/mixins.js.map +0 -1
  451. package/dist/js/core/utils/AncestorAttributeObserver.js +0 -140
  452. package/dist/js/core/utils/AncestorAttributeObserver.js.map +0 -1
  453. package/dist/js/core/utils/Arrays.js +0 -141
  454. package/dist/js/core/utils/Arrays.js.map +0 -1
  455. package/dist/js/core/utils/DataBindObserver.js +0 -265
  456. package/dist/js/core/utils/DataBindObserver.js.map +0 -1
  457. package/dist/js/core/utils/Electron.js +0 -14
  458. package/dist/js/core/utils/Electron.js.map +0 -1
  459. package/dist/js/core/utils/Format.js +0 -43
  460. package/dist/js/core/utils/Format.js.map +0 -1
  461. package/dist/js/core/utils/HTML.js +0 -307
  462. package/dist/js/core/utils/HTML.js.map +0 -1
  463. package/dist/js/core/utils/LocationHandler.js +0 -143
  464. package/dist/js/core/utils/LocationHandler.js.map +0 -1
  465. package/dist/js/core/utils/Objects.js +0 -111
  466. package/dist/js/core/utils/Objects.js.map +0 -1
  467. package/dist/js/core/utils/PublisherProxy.js +0 -970
  468. package/dist/js/core/utils/PublisherProxy.js.map +0 -1
  469. package/dist/js/core/utils/SafariScrollGuard.js +0 -384
  470. package/dist/js/core/utils/SafariScrollGuard.js.map +0 -1
  471. package/dist/js/core/utils/Utils.js +0 -19
  472. package/dist/js/core/utils/Utils.js.map +0 -1
  473. package/dist/js/core/utils/aesCrypto.js +0 -98
  474. package/dist/js/core/utils/aesCrypto.js.map +0 -1
  475. package/dist/js/core/utils/api.js +0 -595
  476. package/dist/js/core/utils/api.js.map +0 -1
  477. package/dist/js/core/utils/dataProviderKey.js +0 -64
  478. package/dist/js/core/utils/dataProviderKey.js.map +0 -1
  479. package/dist/js/core/utils/derive.js +0 -246
  480. package/dist/js/core/utils/derive.js.map +0 -1
  481. package/dist/js/core/utils/endpoint.js +0 -74
  482. package/dist/js/core/utils/endpoint.js.map +0 -1
  483. package/dist/js/core/utils/jsonataHelpers.js +0 -84
  484. package/dist/js/core/utils/jsonataHelpers.js.map +0 -1
  485. package/dist/js/core/utils/jsonataRuntime.js +0 -75
  486. package/dist/js/core/utils/jsonataRuntime.js.map +0 -1
  487. package/dist/js/core/utils/mediaRef.js +0 -169
  488. package/dist/js/core/utils/mediaRef.js.map +0 -1
  489. package/dist/js/core/utils/route.js +0 -149
  490. package/dist/js/core/utils/route.js.map +0 -1
  491. package/dist/js/core/utils/similarity.js +0 -44
  492. package/dist/js/core/utils/similarity.js.map +0 -1
  493. package/dist/js/core/utils/url-pattern.js +0 -3
  494. package/dist/js/core/utils/url-pattern.js.map +0 -1
  495. package/dist/js/dataprovider.js +0 -2
  496. package/dist/js/dataprovider.js.map +0 -1
  497. package/dist/js/decorators.js +0 -43
  498. package/dist/js/decorators.js.map +0 -1
  499. package/dist/js/directives.js +0 -30
  500. package/dist/js/directives.js.map +0 -1
  501. package/dist/js/index.js +0 -8
  502. package/dist/js/index.js.map +0 -1
  503. package/dist/js/mixins.js +0 -23
  504. package/dist/js/mixins.js.map +0 -1
  505. package/dist/js/test-utils/TestUtils.js +0 -10
  506. package/dist/js/test-utils/TestUtils.js.map +0 -1
  507. package/dist/js/utils.js +0 -46
  508. package/dist/js/utils.js.map +0 -1
  509. package/dist/types/addons/3d.d.ts +0 -6
  510. package/dist/types/addons/3d.d.ts.map +0 -1
  511. package/dist/types/addons/hugging-face-infer.d.ts +0 -8
  512. package/dist/types/addons/hugging-face-infer.d.ts.map +0 -1
  513. package/dist/types/addons/shader.d.ts +0 -6
  514. package/dist/types/addons/shader.d.ts.map +0 -1
  515. package/dist/types/addons/webgpu.d.ts +0 -7
  516. package/dist/types/addons/webgpu.d.ts.map +0 -1
  517. package/dist/types/components.d.ts +0 -5
  518. package/dist/types/components.d.ts.map +0 -1
  519. package/dist/types/concorde-loaded.d.ts +0 -2
  520. package/dist/types/concorde-loaded.d.ts.map +0 -1
  521. package/dist/types/core/_types/endpoint.d.ts +0 -5
  522. package/dist/types/core/_types/endpoint.d.ts.map +0 -1
  523. package/dist/types/core/_types/key.d.ts +0 -2
  524. package/dist/types/core/_types/key.d.ts.map +0 -1
  525. package/dist/types/core/_types/types.d.ts +0 -28
  526. package/dist/types/core/_types/types.d.ts.map +0 -1
  527. package/dist/types/core/components/functional/3d/3d.d.ts +0 -71
  528. package/dist/types/core/components/functional/3d/3d.d.ts.map +0 -1
  529. package/dist/types/core/components/functional/3d/asset.d.ts +0 -12
  530. package/dist/types/core/components/functional/3d/asset.d.ts.map +0 -1
  531. package/dist/types/core/components/functional/3d/boot.d.ts +0 -23
  532. package/dist/types/core/components/functional/3d/boot.d.ts.map +0 -1
  533. package/dist/types/core/components/functional/3d/constants.d.ts +0 -43
  534. package/dist/types/core/components/functional/3d/constants.d.ts.map +0 -1
  535. package/dist/types/core/components/functional/3d/demo-content.d.ts +0 -10
  536. package/dist/types/core/components/functional/3d/demo-content.d.ts.map +0 -1
  537. package/dist/types/core/components/functional/3d/ensure.d.ts +0 -36
  538. package/dist/types/core/components/functional/3d/ensure.d.ts.map +0 -1
  539. package/dist/types/core/components/functional/3d/form-bind.d.ts +0 -20
  540. package/dist/types/core/components/functional/3d/form-bind.d.ts.map +0 -1
  541. package/dist/types/core/components/functional/3d/form-fields.d.ts +0 -14
  542. package/dist/types/core/components/functional/3d/form-fields.d.ts.map +0 -1
  543. package/dist/types/core/components/functional/3d/form-params.d.ts +0 -37
  544. package/dist/types/core/components/functional/3d/form-params.d.ts.map +0 -1
  545. package/dist/types/core/components/functional/3d/frame-capture.d.ts +0 -33
  546. package/dist/types/core/components/functional/3d/frame-capture.d.ts.map +0 -1
  547. package/dist/types/core/components/functional/3d/frame-source.d.ts +0 -23
  548. package/dist/types/core/components/functional/3d/frame-source.d.ts.map +0 -1
  549. package/dist/types/core/components/functional/3d/gl.d.ts +0 -4
  550. package/dist/types/core/components/functional/3d/gl.d.ts.map +0 -1
  551. package/dist/types/core/components/functional/3d/life.d.ts +0 -41
  552. package/dist/types/core/components/functional/3d/life.d.ts.map +0 -1
  553. package/dist/types/core/components/functional/3d/load.d.ts +0 -36
  554. package/dist/types/core/components/functional/3d/load.d.ts.map +0 -1
  555. package/dist/types/core/components/functional/3d/ops.d.ts +0 -48
  556. package/dist/types/core/components/functional/3d/ops.d.ts.map +0 -1
  557. package/dist/types/core/components/functional/3d/opts.d.ts +0 -16
  558. package/dist/types/core/components/functional/3d/opts.d.ts.map +0 -1
  559. package/dist/types/core/components/functional/3d/orbit.d.ts +0 -55
  560. package/dist/types/core/components/functional/3d/orbit.d.ts.map +0 -1
  561. package/dist/types/core/components/functional/3d/out-publish.d.ts +0 -47
  562. package/dist/types/core/components/functional/3d/out-publish.d.ts.map +0 -1
  563. package/dist/types/core/components/functional/3d/parse.d.ts +0 -23
  564. package/dist/types/core/components/functional/3d/parse.d.ts.map +0 -1
  565. package/dist/types/core/components/functional/3d/pick.d.ts +0 -32
  566. package/dist/types/core/components/functional/3d/pick.d.ts.map +0 -1
  567. package/dist/types/core/components/functional/3d/playback.d.ts +0 -26
  568. package/dist/types/core/components/functional/3d/playback.d.ts.map +0 -1
  569. package/dist/types/core/components/functional/3d/pointer.d.ts +0 -27
  570. package/dist/types/core/components/functional/3d/pointer.d.ts.map +0 -1
  571. package/dist/types/core/components/functional/3d/props.d.ts +0 -30
  572. package/dist/types/core/components/functional/3d/props.d.ts.map +0 -1
  573. package/dist/types/core/components/functional/3d/publisher-listen.d.ts +0 -8
  574. package/dist/types/core/components/functional/3d/publisher-listen.d.ts.map +0 -1
  575. package/dist/types/core/components/functional/3d/reload.d.ts +0 -38
  576. package/dist/types/core/components/functional/3d/reload.d.ts.map +0 -1
  577. package/dist/types/core/components/functional/3d/runtime.d.ts +0 -75
  578. package/dist/types/core/components/functional/3d/runtime.d.ts.map +0 -1
  579. package/dist/types/core/components/functional/3d/scene-runtime.d.ts +0 -6
  580. package/dist/types/core/components/functional/3d/scene-runtime.d.ts.map +0 -1
  581. package/dist/types/core/components/functional/3d/snapshot.d.ts +0 -29
  582. package/dist/types/core/components/functional/3d/snapshot.d.ts.map +0 -1
  583. package/dist/types/core/components/functional/3d/styles.d.ts +0 -2
  584. package/dist/types/core/components/functional/3d/styles.d.ts.map +0 -1
  585. package/dist/types/core/components/functional/3d/tune.d.ts +0 -32
  586. package/dist/types/core/components/functional/3d/tune.d.ts.map +0 -1
  587. package/dist/types/core/components/functional/3d/types.d.ts +0 -140
  588. package/dist/types/core/components/functional/3d/types.d.ts.map +0 -1
  589. package/dist/types/core/components/functional/3d/updated.d.ts +0 -7
  590. package/dist/types/core/components/functional/3d/updated.d.ts.map +0 -1
  591. package/dist/types/core/components/functional/3d/view.d.ts +0 -25
  592. package/dist/types/core/components/functional/3d/view.d.ts.map +0 -1
  593. package/dist/types/core/components/functional/3d/wire.d.ts +0 -32
  594. package/dist/types/core/components/functional/3d/wire.d.ts.map +0 -1
  595. package/dist/types/core/components/functional/date/date.d.ts +0 -52
  596. package/dist/types/core/components/functional/date/date.d.ts.map +0 -1
  597. package/dist/types/core/components/functional/example/example.d.ts +0 -15
  598. package/dist/types/core/components/functional/example/example.d.ts.map +0 -1
  599. package/dist/types/core/components/functional/fetch/fetch.d.ts +0 -102
  600. package/dist/types/core/components/functional/fetch/fetch.d.ts.map +0 -1
  601. package/dist/types/core/components/functional/functional.d.ts +0 -18
  602. package/dist/types/core/components/functional/functional.d.ts.map +0 -1
  603. package/dist/types/core/components/functional/if/if.d.ts +0 -13
  604. package/dist/types/core/components/functional/if/if.d.ts.map +0 -1
  605. package/dist/types/core/components/functional/infer/hugging-face/hf-cache.d.ts +0 -21
  606. package/dist/types/core/components/functional/infer/hugging-face/hf-cache.d.ts.map +0 -1
  607. package/dist/types/core/components/functional/infer/hugging-face/hf-config.d.ts +0 -133
  608. package/dist/types/core/components/functional/infer/hugging-face/hf-config.d.ts.map +0 -1
  609. package/dist/types/core/components/functional/infer/hugging-face/hf-controller.d.ts +0 -79
  610. package/dist/types/core/components/functional/infer/hugging-face/hf-controller.d.ts.map +0 -1
  611. package/dist/types/core/components/functional/infer/hugging-face/hf-engine.d.ts +0 -43
  612. package/dist/types/core/components/functional/infer/hugging-face/hf-engine.d.ts.map +0 -1
  613. package/dist/types/core/components/functional/infer/hugging-face/hf-input.d.ts +0 -47
  614. package/dist/types/core/components/functional/infer/hugging-face/hf-input.d.ts.map +0 -1
  615. package/dist/types/core/components/functional/infer/hugging-face/hf-protocol.d.ts +0 -95
  616. package/dist/types/core/components/functional/infer/hugging-face/hf-protocol.d.ts.map +0 -1
  617. package/dist/types/core/components/functional/infer/hugging-face/hf-registry.d.ts +0 -77
  618. package/dist/types/core/components/functional/infer/hugging-face/hf-registry.d.ts.map +0 -1
  619. package/dist/types/core/components/functional/infer/hugging-face/hf-schema.d.ts +0 -1251
  620. package/dist/types/core/components/functional/infer/hugging-face/hf-schema.d.ts.map +0 -1
  621. package/dist/types/core/components/functional/infer/hugging-face/hf-worker-runtime.d.ts +0 -56
  622. package/dist/types/core/components/functional/infer/hugging-face/hf-worker-runtime.d.ts.map +0 -1
  623. package/dist/types/core/components/functional/infer/hugging-face/hugging-face-infer.d.ts +0 -67
  624. package/dist/types/core/components/functional/infer/hugging-face/hugging-face-infer.d.ts.map +0 -1
  625. package/dist/types/core/components/functional/infer/hugging-face/hugging-face.d.ts +0 -116
  626. package/dist/types/core/components/functional/infer/hugging-face/hugging-face.d.ts.map +0 -1
  627. package/dist/types/core/components/functional/infer/hugging-face/types.d.ts +0 -167
  628. package/dist/types/core/components/functional/infer/hugging-face/types.d.ts.map +0 -1
  629. package/dist/types/core/components/functional/jsonata/jsonata.d.ts +0 -29
  630. package/dist/types/core/components/functional/jsonata/jsonata.d.ts.map +0 -1
  631. package/dist/types/core/components/functional/list/list.d.ts +0 -149
  632. package/dist/types/core/components/functional/list/list.d.ts.map +0 -1
  633. package/dist/types/core/components/functional/mix/mix.d.ts +0 -23
  634. package/dist/types/core/components/functional/mix/mix.d.ts.map +0 -1
  635. package/dist/types/core/components/functional/queue/queue.d.ts +0 -93
  636. package/dist/types/core/components/functional/queue/queue.d.ts.map +0 -1
  637. package/dist/types/core/components/functional/router/redirect.d.ts +0 -19
  638. package/dist/types/core/components/functional/router/redirect.d.ts.map +0 -1
  639. package/dist/types/core/components/functional/router/router.d.ts +0 -46
  640. package/dist/types/core/components/functional/router/router.d.ts.map +0 -1
  641. package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts +0 -59
  642. package/dist/types/core/components/functional/sdui/SDUIDescriptorTransformer.d.ts.map +0 -1
  643. package/dist/types/core/components/functional/sdui/sdui-utils.d.ts +0 -6
  644. package/dist/types/core/components/functional/sdui/sdui-utils.d.ts.map +0 -1
  645. package/dist/types/core/components/functional/sdui/sdui.d.ts +0 -148
  646. package/dist/types/core/components/functional/sdui/sdui.d.ts.map +0 -1
  647. package/dist/types/core/components/functional/sdui/types.d.ts +0 -38
  648. package/dist/types/core/components/functional/sdui/types.d.ts.map +0 -1
  649. package/dist/types/core/components/functional/shader/gl-runtime.d.ts +0 -90
  650. package/dist/types/core/components/functional/shader/gl-runtime.d.ts.map +0 -1
  651. package/dist/types/core/components/functional/shader/shader.d.ts +0 -285
  652. package/dist/types/core/components/functional/shader/shader.d.ts.map +0 -1
  653. package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts +0 -6
  654. package/dist/types/core/components/functional/shader/shadertoy-prelude.d.ts.map +0 -1
  655. package/dist/types/core/components/functional/shader/types.d.ts +0 -262
  656. package/dist/types/core/components/functional/shader/types.d.ts.map +0 -1
  657. package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts +0 -6
  658. package/dist/types/core/components/functional/sonic-scope/sonic-scope.d.ts.map +0 -1
  659. package/dist/types/core/components/functional/states/states.d.ts +0 -42
  660. package/dist/types/core/components/functional/states/states.d.ts.map +0 -1
  661. package/dist/types/core/components/functional/submit/submit.d.ts +0 -37
  662. package/dist/types/core/components/functional/submit/submit.d.ts.map +0 -1
  663. package/dist/types/core/components/functional/subscriber/subscriber.d.ts +0 -13
  664. package/dist/types/core/components/functional/subscriber/subscriber.d.ts.map +0 -1
  665. package/dist/types/core/components/functional/translation/translation.d.ts +0 -7
  666. package/dist/types/core/components/functional/translation/translation.d.ts.map +0 -1
  667. package/dist/types/core/components/functional/value/value.d.ts +0 -8
  668. package/dist/types/core/components/functional/value/value.d.ts.map +0 -1
  669. package/dist/types/core/components/functional/webgpu/canvas2d-fallback.d.ts +0 -29
  670. package/dist/types/core/components/functional/webgpu/canvas2d-fallback.d.ts.map +0 -1
  671. package/dist/types/core/components/functional/webgpu/form-bind.d.ts +0 -43
  672. package/dist/types/core/components/functional/webgpu/form-bind.d.ts.map +0 -1
  673. package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts +0 -31
  674. package/dist/types/core/components/functional/webgpu/gl-fallback.d.ts.map +0 -1
  675. package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts +0 -53
  676. package/dist/types/core/components/functional/webgpu/gpu-runtime.d.ts.map +0 -1
  677. package/dist/types/core/components/functional/webgpu/helpers.d.ts +0 -9
  678. package/dist/types/core/components/functional/webgpu/helpers.d.ts.map +0 -1
  679. package/dist/types/core/components/functional/webgpu/out-frame.d.ts +0 -29
  680. package/dist/types/core/components/functional/webgpu/out-frame.d.ts.map +0 -1
  681. package/dist/types/core/components/functional/webgpu/particles-runtime.d.ts +0 -37
  682. package/dist/types/core/components/functional/webgpu/particles-runtime.d.ts.map +0 -1
  683. package/dist/types/core/components/functional/webgpu/pointer.d.ts +0 -41
  684. package/dist/types/core/components/functional/webgpu/pointer.d.ts.map +0 -1
  685. package/dist/types/core/components/functional/webgpu/types.d.ts +0 -75
  686. package/dist/types/core/components/functional/webgpu/types.d.ts.map +0 -1
  687. package/dist/types/core/components/functional/webgpu/webgpu.d.ts +0 -127
  688. package/dist/types/core/components/functional/webgpu/webgpu.d.ts.map +0 -1
  689. package/dist/types/core/components/functional/webgpu/wgsl-prelude.d.ts +0 -8
  690. package/dist/types/core/components/functional/webgpu/wgsl-prelude.d.ts.map +0 -1
  691. package/dist/types/core/components/ui/_css/scroll.d.ts +0 -2
  692. package/dist/types/core/components/ui/_css/scroll.d.ts.map +0 -1
  693. package/dist/types/core/components/ui/_css/shadow.d.ts +0 -3
  694. package/dist/types/core/components/ui/_css/shadow.d.ts.map +0 -1
  695. package/dist/types/core/components/ui/_css/size.d.ts +0 -3
  696. package/dist/types/core/components/ui/_css/size.d.ts.map +0 -1
  697. package/dist/types/core/components/ui/_css/type.d.ts +0 -3
  698. package/dist/types/core/components/ui/_css/type.d.ts.map +0 -1
  699. package/dist/types/core/components/ui/alert/alert.d.ts +0 -37
  700. package/dist/types/core/components/ui/alert/alert.d.ts.map +0 -1
  701. package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts +0 -15
  702. package/dist/types/core/components/ui/alert-messages/alert-messages.d.ts.map +0 -1
  703. package/dist/types/core/components/ui/badge/badge.d.ts +0 -27
  704. package/dist/types/core/components/ui/badge/badge.d.ts.map +0 -1
  705. package/dist/types/core/components/ui/button/button.d.ts +0 -180
  706. package/dist/types/core/components/ui/button/button.d.ts.map +0 -1
  707. package/dist/types/core/components/ui/captcha/altchaStyles.d.ts +0 -2
  708. package/dist/types/core/components/ui/captcha/altchaStyles.d.ts.map +0 -1
  709. package/dist/types/core/components/ui/captcha/captcha.d.ts +0 -30
  710. package/dist/types/core/components/ui/captcha/captcha.d.ts.map +0 -1
  711. package/dist/types/core/components/ui/card/card-footer.d.ts +0 -6
  712. package/dist/types/core/components/ui/card/card-footer.d.ts.map +0 -1
  713. package/dist/types/core/components/ui/card/card-header-descripton.d.ts +0 -6
  714. package/dist/types/core/components/ui/card/card-header-descripton.d.ts.map +0 -1
  715. package/dist/types/core/components/ui/card/card-header.d.ts +0 -9
  716. package/dist/types/core/components/ui/card/card-header.d.ts.map +0 -1
  717. package/dist/types/core/components/ui/card/card-main.d.ts +0 -6
  718. package/dist/types/core/components/ui/card/card-main.d.ts.map +0 -1
  719. package/dist/types/core/components/ui/card/card.d.ts +0 -13
  720. package/dist/types/core/components/ui/card/card.d.ts.map +0 -1
  721. package/dist/types/core/components/ui/divider/divider.d.ts +0 -16
  722. package/dist/types/core/components/ui/divider/divider.d.ts.map +0 -1
  723. package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts +0 -176
  724. package/dist/types/core/components/ui/form/checkbox/checkbox.d.ts.map +0 -1
  725. package/dist/types/core/components/ui/form/css/form-control.d.ts +0 -5
  726. package/dist/types/core/components/ui/form/css/form-control.d.ts.map +0 -1
  727. package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts +0 -24
  728. package/dist/types/core/components/ui/form/fieldset/fieldset.d.ts.map +0 -1
  729. package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts +0 -6
  730. package/dist/types/core/components/ui/form/fieldset/legend-description.d.ts.map +0 -1
  731. package/dist/types/core/components/ui/form/fieldset/legend.d.ts +0 -17
  732. package/dist/types/core/components/ui/form/fieldset/legend.d.ts.map +0 -1
  733. package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts +0 -8
  734. package/dist/types/core/components/ui/form/form-actions/form-actions.d.ts.map +0 -1
  735. package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts +0 -13
  736. package/dist/types/core/components/ui/form/form-layout/form-layout.d.ts.map +0 -1
  737. package/dist/types/core/components/ui/form/input/input.d.ts +0 -123
  738. package/dist/types/core/components/ui/form/input/input.d.ts.map +0 -1
  739. package/dist/types/core/components/ui/form/input/password-helper.d.ts +0 -26
  740. package/dist/types/core/components/ui/form/input/password-helper.d.ts.map +0 -1
  741. package/dist/types/core/components/ui/form/input/same-value-helper.d.ts +0 -17
  742. package/dist/types/core/components/ui/form/input/same-value-helper.d.ts.map +0 -1
  743. package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts +0 -155
  744. package/dist/types/core/components/ui/form/input-autocomplete/input-autocomplete.d.ts.map +0 -1
  745. package/dist/types/core/components/ui/form/radio/radio.d.ts +0 -15
  746. package/dist/types/core/components/ui/form/radio/radio.d.ts.map +0 -1
  747. package/dist/types/core/components/ui/form/select/select.d.ts +0 -59
  748. package/dist/types/core/components/ui/form/select/select.d.ts.map +0 -1
  749. package/dist/types/core/components/ui/form/switch/switch.d.ts +0 -6
  750. package/dist/types/core/components/ui/form/switch/switch.d.ts.map +0 -1
  751. package/dist/types/core/components/ui/form/textarea/textarea.d.ts +0 -94
  752. package/dist/types/core/components/ui/form/textarea/textarea.d.ts.map +0 -1
  753. package/dist/types/core/components/ui/group/group.d.ts +0 -17
  754. package/dist/types/core/components/ui/group/group.d.ts.map +0 -1
  755. package/dist/types/core/components/ui/icon/icon.d.ts +0 -30
  756. package/dist/types/core/components/ui/icon/icon.d.ts.map +0 -1
  757. package/dist/types/core/components/ui/icon/icons.d.ts +0 -13
  758. package/dist/types/core/components/ui/icon/icons.d.ts.map +0 -1
  759. package/dist/types/core/components/ui/image/image.d.ts +0 -16
  760. package/dist/types/core/components/ui/image/image.d.ts.map +0 -1
  761. package/dist/types/core/components/ui/link/link.d.ts +0 -30
  762. package/dist/types/core/components/ui/link/link.d.ts.map +0 -1
  763. package/dist/types/core/components/ui/loader/loader.d.ts +0 -24
  764. package/dist/types/core/components/ui/loader/loader.d.ts.map +0 -1
  765. package/dist/types/core/components/ui/loader/styles/fixed.d.ts +0 -2
  766. package/dist/types/core/components/ui/loader/styles/fixed.d.ts.map +0 -1
  767. package/dist/types/core/components/ui/loader/styles/inline.d.ts +0 -2
  768. package/dist/types/core/components/ui/loader/styles/inline.d.ts.map +0 -1
  769. package/dist/types/core/components/ui/menu/menu-item.d.ts +0 -6
  770. package/dist/types/core/components/ui/menu/menu-item.d.ts.map +0 -1
  771. package/dist/types/core/components/ui/menu/menu.d.ts +0 -52
  772. package/dist/types/core/components/ui/menu/menu.d.ts.map +0 -1
  773. package/dist/types/core/components/ui/modal/modal-actions.d.ts +0 -9
  774. package/dist/types/core/components/ui/modal/modal-actions.d.ts.map +0 -1
  775. package/dist/types/core/components/ui/modal/modal-close.d.ts +0 -11
  776. package/dist/types/core/components/ui/modal/modal-close.d.ts.map +0 -1
  777. package/dist/types/core/components/ui/modal/modal-content.d.ts +0 -6
  778. package/dist/types/core/components/ui/modal/modal-content.d.ts.map +0 -1
  779. package/dist/types/core/components/ui/modal/modal-subtitle.d.ts +0 -6
  780. package/dist/types/core/components/ui/modal/modal-subtitle.d.ts.map +0 -1
  781. package/dist/types/core/components/ui/modal/modal-title.d.ts +0 -6
  782. package/dist/types/core/components/ui/modal/modal-title.d.ts.map +0 -1
  783. package/dist/types/core/components/ui/modal/modal-utils.d.ts +0 -4
  784. package/dist/types/core/components/ui/modal/modal-utils.d.ts.map +0 -1
  785. package/dist/types/core/components/ui/modal/modal.d.ts +0 -79
  786. package/dist/types/core/components/ui/modal/modal.d.ts.map +0 -1
  787. package/dist/types/core/components/ui/pop/pop.d.ts +0 -42
  788. package/dist/types/core/components/ui/pop/pop.d.ts.map +0 -1
  789. package/dist/types/core/components/ui/progress/progress.d.ts +0 -12
  790. package/dist/types/core/components/ui/progress/progress.d.ts.map +0 -1
  791. package/dist/types/core/components/ui/table/table-caption.d.ts +0 -6
  792. package/dist/types/core/components/ui/table/table-caption.d.ts.map +0 -1
  793. package/dist/types/core/components/ui/table/table-tbody.d.ts +0 -6
  794. package/dist/types/core/components/ui/table/table-tbody.d.ts.map +0 -1
  795. package/dist/types/core/components/ui/table/table-td.d.ts +0 -13
  796. package/dist/types/core/components/ui/table/table-td.d.ts.map +0 -1
  797. package/dist/types/core/components/ui/table/table-tfoot.d.ts +0 -6
  798. package/dist/types/core/components/ui/table/table-tfoot.d.ts.map +0 -1
  799. package/dist/types/core/components/ui/table/table-th.d.ts +0 -12
  800. package/dist/types/core/components/ui/table/table-th.d.ts.map +0 -1
  801. package/dist/types/core/components/ui/table/table-thead.d.ts +0 -6
  802. package/dist/types/core/components/ui/table/table-thead.d.ts.map +0 -1
  803. package/dist/types/core/components/ui/table/table-tr.d.ts +0 -14
  804. package/dist/types/core/components/ui/table/table-tr.d.ts.map +0 -1
  805. package/dist/types/core/components/ui/table/table.d.ts +0 -18
  806. package/dist/types/core/components/ui/table/table.d.ts.map +0 -1
  807. package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts +0 -2
  808. package/dist/types/core/components/ui/theme/theme-collection/core-variables.d.ts.map +0 -1
  809. package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts +0 -2
  810. package/dist/types/core/components/ui/theme/theme-collection/dark.d.ts.map +0 -1
  811. package/dist/types/core/components/ui/theme/theme-collection/light.d.ts +0 -2
  812. package/dist/types/core/components/ui/theme/theme-collection/light.d.ts.map +0 -1
  813. package/dist/types/core/components/ui/theme/theme.d.ts +0 -20
  814. package/dist/types/core/components/ui/theme/theme.d.ts.map +0 -1
  815. package/dist/types/core/components/ui/toast/message-subscriber.d.ts +0 -19
  816. package/dist/types/core/components/ui/toast/message-subscriber.d.ts.map +0 -1
  817. package/dist/types/core/components/ui/toast/toast-item.d.ts +0 -41
  818. package/dist/types/core/components/ui/toast/toast-item.d.ts.map +0 -1
  819. package/dist/types/core/components/ui/toast/toast.d.ts +0 -28
  820. package/dist/types/core/components/ui/toast/toast.d.ts.map +0 -1
  821. package/dist/types/core/components/ui/toast/types.d.ts +0 -12
  822. package/dist/types/core/components/ui/toast/types.d.ts.map +0 -1
  823. package/dist/types/core/components/ui/tooltip/tooltip.d.ts +0 -21
  824. package/dist/types/core/components/ui/tooltip/tooltip.d.ts.map +0 -1
  825. package/dist/types/core/components/ui/ui.d.ts +0 -35
  826. package/dist/types/core/components/ui/ui.d.ts.map +0 -1
  827. package/dist/types/core/core.d.ts +0 -5
  828. package/dist/types/core/core.d.ts.map +0 -1
  829. package/dist/types/core/decorators/Subscriber.d.ts +0 -13
  830. package/dist/types/core/decorators/Subscriber.d.ts.map +0 -1
  831. package/dist/types/core/decorators/api.d.ts +0 -155
  832. package/dist/types/core/decorators/api.d.ts.map +0 -1
  833. package/dist/types/core/decorators/lifecycle.d.ts +0 -19
  834. package/dist/types/core/decorators/lifecycle.d.ts.map +0 -1
  835. package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts +0 -11
  836. package/dist/types/core/decorators/subscriber/ancestorAttribute.d.ts.map +0 -1
  837. package/dist/types/core/decorators/subscriber/autoFill.d.ts +0 -2
  838. package/dist/types/core/decorators/subscriber/autoFill.d.ts.map +0 -1
  839. package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts +0 -2
  840. package/dist/types/core/decorators/subscriber/autoSubscribe.d.ts.map +0 -1
  841. package/dist/types/core/decorators/subscriber/bind.d.ts +0 -28
  842. package/dist/types/core/decorators/subscriber/bind.d.ts.map +0 -1
  843. package/dist/types/core/decorators/subscriber/common.d.ts +0 -14
  844. package/dist/types/core/decorators/subscriber/common.d.ts.map +0 -1
  845. package/dist/types/core/decorators/subscriber/derive.d.ts +0 -30
  846. package/dist/types/core/decorators/subscriber/derive.d.ts.map +0 -1
  847. package/dist/types/core/decorators/subscriber/dynamicPath.d.ts +0 -23
  848. package/dist/types/core/decorators/subscriber/dynamicPath.d.ts.map +0 -1
  849. package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts +0 -42
  850. package/dist/types/core/decorators/subscriber/dynamicPropertyWatch.d.ts.map +0 -1
  851. package/dist/types/core/decorators/subscriber/handle.d.ts +0 -74
  852. package/dist/types/core/decorators/subscriber/handle.d.ts.map +0 -1
  853. package/dist/types/core/decorators/subscriber/onAssign.d.ts +0 -53
  854. package/dist/types/core/decorators/subscriber/onAssign.d.ts.map +0 -1
  855. package/dist/types/core/decorators/subscriber/publish.d.ts +0 -23
  856. package/dist/types/core/decorators/subscriber/publish.d.ts.map +0 -1
  857. package/dist/types/core/decorators/subscriber/publisherPath.d.ts +0 -3
  858. package/dist/types/core/decorators/subscriber/publisherPath.d.ts.map +0 -1
  859. package/dist/types/core/decorators/subscriber/subscribe.d.ts +0 -20
  860. package/dist/types/core/decorators/subscriber/subscribe.d.ts.map +0 -1
  861. package/dist/types/core/directives/DataProvider.d.ts +0 -45
  862. package/dist/types/core/directives/DataProvider.d.ts.map +0 -1
  863. package/dist/types/core/directives/Wording.d.ts +0 -44
  864. package/dist/types/core/directives/Wording.d.ts.map +0 -1
  865. package/dist/types/core/mixins/Fetcher.d.ts +0 -108
  866. package/dist/types/core/mixins/Fetcher.d.ts.map +0 -1
  867. package/dist/types/core/mixins/FormCheckable.d.ts +0 -95
  868. package/dist/types/core/mixins/FormCheckable.d.ts.map +0 -1
  869. package/dist/types/core/mixins/FormElement.d.ts +0 -37
  870. package/dist/types/core/mixins/FormElement.d.ts.map +0 -1
  871. package/dist/types/core/mixins/FormInput.d.ts +0 -79
  872. package/dist/types/core/mixins/FormInput.d.ts.map +0 -1
  873. package/dist/types/core/mixins/Subscriber.d.ts +0 -38
  874. package/dist/types/core/mixins/Subscriber.d.ts.map +0 -1
  875. package/dist/types/core/mixins/TemplatesContainer.d.ts +0 -14
  876. package/dist/types/core/mixins/TemplatesContainer.d.ts.map +0 -1
  877. package/dist/types/core/mixins/mixins.d.ts +0 -7
  878. package/dist/types/core/mixins/mixins.d.ts.map +0 -1
  879. package/dist/types/core/utils/AncestorAttributeObserver.d.ts +0 -38
  880. package/dist/types/core/utils/AncestorAttributeObserver.d.ts.map +0 -1
  881. package/dist/types/core/utils/Arrays.d.ts +0 -98
  882. package/dist/types/core/utils/Arrays.d.ts.map +0 -1
  883. package/dist/types/core/utils/DataBindObserver.d.ts +0 -84
  884. package/dist/types/core/utils/DataBindObserver.d.ts.map +0 -1
  885. package/dist/types/core/utils/Electron.d.ts +0 -8
  886. package/dist/types/core/utils/Electron.d.ts.map +0 -1
  887. package/dist/types/core/utils/Format.d.ts +0 -13
  888. package/dist/types/core/utils/Format.d.ts.map +0 -1
  889. package/dist/types/core/utils/HTML.d.ts +0 -59
  890. package/dist/types/core/utils/HTML.d.ts.map +0 -1
  891. package/dist/types/core/utils/LocationHandler.d.ts +0 -48
  892. package/dist/types/core/utils/LocationHandler.d.ts.map +0 -1
  893. package/dist/types/core/utils/Objects.d.ts +0 -31
  894. package/dist/types/core/utils/Objects.d.ts.map +0 -1
  895. package/dist/types/core/utils/PublisherProxy.d.ts +0 -230
  896. package/dist/types/core/utils/PublisherProxy.d.ts.map +0 -1
  897. package/dist/types/core/utils/SafariScrollGuard.d.ts +0 -36
  898. package/dist/types/core/utils/SafariScrollGuard.d.ts.map +0 -1
  899. package/dist/types/core/utils/Utils.d.ts +0 -6
  900. package/dist/types/core/utils/Utils.d.ts.map +0 -1
  901. package/dist/types/core/utils/aesCrypto.d.ts +0 -53
  902. package/dist/types/core/utils/aesCrypto.d.ts.map +0 -1
  903. package/dist/types/core/utils/api.d.ts +0 -173
  904. package/dist/types/core/utils/api.d.ts.map +0 -1
  905. package/dist/types/core/utils/dataProviderKey.d.ts +0 -56
  906. package/dist/types/core/utils/dataProviderKey.d.ts.map +0 -1
  907. package/dist/types/core/utils/derive.d.ts +0 -40
  908. package/dist/types/core/utils/derive.d.ts.map +0 -1
  909. package/dist/types/core/utils/endpoint.d.ts +0 -37
  910. package/dist/types/core/utils/endpoint.d.ts.map +0 -1
  911. package/dist/types/core/utils/jsonataHelpers.d.ts +0 -15
  912. package/dist/types/core/utils/jsonataHelpers.d.ts.map +0 -1
  913. package/dist/types/core/utils/jsonataRuntime.d.ts +0 -13
  914. package/dist/types/core/utils/jsonataRuntime.d.ts.map +0 -1
  915. package/dist/types/core/utils/mediaRef.d.ts +0 -53
  916. package/dist/types/core/utils/mediaRef.d.ts.map +0 -1
  917. package/dist/types/core/utils/route.d.ts +0 -41
  918. package/dist/types/core/utils/route.d.ts.map +0 -1
  919. package/dist/types/core/utils/similarity.d.ts +0 -15
  920. package/dist/types/core/utils/similarity.d.ts.map +0 -1
  921. package/dist/types/core/utils/url-pattern.d.ts +0 -3
  922. package/dist/types/core/utils/url-pattern.d.ts.map +0 -1
  923. package/dist/types/dataprovider.d.ts +0 -2
  924. package/dist/types/dataprovider.d.ts.map +0 -1
  925. package/dist/types/decorators.d.ts +0 -30
  926. package/dist/types/decorators.d.ts.map +0 -1
  927. package/dist/types/directives.d.ts +0 -21
  928. package/dist/types/directives.d.ts.map +0 -1
  929. package/dist/types/index.d.ts +0 -8
  930. package/dist/types/index.d.ts.map +0 -1
  931. package/dist/types/mixins.d.ts +0 -204
  932. package/dist/types/mixins.d.ts.map +0 -1
  933. package/dist/types/test-utils/TestUtils.d.ts +0 -4
  934. package/dist/types/test-utils/TestUtils.d.ts.map +0 -1
  935. package/dist/types/utils.d.ts +0 -20
  936. package/dist/types/utils.d.ts.map +0 -1
  937. package/public/docs/hf-samples/beach.jpg +0 -0
  938. package/public/docs/hf-samples/cats.jpg +0 -0
  939. package/public/docs/hf-samples/corgi.jpg +0 -0
  940. package/public/docs/hf-samples/portrait.jpg +0 -0
  941. package/public/docs/hf-samples/scene.jpg +0 -0
  942. package/public/docs/hf-samples/singer.jpg +0 -0
  943. package/public/docs/shader-samples/color.jpg +0 -0
  944. package/public/docs/shader-samples/depth.png +0 -0
  945. package/public/docs/shader-samples/impact.jpg +0 -0
  946. package/public/docs/shader-samples/video.webm +0 -0
  947. package/scripts/build-addons.mjs +0 -26
  948. package/scripts/gen-shader-depth.mjs +0 -85
  949. package/scripts/gen-shader-harris-video.mjs +0 -17
  950. package/scripts/gen-shader-harris-video.py +0 -84
  951. package/scripts/hf-vendor.mjs +0 -154
  952. package/src/addons/3d.ts +0 -5
  953. package/src/addons/hugging-face-infer.ts +0 -11
  954. package/src/addons/shader.ts +0 -5
  955. package/src/addons/webgpu.ts +0 -15
  956. package/src/core/components/functional/3d/3d.md +0 -128
  957. package/src/core/components/functional/3d/3d.spec.ts +0 -171
  958. package/src/core/components/functional/3d/3d.ts +0 -186
  959. package/src/core/components/functional/3d/asset.ts +0 -22
  960. package/src/core/components/functional/3d/boot.ts +0 -77
  961. package/src/core/components/functional/3d/constants.ts +0 -100
  962. package/src/core/components/functional/3d/demo-content.ts +0 -45
  963. package/src/core/components/functional/3d/ensure.ts +0 -99
  964. package/src/core/components/functional/3d/form-bind.ts +0 -40
  965. package/src/core/components/functional/3d/form-fields.ts +0 -80
  966. package/src/core/components/functional/3d/form-params.ts +0 -97
  967. package/src/core/components/functional/3d/frame-capture.spec.ts +0 -72
  968. package/src/core/components/functional/3d/frame-capture.ts +0 -135
  969. package/src/core/components/functional/3d/frame-source.ts +0 -30
  970. package/src/core/components/functional/3d/gl.ts +0 -35
  971. package/src/core/components/functional/3d/life.ts +0 -101
  972. package/src/core/components/functional/3d/load.ts +0 -129
  973. package/src/core/components/functional/3d/ops.ts +0 -126
  974. package/src/core/components/functional/3d/opts.ts +0 -16
  975. package/src/core/components/functional/3d/orbit.ts +0 -185
  976. package/src/core/components/functional/3d/out-publish.ts +0 -140
  977. package/src/core/components/functional/3d/parse.ts +0 -95
  978. package/src/core/components/functional/3d/pick.ts +0 -92
  979. package/src/core/components/functional/3d/playback.ts +0 -70
  980. package/src/core/components/functional/3d/pointer.ts +0 -79
  981. package/src/core/components/functional/3d/props.ts +0 -50
  982. package/src/core/components/functional/3d/publisher-listen.ts +0 -13
  983. package/src/core/components/functional/3d/reload.ts +0 -94
  984. package/src/core/components/functional/3d/runtime.ts +0 -148
  985. package/src/core/components/functional/3d/scene-runtime.ts +0 -9
  986. package/src/core/components/functional/3d/snapshot.ts +0 -73
  987. package/src/core/components/functional/3d/styles.ts +0 -38
  988. package/src/core/components/functional/3d/tune.ts +0 -72
  989. package/src/core/components/functional/3d/types.ts +0 -150
  990. package/src/core/components/functional/3d/updated.ts +0 -70
  991. package/src/core/components/functional/3d/view.ts +0 -63
  992. package/src/core/components/functional/3d/wire.ts +0 -65
  993. package/src/core/components/functional/infer/hugging-face/hf-cache.ts +0 -198
  994. package/src/core/components/functional/infer/hugging-face/hf-config.ts +0 -188
  995. package/src/core/components/functional/infer/hugging-face/hf-controller.spec.ts +0 -350
  996. package/src/core/components/functional/infer/hugging-face/hf-controller.ts +0 -622
  997. package/src/core/components/functional/infer/hugging-face/hf-engine.ts +0 -178
  998. package/src/core/components/functional/infer/hugging-face/hf-input.spec.ts +0 -99
  999. package/src/core/components/functional/infer/hugging-face/hf-input.ts +0 -218
  1000. package/src/core/components/functional/infer/hugging-face/hf-protocol.ts +0 -76
  1001. package/src/core/components/functional/infer/hugging-face/hf-registry.ts +0 -457
  1002. package/src/core/components/functional/infer/hugging-face/hf-schema.spec.ts +0 -124
  1003. package/src/core/components/functional/infer/hugging-face/hf-schema.ts +0 -390
  1004. package/src/core/components/functional/infer/hugging-face/hf-worker-runtime.spec.ts +0 -147
  1005. package/src/core/components/functional/infer/hugging-face/hf-worker-runtime.ts +0 -381
  1006. package/src/core/components/functional/infer/hugging-face/hugging-face-infer.md +0 -304
  1007. package/src/core/components/functional/infer/hugging-face/hugging-face-infer.ts +0 -202
  1008. package/src/core/components/functional/infer/hugging-face/hugging-face.ts +0 -282
  1009. package/src/core/components/functional/infer/hugging-face/types.ts +0 -325
  1010. package/src/core/components/functional/shader/gl-runtime.ts +0 -963
  1011. package/src/core/components/functional/shader/shader.md +0 -209
  1012. package/src/core/components/functional/shader/shader.spec.ts +0 -368
  1013. package/src/core/components/functional/shader/shader.ts +0 -1624
  1014. package/src/core/components/functional/shader/shadertoy-prelude.ts +0 -52
  1015. package/src/core/components/functional/shader/types.ts +0 -448
  1016. package/src/core/components/functional/webgpu/canvas2d-fallback.ts +0 -125
  1017. package/src/core/components/functional/webgpu/form-bind.ts +0 -116
  1018. package/src/core/components/functional/webgpu/gl-fallback.ts +0 -158
  1019. package/src/core/components/functional/webgpu/gpu-runtime.ts +0 -349
  1020. package/src/core/components/functional/webgpu/helpers.ts +0 -47
  1021. package/src/core/components/functional/webgpu/out-frame.ts +0 -137
  1022. package/src/core/components/functional/webgpu/particles-runtime.ts +0 -426
  1023. package/src/core/components/functional/webgpu/pointer.ts +0 -85
  1024. package/src/core/components/functional/webgpu/types.ts +0 -96
  1025. package/src/core/components/functional/webgpu/webgpu.md +0 -75
  1026. package/src/core/components/functional/webgpu/webgpu.spec.ts +0 -141
  1027. package/src/core/components/functional/webgpu/webgpu.ts +0 -668
  1028. package/src/core/components/functional/webgpu/wgsl-prelude.ts +0 -81
  1029. package/src/core/utils/mediaRef.spec.ts +0 -121
  1030. package/src/core/utils/mediaRef.ts +0 -193
  1031. package/src/core/utils/similarity.spec.ts +0 -34
  1032. package/src/core/utils/similarity.ts +0 -54
  1033. package/src/docs/_getting-started/cdn-addons.md +0 -73
  1034. package/src/docs/_misc/visual-stack.md +0 -65
  1035. package/src/docs/example/docs-3d-demos.ts +0 -8
  1036. package/src/docs/example/docs-3d-form.ts +0 -95
  1037. package/src/docs/example/docs-3d-orbit.ts +0 -44
  1038. package/src/docs/example/docs-3d-out.ts +0 -56
  1039. package/src/docs/example/docs-3d-shader-live-demo.ts +0 -98
  1040. package/src/docs/example/docs-3d-shared.ts +0 -15
  1041. package/src/docs/example/docs-harris-webgpu-demo.ts +0 -482
  1042. package/src/docs/example/docs-hugging-face-demos.ts +0 -516
  1043. package/src/docs/example/docs-shader-demos.ts +0 -357
  1044. package/src/docs/example/docs-visual-stack-demo.ts +0 -394
  1045. package/src/docs/example/docs-webgpu-demo.ts +0 -77
@@ -1,2952 +0,0 @@
1
- /**
2
- * @license
3
- * Copyright 2019 Google LLC
4
- * SPDX-License-Identifier: BSD-3-Clause
5
- */
6
- const Le = globalThis, ht = Le.ShadowRoot && (Le.ShadyCSS === void 0 || Le.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, dt = Symbol(), At = /* @__PURE__ */ new WeakMap();
7
- let Dt = class {
8
- constructor(e, t, s) {
9
- if (this._$cssResult$ = !0, s !== dt) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
10
- this.cssText = e, this.t = t;
11
- }
12
- get styleSheet() {
13
- let e = this.o;
14
- const t = this.t;
15
- if (ht && e === void 0) {
16
- const s = t !== void 0 && t.length === 1;
17
- s && (e = At.get(t)), e === void 0 && ((this.o = e = new CSSStyleSheet()).replaceSync(this.cssText), s && At.set(t, e));
18
- }
19
- return e;
20
- }
21
- toString() {
22
- return this.cssText;
23
- }
24
- };
25
- const es = (n) => new Dt(typeof n == "string" ? n : n + "", void 0, dt), ts = (n, ...e) => {
26
- const t = n.length === 1 ? n[0] : e.reduce(((s, i, r) => s + ((o) => {
27
- if (o._$cssResult$ === !0) return o.cssText;
28
- if (typeof o == "number") return o;
29
- throw Error("Value passed to 'css' function must be a 'css' function result: " + o + ". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.");
30
- })(i) + n[r + 1]), n[0]);
31
- return new Dt(t, n, dt);
32
- }, ss = (n, e) => {
33
- if (ht) n.adoptedStyleSheets = e.map(((t) => t instanceof CSSStyleSheet ? t : t.styleSheet));
34
- else for (const t of e) {
35
- const s = document.createElement("style"), i = Le.litNonce;
36
- i !== void 0 && s.setAttribute("nonce", i), s.textContent = t.cssText, n.appendChild(s);
37
- }
38
- }, St = ht ? (n) => n : (n) => n instanceof CSSStyleSheet ? ((e) => {
39
- let t = "";
40
- for (const s of e.cssRules) t += s.cssText;
41
- return es(t);
42
- })(n) : n;
43
- /**
44
- * @license
45
- * Copyright 2017 Google LLC
46
- * SPDX-License-Identifier: BSD-3-Clause
47
- */
48
- const { is: ns, defineProperty: is, getOwnPropertyDescriptor: rs, getOwnPropertyNames: os, getOwnPropertySymbols: as, getPrototypeOf: ls } = Object, Re = globalThis, kt = Re.trustedTypes, cs = kt ? kt.emptyScript : "", us = Re.reactiveElementPolyfillSupport, we = (n, e) => n, Oe = { toAttribute(n, e) {
49
- switch (e) {
50
- case Boolean:
51
- n = n ? cs : null;
52
- break;
53
- case Object:
54
- case Array:
55
- n = n == null ? n : JSON.stringify(n);
56
- }
57
- return n;
58
- }, fromAttribute(n, e) {
59
- let t = n;
60
- switch (e) {
61
- case Boolean:
62
- t = n !== null;
63
- break;
64
- case Number:
65
- t = n === null ? null : Number(n);
66
- break;
67
- case Object:
68
- case Array:
69
- try {
70
- t = JSON.parse(n);
71
- } catch {
72
- t = null;
73
- }
74
- }
75
- return t;
76
- } }, ft = (n, e) => !ns(n, e), xt = { attribute: !0, type: String, converter: Oe, reflect: !1, useDefault: !1, hasChanged: ft };
77
- Symbol.metadata ??= Symbol("metadata"), Re.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
78
- let re = class extends HTMLElement {
79
- static addInitializer(e) {
80
- this._$Ei(), (this.l ??= []).push(e);
81
- }
82
- static get observedAttributes() {
83
- return this.finalize(), this._$Eh && [...this._$Eh.keys()];
84
- }
85
- static createProperty(e, t = xt) {
86
- 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) {
87
- const s = Symbol(), i = this.getPropertyDescriptor(e, s, t);
88
- i !== void 0 && is(this.prototype, e, i);
89
- }
90
- }
91
- static getPropertyDescriptor(e, t, s) {
92
- const { get: i, set: r } = rs(this.prototype, e) ?? { get() {
93
- return this[t];
94
- }, set(o) {
95
- this[t] = o;
96
- } };
97
- return { get: i, set(o) {
98
- const l = i?.call(this);
99
- r?.call(this, o), this.requestUpdate(e, l, s);
100
- }, configurable: !0, enumerable: !0 };
101
- }
102
- static getPropertyOptions(e) {
103
- return this.elementProperties.get(e) ?? xt;
104
- }
105
- static _$Ei() {
106
- if (this.hasOwnProperty(we("elementProperties"))) return;
107
- const e = ls(this);
108
- e.finalize(), e.l !== void 0 && (this.l = [...e.l]), this.elementProperties = new Map(e.elementProperties);
109
- }
110
- static finalize() {
111
- if (this.hasOwnProperty(we("finalized"))) return;
112
- if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(we("properties"))) {
113
- const t = this.properties, s = [...os(t), ...as(t)];
114
- for (const i of s) this.createProperty(i, t[i]);
115
- }
116
- const e = this[Symbol.metadata];
117
- if (e !== null) {
118
- const t = litPropertyMetadata.get(e);
119
- if (t !== void 0) for (const [s, i] of t) this.elementProperties.set(s, i);
120
- }
121
- this._$Eh = /* @__PURE__ */ new Map();
122
- for (const [t, s] of this.elementProperties) {
123
- const i = this._$Eu(t, s);
124
- i !== void 0 && this._$Eh.set(i, t);
125
- }
126
- this.elementStyles = this.finalizeStyles(this.styles);
127
- }
128
- static finalizeStyles(e) {
129
- const t = [];
130
- if (Array.isArray(e)) {
131
- const s = new Set(e.flat(1 / 0).reverse());
132
- for (const i of s) t.unshift(St(i));
133
- } else e !== void 0 && t.push(St(e));
134
- return t;
135
- }
136
- static _$Eu(e, t) {
137
- const s = t.attribute;
138
- return s === !1 ? void 0 : typeof s == "string" ? s : typeof e == "string" ? e.toLowerCase() : void 0;
139
- }
140
- constructor() {
141
- super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
142
- }
143
- _$Ev() {
144
- this._$ES = new Promise(((e) => this.enableUpdating = e)), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach(((e) => e(this)));
145
- }
146
- addController(e) {
147
- (this._$EO ??= /* @__PURE__ */ new Set()).add(e), this.renderRoot !== void 0 && this.isConnected && e.hostConnected?.();
148
- }
149
- removeController(e) {
150
- this._$EO?.delete(e);
151
- }
152
- _$E_() {
153
- const e = /* @__PURE__ */ new Map(), t = this.constructor.elementProperties;
154
- for (const s of t.keys()) this.hasOwnProperty(s) && (e.set(s, this[s]), delete this[s]);
155
- e.size > 0 && (this._$Ep = e);
156
- }
157
- createRenderRoot() {
158
- const e = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
159
- return ss(e, this.constructor.elementStyles), e;
160
- }
161
- connectedCallback() {
162
- this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach(((e) => e.hostConnected?.()));
163
- }
164
- enableUpdating(e) {
165
- }
166
- disconnectedCallback() {
167
- this._$EO?.forEach(((e) => e.hostDisconnected?.()));
168
- }
169
- attributeChangedCallback(e, t, s) {
170
- this._$AK(e, s);
171
- }
172
- _$ET(e, t) {
173
- const s = this.constructor.elementProperties.get(e), i = this.constructor._$Eu(e, s);
174
- if (i !== void 0 && s.reflect === !0) {
175
- const r = (s.converter?.toAttribute !== void 0 ? s.converter : Oe).toAttribute(t, s.type);
176
- this._$Em = e, r == null ? this.removeAttribute(i) : this.setAttribute(i, r), this._$Em = null;
177
- }
178
- }
179
- _$AK(e, t) {
180
- const s = this.constructor, i = s._$Eh.get(e);
181
- if (i !== void 0 && this._$Em !== i) {
182
- const r = s.getPropertyOptions(i), o = typeof r.converter == "function" ? { fromAttribute: r.converter } : r.converter?.fromAttribute !== void 0 ? r.converter : Oe;
183
- this._$Em = i;
184
- const l = o.fromAttribute(t, r.type);
185
- this[i] = l ?? this._$Ej?.get(i) ?? l, this._$Em = null;
186
- }
187
- }
188
- requestUpdate(e, t, s) {
189
- if (e !== void 0) {
190
- const i = this.constructor, r = this[e];
191
- if (s ??= i.getPropertyOptions(e), !((s.hasChanged ?? ft)(r, t) || s.useDefault && s.reflect && r === this._$Ej?.get(e) && !this.hasAttribute(i._$Eu(e, s)))) return;
192
- this.C(e, t, s);
193
- }
194
- this.isUpdatePending === !1 && (this._$ES = this._$EP());
195
- }
196
- C(e, t, { useDefault: s, reflect: i, wrapped: r }, o) {
197
- s && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(e) && (this._$Ej.set(e, o ?? t ?? this[e]), r !== !0 || o !== void 0) || (this._$AL.has(e) || (this.hasUpdated || s || (t = void 0), this._$AL.set(e, t)), i === !0 && this._$Em !== e && (this._$Eq ??= /* @__PURE__ */ new Set()).add(e));
198
- }
199
- async _$EP() {
200
- this.isUpdatePending = !0;
201
- try {
202
- await this._$ES;
203
- } catch (t) {
204
- Promise.reject(t);
205
- }
206
- const e = this.scheduleUpdate();
207
- return e != null && await e, !this.isUpdatePending;
208
- }
209
- scheduleUpdate() {
210
- return this.performUpdate();
211
- }
212
- performUpdate() {
213
- if (!this.isUpdatePending) return;
214
- if (!this.hasUpdated) {
215
- if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
216
- for (const [i, r] of this._$Ep) this[i] = r;
217
- this._$Ep = void 0;
218
- }
219
- const s = this.constructor.elementProperties;
220
- if (s.size > 0) for (const [i, r] of s) {
221
- const { wrapped: o } = r, l = this[i];
222
- o !== !0 || this._$AL.has(i) || l === void 0 || this.C(i, void 0, r, l);
223
- }
224
- }
225
- let e = !1;
226
- const t = this._$AL;
227
- try {
228
- e = this.shouldUpdate(t), e ? (this.willUpdate(t), this._$EO?.forEach(((s) => s.hostUpdate?.())), this.update(t)) : this._$EM();
229
- } catch (s) {
230
- throw e = !1, this._$EM(), s;
231
- }
232
- e && this._$AE(t);
233
- }
234
- willUpdate(e) {
235
- }
236
- _$AE(e) {
237
- this._$EO?.forEach(((t) => t.hostUpdated?.())), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(e)), this.updated(e);
238
- }
239
- _$EM() {
240
- this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
241
- }
242
- get updateComplete() {
243
- return this.getUpdateComplete();
244
- }
245
- getUpdateComplete() {
246
- return this._$ES;
247
- }
248
- shouldUpdate(e) {
249
- return !0;
250
- }
251
- update(e) {
252
- this._$Eq &&= this._$Eq.forEach(((t) => this._$ET(t, this[t]))), this._$EM();
253
- }
254
- updated(e) {
255
- }
256
- firstUpdated(e) {
257
- }
258
- };
259
- re.elementStyles = [], re.shadowRootOptions = { mode: "open" }, re[we("elementProperties")] = /* @__PURE__ */ new Map(), re[we("finalized")] = /* @__PURE__ */ new Map(), us?.({ ReactiveElement: re }), (Re.reactiveElementVersions ??= []).push("2.1.1");
260
- /**
261
- * @license
262
- * Copyright 2017 Google LLC
263
- * SPDX-License-Identifier: BSD-3-Clause
264
- */
265
- const pt = globalThis, Te = pt.trustedTypes, Et = Te ? Te.createPolicy("lit-html", { createHTML: (n) => n }) : void 0, jt = "$lit$", Z = `lit$${Math.random().toFixed(9).slice(2)}$`, Bt = "?" + Z, hs = `<${Bt}>`, ne = document, $e = () => ne.createComment(""), Ae = (n) => n === null || typeof n != "object" && typeof n != "function", gt = Array.isArray, ds = (n) => gt(n) || typeof n?.[Symbol.iterator] == "function", Ge = `[
266
- \f\r]`, me = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, Ct = /-->/g, Pt = />/g, te = RegExp(`>|${Ge}(?:([^\\s"'>=/]+)(${Ge}*=${Ge}*(?:[^
267
- \f\r"'\`<>=]|("|')|))|$)`, "g"), Lt = /'/g, Mt = /"/g, zt = /^(?:script|style|textarea|title)$/i, fs = (n) => (e, ...t) => ({ _$litType$: n, strings: e, values: t }), ps = fs(1), ce = Symbol.for("lit-noChange"), L = Symbol.for("lit-nothing"), It = /* @__PURE__ */ new WeakMap(), se = ne.createTreeWalker(ne, 129);
268
- function Ft(n, e) {
269
- if (!gt(n) || !n.hasOwnProperty("raw")) throw Error("invalid template strings array");
270
- return Et !== void 0 ? Et.createHTML(e) : e;
271
- }
272
- const gs = (n, e) => {
273
- const t = n.length - 1, s = [];
274
- let i, r = e === 2 ? "<svg>" : e === 3 ? "<math>" : "", o = me;
275
- for (let l = 0; l < t; l++) {
276
- const c = n[l];
277
- let f, d, u = -1, _ = 0;
278
- for (; _ < c.length && (o.lastIndex = _, d = o.exec(c), d !== null); ) _ = o.lastIndex, o === me ? d[1] === "!--" ? o = Ct : d[1] !== void 0 ? o = Pt : d[2] !== void 0 ? (zt.test(d[2]) && (i = RegExp("</" + d[2], "g")), o = te) : d[3] !== void 0 && (o = te) : o === te ? d[0] === ">" ? (o = i ?? me, u = -1) : d[1] === void 0 ? u = -2 : (u = o.lastIndex - d[2].length, f = d[1], o = d[3] === void 0 ? te : d[3] === '"' ? Mt : Lt) : o === Mt || o === Lt ? o = te : o === Ct || o === Pt ? o = me : (o = te, i = void 0);
279
- const T = o === te && n[l + 1].startsWith("/>") ? " " : "";
280
- r += o === me ? c + hs : u >= 0 ? (s.push(f), c.slice(0, u) + jt + c.slice(u) + Z + T) : c + Z + (u === -2 ? l : T);
281
- }
282
- return [Ft(n, r + (n[t] || "<?>") + (e === 2 ? "</svg>" : e === 3 ? "</math>" : "")), s];
283
- };
284
- class Se {
285
- constructor({ strings: e, _$litType$: t }, s) {
286
- let i;
287
- this.parts = [];
288
- let r = 0, o = 0;
289
- const l = e.length - 1, c = this.parts, [f, d] = gs(e, t);
290
- if (this.el = Se.createElement(f, s), se.currentNode = this.el.content, t === 2 || t === 3) {
291
- const u = this.el.content.firstChild;
292
- u.replaceWith(...u.childNodes);
293
- }
294
- for (; (i = se.nextNode()) !== null && c.length < l; ) {
295
- if (i.nodeType === 1) {
296
- if (i.hasAttributes()) for (const u of i.getAttributeNames()) if (u.endsWith(jt)) {
297
- const _ = d[o++], T = i.getAttribute(u).split(Z), a = /([.?@])?(.*)/.exec(_);
298
- c.push({ type: 1, index: r, name: a[2], strings: T, ctor: a[1] === "." ? ms : a[1] === "?" ? ys : a[1] === "@" ? ws : De }), i.removeAttribute(u);
299
- } else u.startsWith(Z) && (c.push({ type: 6, index: r }), i.removeAttribute(u));
300
- if (zt.test(i.tagName)) {
301
- const u = i.textContent.split(Z), _ = u.length - 1;
302
- if (_ > 0) {
303
- i.textContent = Te ? Te.emptyScript : "";
304
- for (let T = 0; T < _; T++) i.append(u[T], $e()), se.nextNode(), c.push({ type: 2, index: ++r });
305
- i.append(u[_], $e());
306
- }
307
- }
308
- } else if (i.nodeType === 8) if (i.data === Bt) c.push({ type: 2, index: r });
309
- else {
310
- let u = -1;
311
- for (; (u = i.data.indexOf(Z, u + 1)) !== -1; ) c.push({ type: 7, index: r }), u += Z.length - 1;
312
- }
313
- r++;
314
- }
315
- }
316
- static createElement(e, t) {
317
- const s = ne.createElement("template");
318
- return s.innerHTML = e, s;
319
- }
320
- }
321
- function ue(n, e, t = n, s) {
322
- if (e === ce) return e;
323
- let i = s !== void 0 ? t._$Co?.[s] : t._$Cl;
324
- const r = Ae(e) ? void 0 : e._$litDirective$;
325
- return i?.constructor !== r && (i?._$AO?.(!1), r === void 0 ? i = void 0 : (i = new r(n), i._$AT(n, t, s)), s !== void 0 ? (t._$Co ??= [])[s] = i : t._$Cl = i), i !== void 0 && (e = ue(n, i._$AS(n, e.values), i, s)), e;
326
- }
327
- class _s {
328
- constructor(e, t) {
329
- this._$AV = [], this._$AN = void 0, this._$AD = e, this._$AM = t;
330
- }
331
- get parentNode() {
332
- return this._$AM.parentNode;
333
- }
334
- get _$AU() {
335
- return this._$AM._$AU;
336
- }
337
- u(e) {
338
- const { el: { content: t }, parts: s } = this._$AD, i = (e?.creationScope ?? ne).importNode(t, !0);
339
- se.currentNode = i;
340
- let r = se.nextNode(), o = 0, l = 0, c = s[0];
341
- for (; c !== void 0; ) {
342
- if (o === c.index) {
343
- let f;
344
- c.type === 2 ? f = new ke(r, r.nextSibling, this, e) : c.type === 1 ? f = new c.ctor(r, c.name, c.strings, this, e) : c.type === 6 && (f = new bs(r, this, e)), this._$AV.push(f), c = s[++l];
345
- }
346
- o !== c?.index && (r = se.nextNode(), o++);
347
- }
348
- return se.currentNode = ne, i;
349
- }
350
- p(e) {
351
- let t = 0;
352
- for (const s of this._$AV) s !== void 0 && (s.strings !== void 0 ? (s._$AI(e, s, t), t += s.strings.length - 2) : s._$AI(e[t])), t++;
353
- }
354
- }
355
- class ke {
356
- get _$AU() {
357
- return this._$AM?._$AU ?? this._$Cv;
358
- }
359
- constructor(e, t, s, i) {
360
- this.type = 2, this._$AH = L, this._$AN = void 0, this._$AA = e, this._$AB = t, this._$AM = s, this.options = i, this._$Cv = i?.isConnected ?? !0;
361
- }
362
- get parentNode() {
363
- let e = this._$AA.parentNode;
364
- const t = this._$AM;
365
- return t !== void 0 && e?.nodeType === 11 && (e = t.parentNode), e;
366
- }
367
- get startNode() {
368
- return this._$AA;
369
- }
370
- get endNode() {
371
- return this._$AB;
372
- }
373
- _$AI(e, t = this) {
374
- e = ue(this, e, t), Ae(e) ? e === L || e == null || e === "" ? (this._$AH !== L && this._$AR(), this._$AH = L) : e !== this._$AH && e !== ce && this._(e) : e._$litType$ !== void 0 ? this.$(e) : e.nodeType !== void 0 ? this.T(e) : ds(e) ? this.k(e) : this._(e);
375
- }
376
- O(e) {
377
- return this._$AA.parentNode.insertBefore(e, this._$AB);
378
- }
379
- T(e) {
380
- this._$AH !== e && (this._$AR(), this._$AH = this.O(e));
381
- }
382
- _(e) {
383
- this._$AH !== L && Ae(this._$AH) ? this._$AA.nextSibling.data = e : this.T(ne.createTextNode(e)), this._$AH = e;
384
- }
385
- $(e) {
386
- const { values: t, _$litType$: s } = e, i = typeof s == "number" ? this._$AC(e) : (s.el === void 0 && (s.el = Se.createElement(Ft(s.h, s.h[0]), this.options)), s);
387
- if (this._$AH?._$AD === i) this._$AH.p(t);
388
- else {
389
- const r = new _s(i, this), o = r.u(this.options);
390
- r.p(t), this.T(o), this._$AH = r;
391
- }
392
- }
393
- _$AC(e) {
394
- let t = It.get(e.strings);
395
- return t === void 0 && It.set(e.strings, t = new Se(e)), t;
396
- }
397
- k(e) {
398
- gt(this._$AH) || (this._$AH = [], this._$AR());
399
- const t = this._$AH;
400
- let s, i = 0;
401
- for (const r of e) i === t.length ? t.push(s = new ke(this.O($e()), this.O($e()), this, this.options)) : s = t[i], s._$AI(r), i++;
402
- i < t.length && (this._$AR(s && s._$AB.nextSibling, i), t.length = i);
403
- }
404
- _$AR(e = this._$AA.nextSibling, t) {
405
- for (this._$AP?.(!1, !0, t); e !== this._$AB; ) {
406
- const s = e.nextSibling;
407
- e.remove(), e = s;
408
- }
409
- }
410
- setConnected(e) {
411
- this._$AM === void 0 && (this._$Cv = e, this._$AP?.(e));
412
- }
413
- }
414
- class De {
415
- get tagName() {
416
- return this.element.tagName;
417
- }
418
- get _$AU() {
419
- return this._$AM._$AU;
420
- }
421
- constructor(e, t, s, i, r) {
422
- this.type = 1, this._$AH = L, this._$AN = void 0, this.element = e, this.name = t, this._$AM = i, this.options = r, s.length > 2 || s[0] !== "" || s[1] !== "" ? (this._$AH = Array(s.length - 1).fill(new String()), this.strings = s) : this._$AH = L;
423
- }
424
- _$AI(e, t = this, s, i) {
425
- const r = this.strings;
426
- let o = !1;
427
- if (r === void 0) e = ue(this, e, t, 0), o = !Ae(e) || e !== this._$AH && e !== ce, o && (this._$AH = e);
428
- else {
429
- const l = e;
430
- let c, f;
431
- for (e = r[0], c = 0; c < r.length - 1; c++) f = ue(this, l[s + c], t, c), f === ce && (f = this._$AH[c]), o ||= !Ae(f) || f !== this._$AH[c], f === L ? e = L : e !== L && (e += (f ?? "") + r[c + 1]), this._$AH[c] = f;
432
- }
433
- o && !i && this.j(e);
434
- }
435
- j(e) {
436
- e === L ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, e ?? "");
437
- }
438
- }
439
- class ms extends De {
440
- constructor() {
441
- super(...arguments), this.type = 3;
442
- }
443
- j(e) {
444
- this.element[this.name] = e === L ? void 0 : e;
445
- }
446
- }
447
- class ys extends De {
448
- constructor() {
449
- super(...arguments), this.type = 4;
450
- }
451
- j(e) {
452
- this.element.toggleAttribute(this.name, !!e && e !== L);
453
- }
454
- }
455
- class ws extends De {
456
- constructor(e, t, s, i, r) {
457
- super(e, t, s, i, r), this.type = 5;
458
- }
459
- _$AI(e, t = this) {
460
- if ((e = ue(this, e, t, 0) ?? L) === ce) return;
461
- const s = this._$AH, i = e === L && s !== L || e.capture !== s.capture || e.once !== s.once || e.passive !== s.passive, r = e !== L && (s === L || i);
462
- i && this.element.removeEventListener(this.name, this, s), r && this.element.addEventListener(this.name, this, e), this._$AH = e;
463
- }
464
- handleEvent(e) {
465
- typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, e) : this._$AH.handleEvent(e);
466
- }
467
- }
468
- class bs {
469
- constructor(e, t, s) {
470
- this.element = e, this.type = 6, this._$AN = void 0, this._$AM = t, this.options = s;
471
- }
472
- get _$AU() {
473
- return this._$AM._$AU;
474
- }
475
- _$AI(e) {
476
- ue(this, e);
477
- }
478
- }
479
- const vs = pt.litHtmlPolyfillSupport;
480
- vs?.(Se, ke), (pt.litHtmlVersions ??= []).push("3.3.1");
481
- const $s = (n, e, t) => {
482
- const s = t?.renderBefore ?? e;
483
- let i = s._$litPart$;
484
- if (i === void 0) {
485
- const r = t?.renderBefore ?? null;
486
- s._$litPart$ = i = new ke(e.insertBefore($e(), r), r, void 0, t ?? {});
487
- }
488
- return i._$AI(n), i;
489
- };
490
- /**
491
- * @license
492
- * Copyright 2017 Google LLC
493
- * SPDX-License-Identifier: BSD-3-Clause
494
- */
495
- const _t = globalThis;
496
- class be extends re {
497
- constructor() {
498
- super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
499
- }
500
- createRenderRoot() {
501
- const e = super.createRenderRoot();
502
- return this.renderOptions.renderBefore ??= e.firstChild, e;
503
- }
504
- update(e) {
505
- const t = this.render();
506
- this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(e), this._$Do = $s(t, this.renderRoot, this.renderOptions);
507
- }
508
- connectedCallback() {
509
- super.connectedCallback(), this._$Do?.setConnected(!0);
510
- }
511
- disconnectedCallback() {
512
- super.disconnectedCallback(), this._$Do?.setConnected(!1);
513
- }
514
- render() {
515
- return ce;
516
- }
517
- }
518
- be._$litElement$ = !0, be.finalized = !0, _t.litElementHydrateSupport?.({ LitElement: be });
519
- const As = _t.litElementPolyfillSupport;
520
- As?.({ LitElement: be });
521
- (_t.litElementVersions ??= []).push("4.2.1");
522
- /**
523
- * @license
524
- * Copyright 2017 Google LLC
525
- * SPDX-License-Identifier: BSD-3-Clause
526
- */
527
- const Ss = (n) => (e, t) => {
528
- t !== void 0 ? t.addInitializer((() => {
529
- customElements.define(n, e);
530
- })) : customElements.define(n, e);
531
- };
532
- /**
533
- * @license
534
- * Copyright 2017 Google LLC
535
- * SPDX-License-Identifier: BSD-3-Clause
536
- */
537
- const ks = { attribute: !0, type: String, converter: Oe, reflect: !1, hasChanged: ft }, xs = (n = ks, e, t) => {
538
- const { kind: s, metadata: i } = t;
539
- let r = globalThis.litPropertyMetadata.get(i);
540
- if (r === void 0 && globalThis.litPropertyMetadata.set(i, r = /* @__PURE__ */ new Map()), s === "setter" && ((n = Object.create(n)).wrapped = !0), r.set(t.name, n), s === "accessor") {
541
- const { name: o } = t;
542
- return { set(l) {
543
- const c = e.get.call(this);
544
- e.set.call(this, l), this.requestUpdate(o, c, n);
545
- }, init(l) {
546
- return l !== void 0 && this.C(o, void 0, n, l), l;
547
- } };
548
- }
549
- if (s === "setter") {
550
- const { name: o } = t;
551
- return function(l) {
552
- const c = this[o];
553
- e.call(this, l), this.requestUpdate(o, c, n);
554
- };
555
- }
556
- throw Error("Unsupported decorator location: " + s);
557
- };
558
- function O(n) {
559
- return (e, t) => typeof t == "object" ? xs(n, e, t) : ((s, i, r) => {
560
- const o = i.hasOwnProperty(r);
561
- return i.constructor.createProperty(r, s), o ? Object.getOwnPropertyDescriptor(i, r) : void 0;
562
- })(n, e, t);
563
- }
564
- function _n(n) {
565
- return n;
566
- }
567
- const Es = {
568
- load: "first-use",
569
- trigger: "mutation",
570
- debounceMs: 50,
571
- consentAboveMB: 30,
572
- allowWasmUpToMB: 50,
573
- timeoutMs: 6e4,
574
- maxItems: 2e3,
575
- maxChars: 2e3,
576
- persist: !1,
577
- resultsCacheBytes: 20 * 1024 * 1024
578
- };
579
- let tt = null;
580
- const st = /* @__PURE__ */ new Set();
581
- function Cs(n) {
582
- tt = { ...n, defaults: { ...Es, ...n.defaults } };
583
- for (const e of st) e(tt);
584
- }
585
- function Ps() {
586
- return tt;
587
- }
588
- function Ht(n) {
589
- return st.add(n), () => st.delete(n);
590
- }
591
- const Ls = /\$\{|\{\$/;
592
- function Ms(n) {
593
- return Ls.test(n);
594
- }
595
- function oe(n) {
596
- const e = typeof n == "string" ? n : n.path;
597
- if (Ms(e))
598
- throw new Error(
599
- "Static publisher path required for get/set/dp. Use @subscribe, @publish, or @handle for dynamic DataProviderKey paths."
600
- );
601
- return e;
602
- }
603
- const Ke = "1";
604
- function Is(n) {
605
- const e = n.trim();
606
- if (!e) return !1;
607
- try {
608
- const t = new URL(e, "https://example.invalid/");
609
- return t.protocol === "http:" || t.protocol === "https:" || t.protocol === "blob:";
610
- } catch {
611
- return !1;
612
- }
613
- }
614
- class P {
615
- /** Langue page : `SonicSelectedLanguage` localStorage, sinon `<html lang>`. */
616
- static getLanguage() {
617
- const e = document.documentElement.lang;
618
- return localStorage.getItem("SonicSelectedLanguage") || e;
619
- }
620
- static getCookies() {
621
- return document.cookie.split(";").reduce((e, t) => {
622
- const s = t.indexOf("=");
623
- return e[t.substring(0, s).trim()] = t.substring(
624
- s + 1
625
- ), e;
626
- }, {});
627
- }
628
- /**
629
- * Ancêtre suivant dans l'arbre composé : slot de projection, sinon parentNode / shadow host.
630
- * Nécessaire pour trouver un scroller/clipper dans le shadow d'un ancêtre (ex. #modal.custom-scroll).
631
- */
632
- static nextComposedAncestor(e) {
633
- return e instanceof Element && e.assignedSlot ? e.assignedSlot : e.parentNode || e.host || null;
634
- }
635
- static everyAncestors(e, t) {
636
- let s = e;
637
- for (; s; ) {
638
- if (!t(s)) return;
639
- s = s.parentNode || s.host;
640
- }
641
- }
642
- static overflowMatches(e, t) {
643
- return t.includes(e.overflowY) || t.includes(e.overflowX);
644
- }
645
- static findAncestorByOverflow(e, t) {
646
- let s = e;
647
- for (; s; ) {
648
- if (s instanceof Element && s.nodeType === 1) {
649
- const i = window.getComputedStyle(s);
650
- if (P.overflowMatches(i, t))
651
- return s;
652
- }
653
- s = P.nextComposedAncestor(s);
654
- }
655
- return null;
656
- }
657
- /**
658
- * Ancêtre qui clippe (inclut overflow:hidden) — ex. clamp de sonic-pop.
659
- * Reconnaît aussi overflow:overlay (.custom-scroll) et traverse les slots.
660
- */
661
- static getScrollableAncestor(e) {
662
- return P.findAncestorByOverflow(e, [
663
- "auto",
664
- "scroll",
665
- "hidden",
666
- "overlay"
667
- ]);
668
- }
669
- /**
670
- * Ancêtre réellement scrollable (pas overflow:hidden) — ex. restore scroll Safari de sonic-queue.
671
- */
672
- static getScrollingAncestor(e) {
673
- return P.findAncestorByOverflow(e, ["auto", "scroll", "overlay"]);
674
- }
675
- /** Noms d'attribut DOM à tester (Lit reflect → minuscules, ex. serviceURL → serviceurl). */
676
- static scopeAttributeNames(e) {
677
- const t = e.toLowerCase();
678
- return t === e ? [e] : [e, t];
679
- }
680
- static readScopeAttributeOnElement(e, t) {
681
- for (const s of P.scopeAttributeNames(t))
682
- if (e.hasAttribute(s))
683
- return e.getAttribute(s) ?? "";
684
- return null;
685
- }
686
- /**
687
- * Première valeur d'attribut trouvée en remontant (parentNode / shadow host).
688
- * Ne traverse pas les slots — volontairement distinct de `nextComposedAncestor`.
689
- */
690
- static getAncestorAttributeValue(e, t) {
691
- if (!e) return null;
692
- let s = e;
693
- for (; s; ) {
694
- if (s instanceof HTMLElement) {
695
- const r = P.readScopeAttributeOnElement(s, t);
696
- if (r != null) return r;
697
- }
698
- const i = s.parentNode || s.host;
699
- if (!i) break;
700
- s = i;
701
- }
702
- return null;
703
- }
704
- /**
705
- * Petite fonction utilitaire pour retourner la configuration a passer à l'utilitaire API
706
- * Utilisée pour la configuration du wording / de la traduction ainsi que par le mixin fetcher par exemple
707
- */
708
- static getApiConfiguration(e) {
709
- const t = P.getAncestorAttributeValue(e, "token"), s = P.getAncestorAttributeValue(e, "addHTTPResponse") != null, i = P.getAncestorAttributeValue(e, "serviceURL");
710
- let r = null, o = null;
711
- const l = P.getAncestorAttributeValue(e, "tokenProvider"), c = P.getAncestorAttributeValue(e, "eventsApiToken");
712
- t || (r = P.getAncestorAttributeValue(e, "userName"), o = P.getAncestorAttributeValue(e, "password"));
713
- const f = P.getAncestorAttributeValue(
714
- e,
715
- "credentials"
716
- ) || void 0, d = e.getAttribute("cache"), u = e.hasAttribute("blockUntilDone"), _ = e.hasAttribute("keepAlive");
717
- return {
718
- serviceURL: i,
719
- token: t,
720
- userName: r,
721
- password: o,
722
- authToken: c,
723
- tokenProvider: l,
724
- addHTTPResponse: s,
725
- credentials: f,
726
- cache: d,
727
- blockUntilDone: u,
728
- keepAlive: _
729
- };
730
- }
731
- /** Ancêtre dont le `nodeName` (minuscules) égale `selector` (ex. `"form"`). */
732
- static getClosestElement(e, t) {
733
- let s = e;
734
- for (; s && !(s.nodeName && s.nodeName.toLowerCase() === t); ) {
735
- const i = s.parentNode || s.host;
736
- if (!i) {
737
- s = null;
738
- break;
739
- }
740
- s = i;
741
- }
742
- return s?.nodeName ? s : null;
743
- }
744
- static getClosestForm(e) {
745
- return P.getClosestElement(e, "form");
746
- }
747
- /**
748
- * Ancêtres dont le tagName matche (insensible à la casse), via parentNode / shadow host.
749
- */
750
- static getAncestorsByTagNames(e, t) {
751
- const s = new Set(t.map((o) => o.toLowerCase())), i = [];
752
- let r = e.parentNode || e.host;
753
- for (; r; )
754
- r instanceof Element && s.has(r.tagName.toLowerCase()) && i.push(r), r = r.parentNode || r.host;
755
- return i;
756
- }
757
- /**
758
- * Ancêtres qui matchent l'un des sélecteurs CSS (`element.matches`), via parentNode / shadow host.
759
- */
760
- static getAncestorsBySelectors(e, t) {
761
- const s = [];
762
- let i = e.parentNode || e.host;
763
- for (; i; ) {
764
- if (i instanceof Element)
765
- for (const r of t)
766
- try {
767
- if (i.matches(r)) {
768
- s.push(i);
769
- break;
770
- }
771
- } catch {
772
- }
773
- i = i.parentNode || i.host;
774
- }
775
- return s;
776
- }
777
- /**
778
- * Charge un JS ; true si succès, false sinon.
779
- * `.es.js` / `?module` → `type="module"`. Déduplique sur `script.src` absolu.
780
- * Refuse les schémas non scriptables (`javascript:`, `data:`, …).
781
- */
782
- static async loadJS(e) {
783
- if (!Is(e)) return !1;
784
- const t = typeof document < "u" ? new URL(e, document.baseURI).href : e, s = Array.from(document.scripts).find(
785
- (r) => r.src === t
786
- );
787
- if (s)
788
- return s.dataset.concordeLoaded === Ke ? !0 : new Promise((r) => {
789
- let o = !1;
790
- const l = (f) => {
791
- o || (o = !0, f && (s.dataset.concordeLoaded = Ke), r(f));
792
- };
793
- s.addEventListener("load", () => l(!0), { once: !0 }), s.addEventListener("error", () => l(!1), {
794
- once: !0
795
- });
796
- const c = s.readyState;
797
- if (c === "complete" || c === "loaded") {
798
- l(!0);
799
- return;
800
- }
801
- Promise.resolve().then(() => {
802
- Promise.resolve().then(() => {
803
- o || l(!0);
804
- });
805
- });
806
- });
807
- const i = /\.es\.js(\?|#|$)/.test(e) || /[?&]module(?:&|=|$)/.test(e);
808
- return new Promise((r) => {
809
- const o = document.createElement("script");
810
- o.src = e, i && (o.type = "module"), o.onload = () => {
811
- o.dataset.concordeLoaded = Ke, r(!0);
812
- }, o.onerror = () => r(!1), document.head.appendChild(o);
813
- });
814
- }
815
- /** Charge un CSS ; résout toujours `true` (historique, y compris en erreur). */
816
- static async loadCSS(e) {
817
- return new Promise((t) => {
818
- const s = document.createElement("link");
819
- s.type = "text/css", s.rel = "stylesheet", s.href = e, s.onload = () => t(!0), s.onerror = () => t(!0), document.head.appendChild(s);
820
- });
821
- }
822
- }
823
- class W {
824
- /**
825
- * Effectue une comparaison d'égalité non profonde entre deux objets.
826
- */
827
- /*eslint-disable @typescript-eslint/no-explicit-any*/
828
- static shallowEqual(e, t, s = !0) {
829
- const i = Object.keys(e), r = Object.keys(t);
830
- if (i.length !== r.length && s)
831
- return !1;
832
- for (const o of i) {
833
- const l = e[o], c = t[o];
834
- if (s ? l !== c : l != c)
835
- return !1;
836
- }
837
- return !0;
838
- }
839
- /*eslint-enable @typescript-eslint/no-explicit-any*/
840
- /**
841
- * Effectue une comparaison d'égalité profonde entre deux objets.
842
- */
843
- /*eslint-disable @typescript-eslint/no-explicit-any*/
844
- static deepEqual(e, t, s = !0) {
845
- const i = Object.keys(e), r = Object.keys(t);
846
- if (i.length !== r.length && s)
847
- return !1;
848
- for (const o of i) {
849
- const l = e[o], c = t[o], f = W.isObject(l) && W.isObject(c), d = s ? l !== c : l != c;
850
- if (f && !W.deepEqual(l, c) || !f && d)
851
- return !1;
852
- }
853
- return !0;
854
- }
855
- /*eslint-enable @typescript-eslint/no-explicit-any*/
856
- /**
857
- * @returns true si l'objet est un objet ou un tableau (qui est un objet). mais false si null (car sinon typeof null "object")
858
- */
859
- static isObject(e) {
860
- return e != null && typeof e == "object";
861
- }
862
- /**
863
- * @returns true si l'argument est null ou undefined
864
- */
865
- static isUndefindOrNull(e) {
866
- return e == null;
867
- }
868
- static isEmpty(e) {
869
- return W.isUndefindOrNull(e) ? !0 : Object.keys(e).length === 0;
870
- }
871
- /**
872
- * traverse l'objet pour obtenir la valeur a l'adresse donnée via le tableau de clés pathArray.
873
- * Si extendValues = true, les propriétés des objets parents sont copiées au fur et a mesure de la descente dans la hierarchie, avant l'assignation des propriétés de l'objet lui même.
874
- */
875
- /*eslint-disable @typescript-eslint/no-explicit-any*/
876
- static traverse(e, t, s = !1) {
877
- for (const i of t) {
878
- const r = e[i];
879
- if (r === void 0)
880
- return;
881
- s && W.isObject(r) ? e = Object.assign(Array.isArray(r) ? [] : {}, e, r) : e = e[i];
882
- }
883
- return e;
884
- }
885
- static traverseDotNotation(e, t, s = !1) {
886
- return W.traverse(e, t.split("."), s);
887
- }
888
- /*eslint-enable @typescript-eslint/no-explicit-any*/
889
- static getURLSearchArray(e, t = "") {
890
- let s = [];
891
- for (let i in e) {
892
- const r = e[i];
893
- t && (i = t + "[" + i + "]"), W.isObject(r) ? s = [
894
- ...s,
895
- ...this.getURLSearchArray(r, i)
896
- ] : s.push(`${i}=${r}`);
897
- }
898
- return s;
899
- }
900
- static getURLSearchString(e) {
901
- return W.getURLSearchArray(e, "").join("&");
902
- }
903
- }
904
- W.traverseDotNotation;
905
- let qt = "sonic";
906
- typeof __SONIC_PREFIX__ < "u" && (qt = __SONIC_PREFIX__);
907
- let Ot = qt.replace(
908
- /-([a-z])/g,
909
- (n) => n[1].toUpperCase()
910
- );
911
- const Os = Ot.charAt(0).toUpperCase() + Ot.slice(1);
912
- function xe(n) {
913
- return Object.prototype.hasOwnProperty.call(n, "__value");
914
- }
915
- function X(n) {
916
- return typeof n == "object" && n !== null;
917
- }
918
- let he = "sonic";
919
- typeof __SONIC_PREFIX__ > "u" && (he = "sonic");
920
- const Xe = he == "sonic" ? "publisher-proxies-data" : he + "-publisher-proxies-data", Y = class Y {
921
- constructor(e, t, s) {
922
- for (this._proxies_ = /* @__PURE__ */ new Map(), this._is_savable_ = !1, this._expiration_delay_ = 1e3 * 60 * 60 * 12, this._invalidate_on_page_show_ = !1, this._invalidateListeners_ = /* @__PURE__ */ new Set(), this._formInvalidateListeners_ = /* @__PURE__ */ new Set(), this._assignListeners_ = /* @__PURE__ */ new Set(), this._mutationListeners_ = /* @__PURE__ */ new Set(), this._fillListeners_ = /* @__PURE__ */ new Set(), this._templateFillListeners_ = /* @__PURE__ */ new Set(), this._lockInternalMutationPublishing_ = !1, this._instanceCounter_ = 0, this._assignmentId_ = 0, this._value_ = e, this.parent = t || null, this._parentKey_ = s, this.root = this, this._instanceCounter_ = 0; this.root.parent; )
923
- this.root = this.root.parent;
924
- }
925
- /**
926
- * Supprime le proxy et ses sous proxy
927
- * Supprime les écouteurs associés
928
- */
929
- delete() {
930
- for (const e in this._proxies_.keys())
931
- e != "_parent_" && this._proxies_.get(e)?.delete();
932
- this._invalidateListeners_.clear(), this._formInvalidateListeners_.clear(), this._assignListeners_.clear(), this._mutationListeners_.clear(), this._fillListeners_.clear(), this._templateFillListeners_.clear(), this._proxies_.clear(), Y.instances.delete(this._instanceCounter_);
933
- }
934
- /**
935
- * Utile pour savoir si quelque chose est en écoute d'une modification sur le proxy via une des methodes associées
936
- */
937
- hasListener() {
938
- 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;
939
- }
940
- _publishInternalMutation_(e = !1) {
941
- if (this._mutationListeners_.forEach(
942
- (t) => t()
943
- ), this._is_savable_ && !F.changed) {
944
- F.changed = !0, F.saveId++;
945
- const t = F.saveId;
946
- setTimeout(
947
- () => F.getInstance().saveToLocalStorage(t),
948
- 1e3
949
- );
950
- }
951
- e || this.parent && this.parent._publishInternalMutation_();
952
- }
953
- async _publishAssignement_(e = !1) {
954
- if (this._assignmentId_++, this._assignmentId_ !== this._assignmentId_) return;
955
- const s = this.get();
956
- this._assignListeners_.forEach((i) => {
957
- i(s);
958
- }), this._publishInternalMutation_(e);
959
- }
960
- _publishInvalidation_() {
961
- this._invalidateListeners_.forEach((e) => e());
962
- }
963
- _publishFormInvalidation_() {
964
- this._formInvalidateListeners_.forEach(
965
- (e) => e()
966
- );
967
- }
968
- _publishDynamicFilling_(e, t) {
969
- this._fillListeners_.forEach((s) => {
970
- s[e] !== t && (s[e] = t);
971
- }), this._publishTemplateFilling_(e, t);
972
- }
973
- _publishTemplateFilling_(e, t) {
974
- this._templateFillListeners_.forEach((s) => {
975
- const i = Object.getOwnPropertyDescriptor(s, e);
976
- i && !i.set && !i.writable || (s.propertyMap && s.propertyMap[e] && (e = s.propertyMap[e]), typeof s[e] < "u" && s[e] !== t && (s[e] = t));
977
- });
978
- }
979
- /**
980
- * Appel la fonction "handler" (passée en paramettre) lorsque la valeur gérée par le proxy change par assignation
981
- * hanlder reçois alors la nouvelle valeur interne du proxy en paramètre
982
- */
983
- onAssign(e, t = !0) {
984
- typeof e == "function" && (this._assignListeners_.has(e) || (this._assignListeners_.add(e), t && e(this.get())));
985
- }
986
- /**
987
- * Stop les appels de la fonction "handler" (passée en paramettre) lorsque la valeur gérée par le proxy change par assignation
988
- */
989
- offAssign(e) {
990
- this._assignListeners_.delete(e);
991
- }
992
- /**
993
- * Appel la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
994
- */
995
- onInvalidate(e) {
996
- typeof e == "function" && this._invalidateListeners_.add(e);
997
- }
998
- /**
999
- * Stop les appels de la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
1000
- */
1001
- offInvalidate(e) {
1002
- typeof e == "function" && this._invalidateListeners_.delete(e);
1003
- }
1004
- /**
1005
- * Flag les données comme étant invalides
1006
- */
1007
- invalidate() {
1008
- this._publishInvalidation_();
1009
- }
1010
- /**
1011
- * Appel la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
1012
- */
1013
- onFormInvalidate(e) {
1014
- typeof e == "function" && this._formInvalidateListeners_.add(e);
1015
- }
1016
- /**
1017
- * Stop les appels de la fonction "handler" (passée en paramettre) lorsque la donnée est flaggée comme invalide
1018
- */
1019
- offFormInvalidate(e) {
1020
- typeof e == "function" && this._formInvalidateListeners_.delete(e);
1021
- }
1022
- invalidateForm() {
1023
- this._publishFormInvalidation_();
1024
- }
1025
- /**
1026
- * Appel la fonction "handler" (passée en paramettre) lorsque quelque chose change la valeur gérée par le proxy quelque soit la profondeur de la donnée
1027
- *
1028
- */
1029
- onInternalMutation(e) {
1030
- typeof e == "function" && (this._mutationListeners_.add(e), e());
1031
- }
1032
- /**
1033
- * Stop les Appels de la fonction "handler" (passée en paramettre) lorsque quelque chose change la valeur gérée par le proxy quelque soit la profondeur de la donnée
1034
- */
1035
- offInternalMutation(e) {
1036
- typeof e == "function" && this._mutationListeners_.delete(e);
1037
- }
1038
- /**
1039
- * Maintient le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
1040
- * Remplit uniquement les valeurs déjà présentes dans l'objet / tableau passé en paramètre
1041
- */
1042
- startTemplateFilling(e) {
1043
- if (this._templateFillListeners_.add(e), typeof this._value_ == "object")
1044
- for (const t in this._value_) {
1045
- let s = t;
1046
- const i = this._value_[t];
1047
- e.propertyMap && e.propertyMap[t] && (s = e.propertyMap[t]), typeof e[t] < "u" && e[t] !== i && (e[s] = i);
1048
- }
1049
- }
1050
- /**
1051
- * Arrête de maintenir le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
1052
- */
1053
- stopTemplateFilling(e) {
1054
- this._templateFillListeners_.delete(e);
1055
- }
1056
- /**
1057
- * Maintient le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
1058
- * Remplit toute valeur qu'elle soit présente ou pas initialement dans l'objet
1059
- */
1060
- startDynamicFilling(e) {
1061
- this._fillListeners_.add(e);
1062
- for (const t in this._value_) {
1063
- const s = this._value_[t];
1064
- e[t] !== s && (e[t] = s);
1065
- }
1066
- }
1067
- /*
1068
- * Arrête de maintenir le remplissage de l'objet / tableau "handler" passé en paramètre avec les valeurs du proxy
1069
- */
1070
- stopDynamicFilling(e) {
1071
- this._fillListeners_.delete(e);
1072
- }
1073
- /**
1074
- * Assigne une nouvelle valeur au proxy ce qui déclenche la transmission de la donnée en fonction des "écouteurs" associés
1075
- */
1076
- set(e, t = !1) {
1077
- if (this._value_ === e || X(this._value_) && X(e) && e && xe(this._value_) && xe(e) && this._value_.__value === e.__value || !X(e) && e === this._value_.__value)
1078
- return !0;
1079
- this._value_ = X(e) ? e : { __value: e }, this._cachedGet_ = void 0;
1080
- const s = xe(this._value_);
1081
- if (this._parentKey_ && this.parent) {
1082
- const i = xe(this._value_) ? this._value_.__value : this._value_;
1083
- if (this.parent?.get() == null && this.parent?.get() == null)
1084
- if (isNaN(Number(this._parentKey_)))
1085
- this.parent.set({ [this._parentKey_]: i });
1086
- else {
1087
- const r = [];
1088
- r[Number(this._parentKey_)] = i, this.parent.set(r);
1089
- }
1090
- else
1091
- this.parent._value_[this._parentKey_] = i;
1092
- }
1093
- if (s)
1094
- return this._proxies_.forEach((i, r) => {
1095
- r != "_parent_" && (i.set(null), this._publishDynamicFilling_(r, null));
1096
- }), this._publishAssignement_(t), this.parent && this._parentKey_ && this.parent._publishDynamicFilling_(
1097
- this._parentKey_,
1098
- this._value_.__value
1099
- ), !0;
1100
- for (const i in this._value_)
1101
- this._value_[i] === void 0 && delete this._value_[i];
1102
- if (this._proxies_.forEach((i, r) => {
1103
- const o = this._value_[r];
1104
- r != "_parent_" && o === void 0 && o !== null && isNaN(Number(r)) && (i.set(null), this._publishDynamicFilling_(r, null));
1105
- }), this._publishAssignement_(), this.parent && this._parentKey_ && this.parent._publishDynamicFilling_(
1106
- this._parentKey_,
1107
- this._value_
1108
- ), X(this._value_))
1109
- for (const i in this._value_) {
1110
- const r = e[i], l = X(r) ? r : { __value: r };
1111
- if (!this._proxies_.has(i)) {
1112
- this._publishDynamicFilling_(i, r);
1113
- continue;
1114
- }
1115
- this._proxies_.get(i)?.set(l, !0), this._publishDynamicFilling_(i, r);
1116
- }
1117
- return !0;
1118
- }
1119
- get() {
1120
- if (Ts(this), this._cachedGet_ !== void 0) return this._cachedGet_;
1121
- if (Object.prototype.hasOwnProperty.call(this._value_, "__value")) {
1122
- const e = this._value_.__value;
1123
- return this._cachedGet_ = e ?? null;
1124
- }
1125
- return this._cachedGet_ = this._value_ != null ? this._value_ : null;
1126
- }
1127
- /**
1128
- * retourner le webcomponent auquel le proxy est associé
1129
- */
1130
- get $tag() {
1131
- return this._instanceCounter_ || (Y.instancesCounter++, this._instanceCounter_ = Y.instancesCounter), Y.instances.set(this._instanceCounter_, this), "<" + he + '-publisher-proxy publisher="' + this._instanceCounter_ + '"></' + he + "-publisher-proxy>";
1132
- }
1133
- };
1134
- Y.instances = /* @__PURE__ */ new Map(), Y.instancesCounter = 0;
1135
- let Ue = Y;
1136
- const Tt = [];
1137
- function Ts(n) {
1138
- Tt.length > 0 && Tt[0].add(n);
1139
- }
1140
- const m = class m {
1141
- constructor() {
1142
- if (this.enabledLocaStorageProxies = [], this.publishers = /* @__PURE__ */ new Map(), this.localStorageData = {}, this.isLocalStrorageReady = null, this.initialisedData = [], m.instance != null) throw "Singleton / use getInstance";
1143
- m.instance = this, this.isLocalStrorageReady = this.cleanStorageData(), m.initPageShowHandler();
1144
- }
1145
- static initPageShowHandler() {
1146
- m.pageShowHandlerInitialized || (m.pageShowHandlerInitialized = !0, window.addEventListener("pageshow", (e) => {
1147
- e.persisted && m.getInstance().invalidateAll();
1148
- }));
1149
- }
1150
- invalidateAll() {
1151
- this.publishers.forEach((e) => {
1152
- e._invalidate_on_page_show_ && e.invalidate();
1153
- });
1154
- }
1155
- async cleanStorageData() {
1156
- return new Promise((e) => {
1157
- (async () => {
1158
- try {
1159
- let s = localStorage.getItem(Xe), i = null;
1160
- if (s && (i = await this.decompress(s, "gzip")), i)
1161
- try {
1162
- this.localStorageData = JSON.parse(i);
1163
- } catch {
1164
- this.localStorageData = {};
1165
- }
1166
- else
1167
- s = await this.compress("{}", "gzip"), localStorage.setItem(Xe, s), this.localStorageData = {};
1168
- const r = 1e3 * 60 * 60 * 12;
1169
- for (const o in this.localStorageData) {
1170
- const l = this.localStorageData[o], c = (/* @__PURE__ */ new Date()).getTime() - (l.expirationDelayMs || r);
1171
- l.lastModifiationMS < c && delete this.localStorageData[o];
1172
- }
1173
- e(!0);
1174
- } catch {
1175
- window.requestAnimationFrame(() => {
1176
- e(!1);
1177
- }), console.warn("no publisher cache in this browser");
1178
- }
1179
- })();
1180
- });
1181
- }
1182
- /**
1183
- * PublisherManager est un singleton
1184
- */
1185
- static getInstance(e) {
1186
- if (e) {
1187
- const t = m.instances.get(e);
1188
- return t || (console.warn(
1189
- "No PublisherManager instance registered with id:",
1190
- e,
1191
- "creating new one"
1192
- ), new m());
1193
- }
1194
- return m.instance == null ? new m() : m.instance;
1195
- }
1196
- /**
1197
- * shortcut static pour obtenir un publisher vias sont id/adresse sans taper getInstance.
1198
- * Si le publisher n'existe pas, il est créé.
1199
- */
1200
- static get(e, t) {
1201
- return m.getInstance().get(e, t);
1202
- }
1203
- /**
1204
- * Obtenir un publisher vias sont id/adresse
1205
- * Si le publisher n'existe pas, il est créé.
1206
- */
1207
- async setLocalData(e, t) {
1208
- await this.isLocalStrorageReady, e.set(
1209
- this.localStorageData[t + "¤lang_" + P.getLanguage()]?.data || e.get()
1210
- );
1211
- }
1212
- get(e, t) {
1213
- const s = t?.localStorageMode === "enabled", i = t?.invalidateOnPageShow === !0;
1214
- if (!this.publishers.has(e)) {
1215
- const l = nt({});
1216
- this.set(e, l);
1217
- }
1218
- const r = this.publishers.get(e);
1219
- return s && this.initialisedData.indexOf(e) === -1 && (t?.expirationDelayMs && (r._expiration_delay_ = t.expirationDelayMs), r._is_savable_ = !0, this.initialisedData.push(e), this.setLocalData(r, e)), i && (r._invalidate_on_page_show_ = i), this.publishers.get(e);
1220
- }
1221
- /**
1222
- * Remplace un publisher pour l'id fourni par un autre.
1223
- * L'autre publisher n'est pas supprimé.
1224
- */
1225
- set(e, t) {
1226
- this.publishers.set(e, t);
1227
- }
1228
- /**
1229
- * @warning
1230
- * !!!!! ATTENTION !!!!!
1231
- * Il est fort à aprier que vous ne voulez pas utiliser cette methode
1232
- * Il s'agit d'une supression complete
1233
- * * du publisher de la liste
1234
- * * des bindings
1235
- * * de même que ses sous publishers
1236
- *
1237
- * UTILISEZ PLUTÔT la méthode publisher.set({}) pour réinitialiser un publisher sans perdre les ecouteurs
1238
- */
1239
- delete(e) {
1240
- return this.publishers.has(e) ? (this.publishers.delete(e), !0) : !1;
1241
- }
1242
- async saveToLocalStorage(e = 0) {
1243
- if (!(e !== m.saveId && e % 10 != 0))
1244
- try {
1245
- if (!m.changed || m.saving) return;
1246
- m.saving = !0, m.changed = !1;
1247
- const t = Array.from(this.publishers.keys());
1248
- let s = !1;
1249
- for (const i of t) {
1250
- const r = this.publishers.get(i);
1251
- if (!r?._is_savable_) continue;
1252
- const o = r?.get();
1253
- o && (this.localStorageData[i + "¤lang_" + P.getLanguage()] = {
1254
- lastModifiationMS: (/* @__PURE__ */ new Date()).getTime(),
1255
- expirationDelayMs: r._expiration_delay_,
1256
- data: o
1257
- }, s = !0);
1258
- }
1259
- if (s) {
1260
- const i = await this.compress(
1261
- JSON.stringify(this.localStorageData),
1262
- "gzip"
1263
- );
1264
- localStorage.setItem(Xe, i);
1265
- }
1266
- if (m.saving = !1, m.changed) {
1267
- m.saveId++;
1268
- const i = m.saveId;
1269
- setTimeout(() => this.saveToLocalStorage(i), 1e3);
1270
- }
1271
- } catch {
1272
- m.saving = !1;
1273
- }
1274
- }
1275
- async compress(e, t) {
1276
- const s = new TextEncoder().encode(e), i = window, r = new i.CompressionStream(t), o = r.writable.getWriter();
1277
- o.write(s), o.close();
1278
- const l = await new Response(r.readable).arrayBuffer(), c = new Uint8Array(l);
1279
- let f = "";
1280
- for (let d = 0; d < c.length; d++)
1281
- f += String.fromCharCode(c[d]);
1282
- return btoa(f);
1283
- }
1284
- async decompress(e, t) {
1285
- const s = atob(e), r = Uint8Array.from(
1286
- s,
1287
- (d) => d.charCodeAt(0)
1288
- ).buffer, o = window, l = new o.DecompressionStream(t), c = l.writable.getWriter();
1289
- c.write(r), c.close();
1290
- const f = await new Response(l.readable).arrayBuffer();
1291
- return new TextDecoder().decode(f);
1292
- }
1293
- };
1294
- m.buildDate = "Tue Sep 29 2026 21:11:55 GMT+0200 (Central European Summer Time)", m.changed = !1, m.saving = !1, m.saveId = 0, m.instance = null, m.instances = /* @__PURE__ */ new Map(), m.pageShowHandlerInitialized = !1;
1295
- let F = m;
1296
- if (typeof window < "u") {
1297
- const n = window, e = Os + "PublisherManager", t = n[e] || F;
1298
- if (n[e] || (n[e] = F), t !== F) {
1299
- const s = [
1300
- "instance",
1301
- "instances",
1302
- "changed",
1303
- "saving",
1304
- "saveId",
1305
- "pageShowHandlerInitialized"
1306
- ];
1307
- for (const i of s)
1308
- Object.defineProperty(F, i, {
1309
- configurable: !0,
1310
- get() {
1311
- return t[i];
1312
- },
1313
- set(r) {
1314
- t[i] = r;
1315
- }
1316
- });
1317
- }
1318
- }
1319
- const Us = /* @__PURE__ */ new Set([
1320
- "invalidate",
1321
- "onInvalidate",
1322
- "offInvalidate",
1323
- "invalidateForm",
1324
- "onFormInvalidate",
1325
- "offFormInvalidate",
1326
- "onAssign",
1327
- "offAssign",
1328
- "startDynamicFilling",
1329
- "stopDynamicFilling",
1330
- "startTemplateFilling",
1331
- "stopTemplateFilling",
1332
- "onInternalMutation",
1333
- "offInternalMutation",
1334
- "set",
1335
- "get",
1336
- "$tag",
1337
- "_cachedGet_",
1338
- "_templateFillListeners_",
1339
- "_fillListeners_",
1340
- "_assignListeners_",
1341
- "_invalidateListeners_",
1342
- "_formInvalidateListeners_",
1343
- "_publishInternalMutation_",
1344
- "hasListener",
1345
- "delete",
1346
- "_mutationListeners_",
1347
- "_publishDynamicFilling_",
1348
- "_publishInvalidation_",
1349
- "_publishFormInvalidation_",
1350
- "_publishTemplateFilling_",
1351
- "_publishAssignement_",
1352
- "_proxies_",
1353
- "parent",
1354
- "_parentKey_",
1355
- "_value_",
1356
- "_is_savable_",
1357
- "_expiration_delay_",
1358
- "_lockInternalMutationPublishing_",
1359
- "_instanceCounter_",
1360
- "_assignmentId_",
1361
- "_invalidate_on_page_show_"
1362
- ]);
1363
- function Ns(n, e) {
1364
- return {
1365
- /**
1366
- * Lorsque l'on écrit monConteneur = publisher.maClef ou monConteneur = publisher["maClef"] monConteneur contient :
1367
- * Les methodes de PublisherProxy (onAssign... : voir liste dans kle tableaus si dessous), si la clef est une méthode de PublisherProxy,,
1368
- * Sinon un autre proxy qui a comme valeur interne la valeur corespondante à la clef dans l'objet.
1369
- */
1370
- get: function(t, s) {
1371
- if (typeof s == "string" && Us.has(s))
1372
- return n[s];
1373
- if (s == Symbol.toPrimitive)
1374
- return () => e().get();
1375
- if (!n._proxies_.has(s)) {
1376
- const i = n._value_[s], r = nt(
1377
- X(i) ? i : { __value: i },
1378
- n,
1379
- s
1380
- );
1381
- r._proxies_.set("_parent_", e()), n._proxies_.set(s, r);
1382
- }
1383
- return n._proxies_.get(s);
1384
- },
1385
- /**
1386
- * Lorsque l'on écrit publisher.maClef = value ou publisher["maClef"] = value, on assigne la valeur à la clef dans l'objet interne.
1387
- * Les gestionnairs associés sopnt déclenchés en conséquence de manière profonde et remontante si nécessaire.
1388
- */
1389
- set: function(t, s, i) {
1390
- if (s == "_value_")
1391
- return n._value_ = i, !0;
1392
- if (s == "_cachedGet_")
1393
- return n._cachedGet_ = i, !0;
1394
- if (s == "_assignmentId_")
1395
- return n._assignmentId_ = i, !0;
1396
- if (s == "_is_savable_")
1397
- return n._is_savable_ = i, !0;
1398
- if (s == "_expiration_delay_")
1399
- return n._expiration_delay_ = i, !0;
1400
- if (s == "_invalidate_on_page_show_")
1401
- return n._invalidate_on_page_show_ = i, !0;
1402
- if (s == "_instanceCounter_")
1403
- return n._instanceCounter_ = i, !0;
1404
- if (!n._proxies_.has(s)) {
1405
- const o = nt(
1406
- {},
1407
- n,
1408
- s
1409
- );
1410
- o._proxies_.set("_parent_", e()), n._proxies_.set(s, o);
1411
- }
1412
- return n._value_[s] !== i && (n._value_[s] = i, n._publishDynamicFilling_(s, i), n._proxies_.get(s)?.set(X(i) ? i : { __value: i })), !0;
1413
- },
1414
- /**
1415
- * Autres propriétés classiques d'un objet implémentées par le proxy
1416
- */
1417
- deleteProperty: function(t, s) {
1418
- return n._publishDynamicFilling_(s, null), n._proxies_.get(s)?.set(null), delete n._value_[s];
1419
- },
1420
- // enumerate: function (publisherInstance, sKey): CoreJSType {
1421
- // return publisherInstance._value_.keys();
1422
- // },
1423
- has: function(t, s) {
1424
- return s in n._value_ && s != "_lockInternalMutationPublishing_";
1425
- },
1426
- defineProperty: function(t, s, i) {
1427
- return i && "value" in i && (n._value_[s] = i.value), !0;
1428
- },
1429
- getOwnPropertyDescriptor: function(t, s) {
1430
- return {
1431
- enumerable: !0,
1432
- configurable: !0
1433
- };
1434
- },
1435
- ownKeys: function(t) {
1436
- return n._value_.__value ? Object.keys(n._value_.__value) : Object.keys(n._value_);
1437
- }
1438
- };
1439
- }
1440
- function nt(n, e = null, t) {
1441
- const s = new Ue(n, e, t);
1442
- let i = null;
1443
- const r = Ns(s, () => i);
1444
- return i = new Proxy(
1445
- s,
1446
- r
1447
- ), i;
1448
- }
1449
- class Rs extends HTMLElement {
1450
- constructor() {
1451
- super(), this.publisherId = "", this.onAssign = (e) => {
1452
- this.innerHTML = e.toString();
1453
- };
1454
- }
1455
- connectedCallback() {
1456
- this.publisherId = this.getAttribute("publisher") || "", this.publisher = Ue.instances.get(parseInt(this.publisherId)), this.publisher?.onAssign(this.onAssign);
1457
- }
1458
- disconnectedCallback() {
1459
- this.publisher?.offAssign(this.onAssign);
1460
- }
1461
- }
1462
- try {
1463
- customElements.define(
1464
- he + "-publisher-proxy",
1465
- Rs
1466
- );
1467
- } catch {
1468
- }
1469
- function Ds(n) {
1470
- return oe(n);
1471
- }
1472
- function js(n) {
1473
- return n.split(".")[0] ?? n;
1474
- }
1475
- function Bs(n) {
1476
- return `${js(Ds(n))}/_state_`;
1477
- }
1478
- const zs = "concorde-hf-results", it = "results", Fs = 64;
1479
- async function rt(n) {
1480
- const e = globalThis.crypto?.subtle;
1481
- if (e) {
1482
- const i = await e.digest("SHA-256", n);
1483
- return [...new Uint8Array(i)].map((r) => r.toString(16).padStart(2, "0")).join("");
1484
- }
1485
- let t = 2166136261, s = 16777619;
1486
- for (let i = 0; i < n.length; i++)
1487
- t = Math.imul(t ^ n[i], 16777619) >>> 0, s = Math.imul(s ^ n[n.length - 1 - i], 2166136261) >>> 0;
1488
- return `fnv-${t.toString(16)}${s.toString(16)}-${n.length}`;
1489
- }
1490
- async function ot(n) {
1491
- if (n instanceof Blob)
1492
- return {
1493
- $blob: await rt(new Uint8Array(await n.arrayBuffer())),
1494
- type: n.type
1495
- };
1496
- if (ArrayBuffer.isView(n))
1497
- return {
1498
- $typed: n.constructor.name,
1499
- hash: await rt(
1500
- new Uint8Array(n.buffer, n.byteOffset, n.byteLength)
1501
- )
1502
- };
1503
- if (Array.isArray(n)) return Promise.all(n.map(ot));
1504
- if (n && typeof n == "object") {
1505
- const e = {};
1506
- for (const t of Object.keys(n).sort())
1507
- e[t] = await ot(n[t]);
1508
- return e;
1509
- }
1510
- return n;
1511
- }
1512
- async function Hs(n) {
1513
- const e = JSON.stringify(await ot(n));
1514
- return rt(new TextEncoder().encode(e));
1515
- }
1516
- function at(n) {
1517
- return n instanceof Blob ? !0 : Array.isArray(n) ? n.some(at) : n && typeof n == "object" ? Object.values(n).some(at) : !1;
1518
- }
1519
- const Q = /* @__PURE__ */ new Map();
1520
- function lt(n, e) {
1521
- for (Q.delete(n), Q.set(n, e); Q.size > Fs; ) {
1522
- const t = Q.keys().next().value;
1523
- if (t === void 0) break;
1524
- Q.delete(t);
1525
- }
1526
- }
1527
- let Ee = null;
1528
- function mt() {
1529
- return Ee || (Ee = new Promise((n) => {
1530
- try {
1531
- if (typeof indexedDB > "u") return n(null);
1532
- const e = indexedDB.open(zs, 1);
1533
- e.onupgradeneeded = () => {
1534
- e.result.createObjectStore(it, { keyPath: "key" }).createIndex("at", "at");
1535
- }, e.onsuccess = () => n(e.result), e.onerror = () => n(null), e.onblocked = () => n(null);
1536
- } catch {
1537
- n(null);
1538
- }
1539
- }), Ee);
1540
- }
1541
- function de(n, e, t) {
1542
- return new Promise((s) => {
1543
- try {
1544
- const i = n.transaction(it, e), r = t(i.objectStore(it));
1545
- i.oncomplete = () => s(r ? r.result : void 0), i.onerror = () => s(void 0), i.onabort = () => s(void 0);
1546
- } catch {
1547
- s(void 0);
1548
- }
1549
- });
1550
- }
1551
- async function qs(n, e, t) {
1552
- if (Q.has(n)) {
1553
- const r = Q.get(n);
1554
- return lt(n, r), { hit: !0, value: r };
1555
- }
1556
- if (!e) return { hit: !1 };
1557
- const s = await mt();
1558
- if (!s) return { hit: !1 };
1559
- const i = await de(s, "readonly", (r) => r.get(n));
1560
- return i ? t && Date.now() - i.at > t ? { hit: !1 } : (lt(n, i.value), de(s, "readwrite", (r) => r.put({ ...i, at: Date.now() })), { hit: !0, value: i.value }) : { hit: !1 };
1561
- }
1562
- async function Ws(n, e, t, s) {
1563
- if (lt(n, e), !t || at(e)) return;
1564
- const i = await mt();
1565
- if (!i) return;
1566
- let r = 0;
1567
- try {
1568
- r = JSON.stringify(e).length;
1569
- } catch {
1570
- return;
1571
- }
1572
- r > s || (await de(i, "readwrite", (o) => o.put({ key: n, value: e, bytes: r, at: Date.now() })), await Vs(i, s));
1573
- }
1574
- async function Vs(n, e) {
1575
- const t = await de(n, "readonly", (r) => r.getAll()) ?? [];
1576
- let s = t.reduce((r, o) => r + o.bytes, 0);
1577
- if (s <= e) return;
1578
- t.sort((r, o) => r.at - o.at);
1579
- const i = [];
1580
- for (const r of t) {
1581
- if (s <= e) break;
1582
- i.push(r.key), s -= r.bytes;
1583
- }
1584
- await de(n, "readwrite", (r) => {
1585
- for (const o of i) r.delete(o);
1586
- });
1587
- }
1588
- async function Js() {
1589
- Q.clear();
1590
- const n = await mt();
1591
- n && await de(n, "readwrite", (e) => e.clear());
1592
- }
1593
- function Ye(n) {
1594
- return n === null ? "null" : Array.isArray(n) ? "array" : n instanceof Blob ? "Blob" : ArrayBuffer.isView(n) ? n.constructor.name : typeof n;
1595
- }
1596
- function Gs(n) {
1597
- if (n == null || n === "") return null;
1598
- if (typeof n == "function")
1599
- return (s) => {
1600
- const i = n(s);
1601
- return typeof i == "string" ? i : null;
1602
- };
1603
- const e = (typeof n == "string" ? n.split("+") : [...n]).map((s) => s.trim()).filter(Boolean).map((s) => s.split("."));
1604
- if (!e.length) return null;
1605
- const t = (s, i) => {
1606
- if (s == null) return [];
1607
- if (!i.length)
1608
- return typeof s == "string" ? s.trim() ? [s.trim()] : [] : typeof s == "number" ? [String(s)] : Array.isArray(s) ? s.flatMap((l) => t(l, [])) : [];
1609
- if (Array.isArray(s)) return s.flatMap((l) => t(l, i));
1610
- if (typeof s != "object") return [];
1611
- const [r, ...o] = i;
1612
- return t(s[r], o);
1613
- };
1614
- return (s) => {
1615
- const i = e.map((r) => t(s, r).join(", ")).filter((r) => r.length > 0);
1616
- return i.length ? i.join(" — ") : null;
1617
- };
1618
- }
1619
- function Ks(n) {
1620
- return n == null ? !0 : typeof n == "string" ? n.trim().length === 0 : Array.isArray(n) ? n.length === 0 : typeof n == "object" && !(n instanceof Blob) && !ArrayBuffer.isView(n) ? Object.keys(n).length === 0 : !1;
1621
- }
1622
- function Xs(n, e, t) {
1623
- switch (e.kind) {
1624
- case "text": {
1625
- let s = null;
1626
- if (typeof n == "string") s = n.trim();
1627
- else if (n && typeof n == "object" && !Array.isArray(n)) {
1628
- if (!t)
1629
- return {
1630
- ok: !1,
1631
- reason: "objet reçu sans `options.text` pour en extraire le texte"
1632
- };
1633
- s = t(n);
1634
- } else
1635
- return { ok: !1, reason: `texte attendu, reçu ${Ye(n)}` };
1636
- return s ? s.length > e.maxChars ? { ok: !0, payload: s.slice(0, e.maxChars), truncated: !0 } : { ok: !0, payload: s, truncated: !1 } : { ok: !1, reason: "texte vide" };
1637
- }
1638
- case "image":
1639
- return typeof n == "string" && n.trim() ? { ok: !0, payload: n.trim(), truncated: !1 } : n instanceof Blob ? { ok: !0, payload: n, truncated: !1 } : {
1640
- ok: !1,
1641
- reason: `image attendue (URL, data URL ou Blob), reçu ${Ye(n)}`
1642
- };
1643
- case "audio":
1644
- return n instanceof Float32Array || n instanceof Float64Array ? { ok: !0, payload: n, truncated: !1 } : typeof n == "string" && n.trim() ? { ok: !0, payload: n.trim(), truncated: !1 } : {
1645
- ok: !1,
1646
- reason: `audio attendu (Float32Array, Float64Array ou URL), reçu ${Ye(n)}`
1647
- };
1648
- }
1649
- }
1650
- function Wt(n, e) {
1651
- if (Ks(n)) return { kind: "empty" };
1652
- const t = Gs(e.text), s = Array.isArray(n), i = s ? n : [n];
1653
- if (i.length > e.maxItems)
1654
- return {
1655
- kind: "invalid",
1656
- code: "too-large",
1657
- message: `Entrée trop grosse : ${i.length} éléments (maximum ${e.maxItems}).`
1658
- };
1659
- const r = [], o = [], l = [];
1660
- let c = 0;
1661
- if (i.forEach((d, u) => {
1662
- const _ = Xs(d, e, t);
1663
- _.ok ? (r.push(_.payload), o.push(u), _.truncated && c++) : l.push(s ? `[${u}] ${_.reason}` : _.reason);
1664
- }), !r.length)
1665
- return {
1666
- kind: "invalid",
1667
- code: "invalid-input",
1668
- message: `Entrée invalide : ${l.slice(0, 3).join(" ; ")}${l.length > 3 ? ` (+${l.length - 3})` : ""}.`
1669
- };
1670
- const f = [];
1671
- return c && f.push(`${c} texte(s) tronqué(s) à ${e.maxChars} caractères.`), l.length && f.push(
1672
- `${l.length} élément(s) ignoré(s) : ${l.slice(0, 3).join(" ; ")}.`
1673
- ), {
1674
- kind: "ok",
1675
- many: s,
1676
- length: i.length,
1677
- payloads: r,
1678
- positions: o,
1679
- skipped: i.length - r.length,
1680
- truncated: c,
1681
- warnings: f
1682
- };
1683
- }
1684
- function Vt(n, e) {
1685
- const t = new Array(n.length).fill(null);
1686
- return n.positions.forEach((s, i) => {
1687
- t[s] = e[i] ?? null;
1688
- }), t;
1689
- }
1690
- function Ys(n, e) {
1691
- const t = /* @__PURE__ */ new Map();
1692
- let s = Promise.resolve();
1693
- const i = (a) => e.postMessage(a), r = (a, h, g) => i({ id: a, ok: !1, error: { code: h, message: g } }), o = (a) => {
1694
- const h = String(a?.message ?? a).toLowerCase();
1695
- return a?.code ? String(a.code) : h.includes("quota") ? "quota" : h.includes("failed to fetch") || h.includes("network") || h.includes("404") || h.includes("could not locate") ? "network" : "runtime";
1696
- }, l = (a) => {
1697
- const h = { ...a.options || {} };
1698
- return h.revision = a.revision, h;
1699
- }, c = async () => {
1700
- const a = globalThis.navigator?.gpu;
1701
- if (!a || typeof a.requestAdapter != "function") return !1;
1702
- try {
1703
- return !!await a.requestAdapter();
1704
- } catch {
1705
- return !1;
1706
- }
1707
- }, f = (a) => a && typeof a == "object" && typeof a.tolist == "function" && "dims" in a, d = (a) => a && typeof a == "object" && typeof a.toBlob == "function" && typeof a.width == "number" && typeof a.channels == "number", u = async (a) => {
1708
- if (f(a)) return a.tolist();
1709
- if (d(a)) {
1710
- const h = await a.toBlob("image/png");
1711
- return { width: a.width, height: a.height, channels: a.channels, blob: h };
1712
- }
1713
- if (Array.isArray(a)) return Promise.all(a.map(u));
1714
- if (a instanceof Blob) return a;
1715
- if (a && typeof a == "object") {
1716
- const h = {};
1717
- for (const g of Object.keys(a)) h[g] = await u(a[g]);
1718
- return h;
1719
- }
1720
- return a;
1721
- }, _ = (a) => Array.isArray(a) && a.length === 1 && Array.isArray(a[0]) ? a[0] : a, T = {
1722
- async configure({ env: a }) {
1723
- const h = n.env;
1724
- if (h.allowLocalModels = !1, h.allowRemoteModels = !0, h.useBrowserCache = !0, h.useWasmCache = !0, h.cacheKey = a.cacheKey, a.remoteHost && (h.remoteHost = a.remoteHost), a.remotePathTemplate && (h.remotePathTemplate = a.remotePathTemplate), a.wasmPaths && h.backends?.onnx?.wasm) {
1725
- let g = a.wasmPaths;
1726
- if (typeof g == "string") {
1727
- const v = g.endsWith("/") ? g : g + "/", k = String(globalThis.navigator?.userAgent ?? ""), H = /Safari\//.test(k) && !/Chrome|Chromium|Android/.test(k), q = Number((/Version\/(\d+)/.exec(k) ?? [])[1] ?? 99), A = H && q < 26 && !globalThis.navigator?.gpu ? "" : ".asyncify";
1728
- g = {
1729
- mjs: `${v}ort-wasm-simd-threaded${A}.mjs`,
1730
- wasm: `${v}ort-wasm-simd-threaded${A}.wasm`
1731
- };
1732
- }
1733
- h.backends.onnx.wasm.wasmPaths = g;
1734
- }
1735
- if (a.logLevel && n.LogLevel) {
1736
- const g = n.LogLevel[String(a.logLevel).toUpperCase()];
1737
- g !== void 0 && (h.logLevel = g);
1738
- }
1739
- return { version: h.version ?? null };
1740
- },
1741
- async inspect({ model: a }) {
1742
- const h = n.ModelRegistry, g = l(a);
1743
- let v = !1, k = null;
1744
- try {
1745
- v = !!await h?.is_pipeline_cached?.(
1746
- a.task,
1747
- a.repo,
1748
- g
1749
- );
1750
- } catch {
1751
- v = !1;
1752
- }
1753
- try {
1754
- const H = await h?.get_pipeline_files?.(
1755
- a.task,
1756
- a.repo,
1757
- g
1758
- );
1759
- if (H && h?.get_file_metadata) {
1760
- const A = (await Promise.all(
1761
- H.map(
1762
- (y) => h.get_file_metadata(a.repo, y, {
1763
- revision: a.revision
1764
- }).catch(() => null)
1765
- )
1766
- )).map((y) => y?.size);
1767
- A.every((y) => typeof y == "number") && (k = A.reduce((y, S) => y + S, 0));
1768
- }
1769
- } catch {
1770
- k = null;
1771
- }
1772
- return { cached: v, totalBytes: k };
1773
- },
1774
- async load({ model: a, devices: h }) {
1775
- const g = t.get(a.alias);
1776
- if (g) return { backend: g.pipe.__backend, loadMs: 0 };
1777
- const v = performance.now(), k = {}, H = (y) => {
1778
- if (y.status === "progress_total")
1779
- i({
1780
- type: "progress",
1781
- alias: a.alias,
1782
- progress: {
1783
- loadedBytes: y.loaded,
1784
- totalBytes: y.total,
1785
- percent: Math.round(y.progress ?? 0)
1786
- }
1787
- });
1788
- else if (y.status === "progress") {
1789
- k[y.file] = { loaded: y.loaded, total: y.total };
1790
- const S = Object.values(k), U = S.reduce((fe, N) => fe + (N.loaded || 0), 0), D = S.reduce((fe, N) => fe + (N.total || 0), 0);
1791
- i({
1792
- type: "progress",
1793
- alias: a.alias,
1794
- progress: {
1795
- file: y.file,
1796
- loadedBytes: U,
1797
- totalBytes: D,
1798
- percent: D ? Math.round(U / D * 100) : 0
1799
- }
1800
- });
1801
- }
1802
- }, q = [];
1803
- for (const y of h) {
1804
- if (y === "webgpu" && !await c()) {
1805
- q.push("webgpu indisponible");
1806
- continue;
1807
- }
1808
- try {
1809
- const S = await n.pipeline(a.task, a.repo, {
1810
- ...l(a),
1811
- device: y,
1812
- progress_callback: H
1813
- });
1814
- return S.__backend = y, t.set(a.alias, { pipe: S, task: a.task }), {
1815
- backend: y,
1816
- loadMs: Math.round(performance.now() - v)
1817
- };
1818
- } catch (S) {
1819
- const U = o(S);
1820
- if (U === "network" || U === "quota") throw S;
1821
- q.push(`${y} : ${String(S?.message ?? S)}`);
1822
- }
1823
- }
1824
- const A = new Error(
1825
- `Aucun backend utilisable (${q.join(" ; ") || "aucun autorisé"}).`
1826
- );
1827
- throw A.code = "unsupported", A;
1828
- },
1829
- async run({ request: a }) {
1830
- const h = t.get(a.alias);
1831
- if (!h) {
1832
- const A = new Error(`Modèle "${a.alias}" non chargé.`);
1833
- throw A.code = "runtime", A;
1834
- }
1835
- const { pipe: g } = h, v = { ...a.call || {} };
1836
- let k;
1837
- a.positional && (k = v[a.positional], delete v[a.positional]);
1838
- const H = (A) => a.positional ? g(A, k, v) : g(A, v);
1839
- if (a.batch) {
1840
- const A = [];
1841
- for (let S = 0; S < a.inputs.length; S += 32) {
1842
- const U = a.inputs.slice(S, S + 32), D = await u(await H(U));
1843
- A.push(...Array.isArray(D) ? D : [D]);
1844
- }
1845
- return A;
1846
- }
1847
- const q = [];
1848
- for (const A of a.inputs) {
1849
- const y = await u(await H(A));
1850
- q.push(
1851
- h.task === "feature-extraction" || h.task === "image-feature-extraction" ? _(y) : y
1852
- );
1853
- }
1854
- return q;
1855
- },
1856
- async clear({ model: a }) {
1857
- const h = n.ModelRegistry;
1858
- if (a) {
1859
- const v = t.get(a.alias);
1860
- return t.delete(a.alias), await v?.pipe?.dispose?.(), await h?.clear_pipeline_cache?.(
1861
- a.task,
1862
- a.repo,
1863
- l(a)
1864
- ), !0;
1865
- }
1866
- for (const v of t.values()) await v.pipe?.dispose?.();
1867
- t.clear();
1868
- const g = n.env.cacheKey;
1869
- return g && typeof caches < "u" && await caches.delete(g), !0;
1870
- }
1871
- };
1872
- e.addEventListener("message", (a) => {
1873
- const h = a.data;
1874
- !h || typeof h.id != "number" || !T[h.type] || (s = s.then(() => T[h.type](h)).then(
1875
- (g) => i({ id: h.id, ok: !0, result: g }),
1876
- (g) => r(h.id, o(g), String(g?.message ?? g))
1877
- ));
1878
- });
1879
- }
1880
- function Zs(n) {
1881
- return [
1882
- `const hfWorkerMain = ${Ys.toString()};`,
1883
- "const pending = [];",
1884
- "const buffer = (event) => pending.push(event);",
1885
- 'self.addEventListener("message", buffer);',
1886
- "let lib;",
1887
- "try {",
1888
- ` lib = await import(${JSON.stringify(n)});`,
1889
- "} catch (err) {",
1890
- ' self.postMessage({ type: "fatal", message: "Chargement de Transformers.js impossible : " + (err && err.message || err) });',
1891
- " throw err;",
1892
- "}",
1893
- 'self.removeEventListener("message", buffer);',
1894
- "hfWorkerMain(lib, {",
1895
- " postMessage: (message, transfer) => self.postMessage(message, transfer),",
1896
- " addEventListener: (type, listener) => {",
1897
- " self.addEventListener(type, listener);",
1898
- " for (const event of pending.splice(0)) listener(event);",
1899
- " },",
1900
- "});"
1901
- ].join(`
1902
- `);
1903
- }
1904
- class ae extends Error {
1905
- constructor(e, t) {
1906
- super(t), this.code = e, this.name = "HfEngineError";
1907
- }
1908
- }
1909
- class Ne {
1910
- constructor(e) {
1911
- this.createWorker = e, this.worker = null, this.nextId = 1, this.pending = /* @__PURE__ */ new Map(), this.progressListeners = /* @__PURE__ */ new Map(), this.fatal = null;
1912
- }
1913
- /** Worker « blob » qui importe Transformers.js depuis une URL figée. */
1914
- static fromUrl(e) {
1915
- let t = null;
1916
- const s = new Ne(() => {
1917
- const r = Zs(e);
1918
- return t = URL.createObjectURL(
1919
- new Blob([r], { type: "text/javascript" })
1920
- ), new Worker(t, { type: "module", name: "concorde-hf" });
1921
- }), i = s.dispose.bind(s);
1922
- return s.dispose = () => {
1923
- i(), t && URL.revokeObjectURL(t);
1924
- }, s;
1925
- }
1926
- ensureWorker() {
1927
- if (this.fatal) throw this.fatal;
1928
- if (this.worker) return this.worker;
1929
- const e = this.createWorker();
1930
- return e.addEventListener(
1931
- "message",
1932
- (t) => this.onMessage(t.data)
1933
- ), e.addEventListener("error", (t) => {
1934
- this.failAll(
1935
- new ae(
1936
- "runtime",
1937
- `Worker Hugging Face : ${t.message || "erreur de chargement (CSP worker-src / script-src ?)"}`
1938
- )
1939
- );
1940
- }), this.worker = e, e;
1941
- }
1942
- onMessage(e) {
1943
- if ("type" in e) {
1944
- e.type === "progress" ? this.progressListeners.get(e.alias)?.(e.progress) : e.type === "fatal" && this.failAll(new ae("runtime", e.message));
1945
- return;
1946
- }
1947
- const t = this.pending.get(e.id);
1948
- t && (this.pending.delete(e.id), e.ok ? t.resolve(e.result) : t.reject(new ae(e.error.code, e.error.message)));
1949
- }
1950
- failAll(e) {
1951
- this.fatal = e;
1952
- for (const t of this.pending.values()) t.reject(e);
1953
- this.pending.clear();
1954
- }
1955
- request(e) {
1956
- let t;
1957
- try {
1958
- t = this.ensureWorker();
1959
- } catch (i) {
1960
- return Promise.reject(i);
1961
- }
1962
- const s = this.nextId++;
1963
- return new Promise((i, r) => {
1964
- this.pending.set(s, {
1965
- resolve: i,
1966
- reject: r
1967
- }), t.postMessage({ ...e, id: s });
1968
- });
1969
- }
1970
- async configure(e) {
1971
- await this.request({ type: "configure", env: e });
1972
- }
1973
- inspect(e) {
1974
- return this.request({ type: "inspect", model: e });
1975
- }
1976
- async load(e, t, s) {
1977
- this.progressListeners.set(e.alias, s);
1978
- try {
1979
- return await this.request({ type: "load", model: e, devices: t });
1980
- } finally {
1981
- this.progressListeners.delete(e.alias);
1982
- }
1983
- }
1984
- run(e) {
1985
- return this.request({ type: "run", request: e });
1986
- }
1987
- async clear(e) {
1988
- await this.request({ type: "clear", model: e });
1989
- }
1990
- dispose() {
1991
- this.failAll(new ae("runtime", "Moteur arrêté.")), this.worker?.terminate(), this.worker = null;
1992
- }
1993
- }
1994
- const Qs = "concorde-hf-consent:", Ce = 1024 * 1024;
1995
- function Pe() {
1996
- try {
1997
- return typeof localStorage < "u" ? localStorage : null;
1998
- } catch {
1999
- return null;
2000
- }
2001
- }
2002
- function en() {
2003
- const n = globalThis.navigator?.connection;
2004
- return n ? n.saveData === !0 || n.effectiveType === "slow-2g" || n.effectiveType === "2g" : !1;
2005
- }
2006
- class R extends Error {
2007
- constructor(e, t) {
2008
- super(t), this.code = e, this.name = "HfError";
2009
- }
2010
- }
2011
- class Jt {
2012
- constructor(e) {
2013
- this.config = e, this.entries = /* @__PURE__ */ new Map(), this.engine = null, this.configured = null;
2014
- }
2015
- /* ---------------- configuration / moteur ---------------- */
2016
- get resolvedConfig() {
2017
- return this.config;
2018
- }
2019
- getEngine() {
2020
- if (this.engine) return this.engine;
2021
- const e = this.config.runtime;
2022
- return e.source === "engine" ? this.engine = e.engine : e.source === "worker" ? this.engine = new Ne(e.createWorker) : this.engine = Ne.fromUrl(e.url), this.engine;
2023
- }
2024
- async ready() {
2025
- const e = this.getEngine();
2026
- if (!this.configured) {
2027
- const t = this.config.runtime, s = t.source === "engine" ? void 0 : t.wasmPaths ?? (t.source === "cdn" ? new URL(".", t.url).href : void 0);
2028
- this.configured = e.configure({
2029
- cacheKey: `concorde-hf-${t.version}`,
2030
- remoteHost: this.config.remoteHost,
2031
- remotePathTemplate: this.config.remotePathTemplate,
2032
- wasmPaths: s,
2033
- logLevel: this.config.logLevel
2034
- });
2035
- }
2036
- return await this.configured, e;
2037
- }
2038
- dispose() {
2039
- this.engine?.dispose(), this.engine = null, this.configured = null, this.entries.clear();
2040
- }
2041
- /* ---------------- modèles ---------------- */
2042
- hasModel(e) {
2043
- return Object.prototype.hasOwnProperty.call(this.config.models, e);
2044
- }
2045
- model(e) {
2046
- if (!this.hasModel(e)) {
2047
- const s = Object.keys(this.config.models);
2048
- throw new R(
2049
- "not-allowed",
2050
- `[sonic-hugging-face-infer] modèle "${e}" hors liste blanche` + (s.length ? ` (disponibles : ${s.join(", ")}).` : ".")
2051
- );
2052
- }
2053
- const t = this.config.models[e];
2054
- return {
2055
- alias: e,
2056
- task: t.task,
2057
- repo: t.repo,
2058
- revision: t.revision,
2059
- options: t.options ?? {},
2060
- devices: t.devices ?? ["webgpu", "wasm"],
2061
- sizeBytes: t.sizeBytes,
2062
- label: t.label,
2063
- description: t.description,
2064
- defaults: t.defaults
2065
- };
2066
- }
2067
- entry(e) {
2068
- let t = this.entries.get(e);
2069
- return t || (t = { state: { phase: "idle", size: null }, listeners: /* @__PURE__ */ new Set() }, this.entries.set(e, t)), t;
2070
- }
2071
- state(e) {
2072
- return this.entry(e).state;
2073
- }
2074
- subscribe(e, t) {
2075
- const s = this.entry(e);
2076
- return s.listeners.add(t), t(s.state), () => s.listeners.delete(t);
2077
- }
2078
- update(e, t) {
2079
- const s = this.entry(e);
2080
- s.state = { ...s.state, ...t };
2081
- for (const i of s.listeners) i(s.state);
2082
- }
2083
- /** Taille et présence en cache, sans rien télécharger d'autre que des en-têtes. */
2084
- inspect(e) {
2085
- const t = this.entry(e);
2086
- if (!t.inspect) {
2087
- const s = this.model(e);
2088
- t.inspect = (async () => {
2089
- this.update(e, { phase: "checking" });
2090
- let i = s.sizeBytes ?? null, r = !1;
2091
- try {
2092
- const c = await (await this.ready()).inspect(s);
2093
- i = c.totalBytes ?? i, r = c.cached;
2094
- } catch {
2095
- }
2096
- const o = { totalBytes: i, fromCache: r };
2097
- return this.update(e, { size: o, phase: "idle" }), o;
2098
- })();
2099
- }
2100
- return t.inspect;
2101
- }
2102
- /* ---------------- consentement ---------------- */
2103
- consentKey(e) {
2104
- return `${Qs}${e}@${this.model(e).revision}`;
2105
- }
2106
- storedConsent(e) {
2107
- const t = Pe()?.getItem(this.consentKey(e));
2108
- return t === "accepted" || t === "declined" ? t : null;
2109
- }
2110
- accept(e) {
2111
- try {
2112
- Pe()?.setItem(this.consentKey(e), "accepted");
2113
- } catch {
2114
- }
2115
- const t = this.entry(e);
2116
- t.consent?.resolve(!0), t.consent = void 0, t.state.phase === "declined" && this.update(e, { phase: "idle" });
2117
- }
2118
- decline(e) {
2119
- try {
2120
- Pe()?.setItem(this.consentKey(e), "declined");
2121
- } catch {
2122
- }
2123
- const t = this.entry(e);
2124
- t.consent?.resolve(!1), t.consent = void 0, this.update(e, { phase: "declined" });
2125
- }
2126
- revokeConsent(e) {
2127
- try {
2128
- Pe()?.removeItem(this.consentKey(e));
2129
- } catch {
2130
- }
2131
- this.entry(e).state.phase === "declined" && this.update(e, { phase: "idle" });
2132
- }
2133
- askConsent(e) {
2134
- const t = this.storedConsent(e);
2135
- if (t) return Promise.resolve(t === "accepted");
2136
- const s = this.entry(e);
2137
- if (!s.consent) {
2138
- let i;
2139
- const r = new Promise((o) => i = o);
2140
- s.consent = { promise: r, resolve: i };
2141
- }
2142
- return this.update(e, { phase: "awaiting-consent" }), s.consent.promise;
2143
- }
2144
- /* ---------------- chargement ---------------- */
2145
- /**
2146
- * Charge le modèle selon la politique. Résout quand il est prêt ; rejette
2147
- * (`HfError`) si refusé, non supporté, quota insuffisant ou erreur.
2148
- * `policy = "manual"` signifie « appel explicite » : pas de demande de consentement.
2149
- */
2150
- ensureLoaded(e, t) {
2151
- const s = this.entry(e);
2152
- if (s.state.phase === "ready") return Promise.resolve();
2153
- if (s.loading) return s.loading;
2154
- const i = this.load(e, t).finally(() => {
2155
- this.entry(e).loading === i && (s.loading = void 0);
2156
- });
2157
- return s.loading = i, i;
2158
- }
2159
- async load(e, t) {
2160
- const s = this.model(e), i = this.config.defaults, r = await this.inspect(e), o = r?.fromCache === !0, l = r?.totalBytes ?? null;
2161
- if (!o && t !== "manual") {
2162
- const d = this.storedConsent(e);
2163
- if (d === "declined" || this.entry(e).state.phase === "declined")
2164
- throw this.update(e, { phase: "declined" }), new R("declined", "Chargement du modèle refusé par l'utilisateur.");
2165
- const u = l !== null && l > i.consentAboveMB * Ce;
2166
- if ((t === "consent" || u || en()) && d !== "accepted" && !await this.askConsent(e))
2167
- throw this.update(e, { phase: "declined" }), new R("declined", "Chargement du modèle refusé par l'utilisateur.");
2168
- }
2169
- const c = l ?? s.sizeBytes ?? null, f = s.devices.filter(
2170
- (d) => d !== "wasm" || c === null || c <= i.allowWasmUpToMB * Ce
2171
- );
2172
- if (!f.length)
2173
- throw this.update(e, {
2174
- phase: "unsupported",
2175
- error: { code: "unsupported", message: "Aucune exécution autorisée pour ce modèle." }
2176
- }), new R("unsupported", "Aucune exécution autorisée pour ce modèle.");
2177
- if (!o && l) {
2178
- const d = await globalThis.navigator?.storage?.estimate?.().catch(() => null);
2179
- if (d?.quota !== void 0) {
2180
- const u = d.quota - (d.usage ?? 0);
2181
- if (u < l * 1.2) {
2182
- const _ = `Espace de stockage insuffisant (${Math.round(u / Ce)} Mo libres, ${Math.round(l / Ce)} Mo nécessaires).`;
2183
- throw this.update(e, { phase: "error", error: { code: "quota", message: _ } }), new R("quota", _);
2184
- }
2185
- }
2186
- }
2187
- this.update(e, {
2188
- phase: o ? "loading" : "downloading",
2189
- error: void 0,
2190
- progress: void 0
2191
- });
2192
- try {
2193
- const u = await (await this.ready()).load(
2194
- s,
2195
- f,
2196
- (T) => this.update(e, { phase: "downloading", progress: T })
2197
- );
2198
- let _;
2199
- i.persist && !o && (_ = await globalThis.navigator?.storage?.persist?.().catch(() => !1)), this.update(e, {
2200
- phase: "ready",
2201
- backend: u.backend,
2202
- loadMs: u.loadMs,
2203
- persisted: _,
2204
- size: { totalBytes: c, fromCache: o }
2205
- });
2206
- } catch (d) {
2207
- const u = d instanceof ae ? d.code : "runtime", _ = d instanceof Error ? d.message : String(d);
2208
- throw this.update(e, {
2209
- phase: u === "unsupported" ? "unsupported" : "error",
2210
- error: { code: u, message: _ }
2211
- }), new R(u, _);
2212
- }
2213
- }
2214
- /* ---------------- calcul ---------------- */
2215
- async run(e, t) {
2216
- const s = await this.ready();
2217
- let i;
2218
- const r = new Promise((o, l) => {
2219
- i = setTimeout(
2220
- () => l(
2221
- new R("timeout", `Calcul trop long (> ${t} ms), abandonné.`)
2222
- ),
2223
- t
2224
- );
2225
- });
2226
- try {
2227
- return await Promise.race([s.run(e), r]);
2228
- } catch (o) {
2229
- throw o instanceof R ? o : o instanceof ae ? new R(o.code, o.message) : new R("runtime", o instanceof Error ? o.message : String(o));
2230
- } finally {
2231
- clearTimeout(i);
2232
- }
2233
- }
2234
- /* ---------------- nettoyage ---------------- */
2235
- async clearModel(e) {
2236
- const t = this.model(e);
2237
- await (await this.ready()).clear(t);
2238
- const i = this.entry(e);
2239
- i.inspect = void 0, this.update(e, { phase: "idle", size: null, backend: void 0, progress: void 0 });
2240
- }
2241
- async clearAll() {
2242
- await (await this.ready()).clear();
2243
- for (const t of this.entries.keys())
2244
- this.entry(t).inspect = void 0, this.update(t, { phase: "idle", size: null, backend: void 0, progress: void 0 });
2245
- }
2246
- }
2247
- let ve = null;
2248
- Ht((n) => {
2249
- ve?.dispose(), ve = new Jt(n);
2250
- });
2251
- function yt() {
2252
- if (!ve) {
2253
- const n = Ps();
2254
- n && (ve = new Jt(n));
2255
- }
2256
- return ve;
2257
- }
2258
- const I = { type: "boolean" }, x = (n, e) => ({ type: "number", minimum: n, maximum: e }), b = (n, e) => ({ type: "number", integer: !0, minimum: n, maximum: e }), G = (n = 500) => ({ type: "string", maxLength: n }), le = (n = 256) => ({ type: "array", items: b(0), maxItems: n }), Me = (n = 64) => ({ type: "array", items: le(), maxItems: n }), ct = { type: "array", items: G(200), maxItems: 50 }, tn = { anyOf: [G(200), ct] }, Ut = { anyOf: [b(1, 50), { type: "null" }] }, Ze = {
2259
- max_length: b(1, 1024),
2260
- max_new_tokens: b(1, 1024),
2261
- min_length: b(0, 1024),
2262
- min_new_tokens: b(0, 1024),
2263
- early_stopping: { anyOf: [I, { enum: ["never"] }] },
2264
- max_time: x(0, 120),
2265
- do_sample: I,
2266
- num_beams: b(1, 8),
2267
- num_beam_groups: b(1, 8),
2268
- penalty_alpha: x(0, 1),
2269
- use_cache: I,
2270
- temperature: x(0, 5),
2271
- top_k: b(0, 200),
2272
- top_p: x(0, 1),
2273
- typical_p: x(0, 1),
2274
- epsilon_cutoff: x(0, 1),
2275
- eta_cutoff: x(0, 1),
2276
- diversity_penalty: x(0, 10),
2277
- repetition_penalty: x(0, 10),
2278
- encoder_repetition_penalty: x(0, 10),
2279
- length_penalty: x(-10, 10),
2280
- no_repeat_ngram_size: b(0, 32),
2281
- bad_words_ids: Me(),
2282
- force_words_ids: {
2283
- anyOf: [
2284
- Me(),
2285
- { type: "array", items: Me(), maxItems: 64 }
2286
- ]
2287
- },
2288
- renormalize_logits: I,
2289
- forced_bos_token_id: b(0),
2290
- forced_eos_token_id: { anyOf: [b(0), le()] },
2291
- remove_invalid_values: I,
2292
- exponential_decay_length_penalty: {
2293
- type: "tuple",
2294
- prefixItems: [b(0), x()]
2295
- },
2296
- suppress_tokens: le(),
2297
- begin_suppress_tokens: le(),
2298
- forced_decoder_ids: {
2299
- type: "array",
2300
- items: { type: "tuple", prefixItems: [b(0), b(0)] },
2301
- maxItems: 64
2302
- },
2303
- guidance_scale: x(0, 50),
2304
- num_return_sequences: b(1, 8),
2305
- output_attentions: I,
2306
- output_hidden_states: I,
2307
- output_scores: I,
2308
- return_dict_in_generate: I,
2309
- pad_token_id: b(0),
2310
- bos_token_id: b(0),
2311
- eos_token_id: { anyOf: [b(0), le()] },
2312
- encoder_no_repeat_ngram_size: b(0, 32),
2313
- decoder_start_token_id: b(0)
2314
- }, sn = {
2315
- "feature-extraction": {
2316
- pooling: {
2317
- enum: ["none", "mean", "cls", "first_token", "eos", "last_token"]
2318
- },
2319
- normalize: I,
2320
- quantize: I,
2321
- precision: { enum: ["binary", "ubinary"] }
2322
- },
2323
- "text-classification": { top_k: Ut },
2324
- "zero-shot-classification": {
2325
- candidate_labels: tn,
2326
- hypothesis_template: G(300),
2327
- multi_label: I
2328
- },
2329
- translation: Ze,
2330
- "token-classification": {
2331
- ignore_labels: { type: "array", items: G(100), maxItems: 50 },
2332
- aggregation_strategy: { enum: ["none", "simple"] }
2333
- },
2334
- "fill-mask": { top_k: b(1, 50) },
2335
- "question-answering": {
2336
- context: { anyOf: [G(2e4), { type: "array", items: G(2e4), maxItems: 20 }] },
2337
- top_k: b(1, 20)
2338
- },
2339
- "image-classification": { top_k: Ut },
2340
- "zero-shot-image-classification": {
2341
- candidate_labels: ct,
2342
- hypothesis_template: G(300)
2343
- },
2344
- "object-detection": { threshold: x(0, 1), percentage: I },
2345
- "zero-shot-object-detection": {
2346
- candidate_labels: ct,
2347
- threshold: x(0, 1),
2348
- top_k: b(1, 100),
2349
- percentage: I
2350
- },
2351
- "image-feature-extraction": { pool: I },
2352
- "image-segmentation": {
2353
- threshold: x(0, 1),
2354
- mask_threshold: x(0, 1),
2355
- overlap_mask_area_threshold: x(0, 1),
2356
- subtask: { anyOf: [G(50), { type: "null" }] },
2357
- label_ids_to_fuse: le(),
2358
- target_sizes: Me()
2359
- },
2360
- "depth-estimation": {},
2361
- "background-removal": {},
2362
- "image-to-text": Ze,
2363
- "audio-classification": { top_k: b(1, 50) },
2364
- "automatic-speech-recognition": {
2365
- ...Ze,
2366
- return_timestamps: { anyOf: [I, { enum: ["word"] }] },
2367
- chunk_length_s: x(0, 60),
2368
- stride_length_s: x(0, 30),
2369
- force_full_sequences: I,
2370
- language: G(40),
2371
- task: { enum: ["transcribe", "translate"] },
2372
- num_frames: b(0)
2373
- }
2374
- };
2375
- class Qe extends Error {
2376
- constructor(e) {
2377
- super(e), this.name = "HfOptionsError";
2378
- }
2379
- }
2380
- function ye(n) {
2381
- return n === null ? "null" : Array.isArray(n) ? "array" : typeof n;
2382
- }
2383
- function Ie(n, e, t) {
2384
- if ("anyOf" in n) {
2385
- const s = n.anyOf.map((i) => Ie(i, e, t));
2386
- return s.some((i) => i === null) ? null : s[0];
2387
- }
2388
- if ("enum" in n)
2389
- return n.enum.includes(e) ? null : `${t} : valeur ${JSON.stringify(e)} non autorisée (attendu : ${n.enum.map((s) => JSON.stringify(s)).join(" | ")}).`;
2390
- switch (n.type) {
2391
- case "boolean":
2392
- return typeof e == "boolean" ? null : `${t} : booléen attendu, reçu ${ye(e)}.`;
2393
- case "null":
2394
- return e === null ? null : `${t} : null attendu.`;
2395
- case "string":
2396
- return typeof e != "string" ? `${t} : texte attendu, reçu ${ye(e)}.` : n.maxLength !== void 0 && e.length > n.maxLength ? `${t} : texte trop long (${e.length} > ${n.maxLength}).` : null;
2397
- case "number":
2398
- return typeof e != "number" || !Number.isFinite(e) ? `${t} : nombre attendu, reçu ${ye(e)}.` : n.integer && !Number.isInteger(e) ? `${t} : entier attendu.` : n.minimum !== void 0 && e < n.minimum ? `${t} : minimum ${n.minimum}.` : n.maximum !== void 0 && e > n.maximum ? `${t} : maximum ${n.maximum}.` : null;
2399
- case "array": {
2400
- if (!Array.isArray(e))
2401
- return `${t} : liste attendue, reçu ${ye(e)}.`;
2402
- if (n.maxItems !== void 0 && e.length > n.maxItems)
2403
- return `${t} : trop d'éléments (${e.length} > ${n.maxItems}).`;
2404
- for (let s = 0; s < e.length; s++) {
2405
- const i = Ie(n.items, e[s], `${t}[${s}]`);
2406
- if (i) return i;
2407
- }
2408
- return null;
2409
- }
2410
- case "tuple": {
2411
- if (!Array.isArray(e) || e.length !== n.prefixItems.length)
2412
- return `${t} : liste de ${n.prefixItems.length} éléments attendue.`;
2413
- for (let s = 0; s < e.length; s++) {
2414
- const i = Ie(n.prefixItems[s], e[s], `${t}[${s}]`);
2415
- if (i) return i;
2416
- }
2417
- return null;
2418
- }
2419
- }
2420
- }
2421
- function nn(n, e) {
2422
- if (e == null) return {};
2423
- if (typeof e != "object" || Array.isArray(e))
2424
- throw new Qe(
2425
- `[sonic-hugging-face-infer] options.call : objet attendu, reçu ${ye(e)}.`
2426
- );
2427
- const t = sn[n];
2428
- for (const [s, i] of Object.entries(e)) {
2429
- const r = t[s];
2430
- if (!r) {
2431
- const l = Object.keys(t);
2432
- throw new Qe(
2433
- `[sonic-hugging-face-infer] option "${s}" inconnue pour la tâche "${n}"` + (l.length ? ` (autorisées : ${l.join(", ")}).` : " (aucune option).")
2434
- );
2435
- }
2436
- if (i === void 0) continue;
2437
- const o = Ie(r, i, `options.call.${s}`);
2438
- if (o) throw new Qe(`[sonic-hugging-face-infer] ${o}`);
2439
- }
2440
- return e;
2441
- }
2442
- function rn(n) {
2443
- if (!n || typeof n != "object") return !1;
2444
- const e = n;
2445
- return e.blob instanceof Blob && (typeof e.width == "number" || typeof e.height == "number" || typeof e.channels == "number" || typeof e.url == "string" || typeof e.blobUrl == "string");
2446
- }
2447
- function et(n) {
2448
- return typeof n != "string" ? null : n.trim() || null;
2449
- }
2450
- function on(n) {
2451
- if (n == null || n === "") return null;
2452
- if (typeof n == "string") return et(n);
2453
- if (typeof n != "object") return null;
2454
- const e = n;
2455
- return et(e.url) ?? et(e.blobUrl);
2456
- }
2457
- function ut(n, e) {
2458
- if (Array.isArray(n)) {
2459
- for (let s = 0; s < n.length; s++)
2460
- n[s] = ut(n[s], e);
2461
- return n;
2462
- }
2463
- if (!n || typeof n != "object") return n;
2464
- const t = n;
2465
- if (rn(t)) {
2466
- if (on(t)) return n;
2467
- const s = URL.createObjectURL(t.blob);
2468
- return e.push(s), t.url = s, n;
2469
- }
2470
- for (const s of Object.keys(t))
2471
- t[s] = ut(t[s], e);
2472
- return n;
2473
- }
2474
- function Nt(n) {
2475
- for (const e of n)
2476
- try {
2477
- URL.revokeObjectURL(e);
2478
- } catch {
2479
- }
2480
- }
2481
- const Gt = {
2482
- "zero-shot-classification": "candidate_labels",
2483
- "zero-shot-image-classification": "candidate_labels",
2484
- "zero-shot-object-detection": "candidate_labels",
2485
- "question-answering": "context"
2486
- }, Kt = {
2487
- "feature-extraction": "text",
2488
- "text-classification": "text",
2489
- "zero-shot-classification": "text",
2490
- translation: "text",
2491
- "token-classification": "text",
2492
- "fill-mask": "text",
2493
- "question-answering": "text",
2494
- "image-classification": "image",
2495
- "zero-shot-image-classification": "image",
2496
- "object-detection": "image",
2497
- "zero-shot-object-detection": "image",
2498
- "image-feature-extraction": "image",
2499
- "image-segmentation": "image",
2500
- "depth-estimation": "image",
2501
- "background-removal": "image",
2502
- "image-to-text": "image",
2503
- "audio-classification": "audio",
2504
- "automatic-speech-recognition": "audio"
2505
- }, an = 1024 * 1024, ln = 5e3, Rt = 1500;
2506
- function ie(n) {
2507
- const e = n.split("."), t = e.shift();
2508
- let s = F.get(t);
2509
- return e.length && (s = W.traverse(s, e)), s;
2510
- }
2511
- function cn(n) {
2512
- return n === !0 || n === 1 || n === "accepted" || n === "true" || n === "1" || n === "on";
2513
- }
2514
- const un = {
2515
- checking: "loading",
2516
- "awaiting-consent": "awaiting-consent",
2517
- declined: "declined",
2518
- downloading: "downloading",
2519
- loading: "loading",
2520
- ready: "ready",
2521
- error: "error",
2522
- unsupported: "unsupported",
2523
- idle: "idle"
2524
- };
2525
- function hn(n, e) {
2526
- switch (n) {
2527
- case "downloading":
2528
- case "loading":
2529
- case "running":
2530
- return { status: "loading", error: null };
2531
- case "done":
2532
- return {
2533
- status: e == null || Array.isArray(e) && e.length === 0 ? "empty" : "ready",
2534
- error: null
2535
- };
2536
- case "error":
2537
- case "invalid-input":
2538
- return { status: "error", error: null };
2539
- default:
2540
- return { status: "empty", error: null };
2541
- }
2542
- }
2543
- function Xt(n, e) {
2544
- const t = e ?? yt();
2545
- if (!t)
2546
- throw new R(
2547
- "not-allowed",
2548
- "[sonic-hugging-face-infer] configureHuggingFace() n'a pas été appelé."
2549
- );
2550
- const s = t.model(n.model), i = s.task, r = t.resolvedConfig.defaults, o = n.load ?? r.load, l = n.trigger ?? r.trigger, c = n.debounceMs ?? r.debounceMs, f = n.emptyValue ?? null, d = n.onInvalid ?? "keep", u = (p, w) => p === void 0 ? w : n.untrusted ? Math.min(p, w) : p, _ = u(n.maxItems, r.maxItems), T = u(n.maxChars, r.maxChars), a = u(n.timeoutMs, r.timeoutMs), h = n.persistResults ?? !1, g = t.resolvedConfig.runtime.version, v = oe(n.input), k = oe(n.output);
2551
- if (v === k || k.startsWith(v + ".") || v.startsWith(k + "."))
2552
- throw new Error(
2553
- `[sonic-hugging-face-infer] la sortie "${k}" chevauche l'entrée "${v}".`
2554
- );
2555
- const H = n.status ? oe(n.status) : null, q = ie(k), A = F.get(Bs(k)), y = H ? ie(H) : null;
2556
- let S = null, U = { ...s.defaults ?? {} };
2557
- try {
2558
- const p = n.untrusted ? nn(i, n.call) : n.call ?? {};
2559
- U = { ...U, ...p };
2560
- } catch (p) {
2561
- S = p instanceof Error ? p.message : String(p);
2562
- }
2563
- const D = Gt[i], fe = i === "feature-extraction" && !!U.pooling && U.pooling !== "none";
2564
- let N = "idle", j = t.state(n.model), ee, wt, je, Be, ze = !1, Fe, pe = [], K = 0, B = !1, V = null, He = !1, bt = !1;
2565
- const Yt = () => {
2566
- switch (N) {
2567
- case "empty":
2568
- return "empty";
2569
- case "invalid-input":
2570
- return "invalid-input";
2571
- case "running":
2572
- return "running";
2573
- case "done":
2574
- return "done";
2575
- case "error":
2576
- return "error";
2577
- default:
2578
- return un[j.phase] ?? "idle";
2579
- }
2580
- }, z = () => {
2581
- if (B) return;
2582
- const p = Yt();
2583
- if (A.set(hn(p, Fe)), !y) return;
2584
- const w = !["done", "running", "empty", "invalid-input"].includes(p) && j.error ? j.error : void 0, $ = {
2585
- state: p,
2586
- model: {
2587
- alias: s.alias,
2588
- task: i,
2589
- repo: s.repo,
2590
- revision: s.revision,
2591
- label: s.label,
2592
- description: s.description
2593
- },
2594
- // Toujours un objet (jamais null) : les liaisons `size.totalMB` restent stables.
2595
- size: {
2596
- totalBytes: j.size?.totalBytes ?? null,
2597
- totalMB: j.size?.totalBytes == null ? null : Math.round(j.size.totalBytes / an),
2598
- fromCache: j.size?.fromCache ?? !1
2599
- },
2600
- progress: j.progress,
2601
- backend: j.backend,
2602
- persisted: j.persisted,
2603
- skipped: je,
2604
- warnings: Be,
2605
- timings: { loadMs: j.loadMs, lastRunMs: wt },
2606
- fromResultsCache: ze,
2607
- error: ee ?? w
2608
- };
2609
- y.set(JSON.parse(JSON.stringify($)));
2610
- }, ge = (p) => {
2611
- Nt(pe), pe = [];
2612
- const w = ut(p, pe);
2613
- Fe = w, q.set(w);
2614
- }, qe = async (p) => {
2615
- bt = !0, await t.ensureLoaded(n.model, p);
2616
- }, Zt = async (p) => {
2617
- if (S)
2618
- return N = "error", ee = { code: "invalid-input", message: S }, z(), null;
2619
- const w = ie(v).get(), $ = Wt(w, {
2620
- kind: Kt[i],
2621
- text: n.text,
2622
- maxItems: _,
2623
- maxChars: T
2624
- });
2625
- if ($.kind === "empty")
2626
- return N = "empty", je = void 0, Be = void 0, ge(f), z(), null;
2627
- if ($.kind === "invalid")
2628
- return N = "invalid-input", ee = { code: $.code, message: $.message }, d === "clear" && ge(f), z(), null;
2629
- if (D && (U[D] === void 0 || U[D] === ""))
2630
- return N = "invalid-input", ee = {
2631
- code: "invalid-input",
2632
- message: `options.call.${D} est requis pour la tâche "${i}".`
2633
- }, z(), null;
2634
- je = $.skipped || void 0, Be = $.warnings.length ? $.warnings : void 0;
2635
- const J = await Hs({
2636
- payloads: $.payloads,
2637
- positions: $.positions,
2638
- length: $.length,
2639
- many: $.many,
2640
- alias: s.alias,
2641
- repo: s.repo,
2642
- revision: s.revision,
2643
- options: s.options,
2644
- runtime: g,
2645
- call: U
2646
- });
2647
- if (p !== K || B) return null;
2648
- const C = await qs(J, h, n.resultsTtlMs);
2649
- return p !== K || B ? null : C.hit ? (N = "done", ze = !0, ge(C.value), z(), null) : o === "manual" && j.phase !== "ready" ? (N = "waiting-model", He = !0, z(), null) : { input: $, key: J };
2650
- }, Qt = async (p, w, $) => {
2651
- N = "waiting-model", z();
2652
- try {
2653
- await qe(o);
2654
- } catch (C) {
2655
- if (p !== K || B) return;
2656
- N = "waiting-model", Fe === void 0 && ge(f), (!(C instanceof R) || C.code === "runtime") && (ee = {
2657
- code: C instanceof R ? C.code : "runtime",
2658
- message: C instanceof Error ? C.message : String(C)
2659
- }), z();
2660
- return;
2661
- }
2662
- if (p !== K || B) return;
2663
- N = "running", z();
2664
- const J = performance.now();
2665
- try {
2666
- const C = await t.run(
2667
- {
2668
- alias: s.alias,
2669
- inputs: w.payloads,
2670
- call: U,
2671
- positional: D,
2672
- batch: fe
2673
- },
2674
- a
2675
- );
2676
- if (p !== K || B) return;
2677
- const $t = w.many ? Vt(w, C) : C[0] ?? null;
2678
- wt = Math.round(performance.now() - J), N = "done", ge($t), z(), Ws($, $t, h, r.resultsCacheBytes);
2679
- } catch (C) {
2680
- if (p !== K || B) return;
2681
- N = "error", ee = {
2682
- code: C instanceof R ? C.code : "runtime",
2683
- message: C instanceof Error ? C.message : String(C)
2684
- }, z();
2685
- }
2686
- }, vt = async () => {
2687
- if (B) return;
2688
- const p = ++K;
2689
- ee = void 0, ze = !1;
2690
- const w = await Zt(p);
2691
- !w || p !== K || B || await Qt(p, w.input, w.key);
2692
- }, We = (p = c) => {
2693
- B || (V && clearTimeout(V), V = setTimeout(() => {
2694
- V = null, vt();
2695
- }, p));
2696
- }, Ve = [], Je = (p, w) => {
2697
- const $ = ie(p);
2698
- $.onInternalMutation(w), Ve.push(() => $.offInternalMutation(w));
2699
- };
2700
- if (Ve.push(
2701
- t.subscribe(n.model, (p) => {
2702
- j = p, z(), p.phase === "ready" && He && (He = !1, We(0));
2703
- })
2704
- ), l === "mutation" ? Je(v, () => We()) : z(), n.triggerProvider) {
2705
- const p = oe(n.triggerProvider);
2706
- let w = !0, $ = "";
2707
- Je(p, () => {
2708
- const J = JSON.stringify(ie(p).get() ?? null);
2709
- if (w) {
2710
- w = !1, $ = J;
2711
- return;
2712
- }
2713
- J !== $ && ($ = J, J !== "null" && We(0));
2714
- });
2715
- }
2716
- if (n.consentProvider) {
2717
- const p = oe(n.consentProvider);
2718
- Je(p, () => {
2719
- const w = ie(p).get();
2720
- cn(w) ? t.accept(n.model) : w === "declined" && t.decline(n.model);
2721
- });
2722
- }
2723
- const _e = (p) => {
2724
- B || bt || qe(p).catch(() => {
2725
- });
2726
- };
2727
- if (o === "auto") _e("auto");
2728
- else if (o === "idle") {
2729
- const p = globalThis.requestIdleCallback;
2730
- p ? p(() => _e("idle"), { timeout: ln }) : setTimeout(() => _e("idle"), Rt);
2731
- } else o === "visible" ? n.whenVisible ? n.whenVisible().then(() => _e("visible")) : setTimeout(() => _e("visible"), Rt) : t.inspect(n.model).catch(() => {
2732
- });
2733
- return {
2734
- stop() {
2735
- if (!B) {
2736
- B = !0, V && clearTimeout(V);
2737
- for (const p of Ve) p();
2738
- Nt(pe), pe = [];
2739
- }
2740
- },
2741
- run() {
2742
- return V && clearTimeout(V), V = null, vt();
2743
- },
2744
- async load() {
2745
- await qe("manual");
2746
- },
2747
- accept() {
2748
- t.accept(n.model);
2749
- },
2750
- decline() {
2751
- t.decline(n.model);
2752
- }
2753
- };
2754
- }
2755
- var dn = Object.defineProperty, fn = Object.getOwnPropertyDescriptor, M = (n, e, t, s) => {
2756
- for (var i = s > 1 ? void 0 : s ? fn(e, t) : e, r = n.length - 1, o; r >= 0; r--)
2757
- (o = n[r]) && (i = (s ? o(e, t, i) : o(i)) || i);
2758
- return s && i && dn(e, t, i), i;
2759
- };
2760
- let E = class extends be {
2761
- constructor() {
2762
- super(...arguments), this.model = "", this.inputProvider = "", this.outputProvider = "", this.statusProvider = "", this.triggerProvider = "", this.consentProvider = "", this.options = null, this.load = "", this.trigger = "", this.debounce = null, this.emptyValue = null, this.onInvalid = "keep", this.maxItems = null, this.maxChars = null, this.timeoutMs = null, this.persistResults = !1, this.resultsTtl = null, this.handle = null, this.offConfig = null, this.visible = null, this.whenVisible = () => (this.visible || (this.visible = new Promise((n) => {
2763
- const e = this.parentElement ?? this;
2764
- if (typeof IntersectionObserver > "u") return n();
2765
- const t = new IntersectionObserver((s) => {
2766
- s.some((i) => i.isIntersecting) && (t.disconnect(), n());
2767
- });
2768
- t.observe(e);
2769
- })), this.visible);
2770
- }
2771
- connectedCallback() {
2772
- super.connectedCallback(), this.offConfig = Ht(() => this.restart()), this.hasUpdated && this.restart();
2773
- }
2774
- disconnectedCallback() {
2775
- this.handle?.stop(), this.handle = null, this.offConfig?.(), this.offConfig = null, super.disconnectedCallback();
2776
- }
2777
- updated(n) {
2778
- n.size && this.isConnected && this.restart();
2779
- }
2780
- /** Calcule maintenant sur l'entrée courante. */
2781
- run() {
2782
- return this.handle?.run() ?? Promise.resolve();
2783
- }
2784
- /** Charge le modèle maintenant. */
2785
- loadModel() {
2786
- return this.handle?.load() ?? Promise.resolve();
2787
- }
2788
- accept() {
2789
- this.handle?.accept();
2790
- }
2791
- decline() {
2792
- this.handle?.decline();
2793
- }
2794
- restart() {
2795
- if (this.handle?.stop(), this.handle = null, !!this.isConnected && !(!this.model || !this.inputProvider || !this.outputProvider)) {
2796
- if (!yt()) {
2797
- console.warn(
2798
- "[sonic-hugging-face-infer] configureHuggingFace() n'a pas été appelé : composant inactif."
2799
- );
2800
- return;
2801
- }
2802
- try {
2803
- this.handle = Xt({
2804
- model: this.model,
2805
- input: this.inputProvider,
2806
- output: this.outputProvider,
2807
- status: this.statusProvider || void 0,
2808
- triggerProvider: this.triggerProvider || void 0,
2809
- consentProvider: this.consentProvider || void 0,
2810
- text: this.options?.text,
2811
- call: this.options?.call,
2812
- untrusted: !0,
2813
- load: this.load || void 0,
2814
- trigger: this.trigger || void 0,
2815
- debounceMs: this.debounce ?? void 0,
2816
- emptyValue: this.emptyValue,
2817
- onInvalid: this.onInvalid,
2818
- maxItems: this.maxItems ?? void 0,
2819
- maxChars: this.maxChars ?? void 0,
2820
- timeoutMs: this.timeoutMs ?? void 0,
2821
- persistResults: this.persistResults,
2822
- resultsTtlMs: this.resultsTtl ?? void 0,
2823
- whenVisible: this.whenVisible
2824
- });
2825
- } catch (n) {
2826
- console.error(n instanceof Error ? n.message : n);
2827
- }
2828
- }
2829
- }
2830
- render() {
2831
- return ps`<slot></slot>`;
2832
- }
2833
- };
2834
- E.styles = [
2835
- ts`
2836
- :host {
2837
- display: contents;
2838
- }
2839
- `
2840
- ];
2841
- M([
2842
- O({ type: String })
2843
- ], E.prototype, "model", 2);
2844
- M([
2845
- O({ type: String })
2846
- ], E.prototype, "inputProvider", 2);
2847
- M([
2848
- O({ type: String })
2849
- ], E.prototype, "outputProvider", 2);
2850
- M([
2851
- O({ type: String })
2852
- ], E.prototype, "statusProvider", 2);
2853
- M([
2854
- O({ type: String })
2855
- ], E.prototype, "triggerProvider", 2);
2856
- M([
2857
- O({ type: String })
2858
- ], E.prototype, "consentProvider", 2);
2859
- M([
2860
- O({ type: Object })
2861
- ], E.prototype, "options", 2);
2862
- M([
2863
- O({ type: String })
2864
- ], E.prototype, "load", 2);
2865
- M([
2866
- O({ type: String })
2867
- ], E.prototype, "trigger", 2);
2868
- M([
2869
- O({ type: Number })
2870
- ], E.prototype, "debounce", 2);
2871
- M([
2872
- O({ type: Object })
2873
- ], E.prototype, "emptyValue", 2);
2874
- M([
2875
- O({ type: String })
2876
- ], E.prototype, "onInvalid", 2);
2877
- M([
2878
- O({ type: Number })
2879
- ], E.prototype, "maxItems", 2);
2880
- M([
2881
- O({ type: Number })
2882
- ], E.prototype, "maxChars", 2);
2883
- M([
2884
- O({ type: Number })
2885
- ], E.prototype, "timeoutMs", 2);
2886
- M([
2887
- O({ type: Boolean })
2888
- ], E.prototype, "persistResults", 2);
2889
- M([
2890
- O({ type: Number })
2891
- ], E.prototype, "resultsTtl", 2);
2892
- E = M([
2893
- Ss("sonic-hugging-face-infer")
2894
- ], E);
2895
- function mn(n) {
2896
- Cs(n);
2897
- const e = yt();
2898
- return {
2899
- models: n.models,
2900
- registry: e,
2901
- infer(t) {
2902
- return Xt(
2903
- {
2904
- ...t,
2905
- input: t.input,
2906
- output: t.output,
2907
- text: t.text,
2908
- call: t.call,
2909
- untrusted: !1
2910
- },
2911
- e
2912
- );
2913
- },
2914
- async run(t, s, i, r = {}) {
2915
- const o = e.model(t), l = e.resolvedConfig.defaults, c = Wt(s, {
2916
- kind: Kt[o.task],
2917
- text: r.text,
2918
- maxItems: l.maxItems,
2919
- maxChars: l.maxChars
2920
- });
2921
- if (c.kind === "empty") return null;
2922
- if (c.kind === "invalid") throw new R("runtime", c.message);
2923
- const f = { ...o.defaults ?? {}, ...i ?? {} }, d = Gt[o.task];
2924
- await e.ensureLoaded(t, r.load ?? "first-use");
2925
- const u = await e.run(
2926
- {
2927
- alias: t,
2928
- inputs: c.payloads,
2929
- call: f,
2930
- positional: d,
2931
- batch: o.task === "feature-extraction" && !!f.pooling && f.pooling !== "none"
2932
- },
2933
- r.timeoutMs ?? l.timeoutMs
2934
- );
2935
- return c.many ? Vt(c, u) : u[0];
2936
- },
2937
- load: (t) => e.ensureLoaded(t, "manual"),
2938
- state: (t) => e.state(t),
2939
- subscribe: (t, s) => e.subscribe(t, s),
2940
- accept: (t) => e.accept(t),
2941
- decline: (t) => e.decline(t),
2942
- revokeConsent: (t) => e.revokeConsent(t),
2943
- clearModel: (t) => e.clearModel(t),
2944
- async clearAll() {
2945
- await e.clearAll(), await Js();
2946
- }
2947
- };
2948
- }
2949
- export {
2950
- mn as configureHuggingFace,
2951
- _n as defineHuggingFaceModels
2952
- };