1 line
19 KiB
JavaScript
1 line
19 KiB
JavaScript
System.register(["./vue-legacy-BnJhYd-u.js","./const-legacy-Bw9iWaro.js","./_plugin-vue_export-helper-legacy-DNBbTZ02.js","./kimi-legacy-KFfRFtSB.js","./useMessage-legacy-BwPIj8SG.js","./index-legacy-Ce-qKpT_.js","./ThumbnailSlide-legacy-CSXTq44l.js","./kimi.button-legacy-Dfu-bBlw.js","./Loading-legacy-B5EqNNsc.js","./usePPTDTitle-legacy-BtadEyXI.js"],function(e,t){var a,i,o,l,n,r,s,d,c,p,u,g,f,h,H,v,w,y,m,x,b,V,k,M,_,Z,S,P,T,C,j,I,z,D,W,A,L,U,G,O,E,B,$,F,Y,R,N,q,K,J,X,Q,ee,te,ae,ie,oe,le,ne,re,se,de,ce,pe,ue,ge,fe,he,He,ve,we;return{setters:[function(e){a=e.At,i=e.B,o=e.G,l=e.H,n=e.J,r=e.K,s=e.Mt,d=e.Nt,c=e.Tt,p=e.U,u=e.W,g=e.Y,f=e.Z,h=e._,H=e.at,v=e.bt,w=e.ct,y=e.it,m=e.k,x=e.kt,b=e.ot,V=e.p,k=e.ut,M=e.v,_=e.vt,Z=e.x},function(e){S=e.f,P=e.l,T=e.p},function(e){C=e.t},function(e){j=e.a},function(e){I=e.d,z=e.o,D=e.p,W=e.u},function(e){A=e.L,L=e.V,U=e.a,G=e.c,O=e.d,E=e.f,B=e.h,$=e.l,F=e.m,Y=e.n,R=e.p,N=e.v},function(e){q=e.K,K=e.d,J=e.ot,X=e.q,Q=e.t},function(e){ee=e.t},function(e){te=e.t},function(e){ae=e.t}],execute:function(){(ie=document.createElement("style")).textContent=".touch-mask[data-v-ee5b5d39]{flex-direction:column;justify-content:center;align-items:center;width:100vw;height:100vh;display:flex;position:fixed;top:0;left:0}.touch-mask-guide[data-v-ee5b5d39]{opacity:0;background-color:rgba(0,0,0,.6);display:flex;position:absolute;top:0;bottom:0;left:0;right:0}.touch-mask-guide-show[data-v-ee5b5d39]{opacity:1}.touch-mask-guide-item[data-v-ee5b5d39]{color:#fff;text-align:center;flex-direction:column;flex:1;justify-content:center;align-items:center;font-size:14px;line-height:20px;display:flex}.touch-mask-guide-item p[data-v-ee5b5d39]{margin:0}.touch-mask-guide-item[data-v-ee5b5d39]:after{content:\"\";background:url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='70'%20height='70'%20fill='none'%3e%3crect%20width='57'%20height='22'%20fill='url(%23a)'%20fill-opacity='.4'%20rx='11'%20transform='matrix(-1%200%200%201%2070%202)'/%3e%3ccircle%20cx='24.0676'%20cy='13'%20r='10'%20stroke='%23fff'%20stroke-width='2'/%3e%3cpath%20fill='url(%23b)'%20d='M40.8263%2058.4421c4.8765-3.4722%207.1585-10.6812%207.2252-16.3802.0453-3.8765-.887-10.4004-1.4879-14.1763-.2784-1.7488-1.7008-3.0748-3.4612-3.2667-1.947-.2121-3.6549%201.2956-3.6858%203.2539l-.0801%205.071-1.7726-2.4894-11.069-15.5453c-1.1935-1.6761-3.5228-2.0651-5.2027-.8689-1.6799%201.1961-2.0743%203.5246-.8808%205.2007l6.8543%209.6261c-1.1935-1.6761-3.5229-2.0651-5.2027-.869-1.6799%201.1962-2.0743%203.5247-.8808%205.2008l1.496%202.101c-1.1934-1.6761-3.479-3.1069-5.7013-1.5693-2.2224%201.5375-1.5756%204.225-.3821%205.9011l1.9593%202.7517c-1.1934-1.6761-3.1806-2.6456-5.1452-1.2468-1.9645%201.3989-2.1317%203.9025-.9382%205.5785l6.4162%209.0109c1.7467%202.4532%203.8641%203.7821%207.015%204.8997%205.4921%201.948%2010.2999%201.1095%2014.9244-2.1835Z'/%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='46.9412'%20x2='9.0529'%20y1='11'%20y2='11'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3clinearGradient%20id='b'%20x1='27.0224'%20x2='43.8434'%20y1='32.6706'%20y2='56.2938'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\") 50%/100% 100% no-repeat;width:70px;height:70px;margin-top:14px;display:block}.touch-mask-guide-item[data-v-ee5b5d39]:nth-child(2){border-style:solid;border-width:0 1px;border-image-source:url(\"data:image/svg+xml,%3csvg%20width='2'%20height='371'%20viewBox='0%200%202%20371'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M1%200H0.5V2.0163H1H1.5V0H1ZM1%206.04891H0.5V10.0815H1H1.5V6.04891H1ZM1%2014.1141H0.5V18.1467H1H1.5V14.1141H1ZM1%2022.1793H0.5V26.212H1H1.5V22.1793H1ZM1%2030.2446H0.5V34.2772H1H1.5V30.2446H1ZM1%2038.3098H0.5V42.3424H1H1.5V38.3098H1ZM1%2046.375H0.5V50.4076H1H1.5V46.375H1ZM1%2054.4402H0.5V58.4728H1H1.5V54.4402H1ZM1%2062.5054H0.5V66.538H1H1.5V62.5054H1ZM1%2070.5706H0.5V74.6033H1H1.5V70.5706H1ZM1%2078.6359H0.5V82.6685H1H1.5V78.6359H1ZM1%2086.7011H0.5V90.7337H1H1.5V86.7011H1ZM1%2094.7663H0.5V98.7989H1H1.5V94.7663H1ZM1%20102.832H0.5V106.864H1H1.5V102.832H1ZM1%20110.897H0.5V114.929H1H1.5V110.897H1ZM1%20118.962H0.5V122.995H1H1.5V118.962H1ZM1%20127.027H0.5V131.06H1H1.5V127.027H1ZM1%20135.092H0.5V139.125H1H1.5V135.092H1ZM1%20143.158H0.5V147.19H1H1.5V143.158H1ZM1%20151.223H0.5V155.255H1H1.5V151.223H1ZM1%20159.288H0.5V163.321H1H1.5V159.288H1ZM1%20167.353H0.5V171.386H1H1.5V167.353H1ZM1%20175.418H0.5V179.451H1H1.5V175.418H1ZM1%20183.484H0.5V187.516H1H1.5V183.484H1ZM1%20191.549H0.5V195.581H1H1.5V191.549H1ZM1%20199.614H0.5V203.647H1H1.5V199.614H1ZM1%20207.679H0.5V211.712H1H1.5V207.679H1ZM1%20215.745H0.5V219.777H1H1.5V215.745H1ZM1%20223.81H0.5V227.842H1H1.5V223.81H1ZM1%20231.875H0.5V235.908H1H1.5V231.875H1ZM1%20239.94H0.5V243.973H1H1.5V239.94H1ZM1%20248.005H0.5V252.038H1H1.5V248.005H1ZM1%20256.071H0.5V260.103H1H1.5V256.071H1ZM1%20264.136H0.5V268.168H1H1.5V264.136H1ZM1%20272.201H0.5V276.234H1H1.5V272.201H1ZM1%20280.266H0.5V284.299H1H1.5V280.266H1ZM1%20288.332H0.5V292.364H1H1.5V288.332H1ZM1%20296.397H0.5V300.429H1H1.5V296.397H1ZM1%20304.462H0.5V308.495H1H1.5V304.462H1ZM1%20312.527H0.5V316.56H1H1.5V312.527H1ZM1%20320.593H0.5V324.625H1H1.5V320.593H1ZM1%20328.658H0.5V332.69H1H1.5V328.658H1ZM1%20336.723H0.5V340.756H1H1.5V336.723H1ZM1%20344.788H0.5V348.821H1H1.5V344.788H1ZM1%20352.854H0.5V356.886H1H1.5V352.854H1ZM1%20360.919H0.5V364.951H1H1.5V360.919H1ZM1%20368.984H0.5V371H1H1.5V368.984H1Z'%20fill='url(%23paint0_linear_0_3)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear_0_3'%20x1='1.5'%20y1='0'%20x2='1.5'%20y2='371'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='white'%20stop-opacity='0'/%3e%3cstop%20offset='0.5'%20stop-color='white'/%3e%3cstop%20offset='1'%20stop-color='white'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\");border-image-slice:1}.touch-mask-guide-item[data-v-ee5b5d39]:nth-child(2):after{background-image:url(\"data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='70'%20height='70'%20fill='none'%3e%3ccircle%20cx='33'%20cy='22'%20r='21'%20fill='%23fff'%20fill-opacity='.15'/%3e%3ccircle%20cx='33'%20cy='22'%20r='16'%20fill='%23fff'%20fill-opacity='.25'/%3e%3ccircle%20cx='33'%20cy='22'%20r='10'%20stroke='%23fff'%20stroke-width='2'/%3e%3cpath%20fill='url(%23a)'%20d='M42.7037%2069.6973c-5.9863%200-12.0266-4.5487-15.3866-9.1524-2.2854-3.1315-5.31-8.9866-7.0106-12.4111-.7877-1.5859-.3981-3.4911.9246-4.6685%201.463-1.3022%203.7288-1.0646%204.8898.5127l3.0066%204.0843V25.9229c0-2.0576%201.6719-3.7256%203.7341-3.7256%202.0622%200%203.7341%201.668%203.7341%203.7256v11.817c0-2.0575%201.6718-3.7256%203.734-3.7256s3.7341%201.6681%203.7341%203.7256v2.5793c0-2.0576%201.0319-4.5488%203.734-4.5854%202.7022-.0365%203.7341%202.5278%203.7341%204.5854v3.3781c0-2.0576%201.0564-4%203.4681-4s4%201.9424%204%204v11.0618c0%203.0115-.9539%205.3221-2.8724%208.0601-3.344%204.7724-7.7467%206.8781-13.4239%206.8781Z'/%3e%3cdefs%3e%3clinearGradient%20id='a'%20x1='39'%20x2='39'%20y1='40.6973'%20y2='69.6973'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23fff'/%3e%3cstop%20offset='1'%20stop-color='%23fff'%20stop-opacity='0'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e\");margin-top:14px;transform:translateY(-9px)}.touch-mask-guide-item[data-v-ee5b5d39]:nth-child(3):after{transform:scaleX(-1)}.player-top-bar[data-v-ee5b5d39]{background-color:rgba(0,0,0,.4);border-radius:0;width:100vw;height:50px;transition:transform .3s ease-in-out;position:absolute;top:0;left:0;right:0;transform:translateY(-100%)}.player-top-bar.is-show[data-v-ee5b5d39]{transform:translateY(0)}.player-top-bar-icon[data-v-ee5b5d39]{top:10px;left:20px;left:calc(20px + env(safe-area-inset-left));position:absolute}.player-bottom-bar[data-v-ee5b5d39]{height:75px;padding:0 25px;padding-left:calc(25px + env(safe-area-inset-left));background-color:rgba(0,0,0,.4);justify-content:flex-start;align-items:center;gap:8px;transition:transform .3s ease-in-out;display:flex;position:absolute;bottom:0;left:0;right:0;overflow-x:auto;transform:translateY(100%)}.player-bottom-bar.is-show[data-v-ee5b5d39]{transform:translateY(0)}.player-bottom-bar-slide[data-v-ee5b5d39]{border:.5px solid var(--Separators-S1);border-radius:4px;flex-shrink:0}.player-bottom-bar-slide.is-active[data-v-ee5b5d39]{outline:2px solid var(--Colors-KMBlue);outline-offset:2px}.hybrid-player[data-v-2a476c11]{background-color:#000;justify-content:center;align-items:center;width:100vw;height:100vh;display:flex}.mobile-loading[data-v-c1193748]{z-index:300;justify-content:center;align-items:center;display:flex;position:fixed;top:0;bottom:0;left:0;right:0}.mobile-loading-content[data-v-c1193748]{box-sizing:border-box;background-color:var(--MaskBg-ToastPC);min-width:82px;min-height:72px;color:var(--Always-White);border-radius:10px;flex-direction:column;justify-content:center;align-items:center;gap:8px;padding:12px 16px;font-size:14px;line-height:20px;display:flex}.mobile-loading-content[data-v-c1193748] .loading{color:var(--Always-White)}.preview-container[data-v-6f9cecd5]{background-color:var(--Bg-Primary);flex-direction:column;width:100vw;height:100vh;display:flex;overflow:hidden}.preview-title[data-v-6f9cecd5]{color:var(--Labels-Primary);text-overflow:ellipsis;white-space:nowrap;flex-shrink:0;padding:16px 48px 12px 16px;font-size:16px;font-weight:500;line-height:24px;overflow:hidden}.hybrid-preview[data-v-6f9cecd5]{box-sizing:border-box;flex:1;width:100%;padding:0 16px;overflow:auto}.hybrid-preview.is-loading-segment[data-v-6f9cecd5]{justify-content:center;align-items:center;display:flex}.slides-list[data-v-6f9cecd5]{flex-direction:column;padding-top:16px;padding-bottom:12px;display:flex}.slides-list-item[data-v-6f9cecd5]{border:.5px solid var(--Separators-S1);background-color:var(--Bg-Primary);box-sizing:border-box;border-radius:8px;margin-bottom:12px;overflow:hidden}.preview-loading[data-v-6f9cecd5],.preview-error[data-v-6f9cecd5]{color:var(--Labels-Tertiary);justify-content:center;align-items:center;gap:8px;font-size:14px;line-height:20px;display:flex}.preview-action[data-v-6f9cecd5]{background-color:var(--Bg-Primary);padding:16px 20px;padding-bottom:calc(env(safe-area-inset-bottom) + 16px);flex-shrink:0;justify-content:center;align-items:center;gap:12px;display:flex}.preview-action>button[data-v-6f9cecd5]{flex:1;height:48px;font-size:16px}\n/*$vite$:1*/",document.head.appendChild(ie),oe=e=>e?.replace(/^sandbox:\/\//,""),le=e=>{const t=oe(e);if(!t)return;const a=t.lastIndexOf("/");return a>=0?t.substring(0,a+1):void 0},ne=L(()=>{const e=m(),{t:t}=A(),a=$(j),{getPPTDData:i,getPPTDIsCreate:o,importFSJSON:n,updateSlidesMetaData:r,setLastModified:s,meta:d,pages:p,pageOrder:u,pageSize:g}=J(),{isCreate:f}=X(),{syncSlidesSummary:v}=z(),{setBatchGetImages:w,setImageConfig:y}=q(),{exporting:x,exportPPTXBlob:V}=W(),k=c(!0),M=c(!1),_=c(!1),C=c(0),L=c(0),N=c(0),K=c(0),Q=h("hybrid_has_showed_guide",!1),ee=Z(!1,3e3),te=t=>{const a=e.query[t];return(Array.isArray(a)?a[0]:a)??void 0},ae=l(()=>te("chat_id")??te("chatId")),ie=l(()=>te("slide_id")??te("slideId")),ne=l(()=>te("segment_id")??te("segmentId")),re=l(()=>void 0!==e.query.share),se=l(()=>Math.max(C.value-32,0)),de=l(()=>d.value.title??""),ce=l(()=>de.value||t("basic.unnamedPresentation")),pe=l(()=>g.value[1]/g.value[0]),ue=l(()=>Math.min(L.value,N.value/pe.value)),ge=l(()=>{const e=u.value[K.value];return e?p.value.get(e):void 0}),fe=l(()=>!Q.value),he=()=>{L.value=window.innerWidth,N.value=window.innerHeight},He=async e=>{if(F())try{return await e()}catch(t){return void Y(t)}},ve=async()=>{_.value=!1,await He(()=>R("switchScreen",{type:"inside"}))},we=e=>{_.value&&ve()},ye=()=>{if(window.webViewId){if(T)return"kimi-ios";if(P)return"kimi-android";if(S)return"kimi-harmony"}return"wap"},me=()=>({mode:I.PPTD,ppt_platform:ye(),is_mobile:!0}),xe=async e=>{const t=new window.FormData,{accessToken:a}=await O(),i={...await G()};t.append("slides_file",e),a&&(i.Authorization=`Bearer ${a}`);const o=await(await fetch("/apiv2/slides:upload",{method:"POST",body:t,headers:i})).json();if(!o.url)throw new Error("upload pptx failed");return o.url};return b(()=>{E("closePage",we),he()}),H(()=>{B("closePage",we)}),{isLoading:k,isError:M,isPlaying:_,exporting:x,screenWidth:C,windowWidth:L,windowHeight:N,currentIndex:K,showAction:ee,isShare:re,meta:d,pages:p,pageOrder:u,pageSize:g,slideWidth:se,displayTitle:de,playerSlideWidth:ue,currentSlide:ge,showGuide:fe,updateScreenWidth:e=>{C.value=e??window.innerWidth},updateWindowSize:he,enterPlay:async()=>{K.value=0,he(),_.value=!0,await He(()=>R("switchScreen",{type:"full"}))},exitPlay:ve,goStep:e=>{const t=K.value+e;t<0||t>=u.value.length||(K.value=t)},goToSlide:e=>{K.value=e},handleGuideClick:e=>{fe.value&&(e.stopPropagation(),e.preventDefault(),Q.value=!0)},handleShowAction:()=>{ee.value=!0},toggleAction:()=>{ee.value=!ee.value},handleExport:async()=>{if(x.value)return;let e=Date.now();x.value=!0,U("msh_nppt_export_start",{...me(),file_type:"pptx"});try{const t=await V({embedFonts:!0,slideTransition:!0});if(e=Date.now(),F())if(T)await R("pptFile",{ppt_tos_url:await xe(t),title:ce.value});else{const{url:e}=await R("getSlideUploadUrl"),a=new window.FormData;a.append("ppt_file",t,encodeURIComponent(`${ce.value}.pptx`)),await fetch(e,{method:"POST",body:a})}else D(t,`${ce.value}.pptx`);U("msh_nppt_export_end",{...me(),is_success:!0,file_type:"pptx",export_duration:Date.now()-e})}catch(t){U("msh_nppt_export_end",{...me(),is_success:!1,error_reason:t instanceof Error?t.message:"unknown error",file_type:"pptx",export_duration:Date.now()-e}),Y(t)}finally{x.value=!1}},loadPPTD:async()=>{if(!ie.value)return f.value=!1,M.value=!0,void(k.value=!1);const e=ie.value,t=Date.now();let l=!1,d=!1;const c=e=>{if(!l||d)return;const a=void 0!==e;d=!0,U("msh_nppt_generate_end",{...me(),is_success:!a,error_reason:a?e instanceof Error?e.message:String(e):void 0,duration:Date.now()-t})};k.value=!0,M.value=!1;try{if(r({slideId:e,chatId:ae.value,messageId:ne.value}),re.value)return f.value=!1,void n(await(async e=>{const t=await a.getSlidesShare({slidesId:e});if(!t.payloadUrl)throw new Error("invalid share");const i=await fetch(t.payloadUrl);if(!i.ok)throw new Error(`failed to fetch share payload: ${i.status}`);return await i.json()})(e));const t=await(async()=>(l=await o(e),i(e)))();f.value=l;const d=[{path:oe(t.pptdPath)??"presentation.pptd",content:t.content},...Object.entries(t.pagesMap).map(([e,t])=>({path:e,content:t}))];y({basePath:le(t.pptdPath)}),s(t.lastModifiedTime),n(d),c(),l&&await v()}catch(p){c(p),Y(p),M.value=!0}finally{k.value=!1}}}}),re=C(f({__name:"MobileTouchMask",setup(e){const{t:t}=A(),o=c(),{pages:l,pageOrder:n,pageSize:s,currentIndex:f,showAction:h,showGuide:H,exitPlay:v,goStep:y,goToSlide:m,handleGuideClick:b,handleShowAction:V,toggleAction:Z}=ne();return M(o,{onSwipeEnd(e,t){H.value||("right"===t?y(-1):"left"===t&&y(1))}}),_(f,e=>{const t=document.getElementById(`slide-${e}`);t&&t.scrollIntoView({behavior:"instant",block:"center"})}),(e,c)=>(w(),r("div",{ref_key:"playMaskRef",ref:o,class:"touch-mask"},[p("div",{class:a(["touch-mask-guide",{"touch-mask-guide-show":x(H)}]),onClickCapture:c[3]||(c[3]=(...e)=>x(b)&&x(b)(...e))},[p("div",{class:"touch-mask-guide-item",onClick:c[0]||(c[0]=e=>x(y)(-1))},[p("p",null,d(x(t)("wap.playPrevLine1")),1),p("p",null,d(x(t)("wap.playPrevLine2")),1)]),p("div",{class:"touch-mask-guide-item",onClick:c[1]||(c[1]=(...e)=>x(Z)&&x(Z)(...e))},[p("p",null,d(x(t)("wap.playMenuLine1")),1),p("p",null,d(x(t)("wap.playMenuLine2")),1)]),p("div",{class:"touch-mask-guide-item",onClick:c[2]||(c[2]=e=>x(y)(1))},[p("p",null,d(x(t)("wap.playNextLine1")),1),p("p",null,d(x(t)("wap.playNextLine2")),1)])],34),p("div",{class:a(["player-top-bar",{"is-show":x(h)}])},[g(x(N),{class:"player-top-bar-icon",name:"Left_b",width:"24",height:"24",color:"white",onClick:x(v)},null,8,["onClick"])],2),p("div",{class:a(["player-bottom-bar",{"is-show":x(h)}]),onTouchmove:c[4]||(c[4]=(...e)=>x(V)&&x(V)(...e)),onClick:c[5]||(c[5]=(...e)=>x(V)&&x(V)(...e))},[(w(!0),r(i,null,k(x(n),(e,t)=>(w(),u(Q,{id:`slide-${t}`,key:e,class:a(["player-bottom-bar-slide",{"is-active":t===x(f)}]),slide:x(l).get(e),"page-width":x(s)[0],"page-height":x(s)[1],style:{width:"100px"},onClick:e=>x(m)(t)},null,8,["id","class","slide","page-width","page-height","onClick"]))),128))],34)],512))}}),[["__scopeId","data-v-ee5b5d39"]]),se={class:"hybrid-player"},de=C(f({__name:"MobilePlayer",setup(e){const{pageOrder:t,pageSize:a,currentSlide:i,playerSlideWidth:l,updateWindowSize:n,goStep:d}=ne();return V(window,"resize",n),V(window,"keydown",e=>{0!==t.value.length&&(["ArrowRight","ArrowDown"].includes(e.key)?d(1):["ArrowLeft","ArrowUp"].includes(e.key)&&d(-1))}),b(()=>{n()}),(e,t)=>(w(),r("div",se,[x(i)?(w(),u(Q,{key:0,slide:x(i),"page-width":x(a)[0],"page-height":x(a)[1],style:s({width:`${x(l)}px`})},null,8,["slide","page-width","page-height","style"])):o("",!0),g(re)]))}}),[["__scopeId","data-v-2a476c11"]]),ce={class:"mobile-loading"},pe={class:"mobile-loading-content"},ue=C(f({__name:"MobileLoading",props:{text:{}},setup:e=>(t,a)=>(w(),r("div",ce,[p("div",pe,[g(te),p("span",null,d(e.text),1)])]))}),[["__scopeId","data-v-c1193748"]]),ge={key:0,class:"preview-title"},fe={key:0,class:"preview-loading"},he={key:1,class:"preview-error"},He={key:2,class:"slides-list"},ve={key:1,class:"preview-action"},we=C(f({__name:"MobilePreview",setup(e){const{t:t}=A(),l=c(),{isLoading:f,isError:h,exporting:H,pages:m,pageOrder:M,pageSize:_,slideWidth:Z,displayTitle:S,isShare:P,updateScreenWidth:T,enterPlay:C,handleExport:j,loadPPTD:I}=ne(),z=()=>{T(l.value?.clientWidth)};return V(window,"resize",z),b(async()=>{z(),await I(),await y(),z()}),(e,c)=>(w(),r("div",{ref_key:"previewRef",ref:l,class:"preview-container"},[x(P)?o("",!0):(w(),r("div",ge,d(x(S)),1)),p("div",{class:a(["hybrid-preview",{"is-loading-segment":x(f)}])},[x(f)?(w(),r("div",fe,[g(te),p("span",null,d(x(t)("wap.loading")),1)])):x(h)?(w(),r("div",he,d(x(t)("common.loadFailedRetry")),1)):(w(),r("div",He,[(w(!0),r(i,null,k(x(M),e=>(w(),u(Q,{key:e,class:"slides-list-item",slide:x(m).get(e),"page-width":x(_)[0],"page-height":x(_)[1],style:s({width:`${x(Z)}px`})},null,8,["slide","page-width","page-height","style"]))),128))]))],2),x(P)||x(f)||x(h)?o("",!0):(w(),r("div",ve,[g(x(ee),{type:"secondary",onClick:x(C)},{default:v(()=>[n(d(x(t)("wap.play")),1)]),_:1},8,["onClick"]),g(x(ee),{loading:x(H),onClick:x(j)},{default:v(()=>[n(d(x(t)("wap.export")),1)]),_:1},8,["loading","onClick"])])),x(H)?(w(),u(ue,{key:2,text:x(t)("wap.exporting")},null,8,["text"])):o("",!0)],512))}}),[["__scopeId","data-v-6f9cecd5"]]),e("default",f({__name:"Mobile",setup(e){K();const{isPlaying:t}=ne(),{meta:a}=J(),{setPPTDTitle:i}=ae();return _(()=>a.value.title,e=>i(e),{immediate:!0}),(e,a)=>x(t)?(w(),u(de,{key:0})):(w(),u(we,{key:1}))}}))}}}); |