PageSourceSearch

https://www.musiccreator.ai/_next/static/chunks/70694-2a4d1956678fc1ba.js

js musiccreator.ai collected 2026-10-01 15:07:52 UTC 44,123 bytes, 74 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[70694],{10655:(t,e,i)=>{"use strict";t.exports=i(87926).style},11443:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(87985).A)("ChevronsRight",[["path",{d:"m6 17 5-5-5-5",key:"xnjwq"}],["path",{d:"m13 17 5-5-5-5",key:"17xmmf"}]])},17354:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=!1},17641:(t,e,i)=>{"use strict";i.d(e,{Tn:()=>r});var r=function(t){return"function"==typeof t}},25774:(t,e,i)=>{"use strict";function r(t,e,i,r){return new(i||(i=Promise))(function(n,s){function o(t){try{l(r.next(t))}catch(t){s(t)}}function a(t){try{l(r.throw(t))}catch(t){s(t)}}function l(t){var e;t.done?n(t.value):((e=t.value)instanceof i?e:new i(function(t){t(e)})).then(o,a)}l((r=r.apply(t,e||[])).next())})}i.r(e),i.d(e,{default:()=>S}),"function"==typeof SuppressedError&&SuppressedError;class n{constructor(){this.listeners={}}on(t,e,i){if(this.listeners[t]||(this.listeners[t]=new Set),null==i?void 0:i.once){let i=(...r)=>{this.un(t,i),e(...r)};return this.listeners[t].add(i),()=>this.un(t,i)}return this.listeners[t].add(e),()=>this.un(t,e)}un(t,e){var i;null==(i=this.listeners[t])||i.delete(e)}once(t,e){return this.on(t,e,{once:!0})}unAll(){this.listeners={}}emit(t,...e){this.listeners[t]&&this.listeners[t].forEach(t=>t(...e))}}let s={decode:function(t,e){return r(this,void 0,void 0,function*(){let i=new AudioContext({sampleRate:e});try{return yield i.decodeAudioData(t)}finally{i.close()}})},createBuffer:function(t,e){if(!t||0===t.length)throw Error("channelData must be a non-empty array");if(e<=0)throw Error("duration must be greater than 0");if("number"==typeof t[0]&&(t=[t]),!t[0]||0===t[0].length)throw Error("channelData must contain non-empty channel arrays");!function(t){let e=t[0];if(e.some(t=>t>1||t<-1)){let i=e.length,r=0;for(let t=0;t<i;t++){let i=Math.abs(e[t]);i>r&&(r=i)}for(let e of t)for(let t=0;t<i;t++)e[t]/=r}}(t);let i=t.map(t=>t instanceof Float32Array?t:Float32Array.from(t));return{duration:e,length:i[0].length,sampleRate:i[0].length/e,numberOfChannels:i.length,getChannelData:t=>{let e=i[t];if(!e)throw Error(`Channel ${t} not found`);return e},copyFromChannel:AudioBuffer.prototype.copyFromChannel,copyToChannel:AudioBuffer.prototype.copyToChannel}}};function o(t,e,i){let r=function t(e,i){let r=i.xmlns?document.createElementNS(i.xmlns,e):document.createElement(e);for(let[e,n]of Object.entries(i))if("children"===e&&n)for(let[e,i]of Object.entries(n))i instanceof Node?r.appendChild(i):"string"==typeof i?r.appendChild(document.createTextNode(i)):r.appendChild(t(e,i));else"style"===e?Object.assign(r.style,n):"textContent"===e?r.textContent=n:r.setAttribute(e,n.toString());return r}(t,e||{});return null==i||i.appendChild(r),r}var a=Object.freeze({__proto__:null,createElement:o,default:o});let l={fetchBlob:function(t,e,i){return r(this,void 0,void 0,function*(){let n=yield fetch(t,i);if(n.status>=400)throw Error(`Failed to fetch ${t}: ${n.status} (${n.statusText})`);return function(t,e){r(this,void 0,void 0,function*(){if(!t.body||!t.headers)return;let i=t.body.getReader(),r=Number(t.headers.get("Content-Length"))||0,n=0,s=t=>{e(Math.round((n+=(null==t?void 0:t.length)||0)/r*100))};try{for(;;){let t=yield i.read();if(t.done)break;s(t.value)}}catch(t){console.warn("Progress tracking error:",t)}})}(n.clone(),e),n.blob()})}};class h extends n{constructor(t){super(),this.isExternalMedia=!1,t.media?(this.media=t.media,this.isExternalMedia=!0):this.media=document.createElement("audio"),t.mediaControls&&(this.media.controls=!0),t.autoplay&&(this.media.autoplay=!0),null!=t.playbackRate&&this.onMediaEvent("canplay",()=>{null!=t.playbackRate&&(this.media.playbackRate=t.playbackRate)},{once:!0})}onMediaEvent(t,e,i){return this.media.addEventListener(t,e,i),()=>this.media.removeEventListener(t,e,i)}getSrc(){return this.media.currentSrc||this.media.src||""}revokeSrc(){let t=this.getSrc();t.startsWith("blob:")&&URL.revokeObjectURL(t)}canPlayType(t){return""!==this.media.canPlayType(t)}setSrc(t,e){let i=this.getSrc();if(t&&i===t)return;this.revokeSrc();let r=e instanceof Blob&&(this.canPlayType(e.type)||!t)?URL.createObjectURL(e):t;if(i&&this.media.removeAttribute("src"),r||t)try{this.media.src=r}catch(e){this.media.src=t}}destroy(){this.isExternalMedia||(this.media.pause(),this.revokeSrc(),this.media.removeAttribute("src"),this.media.load(),this.media.remove())}setMediaElement(t){this.media=t}play(){return r(this,void 0,void 0,function*(){try{return yield this.media.play()}catch(t){if(t instanceof DOMException&&"AbortError"===t.name)return;throw t}})}pause(){this.media.pause()}isPlaying(){return!this.media.paused&&!this.media.ended}setTime(t){this.media.currentTime=Math.max(0,Math.min(t,this.getDuration()))}getDuration(){return this.media.duration}getCurrentTime(){return this.media.currentTime}getVolume(){return this.media.volume}setVolume(t){this.media.volume=t}getMuted(){return this.media.muted}setMuted(t){this.media.muted=t}getPlaybackRate(){return this.media.playbackRate}isSeeking(){return this.media.seeking}setPlaybackRate(t,e){null!=e&&(this.media.preservesPitch=e),this.media.playbackRate=t}getMediaElement(){return this.media}setSinkId(t){return this.media.setSinkId(t)}}function u(t){return t<0?0:t>1?1:t}
1function d(t,e,i){let r=e-t.left,n=i-t.top;return[r/t.width,n/t.height]}function c(t){return!!(t.barWidth||t.barGap||t.barAlign)}function p(t,e){if(!c(e))return t;let i=e.barWidth||.5,r=i+(e.barGap||i/2);return 0===r?t:Math.floor(t/r)*r}function f({scrollLeft:t,totalWidth:e,numCanvases:i}){if(0===e)return[0];let r=Math.floor(t/e*i);return[r-1,r,r+1]}function m({scrollLeft:t,clientWidth:e,scrollWidth:i}){return 0===i?{startX:0,endX:0}:{startX:t/i,endX:(t+e)/i}}class g extends n{constructor(t,e){super(),this.timeouts=[],this.isScrollable=!1,this.audioData=null,this.resizeObserver=null,this.lastContainerWidth=0,this.isDragging=!1,this.subscriptions=[],this.unsubscribeOnScroll=[],this.dragUnsubscribe=null,this.subscriptions=[],this.options=t;let i=this.parentFromOptionsContainer(t.container);this.parent=i;let[r,n]=this.initHtml();i.appendChild(r),this.container=r,this.scrollContainer=n.querySelector(".scroll"),this.wrapper=n.querySelector(".wrapper"),this.canvasWrapper=n.querySelector(".canvases"),this.progressWrapper=n.querySelector(".progress"),this.cursor=n.querySelector(".cursor"),e&&n.appendChild(e),this.initEvents()}parentFromOptionsContainer(t){let e;if("string"==typeof t?e=document.querySelector(t):t instanceof HTMLElement&&(e=t),!e)throw Error("Container not found");return e}initEvents(){if(this.wrapper.addEventListener("click",t=>{let[e,i]=d(this.wrapper.getBoundingClientRect(),t.clientX,t.clientY);this.emit("click",e,i)}),this.wrapper.addEventListener("dblclick",t=>{let[e,i]=d(this.wrapper.getBoundingClientRect(),t.clientX,t.clientY);this.emit("dblclick",e,i)}),!0!==this.options.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.scrollContainer.addEventListener("scroll",()=>{let{scrollLeft:t,scrollWidth:e,clientWidth:i}=this.scrollContainer,{startX:r,endX:n}=m({scrollLeft:t,scrollWidth:e,clientWidth:i});this.emit("scroll",r,n,t,t+i)}),"function"==typeof ResizeObserver){let t=this.createDelay(100);this.resizeObserver=new ResizeObserver(()=>{t().then(()=>this.onContainerResize()).catch(()=>{})}),this.resizeObserver.observe(this.scrollContainer)}}onContainerResize(){let t=this.parent.clientWidth;t===this.lastContainerWidth&&"auto"!==this.options.height||(this.lastContainerWidth=t,this.reRender(),this.emit("resize"))}initDrag(){this.dragUnsubscribe||(this.dragUnsubscribe=function(t,e,i,r,n=3,s=0,o=100){if(!t)return()=>{};let a=new Map,l=matchMedia("(pointer: coarse)").matches,h=()=>{},u=u=>{if(u.button!==s||(a.set(u.pointerId,u),a.size>1))return;let d=u.clientX,c=u.clientY,p=!1,f=Date.now(),m=r=>{if(r.defaultPrevented||a.size>1||l&&Date.now()-f<o)return;let s=r.clientX,h=r.clientY,u=s-d,m=h-c;if(p||Math.abs(u)>n||Math.abs(m)>n){r.preventDefault(),r.stopPropagation();let{left:n,top:o}=t.getBoundingClientRect();p||(null==i||i(d-n,c-o),p=!0),e(u,m,s-n,h-o),d=s,c=h}},g=e=>{if(a.delete(e.pointerId),p){let i=e.clientX,n=e.clientY,{left:s,top:o}=t.getBoundingClientRect();null==r||r(i-s,n-o)}h()},v=t=>{a.delete(t.pointerId),t.relatedTarget&&t.relatedTarget!==document.documentElement||g(t)},y=t=>{p&&(t.stopPropagation(),t.preventDefault())},b=t=>{t.defaultPrevented||a.size>1||p&&t.preventDefault()};document.addEventListener("pointermove",m),document.addEventListener("pointerup",g),document.addEventListener("pointerout",v),document.addEventListener("pointercancel",v),document.addEventListener("touchmove",b,{passive:!1}),document.addEventListener("click",y,{capture:!0}),h=()=>{document.removeEventListener("pointermove",m),document.removeEventListener("pointerup",g),document.removeEventListener("pointerout",v),document.removeEventListener("pointercancel",v),document.removeEventListener("touchmove",b),setTimeout(()=>{document.removeEventListener("click",y,{capture:!0})},10)}};return t.addEventListener("pointerdown",u),()=>{h(),t.removeEventListener("pointerdown",u),a.clear()}}(this.wrapper,(t,e,i)=>{let r=this.wrapper.getBoundingClientRect().width;this.emit("drag",u(i/r))},t=>{this.isDragging=!0;let e=this.wrapper.getBoundingClientRect().width;this.emit("dragstart",u(t/e))},t=>{this.isDragging=!1;let e=this.wrapper.getBoundingClientRect().width;
1this.emit("dragend",u(t/e))}),this.subscriptions.push(this.dragUnsubscribe))}initHtml(){let t=document.createElement("div"),e=t.attachShadow({mode:"open"}),i=this.options.cspNonce&&"string"==typeof this.options.cspNonce?this.options.cspNonce.replace(/"/g,""):"";return e.innerHTML=`
2      <style${i?` nonce="${i}"`:""}>
3        :host {
4          user-select: none;
5          min-width: 1px;
6        }
7        :host audio {
8          display: block;
9          width: 100%;
10        }
11        :host .scroll {
12          overflow-x: auto;
13          overflow-y: hidden;
14          width: 100%;
15          position: relative;
16        }
17        :host .noScrollbar {
18          scrollbar-color: transparent;
19          scrollbar-width: none;
20        }
21        :host .noScrollbar::-webkit-scrollbar {
22          display: none;
23          -webkit-appearance: none;
24        }
25        :host .wrapper {
26          position: relative;
27          overflow: visible;
28          z-index: 2;
29        }
30        :host .canvases {
31          min-height: ${this.getHeight(this.options.height,this.options.splitChannels)}px;
32          pointer-events: none;
33        }
34        :host .canvases > div {
35          position: relative;
36        }
37        :host canvas {
38          display: block;
39          position: absolute;
40          top: 0;
41          image-rendering: pixelated;
42        }
43        :host .progress {
44          pointer-events: none;
45          position: absolute;
46          z-index: 2;
47          top: 0;
48          left: 0;
49          width: 0;
50          height: 100%;
51          overflow: hidden;
52        }
53        :host .progress > div {
54          position: relative;
55        }
56        :host .cursor {
57          pointer-events: none;
58          position: absolute;
59          z-index: 5;
60          top: 0;
61          left: 0;
62          height: 100%;
63          border-radius: 2px;
64        }
65      </style>
66
67      <div class="scroll" part="scroll">
68        <div class="wrapper" part="wrapper">
69          <div class="canvases" part="canvases"></div>
70          <div class="progress" part="progress"></div>
71          <div class="cursor" part="cursor"></div>
72        </div>
73      </div>
74    `,[t,e]}setOptions(t){if(this.options.container!==t.container){let e=this.parentFromOptionsContainer(t.container);e.appendChild(this.container),this.parent=e}!0!==t.dragToSeek&&"object"!=typeof this.options.dragToSeek||this.initDrag(),this.options=t,this.reRender()}getWrapper(){return this.wrapper}getWidth(){return this.scrollContainer.clientWidth}getScroll(){return this.scrollContainer.scrollLeft}setScroll(t){this.scrollContainer.scrollLeft=t}setScrollPercentage(t){let{scrollWidth:e}=this.scrollContainer;this.setScroll(e*t)}destroy(){var t;this.subscriptions.forEach(t=>t()),this.container.remove(),this.resizeObserver&&(this.resizeObserver.disconnect(),this.resizeObserver=null),null==(t=this.unsubscribeOnScroll)||t.forEach(t=>t()),this.unsubscribeOnScroll=[]}createDelay(t=10){let e,i,r=()=>{e&&(clearTimeout(e),e=void 0),i&&(i(),i=void 0)};return this.timeouts.push(r),()=>new Promise((n,s)=>{r(),i=s,e=setTimeout(()=>{e=void 0,i=void 0,n()},t)})}getHeight(t,e){var i;let r=(null==(i=this.audioData)?void 0:i.numberOfChannels)||1;return function({optionsHeight:t,optionsSplitChannels:e,parentHeight:i,numberOfChannels:r,defaultHeight:n=128}){if(null==t)return n;let s=Number(t);if(!isNaN(s))return s;if("auto"===t){let t=i||n;return(null==e?void 0:e.every(t=>!t.overlay))?t/r:t}return n}({optionsHeight:t,optionsSplitChannels:e,parentHeight:this.parent.clientHeight,numberOfChannels:r,defaultHeight:128})}convertColorValues(t){return function(t,e){if(!Array.isArray(t))return t||"";if(0===t.length)return"#999";if(t.length<2)return t[0]||"";let i=document.createElement("canvas"),r=i.getContext("2d"),n=i.height*e,s=r.createLinearGradient(0,0,0,n||e),o=1/(t.length-1);return t.forEach((t,e)=>{s.addColorStop(e*o,t)}),s}(t,this.getPixelRatio())}getPixelRatio(){return Math.max(1,window.devicePixelRatio||1)}renderBarWaveform(t,e,i,r){let{width:n,height:s}=i.canvas,{halfHeight:o,barWidth:a,barRadius:l,barIndexScale:h,barSpacing:u}=function({width:t,height:e,length:i,options:r,pixelRatio:n}){let s=r.barWidth?r.barWidth*n:1,o=r.barGap?r.barGap*n:r.barWidth?s/2:0,a=s+o||1;return{halfHeight:e/2,barWidth:s,barGap:o,barRadius:r.barRadius||0,barIndexScale:i>0?t/a/i:0,barSpacing:a}}({width:n,height:s,length:(t[0]||[]).length,options:e,pixelRatio:this.getPixelRatio()}),d=function({channelData:t,barIndexScale:e,barSpacing:i,barWidth:r,halfHeight:n,vScale:s,canvasHeight:o,barAlign:a}){let l=t[0]||[],h=t[1]||l,u=l.length,d=[],c=0,p=0,f=0;for(let t=0;t<=u;t++){let u=Math.round(t*e);if(u>c){let{topHeight:t,totalHeight:e}=function({maxTop:t,maxBottom:e,halfHeight:i,vScale:r}){let n=Math.round(t*i*r);return{topHeight:n,totalHeight:n+Math.round(e*i*r)||1}}({maxTop:p,maxBottom:f,halfHeight:n,vScale:s}),l=function({barAlign:t,halfHeight:e,topHeight:i,totalHeight:r,canvasHeight:n}){return"top"===t?0:"bottom"===t?n-r:e-i}({barAlign:a,halfHeight:n,topHeight:t,totalHeight:e,canvasHeight:o});d.push({x:c*i,y:l,width:r,height:e}),c=u,p=0,f=0}let m=Math.abs(l[t]||0),g=Math.abs(h[t]||0);m>p&&(p=m),g>f&&(f=g)}return d}({channelData:t,barIndexScale:h,barSpacing:u,barWidth:a,halfHeight:o,vScale:r,canvasHeight:s,barAlign:e.barAlign});for(let t of(i.beginPath(),d))l&&"roundRect"in i?i.roundRect(t.x,t.y,t.width,t.height,l):i.rect(t.x,t.y,t.width,t.height);i.fill(),i.closePath()}renderLineWaveform(t,e,i,r){let{width:n,height:s}=i.canvas,o=function({channelData:t,width:e,height:i,vScale:r}){let n=i/2,s=t[0]||[];return[s,t[1]||s].map((t,i)=>{let s=t.length,o=s?e/s:0,a=0===i?-1:1,l=[{x:0,y:n}],h=0,u=0;for(let e=0;e<=s;e++){let i=Math.round(e*o);if(i>h){let t=n+(Math.round(u*n*r)||1)*a;l.push({x:h,y:t}),h=i,u=0}let s=Math.abs(t[e]||0);s>u&&(u=s)}return l.push({x:h,y:n}),l})}({channelData:t,width:n,height:s,vScale:r});for(let t of(i.beginPath(),o))if(t.length){i.moveTo(t[0].x,t[0].y);for(let e=1;e<t.length;e++){let r=t[e];i.lineTo(r.x,r.y)}}i.fill(),i.closePath()}renderWaveform(t,e,i){if(i.fillStyle=this.convertColorValues(e.waveColor),e.renderFunction)return void e.renderFunction(t,i);let r=function({channelData:t,barHeight:e,normalize:i}){var r;let n=e||1;if(!i)return n;let s=t[0];if(!s||0===s.length)return n;let o=0;for(let t=0;t<s.length;t++){let e=Math.abs(null!=(r=s[t])?r:0);e>o&&(o=e)}return o?n/o:n}({channelData:t,barHeight:e.barHeight,normalize:e.normalize});c(e)?this.renderBarWaveform(t,e,i,r):this.renderLineWaveform(t,e,i,r)}renderSingleCanvas(t,e,i,r,n,s,o){let a=this.getPixelRatio(),l=document.createElement("canvas");l.width=Math.round(i*a),l.height=Math.round(r*a),l.style.width=`${i}px`,l.style.height=`${r}px`,l.style.left=`${Math.round(n)}px`,s.appendChild(l);let h=l.getContext("2d");if(e.renderFunction?(h.fillStyle=this.convertColorValues(e.waveColor),e.renderFunction(t,h)):this.renderWaveform(t,e,h),l.width>0&&l.height>0){let t=l.cloneNode(),i=t.getContext("2d");i.drawImage(l,0,0),i.globalCompositeOperation="source-in",i.fillStyle=this.convertColorValues(e.progressColor),i.fillRect(0,0,l.width,l.height),o.appendChild(t)}}renderMultiCanvas(t,e,i,r,n,s){let o=this.getPixelRatio(),{clientWidth:a}=this.scrollContainer,l=i/o,h=function({clientWidth:t,totalWidth:e,options:i}){return p(Math.min(8e3,t,e),i)}({clientWidth:a,totalWidth:l,options:e}),u={};if(0===h)return;let d=i=>{if(i<0||i>=c||u[i])return;u[i]=!0;let o=i*h,a=Math.min(l-o,h);if((a=p(a,e))<=0)return;let d=function({channelData:t,offset:e,clampedWidth:i,totalWidth:r}){return t.map(t=>{let n=Math.floor(e/r*t.length),s=Math.floor((e+i)/r*t.length);return t.slice(n,s)})}({channelData:t,offset:o,clampedWidth:a,totalWidth:l});this.renderSingleCanvas(d,e,a,r,o,n,s)},c=Math.ceil(l/h);if(!this.isScrollable){for(let t=0;t<c;t++)d(t);return}if(f({scrollLeft:this.scrollContainer.scrollLeft,totalWidth:l,numCanvase
74s:c}).forEach(t=>d(t)),c>1){let t=this.on("scroll",()=>{let{scrollLeft:t}=this.scrollContainer;Object.keys(u).length>10&&(n.innerHTML="",s.innerHTML="",u={}),f({scrollLeft:t,totalWidth:l,numCanvases:c}).forEach(t=>d(t))});this.unsubscribeOnScroll.push(t)}}renderChannel(t,e,i,r){var{overlay:n}=e,s=function(t,e){var i={};for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&0>e.indexOf(r)&&(i[r]=t[r]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(r=Object.getOwnPropertySymbols(t);n<r.length;n++)0>e.indexOf(r[n])&&Object.prototype.propertyIsEnumerable.call(t,r[n])&&(i[r[n]]=t[r[n]])}return i}(e,["overlay"]);let o=document.createElement("div"),a=this.getHeight(s.height,s.splitChannels);o.style.height=`${a}px`,n&&r>0&&(o.style.marginTop=`-${a}px`),this.canvasWrapper.style.minHeight=`${a}px`,this.canvasWrapper.appendChild(o);let l=o.cloneNode();this.progressWrapper.appendChild(l),this.renderMultiCanvas(t,s,i,a,o,l)}render(t){return r(this,void 0,void 0,function*(){var e;this.timeouts.forEach(t=>t()),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);let i=this.getPixelRatio(),r=this.scrollContainer.clientWidth,{scrollWidth:n,isScrollable:s,useParentWidth:o,width:a}=function({duration:t,minPxPerSec:e=0,parentWidth:i,fillParent:r,pixelRatio:n}){let s=Math.ceil(t*e),o=s>i,a=!!(r&&!o);return{scrollWidth:s,isScrollable:o,useParentWidth:a,width:(a?i:s)*n}}({duration:t.duration,minPxPerSec:this.options.minPxPerSec||0,parentWidth:r,fillParent:this.options.fillParent,pixelRatio:i});if(this.isScrollable=s,this.wrapper.style.width=o?"100%":`${n}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=t,this.emit("render"),this.options.splitChannels)for(let i=0;i<t.numberOfChannels;i++){let r=Object.assign(Object.assign({},this.options),null==(e=this.options.splitChannels)?void 0:e[i]);this.renderChannel([t.getChannelData(i)],r,a,i)}else{let e=[t.getChannelData(0)];t.numberOfChannels>1&&e.push(t.getChannelData(1)),this.renderChannel(e,this.options,a,0)}Promise.resolve().then(()=>
74this.emit("rendered"))})}reRender(){if(this.unsubscribeOnScroll.forEach(t=>t()),this.unsubscribeOnScroll=[],!this.audioData)return;let{scrollWidth:t}=this.scrollContainer,{right:e}=this.progressWrapper.getBoundingClientRect();if(this.render(this.audioData),this.isScrollable&&t!==this.scrollContainer.scrollWidth){let{right:t}=this.progressWrapper.getBoundingClientRect(),i=function(t){let e=2*t;return(e<0?Math.floor(e):Math.ceil(e))/2}(t-e);this.scrollContainer.scrollLeft+=i}}zoom(t){this.options.minPxPerSec=t,this.reRender()}scrollIntoView(t,e=!1){let{scrollLeft:i,scrollWidth:r,clientWidth:n}=this.scrollContainer,s=t*r,o=i+n,a=n/2;if(this.isDragging)s+30>o?this.scrollContainer.scrollLeft+=30:s-30<i&&(this.scrollContainer.scrollLeft-=30);else{(s<i||s>o)&&(this.scrollContainer.scrollLeft=s-(this.options.autoCenter?a:0));let t=s-i-a;e&&this.options.autoCenter&&t>0&&(this.scrollContainer.scrollLeft+=t)}{let t=this.scrollContainer.scrollLeft,{startX:e,endX:i}=m({scrollLeft:t,scrollWidth:r,clientWidth:n});this.emit("scroll",e,i,t,t+n)}}renderProgress(t,e){if(isNaN(t))return;let i=100*t;this.canvasWrapper.style.clipPath=`polygon(${i}% 0%, 100% 0%, 100% 100%, ${i}% 100%)`,this.progressWrapper.style.width=`${i}%`,this.cursor.style.left=`${i}%`,this.cursor.style.transform=this.options.cursorWidth?`translateX(-${t*this.options.cursorWidth}px)`:"",this.isScrollable&&this.options.autoScroll&&this.scrollIntoView(t,e)}exportImage(t,e,i){return r(this,void 0,void 0,function*(){let r=this.canvasWrapper.querySelectorAll("canvas");if(!r.length)throw Error("No waveform data");return"dataURL"===i?Promise.resolve(Array.from(r).map(i=>i.toDataURL(t,e))):Promise.all(Array.from(r).map(i=>new Promise((r,n)=>{i.toBlob(t=>{t?r(t):n(Error("Could not export image"))},t,e)})))})}}class v extends n{constructor(){super(...arguments),this.animationFrameId=null,this.isRunning=!1}start(){if(this.isRunning)return;this.isRunning=!0;let t=()=>
74{this.isRunning&&(this.emit("tick"),this.animationFrameId=requestAnimationFrame(t))};t()}stop(){this.isRunning=!1,null!==this.animationFrameId&&(cancelAnimationFrame(this.animationFrameId),this.animationFrameId=null)}destroy(){this.stop()}}class y extends n{constructor(t=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=t,this.gainNode=this.audioContext.createGain(),this.gainNode.connect(this.audioContext.destination)}load(){return r(this,void 0,void 0,function*(){})}get src(){return this.currentSrc}set src(t){if(this.currentSrc=t,this._duration=void 0,!t)return this.buffer=null,void this.emit("emptied");fetch(t).then(e=>{if(e.status>=400)throw Error(`Failed to fetch ${t}: ${e.status} (${e.statusText})`);return e.arrayBuffer()}).then(e=>this.currentSrc!==t?null:this.audioContext.decodeAudioData(e)).then(e=>{this.currentSrc===t&&(this.buffer=e,this.emit("loadedmetadata"),this.emit("canplay"),this.autoplay&&this.play())}).catch(t=>{console.error("WebAudioPlayer load error:",t)})}_play(){if(!this.paused)return;this.paused=!1,this.bufferNode&&(this.bufferNode.onended=null,this.bufferNode.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 t;this.paused=!0,null==(t=this.bufferNode)||t.stop(),this.playedDuration+=this.audioContext.currentTime-this.playStartTime}play(){return r(this,void 0,void 0,function*(){this.paused&&(this._play(),this.emit("play"))})}pause(){this.paused||(this._pause(),this.emit("pause"))}stopAt(t){let e=t-this.currentTime,i=this.bufferNode;null==i||i.stop(this.audioContext.currentTime+e),null==i||i.addEventListener("ended",()=>{i===this.bufferNode&&(this.bufferNode=null,this.pause())},{once:!0})}setSinkId(t){return r(this,void 0,void 0,function*(){return this.audioContext.setSinkId(t)})}get playbackRate(){return this._playbackRate}set playbackRate(t){this._playbackRate=t,this.bufferNode&&(this.bufferNode.playbackRate.value=t)}get currentTime(){return(this.paused?this.playedDuration:this.playedDuration+(this.audioContext.currentTime-this.playStartTime))*this._playbackRate}set currentTime(t){let e=!this.paused;e&&this._pause(),this.playedDuration=t/this._playbackRate,e&&this._play(),this.emit("seeking"),this.emit("timeupdate")}get duration(){var t,e;return null!=(t=this._duration)?t:(null==(e=this.buffer)?void 0:e.duration)||0}set duration(t){this._duration=t}get volume(){return this.gainNode.gain.value}set volume(t){this.gainNode.gain.value=t,this.emit("volumechange")}get muted(){return this._muted}set muted(t){this._muted!==t&&(this._muted=t,this._muted?this.gainNode.disconnect():this.gainNode.connect(this.audioContext.destination))}canPlayType(t){return/^(audio|video)\//.test(t)}getGainNode(){return this.gainNode}getChannelData(){let t=[];if(!this.buffer)return t;let e=this.buffer.numberOfChannels;for(let i=0;i<e;i++)t.push(this.buffer.getChannelData(i));return t}removeAttribute(t){switch(t){case"src":this.src="";break;case"playbackRate":this.playbackRate=0;break;case"currentTime":this.currentTime=0;break;case"duration":this.duration=0;break;case"volume":this.volume=0;break;case"muted":this.muted=!1}}}let b={waveColor:"#999",progressColor:"#555",cursorWidth:1,minPxPerSec:0,fillParent:!0,interact:!0,dragToSeek:!1,autoScroll:!0,autoCenter:!0,sampleRate:8e3};class S extends h{static create(t){return new S(t)}constructor(t){let e=t.media||("WebAudio"===t.backend?new y:void 0);
74super({media:e,mediaControls:t.mediaControls,autoplay:t.autoplay,playbackRate:t.audioRate}),this.plugins=[],this.decodedData=null,this.stopAtPosition=null,this.subscriptions=[],this.mediaSubscriptions=[],this.abortController=null,this.options=Object.assign({},b,t),this.timer=new v;let i=e?void 0:this.getMediaElement();this.renderer=new g(this.options,i),this.initPlayerEvents(),this.initRendererEvents(),this.initTimerEvents(),this.initPlugins();let r=this.options.url||this.getSrc()||"";Promise.resolve().then(()=>{this.emit("init");let{peaks:t,duration:e}=this.options;(r||t&&e)&&this.load(r,t,e).catch(t=>{this.emit("error",t instanceof Error?t:Error(String(t)))})})}updateProgress(t=this.getCurrentTime()){return this.renderer.renderProgress(t/this.getDuration(),this.isPlaying()),t}initTimerEvents(){this.subscriptions.push(this.timer.on("tick",()=>{if(!this.isSeeking()){let t=this.updateProgress();this.emit("timeupdate",t),this.emit("audioprocess",t),null!=this.stopAtPosition&&this.isPlaying()&&t>=this.stopAtPosition&&this.pause()}}))}initPlayerEvents(){this.isPlaying()&&(this.emit("play"),this.timer.start()),this.mediaSubscriptions.push(this.onMediaEvent("timeupdate",()=>{let t=this.updateProgress();this.emit("timeupdate",t)}),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 t;this.emit("error",null!=(t=this.getMediaElement().error)?t:Error("Media error")),this.stopAtPosition=null}))}initRendererEvents(){this.subscriptions.push(this.renderer.on("click",(t,e)=>{this.options.interact&&(this.seekTo(t),this.emit("interaction",t*this.getDuration()),this.emit("click",t,e))}),this.renderer.on("dblclick",(t,e)=>{this.emit("dblclick",t,e)}),this.renderer.on("scroll",(t,e,i,r)=>{let n=this.getDuration();this.emit("scroll",t*n,e*n,i,r)}),this.renderer.on("render",()=>{this.emit("redraw")}),this.renderer.on("rendered",()=>{this.emit("redrawcomplete")}
74),this.renderer.on("dragstart",t=>{this.emit("dragstart",t)}),this.renderer.on("dragend",t=>{this.emit("dragend",t)}),this.renderer.on("resize",()=>{this.emit("resize")}));{let t,e=this.renderer.on("drag",e=>{var i;if(!this.options.interact)return;this.renderer.renderProgress(e),clearTimeout(t);let r=0,n=this.options.dragToSeek;this.isPlaying()?r=0:!0===n?r=200:n&&"object"==typeof n&&(r=null!=(i=n.debounceTime)?i:200),t=setTimeout(()=>{this.seekTo(e)},r),this.emit("interaction",e*this.getDuration()),this.emit("drag",e)});this.subscriptions.push(()=>{clearTimeout(t),e()})}}initPlugins(){var t;(null==(t=this.options.plugins)?void 0:t.length)&&this.options.plugins.forEach(t=>{this.registerPlugin(t)})}unsubscribePlayerEvents(){this.mediaSubscriptions.forEach(t=>t()),this.mediaSubscriptions=[]}setOptions(t){this.options=Object.assign({},this.options,t),t.duration&&!t.peaks&&(this.decodedData=s.createBuffer(this.exportPeaks(),t.duration)),t.peaks&&t.duration&&(this.decodedData=s.createBuffer(t.peaks,t.duration)),this.renderer.setOptions(this.options),t.audioRate&&this.setPlaybackRate(t.audioRate),null!=t.mediaControls&&(this.getMediaElement().controls=t.mediaControls)}registerPlugin(t){if(this.plugins.includes(t))return t;t._init(this),this.plugins.push(t);let e=t.once("destroy",()=>{this.plugins=this.plugins.filter(e=>e!==t),this.subscriptions=this.subscriptions.filter(t=>t!==e)});return this.subscriptions.push(e),t}unregisterPlugin(t){this.plugins=this.plugins.filter(e=>e!==t),t.destroy()}getWrapper(){return this.renderer.getWrapper()}getWidth(){return this.renderer.getWidth()}getScroll(){return this.renderer.getScroll()}setScroll(t){return this.renderer.setScroll(t)}setScrollTime(t){let e=t/this.getDuration();this.renderer.setScrollPercentage(e)}getActivePlugins(){return this.plugins}loadAudio(t,e,i,n){return r(this,void 0,void 0,function*(){var r;if(this.emit("load",t),!this.options.media&&this.isPlaying()&&this.pause(),this.decodedData=null,this.stopAtPosition=null,null==(r=this.abortController)||r.abort(),this.abortController=null,!e&&!i){let i=this.options.fetchParams||{};window.AbortController&&!i.signal&&(this.abortController=new AbortController,i.signal=this.abortController.signal);let r=t=>this.emit("loading",t);e=yield l.fetchBlob(t,r,i);let n=this.options.blobMimeType;n&&(e=new Blob([e],{type:n}))}this.setSrc(t,e);let o=yield new Promise(t=>{let e=n||this.getDuration();e?t(e):this.mediaSubscriptions.push(this.onMediaEvent("loadedmetadata",()=>t(this.getDuration()),{once:!0}))});if(!t&&!e){let t=this.getMediaElement();t instanceof y&&(t.duration=o)}if(i)this.decodedData=s.createBuffer(i,o||0);else if(e){let t=yield e.arrayBuffer();this.decodedData=yield s.decode(t,this.options.sampleRate)}this.decodedData&&(this.emit("decode",this.getDuration()),this.renderer.render(this.decodedData)),this.emit("ready",this.getDuration())})}load(t,e,i){return r(this,void 0,void 0,function*(){try{return yield this.loadAudio(t,void 0,e,i)}catch(t){throw this.emit("error",t),t}})}loadBlob(t,e,i){return r(this,void 0,void 0,function*(){try{return yield this.loadAudio("",t,e,i)}catch(t){throw this.emit("error",t),t}})}zoom(t){if(!this.decodedData)throw Error("No audio loaded");this.renderer.zoom(t),this.emit("zoom",t)}getDecodedData(){return this.decodedData}exportPeaks({channels:t=2,maxLength:e=8e3,precision:i=1e4}={}){if(!this.decodedData)throw Error("The audio has not been decoded yet");let r=Math.min(t,this.decodedData.numberOfChannels),n=[];for(let t=0;t<r;t++){let r=this.decodedData.getChannelData(t),s=[],o=r.length/e;for(let t=0;t<e;t++){let e=r.slice(Math.floor(t*o),Math.ceil((t+1)*o)),n=0;for(let t=0;t<e.length;t++){let i=e[t];Math.abs(i)>Math.abs(n)&&(n=i)}s.push(Math.round(n*i)/i)}n.push(s)}return n}getDuration(){let t=super.getDuration()||0;return(0===t||t===1/0)&&this.decodedData&&(t=this.decodedData.duration),t}toggleInteraction(t){this.options.interact=t}setTime(t){this.stopAtPosition=null,super.setTime(t),this.updateProgress(t),this.emit("timeupdate",t)}seekTo(t){let e=this.getDuration()*t;this.setTime(e)}play(t,e){let i=Object.create(null,{play:{get:()=>super.play}});return r(this,void 0,void 0,function*(){null!=t&&this.setTime(t);let r=yield i.play.call(this);return null!=e&&(this.media instanceof y?this.media.stopAt(e):this.stopAtPosition=e),r})}playPause(){return r(this,void 0,void 0,function*(){return this.isPlaying()?this.pause():this.play()})}stop(){this.pause(),this.setTime(0)}skip(t){this.setTime(this.getCurrentTime()+t)}empty(){this.load("",[[0]],.001)}setMediaElement(t){this.unsubscribePlayerEvents(),super.setMediaElement(t),this.initPlayerEvents()}exportImage(){return r(this,arguments,void 0,function*(t="image/png",e=1,i="dataURL"){return this.renderer.exportImage(t,e,i)})}destroy(){var t;
74this.emit("destroy"),null==(t=this.abortController)||t.abort(),this.plugins.forEach(t=>t.destroy()),this.subscriptions.forEach(t=>t()),this.unsubscribePlayerEvents(),this.timer.destroy(),this.renderer.destroy(),super.destroy()}}S.BasePlugin=class extends n{constructor(t){super(),this.subscriptions=[],this.isDestroyed=!1,this.options=t}onInit(){}_init(t){this.isDestroyed&&(this.subscriptions=[],this.isDestroyed=!1),this.wavesurfer=t,this.onInit()}destroy(){this.emit("destroy"),this.subscriptions.forEach(t=>t()),this.subscriptions=[],this.isDestroyed=!0,this.wavesurfer=void 0}},S.dom=a},27682:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(87985).A)("ChevronsLeft",[["path",{d:"m11 17-5-5 5-5",key:"13zhaf"}],["path",{d:"m18 17-5-5 5-5",key:"h8a8et"}]])},34554:(t,e,i)=>{"use strict";i.d(e,{q:()=>a});var r=i(4618),n=i(40182),s=class extends r.${constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){t._type="infinite",super.setOptions(t)}getOptimisticResult(t){return t._type="infinite",super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){let{state:i}=t,r=super.createResult(t,e),{isFetching:s,isRefetching:o,isError:a,isRefetchError:l}=r,h=i.fetchMeta?.fetchMore?.direction,u=a&&"forward"===h,d=s&&"forward"===h,c=a&&"backward"===h,p=s&&"backward"===h;return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:(0,n.rB)(e,i.data),hasPreviousPage:(0,n.RQ)(e,i.data),isFetchNextPageError:u,isFetchingNextPage:d,isFetchPreviousPageError:c,isFetchingPreviousPage:p,isRefetchError:l&&!u&&!c,isRefetching:o&&!d&&!p}}},o=i(83515);function a(t,e){return(0,o.t)(t,s,e)}},59607:()=>{},60763:(t,e,i)=>{"use strict";i.d(e,{A:()=>r});let r=(0,i(87985).A)("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]])},61028:(t,e,i)=>{"use strict";i.d(e,{A:()=>n});var r=i(32110);let n=function(t){var e=(0,r.useRef)(t);return e.current=t,e}},79841:(t,e,i)=>{"use strict";i.d(e,{A:()=>c});var r=i(7024),n=i(32110),s=i(64874),o=i.n(s),a=i(61028),l=i(99407),h=i(17641),u=i(17354);let d=function(t,e){u.A&&!(0,h.Tn)(t)&&console.error("useDebounceFn expected parameter is a function, got ".concat(typeof t));var i,s=(0,a.A)(t),d=null!=(i=null==e?void 0:e.wait)?i:1e3,c=(0,n.useMemo)(function(){return o()(function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return s.current.apply(s,(0,r.fX)([],(0,r.zs)(t),!1))},d,e)},[]);return(0,l.A)(function(){c.cancel()}),{run:c,cancel:c.cancel,flush:c.flush}}
74,c=function(t,e){var i=(0,r.zs)((0,n.useState)(t),2),s=i[0],o=i[1],a=d(function(){o(t)},e).run;return(0,n.useEffect)(function(){a()},[t]),s}},87926:(t,e,i)=>{"use strict";var r=i(37811);i(59607);var n=i(32110),s=function(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}(n),o=void 0!==r&&r.env&&!0,a=function(t){return"[object String]"===Object.prototype.toString.call(t)},l=function(){function t(t){var e=void 0===t?{}:t,i=e.name,r=void 0===i?"stylesheet":i,n=e.optimizeForSpeed,s=void 0===n?o:n;h(a(r),"`name` must be a string"),this._name=r,this._deletedRulePlaceholder="#"+r+"-deleted-rule____{}",h("boolean"==typeof s,"`optimizeForSpeed` must be a boolean"),this._optimizeForSpeed=s,this._serverSheet=void 0,this._tags=[],this._injected=!1,this._rulesCount=0;var l="undefined"!=typeof window&&document.querySelector('meta[property="csp-nonce"]');this._nonce=l?l.getAttribute("content"):null}var e,i=t.prototype;return i.setOptimizeForSpeed=function(t){h("boolean"==typeof t,"`setOptimizeForSpeed` accepts a boolean"),h(0===this._rulesCount,"optimizeForSpeed cannot be when rules have already been inserted"),this.flush(),this._optimizeForSpeed=t,this.inject()},i.isOptimizeForSpeed=function(){return this._optimizeForSpeed},i.inject=function(){var t=this;if(h(!this._injected,"sheet already injected"),this._injected=!0,"undefined"!=typeof window&&this._optimizeForSpeed){this._tags[0]=this.makeStyleTag(this._name),this._optimizeForSpeed="insertRule"in this.getSheet(),this._optimizeForSpeed||(o||console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode."),this.flush(),this._injected=!0);return}this._serverSheet={cssRules:[],insertRule:function(e,i){return"number"==typeof i?t._serverSheet.cssRules[i]={cssText:e}:t._serverSheet.cssRules.push({cssText:e}),i},deleteRule:function(e){t._serverSheet.cssRules[e]=null}}},i.getSheetForTag=function(t){if(t.sheet)return t.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===t)return document.styleSheets[e]},i.getSheet=function(){return this.getSheetForTag(this._tags[this._tags.length-1])},i.insertRule=function(t,e){if(h(a(t),"`insertRule` accepts only strings"),"undefined"==typeof window)return"number"!=typeof e&&(e=this._serverSheet.cssRules.length),this._serverSheet.insertRule(t,e),this._rulesCount++;if(this._optimizeForSpeed){var i=this.getSheet();"number"!=typeof e&&(e=i.cssRules.length);try{i.insertRule(t,e)}catch(e){return o||console.warn("StyleSheet: illegal rule: \n\n"+t+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),-1}}else{var r=this._tags[e];this._tags.push(this.makeStyleTag(this._name,t,r))}return this._rulesCount++},i.replaceRule=function(t,e){if(this._optimizeForSpeed||"undefined"==typeof window){var i="undefined"!=typeof window?this.getSheet():this._serverSheet;if(e.trim()||(e=this._deletedRulePlaceholder),!i.cssRules[t])return t;i.deleteRule(t);try{i.insertRule(e,t)}catch(r){o||console.warn("StyleSheet: illegal rule: \n\n"+e+"\n\nSee https://stackoverflow.com/q/20007992 for more info"),i.insertRule(this._deletedRulePlaceholder,t)}}else{var r=this._tags[t];h(r,"old rule at index `"+t+"` not found"),r.textContent=e}return t},i.deleteRule=function(t){if("undefined"==typeof window)return void this._serverSheet.deleteRule(t);if(this._optimizeForSpeed)this.replaceRule(t,"");else{var e=this._tags[t];h(e,"rule at index `"+t+"` not found"),e.parentNode.removeChild(e),this._tags[t]=null}},i.flush=function(){this._injected=!1,this._rulesCount=0,"undefined"!=typeof window?(this._tags.forEac
74h(function(t){return t&&t.parentNode.removeChild(t)}),this._tags=[]):this._serverSheet.cssRules=[]},i.cssRules=function(){var t=this;return"undefined"==typeof window?this._serverSheet.cssRules:this._tags.reduce(function(e,i){return i?e=e.concat(Array.prototype.map.call(t.getSheetForTag(i).cssRules,function(e){return e.cssText===t._deletedRulePlaceholder?null:e})):e.push(null),e},[])},i.makeStyleTag=function(t,e,i){e&&h(a(e),"makeStyleTag accepts only strings as second parameter");var r=document.createElement("style");this._nonce&&r.setAttribute("nonce",this._nonce),r.type="text/css",r.setAttribute("data-"+t,""),e&&r.appendChild(document.createTextNode(e));var n=document.head||document.getElementsByTagName("head")[0];return i?n.insertBefore(r,i):n.appendChild(r),r},e=[{key:"length",get:function(){return this._rulesCount}}],function(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}(t.prototype,e),t}();function h(t,e){if(!t)throw Error("StyleSheet: "+e+".")}var u=function(t){for(var e=5381,i=t.length;i;)e=33*e^t.charCodeAt(--i);return e>>>0},d={};function c(t,e){if(!e)return"jsx-"+t;var i=String(e),r=t+i;return d[r]||(d[r]="jsx-"+u(t+"-"+i)),d[r]}function p(t,e){"undefined"==typeof window&&(e=e.replace(/\/style/gi,"\\/style"));var i=t+e;return d[i]||(d[i]=e.replace(/__jsx-style-dynamic-selector/g,t)),d[i]}var f=function(){function t(t){var e=void 0===t?{}:t,i=e.styleSheet,r=void 0===i?null:i,n=e.optimizeForSpeed,s=void 0!==n&&n;this._sheet=r||new l({name:"styled-jsx",optimizeForSpeed:s}),this._sheet.inject(),r&&"boolean"==typeof s&&(this._sheet.setOptimizeForSpeed(s),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),this._fromServer=void 0,this._indices={},this._instancesCounts={}}var e=t.prototype;return e.add=function(t){var e=this;void 0===this._optimizeForSpeed&&(this._optimizeForSpeed=Array.isArray(t.children),this._sheet.setOptimizeForSpeed(this._optimizeForSpeed),this._optimizeForSpeed=this._sheet.isOptimizeForSpeed()),"undefined"==typeof window||this._fromServer||(this._fromServer=this.selectFromServer(),this._instancesCounts=Object.keys(this._fromServer).reduce(function(t,e){return t[e]=0,t},{}));var i=this.getIdAndRules(t),r=i.styleId,n=i.rules;if(r in this._instancesCounts){this._instancesCounts[r]+=1;return}var s=n.map(function(t){return e._sheet.insertRule(t)}).filter(function(t){return -1!==t});this._indices[r]=s,this._instancesCounts[r]=1},e.remove=function(t){var e=this,i=this.getIdAndRules(t).styleId;if(function(t,e){if(!t)throw Error("StyleSheetRegistry: "+e+".")}(i in this._instancesCounts,"styleId: `"+i+"` not found"),this._instancesCounts[i]-=1,this._instancesCounts[i]<1){var r=this._fromServer&&this._fromServer[i];r?(r.parentNode.removeChild(r),delete this._fromServer[i]):(this._indices[i].forEac
74h(function(t){return e._sheet.deleteRule(t)}),delete this._indices[i]),delete this._instancesCounts[i]}},e.update=function(t,e){this.add(e),this.remove(t)},e.flush=function(){this._sheet.flush(),this._sheet.inject(),this._fromServer=void 0,this._indices={},this._instancesCounts={}},e.cssRules=function(){var t=this,e=this._fromServer?Object.keys(this._fromServer).map(function(e){return[e,t._fromServer[e]]}):[],i=this._sheet.cssRules();return e.concat(Object.keys(this._indices).map(function(e){return[e,t._indices[e].map(function(t){return i[t].cssText}).join(t._optimizeForSpeed?"":"\n")]}).filter(function(t){return!!t[1]}))},e.styles=function(t){var e,i;return e=this.cssRules(),void 0===(i=t)&&(i={}),e.map(function(t){var e=t[0],r=t[1];return s.default.createElement("style",{id:"__"+e,key:"__"+e,nonce:i.nonce?i.nonce:void 0,dangerouslySetInnerHTML:{__html:r}})})},e.getIdAndRules=function(t){var e=t.children,i=t.dynamic,r=t.id;if(i){var n=c(r,i);return{styleId:n,rules:Array.isArray(e)?e.map(function(t){return p(n,t)}):[p(n,e)]}}return{styleId:c(r),rules:Array.isArray(e)?e:[e]}},e.selectFromServer=function(){return Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]')).reduce(function(t,e){return t[e.id.slice(2)]=e,t},{})},t}(),m=n.createContext(null);m.displayName="StyleSheetContext";var g=s.default.useInsertionEffect||s.default.useLayoutEffect,v="undefined"!=typeof window?new f:void 0;function y(t){var e=v||n.useContext(m);return e&&("undefined"==typeof window?e.add(t):g(function(){return e.add(t),function(){e.remove(t)}},[t.id,String(t.dynamic)])),null}y.dynamic=function(t){return t.map(function(t){return c(t[0],t[1])}).join(" ")},e.style=y},99407:(t,e,i)=>{"use strict";i.d(e,{A:()=>a});var r=i(32110),n=i(61028),s=i(17641),o=i(17354);let a=function(t){o.A&&!(0,s.Tn)(t)&&console.error("useUnmount expected parameter is a function, got ".concat(typeof t));var e=(0,n.A)(t);(0,r.useEffect)(function(){return function(){e.current()}},[])}}}]);

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.