@onlive.ai/common-121 0.2.196 → 0.2.199
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/{audi-dark.theme-BV6nbH-T.d.cts → audi-dark.theme-CwD9I0E3.d.cts} +1 -1
- package/{audi-dark.theme-BV6nbH-T.d.ts → audi-dark.theme-CwD9I0E3.d.ts} +1 -1
- package/{audi.theme-BvXRU3Ou.d.cts → audi.theme-UpbZQ49h.d.cts} +1 -1
- package/{audi.theme-BvXRU3Ou.d.ts → audi.theme-UpbZQ49h.d.ts} +1 -1
- package/{australia.theme-CjlA7-5B.d.cts → australia.theme-o9dMWVmn.d.cts} +1 -1
- package/{australia.theme-CjlA7-5B.d.ts → australia.theme-o9dMWVmn.d.ts} +1 -1
- package/{chunk-E4WXYADH.js → chunk-H2PJ6KN6.js} +1 -1
- package/components/asset/asset-modal-portal.cjs +1 -1
- package/components/asset/asset-modal-portal.d.cts +1 -1
- package/components/asset/asset-modal-portal.d.ts +1 -1
- package/components/asset/asset-modal-portal.js +1 -1
- package/components/asset/asset.cjs +27 -27
- package/components/asset/asset.d.cts +2 -1
- package/components/asset/asset.d.ts +2 -1
- package/components/asset/asset.js +25 -25
- package/components/asset/asset.loaders.cjs +1 -1
- package/components/asset/asset.loaders.d.cts +1 -1
- package/components/asset/asset.loaders.d.ts +1 -1
- package/components/asset/asset.loaders.js +1 -1
- package/components/asset/asset.renderer.cjs +33 -33
- package/components/asset/asset.renderer.d.cts +2 -3
- package/components/asset/asset.renderer.d.ts +2 -3
- package/components/asset/asset.renderer.js +25 -25
- package/components/asset/asset.styles.cjs +1 -1
- package/components/asset/asset.styles.d.cts +1 -1
- package/components/asset/asset.styles.d.ts +1 -1
- package/components/asset/asset.styles.js +1 -1
- package/components/asset/asset.types.cjs +1 -1
- package/components/asset/asset.types.d.cts +1 -1
- package/components/asset/asset.types.d.ts +1 -1
- package/components/asset/asset.types.js +1 -1
- package/components/asset/index.cjs +25 -25
- package/components/asset/index.d.cts +1 -1
- package/components/asset/index.d.ts +1 -1
- package/components/asset/index.js +25 -25
- package/components/player/player.cjs +1 -1
- package/components/player/player.d.cts +1 -1
- package/components/player/player.d.ts +1 -1
- package/components/player/player.js +1 -1
- package/components/player/player.styles.cjs +1 -1
- package/components/player/player.styles.d.cts +1 -1
- package/components/player/player.styles.d.ts +1 -1
- package/components/player/player.styles.js +1 -1
- package/components/side-bar/index.cjs +1 -1
- package/components/side-bar/index.d.cts +1 -1
- package/components/side-bar/index.d.ts +1 -1
- package/components/side-bar/index.js +1 -1
- package/components/side-bar/side-bar.cjs +1 -1
- package/components/side-bar/side-bar.d.cts +1 -1
- package/components/side-bar/side-bar.d.ts +1 -1
- package/components/side-bar/side-bar.js +1 -1
- package/components/side-bar/side-bar.styles.cjs +1 -1
- package/components/side-bar/side-bar.styles.d.cts +1 -1
- package/components/side-bar/side-bar.styles.d.ts +1 -1
- package/components/side-bar/side-bar.styles.js +1 -1
- package/components/side-bar/side-bar.types.cjs +1 -1
- package/components/side-bar/side-bar.types.d.cts +1 -1
- package/components/side-bar/side-bar.types.d.ts +1 -1
- package/components/side-bar/side-bar.types.js +1 -1
- package/components/upload/index.cjs +1 -1
- package/components/upload/index.d.cts +1 -1
- package/components/upload/index.d.ts +1 -1
- package/components/upload/index.js +1 -1
- package/components/upload/upload.cjs +1 -1
- package/components/upload/upload.d.cts +1 -1
- package/components/upload/upload.d.ts +1 -1
- package/components/upload/upload.js +1 -1
- package/components/upload/upload.styles.cjs +1 -1
- package/components/upload/upload.styles.d.cts +1 -1
- package/components/upload/upload.styles.d.ts +1 -1
- package/components/upload/upload.styles.js +1 -1
- package/components/upload/upload.types.cjs +1 -1
- package/components/upload/upload.types.d.cts +1 -1
- package/components/upload/upload.types.d.ts +1 -1
- package/components/upload/upload.types.js +1 -1
- package/{cuernavaca.theme-Cd3zhT0c.d.cts → cuernavaca.theme-CoN1RWZa.d.cts} +1 -1
- package/{cuernavaca.theme-Cd3zhT0c.d.ts → cuernavaca.theme-CoN1RWZa.d.ts} +1 -1
- package/{cupra-diagonal.theme-BgpREq9N.d.cts → cupra-diagonal.theme-dpmVg1PK.d.cts} +1 -1
- package/{cupra-diagonal.theme-BgpREq9N.d.ts → cupra-diagonal.theme-dpmVg1PK.d.ts} +1 -1
- package/{cupra-events.theme-BFkiunSz.d.cts → cupra-events.theme-DNLS7KDk.d.cts} +1 -1
- package/{cupra-events.theme-BFkiunSz.d.ts → cupra-events.theme-DNLS7KDk.d.ts} +1 -1
- package/{cupra.theme-BAXjm9Wd.d.cts → cupra.theme-B2ynqc3l.d.cts} +1 -1
- package/{cupra.theme-BAXjm9Wd.d.ts → cupra.theme-B2ynqc3l.d.ts} +1 -1
- package/{germany.theme-BAn-w2Qc.d.cts → germany.theme-D4y6ZZ9P.d.cts} +1 -1
- package/{germany.theme-BAn-w2Qc.d.ts → germany.theme-D4y6ZZ9P.d.ts} +1 -1
- package/{hyundai.theme-X9ehcHXw.d.cts → hyundai.theme-D20gCVHo.d.cts} +1 -1
- package/{hyundai.theme-X9ehcHXw.d.ts → hyundai.theme-D20gCVHo.d.ts} +1 -1
- package/index.cjs +36 -36
- package/index.d.cts +3 -2
- package/index.d.ts +3 -2
- package/index.js +77 -77
- package/{italy.theme-vzHdiHGx.d.cts → italy.theme--pc0L5YH.d.cts} +1 -1
- package/{italy.theme-vzHdiHGx.d.ts → italy.theme--pc0L5YH.d.ts} +1 -1
- package/{magimix.theme-BUlwbPZj.d.cts → magimix.theme-DGN2p61n.d.cts} +1 -1
- package/{magimix.theme-BUlwbPZj.d.ts → magimix.theme-DGN2p61n.d.ts} +1 -1
- package/{media-URPSJZ6N.js → media-I2UT6LCZ.js} +2 -2
- package/{onlive-ai.theme-B7HiJSOy.d.cts → onlive-ai.theme-Csf9HHTX.d.cts} +1 -1
- package/{onlive-ai.theme-B7HiJSOy.d.ts → onlive-ai.theme-Csf9HHTX.d.ts} +1 -1
- package/{onlive.theme-BTbYQRIn.d.cts → onlive.theme-BRD-Zi1_.d.cts} +1 -1
- package/{onlive.theme-BTbYQRIn.d.ts → onlive.theme-BRD-Zi1_.d.ts} +1 -1
- package/package.json +6 -6
- package/react/components/asset/Asset.cjs +1 -1
- package/react/components/asset/Asset.jsx +1 -1
- package/react/components/side-bar/SideBar.cjs +1 -1
- package/react/components/side-bar/SideBar.jsx +1 -1
- package/react/components/upload/Upload.cjs +1 -1
- package/react/components/upload/Upload.jsx +1 -1
- package/{seat-cupra.theme-uj8HusFu.d.cts → seat-cupra.theme-Ba-ZrvD5.d.cts} +1 -1
- package/{seat-cupra.theme-uj8HusFu.d.ts → seat-cupra.theme-Ba-ZrvD5.d.ts} +1 -1
- package/{seat.theme-DE8tCp3R.d.cts → seat.theme-kkb_0PwM.d.cts} +1 -1
- package/{seat.theme-DE8tCp3R.d.ts → seat.theme-kkb_0PwM.d.ts} +1 -1
- package/services/audio.service.cjs +1 -1
- package/services/audio.service.d.cts +1 -1
- package/services/audio.service.d.ts +1 -1
- package/services/audio.service.js +1 -1
- package/services/conversation/conversation.service.cjs +1 -1
- package/services/conversation/conversation.service.d.cts +1 -1
- package/services/conversation/conversation.service.d.ts +1 -1
- package/services/conversation/conversation.service.js +1 -1
- package/services/conversation/conversation.types.cjs +1 -1
- package/services/conversation/conversation.types.d.cts +1 -1
- package/services/conversation/conversation.types.d.ts +1 -1
- package/services/conversation/conversation.types.js +1 -1
- package/services/conversation/index.cjs +1 -1
- package/services/conversation/index.d.cts +1 -1
- package/services/conversation/index.d.ts +1 -1
- package/services/conversation/index.js +1 -1
- package/services/conversation/mock/actor/agent.cjs +1 -1
- package/services/conversation/mock/actor/agent.d.cts +1 -1
- package/services/conversation/mock/actor/agent.d.ts +1 -1
- package/services/conversation/mock/actor/agent.js +1 -1
- package/services/conversation/mock/actor/index.cjs +1 -1
- package/services/conversation/mock/actor/index.d.cts +1 -1
- package/services/conversation/mock/actor/index.d.ts +1 -1
- package/services/conversation/mock/actor/index.js +1 -1
- package/services/conversation/mock/actor/strategies.cjs +1 -1
- package/services/conversation/mock/actor/strategies.d.cts +1 -1
- package/services/conversation/mock/actor/strategies.d.ts +1 -1
- package/services/conversation/mock/actor/strategies.js +1 -1
- package/services/conversation/mock/errors.cjs +1 -1
- package/services/conversation/mock/errors.d.cts +1 -1
- package/services/conversation/mock/errors.d.ts +1 -1
- package/services/conversation/mock/errors.js +1 -1
- package/services/conversation/mock/events.cjs +1 -1
- package/services/conversation/mock/events.d.cts +1 -1
- package/services/conversation/mock/events.d.ts +1 -1
- package/services/conversation/mock/events.js +1 -1
- package/services/conversation/mock/factory.cjs +1 -1
- package/services/conversation/mock/factory.d.cts +1 -1
- package/services/conversation/mock/factory.d.ts +1 -1
- package/services/conversation/mock/factory.js +1 -1
- package/services/conversation/mock/fixtures.cjs +1 -1
- package/services/conversation/mock/fixtures.d.cts +1 -1
- package/services/conversation/mock/fixtures.d.ts +1 -1
- package/services/conversation/mock/fixtures.js +1 -1
- package/services/conversation/mock/generators.cjs +1 -1
- package/services/conversation/mock/generators.d.cts +1 -1
- package/services/conversation/mock/generators.d.ts +1 -1
- package/services/conversation/mock/generators.js +1 -1
- package/services/conversation/mock/index.cjs +1 -1
- package/services/conversation/mock/index.d.cts +1 -1
- package/services/conversation/mock/index.d.ts +1 -1
- package/services/conversation/mock/index.js +1 -1
- package/services/conversation/mock/livekit/index.cjs +1 -1
- package/services/conversation/mock/livekit/index.d.cts +1 -1
- package/services/conversation/mock/livekit/index.d.ts +1 -1
- package/services/conversation/mock/livekit/index.js +1 -1
- package/services/conversation/mock/livekit/local-participant.cjs +1 -1
- package/services/conversation/mock/livekit/local-participant.d.cts +1 -1
- package/services/conversation/mock/livekit/local-participant.d.ts +1 -1
- package/services/conversation/mock/livekit/local-participant.js +1 -1
- package/services/conversation/mock/livekit/participant.cjs +1 -1
- package/services/conversation/mock/livekit/participant.d.cts +1 -1
- package/services/conversation/mock/livekit/participant.d.ts +1 -1
- package/services/conversation/mock/livekit/participant.js +1 -1
- package/services/conversation/mock/livekit/room.cjs +1 -1
- package/services/conversation/mock/livekit/room.d.cts +1 -1
- package/services/conversation/mock/livekit/room.d.ts +1 -1
- package/services/conversation/mock/livekit/room.js +1 -1
- package/services/conversation/mock/livekit/streams.cjs +1 -1
- package/services/conversation/mock/livekit/streams.d.cts +1 -1
- package/services/conversation/mock/livekit/streams.d.ts +1 -1
- package/services/conversation/mock/livekit/streams.js +1 -1
- package/services/conversation/mock/livekit/tracks.cjs +1 -1
- package/services/conversation/mock/livekit/tracks.d.cts +1 -1
- package/services/conversation/mock/livekit/tracks.d.ts +1 -1
- package/services/conversation/mock/livekit/tracks.js +1 -1
- package/services/conversation/mock/media.cjs +1 -1
- package/services/conversation/mock/media.d.cts +1 -1
- package/services/conversation/mock/media.d.ts +1 -1
- package/services/conversation/mock/media.js +1 -1
- package/services/conversation/mock/service.cjs +1 -1
- package/services/conversation/mock/service.d.cts +1 -1
- package/services/conversation/mock/service.d.ts +1 -1
- package/services/conversation/mock/service.js +1 -1
- package/services/conversation/mock/service.test.cjs +1 -1
- package/services/conversation/mock/service.test.d.cts +1 -1
- package/services/conversation/mock/service.test.d.ts +1 -1
- package/services/conversation/mock/service.test.js +1 -1
- package/services/conversation/mock/state.cjs +1 -1
- package/services/conversation/mock/state.d.cts +1 -1
- package/services/conversation/mock/state.d.ts +1 -1
- package/services/conversation/mock/state.js +1 -1
- package/services/conversation/mock/storybook.cjs +1 -1
- package/services/conversation/mock/storybook.d.cts +1 -1
- package/services/conversation/mock/storybook.d.ts +1 -1
- package/services/conversation/mock/storybook.js +1 -1
- package/services/conversation/mock/types.cjs +1 -1
- package/services/conversation/mock/types.d.cts +1 -1
- package/services/conversation/mock/types.d.ts +1 -1
- package/services/conversation/mock/types.js +1 -1
- package/services/deep-link.service.cjs +1 -1
- package/services/deep-link.service.d.cts +1 -1
- package/services/deep-link.service.d.ts +1 -1
- package/services/deep-link.service.js +1 -1
- package/services/faqs/faqs.service.cjs +1 -1
- package/services/faqs/faqs.service.d.cts +1 -1
- package/services/faqs/faqs.service.d.ts +1 -1
- package/services/faqs/faqs.service.js +1 -1
- package/services/faqs/faqs.types.cjs +1 -1
- package/services/faqs/faqs.types.d.cts +1 -1
- package/services/faqs/faqs.types.d.ts +1 -1
- package/services/faqs/faqs.types.js +1 -1
- package/services/faqs/index.cjs +1 -1
- package/services/faqs/index.d.cts +1 -1
- package/services/faqs/index.d.ts +1 -1
- package/services/faqs/index.js +1 -1
- package/services/file/file.service.cjs +1 -1
- package/services/file/file.service.d.cts +1 -1
- package/services/file/file.service.d.ts +1 -1
- package/services/file/file.service.js +1 -1
- package/services/file/file.types.cjs +1 -1
- package/services/file/file.types.d.cts +1 -1
- package/services/file/file.types.d.ts +1 -1
- package/services/file/file.types.js +1 -1
- package/services/file/index.cjs +1 -1
- package/services/file/index.d.cts +1 -1
- package/services/file/index.d.ts +1 -1
- package/services/file/index.js +1 -1
- package/services/firebase/firebase-api.cjs +1 -1
- package/services/firebase/firebase-api.d.cts +1 -1
- package/services/firebase/firebase-api.d.ts +1 -1
- package/services/firebase/firebase-api.js +1 -1
- package/services/multimedia/config.example.cjs +1 -1
- package/services/multimedia/config.example.d.cts +1 -1
- package/services/multimedia/config.example.d.ts +1 -1
- package/services/multimedia/config.example.js +1 -1
- package/services/multimedia/index.cjs +1 -1
- package/services/multimedia/index.d.cts +1 -1
- package/services/multimedia/index.d.ts +1 -1
- package/services/multimedia/index.js +1 -1
- package/services/multimedia/multimedia.service.cjs +1 -1
- package/services/multimedia/multimedia.service.d.cts +1 -1
- package/services/multimedia/multimedia.service.d.ts +1 -1
- package/services/multimedia/multimedia.service.js +1 -1
- package/services/multimedia/multimedia.types.cjs +1 -1
- package/services/multimedia/multimedia.types.d.cts +1 -1
- package/services/multimedia/multimedia.types.d.ts +1 -1
- package/services/multimedia/multimedia.types.js +1 -1
- package/services/product/index.cjs +1 -1
- package/services/product/index.d.cts +1 -1
- package/services/product/index.d.ts +1 -1
- package/services/product/index.js +1 -1
- package/services/product/product.service.cjs +1 -1
- package/services/product/product.service.d.cts +1 -1
- package/services/product/product.service.d.ts +1 -1
- package/services/product/product.service.js +1 -1
- package/services/product/product.types.cjs +1 -1
- package/services/product/product.types.d.cts +1 -1
- package/services/product/product.types.d.ts +1 -1
- package/services/product/product.types.js +1 -1
- package/services/request.provider.cjs +1 -1
- package/services/request.provider.d.cts +1 -1
- package/services/request.provider.d.ts +1 -1
- package/services/request.provider.js +1 -1
- package/services/session.service.cjs +1 -1
- package/services/session.service.d.cts +1 -1
- package/services/session.service.d.ts +1 -1
- package/services/session.service.js +1 -1
- package/services/upload/index.cjs +1 -1
- package/services/upload/index.d.cts +1 -1
- package/services/upload/index.d.ts +1 -1
- package/services/upload/index.js +1 -1
- package/services/upload/upload.service.cjs +1 -1
- package/services/upload/upload.service.d.cts +1 -1
- package/services/upload/upload.service.d.ts +1 -1
- package/services/upload/upload.service.js +1 -1
- package/themes/custom/audi-dark.theme.cjs +1 -1
- package/themes/custom/audi-dark.theme.d.cts +2 -2
- package/themes/custom/audi-dark.theme.d.ts +2 -2
- package/themes/custom/audi-dark.theme.js +1 -1
- package/themes/custom/audi.theme.cjs +1 -1
- package/themes/custom/audi.theme.d.cts +2 -2
- package/themes/custom/audi.theme.d.ts +2 -2
- package/themes/custom/audi.theme.js +1 -1
- package/themes/custom/australia.theme.cjs +1 -1
- package/themes/custom/australia.theme.d.cts +2 -2
- package/themes/custom/australia.theme.d.ts +2 -2
- package/themes/custom/australia.theme.js +1 -1
- package/themes/custom/cuernavaca.theme.cjs +1 -1
- package/themes/custom/cuernavaca.theme.d.cts +2 -2
- package/themes/custom/cuernavaca.theme.d.ts +2 -2
- package/themes/custom/cuernavaca.theme.js +1 -1
- package/themes/custom/cupra-diagonal.theme.cjs +9 -6
- package/themes/custom/cupra-diagonal.theme.css +7 -4
- package/themes/custom/cupra-diagonal.theme.d.cts +2 -2
- package/themes/custom/cupra-diagonal.theme.d.ts +2 -2
- package/themes/custom/cupra-diagonal.theme.js +8 -5
- package/themes/custom/cupra-events.theme.cjs +1 -1
- package/themes/custom/cupra-events.theme.d.cts +2 -2
- package/themes/custom/cupra-events.theme.d.ts +2 -2
- package/themes/custom/cupra-events.theme.js +1 -1
- package/themes/custom/cupra.theme.cjs +1 -1
- package/themes/custom/cupra.theme.d.cts +2 -2
- package/themes/custom/cupra.theme.d.ts +2 -2
- package/themes/custom/cupra.theme.js +1 -1
- package/themes/custom/germany.theme.cjs +1 -1
- package/themes/custom/germany.theme.d.cts +2 -2
- package/themes/custom/germany.theme.d.ts +2 -2
- package/themes/custom/germany.theme.js +1 -1
- package/themes/custom/glass.theme.cjs +880 -0
- package/themes/custom/glass.theme.css +877 -0
- package/themes/custom/glass.theme.d.cts +6 -0
- package/themes/custom/glass.theme.d.ts +6 -0
- package/themes/custom/glass.theme.js +880 -0
- package/themes/custom/hyundai.theme.cjs +1 -1
- package/themes/custom/hyundai.theme.d.cts +2 -2
- package/themes/custom/hyundai.theme.d.ts +2 -2
- package/themes/custom/hyundai.theme.js +1 -1
- package/themes/custom/italy.theme.cjs +1 -1
- package/themes/custom/italy.theme.d.cts +2 -2
- package/themes/custom/italy.theme.d.ts +2 -2
- package/themes/custom/italy.theme.js +1 -1
- package/themes/custom/magimix.theme.cjs +1 -1
- package/themes/custom/magimix.theme.d.cts +2 -2
- package/themes/custom/magimix.theme.d.ts +2 -2
- package/themes/custom/magimix.theme.js +1 -1
- package/themes/custom/onlive-ai.theme.cjs +1 -1
- package/themes/custom/onlive-ai.theme.d.cts +2 -2
- package/themes/custom/onlive-ai.theme.d.ts +2 -2
- package/themes/custom/onlive-ai.theme.js +1 -1
- package/themes/custom/onlive.theme.cjs +1 -1
- package/themes/custom/onlive.theme.d.cts +2 -2
- package/themes/custom/onlive.theme.d.ts +2 -2
- package/themes/custom/onlive.theme.js +1 -1
- package/themes/custom/seat-cupra.theme.cjs +1 -1
- package/themes/custom/seat-cupra.theme.d.cts +2 -2
- package/themes/custom/seat-cupra.theme.d.ts +2 -2
- package/themes/custom/seat-cupra.theme.js +1 -1
- package/themes/custom/seat.theme.cjs +8 -5
- package/themes/custom/seat.theme.css +7 -4
- package/themes/custom/seat.theme.d.cts +2 -2
- package/themes/custom/seat.theme.d.ts +2 -2
- package/themes/custom/seat.theme.js +8 -5
- package/themes/custom/transparency.theme.cjs +3 -3
- package/themes/custom/transparency.theme.css +2 -2
- package/themes/custom/transparency.theme.d.cts +2 -2
- package/themes/custom/transparency.theme.d.ts +2 -2
- package/themes/custom/transparency.theme.js +3 -3
- package/themes/dark.cjs +1 -1
- package/themes/dark.d.cts +1 -1
- package/themes/dark.d.ts +1 -1
- package/themes/dark.js +1 -1
- package/themes/light.cjs +1 -1
- package/themes/light.d.cts +1 -1
- package/themes/light.d.ts +1 -1
- package/themes/light.js +1 -1
- package/{transparency.theme-ClBpR42X.d.cts → transparency.theme-CJ3Sg9kh.d.cts} +1 -1
- package/{transparency.theme-ClBpR42X.d.ts → transparency.theme-CJ3Sg9kh.d.ts} +1 -1
- package/types/deep-link.types.cjs +1 -1
- package/types/deep-link.types.d.cts +1 -1
- package/types/deep-link.types.d.ts +1 -1
- package/types/deep-link.types.js +1 -1
- package/types/globals.cjs +1 -1
- package/types/globals.d.cts +1 -1
- package/types/globals.d.ts +1 -1
- package/types/globals.js +1 -1
- package/types/tracking-options.cjs +2 -2
- package/types/tracking-options.d.cts +5 -1
- package/types/tracking-options.d.ts +5 -1
- package/types/tracking-options.js +1 -1
- package/utils/adopt-styles.cjs +1 -1
- package/utils/adopt-styles.d.cts +1 -1
- package/utils/adopt-styles.d.ts +1 -1
- package/utils/adopt-styles.js +1 -1
- package/utils/apply-optional-styles.cjs +34 -28
- package/utils/apply-optional-styles.d.cts +20 -22
- package/utils/apply-optional-styles.d.ts +20 -22
- package/utils/apply-optional-styles.js +34 -28
- package/utils/browser-preferences.cjs +1 -1
- package/utils/browser-preferences.d.cts +1 -1
- package/utils/browser-preferences.d.ts +1 -1
- package/utils/browser-preferences.js +1 -1
- package/utils/classify-media.cjs +1 -1
- package/utils/classify-media.d.cts +1 -1
- package/utils/classify-media.d.ts +1 -1
- package/utils/classify-media.js +1 -1
- package/utils/decorators.cjs +1 -1
- package/utils/decorators.d.cts +1 -1
- package/utils/decorators.d.ts +1 -1
- package/utils/decorators.js +1 -1
- package/utils/detected-lang.cjs +1 -1
- package/utils/detected-lang.d.cts +1 -1
- package/utils/detected-lang.d.ts +1 -1
- package/utils/detected-lang.js +1 -1
- package/utils/fullscreen.cjs +1 -1
- package/utils/fullscreen.d.cts +1 -1
- package/utils/fullscreen.d.ts +1 -1
- package/utils/fullscreen.js +1 -1
- package/utils/insert-script.cjs +1 -1
- package/utils/insert-script.d.cts +1 -1
- package/utils/insert-script.d.ts +1 -1
- package/utils/insert-script.js +1 -1
- package/utils/is-map-compatible.cjs +1 -1
- package/utils/is-map-compatible.d.cts +1 -1
- package/utils/is-map-compatible.d.ts +1 -1
- package/utils/is-map-compatible.js +1 -1
- package/utils/markdown.cjs +1 -1
- package/utils/markdown.d.cts +1 -1
- package/utils/markdown.d.ts +1 -1
- package/utils/markdown.js +1 -1
- package/utils/merge.cjs +1 -1
- package/utils/merge.d.cts +1 -1
- package/utils/merge.d.ts +1 -1
- package/utils/merge.js +1 -1
- package/utils/multiband-track-volume.cjs +1 -1
- package/utils/multiband-track-volume.d.cts +1 -1
- package/utils/multiband-track-volume.d.ts +1 -1
- package/utils/multiband-track-volume.js +1 -1
- package/utils/onlive-url-params.cjs +1 -1
- package/utils/onlive-url-params.d.cts +1 -1
- package/utils/onlive-url-params.d.ts +1 -1
- package/utils/onlive-url-params.js +1 -1
- package/utils/pretty-distance.cjs +1 -1
- package/utils/pretty-distance.d.cts +1 -1
- package/utils/pretty-distance.d.ts +1 -1
- package/utils/pretty-distance.js +1 -1
- package/utils/pretty-time.cjs +1 -1
- package/utils/pretty-time.d.cts +1 -1
- package/utils/pretty-time.d.ts +1 -1
- package/utils/pretty-time.js +1 -1
- package/utils/random-string.cjs +1 -1
- package/utils/random-string.d.cts +1 -1
- package/utils/random-string.d.ts +1 -1
- package/utils/random-string.js +1 -1
- package/utils/resource-type.cjs +1 -1
- package/utils/resource-type.d.cts +1 -1
- package/utils/resource-type.d.ts +1 -1
- package/utils/resource-type.js +1 -1
- package/utils/round-number.cjs +1 -1
- package/utils/round-number.d.cts +1 -1
- package/utils/round-number.d.ts +1 -1
- package/utils/round-number.js +1 -1
- package/utils/safe-html.cjs +1 -1
- package/utils/safe-html.d.cts +1 -1
- package/utils/safe-html.d.ts +1 -1
- package/utils/safe-html.js +1 -1
- package/utils/sanitize.cjs +1 -1
- package/utils/sanitize.d.cts +1 -1
- package/utils/sanitize.d.ts +1 -1
- package/utils/sanitize.js +1 -1
- package/utils/spread.cjs +1 -1
- package/utils/spread.d.cts +1 -1
- package/utils/spread.d.ts +1 -1
- package/utils/spread.js +1 -1
- package/utils/watch.cjs +1 -1
- package/utils/watch.d.cts +1 -1
- package/utils/watch.d.ts +1 -1
- package/utils/watch.js +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
2
|
-
var U=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var c=(a,e,t,o)=>{for(var s=o>1?void 0:o?L(e,t):e,l=a.length-1,n;l>=0;l--)(n=a[l])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&U(e,t,s),s};import{html as z,LitElement as te}from"lit";import{property as P,state as j}from"lit/decorators.js";import{classMap as oe}from"lit/directives/class-map.js";var V=(a,e)=>(customElements.get(a)?console.debug(`Custom element <${a}> is already defined, skipping definition of ${e.name}.`):window.customElements.define(a,e),e),D=(a,e)=>{let{kind:t,elements:o}=e;return{kind:t,elements:o,finisher(s){customElements.get(a)||window.customElements.define(a,s)}}},y=a=>e=>typeof e=="function"?V(a,e):D(a,e);var x=class a{constructor(e){this.config=e}static initialize(e){return new a(e)}getBaseUrl(){return`${this.config.baseUrl}`}getHeaders(){return{"Content-Type":"application/json"}}async makeRequest(e,t={}){let o=`${this.getBaseUrl()}${e}`,s=await fetch(o,{...t,headers:{...this.getHeaders(),...t.headers}});if(!s.ok)throw new Error(`FAQs API error: ${s.status} ${s.statusText}`);return s.json()}async getSettingsByOrganization(e,t){try{let o=new URLSearchParams;t&&o.append("userGroupId",t);let s=o.toString(),l=`${this.getBaseUrl()}/settings/organization/${e}${s?`?${s}`:""}`,n=await fetch(l,{method:"GET",headers:this.getHeaders(),credentials:"include"});if(n.status===404)return null;if(!n.ok)throw new Error(`Failed to fetch settings: ${n.statusText}`);return await n.json()}catch(o){return console.error("Error fetching settings:",o),null}}async getFaqs(e={}){let t=new URLSearchParams;if(e.search&&t.append("search",e.search),e.organizationId&&t.append("organizationId",e.organizationId),e.groupId&&t.append("groupId",e.groupId),e.isActive!==void 0&&t.append("isActive",e.isActive.toString()),e.page&&t.append("page",e.page.toString()),e.limit&&t.append("limit",e.limit.toString()),e.sortBy&&t.append("sortBy",e.sortBy),e.sortOrder&&t.append("sortOrder",e.sortOrder),e.extraFilters){for(let[l,n]of Object.entries(e.extraFilters))if(n&&(Array.isArray(n)?n.length>0:n.toString().trim()!=="")){let d=Array.isArray(n)?n.join(","):n.toString();t.append(`extra_${l}`,d)}}let o=t.toString(),s=`/faqs${o?`?${o}`:""}`;return this.makeRequest(s)}async getFaqById(e){return this.makeRequest(`/faqs/${e}`,{})}};var g=async(a,e)=>{let t=await fetch(a,e);if(!t.ok){let o=await t.json().catch(()=>({}));throw new Error(JSON.stringify({status:t.status,statusText:t.statusText,...o}))}return t&&t.json()};var w=class a{constructor(e){this.config=e,this.enableUpload=e.enableUpload||!1}static getInstance(e){if(!a.instance&&e&&(a.instance=new a(e)),!a.instance)throw new Error("FileService must be initialized with config first");return a.instance}static initialize(e){return a.instance=new a(e),a.instance}async uploadFile(e,t={}){try{let o=await this.requestSignedUrl({filename:e.name,description:t.description,loadDirection:"up",bucketType:t.bucketType||"conversations",path:t.path||".temp",mimeType:e.type});return await this.uploadToSignedUrl(o.data.signedUrlData.signedUrl,e),{success:!0,id:o.data.file.id,name:o.data.file.name,url:o.data.file.url,type:o.data.file.type}}catch(o){return console.error("Error uploading file:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error"}}}async requestSignedUrl(e){let t=`${this.config.baseUrl}/files/upload-url`;return this.makeRequest(t,{method:"POST",body:JSON.stringify(e)})}async uploadToSignedUrl(e,t){let o=await fetch(e,{method:"PUT",body:t,headers:{"Content-Type":t.type}});if(!o.ok){let s=await o.text().catch(()=>"No response");throw new Error(`Upload failed with status: ${o.status}. Response: ${s}`)}}async uploadFileWithRetry(e,t={}){let o=t.maxRetries||3,s=null;for(let l=1;l<=o;l++)try{let n=await this.uploadFile(e,t);if(n.success)return n;throw new Error(n.error||"Upload failed")}catch(n){if(s=n instanceof Error?n:new Error("Unknown error"),l===o)break;let d=2**l*1e3;await new Promise(r=>setTimeout(r,d))}return{success:!1,error:s?.message||"Upload failed after retries"}}async getFileById(e){let t=`${this.config.baseUrl}/files/${e}`,o=await this.makeRequest(t);if(!o.success)throw new Error("Failed to get file");return o.data}async makeRequest(e,t){let o={"Content-Type":"application/json"};return this.config.organizationId&&(o["X-Onlive-Organization-Id"]=this.config.organizationId),t?.headers&&Object.assign(o,t.headers),g(e,{...t,headers:o})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var _=class a{constructor(e){this.config=e}static getInstance(e){if(!a.instance&&e&&(a.instance=new a(e)),!a.instance)throw new Error("MultimediaService must be initialized with config first");return a.instance}static initialize(e){return a.instance=new a(e),a.instance}async getImages(e={}){let t=new URLSearchParams({type:"image",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getVideos(e={}){let t=new URLSearchParams({type:"video",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getPresentations(e={}){let t=new URLSearchParams({type:"presentation",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getAllMultimedia(e={}){let[t,o,s]=await Promise.all([this.getImages(e),this.getVideos(e),this.getPresentations(e)]);return{images:t,videos:o,presentations:s}}async getMultimediaByToken(e){let t=`${this.config.baseUrl}/multimedia/secure-token/${e}`;return this.makeRequest(t,!1)}async searchMultimedia(e,t){let o={search:e,page:1,limit:50,includeSecureToken:!0};if(t)return this.getMultimediaByType(t,o);let[s,l,n]=await Promise.all([this.getImages(o),this.getVideos(o),this.getPresentations(o)]),d=[...s.items,...l.items,...n.items];return{items:d,total:d.length,count:d.length,currentPage:1,totalPages:1}}async getMultimediaByType(e,t){switch(e){case"image":return this.getImages(t);case"video":return this.getVideos(t);case"presentation":return this.getPresentations(t);default:throw new Error(`Invalid multimedia type: ${e}`)}}appendExtraFilters(e,t){if(t){for(let[o,s]of Object.entries(t))if(s&&(Array.isArray(s)?s.length>0:s.toString().trim()!=="")){let l=Array.isArray(s)?s.join(","):s.toString();e.append(`extra_${o}`,l)}}}async makeRequest(e,t=!0){let o={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return g(e,{method:"GET",headers:o,credentials:t?"include":void 0})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var h=class a{constructor(e){this.config=e}static getInstance(e){if(!a.instance&&e&&(a.instance=new a(e)),!a.instance)throw new Error("ProductService must be initialized with config first");return a.instance}static initialize(e){return a.instance=new a(e),a.instance}async getProducts(e={}){let t=new URLSearchParams({...e.title&&{title:e.title},...e.search&&{search:e.search},...e.category&&{category:e.category},...e.tags&&{tags:e.tags.join(",")},...e.sortBy&&{sortBy:e.sortBy},...e.sortOrder&&{sortOrder:e.sortOrder},...e.minPrice&&{minPrice:e.minPrice.toString()},...e.maxPrice&&{maxPrice:e.maxPrice.toString()},...e.inStock!==void 0&&{inStock:e.inStock.toString()},...e.offset&&{offset:e.offset.toString()},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});e.extraFields&&Object.keys(e.extraFields).length>0&&t.append("extraFields",JSON.stringify(e.extraFields));let o=`${this.config.baseUrl}/products?${t}`;return this.makeRequest(o,!0)}async getProductByToken(e){let t=`${this.config.baseUrl}/products/secure-token/${e}`;return this.makeRequest(t)}async searchProducts(e,t={}){return this.getProducts({...t,search:e})}async makeRequest(e,t=!1){let o={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return g(e,{method:"GET",headers:o,credentials:t?"include":"same-origin"})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var A=class{constructor(e){e?.multimediaService&&(this.multimediaService=_.initialize(e.multimediaService)),e?.faqsService&&(this.faqsService=x.initialize(e.faqsService)),e?.productService&&(this.productService=h.initialize(e.productService)),e?.fileService&&(this.fileService=w.initialize(e.fileService))}async loadAsset(e,t){switch(e){case"multimedia":return this.loadMultimediaAsset(t);case"product":return this.loadProductAsset(t);case"faq":return this.loadFaqAsset(t);case"file":return this.loadFileAsset(t);default:throw new Error(`Unsupported asset type: ${e}`)}}async loadMultimediaAsset(e){if(!this.multimediaService)throw new Error("MultimediaService not configured");let t=await this.multimediaService.getMultimediaByToken(e);if(!t)throw new Error("Multimedia not found");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:t.animatedCoverUrl||t.url,type:"multimedia",externalId:t.id,format:t.format,size:t.size||void 0,duration:t.duration||void 0,vodUrl:t.vodUrl||void 0,slides:t.slides||[],labels:t.labels,animatedCoverUrl:t.animatedCoverUrl||void 0,metadata:{organizationId:t.organizationId,status:t.status,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadProductAsset(e){if(!this.productService)throw new Error("MultimediaService not configured");let t=await this.productService.getProductByToken(e);if(!t)throw new Error("Product not found");return{id:t.id,name:t.name,description:t.description,url:t.url,thumbnail:t.images?.[0],type:"product",externalId:t.externalId,price:t.price,currency:t.currency,category:t.category,tags:t.tags,images:t.images,variants:t.variants?.map(o=>({id:o.id,externalId:o.externalId,price:o.price,currency:o.currency,images:o.images})),options:t.options,metadata:{providerType:t.providerType,providerId:t.providerId,discountType:t.discountType,discount:t.discount,stock:t.stock,broken:t.broken}}}async loadFaqAsset(e){if(!this.faqsService)throw new Error("FaqsService not configured");let t=await this.faqsService.getFaqById(e);return{id:t.id,name:t.question,description:t.answer,url:`#faq-${t.id}`,type:"faq",externalId:t.id,question:t.question,answer:t.answer,priority:t.priority,isActive:t.isActive,metadata:{organizationId:t.organizationId,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadFileAsset(e){if(!this.fileService)throw new Error("FileService not configured");let t=await this.fileService.getFileById(e),o=t.type||"",s=o.startsWith("video/"),l=o.startsWith("image/");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:l?t.url:void 0,type:"file",externalId:t.id,format:o,size:t.metadata?.size,duration:void 0,vodUrl:s?t.url:void 0,labels:[],animatedCoverUrl:s?t.url:void 0,metadata:{path:t.metadata?.path,bucketType:t.metadata?.bucketType,loadDirection:t.metadata?.loadDirection,createdAt:t.createdAt,updatedAt:t.updatedAt}}}};import{html as i}from"lit";import{classMap as Z}from"lit/directives/class-map.js";import{ifDefined as b}from"lit/directives/if-defined.js";import{when as m}from"lit/directives/when.js";import{unsafeHTML as Y}from"lit/directives/unsafe-html.js";import F from"dompurify";var B={ALLOWED_TAGS:["p","br","span","b","strong","i","em","u","s","del","ul","ol","li","code","pre","a","h1","h2","h3","h4","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","target","rel","title","aria-label","role","colspan","rowspan"],FORCE_HTTPS:!0,ALLOW_DATA_ATTR:!1};F.addHook("afterSanitizeAttributes",a=>{"target"in a&&a.target==="_blank"&&a.setAttribute("rel","noopener noreferrer")});var q=(a,e=B)=>F.sanitize(a,e);function C(a=""){return Y(H(a))}function H(a=""){return q(a,{ADD_ATTR:["target","rel"],ADD_TAGS:["ol-"],CUSTOM_ELEMENT_HANDLING:{tagNameCheck:/^ol-/,attributeNameCheck:null,allowCustomizedBuiltInElements:!0}})}import"@onlive.ai/ui/dist/components/button/button.js";import"@onlive.ai/ui/dist/components/icon/icon.js";import{html as E,LitElement as G}from"lit";import{property as Q,query as K}from"lit/decorators.js";import{repeat as X}from"lit/directives/repeat.js";import W from"video.js";import{css as J,unsafeCSS as O}from"lit";import N from"video.js/dist/video-js.min.css?inline";var R=J`
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.199 | © 2026 Onlive.ai */
|
|
2
|
+
var U=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var d=(a,e,t,o)=>{for(var s=o>1?void 0:o?L(e,t):e,l=a.length-1,n;l>=0;l--)(n=a[l])&&(s=(o?n(e,t,s):n(s))||s);return o&&s&&U(e,t,s),s};import{html as z,LitElement as te}from"lit";import{property as P,state as j}from"lit/decorators.js";import{classMap as oe}from"lit/directives/class-map.js";var D=(a,e)=>(customElements.get(a)?console.debug(`Custom element <${a}> is already defined, skipping definition of ${e.name}.`):window.customElements.define(a,e),e),V=(a,e)=>{let{kind:t,elements:o}=e;return{kind:t,elements:o,finisher(s){customElements.get(a)||window.customElements.define(a,s)}}},y=a=>e=>typeof e=="function"?D(a,e):V(a,e);var x=class a{constructor(e){this.config=e}static initialize(e){return new a(e)}getBaseUrl(){return`${this.config.baseUrl}`}getHeaders(){return{"Content-Type":"application/json"}}async makeRequest(e,t={}){let o=`${this.getBaseUrl()}${e}`,s=await fetch(o,{...t,headers:{...this.getHeaders(),...t.headers}});if(!s.ok)throw new Error(`FAQs API error: ${s.status} ${s.statusText}`);return s.json()}async getSettingsByOrganization(e,t){try{let o=new URLSearchParams;t&&o.append("userGroupId",t);let s=o.toString(),l=`${this.getBaseUrl()}/settings/organization/${e}${s?`?${s}`:""}`,n=await fetch(l,{method:"GET",headers:this.getHeaders(),credentials:"include"});if(n.status===404)return null;if(!n.ok)throw new Error(`Failed to fetch settings: ${n.statusText}`);return await n.json()}catch(o){return console.error("Error fetching settings:",o),null}}async getFaqs(e={}){let t=new URLSearchParams;if(e.search&&t.append("search",e.search),e.organizationId&&t.append("organizationId",e.organizationId),e.groupId&&t.append("groupId",e.groupId),e.isActive!==void 0&&t.append("isActive",e.isActive.toString()),e.page&&t.append("page",e.page.toString()),e.limit&&t.append("limit",e.limit.toString()),e.sortBy&&t.append("sortBy",e.sortBy),e.sortOrder&&t.append("sortOrder",e.sortOrder),e.extraFilters){for(let[l,n]of Object.entries(e.extraFilters))if(n&&(Array.isArray(n)?n.length>0:n.toString().trim()!=="")){let v=Array.isArray(n)?n.join(","):n.toString();t.append(`extra_${l}`,v)}}let o=t.toString(),s=`/faqs${o?`?${o}`:""}`;return this.makeRequest(s)}async getFaqById(e){return this.makeRequest(`/faqs/${e}`,{})}};var g=async(a,e)=>{let t=await fetch(a,e);if(!t.ok){let o=await t.json().catch(()=>({}));throw new Error(JSON.stringify({status:t.status,statusText:t.statusText,...o}))}return t&&t.json()};var w=class a{constructor(e){this.config=e,this.enableUpload=e.enableUpload||!1}static getInstance(e){if(!a.instance&&e&&(a.instance=new a(e)),!a.instance)throw new Error("FileService must be initialized with config first");return a.instance}static initialize(e){return a.instance=new a(e),a.instance}async uploadFile(e,t={}){try{let o=await this.requestSignedUrl({filename:e.name,description:t.description,loadDirection:"up",bucketType:t.bucketType||"conversations",path:t.path||".temp",mimeType:e.type});return await this.uploadToSignedUrl(o.data.signedUrlData.signedUrl,e),{success:!0,id:o.data.file.id,name:o.data.file.name,url:o.data.file.url,type:o.data.file.type}}catch(o){return console.error("Error uploading file:",o),{success:!1,error:o instanceof Error?o.message:"Unknown error"}}}async requestSignedUrl(e){let t=`${this.config.baseUrl}/files/upload-url`;return this.makeRequest(t,{method:"POST",body:JSON.stringify(e)})}async uploadToSignedUrl(e,t){let o=await fetch(e,{method:"PUT",body:t,headers:{"Content-Type":t.type}});if(!o.ok){let s=await o.text().catch(()=>"No response");throw new Error(`Upload failed with status: ${o.status}. Response: ${s}`)}}async uploadFileWithRetry(e,t={}){let o=t.maxRetries||3,s=null;for(let l=1;l<=o;l++)try{let n=await this.uploadFile(e,t);if(n.success)return n;throw new Error(n.error||"Upload failed")}catch(n){if(s=n instanceof Error?n:new Error("Unknown error"),l===o)break;let v=2**l*1e3;await new Promise(r=>setTimeout(r,v))}return{success:!1,error:s?.message||"Upload failed after retries"}}async getFileById(e){let t=`${this.config.baseUrl}/files/${e}`,o=await this.makeRequest(t);if(!o.success)throw new Error("Failed to get file");return o.data}async makeRequest(e,t){let o={"Content-Type":"application/json"};return this.config.organizationId&&(o["X-Onlive-Organization-Id"]=this.config.organizationId),t?.headers&&Object.assign(o,t.headers),g(e,{...t,headers:o})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var _=class a{constructor(e){this.config=e}static getInstance(e){if(!a.instance&&e&&(a.instance=new a(e)),!a.instance)throw new Error("MultimediaService must be initialized with config first");return a.instance}static initialize(e){return a.instance=new a(e),a.instance}async getImages(e={}){let t=new URLSearchParams({type:"image",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getVideos(e={}){let t=new URLSearchParams({type:"video",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getPresentations(e={}){let t=new URLSearchParams({type:"presentation",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let o=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(o)}async getAllMultimedia(e={}){let[t,o,s]=await Promise.all([this.getImages(e),this.getVideos(e),this.getPresentations(e)]);return{images:t,videos:o,presentations:s}}async getMultimediaByToken(e){let t=`${this.config.baseUrl}/multimedia/secure-token/${e}`;return this.makeRequest(t,!1)}async searchMultimedia(e,t){let o={search:e,page:1,limit:50,includeSecureToken:!0};if(t)return this.getMultimediaByType(t,o);let[s,l,n]=await Promise.all([this.getImages(o),this.getVideos(o),this.getPresentations(o)]),v=[...s.items,...l.items,...n.items];return{items:v,total:v.length,count:v.length,currentPage:1,totalPages:1}}async getMultimediaByType(e,t){switch(e){case"image":return this.getImages(t);case"video":return this.getVideos(t);case"presentation":return this.getPresentations(t);default:throw new Error(`Invalid multimedia type: ${e}`)}}appendExtraFilters(e,t){if(t){for(let[o,s]of Object.entries(t))if(s&&(Array.isArray(s)?s.length>0:s.toString().trim()!=="")){let l=Array.isArray(s)?s.join(","):s.toString();e.append(`extra_${o}`,l)}}}async makeRequest(e,t=!0){let o={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return g(e,{method:"GET",headers:o,credentials:t?"include":void 0})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var h=class a{constructor(e){this.config=e}static getInstance(e){if(!a.instance&&e&&(a.instance=new a(e)),!a.instance)throw new Error("ProductService must be initialized with config first");return a.instance}static initialize(e){return a.instance=new a(e),a.instance}async getProducts(e={}){let t=new URLSearchParams({...e.title&&{title:e.title},...e.search&&{search:e.search},...e.category&&{category:e.category},...e.tags&&{tags:e.tags.join(",")},...e.sortBy&&{sortBy:e.sortBy},...e.sortOrder&&{sortOrder:e.sortOrder},...e.minPrice&&{minPrice:e.minPrice.toString()},...e.maxPrice&&{maxPrice:e.maxPrice.toString()},...e.inStock!==void 0&&{inStock:e.inStock.toString()},...e.offset&&{offset:e.offset.toString()},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});e.extraFields&&Object.keys(e.extraFields).length>0&&t.append("extraFields",JSON.stringify(e.extraFields));let o=`${this.config.baseUrl}/products?${t}`;return this.makeRequest(o,!0)}async getProductByToken(e){let t=`${this.config.baseUrl}/products/secure-token/${e}`;return this.makeRequest(t)}async searchProducts(e,t={}){return this.getProducts({...t,search:e})}async makeRequest(e,t=!1){let o={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return g(e,{method:"GET",headers:o,credentials:t?"include":"same-origin"})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var A=class{constructor(e){e?.multimediaService&&(this.multimediaService=_.initialize(e.multimediaService)),e?.faqsService&&(this.faqsService=x.initialize(e.faqsService)),e?.productService&&(this.productService=h.initialize(e.productService)),e?.fileService&&(this.fileService=w.initialize(e.fileService))}async loadAsset(e,t){switch(e){case"multimedia":return this.loadMultimediaAsset(t);case"product":return this.loadProductAsset(t);case"faq":return this.loadFaqAsset(t);case"file":return this.loadFileAsset(t);default:throw new Error(`Unsupported asset type: ${e}`)}}async loadMultimediaAsset(e){if(!this.multimediaService)throw new Error("MultimediaService not configured");let t=await this.multimediaService.getMultimediaByToken(e);if(!t)throw new Error("Multimedia not found");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:t.animatedCoverUrl||t.url,type:"multimedia",externalId:t.id,format:t.format,size:t.size||void 0,duration:t.duration||void 0,vodUrl:t.vodUrl||void 0,slides:t.slides||[],labels:t.labels,animatedCoverUrl:t.animatedCoverUrl||void 0,metadata:{organizationId:t.organizationId,status:t.status,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadProductAsset(e){if(!this.productService)throw new Error("MultimediaService not configured");let t=await this.productService.getProductByToken(e);if(!t)throw new Error("Product not found");return{id:t.id,name:t.name,description:t.description,url:t.url,thumbnail:t.images?.[0],type:"product",externalId:t.externalId,price:t.price,currency:t.currency,category:t.category,tags:t.tags,images:t.images,variants:t.variants?.map(o=>({id:o.id,externalId:o.externalId,price:o.price,currency:o.currency,images:o.images})),options:t.options,metadata:{providerType:t.providerType,providerId:t.providerId,discountType:t.discountType,discount:t.discount,stock:t.stock,broken:t.broken}}}async loadFaqAsset(e){if(!this.faqsService)throw new Error("FaqsService not configured");let t=await this.faqsService.getFaqById(e);return{id:t.id,name:t.question,description:t.answer,url:`#faq-${t.id}`,type:"faq",externalId:t.id,question:t.question,answer:t.answer,priority:t.priority,isActive:t.isActive,metadata:{organizationId:t.organizationId,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadFileAsset(e){if(!this.fileService)throw new Error("FileService not configured");let t=await this.fileService.getFileById(e),o=t.type||"",s=o.startsWith("video/"),l=o.startsWith("image/");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:l?t.url:void 0,type:"file",externalId:t.id,format:o,size:t.metadata?.size,duration:void 0,vodUrl:s?t.url:void 0,labels:[],animatedCoverUrl:s?t.url:void 0,metadata:{path:t.metadata?.path,bucketType:t.metadata?.bucketType,loadDirection:t.metadata?.loadDirection,createdAt:t.createdAt,updatedAt:t.updatedAt}}}};import{html as i}from"lit";import{classMap as Z}from"lit/directives/class-map.js";import{ifDefined as b}from"lit/directives/if-defined.js";import{when as m}from"lit/directives/when.js";import{unsafeHTML as Y}from"lit/directives/unsafe-html.js";import F from"dompurify";var B={ALLOWED_TAGS:["p","br","span","b","strong","i","em","u","s","del","ul","ol","li","code","pre","a","h1","h2","h3","h4","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","target","rel","title","aria-label","role","colspan","rowspan"],FORCE_HTTPS:!0,ALLOW_DATA_ATTR:!1};F.addHook("afterSanitizeAttributes",a=>{"target"in a&&a.target==="_blank"&&a.setAttribute("rel","noopener noreferrer")});var q=(a,e=B)=>F.sanitize(a,e);function C(a=""){return Y(H(a))}function H(a=""){return q(a,{ADD_ATTR:["target","rel"],ADD_TAGS:["ol-"],CUSTOM_ELEMENT_HANDLING:{tagNameCheck:/^ol-/,attributeNameCheck:null,allowCustomizedBuiltInElements:!0}})}import"@onlive.ai/ui/dist/components/button/button.js";import"@onlive.ai/ui/dist/components/icon/icon.js";import{html as E,LitElement as G}from"lit";import{property as Q,query as K}from"lit/decorators.js";import{repeat as X}from"lit/directives/repeat.js";import W from"video.js";import{css as J,unsafeCSS as O}from"lit";import N from"video.js/dist/video-js.min.css?inline";var R=J`
|
|
3
3
|
${O(N)}
|
|
4
4
|
.och__player {
|
|
5
5
|
width: 100%;
|
|
@@ -2041,12 +2041,12 @@ video::-webkit-media-text-track-display {
|
|
|
2041
2041
|
transition: all 0.2s ease;
|
|
2042
2042
|
}
|
|
2043
2043
|
</style>
|
|
2044
|
-
`}};f.styles=[R],
|
|
2044
|
+
`}};f.styles=[R],d([Q({type:Array})],f.prototype,"sources",2),d([K("#player")],f.prototype,"$player",2),f=d([y("och-player")],f);var k=class{formatFileSize(e){let t=["B","KB","MB","GB"];if(e===0)return"0 B";let o=Math.floor(Math.log(e)/Math.log(1024));return Math.round(e/1024**o*100)/100+" "+t[o]}formatDuration(e){let t=Math.floor(e/60),o=Math.floor(e%60);return`${t}:${o.toString().padStart(2,"0")}`}getMultimediaSubtype(e){let t=e.format||"";return t.startsWith("video/")?"video":t.startsWith("image/")?"image":t.includes("presentation")||t.includes("pdf")||t.includes("powerpoint")||t.includes("slides")||t.includes("application/vnd.ms-powerpoint")||t.includes("application/vnd.openxmlformats-officedocument.presentationml")||e.slides&&e.slides.length>0?"presentation":e.duration||e.vodUrl?"video":"image"}renderThumbnail(e,t,o,s,l,n){return!t.showThumbnail||e.type==="faq"?i``:i`
|
|
2045
2045
|
<div class="ol-asset__thumbnail">
|
|
2046
2046
|
${this.renderThumbnailContent(e)}
|
|
2047
2047
|
${this.renderMetadata(e,t)}
|
|
2048
2048
|
${this.renderThumbnailOverlay(e)}
|
|
2049
|
-
${this.renderHoverOverlay(e,o,l,s)}
|
|
2049
|
+
${this.renderHoverOverlay(e,o,l,s,n)}
|
|
2050
2050
|
</div>
|
|
2051
2051
|
`}renderThumbnailContent(e){switch(e.type){case"multimedia":{let t=e;switch(this.getMultimediaSubtype(t)){case"video":return this.renderVideoThumbnail(t);case"presentation":return this.renderPresentationThumbnail(t);default:return i`
|
|
2052
2052
|
<img
|
|
@@ -2096,28 +2096,28 @@ video::-webkit-media-text-track-display {
|
|
|
2096
2096
|
</div>
|
|
2097
2097
|
`}renderThumbnailOverlay(e){let t=[];if(e.type==="multimedia"||e.type==="file"){let o=e;this.getMultimediaSubtype(o)==="video"&&o.duration&&t.push(i`
|
|
2098
2098
|
<div class="ol-asset__duration">${this.formatDuration(o.duration)}</div>
|
|
2099
|
-
`)}return i`${t}`}renderContent(e,t){let o
|
|
2099
|
+
`)}return i`${t}`}renderContent(e,t){let o=!t.showName&&!t.showDescription&&!t.showTags&&(e.type!=="product"||!t.showPrice);return i`
|
|
2100
2100
|
<div class=${Z({"ol-asset__content":!0,"ol-asset__content--assets":!!o})}>
|
|
2101
2101
|
${this.renderName(e,t)}
|
|
2102
2102
|
${this.renderDescription(e,t)}
|
|
2103
|
-
${this.renderPrice(e)}
|
|
2103
|
+
${this.renderPrice(e,t)}
|
|
2104
2104
|
${this.renderTags(e,t)}
|
|
2105
2105
|
</div>
|
|
2106
|
-
`}renderName(e,t){return e.type==="faq"?i``:e.type==="product"?i`
|
|
2106
|
+
`}renderName(e,t){return e.type==="faq"?i``:e.type==="product"?t.showName?i`
|
|
2107
2107
|
<div class="ol-asset__name">${e.name}</div>
|
|
2108
|
-
`:(e.type==="multimedia"||e.type==="file")&&this.getMultimediaSubtype(e)==="presentation"&&(!e.slides||e.slides.length===0)?i`
|
|
2108
|
+
`:i``:(e.type==="multimedia"||e.type==="file")&&this.getMultimediaSubtype(e)==="presentation"&&(!e.slides||e.slides.length===0)?i`
|
|
2109
2109
|
<div class="ol-asset__name">${e.name}</div>
|
|
2110
2110
|
`:t.showName?i`
|
|
2111
2111
|
<div class="ol-asset__name">${e.name}</div>
|
|
2112
2112
|
`:i``}renderDescription(e,t){if(e.type==="faq"){let s=e;return s.answer?i`
|
|
2113
2113
|
<div class="ol-asset__description ol-asset__answer">${s.answer}</div>
|
|
2114
|
-
`:i``}return e.description?e.type==="product"?i`
|
|
2114
|
+
`:i``}return e.description?e.type==="product"?t.showDescription?i`
|
|
2115
2115
|
<div class="ol-asset__description">${C(e.description)}</div>
|
|
2116
|
-
`:t.showDescription?i`
|
|
2116
|
+
`:i``:t.showDescription?i`
|
|
2117
2117
|
<div class="ol-asset__description">${e.description}</div>
|
|
2118
|
-
`:i``:i``}renderPrice(e){if(e.type!=="product")return i``;let
|
|
2118
|
+
`:i``:i``}renderPrice(e,t){if(e.type!=="product"||!t.showPrice)return i``;let o=e;return o.price?i`
|
|
2119
2119
|
<div class="ol-asset__price">
|
|
2120
|
-
${
|
|
2120
|
+
${o.currency} ${o.price}
|
|
2121
2121
|
</div>
|
|
2122
2122
|
`:i``}renderMetadata(e,t){if(!t.showMetadata)return i``;let o=[];if(t.showSize&&e.type!=="faq"&&"size"in e&&e.size&&typeof e.size=="number"&&o.push(i`
|
|
2123
2123
|
<div class="ol-asset__meta-item">
|
|
@@ -2203,12 +2203,12 @@ video::-webkit-media-text-track-display {
|
|
|
2203
2203
|
<h3 class="ol-asset__modal-title">${e.name}</h3>
|
|
2204
2204
|
${e.description?i`<p class="ol-asset__modal-description">${e.description}</p>`:i``}
|
|
2205
2205
|
</div>
|
|
2206
|
-
`}}renderHoverOverlay(e,t,o,s){let
|
|
2206
|
+
`}}renderHoverOverlay(e,t,o,s,l){let n=e.type==="multimedia"&&this.getMultimediaSubtype(e)==="video",v=(e.type==="multimedia"||e.type==="file")&&this.getMultimediaSubtype(e)==="presentation"&&(!e.slides||e.slides.length===0);return n?i`
|
|
2207
2207
|
<div class="ol-asset__video-controls">
|
|
2208
2208
|
${m(o,()=>i`
|
|
2209
2209
|
<ol-button
|
|
2210
2210
|
class="ol-asset__video-btn ol-asset__video-btn--maximize"
|
|
2211
|
-
@click=${
|
|
2211
|
+
@click=${r=>{r.stopPropagation(),o(e)}}
|
|
2212
2212
|
title="Maximize ${e.name}"
|
|
2213
2213
|
>
|
|
2214
2214
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -2219,7 +2219,7 @@ video::-webkit-media-text-track-display {
|
|
|
2219
2219
|
${m(t,()=>i`
|
|
2220
2220
|
<ol-button
|
|
2221
2221
|
class="ol-asset__video-btn ol-asset__video-btn--download ${s?"ol-asset__video-btn--downloading":""}"
|
|
2222
|
-
@click=${
|
|
2222
|
+
@click=${r=>{r.stopPropagation(),t(e)}}
|
|
2223
2223
|
title="Download ${e.name}"
|
|
2224
2224
|
?disabled=${s}
|
|
2225
2225
|
>
|
|
@@ -2244,7 +2244,7 @@ video::-webkit-media-text-track-display {
|
|
|
2244
2244
|
${m(e.type==="product",()=>i`
|
|
2245
2245
|
<ol-button
|
|
2246
2246
|
class="ol-asset__hover-btn ol-asset__hover-btn--external"
|
|
2247
|
-
@click=${
|
|
2247
|
+
@click=${r=>{r.stopPropagation(),e.url&&(l?l(e.url):window.open(e.url,"_blank","noopener,noreferrer"))}}
|
|
2248
2248
|
title="Open ${e.name} in new window"
|
|
2249
2249
|
>
|
|
2250
2250
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -2254,10 +2254,10 @@ video::-webkit-media-text-track-display {
|
|
|
2254
2254
|
</svg>
|
|
2255
2255
|
</ol-button>
|
|
2256
2256
|
`,()=>i`
|
|
2257
|
-
${m(o&&!
|
|
2257
|
+
${m(o&&!v,()=>i`
|
|
2258
2258
|
<ol-button
|
|
2259
2259
|
class="ol-asset__hover-btn ol-asset__hover-btn--maximize"
|
|
2260
|
-
@click=${
|
|
2260
|
+
@click=${r=>{r.stopPropagation(),o(e)}}
|
|
2261
2261
|
title="Maximize ${e.name}"
|
|
2262
2262
|
>
|
|
2263
2263
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -2268,7 +2268,7 @@ video::-webkit-media-text-track-display {
|
|
|
2268
2268
|
${m(t&&["multimedia","file"].includes(e.type),()=>i`
|
|
2269
2269
|
<ol-button
|
|
2270
2270
|
class="ol-asset__hover-btn ol-asset__hover-btn--download ${s?"ol-asset__hover-btn--downloading":""}"
|
|
2271
|
-
@click=${
|
|
2271
|
+
@click=${r=>{r.stopPropagation(),t(e)}}
|
|
2272
2272
|
title="Download ${e.name}"
|
|
2273
2273
|
?disabled=${s}
|
|
2274
2274
|
>
|
|
@@ -2289,7 +2289,7 @@ video::-webkit-media-text-track-display {
|
|
|
2289
2289
|
`)}
|
|
2290
2290
|
</div>
|
|
2291
2291
|
</div>
|
|
2292
|
-
`}
|
|
2292
|
+
`}};import{css as ee}from"lit";var $=ee`
|
|
2293
2293
|
:host {
|
|
2294
2294
|
display: block;
|
|
2295
2295
|
--asset-border-radius: 8px;
|
|
@@ -3597,9 +3597,9 @@ video::-webkit-media-text-track-display {
|
|
|
3597
3597
|
<h3 class="ol-asset__modal-title">${e}</h3>
|
|
3598
3598
|
${t?`<p class="ol-asset__modal-description">${t}</p>`:""}
|
|
3599
3599
|
</div>
|
|
3600
|
-
`;let n=s==="multimedia"||s==="file",
|
|
3600
|
+
`;let n=s==="multimedia"||s==="file",v=s==="faq"&&this.asset.question||e;return`
|
|
3601
3601
|
<ol-dialog
|
|
3602
|
-
label="${this.escapeHtml(
|
|
3602
|
+
label="${this.escapeHtml(v)}"
|
|
3603
3603
|
class="ol-asset__dialog"
|
|
3604
3604
|
data-fullscreen="${n}"
|
|
3605
3605
|
data-display-state="${this.displayState}"
|
|
@@ -3611,7 +3611,7 @@ video::-webkit-media-text-track-display {
|
|
|
3611
3611
|
</div>
|
|
3612
3612
|
</div>
|
|
3613
3613
|
</ol-dialog>
|
|
3614
|
-
`}attachEventListeners(){this.dialog&&(this.dialog.addEventListener("ol-after-hide",()=>{this.onClose?.()}),this.dialog.addEventListener("ol-request-close",e=>{e.detail?.source==="overlay"&&e.preventDefault()}))}escapeHtml(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML}};var
|
|
3614
|
+
`}attachEventListeners(){this.dialog&&(this.dialog.addEventListener("ol-after-hide",()=>{this.onClose?.()}),this.dialog.addEventListener("ol-request-close",e=>{e.detail?.source==="overlay"&&e.preventDefault()}))}escapeHtml(e){let t=document.createElement("div");return t.textContent=e,t.innerHTML}};var c=class extends te{constructor(){super(...arguments);this.displayState="normal";this.loadingState="idle";this.assetRenderer=new k;this.isDownloading=!1;this.defaultDisplayOptions={showThumbnail:!0,showName:!1,showDescription:!1,showMetadata:!0,showPrice:!0,showDuration:!1,showSize:!1,showTags:!1,layout:"card",size:"medium"}}connectedCallback(){super.connectedCallback(),this.initializeServices(),this.loadAsset()}disconnectedCallback(){super.disconnectedCallback(),this.closeModal()}initializeServices(){this.assetLoader=new A(this.config)}async loadAsset(){if(!this.type||!this.externalId){this.error="Type and externalId are required",this.loadingState="error";return}this.loadingState="loading",this.error=void 0;try{let t=await this.assetLoader.loadAsset(this.type,this.externalId);this.asset=t,this.loadingState="loaded",this.dispatchEvent(new CustomEvent("asset-load",{detail:t})),console.debug("Asset loaded:",t)}catch(t){console.error(`Error loading ${this.type} asset:`,t),this.error=t instanceof Error?t.message:"Failed to load asset",this.loadingState="error",this.dispatchEvent(new CustomEvent("asset-error",{detail:{error:this.error,asset:this.asset}}))}}async onDownload(t){if(!(!t.url||this.isDownloading)){this.isDownloading=!0;try{let o=await fetch(t.url,{method:"GET",mode:"cors",cache:"no-cache"});if(o.ok){let s=await o.blob(),l=window.URL.createObjectURL(s),n=document.createElement("a");n.href=l,n.download=this.getDownloadFilename(t),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout(()=>window.URL.revokeObjectURL(l),100),this.dispatchEvent(new CustomEvent("asset-download",{detail:t})),this.isDownloading=!1;return}}catch(o){console.warn("Fetch strategy failed:",o)}try{let o=await fetch(t.url,{headers:{Accept:"*/*"},mode:"no-cors"});if(o.type==="opaque")throw new Error("No-cors response, cannot access blob");let s=await o.blob(),l=window.URL.createObjectURL(s),n=document.createElement("a");n.href=l,n.download=this.getDownloadFilename(t),n.style.display="none",document.body.appendChild(n),n.click(),document.body.removeChild(n),setTimeout(()=>window.URL.revokeObjectURL(l),100),this.dispatchEvent(new CustomEvent("asset-download",{detail:t})),this.isDownloading=!1;return}catch(o){console.warn("No-cors strategy failed:",o)}try{let o=document.createElement("a");o.href=t.url,o.download=this.getDownloadFilename(t),o.target="_blank",o.rel="noopener noreferrer",o.style.position="absolute",o.style.left="-9999px",document.body.appendChild(o),o.click(),setTimeout(()=>{document.body.removeChild(o)},100),this.dispatchEvent(new CustomEvent("asset-download",{detail:t}))}catch(o){console.error("All download strategies failed:",o),window.open(t.url,"_blank")}this.isDownloading=!1}}getDownloadFilename(t){let o=Date.now(),s=this.getFileExtension(t);return`${t.name||`asset-${t.type}-${o}`}${s}`}getFileExtension(t){if(t.url){let l=new URL(t.url).pathname,n=l.lastIndexOf(".");if(n>0)return l.substring(n)}return{multimedia:".jpg",file:".bin",product:".jpg",faq:".txt"}[t.type]||""}async openModal(){this.asset&&(this.modalPortal=new S(this.asset,this.closeModal.bind(this),this.displayState),await this.modalPortal.open())}onOpenLink(t){this.dispatchEvent(new CustomEvent("open-link",{detail:{url:t},bubbles:!0,composed:!0}))}onMaximize(){if(console.debug("Maximize clicked for asset:",this.asset),!!this.asset){if(this.asset.type==="multimedia"||this.asset.type==="file"){let t=this.asset,o=t.slides&&t.slides.length>0,s=t.format||"";if((s.includes("presentation")||s.includes("pdf")||s.includes("powerpoint")||s.includes("slides")||s.includes("application/vnd.ms-powerpoint")||s.includes("application/vnd.openxmlformats-officedocument.presentationml")||o&&t.slides.length>0)&&!o)return}this.asset.type==="multimedia"||this.asset.type==="file"||this.asset.type==="faq"?this.openModal():this.dispatchEvent(new CustomEvent("asset-click",{detail:this.asset}))}}closeModal(){this.modalPortal&&(this.modalPortal.close(),this.modalPortal=void 0)}render(){let t={...this.defaultDisplayOptions,...this.config?.assetDisplayOptions||{}};return this.loadingState==="loading"?z`
|
|
3615
3615
|
<div class="ol-asset ol-asset--loading">
|
|
3616
3616
|
${this.assetRenderer.renderLoading()}
|
|
3617
3617
|
</div>
|
|
@@ -3623,7 +3623,7 @@ video::-webkit-media-text-track-display {
|
|
|
3623
3623
|
<div
|
|
3624
3624
|
class="ol-asset ${oe({"ol-asset--compact":t.layout==="compact","ol-asset--minimal":t.layout==="minimal","ol-asset--small":t.size==="small","ol-asset--medium":t.size==="medium","ol-asset--large":t.size==="large","ol-asset--faq":this.asset.type==="faq"})}"
|
|
3625
3625
|
>
|
|
3626
|
-
${this.assetRenderer.renderThumbnail(this.asset,t,this.onDownload.bind(this),this.isDownloading,this.onMaximize.bind(this))}
|
|
3626
|
+
${this.assetRenderer.renderThumbnail(this.asset,t,this.onDownload.bind(this),this.isDownloading,this.onMaximize.bind(this),this.onOpenLink.bind(this))}
|
|
3627
3627
|
${this.assetRenderer.renderContent(this.asset,t)}
|
|
3628
3628
|
</div>
|
|
3629
|
-
`:z``}};
|
|
3629
|
+
`:z``}};c.styles=[$],d([P({type:String})],c.prototype,"type",2),d([P({type:String})],c.prototype,"externalId",2),d([P({type:Object})],c.prototype,"config",2),d([P({type:String,attribute:"display-state"})],c.prototype,"displayState",2),d([j()],c.prototype,"asset",2),d([j()],c.prototype,"loadingState",2),d([j()],c.prototype,"error",2),d([j()],c.prototype,"assetLoader",2),d([j()],c.prototype,"assetRenderer",2),d([j()],c.prototype,"isDownloading",2),c=d([y("osb-asset")],c);export{c as OSBAsset};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.199 | © 2026 Onlive.ai */
|
|
2
2
|
"use strict";var p=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var v=Object.getOwnPropertyNames;var y=Object.prototype.hasOwnProperty;var S=(r,e)=>{for(var t in e)p(r,t,{get:e[t],enumerable:!0})},P=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of v(e))!y.call(r,s)&&s!==t&&p(r,s,{get:()=>e[s],enumerable:!(i=h(e,s))||i.enumerable});return r};var w=r=>P(p({},"__esModule",{value:!0}),r);var F={};S(F,{AssetLoaders:()=>m});module.exports=w(F);var d=class r{constructor(e){this.config=e}static initialize(e){return new r(e)}getBaseUrl(){return`${this.config.baseUrl}`}getHeaders(){return{"Content-Type":"application/json"}}async makeRequest(e,t={}){let i=`${this.getBaseUrl()}${e}`,s=await fetch(i,{...t,headers:{...this.getHeaders(),...t.headers}});if(!s.ok)throw new Error(`FAQs API error: ${s.status} ${s.statusText}`);return s.json()}async getSettingsByOrganization(e,t){try{let i=new URLSearchParams;t&&i.append("userGroupId",t);let s=i.toString(),o=`${this.getBaseUrl()}/settings/organization/${e}${s?`?${s}`:""}`,n=await fetch(o,{method:"GET",headers:this.getHeaders(),credentials:"include"});if(n.status===404)return null;if(!n.ok)throw new Error(`Failed to fetch settings: ${n.statusText}`);return await n.json()}catch(i){return console.error("Error fetching settings:",i),null}}async getFaqs(e={}){let t=new URLSearchParams;if(e.search&&t.append("search",e.search),e.organizationId&&t.append("organizationId",e.organizationId),e.groupId&&t.append("groupId",e.groupId),e.isActive!==void 0&&t.append("isActive",e.isActive.toString()),e.page&&t.append("page",e.page.toString()),e.limit&&t.append("limit",e.limit.toString()),e.sortBy&&t.append("sortBy",e.sortBy),e.sortOrder&&t.append("sortOrder",e.sortOrder),e.extraFilters){for(let[o,n]of Object.entries(e.extraFilters))if(n&&(Array.isArray(n)?n.length>0:n.toString().trim()!=="")){let a=Array.isArray(n)?n.join(","):n.toString();t.append(`extra_${o}`,a)}}let i=t.toString(),s=`/faqs${i?`?${i}`:""}`;return this.makeRequest(s)}async getFaqById(e){return this.makeRequest(`/faqs/${e}`,{})}};var c=async(r,e)=>{let t=await fetch(r,e);if(!t.ok){let i=await t.json().catch(()=>({}));throw new Error(JSON.stringify({status:t.status,statusText:t.statusText,...i}))}return t&&t.json()};var l=class r{constructor(e){this.config=e,this.enableUpload=e.enableUpload||!1}static getInstance(e){if(!r.instance&&e&&(r.instance=new r(e)),!r.instance)throw new Error("FileService must be initialized with config first");return r.instance}static initialize(e){return r.instance=new r(e),r.instance}async uploadFile(e,t={}){try{let i=await this.requestSignedUrl({filename:e.name,description:t.description,loadDirection:"up",bucketType:t.bucketType||"conversations",path:t.path||".temp",mimeType:e.type});return await this.uploadToSignedUrl(i.data.signedUrlData.signedUrl,e),{success:!0,id:i.data.file.id,name:i.data.file.name,url:i.data.file.url,type:i.data.file.type}}catch(i){return console.error("Error uploading file:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error"}}}async requestSignedUrl(e){let t=`${this.config.baseUrl}/files/upload-url`;return this.makeRequest(t,{method:"POST",body:JSON.stringify(e)})}async uploadToSignedUrl(e,t){let i=await fetch(e,{method:"PUT",body:t,headers:{"Content-Type":t.type}});if(!i.ok){let s=await i.text().catch(()=>"No response");throw new Error(`Upload failed with status: ${i.status}. Response: ${s}`)}}async uploadFileWithRetry(e,t={}){let i=t.maxRetries||3,s=null;for(let o=1;o<=i;o++)try{let n=await this.uploadFile(e,t);if(n.success)return n;throw new Error(n.error||"Upload failed")}catch(n){if(s=n instanceof Error?n:new Error("Unknown error"),o===i)break;let a=2**o*1e3;await new Promise(f=>setTimeout(f,a))}return{success:!1,error:s?.message||"Upload failed after retries"}}async getFileById(e){let t=`${this.config.baseUrl}/files/${e}`,i=await this.makeRequest(t);if(!i.success)throw new Error("Failed to get file");return i.data}async makeRequest(e,t){let i={"Content-Type":"application/json"};return this.config.organizationId&&(i["X-Onlive-Organization-Id"]=this.config.organizationId),t?.headers&&Object.assign(i,t.headers),c(e,{...t,headers:i})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var g=class r{constructor(e){this.config=e}static getInstance(e){if(!r.instance&&e&&(r.instance=new r(e)),!r.instance)throw new Error("MultimediaService must be initialized with config first");return r.instance}static initialize(e){return r.instance=new r(e),r.instance}async getImages(e={}){let t=new URLSearchParams({type:"image",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let i=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(i)}async getVideos(e={}){let t=new URLSearchParams({type:"video",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let i=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(i)}async getPresentations(e={}){let t=new URLSearchParams({type:"presentation",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let i=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(i)}async getAllMultimedia(e={}){let[t,i,s]=await Promise.all([this.getImages(e),this.getVideos(e),this.getPresentations(e)]);return{images:t,videos:i,presentations:s}}async getMultimediaByToken(e){let t=`${this.config.baseUrl}/multimedia/secure-token/${e}`;return this.makeRequest(t,!1)}async searchMultimedia(e,t){let i={search:e,page:1,limit:50,includeSecureToken:!0};if(t)return this.getMultimediaByType(t,i);let[s,o,n]=await Promise.all([this.getImages(i),this.getVideos(i),this.getPresentations(i)]),a=[...s.items,...o.items,...n.items];return{items:a,total:a.length,count:a.length,currentPage:1,totalPages:1}}async getMultimediaByType(e,t){switch(e){case"image":return this.getImages(t);case"video":return this.getVideos(t);case"presentation":return this.getPresentations(t);default:throw new Error(`Invalid multimedia type: ${e}`)}}appendExtraFilters(e,t){if(t){for(let[i,s]of Object.entries(t))if(s&&(Array.isArray(s)?s.length>0:s.toString().trim()!=="")){let o=Array.isArray(s)?s.join(","):s.toString();e.append(`extra_${i}`,o)}}}async makeRequest(e,t=!0){let i={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return c(e,{method:"GET",headers:i,credentials:t?"include":void 0})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var u=class r{constructor(e){this.config=e}static getInstance(e){if(!r.instance&&e&&(r.instance=new r(e)),!r.instance)throw new Error("ProductService must be initialized with config first");return r.instance}static initialize(e){return r.instance=new r(e),r.instance}async getProducts(e={}){let t=new URLSearchParams({...e.title&&{title:e.title},...e.search&&{search:e.search},...e.category&&{category:e.category},...e.tags&&{tags:e.tags.join(",")},...e.sortBy&&{sortBy:e.sortBy},...e.sortOrder&&{sortOrder:e.sortOrder},...e.minPrice&&{minPrice:e.minPrice.toString()},...e.maxPrice&&{maxPrice:e.maxPrice.toString()},...e.inStock!==void 0&&{inStock:e.inStock.toString()},...e.offset&&{offset:e.offset.toString()},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});e.extraFields&&Object.keys(e.extraFields).length>0&&t.append("extraFields",JSON.stringify(e.extraFields));let i=`${this.config.baseUrl}/products?${t}`;return this.makeRequest(i,!0)}async getProductByToken(e){let t=`${this.config.baseUrl}/products/secure-token/${e}`;return this.makeRequest(t)}async searchProducts(e,t={}){return this.getProducts({...t,search:e})}async makeRequest(e,t=!1){let i={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return c(e,{method:"GET",headers:i,credentials:t?"include":"same-origin"})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var m=class{constructor(e){e?.multimediaService&&(this.multimediaService=g.initialize(e.multimediaService)),e?.faqsService&&(this.faqsService=d.initialize(e.faqsService)),e?.productService&&(this.productService=u.initialize(e.productService)),e?.fileService&&(this.fileService=l.initialize(e.fileService))}async loadAsset(e,t){switch(e){case"multimedia":return this.loadMultimediaAsset(t);case"product":return this.loadProductAsset(t);case"faq":return this.loadFaqAsset(t);case"file":return this.loadFileAsset(t);default:throw new Error(`Unsupported asset type: ${e}`)}}async loadMultimediaAsset(e){if(!this.multimediaService)throw new Error("MultimediaService not configured");let t=await this.multimediaService.getMultimediaByToken(e);if(!t)throw new Error("Multimedia not found");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:t.animatedCoverUrl||t.url,type:"multimedia",externalId:t.id,format:t.format,size:t.size||void 0,duration:t.duration||void 0,vodUrl:t.vodUrl||void 0,slides:t.slides||[],labels:t.labels,animatedCoverUrl:t.animatedCoverUrl||void 0,metadata:{organizationId:t.organizationId,status:t.status,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadProductAsset(e){if(!this.productService)throw new Error("MultimediaService not configured");let t=await this.productService.getProductByToken(e);if(!t)throw new Error("Product not found");return{id:t.id,name:t.name,description:t.description,url:t.url,thumbnail:t.images?.[0],type:"product",externalId:t.externalId,price:t.price,currency:t.currency,category:t.category,tags:t.tags,images:t.images,variants:t.variants?.map(i=>({id:i.id,externalId:i.externalId,price:i.price,currency:i.currency,images:i.images})),options:t.options,metadata:{providerType:t.providerType,providerId:t.providerId,discountType:t.discountType,discount:t.discount,stock:t.stock,broken:t.broken}}}async loadFaqAsset(e){if(!this.faqsService)throw new Error("FaqsService not configured");let t=await this.faqsService.getFaqById(e);return{id:t.id,name:t.question,description:t.answer,url:`#faq-${t.id}`,type:"faq",externalId:t.id,question:t.question,answer:t.answer,priority:t.priority,isActive:t.isActive,metadata:{organizationId:t.organizationId,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadFileAsset(e){if(!this.fileService)throw new Error("FileService not configured");let t=await this.fileService.getFileById(e),i=t.type||"",s=i.startsWith("video/"),o=i.startsWith("image/");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:o?t.url:void 0,type:"file",externalId:t.id,format:i,size:t.metadata?.size,duration:void 0,vodUrl:s?t.url:void 0,labels:[],animatedCoverUrl:s?t.url:void 0,metadata:{path:t.metadata?.path,bucketType:t.metadata?.bucketType,loadDirection:t.metadata?.loadDirection,createdAt:t.createdAt,updatedAt:t.updatedAt}}}};0&&(module.exports={AssetLoaders});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.199 | © 2026 Onlive.ai */
|
|
2
2
|
var d=class r{constructor(e){this.config=e}static initialize(e){return new r(e)}getBaseUrl(){return`${this.config.baseUrl}`}getHeaders(){return{"Content-Type":"application/json"}}async makeRequest(e,t={}){let i=`${this.getBaseUrl()}${e}`,s=await fetch(i,{...t,headers:{...this.getHeaders(),...t.headers}});if(!s.ok)throw new Error(`FAQs API error: ${s.status} ${s.statusText}`);return s.json()}async getSettingsByOrganization(e,t){try{let i=new URLSearchParams;t&&i.append("userGroupId",t);let s=i.toString(),o=`${this.getBaseUrl()}/settings/organization/${e}${s?`?${s}`:""}`,n=await fetch(o,{method:"GET",headers:this.getHeaders(),credentials:"include"});if(n.status===404)return null;if(!n.ok)throw new Error(`Failed to fetch settings: ${n.statusText}`);return await n.json()}catch(i){return console.error("Error fetching settings:",i),null}}async getFaqs(e={}){let t=new URLSearchParams;if(e.search&&t.append("search",e.search),e.organizationId&&t.append("organizationId",e.organizationId),e.groupId&&t.append("groupId",e.groupId),e.isActive!==void 0&&t.append("isActive",e.isActive.toString()),e.page&&t.append("page",e.page.toString()),e.limit&&t.append("limit",e.limit.toString()),e.sortBy&&t.append("sortBy",e.sortBy),e.sortOrder&&t.append("sortOrder",e.sortOrder),e.extraFilters){for(let[o,n]of Object.entries(e.extraFilters))if(n&&(Array.isArray(n)?n.length>0:n.toString().trim()!=="")){let a=Array.isArray(n)?n.join(","):n.toString();t.append(`extra_${o}`,a)}}let i=t.toString(),s=`/faqs${i?`?${i}`:""}`;return this.makeRequest(s)}async getFaqById(e){return this.makeRequest(`/faqs/${e}`,{})}};var c=async(r,e)=>{let t=await fetch(r,e);if(!t.ok){let i=await t.json().catch(()=>({}));throw new Error(JSON.stringify({status:t.status,statusText:t.statusText,...i}))}return t&&t.json()};var l=class r{constructor(e){this.config=e,this.enableUpload=e.enableUpload||!1}static getInstance(e){if(!r.instance&&e&&(r.instance=new r(e)),!r.instance)throw new Error("FileService must be initialized with config first");return r.instance}static initialize(e){return r.instance=new r(e),r.instance}async uploadFile(e,t={}){try{let i=await this.requestSignedUrl({filename:e.name,description:t.description,loadDirection:"up",bucketType:t.bucketType||"conversations",path:t.path||".temp",mimeType:e.type});return await this.uploadToSignedUrl(i.data.signedUrlData.signedUrl,e),{success:!0,id:i.data.file.id,name:i.data.file.name,url:i.data.file.url,type:i.data.file.type}}catch(i){return console.error("Error uploading file:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error"}}}async requestSignedUrl(e){let t=`${this.config.baseUrl}/files/upload-url`;return this.makeRequest(t,{method:"POST",body:JSON.stringify(e)})}async uploadToSignedUrl(e,t){let i=await fetch(e,{method:"PUT",body:t,headers:{"Content-Type":t.type}});if(!i.ok){let s=await i.text().catch(()=>"No response");throw new Error(`Upload failed with status: ${i.status}. Response: ${s}`)}}async uploadFileWithRetry(e,t={}){let i=t.maxRetries||3,s=null;for(let o=1;o<=i;o++)try{let n=await this.uploadFile(e,t);if(n.success)return n;throw new Error(n.error||"Upload failed")}catch(n){if(s=n instanceof Error?n:new Error("Unknown error"),o===i)break;let a=2**o*1e3;await new Promise(m=>setTimeout(m,a))}return{success:!1,error:s?.message||"Upload failed after retries"}}async getFileById(e){let t=`${this.config.baseUrl}/files/${e}`,i=await this.makeRequest(t);if(!i.success)throw new Error("Failed to get file");return i.data}async makeRequest(e,t){let i={"Content-Type":"application/json"};return this.config.organizationId&&(i["X-Onlive-Organization-Id"]=this.config.organizationId),t?.headers&&Object.assign(i,t.headers),c(e,{...t,headers:i})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var g=class r{constructor(e){this.config=e}static getInstance(e){if(!r.instance&&e&&(r.instance=new r(e)),!r.instance)throw new Error("MultimediaService must be initialized with config first");return r.instance}static initialize(e){return r.instance=new r(e),r.instance}async getImages(e={}){let t=new URLSearchParams({type:"image",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let i=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(i)}async getVideos(e={}){let t=new URLSearchParams({type:"video",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let i=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(i)}async getPresentations(e={}){let t=new URLSearchParams({type:"presentation",page:(e.page||1).toString(),limit:(e.limit||12).toString(),...e.search&&{search:e.search},...e.labels&&{labels:e.labels.join(",")},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});this.appendExtraFilters(t,e.extraFilters);let i=`${this.config.baseUrl}/multimedia?${t}`;return this.makeRequest(i)}async getAllMultimedia(e={}){let[t,i,s]=await Promise.all([this.getImages(e),this.getVideos(e),this.getPresentations(e)]);return{images:t,videos:i,presentations:s}}async getMultimediaByToken(e){let t=`${this.config.baseUrl}/multimedia/secure-token/${e}`;return this.makeRequest(t,!1)}async searchMultimedia(e,t){let i={search:e,page:1,limit:50,includeSecureToken:!0};if(t)return this.getMultimediaByType(t,i);let[s,o,n]=await Promise.all([this.getImages(i),this.getVideos(i),this.getPresentations(i)]),a=[...s.items,...o.items,...n.items];return{items:a,total:a.length,count:a.length,currentPage:1,totalPages:1}}async getMultimediaByType(e,t){switch(e){case"image":return this.getImages(t);case"video":return this.getVideos(t);case"presentation":return this.getPresentations(t);default:throw new Error(`Invalid multimedia type: ${e}`)}}appendExtraFilters(e,t){if(t){for(let[i,s]of Object.entries(t))if(s&&(Array.isArray(s)?s.length>0:s.toString().trim()!=="")){let o=Array.isArray(s)?s.join(","):s.toString();e.append(`extra_${i}`,o)}}}async makeRequest(e,t=!0){let i={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return c(e,{method:"GET",headers:i,credentials:t?"include":void 0})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var u=class r{constructor(e){this.config=e}static getInstance(e){if(!r.instance&&e&&(r.instance=new r(e)),!r.instance)throw new Error("ProductService must be initialized with config first");return r.instance}static initialize(e){return r.instance=new r(e),r.instance}async getProducts(e={}){let t=new URLSearchParams({...e.title&&{title:e.title},...e.search&&{search:e.search},...e.category&&{category:e.category},...e.tags&&{tags:e.tags.join(",")},...e.sortBy&&{sortBy:e.sortBy},...e.sortOrder&&{sortOrder:e.sortOrder},...e.minPrice&&{minPrice:e.minPrice.toString()},...e.maxPrice&&{maxPrice:e.maxPrice.toString()},...e.inStock!==void 0&&{inStock:e.inStock.toString()},...e.offset&&{offset:e.offset.toString()},...e.includeSecureToken&&{includeSecureToken:e.includeSecureToken.toString()}});e.extraFields&&Object.keys(e.extraFields).length>0&&t.append("extraFields",JSON.stringify(e.extraFields));let i=`${this.config.baseUrl}/products?${t}`;return this.makeRequest(i,!0)}async getProductByToken(e){let t=`${this.config.baseUrl}/products/secure-token/${e}`;return this.makeRequest(t)}async searchProducts(e,t={}){return this.getProducts({...t,search:e})}async makeRequest(e,t=!1){let i={"Content-Type":"application/json","X-Onlive-Organization-Id":this.config.organizationId};return c(e,{method:"GET",headers:i,credentials:t?"include":"same-origin"})}updateConfig(e){this.config={...this.config,...e}}getConfig(){return{...this.config}}};var p=class{constructor(e){e?.multimediaService&&(this.multimediaService=g.initialize(e.multimediaService)),e?.faqsService&&(this.faqsService=d.initialize(e.faqsService)),e?.productService&&(this.productService=u.initialize(e.productService)),e?.fileService&&(this.fileService=l.initialize(e.fileService))}async loadAsset(e,t){switch(e){case"multimedia":return this.loadMultimediaAsset(t);case"product":return this.loadProductAsset(t);case"faq":return this.loadFaqAsset(t);case"file":return this.loadFileAsset(t);default:throw new Error(`Unsupported asset type: ${e}`)}}async loadMultimediaAsset(e){if(!this.multimediaService)throw new Error("MultimediaService not configured");let t=await this.multimediaService.getMultimediaByToken(e);if(!t)throw new Error("Multimedia not found");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:t.animatedCoverUrl||t.url,type:"multimedia",externalId:t.id,format:t.format,size:t.size||void 0,duration:t.duration||void 0,vodUrl:t.vodUrl||void 0,slides:t.slides||[],labels:t.labels,animatedCoverUrl:t.animatedCoverUrl||void 0,metadata:{organizationId:t.organizationId,status:t.status,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadProductAsset(e){if(!this.productService)throw new Error("MultimediaService not configured");let t=await this.productService.getProductByToken(e);if(!t)throw new Error("Product not found");return{id:t.id,name:t.name,description:t.description,url:t.url,thumbnail:t.images?.[0],type:"product",externalId:t.externalId,price:t.price,currency:t.currency,category:t.category,tags:t.tags,images:t.images,variants:t.variants?.map(i=>({id:i.id,externalId:i.externalId,price:i.price,currency:i.currency,images:i.images})),options:t.options,metadata:{providerType:t.providerType,providerId:t.providerId,discountType:t.discountType,discount:t.discount,stock:t.stock,broken:t.broken}}}async loadFaqAsset(e){if(!this.faqsService)throw new Error("FaqsService not configured");let t=await this.faqsService.getFaqById(e);return{id:t.id,name:t.question,description:t.answer,url:`#faq-${t.id}`,type:"faq",externalId:t.id,question:t.question,answer:t.answer,priority:t.priority,isActive:t.isActive,metadata:{organizationId:t.organizationId,createdAt:t.createdAt,updatedAt:t.updatedAt}}}async loadFileAsset(e){if(!this.fileService)throw new Error("FileService not configured");let t=await this.fileService.getFileById(e),i=t.type||"",s=i.startsWith("video/"),o=i.startsWith("image/");return{id:t.id,name:t.name,description:t.description||"",url:t.url,thumbnail:o?t.url:void 0,type:"file",externalId:t.id,format:i,size:t.metadata?.size,duration:void 0,vodUrl:s?t.url:void 0,labels:[],animatedCoverUrl:s?t.url:void 0,metadata:{path:t.metadata?.path,bucketType:t.metadata?.bucketType,loadDirection:t.metadata?.loadDirection,createdAt:t.createdAt,updatedAt:t.updatedAt}}}};export{p as AssetLoaders};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
2
|
-
"use strict";var
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.199 | © 2026 Onlive.ai */
|
|
2
|
+
"use strict";var B=Object.create;var c=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var J=Object.getOwnPropertyNames;var C=Object.getPrototypeOf,P=Object.prototype.hasOwnProperty;var E=(i,e)=>{for(var o in e)c(i,o,{get:e[o],enumerable:!0})},A=(i,e,o,t)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of J(e))!P.call(i,n)&&n!==o&&c(i,n,{get:()=>e[n],enumerable:!(t=y(e,n))||t.enumerable});return i};var h=(i,e,o)=>(o=i!=null?B(C(i)):{},A(e||!i||!i.__esModule?c(o,"default",{value:i,enumerable:!0}):o,i)),H=i=>A(c({},"__esModule",{value:!0}),i),u=(i,e,o,t)=>{for(var n=t>1?void 0:t?y(e,o):e,l=i.length-1,a;l>=0;l--)(a=i[l])&&(n=(t?a(e,o,n):a(n))||n);return t&&n&&c(e,o,n),n};var G={};E(G,{AssetRenderer:()=>g});module.exports=H(G);var s=require("lit"),T=require("lit/directives/class-map.js"),j=require("lit/directives/if-defined.js"),v=require("lit/directives/when.js");var k=require("lit/directives/unsafe-html.js");var b=h(require("dompurify"),1),D={ALLOWED_TAGS:["p","br","span","b","strong","i","em","u","s","del","ul","ol","li","code","pre","a","h1","h2","h3","h4","table","thead","tbody","tr","th","td"],ALLOWED_ATTR:["href","target","rel","title","aria-label","role","colspan","rowspan"],FORCE_HTTPS:!0,ALLOW_DATA_ATTR:!1};b.default.addHook("afterSanitizeAttributes",i=>{"target"in i&&i.target==="_blank"&&i.setAttribute("rel","noopener noreferrer")});var w=(i,e=D)=>b.default.sanitize(i,e);function x(i=""){return(0,k.unsafeHTML)(F(i))}function F(i=""){return w(i,{ADD_ATTR:["target","rel"],ADD_TAGS:["ol-"],CUSTOM_ELEMENT_HANDLING:{tagNameCheck:/^ol-/,attributeNameCheck:null,allowCustomizedBuiltInElements:!0}})}var L=(i,e)=>(customElements.get(i)?console.debug(`Custom element <${i}> is already defined, skipping definition of ${e.name}.`):window.customElements.define(i,e),e),R=(i,e)=>{let{kind:o,elements:t}=e;return{kind:o,elements:t,finisher(n){customElements.get(i)||window.customElements.define(i,n)}}},z=i=>e=>typeof e=="function"?L(i,e):R(i,e);var Q=require("@onlive.ai/ui/dist/components/button/button.js"),W=require("@onlive.ai/ui/dist/components/icon/icon.js"),p=require("lit"),f=require("lit/decorators.js"),V=require("lit/directives/repeat.js"),_=h(require("video.js"),1);var m=require("lit"),S=h(require("video.js/dist/video-js.min.css?inline"),1),M=m.css`
|
|
3
3
|
${(0,m.unsafeCSS)(S.default)}
|
|
4
4
|
.och__player {
|
|
5
5
|
width: 100%;
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
background: transparent;
|
|
14
14
|
transition: all 0.2s ease;
|
|
15
15
|
}
|
|
16
|
-
`;var
|
|
16
|
+
`;var d=class extends p.LitElement{constructor(){super(...arguments);this.sources=[];this.player=null}connectedCallback(){super.connectedCallback();let o="videojs-font-face";if(!document.head.querySelector(`#${o}`)){let t=document.createElement("style");t.id=o,t.innerHTML=`
|
|
17
17
|
@font-face {
|
|
18
18
|
font-family: VideoJS;
|
|
19
19
|
src:
|
|
@@ -2041,28 +2041,28 @@ video::-webkit-media-text-track-display {
|
|
|
2041
2041
|
transition: all 0.2s ease;
|
|
2042
2042
|
}
|
|
2043
2043
|
</style>
|
|
2044
|
-
`}};
|
|
2044
|
+
`}};d.styles=[M],u([(0,f.property)({type:Array})],d.prototype,"sources",2),u([(0,f.query)("#player")],d.prototype,"$player",2),d=u([z("och-player")],d);var g=class{formatFileSize(e){let o=["B","KB","MB","GB"];if(e===0)return"0 B";let t=Math.floor(Math.log(e)/Math.log(1024));return Math.round(e/1024**t*100)/100+" "+o[t]}formatDuration(e){let o=Math.floor(e/60),t=Math.floor(e%60);return`${o}:${t.toString().padStart(2,"0")}`}getMultimediaSubtype(e){let o=e.format||"";return o.startsWith("video/")?"video":o.startsWith("image/")?"image":o.includes("presentation")||o.includes("pdf")||o.includes("powerpoint")||o.includes("slides")||o.includes("application/vnd.ms-powerpoint")||o.includes("application/vnd.openxmlformats-officedocument.presentationml")||e.slides&&e.slides.length>0?"presentation":e.duration||e.vodUrl?"video":"image"}renderThumbnail(e,o,t,n,l,a){return!o.showThumbnail||e.type==="faq"?s.html``:s.html`
|
|
2045
2045
|
<div class="ol-asset__thumbnail">
|
|
2046
2046
|
${this.renderThumbnailContent(e)}
|
|
2047
2047
|
${this.renderMetadata(e,o)}
|
|
2048
2048
|
${this.renderThumbnailOverlay(e)}
|
|
2049
|
-
${this.renderHoverOverlay(e,t,
|
|
2049
|
+
${this.renderHoverOverlay(e,t,l,n,a)}
|
|
2050
2050
|
</div>
|
|
2051
2051
|
`}renderThumbnailContent(e){switch(e.type){case"multimedia":{let o=e;switch(this.getMultimediaSubtype(o)){case"video":return this.renderVideoThumbnail(o);case"presentation":return this.renderPresentationThumbnail(o);default:return s.html`
|
|
2052
2052
|
<img
|
|
2053
|
-
src="${(0,
|
|
2053
|
+
src="${(0,j.ifDefined)(o.thumbnail||o.url)}"
|
|
2054
2054
|
alt="${o.name}"
|
|
2055
2055
|
class="ol-asset__image"
|
|
2056
2056
|
/>
|
|
2057
2057
|
`}}case"file":{let o=e;switch(this.getMultimediaSubtype(o)){case"video":return this.renderVideoThumbnail(o);case"presentation":return this.renderPresentationThumbnail(o);default:return s.html`
|
|
2058
2058
|
<img
|
|
2059
|
-
src="${(0,
|
|
2059
|
+
src="${(0,j.ifDefined)(o.thumbnail||o.url)}"
|
|
2060
2060
|
alt="${o.name}"
|
|
2061
2061
|
class="ol-asset__image"
|
|
2062
2062
|
/>
|
|
2063
2063
|
`}}default:return s.html`
|
|
2064
2064
|
<img
|
|
2065
|
-
src="${(0,
|
|
2065
|
+
src="${(0,j.ifDefined)(e.thumbnail||e.url)}"
|
|
2066
2066
|
alt="${e.name}"
|
|
2067
2067
|
class="ol-asset__image"
|
|
2068
2068
|
/>
|
|
@@ -2073,7 +2073,7 @@ video::-webkit-media-text-track-display {
|
|
|
2073
2073
|
></och-player>
|
|
2074
2074
|
`}renderPresentationThumbnail(e){return s.html`
|
|
2075
2075
|
<div class="ol-asset__presentation-preview">
|
|
2076
|
-
${(0,
|
|
2076
|
+
${(0,v.when)(e.slides&&e.slides.length>0,()=>s.html`
|
|
2077
2077
|
<img
|
|
2078
2078
|
src="${e.slides[0]}"
|
|
2079
2079
|
alt="Presentation preview"
|
|
@@ -2096,28 +2096,28 @@ video::-webkit-media-text-track-display {
|
|
|
2096
2096
|
</div>
|
|
2097
2097
|
`}renderThumbnailOverlay(e){let o=[];if(e.type==="multimedia"||e.type==="file"){let t=e;this.getMultimediaSubtype(t)==="video"&&t.duration&&o.push(s.html`
|
|
2098
2098
|
<div class="ol-asset__duration">${this.formatDuration(t.duration)}</div>
|
|
2099
|
-
`)}return s.html`${o}`}renderContent(e,o){let t
|
|
2099
|
+
`)}return s.html`${o}`}renderContent(e,o){let t=!o.showName&&!o.showDescription&&!o.showTags&&(e.type!=="product"||!o.showPrice);return s.html`
|
|
2100
2100
|
<div class=${(0,T.classMap)({"ol-asset__content":!0,"ol-asset__content--assets":!!t})}>
|
|
2101
2101
|
${this.renderName(e,o)}
|
|
2102
2102
|
${this.renderDescription(e,o)}
|
|
2103
|
-
${this.renderPrice(e)}
|
|
2103
|
+
${this.renderPrice(e,o)}
|
|
2104
2104
|
${this.renderTags(e,o)}
|
|
2105
2105
|
</div>
|
|
2106
|
-
`}renderName(e,o){return e.type==="faq"?s.html``:e.type==="product"?s.html`
|
|
2106
|
+
`}renderName(e,o){return e.type==="faq"?s.html``:e.type==="product"?o.showName?s.html`
|
|
2107
2107
|
<div class="ol-asset__name">${e.name}</div>
|
|
2108
|
-
`:(e.type==="multimedia"||e.type==="file")&&this.getMultimediaSubtype(e)==="presentation"&&(!e.slides||e.slides.length===0)?s.html`
|
|
2108
|
+
`:s.html``:(e.type==="multimedia"||e.type==="file")&&this.getMultimediaSubtype(e)==="presentation"&&(!e.slides||e.slides.length===0)?s.html`
|
|
2109
2109
|
<div class="ol-asset__name">${e.name}</div>
|
|
2110
2110
|
`:o.showName?s.html`
|
|
2111
2111
|
<div class="ol-asset__name">${e.name}</div>
|
|
2112
2112
|
`:s.html``}renderDescription(e,o){if(e.type==="faq"){let n=e;return n.answer?s.html`
|
|
2113
2113
|
<div class="ol-asset__description ol-asset__answer">${n.answer}</div>
|
|
2114
|
-
`:s.html``}return e.description?e.type==="product"?s.html`
|
|
2114
|
+
`:s.html``}return e.description?e.type==="product"?o.showDescription?s.html`
|
|
2115
2115
|
<div class="ol-asset__description">${x(e.description)}</div>
|
|
2116
|
-
`:o.showDescription?s.html`
|
|
2116
|
+
`:s.html``:o.showDescription?s.html`
|
|
2117
2117
|
<div class="ol-asset__description">${e.description}</div>
|
|
2118
|
-
`:s.html``:s.html``}renderPrice(e){if(e.type!=="product")return s.html``;let
|
|
2118
|
+
`:s.html``:s.html``}renderPrice(e,o){if(e.type!=="product"||!o.showPrice)return s.html``;let t=e;return t.price?s.html`
|
|
2119
2119
|
<div class="ol-asset__price">
|
|
2120
|
-
${
|
|
2120
|
+
${t.currency} ${t.price}
|
|
2121
2121
|
</div>
|
|
2122
2122
|
`:s.html``}renderMetadata(e,o){if(!o.showMetadata)return s.html``;let t=[];if(o.showSize&&e.type!=="faq"&&"size"in e&&e.size&&typeof e.size=="number"&&t.push(s.html`
|
|
2123
2123
|
<div class="ol-asset__meta-item">
|
|
@@ -2164,7 +2164,7 @@ video::-webkit-media-text-track-display {
|
|
|
2164
2164
|
</div>
|
|
2165
2165
|
`:s.html``}renderModalContent(e){switch(e.type){case"multimedia":{let o=e,t=this.getMultimediaSubtype(o);return t==="image"?s.html`
|
|
2166
2166
|
<img
|
|
2167
|
-
src="${(0,
|
|
2167
|
+
src="${(0,j.ifDefined)(o.url)}"
|
|
2168
2168
|
alt="${o.name}"
|
|
2169
2169
|
class="ol-asset__modal-image"
|
|
2170
2170
|
/>
|
|
@@ -2180,7 +2180,7 @@ video::-webkit-media-text-track-display {
|
|
|
2180
2180
|
</div>
|
|
2181
2181
|
`}case"file":{let o=e,t=this.getMultimediaSubtype(o);return t==="image"?s.html`
|
|
2182
2182
|
<img
|
|
2183
|
-
src="${(0,
|
|
2183
|
+
src="${(0,j.ifDefined)(o.url)}"
|
|
2184
2184
|
alt="${o.name}"
|
|
2185
2185
|
class="ol-asset__modal-image"
|
|
2186
2186
|
/>
|
|
@@ -2203,12 +2203,12 @@ video::-webkit-media-text-track-display {
|
|
|
2203
2203
|
<h3 class="ol-asset__modal-title">${e.name}</h3>
|
|
2204
2204
|
${e.description?s.html`<p class="ol-asset__modal-description">${e.description}</p>`:s.html``}
|
|
2205
2205
|
</div>
|
|
2206
|
-
`}}renderHoverOverlay(e,o,t,n){let
|
|
2206
|
+
`}}renderHoverOverlay(e,o,t,n,l){let a=e.type==="multimedia"&&this.getMultimediaSubtype(e)==="video",Y=(e.type==="multimedia"||e.type==="file")&&this.getMultimediaSubtype(e)==="presentation"&&(!e.slides||e.slides.length===0);return a?s.html`
|
|
2207
2207
|
<div class="ol-asset__video-controls">
|
|
2208
|
-
${(0,
|
|
2208
|
+
${(0,v.when)(t,()=>s.html`
|
|
2209
2209
|
<ol-button
|
|
2210
2210
|
class="ol-asset__video-btn ol-asset__video-btn--maximize"
|
|
2211
|
-
@click=${
|
|
2211
|
+
@click=${r=>{r.stopPropagation(),t(e)}}
|
|
2212
2212
|
title="Maximize ${e.name}"
|
|
2213
2213
|
>
|
|
2214
2214
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -2216,14 +2216,14 @@ video::-webkit-media-text-track-display {
|
|
|
2216
2216
|
</svg>
|
|
2217
2217
|
</ol-button>
|
|
2218
2218
|
`)}
|
|
2219
|
-
${(0,
|
|
2219
|
+
${(0,v.when)(o,()=>s.html`
|
|
2220
2220
|
<ol-button
|
|
2221
2221
|
class="ol-asset__video-btn ol-asset__video-btn--download ${n?"ol-asset__video-btn--downloading":""}"
|
|
2222
|
-
@click=${
|
|
2222
|
+
@click=${r=>{r.stopPropagation(),o(e)}}
|
|
2223
2223
|
title="Download ${e.name}"
|
|
2224
2224
|
?disabled=${n}
|
|
2225
2225
|
>
|
|
2226
|
-
${(0,
|
|
2226
|
+
${(0,v.when)(n,()=>s.html`
|
|
2227
2227
|
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="ol-asset__download-spinner">
|
|
2228
2228
|
<circle cx="12" cy="12" r="10"></circle>
|
|
2229
2229
|
<path d="M12 2a10 10 0 0 1 10 10"></path>
|
|
@@ -2241,10 +2241,10 @@ video::-webkit-media-text-track-display {
|
|
|
2241
2241
|
`:s.html`
|
|
2242
2242
|
<div class="ol-asset__hover-overlay">
|
|
2243
2243
|
<div class="ol-asset__hover-buttons">
|
|
2244
|
-
${(0,
|
|
2244
|
+
${(0,v.when)(e.type==="product",()=>s.html`
|
|
2245
2245
|
<ol-button
|
|
2246
2246
|
class="ol-asset__hover-btn ol-asset__hover-btn--external"
|
|
2247
|
-
@click=${
|
|
2247
|
+
@click=${r=>{r.stopPropagation(),e.url&&(l?l(e.url):window.open(e.url,"_blank","noopener,noreferrer"))}}
|
|
2248
2248
|
title="Open ${e.name} in new window"
|
|
2249
2249
|
>
|
|
2250
2250
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -2254,10 +2254,10 @@ video::-webkit-media-text-track-display {
|
|
|
2254
2254
|
</svg>
|
|
2255
2255
|
</ol-button>
|
|
2256
2256
|
`,()=>s.html`
|
|
2257
|
-
${(0,
|
|
2257
|
+
${(0,v.when)(t&&!Y,()=>s.html`
|
|
2258
2258
|
<ol-button
|
|
2259
2259
|
class="ol-asset__hover-btn ol-asset__hover-btn--maximize"
|
|
2260
|
-
@click=${
|
|
2260
|
+
@click=${r=>{r.stopPropagation(),t(e)}}
|
|
2261
2261
|
title="Maximize ${e.name}"
|
|
2262
2262
|
>
|
|
2263
2263
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
|
@@ -2265,14 +2265,14 @@ video::-webkit-media-text-track-display {
|
|
|
2265
2265
|
</svg>
|
|
2266
2266
|
</ol-button>
|
|
2267
2267
|
`)}
|
|
2268
|
-
${(0,
|
|
2268
|
+
${(0,v.when)(o&&["multimedia","file"].includes(e.type),()=>s.html`
|
|
2269
2269
|
<ol-button
|
|
2270
2270
|
class="ol-asset__hover-btn ol-asset__hover-btn--download ${n?"ol-asset__hover-btn--downloading":""}"
|
|
2271
|
-
@click=${
|
|
2271
|
+
@click=${r=>{r.stopPropagation(),o(e)}}
|
|
2272
2272
|
title="Download ${e.name}"
|
|
2273
2273
|
?disabled=${n}
|
|
2274
2274
|
>
|
|
2275
|
-
${(0,
|
|
2275
|
+
${(0,v.when)(n,()=>s.html`
|
|
2276
2276
|
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" class="ol-asset__download-spinner">
|
|
2277
2277
|
<circle cx="12" cy="12" r="10"></circle>
|
|
2278
2278
|
<path d="M12 2a10 10 0 0 1 10 10"></path>
|
|
@@ -2289,4 +2289,4 @@ video::-webkit-media-text-track-display {
|
|
|
2289
2289
|
`)}
|
|
2290
2290
|
</div>
|
|
2291
2291
|
</div>
|
|
2292
|
-
`}
|
|
2292
|
+
`}};0&&(module.exports={AssetRenderer});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.199 | © 2026 Onlive.ai */
|
|
2
2
|
import { TemplateResult } from 'lit';
|
|
3
3
|
import '../player/player.cjs';
|
|
4
4
|
import { IAsset, AssetDisplayOptions } from './asset.types.cjs';
|
|
@@ -7,7 +7,7 @@ declare class AssetRenderer {
|
|
|
7
7
|
private formatFileSize;
|
|
8
8
|
private formatDuration;
|
|
9
9
|
private getMultimediaSubtype;
|
|
10
|
-
renderThumbnail(asset: IAsset, options: AssetDisplayOptions, onDownload?: (asset: IAsset) => void, isDownloading?: boolean, onMaximize?: (asset: IAsset) => void): TemplateResult;
|
|
10
|
+
renderThumbnail(asset: IAsset, options: AssetDisplayOptions, onDownload?: (asset: IAsset) => void, isDownloading?: boolean, onMaximize?: (asset: IAsset) => void, onOpenLink?: (url: string) => void): TemplateResult;
|
|
11
11
|
private renderThumbnailContent;
|
|
12
12
|
private renderVideoThumbnail;
|
|
13
13
|
private renderPresentationThumbnail;
|
|
@@ -23,7 +23,6 @@ declare class AssetRenderer {
|
|
|
23
23
|
renderModal(asset: IAsset, isOpen: boolean, onClose: () => void): TemplateResult;
|
|
24
24
|
private renderModalContent;
|
|
25
25
|
private renderHoverOverlay;
|
|
26
|
-
private openProductInNewWindow;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
export { AssetRenderer };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @onlive.ai/common-121 v0.2.
|
|
1
|
+
/*! @onlive.ai/common-121 v0.2.199 | © 2026 Onlive.ai */
|
|
2
2
|
import { TemplateResult } from 'lit';
|
|
3
3
|
import '../player/player.js';
|
|
4
4
|
import { IAsset, AssetDisplayOptions } from './asset.types.js';
|
|
@@ -7,7 +7,7 @@ declare class AssetRenderer {
|
|
|
7
7
|
private formatFileSize;
|
|
8
8
|
private formatDuration;
|
|
9
9
|
private getMultimediaSubtype;
|
|
10
|
-
renderThumbnail(asset: IAsset, options: AssetDisplayOptions, onDownload?: (asset: IAsset) => void, isDownloading?: boolean, onMaximize?: (asset: IAsset) => void): TemplateResult;
|
|
10
|
+
renderThumbnail(asset: IAsset, options: AssetDisplayOptions, onDownload?: (asset: IAsset) => void, isDownloading?: boolean, onMaximize?: (asset: IAsset) => void, onOpenLink?: (url: string) => void): TemplateResult;
|
|
11
11
|
private renderThumbnailContent;
|
|
12
12
|
private renderVideoThumbnail;
|
|
13
13
|
private renderPresentationThumbnail;
|
|
@@ -23,7 +23,6 @@ declare class AssetRenderer {
|
|
|
23
23
|
renderModal(asset: IAsset, isOpen: boolean, onClose: () => void): TemplateResult;
|
|
24
24
|
private renderModalContent;
|
|
25
25
|
private renderHoverOverlay;
|
|
26
|
-
private openProductInNewWindow;
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
export { AssetRenderer };
|