@uploadcare/file-uploader 1.22.0 → 1.24.0-alpha.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 (732) hide show
  1. package/dist/abstract/loadFileUploaderFrom.d.ts +14 -0
  2. package/dist/abstract/loadFileUploaderFrom.js +78 -0
  3. package/dist/env.d.ts +4 -0
  4. package/dist/env.js +36 -0
  5. package/dist/index.css +2714 -0
  6. package/dist/index.d.ts +2043 -0
  7. package/dist/index.js +11914 -0
  8. package/{index.ssr.js → dist/index.ssr.js} +1113 -1082
  9. package/{locales → dist/locales}/file-uploader/ar.d.ts +5 -3
  10. package/dist/locales/file-uploader/ar.js +168 -0
  11. package/{locales → dist/locales}/file-uploader/az.d.ts +5 -3
  12. package/dist/locales/file-uploader/az.js +160 -0
  13. package/{locales → dist/locales}/file-uploader/ca.d.ts +5 -3
  14. package/dist/locales/file-uploader/ca.js +162 -0
  15. package/{locales → dist/locales}/file-uploader/cs.d.ts +5 -3
  16. package/dist/locales/file-uploader/cs.js +164 -0
  17. package/{locales → dist/locales}/file-uploader/da.d.ts +5 -3
  18. package/dist/locales/file-uploader/da.js +160 -0
  19. package/{locales → dist/locales}/file-uploader/de.d.ts +5 -3
  20. package/dist/locales/file-uploader/de.js +160 -0
  21. package/{locales → dist/locales}/file-uploader/el.d.ts +5 -3
  22. package/dist/locales/file-uploader/el.js +160 -0
  23. package/{locales → dist/locales}/file-uploader/en.d.ts +5 -3
  24. package/dist/locales/file-uploader/en.js +160 -0
  25. package/{locales → dist/locales}/file-uploader/es.d.ts +5 -3
  26. package/dist/locales/file-uploader/es.js +162 -0
  27. package/{locales → dist/locales}/file-uploader/et.d.ts +5 -3
  28. package/dist/locales/file-uploader/et.js +160 -0
  29. package/{locales → dist/locales}/file-uploader/fi.d.ts +5 -3
  30. package/dist/locales/file-uploader/fi.js +160 -0
  31. package/{locales → dist/locales}/file-uploader/fr.d.ts +5 -3
  32. package/dist/locales/file-uploader/fr.js +162 -0
  33. package/{locales → dist/locales}/file-uploader/he.d.ts +5 -3
  34. package/dist/locales/file-uploader/he.js +162 -0
  35. package/{locales → dist/locales}/file-uploader/hy.d.ts +5 -3
  36. package/dist/locales/file-uploader/hy.js +160 -0
  37. package/{locales → dist/locales}/file-uploader/is.d.ts +5 -3
  38. package/dist/locales/file-uploader/is.js +160 -0
  39. package/{locales → dist/locales}/file-uploader/it.d.ts +5 -3
  40. package/dist/locales/file-uploader/it.js +162 -0
  41. package/{locales → dist/locales}/file-uploader/ja.d.ts +5 -3
  42. package/dist/locales/file-uploader/ja.js +160 -0
  43. package/{locales → dist/locales}/file-uploader/ka.d.ts +5 -3
  44. package/dist/locales/file-uploader/ka.js +160 -0
  45. package/{locales → dist/locales}/file-uploader/kk.d.ts +5 -3
  46. package/dist/locales/file-uploader/kk.js +160 -0
  47. package/{locales → dist/locales}/file-uploader/ko.d.ts +5 -3
  48. package/dist/locales/file-uploader/ko.js +160 -0
  49. package/{locales → dist/locales}/file-uploader/lv.d.ts +5 -3
  50. package/dist/locales/file-uploader/lv.js +162 -0
  51. package/{locales → dist/locales}/file-uploader/nb.d.ts +5 -3
  52. package/dist/locales/file-uploader/nb.js +160 -0
  53. package/{locales → dist/locales}/file-uploader/nl.d.ts +5 -3
  54. package/dist/locales/file-uploader/nl.js +160 -0
  55. package/{locales → dist/locales}/file-uploader/pl.d.ts +5 -3
  56. package/dist/locales/file-uploader/pl.js +164 -0
  57. package/{locales → dist/locales}/file-uploader/pt.d.ts +5 -3
  58. package/dist/locales/file-uploader/pt.js +162 -0
  59. package/{locales → dist/locales}/file-uploader/ro.d.ts +5 -3
  60. package/dist/locales/file-uploader/ro.js +162 -0
  61. package/{locales → dist/locales}/file-uploader/ru.d.ts +5 -3
  62. package/dist/locales/file-uploader/ru.js +164 -0
  63. package/{locales → dist/locales}/file-uploader/sk.d.ts +5 -3
  64. package/dist/locales/file-uploader/sk.js +164 -0
  65. package/{locales → dist/locales}/file-uploader/sr.d.ts +5 -3
  66. package/dist/locales/file-uploader/sr.js +162 -0
  67. package/{locales → dist/locales}/file-uploader/sv.d.ts +5 -3
  68. package/dist/locales/file-uploader/sv.js +160 -0
  69. package/{locales → dist/locales}/file-uploader/tr.d.ts +5 -3
  70. package/dist/locales/file-uploader/tr.js +160 -0
  71. package/{locales → dist/locales}/file-uploader/uk.d.ts +5 -3
  72. package/dist/locales/file-uploader/uk.js +164 -0
  73. package/{locales → dist/locales}/file-uploader/vi.d.ts +5 -3
  74. package/dist/locales/file-uploader/vi.js +160 -0
  75. package/{locales → dist/locales}/file-uploader/zh-TW.d.ts +5 -3
  76. package/dist/locales/file-uploader/zh-TW.js +160 -0
  77. package/{locales → dist/locales}/file-uploader/zh.d.ts +5 -3
  78. package/dist/locales/file-uploader/zh.js +160 -0
  79. package/package.json +110 -63
  80. package/types/jsx.d.ts +10 -10
  81. package/web/file-uploader.iife.min.d.ts +2057 -0
  82. package/web/file-uploader.iife.min.js +4 -4
  83. package/web/file-uploader.min.d.ts +2057 -0
  84. package/web/file-uploader.min.js +4 -4
  85. package/web/uc-basic.min.css +26 -1
  86. package/web/uc-cloud-image-editor.min.css +26 -1
  87. package/web/uc-cloud-image-editor.min.d.ts +1544 -0
  88. package/web/uc-cloud-image-editor.min.js +4 -4
  89. package/web/uc-file-uploader-inline.min.css +26 -1
  90. package/web/uc-file-uploader-inline.min.d.ts +2057 -0
  91. package/web/uc-file-uploader-inline.min.js +4 -4
  92. package/web/uc-file-uploader-minimal.min.css +26 -1
  93. package/web/uc-file-uploader-minimal.min.d.ts +2057 -0
  94. package/web/uc-file-uploader-minimal.min.js +4 -4
  95. package/web/uc-file-uploader-regular.min.css +26 -1
  96. package/web/uc-file-uploader-regular.min.d.ts +2057 -0
  97. package/web/uc-file-uploader-regular.min.js +4 -4
  98. package/{blocks/Img/ImgBase.d.ts → web/uc-img.min.d.ts} +38 -3
  99. package/web/uc-img.min.js +3 -3
  100. package/abstract/ActivityBlock.d.ts +0 -79
  101. package/abstract/ActivityBlock.d.ts.map +0 -1
  102. package/abstract/ActivityBlock.js +0 -216
  103. package/abstract/Block.d.ts +0 -113
  104. package/abstract/Block.d.ts.map +0 -1
  105. package/abstract/Block.js +0 -410
  106. package/abstract/CTX.d.ts +0 -30
  107. package/abstract/CTX.d.ts.map +0 -1
  108. package/abstract/CTX.js +0 -39
  109. package/abstract/SolutionBlock.d.ts +0 -22
  110. package/abstract/SolutionBlock.d.ts.map +0 -1
  111. package/abstract/SolutionBlock.js +0 -23
  112. package/abstract/TypedCollection.d.ts +0 -127
  113. package/abstract/TypedCollection.d.ts.map +0 -1
  114. package/abstract/TypedCollection.js +0 -265
  115. package/abstract/TypedData.d.ts +0 -93
  116. package/abstract/TypedData.d.ts.map +0 -1
  117. package/abstract/TypedData.js +0 -134
  118. package/abstract/UploaderBlock.d.ts +0 -121
  119. package/abstract/UploaderBlock.d.ts.map +0 -1
  120. package/abstract/UploaderBlock.js +0 -511
  121. package/abstract/UploaderPublicApi.d.ts +0 -100
  122. package/abstract/UploaderPublicApi.d.ts.map +0 -1
  123. package/abstract/UploaderPublicApi.js +0 -399
  124. package/abstract/buildOutputCollectionState.d.ts +0 -8
  125. package/abstract/buildOutputCollectionState.d.ts.map +0 -1
  126. package/abstract/buildOutputCollectionState.js +0 -136
  127. package/abstract/defineComponents.d.ts +0 -5
  128. package/abstract/defineComponents.d.ts.map +0 -1
  129. package/abstract/defineComponents.js +0 -21
  130. package/abstract/l10nProcessor.d.ts +0 -7
  131. package/abstract/l10nProcessor.d.ts.map +0 -1
  132. package/abstract/l10nProcessor.js +0 -93
  133. package/abstract/loadFileUploaderFrom.d.ts +0 -8
  134. package/abstract/loadFileUploaderFrom.d.ts.map +0 -1
  135. package/abstract/loadFileUploaderFrom.js +0 -34
  136. package/abstract/localeRegistry.d.ts +0 -5
  137. package/abstract/localeRegistry.d.ts.map +0 -1
  138. package/abstract/localeRegistry.js +0 -63
  139. package/abstract/managers/LocaleManager.d.ts +0 -38
  140. package/abstract/managers/LocaleManager.d.ts.map +0 -1
  141. package/abstract/managers/LocaleManager.js +0 -130
  142. package/abstract/managers/ModalManager.d.ts +0 -122
  143. package/abstract/managers/ModalManager.d.ts.map +0 -1
  144. package/abstract/managers/ModalManager.js +0 -235
  145. package/abstract/managers/SecureUploadsManager.d.ts +0 -22
  146. package/abstract/managers/SecureUploadsManager.d.ts.map +0 -1
  147. package/abstract/managers/SecureUploadsManager.js +0 -91
  148. package/abstract/managers/TelemetryManager.d.ts +0 -71
  149. package/abstract/managers/TelemetryManager.d.ts.map +0 -1
  150. package/abstract/managers/TelemetryManager.js +0 -218
  151. package/abstract/managers/ValidationManager.d.ts +0 -150
  152. package/abstract/managers/ValidationManager.d.ts.map +0 -1
  153. package/abstract/managers/ValidationManager.js +0 -164
  154. package/abstract/managers/a11y.d.ts +0 -20
  155. package/abstract/managers/a11y.d.ts.map +0 -1
  156. package/abstract/managers/a11y.js +0 -118
  157. package/abstract/sharedConfigKey.d.ts +0 -2
  158. package/abstract/sharedConfigKey.d.ts.map +0 -1
  159. package/abstract/sharedConfigKey.js +0 -8
  160. package/abstract/testModeProcessor.d.ts +0 -7
  161. package/abstract/testModeProcessor.d.ts.map +0 -1
  162. package/abstract/testModeProcessor.js +0 -39
  163. package/abstract/uploadEntrySchema.d.ts +0 -126
  164. package/abstract/uploadEntrySchema.d.ts.map +0 -1
  165. package/abstract/uploadEntrySchema.js +0 -124
  166. package/blocks/ActivityHeader/ActivityHeader.d.ts +0 -4
  167. package/blocks/ActivityHeader/ActivityHeader.d.ts.map +0 -1
  168. package/blocks/ActivityHeader/ActivityHeader.js +0 -3
  169. package/blocks/ActivityHeader/activity-header.css +0 -14
  170. package/blocks/CameraSource/CameraSource.d.ts +0 -176
  171. package/blocks/CameraSource/CameraSource.d.ts.map +0 -1
  172. package/blocks/CameraSource/CameraSource.js +0 -929
  173. package/blocks/CameraSource/calcCameraModes.d.ts +0 -5
  174. package/blocks/CameraSource/calcCameraModes.d.ts.map +0 -1
  175. package/blocks/CameraSource/calcCameraModes.js +0 -11
  176. package/blocks/CameraSource/camera-source.css +0 -183
  177. package/blocks/CameraSource/constants.d.ts +0 -16
  178. package/blocks/CameraSource/constants.d.ts.map +0 -1
  179. package/blocks/CameraSource/constants.js +0 -19
  180. package/blocks/CloudImageEditor/index.css +0 -1
  181. package/blocks/CloudImageEditor/index.d.ts +0 -2
  182. package/blocks/CloudImageEditor/index.d.ts.map +0 -1
  183. package/blocks/CloudImageEditor/index.js +0 -1
  184. package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +0 -59
  185. package/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts.map +0 -1
  186. package/blocks/CloudImageEditor/src/CloudImageEditorBlock.js +0 -243
  187. package/blocks/CloudImageEditor/src/CropFrame.d.ts +0 -158
  188. package/blocks/CloudImageEditor/src/CropFrame.d.ts.map +0 -1
  189. package/blocks/CloudImageEditor/src/CropFrame.js +0 -569
  190. package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +0 -14
  191. package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts.map +0 -1
  192. package/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.js +0 -140
  193. package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +0 -10
  194. package/blocks/CloudImageEditor/src/EditorButtonControl.d.ts.map +0 -1
  195. package/blocks/CloudImageEditor/src/EditorButtonControl.js +0 -45
  196. package/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +0 -6
  197. package/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts.map +0 -1
  198. package/blocks/CloudImageEditor/src/EditorCropButtonControl.js +0 -52
  199. package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +0 -18
  200. package/blocks/CloudImageEditor/src/EditorFilterControl.d.ts.map +0 -1
  201. package/blocks/CloudImageEditor/src/EditorFilterControl.js +0 -177
  202. package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +0 -106
  203. package/blocks/CloudImageEditor/src/EditorImageCropper.d.ts.map +0 -1
  204. package/blocks/CloudImageEditor/src/EditorImageCropper.js +0 -551
  205. package/blocks/CloudImageEditor/src/EditorImageFader.d.ts +0 -132
  206. package/blocks/CloudImageEditor/src/EditorImageFader.d.ts.map +0 -1
  207. package/blocks/CloudImageEditor/src/EditorImageFader.js +0 -456
  208. package/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +0 -9
  209. package/blocks/CloudImageEditor/src/EditorOperationControl.d.ts.map +0 -1
  210. package/blocks/CloudImageEditor/src/EditorOperationControl.js +0 -50
  211. package/blocks/CloudImageEditor/src/EditorScroller.d.ts +0 -7
  212. package/blocks/CloudImageEditor/src/EditorScroller.d.ts.map +0 -1
  213. package/blocks/CloudImageEditor/src/EditorScroller.js +0 -33
  214. package/blocks/CloudImageEditor/src/EditorSlider.d.ts +0 -24
  215. package/blocks/CloudImageEditor/src/EditorSlider.d.ts.map +0 -1
  216. package/blocks/CloudImageEditor/src/EditorSlider.js +0 -118
  217. package/blocks/CloudImageEditor/src/EditorToolbar.d.ts +0 -124
  218. package/blocks/CloudImageEditor/src/EditorToolbar.d.ts.map +0 -1
  219. package/blocks/CloudImageEditor/src/EditorToolbar.js +0 -534
  220. package/blocks/CloudImageEditor/src/crop-utils.d.ts +0 -123
  221. package/blocks/CloudImageEditor/src/crop-utils.d.ts.map +0 -1
  222. package/blocks/CloudImageEditor/src/crop-utils.js +0 -729
  223. package/blocks/CloudImageEditor/src/cropper-constants.d.ts +0 -11
  224. package/blocks/CloudImageEditor/src/cropper-constants.d.ts.map +0 -1
  225. package/blocks/CloudImageEditor/src/cropper-constants.js +0 -11
  226. package/blocks/CloudImageEditor/src/css/common.css +0 -1259
  227. package/blocks/CloudImageEditor/src/css/icons.css +0 -12
  228. package/blocks/CloudImageEditor/src/css/index.css +0 -2
  229. package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +0 -21
  230. package/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts.map +0 -1
  231. package/blocks/CloudImageEditor/src/elements/button/BtnUi.js +0 -99
  232. package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +0 -11
  233. package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts.map +0 -1
  234. package/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.js +0 -52
  235. package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +0 -17
  236. package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts.map +0 -1
  237. package/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.js +0 -71
  238. package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +0 -16
  239. package/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts.map +0 -1
  240. package/blocks/CloudImageEditor/src/elements/slider/SliderUi.js +0 -179
  241. package/blocks/CloudImageEditor/src/index.d.ts +0 -16
  242. package/blocks/CloudImageEditor/src/index.d.ts.map +0 -1
  243. package/blocks/CloudImageEditor/src/index.js +0 -15
  244. package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts +0 -15
  245. package/blocks/CloudImageEditor/src/lib/FocusVisible.d.ts.map +0 -1
  246. package/blocks/CloudImageEditor/src/lib/FocusVisible.js +0 -33
  247. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts +0 -10
  248. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.d.ts.map +0 -1
  249. package/blocks/CloudImageEditor/src/lib/applyFocusVisiblePolyfill.js +0 -256
  250. package/blocks/CloudImageEditor/src/lib/classNames.d.ts +0 -3
  251. package/blocks/CloudImageEditor/src/lib/classNames.d.ts.map +0 -1
  252. package/blocks/CloudImageEditor/src/lib/classNames.js +0 -34
  253. package/blocks/CloudImageEditor/src/lib/linspace.d.ts +0 -8
  254. package/blocks/CloudImageEditor/src/lib/linspace.d.ts.map +0 -1
  255. package/blocks/CloudImageEditor/src/lib/linspace.js +0 -14
  256. package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +0 -3
  257. package/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts.map +0 -1
  258. package/blocks/CloudImageEditor/src/lib/parseCropPreset.js +0 -80
  259. package/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +0 -2
  260. package/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts.map +0 -1
  261. package/blocks/CloudImageEditor/src/lib/parseCropPreset.test.js +0 -35
  262. package/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +0 -2
  263. package/blocks/CloudImageEditor/src/lib/parseTabs.d.ts.map +0 -1
  264. package/blocks/CloudImageEditor/src/lib/parseTabs.js +0 -14
  265. package/blocks/CloudImageEditor/src/lib/pick.d.ts +0 -7
  266. package/blocks/CloudImageEditor/src/lib/pick.d.ts.map +0 -1
  267. package/blocks/CloudImageEditor/src/lib/pick.js +0 -15
  268. package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +0 -14
  269. package/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts.map +0 -1
  270. package/blocks/CloudImageEditor/src/lib/transformationUtils.js +0 -167
  271. package/blocks/CloudImageEditor/src/state.d.ts +0 -38
  272. package/blocks/CloudImageEditor/src/state.d.ts.map +0 -1
  273. package/blocks/CloudImageEditor/src/state.js +0 -92
  274. package/blocks/CloudImageEditor/src/svg-sprite.d.ts +0 -3
  275. package/blocks/CloudImageEditor/src/svg-sprite.d.ts.map +0 -1
  276. package/blocks/CloudImageEditor/src/svg-sprite.js +0 -1
  277. package/blocks/CloudImageEditor/src/template.d.ts +0 -2
  278. package/blocks/CloudImageEditor/src/template.d.ts.map +0 -1
  279. package/blocks/CloudImageEditor/src/template.js +0 -36
  280. package/blocks/CloudImageEditor/src/toolbar-constants.d.ts +0 -59
  281. package/blocks/CloudImageEditor/src/toolbar-constants.d.ts.map +0 -1
  282. package/blocks/CloudImageEditor/src/toolbar-constants.js +0 -116
  283. package/blocks/CloudImageEditor/src/types.d.ts +0 -66
  284. package/blocks/CloudImageEditor/src/types.d.ts.map +0 -1
  285. package/blocks/CloudImageEditor/src/types.js +0 -80
  286. package/blocks/CloudImageEditor/src/util.d.ts +0 -2
  287. package/blocks/CloudImageEditor/src/util.d.ts.map +0 -1
  288. package/blocks/CloudImageEditor/src/util.js +0 -21
  289. package/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +0 -11
  290. package/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts.map +0 -1
  291. package/blocks/CloudImageEditor/src/utils/parseFilterValue.js +0 -11
  292. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +0 -29
  293. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts.map +0 -1
  294. package/blocks/CloudImageEditorActivity/CloudImageEditorActivity.js +0 -128
  295. package/blocks/CloudImageEditorActivity/index.css +0 -13
  296. package/blocks/CloudImageEditorActivity/test.d.ts +0 -2
  297. package/blocks/CloudImageEditorActivity/test.d.ts.map +0 -1
  298. package/blocks/CloudImageEditorActivity/test.js +0 -9
  299. package/blocks/Config/Config.d.ts +0 -60
  300. package/blocks/Config/Config.d.ts.map +0 -1
  301. package/blocks/Config/Config.js +0 -263
  302. package/blocks/Config/assertions.d.ts +0 -5
  303. package/blocks/Config/assertions.d.ts.map +0 -1
  304. package/blocks/Config/assertions.js +0 -37
  305. package/blocks/Config/config.css +0 -3
  306. package/blocks/Config/initialConfig.d.ts +0 -7
  307. package/blocks/Config/initialConfig.d.ts.map +0 -1
  308. package/blocks/Config/initialConfig.js +0 -91
  309. package/blocks/Config/normalizeConfigValue.d.ts +0 -2
  310. package/blocks/Config/normalizeConfigValue.d.ts.map +0 -1
  311. package/blocks/Config/normalizeConfigValue.js +0 -127
  312. package/blocks/Config/side-effects.d.ts +0 -11
  313. package/blocks/Config/side-effects.d.ts.map +0 -1
  314. package/blocks/Config/side-effects.js +0 -126
  315. package/blocks/Config/validatorsType.d.ts +0 -37
  316. package/blocks/Config/validatorsType.d.ts.map +0 -1
  317. package/blocks/Config/validatorsType.js +0 -134
  318. package/blocks/Copyright/Copyright.d.ts +0 -4
  319. package/blocks/Copyright/Copyright.d.ts.map +0 -1
  320. package/blocks/Copyright/Copyright.js +0 -24
  321. package/blocks/Copyright/copyright.css +0 -32
  322. package/blocks/DropArea/DropArea.d.ts +0 -49
  323. package/blocks/DropArea/DropArea.d.ts.map +0 -1
  324. package/blocks/DropArea/DropArea.js +0 -292
  325. package/blocks/DropArea/addDropzone.d.ts +0 -21
  326. package/blocks/DropArea/addDropzone.d.ts.map +0 -1
  327. package/blocks/DropArea/addDropzone.js +0 -137
  328. package/blocks/DropArea/drop-area.css +0 -201
  329. package/blocks/DropArea/getDropItems.d.ts +0 -16
  330. package/blocks/DropArea/getDropItems.d.ts.map +0 -1
  331. package/blocks/DropArea/getDropItems.js +0 -167
  332. package/blocks/ExternalSource/ExternalSource.d.ts +0 -82
  333. package/blocks/ExternalSource/ExternalSource.d.ts.map +0 -1
  334. package/blocks/ExternalSource/ExternalSource.js +0 -320
  335. package/blocks/ExternalSource/MessageBridge.d.ts +0 -20
  336. package/blocks/ExternalSource/MessageBridge.d.ts.map +0 -1
  337. package/blocks/ExternalSource/MessageBridge.js +0 -73
  338. package/blocks/ExternalSource/buildThemeDefinition.d.ts +0 -3
  339. package/blocks/ExternalSource/buildThemeDefinition.d.ts.map +0 -1
  340. package/blocks/ExternalSource/buildThemeDefinition.js +0 -47
  341. package/blocks/ExternalSource/external-source.css +0 -94
  342. package/blocks/ExternalSource/query-string.d.ts +0 -8
  343. package/blocks/ExternalSource/query-string.d.ts.map +0 -1
  344. package/blocks/ExternalSource/query-string.js +0 -14
  345. package/blocks/ExternalSource/types.d.ts +0 -106
  346. package/blocks/ExternalSource/types.d.ts.map +0 -1
  347. package/blocks/ExternalSource/types.js +0 -133
  348. package/blocks/FileItem/FileItem.d.ts +0 -76
  349. package/blocks/FileItem/FileItem.d.ts.map +0 -1
  350. package/blocks/FileItem/FileItem.js +0 -461
  351. package/blocks/FileItem/FileItemConfig.d.ts +0 -28
  352. package/blocks/FileItem/FileItemConfig.d.ts.map +0 -1
  353. package/blocks/FileItem/FileItemConfig.js +0 -74
  354. package/blocks/FileItem/file-item.css +0 -243
  355. package/blocks/FormInput/FormInput.d.ts +0 -7
  356. package/blocks/FormInput/FormInput.d.ts.map +0 -1
  357. package/blocks/FormInput/FormInput.js +0 -92
  358. package/blocks/Icon/Icon.d.ts +0 -11
  359. package/blocks/Icon/Icon.d.ts.map +0 -1
  360. package/blocks/Icon/Icon.js +0 -43
  361. package/blocks/Icon/icon.css +0 -12
  362. package/blocks/Img/Img.d.ts +0 -4
  363. package/blocks/Img/Img.d.ts.map +0 -1
  364. package/blocks/Img/Img.js +0 -21
  365. package/blocks/Img/ImgBase.d.ts.map +0 -1
  366. package/blocks/Img/ImgBase.js +0 -408
  367. package/blocks/Img/ImgConfig.d.ts +0 -31
  368. package/blocks/Img/ImgConfig.d.ts.map +0 -1
  369. package/blocks/Img/ImgConfig.js +0 -102
  370. package/blocks/Img/configurations.d.ts +0 -12
  371. package/blocks/Img/configurations.d.ts.map +0 -1
  372. package/blocks/Img/configurations.js +0 -14
  373. package/blocks/Img/props-map.d.ts +0 -29
  374. package/blocks/Img/props-map.d.ts.map +0 -1
  375. package/blocks/Img/props-map.js +0 -34
  376. package/blocks/Img/test.css +0 -16
  377. package/blocks/Img/utils/parseObjectToString.d.ts +0 -2
  378. package/blocks/Img/utils/parseObjectToString.d.ts.map +0 -1
  379. package/blocks/Img/utils/parseObjectToString.js +0 -13
  380. package/blocks/Modal/Modal.d.ts +0 -43
  381. package/blocks/Modal/Modal.d.ts.map +0 -1
  382. package/blocks/Modal/Modal.js +0 -158
  383. package/blocks/Modal/modal.css +0 -45
  384. package/blocks/ProgressBar/ProgressBar.d.ts +0 -17
  385. package/blocks/ProgressBar/ProgressBar.d.ts.map +0 -1
  386. package/blocks/ProgressBar/ProgressBar.js +0 -62
  387. package/blocks/ProgressBar/progress-bar.css +0 -62
  388. package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +0 -8
  389. package/blocks/ProgressBarCommon/ProgressBarCommon.d.ts.map +0 -1
  390. package/blocks/ProgressBarCommon/ProgressBarCommon.js +0 -44
  391. package/blocks/ProgressBarCommon/progress-bar-common.css +0 -16
  392. package/blocks/Range/Range.d.ts +0 -16
  393. package/blocks/Range/Range.d.ts.map +0 -1
  394. package/blocks/Range/Range.js +0 -44
  395. package/blocks/Range/range.css +0 -65
  396. package/blocks/Select/Select.d.ts +0 -9
  397. package/blocks/Select/Select.d.ts.map +0 -1
  398. package/blocks/Select/Select.js +0 -35
  399. package/blocks/Select/select.css +0 -22
  400. package/blocks/SimpleBtn/SimpleBtn.d.ts +0 -25
  401. package/blocks/SimpleBtn/SimpleBtn.d.ts.map +0 -1
  402. package/blocks/SimpleBtn/SimpleBtn.js +0 -54
  403. package/blocks/SimpleBtn/simple-btn.css +0 -64
  404. package/blocks/SourceBtn/SourceBtn.d.ts +0 -57
  405. package/blocks/SourceBtn/SourceBtn.d.ts.map +0 -1
  406. package/blocks/SourceBtn/SourceBtn.js +0 -172
  407. package/blocks/SourceBtn/source-btn.css +0 -53
  408. package/blocks/SourceList/SourceList.d.ts +0 -4
  409. package/blocks/SourceList/SourceList.d.ts.map +0 -1
  410. package/blocks/SourceList/SourceList.js +0 -51
  411. package/blocks/Spinner/Spinner.d.ts +0 -8
  412. package/blocks/Spinner/Spinner.d.ts.map +0 -1
  413. package/blocks/Spinner/Spinner.js +0 -5
  414. package/blocks/Spinner/spinner.css +0 -18
  415. package/blocks/StartFrom/StartFrom.d.ts +0 -7
  416. package/blocks/StartFrom/StartFrom.d.ts.map +0 -1
  417. package/blocks/StartFrom/StartFrom.js +0 -14
  418. package/blocks/StartFrom/start-from.css +0 -28
  419. package/blocks/Thumb/Thumb.d.ts +0 -51
  420. package/blocks/Thumb/Thumb.d.ts.map +0 -1
  421. package/blocks/Thumb/Thumb.js +0 -235
  422. package/blocks/Thumb/thumb.css +0 -4
  423. package/blocks/UploadCtxProvider/EventEmitter.d.ts +0 -125
  424. package/blocks/UploadCtxProvider/EventEmitter.d.ts.map +0 -1
  425. package/blocks/UploadCtxProvider/EventEmitter.js +0 -144
  426. package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +0 -35
  427. package/blocks/UploadCtxProvider/UploadCtxProvider.d.ts.map +0 -1
  428. package/blocks/UploadCtxProvider/UploadCtxProvider.js +0 -46
  429. package/blocks/UploadList/UploadList.d.ts +0 -60
  430. package/blocks/UploadList/UploadList.d.ts.map +0 -1
  431. package/blocks/UploadList/UploadList.js +0 -263
  432. package/blocks/UploadList/upload-list.css +0 -88
  433. package/blocks/UrlSource/UrlSource.d.ts +0 -9
  434. package/blocks/UrlSource/UrlSource.d.ts.map +0 -1
  435. package/blocks/UrlSource/UrlSource.js +0 -69
  436. package/blocks/UrlSource/url-source.css +0 -16
  437. package/blocks/svg-backgrounds/svg-backgrounds.d.ts +0 -17
  438. package/blocks/svg-backgrounds/svg-backgrounds.d.ts.map +0 -1
  439. package/blocks/svg-backgrounds/svg-backgrounds.js +0 -45
  440. package/blocks/themes/uc-basic/common.css +0 -129
  441. package/blocks/themes/uc-basic/config.css +0 -4
  442. package/blocks/themes/uc-basic/index.css +0 -37
  443. package/blocks/themes/uc-basic/post-reset.css +0 -3
  444. package/blocks/themes/uc-basic/svg-sprite.d.ts +0 -3
  445. package/blocks/themes/uc-basic/svg-sprite.d.ts.map +0 -1
  446. package/blocks/themes/uc-basic/svg-sprite.js +0 -1
  447. package/blocks/themes/uc-basic/theme.css +0 -291
  448. package/blocks/utils/UploadSource.d.ts +0 -39
  449. package/blocks/utils/UploadSource.d.ts.map +0 -1
  450. package/blocks/utils/UploadSource.js +0 -33
  451. package/blocks/utils/abilities.d.ts +0 -2
  452. package/blocks/utils/abilities.d.ts.map +0 -1
  453. package/blocks/utils/abilities.js +0 -3
  454. package/blocks/utils/comma-separated.d.ts +0 -3
  455. package/blocks/utils/comma-separated.d.ts.map +0 -1
  456. package/blocks/utils/comma-separated.js +0 -22
  457. package/blocks/utils/debounce.d.ts +0 -12
  458. package/blocks/utils/debounce.d.ts.map +0 -1
  459. package/blocks/utils/debounce.js +0 -22
  460. package/blocks/utils/preloadImage.d.ts +0 -11
  461. package/blocks/utils/preloadImage.d.ts.map +0 -1
  462. package/blocks/utils/preloadImage.js +0 -38
  463. package/blocks/utils/resizeImage.d.ts +0 -6
  464. package/blocks/utils/resizeImage.d.ts.map +0 -1
  465. package/blocks/utils/resizeImage.js +0 -40
  466. package/blocks/utils/throttle.d.ts +0 -6
  467. package/blocks/utils/throttle.d.ts.map +0 -1
  468. package/blocks/utils/throttle.js +0 -45
  469. package/blocks/utils/userAgent.d.ts +0 -6
  470. package/blocks/utils/userAgent.d.ts.map +0 -1
  471. package/blocks/utils/userAgent.js +0 -14
  472. package/env.d.ts +0 -4
  473. package/env.d.ts.map +0 -1
  474. package/env.js +0 -3
  475. package/index.d.ts +0 -43
  476. package/index.d.ts.map +0 -1
  477. package/index.js +0 -55
  478. package/index.ssr.d.ts +0 -1111
  479. package/index.ssr.d.ts.map +0 -1
  480. package/locales/file-uploader/ar.d.ts.map +0 -1
  481. package/locales/file-uploader/ar.js +0 -137
  482. package/locales/file-uploader/az.d.ts.map +0 -1
  483. package/locales/file-uploader/az.js +0 -130
  484. package/locales/file-uploader/ca.d.ts.map +0 -1
  485. package/locales/file-uploader/ca.js +0 -134
  486. package/locales/file-uploader/cs.d.ts.map +0 -1
  487. package/locales/file-uploader/cs.js +0 -136
  488. package/locales/file-uploader/da.d.ts.map +0 -1
  489. package/locales/file-uploader/da.js +0 -132
  490. package/locales/file-uploader/de.d.ts.map +0 -1
  491. package/locales/file-uploader/de.js +0 -133
  492. package/locales/file-uploader/el.d.ts.map +0 -1
  493. package/locales/file-uploader/el.js +0 -133
  494. package/locales/file-uploader/en.d.ts.map +0 -1
  495. package/locales/file-uploader/en.js +0 -129
  496. package/locales/file-uploader/es.d.ts.map +0 -1
  497. package/locales/file-uploader/es.js +0 -134
  498. package/locales/file-uploader/et.d.ts.map +0 -1
  499. package/locales/file-uploader/et.js +0 -131
  500. package/locales/file-uploader/fi.d.ts.map +0 -1
  501. package/locales/file-uploader/fi.js +0 -132
  502. package/locales/file-uploader/fr.d.ts.map +0 -1
  503. package/locales/file-uploader/fr.js +0 -134
  504. package/locales/file-uploader/he.d.ts.map +0 -1
  505. package/locales/file-uploader/he.js +0 -133
  506. package/locales/file-uploader/hy.d.ts.map +0 -1
  507. package/locales/file-uploader/hy.js +0 -130
  508. package/locales/file-uploader/is.d.ts.map +0 -1
  509. package/locales/file-uploader/is.js +0 -131
  510. package/locales/file-uploader/it.d.ts.map +0 -1
  511. package/locales/file-uploader/it.js +0 -134
  512. package/locales/file-uploader/ja.d.ts.map +0 -1
  513. package/locales/file-uploader/ja.js +0 -131
  514. package/locales/file-uploader/ka.d.ts.map +0 -1
  515. package/locales/file-uploader/ka.js +0 -131
  516. package/locales/file-uploader/kk.d.ts.map +0 -1
  517. package/locales/file-uploader/kk.js +0 -131
  518. package/locales/file-uploader/ko.d.ts.map +0 -1
  519. package/locales/file-uploader/ko.js +0 -130
  520. package/locales/file-uploader/lv.d.ts.map +0 -1
  521. package/locales/file-uploader/lv.js +0 -133
  522. package/locales/file-uploader/nb.d.ts.map +0 -1
  523. package/locales/file-uploader/nb.js +0 -131
  524. package/locales/file-uploader/nl.d.ts.map +0 -1
  525. package/locales/file-uploader/nl.js +0 -132
  526. package/locales/file-uploader/pl.d.ts.map +0 -1
  527. package/locales/file-uploader/pl.js +0 -135
  528. package/locales/file-uploader/pt.d.ts.map +0 -1
  529. package/locales/file-uploader/pt.js +0 -134
  530. package/locales/file-uploader/ro.d.ts.map +0 -1
  531. package/locales/file-uploader/ro.js +0 -134
  532. package/locales/file-uploader/ru.d.ts.map +0 -1
  533. package/locales/file-uploader/ru.js +0 -133
  534. package/locales/file-uploader/sk.d.ts.map +0 -1
  535. package/locales/file-uploader/sk.js +0 -135
  536. package/locales/file-uploader/sr.d.ts.map +0 -1
  537. package/locales/file-uploader/sr.js +0 -133
  538. package/locales/file-uploader/sv.d.ts.map +0 -1
  539. package/locales/file-uploader/sv.js +0 -131
  540. package/locales/file-uploader/tr.d.ts.map +0 -1
  541. package/locales/file-uploader/tr.js +0 -131
  542. package/locales/file-uploader/uk.d.ts.map +0 -1
  543. package/locales/file-uploader/uk.js +0 -135
  544. package/locales/file-uploader/vi.d.ts.map +0 -1
  545. package/locales/file-uploader/vi.js +0 -131
  546. package/locales/file-uploader/zh-TW.d.ts.map +0 -1
  547. package/locales/file-uploader/zh-TW.js +0 -131
  548. package/locales/file-uploader/zh.d.ts.map +0 -1
  549. package/locales/file-uploader/zh.js +0 -129
  550. package/solutions/adaptive-image/index.d.ts +0 -3
  551. package/solutions/adaptive-image/index.d.ts.map +0 -1
  552. package/solutions/adaptive-image/index.js +0 -5
  553. package/solutions/cloud-image-editor/CloudImageEditor.d.ts +0 -39
  554. package/solutions/cloud-image-editor/CloudImageEditor.d.ts.map +0 -1
  555. package/solutions/cloud-image-editor/CloudImageEditor.js +0 -24
  556. package/solutions/cloud-image-editor/index.css +0 -2
  557. package/solutions/cloud-image-editor/index.d.ts +0 -6
  558. package/solutions/cloud-image-editor/index.d.ts.map +0 -1
  559. package/solutions/cloud-image-editor/index.js +0 -11
  560. package/solutions/file-uploader/inline/FileUploaderInline.d.ts +0 -27
  561. package/solutions/file-uploader/inline/FileUploaderInline.d.ts.map +0 -1
  562. package/solutions/file-uploader/inline/FileUploaderInline.js +0 -80
  563. package/solutions/file-uploader/inline/index.css +0 -54
  564. package/solutions/file-uploader/inline/index.d.ts +0 -2
  565. package/solutions/file-uploader/inline/index.d.ts.map +0 -1
  566. package/solutions/file-uploader/inline/index.js +0 -1
  567. package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +0 -43
  568. package/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts.map +0 -1
  569. package/solutions/file-uploader/minimal/FileUploaderMinimal.js +0 -163
  570. package/solutions/file-uploader/minimal/index.css +0 -147
  571. package/solutions/file-uploader/minimal/index.d.ts +0 -2
  572. package/solutions/file-uploader/minimal/index.d.ts.map +0 -1
  573. package/solutions/file-uploader/minimal/index.js +0 -1
  574. package/solutions/file-uploader/regular/FileUploaderRegular.d.ts +0 -24
  575. package/solutions/file-uploader/regular/FileUploaderRegular.d.ts.map +0 -1
  576. package/solutions/file-uploader/regular/FileUploaderRegular.js +0 -69
  577. package/solutions/file-uploader/regular/index.css +0 -1
  578. package/solutions/file-uploader/regular/index.d.ts +0 -2
  579. package/solutions/file-uploader/regular/index.d.ts.map +0 -1
  580. package/solutions/file-uploader/regular/index.js +0 -1
  581. package/types/events.d.ts +0 -5
  582. package/types/events.js +0 -1
  583. package/types/exported.d.ts +0 -534
  584. package/types/exported.js +0 -1
  585. package/types/global.d.ts +0 -8
  586. package/types/https.d.ts +0 -1
  587. package/types/index.d.ts +0 -2
  588. package/types/index.js +0 -3
  589. package/utils/WindowHeightTracker.d.ts +0 -24
  590. package/utils/WindowHeightTracker.d.ts.map +0 -1
  591. package/utils/WindowHeightTracker.js +0 -51
  592. package/utils/browser-info.d.ts +0 -13
  593. package/utils/browser-info.d.ts.map +0 -1
  594. package/utils/browser-info.js +0 -22
  595. package/utils/browser-info.test.d.ts +0 -2
  596. package/utils/browser-info.test.d.ts.map +0 -1
  597. package/utils/browser-info.test.js +0 -109
  598. package/utils/cdn-utils.d.ts +0 -59
  599. package/utils/cdn-utils.d.ts.map +0 -1
  600. package/utils/cdn-utils.js +0 -199
  601. package/utils/cdn-utils.test.d.ts +0 -2
  602. package/utils/cdn-utils.test.d.ts.map +0 -1
  603. package/utils/cdn-utils.test.js +0 -227
  604. package/utils/delay.d.ts +0 -2
  605. package/utils/delay.d.ts.map +0 -1
  606. package/utils/delay.js +0 -4
  607. package/utils/fileTypes.d.ts +0 -12
  608. package/utils/fileTypes.d.ts.map +0 -1
  609. package/utils/fileTypes.js +0 -111
  610. package/utils/fileTypes.test.d.ts +0 -2
  611. package/utils/fileTypes.test.d.ts.map +0 -1
  612. package/utils/fileTypes.test.js +0 -89
  613. package/utils/get-top-level-origin.d.ts +0 -2
  614. package/utils/get-top-level-origin.d.ts.map +0 -1
  615. package/utils/get-top-level-origin.js +0 -11
  616. package/utils/getLocaleDirection.d.ts +0 -2
  617. package/utils/getLocaleDirection.d.ts.map +0 -1
  618. package/utils/getLocaleDirection.js +0 -18
  619. package/utils/getPluralForm.d.ts +0 -3
  620. package/utils/getPluralForm.d.ts.map +0 -1
  621. package/utils/getPluralForm.js +0 -13
  622. package/utils/getPluralForm.test.d.ts +0 -2
  623. package/utils/getPluralForm.test.d.ts.map +0 -1
  624. package/utils/getPluralForm.test.js +0 -16
  625. package/utils/ifRef.d.ts +0 -7
  626. package/utils/ifRef.d.ts.map +0 -1
  627. package/utils/ifRef.js +0 -9
  628. package/utils/isPromiseLike.d.ts +0 -2
  629. package/utils/isPromiseLike.d.ts.map +0 -1
  630. package/utils/isPromiseLike.js +0 -12
  631. package/utils/isPromiseLike.test.d.ts +0 -2
  632. package/utils/isPromiseLike.test.d.ts.map +0 -1
  633. package/utils/isPromiseLike.test.js +0 -20
  634. package/utils/isSecureTokenExpired.d.ts +0 -4
  635. package/utils/isSecureTokenExpired.d.ts.map +0 -1
  636. package/utils/isSecureTokenExpired.js +0 -17
  637. package/utils/isSecureTokenExpired.test.d.ts +0 -2
  638. package/utils/isSecureTokenExpired.test.d.ts.map +0 -1
  639. package/utils/isSecureTokenExpired.test.js +0 -33
  640. package/utils/memoize.d.ts +0 -2
  641. package/utils/memoize.d.ts.map +0 -1
  642. package/utils/memoize.js +0 -23
  643. package/utils/memoize.test.d.ts +0 -2
  644. package/utils/memoize.test.d.ts.map +0 -1
  645. package/utils/memoize.test.js +0 -38
  646. package/utils/mixinClass.d.ts +0 -10
  647. package/utils/mixinClass.d.ts.map +0 -1
  648. package/utils/mixinClass.js +0 -18
  649. package/utils/parseCdnUrl.d.ts +0 -9
  650. package/utils/parseCdnUrl.d.ts.map +0 -1
  651. package/utils/parseCdnUrl.js +0 -23
  652. package/utils/parseCdnUrl.test.d.ts +0 -2
  653. package/utils/parseCdnUrl.test.d.ts.map +0 -1
  654. package/utils/parseCdnUrl.test.js +0 -91
  655. package/utils/parseShrink.d.ts +0 -5
  656. package/utils/parseShrink.d.ts.map +0 -1
  657. package/utils/parseShrink.js +0 -34
  658. package/utils/parseShrink.test.d.ts +0 -2
  659. package/utils/parseShrink.test.d.ts.map +0 -1
  660. package/utils/parseShrink.test.js +0 -26
  661. package/utils/prettyBytes.d.ts +0 -11
  662. package/utils/prettyBytes.d.ts.map +0 -1
  663. package/utils/prettyBytes.js +0 -64
  664. package/utils/prettyBytes.test.d.ts +0 -2
  665. package/utils/prettyBytes.test.d.ts.map +0 -1
  666. package/utils/prettyBytes.test.js +0 -99
  667. package/utils/stringToArray.d.ts +0 -2
  668. package/utils/stringToArray.d.ts.map +0 -1
  669. package/utils/stringToArray.js +0 -11
  670. package/utils/stringToArray.test.d.ts +0 -2
  671. package/utils/stringToArray.test.d.ts.map +0 -1
  672. package/utils/stringToArray.test.js +0 -20
  673. package/utils/template-utils.d.ts +0 -40
  674. package/utils/template-utils.d.ts.map +0 -1
  675. package/utils/template-utils.js +0 -50
  676. package/utils/template-utils.test.d.ts +0 -2
  677. package/utils/template-utils.test.d.ts.map +0 -1
  678. package/utils/template-utils.test.js +0 -56
  679. package/utils/toKebabCase.d.ts +0 -3
  680. package/utils/toKebabCase.d.ts.map +0 -1
  681. package/utils/toKebabCase.js +0 -15
  682. package/utils/toKebabCase.test.d.ts +0 -2
  683. package/utils/toKebabCase.test.d.ts.map +0 -1
  684. package/utils/toKebabCase.test.js +0 -11
  685. package/utils/transparentPixelSrc.d.ts +0 -2
  686. package/utils/transparentPixelSrc.d.ts.map +0 -1
  687. package/utils/transparentPixelSrc.js +0 -2
  688. package/utils/uniqueArray.d.ts +0 -2
  689. package/utils/uniqueArray.d.ts.map +0 -1
  690. package/utils/uniqueArray.js +0 -8
  691. package/utils/uniqueArray.test.d.ts +0 -2
  692. package/utils/uniqueArray.test.d.ts.map +0 -1
  693. package/utils/uniqueArray.test.js +0 -8
  694. package/utils/validators/collection/index.d.ts +0 -3
  695. package/utils/validators/collection/index.d.ts.map +0 -1
  696. package/utils/validators/collection/index.js +0 -2
  697. package/utils/validators/collection/validateCollectionUploadError.d.ts +0 -3
  698. package/utils/validators/collection/validateCollectionUploadError.d.ts.map +0 -1
  699. package/utils/validators/collection/validateCollectionUploadError.js +0 -11
  700. package/utils/validators/collection/validateMultiple.d.ts +0 -3
  701. package/utils/validators/collection/validateMultiple.d.ts.map +0 -1
  702. package/utils/validators/collection/validateMultiple.js +0 -43
  703. package/utils/validators/file/index.d.ts +0 -5
  704. package/utils/validators/file/index.d.ts.map +0 -1
  705. package/utils/validators/file/index.js +0 -4
  706. package/utils/validators/file/validateFileType.d.ts +0 -3
  707. package/utils/validators/file/validateFileType.d.ts.map +0 -1
  708. package/utils/validators/file/validateFileType.js +0 -30
  709. package/utils/validators/file/validateIsImage.d.ts +0 -3
  710. package/utils/validators/file/validateIsImage.d.ts.map +0 -1
  711. package/utils/validators/file/validateIsImage.js +0 -25
  712. package/utils/validators/file/validateMaxSizeLimit.d.ts +0 -3
  713. package/utils/validators/file/validateMaxSizeLimit.d.ts.map +0 -1
  714. package/utils/validators/file/validateMaxSizeLimit.js +0 -15
  715. package/utils/validators/file/validateUploadError.d.ts +0 -3
  716. package/utils/validators/file/validateUploadError.d.ts.map +0 -1
  717. package/utils/validators/file/validateUploadError.js +0 -48
  718. package/utils/waitForAttribute.d.ts +0 -8
  719. package/utils/waitForAttribute.d.ts.map +0 -1
  720. package/utils/waitForAttribute.js +0 -43
  721. package/utils/waitForAttribute.test.d.ts +0 -2
  722. package/utils/waitForAttribute.test.d.ts.map +0 -1
  723. package/utils/waitForAttribute.test.js +0 -78
  724. package/utils/warnOnce.d.ts +0 -3
  725. package/utils/warnOnce.d.ts.map +0 -1
  726. package/utils/warnOnce.js +0 -11
  727. package/utils/wildcardRegexp.d.ts +0 -2
  728. package/utils/wildcardRegexp.d.ts.map +0 -1
  729. package/utils/wildcardRegexp.js +0 -17
  730. package/utils/wildcardRegexp.test.d.ts +0 -2
  731. package/utils/wildcardRegexp.test.d.ts.map +0 -1
  732. package/utils/wildcardRegexp.test.js +0 -19
@@ -1,4 +1,36 @@
1
- export class ImgBase extends ImgConfig {
1
+ import { BaseComponent } from '@symbiotejs/symbiote';
2
+
3
+ declare class ImgConfig extends BaseComponent<any> {
4
+ static get observedAttributes(): string[];
5
+ constructor();
6
+ cssInit$: any;
7
+ /**
8
+ * @param {String} key
9
+ * @returns {any}
10
+ */
11
+ $$(key: string): any;
12
+ /** @param {Object<String, String | Number>} kvObj */
13
+ set$$(kvObj: any): void;
14
+ /**
15
+ * @param {String} key
16
+ * @param {(val: any) => void} kbFn
17
+ */
18
+ sub$$(key: string, kbFn: (val: any) => void): void;
19
+ analyticsParams(): string;
20
+ initAttributes(el: any): void;
21
+ /**
22
+ * @param {HTMLElement} el
23
+ * @param {() => void} cbkFn
24
+ */
25
+ initIntersection(el: HTMLElement, cbkFn: () => void): void;
26
+ /** @private */
27
+ private _isnObserver;
28
+ /** @private */
29
+ private _observed;
30
+ attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
31
+ }
32
+
33
+ declare class ImgBase extends ImgConfig {
2
34
  _img: HTMLImageElement;
3
35
  _imgPreview: HTMLImageElement;
4
36
  /**
@@ -76,5 +108,8 @@ export class ImgBase extends ImgConfig {
76
108
  renderImage(): Promise<void>;
77
109
  init(): void;
78
110
  }
79
- import { ImgConfig } from './ImgConfig.js';
80
- //# sourceMappingURL=ImgBase.d.ts.map
111
+
112
+ declare class Img extends ImgBase {
113
+ }
114
+
115
+ export { Img };
package/web/uc-img.min.js CHANGED
@@ -23,6 +23,6 @@
23
23
  * SOFTWARE.
24
24
  *
25
25
  */
26
- var ot=Object.defineProperty;var at=(t,s,e)=>s in t?ot(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e;var w=(t,s,e)=>at(t,typeof s!="symbol"?s+"":s,e);var lt=t=>t,ht="{{",ut="}}";function j(t,s,e={}){var o;let{openToken:r=ht,closeToken:i=ut,transform:n=lt}=e;for(let l in s){let u=(o=s[l])==null?void 0:o.toString();t=t.replaceAll(r+l+i,typeof u=="string"?n(u):u)}return t}var ct=t=>{if(typeof t!="string"||!t)return"";let s=t.trim();return s.startsWith("-/")?s=s.slice(2):s.startsWith("/")&&(s=s.slice(1)),s.endsWith("/")&&(s=s.slice(0,s.length-1)),s},dt=(...t)=>t.filter(s=>typeof s=="string"&&s).map(s=>ct(s)).join("/-/"),W=(...t)=>{let s=dt(...t);return s?`-/${s}/`:""};function K(t){let s=new URL(t),e=s.pathname+s.search+s.hash,r=e.lastIndexOf("http"),i=e.lastIndexOf("/"),n="";return r>=0?n=e.slice(r):i>=0&&(n=e.slice(i+1)),n}function _t(t){let s=new URL(t),e=K(t),r=z(e)?H(e).pathname:e;return s.pathname=s.pathname.replace(r,""),s.search="",s.hash="",s.toString()}function z(t){return t.startsWith("http")}function H(t){let s=new URL(t);return{pathname:s.origin+s.pathname||"",search:s.search||"",hash:s.hash||""}}var m=(t,s,e)=>{let r=new URL(_t(t));if(e=e||K(t),r.pathname.startsWith("//")&&(r.pathname=r.pathname.replace("//","/")),z(e)){let i=H(e);r.pathname=r.pathname+(s||"")+(i.pathname||""),r.search=i.search,r.hash=i.hash}else r.pathname=r.pathname+(s||"")+(e||"");return r.toString()},D=(t,s)=>{let e=new URL(t);return e.pathname=s+"/",e.toString()};var q=(t,s=",")=>t.trim().split(s).map(e=>e.trim()).filter(e=>e.length>0);var V=t=>[...new Set(t)];var G=t=>Object.entries(t).filter(([s,e])=>e!==void 0&&e!=="").map(([s,e])=>s==="cdn-operations"||s==="analytics"?e:`${s}/${e}`);var pt=Object.defineProperty,ft=(t,s,e)=>s in t?pt(t,s,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[s]=e,L=(t,s,e)=>(ft(t,typeof s!="symbol"?s+"":s,e),e);function mt(t){let s=e=>{var r;for(let i in e)((r=e[i])==null?void 0:r.constructor)===Object&&(e[i]=s(e[i]));return{...e}};return s(t)}var c=class{constructor(t){t.constructor===Object?this.store=mt(t):(this._storeIsProxy=!0,this.store=t),this.callbackMap=Object.create(null)}static warn(t,s){console.warn(`Symbiote Data: cannot ${t}. Prop name: `+s)}read(t){return!this._storeIsProxy&&!this.store.hasOwnProperty(t)?(c.warn("read",t),null):this.store[t]}has(t){return this._storeIsProxy?this.store[t]!==void 0:this.store.hasOwnProperty(t)}add(t,s,e=!1){!e&&Object.keys(this.store).includes(t)||(this.store[t]=s,this.notify(t))}pub(t,s){if(!this._storeIsProxy&&!this.store.hasOwnProperty(t)){c.warn("publish",t);return}this.store[t]=s,this.notify(t)}multiPub(t){for(let s in t)this.pub(s,t[s])}notify(t){this.callbackMap[t]&&this.callbackMap[t].forEach(s=>{s(this.store[t])})}sub(t,s,e=!0){return!this._storeIsProxy&&!this.store.hasOwnProperty(t)?(c.warn("subscribe",t),null):(this.callbackMap[t]||(this.callbackMap[t]=new Set),this.callbackMap[t].add(s),e&&s(this.store[t]),{remove:()=>{this.callbackMap[t].delete(s),this.callbackMap[t].size||delete this.callbackMap[t]},callback:s})}static registerCtx(t,s=Symbol()){let e=c.globalStore.get(s);return e?console.warn('State: context UID "'+s+'" already in use'):(e=new c(t),c.globalStore.set(s,e)),e}static deleteCtx(t){c.globalStore.delete(t)}static getCtx(t,s=!0){return c.globalStore.get(t)||(s&&console.warn('State: wrong context UID - "'+t+'"'),null)}};c.globalStore=new Map;var a=Object.freeze({BIND_ATTR:"set",ATTR_BIND_PRFX:"@",EXT_DATA_CTX_PRFX:"*",NAMED_DATA_CTX_SPLTR:"/",CTX_NAME_ATTR:"ctx-name",CTX_OWNER_ATTR:"ctx-owner",CSS_CTX_PROP:"--ctx-name",EL_REF_ATTR:"ref",AUTO_TAG_PRFX:"sym",REPEAT_ATTR:"repeat",REPEAT_ITEM_TAG_ATTR:"repeat-item-tag",SET_LATER_KEY:"__toSetLater__",USE_TPL:"use-template",ROOT_STYLE_ATTR_NAME:"sym-component"}),Q="1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm",gt=Q.length-1,bt=class{static generate(t="XXXXXXXXX-XXX"){let s="";for(let e=0;e<t.length;e++)s+=t[e]==="-"?t[e]:Q.charAt(Math.random()*gt);return s}};function Z(t,s,e){let r=!0,i,n=s.split(".");return n.forEach((o,l)=>{l<n.length-1?t=t[o]:i=o}),t?t[i]=e:r=!1,r}function Tt(t){return t.split("-").map((s,e)=>s&&e?s[0].toUpperCase()+s.slice(1):s).join("").split("_").map((s,e)=>s&&e?s.toUpperCase():s).join("")}function Et(t,s){[...t.querySelectorAll(`[${a.REPEAT_ATTR}]`)].forEach(e=>{let r=e.getAttribute(a.REPEAT_ITEM_TAG_ATTR),i;if(r&&(i=window.customElements.get(r)),!i){i=class extends s.BaseComponent{constructor(){super(),r||(this.style.display="contents")}};let o=e.innerHTML;i.template=o,i.reg(r)}for(;e.firstChild;)e.firstChild.remove();let n=e.getAttribute(a.REPEAT_ATTR);s.sub(n,o=>{if(!o){for(;e.firstChild;)e.firstChild.remove();return}let l=[...e.children],u,C=d=>{d.forEach((h,A)=>{if(l[A])if(l[A].set$)setTimeout(()=>{l[A].set$(h)});else for(let E in h)l[A][E]=h[E];else{u||(u=new DocumentFragment);let E=new i;Object.assign(E.init$,h),u.appendChild(E)}}),u&&e.appendChild(u);let _=l.slice(d.length,l.length);for(let h of _)h.remove()};if(o.constructor===Array)C(o);else if(o.constructor===Object){let d=[];for(let _ in o){let h=o[_];Object.defineProperty(h,"_KEY_",{value:_,enumerable:!0}),d.push(h)}C(d)}else console.warn("Symbiote repeat data type error:"),console.log(o)}),e.removeAttribute(a.REPEAT_ATTR),e.removeAttribute(a.REPEAT_ITEM_TAG_ATTR)})}var Y="__default__";function wt(t,s){if(s.shadowRoot)return;let e=[...t.querySelectorAll("slot")];if(!e.length)return;let r={};e.forEach(i=>{let n=i.getAttribute("name")||Y;r[n]={slot:i,fr:document.createDocumentFragment()}}),s.initChildren.forEach(i=>{var n;let o=Y;i instanceof Element&&i.hasAttribute("slot")&&(o=i.getAttribute("slot"),i.removeAttribute("slot")),(n=r[o])==null||n.fr.appendChild(i)}),Object.values(r).forEach(i=>{if(i.fr.childNodes.length)i.slot.parentNode.replaceChild(i.fr,i.slot);else if(i.slot.childNodes.length){let n=document.createDocumentFragment();n.append(...i.slot.childNodes),i.slot.parentNode.replaceChild(n,i.slot)}else i.slot.remove()})}function vt(t,s){[...t.querySelectorAll(`[${a.EL_REF_ATTR}]`)].forEach(e=>{let r=e.getAttribute(a.EL_REF_ATTR);s.ref[r]=e,e.removeAttribute(a.EL_REF_ATTR)})}function yt(t,s){[...t.querySelectorAll(`[${a.BIND_ATTR}]`)].forEach(e=>{let i=e.getAttribute(a.BIND_ATTR).split(";");[...e.attributes].forEach(n=>{if(n.name.startsWith("-")&&n.value){let o=Tt(n.name.replace("-",""));i.push(o+":"+n.value),e.removeAttribute(n.name)}}),i.forEach(n=>{if(!n)return;let o=n.split(":").map(d=>d.trim()),l=o[0],u;l.indexOf(a.ATTR_BIND_PRFX)===0&&(u=!0,l=l.replace(a.ATTR_BIND_PRFX,""));let C=o[1].split(",").map(d=>d.trim());for(let d of C){let _;d.startsWith("!!")?(_="double",d=d.replace("!!","")):d.startsWith("!")&&(_="single",d=d.replace("!","")),s.sub(d,h=>{_==="double"?h=!!h:_==="single"&&(h=!h),u?(h==null?void 0:h.constructor)===Boolean?h?e.setAttribute(l,""):e.removeAttribute(l):e.setAttribute(l,h):Z(e,l,h)||(e[a.SET_LATER_KEY]||(e[a.SET_LATER_KEY]=Object.create(null)),e[a.SET_LATER_KEY][l]=h)})}}),e.removeAttribute(a.BIND_ATTR)})}var x="{{",v="}}",Ct="skip-text";function At(t){let s,e=[],r=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,{acceptNode:i=>{var n;return!((n=i.parentElement)!=null&&n.hasAttribute(Ct))&&i.textContent.includes(x)&&i.textContent.includes(v)&&1}});for(;s=r.nextNode();)e.push(s);return e}var xt=function(t,s){At(t).forEach(r=>{let i=[],n;for(;r.textContent.includes(v);)r.textContent.startsWith(x)?(n=r.textContent.indexOf(v)+v.length,r.splitText(n),i.push(r)):(n=r.textContent.indexOf(x),r.splitText(n)),r=r.nextSibling;i.forEach(o=>{let l=o.textContent.replace(x,"").replace(v,"");o.textContent="",s.sub(l,u=>{o.textContent=u})})})},St=[Et,wt,vt,yt,xt],S="'",b='"',Pt=/\\([0-9a-fA-F]{1,6} ?)/g;function $t(t){return(t[0]===b||t[0]===S)&&(t[t.length-1]===b||t[t.length-1]===S)}function Rt(t){return(t[0]===b||t[0]===S)&&(t=t.slice(1)),(t[t.length-1]===b||t[t.length-1]===S)&&(t=t.slice(0,-1)),t}function Ot(t){let s="",e="";for(var r=0;r<t.length;r++){let i=t[r+1];t[r]==="\\"&&i==='"'?(s+='\\"',r++):t[r]==='"'&&e!=="\\"?s+='\\"':s+=t[r],e=t[r]}return s}function It(t){let s=t;$t(t)&&(s=Rt(s),s=s.replace(Pt,(e,r)=>String.fromCodePoint(parseInt(r.trim(),16))),s=s.replaceAll(`\\
27
- `,"\\n"),s=Ot(s),s=b+s+b);try{return JSON.parse(s)}catch{throw new Error(`Failed to parse CSS property value: ${s}. Original input: ${t}`)}}var J=0,g=null,p=null,f=class extends HTMLElement{constructor(){super(),L(this,"updateCssData",()=>{var t;this.dropCssDataCache(),(t=this.__boundCssProps)==null||t.forEach(s=>{let e=this.getCssData(this.__extractCssName(s),!0);e!==null&&this.$[s]!==e&&(this.$[s]=e)})}),this.init$=Object.create(null),this.cssInit$=Object.create(null),this.tplProcessors=new Set,this.ref=Object.create(null),this.allSubs=new Set,this.pauseRender=!1,this.renderShadow=!1,this.readyToDestroy=!0,this.processInnerHtml=!1,this.allowCustomTemplate=!1,this.ctxOwner=!1}get BaseComponent(){return f}initCallback(){}__initCallback(){var t;this.__initialized||(this.__initialized=!0,(t=this.initCallback)==null||t.call(this))}render(t,s=this.renderShadow){let e;if((s||this.constructor.__shadowStylesUrl)&&!this.shadowRoot&&this.attachShadow({mode:"open"}),this.allowCustomTemplate){let i=this.getAttribute(a.USE_TPL);if(i){let n=this.getRootNode(),o=(n==null?void 0:n.querySelector(i))||document.querySelector(i);o?t=o.content.cloneNode(!0):console.warn(`Symbiote template "${i}" is not found...`)}}if(this.processInnerHtml)for(let i of this.tplProcessors)i(this,this);if(t||this.constructor.template){if(this.constructor.template&&!this.constructor.__tpl&&(this.constructor.__tpl=document.createElement("template"),this.constructor.__tpl.innerHTML=this.constructor.template),(t==null?void 0:t.constructor)===DocumentFragment)e=t;else if((t==null?void 0:t.constructor)===String){let i=document.createElement("template");i.innerHTML=t,e=i.content.cloneNode(!0)}else this.constructor.__tpl&&(e=this.constructor.__tpl.content.cloneNode(!0));for(let i of this.tplProcessors)i(e,this)}let r=()=>{e&&(s&&this.shadowRoot.appendChild(e)||this.appendChild(e)),this.__initCallback()};if(this.constructor.__shadowStylesUrl){s=!0;let i=document.createElement("link");i.rel="stylesheet",i.href=this.constructor.__shadowStylesUrl,i.onload=r,this.shadowRoot.prepend(i)}else r()}addTemplateProcessor(t){this.tplProcessors.add(t)}get autoCtxName(){return this.__autoCtxName||(this.__autoCtxName=bt.generate(),this.style.setProperty(a.CSS_CTX_PROP,`'${this.__autoCtxName}'`)),this.__autoCtxName}get cssCtxName(){return this.getCssData(a.CSS_CTX_PROP,!0)}get ctxName(){var t;let s=((t=this.getAttribute(a.CTX_NAME_ATTR))==null?void 0:t.trim())||this.cssCtxName||this.__cachedCtxName||this.autoCtxName;return this.__cachedCtxName=s,s}get localCtx(){return this.__localCtx||(this.__localCtx=c.registerCtx({},this)),this.__localCtx}get nodeCtx(){return c.getCtx(this.ctxName,!1)||c.registerCtx({},this.ctxName)}static __parseProp(t,s){let e,r;if(t.startsWith(a.EXT_DATA_CTX_PRFX))e=s.nodeCtx,r=t.replace(a.EXT_DATA_CTX_PRFX,"");else if(t.includes(a.NAMED_DATA_CTX_SPLTR)){let i=t.split(a.NAMED_DATA_CTX_SPLTR);e=c.getCtx(i[0]),r=i[1]}else e=s.localCtx,r=t;return{ctx:e,name:r}}sub(t,s,e=!0){let r=n=>{this.isConnected&&s(n)},i=f.__parseProp(t,this);i.ctx.has(i.name)?this.allSubs.add(i.ctx.sub(i.name,r,e)):window.setTimeout(()=>{this.allSubs.add(i.ctx.sub(i.name,r,e))})}notify(t){let s=f.__parseProp(t,this);s.ctx.notify(s.name)}has(t){let s=f.__parseProp(t,this);return s.ctx.has(s.name)}add(t,s,e=!1){let r=f.__parseProp(t,this);r.ctx.add(r.name,s,e)}add$(t,s=!1){for(let e in t)this.add(e,t[e],s)}get $(){if(!this.__stateProxy){let t=Object.create(null);this.__stateProxy=new Proxy(t,{set:(s,e,r)=>{let i=f.__parseProp(e,this);return i.ctx.pub(i.name,r),!0},get:(s,e)=>{let r=f.__parseProp(e,this);return r.ctx.read(r.name)}})}return this.__stateProxy}set$(t,s=!1){for(let e in t){let r=t[e];s||![String,Number,Boolean].includes(r==null?void 0:r.constructor)?this.$[e]=r:this.$[e]!==r&&(this.$[e]=r)}}get __ctxOwner(){return this.ctxOwner||this.hasAttribute(a.CTX_OWNER_ATTR)&&this.getAttribute(a.CTX_OWNER_ATTR)!=="false"}__initDataCtx(){let t=this.constructor.__attrDesc;if(t)for(let s of Object.values(t))Object.keys(this.init$).includes(s)||(this.init$[s]="");for(let s in this.init$)if(s.startsWith(a.EXT_DATA_CTX_PRFX))this.nodeCtx.add(s.replace(a.EXT_DATA_CTX_PRFX,""),this.init$[s],this.__ctxOwner);else if(s.includes(a.NAMED_DATA_CTX_SPLTR)){let e=s.split(a.NAMED_DATA_CTX_SPLTR),r=e[0].trim(),i=e[1].trim();if(r&&i){let n=c.getCtx(r,!1);n||(n=c.registerCtx({},r)),n.add(i,this.init$[s])}}else this.localCtx.add(s,this.init$[s]);for(let s in this.cssInit$)this.bindCssData(s,this.cssInit$[s]);this.__dataCtxInitialized=!0}connectedCallback(){var t;if(this.isConnected){if(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),!this.connectedOnce){let s=(t=this.getAttribute(a.CTX_NAME_ATTR))==null?void 0:t.trim();if(s&&this.style.setProperty(a.CSS_CTX_PROP,`'${s}'`),this.__initDataCtx(),this[a.SET_LATER_KEY]){for(let e in this[a.SET_LATER_KEY])Z(this,e,this[a.SET_LATER_KEY][e]);delete this[a.SET_LATER_KEY]}this.initChildren=[...this.childNodes];for(let e of St)this.addTemplateProcessor(e);if(this.pauseRender)this.__initCallback();else if(this.constructor.__rootStylesLink){let e=this.getRootNode();if(!e)return;if(e==null?void 0:e.querySelector(`link[${a.ROOT_STYLE_ATTR_NAME}="${this.constructor.is}"]`)){this.render();return}let i=this.constructor.__rootStylesLink.cloneNode(!0);i.setAttribute(a.ROOT_STYLE_ATTR_NAME,this.constructor.is),i.onload=()=>{this.render()},e.nodeType===Node.DOCUMENT_NODE?e.head.appendChild(i):e.prepend(i)}else this.render()}this.connectedOnce=!0}}destroyCallback(){}disconnectedCallback(){this.connectedOnce&&(this.dropCssDataCache(),this.readyToDestroy&&(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),this.__disconnectTimeout=window.setTimeout(()=>{this.destroyCallback();for(let t of this.allSubs)t.remove(),this.allSubs.delete(t);for(let t of this.tplProcessors)this.tplProcessors.delete(t);p==null||p.delete(this.updateCssData),p!=null&&p.size||(g==null||g.disconnect(),g=null,p=null)},100)))}static reg(t,s=!1){t||(J++,t=`${a.AUTO_TAG_PRFX}-${J}`),this.__tag=t;let e=window.customElements.get(t);if(e){!s&&e!==this&&console.warn([`Element with tag name "${t}" already registered.`,`You're trying to override it with another class "${this.name}".`,"This is most likely a mistake.","New element will not be registered."].join(`
28
- `));return}window.customElements.define(t,s?class extends this{}:this)}static get is(){return this.__tag||this.reg(),this.__tag}static bindAttributes(t){this.observedAttributes=Object.keys(t),this.__attrDesc=t}attributeChangedCallback(t,s,e){var r;if(s===e)return;let i=(r=this.constructor.__attrDesc)==null?void 0:r[t];i?this.__dataCtxInitialized?this.$[i]=e:this.init$[i]=e:this[t]=e}getCssData(t,s=!1){if(this.__cssDataCache||(this.__cssDataCache=Object.create(null)),!Object.keys(this.__cssDataCache).includes(t)){this.__computedStyle||(this.__computedStyle=window.getComputedStyle(this));let e=this.__computedStyle.getPropertyValue(t).trim();try{this.__cssDataCache[t]=It(e)}catch{!s&&console.warn(`CSS Data error: ${t}`),this.__cssDataCache[t]=null}}return this.__cssDataCache[t]}__extractCssName(t){return t.split("--").map((s,e)=>e===0?"":s).join("--")}__initStyleAttrObserver(){p||(p=new Set),p.add(this.updateCssData),g||(g=new MutationObserver(t=>{t[0].type==="attributes"&&p.forEach(s=>{s()})}),g.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}))}bindCssData(t,s=""){this.__boundCssProps||(this.__boundCssProps=new Set),this.__boundCssProps.add(t);let e=this.getCssData(this.__extractCssName(t),!0);e===null&&(e=s),this.add(t,e),this.__initStyleAttrObserver()}dropCssDataCache(){this.__cssDataCache=null,this.__computedStyle=null}defineAccessor(t,s,e){let r="__"+t;this[r]=this[t],Object.defineProperty(this,t,{set:i=>{this[r]=i,e?window.setTimeout(()=>{s==null||s(i)}):s==null||s(i)},get:()=>this[r]}),this[t]=this[r]}static set shadowStyles(t){let s=new Blob([t],{type:"text/css"});this.__shadowStylesUrl=URL.createObjectURL(s)}static set rootStyles(t){if(!this.__rootStylesLink){let s=new Blob([t],{type:"text/css"}),e=URL.createObjectURL(s),r=document.createElement("link");r.href=e,r.rel="stylesheet",this.__rootStylesLink=r}}},U=f;L(U,"template");var N=class{static _print(t){console.warn(t)}static setDefaultTitle(t){this.defaultTitle=t}static setRoutingMap(t){Object.assign(this.appMap,t);for(let s in this.appMap)!this.defaultRoute&&this.appMap[s].default===!0?this.defaultRoute=s:!this.errorRoute&&this.appMap[s].error===!0&&(this.errorRoute=s)}static set routingEventName(t){this.__routingEventName=t}static get routingEventName(){return this.__routingEventName||"sym-on-route"}static readAddressBar(){let t={route:null,options:{}};return window.location.search.split(this.separator).forEach(e=>{if(e.includes("?"))t.route=e.replace("?","");else if(e.includes("=")){let r=e.split("=");t.options[r[0]]=decodeURI(r[1])}else t.options[e]=!0}),t}static notify(){let t=this.readAddressBar(),s=this.appMap[t.route];if(s&&s.title&&(document.title=s.title),t.route===null&&this.defaultRoute){this.applyRoute(this.defaultRoute);return}else if(!s&&this.errorRoute){this.applyRoute(this.errorRoute);return}else if(!s&&this.defaultRoute){this.applyRoute(this.defaultRoute);return}else if(!s){this._print(`Route "${t.route}" not found...`);return}let e=new CustomEvent(N.routingEventName,{detail:{route:t.route,options:Object.assign(s||{},t.options)}});window.dispatchEvent(e)}static reflect(t,s={}){let e=this.appMap[t];if(!e){this._print("Wrong route: "+t);return}let r="?"+t;for(let n in s)s[n]===!0?r+=this.separator+n:r+=this.separator+n+`=${s[n]}`;let i=e.title||this.defaultTitle||"";window.history.pushState(null,i,r),document.title=i}static applyRoute(t,s={}){this.reflect(t,s),this.notify()}static setSeparator(t){this._separator=t}static get separator(){return this._separator||"&"}static createRouterData(t,s){this.setRoutingMap(s);let e=c.registerCtx({route:null,options:null,title:null},t);return window.addEventListener(this.routingEventName,r=>{var i;e.multiPub({route:r.detail.route,options:r.detail.options,title:((i=r.detail.options)==null?void 0:i.title)||this.defaultTitle||""})}),N.notify(),this.initPopstateListener(),e}static initPopstateListener(){this.__onPopstate||(this.__onPopstate=()=>{this.notify()},window.addEventListener("popstate",this.__onPopstate))}static removePopstateListener(){window.removeEventListener("popstate",this.__onPopstate),this.__onPopstate=null}};N.appMap=Object.create(null);var tt="idb-store-ready",Dt="symbiote-db",Nt="symbiote-idb-update_",Lt=class{_notifyWhenReady(t=null){window.dispatchEvent(new CustomEvent(tt,{detail:{dbName:this.name,storeName:this.storeName,event:t}}))}get _updEventName(){return Nt+this.name}_getUpdateEvent(t){return new CustomEvent(this._updEventName,{detail:{key:this.name,newValue:t}})}_notifySubscribers(t){window.localStorage.removeItem(this.name),window.localStorage.setItem(this.name,t),window.dispatchEvent(this._getUpdateEvent(t))}constructor(t,s){this.name=t,this.storeName=s,this.version=1,this.request=window.indexedDB.open(this.name,this.version),this.request.onupgradeneeded=e=>{this.db=e.target.result,this.objStore=this.db.createObjectStore(s,{keyPath:"_key"}),this.objStore.transaction.oncomplete=r=>{this._notifyWhenReady(r)}},this.request.onsuccess=e=>{this.db=e.target.result,this._notifyWhenReady(e)},this.request.onerror=e=>{console.error(e)},this._subscriptionsMap={},this._updateHandler=e=>{e.key===this.name&&this._subscriptionsMap[e.newValue]&&this._subscriptionsMap[e.newValue].forEach(async i=>{i(await this.read(e.newValue))})},this._localUpdateHandler=e=>{this._updateHandler(e.detail)},window.addEventListener("storage",this._updateHandler),window.addEventListener(this._updEventName,this._localUpdateHandler)}read(t){let e=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).get(t);return new Promise((r,i)=>{e.onsuccess=n=>{var o;(o=n.target.result)!=null&&o._value?r(n.target.result._value):(r(null),console.warn(`IDB: cannot read "${t}"`))},e.onerror=n=>{i(n)}})}write(t,s,e=!1){let r={_key:t,_value:s},n=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).put(r);return new Promise((o,l)=>{n.onsuccess=u=>{e||this._notifySubscribers(t),o(u.target.result)},n.onerror=u=>{l(u)}})}delete(t,s=!1){let r=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete(t);return new Promise((i,n)=>{r.onsuccess=o=>{s||this._notifySubscribers(t),i(o)},r.onerror=o=>{n(o)}})}getAll(){let s=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).getAll();return new Promise((e,r)=>{s.onsuccess=i=>{let n=i.target.result;e(n.map(o=>o._value))},s.onerror=i=>{r(i)}})}subscribe(t,s){this._subscriptionsMap[t]||(this._subscriptionsMap[t]=new Set);let e=this._subscriptionsMap[t];return e.add(s),{remove:()=>{e.delete(s),e.size||delete this._subscriptionsMap[t]}}}stop(){window.removeEventListener("storage",this._updateHandler),this._subscriptionsMap=null,et.clear(this.name)}},et=class{static get readyEventName(){return tt}static open(t=Dt,s="store"){let e=t+"/"+s;return this._reg[e]||(this._reg[e]=new Lt(t,s)),this._reg[e]}static clear(t){window.indexedDB.deleteDatabase(t);for(let s in this._reg)s.split("/")[0]===t&&delete this._reg[s]}};L(et,"_reg",Object.create(null));var Ut="https://ucarecdn.com",y=Object.freeze({"dev-mode":{},pubkey:{},uuid:{},src:{},lazy:{default:1},intersection:{},breakpoints:{},"cdn-cname":{default:Ut},"proxy-cname":{},"secure-delivery-proxy":{},"hi-res-support":{default:1},"ultra-res-support":{},format:{},"cdn-operations":{},progressive:{},quality:{},"is-background-for":{},"is-preview-blur":{default:1}});var T="--uc-img-",M="unresolved";var k=!window.location.host.trim()||window.location.host.includes(":")||window.location.hostname.includes("localhost"),X=3e3,B=5e3,F=Object.freeze({PREVIEW:"PREVIEW",MAIN:"MAIN"});var st="blocks",rt="1.22.0";var nt=Object.create(null),it;for(let t in y)nt[T+t]=((it=y[t])==null?void 0:it.default)||"";var P=class extends U{constructor(){super(...arguments);w(this,"cssInit$",nt)}$$(e){return this.$[T+e]}set$$(e){for(let r in e)this.$[T+r]=e[r]}sub$$(e,r){this.sub(T+e,i=>{i===null||i===""||r(i)})}analyticsParams(){return`-/@clib/${st}/${rt}/uc-img/`}initAttributes(e){[...this.attributes].forEach(r=>{y[r.name]||e.setAttribute(r.name,r.value)})}initIntersection(e,r){let i={root:null,rootMargin:"0px"};this._isnObserver=new IntersectionObserver(n=>{n.forEach(o=>{o.isIntersecting&&(r(),this._isnObserver.unobserve(e))})},i),this._isnObserver.observe(e),this._observed||(this._observed=new Set),this._observed.add(e)}destroyCallback(){super.destroyCallback(),this._isnObserver&&(this._observed.forEach(e=>{this._isnObserver.unobserve(e)}),this._isnObserver=null),c.deleteCtx(this)}static get observedAttributes(){return Object.keys(y)}attributeChangedCallback(e,r,i){window.setTimeout(()=>{this.$[T+e]=i})}};var O=class extends P{constructor(){super(...arguments);w(this,"_img",new Image);w(this,"_imgPreview",new Image)}_fmtAbs(e){return!e.includes("//")&&!k&&(e=new URL(e,document.baseURI).href),e}_validateSize(e){if((e==null?void 0:e.trim())!==""){let r=e.match(/\d+/)[0],i=e.match(/[a-zA-Z]+/)[0],n=parseInt(r,10);if(Number(n)>B&&this.hasFormatJPG)return B+i;if(Number(n)>X&&!this.hasFormatJPG)return X+i}return e}_getCdnModifiers(e,r){let i={format:this.$$("format"),quality:this.$$("quality"),resize:this._validateSize(e),blur:r,"cdn-operations":this.$$("cdn-operations"),analytics:this.analyticsParams()};return W(...G(i))}_getUrlBase(e="",r=""){if(this.$$("src").startsWith("data:")||this.$$("src").startsWith("blob:"))return this.$$("src");if(k&&this.$$("src")&&!this.$$("src").includes("//"))return this._proxyUrl(this.$$("src"));let i=this._getCdnModifiers(e,r);if(this.$$("src").startsWith(this.$$("cdn-cname")))return m(this.$$("src"),i);if(this.$$("cdn-cname")&&this.$$("uuid"))return this._proxyUrl(m(D(this.$$("cdn-cname"),this.$$("uuid")),i));if(this.$$("uuid"))return this._proxyUrl(m(D(this.$$("cdn-cname"),this.$$("uuid")),i));if(this.$$("proxy-cname"))return this._proxyUrl(m(this.$$("proxy-cname"),i,this._fmtAbs(this.$$("src"))));if(this.$$("pubkey"))return this._proxyUrl(m(`https://${this.$$("pubkey")}.ucr.io/`,i,this._fmtAbs(this.$$("src"))))}_proxyUrl(e){return this.$$("secure-delivery-proxy")?j(this.$$("secure-delivery-proxy"),{previewUrl:e},{transform:i=>window.encodeURIComponent(i)}):e}_getElSize(e,r=1,i=!0){let n=e.getBoundingClientRect(),o=r*Math.round(n.width),l=i?"":r*Math.round(n.height);return o||l?`${o||""}x${l||""}`:null}_setupEventProxy(e){let r=n=>{n.stopPropagation();let o=new Event(n.type,n);this.dispatchEvent(o)},i=["load","error"];for(let n of i)e.addEventListener(n,r)}get img(){return this.hasPreviewImage||(this._setupConfigForImage({elNode:this._img}),this.appendChild(this._img)),this._img}get currentImg(){return this.hasPreviewImage?{type:F.PREVIEW,img:this._imgPreview}:{type:F.MAIN,img:this.img}}get hasPreviewImage(){return this.$$("is-preview-blur")}get bgSelector(){return this.$$("is-background-for")}get breakpoints(){if(this.$$("breakpoints")){let e=q(this.$$("breakpoints"));return V(e.map(r=>parseInt(r,10)))}else return null}get hasFormatJPG(){return this.$$("format").toLowerCase()==="jpeg"}renderBg(e){let r=new Set;r.add(`url("${this._getUrlBase(this._getElSize(e))}") 1x`),this.$$("hi-res-support")&&r.add(`url("${this._getUrlBase(this._getElSize(e,2))}") ${2}x`),this.$$("ultra-res-support")&&r.add(`url("${this._getUrlBase(this._getElSize(e,3))}") ${3}x`);let i=`image-set(${[...r].join(", ")})`;e.style.setProperty("background-image",i),e.style.setProperty("background-image","-webkit-"+i)}getSrcset(){let e=new Set;return this.breakpoints?this.breakpoints.forEach(r=>{e.add(this._getUrlBase(r+"x")+` ${this._validateSize(r+"w")}`),this.$$("hi-res-support")&&e.add(this._getUrlBase(r*2+"x")+` ${this._validateSize(r*2+"w")}`),this.$$("ultra-res-support")&&e.add(this._getUrlBase(r*3+"x")+` ${this._validateSize(r*3+"w")}`)}):(e.add(this._getUrlBase(this._getElSize(this.currentImg.img))+" 1x"),this.$$("hi-res-support")&&e.add(this._getUrlBase(this._getElSize(this.currentImg.img,2))+" 2x"),this.$$("ultra-res-support")&&e.add(this._getUrlBase(this._getElSize(this.currentImg.img,3))+" 3x")),[...e].join()}getSrc(){return this._getUrlBase()}get srcUrlPreview(){return this._getUrlBase("100x","100")}renderBackground(){[...document.querySelectorAll(this.bgSelector)].forEach(e=>{this.$$("intersection")?this.initIntersection(e,()=>{this.renderBg(e)}):this.renderBg(e)})}_appendURL({elNode:e,src:r,srcset:i}){r&&(e.src=r),i&&(e.srcset=i)}_setupConfigForImage({elNode:e}){this._setupEventProxy(e),this.initAttributes(e)}loaderImage({src:e,srcset:r,elNode:i}){return new Promise((n,o)=>{this._setupConfigForImage({elNode:i}),i.setAttribute(M,""),i.addEventListener("load",()=>{i.removeAttribute(M),n(i)}),i.addEventListener("error",()=>{o(!1)}),this._appendURL({elNode:i,src:e,srcset:r})})}async renderImage(){var e,r;if(this.$$("intersection")){this.hasPreviewImage&&(this._setupConfigForImage({elNode:this._imgPreview}),this.appendChild(this._imgPreview)),this.initIntersection(this.currentImg.img,async()=>{var i;this.hasPreviewImage&&(this._imgPreview.src=this.srcUrlPreview);try{await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await this._imgPreview.remove(),this.appendChild(this._img)}catch{this.hasPreviewImage&&await((i=this._imgPreview)==null?void 0:i.remove()),this.appendChild(this._img)}});return}try{this.hasPreviewImage&&(await this.loaderImage({src:this.srcUrlPreview,elNode:this._imgPreview}),this.appendChild(this._imgPreview)),await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await((e=this._imgPreview)==null?void 0:e.remove()),this.appendChild(this._img)}catch{this.hasPreviewImage&&await((r=this._imgPreview)==null?void 0:r.remove()),this.appendChild(this._img)}}init(){this.bgSelector?this.renderBackground():this.renderImage()}};var I=class extends O{initCallback(){super.initCallback(),this.sub$$("src",()=>{this.init()}),this.sub$$("uuid",()=>{this.init()}),this.sub$$("lazy",s=>{!this.$$("is-background-for")&&!this.$$("is-preview-blur")&&(this.img.loading=s?"lazy":"eager")})}};I.reg("uc-img");export{I as Img};
26
+ var nt=e=>{if(typeof e!="string"||!e)return"";let t=e.trim();return t.startsWith("-/")?t=t.slice(2):t.startsWith("/")&&(t=t.slice(1)),t.endsWith("/")&&(t=t.slice(0,t.length-1)),t},ot=(...e)=>e.filter(t=>typeof t=="string"&&!!t).map(t=>nt(t)).join("/-/"),F=(...e)=>{let t=ot(...e);return t?`-/${t}/`:""};function X(e){let t=new URL(e),s=t.pathname+t.search+t.hash,i=s.lastIndexOf("http"),r=s.lastIndexOf("/"),n="";return i>=0?n=s.slice(i):r>=0&&(n=s.slice(r+1)),n}function at(e){let t=new URL(e),s=X(e),i=K(s)?z(s).pathname:s;return t.pathname=t.pathname.replace(i,""),t.search="",t.hash="",t.toString()}function K(e){return e.startsWith("http")}function z(e){let t=new URL(e);return{pathname:`${t.origin}${t.pathname??""}`,search:t.search??"",hash:t.hash??""}}var g=(e,t,s)=>{let i=new URL(at(e)),r=s??X(e),n=t??"";if(i.pathname.startsWith("//")&&(i.pathname=i.pathname.replace("//","/")),r&&K(r)){let o=z(r);i.pathname=`${i.pathname}${n}${o.pathname||""}`,i.search=o.search,i.hash=o.hash}else i.pathname=`${i.pathname}${n}${r||""}`;return i.toString()},I=(e,t)=>{let s=new URL(e);return s.pathname=`${t}/`,s.toString()};var W=(e,t=",")=>e.trim().split(t).map(s=>s.trim()).filter(s=>s.length>0);var lt=e=>e;function q(e,t={},s={}){let{openToken:i="{{",closeToken:r="}}",transform:n=lt}=s;for(let o in t){let l=t[o],u=l?.toString(),f=typeof u=="string"?n(u):String(u);e=e.replaceAll(i+o+r,f)}return e}var H=e=>[...new Set(e)];var b="--uc-img-",D="unresolved";var N=!window.location.host.trim()||window.location.host.includes(":")||window.location.hostname.includes("localhost"),j=3e3,k=5e3,L=Object.freeze({PREVIEW:"PREVIEW",MAIN:"MAIN"});var ct=Object.defineProperty,ut=(e,t,s)=>t in e?ct(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s,M=(e,t,s)=>(ut(e,typeof t!="symbol"?t+"":t,s),s);function ht(e){let t=s=>{var i;for(let r in s)((i=s[r])==null?void 0:i.constructor)===Object&&(s[r]=t(s[r]));return{...s}};return t(e)}var h=class{constructor(e){e.constructor===Object?this.store=ht(e):(this._storeIsProxy=!0,this.store=e),this.callbackMap=Object.create(null)}static warn(e,t){console.warn(`Symbiote Data: cannot ${e}. Prop name: `+t)}read(e){return!this._storeIsProxy&&!this.store.hasOwnProperty(e)?(h.warn("read",e),null):this.store[e]}has(e){return this._storeIsProxy?this.store[e]!==void 0:this.store.hasOwnProperty(e)}add(e,t,s=!1){!s&&Object.keys(this.store).includes(e)||(this.store[e]=t,this.notify(e))}pub(e,t){if(!this._storeIsProxy&&!this.store.hasOwnProperty(e)){h.warn("publish",e);return}this.store[e]=t,this.notify(e)}multiPub(e){for(let t in e)this.pub(t,e[t])}notify(e){this.callbackMap[e]&&this.callbackMap[e].forEach(t=>{t(this.store[e])})}sub(e,t,s=!0){return!this._storeIsProxy&&!this.store.hasOwnProperty(e)?(h.warn("subscribe",e),null):(this.callbackMap[e]||(this.callbackMap[e]=new Set),this.callbackMap[e].add(t),s&&t(this.store[e]),{remove:()=>{this.callbackMap[e].delete(t),this.callbackMap[e].size||delete this.callbackMap[e]},callback:t})}static registerCtx(e,t=Symbol()){let s=h.globalStore.get(t);return s?console.warn('State: context UID "'+t+'" already in use'):(s=new h(e),h.globalStore.set(t,s)),s}static deleteCtx(e){h.globalStore.delete(e)}static getCtx(e,t=!0){return h.globalStore.get(e)||(t&&console.warn('State: wrong context UID - "'+e+'"'),null)}};h.globalStore=new Map;var a=Object.freeze({BIND_ATTR:"set",ATTR_BIND_PRFX:"@",EXT_DATA_CTX_PRFX:"*",NAMED_DATA_CTX_SPLTR:"/",CTX_NAME_ATTR:"ctx-name",CTX_OWNER_ATTR:"ctx-owner",CSS_CTX_PROP:"--ctx-name",EL_REF_ATTR:"ref",AUTO_TAG_PRFX:"sym",REPEAT_ATTR:"repeat",REPEAT_ITEM_TAG_ATTR:"repeat-item-tag",SET_LATER_KEY:"__toSetLater__",USE_TPL:"use-template",ROOT_STYLE_ATTR_NAME:"sym-component"}),Y="1234567890QWERTYUIOPASDFGHJKLZXCVBNMqwertyuiopasdfghjklzxcvbnm",dt=Y.length-1,pt=class{static generate(e="XXXXXXXXX-XXX"){let t="";for(let s=0;s<e.length;s++)t+=e[s]==="-"?e[s]:Y.charAt(Math.random()*dt);return t}};function J(e,t,s){let i=!0,r,n=t.split(".");return n.forEach((o,l)=>{l<n.length-1?e=e[o]:r=o}),e?e[r]=s:i=!1,i}function _t(e){return e.split("-").map((t,s)=>t&&s?t[0].toUpperCase()+t.slice(1):t).join("").split("_").map((t,s)=>t&&s?t.toUpperCase():t).join("")}function mt(e,t){[...e.querySelectorAll(`[${a.REPEAT_ATTR}]`)].forEach(s=>{let i=s.getAttribute(a.REPEAT_ITEM_TAG_ATTR),r;if(i&&(r=window.customElements.get(i)),!r){r=class extends t.BaseComponent{constructor(){super(),i||(this.style.display="contents")}};let o=s.innerHTML;r.template=o,r.reg(i)}for(;s.firstChild;)s.firstChild.remove();let n=s.getAttribute(a.REPEAT_ATTR);t.sub(n,o=>{if(!o){for(;s.firstChild;)s.firstChild.remove();return}let l=[...s.children],u,f=d=>{d.forEach((c,x)=>{if(l[x])if(l[x].set$)setTimeout(()=>{l[x].set$(c)});else for(let T in c)l[x][T]=c[T];else{u||(u=new DocumentFragment);let T=new r;Object.assign(T.init$,c),u.appendChild(T)}}),u&&s.appendChild(u);let p=l.slice(d.length,l.length);for(let c of p)c.remove()};if(o.constructor===Array)f(o);else if(o.constructor===Object){let d=[];for(let p in o){let c=o[p];Object.defineProperty(c,"_KEY_",{value:p,enumerable:!0}),d.push(c)}f(d)}else console.warn("Symbiote repeat data type error:"),console.log(o)}),s.removeAttribute(a.REPEAT_ATTR),s.removeAttribute(a.REPEAT_ITEM_TAG_ATTR)})}var V="__default__";function ft(e,t){if(t.shadowRoot)return;let s=[...e.querySelectorAll("slot")];if(!s.length)return;let i={};s.forEach(r=>{let n=r.getAttribute("name")||V;i[n]={slot:r,fr:document.createDocumentFragment()}}),t.initChildren.forEach(r=>{var n;let o=V;r instanceof Element&&r.hasAttribute("slot")&&(o=r.getAttribute("slot"),r.removeAttribute("slot")),(n=i[o])==null||n.fr.appendChild(r)}),Object.values(i).forEach(r=>{if(r.fr.childNodes.length)r.slot.parentNode.replaceChild(r.fr,r.slot);else if(r.slot.childNodes.length){let n=document.createDocumentFragment();n.append(...r.slot.childNodes),r.slot.parentNode.replaceChild(n,r.slot)}else r.slot.remove()})}function gt(e,t){[...e.querySelectorAll(`[${a.EL_REF_ATTR}]`)].forEach(s=>{let i=s.getAttribute(a.EL_REF_ATTR);t.ref[i]=s,s.removeAttribute(a.EL_REF_ATTR)})}function bt(e,t){[...e.querySelectorAll(`[${a.BIND_ATTR}]`)].forEach(s=>{let r=s.getAttribute(a.BIND_ATTR).split(";");[...s.attributes].forEach(n=>{if(n.name.startsWith("-")&&n.value){let o=_t(n.name.replace("-",""));r.push(o+":"+n.value),s.removeAttribute(n.name)}}),r.forEach(n=>{if(!n)return;let o=n.split(":").map(d=>d.trim()),l=o[0],u;l.indexOf(a.ATTR_BIND_PRFX)===0&&(u=!0,l=l.replace(a.ATTR_BIND_PRFX,""));let f=o[1].split(",").map(d=>d.trim());for(let d of f){let p;d.startsWith("!!")?(p="double",d=d.replace("!!","")):d.startsWith("!")&&(p="single",d=d.replace("!","")),t.sub(d,c=>{p==="double"?c=!!c:p==="single"&&(c=!c),u?c?.constructor===Boolean?c?s.setAttribute(l,""):s.removeAttribute(l):s.setAttribute(l,c):J(s,l,c)||(s[a.SET_LATER_KEY]||(s[a.SET_LATER_KEY]=Object.create(null)),s[a.SET_LATER_KEY][l]=c)})}}),s.removeAttribute(a.BIND_ATTR)})}var C="{{",E="}}",yt="skip-text";function wt(e){let t,s=[],i=document.createTreeWalker(e,NodeFilter.SHOW_TEXT,{acceptNode:r=>{var n;return!((n=r.parentElement)!=null&&n.hasAttribute(yt))&&r.textContent.includes(C)&&r.textContent.includes(E)&&1}});for(;t=i.nextNode();)s.push(t);return s}var Tt=function(e,t){wt(e).forEach(i=>{let r=[],n;for(;i.textContent.includes(E);)i.textContent.startsWith(C)?(n=i.textContent.indexOf(E)+E.length,i.splitText(n),r.push(i)):(n=i.textContent.indexOf(C),i.splitText(n)),i=i.nextSibling;r.forEach(o=>{let l=o.textContent.replace(C,"").replace(E,"");o.textContent="",t.sub(l,u=>{o.textContent=u})})})},Et=[mt,ft,gt,bt,Tt],A="'",w='"',vt=/\\([0-9a-fA-F]{1,6} ?)/g;function xt(e){return(e[0]===w||e[0]===A)&&(e[e.length-1]===w||e[e.length-1]===A)}function Ct(e){return(e[0]===w||e[0]===A)&&(e=e.slice(1)),(e[e.length-1]===w||e[e.length-1]===A)&&(e=e.slice(0,-1)),e}function At(e){let t="",s="";for(var i=0;i<e.length;i++){let r=e[i+1];e[i]==="\\"&&r==='"'?(t+='\\"',i++):e[i]==='"'&&s!=="\\"?t+='\\"':t+=e[i],s=e[i]}return t}function St(e){let t=e;xt(e)&&(t=Ct(t),t=t.replace(vt,(s,i)=>String.fromCodePoint(parseInt(i.trim(),16))),t=t.replaceAll(`\\
27
+ `,"\\n"),t=At(t),t=w+t+w);try{return JSON.parse(t)}catch{throw new Error(`Failed to parse CSS property value: ${t}. Original input: ${e}`)}}var G=0,y=null,_=null,m=class extends HTMLElement{constructor(){super(),M(this,"updateCssData",()=>{var e;this.dropCssDataCache(),(e=this.__boundCssProps)==null||e.forEach(t=>{let s=this.getCssData(this.__extractCssName(t),!0);s!==null&&this.$[t]!==s&&(this.$[t]=s)})}),this.init$=Object.create(null),this.cssInit$=Object.create(null),this.tplProcessors=new Set,this.ref=Object.create(null),this.allSubs=new Set,this.pauseRender=!1,this.renderShadow=!1,this.readyToDestroy=!0,this.processInnerHtml=!1,this.allowCustomTemplate=!1,this.ctxOwner=!1}get BaseComponent(){return m}initCallback(){}__initCallback(){var e;this.__initialized||(this.__initialized=!0,(e=this.initCallback)==null||e.call(this))}render(e,t=this.renderShadow){let s;if((t||this.constructor.__shadowStylesUrl)&&!this.shadowRoot&&this.attachShadow({mode:"open"}),this.allowCustomTemplate){let r=this.getAttribute(a.USE_TPL);if(r){let n=this.getRootNode(),o=n?.querySelector(r)||document.querySelector(r);o?e=o.content.cloneNode(!0):console.warn(`Symbiote template "${r}" is not found...`)}}if(this.processInnerHtml)for(let r of this.tplProcessors)r(this,this);if(e||this.constructor.template){if(this.constructor.template&&!this.constructor.__tpl&&(this.constructor.__tpl=document.createElement("template"),this.constructor.__tpl.innerHTML=this.constructor.template),e?.constructor===DocumentFragment)s=e;else if(e?.constructor===String){let r=document.createElement("template");r.innerHTML=e,s=r.content.cloneNode(!0)}else this.constructor.__tpl&&(s=this.constructor.__tpl.content.cloneNode(!0));for(let r of this.tplProcessors)r(s,this)}let i=()=>{s&&(t&&this.shadowRoot.appendChild(s)||this.appendChild(s)),this.__initCallback()};if(this.constructor.__shadowStylesUrl){t=!0;let r=document.createElement("link");r.rel="stylesheet",r.href=this.constructor.__shadowStylesUrl,r.onload=i,this.shadowRoot.prepend(r)}else i()}addTemplateProcessor(e){this.tplProcessors.add(e)}get autoCtxName(){return this.__autoCtxName||(this.__autoCtxName=pt.generate(),this.style.setProperty(a.CSS_CTX_PROP,`'${this.__autoCtxName}'`)),this.__autoCtxName}get cssCtxName(){return this.getCssData(a.CSS_CTX_PROP,!0)}get ctxName(){var e;let t=((e=this.getAttribute(a.CTX_NAME_ATTR))==null?void 0:e.trim())||this.cssCtxName||this.__cachedCtxName||this.autoCtxName;return this.__cachedCtxName=t,t}get localCtx(){return this.__localCtx||(this.__localCtx=h.registerCtx({},this)),this.__localCtx}get nodeCtx(){return h.getCtx(this.ctxName,!1)||h.registerCtx({},this.ctxName)}static __parseProp(e,t){let s,i;if(e.startsWith(a.EXT_DATA_CTX_PRFX))s=t.nodeCtx,i=e.replace(a.EXT_DATA_CTX_PRFX,"");else if(e.includes(a.NAMED_DATA_CTX_SPLTR)){let r=e.split(a.NAMED_DATA_CTX_SPLTR);s=h.getCtx(r[0]),i=r[1]}else s=t.localCtx,i=e;return{ctx:s,name:i}}sub(e,t,s=!0){let i=n=>{this.isConnected&&t(n)},r=m.__parseProp(e,this);r.ctx.has(r.name)?this.allSubs.add(r.ctx.sub(r.name,i,s)):window.setTimeout(()=>{this.allSubs.add(r.ctx.sub(r.name,i,s))})}notify(e){let t=m.__parseProp(e,this);t.ctx.notify(t.name)}has(e){let t=m.__parseProp(e,this);return t.ctx.has(t.name)}add(e,t,s=!1){let i=m.__parseProp(e,this);i.ctx.add(i.name,t,s)}add$(e,t=!1){for(let s in e)this.add(s,e[s],t)}get $(){if(!this.__stateProxy){let e=Object.create(null);this.__stateProxy=new Proxy(e,{set:(t,s,i)=>{let r=m.__parseProp(s,this);return r.ctx.pub(r.name,i),!0},get:(t,s)=>{let i=m.__parseProp(s,this);return i.ctx.read(i.name)}})}return this.__stateProxy}set$(e,t=!1){for(let s in e){let i=e[s];t||![String,Number,Boolean].includes(i?.constructor)?this.$[s]=i:this.$[s]!==i&&(this.$[s]=i)}}get __ctxOwner(){return this.ctxOwner||this.hasAttribute(a.CTX_OWNER_ATTR)&&this.getAttribute(a.CTX_OWNER_ATTR)!=="false"}__initDataCtx(){let e=this.constructor.__attrDesc;if(e)for(let t of Object.values(e))Object.keys(this.init$).includes(t)||(this.init$[t]="");for(let t in this.init$)if(t.startsWith(a.EXT_DATA_CTX_PRFX))this.nodeCtx.add(t.replace(a.EXT_DATA_CTX_PRFX,""),this.init$[t],this.__ctxOwner);else if(t.includes(a.NAMED_DATA_CTX_SPLTR)){let s=t.split(a.NAMED_DATA_CTX_SPLTR),i=s[0].trim(),r=s[1].trim();if(i&&r){let n=h.getCtx(i,!1);n||(n=h.registerCtx({},i)),n.add(r,this.init$[t])}}else this.localCtx.add(t,this.init$[t]);for(let t in this.cssInit$)this.bindCssData(t,this.cssInit$[t]);this.__dataCtxInitialized=!0}connectedCallback(){var e;if(this.isConnected){if(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),!this.connectedOnce){let t=(e=this.getAttribute(a.CTX_NAME_ATTR))==null?void 0:e.trim();if(t&&this.style.setProperty(a.CSS_CTX_PROP,`'${t}'`),this.__initDataCtx(),this[a.SET_LATER_KEY]){for(let s in this[a.SET_LATER_KEY])J(this,s,this[a.SET_LATER_KEY][s]);delete this[a.SET_LATER_KEY]}this.initChildren=[...this.childNodes];for(let s of Et)this.addTemplateProcessor(s);if(this.pauseRender)this.__initCallback();else if(this.constructor.__rootStylesLink){let s=this.getRootNode();if(!s)return;if(s?.querySelector(`link[${a.ROOT_STYLE_ATTR_NAME}="${this.constructor.is}"]`)){this.render();return}let r=this.constructor.__rootStylesLink.cloneNode(!0);r.setAttribute(a.ROOT_STYLE_ATTR_NAME,this.constructor.is),r.onload=()=>{this.render()},s.nodeType===Node.DOCUMENT_NODE?s.head.appendChild(r):s.prepend(r)}else this.render()}this.connectedOnce=!0}}destroyCallback(){}disconnectedCallback(){this.connectedOnce&&(this.dropCssDataCache(),this.readyToDestroy&&(this.__disconnectTimeout&&window.clearTimeout(this.__disconnectTimeout),this.__disconnectTimeout=window.setTimeout(()=>{this.destroyCallback();for(let e of this.allSubs)e.remove(),this.allSubs.delete(e);for(let e of this.tplProcessors)this.tplProcessors.delete(e);_?.delete(this.updateCssData),_?.size||(y?.disconnect(),y=null,_=null)},100)))}static reg(e,t=!1){e||(G++,e=`${a.AUTO_TAG_PRFX}-${G}`),this.__tag=e;let s=window.customElements.get(e);if(s){!t&&s!==this&&console.warn([`Element with tag name "${e}" already registered.`,`You're trying to override it with another class "${this.name}".`,"This is most likely a mistake.","New element will not be registered."].join(`
28
+ `));return}window.customElements.define(e,t?class extends this{}:this)}static get is(){return this.__tag||this.reg(),this.__tag}static bindAttributes(e){this.observedAttributes=Object.keys(e),this.__attrDesc=e}attributeChangedCallback(e,t,s){var i;if(t===s)return;let r=(i=this.constructor.__attrDesc)==null?void 0:i[e];r?this.__dataCtxInitialized?this.$[r]=s:this.init$[r]=s:this[e]=s}getCssData(e,t=!1){if(this.__cssDataCache||(this.__cssDataCache=Object.create(null)),!Object.keys(this.__cssDataCache).includes(e)){this.__computedStyle||(this.__computedStyle=window.getComputedStyle(this));let s=this.__computedStyle.getPropertyValue(e).trim();try{this.__cssDataCache[e]=St(s)}catch{!t&&console.warn(`CSS Data error: ${e}`),this.__cssDataCache[e]=null}}return this.__cssDataCache[e]}__extractCssName(e){return e.split("--").map((t,s)=>s===0?"":t).join("--")}__initStyleAttrObserver(){_||(_=new Set),_.add(this.updateCssData),y||(y=new MutationObserver(e=>{e[0].type==="attributes"&&_.forEach(t=>{t()})}),y.observe(document,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["style"]}))}bindCssData(e,t=""){this.__boundCssProps||(this.__boundCssProps=new Set),this.__boundCssProps.add(e);let s=this.getCssData(this.__extractCssName(e),!0);s===null&&(s=t),this.add(e,s),this.__initStyleAttrObserver()}dropCssDataCache(){this.__cssDataCache=null,this.__computedStyle=null}defineAccessor(e,t,s){let i="__"+e;this[i]=this[e],Object.defineProperty(this,e,{set:r=>{this[i]=r,s?window.setTimeout(()=>{t?.(r)}):t?.(r)},get:()=>this[i]}),this[e]=this[i]}static set shadowStyles(e){let t=new Blob([e],{type:"text/css"});this.__shadowStylesUrl=URL.createObjectURL(t)}static set rootStyles(e){if(!this.__rootStylesLink){let t=new Blob([e],{type:"text/css"}),s=URL.createObjectURL(t),i=document.createElement("link");i.href=s,i.rel="stylesheet",this.__rootStylesLink=i}}},B=m;M(B,"template");var U=class{static _print(e){console.warn(e)}static setDefaultTitle(e){this.defaultTitle=e}static setRoutingMap(e){Object.assign(this.appMap,e);for(let t in this.appMap)!this.defaultRoute&&this.appMap[t].default===!0?this.defaultRoute=t:!this.errorRoute&&this.appMap[t].error===!0&&(this.errorRoute=t)}static set routingEventName(e){this.__routingEventName=e}static get routingEventName(){return this.__routingEventName||"sym-on-route"}static readAddressBar(){let e={route:null,options:{}};return window.location.search.split(this.separator).forEach(s=>{if(s.includes("?"))e.route=s.replace("?","");else if(s.includes("=")){let i=s.split("=");e.options[i[0]]=decodeURI(i[1])}else e.options[s]=!0}),e}static notify(){let e=this.readAddressBar(),t=this.appMap[e.route];if(t&&t.title&&(document.title=t.title),e.route===null&&this.defaultRoute){this.applyRoute(this.defaultRoute);return}else if(!t&&this.errorRoute){this.applyRoute(this.errorRoute);return}else if(!t&&this.defaultRoute){this.applyRoute(this.defaultRoute);return}else if(!t){this._print(`Route "${e.route}" not found...`);return}let s=new CustomEvent(U.routingEventName,{detail:{route:e.route,options:Object.assign(t||{},e.options)}});window.dispatchEvent(s)}static reflect(e,t={}){let s=this.appMap[e];if(!s){this._print("Wrong route: "+e);return}let i="?"+e;for(let n in t)t[n]===!0?i+=this.separator+n:i+=this.separator+n+`=${t[n]}`;let r=s.title||this.defaultTitle||"";window.history.pushState(null,r,i),document.title=r}static applyRoute(e,t={}){this.reflect(e,t),this.notify()}static setSeparator(e){this._separator=e}static get separator(){return this._separator||"&"}static createRouterData(e,t){this.setRoutingMap(t);let s=h.registerCtx({route:null,options:null,title:null},e);return window.addEventListener(this.routingEventName,i=>{var r;s.multiPub({route:i.detail.route,options:i.detail.options,title:((r=i.detail.options)==null?void 0:r.title)||this.defaultTitle||""})}),U.notify(),this.initPopstateListener(),s}static initPopstateListener(){this.__onPopstate||(this.__onPopstate=()=>{this.notify()},window.addEventListener("popstate",this.__onPopstate))}static removePopstateListener(){window.removeEventListener("popstate",this.__onPopstate),this.__onPopstate=null}};U.appMap=Object.create(null);var Q="idb-store-ready",Pt="symbiote-db",$t="symbiote-idb-update_",Rt=class{_notifyWhenReady(e=null){window.dispatchEvent(new CustomEvent(Q,{detail:{dbName:this.name,storeName:this.storeName,event:e}}))}get _updEventName(){return $t+this.name}_getUpdateEvent(e){return new CustomEvent(this._updEventName,{detail:{key:this.name,newValue:e}})}_notifySubscribers(e){window.localStorage.removeItem(this.name),window.localStorage.setItem(this.name,e),window.dispatchEvent(this._getUpdateEvent(e))}constructor(e,t){this.name=e,this.storeName=t,this.version=1,this.request=window.indexedDB.open(this.name,this.version),this.request.onupgradeneeded=s=>{this.db=s.target.result,this.objStore=this.db.createObjectStore(t,{keyPath:"_key"}),this.objStore.transaction.oncomplete=i=>{this._notifyWhenReady(i)}},this.request.onsuccess=s=>{this.db=s.target.result,this._notifyWhenReady(s)},this.request.onerror=s=>{console.error(s)},this._subscriptionsMap={},this._updateHandler=s=>{s.key===this.name&&this._subscriptionsMap[s.newValue]&&this._subscriptionsMap[s.newValue].forEach(async r=>{r(await this.read(s.newValue))})},this._localUpdateHandler=s=>{this._updateHandler(s.detail)},window.addEventListener("storage",this._updateHandler),window.addEventListener(this._updEventName,this._localUpdateHandler)}read(e){let s=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).get(e);return new Promise((i,r)=>{s.onsuccess=n=>{var o;(o=n.target.result)!=null&&o._value?i(n.target.result._value):(i(null),console.warn(`IDB: cannot read "${e}"`))},s.onerror=n=>{r(n)}})}write(e,t,s=!1){let i={_key:e,_value:t},n=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).put(i);return new Promise((o,l)=>{n.onsuccess=u=>{s||this._notifySubscribers(e),o(u.target.result)},n.onerror=u=>{l(u)}})}delete(e,t=!1){let i=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).delete(e);return new Promise((r,n)=>{i.onsuccess=o=>{t||this._notifySubscribers(e),r(o)},i.onerror=o=>{n(o)}})}getAll(){let t=this.db.transaction(this.storeName,"readwrite").objectStore(this.storeName).getAll();return new Promise((s,i)=>{t.onsuccess=r=>{let n=r.target.result;s(n.map(o=>o._value))},t.onerror=r=>{i(r)}})}subscribe(e,t){this._subscriptionsMap[e]||(this._subscriptionsMap[e]=new Set);let s=this._subscriptionsMap[e];return s.add(t),{remove:()=>{s.delete(t),s.size||delete this._subscriptionsMap[e]}}}stop(){window.removeEventListener("storage",this._updateHandler),this._subscriptionsMap=null,Z.clear(this.name)}},Z=class{static get readyEventName(){return Q}static open(e=Pt,t="store"){let s=e+"/"+t;return this._reg[s]||(this._reg[s]=new Rt(e,t)),this._reg[s]}static clear(e){window.indexedDB.deleteDatabase(e);for(let t in this._reg)t.split("/")[0]===e&&delete this._reg[t]}};M(Z,"_reg",Object.create(null));var tt="1.24.0-alpha.0";var et="blocks",st=tt;var It="https://ucarecdn.com",v=Object.freeze({"dev-mode":{},pubkey:{},uuid:{},src:{},lazy:{default:1},intersection:{},breakpoints:{},"cdn-cname":{default:It},"proxy-cname":{},"secure-delivery-proxy":{},"hi-res-support":{default:1},"ultra-res-support":{},format:{},"cdn-operations":{},progressive:{},quality:{},"is-background-for":{},"is-preview-blur":{default:1}});var it=Object.create(null);for(let e in v)it[b+e]=v[e]?.default||"";var S=class extends B{cssInit$=it;$$(t){return this.$[b+t]}set$$(t){for(let s in t)this.$[b+s]=t[s]}sub$$(t,s){this.sub(b+t,i=>{i===null||i===""||s(i)})}analyticsParams(){return`-/@clib/${et}/${st}/uc-img/`}initAttributes(t){[...this.attributes].forEach(s=>{v[s.name]||t.setAttribute(s.name,s.value)})}initIntersection(t,s){let i={root:null,rootMargin:"0px"};this._isnObserver=new IntersectionObserver(r=>{r.forEach(n=>{n.isIntersecting&&(s(),this._isnObserver.unobserve(t))})},i),this._isnObserver.observe(t),this._observed||(this._observed=new Set),this._observed.add(t)}destroyCallback(){super.destroyCallback(),this._isnObserver&&(this._observed.forEach(t=>{this._isnObserver.unobserve(t)}),this._isnObserver=null),h.deleteCtx(this)}static get observedAttributes(){return Object.keys(v)}attributeChangedCallback(t,s,i){window.setTimeout(()=>{this.$[b+t]=i})}};var rt=e=>Object.entries(e).filter(([t,s])=>s!==void 0&&s!=="").map(([t,s])=>t==="cdn-operations"||t==="analytics"?s:`${t}/${s}`);var R=class extends S{_img=new Image;_imgPreview=new Image;_fmtAbs(t){return!t.includes("//")&&!N&&(t=new URL(t,document.baseURI).href),t}_validateSize(t){if(t?.trim()!==""){let s=t.match(/\d+/)[0],i=t.match(/[a-zA-Z]+/)[0],r=parseInt(s,10);if(Number(r)>k&&this.hasFormatJPG)return k+i;if(Number(r)>j&&!this.hasFormatJPG)return j+i}return t}_getCdnModifiers(t,s){let i={format:this.$$("format"),quality:this.$$("quality"),resize:this._validateSize(t),blur:s,"cdn-operations":this.$$("cdn-operations"),analytics:this.analyticsParams()};return F(...rt(i))}_getUrlBase(t="",s=""){if(this.$$("src").startsWith("data:")||this.$$("src").startsWith("blob:"))return this.$$("src");if(N&&this.$$("src")&&!this.$$("src").includes("//"))return this._proxyUrl(this.$$("src"));let i=this._getCdnModifiers(t,s);if(this.$$("src").startsWith(this.$$("cdn-cname")))return g(this.$$("src"),i);if(this.$$("cdn-cname")&&this.$$("uuid"))return this._proxyUrl(g(I(this.$$("cdn-cname"),this.$$("uuid")),i));if(this.$$("uuid"))return this._proxyUrl(g(I(this.$$("cdn-cname"),this.$$("uuid")),i));if(this.$$("proxy-cname"))return this._proxyUrl(g(this.$$("proxy-cname"),i,this._fmtAbs(this.$$("src"))));if(this.$$("pubkey"))return this._proxyUrl(g(`https://${this.$$("pubkey")}.ucr.io/`,i,this._fmtAbs(this.$$("src"))))}_proxyUrl(t){return this.$$("secure-delivery-proxy")?q(this.$$("secure-delivery-proxy"),{previewUrl:t},{transform:i=>window.encodeURIComponent(i)}):t}_getElSize(t,s=1,i=!0){let r=t.getBoundingClientRect(),n=s*Math.round(r.width),o=i?"":s*Math.round(r.height);return n||o?`${n||""}x${o||""}`:null}_setupEventProxy(t){let s=r=>{r.stopPropagation();let n=new Event(r.type,r);this.dispatchEvent(n)},i=["load","error"];for(let r of i)t.addEventListener(r,s)}get img(){return this.hasPreviewImage||(this._setupConfigForImage({elNode:this._img}),this.appendChild(this._img)),this._img}get currentImg(){return this.hasPreviewImage?{type:L.PREVIEW,img:this._imgPreview}:{type:L.MAIN,img:this.img}}get hasPreviewImage(){return this.$$("is-preview-blur")}get bgSelector(){return this.$$("is-background-for")}get breakpoints(){if(this.$$("breakpoints")){let t=W(this.$$("breakpoints"));return H(t.map(s=>parseInt(s,10)))}else return null}get hasFormatJPG(){return this.$$("format").toLowerCase()==="jpeg"}renderBg(t){let s=new Set;s.add(`url("${this._getUrlBase(this._getElSize(t))}") 1x`),this.$$("hi-res-support")&&s.add(`url("${this._getUrlBase(this._getElSize(t,2))}") ${2}x`),this.$$("ultra-res-support")&&s.add(`url("${this._getUrlBase(this._getElSize(t,3))}") ${3}x`);let i=`image-set(${[...s].join(", ")})`;t.style.setProperty("background-image",i),t.style.setProperty("background-image","-webkit-"+i)}getSrcset(){let t=new Set;return this.breakpoints?this.breakpoints.forEach(s=>{t.add(this._getUrlBase(s+"x")+` ${this._validateSize(s+"w")}`),this.$$("hi-res-support")&&t.add(this._getUrlBase(s*2+"x")+` ${this._validateSize(s*2+"w")}`),this.$$("ultra-res-support")&&t.add(this._getUrlBase(s*3+"x")+` ${this._validateSize(s*3+"w")}`)}):(t.add(this._getUrlBase(this._getElSize(this.currentImg.img))+" 1x"),this.$$("hi-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,2))+" 2x"),this.$$("ultra-res-support")&&t.add(this._getUrlBase(this._getElSize(this.currentImg.img,3))+" 3x")),[...t].join()}getSrc(){return this._getUrlBase()}get srcUrlPreview(){return this._getUrlBase("100x","100")}renderBackground(){[...document.querySelectorAll(this.bgSelector)].forEach(t=>{this.$$("intersection")?this.initIntersection(t,()=>{this.renderBg(t)}):this.renderBg(t)})}_appendURL({elNode:t,src:s,srcset:i}){s&&(t.src=s),i&&(t.srcset=i)}_setupConfigForImage({elNode:t}){this._setupEventProxy(t),this.initAttributes(t)}loaderImage({src:t,srcset:s,elNode:i}){return new Promise((r,n)=>{this._setupConfigForImage({elNode:i}),i.setAttribute(D,""),i.addEventListener("load",()=>{i.removeAttribute(D),r(i)}),i.addEventListener("error",()=>{n(!1)}),this._appendURL({elNode:i,src:t,srcset:s})})}async renderImage(){if(this.$$("intersection")){this.hasPreviewImage&&(this._setupConfigForImage({elNode:this._imgPreview}),this.appendChild(this._imgPreview)),this.initIntersection(this.currentImg.img,async()=>{this.hasPreviewImage&&(this._imgPreview.src=this.srcUrlPreview);try{await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await this._imgPreview.remove(),this.appendChild(this._img)}catch{this.hasPreviewImage&&await this._imgPreview?.remove(),this.appendChild(this._img)}});return}try{this.hasPreviewImage&&(await this.loaderImage({src:this.srcUrlPreview,elNode:this._imgPreview}),this.appendChild(this._imgPreview)),await this.loaderImage({src:this.getSrc(),srcset:this.getSrcset(),elNode:this._img}),this.hasPreviewImage&&await this._imgPreview?.remove(),this.appendChild(this._img)}catch{this.hasPreviewImage&&await this._imgPreview?.remove(),this.appendChild(this._img)}}init(){this.bgSelector?this.renderBackground():this.renderImage()}};var O=class extends R{initCallback(){super.initCallback(),this.sub$$("src",()=>{this.init()}),this.sub$$("uuid",()=>{this.init()}),this.sub$$("lazy",t=>{!this.$$("is-background-for")&&!this.$$("is-preview-blur")&&(this.img.loading=t?"lazy":"eager")})}};O.reg("uc-img");export{O as Img};
@@ -1,79 +0,0 @@
1
- /**
2
- * @typedef {{
3
- * 'cloud-image-edit': import('../blocks/CloudImageEditorActivity/CloudImageEditorActivity.js').ActivityParams;
4
- * external: import('../blocks/ExternalSource/ExternalSource.js').ActivityParams;
5
- * }} ActivityParamsMap
6
- */
7
- export class ActivityBlock extends Block {
8
- /**
9
- * @private
10
- * @type {Map<
11
- * ActivityBlock,
12
- * { activateCallback: (() => void) | undefined; deactivateCallback: (() => void) | undefined }
13
- * >}
14
- */
15
- private static _activityCallbacks;
16
- /** @protected */
17
- protected historyTracked: boolean;
18
- init$: {
19
- '*currentActivity': null;
20
- '*currentActivityParams': {};
21
- '*history': never[];
22
- '*historyBack': null;
23
- '*closeModal': () => void;
24
- };
25
- _debouncedHistoryFlush: (() => void) & {
26
- cancel: () => void;
27
- };
28
- /** @private */
29
- private _deactivate;
30
- /** @private */
31
- private _activate;
32
- /** @private */
33
- private _historyFlush;
34
- /** @private */
35
- private _isActivityRegistered;
36
- get isActivityActive(): boolean | undefined;
37
- get couldOpenActivity(): boolean;
38
- /**
39
- * TODO: remove name argument
40
- *
41
- * @param {String} name
42
- * @param {Object} [options]
43
- * @param {() => void} [options.onActivate]
44
- * @param {() => void} [options.onDeactivate]
45
- */
46
- registerActivity(name: string, options?: {
47
- onActivate?: (() => void) | undefined;
48
- onDeactivate?: (() => void) | undefined;
49
- }): void;
50
- unregisterActivity(): void;
51
- get activityKey(): string;
52
- /** @type {ActivityParamsMap[keyof ActivityParamsMap]} */
53
- get activityParams(): ActivityParamsMap[keyof ActivityParamsMap];
54
- /** @type {String} */
55
- get initActivity(): string;
56
- /** @type {String} */
57
- get doneActivity(): string;
58
- historyBack(): void;
59
- ___ACTIVITY_IS_ACTIVE___: boolean | undefined;
60
- }
61
- export namespace ActivityBlock {
62
- let activities: Readonly<{
63
- START_FROM: "start-from";
64
- CAMERA: "camera";
65
- DRAW: "draw";
66
- UPLOAD_LIST: "upload-list";
67
- URL: "url";
68
- CLOUD_IMG_EDIT: "cloud-image-edit";
69
- EXTERNAL: "external";
70
- }>;
71
- }
72
- export type ActivityParamsMap = {
73
- "cloud-image-edit": import("../blocks/CloudImageEditorActivity/CloudImageEditorActivity.js").ActivityParams;
74
- external: import("../blocks/ExternalSource/ExternalSource.js").ActivityParams;
75
- };
76
- export type RegisteredActivityType = (typeof ActivityBlock)["activities"][keyof (typeof ActivityBlock)["activities"]];
77
- export type ActivityType = RegisteredActivityType | (string & {}) | null;
78
- import { Block } from './Block.js';
79
- //# sourceMappingURL=ActivityBlock.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ActivityBlock.d.ts","sourceRoot":"","sources":["ActivityBlock.js"],"names":[],"mappings":"AASA;;;;;GAKG;AAEH;IAgFE;;;;;;OAMG;IACH,kCAAsC;IAtFtC,iBAAiB;IACjB,kCAAuB;IAEvB;;;;;;MAA+B;IAE/B;;MAAqE;IAErE,eAAe;IACf,oBAKC;IAED,eAAe;IACf,kBAaC;IA+BD,eAAe;IACf,sBAWC;IAED,eAAe;IACf,8BAEC;IAWD,4CAEC;IAED,iCAEC;IAED;;;;;;;OAOG;IACH,yCAHG;QAA6B,UAAU,UAAzB,IAAI;QACW,YAAY,UAA3B,IAAI;KAAwB,QAQ5C;IAED,2BAKC;IAoBD,0BAEC;IAED,yDAAyD;IACzD,sBADW,iBAAiB,CAAC,MAAM,iBAAiB,CAAC,CAGpD;IAED,qBAAqB;IACrB,2BAEC;IAED,qBAAqB;IACrB,2BAEC;IAED,oBA4BC;IA9KC,8CAAyB;CA+K5B;;;;;;;;;;;;gCAhMY;IACZ,kBAAsB,EAAE,OAAO,gEAAgE,EAAE,cAAc,CAAC;IAC5G,QAAQ,EAAE,OAAO,4CAA4C,EAAE,cAAc,CAAC;CAC/E;qCAyMU,CAAC,OAAO,aAAa,EAAE,YAAY,CAAC,CAAC,MAAM,CAAC,OAAO,aAAa,EAAE,YAAY,CAAC,CAAC;2BAChF,sBAAsB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,GAAG,IAAI;sBApNrC,YAAY"}
@@ -1,216 +0,0 @@
1
- // @ts-check
2
- import { debounce } from '../blocks/utils/debounce.js';
3
- import { EventType } from '../blocks/UploadCtxProvider/EventEmitter.js';
4
- import { Block } from './Block.js';
5
- import { activityBlockCtx } from './CTX.js';
6
-
7
- const ACTIVE_ATTR = 'active';
8
- const ACTIVE_PROP = '___ACTIVITY_IS_ACTIVE___';
9
-
10
- /**
11
- * @typedef {{
12
- * 'cloud-image-edit': import('../blocks/CloudImageEditorActivity/CloudImageEditorActivity.js').ActivityParams;
13
- * external: import('../blocks/ExternalSource/ExternalSource.js').ActivityParams;
14
- * }} ActivityParamsMap
15
- */
16
-
17
- export class ActivityBlock extends Block {
18
- /** @protected */
19
- historyTracked = false;
20
-
21
- init$ = activityBlockCtx(this);
22
-
23
- _debouncedHistoryFlush = debounce(this._historyFlush.bind(this), 10);
24
-
25
- /** @private */
26
- _deactivate() {
27
- let actDesc = ActivityBlock._activityCallbacks.get(this);
28
- this[ACTIVE_PROP] = false;
29
- this.removeAttribute(ACTIVE_ATTR);
30
- actDesc?.deactivateCallback?.();
31
- }
32
-
33
- /** @private */
34
- _activate() {
35
- let actDesc = ActivityBlock._activityCallbacks.get(this);
36
- this.$['*historyBack'] = this.historyBack.bind(this);
37
- /** @private */
38
- this[ACTIVE_PROP] = true;
39
- this.setAttribute(ACTIVE_ATTR, '');
40
- actDesc?.activateCallback?.();
41
-
42
- this._debouncedHistoryFlush();
43
-
44
- this.emit(EventType.ACTIVITY_CHANGE, {
45
- activity: this.activityType,
46
- });
47
- }
48
-
49
- /** @protected */
50
- initCallback() {
51
- super.initCallback();
52
-
53
- // TODO: rename activityType to activityId
54
- if (this.activityType) {
55
- if (!this.hasAttribute('activity')) {
56
- this.setAttribute('activity', this.activityType);
57
- }
58
- this.sub('*currentActivity', (/** @type {String} */ val) => {
59
- try {
60
- if (this.activityType !== val && this[ACTIVE_PROP]) {
61
- this._deactivate();
62
- } else if (this.activityType === val && !this[ACTIVE_PROP]) {
63
- this._activate();
64
- }
65
- } catch (err) {
66
- this.telemetryManager.sendEventError(err, `activity "${this.activityType}"`);
67
- console.error(`Error in activity "${this.activityType}". `, err);
68
- this.$['*currentActivity'] = this.$['*history'][this.$['*history'].length - 1] ?? null;
69
- }
70
-
71
- if (!val) {
72
- this.$['*history'] = [];
73
- }
74
- });
75
- }
76
- }
77
-
78
- /** @private */
79
- _historyFlush() {
80
- let history = this.$['*history'];
81
- if (history) {
82
- if (history.length > 10) {
83
- history = history.slice(history.length - 11, history.length - 1);
84
- }
85
- if (this.historyTracked && history[history.length - 1] !== this.activityType) {
86
- history.push(this.activityType);
87
- }
88
- this.$['*history'] = history;
89
- }
90
- }
91
-
92
- /** @private */
93
- _isActivityRegistered() {
94
- return this.activityType && ActivityBlock._activityCallbacks.has(this);
95
- }
96
-
97
- /**
98
- * @private
99
- * @type {Map<
100
- * ActivityBlock,
101
- * { activateCallback: (() => void) | undefined; deactivateCallback: (() => void) | undefined }
102
- * >}
103
- */
104
- static _activityCallbacks = new Map();
105
-
106
- get isActivityActive() {
107
- return this[ACTIVE_PROP];
108
- }
109
-
110
- get couldOpenActivity() {
111
- return true;
112
- }
113
-
114
- /**
115
- * TODO: remove name argument
116
- *
117
- * @param {String} name
118
- * @param {Object} [options]
119
- * @param {() => void} [options.onActivate]
120
- * @param {() => void} [options.onDeactivate]
121
- */
122
- registerActivity(name, options = {}) {
123
- const { onActivate, onDeactivate } = options;
124
- ActivityBlock._activityCallbacks.set(this, {
125
- activateCallback: onActivate,
126
- deactivateCallback: onDeactivate,
127
- });
128
- }
129
-
130
- unregisterActivity() {
131
- if (this.isActivityActive) {
132
- this._deactivate();
133
- }
134
- ActivityBlock._activityCallbacks.delete(this);
135
- }
136
-
137
- /** @protected */
138
- destroyCallback() {
139
- super.destroyCallback();
140
- this._isActivityRegistered() && this.unregisterActivity();
141
-
142
- /** @type {string | null} */
143
- const currentActivity = this.$['*currentActivity'];
144
-
145
- const hasCurrentActivityInCtx = !![...this.blocksRegistry].find(
146
- (block) => block instanceof ActivityBlock && block.activityType === currentActivity,
147
- );
148
-
149
- if (!hasCurrentActivityInCtx) {
150
- this.$['*currentActivity'] = null;
151
- this.modalManager.closeAll();
152
- }
153
- }
154
-
155
- get activityKey() {
156
- return this.ctxName + this.activityType;
157
- }
158
-
159
- /** @type {ActivityParamsMap[keyof ActivityParamsMap]} */
160
- get activityParams() {
161
- return this.$['*currentActivityParams'];
162
- }
163
-
164
- /** @type {String} */
165
- get initActivity() {
166
- return this.getCssData('--cfg-init-activity');
167
- }
168
-
169
- /** @type {String} */
170
- get doneActivity() {
171
- return this.getCssData('--cfg-done-activity');
172
- }
173
-
174
- historyBack() {
175
- /** @type {String[]} */
176
- let history = this.$['*history'];
177
-
178
- if (history) {
179
- let nextActivity = history.pop();
180
-
181
- while (nextActivity === this.activityType) {
182
- nextActivity = history.pop();
183
- }
184
-
185
- let couldOpenActivity = !!nextActivity;
186
- if (nextActivity) {
187
- const nextActivityBlock = [...this.blocksRegistry].find((block) => block.activityType === nextActivity);
188
- couldOpenActivity = /** @type {ActivityBlock} */ (nextActivityBlock)?.couldOpenActivity ?? false;
189
- }
190
-
191
- nextActivity = couldOpenActivity ? nextActivity : undefined;
192
-
193
- if (nextActivity) this.modalManager.open(nextActivity);
194
-
195
- this.$['*currentActivity'] = nextActivity;
196
- this.$['*history'] = history;
197
-
198
- if (!nextActivity) {
199
- this.modalManager.closeAll();
200
- }
201
- }
202
- }
203
- }
204
-
205
- ActivityBlock.activities = Object.freeze({
206
- START_FROM: 'start-from',
207
- CAMERA: 'camera',
208
- DRAW: 'draw',
209
- UPLOAD_LIST: 'upload-list',
210
- URL: 'url',
211
- CLOUD_IMG_EDIT: 'cloud-image-edit',
212
- EXTERNAL: 'external',
213
- });
214
-
215
- /** @typedef {(typeof ActivityBlock)['activities'][keyof (typeof ActivityBlock)['activities']]} RegisteredActivityType */
216
- /** @typedef {RegisteredActivityType | (string & {}) | null} ActivityType */
@@ -1,113 +0,0 @@
1
- export class Block extends BaseComponent<any> {
2
- /** @type {string | null} */
3
- static StateConsumerScope: string | null;
4
- /** @type {string[]} */
5
- static styleAttrs: string[];
6
- /** @param {String} [name] */
7
- static reg(name?: string): void;
8
- constructor();
9
- /** @protected */
10
- protected requireCtxName: boolean;
11
- /** @type {import('./ActivityBlock.js').ActivityType} */
12
- activityType: import("./ActivityBlock.js").ActivityType;
13
- init$: {};
14
- /**
15
- * @param {String} str
16
- * @param {{ [key: string]: string | number }} variables
17
- * @returns {String}
18
- */
19
- l10n(str: string, variables?: {
20
- [key: string]: string | number;
21
- }): string;
22
- /**
23
- * @private
24
- * @param {string} key
25
- * @param {number} count
26
- * @returns {string}
27
- */
28
- private pluralize;
29
- /**
30
- * @param {string} key
31
- * @param {() => void} resolver
32
- * @protected
33
- */
34
- protected bindL10n(key: string, resolver: () => void): void;
35
- /** @type {Map<string, Set<{ remove: () => void }>>} */
36
- l10nProcessorSubs: Map<string, Set<{
37
- remove: () => void;
38
- }>>;
39
- /**
40
- * @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[0]} type
41
- * @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[1]} [payload]
42
- * @param {Parameters<import('../blocks/UploadCtxProvider/EventEmitter.js').EventEmitter['emit']>[2]} [options]
43
- */
44
- emit(type: Parameters<import("../blocks/UploadCtxProvider/EventEmitter.js").EventEmitter["emit"]>[0], payload?: Parameters<import("../blocks/UploadCtxProvider/EventEmitter.js").EventEmitter["emit"]>[1], options?: Parameters<import("../blocks/UploadCtxProvider/EventEmitter.js").EventEmitter["emit"]>[2]): void;
45
- /**
46
- * @param {(block: Block) => boolean} callback
47
- * @returns {Boolean}
48
- */
49
- hasBlockInCtx(callback: (block: Block) => boolean): boolean;
50
- /**
51
- * @param {String} prop
52
- * @param {any} newVal
53
- */
54
- setOrAddState(prop: string, newVal: any): void;
55
- get testId(): string | null;
56
- /**
57
- * @returns {ModalManager}
58
- * @public
59
- */
60
- public get modalManager(): ModalManager;
61
- /**
62
- * @returns {TelemetryManager
63
- * | { sendEvent: () => void; sendEventCloudImageEditor: () => void; sendEventError: () => void }}
64
- * @public
65
- */
66
- public get telemetryManager(): TelemetryManager | {
67
- sendEvent: () => void;
68
- sendEventCloudImageEditor: () => void;
69
- sendEventError: () => void;
70
- };
71
- /**
72
- * @private
73
- * @returns {LocaleManager | null}
74
- */
75
- private get localeManager();
76
- /**
77
- * @returns {A11y | null}
78
- * @protected
79
- */
80
- protected get a11y(): A11y | null;
81
- /** @type {Set<Block>} */
82
- get blocksRegistry(): Set<Block>;
83
- /**
84
- * Called when the last block is removed from the context. Note that inheritors must run their callback before that.
85
- *
86
- * @protected
87
- */
88
- protected destroyCtxCallback(): void;
89
- /**
90
- * @param {String} url
91
- * @returns {Promise<String>}
92
- * @protected
93
- */
94
- protected proxyUrl(url: string): Promise<string>;
95
- /** @returns {import('../types').ConfigType} } */
96
- get cfg(): import("../types").ConfigType;
97
- /** @private */
98
- private __cfgProxy;
99
- /**
100
- * @template {keyof import('../types').ConfigType} T
101
- * @param {T} key
102
- * @param {(value: import('../types').ConfigType[T]) => void} callback
103
- */
104
- subConfigValue<T extends keyof import("../types").ConfigType>(key: T, callback: (value: import("../types").ConfigType[T]) => void): void;
105
- /** @param {unknown[]} args */
106
- debugPrint(...args: unknown[]): void;
107
- }
108
- export { BaseComponent };
109
- import { BaseComponent } from '@symbiotejs/symbiote';
110
- import { ModalManager } from './managers/ModalManager.js';
111
- import { TelemetryManager } from './managers/TelemetryManager.js';
112
- import { A11y } from './managers/a11y.js';
113
- //# sourceMappingURL=Block.d.ts.map