diff --git a/.gitignore b/.gitignore index da39fc2b..8a33698c 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,6 @@ coverage npm-debug.log* yarn-debug.log* yarn-error.log* -dist package-lock.json # -------- React Native -------- # @@ -38,7 +37,6 @@ project.xcworkspace # Android/IntelliJ # -build/ .idea .gradle local.properties diff --git a/dist/main.css b/dist/main.css new file mode 100644 index 00000000..0add5706 --- /dev/null +++ b/dist/main.css @@ -0,0 +1 @@ +.rce-container-mbox{display:block;flex-direction:column;min-width:300px;overflow-x:hidden}.rce-mbox-forward{align-items:center;align-self:center;background:#fff;border-radius:20px;bottom:0;box-shadow:0 0 5px 0 #a4a4a4;cursor:pointer;flex-direction:row;height:30px;justify-content:center;margin:auto;position:absolute;top:0;transition:all .3s ease;width:30px}.rce-mbox-forward-left{display:flex;left:-50px;opacity:0;visibility:hidden}.rce-mbox-forward-right{display:flex;opacity:0;right:-50px;visibility:hidden}.rce-mbox-reply-btn-left{display:flex;left:-85px;opacity:0;visibility:hidden}.rce-mbox-reply-btn-right{display:flex;opacity:0;right:-85px;visibility:hidden}.rce-container-mbox:hover .rce-mbox-forward-left,.rce-container-mbox:hover .rce-mbox-forward-right{opacity:1;visibility:visible}.rce-mbox-remove{align-items:center;align-self:center;background:#fff;border-radius:20px;bottom:0;box-shadow:0 0 5px 0 #a4a4a4;cursor:pointer;flex-direction:row;height:30px;justify-content:center;margin:auto;position:absolute;top:0;transition:all .3s ease;width:30px}.rce-mbox-remove-left{display:flex;left:-120px;opacity:0;visibility:hidden}.rce-mbox-remove-right{display:flex;opacity:0;right:-120px;visibility:hidden}.rce-container-mbox:hover .rce-mbox-remove-left,.rce-container-mbox:hover .rce-mbox-remove-right,.rce-container-mbox:hover .rce-mbox-reply-btn-left,.rce-container-mbox:hover .rce-mbox-reply-btn-right{opacity:1;visibility:visible}.rce-mbox{background:#fff;border-radius:5px;border-top-left-radius:0;box-shadow:1px 1px 1px 1px #0003;flex-direction:column;float:left;margin:3px 5px 3px 20px;min-width:140px;padding:6px 9px 8px;position:relative}.rce-mbox.message-focus{-webkit-animation-duration:1s;animation-duration:1s;animation-iteration-count:2;-webkit-animation-iteration-count:2;animation-name:message-box-default-focus}@-webkit-keyframes message-box-default-focus{0%{background-color:#fff}to{background-color:#dfdfdf}}.rce-mbox-body{margin:0;padding:0;position:relative}.rce-mbox.rce-mbox-right{border-top-left-radius:5px;border-top-right-radius:0;float:right;margin-left:5px;margin-right:20px}.rce-mbox.rce-mbox-right.message-focus{-webkit-animation-duration:1s;animation-duration:1s;animation-iteration-count:2;-webkit-animation-iteration-count:2;animation-name:message-box-right-focus}@-webkit-keyframes message-box-right-focus{0%{background-color:#d4f1fb}to{background-color:#b8dae6}}.rce-mbox-text{font-size:13.6px;word-break:break-word}.rce-mbox-text-retracted{align-items:center;display:flex;font-style:italic;user-select:none}.rce-mbox-text.rce-mbox-text-retracted svg{margin-right:3px}.rce-mbox-text-retracted.left{color:#555555b3!important}.rce-mbox-text-retracted.right{color:#efefefb3!important}.rce-mbox-text:after{content:"\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0\00a0"}.rce-mbox-time{align-items:center;bottom:-5px;display:flex;font-size:12px;justify-content:flex-end;right:-4px;text-align:right;user-select:none}.rce-mbox-time.non-copiable:before{content:attr(data-text)}.rce-mbox-time-block{align-items:center;border-bottom-left-radius:5px;border-bottom-right-radius:5px;bottom:0;display:flex;justify-content:flex-end;left:0;margin-left:-6px;margin-right:-6px;padding-bottom:2px;padding-right:3px;padding-top:5px;right:0}.rce-mbox--clear-padding{padding-bottom:3px}.rce-mbox.rce-mbox--clear-notch{border-radius:5px 5px 5px 5px!important}.rce-mbox-right-notch{fill:#fff;filter:drop-shadow(2px 0 1px rgba(0,0,0,.2));height:15px;position:absolute;right:-14px;top:0;width:15px}.rce-mbox-right-notch.message-focus{-webkit-animation-duration:1s;animation-duration:1s;animation-iteration-count:2;-webkit-animation-iteration-count:2;animation-name:message-right-notch-focus}@-webkit-keyframes message-right-notch-focus{0%{fill:#d4f1fb}to{fill:#b8dae6}}.rce-mbox-left-notch{fill:#fff;height:15px;left:-14px;position:absolute;top:0;width:15px}.rce-mbox-left-notch.message-focus{-webkit-animation-duration:1s;animation-duration:1s;animation-iteration-count:2;-webkit-animation-iteration-count:2;animation-name:message-left-notch-focus}@-webkit-keyframes message-left-notch-focus{0%{fill:#fff}to{fill:#dfdfdf}}.rce-mbox-title{align-items:center;color:#4f81a1;cursor:pointer;display:flex;font-size:13px;font-weight:500;margin:0 0 8px;user-select:none}.rce-mbox-title:hover{text-decoration:underline}.rce-mbox-title--clear{margin-bottom:5px}.rce-mbox-status{font-size:15px;height:15px;margin-left:3px}.rce-mbox-title>.rce-avatar-container{margin-right:5px}.rce-mbox-photo{margin-left:-6px;margin-right:-6px;margin-top:-3px}.rce-mbox-photo .rce-mbox-text{margin:auto;max-width:300px;padding:5px 0}.rce-mbox-photo--img{border-radius:5px;display:flex;justify-content:center;max-height:300px;overflow:hidden;position:relative}.rce-mbox-photo--img__block{background-color:#00000080;border-radius:5px;bottom:0;display:flex;left:0;position:absolute;right:0;top:0}.rce-mbox-photo--img img{min-height:100px;object-fit:contain;user-select:none}.rce-mbox-photo--img__block-item{cursor:pointer;height:100px;margin:auto;width:100px}.rce-mbox-photo--download{background:none;border:1px solid #eee;border-radius:100%;color:#efe;display:flex;font-size:3.2em;height:100px;justify-content:center;outline:none;width:100px}.rce-mbox-photo--download:hover{opacity:.7}.rce-mbox-photo--download:active{opacity:.3}.rce-mbox-photo--error{align-items:center;background:none;color:#eaeaea;display:flex;font-size:70px;justify-content:center}.rce-mbox-file{padding-bottom:13px}.rce-mbox-file>button{align-items:center;background:#e9e9e9;border:none;border-radius:5px;cursor:pointer;display:flex;margin-left:-6px;margin-right:-6px;margin-top:-3px;max-width:500px;min-height:52px;outline:none;padding:5px 0;user-select:none}.rce-mbox-file>button>*{padding:0 10px}.rce-mbox-file--icon{align-items:center;display:flex;flex-direction:column;font-size:30px}.rce-mbox-file--size{font-size:10px;margin-top:3px;max-width:52px}.rce-mbox-file--size,.rce-mbox-file--text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rce-mbox-file--text{font-size:13.6px}.rce-mbox-file--buttons{align-items:center;display:flex;font-size:30px}.rce-mbox-file--buttons .rce-error-button{display:inherit}.rce-mbox-file--loading{font-size:15px;height:40px;width:40px}.rce-container-smsg,.rce-smsg{align-items:center;display:flex;justify-content:center}.rce-smsg{background:#fff;border-radius:10px;box-shadow:1px 1px 1px 1px #0003;flex-direction:column;float:left;margin:5px 0;max-width:70%;padding:6px 9px 8px;position:relative}.rce-smsg-text{display:inline-block;font-size:15px;text-align:center}.rce-mbox-location{align-items:center;border-radius:5px;display:flex;height:150px;justify-content:center;margin-left:-6px;margin-right:-6px;margin-top:-3px;overflow:hidden;position:relative;width:250px}.rce-mbox-location-img{width:100%}.rce-mbox-location-text{margin-left:-6px;margin-right:-6px;padding:5px 0;width:250px}.rce-mbox-spotify{margin-left:-6px;margin-right:-6px;margin-top:-2px}.rce-mbox-reply,.rce-mbox-spotify{border-radius:5px;display:flex;overflow:hidden}.rce-mbox-reply{background:#ececec;cursor:pointer;font-size:12px;margin:-3px -6px 6px;padding:0 0 0 5px;position:relative;transition:.2s;user-select:none}.rce-mbox-reply.rce-mbox-reply-border{border-left:5px solid}.rce-mbox-reply:hover{opacity:.85}.rce-mbox-reply-left{display:flex;flex:1;flex-direction:column;justify-content:space-between;padding:3px 0}.rce-mbox-reply-owner{font-size:13px}.rce-mbox-reply-message{color:#5a5a5a;max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rce-mbox-reply-right{height:40px;width:40px}.rce-mbox-reply-right img{width:100%}.rce-mbox-reply-text{margin-left:-6px;margin-right:-6px;padding:5px 0;width:250px}.rce-mbox-mtmg{align-content:center;display:flex;justify-content:center;max-width:425px;min-width:425px;padding-bottom:13px}.rce-mtmg{background:#f5f5f5;border-radius:2px;display:flex;flex-direction:column;float:left;margin:5px 0;position:relative;width:100%}.rce-mtmg-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:300px}.rce-mtmg-subject{display:inline-block;font-size:15px;padding:5px 9px;text-align:start}.rce-mtmg-toogleItem{height:100%;width:100%}.rce-mtmg-body{background:#6264a7;color:#fff;display:flex;font-size:15px;height:50px;justify-content:space-between}.rce-mtmg-body:hover{opacity:.9}.rce-mtmg-item{align-items:center;display:flex;justify-content:flex-start;padding:0 10px}.rce-mtmg-item>svg{height:23px;width:23px}.rce-mtmg-content{display:flex;flex-direction:column;padding:0 10px}.rce-mtmg-date{color:#cecece;font-size:13px}.rce-mtmg-body-bottom{color:#6264a7;cursor:pointer;display:flex;flex-direction:row;font-size:13px;padding:9px}.rce-mtmg-bottom--tptitle{align-items:center;display:flex;justify-content:center}.rce-mtmg-body-bottom--bttitle>svg,.rce-mtmg-bottom--tptitle>svg{color:#6264a7a1}.rce-mtmg-toogleContent{display:none;flex-direction:column;height:auto;min-height:60px}.rce-mtmg-toogleContent--click{display:flex}.rce-mtmg-right-icon{background:#0000!important;cursor:pointer;height:100%;right:10px}.rce-mtmg-body .rce-dropdown-container{height:100%}.rce-mtmg-right-icon>svg{height:23px;width:23px}.rce-mitem{display:flex;padding:10px 8px}.rce-mitem-event:hover,.rce-mitem:hover{background:#ececec}.rce-mitem-event{user-select:none}.rce-mitem-body{align-items:flex-start;display:flex;flex-direction:column;justify-content:center}.rce-mitem-body-content{align-items:flex-start;display:flex;justify-content:flex-start}.rce-mitem-body--top{align-items:center;display:flex;margin-bottom:2px;user-select:none}.rce-mitem-body--top-title{color:#6264a7;font-size:15px;font-weight:600;padding:0 15px 0 0;text-transform:capitalize}.rce-mitem-body--top-title:hover{cursor:pointer;text-decoration:underline}.rce-mitem-body--bottom-title{color:#252525;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Open Sans,Helvetica Neue,sans-serif;font-size:13px}.rce-mitem-body--top-time{color:#0006;font-size:12px}.rce-mitem-bottom-body{align-items:flex-start;display:flex;justify-content:flex-start;padding:10px 8px}.rce-mitem-body.avatar{padding:8px 10px 0 0}.rce-mitem.avatar{padding:8px 5px 0 0}.rce-mitem.no-avatar{padding:8px 10px 0 0}.rce-mitem.no-avatar>svg{height:19px;width:19px}.rce-mitem.avatar img{background:#ccc;border:none!important;border-radius:100%;height:22px;width:22px}.rce-mitem-body.avatar>svg{height:19px;width:19px}.rce-mitem-bottom-body-top{display:flex;flex-direction:column}.rce-mitem-bottom-body-top-title>svg{padding:0 7px 0 0}.rce-mitem-avatar-content{display:flex;position:absolute;right:10px}.rce-mitem-avatar{display:flex;padding:0 3px 0 0}.rce-mitem-tooltip{display:inline;position:relative}.rce-mitem-tooltip-text{margin:5px}.rce-mitem-tooltip-text:after{border-bottom:11px solid #444;border-left:8px solid #0000;border-right:8px solid #0000;content:"";left:15%;opacity:0;position:absolute;top:29px;transition:opacity .8s linear .2s}.rce-mitem-tooltip[tooltip]:after{background:#444;border-radius:8px;color:#fff;content:attr(tooltip);display:flex;font-size:14px;justify-content:center;max-width:415px;min-width:415px;opacity:0;padding:5px;position:absolute;right:-13px;top:40px;transition:opacity .8s linear .2s;z-index:1}.rce-mitem-tooltip-text:hover:after{opacity:1;transition:opacity .8s linear}.rce-mitem-tooltip[tooltip]:hover:after{opacity:1;transition:opacity .8s linear .1s}.rce-mitem-tooltip[tooltip]:hover .rce-mitem-tooltip-text:after{opacity:1}.rce-mitem-length{align-items:center;background:#e48989;border-radius:50%;color:#fff;display:flex;font-size:14px;height:25px;text-align:center;width:25px}.rce-mitem-avatar img{background:#ccc;border:none!important;border-radius:100%;height:50px;width:50px}.rce-mtmg-call-record{background:#eaeaea;height:85%;margin-top:11px;width:350px}.rce-mtmg-call-body{align-items:flex-start;display:flex;flex-direction:row;position:relative}.rce-mtmg-call-avatars{height:100px!important;position:relative;width:140px!important}.rce-mtmg-call-avatars img{background:#ccc;cursor:pointer;height:100%!important;width:100%!important}.rce-mtmg-call-body-title{display:flex;flex-direction:column;left:15px;position:relative;top:30px}.rce-mtmg-call-body-bottom,.rce-mtmg-call-body-title>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:185px}.rce-mtmg-call-body-bottom{color:#505050;font-size:12px}.rce-mtmg-record-time{background:#000000cf;border-radius:5px;bottom:5px;color:#fff;font-size:13px;padding:4px;position:absolute;right:5px}.rce-avatar-container{align-items:center;display:flex;justify-content:center;overflow:hidden}.rce-avatar-container .rce-avatar{height:100%;width:100%}.rce-avatar-container.flexible .rce-avatar{border-radius:unset!important;height:auto!important;overflow:unset!important;width:100%!important}.rce-avatar-container.default{height:25px;width:25px}.rce-avatar-container.rounded{border-radius:5px}.rce-avatar-container.circle{border-radius:100%}.rce-avatar-container.xsmall{height:30px;width:30px}.rce-avatar-container.small{height:35px;width:35px}.rce-avatar-container.medium{height:40px;width:40px}.rce-avatar-container.large{height:45px;width:45px}.rce-avatar-container.xlarge{height:55px;width:55px}@keyframes avatarLazy{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.rce-avatar-lazy{animation:avatarLazy 2s ease-in-out infinite normal}.rce-avatar-container.rce-citem-avatar-encircle-status{box-sizing:border-box;position:relative}.rce-avatar-letter{align-items:center;color:#fff;display:flex;font-size:20px;justify-content:center;margin-top:5px}.rce-avatar-letter-background{border-radius:20px;height:35px;width:35px}.rce-dropdown-container{position:relative}.rce-dropdown{align-items:center;background:#fff;border-radius:5px;box-shadow:0 0 5px 0 #a3a3a3;box-sizing:border-box;display:none;flex-direction:row;justify-content:center;min-width:100%;padding:8px 15px;position:absolute;transform:scale(0);transform-origin:left top;z-index:99999}.rce-dropdown-title{color:"#000";font-size:14px;font-weight:500}.rce-dropdown.dropdown-show{animation:dropdown-scaling .2s ease forwards;display:flex}@keyframes dropdown-scaling{0%{opacity:0}50%{opacity:.5;transform:scale(1.1)}to{opacity:1;transform:scale(1)}}.rce-dropdown.dropdown-hide{animation:dropdown-reverse-scaling .2s ease forwards;display:flex}@keyframes dropdown-reverse-scaling{0%{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(1.1)}to{opacity:0;transform:scale(0)}}.rce-dropdown-open__nortwest{left:0;margin-top:5px;top:100%;transform-origin:left top}.rce-dropdown-open__norteast{margin-top:5px;right:0;top:100%;transform-origin:right top}.rce-dropdown-open__southwest{bottom:100%;left:0;margin-bottom:5px;transform-origin:left bottom}.rce-dropdown-open__southeast{bottom:100%;margin-bottom:5px;right:0;transform-origin:right bottom}.rce-dropdown ul{align-items:center;display:flex;flex-direction:column;justify-content:center;list-style:none;margin:0;padding:0;width:100%}.rce-dropdown ul li{border-bottom:1px solid #e9e9e9;box-sizing:border-box;color:#767676;cursor:pointer;font-size:16px;padding:8px;user-select:none;white-space:nowrap;width:100%}.rce-dropdown ul li:last-child{border:none}.rce-dropdown ul li:hover a{color:#3a6d8c}.rce-dropdown.fade{animation:dropdown-fade .5s ease forwards;opacity:0;transform:scale(1)}@keyframes dropdown-fade{0%{opacity:0}to{opacity:1}}.rce-button{background:#3979aa;border:none;border-radius:5px;box-sizing:border-box;color:#fff;cursor:pointer;flex-direction:row;font-size:12px;justify-content:center;outline:none;padding:8px;position:relative;text-align:center;transition:all .15s ease;user-select:none}.rce-button,.rce-button-icon--container{align-items:center;display:flex}.rce-button:hover{opacity:.8}.rce-button:active{opacity:.6}.rce-button.outline{background:#0000!important;border:1px solid #3979aa;color:#3979aa}.rce-button.outline:hover{opacity:.6}.rce-button.outline:active{opacity:.3}.rce-button.transparent{background:#0000!important}.rce-button.transparent:hover{opacity:.6}.rce-button.transparent:active{opacity:.3}.rce-button-icon{display:flex;font-size:18px;padding:0 3px;position:relative}.rce-button-badge{align-items:center;background:#f64b34;border-radius:4px;display:flex;flex-direction:row;font-size:10px;justify-content:center;padding:4px;position:absolute;right:-7px;top:-7px}.rce-button.circle{border:1px solid #3979aa;border-radius:100%;min-height:35px;min-width:35px}.rce-mbox-video{margin-left:-6px;margin-right:-6px;margin-top:-3px}.rce-mbox-video.padding-time{padding-bottom:12px}.rce-mbox-video .rce-mbox-text{margin:auto;max-width:300px;padding:5px 0}.rce-mbox-video--video{border-radius:5px;display:flex;justify-content:center;max-height:500px;overflow:hidden;position:relative}.rce-mbox-video--video__block{background-color:#00000080;border-radius:5px;bottom:0;display:flex;left:0;position:absolute;right:0;top:0}.rce-mbox-video--video img{height:100%;min-height:100px;user-select:none}.rce-mbox-video--video video{user-select:none;width:100%}.rce-mbox-video--video__block-item{cursor:pointer;height:100px;margin:auto;width:100px}.rce-mbox-video--download{background:none;border:1px solid #eee;border-radius:100%;color:#efe;display:flex;font-size:3.2em;height:100px;justify-content:center;outline:none;width:100px}.rce-mbox-video--download:hover{opacity:.7}.rce-mbox-video--download:active{opacity:.3}.rce-mbox-video--error{align-items:center;background:none;color:#eaeaea;display:flex;font-size:70px;justify-content:center}.rce-mtlink{min-width:400px;padding-bottom:15px}.rce-mtlink-content{background-color:#e2dfec;border-radius:4px;justify-content:space-between;padding:10px}.rce-mtlink-content,.rce-mtlink-item{align-items:center;display:flex;overflow:hidden}.rce-mtlink-item{color:#6c687c;justify-content:flex-start;max-width:100%;min-width:240px;user-select:none}.rce-mtlink-title{color:#07030a;font-size:15px;padding-left:7px}.rce-mtlink-btn{background:#ededed;border-radius:4px;display:flex;margin-left:5px}.rce-mtlink-btn-content{border-right:1px solid;cursor:pointer;padding:4px}.rce-mtlink-btn-content:last-child{border-right:none}.rhap_container{background-color:#fff;border-radius:24px;display:flex;flex-direction:column;font-family:inherit;line-height:1;padding-bottom:15px;padding-top:15px}.rhap_container:focus:not(:focus-visible){outline:0}.rhap_container svg{vertical-align:initial}.rhap_header{margin-bottom:10px}.rhap_footer{margin-top:5px}.rhap_main{display:flex;flex:1 1 auto;flex-direction:column}.rhap_stacked .rhap_controls-section{margin-top:8px}.rhap_horizontal{flex-direction:row}.rhap_horizontal-reverse{flex-direction:row-reverse}.rhap_progress-section{align-items:center;display:flex;flex:3 1 auto}.rhap_progress-container{align-items:center;align-self:center;cursor:pointer;display:flex;flex:1 0 auto;height:20px;margin:0 calc(10px + 1%);user-select:none;-webkit-user-select:none}.rhap_progress-container:focus:not(:focus-visible){outline:0}.rhap_time{color:#333;font-size:16px;user-select:none;-webkit-user-select:none}.rhap_progress-bar{background-color:#ddd;border-radius:2px;box-sizing:border-box;height:5px;position:relative;width:100%;z-index:0}.rhap_progress-filled{background-color:#4c637d;border-radius:2px;height:100%;position:absolute;z-index:2}.rhap_download-progress,.rhap_progress-bar-show-download{background-color:#f5e1ce}.rhap_download-progress{border-radius:2px;height:100%;position:absolute;z-index:1}.rhap_progress-indicator{background:#4c637d;border-radius:50px;box-shadow:0 0 5px #86868680;box-sizing:border-box;height:20px;margin-left:-10px;position:absolute;top:-8px;width:20px;z-index:3}.rhap_controls-section{align-items:center;display:flex;flex:1 1 auto;justify-content:space-between}.rhap_additional-controls{display:none}.rhap_repeat-button{color:#4c637d;font-size:26px;height:26px;margin-right:6px;width:26px}.rhap_main-controls{align-items:center;display:flex;flex:0 1 auto;justify-content:center}.rhap_main-controls-button{color:#4c637d;font-size:35px;height:35px;margin:0 3px;width:35px}.rhap_play-pause-button{font-size:40px;height:40px;width:40px}.rhap_volume-controls{align-items:center;display:flex;flex:1 0 auto;justify-content:flex-end}.rhap_volume-button{color:#4c637d;flex:0 0 26px;font-size:26px;height:26px;margin-right:6px;width:26px}.rhap_volume-container{align-items:center;display:flex;flex:0 1 100px;user-select:none;-webkit-user-select:none}.rhap_volume-bar-area{align-items:center;cursor:pointer;display:flex;height:14px;width:100%}.rhap_volume-bar-area:focus:not(:focus-visible){outline:0}.rhap_volume-bar{background:#f5e1ce;border-radius:2px;box-sizing:border-box;height:4px;position:relative;width:100%}.rhap_volume-indicator{background:#4c637d;border-radius:50px;box-shadow:0 0 3px #86868680;box-sizing:border-box;cursor:pointer;height:12px;left:0;margin-left:-6px;opacity:.9;position:absolute;top:-4px;width:12px}.rhap_volume-indicator:hover{opacity:.9}.rhap_volume-filled{background-color:#4c637d;border-radius:2px;height:100%;position:absolute;z-index:2}.rhap_button-clear{background-color:initial;border:none;cursor:pointer;overflow:hidden;padding:0}.rhap_button-clear:hover{opacity:.9;transition-duration:.2s}.rhap_button-clear:active{opacity:.95}.rhap_button-clear:focus:not(:focus-visible){outline:0}.rce-container-citem{display:block;flex-direction:column;min-width:240px;overflow:hidden}.rce-citem,.rce-container-citem.rce-citem-status-encircle{position:relative}.rce-citem{background:#fff;cursor:pointer;display:flex;flex-direction:row;height:72px;max-width:100%;min-width:240px;overflow:hidden;user-select:none}.rce-citem:hover{background:#f9f9f9}.rce-citem-avatar{padding:0 15px 0 13px;position:relative}.rce-citem-avatar,.rce-citem-status{align-items:center;display:flex;justify-content:center}.rce-citem-status{background:#ccc;border-radius:100%;bottom:10px;height:20px;position:absolute;right:10px;width:20px}.rce-citem-avatar.rce-citem-status-encircle .rce-citem-status{background:#0000;border-radius:100%;bottom:0;height:100%;left:0;margin:auto;right:0;top:0;width:100%}.rce-citem-avatar img{background:#ccc;border:none!important;border-radius:100%;font-size:10px;height:50px;line-height:50px;overflow:hidden;text-align:center;text-overflow:ellipsis;white-space:nowrap;width:50px}.rce-citem-body{border-bottom:1px solid #0000000d;display:flex;flex:1;flex-direction:column;justify-content:center;overflow:hidden;padding-right:15px}.rce-citem-body--top{display:flex}.rce-citem-body--bottom{display:flex;margin-top:4px}.rce-citem-body--bottom-title,.rce-citem-body--top-title{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rce-citem-body--top-title{font-size:16px}.rce-citem-body--bottom-title{color:#555;font-size:15px}.rce-citem-body--top-time{color:#0006;font-size:12px}.rce-citem-body--bottom-status{margin-left:3px}.rce-citem-body--bottom-status span{background:red;border-radius:100%;color:#fff;font-size:12px;font-weight:700;text-align:center}.rce-citem-body--bottom-status span,.rce-citem-body--bottom-status-icon{align-items:center;display:flex;height:18px;justify-content:center;width:18px}.rce-citem-body--bottom-status-icon{margin-left:3px;position:relative}.rce-citem-body--bottom-tools{align-items:center;display:flex;flex-direction:row;height:0;justify-content:center;left:-999px;opacity:0;position:absolute;transition:height .5s ease,opacity 1s ease}.rce-citem:hover .rce-citem-body--bottom-tools{height:100%;left:0;opacity:1;position:relative}.rce-citem-body--bottom-tools-item-hidden-hover{height:100%;opacity:.3;transition:.5s ease}.rce-citem:hover .rce-citem-body--bottom-tools-item-hidden-hover{height:0;left:-999px;opacity:0;position:absolute;transition:.5s ease}.rce-citem-body--bottom-tools-item{height:18px;width:18px}.rce-citem-body--bottom-tools-item svg{fill:#575757;height:18px;width:18px}.rce-container-clist{display:block;overflow:auto}.rce-container-mlist{display:flex;position:relative}.rce-mlist{display:block;flex:1;overflow:auto;position:relative}.rce-mlist-down-button{align-items:center;background:#fff;border-radius:100%;bottom:15px;box-shadow:0 1px 1px 0 #0000000d,0 2px 5px 0 #0000001a;color:#333;cursor:pointer;display:flex;height:40px;justify-content:center;position:absolute;right:10px;transition:.2s;width:40px}.rce-mlist-down-button:hover{opacity:.7}.rce-mlist-down-button--badge{align-items:center;background:red;border-radius:100%;color:#fff;display:flex;font-size:12px;font-weight:700;height:20px;justify-content:center;position:absolute;right:-5px;text-align:center;top:-5px;width:20px}.rce-container-mtitem{display:block}.rce-container-mtitem,.rce-mtitem{flex-direction:column;min-width:240px;overflow:hidden}.rce-mtitem{background:#fff;border-bottom:1px solid #0000000d;display:flex;max-width:100%;position:relative;user-select:none}.rce-mtitem:hover{background:#fbfbfb}.rce-mtitem-top{display:flex;flex-direction:row;justify-content:space-between;position:relative}.rce-mtitem-subject{color:#333;font-size:15px;margin-top:5px;max-height:35px;overflow:hidden;padding:0 10px;text-overflow:ellipsis}.rce-mtitem-body{align-items:center;display:flex;flex:1;flex-direction:row;justify-content:center;overflow:hidden;padding:0 10px}.rce-mtitem-body--avatars{display:flex;flex:1;opacity:.7;overflow:hidden}.rce-mtitem-body--functions{align-items:center;display:flex;justify-content:flex-end;width:70px}.rce-mtitem-footer{align-items:center;display:flex;justify-content:space-between;margin-bottom:5px;padding:0 10px}.rce-mtitem-body--avatars .rce-avatar-container{border:2px solid #fff;margin-left:-10px}.rce-mtitem-body--avatars .rce-avatar-container:first-child{margin:0}.rce-mtitem-letter{align-items:center;background:#e48989;color:#fff;display:flex;justify-content:center}.rce-mtitem-button{background:#5ba7c5;display:flex;transition:.3s}.rce-mtitem-button,.rce-mtitem-closable{align-items:center;border-radius:100%;color:#fff;font-size:25px;justify-content:center;padding:3px}.rce-mtitem-closable{background:#ff4a4f;display:none;margin-right:7px}.rce-mtitem:hover .rce-mtitem-closable{cursor:pointer;display:flex}.rce-mtitem-share{align-items:center;color:#5ba7c5;display:flex;font-size:30px;justify-content:center;left:-10px;margin:-10px 0;position:relative;transition:.3s}.rce-mtitem-button:hover,.rce-mtitem-share:hover{cursor:pointer;opacity:.8}.rce-mtitem-date{color:#9f9f9f;font-size:13px}.rce-container-mtlist{display:block;overflow:auto}.rce-container-input{align-items:center;background:#fff;box-sizing:border-box;display:flex;flex-direction:row;min-width:100%}.rce-input{border:none;border-radius:5px;box-sizing:border-box;color:#333;flex:1;font-size:14px;height:40px;outline:none;padding:0 5px}.rce-input-textarea{height:37px;padding:10px 5px;resize:none}.rce-input-buttons{margin:5px}.rce-input-buttons,.rce-input-buttons>*{display:flex;flex-direction:row}.rce-input-buttons .rce-button:nth-child(2n){margin-left:5px;margin-right:5px}.rce-input-buttons .rce-button:last-child{margin-right:0}.rce-left-padding{padding-left:10px;padding-right:0!important}.rce-right-padding{padding-left:0!important;padding-right:10px}.rce-input::placeholder{color:#afafaf}.rce-navbar{align-items:center;display:flex;flex-direction:row;justify-content:space-between;padding:10px}.rce-navbar.light{background:#f4f4f4}.rce-navbar.dark{background:#2f414c}.rce-navbar-item{align-items:center;justify-content:flex-start}.rce-navbar-item,.rce-navbar-item>*{display:flex;flex-direction:row}.rce-navbar-item>*>*{margin-left:5px}.rce-sbar{align-items:center;box-sizing:border-box;display:flex;flex-direction:column;justify-content:space-between;min-height:100%;padding:10px}.rce-sbar.light{background:#f4f4f4}.rce-sbar.dark{background:#2f414c}.rce-sbar-item{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;max-width:100%}.rce-sbar-item>*{display:flex;flex-direction:column}.rce-sbar-item__center{margin:15px 0}.rce-popup-wrapper{align-items:center;background:#ffffffb3;bottom:0;display:flex;flex-direction:row;justify-content:center;left:0;margin:auto;position:fixed;right:0;top:0;z-index:9999999999}.rce-popup{align-items:stretch;animation:popup-scaling .4s ease forwards;background:#fff;border-radius:5px;box-shadow:0 0 25px -2px #4f4f4f;box-sizing:border-box;display:flex;flex-direction:column;justify-content:flex-start;min-height:100px;padding:0 10px;width:400px}@keyframes popup-scaling{0%{opacity:0;transform:scale(0)}50%{opacity:.5;transform:scale(1.2)}to{opacity:1;transform:scale(1)}}.rce-popup-header{align-items:center;box-sizing:border-box;display:flex;flex-direction:row;justify-content:space-between;padding:18px 8px}.rce-popup-content{box-sizing:border-box;font-size:14px;padding:8px}.rce-popup-content *{margin:0}.rce-popup-footer{align-items:center;box-sizing:border-box;display:flex;flex-direction:row;justify-content:flex-end;padding:18px 8px}.rce-popup-footer>*{margin-left:5px} \ No newline at end of file diff --git a/dist/main.es.js b/dist/main.es.js new file mode 100644 index 00000000..9641533e --- /dev/null +++ b/dist/main.es.js @@ -0,0 +1,21 @@ +import{jsx as t,jsxs as e,Fragment as n}from"react/jsx-runtime";import r,{useMemo as o,useCallback as i,useEffect as a,useState as c,Component as s,forwardRef as l,PureComponent as u,createRef as d,isValidElement as p,cloneElement as h,useRef as f,createElement as v}from"react";var m={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},g=r.createContext&&r.createContext(m),y=function(){return y=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{var t={720:(t,e,n)=>{n.r(e),n.d(e,{Scene:()=>re,Tweenable:()=>wt,interpolate:()=>Qt,processTweens:()=>pt,setBezierFunction:()=>ie,shouldScheduleUpdate:()=>vt,tween:()=>Ot,unsetBezierFunction:()=>ae});var r={};n.r(r),n.d(r,{bounce:()=>I,bouncePast:()=>R,easeFrom:()=>V,easeFromTo:()=>z,easeInBack:()=>P,easeInCirc:()=>k,easeInCubic:()=>u,easeInExpo:()=>_,easeInOutBack:()=>j,easeInOutCirc:()=>E,easeInOutCubic:()=>p,easeInOutExpo:()=>x,easeInOutQuad:()=>l,easeInOutQuart:()=>v,easeInOutQuint:()=>y,easeInOutSine:()=>O,easeInQuad:()=>c,easeInQuart:()=>h,easeInQuint:()=>m,easeInSine:()=>b,easeOutBack:()=>N,easeOutBounce:()=>M,easeOutCirc:()=>S,easeOutCubic:()=>d,easeOutExpo:()=>C,easeOutQuad:()=>s,easeOutQuart:()=>f,easeOutQuint:()=>g,easeOutSine:()=>w,easeTo:()=>B,elastic:()=>L,linear:()=>a,swingFrom:()=>D,swingFromTo:()=>A,swingTo:()=>F});var o={};n.r(o),n.d(o,{afterTween:()=>Wt,beforeTween:()=>Ht,doesApply:()=>Bt,tweenCreated:()=>Ut}); +/*! + * All equations are adapted from Thomas Fuchs' + * [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js). + * + * Based on Easing Equations (c) 2003 [Robert + * Penner](http://www.robertpenner.com/), all rights reserved. This work is + * [subject to terms](http://www.robertpenner.com/easing_terms_of_use.html). + */ +/*! + * TERMS OF USE - EASING EQUATIONS + * Open source under the BSD License. + * Easing Equations (c) 2003 Robert Penner, all rights reserved. + */ +var i,a=function(t){return t},c=function(t){return Math.pow(t,2)},s=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},u=function(t){return Math.pow(t,3)},d=function(t){return Math.pow(t-1,3)+1},p=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},h=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},v=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},m=function(t){return Math.pow(t,5)},g=function(t){return Math.pow(t-1,5)+1},y=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},b=function(t){return 1-Math.cos(t*(Math.PI/2))},w=function(t){return Math.sin(t*(Math.PI/2))},O=function(t){return-.5*(Math.cos(Math.PI*t)-1)},_=function(t){return 0===t?0:Math.pow(2,10*(t-1))},C=function(t){return 1===t?1:1-Math.pow(2,-10*t)},x=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},k=function(t){return-(Math.sqrt(1-t*t)-1)},S=function(t){return Math.sqrt(1-Math.pow(t-1,2))},E=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},M=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},N=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},j=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},L=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},A=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},F=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},z=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},V=function(t){return Math.pow(t,4)},B=function(t){return Math.pow(t,.25)};function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(t,e){for(var n=0;nc?c:e;t._hasEnded=s>=c;var l=i-(c-s),u=t._filters.length>0;if(t._hasEnded)return t._render(a,t._data,l),t.stop(!0);u&&t._applyFilter(et),s1&&void 0!==arguments[1]?arguments[1]:Y,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=W(e);if(lt[e])return lt[e];if(r===ot||r===rt)for(var o in t)n[o]=e;else for(var i in t)n[i]=e[i]||Y;return n},yt=function(t){t===ct?(ct=t._next)?ct._previous=null:st=null:t===st?(st=t._previous)?st._next=null:ct=null:($=t._previous,Q=t._next,$._next=Q,Q._previous=$),t._previous=t._next=null},bt="function"==typeof Promise?Promise:null;i=Symbol.toStringTag;var wt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;U(this,t),q(this,i,"Promise"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=at,this._render=at,this._promiseCtor=bt,n&&this.setConfig(n)}var e,n,r;return e=t,n=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var n=this._filters[e-e][t];n&&n(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this._config;for(var r in e)n[r]=e[r];var o=n.promise,i=void 0===o?this._promiseCtor:o,a=n.start,c=void 0===a?at:a,s=n.finish,l=n.render,u=void 0===l?this._config.step||at:l,d=n.step,p=void 0===d?at:d;this._data=n.data||n.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=c,this._render=u||p,this._duration=n.duration||500,this._promiseCtor=i,s&&(this._resolve=s);var h=e.from,f=e.to,v=void 0===f?{}:f,m=this._currentState,g=this._originalState,y=this._targetState;for(var b in h)m[b]=h[b];var w=!1;for(var O in m){var _=m[O];w||W(_)!==ot||(w=!0),g[O]=_,y[O]=v.hasOwnProperty(O)?v[O]:_}if(this._easing=gt(this._currentState,n.easing,this._easing),this._filters.length=0,w){for(var C in t.filters)t.filters[C].doesApply(this)&&this._filters.push(t.filters[C]);this._applyFilter(nt)}return this}},{key:"then",value:function(t,e){var n=this;return this._promise=new this._promiseCtor((function(t,e){n._resolve=t,n._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"finally",value:function(t){return this.then().finally(t)}},{key:"get",value:function(){return J({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,yt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===ct?(ct=this,st=this):(this._previous=st,st._next=this,st=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var n=t.now();return this._timestamp+e===0||(this._timestamp=n-e,dt(this,n)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,yt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(et),ut(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(X),this._applyFilter(tt))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,n=this._data,r=this._isPlaying;return r?(this._reject&&this._reject({data:n,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"hasEnded",value:function(){return this._hasEnded}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=J({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}],n&&H(e.prototype,n),r&&H(e,r),t}();function Ot(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new wt;return e.tween(t),e.tweenable=e,e}q(wt,"now",(function(){return G})),q(wt,"setScheduleFunction",(function(t){return it=t})),q(wt,"filters",{}),q(wt,"formulas",lt),vt(!0);var _t,Ct,xt=/(\d|-|\.)/,kt=/([^\-0-9.]+)/g,St=/[0-9.-]+/g,Et=(_t=St.source,Ct=/,\s*/.source,new RegExp("rgba?\\(".concat(_t).concat(Ct).concat(_t).concat(Ct).concat(_t,"(").concat(Ct).concat(_t,")?\\)"),"g")),Mt=/^.*\(/,Pt=/#([0-9]|[a-f]){3,6}/gi,Nt="VAL",Tt=function(t,e){return t.map((function(t,n){return"_".concat(e,"_").concat(n)}))};function jt(t){return parseInt(t,16)}var Lt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[jt(e.substr(0,2)),jt(e.substr(2,2)),jt(e.substr(4,2))]).join(","),")");var e},At=function(t,e,n){var r=e.match(t),o=e.replace(t,Nt);return r&&r.forEach((function(t){return o=o.replace(Nt,n(t))})),o},Dt=function(t){for(var e in t){var n=t[e];"string"==typeof n&&n.match(Pt)&&(t[e]=At(Pt,n,Lt))}},Ft=function(t){var e=t.match(St),n=e.slice(0,3).map(Math.floor),r=t.match(Mt)[0];if(3===e.length)return"".concat(r).concat(n.join(","),")");if(4===e.length)return"".concat(r).concat(n.join(","),",").concat(e[3],")");throw new Error("Invalid rgbChunk: ".concat(t))},It=function(t){return t.match(St)},Rt=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e],delete t[e]})),n},zt=function(t,e){return e.map((function(e){return t[e]}))},Vt=function(t,e){return e.forEach((function(e){return t=t.replace(Nt,+e.toFixed(4))})),t},Bt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Ut(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Dt),t._tokenData=function(t){var e,n,r={};for(var o in t){var i=t[o];"string"==typeof i&&(r[o]={formatString:(e=i,n=void 0,n=e.match(kt),n?(1===n.length||e.charAt(0).match(xt))&&n.unshift(""):n=["",""],n.join(Nt)),chunkNames:Tt(It(i),o)})}return r}(e)}function Ht(t){var e=t._currentState,n=t._originalState,r=t._targetState,o=t._easing,i=t._tokenData;!function(t,e){var n=function(n){var r=e[n].chunkNames,o=t[n];if("string"==typeof o){var i=o.split(" "),a=i[i.length-1];r.forEach((function(e,n){return t[e]=i[n]||a}))}else r.forEach((function(e){return t[e]=o}));delete t[n]};for(var r in e)n(r)}(o,i),[e,n,r].forEach((function(t){return function(t,e){var n=function(n){It(t[n]).forEach((function(r,o){return t[e[n].chunkNames[o]]=+r})),delete t[n]};for(var r in e)n(r)}(t,i)}))}function Wt(t){var e=t._currentState,n=t._originalState,r=t._targetState,o=t._easing,i=t._tokenData;[e,n,r].forEach((function(t){return function(t,e){for(var n in e){var r=e[n],o=r.chunkNames,i=r.formatString,a=Vt(i,zt(Rt(t,o),o));t[n]=At(Et,a,Ft)}}(t,i)})),function(t,e){for(var n in e){var r=e[n].chunkNames,o=t[r[0]];t[n]="string"==typeof o?r.map((function(e){var n=t[e];return delete t[e],n})).join(" "):o}}(o,i)}function Kt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function Jt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,i=Jt({},t),a=gt(t,r);for(var c in Gt._filters.length=0,Gt.set({}),Gt._currentState=i,Gt._originalState=t,Gt._targetState=e,Gt._easing=a,$t)$t[c].doesApply(Gt)&&Gt._filters.push($t[c]);Gt._applyFilter("tweenCreated"),Gt._applyFilter("beforeTween");var s=ut(n,i,t,e,1,o,a);return Gt._applyFilter("afterTween"),s};function Yt(t){return function(t){if(Array.isArray(t))return Zt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Zt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zt(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0?t:0-t};return s=1-(u=3*e)-(l=3*(r-e)-u),d=1-(h=3*n)-(p=3*(o-n)-h),a=t,c=function(t){return 1/(200*t)}(i),function(t){return((d*t+p)*t+h)*t}(function(t,e){var n,r,o,i,a,c;for(o=t,c=0;c<8;c++){if(i=f(o)-t,m(i)(r=1))return r;for(;ni?n=o:r=o,o=.5*(r-n)+n}return o}(a,c))}var ie=function(t,e,n,r,o){var i=function(t,e,n,r){return function(o){return oe(o,t,e,n,r,1)}}(e,n,r,o);return i.displayName=t,i.x1=e,i.y1=n,i.x2=r,i.y2=o,wt.formulas[t]=i},ae=function(t){return delete wt.formulas[t]};wt.filters.token=o}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(720)})()},j.exports=N();var L="Webkit Moz O ms".split(" ");function A(t,e,n){for(var r=t.style,o=0;ot.strokeWidth&&(e=t.trailWidth);var n=50-e/2;return et.render(this._pathTemplate,{radius:n,"2radius":2*n})},nt.prototype._trailString=function(t){return this._pathString(t)};var rt=nt,ot=$,it=rt,at=R,ct=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,ot.apply(this,arguments)};(ct.prototype=new ot).constructor=ct,ct.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},ct.prototype._initializeTextContainer=function(t,e,n){t.text.style&&(n.style.top="auto",n.style.bottom="0",t.text.alignToBottom?at.setStyle(n,"transform","translate(-50%, 0)"):at.setStyle(n,"transform","translate(-50%, 50%)"))},ct.prototype._pathString=it.prototype._pathString,ct.prototype._trailString=it.prototype._trailString;var st=ct,lt=$,ut=R,dt=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",lt.apply(this,arguments)};(dt.prototype=new lt).constructor=dt,dt.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return ut.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},dt.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return ut.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})};var pt,ht,ft={Line:X,Circle:rt,SemiCircle:st,Square:dt,Path:W,Shape:$,utils:R},vt=function(e){var n=e.animate,r=e.progressOptions,c=e.className,s=o((function(){return pt=document.createElement("div"),new ft.Circle(pt,r)}),[]),l=i((function(t){t&&t.appendChild(pt)}),[]);return a((function(){s.animate(n)}),[n,s]),t("div",{className:c,ref:l})},mt=function(){return mt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=Zt[o]&&o(0==(o*=2)?9:1)&&(o+=1),e(t,o,r)[n].replace("%s",t.toString())}(r,function(t){return Qt[t]||Qt.en_US}(e))};Yt("en_US",(function(t,e){if(0===e)return["just now","right now"];var n=Gt[Math.floor(e/2)];return t>1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]})),Yt("zh_CN",(function(t,e){if(0===e)return["刚刚","片刻后"];var n=$t[~~(e/2)];return[t+" "+n+"前",t+" "+n+"后"]}));var ee=function(){return ee=Object.assign||function(t){for(var e,n=1,r=arguments.length;n>8*n&255;r+=("00"+(o=o%150+50).toString(16)).substr(-2)}return r}(u.letterItem.id)}},{children:t("span",ee({className:"rce-avatar-letter"},{children:u.letterItem.letter}))})):t("img",{alt:u.alt,src:h,onError:u.onError,className:Ot("rce-avatar",{"rce-avatar-lazy":f})}),u.sideElement]}))},oe=function(){return oe=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&t("div",{children:t(le,{animationType:"bottom",animationPosition:"norteast",buttonProps:{className:"rce-mtmg-right-icon",icon:{component:t(qt,{}),size:24}},items:l,onSelect:v})})]})),t("div",ue({className:"rce-mtmg-body-bottom",onClick:function(){b(!y)}},{children:e("div",!0===y?ue({className:"rce-mtmg-bottom--tptitle"},{children:[t(x,{}),t("span",{children:s})]}):ue({className:"rce-mtmg-body-bottom--bttitle"},{children:[t(k,{}),e("span",{children:[null==u?void 0:u.slice(0,w).map((function(t){return t.title||"Unknow"})).join(", "),u&&w&&u.length>w&&", +".concat(u.length-w)]})]}))})),t("div",ue({className:Ot("rce-mtmg-toogleContent",{"rce-mtmg-toogleContent--click":!0===y})},{children:d&&d.map((function(n,r){return e("div",{children:[!n.event&&e("div",ue({className:"rce-mitem"},{children:[t("div",ue({className:Ot("rce-mitem avatar",{"rce-mitem no-avatar":!n.avatar})},{children:n.avatar?t(re,{src:n.avatar}):t(Dt,{})})),e("div",ue({className:"rce-mitem-body"},{children:[e("div",ue({className:"rce-mitem-body--top"},{children:[t("div",ue({className:"rce-mitem-body--top-title",onClick:function(t){return e=n,o=r,i=t,void(h instanceof Function&&h(e,o,i));var e,o,i}},{children:n.title})),t("div",ue({className:"rce-mitem-body--top-time"},{children:n.dateString?n.dateString:n.date&&n.date&&te(n.date)}))]})),t("div",ue({className:"rce-mitem-body--bottom"},{children:t("div",ue({className:"rce-mitem-body--bottom-title"},{children:n.message}))}))]}))]})),n.event&&t("div",ue({className:"rce-mitem-event"},{children:e("div",ue({className:"rce-mitem-bottom-body"},{children:[t("div",ue({className:"rce-mitem-body avatar"},{children:t(Lt,{})})),e("div",ue({className:"rce-mitem-bottom-body-top"},{children:[n.event.title,t("div",ue({className:"rce-mitem-body--top-time"},{children:n.dateString?n.dateString:n.date&&te(n.date)})),t("div",ue({className:"rce-mitem-avatar-content"},{children:e("div",ue({className:"rce-mitem-avatar"},{children:[n.event.avatars&&n.event.avatars.slice(0,n.event.avatarsLimit).map((function(e,n){return t(re,{src:e.src},n)})),n.event.avatars&&n.event.avatarsLimit&&n.event.avatars.length>n.event.avatarsLimit&&t("div",ue({className:"rce-mitem-length rce-mitem-tooltip",tooltip:n.event.avatars.slice(n.event.avatarsLimit,n.event.avatars.length).map((function(t){return t.title})).join(",").toString()},{children:t("span",ue({className:"rce-mitem-tooltip-text"},{children:"+"+(n.event.avatars.length-n.event.avatarsLimit)}))}))]}))})),n.record&&t("div",ue({className:"rce-mtmg-call-record"},{children:e("div",ue({className:"rce-mtmg-call-body"},{children:[e("div",ue({onClick:function(t){return e=n,o=r,i=t,void(f instanceof Function&&f(e,o,i));var e,o,i},className:"rce-mtmg-call-avatars"},{children:[t(re,{className:"rce-mtmg-call-avatars",src:n.record.avatar}),t("div",ue({className:"rce-mtmg-record-time"},{children:n.record.time}))]})),e("div",ue({className:"rce-mtmg-call-body-title"},{children:[t("span",{children:n.record.title}),t("div",ue({className:"rce-mtmg-call-body-bottom"},{children:n.record.savedBy}))]}))]}))}))]}))]}))}))]},r)}))}))]}))}))},he=function(){return he=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),n=o.pop(),i={provider:o.length>0?o[0]:r,prefix:n,name:t};return e&&!Ne(i)?null:i}const i=o[0],a=i.split("-");if(a.length>1){const t={provider:r,prefix:a.shift(),name:a.join("-")};return e&&!Ne(t)?null:t}if(n&&""===r){const t={provider:r,prefix:"",name:i};return e&&!Ne(t,n)?null:t}return null},Ne=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(Se)||!(e&&""===t.prefix||t.prefix.match(Se))||!t.name.match(Se));function Te(t,e,n=!1){const r=function e(n,r){if(void 0!==t.icons[n])return Object.assign({},t.icons[n]);if(r>5)return null;const o=t.aliases;if(o&&void 0!==o[n]){const t=o[n],i=e(t.parent,r+1);return i?function(t,e){const n={...t};for(const t in Ee){const r=t;if(void 0!==e[r]){const t=e[r];if(void 0===n[r]){n[r]=t;continue}switch(r){case"rotate":n[r]=(n[r]+t)%4;break;case"hFlip":case"vFlip":n[r]=t!==n[r];break;default:n[r]=t}}}return n}(i,t):i}const i=t.chars;return!r&&i&&void 0!==i[n]?e(i[n],r+1):null}(e,0);if(r)for(const e in Ee)void 0===r[e]&&void 0!==t[e]&&(r[e]=t[e]);return r&&n?Me(r):r}function je(t,e,n){n=n||{};const r=[];if("object"!=typeof t||"object"!=typeof t.icons)return r;t.not_found instanceof Array&&t.not_found.forEach((t=>{e(t,null),r.push(t)}));const o=t.icons;Object.keys(o).forEach((n=>{const o=Te(t,n,!0);o&&(e(n,o),r.push(n))}));const i=n.aliases||"all";if("none"!==i&&"object"==typeof t.aliases){const n=t.aliases;Object.keys(n).forEach((o=>{if("variations"===i&&function(t){for(const e in Ee)if(void 0!==t[e])return!0;return!1}(n[o]))return;const a=Te(t,o,!0);a&&(e(o,a),r.push(o))}))}return r}const Le={provider:"string",aliases:"object",not_found:"object"};for(const t in Ee)Le[t]=typeof Ee[t];function Ae(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;for(const e in Le)if(void 0!==t[e]&&typeof t[e]!==Le[e])return null;const n=e.icons;for(const t in n){const e=n[t];if(!t.match(Se)||"string"!=typeof e.body)return null;for(const t in Ee)if(void 0!==e[t]&&typeof e[t]!=typeof Ee[t])return null}const r=e.aliases;if(r)for(const t in r){const e=r[t],o=e.parent;if(!t.match(Se)||"string"!=typeof o||!n[o]&&!r[o])return null;for(const t in Ee)if(void 0!==e[t]&&typeof e[t]!=typeof Ee[t])return null}return e}let De=Object.create(null);try{const t=window||self;t&&1===t._iconifyStorage.version&&(De=t._iconifyStorage.storage)}catch(t){}function Fe(t,e){void 0===De[t]&&(De[t]=Object.create(null));const n=De[t];return void 0===n[e]&&(n[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:Object.create(null)}}(t,e)),n[e]}function Ie(t,e){if(!Ae(e))return[];const n=Date.now();return je(e,((e,r)=>{r?t.icons[e]=r:t.missing[e]=n}))}let Re=!1;function ze(t){return"boolean"==typeof t&&(Re=t),Re}function Ve(t,e){const n=Pe(t,!0,Re);if(!n)return!1;return function(t,e,n){try{if("string"==typeof n.body)return t.icons[e]=Object.freeze(Me(n)),!0}catch(t){}return!1}(Fe(n.provider,n.prefix),n.name,e)}const Be=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});const Ue=/(-?[0-9.]*[0-9]+[0-9.]*)/g,He=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function We(t,e,n){if(1===e)return t;if(n=void 0===n?100:n,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const r=t.split(Ue);if(null===r||!r.length)return t;const o=[];let i=r.shift(),a=He.test(i);for(;;){if(a){const t=parseFloat(i);isNaN(t)?o.push(i):o.push(Math.ceil(t*e*n)/n)}else o.push(i);if(i=r.shift(),void 0===i)return o.join("");a=!a}}function Ke(t){let e="";switch(t.hAlign){case"left":e+="xMin";break;case"right":e+="xMax";break;default:e+="xMid"}switch(t.vAlign){case"top":e+="YMin";break;case"bottom":e+="YMax";break;default:e+="YMid"}return e+=t.slice?" slice":" meet",e}const Je=/\sid="(\S+)"/g,qe="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let Ge=0;function $e(t,e=qe){const n=[];let r;for(;r=Je.exec(t);)n.push(r[1]);return n.length?(n.forEach((n=>{const r="function"==typeof e?e(n):e+(Ge++).toString(),o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+"$3")})),t):t}const Qe=Object.create(null);function Ye(t){return Qe[t]||Qe[""]}function Ze(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:void 0===t.path?"/":t.path,maxURL:t.maxURL?t.maxURL:500,rotate:t.rotate?t.rotate:750,timeout:t.timeout?t.timeout:5e3,random:!0===t.random,index:t.index?t.index:0,dataAfterTimeout:!1!==t.dataAfterTimeout}}const Xe=Object.create(null),tn=["https://api.simplesvg.com","https://api.unisvg.com"],en=[];for(;tn.length>0;)1===tn.length||Math.random()>.5?en.push(tn.shift()):en.push(tn.pop());function nn(t,e){const n=Ze(e);return null!==n&&(Xe[t]=n,!0)}function rn(t){return Xe[t]}Xe[""]=Ze({resources:["https://api.iconify.design"].concat(en)});const on=(t,e)=>{let n=t,r=-1!==n.indexOf("?");return Object.keys(e).forEach((t=>{let o;try{o=function(t){switch(typeof t){case"boolean":return t?"true":"false";case"number":case"string":return encodeURIComponent(t);default:throw new Error("Invalid parameter")}}(e[t])}catch(t){return}n+=(r?"&":"?")+encodeURIComponent(t)+"="+o,r=!0})),n},an={},cn={};let sn=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(t){}return null})();const ln={prepare:(t,e,n)=>{const r=[];let o=an[e];void 0===o&&(o=function(t,e){const n=rn(t);if(!n)return 0;let r;if(n.maxURL){let t=0;n.resources.forEach((e=>{const n=e;t=Math.max(t,n.length)}));const o=on(e+".json",{icons:""});r=n.maxURL-t-n.path.length-o.length}else r=0;const o=t+":"+e;return cn[t]=n.path,an[o]=r,r}(t,e));const i="icons";let a={type:i,provider:t,prefix:e,icons:[]},c=0;return n.forEach(((n,s)=>{c+=n.length+1,c>=o&&s>0&&(r.push(a),a={type:i,provider:t,prefix:e,icons:[]},c=n.length),a.icons.push(n)})),r.push(a),r},send:(t,e,n)=>{if(!sn)return void n("abort",424);let r=function(t){if("string"==typeof t){if(void 0===cn[t]){const e=rn(t);if(!e)return"/";cn[t]=e.path}return cn[t]}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,n=e.icons.join(",");r+=on(t+".json",{icons:n});break}case"custom":{const t=e.uri;r+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void n("abort",400)}let o=503;sn(t+r).then((t=>{const e=t.status;if(200===e)return o=501,t.json();setTimeout((()=>{n(function(t){return 404===t}(e)?"abort":"next",e)}))})).then((t=>{"object"==typeof t&&null!==t?setTimeout((()=>{n("success",t)})):setTimeout((()=>{n("next",o)}))})).catch((()=>{n("next",o)}))}};const un=Object.create(null),dn=Object.create(null);function pn(t,e){t.forEach((t=>{const n=t.provider;if(void 0===un[n])return;const r=un[n],o=t.prefix,i=r[o];i&&(r[o]=i.filter((t=>t.id!==e)))}))}let hn=0;var fn={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function vn(t,e,n,r){const o=t.resources.length,i=t.random?Math.floor(Math.random()*o):t.index;let a;if(t.random){let e=t.resources.slice(0);for(a=[];e.length>1;){const t=Math.floor(Math.random()*e.length);a.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}a=a.concat(e)}else a=t.resources.slice(i).concat(t.resources.slice(0,i));const c=Date.now();let s,l="pending",u=0,d=null,p=[],h=[];function f(){d&&(clearTimeout(d),d=null)}function v(){"pending"===l&&(l="aborted"),f(),p.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),p=[]}function m(t,e){e&&(h=[]),"function"==typeof t&&h.push(t)}function g(){l="failed",h.forEach((t=>{t(void 0,s)}))}function y(){p.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),p=[]}function b(){if("pending"!==l)return;f();const r=a.shift();if(void 0===r)return p.length?void(d=setTimeout((()=>{f(),"pending"===l&&(y(),g())}),t.timeout)):void g();const o={status:"pending",resource:r,callback:(e,n)=>{!function(e,n,r){const o="success"!==n;switch(p=p.filter((t=>t!==e)),l){case"pending":break;case"failed":if(o||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return s=r,void g();if(o)return s=r,void(p.length||(a.length?b():g()));if(f(),y(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}l="completed",h.forEach((t=>{t(r)}))}(o,e,n)}};p.push(o),u++,d=setTimeout(b,t.rotate),n(r,e,o.callback)}return"function"==typeof r&&h.push(r),setTimeout(b),function(){return{startTime:c,payload:e,status:l,queriesSent:u,queriesPending:p.length,subscribe:m,abort:v}}}function mn(t){const e=function(t){if(!("object"==typeof t&&"object"==typeof t.resources&&t.resources instanceof Array&&t.resources.length))throw new Error("Invalid Reduncancy configuration");const e=Object.create(null);let n;for(n in fn)void 0!==t[n]?e[n]=t[n]:e[n]=fn[n];return e}(t);let n=[];function r(){n=n.filter((t=>"pending"===t().status))}const o={query:function(t,o,i){const a=vn(e,t,o,((t,e)=>{r(),i&&i(t,e)}));return n.push(a),a},find:function(t){const e=n.find((e=>t(e)));return void 0!==e?e:null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:r};return o}function gn(){}const yn=Object.create(null);function bn(t,e,n){let r,o;if("string"==typeof t){const e=Ye(t);if(!e)return n(void 0,424),gn;o=e.send;const i=function(t){if(void 0===yn[t]){const e=rn(t);if(!e)return;const n={config:e,redundancy:mn(e)};yn[t]=n}return yn[t]}(t);i&&(r=i.redundancy)}else{const e=Ze(t);if(e){r=mn(e);const n=Ye(t.resources?t.resources[0]:"");n&&(o=n.send)}}return r&&o?r.query(e,o,n)().abort:(n(void 0,424),gn)}const wn={};function On(){}const _n=Object.create(null),Cn=Object.create(null),xn=Object.create(null),kn=Object.create(null);function Sn(t,e){void 0===xn[t]&&(xn[t]=Object.create(null));const n=xn[t];n[e]||(n[e]=!0,setTimeout((()=>{n[e]=!1,function(t,e){void 0===dn[t]&&(dn[t]=Object.create(null));const n=dn[t];n[e]||(n[e]=!0,setTimeout((()=>{if(n[e]=!1,void 0===un[t]||void 0===un[t][e])return;const r=un[t][e].slice(0);if(!r.length)return;const o=Fe(t,e);let i=!1;r.forEach((n=>{const r=n.icons,a=r.pending.length;r.pending=r.pending.filter((n=>{if(n.prefix!==e)return!0;const a=n.name;if(void 0!==o.icons[a])r.loaded.push({provider:t,prefix:e,name:a});else{if(void 0===o.missing[a])return i=!0,!0;r.missing.push({provider:t,prefix:e,name:a})}return!1})),r.pending.length!==a&&(i||pn([{provider:t,prefix:e}],n.id),n.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),n.abort))}))})))}(t,e)})))}const En=Object.create(null);function Mn(t,e,n){void 0===Cn[t]&&(Cn[t]=Object.create(null));const r=Cn[t];void 0===kn[t]&&(kn[t]=Object.create(null));const o=kn[t];void 0===_n[t]&&(_n[t]=Object.create(null));const i=_n[t];void 0===r[e]?r[e]=n:r[e]=r[e].concat(n).sort(),o[e]||(o[e]=!0,setTimeout((()=>{o[e]=!1;const n=r[e];delete r[e];const a=Ye(t);if(!a)return void function(){const n=(""===t?"":"@"+t+":")+e,r=Math.floor(Date.now()/6e4);En[n]{bn(t,n,((r,o)=>{const a=Fe(t,e);if("object"!=typeof r){if(404!==o)return;const t=Date.now();n.icons.forEach((e=>{a.missing[e]=t}))}else try{const n=Ie(a,r);if(!n.length)return;const o=i[e];n.forEach((t=>{delete o[t]})),wn.store&&wn.store(t,r)}catch(t){console.error(t)}Sn(t,e)}))}))})))}const Pn=(t,e)=>{const n=function(t,e=!0,n=!1){const r=[];return t.forEach((t=>{const o="string"==typeof t?Pe(t,!1,n):t;e&&!Ne(o,n)||r.push({provider:o.provider,prefix:o.prefix,name:o.name})})),r}(t,!0,ze()),r=function(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort(((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name)));let r={provider:"",prefix:"",name:""};return t.forEach((t=>{if(r.name===t.name&&r.prefix===t.prefix&&r.provider===t.provider)return;r=t;const o=t.provider,i=t.prefix,a=t.name;void 0===n[o]&&(n[o]=Object.create(null));const c=n[o];void 0===c[i]&&(c[i]=Fe(o,i));const s=c[i];let l;l=void 0!==s.icons[a]?e.loaded:""===i||void 0!==s.missing[a]?e.missing:e.pending;const u={provider:o,prefix:i,name:a};l.push(u)})),e}(n);if(!r.pending.length){let t=!0;return e&&setTimeout((()=>{t&&e(r.loaded,r.missing,r.pending,On)})),()=>{t=!1}}const o=Object.create(null),i=[];let a,c;r.pending.forEach((t=>{const e=t.provider,n=t.prefix;if(n===c&&e===a)return;a=e,c=n,i.push({provider:e,prefix:n}),void 0===_n[e]&&(_n[e]=Object.create(null));const r=_n[e];void 0===r[n]&&(r[n]=Object.create(null)),void 0===o[e]&&(o[e]=Object.create(null));const s=o[e];void 0===s[n]&&(s[n]=[])}));const s=Date.now();return r.pending.forEach((t=>{const e=t.provider,n=t.prefix,r=t.name,i=_n[e][n];void 0===i[r]&&(i[r]=s,o[e][n].push(r))})),i.forEach((t=>{const e=t.provider,n=t.prefix;o[e][n].length&&Mn(e,n,o[e][n])})),e?function(t,e,n){const r=hn++,o=pn.bind(null,n,r);if(!e.pending.length)return o;const i={id:r,icons:e,callback:t,abort:o};return n.forEach((t=>{const e=t.provider,n=t.prefix;void 0===un[e]&&(un[e]=Object.create(null));const r=un[e];void 0===r[n]&&(r[n]=[]),r[n].push(i)})),o}(e,r,i):On},Nn="iconify2",Tn="iconify",jn=Tn+"-count",Ln=Tn+"-version",An=36e5,Dn={local:!0,session:!0};let Fn=!1;const In={local:0,session:0},Rn={local:[],session:[]};let zn="undefined"==typeof window?{}:window;function Vn(t){const e=t+"Storage";try{if(zn&&zn[e]&&"number"==typeof zn[e].length)return zn[e]}catch(t){}return Dn[t]=!1,null}function Bn(t,e,n){try{return t.setItem(jn,n.toString()),In[e]=n,!0}catch(t){return!1}}function Un(t){const e=t.getItem(jn);if(e){const t=parseInt(e);return t||0}return 0}const Hn=()=>{if(Fn)return;Fn=!0;const t=Math.floor(Date.now()/An)-168;function e(e){const n=Vn(e);if(!n)return;const r=e=>{const r=Tn+e.toString(),o=n.getItem(r);if("string"!=typeof o)return!1;let i=!0;try{const e=JSON.parse(o);if("object"!=typeof e||"number"!=typeof e.cached||e.cached0}}catch(t){i=!1}return i||n.removeItem(r),i};try{const t=n.getItem(Ln);if(t!==Nn)return t&&function(t){try{const e=Un(t);for(let n=0;n=0;t--)r(t)||(t===o-1?o--:Rn[e].push(t));Bn(n,e,o)}catch(t){}}for(const t in Dn)e(t)},Wn=(t,e)=>{function n(n){if(!Dn[n])return!1;const r=Vn(n);if(!r)return!1;let o=Rn[n].shift();if(void 0===o&&(o=In[n],!Bn(r,n,o+1)))return!1;try{const n={cached:Math.floor(Date.now()/An),provider:t,data:e};r.setItem(Tn+o.toString(),JSON.stringify(n))}catch(t){return!1}return!0}Fn||Hn(),Object.keys(e.icons).length&&(e.not_found&&delete(e=Object.assign({},e)).not_found,n("local")||n("session"))},Kn=/[\s,]+/;function Jn(t,e){e.split(Kn).forEach((e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}}))}function qn(t,e){e.split(Kn).forEach((e=>{const n=e.trim();switch(n){case"left":case"center":case"right":t.hAlign=n;break;case"top":case"middle":case"bottom":t.vAlign=n;break;case"slice":case"crop":t.slice=!0;break;case"meet":t.slice=!1}}))}function Gn(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(t){for(;t<0;)t+=4;return t%4}if(""===n){const e=parseInt(t);return isNaN(e)?0:r(e)}if(n!==t){let e=0;switch(n){case"%":e=25;break;case"deg":e=90}if(e){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o/=e,o%1==0?r(o):0)}}return e}const $n={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img",style:{}},Qn={...Be,inline:!0},Yn=(t,e,n,o)=>{const i=n?Qn:Be,a=function(t,e){const n={};for(const r in t){const o=r;if(n[o]=t[o],void 0===e[o])continue;const i=e[o];switch(o){case"inline":case"slice":"boolean"==typeof i&&(n[o]=i);break;case"hFlip":case"vFlip":!0===i&&(n[o]=!n[o]);break;case"hAlign":case"vAlign":"string"==typeof i&&""!==i&&(n[o]=i);break;case"width":case"height":("string"==typeof i&&""!==i||"number"==typeof i&&i||null===i)&&(n[o]=i);break;case"rotate":"number"==typeof i&&(n[o]+=i)}}return n}(i,e),c="object"==typeof e.style&&null!==e.style?e.style:{},s={...$n,ref:o,style:c};for(let t in e){const n=e[t];if(void 0!==n)switch(t){case"icon":case"style":case"children":case"onLoad":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":a[t]=!0===n||"true"===n||1===n;break;case"flip":"string"==typeof n&&Jn(a,n);break;case"align":"string"==typeof n&&qn(a,n);break;case"color":c.color=n;break;case"rotate":"string"==typeof n?a[t]=Gn(n):"number"==typeof n&&(a[t]=n);break;case"ariaHidden":case"aria-hidden":!0!==n&&"true"!==n&&delete s["aria-hidden"];break;default:void 0===i[t]&&(s[t]=n)}}const l=function(t,e){const n={left:t.left,top:t.top,width:t.width,height:t.height};let r,o,i=t.body;[t,e].forEach((t=>{const e=[],r=t.hFlip,o=t.vFlip;let a,c=t.rotate;switch(r?o?c+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):o&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),c<0&&(c-=4*Math.floor(c/4)),c%=4,c){case 1:a=n.height/2+n.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:a=n.width/2+n.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}c%2==1&&(0===n.left&&0===n.top||(a=n.left,n.left=n.top,n.top=a),n.width!==n.height&&(a=n.width,n.width=n.height,n.height=a)),e.length&&(i=''+i+"")})),null===e.width&&null===e.height?(o="1em",r=We(o,n.width/n.height)):null!==e.width&&null!==e.height?(r=e.width,o=e.height):null!==e.height?(o=e.height,r=We(o,n.width/n.height)):(r=e.width,o=We(r,n.height/n.width)),"auto"===r&&(r=n.width),"auto"===o&&(o=n.height),r="string"==typeof r?r:r.toString()+"",o="string"==typeof o?o:o.toString()+"";const a={attributes:{width:r,height:o,preserveAspectRatio:Ke(e),viewBox:n.left.toString()+" "+n.top.toString()+" "+n.width.toString()+" "+n.height.toString()},body:i};return e.inline&&(a.inline=!0),a}(t,a);let u=0,d=e.id;"string"==typeof d&&(d=d.replace(/-/g,"_")),s.dangerouslySetInnerHTML={__html:$e(l.body,d?()=>d+"ID"+u++:"iconifyReact")};for(let t in l.attributes)s[t]=l.attributes[t];return l.inline&&void 0===c.verticalAlign&&(c.verticalAlign="-0.125em"),r.createElement("svg",s)};var Zn;if(ze(!0),Zn=ln,Qe[""]=Zn,"undefined"!=typeof document&&"undefined"!=typeof window){wn.store=Wn,Hn();const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach((t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e="string"==typeof t.provider?t.provider:""),Re&&""===e&&("string"!=typeof t.prefix||""===t.prefix)){let e=!1;return Ae(t)&&(t.prefix="",je(t,((t,n)=>{n&&Ve(t,n)&&(e=!0)}))),e}return!("string"!=typeof t.prefix||!Ne({provider:e,prefix:t.prefix,name:"a"}))&&!!Ie(Fe(e,t.prefix),t)}(t))&&console.error(n)}catch(t){console.error(n)}}))}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const n="IconifyProviders["+t+"] is invalid.";try{const r=e[t];if("object"!=typeof r||!r||void 0===r.resources)continue;nn(t,r)||console.error(n)}catch(t){console.error(n)}}}}class Xn extends r.Component{constructor(t){super(t),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(t){this.state.icon!==t&&this.setState({icon:t})}_checkIcon(t){const e=this.state,n=this.props.icon;if("object"==typeof n&&null!==n&&"string"==typeof n.body)return this._icon="",this._abortLoading(),void((t||null===e.icon)&&this._setData({data:Me(n)}));let r;if("string"!=typeof n||null===(r=Pe(n,!1,!0)))return this._abortLoading(),void this._setData(null);const o=function(t){const e="string"==typeof t?Pe(t,!0,Re):t;return e?function(t,e){const n=t.icons[e];return void 0===n?null:n}(Fe(e.provider,e.prefix),e.name):null}(r);if(null!==o){if(this._icon!==n||null===e.icon){this._abortLoading(),this._icon=n;const t=["iconify"];""!==r.prefix&&t.push("iconify--"+r.prefix),""!==r.provider&&t.push("iconify--"+r.provider),this._setData({data:o,classes:t}),this.props.onLoad&&this.props.onLoad(n)}}else this._loading&&this._loading.name===n||(this._abortLoading(),this._icon="",this._setData(null),this._loading={name:n,abort:Pn([r],this._checkIcon.bind(this,!1))})}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(t){t.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const t=this.props,e=this.state.icon;if(null===e)return t.children?t.children:r.createElement("span",{});let n=t;return e.classes&&(n={...t,className:("string"==typeof t.className?t.className+" ":"")+e.classes.join(" ")}),Yn(e.data,n,t._inline,t._ref)}}const tr=r.forwardRef((function(t,e){const n={...t,_ref:e,_inline:!1};return r.createElement(Xn,n)}));r.forwardRef((function(t,e){const n={...t,_ref:e,_inline:!0};return r.createElement(Xn,n)}));var er={body:'',width:24,height:24},nr={body:'',width:24,height:24},rr={body:'',width:24,height:24},or={body:'',width:24,height:24},ir={body:'',width:24,height:24},ar={body:'',width:24,height:24},cr={body:'',width:24,height:24},sr={body:'',width:24,height:24},lr={body:'',width:24,height:24},ur={body:'',width:24,height:24};function dr(){return dr=Object.assign?Object.assign.bind():function(t){for(var e=1;e9?t.toString():"0".concat(t)},vr=function(t,e,n){if(!isFinite(t))return null;var r=Math.floor(t/60),o=fr(r),i=fr(Math.floor(t%60)),a=fr(Math.floor(r%60)),c=Math.floor(r/60),s="".concat(o,":").concat(i),l="".concat(c,":").concat(a,":").concat(i);return"auto"===n?e>=3600?l:s:"mm:ss"===n?s:"hh:mm:ss"===n?l:void 0};function mr(t,e){var n=!1;return function(r){n||(t(r),n=!0,setTimeout((function(){return n=!1}),e))}}function gr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=xe(t);if(e){var o=xe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ce(this,n)}}var yr=function(t){_e(n,s);var e=gr(n);function n(){var t;ve(this,n);for(var r=arguments.length,o=new Array(r),i=0;ia&&(c=a),{currentTime:t.getDuration()*c/a,currentTimePos:"".concat((c/a*100).toFixed(2),"%")}})),ke(we(t),"handleContextMenu",(function(t){t.preventDefault()})),ke(we(t),"handleMouseDownOrTouchStartProgressBar",(function(e){e.stopPropagation();var n=t.getCurrentProgress(e.nativeEvent),r=n.currentTime,o=n.currentTimePos;isFinite(r)&&(t.timeOnMouseMove=r,t.setState({isDraggingProgress:!0,currentTimePos:o}),e.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.addEventListener("touchend",t.handleWindowMouseOrTouchUp)))})),ke(we(t),"handleWindowMouseOrTouchMove",(function(e){e instanceof MouseEvent&&e.preventDefault(),e.stopPropagation();var n=window.getSelection();if(n&&"Range"===n.type&&n.empty(),t.state.isDraggingProgress){var r=t.getCurrentProgress(e),o=r.currentTime,i=r.currentTimePos;t.timeOnMouseMove=o,t.setState({currentTimePos:i})}})),ke(we(t),"handleWindowMouseOrTouchUp",(function(e){e.stopPropagation();var n=t.timeOnMouseMove,r=t.props,o=r.audio,i=r.onChangeCurrentTimeError,a=r.onSeek;if(a)t.setState({isDraggingProgress:!1,waitingForSeekCallback:!0},(function(){a(o,n).then((function(){return t.setState({waitingForSeekCallback:!1})}),(function(t){throw new Error(t)}))}));else{var c={isDraggingProgress:!1};o.readyState!==o.HAVE_NOTHING&&o.readyState!==o.HAVE_METADATA&&isFinite(n)?o.currentTime=n:(c.currentTimePos="0%",i&&i()),t.setState(c)}e instanceof MouseEvent?(window.removeEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",t.handleWindowMouseOrTouchUp))})),ke(we(t),"handleAudioTimeUpdate",mr((function(e){var n=t.state.isDraggingProgress,r=e.target;if(!n&&!0!==t.state.waitingForSeekCallback){var o=r.currentTime,i=t.getDuration();t.setState({currentTimePos:"".concat((o/i*100||0).toFixed(2),"%")})}}),t.props.progressUpdateInterval)),ke(we(t),"handleAudioDownloadProgressUpdate",(function(e){for(var n=e.target,r=t.getDuration(),o=[],i=0;ii.width?(r=1,o="100%"):(r=c/a,o="".concat(c/a*100,"%")),{currentVolume:r,currentVolumePos:o}})),ke(we(t),"handleContextMenu",(function(t){t.preventDefault()})),ke(we(t),"handleClickVolumeButton",(function(){var e=t.props.audio;e.volume>0?(t.lastVolume=e.volume,e.volume=0):e.volume=t.lastVolume})),ke(we(t),"handleVolumnControlMouseOrTouchDown",(function(e){e.stopPropagation();var n=t.props.audio,r=t.getCurrentVolume(e.nativeEvent),o=r.currentVolume,i=r.currentVolumePos;n.volume=o,t.setState({isDraggingVolume:!0,currentVolumePos:i}),e.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.addEventListener("touchend",t.handleWindowMouseOrTouchUp))})),ke(we(t),"handleWindowMouseOrTouchMove",(function(e){e instanceof MouseEvent&&e.preventDefault(),e.stopPropagation();var n=t.props.audio,r=window.getSelection();if(r&&"Range"===r.type&&r.empty(),t.state.isDraggingVolume){var o=t.getCurrentVolume(e),i=o.currentVolume,a=o.currentVolumePos;n.volume=i,t.setState({currentVolumePos:a})}})),ke(we(t),"handleWindowMouseOrTouchUp",(function(e){e.stopPropagation(),t.setState({isDraggingVolume:!1}),e instanceof MouseEvent?(window.removeEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",t.handleWindowMouseOrTouchUp))})),ke(we(t),"handleAudioVolumeChange",(function(e){var n=t.state.isDraggingVolume,r=e.target.volume;(t.lastVolume>0&&0===r||0===t.lastVolume&&r>0)&&t.props.onMuteChange(),t.lastVolume=r,n||(t.setState({hasVolumeAnimation:!0,currentVolumePos:"".concat((r/1*100||0).toFixed(2),"%")}),clearTimeout(t.volumeAnimationTimer),t.volumeAnimationTimer=setTimeout((function(){t.setState({hasVolumeAnimation:!1})}),100))})),t}return be(n,[{key:"componentDidUpdate",value:function(){var t=this.props.audio;t&&!this.hasAddedAudioEventListener&&(this.audio=t,this.hasAddedAudioEventListener=!0,t.addEventListener("volumechange",this.handleAudioVolumeChange))}},{key:"componentWillUnmount",value:function(){this.audio&&this.hasAddedAudioEventListener&&this.audio.removeEventListener("volumechange",this.handleAudioVolumeChange),clearTimeout(this.volumeAnimationTimer)}},{key:"render",value:function(){var t=this.props,e=t.audio,n=t.showFilledVolume,o=t.i18nVolumeControl,i=this.state,a=i.currentVolumePos,c=i.hasVolumeAnimation,s=(e||{}).volume;return r.createElement("div",{ref:this.volumeBar,onMouseDown:this.handleVolumnControlMouseOrTouchDown,onTouchStart:this.handleVolumnControlMouseOrTouchDown,onContextMenu:this.handleContextMenu,role:"progressbar","aria-label":o,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Number((100*s).toFixed(0)),tabIndex:0,className:"rhap_volume-bar-area"},r.createElement("div",{className:"rhap_volume-bar"},r.createElement("div",{className:"rhap_volume-indicator",style:{left:a,transitionDuration:c?".1s":"0s"}}),n&&r.createElement("div",{className:"rhap_volume-filled",style:{width:a}})))}}]),n}();function Er(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=xe(t);if(e){var o=xe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return Ce(this,n)}}!function(t){t.CURRENT_TIME="CURRENT_TIME",t.CURRENT_LEFT_TIME="CURRENT_LEFT_TIME",t.PROGRESS_BAR="PROGRESS_BAR",t.DURATION="DURATION",t.ADDITIONAL_CONTROLS="ADDITIONAL_CONTROLS",t.MAIN_CONTROLS="MAIN_CONTROLS",t.VOLUME_CONTROLS="VOLUME_CONTROLS",t.LOOP="LOOP",t.VOLUME="VOLUME"}(kr||(kr={}));var Mr=function(t){_e(n,s);var e=Er(n);function n(){var t;ve(this,n);for(var o=arguments.length,i=new Array(o),a=0;a0?(t.lastVolume=e.volume,e.volume=0):e.volume=t.lastVolume})),ke(we(t),"handleMuteChange",(function(){t.forceUpdate()})),ke(we(t),"handleClickLoopButton",(function(){t.audio.current.loop=!t.audio.current.loop,t.forceUpdate()})),ke(we(t),"handleClickRewind",(function(){var e=t.props,n=e.progressJumpSteps,r=e.progressJumpStep,o=n.backward||r;t.setJumpTime(-o)})),ke(we(t),"handleClickForward",(function(){var e=t.props,n=e.progressJumpSteps,r=e.progressJumpStep,o=n.forward||r;t.setJumpTime(o)})),ke(we(t),"setJumpTime",(function(e){var n=t.audio.current,r=n.duration,o=n.currentTime;if(n.readyState===n.HAVE_NOTHING||n.readyState===n.HAVE_METADATA||!isFinite(r)||!isFinite(o))return t.props.onChangeCurrentTimeError&&t.props.onChangeCurrentTimeError();var i=o+e/1e3;i<0?(n.currentTime=0,i=0):i>r?(n.currentTime=r,i=r):n.currentTime=i})),ke(we(t),"setJumpVolume",(function(e){var n=t.audio.current.volume+e;n<0?n=0:n>1&&(n=1),t.audio.current.volume=n})),ke(we(t),"handleKeyDown",(function(e){if(t.props.hasDefaultKeyBindings)switch(e.key){case" ":e.target!==t.container.current&&e.target!==t.progressBar.current||(e.preventDefault(),t.togglePlay(e));break;case"ArrowLeft":t.handleClickRewind();break;case"ArrowRight":t.handleClickForward();break;case"ArrowUp":e.preventDefault(),t.setJumpVolume(t.props.volumeJumpStep);break;case"ArrowDown":e.preventDefault(),t.setJumpVolume(-t.props.volumeJumpStep);break;case"l":t.handleClickLoopButton();break;case"m":t.handleClickVolumeButton()}})),ke(we(t),"renderUIModules",(function(e){return e.map((function(e,n){return t.renderUIModule(e,n)}))})),ke(we(t),"renderUIModule",(function(e,n){var o=t.props,i=o.defaultCurrentTime,a=o.progressUpdateInterval,c=o.showDownloadProgress,s=o.showFilledProgress,l=o.showFilledVolume,u=o.defaultDuration,d=o.customIcons,f=o.showSkipControls,v=o.onClickPrevious,m=o.onClickNext,g=o.onChangeCurrentTimeError,y=o.showJumpControls,b=o.customAdditionalControls,w=o.customVolumeControls,O=o.muted,_=o.timeFormat,C=o.volume,x=o.loop,k=o.mse,S=o.i18nAriaLabels;switch(e){case kr.CURRENT_TIME:return r.createElement("div",{key:n,id:"rhap_current-time",className:"rhap_time rhap_current-time"},r.createElement(Or,{audio:t.audio.current,isLeftTime:!1,defaultCurrentTime:i,timeFormat:_}));case kr.CURRENT_LEFT_TIME:return r.createElement("div",{key:n,id:"rhap_current-left-time",className:"rhap_time rhap_current-left-time"},r.createElement(Or,{audio:t.audio.current,isLeftTime:!0,defaultCurrentTime:i,timeFormat:_}));case kr.PROGRESS_BAR:return r.createElement(br,{key:n,ref:t.progressBar,audio:t.audio.current,progressUpdateInterval:a,showDownloadProgress:c,showFilledProgress:s,onSeek:k&&k.onSeek,onChangeCurrentTimeError:g,srcDuration:k&&k.srcDuration,i18nProgressBar:S.progressControl});case kr.DURATION:return r.createElement("div",{key:n,className:"rhap_time rhap_total-time"},k&&k.srcDuration?vr(k.srcDuration,k.srcDuration,t.props.timeFormat):r.createElement(Cr,{audio:t.audio.current,defaultDuration:u,timeFormat:_}));case kr.ADDITIONAL_CONTROLS:return r.createElement("div",{key:n,className:"rhap_additional-controls"},t.renderUIModules(b));case kr.MAIN_CONTROLS:var E,M=t.isPlaying();return E=M?d.pause?d.pause:r.createElement(tr,{icon:nr}):d.play?d.play:r.createElement(tr,{icon:er}),r.createElement("div",{key:n,className:"rhap_main-controls"},f&&r.createElement("button",{"aria-label":S.previous,className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",type:"button",onClick:v},d.previous?d.previous:r.createElement(tr,{icon:rr})),y&&r.createElement("button",{"aria-label":S.rewind,className:"rhap_button-clear rhap_main-controls-button rhap_rewind-button",type:"button",onClick:t.handleClickRewind},d.rewind?d.rewind:r.createElement(tr,{icon:ar})),r.createElement("button",{"aria-label":M?S.pause:S.play,className:"rhap_button-clear rhap_main-controls-button rhap_play-pause-button",type:"button",onClick:t.togglePlay},E),y&&r.createElement("button",{"aria-label":S.forward,className:"rhap_button-clear rhap_main-controls-button rhap_forward-button",type:"button",onClick:t.handleClickForward},d.forward?d.forward:r.createElement(tr,{icon:ir})),f&&r.createElement("button",{"aria-label":S.next,className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",type:"button",onClick:m},d.next?d.next:r.createElement(tr,{icon:or})));case kr.VOLUME_CONTROLS:return r.createElement("div",{key:n,className:"rhap_volume-controls"},t.renderUIModules(w));case kr.LOOP:var P,N=t.audio.current?t.audio.current.loop:x;return P=N?d.loop?d.loop:r.createElement(tr,{icon:lr}):d.loopOff?d.loopOff:r.createElement(tr,{icon:ur}),r.createElement("button",{key:n,"aria-label":N?S.loop:S.loopOff,className:"rhap_button-clear rhap_repeat-button",type:"button",onClick:t.handleClickLoopButton},P);case kr.VOLUME:var T,j=(t.audio.current||{}).volume,L=void 0===j?O?0:C:j;return T=L?d.volume?d.volume:r.createElement(tr,{icon:cr}):d.volume?d.volumeMute:r.createElement(tr,{icon:sr}),r.createElement("div",{key:n,className:"rhap_volume-container"},r.createElement("button",{"aria-label":L?S.volume:S.volumeMute,onClick:t.handleClickVolumeButton,type:"button",className:"rhap_button-clear rhap_volume-button"},T),r.createElement(Sr,{audio:t.audio.current,volume:L,onMuteChange:t.handleMuteChange,showFilledVolume:l,i18nVolumeControl:S.volumeControl}));default:return p(e)?e.key?e:h(e,{key:n}):null}})),t}return be(n,[{key:"componentDidMount",value:function(){var t=this;this.forceUpdate();var e=this.audio.current;this.props.muted?e.volume=0:e.volume=this.lastVolume,e.addEventListener("error",(function(e){t.props.onError&&t.props.onError(e)})),e.addEventListener("canplay",(function(e){t.props.onCanPlay&&t.props.onCanPlay(e)})),e.addEventListener("canplaythrough",(function(e){t.props.onCanPlayThrough&&t.props.onCanPlayThrough(e)})),e.addEventListener("play",this.handlePlay),e.addEventListener("abort",this.handleAbort),e.addEventListener("ended",this.handleEnded),e.addEventListener("playing",(function(e){t.props.onPlaying&&t.props.onPlaying(e)})),e.addEventListener("seeking",(function(e){t.props.onSeeking&&t.props.onSeeking(e)})),e.addEventListener("seeked",(function(e){t.props.onSeeked&&t.props.onSeeked(e)})),e.addEventListener("waiting",(function(e){t.props.onWaiting&&t.props.onWaiting(e)})),e.addEventListener("emptied",(function(e){t.props.onEmptied&&t.props.onEmptied(e)})),e.addEventListener("stalled",(function(e){t.props.onStalled&&t.props.onStalled(e)})),e.addEventListener("suspend",(function(e){t.props.onSuspend&&t.props.onSuspend(e)})),e.addEventListener("loadstart",(function(e){t.props.onLoadStart&&t.props.onLoadStart(e)})),e.addEventListener("loadedmetadata",(function(e){t.props.onLoadedMetaData&&t.props.onLoadedMetaData(e)})),e.addEventListener("loadeddata",(function(e){t.props.onLoadedData&&t.props.onLoadedData(e)})),e.addEventListener("pause",this.handlePause),e.addEventListener("timeupdate",mr((function(e){t.props.onListen&&t.props.onListen(e)}),this.props.listenInterval)),e.addEventListener("volumechange",(function(e){t.props.onVolumeChange&&t.props.onVolumeChange(e)})),e.addEventListener("encrypted",(function(e){var n=t.props.mse;n&&n.onEcrypted&&n.onEcrypted(e)}))}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.src,r=e.autoPlayAfterSrcChange;t.src!==n&&(r?this.playAudioPromise():this.forceUpdate())}},{key:"render",value:function(){var t=this.props,e=t.className,n=t.src,o=t.loop,i=t.preload,a=t.autoPlay,c=t.crossOrigin,s=t.mediaGroup,l=t.header,u=t.footer,d=t.layout,p=t.customProgressBarSection,h=t.customControlsSection,f=t.children,v=t.style,m=t.i18nAriaLabels,g=this.audio.current?this.audio.current.loop:o,y=g?"rhap_loop--on":"rhap_loop--off",b=this.isPlaying()?"rhap_play-status--playing":"rhap_play-status--paused";return r.createElement("div",{role:"group",tabIndex:0,"aria-label":m.player,className:"rhap_container ".concat(y," ").concat(b," ").concat(e),onKeyDown:this.handleKeyDown,ref:this.container,style:v},r.createElement("audio",{src:n,controls:!1,loop:g,autoPlay:a,preload:i,crossOrigin:c,mediaGroup:s,ref:this.audio},f),l&&r.createElement("div",{className:"rhap_header"},l),r.createElement("div",{className:"rhap_main ".concat(pr(d))},r.createElement("div",{className:"rhap_progress-section"},this.renderUIModules(p)),r.createElement("div",{className:"rhap_controls-section"},this.renderUIModules(h))),u&&r.createElement("div",{className:"rhap_footer"},u))}}]),n}();ke(Mr,"defaultProps",{autoPlay:!1,autoPlayAfterSrcChange:!0,listenInterval:1e3,progressJumpStep:5e3,progressJumpSteps:{},volumeJumpStep:.1,loop:!1,muted:!1,preload:"auto",progressUpdateInterval:20,defaultCurrentTime:"--:--",defaultDuration:"--:--",timeFormat:"auto",volume:1,className:"",showJumpControls:!0,showSkipControls:!1,showDownloadProgress:!0,showFilledProgress:!0,showFilledVolume:!1,customIcons:{},customProgressBarSection:[kr.CURRENT_TIME,kr.PROGRESS_BAR,kr.DURATION],customControlsSection:[kr.ADDITIONAL_CONTROLS,kr.MAIN_CONTROLS,kr.VOLUME_CONTROLS],customAdditionalControls:[kr.LOOP],customVolumeControls:[kr.VOLUME],layout:"stacked",hasDefaultKeyBindings:!0,i18nAriaLabels:{player:"Audio player",progressControl:"Audio progress control",volumeControl:"Volume control",play:"Play",pause:"Pause",rewind:"Rewind",forward:"Forward",previous:"Previous",next:"Skip",loop:"Disable loop",loopOff:"Enable loop",volume:"Mute",volumeMute:"Unmute"}});var Pr=function(){return Pr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?t("span",{children:u}):null})),void 0!==g.customStatusComponents?g.customStatusComponents.map((function(e){return t(e,{})})):null]}))]}),"rce-citem-body")]]}))}),g.id)},Wr=function(){return Wr=Object.assign||function(t){for(var e,n=1,r=arguments.length;nu?!0!==y&&(b(!0),m(e)):!1!==y&&(b(!1),m(e)),p.onScroll instanceof Function&&p.onScroll(t)},className:"rce-mlist"},{children:p.dataSource.map((function(e,n){return t(Vr,Jr({},e,{onOpen:p.onOpen&&function(t){return function(t,e,n){p.onOpen instanceof Function&&p.onOpen(t,e,n)}(e,n,t)},onPhotoError:p.onPhotoError&&function(t){return function(t,e,n){p.onPhotoError instanceof Function&&p.onPhotoError(t,e,n)}(e,n,t)},onDownload:p.onDownload&&function(t){return function(t,e,n){p.onDownload instanceof Function&&p.onDownload(t,e,n)}(e,n,t)},onTitleClick:p.onTitleClick&&function(t){return function(t,e,n){p.onTitleClick instanceof Function&&p.onTitleClick(t,e,n)}(e,n,t)},onForwardClick:p.onForwardClick&&function(t){return function(t,e,n){p.onForwardClick instanceof Function&&p.onForwardClick(t,e,n)}(e,n,t)},onReplyClick:p.onReplyClick&&function(t){return function(t,e,n){p.onReplyClick instanceof Function&&p.onReplyClick(t,e,n)}(e,n,t)},onReplyMessageClick:p.onReplyMessageClick&&function(t){return function(t,e,n){p.onReplyMessageClick instanceof Function&&p.onReplyMessageClick(t,e,n)}(e,n,t)},onRemoveMessageClick:p.onRemoveMessageClick&&function(t){return function(t,e,n){p.onRemoveMessageClick instanceof Function&&p.onRemoveMessageClick(t,e,n)}(e,n,t)},onClick:p.onClick&&function(t){return function(t,e,n){p.onClick instanceof Function&&p.onClick(t,e,n)}(e,n,t)},onContextMenu:p.onContextMenu&&function(t){return function(t,e,n){p.onContextMenu instanceof Function&&p.onContextMenu(t,e,n)}(e,n,t)},onMeetingMoreSelect:p.onMeetingMoreSelect&&function(t){return function(t,e,n){p.onMeetingMoreSelect instanceof Function&&p.onMeetingMoreSelect(t,e,n)}(e,n,t)},onMessageFocused:p.onMessageFocused&&function(t){return function(t,e,n){p.onMessageFocused instanceof Function&&p.onMessageFocused(t,e,n)}(e,n,t)},onMeetingMessageClick:p.onMeetingMessageClick&&function(t){return function(t,e,n){p.onMeetingMessageClick instanceof Function&&p.onMeetingMessageClick(t,e,n)}(e,n,t)},onMeetingTitleClick:p.onMeetingTitleClick,onMeetingVideoLinkClick:p.onMeetingVideoLinkClick,onMeetingLinkClick:p.onMeetingLinkClick&&function(t){return function(t,e,n){p.onMeetingLinkClick instanceof Function&&p.onMeetingLinkClick(t,e,n)}(e,n,t)},actionButtons:p.actionButtons,styles:p.messageBoxStyles,notchStyle:p.notchStyle}),n)}))})),!0===d&&y&&"100%"!==u&&e("div",Jr({className:"rce-mlist-down-button",onClick:function(t){o&&(o.current.scrollTop=o.current.scrollHeight,p.onDownButtonClick instanceof Function&&p.onDownButtonClick(t))}},{children:[t(S,{}),void 0!==p.downButtonBadge?t("span",Jr({className:"rce-mlist-down-button--badge"},{children:p.downButtonBadge.toString()})):null]}))]}))},$r=function(){return $r=Object.assign||function(t){for(var e,n=1,r=arguments.length;ni?"...":"");return e("div",$r({className:Ot("rce-container-mtitem",S.className),onClick:c,onContextMenu:S.onContextMenu},{children:[t("audio",{autoPlay:!0,loop:!0,muted:b,src:S.audioSource}),e("div",$r({className:"rce-mtitem"},{children:[e("div",$r({className:"rce-mtitem-top"},{children:[t("div",$r({className:"rce-mtitem-subject"},{children:N})),t("div",$r({className:"rce-mtitem-share",onClick:k},{children:t(Wt,{})}))]})),e("div",$r({className:"rce-mtitem-body"},{children:[e("div",$r({className:"rce-mtitem-body--avatars"},{children:[null==g?void 0:g.slice(0,M).map((function(e,r){return t(re,{src:e.src,alt:e.alt,className:"encircle"===e.statusColorType?"rce-mtitem-avatar-encircle-status":"",size:"small",letterItem:e.letterItem,sideElement:e.statusColor?t("span",$r({className:"rce-mtitem-status",style:"encircle"===E?{boxShadow:"inset 0 0 0 2px ".concat(e.statusColor,", inset 0 0 0 5px #FFFFFF")}:{backgroundColor:e.statusColor}},{children:e.statusText})):t(n,{}),onError:O,lazyLoadingImage:h,type:Ot("circle",{flexible:l})},r)})),g&&M&&g.length>M&&t("div",$r({className:"rce-avatar-container circle small rce-mtitem-letter"},{children:t("span",{children:"+"+(g.length-M)})}))]})),e("div",$r({className:"rce-mtitem-body--functions"},{children:[S.closable&&t("div",$r({className:"rce-mtitem-closable",onClick:S.onCloseClick},{children:t(Bt,{})})),t("div",$r({className:"rce-mtitem-button",onClick:C},{children:t(Rt,{})}))]}))]})),t("div",$r({className:"rce-mtitem-footer"},{children:t("span",$r({className:"rce-mtitem-date"},{children:P}))}))]}))]}))},Zr=function(){return Zr=Object.assign||function(t){for(var e,n=1,r=arguments.length;nm.maxlength&&(m.onMaxLengthExceed instanceof Function&&m.onMaxLengthExceed(),(null===(n=null===(e=m.referance)||void 0===e?void 0:e.current)||void 0===n?void 0:n.value)==(t.target.value||"").substring(0,m.maxlength)))&&(m.onChange instanceof Function&&m.onChange(t),!0===c&&!0===h)){t.target.style.height!==l+"px"&&(t.target.style.height=l+"px");var r=void 0;r=t.target.scrollHeight<=d?t.target.scrollHeight+"px":d+"px",t.target.style.height!==r&&(t.target.style.height=r)}},y=function(){var t,e,n,r={FAKE_EVENT:!0,target:null===(t=m.referance)||void 0===t?void 0:t.current};(null===(n=null===(e=m.referance)||void 0===e?void 0:e.current)||void 0===n?void 0:n.value)&&(m.referance.current.value=""),g(r)};return e("div",to({className:Ot("rce-container-input",m.className)},{children:[m.leftButtons&&t("div",to({className:"rce-input-buttons"},{children:m.leftButtons})),!1===c?t("input",{ref:m.referance,type:o,className:Ot("rce-input"),placeholder:m.placeholder,defaultValue:m.defaultValue,style:m.inputStyle,onChange:g,onCopy:m.onCopy,onCut:m.onCut,onPaste:m.onPaste,onBlur:m.onBlur,onFocus:m.onFocus,onSelect:m.onSelect,onSubmit:m.onSubmit,onReset:m.onReset,onKeyDown:m.onKeyDown,onKeyPress:m.onKeyPress,onKeyUp:m.onKeyUp}):t("textarea",{ref:m.referance,className:Ot("rce-input","rce-input-textarea"),placeholder:m.placeholder,defaultValue:m.defaultValue,style:m.inputStyle,onChange:g,onCopy:m.onCopy,onCut:m.onCut,onPaste:m.onPaste,onBlur:m.onBlur,onFocus:m.onFocus,onSelect:m.onSelect,onSubmit:m.onSubmit,onReset:m.onReset,onKeyDown:m.onKeyDown,onKeyPress:m.onKeyPress,onKeyUp:m.onKeyUp}),m.rightButtons&&t("div",to({className:"rce-input-buttons"},{children:m.rightButtons}))]}))},ro=function(){return ro=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{var t={720:(t,e,n)=>{n.r(e),n.d(e,{Scene:()=>re,Tweenable:()=>xt,interpolate:()=>Qt,processTweens:()=>pt,setBezierFunction:()=>ie,shouldScheduleUpdate:()=>vt,tween:()=>wt,unsetBezierFunction:()=>ae});var r={};n.r(r),n.d(r,{bounce:()=>I,bouncePast:()=>R,easeFrom:()=>z,easeFromTo:()=>V,easeInBack:()=>P,easeInCirc:()=>k,easeInCubic:()=>u,easeInExpo:()=>O,easeInOutBack:()=>T,easeInOutCirc:()=>S,easeInOutCubic:()=>p,easeInOutExpo:()=>C,easeInOutQuad:()=>l,easeInOutQuart:()=>v,easeInOutQuint:()=>y,easeInOutSine:()=>j,easeInQuad:()=>s,easeInQuart:()=>h,easeInQuint:()=>m,easeInSine:()=>x,easeOutBack:()=>N,easeOutBounce:()=>E,easeOutCirc:()=>M,easeOutCubic:()=>d,easeOutExpo:()=>_,easeOutQuad:()=>c,easeOutQuart:()=>f,easeOutQuint:()=>g,easeOutSine:()=>w,easeTo:()=>B,elastic:()=>L,linear:()=>a,swingFrom:()=>D,swingFromTo:()=>A,swingTo:()=>F});var o={};n.r(o),n.d(o,{afterTween:()=>Wt,beforeTween:()=>Ht,doesApply:()=>Bt,tweenCreated:()=>Ut}); +/*! + * All equations are adapted from Thomas Fuchs' + * [Scripty2](https://github.com/madrobby/scripty2/blob/master/src/effects/transitions/penner.js). + * + * Based on Easing Equations (c) 2003 [Robert + * Penner](http://www.robertpenner.com/), all rights reserved. This work is + * [subject to terms](http://www.robertpenner.com/easing_terms_of_use.html). + */ +/*! + * TERMS OF USE - EASING EQUATIONS + * Open source under the BSD License. + * Easing Equations (c) 2003 Robert Penner, all rights reserved. + */ +var i,a=function(t){return t},s=function(t){return Math.pow(t,2)},c=function(t){return-(Math.pow(t-1,2)-1)},l=function(t){return(t/=.5)<1?.5*Math.pow(t,2):-.5*((t-=2)*t-2)},u=function(t){return Math.pow(t,3)},d=function(t){return Math.pow(t-1,3)+1},p=function(t){return(t/=.5)<1?.5*Math.pow(t,3):.5*(Math.pow(t-2,3)+2)},h=function(t){return Math.pow(t,4)},f=function(t){return-(Math.pow(t-1,4)-1)},v=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},m=function(t){return Math.pow(t,5)},g=function(t){return Math.pow(t-1,5)+1},y=function(t){return(t/=.5)<1?.5*Math.pow(t,5):.5*(Math.pow(t-2,5)+2)},x=function(t){return 1-Math.cos(t*(Math.PI/2))},w=function(t){return Math.sin(t*(Math.PI/2))},j=function(t){return-.5*(Math.cos(Math.PI*t)-1)},O=function(t){return 0===t?0:Math.pow(2,10*(t-1))},_=function(t){return 1===t?1:1-Math.pow(2,-10*t)},C=function(t){return 0===t?0:1===t?1:(t/=.5)<1?.5*Math.pow(2,10*(t-1)):.5*(2-Math.pow(2,-10*--t))},k=function(t){return-(Math.sqrt(1-t*t)-1)},M=function(t){return Math.sqrt(1-Math.pow(t-1,2))},S=function(t){return(t/=.5)<1?-.5*(Math.sqrt(1-t*t)-1):.5*(Math.sqrt(1-(t-=2)*t)+1)},E=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},P=function(t){var e=1.70158;return t*t*((e+1)*t-e)},N=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},T=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},L=function(t){return-1*Math.pow(4,-8*t)*Math.sin((6*t-1)*(2*Math.PI)/2)+1},A=function(t){var e=1.70158;return(t/=.5)<1?t*t*((1+(e*=1.525))*t-e)*.5:.5*((t-=2)*t*((1+(e*=1.525))*t+e)+2)},D=function(t){var e=1.70158;return t*t*((e+1)*t-e)},F=function(t){var e=1.70158;return(t-=1)*t*((e+1)*t+e)+1},I=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?7.5625*(t-=1.5/2.75)*t+.75:t<2.5/2.75?7.5625*(t-=2.25/2.75)*t+.9375:7.5625*(t-=2.625/2.75)*t+.984375},R=function(t){return t<1/2.75?7.5625*t*t:t<2/2.75?2-(7.5625*(t-=1.5/2.75)*t+.75):t<2.5/2.75?2-(7.5625*(t-=2.25/2.75)*t+.9375):2-(7.5625*(t-=2.625/2.75)*t+.984375)},V=function(t){return(t/=.5)<1?.5*Math.pow(t,4):-.5*((t-=2)*Math.pow(t,3)-2)},z=function(t){return Math.pow(t,4)},B=function(t){return Math.pow(t,.25)};function U(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function H(t,e){for(var n=0;ns?s:e;t._hasEnded=c>=s;var l=i-(s-c),u=t._filters.length>0;if(t._hasEnded)return t._render(a,t._data,l),t.stop(!0);u&&t._applyFilter(et),c1&&void 0!==arguments[1]?arguments[1]:Y,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=W(e);if(lt[e])return lt[e];if(r===ot||r===rt)for(var o in t)n[o]=e;else for(var i in t)n[i]=e[i]||Y;return n},yt=function(t){t===st?(st=t._next)?st._previous=null:ct=null:t===ct?(ct=t._previous)?ct._next=null:st=null:($=t._previous,Q=t._next,$._next=Q,Q._previous=$),t._previous=t._next=null},bt="function"==typeof Promise?Promise:null;i=Symbol.toStringTag;var xt=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;U(this,t),J(this,i,"Promise"),this._config={},this._data={},this._delay=0,this._filters=[],this._next=null,this._previous=null,this._timestamp=null,this._hasEnded=!1,this._resolve=null,this._reject=null,this._currentState=e||{},this._originalState={},this._targetState={},this._start=at,this._render=at,this._promiseCtor=bt,n&&this.setConfig(n)}var e,n,r;return e=t,n=[{key:"_applyFilter",value:function(t){for(var e=this._filters.length;e>0;e--){var n=this._filters[e-e][t];n&&n(this)}}},{key:"tween",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:void 0;return this._isPlaying&&this.stop(),!e&&this._config||this.setConfig(e),this._pausedAtTime=null,this._timestamp=t.now(),this._start(this.get(),this._data),this._delay&&this._render(this._currentState,this._data,0),this._resume(this._timestamp)}},{key:"setConfig",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this._config;for(var r in e)n[r]=e[r];var o=n.promise,i=void 0===o?this._promiseCtor:o,a=n.start,s=void 0===a?at:a,c=n.finish,l=n.render,u=void 0===l?this._config.step||at:l,d=n.step,p=void 0===d?at:d;this._data=n.data||n.attachment||this._data,this._isPlaying=!1,this._pausedAtTime=null,this._scheduleId=null,this._delay=e.delay||0,this._start=s,this._render=u||p,this._duration=n.duration||500,this._promiseCtor=i,c&&(this._resolve=c);var h=e.from,f=e.to,v=void 0===f?{}:f,m=this._currentState,g=this._originalState,y=this._targetState;for(var b in h)m[b]=h[b];var x=!1;for(var w in m){var j=m[w];x||W(j)!==ot||(x=!0),g[w]=j,y[w]=v.hasOwnProperty(w)?v[w]:j}if(this._easing=gt(this._currentState,n.easing,this._easing),this._filters.length=0,x){for(var O in t.filters)t.filters[O].doesApply(this)&&this._filters.push(t.filters[O]);this._applyFilter(nt)}return this}},{key:"then",value:function(t,e){var n=this;return this._promise=new this._promiseCtor((function(t,e){n._resolve=t,n._reject=e})),this._promise.then(t,e)}},{key:"catch",value:function(t){return this.then().catch(t)}},{key:"finally",value:function(t){return this.then().finally(t)}},{key:"get",value:function(){return q({},this._currentState)}},{key:"set",value:function(t){this._currentState=t}},{key:"pause",value:function(){if(this._isPlaying)return this._pausedAtTime=t.now(),this._isPlaying=!1,yt(this),this}},{key:"resume",value:function(){return this._resume()}},{key:"_resume",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.now();return null===this._timestamp?this.tween():this._isPlaying?this._promise:(this._pausedAtTime&&(this._timestamp+=e-this._pausedAtTime,this._pausedAtTime=null),this._isPlaying=!0,null===st?(st=this,ct=this):(this._previous=ct,ct._next=this,ct=this),this)}},{key:"seek",value:function(e){e=Math.max(e,0);var n=t.now();return this._timestamp+e===0||(this._timestamp=n-e,dt(this,n)),this}},{key:"stop",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this._isPlaying)return this;this._isPlaying=!1,yt(this);var e=this._filters.length>0;return t&&(e&&this._applyFilter(et),ut(1,this._currentState,this._originalState,this._targetState,1,0,this._easing),e&&(this._applyFilter(X),this._applyFilter(tt))),this._resolve&&this._resolve({data:this._data,state:this._currentState,tweenable:this}),this._resolve=null,this._reject=null,this}},{key:"cancel",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this._currentState,n=this._data,r=this._isPlaying;return r?(this._reject&&this._reject({data:n,state:e,tweenable:this}),this._resolve=null,this._reject=null,this.stop(t)):this}},{key:"isPlaying",value:function(){return this._isPlaying}},{key:"hasEnded",value:function(){return this._hasEnded}},{key:"setScheduleFunction",value:function(e){t.setScheduleFunction(e)}},{key:"data",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;return t&&(this._data=q({},t)),this._data}},{key:"dispose",value:function(){for(var t in this)delete this[t]}}],n&&H(e.prototype,n),r&&H(e,r),t}();function wt(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=new xt;return e.tween(t),e.tweenable=e,e}J(xt,"now",(function(){return G})),J(xt,"setScheduleFunction",(function(t){return it=t})),J(xt,"filters",{}),J(xt,"formulas",lt),vt(!0);var jt,Ot,_t=/(\d|-|\.)/,Ct=/([^\-0-9.]+)/g,kt=/[0-9.-]+/g,Mt=(jt=kt.source,Ot=/,\s*/.source,new RegExp("rgba?\\(".concat(jt).concat(Ot).concat(jt).concat(Ot).concat(jt,"(").concat(Ot).concat(jt,")?\\)"),"g")),St=/^.*\(/,Et=/#([0-9]|[a-f]){3,6}/gi,Pt="VAL",Nt=function(t,e){return t.map((function(t,n){return"_".concat(e,"_").concat(n)}))};function Tt(t){return parseInt(t,16)}var Lt=function(t){return"rgb(".concat((e=t,3===(e=e.replace(/#/,"")).length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]),[Tt(e.substr(0,2)),Tt(e.substr(2,2)),Tt(e.substr(4,2))]).join(","),")");var e},At=function(t,e,n){var r=e.match(t),o=e.replace(t,Pt);return r&&r.forEach((function(t){return o=o.replace(Pt,n(t))})),o},Dt=function(t){for(var e in t){var n=t[e];"string"==typeof n&&n.match(Et)&&(t[e]=At(Et,n,Lt))}},Ft=function(t){var e=t.match(kt),n=e.slice(0,3).map(Math.floor),r=t.match(St)[0];if(3===e.length)return"".concat(r).concat(n.join(","),")");if(4===e.length)return"".concat(r).concat(n.join(","),",").concat(e[3],")");throw new Error("Invalid rgbChunk: ".concat(t))},It=function(t){return t.match(kt)},Rt=function(t,e){var n={};return e.forEach((function(e){n[e]=t[e],delete t[e]})),n},Vt=function(t,e){return e.map((function(e){return t[e]}))},zt=function(t,e){return e.forEach((function(e){return t=t.replace(Pt,+e.toFixed(4))})),t},Bt=function(t){for(var e in t._currentState)if("string"==typeof t._currentState[e])return!0;return!1};function Ut(t){var e=t._currentState;[e,t._originalState,t._targetState].forEach(Dt),t._tokenData=function(t){var e,n,r={};for(var o in t){var i=t[o];"string"==typeof i&&(r[o]={formatString:(e=i,n=void 0,n=e.match(Ct),n?(1===n.length||e.charAt(0).match(_t))&&n.unshift(""):n=["",""],n.join(Pt)),chunkNames:Nt(It(i),o)})}return r}(e)}function Ht(t){var e=t._currentState,n=t._originalState,r=t._targetState,o=t._easing,i=t._tokenData;!function(t,e){var n=function(n){var r=e[n].chunkNames,o=t[n];if("string"==typeof o){var i=o.split(" "),a=i[i.length-1];r.forEach((function(e,n){return t[e]=i[n]||a}))}else r.forEach((function(e){return t[e]=o}));delete t[n]};for(var r in e)n(r)}(o,i),[e,n,r].forEach((function(t){return function(t,e){var n=function(n){It(t[n]).forEach((function(r,o){return t[e[n].chunkNames[o]]=+r})),delete t[n]};for(var r in e)n(r)}(t,i)}))}function Wt(t){var e=t._currentState,n=t._originalState,r=t._targetState,o=t._easing,i=t._tokenData;[e,n,r].forEach((function(t){return function(t,e){for(var n in e){var r=e[n],o=r.chunkNames,i=r.formatString,a=zt(i,Vt(Rt(t,o),o));t[n]=At(Mt,a,Ft)}}(t,i)})),function(t,e){for(var n in e){var r=e[n].chunkNames,o=t[r[0]];t[n]="string"==typeof o?r.map((function(e){var n=t[e];return delete t[e],n})).join(" "):o}}(o,i)}function Kt(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,r)}return n}function qt(t){for(var e=1;e4&&void 0!==arguments[4]?arguments[4]:0,i=qt({},t),a=gt(t,r);for(var s in Gt._filters.length=0,Gt.set({}),Gt._currentState=i,Gt._originalState=t,Gt._targetState=e,Gt._easing=a,$t)$t[s].doesApply(Gt)&&Gt._filters.push($t[s]);Gt._applyFilter("tweenCreated"),Gt._applyFilter("beforeTween");var c=ut(n,i,t,e,1,o,a);return Gt._applyFilter("afterTween"),c};function Yt(t){return function(t){if(Array.isArray(t))return Zt(t)}(t)||function(t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(t))return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Zt(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zt(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Zt(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=0?t:0-t};return c=1-(u=3*e)-(l=3*(r-e)-u),d=1-(h=3*n)-(p=3*(o-n)-h),a=t,s=function(t){return 1/(200*t)}(i),function(t){return((d*t+p)*t+h)*t}(function(t,e){var n,r,o,i,a,s;for(o=t,s=0;s<8;s++){if(i=f(o)-t,m(i)(r=1))return r;for(;ni?n=o:r=o,o=.5*(r-n)+n}return o}(a,s))}var ie=function(t,e,n,r,o){var i=function(t,e,n,r){return function(o){return oe(o,t,e,n,r,1)}}(e,n,r,o);return i.displayName=t,i.x1=e,i.y1=n,i.x2=r,i.y2=o,xt.formulas[t]=i},ae=function(t){return delete xt.formulas[t]};xt.filters.token=o}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(720)})()},x.exports=y();var w="Webkit Moz O ms".split(" ");function j(t,e,n){for(var r=t.style,o=0;ot.strokeWidth&&(e=t.trailWidth);var n=50-e/2;return H.render(this._pathTemplate,{radius:n,"2radius":2*n})},W.prototype._trailString=function(t){return this._pathString(t)};var K=W,q=I,J=K,G=k,$=function(t,e){this._pathTemplate="M 50,50 m -{radius},0 a {radius},{radius} 0 1 1 {2radius},0",this.containerAspectRatio=2,q.apply(this,arguments)};($.prototype=new q).constructor=$,$.prototype._initializeSvg=function(t,e){t.setAttribute("viewBox","0 0 100 50")},$.prototype._initializeTextContainer=function(t,e,n){t.text.style&&(n.style.top="auto",n.style.bottom="0",t.text.alignToBottom?G.setStyle(n,"transform","translate(-50%, 0)"):G.setStyle(n,"transform","translate(-50%, 50%)"))},$.prototype._pathString=J.prototype._pathString,$.prototype._trailString=J.prototype._trailString;var Q=$,Y=I,Z=k,X=function(t,e){this._pathTemplate="M 0,{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{strokeWidth}",this._trailTemplate="M {startMargin},{halfOfStrokeWidth} L {width},{halfOfStrokeWidth} L {width},{width} L {halfOfStrokeWidth},{width} L {halfOfStrokeWidth},{halfOfStrokeWidth}",Y.apply(this,arguments)};(X.prototype=new Y).constructor=X,X.prototype._pathString=function(t){var e=100-t.strokeWidth/2;return Z.render(this._pathTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2})},X.prototype._trailString=function(t){var e=100-t.strokeWidth/2;return Z.render(this._trailTemplate,{width:e,strokeWidth:t.strokeWidth,halfOfStrokeWidth:t.strokeWidth/2,startMargin:t.strokeWidth/2-t.trailWidth/2})};var tt,et,nt={Line:B,Circle:K,SemiCircle:Q,Square:X,Path:T,Shape:I,utils:k},rt=function(n){var r=n.animate,o=n.progressOptions,i=n.className,a=e.useMemo((function(){return tt=document.createElement("div"),new nt.Circle(tt,o)}),[]),s=e.useCallback((function(t){t&&t.appendChild(tt)}),[]);return e.useEffect((function(){a.animate(r)}),[r,a]),t.jsx("div",{className:i,ref:s})},ot=function(){return ot=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=zt[o]&&o(0==(o*=2)?9:1)&&(o+=1),e(t,o,r)[n].replace("%s",t.toString())}(r,function(t){return Rt[t]||Rt.en_US}(e))};Vt("en_US",(function(t,e){if(0===e)return["just now","right now"];var n=Ft[Math.floor(e/2)];return t>1&&(n+="s"),[t+" "+n+" ago","in "+t+" "+n]})),Vt("zh_CN",(function(t,e){if(0===e)return["刚刚","片刻后"];var n=It[~~(e/2)];return[t+" "+n+"前",t+" "+n+"后"]}));var Ht=function(){return Ht=Object.assign||function(t){for(var e,n=1,r=arguments.length;n>8*n&255;r+=("00"+(o=o%150+50).toString(16)).substr(-2)}return r}(l.letterItem.id)}},{children:t.jsx("span",Ht({className:"rce-avatar-letter"},{children:l.letterItem.letter}))})):t.jsx("img",{alt:l.alt,src:p,onError:l.onError,className:lt("rce-avatar",{"rce-avatar-lazy":h})}),l.sideElement]}))},qt=function(){return qt=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0&&t.jsx("div",{children:t.jsx(Yt,{animationType:"bottom",animationPosition:"norteast",buttonProps:{className:"rce-mtmg-right-icon",icon:{component:t.jsx(Dt,{}),size:24}},items:c,onSelect:g})})]})),t.jsx("div",Zt({className:"rce-mtmg-body-bottom",onClick:function(){w(!x)}},{children:!0===x?t.jsxs("div",Zt({className:"rce-mtmg-bottom--tptitle"},{children:[t.jsx(p,{}),t.jsx("span",{children:s})]})):t.jsxs("div",Zt({className:"rce-mtmg-body-bottom--bttitle"},{children:[t.jsx(h,{}),t.jsxs("span",{children:[null==l?void 0:l.slice(0,j).map((function(t){return t.title||"Unknow"})).join(", "),l&&j&&l.length>j&&", +".concat(l.length-j)]})]}))})),t.jsx("div",Zt({className:lt("rce-mtmg-toogleContent",{"rce-mtmg-toogleContent--click":!0===x})},{children:u&&u.map((function(e,n){return t.jsxs("div",{children:[!e.event&&t.jsxs("div",Zt({className:"rce-mitem"},{children:[t.jsx("div",Zt({className:lt("rce-mitem avatar",{"rce-mitem no-avatar":!e.avatar})},{children:e.avatar?t.jsx(Kt,{src:e.avatar}):t.jsx(Ot,{})})),t.jsxs("div",Zt({className:"rce-mitem-body"},{children:[t.jsxs("div",Zt({className:"rce-mitem-body--top"},{children:[t.jsx("div",Zt({className:"rce-mitem-body--top-title",onClick:function(t){return r=e,o=n,i=t,void(v instanceof Function&&v(r,o,i));var r,o,i}},{children:e.title})),t.jsx("div",Zt({className:"rce-mitem-body--top-time"},{children:e.dateString?e.dateString:e.date&&e.date&&Ut(e.date)}))]})),t.jsx("div",Zt({className:"rce-mitem-body--bottom"},{children:t.jsx("div",Zt({className:"rce-mitem-body--bottom-title"},{children:e.message}))}))]}))]})),e.event&&t.jsx("div",Zt({className:"rce-mitem-event"},{children:t.jsxs("div",Zt({className:"rce-mitem-bottom-body"},{children:[t.jsx("div",Zt({className:"rce-mitem-body avatar"},{children:t.jsx(wt,{})})),t.jsxs("div",Zt({className:"rce-mitem-bottom-body-top"},{children:[e.event.title,t.jsx("div",Zt({className:"rce-mitem-body--top-time"},{children:e.dateString?e.dateString:e.date&&Ut(e.date)})),t.jsx("div",Zt({className:"rce-mitem-avatar-content"},{children:t.jsxs("div",Zt({className:"rce-mitem-avatar"},{children:[e.event.avatars&&e.event.avatars.slice(0,e.event.avatarsLimit).map((function(e,n){return t.jsx(Kt,{src:e.src},n)})),e.event.avatars&&e.event.avatarsLimit&&e.event.avatars.length>e.event.avatarsLimit&&t.jsx("div",Zt({className:"rce-mitem-length rce-mitem-tooltip",tooltip:e.event.avatars.slice(e.event.avatarsLimit,e.event.avatars.length).map((function(t){return t.title})).join(",").toString()},{children:t.jsx("span",Zt({className:"rce-mitem-tooltip-text"},{children:"+"+(e.event.avatars.length-e.event.avatarsLimit)}))}))]}))})),e.record&&t.jsx("div",Zt({className:"rce-mtmg-call-record"},{children:t.jsxs("div",Zt({className:"rce-mtmg-call-body"},{children:[t.jsxs("div",Zt({onClick:function(t){return r=e,o=n,i=t,void(m instanceof Function&&m(r,o,i));var r,o,i},className:"rce-mtmg-call-avatars"},{children:[t.jsx(Kt,{className:"rce-mtmg-call-avatars",src:e.record.avatar}),t.jsx("div",Zt({className:"rce-mtmg-record-time"},{children:e.record.time}))]})),t.jsxs("div",Zt({className:"rce-mtmg-call-body-title"},{children:[t.jsx("span",{children:e.record.title}),t.jsx("div",Zt({className:"rce-mtmg-call-body-bottom"},{children:e.record.savedBy}))]}))]}))}))]}))]}))}))]},n)}))}))]}))}))},ee=function(){return ee=Object.assign||function(t){for(var e,n=1,r=arguments.length;n{const o=t.split(":");if("@"===t.slice(0,1)){if(o.length<2||o.length>3)return null;r=o.shift().slice(1)}if(o.length>3||!o.length)return null;if(o.length>1){const t=o.pop(),n=o.pop(),i={provider:o.length>0?o[0]:r,prefix:n,name:t};return e&&!ye(i)?null:i}const i=o[0],a=i.split("-");if(a.length>1){const t={provider:r,prefix:a.shift(),name:a.join("-")};return e&&!ye(t)?null:t}if(n&&""===r){const t={provider:r,prefix:"",name:i};return e&&!ye(t,n)?null:t}return null},ye=(t,e)=>!!t&&!(""!==t.provider&&!t.provider.match(fe)||!(e&&""===t.prefix||t.prefix.match(fe))||!t.name.match(fe));function be(t,e,n=!1){const r=function e(n,r){if(void 0!==t.icons[n])return Object.assign({},t.icons[n]);if(r>5)return null;const o=t.aliases;if(o&&void 0!==o[n]){const t=o[n],i=e(t.parent,r+1);return i?function(t,e){const n={...t};for(const t in ve){const r=t;if(void 0!==e[r]){const t=e[r];if(void 0===n[r]){n[r]=t;continue}switch(r){case"rotate":n[r]=(n[r]+t)%4;break;case"hFlip":case"vFlip":n[r]=t!==n[r];break;default:n[r]=t}}}return n}(i,t):i}const i=t.chars;return!r&&i&&void 0!==i[n]?e(i[n],r+1):null}(e,0);if(r)for(const e in ve)void 0===r[e]&&void 0!==t[e]&&(r[e]=t[e]);return r&&n?me(r):r}function xe(t,e,n){n=n||{};const r=[];if("object"!=typeof t||"object"!=typeof t.icons)return r;t.not_found instanceof Array&&t.not_found.forEach((t=>{e(t,null),r.push(t)}));const o=t.icons;Object.keys(o).forEach((n=>{const o=be(t,n,!0);o&&(e(n,o),r.push(n))}));const i=n.aliases||"all";if("none"!==i&&"object"==typeof t.aliases){const n=t.aliases;Object.keys(n).forEach((o=>{if("variations"===i&&function(t){for(const e in ve)if(void 0!==t[e])return!0;return!1}(n[o]))return;const a=be(t,o,!0);a&&(e(o,a),r.push(o))}))}return r}const we={provider:"string",aliases:"object",not_found:"object"};for(const t in ve)we[t]=typeof ve[t];function je(t){if("object"!=typeof t||null===t)return null;const e=t;if("string"!=typeof e.prefix||!t.icons||"object"!=typeof t.icons)return null;for(const e in we)if(void 0!==t[e]&&typeof t[e]!==we[e])return null;const n=e.icons;for(const t in n){const e=n[t];if(!t.match(fe)||"string"!=typeof e.body)return null;for(const t in ve)if(void 0!==e[t]&&typeof e[t]!=typeof ve[t])return null}const r=e.aliases;if(r)for(const t in r){const e=r[t],o=e.parent;if(!t.match(fe)||"string"!=typeof o||!n[o]&&!r[o])return null;for(const t in ve)if(void 0!==e[t]&&typeof e[t]!=typeof ve[t])return null}return e}let Oe=Object.create(null);try{const t=window||self;t&&1===t._iconifyStorage.version&&(Oe=t._iconifyStorage.storage)}catch(t){}function _e(t,e){void 0===Oe[t]&&(Oe[t]=Object.create(null));const n=Oe[t];return void 0===n[e]&&(n[e]=function(t,e){return{provider:t,prefix:e,icons:Object.create(null),missing:Object.create(null)}}(t,e)),n[e]}function Ce(t,e){if(!je(e))return[];const n=Date.now();return xe(e,((e,r)=>{r?t.icons[e]=r:t.missing[e]=n}))}let ke=!1;function Me(t){return"boolean"==typeof t&&(ke=t),ke}function Se(t,e){const n=ge(t,!0,ke);if(!n)return!1;return function(t,e,n){try{if("string"==typeof n.body)return t.icons[e]=Object.freeze(me(n)),!0}catch(t){}return!1}(_e(n.provider,n.prefix),n.name,e)}const Ee=Object.freeze({inline:!1,width:null,height:null,hAlign:"center",vAlign:"middle",slice:!1,hFlip:!1,vFlip:!1,rotate:0});const Pe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ne=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function Te(t,e,n){if(1===e)return t;if(n=void 0===n?100:n,"number"==typeof t)return Math.ceil(t*e*n)/n;if("string"!=typeof t)return t;const r=t.split(Pe);if(null===r||!r.length)return t;const o=[];let i=r.shift(),a=Ne.test(i);for(;;){if(a){const t=parseFloat(i);isNaN(t)?o.push(i):o.push(Math.ceil(t*e*n)/n)}else o.push(i);if(i=r.shift(),void 0===i)return o.join("");a=!a}}function Le(t){let e="";switch(t.hAlign){case"left":e+="xMin";break;case"right":e+="xMax";break;default:e+="xMid"}switch(t.vAlign){case"top":e+="YMin";break;case"bottom":e+="YMax";break;default:e+="YMid"}return e+=t.slice?" slice":" meet",e}const Ae=/\sid="(\S+)"/g,De="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16);let Fe=0;function Ie(t,e=De){const n=[];let r;for(;r=Ae.exec(t);)n.push(r[1]);return n.length?(n.forEach((n=>{const r="function"==typeof e?e(n):e+(Fe++).toString(),o=n.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+o+')([")]|\\.[a-z])',"g"),"$1"+r+"$3")})),t):t}const Re=Object.create(null);function Ve(t){return Re[t]||Re[""]}function ze(t){let e;if("string"==typeof t.resources)e=[t.resources];else if(e=t.resources,!(e instanceof Array&&e.length))return null;return{resources:e,path:void 0===t.path?"/":t.path,maxURL:t.maxURL?t.maxURL:500,rotate:t.rotate?t.rotate:750,timeout:t.timeout?t.timeout:5e3,random:!0===t.random,index:t.index?t.index:0,dataAfterTimeout:!1!==t.dataAfterTimeout}}const Be=Object.create(null),Ue=["https://api.simplesvg.com","https://api.unisvg.com"],He=[];for(;Ue.length>0;)1===Ue.length||Math.random()>.5?He.push(Ue.shift()):He.push(Ue.pop());function We(t,e){const n=ze(e);return null!==n&&(Be[t]=n,!0)}function Ke(t){return Be[t]}Be[""]=ze({resources:["https://api.iconify.design"].concat(He)});const qe=(t,e)=>{let n=t,r=-1!==n.indexOf("?");return Object.keys(e).forEach((t=>{let o;try{o=function(t){switch(typeof t){case"boolean":return t?"true":"false";case"number":case"string":return encodeURIComponent(t);default:throw new Error("Invalid parameter")}}(e[t])}catch(t){return}n+=(r?"&":"?")+encodeURIComponent(t)+"="+o,r=!0})),n},Je={},Ge={};let $e=(()=>{let t;try{if(t=fetch,"function"==typeof t)return t}catch(t){}return null})();const Qe={prepare:(t,e,n)=>{const r=[];let o=Je[e];void 0===o&&(o=function(t,e){const n=Ke(t);if(!n)return 0;let r;if(n.maxURL){let t=0;n.resources.forEach((e=>{const n=e;t=Math.max(t,n.length)}));const o=qe(e+".json",{icons:""});r=n.maxURL-t-n.path.length-o.length}else r=0;const o=t+":"+e;return Ge[t]=n.path,Je[o]=r,r}(t,e));const i="icons";let a={type:i,provider:t,prefix:e,icons:[]},s=0;return n.forEach(((n,c)=>{s+=n.length+1,s>=o&&c>0&&(r.push(a),a={type:i,provider:t,prefix:e,icons:[]},s=n.length),a.icons.push(n)})),r.push(a),r},send:(t,e,n)=>{if(!$e)return void n("abort",424);let r=function(t){if("string"==typeof t){if(void 0===Ge[t]){const e=Ke(t);if(!e)return"/";Ge[t]=e.path}return Ge[t]}return"/"}(e.provider);switch(e.type){case"icons":{const t=e.prefix,n=e.icons.join(",");r+=qe(t+".json",{icons:n});break}case"custom":{const t=e.uri;r+="/"===t.slice(0,1)?t.slice(1):t;break}default:return void n("abort",400)}let o=503;$e(t+r).then((t=>{const e=t.status;if(200===e)return o=501,t.json();setTimeout((()=>{n(function(t){return 404===t}(e)?"abort":"next",e)}))})).then((t=>{"object"==typeof t&&null!==t?setTimeout((()=>{n("success",t)})):setTimeout((()=>{n("next",o)}))})).catch((()=>{n("next",o)}))}};const Ye=Object.create(null),Ze=Object.create(null);function Xe(t,e){t.forEach((t=>{const n=t.provider;if(void 0===Ye[n])return;const r=Ye[n],o=t.prefix,i=r[o];i&&(r[o]=i.filter((t=>t.id!==e)))}))}let tn=0;var en={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function nn(t,e,n,r){const o=t.resources.length,i=t.random?Math.floor(Math.random()*o):t.index;let a;if(t.random){let e=t.resources.slice(0);for(a=[];e.length>1;){const t=Math.floor(Math.random()*e.length);a.push(e[t]),e=e.slice(0,t).concat(e.slice(t+1))}a=a.concat(e)}else a=t.resources.slice(i).concat(t.resources.slice(0,i));const s=Date.now();let c,l="pending",u=0,d=null,p=[],h=[];function f(){d&&(clearTimeout(d),d=null)}function v(){"pending"===l&&(l="aborted"),f(),p.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),p=[]}function m(t,e){e&&(h=[]),"function"==typeof t&&h.push(t)}function g(){l="failed",h.forEach((t=>{t(void 0,c)}))}function y(){p.forEach((t=>{"pending"===t.status&&(t.status="aborted")})),p=[]}function b(){if("pending"!==l)return;f();const r=a.shift();if(void 0===r)return p.length?void(d=setTimeout((()=>{f(),"pending"===l&&(y(),g())}),t.timeout)):void g();const o={status:"pending",resource:r,callback:(e,n)=>{!function(e,n,r){const o="success"!==n;switch(p=p.filter((t=>t!==e)),l){case"pending":break;case"failed":if(o||!t.dataAfterTimeout)return;break;default:return}if("abort"===n)return c=r,void g();if(o)return c=r,void(p.length||(a.length?b():g()));if(f(),y(),!t.random){const n=t.resources.indexOf(e.resource);-1!==n&&n!==t.index&&(t.index=n)}l="completed",h.forEach((t=>{t(r)}))}(o,e,n)}};p.push(o),u++,d=setTimeout(b,t.rotate),n(r,e,o.callback)}return"function"==typeof r&&h.push(r),setTimeout(b),function(){return{startTime:s,payload:e,status:l,queriesSent:u,queriesPending:p.length,subscribe:m,abort:v}}}function rn(t){const e=function(t){if(!("object"==typeof t&&"object"==typeof t.resources&&t.resources instanceof Array&&t.resources.length))throw new Error("Invalid Reduncancy configuration");const e=Object.create(null);let n;for(n in en)void 0!==t[n]?e[n]=t[n]:e[n]=en[n];return e}(t);let n=[];function r(){n=n.filter((t=>"pending"===t().status))}const o={query:function(t,o,i){const a=nn(e,t,o,((t,e)=>{r(),i&&i(t,e)}));return n.push(a),a},find:function(t){const e=n.find((e=>t(e)));return void 0!==e?e:null},setIndex:t=>{e.index=t},getIndex:()=>e.index,cleanup:r};return o}function on(){}const an=Object.create(null);function sn(t,e,n){let r,o;if("string"==typeof t){const e=Ve(t);if(!e)return n(void 0,424),on;o=e.send;const i=function(t){if(void 0===an[t]){const e=Ke(t);if(!e)return;const n={config:e,redundancy:rn(e)};an[t]=n}return an[t]}(t);i&&(r=i.redundancy)}else{const e=ze(t);if(e){r=rn(e);const n=Ve(t.resources?t.resources[0]:"");n&&(o=n.send)}}return r&&o?r.query(e,o,n)().abort:(n(void 0,424),on)}const cn={};function ln(){}const un=Object.create(null),dn=Object.create(null),pn=Object.create(null),hn=Object.create(null);function fn(t,e){void 0===pn[t]&&(pn[t]=Object.create(null));const n=pn[t];n[e]||(n[e]=!0,setTimeout((()=>{n[e]=!1,function(t,e){void 0===Ze[t]&&(Ze[t]=Object.create(null));const n=Ze[t];n[e]||(n[e]=!0,setTimeout((()=>{if(n[e]=!1,void 0===Ye[t]||void 0===Ye[t][e])return;const r=Ye[t][e].slice(0);if(!r.length)return;const o=_e(t,e);let i=!1;r.forEach((n=>{const r=n.icons,a=r.pending.length;r.pending=r.pending.filter((n=>{if(n.prefix!==e)return!0;const a=n.name;if(void 0!==o.icons[a])r.loaded.push({provider:t,prefix:e,name:a});else{if(void 0===o.missing[a])return i=!0,!0;r.missing.push({provider:t,prefix:e,name:a})}return!1})),r.pending.length!==a&&(i||Xe([{provider:t,prefix:e}],n.id),n.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),n.abort))}))})))}(t,e)})))}const vn=Object.create(null);function mn(t,e,n){void 0===dn[t]&&(dn[t]=Object.create(null));const r=dn[t];void 0===hn[t]&&(hn[t]=Object.create(null));const o=hn[t];void 0===un[t]&&(un[t]=Object.create(null));const i=un[t];void 0===r[e]?r[e]=n:r[e]=r[e].concat(n).sort(),o[e]||(o[e]=!0,setTimeout((()=>{o[e]=!1;const n=r[e];delete r[e];const a=Ve(t);if(!a)return void function(){const n=(""===t?"":"@"+t+":")+e,r=Math.floor(Date.now()/6e4);vn[n]{sn(t,n,((r,o)=>{const a=_e(t,e);if("object"!=typeof r){if(404!==o)return;const t=Date.now();n.icons.forEach((e=>{a.missing[e]=t}))}else try{const n=Ce(a,r);if(!n.length)return;const o=i[e];n.forEach((t=>{delete o[t]})),cn.store&&cn.store(t,r)}catch(t){console.error(t)}fn(t,e)}))}))})))}const gn=(t,e)=>{const n=function(t,e=!0,n=!1){const r=[];return t.forEach((t=>{const o="string"==typeof t?ge(t,!1,n):t;e&&!ye(o,n)||r.push({provider:o.provider,prefix:o.prefix,name:o.name})})),r}(t,!0,Me()),r=function(t){const e={loaded:[],missing:[],pending:[]},n=Object.create(null);t.sort(((t,e)=>t.provider!==e.provider?t.provider.localeCompare(e.provider):t.prefix!==e.prefix?t.prefix.localeCompare(e.prefix):t.name.localeCompare(e.name)));let r={provider:"",prefix:"",name:""};return t.forEach((t=>{if(r.name===t.name&&r.prefix===t.prefix&&r.provider===t.provider)return;r=t;const o=t.provider,i=t.prefix,a=t.name;void 0===n[o]&&(n[o]=Object.create(null));const s=n[o];void 0===s[i]&&(s[i]=_e(o,i));const c=s[i];let l;l=void 0!==c.icons[a]?e.loaded:""===i||void 0!==c.missing[a]?e.missing:e.pending;const u={provider:o,prefix:i,name:a};l.push(u)})),e}(n);if(!r.pending.length){let t=!0;return e&&setTimeout((()=>{t&&e(r.loaded,r.missing,r.pending,ln)})),()=>{t=!1}}const o=Object.create(null),i=[];let a,s;r.pending.forEach((t=>{const e=t.provider,n=t.prefix;if(n===s&&e===a)return;a=e,s=n,i.push({provider:e,prefix:n}),void 0===un[e]&&(un[e]=Object.create(null));const r=un[e];void 0===r[n]&&(r[n]=Object.create(null)),void 0===o[e]&&(o[e]=Object.create(null));const c=o[e];void 0===c[n]&&(c[n]=[])}));const c=Date.now();return r.pending.forEach((t=>{const e=t.provider,n=t.prefix,r=t.name,i=un[e][n];void 0===i[r]&&(i[r]=c,o[e][n].push(r))})),i.forEach((t=>{const e=t.provider,n=t.prefix;o[e][n].length&&mn(e,n,o[e][n])})),e?function(t,e,n){const r=tn++,o=Xe.bind(null,n,r);if(!e.pending.length)return o;const i={id:r,icons:e,callback:t,abort:o};return n.forEach((t=>{const e=t.provider,n=t.prefix;void 0===Ye[e]&&(Ye[e]=Object.create(null));const r=Ye[e];void 0===r[n]&&(r[n]=[]),r[n].push(i)})),o}(e,r,i):ln},yn="iconify2",bn="iconify",xn=bn+"-count",wn=bn+"-version",jn=36e5,On={local:!0,session:!0};let _n=!1;const Cn={local:0,session:0},kn={local:[],session:[]};let Mn="undefined"==typeof window?{}:window;function Sn(t){const e=t+"Storage";try{if(Mn&&Mn[e]&&"number"==typeof Mn[e].length)return Mn[e]}catch(t){}return On[t]=!1,null}function En(t,e,n){try{return t.setItem(xn,n.toString()),Cn[e]=n,!0}catch(t){return!1}}function Pn(t){const e=t.getItem(xn);if(e){const t=parseInt(e);return t||0}return 0}const Nn=()=>{if(_n)return;_n=!0;const t=Math.floor(Date.now()/jn)-168;function e(e){const n=Sn(e);if(!n)return;const r=e=>{const r=bn+e.toString(),o=n.getItem(r);if("string"!=typeof o)return!1;let i=!0;try{const e=JSON.parse(o);if("object"!=typeof e||"number"!=typeof e.cached||e.cached0}}catch(t){i=!1}return i||n.removeItem(r),i};try{const t=n.getItem(wn);if(t!==yn)return t&&function(t){try{const e=Pn(t);for(let n=0;n=0;t--)r(t)||(t===o-1?o--:kn[e].push(t));En(n,e,o)}catch(t){}}for(const t in On)e(t)},Tn=(t,e)=>{function n(n){if(!On[n])return!1;const r=Sn(n);if(!r)return!1;let o=kn[n].shift();if(void 0===o&&(o=Cn[n],!En(r,n,o+1)))return!1;try{const n={cached:Math.floor(Date.now()/jn),provider:t,data:e};r.setItem(bn+o.toString(),JSON.stringify(n))}catch(t){return!1}return!0}_n||Nn(),Object.keys(e.icons).length&&(e.not_found&&delete(e=Object.assign({},e)).not_found,n("local")||n("session"))},Ln=/[\s,]+/;function An(t,e){e.split(Ln).forEach((e=>{switch(e.trim()){case"horizontal":t.hFlip=!0;break;case"vertical":t.vFlip=!0}}))}function Dn(t,e){e.split(Ln).forEach((e=>{const n=e.trim();switch(n){case"left":case"center":case"right":t.hAlign=n;break;case"top":case"middle":case"bottom":t.vAlign=n;break;case"slice":case"crop":t.slice=!0;break;case"meet":t.slice=!1}}))}function Fn(t,e=0){const n=t.replace(/^-?[0-9.]*/,"");function r(t){for(;t<0;)t+=4;return t%4}if(""===n){const e=parseInt(t);return isNaN(e)?0:r(e)}if(n!==t){let e=0;switch(n){case"%":e=25;break;case"deg":e=90}if(e){let o=parseFloat(t.slice(0,t.length-n.length));return isNaN(o)?0:(o/=e,o%1==0?r(o):0)}}return e}const In={xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img",style:{}},Rn={...Ee,inline:!0},Vn=(t,e,n,o)=>{const i=n?Rn:Ee,a=function(t,e){const n={};for(const r in t){const o=r;if(n[o]=t[o],void 0===e[o])continue;const i=e[o];switch(o){case"inline":case"slice":"boolean"==typeof i&&(n[o]=i);break;case"hFlip":case"vFlip":!0===i&&(n[o]=!n[o]);break;case"hAlign":case"vAlign":"string"==typeof i&&""!==i&&(n[o]=i);break;case"width":case"height":("string"==typeof i&&""!==i||"number"==typeof i&&i||null===i)&&(n[o]=i);break;case"rotate":"number"==typeof i&&(n[o]+=i)}}return n}(i,e),s="object"==typeof e.style&&null!==e.style?e.style:{},c={...In,ref:o,style:s};for(let t in e){const n=e[t];if(void 0!==n)switch(t){case"icon":case"style":case"children":case"onLoad":case"_ref":case"_inline":break;case"inline":case"hFlip":case"vFlip":a[t]=!0===n||"true"===n||1===n;break;case"flip":"string"==typeof n&&An(a,n);break;case"align":"string"==typeof n&&Dn(a,n);break;case"color":s.color=n;break;case"rotate":"string"==typeof n?a[t]=Fn(n):"number"==typeof n&&(a[t]=n);break;case"ariaHidden":case"aria-hidden":!0!==n&&"true"!==n&&delete c["aria-hidden"];break;default:void 0===i[t]&&(c[t]=n)}}const l=function(t,e){const n={left:t.left,top:t.top,width:t.width,height:t.height};let r,o,i=t.body;[t,e].forEach((t=>{const e=[],r=t.hFlip,o=t.vFlip;let a,s=t.rotate;switch(r?o?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):o&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=n.height/2+n.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:a=n.width/2+n.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(0===n.left&&0===n.top||(a=n.left,n.left=n.top,n.top=a),n.width!==n.height&&(a=n.width,n.width=n.height,n.height=a)),e.length&&(i=''+i+"")})),null===e.width&&null===e.height?(o="1em",r=Te(o,n.width/n.height)):null!==e.width&&null!==e.height?(r=e.width,o=e.height):null!==e.height?(o=e.height,r=Te(o,n.width/n.height)):(r=e.width,o=Te(r,n.height/n.width)),"auto"===r&&(r=n.width),"auto"===o&&(o=n.height),r="string"==typeof r?r:r.toString()+"",o="string"==typeof o?o:o.toString()+"";const a={attributes:{width:r,height:o,preserveAspectRatio:Le(e),viewBox:n.left.toString()+" "+n.top.toString()+" "+n.width.toString()+" "+n.height.toString()},body:i};return e.inline&&(a.inline=!0),a}(t,a);let u=0,d=e.id;"string"==typeof d&&(d=d.replace(/-/g,"_")),c.dangerouslySetInnerHTML={__html:Ie(l.body,d?()=>d+"ID"+u++:"iconifyReact")};for(let t in l.attributes)c[t]=l.attributes[t];return l.inline&&void 0===s.verticalAlign&&(s.verticalAlign="-0.125em"),r.default.createElement("svg",c)};var zn;if(Me(!0),zn=Qe,Re[""]=zn,"undefined"!=typeof document&&"undefined"!=typeof window){cn.store=Tn,Nn();const t=window;if(void 0!==t.IconifyPreload){const e=t.IconifyPreload,n="Invalid IconifyPreload syntax.";"object"==typeof e&&null!==e&&(e instanceof Array?e:[e]).forEach((t=>{try{("object"!=typeof t||null===t||t instanceof Array||"object"!=typeof t.icons||"string"!=typeof t.prefix||!function(t,e){if("object"!=typeof t)return!1;if("string"!=typeof e&&(e="string"==typeof t.provider?t.provider:""),ke&&""===e&&("string"!=typeof t.prefix||""===t.prefix)){let e=!1;return je(t)&&(t.prefix="",xe(t,((t,n)=>{n&&Se(t,n)&&(e=!0)}))),e}return!("string"!=typeof t.prefix||!ye({provider:e,prefix:t.prefix,name:"a"}))&&!!Ce(_e(e,t.prefix),t)}(t))&&console.error(n)}catch(t){console.error(n)}}))}if(void 0!==t.IconifyProviders){const e=t.IconifyProviders;if("object"==typeof e&&null!==e)for(let t in e){const n="IconifyProviders["+t+"] is invalid.";try{const r=e[t];if("object"!=typeof r||!r||void 0===r.resources)continue;We(t,r)||console.error(n)}catch(t){console.error(n)}}}}class Bn extends r.default.Component{constructor(t){super(t),this.state={icon:null}}_abortLoading(){this._loading&&(this._loading.abort(),this._loading=null)}_setData(t){this.state.icon!==t&&this.setState({icon:t})}_checkIcon(t){const e=this.state,n=this.props.icon;if("object"==typeof n&&null!==n&&"string"==typeof n.body)return this._icon="",this._abortLoading(),void((t||null===e.icon)&&this._setData({data:me(n)}));let r;if("string"!=typeof n||null===(r=ge(n,!1,!0)))return this._abortLoading(),void this._setData(null);const o=function(t){const e="string"==typeof t?ge(t,!0,ke):t;return e?function(t,e){const n=t.icons[e];return void 0===n?null:n}(_e(e.provider,e.prefix),e.name):null}(r);if(null!==o){if(this._icon!==n||null===e.icon){this._abortLoading(),this._icon=n;const t=["iconify"];""!==r.prefix&&t.push("iconify--"+r.prefix),""!==r.provider&&t.push("iconify--"+r.provider),this._setData({data:o,classes:t}),this.props.onLoad&&this.props.onLoad(n)}}else this._loading&&this._loading.name===n||(this._abortLoading(),this._icon="",this._setData(null),this._loading={name:n,abort:gn([r],this._checkIcon.bind(this,!1))})}componentDidMount(){this._checkIcon(!1)}componentDidUpdate(t){t.icon!==this.props.icon&&this._checkIcon(!0)}componentWillUnmount(){this._abortLoading()}render(){const t=this.props,e=this.state.icon;if(null===e)return t.children?t.children:r.default.createElement("span",{});let n=t;return e.classes&&(n={...t,className:("string"==typeof t.className?t.className+" ":"")+e.classes.join(" ")}),Vn(e.data,n,t._inline,t._ref)}}const Un=r.default.forwardRef((function(t,e){const n={...t,_ref:e,_inline:!1};return r.default.createElement(Bn,n)}));r.default.forwardRef((function(t,e){const n={...t,_ref:e,_inline:!0};return r.default.createElement(Bn,n)}));var Hn={body:'',width:24,height:24},Wn={body:'',width:24,height:24},Kn={body:'',width:24,height:24},qn={body:'',width:24,height:24},Jn={body:'',width:24,height:24},Gn={body:'',width:24,height:24},$n={body:'',width:24,height:24},Qn={body:'',width:24,height:24},Yn={body:'',width:24,height:24},Zn={body:'',width:24,height:24};function Xn(){return Xn=Object.assign?Object.assign.bind():function(t){for(var e=1;e9?t.toString():"0".concat(t)},rr=function(t,e,n){if(!isFinite(t))return null;var r=Math.floor(t/60),o=nr(r),i=nr(Math.floor(t%60)),a=nr(Math.floor(r%60)),s=Math.floor(r/60),c="".concat(o,":").concat(i),l="".concat(s,":").concat(a,":").concat(i);return"auto"===n?e>=3600?l:c:"mm:ss"===n?c:"hh:mm:ss"===n?l:void 0};function or(t,e){var n=!1;return function(r){n||(t(r),n=!0,setTimeout((function(){return n=!1}),e))}}function ir(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pe(t);if(e){var o=pe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return de(this,n)}}var ar=function(t){ue(o,e.Component);var n=ir(o);function o(){var t;re(this,o);for(var e=arguments.length,r=new Array(e),i=0;ia&&(s=a),{currentTime:t.getDuration()*s/a,currentTimePos:"".concat((s/a*100).toFixed(2),"%")}})),he(ce(t),"handleContextMenu",(function(t){t.preventDefault()})),he(ce(t),"handleMouseDownOrTouchStartProgressBar",(function(e){e.stopPropagation();var n=t.getCurrentProgress(e.nativeEvent),r=n.currentTime,o=n.currentTimePos;isFinite(r)&&(t.timeOnMouseMove=r,t.setState({isDraggingProgress:!0,currentTimePos:o}),e.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.addEventListener("touchend",t.handleWindowMouseOrTouchUp)))})),he(ce(t),"handleWindowMouseOrTouchMove",(function(e){e instanceof MouseEvent&&e.preventDefault(),e.stopPropagation();var n=window.getSelection();if(n&&"Range"===n.type&&n.empty(),t.state.isDraggingProgress){var r=t.getCurrentProgress(e),o=r.currentTime,i=r.currentTimePos;t.timeOnMouseMove=o,t.setState({currentTimePos:i})}})),he(ce(t),"handleWindowMouseOrTouchUp",(function(e){e.stopPropagation();var n=t.timeOnMouseMove,r=t.props,o=r.audio,i=r.onChangeCurrentTimeError,a=r.onSeek;if(a)t.setState({isDraggingProgress:!1,waitingForSeekCallback:!0},(function(){a(o,n).then((function(){return t.setState({waitingForSeekCallback:!1})}),(function(t){throw new Error(t)}))}));else{var s={isDraggingProgress:!1};o.readyState!==o.HAVE_NOTHING&&o.readyState!==o.HAVE_METADATA&&isFinite(n)?o.currentTime=n:(s.currentTimePos="0%",i&&i()),t.setState(s)}e instanceof MouseEvent?(window.removeEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",t.handleWindowMouseOrTouchUp))})),he(ce(t),"handleAudioTimeUpdate",or((function(e){var n=t.state.isDraggingProgress,r=e.target;if(!n&&!0!==t.state.waitingForSeekCallback){var o=r.currentTime,i=t.getDuration();t.setState({currentTimePos:"".concat((o/i*100||0).toFixed(2),"%")})}}),t.props.progressUpdateInterval)),he(ce(t),"handleAudioDownloadProgressUpdate",(function(e){for(var n=e.target,r=t.getDuration(),o=[],i=0;ii.width?(r=1,o="100%"):(r=s/a,o="".concat(s/a*100,"%")),{currentVolume:r,currentVolumePos:o}})),he(ce(t),"handleContextMenu",(function(t){t.preventDefault()})),he(ce(t),"handleClickVolumeButton",(function(){var e=t.props.audio;e.volume>0?(t.lastVolume=e.volume,e.volume=0):e.volume=t.lastVolume})),he(ce(t),"handleVolumnControlMouseOrTouchDown",(function(e){e.stopPropagation();var n=t.props.audio,r=t.getCurrentVolume(e.nativeEvent),o=r.currentVolume,i=r.currentVolumePos;n.volume=o,t.setState({isDraggingVolume:!0,currentVolumePos:i}),e.nativeEvent instanceof MouseEvent?(window.addEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.addEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.addEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.addEventListener("touchend",t.handleWindowMouseOrTouchUp))})),he(ce(t),"handleWindowMouseOrTouchMove",(function(e){e instanceof MouseEvent&&e.preventDefault(),e.stopPropagation();var n=t.props.audio,r=window.getSelection();if(r&&"Range"===r.type&&r.empty(),t.state.isDraggingVolume){var o=t.getCurrentVolume(e),i=o.currentVolume,a=o.currentVolumePos;n.volume=i,t.setState({currentVolumePos:a})}})),he(ce(t),"handleWindowMouseOrTouchUp",(function(e){e.stopPropagation(),t.setState({isDraggingVolume:!1}),e instanceof MouseEvent?(window.removeEventListener("mousemove",t.handleWindowMouseOrTouchMove),window.removeEventListener("mouseup",t.handleWindowMouseOrTouchUp)):(window.removeEventListener("touchmove",t.handleWindowMouseOrTouchMove),window.removeEventListener("touchend",t.handleWindowMouseOrTouchUp))})),he(ce(t),"handleAudioVolumeChange",(function(e){var n=t.state.isDraggingVolume,r=e.target.volume;(t.lastVolume>0&&0===r||0===t.lastVolume&&r>0)&&t.props.onMuteChange(),t.lastVolume=r,n||(t.setState({hasVolumeAnimation:!0,currentVolumePos:"".concat((r/1*100||0).toFixed(2),"%")}),clearTimeout(t.volumeAnimationTimer),t.volumeAnimationTimer=setTimeout((function(){t.setState({hasVolumeAnimation:!1})}),100))})),t}return se(o,[{key:"componentDidUpdate",value:function(){var t=this.props.audio;t&&!this.hasAddedAudioEventListener&&(this.audio=t,this.hasAddedAudioEventListener=!0,t.addEventListener("volumechange",this.handleAudioVolumeChange))}},{key:"componentWillUnmount",value:function(){this.audio&&this.hasAddedAudioEventListener&&this.audio.removeEventListener("volumechange",this.handleAudioVolumeChange),clearTimeout(this.volumeAnimationTimer)}},{key:"render",value:function(){var t=this.props,e=t.audio,n=t.showFilledVolume,o=t.i18nVolumeControl,i=this.state,a=i.currentVolumePos,s=i.hasVolumeAnimation,c=(e||{}).volume;return r.default.createElement("div",{ref:this.volumeBar,onMouseDown:this.handleVolumnControlMouseOrTouchDown,onTouchStart:this.handleVolumnControlMouseOrTouchDown,onContextMenu:this.handleContextMenu,role:"progressbar","aria-label":o,"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":Number((100*c).toFixed(0)),tabIndex:0,className:"rhap_volume-bar-area"},r.default.createElement("div",{className:"rhap_volume-bar"},r.default.createElement("div",{className:"rhap_volume-indicator",style:{left:a,transitionDuration:s?".1s":"0s"}}),n&&r.default.createElement("div",{className:"rhap_volume-filled",style:{width:a}})))}}]),o}();function vr(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=pe(t);if(e){var o=pe(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return de(this,n)}}!function(t){t.CURRENT_TIME="CURRENT_TIME",t.CURRENT_LEFT_TIME="CURRENT_LEFT_TIME",t.PROGRESS_BAR="PROGRESS_BAR",t.DURATION="DURATION",t.ADDITIONAL_CONTROLS="ADDITIONAL_CONTROLS",t.MAIN_CONTROLS="MAIN_CONTROLS",t.VOLUME_CONTROLS="VOLUME_CONTROLS",t.LOOP="LOOP",t.VOLUME="VOLUME"}(hr||(hr={}));var mr=function(t){ue(o,e.Component);var n=vr(o);function o(){var t;re(this,o);for(var i=arguments.length,a=new Array(i),s=0;s0?(t.lastVolume=e.volume,e.volume=0):e.volume=t.lastVolume})),he(ce(t),"handleMuteChange",(function(){t.forceUpdate()})),he(ce(t),"handleClickLoopButton",(function(){t.audio.current.loop=!t.audio.current.loop,t.forceUpdate()})),he(ce(t),"handleClickRewind",(function(){var e=t.props,n=e.progressJumpSteps,r=e.progressJumpStep,o=n.backward||r;t.setJumpTime(-o)})),he(ce(t),"handleClickForward",(function(){var e=t.props,n=e.progressJumpSteps,r=e.progressJumpStep,o=n.forward||r;t.setJumpTime(o)})),he(ce(t),"setJumpTime",(function(e){var n=t.audio.current,r=n.duration,o=n.currentTime;if(n.readyState===n.HAVE_NOTHING||n.readyState===n.HAVE_METADATA||!isFinite(r)||!isFinite(o))return t.props.onChangeCurrentTimeError&&t.props.onChangeCurrentTimeError();var i=o+e/1e3;i<0?(n.currentTime=0,i=0):i>r?(n.currentTime=r,i=r):n.currentTime=i})),he(ce(t),"setJumpVolume",(function(e){var n=t.audio.current.volume+e;n<0?n=0:n>1&&(n=1),t.audio.current.volume=n})),he(ce(t),"handleKeyDown",(function(e){if(t.props.hasDefaultKeyBindings)switch(e.key){case" ":e.target!==t.container.current&&e.target!==t.progressBar.current||(e.preventDefault(),t.togglePlay(e));break;case"ArrowLeft":t.handleClickRewind();break;case"ArrowRight":t.handleClickForward();break;case"ArrowUp":e.preventDefault(),t.setJumpVolume(t.props.volumeJumpStep);break;case"ArrowDown":e.preventDefault(),t.setJumpVolume(-t.props.volumeJumpStep);break;case"l":t.handleClickLoopButton();break;case"m":t.handleClickVolumeButton()}})),he(ce(t),"renderUIModules",(function(e){return e.map((function(e,n){return t.renderUIModule(e,n)}))})),he(ce(t),"renderUIModule",(function(n,o){var i=t.props,a=i.defaultCurrentTime,s=i.progressUpdateInterval,c=i.showDownloadProgress,l=i.showFilledProgress,u=i.showFilledVolume,d=i.defaultDuration,p=i.customIcons,h=i.showSkipControls,f=i.onClickPrevious,v=i.onClickNext,m=i.onChangeCurrentTimeError,g=i.showJumpControls,y=i.customAdditionalControls,b=i.customVolumeControls,x=i.muted,w=i.timeFormat,j=i.volume,O=i.loop,_=i.mse,C=i.i18nAriaLabels;switch(n){case hr.CURRENT_TIME:return r.default.createElement("div",{key:o,id:"rhap_current-time",className:"rhap_time rhap_current-time"},r.default.createElement(lr,{audio:t.audio.current,isLeftTime:!1,defaultCurrentTime:a,timeFormat:w}));case hr.CURRENT_LEFT_TIME:return r.default.createElement("div",{key:o,id:"rhap_current-left-time",className:"rhap_time rhap_current-left-time"},r.default.createElement(lr,{audio:t.audio.current,isLeftTime:!0,defaultCurrentTime:a,timeFormat:w}));case hr.PROGRESS_BAR:return r.default.createElement(sr,{key:o,ref:t.progressBar,audio:t.audio.current,progressUpdateInterval:s,showDownloadProgress:c,showFilledProgress:l,onSeek:_&&_.onSeek,onChangeCurrentTimeError:m,srcDuration:_&&_.srcDuration,i18nProgressBar:C.progressControl});case hr.DURATION:return r.default.createElement("div",{key:o,className:"rhap_time rhap_total-time"},_&&_.srcDuration?rr(_.srcDuration,_.srcDuration,t.props.timeFormat):r.default.createElement(dr,{audio:t.audio.current,defaultDuration:d,timeFormat:w}));case hr.ADDITIONAL_CONTROLS:return r.default.createElement("div",{key:o,className:"rhap_additional-controls"},t.renderUIModules(y));case hr.MAIN_CONTROLS:var k,M=t.isPlaying();return k=M?p.pause?p.pause:r.default.createElement(Un,{icon:Wn}):p.play?p.play:r.default.createElement(Un,{icon:Hn}),r.default.createElement("div",{key:o,className:"rhap_main-controls"},h&&r.default.createElement("button",{"aria-label":C.previous,className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",type:"button",onClick:f},p.previous?p.previous:r.default.createElement(Un,{icon:Kn})),g&&r.default.createElement("button",{"aria-label":C.rewind,className:"rhap_button-clear rhap_main-controls-button rhap_rewind-button",type:"button",onClick:t.handleClickRewind},p.rewind?p.rewind:r.default.createElement(Un,{icon:Gn})),r.default.createElement("button",{"aria-label":M?C.pause:C.play,className:"rhap_button-clear rhap_main-controls-button rhap_play-pause-button",type:"button",onClick:t.togglePlay},k),g&&r.default.createElement("button",{"aria-label":C.forward,className:"rhap_button-clear rhap_main-controls-button rhap_forward-button",type:"button",onClick:t.handleClickForward},p.forward?p.forward:r.default.createElement(Un,{icon:Jn})),h&&r.default.createElement("button",{"aria-label":C.next,className:"rhap_button-clear rhap_main-controls-button rhap_skip-button",type:"button",onClick:v},p.next?p.next:r.default.createElement(Un,{icon:qn})));case hr.VOLUME_CONTROLS:return r.default.createElement("div",{key:o,className:"rhap_volume-controls"},t.renderUIModules(b));case hr.LOOP:var S,E=t.audio.current?t.audio.current.loop:O;return S=E?p.loop?p.loop:r.default.createElement(Un,{icon:Yn}):p.loopOff?p.loopOff:r.default.createElement(Un,{icon:Zn}),r.default.createElement("button",{key:o,"aria-label":E?C.loop:C.loopOff,className:"rhap_button-clear rhap_repeat-button",type:"button",onClick:t.handleClickLoopButton},S);case hr.VOLUME:var P,N=(t.audio.current||{}).volume,T=void 0===N?x?0:j:N;return P=T?p.volume?p.volume:r.default.createElement(Un,{icon:$n}):p.volume?p.volumeMute:r.default.createElement(Un,{icon:Qn}),r.default.createElement("div",{key:o,className:"rhap_volume-container"},r.default.createElement("button",{"aria-label":T?C.volume:C.volumeMute,onClick:t.handleClickVolumeButton,type:"button",className:"rhap_button-clear rhap_volume-button"},P),r.default.createElement(fr,{audio:t.audio.current,volume:T,onMuteChange:t.handleMuteChange,showFilledVolume:u,i18nVolumeControl:C.volumeControl}));default:return e.isValidElement(n)?n.key?n:e.cloneElement(n,{key:o}):null}})),t}return se(o,[{key:"componentDidMount",value:function(){var t=this;this.forceUpdate();var e=this.audio.current;this.props.muted?e.volume=0:e.volume=this.lastVolume,e.addEventListener("error",(function(e){t.props.onError&&t.props.onError(e)})),e.addEventListener("canplay",(function(e){t.props.onCanPlay&&t.props.onCanPlay(e)})),e.addEventListener("canplaythrough",(function(e){t.props.onCanPlayThrough&&t.props.onCanPlayThrough(e)})),e.addEventListener("play",this.handlePlay),e.addEventListener("abort",this.handleAbort),e.addEventListener("ended",this.handleEnded),e.addEventListener("playing",(function(e){t.props.onPlaying&&t.props.onPlaying(e)})),e.addEventListener("seeking",(function(e){t.props.onSeeking&&t.props.onSeeking(e)})),e.addEventListener("seeked",(function(e){t.props.onSeeked&&t.props.onSeeked(e)})),e.addEventListener("waiting",(function(e){t.props.onWaiting&&t.props.onWaiting(e)})),e.addEventListener("emptied",(function(e){t.props.onEmptied&&t.props.onEmptied(e)})),e.addEventListener("stalled",(function(e){t.props.onStalled&&t.props.onStalled(e)})),e.addEventListener("suspend",(function(e){t.props.onSuspend&&t.props.onSuspend(e)})),e.addEventListener("loadstart",(function(e){t.props.onLoadStart&&t.props.onLoadStart(e)})),e.addEventListener("loadedmetadata",(function(e){t.props.onLoadedMetaData&&t.props.onLoadedMetaData(e)})),e.addEventListener("loadeddata",(function(e){t.props.onLoadedData&&t.props.onLoadedData(e)})),e.addEventListener("pause",this.handlePause),e.addEventListener("timeupdate",or((function(e){t.props.onListen&&t.props.onListen(e)}),this.props.listenInterval)),e.addEventListener("volumechange",(function(e){t.props.onVolumeChange&&t.props.onVolumeChange(e)})),e.addEventListener("encrypted",(function(e){var n=t.props.mse;n&&n.onEcrypted&&n.onEcrypted(e)}))}},{key:"componentDidUpdate",value:function(t){var e=this.props,n=e.src,r=e.autoPlayAfterSrcChange;t.src!==n&&(r?this.playAudioPromise():this.forceUpdate())}},{key:"render",value:function(){var t=this.props,e=t.className,n=t.src,o=t.loop,i=t.preload,a=t.autoPlay,s=t.crossOrigin,c=t.mediaGroup,l=t.header,u=t.footer,d=t.layout,p=t.customProgressBarSection,h=t.customControlsSection,f=t.children,v=t.style,m=t.i18nAriaLabels,g=this.audio.current?this.audio.current.loop:o,y=g?"rhap_loop--on":"rhap_loop--off",b=this.isPlaying()?"rhap_play-status--playing":"rhap_play-status--paused";return r.default.createElement("div",{role:"group",tabIndex:0,"aria-label":m.player,className:"rhap_container ".concat(y," ").concat(b," ").concat(e),onKeyDown:this.handleKeyDown,ref:this.container,style:v},r.default.createElement("audio",{src:n,controls:!1,loop:g,autoPlay:a,preload:i,crossOrigin:s,mediaGroup:c,ref:this.audio},f),l&&r.default.createElement("div",{className:"rhap_header"},l),r.default.createElement("div",{className:"rhap_main ".concat(tr(d))},r.default.createElement("div",{className:"rhap_progress-section"},this.renderUIModules(p)),r.default.createElement("div",{className:"rhap_controls-section"},this.renderUIModules(h))),u&&r.default.createElement("div",{className:"rhap_footer"},u))}}]),o}();he(mr,"defaultProps",{autoPlay:!1,autoPlayAfterSrcChange:!0,listenInterval:1e3,progressJumpStep:5e3,progressJumpSteps:{},volumeJumpStep:.1,loop:!1,muted:!1,preload:"auto",progressUpdateInterval:20,defaultCurrentTime:"--:--",defaultDuration:"--:--",timeFormat:"auto",volume:1,className:"",showJumpControls:!0,showSkipControls:!1,showDownloadProgress:!0,showFilledProgress:!0,showFilledVolume:!1,customIcons:{},customProgressBarSection:[hr.CURRENT_TIME,hr.PROGRESS_BAR,hr.DURATION],customControlsSection:[hr.ADDITIONAL_CONTROLS,hr.MAIN_CONTROLS,hr.VOLUME_CONTROLS],customAdditionalControls:[hr.LOOP],customVolumeControls:[hr.VOLUME],layout:"stacked",hasDefaultKeyBindings:!0,i18nAriaLabels:{player:"Audio player",progressControl:"Audio progress control",volumeControl:"Volume control",play:"Play",pause:"Pause",rewind:"Rewind",forward:"Forward",previous:"Previous",next:"Skip",loop:"Disable loop",loopOff:"Enable loop",volume:"Mute",volumeMute:"Unmute"}});var gr=function(){return gr=Object.assign||function(t){for(var e,n=1,r=arguments.length;n0?t.jsx("span",{children:c}):null})),void 0!==v.customStatusComponents?v.customStatusComponents.map((function(e){return t.jsx(e,{})})):null]}))]}),"rce-citem-body")]]}))}),v.id)},Tr=function(){return Tr=Object.assign||function(t){for(var e,n=1,r=arguments.length;nr?"...":"");return t.jsxs("div",Dr({className:lt("rce-container-mtitem",_.className),onClick:i,onContextMenu:_.onContextMenu},{children:[t.jsx("audio",{autoPlay:!0,loop:!0,muted:g,src:_.audioSource}),t.jsxs("div",Dr({className:"rce-mtitem"},{children:[t.jsxs("div",Dr({className:"rce-mtitem-top"},{children:[t.jsx("div",Dr({className:"rce-mtitem-subject"},{children:S})),t.jsx("div",Dr({className:"rce-mtitem-share",onClick:O},{children:t.jsx(Tt,{})}))]})),t.jsxs("div",Dr({className:"rce-mtitem-body"},{children:[t.jsxs("div",Dr({className:"rce-mtitem-body--avatars"},{children:[null==v?void 0:v.slice(0,k).map((function(e,n){return t.jsx(Kt,{src:e.src,alt:e.alt,className:"encircle"===e.statusColorType?"rce-mtitem-avatar-encircle-status":"",size:"small",letterItem:e.letterItem,sideElement:e.statusColor?t.jsx("span",Dr({className:"rce-mtitem-status",style:"encircle"===C?{boxShadow:"inset 0 0 0 2px ".concat(e.statusColor,", inset 0 0 0 5px #FFFFFF")}:{backgroundColor:e.statusColor}},{children:e.statusText})):t.jsx(t.Fragment,{}),onError:b,lazyLoadingImage:d,type:lt("circle",{flexible:s})},n)})),v&&k&&v.length>k&&t.jsx("div",Dr({className:"rce-avatar-container circle small rce-mtitem-letter"},{children:t.jsx("span",{children:"+"+(v.length-k)})}))]})),t.jsxs("div",Dr({className:"rce-mtitem-body--functions"},{children:[_.closable&&t.jsx("div",Dr({className:"rce-mtitem-closable",onClick:_.onCloseClick},{children:t.jsx(Et,{})})),t.jsx("div",Dr({className:"rce-mtitem-button",onClick:w},{children:t.jsx(kt,{})}))]}))]})),t.jsx("div",Dr({className:"rce-mtitem-footer"},{children:t.jsx("span",Dr({className:"rce-mtitem-date"},{children:M}))}))]}))]}))},Rr=function(){return Rr=Object.assign||function(t){for(var e,n=1,r=arguments.length;nv.maxlength&&(v.onMaxLengthExceed instanceof Function&&v.onMaxLengthExceed(),(null===(n=null===(e=v.referance)||void 0===e?void 0:e.current)||void 0===n?void 0:n.value)==(t.target.value||"").substring(0,v.maxlength)))&&(v.onChange instanceof Function&&v.onChange(t),!0===a&&!0===p)){t.target.style.height!==c+"px"&&(t.target.style.height=c+"px");var r=void 0;r=t.target.scrollHeight<=u?t.target.scrollHeight+"px":u+"px",t.target.style.height!==r&&(t.target.style.height=r)}},g=function(){var t,e,n,r={FAKE_EVENT:!0,target:null===(t=v.referance)||void 0===t?void 0:t.current};(null===(n=null===(e=v.referance)||void 0===e?void 0:e.current)||void 0===n?void 0:n.value)&&(v.referance.current.value=""),m(r)};return t.jsxs("div",Vr({className:lt("rce-container-input",v.className)},{children:[v.leftButtons&&t.jsx("div",Vr({className:"rce-input-buttons"},{children:v.leftButtons})),!1===a?t.jsx("input",{ref:v.referance,type:o,className:lt("rce-input"),placeholder:v.placeholder,defaultValue:v.defaultValue,style:v.inputStyle,onChange:m,onCopy:v.onCopy,onCut:v.onCut,onPaste:v.onPaste,onBlur:v.onBlur,onFocus:v.onFocus,onSelect:v.onSelect,onSubmit:v.onSubmit,onReset:v.onReset,onKeyDown:v.onKeyDown,onKeyPress:v.onKeyPress,onKeyUp:v.onKeyUp}):t.jsx("textarea",{ref:v.referance,className:lt("rce-input","rce-input-textarea"),placeholder:v.placeholder,defaultValue:v.defaultValue,style:v.inputStyle,onChange:m,onCopy:v.onCopy,onCut:v.onCut,onPaste:v.onPaste,onBlur:v.onBlur,onFocus:v.onFocus,onSelect:v.onSelect,onSubmit:v.onSubmit,onReset:v.onReset,onKeyDown:v.onKeyDown,onKeyPress:v.onKeyPress,onKeyUp:v.onKeyUp}),v.rightButtons&&t.jsx("div",Vr({className:"rce-input-buttons"},{children:v.rightButtons}))]}))},exports.LocationMessage=ft,exports.MeetingItem=Ir,exports.MeetingLink=xr,exports.MeetingList=function(e){var n;return t.jsx("div",Rr({ref:e.cmpRef,className:lt("rce-container-mtlist",e.className)},{children:null===(n=e.dataSource)||void 0===n?void 0:n.map((function(n,r){return t.jsx(Ir,Rr({lazyLoadingImage:e.lazyLoadingImage},n,{onAvatarError:function(t){return function(t,n,r){e.onAvatarError instanceof Function&&e.onAvatarError(t,n,r)}(n,r,t)},onContextMenu:function(t){return function(t,n,r){r.preventDefault(),e.onContextMenu instanceof Function&&e.onContextMenu(t,n,r)}(n,r,t)},onClick:function(t){return function(t,n,r){e.onClick instanceof Function&&e.onClick(t,n,r)}(n,r,t)},onMeetingClick:function(t){return function(t,n,r){e.onMeetingClick instanceof Function&&e.onMeetingClick(t,n,r)}(n,r,t)},onShareClick:function(t){return function(t,n,r){e.onShareClick instanceof Function&&e.onShareClick(t,n,r)}(n,r,t)},onCloseClick:function(t){return function(t,n,r){e.onCloseClick instanceof Function&&e.onCloseClick(t,n,r)}(n,r,t)}}),r)}))}))},exports.MeetingMessage=te,exports.MessageBox=Sr,exports.MessageList=function(n){var r=n.referance,o=void 0===r?null:r,i=n.lockable,a=void 0!==i&&i,s=n.toBottomHeight,c=void 0===s?300:s,l=n.downButton,u=Ar(n,["referance","lockable","toBottomHeight","downButton"]),d=e.useState(0),p=d[0],h=d[1],v=e.useState(!1),m=v[0],g=v[1],y=e.useRef(u);e.useEffect((function(){var t;o&&(y.current.dataSource.length!==u.dataSource.length&&(h(b(o)),(t=o)&&t.current&&("100%"===c||c&&pc?!0!==m&&(g(!0),h(e)):!1!==m&&(g(!1),h(e)),u.onScroll instanceof Function&&u.onScroll(t)},className:"rce-mlist"},{children:u.dataSource.map((function(e,n){return t.jsx(Sr,Lr({},e,{onOpen:u.onOpen&&function(t){return function(t,e,n){u.onOpen instanceof Function&&u.onOpen(t,e,n)}(e,n,t)},onPhotoError:u.onPhotoError&&function(t){return function(t,e,n){u.onPhotoError instanceof Function&&u.onPhotoError(t,e,n)}(e,n,t)},onDownload:u.onDownload&&function(t){return function(t,e,n){u.onDownload instanceof Function&&u.onDownload(t,e,n)}(e,n,t)},onTitleClick:u.onTitleClick&&function(t){return function(t,e,n){u.onTitleClick instanceof Function&&u.onTitleClick(t,e,n)}(e,n,t)},onForwardClick:u.onForwardClick&&function(t){return function(t,e,n){u.onForwardClick instanceof Function&&u.onForwardClick(t,e,n)}(e,n,t)},onReplyClick:u.onReplyClick&&function(t){return function(t,e,n){u.onReplyClick instanceof Function&&u.onReplyClick(t,e,n)}(e,n,t)},onReplyMessageClick:u.onReplyMessageClick&&function(t){return function(t,e,n){u.onReplyMessageClick instanceof Function&&u.onReplyMessageClick(t,e,n)}(e,n,t)},onRemoveMessageClick:u.onRemoveMessageClick&&function(t){return function(t,e,n){u.onRemoveMessageClick instanceof Function&&u.onRemoveMessageClick(t,e,n)}(e,n,t)},onClick:u.onClick&&function(t){return function(t,e,n){u.onClick instanceof Function&&u.onClick(t,e,n)}(e,n,t)},onContextMenu:u.onContextMenu&&function(t){return function(t,e,n){u.onContextMenu instanceof Function&&u.onContextMenu(t,e,n)}(e,n,t)},onMeetingMoreSelect:u.onMeetingMoreSelect&&function(t){return function(t,e,n){u.onMeetingMoreSelect instanceof Function&&u.onMeetingMoreSelect(t,e,n)}(e,n,t)},onMessageFocused:u.onMessageFocused&&function(t){return function(t,e,n){u.onMessageFocused instanceof Function&&u.onMessageFocused(t,e,n)}(e,n,t)},onMeetingMessageClick:u.onMeetingMessageClick&&function(t){return function(t,e,n){u.onMeetingMessageClick instanceof Function&&u.onMeetingMessageClick(t,e,n)}(e,n,t)},onMeetingTitleClick:u.onMeetingTitleClick,onMeetingVideoLinkClick:u.onMeetingVideoLinkClick,onMeetingLinkClick:u.onMeetingLinkClick&&function(t){return function(t,e,n){u.onMeetingLinkClick instanceof Function&&u.onMeetingLinkClick(t,e,n)}(e,n,t)},actionButtons:u.actionButtons,styles:u.messageBoxStyles,notchStyle:u.notchStyle}),n)}))})),!0===l&&m&&"100%"!==c&&t.jsxs("div",Lr({className:"rce-mlist-down-button",onClick:function(t){o&&(o.current.scrollTop=o.current.scrollHeight,u.onDownButtonClick instanceof Function&&u.onDownButtonClick(t))}},{children:[t.jsx(f,{}),void 0!==u.downButtonBadge?t.jsx("span",Lr({className:"rce-mlist-down-button--badge"},{children:u.downButtonBadge.toString()})):null]}))]}))},exports.Navbar=function(e){var n=e.type,r=void 0===n?"light":n,o=Ur(e,["type"]);return t.jsxs("div",Br({className:lt("rce-navbar",r,o.className)},{children:[t.jsx("div",Br({className:"rce-navbar-item rce-navbar-item__left"},{children:o.left})),t.jsx("div",Br({className:"rce-navbar-item rce-navbar-item__center"},{children:o.center})),t.jsx("div",Br({className:"rce-navbar-item rce-navbar-item__right"},{children:o.right}))]}))},exports.PhotoMessage=it,exports.Popup=function(e){var n,r,o,i,a,s,c,l,u,d,p,h,f,v,m,g=qr(e,[]);return!0===(null===(n=g.popup)||void 0===n?void 0:n.show)?t.jsx("div",Kr({className:lt("rce-popup-wrapper",g.type,g.className)},{children:t.jsxs("div",Kr({className:"rce-popup"},{children:[(null===(r=g.popup)||void 0===r?void 0:r.renderHeader)?t.jsx("div",Kr({className:"rce-popup-header"},{children:null===(o=g.popup)||void 0===o?void 0:o.renderHeader()})):t.jsxs("div",Kr({className:"rce-popup-header"},{children:[t.jsx("span",{children:null===(i=g.popup)||void 0===i?void 0:i.header}),(null===(a=g.popup)||void 0===a?void 0:a.header)&&(null===(c=null===(s=g.popup)||void 0===s?void 0:s.headerButtons)||void 0===c?void 0:c.map((function(e,n){return t.jsx(Gt,Kr({},e),n)})))]})),t.jsx("div",Kr({className:"rce-popup-content",style:{color:null===(l=g.popup)||void 0===l?void 0:l.color}},{children:(null===(u=g.popup)||void 0===u?void 0:u.renderContent)?null===(d=g.popup)||void 0===d?void 0:d.renderContent():null===(p=g.popup)||void 0===p?void 0:p.text})),t.jsx("div",Kr({className:"rce-popup-footer"},{children:(null===(h=g.popup)||void 0===h?void 0:h.renderFooter)?null===(f=g.popup)||void 0===f?void 0:f.renderFooter():null===(m=null===(v=g.popup)||void 0===v?void 0:v.footerButtons)||void 0===m?void 0:m.map((function(e,n){return t.jsx(Gt,Kr({},e),n)}))}))]}))})):null},exports.ReplyMessage=xt,exports.SideBar=function(e){var n,r,o,i=e.type,a=void 0===i?"dark":i,s=Wr(e,["type"]);return t.jsxs("div",Hr({className:lt("rce-sbar",a,s.data.className)},{children:[t.jsx("div",Hr({className:"rce-sbar-item"},{children:null===(n=s.data)||void 0===n?void 0:n.top})),t.jsx("div",Hr({className:"rce-sbar-item rce-sbar-item__center"},{children:null===(r=s.data)||void 0===r?void 0:r.center})),t.jsx("div",Hr({className:"rce-sbar-item"},{children:null===(o=s.data)||void 0===o?void 0:o.bottom}))]}))},exports.SpotifyMessage=gt,exports.SystemMessage=dt,exports.VideoMessage=ne; diff --git a/dist/type.d.ts b/dist/type.d.ts new file mode 100644 index 00000000..ed2e7341 --- /dev/null +++ b/dist/type.d.ts @@ -0,0 +1,1153 @@ +import React from 'react' + +/** + * IChatItemProps Interface + * @prop id The Chat Item's id and required. + * @prop avatar The Chat Item's avatar and required. + * @prop unread The Chat Item's message unread and optional. + * @prop className The Chat Item's component className and optional. + * @prop avatarFlexible The Chat Item's avatar avatarFlexible and optional. + * @prop alt The Chat Item's avatar alt and optional. + * @prop title The Chat Item's title and optional. + * @prop subtitle The Chat Item's subtitle and optional. + * @prop date The Chat Item's message date and optional. + * @prop dateString The Chat Item's message dateString and optional. + * @prop statusColor The Chat Item's statusColor and optional. + * @prop statusText The Chat Item's statusText and optional. + * @prop lazyLoadingImage The Chat Item's lazyLoadingImage and optional. + * @prop muted The Chat Item's muted and optional. + * @prop showMute The Chat Item's showMute icon and optional. + * @prop showVideoCall The Chat Item's showVideoCall icon and optional. + * @prop onAvatarError The Chat Item's avatar function onAvatarError(event: React.MouseEvent) and optional. + * @prop onContextMenu The Chat Item's function onContextMenu(event: React.MouseEvent) and optional. + * @prop onClick The Chat Item's function onClick(event: React.MouseEvent) and optional. + * @prop onClickMute The Chat Item's mute icon function onClickMute(event: React.MouseEvent) and optional. + * @prop onClickVideoCall The Chat Item's videoCall icon function onClickVideoCall(event: React.MouseEvent) and optional. + * @prop onDragOver The Chat Item's drag over function and optional. + * @prop onDragEnter The Chat Item's drag enter function and optional. + * @prop onDrop The Chat Item's drop function and optional. + * @prop onDragLeave The Chat Item's drop leave function and optional. + * @prop onDragComponent The Chat Item's drag component and optional. + * @prop letterItem The Chat Item's avatar letterItem and optional. + */ +export interface IChatItemProps { + id: string | number + avatar: string + unread?: number + className?: string + avatarFlexible?: boolean + alt?: string + title?: string + subtitle?: string + date?: Date + dateString?: string + statusColor?: string + statusColorType?: string + statusText?: string + lazyLoadingImage?: string + muted?: boolean + showMute?: boolean + showVideoCall?: boolean + onAvatarError?: React.MouseEventHandler + onContextMenu?: React.MouseEventHandler + onClick?: React.MouseEventHandler + onClickMute?: React.MouseEventHandler + onClickVideoCall?: React.MouseEventHandler + onDragOver?: Function + onDragEnter?: Function + onDrop?: Function + onDragLeave?: Function + onDragComponent?: any + letterItem?: ILetterItem + customStatusComponents?: React.ElementType[] +} + +/** + * ILetterItem Interface + * @prop id The LetterItem's id and required. + * @prop letter The Letter Item's letter is a component and optional. + */ +export interface ILetterItem { + id: string + letter?: React.ReactChild +} + +/** + * IChatListProps Interface + * @prop id The ChatList's id and required. + * @prop className The Chat List's component className and optional. + * @prop lazyLoadingImage The Chat List's lazyLoadingImage and optional. + * @prop datasource The Chat List's dataSource is a IChatItemProps array and required. + * @prop cmpRef The Chat List's cmpRef and optional. + * @prop onAvatarError The Chat Item's function onAvatarError(item: IChatItemProps, index: number, event: React.MouseEvent) and optional. + * @prop onContextMenu The Chat Item's function onContextMenu(item: IChatItemProps, index: number, event: React.MouseEvent) and optional. + * @prop onClick The Chat Item's function onClick(item: IChatItemProps, index: number, event: React.MouseEvent) and optional. + * @prop onClickMute The Chat Item's function onClickMute(item: IChatItemProps, index: number, event: React.MouseEvent) and optional. + * @prop onClickVideoCall The Chat Item's function onClickVideoCall(item: IChatItemProps, index: number, event: React.MouseEvent) and optional. + * @prop onDragOver The Chat Item's drag over function and optional. + * @prop onDragEnter The Chat Item's drag enter function and optional. + * @prop onDrop The Chat Item's drop function and optional. + * @prop onDragLeave The Chat Item's drop leave function and optional. + * @prop onDragComponent The Chat Item's drag component and optional. + */ +export interface IChatListProps { + id: string | number + className?: string + lazyLoadingImage: string + dataSource: IChatItemProps[] + cmpRef?: React.Ref + onAvatarError?: ChatListEvent + onContextMenu?: ChatListEvent + onClick?: ChatListEvent + onClickMute?: ChatListEvent + onClickVideoCall?: ChatListEvent + onDragOver?: Function + onDragEnter?: Function + onDrop?: Function + onDragLeave?: Function + onDragComponent?: Function +} + +/** + * ChatListEvent Type + * @param item The ChatListEvent's item is a IChatItemProps. + * @param index The Chat List's index. + * @param event The Chat List's event. + */ +type ChatListEvent = (item: IChatItemProps, index: number, event: React.MouseEvent) => any + +/** + * + */ +export interface IDefaultProps { + style: { + [key: string]: unknown + } + onClick: Function +} + +/** + * IMessage Interface + * @prop id The Message's id and requried. + * @prop position The Message's position and requried. + * @prop text The Message's text and requried. + * @prop title The Message's title and requried. + * @prop focus The Message's focus and requried. + * @prop date The Message's date and requried. + * @prop dateString The Message's dateString and optional. + * @prop avatar The Message's avatar image and optional. + * @prop titleColor The Message's titleColor and required. + * @prop forwarded The Message's forwarded and required. + * @prop replyButton The Message's replyButton icon and required. + * @prop removeButton The Message's removeButton icon and required. + * @prop status The Message's status icon and required. + * @prop notch The Message's notch and required. + * @prop copiableDate The Message's copiableDate and optional. + * @prop retracted The Message's retracted and required. + * @prop className The Message's className and optional. + * @prop letterItem The Message's letterItem is a ILetterItem and optional. + * @prop reply The Message's reply and optional. + */ +export interface IMessage { + id: string | number + position: string + text: string + title: string + focus: boolean + date: number | Date + dateString?: string + avatar?: string + titleColor: string + forwarded: boolean + replyButton: boolean + removeButton: boolean + status: 'waiting' | 'sent' | 'received' | 'read' + notch: boolean + copiableDate?: boolean + retracted: boolean + className?: string + letterItem?: ILetterItem + reply?: IReplyMessage | any + type: string +} + +/** + * IPhotoMessage Interface + * @prop type The Photo Message's type is "photo" and required. + * @prop width The Photo Message's width and optional. + * @prop height The Photo Message's height and optional. + * @prop uri The Photo Message's uri and required. + * @prop alt The Photo Message's alt and optional. + */ +export interface IPhotoMessage extends IMessage { + data?: { + status: IMessageDataStatus + uri: string + width?: number + height?: number + name?: string + extension?: string + size?: number + id?: string + alt?: string + } +} + +/** + * IPhotoMessageProps Interface + * @prop type The Photo Message's type is "photo" and required. + * @prop message The Photo Message's message is a IPhotoMessage and required. + * @prop onDownload The Photo Message's function onDownload(event: React.MouseEvent) and optional. + * @prop onOpen The Photo Message's function onOpen(event: React.MouseEvent) and optional. + * @prop onLoad The Photo Message's function onLoad(event: React.MouseEvent) and optional. + * @prop onError The Photo Message's function onError(event: React.MouseEvent) and optional. + */ +export interface IPhotoMessageProps extends IPhotoMessage { + onDownload?: React.MouseEventHandler + onOpen?: React.MouseEventHandler + onLoad?: React.ReactEventHandler + onPhotoError?: React.ReactEventHandler +} + +/** + * IReplyMessage Interface extends IMessage + * @prop type The Reply Message's type is "reply" and required. + * @prop photoURL The Reply Message's photoURL and optional. + * @prop message The Reply Message's message and optional. + */ +export interface IReplyMessage extends IMessage { + message: string + photoURL: string +} + +/** + * IReplyMessageProps Interface + * @prop type The Reply Message's type is "reply" and required. + * @prop message The Reply Message's message is a IReplyMessage and required. + * @prop onClick The Reply Message's function onClick(event: React.MouseEvent) and optional. + */ +export interface IReplyMessageProps extends IReplyMessage { + onClick?: React.MouseEventHandler +} + +/** + * IMeetingMessage Interface extens IMessage + * @prop type The Meeting Message's type is "meeting" and required. + * @prop message The Meeting Message's message and optional. + * @prop avatarFlexible The Meeting Message's avatarFlexible and optional. + * @prop event The Meeting Message's event and optional. + * @prop record The Meeting Message's record and optional. + */ +export interface IMeetingMessage extends IMessage { + message?: string + avatarFlexible?: boolean + event?: { + title?: string + avatars?: IAvatarProps[] + avatarsLimit?: any + } + record?: { + avatar: string + title?: string + savedBy?: string + time?: string + } +} + +/** + * IMeetingMessageProps Interface + * @prop type The Meeting Message's type is "meeting" and required. + * @prop subject The Meeting Message's subject and optional. + * @prop title The Meeting Message's title and optional. + * @prop date The Meeting Message's date and optional. + * @prop dateString The Meeting Message's dateString and optional. + * @prop collapseTitle The Meeting Message's collapseTitle and optional. + * @prop participants The Meeting Message's participants and optional. + * @prop more The Meeting Message's more and optional. + * @prop message The Meeting Message's message is a IMeetingMessage and required. + * @prop dataSource The Meeting Message's dataSource is a IMeetingMessage array and optional. + * @prop participantsLimit The Meeting Message's participantsLimit and optional. + * @prop onclick The Meeting Message's function onclick(event: React.MouseEvent) and optional. + * @prop onMeetingTitleClick The Meeting Message's function onMeetingTitleClick(item: IMeetingMessage, index: number, event: React.MouseEvent) and optional. + * @prop onMeetingVideoLinkClick The Meeting Message's function onMeetingVideoLinkClick(item: IMeetingMessage, index: number, event: React.MouseEvent) and optional. + * @prop onMeetingMoreSelect The Meeting Message's function onMeetingMoreSelect and optional. + */ +export interface IMeetingMessageProps extends IMeetingMessage { + subject?: string + dateString?: string + collapseTitle?: string + participants?: Array<{ + id?: number | string + title?: string + }> + moreItems?: Array<{ + text?: string + icon?: { + component?: any + float?: string + color?: string + size?: number + } + }> + dataSource?: IMeetingMessage[] + participantsLimit?: number + onClick?: React.MouseEventHandler + onMeetingTitleClick?: MeetingMessageEvent + onMeetingVideoLinkClick?: MeetingMessageEvent + onMeetingMoreSelect?: Function +} + +/** + * IVideoMessage Interface + * @prop type The Video Message's type is "video" and required. + * @prop videoURL The Video Message's videoURL and required. + * @prop uri The Video Message's uri and required. + * @prop width The Video Message's width and optional. + * @prop height The Video Message's height and optional. + * @prop alt The Video Message's alt and optional. + */ +export interface IVideoMessage extends IMessage { + controlsList: string + data: { + videoURL?: string + thumbnailURL?: string + width?: number + height?: number + name?: string + extension?: string + size?: string + alt?: string + id?: string + uri?: string + status?: IMessageDataStatus + } +} + +/** + * IVideoMessageProps Interface + * @prop type The Video Message's type is "video" and required. + * @prop message The Video Message's message is a IVideoMessage and required. + * @prop onDownload The Video Message's function onDownload(event: React.MouseEvent) and optional. + * @prop onOpen The Video Message's function onOpen(event: React.MouseEvent) and optional. + * @prop onLoad The Video Message's function onLoad(event: React.MouseEvent) and optional. + * @prop onPhotoError The Video Message's function onPhotoError(event: React.SyntheticEvent) and optional. + */ +export interface IVideoMessageProps extends IVideoMessage { + onDownload?: React.MouseEventHandler + onOpen?: React.MouseEventHandler + onLoad?: React.ReactEventHandler + onPhotoError?: React.ReactEventHandler +} + +/** + * ISystemMessage Interface extends IMessage + * @prop type The System Message's type is "system" and required. + * @prop text The System Message's text and requried. + */ +export interface ISystemMessage extends IMessage { + text: string +} + +/** + * ISystemMessageProps Interface + * @prop type The System Message's type is "system" and required. + * @prop message The System Message's message is ISystemMessage and required. + * @prop className The System Message's className and optional. + */ +export interface ISystemMessageProps extends ISystemMessage { + className?: string +} + +/** + * IAudioMessage Interface extends IMessage + * @prop type The Audio Message's type is "audio" and required. + * @prop audioURL The Audio Message's audio url and required. + * @prop audioType The Audio Message's audio type and optional. + * @prop controlsList The Audio Message's controls list and optional. + */ +export interface IAudioMessage extends IMessage { + data: { + audioURL?: string + extension?: string + name?: string + size?: string + duration?: number + id?: string + audioType?: 'audio/mp3' | string + controlsList?: string + } +} + +/** + * IAudioMessageProps Interface + * @prop type The Audio Message's type is "audio" and required. + * @prop message The Audio Message's message is a IAudioMessage and required. + * @prop audioProps The Audio Message's audioProps and optional. + * @prop customStyle The Audio Message's customStyle and optional. + * @prop onOpen The Audio Message's function onOpen(event: React.MouseEvent) and optional. + * @prop onDownload The Audio Message's function onDownload(event: React.MouseEvent) and optional. + * @prop onLoad The Audio Message's function onLoad(event: React.SyntheticEvent) and optional. + */ +export interface IAudioMessageProps extends IAudioMessage { + audioProps?: { + [key: string]: unknown + } + customStyle?: any + onOpen?: React.MouseEventHandler + onDownload?: React.MouseEventHandler + onLoad?: React.ReactEventHandler +} + +/** + * IFeedbackMessage Interface extends IMessage + * @prop type The Feedback Message's type is "audio" and required. + * @prop audioURL The Feedback Message's audio url and required. + * @prop audioType The Feedback Message's audio type and optional. + * @prop controlsList The Feedback Message's controls list and optional. + */ +export interface IFeedbackMessage extends IMessage { + data: { + audioURL?: string + extension?: string + name?: string + size?: string + duration?: number + id?: string + audioType?: 'audio/mp3' | string + controlsList?: string + } +} + +/** + * IFeedbackMessageProps Interface + * @prop type The Feedback Message's type is "audio" and required. + * @prop message The Feedback Message's message is a IFeedbackMessage and required. + * @prop audioProps The Feedback Message's audioProps and optional. + * @prop customStyle The Feedback Message's customStyle and optional. + * @prop onOpen The Feedback Message's function onOpen(event: React.MouseEvent) and optional. + * @prop onDownload The Feedback Message's function onDownload(event: React.MouseEvent) and optional. + * @prop onLoad The Feedback Message's function onLoad(event: React.SyntheticEvent) and optional. + */ +export interface IFeedbackMessageProps extends IFeedbackMessage { + audioProps?: { + [key: string]: unknown + } + customStyle?: any + onOpen?: React.MouseEventHandler + onDownload?: React.MouseEventHandler + onLoad?: React.ReactEventHandler +} + +/** + * IFileMessage Interface + * @prop type The File Message's type is "file" and required. + * @prop size The File Message's size and optional. + */ +export interface IFileMessage extends IMessage { + data: { + name?: string + extension?: string + size?: string + id?: string + uri?: string + status?: IMessageDataStatus + } +} + +/** + * IFileMessageProps Interface + * @prop type The File Message's type is "file" and required. + * @prop message The File Message's message is a IFileMessage and required. + * @prop text The File Message's text and optional. + * @prop onDownload The File Message's function onDownload and optional. + * @prop onOpen The File Message's function onOpen(event: React.MouseEvent) and optional. + */ +export interface IFileMessageProps extends IFileMessage { + onDownload?: Function + onOpen?: React.MouseEventHandler +} + +/** + * ILocationMessage Interface + * @prop type The Location Message's type is "location" and required. + * @prop latitude The Location Message's latitude and required. + * @prop longitude The Location Message's longitude and required. + * @prop staticURL The Location Message's static url and required. + * @prop mapURL The Location Message's map url and optional. + */ +export interface ILocationMessage extends IMessage { + data: { + latitude: string + longitude: string + staticURL: string + mapURL?: string + } +} + +/** + * ILocationMessageProps Interface + * @prop type The Location Message's type is "location" and required. + * @prop message The Location Message's message is a ILocationMessage and required. + * @prop marker The Location Message's marker and required. + * @prop zoom The Location Message's zoom and required. + * @prop apiKey The Location Message's api key and required. + * @prop className The Location Message's className and optional. + * @prop text The Location Message's text and optional. + * @prop src The Location Message's source and optional. + * @prop target The Location Message's target and optional. + * @prop href The Location Message's href and optional. + * @prop onOpen The Location Message's function onOpen(event: React.MouseEvent) and optional. + * @prop onError The Location Message's function onError(event: React.SyntheticEvent) and optional. + */ +export interface ILocationMessageProps extends ILocationMessage { + markerColor: string + zoom: string + apiKey: string + className?: string + src?: string + target?: string + href?: string + onOpen?: React.MouseEventHandler + onError?: React.ReactEventHandler +} + +/** + * ISpotifyMessage Interface extends IMessage + * @prop type The Spotify Message's type is "spotify" and required. + * @prop uri The Spotify Message's uri and required. + * @prop theme The Spotify Message's theme and optional. + * @prop view The Spotify Message's view and optional. + * @prop width The Spotify Message's width and optional. + * @prop height The Spotify Message's height and optional. + * @prop text The Spotify Message's text and optional. + */ +export interface ISpotifyMessage extends IMessage { + uri: string + theme?: string + view?: string + width?: number | string + height?: number | string +} + +/** + * ISpotifyMessageProps Interface + * @prop type The Spotify Message's type is "spotify" and required. + * @prop message The Spotify Message's message is a ISpotifyMessage and required. + */ +export interface ISpotifyMessageProps extends ISpotifyMessage {} + +/** + * IMessageBoxProps Interface + * @prop data The Message Box'es data is a MessageType and required. + * @prop onMessageFocused The Message Box'es onMessageFocused and optional. + * @prop renderAddCmp The Message Box'es renderAddCmp is a component and optional. + * @prop onClick The Message Box'es function onClick(event: React.MouseEvent) and optional. + * @prop onOpen The Message Box'es function onOpen(event: React.MouseEvent) and optional. + * @prop onPhotoError The Message Box'es function onPhotoError(event: React.MouseEvent) and optional. + * @prop onContextMenu The Message Box'es function onContextMenu(event: React.MouseEvent) and optional. + * @prop onForwardClick The Message Box'es function onForwardClick(event: React.MouseEvent) and optional. + * @prop onReplyClick The Message Box'es function onReplyClick(event: React.MouseEvent) and optional. + * @prop onRemoveMessageClick The Message Box'es function onRemoveMessageClick(event: React.MouseEvent) and optional. + * @prop onTitleClick The Message Box'es function onTitleClick(event: React.MouseEvent) and optional. + * @prop onMeetingMessageClick The Message Box'es function onMeetingMessageClick(event: React.MouseEvent) and optional. + * @prop onDownload The Message Box'es function onDownload(event: React.MouseEvent) and optional. + * @prop onMeetingMoreSelect The Message Box'es function onMeetingMoreSelect(event: React.MouseEvent) and optional. + * @prop onMeetingLinkClick The Message Box'es function onMeetingLinkClick(event: React.MouseEvent) and optional. + * @prop onMeetingTitleClick The Message Box'es function onMeetingTitleClick(event: React.MouseEvent) and optional. + * @prop onMeetingVideoLinkClick The Message Box'es function onMeetingVideoLinkClick(event: React.MouseEvent) and optional. + */ +export interface IMessageBoxProps { + onMessageFocused?: any + renderAddCmp?: React.Component + onClick?: React.MouseEventHandler + onOpen?: React.MouseEventHandler + onPhotoError?: React.MouseEventHandler + onContextMenu?: React.MouseEventHandler + onForwardClick?: React.MouseEventHandler + onReplyClick?: React.MouseEventHandler + onRemoveMessageClick?: React.MouseEventHandler + onTitleClick?: React.MouseEventHandler + onReplyMessageClick?: React.MouseEventHandler + onMeetingMessageClick?: React.MouseEventHandler + onDownload?: React.MouseEventHandler + onMeetingMoreSelect?: React.MouseEventHandler + onMeetingLinkClick?: React.MouseEventHandler + onMeetingTitleClick?: React.MouseEventHandler + onMeetingVideoLinkClick?: React.MouseEventHandler + styles?: React.CSSProperties + notchStyle?: React.CSSProperties +} + +/** + * IMessageListProps Interface + * @prop className The Message List's className and optional. + * @prop customProps The Message List's customProps and optional. + * @prop children The Message List's children and optional. + * @prop referance The Message List's referance is a ref and required. + * @prop datasource The Message List's datasource is IMessageBoxProps and required. + * @prop lockable The Message List's lockable and required. + * @prop toBottomHeight The Message List's to bottom height and optional. + * @prop down button The Message List's down button and required. + * @prop downButtonBadge The Message List's down button badge and required. + * @prop sendMessagePreview The Message List's send message preview and required. + * @prop onScroll The Message List's function onScroll(event: React.UIEvent) and optional. + * @prop onContextMenu The Message List's function onContextMenu(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onDownButtonClick The Message List's onDownButtonClick is a ref and optional. + * @prop onOpen The Message List's function onOpen(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onDownload The Message List's function onDownload(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onPhotoError The Message List's function onPhotoError(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onMeetingMoreSelect The Message List's function onMeetingMoreSelect(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onMessageFocused The Message List's function onMessageFocused(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onClick The Message List's function onClick(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onForwardClick The Message List's function onForwardClick(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onReplyClick The Message List's function onReplyClick(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onReplyMessageClick The Message List's function onReplyMessageClick(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onTitleClick The Message List's function onTitleClick(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onRemoveMessageClick The Message List's function onRemoveMessageClick(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onMeetingMessageClick The Message List's function onMeetingMessageClick(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + * @prop onMeetingTitleClick The MessageList's function onMeetingTitleClick(event: React.MouseEvent) and optional. + * @prop onMeetingVideoLinkClick The MessageList's function onMeetingVideoLinkClick(event: React.MouseEvent) and optional. + * @prop onMeetingLinkClick The Message List's function onMeetingLinkClick(item: IMessageBoxProps, index: number, event: React.MouseEvent) and optional. + */ +export interface IMessageListProps { + className?: string + customProps?: { + [key: string]: unknown + } + children?: React.ReactNode + isShowChild?: boolean + referance: any + dataSource: MessageType[] + actionButtons?: MeetingLinkActionButtons[] + lockable: boolean + toBottomHeight?: String | number + downButton?: boolean + downButtonBadge?: number + sendMessagePreview?: boolean + onScroll?: React.UIEventHandler + onContextMenu?: MessageListEvent + onDownButtonClick?: React.RefObject + onOpen?: MessageListEvent + onDownload?: MessageListEvent + onPhotoError?: MessageListEvent + onMeetingMoreSelect?: MessageListEvent + onMessageFocused?: MessageListEvent + onClick?: MessageListEvent + onForwardClick?: MessageListEvent + onReplyClick?: MessageListEvent + onReplyMessageClick?: MessageListEvent + onTitleClick?: MessageListEvent + onRemoveMessageClick?: MessageListEvent + onMeetingMessageClick?: MessageListEvent + onMeetingTitleClick?: React.MouseEventHandler + onMeetingVideoLinkClick?: React.MouseEventHandler + onMeetingLinkClick?: MessageListEvent + messageBoxStyles?: React.CSSProperties + notchStyle?: React.CSSProperties +} + +/** + * MessageListEvent Type + * @param item The MessageListEvent's item is a IMessageBoxProps. + * @param index The MessageListEvent's index. + * @param event The MessageListEvent's event. + */ +export type MessageListEvent = (item: MessageType, index: number, event: React.MouseEvent) => any + +/** + * IProgressOptions Interface + * @prop state The Progress Options's state is a object. + */ +export interface IProgressOptions { + state?: { + color?: string + width?: string + } +} + +/** + * IMeetingLinkMessage Interface extends IMessage + * @prop meetingID The Meeting Link Message's meeting id and optional. + * @prop title The Meeting Link Message's title and optional. + */ +export interface IMeetingLinkMessage extends IMessage { + meetingID?: string +} + +export type TActionButton = React.FunctionComponent + +export interface MeetingLinkActionButtons { + // return meeting id + onClickButton: (id: string) => void + Component: TActionButton +} + +/** + * IMeetingLinkMessageProps Interface + * @prop type The Meeting Link Message's type is "meetingLink" and required. + * @prop message The Meeting Link Message's message is a IMeetingLinkMessage and required. + * @prop onMeetingLinkClick The Meeting Link Message's function onMeetingLinkClick(event: React.MouseEvent) and optional. + * @prop onMeetingMoreSelect The Meeting More Select Message's function onMeetingMoreSelect(event: React.MouseEvent) and optional. + */ +export interface IMeetingLinkMessageProps extends IMeetingLinkMessage { + actionButtons?: MeetingLinkActionButtons[] +} + +/** + * MeetingMessageEvent Type + * @param item The MessageListEvent's item is a IMeetingMessage. + * @param index The MessageListEvent's index. + * @param event The MessageListEvent's event. + */ +type MeetingMessageEvent = (item: IMeetingMessage, index: number, event: React.MouseEvent) => any + +/** + * ITextMessage Interface extends IMessage + * @prop type The Text Message's type is "text" and required. + */ +export interface ITextMessage extends IMessage {} + +/** + * ITextMessageProps Interface + * @prop type The Text Message's type is "text" and required. + * @prop message The Text Message's message is a ITextMessage and required. + */ +export interface ITextMessageProps extends ITextMessage { + // copyClipboard: function; +} + +export interface IMeetingListProps { + cmpRef?: any + className?: string + dataSource?: IMeetingItemProps[] + lazyLoadingImage?: string + onClick?: MeetingListEvent + onMeetingClick?: MeetingListEvent + onShareClick?: MeetingListEvent + onCloseClick?: MeetingListEvent + onContextMenu?: MeetingListEvent + onAvatarError?: MeetingListEvent +} + +/** + * MeetingListEvent Type + * @param item The MessageListEvent's item is a IMeetingItemProps. + * @param index The MessageListEvent's index. + * @param event The MessageListEvent's event. + */ +type MeetingListEvent = (item: IMeetingItemProps, index: number, event: React.MouseEvent) => any + +/** + * IMeetingItemProps Interface + * @prop id The Meeting Item's id and required. + * @prop closable The Meeting Item's closable and optional. + * @prop date The Meeting Item's date and optional. + * @prop subject The Meeting Item's subject and optional. + * @prop subjectLimit The Meeting Item's subject limit and optional. + * @prop avatarFlexible The Meeting Item's avatar flexible and optional. + * @prop alt The Meeting Item's alt and optional. + * @prop title The Meeting Item's title and optional. + * @prop subtitle The Meeting Item's subtitle and optional. + * @prop statusColorType The Meeting Item's status color type and optional. + * @prop classname The Meeting Item's classname and optional. + * @prop dateString The Meeting Item's date string and optional. + * @prop lazyLoadingImage The Meeting Item's lazyLoadingImage and optional. + * @prop avatarLimit The Meeting Item's avatar limit and optional. + * @prop avatars The Meeting Item's avatars array and optional. + * @prop audioMuted The Meeting Item's audio muted and optional. + * @prop audioSource The Meeting Item's audio source and optional. + * @prop onClick The Meeting Item's function onClick(event: React.MouseEvent) and optional. + * @prop onAvatarError The Meeting Item's function onAvatarError(event: React.MouseEvent) and optional. + * @prop onMeetingClick The Meeting Item's function onMeetingClick(event: React.MouseEvent) and optional. + * @prop onShareClick The Meeting Item's function onShareClick(event: React.MouseEvent) and optional. + * @prop onContextMenu The Meeting Item's function onContextMenu(event: React.MouseEvent) and optional. + * @prop onCloseClick The Meeting Item's function onCloseClick(event: React.MouseEvent) and optional. + */ +export interface IMeetingItemProps { + id: string | number + closable?: boolean + date?: any + subject?: string + subjectLimit?: number + avatarFlexible?: boolean + alt?: string + title?: string + subtitle?: string + statusColorType?: string + className?: string + dateString?: string + lazyLoadingImage?: string + avatarLimit?: number + avatars?: IAvatarProps[] + audioMuted?: boolean + audioSource?: string + onClick?: React.MouseEventHandler + onAvatarError?: React.MouseEventHandler + onMeetingClick?: React.MouseEventHandler + onShareClick?: React.MouseEventHandler + onContextMenu?: React.MouseEventHandler + onCloseClick?: React.MouseEventHandler +} + +/** + * IInputProps Interface + * @prop autofocus The Input's autofocus and optional. + * @prop referance The Input's referance is a ref and optional. + * @prop clear The Input's clear and optional. + * @prop maxlength The Input's maxlength and optional. + * @prop maxHeight The Input's maxheight and optional. + * @prop onMaxLengthExceed The Input's onMaxLengthExceed function and optional. + * @prop onChange The Input's onChange function and optional. + * @prop multiline The Input's multiline and optional. + * @prop autoHeight The Input's autoHeight and optional. + * @prop minHeight The Input's minheight and optional. + * @prop className The Input's classname and optional. + * @prop leftButtons The Input's leftbuttons is a component and optional. + * @prop rightButtons The Input's rightbuttons is a component and optional. + * @prop type The Input's type and optional. + * @prop placeholder The Input's placeholder and optional. + * @prop defaultValue The Input's default value and optional. + * @prop inputStyle The Input's input style and optional. + * @prop onCopy The Input's function onCopy(event: React.ClipboardEvent) and optional. + * @prop onCut The Input's function onCut(event: React.ClipboardEvent) and optional. + * @prop onPaste The Input's function onPaste(event: React.ClipboardEvent) and optional. + * @prop onBlur The Input's function onBlur(event: React.FocusEvent) and optional. + * @prop onFocus The Input's function onFocus(event: React.FocusEvent) and optional. + * @prop onSelect The Input's function onSelect(event: React.SyntheticEvent) and optional. + * @prop onSubmit The Input's function onSubmit(event: React.FormEvent) and optional. + * @prop onReset The Input's function onReset(event: React.FormEvent) and optional. + * @prop onKeyDown The Input's function onKeyDown(event: React.KeyboardEvent) and optional. + * @prop onKeyPress The Input's function onKeyPress(event: React.KeyboardEvent) and optional. + * @prop onKeyUp The Input's function onKeyUp(event: React.KeyboardEvent) and optional. + */ +export interface IInputProps { + autofocus?: boolean + referance?: any // sor ve 46.satır + clear?: Function + maxlength?: number + maxHeight: number + onMaxLengthExceed?: Function + onChange?: Function + multiline?: boolean + autoHeight?: boolean + minHeight?: number + className?: string + leftButtons?: React.ReactNode + rightButtons?: React.ReactNode + type?: React.HTMLInputTypeAttribute + placeholder?: string + defaultValue?: string + inputStyle?: Object + onCopy?: React.ClipboardEventHandler + onCut?: React.ClipboardEventHandler + onPaste?: React.ClipboardEventHandler + onBlur?: React.FocusEventHandler + onFocus?: React.FocusEventHandler + onSelect?: React.ReactEventHandler + onSubmit?: React.FormEventHandler + onReset?: React.FormEventHandler + onKeyDown?: React.KeyboardEventHandler + onKeyPress?: React.KeyboardEventHandler + onKeyUp?: React.KeyboardEventHandler +} + +/** + * IMessageDataStatus Interface + * @prop error The File Message Data Status's error and optional. + * @prop download The File Message Data Status's download function and optional. + * @prop click The File Message Data Status's click function and optional. + * @prop loading The File Message Data Status's loading and optional. + */ +export interface IMessageDataStatus { + autoDownload?: boolean + error?: boolean + download?: Function | boolean + click?: Function | boolean + loading?: boolean | number +} + +/** + * IDropdownProps Interface + * @prop className The Dropdown's className and optional. + * @prop buttonProps The Dropdown's button props and optional. + * @prop animationType The Dropdown's animation type and optional. + * @prop animationPosition The Dropdown's animation position and optional. + * @prop title The Dropdown's title and optional. + * @prop items The Dropdown's items is a IDropdownItemType array and required. + * @prop onSelect The Dropdown's onSelect function and optional. + * @prop style The Dropdown's style is an object containing color, borderColor and optional. + */ +export interface IDropdownProps { + className?: string + buttonProps?: Object + animationType?: string + animationPosition?: string + title?: string + items: IDropdownItemType[] + onSelect: Function + style?: { + color?: string + borderColor?: string + } +} + +/** + * ICircleProps Interface + * @prop animate The Circle's animation and required. + * @prop progressOptions The Circle's progress options and optional. + * @prop className The Circle's className and optional. + */ +export interface ICircleProps { + animate: number + progressOptions?: Object + className?: string +} + +/** + * IButtonProps Interface + * @prop title The Button's title and optional. + * @prop text The Button's text and optional. + * @prop buttonRef The Button's ref and optional. + * @prop type The Button's type and optional. + * @prop className The Button's className and optional. + * @prop backgroundColor The Button's background color and optional. + * @prop color The Button's color and optional. + * @prop disabled The Button's disabled and optional. + * @prop onClick The Button's onClick function and optional. + * @prop icon The Button's icon is a IButtonIcon and optional. + */ +export interface IButtonProps { + title?: string + text?: string + buttonRef?: React.RefObject + type?: string + className?: string + backgroundColor?: string + color?: string + disabled?: boolean + onClick?: React.MouseEventHandler + icon?: IButtonIcon +} + +/** + * IButtonIcon Interface + * @prop float The Button Icon's float and optional. + * @prop size The Button Icon's size and optional. + * @prop components The Button Icon's components and optional. + */ +export interface IButtonIcon { + float?: any + size?: number + component?: React.ReactChild +} + +/** + * IDropDownItemType Type + * @type IDropdown + * @type string + */ +type IDropdownItemType = IDropdownItem | string + +/** + * IDropdownItem Interface + * @prop icon The Dropdown Item's icon and optional. + * @prop text The Dropdown Item's text and optional. + */ +export interface IDropdownItem { + icon?: IDropdownItemIcon + text?: string +} + +/** + * IDropdownItemIcon Interface + * @prop float The Dropdown Item Icon's float and optional. + * @prop color The Dropdown Item Icon's color and optional. + * @prop size The Dropdown Item Icon's size and optional. + * @prop className The Dropdown Item Icon's className and optional. + * @prop component The Dropdown Item Icon's component and optional. + */ +export interface IDropdownItemIcon { + float?: any + color?: string + size?: number + className?: string + component?: React.ReactChild +} + +/** + * ISideBarProps Interface + * @type type The Side Bar's type and optional. + * @type data The Side Bar's data is ISideBar and optional. + */ +export interface ISideBarProps extends ISideBar { + type?: string + data: ISideBar +} + +/** + * ISideBar Interface + * @prop top The Side Bar's top is a component and optional. + * @prop center The Side Bar's center is a component and optional. + * @prop bottom The Side Bar's bottom is a component and optional. + * @prop className The Side Bar's className and optional. + */ +export interface ISideBar { + top?: any + center?: any + bottom?: any + className?: string +} + +/** + * IPopup Interface + * @prop show The Popup's show and optional. + * @prop header The Popup's header and optional. + * @prop text The Popup's text and optional. + * @prop footerButtons The Popup's footer buttons array and optional. + * @prop headerButtons The Popup's header buttons array and optional. + * @prop renderHeader The Popup's renderHeader function and optional. + * @prop renderContent The Popup's renderContent function and optional. + * @prop renderFooter The Popup's renderFooter function and optional. + * @prop color The Popup's color and optional. + */ +export interface IPopup { + show?: boolean + header?: string + text?: string + footerButtons?: Array<{ + color?: string + backgroundColor?: string + text?: string + onClick?: React.MouseEventHandler + }> + headerButtons?: Array<{ + type?: string + color?: string + icon?: { + component?: React.ReactChild + size?: number + } + onClick?: React.MouseEventHandler + }> + renderHeader?: Function + renderContent?: Function + renderFooter?: Function + color?: string +} + +/** + * IPopupProps Interface + * @prop popup The Popup's popup is a IPopup and required. + * @prop type The Popup's type and optional. + * @prop className The Popup's className and optional. + */ +export interface IPopupProps { + popup: IPopup + type?: string + className?: string +} + +/** + * IAvatarProps Interface + * @prop src The Avatar's src is an image source and required. + * @prop title The Avatar's title and optional. + * @prop lazyLoadingImage The Avatar's lazyLoadingImage and optional. + * @prop letterItem The Avatar's letterItem is a ILetterItem and optional. + * @prop type The Avatar's type and optional. + * @prop size The Avatar's size and optional. + * @prop className The Avatar's className and optional. + * @prop alt The Avatar's alt and optional. + * @prop sideElement The Avatar's sideElement is a component and optional. + * @prop onError The Avatar's function onError(event: React.SyntheticEvent) and optional. + * @prop statusColorType The Avatar's status color type and optional. + * @prop statusColor The Avatar's status color and optional. + * @prop statusText The Avatar's status text and optional. + */ +export interface IAvatarProps { + src: string + title?: string + lazyLoadingImage?: string + letterItem?: ILetterItem + type?: string + size?: Object + className?: string + alt?: string + sideElement?: React.ReactElement + onError?: React.ReactEventHandler + statusColorType?: string + statusColor?: string + statusText?: string +} + +/** + * INavbarProps Interface + * @prop type The Navbar's type and optional. + * @prop className The Navbar's className and optional. + * @prop top The Side Bar's top is a component and optional. + * @prop center The Side Bar's center is a component and optional. + * @prop bottom The Side Bar's bottom is a component and optional. + */ +export interface INavbarProps { + type?: string + className?: string + left?: any + center?: any + right?: any +} + +/** + * MessageType Type + * @type ILocationMessageProps + * @type IPhotoMessageProps + * @type IVideoMessageProps + * @type ISpotifyMessageProps + * @type IAudioMessageProps + * @type IMeetingLinkMessageProps + * @type IFileMessageProps + * @type ITextMessageProps + * @type ISystemMessageProps + * @type IMeetingMessageProps + * @type IFeedbackMessageProps + */ +export type MessageType = + | ({ type: 'location' } & ILocationMessageProps) + | ({ type: 'photo' } & IPhotoMessageProps) + | ({ type: 'video' } & IVideoMessageProps) + | ({ type: 'spotify' } & ISpotifyMessageProps) + | ({ type: 'audio' } & IAudioMessageProps) + | ({ type: 'feedback' } & IFeedbackMessageProps) + | ({ type: 'meetingLink' } & IMeetingLinkMessageProps) + | ({ type: 'file' } & IFileMessageProps) + | ({ type: 'text' } & ITextMessageProps) + | ({ type: 'system' } & ISystemMessageProps) + | ({ type: 'meeting' } & IMeetingMessageProps) + +export type MessageBoxType = MessageType & IMessageBoxProps + +export class ChatItem extends React.Component {} +export class ChatList extends React.Component {} +export class MessageBox extends React.Component {} +export class LocationMessage extends React.Component {} +export class PhotoMessage extends React.Component {} +export class VideoMessage extends React.Component {} +export class SpotifyMessage extends React.Component {} +export class AudioMessage extends React.Component {} +export class FeedbackMessage extends React.Component {} +export class MeetingLink extends React.Component {} +export class FileMessage extends React.Component {} +export class TextMessage extends React.Component {} +export class SystemMessage extends React.Component {} +export class ReplyMessage extends React.Component {} +export class MeetingMessage extends React.Component {} +export class MeetingItem extends React.Component {} +export class MeetingList extends React.Component {} +export class MessageList extends React.Component {} + +export class Popup extends React.Component {} +export class Avatar extends React.Component {} +export class Button extends React.Component {} +export class Sidebar extends React.Component {} +export class Navbar extends React.Component {} +export class Input extends React.Component {} +export class Dropdown extends React.Component {} +export class Circle extends React.Component {} diff --git a/example/components/MessageListExample.tsx b/example/components/MessageListExample.tsx index 27c59fb3..88783d81 100644 --- a/example/components/MessageListExample.tsx +++ b/example/components/MessageListExample.tsx @@ -14,6 +14,7 @@ import { systemMessage, textMessage, videoMessage, + feedbackMessage } from '../utils/MessageTypes' let clearRef = () => {} @@ -67,6 +68,10 @@ function MessageListExample() { case 8: Addmtype = 'meetingLink' break + case 9: + Addmtype = 'feedback' + break + case 10: default: Addmtype = 'text' setStatus('read') @@ -100,6 +105,8 @@ function MessageListExample() { return meetingLinkMessage case 'text': return textMessage + case 'feedback': + return feedbackMessage default: break } @@ -135,7 +142,8 @@ function MessageListExample() { defaultValue='' referance={inputReferance} clear={(clear: any) => (clearRef = clear)} - maxHeight={50} + maxHeight={150} + multiline={true} onKeyPress={(e: any) => { if (e.shiftKey && e.charCode === 13) { return true diff --git a/example/utils/MessageTypes.ts b/example/utils/MessageTypes.ts index 1be6a795..e61b050c 100644 --- a/example/utils/MessageTypes.ts +++ b/example/utils/MessageTypes.ts @@ -22,8 +22,8 @@ export const photoMessage: MessageType = { uri: `data:image/png;base64,${photo(150)}`, status: { click: true, - loading: 0.5, - download: false, //type === "video", + loading: 1, + download: true, //type === "video", error: false, }, width: 300, @@ -368,7 +368,7 @@ export const textMessage: MessageType = { type: 'text', id: String(Math.random()), position: token() >= 1 ? 'right' : 'left', - text: loremIpsum({ count: 1, units: 'sentences' }), + text: "Lorem ipsum dolor sit amet, bluebabushka.com www.bluebabushka.com https://bluebabushka.com http://bluebabushka.com consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, https://google.com quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.", title: loremIpsum({ count: 2, units: 'words' }), focus: true, date: +new Date(), @@ -393,3 +393,39 @@ export const textMessage: MessageType = { } : undefined, } + +export const feedbackMessage: MessageType = { + type: 'feedback', + id: String(Math.random()), + position: token() >= 1 ? 'right' : 'left', + text: loremIpsum({ count: 1, units: 'sentences' }), + title: 'Feedback', + focus: true, + date: +new Date(), + dateString: 'now', + avatar: `data:image/png;base64,${photo(20)}`, + titleColor: getRandomColor(), + forwarded: true, + replyButton: true, + removeButton: true, + status: 'received', + notch: true, + copiableDate: true, + retracted: false, + className: '', + data: { + audioURL: 'https://www.w3schools.com/html/horse.mp3', + audioType: 'audio/mp3', + controlsList: 'nodownload', + }, + reply: + token() >= 1 + ? { + photoURL: token() >= 1 ? `data:image/png;base64,${photo(150)}` : null, + title: loremIpsum({ count: 2, units: 'words' }), + titleColor: getRandomColor(), + message: loremIpsum({ count: 1, units: 'sentences' }), + } + : undefined, +} + diff --git a/example/utils/common.ts b/example/utils/common.ts index 6b298fd7..e5482c22 100644 --- a/example/utils/common.ts +++ b/example/utils/common.ts @@ -18,7 +18,7 @@ export const getRandomColor = () => { } export const token = () => { - return Math.floor((Math.random() * 10) % 9) + return 10; //return Math.floor(Math.random() * 9) + 1; } export function useForceUpdate() { diff --git a/package.json b/package.json index 0ff9a69a..c656283d 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "react-dom": "17.0.2", "react-scripts": "^5.0.1", "react-test-renderer": "^17.0.2", + "react-h5-audio-player": "^3.8.6", "rimraf": "^3.0.2", "rollup": "^2.75.6", "rollup-plugin-babel": "^4.4.0", @@ -42,7 +43,8 @@ "typescript": "^4.6.4", "webpack": "^5.73.0", "webpack-cli": "^4.9.2", - "webpack-dev-server": "^4.9.0" + "webpack-dev-server": "^4.9.0", + "@dhaiwat10/react-link-preview": "^1.15.0" }, "repository": { "type": "git", @@ -103,4 +105,4 @@ "last 1 safari version" ] } -} \ No newline at end of file +} diff --git a/src/AudioMessage/AudioMessage.css b/src/AudioMessage/AudioMessage.css index d4df8f98..931e80d6 100644 --- a/src/AudioMessage/AudioMessage.css +++ b/src/AudioMessage/AudioMessage.css @@ -1,8 +1,254 @@ -.rce-mbox-audio { - padding-bottom: 10px; - max-width: 300px; +.rhap_container { + /*box-sizing: border-box;*/ + display: flex; + flex-direction: column; + line-height: 1; + font-family: inherit; + padding-top: 15px; + padding-bottom: 15px; + background-color: #fff; + border-radius: 24px; + /*box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2);*/ } -audio:focus { - outline: none; + +.rhap_container:focus:not(:focus-visible) { + outline: 0; +} +.rhap_container svg { + vertical-align: initial; +} + +.rhap_header { + margin-bottom: 10px; +} + +.rhap_footer { + margin-top: 5px; +} + +.rhap_main { + display: flex; + flex-direction: column; + flex: 1 1 auto; +} + +.rhap_stacked .rhap_controls-section { + margin-top: 8px; +} + +.rhap_horizontal { + flex-direction: row; +} +.rhap_horizontal .rhap_controls-section { + /*margin-left: 8px;*/ +} + +.rhap_horizontal-reverse { + flex-direction: row-reverse; +} +.rhap_horizontal-reverse .rhap_controls-section { + /*margin-right: 8px;*/ +} + +.rhap_progress-section { + display: flex; + flex: 3 1 auto; + align-items: center; +} + +.rhap_progress-container { + display: flex; + align-items: center; + height: 20px; + flex: 1 0 auto; + align-self: center; + margin: 0 calc(10px + 1%); + cursor: pointer; + user-select: none; + -webkit-user-select: none; +} +.rhap_progress-container:focus:not(:focus-visible) { + outline: 0; +} + +.rhap_time { + color: #333; + font-size: 16px; + user-select: none; + -webkit-user-select: none; +} + +.rhap_progress-bar { + box-sizing: border-box; + position: relative; + z-index: 0; + width: 100%; + height: 5px; + background-color: #dddddd; + border-radius: 2px; +} + +.rhap_progress-filled { + height: 100%; + position: absolute; + z-index: 2; + background-color: #4C637D; + border-radius: 2px; +} + +.rhap_progress-bar-show-download { + background-color: #F5E1CE; +} + +.rhap_download-progress { + height: 100%; + position: absolute; + z-index: 1; + background-color: #F5E1CE; + border-radius: 2px; +} + +.rhap_progress-indicator { + box-sizing: border-box; + position: absolute; + z-index: 3; + width: 20px; + height: 20px; + margin-left: -10px; + top: -8px; + background: #4C637D; + border-radius: 50px; + box-shadow: rgba(134, 134, 134, 0.5) 0 0 5px; +} + +.rhap_controls-section { + display: flex; + flex: 1 1 auto; + justify-content: space-between; + align-items: center; +} + +.rhap_additional-controls { + display: none; + /*flex: 1 0 auto;*/ + /*align-items: center;*/ +} + +.rhap_repeat-button { + font-size: 26px; + width: 26px; + height: 26px; + color: #4C637D; + margin-right: 6px; +} + +.rhap_main-controls { + flex: 0 1 auto; + display: flex; + justify-content: center; + align-items: center; +} + +.rhap_main-controls-button { + margin: 0 3px; + color: #4C637D; + font-size: 35px; + width: 35px; + height: 35px; +} + +.rhap_play-pause-button { + font-size: 40px; + width: 40px; + height: 40px; +} + +.rhap_volume-controls { + display: flex; + flex: 1 0 auto; + justify-content: flex-end; + align-items: center; +} + +.rhap_volume-button { + flex: 0 0 26px; + font-size: 26px; + width: 26px; + height: 26px; + color: #4C637D; + margin-right: 6px; +} + +.rhap_volume-container { + display: flex; + align-items: center; + flex: 0 1 100px; + user-select: none; + -webkit-user-select: none; +} + +.rhap_volume-bar-area { + display: flex; + align-items: center; + width: 100%; + height: 14px; + cursor: pointer; +} +.rhap_volume-bar-area:focus:not(:focus-visible) { + outline: 0; +} + +.rhap_volume-bar { + box-sizing: border-box; + position: relative; + width: 100%; + height: 4px; + background: #F5E1CE; + border-radius: 2px; +} + +.rhap_volume-indicator { + box-sizing: border-box; + position: absolute; + width: 12px; + height: 12px; + margin-left: -6px; + left: 0; + top: -4px; + background: #4C637D; + opacity: 0.9; + border-radius: 50px; + box-shadow: rgba(134, 134, 134, 0.5) 0 0 3px; + cursor: pointer; +} +.rhap_volume-indicator:hover { + opacity: 0.9; +} + +.rhap_volume-filled { + height: 100%; + position: absolute; + z-index: 2; + background-color: #4C637D; + border-radius: 2px; +} + +/* Utils */ +.rhap_button-clear { + background-color: transparent; + border: none; + padding: 0; + overflow: hidden; + cursor: pointer; +} +.rhap_button-clear:hover { + opacity: 0.9; + transition-duration: 0.2s; +} +.rhap_button-clear:active { + opacity: 0.95; +} +.rhap_button-clear:focus:not(:focus-visible) { + outline: 0; } diff --git a/src/AudioMessage/AudioMessage.tsx b/src/AudioMessage/AudioMessage.tsx index 0ee7d927..ef19046c 100644 --- a/src/AudioMessage/AudioMessage.tsx +++ b/src/AudioMessage/AudioMessage.tsx @@ -1,17 +1,21 @@ import React from 'react' import { IAudioMessageProps } from '../type' +import AudioPlayer from 'react-h5-audio-player'; import './AudioMessage.css' const AudioMessage: React.FC = props => { - const controlsList = props.data.controlsList + // const controlsList = props.data.controlsList return (
- - {props.text &&
{props.text}
} + + {props.text &&
{props.text}
}
) } diff --git a/src/AudioMessage/AudioMessage_back.css b/src/AudioMessage/AudioMessage_back.css new file mode 100644 index 00000000..d4df8f98 --- /dev/null +++ b/src/AudioMessage/AudioMessage_back.css @@ -0,0 +1,8 @@ +.rce-mbox-audio { + padding-bottom: 10px; + max-width: 300px; +} + +audio:focus { + outline: none; +} diff --git a/src/FeedbackMessage/FeedbackMessage.css b/src/FeedbackMessage/FeedbackMessage.css new file mode 100644 index 00000000..931e80d6 --- /dev/null +++ b/src/FeedbackMessage/FeedbackMessage.css @@ -0,0 +1,254 @@ +.rhap_container { + /*box-sizing: border-box;*/ + display: flex; + flex-direction: column; + line-height: 1; + font-family: inherit; + padding-top: 15px; + padding-bottom: 15px; + background-color: #fff; + border-radius: 24px; + /*box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.2);*/ +} + + +.rhap_container:focus:not(:focus-visible) { + outline: 0; +} +.rhap_container svg { + vertical-align: initial; +} + +.rhap_header { + margin-bottom: 10px; +} + +.rhap_footer { + margin-top: 5px; +} + +.rhap_main { + display: flex; + flex-direction: column; + flex: 1 1 auto; +} + +.rhap_stacked .rhap_controls-section { + margin-top: 8px; +} + +.rhap_horizontal { + flex-direction: row; +} +.rhap_horizontal .rhap_controls-section { + /*margin-left: 8px;*/ +} + +.rhap_horizontal-reverse { + flex-direction: row-reverse; +} +.rhap_horizontal-reverse .rhap_controls-section { + /*margin-right: 8px;*/ +} + +.rhap_progress-section { + display: flex; + flex: 3 1 auto; + align-items: center; +} + +.rhap_progress-container { + display: flex; + align-items: center; + height: 20px; + flex: 1 0 auto; + align-self: center; + margin: 0 calc(10px + 1%); + cursor: pointer; + user-select: none; + -webkit-user-select: none; +} +.rhap_progress-container:focus:not(:focus-visible) { + outline: 0; +} + +.rhap_time { + color: #333; + font-size: 16px; + user-select: none; + -webkit-user-select: none; +} + +.rhap_progress-bar { + box-sizing: border-box; + position: relative; + z-index: 0; + width: 100%; + height: 5px; + background-color: #dddddd; + border-radius: 2px; +} + +.rhap_progress-filled { + height: 100%; + position: absolute; + z-index: 2; + background-color: #4C637D; + border-radius: 2px; +} + +.rhap_progress-bar-show-download { + background-color: #F5E1CE; +} + +.rhap_download-progress { + height: 100%; + position: absolute; + z-index: 1; + background-color: #F5E1CE; + border-radius: 2px; +} + +.rhap_progress-indicator { + box-sizing: border-box; + position: absolute; + z-index: 3; + width: 20px; + height: 20px; + margin-left: -10px; + top: -8px; + background: #4C637D; + border-radius: 50px; + box-shadow: rgba(134, 134, 134, 0.5) 0 0 5px; +} + +.rhap_controls-section { + display: flex; + flex: 1 1 auto; + justify-content: space-between; + align-items: center; +} + +.rhap_additional-controls { + display: none; + /*flex: 1 0 auto;*/ + /*align-items: center;*/ +} + +.rhap_repeat-button { + font-size: 26px; + width: 26px; + height: 26px; + color: #4C637D; + margin-right: 6px; +} + +.rhap_main-controls { + flex: 0 1 auto; + display: flex; + justify-content: center; + align-items: center; +} + +.rhap_main-controls-button { + margin: 0 3px; + color: #4C637D; + font-size: 35px; + width: 35px; + height: 35px; +} + +.rhap_play-pause-button { + font-size: 40px; + width: 40px; + height: 40px; +} + +.rhap_volume-controls { + display: flex; + flex: 1 0 auto; + justify-content: flex-end; + align-items: center; +} + +.rhap_volume-button { + flex: 0 0 26px; + font-size: 26px; + width: 26px; + height: 26px; + color: #4C637D; + margin-right: 6px; +} + +.rhap_volume-container { + display: flex; + align-items: center; + flex: 0 1 100px; + user-select: none; + -webkit-user-select: none; +} + +.rhap_volume-bar-area { + display: flex; + align-items: center; + width: 100%; + height: 14px; + cursor: pointer; +} +.rhap_volume-bar-area:focus:not(:focus-visible) { + outline: 0; +} + +.rhap_volume-bar { + box-sizing: border-box; + position: relative; + width: 100%; + height: 4px; + background: #F5E1CE; + border-radius: 2px; +} + +.rhap_volume-indicator { + box-sizing: border-box; + position: absolute; + width: 12px; + height: 12px; + margin-left: -6px; + left: 0; + top: -4px; + background: #4C637D; + opacity: 0.9; + border-radius: 50px; + box-shadow: rgba(134, 134, 134, 0.5) 0 0 3px; + cursor: pointer; +} +.rhap_volume-indicator:hover { + opacity: 0.9; +} + +.rhap_volume-filled { + height: 100%; + position: absolute; + z-index: 2; + background-color: #4C637D; + border-radius: 2px; +} + +/* Utils */ +.rhap_button-clear { + background-color: transparent; + border: none; + padding: 0; + overflow: hidden; + cursor: pointer; +} +.rhap_button-clear:hover { + opacity: 0.9; + transition-duration: 0.2s; +} +.rhap_button-clear:active { + opacity: 0.95; +} +.rhap_button-clear:focus:not(:focus-visible) { + outline: 0; +} diff --git a/src/FeedbackMessage/FeedbackMessage.tsx b/src/FeedbackMessage/FeedbackMessage.tsx new file mode 100644 index 00000000..8dc805b9 --- /dev/null +++ b/src/FeedbackMessage/FeedbackMessage.tsx @@ -0,0 +1,25 @@ +import React from 'react' +import {IFeedbackMessageProps} from '../type' +import AudioPlayer from 'react-h5-audio-player'; +import './FeedbackMessage.css' + +const FeedbackMessage: React.FC = props => { + // const controlsList = props.data.controlsList + + console.log(props.text); + + return ( +
+ + {props.text &&
{props.text}
} +
+ ) +} + +export default FeedbackMessage diff --git a/src/FeedbackMessage/__tests__/FeedbackMessage.js b/src/FeedbackMessage/__tests__/FeedbackMessage.js new file mode 100644 index 00000000..62de99df --- /dev/null +++ b/src/FeedbackMessage/__tests__/FeedbackMessage.js @@ -0,0 +1,12 @@ +import React, { Component } from 'react' +import { shallow } from 'enzyme' +import toJson from 'enzyme-to-json' +import FeedbackMessage from '../FeedbackMessage' + +describe('FeedbackMessage component', () => { + it('should render without issues', () => { + const component = shallow() + expect(component.length).toBe(1) + expect(toJson(component)).toMatchSnapshot() + }) +}) diff --git a/src/FeedbackMessage/__tests__/__snapshots__/FeedbackMessage.js.snap b/src/FeedbackMessage/__tests__/__snapshots__/FeedbackMessage.js.snap new file mode 100644 index 00000000..b4eaf976 --- /dev/null +++ b/src/FeedbackMessage/__tests__/__snapshots__/FeedbackMessage.js.snap @@ -0,0 +1,17 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`FeedbackMessage component should render without issues 1`] = ` +
+ +
+`; diff --git a/src/LinkifyText/LinkifyText.tsx b/src/LinkifyText/LinkifyText.tsx new file mode 100644 index 00000000..44ff823e --- /dev/null +++ b/src/LinkifyText/LinkifyText.tsx @@ -0,0 +1,30 @@ +import React from 'react'; + +interface Props { + text: string; +} + +const LinkifyText: React.FC = ({ text }) => { + const linkRegex = /(?:(?:(?:https?|ftp):\/\/)|www\.)?[a-zA-Z0-9]+[.][a-zA-Z]{2,}[^\s$?.#]/gi; + const words = text.split(' '); + const linkifiedWords = words.map((word, index) => { + if (linkRegex.test(word)) { + let url = word; + if (!url.match(/^https?:\/\//i)) { + url = `https://${url}`; + } else if (url.startsWith('http://')) { + url = url.replace('http://', 'https://'); + } + return ( + + {word}{' '} + + ); + } else { + return {word} ; + } + }); + return <>{linkifiedWords}; +}; + +export default LinkifyText; diff --git a/src/MessageBox/MessageBox.css b/src/MessageBox/MessageBox.css index c2c5d2b8..49733461 100644 --- a/src/MessageBox/MessageBox.css +++ b/src/MessageBox/MessageBox.css @@ -212,7 +212,7 @@ justify-content: flex-end; align-items: center; text-align: right; - color: rgba(0, 0, 0, 0.45); + /*color: rgba(0, 0, 0, 0.45);*/ font-size: 12px; right: -4px; bottom: -5px; @@ -235,10 +235,10 @@ padding-top: 5px; padding-right: 3px; padding-bottom: 2px; - background: linear-gradient(to top, rgba(0, 0, 0, 0.33), transparent); + /*background: linear-gradient(to top, rgba(0, 0, 0, 0.33), transparent);*/ border-bottom-left-radius: 5px; border-bottom-right-radius: 5px; - color: #fff; + /*color: #fff;*/ } .rce-mbox--clear-padding { diff --git a/src/MessageBox/MessageBox.tsx b/src/MessageBox/MessageBox.tsx index 24e93e21..9a2c0051 100644 --- a/src/MessageBox/MessageBox.tsx +++ b/src/MessageBox/MessageBox.tsx @@ -11,6 +11,7 @@ import MeetingMessage from '../MeetingMessage/MeetingMessage' import VideoMessage from '../VideoMessage/VideoMessage' import AudioMessage from '../AudioMessage/AudioMessage' import MeetingLink from '../MeetingLink/MeetingLink' +import FeedbackMessage from "../FeedbackMessage/FeedbackMessage"; import Avatar from '../Avatar/Avatar' @@ -22,29 +23,29 @@ import { format } from 'timeago.js' import classNames from 'classnames' import { MessageBoxType } from '../type' +import LinkifyText from "../LinkifyText/LinkifyText"; const MessageBox: React.FC = ({ focus = false, notch = true, styles, ...props }) => { - const prevProps = useRef(focus) - const messageRef = useRef(null) - - var positionCls = classNames('rce-mbox', { 'rce-mbox-right': props.position === 'right' }) - var thatAbsoluteTime = - !/(text|video|file|meeting|audio)/g.test(props.type || 'text') && !(props.type === 'location' && props.text) - const dateText = props.date && (props.dateString || format(props.date)) - - useEffect(() => { - if (prevProps.current !== focus && focus === true) { - if (messageRef) { - messageRef.current?.scrollIntoView({ - block: 'center', - behavior: 'smooth', - }) - - props.onMessageFocused(prevProps) - } - } - prevProps.current = focus - }, [focus, prevProps]) + const prevProps = useRef(focus) + const messageRef = useRef(null) + + const positionCls = classNames('rce-mbox', {'rce-mbox-right': props.position === 'right'}); + const thatAbsoluteTime = + !/(text|video|file|meeting|audio|feedback)/g.test(props.type || 'text') && !(props.type === 'location' && props.text); + const dateText = props.date && (props.dateString || format(props.date)) + + useEffect(() => { + if (prevProps.current !== focus && focus === true) { + if (messageRef) { + messageRef.current?.scrollIntoView({ + block: 'center', + behavior: 'smooth', + }) + props.onMessageFocused(prevProps) + } + } + prevProps.current = focus + }, [focus, prevProps]) return (
@@ -141,7 +142,7 @@ const MessageBox: React.FC = ({ focus = false, notch = true, sty })} > {props.retracted && } - {props.text} +
)} @@ -156,8 +157,11 @@ const MessageBox: React.FC = ({ focus = false, notch = true, sty {props.type === 'spotify' && } {props.type === 'meeting' && } + {props.type === 'audio' && } + {props.type === 'feedback' && } + {props.type === 'meetingLink' && ( )} diff --git a/src/MessageBox/utils.ts b/src/MessageBox/utils.ts new file mode 100644 index 00000000..aa7f925d --- /dev/null +++ b/src/MessageBox/utils.ts @@ -0,0 +1,14 @@ +interface Link { + text: string; + url: string; +} + +export function findLink(text: string): Link | undefined { + const urlRegex = /((http(s)?):\/\/[\w\d./?=#]+)|(www.[\w\d./?=#]+)/g; + const matches = text.match(urlRegex); + if (matches) { + const link = matches[0]; + const url = link.startsWith("http") ? link.replace("http", "https") : `https://${link}`; + return { text, url }; + } +} diff --git a/src/PhotoMessage/PhotoMessage.css b/src/PhotoMessage/PhotoMessage.css index e246f885..f8bc9bb4 100644 --- a/src/PhotoMessage/PhotoMessage.css +++ b/src/PhotoMessage/PhotoMessage.css @@ -31,9 +31,10 @@ } .rce-mbox-photo--img img { - height: 100%; + /*height: 100%;*/ min-height: 100px; user-select: none; + object-fit: contain; } .rce-mbox-photo--img__block-item { diff --git a/src/index.ts b/src/index.ts index 13ae9fda..638134e2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -8,6 +8,7 @@ import SystemMessage from './SystemMessage/SystemMessage' import ReplyMessage from './ReplyMessage/ReplyMessage' import MeetingMessage from './MeetingMessage/MeetingMessage' import AudioMessage from './AudioMessage/AudioMessage' +import FeedbackMessage from './FeedbackMessage/FeedbackMessage'; import FileMessage from './FileMessage/FileMessage' import LocationMessage from './LocationMessage/LocationMessage' import SpotifyMessage from './SpotifyMessage/SpotifyMessage' @@ -34,6 +35,7 @@ export { ReplyMessage, MeetingMessage, AudioMessage, + FeedbackMessage, FileMessage, LocationMessage, SpotifyMessage, diff --git a/src/type.d.ts b/src/type.d.ts index 2226bcce..ed2e7341 100644 --- a/src/type.d.ts +++ b/src/type.d.ts @@ -398,6 +398,46 @@ export interface IAudioMessageProps extends IAudioMessage { onLoad?: React.ReactEventHandler } +/** + * IFeedbackMessage Interface extends IMessage + * @prop type The Feedback Message's type is "audio" and required. + * @prop audioURL The Feedback Message's audio url and required. + * @prop audioType The Feedback Message's audio type and optional. + * @prop controlsList The Feedback Message's controls list and optional. + */ +export interface IFeedbackMessage extends IMessage { + data: { + audioURL?: string + extension?: string + name?: string + size?: string + duration?: number + id?: string + audioType?: 'audio/mp3' | string + controlsList?: string + } +} + +/** + * IFeedbackMessageProps Interface + * @prop type The Feedback Message's type is "audio" and required. + * @prop message The Feedback Message's message is a IFeedbackMessage and required. + * @prop audioProps The Feedback Message's audioProps and optional. + * @prop customStyle The Feedback Message's customStyle and optional. + * @prop onOpen The Feedback Message's function onOpen(event: React.MouseEvent) and optional. + * @prop onDownload The Feedback Message's function onDownload(event: React.MouseEvent) and optional. + * @prop onLoad The Feedback Message's function onLoad(event: React.SyntheticEvent) and optional. + */ +export interface IFeedbackMessageProps extends IFeedbackMessage { + audioProps?: { + [key: string]: unknown + } + customStyle?: any + onOpen?: React.MouseEventHandler + onDownload?: React.MouseEventHandler + onLoad?: React.ReactEventHandler +} + /** * IFileMessage Interface * @prop type The File Message's type is "file" and required. @@ -1067,6 +1107,7 @@ export interface INavbarProps { * @type ITextMessageProps * @type ISystemMessageProps * @type IMeetingMessageProps + * @type IFeedbackMessageProps */ export type MessageType = | ({ type: 'location' } & ILocationMessageProps) @@ -1074,6 +1115,7 @@ export type MessageType = | ({ type: 'video' } & IVideoMessageProps) | ({ type: 'spotify' } & ISpotifyMessageProps) | ({ type: 'audio' } & IAudioMessageProps) + | ({ type: 'feedback' } & IFeedbackMessageProps) | ({ type: 'meetingLink' } & IMeetingLinkMessageProps) | ({ type: 'file' } & IFileMessageProps) | ({ type: 'text' } & ITextMessageProps) @@ -1090,6 +1132,7 @@ export class PhotoMessage extends React.Component {} export class VideoMessage extends React.Component {} export class SpotifyMessage extends React.Component {} export class AudioMessage extends React.Component {} +export class FeedbackMessage extends React.Component {} export class MeetingLink extends React.Component {} export class FileMessage extends React.Component {} export class TextMessage extends React.Component {} diff --git a/webpack.dev.config.js b/webpack.dev.config.js index 0d4312ea..a3034a57 100644 --- a/webpack.dev.config.js +++ b/webpack.dev.config.js @@ -23,11 +23,11 @@ module.exports = { exclude: /node_modules/, }, { - test: /\.html$/, - use:{ - loader: 'html-loader' - } - }, + test: /\.html$/, + use:{ + loader: 'html-loader' + }, + }, { test: /\.css$/i, use: [MiniCssExtractPlugin.loader, "css-loader"], @@ -56,4 +56,4 @@ module.exports = { children: true, errorDetails: true } -}; \ No newline at end of file +}; diff --git a/yarn.lock b/yarn.lock index 0fd57d64..d0420c4d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1185,6 +1185,13 @@ resolved "https://registry.yarnpkg.com/@csstools/selector-specificity/-/selector-specificity-2.0.2.tgz#1bfafe4b7ed0f3e4105837e056e0a89b108ebe36" integrity sha512-IkpVW/ehM1hWKln4fCA3NzJU8KwD+kIOvPZA4cqxoJHtE21CCzjyp+Kxbu0i5I4tBNOlXPL9mjwnWlL0VEG4Fg== +"@dhaiwat10/react-link-preview@^1.15.0": + version "1.15.0" + resolved "https://registry.yarnpkg.com/@dhaiwat10/react-link-preview/-/react-link-preview-1.15.0.tgz#44590036751283e494b80df9a982f16b83937561" + integrity sha512-q7wlSBDAHPPEtu6XXcj/OlisKoqBU7XdUHHEGsPBZYFE4Xeais3ATo2XH6xowf/9zi09UlMpcLmKRxsf+bTDXw== + dependencies: + react-loading-skeleton "^3.1.0" + "@discoveryjs/json-ext@^0.5.0": version "0.5.7" resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.7.tgz#1d572bfbbe14b7704e0ba0f39b74815b84870d70" @@ -1224,6 +1231,16 @@ resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== +"@iconify/icons-mdi@~1.1.0": + version "1.1.47" + resolved "https://registry.yarnpkg.com/@iconify/icons-mdi/-/icons-mdi-1.1.47.tgz#4bbe1e5d126de7acde05a66addd869c66bd97ca0" + integrity sha512-6AZfvWru20Rl9pXULStkVvTWnua6VG56zOIKdkCzLh25XVeTDEp6f1dL7iX9w+way5+1hI0BBuqTQd61qYaKdg== + +"@iconify/react@^3.1.3": + version "3.2.2" + resolved "https://registry.yarnpkg.com/@iconify/react/-/react-3.2.2.tgz#ab5241dc01562076bae3b0c22238aff7e5f029cc" + integrity sha512-z3+Jno3VcJzgNHsN5mEvYMsgCkOZkydqdIwOxjXh45+i2Vs9RGH68Y52vt39izwFSfuYUXhaW+1u7m7+IhCn/g== + "@istanbuljs/load-nyc-config@^1.0.0": version "1.1.0" resolved "https://registry.yarnpkg.com/@istanbuljs/load-nyc-config/-/load-nyc-config-1.1.0.tgz#fd3db1d59ecf7cf121e80650bb86712f9b55eced" @@ -3792,7 +3809,7 @@ css-has-pseudo@^3.0.4: dependencies: postcss-selector-parser "^6.0.9" -css-loader@^6.5.1, css-loader@^6.7.1: +css-loader@^6.5.1: version "6.7.2" resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.2.tgz#26bc22401b5921686a10fbeba75d124228302304" integrity sha512-oqGbbVcBJkm8QwmnNzrFrWTnudnRZC+1eXikLJl0n4ljcfotgRifpg2a1lKy8jTrc4/d9A/ap1GFq1jDKG7J+Q== @@ -3806,6 +3823,20 @@ css-loader@^6.5.1, css-loader@^6.7.1: postcss-value-parser "^4.2.0" semver "^7.3.8" +css-loader@^6.7.1: + version "6.7.3" + resolved "https://registry.yarnpkg.com/css-loader/-/css-loader-6.7.3.tgz#1e8799f3ccc5874fdd55461af51137fcc5befbcd" + integrity sha512-qhOH1KlBMnZP8FzRO6YCH9UHXQhVMcEGLyNdb7Hv2cpcmJbW0YrddO+tG1ab5nT41KpHIYGsbeHqxB9xPu1pKQ== + dependencies: + icss-utils "^5.1.0" + postcss "^8.4.19" + postcss-modules-extract-imports "^3.0.0" + postcss-modules-local-by-default "^4.0.0" + postcss-modules-scope "^3.0.0" + postcss-modules-values "^4.0.0" + postcss-value-parser "^4.2.0" + semver "^7.3.8" + css-minimizer-webpack-plugin@^3.2.0: version "3.4.1" resolved "https://registry.yarnpkg.com/css-minimizer-webpack-plugin/-/css-minimizer-webpack-plugin-3.4.1.tgz#ab78f781ced9181992fe7b6e4f3422e76429878f" @@ -9239,6 +9270,15 @@ postcss@^8.3.5, postcss@^8.4.18, postcss@^8.4.4: picocolors "^1.0.0" source-map-js "^1.0.2" +postcss@^8.4.19: + version "8.4.21" + resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.21.tgz#c639b719a57efc3187b13a1d765675485f4134f4" + integrity sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg== + dependencies: + nanoid "^3.3.4" + picocolors "^1.0.0" + source-map-js "^1.0.2" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -9494,6 +9534,15 @@ react-error-overlay@^6.0.11: resolved "https://registry.yarnpkg.com/react-error-overlay/-/react-error-overlay-6.0.11.tgz#92835de5841c5cf08ba00ddd2d677b6d17ff9adb" integrity sha512-/6UZ2qgEyH2aqzYZgQPxEnz33NJ2gNsnHA2o5+o4wW9bLM/JYQitNP9xPhsXwC08hMMovfGe/8retsdDsczPRg== +react-h5-audio-player@^3.8.6: + version "3.8.6" + resolved "https://registry.yarnpkg.com/react-h5-audio-player/-/react-h5-audio-player-3.8.6.tgz#e7ee69ba6c0a82d317d4f987d83bb18b356a4415" + integrity sha512-eyViI47jRRybCcCkGdoAMd6yfhg3UMyXp39mqOWCbNQfAYI8U6zC0+0DLZjhrB7//DJtHhZx8h1q99HMxYkMWQ== + dependencies: + "@babel/runtime" "^7.10.2" + "@iconify/icons-mdi" "~1.1.0" + "@iconify/react" "^3.1.3" + react-icons@*, react-icons@^4.3.1: version "4.7.1" resolved "https://registry.yarnpkg.com/react-icons/-/react-icons-4.7.1.tgz#0f4b25a5694e6972677cb189d2a72eabea7a8345" @@ -9514,6 +9563,11 @@ react-is@^17.0.1, react-is@^17.0.2: resolved "https://registry.yarnpkg.com/react-is/-/react-is-17.0.2.tgz#e691d4a8e9c789365655539ab372762b0efb54f0" integrity sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w== +react-loading-skeleton@^3.1.0: + version "3.2.0" + resolved "https://registry.yarnpkg.com/react-loading-skeleton/-/react-loading-skeleton-3.2.0.tgz#c79f1390195bcd8625c30e68454a1b95508a9c74" + integrity sha512-kN12x4Ud69jbksr2EdhYywAFeW4bPdvFQ9p3ID1OM/QeFjgwFSmSUY2a6P6uOb5ACzWp3ozY8C+7+04KR6+PHA== + react-refresh@^0.11.0: version "0.11.0" resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.11.0.tgz#77198b944733f0f1f1a90e791de4541f9f074046"