twist-aplayer
Version:
A shadui theme aplayer
43 lines (42 loc) • 39 kB
JavaScript
(function(V,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("react"),require("./styles/main.scss")):typeof define=="function"&&define.amd?define(["exports","react","./styles/main.scss"],i):(V=typeof globalThis<"u"?globalThis:V||self,i(V.TwistAPlayer={},V.React))})(this,function(V,i){"use strict";function $e(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const D=$e(i);var ee={exports:{}},U={};/**
* @license React
* react-jsx-runtime.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var he;function ke(){if(he)return U;he=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,s){var m=null;if(s!==void 0&&(m=""+s),a.key!==void 0&&(m=""+a.key),"key"in a){s={};for(var p in a)p!=="key"&&(s[p]=a[p])}else s=a;return a=s.ref,{$$typeof:e,type:n,key:m,ref:a!==void 0?a:null,props:s}}return U.Fragment=t,U.jsx=r,U.jsxs=r,U}var W={},ye;function Me(){if(ye)return W;ye=1;var e={};/**
* @license React
* react-jsx-runtime.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/return e.NODE_ENV!=="production"&&function(){function t(o){if(o==null)return null;if(typeof o=="function")return o.$$typeof===fe?null:o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case c:return"Fragment";case w:return"Profiler";case y:return"StrictMode";case k:return"Suspense";case P:return"SuspenseList";case ae:return"Activity"}if(typeof o=="object")switch(typeof o.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),o.$$typeof){case u:return"Portal";case T:return(o.displayName||"Context")+".Provider";case S:return(o._context.displayName||"Context")+".Consumer";case $:var E=o.render;return o=o.displayName,o||(o=E.displayName||E.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case z:return E=o.displayName||null,E!==null?E:t(o.type)||"Memo";case O:E=o._payload,o=o._init;try{return t(o(E))}catch{}}return null}function r(o){return""+o}function n(o){try{r(o);var E=!1}catch{E=!0}if(E){E=console;var _=E.error,L=typeof Symbol=="function"&&Symbol.toStringTag&&o[Symbol.toStringTag]||o.constructor.name||"Object";return _.call(E,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",L),r(o)}}function a(o){if(o===c)return"<>";if(typeof o=="object"&&o!==null&&o.$$typeof===O)return"<...>";try{var E=t(o);return E?"<"+E+">":"<...>"}catch{return"<...>"}}function s(){var o=K.A;return o===null?null:o.getOwner()}function m(){return Error("react-stack-top-frame")}function p(o){if(ue.call(o,"key")){var E=Object.getOwnPropertyDescriptor(o,"key").get;if(E&&E.isReactWarning)return!1}return o.key!==void 0}function l(o,E){function _(){H||(H=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",E))}_.isReactWarning=!0,Object.defineProperty(o,"key",{get:_,configurable:!0})}function d(){var o=t(this.type);return Q[o]||(Q[o]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),o=this.props.ref,o!==void 0?o:null}function v(o,E,_,L,I,M,me,ve){return _=M.ref,o={$$typeof:b,type:o,key:E,props:M,_owner:I},(_!==void 0?_:null)!==null?Object.defineProperty(o,"ref",{enumerable:!1,get:d}):Object.defineProperty(o,"ref",{enumerable:!1,value:null}),o._store={},Object.defineProperty(o._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(o,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(o,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:me}),Object.defineProperty(o,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ve}),Object.freeze&&(Object.freeze(o.props),Object.freeze(o)),o}function h(o,E,_,L,I,M,me,ve){var N=E.children;if(N!==void 0)if(L)if(de(N)){for(L=0;L<N.length;L++)g(N[L]);Object.freeze&&Object.freeze(N)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else g(N);if(ue.call(E,"key")){N=t(o);var F=Object.keys(E).filter(function($t){return $t!=="key"});L=0<F.length?"{key: someKey, "+F.join(": ..., ")+": ...}":"{key: someKey}",Y[N+L]||(F=0<F.length?"{"+F.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
let props = %s;
<%s {...props} />
React keys must be passed directly to JSX without using spread:
let props = %s;
<%s key={someKey} {...props} />`,L,N,F,N),Y[N+L]=!0)}if(N=null,_!==void 0&&(n(_),N=""+_),p(E)&&(n(E.key),N=""+E.key),"key"in E){_={};for(var be in E)be!=="key"&&(_[be]=E[be])}else _=E;return N&&l(_,typeof o=="function"?o.displayName||o.name||"Unknown":o),v(o,N,M,I,s(),_,me,ve)}function g(o){typeof o=="object"&&o!==null&&o.$$typeof===b&&o._store&&(o._store.validated=1)}var x=i,b=Symbol.for("react.transitional.element"),u=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),y=Symbol.for("react.strict_mode"),w=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),T=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),O=Symbol.for("react.lazy"),ae=Symbol.for("react.activity"),fe=Symbol.for("react.client.reference"),K=x.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ue=Object.prototype.hasOwnProperty,de=Array.isArray,X=console.createTask?console.createTask:function(){return null};x={"react-stack-bottom-frame":function(o){return o()}};var H,Q={},Z=x["react-stack-bottom-frame"].bind(x,m)(),C=X(a(m)),Y={};W.Fragment=c,W.jsx=function(o,E,_,L,I){var M=1e4>K.recentlyCreatedOwnerStacks++;return h(o,E,_,!1,L,I,M?Error("react-stack-top-frame"):Z,M?X(a(o)):C)},W.jsxs=function(o,E,_,L,I){var M=1e4>K.recentlyCreatedOwnerStacks++;return h(o,E,_,!0,L,I,M?Error("react-stack-top-frame"):Z,M?X(a(o)):C)}}(),W}var pe;function qe(){if(pe)return ee.exports;pe=1;var e={};return e.NODE_ENV==="production"?ee.exports=ke():ee.exports=Me(),ee.exports}var f=qe(),te=e=>`--${e}`,ge=e=>`var(--${e})`,Ee=(e,t)=>`--${e}: ${t};`;function Ie(e,t){const r=n=>t;return{b:()=>`${r()}-${e}`,be:n=>`${r()}-${e}__${n}`,bm:n=>`${r()}-${e}--${n}`,bem:(n,a)=>`${r()}-${e}__${n}--${a}`,bs:n=>`${r()}-${e}-${n}`,ns:n=>`${r()}-${n}`,cb:()=>`.${r()}-${e}`,cbe:n=>`.${r()}-${e}__${n}`,cbm:n=>`.${r()}-${e}--${n}`,cbem:(n,a)=>`.${r()}-${e}__${n}--${a}`,cbs:n=>`.${r()}-${e}-${n}`,cns:n=>`.${r()}-${n}`,cv:n=>te(`${r()}-${e}-${n}`),cvm:(n,a={})=>{const s=r();for(const m of Object.keys(n))a[te(`${s}-${e}-${m}`)]=n[m];return a},gcv:n=>ge(`${r()}-${e}-${n}`),scv:(n,a)=>Ee(`${r()}-${e}-${n}`,a),nv:n=>te(`${r()}-${n}`),nvm:(n,a={})=>{const s=r();for(const m of Object.keys(n))a[te(`${s}-${m}`)]=n[m];return a},gnv:n=>ge(`${r()}-${n}`),snv:(n,a)=>Ee(`${r()}-${n}`,a)}}function q(e){return i.useMemo(()=>Ie(e,"twist"),[e])}var xe={color:void 0,size:void 0,className:void 0,style:void 0,attrs:void 0},oe=D.createContext(xe);oe.Provider;function G(e){"@babel/helpers - typeof";return G=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(e)}var Ve=["attrs","size","title","spin","rotate","color"];function Re(e,t){return Be(e)||De(e,t)||Se(e,t)||ze()}function ze(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function De(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,a,s,m,p=[],l=!0,d=!1;try{if(s=(r=r.call(e)).next,t!==0)for(;!(l=(n=s.call(r)).done)&&(p.push(n.value),p.length!==t);l=!0);}catch(v){d=!0,a=v}finally{try{if(!l&&r.return!=null&&(m=r.return(),Object(m)!==m))return}finally{if(d)throw a}}return p}}function Be(e){if(Array.isArray(e))return e}function He(e,t){var r=typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=Se(e))||t){r&&(e=r);var n=0,a=function(){};return{s:a,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(d){throw d},f:a}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var s,m=!0,p=!1;return{s:function(){r=r.call(e)},n:function(){var d=r.next();return m=d.done,d},e:function(d){p=!0,s=d},f:function(){try{m||r.return==null||r.return()}finally{if(p)throw s}}}}function Se(e,t){if(e){if(typeof e=="string")return Te(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Te(e,t):void 0}}function Te(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function re(){return re=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)({}).hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},re.apply(null,arguments)}function _e(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function J(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?_e(Object(r),!0).forEach(function(n){Ye(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_e(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ye(e,t,r){return(t=Fe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Fe(e){var t=Ue(e,"string");return G(t)=="symbol"?t:t+""}function Ue(e,t){if(G(e)!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(G(n)!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function We(e,t){if(e==null)return{};var r,n,a=Ge(e,t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(n=0;n<s.length;n++)r=s[n],t.includes(r)||{}.propertyIsEnumerable.call(e,r)&&(a[r]=e[r])}return a}function Ge(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.includes(n))continue;r[n]=e[n]}return r}function Je(e){var t=e.attrs,r=e.size,n=e.title,a=e.spin,s=e.rotate,m=e.color,p=We(e,Ve),l=function(v){var h=r||v.size||"1em",g,x="",b="";return v.className&&(g=v.className),e.className&&(g=g?"".concat(g," ").concat(e.className):e.className),a&&(g?g+=" twist-icon-loading":g="twist-icon-loading"),s&&(x="rotate(".concat(s,"deg)"),b="rotate(".concat(s,"deg)")),D.createElement("svg",re({xmlns:"http://www.w3.org/2000/svg"},v.attrs,t,p,{className:g,style:J(J({color:m||v.color,msTransform:x,transform:b},v.style),e.style),width:h,height:h}),n&&D.createElement("title",null,n),e.children)};return oe!==void 0?D.createElement(oe.Consumer,null,function(d){return l(d)}):l(xe)}function Ke(e){var t={},r=e.split(";"),n=He(r),a;try{for(n.s();!(a=n.n()).done;){var s=a.value,m=s.split(":"),p=Re(m,2),l=p[0],d=p[1];if(l&&d){var v=l.trim().replace(/-./g,function(h){return h.charAt(1).toUpperCase()});t[v]=d.trim()}}}catch(h){n.e(h)}finally{n.f()}return t}function je(e){return e&&e.map(function(t,r){return D.createElement(t.tag,J(J({},t.attrs),{},{key:r,style:t.attrs.style?Ke(t.attrs.style):null}),je(t.children))})}function A(e){return function(t){return D.createElement(Je,re({attrs:J({},e.attrs)},t),je(e.children))}}function Xe(e){return A({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M485.6 249.9L198.2 498c-8.3 7.1-8.3 20.8 0 27.9l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9m320 0L518.2 498a18.6 18.6 0 0 0-6.2 14c0 5.2 2.1 10.4 6.2 14l287.4 248.2c10.7 9.2 26.4.9 26.4-14V263.8c0-14.8-15.7-23.2-26.4-13.9"}}]})(e)}function Qe(e){return A({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M825.8 498L538.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L825.8 526c8.3-7.2 8.3-20.8 0-28m-320 0L218.4 249.9c-10.7-9.2-26.4-.9-26.4 14v496.3c0 14.9 15.7 23.2 26.4 14L505.8 526c4.1-3.6 6.2-8.8 6.2-14s-2.1-10.4-6.2-14"}}]})(e)}function Ze(e){return A({attrs:{viewBox:"0 0 1024 1024"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M512 1024c-69.1 0-136.2-13.5-199.3-40.2C251.7 958 197 921 150 874S66 772.3 40.2 711.3C13.5 648.2 0 581.1 0 512c0-19.9 16.1-36 36-36s36 16.1 36 36c0 59.4 11.6 117 34.6 171.3c22.2 52.4 53.9 99.5 94.3 139.9s87.5 72.2 139.9 94.3C395 940.4 452.6 952 512 952s117-11.6 171.3-34.6c52.4-22.2 99.5-53.9 139.9-94.3s72.2-87.5 94.3-139.9C940.4 629 952 571.4 952 512s-11.6-117-34.6-171.3a440.5 440.5 0 0 0-94.3-139.9a437.7 437.7 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.2C772.3 66 827 103 874 150s83.9 101.8 109.7 162.7c26.7 63.1 40.2 130.2 40.2 199.3s-13.5 136.2-40.2 199.3C958 772.3 921 827 874 874s-101.8 83.9-162.7 109.7c-63.1 26.8-130.2 40.3-199.3 40.3"}}]})(e)}function et(e){return A({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{d:"M294.1 256L167 129c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.3 34 0L345 239c9.1 9.1 9.3 23.7.7 33.1L201.1 417c-4.7 4.7-10.9 7-17 7s-12.3-2.3-17-7c-9.4-9.4-9.4-24.6 0-33.9l127-127.1z",fill:"currentColor"}}]})(e)}function tt(e){return A({attrs:{viewBox:"0 0 512 512"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M208 432h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16m144 0h-48a16 16 0 0 1-16-16V96a16 16 0 0 1 16-16h48a16 16 0 0 1 16 16v320a16 16 0 0 1-16 16"}}]})(e)}function rt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M3 6h18v2H3zm0 5h18v2H3zm0 5h18v2H3z"}}]})(e)}function nt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M2 5.27L3.28 4L20 20.72L18.73 22l-3-3H7v3l-4-4l4-4v3h6.73L7 10.27V11H5V8.27zM17 13h2v4.18l-2-2zm0-8V2l4 4l-4 4V7H8.82l-2-2z"}}]})(e)}function at(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m17 3l5.25 4.5L17 12l5.25 4.5L17 21v-3h-2.74l-2.82-2.82l2.12-2.12L15.5 15H17V9h-1.5l-9 9H2v-3h3.26l9-9H17zM2 6h4.5l2.82 2.82l-2.12 2.12L5.26 9H2z"}}]})(e)}function ut(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M16.15 13H5q-.425 0-.712-.288T4 12t.288-.712T5 11h11.15L13.3 8.15q-.3-.3-.288-.7t.288-.7q.3-.3.713-.312t.712.287L19.3 11.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-4.575 4.575q-.3.3-.712.288t-.713-.313q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function ot(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M10.5 17q1.05 0 1.775-.725T13 14.5V9h3V7h-4v5.5q-.325-.225-.7-.363T10.5 12q-1.05 0-1.775.725T8 14.5t.725 1.775T10.5 17M4 20q-.825 0-1.412-.587T2 18V6q0-.825.588-1.412T4 4h16q.825 0 1.413.588T22 6v12q0 .825-.587 1.413T20 20z"}}]})(e)}function st(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M14 19V5h4v14zm-8 0V5h4v14z"}}]})(e)}function it(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M8 17.175V6.825q0-.425.3-.713t.7-.287q.125 0 .263.037t.262.113l8.15 5.175q.225.15.338.375t.112.475t-.112.475t-.338.375l-8.15 5.175q-.125.075-.262.113T9 18.175q-.4 0-.7-.288t-.3-.712"}}]})(e)}function lt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M11.5 10.5h-.75q-.325 0-.537-.213T10 9.75t.213-.537T10.75 9H12q.425 0 .713.288T13 10v4.25q0 .325-.213.538T12.25 15t-.537-.213t-.213-.537zM6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function ct(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"m6.85 19l.85.85q.3.3.288.7t-.288.7q-.3.3-.712.313t-.713-.288L3.7 18.7q-.15-.15-.213-.325T3.426 18t.063-.375t.212-.325l2.575-2.575q.3-.3.713-.287t.712.312q.275.3.288.7t-.288.7l-.85.85H17v-3q0-.425.288-.712T18 13t.713.288T19 14v3q0 .825-.587 1.413T17 19zm10.3-12H7v3q0 .425-.288.713T6 11t-.712-.288T5 10V7q0-.825.588-1.412T7 5h10.15l-.85-.85q-.3-.3-.288-.7t.288-.7q.3-.3.712-.312t.713.287L20.3 5.3q.15.15.213.325t.062.375t-.062.375t-.213.325l-2.575 2.575q-.3.3-.712.288T16.3 9.25q-.275-.3-.288-.7t.288-.7z"}}]})(e)}function ft(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M9 15H6q-.425 0-.712-.288T5 14v-4q0-.425.288-.712T6 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T12.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.512.013T16 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2"}}]})(e)}function dt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M7 15V9h4l5-5v16l-5-5z"}}]})(e)}function mt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M19 11.975q0-2.075-1.1-3.787t-2.95-2.563q-.375-.175-.55-.537t-.05-.738q.15-.4.538-.575t.787 0Q18.1 4.85 19.55 7.063T21 11.974t-1.45 4.913t-3.875 3.287q-.4.175-.788 0t-.537-.575q-.125-.375.05-.737t.55-.538q1.85-.85 2.95-2.562t1.1-3.788M7 15H4q-.425 0-.712-.288T3 14v-4q0-.425.288-.712T4 9h3l3.3-3.3q.475-.475 1.088-.213t.612.938v11.15q0 .675-.612.938T10.3 18.3zm9.5-3q0 1.05-.475 1.988t-1.25 1.537q-.25.15-.513.013T14 15.1V8.85q0-.3.263-.437t.512.012q.775.625 1.25 1.575t.475 2"}}]})(e)}function vt(e){return A({attrs:{viewBox:"0 0 24 24"},children:[{tag:"path",attrs:{fill:"currentColor",d:"M18.25 12L8.5 17.629V6.37z"}}]})(e)}function se(e,t){if(!t.current)return 0;let r=(e.clientX-t.current.getBoundingClientRect().left)/t.current.clientWidth;return r=Math.max(r,0),r=Math.min(r,1),r=Math.floor(r*100)/100,r}function ie(e,t){if(!t.current)return 0;let r=1-(e.clientY-t.current.getBoundingClientRect().top)/t.current.clientHeight;return r=Math.max(r,0),r=Math.min(r,1),r=Math.floor(r*100)/100,r}function we(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=we(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function j(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=we(e))&&(n&&(n+=" "),n+=t);return n}function bt({bufferedPercentage:e,playedPercentage:t,onSeek:r}){const n=q("aplayer-bar"),a=q("aplayer-icon"),s=i.useRef(null),[m,p]=i.useState(t),l=i.useRef(!1);i.useEffect(()=>{l.current||p(t)},[t]);const d=i.useCallback(v=>{l.current=!0;const h=se(v,s);p(h);const g=b=>{const u=se(b,s);p(u)},x=b=>{document.removeEventListener("mousemove",g),document.removeEventListener("mouseup",x);const u=se(b,s);p(u),r==null||r(u),l.current=!1};document.addEventListener("mousemove",g),document.addEventListener("mouseup",x)},[r]);return f.jsx("div",{ref:s,className:j(n.b(),n.bs("vars")),onMouseDown:d,role:"slider","aria-label":"Audio progress","aria-valuenow":m?m*100:0,"aria-valuemin":0,"aria-valuemax":100,"aria-live":"polite",children:f.jsxs("div",{className:n.be("inner"),children:[typeof e<"u"?f.jsx("div",{className:n.be("loaded"),style:{width:`${e*100}%`}}):null,typeof m<"u"?f.jsx("div",{className:n.be("played"),style:{width:`${m*100}%`},children:f.jsx("span",{className:n.be("thumb"),children:f.jsx("span",{className:j(a.bs("loading")),children:f.jsx(Ze,{})})})}):null]})})}function ht({volume:e,muted:t,onToggleMuted:r,onChangeVolume:n}){const a=q("aplayer-volumn"),s=q("aplayer-icon"),m=i.useRef(null),[p,l]=i.useState(!1),d=i.useCallback(v=>{n(ie(v,m)),l(!0);const h=x=>{n(ie(x,m))},g=x=>{document.removeEventListener("mouseup",g),document.removeEventListener("mousemove",h),l(!1),n(ie(x,m))};document.addEventListener("mousemove",h),document.addEventListener("mouseup",g)},[n]);return f.jsxs("div",{className:j(a.b(),a.bs("vars")),children:[f.jsx("button",{type:"button",className:j(s.b(),s.bs("volume-down")),onClick:()=>r(),"aria-label":t||!e?"Muted":"unMuted",children:t||!e?f.jsx(dt,{}):e>=1?f.jsx(mt,{}):f.jsx(ft,{})}),f.jsx("div",{className:j(a.be("bar-wrap"),{[a.bem("bar-wrap","active")]:p}),ref:m,onMouseDown:d,children:f.jsx("div",{className:a.be("bar"),children:f.jsx("div",{className:a.be("thumb"),style:{height:t?0:`${e*100}%`}})})})]})}function Oe(e){if(typeof e>"u")return"--:--";if(Number.isNaN(e))return"00:00";const t=m=>m<10?`0${m}`:`${m}`,r=Math.trunc(e/60),n=Math.trunc(e-r*60),a=Math.trunc(r/60),s=Math.trunc(e/60-60*Math.trunc(e/60/60));return e>=3600?`${t(a)}:${t(s)}:${t(n)}`:`${t(r)}:${t(n)}`}function yt({volume:e,onChangeVolume:t,muted:r,currentTime:n,audioDurationSeconds:a,bufferedSeconds:s,onToggleMenu:m,onToggleMuted:p,order:l,onOrderChange:d,loop:v,onLoopChange:h,onSeek:g,isPlaying:x,onTogglePlay:b,onSkipForward:u,onSkipBack:c,showLyrics:y=!0,onToggleLyrics:w}){const S=q("aplayer-controller"),T=q("aplayer-icon"),$=i.useCallback(()=>{const P={list:"random",random:"list"}[l];d(P)},[l,d]),k=i.useCallback(()=>{const P={all:"one",one:"none",none:"all"}[v];h(P)},[v,h]);return f.jsxs("div",{className:j(S.b(),S.bs("vars")),role:"group","aria-label":"Audio Controls",children:[f.jsx(bt,{playedPercentage:typeof n>"u"||typeof a>"u"?void 0:n/a,bufferedPercentage:typeof s>"u"||typeof a>"u"?void 0:s/a,onSeek:P=>g==null?void 0:g(P*a)}),f.jsxs("div",{className:S.be("time"),children:[f.jsxs("span",{className:S.be("time-inner"),"aria-live":"polite",children:[f.jsx("span",{className:S.be("ptime"),children:Oe(n)})," / ",f.jsx("span",{className:S.be("dtime"),children:Oe(a)})]}),f.jsx("button",{className:j(T.b(),T.bs("back")),onClick:c,type:"button","aria-label":"Previous track",children:f.jsx(Xe,{})}),f.jsx("button",{className:j(T.b(),T.bs("play")),onClick:b,type:"button","aria-label":x?"Pause audio":"Play audio",children:x?f.jsx(st,{}):f.jsx(it,{})}),f.jsx("button",{className:j(T.b(),T.bs("forward")),onClick:u,type:"button","aria-label":"Next track",children:f.jsx(Qe,{})}),f.jsx(ht,{volume:e,muted:r,onToggleMuted:p,onChangeVolume:t}),f.jsx("button",{className:j(T.b(),T.bs("order")),onClick:$,type:"button","aria-label":`Playback order: ${l}`,children:{list:f.jsx(ut,{}),random:f.jsx(at,{})}[l]}),f.jsx("button",{className:j(T.b(),T.bs("order")),onClick:k,type:"button","aria-label":`Loop mode: ${v}`,children:{all:f.jsx(ct,{}),one:f.jsx(lt,{}),none:f.jsx(nt,{})}[v]}),f.jsx("button",{type:"button",className:j(T.b(),T.bs("menu")),onClick:()=>m==null?void 0:m(),"aria-label":"Toggle playlist menu",children:f.jsx(rt,{})}),f.jsx("button",{type:"button",className:j(T.b(),T.bs("lrc"),{[T.ns("lrc-inactivity")]:!y}),onClick:w,"aria-label":y?"Hide lyrics":"Show lyrics","aria-pressed":y,children:f.jsx(ot,{})})]})]})}function pt({open:e,audio:t,playingAudioUrl:r,onPlayAudio:n,listMaxHeight:a}){const s=q("aplayer-list"),m=a?{maxHeight:a}:void 0,p=i.useCallback(d=>d?typeof d=="string"?d:d.name??"Audio artist":"Audio artist",[]),l=i.useRef(null);return i.useEffect(()=>{if(l.current){const d=l.current;return d.style.maxHeight=`${Math.min(d.scrollHeight,a??1/0)}px`,()=>{d.removeAttribute("style")}}},[a]),f.jsx("div",{ref:l,className:j(s.b(),{[s.bm("hide")]:!e,[s.bs("vars")]:!0}),"aria-label":"Audio playlist","aria-live":"polite",children:f.jsx("ol",{style:m,children:t.map((d,v)=>f.jsxs("li",{className:j({[s.bm("active")]:d.url===r}),onClick:()=>{d.url!==r&&(n==null||n(d))},role:"button","aria-label":`${d.name??"Audio name"} by ${p(d.artist)}}`,children:[f.jsx("span",{className:s.be("cur")}),f.jsx("span",{className:s.be("index"),children:v+1}),f.jsx("span",{className:s.be("title"),children:d.name??"Audio name"}),f.jsx("span",{className:s.be("author"),children:p(d.artist)})]},d.name||v))})})}function Le({show:e,lrcText:t,currentTime:r}){const n=q("aplayer-lrc"),a=i.useMemo(()=>gt(t),[t]),s=i.useMemo(()=>{for(let p=0;p<a.length;p++){const l=a[p],d=a[p+1];if(r>=l[0]&&(!d||r<d[0]))return p}return 0},[r,a]),m=i.useMemo(()=>({transform:`translateY(${-s*16}px)`,WebkitTransform:`translateY(${-s*16}px)`}),[s]);return f.jsx("div",{className:j(n.b(),{[n.bm("hide")]:!e}),children:t?f.jsx("div",{className:n.be("contents"),style:m,children:a.map(([,p],l)=>f.jsx("p",{className:j({[n.be("current")]:l===s}),children:p},l))}):null})}function gt(e){if(e){e=e.replace(/([^\]^\n])\[/g,(a,s)=>`${s}
[`);const t=e.split(`
`),r=[],n=t.length;for(let a=0;a<n;a++){const s=t[a].match(/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g),m=t[a].replace(/.*\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/g,"").replace(/<(\d{2}):(\d{2})(\.(\d{2,3}))?>/g,"").replace(/^\s+|\s+$/g,"");if(s){const p=s.length;for(let l=0;l<p;l++){const d=/\[(\d{2}):(\d{2})(\.(\d{2,3}))?\]/.exec(s[l]),v=d[1]*60,h=Number.parseInt(d[2]),g=d[4]?Number.parseInt(d[4])/(`${d[4]}`.length===2?100:1e3):0,x=v+h+g;r.push([x,m])}}}return r.sort((a,s)=>a[0]-s[0]),r}else return[]}var ne={exports:{}},le={};/**
* @license React
* use-sync-external-store-shim.production.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/var Ae;function Et(){if(Ae)return le;Ae=1;var e=i;function t(h,g){return h===g&&(h!==0||1/h===1/g)||h!==h&&g!==g}var r=typeof Object.is=="function"?Object.is:t,n=e.useState,a=e.useEffect,s=e.useLayoutEffect,m=e.useDebugValue;function p(h,g){var x=g(),b=n({inst:{value:x,getSnapshot:g}}),u=b[0].inst,c=b[1];return s(function(){u.value=x,u.getSnapshot=g,l(u)&&c({inst:u})},[h,x,g]),a(function(){return l(u)&&c({inst:u}),h(function(){l(u)&&c({inst:u})})},[h]),m(x),x}function l(h){var g=h.getSnapshot;h=h.value;try{var x=g();return!r(h,x)}catch{return!0}}function d(h,g){return g()}var v=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:p;return le.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:v,le}var ce={},Pe;function xt(){if(Pe)return ce;Pe=1;var e={};/**
* @license React
* use-sync-external-store-shim.development.js
*
* Copyright (c) Meta Platforms, Inc. and affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/return e.NODE_ENV!=="production"&&function(){function t(b,u){return b===u&&(b!==0||1/b===1/u)||b!==b&&u!==u}function r(b,u){h||s.startTransition===void 0||(h=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var c=u();if(!g){var y=u();m(c,y)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),g=!0)}y=p({inst:{value:c,getSnapshot:u}});var w=y[0].inst,S=y[1];return d(function(){w.value=c,w.getSnapshot=u,n(w)&&S({inst:w})},[b,c,u]),l(function(){return n(w)&&S({inst:w}),b(function(){n(w)&&S({inst:w})})},[b]),v(c),c}function n(b){var u=b.getSnapshot;b=b.value;try{var c=u();return!m(b,c)}catch{return!0}}function a(b,u){return u()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var s=i,m=typeof Object.is=="function"?Object.is:t,p=s.useState,l=s.useEffect,d=s.useLayoutEffect,v=s.useDebugValue,h=!1,g=!1,x=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?a:r;ce.useSyncExternalStore=s.useSyncExternalStore!==void 0?s.useSyncExternalStore:x,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}(),ce}var Ne;function St(){if(Ne)return ne.exports;Ne=1;var e={};return e.NODE_ENV==="production"?ne.exports=Et():ne.exports=xt(),ne.exports}var R=St();const B=[];function Tt(e){const t=i.useRef(null);return i.useEffect(()=>{if(typeof window<"u"&&!t.current){const r=t.current=document.createElement("audio");typeof(e==null?void 0:e.src)<"u"&&(r.src=e.src),typeof(e==null?void 0:e.autoPlay)<"u"&&(r.autoplay=e.autoPlay),typeof(e==null?void 0:e.initialVolume)<"u"&&(r.volume=e.initialVolume),B.includes(r)||B.push(r)}},[e==null?void 0:e.autoPlay,e==null?void 0:e.initialVolume,e==null?void 0:e.src]),i.useEffect(()=>{if(typeof window>"u")return;const r=t.current;if(r&&(e!=null&&e.onError))return r.addEventListener("error",e.onError),()=>{r.removeEventListener("error",e.onError)}},[e==null?void 0:e.onError]),i.useEffect(()=>{if(typeof window>"u")return;const r=t.current;if(r&&(e!=null&&e.onEnded))return r.addEventListener("ended",e.onEnded),()=>{r.removeEventListener("ended",e.onEnded)}},[e==null?void 0:e.onEnded]),i.useEffect(()=>()=>{const r=t.current;if(r){r.pause(),r.currentTime=0;const n=B.indexOf(r);n!==-1&&B.splice(n,1)}t.current=null},[]),t}function _t(e){const t=Tt(e),r=i.useCallback(u=>{for(let c=0;c<B.length;c++){const y=B[c];y!==u&&!y.paused&&y.pause()}},[]),n=i.useCallback(async u=>{var y;const c=t.current;if(c){e.mutex&&r(c),c.src!==u&&(c.pause(),c.currentTime=0,c.src=u);try{await((y=t.current)==null?void 0:y.play())}catch{}}},[t,e.mutex,r]),a=i.useCallback(u=>{const c=t.current;c&&(c.paused?n(u):c.pause())},[t,n]),s=i.useCallback(u=>{t.current.currentTime=u},[t]),m=i.useCallback(()=>{t.current&&(t.current.muted=!t.current.muted)},[t]),p=i.useCallback(u=>{t.current&&(t.current.volume=u)},[t]),l=R.useSyncExternalStore(i.useCallback(u=>{var c;return(c=t.current)==null||c.addEventListener("volumechange",u),()=>{var y;(y=t.current)==null||y.removeEventListener("volumechange",u)}},[t]),()=>{var u;return(u=t.current)==null?void 0:u.volume},()=>{}),d=R.useSyncExternalStore(i.useCallback(u=>{var c;return(c=t.current)==null||c.addEventListener("volumechange",u),()=>{var y;(y=t.current)==null||y.removeEventListener("volumechange",u)}},[t]),()=>{var u;return(u=t.current)==null?void 0:u.muted},()=>{}),v=R.useSyncExternalStore(i.useCallback(u=>{var c;return(c=t.current)==null||c.addEventListener("timeupdate",u),()=>{var y;(y=t.current)==null||y.removeEventListener("timeupdate",u)}},[t]),()=>{if(t.current)return Math.round(t.current.currentTime)},()=>{}),h=R.useSyncExternalStore(i.useCallback(u=>{var c;return(c=t.current)==null||c.addEventListener("durationchange",u),()=>{var y;(y=t.current)==null||y.removeEventListener("durationchange",u)}},[t]),()=>{var u;return(u=t.current)==null?void 0:u.duration},()=>{}),g=R.useSyncExternalStore(i.useCallback(u=>{var c;return(c=t.current)==null||c.addEventListener("progress",u),()=>{var y;(y=t.current)==null||y.removeEventListener("progress",u)}},[t]),()=>{const u=t.current;return u&&u.buffered.length>0?u.buffered.end(u.buffered.length-1):0},()=>{}),x=R.useSyncExternalStore(i.useCallback(u=>{var c,y;return(c=t.current)==null||c.addEventListener("play",u),(y=t.current)==null||y.addEventListener("pause",u),()=>{var w,S;(w=t.current)==null||w.removeEventListener("play",u),(S=t.current)==null||S.removeEventListener("pause",u)}},[t]),()=>{const u=t.current;return u?!u.paused:!1},()=>{}),b=R.useSyncExternalStore(i.useCallback(u=>{var c,y;return(c=t.current)==null||c.addEventListener("playing",u),(y=t.current)==null||y.addEventListener("waiting",u),()=>{var w,S;(w=t.current)==null||w.removeEventListener("playing",u),(S=t.current)==null||S.removeEventListener("waiting",u)}},[t]),()=>{const u=t.current;return u?u.networkState===u.NETWORK_LOADING:!1},()=>{});return{audio:t.current,playAudio:n,togglePlay:a,seek:s,toggleMuted:m,setVolume:p,volume:l,muted:d,currentTime:v,duration:h,bufferedSeconds:g,isPlaying:x,isLoading:b}}function jt(e,t){return i.useMemo(()=>{const r={...t};for(const n in e)e[n]!==void 0&&(r[n]=e[n]);return r},[e,t])}function wt(e){const[t,r]=i.useState(e);return i.useEffect(()=>{r(e)},[e]),{mini:t,setMini:r}}function Ce(){const e=i.useRef([]);return i.useEffect(()=>{const r=e.current;return()=>{for(const n of r)clearTimeout(n)}},[]),i.useCallback((r,n)=>{const a=setTimeout(r,n);return e.current.push(a),a},[])}function Ot(){const e=i.useRef(null),[t,r]=i.useState({text:"",style:{opacity:0}}),n=Ce(),a=i.useCallback((s,m=2e3)=>{e.current&&clearTimeout(e.current),r({text:s,style:{opacity:1}}),e.current=n(()=>{r({text:s,style:{opacity:0}})},m)},[n]);return[t,a]}function Lt(e){return At(e.slice())}function At(e){let t=e.length,r;for(;t!==0;)r=Math.floor(Math.random()*t),t--,[e[t],e[r]]=[e[r],e[t]];return e}function Pt(e,t){const{initialLoop:r="all",initialOrder:n="list"}=t,[a,s]=i.useState(r),[m,p]=i.useState(n),l=i.useMemo(()=>m==="list"?e:Lt(e),[e,m]),[d,v]=i.useState(l[0]),h=i.useCallback(c=>c.url,[]),g=i.useMemo(()=>l.findIndex(y=>h(y)===h(d))<l.length-1||a!=="none",[l,d,a,h]),x=i.useCallback(()=>{v(c=>{const y=l.findIndex(w=>h(w)===h(c));return y<l.length-1?l[y+1]:{...l[0]}})},[a,l,h]),b=i.useCallback(()=>{v(c=>{const y=l.indexOf(c);return y>0?l[y-1]:c})},[l]),u=i.useCallback(c=>{v(c)},[]);return i.useEffect(()=>{const c=l.find(y=>h(y)===h(d));v(c||l[0])},[l,h,d]),{list:l,currentSong:d,hasNextSong:g,next:x,previous:b,prioritize:u,order:m,setOrder:p,loop:a,setLoop:s,length:l.length}}function Nt(e){const t=jt(e,{appearance:"normal",volume:.7,autoPlay:!1,listMaxHeight:250,mini:!1,mutex:!0,listFolded:!1,theme:"light",border:!1}),{audio:r,appearance:n,initialLoop:a,initialOrder:s,volume:m,autoPlay:p,listMaxHeight:l,listFolded:d,mutex:v,theme:h,border:g}=t,x=i.useMemo(()=>Array.isArray(r)?r:[r],[r]),b=Pt(x,{initialLoop:a,initialOrder:s}),[u,c]=Ot(),{mini:y,setMini:w}=wt(t.mini),S=Ce(),T=i.useRef(null),$=i.useCallback(()=>{T.current&&(clearTimeout(T.current),T.current=null)},[]),k=i.useRef(!1),P=_t({src:b.currentSong.url,initialVolume:m,autoPlay:p,mutex:v,onError(C){const{error:Y}=C.target;Y&&c("An audio error has occurred, player will skip forward in 2 seconds."),b.hasNextSong&&(T.current=S(()=>{b.next()},2e3))},onEnded(){const{list:C,currentSong:Y,loop:o,prioritize:E,hasNextSong:_}=b,{audio:L}=P;if(o==="one"){E({...Y});return}if(!_&&o==="none"){k.current=!0,L.currentTime=0,L.pause(),L.src=C[0].url,E(C[0]);return}b.next()}}),z=b.length>1,O=i.useCallback(()=>{$(),P.togglePlay(b.currentSong.url)},[P,$,b.currentSong.url]),{prioritize:ae}=b,fe=i.useCallback(C=>{$(),ae(C)},[$,ae]),[K,ue]=i.useState(()=>z&&!d),[de,X]=i.useState(!0),H=i.useRef(null);i.useEffect(()=>{p&&P.playAudio(b.currentSong.url)},[]);const Q=i.useRef(!0),Z=i.useRef(b.currentSong);return i.useEffect(()=>{if(Q.current){Q.current=!1;return}if(k.current){k.current=!1;return}b.currentSong&&(b.loop==="one"||b.currentSong!==Z.current)&&(Z.current=b.currentSong,P.playAudio(b.currentSong.url))},[b.currentSong]),i.useEffect(()=>{if(n==="fixed"&&H.current){const C=H.current;return C.style.width=`${C.offsetWidth-18}px`,()=>{C.removeAttribute("style")}}},[n]),{bodyRef:H,appearance:n,volume:m,listMaxHeight:l,theme:h,border:g,notice:u,audioControl:P,audio:x,handlePlayButtonClick:O,handlePlayAudioFromList:fe,isPlaylistOpen:K,setPlaylistOpen:ue,mini:y,displayLyrics:de,setDisplayLyrics:X,setMini:w,playlist:b,hasPlaylist:z}}function Ct(e){var k,P,z;const t=q("aplayer"),{bodyRef:r,appearance:n,volume:a,listMaxHeight:s,theme:m,border:p,notice:l,audio:d,audioControl:v,handlePlayButtonClick:h,handlePlayAudioFromList:g,isPlaylistOpen:x,setPlaylistOpen:b,mini:u,displayLyrics:c,setDisplayLyrics:y,setMini:w,playlist:S,hasPlaylist:T}=Nt(e),$=i.useCallback(O=>O?typeof O=="string"?O:O.url?f.jsx("a",{href:O.url,target:"_blank",rel:"noreferrer",children:O.name??"Audio artist"}):O.name??"Audio artist":"Audio artist",[]);return f.jsxs("div",{className:j(t.b(),{[t.bs(m)]:!0,[t.bs("vars")]:!0,[t.bm(n)]:!0,[t.bm("loading")]:v.isLoading,[t.bm("withlist")]:T,[t.bm("list-folded")]:!x,[t.bm("withlrc")]:!!S.currentSong.lrc&&n!=="fixed",[t.bm("narrow")]:u,[t.bm("border")]:p}),role:"region","aria-label":"Audio Player",children:[f.jsxs("div",{ref:r,className:t.be("body"),children:[f.jsx("div",{className:t.be("pic"),onClick:h,style:{backgroundImage:`url("${(k=S.currentSong)==null?void 0:k.cover}")`},role:"button","aria-label":v.isPlaying?"Pause audio":"Play audio",children:f.jsx("div",{className:j(t.be("button"),v.isPlaying?t.bm("pause"):t.bm("play")),role:"presentation",children:v.isPlaying?f.jsx(tt,{}):f.jsx(vt,{})})}),f.jsxs("div",{className:j(t.be("info")),children:[f.jsxs("div",{className:j(t.be("music")),children:[f.jsx("span",{className:j(t.be("title")),children:((P=S.currentSong)==null?void 0:P.name)??"Audio name"}),f.jsxs("span",{className:j(t.be("author")),children:[" ","-"," ",$((z=S.currentSong)==null?void 0:z.artist)]})]}),n==="fixed"?null:f.jsx(Le,{show:c,lrcText:S.currentSong.lrc,currentTime:v.currentTime??0}),f.jsx(yt,{volume:v.volume??a,onChangeVolume:v.setVolume,muted:v.muted??!1,onToggleMuted:()=>v.toggleMuted(),currentTime:v.currentTime,audioDurationSeconds:v.duration,bufferedSeconds:v.bufferedSeconds,onSeek:O=>v.seek(O),onToggleMenu:()=>b(O=>!O),order:S.order,onOrderChange:S.setOrder,loop:S.loop,onLoopChange:S.setLoop,isPlaying:v.isPlaying??!1,onTogglePlay:h,onSkipForward:()=>{S.hasNextSong&&S.next()},onSkipBack:()=>{S.previous()},showLyrics:c,onToggleLyrics:()=>{y(O=>!O)}})]}),f.jsx("div",{className:t.be("notice"),style:l.style,children:l.text}),f.jsx("div",{className:t.be("miniswitcher"),onClick:()=>w(O=>!O),children:f.jsx("button",{className:j(t.bs("icon"),t.bs("icon-right")),type:"button",children:f.jsx(et,{})})})]}),T?f.jsx(pt,{open:x,audio:d,playingAudioUrl:S.currentSong.url,onPlayAudio:g,listMaxHeight:s}):null,n==="fixed"&&f.jsx(Le,{show:c,lrcText:S.currentSong.lrc,currentTime:v.currentTime??0})]})}V.TwistAPlayer=Ct,Object.defineProperty(V,Symbol.toStringTag,{value:"Module"})});