@hyperframes/studio 0.5.1 → 0.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -350,4 +350,4 @@ var j=Object.defineProperty;var V=(a,d,e)=>d in a?j(a,d,{enumerable:!0,configura
350
350
  color: var(--hfp-accent, #fff);
351
351
  font-weight: 600;
352
352
  }
353
- `,F='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><polygon points="4,2 16,9 4,16"/></svg>',q='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><rect x="3" y="2" width="4" height="14"/><rect x="11" y="2" width="4" height="14"/></svg>',B=[.25,.5,1,1.5,2,4];function C(a){return Number.isInteger(a)?`${a}x`:`${a}x`}function D(a){if(!Number.isFinite(a)||a<0)return"0:00";const d=Math.floor(a),e=Math.floor(d/60),t=d%60;return`${e}:${t.toString().padStart(2,"0")}`}function W(a,d,e={}){const t=e.speedPresets??B,r=document.createElement("div");r.className="hfp-controls",r.addEventListener("click",l=>{l.stopPropagation()});const i=document.createElement("button");i.className="hfp-play-btn",i.type="button",i.innerHTML=F,i.setAttribute("aria-label","Play");const s=document.createElement("div");s.className="hfp-scrubber";const n=document.createElement("div");n.className="hfp-progress",n.style.width="0%",s.appendChild(n);const o=document.createElement("span");o.className="hfp-time",o.textContent="0:00 / 0:00";const f=document.createElement("div");f.className="hfp-speed-wrap";const u=document.createElement("button");u.className="hfp-speed-btn",u.type="button",u.textContent="1x",u.setAttribute("aria-label","Playback speed");const h=document.createElement("div");h.className="hfp-speed-menu",h.setAttribute("role","menu");for(const l of t){const p=document.createElement("button");p.className="hfp-speed-option",p.type="button",p.setAttribute("role","menuitem"),p.dataset.speed=String(l),p.textContent=C(l),l===1&&p.classList.add("hfp-active"),h.appendChild(p)}f.appendChild(h),f.appendChild(u),r.appendChild(i),r.appendChild(s),r.appendChild(o),r.appendChild(f),a.appendChild(r);let m=!1,g=null;t.indexOf(1),i.addEventListener("click",l=>{l.stopPropagation(),m?d.onPause():d.onPlay()});const b=l=>{for(const p of h.querySelectorAll(".hfp-speed-option"))p.classList.toggle("hfp-active",p.dataset.speed===String(l))};u.addEventListener("click",l=>{l.stopPropagation();const p=h.classList.toggle("hfp-open");u.setAttribute("aria-expanded",String(p))}),h.addEventListener("click",l=>{l.stopPropagation();const p=l.target.closest(".hfp-speed-option");if(!p)return;const E=parseFloat(p.dataset.speed);t.indexOf(E),u.textContent=C(E),b(E),h.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false"),d.onSpeedChange(E)});const _=()=>{h.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false")};document.addEventListener("click",_);const y=l=>{const p=s.getBoundingClientRect(),E=Math.max(0,Math.min(1,(l-p.left)/p.width));d.onSeek(E)};let v=!1;s.addEventListener("mousedown",l=>{l.stopPropagation(),v=!0,y(l.clientX)});const w=l=>{v&&y(l.clientX)},P=()=>{v=!1};document.addEventListener("mousemove",w),document.addEventListener("mouseup",P),s.addEventListener("touchstart",l=>{v=!0;const p=l.touches[0];p&&y(p.clientX)},{passive:!0});const I=l=>{if(v){const p=l.touches[0];p&&y(p.clientX)}},R=()=>{v=!1};document.addEventListener("touchmove",I,{passive:!0}),document.addEventListener("touchend",R);const O=()=>{g&&clearTimeout(g),g=setTimeout(()=>{m&&r.classList.add("hfp-hidden")},3e3)},N=a instanceof ShadowRoot?a.host:a;return N.addEventListener("mousemove",()=>{r.classList.remove("hfp-hidden"),O()}),N.addEventListener("mouseleave",()=>{m&&r.classList.add("hfp-hidden")}),{updateTime(l,p){const E=p>0?l/p*100:0;n.style.width=`${E}%`,o.textContent=`${D(l)} / ${D(p)}`},updatePlaying(l){m=l,i.innerHTML=l?q:F,i.setAttribute("aria-label",l?"Pause":"Play"),l?O():r.classList.remove("hfp-hidden")},updateSpeed(l){t.indexOf(l),u.textContent=C(l),b(l)},show(){r.style.display=""},hide(){r.style.display="none"},destroy(){document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",P),document.removeEventListener("touchmove",I),document.removeEventListener("touchend",R),document.removeEventListener("click",_),g&&clearTimeout(g)}}}function G(a){return a.hasRuntime||a.runtimeInjected?!1:!!(a.hasNestedCompositions||a.hasTimelines&&a.attempts>=5)}let k=null;function X(){if(k)return k;if(typeof CSSStyleSheet>"u")return null;try{const a=new CSSStyleSheet;return a.replaceSync(z),k=a,a}catch{return null}}const M=30,Q="https://cdn.jsdelivr.net/npm/@hyperframes/core/dist/hyperframe.runtime.iife.js",S="shader-capture-scale",L="shader-loading",Y="__hf_shader_capture_scale",J="__hf_shader_loading",A=["Preparing scene transitions","Sampling outgoing scene motion","Sampling incoming scene motion","Caching transition frames","Finalizing transition preview"];function H(a){if(a===null)return null;const d=Number(a);return!Number.isFinite(d)||d<=0?null:String(Math.min(1,Math.max(.25,d)))}function $(a){if(a===null||a.trim()==="")return"composition";const d=a.trim().toLowerCase();return d==="none"||d==="false"||d==="0"||d==="off"?"none":d==="player"||d==="true"||d==="1"||d==="on"?"player":"composition"}function U(a,d,e){e===null?a.delete(d):a.set(d,e)}function Z(a,d,e){const t=a.indexOf("#"),r=t>=0?a.slice(0,t):a,i=t>=0?a.slice(t):"",s=r.indexOf("?"),n=s>=0?r.slice(0,s):r,o=s>=0?r.slice(s+1):"",f=new URLSearchParams(o);U(f,Y,d),U(f,J,e==="composition"?null:e);const u=f.toString();return`${n}${u?`?${u}`:""}${i}`}function K(a,d,e){if(d===null&&e==="composition")return a;const t=[];d!==null&&t.push(`window.__HF_SHADER_CAPTURE_SCALE=${JSON.stringify(d)};`),e!=="composition"&&t.push(`window.__HF_SHADER_LOADING=${JSON.stringify(e)};`);const r=`<script data-hyperframes-player-shader-options>${t.join("")}<\/script>`;return/<head\b[^>]*>/i.test(a)?a.replace(/<head\b[^>]*>/i,i=>`${i}${r}`):/<html\b[^>]*>/i.test(a)?a.replace(/<html\b[^>]*>/i,i=>`${i}${r}`):`${r}${a}`}const x=class x extends HTMLElement{constructor(){super();c(this,"shadow");c(this,"container");c(this,"iframe");c(this,"posterEl",null);c(this,"controlsApi",null);c(this,"resizeObserver");c(this,"shaderLoaderEl");c(this,"shaderLoaderFillEl");c(this,"shaderLoaderTitleEl");c(this,"shaderLoaderDetailEl");c(this,"shaderLoaderTransitionValueEl");c(this,"shaderLoaderFrameLabelEl");c(this,"shaderLoaderFrameValueEl");c(this,"shaderLoaderFrameRowEl");c(this,"shaderLoaderHideTimeout",null);c(this,"_ready",!1);c(this,"_duration",0);c(this,"_currentTime",0);c(this,"_paused",!0);c(this,"_compositionWidth",1920);c(this,"_compositionHeight",1080);c(this,"_probeInterval",null);c(this,"_lastUpdateMs",0);c(this,"_parentMedia",[]);c(this,"_audioOwner","runtime");c(this,"_mediaObserver");c(this,"_playbackErrorPosted",!1);c(this,"_runtimeInjected",!1);this.shadow=this.attachShadow({mode:"open"});const e=X();if(e)this.shadow.adoptedStyleSheets=[e];else{const r=document.createElement("style");r.textContent=z,this.shadow.appendChild(r)}this.container=document.createElement("div"),this.container.className="hfp-container",this.iframe=document.createElement("iframe"),this.iframe.className="hfp-iframe",this.iframe.sandbox.add("allow-scripts","allow-same-origin"),this.iframe.allow="autoplay; fullscreen",this.iframe.referrerPolicy="no-referrer",this.iframe.title="HyperFrames Composition",this.container.appendChild(this.iframe),this.shadow.appendChild(this.container);const t=this._createShaderLoader();this.shaderLoaderEl=t.root,this.shaderLoaderFillEl=t.fill,this.shaderLoaderTitleEl=t.title,this.shaderLoaderDetailEl=t.detail,this.shaderLoaderTransitionValueEl=t.transitionValue,this.shaderLoaderFrameLabelEl=t.frameLabel,this.shaderLoaderFrameValueEl=t.frameValue,this.shaderLoaderFrameRowEl=t.frameRow,this.shadow.appendChild(this.shaderLoaderEl),this.addEventListener("click",r=>{this._isControlsClick(r)||(this._paused?this.play():this.pause())}),this.resizeObserver=new ResizeObserver(()=>this._updateScale()),this._onMessage=this._onMessage.bind(this),this._onIframeLoad=this._onIframeLoad.bind(this)}static get observedAttributes(){return["src","srcdoc","width","height","controls","muted","poster","playback-rate","audio-src",S,L]}connectedCallback(){this.resizeObserver.observe(this),window.addEventListener("message",this._onMessage),this.iframe.addEventListener("load",this._onIframeLoad),this.hasAttribute("controls")&&this._setupControls(),this.hasAttribute("poster")&&this._setupPoster(),this.hasAttribute("audio-src")&&this._setupParentAudioFromUrl(this.getAttribute("audio-src")),this.hasAttribute("srcdoc")&&(this.iframe.srcdoc=this._prepareSrcdoc(this.getAttribute("srcdoc"))),this.hasAttribute("src")&&(this.iframe.src=this._prepareSrc(this.getAttribute("src")))}disconnectedCallback(){var e;this.resizeObserver.disconnect(),window.removeEventListener("message",this._onMessage),this.iframe.removeEventListener("load",this._onIframeLoad),this._probeInterval&&clearInterval(this._probeInterval),this.shaderLoaderHideTimeout&&clearTimeout(this.shaderLoaderHideTimeout),this.shaderLoaderHideTimeout=null,this._teardownMediaObserver(),(e=this.controlsApi)==null||e.destroy();for(const t of this._parentMedia)t.el.pause(),t.el.src="";this._parentMedia=[]}attributeChangedCallback(e,t,r){var i,s;switch(e){case"src":r&&(this._ready=!1,this.iframe.src=this._prepareSrc(r));break;case"srcdoc":this._ready=!1,r!==null?this.iframe.srcdoc=this._prepareSrcdoc(r):this.iframe.removeAttribute("srcdoc");break;case"width":this._compositionWidth=parseInt(r||"1920",10),this._updateScale();break;case"height":this._compositionHeight=parseInt(r||"1080",10),this._updateScale();break;case"controls":r!==null?this._setupControls():((i=this.controlsApi)==null||i.destroy(),this.controlsApi=null);break;case"poster":this._setupPoster();break;case"playback-rate":{const n=parseFloat(r||"1");for(const o of this._parentMedia)o.el.playbackRate=n;this._sendControl("set-playback-rate",{playbackRate:n}),(s=this.controlsApi)==null||s.updateSpeed(n),this.dispatchEvent(new Event("ratechange"));break}case"muted":for(const n of this._parentMedia)n.el.muted=r!==null;this._sendControl("set-muted",{muted:r!==null});break;case"audio-src":r&&this._setupParentAudioFromUrl(r);break;case S:case L:this._reloadShaderOptions();break}}get iframeElement(){return this.iframe}play(){var e;this._hidePoster(),this._sendControl("play"),this._audioOwner==="parent"&&this._playParentMedia(),this._paused=!1,(e=this.controlsApi)==null||e.updatePlaying(!0),this.dispatchEvent(new Event("play"))}pause(){var e;this._sendControl("pause"),this._audioOwner==="parent"&&this._pauseParentMedia(),this._paused=!0,(e=this.controlsApi)==null||e.updatePlaying(!1),this.dispatchEvent(new Event("pause"))}seek(e){var t,r;if(!this._trySyncSeek(e)){const i=Math.round(e*M);this._sendControl("seek",{frame:i})}if(this._currentTime=e,this._audioOwner==="parent")for(const i of this._parentMedia){const s=e-i.start;s>=0&&s<i.duration&&(i.el.currentTime=s)}this._paused=!0,(t=this.controlsApi)==null||t.updatePlaying(!1),(r=this.controlsApi)==null||r.updateTime(this._currentTime,this._duration)}get currentTime(){return this._currentTime}set currentTime(e){this.seek(e)}get duration(){return this._duration}get paused(){return this._paused}get ready(){return this._ready}get playbackRate(){return parseFloat(this.getAttribute("playback-rate")||"1")}set playbackRate(e){this.setAttribute("playback-rate",String(e))}get shaderCaptureScale(){return Number(H(this.getAttribute(S))??"1")}set shaderCaptureScale(e){this.setAttribute(S,String(e))}get shaderLoading(){return $(this.getAttribute(L))}set shaderLoading(e){e==="composition"?this.removeAttribute(L):this.setAttribute(L,e)}get muted(){return this.hasAttribute("muted")}set muted(e){e?this.setAttribute("muted",""):this.removeAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(e){e?this.setAttribute("loop",""):this.removeAttribute("loop")}_sendControl(e,t={}){var r;try{(r=this.iframe.contentWindow)==null||r.postMessage({source:"hf-parent",type:"control",action:e,...t},"*")}catch{}}_shaderCaptureScaleParam(){return H(this.getAttribute(S))}_shaderLoadingMode(){return $(this.getAttribute(L))}_prepareSrc(e){return Z(e,this._shaderCaptureScaleParam(),this._shaderLoadingMode())}_prepareSrcdoc(e){return K(e,this._shaderCaptureScaleParam(),this._shaderLoadingMode())}_reloadShaderOptions(){if(this._shaderLoadingMode()!=="player"&&this._resetShaderLoader(),this.hasAttribute("srcdoc")){this.iframe.srcdoc=this._prepareSrcdoc(this.getAttribute("srcdoc")||"");return}this.hasAttribute("src")&&(this.iframe.src=this._prepareSrc(this.getAttribute("src")||""))}_createShaderLoader(){const e=document.createElement("div");e.className="hfp-shader-loader",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-label","Preparing scene transitions"),e.setAttribute("data-hyperframes-ignore",""),e.draggable=!1;const t=_=>{_.preventDefault(),_.stopPropagation()};for(const _ of["selectstart","dragstart","pointerdown","mousedown","click","dblclick","contextmenu","touchstart"])e.addEventListener(_,t,{capture:!0});const r=document.createElement("div");r.className="hfp-shader-loader-panel",r.draggable=!1;const i=document.createElement("div");i.className="hfp-shader-loader-mark",i.draggable=!1,i.innerHTML=['<svg width="78" height="78" viewBox="0 0 100 100" fill="none" aria-hidden="true" draggable="false">','<path d="M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z" fill="url(#hfp-shader-loader-grad-left)"/>','<path d="M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z" fill="url(#hfp-shader-loader-grad-right)"/>',"<defs>",'<linearGradient id="hfp-shader-loader-grad-left" x1="48.5676" y1="25" x2="44.7804" y2="71.9384" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>",'<linearGradient id="hfp-shader-loader-grad-right" x1="54.8282" y1="73.8392" x2="72.0989" y2="32.8932" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>","</defs>","</svg>"].join("");const s=document.createElement("div");s.className="hfp-shader-loader-title";const n=document.createElement("span");n.className="hfp-shader-loader-title-text",n.textContent=A[0],s.appendChild(n);const o=document.createElement("div");o.className="hfp-shader-loader-detail",o.textContent="Rendering animated scene samples for shader transitions.";const f=document.createElement("div");f.className="hfp-shader-loader-track",f.setAttribute("aria-hidden","true");const u=document.createElement("div");u.className="hfp-shader-loader-fill",f.appendChild(u);const h=document.createElement("div");h.className="hfp-shader-loader-progress";const m=_=>{const y=document.createElement("div");y.className="hfp-shader-loader-row";const v=document.createElement("span");v.className="hfp-shader-loader-label",v.textContent=_;const w=document.createElement("span");return w.className="hfp-shader-loader-value",y.appendChild(v),y.appendChild(w),h.appendChild(y),{row:y,label:v,value:w}},g=m("transition"),b=m("transition frame");return r.appendChild(i),r.appendChild(s),r.appendChild(o),r.appendChild(f),r.appendChild(h),e.appendChild(r),{root:e,fill:u,title:n,detail:o,transitionValue:g.value,frameLabel:b.label,frameValue:b.value,frameRow:b.row}}_showShaderLoader(){this.shaderLoaderHideTimeout&&(clearTimeout(this.shaderLoaderHideTimeout),this.shaderLoaderHideTimeout=null),this.shaderLoaderEl.classList.remove("hfp-hiding"),this.shaderLoaderEl.classList.add("hfp-visible")}_hideShaderLoader(){if(this.shaderLoaderEl.classList.contains("hfp-hiding")){this.shaderLoaderHideTimeout||this._scheduleShaderLoaderHideCleanup();return}this.shaderLoaderEl.classList.contains("hfp-visible")&&(this.shaderLoaderEl.classList.add("hfp-hiding"),this.shaderLoaderEl.classList.remove("hfp-visible"),this._scheduleShaderLoaderHideCleanup())}_scheduleShaderLoaderHideCleanup(){this.shaderLoaderHideTimeout&&clearTimeout(this.shaderLoaderHideTimeout),this.shaderLoaderHideTimeout=setTimeout(()=>{this.shaderLoaderEl.classList.remove("hfp-hiding"),this.shaderLoaderHideTimeout=null},420)}_resetShaderLoader(){this.shaderLoaderHideTimeout&&(clearTimeout(this.shaderLoaderHideTimeout),this.shaderLoaderHideTimeout=null),this.shaderLoaderEl.classList.remove("hfp-visible","hfp-hiding"),this.shaderLoaderFillEl.style.transform="scaleX(0)",this.shaderLoaderTransitionValueEl.textContent="",this.shaderLoaderFrameValueEl.textContent="",this.shaderLoaderFrameRowEl.style.visibility="hidden"}_updateShaderLoader(e){if(this._shaderLoadingMode()!=="player"){this._resetShaderLoader();return}if(e.ready||!e.loading){this._hideShaderLoader();return}const t=typeof e.progress=="number"&&Number.isFinite(e.progress)?e.progress:0,r=typeof e.total=="number"&&Number.isFinite(e.total)?e.total:0,i=r>0?Math.min(1,Math.max(0,t/r)):0,s=Math.min(A.length-1,Math.floor(i*A.length));this.shaderLoaderTitleEl.textContent=A[s]||"Preparing scene transitions",this.shaderLoaderDetailEl.textContent=e.phase==="cached"?"Loading cached transition frames before playback.":e.phase==="finalizing"?"Uploading transition textures for smooth playback.":"Rendering animated scene samples for shader transitions.",this.shaderLoaderFillEl.style.transform=`scaleX(${i})`,this.shaderLoaderTransitionValueEl.textContent=e.currentTransition!==void 0&&e.transitionTotal!==void 0?`${e.currentTransition}/${e.transitionTotal}`:r>0?`${t}/${r}`:"";const n=e.transitionFrame!==void 0&&e.transitionFrames!==void 0?`${e.transitionFrame}/${e.transitionFrames}`:"";this.shaderLoaderFrameLabelEl.textContent=e.phase==="cached"?"cached transition frames":e.phase==="finalizing"?"finalizing transition frames":"rendering transition frames",this.shaderLoaderFrameValueEl.textContent=n,this.shaderLoaderFrameRowEl.style.visibility=n?"visible":"hidden",this.shaderLoaderEl.setAttribute("aria-valuenow",String(Math.round(i*100))),this._showShaderLoader()}_trySyncSeek(e){try{const t=this.iframe.contentWindow,r=t==null?void 0:t.__player,i=r==null?void 0:r.seek;return typeof i!="function"?!1:(i.call(r,e),!0)}catch{return!1}}_isControlsClick(e){return e.composedPath().some(t=>t instanceof HTMLElement&&t.classList.contains("hfp-controls"))}_onMessage(e){var r,i,s,n;if(e.source!==this.iframe.contentWindow)return;const t=e.data;if(!(!t||t.source!=="hf-preview")){if(t.type==="shader-transition-state"){const o=t.state&&typeof t.state=="object"?t.state:{};this._updateShaderLoader(o),this.dispatchEvent(new CustomEvent("shadertransitionstate",{detail:{compositionId:t.compositionId,state:o}}));return}if(t.type==="state"){this._currentTime=(t.frame??0)/M;const o=!this._paused,f=!t.isPlaying,u=this._duration>0&&this._currentTime>=this._duration&&(o||t.isPlaying);if(u&&this.loop){this._audioOwner==="parent"&&this._pauseParentMedia(),this._paused=f,this.seek(0),this.play();return}this._paused=f,this._audioOwner==="parent"&&(o&&this._paused?this._pauseParentMedia():!o&&!this._paused&&this._playParentMedia(),this._mirrorParentMediaTime(this._currentTime));const h=performance.now();(h-this._lastUpdateMs>100||this._paused!==o)&&(this._lastUpdateMs=h,(r=this.controlsApi)==null||r.updateTime(this._currentTime,this._duration),(i=this.controlsApi)==null||i.updatePlaying(!this._paused),this.dispatchEvent(new CustomEvent("timeupdate",{detail:{currentTime:this._currentTime}}))),u&&(this._audioOwner==="parent"&&this._pauseParentMedia(),this._paused=!0,(s=this.controlsApi)==null||s.updatePlaying(!1),this.dispatchEvent(new Event("ended")))}t.type==="media-autoplay-blocked"&&this._promoteToParentProxy(),t.type==="timeline"&&t.durationInFrames>0&&Number.isFinite(t.durationInFrames)&&(this._duration=t.durationInFrames/M,(n=this.controlsApi)==null||n.updateTime(this._currentTime,this._duration)),t.type==="stage-size"&&t.width>0&&t.height>0&&(this._compositionWidth=t.width,this._compositionHeight=t.height,this._updateScale())}}_onIframeLoad(){let e=0;this._runtimeInjected=!1,this._resetShaderLoader();const t=this._audioOwner==="parent";this._audioOwner="runtime",this._playbackErrorPosted=!1,this._pauseParentMedia(),this._teardownMediaObserver(),t&&this.dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"runtime",reason:"iframe-reload"}})),this._probeInterval&&clearInterval(this._probeInterval),this._probeInterval=setInterval(()=>{var r,i;e++;try{const s=this.iframe.contentWindow;if(!s)return;const n=!!(s.__hf||s.__player),o=!!(s.__timelines&&Object.keys(s.__timelines).length>0),f=!!((r=this.iframe.contentDocument)!=null&&r.querySelector("[data-composition-src]"));if(G({hasRuntime:n,hasTimelines:o,hasNestedCompositions:f,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!n)return;const h=(()=>{var m,g;if(s.__player&&typeof s.__player.getDuration=="function")return s.__player;if(s.__timelines){const b=Object.keys(s.__timelines);if(b.length>0){const _=(g=(m=this.iframe.contentDocument)==null?void 0:m.querySelector("[data-composition-id]"))==null?void 0:g.getAttribute("data-composition-id"),y=_&&_ in s.__timelines?_:b[b.length-1],v=s.__timelines[y];return{getDuration:()=>v.duration()}}}return null})();if(h&&h.getDuration()>0){clearInterval(this._probeInterval),this._duration=h.getDuration(),this._ready=!0,(i=this.controlsApi)==null||i.updateTime(0,this._duration),this.dispatchEvent(new CustomEvent("ready",{detail:{duration:this._duration}}));const m=this.iframe.contentDocument,g=m==null?void 0:m.querySelector("[data-composition-id]");if(g){const b=parseInt(g.getAttribute("data-width")||"0",10),_=parseInt(g.getAttribute("data-height")||"0",10);b>0&&_>0&&(this._compositionWidth=b,this._compositionHeight=_,this._updateScale())}this._setupParentMedia(),this.hasAttribute("autoplay")&&this.play();return}}catch{}e>=40&&(clearInterval(this._probeInterval),this.dispatchEvent(new CustomEvent("error",{detail:{message:"Composition timeline not found after 8s"}})))},200)}_injectRuntime(){this._runtimeInjected=!0;try{const e=this.iframe.contentDocument;if(!e)return;const t=e.createElement("script");t.src=Q,t.onload=()=>{},t.onerror=()=>{},(e.head||e.documentElement).appendChild(t)}catch{}}_updateScale(){const e=this.getBoundingClientRect();if(e.width===0||e.height===0)return;const t=Math.min(e.width/this._compositionWidth,e.height/this._compositionHeight);this.iframe.style.width=`${this._compositionWidth}px`,this.iframe.style.height=`${this._compositionHeight}px`,this.iframe.style.transform=`translate(-50%, -50%) scale(${t})`}_setupControls(){if(this.controlsApi)return;const e={onPlay:()=>this.play(),onPause:()=>this.pause(),onSeek:i=>this.seek(i*this._duration),onSpeedChange:i=>{this.playbackRate=i}},t=this.getAttribute("speed-presets"),r=t?t.split(",").map(Number).filter(i=>!isNaN(i)&&i>0):void 0;this.controlsApi=W(this.shadow,e,{speedPresets:r})}_setupPoster(){var t;const e=this.getAttribute("poster");if(!e){(t=this.posterEl)==null||t.remove(),this.posterEl=null;return}this.posterEl||(this.posterEl=document.createElement("img"),this.posterEl.className="hfp-poster",this.shadow.appendChild(this.posterEl)),this.posterEl.src=e}_playParentMedia(){for(const e of this._parentMedia)e.el.src&&e.el.play().catch(t=>this._reportPlaybackError(t))}_reportPlaybackError(e){this._playbackErrorPosted||(this._playbackErrorPosted=!0,this.dispatchEvent(new CustomEvent("playbackerror",{detail:{source:"parent-proxy",error:e}})))}_pauseParentMedia(){for(const e of this._parentMedia)e.el.pause()}_mirrorParentMediaTime(e,t){const r=(t==null?void 0:t.force)===!0,i=x.MIRROR_REQUIRED_CONSECUTIVE_DRIFT_SAMPLES,s=x.MIRROR_DRIFT_THRESHOLD_SECONDS;for(const n of this._parentMedia){const o=e-n.start;if(o<0||o>=n.duration){n.driftSamples=0;continue}Math.abs(n.el.currentTime-o)>s?(n.driftSamples+=1,(r||n.driftSamples>=i)&&(n.el.currentTime=o,n.driftSamples=0)):n.driftSamples=0}}_promoteToParentProxy(){this._audioOwner!=="parent"&&(this._audioOwner="parent",this._sendControl("set-media-output-muted",{muted:!0}),this._mirrorParentMediaTime(this._currentTime,{force:!0}),this._paused||this._playParentMedia(),this.dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"parent",reason:"autoplay-blocked"}})))}_createParentMedia(e,t,r,i){if(this._parentMedia.some(o=>o.el.src===e))return null;const s=t==="video"?document.createElement("video"):new Audio;s.preload="auto",s.src=e,s.load(),s.muted=this.muted,this.playbackRate!==1&&(s.playbackRate=this.playbackRate);const n={el:s,start:r,duration:i,driftSamples:0};return this._parentMedia.push(n),n}_setupParentAudioFromUrl(e){this._createParentMedia(e,"audio",0,1/0)}_setupParentMedia(){try{const e=this.iframe.contentDocument;if(!e)return;const t=e.querySelectorAll("audio[data-start], video[data-start]");for(const r of t)this._adoptIframeMedia(r);this._observeDynamicMedia(e)}catch{}}_adoptIframeMedia(e){var f;const t=e.getAttribute("src")||((f=e.querySelector("source"))==null?void 0:f.getAttribute("src"));if(!t)return;const r=new URL(t,e.ownerDocument.baseURI).href,i=parseFloat(e.getAttribute("data-start")||"0"),s=parseFloat(e.getAttribute("data-duration")||"Infinity"),n=e.tagName==="VIDEO"?"video":"audio",o=this._createParentMedia(r,n,i,s);o&&this._audioOwner==="parent"&&(this._mirrorParentMediaTime(this._currentTime,{force:!0}),!this._paused&&o.el.src&&o.el.play().catch(u=>this._reportPlaybackError(u)))}_observeDynamicMedia(e){if(this._teardownMediaObserver(),typeof MutationObserver>"u"||!e.body)return;const t=new MutationObserver(i=>{var s,n,o,f;for(const u of i){for(const h of u.addedNodes){if(!(h instanceof Element))continue;const m=[];(s=h.matches)!=null&&s.call(h,"audio[data-start], video[data-start]")&&m.push(h);const g=(n=h.querySelectorAll)==null?void 0:n.call(h,"audio[data-start], video[data-start]");if(g)for(const b of g)m.push(b);for(const b of m)this._adoptIframeMedia(b)}for(const h of u.removedNodes){if(!(h instanceof Element))continue;const m=[];(o=h.matches)!=null&&o.call(h,"audio[data-start], video[data-start]")&&m.push(h);const g=(f=h.querySelectorAll)==null?void 0:f.call(h,"audio[data-start], video[data-start]");if(g)for(const b of g)m.push(b);for(const b of m)this._detachIframeMedia(b)}}}),r=e.querySelectorAll("[data-composition-id]");if(r.length>0)for(const i of r)t.observe(i,{childList:!0,subtree:!0});else t.observe(e.body,{childList:!0,subtree:!0});this._mediaObserver=t}_teardownMediaObserver(){var e;(e=this._mediaObserver)==null||e.disconnect(),this._mediaObserver=void 0}_detachIframeMedia(e){var n;const t=e.getAttribute("src")||((n=e.querySelector("source"))==null?void 0:n.getAttribute("src"));if(!t)return;const r=new URL(t,e.ownerDocument.baseURI).href,i=this._parentMedia.findIndex(o=>o.el.src===r);if(i===-1)return;const s=this._parentMedia[i];s.el.pause(),s.el.src="",this._parentMedia.splice(i,1)}_hidePoster(){var e;(e=this.posterEl)==null||e.remove(),this.posterEl=null}};c(x,"MIRROR_DRIFT_THRESHOLD_SECONDS",.05),c(x,"MIRROR_REQUIRED_CONSECUTIVE_DRIFT_SAMPLES",2);let T=x;customElements.get("hyperframes-player")||customElements.define("hyperframes-player",T);export{T as HyperframesPlayer,B as SPEED_PRESETS,C as formatSpeed,D as formatTime};
353
+ `,F='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><polygon points="4,2 16,9 4,16"/></svg>',q='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><rect x="3" y="2" width="4" height="14"/><rect x="11" y="2" width="4" height="14"/></svg>',B=[.25,.5,1,1.5,2,4];function C(a){return Number.isInteger(a)?`${a}x`:`${a}x`}function D(a){if(!Number.isFinite(a)||a<0)return"0:00";const d=Math.floor(a),e=Math.floor(d/60),t=d%60;return`${e}:${t.toString().padStart(2,"0")}`}function W(a,d,e={}){const t=e.speedPresets??B,r=document.createElement("div");r.className="hfp-controls",r.addEventListener("click",l=>{l.stopPropagation()});const i=document.createElement("button");i.className="hfp-play-btn",i.type="button",i.innerHTML=F,i.setAttribute("aria-label","Play");const s=document.createElement("div");s.className="hfp-scrubber";const n=document.createElement("div");n.className="hfp-progress",n.style.width="0%",s.appendChild(n);const o=document.createElement("span");o.className="hfp-time",o.textContent="0:00 / 0:00";const f=document.createElement("div");f.className="hfp-speed-wrap";const u=document.createElement("button");u.className="hfp-speed-btn",u.type="button",u.textContent="1x",u.setAttribute("aria-label","Playback speed");const h=document.createElement("div");h.className="hfp-speed-menu",h.setAttribute("role","menu");for(const l of t){const p=document.createElement("button");p.className="hfp-speed-option",p.type="button",p.setAttribute("role","menuitem"),p.dataset.speed=String(l),p.textContent=C(l),l===1&&p.classList.add("hfp-active"),h.appendChild(p)}f.appendChild(h),f.appendChild(u),r.appendChild(i),r.appendChild(s),r.appendChild(o),r.appendChild(f),a.appendChild(r);let m=!1,g=null;t.indexOf(1),i.addEventListener("click",l=>{l.stopPropagation(),m?d.onPause():d.onPlay()});const b=l=>{for(const p of h.querySelectorAll(".hfp-speed-option"))p.classList.toggle("hfp-active",p.dataset.speed===String(l))};u.addEventListener("click",l=>{l.stopPropagation();const p=h.classList.toggle("hfp-open");u.setAttribute("aria-expanded",String(p))}),h.addEventListener("click",l=>{l.stopPropagation();const p=l.target.closest(".hfp-speed-option");if(!p)return;const E=parseFloat(p.dataset.speed);t.indexOf(E),u.textContent=C(E),b(E),h.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false"),d.onSpeedChange(E)});const _=()=>{h.classList.remove("hfp-open"),u.setAttribute("aria-expanded","false")};document.addEventListener("click",_);const y=l=>{const p=s.getBoundingClientRect(),E=Math.max(0,Math.min(1,(l-p.left)/p.width));d.onSeek(E)};let v=!1;s.addEventListener("mousedown",l=>{l.stopPropagation(),v=!0,y(l.clientX)});const w=l=>{v&&y(l.clientX)},P=()=>{v=!1};document.addEventListener("mousemove",w),document.addEventListener("mouseup",P),s.addEventListener("touchstart",l=>{v=!0;const p=l.touches[0];p&&y(p.clientX)},{passive:!0});const I=l=>{if(v){const p=l.touches[0];p&&y(p.clientX)}},R=()=>{v=!1};document.addEventListener("touchmove",I,{passive:!0}),document.addEventListener("touchend",R);const O=()=>{g&&clearTimeout(g),g=setTimeout(()=>{m&&r.classList.add("hfp-hidden")},3e3)},N=a instanceof ShadowRoot?a.host:a;return N.addEventListener("mousemove",()=>{r.classList.remove("hfp-hidden"),O()}),N.addEventListener("mouseleave",()=>{m&&r.classList.add("hfp-hidden")}),{updateTime(l,p){const E=p>0?l/p*100:0;n.style.width=`${E}%`,o.textContent=`${D(l)} / ${D(p)}`},updatePlaying(l){m=l,i.innerHTML=l?q:F,i.setAttribute("aria-label",l?"Pause":"Play"),l?O():r.classList.remove("hfp-hidden")},updateSpeed(l){t.indexOf(l),u.textContent=C(l),b(l)},show(){r.style.display=""},hide(){r.style.display="none"},destroy(){document.removeEventListener("mousemove",w),document.removeEventListener("mouseup",P),document.removeEventListener("touchmove",I),document.removeEventListener("touchend",R),document.removeEventListener("click",_),g&&clearTimeout(g)}}}function G(a){return a.hasRuntime||a.runtimeInjected?!1:!!(a.hasNestedCompositions||a.hasTimelines&&a.attempts>=5)}let k=null;function X(){if(k)return k;if(typeof CSSStyleSheet>"u")return null;try{const a=new CSSStyleSheet;return a.replaceSync(z),k=a,a}catch{return null}}const T=30,Q="https://cdn.jsdelivr.net/npm/@hyperframes/core/dist/hyperframe.runtime.iife.js",S="shader-capture-scale",L="shader-loading",Y="__hf_shader_capture_scale",J="__hf_shader_loading",A=["Preparing scene transitions","Sampling outgoing scene motion","Sampling incoming scene motion","Caching transition frames","Finalizing transition preview"];function H(a){if(a===null)return null;const d=Number(a);return!Number.isFinite(d)||d<=0?null:String(Math.min(1,Math.max(.25,d)))}function $(a){if(a===null||a.trim()==="")return"composition";const d=a.trim().toLowerCase();return d==="none"||d==="false"||d==="0"||d==="off"?"none":d==="player"||d==="true"||d==="1"||d==="on"?"player":"composition"}function U(a,d,e){e===null?a.delete(d):a.set(d,e)}function Z(a,d,e){const t=a.indexOf("#"),r=t>=0?a.slice(0,t):a,i=t>=0?a.slice(t):"",s=r.indexOf("?"),n=s>=0?r.slice(0,s):r,o=s>=0?r.slice(s+1):"",f=new URLSearchParams(o);U(f,Y,d),U(f,J,e==="composition"?null:e);const u=f.toString();return`${n}${u?`?${u}`:""}${i}`}function K(a,d,e){if(d===null&&e==="composition")return a;const t=[];d!==null&&t.push(`window.__HF_SHADER_CAPTURE_SCALE=${JSON.stringify(d)};`),e!=="composition"&&t.push(`window.__HF_SHADER_LOADING=${JSON.stringify(e)};`);const r=`<script data-hyperframes-player-shader-options>${t.join("")}<\/script>`;return/<head\b[^>]*>/i.test(a)?a.replace(/<head\b[^>]*>/i,i=>`${i}${r}`):/<html\b[^>]*>/i.test(a)?a.replace(/<html\b[^>]*>/i,i=>`${i}${r}`):`${r}${a}`}const x=class x extends HTMLElement{constructor(){super();c(this,"shadow");c(this,"container");c(this,"iframe");c(this,"posterEl",null);c(this,"controlsApi",null);c(this,"resizeObserver");c(this,"shaderLoaderEl");c(this,"shaderLoaderFillEl");c(this,"shaderLoaderTitleEl");c(this,"shaderLoaderDetailEl");c(this,"shaderLoaderTransitionValueEl");c(this,"shaderLoaderFrameLabelEl");c(this,"shaderLoaderFrameValueEl");c(this,"shaderLoaderFrameRowEl");c(this,"shaderLoaderHideTimeout",null);c(this,"_ready",!1);c(this,"_duration",0);c(this,"_currentTime",0);c(this,"_paused",!0);c(this,"_compositionWidth",1920);c(this,"_compositionHeight",1080);c(this,"_probeInterval",null);c(this,"_lastUpdateMs",0);c(this,"_parentMedia",[]);c(this,"_audioOwner","runtime");c(this,"_mediaObserver");c(this,"_playbackErrorPosted",!1);c(this,"_runtimeInjected",!1);this.shadow=this.attachShadow({mode:"open"});const e=X();if(e)this.shadow.adoptedStyleSheets=[e];else{const r=document.createElement("style");r.textContent=z,this.shadow.appendChild(r)}this.container=document.createElement("div"),this.container.className="hfp-container",this.iframe=document.createElement("iframe"),this.iframe.className="hfp-iframe",this.iframe.sandbox.add("allow-scripts","allow-same-origin"),this.iframe.allow="autoplay; fullscreen",this.iframe.referrerPolicy="no-referrer",this.iframe.title="HyperFrames Composition",this.container.appendChild(this.iframe),this.shadow.appendChild(this.container);const t=this._createShaderLoader();this.shaderLoaderEl=t.root,this.shaderLoaderFillEl=t.fill,this.shaderLoaderTitleEl=t.title,this.shaderLoaderDetailEl=t.detail,this.shaderLoaderTransitionValueEl=t.transitionValue,this.shaderLoaderFrameLabelEl=t.frameLabel,this.shaderLoaderFrameValueEl=t.frameValue,this.shaderLoaderFrameRowEl=t.frameRow,this.shadow.appendChild(this.shaderLoaderEl),this.addEventListener("click",r=>{this._isControlsClick(r)||(this._paused?this.play():this.pause())}),this.resizeObserver=new ResizeObserver(()=>this._updateScale()),this._onMessage=this._onMessage.bind(this),this._onIframeLoad=this._onIframeLoad.bind(this)}static get observedAttributes(){return["src","srcdoc","width","height","controls","muted","poster","playback-rate","audio-src",S,L]}connectedCallback(){this.resizeObserver.observe(this),window.addEventListener("message",this._onMessage),this.iframe.addEventListener("load",this._onIframeLoad),this.hasAttribute("controls")&&this._setupControls(),this.hasAttribute("poster")&&this._setupPoster(),this.hasAttribute("audio-src")&&this._setupParentAudioFromUrl(this.getAttribute("audio-src")),this.hasAttribute("srcdoc")&&(this.iframe.srcdoc=this._prepareSrcdoc(this.getAttribute("srcdoc"))),this.hasAttribute("src")&&(this.iframe.src=this._prepareSrc(this.getAttribute("src")))}disconnectedCallback(){var e;this.resizeObserver.disconnect(),window.removeEventListener("message",this._onMessage),this.iframe.removeEventListener("load",this._onIframeLoad),this._probeInterval&&clearInterval(this._probeInterval),this.shaderLoaderHideTimeout&&clearTimeout(this.shaderLoaderHideTimeout),this.shaderLoaderHideTimeout=null,this._teardownMediaObserver(),(e=this.controlsApi)==null||e.destroy();for(const t of this._parentMedia)t.el.pause(),t.el.src="";this._parentMedia=[]}attributeChangedCallback(e,t,r){var i,s;switch(e){case"src":r&&(this._ready=!1,this.iframe.src=this._prepareSrc(r));break;case"srcdoc":this._ready=!1,r!==null?this.iframe.srcdoc=this._prepareSrcdoc(r):this.iframe.removeAttribute("srcdoc");break;case"width":this._compositionWidth=parseInt(r||"1920",10),this._updateScale();break;case"height":this._compositionHeight=parseInt(r||"1080",10),this._updateScale();break;case"controls":r!==null?this._setupControls():((i=this.controlsApi)==null||i.destroy(),this.controlsApi=null);break;case"poster":this._setupPoster();break;case"playback-rate":{const n=parseFloat(r||"1");for(const o of this._parentMedia)o.el.playbackRate=n;this._sendControl("set-playback-rate",{playbackRate:n}),(s=this.controlsApi)==null||s.updateSpeed(n),this.dispatchEvent(new Event("ratechange"));break}case"muted":for(const n of this._parentMedia)n.el.muted=r!==null;this._sendControl("set-muted",{muted:r!==null});break;case"audio-src":r&&this._setupParentAudioFromUrl(r);break;case S:case L:this._reloadShaderOptions();break}}get iframeElement(){return this.iframe}play(){var e;this._hidePoster(),this._duration>0&&this._currentTime>=this._duration&&this.seek(0),this._sendControl("play"),this._audioOwner==="parent"&&this._playParentMedia(),this._paused=!1,(e=this.controlsApi)==null||e.updatePlaying(!0),this.dispatchEvent(new Event("play"))}pause(){var e;this._sendControl("pause"),this._audioOwner==="parent"&&this._pauseParentMedia(),this._paused=!0,(e=this.controlsApi)==null||e.updatePlaying(!1),this.dispatchEvent(new Event("pause"))}seek(e){var t,r;if(!this._trySyncSeek(e)){const i=Math.round(e*T);this._sendControl("seek",{frame:i})}if(this._currentTime=e,this._audioOwner==="parent")for(const i of this._parentMedia){const s=e-i.start;s>=0&&s<i.duration&&(i.el.currentTime=s)}this._paused=!0,(t=this.controlsApi)==null||t.updatePlaying(!1),(r=this.controlsApi)==null||r.updateTime(this._currentTime,this._duration)}get currentTime(){return this._currentTime}set currentTime(e){this.seek(e)}get duration(){return this._duration}get paused(){return this._paused}get ready(){return this._ready}get playbackRate(){return parseFloat(this.getAttribute("playback-rate")||"1")}set playbackRate(e){this.setAttribute("playback-rate",String(e))}get shaderCaptureScale(){return Number(H(this.getAttribute(S))??"1")}set shaderCaptureScale(e){this.setAttribute(S,String(e))}get shaderLoading(){return $(this.getAttribute(L))}set shaderLoading(e){e==="composition"?this.removeAttribute(L):this.setAttribute(L,e)}get muted(){return this.hasAttribute("muted")}set muted(e){e?this.setAttribute("muted",""):this.removeAttribute("muted")}get loop(){return this.hasAttribute("loop")}set loop(e){e?this.setAttribute("loop",""):this.removeAttribute("loop")}_sendControl(e,t={}){var r;try{(r=this.iframe.contentWindow)==null||r.postMessage({source:"hf-parent",type:"control",action:e,...t},"*")}catch{}}_shaderCaptureScaleParam(){return H(this.getAttribute(S))}_shaderLoadingMode(){return $(this.getAttribute(L))}_prepareSrc(e){return Z(e,this._shaderCaptureScaleParam(),this._shaderLoadingMode())}_prepareSrcdoc(e){return K(e,this._shaderCaptureScaleParam(),this._shaderLoadingMode())}_reloadShaderOptions(){if(this._shaderLoadingMode()!=="player"&&this._resetShaderLoader(),this.hasAttribute("srcdoc")){this.iframe.srcdoc=this._prepareSrcdoc(this.getAttribute("srcdoc")||"");return}this.hasAttribute("src")&&(this.iframe.src=this._prepareSrc(this.getAttribute("src")||""))}_createShaderLoader(){const e=document.createElement("div");e.className="hfp-shader-loader",e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-label","Preparing scene transitions"),e.setAttribute("data-hyperframes-ignore",""),e.draggable=!1;const t=_=>{_.preventDefault(),_.stopPropagation()};for(const _ of["selectstart","dragstart","pointerdown","mousedown","click","dblclick","contextmenu","touchstart"])e.addEventListener(_,t,{capture:!0});const r=document.createElement("div");r.className="hfp-shader-loader-panel",r.draggable=!1;const i=document.createElement("div");i.className="hfp-shader-loader-mark",i.draggable=!1,i.innerHTML=['<svg width="78" height="78" viewBox="0 0 100 100" fill="none" aria-hidden="true" draggable="false">','<path d="M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z" fill="url(#hfp-shader-loader-grad-left)"/>','<path d="M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z" fill="url(#hfp-shader-loader-grad-right)"/>',"<defs>",'<linearGradient id="hfp-shader-loader-grad-left" x1="48.5676" y1="25" x2="44.7804" y2="71.9384" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>",'<linearGradient id="hfp-shader-loader-grad-right" x1="54.8282" y1="73.8392" x2="72.0989" y2="32.8932" gradientUnits="userSpaceOnUse">','<stop stop-color="#06E3FA"/>','<stop offset="1" stop-color="#4FDB5E"/>',"</linearGradient>","</defs>","</svg>"].join("");const s=document.createElement("div");s.className="hfp-shader-loader-title";const n=document.createElement("span");n.className="hfp-shader-loader-title-text",n.textContent=A[0],s.appendChild(n);const o=document.createElement("div");o.className="hfp-shader-loader-detail",o.textContent="Rendering animated scene samples for shader transitions.";const f=document.createElement("div");f.className="hfp-shader-loader-track",f.setAttribute("aria-hidden","true");const u=document.createElement("div");u.className="hfp-shader-loader-fill",f.appendChild(u);const h=document.createElement("div");h.className="hfp-shader-loader-progress";const m=_=>{const y=document.createElement("div");y.className="hfp-shader-loader-row";const v=document.createElement("span");v.className="hfp-shader-loader-label",v.textContent=_;const w=document.createElement("span");return w.className="hfp-shader-loader-value",y.appendChild(v),y.appendChild(w),h.appendChild(y),{row:y,label:v,value:w}},g=m("transition"),b=m("transition frame");return r.appendChild(i),r.appendChild(s),r.appendChild(o),r.appendChild(f),r.appendChild(h),e.appendChild(r),{root:e,fill:u,title:n,detail:o,transitionValue:g.value,frameLabel:b.label,frameValue:b.value,frameRow:b.row}}_showShaderLoader(){this.shaderLoaderHideTimeout&&(clearTimeout(this.shaderLoaderHideTimeout),this.shaderLoaderHideTimeout=null),this.shaderLoaderEl.classList.remove("hfp-hiding"),this.shaderLoaderEl.classList.add("hfp-visible")}_hideShaderLoader(){if(this.shaderLoaderEl.classList.contains("hfp-hiding")){this.shaderLoaderHideTimeout||this._scheduleShaderLoaderHideCleanup();return}this.shaderLoaderEl.classList.contains("hfp-visible")&&(this.shaderLoaderEl.classList.add("hfp-hiding"),this.shaderLoaderEl.classList.remove("hfp-visible"),this._scheduleShaderLoaderHideCleanup())}_scheduleShaderLoaderHideCleanup(){this.shaderLoaderHideTimeout&&clearTimeout(this.shaderLoaderHideTimeout),this.shaderLoaderHideTimeout=setTimeout(()=>{this.shaderLoaderEl.classList.remove("hfp-hiding"),this.shaderLoaderHideTimeout=null},420)}_resetShaderLoader(){this.shaderLoaderHideTimeout&&(clearTimeout(this.shaderLoaderHideTimeout),this.shaderLoaderHideTimeout=null),this.shaderLoaderEl.classList.remove("hfp-visible","hfp-hiding"),this.shaderLoaderFillEl.style.transform="scaleX(0)",this.shaderLoaderTransitionValueEl.textContent="",this.shaderLoaderFrameValueEl.textContent="",this.shaderLoaderFrameRowEl.style.visibility="hidden"}_updateShaderLoader(e){if(this._shaderLoadingMode()!=="player"){this._resetShaderLoader();return}if(e.ready||!e.loading){this._hideShaderLoader();return}const t=typeof e.progress=="number"&&Number.isFinite(e.progress)?e.progress:0,r=typeof e.total=="number"&&Number.isFinite(e.total)?e.total:0,i=r>0?Math.min(1,Math.max(0,t/r)):0,s=Math.min(A.length-1,Math.floor(i*A.length));this.shaderLoaderTitleEl.textContent=A[s]||"Preparing scene transitions",this.shaderLoaderDetailEl.textContent=e.phase==="cached"?"Loading cached transition frames before playback.":e.phase==="finalizing"?"Uploading transition textures for smooth playback.":"Rendering animated scene samples for shader transitions.",this.shaderLoaderFillEl.style.transform=`scaleX(${i})`,this.shaderLoaderTransitionValueEl.textContent=e.currentTransition!==void 0&&e.transitionTotal!==void 0?`${e.currentTransition}/${e.transitionTotal}`:r>0?`${t}/${r}`:"";const n=e.transitionFrame!==void 0&&e.transitionFrames!==void 0?`${e.transitionFrame}/${e.transitionFrames}`:"";this.shaderLoaderFrameLabelEl.textContent=e.phase==="cached"?"cached transition frames":e.phase==="finalizing"?"finalizing transition frames":"rendering transition frames",this.shaderLoaderFrameValueEl.textContent=n,this.shaderLoaderFrameRowEl.style.visibility=n?"visible":"hidden",this.shaderLoaderEl.setAttribute("aria-valuenow",String(Math.round(i*100))),this._showShaderLoader()}_trySyncSeek(e){try{const t=this.iframe.contentWindow,r=t==null?void 0:t.__player,i=r==null?void 0:r.seek;return typeof i!="function"?!1:(i.call(r,e),!0)}catch{return!1}}_isControlsClick(e){return e.composedPath().some(t=>t instanceof HTMLElement&&t.classList.contains("hfp-controls"))}_onMessage(e){var r,i,s,n;if(e.source!==this.iframe.contentWindow)return;const t=e.data;if(!(!t||t.source!=="hf-preview")){if(t.type==="shader-transition-state"){const o=t.state&&typeof t.state=="object"?t.state:{};this._updateShaderLoader(o),this.dispatchEvent(new CustomEvent("shadertransitionstate",{detail:{compositionId:t.compositionId,state:o}}));return}if(t.type==="state"){this._currentTime=(t.frame??0)/T;const o=!this._paused,f=!t.isPlaying,u=this._duration>0&&this._currentTime>=this._duration&&(o||t.isPlaying);if(u&&this.loop){this._audioOwner==="parent"&&this._pauseParentMedia(),this._paused=f,this.seek(0),this.play();return}this._paused=f,this._audioOwner==="parent"&&(o&&this._paused?this._pauseParentMedia():!o&&!this._paused&&this._playParentMedia(),this._mirrorParentMediaTime(this._currentTime));const h=performance.now();(h-this._lastUpdateMs>100||this._paused!==o)&&(this._lastUpdateMs=h,(r=this.controlsApi)==null||r.updateTime(this._currentTime,this._duration),(i=this.controlsApi)==null||i.updatePlaying(!this._paused),this.dispatchEvent(new CustomEvent("timeupdate",{detail:{currentTime:this._currentTime}}))),u&&(this._audioOwner==="parent"&&this._pauseParentMedia(),this._paused=!0,(s=this.controlsApi)==null||s.updatePlaying(!1),this.dispatchEvent(new Event("ended")))}t.type==="media-autoplay-blocked"&&this._promoteToParentProxy(),t.type==="timeline"&&t.durationInFrames>0&&Number.isFinite(t.durationInFrames)&&(this._duration=t.durationInFrames/T,(n=this.controlsApi)==null||n.updateTime(this._currentTime,this._duration)),t.type==="stage-size"&&t.width>0&&t.height>0&&(this._compositionWidth=t.width,this._compositionHeight=t.height,this._updateScale())}}_onIframeLoad(){let e=0;this._runtimeInjected=!1,this._resetShaderLoader();const t=this._audioOwner==="parent";this._audioOwner="runtime",this._playbackErrorPosted=!1,this._pauseParentMedia(),this._teardownMediaObserver(),t&&this.dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"runtime",reason:"iframe-reload"}})),this._probeInterval&&clearInterval(this._probeInterval),this._probeInterval=setInterval(()=>{var r,i;e++;try{const s=this.iframe.contentWindow;if(!s)return;const n=!!(s.__hf||s.__player),o=!!(s.__timelines&&Object.keys(s.__timelines).length>0),f=!!((r=this.iframe.contentDocument)!=null&&r.querySelector("[data-composition-src]"));if(G({hasRuntime:n,hasTimelines:o,hasNestedCompositions:f,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!n)return;const h=(()=>{var m,g;if(s.__player&&typeof s.__player.getDuration=="function")return s.__player;if(s.__timelines){const b=Object.keys(s.__timelines);if(b.length>0){const _=(g=(m=this.iframe.contentDocument)==null?void 0:m.querySelector("[data-composition-id]"))==null?void 0:g.getAttribute("data-composition-id"),y=_&&_ in s.__timelines?_:b[b.length-1],v=s.__timelines[y];return{getDuration:()=>v.duration()}}}return null})();if(h&&h.getDuration()>0){clearInterval(this._probeInterval),this._duration=h.getDuration(),this._ready=!0,(i=this.controlsApi)==null||i.updateTime(0,this._duration),this.dispatchEvent(new CustomEvent("ready",{detail:{duration:this._duration}}));const m=this.iframe.contentDocument,g=m==null?void 0:m.querySelector("[data-composition-id]");if(g){const b=parseInt(g.getAttribute("data-width")||"0",10),_=parseInt(g.getAttribute("data-height")||"0",10);b>0&&_>0&&(this._compositionWidth=b,this._compositionHeight=_,this._updateScale())}this._setupParentMedia(),this.hasAttribute("autoplay")&&this.play();return}}catch{}e>=40&&(clearInterval(this._probeInterval),this.dispatchEvent(new CustomEvent("error",{detail:{message:"Composition timeline not found after 8s"}})))},200)}_injectRuntime(){this._runtimeInjected=!0;try{const e=this.iframe.contentDocument;if(!e)return;const t=e.createElement("script");t.src=Q,t.onload=()=>{},t.onerror=()=>{},(e.head||e.documentElement).appendChild(t)}catch{}}_updateScale(){const e=this.getBoundingClientRect();if(e.width===0||e.height===0)return;const t=Math.min(e.width/this._compositionWidth,e.height/this._compositionHeight);this.iframe.style.width=`${this._compositionWidth}px`,this.iframe.style.height=`${this._compositionHeight}px`,this.iframe.style.transform=`translate(-50%, -50%) scale(${t})`}_setupControls(){if(this.controlsApi)return;const e={onPlay:()=>this.play(),onPause:()=>this.pause(),onSeek:i=>this.seek(i*this._duration),onSpeedChange:i=>{this.playbackRate=i}},t=this.getAttribute("speed-presets"),r=t?t.split(",").map(Number).filter(i=>!isNaN(i)&&i>0):void 0;this.controlsApi=W(this.shadow,e,{speedPresets:r})}_setupPoster(){var t;const e=this.getAttribute("poster");if(!e){(t=this.posterEl)==null||t.remove(),this.posterEl=null;return}this.posterEl||(this.posterEl=document.createElement("img"),this.posterEl.className="hfp-poster",this.shadow.appendChild(this.posterEl)),this.posterEl.src=e}_playParentMedia(){for(const e of this._parentMedia)e.el.src&&e.el.play().catch(t=>this._reportPlaybackError(t))}_reportPlaybackError(e){this._playbackErrorPosted||(this._playbackErrorPosted=!0,this.dispatchEvent(new CustomEvent("playbackerror",{detail:{source:"parent-proxy",error:e}})))}_pauseParentMedia(){for(const e of this._parentMedia)e.el.pause()}_mirrorParentMediaTime(e,t){const r=(t==null?void 0:t.force)===!0,i=x.MIRROR_REQUIRED_CONSECUTIVE_DRIFT_SAMPLES,s=x.MIRROR_DRIFT_THRESHOLD_SECONDS;for(const n of this._parentMedia){const o=e-n.start;if(o<0||o>=n.duration){n.driftSamples=0;continue}Math.abs(n.el.currentTime-o)>s?(n.driftSamples+=1,(r||n.driftSamples>=i)&&(n.el.currentTime=o,n.driftSamples=0)):n.driftSamples=0}}_promoteToParentProxy(){this._audioOwner!=="parent"&&(this._audioOwner="parent",this._sendControl("set-media-output-muted",{muted:!0}),this._mirrorParentMediaTime(this._currentTime,{force:!0}),this._paused||this._playParentMedia(),this.dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"parent",reason:"autoplay-blocked"}})))}_createParentMedia(e,t,r,i){if(this._parentMedia.some(o=>o.el.src===e))return null;const s=t==="video"?document.createElement("video"):new Audio;s.preload="auto",s.src=e,s.load(),s.muted=this.muted,this.playbackRate!==1&&(s.playbackRate=this.playbackRate);const n={el:s,start:r,duration:i,driftSamples:0};return this._parentMedia.push(n),n}_setupParentAudioFromUrl(e){this._createParentMedia(e,"audio",0,1/0)}_setupParentMedia(){try{const e=this.iframe.contentDocument;if(!e)return;const t=e.querySelectorAll("audio[data-start], video[data-start]");for(const r of t)this._adoptIframeMedia(r);this._observeDynamicMedia(e)}catch{}}_adoptIframeMedia(e){var f;const t=e.getAttribute("src")||((f=e.querySelector("source"))==null?void 0:f.getAttribute("src"));if(!t)return;const r=new URL(t,e.ownerDocument.baseURI).href,i=parseFloat(e.getAttribute("data-start")||"0"),s=parseFloat(e.getAttribute("data-duration")||"Infinity"),n=e.tagName==="VIDEO"?"video":"audio",o=this._createParentMedia(r,n,i,s);o&&this._audioOwner==="parent"&&(this._mirrorParentMediaTime(this._currentTime,{force:!0}),!this._paused&&o.el.src&&o.el.play().catch(u=>this._reportPlaybackError(u)))}_observeDynamicMedia(e){if(this._teardownMediaObserver(),typeof MutationObserver>"u"||!e.body)return;const t=new MutationObserver(i=>{var s,n,o,f;for(const u of i){for(const h of u.addedNodes){if(!(h instanceof Element))continue;const m=[];(s=h.matches)!=null&&s.call(h,"audio[data-start], video[data-start]")&&m.push(h);const g=(n=h.querySelectorAll)==null?void 0:n.call(h,"audio[data-start], video[data-start]");if(g)for(const b of g)m.push(b);for(const b of m)this._adoptIframeMedia(b)}for(const h of u.removedNodes){if(!(h instanceof Element))continue;const m=[];(o=h.matches)!=null&&o.call(h,"audio[data-start], video[data-start]")&&m.push(h);const g=(f=h.querySelectorAll)==null?void 0:f.call(h,"audio[data-start], video[data-start]");if(g)for(const b of g)m.push(b);for(const b of m)this._detachIframeMedia(b)}}}),r=e.querySelectorAll("[data-composition-id]");if(r.length>0)for(const i of r)t.observe(i,{childList:!0,subtree:!0});else t.observe(e.body,{childList:!0,subtree:!0});this._mediaObserver=t}_teardownMediaObserver(){var e;(e=this._mediaObserver)==null||e.disconnect(),this._mediaObserver=void 0}_detachIframeMedia(e){var n;const t=e.getAttribute("src")||((n=e.querySelector("source"))==null?void 0:n.getAttribute("src"));if(!t)return;const r=new URL(t,e.ownerDocument.baseURI).href,i=this._parentMedia.findIndex(o=>o.el.src===r);if(i===-1)return;const s=this._parentMedia[i];s.el.pause(),s.el.src="",this._parentMedia.splice(i,1)}_hidePoster(){var e;(e=this.posterEl)==null||e.remove(),this.posterEl=null}};c(x,"MIRROR_DRIFT_THRESHOLD_SECONDS",.05),c(x,"MIRROR_REQUIRED_CONSECUTIVE_DRIFT_SAMPLES",2);let M=x;customElements.get("hyperframes-player")||customElements.define("hyperframes-player",M);export{M as HyperframesPlayer,B as SPEED_PRESETS,C as formatSpeed,D as formatTime};
@@ -37,7 +37,7 @@
37
37
  `+g[k].replace(" at new "," at ");return s.displayName&&V.includes("<anonymous>")&&(V=V.replace("<anonymous>",s.displayName)),V}while(1<=k&&0<=A);break}}}finally{ce=!1,Error.prepareStackTrace=h}return(s=s?s.displayName||s.name:"")?_(s):""}function Xe(s){switch(s.tag){case 5:return _(s.type);case 16:return _("Lazy");case 13:return _("Suspense");case 19:return _("SuspenseList");case 0:case 2:case 15:return s=xe(s.type,!1),s;case 11:return s=xe(s.type.render,!1),s;case 1:return s=xe(s.type,!0),s;default:return""}}function I(s){if(s==null)return null;if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case Z:return"Fragment";case X:return"Portal";case Y:return"Profiler";case H:return"StrictMode";case ye:return"Suspense";case je:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case se:return(s.displayName||"Context")+".Consumer";case J:return(s._context.displayName||"Context")+".Provider";case oe:var a=s.render;return s=s.displayName,s||(s=a.displayName||a.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case _e:return a=s.displayName||null,a!==null?a:I(s.type)||"Memo";case U:a=s._payload,s=s._init;try{return I(s(a))}catch{}}return null}function K(s){var a=s.type;switch(s.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=a.render,s=s.displayName||s.name||"",a.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return I(a);case 8:return a===H?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function ue(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function Oe(s){var a=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function Ve(s){var a=Oe(s)?"checked":"value",h=Object.getOwnPropertyDescriptor(s.constructor.prototype,a),p=""+s[a];if(!s.hasOwnProperty(a)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var g=h.get,v=h.set;return Object.defineProperty(s,a,{configurable:!0,get:function(){return g.call(this)},set:function(k){p=""+k,v.call(this,k)}}),Object.defineProperty(s,a,{enumerable:h.enumerable}),{getValue:function(){return p},setValue:function(k){p=""+k},stopTracking:function(){s._valueTracker=null,delete s[a]}}}}function ze(s){s._valueTracker||(s._valueTracker=Ve(s))}function We(s){if(!s)return!1;var a=s._valueTracker;if(!a)return!0;var h=a.getValue(),p="";return s&&(p=Oe(s)?s.checked?"true":"false":s.value),s=p,s!==h?(a.setValue(s),!0):!1}function Ge(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}function Ye(s,a){var h=a.checked;return ee({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:h??s._wrapperState.initialChecked})}function Ze(s,a){var h=a.defaultValue==null?"":a.defaultValue,p=a.checked!=null?a.checked:a.defaultChecked;h=ue(a.value!=null?a.value:h),s._wrapperState={initialChecked:p,initialValue:h,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function qe(s,a){a=a.checked,a!=null&&P(s,"checked",a,!1)}function Se(s,a){qe(s,a);var h=ue(a.value),p=a.type;if(h!=null)p==="number"?(h===0&&s.value===""||s.value!=h)&&(s.value=""+h):s.value!==""+h&&(s.value=""+h);else if(p==="submit"||p==="reset"){s.removeAttribute("value");return}a.hasOwnProperty("value")?ke(s,a.type,h):a.hasOwnProperty("defaultValue")&&ke(s,a.type,ue(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(s.defaultChecked=!!a.defaultChecked)}function Re(s,a,h){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var p=a.type;if(!(p!=="submit"&&p!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+s._wrapperState.initialValue,h||a===s.value||(s.value=a),s.defaultValue=a}h=s.name,h!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,h!==""&&(s.name=h)}function ke(s,a,h){(a!=="number"||Ge(s.ownerDocument)!==s)&&(h==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+h&&(s.defaultValue=""+h))}var et=Array.isArray;function pt(s,a,h,p){if(s=s.options,a){a={};for(var g=0;g<h.length;g++)a["$"+h[g]]=!0;for(h=0;h<s.length;h++)g=a.hasOwnProperty("$"+s[h].value),s[h].selected!==g&&(s[h].selected=g),g&&p&&(s[h].defaultSelected=!0)}else{for(h=""+ue(h),a=null,g=0;g<s.length;g++){if(s[g].value===h){s[g].selected=!0,p&&(s[g].defaultSelected=!0);return}a!==null||s[g].disabled||(a=s[g])}a!==null&&(a.selected=!0)}}function nt(s,a){if(a.dangerouslySetInnerHTML!=null)throw Error(t(91));return ee({},a,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function It(s,a){var h=a.value;if(h==null){if(h=a.children,a=a.defaultValue,h!=null){if(a!=null)throw Error(t(92));if(et(h)){if(1<h.length)throw Error(t(93));h=h[0]}a=h}a==null&&(a=""),h=a}s._wrapperState={initialValue:ue(h)}}function xr(s,a){var h=ue(a.value),p=ue(a.defaultValue);h!=null&&(h=""+h,h!==s.value&&(s.value=h),a.defaultValue==null&&s.defaultValue!==h&&(s.defaultValue=h)),p!=null&&(s.defaultValue=""+p)}function Vr(s){var a=s.textContent;a===s._wrapperState.initialValue&&a!==""&&a!==null&&(s.value=a)}function un(s){switch(s){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function en(s,a){return s==null||s==="http://www.w3.org/1999/xhtml"?un(a):s==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var ut,gt=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(a,h,p,g){MSApp.execUnsafeLocalFunction(function(){return s(a,h,p,g)})}:s})(function(s,a){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=a;else{for(ut=ut||document.createElement("div"),ut.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=ut.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;a.firstChild;)s.appendChild(a.firstChild)}});function Ft(s,a){if(a){var h=s.firstChild;if(h&&h===s.lastChild&&h.nodeType===3){h.nodeValue=a;return}}s.textContent=a}var Lt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},tn=["Webkit","ms","Moz","O"];Object.keys(Lt).forEach(function(s){tn.forEach(function(a){a=a+s.charAt(0).toUpperCase()+s.substring(1),Lt[a]=Lt[s]})});function nn(s,a,h){return a==null||typeof a=="boolean"||a===""?"":h||typeof a!="number"||a===0||Lt.hasOwnProperty(s)&&Lt[s]?(""+a).trim():a+"px"}function Yt(s,a){s=s.style;for(var h in a)if(a.hasOwnProperty(h)){var p=h.indexOf("--")===0,g=nn(h,a[h],p);h==="float"&&(h="cssFloat"),p?s.setProperty(h,g):s[h]=g}}var On=ee({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function vr(s,a){if(a){if(On[s]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(t(137,s));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(t(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(t(61))}if(a.style!=null&&typeof a.style!="object")throw Error(t(62))}}function yt(s,a){if(s.indexOf("-")===-1)return typeof a.is=="string";switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Bt=null;function sr(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var Qn=null,wt=null,Tt=null;function Yn(s){if(s=no(s)){if(typeof Qn!="function")throw Error(t(280));var a=s.stateNode;a&&(a=Qa(a),Qn(s.stateNode,s.type,a))}}function Sr(s){wt?Tt?Tt.push(s):Tt=[s]:wt=s}function Rr(){if(wt){var s=wt,a=Tt;if(Tt=wt=null,Yn(s),a)for(s=0;s<a.length;s++)Yn(a[s])}}function Lr(s,a){return s(a)}function Nt(){}var lr=!1;function si(s,a,h){if(lr)return s(a,h);lr=!0;try{return Lr(s,a,h)}finally{lr=!1,(wt!==null||Tt!==null)&&(Nt(),Rr())}}function wr(s,a){var h=s.stateNode;if(h===null)return null;var p=Qa(h);if(p===null)return null;h=p[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(s=s.type,p=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!p;break e;default:s=!1}if(s)return null;if(h&&typeof h!="function")throw Error(t(231,a,typeof h));return h}var li=!1;if(c)try{var Bn={};Object.defineProperty(Bn,"passive",{get:function(){li=!0}}),window.addEventListener("test",Bn,Bn),window.removeEventListener("test",Bn,Bn)}catch{li=!1}function Vs(s,a,h,p,g,v,k,A,V){var W=Array.prototype.slice.call(arguments,3);try{a.apply(h,W)}catch(ae){this.onError(ae)}}var Nr=!1,oi=null,Xr=!1,_r=null,j={onError:function(s){Nr=!0,oi=s}};function G(s,a,h,p,g,v,k,A,V){Nr=!1,oi=null,Vs.apply(j,arguments)}function he(s,a,h,p,g,v,k,A,V){if(G.apply(this,arguments),Nr){if(Nr){var W=oi;Nr=!1,oi=null}else throw Error(t(198));Xr||(Xr=!0,_r=W)}}function pe(s){var a=s,h=s;if(s.alternate)for(;a.return;)a=a.return;else{s=a;do a=s,(a.flags&4098)!==0&&(h=a.return),s=a.return;while(s)}return a.tag===3?h:null}function ge(s){if(s.tag===13){var a=s.memoizedState;if(a===null&&(s=s.alternate,s!==null&&(a=s.memoizedState)),a!==null)return a.dehydrated}return null}function Fe(s){if(pe(s)!==s)throw Error(t(188))}function De(s){var a=s.alternate;if(!a){if(a=pe(s),a===null)throw Error(t(188));return a!==s?null:s}for(var h=s,p=a;;){var g=h.return;if(g===null)break;var v=g.alternate;if(v===null){if(p=g.return,p!==null){h=p;continue}break}if(g.child===v.child){for(v=g.child;v;){if(v===h)return Fe(g),s;if(v===p)return Fe(g),a;v=v.sibling}throw Error(t(188))}if(h.return!==p.return)h=g,p=v;else{for(var k=!1,A=g.child;A;){if(A===h){k=!0,h=g,p=v;break}if(A===p){k=!0,p=g,h=v;break}A=A.sibling}if(!k){for(A=v.child;A;){if(A===h){k=!0,h=v,p=g;break}if(A===p){k=!0,p=v,h=g;break}A=A.sibling}if(!k)throw Error(t(189))}}if(h.alternate!==p)throw Error(t(190))}if(h.tag!==3)throw Error(t(188));return h.stateNode.current===h?s:a}function Be(s){return s=De(s),s!==null?L(s):null}function L(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var a=L(s);if(a!==null)return a;s=s.sibling}return null}var re=e.unstable_scheduleCallback,ie=e.unstable_cancelCallback,F=e.unstable_shouldYield,be=e.unstable_requestPaint,q=e.unstable_now,Pe=e.unstable_getCurrentPriorityLevel,dt=e.unstable_ImmediatePriority,st=e.unstable_UserBlockingPriority,Qt=e.unstable_NormalPriority,Zn=e.unstable_LowPriority,Et=e.unstable_IdlePriority,$n=null,qt=null;function Yu(s){if(qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot($n,s,void 0,(s.current.flags&128)===128)}catch{}}var or=Math.clz32?Math.clz32:as,ca=Math.log,$t=Math.LN2;function as(s){return s>>>=0,s===0?32:31-(ca(s)/$t|0)|0}var ai=64,ci=4194304;function Ai(s){switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return s&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return s}}function cs(s,a){var h=s.pendingLanes;if(h===0)return 0;var p=0,g=s.suspendedLanes,v=s.pingedLanes,k=h&268435455;if(k!==0){var A=k&~g;A!==0?p=Ai(A):(v&=k,v!==0&&(p=Ai(v)))}else k=h&~g,k!==0?p=Ai(k):v!==0&&(p=Ai(v));if(p===0)return 0;if(a!==0&&a!==p&&(a&g)===0&&(g=p&-p,v=a&-a,g>=v||g===16&&(v&4194240)!==0))return a;if((p&4)!==0&&(p|=h&16),a=s.entangledLanes,a!==0)for(s=s.entanglements,a&=p;0<a;)h=31-or(a),g=1<<h,p|=s[h],a&=~g;return p}function oy(s,a){switch(s){case 1:case 2:case 4:return a+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ay(s,a){for(var h=s.suspendedLanes,p=s.pingedLanes,g=s.expirationTimes,v=s.pendingLanes;0<v;){var k=31-or(v),A=1<<k,V=g[k];V===-1?((A&h)===0||(A&p)!==0)&&(g[k]=oy(A,a)):V<=a&&(s.expiredLanes|=A),v&=~A}}function Bu(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function xd(){var s=ai;return ai<<=1,(ai&4194240)===0&&(ai=64),s}function qu(s){for(var a=[],h=0;31>h;h++)a.push(s);return a}function Xl(s,a,h){s.pendingLanes|=a,a!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,a=31-or(a),s[a]=h}function cy(s,a){var h=s.pendingLanes&~a;s.pendingLanes=a,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=a,s.mutableReadLanes&=a,s.entangledLanes&=a,a=s.entanglements;var p=s.eventTimes;for(s=s.expirationTimes;0<h;){var g=31-or(h),v=1<<g;a[g]=0,p[g]=-1,s[g]=-1,h&=~v}}function Uu(s,a){var h=s.entangledLanes|=a;for(s=s.entanglements;h;){var p=31-or(h),g=1<<p;g&a|s[p]&a&&(s[p]|=a),h&=~g}}var Ot=0;function vd(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var Sd,Gu,wd,kd,bd,Ku=!1,ua=[],Ci=null,Ti=null,Mi=null,_l=new Map,zl=new Map,Zi=[],uy="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Qd(s,a){switch(s){case"focusin":case"focusout":Ci=null;break;case"dragenter":case"dragleave":Ti=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":_l.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":zl.delete(a.pointerId)}}function Dl(s,a,h,p,g,v){return s===null||s.nativeEvent!==v?(s={blockedOn:a,domEventName:h,eventSystemFlags:p,nativeEvent:v,targetContainers:[g]},a!==null&&(a=no(a),a!==null&&Gu(a)),s):(s.eventSystemFlags|=p,a=s.targetContainers,g!==null&&a.indexOf(g)===-1&&a.push(g),s)}function hy(s,a,h,p,g){switch(a){case"focusin":return Ci=Dl(Ci,s,a,h,p,g),!0;case"dragenter":return Ti=Dl(Ti,s,a,h,p,g),!0;case"mouseover":return Mi=Dl(Mi,s,a,h,p,g),!0;case"pointerover":var v=g.pointerId;return _l.set(v,Dl(_l.get(v)||null,s,a,h,p,g)),!0;case"gotpointercapture":return v=g.pointerId,zl.set(v,Dl(zl.get(v)||null,s,a,h,p,g)),!0}return!1}function $d(s){var a=us(s.target);if(a!==null){var h=pe(a);if(h!==null){if(a=h.tag,a===13){if(a=ge(h),a!==null){s.blockedOn=a,bd(s.priority,function(){wd(h)});return}}else if(a===3&&h.stateNode.current.memoizedState.isDehydrated){s.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}s.blockedOn=null}function ha(s){if(s.blockedOn!==null)return!1;for(var a=s.targetContainers;0<a.length;){var h=e0(s.domEventName,s.eventSystemFlags,a[0],s.nativeEvent);if(h===null){h=s.nativeEvent;var p=new h.constructor(h.type,h);Bt=p,h.target.dispatchEvent(p),Bt=null}else return a=no(h),a!==null&&Gu(a),s.blockedOn=h,!1;a.shift()}return!0}function Pd(s,a,h){ha(s)&&h.delete(a)}function fy(){Ku=!1,Ci!==null&&ha(Ci)&&(Ci=null),Ti!==null&&ha(Ti)&&(Ti=null),Mi!==null&&ha(Mi)&&(Mi=null),_l.forEach(Pd),zl.forEach(Pd)}function Il(s,a){s.blockedOn===a&&(s.blockedOn=null,Ku||(Ku=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,fy)))}function Hl(s){function a(g){return Il(g,s)}if(0<ua.length){Il(ua[0],s);for(var h=1;h<ua.length;h++){var p=ua[h];p.blockedOn===s&&(p.blockedOn=null)}}for(Ci!==null&&Il(Ci,s),Ti!==null&&Il(Ti,s),Mi!==null&&Il(Mi,s),_l.forEach(a),zl.forEach(a),h=0;h<Zi.length;h++)p=Zi[h],p.blockedOn===s&&(p.blockedOn=null);for(;0<Zi.length&&(h=Zi[0],h.blockedOn===null);)$d(h),h.blockedOn===null&&Zi.shift()}var Rs=M.ReactCurrentBatchConfig,fa=!0;function dy(s,a,h,p){var g=Ot,v=Rs.transition;Rs.transition=null;try{Ot=1,Ju(s,a,h,p)}finally{Ot=g,Rs.transition=v}}function py(s,a,h,p){var g=Ot,v=Rs.transition;Rs.transition=null;try{Ot=4,Ju(s,a,h,p)}finally{Ot=g,Rs.transition=v}}function Ju(s,a,h,p){if(fa){var g=e0(s,a,h,p);if(g===null)g0(s,a,p,da,h),Qd(s,p);else if(hy(g,s,a,h,p))p.stopPropagation();else if(Qd(s,p),a&4&&-1<uy.indexOf(s)){for(;g!==null;){var v=no(g);if(v!==null&&Sd(v),v=e0(s,a,h,p),v===null&&g0(s,a,p,da,h),v===g)break;g=v}g!==null&&p.stopPropagation()}else g0(s,a,p,null,h)}}var da=null;function e0(s,a,h,p){if(da=null,s=sr(p),s=us(s),s!==null)if(a=pe(s),a===null)s=null;else if(h=a.tag,h===13){if(s=ge(a),s!==null)return s;s=null}else if(h===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;s=null}else a!==s&&(s=null);return da=s,null}function Ad(s){switch(s){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Pe()){case dt:return 1;case st:return 4;case Qt:case Zn:return 16;case Et:return 536870912;default:return 16}default:return 16}}var Ei=null,t0=null,pa=null;function Cd(){if(pa)return pa;var s,a=t0,h=a.length,p,g="value"in Ei?Ei.value:Ei.textContent,v=g.length;for(s=0;s<h&&a[s]===g[s];s++);var k=h-s;for(p=1;p<=k&&a[h-p]===g[v-p];p++);return pa=g.slice(s,1<p?1-p:void 0)}function ma(s){var a=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&a===13&&(s=13)):s=a,s===10&&(s=13),32<=s||s===13?s:0}function Oa(){return!0}function Td(){return!1}function qn(s){function a(h,p,g,v,k){this._reactName=h,this._targetInst=g,this.type=p,this.nativeEvent=v,this.target=k,this.currentTarget=null;for(var A in s)s.hasOwnProperty(A)&&(h=s[A],this[A]=h?h(v):v[A]);return this.isDefaultPrevented=(v.defaultPrevented!=null?v.defaultPrevented:v.returnValue===!1)?Oa:Td,this.isPropagationStopped=Td,this}return ee(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=Oa)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=Oa)},persist:function(){},isPersistent:Oa}),a}var Ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},n0=qn(Ls),Wl=ee({},Ls,{view:0,detail:0}),my=qn(Wl),r0,i0,Fl,ga=ee({},Wl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:l0,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Fl&&(Fl&&s.type==="mousemove"?(r0=s.screenX-Fl.screenX,i0=s.screenY-Fl.screenY):i0=r0=0,Fl=s),r0)},movementY:function(s){return"movementY"in s?s.movementY:i0}}),Md=qn(ga),Oy=ee({},ga,{dataTransfer:0}),gy=qn(Oy),yy=ee({},Wl,{relatedTarget:0}),s0=qn(yy),xy=ee({},Ls,{animationName:0,elapsedTime:0,pseudoElement:0}),vy=qn(xy),Sy=ee({},Ls,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),wy=qn(Sy),ky=ee({},Ls,{data:0}),Zd=qn(ky),by={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Qy={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},$y={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Py(s){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(s):(s=$y[s])?!!a[s]:!1}function l0(){return Py}var Ay=ee({},Wl,{key:function(s){if(s.key){var a=by[s.key]||s.key;if(a!=="Unidentified")return a}return s.type==="keypress"?(s=ma(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?Qy[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:l0,charCode:function(s){return s.type==="keypress"?ma(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?ma(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),Cy=qn(Ay),Ty=ee({},ga,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Ed=qn(Ty),My=ee({},Wl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:l0}),Zy=qn(My),Ey=ee({},Ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),jy=qn(Ey),Vy=ee({},ga,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),Ry=qn(Vy),Ly=[9,13,27,32],o0=c&&"CompositionEvent"in window,Yl=null;c&&"documentMode"in document&&(Yl=document.documentMode);var Ny=c&&"TextEvent"in window&&!Yl,jd=c&&(!o0||Yl&&8<Yl&&11>=Yl),Vd=" ",Rd=!1;function Ld(s,a){switch(s){case"keyup":return Ly.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nd(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var Ns=!1;function Xy(s,a){switch(s){case"compositionend":return Nd(a);case"keypress":return a.which!==32?null:(Rd=!0,Vd);case"textInput":return s=a.data,s===Vd&&Rd?null:s;default:return null}}function _y(s,a){if(Ns)return s==="compositionend"||!o0&&Ld(s,a)?(s=Cd(),pa=t0=Ei=null,Ns=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return jd&&a.locale!=="ko"?null:a.data;default:return null}}var zy={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Xd(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a==="input"?!!zy[s.type]:a==="textarea"}function _d(s,a,h,p){Sr(p),a=wa(a,"onChange"),0<a.length&&(h=new n0("onChange","change",null,h,p),s.push({event:h,listeners:a}))}var Bl=null,ql=null;function Dy(s){ip(s,0)}function ya(s){var a=Is(s);if(We(a))return s}function Iy(s,a){if(s==="change")return a}var zd=!1;if(c){var a0;if(c){var c0="oninput"in document;if(!c0){var Dd=document.createElement("div");Dd.setAttribute("oninput","return;"),c0=typeof Dd.oninput=="function"}a0=c0}else a0=!1;zd=a0&&(!document.documentMode||9<document.documentMode)}function Id(){Bl&&(Bl.detachEvent("onpropertychange",Hd),ql=Bl=null)}function Hd(s){if(s.propertyName==="value"&&ya(ql)){var a=[];_d(a,ql,s,sr(s)),si(Dy,a)}}function Hy(s,a,h){s==="focusin"?(Id(),Bl=a,ql=h,Bl.attachEvent("onpropertychange",Hd)):s==="focusout"&&Id()}function Wy(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return ya(ql)}function Fy(s,a){if(s==="click")return ya(a)}function Yy(s,a){if(s==="input"||s==="change")return ya(a)}function By(s,a){return s===a&&(s!==0||1/s===1/a)||s!==s&&a!==a}var kr=typeof Object.is=="function"?Object.is:By;function Ul(s,a){if(kr(s,a))return!0;if(typeof s!="object"||s===null||typeof a!="object"||a===null)return!1;var h=Object.keys(s),p=Object.keys(a);if(h.length!==p.length)return!1;for(p=0;p<h.length;p++){var g=h[p];if(!u.call(a,g)||!kr(s[g],a[g]))return!1}return!0}function Wd(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function Fd(s,a){var h=Wd(s);s=0;for(var p;h;){if(h.nodeType===3){if(p=s+h.textContent.length,s<=a&&p>=a)return{node:h,offset:a-s};s=p}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=Wd(h)}}function Yd(s,a){return s&&a?s===a?!0:s&&s.nodeType===3?!1:a&&a.nodeType===3?Yd(s,a.parentNode):"contains"in s?s.contains(a):s.compareDocumentPosition?!!(s.compareDocumentPosition(a)&16):!1:!1}function Bd(){for(var s=window,a=Ge();a instanceof s.HTMLIFrameElement;){try{var h=typeof a.contentWindow.location.href=="string"}catch{h=!1}if(h)s=a.contentWindow;else break;a=Ge(s.document)}return a}function u0(s){var a=s&&s.nodeName&&s.nodeName.toLowerCase();return a&&(a==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||a==="textarea"||s.contentEditable==="true")}function qy(s){var a=Bd(),h=s.focusedElem,p=s.selectionRange;if(a!==h&&h&&h.ownerDocument&&Yd(h.ownerDocument.documentElement,h)){if(p!==null&&u0(h)){if(a=p.start,s=p.end,s===void 0&&(s=a),"selectionStart"in h)h.selectionStart=a,h.selectionEnd=Math.min(s,h.value.length);else if(s=(a=h.ownerDocument||document)&&a.defaultView||window,s.getSelection){s=s.getSelection();var g=h.textContent.length,v=Math.min(p.start,g);p=p.end===void 0?v:Math.min(p.end,g),!s.extend&&v>p&&(g=p,p=v,v=g),g=Fd(h,v);var k=Fd(h,p);g&&k&&(s.rangeCount!==1||s.anchorNode!==g.node||s.anchorOffset!==g.offset||s.focusNode!==k.node||s.focusOffset!==k.offset)&&(a=a.createRange(),a.setStart(g.node,g.offset),s.removeAllRanges(),v>p?(s.addRange(a),s.extend(k.node,k.offset)):(a.setEnd(k.node,k.offset),s.addRange(a)))}}for(a=[],s=h;s=s.parentNode;)s.nodeType===1&&a.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<a.length;h++)s=a[h],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var Uy=c&&"documentMode"in document&&11>=document.documentMode,Xs=null,h0=null,Gl=null,f0=!1;function qd(s,a,h){var p=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;f0||Xs==null||Xs!==Ge(p)||(p=Xs,"selectionStart"in p&&u0(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),Gl&&Ul(Gl,p)||(Gl=p,p=wa(h0,"onSelect"),0<p.length&&(a=new n0("onSelect","select",null,a,h),s.push({event:a,listeners:p}),a.target=Xs)))}function xa(s,a){var h={};return h[s.toLowerCase()]=a.toLowerCase(),h["Webkit"+s]="webkit"+a,h["Moz"+s]="moz"+a,h}var _s={animationend:xa("Animation","AnimationEnd"),animationiteration:xa("Animation","AnimationIteration"),animationstart:xa("Animation","AnimationStart"),transitionend:xa("Transition","TransitionEnd")},d0={},Ud={};c&&(Ud=document.createElement("div").style,"AnimationEvent"in window||(delete _s.animationend.animation,delete _s.animationiteration.animation,delete _s.animationstart.animation),"TransitionEvent"in window||delete _s.transitionend.transition);function va(s){if(d0[s])return d0[s];if(!_s[s])return s;var a=_s[s],h;for(h in a)if(a.hasOwnProperty(h)&&h in Ud)return d0[s]=a[h];return s}var Gd=va("animationend"),Kd=va("animationiteration"),Jd=va("animationstart"),ep=va("transitionend"),tp=new Map,np="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function ji(s,a){tp.set(s,a),l(a,[s])}for(var p0=0;p0<np.length;p0++){var m0=np[p0],Gy=m0.toLowerCase(),Ky=m0[0].toUpperCase()+m0.slice(1);ji(Gy,"on"+Ky)}ji(Gd,"onAnimationEnd"),ji(Kd,"onAnimationIteration"),ji(Jd,"onAnimationStart"),ji("dblclick","onDoubleClick"),ji("focusin","onFocus"),ji("focusout","onBlur"),ji(ep,"onTransitionEnd"),o("onMouseEnter",["mouseout","mouseover"]),o("onMouseLeave",["mouseout","mouseover"]),o("onPointerEnter",["pointerout","pointerover"]),o("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Kl="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Jy=new Set("cancel close invalid load scroll toggle".split(" ").concat(Kl));function rp(s,a,h){var p=s.type||"unknown-event";s.currentTarget=h,he(p,a,void 0,s),s.currentTarget=null}function ip(s,a){a=(a&4)!==0;for(var h=0;h<s.length;h++){var p=s[h],g=p.event;p=p.listeners;e:{var v=void 0;if(a)for(var k=p.length-1;0<=k;k--){var A=p[k],V=A.instance,W=A.currentTarget;if(A=A.listener,V!==v&&g.isPropagationStopped())break e;rp(g,A,W),v=V}else for(k=0;k<p.length;k++){if(A=p[k],V=A.instance,W=A.currentTarget,A=A.listener,V!==v&&g.isPropagationStopped())break e;rp(g,A,W),v=V}}}if(Xr)throw s=_r,Xr=!1,_r=null,s}function kt(s,a){var h=a[k0];h===void 0&&(h=a[k0]=new Set);var p=s+"__bubble";h.has(p)||(sp(a,s,2,!1),h.add(p))}function O0(s,a,h){var p=0;a&&(p|=4),sp(h,s,p,a)}var Sa="_reactListening"+Math.random().toString(36).slice(2);function Jl(s){if(!s[Sa]){s[Sa]=!0,r.forEach(function(h){h!=="selectionchange"&&(Jy.has(h)||O0(h,!1,s),O0(h,!0,s))});var a=s.nodeType===9?s:s.ownerDocument;a===null||a[Sa]||(a[Sa]=!0,O0("selectionchange",!1,a))}}function sp(s,a,h,p){switch(Ad(a)){case 1:var g=dy;break;case 4:g=py;break;default:g=Ju}h=g.bind(null,a,h,s),g=void 0,!li||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(g=!0),p?g!==void 0?s.addEventListener(a,h,{capture:!0,passive:g}):s.addEventListener(a,h,!0):g!==void 0?s.addEventListener(a,h,{passive:g}):s.addEventListener(a,h,!1)}function g0(s,a,h,p,g){var v=p;if((a&1)===0&&(a&2)===0&&p!==null)e:for(;;){if(p===null)return;var k=p.tag;if(k===3||k===4){var A=p.stateNode.containerInfo;if(A===g||A.nodeType===8&&A.parentNode===g)break;if(k===4)for(k=p.return;k!==null;){var V=k.tag;if((V===3||V===4)&&(V=k.stateNode.containerInfo,V===g||V.nodeType===8&&V.parentNode===g))return;k=k.return}for(;A!==null;){if(k=us(A),k===null)return;if(V=k.tag,V===5||V===6){p=v=k;continue e}A=A.parentNode}}p=p.return}si(function(){var W=v,ae=sr(h),fe=[];e:{var le=tp.get(s);if(le!==void 0){var we=n0,Ae=s;switch(s){case"keypress":if(ma(h)===0)break e;case"keydown":case"keyup":we=Cy;break;case"focusin":Ae="focus",we=s0;break;case"focusout":Ae="blur",we=s0;break;case"beforeblur":case"afterblur":we=s0;break;case"click":if(h.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":we=Md;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":we=gy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":we=Zy;break;case Gd:case Kd:case Jd:we=vy;break;case ep:we=jy;break;case"scroll":we=my;break;case"wheel":we=Ry;break;case"copy":case"cut":case"paste":we=wy;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":we=Ed}var Ee=(a&4)!==0,Xt=!Ee&&s==="scroll",z=Ee?le!==null?le+"Capture":null:le;Ee=[];for(var N=W,D;N!==null;){D=N;var de=D.stateNode;if(D.tag===5&&de!==null&&(D=de,z!==null&&(de=wr(N,z),de!=null&&Ee.push(eo(N,de,D)))),Xt)break;N=N.return}0<Ee.length&&(le=new we(le,Ae,null,h,ae),fe.push({event:le,listeners:Ee}))}}if((a&7)===0){e:{if(le=s==="mouseover"||s==="pointerover",we=s==="mouseout"||s==="pointerout",le&&h!==Bt&&(Ae=h.relatedTarget||h.fromElement)&&(us(Ae)||Ae[ui]))break e;if((we||le)&&(le=ae.window===ae?ae:(le=ae.ownerDocument)?le.defaultView||le.parentWindow:window,we?(Ae=h.relatedTarget||h.toElement,we=W,Ae=Ae?us(Ae):null,Ae!==null&&(Xt=pe(Ae),Ae!==Xt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(we=null,Ae=W),we!==Ae)){if(Ee=Md,de="onMouseLeave",z="onMouseEnter",N="mouse",(s==="pointerout"||s==="pointerover")&&(Ee=Ed,de="onPointerLeave",z="onPointerEnter",N="pointer"),Xt=we==null?le:Is(we),D=Ae==null?le:Is(Ae),le=new Ee(de,N+"leave",we,h,ae),le.target=Xt,le.relatedTarget=D,de=null,us(ae)===W&&(Ee=new Ee(z,N+"enter",Ae,h,ae),Ee.target=D,Ee.relatedTarget=Xt,de=Ee),Xt=de,we&&Ae)t:{for(Ee=we,z=Ae,N=0,D=Ee;D;D=zs(D))N++;for(D=0,de=z;de;de=zs(de))D++;for(;0<N-D;)Ee=zs(Ee),N--;for(;0<D-N;)z=zs(z),D--;for(;N--;){if(Ee===z||z!==null&&Ee===z.alternate)break t;Ee=zs(Ee),z=zs(z)}Ee=null}else Ee=null;we!==null&&lp(fe,le,we,Ee,!1),Ae!==null&&Xt!==null&&lp(fe,Xt,Ae,Ee,!0)}}e:{if(le=W?Is(W):window,we=le.nodeName&&le.nodeName.toLowerCase(),we==="select"||we==="input"&&le.type==="file")var Le=Iy;else if(Xd(le))if(zd)Le=Yy;else{Le=Wy;var Ie=Hy}else(we=le.nodeName)&&we.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(Le=Fy);if(Le&&(Le=Le(s,W))){_d(fe,Le,h,ae);break e}Ie&&Ie(s,le,W),s==="focusout"&&(Ie=le._wrapperState)&&Ie.controlled&&le.type==="number"&&ke(le,"number",le.value)}switch(Ie=W?Is(W):window,s){case"focusin":(Xd(Ie)||Ie.contentEditable==="true")&&(Xs=Ie,h0=W,Gl=null);break;case"focusout":Gl=h0=Xs=null;break;case"mousedown":f0=!0;break;case"contextmenu":case"mouseup":case"dragend":f0=!1,qd(fe,h,ae);break;case"selectionchange":if(Uy)break;case"keydown":case"keyup":qd(fe,h,ae)}var He;if(o0)e:{switch(s){case"compositionstart":var Ue="onCompositionStart";break e;case"compositionend":Ue="onCompositionEnd";break e;case"compositionupdate":Ue="onCompositionUpdate";break e}Ue=void 0}else Ns?Ld(s,h)&&(Ue="onCompositionEnd"):s==="keydown"&&h.keyCode===229&&(Ue="onCompositionStart");Ue&&(jd&&h.locale!=="ko"&&(Ns||Ue!=="onCompositionStart"?Ue==="onCompositionEnd"&&Ns&&(He=Cd()):(Ei=ae,t0="value"in Ei?Ei.value:Ei.textContent,Ns=!0)),Ie=wa(W,Ue),0<Ie.length&&(Ue=new Zd(Ue,s,null,h,ae),fe.push({event:Ue,listeners:Ie}),He?Ue.data=He:(He=Nd(h),He!==null&&(Ue.data=He)))),(He=Ny?Xy(s,h):_y(s,h))&&(W=wa(W,"onBeforeInput"),0<W.length&&(ae=new Zd("onBeforeInput","beforeinput",null,h,ae),fe.push({event:ae,listeners:W}),ae.data=He))}ip(fe,a)})}function eo(s,a,h){return{instance:s,listener:a,currentTarget:h}}function wa(s,a){for(var h=a+"Capture",p=[];s!==null;){var g=s,v=g.stateNode;g.tag===5&&v!==null&&(g=v,v=wr(s,h),v!=null&&p.unshift(eo(s,v,g)),v=wr(s,a),v!=null&&p.push(eo(s,v,g))),s=s.return}return p}function zs(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function lp(s,a,h,p,g){for(var v=a._reactName,k=[];h!==null&&h!==p;){var A=h,V=A.alternate,W=A.stateNode;if(V!==null&&V===p)break;A.tag===5&&W!==null&&(A=W,g?(V=wr(h,v),V!=null&&k.unshift(eo(h,V,A))):g||(V=wr(h,v),V!=null&&k.push(eo(h,V,A)))),h=h.return}k.length!==0&&s.push({event:a,listeners:k})}var ex=/\r\n?/g,tx=/\u0000|\uFFFD/g;function op(s){return(typeof s=="string"?s:""+s).replace(ex,`
38
38
  `).replace(tx,"")}function ka(s,a,h){if(a=op(a),op(s)!==a&&h)throw Error(t(425))}function ba(){}var y0=null,x0=null;function v0(s,a){return s==="textarea"||s==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var S0=typeof setTimeout=="function"?setTimeout:void 0,nx=typeof clearTimeout=="function"?clearTimeout:void 0,ap=typeof Promise=="function"?Promise:void 0,rx=typeof queueMicrotask=="function"?queueMicrotask:typeof ap<"u"?function(s){return ap.resolve(null).then(s).catch(ix)}:S0;function ix(s){setTimeout(function(){throw s})}function w0(s,a){var h=a,p=0;do{var g=h.nextSibling;if(s.removeChild(h),g&&g.nodeType===8)if(h=g.data,h==="/$"){if(p===0){s.removeChild(g),Hl(a);return}p--}else h!=="$"&&h!=="$?"&&h!=="$!"||p++;h=g}while(h);Hl(a)}function Vi(s){for(;s!=null;s=s.nextSibling){var a=s.nodeType;if(a===1||a===3)break;if(a===8){if(a=s.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return s}function cp(s){s=s.previousSibling;for(var a=0;s;){if(s.nodeType===8){var h=s.data;if(h==="$"||h==="$!"||h==="$?"){if(a===0)return s;a--}else h==="/$"&&a++}s=s.previousSibling}return null}var Ds=Math.random().toString(36).slice(2),zr="__reactFiber$"+Ds,to="__reactProps$"+Ds,ui="__reactContainer$"+Ds,k0="__reactEvents$"+Ds,sx="__reactListeners$"+Ds,lx="__reactHandles$"+Ds;function us(s){var a=s[zr];if(a)return a;for(var h=s.parentNode;h;){if(a=h[ui]||h[zr]){if(h=a.alternate,a.child!==null||h!==null&&h.child!==null)for(s=cp(s);s!==null;){if(h=s[zr])return h;s=cp(s)}return a}s=h,h=s.parentNode}return null}function no(s){return s=s[zr]||s[ui],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function Is(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(t(33))}function Qa(s){return s[to]||null}var b0=[],Hs=-1;function Ri(s){return{current:s}}function bt(s){0>Hs||(s.current=b0[Hs],b0[Hs]=null,Hs--)}function vt(s,a){Hs++,b0[Hs]=s.current,s.current=a}var Li={},gn=Ri(Li),En=Ri(!1),hs=Li;function Ws(s,a){var h=s.type.contextTypes;if(!h)return Li;var p=s.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===a)return p.__reactInternalMemoizedMaskedChildContext;var g={},v;for(v in h)g[v]=a[v];return p&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=a,s.__reactInternalMemoizedMaskedChildContext=g),g}function jn(s){return s=s.childContextTypes,s!=null}function $a(){bt(En),bt(gn)}function up(s,a,h){if(gn.current!==Li)throw Error(t(168));vt(gn,a),vt(En,h)}function hp(s,a,h){var p=s.stateNode;if(a=a.childContextTypes,typeof p.getChildContext!="function")return h;p=p.getChildContext();for(var g in p)if(!(g in a))throw Error(t(108,K(s)||"Unknown",g));return ee({},h,p)}function Pa(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||Li,hs=gn.current,vt(gn,s),vt(En,En.current),!0}function fp(s,a,h){var p=s.stateNode;if(!p)throw Error(t(169));h?(s=hp(s,a,hs),p.__reactInternalMemoizedMergedChildContext=s,bt(En),bt(gn),vt(gn,s)):bt(En),vt(En,h)}var hi=null,Aa=!1,Q0=!1;function dp(s){hi===null?hi=[s]:hi.push(s)}function ox(s){Aa=!0,dp(s)}function Ni(){if(!Q0&&hi!==null){Q0=!0;var s=0,a=Ot;try{var h=hi;for(Ot=1;s<h.length;s++){var p=h[s];do p=p(!0);while(p!==null)}hi=null,Aa=!1}catch(g){throw hi!==null&&(hi=hi.slice(s+1)),re(dt,Ni),g}finally{Ot=a,Q0=!1}}return null}var Fs=[],Ys=0,Ca=null,Ta=0,ar=[],cr=0,fs=null,fi=1,di="";function ds(s,a){Fs[Ys++]=Ta,Fs[Ys++]=Ca,Ca=s,Ta=a}function pp(s,a,h){ar[cr++]=fi,ar[cr++]=di,ar[cr++]=fs,fs=s;var p=fi;s=di;var g=32-or(p)-1;p&=~(1<<g),h+=1;var v=32-or(a)+g;if(30<v){var k=g-g%5;v=(p&(1<<k)-1).toString(32),p>>=k,g-=k,fi=1<<32-or(a)+g|h<<g|p,di=v+s}else fi=1<<v|h<<g|p,di=s}function $0(s){s.return!==null&&(ds(s,1),pp(s,1,0))}function P0(s){for(;s===Ca;)Ca=Fs[--Ys],Fs[Ys]=null,Ta=Fs[--Ys],Fs[Ys]=null;for(;s===fs;)fs=ar[--cr],ar[cr]=null,di=ar[--cr],ar[cr]=null,fi=ar[--cr],ar[cr]=null}var Un=null,Gn=null,Pt=!1,br=null;function mp(s,a){var h=dr(5,null,null,0);h.elementType="DELETED",h.stateNode=a,h.return=s,a=s.deletions,a===null?(s.deletions=[h],s.flags|=16):a.push(h)}function Op(s,a){switch(s.tag){case 5:var h=s.type;return a=a.nodeType!==1||h.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(s.stateNode=a,Un=s,Gn=Vi(a.firstChild),!0):!1;case 6:return a=s.pendingProps===""||a.nodeType!==3?null:a,a!==null?(s.stateNode=a,Un=s,Gn=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(h=fs!==null?{id:fi,overflow:di}:null,s.memoizedState={dehydrated:a,treeContext:h,retryLane:1073741824},h=dr(18,null,null,0),h.stateNode=a,h.return=s,s.child=h,Un=s,Gn=null,!0):!1;default:return!1}}function A0(s){return(s.mode&1)!==0&&(s.flags&128)===0}function C0(s){if(Pt){var a=Gn;if(a){var h=a;if(!Op(s,a)){if(A0(s))throw Error(t(418));a=Vi(h.nextSibling);var p=Un;a&&Op(s,a)?mp(p,h):(s.flags=s.flags&-4097|2,Pt=!1,Un=s)}}else{if(A0(s))throw Error(t(418));s.flags=s.flags&-4097|2,Pt=!1,Un=s}}}function gp(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;Un=s}function Ma(s){if(s!==Un)return!1;if(!Pt)return gp(s),Pt=!0,!1;var a;if((a=s.tag!==3)&&!(a=s.tag!==5)&&(a=s.type,a=a!=="head"&&a!=="body"&&!v0(s.type,s.memoizedProps)),a&&(a=Gn)){if(A0(s))throw yp(),Error(t(418));for(;a;)mp(s,a),a=Vi(a.nextSibling)}if(gp(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(t(317));e:{for(s=s.nextSibling,a=0;s;){if(s.nodeType===8){var h=s.data;if(h==="/$"){if(a===0){Gn=Vi(s.nextSibling);break e}a--}else h!=="$"&&h!=="$!"&&h!=="$?"||a++}s=s.nextSibling}Gn=null}}else Gn=Un?Vi(s.stateNode.nextSibling):null;return!0}function yp(){for(var s=Gn;s;)s=Vi(s.nextSibling)}function Bs(){Gn=Un=null,Pt=!1}function T0(s){br===null?br=[s]:br.push(s)}var ax=M.ReactCurrentBatchConfig;function ro(s,a,h){if(s=h.ref,s!==null&&typeof s!="function"&&typeof s!="object"){if(h._owner){if(h=h._owner,h){if(h.tag!==1)throw Error(t(309));var p=h.stateNode}if(!p)throw Error(t(147,s));var g=p,v=""+s;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===v?a.ref:(a=function(k){var A=g.refs;k===null?delete A[v]:A[v]=k},a._stringRef=v,a)}if(typeof s!="string")throw Error(t(284));if(!h._owner)throw Error(t(290,s))}return s}function Za(s,a){throw s=Object.prototype.toString.call(a),Error(t(31,s==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":s))}function xp(s){var a=s._init;return a(s._payload)}function vp(s){function a(z,N){if(s){var D=z.deletions;D===null?(z.deletions=[N],z.flags|=16):D.push(N)}}function h(z,N){if(!s)return null;for(;N!==null;)a(z,N),N=N.sibling;return null}function p(z,N){for(z=new Map;N!==null;)N.key!==null?z.set(N.key,N):z.set(N.index,N),N=N.sibling;return z}function g(z,N){return z=Fi(z,N),z.index=0,z.sibling=null,z}function v(z,N,D){return z.index=D,s?(D=z.alternate,D!==null?(D=D.index,D<N?(z.flags|=2,N):D):(z.flags|=2,N)):(z.flags|=1048576,N)}function k(z){return s&&z.alternate===null&&(z.flags|=2),z}function A(z,N,D,de){return N===null||N.tag!==6?(N=Sh(D,z.mode,de),N.return=z,N):(N=g(N,D),N.return=z,N)}function V(z,N,D,de){var Le=D.type;return Le===Z?ae(z,N,D.props.children,de,D.key):N!==null&&(N.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===U&&xp(Le)===N.type)?(de=g(N,D.props),de.ref=ro(z,N,D),de.return=z,de):(de=nc(D.type,D.key,D.props,null,z.mode,de),de.ref=ro(z,N,D),de.return=z,de)}function W(z,N,D,de){return N===null||N.tag!==4||N.stateNode.containerInfo!==D.containerInfo||N.stateNode.implementation!==D.implementation?(N=wh(D,z.mode,de),N.return=z,N):(N=g(N,D.children||[]),N.return=z,N)}function ae(z,N,D,de,Le){return N===null||N.tag!==7?(N=Ss(D,z.mode,de,Le),N.return=z,N):(N=g(N,D),N.return=z,N)}function fe(z,N,D){if(typeof N=="string"&&N!==""||typeof N=="number")return N=Sh(""+N,z.mode,D),N.return=z,N;if(typeof N=="object"&&N!==null){switch(N.$$typeof){case C:return D=nc(N.type,N.key,N.props,null,z.mode,D),D.ref=ro(z,null,N),D.return=z,D;case X:return N=wh(N,z.mode,D),N.return=z,N;case U:var de=N._init;return fe(z,de(N._payload),D)}if(et(N)||ne(N))return N=Ss(N,z.mode,D,null),N.return=z,N;Za(z,N)}return null}function le(z,N,D,de){var Le=N!==null?N.key:null;if(typeof D=="string"&&D!==""||typeof D=="number")return Le!==null?null:A(z,N,""+D,de);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case C:return D.key===Le?V(z,N,D,de):null;case X:return D.key===Le?W(z,N,D,de):null;case U:return Le=D._init,le(z,N,Le(D._payload),de)}if(et(D)||ne(D))return Le!==null?null:ae(z,N,D,de,null);Za(z,D)}return null}function we(z,N,D,de,Le){if(typeof de=="string"&&de!==""||typeof de=="number")return z=z.get(D)||null,A(N,z,""+de,Le);if(typeof de=="object"&&de!==null){switch(de.$$typeof){case C:return z=z.get(de.key===null?D:de.key)||null,V(N,z,de,Le);case X:return z=z.get(de.key===null?D:de.key)||null,W(N,z,de,Le);case U:var Ie=de._init;return we(z,N,D,Ie(de._payload),Le)}if(et(de)||ne(de))return z=z.get(D)||null,ae(N,z,de,Le,null);Za(N,de)}return null}function Ae(z,N,D,de){for(var Le=null,Ie=null,He=N,Ue=N=0,ln=null;He!==null&&Ue<D.length;Ue++){He.index>Ue?(ln=He,He=null):ln=He.sibling;var ht=le(z,He,D[Ue],de);if(ht===null){He===null&&(He=ln);break}s&&He&&ht.alternate===null&&a(z,He),N=v(ht,N,Ue),Ie===null?Le=ht:Ie.sibling=ht,Ie=ht,He=ln}if(Ue===D.length)return h(z,He),Pt&&ds(z,Ue),Le;if(He===null){for(;Ue<D.length;Ue++)He=fe(z,D[Ue],de),He!==null&&(N=v(He,N,Ue),Ie===null?Le=He:Ie.sibling=He,Ie=He);return Pt&&ds(z,Ue),Le}for(He=p(z,He);Ue<D.length;Ue++)ln=we(He,z,Ue,D[Ue],de),ln!==null&&(s&&ln.alternate!==null&&He.delete(ln.key===null?Ue:ln.key),N=v(ln,N,Ue),Ie===null?Le=ln:Ie.sibling=ln,Ie=ln);return s&&He.forEach(function(Yi){return a(z,Yi)}),Pt&&ds(z,Ue),Le}function Ee(z,N,D,de){var Le=ne(D);if(typeof Le!="function")throw Error(t(150));if(D=Le.call(D),D==null)throw Error(t(151));for(var Ie=Le=null,He=N,Ue=N=0,ln=null,ht=D.next();He!==null&&!ht.done;Ue++,ht=D.next()){He.index>Ue?(ln=He,He=null):ln=He.sibling;var Yi=le(z,He,ht.value,de);if(Yi===null){He===null&&(He=ln);break}s&&He&&Yi.alternate===null&&a(z,He),N=v(Yi,N,Ue),Ie===null?Le=Yi:Ie.sibling=Yi,Ie=Yi,He=ln}if(ht.done)return h(z,He),Pt&&ds(z,Ue),Le;if(He===null){for(;!ht.done;Ue++,ht=D.next())ht=fe(z,ht.value,de),ht!==null&&(N=v(ht,N,Ue),Ie===null?Le=ht:Ie.sibling=ht,Ie=ht);return Pt&&ds(z,Ue),Le}for(He=p(z,He);!ht.done;Ue++,ht=D.next())ht=we(He,z,Ue,ht.value,de),ht!==null&&(s&&ht.alternate!==null&&He.delete(ht.key===null?Ue:ht.key),N=v(ht,N,Ue),Ie===null?Le=ht:Ie.sibling=ht,Ie=ht);return s&&He.forEach(function(zx){return a(z,zx)}),Pt&&ds(z,Ue),Le}function Xt(z,N,D,de){if(typeof D=="object"&&D!==null&&D.type===Z&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case C:e:{for(var Le=D.key,Ie=N;Ie!==null;){if(Ie.key===Le){if(Le=D.type,Le===Z){if(Ie.tag===7){h(z,Ie.sibling),N=g(Ie,D.props.children),N.return=z,z=N;break e}}else if(Ie.elementType===Le||typeof Le=="object"&&Le!==null&&Le.$$typeof===U&&xp(Le)===Ie.type){h(z,Ie.sibling),N=g(Ie,D.props),N.ref=ro(z,Ie,D),N.return=z,z=N;break e}h(z,Ie);break}else a(z,Ie);Ie=Ie.sibling}D.type===Z?(N=Ss(D.props.children,z.mode,de,D.key),N.return=z,z=N):(de=nc(D.type,D.key,D.props,null,z.mode,de),de.ref=ro(z,N,D),de.return=z,z=de)}return k(z);case X:e:{for(Ie=D.key;N!==null;){if(N.key===Ie)if(N.tag===4&&N.stateNode.containerInfo===D.containerInfo&&N.stateNode.implementation===D.implementation){h(z,N.sibling),N=g(N,D.children||[]),N.return=z,z=N;break e}else{h(z,N);break}else a(z,N);N=N.sibling}N=wh(D,z.mode,de),N.return=z,z=N}return k(z);case U:return Ie=D._init,Xt(z,N,Ie(D._payload),de)}if(et(D))return Ae(z,N,D,de);if(ne(D))return Ee(z,N,D,de);Za(z,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,N!==null&&N.tag===6?(h(z,N.sibling),N=g(N,D),N.return=z,z=N):(h(z,N),N=Sh(D,z.mode,de),N.return=z,z=N),k(z)):h(z,N)}return Xt}var qs=vp(!0),Sp=vp(!1),Ea=Ri(null),ja=null,Us=null,M0=null;function Z0(){M0=Us=ja=null}function E0(s){var a=Ea.current;bt(Ea),s._currentValue=a}function j0(s,a,h){for(;s!==null;){var p=s.alternate;if((s.childLanes&a)!==a?(s.childLanes|=a,p!==null&&(p.childLanes|=a)):p!==null&&(p.childLanes&a)!==a&&(p.childLanes|=a),s===h)break;s=s.return}}function Gs(s,a){ja=s,M0=Us=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&a)!==0&&(Vn=!0),s.firstContext=null)}function ur(s){var a=s._currentValue;if(M0!==s)if(s={context:s,memoizedValue:a,next:null},Us===null){if(ja===null)throw Error(t(308));Us=s,ja.dependencies={lanes:0,firstContext:s}}else Us=Us.next=s;return a}var ps=null;function V0(s){ps===null?ps=[s]:ps.push(s)}function wp(s,a,h,p){var g=a.interleaved;return g===null?(h.next=h,V0(a)):(h.next=g.next,g.next=h),a.interleaved=h,pi(s,p)}function pi(s,a){s.lanes|=a;var h=s.alternate;for(h!==null&&(h.lanes|=a),h=s,s=s.return;s!==null;)s.childLanes|=a,h=s.alternate,h!==null&&(h.childLanes|=a),h=s,s=s.return;return h.tag===3?h.stateNode:null}var Xi=!1;function R0(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function kp(s,a){s=s.updateQueue,a.updateQueue===s&&(a.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function mi(s,a){return{eventTime:s,lane:a,tag:0,payload:null,callback:null,next:null}}function _i(s,a,h){var p=s.updateQueue;if(p===null)return null;if(p=p.shared,(lt&2)!==0){var g=p.pending;return g===null?a.next=a:(a.next=g.next,g.next=a),p.pending=a,pi(s,h)}return g=p.interleaved,g===null?(a.next=a,V0(p)):(a.next=g.next,g.next=a),p.interleaved=a,pi(s,h)}function Va(s,a,h){if(a=a.updateQueue,a!==null&&(a=a.shared,(h&4194240)!==0)){var p=a.lanes;p&=s.pendingLanes,h|=p,a.lanes=h,Uu(s,h)}}function bp(s,a){var h=s.updateQueue,p=s.alternate;if(p!==null&&(p=p.updateQueue,h===p)){var g=null,v=null;if(h=h.firstBaseUpdate,h!==null){do{var k={eventTime:h.eventTime,lane:h.lane,tag:h.tag,payload:h.payload,callback:h.callback,next:null};v===null?g=v=k:v=v.next=k,h=h.next}while(h!==null);v===null?g=v=a:v=v.next=a}else g=v=a;h={baseState:p.baseState,firstBaseUpdate:g,lastBaseUpdate:v,shared:p.shared,effects:p.effects},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=a:s.next=a,h.lastBaseUpdate=a}function Ra(s,a,h,p){var g=s.updateQueue;Xi=!1;var v=g.firstBaseUpdate,k=g.lastBaseUpdate,A=g.shared.pending;if(A!==null){g.shared.pending=null;var V=A,W=V.next;V.next=null,k===null?v=W:k.next=W,k=V;var ae=s.alternate;ae!==null&&(ae=ae.updateQueue,A=ae.lastBaseUpdate,A!==k&&(A===null?ae.firstBaseUpdate=W:A.next=W,ae.lastBaseUpdate=V))}if(v!==null){var fe=g.baseState;k=0,ae=W=V=null,A=v;do{var le=A.lane,we=A.eventTime;if((p&le)===le){ae!==null&&(ae=ae.next={eventTime:we,lane:0,tag:A.tag,payload:A.payload,callback:A.callback,next:null});e:{var Ae=s,Ee=A;switch(le=a,we=h,Ee.tag){case 1:if(Ae=Ee.payload,typeof Ae=="function"){fe=Ae.call(we,fe,le);break e}fe=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=Ee.payload,le=typeof Ae=="function"?Ae.call(we,fe,le):Ae,le==null)break e;fe=ee({},fe,le);break e;case 2:Xi=!0}}A.callback!==null&&A.lane!==0&&(s.flags|=64,le=g.effects,le===null?g.effects=[A]:le.push(A))}else we={eventTime:we,lane:le,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ae===null?(W=ae=we,V=fe):ae=ae.next=we,k|=le;if(A=A.next,A===null){if(A=g.shared.pending,A===null)break;le=A,A=le.next,le.next=null,g.lastBaseUpdate=le,g.shared.pending=null}}while(!0);if(ae===null&&(V=fe),g.baseState=V,g.firstBaseUpdate=W,g.lastBaseUpdate=ae,a=g.shared.interleaved,a!==null){g=a;do k|=g.lane,g=g.next;while(g!==a)}else v===null&&(g.shared.lanes=0);gs|=k,s.lanes=k,s.memoizedState=fe}}function Qp(s,a,h){if(s=a.effects,a.effects=null,s!==null)for(a=0;a<s.length;a++){var p=s[a],g=p.callback;if(g!==null){if(p.callback=null,p=h,typeof g!="function")throw Error(t(191,g));g.call(p)}}}var io={},Dr=Ri(io),so=Ri(io),lo=Ri(io);function ms(s){if(s===io)throw Error(t(174));return s}function L0(s,a){switch(vt(lo,a),vt(so,s),vt(Dr,io),s=a.nodeType,s){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:en(null,"");break;default:s=s===8?a.parentNode:a,a=s.namespaceURI||null,s=s.tagName,a=en(a,s)}bt(Dr),vt(Dr,a)}function Ks(){bt(Dr),bt(so),bt(lo)}function $p(s){ms(lo.current);var a=ms(Dr.current),h=en(a,s.type);a!==h&&(vt(so,s),vt(Dr,h))}function N0(s){so.current===s&&(bt(Dr),bt(so))}var Mt=Ri(0);function La(s){for(var a=s;a!==null;){if(a.tag===13){var h=a.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||h.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var X0=[];function _0(){for(var s=0;s<X0.length;s++)X0[s]._workInProgressVersionPrimary=null;X0.length=0}var Na=M.ReactCurrentDispatcher,z0=M.ReactCurrentBatchConfig,Os=0,Zt=null,Ut=null,rn=null,Xa=!1,oo=!1,ao=0,cx=0;function yn(){throw Error(t(321))}function D0(s,a){if(a===null)return!1;for(var h=0;h<a.length&&h<s.length;h++)if(!kr(s[h],a[h]))return!1;return!0}function I0(s,a,h,p,g,v){if(Os=v,Zt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,Na.current=s===null||s.memoizedState===null?dx:px,s=h(p,g),oo){v=0;do{if(oo=!1,ao=0,25<=v)throw Error(t(301));v+=1,rn=Ut=null,a.updateQueue=null,Na.current=mx,s=h(p,g)}while(oo)}if(Na.current=Da,a=Ut!==null&&Ut.next!==null,Os=0,rn=Ut=Zt=null,Xa=!1,a)throw Error(t(300));return s}function H0(){var s=ao!==0;return ao=0,s}function Ir(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rn===null?Zt.memoizedState=rn=s:rn=rn.next=s,rn}function hr(){if(Ut===null){var s=Zt.alternate;s=s!==null?s.memoizedState:null}else s=Ut.next;var a=rn===null?Zt.memoizedState:rn.next;if(a!==null)rn=a,Ut=s;else{if(s===null)throw Error(t(310));Ut=s,s={memoizedState:Ut.memoizedState,baseState:Ut.baseState,baseQueue:Ut.baseQueue,queue:Ut.queue,next:null},rn===null?Zt.memoizedState=rn=s:rn=rn.next=s}return rn}function co(s,a){return typeof a=="function"?a(s):a}function W0(s){var a=hr(),h=a.queue;if(h===null)throw Error(t(311));h.lastRenderedReducer=s;var p=Ut,g=p.baseQueue,v=h.pending;if(v!==null){if(g!==null){var k=g.next;g.next=v.next,v.next=k}p.baseQueue=g=v,h.pending=null}if(g!==null){v=g.next,p=p.baseState;var A=k=null,V=null,W=v;do{var ae=W.lane;if((Os&ae)===ae)V!==null&&(V=V.next={lane:0,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),p=W.hasEagerState?W.eagerState:s(p,W.action);else{var fe={lane:ae,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null};V===null?(A=V=fe,k=p):V=V.next=fe,Zt.lanes|=ae,gs|=ae}W=W.next}while(W!==null&&W!==v);V===null?k=p:V.next=A,kr(p,a.memoizedState)||(Vn=!0),a.memoizedState=p,a.baseState=k,a.baseQueue=V,h.lastRenderedState=p}if(s=h.interleaved,s!==null){g=s;do v=g.lane,Zt.lanes|=v,gs|=v,g=g.next;while(g!==s)}else g===null&&(h.lanes=0);return[a.memoizedState,h.dispatch]}function F0(s){var a=hr(),h=a.queue;if(h===null)throw Error(t(311));h.lastRenderedReducer=s;var p=h.dispatch,g=h.pending,v=a.memoizedState;if(g!==null){h.pending=null;var k=g=g.next;do v=s(v,k.action),k=k.next;while(k!==g);kr(v,a.memoizedState)||(Vn=!0),a.memoizedState=v,a.baseQueue===null&&(a.baseState=v),h.lastRenderedState=v}return[v,p]}function Pp(){}function Ap(s,a){var h=Zt,p=hr(),g=a(),v=!kr(p.memoizedState,g);if(v&&(p.memoizedState=g,Vn=!0),p=p.queue,Y0(Mp.bind(null,h,p,s),[s]),p.getSnapshot!==a||v||rn!==null&&rn.memoizedState.tag&1){if(h.flags|=2048,uo(9,Tp.bind(null,h,p,g,a),void 0,null),sn===null)throw Error(t(349));(Os&30)!==0||Cp(h,a,g)}return g}function Cp(s,a,h){s.flags|=16384,s={getSnapshot:a,value:h},a=Zt.updateQueue,a===null?(a={lastEffect:null,stores:null},Zt.updateQueue=a,a.stores=[s]):(h=a.stores,h===null?a.stores=[s]:h.push(s))}function Tp(s,a,h,p){a.value=h,a.getSnapshot=p,Zp(a)&&Ep(s)}function Mp(s,a,h){return h(function(){Zp(a)&&Ep(s)})}function Zp(s){var a=s.getSnapshot;s=s.value;try{var h=a();return!kr(s,h)}catch{return!0}}function Ep(s){var a=pi(s,1);a!==null&&Ar(a,s,1,-1)}function jp(s){var a=Ir();return typeof s=="function"&&(s=s()),a.memoizedState=a.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:co,lastRenderedState:s},a.queue=s,s=s.dispatch=fx.bind(null,Zt,s),[a.memoizedState,s]}function uo(s,a,h,p){return s={tag:s,create:a,destroy:h,deps:p,next:null},a=Zt.updateQueue,a===null?(a={lastEffect:null,stores:null},Zt.updateQueue=a,a.lastEffect=s.next=s):(h=a.lastEffect,h===null?a.lastEffect=s.next=s:(p=h.next,h.next=s,s.next=p,a.lastEffect=s)),s}function Vp(){return hr().memoizedState}function _a(s,a,h,p){var g=Ir();Zt.flags|=s,g.memoizedState=uo(1|a,h,void 0,p===void 0?null:p)}function za(s,a,h,p){var g=hr();p=p===void 0?null:p;var v=void 0;if(Ut!==null){var k=Ut.memoizedState;if(v=k.destroy,p!==null&&D0(p,k.deps)){g.memoizedState=uo(a,h,v,p);return}}Zt.flags|=s,g.memoizedState=uo(1|a,h,v,p)}function Rp(s,a){return _a(8390656,8,s,a)}function Y0(s,a){return za(2048,8,s,a)}function Lp(s,a){return za(4,2,s,a)}function Np(s,a){return za(4,4,s,a)}function Xp(s,a){if(typeof a=="function")return s=s(),a(s),function(){a(null)};if(a!=null)return s=s(),a.current=s,function(){a.current=null}}function _p(s,a,h){return h=h!=null?h.concat([s]):null,za(4,4,Xp.bind(null,a,s),h)}function B0(){}function zp(s,a){var h=hr();a=a===void 0?null:a;var p=h.memoizedState;return p!==null&&a!==null&&D0(a,p[1])?p[0]:(h.memoizedState=[s,a],s)}function Dp(s,a){var h=hr();a=a===void 0?null:a;var p=h.memoizedState;return p!==null&&a!==null&&D0(a,p[1])?p[0]:(s=s(),h.memoizedState=[s,a],s)}function Ip(s,a,h){return(Os&21)===0?(s.baseState&&(s.baseState=!1,Vn=!0),s.memoizedState=h):(kr(h,a)||(h=xd(),Zt.lanes|=h,gs|=h,s.baseState=!0),a)}function ux(s,a){var h=Ot;Ot=h!==0&&4>h?h:4,s(!0);var p=z0.transition;z0.transition={};try{s(!1),a()}finally{Ot=h,z0.transition=p}}function Hp(){return hr().memoizedState}function hx(s,a,h){var p=Hi(s);if(h={lane:p,action:h,hasEagerState:!1,eagerState:null,next:null},Wp(s))Fp(a,h);else if(h=wp(s,a,h,p),h!==null){var g=An();Ar(h,s,p,g),Yp(h,a,p)}}function fx(s,a,h){var p=Hi(s),g={lane:p,action:h,hasEagerState:!1,eagerState:null,next:null};if(Wp(s))Fp(a,g);else{var v=s.alternate;if(s.lanes===0&&(v===null||v.lanes===0)&&(v=a.lastRenderedReducer,v!==null))try{var k=a.lastRenderedState,A=v(k,h);if(g.hasEagerState=!0,g.eagerState=A,kr(A,k)){var V=a.interleaved;V===null?(g.next=g,V0(a)):(g.next=V.next,V.next=g),a.interleaved=g;return}}catch{}finally{}h=wp(s,a,g,p),h!==null&&(g=An(),Ar(h,s,p,g),Yp(h,a,p))}}function Wp(s){var a=s.alternate;return s===Zt||a!==null&&a===Zt}function Fp(s,a){oo=Xa=!0;var h=s.pending;h===null?a.next=a:(a.next=h.next,h.next=a),s.pending=a}function Yp(s,a,h){if((h&4194240)!==0){var p=a.lanes;p&=s.pendingLanes,h|=p,a.lanes=h,Uu(s,h)}}var Da={readContext:ur,useCallback:yn,useContext:yn,useEffect:yn,useImperativeHandle:yn,useInsertionEffect:yn,useLayoutEffect:yn,useMemo:yn,useReducer:yn,useRef:yn,useState:yn,useDebugValue:yn,useDeferredValue:yn,useTransition:yn,useMutableSource:yn,useSyncExternalStore:yn,useId:yn,unstable_isNewReconciler:!1},dx={readContext:ur,useCallback:function(s,a){return Ir().memoizedState=[s,a===void 0?null:a],s},useContext:ur,useEffect:Rp,useImperativeHandle:function(s,a,h){return h=h!=null?h.concat([s]):null,_a(4194308,4,Xp.bind(null,a,s),h)},useLayoutEffect:function(s,a){return _a(4194308,4,s,a)},useInsertionEffect:function(s,a){return _a(4,2,s,a)},useMemo:function(s,a){var h=Ir();return a=a===void 0?null:a,s=s(),h.memoizedState=[s,a],s},useReducer:function(s,a,h){var p=Ir();return a=h!==void 0?h(a):a,p.memoizedState=p.baseState=a,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:a},p.queue=s,s=s.dispatch=hx.bind(null,Zt,s),[p.memoizedState,s]},useRef:function(s){var a=Ir();return s={current:s},a.memoizedState=s},useState:jp,useDebugValue:B0,useDeferredValue:function(s){return Ir().memoizedState=s},useTransition:function(){var s=jp(!1),a=s[0];return s=ux.bind(null,s[1]),Ir().memoizedState=s,[a,s]},useMutableSource:function(){},useSyncExternalStore:function(s,a,h){var p=Zt,g=Ir();if(Pt){if(h===void 0)throw Error(t(407));h=h()}else{if(h=a(),sn===null)throw Error(t(349));(Os&30)!==0||Cp(p,a,h)}g.memoizedState=h;var v={value:h,getSnapshot:a};return g.queue=v,Rp(Mp.bind(null,p,v,s),[s]),p.flags|=2048,uo(9,Tp.bind(null,p,v,h,a),void 0,null),h},useId:function(){var s=Ir(),a=sn.identifierPrefix;if(Pt){var h=di,p=fi;h=(p&~(1<<32-or(p)-1)).toString(32)+h,a=":"+a+"R"+h,h=ao++,0<h&&(a+="H"+h.toString(32)),a+=":"}else h=cx++,a=":"+a+"r"+h.toString(32)+":";return s.memoizedState=a},unstable_isNewReconciler:!1},px={readContext:ur,useCallback:zp,useContext:ur,useEffect:Y0,useImperativeHandle:_p,useInsertionEffect:Lp,useLayoutEffect:Np,useMemo:Dp,useReducer:W0,useRef:Vp,useState:function(){return W0(co)},useDebugValue:B0,useDeferredValue:function(s){var a=hr();return Ip(a,Ut.memoizedState,s)},useTransition:function(){var s=W0(co)[0],a=hr().memoizedState;return[s,a]},useMutableSource:Pp,useSyncExternalStore:Ap,useId:Hp,unstable_isNewReconciler:!1},mx={readContext:ur,useCallback:zp,useContext:ur,useEffect:Y0,useImperativeHandle:_p,useInsertionEffect:Lp,useLayoutEffect:Np,useMemo:Dp,useReducer:F0,useRef:Vp,useState:function(){return F0(co)},useDebugValue:B0,useDeferredValue:function(s){var a=hr();return Ut===null?a.memoizedState=s:Ip(a,Ut.memoizedState,s)},useTransition:function(){var s=F0(co)[0],a=hr().memoizedState;return[s,a]},useMutableSource:Pp,useSyncExternalStore:Ap,useId:Hp,unstable_isNewReconciler:!1};function Qr(s,a){if(s&&s.defaultProps){a=ee({},a),s=s.defaultProps;for(var h in s)a[h]===void 0&&(a[h]=s[h]);return a}return a}function q0(s,a,h,p){a=s.memoizedState,h=h(p,a),h=h==null?a:ee({},a,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}var Ia={isMounted:function(s){return(s=s._reactInternals)?pe(s)===s:!1},enqueueSetState:function(s,a,h){s=s._reactInternals;var p=An(),g=Hi(s),v=mi(p,g);v.payload=a,h!=null&&(v.callback=h),a=_i(s,v,g),a!==null&&(Ar(a,s,g,p),Va(a,s,g))},enqueueReplaceState:function(s,a,h){s=s._reactInternals;var p=An(),g=Hi(s),v=mi(p,g);v.tag=1,v.payload=a,h!=null&&(v.callback=h),a=_i(s,v,g),a!==null&&(Ar(a,s,g,p),Va(a,s,g))},enqueueForceUpdate:function(s,a){s=s._reactInternals;var h=An(),p=Hi(s),g=mi(h,p);g.tag=2,a!=null&&(g.callback=a),a=_i(s,g,p),a!==null&&(Ar(a,s,p,h),Va(a,s,p))}};function Bp(s,a,h,p,g,v,k){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(p,v,k):a.prototype&&a.prototype.isPureReactComponent?!Ul(h,p)||!Ul(g,v):!0}function qp(s,a,h){var p=!1,g=Li,v=a.contextType;return typeof v=="object"&&v!==null?v=ur(v):(g=jn(a)?hs:gn.current,p=a.contextTypes,v=(p=p!=null)?Ws(s,g):Li),a=new a(h,v),s.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Ia,s.stateNode=a,a._reactInternals=s,p&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=g,s.__reactInternalMemoizedMaskedChildContext=v),a}function Up(s,a,h,p){s=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(h,p),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(h,p),a.state!==s&&Ia.enqueueReplaceState(a,a.state,null)}function U0(s,a,h,p){var g=s.stateNode;g.props=h,g.state=s.memoizedState,g.refs={},R0(s);var v=a.contextType;typeof v=="object"&&v!==null?g.context=ur(v):(v=jn(a)?hs:gn.current,g.context=Ws(s,v)),g.state=s.memoizedState,v=a.getDerivedStateFromProps,typeof v=="function"&&(q0(s,a,v,h),g.state=s.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(a=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),a!==g.state&&Ia.enqueueReplaceState(g,g.state,null),Ra(s,h,g,p),g.state=s.memoizedState),typeof g.componentDidMount=="function"&&(s.flags|=4194308)}function Js(s,a){try{var h="",p=a;do h+=Xe(p),p=p.return;while(p);var g=h}catch(v){g=`
39
39
  Error generating stack: `+v.message+`
40
- `+v.stack}return{value:s,source:a,stack:g,digest:null}}function G0(s,a,h){return{value:s,source:null,stack:h??null,digest:a??null}}function K0(s,a){try{console.error(a.value)}catch(h){setTimeout(function(){throw h})}}var Ox=typeof WeakMap=="function"?WeakMap:Map;function Gp(s,a,h){h=mi(-1,h),h.tag=3,h.payload={element:null};var p=a.value;return h.callback=function(){Ua||(Ua=!0,dh=p),K0(s,a)},h}function Kp(s,a,h){h=mi(-1,h),h.tag=3;var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var g=a.value;h.payload=function(){return p(g)},h.callback=function(){K0(s,a)}}var v=s.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(h.callback=function(){K0(s,a),typeof p!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var k=a.stack;this.componentDidCatch(a.value,{componentStack:k!==null?k:""})}),h}function Jp(s,a,h){var p=s.pingCache;if(p===null){p=s.pingCache=new Ox;var g=new Set;p.set(a,g)}else g=p.get(a),g===void 0&&(g=new Set,p.set(a,g));g.has(h)||(g.add(h),s=Tx.bind(null,s,a,h),a.then(s,s))}function em(s){do{var a;if((a=s.tag===13)&&(a=s.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return s;s=s.return}while(s!==null);return null}function tm(s,a,h,p,g){return(s.mode&1)===0?(s===a?s.flags|=65536:(s.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(a=mi(-1,1),a.tag=2,_i(h,a,1))),h.lanes|=1),s):(s.flags|=65536,s.lanes=g,s)}var gx=M.ReactCurrentOwner,Vn=!1;function Pn(s,a,h,p){a.child=s===null?Sp(a,null,h,p):qs(a,s.child,h,p)}function nm(s,a,h,p,g){h=h.render;var v=a.ref;return Gs(a,g),p=I0(s,a,h,p,v,g),h=H0(),s!==null&&!Vn?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~g,Oi(s,a,g)):(Pt&&h&&$0(a),a.flags|=1,Pn(s,a,p,g),a.child)}function rm(s,a,h,p,g){if(s===null){var v=h.type;return typeof v=="function"&&!vh(v)&&v.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(a.tag=15,a.type=v,im(s,a,v,p,g)):(s=nc(h.type,null,p,a,a.mode,g),s.ref=a.ref,s.return=a,a.child=s)}if(v=s.child,(s.lanes&g)===0){var k=v.memoizedProps;if(h=h.compare,h=h!==null?h:Ul,h(k,p)&&s.ref===a.ref)return Oi(s,a,g)}return a.flags|=1,s=Fi(v,p),s.ref=a.ref,s.return=a,a.child=s}function im(s,a,h,p,g){if(s!==null){var v=s.memoizedProps;if(Ul(v,p)&&s.ref===a.ref)if(Vn=!1,a.pendingProps=p=v,(s.lanes&g)!==0)(s.flags&131072)!==0&&(Vn=!0);else return a.lanes=s.lanes,Oi(s,a,g)}return J0(s,a,h,p,g)}function sm(s,a,h){var p=a.pendingProps,g=p.children,v=s!==null?s.memoizedState:null;if(p.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},vt(tl,Kn),Kn|=h;else{if((h&1073741824)===0)return s=v!==null?v.baseLanes|h:h,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:s,cachePool:null,transitions:null},a.updateQueue=null,vt(tl,Kn),Kn|=s,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=v!==null?v.baseLanes:h,vt(tl,Kn),Kn|=p}else v!==null?(p=v.baseLanes|h,a.memoizedState=null):p=h,vt(tl,Kn),Kn|=p;return Pn(s,a,g,h),a.child}function lm(s,a){var h=a.ref;(s===null&&h!==null||s!==null&&s.ref!==h)&&(a.flags|=512,a.flags|=2097152)}function J0(s,a,h,p,g){var v=jn(h)?hs:gn.current;return v=Ws(a,v),Gs(a,g),h=I0(s,a,h,p,v,g),p=H0(),s!==null&&!Vn?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~g,Oi(s,a,g)):(Pt&&p&&$0(a),a.flags|=1,Pn(s,a,h,g),a.child)}function om(s,a,h,p,g){if(jn(h)){var v=!0;Pa(a)}else v=!1;if(Gs(a,g),a.stateNode===null)Wa(s,a),qp(a,h,p),U0(a,h,p,g),p=!0;else if(s===null){var k=a.stateNode,A=a.memoizedProps;k.props=A;var V=k.context,W=h.contextType;typeof W=="object"&&W!==null?W=ur(W):(W=jn(h)?hs:gn.current,W=Ws(a,W));var ae=h.getDerivedStateFromProps,fe=typeof ae=="function"||typeof k.getSnapshotBeforeUpdate=="function";fe||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(A!==p||V!==W)&&Up(a,k,p,W),Xi=!1;var le=a.memoizedState;k.state=le,Ra(a,p,k,g),V=a.memoizedState,A!==p||le!==V||En.current||Xi?(typeof ae=="function"&&(q0(a,h,ae,p),V=a.memoizedState),(A=Xi||Bp(a,h,A,p,le,V,W))?(fe||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(a.flags|=4194308)):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=p,a.memoizedState=V),k.props=p,k.state=V,k.context=W,p=A):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),p=!1)}else{k=a.stateNode,kp(s,a),A=a.memoizedProps,W=a.type===a.elementType?A:Qr(a.type,A),k.props=W,fe=a.pendingProps,le=k.context,V=h.contextType,typeof V=="object"&&V!==null?V=ur(V):(V=jn(h)?hs:gn.current,V=Ws(a,V));var we=h.getDerivedStateFromProps;(ae=typeof we=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(A!==fe||le!==V)&&Up(a,k,p,V),Xi=!1,le=a.memoizedState,k.state=le,Ra(a,p,k,g);var Ae=a.memoizedState;A!==fe||le!==Ae||En.current||Xi?(typeof we=="function"&&(q0(a,h,we,p),Ae=a.memoizedState),(W=Xi||Bp(a,h,W,p,le,Ae,V)||!1)?(ae||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(p,Ae,V),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(p,Ae,V)),typeof k.componentDidUpdate=="function"&&(a.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof k.componentDidUpdate!="function"||A===s.memoizedProps&&le===s.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&le===s.memoizedState||(a.flags|=1024),a.memoizedProps=p,a.memoizedState=Ae),k.props=p,k.state=Ae,k.context=V,p=W):(typeof k.componentDidUpdate!="function"||A===s.memoizedProps&&le===s.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&le===s.memoizedState||(a.flags|=1024),p=!1)}return eh(s,a,h,p,v,g)}function eh(s,a,h,p,g,v){lm(s,a);var k=(a.flags&128)!==0;if(!p&&!k)return g&&fp(a,h,!1),Oi(s,a,v);p=a.stateNode,gx.current=a;var A=k&&typeof h.getDerivedStateFromError!="function"?null:p.render();return a.flags|=1,s!==null&&k?(a.child=qs(a,s.child,null,v),a.child=qs(a,null,A,v)):Pn(s,a,A,v),a.memoizedState=p.state,g&&fp(a,h,!0),a.child}function am(s){var a=s.stateNode;a.pendingContext?up(s,a.pendingContext,a.pendingContext!==a.context):a.context&&up(s,a.context,!1),L0(s,a.containerInfo)}function cm(s,a,h,p,g){return Bs(),T0(g),a.flags|=256,Pn(s,a,h,p),a.child}var th={dehydrated:null,treeContext:null,retryLane:0};function nh(s){return{baseLanes:s,cachePool:null,transitions:null}}function um(s,a,h){var p=a.pendingProps,g=Mt.current,v=!1,k=(a.flags&128)!==0,A;if((A=k)||(A=s!==null&&s.memoizedState===null?!1:(g&2)!==0),A?(v=!0,a.flags&=-129):(s===null||s.memoizedState!==null)&&(g|=1),vt(Mt,g&1),s===null)return C0(a),s=a.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((a.mode&1)===0?a.lanes=1:s.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(k=p.children,s=p.fallback,v?(p=a.mode,v=a.child,k={mode:"hidden",children:k},(p&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=k):v=rc(k,p,0,null),s=Ss(s,p,h,null),v.return=a,s.return=a,v.sibling=s,a.child=v,a.child.memoizedState=nh(h),a.memoizedState=th,s):rh(a,k));if(g=s.memoizedState,g!==null&&(A=g.dehydrated,A!==null))return yx(s,a,k,p,A,g,h);if(v){v=p.fallback,k=a.mode,g=s.child,A=g.sibling;var V={mode:"hidden",children:p.children};return(k&1)===0&&a.child!==g?(p=a.child,p.childLanes=0,p.pendingProps=V,a.deletions=null):(p=Fi(g,V),p.subtreeFlags=g.subtreeFlags&14680064),A!==null?v=Fi(A,v):(v=Ss(v,k,h,null),v.flags|=2),v.return=a,p.return=a,p.sibling=v,a.child=p,p=v,v=a.child,k=s.child.memoizedState,k=k===null?nh(h):{baseLanes:k.baseLanes|h,cachePool:null,transitions:k.transitions},v.memoizedState=k,v.childLanes=s.childLanes&~h,a.memoizedState=th,p}return v=s.child,s=v.sibling,p=Fi(v,{mode:"visible",children:p.children}),(a.mode&1)===0&&(p.lanes=h),p.return=a,p.sibling=null,s!==null&&(h=a.deletions,h===null?(a.deletions=[s],a.flags|=16):h.push(s)),a.child=p,a.memoizedState=null,p}function rh(s,a){return a=rc({mode:"visible",children:a},s.mode,0,null),a.return=s,s.child=a}function Ha(s,a,h,p){return p!==null&&T0(p),qs(a,s.child,null,h),s=rh(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function yx(s,a,h,p,g,v,k){if(h)return a.flags&256?(a.flags&=-257,p=G0(Error(t(422))),Ha(s,a,k,p)):a.memoizedState!==null?(a.child=s.child,a.flags|=128,null):(v=p.fallback,g=a.mode,p=rc({mode:"visible",children:p.children},g,0,null),v=Ss(v,g,k,null),v.flags|=2,p.return=a,v.return=a,p.sibling=v,a.child=p,(a.mode&1)!==0&&qs(a,s.child,null,k),a.child.memoizedState=nh(k),a.memoizedState=th,v);if((a.mode&1)===0)return Ha(s,a,k,null);if(g.data==="$!"){if(p=g.nextSibling&&g.nextSibling.dataset,p)var A=p.dgst;return p=A,v=Error(t(419)),p=G0(v,p,void 0),Ha(s,a,k,p)}if(A=(k&s.childLanes)!==0,Vn||A){if(p=sn,p!==null){switch(k&-k){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(p.suspendedLanes|k))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,pi(s,g),Ar(p,s,g,-1))}return xh(),p=G0(Error(t(421))),Ha(s,a,k,p)}return g.data==="$?"?(a.flags|=128,a.child=s.child,a=Mx.bind(null,s),g._reactRetry=a,null):(s=v.treeContext,Gn=Vi(g.nextSibling),Un=a,Pt=!0,br=null,s!==null&&(ar[cr++]=fi,ar[cr++]=di,ar[cr++]=fs,fi=s.id,di=s.overflow,fs=a),a=rh(a,p.children),a.flags|=4096,a)}function hm(s,a,h){s.lanes|=a;var p=s.alternate;p!==null&&(p.lanes|=a),j0(s.return,a,h)}function ih(s,a,h,p,g){var v=s.memoizedState;v===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:p,tail:h,tailMode:g}:(v.isBackwards=a,v.rendering=null,v.renderingStartTime=0,v.last=p,v.tail=h,v.tailMode=g)}function fm(s,a,h){var p=a.pendingProps,g=p.revealOrder,v=p.tail;if(Pn(s,a,p.children,h),p=Mt.current,(p&2)!==0)p=p&1|2,a.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&hm(s,h,a);else if(s.tag===19)hm(s,h,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}p&=1}if(vt(Mt,p),(a.mode&1)===0)a.memoizedState=null;else switch(g){case"forwards":for(h=a.child,g=null;h!==null;)s=h.alternate,s!==null&&La(s)===null&&(g=h),h=h.sibling;h=g,h===null?(g=a.child,a.child=null):(g=h.sibling,h.sibling=null),ih(a,!1,g,h,v);break;case"backwards":for(h=null,g=a.child,a.child=null;g!==null;){if(s=g.alternate,s!==null&&La(s)===null){a.child=g;break}s=g.sibling,g.sibling=h,h=g,g=s}ih(a,!0,h,null,v);break;case"together":ih(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Wa(s,a){(a.mode&1)===0&&s!==null&&(s.alternate=null,a.alternate=null,a.flags|=2)}function Oi(s,a,h){if(s!==null&&(a.dependencies=s.dependencies),gs|=a.lanes,(h&a.childLanes)===0)return null;if(s!==null&&a.child!==s.child)throw Error(t(153));if(a.child!==null){for(s=a.child,h=Fi(s,s.pendingProps),a.child=h,h.return=a;s.sibling!==null;)s=s.sibling,h=h.sibling=Fi(s,s.pendingProps),h.return=a;h.sibling=null}return a.child}function xx(s,a,h){switch(a.tag){case 3:am(a),Bs();break;case 5:$p(a);break;case 1:jn(a.type)&&Pa(a);break;case 4:L0(a,a.stateNode.containerInfo);break;case 10:var p=a.type._context,g=a.memoizedProps.value;vt(Ea,p._currentValue),p._currentValue=g;break;case 13:if(p=a.memoizedState,p!==null)return p.dehydrated!==null?(vt(Mt,Mt.current&1),a.flags|=128,null):(h&a.child.childLanes)!==0?um(s,a,h):(vt(Mt,Mt.current&1),s=Oi(s,a,h),s!==null?s.sibling:null);vt(Mt,Mt.current&1);break;case 19:if(p=(h&a.childLanes)!==0,(s.flags&128)!==0){if(p)return fm(s,a,h);a.flags|=128}if(g=a.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),vt(Mt,Mt.current),p)break;return null;case 22:case 23:return a.lanes=0,sm(s,a,h)}return Oi(s,a,h)}var dm,sh,pm,mm;dm=function(s,a){for(var h=a.child;h!==null;){if(h.tag===5||h.tag===6)s.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===a)break;for(;h.sibling===null;){if(h.return===null||h.return===a)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},sh=function(){},pm=function(s,a,h,p){var g=s.memoizedProps;if(g!==p){s=a.stateNode,ms(Dr.current);var v=null;switch(h){case"input":g=Ye(s,g),p=Ye(s,p),v=[];break;case"select":g=ee({},g,{value:void 0}),p=ee({},p,{value:void 0}),v=[];break;case"textarea":g=nt(s,g),p=nt(s,p),v=[];break;default:typeof g.onClick!="function"&&typeof p.onClick=="function"&&(s.onclick=ba)}vr(h,p);var k;h=null;for(W in g)if(!p.hasOwnProperty(W)&&g.hasOwnProperty(W)&&g[W]!=null)if(W==="style"){var A=g[W];for(k in A)A.hasOwnProperty(k)&&(h||(h={}),h[k]="")}else W!=="dangerouslySetInnerHTML"&&W!=="children"&&W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&W!=="autoFocus"&&(i.hasOwnProperty(W)?v||(v=[]):(v=v||[]).push(W,null));for(W in p){var V=p[W];if(A=g!=null?g[W]:void 0,p.hasOwnProperty(W)&&V!==A&&(V!=null||A!=null))if(W==="style")if(A){for(k in A)!A.hasOwnProperty(k)||V&&V.hasOwnProperty(k)||(h||(h={}),h[k]="");for(k in V)V.hasOwnProperty(k)&&A[k]!==V[k]&&(h||(h={}),h[k]=V[k])}else h||(v||(v=[]),v.push(W,h)),h=V;else W==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,A=A?A.__html:void 0,V!=null&&A!==V&&(v=v||[]).push(W,V)):W==="children"?typeof V!="string"&&typeof V!="number"||(v=v||[]).push(W,""+V):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(i.hasOwnProperty(W)?(V!=null&&W==="onScroll"&&kt("scroll",s),v||A===V||(v=[])):(v=v||[]).push(W,V))}h&&(v=v||[]).push("style",h);var W=v;(a.updateQueue=W)&&(a.flags|=4)}},mm=function(s,a,h,p){h!==p&&(a.flags|=4)};function ho(s,a){if(!Pt)switch(s.tailMode){case"hidden":a=s.tail;for(var h=null;a!==null;)a.alternate!==null&&(h=a),a=a.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var p=null;h!==null;)h.alternate!==null&&(p=h),h=h.sibling;p===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:p.sibling=null}}function xn(s){var a=s.alternate!==null&&s.alternate.child===s.child,h=0,p=0;if(a)for(var g=s.child;g!==null;)h|=g.lanes|g.childLanes,p|=g.subtreeFlags&14680064,p|=g.flags&14680064,g.return=s,g=g.sibling;else for(g=s.child;g!==null;)h|=g.lanes|g.childLanes,p|=g.subtreeFlags,p|=g.flags,g.return=s,g=g.sibling;return s.subtreeFlags|=p,s.childLanes=h,a}function vx(s,a,h){var p=a.pendingProps;switch(P0(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xn(a),null;case 1:return jn(a.type)&&$a(),xn(a),null;case 3:return p=a.stateNode,Ks(),bt(En),bt(gn),_0(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(Ma(a)?a.flags|=4:s===null||s.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,br!==null&&(Oh(br),br=null))),sh(s,a),xn(a),null;case 5:N0(a);var g=ms(lo.current);if(h=a.type,s!==null&&a.stateNode!=null)pm(s,a,h,p,g),s.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!p){if(a.stateNode===null)throw Error(t(166));return xn(a),null}if(s=ms(Dr.current),Ma(a)){p=a.stateNode,h=a.type;var v=a.memoizedProps;switch(p[zr]=a,p[to]=v,s=(a.mode&1)!==0,h){case"dialog":kt("cancel",p),kt("close",p);break;case"iframe":case"object":case"embed":kt("load",p);break;case"video":case"audio":for(g=0;g<Kl.length;g++)kt(Kl[g],p);break;case"source":kt("error",p);break;case"img":case"image":case"link":kt("error",p),kt("load",p);break;case"details":kt("toggle",p);break;case"input":Ze(p,v),kt("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!v.multiple},kt("invalid",p);break;case"textarea":It(p,v),kt("invalid",p)}vr(h,v),g=null;for(var k in v)if(v.hasOwnProperty(k)){var A=v[k];k==="children"?typeof A=="string"?p.textContent!==A&&(v.suppressHydrationWarning!==!0&&ka(p.textContent,A,s),g=["children",A]):typeof A=="number"&&p.textContent!==""+A&&(v.suppressHydrationWarning!==!0&&ka(p.textContent,A,s),g=["children",""+A]):i.hasOwnProperty(k)&&A!=null&&k==="onScroll"&&kt("scroll",p)}switch(h){case"input":ze(p),Re(p,v,!0);break;case"textarea":ze(p),Vr(p);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(p.onclick=ba)}p=g,a.updateQueue=p,p!==null&&(a.flags|=4)}else{k=g.nodeType===9?g:g.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=un(h)),s==="http://www.w3.org/1999/xhtml"?h==="script"?(s=k.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof p.is=="string"?s=k.createElement(h,{is:p.is}):(s=k.createElement(h),h==="select"&&(k=s,p.multiple?k.multiple=!0:p.size&&(k.size=p.size))):s=k.createElementNS(s,h),s[zr]=a,s[to]=p,dm(s,a,!1,!1),a.stateNode=s;e:{switch(k=yt(h,p),h){case"dialog":kt("cancel",s),kt("close",s),g=p;break;case"iframe":case"object":case"embed":kt("load",s),g=p;break;case"video":case"audio":for(g=0;g<Kl.length;g++)kt(Kl[g],s);g=p;break;case"source":kt("error",s),g=p;break;case"img":case"image":case"link":kt("error",s),kt("load",s),g=p;break;case"details":kt("toggle",s),g=p;break;case"input":Ze(s,p),g=Ye(s,p),kt("invalid",s);break;case"option":g=p;break;case"select":s._wrapperState={wasMultiple:!!p.multiple},g=ee({},p,{value:void 0}),kt("invalid",s);break;case"textarea":It(s,p),g=nt(s,p),kt("invalid",s);break;default:g=p}vr(h,g),A=g;for(v in A)if(A.hasOwnProperty(v)){var V=A[v];v==="style"?Yt(s,V):v==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,V!=null&&gt(s,V)):v==="children"?typeof V=="string"?(h!=="textarea"||V!=="")&&Ft(s,V):typeof V=="number"&&Ft(s,""+V):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(i.hasOwnProperty(v)?V!=null&&v==="onScroll"&&kt("scroll",s):V!=null&&P(s,v,V,k))}switch(h){case"input":ze(s),Re(s,p,!1);break;case"textarea":ze(s),Vr(s);break;case"option":p.value!=null&&s.setAttribute("value",""+ue(p.value));break;case"select":s.multiple=!!p.multiple,v=p.value,v!=null?pt(s,!!p.multiple,v,!1):p.defaultValue!=null&&pt(s,!!p.multiple,p.defaultValue,!0);break;default:typeof g.onClick=="function"&&(s.onclick=ba)}switch(h){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return xn(a),null;case 6:if(s&&a.stateNode!=null)mm(s,a,s.memoizedProps,p);else{if(typeof p!="string"&&a.stateNode===null)throw Error(t(166));if(h=ms(lo.current),ms(Dr.current),Ma(a)){if(p=a.stateNode,h=a.memoizedProps,p[zr]=a,(v=p.nodeValue!==h)&&(s=Un,s!==null))switch(s.tag){case 3:ka(p.nodeValue,h,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&ka(p.nodeValue,h,(s.mode&1)!==0)}v&&(a.flags|=4)}else p=(h.nodeType===9?h:h.ownerDocument).createTextNode(p),p[zr]=a,a.stateNode=p}return xn(a),null;case 13:if(bt(Mt),p=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Pt&&Gn!==null&&(a.mode&1)!==0&&(a.flags&128)===0)yp(),Bs(),a.flags|=98560,v=!1;else if(v=Ma(a),p!==null&&p.dehydrated!==null){if(s===null){if(!v)throw Error(t(318));if(v=a.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(t(317));v[zr]=a}else Bs(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;xn(a),v=!1}else br!==null&&(Oh(br),br=null),v=!0;if(!v)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=h,a):(p=p!==null,p!==(s!==null&&s.memoizedState!==null)&&p&&(a.child.flags|=8192,(a.mode&1)!==0&&(s===null||(Mt.current&1)!==0?Gt===0&&(Gt=3):xh())),a.updateQueue!==null&&(a.flags|=4),xn(a),null);case 4:return Ks(),sh(s,a),s===null&&Jl(a.stateNode.containerInfo),xn(a),null;case 10:return E0(a.type._context),xn(a),null;case 17:return jn(a.type)&&$a(),xn(a),null;case 19:if(bt(Mt),v=a.memoizedState,v===null)return xn(a),null;if(p=(a.flags&128)!==0,k=v.rendering,k===null)if(p)ho(v,!1);else{if(Gt!==0||s!==null&&(s.flags&128)!==0)for(s=a.child;s!==null;){if(k=La(s),k!==null){for(a.flags|=128,ho(v,!1),p=k.updateQueue,p!==null&&(a.updateQueue=p,a.flags|=4),a.subtreeFlags=0,p=h,h=a.child;h!==null;)v=h,s=p,v.flags&=14680066,k=v.alternate,k===null?(v.childLanes=0,v.lanes=s,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=k.childLanes,v.lanes=k.lanes,v.child=k.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=k.memoizedProps,v.memoizedState=k.memoizedState,v.updateQueue=k.updateQueue,v.type=k.type,s=k.dependencies,v.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),h=h.sibling;return vt(Mt,Mt.current&1|2),a.child}s=s.sibling}v.tail!==null&&q()>nl&&(a.flags|=128,p=!0,ho(v,!1),a.lanes=4194304)}else{if(!p)if(s=La(k),s!==null){if(a.flags|=128,p=!0,h=s.updateQueue,h!==null&&(a.updateQueue=h,a.flags|=4),ho(v,!0),v.tail===null&&v.tailMode==="hidden"&&!k.alternate&&!Pt)return xn(a),null}else 2*q()-v.renderingStartTime>nl&&h!==1073741824&&(a.flags|=128,p=!0,ho(v,!1),a.lanes=4194304);v.isBackwards?(k.sibling=a.child,a.child=k):(h=v.last,h!==null?h.sibling=k:a.child=k,v.last=k)}return v.tail!==null?(a=v.tail,v.rendering=a,v.tail=a.sibling,v.renderingStartTime=q(),a.sibling=null,h=Mt.current,vt(Mt,p?h&1|2:h&1),a):(xn(a),null);case 22:case 23:return yh(),p=a.memoizedState!==null,s!==null&&s.memoizedState!==null!==p&&(a.flags|=8192),p&&(a.mode&1)!==0?(Kn&1073741824)!==0&&(xn(a),a.subtreeFlags&6&&(a.flags|=8192)):xn(a),null;case 24:return null;case 25:return null}throw Error(t(156,a.tag))}function Sx(s,a){switch(P0(a),a.tag){case 1:return jn(a.type)&&$a(),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return Ks(),bt(En),bt(gn),_0(),s=a.flags,(s&65536)!==0&&(s&128)===0?(a.flags=s&-65537|128,a):null;case 5:return N0(a),null;case 13:if(bt(Mt),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(t(340));Bs()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return bt(Mt),null;case 4:return Ks(),null;case 10:return E0(a.type._context),null;case 22:case 23:return yh(),null;case 24:return null;default:return null}}var Fa=!1,vn=!1,wx=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function el(s,a){var h=s.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(p){jt(s,a,p)}else h.current=null}function lh(s,a,h){try{h()}catch(p){jt(s,a,p)}}var Om=!1;function kx(s,a){if(y0=fa,s=Bd(),u0(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var p=h.getSelection&&h.getSelection();if(p&&p.rangeCount!==0){h=p.anchorNode;var g=p.anchorOffset,v=p.focusNode;p=p.focusOffset;try{h.nodeType,v.nodeType}catch{h=null;break e}var k=0,A=-1,V=-1,W=0,ae=0,fe=s,le=null;t:for(;;){for(var we;fe!==h||g!==0&&fe.nodeType!==3||(A=k+g),fe!==v||p!==0&&fe.nodeType!==3||(V=k+p),fe.nodeType===3&&(k+=fe.nodeValue.length),(we=fe.firstChild)!==null;)le=fe,fe=we;for(;;){if(fe===s)break t;if(le===h&&++W===g&&(A=k),le===v&&++ae===p&&(V=k),(we=fe.nextSibling)!==null)break;fe=le,le=fe.parentNode}fe=we}h=A===-1||V===-1?null:{start:A,end:V}}else h=null}h=h||{start:0,end:0}}else h=null;for(x0={focusedElem:s,selectionRange:h},fa=!1,Qe=a;Qe!==null;)if(a=Qe,s=a.child,(a.subtreeFlags&1028)!==0&&s!==null)s.return=a,Qe=s;else for(;Qe!==null;){a=Qe;try{var Ae=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var Ee=Ae.memoizedProps,Xt=Ae.memoizedState,z=a.stateNode,N=z.getSnapshotBeforeUpdate(a.elementType===a.type?Ee:Qr(a.type,Ee),Xt);z.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var D=a.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(de){jt(a,a.return,de)}if(s=a.sibling,s!==null){s.return=a.return,Qe=s;break}Qe=a.return}return Ae=Om,Om=!1,Ae}function fo(s,a,h){var p=a.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var g=p=p.next;do{if((g.tag&s)===s){var v=g.destroy;g.destroy=void 0,v!==void 0&&lh(a,h,v)}g=g.next}while(g!==p)}}function Ya(s,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var h=a=a.next;do{if((h.tag&s)===s){var p=h.create;h.destroy=p()}h=h.next}while(h!==a)}}function oh(s){var a=s.ref;if(a!==null){var h=s.stateNode;switch(s.tag){case 5:s=h;break;default:s=h}typeof a=="function"?a(s):a.current=s}}function gm(s){var a=s.alternate;a!==null&&(s.alternate=null,gm(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&(delete a[zr],delete a[to],delete a[k0],delete a[sx],delete a[lx])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function ym(s){return s.tag===5||s.tag===3||s.tag===4}function xm(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||ym(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function ah(s,a,h){var p=s.tag;if(p===5||p===6)s=s.stateNode,a?h.nodeType===8?h.parentNode.insertBefore(s,a):h.insertBefore(s,a):(h.nodeType===8?(a=h.parentNode,a.insertBefore(s,h)):(a=h,a.appendChild(s)),h=h._reactRootContainer,h!=null||a.onclick!==null||(a.onclick=ba));else if(p!==4&&(s=s.child,s!==null))for(ah(s,a,h),s=s.sibling;s!==null;)ah(s,a,h),s=s.sibling}function ch(s,a,h){var p=s.tag;if(p===5||p===6)s=s.stateNode,a?h.insertBefore(s,a):h.appendChild(s);else if(p!==4&&(s=s.child,s!==null))for(ch(s,a,h),s=s.sibling;s!==null;)ch(s,a,h),s=s.sibling}var hn=null,$r=!1;function zi(s,a,h){for(h=h.child;h!==null;)vm(s,a,h),h=h.sibling}function vm(s,a,h){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount($n,h)}catch{}switch(h.tag){case 5:vn||el(h,a);case 6:var p=hn,g=$r;hn=null,zi(s,a,h),hn=p,$r=g,hn!==null&&($r?(s=hn,h=h.stateNode,s.nodeType===8?s.parentNode.removeChild(h):s.removeChild(h)):hn.removeChild(h.stateNode));break;case 18:hn!==null&&($r?(s=hn,h=h.stateNode,s.nodeType===8?w0(s.parentNode,h):s.nodeType===1&&w0(s,h),Hl(s)):w0(hn,h.stateNode));break;case 4:p=hn,g=$r,hn=h.stateNode.containerInfo,$r=!0,zi(s,a,h),hn=p,$r=g;break;case 0:case 11:case 14:case 15:if(!vn&&(p=h.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){g=p=p.next;do{var v=g,k=v.destroy;v=v.tag,k!==void 0&&((v&2)!==0||(v&4)!==0)&&lh(h,a,k),g=g.next}while(g!==p)}zi(s,a,h);break;case 1:if(!vn&&(el(h,a),p=h.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=h.memoizedProps,p.state=h.memoizedState,p.componentWillUnmount()}catch(A){jt(h,a,A)}zi(s,a,h);break;case 21:zi(s,a,h);break;case 22:h.mode&1?(vn=(p=vn)||h.memoizedState!==null,zi(s,a,h),vn=p):zi(s,a,h);break;default:zi(s,a,h)}}function Sm(s){var a=s.updateQueue;if(a!==null){s.updateQueue=null;var h=s.stateNode;h===null&&(h=s.stateNode=new wx),a.forEach(function(p){var g=Zx.bind(null,s,p);h.has(p)||(h.add(p),p.then(g,g))})}}function Pr(s,a){var h=a.deletions;if(h!==null)for(var p=0;p<h.length;p++){var g=h[p];try{var v=s,k=a,A=k;e:for(;A!==null;){switch(A.tag){case 5:hn=A.stateNode,$r=!1;break e;case 3:hn=A.stateNode.containerInfo,$r=!0;break e;case 4:hn=A.stateNode.containerInfo,$r=!0;break e}A=A.return}if(hn===null)throw Error(t(160));vm(v,k,g),hn=null,$r=!1;var V=g.alternate;V!==null&&(V.return=null),g.return=null}catch(W){jt(g,a,W)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)wm(a,s),a=a.sibling}function wm(s,a){var h=s.alternate,p=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Pr(a,s),Hr(s),p&4){try{fo(3,s,s.return),Ya(3,s)}catch(Ee){jt(s,s.return,Ee)}try{fo(5,s,s.return)}catch(Ee){jt(s,s.return,Ee)}}break;case 1:Pr(a,s),Hr(s),p&512&&h!==null&&el(h,h.return);break;case 5:if(Pr(a,s),Hr(s),p&512&&h!==null&&el(h,h.return),s.flags&32){var g=s.stateNode;try{Ft(g,"")}catch(Ee){jt(s,s.return,Ee)}}if(p&4&&(g=s.stateNode,g!=null)){var v=s.memoizedProps,k=h!==null?h.memoizedProps:v,A=s.type,V=s.updateQueue;if(s.updateQueue=null,V!==null)try{A==="input"&&v.type==="radio"&&v.name!=null&&qe(g,v),yt(A,k);var W=yt(A,v);for(k=0;k<V.length;k+=2){var ae=V[k],fe=V[k+1];ae==="style"?Yt(g,fe):ae==="dangerouslySetInnerHTML"?gt(g,fe):ae==="children"?Ft(g,fe):P(g,ae,fe,W)}switch(A){case"input":Se(g,v);break;case"textarea":xr(g,v);break;case"select":var le=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var we=v.value;we!=null?pt(g,!!v.multiple,we,!1):le!==!!v.multiple&&(v.defaultValue!=null?pt(g,!!v.multiple,v.defaultValue,!0):pt(g,!!v.multiple,v.multiple?[]:"",!1))}g[to]=v}catch(Ee){jt(s,s.return,Ee)}}break;case 6:if(Pr(a,s),Hr(s),p&4){if(s.stateNode===null)throw Error(t(162));g=s.stateNode,v=s.memoizedProps;try{g.nodeValue=v}catch(Ee){jt(s,s.return,Ee)}}break;case 3:if(Pr(a,s),Hr(s),p&4&&h!==null&&h.memoizedState.isDehydrated)try{Hl(a.containerInfo)}catch(Ee){jt(s,s.return,Ee)}break;case 4:Pr(a,s),Hr(s);break;case 13:Pr(a,s),Hr(s),g=s.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(fh=q())),p&4&&Sm(s);break;case 22:if(ae=h!==null&&h.memoizedState!==null,s.mode&1?(vn=(W=vn)||ae,Pr(a,s),vn=W):Pr(a,s),Hr(s),p&8192){if(W=s.memoizedState!==null,(s.stateNode.isHidden=W)&&!ae&&(s.mode&1)!==0)for(Qe=s,ae=s.child;ae!==null;){for(fe=Qe=ae;Qe!==null;){switch(le=Qe,we=le.child,le.tag){case 0:case 11:case 14:case 15:fo(4,le,le.return);break;case 1:el(le,le.return);var Ae=le.stateNode;if(typeof Ae.componentWillUnmount=="function"){p=le,h=le.return;try{a=p,Ae.props=a.memoizedProps,Ae.state=a.memoizedState,Ae.componentWillUnmount()}catch(Ee){jt(p,h,Ee)}}break;case 5:el(le,le.return);break;case 22:if(le.memoizedState!==null){Qm(fe);continue}}we!==null?(we.return=le,Qe=we):Qm(fe)}ae=ae.sibling}e:for(ae=null,fe=s;;){if(fe.tag===5){if(ae===null){ae=fe;try{g=fe.stateNode,W?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(A=fe.stateNode,V=fe.memoizedProps.style,k=V!=null&&V.hasOwnProperty("display")?V.display:null,A.style.display=nn("display",k))}catch(Ee){jt(s,s.return,Ee)}}}else if(fe.tag===6){if(ae===null)try{fe.stateNode.nodeValue=W?"":fe.memoizedProps}catch(Ee){jt(s,s.return,Ee)}}else if((fe.tag!==22&&fe.tag!==23||fe.memoizedState===null||fe===s)&&fe.child!==null){fe.child.return=fe,fe=fe.child;continue}if(fe===s)break e;for(;fe.sibling===null;){if(fe.return===null||fe.return===s)break e;ae===fe&&(ae=null),fe=fe.return}ae===fe&&(ae=null),fe.sibling.return=fe.return,fe=fe.sibling}}break;case 19:Pr(a,s),Hr(s),p&4&&Sm(s);break;case 21:break;default:Pr(a,s),Hr(s)}}function Hr(s){var a=s.flags;if(a&2){try{e:{for(var h=s.return;h!==null;){if(ym(h)){var p=h;break e}h=h.return}throw Error(t(160))}switch(p.tag){case 5:var g=p.stateNode;p.flags&32&&(Ft(g,""),p.flags&=-33);var v=xm(s);ch(s,v,g);break;case 3:case 4:var k=p.stateNode.containerInfo,A=xm(s);ah(s,A,k);break;default:throw Error(t(161))}}catch(V){jt(s,s.return,V)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function bx(s,a,h){Qe=s,km(s)}function km(s,a,h){for(var p=(s.mode&1)!==0;Qe!==null;){var g=Qe,v=g.child;if(g.tag===22&&p){var k=g.memoizedState!==null||Fa;if(!k){var A=g.alternate,V=A!==null&&A.memoizedState!==null||vn;A=Fa;var W=vn;if(Fa=k,(vn=V)&&!W)for(Qe=g;Qe!==null;)k=Qe,V=k.child,k.tag===22&&k.memoizedState!==null?$m(g):V!==null?(V.return=k,Qe=V):$m(g);for(;v!==null;)Qe=v,km(v),v=v.sibling;Qe=g,Fa=A,vn=W}bm(s)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,Qe=v):bm(s)}}function bm(s){for(;Qe!==null;){var a=Qe;if((a.flags&8772)!==0){var h=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:vn||Ya(5,a);break;case 1:var p=a.stateNode;if(a.flags&4&&!vn)if(h===null)p.componentDidMount();else{var g=a.elementType===a.type?h.memoizedProps:Qr(a.type,h.memoizedProps);p.componentDidUpdate(g,h.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var v=a.updateQueue;v!==null&&Qp(a,v,p);break;case 3:var k=a.updateQueue;if(k!==null){if(h=null,a.child!==null)switch(a.child.tag){case 5:h=a.child.stateNode;break;case 1:h=a.child.stateNode}Qp(a,k,h)}break;case 5:var A=a.stateNode;if(h===null&&a.flags&4){h=A;var V=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":V.autoFocus&&h.focus();break;case"img":V.src&&(h.src=V.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var W=a.alternate;if(W!==null){var ae=W.memoizedState;if(ae!==null){var fe=ae.dehydrated;fe!==null&&Hl(fe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}vn||a.flags&512&&oh(a)}catch(le){jt(a,a.return,le)}}if(a===s){Qe=null;break}if(h=a.sibling,h!==null){h.return=a.return,Qe=h;break}Qe=a.return}}function Qm(s){for(;Qe!==null;){var a=Qe;if(a===s){Qe=null;break}var h=a.sibling;if(h!==null){h.return=a.return,Qe=h;break}Qe=a.return}}function $m(s){for(;Qe!==null;){var a=Qe;try{switch(a.tag){case 0:case 11:case 15:var h=a.return;try{Ya(4,a)}catch(V){jt(a,h,V)}break;case 1:var p=a.stateNode;if(typeof p.componentDidMount=="function"){var g=a.return;try{p.componentDidMount()}catch(V){jt(a,g,V)}}var v=a.return;try{oh(a)}catch(V){jt(a,v,V)}break;case 5:var k=a.return;try{oh(a)}catch(V){jt(a,k,V)}}}catch(V){jt(a,a.return,V)}if(a===s){Qe=null;break}var A=a.sibling;if(A!==null){A.return=a.return,Qe=A;break}Qe=a.return}}var Qx=Math.ceil,Ba=M.ReactCurrentDispatcher,uh=M.ReactCurrentOwner,fr=M.ReactCurrentBatchConfig,lt=0,sn=null,Ht=null,fn=0,Kn=0,tl=Ri(0),Gt=0,po=null,gs=0,qa=0,hh=0,mo=null,Rn=null,fh=0,nl=1/0,gi=null,Ua=!1,dh=null,Di=null,Ga=!1,Ii=null,Ka=0,Oo=0,ph=null,Ja=-1,ec=0;function An(){return(lt&6)!==0?q():Ja!==-1?Ja:Ja=q()}function Hi(s){return(s.mode&1)===0?1:(lt&2)!==0&&fn!==0?fn&-fn:ax.transition!==null?(ec===0&&(ec=xd()),ec):(s=Ot,s!==0||(s=window.event,s=s===void 0?16:Ad(s.type)),s)}function Ar(s,a,h,p){if(50<Oo)throw Oo=0,ph=null,Error(t(185));Xl(s,h,p),((lt&2)===0||s!==sn)&&(s===sn&&((lt&2)===0&&(qa|=h),Gt===4&&Wi(s,fn)),Ln(s,p),h===1&&lt===0&&(a.mode&1)===0&&(nl=q()+500,Aa&&Ni()))}function Ln(s,a){var h=s.callbackNode;ay(s,a);var p=cs(s,s===sn?fn:0);if(p===0)h!==null&&ie(h),s.callbackNode=null,s.callbackPriority=0;else if(a=p&-p,s.callbackPriority!==a){if(h!=null&&ie(h),a===1)s.tag===0?ox(Am.bind(null,s)):dp(Am.bind(null,s)),rx(function(){(lt&6)===0&&Ni()}),h=null;else{switch(vd(p)){case 1:h=dt;break;case 4:h=st;break;case 16:h=Qt;break;case 536870912:h=Et;break;default:h=Qt}h=Rm(h,Pm.bind(null,s))}s.callbackPriority=a,s.callbackNode=h}}function Pm(s,a){if(Ja=-1,ec=0,(lt&6)!==0)throw Error(t(327));var h=s.callbackNode;if(rl()&&s.callbackNode!==h)return null;var p=cs(s,s===sn?fn:0);if(p===0)return null;if((p&30)!==0||(p&s.expiredLanes)!==0||a)a=tc(s,p);else{a=p;var g=lt;lt|=2;var v=Tm();(sn!==s||fn!==a)&&(gi=null,nl=q()+500,xs(s,a));do try{Ax();break}catch(A){Cm(s,A)}while(!0);Z0(),Ba.current=v,lt=g,Ht!==null?a=0:(sn=null,fn=0,a=Gt)}if(a!==0){if(a===2&&(g=Bu(s),g!==0&&(p=g,a=mh(s,g))),a===1)throw h=po,xs(s,0),Wi(s,p),Ln(s,q()),h;if(a===6)Wi(s,p);else{if(g=s.current.alternate,(p&30)===0&&!$x(g)&&(a=tc(s,p),a===2&&(v=Bu(s),v!==0&&(p=v,a=mh(s,v))),a===1))throw h=po,xs(s,0),Wi(s,p),Ln(s,q()),h;switch(s.finishedWork=g,s.finishedLanes=p,a){case 0:case 1:throw Error(t(345));case 2:vs(s,Rn,gi);break;case 3:if(Wi(s,p),(p&130023424)===p&&(a=fh+500-q(),10<a)){if(cs(s,0)!==0)break;if(g=s.suspendedLanes,(g&p)!==p){An(),s.pingedLanes|=s.suspendedLanes&g;break}s.timeoutHandle=S0(vs.bind(null,s,Rn,gi),a);break}vs(s,Rn,gi);break;case 4:if(Wi(s,p),(p&4194240)===p)break;for(a=s.eventTimes,g=-1;0<p;){var k=31-or(p);v=1<<k,k=a[k],k>g&&(g=k),p&=~v}if(p=g,p=q()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*Qx(p/1960))-p,10<p){s.timeoutHandle=S0(vs.bind(null,s,Rn,gi),p);break}vs(s,Rn,gi);break;case 5:vs(s,Rn,gi);break;default:throw Error(t(329))}}}return Ln(s,q()),s.callbackNode===h?Pm.bind(null,s):null}function mh(s,a){var h=mo;return s.current.memoizedState.isDehydrated&&(xs(s,a).flags|=256),s=tc(s,a),s!==2&&(a=Rn,Rn=h,a!==null&&Oh(a)),s}function Oh(s){Rn===null?Rn=s:Rn.push.apply(Rn,s)}function $x(s){for(var a=s;;){if(a.flags&16384){var h=a.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var p=0;p<h.length;p++){var g=h[p],v=g.getSnapshot;g=g.value;try{if(!kr(v(),g))return!1}catch{return!1}}}if(h=a.child,a.subtreeFlags&16384&&h!==null)h.return=a,a=h;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Wi(s,a){for(a&=~hh,a&=~qa,s.suspendedLanes|=a,s.pingedLanes&=~a,s=s.expirationTimes;0<a;){var h=31-or(a),p=1<<h;s[h]=-1,a&=~p}}function Am(s){if((lt&6)!==0)throw Error(t(327));rl();var a=cs(s,0);if((a&1)===0)return Ln(s,q()),null;var h=tc(s,a);if(s.tag!==0&&h===2){var p=Bu(s);p!==0&&(a=p,h=mh(s,p))}if(h===1)throw h=po,xs(s,0),Wi(s,a),Ln(s,q()),h;if(h===6)throw Error(t(345));return s.finishedWork=s.current.alternate,s.finishedLanes=a,vs(s,Rn,gi),Ln(s,q()),null}function gh(s,a){var h=lt;lt|=1;try{return s(a)}finally{lt=h,lt===0&&(nl=q()+500,Aa&&Ni())}}function ys(s){Ii!==null&&Ii.tag===0&&(lt&6)===0&&rl();var a=lt;lt|=1;var h=fr.transition,p=Ot;try{if(fr.transition=null,Ot=1,s)return s()}finally{Ot=p,fr.transition=h,lt=a,(lt&6)===0&&Ni()}}function yh(){Kn=tl.current,bt(tl)}function xs(s,a){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;if(h!==-1&&(s.timeoutHandle=-1,nx(h)),Ht!==null)for(h=Ht.return;h!==null;){var p=h;switch(P0(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&$a();break;case 3:Ks(),bt(En),bt(gn),_0();break;case 5:N0(p);break;case 4:Ks();break;case 13:bt(Mt);break;case 19:bt(Mt);break;case 10:E0(p.type._context);break;case 22:case 23:yh()}h=h.return}if(sn=s,Ht=s=Fi(s.current,null),fn=Kn=a,Gt=0,po=null,hh=qa=gs=0,Rn=mo=null,ps!==null){for(a=0;a<ps.length;a++)if(h=ps[a],p=h.interleaved,p!==null){h.interleaved=null;var g=p.next,v=h.pending;if(v!==null){var k=v.next;v.next=g,p.next=k}h.pending=p}ps=null}return s}function Cm(s,a){do{var h=Ht;try{if(Z0(),Na.current=Da,Xa){for(var p=Zt.memoizedState;p!==null;){var g=p.queue;g!==null&&(g.pending=null),p=p.next}Xa=!1}if(Os=0,rn=Ut=Zt=null,oo=!1,ao=0,uh.current=null,h===null||h.return===null){Gt=1,po=a,Ht=null;break}e:{var v=s,k=h.return,A=h,V=a;if(a=fn,A.flags|=32768,V!==null&&typeof V=="object"&&typeof V.then=="function"){var W=V,ae=A,fe=ae.tag;if((ae.mode&1)===0&&(fe===0||fe===11||fe===15)){var le=ae.alternate;le?(ae.updateQueue=le.updateQueue,ae.memoizedState=le.memoizedState,ae.lanes=le.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var we=em(k);if(we!==null){we.flags&=-257,tm(we,k,A,v,a),we.mode&1&&Jp(v,W,a),a=we,V=W;var Ae=a.updateQueue;if(Ae===null){var Ee=new Set;Ee.add(V),a.updateQueue=Ee}else Ae.add(V);break e}else{if((a&1)===0){Jp(v,W,a),xh();break e}V=Error(t(426))}}else if(Pt&&A.mode&1){var Xt=em(k);if(Xt!==null){(Xt.flags&65536)===0&&(Xt.flags|=256),tm(Xt,k,A,v,a),T0(Js(V,A));break e}}v=V=Js(V,A),Gt!==4&&(Gt=2),mo===null?mo=[v]:mo.push(v),v=k;do{switch(v.tag){case 3:v.flags|=65536,a&=-a,v.lanes|=a;var z=Gp(v,V,a);bp(v,z);break e;case 1:A=V;var N=v.type,D=v.stateNode;if((v.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(Di===null||!Di.has(D)))){v.flags|=65536,a&=-a,v.lanes|=a;var de=Kp(v,A,a);bp(v,de);break e}}v=v.return}while(v!==null)}Zm(h)}catch(Le){a=Le,Ht===h&&h!==null&&(Ht=h=h.return);continue}break}while(!0)}function Tm(){var s=Ba.current;return Ba.current=Da,s===null?Da:s}function xh(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),sn===null||(gs&268435455)===0&&(qa&268435455)===0||Wi(sn,fn)}function tc(s,a){var h=lt;lt|=2;var p=Tm();(sn!==s||fn!==a)&&(gi=null,xs(s,a));do try{Px();break}catch(g){Cm(s,g)}while(!0);if(Z0(),lt=h,Ba.current=p,Ht!==null)throw Error(t(261));return sn=null,fn=0,Gt}function Px(){for(;Ht!==null;)Mm(Ht)}function Ax(){for(;Ht!==null&&!F();)Mm(Ht)}function Mm(s){var a=Vm(s.alternate,s,Kn);s.memoizedProps=s.pendingProps,a===null?Zm(s):Ht=a,uh.current=null}function Zm(s){var a=s;do{var h=a.alternate;if(s=a.return,(a.flags&32768)===0){if(h=vx(h,a,Kn),h!==null){Ht=h;return}}else{if(h=Sx(h,a),h!==null){h.flags&=32767,Ht=h;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Gt=6,Ht=null;return}}if(a=a.sibling,a!==null){Ht=a;return}Ht=a=s}while(a!==null);Gt===0&&(Gt=5)}function vs(s,a,h){var p=Ot,g=fr.transition;try{fr.transition=null,Ot=1,Cx(s,a,h,p)}finally{fr.transition=g,Ot=p}return null}function Cx(s,a,h,p){do rl();while(Ii!==null);if((lt&6)!==0)throw Error(t(327));h=s.finishedWork;var g=s.finishedLanes;if(h===null)return null;if(s.finishedWork=null,s.finishedLanes=0,h===s.current)throw Error(t(177));s.callbackNode=null,s.callbackPriority=0;var v=h.lanes|h.childLanes;if(cy(s,v),s===sn&&(Ht=sn=null,fn=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||Ga||(Ga=!0,Rm(Qt,function(){return rl(),null})),v=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||v){v=fr.transition,fr.transition=null;var k=Ot;Ot=1;var A=lt;lt|=4,uh.current=null,kx(s,h),wm(h,s),qy(x0),fa=!!y0,x0=y0=null,s.current=h,bx(h),be(),lt=A,Ot=k,fr.transition=v}else s.current=h;if(Ga&&(Ga=!1,Ii=s,Ka=g),v=s.pendingLanes,v===0&&(Di=null),Yu(h.stateNode),Ln(s,q()),a!==null)for(p=s.onRecoverableError,h=0;h<a.length;h++)g=a[h],p(g.value,{componentStack:g.stack,digest:g.digest});if(Ua)throw Ua=!1,s=dh,dh=null,s;return(Ka&1)!==0&&s.tag!==0&&rl(),v=s.pendingLanes,(v&1)!==0?s===ph?Oo++:(Oo=0,ph=s):Oo=0,Ni(),null}function rl(){if(Ii!==null){var s=vd(Ka),a=fr.transition,h=Ot;try{if(fr.transition=null,Ot=16>s?16:s,Ii===null)var p=!1;else{if(s=Ii,Ii=null,Ka=0,(lt&6)!==0)throw Error(t(331));var g=lt;for(lt|=4,Qe=s.current;Qe!==null;){var v=Qe,k=v.child;if((Qe.flags&16)!==0){var A=v.deletions;if(A!==null){for(var V=0;V<A.length;V++){var W=A[V];for(Qe=W;Qe!==null;){var ae=Qe;switch(ae.tag){case 0:case 11:case 15:fo(8,ae,v)}var fe=ae.child;if(fe!==null)fe.return=ae,Qe=fe;else for(;Qe!==null;){ae=Qe;var le=ae.sibling,we=ae.return;if(gm(ae),ae===W){Qe=null;break}if(le!==null){le.return=we,Qe=le;break}Qe=we}}}var Ae=v.alternate;if(Ae!==null){var Ee=Ae.child;if(Ee!==null){Ae.child=null;do{var Xt=Ee.sibling;Ee.sibling=null,Ee=Xt}while(Ee!==null)}}Qe=v}}if((v.subtreeFlags&2064)!==0&&k!==null)k.return=v,Qe=k;else e:for(;Qe!==null;){if(v=Qe,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:fo(9,v,v.return)}var z=v.sibling;if(z!==null){z.return=v.return,Qe=z;break e}Qe=v.return}}var N=s.current;for(Qe=N;Qe!==null;){k=Qe;var D=k.child;if((k.subtreeFlags&2064)!==0&&D!==null)D.return=k,Qe=D;else e:for(k=N;Qe!==null;){if(A=Qe,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:Ya(9,A)}}catch(Le){jt(A,A.return,Le)}if(A===k){Qe=null;break e}var de=A.sibling;if(de!==null){de.return=A.return,Qe=de;break e}Qe=A.return}}if(lt=g,Ni(),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot($n,s)}catch{}p=!0}return p}finally{Ot=h,fr.transition=a}}return!1}function Em(s,a,h){a=Js(h,a),a=Gp(s,a,1),s=_i(s,a,1),a=An(),s!==null&&(Xl(s,1,a),Ln(s,a))}function jt(s,a,h){if(s.tag===3)Em(s,s,h);else for(;a!==null;){if(a.tag===3){Em(a,s,h);break}else if(a.tag===1){var p=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Di===null||!Di.has(p))){s=Js(h,s),s=Kp(a,s,1),a=_i(a,s,1),s=An(),a!==null&&(Xl(a,1,s),Ln(a,s));break}}a=a.return}}function Tx(s,a,h){var p=s.pingCache;p!==null&&p.delete(a),a=An(),s.pingedLanes|=s.suspendedLanes&h,sn===s&&(fn&h)===h&&(Gt===4||Gt===3&&(fn&130023424)===fn&&500>q()-fh?xs(s,0):hh|=h),Ln(s,a)}function jm(s,a){a===0&&((s.mode&1)===0?a=1:(a=ci,ci<<=1,(ci&130023424)===0&&(ci=4194304)));var h=An();s=pi(s,a),s!==null&&(Xl(s,a,h),Ln(s,h))}function Mx(s){var a=s.memoizedState,h=0;a!==null&&(h=a.retryLane),jm(s,h)}function Zx(s,a){var h=0;switch(s.tag){case 13:var p=s.stateNode,g=s.memoizedState;g!==null&&(h=g.retryLane);break;case 19:p=s.stateNode;break;default:throw Error(t(314))}p!==null&&p.delete(a),jm(s,h)}var Vm;Vm=function(s,a,h){if(s!==null)if(s.memoizedProps!==a.pendingProps||En.current)Vn=!0;else{if((s.lanes&h)===0&&(a.flags&128)===0)return Vn=!1,xx(s,a,h);Vn=(s.flags&131072)!==0}else Vn=!1,Pt&&(a.flags&1048576)!==0&&pp(a,Ta,a.index);switch(a.lanes=0,a.tag){case 2:var p=a.type;Wa(s,a),s=a.pendingProps;var g=Ws(a,gn.current);Gs(a,h),g=I0(null,a,p,s,g,h);var v=H0();return a.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,jn(p)?(v=!0,Pa(a)):v=!1,a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,R0(a),g.updater=Ia,a.stateNode=g,g._reactInternals=a,U0(a,p,s,h),a=eh(null,a,p,!0,v,h)):(a.tag=0,Pt&&v&&$0(a),Pn(null,a,g,h),a=a.child),a;case 16:p=a.elementType;e:{switch(Wa(s,a),s=a.pendingProps,g=p._init,p=g(p._payload),a.type=p,g=a.tag=jx(p),s=Qr(p,s),g){case 0:a=J0(null,a,p,s,h);break e;case 1:a=om(null,a,p,s,h);break e;case 11:a=nm(null,a,p,s,h);break e;case 14:a=rm(null,a,p,Qr(p.type,s),h);break e}throw Error(t(306,p,""))}return a;case 0:return p=a.type,g=a.pendingProps,g=a.elementType===p?g:Qr(p,g),J0(s,a,p,g,h);case 1:return p=a.type,g=a.pendingProps,g=a.elementType===p?g:Qr(p,g),om(s,a,p,g,h);case 3:e:{if(am(a),s===null)throw Error(t(387));p=a.pendingProps,v=a.memoizedState,g=v.element,kp(s,a),Ra(a,p,null,h);var k=a.memoizedState;if(p=k.element,v.isDehydrated)if(v={element:p,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},a.updateQueue.baseState=v,a.memoizedState=v,a.flags&256){g=Js(Error(t(423)),a),a=cm(s,a,p,h,g);break e}else if(p!==g){g=Js(Error(t(424)),a),a=cm(s,a,p,h,g);break e}else for(Gn=Vi(a.stateNode.containerInfo.firstChild),Un=a,Pt=!0,br=null,h=Sp(a,null,p,h),a.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Bs(),p===g){a=Oi(s,a,h);break e}Pn(s,a,p,h)}a=a.child}return a;case 5:return $p(a),s===null&&C0(a),p=a.type,g=a.pendingProps,v=s!==null?s.memoizedProps:null,k=g.children,v0(p,g)?k=null:v!==null&&v0(p,v)&&(a.flags|=32),lm(s,a),Pn(s,a,k,h),a.child;case 6:return s===null&&C0(a),null;case 13:return um(s,a,h);case 4:return L0(a,a.stateNode.containerInfo),p=a.pendingProps,s===null?a.child=qs(a,null,p,h):Pn(s,a,p,h),a.child;case 11:return p=a.type,g=a.pendingProps,g=a.elementType===p?g:Qr(p,g),nm(s,a,p,g,h);case 7:return Pn(s,a,a.pendingProps,h),a.child;case 8:return Pn(s,a,a.pendingProps.children,h),a.child;case 12:return Pn(s,a,a.pendingProps.children,h),a.child;case 10:e:{if(p=a.type._context,g=a.pendingProps,v=a.memoizedProps,k=g.value,vt(Ea,p._currentValue),p._currentValue=k,v!==null)if(kr(v.value,k)){if(v.children===g.children&&!En.current){a=Oi(s,a,h);break e}}else for(v=a.child,v!==null&&(v.return=a);v!==null;){var A=v.dependencies;if(A!==null){k=v.child;for(var V=A.firstContext;V!==null;){if(V.context===p){if(v.tag===1){V=mi(-1,h&-h),V.tag=2;var W=v.updateQueue;if(W!==null){W=W.shared;var ae=W.pending;ae===null?V.next=V:(V.next=ae.next,ae.next=V),W.pending=V}}v.lanes|=h,V=v.alternate,V!==null&&(V.lanes|=h),j0(v.return,h,a),A.lanes|=h;break}V=V.next}}else if(v.tag===10)k=v.type===a.type?null:v.child;else if(v.tag===18){if(k=v.return,k===null)throw Error(t(341));k.lanes|=h,A=k.alternate,A!==null&&(A.lanes|=h),j0(k,h,a),k=v.sibling}else k=v.child;if(k!==null)k.return=v;else for(k=v;k!==null;){if(k===a){k=null;break}if(v=k.sibling,v!==null){v.return=k.return,k=v;break}k=k.return}v=k}Pn(s,a,g.children,h),a=a.child}return a;case 9:return g=a.type,p=a.pendingProps.children,Gs(a,h),g=ur(g),p=p(g),a.flags|=1,Pn(s,a,p,h),a.child;case 14:return p=a.type,g=Qr(p,a.pendingProps),g=Qr(p.type,g),rm(s,a,p,g,h);case 15:return im(s,a,a.type,a.pendingProps,h);case 17:return p=a.type,g=a.pendingProps,g=a.elementType===p?g:Qr(p,g),Wa(s,a),a.tag=1,jn(p)?(s=!0,Pa(a)):s=!1,Gs(a,h),qp(a,p,g),U0(a,p,g,h),eh(null,a,p,!0,s,h);case 19:return fm(s,a,h);case 22:return sm(s,a,h)}throw Error(t(156,a.tag))};function Rm(s,a){return re(s,a)}function Ex(s,a,h,p){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(s,a,h,p){return new Ex(s,a,h,p)}function vh(s){return s=s.prototype,!(!s||!s.isReactComponent)}function jx(s){if(typeof s=="function")return vh(s)?1:0;if(s!=null){if(s=s.$$typeof,s===oe)return 11;if(s===_e)return 14}return 2}function Fi(s,a){var h=s.alternate;return h===null?(h=dr(s.tag,a,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=a,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&14680064,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,a=s.dependencies,h.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h}function nc(s,a,h,p,g,v){var k=2;if(p=s,typeof s=="function")vh(s)&&(k=1);else if(typeof s=="string")k=5;else e:switch(s){case Z:return Ss(h.children,g,v,a);case H:k=8,g|=8;break;case Y:return s=dr(12,h,a,g|2),s.elementType=Y,s.lanes=v,s;case ye:return s=dr(13,h,a,g),s.elementType=ye,s.lanes=v,s;case je:return s=dr(19,h,a,g),s.elementType=je,s.lanes=v,s;case me:return rc(h,g,v,a);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case J:k=10;break e;case se:k=9;break e;case oe:k=11;break e;case _e:k=14;break e;case U:k=16,p=null;break e}throw Error(t(130,s==null?s:typeof s,""))}return a=dr(k,h,a,g),a.elementType=s,a.type=p,a.lanes=v,a}function Ss(s,a,h,p){return s=dr(7,s,p,a),s.lanes=h,s}function rc(s,a,h,p){return s=dr(22,s,p,a),s.elementType=me,s.lanes=h,s.stateNode={isHidden:!1},s}function Sh(s,a,h){return s=dr(6,s,null,a),s.lanes=h,s}function wh(s,a,h){return a=dr(4,s.children!==null?s.children:[],s.key,a),a.lanes=h,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}function Vx(s,a,h,p,g){this.tag=a,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qu(0),this.expirationTimes=qu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qu(0),this.identifierPrefix=p,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function kh(s,a,h,p,g,v,k,A,V){return s=new Vx(s,a,h,A,V),a===1?(a=1,v===!0&&(a|=8)):a=0,v=dr(3,null,null,a),s.current=v,v.stateNode=s,v.memoizedState={element:p,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},R0(v),s}function Rx(s,a,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:X,key:p==null?null:""+p,children:s,containerInfo:a,implementation:h}}function Lm(s){if(!s)return Li;s=s._reactInternals;e:{if(pe(s)!==s||s.tag!==1)throw Error(t(170));var a=s;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(jn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(t(171))}if(s.tag===1){var h=s.type;if(jn(h))return hp(s,h,a)}return a}function Nm(s,a,h,p,g,v,k,A,V){return s=kh(h,p,!0,s,g,v,k,A,V),s.context=Lm(null),h=s.current,p=An(),g=Hi(h),v=mi(p,g),v.callback=a??null,_i(h,v,g),s.current.lanes=g,Xl(s,g,p),Ln(s,p),s}function ic(s,a,h,p){var g=a.current,v=An(),k=Hi(g);return h=Lm(h),a.context===null?a.context=h:a.pendingContext=h,a=mi(v,k),a.payload={element:s},p=p===void 0?null:p,p!==null&&(a.callback=p),s=_i(g,a,k),s!==null&&(Ar(s,g,k,v),Va(s,g,k)),k}function sc(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Xm(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<a?h:a}}function bh(s,a){Xm(s,a),(s=s.alternate)&&Xm(s,a)}function Lx(){return null}var _m=typeof reportError=="function"?reportError:function(s){console.error(s)};function Qh(s){this._internalRoot=s}lc.prototype.render=Qh.prototype.render=function(s){var a=this._internalRoot;if(a===null)throw Error(t(409));ic(s,a,null,null)},lc.prototype.unmount=Qh.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var a=s.containerInfo;ys(function(){ic(null,s,null,null)}),a[ui]=null}};function lc(s){this._internalRoot=s}lc.prototype.unstable_scheduleHydration=function(s){if(s){var a=kd();s={blockedOn:null,target:s,priority:a};for(var h=0;h<Zi.length&&a!==0&&a<Zi[h].priority;h++);Zi.splice(h,0,s),h===0&&$d(s)}};function $h(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function oc(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function zm(){}function Nx(s,a,h,p,g){if(g){if(typeof p=="function"){var v=p;p=function(){var W=sc(k);v.call(W)}}var k=Nm(a,p,s,0,null,!1,!1,"",zm);return s._reactRootContainer=k,s[ui]=k.current,Jl(s.nodeType===8?s.parentNode:s),ys(),k}for(;g=s.lastChild;)s.removeChild(g);if(typeof p=="function"){var A=p;p=function(){var W=sc(V);A.call(W)}}var V=kh(s,0,!1,null,null,!1,!1,"",zm);return s._reactRootContainer=V,s[ui]=V.current,Jl(s.nodeType===8?s.parentNode:s),ys(function(){ic(a,V,h,p)}),V}function ac(s,a,h,p,g){var v=h._reactRootContainer;if(v){var k=v;if(typeof g=="function"){var A=g;g=function(){var V=sc(k);A.call(V)}}ic(a,k,s,g)}else k=Nx(h,a,s,g,p);return sc(k)}Sd=function(s){switch(s.tag){case 3:var a=s.stateNode;if(a.current.memoizedState.isDehydrated){var h=Ai(a.pendingLanes);h!==0&&(Uu(a,h|1),Ln(a,q()),(lt&6)===0&&(nl=q()+500,Ni()))}break;case 13:ys(function(){var p=pi(s,1);if(p!==null){var g=An();Ar(p,s,1,g)}}),bh(s,1)}},Gu=function(s){if(s.tag===13){var a=pi(s,134217728);if(a!==null){var h=An();Ar(a,s,134217728,h)}bh(s,134217728)}},wd=function(s){if(s.tag===13){var a=Hi(s),h=pi(s,a);if(h!==null){var p=An();Ar(h,s,a,p)}bh(s,a)}},kd=function(){return Ot},bd=function(s,a){var h=Ot;try{return Ot=s,a()}finally{Ot=h}},Qn=function(s,a,h){switch(a){case"input":if(Se(s,h),a=h.name,h.type==="radio"&&a!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<h.length;a++){var p=h[a];if(p!==s&&p.form===s.form){var g=Qa(p);if(!g)throw Error(t(90));We(p),Se(p,g)}}}break;case"textarea":xr(s,h);break;case"select":a=h.value,a!=null&&pt(s,!!h.multiple,a,!1)}},Lr=gh,Nt=ys;var Xx={usingClientEntryPoint:!1,Events:[no,Is,Qa,Sr,Rr,gh]},go={findFiberByHostInstance:us,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_x={bundleType:go.bundleType,version:go.version,rendererPackageName:go.rendererPackageName,rendererConfig:go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Be(s),s===null?null:s.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||Lx,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cc.isDisabled&&cc.supportsFiber)try{$n=cc.inject(_x),qt=cc}catch{}}return Nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xx,Nn.createPortal=function(s,a){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$h(a))throw Error(t(200));return Rx(s,a,null,h)},Nn.createRoot=function(s,a){if(!$h(s))throw Error(t(299));var h=!1,p="",g=_m;return a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onRecoverableError!==void 0&&(g=a.onRecoverableError)),a=kh(s,1,!1,null,null,h,!1,p,g),s[ui]=a.current,Jl(s.nodeType===8?s.parentNode:s),new Qh(a)},Nn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(t(188)):(s=Object.keys(s).join(","),Error(t(268,s)));return s=Be(a),s=s===null?null:s.stateNode,s},Nn.flushSync=function(s){return ys(s)},Nn.hydrate=function(s,a,h){if(!oc(a))throw Error(t(200));return ac(null,s,a,!0,h)},Nn.hydrateRoot=function(s,a,h){if(!$h(s))throw Error(t(405));var p=h!=null&&h.hydratedSources||null,g=!1,v="",k=_m;if(h!=null&&(h.unstable_strictMode===!0&&(g=!0),h.identifierPrefix!==void 0&&(v=h.identifierPrefix),h.onRecoverableError!==void 0&&(k=h.onRecoverableError)),a=Nm(a,null,s,1,h??null,g,!1,v,k),s[ui]=a.current,Jl(s),p)for(s=0;s<p.length;s++)h=p[s],g=h._getVersion,g=g(h._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[h,g]:a.mutableSourceEagerHydrationData.push(h,g);return new lc(a)},Nn.render=function(s,a,h){if(!oc(a))throw Error(t(200));return ac(null,s,a,!1,h)},Nn.unmountComponentAtNode=function(s){if(!oc(s))throw Error(t(40));return s._reactRootContainer?(ys(function(){ac(null,null,s,!1,function(){s._reactRootContainer=null,s[ui]=null})}),!0):!1},Nn.unstable_batchedUpdates=gh,Nn.unstable_renderSubtreeIntoContainer=function(s,a,h,p){if(!oc(h))throw Error(t(200));if(s==null||s._reactInternals===void 0)throw Error(t(38));return ac(s,a,h,!1,p)},Nn.version="18.3.1-next-f1338f8080-20240426",Nn}var qm;function qx(){if(qm)return Ch.exports;qm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Ch.exports=Bx(),Ch.exports}var Um;function Ux(){if(Um)return hc;Um=1;var n=qx();return hc.createRoot=n.createRoot,hc.hydrateRoot=n.hydrateRoot,hc}var Gx=Ux();function Vt(n){d.useEffect(n,[])}const Kx="modulepreload",Jx=function(n){return"/"+n},Gm={},ev=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){let o=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(O=>({status:"fulfilled",value:O}),O=>({status:"rejected",reason:O}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(t.map(f=>{if(f=Jx(f),f in Gm)return;Gm[f]=!0;const m=f.endsWith(".css"),O=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${O}`))return;const y=document.createElement("link");if(y.rel=m?"stylesheet":Kx,m||(y.as="script"),y.crossOrigin="",y.href=f,u&&y.setAttribute("nonce",u),document.head.appendChild(y),m)return new Promise((S,w)=>{y.addEventListener("load",S),y.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function l(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return i.then(o=>{for(const c of o||[])c.status==="rejected"&&l(c.reason);return e().catch(l)})};function tv(n){if(typeof n!="object"||n===null)return!0;const e=n;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}const Bg={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","hover:bg-neutral-200","active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","hover:bg-surface-hover hover:text-white hover:border-border-strong","active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","hover:bg-red-600","active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","hover:bg-surface-hover hover:text-white","active:scale-[0.98]"].join(" ")},nv={sm:"h-7 px-2.5 text-xs gap-1.5 rounded-button",md:"h-8 px-3 text-sm gap-1.5 rounded-button",lg:"h-9 px-4 text-base gap-2 rounded-button"},rv=d.forwardRef(({variant:n="secondary",size:e="md",loading:t,icon:r,children:i,className:l="",disabled:o,...c},u)=>x.jsxs("button",{ref:u,disabled:o||t,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",Bg[n],nv[e],l].join(" "),...c,children:[t?x.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[x.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),x.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?x.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&x.jsx("span",{children:i})]}));rv.displayName="Button";const iv={sm:"min-w-7 min-h-7 rounded-button",md:"min-w-8 min-h-8 rounded-button",lg:"min-w-9 min-h-9 rounded-button"},sv=d.forwardRef(({icon:n,size:e="md",variant:t="ghost",className:r="",...i},l)=>x.jsx("button",{ref:l,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",Bg[t],iv[e],r].join(" "),...i,children:n}));sv.displayName="IconButton";function lv({title:n,detail:e,mono:t,size:r=64,progress:i}){const l=typeof i=="number"&&Number.isFinite(i)?Math.min(1,Math.max(0,i)):void 0,o=Math.round(r*1.16);return x.jsxs("div",{className:"hf-loader",draggable:!1,children:[x.jsx("div",{className:"hf-loader-mark-frame",style:{width:o,height:o},draggable:!1,children:x.jsxs("svg",{className:"hf-loader-mark",width:r,height:r,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[x.jsx("g",{className:"hf-loader-mark__mark",transform:"translate(50 50)",children:x.jsx("g",{className:"hf-loader-mark__core",transform:"scale(1)",opacity:".92",children:x.jsxs("g",{transform:"translate(-50 -50)",children:[x.jsx("path",{d:"M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z",fill:"url(#hf-loader-grad-left)"}),x.jsx("path",{d:"M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",fill:"url(#hf-loader-grad-right)"})]})})}),x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:"hf-loader-grad-left",x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"#06E3FA"}),x.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),x.jsxs("linearGradient",{id:"hf-loader-grad-right",x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"#06E3FA"}),x.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}),x.jsx("div",{className:"hf-loader-title",children:n}),e&&x.jsx("div",{className:"hf-loader-detail",children:e}),l!==void 0&&x.jsx("div",{className:"hf-loader-progress","aria-hidden":"true",children:x.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${l})`}})}),t&&x.jsx("div",{className:"hf-loader-mono",children:t})]})}function Km(n){return typeof n=="object"&&n!==null}function ov(n){if(!(n instanceof CustomEvent))return null;const e=n.detail;if(!Km(e))return null;const t=e.state;return Km(t)?t.loading===!0&&t.ready!==!0:null}function Jm(n,e){try{const t=n.contentWindow,r=n.contentDocument;if(!t||!r)return e;for(const l of r.querySelectorAll("video, audio"))if(l instanceof HTMLMediaElement&&l.readyState<HTMLMediaElement.HAVE_FUTURE_DATA)return!0;const i=t.__hfLottie;if(i!=null&&i.length){for(const l of i)if(!tv(l))return!0}return!1}catch{return e}}const qg=d.forwardRef(({projectId:n,directUrl:e,onLoad:t,portrait:r},i)=>{const l=d.useRef(null),o=d.useRef(0),c=d.useRef(null),u=d.useRef(null),[f,m]=d.useState(!1),[O,y]=d.useState(!1),[S,w]=d.useState(!1),[b,Q]=d.useState(!1);Vt(()=>{const E=l.current;if(!E)return;let P=!1,M;return ev(()=>import("./hyperframes-player-CoI5h1xv.js"),[]).then(()=>{if(P)return;const C=document.createElement("hyperframes-player"),X=e||`/api/projects/${n}/preview`;C.setAttribute("shader-capture-scale","1"),C.setAttribute("shader-loading","player"),C.setAttribute("src",X),C.setAttribute("width",String(r?1080:1920)),C.setAttribute("height",String(r?1920:1080)),C.style.width="100%",C.style.height="100%",C.style.display="block",E.appendChild(C);const Z=C.iframeElement;typeof i=="function"?i(Z):i&&(i.current=Z);const H=se=>se.stopImmediatePropagation();C.addEventListener("click",H,{capture:!0});const Y=se=>{const oe=ov(se);oe!==null&&Q(oe)};C.addEventListener("shadertransitionstate",Y);const J=()=>{if(o.current++,Q(!1),o.current>1){E.classList.remove("preview-revealing"),E.offsetWidth,E.classList.add("preview-revealing");const oe=()=>E.classList.remove("preview-revealing");E.addEventListener("animationend",oe,{once:!0})}t(),c.current&&clearInterval(c.current);let se=Jm(Z,!1);if(se){m(!0);let oe=0;c.current=setInterval(()=>{oe+=1,se=Jm(Z,se),(!se||oe>100)&&(c.current&&clearInterval(c.current),c.current=null,m(!1),se&&console.debug("[Player] Asset-loading overlay timed out after 10s; hiding anyway. Check network or asset integrity."))},100)}else m(!1)};Z.addEventListener("load",J),M=()=>{Z.removeEventListener("load",J),C.removeEventListener("click",H,{capture:!0}),C.removeEventListener("shadertransitionstate",Y),c.current&&clearInterval(c.current),c.current=null,E.removeChild(C),typeof i=="function"?i(null):i&&(i.current=null)}}),()=>{P=!0,M==null||M()}}),d.useEffect(()=>{if(u.current&&(clearTimeout(u.current),u.current=null),f){y(!0),w(!1);return}return w(!0),u.current=setTimeout(()=>{y(!1),w(!1),u.current=null},240),()=>{u.current&&(clearTimeout(u.current),u.current=null)}},[f]);const T=O&&!b;return x.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden bg-black flex items-center justify-center",children:[x.jsx("div",{ref:l,className:"w-full h-full"}),T&&x.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:S?0:1,pointerEvents:S?"none":"auto",transition:"opacity 240ms ease-out"},onDragStart:E=>E.preventDefault(),onMouseDown:E=>E.preventDefault(),onPointerDown:E=>E.preventDefault(),children:x.jsx(lv,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56})})]})});qg.displayName="Player";const ea=30;function Dn(n){if(!Number.isFinite(n)||n<0)return"0:00";const e=Math.floor(n/60),t=Math.floor(n%60);return`${e}:${t.toString().padStart(2,"0")}`}function wf(n,e=ea){return!Number.isFinite(n)||n<=0||!Number.isFinite(e)||e<=0?0:Math.round(n*e)}function Ug(n,e=ea){return!Number.isFinite(n)||n<=0||!Number.isFinite(e)||e<=0?0:n/e}function kf(n,e,t=ea){const r=wf(n,t),i=Math.max(0,r+e);return Ug(i,t)}function e2(n,e,t=ea){const r=wf(n,t),i=wf(e,t);return`${r}f / ${i}f`}const t2=n=>{let e;const t=new Set,r=(f,m)=>{const O=typeof f=="function"?f(e):f;if(!Object.is(O,e)){const y=e;e=m??(typeof O!="object"||O===null)?O:Object.assign({},e,O),t.forEach(S=>S(e,y))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(t.add(f),()=>t.delete(f))},u=e=n(r,i,c);return c},av=(n=>n?t2(n):t2),cv=n=>n;function uv(n,e=cv){const t=uc.useSyncExternalStore(n.subscribe,uc.useCallback(()=>e(n.getState()),[n,e]),uc.useCallback(()=>e(n.getInitialState()),[n,e]));return uc.useDebugValue(t),t}const n2=n=>{const e=av(n),t=r=>uv(e,r);return Object.assign(t,e),t},Gg=(n=>n?n2(n):n2),Zh=new Set,vi={notify:n=>Zh.forEach(e=>e(n)),subscribe:n=>(Zh.add(n),()=>Zh.delete(n))},Ce=Gg(n=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,playbackRate:1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,setIsPlaying:e=>n({isPlaying:e}),setPlaybackRate:e=>n({playbackRate:e}),setLoopEnabled:e=>n({loopEnabled:e}),setZoomMode:e=>n({zoomMode:e}),setManualZoomPercent:e=>n({manualZoomPercent:Math.max(10,Math.min(2e3,Math.round(e)))}),setCurrentTime:e=>n({currentTime:Number.isFinite(e)?e:0}),setDuration:e=>n({duration:Number.isFinite(e)?e:0}),setTimelineReady:e=>n({timelineReady:e}),setElements:e=>n({elements:e}),setSelectedElementId:e=>n({selectedElementId:e}),updateElement:(e,t)=>n(r=>({elements:r.elements.map(i=>(i.key??i.id)===e?{...i,...t}:i)})),reset:()=>n({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null})})),hv=[.25,.5,1,1.5,2],fv=8,dv=[{key:"J",label:"Play backward"},{key:"K",label:"Stop playback"},{key:"L",label:"Play forward"},{key:"←/→",label:"Step one frame backward or forward"}];function pv(n,e,t){if(!Number.isFinite(t)||t<=0)return 0;const r=(n-e)/t,i=Math.max(0,Math.min(1,r)),l=Math.min(.5,fv/t);return i<=l?0:i>=1-l?1:i}const mv=d.memo(function({onTogglePlay:e,onSeek:t}){const r=Ce(U=>U.isPlaying),i=Ce(U=>U.duration),l=Ce(U=>U.timelineReady),o=Ce(U=>U.playbackRate),c=Ce(U=>U.loopEnabled),u=Ce.getState().setPlaybackRate,f=Ce.getState().setLoopEnabled,[m,O]=d.useState(!1),[y,S]=d.useState("time"),[w,b]=d.useState(""),Q=d.useRef(null),T=d.useRef(null),E=d.useRef(null),P=d.useRef(null),M=d.useRef(null),C=d.useRef(null),X=d.useRef(!1),Z=d.useRef(0),H=d.useRef(y);H.current=y;const Y=d.useRef(i);Y.current=i,Vt(()=>{const U=ne=>{Z.current=ne;const ee=Y.current,$=ee>0?Math.min(100,ne/ee*100):0;Q.current&&(Q.current.style.width=`${$}%`),T.current&&(T.current.style.left=`${$}%`),E.current&&(E.current.textContent=H.current==="frame"?e2(ne,ee):Dn(ne)),M.current&&M.current.setAttribute("aria-valuenow",String(Math.round(ne)))},me=vi.subscribe(U);U(Ce.getState().currentTime);const B=setInterval(()=>{const ne=Ce.getState().currentTime,ee=Ce.getState().duration;if(ee>0&&ne>0){const $=Math.min(100,ne/ee*100);Q.current&&(Q.current.style.width=`${$}%`),T.current&&(T.current.style.left=`${$}%`)}},500);return()=>{me(),clearInterval(B)}}),d.useEffect(()=>{if(!E.current)return;const U=Z.current;E.current.textContent=y==="frame"?e2(U,i):Dn(U)},[i,y]),d.useEffect(()=>{if(!m)return;const U=me=>{C.current&&!C.current.contains(me.target)&&O(!1)};return document.addEventListener("mousedown",U),()=>{document.removeEventListener("mousedown",U)}},[m]);const J=d.useCallback(U=>{const me=P.current;if(!me||i<=0)return;const B=me.getBoundingClientRect(),ne=pv(U,B.left,B.width),ee=ne*100;Q.current&&(Q.current.style.width=`${ee}%`),T.current&&(T.current.style.left=`${ee}%`),t(ne*i)},[i,t]),se=d.useCallback(U=>{if(U.button!==0)return;U.preventDefault(),U.currentTarget.focus(),X.current=!0;const me=U.currentTarget,B=U.pointerId;try{me.setPointerCapture(B)}catch{}J(U.clientX);const ne=ce=>{ce.pointerId===B&&X.current&&J(ce.clientX)},ee=()=>{X.current=!1;try{me.releasePointerCapture(B)}catch{}me.removeEventListener("pointermove",ne),me.removeEventListener("pointerup",$),me.removeEventListener("pointercancel",$),window.removeEventListener("pointerup",$),window.removeEventListener("pointercancel",$),document.removeEventListener("visibilitychange",_),window.removeEventListener("blur",ee)},$=ce=>{ce.pointerId===B&&ee()},_=()=>{document.visibilityState==="hidden"&&ee()};me.addEventListener("pointermove",ne),me.addEventListener("pointerup",$),me.addEventListener("pointercancel",$),window.addEventListener("pointerup",$),window.addEventListener("pointercancel",$),document.addEventListener("visibilitychange",_),window.addEventListener("blur",ee)},[J]),oe=d.useCallback(U=>{if(!l||i<=0)return;const me=U.shiftKey?10:1;U.key==="ArrowLeft"?(U.preventDefault(),t(kf(Z.current,-me))):U.key==="ArrowRight"&&(U.preventDefault(),t(Math.min(i,kf(Z.current,me))))},[l,i,t]),ye=d.useCallback(()=>{const U=Number.parseInt(w,10);!Number.isFinite(U)||i<=0||t(Math.min(i,Ug(Math.max(0,U))))},[i,w,t]),je=d.useCallback(U=>{U.preventDefault(),ye()},[ye]),_e=d.useCallback(U=>{U.key==="Enter"&&(U.preventDefault(),ye())},[ye]);return x.jsxs("div",{className:"px-4 py-2 flex flex-wrap items-center gap-x-2 gap-y-1",style:{borderTop:"1px solid rgba(255,255,255,0.04)",paddingBottom:"calc(0.5rem + env(safe-area-inset-bottom))"},children:[x.jsx("button",{type:"button","aria-label":r?"Pause":"Play",onClick:e,disabled:!l,className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg disabled:opacity-30 disabled:pointer-events-none transition-colors",style:{background:"rgba(255,255,255,0.06)"},children:r?x.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:[x.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),x.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]}):x.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:x.jsx("polygon",{points:"6,3 20,12 6,21"})})}),x.jsxs("span",{className:"font-mono text-[11px] tabular-nums flex-shrink-0 w-[118px]",style:{color:"#A1A1AA"},children:[x.jsx("span",{ref:E,children:Dn(0)}),y==="time"?x.jsxs(x.Fragment,{children:[x.jsx("span",{style:{color:"#3F3F46",margin:"0 2px"},children:"/"}),x.jsx("span",{style:{color:"#52525B"},children:Dn(i)})]}):null]}),x.jsx("div",{ref:U=>{P.current=U,M.current=U},role:"slider",tabIndex:0,"aria-label":"Seek","aria-valuemin":0,"aria-valuemax":Math.round(i),"aria-valuenow":0,className:"min-w-[96px] flex-1 h-6 flex items-center cursor-pointer group",style:{touchAction:"none"},onPointerDown:se,onKeyDown:oe,children:x.jsxs("div",{className:"w-full rounded-full relative",style:{background:"rgba(255,255,255,0.15)",height:"3px"},children:[x.jsx("div",{ref:Q,className:"absolute top-0 bottom-0 left-0 z-[1] rounded-full",style:{background:"linear-gradient(90deg, var(--hf-accent, #3CE6AC), #2BBFA0)"}}),x.jsx("div",{ref:T,className:"absolute top-1/2 z-[2] w-3 h-3 rounded-full -translate-y-1/2 -translate-x-1/2 transition-transform group-hover:scale-125",style:{background:"var(--hf-accent, #3CE6AC)",boxShadow:"0 0 6px rgba(60,230,172,0.4), 0 1px 4px rgba(0,0,0,0.4)"}})]})}),x.jsxs("div",{ref:C,className:"relative flex-shrink-0",children:[x.jsx("button",{type:"button",onClick:()=>O(U=>!U),className:"w-10 px-2 py-1 rounded-md text-[10px] font-mono tabular-nums transition-colors",style:{color:"#71717A",background:"rgba(255,255,255,0.04)"},children:o===1?"1x":`${o}x`}),m&&x.jsx("div",{className:"absolute bottom-full right-0 mb-1.5 rounded-lg shadow-xl z-50 min-w-[56px] overflow-hidden",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)"},children:hv.map(U=>x.jsxs("button",{onClick:()=>{u(U),O(!1)},className:"block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors",style:{color:U===o?"#FAFAFA":"#71717A",background:U===o?"rgba(255,255,255,0.06)":"transparent"},onMouseEnter:me=>{U!==o&&(me.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:me=>{U!==o&&(me.currentTarget.style.background="transparent")},children:[U,"x"]},U))})]}),x.jsx("button",{type:"button",onClick:()=>f(!c),className:`h-7 w-14 rounded-md border px-2 text-[10px] font-medium transition-colors ${c?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"}`,title:"Loop playback","aria-label":c?"Disable loop playback":"Enable loop playback","aria-pressed":c,children:"Loop"}),x.jsx("button",{type:"button",onClick:()=>S(U=>U==="time"?"frame":"time"),className:"h-7 w-14 rounded-md border border-neutral-700 px-2 text-[10px] font-mono text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800",title:"Toggle time/frame display","aria-label":"Toggle time and frame display",children:y==="time"?"m:ss":"frames"}),x.jsx("form",{onSubmit:je,className:"hidden sm:flex flex-shrink-0 w-[58px] items-center",children:x.jsx("input",{value:w,onChange:U=>b(U.target.value),inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame",className:"h-7 w-[58px] rounded-md border border-neutral-700 bg-neutral-900 px-2 text-[10px] font-mono tabular-nums text-neutral-200 outline-none transition-colors placeholder:text-neutral-600 focus:border-studio-accent/60",onKeyDown:_e,onBlur:ye})}),x.jsx("div",{className:"hidden lg:flex items-center gap-1 text-[9px] font-mono text-neutral-500","aria-label":"Playback shortcuts: J backward, K stop, L forward, arrows step one frame",children:dv.map(U=>x.jsxs("span",{className:"group relative rounded border border-neutral-800 px-1 py-0.5",children:[U.key,x.jsx("span",{className:"pointer-events-none absolute bottom-full left-1/2 z-50 mb-1.5 hidden -translate-x-1/2 whitespace-nowrap rounded-md border border-neutral-700 bg-neutral-950 px-2 py-1 font-sans text-[10px] text-neutral-200 shadow-lg group-hover:block",children:U.label})]},U.key))})]})}),r2="#3CE6AC",Ov="#E9FFF6",gv="rgba(60,230,172,0.12)";function Br(){return{clip:r2,accent:r2,label:Ov,iconBackground:gv}}const i2={video:Br(),audio:Br(),img:Br(),div:Br(),span:Br(),p:Br(),h1:Br(),section:Br(),sfx:Br()},yv=Br(),Kg={shellBackground:"#0A0A0B",shellBorder:"rgba(255,255,255,0.05)",rulerBorder:"rgba(255,255,255,0.045)",rowBackground:"#0A0A0B",rowBorder:"rgba(255,255,255,0.05)",gutterBackground:"#0A0A0B",gutterBorder:"rgba(255,255,255,0.05)",textPrimary:"#E8EDF5",textSecondary:"#8391A8",tickText:"rgba(131,145,168,0.92)",tickMajor:"rgba(255,255,255,0.13)",tickMinor:"rgba(255,255,255,0.08)",clipBackground:"linear-gradient(180deg, rgba(20,25,34,0.98), rgba(14,18,27,0.98))",clipBackgroundActive:"linear-gradient(180deg, rgba(24,30,40,0.99), rgba(15,20,29,0.99))",clipBorder:"rgba(255,255,255,0.07)",clipBorderHover:"rgba(255,255,255,0.11)",clipBorderActive:"rgba(255,255,255,0.14)",clipShadow:"inset 0 1px 0 rgba(255,255,255,0.03), 0 6px 18px rgba(0,0,0,0.18)",clipShadowHover:"inset 0 1px 0 rgba(255,255,255,0.035), 0 8px 20px rgba(0,0,0,0.2)",clipShadowActive:"inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.035)",clipShadowDragging:"inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 36px rgba(0,0,0,0.34), 0 8px 16px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.04)",handleColor:"rgba(255,255,255,0.11)",panelResizeSeam:"rgba(255,255,255,0.12)",panelResizeActive:"rgba(255,255,255,0.24)",clipRadius:"11px 15px 13px 9px / 10px 14px 12px 10px"};function xv(n){const e=n.toLowerCase();return e.startsWith("h")&&e.length===2&&"123456".includes(e[1]??"")?i2.h1:i2[e]??yv}function vv({isHovered:n,isSelected:e,isDragging:t}){return t?.95:e?.82:n?.76:0}function Sv({element:n,draggedElementId:e,previewStart:t,previewTrack:r}){return(n.key??n.id)!==e||t===null||r===null?n:{...n,start:t,track:r}}const s2=100;function cl(n){return Math.round(n*s2)/s2}function Xo(n,e,t){return Math.min(Math.max(n,e),t)}const l2=.55,fc=40,o2=12;function a2(n,e,t){const r=(i,l,o)=>{if(o<i+fc){const c=Math.max(0,1-(o-i)/fc);return-Math.round(o2*c)}if(o>l-fc){const c=Math.max(0,1-(l-o)/fc);return Math.round(o2*c)}return 0};return{x:r(n.left,n.right,e),y:r(n.top,n.bottom,t)}}function wv(n,e,t){const r=(n.currentScrollLeft??0)-(n.originScrollLeft??0),i=(n.currentScrollTop??0)-(n.originScrollTop??0),l=(e-n.originClientX+r)/Math.max(n.pixelsPerSecond,1),o=(t-n.originClientY+i)/Math.max(n.trackHeight,1),c=Math.round(o),u=Math.max(0,n.trackOrder.indexOf(n.track)),f=u+c,m=Xo(f,0,Math.max(0,n.trackOrder.length-1)),O=Math.min(...n.trackOrder),y=Math.max(...n.trackOrder);let S=n.trackOrder[m]??n.track;const w=u===0,b=u===n.trackOrder.length-1;return w&&f<0&&u+o<=-l2?S=O-1:b&&f>n.trackOrder.length-1&&u+o>=n.trackOrder.length-1+l2&&(S=y+1),{start:Xo(cl(n.start+l),0,Math.max(0,n.maxStart)),track:S}}function Eh(n){const e=Array.from(new Set(n)).sort((r,i)=>r-i),t=e.length;return new Map(e.map((r,i)=>[r,t-i]))}function kv(n,e,t){const r=Math.max(.05,n.minDuration??.1),i=(t-n.originClientX)/Math.max(n.pixelsPerSecond,1);if(e==="end"){const S=Xo(cl(n.duration+i),r,Math.max(r,n.maxEnd-n.start));return{start:n.start,duration:S,playbackStart:n.playbackStart}}const l=Math.max(.1,n.playbackRate??1),o=n.playbackStart!=null?n.playbackStart/l:Number.POSITIVE_INFINITY,c=-Math.min(n.start-n.minStart,o),u=n.duration-r,f=Xo(i,c,u),m=cl(n.start+f),O=cl(n.duration-f),y=n.playbackStart!=null?cl(Math.max(0,n.playbackStart+f*l)):void 0;return{start:m,duration:O,playbackStart:y}}function bv(n){if(n.compositionSrc||n.playbackStartAttr!=null||n.sourceDuration!=null&&Number.isFinite(n.sourceDuration)&&n.sourceDuration>0)return!0;const e=n.tag.toLowerCase();return["video","audio","img"].includes(e)}function Qv(n){return!!(n.domId||n.selector)}function $v(n){if(n.playbackStartAttr!=null||n.playbackStart!=null)return!0;const e=n.tag.toLowerCase();return["video","audio"].includes(e)}function Jg(n){const e=Qv(n),t=Number.isFinite(n.duration)&&n.duration>0,r=bv(n);return{canMove:e&&r,canTrimEnd:e&&t&&r,canTrimStart:e&&t&&$v(n)}}function Pv(n){if(n.capabilities.canMove)return null;const e=Math.max(0,n.width),t=Xo(n.offsetX,0,e),r=Math.max(0,n.handleWidth);return t<=r&&!n.capabilities.canTrimStart?"resize-start":t>=Math.max(0,e-r)&&!n.capabilities.canTrimEnd?"resize-end":"move"}function Av(n,e){return{start:n.start,end:n.start+n.duration,anchorX:e.anchorX,anchorY:e.anchorY}}function Cv({rangeStart:n,rangeEnd:e,elements:t,prompt:r}){const i=Math.min(n,e),l=Math.max(n,e),o=t.map(c=>`- #${c.id} (${c.tag}) — ${Dn(c.start)} to ${Dn(c.start+c.duration)}, track ${c.track}`).join(`
40
+ `+v.stack}return{value:s,source:a,stack:g,digest:null}}function G0(s,a,h){return{value:s,source:null,stack:h??null,digest:a??null}}function K0(s,a){try{console.error(a.value)}catch(h){setTimeout(function(){throw h})}}var Ox=typeof WeakMap=="function"?WeakMap:Map;function Gp(s,a,h){h=mi(-1,h),h.tag=3,h.payload={element:null};var p=a.value;return h.callback=function(){Ua||(Ua=!0,dh=p),K0(s,a)},h}function Kp(s,a,h){h=mi(-1,h),h.tag=3;var p=s.type.getDerivedStateFromError;if(typeof p=="function"){var g=a.value;h.payload=function(){return p(g)},h.callback=function(){K0(s,a)}}var v=s.stateNode;return v!==null&&typeof v.componentDidCatch=="function"&&(h.callback=function(){K0(s,a),typeof p!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var k=a.stack;this.componentDidCatch(a.value,{componentStack:k!==null?k:""})}),h}function Jp(s,a,h){var p=s.pingCache;if(p===null){p=s.pingCache=new Ox;var g=new Set;p.set(a,g)}else g=p.get(a),g===void 0&&(g=new Set,p.set(a,g));g.has(h)||(g.add(h),s=Tx.bind(null,s,a,h),a.then(s,s))}function em(s){do{var a;if((a=s.tag===13)&&(a=s.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return s;s=s.return}while(s!==null);return null}function tm(s,a,h,p,g){return(s.mode&1)===0?(s===a?s.flags|=65536:(s.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(a=mi(-1,1),a.tag=2,_i(h,a,1))),h.lanes|=1),s):(s.flags|=65536,s.lanes=g,s)}var gx=M.ReactCurrentOwner,Vn=!1;function Pn(s,a,h,p){a.child=s===null?Sp(a,null,h,p):qs(a,s.child,h,p)}function nm(s,a,h,p,g){h=h.render;var v=a.ref;return Gs(a,g),p=I0(s,a,h,p,v,g),h=H0(),s!==null&&!Vn?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~g,Oi(s,a,g)):(Pt&&h&&$0(a),a.flags|=1,Pn(s,a,p,g),a.child)}function rm(s,a,h,p,g){if(s===null){var v=h.type;return typeof v=="function"&&!vh(v)&&v.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(a.tag=15,a.type=v,im(s,a,v,p,g)):(s=nc(h.type,null,p,a,a.mode,g),s.ref=a.ref,s.return=a,a.child=s)}if(v=s.child,(s.lanes&g)===0){var k=v.memoizedProps;if(h=h.compare,h=h!==null?h:Ul,h(k,p)&&s.ref===a.ref)return Oi(s,a,g)}return a.flags|=1,s=Fi(v,p),s.ref=a.ref,s.return=a,a.child=s}function im(s,a,h,p,g){if(s!==null){var v=s.memoizedProps;if(Ul(v,p)&&s.ref===a.ref)if(Vn=!1,a.pendingProps=p=v,(s.lanes&g)!==0)(s.flags&131072)!==0&&(Vn=!0);else return a.lanes=s.lanes,Oi(s,a,g)}return J0(s,a,h,p,g)}function sm(s,a,h){var p=a.pendingProps,g=p.children,v=s!==null?s.memoizedState:null;if(p.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},vt(tl,Kn),Kn|=h;else{if((h&1073741824)===0)return s=v!==null?v.baseLanes|h:h,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:s,cachePool:null,transitions:null},a.updateQueue=null,vt(tl,Kn),Kn|=s,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=v!==null?v.baseLanes:h,vt(tl,Kn),Kn|=p}else v!==null?(p=v.baseLanes|h,a.memoizedState=null):p=h,vt(tl,Kn),Kn|=p;return Pn(s,a,g,h),a.child}function lm(s,a){var h=a.ref;(s===null&&h!==null||s!==null&&s.ref!==h)&&(a.flags|=512,a.flags|=2097152)}function J0(s,a,h,p,g){var v=jn(h)?hs:gn.current;return v=Ws(a,v),Gs(a,g),h=I0(s,a,h,p,v,g),p=H0(),s!==null&&!Vn?(a.updateQueue=s.updateQueue,a.flags&=-2053,s.lanes&=~g,Oi(s,a,g)):(Pt&&p&&$0(a),a.flags|=1,Pn(s,a,h,g),a.child)}function om(s,a,h,p,g){if(jn(h)){var v=!0;Pa(a)}else v=!1;if(Gs(a,g),a.stateNode===null)Wa(s,a),qp(a,h,p),U0(a,h,p,g),p=!0;else if(s===null){var k=a.stateNode,A=a.memoizedProps;k.props=A;var V=k.context,W=h.contextType;typeof W=="object"&&W!==null?W=ur(W):(W=jn(h)?hs:gn.current,W=Ws(a,W));var ae=h.getDerivedStateFromProps,fe=typeof ae=="function"||typeof k.getSnapshotBeforeUpdate=="function";fe||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(A!==p||V!==W)&&Up(a,k,p,W),Xi=!1;var le=a.memoizedState;k.state=le,Ra(a,p,k,g),V=a.memoizedState,A!==p||le!==V||En.current||Xi?(typeof ae=="function"&&(q0(a,h,ae,p),V=a.memoizedState),(A=Xi||Bp(a,h,A,p,le,V,W))?(fe||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(a.flags|=4194308)):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=p,a.memoizedState=V),k.props=p,k.state=V,k.context=W,p=A):(typeof k.componentDidMount=="function"&&(a.flags|=4194308),p=!1)}else{k=a.stateNode,kp(s,a),A=a.memoizedProps,W=a.type===a.elementType?A:Qr(a.type,A),k.props=W,fe=a.pendingProps,le=k.context,V=h.contextType,typeof V=="object"&&V!==null?V=ur(V):(V=jn(h)?hs:gn.current,V=Ws(a,V));var we=h.getDerivedStateFromProps;(ae=typeof we=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(A!==fe||le!==V)&&Up(a,k,p,V),Xi=!1,le=a.memoizedState,k.state=le,Ra(a,p,k,g);var Ae=a.memoizedState;A!==fe||le!==Ae||En.current||Xi?(typeof we=="function"&&(q0(a,h,we,p),Ae=a.memoizedState),(W=Xi||Bp(a,h,W,p,le,Ae,V)||!1)?(ae||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(p,Ae,V),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(p,Ae,V)),typeof k.componentDidUpdate=="function"&&(a.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof k.componentDidUpdate!="function"||A===s.memoizedProps&&le===s.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&le===s.memoizedState||(a.flags|=1024),a.memoizedProps=p,a.memoizedState=Ae),k.props=p,k.state=Ae,k.context=V,p=W):(typeof k.componentDidUpdate!="function"||A===s.memoizedProps&&le===s.memoizedState||(a.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&le===s.memoizedState||(a.flags|=1024),p=!1)}return eh(s,a,h,p,v,g)}function eh(s,a,h,p,g,v){lm(s,a);var k=(a.flags&128)!==0;if(!p&&!k)return g&&fp(a,h,!1),Oi(s,a,v);p=a.stateNode,gx.current=a;var A=k&&typeof h.getDerivedStateFromError!="function"?null:p.render();return a.flags|=1,s!==null&&k?(a.child=qs(a,s.child,null,v),a.child=qs(a,null,A,v)):Pn(s,a,A,v),a.memoizedState=p.state,g&&fp(a,h,!0),a.child}function am(s){var a=s.stateNode;a.pendingContext?up(s,a.pendingContext,a.pendingContext!==a.context):a.context&&up(s,a.context,!1),L0(s,a.containerInfo)}function cm(s,a,h,p,g){return Bs(),T0(g),a.flags|=256,Pn(s,a,h,p),a.child}var th={dehydrated:null,treeContext:null,retryLane:0};function nh(s){return{baseLanes:s,cachePool:null,transitions:null}}function um(s,a,h){var p=a.pendingProps,g=Mt.current,v=!1,k=(a.flags&128)!==0,A;if((A=k)||(A=s!==null&&s.memoizedState===null?!1:(g&2)!==0),A?(v=!0,a.flags&=-129):(s===null||s.memoizedState!==null)&&(g|=1),vt(Mt,g&1),s===null)return C0(a),s=a.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((a.mode&1)===0?a.lanes=1:s.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(k=p.children,s=p.fallback,v?(p=a.mode,v=a.child,k={mode:"hidden",children:k},(p&1)===0&&v!==null?(v.childLanes=0,v.pendingProps=k):v=rc(k,p,0,null),s=Ss(s,p,h,null),v.return=a,s.return=a,v.sibling=s,a.child=v,a.child.memoizedState=nh(h),a.memoizedState=th,s):rh(a,k));if(g=s.memoizedState,g!==null&&(A=g.dehydrated,A!==null))return yx(s,a,k,p,A,g,h);if(v){v=p.fallback,k=a.mode,g=s.child,A=g.sibling;var V={mode:"hidden",children:p.children};return(k&1)===0&&a.child!==g?(p=a.child,p.childLanes=0,p.pendingProps=V,a.deletions=null):(p=Fi(g,V),p.subtreeFlags=g.subtreeFlags&14680064),A!==null?v=Fi(A,v):(v=Ss(v,k,h,null),v.flags|=2),v.return=a,p.return=a,p.sibling=v,a.child=p,p=v,v=a.child,k=s.child.memoizedState,k=k===null?nh(h):{baseLanes:k.baseLanes|h,cachePool:null,transitions:k.transitions},v.memoizedState=k,v.childLanes=s.childLanes&~h,a.memoizedState=th,p}return v=s.child,s=v.sibling,p=Fi(v,{mode:"visible",children:p.children}),(a.mode&1)===0&&(p.lanes=h),p.return=a,p.sibling=null,s!==null&&(h=a.deletions,h===null?(a.deletions=[s],a.flags|=16):h.push(s)),a.child=p,a.memoizedState=null,p}function rh(s,a){return a=rc({mode:"visible",children:a},s.mode,0,null),a.return=s,s.child=a}function Ha(s,a,h,p){return p!==null&&T0(p),qs(a,s.child,null,h),s=rh(a,a.pendingProps.children),s.flags|=2,a.memoizedState=null,s}function yx(s,a,h,p,g,v,k){if(h)return a.flags&256?(a.flags&=-257,p=G0(Error(t(422))),Ha(s,a,k,p)):a.memoizedState!==null?(a.child=s.child,a.flags|=128,null):(v=p.fallback,g=a.mode,p=rc({mode:"visible",children:p.children},g,0,null),v=Ss(v,g,k,null),v.flags|=2,p.return=a,v.return=a,p.sibling=v,a.child=p,(a.mode&1)!==0&&qs(a,s.child,null,k),a.child.memoizedState=nh(k),a.memoizedState=th,v);if((a.mode&1)===0)return Ha(s,a,k,null);if(g.data==="$!"){if(p=g.nextSibling&&g.nextSibling.dataset,p)var A=p.dgst;return p=A,v=Error(t(419)),p=G0(v,p,void 0),Ha(s,a,k,p)}if(A=(k&s.childLanes)!==0,Vn||A){if(p=sn,p!==null){switch(k&-k){case 4:g=2;break;case 16:g=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(p.suspendedLanes|k))!==0?0:g,g!==0&&g!==v.retryLane&&(v.retryLane=g,pi(s,g),Ar(p,s,g,-1))}return xh(),p=G0(Error(t(421))),Ha(s,a,k,p)}return g.data==="$?"?(a.flags|=128,a.child=s.child,a=Mx.bind(null,s),g._reactRetry=a,null):(s=v.treeContext,Gn=Vi(g.nextSibling),Un=a,Pt=!0,br=null,s!==null&&(ar[cr++]=fi,ar[cr++]=di,ar[cr++]=fs,fi=s.id,di=s.overflow,fs=a),a=rh(a,p.children),a.flags|=4096,a)}function hm(s,a,h){s.lanes|=a;var p=s.alternate;p!==null&&(p.lanes|=a),j0(s.return,a,h)}function ih(s,a,h,p,g){var v=s.memoizedState;v===null?s.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:p,tail:h,tailMode:g}:(v.isBackwards=a,v.rendering=null,v.renderingStartTime=0,v.last=p,v.tail=h,v.tailMode=g)}function fm(s,a,h){var p=a.pendingProps,g=p.revealOrder,v=p.tail;if(Pn(s,a,p.children,h),p=Mt.current,(p&2)!==0)p=p&1|2,a.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=a.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&hm(s,h,a);else if(s.tag===19)hm(s,h,a);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===a)break e;for(;s.sibling===null;){if(s.return===null||s.return===a)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}p&=1}if(vt(Mt,p),(a.mode&1)===0)a.memoizedState=null;else switch(g){case"forwards":for(h=a.child,g=null;h!==null;)s=h.alternate,s!==null&&La(s)===null&&(g=h),h=h.sibling;h=g,h===null?(g=a.child,a.child=null):(g=h.sibling,h.sibling=null),ih(a,!1,g,h,v);break;case"backwards":for(h=null,g=a.child,a.child=null;g!==null;){if(s=g.alternate,s!==null&&La(s)===null){a.child=g;break}s=g.sibling,g.sibling=h,h=g,g=s}ih(a,!0,h,null,v);break;case"together":ih(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Wa(s,a){(a.mode&1)===0&&s!==null&&(s.alternate=null,a.alternate=null,a.flags|=2)}function Oi(s,a,h){if(s!==null&&(a.dependencies=s.dependencies),gs|=a.lanes,(h&a.childLanes)===0)return null;if(s!==null&&a.child!==s.child)throw Error(t(153));if(a.child!==null){for(s=a.child,h=Fi(s,s.pendingProps),a.child=h,h.return=a;s.sibling!==null;)s=s.sibling,h=h.sibling=Fi(s,s.pendingProps),h.return=a;h.sibling=null}return a.child}function xx(s,a,h){switch(a.tag){case 3:am(a),Bs();break;case 5:$p(a);break;case 1:jn(a.type)&&Pa(a);break;case 4:L0(a,a.stateNode.containerInfo);break;case 10:var p=a.type._context,g=a.memoizedProps.value;vt(Ea,p._currentValue),p._currentValue=g;break;case 13:if(p=a.memoizedState,p!==null)return p.dehydrated!==null?(vt(Mt,Mt.current&1),a.flags|=128,null):(h&a.child.childLanes)!==0?um(s,a,h):(vt(Mt,Mt.current&1),s=Oi(s,a,h),s!==null?s.sibling:null);vt(Mt,Mt.current&1);break;case 19:if(p=(h&a.childLanes)!==0,(s.flags&128)!==0){if(p)return fm(s,a,h);a.flags|=128}if(g=a.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),vt(Mt,Mt.current),p)break;return null;case 22:case 23:return a.lanes=0,sm(s,a,h)}return Oi(s,a,h)}var dm,sh,pm,mm;dm=function(s,a){for(var h=a.child;h!==null;){if(h.tag===5||h.tag===6)s.appendChild(h.stateNode);else if(h.tag!==4&&h.child!==null){h.child.return=h,h=h.child;continue}if(h===a)break;for(;h.sibling===null;){if(h.return===null||h.return===a)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},sh=function(){},pm=function(s,a,h,p){var g=s.memoizedProps;if(g!==p){s=a.stateNode,ms(Dr.current);var v=null;switch(h){case"input":g=Ye(s,g),p=Ye(s,p),v=[];break;case"select":g=ee({},g,{value:void 0}),p=ee({},p,{value:void 0}),v=[];break;case"textarea":g=nt(s,g),p=nt(s,p),v=[];break;default:typeof g.onClick!="function"&&typeof p.onClick=="function"&&(s.onclick=ba)}vr(h,p);var k;h=null;for(W in g)if(!p.hasOwnProperty(W)&&g.hasOwnProperty(W)&&g[W]!=null)if(W==="style"){var A=g[W];for(k in A)A.hasOwnProperty(k)&&(h||(h={}),h[k]="")}else W!=="dangerouslySetInnerHTML"&&W!=="children"&&W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&W!=="autoFocus"&&(i.hasOwnProperty(W)?v||(v=[]):(v=v||[]).push(W,null));for(W in p){var V=p[W];if(A=g!=null?g[W]:void 0,p.hasOwnProperty(W)&&V!==A&&(V!=null||A!=null))if(W==="style")if(A){for(k in A)!A.hasOwnProperty(k)||V&&V.hasOwnProperty(k)||(h||(h={}),h[k]="");for(k in V)V.hasOwnProperty(k)&&A[k]!==V[k]&&(h||(h={}),h[k]=V[k])}else h||(v||(v=[]),v.push(W,h)),h=V;else W==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,A=A?A.__html:void 0,V!=null&&A!==V&&(v=v||[]).push(W,V)):W==="children"?typeof V!="string"&&typeof V!="number"||(v=v||[]).push(W,""+V):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(i.hasOwnProperty(W)?(V!=null&&W==="onScroll"&&kt("scroll",s),v||A===V||(v=[])):(v=v||[]).push(W,V))}h&&(v=v||[]).push("style",h);var W=v;(a.updateQueue=W)&&(a.flags|=4)}},mm=function(s,a,h,p){h!==p&&(a.flags|=4)};function ho(s,a){if(!Pt)switch(s.tailMode){case"hidden":a=s.tail;for(var h=null;a!==null;)a.alternate!==null&&(h=a),a=a.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var p=null;h!==null;)h.alternate!==null&&(p=h),h=h.sibling;p===null?a||s.tail===null?s.tail=null:s.tail.sibling=null:p.sibling=null}}function xn(s){var a=s.alternate!==null&&s.alternate.child===s.child,h=0,p=0;if(a)for(var g=s.child;g!==null;)h|=g.lanes|g.childLanes,p|=g.subtreeFlags&14680064,p|=g.flags&14680064,g.return=s,g=g.sibling;else for(g=s.child;g!==null;)h|=g.lanes|g.childLanes,p|=g.subtreeFlags,p|=g.flags,g.return=s,g=g.sibling;return s.subtreeFlags|=p,s.childLanes=h,a}function vx(s,a,h){var p=a.pendingProps;switch(P0(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return xn(a),null;case 1:return jn(a.type)&&$a(),xn(a),null;case 3:return p=a.stateNode,Ks(),bt(En),bt(gn),_0(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(s===null||s.child===null)&&(Ma(a)?a.flags|=4:s===null||s.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,br!==null&&(Oh(br),br=null))),sh(s,a),xn(a),null;case 5:N0(a);var g=ms(lo.current);if(h=a.type,s!==null&&a.stateNode!=null)pm(s,a,h,p,g),s.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!p){if(a.stateNode===null)throw Error(t(166));return xn(a),null}if(s=ms(Dr.current),Ma(a)){p=a.stateNode,h=a.type;var v=a.memoizedProps;switch(p[zr]=a,p[to]=v,s=(a.mode&1)!==0,h){case"dialog":kt("cancel",p),kt("close",p);break;case"iframe":case"object":case"embed":kt("load",p);break;case"video":case"audio":for(g=0;g<Kl.length;g++)kt(Kl[g],p);break;case"source":kt("error",p);break;case"img":case"image":case"link":kt("error",p),kt("load",p);break;case"details":kt("toggle",p);break;case"input":Ze(p,v),kt("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!v.multiple},kt("invalid",p);break;case"textarea":It(p,v),kt("invalid",p)}vr(h,v),g=null;for(var k in v)if(v.hasOwnProperty(k)){var A=v[k];k==="children"?typeof A=="string"?p.textContent!==A&&(v.suppressHydrationWarning!==!0&&ka(p.textContent,A,s),g=["children",A]):typeof A=="number"&&p.textContent!==""+A&&(v.suppressHydrationWarning!==!0&&ka(p.textContent,A,s),g=["children",""+A]):i.hasOwnProperty(k)&&A!=null&&k==="onScroll"&&kt("scroll",p)}switch(h){case"input":ze(p),Re(p,v,!0);break;case"textarea":ze(p),Vr(p);break;case"select":case"option":break;default:typeof v.onClick=="function"&&(p.onclick=ba)}p=g,a.updateQueue=p,p!==null&&(a.flags|=4)}else{k=g.nodeType===9?g:g.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=un(h)),s==="http://www.w3.org/1999/xhtml"?h==="script"?(s=k.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof p.is=="string"?s=k.createElement(h,{is:p.is}):(s=k.createElement(h),h==="select"&&(k=s,p.multiple?k.multiple=!0:p.size&&(k.size=p.size))):s=k.createElementNS(s,h),s[zr]=a,s[to]=p,dm(s,a,!1,!1),a.stateNode=s;e:{switch(k=yt(h,p),h){case"dialog":kt("cancel",s),kt("close",s),g=p;break;case"iframe":case"object":case"embed":kt("load",s),g=p;break;case"video":case"audio":for(g=0;g<Kl.length;g++)kt(Kl[g],s);g=p;break;case"source":kt("error",s),g=p;break;case"img":case"image":case"link":kt("error",s),kt("load",s),g=p;break;case"details":kt("toggle",s),g=p;break;case"input":Ze(s,p),g=Ye(s,p),kt("invalid",s);break;case"option":g=p;break;case"select":s._wrapperState={wasMultiple:!!p.multiple},g=ee({},p,{value:void 0}),kt("invalid",s);break;case"textarea":It(s,p),g=nt(s,p),kt("invalid",s);break;default:g=p}vr(h,g),A=g;for(v in A)if(A.hasOwnProperty(v)){var V=A[v];v==="style"?Yt(s,V):v==="dangerouslySetInnerHTML"?(V=V?V.__html:void 0,V!=null&&gt(s,V)):v==="children"?typeof V=="string"?(h!=="textarea"||V!=="")&&Ft(s,V):typeof V=="number"&&Ft(s,""+V):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(i.hasOwnProperty(v)?V!=null&&v==="onScroll"&&kt("scroll",s):V!=null&&P(s,v,V,k))}switch(h){case"input":ze(s),Re(s,p,!1);break;case"textarea":ze(s),Vr(s);break;case"option":p.value!=null&&s.setAttribute("value",""+ue(p.value));break;case"select":s.multiple=!!p.multiple,v=p.value,v!=null?pt(s,!!p.multiple,v,!1):p.defaultValue!=null&&pt(s,!!p.multiple,p.defaultValue,!0);break;default:typeof g.onClick=="function"&&(s.onclick=ba)}switch(h){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return xn(a),null;case 6:if(s&&a.stateNode!=null)mm(s,a,s.memoizedProps,p);else{if(typeof p!="string"&&a.stateNode===null)throw Error(t(166));if(h=ms(lo.current),ms(Dr.current),Ma(a)){if(p=a.stateNode,h=a.memoizedProps,p[zr]=a,(v=p.nodeValue!==h)&&(s=Un,s!==null))switch(s.tag){case 3:ka(p.nodeValue,h,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&ka(p.nodeValue,h,(s.mode&1)!==0)}v&&(a.flags|=4)}else p=(h.nodeType===9?h:h.ownerDocument).createTextNode(p),p[zr]=a,a.stateNode=p}return xn(a),null;case 13:if(bt(Mt),p=a.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(Pt&&Gn!==null&&(a.mode&1)!==0&&(a.flags&128)===0)yp(),Bs(),a.flags|=98560,v=!1;else if(v=Ma(a),p!==null&&p.dehydrated!==null){if(s===null){if(!v)throw Error(t(318));if(v=a.memoizedState,v=v!==null?v.dehydrated:null,!v)throw Error(t(317));v[zr]=a}else Bs(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;xn(a),v=!1}else br!==null&&(Oh(br),br=null),v=!0;if(!v)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=h,a):(p=p!==null,p!==(s!==null&&s.memoizedState!==null)&&p&&(a.child.flags|=8192,(a.mode&1)!==0&&(s===null||(Mt.current&1)!==0?Gt===0&&(Gt=3):xh())),a.updateQueue!==null&&(a.flags|=4),xn(a),null);case 4:return Ks(),sh(s,a),s===null&&Jl(a.stateNode.containerInfo),xn(a),null;case 10:return E0(a.type._context),xn(a),null;case 17:return jn(a.type)&&$a(),xn(a),null;case 19:if(bt(Mt),v=a.memoizedState,v===null)return xn(a),null;if(p=(a.flags&128)!==0,k=v.rendering,k===null)if(p)ho(v,!1);else{if(Gt!==0||s!==null&&(s.flags&128)!==0)for(s=a.child;s!==null;){if(k=La(s),k!==null){for(a.flags|=128,ho(v,!1),p=k.updateQueue,p!==null&&(a.updateQueue=p,a.flags|=4),a.subtreeFlags=0,p=h,h=a.child;h!==null;)v=h,s=p,v.flags&=14680066,k=v.alternate,k===null?(v.childLanes=0,v.lanes=s,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=k.childLanes,v.lanes=k.lanes,v.child=k.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=k.memoizedProps,v.memoizedState=k.memoizedState,v.updateQueue=k.updateQueue,v.type=k.type,s=k.dependencies,v.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),h=h.sibling;return vt(Mt,Mt.current&1|2),a.child}s=s.sibling}v.tail!==null&&q()>nl&&(a.flags|=128,p=!0,ho(v,!1),a.lanes=4194304)}else{if(!p)if(s=La(k),s!==null){if(a.flags|=128,p=!0,h=s.updateQueue,h!==null&&(a.updateQueue=h,a.flags|=4),ho(v,!0),v.tail===null&&v.tailMode==="hidden"&&!k.alternate&&!Pt)return xn(a),null}else 2*q()-v.renderingStartTime>nl&&h!==1073741824&&(a.flags|=128,p=!0,ho(v,!1),a.lanes=4194304);v.isBackwards?(k.sibling=a.child,a.child=k):(h=v.last,h!==null?h.sibling=k:a.child=k,v.last=k)}return v.tail!==null?(a=v.tail,v.rendering=a,v.tail=a.sibling,v.renderingStartTime=q(),a.sibling=null,h=Mt.current,vt(Mt,p?h&1|2:h&1),a):(xn(a),null);case 22:case 23:return yh(),p=a.memoizedState!==null,s!==null&&s.memoizedState!==null!==p&&(a.flags|=8192),p&&(a.mode&1)!==0?(Kn&1073741824)!==0&&(xn(a),a.subtreeFlags&6&&(a.flags|=8192)):xn(a),null;case 24:return null;case 25:return null}throw Error(t(156,a.tag))}function Sx(s,a){switch(P0(a),a.tag){case 1:return jn(a.type)&&$a(),s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 3:return Ks(),bt(En),bt(gn),_0(),s=a.flags,(s&65536)!==0&&(s&128)===0?(a.flags=s&-65537|128,a):null;case 5:return N0(a),null;case 13:if(bt(Mt),s=a.memoizedState,s!==null&&s.dehydrated!==null){if(a.alternate===null)throw Error(t(340));Bs()}return s=a.flags,s&65536?(a.flags=s&-65537|128,a):null;case 19:return bt(Mt),null;case 4:return Ks(),null;case 10:return E0(a.type._context),null;case 22:case 23:return yh(),null;case 24:return null;default:return null}}var Fa=!1,vn=!1,wx=typeof WeakSet=="function"?WeakSet:Set,Qe=null;function el(s,a){var h=s.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(p){jt(s,a,p)}else h.current=null}function lh(s,a,h){try{h()}catch(p){jt(s,a,p)}}var Om=!1;function kx(s,a){if(y0=fa,s=Bd(),u0(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var p=h.getSelection&&h.getSelection();if(p&&p.rangeCount!==0){h=p.anchorNode;var g=p.anchorOffset,v=p.focusNode;p=p.focusOffset;try{h.nodeType,v.nodeType}catch{h=null;break e}var k=0,A=-1,V=-1,W=0,ae=0,fe=s,le=null;t:for(;;){for(var we;fe!==h||g!==0&&fe.nodeType!==3||(A=k+g),fe!==v||p!==0&&fe.nodeType!==3||(V=k+p),fe.nodeType===3&&(k+=fe.nodeValue.length),(we=fe.firstChild)!==null;)le=fe,fe=we;for(;;){if(fe===s)break t;if(le===h&&++W===g&&(A=k),le===v&&++ae===p&&(V=k),(we=fe.nextSibling)!==null)break;fe=le,le=fe.parentNode}fe=we}h=A===-1||V===-1?null:{start:A,end:V}}else h=null}h=h||{start:0,end:0}}else h=null;for(x0={focusedElem:s,selectionRange:h},fa=!1,Qe=a;Qe!==null;)if(a=Qe,s=a.child,(a.subtreeFlags&1028)!==0&&s!==null)s.return=a,Qe=s;else for(;Qe!==null;){a=Qe;try{var Ae=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var Ee=Ae.memoizedProps,Xt=Ae.memoizedState,z=a.stateNode,N=z.getSnapshotBeforeUpdate(a.elementType===a.type?Ee:Qr(a.type,Ee),Xt);z.__reactInternalSnapshotBeforeUpdate=N}break;case 3:var D=a.stateNode.containerInfo;D.nodeType===1?D.textContent="":D.nodeType===9&&D.documentElement&&D.removeChild(D.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(t(163))}}catch(de){jt(a,a.return,de)}if(s=a.sibling,s!==null){s.return=a.return,Qe=s;break}Qe=a.return}return Ae=Om,Om=!1,Ae}function fo(s,a,h){var p=a.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var g=p=p.next;do{if((g.tag&s)===s){var v=g.destroy;g.destroy=void 0,v!==void 0&&lh(a,h,v)}g=g.next}while(g!==p)}}function Ya(s,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var h=a=a.next;do{if((h.tag&s)===s){var p=h.create;h.destroy=p()}h=h.next}while(h!==a)}}function oh(s){var a=s.ref;if(a!==null){var h=s.stateNode;switch(s.tag){case 5:s=h;break;default:s=h}typeof a=="function"?a(s):a.current=s}}function gm(s){var a=s.alternate;a!==null&&(s.alternate=null,gm(a)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(a=s.stateNode,a!==null&&(delete a[zr],delete a[to],delete a[k0],delete a[sx],delete a[lx])),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}function ym(s){return s.tag===5||s.tag===3||s.tag===4}function xm(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||ym(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function ah(s,a,h){var p=s.tag;if(p===5||p===6)s=s.stateNode,a?h.nodeType===8?h.parentNode.insertBefore(s,a):h.insertBefore(s,a):(h.nodeType===8?(a=h.parentNode,a.insertBefore(s,h)):(a=h,a.appendChild(s)),h=h._reactRootContainer,h!=null||a.onclick!==null||(a.onclick=ba));else if(p!==4&&(s=s.child,s!==null))for(ah(s,a,h),s=s.sibling;s!==null;)ah(s,a,h),s=s.sibling}function ch(s,a,h){var p=s.tag;if(p===5||p===6)s=s.stateNode,a?h.insertBefore(s,a):h.appendChild(s);else if(p!==4&&(s=s.child,s!==null))for(ch(s,a,h),s=s.sibling;s!==null;)ch(s,a,h),s=s.sibling}var hn=null,$r=!1;function zi(s,a,h){for(h=h.child;h!==null;)vm(s,a,h),h=h.sibling}function vm(s,a,h){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount($n,h)}catch{}switch(h.tag){case 5:vn||el(h,a);case 6:var p=hn,g=$r;hn=null,zi(s,a,h),hn=p,$r=g,hn!==null&&($r?(s=hn,h=h.stateNode,s.nodeType===8?s.parentNode.removeChild(h):s.removeChild(h)):hn.removeChild(h.stateNode));break;case 18:hn!==null&&($r?(s=hn,h=h.stateNode,s.nodeType===8?w0(s.parentNode,h):s.nodeType===1&&w0(s,h),Hl(s)):w0(hn,h.stateNode));break;case 4:p=hn,g=$r,hn=h.stateNode.containerInfo,$r=!0,zi(s,a,h),hn=p,$r=g;break;case 0:case 11:case 14:case 15:if(!vn&&(p=h.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){g=p=p.next;do{var v=g,k=v.destroy;v=v.tag,k!==void 0&&((v&2)!==0||(v&4)!==0)&&lh(h,a,k),g=g.next}while(g!==p)}zi(s,a,h);break;case 1:if(!vn&&(el(h,a),p=h.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=h.memoizedProps,p.state=h.memoizedState,p.componentWillUnmount()}catch(A){jt(h,a,A)}zi(s,a,h);break;case 21:zi(s,a,h);break;case 22:h.mode&1?(vn=(p=vn)||h.memoizedState!==null,zi(s,a,h),vn=p):zi(s,a,h);break;default:zi(s,a,h)}}function Sm(s){var a=s.updateQueue;if(a!==null){s.updateQueue=null;var h=s.stateNode;h===null&&(h=s.stateNode=new wx),a.forEach(function(p){var g=Zx.bind(null,s,p);h.has(p)||(h.add(p),p.then(g,g))})}}function Pr(s,a){var h=a.deletions;if(h!==null)for(var p=0;p<h.length;p++){var g=h[p];try{var v=s,k=a,A=k;e:for(;A!==null;){switch(A.tag){case 5:hn=A.stateNode,$r=!1;break e;case 3:hn=A.stateNode.containerInfo,$r=!0;break e;case 4:hn=A.stateNode.containerInfo,$r=!0;break e}A=A.return}if(hn===null)throw Error(t(160));vm(v,k,g),hn=null,$r=!1;var V=g.alternate;V!==null&&(V.return=null),g.return=null}catch(W){jt(g,a,W)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)wm(a,s),a=a.sibling}function wm(s,a){var h=s.alternate,p=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Pr(a,s),Hr(s),p&4){try{fo(3,s,s.return),Ya(3,s)}catch(Ee){jt(s,s.return,Ee)}try{fo(5,s,s.return)}catch(Ee){jt(s,s.return,Ee)}}break;case 1:Pr(a,s),Hr(s),p&512&&h!==null&&el(h,h.return);break;case 5:if(Pr(a,s),Hr(s),p&512&&h!==null&&el(h,h.return),s.flags&32){var g=s.stateNode;try{Ft(g,"")}catch(Ee){jt(s,s.return,Ee)}}if(p&4&&(g=s.stateNode,g!=null)){var v=s.memoizedProps,k=h!==null?h.memoizedProps:v,A=s.type,V=s.updateQueue;if(s.updateQueue=null,V!==null)try{A==="input"&&v.type==="radio"&&v.name!=null&&qe(g,v),yt(A,k);var W=yt(A,v);for(k=0;k<V.length;k+=2){var ae=V[k],fe=V[k+1];ae==="style"?Yt(g,fe):ae==="dangerouslySetInnerHTML"?gt(g,fe):ae==="children"?Ft(g,fe):P(g,ae,fe,W)}switch(A){case"input":Se(g,v);break;case"textarea":xr(g,v);break;case"select":var le=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!v.multiple;var we=v.value;we!=null?pt(g,!!v.multiple,we,!1):le!==!!v.multiple&&(v.defaultValue!=null?pt(g,!!v.multiple,v.defaultValue,!0):pt(g,!!v.multiple,v.multiple?[]:"",!1))}g[to]=v}catch(Ee){jt(s,s.return,Ee)}}break;case 6:if(Pr(a,s),Hr(s),p&4){if(s.stateNode===null)throw Error(t(162));g=s.stateNode,v=s.memoizedProps;try{g.nodeValue=v}catch(Ee){jt(s,s.return,Ee)}}break;case 3:if(Pr(a,s),Hr(s),p&4&&h!==null&&h.memoizedState.isDehydrated)try{Hl(a.containerInfo)}catch(Ee){jt(s,s.return,Ee)}break;case 4:Pr(a,s),Hr(s);break;case 13:Pr(a,s),Hr(s),g=s.child,g.flags&8192&&(v=g.memoizedState!==null,g.stateNode.isHidden=v,!v||g.alternate!==null&&g.alternate.memoizedState!==null||(fh=q())),p&4&&Sm(s);break;case 22:if(ae=h!==null&&h.memoizedState!==null,s.mode&1?(vn=(W=vn)||ae,Pr(a,s),vn=W):Pr(a,s),Hr(s),p&8192){if(W=s.memoizedState!==null,(s.stateNode.isHidden=W)&&!ae&&(s.mode&1)!==0)for(Qe=s,ae=s.child;ae!==null;){for(fe=Qe=ae;Qe!==null;){switch(le=Qe,we=le.child,le.tag){case 0:case 11:case 14:case 15:fo(4,le,le.return);break;case 1:el(le,le.return);var Ae=le.stateNode;if(typeof Ae.componentWillUnmount=="function"){p=le,h=le.return;try{a=p,Ae.props=a.memoizedProps,Ae.state=a.memoizedState,Ae.componentWillUnmount()}catch(Ee){jt(p,h,Ee)}}break;case 5:el(le,le.return);break;case 22:if(le.memoizedState!==null){Qm(fe);continue}}we!==null?(we.return=le,Qe=we):Qm(fe)}ae=ae.sibling}e:for(ae=null,fe=s;;){if(fe.tag===5){if(ae===null){ae=fe;try{g=fe.stateNode,W?(v=g.style,typeof v.setProperty=="function"?v.setProperty("display","none","important"):v.display="none"):(A=fe.stateNode,V=fe.memoizedProps.style,k=V!=null&&V.hasOwnProperty("display")?V.display:null,A.style.display=nn("display",k))}catch(Ee){jt(s,s.return,Ee)}}}else if(fe.tag===6){if(ae===null)try{fe.stateNode.nodeValue=W?"":fe.memoizedProps}catch(Ee){jt(s,s.return,Ee)}}else if((fe.tag!==22&&fe.tag!==23||fe.memoizedState===null||fe===s)&&fe.child!==null){fe.child.return=fe,fe=fe.child;continue}if(fe===s)break e;for(;fe.sibling===null;){if(fe.return===null||fe.return===s)break e;ae===fe&&(ae=null),fe=fe.return}ae===fe&&(ae=null),fe.sibling.return=fe.return,fe=fe.sibling}}break;case 19:Pr(a,s),Hr(s),p&4&&Sm(s);break;case 21:break;default:Pr(a,s),Hr(s)}}function Hr(s){var a=s.flags;if(a&2){try{e:{for(var h=s.return;h!==null;){if(ym(h)){var p=h;break e}h=h.return}throw Error(t(160))}switch(p.tag){case 5:var g=p.stateNode;p.flags&32&&(Ft(g,""),p.flags&=-33);var v=xm(s);ch(s,v,g);break;case 3:case 4:var k=p.stateNode.containerInfo,A=xm(s);ah(s,A,k);break;default:throw Error(t(161))}}catch(V){jt(s,s.return,V)}s.flags&=-3}a&4096&&(s.flags&=-4097)}function bx(s,a,h){Qe=s,km(s)}function km(s,a,h){for(var p=(s.mode&1)!==0;Qe!==null;){var g=Qe,v=g.child;if(g.tag===22&&p){var k=g.memoizedState!==null||Fa;if(!k){var A=g.alternate,V=A!==null&&A.memoizedState!==null||vn;A=Fa;var W=vn;if(Fa=k,(vn=V)&&!W)for(Qe=g;Qe!==null;)k=Qe,V=k.child,k.tag===22&&k.memoizedState!==null?$m(g):V!==null?(V.return=k,Qe=V):$m(g);for(;v!==null;)Qe=v,km(v),v=v.sibling;Qe=g,Fa=A,vn=W}bm(s)}else(g.subtreeFlags&8772)!==0&&v!==null?(v.return=g,Qe=v):bm(s)}}function bm(s){for(;Qe!==null;){var a=Qe;if((a.flags&8772)!==0){var h=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:vn||Ya(5,a);break;case 1:var p=a.stateNode;if(a.flags&4&&!vn)if(h===null)p.componentDidMount();else{var g=a.elementType===a.type?h.memoizedProps:Qr(a.type,h.memoizedProps);p.componentDidUpdate(g,h.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var v=a.updateQueue;v!==null&&Qp(a,v,p);break;case 3:var k=a.updateQueue;if(k!==null){if(h=null,a.child!==null)switch(a.child.tag){case 5:h=a.child.stateNode;break;case 1:h=a.child.stateNode}Qp(a,k,h)}break;case 5:var A=a.stateNode;if(h===null&&a.flags&4){h=A;var V=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":V.autoFocus&&h.focus();break;case"img":V.src&&(h.src=V.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var W=a.alternate;if(W!==null){var ae=W.memoizedState;if(ae!==null){var fe=ae.dehydrated;fe!==null&&Hl(fe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}vn||a.flags&512&&oh(a)}catch(le){jt(a,a.return,le)}}if(a===s){Qe=null;break}if(h=a.sibling,h!==null){h.return=a.return,Qe=h;break}Qe=a.return}}function Qm(s){for(;Qe!==null;){var a=Qe;if(a===s){Qe=null;break}var h=a.sibling;if(h!==null){h.return=a.return,Qe=h;break}Qe=a.return}}function $m(s){for(;Qe!==null;){var a=Qe;try{switch(a.tag){case 0:case 11:case 15:var h=a.return;try{Ya(4,a)}catch(V){jt(a,h,V)}break;case 1:var p=a.stateNode;if(typeof p.componentDidMount=="function"){var g=a.return;try{p.componentDidMount()}catch(V){jt(a,g,V)}}var v=a.return;try{oh(a)}catch(V){jt(a,v,V)}break;case 5:var k=a.return;try{oh(a)}catch(V){jt(a,k,V)}}}catch(V){jt(a,a.return,V)}if(a===s){Qe=null;break}var A=a.sibling;if(A!==null){A.return=a.return,Qe=A;break}Qe=a.return}}var Qx=Math.ceil,Ba=M.ReactCurrentDispatcher,uh=M.ReactCurrentOwner,fr=M.ReactCurrentBatchConfig,lt=0,sn=null,Ht=null,fn=0,Kn=0,tl=Ri(0),Gt=0,po=null,gs=0,qa=0,hh=0,mo=null,Rn=null,fh=0,nl=1/0,gi=null,Ua=!1,dh=null,Di=null,Ga=!1,Ii=null,Ka=0,Oo=0,ph=null,Ja=-1,ec=0;function An(){return(lt&6)!==0?q():Ja!==-1?Ja:Ja=q()}function Hi(s){return(s.mode&1)===0?1:(lt&2)!==0&&fn!==0?fn&-fn:ax.transition!==null?(ec===0&&(ec=xd()),ec):(s=Ot,s!==0||(s=window.event,s=s===void 0?16:Ad(s.type)),s)}function Ar(s,a,h,p){if(50<Oo)throw Oo=0,ph=null,Error(t(185));Xl(s,h,p),((lt&2)===0||s!==sn)&&(s===sn&&((lt&2)===0&&(qa|=h),Gt===4&&Wi(s,fn)),Ln(s,p),h===1&&lt===0&&(a.mode&1)===0&&(nl=q()+500,Aa&&Ni()))}function Ln(s,a){var h=s.callbackNode;ay(s,a);var p=cs(s,s===sn?fn:0);if(p===0)h!==null&&ie(h),s.callbackNode=null,s.callbackPriority=0;else if(a=p&-p,s.callbackPriority!==a){if(h!=null&&ie(h),a===1)s.tag===0?ox(Am.bind(null,s)):dp(Am.bind(null,s)),rx(function(){(lt&6)===0&&Ni()}),h=null;else{switch(vd(p)){case 1:h=dt;break;case 4:h=st;break;case 16:h=Qt;break;case 536870912:h=Et;break;default:h=Qt}h=Rm(h,Pm.bind(null,s))}s.callbackPriority=a,s.callbackNode=h}}function Pm(s,a){if(Ja=-1,ec=0,(lt&6)!==0)throw Error(t(327));var h=s.callbackNode;if(rl()&&s.callbackNode!==h)return null;var p=cs(s,s===sn?fn:0);if(p===0)return null;if((p&30)!==0||(p&s.expiredLanes)!==0||a)a=tc(s,p);else{a=p;var g=lt;lt|=2;var v=Tm();(sn!==s||fn!==a)&&(gi=null,nl=q()+500,xs(s,a));do try{Ax();break}catch(A){Cm(s,A)}while(!0);Z0(),Ba.current=v,lt=g,Ht!==null?a=0:(sn=null,fn=0,a=Gt)}if(a!==0){if(a===2&&(g=Bu(s),g!==0&&(p=g,a=mh(s,g))),a===1)throw h=po,xs(s,0),Wi(s,p),Ln(s,q()),h;if(a===6)Wi(s,p);else{if(g=s.current.alternate,(p&30)===0&&!$x(g)&&(a=tc(s,p),a===2&&(v=Bu(s),v!==0&&(p=v,a=mh(s,v))),a===1))throw h=po,xs(s,0),Wi(s,p),Ln(s,q()),h;switch(s.finishedWork=g,s.finishedLanes=p,a){case 0:case 1:throw Error(t(345));case 2:vs(s,Rn,gi);break;case 3:if(Wi(s,p),(p&130023424)===p&&(a=fh+500-q(),10<a)){if(cs(s,0)!==0)break;if(g=s.suspendedLanes,(g&p)!==p){An(),s.pingedLanes|=s.suspendedLanes&g;break}s.timeoutHandle=S0(vs.bind(null,s,Rn,gi),a);break}vs(s,Rn,gi);break;case 4:if(Wi(s,p),(p&4194240)===p)break;for(a=s.eventTimes,g=-1;0<p;){var k=31-or(p);v=1<<k,k=a[k],k>g&&(g=k),p&=~v}if(p=g,p=q()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*Qx(p/1960))-p,10<p){s.timeoutHandle=S0(vs.bind(null,s,Rn,gi),p);break}vs(s,Rn,gi);break;case 5:vs(s,Rn,gi);break;default:throw Error(t(329))}}}return Ln(s,q()),s.callbackNode===h?Pm.bind(null,s):null}function mh(s,a){var h=mo;return s.current.memoizedState.isDehydrated&&(xs(s,a).flags|=256),s=tc(s,a),s!==2&&(a=Rn,Rn=h,a!==null&&Oh(a)),s}function Oh(s){Rn===null?Rn=s:Rn.push.apply(Rn,s)}function $x(s){for(var a=s;;){if(a.flags&16384){var h=a.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var p=0;p<h.length;p++){var g=h[p],v=g.getSnapshot;g=g.value;try{if(!kr(v(),g))return!1}catch{return!1}}}if(h=a.child,a.subtreeFlags&16384&&h!==null)h.return=a,a=h;else{if(a===s)break;for(;a.sibling===null;){if(a.return===null||a.return===s)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function Wi(s,a){for(a&=~hh,a&=~qa,s.suspendedLanes|=a,s.pingedLanes&=~a,s=s.expirationTimes;0<a;){var h=31-or(a),p=1<<h;s[h]=-1,a&=~p}}function Am(s){if((lt&6)!==0)throw Error(t(327));rl();var a=cs(s,0);if((a&1)===0)return Ln(s,q()),null;var h=tc(s,a);if(s.tag!==0&&h===2){var p=Bu(s);p!==0&&(a=p,h=mh(s,p))}if(h===1)throw h=po,xs(s,0),Wi(s,a),Ln(s,q()),h;if(h===6)throw Error(t(345));return s.finishedWork=s.current.alternate,s.finishedLanes=a,vs(s,Rn,gi),Ln(s,q()),null}function gh(s,a){var h=lt;lt|=1;try{return s(a)}finally{lt=h,lt===0&&(nl=q()+500,Aa&&Ni())}}function ys(s){Ii!==null&&Ii.tag===0&&(lt&6)===0&&rl();var a=lt;lt|=1;var h=fr.transition,p=Ot;try{if(fr.transition=null,Ot=1,s)return s()}finally{Ot=p,fr.transition=h,lt=a,(lt&6)===0&&Ni()}}function yh(){Kn=tl.current,bt(tl)}function xs(s,a){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;if(h!==-1&&(s.timeoutHandle=-1,nx(h)),Ht!==null)for(h=Ht.return;h!==null;){var p=h;switch(P0(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&$a();break;case 3:Ks(),bt(En),bt(gn),_0();break;case 5:N0(p);break;case 4:Ks();break;case 13:bt(Mt);break;case 19:bt(Mt);break;case 10:E0(p.type._context);break;case 22:case 23:yh()}h=h.return}if(sn=s,Ht=s=Fi(s.current,null),fn=Kn=a,Gt=0,po=null,hh=qa=gs=0,Rn=mo=null,ps!==null){for(a=0;a<ps.length;a++)if(h=ps[a],p=h.interleaved,p!==null){h.interleaved=null;var g=p.next,v=h.pending;if(v!==null){var k=v.next;v.next=g,p.next=k}h.pending=p}ps=null}return s}function Cm(s,a){do{var h=Ht;try{if(Z0(),Na.current=Da,Xa){for(var p=Zt.memoizedState;p!==null;){var g=p.queue;g!==null&&(g.pending=null),p=p.next}Xa=!1}if(Os=0,rn=Ut=Zt=null,oo=!1,ao=0,uh.current=null,h===null||h.return===null){Gt=1,po=a,Ht=null;break}e:{var v=s,k=h.return,A=h,V=a;if(a=fn,A.flags|=32768,V!==null&&typeof V=="object"&&typeof V.then=="function"){var W=V,ae=A,fe=ae.tag;if((ae.mode&1)===0&&(fe===0||fe===11||fe===15)){var le=ae.alternate;le?(ae.updateQueue=le.updateQueue,ae.memoizedState=le.memoizedState,ae.lanes=le.lanes):(ae.updateQueue=null,ae.memoizedState=null)}var we=em(k);if(we!==null){we.flags&=-257,tm(we,k,A,v,a),we.mode&1&&Jp(v,W,a),a=we,V=W;var Ae=a.updateQueue;if(Ae===null){var Ee=new Set;Ee.add(V),a.updateQueue=Ee}else Ae.add(V);break e}else{if((a&1)===0){Jp(v,W,a),xh();break e}V=Error(t(426))}}else if(Pt&&A.mode&1){var Xt=em(k);if(Xt!==null){(Xt.flags&65536)===0&&(Xt.flags|=256),tm(Xt,k,A,v,a),T0(Js(V,A));break e}}v=V=Js(V,A),Gt!==4&&(Gt=2),mo===null?mo=[v]:mo.push(v),v=k;do{switch(v.tag){case 3:v.flags|=65536,a&=-a,v.lanes|=a;var z=Gp(v,V,a);bp(v,z);break e;case 1:A=V;var N=v.type,D=v.stateNode;if((v.flags&128)===0&&(typeof N.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(Di===null||!Di.has(D)))){v.flags|=65536,a&=-a,v.lanes|=a;var de=Kp(v,A,a);bp(v,de);break e}}v=v.return}while(v!==null)}Zm(h)}catch(Le){a=Le,Ht===h&&h!==null&&(Ht=h=h.return);continue}break}while(!0)}function Tm(){var s=Ba.current;return Ba.current=Da,s===null?Da:s}function xh(){(Gt===0||Gt===3||Gt===2)&&(Gt=4),sn===null||(gs&268435455)===0&&(qa&268435455)===0||Wi(sn,fn)}function tc(s,a){var h=lt;lt|=2;var p=Tm();(sn!==s||fn!==a)&&(gi=null,xs(s,a));do try{Px();break}catch(g){Cm(s,g)}while(!0);if(Z0(),lt=h,Ba.current=p,Ht!==null)throw Error(t(261));return sn=null,fn=0,Gt}function Px(){for(;Ht!==null;)Mm(Ht)}function Ax(){for(;Ht!==null&&!F();)Mm(Ht)}function Mm(s){var a=Vm(s.alternate,s,Kn);s.memoizedProps=s.pendingProps,a===null?Zm(s):Ht=a,uh.current=null}function Zm(s){var a=s;do{var h=a.alternate;if(s=a.return,(a.flags&32768)===0){if(h=vx(h,a,Kn),h!==null){Ht=h;return}}else{if(h=Sx(h,a),h!==null){h.flags&=32767,Ht=h;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Gt=6,Ht=null;return}}if(a=a.sibling,a!==null){Ht=a;return}Ht=a=s}while(a!==null);Gt===0&&(Gt=5)}function vs(s,a,h){var p=Ot,g=fr.transition;try{fr.transition=null,Ot=1,Cx(s,a,h,p)}finally{fr.transition=g,Ot=p}return null}function Cx(s,a,h,p){do rl();while(Ii!==null);if((lt&6)!==0)throw Error(t(327));h=s.finishedWork;var g=s.finishedLanes;if(h===null)return null;if(s.finishedWork=null,s.finishedLanes=0,h===s.current)throw Error(t(177));s.callbackNode=null,s.callbackPriority=0;var v=h.lanes|h.childLanes;if(cy(s,v),s===sn&&(Ht=sn=null,fn=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||Ga||(Ga=!0,Rm(Qt,function(){return rl(),null})),v=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||v){v=fr.transition,fr.transition=null;var k=Ot;Ot=1;var A=lt;lt|=4,uh.current=null,kx(s,h),wm(h,s),qy(x0),fa=!!y0,x0=y0=null,s.current=h,bx(h),be(),lt=A,Ot=k,fr.transition=v}else s.current=h;if(Ga&&(Ga=!1,Ii=s,Ka=g),v=s.pendingLanes,v===0&&(Di=null),Yu(h.stateNode),Ln(s,q()),a!==null)for(p=s.onRecoverableError,h=0;h<a.length;h++)g=a[h],p(g.value,{componentStack:g.stack,digest:g.digest});if(Ua)throw Ua=!1,s=dh,dh=null,s;return(Ka&1)!==0&&s.tag!==0&&rl(),v=s.pendingLanes,(v&1)!==0?s===ph?Oo++:(Oo=0,ph=s):Oo=0,Ni(),null}function rl(){if(Ii!==null){var s=vd(Ka),a=fr.transition,h=Ot;try{if(fr.transition=null,Ot=16>s?16:s,Ii===null)var p=!1;else{if(s=Ii,Ii=null,Ka=0,(lt&6)!==0)throw Error(t(331));var g=lt;for(lt|=4,Qe=s.current;Qe!==null;){var v=Qe,k=v.child;if((Qe.flags&16)!==0){var A=v.deletions;if(A!==null){for(var V=0;V<A.length;V++){var W=A[V];for(Qe=W;Qe!==null;){var ae=Qe;switch(ae.tag){case 0:case 11:case 15:fo(8,ae,v)}var fe=ae.child;if(fe!==null)fe.return=ae,Qe=fe;else for(;Qe!==null;){ae=Qe;var le=ae.sibling,we=ae.return;if(gm(ae),ae===W){Qe=null;break}if(le!==null){le.return=we,Qe=le;break}Qe=we}}}var Ae=v.alternate;if(Ae!==null){var Ee=Ae.child;if(Ee!==null){Ae.child=null;do{var Xt=Ee.sibling;Ee.sibling=null,Ee=Xt}while(Ee!==null)}}Qe=v}}if((v.subtreeFlags&2064)!==0&&k!==null)k.return=v,Qe=k;else e:for(;Qe!==null;){if(v=Qe,(v.flags&2048)!==0)switch(v.tag){case 0:case 11:case 15:fo(9,v,v.return)}var z=v.sibling;if(z!==null){z.return=v.return,Qe=z;break e}Qe=v.return}}var N=s.current;for(Qe=N;Qe!==null;){k=Qe;var D=k.child;if((k.subtreeFlags&2064)!==0&&D!==null)D.return=k,Qe=D;else e:for(k=N;Qe!==null;){if(A=Qe,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:Ya(9,A)}}catch(Le){jt(A,A.return,Le)}if(A===k){Qe=null;break e}var de=A.sibling;if(de!==null){de.return=A.return,Qe=de;break e}Qe=A.return}}if(lt=g,Ni(),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot($n,s)}catch{}p=!0}return p}finally{Ot=h,fr.transition=a}}return!1}function Em(s,a,h){a=Js(h,a),a=Gp(s,a,1),s=_i(s,a,1),a=An(),s!==null&&(Xl(s,1,a),Ln(s,a))}function jt(s,a,h){if(s.tag===3)Em(s,s,h);else for(;a!==null;){if(a.tag===3){Em(a,s,h);break}else if(a.tag===1){var p=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(Di===null||!Di.has(p))){s=Js(h,s),s=Kp(a,s,1),a=_i(a,s,1),s=An(),a!==null&&(Xl(a,1,s),Ln(a,s));break}}a=a.return}}function Tx(s,a,h){var p=s.pingCache;p!==null&&p.delete(a),a=An(),s.pingedLanes|=s.suspendedLanes&h,sn===s&&(fn&h)===h&&(Gt===4||Gt===3&&(fn&130023424)===fn&&500>q()-fh?xs(s,0):hh|=h),Ln(s,a)}function jm(s,a){a===0&&((s.mode&1)===0?a=1:(a=ci,ci<<=1,(ci&130023424)===0&&(ci=4194304)));var h=An();s=pi(s,a),s!==null&&(Xl(s,a,h),Ln(s,h))}function Mx(s){var a=s.memoizedState,h=0;a!==null&&(h=a.retryLane),jm(s,h)}function Zx(s,a){var h=0;switch(s.tag){case 13:var p=s.stateNode,g=s.memoizedState;g!==null&&(h=g.retryLane);break;case 19:p=s.stateNode;break;default:throw Error(t(314))}p!==null&&p.delete(a),jm(s,h)}var Vm;Vm=function(s,a,h){if(s!==null)if(s.memoizedProps!==a.pendingProps||En.current)Vn=!0;else{if((s.lanes&h)===0&&(a.flags&128)===0)return Vn=!1,xx(s,a,h);Vn=(s.flags&131072)!==0}else Vn=!1,Pt&&(a.flags&1048576)!==0&&pp(a,Ta,a.index);switch(a.lanes=0,a.tag){case 2:var p=a.type;Wa(s,a),s=a.pendingProps;var g=Ws(a,gn.current);Gs(a,h),g=I0(null,a,p,s,g,h);var v=H0();return a.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,jn(p)?(v=!0,Pa(a)):v=!1,a.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,R0(a),g.updater=Ia,a.stateNode=g,g._reactInternals=a,U0(a,p,s,h),a=eh(null,a,p,!0,v,h)):(a.tag=0,Pt&&v&&$0(a),Pn(null,a,g,h),a=a.child),a;case 16:p=a.elementType;e:{switch(Wa(s,a),s=a.pendingProps,g=p._init,p=g(p._payload),a.type=p,g=a.tag=jx(p),s=Qr(p,s),g){case 0:a=J0(null,a,p,s,h);break e;case 1:a=om(null,a,p,s,h);break e;case 11:a=nm(null,a,p,s,h);break e;case 14:a=rm(null,a,p,Qr(p.type,s),h);break e}throw Error(t(306,p,""))}return a;case 0:return p=a.type,g=a.pendingProps,g=a.elementType===p?g:Qr(p,g),J0(s,a,p,g,h);case 1:return p=a.type,g=a.pendingProps,g=a.elementType===p?g:Qr(p,g),om(s,a,p,g,h);case 3:e:{if(am(a),s===null)throw Error(t(387));p=a.pendingProps,v=a.memoizedState,g=v.element,kp(s,a),Ra(a,p,null,h);var k=a.memoizedState;if(p=k.element,v.isDehydrated)if(v={element:p,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},a.updateQueue.baseState=v,a.memoizedState=v,a.flags&256){g=Js(Error(t(423)),a),a=cm(s,a,p,h,g);break e}else if(p!==g){g=Js(Error(t(424)),a),a=cm(s,a,p,h,g);break e}else for(Gn=Vi(a.stateNode.containerInfo.firstChild),Un=a,Pt=!0,br=null,h=Sp(a,null,p,h),a.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(Bs(),p===g){a=Oi(s,a,h);break e}Pn(s,a,p,h)}a=a.child}return a;case 5:return $p(a),s===null&&C0(a),p=a.type,g=a.pendingProps,v=s!==null?s.memoizedProps:null,k=g.children,v0(p,g)?k=null:v!==null&&v0(p,v)&&(a.flags|=32),lm(s,a),Pn(s,a,k,h),a.child;case 6:return s===null&&C0(a),null;case 13:return um(s,a,h);case 4:return L0(a,a.stateNode.containerInfo),p=a.pendingProps,s===null?a.child=qs(a,null,p,h):Pn(s,a,p,h),a.child;case 11:return p=a.type,g=a.pendingProps,g=a.elementType===p?g:Qr(p,g),nm(s,a,p,g,h);case 7:return Pn(s,a,a.pendingProps,h),a.child;case 8:return Pn(s,a,a.pendingProps.children,h),a.child;case 12:return Pn(s,a,a.pendingProps.children,h),a.child;case 10:e:{if(p=a.type._context,g=a.pendingProps,v=a.memoizedProps,k=g.value,vt(Ea,p._currentValue),p._currentValue=k,v!==null)if(kr(v.value,k)){if(v.children===g.children&&!En.current){a=Oi(s,a,h);break e}}else for(v=a.child,v!==null&&(v.return=a);v!==null;){var A=v.dependencies;if(A!==null){k=v.child;for(var V=A.firstContext;V!==null;){if(V.context===p){if(v.tag===1){V=mi(-1,h&-h),V.tag=2;var W=v.updateQueue;if(W!==null){W=W.shared;var ae=W.pending;ae===null?V.next=V:(V.next=ae.next,ae.next=V),W.pending=V}}v.lanes|=h,V=v.alternate,V!==null&&(V.lanes|=h),j0(v.return,h,a),A.lanes|=h;break}V=V.next}}else if(v.tag===10)k=v.type===a.type?null:v.child;else if(v.tag===18){if(k=v.return,k===null)throw Error(t(341));k.lanes|=h,A=k.alternate,A!==null&&(A.lanes|=h),j0(k,h,a),k=v.sibling}else k=v.child;if(k!==null)k.return=v;else for(k=v;k!==null;){if(k===a){k=null;break}if(v=k.sibling,v!==null){v.return=k.return,k=v;break}k=k.return}v=k}Pn(s,a,g.children,h),a=a.child}return a;case 9:return g=a.type,p=a.pendingProps.children,Gs(a,h),g=ur(g),p=p(g),a.flags|=1,Pn(s,a,p,h),a.child;case 14:return p=a.type,g=Qr(p,a.pendingProps),g=Qr(p.type,g),rm(s,a,p,g,h);case 15:return im(s,a,a.type,a.pendingProps,h);case 17:return p=a.type,g=a.pendingProps,g=a.elementType===p?g:Qr(p,g),Wa(s,a),a.tag=1,jn(p)?(s=!0,Pa(a)):s=!1,Gs(a,h),qp(a,p,g),U0(a,p,g,h),eh(null,a,p,!0,s,h);case 19:return fm(s,a,h);case 22:return sm(s,a,h)}throw Error(t(156,a.tag))};function Rm(s,a){return re(s,a)}function Ex(s,a,h,p){this.tag=s,this.key=h,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function dr(s,a,h,p){return new Ex(s,a,h,p)}function vh(s){return s=s.prototype,!(!s||!s.isReactComponent)}function jx(s){if(typeof s=="function")return vh(s)?1:0;if(s!=null){if(s=s.$$typeof,s===oe)return 11;if(s===_e)return 14}return 2}function Fi(s,a){var h=s.alternate;return h===null?(h=dr(s.tag,a,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=a,h.type=s.type,h.flags=0,h.subtreeFlags=0,h.deletions=null),h.flags=s.flags&14680064,h.childLanes=s.childLanes,h.lanes=s.lanes,h.child=s.child,h.memoizedProps=s.memoizedProps,h.memoizedState=s.memoizedState,h.updateQueue=s.updateQueue,a=s.dependencies,h.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h}function nc(s,a,h,p,g,v){var k=2;if(p=s,typeof s=="function")vh(s)&&(k=1);else if(typeof s=="string")k=5;else e:switch(s){case Z:return Ss(h.children,g,v,a);case H:k=8,g|=8;break;case Y:return s=dr(12,h,a,g|2),s.elementType=Y,s.lanes=v,s;case ye:return s=dr(13,h,a,g),s.elementType=ye,s.lanes=v,s;case je:return s=dr(19,h,a,g),s.elementType=je,s.lanes=v,s;case me:return rc(h,g,v,a);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case J:k=10;break e;case se:k=9;break e;case oe:k=11;break e;case _e:k=14;break e;case U:k=16,p=null;break e}throw Error(t(130,s==null?s:typeof s,""))}return a=dr(k,h,a,g),a.elementType=s,a.type=p,a.lanes=v,a}function Ss(s,a,h,p){return s=dr(7,s,p,a),s.lanes=h,s}function rc(s,a,h,p){return s=dr(22,s,p,a),s.elementType=me,s.lanes=h,s.stateNode={isHidden:!1},s}function Sh(s,a,h){return s=dr(6,s,null,a),s.lanes=h,s}function wh(s,a,h){return a=dr(4,s.children!==null?s.children:[],s.key,a),a.lanes=h,a.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},a}function Vx(s,a,h,p,g){this.tag=a,this.containerInfo=s,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=qu(0),this.expirationTimes=qu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qu(0),this.identifierPrefix=p,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function kh(s,a,h,p,g,v,k,A,V){return s=new Vx(s,a,h,A,V),a===1?(a=1,v===!0&&(a|=8)):a=0,v=dr(3,null,null,a),s.current=v,v.stateNode=s,v.memoizedState={element:p,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},R0(v),s}function Rx(s,a,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:X,key:p==null?null:""+p,children:s,containerInfo:a,implementation:h}}function Lm(s){if(!s)return Li;s=s._reactInternals;e:{if(pe(s)!==s||s.tag!==1)throw Error(t(170));var a=s;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(jn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(t(171))}if(s.tag===1){var h=s.type;if(jn(h))return hp(s,h,a)}return a}function Nm(s,a,h,p,g,v,k,A,V){return s=kh(h,p,!0,s,g,v,k,A,V),s.context=Lm(null),h=s.current,p=An(),g=Hi(h),v=mi(p,g),v.callback=a??null,_i(h,v,g),s.current.lanes=g,Xl(s,g,p),Ln(s,p),s}function ic(s,a,h,p){var g=a.current,v=An(),k=Hi(g);return h=Lm(h),a.context===null?a.context=h:a.pendingContext=h,a=mi(v,k),a.payload={element:s},p=p===void 0?null:p,p!==null&&(a.callback=p),s=_i(g,a,k),s!==null&&(Ar(s,g,k,v),Va(s,g,k)),k}function sc(s){if(s=s.current,!s.child)return null;switch(s.child.tag){case 5:return s.child.stateNode;default:return s.child.stateNode}}function Xm(s,a){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<a?h:a}}function bh(s,a){Xm(s,a),(s=s.alternate)&&Xm(s,a)}function Lx(){return null}var _m=typeof reportError=="function"?reportError:function(s){console.error(s)};function Qh(s){this._internalRoot=s}lc.prototype.render=Qh.prototype.render=function(s){var a=this._internalRoot;if(a===null)throw Error(t(409));ic(s,a,null,null)},lc.prototype.unmount=Qh.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var a=s.containerInfo;ys(function(){ic(null,s,null,null)}),a[ui]=null}};function lc(s){this._internalRoot=s}lc.prototype.unstable_scheduleHydration=function(s){if(s){var a=kd();s={blockedOn:null,target:s,priority:a};for(var h=0;h<Zi.length&&a!==0&&a<Zi[h].priority;h++);Zi.splice(h,0,s),h===0&&$d(s)}};function $h(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function oc(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function zm(){}function Nx(s,a,h,p,g){if(g){if(typeof p=="function"){var v=p;p=function(){var W=sc(k);v.call(W)}}var k=Nm(a,p,s,0,null,!1,!1,"",zm);return s._reactRootContainer=k,s[ui]=k.current,Jl(s.nodeType===8?s.parentNode:s),ys(),k}for(;g=s.lastChild;)s.removeChild(g);if(typeof p=="function"){var A=p;p=function(){var W=sc(V);A.call(W)}}var V=kh(s,0,!1,null,null,!1,!1,"",zm);return s._reactRootContainer=V,s[ui]=V.current,Jl(s.nodeType===8?s.parentNode:s),ys(function(){ic(a,V,h,p)}),V}function ac(s,a,h,p,g){var v=h._reactRootContainer;if(v){var k=v;if(typeof g=="function"){var A=g;g=function(){var V=sc(k);A.call(V)}}ic(a,k,s,g)}else k=Nx(h,a,s,g,p);return sc(k)}Sd=function(s){switch(s.tag){case 3:var a=s.stateNode;if(a.current.memoizedState.isDehydrated){var h=Ai(a.pendingLanes);h!==0&&(Uu(a,h|1),Ln(a,q()),(lt&6)===0&&(nl=q()+500,Ni()))}break;case 13:ys(function(){var p=pi(s,1);if(p!==null){var g=An();Ar(p,s,1,g)}}),bh(s,1)}},Gu=function(s){if(s.tag===13){var a=pi(s,134217728);if(a!==null){var h=An();Ar(a,s,134217728,h)}bh(s,134217728)}},wd=function(s){if(s.tag===13){var a=Hi(s),h=pi(s,a);if(h!==null){var p=An();Ar(h,s,a,p)}bh(s,a)}},kd=function(){return Ot},bd=function(s,a){var h=Ot;try{return Ot=s,a()}finally{Ot=h}},Qn=function(s,a,h){switch(a){case"input":if(Se(s,h),a=h.name,h.type==="radio"&&a!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<h.length;a++){var p=h[a];if(p!==s&&p.form===s.form){var g=Qa(p);if(!g)throw Error(t(90));We(p),Se(p,g)}}}break;case"textarea":xr(s,h);break;case"select":a=h.value,a!=null&&pt(s,!!h.multiple,a,!1)}},Lr=gh,Nt=ys;var Xx={usingClientEntryPoint:!1,Events:[no,Is,Qa,Sr,Rr,gh]},go={findFiberByHostInstance:us,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_x={bundleType:go.bundleType,version:go.version,rendererPackageName:go.rendererPackageName,rendererConfig:go.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:M.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Be(s),s===null?null:s.stateNode},findFiberByHostInstance:go.findFiberByHostInstance||Lx,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var cc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!cc.isDisabled&&cc.supportsFiber)try{$n=cc.inject(_x),qt=cc}catch{}}return Nn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Xx,Nn.createPortal=function(s,a){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!$h(a))throw Error(t(200));return Rx(s,a,null,h)},Nn.createRoot=function(s,a){if(!$h(s))throw Error(t(299));var h=!1,p="",g=_m;return a!=null&&(a.unstable_strictMode===!0&&(h=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onRecoverableError!==void 0&&(g=a.onRecoverableError)),a=kh(s,1,!1,null,null,h,!1,p,g),s[ui]=a.current,Jl(s.nodeType===8?s.parentNode:s),new Qh(a)},Nn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var a=s._reactInternals;if(a===void 0)throw typeof s.render=="function"?Error(t(188)):(s=Object.keys(s).join(","),Error(t(268,s)));return s=Be(a),s=s===null?null:s.stateNode,s},Nn.flushSync=function(s){return ys(s)},Nn.hydrate=function(s,a,h){if(!oc(a))throw Error(t(200));return ac(null,s,a,!0,h)},Nn.hydrateRoot=function(s,a,h){if(!$h(s))throw Error(t(405));var p=h!=null&&h.hydratedSources||null,g=!1,v="",k=_m;if(h!=null&&(h.unstable_strictMode===!0&&(g=!0),h.identifierPrefix!==void 0&&(v=h.identifierPrefix),h.onRecoverableError!==void 0&&(k=h.onRecoverableError)),a=Nm(a,null,s,1,h??null,g,!1,v,k),s[ui]=a.current,Jl(s),p)for(s=0;s<p.length;s++)h=p[s],g=h._getVersion,g=g(h._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[h,g]:a.mutableSourceEagerHydrationData.push(h,g);return new lc(a)},Nn.render=function(s,a,h){if(!oc(a))throw Error(t(200));return ac(null,s,a,!1,h)},Nn.unmountComponentAtNode=function(s){if(!oc(s))throw Error(t(40));return s._reactRootContainer?(ys(function(){ac(null,null,s,!1,function(){s._reactRootContainer=null,s[ui]=null})}),!0):!1},Nn.unstable_batchedUpdates=gh,Nn.unstable_renderSubtreeIntoContainer=function(s,a,h,p){if(!oc(h))throw Error(t(200));if(s==null||s._reactInternals===void 0)throw Error(t(38));return ac(s,a,h,!1,p)},Nn.version="18.3.1-next-f1338f8080-20240426",Nn}var qm;function qx(){if(qm)return Ch.exports;qm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}return n(),Ch.exports=Bx(),Ch.exports}var Um;function Ux(){if(Um)return hc;Um=1;var n=qx();return hc.createRoot=n.createRoot,hc.hydrateRoot=n.hydrateRoot,hc}var Gx=Ux();function Vt(n){d.useEffect(n,[])}const Kx="modulepreload",Jx=function(n){return"/"+n},Gm={},ev=function(e,t,r){let i=Promise.resolve();if(t&&t.length>0){let o=function(f){return Promise.all(f.map(m=>Promise.resolve(m).then(O=>({status:"fulfilled",value:O}),O=>({status:"rejected",reason:O}))))};document.getElementsByTagName("link");const c=document.querySelector("meta[property=csp-nonce]"),u=(c==null?void 0:c.nonce)||(c==null?void 0:c.getAttribute("nonce"));i=o(t.map(f=>{if(f=Jx(f),f in Gm)return;Gm[f]=!0;const m=f.endsWith(".css"),O=m?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${O}`))return;const y=document.createElement("link");if(y.rel=m?"stylesheet":Kx,m||(y.as="script"),y.crossOrigin="",y.href=f,u&&y.setAttribute("nonce",u),document.head.appendChild(y),m)return new Promise((S,w)=>{y.addEventListener("load",S),y.addEventListener("error",()=>w(new Error(`Unable to preload CSS for ${f}`)))})}))}function l(o){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=o,window.dispatchEvent(c),!c.defaultPrevented)throw o}return i.then(o=>{for(const c of o||[])c.status==="rejected"&&l(c.reason);return e().catch(l)})};function tv(n){if(typeof n!="object"||n===null)return!0;const e=n;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}const Bg={primary:["bg-white text-neutral-950 font-medium","shadow-btn-primary","hover:bg-neutral-200","active:scale-[0.97]"].join(" "),secondary:["bg-transparent text-neutral-300 font-medium","border border-border","hover:bg-surface-hover hover:text-white hover:border-border-strong","active:scale-[0.98]"].join(" "),danger:["bg-accent-red text-white font-medium","hover:bg-red-600","active:scale-[0.97]"].join(" "),ghost:["bg-transparent text-neutral-400","hover:bg-surface-hover hover:text-white","active:scale-[0.98]"].join(" ")},nv={sm:"h-7 px-2.5 text-xs gap-1.5 rounded-button",md:"h-8 px-3 text-sm gap-1.5 rounded-button",lg:"h-9 px-4 text-base gap-2 rounded-button"},rv=d.forwardRef(({variant:n="secondary",size:e="md",loading:t,icon:r,children:i,className:l="",disabled:o,...c},u)=>x.jsxs("button",{ref:u,disabled:o||t,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",Bg[n],nv[e],l].join(" "),...c,children:[t?x.jsxs("svg",{className:"animate-spin h-3.5 w-3.5",viewBox:"0 0 24 24",fill:"none",children:[x.jsx("circle",{className:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor",strokeWidth:"4"}),x.jsx("path",{className:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4z"})]}):r?x.jsx("span",{className:"flex-shrink-0",children:r}):null,i&&x.jsx("span",{children:i})]}));rv.displayName="Button";const iv={sm:"min-w-7 min-h-7 rounded-button",md:"min-w-8 min-h-8 rounded-button",lg:"min-w-9 min-h-9 rounded-button"},sv=d.forwardRef(({icon:n,size:e="md",variant:t="ghost",className:r="",...i},l)=>x.jsx("button",{ref:l,className:["inline-flex items-center justify-center","transition-all duration-press ease-standard","disabled:opacity-40 disabled:pointer-events-none","select-none cursor-pointer",Bg[t],iv[e],r].join(" "),...i,children:n}));sv.displayName="IconButton";function lv({title:n,detail:e,mono:t,size:r=64,progress:i}){const l=typeof i=="number"&&Number.isFinite(i)?Math.min(1,Math.max(0,i)):void 0,o=Math.round(r*1.16);return x.jsxs("div",{className:"hf-loader",draggable:!1,children:[x.jsx("div",{className:"hf-loader-mark-frame",style:{width:o,height:o},draggable:!1,children:x.jsxs("svg",{className:"hf-loader-mark",width:r,height:r,viewBox:"0 0 100 100",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:[x.jsx("g",{className:"hf-loader-mark__mark",transform:"translate(50 50)",children:x.jsx("g",{className:"hf-loader-mark__core",transform:"scale(1)",opacity:".92",children:x.jsxs("g",{transform:"translate(-50 -50)",children:[x.jsx("path",{d:"M10.1851 57.8021L33.1145 73.8313C36.2202 75.9978 41.5173 73.5433 42.4816 69.4984L51.7611 30.4271C52.7253 26.3822 48.5802 23.9277 44.4602 26.0942L13.917 42.1235C6.96677 45.7676 4.97564 54.1579 10.1851 57.8021Z",fill:"url(#hf-loader-grad-left)"}),x.jsx("path",{d:"M87.5129 57.5141L56.9696 73.5433C52.8371 75.7098 48.7046 73.2553 49.6688 69.2104L58.9483 30.1391C59.9125 26.0942 65.2097 23.6397 68.3154 25.8062L91.2447 41.8354C96.4668 45.4796 94.4631 53.8699 87.5129 57.5141Z",fill:"url(#hf-loader-grad-right)"})]})})}),x.jsxs("defs",{children:[x.jsxs("linearGradient",{id:"hf-loader-grad-left",x1:"48.5676",y1:"25",x2:"44.7804",y2:"71.9384",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"#06E3FA"}),x.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]}),x.jsxs("linearGradient",{id:"hf-loader-grad-right",x1:"54.8282",y1:"73.8392",x2:"72.0989",y2:"32.8932",gradientUnits:"userSpaceOnUse",children:[x.jsx("stop",{stopColor:"#06E3FA"}),x.jsx("stop",{offset:"1",stopColor:"#4FDB5E"})]})]})]})}),x.jsx("div",{className:"hf-loader-title",children:n}),e&&x.jsx("div",{className:"hf-loader-detail",children:e}),l!==void 0&&x.jsx("div",{className:"hf-loader-progress","aria-hidden":"true",children:x.jsx("div",{className:"hf-loader-progress__fill",style:{transform:`scaleX(${l})`}})}),t&&x.jsx("div",{className:"hf-loader-mono",children:t})]})}function Km(n){return typeof n=="object"&&n!==null}function ov(n){if(!(n instanceof CustomEvent))return null;const e=n.detail;if(!Km(e))return null;const t=e.state;return Km(t)?t.loading===!0&&t.ready!==!0:null}function Jm(n,e){try{const t=n.contentWindow,r=n.contentDocument;if(!t||!r)return e;for(const l of r.querySelectorAll("video, audio"))if(l instanceof HTMLMediaElement&&l.readyState<HTMLMediaElement.HAVE_FUTURE_DATA)return!0;const i=t.__hfLottie;if(i!=null&&i.length){for(const l of i)if(!tv(l))return!0}return!1}catch{return e}}const qg=d.forwardRef(({projectId:n,directUrl:e,onLoad:t,portrait:r},i)=>{const l=d.useRef(null),o=d.useRef(0),c=d.useRef(null),u=d.useRef(null),[f,m]=d.useState(!1),[O,y]=d.useState(!1),[S,w]=d.useState(!1),[b,Q]=d.useState(!1);Vt(()=>{const E=l.current;if(!E)return;let P=!1,M;return ev(()=>import("./hyperframes-player-ItPxPpgM.js"),[]).then(()=>{if(P)return;const C=document.createElement("hyperframes-player"),X=e||`/api/projects/${n}/preview`;C.setAttribute("shader-capture-scale","1"),C.setAttribute("shader-loading","player"),C.setAttribute("src",X),C.setAttribute("width",String(r?1080:1920)),C.setAttribute("height",String(r?1920:1080)),C.style.width="100%",C.style.height="100%",C.style.display="block",E.appendChild(C);const Z=C.iframeElement;typeof i=="function"?i(Z):i&&(i.current=Z);const H=se=>se.stopImmediatePropagation();C.addEventListener("click",H,{capture:!0});const Y=se=>{const oe=ov(se);oe!==null&&Q(oe)};C.addEventListener("shadertransitionstate",Y);const J=()=>{if(o.current++,Q(!1),o.current>1){E.classList.remove("preview-revealing"),E.offsetWidth,E.classList.add("preview-revealing");const oe=()=>E.classList.remove("preview-revealing");E.addEventListener("animationend",oe,{once:!0})}t(),c.current&&clearInterval(c.current);let se=Jm(Z,!1);if(se){m(!0);let oe=0;c.current=setInterval(()=>{oe+=1,se=Jm(Z,se),(!se||oe>100)&&(c.current&&clearInterval(c.current),c.current=null,m(!1),se&&console.debug("[Player] Asset-loading overlay timed out after 10s; hiding anyway. Check network or asset integrity."))},100)}else m(!1)};Z.addEventListener("load",J),M=()=>{Z.removeEventListener("load",J),C.removeEventListener("click",H,{capture:!0}),C.removeEventListener("shadertransitionstate",Y),c.current&&clearInterval(c.current),c.current=null,E.removeChild(C),typeof i=="function"?i(null):i&&(i.current=null)}}),()=>{P=!0,M==null||M()}}),d.useEffect(()=>{if(u.current&&(clearTimeout(u.current),u.current=null),f){y(!0),w(!1);return}return w(!0),u.current=setTimeout(()=>{y(!1),w(!1),u.current=null},240),()=>{u.current&&(clearTimeout(u.current),u.current=null)}},[f]);const T=O&&!b;return x.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden bg-black flex items-center justify-center",children:[x.jsx("div",{ref:l,className:"w-full h-full"}),T&&x.jsx("div",{className:"absolute inset-0 bg-black flex items-center justify-center z-20 select-none","data-hyperframes-ignore":"",draggable:!1,style:{opacity:S?0:1,pointerEvents:S?"none":"auto",transition:"opacity 240ms ease-out"},onDragStart:E=>E.preventDefault(),onMouseDown:E=>E.preventDefault(),onPointerDown:E=>E.preventDefault(),children:x.jsx(lv,{title:"Preparing preview assets",detail:"Waiting for media and motion assets before playback starts.",size:56})})]})});qg.displayName="Player";const ea=30;function Dn(n){if(!Number.isFinite(n)||n<0)return"0:00";const e=Math.floor(n/60),t=Math.floor(n%60);return`${e}:${t.toString().padStart(2,"0")}`}function wf(n,e=ea){return!Number.isFinite(n)||n<=0||!Number.isFinite(e)||e<=0?0:Math.round(n*e)}function Ug(n,e=ea){return!Number.isFinite(n)||n<=0||!Number.isFinite(e)||e<=0?0:n/e}function kf(n,e,t=ea){const r=wf(n,t),i=Math.max(0,r+e);return Ug(i,t)}function e2(n,e,t=ea){const r=wf(n,t),i=wf(e,t);return`${r}f / ${i}f`}const t2=n=>{let e;const t=new Set,r=(f,m)=>{const O=typeof f=="function"?f(e):f;if(!Object.is(O,e)){const y=e;e=m??(typeof O!="object"||O===null)?O:Object.assign({},e,O),t.forEach(S=>S(e,y))}},i=()=>e,c={setState:r,getState:i,getInitialState:()=>u,subscribe:f=>(t.add(f),()=>t.delete(f))},u=e=n(r,i,c);return c},av=(n=>n?t2(n):t2),cv=n=>n;function uv(n,e=cv){const t=uc.useSyncExternalStore(n.subscribe,uc.useCallback(()=>e(n.getState()),[n,e]),uc.useCallback(()=>e(n.getInitialState()),[n,e]));return uc.useDebugValue(t),t}const n2=n=>{const e=av(n),t=r=>uv(e,r);return Object.assign(t,e),t},Gg=(n=>n?n2(n):n2),Zh=new Set,vi={notify:n=>Zh.forEach(e=>e(n)),subscribe:n=>(Zh.add(n),()=>Zh.delete(n))},Ce=Gg(n=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,playbackRate:1,loopEnabled:!1,zoomMode:"fit",manualZoomPercent:100,setIsPlaying:e=>n({isPlaying:e}),setPlaybackRate:e=>n({playbackRate:e}),setLoopEnabled:e=>n({loopEnabled:e}),setZoomMode:e=>n({zoomMode:e}),setManualZoomPercent:e=>n({manualZoomPercent:Math.max(10,Math.min(2e3,Math.round(e)))}),setCurrentTime:e=>n({currentTime:Number.isFinite(e)?e:0}),setDuration:e=>n({duration:Number.isFinite(e)?e:0}),setTimelineReady:e=>n({timelineReady:e}),setElements:e=>n({elements:e}),setSelectedElementId:e=>n({selectedElementId:e}),updateElement:(e,t)=>n(r=>({elements:r.elements.map(i=>(i.key??i.id)===e?{...i,...t}:i)})),reset:()=>n({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null})})),hv=[.25,.5,1,1.5,2],fv=8,dv=[{key:"J",label:"Play backward"},{key:"K",label:"Stop playback"},{key:"L",label:"Play forward"},{key:"←/→",label:"Step one frame backward or forward"}];function pv(n,e,t){if(!Number.isFinite(t)||t<=0)return 0;const r=(n-e)/t,i=Math.max(0,Math.min(1,r)),l=Math.min(.5,fv/t);return i<=l?0:i>=1-l?1:i}const mv=d.memo(function({onTogglePlay:e,onSeek:t}){const r=Ce(U=>U.isPlaying),i=Ce(U=>U.duration),l=Ce(U=>U.timelineReady),o=Ce(U=>U.playbackRate),c=Ce(U=>U.loopEnabled),u=Ce.getState().setPlaybackRate,f=Ce.getState().setLoopEnabled,[m,O]=d.useState(!1),[y,S]=d.useState("time"),[w,b]=d.useState(""),Q=d.useRef(null),T=d.useRef(null),E=d.useRef(null),P=d.useRef(null),M=d.useRef(null),C=d.useRef(null),X=d.useRef(!1),Z=d.useRef(0),H=d.useRef(y);H.current=y;const Y=d.useRef(i);Y.current=i,Vt(()=>{const U=ne=>{Z.current=ne;const ee=Y.current,$=ee>0?Math.min(100,ne/ee*100):0;Q.current&&(Q.current.style.width=`${$}%`),T.current&&(T.current.style.left=`${$}%`),E.current&&(E.current.textContent=H.current==="frame"?e2(ne,ee):Dn(ne)),M.current&&M.current.setAttribute("aria-valuenow",String(Math.round(ne)))},me=vi.subscribe(U);U(Ce.getState().currentTime);const B=setInterval(()=>{const ne=Ce.getState().currentTime,ee=Ce.getState().duration;if(ee>0&&ne>0){const $=Math.min(100,ne/ee*100);Q.current&&(Q.current.style.width=`${$}%`),T.current&&(T.current.style.left=`${$}%`)}},500);return()=>{me(),clearInterval(B)}}),d.useEffect(()=>{if(!E.current)return;const U=Z.current;E.current.textContent=y==="frame"?e2(U,i):Dn(U)},[i,y]),d.useEffect(()=>{if(!m)return;const U=me=>{C.current&&!C.current.contains(me.target)&&O(!1)};return document.addEventListener("mousedown",U),()=>{document.removeEventListener("mousedown",U)}},[m]);const J=d.useCallback(U=>{const me=P.current;if(!me||i<=0)return;const B=me.getBoundingClientRect(),ne=pv(U,B.left,B.width),ee=ne*100;Q.current&&(Q.current.style.width=`${ee}%`),T.current&&(T.current.style.left=`${ee}%`),t(ne*i)},[i,t]),se=d.useCallback(U=>{if(U.button!==0)return;U.preventDefault(),U.currentTarget.focus(),X.current=!0;const me=U.currentTarget,B=U.pointerId;try{me.setPointerCapture(B)}catch{}J(U.clientX);const ne=ce=>{ce.pointerId===B&&X.current&&J(ce.clientX)},ee=()=>{X.current=!1;try{me.releasePointerCapture(B)}catch{}me.removeEventListener("pointermove",ne),me.removeEventListener("pointerup",$),me.removeEventListener("pointercancel",$),window.removeEventListener("pointerup",$),window.removeEventListener("pointercancel",$),document.removeEventListener("visibilitychange",_),window.removeEventListener("blur",ee)},$=ce=>{ce.pointerId===B&&ee()},_=()=>{document.visibilityState==="hidden"&&ee()};me.addEventListener("pointermove",ne),me.addEventListener("pointerup",$),me.addEventListener("pointercancel",$),window.addEventListener("pointerup",$),window.addEventListener("pointercancel",$),document.addEventListener("visibilitychange",_),window.addEventListener("blur",ee)},[J]),oe=d.useCallback(U=>{if(!l||i<=0)return;const me=U.shiftKey?10:1;U.key==="ArrowLeft"?(U.preventDefault(),t(kf(Z.current,-me))):U.key==="ArrowRight"&&(U.preventDefault(),t(Math.min(i,kf(Z.current,me))))},[l,i,t]),ye=d.useCallback(()=>{const U=Number.parseInt(w,10);!Number.isFinite(U)||i<=0||t(Math.min(i,Ug(Math.max(0,U))))},[i,w,t]),je=d.useCallback(U=>{U.preventDefault(),ye()},[ye]),_e=d.useCallback(U=>{U.key==="Enter"&&(U.preventDefault(),ye())},[ye]);return x.jsxs("div",{className:"px-4 py-2 flex flex-wrap items-center gap-x-2 gap-y-1",style:{borderTop:"1px solid rgba(255,255,255,0.04)",paddingBottom:"calc(0.5rem + env(safe-area-inset-bottom))"},children:[x.jsx("button",{type:"button","aria-label":r?"Pause":"Play",onClick:e,disabled:!l,className:"flex-shrink-0 w-8 h-8 flex items-center justify-center rounded-lg disabled:opacity-30 disabled:pointer-events-none transition-colors",style:{background:"rgba(255,255,255,0.06)"},children:r?x.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:[x.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),x.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]}):x.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:x.jsx("polygon",{points:"6,3 20,12 6,21"})})}),x.jsxs("span",{className:"font-mono text-[11px] tabular-nums flex-shrink-0 w-[118px]",style:{color:"#A1A1AA"},children:[x.jsx("span",{ref:E,children:Dn(0)}),y==="time"?x.jsxs(x.Fragment,{children:[x.jsx("span",{style:{color:"#3F3F46",margin:"0 2px"},children:"/"}),x.jsx("span",{style:{color:"#52525B"},children:Dn(i)})]}):null]}),x.jsx("div",{ref:U=>{P.current=U,M.current=U},role:"slider",tabIndex:0,"aria-label":"Seek","aria-valuemin":0,"aria-valuemax":Math.round(i),"aria-valuenow":0,className:"min-w-[96px] flex-1 h-6 flex items-center cursor-pointer group",style:{touchAction:"none"},onPointerDown:se,onKeyDown:oe,children:x.jsxs("div",{className:"w-full rounded-full relative",style:{background:"rgba(255,255,255,0.15)",height:"3px"},children:[x.jsx("div",{ref:Q,className:"absolute top-0 bottom-0 left-0 z-[1] rounded-full",style:{background:"linear-gradient(90deg, var(--hf-accent, #3CE6AC), #2BBFA0)"}}),x.jsx("div",{ref:T,className:"absolute top-1/2 z-[2] w-3 h-3 rounded-full -translate-y-1/2 -translate-x-1/2 transition-transform group-hover:scale-125",style:{background:"var(--hf-accent, #3CE6AC)",boxShadow:"0 0 6px rgba(60,230,172,0.4), 0 1px 4px rgba(0,0,0,0.4)"}})]})}),x.jsxs("div",{ref:C,className:"relative flex-shrink-0",children:[x.jsx("button",{type:"button",onClick:()=>O(U=>!U),className:"w-10 px-2 py-1 rounded-md text-[10px] font-mono tabular-nums transition-colors",style:{color:"#71717A",background:"rgba(255,255,255,0.04)"},children:o===1?"1x":`${o}x`}),m&&x.jsx("div",{className:"absolute bottom-full right-0 mb-1.5 rounded-lg shadow-xl z-50 min-w-[56px] overflow-hidden",style:{background:"#161618",border:"1px solid rgba(255,255,255,0.08)"},children:hv.map(U=>x.jsxs("button",{onClick:()=>{u(U),O(!1)},className:"block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors",style:{color:U===o?"#FAFAFA":"#71717A",background:U===o?"rgba(255,255,255,0.06)":"transparent"},onMouseEnter:me=>{U!==o&&(me.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:me=>{U!==o&&(me.currentTarget.style.background="transparent")},children:[U,"x"]},U))})]}),x.jsx("button",{type:"button",onClick:()=>f(!c),className:`h-7 w-14 rounded-md border px-2 text-[10px] font-medium transition-colors ${c?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-400 hover:border-neutral-500 hover:bg-neutral-800"}`,title:"Loop playback","aria-label":c?"Disable loop playback":"Enable loop playback","aria-pressed":c,children:"Loop"}),x.jsx("button",{type:"button",onClick:()=>S(U=>U==="time"?"frame":"time"),className:"h-7 w-14 rounded-md border border-neutral-700 px-2 text-[10px] font-mono text-neutral-300 transition-colors hover:border-neutral-500 hover:bg-neutral-800",title:"Toggle time/frame display","aria-label":"Toggle time and frame display",children:y==="time"?"m:ss":"frames"}),x.jsx("form",{onSubmit:je,className:"hidden sm:flex flex-shrink-0 w-[58px] items-center",children:x.jsx("input",{value:w,onChange:U=>b(U.target.value),inputMode:"numeric",pattern:"[0-9]*","aria-label":"Jump to frame",placeholder:"frame",className:"h-7 w-[58px] rounded-md border border-neutral-700 bg-neutral-900 px-2 text-[10px] font-mono tabular-nums text-neutral-200 outline-none transition-colors placeholder:text-neutral-600 focus:border-studio-accent/60",onKeyDown:_e,onBlur:ye})}),x.jsx("div",{className:"hidden lg:flex items-center gap-1 text-[9px] font-mono text-neutral-500","aria-label":"Playback shortcuts: J backward, K stop, L forward, arrows step one frame",children:dv.map(U=>x.jsxs("span",{className:"group relative rounded border border-neutral-800 px-1 py-0.5",children:[U.key,x.jsx("span",{className:"pointer-events-none absolute bottom-full left-1/2 z-50 mb-1.5 hidden -translate-x-1/2 whitespace-nowrap rounded-md border border-neutral-700 bg-neutral-950 px-2 py-1 font-sans text-[10px] text-neutral-200 shadow-lg group-hover:block",children:U.label})]},U.key))})]})}),r2="#3CE6AC",Ov="#E9FFF6",gv="rgba(60,230,172,0.12)";function Br(){return{clip:r2,accent:r2,label:Ov,iconBackground:gv}}const i2={video:Br(),audio:Br(),img:Br(),div:Br(),span:Br(),p:Br(),h1:Br(),section:Br(),sfx:Br()},yv=Br(),Kg={shellBackground:"#0A0A0B",shellBorder:"rgba(255,255,255,0.05)",rulerBorder:"rgba(255,255,255,0.045)",rowBackground:"#0A0A0B",rowBorder:"rgba(255,255,255,0.05)",gutterBackground:"#0A0A0B",gutterBorder:"rgba(255,255,255,0.05)",textPrimary:"#E8EDF5",textSecondary:"#8391A8",tickText:"rgba(131,145,168,0.92)",tickMajor:"rgba(255,255,255,0.13)",tickMinor:"rgba(255,255,255,0.08)",clipBackground:"linear-gradient(180deg, rgba(20,25,34,0.98), rgba(14,18,27,0.98))",clipBackgroundActive:"linear-gradient(180deg, rgba(24,30,40,0.99), rgba(15,20,29,0.99))",clipBorder:"rgba(255,255,255,0.07)",clipBorderHover:"rgba(255,255,255,0.11)",clipBorderActive:"rgba(255,255,255,0.14)",clipShadow:"inset 0 1px 0 rgba(255,255,255,0.03), 0 6px 18px rgba(0,0,0,0.18)",clipShadowHover:"inset 0 1px 0 rgba(255,255,255,0.035), 0 8px 20px rgba(0,0,0,0.2)",clipShadowActive:"inset 0 1px 0 rgba(255,255,255,0.04), 0 10px 24px rgba(0,0,0,0.22), 0 0 0 1px rgba(255,255,255,0.035)",clipShadowDragging:"inset 0 1px 0 rgba(255,255,255,0.04), 0 18px 36px rgba(0,0,0,0.34), 0 8px 16px rgba(0,0,0,0.18), 0 0 0 1px rgba(255,255,255,0.04)",handleColor:"rgba(255,255,255,0.11)",panelResizeSeam:"rgba(255,255,255,0.12)",panelResizeActive:"rgba(255,255,255,0.24)",clipRadius:"11px 15px 13px 9px / 10px 14px 12px 10px"};function xv(n){const e=n.toLowerCase();return e.startsWith("h")&&e.length===2&&"123456".includes(e[1]??"")?i2.h1:i2[e]??yv}function vv({isHovered:n,isSelected:e,isDragging:t}){return t?.95:e?.82:n?.76:0}function Sv({element:n,draggedElementId:e,previewStart:t,previewTrack:r}){return(n.key??n.id)!==e||t===null||r===null?n:{...n,start:t,track:r}}const s2=100;function cl(n){return Math.round(n*s2)/s2}function Xo(n,e,t){return Math.min(Math.max(n,e),t)}const l2=.55,fc=40,o2=12;function a2(n,e,t){const r=(i,l,o)=>{if(o<i+fc){const c=Math.max(0,1-(o-i)/fc);return-Math.round(o2*c)}if(o>l-fc){const c=Math.max(0,1-(l-o)/fc);return Math.round(o2*c)}return 0};return{x:r(n.left,n.right,e),y:r(n.top,n.bottom,t)}}function wv(n,e,t){const r=(n.currentScrollLeft??0)-(n.originScrollLeft??0),i=(n.currentScrollTop??0)-(n.originScrollTop??0),l=(e-n.originClientX+r)/Math.max(n.pixelsPerSecond,1),o=(t-n.originClientY+i)/Math.max(n.trackHeight,1),c=Math.round(o),u=Math.max(0,n.trackOrder.indexOf(n.track)),f=u+c,m=Xo(f,0,Math.max(0,n.trackOrder.length-1)),O=Math.min(...n.trackOrder),y=Math.max(...n.trackOrder);let S=n.trackOrder[m]??n.track;const w=u===0,b=u===n.trackOrder.length-1;return w&&f<0&&u+o<=-l2?S=O-1:b&&f>n.trackOrder.length-1&&u+o>=n.trackOrder.length-1+l2&&(S=y+1),{start:Xo(cl(n.start+l),0,Math.max(0,n.maxStart)),track:S}}function Eh(n){const e=Array.from(new Set(n)).sort((r,i)=>r-i),t=e.length;return new Map(e.map((r,i)=>[r,t-i]))}function kv(n,e,t){const r=Math.max(.05,n.minDuration??.1),i=(t-n.originClientX)/Math.max(n.pixelsPerSecond,1);if(e==="end"){const S=Xo(cl(n.duration+i),r,Math.max(r,n.maxEnd-n.start));return{start:n.start,duration:S,playbackStart:n.playbackStart}}const l=Math.max(.1,n.playbackRate??1),o=n.playbackStart!=null?n.playbackStart/l:Number.POSITIVE_INFINITY,c=-Math.min(n.start-n.minStart,o),u=n.duration-r,f=Xo(i,c,u),m=cl(n.start+f),O=cl(n.duration-f),y=n.playbackStart!=null?cl(Math.max(0,n.playbackStart+f*l)):void 0;return{start:m,duration:O,playbackStart:y}}function bv(n){if(n.compositionSrc||n.playbackStartAttr!=null||n.sourceDuration!=null&&Number.isFinite(n.sourceDuration)&&n.sourceDuration>0)return!0;const e=n.tag.toLowerCase();return["video","audio","img"].includes(e)}function Qv(n){return!!(n.domId||n.selector)}function $v(n){if(n.playbackStartAttr!=null||n.playbackStart!=null)return!0;const e=n.tag.toLowerCase();return["video","audio"].includes(e)}function Jg(n){const e=Qv(n),t=Number.isFinite(n.duration)&&n.duration>0,r=bv(n);return{canMove:e&&r,canTrimEnd:e&&t&&r,canTrimStart:e&&t&&$v(n)}}function Pv(n){if(n.capabilities.canMove)return null;const e=Math.max(0,n.width),t=Xo(n.offsetX,0,e),r=Math.max(0,n.handleWidth);return t<=r&&!n.capabilities.canTrimStart?"resize-start":t>=Math.max(0,e-r)&&!n.capabilities.canTrimEnd?"resize-end":"move"}function Av(n,e){return{start:n.start,end:n.start+n.duration,anchorX:e.anchorX,anchorY:e.anchorY}}function Cv({rangeStart:n,rangeEnd:e,elements:t,prompt:r}){const i=Math.min(n,e),l=Math.max(n,e),o=t.map(c=>`- #${c.id} (${c.tag}) — ${Dn(c.start)} to ${Dn(c.start+c.duration)}, track ${c.track}`).join(`
41
41
  `);return`Edit the following HyperFrames composition:
42
42
 
43
43
  Time range: ${Dn(i)} — ${Dn(l)}
package/dist/index.html CHANGED
@@ -4,7 +4,7 @@
4
4
  <meta charset="UTF-8" />
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover" />
6
6
  <title>HyperFrames Studio</title>
7
- <script type="module" crossorigin src="/assets/index-CqiisJmo.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-BkBbJZGa.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-BKjcNNNd.css">
9
9
  </head>
10
10
  <body>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hyperframes/studio",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,8 +32,8 @@
32
32
  "@phosphor-icons/react": "^2.1.10",
33
33
  "codemirror": "^6.0.1",
34
34
  "motion": "^12.38.0",
35
- "@hyperframes/core": "0.5.1",
36
- "@hyperframes/player": "0.5.1"
35
+ "@hyperframes/core": "0.5.3",
36
+ "@hyperframes/player": "0.5.3"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@types/react": "^19.0.0",
@@ -47,7 +47,7 @@
47
47
  "vite": "^6.4.2",
48
48
  "vitest": "^3.2.4",
49
49
  "zustand": "^5.0.0",
50
- "@hyperframes/producer": "0.5.1"
50
+ "@hyperframes/producer": "0.5.3"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": "^18.0.0 || ^19.0.0",