(()=>{"use strict";const t=window.React,e=window.wp.element,n="linear-gradient(135deg, #0040E3, #18D4FD)",r=(t,e)=>{return null==(n=e)||""===n||Array.isArray(n)&&0===n.length||"object"==typeof n&&0===Object.keys(n).length||"string"==typeof n&&""===n.trim()||"number"==typeof n&&0===n?"":`${t}: ${e};`;var n},s=t=>{const{color:e="",bgType:s="solid",bg:o="",gradient:l=n}=t||{};return`\n\t\t${r("color",e)}\n\t\t${l||o?r("background","gradient"===s?l:o):""}\n\t`},o=(t,e,n=!0)=>{const{fontFamily:s="Default",fontCategory:o="sans-serif",fontVariant:l=400,fontWeight:i,isUploadFont:a=!0,fontSize:d={desktop:null,tablet:null,mobile:null},fontStyle:c,textTransform:u,textDecoration:p,lineHeight:h,letterSpace:g}=e||{},v=!n||!s||"Default"===s,w=d?.desktop||d,x=d?.tablet||w,m=d?.mobile||x,y=t=>{const e=String(t);return["px","em","rem","%","vh","vw"].some(t=>e.endsWith(t))?e:"number"==typeof t?`${e}px`:""},b=`\n\t\t${v?"":`font-family: '${s}', ${o};`}\n\t\t${r("font-weight",i)}\n\t\t${r("font-size",y(w))}\n\t\t${r("font-style",c)}\n\t\t${r("text-transform",u)}\n\t\t${r("text-decoration",p)}\n\t\t${r("line-height",h)}\n\t\t${r("letter-spacing",g)}\n\t`,f=l&&400!==l?"400i"===l?":ital@1":l?.includes("00i")?`: ital, wght@1, ${l?.replace("00i","00")} `:`: wght@${l} `:"",k=v?"":`https://fonts.googleapis.com/css2?family=${s?.split(" ").join("+")}${f.replace(/ /g,"")}&display=swap`;return{googleFontLink:!a||v?"":`@import url(${k});`,styles:`${t}{\n\t\t\t${b}\n\t\t}\n\t\t@media only screen and (max-width: 1024px) {\n\t\t\t${t}{\n\t\t\t\t${r("font-size",y(x))}\n\t\t\t}\n\t\t}\n\t\t@media only screen and (max-width: 640px) {\n\t\t\t${t}{\n\t\t\t\t${r("font-size",y(m))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},l=({attributes:e,id:n})=>{const{primaryColor:l,styles:i,radius:a,width:d,align:c,alignment:u}=e,[p,h]=(0,t.useState)(),{playIcon:g,title:v,statusText:w,background:x,progressbarColor:m,iconColor:y,radioIconColor:b,secondaryBackground:f,border:k,subtitle:$,track:j}=i;return(0,t.useEffect)(()=>{const t=`\n ${o("",v?.typography||{}).googleFontLink}\n ${o(`#${n} .title`,v?.typography||{}).styles}\n ${o("",$?.typography||{}).googleFontLink}\n ${o(`#${n} .subtitle`,$?.typography||{}).styles}\n ${o("",j?.typography||{}).googleFontLink}\n ${o(`#${n} [data-plyr=current-track]`,j?.typography||{}).styles}\n #${n}{\n display: flex;\n justify-content: ${u};\n --h5ap-radio-primary-color: ${l};\n --h5ap-radio-icon-color: ${b};\n --h5ap-radio-progress-color: ${m};\n --h5ap-radio-icons-color: ${y};\n }\n #${n} .play-icon {\n ${s(g)}\n }\n #${n} .status-text {\n ${s(w)}\n }\n\n #${n} .title, #${n} .subtitle {\n color: ${v?.color}\n }\n \n #${n} [data-plyr=current-track] {\n ${r("color",j?.color)}\n }\n \n #${n} .radio-wrapper{\n width: ${d};\n }\n #${n} .secondary-container {\n ${r("background",f)}\n }\n \n #${n} .skin_container {\n ${r("background",x)}\n ${(t=>{const{width:e="",style:n="solid",color:s="",side:o="all",radius:l=""}=t||{},i=t=>{const e=o?.toLowerCase();return e?.includes("all")||e?.includes(t)},a=`${e} ${n} ${s}`,d=`\n\t\t${e&&0!==parseInt(e)?["top","right","bottom","left"].map(t=>i(t)?`border-${t}: ${a};`:"").join(""):""}\n\t\t${r("border-radius",l)}\n\t`;return d})(k)}\n }\n \n #${n} .radius{\n border-radius: ${a}\n }\n \n `.replace(/\s+/g," ").trim();h(t)},[d,x,a,n,f,l,c,u,b,i]),(0,t.createElement)("style",null,p)},i=({title:t,sourceType:e,statusText:n})=>`\n
${t}
\n${n}
`:""}\n