@uploadcare/file-uploader 1.28.0-alpha.0 → 1.28.0-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ActivityHeader-R6Mlx-dA.js +9 -0
- package/dist/ActivityHeader.css +23 -0
- package/dist/ActivityHeader.layered.css +24 -0
- package/dist/{CameraSource-DbyO6GoK.js → CameraSource-DDwj1jCV.js} +106 -76
- package/dist/CameraSource-n1tun2Df.js +10 -0
- package/dist/CameraSource.css +180 -0
- package/dist/CameraSource.layered.css +209 -0
- package/dist/{CloudImageEditor-BIxf1V4M.js → CloudImageEditor-DcVoIRb3.js} +66 -65
- package/dist/{CloudImageEditorActivity-d4DpK6fQ.js → CloudImageEditorActivity-Csij4nlC.js} +4 -4
- package/dist/{CloudImageEditorActivity-CJxP5N0S.js → CloudImageEditorActivity-DD4NdU0P.js} +4 -4
- package/dist/CloudImageEditorActivity.css +14 -0
- package/dist/CloudImageEditorActivity.layered.css +15 -0
- package/dist/{Config-DuWre5p3.js → Config-DKOromHY.js} +27 -27
- package/dist/Config.css +4 -0
- package/dist/Config.layered.css +5 -0
- package/dist/ExternalSource-6MSUgxqy.js +10 -0
- package/dist/{ExternalSource-BKTFp95O.js → ExternalSource-DVEjSkPB.js} +56 -51
- package/dist/ExternalSource.css +98 -0
- package/dist/ExternalSource.layered.css +116 -0
- package/dist/{Icon-CqTVC82Q.js → Icon-tXRTvEF2.js} +7 -8
- package/dist/Icon.css +14 -0
- package/dist/Icon.layered.css +15 -0
- package/dist/{LitUploaderBlock-BA34rzeU.js → LitUploaderBlock-LxeOZ0ya.js} +65 -65
- package/dist/{UrlSource-DZK5EBwT.js → UrlSource-BkyX00I2.js} +5 -5
- package/dist/UrlSource-RI8TSD48.js +10 -0
- package/dist/UrlSource.css +17 -0
- package/dist/UrlSource.layered.css +18 -0
- package/dist/abstract/loadFileUploaderFrom.js +3 -3
- package/dist/cameraPlugin-weRKO7eG.js +8 -0
- package/dist/{cloud-image-editor-fNswWrI4.js → cloud-image-editor-hhbyNWLG.js} +6 -6
- package/dist/cloud-image-editor.css +1380 -0
- package/dist/cloud-image-editor.layered.css +1549 -0
- package/dist/cloudImageEditorPlugin-FjUgbMK3.js +8 -0
- package/dist/{en-DNCwRJsB.js → en-8OWEmZim.js} +2 -2
- package/dist/env-mM-ksNPq.js +8 -0
- package/dist/env.js +3 -3
- package/dist/externalSourcesPlugin-CMBmLT8S.js +8 -0
- package/dist/imageShrinkPlugin-BN6loiP2.js +8 -0
- package/dist/index-base.css +2497 -0
- package/dist/index-base.layered.css +2837 -0
- package/dist/index.css +9 -3964
- package/dist/index.d.ts +13 -0
- package/dist/index.js +827 -42
- package/dist/index.layered.css +9 -4478
- package/dist/instagramPlugin-CXRm8MGL.js +8 -0
- package/dist/{loadFileUploaderFrom-BWJM43Yq.js → loadFileUploaderFrom-Bfz8L3VB.js} +3 -3
- package/dist/locales/file-uploader/ar.js +2 -2
- package/dist/locales/file-uploader/az.js +2 -2
- package/dist/locales/file-uploader/ca.js +2 -2
- package/dist/locales/file-uploader/cs.js +2 -2
- package/dist/locales/file-uploader/da.js +2 -2
- package/dist/locales/file-uploader/de.js +2 -2
- package/dist/locales/file-uploader/el.js +2 -2
- package/dist/locales/file-uploader/en.js +3 -3
- package/dist/locales/file-uploader/es.js +2 -2
- package/dist/locales/file-uploader/et.js +2 -2
- package/dist/locales/file-uploader/fi.js +2 -2
- package/dist/locales/file-uploader/fr.js +2 -2
- package/dist/locales/file-uploader/he.js +2 -2
- package/dist/locales/file-uploader/hy.js +2 -2
- package/dist/locales/file-uploader/is.js +2 -2
- package/dist/locales/file-uploader/it.js +2 -2
- package/dist/locales/file-uploader/ja.js +2 -2
- package/dist/locales/file-uploader/ka.js +2 -2
- package/dist/locales/file-uploader/kk.js +2 -2
- package/dist/locales/file-uploader/ko.js +2 -2
- package/dist/locales/file-uploader/lv.js +2 -2
- package/dist/locales/file-uploader/nb.js +2 -2
- package/dist/locales/file-uploader/nl.js +2 -2
- package/dist/locales/file-uploader/pl.js +2 -2
- package/dist/locales/file-uploader/pt.js +2 -2
- package/dist/locales/file-uploader/ro.js +2 -2
- package/dist/locales/file-uploader/ru.js +2 -2
- package/dist/locales/file-uploader/sk.js +2 -2
- package/dist/locales/file-uploader/sr.js +2 -2
- package/dist/locales/file-uploader/sv.js +2 -2
- package/dist/locales/file-uploader/tr.js +2 -2
- package/dist/locales/file-uploader/uk.js +2 -2
- package/dist/locales/file-uploader/vi.js +2 -2
- package/dist/locales/file-uploader/zh-TW.js +2 -2
- package/dist/locales/file-uploader/zh.js +2 -2
- package/dist/{plugins-DxjsQUa8.js → plugins-CGUls7EV.js} +6 -6
- package/dist/urlSourcePlugin-_WdbEhq2.js +8 -0
- package/package.json +1 -1
- package/web/ActivityHeader-BFdTdVfD.js +9 -0
- package/web/ActivityHeader-DQy6rII1.js +9 -0
- package/web/ActivityHeader-DvzMl0uj.js +9 -0
- package/web/ActivityHeader-i4x6_Fne.js +9 -0
- package/web/CameraSource-BAWIA4Wm.js +508 -0
- package/web/CameraSource-BqZCQcij.js +11 -0
- package/web/CameraSource-Brxr4tz4.js +508 -0
- package/web/CameraSource-BvBJ5Uzy.js +508 -0
- package/web/CameraSource-CkHzIE-h.js +11 -0
- package/web/CameraSource-D964yPLu.js +508 -0
- package/web/CameraSource-DE48Az-f.js +11 -0
- package/web/CameraSource-DyPebtRF.js +478 -0
- package/web/CameraSource-pj7Xo81m.js +11 -0
- package/web/CloudImageEditor-CTgUWB07.js +2192 -0
- package/web/CloudImageEditor-CxqV9Lwm.js +2192 -0
- package/web/CloudImageEditor-DoLWHpqV.js +2192 -0
- package/web/CloudImageEditor-Drywn265.js +2192 -0
- package/web/CloudImageEditor-MXcaDtMx.js +2187 -0
- package/web/CloudImageEditorActivity-BPzmfaJV.js +85 -0
- package/web/CloudImageEditorActivity-Br8pU5gd.js +11 -0
- package/web/CloudImageEditorActivity-Cw8b2CEz.js +11 -0
- package/web/CloudImageEditorActivity-Df1ySGq0.js +86 -0
- package/web/CloudImageEditorActivity-DinG5r0y.js +11 -0
- package/web/CloudImageEditorActivity-DmnLLINR.js +85 -0
- package/web/CloudImageEditorActivity-U90BGCek.js +85 -0
- package/web/CloudImageEditorActivity-dNLQZRZI.js +11 -0
- package/web/CloudImageEditorActivity-ur-hQ-6p.js +85 -0
- package/web/Config-8hlBNhvs.js +455 -0
- package/web/Config-BDZhPIyz.js +455 -0
- package/web/Config-CJVNrrjj.js +455 -0
- package/web/Config-DvkVtlQ7.js +455 -0
- package/web/ExternalSource-B9ycBFiD.js +10 -0
- package/web/ExternalSource-BE7HX47E.js +250 -0
- package/web/ExternalSource-BL5GSlol.js +250 -0
- package/web/ExternalSource-BXQY6Dlc.js +10 -0
- package/web/ExternalSource-BXxH3JCD.js +250 -0
- package/web/ExternalSource-BYSS-PPV.js +245 -0
- package/web/ExternalSource-C57a61QN.js +10 -0
- package/web/ExternalSource-CKfMtOgU.js +250 -0
- package/web/ExternalSource-DP6q8ylB.js +10 -0
- package/web/LitUploaderBlock-AX6jOdAS.js +996 -0
- package/web/LitUploaderBlock-BjAaoLl2.js +996 -0
- package/web/LitUploaderBlock-D8E5HuwH.js +996 -0
- package/web/LitUploaderBlock-Dl3ce0Tc.js +996 -0
- package/web/LitUploaderBlock-Oi33U0uf.js +996 -0
- package/web/UrlSource-B9SX3K0L.js +10 -0
- package/web/UrlSource-C3zB1rCb.js +70 -0
- package/web/UrlSource-C7bEU6Xv.js +10 -0
- package/web/UrlSource-CE389CBz.js +70 -0
- package/web/UrlSource-CnvAJ58Y.js +10 -0
- package/web/UrlSource-CqF0h6B-.js +10 -0
- package/web/UrlSource-D-971Nut.js +70 -0
- package/web/UrlSource-DhI3YCt5.js +70 -0
- package/web/UrlSource-hWV7jtB2.js +70 -0
- package/web/abstract/CTX.d.ts +40 -0
- package/web/abstract/TypedCollection.d.ts +47 -0
- package/web/abstract/TypedCollection.test.d.ts +1 -0
- package/web/abstract/TypedData.d.ts +12 -0
- package/web/abstract/TypedData.test.d.ts +1 -0
- package/web/abstract/UploaderPublicApi.d.ts +41 -0
- package/web/abstract/buildOutputCollectionState.d.ts +3 -0
- package/web/abstract/customConfigOptions.d.ts +65 -0
- package/web/abstract/defineComponents.d.ts +1 -0
- package/web/abstract/features/ClipboardLayer.d.ts +12 -0
- package/web/abstract/loadFileUploaderFrom.d.ts +13 -0
- package/web/abstract/localeRegistry.d.ts +5 -0
- package/web/abstract/managers/LocaleManager.d.ts +10 -0
- package/web/abstract/managers/ModalManager.d.ts +53 -0
- package/web/abstract/managers/SecureUploadsManager.d.ts +7 -0
- package/web/abstract/managers/TelemetryManager.d.ts +41 -0
- package/web/abstract/managers/ValidationManager.d.ts +34 -0
- package/web/abstract/managers/__tests__/ModalManager.test.d.ts +13 -0
- package/web/abstract/managers/__tests__/SecureUploadsManager.test.d.ts +1 -0
- package/web/abstract/managers/a11y.d.ts +9 -0
- package/web/abstract/managers/plugin/PluginManager.d.ts +25 -0
- package/web/abstract/managers/plugin/PluginTypes.d.ts +146 -0
- package/web/abstract/managers/plugin/index.d.ts +2 -0
- package/web/abstract/sharedConfigKey.d.ts +2 -0
- package/web/abstract/uploadEntrySchema.d.ts +34 -0
- package/web/blocks/ActivityHeader/ActivityHeader.d.ts +8 -0
- package/web/blocks/CameraSource/CameraSource.d.ts +121 -0
- package/web/blocks/CameraSource/__tests__/calcCameraModes.test.d.ts +1 -0
- package/web/blocks/CameraSource/calcCameraModes.d.ts +5 -0
- package/web/blocks/CameraSource/constants.d.ts +15 -0
- package/web/blocks/CloudImageEditor/index.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/CloudImageEditorBlock.d.ts +60 -0
- package/web/blocks/CloudImageEditor/src/CropFrame.d.ts +56 -0
- package/web/blocks/CloudImageEditor/src/EditorAspectRatioButtonControl.d.ts +24 -0
- package/web/blocks/CloudImageEditor/src/EditorButtonControl.d.ts +14 -0
- package/web/blocks/CloudImageEditor/src/EditorCropButtonControl.d.ts +13 -0
- package/web/blocks/CloudImageEditor/src/EditorFilterControl.d.ts +35 -0
- package/web/blocks/CloudImageEditor/src/EditorImageCropper.d.ts +56 -0
- package/web/blocks/CloudImageEditor/src/EditorImageFader.d.ts +63 -0
- package/web/blocks/CloudImageEditor/src/EditorOperationControl.d.ts +15 -0
- package/web/blocks/CloudImageEditor/src/EditorScroller.d.ts +15 -0
- package/web/blocks/CloudImageEditor/src/EditorSlider.d.ts +33 -0
- package/web/blocks/CloudImageEditor/src/EditorToolbar.d.ts +68 -0
- package/web/blocks/CloudImageEditor/src/crop-utils.d.ts +36 -0
- package/web/blocks/CloudImageEditor/src/crop-utils.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/cropper-constants.d.ts +10 -0
- package/web/blocks/CloudImageEditor/src/elements/button/BtnUi.d.ts +31 -0
- package/web/blocks/CloudImageEditor/src/elements/line-loader/LineLoaderUi.d.ts +19 -0
- package/web/blocks/CloudImageEditor/src/elements/presence-toggle/PresenceToggle.d.ts +27 -0
- package/web/blocks/CloudImageEditor/src/elements/slider/SliderUi.d.ts +38 -0
- package/web/blocks/CloudImageEditor/src/index.d.ts +15 -0
- package/web/blocks/CloudImageEditor/src/lib/classNames.d.ts +5 -0
- package/web/blocks/CloudImageEditor/src/lib/classNames.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/linspace.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/linspace.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/parseCropPreset.d.ts +4 -0
- package/web/blocks/CloudImageEditor/src/lib/parseCropPreset.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/parseTabs.d.ts +2 -0
- package/web/blocks/CloudImageEditor/src/lib/pick.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/pick.test.d.ts +1 -0
- package/web/blocks/CloudImageEditor/src/lib/transformationUtils.d.ts +7 -0
- package/web/blocks/CloudImageEditor/src/state.d.ts +20 -0
- package/web/blocks/CloudImageEditor/src/svg-sprite.d.ts +2 -0
- package/web/blocks/CloudImageEditor/src/toolbar-constants.d.ts +61 -0
- package/web/blocks/CloudImageEditor/src/types.d.ts +60 -0
- package/web/blocks/CloudImageEditor/src/util.d.ts +2 -0
- package/web/blocks/CloudImageEditor/src/utils/parseFilterValue.d.ts +7 -0
- package/web/blocks/CloudImageEditor/src/utils/parseFilterValue.test.d.ts +1 -0
- package/web/blocks/CloudImageEditorActivity/CloudImageEditorActivity.d.ts +25 -0
- package/web/blocks/Config/Config.d.ts +60 -0
- package/web/blocks/Config/assertions.d.ts +5 -0
- package/web/blocks/Config/computed-properties.d.ts +24 -0
- package/web/blocks/Config/computed-properties.test.d.ts +1 -0
- package/web/blocks/Config/initialConfig.d.ts +6 -0
- package/web/blocks/Config/normalizeConfigValue.d.ts +2 -0
- package/web/blocks/Config/validatorsType.d.ts +18 -0
- package/web/blocks/Copyright/Copyright.d.ts +10 -0
- package/web/blocks/DropArea/DropArea.d.ts +47 -0
- package/web/blocks/DropArea/addDropzone.d.ts +17 -0
- package/web/blocks/DropArea/getDropItems.d.ts +12 -0
- package/web/blocks/ExternalSource/ExternalSource.d.ts +45 -0
- package/web/blocks/ExternalSource/MessageBridge.d.ts +11 -0
- package/web/blocks/ExternalSource/buildThemeDefinition.d.ts +4 -0
- package/web/blocks/ExternalSource/query-string.d.ts +1 -0
- package/web/blocks/ExternalSource/types.d.ts +105 -0
- package/web/blocks/FileItem/FileItem.d.ts +50 -0
- package/web/blocks/FileItem/FileItemConfig.d.ts +10 -0
- package/web/blocks/FormInput/FormInput.d.ts +18 -0
- package/web/blocks/Icon/Icon.d.ts +19 -0
- package/web/blocks/Img/Img.d.ts +14 -0
- package/web/blocks/Img/ImgBase.d.ts +29 -0
- package/web/blocks/Img/ImgConfig.d.ts +28 -0
- package/web/blocks/Img/configurations.d.ts +11 -0
- package/web/blocks/Img/props-map.d.ts +28 -0
- package/web/blocks/Img/utils/parseObjectToString.d.ts +2 -0
- package/web/blocks/Modal/Modal.d.ts +34 -0
- package/web/blocks/PluginActivityRenderer/PluginActivityRenderer.d.ts +32 -0
- package/web/blocks/PluginActivityRenderer/index.d.ts +1 -0
- package/web/blocks/ProgressBar/ProgressBar.d.ts +21 -0
- package/web/blocks/ProgressBarCommon/ProgressBarCommon.d.ts +17 -0
- package/web/blocks/Select/Select.d.ts +18 -0
- package/web/blocks/SimpleBtn/SimpleBtn.d.ts +15 -0
- package/web/blocks/SourceBtn/SourceBtn.d.ts +23 -0
- package/web/blocks/SourceList/SourceList.d.ts +24 -0
- package/web/blocks/Spinner/Spinner.d.ts +9 -0
- package/web/blocks/StartFrom/StartFrom.d.ts +12 -0
- package/web/blocks/Thumb/Thumb.d.ts +35 -0
- package/web/blocks/UploadCtxProvider/EventEmitter.d.ts +70 -0
- package/web/blocks/UploadCtxProvider/UploadCtxProvider.d.ts +44 -0
- package/web/blocks/UploadList/UploadList.d.ts +39 -0
- package/web/blocks/UrlSource/UrlSource.d.ts +14 -0
- package/web/blocks/svg-backgrounds/svg-backgrounds.d.ts +3 -0
- package/web/blocks/themes/uc-basic/svg-sprite.d.ts +2 -0
- package/web/cameraPlugin-DeedXMWV.js +8 -0
- package/web/cameraPlugin-Duy1QwjB.js +8 -0
- package/web/cameraPlugin-QS9SUOtO.js +8 -0
- package/web/cameraPlugin-bq8ggY04.js +8 -0
- package/web/cameraPlugin-cel9YgP_.js +8 -0
- package/web/cloud-image-editor-8DrVRZ7E.js +12 -0
- package/web/cloud-image-editor-BX50EK1U.js +12 -0
- package/web/cloud-image-editor-DSW3oWq-.js +12 -0
- package/web/cloud-image-editor-DuI2Lx4M.js +12 -0
- package/web/cloudImageEditorPlugin-5my6aD36.js +8 -0
- package/web/cloudImageEditorPlugin-Bk19DmJv.js +8 -0
- package/web/cloudImageEditorPlugin-CcdnmtBW.js +8 -0
- package/web/cloudImageEditorPlugin-DQJmDl03.js +8 -0
- package/web/cloudImageEditorPlugin-kojghfqw.js +8 -0
- package/web/constants-BCfCF0cJ.js +4025 -0
- package/web/core.d.ts +42 -0
- package/web/env.d.ts +2 -0
- package/web/externalSourcesPlugin-BTeRm5C0.js +8 -0
- package/web/externalSourcesPlugin-BXgVeojg.js +8 -0
- package/web/externalSourcesPlugin-BgLpuIK9.js +8 -0
- package/web/externalSourcesPlugin-DMc9zs4T.js +8 -0
- package/web/externalSourcesPlugin-Dm9vnTBv.js +8 -0
- package/web/file-uploader.iife.min.js +697 -0
- package/web/file-uploader.min.js +1859 -0
- package/web/imageShrinkPlugin-BdHgEGZH.js +8 -0
- package/web/imageShrinkPlugin-BjkMGfvT.js +8 -0
- package/web/imageShrinkPlugin-CCkGHL2w.js +8 -0
- package/web/imageShrinkPlugin-D4WjaRGo.js +8 -0
- package/web/imageShrinkPlugin-DqYGutVx.js +8 -0
- package/web/index.d.ts +42 -0
- package/web/instagramPlugin-BTMz0K2a.js +8 -0
- package/web/instagramPlugin-BbIKgTH7.js +8 -0
- package/web/instagramPlugin-CQQhsEJa.js +8 -0
- package/web/instagramPlugin-Cm7lWKae.js +8 -0
- package/web/instagramPlugin-DcclxM_d.js +8 -0
- package/web/lit/BaseComponent.d.ts +12 -0
- package/web/lit/Constructor.d.ts +1 -0
- package/web/lit/CssDataMixin.d.ts +7 -0
- package/web/lit/LightDomMixin.d.ts +8 -0
- package/web/lit/LitActivityBlock.d.ts +53 -0
- package/web/lit/LitBlock.d.ts +83 -0
- package/web/lit/LitSolutionBlock.d.ts +21 -0
- package/web/lit/LitUploaderBlock.d.ts +53 -0
- package/web/lit/PubSubCompat.d.ts +18 -0
- package/web/lit/RegisterableElementMixin.d.ts +7 -0
- package/web/lit/SharedState.d.ts +119 -0
- package/web/lit/SymbioteCompatMixin.d.ts +40 -0
- package/web/lit/TestModeController.d.ts +16 -0
- package/web/lit/Uid.d.ts +3 -0
- package/web/lit/activity-constants.d.ts +11 -0
- package/web/lit/createDebugPrinter.d.ts +3 -0
- package/web/lit/findBlockInCtx.d.ts +3 -0
- package/web/lit/getOutputData.d.ts +2 -0
- package/web/lit/hasBlockInCtx.d.ts +3 -0
- package/web/lit/l10n.d.ts +5 -0
- package/web/lit/parseCssPropertyValue.d.ts +1 -0
- package/web/lit/shared-instances.d.ts +65 -0
- package/web/locales/file-uploader/ar.d.ts +137 -0
- package/web/locales/file-uploader/az.d.ts +129 -0
- package/web/locales/file-uploader/ca.d.ts +131 -0
- package/web/locales/file-uploader/cs.d.ts +133 -0
- package/web/locales/file-uploader/da.d.ts +129 -0
- package/web/locales/file-uploader/de.d.ts +129 -0
- package/web/locales/file-uploader/el.d.ts +129 -0
- package/web/locales/file-uploader/en.d.ts +129 -0
- package/web/locales/file-uploader/es.d.ts +131 -0
- package/web/locales/file-uploader/et.d.ts +129 -0
- package/web/locales/file-uploader/fi.d.ts +129 -0
- package/web/locales/file-uploader/fr.d.ts +131 -0
- package/web/locales/file-uploader/he.d.ts +131 -0
- package/web/locales/file-uploader/hy.d.ts +129 -0
- package/web/locales/file-uploader/is.d.ts +129 -0
- package/web/locales/file-uploader/it.d.ts +131 -0
- package/web/locales/file-uploader/ja.d.ts +129 -0
- package/web/locales/file-uploader/ka.d.ts +129 -0
- package/web/locales/file-uploader/kk.d.ts +129 -0
- package/web/locales/file-uploader/ko.d.ts +129 -0
- package/web/locales/file-uploader/lv.d.ts +131 -0
- package/web/locales/file-uploader/nb.d.ts +129 -0
- package/web/locales/file-uploader/nl.d.ts +129 -0
- package/web/locales/file-uploader/pl.d.ts +133 -0
- package/web/locales/file-uploader/pt.d.ts +131 -0
- package/web/locales/file-uploader/ro.d.ts +131 -0
- package/web/locales/file-uploader/ru.d.ts +133 -0
- package/web/locales/file-uploader/sk.d.ts +133 -0
- package/web/locales/file-uploader/sr.d.ts +131 -0
- package/web/locales/file-uploader/sv.d.ts +129 -0
- package/web/locales/file-uploader/tr.d.ts +129 -0
- package/web/locales/file-uploader/uk.d.ts +133 -0
- package/web/locales/file-uploader/vi.d.ts +129 -0
- package/web/locales/file-uploader/zh-TW.d.ts +129 -0
- package/web/locales/file-uploader/zh.d.ts +129 -0
- package/web/plugins/cameraPlugin.d.ts +2 -0
- package/web/plugins/cloudImageEditorPlugin.d.ts +2 -0
- package/web/plugins/externalSourcesPlugin.d.ts +2 -0
- package/web/plugins/imageShrinkPlugin.d.ts +2 -0
- package/web/plugins/instagramPlugin.d.ts +2 -0
- package/web/plugins/unsplashPlugin.d.ts +16 -0
- package/web/plugins/urlSourcePlugin.d.ts +2 -0
- package/web/plugins-Bt7FXHKx.js +562 -0
- package/web/plugins-CaaolyMk.js +562 -0
- package/web/plugins-Cjgw5oWg.js +562 -0
- package/web/plugins-CzNtrVQB.js +562 -0
- package/web/plugins-DS0hIs2V.js +563 -0
- package/web/ref-BOnG19ns.js +4040 -0
- package/web/ref-BejJFG7m.js +4040 -0
- package/web/ref-DcRg7zo9.js +4040 -0
- package/web/ref-ZWPcLQB9.js +4040 -0
- package/web/solutions/adaptive-image/index.d.ts +2 -0
- package/web/solutions/cloud-image-editor/CloudImageEditor.d.ts +11 -0
- package/web/solutions/cloud-image-editor/index.d.ts +5 -0
- package/web/solutions/file-uploader/inline/FileUploaderInline.d.ts +20 -0
- package/web/solutions/file-uploader/inline/index.d.ts +1 -0
- package/web/solutions/file-uploader/minimal/FileUploaderMinimal.d.ts +23 -0
- package/web/solutions/file-uploader/minimal/index.d.ts +1 -0
- package/web/solutions/file-uploader/regular/FileUploaderRegular.d.ts +17 -0
- package/web/solutions/file-uploader/regular/index.d.ts +1 -0
- package/web/style-map-BmZdux7T.js +37 -0
- package/web/style-map-CZ6fSV6e.js +37 -0
- package/web/style-map-Dk7mLCrB.js +37 -0
- package/web/style-map-HkHnu9oA.js +37 -0
- package/web/style-map-tw1yUEaj.js +37 -0
- package/web/types/dom.d.ts +1 -0
- package/web/types/events.d.ts +4 -0
- package/web/types/exported.d.ts +492 -0
- package/web/types/index.d.ts +5 -0
- package/web/uc-basic.layered.min.css +6046 -0
- package/web/uc-basic.min.css +5487 -0
- package/web/uc-cloud-image-editor.layered.min.css +1884 -0
- package/web/uc-cloud-image-editor.min.css +1675 -0
- package/web/uc-cloud-image-editor.min.js +457 -0
- package/web/uc-file-uploader-inline.layered.min.css +4352 -0
- package/web/uc-file-uploader-inline.min.css +3836 -0
- package/web/uc-file-uploader-inline.min.js +1859 -0
- package/web/uc-file-uploader-minimal.layered.min.css +4352 -0
- package/web/uc-file-uploader-minimal.min.css +3836 -0
- package/web/uc-file-uploader-minimal.min.js +1859 -0
- package/web/uc-file-uploader-regular.layered.min.css +4352 -0
- package/web/uc-file-uploader-regular.min.css +3836 -0
- package/web/uc-file-uploader-regular.min.js +1859 -0
- package/web/uc-img.min.js +895 -0
- package/web/urlSourcePlugin-9lhcr02f.js +8 -0
- package/web/urlSourcePlugin-C-sLGhGb.js +8 -0
- package/web/urlSourcePlugin-DNXDpnRD.js +8 -0
- package/web/urlSourcePlugin-JnD0cnxb.js +8 -0
- package/web/urlSourcePlugin-hcMU2K6T.js +8 -0
- package/web/utils/UID.d.ts +5 -0
- package/web/utils/UID.test.d.ts +1 -0
- package/web/utils/UploadSource.d.ts +37 -0
- package/web/utils/WindowHeightTracker.d.ts +9 -0
- package/web/utils/abilities.d.ts +1 -0
- package/web/utils/applyStyles.d.ts +1 -0
- package/web/utils/browser-info.d.ts +12 -0
- package/web/utils/browser-info.test.d.ts +1 -0
- package/web/utils/cdn-utils.d.ts +53 -0
- package/web/utils/cdn-utils.test.d.ts +1 -0
- package/web/utils/comma-separated.d.ts +2 -0
- package/web/utils/debounce.d.ts +3 -0
- package/web/utils/delay.d.ts +1 -0
- package/web/utils/fileTypes.d.ts +11 -0
- package/web/utils/fileTypes.test.d.ts +1 -0
- package/web/utils/get-top-level-origin.d.ts +1 -0
- package/web/utils/get-top-level-origin.test.d.ts +1 -0
- package/web/utils/getLocaleDirection.d.ts +1 -0
- package/web/utils/getPluralForm.d.ts +1 -0
- package/web/utils/getPluralForm.test.d.ts +1 -0
- package/web/utils/isPromiseLike.d.ts +1 -0
- package/web/utils/isPromiseLike.test.d.ts +1 -0
- package/web/utils/isSecureTokenExpired.d.ts +8 -0
- package/web/utils/isSecureTokenExpired.test.d.ts +1 -0
- package/web/utils/memoize.d.ts +1 -0
- package/web/utils/memoize.test.d.ts +1 -0
- package/web/utils/mixinClass.d.ts +8 -0
- package/web/utils/parseCdnUrl.d.ts +11 -0
- package/web/utils/parseCdnUrl.test.d.ts +1 -0
- package/web/utils/parseShrink.d.ts +7 -0
- package/web/utils/parseShrink.test.d.ts +1 -0
- package/web/utils/preloadImage.d.ts +10 -0
- package/web/utils/prettyBytes.d.ts +11 -0
- package/web/utils/prettyBytes.test.d.ts +1 -0
- package/web/utils/resizeImage.d.ts +1 -0
- package/web/utils/stringToArray.d.ts +1 -0
- package/web/utils/stringToArray.test.d.ts +1 -0
- package/web/utils/template-utils.d.ts +16 -0
- package/web/utils/template-utils.test.d.ts +1 -0
- package/web/utils/throttle.d.ts +3 -0
- package/web/utils/toKebabCase.d.ts +2 -0
- package/web/utils/toKebabCase.test.d.ts +1 -0
- package/web/utils/transparentPixelSrc.d.ts +1 -0
- package/web/utils/uniqueArray.d.ts +1 -0
- package/web/utils/uniqueArray.test.d.ts +1 -0
- package/web/utils/userAgent.d.ts +2 -0
- package/web/utils/validators/collection/index.d.ts +2 -0
- package/web/utils/validators/collection/validateCollectionUploadError.d.ts +2 -0
- package/web/utils/validators/collection/validateMultiple.d.ts +2 -0
- package/web/utils/validators/file/index.d.ts +4 -0
- package/web/utils/validators/file/validateFileType.d.ts +2 -0
- package/web/utils/validators/file/validateIsImage.d.ts +2 -0
- package/web/utils/validators/file/validateMaxSizeLimit.d.ts +2 -0
- package/web/utils/validators/file/validateUploadError.d.ts +2 -0
- package/web/utils/warnOnce.d.ts +1 -0
- package/web/utils/wildcardRegexp.d.ts +1 -0
- package/web/utils/wildcardRegexp.test.d.ts +1 -0
- package/web/utils/withResolvers.d.ts +5 -0
- package/web/utils/withResolvers.test.d.ts +1 -0
- package/dist/CameraSource-px4BzEMI.js +0 -9
- package/dist/ExternalSource-CR5DG0Jv.js +0 -9
- package/dist/UrlSource-BxVL9Pve.js +0 -9
- package/dist/cameraPlugin-dGash48Q.js +0 -8
- package/dist/cloudImageEditorPlugin-2EU0Pm_j.js +0 -8
- package/dist/env-B1nfXy9i.js +0 -8
- package/dist/externalSourcesPlugin-DKQqk3AC.js +0 -8
- package/dist/imageShrinkPlugin-DAx8eRen.js +0 -8
- package/dist/instagramPlugin-k67tMAo3.js +0 -8
- package/dist/urlSourcePlugin-9xdB7Pvw.js +0 -8
|
@@ -0,0 +1,895 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Package: @uploadcare/file-uploader@1.28.0-alpha.1 (MIT)
|
|
4
|
+
* License: https://github.com/uploadcare/blob/main/LICENSE
|
|
5
|
+
* Built: 2026-03-02T20:26:17.187Z
|
|
6
|
+
*/
|
|
7
|
+
const normalizeCdnOperation = (b) => {
|
|
8
|
+
if (typeof b != "string" || !b) return "";
|
|
9
|
+
let j = b.trim();
|
|
10
|
+
return j.startsWith("-/") ? j = j.slice(2) : j.startsWith("/") && (j = j.slice(1)), j.endsWith("/") && (j = j.slice(0, j.length - 1)), j;
|
|
11
|
+
}, joinCdnOperations = (...j) => j.filter((b) => typeof b == "string" && !!b).map((j) => normalizeCdnOperation(j)).join("/-/"), createCdnUrlModifiers = (...b) => {
|
|
12
|
+
let F = joinCdnOperations(...b);
|
|
13
|
+
return F ? `-/${F}/` : "";
|
|
14
|
+
};
|
|
15
|
+
function extractFilename(b) {
|
|
16
|
+
let j = new URL(b), F = j.pathname + j.search + j.hash, U = F.lastIndexOf("http"), W = F.lastIndexOf("/"), G = "";
|
|
17
|
+
return U >= 0 ? G = F.slice(U) : W >= 0 && (G = F.slice(W + 1)), G;
|
|
18
|
+
}
|
|
19
|
+
function trimFilename(b) {
|
|
20
|
+
let j = new URL(b), F = extractFilename(b), W = isFileUrl(F) ? splitFileUrl(F).pathname : F;
|
|
21
|
+
return j.pathname = j.pathname.replace(W, ""), j.search = "", j.hash = "", j.toString();
|
|
22
|
+
}
|
|
23
|
+
function isFileUrl(b) {
|
|
24
|
+
return b.startsWith("http");
|
|
25
|
+
}
|
|
26
|
+
function splitFileUrl(b) {
|
|
27
|
+
let j = new URL(b);
|
|
28
|
+
return {
|
|
29
|
+
pathname: `${j.origin}${j.pathname ?? ""}`,
|
|
30
|
+
search: j.search ?? "",
|
|
31
|
+
hash: j.hash ?? ""
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
const createCdnUrl = (b, j, F) => {
|
|
35
|
+
let q = new URL(trimFilename(b)), J = F ?? extractFilename(b), Y = j ?? "";
|
|
36
|
+
if (q.pathname.startsWith("//") && (q.pathname = q.pathname.replace("//", "/")), J && isFileUrl(J)) {
|
|
37
|
+
let b = splitFileUrl(J);
|
|
38
|
+
q.pathname = `${q.pathname}${Y}${b.pathname || ""}`, q.search = b.search, q.hash = b.hash;
|
|
39
|
+
} else q.pathname = `${q.pathname}${Y}${J || ""}`;
|
|
40
|
+
return q.toString();
|
|
41
|
+
}, createOriginalUrl = (b, j) => {
|
|
42
|
+
let F = new URL(b);
|
|
43
|
+
return F.pathname = `${j}/`, F.toString();
|
|
44
|
+
}, stringToArray = (b, j = ",") => b.trim().split(j).map((b) => b.trim()).filter((b) => b.length > 0);
|
|
45
|
+
var DEFAULT_TRANSFORMER = (b) => b, OPEN_TOKEN = "{{", CLOSE_TOKEN = "}}";
|
|
46
|
+
function applyTemplateData(b, j = {}, F = {}) {
|
|
47
|
+
let { openToken: U = OPEN_TOKEN, closeToken: W = CLOSE_TOKEN, transform: G = DEFAULT_TRANSFORMER } = F;
|
|
48
|
+
for (let F in j) {
|
|
49
|
+
let K = j[F]?.toString(), q = typeof K == "string" ? G(K) : String(K);
|
|
50
|
+
b = b.replaceAll(U + F + W, q);
|
|
51
|
+
}
|
|
52
|
+
return b;
|
|
53
|
+
}
|
|
54
|
+
const uniqueArray = (b) => [...new Set(b)], CSS_PREF = "--uc-img-", UNRESOLVED_ATTR = "unresolved", DEV_MODE = !window.location.host.trim() || window.location.host.includes(":") || window.location.hostname.includes("localhost"), ImgTypeEnum = Object.freeze({
|
|
55
|
+
PREVIEW: "PREVIEW",
|
|
56
|
+
MAIN: "MAIN"
|
|
57
|
+
});
|
|
58
|
+
/**
|
|
59
|
+
* @license
|
|
60
|
+
* Copyright 2019 Google LLC
|
|
61
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
62
|
+
*/
|
|
63
|
+
var t$1 = globalThis, e$2 = t$1.ShadowRoot && (t$1.ShadyCSS === void 0 || t$1.ShadyCSS.nativeShadow) && "adoptedStyleSheets" in Document.prototype && "replace" in CSSStyleSheet.prototype, s$2 = Symbol(), o$3 = /* @__PURE__ */ new WeakMap(), n$2 = class {
|
|
64
|
+
constructor(b, j, F) {
|
|
65
|
+
if (this._$cssResult$ = !0, F !== s$2) throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");
|
|
66
|
+
this.cssText = b, this.t = j;
|
|
67
|
+
}
|
|
68
|
+
get styleSheet() {
|
|
69
|
+
let b = this.o, j = this.t;
|
|
70
|
+
if (e$2 && b === void 0) {
|
|
71
|
+
let F = j !== void 0 && j.length === 1;
|
|
72
|
+
F && (b = o$3.get(j)), b === void 0 && ((this.o = b = new CSSStyleSheet()).replaceSync(this.cssText), F && o$3.set(j, b));
|
|
73
|
+
}
|
|
74
|
+
return b;
|
|
75
|
+
}
|
|
76
|
+
toString() {
|
|
77
|
+
return this.cssText;
|
|
78
|
+
}
|
|
79
|
+
}, r$2 = (b) => new n$2(typeof b == "string" ? b : b + "", void 0, s$2), S$1 = (b, j) => {
|
|
80
|
+
if (e$2) b.adoptedStyleSheets = j.map((b) => b instanceof CSSStyleSheet ? b : b.styleSheet);
|
|
81
|
+
else for (let F of j) {
|
|
82
|
+
let j = document.createElement("style"), U = t$1.litNonce;
|
|
83
|
+
U !== void 0 && j.setAttribute("nonce", U), j.textContent = F.cssText, b.appendChild(j);
|
|
84
|
+
}
|
|
85
|
+
}, c$1 = e$2 ? (b) => b : (b) => b instanceof CSSStyleSheet ? ((b) => {
|
|
86
|
+
let j = "";
|
|
87
|
+
for (let F of b.cssRules) j += F.cssText;
|
|
88
|
+
return r$2(j);
|
|
89
|
+
})(b) : b, { is: i$2, defineProperty: e$1, getOwnPropertyDescriptor: h$1, getOwnPropertyNames: r$1, getOwnPropertySymbols: o$2, getPrototypeOf: n$1 } = Object, a$1 = globalThis, c$2 = a$1.trustedTypes, l$1 = c$2 ? c$2.emptyScript : "", p$1 = a$1.reactiveElementPolyfillSupport, d$1 = (b, j) => b, u$1 = {
|
|
90
|
+
toAttribute(b, j) {
|
|
91
|
+
switch (j) {
|
|
92
|
+
case Boolean:
|
|
93
|
+
b = b ? l$1 : null;
|
|
94
|
+
break;
|
|
95
|
+
case Object:
|
|
96
|
+
case Array: b = b == null ? b : JSON.stringify(b);
|
|
97
|
+
}
|
|
98
|
+
return b;
|
|
99
|
+
},
|
|
100
|
+
fromAttribute(b, j) {
|
|
101
|
+
let F = b;
|
|
102
|
+
switch (j) {
|
|
103
|
+
case Boolean:
|
|
104
|
+
F = b !== null;
|
|
105
|
+
break;
|
|
106
|
+
case Number:
|
|
107
|
+
F = b === null ? null : Number(b);
|
|
108
|
+
break;
|
|
109
|
+
case Object:
|
|
110
|
+
case Array: try {
|
|
111
|
+
F = JSON.parse(b);
|
|
112
|
+
} catch {
|
|
113
|
+
F = null;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
return F;
|
|
117
|
+
}
|
|
118
|
+
}, f$1 = (b, j) => !i$2(b, j), b$1 = {
|
|
119
|
+
attribute: !0,
|
|
120
|
+
type: String,
|
|
121
|
+
converter: u$1,
|
|
122
|
+
reflect: !1,
|
|
123
|
+
useDefault: !1,
|
|
124
|
+
hasChanged: f$1
|
|
125
|
+
};
|
|
126
|
+
Symbol.metadata ??= Symbol("metadata"), a$1.litPropertyMetadata ??= /* @__PURE__ */ new WeakMap();
|
|
127
|
+
var y = class extends HTMLElement {
|
|
128
|
+
static addInitializer(b) {
|
|
129
|
+
this._$Ei(), (this.l ??= []).push(b);
|
|
130
|
+
}
|
|
131
|
+
static get observedAttributes() {
|
|
132
|
+
return this.finalize(), this._$Eh && [...this._$Eh.keys()];
|
|
133
|
+
}
|
|
134
|
+
static createProperty(b, j = b$1) {
|
|
135
|
+
if (j.state && (j.attribute = !1), this._$Ei(), this.prototype.hasOwnProperty(b) && ((j = Object.create(j)).wrapped = !0), this.elementProperties.set(b, j), !j.noAccessor) {
|
|
136
|
+
let F = Symbol(), U = this.getPropertyDescriptor(b, F, j);
|
|
137
|
+
U !== void 0 && e$1(this.prototype, b, U);
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
static getPropertyDescriptor(b, j, F) {
|
|
141
|
+
let { get: U, set: W } = h$1(this.prototype, b) ?? {
|
|
142
|
+
get() {
|
|
143
|
+
return this[j];
|
|
144
|
+
},
|
|
145
|
+
set(b) {
|
|
146
|
+
this[j] = b;
|
|
147
|
+
}
|
|
148
|
+
};
|
|
149
|
+
return {
|
|
150
|
+
get: U,
|
|
151
|
+
set(j) {
|
|
152
|
+
let G = U?.call(this);
|
|
153
|
+
W?.call(this, j), this.requestUpdate(b, G, F);
|
|
154
|
+
},
|
|
155
|
+
configurable: !0,
|
|
156
|
+
enumerable: !0
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
static getPropertyOptions(b) {
|
|
160
|
+
return this.elementProperties.get(b) ?? b$1;
|
|
161
|
+
}
|
|
162
|
+
static _$Ei() {
|
|
163
|
+
if (this.hasOwnProperty(d$1("elementProperties"))) return;
|
|
164
|
+
let b = n$1(this);
|
|
165
|
+
b.finalize(), b.l !== void 0 && (this.l = [...b.l]), this.elementProperties = new Map(b.elementProperties);
|
|
166
|
+
}
|
|
167
|
+
static finalize() {
|
|
168
|
+
if (this.hasOwnProperty(d$1("finalized"))) return;
|
|
169
|
+
if (this.finalized = !0, this._$Ei(), this.hasOwnProperty(d$1("properties"))) {
|
|
170
|
+
let b = this.properties, j = [...r$1(b), ...o$2(b)];
|
|
171
|
+
for (let F of j) this.createProperty(F, b[F]);
|
|
172
|
+
}
|
|
173
|
+
let b = this[Symbol.metadata];
|
|
174
|
+
if (b !== null) {
|
|
175
|
+
let j = litPropertyMetadata.get(b);
|
|
176
|
+
if (j !== void 0) for (let [b, F] of j) this.elementProperties.set(b, F);
|
|
177
|
+
}
|
|
178
|
+
this._$Eh = /* @__PURE__ */ new Map();
|
|
179
|
+
for (let [b, j] of this.elementProperties) {
|
|
180
|
+
let F = this._$Eu(b, j);
|
|
181
|
+
F !== void 0 && this._$Eh.set(F, b);
|
|
182
|
+
}
|
|
183
|
+
this.elementStyles = this.finalizeStyles(this.styles);
|
|
184
|
+
}
|
|
185
|
+
static finalizeStyles(b) {
|
|
186
|
+
let j = [];
|
|
187
|
+
if (Array.isArray(b)) {
|
|
188
|
+
let F = new Set(b.flat(Infinity).reverse());
|
|
189
|
+
for (let b of F) j.unshift(c$1(b));
|
|
190
|
+
} else b !== void 0 && j.push(c$1(b));
|
|
191
|
+
return j;
|
|
192
|
+
}
|
|
193
|
+
static _$Eu(b, j) {
|
|
194
|
+
let F = j.attribute;
|
|
195
|
+
return !1 === F ? void 0 : typeof F == "string" ? F : typeof b == "string" ? b.toLowerCase() : void 0;
|
|
196
|
+
}
|
|
197
|
+
constructor() {
|
|
198
|
+
super(), this._$Ep = void 0, this.isUpdatePending = !1, this.hasUpdated = !1, this._$Em = null, this._$Ev();
|
|
199
|
+
}
|
|
200
|
+
_$Ev() {
|
|
201
|
+
this._$ES = new Promise((b) => this.enableUpdating = b), this._$AL = /* @__PURE__ */ new Map(), this._$E_(), this.requestUpdate(), this.constructor.l?.forEach((b) => b(this));
|
|
202
|
+
}
|
|
203
|
+
addController(b) {
|
|
204
|
+
(this._$EO ??= /* @__PURE__ */ new Set()).add(b), this.renderRoot !== void 0 && this.isConnected && b.hostConnected?.();
|
|
205
|
+
}
|
|
206
|
+
removeController(b) {
|
|
207
|
+
this._$EO?.delete(b);
|
|
208
|
+
}
|
|
209
|
+
_$E_() {
|
|
210
|
+
let b = /* @__PURE__ */ new Map(), j = this.constructor.elementProperties;
|
|
211
|
+
for (let F of j.keys()) this.hasOwnProperty(F) && (b.set(F, this[F]), delete this[F]);
|
|
212
|
+
b.size > 0 && (this._$Ep = b);
|
|
213
|
+
}
|
|
214
|
+
createRenderRoot() {
|
|
215
|
+
let b = this.shadowRoot ?? this.attachShadow(this.constructor.shadowRootOptions);
|
|
216
|
+
return S$1(b, this.constructor.elementStyles), b;
|
|
217
|
+
}
|
|
218
|
+
connectedCallback() {
|
|
219
|
+
this.renderRoot ??= this.createRenderRoot(), this.enableUpdating(!0), this._$EO?.forEach((b) => b.hostConnected?.());
|
|
220
|
+
}
|
|
221
|
+
enableUpdating(b) {}
|
|
222
|
+
disconnectedCallback() {
|
|
223
|
+
this._$EO?.forEach((b) => b.hostDisconnected?.());
|
|
224
|
+
}
|
|
225
|
+
attributeChangedCallback(b, j, F) {
|
|
226
|
+
this._$AK(b, F);
|
|
227
|
+
}
|
|
228
|
+
_$ET(b, j) {
|
|
229
|
+
let F = this.constructor.elementProperties.get(b), U = this.constructor._$Eu(b, F);
|
|
230
|
+
if (U !== void 0 && !0 === F.reflect) {
|
|
231
|
+
let W = (F.converter?.toAttribute === void 0 ? u$1 : F.converter).toAttribute(j, F.type);
|
|
232
|
+
this._$Em = b, W == null ? this.removeAttribute(U) : this.setAttribute(U, W), this._$Em = null;
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
_$AK(b, j) {
|
|
236
|
+
let F = this.constructor, U = F._$Eh.get(b);
|
|
237
|
+
if (U !== void 0 && this._$Em !== U) {
|
|
238
|
+
let b = F.getPropertyOptions(U), W = typeof b.converter == "function" ? { fromAttribute: b.converter } : b.converter?.fromAttribute === void 0 ? u$1 : b.converter;
|
|
239
|
+
this._$Em = U;
|
|
240
|
+
let G = W.fromAttribute(j, b.type);
|
|
241
|
+
this[U] = G ?? this._$Ej?.get(U) ?? G, this._$Em = null;
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
requestUpdate(b, j, F, U = !1, W) {
|
|
245
|
+
if (b !== void 0) {
|
|
246
|
+
let G = this.constructor;
|
|
247
|
+
if (!1 === U && (W = this[b]), F ??= G.getPropertyOptions(b), !((F.hasChanged ?? f$1)(W, j) || F.useDefault && F.reflect && W === this._$Ej?.get(b) && !this.hasAttribute(G._$Eu(b, F)))) return;
|
|
248
|
+
this.C(b, j, F);
|
|
249
|
+
}
|
|
250
|
+
!1 === this.isUpdatePending && (this._$ES = this._$EP());
|
|
251
|
+
}
|
|
252
|
+
C(b, j, { useDefault: F, reflect: U, wrapped: W }, G) {
|
|
253
|
+
F && !(this._$Ej ??= /* @__PURE__ */ new Map()).has(b) && (this._$Ej.set(b, G ?? j ?? this[b]), !0 !== W || G !== void 0) || (this._$AL.has(b) || (this.hasUpdated || F || (j = void 0), this._$AL.set(b, j)), !0 === U && this._$Em !== b && (this._$Eq ??= /* @__PURE__ */ new Set()).add(b));
|
|
254
|
+
}
|
|
255
|
+
async _$EP() {
|
|
256
|
+
this.isUpdatePending = !0;
|
|
257
|
+
try {
|
|
258
|
+
await this._$ES;
|
|
259
|
+
} catch (b) {
|
|
260
|
+
Promise.reject(b);
|
|
261
|
+
}
|
|
262
|
+
let b = this.scheduleUpdate();
|
|
263
|
+
return b != null && await b, !this.isUpdatePending;
|
|
264
|
+
}
|
|
265
|
+
scheduleUpdate() {
|
|
266
|
+
return this.performUpdate();
|
|
267
|
+
}
|
|
268
|
+
performUpdate() {
|
|
269
|
+
if (!this.isUpdatePending) return;
|
|
270
|
+
if (!this.hasUpdated) {
|
|
271
|
+
if (this.renderRoot ??= this.createRenderRoot(), this._$Ep) {
|
|
272
|
+
for (let [b, j] of this._$Ep) this[b] = j;
|
|
273
|
+
this._$Ep = void 0;
|
|
274
|
+
}
|
|
275
|
+
let b = this.constructor.elementProperties;
|
|
276
|
+
if (b.size > 0) for (let [j, F] of b) {
|
|
277
|
+
let { wrapped: b } = F, U = this[j];
|
|
278
|
+
!0 !== b || this._$AL.has(j) || U === void 0 || this.C(j, void 0, F, U);
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
let b = !1, j = this._$AL;
|
|
282
|
+
try {
|
|
283
|
+
b = this.shouldUpdate(j), b ? (this.willUpdate(j), this._$EO?.forEach((b) => b.hostUpdate?.()), this.update(j)) : this._$EM();
|
|
284
|
+
} catch (j) {
|
|
285
|
+
throw b = !1, this._$EM(), j;
|
|
286
|
+
}
|
|
287
|
+
b && this._$AE(j);
|
|
288
|
+
}
|
|
289
|
+
willUpdate(b) {}
|
|
290
|
+
_$AE(b) {
|
|
291
|
+
this._$EO?.forEach((b) => b.hostUpdated?.()), this.hasUpdated || (this.hasUpdated = !0, this.firstUpdated(b)), this.updated(b);
|
|
292
|
+
}
|
|
293
|
+
_$EM() {
|
|
294
|
+
this._$AL = /* @__PURE__ */ new Map(), this.isUpdatePending = !1;
|
|
295
|
+
}
|
|
296
|
+
get updateComplete() {
|
|
297
|
+
return this.getUpdateComplete();
|
|
298
|
+
}
|
|
299
|
+
getUpdateComplete() {
|
|
300
|
+
return this._$ES;
|
|
301
|
+
}
|
|
302
|
+
shouldUpdate(b) {
|
|
303
|
+
return !0;
|
|
304
|
+
}
|
|
305
|
+
update(b) {
|
|
306
|
+
this._$Eq &&= this._$Eq.forEach((b) => this._$ET(b, this[b])), this._$EM();
|
|
307
|
+
}
|
|
308
|
+
updated(b) {}
|
|
309
|
+
firstUpdated(b) {}
|
|
310
|
+
};
|
|
311
|
+
y.elementStyles = [], y.shadowRootOptions = { mode: "open" }, y[d$1("elementProperties")] = /* @__PURE__ */ new Map(), y[d$1("finalized")] = /* @__PURE__ */ new Map(), p$1?.({ ReactiveElement: y }), (a$1.reactiveElementVersions ??= []).push("2.1.2");
|
|
312
|
+
/**
|
|
313
|
+
* @license
|
|
314
|
+
* Copyright 2017 Google LLC
|
|
315
|
+
* SPDX-License-Identifier: BSD-3-Clause
|
|
316
|
+
*/
|
|
317
|
+
var t = globalThis, i$1 = (b) => b, s$1 = t.trustedTypes, e = s$1 ? s$1.createPolicy("lit-html", { createHTML: (b) => b }) : void 0, h = "$lit$", o$1 = `lit$${Math.random().toFixed(9).slice(2)}$`, n = "?" + o$1, r = `<${n}>`, l = document, c = () => l.createComment(""), a = (b) => b === null || typeof b != "object" && typeof b != "function", u = Array.isArray, d = (b) => u(b) || typeof b?.[Symbol.iterator] == "function", f = "[ \n\f\r]", v = /<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g, _ = /-->/g, m = />/g, p = RegExp(`>|${f}(?:([^\\s"'>=/]+)(${f}*=${f}*(?:[^ \t\n\f\r"'\`<>=]|("|')|))|$)`, "g"), g = /'/g, $ = /"/g, y$1 = /^(?:script|style|textarea|title)$/i, E = Symbol.for("lit-noChange"), A = Symbol.for("lit-nothing"), C = /* @__PURE__ */ new WeakMap(), P = l.createTreeWalker(l, 129);
|
|
318
|
+
function V(b, j) {
|
|
319
|
+
if (!u(b) || !b.hasOwnProperty("raw")) throw Error("invalid template strings array");
|
|
320
|
+
return e === void 0 ? j : e.createHTML(j);
|
|
321
|
+
}
|
|
322
|
+
var N = (b, j) => {
|
|
323
|
+
let F = b.length - 1, U = [], W, G = j === 2 ? "<svg>" : j === 3 ? "<math>" : "", K = v;
|
|
324
|
+
for (let j = 0; j < F; j++) {
|
|
325
|
+
let F = b[j], q, J, Y = -1, X = 0;
|
|
326
|
+
for (; X < F.length && (K.lastIndex = X, J = K.exec(F), J !== null);) X = K.lastIndex, K === v ? J[1] === "!--" ? K = _ : J[1] === void 0 ? J[2] === void 0 ? J[3] !== void 0 && (K = p) : (y$1.test(J[2]) && (W = RegExp("</" + J[2], "g")), K = p) : K = m : K === p ? J[0] === ">" ? (K = W ?? v, Y = -1) : J[1] === void 0 ? Y = -2 : (Y = K.lastIndex - J[2].length, q = J[1], K = J[3] === void 0 ? p : J[3] === "\"" ? $ : g) : K === $ || K === g ? K = p : K === _ || K === m ? K = v : (K = p, W = void 0);
|
|
327
|
+
let Q = K === p && b[j + 1].startsWith("/>") ? " " : "";
|
|
328
|
+
G += K === v ? F + r : Y >= 0 ? (U.push(q), F.slice(0, Y) + h + F.slice(Y) + o$1 + Q) : F + o$1 + (Y === -2 ? j : Q);
|
|
329
|
+
}
|
|
330
|
+
return [V(b, G + (b[F] || "<?>") + (j === 2 ? "</svg>" : j === 3 ? "</math>" : "")), U];
|
|
331
|
+
}, S = class b {
|
|
332
|
+
constructor({ strings: j, _$litType$: F }, U) {
|
|
333
|
+
let W;
|
|
334
|
+
this.parts = [];
|
|
335
|
+
let G = 0, K = 0, q = j.length - 1, J = this.parts, [Y, X] = N(j, F);
|
|
336
|
+
if (this.el = b.createElement(Y, U), P.currentNode = this.el.content, F === 2 || F === 3) {
|
|
337
|
+
let b = this.el.content.firstChild;
|
|
338
|
+
b.replaceWith(...b.childNodes);
|
|
339
|
+
}
|
|
340
|
+
for (; (W = P.nextNode()) !== null && J.length < q;) {
|
|
341
|
+
if (W.nodeType === 1) {
|
|
342
|
+
if (W.hasAttributes()) for (let b of W.getAttributeNames()) if (b.endsWith(h)) {
|
|
343
|
+
let j = X[K++], F = W.getAttribute(b).split(o$1), U = /([.?@])?(.*)/.exec(j);
|
|
344
|
+
J.push({
|
|
345
|
+
type: 1,
|
|
346
|
+
index: G,
|
|
347
|
+
name: U[2],
|
|
348
|
+
strings: F,
|
|
349
|
+
ctor: U[1] === "." ? I : U[1] === "?" ? L : U[1] === "@" ? z : H
|
|
350
|
+
}), W.removeAttribute(b);
|
|
351
|
+
} else b.startsWith(o$1) && (J.push({
|
|
352
|
+
type: 6,
|
|
353
|
+
index: G
|
|
354
|
+
}), W.removeAttribute(b));
|
|
355
|
+
if (y$1.test(W.tagName)) {
|
|
356
|
+
let b = W.textContent.split(o$1), j = b.length - 1;
|
|
357
|
+
if (j > 0) {
|
|
358
|
+
W.textContent = s$1 ? s$1.emptyScript : "";
|
|
359
|
+
for (let F = 0; F < j; F++) W.append(b[F], c()), P.nextNode(), J.push({
|
|
360
|
+
type: 2,
|
|
361
|
+
index: ++G
|
|
362
|
+
});
|
|
363
|
+
W.append(b[j], c());
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
} else if (W.nodeType === 8) if (W.data === n) J.push({
|
|
367
|
+
type: 2,
|
|
368
|
+
index: G
|
|
369
|
+
});
|
|
370
|
+
else {
|
|
371
|
+
let b = -1;
|
|
372
|
+
for (; (b = W.data.indexOf(o$1, b + 1)) !== -1;) J.push({
|
|
373
|
+
type: 7,
|
|
374
|
+
index: G
|
|
375
|
+
}), b += o$1.length - 1;
|
|
376
|
+
}
|
|
377
|
+
G++;
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
static createElement(b, j) {
|
|
381
|
+
let F = l.createElement("template");
|
|
382
|
+
return F.innerHTML = b, F;
|
|
383
|
+
}
|
|
384
|
+
};
|
|
385
|
+
function M(b, j, F = b, U) {
|
|
386
|
+
if (j === E) return j;
|
|
387
|
+
let W = U === void 0 ? F._$Cl : F._$Co?.[U], G = a(j) ? void 0 : j._$litDirective$;
|
|
388
|
+
return W?.constructor !== G && (W?._$AO?.(!1), G === void 0 ? W = void 0 : (W = new G(b), W._$AT(b, F, U)), U === void 0 ? F._$Cl = W : (F._$Co ??= [])[U] = W), W !== void 0 && (j = M(b, W._$AS(b, j.values), W, U)), j;
|
|
389
|
+
}
|
|
390
|
+
var R = class {
|
|
391
|
+
constructor(b, j) {
|
|
392
|
+
this._$AV = [], this._$AN = void 0, this._$AD = b, this._$AM = j;
|
|
393
|
+
}
|
|
394
|
+
get parentNode() {
|
|
395
|
+
return this._$AM.parentNode;
|
|
396
|
+
}
|
|
397
|
+
get _$AU() {
|
|
398
|
+
return this._$AM._$AU;
|
|
399
|
+
}
|
|
400
|
+
u(b) {
|
|
401
|
+
let { el: { content: j }, parts: F } = this._$AD, U = (b?.creationScope ?? l).importNode(j, !0);
|
|
402
|
+
P.currentNode = U;
|
|
403
|
+
let W = P.nextNode(), G = 0, K = 0, q = F[0];
|
|
404
|
+
for (; q !== void 0;) {
|
|
405
|
+
if (G === q.index) {
|
|
406
|
+
let j;
|
|
407
|
+
q.type === 2 ? j = new k(W, W.nextSibling, this, b) : q.type === 1 ? j = new q.ctor(W, q.name, q.strings, this, b) : q.type === 6 && (j = new Z(W, this, b)), this._$AV.push(j), q = F[++K];
|
|
408
|
+
}
|
|
409
|
+
G !== q?.index && (W = P.nextNode(), G++);
|
|
410
|
+
}
|
|
411
|
+
return P.currentNode = l, U;
|
|
412
|
+
}
|
|
413
|
+
p(b) {
|
|
414
|
+
let j = 0;
|
|
415
|
+
for (let F of this._$AV) F !== void 0 && (F.strings === void 0 ? F._$AI(b[j]) : (F._$AI(b, F, j), j += F.strings.length - 2)), j++;
|
|
416
|
+
}
|
|
417
|
+
}, k = class b {
|
|
418
|
+
get _$AU() {
|
|
419
|
+
return this._$AM?._$AU ?? this._$Cv;
|
|
420
|
+
}
|
|
421
|
+
constructor(b, j, F, U) {
|
|
422
|
+
this.type = 2, this._$AH = A, this._$AN = void 0, this._$AA = b, this._$AB = j, this._$AM = F, this.options = U, this._$Cv = U?.isConnected ?? !0;
|
|
423
|
+
}
|
|
424
|
+
get parentNode() {
|
|
425
|
+
let b = this._$AA.parentNode, j = this._$AM;
|
|
426
|
+
return j !== void 0 && b?.nodeType === 11 && (b = j.parentNode), b;
|
|
427
|
+
}
|
|
428
|
+
get startNode() {
|
|
429
|
+
return this._$AA;
|
|
430
|
+
}
|
|
431
|
+
get endNode() {
|
|
432
|
+
return this._$AB;
|
|
433
|
+
}
|
|
434
|
+
_$AI(b, j = this) {
|
|
435
|
+
b = M(this, b, j), a(b) ? b === A || b == null || b === "" ? (this._$AH !== A && this._$AR(), this._$AH = A) : b !== this._$AH && b !== E && this._(b) : b._$litType$ === void 0 ? b.nodeType === void 0 ? d(b) ? this.k(b) : this._(b) : this.T(b) : this.$(b);
|
|
436
|
+
}
|
|
437
|
+
O(b) {
|
|
438
|
+
return this._$AA.parentNode.insertBefore(b, this._$AB);
|
|
439
|
+
}
|
|
440
|
+
T(b) {
|
|
441
|
+
this._$AH !== b && (this._$AR(), this._$AH = this.O(b));
|
|
442
|
+
}
|
|
443
|
+
_(b) {
|
|
444
|
+
this._$AH !== A && a(this._$AH) ? this._$AA.nextSibling.data = b : this.T(l.createTextNode(b)), this._$AH = b;
|
|
445
|
+
}
|
|
446
|
+
$(b) {
|
|
447
|
+
let { values: j, _$litType$: F } = b, U = typeof F == "number" ? this._$AC(b) : (F.el === void 0 && (F.el = S.createElement(V(F.h, F.h[0]), this.options)), F);
|
|
448
|
+
if (this._$AH?._$AD === U) this._$AH.p(j);
|
|
449
|
+
else {
|
|
450
|
+
let b = new R(U, this), F = b.u(this.options);
|
|
451
|
+
b.p(j), this.T(F), this._$AH = b;
|
|
452
|
+
}
|
|
453
|
+
}
|
|
454
|
+
_$AC(b) {
|
|
455
|
+
let j = C.get(b.strings);
|
|
456
|
+
return j === void 0 && C.set(b.strings, j = new S(b)), j;
|
|
457
|
+
}
|
|
458
|
+
k(j) {
|
|
459
|
+
u(this._$AH) || (this._$AH = [], this._$AR());
|
|
460
|
+
let F = this._$AH, U, W = 0;
|
|
461
|
+
for (let G of j) W === F.length ? F.push(U = new b(this.O(c()), this.O(c()), this, this.options)) : U = F[W], U._$AI(G), W++;
|
|
462
|
+
W < F.length && (this._$AR(U && U._$AB.nextSibling, W), F.length = W);
|
|
463
|
+
}
|
|
464
|
+
_$AR(b = this._$AA.nextSibling, j) {
|
|
465
|
+
for (this._$AP?.(!1, !0, j); b !== this._$AB;) {
|
|
466
|
+
let j = i$1(b).nextSibling;
|
|
467
|
+
i$1(b).remove(), b = j;
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
setConnected(b) {
|
|
471
|
+
this._$AM === void 0 && (this._$Cv = b, this._$AP?.(b));
|
|
472
|
+
}
|
|
473
|
+
}, H = class {
|
|
474
|
+
get tagName() {
|
|
475
|
+
return this.element.tagName;
|
|
476
|
+
}
|
|
477
|
+
get _$AU() {
|
|
478
|
+
return this._$AM._$AU;
|
|
479
|
+
}
|
|
480
|
+
constructor(b, j, F, U, W) {
|
|
481
|
+
this.type = 1, this._$AH = A, this._$AN = void 0, this.element = b, this.name = j, this._$AM = U, this.options = W, F.length > 2 || F[0] !== "" || F[1] !== "" ? (this._$AH = Array(F.length - 1).fill(/* @__PURE__ */ new String()), this.strings = F) : this._$AH = A;
|
|
482
|
+
}
|
|
483
|
+
_$AI(b, j = this, F, U) {
|
|
484
|
+
let W = this.strings, G = !1;
|
|
485
|
+
if (W === void 0) b = M(this, b, j, 0), G = !a(b) || b !== this._$AH && b !== E, G && (this._$AH = b);
|
|
486
|
+
else {
|
|
487
|
+
let U = b, K, q;
|
|
488
|
+
for (b = W[0], K = 0; K < W.length - 1; K++) q = M(this, U[F + K], j, K), q === E && (q = this._$AH[K]), G ||= !a(q) || q !== this._$AH[K], q === A ? b = A : b !== A && (b += (q ?? "") + W[K + 1]), this._$AH[K] = q;
|
|
489
|
+
}
|
|
490
|
+
G && !U && this.j(b);
|
|
491
|
+
}
|
|
492
|
+
j(b) {
|
|
493
|
+
b === A ? this.element.removeAttribute(this.name) : this.element.setAttribute(this.name, b ?? "");
|
|
494
|
+
}
|
|
495
|
+
}, I = class extends H {
|
|
496
|
+
constructor() {
|
|
497
|
+
super(...arguments), this.type = 3;
|
|
498
|
+
}
|
|
499
|
+
j(b) {
|
|
500
|
+
this.element[this.name] = b === A ? void 0 : b;
|
|
501
|
+
}
|
|
502
|
+
}, L = class extends H {
|
|
503
|
+
constructor() {
|
|
504
|
+
super(...arguments), this.type = 4;
|
|
505
|
+
}
|
|
506
|
+
j(b) {
|
|
507
|
+
this.element.toggleAttribute(this.name, !!b && b !== A);
|
|
508
|
+
}
|
|
509
|
+
}, z = class extends H {
|
|
510
|
+
constructor(b, j, F, U, W) {
|
|
511
|
+
super(b, j, F, U, W), this.type = 5;
|
|
512
|
+
}
|
|
513
|
+
_$AI(b, j = this) {
|
|
514
|
+
if ((b = M(this, b, j, 0) ?? A) === E) return;
|
|
515
|
+
let F = this._$AH, U = b === A && F !== A || b.capture !== F.capture || b.once !== F.once || b.passive !== F.passive, W = b !== A && (F === A || U);
|
|
516
|
+
U && this.element.removeEventListener(this.name, this, F), W && this.element.addEventListener(this.name, this, b), this._$AH = b;
|
|
517
|
+
}
|
|
518
|
+
handleEvent(b) {
|
|
519
|
+
typeof this._$AH == "function" ? this._$AH.call(this.options?.host ?? this.element, b) : this._$AH.handleEvent(b);
|
|
520
|
+
}
|
|
521
|
+
}, Z = class {
|
|
522
|
+
constructor(b, j, F) {
|
|
523
|
+
this.element = b, this.type = 6, this._$AN = void 0, this._$AM = j, this.options = F;
|
|
524
|
+
}
|
|
525
|
+
get _$AU() {
|
|
526
|
+
return this._$AM._$AU;
|
|
527
|
+
}
|
|
528
|
+
_$AI(b) {
|
|
529
|
+
M(this, b);
|
|
530
|
+
}
|
|
531
|
+
}, B = t.litHtmlPolyfillSupport;
|
|
532
|
+
B?.(S, k), (t.litHtmlVersions ??= []).push("3.3.2");
|
|
533
|
+
var D = (b, j, F) => {
|
|
534
|
+
let U = F?.renderBefore ?? j, W = U._$litPart$;
|
|
535
|
+
if (W === void 0) {
|
|
536
|
+
let b = F?.renderBefore ?? null;
|
|
537
|
+
U._$litPart$ = W = new k(j.insertBefore(c(), b), b, void 0, F ?? {});
|
|
538
|
+
}
|
|
539
|
+
return W._$AI(b), W;
|
|
540
|
+
}, s = globalThis, i = class extends y {
|
|
541
|
+
constructor() {
|
|
542
|
+
super(...arguments), this.renderOptions = { host: this }, this._$Do = void 0;
|
|
543
|
+
}
|
|
544
|
+
createRenderRoot() {
|
|
545
|
+
let b = super.createRenderRoot();
|
|
546
|
+
return this.renderOptions.renderBefore ??= b.firstChild, b;
|
|
547
|
+
}
|
|
548
|
+
update(b) {
|
|
549
|
+
let j = this.render();
|
|
550
|
+
this.hasUpdated || (this.renderOptions.isConnected = this.isConnected), super.update(b), this._$Do = D(j, this.renderRoot, this.renderOptions);
|
|
551
|
+
}
|
|
552
|
+
connectedCallback() {
|
|
553
|
+
super.connectedCallback(), this._$Do?.setConnected(!0);
|
|
554
|
+
}
|
|
555
|
+
disconnectedCallback() {
|
|
556
|
+
super.disconnectedCallback(), this._$Do?.setConnected(!1);
|
|
557
|
+
}
|
|
558
|
+
render() {
|
|
559
|
+
return E;
|
|
560
|
+
}
|
|
561
|
+
};
|
|
562
|
+
i._$litElement$ = !0, i.finalized = !0, s.litElementHydrateSupport?.({ LitElement: i });
|
|
563
|
+
var o = s.litElementPolyfillSupport;
|
|
564
|
+
o?.({ LitElement: i }), (s.litElementVersions ??= []).push("4.2.2");
|
|
565
|
+
var SINGLE_QUOTE = "'", DOUBLE_QUOTE = "\"", ESCAPED_PATTERN = /\\([0-9a-fA-F]{1,6} ?)/g;
|
|
566
|
+
function hasLeadingTrailingQuotes(b) {
|
|
567
|
+
return b.length < 2 ? !1 : (b[0] === DOUBLE_QUOTE || b[0] === SINGLE_QUOTE) && (b[b.length - 1] === DOUBLE_QUOTE || b[b.length - 1] === SINGLE_QUOTE);
|
|
568
|
+
}
|
|
569
|
+
function trimQuotes(b) {
|
|
570
|
+
let j = b;
|
|
571
|
+
return (j[0] === DOUBLE_QUOTE || j[0] === SINGLE_QUOTE) && (j = j.slice(1)), (j[j.length - 1] === DOUBLE_QUOTE || j[j.length - 1] === SINGLE_QUOTE) && (j = j.slice(0, -1)), j;
|
|
572
|
+
}
|
|
573
|
+
function escapeQuotes(b) {
|
|
574
|
+
let j = "", F = "";
|
|
575
|
+
for (let U = 0; U < b.length; U++) {
|
|
576
|
+
let W = b[U + 1];
|
|
577
|
+
b[U] === "\\" && W === "\"" ? (j += "\\\"", U++) : b[U] === "\"" && F !== "\\" ? j += "\\\"" : j += b[U], F = b[U] ?? "";
|
|
578
|
+
}
|
|
579
|
+
return j;
|
|
580
|
+
}
|
|
581
|
+
function parseCssPropertyValue(b) {
|
|
582
|
+
let j = b;
|
|
583
|
+
hasLeadingTrailingQuotes(b) && (j = trimQuotes(j), j = j.replace(ESCAPED_PATTERN, (b, j) => String.fromCodePoint(parseInt(j.trim(), 16))), j = j.replaceAll("\\\n", "\\n"), j = escapeQuotes(j), j = DOUBLE_QUOTE + j + DOUBLE_QUOTE);
|
|
584
|
+
try {
|
|
585
|
+
return JSON.parse(j);
|
|
586
|
+
} catch {
|
|
587
|
+
return;
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
function CssDataMixin(b) {
|
|
591
|
+
class j extends b {
|
|
592
|
+
constructor(...b) {
|
|
593
|
+
super(...b), this._cssDataCache = null, this._computedStyle = null;
|
|
594
|
+
}
|
|
595
|
+
getCssData(b, j = !1) {
|
|
596
|
+
let F = this._cssDataCache ?? Object.create(null);
|
|
597
|
+
if (!Object.keys(F).includes(b) || !F[b]) {
|
|
598
|
+
this._computedStyle ||= window.getComputedStyle(this);
|
|
599
|
+
let U = this._computedStyle.getPropertyValue(b).trim();
|
|
600
|
+
try {
|
|
601
|
+
F[b] = parseCssPropertyValue(U);
|
|
602
|
+
} catch (U) {
|
|
603
|
+
j || console.warn(`CSS Data error: ${b}`, U), F[b] = null;
|
|
604
|
+
}
|
|
605
|
+
}
|
|
606
|
+
return this._cssDataCache = F, F[b];
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
return j;
|
|
610
|
+
}
|
|
611
|
+
function RegisterableElementMixin(b) {
|
|
612
|
+
class j extends b {
|
|
613
|
+
static reg(b) {
|
|
614
|
+
let j = this, F = window.customElements.get(b);
|
|
615
|
+
if (F) {
|
|
616
|
+
F !== j && console.warn([
|
|
617
|
+
`Element with tag name "${b}" already registered.`,
|
|
618
|
+
`You're trying to override it with another class "${this.name}".`,
|
|
619
|
+
"This is most likely a mistake.",
|
|
620
|
+
"New element will not be registered."
|
|
621
|
+
].join("\n"));
|
|
622
|
+
return;
|
|
623
|
+
}
|
|
624
|
+
window.customElements.define(b, j);
|
|
625
|
+
}
|
|
626
|
+
}
|
|
627
|
+
return j;
|
|
628
|
+
}
|
|
629
|
+
var DEFAULT_CDN_BASE = "https://ucarecdn.com";
|
|
630
|
+
const PROPS_MAP = Object.freeze({
|
|
631
|
+
"dev-mode": {},
|
|
632
|
+
pubkey: {},
|
|
633
|
+
uuid: {},
|
|
634
|
+
src: {},
|
|
635
|
+
lazy: { default: 1 },
|
|
636
|
+
intersection: {},
|
|
637
|
+
breakpoints: {},
|
|
638
|
+
"cdn-cname": { default: DEFAULT_CDN_BASE },
|
|
639
|
+
"proxy-cname": {},
|
|
640
|
+
"secure-delivery-proxy": {},
|
|
641
|
+
"hi-res-support": { default: 1 },
|
|
642
|
+
"ultra-res-support": {},
|
|
643
|
+
format: {},
|
|
644
|
+
"cdn-operations": {},
|
|
645
|
+
progressive: {},
|
|
646
|
+
quality: {},
|
|
647
|
+
"is-background-for": {},
|
|
648
|
+
"is-preview-blur": { default: 1 }
|
|
649
|
+
});
|
|
650
|
+
var ImgConfig = class extends CssDataMixin(RegisterableElementMixin(i)) {
|
|
651
|
+
createRenderRoot() {
|
|
652
|
+
return this;
|
|
653
|
+
}
|
|
654
|
+
constructor() {
|
|
655
|
+
for (let b in super(), this._state = {}, this._subscribers = /* @__PURE__ */ new Map(), this._isnObserver = null, this._observed = null, PROPS_MAP) {
|
|
656
|
+
let j = PROPS_MAP[b];
|
|
657
|
+
this._state[CSS_PREF + b] = j?.default || "";
|
|
658
|
+
}
|
|
659
|
+
}
|
|
660
|
+
$$(b) {
|
|
661
|
+
return this._state[CSS_PREF + b];
|
|
662
|
+
}
|
|
663
|
+
set$$(b) {
|
|
664
|
+
for (let j in b) {
|
|
665
|
+
let F = CSS_PREF + j, U = b[j];
|
|
666
|
+
this._state[F] = U, this._notify(F, U);
|
|
667
|
+
}
|
|
668
|
+
}
|
|
669
|
+
sub$$(b, j) {
|
|
670
|
+
let F = CSS_PREF + b;
|
|
671
|
+
this._subscribers.has(F) || this._subscribers.set(F, /* @__PURE__ */ new Set()), this._subscribers.get(F)?.add(j);
|
|
672
|
+
let U = this._state[F];
|
|
673
|
+
U !== null && U !== "" && j(U);
|
|
674
|
+
}
|
|
675
|
+
_notify(b, j) {
|
|
676
|
+
this._subscribers.has(b) && this._subscribers.get(b)?.forEach((b) => {
|
|
677
|
+
j === null || j === "" || b(j);
|
|
678
|
+
});
|
|
679
|
+
}
|
|
680
|
+
analyticsParams() {
|
|
681
|
+
return "-/@clib/blocks/1.28.0-alpha.1/uc-img/";
|
|
682
|
+
}
|
|
683
|
+
initAttributes(b) {
|
|
684
|
+
Array.from(this.attributes).forEach((j) => {
|
|
685
|
+
let F = j;
|
|
686
|
+
PROPS_MAP[F.name] || b.setAttribute(F.name, F.value);
|
|
687
|
+
});
|
|
688
|
+
}
|
|
689
|
+
initIntersection(b, j) {
|
|
690
|
+
this._isnObserver = new IntersectionObserver((F) => {
|
|
691
|
+
F.forEach((F) => {
|
|
692
|
+
F.isIntersecting && (j(), this._isnObserver?.unobserve(b));
|
|
693
|
+
});
|
|
694
|
+
}, {
|
|
695
|
+
root: null,
|
|
696
|
+
rootMargin: "0px"
|
|
697
|
+
}), this._isnObserver.observe(b), this._observed ||= /* @__PURE__ */ new Set(), this._observed.add(b);
|
|
698
|
+
}
|
|
699
|
+
connectedCallback() {
|
|
700
|
+
super.connectedCallback(), this._initCssProperties();
|
|
701
|
+
}
|
|
702
|
+
_initCssProperties() {
|
|
703
|
+
for (let b in PROPS_MAP) {
|
|
704
|
+
let j = CSS_PREF + b, F = this.getCssData(j, !0);
|
|
705
|
+
F != null && (this._state[j] = F);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
disconnectedCallback() {
|
|
709
|
+
super.disconnectedCallback(), this._isnObserver &&= (this._observed?.forEach((b) => {
|
|
710
|
+
this._isnObserver?.unobserve(b);
|
|
711
|
+
}), null), this._subscribers.clear();
|
|
712
|
+
}
|
|
713
|
+
static get observedAttributes() {
|
|
714
|
+
return Object.keys(PROPS_MAP);
|
|
715
|
+
}
|
|
716
|
+
attributeChangedCallback(b, j, F) {
|
|
717
|
+
window.setTimeout(() => {
|
|
718
|
+
let j = CSS_PREF + b;
|
|
719
|
+
this._state[j] = F, this._notify(j, F);
|
|
720
|
+
});
|
|
721
|
+
}
|
|
722
|
+
};
|
|
723
|
+
const parseObjectToString = (b) => Object.entries(b).filter(([b, j]) => j !== void 0 && j !== "").map(([b, j]) => b === "cdn-operations" || b === "analytics" ? j : `${b}/${j}`);
|
|
724
|
+
var ImgBase = class extends ImgConfig {
|
|
725
|
+
constructor(...b) {
|
|
726
|
+
super(...b), this._img = new Image(), this._imgPreview = new Image();
|
|
727
|
+
}
|
|
728
|
+
_fmtAbs(b) {
|
|
729
|
+
return !b.includes("//") && !DEV_MODE && (b = new URL(b, document.baseURI).href), b;
|
|
730
|
+
}
|
|
731
|
+
_validateSize(b) {
|
|
732
|
+
if (!b) return;
|
|
733
|
+
let j = b, F = j.match(/\d+/)?.[0], U = j.match(/[a-zA-Z]+/)?.[0];
|
|
734
|
+
if (!F || !U) return;
|
|
735
|
+
let W = parseInt(F, 10);
|
|
736
|
+
return Number(W) > 5e3 && this._hasFormatJPG ? 5e3 + U : Number(W) > 3e3 && !this._hasFormatJPG ? 3e3 + U : b;
|
|
737
|
+
}
|
|
738
|
+
_getCdnModifiers(b, j) {
|
|
739
|
+
return createCdnUrlModifiers(...parseObjectToString({
|
|
740
|
+
format: this._getTypedCssValue("format"),
|
|
741
|
+
quality: this._getTypedCssValue("quality"),
|
|
742
|
+
resize: this._validateSize(b),
|
|
743
|
+
blur: j,
|
|
744
|
+
"cdn-operations": this._getTypedCssValue("cdn-operations") ?? void 0,
|
|
745
|
+
analytics: this.analyticsParams()
|
|
746
|
+
}));
|
|
747
|
+
}
|
|
748
|
+
_getTypedCssValue(b) {
|
|
749
|
+
let j = this.$$(b);
|
|
750
|
+
if (j == null || typeof j == "string" || typeof j == "number" || typeof j == "boolean") return j;
|
|
751
|
+
}
|
|
752
|
+
_getUrlBase(b = "", j = "") {
|
|
753
|
+
let F = this.$$("src");
|
|
754
|
+
if (F.startsWith("data:") || F.startsWith("blob:")) return F;
|
|
755
|
+
if (DEV_MODE && F && !F.includes("//")) return this._proxyUrl(F);
|
|
756
|
+
let U = this._getCdnModifiers(b, j), W = this.$$("cdn-cname"), G = W;
|
|
757
|
+
if (F.startsWith(String(W))) return createCdnUrl(F, U);
|
|
758
|
+
let K = this.$$("uuid");
|
|
759
|
+
if (G && K || K) return this._proxyUrl(createCdnUrl(createOriginalUrl(G, K), U));
|
|
760
|
+
let Y = this.$$("proxy-cname");
|
|
761
|
+
if (Y) return this._proxyUrl(createCdnUrl(Y, U, this._fmtAbs(F)));
|
|
762
|
+
let X = this.$$("pubkey");
|
|
763
|
+
if (X) return this._proxyUrl(createCdnUrl(`https://${X}.ucr.io/`, U, this._fmtAbs(F)));
|
|
764
|
+
}
|
|
765
|
+
_proxyUrl(b) {
|
|
766
|
+
let j = this.$$("secure-delivery-proxy");
|
|
767
|
+
return j ? applyTemplateData(j, { previewUrl: b }, { transform: (b) => window.encodeURIComponent(b) }) : b;
|
|
768
|
+
}
|
|
769
|
+
_getElSize(b, j = 1, F = !0) {
|
|
770
|
+
let U = b.getBoundingClientRect(), W = j * Math.round(U.width), G = F ? "" : j * Math.round(U.height);
|
|
771
|
+
return W || G ? `${W || ""}x${G || ""}` : null;
|
|
772
|
+
}
|
|
773
|
+
_setupEventProxy(b) {
|
|
774
|
+
let j = (b) => {
|
|
775
|
+
b.stopPropagation();
|
|
776
|
+
let j = new Event(b.type, b);
|
|
777
|
+
this.dispatchEvent(j);
|
|
778
|
+
};
|
|
779
|
+
for (let F of ["load", "error"]) b.addEventListener(F, j);
|
|
780
|
+
}
|
|
781
|
+
get img() {
|
|
782
|
+
return this._hasPreviewImage || (this._setupConfigForImage({ elNode: this._img }), this.appendChild(this._img)), this._img;
|
|
783
|
+
}
|
|
784
|
+
get _currentImg() {
|
|
785
|
+
return this._hasPreviewImage ? {
|
|
786
|
+
type: ImgTypeEnum.PREVIEW,
|
|
787
|
+
img: this._imgPreview
|
|
788
|
+
} : {
|
|
789
|
+
type: ImgTypeEnum.MAIN,
|
|
790
|
+
img: this.img
|
|
791
|
+
};
|
|
792
|
+
}
|
|
793
|
+
get _hasPreviewImage() {
|
|
794
|
+
return this.$$("is-preview-blur");
|
|
795
|
+
}
|
|
796
|
+
get _bgSelector() {
|
|
797
|
+
return this.$$("is-background-for");
|
|
798
|
+
}
|
|
799
|
+
get _breakpoints() {
|
|
800
|
+
let b = this.$$("breakpoints");
|
|
801
|
+
return b ? uniqueArray(stringToArray(b).map((b) => parseInt(b, 10))) : null;
|
|
802
|
+
}
|
|
803
|
+
get _hasFormatJPG() {
|
|
804
|
+
return this.$$("format").toLowerCase() === "jpeg";
|
|
805
|
+
}
|
|
806
|
+
_renderBg(b) {
|
|
807
|
+
let j = /* @__PURE__ */ new Set();
|
|
808
|
+
j.add(`url("${this._getUrlBase(this._getElSize(b))}") 1x`), this.$$("hi-res-support") && j.add(`url("${this._getUrlBase(this._getElSize(b, 2))}") 2x`), this.$$("ultra-res-support") && j.add(`url("${this._getUrlBase(this._getElSize(b, 3))}") 3x`);
|
|
809
|
+
let F = `image-set(${[...j].join(", ")})`;
|
|
810
|
+
b.style.setProperty("background-image", F), b.style.setProperty("background-image", `-webkit-${F}`);
|
|
811
|
+
}
|
|
812
|
+
_getSrcset() {
|
|
813
|
+
let b = /* @__PURE__ */ new Set();
|
|
814
|
+
return this._breakpoints ? this._breakpoints.forEach((j) => {
|
|
815
|
+
b.add(`${this._getUrlBase(`${j}x`)} ${this._validateSize(`${j}w`)}`), this.$$("hi-res-support") && b.add(`${this._getUrlBase(`${j * 2}x`)} ${this._validateSize(`${j * 2}w`)}`), this.$$("ultra-res-support") && b.add(`${this._getUrlBase(`${j * 3}x`)} ${this._validateSize(`${j * 3}w`)}`);
|
|
816
|
+
}) : (b.add(`${this._getUrlBase(this._getElSize(this._currentImg.img))} 1x`), this.$$("hi-res-support") && b.add(`${this._getUrlBase(this._getElSize(this._currentImg.img, 2))} 2x`), this.$$("ultra-res-support") && b.add(`${this._getUrlBase(this._getElSize(this._currentImg.img, 3))} 3x`)), [...b].join();
|
|
817
|
+
}
|
|
818
|
+
_getSrc() {
|
|
819
|
+
return this._getUrlBase();
|
|
820
|
+
}
|
|
821
|
+
get _srcUrlPreview() {
|
|
822
|
+
return this._getUrlBase("100x", "100");
|
|
823
|
+
}
|
|
824
|
+
_renderBackground() {
|
|
825
|
+
let b = this._bgSelector;
|
|
826
|
+
[...document.querySelectorAll(b)].forEach((b) => {
|
|
827
|
+
this.$$("intersection") ? this.initIntersection(b, () => {
|
|
828
|
+
this._renderBg(b);
|
|
829
|
+
}) : this._renderBg(b);
|
|
830
|
+
});
|
|
831
|
+
}
|
|
832
|
+
_appendURL({ elNode: b, src: j, srcset: F }) {
|
|
833
|
+
j && (b.src = j), F && (b.srcset = F);
|
|
834
|
+
}
|
|
835
|
+
_setupConfigForImage({ elNode: b }) {
|
|
836
|
+
this._setupEventProxy(b), this.initAttributes(b);
|
|
837
|
+
}
|
|
838
|
+
_loaderImage({ src: b, srcset: j, elNode: F }) {
|
|
839
|
+
return new Promise((U, W) => {
|
|
840
|
+
this._setupConfigForImage({ elNode: F }), F.setAttribute(UNRESOLVED_ATTR, ""), F.addEventListener("load", () => {
|
|
841
|
+
F.removeAttribute(UNRESOLVED_ATTR), U(F);
|
|
842
|
+
}), F.addEventListener("error", () => {
|
|
843
|
+
W(!1);
|
|
844
|
+
}), this._appendURL({
|
|
845
|
+
elNode: F,
|
|
846
|
+
src: b,
|
|
847
|
+
srcset: j
|
|
848
|
+
});
|
|
849
|
+
});
|
|
850
|
+
}
|
|
851
|
+
async _renderImage() {
|
|
852
|
+
if (this.$$("intersection")) {
|
|
853
|
+
this._hasPreviewImage && (this._setupConfigForImage({ elNode: this._imgPreview }), this.appendChild(this._imgPreview)), this.initIntersection(this._currentImg.img, async () => {
|
|
854
|
+
this._hasPreviewImage && (this._imgPreview.src = this._srcUrlPreview);
|
|
855
|
+
try {
|
|
856
|
+
await this._loaderImage({
|
|
857
|
+
src: this._getSrc(),
|
|
858
|
+
srcset: this._getSrcset(),
|
|
859
|
+
elNode: this._img
|
|
860
|
+
}), this._hasPreviewImage && await this._imgPreview.remove(), this.appendChild(this._img);
|
|
861
|
+
} catch {
|
|
862
|
+
this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
|
|
863
|
+
}
|
|
864
|
+
});
|
|
865
|
+
return;
|
|
866
|
+
}
|
|
867
|
+
try {
|
|
868
|
+
this._hasPreviewImage && (await this._loaderImage({
|
|
869
|
+
src: this._srcUrlPreview,
|
|
870
|
+
elNode: this._imgPreview
|
|
871
|
+
}), this.appendChild(this._imgPreview)), await this._loaderImage({
|
|
872
|
+
src: this._getSrc(),
|
|
873
|
+
srcset: this._getSrcset(),
|
|
874
|
+
elNode: this._img
|
|
875
|
+
}), this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
|
|
876
|
+
} catch {
|
|
877
|
+
this._hasPreviewImage && await this._imgPreview?.remove(), this.appendChild(this._img);
|
|
878
|
+
}
|
|
879
|
+
}
|
|
880
|
+
init() {
|
|
881
|
+
this._bgSelector ? this._renderBackground() : this._renderImage();
|
|
882
|
+
}
|
|
883
|
+
}, Img = class extends ImgBase {
|
|
884
|
+
connectedCallback() {
|
|
885
|
+
super.connectedCallback(), this.sub$$("src", () => {
|
|
886
|
+
this.init();
|
|
887
|
+
}), this.sub$$("uuid", () => {
|
|
888
|
+
this.init();
|
|
889
|
+
}), this.sub$$("lazy", (b) => {
|
|
890
|
+
!this.$$("is-background-for") && !this.$$("is-preview-blur") && (this.img.loading = b ? "lazy" : "eager");
|
|
891
|
+
});
|
|
892
|
+
}
|
|
893
|
+
};
|
|
894
|
+
Img.reg("uc-img");
|
|
895
|
+
export { Img };
|