@letscooee/web-sdk 14.8.14 → 14.8.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{debugger.component-BVmV8uLR-DKSl3qyR.js → debugger.component-CG_-S7Xf-Ba7jb9DY.js} +3 -3
- package/dist/main.min.js +13 -13
- package/dist/{share-dialog.component-DTSZGkaQ-C0mBoURt.js → share-dialog.component-DKEiudMg-D6mR2OHb.js} +3 -3
- package/dist/video-detail-dialog.component-B5lH46XS-B8JpGuln.js +14 -0
- package/dist/widgets-CmUGXjul-BcJ9RFFl.js +45 -0
- package/package.json +1 -1
- package/dist/video-detail-dialog.component-BjclKNn4-BXDFWVsO.js +0 -14
- package/dist/widgets-iZYl_Yo7-B8AgKdhM.js +0 -45
- /package/dist/{renderer-CjnWwC-I-CX-sySv6.js → renderer-D7IHCPuE-CX-sySv6.js} +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './main.min.js';
|
|
2
|
-
import {
|
|
3
|
-
import { l, f } from './video-detail-dialog.component-
|
|
2
|
+
import { h as g, W, G as Ge, K as Ke, g as gf, y as ye, i as nc, b as Sv, r as rc, L as Lf, j as bf } from './widgets-CmUGXjul-BcJ9RFFl.js';
|
|
3
|
+
import { l, f } from './video-detail-dialog.component-B5lH46XS-B8JpGuln.js';
|
|
4
4
|
|
|
5
|
-
var _=class d{dialogRef=g(W);eventData=g(Ge);triggerData=g(Ke)().triggerData;onShareAndClose(p,o){p.stopPropagation();let{url:t,text:a}=l(this.triggerData,this.eventData.video,o!==`Clipboard`);switch(o){case `Whatsapp`:window.open(`https://wa.me/?text=${a}%20${t}`,`_blank`,`noopener,noreferrer`);break;case `X(Twitter)`:window.open(`https://x.com/intent/post?text=${a}&url=${t}`,`_blank`,`noopener,noreferrer`);break;case `Clipboard`:navigator.clipboard.writeText(t).catch(()=>{let e=document.createElement(`textarea`);e.value=t,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e);});break;}o&&f(this.triggerData,this.eventData.video,this.eventData.index,o),this.dialogRef.close();}static ɵfac=function(o){return new(o||d)};static ɵcmp=
|
|
5
|
+
var _=class d{dialogRef=g(W);eventData=g(Ge);triggerData=g(Ke)().triggerData;onShareAndClose(p,o){p.stopPropagation();let{url:t,text:a}=l(this.triggerData,this.eventData.video,o!==`Clipboard`);switch(o){case `Whatsapp`:window.open(`https://wa.me/?text=${a}%20${t}`,`_blank`,`noopener,noreferrer`);break;case `X(Twitter)`:window.open(`https://x.com/intent/post?text=${a}&url=${t}`,`_blank`,`noopener,noreferrer`);break;case `Clipboard`:navigator.clipboard.writeText(t).catch(()=>{let e=document.createElement(`textarea`);e.value=t,document.body.appendChild(e),e.select(),document.execCommand(`copy`),document.body.removeChild(e);});break;}o&&f(this.triggerData,this.eventData.video,this.eventData.index,o),this.dialogRef.close();}static ɵfac=function(o){return new(o||d)};static ɵcmp=gf({type:d,selectors:[[`cooee-share-dialog`]],decls:19,vars:0,consts:[[1,`share-dialog`],[1,`share-dialog-header`],[`type`,`button`,`aria-label`,`Close`,1,`close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`],[1,`share-options`],[`type`,`button`,`aria-label`,`Share on WhatsApp`,1,`share-option`,3,`click`],[`name`,`whatsapp`,`aria-hidden`,`true`],[`type`,`button`,`aria-label`,`Share on X`,1,`share-option`,3,`click`],[`name`,`x-twitter`,`aria-hidden`,`true`],[`type`,`button`,`aria-label`,`Copy link`,1,`share-option`,3,`click`],[`name`,`copy`,`aria-hidden`,`true`]],template:function(o,t){o&1&&(nc(0,`div`,0)(1,`div`,1)(2,`h3`),Sv(3,`Share`),rc(),nc(4,`button`,2),Lf(`click`,function(e){return t.onShareAndClose(e)}),bf(5,`cooee-icon`,3),rc()(),nc(6,`div`,4)(7,`button`,5),Lf(`click`,function(e){return t.onShareAndClose(e,`Whatsapp`)}),bf(8,`cooee-icon`,6),nc(9,`span`),Sv(10,`Whatsapp`),rc()(),nc(11,`button`,7),Lf(`click`,function(e){return t.onShareAndClose(e,`X(Twitter)`)}),bf(12,`cooee-icon`,8),nc(13,`span`),Sv(14,`X`),rc()(),nc(15,`button`,9),Lf(`click`,function(e){return t.onShareAndClose(e,`Clipboard`)}),bf(16,`cooee-icon`,10),nc(17,`span`),Sv(18,`Copy link`),rc()()()());},dependencies:[ye],styles:[`@keyframes _ngcontent-%COMP%_slideInScale{0%{opacity:0;transform:scale(.9) translateY(8px)}to{opacity:1;transform:scale(1) translateY(0)}}.share-dialog[_ngcontent-%COMP%]{background:#fff;border-radius:12px;padding:20px;min-width:280px;box-shadow:0 8px 32px #00000026;color:#333;animation:_ngcontent-%COMP%_slideInScale .25s ease-out}.share-dialog-header[_ngcontent-%COMP%]{display:flex;justify-content:space-between;align-items:center;margin-bottom:20px}.share-dialog-header[_ngcontent-%COMP%] h3[_ngcontent-%COMP%]{font-family:var(--lc-heading-family),serif;margin:0;font-size:18px;font-weight:600}.share-options[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:12px;font-family:var(--lc-text-family),serif}.share-option[_ngcontent-%COMP%]{display:flex;align-items:center;gap:12px;padding:12px 16px;background:#0002;border:1px solid #e9ecef;border-radius:8px;color:#333;font-size:16px;font-weight:500;cursor:pointer;transition:all .2s ease}.share-option[_ngcontent-%COMP%]:hover{background:#0004;border-color:#dee2e6;transform:translateY(-1px)}.share-option[_ngcontent-%COMP%]:active{transform:translateY(0)}.share-option[_ngcontent-%COMP%] cooee-icon[_ngcontent-%COMP%]{width:24px;height:24px}.share-option[_ngcontent-%COMP%] cooee-icon[name=whatsapp][_ngcontent-%COMP%]{color:#25d366}.share-option[_ngcontent-%COMP%] cooee-icon[name=x-twitter][_ngcontent-%COMP%], .share-option[_ngcontent-%COMP%] cooee-icon[name=copy][_ngcontent-%COMP%]{color:#000}.share-option[_ngcontent-%COMP%] span[_ngcontent-%COMP%]{flex:1;text-align:left}button.close-button[_ngcontent-%COMP%]{background-color:transparent;border:none}button.close-button[_ngcontent-%COMP%] cooee-icon[name=close][_ngcontent-%COMP%]{border-radius:100%;color:#000}`]})};
|
|
6
6
|
|
|
7
7
|
export { _ as ShareDialogComponent };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { I as Ir, V as Ve, H as He, s as se, M, t, D as Dr, l as l$1, O, a as Hi, c as ce, Y, b as V } from './main.min.js';
|
|
2
|
+
import { l as jt, h as g, m as Ye, p as be, G as Ge, W, g as gf, q as Kt, z as zt, s as qt, t as KE, u as YE, w as Wt, x as $t, y as ye, i as nc, L as Lf, A as ic, V as VD, C as Ko, r as rc, E as Ef, D as tv, M as Mf, v as vd, H as HD, F as ac, J as Hf, N as $f, T as TN, R as Ro, K as Ke, O as Wt$1, j as bf, S as SN, U as Ss, Y as Yo, o as oc, Q as Qo, Z as cc, _ as Sf, a0 as WD, a1 as LD, a2 as Iu, a3 as wu, a4 as KD, a5 as PD, a6 as Af, a7 as xv, a8 as op, a9 as rp, aa as Nv, ab as Uv, ac as hm } from './widgets-CmUGXjul-BcJ9RFFl.js';
|
|
3
|
+
|
|
4
|
+
var f=(t,e,o,r)=>{if(!e)return;let i=new Ir(`CE Video Shared`,{current:{videoID:e.id,videoIndex:o},platform:r},t);window.CooeeSDK.sendEvent(i);},l=(t,e,o=true)=>{let r=o?encodeURIComponent(m(t,e)):m(t,e),n=`Hey! Check out this video for an amazing product -`;return {url:r,text:o?encodeURIComponent(n):n}},m=(t,e)=>{return Ve(He(window.location.href,t),e)};
|
|
5
|
+
|
|
6
|
+
var S=class n{video=SN.required();progress=jt(0);constructor(){Ss(t=>{let e=this.video(),o=()=>{this.progress.set(e.currentTime/e.duration*100);};e.addEventListener(`timeupdate`,o),t(()=>{e.removeEventListener(`timeupdate`,o);});});}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-progress-bar`]],inputs:{video:[1,`video`]},decls:3,vars:3,consts:[[1,`video-untracked-path`],[`role`,`progressbar`,1,`video-tracked-path`]],template:function(e,o){e&1&&(Yo(0,`div`,0)(1,`div`,1),oc(2,`div`),Qo()()),e&2&&(vd(),cc(`width`,o.progress(),`%`),Sf(`aria-valuenow`,o.progress()));},styles:[`[_nghost-%COMP%]{display:block;width:100%;position:absolute;z-index:10;top:4px;padding-inline:8px;box-sizing:border-box}.video-untracked-path[_ngcontent-%COMP%], .video-tracked-path[_ngcontent-%COMP%]{height:4px;border-radius:var(--lc-video-progress-bar-radius)}.video-untracked-path[_ngcontent-%COMP%]{background-color:rgba(var(--lc-video-progress-bar-bg-color));width:100%;margin-bottom:2px}.video-tracked-path[_ngcontent-%COMP%]{background-color:rgba(var(--lc-video-progress-bar-color));transition:width .5s ease-in-out}@media(prefers-reduced-motion:reduce){.video-tracked-path[_ngcontent-%COMP%]{transition:none}}`]})};var P=class n{dialogState=TN();dialog=g(Ro);triggerData=g(Ke)().triggerData;eventData=g(Ge);containerRef=g(Wt$1);async share(t){t.stopPropagation(),t.preventDefault(),M()&&V()?await this.shareNative():await this.shareWithDialog();}async shareNative(){let t=l(this.triggerData,this.eventData.video,false);await navigator.share(t),f(this.triggerData,this.eventData.video,this.eventData.index,`Native`);}async shareWithDialog(){let t=await import('./share-dialog.component-DKEiudMg-D6mR2OHb.js');this.dialogState.emit(true),this.dialog.open(t.ShareDialogComponent,{viewContainerRef:this.containerRef}).closed.subscribe(()=>this.dialogState.emit(false));}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-share-button`]],outputs:{dialogState:`dialogState`},decls:2,vars:0,consts:[[`type`,`button`,`aria-label`,`Share video`,3,`click`],[`name`,`share`]],template:function(e,o){e&1&&(nc(0,`button`,0),Lf(`click`,function(r){return o.share(r)}),bf(1,`cooee-icon`,1),rc());},dependencies:[ye],styles:[`button[_ngcontent-%COMP%]{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}button[_ngcontent-%COMP%] cooee-icon[name=share][_ngcontent-%COMP%]{color:#fff}`]})};var Te=[`swiperComp`],Ie=[`videoEl`],Se=(n,t)=>t.video.id,Pe=(n,t)=>t.url;function ke(n,t){n&1&&(nc(0,`div`,11),bf(1,`div`,15),rc());}function Me(n,t){if(n&1&&bf(0,`source`,13),n&2){let e=t.$implicit;Mf(`type`,xv(e.mimeType))(`src`,e.url);}}function Oe(n,t){n&1&&Af(0);}function Ne(n,t){if(n&1){let e=WD();nc(0,`cooee-video-promoted-items`,24),Lf(`cardClick`,function(i){Iu(e);let r=KD(2).$implicit;return wu(KD().productCardClicked(i,r.video))})(`atcSuccess`,function(){Iu(e);return wu(KD(3).onAtcSuccess())}),rc();}if(n&2){let e=KD(2).$implicit;Mf(`items`,e.video.items)(`video`,e.video);}}function Fe(n,t){if(n&1&&bf(0,`cooee-video-card`,23),n&2){let e=KD(2).$implicit;Mf(`card`,e.video.card);}}function ze(n,t){if(n&1){let e=WD();bf(0,`cooee-video-progress-bar`,16),nc(1,`div`,17)(2,`cooee-mute-toggle`,18),op(`mutedChange`,function(i){Iu(e);let r=KD(2);return Nv(r.muted,i)||(r.muted=i),wu(i)}),Lf(`toggled`,function(){Iu(e);return wu(KD(2).muteToggled())}),rc(),Ef(3,Oe,1,0,`ng-container`,8),rc(),nc(4,`div`,19)(5,`cooee-share-button`,20),Lf(`dialogState`,function(i){Iu(e);return wu(KD(2).shareDialogOpen.set(i))}),rc()(),nc(6,`div`,21),LD(7,Ne,1,2,`cooee-video-promoted-items`,22)(8,Fe,1,1,`cooee-video-card`,23),rc();}if(n&2){let e=KD().$implicit,o=tv(5),i=KD(),r=tv(9);Mf(`video`,o),vd(2),rp(`muted`,i.muted),Mf(`videoEl`,o),vd(),Mf(`ngTemplateOutlet`,r),vd(4),PD(e.video.items.length&&i.videoConfig.showItems()?7:e.video.card&&i.videoConfig.footerContent===i.VideoConfigFooterContent.CARD?8:-1);}}function Le(n,t){if(n&1){let e=WD();nc(0,`cooee-item-detail`,25),Lf(`closeClick`,function(){Iu(e);return wu(KD(2).productModalClosed())})(`atcSuccess`,function(){Iu(e);return wu(KD(2).onAtcSuccess())}),rc();}if(n&2){let e=KD(2);Mf(`item`,e.selectedItem)(`video`,e.selectedVideo)(`similarItems`,e.selectedVideo.items)(`template`,e.videoConfig.itemDetailConfig.template);}}function Ae(n,t){if(n&1){let e=WD();nc(0,`div`,6)(1,`div`,9)(2,`div`,10),LD(3,ke,2,0,`div`,11),nc(4,`video`,12,2),Lf(`click`,function(){let i=Iu(e).$index,r=KD();return wu(r.currentIndex===i&&r.toggleMute())})(`ended`,function(){Iu(e);let i=tv(5);return wu(KD().onVideoEnded(i))})(`loadstart`,function(){let i=Iu(e).$index;return wu(KD().onVideoLoadStart(i))})(`canplay`,function(){let i=Iu(e).$index;return wu(KD().onVideoCanPlay(i))}),VD(6,Me,1,3,`source`,13,Pe),rc(),LD(8,ze,9,5),rc(),LD(9,Le,1,4,`cooee-item-detail`,14),rc()();}if(n&2){let e=t.$implicit,o=t.$index,i=KD();vd(2),cc(`background-image`,e.video.thumbnail?`url(`+e.video.thumbnail+`)`:null),vd(),PD(i.shouldShowVideoSpinner(o)?3:-1),vd(),Mf(`ngClass`,i.viewTemplateClassName)(`muted`,true),Sf(`preload`,i.isVideoVisible(o)?`metadata`:`none`)(`data-video-id`,e.video.id)(`autoplay`,null),vd(2),HD(e.video.sources),vd(2),PD(i.currentIndex===o?8:-1),vd(),PD(i.selectedItem&&i.currentIndex===o?9:-1);}}function Re(n,t){n&1&&Af(0);}function Be(n,t){if(n&1){let e=WD();nc(0,`button`,26),Lf(`click`,function(){Iu(e);return wu(KD().close())}),bf(1,`cooee-icon`,27),rc();}}var Ee=class n{swiperComponent;videoElements;VideoConfigFooterContent=se;currentIndex=0;muted=jt(false);selectedItem=null;selectedVideo;detailPopupTemplate;viewTemplateClassName=`lc-video-only-view`;shareDialogOpen=jt(false);data=g(Ye);elementRef=g(be);eventData=g(Ge);dialogRef=g(W);swiperInitialized=jt(false);swiperOptions=jt(null);videoEntries=[];videoConfig;triggerContext;engagementTrigger;isMobile=M();navigationConfig;cssLoadedPromise;resizeDebouncer=new t(this.onResize.bind(this));videoLoadingStates=new Map;constructor(){this.videoEntries=this.data.videoEntries,this.currentIndex=this.data.currentIndex,this.selectedItem=this.data.selectedItem??null,this.selectedVideo=this.videoEntries[this.currentIndex]?.video,this.triggerContext=this.data.triggerContext,this.engagementTrigger=this.triggerContext.triggerData,this.videoConfig=this.engagementTrigger?.content?.videoConfig??new Dr,this.navigationConfig=new l$1({enabled:true,size:50,color:new O({h:`#000000`})}),this.cssLoadedPromise=Hi(this.elementRef.nativeElement.shadowRoot);}onKeyDown(t){t.preventDefault(),t.stopPropagation(),this.close();}async ngOnInit(){switch(this.muted.set(await ce.get(`muted`,false)),this.videoConfig.detailPopup.template){case `PRODUCT_DETAIL_VIEW`:this.selectItemForDetailView(),this.viewTemplateClassName=`lc-product-detail-view`;break;case `VIDEO_ONLY_VIEW`:this.viewTemplateClassName=`lc-video-only-view`;break}}ngAfterViewInit(){this.initializeSwiperWithVideoDimensions();}ngOnDestroy(){this.resizeDebouncer?.destroy();}initializeSwiperWithVideoDimensions(){this.applyOptimalVideoDimensions(),this.initSwiperOptions(),this.playActiveVideo(false);}close(){let t=this.getCurrentVideoElement();this.dialogRef.close({lastVideo:this.videoEntries[this.currentIndex].video,lastVideoIndex:this.currentIndex,lastVideoDuration:t?.currentTime});}getCurrentVideoElement(){return this.videoElements.get(this.currentIndex)?.nativeElement}moveToNextVideo(){this.swiperComponent.swiper.slideTo(this.currentIndex+1);}productModalClosed(){this.selectedItem=null;}onAtcSuccess(){this.videoConfig.detailPopup.closeDialogOnAtc&&this.close();}pauseAll(){this.videoElements.forEach(t=>t.nativeElement.pause());}toggleMute(){this.muted.update(t=>!t);}async muteToggled(){await ce.set(`muted`,this.muted());let e=[this.muted()?`CE Video Muted`:`CE Video Unmuted`,{current:this.currentVideoProps()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(e);}playActiveVideo(t=true){t&&this.pauseAll();let e=this.getCurrentVideoElement();e&&this.playVideo(e);}playVideo(t){t.currentTime=0,t.play().catch(e=>Y.error(e));}onVideoEnded(t){if(this.currentIndex<this.videoEntries.length-1)this.selectedItem||this.shareDialogOpen()?this.playVideo(t):this.moveToNextVideo();else {let o=[`CE Last Video Ended`,{previous:this.getPreviousVideoDataForEvent()},{triggerData:this.engagementTrigger}];window.CooeeSDK.events.push(o),this.playVideo(t);}}onSlideChange(t){let e=this.getPreviousVideoDataForEvent();this.currentIndex=t.realIndex,this.selectedVideo=this.videoEntries[this.currentIndex].video,this.eventData.video=this.selectedVideo,this.eventData.index=this.currentIndex,this.playActiveVideo(),this.isProductDetailView()?this.selectItemForDetailView():this.selectedItem=null;let r=new Ir(`CE Video Changed`,{previous:e,current:this.currentVideoProps()},this.engagementTrigger);r.setVideos(this.videoEntries[this.currentIndex].video),window.CooeeSDK.sendEvent(r);}productCardClicked(t,e){let i=new Ir(`CE More Item Info Clicked`,{current:{videoID:e.id,videoIndex:this.currentIndex}},this.engagementTrigger);i.setVideos(e),window.CooeeSDK.sendEvent(i),this.selectedItem=t;}onVideoLoadStart(t){this.videoLoadingStates.set(t,true);}onVideoCanPlay(t){this.videoLoadingStates.set(t,false);}shouldShowVideoSpinner(t){return this.swiperInitialized()?this.videoLoadingStates.get(t)===true&&this.isVideoVisible(t):this.isVideoVisible(t)}isVideoVisible(t){let e=this.currentIndex-1,o=this.currentIndex+1;return t===this.currentIndex||t===e||t===o}async initSwiperOptions(){await this.cssLoadedPromise;let t=this.isMobile?1:`auto`,e=0;this.isProductDetailView()&&(t=`auto`,e=10),this.swiperOptions.set({direction:this.isMobile?`vertical`:`horizontal`,effect:this.isMobile?`slide`:`coverflow`,slidesPerView:t,initialSlide:this.currentIndex,centeredSlides:true,spaceBetween:e,coverflowEffect:{rotate:0,stretch:0,depth:400,modifier:1,slideShadows:false},on:{init:o=>{this.swiperInitialized.set(true),setTimeout(()=>{o.update();},100);}},mousewheel:{enabled:!this.isMobile,invert:false,thresholdDelta:20}});}isProductDetailView(){return this.videoConfig.detailPopup.template===`PRODUCT_DETAIL_VIEW`}currentVideoProps(){return {videoID:this.videoEntries[this.currentIndex].video.id,videoIndex:this.currentIndex}}getPreviousVideoDataForEvent(){let t=this.currentVideoProps(),e=this.videoElements.find(i=>i.nativeElement.dataset.videoId===this.videoEntries[this.currentIndex].video.id)?.nativeElement;t.playedTillMS=Math.ceil(e?.currentTime*1e3);let o=e?.duration*1e3;return t.playedTillPercent=+(t.playedTillMS/o).toFixed(4),t}selectItemForDetailView(){this.selectedItem=this.isMobile?null:this.selectedVideo?.items?.[0]??null;}applyOptimalVideoDimensions(){if(this.isMobile||this.isProductDetailView())return;let t=this.calculateOptimalVideoDimensions();t&&this.setVideoContainerDimensions(t.width,t.height);}calculateOptimalVideoDimensions(){let t=this.videoEntries.map(g=>g.video.sources?.[0]).filter(g=>g?.width&&g?.height).map(g=>({width:g.width,height:g.height,aspectRatio:g.width/g.height}));if(t.length===0)return null;let e=t[0],o=window.innerWidth*.9,i=window.innerHeight*.9,r=o/e.width,k=i/e.height,R=Math.min(r,k);return {width:Math.floor(e.width*R),height:Math.floor(e.height*R)}}setVideoContainerDimensions(t,e){let o=this.elementRef.nativeElement;o.style.setProperty(`--video-container-width`,`${t}px`),o.style.setProperty(`--video-container-height`,`${e}px`);}onResize(){this.applyOptimalVideoDimensions();}static ɵfac=function(e){return new(e||n)};static ɵcmp=gf({type:n,selectors:[[`cooee-video-detail-dialog`]],viewQuery:function(e,o){if(e&1&&ac(Te,7)(Ie,5),e&2){let i;Hf(i=$f())&&(o.swiperComponent=i.first),Hf(i=$f())&&(o.videoElements=i);}},hostAttrs:[1,`letscooee-widget`],hostBindings:function(e,o){e&1&&Lf(`keydown.escape`,function(r){return o.onKeyDown(r)},hm);},decls:10,vars:4,consts:[[`swiperComp`,``],[`closeButtonTemplate`,``],[`videoEl`,``],[1,`lc-shadow-inner`,3,`ngClass`],[1,`video-swiper`,3,`slideChange`,`options`,`navigationConfig`],[`ngProjectAs`,`swiper-slides`,5,[`swiper-slides`]],[1,`swiper-slide`,`video-slide`],[1,`lc-desktop-controls`],[4,`ngTemplateOutlet`],[1,`lc-video-modal-row`],[1,`lc-video-container`],[1,`video-loading-overlay`],[`playsinline`,``,1,`lc-video-el`,3,`click`,`ended`,`loadstart`,`canplay`,`ngClass`,`muted`],[3,`src`,`type`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`item`,`video`,`similarItems`,`template`],[1,`loading-spinner`],[3,`video`],[1,`lc-video-controls`],[3,`mutedChange`,`toggled`,`muted`,`videoEl`],[1,`share-controls`],[3,`dialogState`],[1,`lc-card-container`],[3,`items`,`video`],[3,`card`],[3,`cardClick`,`atcSuccess`,`items`,`video`],[1,`swiper-no-swiping`,`swiper-no-mousewheel`,3,`closeClick`,`atcSuccess`,`item`,`video`,`similarItems`,`template`],[`type`,`button`,`aria-label`,`Close`,1,`lc-close-button`,3,`click`],[`name`,`close`,`aria-hidden`,`true`]],template:function(e,o){if(e&1&&(nc(0,`div`,3)(1,`cooee-swiper`,4,0),Lf(`slideChange`,function(r){return o.onSlideChange(r)}),ic(3,5),VD(4,Ae,10,10,`div`,6,Se),Ko(),rc(),nc(6,`div`,7),Ef(7,Re,1,0,`ng-container`,8),rc()(),Ef(8,Be,2,0,`ng-template`,null,1,Uv)),e&2){let i=tv(9);Mf(`ngClass`,o.viewTemplateClassName),vd(),Mf(`options`,o.swiperOptions())(`navigationConfig`,o.navigationConfig),vd(3),HD(o.videoEntries),vd(3),Mf(`ngTemplateOutlet`,i);}},dependencies:[Kt,zt,qt,P,S,KE,YE,Wt,$t,ye],styles:[`:host{display:flex}.lc-shadow-inner{position:relative;width:100vw;height:100vh;display:flex}@media(min-width:768px){.lc-shadow-inner{background-color:color-mix(in oklab,#000 70%,transparent);justify-content:center;align-items:center}}.video-swiper{--swiper-navigation-size: 50px;--swiper-navigation-color: white;width:100dvw;height:100dvh}.lc-product-detail-view .video-swiper{align-items:center}@media(min-width:768px){.video-swiper{width:100%;height:100%;max-width:90vw;max-height:90vh}}.video-swiper>.swiper-wrapper{max-height:100%;pointer-events:none}.lc-product-detail-view .video-swiper>.swiper-wrapper{align-items:center}@media(max-width:768px){.video-swiper>.swiper-button-prev{display:none!important}}@media(max-width:768px){.video-swiper>.swiper-button-next{display:var(--lc-next-video-button-display)!important;width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent);color:#fff;inset:auto auto 12px 50%;transform:translate(-50%) rotate(90deg)}.video-swiper>.swiper-button-next:after{color:#fff;font-weight:900}}.video-swiper:has(cooee-item-detail)>.swiper-button-next{display:none!important}.video-slide{position:relative;display:flex;align-items:center;visibility:hidden;pointer-events:auto}.lc-product-detail-view .video-slide{width:40vw!important;height:70vh!important}@media(min-width:768px){.lc-product-detail-view .video-slide{min-width:650px!important}}@media(max-width:768px){.lc-product-detail-view .video-slide{width:100%!important;height:100%!important}}@media(min-width:768px){.lc-video-only-view .video-slide{width:fit-content!important}}@media(min-width:768px){.video-slide{border-radius:var(--lc-media-radius);overflow:hidden}}.video-slide.swiper-slide-active,.video-slide.swiper-slide-prev,.video-slide.swiper-slide-next{visibility:visible}video{width:100%;height:100%;object-fit:cover;position:relative;z-index:3}.lc-desktop-controls{position:absolute;top:2rem;right:4rem;z-index:10;display:flex;gap:.5rem}@media(max-width:768px){.lc-desktop-controls{display:none}}.lc-video-controls{position:absolute;top:1rem;z-index:10;right:.5rem;display:flex;gap:.25rem}@media(min-width:768px){.lc-video-controls .lc-close-button{display:none}}.share-controls{position:absolute;bottom:30%;right:.5rem;z-index:10;display:flex;gap:.25rem;flex-direction:column;justify-content:center;align-items:center}.lc-close-button{width:var(--lc-icon-button-size, 44px);height:var(--lc-icon-button-size, 44px);display:flex;justify-content:center;align-items:center;border:none;border-radius:100%;background:#00000080;background:color-mix(in oklab,#000 50%,transparent)}.lc-video-container{position:relative;height:100%;width:100%;background:#000000b3 no-repeat center;background-size:cover}@media(min-width:768px){.lc-product-detail-view .lc-video-container{width:50%}}@media(min-width:768px){.lc-video-only-view .lc-video-container{width:var(--video-container-width, 100%);height:var(--video-container-height, 100%)}}.lc-card-container{position:absolute;bottom:12px;z-index:10;width:100%;padding-inline:12px;box-sizing:border-box}.lc-product-detail-view .lc-card-container{display:none}@media(max-width:768px){.lc-product-detail-view .lc-card-container{display:block}}.lc-product-detail-view .lc-video-modal-row{display:flex;justify-content:center;height:100%;width:100%}.lc-video-only-view .lc-video-modal-row{display:block;height:100%}.lc-product-detail-view cooee-item-detail{--header-display: none;width:50%;flex:1}@media(max-width:768px){.lc-product-detail-view cooee-item-detail{--header-display: flex;width:100%;height:70dvh;position:absolute;bottom:0;z-index:2147483646}}.lc-video-only-view cooee-item-detail{width:100%;height:70dvh;z-index:2147483646;bottom:0;position:absolute;border-radius:var(--lc-card-radius) var(--lc-card-radius) 0 0}@keyframes spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.video-loading-overlay{position:absolute;top:0;left:0;width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:#0000004d;z-index:2}.video-loading-overlay .loading-spinner{width:30px;height:30px;border:3px solid rgba(255,255,255,.3);border-top:3px solid #fff;border-radius:50%;animation:spin 1s linear infinite}
|
|
7
|
+
`],encapsulation:3})};
|
|
8
|
+
|
|
9
|
+
var videoDetailDialog_componentB5lH46XS = /*#__PURE__*/Object.freeze({
|
|
10
|
+
__proto__: null,
|
|
11
|
+
VideoDetailDialogComponent: Ee
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
export { f, l, videoDetailDialog_componentB5lH46XS as v };
|