1"use strict";(self.webpackChunkmattermost_webapp=self.webpackChunkmattermost_webapp||[]).push([[3891],{63891(e,t,a){a.r(t),a.d(t,{default:()=>d}),a(43617),a(81975),a(93991);var l=a(36418),o=a(14778),n=a(85406),s=a(14696),r=a(37266);const i=e=>{let{content:t}=e;const a=(0,o.useIntl)(),n=(0,l.useRef)(null),[s,i]=(0,l.useState)(!1),[c,d]=(0,l.useState)(!1),m=()=>{i(!0),n.current?.play()};return l.createElement("div",{className:"preview-modal-content"},t.skuLabel&&t.skuLabel.defaultMessage&&l.createElement("div",{className:"preview-modal-content__sku-label"},l.createElement(r.A,{className:"preview-modal-content__sku-label-logo"}),l.createElement("span",null,a.formatMessage(t.skuLabel))),l.createElement("h2",{className:"preview-modal-content__title"},a.formatMessage(t.title)),l.createElement("div",{className:"preview-modal-content__subtitle"},a.formatMessage(t.subtitle)),t.videoUrl&&l.createElement("div",{className:"preview-modal-content__media-container"},t.videoUrl?t.videoUrl.endsWith(".mp4")||t.videoUrl.endsWith(".webm")||t.videoUrl.endsWith(".mov")?l.createElement("div",{className:"custom-video-wrapper",onMouseEnter:()=>s&&d(!0),onMouseLeave:()=>d(!1)},l.createElement("video",{ref:n,src:t.videoUrl,poster:t.videoPoster,controls:s&&c,loop:!0,"data-testid":"video-element",onClick:()=>{s||m()},onPause:()=>{i(!1)},onPlay:()=>i(!0)},l.createElement("track",{kind:"captions"})),!s&&l.createElement("button",{className:"custom-play-button",onClick:m,"aria-label":a.formatMessage({id:"cloud_preview_modal.play_video",defaultMessage:"Play video"})},l.createElement("svg",{width:"48",height:"48",viewBox:"0 0 48 48",fill:"none"},l.createElement("circle",{cx:"24",cy:"24",r:"24",fill:"rgba(255,255,255,0.9)"}),l.createElement("polygon",{points:"20,16 34,24 20,32",fill:"#1e3a8a"})))):(t.videoUrl.endsWith(".jpg")||t.videoUrl.endsWith(".jpeg")||t.videoUrl.endsWith(".png")||t.videoUrl.endsWith(".gif")||t.videoUrl.endsWith(".webp"),l.createElement("img",{src:t.videoUrl,alt:a.formatMessage(t.title)})):null))};var c=a(35561);const d=e=>{let{show:t,onClose:a,contentData:r}=e;const d=(0,o.useIntl)(),[m,u]=(0,l.useState)(0),v=r||c.j.filter((e=>"mission-ops"===e.useCase)),p=(0,l.useCallback)((()=>{u((e=>Math.max(0,e-1)))}),[]),g=(0,l.useCallback)((()=>{u((e=>Math.min(v.length-1,e+1)))}),[v.length]),_=(0,l.useCallback)((()=>{a()}),[a]),w=0===m,b=m===v.length-1;if(0===v.length)return null;const f=l.createElement("div",{className:"preview-modal-controller__footer"},l.createElement("div",{className:"preview-modal-controller__pagination"},l.createElement("div",{className:"preview-modal-controller__pagination-dots","data-testid":"pagination-dots"},v.map(((e,t)=>l.createElement("div",{key:`dot-${t}`,className:"preview-modal-controller__dot "+(t===m?"preview-modal-controller__dot--active":"")})))),l.createElement("span",{className:"preview-modal-controller__page-counter"},m+1,"/",v.length)),l.createElement("div",{className:"preview-modal-controller__navigation-buttons"},w&&l.createElement("button",{className:"btn btn-quaternary",onClick:_},d.formatMessage({id:"cloud_preview_modal.skip",defaultMessage:"Skip for now"})),!w&&l.createElement("button",{className:"btn btn-tertiary",onClick:p},l.createElement(n.ArrowLeftIcon,{size:18}),d.formatMessage({id:"cloud_preview_modal.previous",defaultMessage:"Previous"})),l.createElement("button",{className:"btn btn-primary",onClick:b?a:g},b?d.formatMessage({id:"cloud_preview_modal.done",defaultMessage:"Finish"}):l.createElement(l.Fragment,null,d.formatMessage({id:"cloud_preview_modal.next",defaultMessage:"Next"}),l.createElement(n.ArrowRightIcon,{size:18})))));return l.createElement(s.zW,{show:t,onHide:a,compassDesign:!0,enforceFocus:!0,ariaLabel:d.formatMessage({id:"cloud_preview_modal.aria_label",defaultMessage:"Cloud Preview Introduction"}),showHeader:!0,showCloseButton:!0,bodyPadding:!0,footerContent:f,className:"preview-modal-controller"},l.createElement(i,{content:v[m]}))}}}]); 2//# sourceMappingURL=3891.a054b332ac997a20933b.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.