cty-mui-core 1.0.21 → 1.0.23

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.
Files changed (55) hide show
  1. package/components/cty-camera-photo.js +4 -2
  2. package/components/cty-share-sheet.js +3 -2
  3. package/components/cty-video.js +3 -2
  4. package/components/status-bar.js +19 -1
  5. package/dist/cjs/cty-camera-photo.cjs.entry.js +2 -2
  6. package/dist/cjs/cty-media-capture.cjs.entry.js +1 -1
  7. package/dist/cjs/cty-mui.cjs.js +1 -1
  8. package/dist/cjs/cty-share-sheet.cjs.entry.js +2 -2
  9. package/dist/cjs/cty-video.cjs.entry.js +4 -3
  10. package/dist/cjs/index.cjs.js +1 -1
  11. package/dist/cjs/loader.cjs.js +1 -1
  12. package/dist/cjs/{status-bar-BJrl_sQk.js → status-bar-DR3Ts0xT.js} +19 -1
  13. package/dist/collection/components/camera-photo/camera-photo.css +2 -0
  14. package/dist/collection/components/camera-photo/camera-photo.js +4 -2
  15. package/dist/collection/components/share-sheet/share-sheet.css +4 -0
  16. package/dist/collection/components/share-sheet/share-sheet.js +3 -2
  17. package/dist/collection/components/video/video.js +3 -2
  18. package/dist/collection/utils/date.js +19 -1
  19. package/dist/cty-mui/cty-mui.esm.js +1 -1
  20. package/dist/cty-mui/index.esm.js +1 -1
  21. package/dist/cty-mui/p-061ea659.system.entry.js +1 -0
  22. package/dist/cty-mui/{p-bb83aa1b.system.entry.js → p-2ade6369.system.entry.js} +1 -1
  23. package/dist/cty-mui/{p-fd2da714.entry.js → p-3bbb54df.entry.js} +1 -1
  24. package/dist/cty-mui/p-4c1ed416.system.entry.js +1 -0
  25. package/dist/cty-mui/p-705df197.entry.js +1 -0
  26. package/dist/cty-mui/p-Cegbc1c7.system.js +1 -1
  27. package/dist/cty-mui/{p-vRZWRoQ8.js → p-DHw6yjQm.js} +1 -1
  28. package/dist/cty-mui/{p-BLI96Ug8.system.js → p-DcAsxXPo.system.js} +1 -1
  29. package/dist/cty-mui/{p-CWfyjvMz.system.js → p-MYIzeChY.system.js} +1 -1
  30. package/dist/cty-mui/{p-a78aa31c.entry.js → p-c3f845cf.entry.js} +1 -1
  31. package/dist/cty-mui/{p-78fcf340.entry.js → p-d8e7bff7.entry.js} +1 -1
  32. package/dist/cty-mui/{p-9997121c.system.entry.js → p-ee54f61b.system.entry.js} +1 -1
  33. package/dist/docs.json +1 -1
  34. package/dist/esm/cty-camera-photo.entry.js +2 -2
  35. package/dist/esm/cty-media-capture.entry.js +1 -1
  36. package/dist/esm/cty-mui.js +1 -1
  37. package/dist/esm/cty-share-sheet.entry.js +2 -2
  38. package/dist/esm/cty-video.entry.js +4 -3
  39. package/dist/esm/index.js +1 -1
  40. package/dist/esm/loader.js +1 -1
  41. package/dist/esm/{status-bar-DhaoWhCJ.js → status-bar-KyPyjcXz.js} +19 -1
  42. package/dist/esm-es5/cty-camera-photo.entry.js +1 -1
  43. package/dist/esm-es5/cty-media-capture.entry.js +1 -1
  44. package/dist/esm-es5/cty-mui.js +1 -1
  45. package/dist/esm-es5/cty-share-sheet.entry.js +1 -1
  46. package/dist/esm-es5/cty-video.entry.js +1 -1
  47. package/dist/esm-es5/index.js +1 -1
  48. package/dist/esm-es5/loader.js +1 -1
  49. package/dist/esm-es5/{status-bar-DhaoWhCJ.js → status-bar-KyPyjcXz.js} +1 -1
  50. package/dist/types/components/camera-photo/camera-photo.d.ts +2 -2
  51. package/dist/types/components/share-sheet/share-sheet.d.ts +1 -1
  52. package/package.json +1 -1
  53. package/dist/cty-mui/p-3e33b40b.system.entry.js +0 -1
  54. package/dist/cty-mui/p-6fc16b0f.entry.js +0 -1
  55. package/dist/cty-mui/p-8a8f89d4.system.entry.js +0 -1
@@ -1 +1 @@
1
- import{r as e,c as t,h as s,a as i,g as a}from"./p-DBsZD0Dk.js";import{c as r}from"./p-iD8sj4Mi.js";import{d as c,c as o,r as n}from"./p-CXtPwfcM.js";import{w as h,s as l,a as d,S as p}from"./p-DM51Z91U.js";import{a as y}from"./p-DNb27sgv.js";import{e as f,f as x,p as m,g as b,h as g,j as u,k as w}from"./p-CTeeGenQ.js";import{c as v}from"./p-CaB1JJxy.js";import{r as j}from"./p-Bm1EyNNA.js";import{g as k,e as _,l as O}from"./p-CbxS1eTP.js";import"./p-BqPoMbNS.js";import"./p-BqPNWsXF.js";import"./p-B9QMksFp.js";import"./p-ZjP4CjeZ.js";import"./p-skPg8wu0.js";const z=class{constructor(s){e(this,s),this.ctyDismiss=t(this,"ctyDismiss",7),this.ctyTap=t(this,"ctyTap",7),this.ctyShareSuccess=t(this,"ctyShareSuccess",7),this.ctyShareFail=t(this,"ctyShareFail",7),this.ctyGuide=t(this,"ctyGuide",7),this.didPresent=t(this,"ctyDidPresent",7),this.willPresent=t(this,"ctyWillPresent",7),this.willDismiss=t(this,"ctyWillDismiss",7),this.didDismiss=t(this,"ctyDidDismiss",7),this.delegateController=f(this),this.lockController=v(),this.triggerController=x(),this.presented=!1,this.hasController=!1,this.hiddenSheet=!1,this.guide=!0,this.guideImg=r.get("resUrlPrefix","")+"assets/cty_res/img/spell-share-guide.png",this.backdropDismiss=!0,this.title="分享至",this.description="",this.cancelText="取消",this.options=[{role:"wechat"},{role:"wechat-moments"},{role:"social-agent"},{role:"sina-weibo"}],this.shareOption={},this.permissionPurpose=!0,this.permissionDescription="存储空间权限使用说明:<br/>用于访问图片、视频、音频文件",this.legacyCopy=!1,this.root="default",this.animated=!1,this.isToastOpen=!1,this.toastContent="",this._options=[],this.isMicroMessager=c.isMicroMessager,this.isIos=c.isIos,this.showPermissionPurpose=!1}triggerChanged(){const{trigger:e,el:t,triggerController:s}=this;e&&s.addClickListener(t,e)}connectedCallback(){m(this.el),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener(),this.presented&&b()}componentWillLoad(){if(!this.hasController&&j((()=>this.present())),this.options.length>0){const e=[...this.options],t={wechat:{title:"微信",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/wechat.png"},"wechat-moments":{title:"朋友圈",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/wechat-moments.png"},"wechat-agent":{title:"企业微信",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/wechat-agent.png"},"sina-weibo":{title:"新浪微博",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/sina-weibo.png"},social:{title:"更多分享",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/social.png"},"social-agent":{title:"企业微信",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/wechat-agent.png"},"copy-url":{title:"复制链接",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/copy-url.png"}};e.forEach((e=>{const s=t[e.role||""];s&&(e.title=e.title||s.title,e.icon=e.icon||s.icon)})),this._options=e}}async present(){const e=await this.lockController.lock();await this.delegateController.attachViewToDom(this.root),await g(this,"shareSheetEnter",(e=>_(e,".cty-share-sheet"))),e()}async dismiss(){this.showPermissionPurpose=!1;const e=await this.lockController.lock(),t=await u(this,"shareSheetLeave",(e=>O(e,".cty-share-sheet")));return t&&this.delegateController.removeViewFromDom(),e(),t}onDidDismiss(){return w(this.el,"ctyDidDismiss")}onWillDismiss(){return w(this.el,"ctyWillDismiss")}checkPermission(){return Promise.resolve().then((async()=>{if(!this.permissionPurpose||!this.permissionDescription)return;const e=await o("READ_MEDIA_IMAGES"),t=await o("READ_EXTERNAL_STORAGE");!1===e&&!1===t&&(this.showPermissionPurpose=!0)})).catch((()=>{}))}async _wxShare(e,t,s=!1){try{await h.isInstallWechat()||(this.isToastOpen=!0,this.toastContent="请安装微信APP")}catch(t){return this.isToastOpen=!0,this.toastContent=t||"请安装微信APP",void this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}try{const i=h.Scene[s?"TIMELINE":"SESSION"],a=this.shareOption.wxMedia||{image:null,webpageLink:null,type:null},r=this.shareOption.title||"",c=this.shareOption.description||"",o=this.shareOption.thumb||"",y=a.image||this.shareOption.defaultImg||"",f=a.webpageLink||this.shareOption.defaultUrl||"",x=this.shareOption.wxText?d.TEXT:a.type||(y?d.IMAGE:d.WEBPAGE);y?n().then((()=>{l.share({appType:p.WECHAT,type:x,link:f,title:r,description:c,thumb:o,image:y,scene:i}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))})):l.share({appType:p.WECHAT,type:x,link:f,title:r,description:c,thumb:o,image:y,scene:i}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){}}_sinaShare(e,t){try{l.isInstallWeibo().then((()=>{const s=this.shareOption.weiboLink||this.shareOption.defaultUrl||"",i=this.shareOption.weiboImg||this.shareOption.defaultImg||"";l.share({appType:p.SINA_WEIBO,type:d[!s&&i?"IMAGE":"WEBPAGE"],image:i,link:s,title:this.shareOption.title||"",description:this.shareOption.description||"",thumb:i}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))})).catch((e=>{this.isToastOpen=!0,this.toastContent=e||"Weibo uninstalled"}))}catch(e){this.isToastOpen=!0,this.toastContent="分享失败 "+(e||"")}}_socialShare(e,t){l.share({appType:p.SOCIAL,type:d.WEBPAGE,description:this.shareOption.description||"",title:this.shareOption.title||"",image:this.shareOption.socialFile||this.shareOption.defaultImg||"",link:this.shareOption.socialLink||this.shareOption.defaultUrl||""}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}_socialAgentShare(e,t){try{const s=this.shareOption.wxText,i=this.shareOption.socialAgentImg||this.shareOption.defaultImg||"";l.share({appType:p.SYSTEM,type:d[s?"TEXT":i?"IMAGE":"WEBPAGE"],title:this.shareOption.title||"",link:this.shareOption.socialAgentLink||this.shareOption.defaultUrl||"",text:s,image:i,packageName:this.shareOption.packageName||"com.tencent.wework",uiPage:this.shareOption.uiPage||"com.tencent.wework.launch.AppSchemeLaunchActivity"}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){}}_agentShare(e,t){try{const s=this.shareOption.agentImg||this.shareOption.defaultImg||"",i=this.shareOption.agentImgType||"jpg",a=this.shareOption.agentFileName||`${(new Date).getTime()}.jpg`;l.share({appType:p.WECOM,type:d[s?"IMAGE":"WEBPAGE"],image:s,fileName:a,thumb:this.shareOption.thumb||"",link:this.shareOption.agentLink||this.shareOption.defaultUrl||"",title:this.shareOption.title||"",description:this.shareOption.description||"",imageType:i}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){this.isToastOpen=!0,this.toastContent="分享失败 "+(e||"")}}_copyUrl(e,t){y(this.shareOption.copyText||"",this.legacyCopy).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}))}))}async _buttonClick(e,t){this.isMicroMessager||("wechat"===e.role&&(this.isIos||await this.checkPermission(),this._wxShare(e,t)),"wechat-moments"===e.role&&(this.isIos||await this.checkPermission(),this._wxShare(e,t,!0)),"wechat-agent"===e.role&&this._agentShare(e,t),"sina-weibo"===e.role&&this._sinaShare(e,t),"social"===e.role&&this._socialShare(e,t),"social-agent"===e.role&&this._socialAgentShare(e,t),"copy-url"===e.role&&this._copyUrl(e,t)),e.handler&&e.handler(e),this.ctyTap.emit(Object.assign(Object.assign({},e),{index:t}))}_doGuid(e){e.stopPropagation(),this.ctyGuide.emit()}render(){return s(i,{key:"e78cf287f8f817efe439b49ed72085c083ec536b",class:Object.assign(Object.assign({},k(this.cssClass)),{"overlay-hidden":!0}),style:{zIndex:`${2e4+this.overlayIndex}`}},s("cty-backdrop",{key:"992f276b5e913e4304fec76488e3b114404ba1be",backdropDismiss:this.backdropDismiss,position:"bottom",onCtyDismiss:()=>this.dismiss()},this.guide&&this.isMicroMessager&&s("div",{key:"9dfc481bf9f86c939c01ef68d1a282a939519349",class:"cty-share-guide",onClick:e=>this._doGuid(e)},s("img",{key:"7cd7e68c507edd8dff6b916d5799e808109f95dd",src:this.guideImg})),s("slot",{key:"d473f29a6fddddb019c09368608835e35a810661",name:"share-sheet"}),!this.hiddenSheet&&s("div",{key:"b0324434561852746abcf29a547e1c10e37675ef",class:"cty-share-sheet safe-area-bottom-padding",onClick:e=>e.stopPropagation()},s("slot",{key:"e9f26fc6fdf9e79a484077bbf55021d92a2366ec",name:"header"}),(this.title||this.description)&&s("div",{key:"159977bc1d742592e4518532e8aa277daac8b2ed",class:"cty-share-sheet__header",part:"header"},this.title&&s("cty-divider",{key:"c811dedb957c2f5f1a84d41fa6990effa936e45d"},this.title),this.description&&s("p",{key:"5f0a667e4d43de2ae191ee76eb8c414fd91dec7d",class:"cty-share-sheet__description"},this.description)),s("slot",{key:"8436a444b9ae7e4de78b1e887873f67098ee1d4a",name:"options"}),s("div",{key:"fa0b0f52228db6a03ff806c27f3ebdfba4f13fac",class:"cty-share-sheet__options flex",part:"options"},this._options.map(((e,t)=>s("div",{part:"option",class:"cty-share-sheet__option flex-align-center",onClick:()=>this._buttonClick(e,t)},e.icon&&e.icon.indexOf("/")>=0&&!e.icon.endsWith(".svg")&&s("img",{class:"cty-share-sheet__img",src:e.icon}),e.icon&&(e.icon.indexOf("/")<0||e.icon.endsWith(".svg"))&&s("cty-icon",{name:e.icon,class:"cty-share-sheet__icon"}),e.title&&s("span",{class:"cty-share-sheet__option-title"},e.title),e.description&&s("span",{class:"cty-share-sheet__option-description"},e.description))))),s("slot",{key:"f4af07d7fa36e72707fb963679bd7d1257567ffc",name:"cancel"}),this.cancelText&&s("button",{key:"8d49acac107486a60bfc556979aae693a1e69205",part:"cancel",class:"cty-button-native cty-share-sheet__cancel",onClick:()=>this.dismiss()},this.cancelText))),this.showPermissionPurpose&&s("cty-permission-purpose",{key:"0aaa5c6be4dc6c707def59e6f52a40e1b80f337e",description:this.permissionDescription}),s("ion-toast",{key:"004405c04af98d4ea28529f527a0b67cffe669e8","is-open":this.isToastOpen,message:this.toastContent,duration:2e3}))}get el(){return a(this)}static get watchers(){return{trigger:["triggerChanged"]}}};z.style=".flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}ion-button{--background-activated:transparent;--background-focused:transparent;--background-hover:transparent;--box-shadow:none}ion-grid{padding:0}ion-row{padding:0}ion-col{padding:0}ion-item{--padding-bottom:0;--padding-end:0;--padding-start:0;--padding-top:0;--inner-padding-top:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-bottom:0;--inner-border-width:0;--border-width:0;--min-height:0;--background:none;overflow:initial}ion-toast{--width:84%;--height:36px;--color:var(--cty-color-white);--background:rgba(0, 0, 0, 0.7);--border-radius:100px;line-height:1.2;font-size:var(--cty-font-size-base);text-align:center}.plt-hybrid .safe-area-bottom-border{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid var(--cty-color-white)}.plt-hybrid .safe-area-bottom-border-color{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid currentColor}.plt-hybrid .safe-area-bottom-padding{padding-bottom:var(--ion-safe-area-bottom, 0)}.cty-button-native{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;line-height:1;border:0;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}:host{--cty-share-sheet-overlay-position:fixed;--cty-share-sheet-overlay-z-index:10;--cty-share-sheet-overlay-background:var(--cty-overlay-color);--cty-share-sheet-overlay-width:100vw;--cty-share-sheet-overlay-height:100vh;--cty-share-sheet-background:var(--cty-color-white);--cty-share-sheet-border-radius:10px 10px 0 0;--cty-share-sheet-guide-width:50vw;--cty-share-sheet-guide-top:10px;--cty-share-sheet-guide-right:0;--cty-share-sheet-header-padding:12px 15px 4px;--cty-share-sheet-title-offset:8px 0 0;--cty-share-sheet-title-size:var(--cty-font-size-base);--cty-share-sheet-title-color:var(--cty-text-color-primary);--cty-share-sheet-title-line-height:1px;--cty-share-sheet-title-line-background-color:var(--cty-border-color-extra-light);--cty-share-sheet-title-line-offset:20px;--cty-share-sheet-title-line-scale:1;--cty-share-sheet-description-offset-top:8px;--cty-share-sheet-description-size:var(--cty-font-size-extra-small);--cty-share-sheet-description-color:var(--cty-text-color-secondary);--cty-share-sheet-description-text-align:center;--cty-share-sheet-description-line-height:1;--cty-share-sheet-options-overflow-x:auto;--cty-share-sheet-options-wrap:nowrap;--cty-share-sheet-option-num:4;--cty-share-sheet-options-padding:16px 0 0;--cty-share-sheet-option-offset-bottom:16px;--cty-share-sheet-option-icon-width:40px;--cty-share-sheet-option-title-offset:8px 0 0;--cty-share-sheet-option-title-padding:0;--cty-share-sheet-option-title-size:var(--cty-font-size-extra-small);--cty-share-sheet-option-title-color:var(--cty-text-color-primary);--cty-share-sheet-option-description-padding:0;--cty-share-sheet-option-description-size:var(--cty-font-size-extra-small);--cty-share-sheet-option-description-color:var(--cty-text-color-secondary);--cty-share-sheet-cancel-height:48px;--cty-share-sheet-cancel-background:var(--cty-color-white);--cty-share-sheet-cancel-border-color:var(--cty-border-color-extra-light);--cty-share-sheet-cancel-border-width:8px;--cty-share-sheet-cancel-size:var(--cty-font-size-medium);--cty-share-sheet-cancel-color:var(--cty-text-color-primary)}:host(.overlay-hidden){display:none}cty-backdrop{position:var(--cty-share-sheet-overlay-position);z-index:var(--cty-share-sheet-overlay-z-index);background:var(--cty-share-sheet-overlay-background);width:var(--cty-share-sheet-overlay-width);height:var(--cty-share-sheet-overlay-height)}.cty-share-guide{position:absolute;right:var(--cty-share-sheet-guide-right);top:var(--cty-share-sheet-guide-top);width:var(--cty-share-sheet-guide-width)}.cty-share-guide img{display:block;width:100%}.cty-share-sheet{width:100%;background:var(--cty-share-sheet-background);border-radius:var(--cty-share-sheet-border-radius)}.cty-share-sheet__header{padding:var(--cty-share-sheet-header-padding)}cty-divider{--cty-divider-width:var(--cty-share-sheet-title-line-height);--cty-divider-content-offset:var(--cty-share-sheet-title-line-offset);--cty-divider-scale:var(--cty-share-sheet-title-line-scale);margin:var(--cty-share-sheet-title-offset);color:var(--cty-share-sheet-title-color);font-size:var(--cty-share-sheet-title-size);border-color:var(--cty-share-sheet-title-line-background-color)}.cty-share-sheet__description{margin-top:var(--cty-share-sheet-description-offset-top);font-size:var(--cty-share-sheet-description-size);color:var(--cty-share-sheet-description-color);text-align:var(--cty-share-sheet-description-text-align);line-height:var(--cty-share-sheet-description-line-height)}.cty-share-sheet__options{overflow-x:var(--cty-share-sheet-options-overflow-x);-ms-flex-wrap:var(--cty-share-sheet-options-wrap);flex-wrap:var(--cty-share-sheet-options-wrap);width:100%;padding:var(--cty-share-sheet-options-padding)}.cty-share-sheet__options::-webkit-scrollbar{width:0;height:0}.cty-share-sheet__option{max-width:calc(100% / var(--cty-share-sheet-option-num));-ms-flex:0 0 calc(100% / var(--cty-share-sheet-option-num));flex:0 0 calc(100% / var(--cty-share-sheet-option-num));-ms-flex-direction:column;flex-direction:column;margin-bottom:var(--cty-share-sheet-option-offset-bottom)}.cty-share-sheet__img{display:block;width:var(--cty-share-sheet-option-icon-width)}.cty-share-sheet__icon{display:block;width:auto;font-size:var(--cty-share-sheet-option-icon-width)}.cty-share-sheet__option-title{margin:var(--cty-share-sheet-option-title-offset);padding:var(--cty-share-sheet-option-title-padding);font-size:var(--cty-share-sheet-option-title-size);color:var(--cty-share-sheet-option-title-color);white-space:nowrap}.cty-share-sheet__option-description{padding:var(--cty-share-sheet-option-description-padding);font-size:var(--cty-share-sheet-option-description-size);color:var(--cty-share-sheet-option-description-color)}.cty-share-sheet__cancel{width:100%;background:var(--cty-share-sheet-cancel-background-color);border:0;border-top:var(--cty-share-sheet-cancel-border-width) solid var(--cty-share-sheet-cancel-border-color);line-height:var(--cty-share-sheet-cancel-height);font-size:var(--cty-share-sheet-cancel-size);color:var(--cty-share-sheet-cancel-color)}";export{z as cty_share_sheet}
1
+ import{r as e,c as t,h as s,a as i,g as a}from"./p-DBsZD0Dk.js";import{c as r}from"./p-iD8sj4Mi.js";import{d as c,c as o,r as n}from"./p-CXtPwfcM.js";import{w as h,s as l,a as d,S as p}from"./p-DM51Z91U.js";import{a as y}from"./p-DNb27sgv.js";import{e as f,f as x,p as b,g as m,h as g,j as u,k as w}from"./p-CTeeGenQ.js";import{c as v}from"./p-CaB1JJxy.js";import{r as j}from"./p-Bm1EyNNA.js";import{g as k,e as _,l as O}from"./p-CbxS1eTP.js";import"./p-BqPoMbNS.js";import"./p-BqPNWsXF.js";import"./p-B9QMksFp.js";import"./p-ZjP4CjeZ.js";import"./p-skPg8wu0.js";const z=class{constructor(s){e(this,s),this.ctyDismiss=t(this,"ctyDismiss",7),this.ctyTap=t(this,"ctyTap",7),this.ctyShareSuccess=t(this,"ctyShareSuccess",7),this.ctyShareFail=t(this,"ctyShareFail",7),this.ctyGuide=t(this,"ctyGuide",7),this.didPresent=t(this,"ctyDidPresent",7),this.willPresent=t(this,"ctyWillPresent",7),this.willDismiss=t(this,"ctyWillDismiss",7),this.didDismiss=t(this,"ctyDidDismiss",7),this.delegateController=f(this),this.lockController=v(),this.triggerController=x(),this.presented=!1,this.hasController=!1,this.hiddenSheet=!1,this.guide=!0,this.guideImg=r.get("resUrlPrefix","")+"assets/cty_res/img/spell-share-guide.png",this.backdropDismiss=!0,this.title="分享至",this.description="",this.cancelText="取消",this.options=[{role:"wechat"},{role:"wechat-moments"},{role:"social-agent"},{role:"sina-weibo"}],this.shareOption={},this.permissionPurpose=!0,this.permissionDescription="存储空间权限使用说明:<br/>用于访问图片、视频、音频文件",this.legacyCopy=!1,this.root="default",this.animated=!1,this.isToastOpen=!1,this.toastContent="",this._options=[],this.isMicroMessager=c.isMicroMessager,this.isIos=c.isIos,this.showPermissionPurpose=!1}triggerChanged(){const{trigger:e,el:t,triggerController:s}=this;e&&s.addClickListener(t,e)}connectedCallback(){b(this.el),this.triggerChanged()}disconnectedCallback(){this.triggerController.removeClickListener(),this.presented&&m()}componentWillLoad(){if(!this.hasController&&j((()=>this.present())),this.options.length>0){const e=[...this.options],t={wechat:{title:"微信",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/wechat.png"},"wechat-moments":{title:"朋友圈",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/wechat-moments.png"},"wechat-agent":{title:"企业微信",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/wechat-agent.png"},"sina-weibo":{title:"新浪微博",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/sina-weibo.png"},social:{title:"更多分享",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/social.png"},"social-agent":{title:"企业微信",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/wechat-agent.png"},"copy-url":{title:"复制链接",icon:r.get("resUrlPrefix","")+"assets/cty_res/img/copy-url.png"}};e.forEach((e=>{const s=t[e.role||""];s&&(e.title=e.title||s.title,e.icon=e.icon||s.icon)})),this._options=e}}async present(){const e=await this.lockController.lock();await this.delegateController.attachViewToDom(this.root),await g(this,"shareSheetEnter",(e=>_(e,".cty-share-sheet"))),e()}async dismiss(){this.showPermissionPurpose=!1;const e=await this.lockController.lock(),t=await u(this,"shareSheetLeave",(e=>O(e,".cty-share-sheet")));return t&&this.delegateController.removeViewFromDom(),e(),t}onDidDismiss(){return w(this.el,"ctyDidDismiss")}onWillDismiss(){return w(this.el,"ctyWillDismiss")}checkPermission(){return Promise.resolve().then((async()=>{if(!this.permissionPurpose||!this.permissionDescription)return;const e=await o("READ_MEDIA_IMAGES"),t=await o("READ_EXTERNAL_STORAGE");!1===e&&!1===t&&(this.showPermissionPurpose=!0)})).catch((()=>{}))}async _wxShare(e,t,s=!1){try{await h.isInstallWechat()||(this.isToastOpen=!0,this.toastContent="请安装微信APP")}catch(t){return this.isToastOpen=!0,this.toastContent=t||"请安装微信APP",void this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}try{const i=h.Scene[s?"TIMELINE":"SESSION"],a=this.shareOption.wxMedia||{image:null,webpageLink:null,type:null},r=this.shareOption.title||"",c=this.shareOption.description||"",o=this.shareOption.thumb||"",y=a.image||this.shareOption.defaultImg||"",f=a.webpageLink||this.shareOption.defaultUrl||"",x=this.shareOption.wxText?d.TEXT:a.type||(y?d.IMAGE:d.WEBPAGE);y?n().then((()=>{l.share({appType:p.WECHAT,type:x,link:f,title:r,description:c,thumb:o,image:y,scene:i}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))})):l.share({appType:p.WECHAT,type:x,link:f,title:r,description:c,thumb:o,image:y,scene:i}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){}}_sinaShare(e,t){try{l.isInstallWeibo().then((()=>{const s=this.shareOption.weiboLink||this.shareOption.defaultUrl||"",i=this.shareOption.weiboImg||this.shareOption.defaultImg||"";l.share({appType:p.SINA_WEIBO,type:d[!s&&i?"IMAGE":"WEBPAGE"],image:i,link:s,title:this.shareOption.title||"",description:this.shareOption.description||"",thumb:i}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))})).catch((e=>{this.isToastOpen=!0,this.toastContent=e||"Weibo uninstalled"}))}catch(e){this.isToastOpen=!0,this.toastContent="分享失败 "+(e||"")}}_socialShare(e,t){l.share({appType:p.SOCIAL,type:d.WEBPAGE,description:this.shareOption.description||"",title:this.shareOption.title||"",image:this.shareOption.socialFile||this.shareOption.defaultImg||"",link:this.shareOption.socialLink||this.shareOption.defaultUrl||""}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}_socialAgentShare(e,t){try{const s=this.shareOption.wxText,i=this.shareOption.socialAgentImg||this.shareOption.defaultImg||"";l.share({appType:p.SYSTEM,type:d[s?"TEXT":i?"IMAGE":"WEBPAGE"],title:this.shareOption.title||"",link:this.shareOption.socialAgentLink||this.shareOption.defaultUrl||"",text:s,image:i,packageName:this.shareOption.packageName||"com.tencent.wework",uiPage:this.shareOption.uiPage||"com.tencent.wework.launch.AppSchemeLaunchActivity"}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){}}_agentShare(e,t){try{const s=this.shareOption.agentImg||this.shareOption.defaultImg||"",i=this.shareOption.agentImgType||"jpg",a=this.shareOption.agentFileName||`${(new Date).getTime()}.jpg`;l.share({appType:p.WECOM,type:d[s?"IMAGE":"WEBPAGE"],image:s,fileName:a,thumb:this.shareOption.thumb||"",link:this.shareOption.agentLink||this.shareOption.defaultUrl||"",title:this.shareOption.title||"",description:this.shareOption.description||"",imageType:i}).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t})),this.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((t=>{this.isToastOpen=!0,this.toastContent=t,this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){this.isToastOpen=!0,this.toastContent="分享失败 "+(e||"")}}_copyUrl(e,t){y(this.shareOption.copyText||"",this.legacyCopy).then((()=>{e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}))}))}async _buttonClick(e,t){this.isMicroMessager||("wechat"===e.role&&(this.isIos||await this.checkPermission(),this._wxShare(e,t)),"wechat-moments"===e.role&&(this.isIos||await this.checkPermission(),this._wxShare(e,t,!0)),"wechat-agent"===e.role&&this._agentShare(e,t),"sina-weibo"===e.role&&this._sinaShare(e,t),"social"===e.role&&this._socialShare(e,t),"social-agent"===e.role&&this._socialAgentShare(e,t),"copy-url"===e.role&&this._copyUrl(e,t)),e.handler&&e.handler(e),this.ctyTap.emit(Object.assign(Object.assign({},e),{index:t}))}_doGuid(e){e.stopPropagation(),this.ctyGuide.emit()}render(){return s(i,{key:"8757d4a8b07d87efd53f7b155faa0b39a727fed0",class:Object.assign(Object.assign({},k(this.cssClass)),{"overlay-hidden":!0}),style:{zIndex:`${2e4+this.overlayIndex}`}},s("cty-backdrop",{key:"c8368ab2f9684ededf86d26cbae4643b716d5eb3",backdropDismiss:this.backdropDismiss,position:"bottom",onCtyDismiss:()=>this.dismiss()},this.guide&&this.isMicroMessager&&s("div",{key:"cfa74ed0b3f0dd63dc8da305b09dbf032bdc479a",class:"cty-share-guide",onClick:e=>this._doGuid(e)},s("img",{key:"996b6724a08c47cd5a216b1c5af7e2d4a6deb358",src:this.guideImg})),s("slot",{key:"15511304eec04e38fc4fede8500cfe86ba491c4f",name:"share-sheet"}),!this.hiddenSheet&&s("div",{key:"56149976aa96c7108e88372f53e6deec3dab26d7",class:"cty-share-sheet safe-area-bottom-padding",onClick:e=>e.stopPropagation()},s("slot",{key:"58c3ee47966bcc13fd5d853685fd14e9bb10dc0a",name:"header"}),(this.title||this.description)&&s("div",{key:"4edbfe76289997aadaf436bd6f5a212aa5074029",class:"cty-share-sheet__header",part:"header"},this.title&&s("cty-divider",{key:"95f441f50c315eebcd771442c5c3b1698b16acdb"},this.title),this.description&&s("p",{key:"c11cae0d8d2e64dcf5f6829b4c70a51f5ef52d97",class:"cty-share-sheet__description"},this.description)),s("slot",{key:"9736ea1a93c1fed84cabbb971645ec16751d0c42",name:"options"}),s("div",{key:"52dfb70f5eab7271b85dba92626f83bc01208810",class:"cty-share-sheet__options flex",part:"options"},this._options.map(((e,t)=>s("div",{part:"option",class:"cty-share-sheet__option flex-align-center",onClick:()=>this._buttonClick(e,t)},e.icon&&e.icon.indexOf("/")>=0&&!e.icon.endsWith(".svg")&&s("img",{class:"cty-share-sheet__img",src:e.icon}),e.icon&&(e.icon.indexOf("/")<0||e.icon.endsWith(".svg"))&&s("cty-icon",{name:e.icon,class:"cty-share-sheet__icon"}),e.title&&s("span",{class:"cty-share-sheet__option-title"},e.title),e.description&&s("span",{class:"cty-share-sheet__option-description"},e.description))))),s("slot",{key:"8528c74d8ed0f75457447e23421a67fb21a506ea",name:"cancel"}),this.cancelText&&s("button",{key:"7b000a6f94fc494c3d7a411656d075bd7f0d9a0c",part:"cancel",class:"cty-button-native cty-share-sheet__cancel",onClick:()=>this.dismiss()},this.cancelText))),this.showPermissionPurpose&&s("cty-permission-purpose",{key:"e43ebf8435a8fdaf49c3426eb0030842e918c6c3",description:this.permissionDescription}),s("ion-toast",{key:"2e00a1c8756907613e61eb1221a4866680fa46fb","is-open":this.isToastOpen,message:this.toastContent,duration:2e3}))}get el(){return a(this)}static get watchers(){return{trigger:["triggerChanged"]}}};z.style=".flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}ion-button{--background-activated:transparent;--background-focused:transparent;--background-hover:transparent;--box-shadow:none}ion-grid{padding:0}ion-row{padding:0}ion-col{padding:0}ion-item{--padding-bottom:0;--padding-end:0;--padding-start:0;--padding-top:0;--inner-padding-top:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-bottom:0;--inner-border-width:0;--border-width:0;--min-height:0;--background:none;overflow:initial}ion-toast{--width:84%;--height:36px;--color:var(--cty-color-white);--background:rgba(0, 0, 0, 0.7);--border-radius:100px;line-height:1.2;font-size:var(--cty-font-size-base);text-align:center}.plt-hybrid .safe-area-bottom-border{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid var(--cty-color-white)}.plt-hybrid .safe-area-bottom-border-color{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid currentColor}.plt-hybrid .safe-area-bottom-padding{padding-bottom:var(--ion-safe-area-bottom, 0)}.cty-button-native{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;line-height:1;border:0;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}:host{--cty-share-sheet-overlay-position:fixed;--cty-share-sheet-overlay-z-index:10;--cty-share-sheet-overlay-background:var(--cty-overlay-color);--cty-share-sheet-overlay-width:100vw;--cty-share-sheet-overlay-height:100vh;--cty-share-sheet-background:var(--cty-color-white);--cty-share-sheet-border-radius:10px 10px 0 0;--cty-share-sheet-guide-width:50vw;--cty-share-sheet-guide-top:10px;--cty-share-sheet-guide-right:0;--cty-share-sheet-header-padding:12px 15px 4px;--cty-share-sheet-title-offset:8px 0 0;--cty-share-sheet-title-size:var(--cty-font-size-base);--cty-share-sheet-title-color:var(--cty-text-color-primary);--cty-share-sheet-title-line-height:1px;--cty-share-sheet-title-line-background-color:var(--cty-border-color-extra-light);--cty-share-sheet-title-line-offset:20px;--cty-share-sheet-title-line-scale:1;--cty-share-sheet-description-offset-top:8px;--cty-share-sheet-description-size:var(--cty-font-size-extra-small);--cty-share-sheet-description-color:var(--cty-text-color-secondary);--cty-share-sheet-description-text-align:center;--cty-share-sheet-description-line-height:1;--cty-share-sheet-options-overflow-x:auto;--cty-share-sheet-options-wrap:nowrap;--cty-share-sheet-option-num:4;--cty-share-sheet-options-padding:16px 0 0;--cty-share-sheet-option-offset-bottom:16px;--cty-share-sheet-option-icon-width:40px;--cty-share-sheet-option-title-offset:8px 0 0;--cty-share-sheet-option-title-padding:0;--cty-share-sheet-option-title-size:var(--cty-font-size-extra-small);--cty-share-sheet-option-title-color:var(--cty-text-color-primary);--cty-share-sheet-option-description-padding:0;--cty-share-sheet-option-description-size:var(--cty-font-size-extra-small);--cty-share-sheet-option-description-color:var(--cty-text-color-secondary);--cty-share-sheet-cancel-height:48px;--cty-share-sheet-cancel-background:var(--cty-color-white);--cty-share-sheet-cancel-border-color:var(--cty-border-color-extra-light);--cty-share-sheet-cancel-border-width:8px;--cty-share-sheet-cancel-size:var(--cty-font-size-medium);--cty-share-sheet-cancel-color:var(--cty-text-color-primary)}:host(.overlay-hidden){display:none}cty-backdrop{position:var(--cty-share-sheet-overlay-position);z-index:var(--cty-share-sheet-overlay-z-index);background:var(--cty-share-sheet-overlay-background);width:var(--cty-share-sheet-overlay-width);height:var(--cty-share-sheet-overlay-height)}.cty-share-guide{position:absolute;right:var(--cty-share-sheet-guide-right);top:var(--cty-share-sheet-guide-top);width:var(--cty-share-sheet-guide-width)}.cty-share-guide img{display:block;width:100%}.cty-share-sheet{width:100%;background:var(--cty-share-sheet-background);border-radius:var(--cty-share-sheet-border-radius)}.cty-share-sheet__header{padding:var(--cty-share-sheet-header-padding)}cty-divider{--cty-divider-width:var(--cty-share-sheet-title-line-height);--cty-divider-content-offset:var(--cty-share-sheet-title-line-offset);--cty-divider-scale:var(--cty-share-sheet-title-line-scale);margin:var(--cty-share-sheet-title-offset);color:var(--cty-share-sheet-title-color);font-size:var(--cty-share-sheet-title-size);border-color:var(--cty-share-sheet-title-line-background-color)}.cty-share-sheet__description{margin-top:var(--cty-share-sheet-description-offset-top);font-size:var(--cty-share-sheet-description-size);color:var(--cty-share-sheet-description-color);text-align:var(--cty-share-sheet-description-text-align);line-height:var(--cty-share-sheet-description-line-height)}.cty-share-sheet__options{overflow-x:var(--cty-share-sheet-options-overflow-x);-ms-flex-wrap:var(--cty-share-sheet-options-wrap);flex-wrap:var(--cty-share-sheet-options-wrap);width:100%;padding:var(--cty-share-sheet-options-padding)}.cty-share-sheet__options::-webkit-scrollbar{width:0;height:0}.cty-share-sheet__option{max-width:calc(100% / var(--cty-share-sheet-option-num));-ms-flex:0 0 calc(100% / var(--cty-share-sheet-option-num));flex:0 0 calc(100% / var(--cty-share-sheet-option-num));-ms-flex-direction:column;flex-direction:column;margin-bottom:var(--cty-share-sheet-option-offset-bottom)}.cty-share-sheet__img{display:block;width:var(--cty-share-sheet-option-icon-width)}.cty-share-sheet__icon{display:block;width:auto;font-size:var(--cty-share-sheet-option-icon-width)}.cty-share-sheet__option-title{margin:var(--cty-share-sheet-option-title-offset);padding:var(--cty-share-sheet-option-title-padding);font-size:var(--cty-share-sheet-option-title-size);color:var(--cty-share-sheet-option-title-color);white-space:nowrap}.cty-share-sheet__option-description{padding:var(--cty-share-sheet-option-description-padding);font-size:var(--cty-share-sheet-option-description-size);color:var(--cty-share-sheet-option-description-color)}.cty-share-sheet__cancel{width:100%;background:var(--cty-share-sheet-cancel-background-color);border:0;border-top:var(--cty-share-sheet-cancel-border-width) solid var(--cty-share-sheet-cancel-border-color);line-height:var(--cty-share-sheet-cancel-height);font-size:var(--cty-share-sheet-cancel-size);color:var(--cty-share-sheet-cancel-color)}cty-permission-purpose{--cty-permission-purpose-overlay-height:auto}";export{z as cty_share_sheet}
@@ -0,0 +1 @@
1
+ var __awaiter=this&&this.__awaiter||function(e,t,i,s){function n(e){return e instanceof i?e:new i((function(t){t(e)}))}return new(i||(i=Promise))((function(i,r){function a(e){try{o(s.next(e))}catch(e){r(e)}}function c(e){try{o(s["throw"](e))}catch(e){r(e)}}function o(e){e.done?i(e.value):n(e.value).then(a,c)}o((s=s.apply(e,t||[])).next())}))};var __generator=this&&this.__generator||function(e,t){var i={label:0,sent:function(){if(r[0]&1)throw r[1];return r[1]},trys:[],ops:[]},s,n,r,a;return a={next:c(0),throw:c(1),return:c(2)},typeof Symbol==="function"&&(a[Symbol.iterator]=function(){return this}),a;function c(e){return function(t){return o([e,t])}}function o(c){if(s)throw new TypeError("Generator is already executing.");while(a&&(a=0,c[0]&&(i=0)),i)try{if(s=1,n&&(r=c[0]&2?n["return"]:c[0]?n["throw"]||((r=n["return"])&&r.call(n),0):n.next)&&!(r=r.call(n,c[1])).done)return r;if(n=0,r)c=[c[0]&2,r.value];switch(c[0]){case 0:case 1:r=c;break;case 4:i.label++;return{value:c[1],done:false};case 5:i.label++;n=c[1];c=[0];continue;case 7:c=i.ops.pop();i.trys.pop();continue;default:if(!(r=i.trys,r=r.length>0&&r[r.length-1])&&(c[0]===6||c[0]===2)){i=0;continue}if(c[0]===3&&(!r||c[1]>r[0]&&c[1]<r[3])){i.label=c[1];break}if(c[0]===6&&i.label<r[1]){i.label=r[1];r=c;break}if(r&&i.label<r[2]){i.label=r[2];i.ops.push(c);break}if(r[2])i.ops.pop();i.trys.pop();continue}c=t.call(e,i)}catch(e){c=[6,e];n=0}finally{s=r=0}if(c[0]&5)throw c[1];return{value:c[0]?c[1]:void 0,done:true}}};var __spreadArray=this&&this.__spreadArray||function(e,t,i){if(i||arguments.length===2)for(var s=0,n=t.length,r;s<n;s++){if(r||!(s in t)){if(!r)r=Array.prototype.slice.call(t,0,s);r[s]=t[s]}}return e.concat(r||Array.prototype.slice.call(t))};System.register(["./p-BpC3ubr-.system.js","./p-DvPCY95C.system.js","./p-DSgG8qVn.system.js","./p-D2G0Jsfd.system.js","./p-DW5MHISD.system.js","./p-DJ6AO4zz.system.js","./p-CMMoObqS.system.js","./p-cQwGvN5a.system.js","./p-FsCPkocx.system.js","./p-NPOR6IxC.system.js","./p-B6ewx4qT.system.js","./p-D5YThY9F.system.js","./p-Ck01D6Xe.system.js","./p-CKjUa3W_.system.js"],(function(e){"use strict";var t,i,s,n,r,a,c,o,h,l,f,d,y,p,u,b,x,m,g,v,w,j,k,_,O,z;return{setters:[function(e){t=e.r;i=e.c;s=e.h;n=e.a;r=e.g},function(e){a=e.c},function(e){c=e.d;o=e.c;h=e.r},function(e){l=e.w;f=e.s;d=e.a;y=e.S},function(e){p=e.a},function(e){u=e.e;b=e.f;x=e.p;m=e.g;g=e.h;v=e.j;w=e.k},function(e){j=e.c},function(e){k=e.r},function(e){_=e.g;O=e.e;z=e.l},null,null,null,null,null],execute:function(){var D=".flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}ion-button{--background-activated:transparent;--background-focused:transparent;--background-hover:transparent;--box-shadow:none}ion-grid{padding:0}ion-row{padding:0}ion-col{padding:0}ion-item{--padding-bottom:0;--padding-end:0;--padding-start:0;--padding-top:0;--inner-padding-top:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-bottom:0;--inner-border-width:0;--border-width:0;--min-height:0;--background:none;overflow:initial}ion-toast{--width:84%;--height:36px;--color:var(--cty-color-white);--background:rgba(0, 0, 0, 0.7);--border-radius:100px;line-height:1.2;font-size:var(--cty-font-size-base);text-align:center}.plt-hybrid .safe-area-bottom-border{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid var(--cty-color-white)}.plt-hybrid .safe-area-bottom-border-color{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid currentColor}.plt-hybrid .safe-area-bottom-padding{padding-bottom:var(--ion-safe-area-bottom, 0)}.cty-button-native{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;text-decoration:inherit;text-indent:inherit;text-overflow:inherit;text-transform:inherit;text-align:inherit;white-space:inherit;color:inherit;line-height:1;border:0;outline:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-appearance:none;-moz-appearance:none;appearance:none;border-radius:0;-webkit-box-shadow:none;box-shadow:none;cursor:pointer}:host{--cty-share-sheet-overlay-position:fixed;--cty-share-sheet-overlay-z-index:10;--cty-share-sheet-overlay-background:var(--cty-overlay-color);--cty-share-sheet-overlay-width:100vw;--cty-share-sheet-overlay-height:100vh;--cty-share-sheet-background:var(--cty-color-white);--cty-share-sheet-border-radius:10px 10px 0 0;--cty-share-sheet-guide-width:50vw;--cty-share-sheet-guide-top:10px;--cty-share-sheet-guide-right:0;--cty-share-sheet-header-padding:12px 15px 4px;--cty-share-sheet-title-offset:8px 0 0;--cty-share-sheet-title-size:var(--cty-font-size-base);--cty-share-sheet-title-color:var(--cty-text-color-primary);--cty-share-sheet-title-line-height:1px;--cty-share-sheet-title-line-background-color:var(--cty-border-color-extra-light);--cty-share-sheet-title-line-offset:20px;--cty-share-sheet-title-line-scale:1;--cty-share-sheet-description-offset-top:8px;--cty-share-sheet-description-size:var(--cty-font-size-extra-small);--cty-share-sheet-description-color:var(--cty-text-color-secondary);--cty-share-sheet-description-text-align:center;--cty-share-sheet-description-line-height:1;--cty-share-sheet-options-overflow-x:auto;--cty-share-sheet-options-wrap:nowrap;--cty-share-sheet-option-num:4;--cty-share-sheet-options-padding:16px 0 0;--cty-share-sheet-option-offset-bottom:16px;--cty-share-sheet-option-icon-width:40px;--cty-share-sheet-option-title-offset:8px 0 0;--cty-share-sheet-option-title-padding:0;--cty-share-sheet-option-title-size:var(--cty-font-size-extra-small);--cty-share-sheet-option-title-color:var(--cty-text-color-primary);--cty-share-sheet-option-description-padding:0;--cty-share-sheet-option-description-size:var(--cty-font-size-extra-small);--cty-share-sheet-option-description-color:var(--cty-text-color-secondary);--cty-share-sheet-cancel-height:48px;--cty-share-sheet-cancel-background:var(--cty-color-white);--cty-share-sheet-cancel-border-color:var(--cty-border-color-extra-light);--cty-share-sheet-cancel-border-width:8px;--cty-share-sheet-cancel-size:var(--cty-font-size-medium);--cty-share-sheet-cancel-color:var(--cty-text-color-primary)}:host(.overlay-hidden){display:none}cty-backdrop{position:var(--cty-share-sheet-overlay-position);z-index:var(--cty-share-sheet-overlay-z-index);background:var(--cty-share-sheet-overlay-background);width:var(--cty-share-sheet-overlay-width);height:var(--cty-share-sheet-overlay-height)}.cty-share-guide{position:absolute;right:var(--cty-share-sheet-guide-right);top:var(--cty-share-sheet-guide-top);width:var(--cty-share-sheet-guide-width)}.cty-share-guide img{display:block;width:100%}.cty-share-sheet{width:100%;background:var(--cty-share-sheet-background);border-radius:var(--cty-share-sheet-border-radius)}.cty-share-sheet__header{padding:var(--cty-share-sheet-header-padding)}cty-divider{--cty-divider-width:var(--cty-share-sheet-title-line-height);--cty-divider-content-offset:var(--cty-share-sheet-title-line-offset);--cty-divider-scale:var(--cty-share-sheet-title-line-scale);margin:var(--cty-share-sheet-title-offset);color:var(--cty-share-sheet-title-color);font-size:var(--cty-share-sheet-title-size);border-color:var(--cty-share-sheet-title-line-background-color)}.cty-share-sheet__description{margin-top:var(--cty-share-sheet-description-offset-top);font-size:var(--cty-share-sheet-description-size);color:var(--cty-share-sheet-description-color);text-align:var(--cty-share-sheet-description-text-align);line-height:var(--cty-share-sheet-description-line-height)}.cty-share-sheet__options{overflow-x:var(--cty-share-sheet-options-overflow-x);-ms-flex-wrap:var(--cty-share-sheet-options-wrap);flex-wrap:var(--cty-share-sheet-options-wrap);width:100%;padding:var(--cty-share-sheet-options-padding)}.cty-share-sheet__options::-webkit-scrollbar{width:0;height:0}.cty-share-sheet__option{max-width:calc(100% / var(--cty-share-sheet-option-num));-ms-flex:0 0 calc(100% / var(--cty-share-sheet-option-num));flex:0 0 calc(100% / var(--cty-share-sheet-option-num));-ms-flex-direction:column;flex-direction:column;margin-bottom:var(--cty-share-sheet-option-offset-bottom)}.cty-share-sheet__img{display:block;width:var(--cty-share-sheet-option-icon-width)}.cty-share-sheet__icon{display:block;width:auto;font-size:var(--cty-share-sheet-option-icon-width)}.cty-share-sheet__option-title{margin:var(--cty-share-sheet-option-title-offset);padding:var(--cty-share-sheet-option-title-padding);font-size:var(--cty-share-sheet-option-title-size);color:var(--cty-share-sheet-option-title-color);white-space:nowrap}.cty-share-sheet__option-description{padding:var(--cty-share-sheet-option-description-padding);font-size:var(--cty-share-sheet-option-description-size);color:var(--cty-share-sheet-option-description-color)}.cty-share-sheet__cancel{width:100%;background:var(--cty-share-sheet-cancel-background-color);border:0;border-top:var(--cty-share-sheet-cancel-border-width) solid var(--cty-share-sheet-cancel-border-color);line-height:var(--cty-share-sheet-cancel-height);font-size:var(--cty-share-sheet-cancel-size);color:var(--cty-share-sheet-cancel-color)}cty-permission-purpose{--cty-permission-purpose-overlay-height:auto}";var P=e("cty_share_sheet",function(){function e(e){t(this,e);this.ctyDismiss=i(this,"ctyDismiss",7);this.ctyTap=i(this,"ctyTap",7);this.ctyShareSuccess=i(this,"ctyShareSuccess",7);this.ctyShareFail=i(this,"ctyShareFail",7);this.ctyGuide=i(this,"ctyGuide",7);this.didPresent=i(this,"ctyDidPresent",7);this.willPresent=i(this,"ctyWillPresent",7);this.willDismiss=i(this,"ctyWillDismiss",7);this.didDismiss=i(this,"ctyDidDismiss",7);this.delegateController=u(this);this.lockController=j();this.triggerController=b();this.presented=false;this.hasController=false;this.hiddenSheet=false;this.guide=true;this.guideImg=a.get("resUrlPrefix","")+"assets/cty_res/img/spell-share-guide.png";this.backdropDismiss=true;this.title="分享至";this.description="";this.cancelText="取消";this.options=[{role:"wechat"},{role:"wechat-moments"},{role:"social-agent"},{role:"sina-weibo"}];this.shareOption={};this.permissionPurpose=true;this.permissionDescription="存储空间权限使用说明:<br/>用于访问图片、视频、音频文件";this.legacyCopy=false;this.root="default";this.animated=false;this.isToastOpen=false;this.toastContent="";this._options=[];this.isMicroMessager=c.isMicroMessager;this.isIos=c.isIos;this.showPermissionPurpose=false}e.prototype.triggerChanged=function(){var e=this,t=e.trigger,i=e.el,s=e.triggerController;if(t){s.addClickListener(i,t)}};e.prototype.connectedCallback=function(){x(this.el);this.triggerChanged()};e.prototype.disconnectedCallback=function(){this.triggerController.removeClickListener();this.presented&&m()};e.prototype.componentWillLoad=function(){var e=this;!this.hasController&&k((function(){return e.present()}));if(this.options.length>0){var t=__spreadArray([],this.options,true);var i={wechat:{title:"微信",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/wechat.png"},"wechat-moments":{title:"朋友圈",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/wechat-moments.png"},"wechat-agent":{title:"企业微信",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/wechat-agent.png"},"sina-weibo":{title:"新浪微博",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/sina-weibo.png"},social:{title:"更多分享",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/social.png"},"social-agent":{title:"企业微信",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/wechat-agent.png"},"copy-url":{title:"复制链接",icon:a.get("resUrlPrefix","")+"assets/cty_res/img/copy-url.png"}};t.forEach((function(e){var t=e.role||"";var s=i[t];if(s){e.title=e.title||s.title;e.icon=e.icon||s.icon}}));this._options=t}};e.prototype.present=function(){return __awaiter(this,void 0,void 0,(function(){var e;return __generator(this,(function(t){switch(t.label){case 0:return[4,this.lockController.lock()];case 1:e=t.sent();return[4,this.delegateController.attachViewToDom(this.root)];case 2:t.sent();return[4,g(this,"shareSheetEnter",(function(e){return O(e,".cty-share-sheet")}))];case 3:t.sent();e();return[2]}}))}))};e.prototype.dismiss=function(){return __awaiter(this,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:this.showPermissionPurpose=false;return[4,this.lockController.lock()];case 1:e=i.sent();return[4,v(this,"shareSheetLeave",(function(e){return z(e,".cty-share-sheet")}))];case 2:t=i.sent();if(t){this.delegateController.removeViewFromDom()}e();return[2,t]}}))}))};e.prototype.onDidDismiss=function(){return w(this.el,"ctyDidDismiss")};e.prototype.onWillDismiss=function(){return w(this.el,"ctyWillDismiss")};e.prototype.checkPermission=function(){var e=this;return Promise.resolve().then((function(){return __awaiter(e,void 0,void 0,(function(){var e,t;return __generator(this,(function(i){switch(i.label){case 0:if(!this.permissionPurpose||!this.permissionDescription){return[2]}return[4,o("READ_MEDIA_IMAGES")];case 1:e=i.sent();return[4,o("READ_EXTERNAL_STORAGE")];case 2:t=i.sent();if(e===false&&t===false){this.showPermissionPurpose=true}return[2]}}))}))})).catch((function(){return}))};e.prototype._wxShare=function(e,t){return __awaiter(this,arguments,void 0,(function(e,t,i){var s,n,r,a,c,o,p,u,b,x,m;var g=this;if(i===void 0){i=false}return __generator(this,(function(v){switch(v.label){case 0:v.trys.push([0,2,,3]);return[4,l.isInstallWechat()];case 1:s=v.sent();if(!s){this.isToastOpen=true;this.toastContent="请安装微信APP"}return[3,3];case 2:n=v.sent();this.isToastOpen=true;this.toastContent=n||"请安装微信APP";this.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:n}));return[2];case 3:try{r=l.Scene[i?"TIMELINE":"SESSION"];a=this.shareOption.wxMedia||{image:null,webpageLink:null,type:null};c=this.shareOption.wxText;o=this.shareOption.title||"";p=this.shareOption.description||"";u=this.shareOption.thumb||"";b=a.image||this.shareOption.defaultImg||"";x=a.webpageLink||this.shareOption.defaultUrl||"";m=c?d.TEXT:a.type||(b?d.IMAGE:d.WEBPAGE);if(b){h().then((function(){f.share({appType:y.WECHAT,type:m,link:x,title:o,description:p,thumb:u,image:b,scene:r}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));g.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){g.isToastOpen=true;g.toastContent=t;g.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}))}else{f.share({appType:y.WECHAT,type:m,link:x,title:o,description:p,thumb:u,image:b,scene:r}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));g.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){g.isToastOpen=true;g.toastContent=t;g.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}}catch(e){}return[2]}}))}))};e.prototype._sinaShare=function(e,t){var i=this;try{f.isInstallWeibo().then((function(){var s=i.shareOption.weiboLink||i.shareOption.defaultUrl||"";var n=i.shareOption.weiboImg||i.shareOption.defaultImg||"";var r=i.shareOption.title||"";var a=i.shareOption.description||"";f.share({appType:y.SINA_WEIBO,type:d[!s&&n?"IMAGE":"WEBPAGE"],image:n,link:s,title:r,description:a,thumb:n}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));i.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){i.isToastOpen=true;i.toastContent=t;i.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))})).catch((function(e){i.isToastOpen=true;i.toastContent=e||"Weibo uninstalled"}))}catch(e){this.isToastOpen=true;this.toastContent="分享失败 "+(e||"")}};e.prototype._socialShare=function(e,t){var i=this;var s=this.shareOption.title||"";var n=this.shareOption.description||"";var r=this.shareOption.socialFile||this.shareOption.defaultImg||"";var a=this.shareOption.socialLink||this.shareOption.defaultUrl||"";f.share({appType:y.SOCIAL,type:d.WEBPAGE,description:n,title:s,image:r,link:a}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));i.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){i.isToastOpen=true;i.toastContent=t;i.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))};e.prototype._socialAgentShare=function(e,t){var i=this;try{var s=this.shareOption.title||"";var n=this.shareOption.packageName||"com.tencent.wework";var r=this.shareOption.uiPage||"com.tencent.wework.launch.AppSchemeLaunchActivity";var a=this.shareOption.wxText;var c=this.shareOption.socialAgentLink||this.shareOption.defaultUrl||"";var o=this.shareOption.socialAgentImg||this.shareOption.defaultImg||"";f.share({appType:y.SYSTEM,type:d[a?"TEXT":o?"IMAGE":"WEBPAGE"],title:s,link:c,text:a,image:o,packageName:n,uiPage:r}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));i.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){i.isToastOpen=true;i.toastContent=t;i.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){}};e.prototype._agentShare=function(e,t){var i=this;try{var s=this.shareOption.agentImg||this.shareOption.defaultImg||"";var n=this.shareOption.agentImgType||"jpg";var r=this.shareOption.agentFileName||"".concat((new Date).getTime(),".jpg");var a=this.shareOption.agentLink||this.shareOption.defaultUrl||"";var c=this.shareOption.title||"";var o=this.shareOption.description||"";var h=this.shareOption.thumb||"";f.share({appType:y.WECOM,type:d[s?"IMAGE":"WEBPAGE"],image:s,fileName:r,thumb:h,link:a,title:c,description:o,imageType:n}).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}));i.ctyShareSuccess.emit(Object.assign(Object.assign({},e),{index:t}))})).catch((function(t){i.isToastOpen=true;i.toastContent=t;i.ctyShareFail.emit(Object.assign(Object.assign({},e),{reason:t}))}))}catch(e){this.isToastOpen=true;this.toastContent="分享失败 "+(e||"")}};e.prototype._copyUrl=function(e,t){p(this.shareOption.copyText||"",this.legacyCopy).then((function(){e.callback&&e.callback(Object.assign(Object.assign({},e),{index:t}))}))};e.prototype._buttonClick=function(e,t){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(i){switch(i.label){case 0:if(!!this.isMicroMessager)return[3,7];if(!(e.role==="wechat"))return[3,3];if(!!this.isIos)return[3,2];return[4,this.checkPermission()];case 1:i.sent();i.label=2;case 2:this._wxShare(e,t);i.label=3;case 3:if(!(e.role==="wechat-moments"))return[3,6];if(!!this.isIos)return[3,5];return[4,this.checkPermission()];case 4:i.sent();i.label=5;case 5:this._wxShare(e,t,true);i.label=6;case 6:if(e.role==="wechat-agent"){this._agentShare(e,t)}if(e.role==="sina-weibo"){this._sinaShare(e,t)}if(e.role==="social"){this._socialShare(e,t)}if(e.role==="social-agent"){this._socialAgentShare(e,t)}if(e.role==="copy-url"){this._copyUrl(e,t)}i.label=7;case 7:e.handler&&e.handler(e);this.ctyTap.emit(Object.assign(Object.assign({},e),{index:t}));return[2]}}))}))};e.prototype._doGuid=function(e){e.stopPropagation();this.ctyGuide.emit()};e.prototype.render=function(){var e=this;return s(n,{key:"8757d4a8b07d87efd53f7b155faa0b39a727fed0",class:Object.assign(Object.assign({},_(this.cssClass)),{"overlay-hidden":true}),style:{zIndex:"".concat(2e4+this.overlayIndex)}},s("cty-backdrop",{key:"c8368ab2f9684ededf86d26cbae4643b716d5eb3",backdropDismiss:this.backdropDismiss,position:"bottom",onCtyDismiss:function(){return e.dismiss()}},this.guide&&this.isMicroMessager&&s("div",{key:"cfa74ed0b3f0dd63dc8da305b09dbf032bdc479a",class:"cty-share-guide",onClick:function(t){return e._doGuid(t)}},s("img",{key:"996b6724a08c47cd5a216b1c5af7e2d4a6deb358",src:this.guideImg})),s("slot",{key:"15511304eec04e38fc4fede8500cfe86ba491c4f",name:"share-sheet"}),!this.hiddenSheet&&s("div",{key:"56149976aa96c7108e88372f53e6deec3dab26d7",class:"cty-share-sheet safe-area-bottom-padding",onClick:function(e){return e.stopPropagation()}},s("slot",{key:"58c3ee47966bcc13fd5d853685fd14e9bb10dc0a",name:"header"}),(this.title||this.description)&&s("div",{key:"4edbfe76289997aadaf436bd6f5a212aa5074029",class:"cty-share-sheet__header",part:"header"},this.title&&s("cty-divider",{key:"95f441f50c315eebcd771442c5c3b1698b16acdb"},this.title),this.description&&s("p",{key:"c11cae0d8d2e64dcf5f6829b4c70a51f5ef52d97",class:"cty-share-sheet__description"},this.description)),s("slot",{key:"9736ea1a93c1fed84cabbb971645ec16751d0c42",name:"options"}),s("div",{key:"52dfb70f5eab7271b85dba92626f83bc01208810",class:"cty-share-sheet__options flex",part:"options"},this._options.map((function(t,i){return s("div",{part:"option",class:"cty-share-sheet__option flex-align-center",onClick:function(){return e._buttonClick(t,i)}},t.icon&&t.icon.indexOf("/")>=0&&!t.icon.endsWith(".svg")&&s("img",{class:"cty-share-sheet__img",src:t.icon}),t.icon&&(t.icon.indexOf("/")<0||t.icon.endsWith(".svg"))&&s("cty-icon",{name:t.icon,class:"cty-share-sheet__icon"}),t.title&&s("span",{class:"cty-share-sheet__option-title"},t.title),t.description&&s("span",{class:"cty-share-sheet__option-description"},t.description))}))),s("slot",{key:"8528c74d8ed0f75457447e23421a67fb21a506ea",name:"cancel"}),this.cancelText&&s("button",{key:"7b000a6f94fc494c3d7a411656d075bd7f0d9a0c",part:"cancel",class:"cty-button-native cty-share-sheet__cancel",onClick:function(){return e.dismiss()}},this.cancelText))),this.showPermissionPurpose&&s("cty-permission-purpose",{key:"e43ebf8435a8fdaf49c3426eb0030842e918c6c3",description:this.permissionDescription}),s("ion-toast",{key:"2e00a1c8756907613e61eb1221a4866680fa46fb","is-open":this.isToastOpen,message:this.toastContent,duration:2e3}))};Object.defineProperty(e.prototype,"el",{get:function(){return r(this)},enumerable:false,configurable:true});Object.defineProperty(e,"watchers",{get:function(){return{trigger:["triggerChanged"]}},enumerable:false,configurable:true});return e}());P.style=D}}}));
@@ -0,0 +1 @@
1
+ import{r as t,c as i,h as e,a as o,g as s}from"./p-DBsZD0Dk.js";import{g as a,b as r,a as h}from"./p-CHhKFKFA.js";import{s as n,r as c}from"./p-DHw6yjQm.js";import{s as d,v as l}from"./p-COhU5RVg.js";import{n as v}from"./p-BqPNWsXF.js";import{d as y}from"./p-CXtPwfcM.js";import{c as f}from"./p-iD8sj4Mi.js";import{v as p,a as g,b as u,c as b,d as m,e as _}from"./p-CvHW-guK.js";import{i as x}from"./p-BqPoMbNS.js";import"./p-cERsY8tm.js";const w=class{constructor(e){t(this,e),this.ctyDismiss=i(this,"ctyDismiss",7),this.ctyVideoCanplay=i(this,"ctyVideoCanplay",7),this.ctyVideoTimeupdate=i(this,"ctyVideoTimeupdate",7),this.ctyVideoPlaying=i(this,"ctyVideoPlaying",7),this.ctyVideoPlay=i(this,"ctyVideoPlay",7),this.ctyVideoPause=i(this,"ctyVideoPause",7),this.ctyVideoStalled=i(this,"ctyVideoStalled",7),this.ctyVideoWaiting=i(this,"ctyVideoWaiting",7),this.ctyVideoEnded=i(this,"ctyVideoEnded",7),this.ctyVideoError=i(this,"ctyVideoError",7),this.ctyVideoChangeVolume=i(this,"ctyVideoChangeVolume",7),this.ctyVideoProgress=i(this,"ctyVideoProgress",7),this.ctyVideoScreenChange=i(this,"ctyVideoScreenChange",7),this.ctyVideoIAEnter=i(this,"ctyVideoIAEnter",7),this.ctyVideoIAAction=i(this,"ctyVideoIAAction",7),this.ctyVideoCtrlChange=i(this,"ctyVideoCtrlChange",7),this.ctyVideoRateChange=i(this,"ctyVideoRateChange",7),this.url="",this.poster="",this.startTime=0,this.preload="metadata",this.allowForward=!0,this.allowBackward=!0,this.unAllowForwardMsg="首次学习不允许快进哦~",this.unAllowRateMsg="首次学习不允许设置播放倍速",this.trafficMsg="当前是非WIFI网络, 可能消耗流量, 点击继续~",this.errorMsg="视频播放异常或网络故障, 请稍后重试。",this.orientation=!0,this.autoplay=!0,this.trafficAutoplay=!1,this.fullscreenOnly=!0,this.defaultFullscreen=!0,this.fullscreenIcon="cty-fullscreen",this.exitFullscreenIcon="cty-exit-fullscreen",this.direction="L",this.controls=!0,this.headerCtrl=!0,this.footerCtrl=!0,this.title="",this.rates=[.7,1,1.25,1.5],this.rate=1,this.directRate=!1,this.loading=!1,this.loadingImg="",this.updateNow=!0,this.markers=[],this.landscapeEnterTimer=20,this.landscapeLeaveTimer=420,this.togglePlayTimer=150,this.progressPosition="center",this.player="video",this.largeScreenIsPortrait=!0,this.allowBackgroundForward=!1,this.interactiveActions=[],this.playProgress=0,this.maxPlayProgress=0,this.currentTimeLabel="00:00:00",this.durationLabel="00:00:00",this.isPlaying=!1,this.isMute=!1,this.showCtrl=!0,this.showPlayRate=!1,this.showVideoError=!0,this.warningMsg="",this.isLoading=!0,this.showTogglePlay=!1,this.playVolume=100,this.playBrightness=100,this.controlIcon="",this.controlLabel="",this.controlType="",this.lastControlType="",this.touchState={isTouching:!1,right:0,height:0,top:0,bottom:0,currentY:0},this.isMoving=!1,this.opnStartTime=0,this.opnMoveTime=0,this.opnLx=0,this.opnLy=0,this.opnNx=0,this.opnNy=0,this.isMouseMove=!1,this.isMicroMessager=y.isMicroMessager,this.isPC=y.isPC,this.isIOS=y.isIos,this.isIpad=y.isIpad,this.isWifi=v.isWifi,this.isHybrid=y.isHybrid,this.lastTapScreenTime=Date.now(),this.footerPrgtime=0,this._curIsFullscreen=!0,this.showInteractiveLayer=!1,this.hasInteractive=!1,this.interactiving_action=null,this.ctrlTimer=0,this.warningMsgTimer=0,this.touchMoveTimer=0,this._rates=[],this.markerList=[],this.currentMarker={describe:"",breakpoint:0,position:0},this.showDotPanel=!1,this.dotDotPanelTop="auto",this.dotDotPanelLeft="auto",this.triangleMargin=0,this.reallyShowDot=!1,this.isRealWaiting=!0,this.isSeeking=!1,this.deviceIsPORTRAIT=!1,this.canScreenOrientation=!1,this.visibilityChangeHandler=()=>{},this.iosAppPauseHandler=()=>{},this.iosAResumeHandler=()=>{},this._doCanplay=()=>{setTimeout((()=>{this.showTogglePlay=!0}),this.togglePlayTimer),this.isLoading&&(this.videoEl.style.display="block"),this.isWifi&&!this.isMicroMessager&&this.autoplay&&this.loading||!this.isLoading||(this.isLoading=!1),this.durationLabel=n(this.videoEl.duration),this.ctyVideoCanplay.emit(),this.markerList=this.markers.map((t=>Object.assign(Object.assign({},t),{position:+(t.breakpoint/this.videoEl.duration*100).toFixed(3)})))},this._doTimeupdate=()=>{const t=this.videoEl.currentTime;!this.isPlaying&&t>0&&(this.isLoading&&(this.isLoading=!1),this.videoEl.paused||(this.isPlaying=!0)),this.touchState.isTouching||(this._updateVideoProgress(),this.interactiveCheck(t)),this.ctyVideoTimeupdate.emit(t)},this._doPlay=()=>{this.ctyVideoPlay.emit()},this._doPause=()=>{this.isPlaying=!1,this.ctyVideoPause.emit()},this._doEnded=()=>{this.isPlaying=!1,this._updateVideoProgress(),this.interactiveReset(),this.ctyVideoEnded.emit()},this._doPlaying=()=>{x("android")||(this.isLoading&&(this.isLoading=!1),this.isPlaying=!0),this.ctyVideoPlaying.emit()},this._doChangeVolume=()=>{this.playVolume=Math.round(100*this.videoEl.volume),this.ctyVideoChangeVolume.emit()},this._doError=()=>{if(!this.isLoading&&this.showVideoError)return this.warningMsg=this.errorMsg,this.clearWarningMsg(),void this.ctyVideoError.emit(!0);this.isLoading&&(this.isLoading=!1,this.showTogglePlay=!0),this.ctyVideoError.emit(!1)},this._doStalled=()=>{this.ctyVideoStalled.emit()},this._doWaiting=()=>{this.isRealWaiting&&!this.isSeeking&&this.ctyVideoWaiting.emit(this.videoEl.currentTime)},this._doSeeked=()=>{(this.isSeeking=!1)&&(this.isRealWaiting=!0)},this._dismiss=()=>!this.fullscreenOnly&&this.curIsFullscreen?(this.curIsFullscreen=!1,this.isHybrid&&c.toggleStatusBar(!0),this.canScreenOrientation&&d.lock("portrait").catch((()=>{})),void this.ctyDismiss.emit(!1)):this.videoEl.paused?(this.isHybrid&&c.toggleStatusBar(!0),this.canScreenOrientation&&(this.landscapeLeaveTimer>0?setTimeout((()=>{d.lock("portrait").catch((()=>{}))}),this.landscapeLeaveTimer):d.lock("portrait").catch((()=>{}))),void this.ctyDismiss.emit(!0)):(this.pause(),void this.ctyDismiss.emit(!1)),this._doSetRate=()=>{if(!this.allowForward)return this.warningMsg=this.unAllowRateMsg,void this.clearWarningMsg();if("L"!=this.direction||this.directRate){let t=this.rates.findIndex((t=>t==this.rate))+1;return t==this.rates.length&&(t=0),void this.setPlayRate(this.rates[t])}this.showCtrl=!1,this.showPlayRate=!0,this._resetDot(),this.ctyVideoCtrlChange.emit(this.showCtrl)},this._toggleFullScreen=t=>{this.curIsFullscreen=t,this.isHybrid&&c.toggleStatusBar(!t),this.canScreenOrientation&&d.lock(t?"landscape":"portrait").catch((()=>{})),this.ctyVideoScreenChange.emit(t)},this._doPrgTouchstart=t=>{var i;if("mousedown"==t.type&&(this.isMouseMove=!0),this.isRealWaiting=!1,!this.allowForward&&!this.allowBackward||(null===(i=t.touches)||void 0===i?void 0:i.length)>1)return!0;this.isSeeking=!0;const e=a(t.currentTarget);return this.touchState.top=e.top,this.touchState.height=e.bottom-this.touchState.top,this.touchState.right=e.right,this.touchState.bottom=e.bottom,this.touchState.isTouching=!0,this.deviceIsPORTRAIT&&(this.touchState.top=e.left,this.touchState.height=e.right-this.touchState.top,this.touchState.right=e.bottom,this.touchState.bottom=e.right),this.touchState.currentY=this._getPoint(t).x,this.maxPlayProgress=Math.max(this.playProgress,this.maxPlayProgress),this._changeProgressByTouch(),this.clearCtrlTimeout(),!0},this._doPrgTouchmove=t=>{var i;if(!this.isMouseMove&&"mousemove"==t.type)return;if((null===(i=t.touches)||void 0===i?void 0:i.length)>1)return!0;const e=Date.now();if(this.footerPrgtime+50>e)return!0;this.footerPrgtime=e;const o=this._getPoint(t).x,s=100*Math.abs(o-this.touchState.currentY)/this.touchState.height;return this.touchState.currentY=o,(s>1||"mousemove"==t.type)&&this._changeProgressByTouch(this.updateNow),!0},this._doPrgTouchend=t=>{if("mouseleave"!=t.type||this.isMouseMove)return"mouseup"!=t.type&&"mouseleave"!=t.type||(this.isMouseMove=!1),this.touchState.isTouching&&this._changeProgressByTouch(),this.touchState.isTouching=!1,this.isSeeking=!1,!0},this._doOpnStart=t=>{"mousedown"==t.type&&(this.isMouseMove=!0),this.isSeeking=!0,this.isRealWaiting=!1;const i=a(t.currentTarget);this.touchState.top=i.top,this.touchState.height=i.bottom-this.touchState.top,this.touchState.right=i.right,this.touchState.bottom=i.bottom,this.touchState.isTouching=!0,this.deviceIsPORTRAIT&&(this.touchState.top=i.left,this.touchState.height=i.right-this.touchState.top,this.touchState.right=i.bottom,this.touchState.bottom=i.right);const{x:e,y:o}=this._getPoint(t);return this.opnLx=e,this.opnLy=o,this.maxPlayProgress=Math.max(this.playProgress,this.maxPlayProgress),this.opnStartTime=(new Date).getTime(),!0},this._doOpnMove=t=>{if((this.isMouseMove||"mousemove"!=t.type)&&(0===this.opnMoveTime&&(this.opnMoveTime=(new Date).getTime()),this.opnMoveTime-this.opnStartTime<1500)){this.showCtrl=!0,this.clearCtrlTimeout(),this.isMoving=!0;const{x:i,y:e}=this._getPoint(t);switch(this.opnNx=i,this.opnNy=e,this.controlType||(Math.abs(this.opnNx-this.opnLx)>=Math.abs(this.opnNy-this.opnLy)?(this.controlType="P",this.controlLabel=this.currentTimeLabel):this.isIOS?(this.controlType="B",this.controlIcon="cty-brightness",this.controlLabel=this.playBrightness+"%"):this.opnLx>.5*this.touchState.height?(this.controlType="V",this.controlIcon="cty-volume-high",this.controlLabel=this.playVolume+"%"):(this.controlType="B",this.controlIcon="cty-brightness",this.controlLabel=this.playBrightness+"%")),"P"==this.controlType&&(this.controlIcon=this.opnNx-this.opnLx>0?"cty-forward":"cty-backward"),this.controlType){case"B":this.opnNy-this.opnLy<0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy>0&&this.deviceIsPORTRAIT?(this.playBrightness-=2,this.playBrightness=Math.max(this.playBrightness,0),this.updateNow&&this._updateBrightness()):(this.opnNy-this.opnLy>0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy<0&&this.deviceIsPORTRAIT)&&(this.playBrightness+=2,this.playBrightness=Math.min(this.playBrightness,100),this.updateNow&&this._updateBrightness()),this.controlLabel=this.playBrightness+"%";break;case"V":this.opnNy-this.opnLy<0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy>0&&this.deviceIsPORTRAIT?(this.playVolume-=2,this.playVolume=Math.max(this.playVolume,0),this.updateNow&&this._updateVolume()):(this.opnNy-this.opnLy>0&&!this.deviceIsPORTRAIT||this.opnNy-this.opnLy<0&&this.deviceIsPORTRAIT)&&(this.playVolume+=2,this.playVolume=Math.min(this.playVolume,100),this.updateNow&&this._updateVolume()),this.controlLabel=this.playVolume+"%";break;case"P":if(this.opnNx-this.opnLx>0){if(!this.allowForward&&this.playProgress>=this.maxPlayProgress)return this.isMoving=!1,void this.unAllowForward();this.playProgress+=1,this.playProgress=Math.min(this.playProgress,1e3),this.updateNow&&(this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()),this.controlLabel=n(this.playProgress/1e3*this.videoEl.duration)}else this.opnNx-this.opnLx<0?(this.playProgress-=1,this.playProgress=Math.max(0,this.playProgress),this.updateNow&&(this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()),this.controlLabel=n(this.playProgress/1e3*this.videoEl.duration)):this.interactiveReset()}this.lastControlType=this.controlType,this.opnLx=this.opnNx,this.opnLy=this.opnNy}},this._doOpnEnd=t=>{if("mouseleave"!=t.type||this.isMouseMove){if("mouseup"!=t.type&&"mouseleave"!=t.type||(this.isMouseMove=!1),!this.isMoving){this.showCtrl=!this.showCtrl,this.ctyVideoCtrlChange.emit(this.showCtrl),this._resetDot();const t=Date.now();t-this.lastTapScreenTime<400?(this.lastTapScreenTime=this.lastTapScreenTime-1e3,this.toggleVideo(null)):this.lastTapScreenTime=t}if(!this.updateNow)switch(this.controlType){case"B":this._updateBrightness();break;case"V":this._updateVolume();break;case"P":this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()}this.controlType="",this.clearCtrlTimeout(),this.touchState.isTouching=!1,this.opnMoveTime=0,this._clearTouchMoveToast(),this.isSeeking=!1}},this._doDot=(t,i)=>{if(t.stopPropagation(),this.clearCtrlTimeout(),this.currentMarker.breakpoint>0&&i.breakpoint==this.currentMarker.breakpoint)return void this.setVideoCurrentTime(this.currentMarker.breakpoint,(()=>{this._resetDot(),this.play()}));this.showDotPanel=!0,this.currentMarker=i;const e=a(t.target),o=e.top+e.height/2,s=e.left+e.width/2;this.reallyShowDot=!1,window.setTimeout((()=>{const t=this.dotPanelEl,i=t.parentNode.offsetHeight,e=t.parentNode.offsetWidth,a=t.offsetWidth,r=t.children[t.children.length-1],h=o-r.offsetLeft-r.offsetWidth/2+this.triangleMargin,n=s-r.offsetLeft-r.offsetWidth/2+this.triangleMargin;this.dotDotPanelTop=h+"px",this.dotDotPanelLeft=n+"px";const c=i-a-20,d=e-a-20;this.canScreenOrientation?(n>d?(this.triangleMargin=n-d,this.dotDotPanelLeft=d+"px"):n<5?(this.triangleMargin=n-5,this.dotDotPanelLeft="5px"):this.triangleMargin=0,this.dotDotPanelTop="auto"):(h>c?(this.triangleMargin=h-c,this.dotDotPanelTop=c+"px"):h<5?(this.triangleMargin=h-5,this.dotDotPanelTop="5px"):this.triangleMargin=0,this.dotDotPanelLeft="auto"),window.setTimeout((()=>{this.reallyShowDot=!0}),10)}),100)},this._toPoint=()=>{this.clearCtrlTimeout(),this.setVideoCurrentTime(this.currentMarker.breakpoint,(()=>{this._resetDot(),this.play()}))}}get curIsFullscreen(){return this._curIsFullscreen}set curIsFullscreen(t){this._curIsFullscreen=t,this.deviceIsPORTRAIT="P"==this.direction||!t||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation&&t}async componentWillLoad(){if(!this.isIOS&&!this.isMicroMessager&&l.isAvailable)try{this.playVolume=await l.getVolume(),this.isMute=await l.isMuted()}catch(t){}this.defaultFullscreen||this.fullscreenOnly||(this.curIsFullscreen=!1);let t=this.rates.map((t=>t));this._rates=t,this.hasInteractive=Array.isArray(this.interactiveActions)&&this.interactiveActions.length>0,this.interactiveReset(),this.showTogglePlay=!this.autoplay}componentDidLoad(){if(this.canScreenOrientation=this.orientation&&"L"==this.direction&&this.isHybrid&&x("mobile")&&!this.isIpad,this.deviceIsPORTRAIT="P"==this.direction||!this.curIsFullscreen||this.largeScreenIsPortrait&&(this.isPC||this.isIpad)||this.canScreenOrientation,this.canScreenOrientation&&this.curIsFullscreen?this.landscapeEnterTimer>0?setTimeout((()=>{d.lock("landscape").catch((()=>{}))}),this.landscapeEnterTimer):d.lock("landscape").catch((()=>{})):this.isHybrid&&x("mobile")&&d.lock("portrait").catch((()=>{})),+this.startTime>0&&(this.videoEl.currentTime=Number(this.startTime)),this.videoEl.controls=!1,this.videoEl.playbackRate=this.rate,this.isMicroMessager?window.setTimeout((()=>{this.isLoading=!1,this.showTogglePlay=!0,this.videoEl.style.display="block"}),2500):this.isWifi?+this.startTime>0&&(this.videoEl.style.display="block"):window.setTimeout((()=>{this.isLoading=!1,this.showTogglePlay=!0,this.videoEl.style.display="block"}),1500),!this.allowBackgroundForward&&this.isIOS){let t=1,i="",e=0;this.isMicroMessager?(this.visibilityChangeHandler=()=>{!this.allowForward&&this.videoEl&&(t%2==1?(this.showVideoError=!1,i=this.videoEl.src,e=this.videoEl.currentTime,this.videoEl.src="data:video/mp4;base64,YQ=="):(this.videoEl.src=i,window.setTimeout((()=>{this.videoEl.currentTime=e,this.showVideoError=!0}),1500)),t++)},document.addEventListener("visibilitychange",this.visibilityChangeHandler)):(this.iosAppPauseHandler=()=>{this.videoEl&&!this.allowForward&&(this.showVideoError=!1,i=this.videoEl.src,e=this.videoEl.currentTime,this.videoEl.src="data:video/mp4;base64,YQ==")},this.iosAResumeHandler=()=>{this.videoEl&&!this.allowForward&&(this.videoEl.src=i,window.setTimeout((()=>{this.showVideoError=!1,this.videoEl.currentTime=e}),1500))},document.addEventListener("pause",this.iosAppPauseHandler),document.addEventListener("resume",this.iosAResumeHandler))}}disconnectedCallback(){clearTimeout(this.ctrlTimer),clearTimeout(this.warningMsgTimer),clearTimeout(this.touchMoveTimer),!this.allowBackgroundForward&&this.isIOS&&(this.isMicroMessager?document.removeEventListener("visibilitychange",this.visibilityChangeHandler):(document.removeEventListener("pause",this.iosAppPauseHandler),document.removeEventListener("resume",this.iosAResumeHandler))),this.videoEl&&(this.videoEl.src="")}_getVolumeIconName(){return this.isMute?p:0==this.playVolume?g:this.playVolume<30?u:this.playVolume<70?b:m}unAllowForward(){this.warningMsg=this.unAllowForwardMsg,this.clearWarningMsg()}async play(){this.videoEl.paused&&this.videoEl.play(),this.isPlaying=!0}async setCtrlShow(t=!1){this.showCtrl=t,this._resetDot(),this.ctyVideoCtrlChange.emit(t)}async pause(){this.videoEl.paused||this.videoEl.pause(),this.isPlaying=!1}async setVideoCurrentTime(t,i){this.maxPlayProgress=Math.max(this.maxPlayProgress,this.playProgress),t>this.videoEl.duration*this.maxPlayProgress/1e3&&!this.allowForward?this.unAllowForward():(this.videoEl.currentTime=t,i&&i())}_clearTouchMoveToast(){clearTimeout(this.touchMoveTimer),this.touchMoveTimer=window.setTimeout((()=>{this.isMoving=!1}),2e3)}async clearCtrlTimeout(){this.showCtrl&&(clearTimeout(this.ctrlTimer),this.ctrlTimer=window.setTimeout((()=>{this.showCtrl=!1,this.touchState.isTouching=!1,this._resetDot(),this.ctyVideoCtrlChange.emit(!1)}),4e3))}async setWarningMsg(t){this.warningMsg=t,this.clearWarningMsg()}clearWarningMsg(){""!=this.warningMsg&&(clearTimeout(this.warningMsgTimer),this.warningMsgTimer=window.setTimeout((()=>{this.warningMsg=""}),2e3))}async toggleVideo(t){this.isLoading||(this.videoEl.paused?this.play():this.pause(),t&&(this.clearCtrlTimeout(),t.stopPropagation()))}async toggleVolume(){if(this.isIOS||this.isMicroMessager||!l.isAvailable)this.videoEl.muted=!this.videoEl.muted,this.isMute=this.videoEl.muted;else try{await l.toggleMute(),this.isMute=await l.isMuted()}catch(t){l.setVolume(this.isMute?this.playVolume:0),this.isMute=!this.isMute}this.clearCtrlTimeout()}async setPlayRate(t){this.rate=t,this.videoEl.playbackRate=this.rate,this.showPlayRate=!1,this.ctyVideoRateChange.emit(t)}_getPoint(t){const{x:i,y:e}=r(t);try{return this.deviceIsPORTRAIT?{x:i,y:e}:{x:e,y:i}}catch(t){return{x:0,y:0}}}_changeProgressByTouch(t=!0){if(!this.allowForward&&!this.allowBackward)return;const i=Math.round((this.touchState.currentY-this.touchState.top)/this.touchState.height*1e3);!this.allowBackward&&i<this.playProgress||(!this.allowForward&&i>this.maxPlayProgress?this.unAllowForward():(this.lastControlType="P",this.isMoving=!0,this.playProgress>i?this.controlIcon="cty-backward":this.playProgress<i&&(this.controlIcon="cty-forward"),this.playProgress=i,0==i&&(this.interactiveReset(),this.isMoving=!1),t?(this.videoEl.currentTime=this.playProgress/1e3*this.videoEl.duration,this._updateVideoProgress()):this.controlLabel=n(this.playProgress/1e3*this.videoEl.duration),this._clearTouchMoveToast()))}_updateVideoProgress(){const t=this.videoEl.currentTime,i=this.videoEl.duration;this.playProgress=i>0?Math.round(t/i*1e3):0,this.ctyVideoProgress.emit(this.playProgress/10),this.currentTimeLabel=n(t),this.durationLabel=n(i),"P"==this.lastControlType&&(this.controlLabel=this.currentTimeLabel)}_updateBrightness(){this.videoCtrlEl.style.backgroundColor="rgba(0,0,0, "+(100-this.playBrightness)/1.6/100+")"}async _updateVolume(){if(this.isIOS||this.isMicroMessager||!l.isAvailable)this.videoEl.volume=this.playVolume/100;else try{await l.setVolume(this.playVolume),this.isMute=await l.isMuted()}catch(t){}this.videoEl.volume=this.playVolume/100,this.playVolume>0&&this.isMute&&this.toggleVolume()}_resetDot(){this.showDotPanel=!1,this.currentMarker={describe:"",breakpoint:0,position:0}}getVideoElement(){return Promise.resolve().then((()=>this.videoEl))}getVideoState(){return Promise.resolve().then((()=>{const{maxPlayProgress:t,isWifi:i,isLoading:e,playProgress:o,isPlaying:s}=this;return{maxPlayProgress:t,isWifi:i,isLoading:e,playProgress:o,isPlaying:s}}))}interactiveCheck(t){var i;if(this.hasInteractive&&!this.showInteractiveLayer)for(const e of this.interactiveActions)if(this.checkActionTriggerCond(e,t,"play")){this.showInteractiveLayer=!0,this.interactiving_action=e,e.status.entercount++;for(const t of e.buttons)"optbtn"==t.type&&(t.val=t.defaultval);let t=!1;if((null===(i=e.autoactions)||void 0===i?void 0:i.length)>0)for(const i of e.autoactions)if(this.calcTriggerCond(this.interactiving_action,i.condtrigger)){this.pause(),this.doInteractiveAction(i),t=!0;break}!t&&e.buttons.length>0&&(this.pause(),this.showInteractiveActionUI(e));break}}changeInteractiveAction(t){if(this.hasInteractive||this.showInteractiveLayer){this.clearInteractiveActionUI(),this.interactiving_action=t,t.status.entercount++;for(let i of t.buttons)"optbtn"==i.type&&(i.val=i.defaultval);this.showInteractiveActionUI(t)}}checkActionTriggerCond(t,i,e){let o=t.playtrigger;return!("play"==e&&(i<o.min||i>=o.max)||!this.calcTriggerCond(t,t.condtrigger))}calcTriggerCond(t,i){let e=!0;for(let o of i){let i=!0,s=null;switch(o.type){case"entercount":if(s=this.findInteractiveAction(o.actionid,t),null!=s){let t=s.status.entercount;i=t>=o.min&&(t<o.max||""==o.max)}break;case"optbtn":if(s=this.findInteractiveAction(o.actionid,t),null!=s)for(let t of s.buttons)if("optbtn"==t.type&&t.id==o.btnid){i=t.val==o.val;break}break;case"group":i=this.calcTriggerCond(t,o.subs)}e="or"==o.op?e||i:e&&i}return e}findInteractiveAction(t,i){if(""==t.trim())return i;for(let i of this.interactiveActions)if(i.id==t)return i;return null}interactiveAction(t){if(t.stopPropagation(),null==this.interactiving_action)return;let i=this.interactiving_action.imgW,e=this.interactiving_action.imgH;for(let o of this.interactiving_action.buttons)if(this.interactiveClickHitCheck(t,{x:o.x,y:o.y,width:o.w,height:o.h},i,e)){switch(o.type){case"optbtn":o.val=1==o.val?"0":"1",this.refreshInteractiveActionBtnStatus(this.interactiving_action);break;case"link":case"input":this.doInteractiveAction(o);break;default:for(let t of o.actions)if(this.calcTriggerCond(this.interactiving_action,t.condtrigger)){this.doInteractiveAction(t);break}}break}}doInteractiveAction(t){if("action"==t.type)this.changeInteractiveAction(this.findInteractiveAction(t.actionid,this.interactiving_action));else if("play"==t.type)this.videoEl.currentTime=t.startTime,this.play(),this.clearInteractiveActionUI(),window.setTimeout((()=>{this.interactiving_action=null,this.hideInteractiveActionUI()}),100);else if("link"==t.type){if(!t.link)return this.play(),this.clearInteractiveActionUI(),void window.setTimeout((()=>{this.interactiving_action=null,this.hideInteractiveActionUI()}),100);this.ctyVideoIAAction.emit(t)}}interactiveClickHitCheck(t,i,e,o){let s=o,a=e,r=this.interactiveEl,n=i.y*s/o,c=i.x*a/e,d=i.width*a/e,l=i.height*s/o;const{x:v,y}=h(t);let f=(v-r.offsetLeft)*a/r.clientWidth,p=(y-r.offsetTop)*s/r.clientHeight;return f>=c&&f<=c+d&&p>=n&&p<=n+l}showInteractiveActionUI(t){this.interactiveEl.style.display="block",""!=t.img&&(this.interactiveEl.style.backgroundImage="url("+t.img+")"),this.refreshInteractiveActionBtnStatus(t),this.ctyVideoIAEnter.emit()}hideInteractiveActionUI(){this.showInteractiveLayer=!1,this.clearInteractiveActionUI(),this.interactiveEl.style.display="none"}refreshInteractiveActionBtnStatus(t){let i=this.interactiveEl,e="";for(let i of t.buttons)"optbtn"==i.type&&(e+=i.htmls[i.val]||"");i.innerHTML=e}clearInteractiveActionUI(){this.interactiveEl.innerHTML=""}interactiveReset(){if(this.hasInteractive){this.showInteractiveLayer=!1;for(let t of this.interactiveActions){t.status.entercount=0;for(let i of t.buttons)"optbtn"==i.type&&(i.val=i.defaultval)}}}renderPlayer(){const t=this.poster||`${f.get("resUrlPrefix","")}assets/cty_res/img/poster.jpg`;return e("div",{class:"cty-video__wrapper","data-tap-disable":"true"},"video"===this.player&&e("video",{ref:t=>this.videoEl=t,class:"cty-video__player",poster:t,preload:this.preload,"x5-video-player-type":"h5","x5-video-player-fullscreen":"true",playsinline:!0,"webkit-playsinline":!0,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onPlay:this._doPlay,onPause:this._doPause,onEnded:this._doEnded,onPlaying:this._doPlaying,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled,onWaiting:this._doWaiting,onSeeked:this._doSeeked,src:this.url,typeof:"video/mp4"}),"audio"===this.player&&e("div",{class:"cty-video__player cty-video__audio-player"},e("audio",{ref:t=>this.videoEl=t,class:"cty-video__player-audio",preload:this.preload,autoplay:(this.isWifi||this.isMicroMessager||this.trafficAutoplay)&&this.autoplay,onCanPlay:this._doCanplay,onTimeUpdate:this._doTimeupdate,onEnded:this._doEnded,onPlaying:this._doPlaying,onPlay:this._doPlay,onPause:this._doPause,onVolumeChange:this._doChangeVolume,onError:this._doError,onStalled:this._doStalled},e("source",{src:this.url,type:"audio/mp3"}),e("source",{src:this.url,type:"audio/ogg"})),e("slot",{name:"audio-content"})))}renderControls(){return e("div",{class:"cty-video__controls",ref:t=>this.videoCtrlEl=t},e("slot",{name:"header"}),this.showCtrl&&this.headerCtrl&&e("ion-grid",{class:"cty-video__header"},e("ion-row",null,e("ion-col",{class:"flex-align-center cty-video__header-back"},e("ion-button",{onClick:this._dismiss},e("cty-icon",{name:_}))),e("ion-col",{size:"6",class:"cty-video__title flex-align-center cty-ellipsis"},this.title),e("ion-col",null,e("slot",{name:"headerCol"})))),e("slot",{name:"footer"}),this.showCtrl&&this.footerCtrl&&e("ion-grid",{class:{"cty-video__footer":!0,"safe-area-bottom-border-color":"P"==this.direction&&this.curIsFullscreen}},"top"==this.progressPosition&&e("ion-row",{class:"cty-video__footer-progress__top"},e("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:!0,ticks:!1})),e("ion-row",null,e("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":!0,"cty-video__footer-flex":"top"==this.progressPosition}},e("ion-button",{onClick:t=>{this.toggleVideo(t)}},e("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),"top"==this.progressPosition&&e("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,e("span",null,"/"),this.durationLabel)),"center"==this.progressPosition&&e("ion-col",{class:"cty-video__footer-progress flex-center"},e("ion-range",{mode:"ios",class:"cty-video__footer-range",debounce:300,max:1e3,value:this.playProgress,disabled:!0,ticks:!1},e("span",{class:"cty-video__time",slot:"start"},this.currentTimeLabel),e("span",{class:"cty-video__time",slot:"end"},this.durationLabel))),this.curIsFullscreen&&e("ion-col",{class:"cty-video__footer-rate flex-align-center"},e("ion-button",{onClick:this._doSetRate},1==this.rate?"倍速":this.rate+"X")),e("ion-col",{class:"cty-video__footer-volume flex-align-center"},e("ion-button",{onClick:()=>this.toggleVolume()},e("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!0)},e("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!1)},e("cty-icon",{name:this.exitFullscreenIcon}))),e("slot",{name:"footerCol"}))),(this.allowForward||this.allowBackward)&&this.showCtrl&&this.footerCtrl&&e("ion-grid",{class:{"cty-video__footer cty-video__footer-controls":!0,"safe-area-bottom-border-color":"P"==this.direction&&this.curIsFullscreen}},"top"==this.progressPosition&&e("ion-row",{class:"cty-video__footer-progress__top",onClick:t=>t.stopPropagation()},!this.isPC&&e("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}})))),this.isPC&&e("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}}))))),e("ion-row",null,e("ion-col",{class:{"flex-align-center cty-video__footer-toggle-play":!0,"cty-video__footer-flex":"top"==this.progressPosition}},e("ion-button",{onClick:t=>{this.toggleVideo(t)}},e("cty-icon",{name:this.isPlaying?"cty-pause":"cty-play"})),"top"==this.progressPosition&&e("div",{class:"flex-align-center cty-video__footer-time-label"},this.currentTimeLabel,e("span",null,"/"),this.durationLabel)),"center"==this.progressPosition&&e("ion-col",{class:"cty-video__footer-progress flex-center"},e("span",{class:"cty-video__time"},this.currentTimeLabel),!this.isPC&&e("div",{class:"cty-video__footer-bar",onTouchStart:this._doPrgTouchstart,onTouchMove:this._doPrgTouchmove,onTouchEnd:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}})))),this.isPC&&e("div",{class:"cty-video__footer-bar",onMouseDown:this._doPrgTouchstart,onMouseMove:this._doPrgTouchmove,onMouseUp:this._doPrgTouchend,onMouseLeave:this._doPrgTouchend},"L"==this.direction&&this.curIsFullscreen&&this.markerList.map((t=>e("span",{onTouchStart:i=>this._doDot(i,t),class:"cty-video__footer-dot",style:{left:t.position+"%"}})))),e("span",{class:"cty-video__time"},this.durationLabel)),this.curIsFullscreen&&e("ion-col",{class:"cty-video__footer-rate flex-align-center"},e("ion-button",{onClick:this._doSetRate},1==this.rate?"倍速":this.rate+"X")),e("ion-col",{class:"cty-video__footer-volume flex-align-center"},e("ion-button",{onClick:()=>this.toggleVolume()},e("cty-icon",{name:this._getVolumeIconName()}))),!this.fullscreenOnly&&!this.curIsFullscreen&&this.fullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!0)},e("cty-icon",{name:this.fullscreenIcon}))),!this.fullscreenOnly&&this.curIsFullscreen&&this.exitFullscreenIcon&&e("ion-col",{class:"cty-video__footer-fullscreen flex-align-center"},e("ion-button",{onClick:()=>this._toggleFullScreen(!1)},e("cty-icon",{name:this.exitFullscreenIcon}))),e("slot",{name:"footerCol"}))),this.isMoving&&e("div",{class:"cty-video__opn-toast flex-center"},e("cty-icon",{name:this.controlIcon}),e("span",null,this.controlLabel)),e("slot",{name:"controls"}),!this.isPC&&this.controls&&e("div",{class:"cty-video__opn-panel",onTouchStart:this._doOpnStart,onTouchMove:this._doOpnMove,onTouchEnd:this._doOpnEnd,onClick:t=>t.stopPropagation()}),this.isPC&&this.controls&&e("div",{class:"cty-video__opn-panel",onMouseDown:this._doOpnStart,onMouseMove:this._doOpnMove,onMouseUp:this._doOpnEnd,onMouseLeave:this._doOpnEnd,onClick:t=>t.stopPropagation()}),this.showCtrl&&this.showDotPanel&&e("div",{ref:t=>{this.dotPanelEl=t},class:{"cty-video__dot-panel flex-center":!0,"cty-video__dot-panel-ex":"top"==this.progressPosition},onClick:t=>t.stopPropagation(),style:{top:this.dotDotPanelTop,left:this.dotDotPanelLeft,opacity:this.reallyShowDot?"1":"0"}},e("span",{class:"cty-video__dot-label cty-ellipsis2"},this.currentMarker.describe),e("ion-button",{onClick:this._toPoint},e("cty-icon",{name:"cty-play-ex"}),"知识点"),e("span",{class:"cty-video__dot-triangle",style:{"margin-left":this.triangleMargin+"px"}})),e("slot",{name:"ctrl"}))}render(){return e(o,{key:"bcce9c119dd9742d0c69dd9b5ed45b2ee39e4f91",class:{"cty-video":!0,"cty-video__vertical":this.deviceIsPORTRAIT,"cty-video__unfullscreen":!this.curIsFullscreen,"cty-video__large-screen":"P"==this.direction&&this.curIsFullscreen&&(this.isPC||this.isIpad)}},this.renderPlayer(),this.renderControls(),(!this.isLoading||this.isMicroMessager)&&!this.isPlaying&&!this.showInteractiveLayer&&this.showTogglePlay&&e("ion-button",{key:"f55a081110cdc0db15c903ec34b2258e953fafc7",part:"toggle-play",class:"cty-video__toggle-play flex-center",onClick:t=>{this.toggleVideo(t)}},e("cty-icon",{key:"f1ea8cecf7415ea732e59d475256f8033a242d74",name:"cty-play"})),!this.isWifi&&!this.isPlaying&&!this.isLoading&&!this.isMicroMessager&&this.trafficMsg&&e("div",{key:"9167c66f7410c98493227e4dca379bf65740242b",class:"cty-video__toast cty-ellipsis",part:"toast"},this.trafficMsg),""!=this.warningMsg&&e("div",{key:"536ff573d8c9670a531e5af490cbd8bb1ab74be1",class:"cty-video__toast cty-ellipsis",part:"toast"},this.warningMsg),this.showPlayRate&&e("div",{key:"cdf67ac451fd70983f4fee4741d5fe9330161407",class:"cty-video__rate",onClick:()=>this.showPlayRate=!1},e("div",{key:"cbef52f68b8d3028908da0b69c6c8983564821be",class:"cty-video__rate-mask flex-center-justify-end"},e("div",{key:"8ddaff687d8231d9c8448ef4d5758a64e2751f7d",class:"cty-video__rate-list"},this._rates.map((t=>e("button",{onClick:()=>this.setPlayRate(t),class:{active:this.rate==t,"cty-video__rate-list-item":!0}},e("span",null,t,"X"))))))),this.hasInteractive&&this.curIsFullscreen&&e("div",{key:"b82904799d30e33e762b352739d67d9a38cdbff0",class:"cty-video__player cty-video__interactive",onClick:()=>{},ref:t=>this.interactiveEl=t}))}static get assetsDirs(){return["assets"]}get el(){return s(this)}};w.style='*{-webkit-box-sizing:border-box;box-sizing:border-box}p,h1,h2,h3,h4,h5,h6{margin:0;padding:0}.flex{display:-ms-flexbox;display:flex}.flex-wrap{display:-ms-flexbox;display:flex;-ms-flex-flow:wrap;flex-flow:wrap}.flex-align-start{display:-ms-flexbox;display:flex;-ms-flex-align:start;align-items:flex-start}.flex-align-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.flex-align-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end}.flex-justify-start{display:-ms-flexbox;display:flex;-ms-flex-pack:start;justify-content:flex-start}.flex-justify-center{display:-ms-flexbox;display:flex;-ms-flex-pack:center;justify-content:center}.flex-justify-end{display:-ms-flexbox;display:flex;-ms-flex-pack:end;justify-content:flex-end}.flex-align-end-start{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:start;justify-content:flex-start}.flex-align-end-center{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:center;justify-content:center}.flex-align-end-end{display:-ms-flexbox;display:flex;-ms-flex-align:end;align-items:flex-end;-ms-flex-pack:end;justify-content:flex-end}.flex-center{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-center-justify-end{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:end;justify-content:flex-end}.flex-between{display:-ms-flexbox;display:flex;-ms-flex-pack:justify;justify-content:space-between}.flex-center-between{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.flex-column{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column}.flex-column-align-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center}.flex-column-justify-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:center;justify-content:center}.flex-column-center{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:center;justify-content:center}.flex-column-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-pack:justify;justify-content:space-between}.flex-column-center-between{display:-ms-flexbox;display:flex;-ms-flex-flow:column;flex-flow:column;-ms-flex-align:center;align-items:center;-ms-flex-pack:justify;justify-content:space-between}.cty-ellipsis[class]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:normal}.cty-ellipsis2[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis3[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;word-break:break-all;word-wrap:break-word}.cty-ellipsis4[class]{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:4;overflow:hidden;word-break:break-all;word-wrap:break-word}ion-button{--background-activated:transparent;--background-focused:transparent;--background-hover:transparent;--box-shadow:none}ion-grid{padding:0}ion-row{padding:0}ion-col{padding:0}ion-item{--padding-bottom:0;--padding-end:0;--padding-start:0;--padding-top:0;--inner-padding-top:0;--inner-padding-start:0;--inner-padding-end:0;--inner-padding-bottom:0;--inner-border-width:0;--border-width:0;--min-height:0;--background:none;overflow:initial}ion-toast{--width:84%;--height:36px;--color:var(--cty-color-white);--background:rgba(0, 0, 0, 0.7);--border-radius:100px;line-height:1.2;font-size:var(--cty-font-size-base);text-align:center}.plt-hybrid .safe-area-bottom-border{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid var(--cty-color-white)}.plt-hybrid .safe-area-bottom-border-color{-webkit-box-sizing:content-box;box-sizing:content-box;border-bottom:var(--ion-safe-area-bottom, 0) solid currentColor}.plt-hybrid .safe-area-bottom-padding{padding-bottom:var(--ion-safe-area-bottom, 0)}:host{--cty-video-width:100vw;--cty-video-height:100vh;--cty-video-half-width:calc(var(--cty-video-width) / 2);--cty-video-fit:fill;--cty-video-header-height:50px;--cty-video-header-background:var(--cty-overlay-color-lighter);--cty-video-header-unfullscreen-background:transparent;--cty-video-header-unfullscreen-height:30px;--cty-video-header-padding-top:0px;--cty-video-header-padding-bottom:0px;--cty-video-header-padding-start:0px;--cty-video-header-padding-end:0px;--cty-video-header-back-display:flex;--cty-video-header-back-background:transparent;--cty-video-header-back-height:36px;--cty-video-header-back-width:36px;--cty-video-header-back-radius:var(--cty-border-radius-circle);--cty-video-header-back-offset-start:2px;--cty-video-header-back-offset-end:0px;--cty-video-header-back-size:25px;--cty-video-header-back-color:var(--cty-color-white);--cty-video-header-title-size:var(--cty-font-size-medium);--cty-video-header-title-color:var(--cty-color-white);--cty-video-header-title-display:flex;--cty-video-footer-height:50px;--cty-video-footer-background:var(--cty-overlay-color-lighter);--cty-video-footer-unfullscreen-background:transparent;--cty-video-footer-unfullscreen-height:35px;--cty-video-footer-progress-height:0px;--cty-video-footer-padding-start:0px;--cty-video-footer-padding-end:0px;--cty-video-footer-progress-size:var(--cty-font-size-medium);--cty-video-footer-icon-size:24px;--cty-video-footer-fullscreen-icon-size:20px;--cty-video-play-size:80px;--cty-video-play-border:5px solid rgb(238 238 238 / 80%);--cty-video-play-icon-size:40px;--cty-video-unfullscreen-play-size:40px;--cty-video-unfullscreen-play-border:4px solid rgb(238 238 238 / 80%);--cty-video-unfullscreen-play-icon-size:26px;--cty-video-range-bar-height:2px;--cty-video-bar-size:12px;--cty-video-bar-color:var(--cty-color-white);--cty-video-range-knob-background:var(--cty-color-white);--cty-video-range-background:rgb(255 255 255 / 50%);--cty-video-range-background-active:var(--cty-color-primary);--cty-video-loading-background-color:rgb(0 0 0 / 90%);--cty-video-loading-img-width:100px;--cty-video-half-screen-height:56vw;--cty-video-dot-size:7px;--cty-video-dot-padding:9px;--cty-video-dot-active-color:var(--cty-color-primary);--cty-video-progress-vertical-padding:0 15px;--cty-video-progress-horizongtal-padding:0px;--cty-video-rate-active-color:var(--cty-color-primary);--cty-video-toast-width:calc(var(--cty-video-width) * 0.4);--cty-video-toast-height:40px;--cty-video-opn-toast-icon-size:20px;position:relative;display:block;width:var(--cty-video-width);height:var(--cty-video-height);background:var(--cty-color-black)}ion-row{height:100%}ion-col{overflow:hidden}ion-button{min-height:auto;margin:0}.cty-video__wrapper{position:relative;width:100%;height:100%}.cty-video__player{position:absolute;top:0;left:0;display:none;width:var(--cty-video-height);height:var(--cty-video-width);margin:0;-o-object-fit:var(--cty-video-fit);object-fit:var(--cty-video-fit);-webkit-transform:rotate(90deg) translate(0, -100%);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__controls{position:absolute;top:0;left:0;width:100%;height:100%}.cty-video__header{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:content-box;box-sizing:content-box;width:calc(var(--cty-video-height) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));height:var(--cty-video-header-height);padding:var(--cty-video-header-padding-top) var(--cty-video-header-padding-end) var(--cty-video-header-padding-bottom) var(--cty-video-header-padding-start);background:var(--cty-video-header-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__header-back{display:var(--cty-video-header-back-display);-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__header-back ion-button{width:var(--cty-video-header-back-width);height:var(--cty-video-header-back-height);margin-right:var(--cty-video-header-back-offset-end);margin-left:var(--cty-video-header-back-offset-start);border-radius:var(--cty-video-header-back-radius);--background:var(--cty-video-header-back-background);--padding-start:5px;--padding-end:5px;--padding-top:0;--padding-bottom:0}.cty-video__header-back cty-icon{font-size:var(--cty-video-header-back-size);color:var(--cty-video-header-back-color)}.cty-video__title[class]{display:var(--cty-video-header-title-display);font-size:var(--cty-video-header-title-size);line-height:var(--cty-video-header-height);color:var(--cty-video-header-title-color)}.cty-video__footer{position:absolute;top:0;left:0;z-index:6;-webkit-box-sizing:border-box;box-sizing:border-box;width:var(--cty-video-height);height:var(--cty-video-footer-height);padding-right:var(--cty-video-footer-padding-end);padding-left:var(--cty-video-footer-padding-start);background:var(--cty-video-footer-background);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2);transform-origin:calc(var(--cty-video-footer-height) / 2) calc(var(--cty-video-footer-height) / 2)}.cty-video__footer ion-button{height:100%;--background:transparent;--padding-start:12px;--padding-end:12px;--padding-top:0;--padding-bottom:0;--color:var(--cty-color-white)}.cty-video__footer ion-row{height:calc(var(--cty-video-footer-height) - var(--cty-video-footer-progress-height))}.cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height);-webkit-transform:translateY(calc(var(--cty-video-footer-progress-height) / 2));transform:translateY(calc(var(--cty-video-footer-progress-height) / 2))}.cty-video__footer-controls{background:transparent}.cty-video__footer-controls ion-col:not(.cty-video__footer-progress){opacity:0}.cty-video__footer-controls .cty-video__time{opacity:0}.cty-video__footer-toggle-play{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-toggle-play cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-flex{-ms-flex:1;flex:1}.cty-video__footer-time-label{margin-left:8px;font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white);letter-spacing:0.2px}.cty-video__footer-time-label span{margin:0 1px;-webkit-transform:translateY(-1px);transform:translateY(-1px)}.cty-video__footer-progress{-ms-flex:1;flex:1;overflow:auto}.cty-video__time{font-size:var(--cty-video-footer-progress-size);color:var(--cty-color-white)}.cty-video__time:nth-child(1){margin-right:12px}.cty-video__time:nth-child(2),.cty-video__time:last-child{margin-left:12px}.cty-video__footer-range{--height:100%;--knob-size:var(--cty-video-bar-size);--bar-height:var(--cty-video-range-bar-height);padding:0;font-size:var(--cty-font-size-medium);color:var(--cty-video-bar-color);opacity:1;--knob-background:var(--cty-video-range-knob-background);--bar-background:var(--cty-video-range-background);--bar-background-active:var(--cty-video-range-background-active)}.cty-video__footer-bar{position:relative;-ms-flex:1;flex:1;height:80%;cursor:pointer}.cty-video__footer-progress__top{position:relative;z-index:2;padding:var(--cty-video-progress-horizongtal-padding)}.cty-video__footer-progress__top .cty-video__footer-bar{height:100%}.cty-video__footer-dot{position:absolute;top:50%;padding:var(--cty-video-dot-padding);-webkit-transform:translate(-50%, -50%);transform:translate(-50%, -50%)}.cty-video__footer-dot::after{display:block;width:var(--cty-video-dot-size);height:var(--cty-video-dot-size);content:"";background:var(--cty-video-dot-active-color);border-radius:var(--cty-border-radius-circle)}.cty-video__footer-rate{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-rate ion-button{--padding-start:5px;--padding-end:5px;--padding-top:4px;--padding-bottom:4px;width:36px;height:auto;margin-left:12px;font-size:var(--cty-font-size-extra-small);font-weight:bold;white-space:nowrap;border:1px solid var(--cty-color-white);border-radius:var(--cty-border-radius-base)}.cty-video__footer-volume{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-volume cty-icon{font-size:var(--cty-video-footer-icon-size)}.cty-video__footer-fullscreen{-ms-flex-positive:0;flex-grow:0;width:auto;min-width:-webkit-max-content;min-width:-moz-max-content;min-width:max-content}.cty-video__footer-fullscreen ion-button{--padding-start:0px}.cty-video__footer-fullscreen cty-icon{font-size:var(--cty-video-footer-fullscreen-icon-size)}.cty-video__toggle-play{position:absolute;top:50%;left:50%;z-index:8;width:var(--cty-video-play-size);height:var(--cty-video-play-size);margin:calc(var(--cty-video-play-size) / -2) 0 0 calc(var(--cty-video-play-size) / -2);font-weight:bold;text-align:center;border:var(--cty-video-play-border);border-radius:var(--cty-border-radius-circle);--background:transparent;--padding-top:0;--padding-end:0;--padding-start:0;--padding-bottom:0}.cty-video__toggle-play cty-icon{font-size:var(--cty-video-play-icon-size);color:rgba(238, 238, 238, 0.9);text-align:center;-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__opn-toast{position:absolute;top:50%;left:50%;z-index:4;width:var(--cty-video-toast-width);max-width:150px;height:var(--cty-video-toast-height);font-size:var(--cty-font-size-medium);font-weight:bold;color:var(--cty-color-white);background:var(--cty-overlay-color-light);border-radius:var(--cty-border-radius-round);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__opn-toast cty-icon{margin-right:10px;font-size:var(--cty-video-opn-toast-icon-size)}.cty-video__opn-panel{position:absolute;top:50%;left:50%;z-index:5;width:var(--cty-video-height);height:calc(var(--cty-video-width) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:0 0 0 calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / 2);-webkit-transform:translate(-50%, -50%) rotate(90deg);transform:translate(-50%, -50%) rotate(90deg)}.cty-video__dot-panel{position:absolute;z-index:6;padding:5px 11px 5px 8px;margin-left:calc(var(--cty-video-footer-height) + 13px + 46px);background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-base);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:left top;transform-origin:left top}.cty-video__dot-panel .cty-video__dot-label{position:relative;max-width:160px;padding-right:17px;font-size:var(--cty-font-size-small);line-height:1.38;color:var(--cty-color-white)}.cty-video__dot-panel .cty-video__dot-label::after{position:absolute;top:0;right:7px;width:1px;height:100%;content:"";background-color:rgba(255, 255, 255, 0.3);-webkit-transform:scaleX(1.5);transform:scaleX(1.5)}.cty-video__dot-panel ion-button{height:36px;font-size:var(--cty-font-size-small);font-weight:bold;--padding-start:0;--padding-end:0;--background:transparent;--border-radius:0;--color:var(--cty-video-dot-active-color)}.cty-video__dot-panel cty-icon{margin-right:4px;font-size:var(--cty-font-size-medium)}.cty-video__dot-panel .cty-video__dot-triangle{position:absolute;bottom:-18px;left:20px;border-color:transparent;border-style:solid;border-width:9px 8px;border-top-color:var(--cty-overlay-color)}.cty-video__dot-panel-ex{margin-left:calc(var(--cty-video-footer-height) + 46px)}.cty-video__toast[class]{position:absolute;top:50%;z-index:7;min-width:300px;max-width:96vw;padding:0 15px;margin:0 0 0 -60px;font-size:var(--cty-font-size-extra-small);font-weight:bold;line-height:30px;color:rgba(238, 238, 238, 0.9);text-align:center;pointer-events:none;background:var(--cty-overlay-color);border-radius:var(--cty-border-radius-large);-webkit-transform:rotate(90deg);transform:rotate(90deg)}.cty-video__rate{position:absolute;top:0;left:0;z-index:9;width:var(--cty-video-height);height:var(--cty-video-width);-webkit-transform:rotate(90deg);transform:rotate(90deg);-webkit-transform-origin:var(--cty-video-half-width) var(--cty-video-half-width);transform-origin:var(--cty-video-half-width) var(--cty-video-half-width)}.cty-video__rate-mask{position:absolute;top:0;right:0;width:40%;height:100%;background-image:-webkit-gradient(linear, right top, left top, from(rgba(0, 0, 0, 0.9)), color-stop(rgba(0, 0, 0, 0.8)), color-stop(rgba(0, 0, 0, 0.5)), to(transparent));background-image:linear-gradient(to left, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.5), transparent)}.cty-video__rate-list-item{display:block;width:112px;min-height:50px;font-size:var(--cty-font-size-base);color:var(--cty-color-white);text-align:center;outline:none;background-color:transparent;border:none}.cty-video__rate-list-item.active{color:var(--cty-video-rate-active-color)}.cty-video__interactive{z-index:101;display:none;background-color:transparent;background-repeat:no-repeat;background-size:100% 100%}:host(.cty-video__vertical) cty-loading{--cty-loading-transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__player{top:50%;width:var(--cty-video-width);height:auto;max-height:100%;-webkit-transform:rotate(0deg) translateY(-50%);transform:rotate(0deg) translateY(-50%)}:host(.cty-video__vertical) .cty-video__toggle-play cty-icon{-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__toast{top:80%;left:50%;margin:0;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}:host(.cty-video__vertical) .cty-video__header{width:calc(var(--cty-video-width) - var(--cty-video-header-padding-start) - var(--cty-video-header-padding-end));-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__opn-panel{width:var(--cty-video-width);height:calc(var(--cty-video-height) - var(--cty-video-header-height) - var(--cty-video-footer-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom));margin:calc((var(--cty-video-footer-height) - var(--cty-video-header-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom)) / -2) 0 0;-webkit-transform:translate(-50%, -50%) rotate(0);transform:translate(-50%, -50%) rotate(0)}:host(.cty-video__vertical) .cty-video__opn-toast{top:50%;-webkit-transform:translate(-50%, 0) rotate(0deg);transform:translate(-50%, 0) rotate(0deg)}:host(.cty-video__vertical) .cty-video__footer{top:auto;bottom:0;width:var(--cty-video-width);-webkit-transform:rotate(0);transform:rotate(0)}:host(.cty-video__vertical) .cty-video__footer-progress__top{padding:var(--cty-video-progress-vertical-padding)}:host(.cty-video__vertical) .cty-video__time{font-size:var(--cty-font-size-small)}:host(.cty-video__vertical) .cty-video__footer-time-label{margin-left:0}:host(.cty-video__vertical) .cty-video__rate{width:var(--cty-video-width);height:var(--cty-video-height);-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel{bottom:calc(var(--cty-video-footer-height) + 13px);margin-left:0;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__vertical) .cty-video__dot-panel-ex{bottom:var(--cty-video-footer-height)}:host(.cty-video__unfullscreen){height:var(--cty-video-half-screen-height)}:host(.cty-video__unfullscreen) .cty-video__wrapper{background-color:var(--cty-color-black)}:host(.cty-video__unfullscreen) .cty-video__player{top:0;height:var(--cty-video-half-screen-height);max-height:initial;-webkit-transform:rotate(0deg);transform:rotate(0deg)}:host(.cty-video__unfullscreen) .cty-video__toggle-play{width:var(--cty-video-unfullscreen-play-size);height:var(--cty-video-unfullscreen-play-size);margin:calc(var(--cty-video-unfullscreen-play-size) / -2) 0 0 calc(var(--cty-video-unfullscreen-play-size) / -2);border:var(--cty-video-unfullscreen-play-border)}:host(.cty-video__unfullscreen) .cty-video__toggle-play cty-icon{font-size:var(--cty-video-unfullscreen-play-icon-size)}:host(.cty-video__unfullscreen) .cty-video__header{height:var(--cty-video-header-unfullscreen-height);background:var(--cty-video-header-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__title{line-height:var(--cty-video-header-unfullscreen-height)}:host(.cty-video__unfullscreen) .cty-video__header-back ion-button{width:30px;height:100%}:host(.cty-video__unfullscreen) .cty-video__footer{height:var(--cty-video-footer-unfullscreen-height);background:var(--cty-video-footer-unfullscreen-background)}:host(.cty-video__unfullscreen) .cty-video__footer ion-row{height:calc(var(--cty-video-footer-unfullscreen-height) - var(--cty-video-footer-progress-height))}:host(.cty-video__unfullscreen) .cty-video__footer .cty-video__footer-progress__top{height:var(--cty-video-footer-progress-height)}:host(.cty-video__unfullscreen) .cty-video__footer ion-button{--padding-start:8px;--padding-end:8px}:host(.cty-video__unfullscreen) .cty-video__footer-fullscreen ion-button{--padding-start:0px}:host(.cty-video__unfullscreen) .cty-video__opn-panel{height:calc(var(--cty-video-half-screen-height) - var(--cty-video-header-unfullscreen-height) - var(--cty-video-footer-unfullscreen-height) - var(--cty-video-header-padding-top) - var(--cty-video-header-padding-bottom))}:host(.cty-video__unfullscreen) .cty-video__opn-toast{top:40%;height:30px}:host(.cty-video__unfullscreen) .cty-video__toast{top:70%}:host(.cty-video__unfullscreen) cty-loading{--cty-loading-overlay-height:var(--cty-video-half-screen-height)}:host(.cty-video__large-screen) .cty-video__player{top:0;left:50%;width:auto;max-width:100%;height:100%;-webkit-transform:rotate(0deg) translateX(-50%);transform:rotate(0deg) translateX(-50%)}.cty-video__audio-player{display:block}.cty-video__player-audio{position:absolute;display:none;visibility:hidden}';export{w as cty_video}