@soul-refiner/design-system 2.14.187 → 2.14.189
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/components/editor/editor.js +3 -3
- package/dist/components/media/video-player/video.js +2 -2
- package/dist/src/components/editor/editor.d.ts.map +1 -1
- package/dist/src/components/media/video-player/video.d.ts +6 -1
- package/dist/src/components/media/video-player/video.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var e=require("react/jsx-runtime"),
|
|
2
|
+
"use strict";var e=require("react/jsx-runtime"),t=require("react"),i=require("react-dom"),o=require("styled-components"),n=require("@udecode/plate-common"),l=require("./constants.js"),r=require("./context.js"),a=require("./navbar/navbar.js"),s=require("./plugins/plate.js"),h=require("./plugins/blocks/blocks.js"),g=require("./plugins/leafs/leafs.js"),d=require("./plugins/marks/marks.js"),u=require("./plugins/utils/utils.js"),c=require("./plugins/highlights/use-highlights.js"),p=require("./plugins/highlights/highlight-decoration.js"),m=require("./plugins/highlights/floating-highlight-toolbar.js"),f=require("./plugins/highlights/highlight-button.js"),v=require("./plugins/highlights/highlights-dropdown.js");function x(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var b=x(t);const j=n.createPlugins([...h.blocks,...g.leafs,...d.marks,...u.utils],{components:s.plateUI}),H=({decorate:t,enableHighlighting:i,editable:o,highlights:r,addHighlight:a,updateHighlight:s,removeHighlight:h,hasHighlights:g,onOpenNotes:d})=>{const u=n.useEditorRef(),c=b.default.useCallback((e,t)=>{a(u,e,t)},[u,a]),p=b.default.useCallback((e,t)=>{s(e,{color:t})},[s]);return e.jsxs(e.Fragment,{children:[e.jsx(n.PlateContent,{id:"main",autoFocus:!0,placeholder:l.PLACEHOLDER,readOnly:!o,spellCheck:!0,decorate:t,onContextMenu:e=>e.preventDefault(),onCopy:e=>{e.preventDefault(),"clipboard"in navigator&&navigator.clipboard.writeText("").catch(()=>{})}}),(i||g)&&e.jsx(m.FloatingHighlightToolbar,{highlights:r,onHighlight:c,onChangeColor:p,onRemoveHighlight:h,onOpenNotes:d})]})},w=o.styled.div`
|
|
3
3
|
* {
|
|
4
4
|
font-family: var(--font-inter);
|
|
5
5
|
outline: none;
|
|
@@ -75,7 +75,7 @@
|
|
|
75
75
|
max-width: 864px;
|
|
76
76
|
width: 100%;
|
|
77
77
|
margin: 0 auto;
|
|
78
|
-
`,
|
|
78
|
+
`,C=o.styled.div`
|
|
79
79
|
display: flex;
|
|
80
80
|
justify-content: flex-end;
|
|
81
81
|
align-items: center;
|
|
@@ -83,4 +83,4 @@
|
|
|
83
83
|
padding: 4px 0;
|
|
84
84
|
`,y=o.styled.div`
|
|
85
85
|
position: relative;
|
|
86
|
-
`;exports.Editor=({audioLoader:
|
|
86
|
+
`;exports.Editor=({audioLoader:t,commentInputLoader:o,commentLoader:l,editable:s,handleAudioClick:h,handleVideoClick:g,imageSrcLoader:d,onChange:u,previousContent:m,defaultFilter:x,videoTitleLoader:k,filterComponent:q,hideShowAnswersButton:L,showAnswersBelowInput:E,enableHighlighting:O=!1,initialHighlights:D,onHighlightsChange:I,onOpenNotes:R,renderToolbarItems:A,toolbarPortalTarget:B,dropdownItems:N,onDropdownItemClick:P,onDropdownItemRemove:T})=>{const{highlights:F,addHighlight:S,updateHighlight:M,removeHighlight:V}=c.useHighlights({initialHighlights:D,onHighlightsChange:I}),[z,U]=b.default.useState(!1);b.default.useEffect(()=>{"production"!==process.env.NODE_ENV&&s&&O&&console.warn("[Editor] enableHighlighting is only supported with editable={false}. Highlight positions are not reconciled when the document changes and will drift out of alignment after edits.")},[s,O]);const _=F.length>0,G=b.default.useMemo(()=>{if(0!==F.length)return p.createHighlightDecorate(F)},[F]),J=b.default.useRef(null);return b.default.useEffect(()=>{const e=e=>{const t=window.getSelection()?.anchorNode;t&&J.current?.contains(t)&&(e.preventDefault(),"clipboard"in navigator&&navigator.clipboard.writeText("").catch(()=>{}))};return document.addEventListener("copy",e),()=>document.removeEventListener("copy",e)},[]),e.jsx(r.EditorContext.Provider,{value:{audioLoader:t,commentInputLoader:o,commentLoader:l,handleAudioClick:h,handleVideoClick:g,imageSrcLoader:d,videoTitleLoader:k,defaultFilter:x,filterComponent:q,hideShowAnswersButton:L,showAnswersBelowInput:E,enableHighlighting:O,highlights:F},children:e.jsxs(n.Plate,{id:"main",initialValue:m,onChange:u,plugins:j,children:[B&&i.createPortal(e.jsxs(e.Fragment,{children:[A?.(),(O||_)&&e.jsxs(y,{children:[e.jsx(f.HighlightButton,{count:F.length,isOpen:z,onClick:()=>U(e=>!e)}),e.jsx(v.HighlightsDropdown,{isOpen:z,highlights:F,items:N,onItemClick:P,onRemove:e=>{V(e),T?.(e)},onClose:()=>U(!1)})]})]}),B),e.jsxs(w,{ref:J,children:[s&&e.jsx(a.EditorBar,{}),!B&&(O||_||A)&&e.jsxs(C,{children:[A?.(),(O||_)&&e.jsxs(y,{children:[e.jsx(f.HighlightButton,{count:F.length,isOpen:z,onClick:()=>U(e=>!e)}),e.jsx(v.HighlightsDropdown,{isOpen:z,highlights:F,onRemove:V,onClose:()=>U(!1)})]})]}),e.jsx(H,{decorate:G,enableHighlighting:O,editable:s,highlights:F,addHighlight:S,updateHighlight:M,removeHighlight:V,hasHighlights:_,onOpenNotes:R})]})]})})};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var e=require("react/jsx-runtime"),i=require("react"),t=require("next/image"),r=require("react-player"),n=require("styled-components"),o=require("../../actions/button/button.js"),l=require("../../atoms/box/box.js");require("../../navigation/breadcrumb/breadcrumb.js"),require("../../navigation/inner/inner.js");var s=require("../../navigation/tabs/tabs.js");require("../../navigation/tabs/custom-tabs.js");var a=require("../../../icons/basic/select_item.js"),d=require("../../atoms/typography/heading.js"),c=require("../../atoms/typography/paragraph.js"),
|
|
2
|
+
"use strict";var e=require("react/jsx-runtime"),i=require("react"),t=require("next/image"),r=require("react-player"),n=require("styled-components"),o=require("../../actions/button/button.js"),l=require("../../atoms/box/box.js");require("../../navigation/breadcrumb/breadcrumb.js"),require("../../navigation/inner/inner.js");var s=require("../../navigation/tabs/tabs.js");require("../../navigation/tabs/custom-tabs.js");var a=require("../../../icons/basic/select_item.js"),d=require("../../atoms/typography/heading.js"),c=require("../../atoms/typography/paragraph.js"),u=require("../../../icons/security/lock_circle.js"),p=require("../../../icons/audio_video/play_solid.js"),g=require("../../../utils/local-storage.js"),h=require("./playlist-item.js"),x=require("./misc.js"),m=require("../../../icons/arrow/chevron_down.js"),f=require("../../surfaces/accordion/accordion.js");function b(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var y=b(i),w=b(t),j=b(r);const v=1280/720,$=200*v,I=n.styled.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
justify-content: center;
|
|
5
5
|
background-color: var(--color-grey-0);
|
|
@@ -128,4 +128,4 @@
|
|
|
128
128
|
}
|
|
129
129
|
|
|
130
130
|
${({$showingAll:e})=>e?"height: 100%; overflow-y:auto;":"max-height: 350px;"}
|
|
131
|
-
`;exports.VideoPlayer=({activeIndex:t,pip:r,playable:n,playlist:b,onClickPreview:L,onPipChange:M,onProgress:R,onStart:T,orientation:H,setMediaItem:E,onShowAllPlaylist:O,forwardedRef:_,subtitle:F,title:N,trailer:W,additionalMedia:V})=>{const X="undefined"!=typeof window?window:{innerHeight:0,innerWidth:600},Y=X.innerHeight/3,K=v*(X.innerHeight/3),G=y.default.useRef(null),J=_||G,Q=y.default.useRef({}),U=y.default.useRef(null),Z=y.default.useRef(null),[ee,ie]=y.default.useState(0),[te,re]=y.default.useState(!1),[ne,oe]=y.default.useState(!n&&!!W),[le,se]=y.default.useState(b?.[t].id||null),[ae,de]=g.useLocalStorage("videoPipHeight",Y),[ce,pe]=g.useLocalStorage("videoPipWidth",K),[ue,ge]=g.useLocalStorage("video-volume",1),[he,xe]=g.useLocalStorage("videoPipRight",16),[me,fe]=g.useLocalStorage("videoPipBottom",16),[be,ye]=y.default.useState([0,0]),[we,je]=y.default.useState([0,0]),[ve,$e]=y.default.useState(!1),[Ie,ke]=y.default.useState(0),[Se,De]=y.default.useState([]),[Ae,Pe]=y.default.useState([]),[ze,qe]=y.default.useState([]),[Be,Ce]=y.default.useState(!1),Le=ne?W:ve?Se?.[Ie]:b?.[t],Me=Array.isArray(Le?.src)?Le.src[0]:Le?.src,Re=Me?.includes(".m3u8")||!1;y.default.useEffect(()=>{V&&(De(V.filter(e=>"VIDEO"===e.type)),Pe(V.filter(e=>"FILE"===e.type)),qe(V.filter(e=>"LINK"===e.type)))},[V]);const Te=y.default.useRef(!0);y.default.useEffect(()=>{Te.current?Te.current=!1:!n||ne||ve||Ce(!0)},[t,n,ne,ve]);const He=(e,i=!1)=>{oe(!1),$e(i),Ce(!(!n&&!i)),i?ke(e):E(e)},Ee=()=>{re(e=>!e),O&&O(!te)},Oe=(e,i)=>{if(!Z?.current)return;const t=Z.current.getBoundingClientRect();t.x<16||t.y<16||e>=2*X.innerWidth/3||i>=2*X.innerHeight/3||e<$||i<200||(pe(e),de(i))},_e=()=>{if(!Z?.current)return;const e=Z.current.getBoundingClientRect();je([e.width,e.height])},Fe=e=>{if(!Z?.current)return;const i=e.currentTarget.getAttribute("class")?.split(" ")||[],t=window.innerWidth-e.clientX,r=window.innerHeight-e.clientY;if(!(e.clientX<0||e.clientY<0))if(e.stopPropagation(),e.preventDefault(),i.includes("top")){const e=Math.round(r-be[1]+we[1]),i=Math.round(e*v);Oe(i,e)}else if(i.includes("bottom")){const e=Math.round(be[1]-r+we[1]),i=Math.round(e*v);Oe(i,e)}else if(i.includes("left")){const e=Math.round(t-be[0]+we[0]),i=Math.round(e/v);Oe(e,i)}else if(i.includes("right")){const e=Math.round(be[0]-t+we[0]),i=Math.round(e/v);Oe(e,i)}},Ne=i.useMemo(()=>{let e=[{label:"All lessons",color:"dark"}];return V?.length&&e.push({label:"Resources",color:"dark"}),W&&e.push({label:"Trailer",color:"dark"}),e},[V,W]),We=W&&"Trailer"===Ne[ee]?.label,Ve=V&&"Resources"===Ne[ee]?.label;return y.default.useEffect(()=>{ee>=Ne.length&&ie(0)},[Ne,ee]),Le?e.jsx(I,{$orientation:H,children:e.jsxs(A,{$orientation:H,$playable:n||ne||ve,children:["vertical"===H&&e.jsxs(l.Box,{className:"pip-trigger-vertical pip-trigger",$dir:"column",$gap:4,sx:"margin: 24px;",children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:N}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:F})]}),r&&e.jsx(S,{}),e.jsxs(k,{$pip:!!r,draggable:r&&0===we[0],onDrag:r?e=>{if(e.clientX<0||e.clientY<0)return;const i=window.innerWidth-e.clientX,t=window.innerHeight-e.clientY;((e,i)=>{if(!Z?.current)return;const t=Z.current.getBoundingClientRect();e&&e>=16&&e<=X.innerWidth-16-t.width&&xe(e),i&&i>=16&&i<=X.innerHeight-16-t.height&&fe(i)})(he+(i-be[0]),me+(t-be[1])),ye([i,t])}:void 0,onMouseDown:e=>{ye([window.innerWidth-e.clientX,window.innerHeight-e.clientY])},ref:Z,style:r?{bottom:me,height:ae,right:he,width:ce}:void 0,children:[r&&e.jsx(o.Button,{className:"close-pip",icon:e.jsx(a.SelectItem,{color:"grey-0"}),onClick:e=>{e.stopPropagation(),M&&M(!1)},size:"large",sx:"\n display: none;\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 10;\n svg {\n fill: var(--color-white);\n }\n ",type:"text"}),e.jsx(j.default,{className:"player",config:{file:{attributes:{crossOrigin:"true",disablePictureInPicture:"true"},forceHLS:Re,hlsVersion:"1.6.16",hlsOptions:Re?{autoStartLoad:!0,backBufferLength:30,maxMaxBufferLength:120}:void 0,tracks:(Le?.subtitles||[]).map(e=>({kind:"subtitles",label:e.label,src:e.src,srcLang:e.locale}))}},controls:!0,height:"100%",light:e.jsx(w.default,{alt:`thumbnail for ${N}`,layout:"fill",priority:n||ne||ve,quality:100,style:{objectFit:"cover"},src:Le?.thumbnail||"/images/default_card_image.png"}),progressInterval:4e3,onProgress:e=>R(e,ve?Se[Ie]?.id:void 0),onStart:T,onClickPreview:e=>{(n||ne||ve)&&Ce(!0),L&&L(e)},onReady:()=>{if(!ne){const e=J?.current?.getCurrentTime();0===e&&(ve?0!==Se?.[Ie]?.progress&&J.current.seekTo(Se?.[Ie].progress):0!==Le?.progress&&J.current.seekTo(Le.progress))}},pip:r,playIcon:n||ne||ve?e.jsx(u.PlaySolid,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}):e.jsx(p.LockCircle,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}),playing:ne||ve||n&&Be,ref:J,url:Le.src,width:"100%",volume:ue,onVolumeChange:e=>{ge(e.target.volume)}},`${ne}-${ve}-${t}-${Ie}-${Le?.id??(Array.isArray(Le?.src)?Le.src[0]:Le?.src)??""}`),r&&e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"top horizontal",draggable:"false",onDrag:Fe,onMouseDown:_e,onDragEnd:()=>je([0,0]),tabIndex:0}),e.jsx(D,{className:"bottom horizontal",draggable:"false",onDrag:Fe,onMouseDown:_e,onDragEnd:()=>je([0,0]),tabIndex:0}),e.jsx(D,{className:"right vertical",draggable:"false",onDrag:Fe,onMouseDown:_e,onDragEnd:()=>je([0,0]),tabIndex:0}),e.jsx(D,{className:"left vertical",draggable:"false",onDrag:Fe,onMouseDown:_e,onDragEnd:()=>je([0,0]),tabIndex:0})]})]}),"horizontal"===H&&e.jsx(P,{children:e.jsxs(z,{$showingAll:te,children:[e.jsxs(l.Box,{$dir:"column",$gap:4,children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:N}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:F})]}),e.jsxs(l.Box,{$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ee,onChange:e=>ie(e),items:Ne,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:te,orientation:H,toggleShowingAll:Ee})]}),0===ee?e.jsx(B,{ref:U,$showingAll:te,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),He(t)},title:i.title,thumbnail:i.thumbnail,shortDescription:i.shortDescription,duration:i.duration,progress:i.progress,playable:n&&!i.locked,nowplaying:le,comingSoon:i.comingSoon||!1,ref:e=>{Q.current[i.id]=e}},i.id))}):Ve?e.jsxs(B,{$showingAll:te,children:[!!Se.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:Se.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),He(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,ref:e=>{Q.current[i.id]=e}},i.id))})},i))}),!!Ae.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...Ae].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))})},i))}),!!ze.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Products"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...ze].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))})},i))})]}):We&&W?e.jsx(x.TrailerListItem,{title:N,handleSetPlayingTrailer:oe,trailer:W}):null]})}),"vertical"===H&&e.jsx(l.Box,{$dir:"column",$gap:24,sx:te?"z-index: 3; position:relative;":"height: auto",children:e.jsxs(q,{$showingAll:te,children:[e.jsxs(l.Box,{sx:"padding: 0 1.5rem;",$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ee,onChange:e=>ie(e),items:Ne,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:te,orientation:H,toggleShowingAll:Ee})]}),[e.jsx(C,{ref:U,$showingAll:te,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{comingSoon:i.comingSoon||!1,nowplaying:le,playlistItemId:i.id,duration:i.duration,ref:e=>{Q.current[i.id]=e},onClick:()=>{He(t),se(i.id)},playable:n&&!i.locked,progress:i.progress,shortDescription:i.shortDescription,thumbnail:i.thumbnail,title:i.title},i.id))}),e.jsxs(C,{$showingAll:te,children:[!!Se.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})]}),sx:"flex-direction: column; gap: 24px;",children:Se.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{se(i.id),He(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,ref:e=>{Q.current[i.id]=e}},i.id))},i))}),(!!Ae.length||!!ze.length)&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})]}),sx:"flex-direction: column; gap: 24px;",children:[...Ae,...ze].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:le,type:i.type,isFile:"FILE"===i.type,ref:e=>{Q.current[i.id]=e}},i.id))},i))})]}),!!W&&e.jsx(l.Box,{$dir:"column",$gap:8,sx:"margin: 0px 24px;",children:e.jsx(x.TrailerListItem,{title:N,handleSetPlayingTrailer:oe,trailer:W})})][ee]]})})]})}):null};
|
|
131
|
+
`;exports.VideoPlayer=({activeIndex:t,pip:r,playable:n,playlist:b,onClickPreview:L,onPipChange:M,onProgress:T,onStart:R,onError:E,orientation:H,setMediaItem:O,onShowAllPlaylist:_,forwardedRef:F,subtitle:N,title:W,trailer:V,additionalMedia:X})=>{const Y="undefined"!=typeof window?window:{innerHeight:0,innerWidth:600},K=Y.innerHeight/3,G=v*(Y.innerHeight/3),J=y.default.useRef(null),Q=F||J,U=y.default.useRef({}),Z=y.default.useRef(null),ee=y.default.useRef(null),[ie,te]=y.default.useState(0),[re,ne]=y.default.useState(!1),[oe,le]=y.default.useState(!n&&!!V),[se,ae]=y.default.useState(b?.[t].id||null),[de,ce]=g.useLocalStorage("videoPipHeight",K),[ue,pe]=g.useLocalStorage("videoPipWidth",G),[ge,he]=g.useLocalStorage("video-volume",1),[xe,me]=g.useLocalStorage("videoPipRight",16),[fe,be]=g.useLocalStorage("videoPipBottom",16),[ye,we]=y.default.useState([0,0]),[je,ve]=y.default.useState([0,0]),[$e,Ie]=y.default.useState(!1),[ke,Se]=y.default.useState(0),[De,Ae]=y.default.useState([]),[Pe,ze]=y.default.useState([]),[qe,Be]=y.default.useState([]),[Ce,Le]=y.default.useState(!1),Me=oe?V:$e?De?.[ke]:b?.[t],Te=Array.isArray(Me?.src)?Me.src[0]:Me?.src,Re=Te?.includes(".m3u8")||!1;y.default.useEffect(()=>{X&&(Ae(X.filter(e=>"VIDEO"===e.type)),ze(X.filter(e=>"FILE"===e.type)),Be(X.filter(e=>"LINK"===e.type)))},[X]);const Ee=y.default.useRef(!0);y.default.useEffect(()=>{Ee.current?Ee.current=!1:!n||oe||$e||Le(!0)},[t,n,oe,$e]);const He=(e,i=!1)=>{le(!1),Ie(i),Le(!(!n&&!i)),i?Se(e):O(e)},Oe=()=>{ne(e=>!e),_&&_(!re)},_e=(e,i)=>{if(!ee?.current)return;const t=ee.current.getBoundingClientRect();t.x<16||t.y<16||e>=2*Y.innerWidth/3||i>=2*Y.innerHeight/3||e<$||i<200||(pe(e),ce(i))},Fe=()=>{if(!ee?.current)return;const e=ee.current.getBoundingClientRect();ve([e.width,e.height])},Ne=e=>{if(!ee?.current)return;const i=e.currentTarget.getAttribute("class")?.split(" ")||[],t=window.innerWidth-e.clientX,r=window.innerHeight-e.clientY;if(!(e.clientX<0||e.clientY<0))if(e.stopPropagation(),e.preventDefault(),i.includes("top")){const e=Math.round(r-ye[1]+je[1]),i=Math.round(e*v);_e(i,e)}else if(i.includes("bottom")){const e=Math.round(ye[1]-r+je[1]),i=Math.round(e*v);_e(i,e)}else if(i.includes("left")){const e=Math.round(t-ye[0]+je[0]),i=Math.round(e/v);_e(e,i)}else if(i.includes("right")){const e=Math.round(ye[0]-t+je[0]),i=Math.round(e/v);_e(e,i)}},We=i.useMemo(()=>{let e=[{label:"All lessons",color:"dark"}];return X?.length&&e.push({label:"Resources",color:"dark"}),V&&e.push({label:"Trailer",color:"dark"}),e},[X,V]),Ve=V&&"Trailer"===We[ie]?.label,Xe=X&&"Resources"===We[ie]?.label;return y.default.useEffect(()=>{ie>=We.length&&te(0)},[We,ie]),Me?e.jsx(I,{$orientation:H,children:e.jsxs(A,{$orientation:H,$playable:n||oe||$e,children:["vertical"===H&&e.jsxs(l.Box,{className:"pip-trigger-vertical pip-trigger",$dir:"column",$gap:4,sx:"margin: 24px;",children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:W}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),r&&e.jsx(S,{}),e.jsxs(k,{$pip:!!r,draggable:r&&0===je[0],onDrag:r?e=>{if(e.clientX<0||e.clientY<0)return;const i=window.innerWidth-e.clientX,t=window.innerHeight-e.clientY;((e,i)=>{if(!ee?.current)return;const t=ee.current.getBoundingClientRect();e&&e>=16&&e<=Y.innerWidth-16-t.width&&me(e),i&&i>=16&&i<=Y.innerHeight-16-t.height&&be(i)})(xe+(i-ye[0]),fe+(t-ye[1])),we([i,t])}:void 0,onMouseDown:e=>{we([window.innerWidth-e.clientX,window.innerHeight-e.clientY])},ref:ee,style:r?{bottom:fe,height:de,right:xe,width:ue}:void 0,children:[r&&e.jsx(o.Button,{className:"close-pip",icon:e.jsx(a.SelectItem,{color:"grey-0"}),onClick:e=>{e.stopPropagation(),M&&M(!1)},size:"large",sx:"\n display: none;\n position: absolute;\n top: 8px;\n right: 8px;\n z-index: 10;\n svg {\n fill: var(--color-white);\n }\n ",type:"text"}),e.jsx(j.default,{className:"player",config:{file:{attributes:{crossOrigin:"true",disablePictureInPicture:"true"},forceHLS:Re,hlsVersion:"1.6.16",hlsOptions:Re?{autoStartLoad:!0,backBufferLength:30,maxMaxBufferLength:120}:void 0,tracks:(Me?.subtitles||[]).map(e=>({kind:"subtitles",label:e.label,src:e.src,srcLang:e.locale}))}},controls:!0,height:"100%",light:e.jsx(w.default,{alt:`thumbnail for ${W}`,layout:"fill",priority:n||oe||$e,quality:100,style:{objectFit:"cover"},src:Me?.thumbnail||"/images/default_card_image.png"}),progressInterval:4e3,onProgress:e=>T(e,$e?De[ke]?.id:void 0),onStart:R,onError:(e,i)=>{const t=Q?.current?.getCurrentTime?.();E?.(e,{...i,currentTime:t})},onClickPreview:e=>{(n||oe||$e)&&Le(!0),L&&L(e)},onReady:()=>{if(!oe){const e=Q?.current?.getCurrentTime();0===e&&($e?0!==De?.[ke]?.progress&&Q.current.seekTo(De?.[ke].progress):0!==Me?.progress&&Q.current.seekTo(Me.progress))}},pip:r,playIcon:n||oe||$e?e.jsx(p.PlaySolid,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}):e.jsx(u.LockCircle,{color:"white",size:24,sx:"position: absolute; width: 54px; height: 54px;"}),playing:oe||$e||n&&Ce,ref:Q,url:Me.src,width:"100%",volume:ge,onVolumeChange:e=>{he(e.target.volume)}},`${oe}-${$e}-${t}-${ke}-${Me?.id??(Array.isArray(Me?.src)?Me.src[0]:Me?.src)??""}`),r&&e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"top horizontal",draggable:"false",onDrag:Ne,onMouseDown:Fe,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"bottom horizontal",draggable:"false",onDrag:Ne,onMouseDown:Fe,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"right vertical",draggable:"false",onDrag:Ne,onMouseDown:Fe,onDragEnd:()=>ve([0,0]),tabIndex:0}),e.jsx(D,{className:"left vertical",draggable:"false",onDrag:Ne,onMouseDown:Fe,onDragEnd:()=>ve([0,0]),tabIndex:0})]})]}),"horizontal"===H&&e.jsx(P,{children:e.jsxs(z,{$showingAll:re,children:[e.jsxs(l.Box,{$dir:"column",$gap:4,children:[e.jsx(d.H,{as:"h2",$bold:!0,$color:"white",$fontSize:28,$lineHeight:36,children:W}),e.jsx(c.P,{as:"h3",$bold:!0,$color:"grey-8",children:N})]}),e.jsxs(l.Box,{$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ie,onChange:e=>te(e),items:We,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:re,orientation:H,toggleShowingAll:Oe})]}),0===ie?e.jsx(B,{ref:Z,$showingAll:re,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{ae(i.id),He(t)},title:i.title,thumbnail:i.thumbnail,shortDescription:i.shortDescription,duration:i.duration,progress:i.progress,playable:n&&!i.locked,nowplaying:se,comingSoon:i.comingSoon||!1,ref:e=>{U.current[i.id]=e}},i.id))}):Xe?e.jsxs(B,{$showingAll:re,children:[!!De.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:De.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{ae(i.id),He(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:se,ref:e=>{U.current[i.id]=e}},i.id))})},i))}),!!Pe.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...Pe].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:se,type:i.type,isFile:"FILE"===i.type,ref:e=>{U.current[i.id]=e}},i.id))})},i))}),!!qe.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0; align-items: center; flex-direction: row-reverse; justify-content: flex-end; gap: 16px; svg {fill: white !important; } &:hover {background: var(--color-grey-1);}",trigger:e.jsx("div",{style:{display:"flex",alignItems:"center",gap:16},children:e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Products"})}),sx:"flex-direction: column; ",children:e.jsx("div",{style:{marginTop:24,display:"flex",flexDirection:"column",gap:24},children:[...qe].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:se,type:i.type,isFile:"FILE"===i.type,ref:e=>{U.current[i.id]=e}},i.id))})},i))})]}):Ve&&V?e.jsx(x.TrailerListItem,{title:W,handleSetPlayingTrailer:le,trailer:V}):null]})}),"vertical"===H&&e.jsx(l.Box,{$dir:"column",$gap:24,sx:re?"z-index: 3; position:relative;":"height: auto",children:e.jsxs(q,{$showingAll:re,children:[e.jsxs(l.Box,{sx:"padding: 0 1.5rem;",$align:"center",children:[e.jsx(s.Tabs,{activeIndex:ie,onChange:e=>te(e),items:We,size:"medium",sx:"justify-content: flex-start;"}),e.jsx(x.ButtonViewAll,{showingAll:re,orientation:H,toggleShowingAll:Oe})]}),[e.jsx(C,{ref:Z,$showingAll:re,children:b.map((i,t)=>e.jsx(h.PlaylistItem,{comingSoon:i.comingSoon||!1,nowplaying:se,playlistItemId:i.id,duration:i.duration,ref:e=>{U.current[i.id]=e},onClick:()=>{He(t),ae(i.id)},playable:n&&!i.locked,progress:i.progress,shortDescription:i.shortDescription,thumbnail:i.thumbnail,title:i.title},i.id))}),e.jsxs(C,{$showingAll:re,children:[!!De.length&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Leaders"})]}),sx:"flex-direction: column; gap: 24px;",children:De.map((i,t)=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{ae(i.id),He(t,!0)},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:se,ref:e=>{U.current[i.id]=e}},i.id))},i))}),(!!Pe.length||!!qe.length)&&e.jsx(f.Accordion,{defaultOpen:0,children:[0].map(i=>e.jsx(f.Accordion.Item,{buttonSx:"padding: 0;",trigger:e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:16,marginBottom:24},children:[e.jsx(m.ChevronDown,{size:20,color:"white"}),e.jsx(c.P,{$color:"white",$fontSize:16,$semiBold:!0,children:"Other Resources"})]}),sx:"flex-direction: column; gap: 24px;",children:[...Pe,...qe].map(i=>e.jsx(h.PlaylistItem,{playlistItemId:i.id,onClick:()=>{window.open(i.src,"_blank")},progress:i.progress,duration:i.duration,title:i.name,thumbnail:i.thumbnail||"",shortDescription:i.shortDescription,playable:!0,nowplaying:se,type:i.type,isFile:"FILE"===i.type,ref:e=>{U.current[i.id]=e}},i.id))},i))})]}),!!V&&e.jsx(l.Box,{$dir:"column",$gap:8,sx:"margin: 0px 24px;",children:e.jsx(x.TrailerListItem,{title:W,handleSetPlayingTrailer:le,trailer:V})})][ie]]})})]})}):null};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"editor.d.ts","sourceRoot":"","sources":["../../../../src/components/editor/editor.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAIL,QAAQ,EAET,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAElB,oBAAoB,EACrB,MAAM,WAAW,CAAC;AAOnB,OAAO,EACL,aAAa,EACb,qBAAqB,EACtB,MAAM,4BAA4B,CAAC;AAepC,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,aAAa,EAAE,MAAM,CAAA;KAAE,KAAK,KAAK,CAAC,YAAY,CAAC;IACvE,kBAAkB,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,KAAK,CAAC,YAAY,CAAC;IACrE,aAAa,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,KAAK,CAAC,YAAY,CAAC;IACjE,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACxC,gBAAgB,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;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,EAAE,OAAO,CAAC;IAChC,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC;;;;;;;;;;;OAWG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,iBAAiB,CAAC,EAAE,aAAa,EAAE,CAAC;IACpC,kBAAkB,CAAC,EAAE,CAAC,UAAU,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAC3D,WAAW,CAAC,EAAE,CACZ,OAAO,EACH;QAAE,IAAI,EAAE,KAAK,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GACpC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,KAC3D,IAAI,CAAC;IACV,kBAAkB,CAAC,EAAE,MAAM,KAAK,CAAC,SAAS,CAAC;IAC3C,mBAAmB,CAAC,EAAE,WAAW,GAAG,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACxC,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,qBAAqB,KAAK,IAAI,CAAC;IAC5D,oBAAoB,CAAC,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7C;AAED,MAAM,MAAM,aAAa,GAAG,QAAQ,CAAC;AAErC,eAAO,MAAM,MAAM,4ZAwBhB,WAAW,4CA+Ib,CAAC"}
|
|
@@ -28,6 +28,11 @@ export interface VideoPlayerProps {
|
|
|
28
28
|
* @param onStart the handler for mounting the video
|
|
29
29
|
*/
|
|
30
30
|
onStart?: () => void;
|
|
31
|
+
/**
|
|
32
|
+
* @param onError forwards every hls.js Hls.Events.ERROR emission (fatal
|
|
33
|
+
* errors and non-fatal ones like bufferStalledError, i.e. freezes/stalls)
|
|
34
|
+
*/
|
|
35
|
+
onError?: (error: unknown, data: unknown) => void;
|
|
31
36
|
/**
|
|
32
37
|
* @param pip picture in picture is enabled
|
|
33
38
|
*/
|
|
@@ -75,5 +80,5 @@ export interface VideoPlayerProps {
|
|
|
75
80
|
* ReactPlayer props reference -> https://www.npmjs.com/package/react-player#props
|
|
76
81
|
* HLS Option props reference -> https://github.com/video-dev/hls.js/blob/master/docs/API.md#fine-tuning
|
|
77
82
|
*/
|
|
78
|
-
export declare const VideoPlayer: ({ activeIndex, pip, playable, playlist, onClickPreview, onPipChange, onProgress, onStart, orientation, setMediaItem, onShowAllPlaylist, forwardedRef, subtitle, title, trailer, additionalMedia, }: VideoPlayerProps) => import("react/jsx-runtime").JSX.Element;
|
|
83
|
+
export declare const VideoPlayer: ({ activeIndex, pip, playable, playlist, onClickPreview, onPipChange, onProgress, onStart, onError, orientation, setMediaItem, onShowAllPlaylist, forwardedRef, subtitle, title, trailer, additionalMedia, }: VideoPlayerProps) => import("react/jsx-runtime").JSX.Element;
|
|
79
84
|
//# sourceMappingURL=video.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video-player/video.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAavC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWhE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;IACvC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IACvD;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,CACV,QAAQ,EAAE;QACR,aAAa,EAAE,MAAM,CAAC;QACtB,aAAa,EAAE,MAAM,CAAC;KACvB,EACD,UAAU,CAAC,EAAE,MAAM,KAChB,IAAI,CAAC;IACV;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB;;OAEG;IACH,GAAG,CAAC,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,QAAQ,EAAE,SAAS,EAAE,CAAC;IACtB;;OAEG;IACH,YAAY,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;OAEG;IACH,eAAe,CAAC,EAAE,eAAe,EAAE,CAAC;IACpC;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,gBAAgB,CAAC,GAAG,CAAC,CAAC;IAE3C,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CAC/C;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"video.d.ts","sourceRoot":"","sources":["../../../../../src/components/media/video-player/video.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAavC,OAAO,EAAE,eAAe,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWhE,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,WAAW,EAAE,YAAY,GAAG,UAAU,CAAC;IACvC;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,cAAc,KAAK,IAAI,CAAC;IACvD;;OAEG;IACH,WAAW,CAAC,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IACrC;;OAEG;IACH,UAAU,EAAE,CACV,QAAQ,EAAE;QACR,aAAa,EA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