ecplayer 1.0.4 → 1.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ecplayer.es.js +1289 -698
- package/dist/ecplayer.umd.js +36 -31
- package/dist/index.d.ts +24 -1
- package/package.json +48 -48
package/dist/ecplayer.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ecp-full-width{width:100%}.ecp-h-full{height:100%}.ecp-relative{position:relative}.ecp-absolute{position:absolute}.ecp-inset-0{top:0;right:0;bottom:0;left:0}.ecp-z-10{z-index:10}.ecp-flex{display:flex}.ecp-inline-flex{display:inline-flex}.ecp-flex-col{flex-direction:column}.ecp-flex-wrap{flex-wrap:wrap}.ecp-flex-1{flex:1 1 0%}.ecp-flex-shrink-0{flex-shrink:0}.ecp-grid{display:grid}.ecp-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.ecp-hidden{display:none}.ecp-items-center{align-items:center}.ecp-items-end{align-items:flex-end}.ecp-items-start{align-items:flex-start}.ecp-justify-center{justify-content:center}.ecp-justify-between{justify-content:space-between}.ecp-justify-end{justify-content:flex-end}.ecp-justify-start{justify-content:flex-start}.ecp-text-center{text-align:center}.ecp-text-right{text-align:right}.ecp-self-center{align-self:center}.ecp-gap-1{gap:.25rem}.ecp-gap-2{gap:.5rem}.ecp-gap-3{gap:.75rem}.ecp-gap-px{gap:1px}.ecp-gap-05{gap:2px}.ecp-mb-1{margin-bottom:.25rem}.ecp-mb-2{margin-bottom:.5rem}.ecp-mb-4{margin-bottom:1rem}.ecp-mb-6{margin-bottom:1.5rem}.ecp-mr-2{margin-right:.5rem}.ecp-mt-4{margin-top:1rem}.ecp-mt-6{margin-top:1.5rem}.ecp-ml-auto{margin-left:auto}.ecp-p-1{padding:.25rem}.ecp-p-1-5{padding:.375rem}.ecp-p-2{padding:.5rem}.ecp-p-3{padding:.75rem}.ecp-p-4{padding:1rem}.ecp-p-6{padding:1.5rem}.ecp-p-8{padding:2rem}.ecp-px-2{padding-left:.5rem;padding-right:.5rem}.ecp-px-3{padding-left:.75rem;padding-right:.75rem}.ecp-px-4{padding-left:1rem;padding-right:1rem}.ecp-px-6{padding-left:1.5rem;padding-right:1.5rem}.ecp-py-1{padding-top:.25rem;padding-bottom:.25rem}.ecp-py-2{padding-top:.5rem;padding-bottom:.5rem}.ecp-py-3{padding-top:.75rem;padding-bottom:.75rem}.ecp-py-5{padding-top:1.25rem;padding-bottom:1.25rem}.ecp-pb-2{padding-bottom:.5rem}.ecp-pt-2{padding-top:.5rem}.ecp-w-1{width:.25rem}.ecp-w-3{width:.75rem}.ecp-w-4{width:1rem}.ecp-w-10{width:2.5rem}.ecp-w-12{width:3rem}.ecp-w-20{width:5rem}.ecp-w-24{width:6rem}.ecp-w-px{width:1px}.ecp-w-full{width:100%}.ecp-max-w-xs{max-width:20rem}.ecp-max-w-lg{max-width:32rem}.ecp-max-w-4xl{max-width:56rem}.ecp-h-0-5{height:.125rem}.ecp-h-1{height:.25rem}.ecp-h-1-5{height:.375rem}.ecp-h-2{height:.5rem}.ecp-h-3{height:.75rem}.ecp-h-4{height:1rem}.ecp-h-6{height:1.5rem}.ecp-h-8{height:2rem}.ecp-h-10{height:2.5rem}.ecp-h-12{height:3rem}.ecp-h-20{height:5rem}.ecp-h-40{width:10rem;height:40px}.ecp-h-64{height:16rem}.ecp-h-screen{height:100vh}.ecp-min-h-screen{min-height:100vh}.ecp-min-h-0{min-height:0}.ecp-min-w-12{min-width:3rem}.ecp-min-w-0{min-width:0}.ecp-aspect-square{aspect-ratio:1 / 1}.ecp-text-xs{font-size:.75rem;line-height:1rem}.ecp-text-sm{font-size:.875rem;line-height:1.25rem}.ecp-text-lg{font-size:1.125rem;line-height:1.75rem}.ecp-text-2xl{font-size:1.5rem;line-height:2rem}.ecp-font-medium{font-weight:500}.ecp-font-semibold{font-weight:600}.ecp-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.ecp-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-text-white{color:#fff}.ecp-text-transparent{color:transparent}.ecp-text-gray-400{color:#9ca3af}.ecp-text-gray-500{color:#6b7280}.ecp-text-gray-600{color:#4b5563}.ecp-text-gray-700{color:#374151}.ecp-text-gray-800{color:#1f2937}.ecp-text-gray-100{color:#f3f4f6}.ecp-text-gray-200{color:#e5e7eb}.ecp-text-gray-300{color:#d1d5db}.ecp-text-red-500{color:#ef4444}.ecp-dark .ecp-text-dark-100{color:#f3f4f6}.ecp-dark .ecp-text-dark-200{color:#e5e7eb}.ecp-dark .ecp-text-dark-300{color:#d1d5db}.ecp-bg-white{background-color:#fff}.ecp-bg-black-20{background-color:#0003}.ecp-bg-black-30{background-color:#0000004d}.ecp-bg-black-40{background-color:#0006}.ecp-bg-black-50{background-color:#00000080}.ecp-bg-gray-100{background-color:#f3f4f6}.ecp-bg-gray-200{background-color:#e5e7eb}.ecp-bg-gray-300{background-color:#d1d5db}.ecp-bg-gray-700{background-color:#374151}.ecp-bg-gray-800{background-color:#1f2937}.ecp-bg-red-50{background-color:#fef2f2}.ecp-bg-transparent{background-color:transparent}.ecp-border{border-width:1px}.ecp-border-2{border-width:2px}.ecp-border-r{border-right-width:1px}.ecp-border-transparent{border-color:transparent}.ecp-border-gray-300{border-color:#d1d5db}.ecp-border-red-300{border-color:#fca5a5}.ecp-border-current{border-color:currentColor}.ecp-border-none{border:none}.ecp-outline-none{outline:none}.ecp-rounded{border-radius:.25rem}.ecp-rounded-lg{border-radius:.5rem}.ecp-rounded-xl{border-radius:.75rem}.ecp-rounded-2xl{border-radius:1rem}.ecp-rounded-full{border-radius:9999px}.ecp-rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.ecp-shadow-sm{box-shadow:0 1px 2px #0000000d}.ecp-shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}.ecp-shadow-2xl{box-shadow:0 25px 50px -12px #00000040}.ecp-opacity-20{opacity:.2}.ecp-opacity-40{opacity:.4}.ecp-opacity-70{opacity:.7}.ecp-opacity-80{opacity:.8}.ecp-cursor-pointer{cursor:pointer}.ecp-cursor-not-allowed{cursor:not-allowed}.ecp-pointer-events-none{pointer-events:none}.ecp-transition{transition-property:color,background-color,border-color,opacity,box-shadow,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ecp-transition-all{transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-duration-75{transition-duration:75ms}.ecp-duration-100{transition-duration:.1s}.ecp-duration-150{transition-duration:.15s}.ecp-duration-300{transition-duration:.3s}.ecp-scale-0{transform:scale(0)}.ecp-translate-y-10{transform:translateY(2.5rem)}.ecp--translate-y-10{transform:translateY(-2.5rem)}.ecp-rotate-180{transform:rotate(180deg)}.ecp-hover-scale-105:hover{transform:scale(1.05)}.ecp-hover-scale-110:hover{transform:scale(1.1)}@keyframes ecp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ecp-animation-spin{animation:ecp-spin 15s infinite linear}.ecp-object-contain{-o-object-fit:contain;object-fit:contain}.ecp-backdrop-blur-xl{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-overflow-hidden{overflow:hidden}.ecp-top-0{top:0}.ecp-left-0{left:0}.ecp-fixed{position:fixed}.ecp-z-9999{z-index:9999}.ecp-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.ecp-page-wrapper{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}@media (min-width: 768px){.ecp-page-wrapper{padding:2rem}}.ecp-demo-container{width:100%;height:100%}@media (min-width: 768px){.ecp-demo-container{height:auto;max-width:56rem}}.ecp-container-glass{border-radius:.75rem;padding:2rem}.ecp-demo-header{margin-bottom:1.5rem;display:flex;justify-content:space-between;align-items:flex-start}.ecp-demo-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin-bottom:.25rem}.ecp-demo-title--dark{color:#e5e7eb}.ecp-demo-subtitle{font-size:.875rem;color:#6b7280}.ecp-theme-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-theme-btn:hover{background:#f9fafb}.ecp-demo-actions{margin-top:1.5rem;display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-action-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1.5rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-action-btn:hover{background:#f9fafb}.ecp-file-input-hidden{display:none}.ecp-theme-selector-panel{border-radius:.75rem;padding:1.5rem;margin-bottom:1.5rem}.ecp-theme-selector-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.ecp-theme-selector-title{font-size:1.125rem;font-weight:600;color:#1f2937}.ecp-theme-selector-close{color:#6b7280;font-size:.875rem;font-weight:500;background:none;border:none;cursor:pointer}.ecp-theme-selector-close:hover{color:#374151}.ecp-theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}@media (min-width: 640px){.ecp-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 768px){.ecp-theme-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.ecp-theme-card{background:#fff;padding:1rem;border-radius:.5rem;cursor:pointer;border:2px solid transparent;transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-theme-card--active{border-color:currentColor;box-shadow:0 10px 15px -3px #0000001a}.ecp-theme-color-preview{height:2.5rem;border-radius:.25rem;margin-bottom:.5rem}.ecp-theme-name{font-size:.875rem;font-weight:500;color:#374151}.ecp-vp-wrapper{width:100%;border-radius:.75rem;overflow:hidden}.ecp-vp-bg{padding:1rem}.ecp-vp-vu-outer{position:relative}.ecp-vp-vu-bg{border-radius:.5rem;margin-bottom:1.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d}.ecp-vp-vu-bg--light{background:#ffffffb3}.ecp-vp-vu-bg--dark{background:#0006}.ecp-vp-vu-bg--dimmed{opacity:.3}.ecp-vp-vu-bg--no-margin{margin-bottom:0}.ecp-vp-vu-bars{display:flex;justify-content:center;align-items:flex-end;gap:.25rem;height:16rem}.ecp-vp-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-vp-eq-overlay--light{background:#fffc}.ecp-vp-eq-overlay--dark{background:#00000080}.ecp-vp-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-vp-eq-title--light{color:#374151}.ecp-vp-eq-title--dark{color:#e5e7eb}.ecp-vp-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-vp-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-vp-eq-band-label{font-size:.75rem}.ecp-vp-eq-band-label--light{color:#4b5563}.ecp-vp-eq-band-label--dark{color:#d1d5db}.ecp-vp-eq-band-range{display:flex;align-items:center;gap:.75rem}.ecp-vp-eq-range-bound{font-size:.75rem}.ecp-vp-eq-range-bound--light{color:#6b7280}.ecp-vp-eq-range-bound--dark{color:#9ca3af}.ecp-vp-eq-slider{flex:1;height:2rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-footer{display:flex;justify-content:flex-end;margin-top:1rem}.ecp-vp-eq-reset{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;transition:all .15s;border:none}.ecp-vp-eq-reset--light{background:#e5e7eb;color:#374151}.ecp-vp-eq-reset--light:hover{background:#d1d5db}.ecp-vp-eq-reset--dark{background:#374151;color:#e5e7eb}.ecp-vp-eq-reset--dark:hover{background:#4b5563}.ecp-vp-track{margin-bottom:1.5rem;display:flex;align-items:center}.ecp-vp-thumbnail-wrap{margin-right:.5rem;width:3rem;flex-shrink:0}.ecp-vp-thumbnail{height:3rem;width:3rem;border-radius:9999px}.ecp-vp-track-info{width:100%;min-width:0}.ecp-vp-track-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-vp-track-name--light{color:#374151}.ecp-vp-track-name--dark{color:#f3f4f6}.ecp-vp-track-author{font-size:.75rem}.ecp-vp-track-author--light{color:#6b7280}.ecp-vp-track-author--dark{color:#d1d5db}.ecp-vp-seekbar{margin-bottom:1.5rem}.ecp-vp-seekbar-row{display:flex;align-items:center;gap:.25rem}.ecp-vp-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-vp-time--right{text-align:right}.ecp-vp-time--light{color:#4b5563}.ecp-vp-time--dark{color:#f3f4f6}.ecp-vp-seek-input{flex:1;height:.5rem;background:#e5e7eb;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-seek-input::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-vp-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-vp-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-vp-controls--sm{gap:.5rem}.ecp-vp-play-btn{padding:.5rem 1rem;min-width:6rem;border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s}.ecp-vp-play-btn:hover{opacity:.9}.ecp-vp-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-play-btn--compact{padding:1.25rem .75rem;min-width:unset}.ecp-vp-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-vp-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-stop-btn--light{background:#374151;color:#fff}.ecp-vp-stop-btn--light:hover{background:#1f2937}.ecp-vp-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-vp-stop-btn--dark:hover{background:#d1d5db}.ecp-vp-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-stop-btn--wide{padding:.5rem 1rem}.ecp-vp-eq-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-eq-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-eq-btn--off:hover{background:#d1d5db}.ecp-vp-eq-btn--on{color:#fff}.ecp-vp-eq-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-eq-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-loop-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-loop-btn--off:hover{background:#d1d5db}.ecp-vp-loop-btn--on{color:#fff}.ecp-vp-loop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-loop-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-icon--active{transform:rotate(180deg)}.ecp-vp-speed-wrap{display:flex;align-items:center}.ecp-vp-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;transition:all .15s;background:transparent}.ecp-vp-speed-select--light{color:#1f2937}.ecp-vp-speed-select--dark{color:#e5e7eb}.ecp-vp-speed-option--light{background:#fff;color:#1f2937}.ecp-vp-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-vp-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-vp-volume{gap:.75rem}}.ecp-vp-mute-btn{padding:.5rem;border-radius:9999px;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-vp-mute-btn:hover{background:#f3f4f680}.ecp-vp-mute-icon--light{color:#4b5563}.ecp-vp-mute-icon--dark{color:#f3f4f6}.ecp-vp-volume-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-volume-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-vp-volume-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-vp-volume-slider{display:none}}.ecp-vp-volume-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-vp-volume-pct--light{color:#374151}.ecp-vp-volume-pct--dark{color:#f3f4f6}.ecp-vp-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-wave-outer{width:100%;max-width:32rem;position:relative}.ecp-wave-audio-el{display:none}.ecp-wave-card{border-radius:1rem;box-shadow:0 25px 50px -12px #00000040}.ecp-wave-card-inner{border-radius:1rem;padding:1.5rem;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-wave-thumbnail-wrap{width:100%;padding:1rem}.ecp-wave-thumbnail{width:100%;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-wave-seek{position:relative;height:5rem;margin-bottom:1.5rem;cursor:pointer}.ecp-wave-bars{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:flex-end;justify-content:center;height:100%;width:100%;gap:1px}.ecp-wave-bar{width:.25rem;border-radius:.25rem .25rem 0 0;transition:all .15s}.ecp-wave-progress-line{position:absolute;top:0;height:100%;width:.25rem;background:#fff;border-right:1px solid black;border-radius:9999px;transition:all .15s;transform:translate(-50%)}.ecp-wave-times{display:flex;justify-content:space-between;font-size:.875rem;margin-bottom:1.5rem}.ecp-wave-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;justify-content:space-between;margin-bottom:1rem}.ecp-wave-left-controls{display:flex;align-items:center;gap:.5rem}.ecp-wave-vol-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-vol-slider{width:5rem;height:.375rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 1px 3px #0003}.ecp-wave-vol-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;cursor:pointer;border:2px solid white}.ecp-wave-center-controls{display:flex;justify-content:center}.ecp-wave-play-btn{padding:1rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s;box-shadow:0 10px 15px -3px #0000001a}.ecp-wave-play-btn:hover{transform:scale(1.05)}.ecp-wave-right-controls{display:flex;align-items:center;gap:.75rem}.ecp-wave-speed-select{padding:.25rem .5rem;border-radius:.5rem;font-size:.875rem;border:none;cursor:pointer}.ecp-wave-speed-select--light{background:#f3f4f6;color:#374151}.ecp-wave-speed-select--dark{background:#1f2937;color:#f3f4f6}.ecp-wave-eq-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#0003;display:flex;align-items:center;justify-content:center;z-index:10;border-radius:1rem;padding:1rem}.ecp-wave-eq-panel{max-width:20rem;width:100%;padding:.5rem 1rem 1rem;border-radius:.75rem}.ecp-wave-eq-panel--light{background:#fff}.ecp-wave-eq-panel--dark{background:#1f2937}.ecp-wave-eq-title{font-size:1.125rem;font-weight:500;margin-bottom:.5rem}.ecp-wave-eq-title--light{color:#374151}.ecp-wave-eq-title--dark{color:#e5e7eb}.ecp-wave-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-wave-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-wave-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-wave-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-wave-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-wave-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-wave-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-wave-eq-slider{flex:1;height:1rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-wave-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-wave-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-wave-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-wave-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-wave-eq-footer-btn--light:hover{background:#d1d5db}.ecp-wave-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-wave-eq-footer-btn--dark:hover{background:#4b5563}.ecp-wave-error{padding:1.5rem;border-radius:.75rem;text-align:center}.ecp-wave-error-title{font-weight:500}.ecp-wave-error-msg{font-size:.875rem}.ecp-wave-error--light{color:#dc2626}.ecp-wave-error--dark{color:#fca5a5}.ecp-nano-wrapper{position:relative;overflow:hidden;display:inline-flex;flex-direction:column;padding:.5rem .75rem;box-shadow:0 10px 15px -3px #0000001a}.ecp-nano-wrapper--pill{border-radius:9999px;width:110px;height:40px}.ecp-nano-wrapper--card{border-radius:1rem;width:120px;height:150px}.ecp-nano-progress-bg{position:absolute;top:0;left:0;height:100%;opacity:.2}.ecp-nano-content{position:absolute;display:flex;flex-direction:column}.ecp-nano-thumbnail-wrap{width:6rem;padding-bottom:.5rem}.ecp-nano-thumbnail{width:6rem;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-nano-row{display:flex;align-items:center;gap:.5rem}.ecp-nano-play-btn{padding:.375rem;border-radius:9999px;border:none;cursor:pointer;flex-shrink:0;transition:transform .15s}.ecp-nano-play-btn:hover{transform:scale(1.1)}.ecp-nano-waveform{display:flex;width:100%;min-width:3rem;align-items:center;gap:2px;height:1.5rem}.ecp-nano-wave-bar{border-radius:9999px;width:100%;transition:height .2s}.ecp-video-wrapper{border-radius:.75rem;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-video-wrapper--fullscreen{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;flex-direction:column;height:100vh;width:100vw;background:#000}.ecp-video-inner{height:auto}.ecp-video-inner--fullscreen{display:flex;flex-direction:column;flex:1}.ecp-video-inner--padded{padding:1rem}.ecp-video-name{margin-bottom:1rem;font-weight:500}.ecp-video-name--light{color:#374151}.ecp-video-name--dark{color:#f3f4f6}.ecp-video-layout{position:relative;margin-bottom:1rem}.ecp-video-layout--row{display:flex;gap:.75rem}.ecp-video-layout--col{display:flex;flex-direction:column;gap:.75rem}.ecp-video-layout--fullscreen{flex:1;min-height:0}.ecp-video-vu-top,.ecp-video-vu-bottom{width:100%;height:3rem}.ecp-video-vu-side{width:3rem;background:#00000080;border-radius:.5rem;padding:.25rem}.ecp-video-el-wrap{flex:1;border-radius:.5rem;overflow:hidden;position:relative}.ecp-video-el-wrap--light{background:#ffffffb3}.ecp-video-el-wrap--dark{background:#000000b3}.ecp-video-el{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.ecp-video-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel{max-width:600px;width:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:center;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel--light{background:#fffc}.ecp-video-eq-panel--dark{background:#000000b3}.ecp-video-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-video-eq-title--light{color:#374151}.ecp-video-eq-title--dark{color:#e5e7eb}.ecp-video-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-video-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-video-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-video-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-video-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-video-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-video-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-video-eq-slider{flex:1;height:1.5rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-video-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-video-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-video-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-video-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-video-eq-footer-btn--light:hover{background:#d1d5db}.ecp-video-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-video-eq-footer-btn--dark:hover{background:#4b5563}.ecp-video-seekbar{margin-bottom:1rem}.ecp-video-seekbar--fullscreen{margin-top:.75rem}.ecp-video-seekbar-row{display:flex;align-items:center;gap:.75rem}.ecp-video-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-video-time--right{text-align:right}.ecp-video-time--light{color:#4b5563}.ecp-video-time--dark{color:#f3f4f6}.ecp-video-seek-input{flex:1;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-video-seek-input::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-video-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-video-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-video-play-btn{border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s;padding:.5rem 1rem}.ecp-video-play-btn:hover{opacity:.9}.ecp-video-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-play-btn--compact{padding:1.25rem .75rem}.ecp-video-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-video-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-stop-btn--light{background:#374151;color:#fff}.ecp-video-stop-btn--light:hover{background:#1f2937}.ecp-video-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-video-stop-btn--dark:hover{background:#d1d5db}.ecp-video-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-fullscreen-btn{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s;padding:.75rem}.ecp-video-fullscreen-btn--light{background:#374151;color:#fff}.ecp-video-fullscreen-btn--light:hover{background:#1f2937}.ecp-video-fullscreen-btn--dark{background:#f3f4f6;color:#000}.ecp-video-fullscreen-btn--dark:hover{background:#d1d5db}.ecp-video-fullscreen-btn--wide{padding:.5rem 1rem}.ecp-video-eq-toggle-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-eq-toggle-btn--off{background:#f3f4f6;color:#374151}.ecp-video-eq-toggle-btn--off:hover{background:#d1d5db}.ecp-video-eq-toggle-btn--on{color:#fff}.ecp-video-eq-toggle-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-eq-toggle-btn--wide{padding:.5rem 1rem}.ecp-video-speed-wrap{display:flex;align-items:center}.ecp-video-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;background:transparent;transition:all .15s}.ecp-video-speed-select--light{color:#1f2937}.ecp-video-speed-select--dark{color:#e5e7eb}.ecp-video-speed-option--light{background:#f3f4f6;color:#1f2937}.ecp-video-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-video-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-video-volume{gap:.75rem}}.ecp-video-mute-btn{padding:.5rem;border-radius:.5rem;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-video-mute-btn:hover{background:#f3f4f6}.ecp-video-mute-icon--light{color:#4b5563}.ecp-video-mute-icon--dark{color:#f3f4f6}.ecp-video-vol-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}.ecp-video-vol-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;border:2px solid white;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-video-vol-slider{display:none}}.ecp-video-vol-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-video-vol-pct--light{color:#374151}.ecp-video-vol-pct--dark{color:#f3f4f6}.ecp-video-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-vu-bar-wrap{flex:1;height:100%;position:relative;display:flex;flex-direction:column;justify-content:flex-end}.ecp-vu-bar-fill{border-radius:.25rem .25rem 0 0;transition:height 75ms}.ecp-vu-peak-line{position:absolute;width:100%;height:2px;transition:top .1s}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
-
import { jsx as e, Fragment as
|
|
3
|
-
import { forwardRef as
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".ecp-full-width{width:100%}.ecp-h-full{height:100%}.ecp-relative{position:relative}.ecp-absolute{position:absolute}.ecp-inset-0{top:0;right:0;bottom:0;left:0}.ecp-z-10{z-index:10}.ecp-flex{display:flex}.ecp-inline-flex{display:inline-flex}.ecp-flex-col{flex-direction:column}.ecp-flex-wrap{flex-wrap:wrap}.ecp-flex-1{flex:1 1 0%}.ecp-flex-shrink-0{flex-shrink:0}.ecp-grid{display:grid}.ecp-grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.ecp-hidden{display:none}.ecp-items-center{align-items:center}.ecp-items-end{align-items:flex-end}.ecp-items-start{align-items:flex-start}.ecp-justify-center{justify-content:center}.ecp-justify-between{justify-content:space-between}.ecp-justify-end{justify-content:flex-end}.ecp-justify-start{justify-content:flex-start}.ecp-text-center{text-align:center}.ecp-text-right{text-align:right}.ecp-self-center{align-self:center}.ecp-gap-1{gap:.25rem}.ecp-gap-2{gap:.5rem}.ecp-gap-3{gap:.75rem}.ecp-gap-px{gap:1px}.ecp-gap-05{gap:2px}.ecp-mb-1{margin-bottom:.25rem}.ecp-mb-2{margin-bottom:.5rem}.ecp-mb-4{margin-bottom:1rem}.ecp-mb-6{margin-bottom:1.5rem}.ecp-mr-2{margin-right:.5rem}.ecp-mt-4{margin-top:1rem}.ecp-mt-6{margin-top:1.5rem}.ecp-ml-auto{margin-left:auto}.ecp-p-1{padding:.25rem}.ecp-p-1-5{padding:.375rem}.ecp-p-2{padding:.5rem}.ecp-p-3{padding:.75rem}.ecp-p-4{padding:1rem}.ecp-p-6{padding:1.5rem}.ecp-p-8{padding:2rem}.ecp-px-2{padding-left:.5rem;padding-right:.5rem}.ecp-px-3{padding-left:.75rem;padding-right:.75rem}.ecp-px-4{padding-left:1rem;padding-right:1rem}.ecp-px-6{padding-left:1.5rem;padding-right:1.5rem}.ecp-py-1{padding-top:.25rem;padding-bottom:.25rem}.ecp-py-2{padding-top:.5rem;padding-bottom:.5rem}.ecp-py-3{padding-top:.75rem;padding-bottom:.75rem}.ecp-py-5{padding-top:1.25rem;padding-bottom:1.25rem}.ecp-pb-2{padding-bottom:.5rem}.ecp-pt-2{padding-top:.5rem}.ecp-w-1{width:.25rem}.ecp-w-3{width:.75rem}.ecp-w-4{width:1rem}.ecp-w-10{width:2.5rem}.ecp-w-12{width:3rem}.ecp-w-20{width:5rem}.ecp-w-24{width:6rem}.ecp-w-px{width:1px}.ecp-w-full{width:100%}.ecp-max-w-xs{max-width:20rem}.ecp-max-w-lg{max-width:32rem}.ecp-max-w-4xl{max-width:56rem}.ecp-h-0-5{height:.125rem}.ecp-h-1{height:.25rem}.ecp-h-1-5{height:.375rem}.ecp-h-2{height:.5rem}.ecp-h-3{height:.75rem}.ecp-h-4{height:1rem}.ecp-h-6{height:1.5rem}.ecp-h-8{height:2rem}.ecp-h-10{height:2.5rem}.ecp-h-12{height:3rem}.ecp-h-20{height:5rem}.ecp-h-40{width:10rem;height:40px}.ecp-h-64{height:16rem}.ecp-h-screen{height:100vh}.ecp-min-h-screen{min-height:100vh}.ecp-min-h-0{min-height:0}.ecp-min-w-12{min-width:3rem}.ecp-min-w-0{min-width:0}.ecp-aspect-square{aspect-ratio:1 / 1}.ecp-text-xs{font-size:.75rem;line-height:1rem}.ecp-text-sm{font-size:.875rem;line-height:1.25rem}.ecp-text-lg{font-size:1.125rem;line-height:1.75rem}.ecp-text-2xl{font-size:1.5rem;line-height:2rem}.ecp-font-medium{font-weight:500}.ecp-font-semibold{font-weight:600}.ecp-font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.ecp-truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-text-white{color:#fff}.ecp-text-transparent{color:transparent}.ecp-text-gray-400{color:#9ca3af}.ecp-text-gray-500{color:#6b7280}.ecp-text-gray-600{color:#4b5563}.ecp-text-gray-700{color:#374151}.ecp-text-gray-800{color:#1f2937}.ecp-text-gray-100{color:#f3f4f6}.ecp-text-gray-200{color:#e5e7eb}.ecp-text-gray-300{color:#d1d5db}.ecp-text-red-500{color:#ef4444}.ecp-dark .ecp-text-dark-100{color:#f3f4f6}.ecp-dark .ecp-text-dark-200{color:#e5e7eb}.ecp-dark .ecp-text-dark-300{color:#d1d5db}.ecp-bg-white{background-color:#fff}.ecp-bg-black-20{background-color:#0003}.ecp-bg-black-30{background-color:#0000004d}.ecp-bg-black-40{background-color:#0006}.ecp-bg-black-50{background-color:#00000080}.ecp-bg-gray-100{background-color:#f3f4f6}.ecp-bg-gray-200{background-color:#e5e7eb}.ecp-bg-gray-300{background-color:#d1d5db}.ecp-bg-gray-700{background-color:#374151}.ecp-bg-gray-800{background-color:#1f2937}.ecp-bg-red-50{background-color:#fef2f2}.ecp-bg-transparent{background-color:transparent}.ecp-border{border-width:1px}.ecp-border-2{border-width:2px}.ecp-border-r{border-right-width:1px}.ecp-border-transparent{border-color:transparent}.ecp-border-gray-300{border-color:#d1d5db}.ecp-border-red-300{border-color:#fca5a5}.ecp-border-current{border-color:currentColor}.ecp-border-none{border:none}.ecp-outline-none{outline:none}.ecp-rounded{border-radius:.25rem}.ecp-rounded-lg{border-radius:.5rem}.ecp-rounded-xl{border-radius:.75rem}.ecp-rounded-2xl{border-radius:1rem}.ecp-rounded-full{border-radius:9999px}.ecp-rounded-t{border-top-left-radius:.25rem;border-top-right-radius:.25rem}.ecp-shadow-sm{box-shadow:0 1px 2px #0000000d}.ecp-shadow-lg{box-shadow:0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a}.ecp-shadow-2xl{box-shadow:0 25px 50px -12px #00000040}.ecp-opacity-20{opacity:.2}.ecp-opacity-40{opacity:.4}.ecp-opacity-70{opacity:.7}.ecp-opacity-80{opacity:.8}.ecp-cursor-pointer{cursor:pointer}.ecp-cursor-not-allowed{cursor:not-allowed}.ecp-pointer-events-none{pointer-events:none}.ecp-transition{transition-property:color,background-color,border-color,opacity,box-shadow,transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.ecp-transition-all{transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-duration-75{transition-duration:75ms}.ecp-duration-100{transition-duration:.1s}.ecp-duration-150{transition-duration:.15s}.ecp-duration-300{transition-duration:.3s}.ecp-scale-0{transform:scale(0)}.ecp-translate-y-10{transform:translateY(2.5rem)}.ecp--translate-y-10{transform:translateY(-2.5rem)}.ecp-rotate-180{transform:rotate(180deg)}.ecp-hover-scale-105:hover{transform:scale(1.05)}.ecp-hover-scale-110:hover{transform:scale(1.1)}@keyframes ecp-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ecp-animation-spin{animation:ecp-spin 15s infinite linear}.ecp-object-contain{-o-object-fit:contain;object-fit:contain}.ecp-backdrop-blur-xl{-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-overflow-hidden{overflow:hidden}.ecp-top-0{top:0}.ecp-left-0{left:0}.ecp-fixed{position:fixed}.ecp-z-9999{z-index:9999}.ecp-appearance-none{-webkit-appearance:none;-moz-appearance:none;appearance:none}.ecp-page-wrapper{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1rem}@media (min-width: 768px){.ecp-page-wrapper{padding:2rem}}.ecp-demo-container{width:100%;height:100%}@media (min-width: 768px){.ecp-demo-container{height:auto;max-width:56rem}}.ecp-container-glass{border-radius:.75rem;padding:2rem}.ecp-demo-header{margin-bottom:1.5rem;display:flex;justify-content:space-between;align-items:flex-start}.ecp-demo-title{font-size:1.5rem;font-weight:600;color:#1f2937;margin-bottom:.25rem}.ecp-demo-title--dark{color:#e5e7eb}.ecp-demo-subtitle{font-size:.875rem;color:#6b7280}.ecp-theme-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-theme-btn:hover{background:#f9fafb}.ecp-demo-actions{margin-top:1.5rem;display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-action-btn{background:#fff;border:1px solid #d1d5db;color:#374151;padding:.5rem 1.5rem;border-radius:.5rem;font-size:.875rem;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:.5rem}.ecp-action-btn:hover{background:#f9fafb}.ecp-file-input-hidden{display:none}.ecp-theme-selector-panel{border-radius:.75rem;padding:1.5rem;margin-bottom:1.5rem}.ecp-theme-selector-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:1rem}.ecp-theme-selector-title{font-size:1.125rem;font-weight:600;color:#1f2937}.ecp-theme-selector-close{color:#6b7280;font-size:.875rem;font-weight:500;background:none;border:none;cursor:pointer}.ecp-theme-selector-close:hover{color:#374151}.ecp-theme-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem}@media (min-width: 640px){.ecp-theme-grid{grid-template-columns:repeat(3,minmax(0,1fr))}}@media (min-width: 768px){.ecp-theme-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}.ecp-theme-card{background:#fff;padding:1rem;border-radius:.5rem;cursor:pointer;border:2px solid transparent;transition:all .15s cubic-bezier(.4,0,.2,1)}.ecp-theme-card--active{border-color:currentColor;box-shadow:0 10px 15px -3px #0000001a}.ecp-theme-color-preview{height:2.5rem;border-radius:.25rem;margin-bottom:.5rem}.ecp-theme-name{font-size:.875rem;font-weight:500;color:#374151}.ecp-vp-wrapper{width:100%;border-radius:.75rem;overflow:hidden}.ecp-vp-bg{padding:1rem}.ecp-vp-vu-outer{position:relative}.ecp-vp-vu-bg{border-radius:.5rem;margin-bottom:1.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d}.ecp-vp-vu-bg--light{background:#ffffffb3}.ecp-vp-vu-bg--dark{background:#0006}.ecp-vp-vu-bg--transparent{background:transparent!important;padding:0!important;box-shadow:none!important}.ecp-vp-vu-bg--dimmed{opacity:.3}.ecp-vp-vu-bg--no-margin{margin-bottom:0}.ecp-vp-vu-bars{display:flex;justify-content:center;align-items:flex-end;gap:.25rem;height:16rem}.ecp-vp-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-vp-eq-overlay--light{background:#ffffffe6}.ecp-vp-eq-overlay--dark{background:#000000b3}.ecp-vp-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-vp-eq-title--light{color:#374151}.ecp-vp-eq-title--dark{color:#e5e7eb}.ecp-vp-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-vp-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-vp-eq-band-label{font-size:.75rem}.ecp-vp-eq-band-label--light{color:#4b5563}.ecp-vp-eq-band-label--dark{color:#d1d5db}.ecp-vp-eq-band-range{display:flex;align-items:center;gap:.75rem}.ecp-vp-eq-range-bound{font-size:.75rem}.ecp-vp-eq-range-bound--light{color:#6b7280}.ecp-vp-eq-range-bound--dark{color:#9ca3af}.ecp-vp-eq-slider{flex:1;height:2rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-vp-eq-footer{display:flex;justify-content:flex-end;margin-top:1rem}.ecp-vp-eq-reset{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;transition:all .15s;border:none}.ecp-vp-eq-reset--light{background:#e5e7eb;color:#374151}.ecp-vp-eq-reset--light:hover{background:#d1d5db}.ecp-vp-eq-reset--dark{background:#374151;color:#e5e7eb}.ecp-vp-eq-reset--dark:hover{background:#4b5563}.ecp-vp-8d-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:.75rem}.ecp-vp-8d-title-group,.ecp-vp-8d-toggle-wrap{display:flex;align-items:center;gap:.5rem}.ecp-vp-8d-toggle-label{font-size:.75rem;font-weight:500}.ecp-vp-8d-toggle-label--light{color:#4b5563}.ecp-vp-8d-toggle-label--dark{color:#d1d5db}.ecp-vp-8d-toggle{position:relative;width:2.75rem;height:1.5rem;border-radius:9999px;background:#d1d5db;cursor:pointer;border:none;transition:background .2s}.ecp-vp-8d-toggle--on{background:var(--theme-slider, #8b5cf6)}.ecp-vp-8d-toggle-thumb{position:absolute;top:.125rem;left:.125rem;width:1.25rem;height:1.25rem;border-radius:50%;background:#fff;transition:transform .2s;box-shadow:0 1px 3px #0000004d}.ecp-vp-8d-toggle--on .ecp-vp-8d-toggle-thumb{transform:translate(1.25rem)}.ecp-vp-8d-visualizer{position:relative;height:4.5rem;margin-bottom:.75rem;border-radius:.5rem;display:flex;align-items:center;justify-content:center;overflow:hidden}.ecp-vp-8d-visualizer--light{background:#0000000a}.ecp-vp-8d-visualizer--dark{background:#ffffff0f}.ecp-vp-8d-orbit-ring{position:absolute;width:6rem;height:3rem;border:1.5px dashed var(--theme-slider-alpha, rgba(139, 92, 246, .4));border-radius:50%}.ecp-vp-8d-head-icon{position:relative;z-index:2;color:var(--theme-slider, #8b5cf6)}.ecp-vp-8d-orbit-dot{position:absolute;width:10px;height:10px;border-radius:50%;background:var(--theme-slider, #8b5cf6);box-shadow:0 0 10px var(--theme-slider, #8b5cf6),0 0 15px var(--theme-slider, #8b5cf6);z-index:3}.ecp-vp-8d-live-overlay{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);z-index:5;display:flex;flex-direction:column;align-items:center;gap:.3rem;pointer-events:none;animation:ecp-8d-badge-blink 2s ease-in-out infinite}.ecp-vp-8d-live-visualizer{position:relative;width:14rem;height:9.5rem;border-radius:50%;display:flex;align-items:center;justify-content:center;overflow:visible}.ecp-vp-8d-live-visualizer--light{background:#fffd;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);box-shadow:inset 0 0 20px #0000000d,0 8px 24px #0000000f}.ecp-vp-8d-live-visualizer--dark{background:#0c0c10d8;-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);box-shadow:inset 0 0 30px #0006,0 8px 24px #00000040}.ecp-vp-8d-live-glow{position:absolute;width:14rem;height:9.5rem;border-radius:50%;animation:ecp-8d-pulse 2.5s ease-in-out infinite;pointer-events:none;z-index:0}@keyframes ecp-8d-pulse{0%,to{opacity:.3;transform:scale(.92)}50%{opacity:.75;transform:scale(1.08)}}.ecp-vp-8d-live-svg{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;z-index:1;pointer-events:none}.ecp-vp-8d-radar-border{fill:none;stroke:var(--theme-slider, #8b5cf6);stroke-opacity:.25;stroke-width:1.5}.ecp-vp-8d-live-head-icon{position:absolute;z-index:3;filter:drop-shadow(0 0 5px currentColor)}.ecp-vp-8d-live-dot{position:absolute;left:50%;top:50%;width:18px;height:18px;margin-left:-9px;margin-top:-9px;border-radius:50%;z-index:4;display:flex;align-items:center;justify-content:center}.ecp-vp-8d-live-dot-inner{width:5px;height:5px;border-radius:50%;background:#000000bf}@keyframes ecp-8d-badge-blink{0%,to{opacity:1}50%{opacity:.8}}.ecp-vp-8d-tabs{display:flex;gap:.25rem;margin-bottom:.75rem;border-bottom:1px solid rgba(156,163,175,.2);padding-bottom:.25rem}.ecp-vp-8d-tab{padding:.25rem .6rem;font-size:.75rem;font-weight:500;border-radius:.375rem;border:1px solid transparent;background:transparent;cursor:pointer;transition:all .15s}.ecp-vp-8d-tab--light{color:#6b7280}.ecp-vp-8d-tab--light:hover{color:#1f2937;background:#0000000d}.ecp-vp-8d-tab--dark{color:#9ca3af}.ecp-vp-8d-tab--dark:hover{color:#f3f4f6;background:#ffffff14}.ecp-vp-8d-tab--active{background:var(--theme-slider-alpha, rgba(139, 92, 246, .15))!important;color:var(--theme-slider, #8b5cf6)!important;border-color:var(--theme-slider, #8b5cf6)!important}.ecp-vp-8d-controls-grid{display:flex;flex-direction:column;gap:.75rem;padding-top:.25rem}.ecp-vp-eq-bands--horizontal{display:flex;flex-direction:row;justify-content:space-between;align-items:center;gap:.75rem;width:100%}.ecp-vp-eq-band-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:.35rem;min-width:0}.ecp-vp-eq-band-col .ecp-vp-eq-slider{height:.5rem;border-radius:9999px}.ecp-vp-eq-band-col .ecp-vp-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:14px;height:14px;border-radius:50%;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 1px 4px #0000004d;cursor:pointer}.ecp-vp-eq-band-col .ecp-vp-eq-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 1px 4px #0000004d;cursor:pointer}.ecp-vp-eq-val{font-size:.75rem;font-weight:600;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace}.ecp-vp-eq-val--light{color:#374151}.ecp-vp-eq-val--dark{color:#f3f4f6}.ecp-vp-eq-label{font-size:.7rem;font-weight:600;letter-spacing:.05em;text-transform:uppercase}.ecp-vp-eq-label--light{color:#6b7280}.ecp-vp-eq-label--dark{color:#9ca3af}.ecp-vp-eq-bar-wrap{width:100%;display:flex;align-items:center}@media (max-width: 640px){.ecp-vp-eq-bands--horizontal{flex-direction:column;gap:.6rem}.ecp-vp-eq-band-col{flex-direction:row;align-items:center;justify-content:space-between;width:100%;gap:.6rem}.ecp-vp-eq-label{order:1;width:3.5rem;text-align:left;flex-shrink:0}.ecp-vp-eq-bar-wrap{order:2;flex:1}.ecp-vp-eq-val{order:3;width:3.5rem;text-align:right;flex-shrink:0}}.ecp-vp-track{margin-bottom:1.5rem;display:flex;align-items:center}.ecp-vp-thumbnail-wrap{margin-right:.5rem;width:3rem;flex-shrink:0}.ecp-vp-thumbnail{height:3rem;width:3rem;border-radius:9999px}.ecp-vp-track-info{width:100%;min-width:0}.ecp-vp-track-name{font-weight:500;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ecp-vp-track-name--light{color:#374151}.ecp-vp-track-name--dark{color:#f3f4f6}.ecp-vp-track-author{font-size:.75rem}.ecp-vp-track-author--light{color:#6b7280}.ecp-vp-track-author--dark{color:#d1d5db}.ecp-vp-seekbar{margin-bottom:1.5rem}.ecp-vp-seekbar-row{display:flex;align-items:center;gap:.25rem}.ecp-vp-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-vp-time--right{text-align:right}.ecp-vp-time--light{color:#4b5563}.ecp-vp-time--dark{color:#f3f4f6}.ecp-vp-seek-input{flex:1;height:.5rem;background:#e5e7eb;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-seek-input::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-vp-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-vp-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-vp-controls--sm{gap:.5rem}.ecp-vp-play-btn{padding:.5rem 1rem;min-width:6rem;border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s}.ecp-vp-play-btn:hover{opacity:.9}.ecp-vp-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-play-btn--compact{padding:1.25rem .75rem;min-width:unset}.ecp-vp-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-vp-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-stop-btn--light{background:#374151;color:#fff}.ecp-vp-stop-btn--light:hover{background:#1f2937}.ecp-vp-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-vp-stop-btn--dark:hover{background:#d1d5db}.ecp-vp-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-stop-btn--wide{padding:.5rem 1rem}.ecp-vp-eq-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-eq-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-eq-btn--off:hover{background:#d1d5db}.ecp-vp-eq-btn--on{color:#fff}.ecp-vp-eq-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-eq-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-vp-loop-btn--off{background:#f3f4f6;color:#374151}.ecp-vp-loop-btn--off:hover{background:#d1d5db}.ecp-vp-loop-btn--on{color:#fff}.ecp-vp-loop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-vp-loop-btn--wide{padding:.5rem 1rem}.ecp-vp-loop-icon--active{transform:rotate(180deg)}.ecp-vp-speed-wrap{display:flex;align-items:center}.ecp-vp-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;transition:all .15s;background:transparent}.ecp-vp-speed-select--light{color:#1f2937}.ecp-vp-speed-select--dark{color:#e5e7eb}.ecp-vp-speed-option--light{background:#fff;color:#1f2937}.ecp-vp-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-vp-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-vp-volume{gap:.75rem}}.ecp-vp-mute-btn{padding:.5rem;border-radius:9999px;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-vp-mute-btn:hover{background:#f3f4f680}.ecp-vp-mute-icon--light{color:#4b5563}.ecp-vp-mute-icon--dark{color:#f3f4f6}.ecp-vp-volume-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-vp-volume-slider::-webkit-slider-thumb{-webkit-appearance:none;-moz-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-vp-volume-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-vp-volume-slider{display:none}}.ecp-vp-volume-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-vp-volume-pct--light{color:#374151}.ecp-vp-volume-pct--dark{color:#f3f4f6}.ecp-vp-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-wave-outer{width:100%;max-width:32rem;position:relative}.ecp-wave-audio-el{display:none}.ecp-wave-card{border-radius:1rem;box-shadow:0 25px 50px -12px #00000040}.ecp-wave-card-inner{border-radius:1rem;padding:1.5rem;-webkit-backdrop-filter:blur(24px);backdrop-filter:blur(24px)}.ecp-wave-thumbnail-wrap{width:100%;padding:1rem}.ecp-wave-thumbnail{width:100%;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-wave-seek{position:relative;height:5rem;margin-bottom:1.5rem;cursor:pointer}.ecp-wave-bars{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;align-items:flex-end;justify-content:center;height:100%;width:100%;gap:1px}.ecp-wave-bar{width:.25rem;border-radius:.25rem .25rem 0 0;transition:all .15s}.ecp-wave-progress-line{position:absolute;top:0;height:100%;width:.25rem;background:#fff;border-right:1px solid black;border-radius:9999px;transition:all .15s;transform:translate(-50%)}.ecp-wave-times{display:flex;justify-content:space-between;font-size:.875rem;margin-bottom:1.5rem}.ecp-wave-controls{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));align-items:center;justify-content:space-between;margin-bottom:1rem}.ecp-wave-left-controls{display:flex;align-items:center;gap:.5rem}.ecp-wave-vol-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-vol-slider{width:5rem;height:.375rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:14px;height:14px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 1px 3px #0003}.ecp-wave-vol-slider::-moz-range-thumb{width:14px;height:14px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none}.ecp-wave-center-controls{display:flex;justify-content:center}.ecp-wave-play-btn{padding:1rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s;box-shadow:0 10px 15px -3px #0000001a}.ecp-wave-play-btn:hover{transform:scale(1.05)}.ecp-wave-right-controls{display:flex;align-items:center;gap:.75rem}.ecp-wave-speed-select{padding:.25rem .5rem;border-radius:.5rem;font-size:.875rem;border:none;cursor:pointer}.ecp-wave-speed-select--light{background:#f3f4f6;color:#374151}.ecp-wave-speed-select--dark{background:#1f2937;color:#f3f4f6}.ecp-wave-eq-btn{padding:.5rem;border-radius:9999px;border:none;cursor:pointer;transition:all .15s}.ecp-wave-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;background:#0003;display:flex;align-items:center;justify-content:center;z-index:10;border-radius:1rem;padding:1rem}.ecp-wave-eq-panel{max-width:20rem;width:100%;padding:.5rem 1rem 1rem;border-radius:.75rem}.ecp-wave-eq-panel--light{background:#fff}.ecp-wave-eq-panel--dark{background:#1f2937}.ecp-wave-eq-title{font-size:1.125rem;font-weight:500;margin-bottom:.5rem}.ecp-wave-eq-title--light{color:#374151}.ecp-wave-eq-title--dark{color:#e5e7eb}.ecp-wave-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-wave-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-wave-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-wave-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-wave-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-wave-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-wave-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-wave-eq-slider{flex:1;height:1rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-wave-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-wave-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-wave-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-wave-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-wave-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-wave-eq-footer-btn--light:hover{background:#d1d5db}.ecp-wave-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-wave-eq-footer-btn--dark:hover{background:#4b5563}.ecp-wave-error{padding:1.5rem;border-radius:.75rem;text-align:center}.ecp-wave-error-title{font-weight:500}.ecp-wave-error-msg{font-size:.875rem}.ecp-wave-error--light{color:#dc2626}.ecp-wave-error--dark{color:#fca5a5}.ecp-nano-wrapper{position:relative;overflow:hidden;display:inline-flex;flex-direction:column;padding:.5rem .75rem;box-shadow:0 10px 15px -3px #0000001a}.ecp-nano-wrapper--pill{border-radius:9999px;width:110px;height:40px}.ecp-nano-wrapper--card{border-radius:1rem;width:120px;height:150px}.ecp-nano-progress-bg{position:absolute;top:0;left:0;height:100%;opacity:.2}.ecp-nano-content{position:absolute;display:flex;flex-direction:column}.ecp-nano-thumbnail-wrap{width:6rem;padding-bottom:.5rem}.ecp-nano-thumbnail{width:6rem;aspect-ratio:1 / 1;border-radius:.75rem}.ecp-nano-row{display:flex;align-items:center;gap:.5rem}.ecp-nano-play-btn{padding:.375rem;border-radius:9999px;border:none;cursor:pointer;flex-shrink:0;transition:transform .15s}.ecp-nano-play-btn:hover{transform:scale(1.1)}.ecp-nano-waveform{display:flex;width:100%;min-width:3rem;align-items:center;gap:2px;height:1.5rem}.ecp-nano-wave-bar{border-radius:9999px;width:100%;transition:height .2s}.ecp-video-wrapper{border-radius:.75rem;overflow:hidden;transition:all .3s cubic-bezier(.4,0,.2,1)}.ecp-video-wrapper--fullscreen{position:fixed;top:0;right:0;bottom:0;left:0;z-index:9999;display:flex;flex-direction:column;height:100vh;width:100vw;background:#000}.ecp-video-inner{height:auto}.ecp-video-inner--fullscreen{display:flex;flex-direction:column;flex:1;min-height:0}.ecp-video-inner--padded{padding:1rem}.ecp-video-name{margin-bottom:1rem;font-weight:500}.ecp-video-name--light{color:#374151}.ecp-video-name--dark{color:#f3f4f6}.ecp-video-layout{position:relative;margin-bottom:1rem}.ecp-video-layout--row{display:flex;gap:.75rem}.ecp-video-layout--col{display:flex;flex-direction:column;gap:.75rem}.ecp-video-layout--fullscreen{flex:1;min-height:0}.ecp-video-vu-top,.ecp-video-vu-bottom{width:100%;height:3rem}.ecp-video-vu-side{width:3rem;background:#00000080;border-radius:.5rem;padding:.25rem}.ecp-video-el-wrap{flex:1;border-radius:.5rem;overflow:hidden;position:relative}.ecp-video-el-wrap--light{background:#ffffffb3}.ecp-video-el-wrap--dark{background:#000000b3}.ecp-video-el{width:100%;height:100%;-o-object-fit:contain;object-fit:contain}.ecp-video-eq-overlay{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;flex-direction:column;width:100%;justify-content:center;z-index:10;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel{max-width:600px;width:100%;margin:0 auto;display:flex;flex-direction:column;justify-content:center;border-radius:.5rem;padding:1rem;box-shadow:0 1px 2px #0000000d;transition:all .3s}.ecp-video-eq-panel--light{background:#fffc}.ecp-video-eq-panel--dark{background:#000000b3}.ecp-video-eq-title{font-size:.875rem;font-weight:500;margin-bottom:1rem}.ecp-video-eq-title--light{color:#374151}.ecp-video-eq-title--dark{color:#e5e7eb}.ecp-video-eq-bands{display:flex;flex-direction:column;gap:1rem}.ecp-video-eq-band-header{display:flex;justify-content:space-between;margin-bottom:.25rem}.ecp-video-eq-label--light{font-size:.75rem;color:#4b5563}.ecp-video-eq-label--dark{font-size:.75rem;color:#d1d5db}.ecp-video-eq-range-row{display:flex;align-items:center;gap:.75rem}.ecp-video-eq-bound--light{font-size:.75rem;color:#6b7280}.ecp-video-eq-bound--dark{font-size:.75rem;color:#9ca3af}.ecp-video-eq-slider{flex:1;height:1.5rem;background:#d1d5db;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-eq-slider::-webkit-slider-thumb{-webkit-appearance:none;width:0;height:0;background:transparent;border:none;box-shadow:none}.ecp-video-eq-slider::-moz-range-thumb{width:0;height:0;background:transparent;border:none}.ecp-video-eq-footer{display:flex;justify-content:space-between;margin-top:1.5rem}.ecp-video-eq-footer-btn{padding:.25rem .75rem;border-radius:.25rem;font-size:.75rem;cursor:pointer;border:none;transition:all .15s}.ecp-video-eq-footer-btn--light{background:#e5e7eb;color:#374151}.ecp-video-eq-footer-btn--light:hover{background:#d1d5db}.ecp-video-eq-footer-btn--dark{background:#374151;color:#e5e7eb}.ecp-video-eq-footer-btn--dark:hover{background:#4b5563}.ecp-video-seekbar{margin-bottom:1rem}.ecp-video-seekbar--fullscreen{margin-top:.75rem}.ecp-video-seekbar-row{display:flex;align-items:center;gap:.75rem}.ecp-video-time{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:3rem}.ecp-video-time--right{text-align:right}.ecp-video-time--light{color:#4b5563}.ecp-video-time--dark{color:#f3f4f6}.ecp-video-seek-input{flex:1;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-seek-input:disabled{opacity:.4;cursor:not-allowed}.ecp-video-seek-input::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-video-seek-input::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-video-controls{display:flex;flex-wrap:wrap;align-items:center;gap:.75rem}.ecp-video-play-btn{border-radius:9999px;font-size:.875rem;font-weight:500;color:#fff;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:opacity .15s;padding:.5rem 1rem}.ecp-video-play-btn:hover{opacity:.9}.ecp-video-play-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-play-btn--compact{padding:1.25rem .75rem}.ecp-video-play-icon-wrap{position:relative;width:1rem;display:flex;align-items:center}.ecp-video-stop-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-stop-btn--light{background:#374151;color:#fff}.ecp-video-stop-btn--light:hover{background:#1f2937}.ecp-video-stop-btn--dark{background:#f3f4f6;color:#000}.ecp-video-stop-btn--dark:hover{background:#d1d5db}.ecp-video-stop-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-fullscreen-btn{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s;padding:.75rem}.ecp-video-fullscreen-btn--light{background:#374151;color:#fff}.ecp-video-fullscreen-btn--light:hover{background:#1f2937}.ecp-video-fullscreen-btn--dark{background:#f3f4f6;color:#000}.ecp-video-fullscreen-btn--dark:hover{background:#d1d5db}.ecp-video-fullscreen-btn--wide{padding:.5rem 1rem}.ecp-video-eq-toggle-btn{padding:.75rem;border-radius:9999px;font-size:.875rem;font-weight:500;border:none;cursor:pointer;display:flex;align-items:center;gap:.5rem;transition:all .15s}.ecp-video-eq-toggle-btn--off{background:#f3f4f6;color:#374151}.ecp-video-eq-toggle-btn--off:hover{background:#d1d5db}.ecp-video-eq-toggle-btn--on{color:#fff}.ecp-video-eq-toggle-btn:disabled{opacity:.4;cursor:not-allowed}.ecp-video-eq-toggle-btn--wide{padding:.5rem 1rem}.ecp-video-speed-wrap{display:flex;align-items:center}.ecp-video-speed-select{border-radius:9999px;font-size:.875rem;font-weight:500;border:none;outline:none;cursor:pointer;background:transparent;transition:all .15s}.ecp-video-speed-select--light{color:#1f2937}.ecp-video-speed-select--dark{color:#e5e7eb}.ecp-video-speed-option--light{background:#f3f4f6;color:#1f2937}.ecp-video-speed-option--dark{background:#1f2937;color:#f3f4f6}.ecp-video-volume{display:flex;align-items:center;gap:.25rem;margin-left:auto}@media (min-width: 768px){.ecp-video-volume{gap:.75rem}}.ecp-video-mute-btn{padding:.5rem;border-radius:.5rem;background:none;border:none;cursor:pointer;transition:all .15s}.ecp-video-mute-btn:hover{background:#f3f4f6}.ecp-video-mute-icon--light{color:#4b5563}.ecp-video-mute-icon--dark{color:#f3f4f6}.ecp-video-vol-slider{width:6rem;height:.5rem;border-radius:.5rem;-webkit-appearance:none;-moz-appearance:none;appearance:none;cursor:pointer}.ecp-video-vol-slider::-webkit-slider-thumb{-webkit-appearance:none;width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}.ecp-video-vol-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;cursor:pointer;background:var(--thumb-color, #ffffff);border:none;box-shadow:0 2px 6px #0003}@media (max-width: 460px){.ecp-video-vol-slider{display:none}}.ecp-video-vol-pct{font-size:.75rem;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;width:2.5rem;text-align:right}.ecp-video-vol-pct--light{color:#374151}.ecp-video-vol-pct--dark{color:#f3f4f6}.ecp-video-error{font-size:.875rem;color:#ef4444;background:#fef2f2;padding:.75rem;border-radius:.25rem;margin-bottom:1rem;border:1px solid #fca5a5}.ecp-vu-bar-wrap{flex:1;height:100%;position:relative;display:flex;flex-direction:column;justify-content:flex-end}.ecp-vu-bar-fill{border-radius:.25rem .25rem 0 0;transition:height 75ms}.ecp-vu-peak-line{position:absolute;width:100%;height:2px;transition:top .1s}")),document.head.appendChild(e)}}catch(r){console.error("vite-plugin-css-injected-by-js",r)}})();
|
|
2
|
+
import { jsx as e, Fragment as Ft, jsxs as r } from "react/jsx-runtime";
|
|
3
|
+
import { forwardRef as zt, createElement as st, useState as b, useEffect as E, useRef as u } from "react";
|
|
4
4
|
/**
|
|
5
5
|
* @license lucide-react v0.540.0 - ISC
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the ISC license.
|
|
8
8
|
* See the LICENSE file in the root directory of this source tree.
|
|
9
9
|
*/
|
|
10
|
-
const
|
|
10
|
+
const Vt = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Yt = (s) => s.replace(
|
|
11
11
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
12
|
-
(
|
|
13
|
-
),
|
|
14
|
-
const
|
|
15
|
-
return
|
|
16
|
-
},
|
|
17
|
-
for (const
|
|
18
|
-
if (
|
|
12
|
+
(p, v, y) => y ? y.toUpperCase() : v.toLowerCase()
|
|
13
|
+
), Pt = (s) => {
|
|
14
|
+
const p = Yt(s);
|
|
15
|
+
return p.charAt(0).toUpperCase() + p.slice(1);
|
|
16
|
+
}, Lt = (...s) => s.filter((p, v, y) => !!p && p.trim() !== "" && y.indexOf(p) === v).join(" ").trim(), Zt = (s) => {
|
|
17
|
+
for (const p in s)
|
|
18
|
+
if (p.startsWith("aria-") || p === "role" || p === "title")
|
|
19
19
|
return !0;
|
|
20
20
|
};
|
|
21
21
|
/**
|
|
@@ -24,7 +24,7 @@ const Ke = (s) => s.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), Xe = (
|
|
|
24
24
|
* This source code is licensed under the ISC license.
|
|
25
25
|
* See the LICENSE file in the root directory of this source tree.
|
|
26
26
|
*/
|
|
27
|
-
var
|
|
27
|
+
var Kt = {
|
|
28
28
|
xmlns: "http://www.w3.org/2000/svg",
|
|
29
29
|
width: 24,
|
|
30
30
|
height: 24,
|
|
@@ -41,32 +41,32 @@ var Je = {
|
|
|
41
41
|
* This source code is licensed under the ISC license.
|
|
42
42
|
* See the LICENSE file in the root directory of this source tree.
|
|
43
43
|
*/
|
|
44
|
-
const
|
|
44
|
+
const Qt = zt(
|
|
45
45
|
({
|
|
46
46
|
color: s = "currentColor",
|
|
47
|
-
size:
|
|
48
|
-
strokeWidth:
|
|
49
|
-
absoluteStrokeWidth:
|
|
50
|
-
className:
|
|
51
|
-
children:
|
|
52
|
-
iconNode:
|
|
53
|
-
...
|
|
54
|
-
},
|
|
47
|
+
size: p = 24,
|
|
48
|
+
strokeWidth: v = 2,
|
|
49
|
+
absoluteStrokeWidth: y,
|
|
50
|
+
className: T = "",
|
|
51
|
+
children: h,
|
|
52
|
+
iconNode: q,
|
|
53
|
+
...te
|
|
54
|
+
}, R) => st(
|
|
55
55
|
"svg",
|
|
56
56
|
{
|
|
57
|
-
ref:
|
|
58
|
-
...
|
|
59
|
-
width:
|
|
60
|
-
height:
|
|
57
|
+
ref: R,
|
|
58
|
+
...Kt,
|
|
59
|
+
width: p,
|
|
60
|
+
height: p,
|
|
61
61
|
stroke: s,
|
|
62
|
-
strokeWidth:
|
|
63
|
-
className:
|
|
64
|
-
...!
|
|
65
|
-
...
|
|
62
|
+
strokeWidth: y ? Number(v) * 24 / Number(p) : v,
|
|
63
|
+
className: Lt("lucide", T),
|
|
64
|
+
...!h && !Zt(te) && { "aria-hidden": "true" },
|
|
65
|
+
...te
|
|
66
66
|
},
|
|
67
67
|
[
|
|
68
|
-
...
|
|
69
|
-
...Array.isArray(
|
|
68
|
+
...q.map(([S, V]) => st(S, V)),
|
|
69
|
+
...Array.isArray(h) ? h : [h]
|
|
70
70
|
]
|
|
71
71
|
)
|
|
72
72
|
);
|
|
@@ -76,20 +76,20 @@ const et = Qe(
|
|
|
76
76
|
* This source code is licensed under the ISC license.
|
|
77
77
|
* See the LICENSE file in the root directory of this source tree.
|
|
78
78
|
*/
|
|
79
|
-
const
|
|
80
|
-
const
|
|
81
|
-
({ className:
|
|
82
|
-
ref:
|
|
83
|
-
iconNode:
|
|
84
|
-
className:
|
|
85
|
-
`lucide-${
|
|
79
|
+
const ge = (s, p) => {
|
|
80
|
+
const v = zt(
|
|
81
|
+
({ className: y, ...T }, h) => st(Qt, {
|
|
82
|
+
ref: h,
|
|
83
|
+
iconNode: p,
|
|
84
|
+
className: Lt(
|
|
85
|
+
`lucide-${Vt(Pt(s))}`,
|
|
86
86
|
`lucide-${s}`,
|
|
87
|
-
|
|
87
|
+
y
|
|
88
88
|
),
|
|
89
|
-
...
|
|
89
|
+
...T
|
|
90
90
|
})
|
|
91
91
|
);
|
|
92
|
-
return
|
|
92
|
+
return v.displayName = Pt(s), v;
|
|
93
93
|
};
|
|
94
94
|
/**
|
|
95
95
|
* @license lucide-react v0.540.0 - ISC
|
|
@@ -97,41 +97,56 @@ const le = (s, l) => {
|
|
|
97
97
|
* This source code is licensed under the ISC license.
|
|
98
98
|
* See the LICENSE file in the root directory of this source tree.
|
|
99
99
|
*/
|
|
100
|
-
const
|
|
100
|
+
const Jt = [
|
|
101
|
+
[
|
|
102
|
+
"path",
|
|
103
|
+
{
|
|
104
|
+
d: "M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",
|
|
105
|
+
key: "1xhozi"
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
], it = ge("headphones", Jt);
|
|
109
|
+
/**
|
|
110
|
+
* @license lucide-react v0.540.0 - ISC
|
|
111
|
+
*
|
|
112
|
+
* This source code is licensed under the ISC license.
|
|
113
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
114
|
+
*/
|
|
115
|
+
const er = [
|
|
101
116
|
["path", { d: "M8 3H5a2 2 0 0 0-2 2v3", key: "1dcmit" }],
|
|
102
117
|
["path", { d: "M21 8V5a2 2 0 0 0-2-2h-3", key: "1e4gt3" }],
|
|
103
118
|
["path", { d: "M3 16v3a2 2 0 0 0 2 2h3", key: "wsl5sc" }],
|
|
104
119
|
["path", { d: "M16 21h3a2 2 0 0 0 2-2v-3", key: "18trek" }]
|
|
105
|
-
],
|
|
120
|
+
], tr = ge("maximize", er);
|
|
106
121
|
/**
|
|
107
122
|
* @license lucide-react v0.540.0 - ISC
|
|
108
123
|
*
|
|
109
124
|
* This source code is licensed under the ISC license.
|
|
110
125
|
* See the LICENSE file in the root directory of this source tree.
|
|
111
126
|
*/
|
|
112
|
-
const
|
|
127
|
+
const rr = [
|
|
113
128
|
["path", { d: "M8 3v3a2 2 0 0 1-2 2H3", key: "hohbtr" }],
|
|
114
129
|
["path", { d: "M21 8h-3a2 2 0 0 1-2-2V3", key: "5jw1f3" }],
|
|
115
130
|
["path", { d: "M3 16h3a2 2 0 0 1 2 2v3", key: "198tvr" }],
|
|
116
131
|
["path", { d: "M16 21v-3a2 2 0 0 1 2-2h3", key: "ph8mxp" }]
|
|
117
|
-
],
|
|
132
|
+
], nr = ge("minimize", rr);
|
|
118
133
|
/**
|
|
119
134
|
* @license lucide-react v0.540.0 - ISC
|
|
120
135
|
*
|
|
121
136
|
* This source code is licensed under the ISC license.
|
|
122
137
|
* See the LICENSE file in the root directory of this source tree.
|
|
123
138
|
*/
|
|
124
|
-
const
|
|
139
|
+
const ar = [
|
|
125
140
|
["rect", { x: "14", y: "3", width: "5", height: "18", rx: "1", key: "kaeet6" }],
|
|
126
141
|
["rect", { x: "5", y: "3", width: "5", height: "18", rx: "1", key: "1wsw3u" }]
|
|
127
|
-
],
|
|
142
|
+
], et = ge("pause", ar);
|
|
128
143
|
/**
|
|
129
144
|
* @license lucide-react v0.540.0 - ISC
|
|
130
145
|
*
|
|
131
146
|
* This source code is licensed under the ISC license.
|
|
132
147
|
* See the LICENSE file in the root directory of this source tree.
|
|
133
148
|
*/
|
|
134
|
-
const
|
|
149
|
+
const cr = [
|
|
135
150
|
[
|
|
136
151
|
"path",
|
|
137
152
|
{
|
|
@@ -139,26 +154,26 @@ const st = [
|
|
|
139
154
|
key: "10ikf1"
|
|
140
155
|
}
|
|
141
156
|
]
|
|
142
|
-
],
|
|
157
|
+
], tt = ge("play", cr);
|
|
143
158
|
/**
|
|
144
159
|
* @license lucide-react v0.540.0 - ISC
|
|
145
160
|
*
|
|
146
161
|
* This source code is licensed under the ISC license.
|
|
147
162
|
* See the LICENSE file in the root directory of this source tree.
|
|
148
163
|
*/
|
|
149
|
-
const
|
|
164
|
+
const ir = [
|
|
150
165
|
["path", { d: "m17 2 4 4-4 4", key: "nntrym" }],
|
|
151
166
|
["path", { d: "M3 11v-1a4 4 0 0 1 4-4h14", key: "84bu3i" }],
|
|
152
167
|
["path", { d: "m7 22-4-4 4-4", key: "1wqhfi" }],
|
|
153
168
|
["path", { d: "M21 13v1a4 4 0 0 1-4 4H3", key: "1rx37r" }]
|
|
154
|
-
],
|
|
169
|
+
], sr = ge("repeat", ir);
|
|
155
170
|
/**
|
|
156
171
|
* @license lucide-react v0.540.0 - ISC
|
|
157
172
|
*
|
|
158
173
|
* This source code is licensed under the ISC license.
|
|
159
174
|
* See the LICENSE file in the root directory of this source tree.
|
|
160
175
|
*/
|
|
161
|
-
const
|
|
176
|
+
const lr = [
|
|
162
177
|
["line", { x1: "4", x2: "4", y1: "21", y2: "14", key: "1p332r" }],
|
|
163
178
|
["line", { x1: "4", x2: "4", y1: "10", y2: "3", key: "gb41h5" }],
|
|
164
179
|
["line", { x1: "12", x2: "12", y1: "21", y2: "12", key: "hf2csr" }],
|
|
@@ -168,34 +183,34 @@ const lt = [
|
|
|
168
183
|
["line", { x1: "2", x2: "6", y1: "14", y2: "14", key: "1uebub" }],
|
|
169
184
|
["line", { x1: "10", x2: "14", y1: "8", y2: "8", key: "1yglbp" }],
|
|
170
185
|
["line", { x1: "18", x2: "22", y1: "16", y2: "16", key: "1jxqpz" }]
|
|
171
|
-
],
|
|
186
|
+
], Je = ge("sliders-vertical", lr);
|
|
172
187
|
/**
|
|
173
188
|
* @license lucide-react v0.540.0 - ISC
|
|
174
189
|
*
|
|
175
190
|
* This source code is licensed under the ISC license.
|
|
176
191
|
* See the LICENSE file in the root directory of this source tree.
|
|
177
192
|
*/
|
|
178
|
-
const
|
|
193
|
+
const or = [
|
|
179
194
|
["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
|
|
180
|
-
],
|
|
195
|
+
], St = ge("square", or);
|
|
181
196
|
/**
|
|
182
197
|
* @license lucide-react v0.540.0 - ISC
|
|
183
198
|
*
|
|
184
199
|
* This source code is licensed under the ISC license.
|
|
185
200
|
* See the LICENSE file in the root directory of this source tree.
|
|
186
201
|
*/
|
|
187
|
-
const
|
|
202
|
+
const pr = [
|
|
188
203
|
["path", { d: "M12 3v12", key: "1x0j5s" }],
|
|
189
204
|
["path", { d: "m17 8-5-5-5 5", key: "7q97r8" }],
|
|
190
205
|
["path", { d: "M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4", key: "ih7n3h" }]
|
|
191
|
-
],
|
|
206
|
+
], dr = ge("upload", pr);
|
|
192
207
|
/**
|
|
193
208
|
* @license lucide-react v0.540.0 - ISC
|
|
194
209
|
*
|
|
195
210
|
* This source code is licensed under the ISC license.
|
|
196
211
|
* See the LICENSE file in the root directory of this source tree.
|
|
197
212
|
*/
|
|
198
|
-
const
|
|
213
|
+
const ur = [
|
|
199
214
|
[
|
|
200
215
|
"path",
|
|
201
216
|
{
|
|
@@ -205,14 +220,14 @@ const mt = [
|
|
|
205
220
|
],
|
|
206
221
|
["path", { d: "M16 9a5 5 0 0 1 0 6", key: "1q6k2b" }],
|
|
207
222
|
["path", { d: "M19.364 18.364a9 9 0 0 0 0-12.728", key: "ijwkga" }]
|
|
208
|
-
],
|
|
223
|
+
], lt = ge("volume-2", ur);
|
|
209
224
|
/**
|
|
210
225
|
* @license lucide-react v0.540.0 - ISC
|
|
211
226
|
*
|
|
212
227
|
* This source code is licensed under the ISC license.
|
|
213
228
|
* See the LICENSE file in the root directory of this source tree.
|
|
214
229
|
*/
|
|
215
|
-
const
|
|
230
|
+
const vr = [
|
|
216
231
|
[
|
|
217
232
|
"path",
|
|
218
233
|
{
|
|
@@ -222,7 +237,7 @@ const ft = [
|
|
|
222
237
|
],
|
|
223
238
|
["line", { x1: "22", x2: "16", y1: "9", y2: "15", key: "1ewh16" }],
|
|
224
239
|
["line", { x1: "16", x2: "22", y1: "9", y2: "15", key: "5ykzw1" }]
|
|
225
|
-
],
|
|
240
|
+
], ot = ge("volume-x", vr), Ae = {
|
|
226
241
|
rainbow: {
|
|
227
242
|
name: "Rainbow",
|
|
228
243
|
bg: "linear-gradient(135deg, #ef444422 0%, #f9731622 15%, #f59e0b22 30%, #10b98122 45%, #06b6d422 60%, #3b82f622 75%, #6366f122 85%, #a855f722 92%, #ec489922 100%)",
|
|
@@ -322,45 +337,63 @@ const ft = [
|
|
|
322
337
|
slider: "#ec4899"
|
|
323
338
|
}
|
|
324
339
|
};
|
|
325
|
-
function
|
|
326
|
-
const
|
|
327
|
-
key:
|
|
328
|
-
name:
|
|
329
|
-
colors:
|
|
340
|
+
function hr({ theme: s, setTheme: p, close: v }) {
|
|
341
|
+
const y = Object.keys(Ae).map((T) => ({
|
|
342
|
+
key: T,
|
|
343
|
+
name: Ae[T].name,
|
|
344
|
+
colors: Ae[T].bars
|
|
330
345
|
}));
|
|
331
|
-
return /* @__PURE__ */
|
|
332
|
-
/* @__PURE__ */
|
|
346
|
+
return /* @__PURE__ */ r("div", { className: "ecp-theme-selector-panel", children: [
|
|
347
|
+
/* @__PURE__ */ r("div", { className: "ecp-theme-selector-header", children: [
|
|
333
348
|
/* @__PURE__ */ e("h2", { className: "ecp-theme-selector-title", children: "Choose Color Palette" }),
|
|
334
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
349
|
+
/* @__PURE__ */ e("button", { onClick: () => v(), className: "ecp-theme-selector-close", children: "Close" })
|
|
335
350
|
] }),
|
|
336
|
-
/* @__PURE__ */ e("div", { className: "ecp-theme-grid", children:
|
|
351
|
+
/* @__PURE__ */ e("div", { className: "ecp-theme-grid", children: y.map((T) => /* @__PURE__ */ r(
|
|
337
352
|
"div",
|
|
338
353
|
{
|
|
339
|
-
className: `ecp-theme-card${s ===
|
|
340
|
-
onClick: () =>
|
|
354
|
+
className: `ecp-theme-card${s === T.key ? " ecp-theme-card--active" : ""}`,
|
|
355
|
+
onClick: () => p(T.key),
|
|
341
356
|
children: [
|
|
342
357
|
/* @__PURE__ */ e(
|
|
343
358
|
"div",
|
|
344
359
|
{
|
|
345
360
|
className: "ecp-theme-color-preview",
|
|
346
|
-
style: { background: `linear-gradient(to right, ${
|
|
361
|
+
style: { background: `linear-gradient(to right, ${T.colors.join(", ")})` }
|
|
347
362
|
}
|
|
348
363
|
),
|
|
349
|
-
/* @__PURE__ */ e("div", { className: "ecp-theme-name", children:
|
|
364
|
+
/* @__PURE__ */ e("div", { className: "ecp-theme-name", children: T.name })
|
|
350
365
|
]
|
|
351
366
|
},
|
|
352
|
-
|
|
367
|
+
T.key
|
|
353
368
|
)) })
|
|
354
369
|
] });
|
|
355
370
|
}
|
|
356
|
-
|
|
371
|
+
const At = (s, p) => {
|
|
372
|
+
const v = s.sampleRate, y = Math.max(1, Math.floor(v * Math.max(0.1, p))), T = s.createBuffer(2, y, v), h = T.getChannelData(0), q = T.getChannelData(1), te = 3 / p;
|
|
373
|
+
for (let R = 0; R < y; R++) {
|
|
374
|
+
const S = R / v, V = Math.exp(-S * te);
|
|
375
|
+
h[R] = (Math.random() * 2 - 1) * V, q[R] = (Math.random() * 2 - 1) * V;
|
|
376
|
+
}
|
|
377
|
+
return T;
|
|
378
|
+
}, Mt = (s) => {
|
|
379
|
+
const p = Math.max(0, s), v = 44100, y = new Float32Array(v), T = Math.PI / 180;
|
|
380
|
+
if (p === 0)
|
|
381
|
+
for (let h = 0; h < v; ++h) y[h] = h * 2 / v - 1;
|
|
382
|
+
else
|
|
383
|
+
for (let h = 0; h < v; ++h) {
|
|
384
|
+
const q = h * 2 / v - 1;
|
|
385
|
+
y[h] = (3 + p) * q * 20 * T / (Math.PI + p * Math.abs(q));
|
|
386
|
+
}
|
|
387
|
+
return y;
|
|
388
|
+
};
|
|
389
|
+
function mr({
|
|
357
390
|
audio: s,
|
|
358
|
-
name:
|
|
359
|
-
author:
|
|
360
|
-
theme:
|
|
361
|
-
volume:
|
|
362
|
-
thumbnail:
|
|
363
|
-
controls:
|
|
391
|
+
name: p = "No track loaded",
|
|
392
|
+
author: v,
|
|
393
|
+
theme: y = "rainbow",
|
|
394
|
+
volume: T = 100,
|
|
395
|
+
thumbnail: h = null,
|
|
396
|
+
controls: q = {
|
|
364
397
|
play: !0,
|
|
365
398
|
pause: !0,
|
|
366
399
|
stop: !0,
|
|
@@ -369,41 +402,124 @@ function ht({
|
|
|
369
402
|
loop: !0,
|
|
370
403
|
trackName: !0,
|
|
371
404
|
equalizer: !0,
|
|
372
|
-
speed: !0
|
|
405
|
+
speed: !0,
|
|
406
|
+
dolby8d: !1
|
|
373
407
|
},
|
|
374
|
-
mode:
|
|
375
|
-
bands:
|
|
376
|
-
transparent:
|
|
377
|
-
autoPlay:
|
|
378
|
-
equalizer:
|
|
408
|
+
mode: te = "light",
|
|
409
|
+
bands: R = null,
|
|
410
|
+
transparent: S = !1,
|
|
411
|
+
autoPlay: V = !1,
|
|
412
|
+
equalizer: U = { bass: 0, mid: 0, treble: 0 },
|
|
413
|
+
dolby8d: a = null
|
|
379
414
|
}) {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
415
|
+
var bt, yt, kt, qt, Nt, wt, $t, xt, Ct, Et, Tt;
|
|
416
|
+
const [G, D] = b(!1), [H, Y] = b(0), [O, z] = b(0), [M, Me] = b(T || 100), [fe, Ce] = b(!1), [_, Fe] = b(!1), [me, be] = b(!1), [ye, X] = b([]), [Q, ze] = b(!1), [Z, Ee] = b({
|
|
417
|
+
bass: U.bass || 0,
|
|
418
|
+
mid: U.mid || 0,
|
|
419
|
+
treble: U.treble || 0
|
|
420
|
+
}), [ae, _e] = b(1), [N, Te] = b(0), [ce, Ne] = b(!1), [o, pe] = b({
|
|
421
|
+
enable: q.dolby8d ? (a == null ? void 0 : a.enable) !== void 0 ? a.enable : !0 : !1,
|
|
422
|
+
spatial: {
|
|
423
|
+
rate: ((bt = a == null ? void 0 : a.spatial) == null ? void 0 : bt.rate) !== void 0 ? a.spatial.rate : 0.11,
|
|
424
|
+
width: ((yt = a == null ? void 0 : a.spatial) == null ? void 0 : yt.width) !== void 0 ? a.spatial.width : 135,
|
|
425
|
+
focus: ((kt = a == null ? void 0 : a.spatial) == null ? void 0 : kt.focus) !== void 0 ? a.spatial.focus : 65
|
|
426
|
+
},
|
|
427
|
+
reverb: {
|
|
428
|
+
size: ((qt = a == null ? void 0 : a.reverb) == null ? void 0 : qt.size) !== void 0 ? a.reverb.size : 2.4,
|
|
429
|
+
tone: ((Nt = a == null ? void 0 : a.reverb) == null ? void 0 : Nt.tone) !== void 0 ? a.reverb.tone : 62,
|
|
430
|
+
mix: ((wt = a == null ? void 0 : a.reverb) == null ? void 0 : wt.mix) !== void 0 ? a.reverb.mix : 30
|
|
431
|
+
},
|
|
432
|
+
echo: {
|
|
433
|
+
time: (($t = a == null ? void 0 : a.echo) == null ? void 0 : $t.time) !== void 0 ? a.echo.time : 500,
|
|
434
|
+
feedback: ((xt = a == null ? void 0 : a.echo) == null ? void 0 : xt.feedback) !== void 0 ? a.echo.feedback : 45,
|
|
435
|
+
mix: ((Ct = a == null ? void 0 : a.echo) == null ? void 0 : Ct.mix) !== void 0 ? a.echo.mix : 5
|
|
436
|
+
},
|
|
437
|
+
tape: {
|
|
438
|
+
speed: typeof (a == null ? void 0 : a.tape) == "number" ? a.tape : ((Et = a == null ? void 0 : a.tape) == null ? void 0 : Et.speed) !== void 0 ? a.tape.speed : 1,
|
|
439
|
+
drive: typeof (a == null ? void 0 : a.tape) == "object" && ((Tt = a.tape) == null ? void 0 : Tt.drive) !== void 0 ? a.tape.drive : 0
|
|
440
|
+
}
|
|
441
|
+
});
|
|
442
|
+
E(() => {
|
|
443
|
+
var t, i, g, m, x, K, le, re, ne, j, oe;
|
|
444
|
+
a && pe({
|
|
445
|
+
enable: a.enable !== void 0 ? a.enable : !0,
|
|
446
|
+
spatial: {
|
|
447
|
+
rate: ((t = a.spatial) == null ? void 0 : t.rate) !== void 0 ? a.spatial.rate : 0.2,
|
|
448
|
+
width: ((i = a.spatial) == null ? void 0 : i.width) !== void 0 ? a.spatial.width : 80,
|
|
449
|
+
focus: ((g = a.spatial) == null ? void 0 : g.focus) !== void 0 ? a.spatial.focus : 20
|
|
450
|
+
},
|
|
451
|
+
reverb: {
|
|
452
|
+
size: ((m = a.reverb) == null ? void 0 : m.size) !== void 0 ? a.reverb.size : 3,
|
|
453
|
+
tone: ((x = a.reverb) == null ? void 0 : x.tone) !== void 0 ? a.reverb.tone : 40,
|
|
454
|
+
mix: ((K = a.reverb) == null ? void 0 : K.mix) !== void 0 ? a.reverb.mix : 30
|
|
455
|
+
},
|
|
456
|
+
echo: {
|
|
457
|
+
time: ((le = a.echo) == null ? void 0 : le.time) !== void 0 ? a.echo.time : 50,
|
|
458
|
+
feedback: ((re = a.echo) == null ? void 0 : re.feedback) !== void 0 ? a.echo.feedback : 20,
|
|
459
|
+
mix: ((ne = a.echo) == null ? void 0 : ne.mix) !== void 0 ? a.echo.mix : 10
|
|
460
|
+
},
|
|
461
|
+
tape: {
|
|
462
|
+
speed: typeof a.tape == "number" ? a.tape : ((j = a.tape) == null ? void 0 : j.speed) !== void 0 ? a.tape.speed : 1,
|
|
463
|
+
drive: typeof a.tape == "object" && ((oe = a.tape) == null ? void 0 : oe.drive) !== void 0 ? a.tape.drive : 0
|
|
464
|
+
}
|
|
465
|
+
});
|
|
466
|
+
}, [a]);
|
|
467
|
+
const [de, ke] = b("spatial"), P = u(o), B = u(ae);
|
|
468
|
+
E(() => {
|
|
469
|
+
P.current = o;
|
|
470
|
+
}, [o]), E(() => {
|
|
471
|
+
B.current = ae;
|
|
472
|
+
}, [ae]);
|
|
473
|
+
const ie = () => {
|
|
474
|
+
if (d.current) {
|
|
475
|
+
const t = P.current.enable, i = t ? P.current.tape.speed : 1, m = !(t && i !== 1);
|
|
476
|
+
"preservesPitch" in d.current && (d.current.preservesPitch = m), "webkitPreservesPitch" in d.current && (d.current.webkitPreservesPitch = m), "mozPreservesPitch" in d.current && (d.current.mozPreservesPitch = m), d.current.playbackRate = B.current * i;
|
|
477
|
+
}
|
|
478
|
+
}, c = (t, i, g) => {
|
|
479
|
+
pe((m) => ({
|
|
480
|
+
...m,
|
|
481
|
+
enable: !0,
|
|
482
|
+
[t]: {
|
|
483
|
+
...m[t],
|
|
484
|
+
[i]: g
|
|
485
|
+
}
|
|
486
|
+
}));
|
|
487
|
+
}, w = () => {
|
|
488
|
+
pe((t) => ({
|
|
489
|
+
...t,
|
|
490
|
+
enable: !t.enable
|
|
491
|
+
}));
|
|
492
|
+
}, F = () => {
|
|
493
|
+
pe({
|
|
494
|
+
enable: !0,
|
|
495
|
+
spatial: { rate: 0.11, width: 135, focus: 65 },
|
|
496
|
+
reverb: { size: 2.4, tone: 62, mix: 30 },
|
|
497
|
+
echo: { time: 500, feedback: 45, mix: 5 },
|
|
498
|
+
tape: { speed: 1, drive: 0 }
|
|
499
|
+
});
|
|
500
|
+
}, d = u(null), C = u(null), J = u(null), A = u(null), ue = u(null), Re = u(null), we = u(null), I = u(null), ve = u(null), De = u(null), We = u(null), Ue = u(null), Be = u(null), je = u(null), Ge = u(null), Xe = u(null), rt = u(null), Ve = u(0), Le = u(null), $e = u(null), ee = u(null), he = u(null), Se = u(0), Ze = u(null), nt = u(null);
|
|
501
|
+
E(() => {
|
|
502
|
+
const t = nt.current;
|
|
387
503
|
if (!t) return;
|
|
388
|
-
const
|
|
389
|
-
for (let
|
|
504
|
+
const i = new ResizeObserver((g) => {
|
|
505
|
+
for (let m of g) Te(m.contentRect.width);
|
|
390
506
|
});
|
|
391
|
-
return
|
|
392
|
-
}, []),
|
|
507
|
+
return i.observe(t), () => i.disconnect();
|
|
508
|
+
}, []), E(() => {
|
|
393
509
|
const t = [];
|
|
394
|
-
if (s && typeof s != "string" && t.push(["TypeError", "audio must be a string (URL or path)"]),
|
|
395
|
-
else if (typeof
|
|
396
|
-
const
|
|
397
|
-
for (const
|
|
398
|
-
|
|
510
|
+
if (s && typeof s != "string" && t.push(["TypeError", "audio must be a string (URL or path)"]), p && typeof p != "string" && t.push(["TypeError", "name must be a string"]), y && typeof y != "string" && typeof y != "object") t.push(["TypeError", "theme must be a string or a valid theme object"]);
|
|
511
|
+
else if (typeof y == "object") {
|
|
512
|
+
const i = ["name", "bg", "bars", "peak", "button", "buttonHover", "slider"];
|
|
513
|
+
for (const g of i)
|
|
514
|
+
g in y || t.push(["ThemeError", `theme object missing key: ${g}`]);
|
|
399
515
|
}
|
|
400
|
-
(typeof
|
|
401
|
-
|
|
402
|
-
}),
|
|
403
|
-
typeof
|
|
404
|
-
}) : t.push(["TypeError", "bands must be an array"])), t.length > 0 ? (
|
|
405
|
-
}, [s,
|
|
406
|
-
const
|
|
516
|
+
(typeof T != "number" || T < 0 || T > 100) && t.push(["TypeError", "volume must be a number between 0 and 100"]), typeof q != "object" || Array.isArray(q) ? t.push(["TypeError", "controls must be an object"]) : ["play", "pause", "stop", "seekbar", "volume", "loop", "trackName", "equalizer"].forEach((g) => {
|
|
517
|
+
q && g in q && typeof q[g] != "boolean" && t.push(["TypeError", `controls.${g} must be a boolean`]);
|
|
518
|
+
}), R && (Array.isArray(R) ? R.length === 0 ? t.push(["ValueError", "bands array cannot be empty"]) : R.forEach((i, g) => {
|
|
519
|
+
typeof i.freq != "number" && t.push(["TypeError", `bands[${g}].freq must be a number`]);
|
|
520
|
+
}) : t.push(["TypeError", "bands must be an array"])), t.length > 0 ? (X(t), console.group("%cVisualizePlayer: Prop validation failed", "color:red"), t.forEach((i) => console.error(`${i[0]}: ${i[1]}`)), console.groupEnd()) : X([]);
|
|
521
|
+
}, [s, p, y, T, q, te, R]);
|
|
522
|
+
const n = R || [
|
|
407
523
|
{ freq: 0 },
|
|
408
524
|
{ freq: 10 },
|
|
409
525
|
{ freq: 20 },
|
|
@@ -435,321 +551,787 @@ function ht({
|
|
|
435
551
|
{ freq: 8e3 },
|
|
436
552
|
{ freq: 1e4 },
|
|
437
553
|
{ freq: 12500 }
|
|
438
|
-
],
|
|
439
|
-
|
|
440
|
-
typeof
|
|
441
|
-
}, [
|
|
442
|
-
|
|
443
|
-
const t =
|
|
444
|
-
|
|
445
|
-
},
|
|
446
|
-
|
|
447
|
-
},
|
|
448
|
-
|
|
449
|
-
|
|
554
|
+
], f = u(n.map(() => 0)), $ = u(n.map(() => 0)), L = u(n.map(() => 0)), W = u(!1), se = u(typeof y == "string" ? y : "purple"), l = typeof y == "string" ? Ae[y] || Ae.purple : typeof y == "object" ? y : Ae.purple, k = te === "dark", at = typeof q == "object" && Object.keys(q).length === 0;
|
|
555
|
+
E(() => {
|
|
556
|
+
typeof y == "string" ? se.current = y : se.current = "purple", He();
|
|
557
|
+
}, [y]), E(() => {
|
|
558
|
+
d.current || (d.current = new Audio());
|
|
559
|
+
const t = d.current, i = () => {
|
|
560
|
+
me || Y(t.currentTime);
|
|
561
|
+
}, g = () => z(t.duration), m = () => {
|
|
562
|
+
_ || (D(!1), ee.current && cancelAnimationFrame(ee.current));
|
|
563
|
+
}, x = () => {
|
|
564
|
+
D(!0), ie();
|
|
565
|
+
}, K = () => D(!1);
|
|
566
|
+
return t.addEventListener("timeupdate", i), t.addEventListener("loadedmetadata", g), t.addEventListener("ended", m), t.addEventListener("play", x), t.addEventListener("pause", K), () => {
|
|
567
|
+
t.removeEventListener("timeupdate", i), t.removeEventListener("loadedmetadata", g), t.removeEventListener("ended", m), t.removeEventListener("play", x), t.removeEventListener("pause", K);
|
|
450
568
|
};
|
|
451
|
-
}, [
|
|
452
|
-
|
|
453
|
-
}, []),
|
|
569
|
+
}, [me, _]), E(() => () => {
|
|
570
|
+
he.current && clearInterval(he.current), d.current && (d.current.pause(), d.current.src = "", d.current.load()), C.current && C.current.close().catch((t) => console.warn("AudioContext cleanup error:", t)), ee.current && cancelAnimationFrame(ee.current);
|
|
571
|
+
}, []), E(() => {
|
|
454
572
|
if (s) {
|
|
455
|
-
const t =
|
|
456
|
-
if (
|
|
573
|
+
const t = G, i = M, g = _;
|
|
574
|
+
if (ee.current && (cancelAnimationFrame(ee.current), ee.current = null), A.current) {
|
|
457
575
|
try {
|
|
458
|
-
|
|
576
|
+
A.current.disconnect();
|
|
459
577
|
} catch {
|
|
460
578
|
}
|
|
461
|
-
|
|
579
|
+
A.current = null;
|
|
462
580
|
}
|
|
463
|
-
if (
|
|
581
|
+
if (J.current) {
|
|
464
582
|
try {
|
|
465
|
-
|
|
583
|
+
J.current.disconnect();
|
|
466
584
|
} catch {
|
|
467
585
|
}
|
|
468
|
-
|
|
586
|
+
J.current = null;
|
|
469
587
|
}
|
|
470
|
-
if (
|
|
588
|
+
if (ue.current) {
|
|
471
589
|
try {
|
|
472
|
-
|
|
590
|
+
ue.current.disconnect();
|
|
473
591
|
} catch {
|
|
474
592
|
}
|
|
475
|
-
|
|
593
|
+
ue.current = null;
|
|
476
594
|
}
|
|
477
|
-
if (
|
|
595
|
+
if (Re.current) {
|
|
478
596
|
try {
|
|
479
|
-
|
|
597
|
+
Re.current.disconnect();
|
|
480
598
|
} catch {
|
|
481
599
|
}
|
|
482
|
-
|
|
600
|
+
Re.current = null;
|
|
483
601
|
}
|
|
484
|
-
if (
|
|
602
|
+
if (we.current) {
|
|
485
603
|
try {
|
|
486
|
-
|
|
604
|
+
we.current.disconnect();
|
|
487
605
|
} catch {
|
|
488
606
|
}
|
|
489
|
-
|
|
607
|
+
we.current = null;
|
|
490
608
|
}
|
|
491
|
-
|
|
609
|
+
C.current && (C.current.close().catch((j) => console.warn("AudioContext close error:", j)), C.current = null), d.current && (d.current.pause(), d.current.src = "", d.current.load()), d.current = new Audio();
|
|
492
610
|
try {
|
|
493
|
-
|
|
611
|
+
d.current.crossOrigin = "anonymous";
|
|
494
612
|
} catch {
|
|
495
613
|
}
|
|
496
|
-
|
|
497
|
-
const
|
|
498
|
-
|
|
499
|
-
},
|
|
500
|
-
|
|
501
|
-
},
|
|
502
|
-
|
|
614
|
+
d.current.src = s, d.current.preload = "auto", d.current.muted = !1, d.current.volume = fe ? 0 : i / 100, d.current.loop = g, d.current.load();
|
|
615
|
+
const m = d.current, x = () => {
|
|
616
|
+
me || Y(m.currentTime);
|
|
617
|
+
}, K = () => z(m.duration), le = () => {
|
|
618
|
+
_ || (D(!1), ee.current && cancelAnimationFrame(ee.current));
|
|
619
|
+
}, re = () => {
|
|
620
|
+
D(!0), ie();
|
|
621
|
+
}, ne = () => D(!1);
|
|
622
|
+
m.addEventListener("timeupdate", x), m.addEventListener("loadedmetadata", K), m.addEventListener("ended", le), m.addEventListener("play", re), m.addEventListener("pause", ne), Y(0), D(!1), f.current = n.map(() => 0), $.current = n.map(() => 0), L.current = n.map(() => 0), He(), t && d.current.play().catch((j) => console.error("Play failed:", j));
|
|
623
|
+
}
|
|
624
|
+
}, [s]), E(() => {
|
|
625
|
+
d.current && (d.current.volume = fe ? 0 : M / 100);
|
|
626
|
+
}, [M, fe]), E(() => {
|
|
627
|
+
d.current && (d.current.loop = _);
|
|
628
|
+
}, [_]), E(() => {
|
|
629
|
+
ie();
|
|
630
|
+
}, [ae, o.tape.speed, o.enable]), E(() => {
|
|
631
|
+
C.current && (ue.current && (ue.current.gain.value = Z.bass), Re.current && (Re.current.gain.value = Z.mid), we.current && (we.current.gain.value = Z.treble));
|
|
632
|
+
}, [Z]), E(() => {
|
|
633
|
+
if (C.current) {
|
|
634
|
+
const t = o.enable;
|
|
635
|
+
if (Xe.current && (Xe.current.curve = Mt(t ? o.tape.drive : 0)), We.current && (We.current.frequency.value = o.reverb.tone / 100 * 8e3 + 500), Ue.current && (Ue.current.gain.value = t ? o.reverb.mix / 100 : 0), De.current && C.current)
|
|
636
|
+
try {
|
|
637
|
+
De.current.buffer = At(C.current, o.reverb.size);
|
|
638
|
+
} catch {
|
|
639
|
+
}
|
|
640
|
+
if (Be.current && (Be.current.delayTime.value = Math.max(0.01, o.echo.time / 1e3)), je.current && (je.current.gain.value = t ? Math.min(0.85, o.echo.feedback / 100) : 0), Ge.current && (Ge.current.gain.value = t ? o.echo.mix / 100 : 0), !t && (ve.current && (ve.current.pan.value = 0), I.current && C.current)) {
|
|
641
|
+
const i = C.current.currentTime;
|
|
642
|
+
I.current.positionX ? (I.current.positionX.setTargetAtTime(0, i, 0.01), I.current.positionY.setTargetAtTime(0, i, 0.01), I.current.positionZ.setTargetAtTime(-1.4, i, 0.01)) : I.current.setPosition && I.current.setPosition(0, 0, -1.4);
|
|
643
|
+
}
|
|
503
644
|
}
|
|
504
|
-
}, [
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
645
|
+
}, [o]);
|
|
646
|
+
const pt = () => {
|
|
647
|
+
if (!C.current || !W.current) return;
|
|
648
|
+
const t = P.current;
|
|
649
|
+
if (!t.enable) return;
|
|
650
|
+
const i = performance.now(), g = Se.current ? Math.min(0.1, (i - Se.current) / 1e3) : 0.016;
|
|
651
|
+
Se.current = i;
|
|
652
|
+
const m = t.spatial.rate;
|
|
653
|
+
Ve.current += m * 5 * g;
|
|
654
|
+
const x = Ve.current, le = 2.3 * (t.spatial.width / 135), re = Math.sin(x) * le, ne = -Math.cos(x) * le, j = Math.sin(x * 2) * 0.4, oe = C.current.currentTime;
|
|
655
|
+
if (I.current && (I.current.positionX ? (I.current.positionX.setTargetAtTime(re, oe, 0.04), I.current.positionY.setTargetAtTime(j, oe, 0.04), I.current.positionZ.setTargetAtTime(ne, oe, 0.04)) : I.current.setPosition && I.current.setPosition(re, j, ne)), ve.current) {
|
|
656
|
+
const qe = Math.sin(x) * (t.spatial.width / 180), Pe = (t.spatial.focus - 50) / 100, Oe = Math.max(-1, Math.min(1, qe + Pe));
|
|
657
|
+
ve.current.pan.setTargetAtTime(Oe, oe, 0.04);
|
|
658
|
+
}
|
|
659
|
+
};
|
|
660
|
+
E(() => {
|
|
661
|
+
W.current = G, ee.current && (cancelAnimationFrame(ee.current), ee.current = null), he.current && (clearInterval(he.current), he.current = null), G ? (C.current || It(), Se.current = performance.now(), he.current = window.setInterval(pt, 30), vt()) : ut();
|
|
662
|
+
}, [G]);
|
|
663
|
+
const It = () => {
|
|
664
|
+
if (!C.current && d.current)
|
|
517
665
|
try {
|
|
518
666
|
const t = window.AudioContext || window.webkitAudioContext;
|
|
519
667
|
if (t) {
|
|
520
|
-
const
|
|
521
|
-
|
|
522
|
-
const
|
|
523
|
-
|
|
524
|
-
const
|
|
525
|
-
|
|
526
|
-
const
|
|
527
|
-
|
|
528
|
-
const
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
668
|
+
const i = new t();
|
|
669
|
+
C.current = i;
|
|
670
|
+
const g = i.createBiquadFilter();
|
|
671
|
+
g.type = "lowshelf", g.frequency.value = 320, g.gain.value = Z.bass;
|
|
672
|
+
const m = i.createBiquadFilter();
|
|
673
|
+
m.type = "peaking", m.frequency.value = 1e3, m.Q.value = 0.5, m.gain.value = Z.mid;
|
|
674
|
+
const x = i.createBiquadFilter();
|
|
675
|
+
x.type = "highshelf", x.frequency.value = 3200, x.gain.value = Z.treble;
|
|
676
|
+
const K = i.createWaveShaper();
|
|
677
|
+
K.curve = Mt(P.current.enable ? P.current.tape.drive : 0), ie();
|
|
678
|
+
let le = null;
|
|
679
|
+
try {
|
|
680
|
+
const xe = i.createPanner();
|
|
681
|
+
xe.panningModel = "HRTF", xe.distanceModel = "inverse", xe.refDistance = 1.4, xe.rolloffFactor = 0.55, le = xe;
|
|
682
|
+
} catch {
|
|
683
|
+
}
|
|
684
|
+
let re = null;
|
|
685
|
+
if (i.createStereoPanner) {
|
|
686
|
+
const xe = i.createStereoPanner();
|
|
687
|
+
xe.pan.value = 0, re = xe;
|
|
688
|
+
}
|
|
689
|
+
const ne = i.createGain();
|
|
690
|
+
ne.gain.value = 1;
|
|
691
|
+
const j = i.createConvolver();
|
|
692
|
+
j.buffer = At(i, P.current.reverb.size);
|
|
693
|
+
const oe = i.createBiquadFilter();
|
|
694
|
+
oe.type = "lowpass", oe.frequency.value = P.current.reverb.tone / 100 * 8e3 + 500;
|
|
695
|
+
const qe = i.createGain();
|
|
696
|
+
qe.gain.value = P.current.enable ? P.current.reverb.mix / 100 : 0;
|
|
697
|
+
const Pe = i.createDelay(2);
|
|
698
|
+
Pe.delayTime.value = P.current.echo.time / 1e3;
|
|
699
|
+
const Oe = i.createGain();
|
|
700
|
+
Oe.gain.value = Math.min(0.85, P.current.echo.feedback / 100);
|
|
701
|
+
const Ke = i.createGain();
|
|
702
|
+
Ke.gain.value = P.current.enable ? P.current.echo.mix / 100 : 0, Pe.connect(Oe), Oe.connect(Pe);
|
|
703
|
+
const Ie = i.createAnalyser();
|
|
704
|
+
Ie.fftSize = 8192, Ie.smoothingTimeConstant = 0.7;
|
|
705
|
+
const Rt = i.createMediaElementSource(d.current);
|
|
706
|
+
Rt.connect(g), g.connect(m), m.connect(x), x.connect(K);
|
|
707
|
+
const Qe = le, Ye = re, ct = Qe || Ye || K;
|
|
708
|
+
Qe ? (K.connect(Qe), Ye && Qe.connect(Ye)) : Ye && K.connect(Ye), ct.connect(ne), ne.connect(Ie), ct.connect(j), j.connect(oe), oe.connect(qe), qe.connect(Ie), ct.connect(Pe), Pe.connect(Ke), Ke.connect(Ie), Ie.connect(i.destination), ue.current = g, Re.current = m, we.current = x, Xe.current = K, I.current = le, ve.current = re, rt.current = ne, De.current = j, We.current = oe, Ue.current = qe, Be.current = Pe, je.current = Oe, Ge.current = Ke, J.current = Ie, A.current = Rt;
|
|
532
709
|
}
|
|
533
710
|
} catch (t) {
|
|
534
711
|
console.error("Failed to setup audio context:", t);
|
|
535
712
|
}
|
|
536
|
-
},
|
|
537
|
-
const
|
|
538
|
-
if (!
|
|
539
|
-
const
|
|
540
|
-
return Math.min(
|
|
541
|
-
},
|
|
542
|
-
if (
|
|
543
|
-
|
|
713
|
+
}, dt = (t) => {
|
|
714
|
+
const i = C.current, g = J.current;
|
|
715
|
+
if (!i || !g) return 0;
|
|
716
|
+
const m = i.sampleRate / 2, x = Math.round(t / m * g.frequencyBinCount);
|
|
717
|
+
return Math.min(x, g.frequencyBinCount - 1);
|
|
718
|
+
}, ut = () => {
|
|
719
|
+
if (W.current) return;
|
|
720
|
+
f.current = f.current.map((m) => m * 0.7);
|
|
544
721
|
const t = Date.now();
|
|
545
|
-
|
|
546
|
-
const
|
|
547
|
-
|
|
548
|
-
},
|
|
549
|
-
if (!
|
|
550
|
-
const t =
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
722
|
+
$.current = $.current.map((m, x) => t - L.current[x] > 1500 ? m * 0.95 : m), He();
|
|
723
|
+
const i = Math.max(...f.current), g = Math.max(...$.current);
|
|
724
|
+
i > 0.01 || g > 0.01 ? ee.current = requestAnimationFrame(ut) : (W.current || (f.current = n.map(() => 0), $.current = n.map(() => 0), L.current = n.map(() => 0), He()), ee.current && cancelAnimationFrame(ee.current), ee.current = null);
|
|
725
|
+
}, vt = () => {
|
|
726
|
+
if (!J.current || !W.current) return;
|
|
727
|
+
const t = P.current;
|
|
728
|
+
if (t.enable && C.current) {
|
|
729
|
+
pt();
|
|
730
|
+
const m = Ve.current, x = t.spatial.width / 135;
|
|
731
|
+
if (Le.current) {
|
|
732
|
+
const K = 85 * (x > 0 ? 1 : 0), le = 55 * (x > 0 ? 1 : 0), re = Math.sin(m) * K, ne = -Math.cos(m) * le;
|
|
733
|
+
Le.current.style.transform = `translate(${re}px, ${ne}px)`, $e.current && ($e.current.setAttribute("x2", `${110 + re}`), $e.current.setAttribute("y2", `${75 + ne}`));
|
|
734
|
+
}
|
|
735
|
+
} else if (C.current) {
|
|
736
|
+
const m = C.current.currentTime;
|
|
737
|
+
I.current && (I.current.positionX ? (I.current.positionX.setTargetAtTime(0, m, 0.04), I.current.positionY.setTargetAtTime(0, m, 0.04), I.current.positionZ.setTargetAtTime(-1.4, m, 0.04)) : I.current.setPosition && I.current.setPosition(0, 0, -1.4)), ve.current && ve.current.pan.setTargetAtTime(0, m, 0.04), Le.current && (Le.current.style.transform = "translate(0px, 0px)"), $e.current && ($e.current.setAttribute("x2", "110"), $e.current.setAttribute("y2", "20"));
|
|
738
|
+
}
|
|
739
|
+
const i = J.current.frequencyBinCount, g = new Uint8Array(i);
|
|
740
|
+
J.current.getByteFrequencyData(g), n.forEach((m, x) => {
|
|
741
|
+
const K = dt(m.freq), le = x < n.length - 1 ? dt(n[x + 1].freq) : g.length;
|
|
742
|
+
let re = 0, ne = 0;
|
|
743
|
+
for (let qe = K; qe < le; qe++)
|
|
744
|
+
re += g[qe], ne++;
|
|
745
|
+
let j = ne > 0 ? re / ne / 255 : 0;
|
|
746
|
+
j = Math.pow(j, 0.6), f.current[x] = f.current[x] * 0.8 + j * 0.2;
|
|
747
|
+
const oe = Date.now();
|
|
748
|
+
f.current[x] > $.current[x] ? ($.current[x] = f.current[x], L.current[x] = oe) : oe - L.current[x] > 1500 && ($.current[x] *= 0.95);
|
|
749
|
+
}), He(), ee.current = requestAnimationFrame(vt);
|
|
750
|
+
}, He = () => {
|
|
751
|
+
if (!Ze.current) return;
|
|
752
|
+
const t = Ae[se.current] || Ae.rainbow;
|
|
753
|
+
let i = "";
|
|
754
|
+
n.forEach((g, m) => {
|
|
755
|
+
const x = f.current[m] * 100, K = 100 - $.current[m] * 100, le = Math.floor(m / n.length * t.bars.length), re = t.bars[Math.min(le, t.bars.length - 1)];
|
|
756
|
+
i += `
|
|
568
757
|
<div class="ecp-vu-bar-wrap">
|
|
569
|
-
<div class="ecp-vu-bar-fill" style="height: ${
|
|
570
|
-
${
|
|
758
|
+
<div class="ecp-vu-bar-fill" style="height: ${x}%; background: ${re};">
|
|
759
|
+
${$.current[m] > 0.1 ? `<div class="ecp-vu-peak-line" style="top: ${K}%; background: ${t.peak};"></div>` : ""}
|
|
571
760
|
</div>
|
|
572
761
|
</div>
|
|
573
762
|
`;
|
|
574
|
-
}),
|
|
575
|
-
},
|
|
576
|
-
!
|
|
577
|
-
},
|
|
578
|
-
|
|
579
|
-
},
|
|
580
|
-
const
|
|
581
|
-
|
|
582
|
-
},
|
|
583
|
-
|
|
584
|
-
},
|
|
585
|
-
const
|
|
586
|
-
|
|
587
|
-
},
|
|
588
|
-
|
|
589
|
-
((typeof
|
|
590
|
-
}, [
|
|
591
|
-
const
|
|
763
|
+
}), Ze.current.innerHTML = i;
|
|
764
|
+
}, ht = () => {
|
|
765
|
+
!d.current || !s || (G ? d.current.pause() : (C.current && C.current.state === "suspended" && C.current.resume(), d.current.play().catch((t) => console.error("Play failed:", t))));
|
|
766
|
+
}, Dt = () => {
|
|
767
|
+
d.current && (d.current.pause(), d.current.currentTime = 0, D(!1), Y(0), f.current = n.map(() => 0), $.current = n.map(() => 0), L.current = n.map(() => 0), He());
|
|
768
|
+
}, Bt = (t) => {
|
|
769
|
+
const g = parseFloat(t.target.value) / 100 * O;
|
|
770
|
+
Y(g), d.current && !me && (d.current.currentTime = g);
|
|
771
|
+
}, mt = () => be(!0), ft = () => {
|
|
772
|
+
d.current && (d.current.currentTime = H), be(!1);
|
|
773
|
+
}, jt = (t) => {
|
|
774
|
+
const i = parseInt(t.target.value);
|
|
775
|
+
Me(i), Ce(i === 0);
|
|
776
|
+
}, Ht = () => Ce(!fe), Ot = (t) => _e(parseFloat(t.target.value)), _t = () => Fe(!_), Wt = (t, i) => Ee((g) => ({ ...g, [t]: i })), Ut = () => Ee({ bass: 0, mid: 0, treble: 0 });
|
|
777
|
+
E(() => {
|
|
778
|
+
((typeof q == "object" && Object.keys(q).length === 0 || !q) && !G || V) && ht();
|
|
779
|
+
}, [q]);
|
|
780
|
+
const gt = (t) => {
|
|
592
781
|
if (isNaN(t)) return "0:00";
|
|
593
|
-
const
|
|
594
|
-
return `${
|
|
782
|
+
const i = Math.floor(t / 60), g = Math.floor(t % 60);
|
|
783
|
+
return `${i}:${g.toString().padStart(2, "0")}`;
|
|
595
784
|
};
|
|
596
|
-
if (
|
|
597
|
-
return /* @__PURE__ */ e(
|
|
598
|
-
/* @__PURE__ */
|
|
785
|
+
if (ye && ye.length > 0)
|
|
786
|
+
return /* @__PURE__ */ e(Ft, { children: ye.map((t, i) => /* @__PURE__ */ r("div", { className: "ecp-vp-error", children: [
|
|
787
|
+
/* @__PURE__ */ r("strong", { children: [
|
|
599
788
|
t[0],
|
|
600
789
|
":"
|
|
601
790
|
] }),
|
|
602
791
|
" ",
|
|
603
792
|
t[1]
|
|
604
|
-
] },
|
|
605
|
-
const
|
|
606
|
-
return /* @__PURE__ */ e("div", { ref:
|
|
607
|
-
/* @__PURE__ */
|
|
608
|
-
/* @__PURE__ */ e("div", { className: `ecp-vp-vu-bg${
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
793
|
+
] }, i)) });
|
|
794
|
+
const Gt = at || S ? void 0 : k ? "#6060606a" : "#ffffffab", Xt = at || S ? void 0 : l.bg;
|
|
795
|
+
return /* @__PURE__ */ e("div", { ref: nt, className: "ecp-vp-wrapper", style: { backgroundColor: Gt }, children: /* @__PURE__ */ r("div", { className: "ecp-vp-bg", style: { background: Xt }, children: [
|
|
796
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-vu-outer", children: [
|
|
797
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-vu-bg ${S ? " ecp-vp-vu-bg--transparent" : k ? " ecp-vp-vu-bg--dark" : " ecp-vp-vu-bg--light"}${Q && S ? " ecp-vp-vu-bg--dimmed" : ""}${at ? " ecp-vp-vu-bg--no-margin" : ""}`, children: /* @__PURE__ */ e("div", { className: "ecp-vp-vu-bars", ref: Ze }) }),
|
|
798
|
+
o.enable && G && /* @__PURE__ */ e("div", { className: "ecp-vp-8d-live-overlay", children: /* @__PURE__ */ r(
|
|
799
|
+
"div",
|
|
800
|
+
{
|
|
801
|
+
className: `ecp-vp-8d-live-visualizer${k ? " ecp-vp-8d-live-visualizer--dark" : " ecp-vp-8d-live-visualizer--light"}`,
|
|
802
|
+
style: { "--theme-slider": l.slider, "--theme-slider-alpha": `${l.slider}33` },
|
|
803
|
+
children: [
|
|
804
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-8d-live-glow", style: { background: `radial-gradient(circle, ${l.slider}35 0%, transparent 70%)` } }),
|
|
805
|
+
/* @__PURE__ */ r("svg", { className: "ecp-vp-8d-live-svg", viewBox: "0 0 220 150", children: [
|
|
806
|
+
/* @__PURE__ */ e("circle", { cx: "110", cy: "75", r: "35", stroke: l.slider, strokeOpacity: "0.2", strokeWidth: "1", fill: "none" }),
|
|
807
|
+
/* @__PURE__ */ e(
|
|
808
|
+
"ellipse",
|
|
809
|
+
{
|
|
810
|
+
cx: "110",
|
|
811
|
+
cy: "75",
|
|
812
|
+
rx: "85",
|
|
813
|
+
ry: "55",
|
|
814
|
+
fill: "none",
|
|
815
|
+
stroke: l.slider,
|
|
816
|
+
strokeOpacity: "0.5",
|
|
817
|
+
strokeWidth: "2",
|
|
818
|
+
strokeDasharray: "2 7",
|
|
819
|
+
strokeLinecap: "round"
|
|
820
|
+
}
|
|
821
|
+
),
|
|
822
|
+
/* @__PURE__ */ e(
|
|
823
|
+
"line",
|
|
824
|
+
{
|
|
825
|
+
ref: $e,
|
|
826
|
+
x1: "110",
|
|
827
|
+
y1: "75",
|
|
828
|
+
x2: "110",
|
|
829
|
+
y2: "20",
|
|
830
|
+
stroke: l.slider,
|
|
831
|
+
strokeOpacity: "0.75",
|
|
832
|
+
strokeWidth: "1.5"
|
|
833
|
+
}
|
|
834
|
+
),
|
|
835
|
+
/* @__PURE__ */ r("g", { transform: "translate(110, 75)", children: [
|
|
836
|
+
/* @__PURE__ */ e("circle", { cx: "0", cy: "0", r: "14", fill: "none", stroke: l.slider, strokeOpacity: "0.8", strokeWidth: "1.5" }),
|
|
837
|
+
/* @__PURE__ */ e("line", { x1: "0", y1: "14", x2: "0", y2: "19", stroke: l.slider, strokeOpacity: "0.8", strokeWidth: "1.5" }),
|
|
838
|
+
/* @__PURE__ */ e(
|
|
839
|
+
"text",
|
|
840
|
+
{
|
|
841
|
+
x: "0",
|
|
842
|
+
y: "29",
|
|
843
|
+
textAnchor: "middle",
|
|
844
|
+
fill: l.slider,
|
|
845
|
+
fillOpacity: "0.75",
|
|
846
|
+
fontSize: "8",
|
|
847
|
+
fontWeight: "700",
|
|
848
|
+
letterSpacing: "0.5px",
|
|
849
|
+
fontFamily: "monospace",
|
|
850
|
+
children: "FRONT"
|
|
851
|
+
}
|
|
852
|
+
)
|
|
853
|
+
] })
|
|
854
|
+
] }),
|
|
855
|
+
/* @__PURE__ */ e(it, { size: 14, className: "ecp-vp-8d-live-head-icon", style: { color: l.slider } }),
|
|
856
|
+
/* @__PURE__ */ e(
|
|
857
|
+
"div",
|
|
858
|
+
{
|
|
859
|
+
ref: Le,
|
|
860
|
+
className: "ecp-vp-8d-live-dot",
|
|
861
|
+
style: {
|
|
862
|
+
background: l.slider,
|
|
863
|
+
boxShadow: `0 0 12px ${l.slider}`
|
|
864
|
+
},
|
|
865
|
+
children: /* @__PURE__ */ e("span", { className: "ecp-vp-8d-live-dot-inner" })
|
|
866
|
+
}
|
|
867
|
+
)
|
|
868
|
+
]
|
|
869
|
+
}
|
|
870
|
+
) }),
|
|
871
|
+
Q && /* @__PURE__ */ r("div", { className: `ecp-vp-eq-overlay${k ? " ecp-vp-eq-overlay--dark" : " ecp-vp-eq-overlay--light"}`, children: [
|
|
872
|
+
/* @__PURE__ */ e("h3", { className: `ecp-vp-eq-title${k ? " ecp-vp-eq-title--dark" : " ecp-vp-eq-title--light"}`, children: "Equalizer" }),
|
|
873
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bands", children: ["bass", "mid", "treble"].map((t) => /* @__PURE__ */ r("div", { className: "ecp-vp-eq-band", children: [
|
|
874
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-header", children: [
|
|
875
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-eq-band-label${k ? " ecp-vp-eq-band-label--dark" : " ecp-vp-eq-band-label--light"}`, children: t.charAt(0).toUpperCase() + t.slice(1) }),
|
|
876
|
+
/* @__PURE__ */ r("span", { className: `ecp-vp-eq-band-label${k ? " ecp-vp-eq-band-label--dark" : " ecp-vp-eq-band-label--light"}`, children: [
|
|
877
|
+
Z[t] > 0 ? `+${Z[t]}` : Z[t],
|
|
616
878
|
" dB"
|
|
617
879
|
] })
|
|
618
880
|
] }),
|
|
619
|
-
/* @__PURE__ */
|
|
620
|
-
/* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${
|
|
881
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-range", children: [
|
|
882
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${k ? " ecp-vp-eq-range-bound--dark" : " ecp-vp-eq-range-bound--light"}`, children: "-20" }),
|
|
621
883
|
/* @__PURE__ */ e(
|
|
622
884
|
"input",
|
|
623
885
|
{
|
|
624
886
|
type: "range",
|
|
625
887
|
min: "-20",
|
|
626
888
|
max: "20",
|
|
627
|
-
value:
|
|
628
|
-
onChange: (
|
|
889
|
+
value: Z[t],
|
|
890
|
+
onChange: (i) => Wt(t, parseInt(i.target.value)),
|
|
629
891
|
className: "ecp-vp-eq-slider",
|
|
630
|
-
style: {
|
|
892
|
+
style: {
|
|
893
|
+
background: `linear-gradient(to right, ${l.slider} ${(Z[t] + 20) / 40 * 100}%, ${l.slider + "30"} ${(Z[t] + 20) / 40 * 100}%)`,
|
|
894
|
+
"--thumb-color": l.slider
|
|
895
|
+
}
|
|
631
896
|
}
|
|
632
897
|
),
|
|
633
|
-
/* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${
|
|
898
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-eq-range-bound${k ? " ecp-vp-eq-range-bound--dark" : " ecp-vp-eq-range-bound--light"}`, children: "+20" })
|
|
634
899
|
] })
|
|
635
900
|
] }, t)) }),
|
|
636
|
-
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-footer", children: /* @__PURE__ */ e("button", { onClick:
|
|
637
|
-
] })
|
|
901
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-footer", children: /* @__PURE__ */ e("button", { onClick: Ut, className: `ecp-vp-eq-reset${k ? " ecp-vp-eq-reset--dark" : " ecp-vp-eq-reset--light"}`, children: "Reset" }) })
|
|
902
|
+
] }),
|
|
903
|
+
ce && /* @__PURE__ */ r(
|
|
904
|
+
"div",
|
|
905
|
+
{
|
|
906
|
+
className: `ecp-vp-eq-overlay${k ? " ecp-vp-eq-overlay--dark" : " ecp-vp-eq-overlay--light"}`,
|
|
907
|
+
style: {
|
|
908
|
+
"--theme-slider": l.slider,
|
|
909
|
+
"--theme-slider-alpha": `${l.slider}33`
|
|
910
|
+
},
|
|
911
|
+
children: [
|
|
912
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-8d-header", children: [
|
|
913
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-8d-title-group", children: [
|
|
914
|
+
/* @__PURE__ */ e(it, { size: 18, style: { color: l.slider } }),
|
|
915
|
+
/* @__PURE__ */ e("h3", { className: `ecp-vp-eq-title${k ? " ecp-vp-eq-title--dark" : " ecp-vp-eq-title--light"}`, style: { margin: 0 }, children: "8D Spatial Engine" })
|
|
916
|
+
] }),
|
|
917
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-8d-toggle-wrap", children: [
|
|
918
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-8d-toggle-label${k ? " ecp-vp-8d-toggle-label--dark" : " ecp-vp-8d-toggle-label--light"}`, children: o.enable ? "On" : "Off" }),
|
|
919
|
+
/* @__PURE__ */ e(
|
|
920
|
+
"button",
|
|
921
|
+
{
|
|
922
|
+
onClick: w,
|
|
923
|
+
className: `ecp-vp-8d-toggle${o.enable ? " ecp-vp-8d-toggle--on" : ""}`,
|
|
924
|
+
children: /* @__PURE__ */ e("div", { className: "ecp-vp-8d-toggle-thumb" })
|
|
925
|
+
}
|
|
926
|
+
)
|
|
927
|
+
] })
|
|
928
|
+
] }),
|
|
929
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-8d-tabs", children: ["spatial", "reverb", "echo", "tape"].map((t) => /* @__PURE__ */ e(
|
|
930
|
+
"button",
|
|
931
|
+
{
|
|
932
|
+
onClick: () => ke(t),
|
|
933
|
+
className: `ecp-vp-8d-tab${k ? " ecp-vp-8d-tab--dark" : " ecp-vp-8d-tab--light"}${de === t ? " ecp-vp-8d-tab--active" : ""}`,
|
|
934
|
+
children: t.charAt(0).toUpperCase() + t.slice(1)
|
|
935
|
+
},
|
|
936
|
+
t
|
|
937
|
+
)) }),
|
|
938
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-8d-controls-grid", children: [
|
|
939
|
+
de === "spatial" && /* @__PURE__ */ r("div", { className: "ecp-vp-eq-bands--horizontal", children: [
|
|
940
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
941
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
942
|
+
o.spatial.rate.toFixed(2),
|
|
943
|
+
"x"
|
|
944
|
+
] }),
|
|
945
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
946
|
+
"input",
|
|
947
|
+
{
|
|
948
|
+
type: "range",
|
|
949
|
+
min: "0.01",
|
|
950
|
+
max: "1.00",
|
|
951
|
+
step: "0.01",
|
|
952
|
+
value: o.spatial.rate,
|
|
953
|
+
onChange: (t) => c("spatial", "rate", parseFloat(t.target.value)),
|
|
954
|
+
className: "ecp-vp-eq-slider",
|
|
955
|
+
style: {
|
|
956
|
+
background: `linear-gradient(to right, ${l.slider} ${(o.spatial.rate - 0.01) / 0.99 * 100}%, ${l.slider + "30"} ${(o.spatial.rate - 0.01) / 0.99 * 100}%)`,
|
|
957
|
+
"--thumb-color": l.slider
|
|
958
|
+
}
|
|
959
|
+
}
|
|
960
|
+
) }),
|
|
961
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "RATE" })
|
|
962
|
+
] }),
|
|
963
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
964
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
965
|
+
o.spatial.width,
|
|
966
|
+
"°"
|
|
967
|
+
] }),
|
|
968
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
969
|
+
"input",
|
|
970
|
+
{
|
|
971
|
+
type: "range",
|
|
972
|
+
min: "0",
|
|
973
|
+
max: "180",
|
|
974
|
+
step: "5",
|
|
975
|
+
value: o.spatial.width,
|
|
976
|
+
onChange: (t) => c("spatial", "width", parseInt(t.target.value)),
|
|
977
|
+
className: "ecp-vp-eq-slider",
|
|
978
|
+
style: {
|
|
979
|
+
background: `linear-gradient(to right, ${l.slider} ${o.spatial.width / 180 * 100}%, ${l.slider + "30"} ${o.spatial.width / 180 * 100}%)`,
|
|
980
|
+
"--thumb-color": l.slider
|
|
981
|
+
}
|
|
982
|
+
}
|
|
983
|
+
) }),
|
|
984
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "WIDTH" })
|
|
985
|
+
] }),
|
|
986
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
987
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
988
|
+
o.spatial.focus,
|
|
989
|
+
"%"
|
|
990
|
+
] }),
|
|
991
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
992
|
+
"input",
|
|
993
|
+
{
|
|
994
|
+
type: "range",
|
|
995
|
+
min: "0",
|
|
996
|
+
max: "100",
|
|
997
|
+
step: "1",
|
|
998
|
+
value: o.spatial.focus,
|
|
999
|
+
onChange: (t) => c("spatial", "focus", parseInt(t.target.value)),
|
|
1000
|
+
className: "ecp-vp-eq-slider",
|
|
1001
|
+
style: {
|
|
1002
|
+
background: `linear-gradient(to right, ${l.slider} ${o.spatial.focus}%, ${l.slider + "30"} ${o.spatial.focus}%)`,
|
|
1003
|
+
"--thumb-color": l.slider
|
|
1004
|
+
}
|
|
1005
|
+
}
|
|
1006
|
+
) }),
|
|
1007
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "FOCUS" })
|
|
1008
|
+
] })
|
|
1009
|
+
] }),
|
|
1010
|
+
de === "reverb" && /* @__PURE__ */ r("div", { className: "ecp-vp-eq-bands--horizontal", children: [
|
|
1011
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
1012
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
1013
|
+
o.reverb.size.toFixed(1),
|
|
1014
|
+
"s"
|
|
1015
|
+
] }),
|
|
1016
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
1017
|
+
"input",
|
|
1018
|
+
{
|
|
1019
|
+
type: "range",
|
|
1020
|
+
min: "0.2",
|
|
1021
|
+
max: "5.0",
|
|
1022
|
+
step: "0.1",
|
|
1023
|
+
value: o.reverb.size,
|
|
1024
|
+
onChange: (t) => c("reverb", "size", parseFloat(t.target.value)),
|
|
1025
|
+
className: "ecp-vp-eq-slider",
|
|
1026
|
+
style: {
|
|
1027
|
+
background: `linear-gradient(to right, ${l.slider} ${(o.reverb.size - 0.2) / 4.8 * 100}%, ${l.slider + "30"} ${(o.reverb.size - 0.2) / 4.8 * 100}%)`,
|
|
1028
|
+
"--thumb-color": l.slider
|
|
1029
|
+
}
|
|
1030
|
+
}
|
|
1031
|
+
) }),
|
|
1032
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "SIZE" })
|
|
1033
|
+
] }),
|
|
1034
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
1035
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
1036
|
+
o.reverb.tone,
|
|
1037
|
+
"%"
|
|
1038
|
+
] }),
|
|
1039
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
1040
|
+
"input",
|
|
1041
|
+
{
|
|
1042
|
+
type: "range",
|
|
1043
|
+
min: "0",
|
|
1044
|
+
max: "100",
|
|
1045
|
+
step: "1",
|
|
1046
|
+
value: o.reverb.tone,
|
|
1047
|
+
onChange: (t) => c("reverb", "tone", parseInt(t.target.value)),
|
|
1048
|
+
className: "ecp-vp-eq-slider",
|
|
1049
|
+
style: {
|
|
1050
|
+
background: `linear-gradient(to right, ${l.slider} ${o.reverb.tone}%, ${l.slider + "30"} ${o.reverb.tone}%)`,
|
|
1051
|
+
"--thumb-color": l.slider
|
|
1052
|
+
}
|
|
1053
|
+
}
|
|
1054
|
+
) }),
|
|
1055
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "TONE" })
|
|
1056
|
+
] }),
|
|
1057
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
1058
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
1059
|
+
o.reverb.mix,
|
|
1060
|
+
"%"
|
|
1061
|
+
] }),
|
|
1062
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
1063
|
+
"input",
|
|
1064
|
+
{
|
|
1065
|
+
type: "range",
|
|
1066
|
+
min: "0",
|
|
1067
|
+
max: "100",
|
|
1068
|
+
step: "1",
|
|
1069
|
+
value: o.reverb.mix,
|
|
1070
|
+
onChange: (t) => c("reverb", "mix", parseInt(t.target.value)),
|
|
1071
|
+
className: "ecp-vp-eq-slider",
|
|
1072
|
+
style: {
|
|
1073
|
+
background: `linear-gradient(to right, ${l.slider} ${o.reverb.mix}%, ${l.slider + "30"} ${o.reverb.mix}%)`,
|
|
1074
|
+
"--thumb-color": l.slider
|
|
1075
|
+
}
|
|
1076
|
+
}
|
|
1077
|
+
) }),
|
|
1078
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "MIX" })
|
|
1079
|
+
] })
|
|
1080
|
+
] }),
|
|
1081
|
+
de === "echo" && /* @__PURE__ */ r("div", { className: "ecp-vp-eq-bands--horizontal", children: [
|
|
1082
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
1083
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
1084
|
+
o.echo.time,
|
|
1085
|
+
"ms"
|
|
1086
|
+
] }),
|
|
1087
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
1088
|
+
"input",
|
|
1089
|
+
{
|
|
1090
|
+
type: "range",
|
|
1091
|
+
min: "50",
|
|
1092
|
+
max: "1000",
|
|
1093
|
+
step: "10",
|
|
1094
|
+
value: o.echo.time,
|
|
1095
|
+
onChange: (t) => c("echo", "time", parseInt(t.target.value)),
|
|
1096
|
+
className: "ecp-vp-eq-slider",
|
|
1097
|
+
style: {
|
|
1098
|
+
background: `linear-gradient(to right, ${l.slider} ${(o.echo.time - 50) / 950 * 100}%, ${l.slider + "30"} ${(o.echo.time - 50) / 950 * 100}%)`,
|
|
1099
|
+
"--thumb-color": l.slider
|
|
1100
|
+
}
|
|
1101
|
+
}
|
|
1102
|
+
) }),
|
|
1103
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "TIME" })
|
|
1104
|
+
] }),
|
|
1105
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
1106
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
1107
|
+
o.echo.feedback,
|
|
1108
|
+
"%"
|
|
1109
|
+
] }),
|
|
1110
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
1111
|
+
"input",
|
|
1112
|
+
{
|
|
1113
|
+
type: "range",
|
|
1114
|
+
min: "0",
|
|
1115
|
+
max: "85",
|
|
1116
|
+
step: "1",
|
|
1117
|
+
value: o.echo.feedback,
|
|
1118
|
+
onChange: (t) => c("echo", "feedback", parseInt(t.target.value)),
|
|
1119
|
+
className: "ecp-vp-eq-slider",
|
|
1120
|
+
style: {
|
|
1121
|
+
background: `linear-gradient(to right, ${l.slider} ${o.echo.feedback / 85 * 100}%, ${l.slider + "30"} ${o.echo.feedback / 85 * 100}%)`,
|
|
1122
|
+
"--thumb-color": l.slider
|
|
1123
|
+
}
|
|
1124
|
+
}
|
|
1125
|
+
) }),
|
|
1126
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "FEEDBACK" })
|
|
1127
|
+
] }),
|
|
1128
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
1129
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
1130
|
+
o.echo.mix,
|
|
1131
|
+
"%"
|
|
1132
|
+
] }),
|
|
1133
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
1134
|
+
"input",
|
|
1135
|
+
{
|
|
1136
|
+
type: "range",
|
|
1137
|
+
min: "0",
|
|
1138
|
+
max: "100",
|
|
1139
|
+
step: "1",
|
|
1140
|
+
value: o.echo.mix,
|
|
1141
|
+
onChange: (t) => c("echo", "mix", parseInt(t.target.value)),
|
|
1142
|
+
className: "ecp-vp-eq-slider",
|
|
1143
|
+
style: {
|
|
1144
|
+
background: `linear-gradient(to right, ${l.slider} ${o.echo.mix}%, ${l.slider + "30"} ${o.echo.mix}%)`,
|
|
1145
|
+
"--thumb-color": l.slider
|
|
1146
|
+
}
|
|
1147
|
+
}
|
|
1148
|
+
) }),
|
|
1149
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "MIX" })
|
|
1150
|
+
] })
|
|
1151
|
+
] }),
|
|
1152
|
+
de === "tape" && /* @__PURE__ */ r("div", { className: "ecp-vp-eq-bands--horizontal", children: [
|
|
1153
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
1154
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: [
|
|
1155
|
+
o.tape.speed.toFixed(2),
|
|
1156
|
+
"x"
|
|
1157
|
+
] }),
|
|
1158
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
1159
|
+
"input",
|
|
1160
|
+
{
|
|
1161
|
+
type: "range",
|
|
1162
|
+
min: "0.50",
|
|
1163
|
+
max: "2.00",
|
|
1164
|
+
step: "0.05",
|
|
1165
|
+
value: o.tape.speed,
|
|
1166
|
+
onChange: (t) => c("tape", "speed", parseFloat(t.target.value)),
|
|
1167
|
+
className: "ecp-vp-eq-slider",
|
|
1168
|
+
style: {
|
|
1169
|
+
background: `linear-gradient(to right, ${l.slider} ${(o.tape.speed - 0.5) / 1.5 * 100}%, ${l.slider + "30"} ${(o.tape.speed - 0.5) / 1.5 * 100}%)`,
|
|
1170
|
+
"--thumb-color": l.slider
|
|
1171
|
+
}
|
|
1172
|
+
}
|
|
1173
|
+
) }),
|
|
1174
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "TAPE" })
|
|
1175
|
+
] }),
|
|
1176
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-eq-band-col", children: [
|
|
1177
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-val${k ? " ecp-vp-eq-val--dark" : " ecp-vp-eq-val--light"}`, children: o.tape.drive }),
|
|
1178
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-bar-wrap", children: /* @__PURE__ */ e(
|
|
1179
|
+
"input",
|
|
1180
|
+
{
|
|
1181
|
+
type: "range",
|
|
1182
|
+
min: "0",
|
|
1183
|
+
max: "50",
|
|
1184
|
+
step: "1",
|
|
1185
|
+
value: o.tape.drive,
|
|
1186
|
+
onChange: (t) => c("tape", "drive", parseFloat(t.target.value)),
|
|
1187
|
+
className: "ecp-vp-eq-slider",
|
|
1188
|
+
style: {
|
|
1189
|
+
background: `linear-gradient(to right, ${l.slider} ${o.tape.drive / 50 * 100}%, ${l.slider + "30"} ${o.tape.drive / 50 * 100}%)`,
|
|
1190
|
+
"--thumb-color": l.slider
|
|
1191
|
+
}
|
|
1192
|
+
}
|
|
1193
|
+
) }),
|
|
1194
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-eq-label${k ? " ecp-vp-eq-label--dark" : " ecp-vp-eq-label--light"}`, children: "DRIVE" })
|
|
1195
|
+
] })
|
|
1196
|
+
] })
|
|
1197
|
+
] }),
|
|
1198
|
+
/* @__PURE__ */ e("div", { className: "ecp-vp-eq-footer", children: /* @__PURE__ */ e("button", { onClick: F, className: `ecp-vp-eq-reset${k ? " ecp-vp-eq-reset--dark" : " ecp-vp-eq-reset--light"}`, children: "Reset Defaults" }) })
|
|
1199
|
+
]
|
|
1200
|
+
}
|
|
1201
|
+
)
|
|
638
1202
|
] }),
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
/* @__PURE__ */
|
|
642
|
-
/* @__PURE__ */ e("div", { className: `ecp-vp-track-name${
|
|
643
|
-
|
|
1203
|
+
q.trackName && /* @__PURE__ */ r("div", { className: "ecp-vp-track", children: [
|
|
1204
|
+
h && /* @__PURE__ */ e("div", { className: "ecp-vp-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: h, alt: "", className: `ecp-vp-thumbnail${G ? " ecp-animation-spin" : ""}` }) }),
|
|
1205
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-track-info", children: [
|
|
1206
|
+
/* @__PURE__ */ e("div", { className: `ecp-vp-track-name${k ? " ecp-vp-track-name--dark" : " ecp-vp-track-name--light"}`, children: p }),
|
|
1207
|
+
v && typeof v == "string" && /* @__PURE__ */ e("div", { className: `ecp-vp-track-author${k ? " ecp-vp-track-author--dark" : " ecp-vp-track-author--light"}`, children: v })
|
|
644
1208
|
] })
|
|
645
1209
|
] }),
|
|
646
|
-
|
|
647
|
-
/* @__PURE__ */ e("span", { className: `ecp-vp-time${
|
|
1210
|
+
q.seekbar && /* @__PURE__ */ e("div", { className: "ecp-vp-seekbar", children: /* @__PURE__ */ r("div", { className: "ecp-vp-seekbar-row", children: [
|
|
1211
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-time${k ? " ecp-vp-time--dark" : " ecp-vp-time--light"}`, children: gt(H) }),
|
|
648
1212
|
/* @__PURE__ */ e(
|
|
649
1213
|
"input",
|
|
650
1214
|
{
|
|
651
1215
|
type: "range",
|
|
652
1216
|
min: "0",
|
|
653
1217
|
max: "100",
|
|
654
|
-
value:
|
|
655
|
-
onChange:
|
|
656
|
-
onMouseDown:
|
|
657
|
-
onMouseUp:
|
|
658
|
-
onTouchStart:
|
|
659
|
-
onTouchEnd:
|
|
1218
|
+
value: O > 0 ? H / O * 100 : 0,
|
|
1219
|
+
onChange: Bt,
|
|
1220
|
+
onMouseDown: mt,
|
|
1221
|
+
onMouseUp: ft,
|
|
1222
|
+
onTouchStart: mt,
|
|
1223
|
+
onTouchEnd: ft,
|
|
660
1224
|
disabled: !s,
|
|
661
1225
|
className: "ecp-vp-seek-input",
|
|
662
1226
|
style: {
|
|
663
|
-
background: s &&
|
|
664
|
-
"--thumb-color":
|
|
1227
|
+
background: s && O > 0 ? `linear-gradient(to right, ${l.slider} ${H / O * 100}%, ${l.slider + "30"} ${H / O * 100}%)` : l.slider + "30",
|
|
1228
|
+
"--thumb-color": l.slider
|
|
665
1229
|
}
|
|
666
1230
|
}
|
|
667
1231
|
),
|
|
668
|
-
/* @__PURE__ */ e("span", { className: `ecp-vp-time ecp-vp-time--right${
|
|
1232
|
+
/* @__PURE__ */ e("span", { className: `ecp-vp-time ecp-vp-time--right${k ? " ecp-vp-time--dark" : " ecp-vp-time--light"}`, children: gt(O) })
|
|
669
1233
|
] }) }),
|
|
670
|
-
/* @__PURE__ */
|
|
671
|
-
|
|
1234
|
+
/* @__PURE__ */ r("div", { className: `ecp-vp-controls${N < 330 ? " ecp-vp-controls--sm" : ""}`, children: [
|
|
1235
|
+
q.play && /* @__PURE__ */ r(
|
|
672
1236
|
"button",
|
|
673
1237
|
{
|
|
674
|
-
onClick:
|
|
1238
|
+
onClick: ht,
|
|
675
1239
|
disabled: !s,
|
|
676
|
-
className: `ecp-vp-play-btn${
|
|
677
|
-
style: { backgroundColor:
|
|
1240
|
+
className: `ecp-vp-play-btn${N < 350 ? " ecp-vp-play-btn--compact" : ""}`,
|
|
1241
|
+
style: { backgroundColor: l.button },
|
|
678
1242
|
children: [
|
|
679
|
-
/* @__PURE__ */
|
|
680
|
-
/* @__PURE__ */ e(
|
|
681
|
-
/* @__PURE__ */ e(
|
|
1243
|
+
/* @__PURE__ */ r("div", { className: "ecp-vp-play-icon-wrap", children: [
|
|
1244
|
+
/* @__PURE__ */ e(et, { size: 16, style: { position: "absolute", transform: G ? void 0 : "scale(0) translateY(2.5rem)", transition: "all 150ms" } }),
|
|
1245
|
+
/* @__PURE__ */ e(tt, { size: 16, style: { position: "absolute", transform: G ? "scale(0) translateY(-2.5rem)" : void 0, transition: "all 150ms" } })
|
|
682
1246
|
] }),
|
|
683
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
1247
|
+
/* @__PURE__ */ e("span", { style: { display: N < 350 ? "none" : "block" }, children: G ? "Pause" : "Play" })
|
|
684
1248
|
]
|
|
685
1249
|
}
|
|
686
1250
|
),
|
|
687
|
-
|
|
1251
|
+
q.stop && /* @__PURE__ */ r(
|
|
688
1252
|
"button",
|
|
689
1253
|
{
|
|
690
|
-
onClick:
|
|
1254
|
+
onClick: Dt,
|
|
691
1255
|
disabled: !s,
|
|
692
|
-
className: `ecp-vp-stop-btn${
|
|
1256
|
+
className: `ecp-vp-stop-btn${k ? " ecp-vp-stop-btn--dark" : " ecp-vp-stop-btn--light"}${N >= 600 ? " ecp-vp-stop-btn--wide" : ""}`,
|
|
693
1257
|
children: [
|
|
694
|
-
/* @__PURE__ */ e(
|
|
695
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
1258
|
+
/* @__PURE__ */ e(St, { size: 16 }),
|
|
1259
|
+
/* @__PURE__ */ e("span", { style: { display: N < 600 ? "none" : "block" }, children: "Stop" })
|
|
696
1260
|
]
|
|
697
1261
|
}
|
|
698
1262
|
),
|
|
699
|
-
|
|
1263
|
+
q.equalizer && /* @__PURE__ */ r(
|
|
700
1264
|
"button",
|
|
701
1265
|
{
|
|
702
|
-
onClick: () =>
|
|
1266
|
+
onClick: () => {
|
|
1267
|
+
ze(!Q), Ne(!1);
|
|
1268
|
+
},
|
|
703
1269
|
disabled: !s,
|
|
704
|
-
className: `ecp-vp-eq-btn${
|
|
705
|
-
style:
|
|
1270
|
+
className: `ecp-vp-eq-btn${Q ? " ecp-vp-eq-btn--on" : " ecp-vp-eq-btn--off"}${N >= 600 ? " ecp-vp-eq-btn--wide" : ""}`,
|
|
1271
|
+
style: Q ? { backgroundColor: l.button } : {},
|
|
706
1272
|
children: [
|
|
707
|
-
/* @__PURE__ */ e(
|
|
708
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
1273
|
+
/* @__PURE__ */ e(Je, { size: 16 }),
|
|
1274
|
+
/* @__PURE__ */ e("span", { style: { display: N < 600 ? "none" : "block" }, children: "EQ" })
|
|
709
1275
|
]
|
|
710
1276
|
}
|
|
711
1277
|
),
|
|
712
|
-
|
|
1278
|
+
q.loop && /* @__PURE__ */ r(
|
|
713
1279
|
"button",
|
|
714
1280
|
{
|
|
715
|
-
onClick:
|
|
1281
|
+
onClick: _t,
|
|
716
1282
|
disabled: !s,
|
|
717
|
-
className: `ecp-vp-loop-btn${
|
|
718
|
-
style:
|
|
1283
|
+
className: `ecp-vp-loop-btn${_ ? " ecp-vp-loop-btn--on" : " ecp-vp-loop-btn--off"}${N >= 700 ? " ecp-vp-loop-btn--wide" : ""}`,
|
|
1284
|
+
style: _ ? { backgroundColor: l.button } : {},
|
|
719
1285
|
children: [
|
|
720
|
-
/* @__PURE__ */ e(
|
|
721
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
1286
|
+
/* @__PURE__ */ e(sr, { size: 16, className: _ ? "ecp-vp-loop-icon--active" : "" }),
|
|
1287
|
+
/* @__PURE__ */ e("span", { style: { display: N < 700 ? "none" : "block" }, children: "Loop" })
|
|
722
1288
|
]
|
|
723
1289
|
}
|
|
724
1290
|
),
|
|
725
|
-
|
|
1291
|
+
q.speed && !q.dolby8d && /* @__PURE__ */ e("div", { className: "ecp-vp-speed-wrap", children: /* @__PURE__ */ e("select", { value: ae, onChange: Ot, className: `ecp-vp-speed-select${k ? " ecp-vp-speed-select--dark" : " ecp-vp-speed-select--light"}`, children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((t) => /* @__PURE__ */ r("option", { value: t, className: k ? "ecp-vp-speed-option--dark" : "ecp-vp-speed-option--light", children: [
|
|
726
1292
|
t,
|
|
727
1293
|
"x"
|
|
728
1294
|
] }, t)) }) }),
|
|
729
|
-
|
|
730
|
-
|
|
1295
|
+
q.dolby8d && /* @__PURE__ */ r(
|
|
1296
|
+
"button",
|
|
1297
|
+
{
|
|
1298
|
+
onClick: () => {
|
|
1299
|
+
Ne(!ce), ze(!1);
|
|
1300
|
+
},
|
|
1301
|
+
disabled: !s,
|
|
1302
|
+
className: `ecp-vp-loop-btn${ce ? " ecp-vp-loop-btn--on" : " ecp-vp-loop-btn--off"}${N >= 700 ? " ecp-vp-loop-btn--wide" : ""}`,
|
|
1303
|
+
style: ce ? { backgroundColor: l.button } : {},
|
|
1304
|
+
children: [
|
|
1305
|
+
/* @__PURE__ */ e(it, { size: 16, className: "" }),
|
|
1306
|
+
/* @__PURE__ */ e("span", { style: { display: N < 700 ? "none" : "block" }, children: "Dolby" })
|
|
1307
|
+
]
|
|
1308
|
+
}
|
|
1309
|
+
),
|
|
1310
|
+
q.volume && /* @__PURE__ */ r("div", { className: "ecp-vp-volume", children: [
|
|
1311
|
+
/* @__PURE__ */ e("button", { onClick: Ht, className: "ecp-vp-mute-btn", children: fe || M === 0 ? /* @__PURE__ */ e(ot, { size: 20, className: k ? "ecp-vp-mute-icon--dark" : "ecp-vp-mute-icon--light" }) : /* @__PURE__ */ e(lt, { size: 20, className: k ? "ecp-vp-mute-icon--dark" : "ecp-vp-mute-icon--light" }) }),
|
|
731
1312
|
/* @__PURE__ */ e(
|
|
732
1313
|
"input",
|
|
733
1314
|
{
|
|
734
1315
|
type: "range",
|
|
735
1316
|
min: "0",
|
|
736
1317
|
max: "100",
|
|
737
|
-
value:
|
|
738
|
-
onChange:
|
|
1318
|
+
value: M,
|
|
1319
|
+
onChange: jt,
|
|
739
1320
|
className: "ecp-vp-volume-slider",
|
|
740
1321
|
style: {
|
|
741
|
-
background: `linear-gradient(to right, ${
|
|
742
|
-
|
|
1322
|
+
background: `linear-gradient(to right, ${l.slider} ${M}%, ${l.slider + "30"} ${M}%)`,
|
|
1323
|
+
"--thumb-color": l.slider,
|
|
1324
|
+
display: N < 460 ? "none" : "block"
|
|
743
1325
|
}
|
|
744
1326
|
}
|
|
745
1327
|
),
|
|
746
|
-
/* @__PURE__ */
|
|
1328
|
+
/* @__PURE__ */ r(
|
|
747
1329
|
"span",
|
|
748
1330
|
{
|
|
749
|
-
className: `ecp-vp-volume-pct${
|
|
750
|
-
style: { display:
|
|
1331
|
+
className: `ecp-vp-volume-pct${k ? " ecp-vp-volume-pct--dark" : " ecp-vp-volume-pct--light"}`,
|
|
1332
|
+
style: { display: N < 800 ? "none" : "block" },
|
|
751
1333
|
children: [
|
|
752
|
-
|
|
1334
|
+
M,
|
|
753
1335
|
"%"
|
|
754
1336
|
]
|
|
755
1337
|
}
|
|
@@ -758,121 +1340,121 @@ function ht({
|
|
|
758
1340
|
] })
|
|
759
1341
|
] }) });
|
|
760
1342
|
}
|
|
761
|
-
function
|
|
1343
|
+
function fr({
|
|
762
1344
|
audio: s,
|
|
763
|
-
gradient:
|
|
764
|
-
background:
|
|
765
|
-
autoPlay:
|
|
766
|
-
thumbnail:
|
|
767
|
-
width:
|
|
768
|
-
equalizer:
|
|
769
|
-
mode:
|
|
1345
|
+
gradient: p = ["#cd7eff", "#ff00f2"],
|
|
1346
|
+
background: v = "#f4e4ffff",
|
|
1347
|
+
autoPlay: y = !1,
|
|
1348
|
+
thumbnail: T = null,
|
|
1349
|
+
width: h,
|
|
1350
|
+
equalizer: q = { bass: 0, mid: 0, treble: 0 },
|
|
1351
|
+
mode: te = "light"
|
|
770
1352
|
}) {
|
|
771
|
-
const [
|
|
772
|
-
const
|
|
773
|
-
for (let
|
|
774
|
-
return
|
|
1353
|
+
const [R, S] = b(!1), [V, U] = b(0), [a, G] = b(0), [D, H] = b(!1), [Y, O] = b(80), [z, M] = b(1), [Me, fe] = b([]), [Ce, _] = b(null), [Fe, me] = b(!1), [be, ye] = b({ bass: q.bass || 0, mid: q.mid || 0, treble: q.treble || 0 }), X = u(null), Q = u(null), ze = u(null), Z = u(null), Ee = u(null), ae = u(null), _e = () => {
|
|
1354
|
+
const c = [];
|
|
1355
|
+
for (let w = 0; w < 100; w++) c.push(20 + Math.random() * 60);
|
|
1356
|
+
return c;
|
|
775
1357
|
};
|
|
776
|
-
|
|
1358
|
+
E(() => {
|
|
777
1359
|
if (!s) return;
|
|
778
|
-
if (!Array.isArray(
|
|
779
|
-
|
|
1360
|
+
if (!Array.isArray(p) || p.length < 2) {
|
|
1361
|
+
_("Gradient must be an array with at least 2 colors");
|
|
780
1362
|
return;
|
|
781
1363
|
}
|
|
782
|
-
const
|
|
783
|
-
if (!
|
|
784
|
-
const
|
|
785
|
-
|
|
786
|
-
},
|
|
787
|
-
var
|
|
788
|
-
return
|
|
1364
|
+
const c = X.current;
|
|
1365
|
+
if (!c) return;
|
|
1366
|
+
const w = () => U(c.currentTime), F = () => {
|
|
1367
|
+
G(c.duration), fe(_e());
|
|
1368
|
+
}, d = () => S(!1), C = (J) => {
|
|
1369
|
+
var A, ue;
|
|
1370
|
+
return _(`Audio error: ${((ue = (A = J.target) == null ? void 0 : A.error) == null ? void 0 : ue.message) || "Failed to load audio"}`);
|
|
789
1371
|
};
|
|
790
|
-
return
|
|
791
|
-
|
|
1372
|
+
return c.addEventListener("timeupdate", w), c.addEventListener("loadedmetadata", F), c.addEventListener("ended", d), c.addEventListener("error", C), () => {
|
|
1373
|
+
c.removeEventListener("timeupdate", w), c.removeEventListener("loadedmetadata", F), c.removeEventListener("ended", d), c.removeEventListener("error", C);
|
|
792
1374
|
};
|
|
793
|
-
}, [s,
|
|
794
|
-
s &&
|
|
795
|
-
console.error("Play failed:",
|
|
796
|
-
}),
|
|
797
|
-
}, [s]),
|
|
798
|
-
if (
|
|
799
|
-
const
|
|
800
|
-
if (
|
|
801
|
-
const
|
|
802
|
-
Q.current =
|
|
803
|
-
const
|
|
804
|
-
|
|
805
|
-
const
|
|
806
|
-
|
|
807
|
-
const
|
|
808
|
-
|
|
809
|
-
const J =
|
|
810
|
-
J.type = "highshelf", J.frequency.value = 3e3,
|
|
1375
|
+
}, [s, p, te]), E(() => {
|
|
1376
|
+
s && X.current && y && (X.current.play().catch((c) => {
|
|
1377
|
+
console.error("Play failed:", c), S(!1);
|
|
1378
|
+
}), S(!0));
|
|
1379
|
+
}, [s]), E(() => {
|
|
1380
|
+
if (X.current && !Q.current && X.current) {
|
|
1381
|
+
const c = window.AudioContext || window.webkitAudioContext;
|
|
1382
|
+
if (c) {
|
|
1383
|
+
const w = new c();
|
|
1384
|
+
Q.current = w;
|
|
1385
|
+
const F = w.createMediaElementSource(X.current);
|
|
1386
|
+
ze.current = F;
|
|
1387
|
+
const d = w.createBiquadFilter();
|
|
1388
|
+
d.type = "lowshelf", d.frequency.value = 200, Z.current = d;
|
|
1389
|
+
const C = w.createBiquadFilter();
|
|
1390
|
+
C.type = "peaking", C.frequency.value = 1e3, C.Q.value = 1, Ee.current = C;
|
|
1391
|
+
const J = w.createBiquadFilter();
|
|
1392
|
+
J.type = "highshelf", J.frequency.value = 3e3, ae.current = J, F.connect(d).connect(C).connect(J).connect(w.destination);
|
|
811
1393
|
}
|
|
812
1394
|
}
|
|
813
|
-
}, [s]),
|
|
814
|
-
|
|
815
|
-
}, [
|
|
816
|
-
|
|
817
|
-
}, [
|
|
818
|
-
const
|
|
819
|
-
|
|
820
|
-
},
|
|
821
|
-
|
|
822
|
-
},
|
|
823
|
-
const
|
|
824
|
-
|
|
825
|
-
},
|
|
826
|
-
|
|
827
|
-
},
|
|
828
|
-
|
|
829
|
-
},
|
|
830
|
-
if (isNaN(
|
|
831
|
-
const
|
|
832
|
-
return `${
|
|
833
|
-
},
|
|
834
|
-
if (
|
|
835
|
-
return /* @__PURE__ */
|
|
836
|
-
/* @__PURE__ */ e("p", { className: `ecp-wave-error-title${
|
|
837
|
-
/* @__PURE__ */ e("p", { className: `ecp-wave-error-msg${
|
|
1395
|
+
}, [s]), E(() => {
|
|
1396
|
+
X.current && (X.current.volume = D ? 0 : Y / 100);
|
|
1397
|
+
}, [Y, D]), E(() => {
|
|
1398
|
+
X.current && (X.current.playbackRate = z);
|
|
1399
|
+
}, [z]);
|
|
1400
|
+
const N = () => {
|
|
1401
|
+
X.current && (R ? X.current.pause() : X.current.play().catch((c) => _(`Playback failed: ${c instanceof Error ? c.message : String(c)}`)), S(!R));
|
|
1402
|
+
}, Te = () => H(!D), ce = (c) => {
|
|
1403
|
+
O(parseInt(c.target.value)), D && parseInt(c.target.value) > 0 && H(!1);
|
|
1404
|
+
}, Ne = (c) => M(parseFloat(c.target.value)), o = (c) => {
|
|
1405
|
+
const w = c.currentTarget.getBoundingClientRect(), d = (c.clientX - w.left) / w.width * a;
|
|
1406
|
+
X.current && (X.current.currentTime = d, U(d));
|
|
1407
|
+
}, pe = (c, w) => {
|
|
1408
|
+
ye((F) => ({ ...F, [c]: w })), c === "bass" && Z.current && (Z.current.gain.value = w), c === "mid" && Ee.current && (Ee.current.gain.value = w), c === "treble" && ae.current && (ae.current.gain.value = w);
|
|
1409
|
+
}, de = () => {
|
|
1410
|
+
pe("bass", 0), pe("mid", 0), pe("treble", 0);
|
|
1411
|
+
}, ke = (c) => {
|
|
1412
|
+
if (isNaN(c)) return "0:00";
|
|
1413
|
+
const w = Math.floor(c / 60), F = Math.floor(c % 60);
|
|
1414
|
+
return `${w}:${F.toString().padStart(2, "0")}`;
|
|
1415
|
+
}, P = a > 0 ? V / a * 100 : 0, B = te === "dark";
|
|
1416
|
+
if (Ce)
|
|
1417
|
+
return /* @__PURE__ */ r("div", { className: "ecp-wave-error", style: { background: v }, children: [
|
|
1418
|
+
/* @__PURE__ */ e("p", { className: `ecp-wave-error-title${B ? " ecp-wave-error--dark" : " ecp-wave-error--light"}`, children: "Error" }),
|
|
1419
|
+
/* @__PURE__ */ e("p", { className: `ecp-wave-error-msg${B ? " ecp-wave-error--dark" : " ecp-wave-error--light"}`, children: Ce })
|
|
838
1420
|
] });
|
|
839
1421
|
if (!s) return null;
|
|
840
|
-
const
|
|
841
|
-
return /* @__PURE__ */
|
|
842
|
-
/* @__PURE__ */ e("audio", { ref:
|
|
843
|
-
/* @__PURE__ */ e("div", { className: "ecp-wave-card", children: /* @__PURE__ */
|
|
844
|
-
|
|
845
|
-
/* @__PURE__ */
|
|
846
|
-
/* @__PURE__ */ e("div", { className: "ecp-wave-bars", children:
|
|
847
|
-
const
|
|
1422
|
+
const ie = B ? "#9ca3af" : "#6b7280";
|
|
1423
|
+
return /* @__PURE__ */ r("div", { className: "ecp-wave-outer", style: { width: h ? `${h}px` : void 0 }, children: [
|
|
1424
|
+
/* @__PURE__ */ e("audio", { ref: X, src: s, className: "ecp-wave-audio-el" }),
|
|
1425
|
+
/* @__PURE__ */ e("div", { className: "ecp-wave-card", children: /* @__PURE__ */ r("div", { className: "ecp-wave-card-inner", style: { background: v }, children: [
|
|
1426
|
+
T && /* @__PURE__ */ e("div", { className: "ecp-wave-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: T, alt: "", className: "ecp-wave-thumbnail" }) }),
|
|
1427
|
+
/* @__PURE__ */ r("div", { className: "ecp-wave-seek", onClick: o, children: [
|
|
1428
|
+
/* @__PURE__ */ e("div", { className: "ecp-wave-bars", children: Me.map((c, w) => {
|
|
1429
|
+
const F = w / Me.length * 100 <= P;
|
|
848
1430
|
return /* @__PURE__ */ e(
|
|
849
1431
|
"div",
|
|
850
1432
|
{
|
|
851
1433
|
className: "ecp-wave-bar",
|
|
852
1434
|
style: {
|
|
853
|
-
height: `${
|
|
854
|
-
background:
|
|
855
|
-
opacity:
|
|
1435
|
+
height: `${c}%`,
|
|
1436
|
+
background: F ? p[0] : p[1],
|
|
1437
|
+
opacity: F ? 1 : 0.4
|
|
856
1438
|
}
|
|
857
1439
|
},
|
|
858
|
-
|
|
1440
|
+
w
|
|
859
1441
|
);
|
|
860
1442
|
}) }),
|
|
861
|
-
/* @__PURE__ */ e("div", { className: "ecp-wave-progress-line", style: { left: `${
|
|
1443
|
+
/* @__PURE__ */ e("div", { className: "ecp-wave-progress-line", style: { left: `${P}%` } })
|
|
862
1444
|
] }),
|
|
863
|
-
/* @__PURE__ */
|
|
864
|
-
/* @__PURE__ */ e("span", { children:
|
|
865
|
-
/* @__PURE__ */ e("span", { children:
|
|
1445
|
+
/* @__PURE__ */ r("div", { className: "ecp-wave-times", style: { color: ie }, children: [
|
|
1446
|
+
/* @__PURE__ */ e("span", { children: ke(V) }),
|
|
1447
|
+
/* @__PURE__ */ e("span", { children: ke(a) })
|
|
866
1448
|
] }),
|
|
867
|
-
/* @__PURE__ */
|
|
868
|
-
/* @__PURE__ */
|
|
1449
|
+
/* @__PURE__ */ r("div", { className: "ecp-wave-controls", children: [
|
|
1450
|
+
/* @__PURE__ */ r("div", { className: "ecp-wave-left-controls", children: [
|
|
869
1451
|
/* @__PURE__ */ e(
|
|
870
1452
|
"button",
|
|
871
1453
|
{
|
|
872
|
-
onClick:
|
|
1454
|
+
onClick: Te,
|
|
873
1455
|
className: "ecp-wave-vol-btn",
|
|
874
|
-
style: { background: `linear-gradient(135deg, ${
|
|
875
|
-
children:
|
|
1456
|
+
style: { background: `linear-gradient(135deg, ${p[0]}, ${p[1]})` },
|
|
1457
|
+
children: D || Y === 0 ? /* @__PURE__ */ e(ot, { style: { width: "1rem", height: "1rem", color: "white" } }) : /* @__PURE__ */ e(lt, { style: { width: "1rem", height: "1rem", color: "white" } })
|
|
876
1458
|
}
|
|
877
1459
|
),
|
|
878
1460
|
/* @__PURE__ */ e(
|
|
@@ -881,156 +1463,160 @@ function bt({
|
|
|
881
1463
|
type: "range",
|
|
882
1464
|
min: "0",
|
|
883
1465
|
max: "100",
|
|
884
|
-
value:
|
|
885
|
-
onChange:
|
|
1466
|
+
value: Y,
|
|
1467
|
+
onChange: ce,
|
|
886
1468
|
className: "ecp-wave-vol-slider",
|
|
887
1469
|
style: {
|
|
888
|
-
background: `linear-gradient(to right, ${
|
|
889
|
-
|
|
1470
|
+
background: `linear-gradient(to right, ${p[0]} ${Y}%, ${B ? "#374151" : "#d1d5db"} ${Y}%)`,
|
|
1471
|
+
"--thumb-color": p[0],
|
|
1472
|
+
display: h && h < 400 ? "none" : void 0
|
|
890
1473
|
}
|
|
891
1474
|
}
|
|
892
1475
|
),
|
|
893
|
-
|
|
1476
|
+
h && h < 400 && /* @__PURE__ */ e(
|
|
894
1477
|
"button",
|
|
895
1478
|
{
|
|
896
|
-
onClick: () =>
|
|
1479
|
+
onClick: () => me(!Fe),
|
|
897
1480
|
className: "ecp-wave-eq-btn",
|
|
898
|
-
style: { background: `linear-gradient(135deg, ${
|
|
899
|
-
children: /* @__PURE__ */ e(
|
|
1481
|
+
style: { background: `linear-gradient(135deg, ${p[0]}, ${p[1]})` },
|
|
1482
|
+
children: /* @__PURE__ */ e(Je, { style: { width: "1rem", height: "1rem", color: "white" } })
|
|
900
1483
|
}
|
|
901
1484
|
)
|
|
902
1485
|
] }),
|
|
903
1486
|
/* @__PURE__ */ e("div", { className: "ecp-wave-center-controls", children: /* @__PURE__ */ e(
|
|
904
1487
|
"button",
|
|
905
1488
|
{
|
|
906
|
-
onClick:
|
|
1489
|
+
onClick: N,
|
|
907
1490
|
className: "ecp-wave-play-btn",
|
|
908
|
-
style: { background: `linear-gradient(135deg, ${
|
|
909
|
-
children:
|
|
1491
|
+
style: { background: `linear-gradient(135deg, ${p[0]}, ${p[1]})` },
|
|
1492
|
+
children: R ? /* @__PURE__ */ e(et, { style: { width: "1.5rem", height: "1.5rem", color: "white", fill: "white" } }) : /* @__PURE__ */ e(tt, { style: { width: "1.5rem", height: "1.5rem", color: "white", fill: "white" } })
|
|
910
1493
|
}
|
|
911
1494
|
) }),
|
|
912
|
-
/* @__PURE__ */
|
|
1495
|
+
/* @__PURE__ */ r("div", { className: "ecp-wave-right-controls", children: [
|
|
913
1496
|
/* @__PURE__ */ e(
|
|
914
1497
|
"select",
|
|
915
1498
|
{
|
|
916
|
-
value:
|
|
917
|
-
onChange:
|
|
918
|
-
className: `ecp-wave-speed-select${
|
|
919
|
-
style: { background:
|
|
920
|
-
children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((
|
|
921
|
-
|
|
1499
|
+
value: z,
|
|
1500
|
+
onChange: Ne,
|
|
1501
|
+
className: `ecp-wave-speed-select${B ? " ecp-wave-speed-select--dark" : " ecp-wave-speed-select--light"}`,
|
|
1502
|
+
style: { background: v, color: p[0] },
|
|
1503
|
+
children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((c) => /* @__PURE__ */ r("option", { value: c, children: [
|
|
1504
|
+
c,
|
|
922
1505
|
"x"
|
|
923
|
-
] },
|
|
1506
|
+
] }, c))
|
|
924
1507
|
}
|
|
925
1508
|
),
|
|
926
|
-
!(
|
|
1509
|
+
!(h && h < 400) && /* @__PURE__ */ e(
|
|
927
1510
|
"button",
|
|
928
1511
|
{
|
|
929
|
-
onClick: () =>
|
|
1512
|
+
onClick: () => me(!Fe),
|
|
930
1513
|
className: "ecp-wave-eq-btn",
|
|
931
|
-
style: { background: `linear-gradient(135deg, ${
|
|
932
|
-
children: /* @__PURE__ */ e(
|
|
1514
|
+
style: { background: `linear-gradient(135deg, ${p[0]}, ${p[1]})` },
|
|
1515
|
+
children: /* @__PURE__ */ e(Je, { style: { width: "1rem", height: "1rem", color: "white" } })
|
|
933
1516
|
}
|
|
934
1517
|
)
|
|
935
1518
|
] })
|
|
936
1519
|
] })
|
|
937
1520
|
] }) }),
|
|
938
|
-
|
|
939
|
-
/* @__PURE__ */ e("h3", { className: `ecp-wave-eq-title${
|
|
940
|
-
/* @__PURE__ */ e("div", { className: "ecp-wave-eq-bands", children: ["bass", "mid", "treble"].map((
|
|
941
|
-
/* @__PURE__ */
|
|
942
|
-
/* @__PURE__ */ e("span", { className:
|
|
943
|
-
/* @__PURE__ */
|
|
944
|
-
|
|
1521
|
+
Fe && /* @__PURE__ */ e("div", { className: "ecp-wave-eq-overlay", children: /* @__PURE__ */ r("div", { className: `ecp-wave-eq-panel${B ? " ecp-wave-eq-panel--dark" : " ecp-wave-eq-panel--light"}`, children: [
|
|
1522
|
+
/* @__PURE__ */ e("h3", { className: `ecp-wave-eq-title${B ? " ecp-wave-eq-title--dark" : " ecp-wave-eq-title--light"}`, children: "Equalizer" }),
|
|
1523
|
+
/* @__PURE__ */ e("div", { className: "ecp-wave-eq-bands", children: ["bass", "mid", "treble"].map((c) => /* @__PURE__ */ r("div", { children: [
|
|
1524
|
+
/* @__PURE__ */ r("div", { className: "ecp-wave-eq-band-header", children: [
|
|
1525
|
+
/* @__PURE__ */ e("span", { className: B ? "ecp-wave-eq-label--dark" : "ecp-wave-eq-label--light", children: c.charAt(0).toUpperCase() + c.slice(1) }),
|
|
1526
|
+
/* @__PURE__ */ r("span", { className: B ? "ecp-wave-eq-label--dark" : "ecp-wave-eq-label--light", children: [
|
|
1527
|
+
be[c],
|
|
945
1528
|
" dB"
|
|
946
1529
|
] })
|
|
947
1530
|
] }),
|
|
948
|
-
/* @__PURE__ */
|
|
949
|
-
/* @__PURE__ */ e("span", { className:
|
|
1531
|
+
/* @__PURE__ */ r("div", { className: "ecp-wave-eq-range-row", children: [
|
|
1532
|
+
/* @__PURE__ */ e("span", { className: B ? "ecp-wave-eq-bound--dark" : "ecp-wave-eq-bound--light", children: "-20" }),
|
|
950
1533
|
/* @__PURE__ */ e(
|
|
951
1534
|
"input",
|
|
952
1535
|
{
|
|
953
1536
|
type: "range",
|
|
954
1537
|
min: "-20",
|
|
955
1538
|
max: "20",
|
|
956
|
-
value:
|
|
957
|
-
onChange: (
|
|
1539
|
+
value: be[c],
|
|
1540
|
+
onChange: (w) => pe(c, parseInt(w.target.value)),
|
|
958
1541
|
className: "ecp-wave-eq-slider",
|
|
959
|
-
style: {
|
|
1542
|
+
style: {
|
|
1543
|
+
background: `linear-gradient(to right, ${p[0]} ${(be[c] + 20) / 40 * 100}%, ${p[1] + "30"} ${(be[c] + 20) / 40 * 100}%)`,
|
|
1544
|
+
"--thumb-color": p[0]
|
|
1545
|
+
}
|
|
960
1546
|
}
|
|
961
1547
|
),
|
|
962
|
-
/* @__PURE__ */ e("span", { className:
|
|
1548
|
+
/* @__PURE__ */ e("span", { className: B ? "ecp-wave-eq-bound--dark" : "ecp-wave-eq-bound--light", children: "+20" })
|
|
963
1549
|
] })
|
|
964
|
-
] },
|
|
965
|
-
/* @__PURE__ */
|
|
966
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
967
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
1550
|
+
] }, c)) }),
|
|
1551
|
+
/* @__PURE__ */ r("div", { className: "ecp-wave-eq-footer", children: [
|
|
1552
|
+
/* @__PURE__ */ e("button", { onClick: de, className: `ecp-wave-eq-footer-btn${B ? " ecp-wave-eq-footer-btn--dark" : " ecp-wave-eq-footer-btn--light"}`, children: "Reset" }),
|
|
1553
|
+
/* @__PURE__ */ e("button", { onClick: () => me(!1), className: `ecp-wave-eq-footer-btn${B ? " ecp-wave-eq-footer-btn--dark" : " ecp-wave-eq-footer-btn--light"}`, children: "Close" })
|
|
968
1554
|
] })
|
|
969
1555
|
] }) })
|
|
970
1556
|
] });
|
|
971
1557
|
}
|
|
972
|
-
function
|
|
973
|
-
const [
|
|
974
|
-
|
|
975
|
-
const
|
|
976
|
-
if (!
|
|
977
|
-
const
|
|
978
|
-
return
|
|
979
|
-
}, []),
|
|
980
|
-
const
|
|
981
|
-
|
|
1558
|
+
function gr({ audio: s, thumbnail: p, gradient: v = ["#cd7eff", "#fe59f6"], background: y = "#1f273a", autoPlay: T = !1 }) {
|
|
1559
|
+
const [h, q] = b(!1), [, te] = b(0), R = u(null), [S, V] = b(0), [U, a] = b(0), [G, D] = b(0);
|
|
1560
|
+
E(() => {
|
|
1561
|
+
const z = R.current;
|
|
1562
|
+
if (!z) return;
|
|
1563
|
+
const M = () => te(z.currentTime);
|
|
1564
|
+
return z.addEventListener("timeupdate", M), () => z.removeEventListener("timeupdate", M);
|
|
1565
|
+
}, []), E(() => {
|
|
1566
|
+
const z = setInterval(() => {
|
|
1567
|
+
h && V((M) => M + 0.1);
|
|
982
1568
|
}, 100);
|
|
983
|
-
return () => clearInterval(
|
|
984
|
-
}, [
|
|
985
|
-
const
|
|
986
|
-
|
|
1569
|
+
return () => clearInterval(z);
|
|
1570
|
+
}, [h]), E(() => {
|
|
1571
|
+
const z = setInterval(() => {
|
|
1572
|
+
h && D((M) => M + 0.1);
|
|
987
1573
|
}, 100);
|
|
988
|
-
return () => clearInterval(
|
|
989
|
-
}, [
|
|
990
|
-
s &&
|
|
991
|
-
}, [s]),
|
|
992
|
-
const
|
|
993
|
-
if (!
|
|
994
|
-
const
|
|
995
|
-
return
|
|
1574
|
+
return () => clearInterval(z);
|
|
1575
|
+
}, [h]), E(() => {
|
|
1576
|
+
s && R.current && T && (R.current.play().catch(() => q(!1)), q(!0));
|
|
1577
|
+
}, [s]), E(() => {
|
|
1578
|
+
const z = R.current;
|
|
1579
|
+
if (!z) return;
|
|
1580
|
+
const M = () => a(z.duration);
|
|
1581
|
+
return D(0), z.addEventListener("loadedmetadata", M), () => z.removeEventListener("loadedmetadata", M);
|
|
996
1582
|
}, [s]);
|
|
997
|
-
const
|
|
998
|
-
|
|
1583
|
+
const H = () => {
|
|
1584
|
+
R.current && (h ? R.current.pause() : R.current.play().catch((z) => console.error("NanoPlayer play failed:", z)), q(!h));
|
|
999
1585
|
};
|
|
1000
1586
|
if (!s) return null;
|
|
1001
|
-
const
|
|
1002
|
-
return /* @__PURE__ */
|
|
1587
|
+
const Y = `linear-gradient(135deg, ${v[0]}, ${v[1]})`, O = `${(U > 0 ? G / U : 0) * 100}%`;
|
|
1588
|
+
return /* @__PURE__ */ r(
|
|
1003
1589
|
"div",
|
|
1004
1590
|
{
|
|
1005
|
-
className: `ecp-nano-wrapper${
|
|
1006
|
-
style: { backgroundColor:
|
|
1591
|
+
className: `ecp-nano-wrapper${p ? " ecp-nano-wrapper--card" : " ecp-nano-wrapper--pill"}`,
|
|
1592
|
+
style: { backgroundColor: y },
|
|
1007
1593
|
children: [
|
|
1008
1594
|
/* @__PURE__ */ e(
|
|
1009
1595
|
"audio",
|
|
1010
1596
|
{
|
|
1011
|
-
ref:
|
|
1597
|
+
ref: R,
|
|
1012
1598
|
src: s,
|
|
1013
1599
|
onEnded: () => {
|
|
1014
|
-
|
|
1600
|
+
q(!1), D(0);
|
|
1015
1601
|
}
|
|
1016
1602
|
}
|
|
1017
1603
|
),
|
|
1018
|
-
/* @__PURE__ */ e("div", { className: "ecp-nano-progress-bg", style: { width:
|
|
1019
|
-
/* @__PURE__ */
|
|
1020
|
-
|
|
1021
|
-
/* @__PURE__ */
|
|
1022
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
1023
|
-
/* @__PURE__ */ e("div", { className: "ecp-nano-waveform", children: [...Array(12)].map((
|
|
1604
|
+
/* @__PURE__ */ e("div", { className: "ecp-nano-progress-bg", style: { width: O, backgroundImage: Y } }),
|
|
1605
|
+
/* @__PURE__ */ r("div", { className: "ecp-nano-content", children: [
|
|
1606
|
+
p && /* @__PURE__ */ e("div", { className: "ecp-nano-thumbnail-wrap", children: /* @__PURE__ */ e("img", { src: p, alt: "", className: "ecp-nano-thumbnail" }) }),
|
|
1607
|
+
/* @__PURE__ */ r("div", { className: "ecp-nano-row", children: [
|
|
1608
|
+
/* @__PURE__ */ e("button", { onClick: H, className: "ecp-nano-play-btn", style: { background: Y }, children: h ? /* @__PURE__ */ e(et, { fill: y, style: { width: "0.75rem", height: "0.75rem", color: "transparent" } }) : /* @__PURE__ */ e(tt, { fill: y, style: { width: "0.75rem", height: "0.75rem", color: "transparent" } }) }),
|
|
1609
|
+
/* @__PURE__ */ e("div", { className: "ecp-nano-waveform", children: [...Array(12)].map((z, M) => /* @__PURE__ */ e(
|
|
1024
1610
|
"div",
|
|
1025
1611
|
{
|
|
1026
1612
|
className: "ecp-nano-wave-bar",
|
|
1027
1613
|
style: {
|
|
1028
|
-
background: `linear-gradient(to top, ${
|
|
1029
|
-
height:
|
|
1030
|
-
opacity:
|
|
1614
|
+
background: `linear-gradient(to top, ${v[0]}, ${v[1]})`,
|
|
1615
|
+
height: h ? `${8 + Math.sin((S * 8 + M) * 0.6) * 10}px` : "8px",
|
|
1616
|
+
opacity: h ? 0.8 : 0.4
|
|
1031
1617
|
}
|
|
1032
1618
|
},
|
|
1033
|
-
|
|
1619
|
+
M
|
|
1034
1620
|
)) })
|
|
1035
1621
|
] })
|
|
1036
1622
|
] })
|
|
@@ -1038,13 +1624,13 @@ function gt({ audio: s, thumbnail: l, gradient: u = ["#cd7eff", "#fe59f6"], back
|
|
|
1038
1624
|
}
|
|
1039
1625
|
);
|
|
1040
1626
|
}
|
|
1041
|
-
function
|
|
1627
|
+
function qr({
|
|
1042
1628
|
video: s,
|
|
1043
|
-
name:
|
|
1044
|
-
audioVisual:
|
|
1045
|
-
volume:
|
|
1046
|
-
thumbnail:
|
|
1047
|
-
controls:
|
|
1629
|
+
name: p = "No video loaded",
|
|
1630
|
+
audioVisual: v = null,
|
|
1631
|
+
volume: y = 100,
|
|
1632
|
+
thumbnail: T = null,
|
|
1633
|
+
controls: h = {
|
|
1048
1634
|
play: !0,
|
|
1049
1635
|
pause: !0,
|
|
1050
1636
|
stop: !0,
|
|
@@ -1055,203 +1641,203 @@ function wt({
|
|
|
1055
1641
|
equalizer: !0,
|
|
1056
1642
|
speed: !0
|
|
1057
1643
|
},
|
|
1058
|
-
mode:
|
|
1059
|
-
transparent:
|
|
1060
|
-
autoPlay:
|
|
1061
|
-
color:
|
|
1062
|
-
equalizer:
|
|
1644
|
+
mode: q = "light",
|
|
1645
|
+
transparent: te = !1,
|
|
1646
|
+
autoPlay: R = !1,
|
|
1647
|
+
color: S = "#3b82f6",
|
|
1648
|
+
equalizer: V = { bass: 0, mid: 0, treble: 0 }
|
|
1063
1649
|
}) {
|
|
1064
|
-
const [
|
|
1065
|
-
|
|
1066
|
-
const n =
|
|
1650
|
+
const [U, a] = b(!1), [G, D] = b(0), [H, Y] = b(0), [O, z] = b(y || 100), [M, Me] = b(!1), [fe, Ce] = b(!1), [_, Fe] = b(!1), [me, be] = b([]), [ye, X] = b(!1), [Q, ze] = b({ bass: V.bass || 0, mid: V.mid || 0, treble: V.treble || 0 }), [Z, Ee] = b(1), [ae, _e] = b(0), N = u(null), Te = u(null), ce = u(null), Ne = u(null), o = u(null), pe = u(null), de = u(null), ke = u(null), P = u(null), B = u(null), ie = u(0), c = u(0), w = u(0), F = u(0), d = u(0), C = u(0), J = u(!1), A = q === "dark" || _, ue = typeof h == "object" && Object.keys(h).length === 0;
|
|
1651
|
+
E(() => {
|
|
1652
|
+
const n = Te.current;
|
|
1067
1653
|
if (!n) return;
|
|
1068
|
-
const
|
|
1069
|
-
for (let
|
|
1654
|
+
const f = new ResizeObserver(($) => {
|
|
1655
|
+
for (let L of $) _e(L.contentRect.width);
|
|
1070
1656
|
});
|
|
1071
|
-
return
|
|
1072
|
-
}, []),
|
|
1657
|
+
return f.observe(n), () => f.disconnect();
|
|
1658
|
+
}, []), E(() => {
|
|
1073
1659
|
const n = [];
|
|
1074
|
-
s && typeof s != "string" && n.push(["TypeError", "video must be a string (URL or path)"]),
|
|
1075
|
-
}, [s,
|
|
1076
|
-
if (!
|
|
1077
|
-
const n =
|
|
1078
|
-
|
|
1079
|
-
},
|
|
1080
|
-
|
|
1081
|
-
},
|
|
1082
|
-
return n.addEventListener("timeupdate",
|
|
1083
|
-
n.removeEventListener("timeupdate",
|
|
1660
|
+
s && typeof s != "string" && n.push(["TypeError", "video must be a string (URL or path)"]), p && typeof p != "string" && n.push(["TypeError", "name must be a string"]), (typeof y != "number" || y < 0 || y > 100) && n.push(["TypeError", "volume must be a number between 0 and 100"]), v && typeof v != "object" ? n.push(["TypeError", "audioVisual must be an object"]) : v && !["left", "right", "top", "bottom"].includes(v.side) && n.push(["ValueError", "audioVisual.side must be 'left', 'right', 'top', or 'bottom'"]), n.length > 0 ? be(n) : be([]);
|
|
1661
|
+
}, [s, p, y, v, h, q]), E(() => {
|
|
1662
|
+
if (!N.current) return;
|
|
1663
|
+
const n = N.current, f = () => {
|
|
1664
|
+
fe || D(n.currentTime);
|
|
1665
|
+
}, $ = () => Y(n.duration), L = () => {
|
|
1666
|
+
a(!1), P.current && cancelAnimationFrame(P.current);
|
|
1667
|
+
}, W = () => a(!0), se = () => a(!1);
|
|
1668
|
+
return n.addEventListener("timeupdate", f), n.addEventListener("loadedmetadata", $), n.addEventListener("ended", L), n.addEventListener("play", W), n.addEventListener("pause", se), () => {
|
|
1669
|
+
n.removeEventListener("timeupdate", f), n.removeEventListener("loadedmetadata", $), n.removeEventListener("ended", L), n.removeEventListener("play", W), n.removeEventListener("pause", se);
|
|
1084
1670
|
};
|
|
1085
|
-
}, [
|
|
1671
|
+
}, [fe]), E(() => {
|
|
1086
1672
|
if (s) {
|
|
1087
|
-
const n =
|
|
1088
|
-
if (
|
|
1089
|
-
|
|
1090
|
-
const
|
|
1091
|
-
n &&
|
|
1673
|
+
const n = U, f = O;
|
|
1674
|
+
if (N.current) {
|
|
1675
|
+
N.current.pause(), N.current.src = s, N.current.volume = M ? 0 : f / 100;
|
|
1676
|
+
const $ = () => {
|
|
1677
|
+
n && N.current && N.current.play().catch((L) => console.error("Play failed:", L)), N.current && N.current.removeEventListener("canplay", $);
|
|
1092
1678
|
};
|
|
1093
|
-
|
|
1679
|
+
N.current.addEventListener("canplay", $), N.current.load();
|
|
1094
1680
|
}
|
|
1095
|
-
|
|
1681
|
+
D(0), a(!1), ie.current = 0, c.current = 0, w.current = 0, F.current = 0, d.current = 0, C.current = 0, ve();
|
|
1096
1682
|
}
|
|
1097
|
-
}, [s]),
|
|
1098
|
-
|
|
1099
|
-
}, [
|
|
1100
|
-
|
|
1101
|
-
}, [
|
|
1102
|
-
|
|
1103
|
-
}, [Q]),
|
|
1104
|
-
J.current =
|
|
1105
|
-
}, [
|
|
1106
|
-
const n = () =>
|
|
1683
|
+
}, [s]), E(() => {
|
|
1684
|
+
N.current && (N.current.volume = M ? 0 : O / 100);
|
|
1685
|
+
}, [O, M]), E(() => {
|
|
1686
|
+
N.current && (N.current.playbackRate = Z);
|
|
1687
|
+
}, [Z]), E(() => {
|
|
1688
|
+
ce.current && (pe.current && (pe.current.gain.value = Q.bass), de.current && (de.current.gain.value = Q.mid), ke.current && (ke.current.gain.value = Q.treble));
|
|
1689
|
+
}, [Q]), E(() => {
|
|
1690
|
+
J.current = U, P.current && (cancelAnimationFrame(P.current), P.current = null), U && v ? (ce.current || Re(), I()) : !U && v && we();
|
|
1691
|
+
}, [U, v]), E(() => {
|
|
1692
|
+
const n = () => Fe(!!document.fullscreenElement);
|
|
1107
1693
|
return document.addEventListener("fullscreenchange", n), () => document.removeEventListener("fullscreenchange", n);
|
|
1108
|
-
}, []),
|
|
1109
|
-
|
|
1694
|
+
}, []), E(() => () => {
|
|
1695
|
+
P.current && cancelAnimationFrame(P.current), ce.current && ce.current.close().catch((n) => console.warn("AudioContext cleanup error:", n));
|
|
1110
1696
|
}, []);
|
|
1111
|
-
const
|
|
1112
|
-
if (!
|
|
1697
|
+
const Re = () => {
|
|
1698
|
+
if (!ce.current && N.current)
|
|
1113
1699
|
try {
|
|
1114
1700
|
const n = window.AudioContext || window.webkitAudioContext;
|
|
1115
1701
|
if (n) {
|
|
1116
|
-
const
|
|
1117
|
-
|
|
1118
|
-
const
|
|
1119
|
-
|
|
1120
|
-
const
|
|
1121
|
-
|
|
1122
|
-
const
|
|
1123
|
-
|
|
1124
|
-
const
|
|
1125
|
-
|
|
1126
|
-
const
|
|
1127
|
-
|
|
1702
|
+
const f = new n();
|
|
1703
|
+
ce.current = f;
|
|
1704
|
+
const $ = f.createBiquadFilter();
|
|
1705
|
+
$.type = "lowshelf", $.frequency.value = 320, $.gain.value = Q.bass;
|
|
1706
|
+
const L = f.createBiquadFilter();
|
|
1707
|
+
L.type = "peaking", L.frequency.value = 1e3, L.Q.value = 0.5, L.gain.value = Q.mid;
|
|
1708
|
+
const W = f.createBiquadFilter();
|
|
1709
|
+
W.type = "highshelf", W.frequency.value = 3200, W.gain.value = Q.treble;
|
|
1710
|
+
const se = f.createAnalyser();
|
|
1711
|
+
se.fftSize = 2048, se.smoothingTimeConstant = 0.8;
|
|
1712
|
+
const l = f.createMediaElementSource(N.current);
|
|
1713
|
+
l.connect($), $.connect(L), L.connect(W), W.connect(se), W.connect(f.destination), pe.current = $, de.current = L, ke.current = W, Ne.current = se, o.current = l;
|
|
1128
1714
|
}
|
|
1129
1715
|
} catch (n) {
|
|
1130
1716
|
console.error("Failed to setup audio context:", n);
|
|
1131
1717
|
}
|
|
1132
|
-
},
|
|
1718
|
+
}, we = () => {
|
|
1133
1719
|
if (J.current) return;
|
|
1134
|
-
|
|
1720
|
+
ie.current *= 0.7, c.current *= 0.7;
|
|
1135
1721
|
const n = Date.now();
|
|
1136
|
-
n -
|
|
1137
|
-
const
|
|
1138
|
-
|
|
1139
|
-
},
|
|
1140
|
-
if (!
|
|
1141
|
-
const n =
|
|
1142
|
-
|
|
1143
|
-
let
|
|
1144
|
-
for (let
|
|
1145
|
-
let
|
|
1146
|
-
|
|
1147
|
-
const
|
|
1148
|
-
|
|
1722
|
+
n - d.current > 1500 && (w.current *= 0.95), n - C.current > 1500 && (F.current *= 0.95), ve();
|
|
1723
|
+
const f = Math.max(ie.current, c.current), $ = Math.max(w.current, F.current);
|
|
1724
|
+
f > 0.01 || $ > 0.01 ? P.current = requestAnimationFrame(we) : (J.current || (ie.current = 0, c.current = 0, w.current = 0, F.current = 0, ve()), P.current && cancelAnimationFrame(P.current), P.current = null);
|
|
1725
|
+
}, I = () => {
|
|
1726
|
+
if (!Ne.current || !J.current) return;
|
|
1727
|
+
const n = Ne.current.frequencyBinCount, f = new Uint8Array(n);
|
|
1728
|
+
Ne.current.getByteFrequencyData(f);
|
|
1729
|
+
let $ = 0;
|
|
1730
|
+
for (let se = 0; se < n; se++) $ += f[se];
|
|
1731
|
+
let L = Math.pow($ / n / 255, 0.5);
|
|
1732
|
+
ie.current = ie.current * 0.7 + L * 0.3, c.current = c.current * 0.7 + L * 0.3;
|
|
1733
|
+
const W = Date.now();
|
|
1734
|
+
ie.current > w.current ? (w.current = ie.current, d.current = W) : W - d.current > 1500 && (w.current *= 0.95), c.current > F.current ? (F.current = c.current, C.current = W) : W - C.current > 1500 && (F.current *= 0.95), ve(), P.current = requestAnimationFrame(I);
|
|
1149
1735
|
}, ve = () => {
|
|
1150
|
-
if (!
|
|
1151
|
-
const n =
|
|
1152
|
-
|
|
1736
|
+
if (!B.current || !v) return;
|
|
1737
|
+
const n = v.color || "#00ff00", f = v.peak || "#ff0000", $ = ie.current * 100, L = c.current * 100, W = 100 - w.current * 100, se = 100 - F.current * 100;
|
|
1738
|
+
v.side === "top" || v.side === "bottom" ? B.current.innerHTML = `
|
|
1153
1739
|
<div style="display:flex;flex-direction:column;gap:0.25rem;height:100%;justify-content:center;">
|
|
1154
1740
|
<div style="display:flex;align-items:center;justify-content:center;gap:0.5rem;">
|
|
1155
|
-
<div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${
|
|
1741
|
+
<div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${A ? "#f3f4f6" : "#111827"}">L</div>
|
|
1156
1742
|
<div style="position:relative;flex:1;height:0.75rem;background:rgba(0,0,0,0.4);border-radius:9999px;overflow:hidden;display:flex;justify-content:flex-end;">
|
|
1157
|
-
<div style="height:100%;border-radius:9999px 0 0 9999px;transition:width 75ms;width:${
|
|
1158
|
-
${
|
|
1743
|
+
<div style="height:100%;border-radius:9999px 0 0 9999px;transition:width 75ms;width:${$}%;background:${n};"></div>
|
|
1744
|
+
${w.current > 0.1 ? `<div style="position:absolute;top:0;width:0.25rem;height:100%;transition:right 100ms;right:${w.current * 100}%;background:${f};"></div>` : ""}
|
|
1159
1745
|
</div>
|
|
1160
1746
|
<div style="width:1px;height:1rem;background:rgba(255,255,255,0.2)"></div>
|
|
1161
1747
|
<div style="position:relative;flex:1;height:0.75rem;background:rgba(0,0,0,0.4);border-radius:9999px;overflow:hidden;display:flex;justify-content:flex-start;">
|
|
1162
|
-
<div style="height:100%;border-radius:0 9999px 9999px 0;transition:width 75ms;width:${
|
|
1163
|
-
${
|
|
1748
|
+
<div style="height:100%;border-radius:0 9999px 9999px 0;transition:width 75ms;width:${L}%;background:${n};"></div>
|
|
1749
|
+
${F.current > 0.1 ? `<div style="position:absolute;top:0;width:0.25rem;height:100%;transition:left 100ms;left:${F.current * 100}%;background:${f};"></div>` : ""}
|
|
1164
1750
|
</div>
|
|
1165
|
-
<div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${
|
|
1751
|
+
<div style="font-size:0.75rem;opacity:0.8;width:1rem;text-align:center;color:${A ? "#f3f4f6" : "#111827"}">R</div>
|
|
1166
1752
|
</div>
|
|
1167
1753
|
</div>
|
|
1168
|
-
` :
|
|
1754
|
+
` : B.current.innerHTML = `
|
|
1169
1755
|
<div style="display:flex;gap:0.5rem;height:100%;">
|
|
1170
1756
|
<div style="flex:1;display:flex;flex-direction:column;">
|
|
1171
1757
|
<div style="font-size:0.75rem;color:white;opacity:0.7;text-align:center;margin-bottom:0.25rem;">L</div>
|
|
1172
1758
|
<div style="flex:1;position:relative;display:flex;flex-direction:column;justify-content:flex-end;background:rgba(0,0,0,0.3);border-radius:0.5rem;overflow:hidden;">
|
|
1173
|
-
<div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${
|
|
1174
|
-
${
|
|
1759
|
+
<div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${$}%;background:${n};">
|
|
1760
|
+
${w.current > 0.1 ? `<div style="position:absolute;width:100%;height:0.25rem;transition:top 100ms;top:${W}%;background:${f};"></div>` : ""}
|
|
1175
1761
|
</div>
|
|
1176
1762
|
</div>
|
|
1177
1763
|
</div>
|
|
1178
1764
|
<div style="flex:1;display:flex;flex-direction:column;">
|
|
1179
1765
|
<div style="font-size:0.75rem;color:white;opacity:0.7;text-align:center;margin-bottom:0.25rem;">R</div>
|
|
1180
1766
|
<div style="flex:1;position:relative;display:flex;flex-direction:column;justify-content:flex-end;background:rgba(0,0,0,0.3);border-radius:0.5rem;overflow:hidden;">
|
|
1181
|
-
<div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${
|
|
1182
|
-
${
|
|
1767
|
+
<div style="border-radius:0.25rem 0.25rem 0 0;transition:height 75ms;height:${L}%;background:${n};">
|
|
1768
|
+
${F.current > 0.1 ? `<div style="position:absolute;width:100%;height:0.25rem;transition:top 100ms;top:${se}%;background:${f};"></div>` : ""}
|
|
1183
1769
|
</div>
|
|
1184
1770
|
</div>
|
|
1185
1771
|
</div>
|
|
1186
1772
|
</div>
|
|
1187
1773
|
`;
|
|
1188
|
-
},
|
|
1189
|
-
!
|
|
1190
|
-
},
|
|
1191
|
-
|
|
1192
|
-
},
|
|
1193
|
-
const
|
|
1194
|
-
|
|
1195
|
-
},
|
|
1196
|
-
|
|
1197
|
-
},
|
|
1198
|
-
const
|
|
1199
|
-
|
|
1200
|
-
},
|
|
1201
|
-
|
|
1202
|
-
},
|
|
1203
|
-
|
|
1204
|
-
},
|
|
1774
|
+
}, De = () => {
|
|
1775
|
+
!N.current || !s || (U ? N.current.pause() : (ce.current && ce.current.state === "suspended" && ce.current.resume(), N.current.play().catch((n) => console.error("Play failed:", n))));
|
|
1776
|
+
}, We = () => {
|
|
1777
|
+
N.current && (N.current.pause(), N.current.currentTime = 0, a(!1), D(0), ie.current = 0, c.current = 0, w.current = 0, F.current = 0, ve());
|
|
1778
|
+
}, Ue = (n) => {
|
|
1779
|
+
const $ = parseFloat(n.target.value) / 100 * H;
|
|
1780
|
+
D($), N.current && !fe && (N.current.currentTime = $);
|
|
1781
|
+
}, Be = () => Ce(!0), je = () => {
|
|
1782
|
+
N.current && (N.current.currentTime = G), Ce(!1);
|
|
1783
|
+
}, Ge = (n) => {
|
|
1784
|
+
const f = parseInt(n.target.value);
|
|
1785
|
+
z(f), Me(f === 0);
|
|
1786
|
+
}, Xe = (n) => Ee(parseFloat(n.target.value)), rt = () => Me(!M), Ve = () => {
|
|
1787
|
+
Te.current && (document.fullscreenElement ? document.exitFullscreen() : Te.current.requestFullscreen().catch((n) => console.error("Fullscreen failed:", n)));
|
|
1788
|
+
}, Le = (n, f) => {
|
|
1789
|
+
ze(($) => ({ ...$, [n]: f })), ce.current && (n === "bass" && pe.current && (pe.current.gain.value = f), n === "mid" && de.current && (de.current.gain.value = f), n === "treble" && ke.current && (ke.current.gain.value = f));
|
|
1790
|
+
}, $e = () => ze({ bass: 0, mid: 0, treble: 0 }), ee = (n) => {
|
|
1205
1791
|
if (isNaN(n)) return "0:00";
|
|
1206
|
-
const
|
|
1207
|
-
return `${
|
|
1792
|
+
const f = Math.floor(n / 60), $ = Math.floor(n % 60);
|
|
1793
|
+
return `${f}:${$.toString().padStart(2, "0")}`;
|
|
1208
1794
|
};
|
|
1209
|
-
if (
|
|
1210
|
-
(
|
|
1211
|
-
}, [
|
|
1212
|
-
return /* @__PURE__ */ e(
|
|
1213
|
-
/* @__PURE__ */
|
|
1795
|
+
if (E(() => {
|
|
1796
|
+
(ue && !U || R) && De();
|
|
1797
|
+
}, [h]), me && me.length > 0)
|
|
1798
|
+
return /* @__PURE__ */ e(Ft, { children: me.map((n, f) => /* @__PURE__ */ r("div", { className: "ecp-video-error", children: [
|
|
1799
|
+
/* @__PURE__ */ r("strong", { children: [
|
|
1214
1800
|
n[0],
|
|
1215
1801
|
":"
|
|
1216
1802
|
] }),
|
|
1217
1803
|
" ",
|
|
1218
1804
|
n[1]
|
|
1219
|
-
] },
|
|
1220
|
-
const
|
|
1805
|
+
] }, f)) });
|
|
1806
|
+
const he = v ? v.side : null, Se = he === "top" || he === "bottom";
|
|
1221
1807
|
return /* @__PURE__ */ e(
|
|
1222
1808
|
"div",
|
|
1223
1809
|
{
|
|
1224
|
-
ref:
|
|
1225
|
-
className: `ecp-video-wrapper${
|
|
1226
|
-
style: { backgroundColor:
|
|
1227
|
-
children: /* @__PURE__ */
|
|
1810
|
+
ref: Te,
|
|
1811
|
+
className: `ecp-video-wrapper${_ ? " ecp-video-wrapper--fullscreen" : ""}`,
|
|
1812
|
+
style: { backgroundColor: ue || te ? void 0 : A ? "#49494937" : "white" },
|
|
1813
|
+
children: /* @__PURE__ */ r(
|
|
1228
1814
|
"div",
|
|
1229
1815
|
{
|
|
1230
|
-
className: `ecp-video-inner${
|
|
1231
|
-
style: { background:
|
|
1816
|
+
className: `ecp-video-inner${_ ? " ecp-video-inner--fullscreen" : ""}${te ? "" : " ecp-video-inner--padded"}`,
|
|
1817
|
+
style: { background: ue || te ? void 0 : A ? "#1a1a1ab0" : "#f5f5f5" },
|
|
1232
1818
|
children: [
|
|
1233
|
-
|
|
1234
|
-
/* @__PURE__ */
|
|
1235
|
-
|
|
1236
|
-
/* @__PURE__ */
|
|
1237
|
-
|
|
1238
|
-
/* @__PURE__ */
|
|
1239
|
-
/* @__PURE__ */
|
|
1819
|
+
h.videoName && !_ && /* @__PURE__ */ e("div", { className: `ecp-video-name${A ? " ecp-video-name--dark" : " ecp-video-name--light"}`, children: p }),
|
|
1820
|
+
/* @__PURE__ */ r("div", { className: `ecp-video-layout${Se ? " ecp-video-layout--col" : " ecp-video-layout--row"}${_ ? " ecp-video-layout--fullscreen" : ""}`, children: [
|
|
1821
|
+
v && he === "top" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-top", ref: B }),
|
|
1822
|
+
/* @__PURE__ */ r("div", { style: { display: "flex", flex: Se ? void 0 : 1, gap: "0.75rem" }, children: [
|
|
1823
|
+
v && he === "left" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-side", ref: B }),
|
|
1824
|
+
/* @__PURE__ */ r("div", { className: `ecp-video-el-wrap${A ? " ecp-video-el-wrap--dark" : " ecp-video-el-wrap--light"}`, children: [
|
|
1825
|
+
/* @__PURE__ */ r("video", { ref: N, className: "ecp-video-el", poster: T || void 0, children: [
|
|
1240
1826
|
s && /* @__PURE__ */ e("source", { src: s }),
|
|
1241
1827
|
"Your browser does not support the video tag."
|
|
1242
1828
|
] }),
|
|
1243
|
-
|
|
1244
|
-
/* @__PURE__ */ e("h3", { className: `ecp-video-eq-title${
|
|
1245
|
-
/* @__PURE__ */ e("div", { className: "ecp-video-eq-bands", children: ["bass", "mid", "treble"].map((n) => /* @__PURE__ */
|
|
1246
|
-
/* @__PURE__ */
|
|
1247
|
-
/* @__PURE__ */ e("span", { className:
|
|
1248
|
-
/* @__PURE__ */
|
|
1829
|
+
ye && /* @__PURE__ */ e("div", { className: "ecp-video-eq-overlay", children: /* @__PURE__ */ r("div", { className: `ecp-video-eq-panel${A ? " ecp-video-eq-panel--dark" : " ecp-video-eq-panel--light"}`, children: [
|
|
1830
|
+
/* @__PURE__ */ e("h3", { className: `ecp-video-eq-title${A ? " ecp-video-eq-title--dark" : " ecp-video-eq-title--light"}`, children: "Equalizer" }),
|
|
1831
|
+
/* @__PURE__ */ e("div", { className: "ecp-video-eq-bands", children: ["bass", "mid", "treble"].map((n) => /* @__PURE__ */ r("div", { children: [
|
|
1832
|
+
/* @__PURE__ */ r("div", { className: "ecp-video-eq-band-header", children: [
|
|
1833
|
+
/* @__PURE__ */ e("span", { className: A ? "ecp-video-eq-label--dark" : "ecp-video-eq-label--light", children: n.charAt(0).toUpperCase() + n.slice(1) }),
|
|
1834
|
+
/* @__PURE__ */ r("span", { className: A ? "ecp-video-eq-label--dark" : "ecp-video-eq-label--light", children: [
|
|
1249
1835
|
Q[n],
|
|
1250
1836
|
" dB"
|
|
1251
1837
|
] })
|
|
1252
1838
|
] }),
|
|
1253
|
-
/* @__PURE__ */
|
|
1254
|
-
/* @__PURE__ */ e("span", { className:
|
|
1839
|
+
/* @__PURE__ */ r("div", { className: "ecp-video-eq-range-row", children: [
|
|
1840
|
+
/* @__PURE__ */ e("span", { className: A ? "ecp-video-eq-bound--dark" : "ecp-video-eq-bound--light", children: "-20" }),
|
|
1255
1841
|
/* @__PURE__ */ e(
|
|
1256
1842
|
"input",
|
|
1257
1843
|
{
|
|
@@ -1259,117 +1845,122 @@ function wt({
|
|
|
1259
1845
|
min: "-20",
|
|
1260
1846
|
max: "20",
|
|
1261
1847
|
value: Q[n],
|
|
1262
|
-
onChange: (
|
|
1848
|
+
onChange: (f) => Le(n, parseInt(f.target.value)),
|
|
1263
1849
|
className: "ecp-video-eq-slider",
|
|
1264
|
-
style: {
|
|
1850
|
+
style: {
|
|
1851
|
+
background: `linear-gradient(to right, ${S} ${(Q[n] + 20) / 40 * 100}%, #e5e7eb ${(Q[n] + 20) / 40 * 100}%)`,
|
|
1852
|
+
"--thumb-color": S
|
|
1853
|
+
}
|
|
1265
1854
|
}
|
|
1266
1855
|
),
|
|
1267
|
-
/* @__PURE__ */ e("span", { className:
|
|
1856
|
+
/* @__PURE__ */ e("span", { className: A ? "ecp-video-eq-bound--dark" : "ecp-video-eq-bound--light", children: "+20" })
|
|
1268
1857
|
] })
|
|
1269
1858
|
] }, n)) }),
|
|
1270
|
-
/* @__PURE__ */
|
|
1271
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
1272
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
1859
|
+
/* @__PURE__ */ r("div", { className: "ecp-video-eq-footer", children: [
|
|
1860
|
+
/* @__PURE__ */ e("button", { onClick: $e, className: `ecp-video-eq-footer-btn${A ? " ecp-video-eq-footer-btn--dark" : " ecp-video-eq-footer-btn--light"}`, children: "Reset" }),
|
|
1861
|
+
/* @__PURE__ */ e("button", { onClick: () => X(!1), className: `ecp-video-eq-footer-btn${A ? " ecp-video-eq-footer-btn--dark" : " ecp-video-eq-footer-btn--light"}`, style: { marginLeft: "0.5rem" }, children: "Close" })
|
|
1273
1862
|
] })
|
|
1274
1863
|
] }) })
|
|
1275
1864
|
] }),
|
|
1276
|
-
|
|
1865
|
+
v && he === "right" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-side", ref: B })
|
|
1277
1866
|
] }),
|
|
1278
|
-
|
|
1867
|
+
v && he === "bottom" && /* @__PURE__ */ e("div", { className: "ecp-video-vu-bottom", ref: B })
|
|
1279
1868
|
] }),
|
|
1280
|
-
|
|
1281
|
-
/* @__PURE__ */ e("span", { className: `ecp-video-time${
|
|
1869
|
+
h.seekbar && /* @__PURE__ */ e("div", { className: `ecp-video-seekbar${_ ? " ecp-video-seekbar--fullscreen" : ""}`, children: /* @__PURE__ */ r("div", { className: "ecp-video-seekbar-row", children: [
|
|
1870
|
+
/* @__PURE__ */ e("span", { className: `ecp-video-time${A ? " ecp-video-time--dark" : " ecp-video-time--light"}`, children: ee(G) }),
|
|
1282
1871
|
/* @__PURE__ */ e(
|
|
1283
1872
|
"input",
|
|
1284
1873
|
{
|
|
1285
1874
|
type: "range",
|
|
1286
1875
|
min: "0",
|
|
1287
1876
|
max: "100",
|
|
1288
|
-
value:
|
|
1289
|
-
onChange:
|
|
1290
|
-
onMouseDown:
|
|
1291
|
-
onMouseUp:
|
|
1292
|
-
onTouchStart:
|
|
1293
|
-
onTouchEnd:
|
|
1877
|
+
value: H > 0 ? G / H * 100 : 0,
|
|
1878
|
+
onChange: Ue,
|
|
1879
|
+
onMouseDown: Be,
|
|
1880
|
+
onMouseUp: je,
|
|
1881
|
+
onTouchStart: Be,
|
|
1882
|
+
onTouchEnd: je,
|
|
1294
1883
|
disabled: !s,
|
|
1295
1884
|
className: "ecp-video-seek-input",
|
|
1296
1885
|
style: {
|
|
1297
|
-
background: s &&
|
|
1886
|
+
background: s && H > 0 ? `linear-gradient(to right, ${S} ${G / H * 100}%, #e5e7eb ${G / H * 100}%)` : "#e5e7eb",
|
|
1887
|
+
"--thumb-color": S
|
|
1298
1888
|
}
|
|
1299
1889
|
}
|
|
1300
1890
|
),
|
|
1301
|
-
/* @__PURE__ */ e("span", { className: `ecp-video-time ecp-video-time--right${
|
|
1891
|
+
/* @__PURE__ */ e("span", { className: `ecp-video-time ecp-video-time--right${A ? " ecp-video-time--dark" : " ecp-video-time--light"}`, children: ee(H) })
|
|
1302
1892
|
] }) }),
|
|
1303
|
-
/* @__PURE__ */
|
|
1304
|
-
|
|
1893
|
+
/* @__PURE__ */ r("div", { className: "ecp-video-controls", children: [
|
|
1894
|
+
h.play && /* @__PURE__ */ r(
|
|
1305
1895
|
"button",
|
|
1306
1896
|
{
|
|
1307
|
-
onClick:
|
|
1897
|
+
onClick: De,
|
|
1308
1898
|
disabled: !s,
|
|
1309
|
-
className: `ecp-video-play-btn${
|
|
1310
|
-
style: { backgroundColor:
|
|
1899
|
+
className: `ecp-video-play-btn${ae <= 400 ? " ecp-video-play-btn--compact" : ""}`,
|
|
1900
|
+
style: { backgroundColor: S },
|
|
1311
1901
|
children: [
|
|
1312
|
-
/* @__PURE__ */
|
|
1313
|
-
/* @__PURE__ */ e(
|
|
1314
|
-
/* @__PURE__ */ e(
|
|
1902
|
+
/* @__PURE__ */ r("div", { className: "ecp-video-play-icon-wrap", children: [
|
|
1903
|
+
/* @__PURE__ */ e(et, { size: 16, style: { position: "absolute", transform: U ? void 0 : "scale(0) translateY(2.5rem)", transition: "all 150ms" } }),
|
|
1904
|
+
/* @__PURE__ */ e(tt, { size: 16, style: { position: "absolute", transform: U ? "scale(0) translateY(-2.5rem)" : void 0, transition: "all 150ms" } })
|
|
1315
1905
|
] }),
|
|
1316
|
-
|
|
1906
|
+
ae > 400 && (U ? "Pause" : "Play")
|
|
1317
1907
|
]
|
|
1318
1908
|
}
|
|
1319
1909
|
),
|
|
1320
|
-
|
|
1321
|
-
|
|
1910
|
+
h.stop && /* @__PURE__ */ e("button", { onClick: We, disabled: !s, className: `ecp-video-stop-btn${A ? " ecp-video-stop-btn--dark" : " ecp-video-stop-btn--light"}`, children: /* @__PURE__ */ e(St, { size: 16 }) }),
|
|
1911
|
+
h.fullscreen && /* @__PURE__ */ r(
|
|
1322
1912
|
"button",
|
|
1323
1913
|
{
|
|
1324
|
-
onClick:
|
|
1325
|
-
className: `ecp-video-fullscreen-btn${
|
|
1914
|
+
onClick: Ve,
|
|
1915
|
+
className: `ecp-video-fullscreen-btn${A ? " ecp-video-fullscreen-btn--dark" : " ecp-video-fullscreen-btn--light"}${ae >= 800 ? " ecp-video-fullscreen-btn--wide" : ""}`,
|
|
1326
1916
|
children: [
|
|
1327
|
-
|
|
1328
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
1917
|
+
_ ? /* @__PURE__ */ e(nr, { size: 16 }) : /* @__PURE__ */ e(tr, { size: 16 }),
|
|
1918
|
+
/* @__PURE__ */ e("span", { style: { display: ae < 800 ? "none" : "block" }, children: _ ? "Exit" : "Full" })
|
|
1329
1919
|
]
|
|
1330
1920
|
}
|
|
1331
1921
|
),
|
|
1332
|
-
|
|
1922
|
+
h.equalizer && /* @__PURE__ */ r(
|
|
1333
1923
|
"button",
|
|
1334
1924
|
{
|
|
1335
|
-
onClick: () =>
|
|
1925
|
+
onClick: () => X(!ye),
|
|
1336
1926
|
disabled: !s,
|
|
1337
|
-
className: `ecp-video-eq-toggle-btn${
|
|
1338
|
-
style:
|
|
1927
|
+
className: `ecp-video-eq-toggle-btn${ye ? " ecp-video-eq-toggle-btn--on" : " ecp-video-eq-toggle-btn--off"}${ae >= 700 ? " ecp-video-eq-toggle-btn--wide" : ""}`,
|
|
1928
|
+
style: ye ? { backgroundColor: S } : {},
|
|
1339
1929
|
children: [
|
|
1340
|
-
/* @__PURE__ */ e(
|
|
1341
|
-
/* @__PURE__ */ e("span", { style: { display:
|
|
1930
|
+
/* @__PURE__ */ e(Je, { size: 16 }),
|
|
1931
|
+
/* @__PURE__ */ e("span", { style: { display: ae < 700 ? "none" : "block" }, children: "EQ" })
|
|
1342
1932
|
]
|
|
1343
1933
|
}
|
|
1344
1934
|
),
|
|
1345
|
-
|
|
1935
|
+
h.speed && /* @__PURE__ */ e("div", { className: "ecp-video-speed-wrap", children: /* @__PURE__ */ e("select", { value: Z, onChange: Xe, className: `ecp-video-speed-select${A ? " ecp-video-speed-select--dark" : " ecp-video-speed-select--light"}`, children: ["0.5", "0.75", "1", "1.25", "1.5", "2"].map((n) => /* @__PURE__ */ r("option", { value: n, className: A ? "ecp-video-speed-option--dark" : "ecp-video-speed-option--light", children: [
|
|
1346
1936
|
n,
|
|
1347
1937
|
"x"
|
|
1348
1938
|
] }, n)) }) }),
|
|
1349
|
-
|
|
1350
|
-
/* @__PURE__ */ e("button", { onClick:
|
|
1939
|
+
h.volume && /* @__PURE__ */ r("div", { className: "ecp-video-volume", children: [
|
|
1940
|
+
/* @__PURE__ */ e("button", { onClick: rt, className: "ecp-video-mute-btn", children: M || O === 0 ? /* @__PURE__ */ e(ot, { size: 20, className: A ? "ecp-video-mute-icon--dark" : "ecp-video-mute-icon--light" }) : /* @__PURE__ */ e(lt, { size: 20, className: A ? "ecp-video-mute-icon--dark" : "ecp-video-mute-icon--light" }) }),
|
|
1351
1941
|
/* @__PURE__ */ e(
|
|
1352
1942
|
"input",
|
|
1353
1943
|
{
|
|
1354
1944
|
type: "range",
|
|
1355
1945
|
min: "0",
|
|
1356
1946
|
max: "100",
|
|
1357
|
-
value:
|
|
1358
|
-
onChange:
|
|
1947
|
+
value: O,
|
|
1948
|
+
onChange: Ge,
|
|
1359
1949
|
className: "ecp-video-vol-slider",
|
|
1360
1950
|
style: {
|
|
1361
|
-
background: `linear-gradient(to right, ${
|
|
1362
|
-
|
|
1951
|
+
background: `linear-gradient(to right, ${S} ${O}%, #e5e7eb ${O}%)`,
|
|
1952
|
+
"--thumb-color": S,
|
|
1953
|
+
display: ae < 460 ? "none" : "block"
|
|
1363
1954
|
}
|
|
1364
1955
|
}
|
|
1365
1956
|
),
|
|
1366
|
-
/* @__PURE__ */
|
|
1957
|
+
/* @__PURE__ */ r(
|
|
1367
1958
|
"span",
|
|
1368
1959
|
{
|
|
1369
|
-
className: `ecp-video-vol-pct${
|
|
1370
|
-
style: { display:
|
|
1960
|
+
className: `ecp-video-vol-pct${A ? " ecp-video-vol-pct--dark" : " ecp-video-vol-pct--light"}`,
|
|
1961
|
+
style: { display: ae < 800 ? "none" : "block" },
|
|
1371
1962
|
children: [
|
|
1372
|
-
|
|
1963
|
+
O,
|
|
1373
1964
|
"%"
|
|
1374
1965
|
]
|
|
1375
1966
|
}
|
|
@@ -1382,32 +1973,32 @@ function wt({
|
|
|
1382
1973
|
}
|
|
1383
1974
|
);
|
|
1384
1975
|
}
|
|
1385
|
-
function
|
|
1386
|
-
const [s,
|
|
1387
|
-
return /* @__PURE__ */ e("div", { className: "ecp-page-wrapper", style: { backgroundColor:
|
|
1388
|
-
|
|
1389
|
-
/* @__PURE__ */
|
|
1390
|
-
/* @__PURE__ */
|
|
1391
|
-
/* @__PURE__ */
|
|
1392
|
-
/* @__PURE__ */ e("h1", { className: `ecp-demo-title${
|
|
1976
|
+
function Nr() {
|
|
1977
|
+
const [s, p] = b(null), [v, y] = b("No track loaded"), [T, h] = b("purple"), [q, te] = b(!1), [R, S] = b(!1), [V, U] = b("light"), a = u(null);
|
|
1978
|
+
return /* @__PURE__ */ e("div", { className: "ecp-page-wrapper", style: { backgroundColor: V === "dark" ? "#222" : "white" }, children: /* @__PURE__ */ r("div", { className: "ecp-demo-container", children: [
|
|
1979
|
+
q && /* @__PURE__ */ e(hr, { theme: T, setTheme: h, close: () => te(!1) }),
|
|
1980
|
+
/* @__PURE__ */ r("div", { className: "ecp-container-glass", children: [
|
|
1981
|
+
/* @__PURE__ */ r("div", { className: "ecp-demo-header", children: [
|
|
1982
|
+
/* @__PURE__ */ r("div", { children: [
|
|
1983
|
+
/* @__PURE__ */ e("h1", { className: `ecp-demo-title${V === "dark" ? " ecp-demo-title--dark" : ""}`, children: "Audio Visualizer" }),
|
|
1393
1984
|
/* @__PURE__ */ e("p", { className: "ecp-demo-subtitle", children: "Professional frequency analyzer" })
|
|
1394
1985
|
] }),
|
|
1395
|
-
/* @__PURE__ */
|
|
1986
|
+
/* @__PURE__ */ r("button", { onClick: () => te(!q), className: "ecp-theme-btn", children: [
|
|
1396
1987
|
/* @__PURE__ */ e("span", { children: "🎨" }),
|
|
1397
1988
|
" Themes"
|
|
1398
1989
|
] })
|
|
1399
1990
|
] }),
|
|
1400
1991
|
/* @__PURE__ */ e(
|
|
1401
|
-
|
|
1992
|
+
mr,
|
|
1402
1993
|
{
|
|
1403
1994
|
audio: s || void 0,
|
|
1404
|
-
name:
|
|
1995
|
+
name: v || void 0,
|
|
1405
1996
|
author: "K.Prabhasha",
|
|
1406
|
-
theme:
|
|
1997
|
+
theme: T,
|
|
1407
1998
|
autoPlay: !1,
|
|
1408
1999
|
thumbnail: "https://cdn-icons-png.flaticon.com/512/3845/3845874.png",
|
|
1409
|
-
mode:
|
|
1410
|
-
transparent:
|
|
2000
|
+
mode: V,
|
|
2001
|
+
transparent: R,
|
|
1411
2002
|
volume: 70,
|
|
1412
2003
|
controls: {
|
|
1413
2004
|
play: !0,
|
|
@@ -1421,7 +2012,7 @@ function Nt() {
|
|
|
1421
2012
|
}
|
|
1422
2013
|
),
|
|
1423
2014
|
/* @__PURE__ */ e(
|
|
1424
|
-
|
|
2015
|
+
fr,
|
|
1425
2016
|
{
|
|
1426
2017
|
audio: s || "",
|
|
1427
2018
|
width: 400,
|
|
@@ -1432,7 +2023,7 @@ function Nt() {
|
|
|
1432
2023
|
}
|
|
1433
2024
|
),
|
|
1434
2025
|
/* @__PURE__ */ e(
|
|
1435
|
-
|
|
2026
|
+
gr,
|
|
1436
2027
|
{
|
|
1437
2028
|
audio: s || "",
|
|
1438
2029
|
thumbnail: "https://cdn-icons-png.flaticon.com/512/17524/17524837.png",
|
|
@@ -1441,37 +2032,37 @@ function Nt() {
|
|
|
1441
2032
|
background: "#c0ffefff"
|
|
1442
2033
|
}
|
|
1443
2034
|
),
|
|
1444
|
-
/* @__PURE__ */
|
|
1445
|
-
/* @__PURE__ */ e("input", { type: "file", ref:
|
|
1446
|
-
var
|
|
1447
|
-
const
|
|
1448
|
-
if (
|
|
1449
|
-
const
|
|
1450
|
-
|
|
2035
|
+
/* @__PURE__ */ r("div", { className: "ecp-demo-actions", children: [
|
|
2036
|
+
/* @__PURE__ */ e("input", { type: "file", ref: a, onChange: (H) => {
|
|
2037
|
+
var O;
|
|
2038
|
+
const Y = (O = H.target.files) == null ? void 0 : O[0];
|
|
2039
|
+
if (Y) {
|
|
2040
|
+
const z = URL.createObjectURL(Y);
|
|
2041
|
+
p(z), y(Y.name);
|
|
1451
2042
|
}
|
|
1452
2043
|
}, accept: "audio/*", className: "ecp-file-input-hidden" }),
|
|
1453
|
-
/* @__PURE__ */
|
|
1454
|
-
var
|
|
1455
|
-
return (
|
|
2044
|
+
/* @__PURE__ */ r("button", { onClick: () => {
|
|
2045
|
+
var H;
|
|
2046
|
+
return (H = a.current) == null ? void 0 : H.click();
|
|
1456
2047
|
}, className: "ecp-action-btn", children: [
|
|
1457
|
-
/* @__PURE__ */ e(
|
|
2048
|
+
/* @__PURE__ */ e(dr, { size: 16 }),
|
|
1458
2049
|
"Load Audio"
|
|
1459
2050
|
] }),
|
|
1460
|
-
/* @__PURE__ */ e("button", { onClick: () =>
|
|
1461
|
-
/* @__PURE__ */
|
|
2051
|
+
/* @__PURE__ */ e("button", { onClick: () => U(V === "dark" ? "light" : "dark"), className: "ecp-action-btn", children: V === "dark" ? "Light" : "Dark" }),
|
|
2052
|
+
/* @__PURE__ */ r("button", { onClick: () => S(!R), className: "ecp-action-btn", children: [
|
|
1462
2053
|
"Transparent: ",
|
|
1463
|
-
String(
|
|
2054
|
+
String(R)
|
|
1464
2055
|
] })
|
|
1465
2056
|
] })
|
|
1466
2057
|
] })
|
|
1467
2058
|
] }) });
|
|
1468
2059
|
}
|
|
1469
2060
|
export {
|
|
1470
|
-
|
|
1471
|
-
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
2061
|
+
Nr as DemoVisualizePlayer,
|
|
2062
|
+
gr as NanoAudioPlayer,
|
|
2063
|
+
hr as ThemeSelector,
|
|
2064
|
+
qr as VideoPlayer,
|
|
2065
|
+
mr as VisualizePlayer,
|
|
2066
|
+
fr as WaveAudioPlayer,
|
|
2067
|
+
Ae as themes
|
|
1477
2068
|
};
|