1(()=>{"use strict";var e,t,n={581:(e,t,n)=>{n.d(t,{EF:()=>w,KQ:()=>u,N$:()=>a,NE:()=>l,Od:()=>p,US:()=>c,VX:()=>g,Vc:()=>o,ZY:()=>y,au:()=>h,dd:()=>d,hc:()=>m,oU:()=>s,qv:()=>b,wB:()=>i,x9:()=>f,xO:()=>v});var r=n(1609);const i=e=>(0,r.createElement)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("g",{id:"Settings"},(0,r.createElement)("g",null,(0,r.createElement)("path",{d:"M12.6,20.936H11.3a.883.883,0,0,1-.852-.654l-.774-2.833-2.5,1.435a.886.886,0,0,1-1.06-.138l-.925-.919a.884.884,0,0,1-.143-1.066l1.469-2.545L6.509,14.2l-2.787-.747a.882.882,0,0,1-.654-.851V11.3a.882.882,0,0,1,.652-.85l2.839-.777L5.12,7.171a.885.885,0,0,1,.141-1.062l.918-.918A.885.885,0,0,1,7.24,5.049L9.792,6.514l.012,0,.745-2.79a.881.881,0,0,1,.851-.655h1.3a.883.883,0,0,1,.852.655l.762,2.838,2.509-1.441a.885.885,0,0,1,1.059.138l.926.919a.882.882,0,0,1,.141,1.067L17.483,9.777l.008.022,2.786.746a.883.883,0,0,1,.653.851v1.3a.883.883,0,0,1-.654.852l-2.837.774,1.439,2.505a.881.881,0,0,1-.141,1.063l-.917.917a.888.888,0,0,1-1.063.141l-2.539-1.462L14.2,17.5l-.745,2.785A.885.885,0,0,1,12.6,20.936Zm-1.21-1h1.119l.738-2.756a.888.888,0,0,1,.528-.592l.134-.052a.873.873,0,0,1,.76.057l2.51,1.445.789-.789-1.423-2.478a.881.881,0,0,1-.048-.78l.052-.125a.875.875,0,0,1,.584-.51l2.8-.749v-1.12l-2.755-.737a.885.885,0,0,1-.592-.529l-.052-.132a.882.882,0,0,1,.057-.763L18.04,6.818l-.8-.79-2.48,1.425a.878.878,0,0,1-.772.052l-.115-.047a.888.888,0,0,1-.518-.588l-.748-2.806H11.492l-.738,2.762a.883.883,0,0,1-.539.6l-.12.045a.874.874,0,0,1-.751-.058L6.822,5.962l-.789.789L7.455,9.227a.886.886,0,0,1,.046.785l-.051.12a.876.876,0,0,1-.579.5l-2.8.758v1.121l2.757.738a.889.889,0,0,1,.591.525l.048.121a.874.874,0,0,1-.055.77L5.958,17.181l.8.791,2.47-1.419a.878.878,0,0,1,.787-.045l.106.044a.874.874,0,0,1,.526.591ZM9.75,17.482l.008,0ZM9.6,17.421l.007,0ZM6.487,14.147h0Zm.044-4.411h0Zm7.724-3.2Z"}),(0,r.createElement)("path",{d:"M12,15a3,3,0,1,1,3-3A3,3,0,0,1,12,15Zm0-5a2,2,0,1,0,2,2A2,2,0,0,0,12,10Z"})))),o=e=>(0,r.createElement)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M430.1 347.9c-6.6-6.1-16.3-7.6-24.6-9-11.5-1.9-15.9-4-22.6-10-14.3-12.7-14.3-31.1 0-43.8l30.3-26.9c46.4-41 46.4-108.2 0-149.2-34.2-30.1-80.1-45-127.8-45-55.7 0-113.9 20.3-158.8 60.1-83.5 73.8-83.5 194.7 0 268.5 41.5 36.7 97.5 55 152.9 55.4h1.7c55.4 0 110-17.9 148.8-52.4 14.4-12.7 12-36.6.1-47.7zM120 216c0-17.7 14.3-32 32-32s32 14.3 32 32-14.3 32-32 32-32-14.3-32-32zm40 126c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm64-161c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32zm72 219c-26.5 0-48-21.5-48-48s21.5-48 48-48 48 21.5 48 48-21.5 48-48 48zm24-208c-17.7 0-32-14.3-32-32s14.3-32 32-32 32 14.3 32 32-14.3 32-32 32z"})),a=e=>(0,r.createElement)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"m292.6 407.78-120-320a22 22 0 0 0-41.2 0l-120 320a22 22 0 0 0 41.2 15.44l36.16-96.42a2 2 0 0 1 1.87-1.3h122.74a2 2 0 0 1 1.87 1.3l36.16 96.42a22 22 0 0 0 41.2-15.44zm-185.84-129 43.37-115.65a2 2 0 0 1 3.74 0l43.37 115.67a2 2 0 0 1-1.87 2.7h-86.74a2 2 0 0 1-1.87-2.7zM400.77 169.5c-41.72-.3-79.08 23.87-95 61.4a22 22 0 0 0 40.5 17.2c8.88-20.89 29.77-34.44 53.32-34.6 32.32-.22 58.41 26.5 58.41 58.85a1.5 1.5 0 0 1-1.45 1.5c-21.92.61-47.92 2.07-71.12 4.8-54.75 6.44-87.43 36.29-87.43 79.85 0 23.19 8.76 44 24.67 58.68C337.6 430.93 358 438.5 380 438.5c31 0 57.69-8 77.94-23.22h.06a22 22 0 1 0 44 .19v-143c0-56.18-45-102.56-101.23-102.97zM380 394.5c-17.53 0-38-9.43-38-36 0-10.67 3.83-18.14 12.43-24.23 8.37-5.93 21.2-10.16 36.14-11.92 21.12-2.49 44.82-3.86 65.14-4.47a2 2 0 0 1 2 2.1C455 370.1 429.46 394.5 380 394.5z"})),s=e=>(0,r.createElement)("svg",{...e,stroke:"currentColor",fill:"none",strokeWidth:"0",viewBox:"0 0 15 15",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.25 1C0.25 0.585786 0.585786 0.25 1 0.25H14C14.4142 0.25 14.75 0.585786 14.75 1V14C14.75 14.4142 14.4142 14.75 14 14.75H1C0.585786 14.75 0.25 14.4142 0.25 14V1ZM1.75 1.75V13.25H13.25V1.75H1.75Z",fill:"currentColor"}),(0,r.createElement)("rect",{x:"7",y:"5",width:"1",height:"1",rx:".5",fill:"currentColor"}),(0,r.createElement)("rect",{x:"7",y:"3",width:"1",height:"1",rx:".5",fill:"currentColor"}),(0,r.createElement)("rect",{x:"7",y:"7",width:"1",height:"1",rx:".5",fill:"currentColor"}),(0,r.createElement)("rect",{x:"5",y:"7",width:"1",height:"1",rx:".5",fill:"currentColor"}),(0,r.createElement)("rect",{x:"3",y:"7",width:"1",height:"1",rx:".5",fill:"currentColor"}),(0,r.createElement)("rect",{x:"9",y:"7",width:"1",height:"1",rx:".5",fill:"currentColor"}),(0,r.createElement)("rect",{x:"11",y:"7",width:"1",height:"1",rx:".5",fill:"currentColor"}),(0,r.createElement)("rect",{x:"7",y:"9",width:"1",height:"1",rx:".5",fill:"currentColor"}),(0,r.createElement)("rect",{x:"7",y:"11",width:"1",height:"1",rx:".5",fill:"currentColor"})),l=e=>(0,r.createElement)("svg",{...e,xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},(0,r.createElement)("path",{d:"m7.5 4.27 9 5.15"}),(0,r.createElement)("path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z"}),(0,r.createElement)("path",{d:"m3.3 7 8.7 5 8.7-5"}),(0,r.createElement)("path",{d:"M12 22V12"})),c=e=>
1(0,r.createElement)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M400 145.49 366.51 112 256 222.51 145.49 112 112 145.49 222.51 256 112 366.51 145.49 400 256 289.49 366.51 400 400 366.51 289.49 256 400 145.49z"})),d=e=>(0,r.createElement)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 352 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M176 352c53.02 0 96-42.98 96-96V96c0-53.02-42.98-96-96-96S80 42.98 80 96v160c0 53.02 42.98 96 96 96zm160-160h-16c-8.84 0-16 7.16-16 16v48c0 74.8-64.49 134.82-140.79 127.38C96.71 376.89 48 317.11 48 250.3V208c0-8.84-7.16-16-16-16H16c-8.84 0-16 7.16-16 16v40.16c0 89.64 63.97 169.55 152 181.69V464H96c-8.84 0-16 7.16-16 16v16c0 8.84 7.16 16 16 16h160c8.84 0 16-7.16 16-16v-16c0-8.84-7.16-16-16-16h-56v-33.77C285.71 418.47 352 344.9 352 256v-48c0-8.84-7.16-16-16-16z"})),u=e=>(0,r.createElement)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",role:"img",viewBox:"0 0 24 24",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M12 0a12 12 0 1 0 0 24 12 12 0 0 0 0-24zm-.883 4.322h1.766v8.757h-1.766zm-.74 2.053v1.789a4.448 4.448 0 1 0 3.247 0V6.375a6.146 6.146 0 1 1-5.669 10.552 6.145 6.145 0 0 1 2.421-10.552z"})),h='<svg\n stroke="currentColor"\n fill="currentColor"\n strokeWidth="0"\n viewBox="0 0 24 24"\n height="1em"\n width="1em"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M10 13c2.21 0 4-1.79 4-4s-1.79-4-4-4-4 1.79-4 4 1.79 4 4 4zm0-6c1.1 0 2 .9 2 2s-.9 2-2 2-2-.9-2-2 .9-2 2-2zM16.39 15.56C14.71 14.7 12.53 14 10 14s-4.71.7-6.39 1.56A2.97 2.97 0 0 0 2 18.22V21h16v-2.78c0-1.12-.61-2.15-1.61-2.66zM16 19H4v-.78c0-.38.2-.72.52-.88C5.71 16.73 7.63 16 10 16c2.37 0 4.29.73 5.48 1.34.32.16.52.5.52.88V19zM20.36 1l-1.41 1.41a7.007 7.007 0 0 1 0 9.9l1.41 1.41a8.98 8.98 0 0 0 0-12.72z"></path>\n <path d="M17.54 10.9a5.003 5.003 0 0 0 0-7.07l-1.41 1.41a3 3 0 0 1 0 4.24l1.41 1.42z"></path>\n </svg>',m=' <svg\n stroke="currentColor"\n fill="none"\n strokeWidth="2"\n viewBox="0 0 24 24"\n strokeLinecap="round"\n strokeLinejoin="round"\n height="1em"\n width="1em"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M2 10v3"></path>\n <path d="M6 6v11"></path>\n <path d="M10 3v18"></path>\n <path d="M14 8v7"></path>\n <path d="M18 5v13"></path>\n <path d="M22 10v3"></path>\n </svg>',p='<svg\n stroke="currentColor"\n fill="currentColor"\n strokeWidth="0"\n viewBox="0 0 1024 1024"\n height="1em"\n width="1em"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M512 624c93.9 0 170-75.2 170-168V232c0-92.8-76.1-168-170-168s-170 75.2-170 168v224c0 92.8 76.1 168 170 168zm330-170c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 140.3-113.7 254-254 254S258 594.3 258 454c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8 0 168.7 126.6 307.9 290 327.6V884H326.7c-13.7 0-24.7 14.3-24.7 32v36c0 4.4 2.8 8 6.2 8h407.6c3.4 0 6.2-3.6 6.2-8v-36c0-17.7-11-32-24.7-32H548V782.1c165.3-18 294-158 294-328.1z"></path>\n </svg>',g='<svg\n stroke="currentColor"\n fill="currentColor"\n strokeWidth="0"\n role="img"\n viewBox="0 0 24 24"\n height="1em"\n width="1em"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M.331 11.378s.5418-.089.765.1439c.2234.2332.077.7156-.2195.7237-.2965.01-.5705.063-.765-.1439-.1946-.2066-.1424-.6218.2195-.7237m5.881 3.2925c-.0522.01-.1075-.018-.164-.059-.3884-.5413-.5287-2.3923-.707-2.5025-.185-.1144-.8545 1.0255-2.1862.903-.5569-.051-1.1236-.4121-1.4573-.662.031-.4206.0364-1.4027.8659-1.0833.5038.1939 1.3667.7266 2.1245-.23.8378-1.0579 1.2999-.7506 1.577-.5206.2771.23.0925 1.4259.5058 1.0916.4133-.3343 2.082-2.4103 2.082-2.4103s1.292-1.303 1.4898.067c.1979 1.3698 1.0403 2.8877 1.2635 2.8445.2234-.043 2.8223-5.3253 3.1945-5.666.3722-.3409 1.6252-.2961 1.5657.5781-.0596.8742-.1871 6.308-.1871 6.308s-.147 1.5311.0924.7128c.0992-.3392.206-.6453.3392-1.0024.6414-2.0534 1.734-5.5613 2.2784-7.3688.1252-.4325.233-.8037.3166-1.0891l.0001-.0008a3.5925 3.5925 0 0 1 .0973-.3305c.0455-.1532.0763-.2546.0858-.2813.0243-.068.0925-.1192.1884-.157.0962-.061.1995-.064.3165-.067.3021-.027.6907.012 1.0401.1119.1018 0 .2125.037.3172.1118v.0001s.0063 0 .0151.01c.0023 0 .0048 0 .0073.01.0219.015.0573.045.0983.095.0012 0 .0025 0 .004.01.017.021.0341.045.0515.073.1952.2863.315.814.1948 1.7498-.2996 2.3354-.5316 7.1397-.5316 7.1397s-.0461.2298.4353-.782c.0167-.035.0383-.066.058-.098.026-.017.0552-.042.0913-.085.2974-.3546 1.0968-.5629 1.6512-.5586.2336.028.4293.087.5462.1609.2188.333.0897 1.562.0897 1.562-.4612.043-1.3403.2908-1.6519.3366-.3118.046-.7852 2.0699-1.4433 1.8629-.6581-.2069
1-2.1246-1.1268-2.1246-1.2533 0-.1102.1152-1.4546.1453-1.8016.0022-.024.004-.046.0058-.068a.152.152 0 0 1 .0014-.014l-.0002.0003c.0213-.2733.0023-.3927-.1239-.1199-.1086.2346-.581 1.7359-1.1078 3.3709-.0556.1429-1.0511 3.1558-1.1818 3.5231-.156.4261-.287.7523-.3776.921-.1378.1867-.3234.3036-.5826.2252-.6465-.1954-1.4654-1.0889-1.473-1.3106-.0155-1.2503.0608-7.973-.2423-7.4127-.311.5744-2.73 4.5608-2.73 4.5608-.0405.01-.0705.01-.1062.01-.1712-.019-.4366-.074-.51-.2384-.004-.01-.0094-.018-.0129-.028-.0035-.01-.0075-.022-.0135-.04-.0329-.1097-.0463-.2289-.0753-.3265-.1082-.3652-.2813-.8886-.463-1.421-.2784-.9079-.5654-1.8366-.6127-1.9391-.0923-.2007-.2268-.116-.3475-.0002-.54.458-1.6868 2.4793-2.7225 2.5898"></path>\n </svg>',f='<svg\n stroke="currentColor"\n fill="currentColor"\n strokeWidth="0"\n viewBox="0 0 24 24"\n height="1em"\n width="1em"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M20 3H4c-1.1 0-2 .9-2 2v11c0 1.1.9 2 2 2h3l-1 1v2h12v-2l-1-1h3c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm0 13H4V5h16v11z"></path>\n </svg>',b='<svg\n stroke="currentColor"\n fill="currentColor"\n strokeWidth="0"\n viewBox="0 0 24 24"\n height="1em"\n width="1em"\n xmlns="http://www.w3.org/2000/svg"\n >\n <path d="M20 3H4c-1.11 0-2 .89-2 2v12a2 2 0 0 0 2 2h4v2h8v-2h4c1.1 0 2-.9 2-2V5a2 2 0 0 0-2-2zm0 14H4V5h16v12z"></path>\n <path d="M6.5 7.5H9V6H5v4h1.5zM19 12h-1.5v2.5H15V16h4z"></path>\n </svg>',v='<svg\n stroke="currentColor"\n fill="currentColor"\n strokeWidth="0"\n viewBox="0 0 24 24"\n height="1em"\n width="1em"\n xmlns="http://www.w3.org/2000/svg"\n >\n <g id="Video_On">\n <path d="M21.05,5.05a1.433,1.433,0,0,0-1.48.08L16.25,7.37V6.56a2.5,2.5,0,0,0-2.5-2.5H4.69a2.5,2.5,0,0,0-2.5,2.5V17.44a2.5,2.5,0,0,0,2.5,2.5h9.06a2.5,2.5,0,0,0,2.5-2.5v-.81l3.32,2.24a1.5,1.5,0,0,0,.81.24,1.414,1.414,0,0,0,1.43-1.43V6.32A1.437,1.437,0,0,0,21.05,5.05Zm-5.8,12.39a1.5,1.5,0,0,1-1.5,1.5H4.69a1.5,1.5,0,0,1-1.5-1.5V6.56a1.5,1.5,0,0,1,1.5-1.5h9.06a1.5,1.5,0,0,1,1.5,1.5Zm5.56.24a.415.415,0,0,1-.23.38.425.425,0,0,1-.45-.02l-3.88-2.62V8.58l3.88-2.62a.425.425,0,0,1,.45-.02.415.415,0,0,1,.23.38Z"></path>\n </g>\n </svg>',w='<svg\n stroke="currentColor"\n fill="currentColor"\n strokeWidth="0"\n version="1.1"\n viewBox="0 0 17 17"\n height="1em"\n width="1em"\n xmlns="http://www.w3.org/2000/svg"\n >\n <g></g>\n <path d="M12.991 6.75v-2.25c0-0.827-0.678-1.5-1.512-1.5h-7.479v-0.5c0-0.276 0.225-0.5 0.5-0.5h5.541v-1h-5.541c-0.827 0-1.5 0.673-1.5 1.5v0.5h-1.488c-0.834 0-1.512 0.673-1.512 1.5v2.001c0 0.827 0.678 1.5 1.512 1.5h0.504v5.499c0 0.827 0.673 1.5 1.5 1.5h7.964c0.834 0 1.512-0.673 1.512-1.5v-2.251l4.008 2.783v-10.065l-4.009 2.783zM16 12.121l-4.009-2.783v4.162c0 0.276-0.229 0.5-0.512 0.5h-7.963c-0.275 0-0.5-0.224-0.5-0.5v-6.499h-1.504c-0.283 0-0.512-0.224-0.512-0.5v-2.001c0-0.276 0.229-0.5 0.512-0.5h9.968c0.282 0 0.512 0.224 0.512 0.5v4.163l4.008-2.784v6.242z"></path>\n </svg>',y=e=>(0,r.createElement)("svg",{...e,stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,r.createElement)("path",{d:"M60 256c0-51 18.6-97.9 54-135.6 5.3-5.7 5.2-14.8-.4-20.3-2.6-2.6-6.1-4.1-9.7-4.1-3.8 0-7.4 1.6-10.1 4.4C53.3 143.7 32 197.4 32 256c0 58.5 21.3 112.3 61.7 155.5 2.7 2.9 6.3 4.5 10.2 4.5 3.6 0 7.1-1.4 9.7-3.9 2.7-2.6 4.3-6.2 4.4-10 .1-3.9-1.3-7.6-4-10.3C78.6 353.9 60 307 60 256zM418.2 100.4c-2.6-2.8-6.2-4.4-10-4.4-3.6 0-7.1 1.4-9.7 3.9-2.7 2.6-4.3 6.2-4.4 10-.1 3.9 1.3 7.6 4 10.3 35.3 37.8 54 84.7 54 135.7s-18.6 97.9-54 135.7c-5.3 5.6-5.2 14.7.3 20.2 2.5 2.6 6 4 9.7 4 3.9 0 7.6-1.6 10.2-4.6 40.4-43 61.7-96.7 61.7-155.2 0-58.5-21.3-112.4-61.8-155.6z"}),(0,r.createElement)("path",{d:"M159.2 347.7c-24.1-24.3-37.3-56.6-37.3-90.9 0-35 13.8-67.9 38.8-92.4 5.5-5.3 5.6-14.2.2-19.8-2.6-2.7-6.2-4.2-10-4.2-3.7 0-7.2 1.4-9.8 4C110.7 174.2 94 214.1 94 256.8c0 41.6 16.1 80.9 45.3 110.6 2.7 2.7 6.2 4.2 9.9 4.2s7.2-1.5 9.8-4.2c2.6-2.6 4.1-6.1 4.1-9.8.2-3.7-1.2-7.2-3.9-9.9zM371 144.5c-2.6-2.6-6-4-9.8-4-3.8 0-7.3 1.5-10 4.1-5.4 5.4-5.4 14.3.1 19.8 25 24.5 38.7 56.5 38.7 91.5 0 34.2-13.1 67.4-37.1 91.8-5.4 5.4-5.3 14.3.1 19.7 2.6 2.6 6.2 4.1 9.8 4.1 3.8 0 7.4-1.5 9.9-4.1C402 337.7 418 297.6 418 256c0-42.5-16.7-81.5-47-111.5z"}),(0,r.createElement)("path",{d:"M207.1 183.4c-2.6-2.7-6.2-4.2-10-4.2-3.7 0-7.2 1.4-9.8 4.1-19.8 19.5-30.8 45.
16-30.8 73.3 0 27.1 10.5 52.7 29.5 72.1 2.7 2.7 6.2 4.2 10 4.2 3.7 0 7.2-1.4 9.8-4 2.7-2.6 4.2-6.1 4.2-9.9 0-3.8-1.4-7.3-4.1-10-13.8-14-21.4-32.6-21.4-52.5 0-20.3 8-39.2 22.4-53.4 5.4-5.2 5.5-14.1.2-19.7zM325.7 183.2c-2.6-2.6-6-4-9.8-4-3.8 0-7.3 1.5-10 4.1-5.4 5.4-5.4 14.3.1 19.8 14.5 14.3 22.4 33.3 22.4 53.5 0 19.8-7.6 38.5-21.5 52.5-2.6 2.6-4.1 6.2-4 9.9 0 3.7 1.5 7.2 4.1 9.8 2.6 2.6 6.2 4.1 9.8 4.1 3.7 0 7.3-1.5 9.9-4.2 19.1-19.4 29.6-45 29.6-72.1.1-27.8-10.8-53.8-30.6-73.4zM256 218c-21 0-38 17-38 38s17 38 38 38 38-17 38-38-17.1-38-38-38z"}))},1609:e=>{e.exports=window.React},5338:(e,t,n)=>{var r=n(5795);t.H=r.createRoot,r.hydrateRoot},5795:e=>{e.exports=window.ReactDOM},6427:e=>{e.exports=window.wp.components},7998:(e,t,n)=>{n.d(t,{E2:()=>d,In:()=>u,Kn:()=>c,fq:()=>o,gf:()=>l,qC:()=>s,re:()=>a,wd:()=>i});var r=n(1609);(0,r.lazy)((()=>Promise.all([n.e(156),n.e(37)]).then(n.bind(n,9037)))),(0,r.lazy)((()=>Promise.all([n.e(156),n.e(259)]).then(n.bind(n,3259)))),(0,r.lazy)((()=>Promise.all([n.e(156),n.e(619)]).then(n.bind(n,2619)))),(0,r.lazy)((()=>Promise.all([n.e(156),n.e(651),n.e(633)]).then(n.bind(n,633)))),(0,r.lazy)((()=>Promise.all([n.e(156),n.e(877)]).then(n.bind(n,4877)))),(0,r.lazy)((()=>Promise.all([n.e(156),n.e(651),n.e(729)]).then(n.bind(n,8491)))),(0,r.lazy)((()=>Promise.all([n.e(156),n.e(404)]).then(n.bind(n,3404)))),(0,r.lazy)((()=>Promise.all([n.e(156),n.e(651),n.e(504)]).then(n.bind(n,6504)))),(0,r.lazy)((()=>Promise.all([n.e(156),n.e(147)]).then(n.bind(n,9147)))),(0,r.lazy)((()=>n.e(89).then(n.bind(n,6089))));const i=(e,t)=>{(0,r.useEffect)((()=>{function n(){const n=window.scrollY;"function"==typeof t&&t(n>=e)}return window.addEventListener("scroll",n),n(),()=>window.removeEventListener("scroll",n)}),[e,t])},o=(e,t="visible")=>{const n=(0,r.useRef)(0);(0,r.useEffect)((()=>{const t=()=>{const t=window.scrollY;"function"==typeof e&&t<n.current&&e(!1),n.current=t};return window.addEventListener("scroll",t),t(),()=>window.removeEventListener("scroll",t)}),[t,e])},a=(e,t)=>{(0,r.useEffect)((()=>{if(!e||"function"!=typeof t||"."===e)return;const n=e.split(",").map((e=>e.trim())),r=n.map((e=>e.startsWith("#")&&e.length>1&&!e.endsWith(".")&&!e.endsWith("#")?document.getElementById(e.substring(1)):e.startsWith(".")&&e.length>1&&!e.endsWith(".")&&!e.endsWith("#")?document.querySelector(e):(console.warn("Each selector should start with '#' for ID or '.' for class."),null))).filter(Boolean);if(0===r.length)return;const i=()=>{let e=!1;for(const t of r)if(!(t.getBoundingClientRect().top>window.innerHeight)){e=!0;break}t(!!e)};return window.addEventListener("scroll",i),i(),()=>window.removeEventListener("scroll",i)}),[e,t])},s=(e,t)=>{(0,r.useEffect)((()=>{if("number"!=typeof e||"function"!=typeof t)return;t(!1);const n=setTimeout((()=>{t(!0)}),1e3*e);return()=>clearTimeout(n)}),[e,t])},l=e=>{(0,r.useEffect)((()=>{const t=()=>{const t=window.scrollY||window.pageYOffset,n=window.innerHeight,r=document.documentElement.scrollHeight;e&&e(t+n>=r)};return window.addEventListener("scroll",t),t(),()=>window.removeEventListener("scroll",t)}),[e])},c=(e,t)=>{(0,r.useEffect)((()=>{if(!e||!t||"."===e)return;const n=e.split(",").map((e=>e.trim())),r=n.map((e=>e.startsWith("#")&&e.length>1&&!e.endsWith(".")&&!e.endsWith("#")?document.getElementById(e.substring(1)):e.startsWith(".")&&e.length>1&&!e.endsWith(".")&&!e.endsWith("#")?document.querySelector(e):(console.warn("Each selector should start with '#' for ID or '.' for class."),null))).filter(Boolean);if(0===r.length)return;const i=()=>{for(const e of r)new IntersectionObserver((e=>{e.forEach((e=>{e.isIntersecting?t(!0):t(!1)}))}),{threshold:.1}).observe(e)};return window.addEventListener("scroll",i),i(),()=>window.removeEventListener("scroll",i)}),[e,t])},d=(e,t=.6)=>{3===(e=e.replace(/^#/,"")).length&&(e=e.split("").map((e=>e+e)).join(""));const n=parseInt(e,16);return`rgba(${n>>16&255}, ${n>>8&255}, ${255&n}, ${t})`},u=(e,t)=>{switch(t("globalFeedback.notification.style",e),e){case"notification1":t("globalFeedback.notification.bgColor","linear-gradient(to right, #10b981, #059669)"),t("globalFeedback.sharedData.colors",{contentTitleColor:"#fff",contentSubTitleColor:"#fff"}),t("globalFeedback.sharedData.position","bottom");break;case"notification2":t("globalFeedback.notification.bgColor","#bebdd8"),t("globalFeedback.sharedData.colors",{contentTitleColor:"#111827",contentSubTitleColor:"#221414"}),t("globalFeedback.sharedData.contentSubTitleTypo.fontSize.desktop",22),t("globalFeedback.sharedData.position","bottom");break;case"notification3":t("globalFeedback.notification.bgColor","linear-gradient(to right, #fff7ed, #fffbeb)"),t("globalFeedback.sharedData.colors",{contentTitleColor:"#111827",contentSubTitleColor:"#4b5563"}),t("globalFeedback.notification.closeButton.color","#000000"),t("globalFeedback.sharedData.position","bottom");break;case"notification4":t("globalFeedback.sharedData.position","bottomRight"),t("globalFeedback.notification.bgColor","linear-gradient(to top right, #7e22ce, #ec4899)"),t("globalFeedback.sharedData.colors",{contentTitleColor:"#000000",contentSubTitleColor:"#000000"}),t("globalFeedback.sharedData.contentSubTitleTypo.fontSize.desktop",17),t("globalFeedback.sharedData.contentTitle","Got a minute?"),t("globalFeedback.sharedData.contentSubTitle","Tell us what you think");break;case"notification5":t("globalFeedback.sharedData.position","bottomRight"),t("globalFeedback.notification.bgColor","#fffff"),t("globalFeedback.sharedData.colors",{contentTitleColor:"white",contentSubTitleColor:"#374151"}),t("globalFeedback.sharedData.contentTitle","Quick Feedback"),t("globalFeedback.sharedData.contentSubTitle","30 seconds of your time"),t("globalFeedback.sharedData.contentSubTitleTypo.fontSize.desktop",12),t("globalFeedback.sharedData.colors.contentSubTitleColor","#f1f1f1");break;case"notification6":t("globalFeedback.sharedData.position","bottomRight"),t("globalFeedback.notification.bgColor","#fffff"),t("globalFeedback.sharedData.colors",{contentTitleColor:"white",contentSubTitleColor:"#374151"}),t("globalFeedback.sharedData.contentTitle","Voice Feedback"),t("globalFeedback.sharedData.contentSubTitleTypo.fontSize.desktop",12);break;default:t("globalFeedback.sharedData.position","bottom"),t("globalFeedback.notification.bgColor","linear-gradient(to right, #10b981, #059669)")}}}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={exports:{}};return n[e](o,o.exports,i),o.exports}i.m=n,i.n=e=>
1{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.f={},i.e=e=>Promise.all(Object.keys(i.f).reduce(((t,n)=>(i.f[n](e,t),t)),[])),i.u=e=>e+".js",i.miniCssF=e=>e+".css",i.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="voice-feedback:",i.l=(n,r,o,a)=>{if(e[n])e[n].push(r);else{var s,l;if(void 0!==o)for(var c=document.getElementsByTagName("script"),d=0;d<c.length;d++){var u=c[d];if(u.getAttribute("src")==n||u.getAttribute("data-webpack")==t+o){s=u;break}}s||(l=!0,(s=document.createElement("script")).charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.setAttribute("data-webpack",t+o),s.src=n),e[n]=[r];var h=(t,r)=>{s.onerror=s.onload=null,clearTimeout(m);var i=e[n];if(delete e[n],s.parentNode&&s.parentNode.removeChild(s),i&&i.forEach((e=>e(r))),t)return t(r)},m=setTimeout(h.bind(null,void 0,{type:"timeout",target:s}),12e4);s.onerror=h.bind(null,s.onerror),s.onload=h.bind(null,s.onload),l&&document.head.appendChild(s)}},i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.j=686,(()=>{var e;i.g.importScripts&&(e=i.g.location+"");var t=i.g.document;if(!e&&t&&(t.currentScript&&"SCRIPT"===t.currentScript.tagName.toUpperCase()&&(e=t.currentScript.src),!e)){var n=t.getElementsByTagName("script");if(n.length)for(var r=n.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=n[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),i.p=e+"../"})(),(()=>{if("undefined"!=typeof document){var e={686:0};i.f.miniCss=(t,n)=>{e[t]?n.push(e[t]):0!==e[t]&&{37:1,147:1,259:1,404:1,619:1,651:1,729:1,877:1}[t]&&n.push(e[t]=(e=>new Promise(((t,n)=>{var r=i.miniCssF(e),o=i.p+r;if(((e,t)=>{for(var n=document.getElementsByTagName("link"),r=0;r<n.length;r++){var i=(a=n[r]).getAttribute("data-href")||a.getAttribute("href");if("stylesheet"===a.rel&&(i===e||i===t))return a}var o=document.getElementsByTagName("style");for(r=0;r<o.length;r++){var a;if((i=(a=o[r]).getAttribute("data-href"))===e||i===t)return a}})(r,o))return t();((e,t,n,r,o)=>{var a=document.createElement("link");a.rel="stylesheet",a.type="text/css",i.nc&&(a.nonce=i.nc),a.onerror=a.onload=n=>{if(a.onerror=a.onload=null,"load"===n.type)r();else{var i=n&&n.type,s=n&&n.target&&n.target.href||t,l=new Error("Loading CSS chunk "+e+" failed.\n("+i+": "+s+")");l.name="ChunkLoadError",l.code="CSS_CHUNK_LOAD_FAILED",l.type=i,l.request=s,a.parentNode&&a.parentNode.removeChild(a),o(l)}},a.href=t,document.head.appendChild(a)})(e,o,0,t,n)})))(t).then((()=>{e[t]=0}),(n=>{throw delete e[t],n})))}}})(),(()=>{var e={686:0};i.f.j=(t,n)=>{var r=i.o(e,t)?e[t]:void 0;if(0!==r)if(r)n.push(r[2]);else{var o=new Promise(((n,i)=>r=e[t]=[n,i]));n.push(r[2]=o);var a=i.p+i.u(t),s=new Error;i.l(a,(n=>{if(i.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=n&&("load"===n.type?"missing":n.type),a=n&&n.target&&n.target.src;s.message="Loading chunk "+t+" failed.\n("+o+": "+a+")",s.name="ChunkLoadError",s.type=o,s.request=a,r[1](s)}}),"chunk-"+t,t)}};var t=(t,n)=>{var r,o,[a,s,l]=n,c=0;if(a.some((t=>0!==e[t]))){for(r in s)i.o(s,r)&&(i.m[r]=s[r]);l&&l(i)}for(t&&t(n);c<a.length;c++)o=a[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0},n=globalThis.webpackChunkvoice_feedback=globalThis.webpackChunkvoice_feedback||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var o=i(1609),a=i(5338);const s="@media only screen and (max-width: 1024px)",l="@media only screen and (max-width: 640px)",c=(e,t)=>{return null==(n=t)||""===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?"":`${e}: ${t};`;var n},d=(e,t,n=!0)=>{const{fontFamily:r="Default",fontCategory:i="sans-serif",fontVariant:o=400,fontWeight:a,isUploadFont:d=!0,fontSize:u={desktop:null,tablet:null,mobile:null},fontStyle:h,textTransform:m,textDecoration:p,lineHeight:g,letterSpace:f}=t||{},b=!n||!r||"Default"===r,v=u?.desktop||u,w=u?.tablet||v,y=u?.mobile||w,E=e=>{const t=String(e);return["px","em","rem","%","vh","vw"].some((e=>t.endsWith(e)))?t:"number"==typeof e?`${t}px`:""},k=`\n\t\t${b?"":`font-family: '${r}', ${i};`}\n\t\t${c("font-weight",a)}\n\t\t${c("font-size",E(v))}\n\t\t${c("font-style",h)}\n\t\t${c("text-transform",m)}\n\t\t${c("text-decoration",p)}\n\t\t${c("line-height",g)}\n\t\t${c("letter-spacing",f)}\n\t`,C=o&&400!==o?"400i"===o?":ital@1":o?.includes("00i")?`: ital, wght@1, ${o?.replace("00i","00")} `:`: wght@${o} `:"",x=b?"":`https://fonts.googleapis.com/css2?family=${r?.split(" ").join("+")}${C.replace(/ /g,"")}&display=swap`;return{googleFontLink:!d||b?"":`@import url(${x});`,styles:`${e}{\n\t\t\t${k}\n\t\t}\n\t\t${s}
1 {\n\t\t\t${e}{\n\t\t\t\t${c("font-size",E(w))}\n\t\t\t}\n\t\t}\n\t\t${l} {\n\t\t\t${e}{\n\t\t\t\t${c("font-size",E(y))}\n\t\t\t}\n\t\t}`.replace(/\s+/g," ").trim()}},u=e=>{if(!e)return"";if("string"==typeof e)return e;if("object"==typeof e&&!Array.isArray(e)){const t=["top","right","bottom","left"];return t.map((t=>e[t]||"")).every((e=>!e))?"":t.map((t=>e[t]||"0")).join(" ")}return""};var h=i(7998);const m=({attributes:e,id:t})=>{const{container:n,buttons:r,drawer:i,recordingTabs:a,globalFeedback:m}=e,{stickyFeedback:p={},sharedData:g={}}=m,{position:f,offset:b,buttonContent:v}=p,{normal:w,hover:y,borderRadius:E,typo:k,padding:C}=r,x=`#${t}`,S=`${x} .drawer-voice-feedback`,$=`${S} .voice-feedback-toggle`,T=`${S} .voice-feedback-drawer`,R=`${T} .drawer-header`,M=`${R} .drawer-close`,N=`${x} .toggle-button`,D=`${x} .toggle-text`,P=`${x} .body-voice-feedback`,W=`${x} .recording-mode-toggle`,L=`${x} .feedback-buttons`,_=`${x} .bplvf-sticky-feedback`,F=`${x} .notification`,A=`${x} .contentTitle`,z=`${x} .contentSubTitle`,O=`${F} .notification__close-btn`,B=`${x} .notification3`,I=`${F} .notification__icon-box`;return(0,o.createElement)("style",{dangerouslySetInnerHTML:{__html:`\n\n ${d("",k)?.googleFontLink}\n ${d("",i?.drawerHeadlineTypo)?.googleFontLink}\n ${d("",g.contentTitleTypo)?.googleFontLink}\n ${d("",g.contentSubTitleTypo)?.googleFontLink}\n \n ${d(`${$}`,i?.drawerHeadlineTypo).styles}\n ${d(`${D}`,i?.drawerHeadlineTypo).styles}\n \n ${d(`${R} h3`,i?.drawerHeadlineTypo).styles}\n ${d(`${_} .feedback-toggle span`,i?.drawerHeadlineTypo).styles}\n ${d(`${L}>button span, ${x} .bplvf-email-gate .submit-btn`,k).styles}\n ${d(`${W}>button h3`,a?.buttons?.typo).styles}\n ${d(`${A}`,g.contentTitleTypo).styles}\n ${d(`${z}`,g.contentSubTitleTypo).styles}\n\n\n ${$} {\n bottom: ${i?.spaceFromBottom}%;\n ${"left"===i?.drawerPosition?"left: 0; transform: translate(-100px, 50%);":"right: 0; transform: translate(100px, 50%);"}\n }\n ${$}.visible {\n transform: translate(0, 50%);\n }\n ${T} {\n bottom: ${i?.spaceFromBottom}%;\n border-color: ${i?.colors?.bgColor};\n ${"left"===i?.drawerPosition?"left: 0; transform: translate(-100%, 50%);":"right: 0;"}\n }\n ${P} {\n width: ${n?.width?.desktop};\n ${c("background",n?.bgColor)}\n border: ${n?.border?.width} ${n?.border?.style} ${n?.border?.color};\n border-radius: ${n?.borderRadius}px;\n padding: ${u(n?.padding)};\n }\n ${L} svg {\n font-size: ${k.fontSize.desktop}px;\n }\n ${$}, ${N} {\n ${c("color",i?.colors?.color)}\n ${c("background-color",i?.colors?.bgColor)}\n }\n ${R} {\n ${c("background-color",i?.colors?.bgColor)}\n }\n ${R} h3 {\n ${c("color",i?.colors?.color)}\n }\n ${M} svg {\n ${c("color",i?.colors?.color)}\n }\n\n ${W} {\n background-color: ${a?.bgColor};\n border-radius: ${a?.buttons?.borderRadius}px;\n }\n\n ${W}>button.active {\n ${c("background-color",a?.activeRecordingTab?.bgColor)}\n padding: ${u(a?.buttons?.padding)};\n border-radius: ${a?.buttons?.borderRadius}px;\n }\n \n ${W}>button.active h3, ${W}>button.active svg {\n ${c("color",a?.activeRecordingTab?.color)}\n }\n\n ${W}>button svg {\n height: ${a.buttons.iconSize}px;\n width: ${a.buttons.iconSize}px;\n }\n\n ${L}>button, ${x} .bplvf-email-gate .submit-btn {\n border-radius: ${E}px;\n ${c("background-color",w?.bgColor)}\n padding: ${u(C)};\n }\n ${L}>button span, ${x} .bplvf-email-gate .submit-btn {\n ${c("color",w?.color)}\n }\n ${L}>button:hover, ${x} .bplvf-email-gate .submit-btn:hover {\n ${c("background-color",y?.bgColor)}\n }\n ${L}>button:hover span, ${x} .bplvf-email-gate .submit-btn:hover {\n ${c("color",y?.color)}\n }\n\n ${L}>button svg {\n ${c("color",w?.color)}\n }\n ${L}>button:hover svg {\n ${c("color",y?.color)}\n }\n\n ${_} {\n ${"topLeft"===f?`top: ${b.top}px; left: ${b.left}px;`:""}\n ${"topRight"===f?`top: ${b.top}px; right: ${b.right}px;`:""}\n ${"bottomLeft"===f?`bottom: ${b.bottom}px; left: ${b.left}px;`:""}\n ${"bottomRight"===f?`bottom: ${b.bottom}px; right: ${b.right}px;`:""}\n }\n \n ${_} .feedback-toggle {\n ${v.pulseButton?"animation: pulse 1.5s infinite;":""}\n background: ${v.colors.bgColor};\n border-radius: ${v.borderRadius}px;\n padding: ${u(p.padding?.desktop)};\n ${c("color",v.colors.color)}\n box-shadow: 0 0 35px ${(0,h.E2)(v.colors.bgColor,.6)};\n }\n ${_} .feedback-toggle svg {\n height: ${v.iconSize}px;\n width: ${v.iconSize}px;\n }\n\n ${_} .sticky-feedback-content {\n border: 2px solid ${v.colors.bgColor};\n }\n\n ${F} {\n ${c("background",m.notification?.bgColor)}\n }\n\n ${B} {\n border: 2px solid color-mix(in srgb, ${m.notification?.bgColor} 90%, black);\n }\n\n ${I} {\n background: linear-gradient(to right, ${m.notification?.bgColor||"#4ade80"}, #fffbeb),\n linear-gradient(to top right, ${m.notification?.bgColor||"#4ade80"}, ${m.notification?.bgColor||"#4ade80"});\n background-blend-mode: soft-light;\n }\n\n ${O}:hover {\n background: linear-gradient(to right, ${m.notification?.bgColor||"#4ade80"}, #fffbeb),\n linear-gradient(to top right, ${m.notification?.bgColor||"#4ade80"}, ${m.notification?.bgColor||"#4ade80"});\n background-blend-mode: soft-light;\n }\n\n ${A} {\n color: ${m.sharedData?.colors.contentTitleColor};\n }\n ${z} {\n color: ${m.sharedData?.colors.contentSubTitleColor};\n }\n\n ${O} {\n color: ${m.notification.closeButton.color};\n }\n\n\n\n ${O} svg {\n color: ${m.notification.closeButton.color};\n }\n\n ${s} {\n ${P} {\n ${c("width",n?.width?.tablet)}\n }\n }\n\n ${l} {\n ${P} {\n ${c("width",n?.width?.mobile)}\n }\n }\n\n `}})};
vendor: 34,138 bytes, line 1
1function p(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class g{constructor(){this.listeners={}}on(e,t,n){if(this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t),null==n?void 0:n.once){const n=()=>{this.un(e,n),this.un(e,t)};return this.on(e,n),n}return()=>this.un(e,t)}un(e,t){var n;null===(n=this.listeners[e])||void 0===n||n.delete(t)}once(e,t){return this.on(e,t,{once:!0})}unAll(){this.listeners={}}emit(e,...t){this.listeners[e]&&this.listeners[e].forEach((e=>e(...t)))}}const f={decode:function(e,t){return p(this,void 0,void 0,(function*(){const n=new AudioContext({sampleRate:t});return n.decodeAudioData(e).finally((()=>n.close()))}))},createBuffer:function(e,t){return"number"==typeof e[0]&&(e=[e]),function(e){const t=e[0];if(t.some((e=>e>1||e<-1))){const n=t.length;let r=0;for(let e=0;e<n;e++){const n=Math.abs(t[e]);n>r&&(r=n)}for(const t of e)for(let e=0;e<n;e++)t[e]/=r}}(e),{duration:t,length:e[0].length,sampleRate:e[0].length/t,numberOfChannels:e.length,getChannelData:t=>null==e?void 0:e[t],copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function b(e,t){const n=t.xmlns?document.createElementNS(t.xmlns,e):document.createElement(e);for(const[e,r]of Object.entries(t))if("children"===e)for(const[e,r]of Object.entries(t))"string"==typeof r?n.appendChild(document.createTextNode(r)):n.appendChild(b(e,r));else"style"===e?Object.assign(n.style,r):"textContent"===e?n.textContent=r:n.setAttribute(e,r.toString());return n}function v(e,t,n){const r=b(e,t||{});return null==n||n.appendChild(r),r}var w=Object.freeze({__proto__:null,createElement:v,default:v});const y={fetchBlob:function(e,t,n){return p(this,void 0,void 0,(function*(){const r=yield fetch(e,n);if(r.status>=400)throw new Error(`Failed to fetch ${e}: ${r.status} (${r.statusText})`);return function(e,t){p(this,void 0,void 0,(function*(){if(!e.body||!e.headers)return;const n=e.body.getReader(),r=Number(e.headers.get("Content-Length"))||0;let i=0;const o=e=>p(this,void 0,void 0,(function*(){i+=(null==e?void 0:e.length)||0;const n=Math.round(i/r*100);t(n)})),a=()=>p(this,void 0,void 0,(function*(){let e;try{e=yield n.read()}catch(e){return}e.done||(o(e.value),yield a())}));a()}))}(r.clone(),t),r.blob()}))}};class E extends g{constructor(e){super(),this.isExternalMedia=!1,e.media?(this.media=e.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),e.mediaControls&&(this.media.controls=!0),e.autoplay&&(this.media.autoplay=!0),null!=e.playbackRate&&this.onMediaEvent("canplay",(()=>{null!=e.playbackRate&&(this.media.playbackRate=e.playbackRate)}),{once:!0})}onMediaEvent(e,t,n){return this.media.addEventListener(e,t,n),()=>this.media.removeEventListener(e,t,n)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){const e=this.getSrc();e.startsWith("blob:")&&URL.revokeObjectURL(e)}canPlayType(e){return""!==this.media.canPlayType(e)}setSrc(e,t){const n=this.getSrc();if(e&&n===e)return;this.revokeSrc();const r=t instanceof Blob&&(this.canPlayType(t.type)||!e)?URL.createObjectURL(t):e;n&&(this.media.src="");try{this.media.src=r}catch(t){this.media.src=e}}destroy(){this.isExternalMedia||(this.media.pause(),this.media.remove(),this.revokeSrc(),this.media.src="",this.media.load())}setMediaElement(e){this.media=e}play(){return p(this,void 0,void 0,(function*(){return this.media.play()}))}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(e){this.media.currentTime=Math.max(0,Math.min(e,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(e){this.media.volume=e}getMuted(){return this.media.muted}setMuted(e){this.media.muted=e}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(e,t){null!=t&&(this.media.preservesPitch=t),this.media.playbackRate=e}getMediaElement(){return this.media}setSinkId(e){return this.media.setSinkId(e)}}class k extends g{constructor(e,t){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.subscriptions=[],this.options=e;const n=this.parentFromOptionsContainer(e.container);this.parent=n;const[r,i]=this.initHtml();n.appendChild(r),this.container=r,this.scrollContainer=i.querySelector(".scroll"),this.wrapper=i.querySelector(".wrapper"),this.canvasWrapper=i.querySelector(".canvases"),this.progressWrapper=i.querySelector(".progress"),this.cursor=i.querySelector(".cursor"),t&&i.appendChild(t),this.initEvents()}parentFromOptionsContainer(e){let t;if("string"==typeof e?t=document.querySelector(e):e instanceof HTMLElement&&(t=e),!t)throw new Error("Container not found");return t}initEvents(){const e=e=>{const t=this.wrapper.getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;return[n/t.width,r/t.height]};if(this.wrapper.addEventListener("click",(t=>{const[n,r]=e(t);this.emit("click",n,r)})),this.wrapper.addEventListener("dblclick",(t=>{const[n,r]=e(t);this.emit("dblclick",n,r)})),!0!==this.options.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.scrollContainer.addEventListener("scroll",(()=>{const{scrollLeft:e,scrollWidth:t,clientWidth:n}=this.scrollContainer,r=e/t,i=(e+n)/t;this.emit("scroll",r,i,e,e+n)})),"function"==typeof ResizeObserver){const e=this.createDelay(100);this.resizeObserver=new ResizeObserver((()=>{e().then((()=>this.onContainerResize())).catch((()=>{}))})),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){const e=this.parent.clientWidth;e===this.lastContainerWidth&&"auto"!==this.options.height||(this.lastContainerWidth=e,this.reRender())}initDrag(){this.subscriptions.push(function(e,t,n,r,i=3,o=0,a=100){if(!e)return()=>{};const s=matchMedia("(pointer: coarse)").matches;let l=()=>{};const c=c=>{if(c.button!==o)return;c.preventDefault(),c.stopPropagation();let d=c.clientX,u=c.clientY,h=!1;const m=Date.now(),p=r=>{if(r.preventDefault(),r.stopPropagation(),s&&Date.now()-m<a)return;const o=r.clientX,l=r.clientY,c=o-d,p=l-u;if(h||Math.abs(c)>i||Math.abs(p)>i){const r=e.getBoundingClientRect(),{left:i,top:a}=r;h||(null==n||n(d-i,u-a),h=!0),t(c,p,o-i,l-a),d=o,u=l}},g=t=>{if(h){const n=t.clientX,i=t.clientY,o=e.getBoundingClientRect(),{left:a,top:s}=o;null==r||r(n-a,i-s)}l()},f=e=>{e.relatedTarget&&e.relatedTarget!==document.documentElement||g(e)},b=e=>{h&&(e.stopPropagation(),e.preventDefault())},v=e=>{h&&e.preventDefault()};document.addEventListener("pointermove",p),document.addEventListener("pointerup",g),document.addEventListener("pointerout",f),document.addEventListener("pointercancel",f),document.addEventListener("touchmove",v,{passive:!1}),document.addEventListener("click",b,{capture:!0}),l=()=>{document.removeEventListener("pointermove",p),document.removeEventListener("pointerup",g),document.removeEventListener("pointerout",f),document.removeEventListener("pointercancel",f),document.removeEventListener("touchmove",v),setTimeout((()=>{document.removeEventListener("click",b,{capture:!0})}),10)}};return e.addEventListener("pointerdown",c),()=>{l(),e.removeEventListener("pointerdown",c)}}(this.wrapper,((e,t,n)=>{this.emit("drag",Math.max(0,Math.min(1,n/this.wrapper.getBoundingClientRect().width)))}),(e=>{this.isDragging=!0,this.emit("dragstart",Math.max(0,Math.min(1,e/this.wrapper.getBoundingClientRect().width)))}),(e=>{this.isDragging=!1,this.emit("dragend",Math.max(0,Math.min(1,e/this.wrapper.getBoundingClientRect().width)))})))}getHeight(e,t){var n;const r=(null===(n=this.audioData)||void 0===n?void 0:n.numberOfChannels)||1;if(null==e)return 128;if(!isNaN(Number(e)))return Number(e);if("auto"===e){const e=this.parent.clientHeight||128;return(null==t?void 0:t.every((e=>!e.overlay)))?e/r:e}return 128}initHtml(){const e=document.createElement("div"),t=e.attachShadow({mode:"open"}),n=this.options.cspNonce&&"string"==typeof this.options.cspNonce?this.options.cspNonce.replace(/"/g,""):"";return t.innerHTML=`\n <style${n?` nonce="${n}"`:""}>\n :host {\n user-select: none;\n min-width: 1px;\n }\n :host audio {\n display: block;\n width: 100%;\n }\n :host .scroll {\n overflow-x: auto;\n overflow-y: hidden;\n width: 100%;\n position: relative;\n }\n :host .noScrollbar {\n scrollbar-color: transparent;\n scrollbar-width: none;\n }\n :host .noScrollbar::-webkit-scrollbar {\n display: none;\n -webkit-appearance: none;\n }\n :host .wrapper {\n position: relative;\n overflow: visible;\n z-index: 2;\n }\n :host .canvases {\n min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px;\n }\n :host .canvases > div {\n position: relative;\n }\n :host canvas {\n display: block;\n position: absolute;\n top: 0;\n image-rendering: pixelated;\n }\n :host .progress {\n pointer-events: none;\n position: absolute;\n z-index: 2;\n top: 0;\n left: 0;\n width: 0;\n height: 100%;\n overflow: hidden;\n }\n :host .progress > div {\n position: relative;\n }\n :host .cursor {\n pointer-events: none;\n position: absolute;\n z-index: 5;\n top: 0;\n left: 0;\n height: 100%;\n border-radius: 2px;\n }\n </style>\n\n <div class="scroll" part="scroll">\n <div class="wrapper" part="wrapper">\n <div class="canvases" part="canvases"></div>\n <div class="progress" part="progress"></div>\n <div class="cursor" part="cursor"></div>\n </div>\n </div>\n `,[e,t]}setOptions(e){if(this.options.container!==e.container){const t=this.parentFromOptionsContainer(e.container);t.appendChild(this.container),this.parent=t}!0!==e.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.options=e,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(e){this.scrollContainer.scrollLeft=e}setScrollPercentage(e){const{scrollWidth:t}=this.scrollContainer,n=t*e;this.setScroll(n)}destroy(){var e,t;this.subscriptions.forEach((e=>e())),this.container.remove(),null===(e=this.resizeObserver)||void 0===e||e.disconnect(),null===(t=this.unsubscribeOnScroll)||void 0===t||t.forEach((e=>e())),this.unsubscribeOnScroll=[]}createDelay(e=10){let t,n;const r=()=>{t&&clearTimeout(t),n&&n()};return this.timeouts.push(r),()=>new Promise(((i,o)=>{r(),n=o,t=setTimeout((()=>{t=void 0,n=void 0,i()}),e)}))}convertColorValues(e){if(!Array.isArray(e))return e||"";if(e.length<2)return e[0]||"";const t=document.createElement("canvas"),n=t.getContext("2d"),r=t.height*(window.devicePixelRatio||1),i=n.createLinearGradient(0,0,0,r),o=1/(e.length-1);return e.forEach(((e,t)=>{const n=t*o;i.addColorStop(n,e)})),i}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(e,t,n,r){const i=e[0],o=e[1]||e[0],a=i.length,{width:s,height:l}=n.canvas,c=l/2,d=this.getPixelRatio(),u=t.barWidth?t.barWidth*d:1,h=t.barGap?t.barGap*d:t.barWidth?u/2:0,m=t.barRadius||0,p=s/(u+h)/a,g=m&&"roundRect"in n?"roundRect":"rect";n.beginPath();let f=0,b=0,v=0;for(let e=0;e<=a;e++){const a=Math.round(e*p);if(a>f){const e=Math.round(b*c*r),i=e+Math.round(v*c*r)||1;let o=c-e;"top"===t.barAlign?o=0:"bottom"===t.barAlign&&(o=l-i),n[g](f*(u+h),o,u,i,m),f=a,b=0,v=0}const s=Math.abs(i[e]||0),d=Math.abs(o[e]||0);s>b&&(b=s),d>v&&(v=d)}n.fill(),n.closePath()}renderLineWaveform(e,t,n,r){const i=t=>{const i=e[t]||e[0],o=i.length,{height:a}=n.canvas,s=a/2,l=n.canvas.width/o;n.moveTo(0,s);let c=0,d=0;for(let e=0;e<=o;e++){const o=Math.round(e*l);if(o>c){const e=s+(Math.round(d*s*r)||1)*(0===t?-1:1);n.lineTo(c,e),c=o,d=0}const a=Math.abs(i[e]||0);a>d&&(d=a)}n.lineTo(c,s)};n.beginPath(),i(0),i(1),n.fill(),n.closePath()}renderWaveform(e,t,n){if(n.fillStyle=this.convertColorValues(t.waveColor),t.renderFunction)return void t.renderFunction(e,n);let r=t.barHeight||1;if(t.normalize){const t=Array.from(e[0]).reduce(((e,t)=>Math.max(e,Math.abs(t))),0);r=t?1/t:1}t.barWidth||t.barGap||t.barAlign?this.renderBarWaveform(e,t,n,r):this.renderLineWaveform(e,t,n,r)}renderSingleCanvas(e,t,n,r,i,o,a){const s=this.getPixelRatio(),l=document.createElement("canvas");l.width=Math.round(n*s),l.height=Math.round(r*s),l.style.width=`${n}px`,l.style.height=`${r}px`,l.style.left=`${Math.round(i)}px`,o.appendChild(l);const c=l.getContext("2d");if(this.renderWaveform(e,t,c),l.width>0&&l.height>0){const e=l.cloneNode(),n=e.getContext("2d");n.drawImage(l,0,0),n.globalCompositeOperation="source-in",n.fillStyle=this.convertColorValues(t.progressColor),n.fillRect(0,0,l.width,l.height),a.appendChild(e)}}renderMultiCanvas(e,t,n,r,i,o){const a=this.getPixelRatio(),{clientWidth:s}=this.scrollContainer,l=n/a;let c=Math.min(k.MAX_CANVAS_WIDTH,s,l),d={};if(0===c)return;if(t.barWidth||t.barGap){const e=t.barWidth||.5,n=e+(t.barGap||e/2);c%n!=0&&(c=Math.floor(c/n)*n)}const u=n=>{if(n<0||n>=h)return;if(d[n])return;d[n]=!0;const a=n*c,s=Math.min(l-a,c);if(s<=0)return;const u=e.map((e=>{const t=Math.floor(a/l*e.length),n=Math.floor((a+s)/l*e.length);return e.slice(t,n)}));this.renderSingleCanvas(u,t,s,r,a,i,o)},h=Math.ceil(l/c);if(!this.isScrollable){for(let e=0;e<h;e++)u(e);return}const m=this.scrollContainer.scrollLeft/l,p=Math.floor(m*h);if(u(p-1),u(p),u(p+1),h>1){const e=this.on("scroll",(()=>{const{scrollLeft:e}=this.scrollContainer,t=Math.floor(e/l*h);Object.keys(d).length>k.MAX_NODES&&(i.innerHTML="",o.innerHTML="",d={}),u(t-1),u(t),u(t+1)}));this.unsubscribeOnScroll.push(e)}}renderChannel(e,t,n,r){var{overlay:i}=t,o=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(t,["overlay"]);const a=document.createElement("div"),s=this.getHeight(o.height,o.splitChannels);a.style.height=`${s}px`,i&&r>0&&(a.style.marginTop=`-${s}px`),this.canvasWrapper.style.minHeight=`${s}px`,this.canvasWrapper.appendChild(a);const l=a.cloneNode();this.progressWrapper.appendChild(l),this.renderMultiCanvas(e,o,n,s,a,l)}render(e){return p(this,void 0,void 0,(function*(){var t;this.timeouts.forEach((e=>e())),this.timeouts=[],this.canvasWrapper.innerHTML="",this.progressWrapper.innerHTML="",null!=this.options.width&&(this.scrollContainer.style.width="number"==typeof this.options.width?`${this.options.width}px`:this.options.width);const n=this.getPixelRatio(),r=this.scrollContainer.clientWidth,i=Math.ceil(e.duration*(this.options.minPxPerSec||0));this.isScrollable=i>r;const o=this.options.fillParent&&!this.isScrollable,a=(o?r:i)*n;if(this.wrapper.style.width=o?"100%":`${i}px`,this.scrollContainer.style.overflowX=this.isScrollable?"auto":"hidden",this.scrollContainer.classList.toggle("noScrollbar",!!this.options.hideScrollbar),this.cursor.style.backgroundColor=`${this.options.cursorColor||this.options.progressColor}`,this.cursor.style.width=`${this.options.cursorWidth}px`,this.audioData=e,this.emit("render"),this.options.splitChannels)for(let n=0;n<e.numberOfChannels;n++){const r=Object.assign(Object.assign({},this.options),null===(t=this.options.splitChannels)||void 0===t?void 0:t[n]);this.renderChannel([e.getChannelData(n)],r,a,n)}else{const t=[e.getChannelData(0)];e.numberOfChannels>1&&t.push(e.getChannelData(1)),this.renderChannel(t,this.options,a,0)}Promise.resolve().then((()=>this.emit("rendered")))}))}reRender(){if(this.unsubscribeOnScroll.forEach((e=>e())),this.unsubscribeOnScroll=[],!this.audioData)return;const{scrollWidth:e}=this.scrollContainer,{right:t}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&e!==this.scrollContainer.scrollWidth){const{right:e}=this.progressWrapper.getBoundingClientRect();let n=e-t;n*=2,n=n<0?Math.floor(n):Math.ceil(n),n/=2,this.scrollContainer.scrollLeft+=n}}zoom(e){this.options.minPxPerSec=e,this.reRender()}scrollIntoView(e,t=!1){const{scrollLeft:n,scrollWidth:r,clientWidth:i}=this.scrollContainer,o=e*r,a=n,s=n+i,l=i/2;if(this.isDragging){const e=30;o+e>s?this.scrollContainer.scrollLeft+=e:o-e<a&&(this.scrollContainer.scrollLeft-=e)}else{(o<a||o>s)&&(this.scrollContainer.scrollLeft=o-(this.options.autoCenter?l:0));const e=o-n-l;t&&this.options.autoCenter&&e>0&&(this.scrollContainer.scrollLeft+=Math.min(e,10))}{const e=this.scrollContainer.scrollLeft,t=e/r,n=(e+i)/r;this.emit("scroll",t,n,e,e+i)}}renderProgress(e,t){if(isNaN(e))return;const n=100*e;this.canvasWrapper.style.clipPath=`polygon(${n}% 0, 100% 0, 100% 100%, ${n}% 100%)`,this.progressWrapper.style.width=`${n}%`,this.cursor.style.left=`${n}%`,this.cursor.style.transform=`translateX(-${100===Math.round(n)?this.options.cursorWidth:0}px)`,this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(e,t)}exportImage(e,t,n){return p(this,void 0,void 0,(function*(){const r=this.canvasWrapper.querySelectorAll("canvas");if(!r.length)throw new Error("No waveform data");if("dataURL"===n){const n=Array.from(r).map((n=>n.toDataURL(e,t)));return Promise.resolve(n)}return Promise.all(Array.from(r).map((n=>new Promise(((r,i)=>{n.toBlob((e=>{e?r(e):i(new Error("Could not export image"))}),e,t)})))))}))}}k.MAX_CANVAS_WIDTH=8e3,k.MAX_NODES=10;class C extends g{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",(()=>{requestAnimationFrame((()=>{this.emit("tick")}))})),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}class x extends g{constructor(e=new AudioContext){super(),this.bufferNode=null,this.playStartTime=0,this.playedDuration=0,this._muted=!1,this._playbackRate=1,this._duration=void 0,this.buffer=null,this.currentSrc="",this.paused=!0,this.crossOrigin=null,this.seeking=!1,this.autoplay=!1,this.addEventListener=this.on,this.removeEventListener=this.un,this.audioContext=e,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return p(this,void 0,void 0,(function*(){}))}get src(){return this.currentSrc}set src(e){if(this.currentSrc=e,this._duration=void 0,!e)return this.buffer=null,void this.emit("emptied");fetch(e).then((t=>{if(t.status>=400)throw new Error(`Failed to fetch ${e}: ${t.status} (${t.statusText})`);return t.arrayBuffer()})).then((t=>this.currentSrc!==e?null:this.audioContext.decodeAudioData(t))).then((t=>{this.currentSrc===e&&(this.buffer=t,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}))}_play(){var e;if(!this.paused)return;this.paused=!1,null===(e=this.bufferNode)||void 0===e||e.disconnect(),this.bufferNode=this.audioContext.createBufferSource(),this.buffer&&(this.bufferNode.buffer=this.buffer),this.bufferNode.playbackRate.value=this._playbackRate,this.bufferNode.connect(this.gainNode);let t=this.playedDuration*this._playbackRate;(t>=this.duration||t<0)&&(t=0,this.playedDuration=0),this.bufferNode.start(this.audioContext.currentTime,t),this.playStartTime=this.audioContext.currentTime,this.bufferNode.onended=()=>{this.currentTime>=this.duration&&(this.pause(),this.emit("ended"))}}_pause(){var e;this.paused=!0,null===(e=this.bufferNode)||void 0===e||e.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return p(this,void 0,void 0,(function*(){this.paused&&(this._play(),this.emit("play"))}))}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(e){const t=e-this.currentTime,n=this.bufferNode;null==n||n.stop(this.audioContext.currentTime+t),null==n||n.addEventListener("ended",(()=>{n===this.bufferNode&&(this.bufferNode=null,this.pause())}),{once:!0})}setSinkId(e){return p(this,void 0,void 0,(function*(){return this.audioContext.setSinkId(e)}))}get playbackRate(){return this._playbackRate}set playbackRate(e){this._playbackRate=e,this.bufferNode&&(this.bufferNode.playbackRate.value=e)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(e){const t=!this.paused;t&&this._pause(),this.playedDuration=e/this._playbackRate,t&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var e,t;return null!==(e=this._duration)&&void 0!==e?e:(null===(t=this.buffer)||void 0===t?void 0:t.duration)||0}set duration(e){this._duration=e}get volume(){return this.gainNode.gain.value}set volume(e){this.gainNode.gain.value=e,this.emit("volumechange")}get muted(){return this._muted}set muted(e){this._muted!==e&&(this._muted=e,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(e){return/^(audio|video)\//.test(e)}getGainNode(){return this.gainNode}getChannelData(){const e=[];if(!this.buffer)return e;const t=this.buffer.numberOfChannels;for(let n=0;n<t;n++)e.push(this.buffer.getChannelData(n));return e}}const S={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class $ extends E{static create(e){return new $(e)}constructor(e){const t=e.media||("WebAudio"===e.backend?new x:void 0);super({media:t,mediaControls:e.mediaControls,autoplay:e.autoplay,playbackRate:e.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.options=Object.assign({},S,e),this.timer=new C;const n=t?void 0:this.getMediaElement();this.renderer=new k(this.options,n),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initPlugins();const r=this.options.url||this.getSrc()||"";Promise.resolve().then((()=>{this.emit("init");const{peaks:e,duration:t}=this.options;(r||e&&t)&&this.load(r,e,t).catch((()=>null))}))}updateProgress(e=this.getCurrentTime()){return this.renderer.renderProgress(e/this.getDuration(),this.isPlaying()),e}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",(()=>{if(!this.isSeeking()){const e=this.updateProgress();this.emit("timeupdate",e),this.emit("audioprocess",e),null!=this.stopAtPosition&&this.isPlaying()&&e>=this.stopAtPosition&&this.pause()}})))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",(()=>{const e=this.updateProgress();this.emit("timeupdate",e)})),this.onMediaEvent("play",(()=>{this.emit("play"),this.timer.start()})),this.onMediaEvent("pause",(()=>{this.emit("pause"),this.timer.stop(),this.stopAtPosition=null})),this.onMediaEvent("emptied",(()=>{this.timer.stop(),this.stopAtPosition=null})),this.onMediaEvent("ended",(()=>{this.emit("timeupdate",this.getDuration()),this.emit("finish"),this.stopAtPosition=null})),this.onMediaEvent("seeking",(()=>{this.emit("seeking",this.getCurrentTime())})),this.onMediaEvent("error",(()=>{var e;this.emit("error",null!==(e=this.getMediaElement().error)&&void 0!==e?e:new Error("Media error")),this.stopAtPosition=null})))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",((e,t)=>{this.options.interact&&(this.seekTo(e),this.emit("interaction",e*this.getDuration()),this.emit("click",e,t))})),this.renderer.on("dblclick",((e,t)=>{this.emit("dblclick",e,t)})),this.renderer.on("scroll",((e,t,n,r)=>{const i=this.getDuration();this.emit("scroll",e*i,t*i,n,r)})),this.renderer.on("render",(()=>{this.emit("redraw")})),this.renderer.on("rendered",(()=>{this.emit("redrawcomplete")})),this.renderer.on("dragstart",(e=>{this.emit("dragstart",e)})),this.renderer.on("dragend",(e=>{this.emit("dragend",e)})));{let e;this.subscriptions.push(this.renderer.on("drag",(t=>{if(!this.options.interact)return;let n;this.renderer.renderProgress(t),clearTimeout(e),this.isPlaying()?n=0:!0===this.options.dragToSeek?n=200:"object"==typeof this.options.dragToSeek&&void 0!==this.options.dragToSeek&&(n=this.options.dragToSeek.debounceTime),e=setTimeout((()=>{this.seekTo(t)}),n),this.emit("interaction",t*this.getDuration()),this.emit("drag",t)})))}}initPlugins(){var e;(null===(e=this.options.plugins)||void 0===e?void 0:e.length)&&this.options.plugins.forEach((e=>{this.registerPlugin(e)}))}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach((e=>e())),this.mediaSubscriptions=[]}setOptions(e){this.options=Object.assign({},this.options,e),e.duration&&!e.peaks&&(this.decodedData=f.createBuffer(this.exportPeaks(),e.duration)),e.peaks&&e.duration&&(this.decodedData=f.createBuffer(e.peaks,e.duration)),this.renderer.setOptions(this.options),e.audioRate&&this.setPlaybackRate(e.audioRate),null!=e.mediaControls&&(this.getMediaElement().controls=e.mediaControls)}registerPlugin(e){return e._init(this),this.plugins.push(e),this.subscriptions.push(e.once("destroy",(()=>{this.plugins=this.plugins.filter((t=>t!==e))}))),e}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(e){return this.renderer.setScroll(e)}setScrollTime(e){const t=e/this.getDuration();this.renderer.setScrollPercentage(t)}getActivePlugins(){return this.plugins}loadAudio(e,t,n,r){return p(this,void 0,void 0,(function*(){var i;if(this.emit("load",e),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,!t&&!n){const n=this.options.fetchParams||{};window.AbortController&&!n.signal&&(this.abortController=new AbortController,n.signal=null===(i=this.abortController)||void 0===i?void 0:i.signal);const r=e=>this.emit("loading",e);t=yield y.fetchBlob(e,r,n);const o=this.options.blobMimeType;o&&(t=new Blob([t],{type:o}))}this.setSrc(e,t);const o=yield new Promise((e=>{const t=r||this.getDuration();t?e(t):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",(()=>e(this.getDuration())),{once:!0}))}));if(!e&&!t){const e=this.getMediaElement();e instanceof x&&(e.duration=o)}if(n)this.decodedData=f.createBuffer(n,o||0);else if(t){const e=yield t.arrayBuffer();this.decodedData=yield f.decode(e,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())}))}load(e,t,n){return p(this,void 0,void 0,(function*(){try{return yield this.loadAudio(e,void 0,t,n)}catch(e){throw this.emit("error",e),e}}))}loadBlob(e,t,n){return p(this,void 0,void 0,(function*(){try{return yield this.loadAudio("",e,t,n)}catch(e){throw this.emit("error",e),e}}))}zoom(e){if(!this.decodedData)throw new Error("No audio loaded");this.renderer.zoom(e),this.emit("zoom",e)}getDecodedData(){return this.decodedData}exportPeaks({channels:e=2,maxLength:t=8e3,precision:n=1e4}={}){if(!this.decodedData)throw new Error("The audio has not been decoded yet");const r=Math.min(e,this.decodedData.numberOfChannels),i=[];for(let e=0;e<r;e++){const r=this.decodedData.getChannelData(e),o=[],a=r.length/t;for(let e=0;e<t;e++){const t=r.slice(Math.floor(e*a),Math.ceil((e+1)*a));let i=0;for(let e=0;e<t.length;e++){const n=t[e];Math.abs(n)>Math.abs(i)&&(i=n)}o.push(Math.round(i*n)/n)}i.push(o)}return i}getDuration(){let e=super.getDuration()||0;return 0!==e&&e!==1/0||!this.decodedData||(e=this.decodedData.duration),e}toggleInteraction(e){this.options.interact=e}setTime(e){this.stopAtPosition=null,super.setTime(e),this.updateProgress(e),this.emit("timeupdate",e)}seekTo(e){const t=this.getDuration()*e;this.setTime(t)}play(e,t){const n=Object.create(null,{play:{get:()=>super.play}});return p(this,void 0,void 0,(function*(){null!=e&&this.setTime(e);const r=yield n.play.call(this);return null!=t&&(this.media instanceof x?this.media.stopAt(t):this.stopAtPosition=t),r}))}playPause(){return p(this,void 0,void 0,(function*(){return this.isPlaying()?this.pause():this.play()}))}stop(){this.pause(),this.setTime(0)}skip(e){this.setTime(this.getCurrentTime()+e)}empty(){this.load("",[[0]],.001)}setMediaElement(e){this.unsubscribePlayerEvents(),super.setMediaElement(e),this.initPlayerEvents()}exportImage(){return p(this,arguments,void 0,(function*(e="image/png",t=1,n="dataURL"){return this.renderer.exportImage(e,t,n)}))}destroy(){var e;this.emit("destroy"),null===(e=this.abortController)||void 0===e||e.abort(),this.plugins.forEach((e=>e.destroy())),this.subscriptions.forEach((e=>e())),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}}function T(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((r=r.apply(e,t||[])).next())}))}$.BasePlugin=class extends g{constructor(e){super(),this.subscriptions=[],this.options=e}onInit(){}_init(e){this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach((e=>e()))}},$.dom=w,"function"==typeof SuppressedError&&SuppressedError;class R{constructor(){this.listeners={}}on(e,t,n){if(this.listeners[e]||(this.listeners[e]=new Set),this.listeners[e].add(t),null==n?void 0:n.once){const n=()=>{this.un(e,n),this.un(e,t)};return this.on(e,n),n}return()=>this.un(e,t)}un(e,t){var n;null===(n=this.listeners[e])||void 0===n||n.delete(t)}once(e,t){return this.on(e,t,{once:!0})}unAll(){this.listeners={}}emit(e,...t){this.listeners[e]&&this.listeners[e].forEach((e=>e(...t)))}}class M extends R{constructor(e){super(),this.subscriptions=[],this.options=e}onInit(){}_init(e){this.wavesurfer=e,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach((e=>e()))}}class N extends R{constructor(){super(...arguments),this.unsubscribe=()=>{}}start(){this.unsubscribe=this.on("tick",(()=>{requestAnimationFrame((()=>{this.emit("tick")}))})),this.emit("tick")}stop(){this.unsubscribe()}destroy(){this.unsubscribe()}}const D=["audio/webm","audio/wav","audio/mpeg","audio/mp4","audio/mp3"];class P extends M{constructor(e){var t,n,r,i,o,a;super(Object.assign(Object.assign({},e),{audioBitsPerSecond:null!==(t=e.audioBitsPerSecond)&&void 0!==t?t:128e3,scrollingWaveform:null!==(n=e.scrollingWaveform)&&void 0!==n&&n,scrollingWaveformWindow:null!==(r=e.scrollingWaveformWindow)&&void 0!==r?r:5,continuousWaveform:null!==(i=e.continuousWaveform)&&void 0!==i&&i,renderRecordedAudio:null===(o=e.renderRecordedAudio)||void 0===o||o,mediaRecorderTimeslice:null!==(a=e.mediaRecorderTimeslice)&&void 0!==a?a:void 0})),this.stream=null,this.mediaRecorder=null,this.dataWindow=null,this.isWaveformPaused=!1,this.lastStartTime=0,this.lastDuration=0,this.duration=0,this.timer=new N,this.subscriptions.push(this.timer.on("tick",(()=>{const e=performance.now()-this.lastStartTime;this.duration=this.isPaused()?this.duration:this.lastDuration+e,this.emit("record-progress",this.duration)})))}static create(e){return new P(e||{})}renderMicStream(e){var t;const n=new AudioContext,r=n.createMediaStreamSource(e),i=n.createAnalyser();r.connect(i),this.options.continuousWaveform&&(i.fftSize=32);const o=i.frequencyBinCount,a=new Float32Array(o);let s=0;this.wavesurfer&&(null!==(t=this.originalOptions)&&void 0!==t||(this.originalOptions=Object.assign({},this.wavesurfer.options)),this.wavesurfer.options.interact=!1,this.options.scrollingWaveform&&(this.wavesurfer.options.cursorWidth=0));const l=setInterval((()=>{var e,t,r,l;if(!this.isWaveformPaused){if(i.getFloatTimeDomainData(a),this.options.scrollingWaveform){const e=Math.floor((this.options.scrollingWaveformWindow||0)*n.sampleRate),t=Math.min(e,this.dataWindow?this.dataWindow.length+o:o),r=new Float32Array(e);if(this.dataWindow){const n=Math.max(0,e-this.dataWindow.length);r.set(this.dataWindow.slice(-t+o),n)}r.set(a,e-o),this.dataWindow=r}else if(this.options.continuousWaveform){if(!this.dataWindow){const n=this.options.continuousWaveformDuration?Math.round(100*this.options.continuousWaveformDuration):(null!==(t=null===(e=this.wavesurfer)||void 0===e?void 0:e.getWidth())&&void 0!==t?t:0)*window.devicePixelRatio;this.dataWindow=new Float32Array(n)}let n=0;for(let e=0;e<o;e++){const t=Math.abs(a[e]);t>n&&(n=t)}if(s+1>this.dataWindow.length){const e=new Float32Array(2*this.dataWindow.length);e.set(this.dataWindow,0),this.dataWindow=e}this.dataWindow[s]=n,s++}else this.dataWindow=a;if(this.wavesurfer){const e=(null!==(l=null===(r=this.dataWindow)||void 0===r?void 0:r.length)&&void 0!==l?l:0)/100;this.wavesurfer.load("",[this.dataWindow],this.options.scrollingWaveform?this.options.scrollingWaveformWindow:e).then((()=>{this.wavesurfer&&this.options.continuousWaveform&&(this.wavesurfer.setTime(this.getDuration()/1e3),this.wavesurfer.options.minPxPerSec||this.wavesurfer.setOptions({minPxPerSec:this.wavesurfer.getWidth()/this.wavesurfer.getDuration()}))})).catch((e=>{console.error("Error rendering real-time recording data:",e)}))}}}),10);return{onDestroy:()=>{clearInterval(l),null==r||r.disconnect(),null==n||n.close()},onEnd:()=>{this.isWaveformPaused=!0,clearInterval(l),this.stopMic()}}}startMic(e){return T(this,void 0,void 0,(function*(){let t;try{t=yield navigator.mediaDevices.getUserMedia({audio:null==e||e})}catch(t){throw new Error("Error accessing the microphone: "+t.message)}const{onDestroy:n,onEnd:r}=this.renderMicStream(t);return this.subscriptions.push(this.once("destroy",n)),this.subscriptions.push(this.once("record-end",r)),this.stream=t,t}))}
1stopMic(){this.stream&&(this.stream.getTracks().forEach((e=>e.stop())),this.stream=null,this.mediaRecorder=null)}startRecording(e){return T(this,void 0,void 0,(function*(){const t=this.stream||(yield this.startMic(e));this.dataWindow=null;const n=this.mediaRecorder||new MediaRecorder(t,{mimeType:this.options.mimeType||D.find((e=>MediaRecorder.isTypeSupported(e))),audioBitsPerSecond:this.options.audioBitsPerSecond});this.mediaRecorder=n,this.stopRecording();const r=[];n.ondataavailable=e=>{e.data.size>0&&r.push(e.data),this.emit("record-data-available",e.data)};const i=e=>{var t;const i=new Blob(r,{type:n.mimeType});this.emit(e,i),this.options.renderRecordedAudio&&(this.applyOriginalOptionsIfNeeded(),null===(t=this.wavesurfer)||void 0===t||t.load(URL.createObjectURL(i)))};n.onpause=()=>i("record-pause"),n.onstop=()=>i("record-end"),n.start(this.options.mediaRecorderTimeslice),this.lastStartTime=performance.now(),this.lastDuration=0,this.duration=0,this.isWaveformPaused=!1,this.timer.start(),this.emit("record-start")}))}getDuration(){return this.duration}isRecording(){var e;return"recording"===(null===(e=this.mediaRecorder)||void 0===e?void 0:e.state)}isPaused(){var e;return"paused"===(null===(e=this.mediaRecorder)||void 0===e?void 0:e.state)}isActive(){var e;return"inactive"!==(null===(e=this.mediaRecorder)||void 0===e?void 0:e.state)}stopRecording(){var e;this.isActive()&&(null===(e=this.mediaRecorder)||void 0===e||e.stop(),this.timer.stop())}pauseRecording(){var e,t;this.isRecording()&&(this.isWaveformPaused=!0,null===(e=this.mediaRecorder)||void 0===e||e.requestData(),null===(t=this.mediaRecorder)||void 0===t||t.pause(),this.timer.stop(),this.lastDuration=this.duration)}resumeRecording(){var e;this.isPaused()&&(this.isWaveformPaused=!1,null===(e=this.mediaRecorder)||void 0===e||e.resume(),this.timer.start(),this.lastStartTime=performance.now(),this.emit("record-resume"))}static getAvailableAudioDevices(){return T(this,void 0,void 0,(function*(){return navigator.mediaDevices.enumerateDevices().then((e=>e.filter((e=>"audioinput"===e.kind))))}))}destroy(){this.applyOriginalOptionsIfNeeded(),super.destroy(),this.stopRecording(),this.stopMic()}applyOriginalOptionsIfNeeded(){this.wavesurfer&&this.originalOptions&&(this.wavesurfer.setOptions(this.originalOptions),delete this.originalOptions)}}let W={data:""},L=/(?:([\u0080-\uFFFF\w-%@]+) *:? *([^{;]+?);|([^;}{]*?) *{)|(}\s*)/g,_=/\/\*[^]*?\*\/| +/g,F=/\n+/g,A=(e,t)=>{let n="",r="",i="";for(let o in e){let a=e[o];"@"==o[0]?"i"==o[1]?n=o+" "+a+";":r+="f"==o[1]?A(a,o):o+"{"+A(a,"k"==o[1]?"":t)+"}":"object"==typeof a?r+=A(a,t?t.replace(/([^,])+/g,(e=>o.replace(/([^,]*:\S+\([^)]*\))|([^,])+/g,(t=>/&/.test(t)?t.replace(/&/g,e):e?e+" "+t:t)))):o):null!=a&&(o=/^--/.test(o)?o:o.replace(/[A-Z]/g,"-$&").toLowerCase(),i+=A.p?A.p(o,a):o+":"+a+";")}return n+(t&&i?t+"{"+i+"}":i)+r},z={},O=e=>{if("object"==typeof e){let t="";for(let n in e)t+=n+O(e[n]);return t}return e};function B(e){let t=this||{},n=e.call?e(t.p):e;return((e,t,n,r,i)=>{let o=O(e),a=z[o]||(z[o]=(e=>{let t=0,n=11;for(;t<e.length;)n=101*n+e.charCodeAt(t++)>>>0;return"go"+n})(o));if(!z[a]){let t=o!==e?e:(e=>{let t,n,r=[{}];for(;t=L.exec(e.replace(_,""));)t[4]?r.shift():t[3]?(n=t[3].replace(F," ").trim(),r.unshift(r[0][n]=r[0][n]||{})):r[0][t[1]]=t[2].replace(F," ").trim();return r[0]})(e);z[a]=A(i?{["@keyframes "+a]:t}:t,n?"":"."+a)}let s=n&&z.g?z.g:null;return n&&(z.g=z[a]),((e,t,n,r)=>{r?t.data=t.data.replace(r,e):-1===t.data.indexOf(e)&&(t.data=n?e+t.data:t.data+e)})(z[a],t,r,s),a})(n.unshift?n.raw?((e,t,n)=>e.reduce(((e,r,i)=>{let o=t[i];if(o&&o.call){let e=o(n),t=e&&e.props&&e.props.className||/^go/.test(e)&&e;o=t?"."+t:e&&"object"==typeof e?e.props?"":A(e,""):!1===e?"":e}return e+r+(null==o?"":o)}),""))(n,[].slice.call(arguments,1),t.p):n.reduce(((e,n)=>Object.assign(e,n&&n.call?n(t.p):n)),{}):n,(e=>"object"==typeof window?((e?e.querySelector("#_goober"):window._goober)||Object.assign((e||document.head).appendChild(document.createElement("style")),{innerHTML:" ",id:"_goober"})).firstChild:e||W)(t.target),t.g,t.o,t.k)}B.bind({g:1});let I,H,j,V=B.bind({k:1});function U(e,t){let n=this||{};return function(){let r=arguments;function i(o,a){let s=Object.assign({},o),l=s.className||i.className;n.p=Object.assign({theme:H&&H()},s),n.o=/ *go\d+/.test(l),s.className=B.apply(n,r)+(l?" "+l:""),t&&(s.ref=a);let c=e;
1return e[0]&&(c=s.as||e,delete s.as),j&&c[0]&&j(s),I(c,s)}return t?t(i):i}}var q=(e,t)=>(e=>"function"==typeof e)(e)?e(t):e,G=(()=>{let e=0;return()=>(++e).toString()})(),Z=(()=>{let e;return()=>{if(void 0===e&&typeof window<"u"){let t=matchMedia("(prefers-reduced-motion: reduce)");e=!t||t.matches}return e}})(),Y=(e,t)=>{switch(t.type){case 0:return{...e,toasts:[t.toast,...e.toasts].slice(0,20)};case 1:return{...e,toasts:e.toasts.map((e=>e.id===t.toast.id?{...e,...t.toast}:e))};case 2:let{toast:n}=t;return Y(e,{type:e.toasts.find((e=>e.id===n.id))?1:0,toast:n});case 3:let{toastId:r}=t;return{...e,toasts:e.toasts.map((e=>e.id===r||void 0===r?{...e,dismissed:!0,visible:!1}:e))};case 4:return void 0===t.toastId?{...e,toasts:[]}:{...e,toasts:e.toasts.filter((e=>e.id!==t.toastId))};case 5:return{...e,pausedAt:t.time};case 6:let i=t.time-(e.pausedAt||0);return{...e,pausedAt:void 0,toasts:e.toasts.map((e=>({...e,pauseDuration:e.pauseDuration+i})))}}},X=[],K={toasts:[],pausedAt:void 0},J=e=>{K=Y(K,e),X.forEach((e=>{e(K)}))},Q={blank:4e3,error:4e3,success:2e3,loading:1/0,custom:4e3},ee=e=>(t,n)=>{let r=((e,t="blank",n)=>({createdAt:Date.now(),visible:!0,dismissed:!1,type:t,ariaProps:{role:"status","aria-live":"polite"},message:e,pauseDuration:0,...n,id:(null==n?void 0:n.id)||G()}))(t,e,n);return J({type:2,toast:r}),r.id},te=(e,t)=>ee("blank")(e,t);te.error=ee("error"),te.success=ee("success"),te.loading=ee("loading"),te.custom=ee("custom"),te.dismiss=e=>{J({type:3,toastId:e})},te.remove=e=>J({type:4,toastId:e}),te.promise=(e,t,n)=>{let r=te.loading(t.loading,{...n,...null==n?void 0:n.loading});return"function"==typeof e&&(e=e()),e.then((e=>{let i=t.success?q(t.success,e):void 0;return i?te.success(i,{id:r,...n,...null==n?void 0:n.success}):te.dismiss(r),e})).catch((e=>{let i=t.error?q(t.error,e):void 0;i?te.error(i,{id:r,...n,...null==n?void 0:n.error}):te.dismiss(r)})),e};var ne=(e,t)=>{J({type:1,toast:{id:e,height:t}})},re=()=>{J({type:5,time:Date.now()})},ie=new Map,oe=V` 2from { 3 transform: scale(0) rotate(45deg); 4 opacity: 0; 5} 6to { 7 transform: scale(1) rotate(45deg); 8 opacity: 1; 9}`,ae=V` 10from { 11 transform: scale(0); 12 opacity: 0; 13} 14to { 15 transform: scale(1); 16 opacity: 1; 17}`,se=V` 18from { 19 transform: scale(0) rotate(90deg); 20 opacity: 0; 21} 22to { 23 transform: scale(1) rotate(90deg); 24 opacity: 1; 25}`,le=U("div")` 26 width: 20px; 27 opacity: 0; 28 height: 20px; 29 border-radius: 10px; 30 background: ${e=>e.primary||"#ff4b4b"}; 31 position: relative; 32 transform: rotate(45deg); 33 34 animation: ${oe} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 35 forwards; 36 animation-delay: 100ms; 37 38 &:after, 39 &:before { 40 content: ''; 41 animation: ${ae} 0.15s ease-out forwards; 42 animation-delay: 150ms; 43 position: absolute; 44 border-radius: 3px; 45 opacity: 0; 46 background: ${e=>e.secondary||"#fff"}; 47 bottom: 9px; 48 left: 4px; 49 height: 2px; 50 width: 12px; 51 } 52 53 &:before { 54 animation: ${se} 0.15s ease-out forwards; 55 animation-delay: 180ms; 56 transform: rotate(90deg); 57 } 58`,ce=V` 59 from { 60 transform: rotate(0deg); 61 } 62 to { 63 transform: rotate(360deg); 64 } 65`,de=U("div")` 66 width: 12px; 67 height: 12px; 68 box-sizing: border-box; 69 border: 2px solid; 70 border-radius: 100%; 71 border-color: ${e=>e.secondary||"#e0e0e0"}; 72 border-right-color: ${e=>e.primary||"#616161"}; 73 animation: ${ce} 1s linear infinite; 74`,ue=V` 75from { 76 transform: scale(0) rotate(45deg); 77 opacity: 0; 78} 79to { 80 transform: scale(1) rotate(45deg); 81 opacity: 1; 82}`,he=V` 830% { 84 height: 0; 85 width: 0; 86 opacity: 0; 87} 8840% { 89 height: 0; 90 width: 6px; 91 opacity: 1; 92} 93100% { 94 opacity: 1; 95 height: 10px; 96}`,me=U("div")` 97 width: 20px; 98 opacity: 0; 99 height: 20px; 100 border-radius: 10px; 101 background: ${e=>e.primary||"#61d345"}; 102 position: relative; 103 transform: rotate(45deg); 104 105 animation: ${ue} 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 106 forwards; 107 animation-delay: 100ms; 108 &:after { 109 content: ''; 110 box-sizing: border-box; 111 animation: ${he} 0.2s ease-out forwards; 112 opacity: 0; 113 animation-delay: 200ms; 114 position: absolute; 115 border-right: 2px solid; 116 border-bottom: 2px solid; 117 border-color: ${e=>e.secondary||"#fff"}; 118 bottom: 6px; 119 left: 6px; 120 height: 10px; 121 width: 6px; 122 } 123`,pe=U("div")` 124 position: absolute; 125`,ge=U("div")` 126 position: relative; 127 display: flex; 128 justify-content: center; 129 align-items: center;
130 min-width: 20px; 131 min-height: 20px; 132`,fe=V` 133from { 134 transform: scale(0.6); 135 opacity: 0.4; 136} 137to { 138 transform: scale(1); 139 opacity: 1; 140}`,be=U("div")` 141 position: relative; 142 transform: scale(0.6); 143 opacity: 0.4; 144 min-width: 20px; 145 animation: ${fe} 0.3s 0.12s cubic-bezier(0.175, 0.885, 0.32, 1.275) 146 forwards; 147`,ve=({toast:e})=>{let{icon:t,type:n,iconTheme:r}=e;return void 0!==t?"string"==typeof t?o.createElement(be,null,t):t:"blank"===n?null:o.createElement(ge,null,o.createElement(de,{...r}),"loading"!==n&&o.createElement(pe,null,"error"===n?o.createElement(le,{...r}):o.createElement(me,{...r})))},we=e=>`\n0% {transform: translate3d(0,${-200*e}%,0) scale(.6); opacity:.5;}\n100% {transform: translate3d(0,0,0) scale(1); opacity:1;}\n`,ye=e=>`\n0% {transform: translate3d(0,0,-1px) scale(1); opacity:1;}\n100% {transform: translate3d(0,${-150*e}%,-1px) scale(.6); opacity:0;}\n`,Ee=U("div")` 148 display: flex; 149 align-items: center; 150 background: #fff; 151 color: #363636; 152 line-height: 1.3; 153 will-change: transform; 154 box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1), 0 3px 3px rgba(0, 0, 0, 0.05); 155 max-width: 350px; 156 pointer-events: auto; 157 padding: 8px 10px; 158 border-radius: 8px; 159`,ke=U("div")` 160 display: flex; 161 justify-content: center; 162 margin: 4px 10px; 163 color: inherit; 164 flex: 1 1 auto; 165 white-space: pre-line; 166`,Ce=o.memo((({toast:e,position:t,style:n,children:r})=>{let i=e.height?((e,t)=>{let n=e.includes("top")?1:-1,[r,i]=Z()?["0%{opacity:0;} 100%{opacity:1;}","0%{opacity:1;} 100%{opacity:0;}"]:[we(n),ye(n)];return{animation:t?`${V(r)} 0.35s cubic-bezier(.21,1.02,.73,1) forwards`:`${V(i)} 0.4s forwards cubic-bezier(.06,.71,.55,1)`}})(e.position||t||"top-center",e.visible):{opacity:0},a=o.createElement(ve,{toast:e}),s=o.createElement(ke,{...e.ariaProps},q(e.message,e));return o.createElement(Ee,{className:e.className,style:{...i,...n,...e.style}},"function"==typeof r?r({icon:a,message:s}):o.createElement(o.Fragment,null,a,s))}));!function(e){A.p=void 0,I=e,H=void 0,j=void 0}(o.createElement);var xe=({id:e,className:t,style:n,onHeightUpdate:r,children:i})=>{let a=o.useCallback((t=>{if(t){let n=()=>{let n=t.getBoundingClientRect().height;r(e,n)};n(),new MutationObserver(n).observe(t,{subtree:!0,childList:!0,characterData:!0})}}),[e,r]);return o.createElement("div",{ref:a,className:t,style:n},i)},Se=B` 167 z-index: 9999; 168 > * { 169 pointer-events: auto; 170 } 171`,$e=({reverseOrder:e,position:t="top-center",toastOptions:n,gutter:r,children:i,containerStyle:a,containerClassName:s})=>{let{toasts:l,handlers:c}=(e=>{let{toasts:t,pausedAt:n}=((e={})=>{let[t,n]=(0,o.useState)(K),r=(0,o.useRef)(K);(0,o.useEffect)((()=>(r.current!==K&&n(K),X.push(n),()=>{let e=X.indexOf(n);e>-1&&X.splice(e,1)})),[]);let i=t.toasts.map((t=>{var n,r,i;return{...e,...e[t.type],...t,removeDelay:t.removeDelay||(null==(n=e[t.type])?void 0:n.removeDelay)||(null==e?void 0:e.removeDelay),duration:t.duration||(null==(r=e[t.type])?void 0:r.duration)||(null==e?void 0:e.duration)||Q[t.type],style:{...e.style,...null==(i=e[t.type])?void 0:i.style,...t.style}}}));return{...t,toasts:i}})(e);(0,o.useEffect)((()=>{if(n)return;let e=Date.now(),r=t.map((t=>{if(t.duration===1/0)return;let n=(t.duration||0)+t.pauseDuration-(e-t.createdAt);if(!(n<0))return setTimeout((()=>te.dismiss(t.id)),n);t.visible&&te.dismiss(t.id)}));return()=>{r.forEach((e=>e&&clearTimeout(e)))}}),[t,n]);let r=(0,o.useCallback)((()=>{n&&J({type:6,time:Date.now()})}),[n]),i=(0,o.useCallback)(((e,n)=>{let{reverseOrder:r=!1,gutter:i=8,defaultPosition:o}=n||{},a=t.filter((t=>(t.position||o)===(e.position||o)&&t.height)),s=a.findIndex((t=>t.id===e.id)),l=a.filter(((e,t)=>t<s&&e.visible)).length;return a.filter((e=>e.visible)).slice(...r?[l+1]:[0,l]).reduce(((e,t)=>e+(t.height||0)+i),0)}),[t]);return(0,o.useEffect)((()=>{t.forEach((e=>{if(e.dismissed)((e,t=1e3)=>{if(ie.has(e))return;let n=setTimeout((()=>{ie.delete(e),J({type:4,toastId:e})}),t);ie.set(e,n)})(e.id,e.removeDelay);else{let t=ie.get(e.id);t&&(clearTimeout(t),ie.delete(e.id))}}))}),[t]),{toasts:t,handlers:{updateHeight:ne,startPause:re,endPause:r,calculateOffset:i}}})(n);return o.createElement("div",{id:"_rht_toaster",style:{position:"fixed",zIndex:9999,top:16,left:16,right:16,bottom:16,pointerEvents:"none",...a},className:s,onMouseEnter:c.startPause,onMouseLeave:c.endPause},l.map((n=>{let a=n.position||t,s=((e,t)=>{let n=e.includes("top"),r=n?{top:0}:{bottom:0},i=e.includes("center")?{justifyContent:"center"}:e.includes("right")?{justifyContent:"flex-end"}:{};return{left:0,right:0,display:"flex",position:"absolute",transition:Z()?void 0:"all 230ms cubic-bezier(.21,1.02,.73,1)",transform:`translateY(${t*(n?1:-1)}px)`,...r,...i}})(a,c.calculateOffset(n,{reverseOrder:e,gutter:r,defaultPosition:t}));return o.createElement(xe,{id:n.id,key:n.id,onHeightUpdate:c.updateHeight,className:n.visible?Se:"",style:s},"custom"===n.type?q(n.message,n):i?i(n):o.createElement(Ce,{toast:n,position:a}))})))},Te=te;const Re=({onSubmit:e,onCancel:t,isSending:n,buttons:r})=>{const[i,a]=(0,o.useState)(""),[s,l]=(0,o.useState)(""),[c,d]=(0,o.useState)({});return(0,o.createElement)("form",{onSubmit:t=>{t.preventDefault(),(()=>{const e={};return i.trim()||(e.name="Name is required"),s.trim()?/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(s)||(e.email="Invalid email address"):e.email="Email is required",d(e),0===Object.keys(e).length})()&&e(i,s)},className:"bplvf-email-gate"},(0,o.createElement)("div",{className:"gate-header"},(0,o.createElement)("h4",null,"Almost there!"),(0,o.createElement)("p",null,"Please provide your name and email to submit your feedback.")),(0,o.createElement)("div",{className:"gate-fields"},(0,o.createElement)("div",{className:"form-group"},(0,o.createElement)("label",{htmlFor:"gate-name"},"Name"),(0,o.createElement)("input",{type:"text",id:"gate-name",value:i,onChange:e=>a(e.target.value),placeholder:"Your Name",disabled:n,className:c.name?"has-error":""}),c.name&&(0,o.createElement)("span",{className:"error-message"},c.name)),(0,o.createElement)("div",{className:"form-group"},(0,o.createElement)("label",{htmlFor:"gate-email"},"Email"),(0,o.createElement)("input",{type:"email",id:"gate-email",value:s,onChange:e=>l(e.target.value),placeholder:"Your Email",disabled:n,className:c.email?"has-error":""}),c.email&&(0,o.createElement)("span",{className:"error-message"},c.email))),(0,o.createElement)("div",{className:"gate-actions"},(0,o.createElement)("button",{type:"button",onClick:t,disabled:n,className:"cancel-btn"},"Cancel"),(0,o.createElement)("button",{type:"submit",disabled:n,className:"submit-btn"},n?"Sending...":"Submit")))},Me=e=>{const{hasRecording:t,isRecordingUIReady:n,isRecording:r,handleClear:i,handlePlay:a,handleSend:s,startRecording:l,stopRecording:c,isPlaying:d,isSending:u,attributes:h,videoPreviewURL:m,setRecordingMode:p,recordingMode:g,setElapsedTime:f,setIsPaused:b}=e,{voiceFeedback:v,recordingTabs:w}=h,{audioTab:y,screenTab:E}=w,{startRecordingText:k,startScreenRecordingText:C="Start Screen Recording",isScreenRecord:x=!1}=v;if((0,o.useEffect)((()=>{const e=e=>{if(r)return e.preventDefault(),e.returnValue="You have a recording in progress. Are you sure you want to leave?","You have a recording in progress. Are you sure you want to leave?"};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}}),[r]),e.showEmailGate)return(0,o.createElement)(Re,{onSubmit:e.handleEmailGateSubmit,onCancel:()=>e.setShowEmailGate(!1),isSending:u,buttons:e.attributes?.buttons});const S=e=>{f(0),b(!1),l(e)},$=()=>(0,o.createElement)(o.Fragment,null,n&&!t&&(0,o.createElement)("div",{className:"waveform-record"}),t&&(0,o.createElement)("div",{className:"waveform-playback"}),window.voiceRecorder?.captcha_enabled&&"visible"===window.voiceRecorder?.captcha_mode&&t&&(0,o.createElement)("div",{ref:e.turnstileContainerRef,className:"bplvf-turnstile-inline",style:{marginTop:"12px",marginBottom:"16
171px",display:"flex",justifyContent:"center"}}),(0,o.createElement)("div",{className:"feedback-buttons"},!r&&!t&&(0,o.createElement)("button",{onClick:()=>S("audio"),className:"startBtn"},w?.buttons?.isDisplayIcon&&(0,o.createElement)("span",{dangerouslySetInnerHTML:{__html:y?.icon}}),(0,o.createElement)("span",null,k)),r&&(0,o.createElement)("button",{onClick:()=>c("audio")},(0,o.createElement)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"})),(0,o.createElement)("span",null,"Stop")),t&&(0,o.createElement)(o.Fragment,null,(0,o.createElement)("button",{onClick:a},d?(0,o.createElement)(o.Fragment,null,(0,o.createElement)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48z"})),(0,o.createElement)("span",null,"Stop")):(0,o.createElement)(o.Fragment,null,(0,o.createElement)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 448 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"})),(0,o.createElement)("span",null,"Play"))),(0,o.createElement)("button",{className:"sendBtn",onClick:s,disabled:u},(0,o.createElement)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M435.9 64.9l-367.1 160c-6.5 3.1-6.3 12.4.3 15.3l99.3 56.1c5.9 3.3 13.2 2.6 18.3-1.8l195.8-168.8c1.3-1.1 4.4-3.2 5.6-2 1.3 1.3-.7 4.3-1.8 5.6L216.9 320.1c-4.7 5.3-5.4 13.1-1.6 19.1l64.9 104.1c3.2 6.3 12.3 6.2 15.2-.2L447.2 76c3.3-7.2-4.2-14.5-11.3-11.1z"})),(0,o.createElement)("span",null,"Send")),(0,o.createElement)("button",{onClick:i},(0,o.createElement)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",height:"1em",width:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"})),(0,o.createElement)("span",null,"Clear")),(0,o.createElement)("button",{onClick:()=>l("audio")},(0,o.createElement)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{fill:"none",d:"M24 24H0V0h24v24z"}),(0,o.createElement)("circle",{cx:"12",cy:"12",r:"8"})),(0,o.createElement)("span",null,"Record Again")))));return x?(0,o.createElement)("div",null,(0,o.createElement)("div",{className:"recording-mode-toggle",style:{marginBottom:"20px"}},(0,o.createElement)("button",{onClick:()=>{t?(i(),p("audio")):p("audio")},className:"audioBtn "+("audio"===g?"active":"")},w?.buttons?.isDisplayIcon&&(0,o.createElement)("span",{dangerouslySetInnerHTML:{__html:y?.icon}}),w?.buttons?.isDisplayText&&(0,o.createElement)("h3",null,y?.text)),(0,o.createElement)("button",{onClick:()=>p("screen"),className:"screenBtn "+("screen"===g?"active":"")},w?.buttons?.isDisplayIcon&&(0,o.createElement)("span",{dangerouslySetInnerHTML:{__html:E?.icon}}),w?.buttons?.isDisplayText&&(0,o.createElement)("h3",null,E?.text))),"audio"===g?$():(0,o.createElement)("div",{className:"feedback-buttons"},!r&&!t&&(0,o.createElement)("button",{onClick:()=>{S("screen")},className:"startBtn"},w?.buttons?.isDisplayIcon&&(0,o.createElement)("span",{dangerouslySetInnerHTML:{__html:E?.icon}}),(0,o.createElement)("span",null,C)),t&&(0,o.createElement)("div",{style:{display:"flex",width:"100%",flexDirection:"column",alignItems:"center"}},(0,o.createElement)("video",{src:m||"",controls:!0,style:{maxWidth:"80%",maxHeight:"300px",borderRadius:"10px",boxShadow:"0 4px 8px rgba(0,0,0,0.1)"}})),t&&(0,o.createElement)(o.Fragment,null,window.voiceRecorder?.captcha_enabled&&"visible"===window.voiceRecorder?.captcha_mode&&(0,o.createElement)("div",{ref:e.turnstileContainerRef,className:"bplvf-turnstile-inline",style:{width:"100%",marginTop:"12px",marginBottom:"16
171px",display:"flex",justifyContent:"center"}}),(0,o.createElement)("button",{className:"sendBtn",onClick:s,disabled:u},(0,o.createElement)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 512 512",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M435.9 64.9l-367.1 160c-6.5 3.1-6.3 12.4.3 15.3l99.3 56.1c5.9 3.3 13.2 2.6 18.3-1.8l195.8-168.8c1.3-1.1 4.4-3.2 5.6-2 1.3 1.3-.7 4.3-1.8 5.6L216.9 320.1c-4.7 5.3-5.4 13.1-1.6 19.1l64.9 104.1c3.2 6.3 12.3 6.2 15.2-.2L447.2 76c3.3-7.2-4.2-14.5-11.3-11.1z"})),(0,o.createElement)("span",null,"Send")),(0,o.createElement)("button",{onClick:i},(0,o.createElement)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",height:"1em",width:"1em",viewBox:"0 0 1024 1024",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{d:"M864 256H736v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zm-200 0H360v-72h304v72z"})),(0,o.createElement)("span",null,"Clear")),(0,o.createElement)("button",{onClick:()=>l("screen")},(0,o.createElement)("svg",{stroke:"currentColor",fill:"currentColor",strokeWidth:"0",viewBox:"0 0 24 24",height:"1em",width:"1em",xmlns:"http://www.w3.org/2000/svg"},(0,o.createElement)("path",{fill:"none",d:"M24 24H0V0h24v24z"}),(0,o.createElement)("circle",{cx:"12",cy:"12",r:"8"})),(0,o.createElement)("span",null,"Record Again"))))):$()},Ne=e=>{const{attributes:t}=e,{alignment:n}=t;return(0,o.createElement)("div",{className:`body-voice-feedback ${n}`},(0,o.createElement)(Me,{...e}))};var De=i(581);const Pe=e=>{const{attributes:t,isVisible:n}=e,[r,i]=(0,o.useState)(!1),{drawer:a}=t,{drawerHeadline:s}=a;return(0,o.createElement)("div",{className:"drawer-voice-feedback"},!r&&(0,o.createElement)("button",{className:`voice-feedback-toggle ${n?"visible":""} delayed`,onClick:()=>i(!0)},s),(0,o.createElement)("div",{className:"voice-feedback-drawer "+(r?"open":"")},(0,o.createElement)("div",{className:"drawer-header"},(0,o.createElement)("h3",null,s),(0,o.createElement)("button",{className:"drawer-close",onClick:()=>i(!1)},(0,o.createElement)(De.US,null))),(0,o.createElement)("div",{className:"drawer-body"},(0,o.createElement)(Me,{...e}))))},We=e=>(0,o.createElement)(Pe,{...e}),Le=()=>(0,o.createElement)("div",null,(0,o.createElement)("h1",null,"Full Screen Feedback")),_e=()=>(0,o.createElement)(o.Fragment,null,"This is Intraction Feedback"),Fe=e=>{const[t,n]=(0,o.useState)(!1),r=(0,o.useRef)(null),[i,a]=(0,o.useState)(0),{attributes:s,isVisible:l}=e,{drawer:c}=s,{drawerHeadline:d}=c,{globalFeedback:u}=s,{sharedData:h}=u,{position:m,contentTitle:p,contentSubTitle:g}=h;return(0,o.useEffect)((()=>{const e=()=>{r.current&&a(r.current.offsetHeight)};return e(),window.addEventListener("resize",e),()=>window.removeEventListener("resize",e)}),[]),(0,o.createElement)("div",{className:`slideIn-feedback ${m} ${l?"visible":""} ${t?"open":""}`,style:{"--slideInHeight":`${i}px`}},(0,o.createElement)("div",{className:"slideIn-feedback-inner"},(0,o.createElement)("div",{className:"slideIn-feedback-toggle"},(0,o.createElement)("button",{onClick:()=>n(!t),className:"toggle-button"},(0,o.createElement)("div",{className:"toggle-text"},d))),(0,o.createElement)("div",{className:"slideIn-feedback-content",ref:r},(0,o.createElement)("h1",{className:"contentTitle"},p),(0,o.createElement)("p",{className:"contentSubTitle"},g),(0,o.createElement)(Me,{...e}))))},Ae=e=>{const{attributes:t,shouldShow:n,closeBanner:r}=e,{globalFeedback:i}=t||{},{sharedData:a={}}=i,{position:s="bottom",contentSubTitle:l=""}=a;return(0,o.createElement)("div",{className:`notification1 notification ${n?"visible":""} ${s}`,role:"region","aria-hidden":!n},(0,o.createElement)("div",{className:"notification1__container"},(0,o.createElement)("div",{className:"notification1__left"},(0,o.createElement)("span",{className:"contentSubTitle"},l)),(0,o.createElement)("div",{className:"notification1__right"},(0,o.createElement)(Me,{...e}),(0,o.createElement)("button",{onClick:r,className:"notification__close-btn","aria-label":"Close notification"},(0,o.createElement)(De.US,{className:"icon"})))))},ze=e=>{const{attributes:t,shouldShow:n,closeBanner:r}=e,{globalFeedback:i}=t,{sharedData:a}=i,{position:s,contentSubTitle:l}=a;return(0,o.createElement)("div",{className:`notification2 notification ${n?"visible":""} ${s}`,role:"region","aria-hidden":!n},(0,o.createElement)("span",{className:"contentSubTitle"},l),(0,o.createElement)("div",{className:"notification2__divider"}),(0,o.createElement)(Me,{...e}),(0,o.createElement)("button",{onClick:()=>r(),className:"notification__close-btn"},(0,o.createElement)(De.US,{className:"icon"})))},Oe=e=>{const{attributes:t,shouldShow:n,closeBanner:r}=e,{globalFeedback:i}=t,{sharedData:a}=i,{position:s,contentTitle:l,contentSubTitle:c}=a;return(0,o.createElement)("div",{className:`notification3 notification ${n?"visible":""} ${s}`,role:"region","aria-hidden":!n},(0,o.createElement)("div",{className:"notification3__content"},(0,o.createElement)("div",{className:"notification__icon-box"},(0,o.createElement)(De.dd,{className:"icon"})),(0,o.createElement)("div",{className:"notification3__text"},(0,o.createElement)("h3",{className:"contentTitle"},l),(0,o.createElement)("p",{className:"contentSubTitle"},c)),(0,o.createElement)("div",{className:"recording-stuff"},(0,o.createElement)(Me,{...e})),(0,o.createElement)("button",{onClick:()=>r(5),className:"notification__close-btn"},(0,o.createElement)(De.US,{className:"icon"}))))},Be=e=>{const{attributes:t,shouldShow:n,closeBanner:r}=e,{globalFeedback:i}=t,{sharedData:a}=i,{position:s,contentSubTitle:l,contentTitle:c}=a;return(0,o.createElement)("div",{className:`notification4 notification ${n?"visible":""} ${s}`,role:"region","aria-hidden":!n},(0,o.createElement)("button",{onClick:()=>r(3),className:"notification__close-btn"},(0,o.createElement)(De.US,{className:"icon"})),(0,o.createElement)("div",{className:"notification4__header"},(0,o.createElement)("div",{className:"notification__icon-box"},(0,o.createElement)(De.ZY,{className:"icon"})),(0,o.createElement)("div",null,(0,o.createElement)("p",{className:"contentTitle"},c),(0,o.createElement)("p",{className:"contentSubTitle"},l))),(0,o.createElement)(Me,{...e}))},Ie=e=>{const{attributes:t,shouldShow:n,closeBanner:r}=e,{globalFeedback:i}=t,{sharedData:a}=i,{position:s,contentSubTitle:l,contentTitle:c}=a;return(0,o.createElement)("div",{className:`notification5 notification ${n?"visible":""} ${s}`,role:"region","aria-hidden":!n},(0,o.createElement)("div",{className:"notification5__header"},(0,o.createElement)("div",null,(0,o.createElement)("h3",{className:"contentTitle"},c),(0,o.createElement)("p",{className:"contentSubTitle"},l)),(0,o.createElement)("button",{onClick:()=>r(12),className:"notification__close-btn"},(0,o.createElement)(De.US,{className:"icon"}))),(0,o.createElement)(Me,{...e}))},He=e=>{const{attributes:t,shouldShow:n,closeBanner:r}=e,{globalFeedback:i}=t,{sharedData:a}=i,{position:s,contentSubTitle:l,contentTitle:c}=a;return(0,o.createElement)("div",{className:`notification6 notification ${n?"visible":""} ${s}`,role:"region","aria-hidden":!n},(0,o.createElement)("div",{className:"notification6__header"},(0,o.createElement)("div",{className:"contentTitle"},(0,o.createElement)(De.ZY,{className:"icon"}),(0,o.createElement)("span",{className:"contentTitle"},c)),(0,o.createElement)("button",{onClick:()=>r(11),className:"notification6__close","aria-label":"Close notification"},(0,o.createElement)(De.US,{className:"icon"}))),(0,o.createElement)("div",{className:"notification6__body"},(0,o.createElement)("p",{className:"contentSubTitle"},l),(0,o.createElement)(Me,{...e})))},je=e=>{const{attributes:t}=e,{globalFeedback:n}=t||{},{reappearTime:r=60,functionality:i={}}=n||{},{showFeedbackOn:a,hideOnScrollUp:s,scrollDistance:l,choosenSectionsIds:c,showAfterTime:d}=i,u="bplvfClosedNotification",m=1e3*(Number(r)||0),[p,g]=(0,o.useState)((()=>{try{const e=localStorage.getItem(u);if(!e)return!1;const t=JSON.parse(e);if(!t||!t.closedAt)return!1;const n=Date.now()-t.closedAt;return m<=0||n<m||(localStorage.removeItem(u),console.log("[notification] co
171oldown expired â removed localStorage key"),!1)}catch(e){return console.warn("[notification] error reading localStorage:",e),!1}})),[f,b]=(0,o.useState)(!1),v=(0,o.useRef)(null),w=()=>{try{localStorage.setItem(u,JSON.stringify({closedAt:Date.now()}))}catch(e){console.warn("[notification] error writing localStorage:",e)}g(!0),b(!1),v.current&&clearTimeout(v.current),m>0&&(v.current=setTimeout((()=>{try{localStorage.removeItem(u)}catch(e){console.warn("[notification] error removing localStorage key:",e)}v.current=null,g(!1)}),m))};(0,o.useEffect)((()=>{if(p&&!(m<=0||v.current)){try{const e=localStorage.getItem(u);if(!e)return;const t=JSON.parse(e);if(!t||!t.closedAt)return;const n=Date.now()-t.closedAt,r=Math.max(0,m-n);if(r<=0)return localStorage.removeItem(u),void g(!1);v.current=setTimeout((()=>{try{localStorage.removeItem(u)}catch(e){console.warn("[notification] error removing localStorage key:",e)}v.current=null,g(!1)}),r)}catch(e){console.warn("[notification] error reading localStorage:",e)}return()=>{v.current&&(clearTimeout(v.current),v.current=null)}}}),[]),(0,o.useEffect)((()=>{!p&&v.current&&(clearTimeout(v.current),v.current=null)}),[p]),(0,h.wd)(p||"onScrollDown"!==a?null:l,b),(0,h.re)(p||"onTargetSectionEnter"!==a?null:c,b),(0,h.qC)(p||"timedFeedback"!==a?null:d,b),(0,h.gf)(p||"scrollEndSection"!==a?null:b),(0,h.Kn)(p||"showWithinSection"!==a?null:c,b),(0,h.fq)(!p&&s?b:null);const y=f&&!p;return(0,o.createElement)(o.Fragment,null,"notification1"===t.globalFeedback.notification.style&&(0,o.createElement)(Ae,{...e,shouldShow:y,closeBanner:w}),"notification2"===t.globalFeedback.notification.style&&(0,o.createElement)(ze,{...e,shouldShow:y,closeBanner:w}),"notification3"===t.globalFeedback.notification.style&&(0,o.createElement)(Oe,{...e,shouldShow:y,closeBanner:w}),"notification4"===t.globalFeedback.notification.style&&(0,o.createElement)(Be,{...e,shouldShow:y,closeBanner:w}),"notification5"===t.globalFeedback.notification.style&&(0,o.createElement)(Ie,{...e,shouldShow:y,closeBanner:w}),"notification6"===t.globalFeedback.notification.style&&(0,o.createElement)(He,{...e,shouldShow:y,closeBanner:w}))},Ve=e=>{const[t,n]=(0,o.useState)(!1),{attributes:r,isVisible:i}=e,{globalFeedback:a}=r,{sharedData:s,stickyFeedback:l}=a,{contentTitle:c,contentSubTitle:d}=s,{buttonContent:u,position:h}=l,{contentType:m,icon:p,text:g}=u;return(0,o.createElement)("div",{className:`bplvf-sticky-feedback ${h}`},(0,o.createElement)("button",{onClick:()=>n(!t),className:`feedback-toggle ${i?"visible":""} ${t?"active":""}`,"aria-label":"Toggle feedback"},"icon"===m?(0,o.createElement)("span",{dangerouslySetInnerHTML:{__html:p}}):(0,o.createElement)("span",null,g)),(0,o.createElement)("div",{className:"sticky-feedback-content "+(t?"show":"")},(0,o.createElement)("h1",{className:"contentTitle"},c),(0,o.createElement)("p",{className:"contentSubTitle"},d),(0,o.createElement)(Me,{...e})))},Ue=e=>{const[t,n]=(0,o.useState)(!1),{attributes:r}=e,{globalFeedback:i}=r,{template:a,functionality:s}=i,{showFeedbackOn:l,hideOnScrollUp:c,scrollDistance:d,choosenSectionsIds:u,showAfterTime:m}=s;return(0,h.wd)("onScrollDown"===l?d:null,n),(0,h.re)("onTargetSectionEnter"===l?u:null,n),(0,h.qC)("timedFeedback"===l?m:null,n),(0,h.gf)("scrollEndSection"===l?n:null),(0,h.Kn)("showWithinSection"===l?u:null,n),(0,h.fq)(c?n:null),(0,o.createElement)(o.Fragment,null,(0,o.createElement)("div",{className:"global-voice-feedback-wrapper"},"defaultDrawer"===a&&(0,o.createElement)(We,{...e,isVisible:t}),"slideIn"===a&&(0,o.createElement)(Fe,{...e,isVisible:t}),"stickyFeedback"===a&&(0,o.createElement)(Ve,{isVisible:t,...e}),"notification"===a&&(0,o.createElement)(je,{...e}),"fullScreen"===a&&(0,o.createElement)(Le,{...e,isVisible:t}),"interaction"===a&&(0,o.createElement)(_e,{...e,isVisible:t})))},qe="https://challenges.cloudflare.com/turnstile/v0/api.js",Ge=({attributes:e,id:t})=>{const[n,r]=(0,o.useState)(!1),[i,a]=(0,o.useState)(!1),[s,l]=(0,o.useState)(!1),[c,d]=(0,o.useState)(!1),[u,h]=(0,o.useState)(!1),[m,p]=(0,o.useState)(!1),[g,f]=(0,o.useState)("audio"),[b,v]=(0,o.useState)(!1),[w,y]=(0,o.useState)(0),[E,k]=(0,o.useState)(null),{buttons:C,voiceFeedback:x}=e,S=(0,o.useRef)(null),[T,R]=(0,o.useState)(null),M=(0,o.useRef)(null);(0,o.useEffect)((()=>
171{if(!window.voiceRecorder?.captcha_enabled)return;if(document.querySelector(`script[src="${qe}"]`))return;const e=document.createElement("script");e.src=qe,e.async=!0,document.head.appendChild(e)}),[]),(0,o.useEffect)((()=>{if(!window.voiceRecorder?.captcha_enabled||"visible"!==window.voiceRecorder?.captcha_mode)return;if(!c){if(null!==M.current&&window.turnstile){try{window.turnstile.remove(M.current)}catch(e){}M.current=null}return void R(null)}let e=null;const t=()=>{if(window.turnstile&&S.current){if(null===M.current)try{M.current=window.turnstile.render(S.current,{sitekey:window.voiceRecorder?.captcha_site_key,size:"normal",callback:e=>{R(e)},"error-callback":()=>{R(null)}})}catch(e){}e&&clearInterval(e)}};return window.turnstile?t():e=setInterval((()=>{window.turnstile&&t()}),100),()=>{if(e&&clearInterval(e),null!==M.current&&window.turnstile){try{window.turnstile.remove(M.current)}catch(e){}M.current=null}R(null)}}),[c]);const N=(0,o.useRef)(null),D=(0,o.useRef)(null),W=(0,o.useRef)(null),L=(0,o.useRef)(null),_=(0,o.useRef)(new Audio),F=(0,o.useRef)(null),A=(0,o.useRef)(null),z=(0,o.useRef)(null),O=(0,o.useRef)(null),B=(0,o.useRef)(null),I=(0,o.useRef)(null),H=(0,o.useCallback)((()=>{L.current&&(L.current.destroy(),L.current=null),L.current=$.create({container:`#${t} .waveform-playback`,waveColor:"#ccc",progressColor:C.normal.bgColor,height:60,responsive:!0,backend:"MediaElement"})}),[C.normal.bgColor,t]),j=(0,o.useCallback)((async(e=g)=>{if("screen"===e)try{const e=await navigator.mediaDevices.getDisplayMedia({video:!0,audio:!0}),t=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),n=new MediaStream([...e.getTracks(),...t.getTracks()]);O.current=n;const i=["video/webm;codecs=vp9,opus","video/webm;codecs=vp8,opus","video/webm"].find((e=>MediaRecorder.isTypeSupported?.(e))),o=new MediaRecorder(n,i?{mimeType:i}:void 0);z.current=o;const a=[];o.ondataavailable=e=>{e.data.size>0&&a.push(e.data)},o.onstop=()=>{const e=new Blob(a,{type:i||"video/webm"}),t=URL.createObjectURL(e);B.current=e,I.current=t,d(!0),r(!1)},o.start(),r(!0),d(!1)}catch(e){Te.error("Couldn't start screen recording!")}else _.current.pause(),_.current.currentTime=0,d(!1),p(!0),h(!0)}),[g]),V=(0,o.useCallback)(((e=g)=>{"screen"===e?("recording"===z.current?.state&&z.current.stop(),O.current&&O.current.getTracks().forEach((e=>e.stop()))):N.current?.isRecording()&&N.current.stopRecording()}),[g]),U=(0,o.useCallback)((()=>{"recording"===z.current?.state&&z.current.pause()}),[]),q=(0,o.useCallback)((()=>{"paused"===z.current?.state&&z.current.resume()}),[]),G=(0,o.useCallback)((()=>{i?(_.current.pause(),_.current.currentTime=0,L.current?.pause()):(_.current.play(),L.current?.play()),a(!i)}),[i]),Z=(0,o.useCallback)((()=>{"screen"===g?(I.current&&URL.revokeObjectURL(I.current),B.current=null,I.current=null,O.current&&O.current.getTracks().forEach((e=>e.stop()))):(A.current&&URL.revokeObjectURL(A.current),F.current=null,N.current=null,_.current.src="",W.current&&(W.current.destroy(),W.current=null),L.current&&(L.current.destroy(),L.current=null)),a(!1),d(!1),p(!1)}),[g]),[Y,X]=(0,o.useState)(!1),K=(0,o.useCallback)((async(e="",n="")=>{let r=null,i="";if("screen"===g){if(!B.current)return void alert("No video to send");r=B.current,i=`screen-${Date.now()}.webm`}else{if(!F.current)return void alert("No audio to send");r=F.current,i=`voice-${Date.now()}.webm`}l(!0);const o=document.querySelector(`#${t} .sendBtn`),a=o?.textContent;o&&(o.disabled=!0,o.textContent="Sending...");try{const t=new File([r],i,{type:r.type}),c=new FormData;c.append("action","save_audio"),c.append("audio",t),c.append("nonce",window.voiceRecorder?.nonce),c.append("sourcePage",window.voiceRecorder?.source_page),c.append("sourceUrl",window.voiceRecorder?.source_url),e&&c.append("userName",e),n&&c.append("userEmail",n);const d=window.voiceRecorder?.hp_field_name;if(d&&c.append(d,""),window.voiceRecorder?.captcha_enabled)try{let e=T;if("visible"!==window.voiceRecorder?.captcha_mode)e=await(s=window.voiceRecorder?.captcha_site_key,new Promise(((e,t)=>{if(!window.turnstile||!s)return void t(new Error("Turnstile unavailable"));const n=document.createElement("div");let r;n.style.display="none",document.body.appendChild(n);const i=()=>{try{void 0!==r&&window.turnstile.remove(r)}catch(e){}n.remove()};try{r=window.turnstile.render(n,{sitekey:s,size:"compact",appearance:"interaction-only",callback:t=>{e(t),i()},"error-callback":()=>{t(new Error("Turnstile error")),i()}}),window.turnstile.execute(r)}catch(e){i(),t(e)}})));else if(!e)throw new Error("Please complete the CAPTCHA verification first.");c.append("cf_turnstile_token",e)}catch(e){return Te.error(e?.message||"CAPTCHA verification failed."),o&&(o.textContent=a,o.disabled=!1),void l(!1)}const u=await fetch(window.voiceRecorder?.ajaxUrl,{method:"POST",body:c});if(!u.ok){let e="Failed to send!";
171try{const t=await u.json();t?.data&&(e="string"==typeof t.data?t.data:t.data?.message||e)}catch(e){}throw new Error(e)}o&&(o.textContent="â
Sent"),Te.success("Successfully Sent!"),Z()}catch(e){Te.error(e?.message||"Failed to send!"),o&&(o.textContent=a)}finally{setTimeout((()=>{o&&(o.textContent=a,o.disabled=!1),l(!1)}),2e3)}var s}),[g,Z,t,T]),J=(0,o.useCallback)((()=>{const e=window.voiceRecorder?.ask_name_email;e?X(!0):K()}),[K]),Q=(0,o.useCallback)((async(e,t)=>{await K(e,t),X(!1)}),[K]);return(0,o.useEffect)((()=>{if(c&&A.current){if(!document.querySelector(`#${t} .waveform-playback`))return;H(),L.current.load(A.current)}}),[c,H,t]),(0,o.useEffect)((()=>{u&&document.querySelector(`#${t} .waveform-record`)&&(async()=>{try{W.current&&(W.current.destroy(),W.current=null),W.current=$.create({container:`#${t} .waveform-record`,waveColor:C.normal.bgColor,progressColor:C.normal.bgColor,height:60,responsive:!0});const e=W.current.registerPlugin(P.create({renderRecordedAudio:!1,scrollingWaveform:!0,continuousWaveform:!1}));N.current=e,e.on("record-end",(e=>{const t=URL.createObjectURL(e);_.current.src=t,F.current=e,A.current=t,d(!0),r(!1)})),await e.startRecording(),r(!0)}catch(e){Te.error("Couldn't start Recording!"),p(!1)}finally{h(!1)}})()}),[u,C.normal.bgColor,t]),(0,o.useEffect)((()=>{const e=()=>{a(!1),L.current?.stop()};return _.current.addEventListener("ended",e),()=>_.current.removeEventListener("ended",e)}),[]),(0,o.useEffect)((()=>()=>{W.current&&W.current.destroy(),L.current&&L.current.destroy(),D.current&&D.current.getTracks().forEach((e=>e.stop()))}),[]),(0,o.useEffect)((()=>{if(n&&!b){const e=setInterval((()=>{y((e=>e+1))}),1e3);return k(e),()=>clearInterval(e)}n&&!b||E&&clearInterval(E)}),[n,b]),(0,o.createElement)(o.Fragment,null,(0,o.createElement)($e,{position:"top-center",reverseOrder:!0}),x?.applyGlobally?(0,o.createElement)(Ue,{attributes:e,isRecording:n,isRecordingUIReady:m,hasRecording:c,isPlaying:i,isSending:s,startRecording:j,stopRecording:V,handlePlay:G,handleClear:Z,handleSend:J,showEmailGate:Y,setShowEmailGate:X,handleEmailGateSubmit:Q,videoPreviewURL:I.current||"",setRecordingMode:f,recordingMode:g,setElapsedTime:y,setIsPaused:v,turnstileContainerRef:S}):(0,o.createElement)(Ne,{attributes:e,isRecording:n,isRecordingUIReady:m,hasRecording:c,isPlaying:i,isSending:s,startRecording:j,stopRecording:V,handlePlay:G,handleClear:Z,handleSend:J,showEmailGate:Y,setShowEmailGate:X,handleEmailGateSubmit:Q,videoPreviewURL:I.current||"",setRecordingMode:f,recordingMode:g,setElapsedTime:y,setIsPaused:v,turnstileContainerRef:S}),"screen"===g&&n&&(0,o.createElement)("div",{style:{position:"fixed",bottom:"20px",left:"215px",transform:"translateX(-50%)",backgroundColor:"rgba(0, 0, 0, 0.8)",color:"white",padding:"10px 20px",borderRadius:"30px",display:"flex",gap:"10px",alignItems:"center",zIndex:1e3}},(0,o.createElement)("span",{style:{marginRight:"10px"}},(ee=w,`${Math.floor(ee/60).toString().padStart(2,"0")}:${(ee%60).toString().padStart(2,"0")}`)),b?(0,o.createElement)("button",{onClick:()=>{v(!1),q?.()},style:{backgroundColor:"#4CAF50",border:"none",padding:"8px 16px",borderRadius:"20px",cursor:"pointer",color:"white"}},"Resume"):(0,o.createElement)("button",{onClick:()=>{v(!0),U?.()},style:{backgroundColor:"#FF9800",border:"none",padding:"8px 16px",borderRadius:"20px",cursor:"pointer",color:"white"}},"Pause"),(0,o.createElement)("button",{onClick:()=>V("screen"),style:{backgroundColor:"#f44336",border:"none",padding:"8px 16px",borderRadius:"20px",cursor:"pointer",color:"white"}},"Stop"),(0,o.createElement)("button",{onClick:()=>{Z(),y(0)},style:{backgroundColor:"#9E9E9E",border:"none",padding:"8px 16px",borderRadius:"20px",cursor:"pointer",color:"white"}},"Cancel")));var ee};document.addEventListener("DOMContentLoaded",(()=>{document.querySelectorAll(".wp-block-bplvf-voice-feedback").forEach((e=>{const t=JSON.parse(e.dataset.attributes),n=e.dataset.nonce;(0,a.H)(e).render((0,o.createElement)(o.Fragment,null,(0,o.createElement)(m,{attributes:t,id:e.id}),(0,o.createElement)(Ge,{attributes:t,id:e.id,nonce:n}))),e?.removeAttribute("data-attributes")}))}
171))})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.