@hyperframes/studio 0.4.11 → 0.4.12

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.
@@ -0,0 +1,198 @@
1
+ var O=Object.defineProperty;var R=(l,f,e)=>f in l?O(l,f,{enumerable:!0,configurable:!0,writable:!0,value:e}):l[f]=e;var u=(l,f,e)=>R(l,typeof f!="symbol"?f+"":f,e);var N=`
2
+ :host {
3
+ display: block;
4
+ position: relative;
5
+ overflow: hidden;
6
+ background: #000;
7
+ contain: layout style;
8
+ }
9
+
10
+ .hfp-container {
11
+ position: absolute;
12
+ inset: 0;
13
+ overflow: hidden;
14
+ pointer-events: none;
15
+ }
16
+
17
+
18
+ .hfp-iframe {
19
+ position: absolute;
20
+ top: 50%;
21
+ left: 50%;
22
+ border: none;
23
+ pointer-events: none;
24
+ }
25
+
26
+ .hfp-poster {
27
+ position: absolute;
28
+ inset: 0;
29
+ object-fit: contain;
30
+ z-index: 1;
31
+ pointer-events: none;
32
+ }
33
+
34
+ /* ── Theming via CSS custom properties ──
35
+ *
36
+ * Override from outside the shadow DOM:
37
+ * hyperframes-player {
38
+ * --hfp-controls-bg: linear-gradient(transparent, rgba(0,0,0,0.9));
39
+ * --hfp-accent: #ff6b6b;
40
+ * --hfp-font: "Inter", sans-serif;
41
+ * }
42
+ */
43
+
44
+ .hfp-controls {
45
+ position: absolute;
46
+ bottom: 0;
47
+ left: 0;
48
+ right: 0;
49
+ display: flex;
50
+ align-items: center;
51
+ gap: var(--hfp-controls-gap, 12px);
52
+ padding: var(--hfp-controls-padding, 8px 16px);
53
+ background: var(--hfp-controls-bg, linear-gradient(transparent, rgba(0, 0, 0, 0.7)));
54
+ color: var(--hfp-color, #fff);
55
+ font-family: var(--hfp-font, system-ui, -apple-system, sans-serif);
56
+ font-size: var(--hfp-font-size, 13px);
57
+ z-index: 10;
58
+ pointer-events: auto;
59
+ opacity: 1;
60
+ transition: opacity 0.3s ease;
61
+ user-select: none;
62
+ }
63
+
64
+ .hfp-controls.hfp-hidden {
65
+ opacity: 0;
66
+ pointer-events: none;
67
+ }
68
+
69
+ .hfp-play-btn {
70
+ background: none;
71
+ border: none;
72
+ color: var(--hfp-color, #fff);
73
+ cursor: pointer;
74
+ padding: 8px;
75
+ display: flex;
76
+ align-items: center;
77
+ justify-content: center;
78
+ width: 40px;
79
+ height: 40px;
80
+ flex-shrink: 0;
81
+ z-index: 10;
82
+ }
83
+
84
+ .hfp-play-btn:hover {
85
+ opacity: 0.8;
86
+ }
87
+
88
+ .hfp-play-btn svg,
89
+ .hfp-play-btn svg * {
90
+ pointer-events: none;
91
+ }
92
+
93
+ .hfp-scrubber {
94
+ flex: 1;
95
+ height: var(--hfp-scrubber-height, 4px);
96
+ background: var(--hfp-scrubber-bg, rgba(255, 255, 255, 0.3));
97
+ border-radius: var(--hfp-scrubber-radius, 2px);
98
+ cursor: pointer;
99
+ position: relative;
100
+ }
101
+
102
+ .hfp-scrubber:hover {
103
+ height: var(--hfp-scrubber-height-hover, 6px);
104
+ }
105
+
106
+ .hfp-progress {
107
+ position: absolute;
108
+ top: 0;
109
+ left: 0;
110
+ height: 100%;
111
+ background: var(--hfp-accent, #fff);
112
+ border-radius: var(--hfp-scrubber-radius, 2px);
113
+ pointer-events: none;
114
+ }
115
+
116
+ .hfp-time {
117
+ flex-shrink: 0;
118
+ font-variant-numeric: tabular-nums;
119
+ opacity: 0.9;
120
+ }
121
+
122
+ .hfp-speed-wrap {
123
+ position: relative;
124
+ flex-shrink: 0;
125
+ }
126
+
127
+ .hfp-speed-btn {
128
+ background: var(--hfp-speed-btn-bg, rgba(255, 255, 255, 0.15));
129
+ border: none;
130
+ border-radius: var(--hfp-speed-btn-radius, 4px);
131
+ color: var(--hfp-color, #fff);
132
+ cursor: pointer;
133
+ font-family: var(--hfp-font, system-ui, -apple-system, sans-serif);
134
+ font-size: 12px;
135
+ font-variant-numeric: tabular-nums;
136
+ font-weight: 600;
137
+ padding: 4px 8px;
138
+ min-width: 40px;
139
+ text-align: center;
140
+ transition: background 0.15s ease;
141
+ }
142
+
143
+ .hfp-speed-btn:hover {
144
+ background: var(--hfp-speed-btn-bg-hover, rgba(255, 255, 255, 0.3));
145
+ }
146
+
147
+ .hfp-speed-menu {
148
+ position: absolute;
149
+ bottom: calc(100% + 8px);
150
+ right: 0;
151
+ background: var(--hfp-menu-bg, rgba(20, 20, 20, 0.95));
152
+ backdrop-filter: blur(12px);
153
+ -webkit-backdrop-filter: blur(12px);
154
+ border: 1px solid var(--hfp-menu-border, rgba(255, 255, 255, 0.1));
155
+ border-radius: var(--hfp-menu-radius, 8px);
156
+ padding: 4px;
157
+ display: flex;
158
+ flex-direction: column;
159
+ gap: 2px;
160
+ min-width: 80px;
161
+ opacity: 0;
162
+ visibility: hidden;
163
+ transform: translateY(4px);
164
+ transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
165
+ box-shadow: var(--hfp-menu-shadow, 0 8px 24px rgba(0, 0, 0, 0.4));
166
+ }
167
+
168
+ .hfp-speed-menu.hfp-open {
169
+ opacity: 1;
170
+ visibility: visible;
171
+ transform: translateY(0);
172
+ }
173
+
174
+ .hfp-speed-option {
175
+ background: none;
176
+ border: none;
177
+ border-radius: 4px;
178
+ color: var(--hfp-menu-color, rgba(255, 255, 255, 0.7));
179
+ cursor: pointer;
180
+ font-family: var(--hfp-font, system-ui, -apple-system, sans-serif);
181
+ font-size: 13px;
182
+ font-variant-numeric: tabular-nums;
183
+ padding: 6px 12px;
184
+ text-align: left;
185
+ transition: background 0.1s ease, color 0.1s ease;
186
+ white-space: nowrap;
187
+ }
188
+
189
+ .hfp-speed-option:hover {
190
+ background: var(--hfp-menu-hover-bg, rgba(255, 255, 255, 0.1));
191
+ color: var(--hfp-color, #fff);
192
+ }
193
+
194
+ .hfp-speed-option.hfp-active {
195
+ color: var(--hfp-accent, #fff);
196
+ font-weight: 600;
197
+ }
198
+ `,T='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><polygon points="4,2 16,9 4,16"/></svg>',D='<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>',F=[.25,.5,1,1.5,2,4];function x(l){return Number.isInteger(l)?`${l}x`:`${l}x`}function S(l){if(!Number.isFinite(l)||l<0)return"0:00";let f=Math.floor(l),e=Math.floor(f/60),t=f%60;return`${e}:${t.toString().padStart(2,"0")}`}function H(l,f,e={}){let t=e.speedPresets??F,i=document.createElement("div");i.className="hfp-controls",i.addEventListener("click",s=>{s.stopPropagation()});let a=document.createElement("button");a.className="hfp-play-btn",a.type="button",a.innerHTML=T,a.setAttribute("aria-label","Play");let n=document.createElement("div");n.className="hfp-scrubber";let r=document.createElement("div");r.className="hfp-progress",r.style.width="0%",n.appendChild(r);let p=document.createElement("span");p.className="hfp-time",p.textContent="0:00 / 0:00";let b=document.createElement("div");b.className="hfp-speed-wrap";let o=document.createElement("button");o.className="hfp-speed-btn",o.type="button",o.textContent="1x",o.setAttribute("aria-label","Playback speed");let h=document.createElement("div");h.className="hfp-speed-menu",h.setAttribute("role","menu");for(let s of t){let d=document.createElement("button");d.className="hfp-speed-option",d.type="button",d.setAttribute("role","menuitem"),d.dataset.speed=String(s),d.textContent=x(s),s===1&&d.classList.add("hfp-active"),h.appendChild(d)}b.appendChild(h),b.appendChild(o),i.appendChild(a),i.appendChild(n),i.appendChild(p),i.appendChild(b),l.appendChild(i);let m=!1,c=null;t.indexOf(1),a.addEventListener("click",s=>{s.stopPropagation(),m?f.onPause():f.onPlay()});let _=s=>{for(let d of h.querySelectorAll(".hfp-speed-option"))d.classList.toggle("hfp-active",d.dataset.speed===String(s))};o.addEventListener("click",s=>{s.stopPropagation();let d=h.classList.toggle("hfp-open");o.setAttribute("aria-expanded",String(d))}),h.addEventListener("click",s=>{s.stopPropagation();let d=s.target.closest(".hfp-speed-option");if(!d)return;let g=parseFloat(d.dataset.speed);t.indexOf(g),o.textContent=x(g),_(g),h.classList.remove("hfp-open"),o.setAttribute("aria-expanded","false"),f.onSpeedChange(g)});let E=()=>{h.classList.remove("hfp-open"),o.setAttribute("aria-expanded","false")};document.addEventListener("click",E);let w=s=>{let d=n.getBoundingClientRect(),g=Math.max(0,Math.min(1,(s-d.left)/d.width));f.onSeek(g)},v=!1;n.addEventListener("mousedown",s=>{s.stopPropagation(),v=!0,w(s.clientX)});let M=s=>{v&&w(s.clientX)},P=()=>{v=!1};document.addEventListener("mousemove",M),document.addEventListener("mouseup",P),n.addEventListener("touchstart",s=>{v=!0;let d=s.touches[0];d&&w(d.clientX)},{passive:!0});let A=s=>{if(v){let d=s.touches[0];d&&w(d.clientX)}},C=()=>{v=!1};document.addEventListener("touchmove",A,{passive:!0}),document.addEventListener("touchend",C);let I=()=>{c&&clearTimeout(c),c=setTimeout(()=>{m&&i.classList.add("hfp-hidden")},3e3)},L=l instanceof ShadowRoot?l.host:l;return L.addEventListener("mousemove",()=>{i.classList.remove("hfp-hidden"),I()}),L.addEventListener("mouseleave",()=>{m&&i.classList.add("hfp-hidden")}),{updateTime(s,d){let g=d>0?s/d*100:0;r.style.width=`${g}%`,p.textContent=`${S(s)} / ${S(d)}`},updatePlaying(s){m=s,a.innerHTML=s?D:T,a.setAttribute("aria-label",s?"Pause":"Play"),s?I():i.classList.remove("hfp-hidden")},updateSpeed(s){t.indexOf(s),o.textContent=x(s),_(s)},show(){i.style.display=""},hide(){i.style.display="none"},destroy(){document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",P),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",C),document.removeEventListener("click",E),c&&clearTimeout(c)}}}function j(l){return l.hasRuntime||l.runtimeInjected?!1:!!(l.hasNestedCompositions||l.hasTimelines&&l.attempts>=5)}var k=30,z="https://cdn.jsdelivr.net/npm/@hyperframes/core/dist/hyperframe.runtime.iife.js",y,U=(y=class extends HTMLElement{constructor(){super();u(this,"shadow");u(this,"container");u(this,"iframe");u(this,"posterEl",null);u(this,"controlsApi",null);u(this,"resizeObserver");u(this,"_ready",!1);u(this,"_duration",0);u(this,"_currentTime",0);u(this,"_paused",!0);u(this,"_compositionWidth",1920);u(this,"_compositionHeight",1080);u(this,"_probeInterval",null);u(this,"_lastUpdateMs",0);u(this,"_parentMedia",[]);u(this,"_audioOwner","runtime");u(this,"_mediaObserver");u(this,"_playbackErrorPosted",!1);u(this,"_runtimeInjected",!1);this.shadow=this.attachShadow({mode:"open"});let e=document.createElement("style");e.textContent=N,this.shadow.appendChild(e),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),this.addEventListener("click",t=>{this._isControlsClick(t)||(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","width","height","controls","muted","poster","playback-rate","audio-src"]}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("src")&&(this.iframe.src=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._teardownMediaObserver(),(e=this.controlsApi)==null||e.destroy();for(let t of this._parentMedia)t.el.pause(),t.el.src="";this._parentMedia=[]}attributeChangedCallback(e,t,i){var a,n;switch(e){case"src":i&&(this._ready=!1,this.iframe.src=i);break;case"width":this._compositionWidth=parseInt(i||"1920",10),this._updateScale();break;case"height":this._compositionHeight=parseInt(i||"1080",10),this._updateScale();break;case"controls":i!==null?this._setupControls():((a=this.controlsApi)==null||a.destroy(),this.controlsApi=null);break;case"poster":this._setupPoster();break;case"playback-rate":{let r=parseFloat(i||"1");for(let p of this._parentMedia)p.el.playbackRate=r;this._sendControl("set-playback-rate",{playbackRate:r}),(n=this.controlsApi)==null||n.updateSpeed(r),this.dispatchEvent(new Event("ratechange"));break}case"muted":for(let r of this._parentMedia)r.el.muted=i!==null;this._sendControl("set-muted",{muted:i!==null});break;case"audio-src":i&&this._setupParentAudioFromUrl(i);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 i,a;let t=Math.round(e*k);if(this._sendControl("seek",{frame:t}),this._currentTime=e,this._audioOwner==="parent")for(let n of this._parentMedia){let r=e-n.start;r>=0&&r<n.duration&&(n.el.currentTime=r)}this._paused=!0,(i=this.controlsApi)==null||i.updatePlaying(!1),(a=this.controlsApi)==null||a.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 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 i;try{(i=this.iframe.contentWindow)==null||i.postMessage({source:"hf-parent",type:"control",action:e,...t},"*")}catch{}}_isControlsClick(e){return e.composedPath().some(t=>t instanceof HTMLElement&&t.classList.contains("hfp-controls"))}_onMessage(e){var i,a,n,r;if(e.source!==this.iframe.contentWindow)return;let t=e.data;if(!(!t||t.source!=="hf-preview")){if(t.type==="state"){this._currentTime=(t.frame??0)/k;let p=!this._paused;this._paused=!t.isPlaying,this._audioOwner==="parent"&&(p&&this._paused?this._pauseParentMedia():!p&&!this._paused&&this._playParentMedia(),this._mirrorParentMediaTime(this._currentTime));let b=performance.now();(b-this._lastUpdateMs>100||this._paused!==p)&&(this._lastUpdateMs=b,(i=this.controlsApi)==null||i.updateTime(this._currentTime,this._duration),(a=this.controlsApi)==null||a.updatePlaying(!this._paused),this.dispatchEvent(new CustomEvent("timeupdate",{detail:{currentTime:this._currentTime}}))),this._currentTime>=this._duration&&!this._paused&&(this._audioOwner==="parent"&&this._pauseParentMedia(),this.loop?(this.seek(0),this.play()):(this._paused=!0,(n=this.controlsApi)==null||n.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/k,(r=this.controlsApi)==null||r.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;let 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 i,a,n;e++;try{let r=this.iframe.contentWindow;if(!r)return;let p=!!(r.__hf||r.__player),b=!!(r.__timelines&&Object.keys(r.__timelines).length>0),o=!!((i=this.iframe.contentDocument)!=null&&i.querySelector("[data-composition-src]"));if(j({hasRuntime:p,hasTimelines:b,hasNestedCompositions:o,runtimeInjected:this._runtimeInjected,attempts:e})){this._injectRuntime();return}if(this._runtimeInjected&&!p)return;let h=(()=>{var m,c;if(r.__player&&typeof r.__player.getDuration=="function")return r.__player;if(r.__timelines){let _=Object.keys(r.__timelines);if(_.length>0){let E=(c=(m=this.iframe.contentDocument)==null?void 0:m.querySelector("[data-composition-id]"))==null?void 0:c.getAttribute("data-composition-id"),w=E&&E in r.__timelines?E:_[_.length-1],v=r.__timelines[w];return{getDuration:()=>v.duration()}}}return null})();if(h&&h.getDuration()>0){clearInterval(this._probeInterval),this._duration=h.getDuration(),this._ready=!0,(a=this.controlsApi)==null||a.updateTime(0,this._duration),this.dispatchEvent(new CustomEvent("ready",{detail:{duration:this._duration}}));let m=(n=this.iframe.contentDocument)==null?void 0:n.querySelector("[data-composition-id]");if(m){let c=parseInt(m.getAttribute("data-width")||"0",10),_=parseInt(m.getAttribute("data-height")||"0",10);c>0&&_>0&&(this._compositionWidth=c,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{let e=this.iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=z,t.onload=()=>{},t.onerror=()=>{},(e.head||e.documentElement).appendChild(t)}catch{}}_updateScale(){let e=this.getBoundingClientRect();if(e.width===0||e.height===0)return;let 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;let e={onPlay:()=>this.play(),onPause:()=>this.pause(),onSeek:a=>this.seek(a*this._duration),onSpeedChange:a=>{this.playbackRate=a}},t=this.getAttribute("speed-presets"),i=t?t.split(",").map(Number).filter(a=>!isNaN(a)&&a>0):void 0;this.controlsApi=H(this.shadow,e,{speedPresets:i})}_setupPoster(){var t;let 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(let 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(let e of this._parentMedia)e.el.pause()}_mirrorParentMediaTime(e){for(let t of this._parentMedia){let i=e-t.start;i<0||i>=t.duration||Math.abs(t.el.currentTime-i)>y.MIRROR_DRIFT_THRESHOLD_SECONDS&&(t.el.currentTime=i)}}_promoteToParentProxy(){this._audioOwner!=="parent"&&(this._audioOwner="parent",this._sendControl("set-media-output-muted",{muted:!0}),this._mirrorParentMediaTime(this._currentTime),this._paused||this._playParentMedia(),this.dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"parent",reason:"autoplay-blocked"}})))}_createParentMedia(e,t,i,a){if(this._parentMedia.some(p=>p.el.src===e))return null;let n=t==="video"?document.createElement("video"):new Audio;n.preload="auto",n.src=e,n.load(),n.muted=this.muted,this.playbackRate!==1&&(n.playbackRate=this.playbackRate);let r={el:n,start:i,duration:a};return this._parentMedia.push(r),r}_setupParentAudioFromUrl(e){this._createParentMedia(e,"audio",0,1/0)}_setupParentMedia(){try{let e=this.iframe.contentDocument;if(!e)return;let t=e.querySelectorAll("audio[data-start], video[data-start]");for(let i of t)this._adoptIframeMedia(i);this._observeDynamicMedia(e)}catch{}}_adoptIframeMedia(e){var b;let t=e.getAttribute("src")||((b=e.querySelector("source"))==null?void 0:b.getAttribute("src"));if(!t)return;let i=new URL(t,e.ownerDocument.baseURI).href,a=parseFloat(e.getAttribute("data-start")||"0"),n=parseFloat(e.getAttribute("data-duration")||"Infinity"),r=e.tagName==="VIDEO"?"video":"audio",p=this._createParentMedia(i,r,a,n);p&&this._audioOwner==="parent"&&(this._mirrorParentMediaTime(this._currentTime),!this._paused&&p.el.src&&p.el.play().catch(o=>this._reportPlaybackError(o)))}_observeDynamicMedia(e){if(this._teardownMediaObserver(),typeof MutationObserver>"u"||!e.body)return;let t=new MutationObserver(i=>{var a,n,r,p;for(let b of i){for(let o of b.addedNodes){if(!(o instanceof Element))continue;let h=[];(a=o.matches)!=null&&a.call(o,"audio[data-start], video[data-start]")&&h.push(o);let m=(n=o.querySelectorAll)==null?void 0:n.call(o,"audio[data-start], video[data-start]");if(m)for(let c of m)h.push(c);for(let c of h)this._adoptIframeMedia(c)}for(let o of b.removedNodes){if(!(o instanceof Element))continue;let h=[];(r=o.matches)!=null&&r.call(o,"audio[data-start], video[data-start]")&&h.push(o);let m=(p=o.querySelectorAll)==null?void 0:p.call(o,"audio[data-start], video[data-start]");if(m)for(let c of m)h.push(c);for(let c of h)this._detachIframeMedia(c)}}});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 r;let t=e.getAttribute("src")||((r=e.querySelector("source"))==null?void 0:r.getAttribute("src"));if(!t)return;let i=new URL(t,e.ownerDocument.baseURI).href,a=this._parentMedia.findIndex(p=>p.el.src===i);if(a===-1)return;let n=this._parentMedia[a];n.el.pause(),n.el.src="",this._parentMedia.splice(a,1)}_hidePoster(){var e;(e=this.posterEl)==null||e.remove(),this.posterEl=null}},u(y,"MIRROR_DRIFT_THRESHOLD_SECONDS",.05),y);customElements.get("hyperframes-player")||customElements.define("hyperframes-player",U);export{U as HyperframesPlayer,F as SPEED_PRESETS,x as formatSpeed,S as formatTime};
@@ -37,7 +37,7 @@
37
37
  `+g[k].replace(" at new "," at ");return s.displayName&&T.includes("<anonymous>")&&(T=T.replace("<anonymous>",s.displayName)),T}while(1<=k&&0<=A);break}}}finally{G=!1,Error.prepareStackTrace=h}return(s=s?s.displayName||s.name:"")?L(s):""}function fe(s){switch(s.tag){case 5:return L(s.type);case 16:return L("Lazy");case 13:return L("Suspense");case 19:return L("SuspenseList");case 0:case 2:case 15:return s=se(s.type,!1),s;case 11:return s=se(s.type.render,!1),s;case 1:return s=se(s.type,!0),s;default:return""}}function $e(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 E:return"Fragment";case _:return"Portal";case Y:return"Profiler";case R:return"StrictMode";case U:return"Suspense";case re:return"SuspenseList"}if(typeof s=="object")switch(s.$$typeof){case J:return(s.displayName||"Context")+".Consumer";case le:return(s._context.displayName||"Context")+".Provider";case z:var o=s.render;return s=s.displayName,s||(s=o.displayName||o.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case K:return o=s.displayName||null,o!==null?o:$e(s.type)||"Memo";case ae:o=s._payload,s=s._init;try{return $e(s(o))}catch{}}return null}function ue(s){var o=s.type;switch(s.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return s=o.render,s=s.displayName||s.name||"",o.displayName||(s!==""?"ForwardRef("+s+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return $e(o);case 8:return o===R?"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 o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function pe(s){switch(typeof s){case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function ve(s){var o=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Te(s){var o=ve(s)?"checked":"value",h=Object.getOwnPropertyDescriptor(s.constructor.prototype,o),d=""+s[o];if(!s.hasOwnProperty(o)&&typeof h<"u"&&typeof h.get=="function"&&typeof h.set=="function"){var g=h.get,x=h.set;return Object.defineProperty(s,o,{configurable:!0,get:function(){return g.call(this)},set:function(k){d=""+k,x.call(this,k)}}),Object.defineProperty(s,o,{enumerable:h.enumerable}),{getValue:function(){return d},setValue:function(k){d=""+k},stopTracking:function(){s._valueTracker=null,delete s[o]}}}}function Ee(s){s._valueTracker||(s._valueTracker=Te(s))}function De(s){if(!s)return!1;var o=s._valueTracker;if(!o)return!0;var h=o.getValue(),d="";return s&&(d=ve(s)?s.checked?"true":"false":s.value),s=d,s!==h?(o.setValue(s),!0):!1}function ht(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 B(s,o){var h=o.checked;return F({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:h??s._wrapperState.initialChecked})}function Ze(s,o){var h=o.defaultValue==null?"":o.defaultValue,d=o.checked!=null?o.checked:o.defaultChecked;h=pe(o.value!=null?o.value:h),s._wrapperState={initialChecked:d,initialValue:h,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Ne(s,o){o=o.checked,o!=null&&P(s,"checked",o,!1)}function Me(s,o){Ne(s,o);var h=pe(o.value),d=o.type;if(h!=null)d==="number"?(h===0&&s.value===""||s.value!=h)&&(s.value=""+h):s.value!==""+h&&(s.value=""+h);else if(d==="submit"||d==="reset"){s.removeAttribute("value");return}o.hasOwnProperty("value")?Fe(s,o.type,h):o.hasOwnProperty("defaultValue")&&Fe(s,o.type,pe(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(s.defaultChecked=!!o.defaultChecked)}function Ke(s,o,h){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var d=o.type;if(!(d!=="submit"&&d!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+s._wrapperState.initialValue,h||o===s.value||(s.value=o),s.defaultValue=o}h=s.name,h!==""&&(s.name=""),s.defaultChecked=!!s._wrapperState.initialChecked,h!==""&&(s.name=h)}function Fe(s,o,h){(o!=="number"||ht(s.ownerDocument)!==s)&&(h==null?s.defaultValue=""+s._wrapperState.initialValue:s.defaultValue!==""+h&&(s.defaultValue=""+h))}var st=Array.isArray;function vt(s,o,h,d){if(s=s.options,o){o={};for(var g=0;g<h.length;g++)o["$"+h[g]]=!0;for(h=0;h<s.length;h++)g=o.hasOwnProperty("$"+s[h].value),s[h].selected!==g&&(s[h].selected=g),g&&d&&(s[h].defaultSelected=!0)}else{for(h=""+pe(h),o=null,g=0;g<s.length;g++){if(s[g].value===h){s[g].selected=!0,d&&(s[g].defaultSelected=!0);return}o!==null||s[g].disabled||(o=s[g])}o!==null&&(o.selected=!0)}}function St(s,o){if(o.dangerouslySetInnerHTML!=null)throw Error(t(91));return F({},o,{value:void 0,defaultValue:void 0,children:""+s._wrapperState.initialValue})}function er(s,o){var h=o.value;if(h==null){if(h=o.children,o=o.defaultValue,h!=null){if(o!=null)throw Error(t(92));if(st(h)){if(1<h.length)throw Error(t(93));h=h[0]}o=h}o==null&&(o=""),h=o}s._wrapperState={initialValue:pe(h)}}function Nn(s,o){var h=pe(o.value),d=pe(o.defaultValue);h!=null&&(h=""+h,h!==s.value&&(s.value=h),o.defaultValue==null&&s.defaultValue!==h&&(s.defaultValue=h)),d!=null&&(s.defaultValue=""+d)}function tr(s){var o=s.textContent;o===s._wrapperState.initialValue&&o!==""&&o!==null&&(s.value=o)}function _n(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 Ut(s,o){return s==null||s==="http://www.w3.org/1999/xhtml"?_n(o):s==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":s}var Xr,H=(function(s){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,h,d,g){MSApp.execUnsafeLocalFunction(function(){return s(o,h,d,g)})}:s})(function(s,o){if(s.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in s)s.innerHTML=o;else{for(Xr=Xr||document.createElement("div"),Xr.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Xr.firstChild;s.firstChild;)s.removeChild(s.firstChild);for(;o.firstChild;)s.appendChild(o.firstChild)}});function he(s,o){if(o){var h=s.firstChild;if(h&&h===s.lastChild&&h.nodeType===3){h.nodeValue=o;return}}s.textContent=o}var Oe={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},Le=["Webkit","ms","Moz","O"];Object.keys(Oe).forEach(function(s){Le.forEach(function(o){o=o+s.charAt(0).toUpperCase()+s.substring(1),Oe[o]=Oe[s]})});function Pe(s,o,h){return o==null||typeof o=="boolean"||o===""?"":h||typeof o!="number"||o===0||Oe.hasOwnProperty(s)&&Oe[s]?(""+o).trim():o+"px"}function Gt(s,o){s=s.style;for(var h in o)if(o.hasOwnProperty(h)){var d=h.indexOf("--")===0,g=Pe(h,o[h],d);h==="float"&&(h="cssFloat"),d?s.setProperty(h,g):s[h]=g}}var gn=F({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 Nt(s,o){if(o){if(gn[s]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(t(137,s));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(t(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(t(61))}if(o.style!=null&&typeof o.style!="object")throw Error(t(62))}}function xi(s,o){if(s.indexOf("-")===-1)return typeof o.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 Ii=null;function _t(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var ft=null,Nr=null,_r=null;function go(s){if(s=pl(s)){if(typeof ft!="function")throw Error(t(280));var o=s.stateNode;o&&(o=_o(o),ft(s.stateNode,s.type,o))}}function Ys(s){Nr?_r?_r.push(s):_r=[s]:Nr=s}function Yi(){if(Nr){var s=Nr,o=_r;if(_r=Nr=null,go(s),o)for(s=0;s<o.length;s++)go(o[s])}}function Of(s,o){return s(o)}function gf(){}var tu=!1;function yf(s,o,h){if(tu)return s(o,h);tu=!0;try{return Of(s,o,h)}finally{tu=!1,(Nr!==null||_r!==null)&&(gf(),Yi())}}function Fs(s,o){var h=s.stateNode;if(h===null)return null;var d=_o(h);if(d===null)return null;h=d[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(d=!d.disabled)||(s=s.type,d=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!d;break e;default:s=!1}if(s)return null;if(h&&typeof h!="function")throw Error(t(231,o,typeof h));return h}var nu=!1;if(c)try{var Bs={};Object.defineProperty(Bs,"passive",{get:function(){nu=!0}}),window.addEventListener("test",Bs,Bs),window.removeEventListener("test",Bs,Bs)}catch{nu=!1}function _6(s,o,h,d,g,x,k,A,T){var W=Array.prototype.slice.call(arguments,3);try{o.apply(h,W)}catch(ne){this.onError(ne)}}var qs=!1,yo=null,xo=!1,ru=null,z6={onError:function(s){qs=!0,yo=s}};function D6(s,o,h,d,g,x,k,A,T){qs=!1,yo=null,_6.apply(z6,arguments)}function W6(s,o,h,d,g,x,k,A,T){if(D6.apply(this,arguments),qs){if(qs){var W=yo;qs=!1,yo=null}else throw Error(t(198));xo||(xo=!0,ru=W)}}function vi(s){var o=s,h=s;if(s.alternate)for(;o.return;)o=o.return;else{s=o;do o=s,(o.flags&4098)!==0&&(h=o.return),s=o.return;while(s)}return o.tag===3?h:null}function xf(s){if(s.tag===13){var o=s.memoizedState;if(o===null&&(s=s.alternate,s!==null&&(o=s.memoizedState)),o!==null)return o.dehydrated}return null}function vf(s){if(vi(s)!==s)throw Error(t(188))}function H6(s){var o=s.alternate;if(!o){if(o=vi(s),o===null)throw Error(t(188));return o!==s?null:s}for(var h=s,d=o;;){var g=h.return;if(g===null)break;var x=g.alternate;if(x===null){if(d=g.return,d!==null){h=d;continue}break}if(g.child===x.child){for(x=g.child;x;){if(x===h)return vf(g),s;if(x===d)return vf(g),o;x=x.sibling}throw Error(t(188))}if(h.return!==d.return)h=g,d=x;else{for(var k=!1,A=g.child;A;){if(A===h){k=!0,h=g,d=x;break}if(A===d){k=!0,d=g,h=x;break}A=A.sibling}if(!k){for(A=x.child;A;){if(A===h){k=!0,h=x,d=g;break}if(A===d){k=!0,d=x,h=g;break}A=A.sibling}if(!k)throw Error(t(189))}}if(h.alternate!==d)throw Error(t(190))}if(h.tag!==3)throw Error(t(188));return h.stateNode.current===h?s:o}function Sf(s){return s=H6(s),s!==null?wf(s):null}function wf(s){if(s.tag===5||s.tag===6)return s;for(s=s.child;s!==null;){var o=wf(s);if(o!==null)return o;s=s.sibling}return null}var kf=e.unstable_scheduleCallback,bf=e.unstable_cancelCallback,I6=e.unstable_shouldYield,Y6=e.unstable_requestPaint,mt=e.unstable_now,F6=e.unstable_getCurrentPriorityLevel,iu=e.unstable_ImmediatePriority,Qf=e.unstable_UserBlockingPriority,vo=e.unstable_NormalPriority,B6=e.unstable_LowPriority,$f=e.unstable_IdlePriority,So=null,nr=null;function q6(s){if(nr&&typeof nr.onCommitFiberRoot=="function")try{nr.onCommitFiberRoot(So,s,void 0,(s.current.flags&128)===128)}catch{}}var zn=Math.clz32?Math.clz32:K6,U6=Math.log,G6=Math.LN2;function K6(s){return s>>>=0,s===0?32:31-(U6(s)/G6|0)|0}var wo=64,ko=4194304;function Us(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 bo(s,o){var h=s.pendingLanes;if(h===0)return 0;var d=0,g=s.suspendedLanes,x=s.pingedLanes,k=h&268435455;if(k!==0){var A=k&~g;A!==0?d=Us(A):(x&=k,x!==0&&(d=Us(x)))}else k=h&~g,k!==0?d=Us(k):x!==0&&(d=Us(x));if(d===0)return 0;if(o!==0&&o!==d&&(o&g)===0&&(g=d&-d,x=o&-o,g>=x||g===16&&(x&4194240)!==0))return o;if((d&4)!==0&&(d|=h&16),o=s.entangledLanes,o!==0)for(s=s.entanglements,o&=d;0<o;)h=31-zn(o),g=1<<h,d|=s[h],o&=~g;return d}function J6(s,o){switch(s){case 1:case 2:case 4:return o+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 o+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 e5(s,o){for(var h=s.suspendedLanes,d=s.pingedLanes,g=s.expirationTimes,x=s.pendingLanes;0<x;){var k=31-zn(x),A=1<<k,T=g[k];T===-1?((A&h)===0||(A&d)!==0)&&(g[k]=J6(A,o)):T<=o&&(s.expiredLanes|=A),x&=~A}}function su(s){return s=s.pendingLanes&-1073741825,s!==0?s:s&1073741824?1073741824:0}function Pf(){var s=wo;return wo<<=1,(wo&4194240)===0&&(wo=64),s}function lu(s){for(var o=[],h=0;31>h;h++)o.push(s);return o}function Gs(s,o,h){s.pendingLanes|=o,o!==536870912&&(s.suspendedLanes=0,s.pingedLanes=0),s=s.eventTimes,o=31-zn(o),s[o]=h}function t5(s,o){var h=s.pendingLanes&~o;s.pendingLanes=o,s.suspendedLanes=0,s.pingedLanes=0,s.expiredLanes&=o,s.mutableReadLanes&=o,s.entangledLanes&=o,o=s.entanglements;var d=s.eventTimes;for(s=s.expirationTimes;0<h;){var g=31-zn(h),x=1<<g;o[g]=0,d[g]=-1,s[g]=-1,h&=~x}}function ou(s,o){var h=s.entangledLanes|=o;for(s=s.entanglements;h;){var d=31-zn(h),g=1<<d;g&o|s[d]&o&&(s[d]|=o),h&=~g}}var Je=0;function Af(s){return s&=-s,1<s?4<s?(s&268435455)!==0?16:536870912:4:1}var Cf,au,Zf,Tf,Mf,cu=!1,Qo=[],zr=null,Dr=null,Wr=null,Ks=new Map,Js=new Map,Hr=[],n5="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 Ef(s,o){switch(s){case"focusin":case"focusout":zr=null;break;case"dragenter":case"dragleave":Dr=null;break;case"mouseover":case"mouseout":Wr=null;break;case"pointerover":case"pointerout":Ks.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":Js.delete(o.pointerId)}}function el(s,o,h,d,g,x){return s===null||s.nativeEvent!==x?(s={blockedOn:o,domEventName:h,eventSystemFlags:d,nativeEvent:x,targetContainers:[g]},o!==null&&(o=pl(o),o!==null&&au(o)),s):(s.eventSystemFlags|=d,o=s.targetContainers,g!==null&&o.indexOf(g)===-1&&o.push(g),s)}function r5(s,o,h,d,g){switch(o){case"focusin":return zr=el(zr,s,o,h,d,g),!0;case"dragenter":return Dr=el(Dr,s,o,h,d,g),!0;case"mouseover":return Wr=el(Wr,s,o,h,d,g),!0;case"pointerover":var x=g.pointerId;return Ks.set(x,el(Ks.get(x)||null,s,o,h,d,g)),!0;case"gotpointercapture":return x=g.pointerId,Js.set(x,el(Js.get(x)||null,s,o,h,d,g)),!0}return!1}function jf(s){var o=Si(s.target);if(o!==null){var h=vi(o);if(h!==null){if(o=h.tag,o===13){if(o=xf(h),o!==null){s.blockedOn=o,Mf(s.priority,function(){Zf(h)});return}}else if(o===3&&h.stateNode.current.memoizedState.isDehydrated){s.blockedOn=h.tag===3?h.stateNode.containerInfo:null;return}}}s.blockedOn=null}function $o(s){if(s.blockedOn!==null)return!1;for(var o=s.targetContainers;0<o.length;){var h=hu(s.domEventName,s.eventSystemFlags,o[0],s.nativeEvent);if(h===null){h=s.nativeEvent;var d=new h.constructor(h.type,h);Ii=d,h.target.dispatchEvent(d),Ii=null}else return o=pl(h),o!==null&&au(o),s.blockedOn=h,!1;o.shift()}return!0}function Vf(s,o,h){$o(s)&&h.delete(o)}function i5(){cu=!1,zr!==null&&$o(zr)&&(zr=null),Dr!==null&&$o(Dr)&&(Dr=null),Wr!==null&&$o(Wr)&&(Wr=null),Ks.forEach(Vf),Js.forEach(Vf)}function tl(s,o){s.blockedOn===o&&(s.blockedOn=null,cu||(cu=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,i5)))}function nl(s){function o(g){return tl(g,s)}if(0<Qo.length){tl(Qo[0],s);for(var h=1;h<Qo.length;h++){var d=Qo[h];d.blockedOn===s&&(d.blockedOn=null)}}for(zr!==null&&tl(zr,s),Dr!==null&&tl(Dr,s),Wr!==null&&tl(Wr,s),Ks.forEach(o),Js.forEach(o),h=0;h<Hr.length;h++)d=Hr[h],d.blockedOn===s&&(d.blockedOn=null);for(;0<Hr.length&&(h=Hr[0],h.blockedOn===null);)jf(h),h.blockedOn===null&&Hr.shift()}var Fi=Z.ReactCurrentBatchConfig,Po=!0;function s5(s,o,h,d){var g=Je,x=Fi.transition;Fi.transition=null;try{Je=1,uu(s,o,h,d)}finally{Je=g,Fi.transition=x}}function l5(s,o,h,d){var g=Je,x=Fi.transition;Fi.transition=null;try{Je=4,uu(s,o,h,d)}finally{Je=g,Fi.transition=x}}function uu(s,o,h,d){if(Po){var g=hu(s,o,h,d);if(g===null)Au(s,o,d,Ao,h),Ef(s,d);else if(r5(g,s,o,h,d))d.stopPropagation();else if(Ef(s,d),o&4&&-1<n5.indexOf(s)){for(;g!==null;){var x=pl(g);if(x!==null&&Cf(x),x=hu(s,o,h,d),x===null&&Au(s,o,d,Ao,h),x===g)break;g=x}g!==null&&d.stopPropagation()}else Au(s,o,d,null,h)}}var Ao=null;function hu(s,o,h,d){if(Ao=null,s=_t(d),s=Si(s),s!==null)if(o=vi(s),o===null)s=null;else if(h=o.tag,h===13){if(s=xf(o),s!==null)return s;s=null}else if(h===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;s=null}else o!==s&&(s=null);return Ao=s,null}function Rf(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(F6()){case iu:return 1;case Qf:return 4;case vo:case B6:return 16;case $f:return 536870912;default:return 16}default:return 16}}var Ir=null,fu=null,Co=null;function Lf(){if(Co)return Co;var s,o=fu,h=o.length,d,g="value"in Ir?Ir.value:Ir.textContent,x=g.length;for(s=0;s<h&&o[s]===g[s];s++);var k=h-s;for(d=1;d<=k&&o[h-d]===g[x-d];d++);return Co=g.slice(s,1<d?1-d:void 0)}function Zo(s){var o=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&o===13&&(s=13)):s=o,s===10&&(s=13),32<=s||s===13?s:0}function To(){return!0}function Xf(){return!1}function yn(s){function o(h,d,g,x,k){this._reactName=h,this._targetInst=g,this.type=d,this.nativeEvent=x,this.target=k,this.currentTarget=null;for(var A in s)s.hasOwnProperty(A)&&(h=s[A],this[A]=h?h(x):x[A]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?To:Xf,this.isPropagationStopped=Xf,this}return F(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var h=this.nativeEvent;h&&(h.preventDefault?h.preventDefault():typeof h.returnValue!="unknown"&&(h.returnValue=!1),this.isDefaultPrevented=To)},stopPropagation:function(){var h=this.nativeEvent;h&&(h.stopPropagation?h.stopPropagation():typeof h.cancelBubble!="unknown"&&(h.cancelBubble=!0),this.isPropagationStopped=To)},persist:function(){},isPersistent:To}),o}var Bi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},du=yn(Bi),rl=F({},Bi,{view:0,detail:0}),o5=yn(rl),pu,mu,il,Mo=F({},rl,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gu,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!==il&&(il&&s.type==="mousemove"?(pu=s.screenX-il.screenX,mu=s.screenY-il.screenY):mu=pu=0,il=s),pu)},movementY:function(s){return"movementY"in s?s.movementY:mu}}),Nf=yn(Mo),a5=F({},Mo,{dataTransfer:0}),c5=yn(a5),u5=F({},rl,{relatedTarget:0}),Ou=yn(u5),h5=F({},Bi,{animationName:0,elapsedTime:0,pseudoElement:0}),f5=yn(h5),d5=F({},Bi,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),p5=yn(d5),m5=F({},Bi,{data:0}),_f=yn(m5),O5={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},g5={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"},y5={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function x5(s){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(s):(s=y5[s])?!!o[s]:!1}function gu(){return x5}var v5=F({},rl,{key:function(s){if(s.key){var o=O5[s.key]||s.key;if(o!=="Unidentified")return o}return s.type==="keypress"?(s=Zo(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?g5[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gu,charCode:function(s){return s.type==="keypress"?Zo(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?Zo(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),S5=yn(v5),w5=F({},Mo,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),zf=yn(w5),k5=F({},rl,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gu}),b5=yn(k5),Q5=F({},Bi,{propertyName:0,elapsedTime:0,pseudoElement:0}),$5=yn(Q5),P5=F({},Mo,{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}),A5=yn(P5),C5=[9,13,27,32],yu=c&&"CompositionEvent"in window,sl=null;c&&"documentMode"in document&&(sl=document.documentMode);var Z5=c&&"TextEvent"in window&&!sl,Df=c&&(!yu||sl&&8<sl&&11>=sl),Wf=" ",Hf=!1;function If(s,o){switch(s){case"keyup":return C5.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yf(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var qi=!1;function T5(s,o){switch(s){case"compositionend":return Yf(o);case"keypress":return o.which!==32?null:(Hf=!0,Wf);case"textInput":return s=o.data,s===Wf&&Hf?null:s;default:return null}}function M5(s,o){if(qi)return s==="compositionend"||!yu&&If(s,o)?(s=Lf(),Co=fu=Ir=null,qi=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return Df&&o.locale!=="ko"?null:o.data;default:return null}}var E5={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 Ff(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o==="input"?!!E5[s.type]:o==="textarea"}function Bf(s,o,h,d){Ys(d),o=Lo(o,"onChange"),0<o.length&&(h=new du("onChange","change",null,h,d),s.push({event:h,listeners:o}))}var ll=null,ol=null;function j5(s){fd(s,0)}function Eo(s){var o=es(s);if(De(o))return s}function V5(s,o){if(s==="change")return o}var qf=!1;if(c){var xu;if(c){var vu="oninput"in document;if(!vu){var Uf=document.createElement("div");Uf.setAttribute("oninput","return;"),vu=typeof Uf.oninput=="function"}xu=vu}else xu=!1;qf=xu&&(!document.documentMode||9<document.documentMode)}function Gf(){ll&&(ll.detachEvent("onpropertychange",Kf),ol=ll=null)}function Kf(s){if(s.propertyName==="value"&&Eo(ol)){var o=[];Bf(o,ol,s,_t(s)),yf(j5,o)}}function R5(s,o,h){s==="focusin"?(Gf(),ll=o,ol=h,ll.attachEvent("onpropertychange",Kf)):s==="focusout"&&Gf()}function L5(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return Eo(ol)}function X5(s,o){if(s==="click")return Eo(o)}function N5(s,o){if(s==="input"||s==="change")return Eo(o)}function _5(s,o){return s===o&&(s!==0||1/s===1/o)||s!==s&&o!==o}var Dn=typeof Object.is=="function"?Object.is:_5;function al(s,o){if(Dn(s,o))return!0;if(typeof s!="object"||s===null||typeof o!="object"||o===null)return!1;var h=Object.keys(s),d=Object.keys(o);if(h.length!==d.length)return!1;for(d=0;d<h.length;d++){var g=h[d];if(!u.call(o,g)||!Dn(s[g],o[g]))return!1}return!0}function Jf(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function ed(s,o){var h=Jf(s);s=0;for(var d;h;){if(h.nodeType===3){if(d=s+h.textContent.length,s<=o&&d>=o)return{node:h,offset:o-s};s=d}e:{for(;h;){if(h.nextSibling){h=h.nextSibling;break e}h=h.parentNode}h=void 0}h=Jf(h)}}function td(s,o){return s&&o?s===o?!0:s&&s.nodeType===3?!1:o&&o.nodeType===3?td(s,o.parentNode):"contains"in s?s.contains(o):s.compareDocumentPosition?!!(s.compareDocumentPosition(o)&16):!1:!1}function nd(){for(var s=window,o=ht();o instanceof s.HTMLIFrameElement;){try{var h=typeof o.contentWindow.location.href=="string"}catch{h=!1}if(h)s=o.contentWindow;else break;o=ht(s.document)}return o}function Su(s){var o=s&&s.nodeName&&s.nodeName.toLowerCase();return o&&(o==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||o==="textarea"||s.contentEditable==="true")}function z5(s){var o=nd(),h=s.focusedElem,d=s.selectionRange;if(o!==h&&h&&h.ownerDocument&&td(h.ownerDocument.documentElement,h)){if(d!==null&&Su(h)){if(o=d.start,s=d.end,s===void 0&&(s=o),"selectionStart"in h)h.selectionStart=o,h.selectionEnd=Math.min(s,h.value.length);else if(s=(o=h.ownerDocument||document)&&o.defaultView||window,s.getSelection){s=s.getSelection();var g=h.textContent.length,x=Math.min(d.start,g);d=d.end===void 0?x:Math.min(d.end,g),!s.extend&&x>d&&(g=d,d=x,x=g),g=ed(h,x);var k=ed(h,d);g&&k&&(s.rangeCount!==1||s.anchorNode!==g.node||s.anchorOffset!==g.offset||s.focusNode!==k.node||s.focusOffset!==k.offset)&&(o=o.createRange(),o.setStart(g.node,g.offset),s.removeAllRanges(),x>d?(s.addRange(o),s.extend(k.node,k.offset)):(o.setEnd(k.node,k.offset),s.addRange(o)))}}for(o=[],s=h;s=s.parentNode;)s.nodeType===1&&o.push({element:s,left:s.scrollLeft,top:s.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<o.length;h++)s=o[h],s.element.scrollLeft=s.left,s.element.scrollTop=s.top}}var D5=c&&"documentMode"in document&&11>=document.documentMode,Ui=null,wu=null,cl=null,ku=!1;function rd(s,o,h){var d=h.window===h?h.document:h.nodeType===9?h:h.ownerDocument;ku||Ui==null||Ui!==ht(d)||(d=Ui,"selectionStart"in d&&Su(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),cl&&al(cl,d)||(cl=d,d=Lo(wu,"onSelect"),0<d.length&&(o=new du("onSelect","select",null,o,h),s.push({event:o,listeners:d}),o.target=Ui)))}function jo(s,o){var h={};return h[s.toLowerCase()]=o.toLowerCase(),h["Webkit"+s]="webkit"+o,h["Moz"+s]="moz"+o,h}var Gi={animationend:jo("Animation","AnimationEnd"),animationiteration:jo("Animation","AnimationIteration"),animationstart:jo("Animation","AnimationStart"),transitionend:jo("Transition","TransitionEnd")},bu={},id={};c&&(id=document.createElement("div").style,"AnimationEvent"in window||(delete Gi.animationend.animation,delete Gi.animationiteration.animation,delete Gi.animationstart.animation),"TransitionEvent"in window||delete Gi.transitionend.transition);function Vo(s){if(bu[s])return bu[s];if(!Gi[s])return s;var o=Gi[s],h;for(h in o)if(o.hasOwnProperty(h)&&h in id)return bu[s]=o[h];return s}var sd=Vo("animationend"),ld=Vo("animationiteration"),od=Vo("animationstart"),ad=Vo("transitionend"),cd=new Map,ud="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 Yr(s,o){cd.set(s,o),l(o,[s])}for(var Qu=0;Qu<ud.length;Qu++){var $u=ud[Qu],W5=$u.toLowerCase(),H5=$u[0].toUpperCase()+$u.slice(1);Yr(W5,"on"+H5)}Yr(sd,"onAnimationEnd"),Yr(ld,"onAnimationIteration"),Yr(od,"onAnimationStart"),Yr("dblclick","onDoubleClick"),Yr("focusin","onFocus"),Yr("focusout","onBlur"),Yr(ad,"onTransitionEnd"),a("onMouseEnter",["mouseout","mouseover"]),a("onMouseLeave",["mouseout","mouseover"]),a("onPointerEnter",["pointerout","pointerover"]),a("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 ul="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(" "),I5=new Set("cancel close invalid load scroll toggle".split(" ").concat(ul));function hd(s,o,h){var d=s.type||"unknown-event";s.currentTarget=h,W6(d,o,void 0,s),s.currentTarget=null}function fd(s,o){o=(o&4)!==0;for(var h=0;h<s.length;h++){var d=s[h],g=d.event;d=d.listeners;e:{var x=void 0;if(o)for(var k=d.length-1;0<=k;k--){var A=d[k],T=A.instance,W=A.currentTarget;if(A=A.listener,T!==x&&g.isPropagationStopped())break e;hd(g,A,W),x=T}else for(k=0;k<d.length;k++){if(A=d[k],T=A.instance,W=A.currentTarget,A=A.listener,T!==x&&g.isPropagationStopped())break e;hd(g,A,W),x=T}}}if(xo)throw s=ru,xo=!1,ru=null,s}function rt(s,o){var h=o[ju];h===void 0&&(h=o[ju]=new Set);var d=s+"__bubble";h.has(d)||(dd(o,s,2,!1),h.add(d))}function Pu(s,o,h){var d=0;o&&(d|=4),dd(h,s,d,o)}var Ro="_reactListening"+Math.random().toString(36).slice(2);function hl(s){if(!s[Ro]){s[Ro]=!0,n.forEach(function(h){h!=="selectionchange"&&(I5.has(h)||Pu(h,!1,s),Pu(h,!0,s))});var o=s.nodeType===9?s:s.ownerDocument;o===null||o[Ro]||(o[Ro]=!0,Pu("selectionchange",!1,o))}}function dd(s,o,h,d){switch(Rf(o)){case 1:var g=s5;break;case 4:g=l5;break;default:g=uu}h=g.bind(null,o,h,s),g=void 0,!nu||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(g=!0),d?g!==void 0?s.addEventListener(o,h,{capture:!0,passive:g}):s.addEventListener(o,h,!0):g!==void 0?s.addEventListener(o,h,{passive:g}):s.addEventListener(o,h,!1)}function Au(s,o,h,d,g){var x=d;if((o&1)===0&&(o&2)===0&&d!==null)e:for(;;){if(d===null)return;var k=d.tag;if(k===3||k===4){var A=d.stateNode.containerInfo;if(A===g||A.nodeType===8&&A.parentNode===g)break;if(k===4)for(k=d.return;k!==null;){var T=k.tag;if((T===3||T===4)&&(T=k.stateNode.containerInfo,T===g||T.nodeType===8&&T.parentNode===g))return;k=k.return}for(;A!==null;){if(k=Si(A),k===null)return;if(T=k.tag,T===5||T===6){d=x=k;continue e}A=A.parentNode}}d=d.return}yf(function(){var W=x,ne=_t(h),ie=[];e:{var te=cd.get(s);if(te!==void 0){var me=du,xe=s;switch(s){case"keypress":if(Zo(h)===0)break e;case"keydown":case"keyup":me=S5;break;case"focusin":xe="focus",me=Ou;break;case"focusout":xe="blur",me=Ou;break;case"beforeblur":case"afterblur":me=Ou;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":me=Nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=c5;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=b5;break;case sd:case ld:case od:me=f5;break;case ad:me=$5;break;case"scroll":me=o5;break;case"wheel":me=A5;break;case"copy":case"cut":case"paste":me=p5;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=zf}var ke=(o&4)!==0,Ot=!ke&&s==="scroll",N=ke?te!==null?te+"Capture":null:te;ke=[];for(var V=W,D;V!==null;){D=V;var oe=D.stateNode;if(D.tag===5&&oe!==null&&(D=oe,N!==null&&(oe=Fs(V,N),oe!=null&&ke.push(fl(V,oe,D)))),Ot)break;V=V.return}0<ke.length&&(te=new me(te,xe,null,h,ne),ie.push({event:te,listeners:ke}))}}if((o&7)===0){e:{if(te=s==="mouseover"||s==="pointerover",me=s==="mouseout"||s==="pointerout",te&&h!==Ii&&(xe=h.relatedTarget||h.fromElement)&&(Si(xe)||xe[Sr]))break e;if((me||te)&&(te=ne.window===ne?ne:(te=ne.ownerDocument)?te.defaultView||te.parentWindow:window,me?(xe=h.relatedTarget||h.toElement,me=W,xe=xe?Si(xe):null,xe!==null&&(Ot=vi(xe),xe!==Ot||xe.tag!==5&&xe.tag!==6)&&(xe=null)):(me=null,xe=W),me!==xe)){if(ke=Nf,oe="onMouseLeave",N="onMouseEnter",V="mouse",(s==="pointerout"||s==="pointerover")&&(ke=zf,oe="onPointerLeave",N="onPointerEnter",V="pointer"),Ot=me==null?te:es(me),D=xe==null?te:es(xe),te=new ke(oe,V+"leave",me,h,ne),te.target=Ot,te.relatedTarget=D,oe=null,Si(ne)===W&&(ke=new ke(N,V+"enter",xe,h,ne),ke.target=D,ke.relatedTarget=Ot,oe=ke),Ot=oe,me&&xe)t:{for(ke=me,N=xe,V=0,D=ke;D;D=Ki(D))V++;for(D=0,oe=N;oe;oe=Ki(oe))D++;for(;0<V-D;)ke=Ki(ke),V--;for(;0<D-V;)N=Ki(N),D--;for(;V--;){if(ke===N||N!==null&&ke===N.alternate)break t;ke=Ki(ke),N=Ki(N)}ke=null}else ke=null;me!==null&&pd(ie,te,me,ke,!1),xe!==null&&Ot!==null&&pd(ie,Ot,xe,ke,!0)}}e:{if(te=W?es(W):window,me=te.nodeName&&te.nodeName.toLowerCase(),me==="select"||me==="input"&&te.type==="file")var be=V5;else if(Ff(te))if(qf)be=N5;else{be=L5;var Ae=R5}else(me=te.nodeName)&&me.toLowerCase()==="input"&&(te.type==="checkbox"||te.type==="radio")&&(be=X5);if(be&&(be=be(s,W))){Bf(ie,be,h,ne);break e}Ae&&Ae(s,te,W),s==="focusout"&&(Ae=te._wrapperState)&&Ae.controlled&&te.type==="number"&&Fe(te,"number",te.value)}switch(Ae=W?es(W):window,s){case"focusin":(Ff(Ae)||Ae.contentEditable==="true")&&(Ui=Ae,wu=W,cl=null);break;case"focusout":cl=wu=Ui=null;break;case"mousedown":ku=!0;break;case"contextmenu":case"mouseup":case"dragend":ku=!1,rd(ie,h,ne);break;case"selectionchange":if(D5)break;case"keydown":case"keyup":rd(ie,h,ne)}var Ce;if(yu)e:{switch(s){case"compositionstart":var je="onCompositionStart";break e;case"compositionend":je="onCompositionEnd";break e;case"compositionupdate":je="onCompositionUpdate";break e}je=void 0}else qi?If(s,h)&&(je="onCompositionEnd"):s==="keydown"&&h.keyCode===229&&(je="onCompositionStart");je&&(Df&&h.locale!=="ko"&&(qi||je!=="onCompositionStart"?je==="onCompositionEnd"&&qi&&(Ce=Lf()):(Ir=ne,fu="value"in Ir?Ir.value:Ir.textContent,qi=!0)),Ae=Lo(W,je),0<Ae.length&&(je=new _f(je,s,null,h,ne),ie.push({event:je,listeners:Ae}),Ce?je.data=Ce:(Ce=Yf(h),Ce!==null&&(je.data=Ce)))),(Ce=Z5?T5(s,h):M5(s,h))&&(W=Lo(W,"onBeforeInput"),0<W.length&&(ne=new _f("onBeforeInput","beforeinput",null,h,ne),ie.push({event:ne,listeners:W}),ne.data=Ce))}fd(ie,o)})}function fl(s,o,h){return{instance:s,listener:o,currentTarget:h}}function Lo(s,o){for(var h=o+"Capture",d=[];s!==null;){var g=s,x=g.stateNode;g.tag===5&&x!==null&&(g=x,x=Fs(s,h),x!=null&&d.unshift(fl(s,x,g)),x=Fs(s,o),x!=null&&d.push(fl(s,x,g))),s=s.return}return d}function Ki(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5);return s||null}function pd(s,o,h,d,g){for(var x=o._reactName,k=[];h!==null&&h!==d;){var A=h,T=A.alternate,W=A.stateNode;if(T!==null&&T===d)break;A.tag===5&&W!==null&&(A=W,g?(T=Fs(h,x),T!=null&&k.unshift(fl(h,T,A))):g||(T=Fs(h,x),T!=null&&k.push(fl(h,T,A)))),h=h.return}k.length!==0&&s.push({event:o,listeners:k})}var Y5=/\r\n?/g,F5=/\u0000|\uFFFD/g;function md(s){return(typeof s=="string"?s:""+s).replace(Y5,`
38
38
  `).replace(F5,"")}function Xo(s,o,h){if(o=md(o),md(s)!==o&&h)throw Error(t(425))}function No(){}var Cu=null,Zu=null;function Tu(s,o){return s==="textarea"||s==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Mu=typeof setTimeout=="function"?setTimeout:void 0,B5=typeof clearTimeout=="function"?clearTimeout:void 0,Od=typeof Promise=="function"?Promise:void 0,q5=typeof queueMicrotask=="function"?queueMicrotask:typeof Od<"u"?function(s){return Od.resolve(null).then(s).catch(U5)}:Mu;function U5(s){setTimeout(function(){throw s})}function Eu(s,o){var h=o,d=0;do{var g=h.nextSibling;if(s.removeChild(h),g&&g.nodeType===8)if(h=g.data,h==="/$"){if(d===0){s.removeChild(g),nl(o);return}d--}else h!=="$"&&h!=="$?"&&h!=="$!"||d++;h=g}while(h);nl(o)}function Fr(s){for(;s!=null;s=s.nextSibling){var o=s.nodeType;if(o===1||o===3)break;if(o===8){if(o=s.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return s}function gd(s){s=s.previousSibling;for(var o=0;s;){if(s.nodeType===8){var h=s.data;if(h==="$"||h==="$!"||h==="$?"){if(o===0)return s;o--}else h==="/$"&&o++}s=s.previousSibling}return null}var Ji=Math.random().toString(36).slice(2),rr="__reactFiber$"+Ji,dl="__reactProps$"+Ji,Sr="__reactContainer$"+Ji,ju="__reactEvents$"+Ji,G5="__reactListeners$"+Ji,K5="__reactHandles$"+Ji;function Si(s){var o=s[rr];if(o)return o;for(var h=s.parentNode;h;){if(o=h[Sr]||h[rr]){if(h=o.alternate,o.child!==null||h!==null&&h.child!==null)for(s=gd(s);s!==null;){if(h=s[rr])return h;s=gd(s)}return o}s=h,h=s.parentNode}return null}function pl(s){return s=s[rr]||s[Sr],!s||s.tag!==5&&s.tag!==6&&s.tag!==13&&s.tag!==3?null:s}function es(s){if(s.tag===5||s.tag===6)return s.stateNode;throw Error(t(33))}function _o(s){return s[dl]||null}var Vu=[],ts=-1;function Br(s){return{current:s}}function it(s){0>ts||(s.current=Vu[ts],Vu[ts]=null,ts--)}function tt(s,o){ts++,Vu[ts]=s.current,s.current=o}var qr={},zt=Br(qr),rn=Br(!1),wi=qr;function ns(s,o){var h=s.type.contextTypes;if(!h)return qr;var d=s.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===o)return d.__reactInternalMemoizedMaskedChildContext;var g={},x;for(x in h)g[x]=o[x];return d&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=o,s.__reactInternalMemoizedMaskedChildContext=g),g}function sn(s){return s=s.childContextTypes,s!=null}function zo(){it(rn),it(zt)}function yd(s,o,h){if(zt.current!==qr)throw Error(t(168));tt(zt,o),tt(rn,h)}function xd(s,o,h){var d=s.stateNode;if(o=o.childContextTypes,typeof d.getChildContext!="function")return h;d=d.getChildContext();for(var g in d)if(!(g in o))throw Error(t(108,ue(s)||"Unknown",g));return F({},h,d)}function Do(s){return s=(s=s.stateNode)&&s.__reactInternalMemoizedMergedChildContext||qr,wi=zt.current,tt(zt,s),tt(rn,rn.current),!0}function vd(s,o,h){var d=s.stateNode;if(!d)throw Error(t(169));h?(s=xd(s,o,wi),d.__reactInternalMemoizedMergedChildContext=s,it(rn),it(zt),tt(zt,s)):it(rn),tt(rn,h)}var wr=null,Wo=!1,Ru=!1;function Sd(s){wr===null?wr=[s]:wr.push(s)}function J5(s){Wo=!0,Sd(s)}function Ur(){if(!Ru&&wr!==null){Ru=!0;var s=0,o=Je;try{var h=wr;for(Je=1;s<h.length;s++){var d=h[s];do d=d(!0);while(d!==null)}wr=null,Wo=!1}catch(g){throw wr!==null&&(wr=wr.slice(s+1)),kf(iu,Ur),g}finally{Je=o,Ru=!1}}return null}var rs=[],is=0,Ho=null,Io=0,An=[],Cn=0,ki=null,kr=1,br="";function bi(s,o){rs[is++]=Io,rs[is++]=Ho,Ho=s,Io=o}function wd(s,o,h){An[Cn++]=kr,An[Cn++]=br,An[Cn++]=ki,ki=s;var d=kr;s=br;var g=32-zn(d)-1;d&=~(1<<g),h+=1;var x=32-zn(o)+g;if(30<x){var k=g-g%5;x=(d&(1<<k)-1).toString(32),d>>=k,g-=k,kr=1<<32-zn(o)+g|h<<g|d,br=x+s}else kr=1<<x|h<<g|d,br=s}function Lu(s){s.return!==null&&(bi(s,1),wd(s,1,0))}function Xu(s){for(;s===Ho;)Ho=rs[--is],rs[is]=null,Io=rs[--is],rs[is]=null;for(;s===ki;)ki=An[--Cn],An[Cn]=null,br=An[--Cn],An[Cn]=null,kr=An[--Cn],An[Cn]=null}var xn=null,vn=null,lt=!1,Wn=null;function kd(s,o){var h=En(5,null,null,0);h.elementType="DELETED",h.stateNode=o,h.return=s,o=s.deletions,o===null?(s.deletions=[h],s.flags|=16):o.push(h)}function bd(s,o){switch(s.tag){case 5:var h=s.type;return o=o.nodeType!==1||h.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(s.stateNode=o,xn=s,vn=Fr(o.firstChild),!0):!1;case 6:return o=s.pendingProps===""||o.nodeType!==3?null:o,o!==null?(s.stateNode=o,xn=s,vn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(h=ki!==null?{id:kr,overflow:br}:null,s.memoizedState={dehydrated:o,treeContext:h,retryLane:1073741824},h=En(18,null,null,0),h.stateNode=o,h.return=s,s.child=h,xn=s,vn=null,!0):!1;default:return!1}}function Nu(s){return(s.mode&1)!==0&&(s.flags&128)===0}function _u(s){if(lt){var o=vn;if(o){var h=o;if(!bd(s,o)){if(Nu(s))throw Error(t(418));o=Fr(h.nextSibling);var d=xn;o&&bd(s,o)?kd(d,h):(s.flags=s.flags&-4097|2,lt=!1,xn=s)}}else{if(Nu(s))throw Error(t(418));s.flags=s.flags&-4097|2,lt=!1,xn=s}}}function Qd(s){for(s=s.return;s!==null&&s.tag!==5&&s.tag!==3&&s.tag!==13;)s=s.return;xn=s}function Yo(s){if(s!==xn)return!1;if(!lt)return Qd(s),lt=!0,!1;var o;if((o=s.tag!==3)&&!(o=s.tag!==5)&&(o=s.type,o=o!=="head"&&o!=="body"&&!Tu(s.type,s.memoizedProps)),o&&(o=vn)){if(Nu(s))throw $d(),Error(t(418));for(;o;)kd(s,o),o=Fr(o.nextSibling)}if(Qd(s),s.tag===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(t(317));e:{for(s=s.nextSibling,o=0;s;){if(s.nodeType===8){var h=s.data;if(h==="/$"){if(o===0){vn=Fr(s.nextSibling);break e}o--}else h!=="$"&&h!=="$!"&&h!=="$?"||o++}s=s.nextSibling}vn=null}}else vn=xn?Fr(s.stateNode.nextSibling):null;return!0}function $d(){for(var s=vn;s;)s=Fr(s.nextSibling)}function ss(){vn=xn=null,lt=!1}function zu(s){Wn===null?Wn=[s]:Wn.push(s)}var ey=Z.ReactCurrentBatchConfig;function ml(s,o,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 d=h.stateNode}if(!d)throw Error(t(147,s));var g=d,x=""+s;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===x?o.ref:(o=function(k){var A=g.refs;k===null?delete A[x]:A[x]=k},o._stringRef=x,o)}if(typeof s!="string")throw Error(t(284));if(!h._owner)throw Error(t(290,s))}return s}function Fo(s,o){throw s=Object.prototype.toString.call(o),Error(t(31,s==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":s))}function Pd(s){var o=s._init;return o(s._payload)}function Ad(s){function o(N,V){if(s){var D=N.deletions;D===null?(N.deletions=[V],N.flags|=16):D.push(V)}}function h(N,V){if(!s)return null;for(;V!==null;)o(N,V),V=V.sibling;return null}function d(N,V){for(N=new Map;V!==null;)V.key!==null?N.set(V.key,V):N.set(V.index,V),V=V.sibling;return N}function g(N,V){return N=ii(N,V),N.index=0,N.sibling=null,N}function x(N,V,D){return N.index=D,s?(D=N.alternate,D!==null?(D=D.index,D<V?(N.flags|=2,V):D):(N.flags|=2,V)):(N.flags|=1048576,V)}function k(N){return s&&N.alternate===null&&(N.flags|=2),N}function A(N,V,D,oe){return V===null||V.tag!==6?(V=M0(D,N.mode,oe),V.return=N,V):(V=g(V,D),V.return=N,V)}function T(N,V,D,oe){var be=D.type;return be===E?ne(N,V,D.props.children,oe,D.key):V!==null&&(V.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===ae&&Pd(be)===V.type)?(oe=g(V,D.props),oe.ref=ml(N,V,D),oe.return=N,oe):(oe=ga(D.type,D.key,D.props,null,N.mode,oe),oe.ref=ml(N,V,D),oe.return=N,oe)}function W(N,V,D,oe){return V===null||V.tag!==4||V.stateNode.containerInfo!==D.containerInfo||V.stateNode.implementation!==D.implementation?(V=E0(D,N.mode,oe),V.return=N,V):(V=g(V,D.children||[]),V.return=N,V)}function ne(N,V,D,oe,be){return V===null||V.tag!==7?(V=Mi(D,N.mode,oe,be),V.return=N,V):(V=g(V,D),V.return=N,V)}function ie(N,V,D){if(typeof V=="string"&&V!==""||typeof V=="number")return V=M0(""+V,N.mode,D),V.return=N,V;if(typeof V=="object"&&V!==null){switch(V.$$typeof){case X:return D=ga(V.type,V.key,V.props,null,N.mode,D),D.ref=ml(N,null,V),D.return=N,D;case _:return V=E0(V,N.mode,D),V.return=N,V;case ae:var oe=V._init;return ie(N,oe(V._payload),D)}if(st(V)||ee(V))return V=Mi(V,N.mode,D,null),V.return=N,V;Fo(N,V)}return null}function te(N,V,D,oe){var be=V!==null?V.key:null;if(typeof D=="string"&&D!==""||typeof D=="number")return be!==null?null:A(N,V,""+D,oe);if(typeof D=="object"&&D!==null){switch(D.$$typeof){case X:return D.key===be?T(N,V,D,oe):null;case _:return D.key===be?W(N,V,D,oe):null;case ae:return be=D._init,te(N,V,be(D._payload),oe)}if(st(D)||ee(D))return be!==null?null:ne(N,V,D,oe,null);Fo(N,D)}return null}function me(N,V,D,oe,be){if(typeof oe=="string"&&oe!==""||typeof oe=="number")return N=N.get(D)||null,A(V,N,""+oe,be);if(typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case X:return N=N.get(oe.key===null?D:oe.key)||null,T(V,N,oe,be);case _:return N=N.get(oe.key===null?D:oe.key)||null,W(V,N,oe,be);case ae:var Ae=oe._init;return me(N,V,D,Ae(oe._payload),be)}if(st(oe)||ee(oe))return N=N.get(D)||null,ne(V,N,oe,be,null);Fo(V,oe)}return null}function xe(N,V,D,oe){for(var be=null,Ae=null,Ce=V,je=V=0,Ct=null;Ce!==null&&je<D.length;je++){Ce.index>je?(Ct=Ce,Ce=null):Ct=Ce.sibling;var Be=te(N,Ce,D[je],oe);if(Be===null){Ce===null&&(Ce=Ct);break}s&&Ce&&Be.alternate===null&&o(N,Ce),V=x(Be,V,je),Ae===null?be=Be:Ae.sibling=Be,Ae=Be,Ce=Ct}if(je===D.length)return h(N,Ce),lt&&bi(N,je),be;if(Ce===null){for(;je<D.length;je++)Ce=ie(N,D[je],oe),Ce!==null&&(V=x(Ce,V,je),Ae===null?be=Ce:Ae.sibling=Ce,Ae=Ce);return lt&&bi(N,je),be}for(Ce=d(N,Ce);je<D.length;je++)Ct=me(Ce,N,je,D[je],oe),Ct!==null&&(s&&Ct.alternate!==null&&Ce.delete(Ct.key===null?je:Ct.key),V=x(Ct,V,je),Ae===null?be=Ct:Ae.sibling=Ct,Ae=Ct);return s&&Ce.forEach(function(si){return o(N,si)}),lt&&bi(N,je),be}function ke(N,V,D,oe){var be=ee(D);if(typeof be!="function")throw Error(t(150));if(D=be.call(D),D==null)throw Error(t(151));for(var Ae=be=null,Ce=V,je=V=0,Ct=null,Be=D.next();Ce!==null&&!Be.done;je++,Be=D.next()){Ce.index>je?(Ct=Ce,Ce=null):Ct=Ce.sibling;var si=te(N,Ce,Be.value,oe);if(si===null){Ce===null&&(Ce=Ct);break}s&&Ce&&si.alternate===null&&o(N,Ce),V=x(si,V,je),Ae===null?be=si:Ae.sibling=si,Ae=si,Ce=Ct}if(Be.done)return h(N,Ce),lt&&bi(N,je),be;if(Ce===null){for(;!Be.done;je++,Be=D.next())Be=ie(N,Be.value,oe),Be!==null&&(V=x(Be,V,je),Ae===null?be=Be:Ae.sibling=Be,Ae=Be);return lt&&bi(N,je),be}for(Ce=d(N,Ce);!Be.done;je++,Be=D.next())Be=me(Ce,N,je,Be.value,oe),Be!==null&&(s&&Be.alternate!==null&&Ce.delete(Be.key===null?je:Be.key),V=x(Be,V,je),Ae===null?be=Be:Ae.sibling=Be,Ae=Be);return s&&Ce.forEach(function(Ey){return o(N,Ey)}),lt&&bi(N,je),be}function Ot(N,V,D,oe){if(typeof D=="object"&&D!==null&&D.type===E&&D.key===null&&(D=D.props.children),typeof D=="object"&&D!==null){switch(D.$$typeof){case X:e:{for(var be=D.key,Ae=V;Ae!==null;){if(Ae.key===be){if(be=D.type,be===E){if(Ae.tag===7){h(N,Ae.sibling),V=g(Ae,D.props.children),V.return=N,N=V;break e}}else if(Ae.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===ae&&Pd(be)===Ae.type){h(N,Ae.sibling),V=g(Ae,D.props),V.ref=ml(N,Ae,D),V.return=N,N=V;break e}h(N,Ae);break}else o(N,Ae);Ae=Ae.sibling}D.type===E?(V=Mi(D.props.children,N.mode,oe,D.key),V.return=N,N=V):(oe=ga(D.type,D.key,D.props,null,N.mode,oe),oe.ref=ml(N,V,D),oe.return=N,N=oe)}return k(N);case _:e:{for(Ae=D.key;V!==null;){if(V.key===Ae)if(V.tag===4&&V.stateNode.containerInfo===D.containerInfo&&V.stateNode.implementation===D.implementation){h(N,V.sibling),V=g(V,D.children||[]),V.return=N,N=V;break e}else{h(N,V);break}else o(N,V);V=V.sibling}V=E0(D,N.mode,oe),V.return=N,N=V}return k(N);case ae:return Ae=D._init,Ot(N,V,Ae(D._payload),oe)}if(st(D))return xe(N,V,D,oe);if(ee(D))return ke(N,V,D,oe);Fo(N,D)}return typeof D=="string"&&D!==""||typeof D=="number"?(D=""+D,V!==null&&V.tag===6?(h(N,V.sibling),V=g(V,D),V.return=N,N=V):(h(N,V),V=M0(D,N.mode,oe),V.return=N,N=V),k(N)):h(N,V)}return Ot}var ls=Ad(!0),Cd=Ad(!1),Bo=Br(null),qo=null,os=null,Du=null;function Wu(){Du=os=qo=null}function Hu(s){var o=Bo.current;it(Bo),s._currentValue=o}function Iu(s,o,h){for(;s!==null;){var d=s.alternate;if((s.childLanes&o)!==o?(s.childLanes|=o,d!==null&&(d.childLanes|=o)):d!==null&&(d.childLanes&o)!==o&&(d.childLanes|=o),s===h)break;s=s.return}}function as(s,o){qo=s,Du=os=null,s=s.dependencies,s!==null&&s.firstContext!==null&&((s.lanes&o)!==0&&(ln=!0),s.firstContext=null)}function Zn(s){var o=s._currentValue;if(Du!==s)if(s={context:s,memoizedValue:o,next:null},os===null){if(qo===null)throw Error(t(308));os=s,qo.dependencies={lanes:0,firstContext:s}}else os=os.next=s;return o}var Qi=null;function Yu(s){Qi===null?Qi=[s]:Qi.push(s)}function Zd(s,o,h,d){var g=o.interleaved;return g===null?(h.next=h,Yu(o)):(h.next=g.next,g.next=h),o.interleaved=h,Qr(s,d)}function Qr(s,o){s.lanes|=o;var h=s.alternate;for(h!==null&&(h.lanes|=o),h=s,s=s.return;s!==null;)s.childLanes|=o,h=s.alternate,h!==null&&(h.childLanes|=o),h=s,s=s.return;return h.tag===3?h.stateNode:null}var Gr=!1;function Fu(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Td(s,o){s=s.updateQueue,o.updateQueue===s&&(o.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,effects:s.effects})}function $r(s,o){return{eventTime:s,lane:o,tag:0,payload:null,callback:null,next:null}}function Kr(s,o,h){var d=s.updateQueue;if(d===null)return null;if(d=d.shared,(He&2)!==0){var g=d.pending;return g===null?o.next=o:(o.next=g.next,g.next=o),d.pending=o,Qr(s,h)}return g=d.interleaved,g===null?(o.next=o,Yu(d)):(o.next=g.next,g.next=o),d.interleaved=o,Qr(s,h)}function Uo(s,o,h){if(o=o.updateQueue,o!==null&&(o=o.shared,(h&4194240)!==0)){var d=o.lanes;d&=s.pendingLanes,h|=d,o.lanes=h,ou(s,h)}}function Md(s,o){var h=s.updateQueue,d=s.alternate;if(d!==null&&(d=d.updateQueue,h===d)){var g=null,x=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};x===null?g=x=k:x=x.next=k,h=h.next}while(h!==null);x===null?g=x=o:x=x.next=o}else g=x=o;h={baseState:d.baseState,firstBaseUpdate:g,lastBaseUpdate:x,shared:d.shared,effects:d.effects},s.updateQueue=h;return}s=h.lastBaseUpdate,s===null?h.firstBaseUpdate=o:s.next=o,h.lastBaseUpdate=o}function Go(s,o,h,d){var g=s.updateQueue;Gr=!1;var x=g.firstBaseUpdate,k=g.lastBaseUpdate,A=g.shared.pending;if(A!==null){g.shared.pending=null;var T=A,W=T.next;T.next=null,k===null?x=W:k.next=W,k=T;var ne=s.alternate;ne!==null&&(ne=ne.updateQueue,A=ne.lastBaseUpdate,A!==k&&(A===null?ne.firstBaseUpdate=W:A.next=W,ne.lastBaseUpdate=T))}if(x!==null){var ie=g.baseState;k=0,ne=W=T=null,A=x;do{var te=A.lane,me=A.eventTime;if((d&te)===te){ne!==null&&(ne=ne.next={eventTime:me,lane:0,tag:A.tag,payload:A.payload,callback:A.callback,next:null});e:{var xe=s,ke=A;switch(te=o,me=h,ke.tag){case 1:if(xe=ke.payload,typeof xe=="function"){ie=xe.call(me,ie,te);break e}ie=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=ke.payload,te=typeof xe=="function"?xe.call(me,ie,te):xe,te==null)break e;ie=F({},ie,te);break e;case 2:Gr=!0}}A.callback!==null&&A.lane!==0&&(s.flags|=64,te=g.effects,te===null?g.effects=[A]:te.push(A))}else me={eventTime:me,lane:te,tag:A.tag,payload:A.payload,callback:A.callback,next:null},ne===null?(W=ne=me,T=ie):ne=ne.next=me,k|=te;if(A=A.next,A===null){if(A=g.shared.pending,A===null)break;te=A,A=te.next,te.next=null,g.lastBaseUpdate=te,g.shared.pending=null}}while(!0);if(ne===null&&(T=ie),g.baseState=T,g.firstBaseUpdate=W,g.lastBaseUpdate=ne,o=g.shared.interleaved,o!==null){g=o;do k|=g.lane,g=g.next;while(g!==o)}else x===null&&(g.shared.lanes=0);Ai|=k,s.lanes=k,s.memoizedState=ie}}function Ed(s,o,h){if(s=o.effects,o.effects=null,s!==null)for(o=0;o<s.length;o++){var d=s[o],g=d.callback;if(g!==null){if(d.callback=null,d=h,typeof g!="function")throw Error(t(191,g));g.call(d)}}}var Ol={},ir=Br(Ol),gl=Br(Ol),yl=Br(Ol);function $i(s){if(s===Ol)throw Error(t(174));return s}function Bu(s,o){switch(tt(yl,o),tt(gl,s),tt(ir,Ol),s=o.nodeType,s){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:Ut(null,"");break;default:s=s===8?o.parentNode:o,o=s.namespaceURI||null,s=s.tagName,o=Ut(o,s)}it(ir),tt(ir,o)}function cs(){it(ir),it(gl),it(yl)}function jd(s){$i(yl.current);var o=$i(ir.current),h=Ut(o,s.type);o!==h&&(tt(gl,s),tt(ir,h))}function qu(s){gl.current===s&&(it(ir),it(gl))}var ct=Br(0);function Ko(s){for(var o=s;o!==null;){if(o.tag===13){var h=o.memoizedState;if(h!==null&&(h=h.dehydrated,h===null||h.data==="$?"||h.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Uu=[];function Gu(){for(var s=0;s<Uu.length;s++)Uu[s]._workInProgressVersionPrimary=null;Uu.length=0}var Jo=Z.ReactCurrentDispatcher,Ku=Z.ReactCurrentBatchConfig,Pi=0,ut=null,bt=null,Pt=null,ea=!1,xl=!1,vl=0,ty=0;function Dt(){throw Error(t(321))}function Ju(s,o){if(o===null)return!1;for(var h=0;h<o.length&&h<s.length;h++)if(!Dn(s[h],o[h]))return!1;return!0}function e0(s,o,h,d,g,x){if(Pi=x,ut=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Jo.current=s===null||s.memoizedState===null?sy:ly,s=h(d,g),xl){x=0;do{if(xl=!1,vl=0,25<=x)throw Error(t(301));x+=1,Pt=bt=null,o.updateQueue=null,Jo.current=oy,s=h(d,g)}while(xl)}if(Jo.current=ra,o=bt!==null&&bt.next!==null,Pi=0,Pt=bt=ut=null,ea=!1,o)throw Error(t(300));return s}function t0(){var s=vl!==0;return vl=0,s}function sr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Pt===null?ut.memoizedState=Pt=s:Pt=Pt.next=s,Pt}function Tn(){if(bt===null){var s=ut.alternate;s=s!==null?s.memoizedState:null}else s=bt.next;var o=Pt===null?ut.memoizedState:Pt.next;if(o!==null)Pt=o,bt=s;else{if(s===null)throw Error(t(310));bt=s,s={memoizedState:bt.memoizedState,baseState:bt.baseState,baseQueue:bt.baseQueue,queue:bt.queue,next:null},Pt===null?ut.memoizedState=Pt=s:Pt=Pt.next=s}return Pt}function Sl(s,o){return typeof o=="function"?o(s):o}function n0(s){var o=Tn(),h=o.queue;if(h===null)throw Error(t(311));h.lastRenderedReducer=s;var d=bt,g=d.baseQueue,x=h.pending;if(x!==null){if(g!==null){var k=g.next;g.next=x.next,x.next=k}d.baseQueue=g=x,h.pending=null}if(g!==null){x=g.next,d=d.baseState;var A=k=null,T=null,W=x;do{var ne=W.lane;if((Pi&ne)===ne)T!==null&&(T=T.next={lane:0,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),d=W.hasEagerState?W.eagerState:s(d,W.action);else{var ie={lane:ne,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null};T===null?(A=T=ie,k=d):T=T.next=ie,ut.lanes|=ne,Ai|=ne}W=W.next}while(W!==null&&W!==x);T===null?k=d:T.next=A,Dn(d,o.memoizedState)||(ln=!0),o.memoizedState=d,o.baseState=k,o.baseQueue=T,h.lastRenderedState=d}if(s=h.interleaved,s!==null){g=s;do x=g.lane,ut.lanes|=x,Ai|=x,g=g.next;while(g!==s)}else g===null&&(h.lanes=0);return[o.memoizedState,h.dispatch]}function r0(s){var o=Tn(),h=o.queue;if(h===null)throw Error(t(311));h.lastRenderedReducer=s;var d=h.dispatch,g=h.pending,x=o.memoizedState;if(g!==null){h.pending=null;var k=g=g.next;do x=s(x,k.action),k=k.next;while(k!==g);Dn(x,o.memoizedState)||(ln=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),h.lastRenderedState=x}return[x,d]}function Vd(){}function Rd(s,o){var h=ut,d=Tn(),g=o(),x=!Dn(d.memoizedState,g);if(x&&(d.memoizedState=g,ln=!0),d=d.queue,i0(Nd.bind(null,h,d,s),[s]),d.getSnapshot!==o||x||Pt!==null&&Pt.memoizedState.tag&1){if(h.flags|=2048,wl(9,Xd.bind(null,h,d,g,o),void 0,null),At===null)throw Error(t(349));(Pi&30)!==0||Ld(h,o,g)}return g}function Ld(s,o,h){s.flags|=16384,s={getSnapshot:o,value:h},o=ut.updateQueue,o===null?(o={lastEffect:null,stores:null},ut.updateQueue=o,o.stores=[s]):(h=o.stores,h===null?o.stores=[s]:h.push(s))}function Xd(s,o,h,d){o.value=h,o.getSnapshot=d,_d(o)&&zd(s)}function Nd(s,o,h){return h(function(){_d(o)&&zd(s)})}function _d(s){var o=s.getSnapshot;s=s.value;try{var h=o();return!Dn(s,h)}catch{return!0}}function zd(s){var o=Qr(s,1);o!==null&&Fn(o,s,1,-1)}function Dd(s){var o=sr();return typeof s=="function"&&(s=s()),o.memoizedState=o.baseState=s,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Sl,lastRenderedState:s},o.queue=s,s=s.dispatch=iy.bind(null,ut,s),[o.memoizedState,s]}function wl(s,o,h,d){return s={tag:s,create:o,destroy:h,deps:d,next:null},o=ut.updateQueue,o===null?(o={lastEffect:null,stores:null},ut.updateQueue=o,o.lastEffect=s.next=s):(h=o.lastEffect,h===null?o.lastEffect=s.next=s:(d=h.next,h.next=s,s.next=d,o.lastEffect=s)),s}function Wd(){return Tn().memoizedState}function ta(s,o,h,d){var g=sr();ut.flags|=s,g.memoizedState=wl(1|o,h,void 0,d===void 0?null:d)}function na(s,o,h,d){var g=Tn();d=d===void 0?null:d;var x=void 0;if(bt!==null){var k=bt.memoizedState;if(x=k.destroy,d!==null&&Ju(d,k.deps)){g.memoizedState=wl(o,h,x,d);return}}ut.flags|=s,g.memoizedState=wl(1|o,h,x,d)}function Hd(s,o){return ta(8390656,8,s,o)}function i0(s,o){return na(2048,8,s,o)}function Id(s,o){return na(4,2,s,o)}function Yd(s,o){return na(4,4,s,o)}function Fd(s,o){if(typeof o=="function")return s=s(),o(s),function(){o(null)};if(o!=null)return s=s(),o.current=s,function(){o.current=null}}function Bd(s,o,h){return h=h!=null?h.concat([s]):null,na(4,4,Fd.bind(null,o,s),h)}function s0(){}function qd(s,o){var h=Tn();o=o===void 0?null:o;var d=h.memoizedState;return d!==null&&o!==null&&Ju(o,d[1])?d[0]:(h.memoizedState=[s,o],s)}function Ud(s,o){var h=Tn();o=o===void 0?null:o;var d=h.memoizedState;return d!==null&&o!==null&&Ju(o,d[1])?d[0]:(s=s(),h.memoizedState=[s,o],s)}function Gd(s,o,h){return(Pi&21)===0?(s.baseState&&(s.baseState=!1,ln=!0),s.memoizedState=h):(Dn(h,o)||(h=Pf(),ut.lanes|=h,Ai|=h,s.baseState=!0),o)}function ny(s,o){var h=Je;Je=h!==0&&4>h?h:4,s(!0);var d=Ku.transition;Ku.transition={};try{s(!1),o()}finally{Je=h,Ku.transition=d}}function Kd(){return Tn().memoizedState}function ry(s,o,h){var d=ni(s);if(h={lane:d,action:h,hasEagerState:!1,eagerState:null,next:null},Jd(s))ep(o,h);else if(h=Zd(s,o,h,d),h!==null){var g=Jt();Fn(h,s,d,g),tp(h,o,d)}}function iy(s,o,h){var d=ni(s),g={lane:d,action:h,hasEagerState:!1,eagerState:null,next:null};if(Jd(s))ep(o,g);else{var x=s.alternate;if(s.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var k=o.lastRenderedState,A=x(k,h);if(g.hasEagerState=!0,g.eagerState=A,Dn(A,k)){var T=o.interleaved;T===null?(g.next=g,Yu(o)):(g.next=T.next,T.next=g),o.interleaved=g;return}}catch{}finally{}h=Zd(s,o,g,d),h!==null&&(g=Jt(),Fn(h,s,d,g),tp(h,o,d))}}function Jd(s){var o=s.alternate;return s===ut||o!==null&&o===ut}function ep(s,o){xl=ea=!0;var h=s.pending;h===null?o.next=o:(o.next=h.next,h.next=o),s.pending=o}function tp(s,o,h){if((h&4194240)!==0){var d=o.lanes;d&=s.pendingLanes,h|=d,o.lanes=h,ou(s,h)}}var ra={readContext:Zn,useCallback:Dt,useContext:Dt,useEffect:Dt,useImperativeHandle:Dt,useInsertionEffect:Dt,useLayoutEffect:Dt,useMemo:Dt,useReducer:Dt,useRef:Dt,useState:Dt,useDebugValue:Dt,useDeferredValue:Dt,useTransition:Dt,useMutableSource:Dt,useSyncExternalStore:Dt,useId:Dt,unstable_isNewReconciler:!1},sy={readContext:Zn,useCallback:function(s,o){return sr().memoizedState=[s,o===void 0?null:o],s},useContext:Zn,useEffect:Hd,useImperativeHandle:function(s,o,h){return h=h!=null?h.concat([s]):null,ta(4194308,4,Fd.bind(null,o,s),h)},useLayoutEffect:function(s,o){return ta(4194308,4,s,o)},useInsertionEffect:function(s,o){return ta(4,2,s,o)},useMemo:function(s,o){var h=sr();return o=o===void 0?null:o,s=s(),h.memoizedState=[s,o],s},useReducer:function(s,o,h){var d=sr();return o=h!==void 0?h(o):o,d.memoizedState=d.baseState=o,s={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:o},d.queue=s,s=s.dispatch=ry.bind(null,ut,s),[d.memoizedState,s]},useRef:function(s){var o=sr();return s={current:s},o.memoizedState=s},useState:Dd,useDebugValue:s0,useDeferredValue:function(s){return sr().memoizedState=s},useTransition:function(){var s=Dd(!1),o=s[0];return s=ny.bind(null,s[1]),sr().memoizedState=s,[o,s]},useMutableSource:function(){},useSyncExternalStore:function(s,o,h){var d=ut,g=sr();if(lt){if(h===void 0)throw Error(t(407));h=h()}else{if(h=o(),At===null)throw Error(t(349));(Pi&30)!==0||Ld(d,o,h)}g.memoizedState=h;var x={value:h,getSnapshot:o};return g.queue=x,Hd(Nd.bind(null,d,x,s),[s]),d.flags|=2048,wl(9,Xd.bind(null,d,x,h,o),void 0,null),h},useId:function(){var s=sr(),o=At.identifierPrefix;if(lt){var h=br,d=kr;h=(d&~(1<<32-zn(d)-1)).toString(32)+h,o=":"+o+"R"+h,h=vl++,0<h&&(o+="H"+h.toString(32)),o+=":"}else h=ty++,o=":"+o+"r"+h.toString(32)+":";return s.memoizedState=o},unstable_isNewReconciler:!1},ly={readContext:Zn,useCallback:qd,useContext:Zn,useEffect:i0,useImperativeHandle:Bd,useInsertionEffect:Id,useLayoutEffect:Yd,useMemo:Ud,useReducer:n0,useRef:Wd,useState:function(){return n0(Sl)},useDebugValue:s0,useDeferredValue:function(s){var o=Tn();return Gd(o,bt.memoizedState,s)},useTransition:function(){var s=n0(Sl)[0],o=Tn().memoizedState;return[s,o]},useMutableSource:Vd,useSyncExternalStore:Rd,useId:Kd,unstable_isNewReconciler:!1},oy={readContext:Zn,useCallback:qd,useContext:Zn,useEffect:i0,useImperativeHandle:Bd,useInsertionEffect:Id,useLayoutEffect:Yd,useMemo:Ud,useReducer:r0,useRef:Wd,useState:function(){return r0(Sl)},useDebugValue:s0,useDeferredValue:function(s){var o=Tn();return bt===null?o.memoizedState=s:Gd(o,bt.memoizedState,s)},useTransition:function(){var s=r0(Sl)[0],o=Tn().memoizedState;return[s,o]},useMutableSource:Vd,useSyncExternalStore:Rd,useId:Kd,unstable_isNewReconciler:!1};function Hn(s,o){if(s&&s.defaultProps){o=F({},o),s=s.defaultProps;for(var h in s)o[h]===void 0&&(o[h]=s[h]);return o}return o}function l0(s,o,h,d){o=s.memoizedState,h=h(d,o),h=h==null?o:F({},o,h),s.memoizedState=h,s.lanes===0&&(s.updateQueue.baseState=h)}var ia={isMounted:function(s){return(s=s._reactInternals)?vi(s)===s:!1},enqueueSetState:function(s,o,h){s=s._reactInternals;var d=Jt(),g=ni(s),x=$r(d,g);x.payload=o,h!=null&&(x.callback=h),o=Kr(s,x,g),o!==null&&(Fn(o,s,g,d),Uo(o,s,g))},enqueueReplaceState:function(s,o,h){s=s._reactInternals;var d=Jt(),g=ni(s),x=$r(d,g);x.tag=1,x.payload=o,h!=null&&(x.callback=h),o=Kr(s,x,g),o!==null&&(Fn(o,s,g,d),Uo(o,s,g))},enqueueForceUpdate:function(s,o){s=s._reactInternals;var h=Jt(),d=ni(s),g=$r(h,d);g.tag=2,o!=null&&(g.callback=o),o=Kr(s,g,d),o!==null&&(Fn(o,s,d,h),Uo(o,s,d))}};function np(s,o,h,d,g,x,k){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(d,x,k):o.prototype&&o.prototype.isPureReactComponent?!al(h,d)||!al(g,x):!0}function rp(s,o,h){var d=!1,g=qr,x=o.contextType;return typeof x=="object"&&x!==null?x=Zn(x):(g=sn(o)?wi:zt.current,d=o.contextTypes,x=(d=d!=null)?ns(s,g):qr),o=new o(h,x),s.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=ia,s.stateNode=o,o._reactInternals=s,d&&(s=s.stateNode,s.__reactInternalMemoizedUnmaskedChildContext=g,s.__reactInternalMemoizedMaskedChildContext=x),o}function ip(s,o,h,d){s=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(h,d),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(h,d),o.state!==s&&ia.enqueueReplaceState(o,o.state,null)}function o0(s,o,h,d){var g=s.stateNode;g.props=h,g.state=s.memoizedState,g.refs={},Fu(s);var x=o.contextType;typeof x=="object"&&x!==null?g.context=Zn(x):(x=sn(o)?wi:zt.current,g.context=ns(s,x)),g.state=s.memoizedState,x=o.getDerivedStateFromProps,typeof x=="function"&&(l0(s,o,x,h),g.state=s.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(o=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),o!==g.state&&ia.enqueueReplaceState(g,g.state,null),Go(s,h,g,d),g.state=s.memoizedState),typeof g.componentDidMount=="function"&&(s.flags|=4194308)}function us(s,o){try{var h="",d=o;do h+=fe(d),d=d.return;while(d);var g=h}catch(x){g=`
39
39
  Error generating stack: `+x.message+`
40
- `+x.stack}return{value:s,source:o,stack:g,digest:null}}function a0(s,o,h){return{value:s,source:null,stack:h??null,digest:o??null}}function c0(s,o){try{console.error(o.value)}catch(h){setTimeout(function(){throw h})}}var ay=typeof WeakMap=="function"?WeakMap:Map;function sp(s,o,h){h=$r(-1,h),h.tag=3,h.payload={element:null};var d=o.value;return h.callback=function(){ha||(ha=!0,b0=d),c0(s,o)},h}function lp(s,o,h){h=$r(-1,h),h.tag=3;var d=s.type.getDerivedStateFromError;if(typeof d=="function"){var g=o.value;h.payload=function(){return d(g)},h.callback=function(){c0(s,o)}}var x=s.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(h.callback=function(){c0(s,o),typeof d!="function"&&(ei===null?ei=new Set([this]):ei.add(this));var k=o.stack;this.componentDidCatch(o.value,{componentStack:k!==null?k:""})}),h}function op(s,o,h){var d=s.pingCache;if(d===null){d=s.pingCache=new ay;var g=new Set;d.set(o,g)}else g=d.get(o),g===void 0&&(g=new Set,d.set(o,g));g.has(h)||(g.add(h),s=wy.bind(null,s,o,h),o.then(s,s))}function ap(s){do{var o;if((o=s.tag===13)&&(o=s.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return s;s=s.return}while(s!==null);return null}function cp(s,o,h,d,g){return(s.mode&1)===0?(s===o?s.flags|=65536:(s.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(o=$r(-1,1),o.tag=2,Kr(h,o,1))),h.lanes|=1),s):(s.flags|=65536,s.lanes=g,s)}var cy=Z.ReactCurrentOwner,ln=!1;function Kt(s,o,h,d){o.child=s===null?Cd(o,null,h,d):ls(o,s.child,h,d)}function up(s,o,h,d,g){h=h.render;var x=o.ref;return as(o,g),d=e0(s,o,h,d,x,g),h=t0(),s!==null&&!ln?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~g,Pr(s,o,g)):(lt&&h&&Lu(o),o.flags|=1,Kt(s,o,d,g),o.child)}function hp(s,o,h,d,g){if(s===null){var x=h.type;return typeof x=="function"&&!T0(x)&&x.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(o.tag=15,o.type=x,fp(s,o,x,d,g)):(s=ga(h.type,null,d,o,o.mode,g),s.ref=o.ref,s.return=o,o.child=s)}if(x=s.child,(s.lanes&g)===0){var k=x.memoizedProps;if(h=h.compare,h=h!==null?h:al,h(k,d)&&s.ref===o.ref)return Pr(s,o,g)}return o.flags|=1,s=ii(x,d),s.ref=o.ref,s.return=o,o.child=s}function fp(s,o,h,d,g){if(s!==null){var x=s.memoizedProps;if(al(x,d)&&s.ref===o.ref)if(ln=!1,o.pendingProps=d=x,(s.lanes&g)!==0)(s.flags&131072)!==0&&(ln=!0);else return o.lanes=s.lanes,Pr(s,o,g)}return u0(s,o,h,d,g)}function dp(s,o,h){var d=o.pendingProps,g=d.children,x=s!==null?s.memoizedState:null;if(d.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(fs,Sn),Sn|=h;else{if((h&1073741824)===0)return s=x!==null?x.baseLanes|h:h,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:s,cachePool:null,transitions:null},o.updateQueue=null,tt(fs,Sn),Sn|=s,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=x!==null?x.baseLanes:h,tt(fs,Sn),Sn|=d}else x!==null?(d=x.baseLanes|h,o.memoizedState=null):d=h,tt(fs,Sn),Sn|=d;return Kt(s,o,g,h),o.child}function pp(s,o){var h=o.ref;(s===null&&h!==null||s!==null&&s.ref!==h)&&(o.flags|=512,o.flags|=2097152)}function u0(s,o,h,d,g){var x=sn(h)?wi:zt.current;return x=ns(o,x),as(o,g),h=e0(s,o,h,d,x,g),d=t0(),s!==null&&!ln?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~g,Pr(s,o,g)):(lt&&d&&Lu(o),o.flags|=1,Kt(s,o,h,g),o.child)}function mp(s,o,h,d,g){if(sn(h)){var x=!0;Do(o)}else x=!1;if(as(o,g),o.stateNode===null)la(s,o),rp(o,h,d),o0(o,h,d,g),d=!0;else if(s===null){var k=o.stateNode,A=o.memoizedProps;k.props=A;var T=k.context,W=h.contextType;typeof W=="object"&&W!==null?W=Zn(W):(W=sn(h)?wi:zt.current,W=ns(o,W));var ne=h.getDerivedStateFromProps,ie=typeof ne=="function"||typeof k.getSnapshotBeforeUpdate=="function";ie||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(A!==d||T!==W)&&ip(o,k,d,W),Gr=!1;var te=o.memoizedState;k.state=te,Go(o,d,k,g),T=o.memoizedState,A!==d||te!==T||rn.current||Gr?(typeof ne=="function"&&(l0(o,h,ne,d),T=o.memoizedState),(A=Gr||np(o,h,A,d,te,T,W))?(ie||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"&&(o.flags|=4194308)):(typeof k.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=d,o.memoizedState=T),k.props=d,k.state=T,k.context=W,d=A):(typeof k.componentDidMount=="function"&&(o.flags|=4194308),d=!1)}else{k=o.stateNode,Td(s,o),A=o.memoizedProps,W=o.type===o.elementType?A:Hn(o.type,A),k.props=W,ie=o.pendingProps,te=k.context,T=h.contextType,typeof T=="object"&&T!==null?T=Zn(T):(T=sn(h)?wi:zt.current,T=ns(o,T));var me=h.getDerivedStateFromProps;(ne=typeof me=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(A!==ie||te!==T)&&ip(o,k,d,T),Gr=!1,te=o.memoizedState,k.state=te,Go(o,d,k,g);var xe=o.memoizedState;A!==ie||te!==xe||rn.current||Gr?(typeof me=="function"&&(l0(o,h,me,d),xe=o.memoizedState),(W=Gr||np(o,h,W,d,te,xe,T)||!1)?(ne||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(d,xe,T),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(d,xe,T)),typeof k.componentDidUpdate=="function"&&(o.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof k.componentDidUpdate!="function"||A===s.memoizedProps&&te===s.memoizedState||(o.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&te===s.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=xe),k.props=d,k.state=xe,k.context=T,d=W):(typeof k.componentDidUpdate!="function"||A===s.memoizedProps&&te===s.memoizedState||(o.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&te===s.memoizedState||(o.flags|=1024),d=!1)}return h0(s,o,h,d,x,g)}function h0(s,o,h,d,g,x){pp(s,o);var k=(o.flags&128)!==0;if(!d&&!k)return g&&vd(o,h,!1),Pr(s,o,x);d=o.stateNode,cy.current=o;var A=k&&typeof h.getDerivedStateFromError!="function"?null:d.render();return o.flags|=1,s!==null&&k?(o.child=ls(o,s.child,null,x),o.child=ls(o,null,A,x)):Kt(s,o,A,x),o.memoizedState=d.state,g&&vd(o,h,!0),o.child}function Op(s){var o=s.stateNode;o.pendingContext?yd(s,o.pendingContext,o.pendingContext!==o.context):o.context&&yd(s,o.context,!1),Bu(s,o.containerInfo)}function gp(s,o,h,d,g){return ss(),zu(g),o.flags|=256,Kt(s,o,h,d),o.child}var f0={dehydrated:null,treeContext:null,retryLane:0};function d0(s){return{baseLanes:s,cachePool:null,transitions:null}}function yp(s,o,h){var d=o.pendingProps,g=ct.current,x=!1,k=(o.flags&128)!==0,A;if((A=k)||(A=s!==null&&s.memoizedState===null?!1:(g&2)!==0),A?(x=!0,o.flags&=-129):(s===null||s.memoizedState!==null)&&(g|=1),tt(ct,g&1),s===null)return _u(o),s=o.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((o.mode&1)===0?o.lanes=1:s.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(k=d.children,s=d.fallback,x?(d=o.mode,x=o.child,k={mode:"hidden",children:k},(d&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=k):x=ya(k,d,0,null),s=Mi(s,d,h,null),x.return=o,s.return=o,x.sibling=s,o.child=x,o.child.memoizedState=d0(h),o.memoizedState=f0,s):p0(o,k));if(g=s.memoizedState,g!==null&&(A=g.dehydrated,A!==null))return uy(s,o,k,d,A,g,h);if(x){x=d.fallback,k=o.mode,g=s.child,A=g.sibling;var T={mode:"hidden",children:d.children};return(k&1)===0&&o.child!==g?(d=o.child,d.childLanes=0,d.pendingProps=T,o.deletions=null):(d=ii(g,T),d.subtreeFlags=g.subtreeFlags&14680064),A!==null?x=ii(A,x):(x=Mi(x,k,h,null),x.flags|=2),x.return=o,d.return=o,d.sibling=x,o.child=d,d=x,x=o.child,k=s.child.memoizedState,k=k===null?d0(h):{baseLanes:k.baseLanes|h,cachePool:null,transitions:k.transitions},x.memoizedState=k,x.childLanes=s.childLanes&~h,o.memoizedState=f0,d}return x=s.child,s=x.sibling,d=ii(x,{mode:"visible",children:d.children}),(o.mode&1)===0&&(d.lanes=h),d.return=o,d.sibling=null,s!==null&&(h=o.deletions,h===null?(o.deletions=[s],o.flags|=16):h.push(s)),o.child=d,o.memoizedState=null,d}function p0(s,o){return o=ya({mode:"visible",children:o},s.mode,0,null),o.return=s,s.child=o}function sa(s,o,h,d){return d!==null&&zu(d),ls(o,s.child,null,h),s=p0(o,o.pendingProps.children),s.flags|=2,o.memoizedState=null,s}function uy(s,o,h,d,g,x,k){if(h)return o.flags&256?(o.flags&=-257,d=a0(Error(t(422))),sa(s,o,k,d)):o.memoizedState!==null?(o.child=s.child,o.flags|=128,null):(x=d.fallback,g=o.mode,d=ya({mode:"visible",children:d.children},g,0,null),x=Mi(x,g,k,null),x.flags|=2,d.return=o,x.return=o,d.sibling=x,o.child=d,(o.mode&1)!==0&&ls(o,s.child,null,k),o.child.memoizedState=d0(k),o.memoizedState=f0,x);if((o.mode&1)===0)return sa(s,o,k,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var A=d.dgst;return d=A,x=Error(t(419)),d=a0(x,d,void 0),sa(s,o,k,d)}if(A=(k&s.childLanes)!==0,ln||A){if(d=At,d!==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&(d.suspendedLanes|k))!==0?0:g,g!==0&&g!==x.retryLane&&(x.retryLane=g,Qr(s,g),Fn(d,s,g,-1))}return Z0(),d=a0(Error(t(421))),sa(s,o,k,d)}return g.data==="$?"?(o.flags|=128,o.child=s.child,o=ky.bind(null,s),g._reactRetry=o,null):(s=x.treeContext,vn=Fr(g.nextSibling),xn=o,lt=!0,Wn=null,s!==null&&(An[Cn++]=kr,An[Cn++]=br,An[Cn++]=ki,kr=s.id,br=s.overflow,ki=o),o=p0(o,d.children),o.flags|=4096,o)}function xp(s,o,h){s.lanes|=o;var d=s.alternate;d!==null&&(d.lanes|=o),Iu(s.return,o,h)}function m0(s,o,h,d,g){var x=s.memoizedState;x===null?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:h,tailMode:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=d,x.tail=h,x.tailMode=g)}function vp(s,o,h){var d=o.pendingProps,g=d.revealOrder,x=d.tail;if(Kt(s,o,d.children,h),d=ct.current,(d&2)!==0)d=d&1|2,o.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=o.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&xp(s,h,o);else if(s.tag===19)xp(s,h,o);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}d&=1}if(tt(ct,d),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(h=o.child,g=null;h!==null;)s=h.alternate,s!==null&&Ko(s)===null&&(g=h),h=h.sibling;h=g,h===null?(g=o.child,o.child=null):(g=h.sibling,h.sibling=null),m0(o,!1,g,h,x);break;case"backwards":for(h=null,g=o.child,o.child=null;g!==null;){if(s=g.alternate,s!==null&&Ko(s)===null){o.child=g;break}s=g.sibling,g.sibling=h,h=g,g=s}m0(o,!0,h,null,x);break;case"together":m0(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function la(s,o){(o.mode&1)===0&&s!==null&&(s.alternate=null,o.alternate=null,o.flags|=2)}function Pr(s,o,h){if(s!==null&&(o.dependencies=s.dependencies),Ai|=o.lanes,(h&o.childLanes)===0)return null;if(s!==null&&o.child!==s.child)throw Error(t(153));if(o.child!==null){for(s=o.child,h=ii(s,s.pendingProps),o.child=h,h.return=o;s.sibling!==null;)s=s.sibling,h=h.sibling=ii(s,s.pendingProps),h.return=o;h.sibling=null}return o.child}function hy(s,o,h){switch(o.tag){case 3:Op(o),ss();break;case 5:jd(o);break;case 1:sn(o.type)&&Do(o);break;case 4:Bu(o,o.stateNode.containerInfo);break;case 10:var d=o.type._context,g=o.memoizedProps.value;tt(Bo,d._currentValue),d._currentValue=g;break;case 13:if(d=o.memoizedState,d!==null)return d.dehydrated!==null?(tt(ct,ct.current&1),o.flags|=128,null):(h&o.child.childLanes)!==0?yp(s,o,h):(tt(ct,ct.current&1),s=Pr(s,o,h),s!==null?s.sibling:null);tt(ct,ct.current&1);break;case 19:if(d=(h&o.childLanes)!==0,(s.flags&128)!==0){if(d)return vp(s,o,h);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),tt(ct,ct.current),d)break;return null;case 22:case 23:return o.lanes=0,dp(s,o,h)}return Pr(s,o,h)}var Sp,O0,wp,kp;Sp=function(s,o){for(var h=o.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===o)break;for(;h.sibling===null;){if(h.return===null||h.return===o)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},O0=function(){},wp=function(s,o,h,d){var g=s.memoizedProps;if(g!==d){s=o.stateNode,$i(ir.current);var x=null;switch(h){case"input":g=B(s,g),d=B(s,d),x=[];break;case"select":g=F({},g,{value:void 0}),d=F({},d,{value:void 0}),x=[];break;case"textarea":g=St(s,g),d=St(s,d),x=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(s.onclick=No)}Nt(h,d);var k;h=null;for(W in g)if(!d.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)?x||(x=[]):(x=x||[]).push(W,null));for(W in d){var T=d[W];if(A=g!=null?g[W]:void 0,d.hasOwnProperty(W)&&T!==A&&(T!=null||A!=null))if(W==="style")if(A){for(k in A)!A.hasOwnProperty(k)||T&&T.hasOwnProperty(k)||(h||(h={}),h[k]="");for(k in T)T.hasOwnProperty(k)&&A[k]!==T[k]&&(h||(h={}),h[k]=T[k])}else h||(x||(x=[]),x.push(W,h)),h=T;else W==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,A=A?A.__html:void 0,T!=null&&A!==T&&(x=x||[]).push(W,T)):W==="children"?typeof T!="string"&&typeof T!="number"||(x=x||[]).push(W,""+T):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(i.hasOwnProperty(W)?(T!=null&&W==="onScroll"&&rt("scroll",s),x||A===T||(x=[])):(x=x||[]).push(W,T))}h&&(x=x||[]).push("style",h);var W=x;(o.updateQueue=W)&&(o.flags|=4)}},kp=function(s,o,h,d){h!==d&&(o.flags|=4)};function kl(s,o){if(!lt)switch(s.tailMode){case"hidden":o=s.tail;for(var h=null;o!==null;)o.alternate!==null&&(h=o),o=o.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var d=null;h!==null;)h.alternate!==null&&(d=h),h=h.sibling;d===null?o||s.tail===null?s.tail=null:s.tail.sibling=null:d.sibling=null}}function Wt(s){var o=s.alternate!==null&&s.alternate.child===s.child,h=0,d=0;if(o)for(var g=s.child;g!==null;)h|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=s,g=g.sibling;else for(g=s.child;g!==null;)h|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=s,g=g.sibling;return s.subtreeFlags|=d,s.childLanes=h,o}function fy(s,o,h){var d=o.pendingProps;switch(Xu(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(o),null;case 1:return sn(o.type)&&zo(),Wt(o),null;case 3:return d=o.stateNode,cs(),it(rn),it(zt),Gu(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Yo(o)?o.flags|=4:s===null||s.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Wn!==null&&(P0(Wn),Wn=null))),O0(s,o),Wt(o),null;case 5:qu(o);var g=$i(yl.current);if(h=o.type,s!==null&&o.stateNode!=null)wp(s,o,h,d,g),s.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!d){if(o.stateNode===null)throw Error(t(166));return Wt(o),null}if(s=$i(ir.current),Yo(o)){d=o.stateNode,h=o.type;var x=o.memoizedProps;switch(d[rr]=o,d[dl]=x,s=(o.mode&1)!==0,h){case"dialog":rt("cancel",d),rt("close",d);break;case"iframe":case"object":case"embed":rt("load",d);break;case"video":case"audio":for(g=0;g<ul.length;g++)rt(ul[g],d);break;case"source":rt("error",d);break;case"img":case"image":case"link":rt("error",d),rt("load",d);break;case"details":rt("toggle",d);break;case"input":Ze(d,x),rt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!x.multiple},rt("invalid",d);break;case"textarea":er(d,x),rt("invalid",d)}Nt(h,x),g=null;for(var k in x)if(x.hasOwnProperty(k)){var A=x[k];k==="children"?typeof A=="string"?d.textContent!==A&&(x.suppressHydrationWarning!==!0&&Xo(d.textContent,A,s),g=["children",A]):typeof A=="number"&&d.textContent!==""+A&&(x.suppressHydrationWarning!==!0&&Xo(d.textContent,A,s),g=["children",""+A]):i.hasOwnProperty(k)&&A!=null&&k==="onScroll"&&rt("scroll",d)}switch(h){case"input":Ee(d),Ke(d,x,!0);break;case"textarea":Ee(d),tr(d);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(d.onclick=No)}d=g,o.updateQueue=d,d!==null&&(o.flags|=4)}else{k=g.nodeType===9?g:g.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=_n(h)),s==="http://www.w3.org/1999/xhtml"?h==="script"?(s=k.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof d.is=="string"?s=k.createElement(h,{is:d.is}):(s=k.createElement(h),h==="select"&&(k=s,d.multiple?k.multiple=!0:d.size&&(k.size=d.size))):s=k.createElementNS(s,h),s[rr]=o,s[dl]=d,Sp(s,o,!1,!1),o.stateNode=s;e:{switch(k=xi(h,d),h){case"dialog":rt("cancel",s),rt("close",s),g=d;break;case"iframe":case"object":case"embed":rt("load",s),g=d;break;case"video":case"audio":for(g=0;g<ul.length;g++)rt(ul[g],s);g=d;break;case"source":rt("error",s),g=d;break;case"img":case"image":case"link":rt("error",s),rt("load",s),g=d;break;case"details":rt("toggle",s),g=d;break;case"input":Ze(s,d),g=B(s,d),rt("invalid",s);break;case"option":g=d;break;case"select":s._wrapperState={wasMultiple:!!d.multiple},g=F({},d,{value:void 0}),rt("invalid",s);break;case"textarea":er(s,d),g=St(s,d),rt("invalid",s);break;default:g=d}Nt(h,g),A=g;for(x in A)if(A.hasOwnProperty(x)){var T=A[x];x==="style"?Gt(s,T):x==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,T!=null&&H(s,T)):x==="children"?typeof T=="string"?(h!=="textarea"||T!=="")&&he(s,T):typeof T=="number"&&he(s,""+T):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(i.hasOwnProperty(x)?T!=null&&x==="onScroll"&&rt("scroll",s):T!=null&&P(s,x,T,k))}switch(h){case"input":Ee(s),Ke(s,d,!1);break;case"textarea":Ee(s),tr(s);break;case"option":d.value!=null&&s.setAttribute("value",""+pe(d.value));break;case"select":s.multiple=!!d.multiple,x=d.value,x!=null?vt(s,!!d.multiple,x,!1):d.defaultValue!=null&&vt(s,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(s.onclick=No)}switch(h){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Wt(o),null;case 6:if(s&&o.stateNode!=null)kp(s,o,s.memoizedProps,d);else{if(typeof d!="string"&&o.stateNode===null)throw Error(t(166));if(h=$i(yl.current),$i(ir.current),Yo(o)){if(d=o.stateNode,h=o.memoizedProps,d[rr]=o,(x=d.nodeValue!==h)&&(s=xn,s!==null))switch(s.tag){case 3:Xo(d.nodeValue,h,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Xo(d.nodeValue,h,(s.mode&1)!==0)}x&&(o.flags|=4)}else d=(h.nodeType===9?h:h.ownerDocument).createTextNode(d),d[rr]=o,o.stateNode=d}return Wt(o),null;case 13:if(it(ct),d=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(lt&&vn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)$d(),ss(),o.flags|=98560,x=!1;else if(x=Yo(o),d!==null&&d.dehydrated!==null){if(s===null){if(!x)throw Error(t(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(t(317));x[rr]=o}else ss(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Wt(o),x=!1}else Wn!==null&&(P0(Wn),Wn=null),x=!0;if(!x)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=h,o):(d=d!==null,d!==(s!==null&&s.memoizedState!==null)&&d&&(o.child.flags|=8192,(o.mode&1)!==0&&(s===null||(ct.current&1)!==0?Qt===0&&(Qt=3):Z0())),o.updateQueue!==null&&(o.flags|=4),Wt(o),null);case 4:return cs(),O0(s,o),s===null&&hl(o.stateNode.containerInfo),Wt(o),null;case 10:return Hu(o.type._context),Wt(o),null;case 17:return sn(o.type)&&zo(),Wt(o),null;case 19:if(it(ct),x=o.memoizedState,x===null)return Wt(o),null;if(d=(o.flags&128)!==0,k=x.rendering,k===null)if(d)kl(x,!1);else{if(Qt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(k=Ko(s),k!==null){for(o.flags|=128,kl(x,!1),d=k.updateQueue,d!==null&&(o.updateQueue=d,o.flags|=4),o.subtreeFlags=0,d=h,h=o.child;h!==null;)x=h,s=d,x.flags&=14680066,k=x.alternate,k===null?(x.childLanes=0,x.lanes=s,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=k.childLanes,x.lanes=k.lanes,x.child=k.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=k.memoizedProps,x.memoizedState=k.memoizedState,x.updateQueue=k.updateQueue,x.type=k.type,s=k.dependencies,x.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),h=h.sibling;return tt(ct,ct.current&1|2),o.child}s=s.sibling}x.tail!==null&&mt()>ds&&(o.flags|=128,d=!0,kl(x,!1),o.lanes=4194304)}else{if(!d)if(s=Ko(k),s!==null){if(o.flags|=128,d=!0,h=s.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),kl(x,!0),x.tail===null&&x.tailMode==="hidden"&&!k.alternate&&!lt)return Wt(o),null}else 2*mt()-x.renderingStartTime>ds&&h!==1073741824&&(o.flags|=128,d=!0,kl(x,!1),o.lanes=4194304);x.isBackwards?(k.sibling=o.child,o.child=k):(h=x.last,h!==null?h.sibling=k:o.child=k,x.last=k)}return x.tail!==null?(o=x.tail,x.rendering=o,x.tail=o.sibling,x.renderingStartTime=mt(),o.sibling=null,h=ct.current,tt(ct,d?h&1|2:h&1),o):(Wt(o),null);case 22:case 23:return C0(),d=o.memoizedState!==null,s!==null&&s.memoizedState!==null!==d&&(o.flags|=8192),d&&(o.mode&1)!==0?(Sn&1073741824)!==0&&(Wt(o),o.subtreeFlags&6&&(o.flags|=8192)):Wt(o),null;case 24:return null;case 25:return null}throw Error(t(156,o.tag))}function dy(s,o){switch(Xu(o),o.tag){case 1:return sn(o.type)&&zo(),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return cs(),it(rn),it(zt),Gu(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 5:return qu(o),null;case 13:if(it(ct),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(t(340));ss()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return it(ct),null;case 4:return cs(),null;case 10:return Hu(o.type._context),null;case 22:case 23:return C0(),null;case 24:return null;default:return null}}var oa=!1,Ht=!1,py=typeof WeakSet=="function"?WeakSet:Set,ge=null;function hs(s,o){var h=s.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(d){dt(s,o,d)}else h.current=null}function g0(s,o,h){try{h()}catch(d){dt(s,o,d)}}var bp=!1;function my(s,o){if(Cu=Po,s=nd(),Su(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var d=h.getSelection&&h.getSelection();if(d&&d.rangeCount!==0){h=d.anchorNode;var g=d.anchorOffset,x=d.focusNode;d=d.focusOffset;try{h.nodeType,x.nodeType}catch{h=null;break e}var k=0,A=-1,T=-1,W=0,ne=0,ie=s,te=null;t:for(;;){for(var me;ie!==h||g!==0&&ie.nodeType!==3||(A=k+g),ie!==x||d!==0&&ie.nodeType!==3||(T=k+d),ie.nodeType===3&&(k+=ie.nodeValue.length),(me=ie.firstChild)!==null;)te=ie,ie=me;for(;;){if(ie===s)break t;if(te===h&&++W===g&&(A=k),te===x&&++ne===d&&(T=k),(me=ie.nextSibling)!==null)break;ie=te,te=ie.parentNode}ie=me}h=A===-1||T===-1?null:{start:A,end:T}}else h=null}h=h||{start:0,end:0}}else h=null;for(Zu={focusedElem:s,selectionRange:h},Po=!1,ge=o;ge!==null;)if(o=ge,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,ge=s;else for(;ge!==null;){o=ge;try{var xe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ke=xe.memoizedProps,Ot=xe.memoizedState,N=o.stateNode,V=N.getSnapshotBeforeUpdate(o.elementType===o.type?ke:Hn(o.type,ke),Ot);N.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var D=o.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(oe){dt(o,o.return,oe)}if(s=o.sibling,s!==null){s.return=o.return,ge=s;break}ge=o.return}return xe=bp,bp=!1,xe}function bl(s,o,h){var d=o.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&s)===s){var x=g.destroy;g.destroy=void 0,x!==void 0&&g0(o,h,x)}g=g.next}while(g!==d)}}function aa(s,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var h=o=o.next;do{if((h.tag&s)===s){var d=h.create;h.destroy=d()}h=h.next}while(h!==o)}}function y0(s){var o=s.ref;if(o!==null){var h=s.stateNode;switch(s.tag){case 5:s=h;break;default:s=h}typeof o=="function"?o(s):o.current=s}}function Qp(s){var o=s.alternate;o!==null&&(s.alternate=null,Qp(o)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(o=s.stateNode,o!==null&&(delete o[rr],delete o[dl],delete o[ju],delete o[G5],delete o[K5])),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 $p(s){return s.tag===5||s.tag===3||s.tag===4}function Pp(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||$p(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 x0(s,o,h){var d=s.tag;if(d===5||d===6)s=s.stateNode,o?h.nodeType===8?h.parentNode.insertBefore(s,o):h.insertBefore(s,o):(h.nodeType===8?(o=h.parentNode,o.insertBefore(s,h)):(o=h,o.appendChild(s)),h=h._reactRootContainer,h!=null||o.onclick!==null||(o.onclick=No));else if(d!==4&&(s=s.child,s!==null))for(x0(s,o,h),s=s.sibling;s!==null;)x0(s,o,h),s=s.sibling}function v0(s,o,h){var d=s.tag;if(d===5||d===6)s=s.stateNode,o?h.insertBefore(s,o):h.appendChild(s);else if(d!==4&&(s=s.child,s!==null))for(v0(s,o,h),s=s.sibling;s!==null;)v0(s,o,h),s=s.sibling}var Et=null,In=!1;function Jr(s,o,h){for(h=h.child;h!==null;)Ap(s,o,h),h=h.sibling}function Ap(s,o,h){if(nr&&typeof nr.onCommitFiberUnmount=="function")try{nr.onCommitFiberUnmount(So,h)}catch{}switch(h.tag){case 5:Ht||hs(h,o);case 6:var d=Et,g=In;Et=null,Jr(s,o,h),Et=d,In=g,Et!==null&&(In?(s=Et,h=h.stateNode,s.nodeType===8?s.parentNode.removeChild(h):s.removeChild(h)):Et.removeChild(h.stateNode));break;case 18:Et!==null&&(In?(s=Et,h=h.stateNode,s.nodeType===8?Eu(s.parentNode,h):s.nodeType===1&&Eu(s,h),nl(s)):Eu(Et,h.stateNode));break;case 4:d=Et,g=In,Et=h.stateNode.containerInfo,In=!0,Jr(s,o,h),Et=d,In=g;break;case 0:case 11:case 14:case 15:if(!Ht&&(d=h.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var x=g,k=x.destroy;x=x.tag,k!==void 0&&((x&2)!==0||(x&4)!==0)&&g0(h,o,k),g=g.next}while(g!==d)}Jr(s,o,h);break;case 1:if(!Ht&&(hs(h,o),d=h.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=h.memoizedProps,d.state=h.memoizedState,d.componentWillUnmount()}catch(A){dt(h,o,A)}Jr(s,o,h);break;case 21:Jr(s,o,h);break;case 22:h.mode&1?(Ht=(d=Ht)||h.memoizedState!==null,Jr(s,o,h),Ht=d):Jr(s,o,h);break;default:Jr(s,o,h)}}function Cp(s){var o=s.updateQueue;if(o!==null){s.updateQueue=null;var h=s.stateNode;h===null&&(h=s.stateNode=new py),o.forEach(function(d){var g=by.bind(null,s,d);h.has(d)||(h.add(d),d.then(g,g))})}}function Yn(s,o){var h=o.deletions;if(h!==null)for(var d=0;d<h.length;d++){var g=h[d];try{var x=s,k=o,A=k;e:for(;A!==null;){switch(A.tag){case 5:Et=A.stateNode,In=!1;break e;case 3:Et=A.stateNode.containerInfo,In=!0;break e;case 4:Et=A.stateNode.containerInfo,In=!0;break e}A=A.return}if(Et===null)throw Error(t(160));Ap(x,k,g),Et=null,In=!1;var T=g.alternate;T!==null&&(T.return=null),g.return=null}catch(W){dt(g,o,W)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Zp(o,s),o=o.sibling}function Zp(s,o){var h=s.alternate,d=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Yn(o,s),lr(s),d&4){try{bl(3,s,s.return),aa(3,s)}catch(ke){dt(s,s.return,ke)}try{bl(5,s,s.return)}catch(ke){dt(s,s.return,ke)}}break;case 1:Yn(o,s),lr(s),d&512&&h!==null&&hs(h,h.return);break;case 5:if(Yn(o,s),lr(s),d&512&&h!==null&&hs(h,h.return),s.flags&32){var g=s.stateNode;try{he(g,"")}catch(ke){dt(s,s.return,ke)}}if(d&4&&(g=s.stateNode,g!=null)){var x=s.memoizedProps,k=h!==null?h.memoizedProps:x,A=s.type,T=s.updateQueue;if(s.updateQueue=null,T!==null)try{A==="input"&&x.type==="radio"&&x.name!=null&&Ne(g,x),xi(A,k);var W=xi(A,x);for(k=0;k<T.length;k+=2){var ne=T[k],ie=T[k+1];ne==="style"?Gt(g,ie):ne==="dangerouslySetInnerHTML"?H(g,ie):ne==="children"?he(g,ie):P(g,ne,ie,W)}switch(A){case"input":Me(g,x);break;case"textarea":Nn(g,x);break;case"select":var te=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!x.multiple;var me=x.value;me!=null?vt(g,!!x.multiple,me,!1):te!==!!x.multiple&&(x.defaultValue!=null?vt(g,!!x.multiple,x.defaultValue,!0):vt(g,!!x.multiple,x.multiple?[]:"",!1))}g[dl]=x}catch(ke){dt(s,s.return,ke)}}break;case 6:if(Yn(o,s),lr(s),d&4){if(s.stateNode===null)throw Error(t(162));g=s.stateNode,x=s.memoizedProps;try{g.nodeValue=x}catch(ke){dt(s,s.return,ke)}}break;case 3:if(Yn(o,s),lr(s),d&4&&h!==null&&h.memoizedState.isDehydrated)try{nl(o.containerInfo)}catch(ke){dt(s,s.return,ke)}break;case 4:Yn(o,s),lr(s);break;case 13:Yn(o,s),lr(s),g=s.child,g.flags&8192&&(x=g.memoizedState!==null,g.stateNode.isHidden=x,!x||g.alternate!==null&&g.alternate.memoizedState!==null||(k0=mt())),d&4&&Cp(s);break;case 22:if(ne=h!==null&&h.memoizedState!==null,s.mode&1?(Ht=(W=Ht)||ne,Yn(o,s),Ht=W):Yn(o,s),lr(s),d&8192){if(W=s.memoizedState!==null,(s.stateNode.isHidden=W)&&!ne&&(s.mode&1)!==0)for(ge=s,ne=s.child;ne!==null;){for(ie=ge=ne;ge!==null;){switch(te=ge,me=te.child,te.tag){case 0:case 11:case 14:case 15:bl(4,te,te.return);break;case 1:hs(te,te.return);var xe=te.stateNode;if(typeof xe.componentWillUnmount=="function"){d=te,h=te.return;try{o=d,xe.props=o.memoizedProps,xe.state=o.memoizedState,xe.componentWillUnmount()}catch(ke){dt(d,h,ke)}}break;case 5:hs(te,te.return);break;case 22:if(te.memoizedState!==null){Ep(ie);continue}}me!==null?(me.return=te,ge=me):Ep(ie)}ne=ne.sibling}e:for(ne=null,ie=s;;){if(ie.tag===5){if(ne===null){ne=ie;try{g=ie.stateNode,W?(x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(A=ie.stateNode,T=ie.memoizedProps.style,k=T!=null&&T.hasOwnProperty("display")?T.display:null,A.style.display=Pe("display",k))}catch(ke){dt(s,s.return,ke)}}}else if(ie.tag===6){if(ne===null)try{ie.stateNode.nodeValue=W?"":ie.memoizedProps}catch(ke){dt(s,s.return,ke)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===s)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===s)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===s)break e;ne===ie&&(ne=null),ie=ie.return}ne===ie&&(ne=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:Yn(o,s),lr(s),d&4&&Cp(s);break;case 21:break;default:Yn(o,s),lr(s)}}function lr(s){var o=s.flags;if(o&2){try{e:{for(var h=s.return;h!==null;){if($p(h)){var d=h;break e}h=h.return}throw Error(t(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(he(g,""),d.flags&=-33);var x=Pp(s);v0(s,x,g);break;case 3:case 4:var k=d.stateNode.containerInfo,A=Pp(s);x0(s,A,k);break;default:throw Error(t(161))}}catch(T){dt(s,s.return,T)}s.flags&=-3}o&4096&&(s.flags&=-4097)}function Oy(s,o,h){ge=s,Tp(s)}function Tp(s,o,h){for(var d=(s.mode&1)!==0;ge!==null;){var g=ge,x=g.child;if(g.tag===22&&d){var k=g.memoizedState!==null||oa;if(!k){var A=g.alternate,T=A!==null&&A.memoizedState!==null||Ht;A=oa;var W=Ht;if(oa=k,(Ht=T)&&!W)for(ge=g;ge!==null;)k=ge,T=k.child,k.tag===22&&k.memoizedState!==null?jp(g):T!==null?(T.return=k,ge=T):jp(g);for(;x!==null;)ge=x,Tp(x),x=x.sibling;ge=g,oa=A,Ht=W}Mp(s)}else(g.subtreeFlags&8772)!==0&&x!==null?(x.return=g,ge=x):Mp(s)}}function Mp(s){for(;ge!==null;){var o=ge;if((o.flags&8772)!==0){var h=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Ht||aa(5,o);break;case 1:var d=o.stateNode;if(o.flags&4&&!Ht)if(h===null)d.componentDidMount();else{var g=o.elementType===o.type?h.memoizedProps:Hn(o.type,h.memoizedProps);d.componentDidUpdate(g,h.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&Ed(o,x,d);break;case 3:var k=o.updateQueue;if(k!==null){if(h=null,o.child!==null)switch(o.child.tag){case 5:h=o.child.stateNode;break;case 1:h=o.child.stateNode}Ed(o,k,h)}break;case 5:var A=o.stateNode;if(h===null&&o.flags&4){h=A;var T=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":T.autoFocus&&h.focus();break;case"img":T.src&&(h.src=T.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var W=o.alternate;if(W!==null){var ne=W.memoizedState;if(ne!==null){var ie=ne.dehydrated;ie!==null&&nl(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Ht||o.flags&512&&y0(o)}catch(te){dt(o,o.return,te)}}if(o===s){ge=null;break}if(h=o.sibling,h!==null){h.return=o.return,ge=h;break}ge=o.return}}function Ep(s){for(;ge!==null;){var o=ge;if(o===s){ge=null;break}var h=o.sibling;if(h!==null){h.return=o.return,ge=h;break}ge=o.return}}function jp(s){for(;ge!==null;){var o=ge;try{switch(o.tag){case 0:case 11:case 15:var h=o.return;try{aa(4,o)}catch(T){dt(o,h,T)}break;case 1:var d=o.stateNode;if(typeof d.componentDidMount=="function"){var g=o.return;try{d.componentDidMount()}catch(T){dt(o,g,T)}}var x=o.return;try{y0(o)}catch(T){dt(o,x,T)}break;case 5:var k=o.return;try{y0(o)}catch(T){dt(o,k,T)}}}catch(T){dt(o,o.return,T)}if(o===s){ge=null;break}var A=o.sibling;if(A!==null){A.return=o.return,ge=A;break}ge=o.return}}var gy=Math.ceil,ca=Z.ReactCurrentDispatcher,S0=Z.ReactCurrentOwner,Mn=Z.ReactCurrentBatchConfig,He=0,At=null,wt=null,jt=0,Sn=0,fs=Br(0),Qt=0,Ql=null,Ai=0,ua=0,w0=0,$l=null,on=null,k0=0,ds=1/0,Ar=null,ha=!1,b0=null,ei=null,fa=!1,ti=null,da=0,Pl=0,Q0=null,pa=-1,ma=0;function Jt(){return(He&6)!==0?mt():pa!==-1?pa:pa=mt()}function ni(s){return(s.mode&1)===0?1:(He&2)!==0&&jt!==0?jt&-jt:ey.transition!==null?(ma===0&&(ma=Pf()),ma):(s=Je,s!==0||(s=window.event,s=s===void 0?16:Rf(s.type)),s)}function Fn(s,o,h,d){if(50<Pl)throw Pl=0,Q0=null,Error(t(185));Gs(s,h,d),((He&2)===0||s!==At)&&(s===At&&((He&2)===0&&(ua|=h),Qt===4&&ri(s,jt)),an(s,d),h===1&&He===0&&(o.mode&1)===0&&(ds=mt()+500,Wo&&Ur()))}function an(s,o){var h=s.callbackNode;e5(s,o);var d=bo(s,s===At?jt:0);if(d===0)h!==null&&bf(h),s.callbackNode=null,s.callbackPriority=0;else if(o=d&-d,s.callbackPriority!==o){if(h!=null&&bf(h),o===1)s.tag===0?J5(Rp.bind(null,s)):Sd(Rp.bind(null,s)),q5(function(){(He&6)===0&&Ur()}),h=null;else{switch(Af(d)){case 1:h=iu;break;case 4:h=Qf;break;case 16:h=vo;break;case 536870912:h=$f;break;default:h=vo}h=Hp(h,Vp.bind(null,s))}s.callbackPriority=o,s.callbackNode=h}}function Vp(s,o){if(pa=-1,ma=0,(He&6)!==0)throw Error(t(327));var h=s.callbackNode;if(ps()&&s.callbackNode!==h)return null;var d=bo(s,s===At?jt:0);if(d===0)return null;if((d&30)!==0||(d&s.expiredLanes)!==0||o)o=Oa(s,d);else{o=d;var g=He;He|=2;var x=Xp();(At!==s||jt!==o)&&(Ar=null,ds=mt()+500,Zi(s,o));do try{vy();break}catch(A){Lp(s,A)}while(!0);Wu(),ca.current=x,He=g,wt!==null?o=0:(At=null,jt=0,o=Qt)}if(o!==0){if(o===2&&(g=su(s),g!==0&&(d=g,o=$0(s,g))),o===1)throw h=Ql,Zi(s,0),ri(s,d),an(s,mt()),h;if(o===6)ri(s,d);else{if(g=s.current.alternate,(d&30)===0&&!yy(g)&&(o=Oa(s,d),o===2&&(x=su(s),x!==0&&(d=x,o=$0(s,x))),o===1))throw h=Ql,Zi(s,0),ri(s,d),an(s,mt()),h;switch(s.finishedWork=g,s.finishedLanes=d,o){case 0:case 1:throw Error(t(345));case 2:Ti(s,on,Ar);break;case 3:if(ri(s,d),(d&130023424)===d&&(o=k0+500-mt(),10<o)){if(bo(s,0)!==0)break;if(g=s.suspendedLanes,(g&d)!==d){Jt(),s.pingedLanes|=s.suspendedLanes&g;break}s.timeoutHandle=Mu(Ti.bind(null,s,on,Ar),o);break}Ti(s,on,Ar);break;case 4:if(ri(s,d),(d&4194240)===d)break;for(o=s.eventTimes,g=-1;0<d;){var k=31-zn(d);x=1<<k,k=o[k],k>g&&(g=k),d&=~x}if(d=g,d=mt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*gy(d/1960))-d,10<d){s.timeoutHandle=Mu(Ti.bind(null,s,on,Ar),d);break}Ti(s,on,Ar);break;case 5:Ti(s,on,Ar);break;default:throw Error(t(329))}}}return an(s,mt()),s.callbackNode===h?Vp.bind(null,s):null}function $0(s,o){var h=$l;return s.current.memoizedState.isDehydrated&&(Zi(s,o).flags|=256),s=Oa(s,o),s!==2&&(o=on,on=h,o!==null&&P0(o)),s}function P0(s){on===null?on=s:on.push.apply(on,s)}function yy(s){for(var o=s;;){if(o.flags&16384){var h=o.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var d=0;d<h.length;d++){var g=h[d],x=g.getSnapshot;g=g.value;try{if(!Dn(x(),g))return!1}catch{return!1}}}if(h=o.child,o.subtreeFlags&16384&&h!==null)h.return=o,o=h;else{if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function ri(s,o){for(o&=~w0,o&=~ua,s.suspendedLanes|=o,s.pingedLanes&=~o,s=s.expirationTimes;0<o;){var h=31-zn(o),d=1<<h;s[h]=-1,o&=~d}}function Rp(s){if((He&6)!==0)throw Error(t(327));ps();var o=bo(s,0);if((o&1)===0)return an(s,mt()),null;var h=Oa(s,o);if(s.tag!==0&&h===2){var d=su(s);d!==0&&(o=d,h=$0(s,d))}if(h===1)throw h=Ql,Zi(s,0),ri(s,o),an(s,mt()),h;if(h===6)throw Error(t(345));return s.finishedWork=s.current.alternate,s.finishedLanes=o,Ti(s,on,Ar),an(s,mt()),null}function A0(s,o){var h=He;He|=1;try{return s(o)}finally{He=h,He===0&&(ds=mt()+500,Wo&&Ur())}}function Ci(s){ti!==null&&ti.tag===0&&(He&6)===0&&ps();var o=He;He|=1;var h=Mn.transition,d=Je;try{if(Mn.transition=null,Je=1,s)return s()}finally{Je=d,Mn.transition=h,He=o,(He&6)===0&&Ur()}}function C0(){Sn=fs.current,it(fs)}function Zi(s,o){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;if(h!==-1&&(s.timeoutHandle=-1,B5(h)),wt!==null)for(h=wt.return;h!==null;){var d=h;switch(Xu(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&zo();break;case 3:cs(),it(rn),it(zt),Gu();break;case 5:qu(d);break;case 4:cs();break;case 13:it(ct);break;case 19:it(ct);break;case 10:Hu(d.type._context);break;case 22:case 23:C0()}h=h.return}if(At=s,wt=s=ii(s.current,null),jt=Sn=o,Qt=0,Ql=null,w0=ua=Ai=0,on=$l=null,Qi!==null){for(o=0;o<Qi.length;o++)if(h=Qi[o],d=h.interleaved,d!==null){h.interleaved=null;var g=d.next,x=h.pending;if(x!==null){var k=x.next;x.next=g,d.next=k}h.pending=d}Qi=null}return s}function Lp(s,o){do{var h=wt;try{if(Wu(),Jo.current=ra,ea){for(var d=ut.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}ea=!1}if(Pi=0,Pt=bt=ut=null,xl=!1,vl=0,S0.current=null,h===null||h.return===null){Qt=1,Ql=o,wt=null;break}e:{var x=s,k=h.return,A=h,T=o;if(o=jt,A.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){var W=T,ne=A,ie=ne.tag;if((ne.mode&1)===0&&(ie===0||ie===11||ie===15)){var te=ne.alternate;te?(ne.updateQueue=te.updateQueue,ne.memoizedState=te.memoizedState,ne.lanes=te.lanes):(ne.updateQueue=null,ne.memoizedState=null)}var me=ap(k);if(me!==null){me.flags&=-257,cp(me,k,A,x,o),me.mode&1&&op(x,W,o),o=me,T=W;var xe=o.updateQueue;if(xe===null){var ke=new Set;ke.add(T),o.updateQueue=ke}else xe.add(T);break e}else{if((o&1)===0){op(x,W,o),Z0();break e}T=Error(t(426))}}else if(lt&&A.mode&1){var Ot=ap(k);if(Ot!==null){(Ot.flags&65536)===0&&(Ot.flags|=256),cp(Ot,k,A,x,o),zu(us(T,A));break e}}x=T=us(T,A),Qt!==4&&(Qt=2),$l===null?$l=[x]:$l.push(x),x=k;do{switch(x.tag){case 3:x.flags|=65536,o&=-o,x.lanes|=o;var N=sp(x,T,o);Md(x,N);break e;case 1:A=T;var V=x.type,D=x.stateNode;if((x.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(ei===null||!ei.has(D)))){x.flags|=65536,o&=-o,x.lanes|=o;var oe=lp(x,A,o);Md(x,oe);break e}}x=x.return}while(x!==null)}_p(h)}catch(be){o=be,wt===h&&h!==null&&(wt=h=h.return);continue}break}while(!0)}function Xp(){var s=ca.current;return ca.current=ra,s===null?ra:s}function Z0(){(Qt===0||Qt===3||Qt===2)&&(Qt=4),At===null||(Ai&268435455)===0&&(ua&268435455)===0||ri(At,jt)}function Oa(s,o){var h=He;He|=2;var d=Xp();(At!==s||jt!==o)&&(Ar=null,Zi(s,o));do try{xy();break}catch(g){Lp(s,g)}while(!0);if(Wu(),He=h,ca.current=d,wt!==null)throw Error(t(261));return At=null,jt=0,Qt}function xy(){for(;wt!==null;)Np(wt)}function vy(){for(;wt!==null&&!I6();)Np(wt)}function Np(s){var o=Wp(s.alternate,s,Sn);s.memoizedProps=s.pendingProps,o===null?_p(s):wt=o,S0.current=null}function _p(s){var o=s;do{var h=o.alternate;if(s=o.return,(o.flags&32768)===0){if(h=fy(h,o,Sn),h!==null){wt=h;return}}else{if(h=dy(h,o),h!==null){h.flags&=32767,wt=h;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Qt=6,wt=null;return}}if(o=o.sibling,o!==null){wt=o;return}wt=o=s}while(o!==null);Qt===0&&(Qt=5)}function Ti(s,o,h){var d=Je,g=Mn.transition;try{Mn.transition=null,Je=1,Sy(s,o,h,d)}finally{Mn.transition=g,Je=d}return null}function Sy(s,o,h,d){do ps();while(ti!==null);if((He&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 x=h.lanes|h.childLanes;if(t5(s,x),s===At&&(wt=At=null,jt=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||fa||(fa=!0,Hp(vo,function(){return ps(),null})),x=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||x){x=Mn.transition,Mn.transition=null;var k=Je;Je=1;var A=He;He|=4,S0.current=null,my(s,h),Zp(h,s),z5(Zu),Po=!!Cu,Zu=Cu=null,s.current=h,Oy(h),Y6(),He=A,Je=k,Mn.transition=x}else s.current=h;if(fa&&(fa=!1,ti=s,da=g),x=s.pendingLanes,x===0&&(ei=null),q6(h.stateNode),an(s,mt()),o!==null)for(d=s.onRecoverableError,h=0;h<o.length;h++)g=o[h],d(g.value,{componentStack:g.stack,digest:g.digest});if(ha)throw ha=!1,s=b0,b0=null,s;return(da&1)!==0&&s.tag!==0&&ps(),x=s.pendingLanes,(x&1)!==0?s===Q0?Pl++:(Pl=0,Q0=s):Pl=0,Ur(),null}function ps(){if(ti!==null){var s=Af(da),o=Mn.transition,h=Je;try{if(Mn.transition=null,Je=16>s?16:s,ti===null)var d=!1;else{if(s=ti,ti=null,da=0,(He&6)!==0)throw Error(t(331));var g=He;for(He|=4,ge=s.current;ge!==null;){var x=ge,k=x.child;if((ge.flags&16)!==0){var A=x.deletions;if(A!==null){for(var T=0;T<A.length;T++){var W=A[T];for(ge=W;ge!==null;){var ne=ge;switch(ne.tag){case 0:case 11:case 15:bl(8,ne,x)}var ie=ne.child;if(ie!==null)ie.return=ne,ge=ie;else for(;ge!==null;){ne=ge;var te=ne.sibling,me=ne.return;if(Qp(ne),ne===W){ge=null;break}if(te!==null){te.return=me,ge=te;break}ge=me}}}var xe=x.alternate;if(xe!==null){var ke=xe.child;if(ke!==null){xe.child=null;do{var Ot=ke.sibling;ke.sibling=null,ke=Ot}while(ke!==null)}}ge=x}}if((x.subtreeFlags&2064)!==0&&k!==null)k.return=x,ge=k;else e:for(;ge!==null;){if(x=ge,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:bl(9,x,x.return)}var N=x.sibling;if(N!==null){N.return=x.return,ge=N;break e}ge=x.return}}var V=s.current;for(ge=V;ge!==null;){k=ge;var D=k.child;if((k.subtreeFlags&2064)!==0&&D!==null)D.return=k,ge=D;else e:for(k=V;ge!==null;){if(A=ge,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:aa(9,A)}}catch(be){dt(A,A.return,be)}if(A===k){ge=null;break e}var oe=A.sibling;if(oe!==null){oe.return=A.return,ge=oe;break e}ge=A.return}}if(He=g,Ur(),nr&&typeof nr.onPostCommitFiberRoot=="function")try{nr.onPostCommitFiberRoot(So,s)}catch{}d=!0}return d}finally{Je=h,Mn.transition=o}}return!1}function zp(s,o,h){o=us(h,o),o=sp(s,o,1),s=Kr(s,o,1),o=Jt(),s!==null&&(Gs(s,1,o),an(s,o))}function dt(s,o,h){if(s.tag===3)zp(s,s,h);else for(;o!==null;){if(o.tag===3){zp(o,s,h);break}else if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ei===null||!ei.has(d))){s=us(h,s),s=lp(o,s,1),o=Kr(o,s,1),s=Jt(),o!==null&&(Gs(o,1,s),an(o,s));break}}o=o.return}}function wy(s,o,h){var d=s.pingCache;d!==null&&d.delete(o),o=Jt(),s.pingedLanes|=s.suspendedLanes&h,At===s&&(jt&h)===h&&(Qt===4||Qt===3&&(jt&130023424)===jt&&500>mt()-k0?Zi(s,0):w0|=h),an(s,o)}function Dp(s,o){o===0&&((s.mode&1)===0?o=1:(o=ko,ko<<=1,(ko&130023424)===0&&(ko=4194304)));var h=Jt();s=Qr(s,o),s!==null&&(Gs(s,o,h),an(s,h))}function ky(s){var o=s.memoizedState,h=0;o!==null&&(h=o.retryLane),Dp(s,h)}function by(s,o){var h=0;switch(s.tag){case 13:var d=s.stateNode,g=s.memoizedState;g!==null&&(h=g.retryLane);break;case 19:d=s.stateNode;break;default:throw Error(t(314))}d!==null&&d.delete(o),Dp(s,h)}var Wp;Wp=function(s,o,h){if(s!==null)if(s.memoizedProps!==o.pendingProps||rn.current)ln=!0;else{if((s.lanes&h)===0&&(o.flags&128)===0)return ln=!1,hy(s,o,h);ln=(s.flags&131072)!==0}else ln=!1,lt&&(o.flags&1048576)!==0&&wd(o,Io,o.index);switch(o.lanes=0,o.tag){case 2:var d=o.type;la(s,o),s=o.pendingProps;var g=ns(o,zt.current);as(o,h),g=e0(null,o,d,s,g,h);var x=t0();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,sn(d)?(x=!0,Do(o)):x=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Fu(o),g.updater=ia,o.stateNode=g,g._reactInternals=o,o0(o,d,s,h),o=h0(null,o,d,!0,x,h)):(o.tag=0,lt&&x&&Lu(o),Kt(null,o,g,h),o=o.child),o;case 16:d=o.elementType;e:{switch(la(s,o),s=o.pendingProps,g=d._init,d=g(d._payload),o.type=d,g=o.tag=$y(d),s=Hn(d,s),g){case 0:o=u0(null,o,d,s,h);break e;case 1:o=mp(null,o,d,s,h);break e;case 11:o=up(null,o,d,s,h);break e;case 14:o=hp(null,o,d,Hn(d.type,s),h);break e}throw Error(t(306,d,""))}return o;case 0:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Hn(d,g),u0(s,o,d,g,h);case 1:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Hn(d,g),mp(s,o,d,g,h);case 3:e:{if(Op(o),s===null)throw Error(t(387));d=o.pendingProps,x=o.memoizedState,g=x.element,Td(s,o),Go(o,d,null,h);var k=o.memoizedState;if(d=k.element,x.isDehydrated)if(x={element:d,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){g=us(Error(t(423)),o),o=gp(s,o,d,h,g);break e}else if(d!==g){g=us(Error(t(424)),o),o=gp(s,o,d,h,g);break e}else for(vn=Fr(o.stateNode.containerInfo.firstChild),xn=o,lt=!0,Wn=null,h=Cd(o,null,d,h),o.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(ss(),d===g){o=Pr(s,o,h);break e}Kt(s,o,d,h)}o=o.child}return o;case 5:return jd(o),s===null&&_u(o),d=o.type,g=o.pendingProps,x=s!==null?s.memoizedProps:null,k=g.children,Tu(d,g)?k=null:x!==null&&Tu(d,x)&&(o.flags|=32),pp(s,o),Kt(s,o,k,h),o.child;case 6:return s===null&&_u(o),null;case 13:return yp(s,o,h);case 4:return Bu(o,o.stateNode.containerInfo),d=o.pendingProps,s===null?o.child=ls(o,null,d,h):Kt(s,o,d,h),o.child;case 11:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Hn(d,g),up(s,o,d,g,h);case 7:return Kt(s,o,o.pendingProps,h),o.child;case 8:return Kt(s,o,o.pendingProps.children,h),o.child;case 12:return Kt(s,o,o.pendingProps.children,h),o.child;case 10:e:{if(d=o.type._context,g=o.pendingProps,x=o.memoizedProps,k=g.value,tt(Bo,d._currentValue),d._currentValue=k,x!==null)if(Dn(x.value,k)){if(x.children===g.children&&!rn.current){o=Pr(s,o,h);break e}}else for(x=o.child,x!==null&&(x.return=o);x!==null;){var A=x.dependencies;if(A!==null){k=x.child;for(var T=A.firstContext;T!==null;){if(T.context===d){if(x.tag===1){T=$r(-1,h&-h),T.tag=2;var W=x.updateQueue;if(W!==null){W=W.shared;var ne=W.pending;ne===null?T.next=T:(T.next=ne.next,ne.next=T),W.pending=T}}x.lanes|=h,T=x.alternate,T!==null&&(T.lanes|=h),Iu(x.return,h,o),A.lanes|=h;break}T=T.next}}else if(x.tag===10)k=x.type===o.type?null:x.child;else if(x.tag===18){if(k=x.return,k===null)throw Error(t(341));k.lanes|=h,A=k.alternate,A!==null&&(A.lanes|=h),Iu(k,h,o),k=x.sibling}else k=x.child;if(k!==null)k.return=x;else for(k=x;k!==null;){if(k===o){k=null;break}if(x=k.sibling,x!==null){x.return=k.return,k=x;break}k=k.return}x=k}Kt(s,o,g.children,h),o=o.child}return o;case 9:return g=o.type,d=o.pendingProps.children,as(o,h),g=Zn(g),d=d(g),o.flags|=1,Kt(s,o,d,h),o.child;case 14:return d=o.type,g=Hn(d,o.pendingProps),g=Hn(d.type,g),hp(s,o,d,g,h);case 15:return fp(s,o,o.type,o.pendingProps,h);case 17:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Hn(d,g),la(s,o),o.tag=1,sn(d)?(s=!0,Do(o)):s=!1,as(o,h),rp(o,d,g),o0(o,d,g,h),h0(null,o,d,!0,s,h);case 19:return vp(s,o,h);case 22:return dp(s,o,h)}throw Error(t(156,o.tag))};function Hp(s,o){return kf(s,o)}function Qy(s,o,h,d){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=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(s,o,h,d){return new Qy(s,o,h,d)}function T0(s){return s=s.prototype,!(!s||!s.isReactComponent)}function $y(s){if(typeof s=="function")return T0(s)?1:0;if(s!=null){if(s=s.$$typeof,s===z)return 11;if(s===K)return 14}return 2}function ii(s,o){var h=s.alternate;return h===null?(h=En(s.tag,o,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=o,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,o=s.dependencies,h.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h}function ga(s,o,h,d,g,x){var k=2;if(d=s,typeof s=="function")T0(s)&&(k=1);else if(typeof s=="string")k=5;else e:switch(s){case E:return Mi(h.children,g,x,o);case R:k=8,g|=8;break;case Y:return s=En(12,h,o,g|2),s.elementType=Y,s.lanes=x,s;case U:return s=En(13,h,o,g),s.elementType=U,s.lanes=x,s;case re:return s=En(19,h,o,g),s.elementType=re,s.lanes=x,s;case ce:return ya(h,g,x,o);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case le:k=10;break e;case J:k=9;break e;case z:k=11;break e;case K:k=14;break e;case ae:k=16,d=null;break e}throw Error(t(130,s==null?s:typeof s,""))}return o=En(k,h,o,g),o.elementType=s,o.type=d,o.lanes=x,o}function Mi(s,o,h,d){return s=En(7,s,d,o),s.lanes=h,s}function ya(s,o,h,d){return s=En(22,s,d,o),s.elementType=ce,s.lanes=h,s.stateNode={isHidden:!1},s}function M0(s,o,h){return s=En(6,s,null,o),s.lanes=h,s}function E0(s,o,h){return o=En(4,s.children!==null?s.children:[],s.key,o),o.lanes=h,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}function Py(s,o,h,d,g){this.tag=o,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=lu(0),this.expirationTimes=lu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lu(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function j0(s,o,h,d,g,x,k,A,T){return s=new Py(s,o,h,A,T),o===1?(o=1,x===!0&&(o|=8)):o=0,x=En(3,null,null,o),s.current=x,x.stateNode=s,x.memoizedState={element:d,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fu(x),s}function Ay(s,o,h){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_,key:d==null?null:""+d,children:s,containerInfo:o,implementation:h}}function Ip(s){if(!s)return qr;s=s._reactInternals;e:{if(vi(s)!==s||s.tag!==1)throw Error(t(170));var o=s;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(sn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(t(171))}if(s.tag===1){var h=s.type;if(sn(h))return xd(s,h,o)}return o}function Yp(s,o,h,d,g,x,k,A,T){return s=j0(h,d,!0,s,g,x,k,A,T),s.context=Ip(null),h=s.current,d=Jt(),g=ni(h),x=$r(d,g),x.callback=o??null,Kr(h,x,g),s.current.lanes=g,Gs(s,g,d),an(s,d),s}function xa(s,o,h,d){var g=o.current,x=Jt(),k=ni(g);return h=Ip(h),o.context===null?o.context=h:o.pendingContext=h,o=$r(x,k),o.payload={element:s},d=d===void 0?null:d,d!==null&&(o.callback=d),s=Kr(g,o,k),s!==null&&(Fn(s,g,k,x),Uo(s,g,k)),k}function va(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 Fp(s,o){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<o?h:o}}function V0(s,o){Fp(s,o),(s=s.alternate)&&Fp(s,o)}function Cy(){return null}var Bp=typeof reportError=="function"?reportError:function(s){console.error(s)};function R0(s){this._internalRoot=s}Sa.prototype.render=R0.prototype.render=function(s){var o=this._internalRoot;if(o===null)throw Error(t(409));xa(s,o,null,null)},Sa.prototype.unmount=R0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var o=s.containerInfo;Ci(function(){xa(null,s,null,null)}),o[Sr]=null}};function Sa(s){this._internalRoot=s}Sa.prototype.unstable_scheduleHydration=function(s){if(s){var o=Tf();s={blockedOn:null,target:s,priority:o};for(var h=0;h<Hr.length&&o!==0&&o<Hr[h].priority;h++);Hr.splice(h,0,s),h===0&&jf(s)}};function L0(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function wa(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function qp(){}function Zy(s,o,h,d,g){if(g){if(typeof d=="function"){var x=d;d=function(){var W=va(k);x.call(W)}}var k=Yp(o,d,s,0,null,!1,!1,"",qp);return s._reactRootContainer=k,s[Sr]=k.current,hl(s.nodeType===8?s.parentNode:s),Ci(),k}for(;g=s.lastChild;)s.removeChild(g);if(typeof d=="function"){var A=d;d=function(){var W=va(T);A.call(W)}}var T=j0(s,0,!1,null,null,!1,!1,"",qp);return s._reactRootContainer=T,s[Sr]=T.current,hl(s.nodeType===8?s.parentNode:s),Ci(function(){xa(o,T,h,d)}),T}function ka(s,o,h,d,g){var x=h._reactRootContainer;if(x){var k=x;if(typeof g=="function"){var A=g;g=function(){var T=va(k);A.call(T)}}xa(o,k,s,g)}else k=Zy(h,o,s,g,d);return va(k)}Cf=function(s){switch(s.tag){case 3:var o=s.stateNode;if(o.current.memoizedState.isDehydrated){var h=Us(o.pendingLanes);h!==0&&(ou(o,h|1),an(o,mt()),(He&6)===0&&(ds=mt()+500,Ur()))}break;case 13:Ci(function(){var d=Qr(s,1);if(d!==null){var g=Jt();Fn(d,s,1,g)}}),V0(s,1)}},au=function(s){if(s.tag===13){var o=Qr(s,134217728);if(o!==null){var h=Jt();Fn(o,s,134217728,h)}V0(s,134217728)}},Zf=function(s){if(s.tag===13){var o=ni(s),h=Qr(s,o);if(h!==null){var d=Jt();Fn(h,s,o,d)}V0(s,o)}},Tf=function(){return Je},Mf=function(s,o){var h=Je;try{return Je=s,o()}finally{Je=h}},ft=function(s,o,h){switch(o){case"input":if(Me(s,h),o=h.name,h.type==="radio"&&o!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<h.length;o++){var d=h[o];if(d!==s&&d.form===s.form){var g=_o(d);if(!g)throw Error(t(90));De(d),Me(d,g)}}}break;case"textarea":Nn(s,h);break;case"select":o=h.value,o!=null&&vt(s,!!h.multiple,o,!1)}},Of=A0,gf=Ci;var Ty={usingClientEntryPoint:!1,Events:[pl,es,_o,Ys,Yi,A0]},Al={findFiberByHostInstance:Si,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},My={bundleType:Al.bundleType,version:Al.version,rendererPackageName:Al.rendererPackageName,rendererConfig:Al.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Z.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Sf(s),s===null?null:s.stateNode},findFiberByHostInstance:Al.findFiberByHostInstance||Cy,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 ba=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ba.isDisabled&&ba.supportsFiber)try{So=ba.inject(My),nr=ba}catch{}}return cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ty,cn.createPortal=function(s,o){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!L0(o))throw Error(t(200));return Ay(s,o,null,h)},cn.createRoot=function(s,o){if(!L0(s))throw Error(t(299));var h=!1,d="",g=Bp;return o!=null&&(o.unstable_strictMode===!0&&(h=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=j0(s,1,!1,null,null,h,!1,d,g),s[Sr]=o.current,hl(s.nodeType===8?s.parentNode:s),new R0(o)},cn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var o=s._reactInternals;if(o===void 0)throw typeof s.render=="function"?Error(t(188)):(s=Object.keys(s).join(","),Error(t(268,s)));return s=Sf(o),s=s===null?null:s.stateNode,s},cn.flushSync=function(s){return Ci(s)},cn.hydrate=function(s,o,h){if(!wa(o))throw Error(t(200));return ka(null,s,o,!0,h)},cn.hydrateRoot=function(s,o,h){if(!L0(s))throw Error(t(405));var d=h!=null&&h.hydratedSources||null,g=!1,x="",k=Bp;if(h!=null&&(h.unstable_strictMode===!0&&(g=!0),h.identifierPrefix!==void 0&&(x=h.identifierPrefix),h.onRecoverableError!==void 0&&(k=h.onRecoverableError)),o=Yp(o,null,s,1,h??null,g,!1,x,k),s[Sr]=o.current,hl(s),d)for(s=0;s<d.length;s++)h=d[s],g=h._getVersion,g=g(h._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[h,g]:o.mutableSourceEagerHydrationData.push(h,g);return new Sa(o)},cn.render=function(s,o,h){if(!wa(o))throw Error(t(200));return ka(null,s,o,!1,h)},cn.unmountComponentAtNode=function(s){if(!wa(s))throw Error(t(40));return s._reactRootContainer?(Ci(function(){ka(null,null,s,!1,function(){s._reactRootContainer=null,s[Sr]=null})}),!0):!1},cn.unstable_batchedUpdates=A0,cn.unstable_renderSubtreeIntoContainer=function(s,o,h,d){if(!wa(h))throw Error(t(200));if(s==null||s._reactInternals===void 0)throw Error(t(38));return ka(s,o,h,!1,d)},cn.version="18.3.1-next-f1338f8080-20240426",cn}var rm;function zy(){if(rm)return _0.exports;rm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),_0.exports=_y(),_0.exports}var im;function Dy(){if(im)return $a;im=1;var r=zy();return $a.createRoot=r.createRoot,$a.hydrateRoot=r.hydrateRoot,$a}var Wy=Dy();function Ft(r){p.useEffect(r,[])}const Hy="modulepreload",Iy=function(r){return"/"+r},sm={},Yy=function(e,t,n){let i=Promise.resolve();if(t&&t.length>0){let a=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=a(t.map(f=>{if(f=Iy(f),f in sm)return;sm[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":Hy,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(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&l(c.reason);return e().catch(l)})};function Fy(r){if(typeof r!="object"||r===null)return!0;const e=r;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function lm(r,e){try{const t=r.contentWindow,n=r.contentDocument;if(!t||!n)return e;for(const l of n.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(!Fy(l))return!0}return!1}catch{return e}}const j2=p.forwardRef(({projectId:r,directUrl:e,onLoad:t,portrait:n},i)=>{const l=p.useRef(null),a=p.useRef(0),c=p.useRef(null),[u,f]=p.useState(!1);return Ft(()=>{const m=l.current;if(!m)return;let O=!1,y;return Yy(()=>import("./hyperframes-player-Zx0MOyMy.js"),[]).then(()=>{if(O)return;const S=document.createElement("hyperframes-player"),w=e||`/api/projects/${r}/preview`;S.setAttribute("src",w),S.setAttribute("width",String(n?1080:1920)),S.setAttribute("height",String(n?1920:1080)),S.style.width="100%",S.style.height="100%",S.style.display="block",m.appendChild(S);const b=S.iframeElement;typeof i=="function"?i(b):i&&(i.current=b);const Q=j=>j.stopImmediatePropagation();S.addEventListener("click",Q,{capture:!0});const C=()=>{if(a.current++,a.current>1){m.classList.remove("preview-revealing"),m.offsetWidth,m.classList.add("preview-revealing");const P=()=>m.classList.remove("preview-revealing");m.addEventListener("animationend",P,{once:!0})}t(),c.current&&clearInterval(c.current);let j=lm(b,!1);if(j){f(!0);let P=0;c.current=setInterval(()=>{P+=1,j=lm(b,j),(!j||P>100)&&(c.current&&clearInterval(c.current),c.current=null,f(!1),j&&console.debug("[Player] Asset-loading overlay timed out after 10s; hiding anyway. Check network or asset integrity."))},100)}else f(!1)};b.addEventListener("load",C),y=()=>{b.removeEventListener("load",C),S.removeEventListener("click",Q,{capture:!0}),c.current&&clearInterval(c.current),c.current=null,m.removeChild(S),typeof i=="function"?i(null):i&&(i.current=null)}}),()=>{O=!0,y==null||y()}}),v.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden bg-black flex items-center justify-center",children:[v.jsx("div",{ref:l,className:"w-full h-full"}),u&&v.jsxs("div",{className:"absolute inset-0 bg-black/80 flex flex-col items-center justify-center z-20 pointer-events-none",children:[v.jsx("div",{className:"w-8 h-8 border-2 border-white/20 border-t-white rounded-full animate-spin"}),v.jsx("span",{className:"text-white/60 text-xs mt-3",children:"Loading assets…"})]})]})});j2.displayName="Player";function hr(r){if(!Number.isFinite(r)||r<0)return"0:00";const e=Math.floor(r/60),t=Math.floor(r%60);return`${e}:${t.toString().padStart(2,"0")}`}const om=r=>{let e;const t=new Set,n=(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:n,getState:i,getInitialState:()=>u,subscribe:f=>(t.add(f),()=>t.delete(f))},u=e=r(n,i,c);return c},By=(r=>r?om(r):om),qy=r=>r;function Uy(r,e=qy){const t=Qa.useSyncExternalStore(r.subscribe,Qa.useCallback(()=>e(r.getState()),[r,e]),Qa.useCallback(()=>e(r.getInitialState()),[r,e]));return Qa.useDebugValue(t),t}const am=r=>{const e=By(r),t=n=>Uy(e,n);return Object.assign(t,e),t},V2=(r=>r?am(r):am),W0=new Set,Bl={notify:r=>W0.forEach(e=>e(r)),subscribe:r=>(W0.add(r),()=>W0.delete(r))},Re=V2(r=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,playbackRate:1,zoomMode:"fit",pixelsPerSecond:100,setIsPlaying:e=>r({isPlaying:e}),setPlaybackRate:e=>r({playbackRate:e}),setZoomMode:e=>r({zoomMode:e}),setPixelsPerSecond:e=>r({pixelsPerSecond:Math.max(10,e)}),setCurrentTime:e=>r({currentTime:Number.isFinite(e)?e:0}),setDuration:e=>r({duration:Number.isFinite(e)?e:0}),setTimelineReady:e=>r({timelineReady:e}),setElements:e=>r({elements:e}),setSelectedElementId:e=>r({selectedElementId:e}),updateElement:(e,t)=>r(n=>({elements:n.elements.map(i=>i.id===e?{...i,...t}:i)})),reset:()=>r({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null})})),Gy=[.25,.5,1,1.5,2],Ky=p.memo(function({onTogglePlay:e,onSeek:t,timelineVisible:n,onToggleTimeline:i}){const l=Re(R=>R.isPlaying),a=Re(R=>R.duration),c=Re(R=>R.timelineReady),u=Re(R=>R.playbackRate),f=Re.getState().setPlaybackRate,[m,O]=p.useState(!1),y=p.useRef(null),S=p.useRef(null),w=p.useRef(null),b=p.useRef(null),Q=p.useRef(null),C=p.useRef(null),j=p.useRef(!1),P=p.useRef(0),Z=p.useRef(a);Z.current=a,Ft(()=>{const R=J=>{P.current=J;const z=Z.current,U=z>0?Math.min(100,J/z*100):0;y.current&&(y.current.style.width=`${U}%`),S.current&&(S.current.style.left=`${U}%`),w.current&&(w.current.textContent=hr(J)),Q.current&&Q.current.setAttribute("aria-valuenow",String(Math.round(J)))},Y=Bl.subscribe(R);R(Re.getState().currentTime);const le=setInterval(()=>{const J=Re.getState().currentTime,z=Re.getState().duration;if(z>0&&J>0){const U=Math.min(100,J/z*100);y.current&&(y.current.style.width=`${U}%`),S.current&&(S.current.style.left=`${U}%`)}},500);return()=>{Y(),clearInterval(le)}}),p.useEffect(()=>{if(!m)return;const R=Y=>{C.current&&!C.current.contains(Y.target)&&O(!1)};return document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}},[m]);const X=p.useCallback(R=>{const Y=b.current;if(!Y||a<=0)return;const le=Y.getBoundingClientRect(),J=Math.max(0,Math.min(1,(R-le.left)/le.width)),z=J*100;y.current&&(y.current.style.width=`${z}%`),S.current&&(S.current.style.left=`${z}%`),t(J*a)},[a,t]),_=p.useCallback(R=>{if(R.button!==0)return;R.preventDefault(),R.currentTarget.focus(),j.current=!0;const Y=R.currentTarget,le=R.pointerId;try{Y.setPointerCapture(le)}catch{}X(R.clientX);const J=K=>{K.pointerId===le&&j.current&&X(K.clientX)},z=()=>{j.current=!1;try{Y.releasePointerCapture(le)}catch{}Y.removeEventListener("pointermove",J),Y.removeEventListener("pointerup",U),Y.removeEventListener("pointercancel",U),window.removeEventListener("pointerup",U),window.removeEventListener("pointercancel",U),document.removeEventListener("visibilitychange",re),window.removeEventListener("blur",z)},U=K=>{K.pointerId===le&&z()},re=()=>{document.visibilityState==="hidden"&&z()};Y.addEventListener("pointermove",J),Y.addEventListener("pointerup",U),Y.addEventListener("pointercancel",U),window.addEventListener("pointerup",U),window.addEventListener("pointercancel",U),document.addEventListener("visibilitychange",re),window.addEventListener("blur",z)},[X]),E=p.useCallback(R=>{if(!c||a<=0)return;const Y=R.shiftKey?5:1;R.key==="ArrowLeft"?(R.preventDefault(),t(Math.max(0,P.current-Y))):R.key==="ArrowRight"&&(R.preventDefault(),t(Math.min(a,P.current+Y)))},[c,a,t]);return v.jsxs("div",{className:"px-4 py-2 flex items-center gap-3",style:{borderTop:"1px solid rgba(255,255,255,0.04)",paddingBottom:"calc(0.5rem + env(safe-area-inset-bottom))"},children:[v.jsx("button",{type:"button","aria-label":l?"Pause":"Play",onClick:e,disabled:!c,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:l?v.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:[v.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),v.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]}):v.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:v.jsx("polygon",{points:"6,3 20,12 6,21"})})}),v.jsxs("span",{className:"font-mono text-[11px] tabular-nums flex-shrink-0 min-w-[72px]",style:{color:"#A1A1AA"},children:[v.jsx("span",{ref:w,children:hr(0)}),v.jsx("span",{style:{color:"#3F3F46",margin:"0 2px"},children:"/"}),v.jsx("span",{style:{color:"#52525B"},children:hr(a)})]}),v.jsx("div",{ref:R=>{b.current=R,Q.current=R},role:"slider",tabIndex:0,"aria-label":"Seek","aria-valuemin":0,"aria-valuemax":Math.round(a),"aria-valuenow":0,className:"flex-1 h-6 flex items-center cursor-pointer group",style:{touchAction:"none"},onPointerDown:_,onKeyDown:E,children:v.jsxs("div",{className:"w-full rounded-full relative",style:{background:"rgba(255,255,255,0.15)",height:"3px"},children:[v.jsx("div",{ref:y,className:"absolute top-0 bottom-0 left-0 z-[1] rounded-full",style:{background:"linear-gradient(90deg, var(--hf-accent, #3CE6AC), #2BBFA0)"}}),v.jsx("div",{ref:S,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)"}})]})}),v.jsxs("div",{ref:C,className:"relative flex-shrink-0",children:[v.jsx("button",{type:"button",onClick:()=>O(R=>!R),className:"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:u===1?"1x":`${u}x`}),m&&v.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:Gy.map(R=>v.jsxs("button",{onClick:()=>{f(R),O(!1)},className:"block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors",style:{color:R===u?"#FAFAFA":"#71717A",background:R===u?"rgba(255,255,255,0.06)":"transparent"},onMouseEnter:Y=>{R!==u&&(Y.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:Y=>{R!==u&&(Y.currentTarget.style.background="transparent")},children:[R,"x"]},R))})]}),i!==void 0&&v.jsx("button",{onClick:i,className:`w-7 h-7 flex items-center justify-center rounded-md border transition-colors ${n?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800"}`,title:n?"Hide timeline":"Show timeline",children:v.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[v.jsx("rect",{x:"3",y:"13",width:"18",height:"8",rx:"1"}),v.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),v.jsx("line",{x1:"3",y1:"5",x2:"21",y2:"5"})]})})]})}),Jy=p.memo(function({el:e,pps:t,clipY:n,isSelected:i,isHovered:l,hasCustomContent:a,style:c,isComposition:u,onHoverStart:f,onHoverEnd:m,onClick:O,onDoubleClick:y,children:S}){const w=e.start*t,b=Math.max(e.duration*t,4);return v.jsx("div",{"data-clip":"true",className:a?"absolute":"absolute flex items-center",style:{left:w,width:b,top:n,bottom:n,borderRadius:5,backgroundColor:a&&u?"#111":c.clip,backgroundImage:u&&!a?"repeating-linear-gradient(135deg, transparent, transparent 3px, rgba(255,255,255,0.08) 3px, rgba(255,255,255,0.08) 6px)":void 0,border:i?"2px solid rgba(255,255,255,0.9)":`1px solid rgba(255,255,255,${l?.3:.15})`,boxShadow:i?`0 0 0 1px ${c.clip}, 0 2px 8px rgba(0,0,0,0.4)`:l?"0 1px 4px rgba(0,0,0,0.3)":"none",transition:"border-color 120ms, box-shadow 120ms",zIndex:i?10:l?5:1},title:u?`${e.compositionSrc} • Double-click to open`:`${e.id||e.tag} • ${e.start.toFixed(1)}s – ${(e.start+e.duration).toFixed(1)}s`,onPointerEnter:f,onPointerLeave:m,onClick:O,onDoubleClick:y,children:S})});function ex({rangeStart:r,rangeEnd:e,anchorX:t,anchorY:n,onClose:i}){const l=Re(j=>j.elements),[a,c]=p.useState(""),[u,f]=p.useState(!1),m=p.useRef(null),O=p.useRef(null),y=Math.min(r,e),S=Math.max(r,e),w=p.useMemo(()=>l.filter(j=>{const P=j.start+j.duration;return j.start<S&&P>y}),[l,y,S]);Ft(()=>{setTimeout(()=>{var j;return(j=O.current)==null?void 0:j.focus()},50)}),Ft(()=>{const j=P=>{P.key==="Escape"&&i()};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)}),Ft(()=>{const j=P=>{m.current&&!m.current.contains(P.target)&&i()};return setTimeout(()=>window.addEventListener("mousedown",j),100),()=>window.removeEventListener("mousedown",j)});const b=p.useCallback(()=>{const j=w.map(P=>`- #${P.id} (${P.tag}) — ${hr(P.start)} to ${hr(P.start+P.duration)}, track ${P.track}`).join(`
40
+ `+x.stack}return{value:s,source:o,stack:g,digest:null}}function a0(s,o,h){return{value:s,source:null,stack:h??null,digest:o??null}}function c0(s,o){try{console.error(o.value)}catch(h){setTimeout(function(){throw h})}}var ay=typeof WeakMap=="function"?WeakMap:Map;function sp(s,o,h){h=$r(-1,h),h.tag=3,h.payload={element:null};var d=o.value;return h.callback=function(){ha||(ha=!0,b0=d),c0(s,o)},h}function lp(s,o,h){h=$r(-1,h),h.tag=3;var d=s.type.getDerivedStateFromError;if(typeof d=="function"){var g=o.value;h.payload=function(){return d(g)},h.callback=function(){c0(s,o)}}var x=s.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(h.callback=function(){c0(s,o),typeof d!="function"&&(ei===null?ei=new Set([this]):ei.add(this));var k=o.stack;this.componentDidCatch(o.value,{componentStack:k!==null?k:""})}),h}function op(s,o,h){var d=s.pingCache;if(d===null){d=s.pingCache=new ay;var g=new Set;d.set(o,g)}else g=d.get(o),g===void 0&&(g=new Set,d.set(o,g));g.has(h)||(g.add(h),s=wy.bind(null,s,o,h),o.then(s,s))}function ap(s){do{var o;if((o=s.tag===13)&&(o=s.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return s;s=s.return}while(s!==null);return null}function cp(s,o,h,d,g){return(s.mode&1)===0?(s===o?s.flags|=65536:(s.flags|=128,h.flags|=131072,h.flags&=-52805,h.tag===1&&(h.alternate===null?h.tag=17:(o=$r(-1,1),o.tag=2,Kr(h,o,1))),h.lanes|=1),s):(s.flags|=65536,s.lanes=g,s)}var cy=Z.ReactCurrentOwner,ln=!1;function Kt(s,o,h,d){o.child=s===null?Cd(o,null,h,d):ls(o,s.child,h,d)}function up(s,o,h,d,g){h=h.render;var x=o.ref;return as(o,g),d=e0(s,o,h,d,x,g),h=t0(),s!==null&&!ln?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~g,Pr(s,o,g)):(lt&&h&&Lu(o),o.flags|=1,Kt(s,o,d,g),o.child)}function hp(s,o,h,d,g){if(s===null){var x=h.type;return typeof x=="function"&&!T0(x)&&x.defaultProps===void 0&&h.compare===null&&h.defaultProps===void 0?(o.tag=15,o.type=x,fp(s,o,x,d,g)):(s=ga(h.type,null,d,o,o.mode,g),s.ref=o.ref,s.return=o,o.child=s)}if(x=s.child,(s.lanes&g)===0){var k=x.memoizedProps;if(h=h.compare,h=h!==null?h:al,h(k,d)&&s.ref===o.ref)return Pr(s,o,g)}return o.flags|=1,s=ii(x,d),s.ref=o.ref,s.return=o,o.child=s}function fp(s,o,h,d,g){if(s!==null){var x=s.memoizedProps;if(al(x,d)&&s.ref===o.ref)if(ln=!1,o.pendingProps=d=x,(s.lanes&g)!==0)(s.flags&131072)!==0&&(ln=!0);else return o.lanes=s.lanes,Pr(s,o,g)}return u0(s,o,h,d,g)}function dp(s,o,h){var d=o.pendingProps,g=d.children,x=s!==null?s.memoizedState:null;if(d.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},tt(fs,Sn),Sn|=h;else{if((h&1073741824)===0)return s=x!==null?x.baseLanes|h:h,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:s,cachePool:null,transitions:null},o.updateQueue=null,tt(fs,Sn),Sn|=s,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},d=x!==null?x.baseLanes:h,tt(fs,Sn),Sn|=d}else x!==null?(d=x.baseLanes|h,o.memoizedState=null):d=h,tt(fs,Sn),Sn|=d;return Kt(s,o,g,h),o.child}function pp(s,o){var h=o.ref;(s===null&&h!==null||s!==null&&s.ref!==h)&&(o.flags|=512,o.flags|=2097152)}function u0(s,o,h,d,g){var x=sn(h)?wi:zt.current;return x=ns(o,x),as(o,g),h=e0(s,o,h,d,x,g),d=t0(),s!==null&&!ln?(o.updateQueue=s.updateQueue,o.flags&=-2053,s.lanes&=~g,Pr(s,o,g)):(lt&&d&&Lu(o),o.flags|=1,Kt(s,o,h,g),o.child)}function mp(s,o,h,d,g){if(sn(h)){var x=!0;Do(o)}else x=!1;if(as(o,g),o.stateNode===null)la(s,o),rp(o,h,d),o0(o,h,d,g),d=!0;else if(s===null){var k=o.stateNode,A=o.memoizedProps;k.props=A;var T=k.context,W=h.contextType;typeof W=="object"&&W!==null?W=Zn(W):(W=sn(h)?wi:zt.current,W=ns(o,W));var ne=h.getDerivedStateFromProps,ie=typeof ne=="function"||typeof k.getSnapshotBeforeUpdate=="function";ie||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(A!==d||T!==W)&&ip(o,k,d,W),Gr=!1;var te=o.memoizedState;k.state=te,Go(o,d,k,g),T=o.memoizedState,A!==d||te!==T||rn.current||Gr?(typeof ne=="function"&&(l0(o,h,ne,d),T=o.memoizedState),(A=Gr||np(o,h,A,d,te,T,W))?(ie||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"&&(o.flags|=4194308)):(typeof k.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=d,o.memoizedState=T),k.props=d,k.state=T,k.context=W,d=A):(typeof k.componentDidMount=="function"&&(o.flags|=4194308),d=!1)}else{k=o.stateNode,Td(s,o),A=o.memoizedProps,W=o.type===o.elementType?A:Hn(o.type,A),k.props=W,ie=o.pendingProps,te=k.context,T=h.contextType,typeof T=="object"&&T!==null?T=Zn(T):(T=sn(h)?wi:zt.current,T=ns(o,T));var me=h.getDerivedStateFromProps;(ne=typeof me=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(A!==ie||te!==T)&&ip(o,k,d,T),Gr=!1,te=o.memoizedState,k.state=te,Go(o,d,k,g);var xe=o.memoizedState;A!==ie||te!==xe||rn.current||Gr?(typeof me=="function"&&(l0(o,h,me,d),xe=o.memoizedState),(W=Gr||np(o,h,W,d,te,xe,T)||!1)?(ne||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(d,xe,T),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(d,xe,T)),typeof k.componentDidUpdate=="function"&&(o.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof k.componentDidUpdate!="function"||A===s.memoizedProps&&te===s.memoizedState||(o.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&te===s.memoizedState||(o.flags|=1024),o.memoizedProps=d,o.memoizedState=xe),k.props=d,k.state=xe,k.context=T,d=W):(typeof k.componentDidUpdate!="function"||A===s.memoizedProps&&te===s.memoizedState||(o.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||A===s.memoizedProps&&te===s.memoizedState||(o.flags|=1024),d=!1)}return h0(s,o,h,d,x,g)}function h0(s,o,h,d,g,x){pp(s,o);var k=(o.flags&128)!==0;if(!d&&!k)return g&&vd(o,h,!1),Pr(s,o,x);d=o.stateNode,cy.current=o;var A=k&&typeof h.getDerivedStateFromError!="function"?null:d.render();return o.flags|=1,s!==null&&k?(o.child=ls(o,s.child,null,x),o.child=ls(o,null,A,x)):Kt(s,o,A,x),o.memoizedState=d.state,g&&vd(o,h,!0),o.child}function Op(s){var o=s.stateNode;o.pendingContext?yd(s,o.pendingContext,o.pendingContext!==o.context):o.context&&yd(s,o.context,!1),Bu(s,o.containerInfo)}function gp(s,o,h,d,g){return ss(),zu(g),o.flags|=256,Kt(s,o,h,d),o.child}var f0={dehydrated:null,treeContext:null,retryLane:0};function d0(s){return{baseLanes:s,cachePool:null,transitions:null}}function yp(s,o,h){var d=o.pendingProps,g=ct.current,x=!1,k=(o.flags&128)!==0,A;if((A=k)||(A=s!==null&&s.memoizedState===null?!1:(g&2)!==0),A?(x=!0,o.flags&=-129):(s===null||s.memoizedState!==null)&&(g|=1),tt(ct,g&1),s===null)return _u(o),s=o.memoizedState,s!==null&&(s=s.dehydrated,s!==null)?((o.mode&1)===0?o.lanes=1:s.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(k=d.children,s=d.fallback,x?(d=o.mode,x=o.child,k={mode:"hidden",children:k},(d&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=k):x=ya(k,d,0,null),s=Mi(s,d,h,null),x.return=o,s.return=o,x.sibling=s,o.child=x,o.child.memoizedState=d0(h),o.memoizedState=f0,s):p0(o,k));if(g=s.memoizedState,g!==null&&(A=g.dehydrated,A!==null))return uy(s,o,k,d,A,g,h);if(x){x=d.fallback,k=o.mode,g=s.child,A=g.sibling;var T={mode:"hidden",children:d.children};return(k&1)===0&&o.child!==g?(d=o.child,d.childLanes=0,d.pendingProps=T,o.deletions=null):(d=ii(g,T),d.subtreeFlags=g.subtreeFlags&14680064),A!==null?x=ii(A,x):(x=Mi(x,k,h,null),x.flags|=2),x.return=o,d.return=o,d.sibling=x,o.child=d,d=x,x=o.child,k=s.child.memoizedState,k=k===null?d0(h):{baseLanes:k.baseLanes|h,cachePool:null,transitions:k.transitions},x.memoizedState=k,x.childLanes=s.childLanes&~h,o.memoizedState=f0,d}return x=s.child,s=x.sibling,d=ii(x,{mode:"visible",children:d.children}),(o.mode&1)===0&&(d.lanes=h),d.return=o,d.sibling=null,s!==null&&(h=o.deletions,h===null?(o.deletions=[s],o.flags|=16):h.push(s)),o.child=d,o.memoizedState=null,d}function p0(s,o){return o=ya({mode:"visible",children:o},s.mode,0,null),o.return=s,s.child=o}function sa(s,o,h,d){return d!==null&&zu(d),ls(o,s.child,null,h),s=p0(o,o.pendingProps.children),s.flags|=2,o.memoizedState=null,s}function uy(s,o,h,d,g,x,k){if(h)return o.flags&256?(o.flags&=-257,d=a0(Error(t(422))),sa(s,o,k,d)):o.memoizedState!==null?(o.child=s.child,o.flags|=128,null):(x=d.fallback,g=o.mode,d=ya({mode:"visible",children:d.children},g,0,null),x=Mi(x,g,k,null),x.flags|=2,d.return=o,x.return=o,d.sibling=x,o.child=d,(o.mode&1)!==0&&ls(o,s.child,null,k),o.child.memoizedState=d0(k),o.memoizedState=f0,x);if((o.mode&1)===0)return sa(s,o,k,null);if(g.data==="$!"){if(d=g.nextSibling&&g.nextSibling.dataset,d)var A=d.dgst;return d=A,x=Error(t(419)),d=a0(x,d,void 0),sa(s,o,k,d)}if(A=(k&s.childLanes)!==0,ln||A){if(d=At,d!==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&(d.suspendedLanes|k))!==0?0:g,g!==0&&g!==x.retryLane&&(x.retryLane=g,Qr(s,g),Fn(d,s,g,-1))}return Z0(),d=a0(Error(t(421))),sa(s,o,k,d)}return g.data==="$?"?(o.flags|=128,o.child=s.child,o=ky.bind(null,s),g._reactRetry=o,null):(s=x.treeContext,vn=Fr(g.nextSibling),xn=o,lt=!0,Wn=null,s!==null&&(An[Cn++]=kr,An[Cn++]=br,An[Cn++]=ki,kr=s.id,br=s.overflow,ki=o),o=p0(o,d.children),o.flags|=4096,o)}function xp(s,o,h){s.lanes|=o;var d=s.alternate;d!==null&&(d.lanes|=o),Iu(s.return,o,h)}function m0(s,o,h,d,g){var x=s.memoizedState;x===null?s.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:d,tail:h,tailMode:g}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=d,x.tail=h,x.tailMode=g)}function vp(s,o,h){var d=o.pendingProps,g=d.revealOrder,x=d.tail;if(Kt(s,o,d.children,h),d=ct.current,(d&2)!==0)d=d&1|2,o.flags|=128;else{if(s!==null&&(s.flags&128)!==0)e:for(s=o.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&xp(s,h,o);else if(s.tag===19)xp(s,h,o);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break e;for(;s.sibling===null;){if(s.return===null||s.return===o)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}d&=1}if(tt(ct,d),(o.mode&1)===0)o.memoizedState=null;else switch(g){case"forwards":for(h=o.child,g=null;h!==null;)s=h.alternate,s!==null&&Ko(s)===null&&(g=h),h=h.sibling;h=g,h===null?(g=o.child,o.child=null):(g=h.sibling,h.sibling=null),m0(o,!1,g,h,x);break;case"backwards":for(h=null,g=o.child,o.child=null;g!==null;){if(s=g.alternate,s!==null&&Ko(s)===null){o.child=g;break}s=g.sibling,g.sibling=h,h=g,g=s}m0(o,!0,h,null,x);break;case"together":m0(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function la(s,o){(o.mode&1)===0&&s!==null&&(s.alternate=null,o.alternate=null,o.flags|=2)}function Pr(s,o,h){if(s!==null&&(o.dependencies=s.dependencies),Ai|=o.lanes,(h&o.childLanes)===0)return null;if(s!==null&&o.child!==s.child)throw Error(t(153));if(o.child!==null){for(s=o.child,h=ii(s,s.pendingProps),o.child=h,h.return=o;s.sibling!==null;)s=s.sibling,h=h.sibling=ii(s,s.pendingProps),h.return=o;h.sibling=null}return o.child}function hy(s,o,h){switch(o.tag){case 3:Op(o),ss();break;case 5:jd(o);break;case 1:sn(o.type)&&Do(o);break;case 4:Bu(o,o.stateNode.containerInfo);break;case 10:var d=o.type._context,g=o.memoizedProps.value;tt(Bo,d._currentValue),d._currentValue=g;break;case 13:if(d=o.memoizedState,d!==null)return d.dehydrated!==null?(tt(ct,ct.current&1),o.flags|=128,null):(h&o.child.childLanes)!==0?yp(s,o,h):(tt(ct,ct.current&1),s=Pr(s,o,h),s!==null?s.sibling:null);tt(ct,ct.current&1);break;case 19:if(d=(h&o.childLanes)!==0,(s.flags&128)!==0){if(d)return vp(s,o,h);o.flags|=128}if(g=o.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),tt(ct,ct.current),d)break;return null;case 22:case 23:return o.lanes=0,dp(s,o,h)}return Pr(s,o,h)}var Sp,O0,wp,kp;Sp=function(s,o){for(var h=o.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===o)break;for(;h.sibling===null;){if(h.return===null||h.return===o)return;h=h.return}h.sibling.return=h.return,h=h.sibling}},O0=function(){},wp=function(s,o,h,d){var g=s.memoizedProps;if(g!==d){s=o.stateNode,$i(ir.current);var x=null;switch(h){case"input":g=B(s,g),d=B(s,d),x=[];break;case"select":g=F({},g,{value:void 0}),d=F({},d,{value:void 0}),x=[];break;case"textarea":g=St(s,g),d=St(s,d),x=[];break;default:typeof g.onClick!="function"&&typeof d.onClick=="function"&&(s.onclick=No)}Nt(h,d);var k;h=null;for(W in g)if(!d.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)?x||(x=[]):(x=x||[]).push(W,null));for(W in d){var T=d[W];if(A=g!=null?g[W]:void 0,d.hasOwnProperty(W)&&T!==A&&(T!=null||A!=null))if(W==="style")if(A){for(k in A)!A.hasOwnProperty(k)||T&&T.hasOwnProperty(k)||(h||(h={}),h[k]="");for(k in T)T.hasOwnProperty(k)&&A[k]!==T[k]&&(h||(h={}),h[k]=T[k])}else h||(x||(x=[]),x.push(W,h)),h=T;else W==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,A=A?A.__html:void 0,T!=null&&A!==T&&(x=x||[]).push(W,T)):W==="children"?typeof T!="string"&&typeof T!="number"||(x=x||[]).push(W,""+T):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(i.hasOwnProperty(W)?(T!=null&&W==="onScroll"&&rt("scroll",s),x||A===T||(x=[])):(x=x||[]).push(W,T))}h&&(x=x||[]).push("style",h);var W=x;(o.updateQueue=W)&&(o.flags|=4)}},kp=function(s,o,h,d){h!==d&&(o.flags|=4)};function kl(s,o){if(!lt)switch(s.tailMode){case"hidden":o=s.tail;for(var h=null;o!==null;)o.alternate!==null&&(h=o),o=o.sibling;h===null?s.tail=null:h.sibling=null;break;case"collapsed":h=s.tail;for(var d=null;h!==null;)h.alternate!==null&&(d=h),h=h.sibling;d===null?o||s.tail===null?s.tail=null:s.tail.sibling=null:d.sibling=null}}function Wt(s){var o=s.alternate!==null&&s.alternate.child===s.child,h=0,d=0;if(o)for(var g=s.child;g!==null;)h|=g.lanes|g.childLanes,d|=g.subtreeFlags&14680064,d|=g.flags&14680064,g.return=s,g=g.sibling;else for(g=s.child;g!==null;)h|=g.lanes|g.childLanes,d|=g.subtreeFlags,d|=g.flags,g.return=s,g=g.sibling;return s.subtreeFlags|=d,s.childLanes=h,o}function fy(s,o,h){var d=o.pendingProps;switch(Xu(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Wt(o),null;case 1:return sn(o.type)&&zo(),Wt(o),null;case 3:return d=o.stateNode,cs(),it(rn),it(zt),Gu(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Yo(o)?o.flags|=4:s===null||s.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Wn!==null&&(P0(Wn),Wn=null))),O0(s,o),Wt(o),null;case 5:qu(o);var g=$i(yl.current);if(h=o.type,s!==null&&o.stateNode!=null)wp(s,o,h,d,g),s.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!d){if(o.stateNode===null)throw Error(t(166));return Wt(o),null}if(s=$i(ir.current),Yo(o)){d=o.stateNode,h=o.type;var x=o.memoizedProps;switch(d[rr]=o,d[dl]=x,s=(o.mode&1)!==0,h){case"dialog":rt("cancel",d),rt("close",d);break;case"iframe":case"object":case"embed":rt("load",d);break;case"video":case"audio":for(g=0;g<ul.length;g++)rt(ul[g],d);break;case"source":rt("error",d);break;case"img":case"image":case"link":rt("error",d),rt("load",d);break;case"details":rt("toggle",d);break;case"input":Ze(d,x),rt("invalid",d);break;case"select":d._wrapperState={wasMultiple:!!x.multiple},rt("invalid",d);break;case"textarea":er(d,x),rt("invalid",d)}Nt(h,x),g=null;for(var k in x)if(x.hasOwnProperty(k)){var A=x[k];k==="children"?typeof A=="string"?d.textContent!==A&&(x.suppressHydrationWarning!==!0&&Xo(d.textContent,A,s),g=["children",A]):typeof A=="number"&&d.textContent!==""+A&&(x.suppressHydrationWarning!==!0&&Xo(d.textContent,A,s),g=["children",""+A]):i.hasOwnProperty(k)&&A!=null&&k==="onScroll"&&rt("scroll",d)}switch(h){case"input":Ee(d),Ke(d,x,!0);break;case"textarea":Ee(d),tr(d);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(d.onclick=No)}d=g,o.updateQueue=d,d!==null&&(o.flags|=4)}else{k=g.nodeType===9?g:g.ownerDocument,s==="http://www.w3.org/1999/xhtml"&&(s=_n(h)),s==="http://www.w3.org/1999/xhtml"?h==="script"?(s=k.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild)):typeof d.is=="string"?s=k.createElement(h,{is:d.is}):(s=k.createElement(h),h==="select"&&(k=s,d.multiple?k.multiple=!0:d.size&&(k.size=d.size))):s=k.createElementNS(s,h),s[rr]=o,s[dl]=d,Sp(s,o,!1,!1),o.stateNode=s;e:{switch(k=xi(h,d),h){case"dialog":rt("cancel",s),rt("close",s),g=d;break;case"iframe":case"object":case"embed":rt("load",s),g=d;break;case"video":case"audio":for(g=0;g<ul.length;g++)rt(ul[g],s);g=d;break;case"source":rt("error",s),g=d;break;case"img":case"image":case"link":rt("error",s),rt("load",s),g=d;break;case"details":rt("toggle",s),g=d;break;case"input":Ze(s,d),g=B(s,d),rt("invalid",s);break;case"option":g=d;break;case"select":s._wrapperState={wasMultiple:!!d.multiple},g=F({},d,{value:void 0}),rt("invalid",s);break;case"textarea":er(s,d),g=St(s,d),rt("invalid",s);break;default:g=d}Nt(h,g),A=g;for(x in A)if(A.hasOwnProperty(x)){var T=A[x];x==="style"?Gt(s,T):x==="dangerouslySetInnerHTML"?(T=T?T.__html:void 0,T!=null&&H(s,T)):x==="children"?typeof T=="string"?(h!=="textarea"||T!=="")&&he(s,T):typeof T=="number"&&he(s,""+T):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(i.hasOwnProperty(x)?T!=null&&x==="onScroll"&&rt("scroll",s):T!=null&&P(s,x,T,k))}switch(h){case"input":Ee(s),Ke(s,d,!1);break;case"textarea":Ee(s),tr(s);break;case"option":d.value!=null&&s.setAttribute("value",""+pe(d.value));break;case"select":s.multiple=!!d.multiple,x=d.value,x!=null?vt(s,!!d.multiple,x,!1):d.defaultValue!=null&&vt(s,!!d.multiple,d.defaultValue,!0);break;default:typeof g.onClick=="function"&&(s.onclick=No)}switch(h){case"button":case"input":case"select":case"textarea":d=!!d.autoFocus;break e;case"img":d=!0;break e;default:d=!1}}d&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Wt(o),null;case 6:if(s&&o.stateNode!=null)kp(s,o,s.memoizedProps,d);else{if(typeof d!="string"&&o.stateNode===null)throw Error(t(166));if(h=$i(yl.current),$i(ir.current),Yo(o)){if(d=o.stateNode,h=o.memoizedProps,d[rr]=o,(x=d.nodeValue!==h)&&(s=xn,s!==null))switch(s.tag){case 3:Xo(d.nodeValue,h,(s.mode&1)!==0);break;case 5:s.memoizedProps.suppressHydrationWarning!==!0&&Xo(d.nodeValue,h,(s.mode&1)!==0)}x&&(o.flags|=4)}else d=(h.nodeType===9?h:h.ownerDocument).createTextNode(d),d[rr]=o,o.stateNode=d}return Wt(o),null;case 13:if(it(ct),d=o.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(lt&&vn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)$d(),ss(),o.flags|=98560,x=!1;else if(x=Yo(o),d!==null&&d.dehydrated!==null){if(s===null){if(!x)throw Error(t(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(t(317));x[rr]=o}else ss(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Wt(o),x=!1}else Wn!==null&&(P0(Wn),Wn=null),x=!0;if(!x)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=h,o):(d=d!==null,d!==(s!==null&&s.memoizedState!==null)&&d&&(o.child.flags|=8192,(o.mode&1)!==0&&(s===null||(ct.current&1)!==0?Qt===0&&(Qt=3):Z0())),o.updateQueue!==null&&(o.flags|=4),Wt(o),null);case 4:return cs(),O0(s,o),s===null&&hl(o.stateNode.containerInfo),Wt(o),null;case 10:return Hu(o.type._context),Wt(o),null;case 17:return sn(o.type)&&zo(),Wt(o),null;case 19:if(it(ct),x=o.memoizedState,x===null)return Wt(o),null;if(d=(o.flags&128)!==0,k=x.rendering,k===null)if(d)kl(x,!1);else{if(Qt!==0||s!==null&&(s.flags&128)!==0)for(s=o.child;s!==null;){if(k=Ko(s),k!==null){for(o.flags|=128,kl(x,!1),d=k.updateQueue,d!==null&&(o.updateQueue=d,o.flags|=4),o.subtreeFlags=0,d=h,h=o.child;h!==null;)x=h,s=d,x.flags&=14680066,k=x.alternate,k===null?(x.childLanes=0,x.lanes=s,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=k.childLanes,x.lanes=k.lanes,x.child=k.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=k.memoizedProps,x.memoizedState=k.memoizedState,x.updateQueue=k.updateQueue,x.type=k.type,s=k.dependencies,x.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext}),h=h.sibling;return tt(ct,ct.current&1|2),o.child}s=s.sibling}x.tail!==null&&mt()>ds&&(o.flags|=128,d=!0,kl(x,!1),o.lanes=4194304)}else{if(!d)if(s=Ko(k),s!==null){if(o.flags|=128,d=!0,h=s.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),kl(x,!0),x.tail===null&&x.tailMode==="hidden"&&!k.alternate&&!lt)return Wt(o),null}else 2*mt()-x.renderingStartTime>ds&&h!==1073741824&&(o.flags|=128,d=!0,kl(x,!1),o.lanes=4194304);x.isBackwards?(k.sibling=o.child,o.child=k):(h=x.last,h!==null?h.sibling=k:o.child=k,x.last=k)}return x.tail!==null?(o=x.tail,x.rendering=o,x.tail=o.sibling,x.renderingStartTime=mt(),o.sibling=null,h=ct.current,tt(ct,d?h&1|2:h&1),o):(Wt(o),null);case 22:case 23:return C0(),d=o.memoizedState!==null,s!==null&&s.memoizedState!==null!==d&&(o.flags|=8192),d&&(o.mode&1)!==0?(Sn&1073741824)!==0&&(Wt(o),o.subtreeFlags&6&&(o.flags|=8192)):Wt(o),null;case 24:return null;case 25:return null}throw Error(t(156,o.tag))}function dy(s,o){switch(Xu(o),o.tag){case 1:return sn(o.type)&&zo(),s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 3:return cs(),it(rn),it(zt),Gu(),s=o.flags,(s&65536)!==0&&(s&128)===0?(o.flags=s&-65537|128,o):null;case 5:return qu(o),null;case 13:if(it(ct),s=o.memoizedState,s!==null&&s.dehydrated!==null){if(o.alternate===null)throw Error(t(340));ss()}return s=o.flags,s&65536?(o.flags=s&-65537|128,o):null;case 19:return it(ct),null;case 4:return cs(),null;case 10:return Hu(o.type._context),null;case 22:case 23:return C0(),null;case 24:return null;default:return null}}var oa=!1,Ht=!1,py=typeof WeakSet=="function"?WeakSet:Set,ge=null;function hs(s,o){var h=s.ref;if(h!==null)if(typeof h=="function")try{h(null)}catch(d){dt(s,o,d)}else h.current=null}function g0(s,o,h){try{h()}catch(d){dt(s,o,d)}}var bp=!1;function my(s,o){if(Cu=Po,s=nd(),Su(s)){if("selectionStart"in s)var h={start:s.selectionStart,end:s.selectionEnd};else e:{h=(h=s.ownerDocument)&&h.defaultView||window;var d=h.getSelection&&h.getSelection();if(d&&d.rangeCount!==0){h=d.anchorNode;var g=d.anchorOffset,x=d.focusNode;d=d.focusOffset;try{h.nodeType,x.nodeType}catch{h=null;break e}var k=0,A=-1,T=-1,W=0,ne=0,ie=s,te=null;t:for(;;){for(var me;ie!==h||g!==0&&ie.nodeType!==3||(A=k+g),ie!==x||d!==0&&ie.nodeType!==3||(T=k+d),ie.nodeType===3&&(k+=ie.nodeValue.length),(me=ie.firstChild)!==null;)te=ie,ie=me;for(;;){if(ie===s)break t;if(te===h&&++W===g&&(A=k),te===x&&++ne===d&&(T=k),(me=ie.nextSibling)!==null)break;ie=te,te=ie.parentNode}ie=me}h=A===-1||T===-1?null:{start:A,end:T}}else h=null}h=h||{start:0,end:0}}else h=null;for(Zu={focusedElem:s,selectionRange:h},Po=!1,ge=o;ge!==null;)if(o=ge,s=o.child,(o.subtreeFlags&1028)!==0&&s!==null)s.return=o,ge=s;else for(;ge!==null;){o=ge;try{var xe=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(xe!==null){var ke=xe.memoizedProps,Ot=xe.memoizedState,N=o.stateNode,V=N.getSnapshotBeforeUpdate(o.elementType===o.type?ke:Hn(o.type,ke),Ot);N.__reactInternalSnapshotBeforeUpdate=V}break;case 3:var D=o.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(oe){dt(o,o.return,oe)}if(s=o.sibling,s!==null){s.return=o.return,ge=s;break}ge=o.return}return xe=bp,bp=!1,xe}function bl(s,o,h){var d=o.updateQueue;if(d=d!==null?d.lastEffect:null,d!==null){var g=d=d.next;do{if((g.tag&s)===s){var x=g.destroy;g.destroy=void 0,x!==void 0&&g0(o,h,x)}g=g.next}while(g!==d)}}function aa(s,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var h=o=o.next;do{if((h.tag&s)===s){var d=h.create;h.destroy=d()}h=h.next}while(h!==o)}}function y0(s){var o=s.ref;if(o!==null){var h=s.stateNode;switch(s.tag){case 5:s=h;break;default:s=h}typeof o=="function"?o(s):o.current=s}}function Qp(s){var o=s.alternate;o!==null&&(s.alternate=null,Qp(o)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(o=s.stateNode,o!==null&&(delete o[rr],delete o[dl],delete o[ju],delete o[G5],delete o[K5])),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 $p(s){return s.tag===5||s.tag===3||s.tag===4}function Pp(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||$p(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 x0(s,o,h){var d=s.tag;if(d===5||d===6)s=s.stateNode,o?h.nodeType===8?h.parentNode.insertBefore(s,o):h.insertBefore(s,o):(h.nodeType===8?(o=h.parentNode,o.insertBefore(s,h)):(o=h,o.appendChild(s)),h=h._reactRootContainer,h!=null||o.onclick!==null||(o.onclick=No));else if(d!==4&&(s=s.child,s!==null))for(x0(s,o,h),s=s.sibling;s!==null;)x0(s,o,h),s=s.sibling}function v0(s,o,h){var d=s.tag;if(d===5||d===6)s=s.stateNode,o?h.insertBefore(s,o):h.appendChild(s);else if(d!==4&&(s=s.child,s!==null))for(v0(s,o,h),s=s.sibling;s!==null;)v0(s,o,h),s=s.sibling}var Et=null,In=!1;function Jr(s,o,h){for(h=h.child;h!==null;)Ap(s,o,h),h=h.sibling}function Ap(s,o,h){if(nr&&typeof nr.onCommitFiberUnmount=="function")try{nr.onCommitFiberUnmount(So,h)}catch{}switch(h.tag){case 5:Ht||hs(h,o);case 6:var d=Et,g=In;Et=null,Jr(s,o,h),Et=d,In=g,Et!==null&&(In?(s=Et,h=h.stateNode,s.nodeType===8?s.parentNode.removeChild(h):s.removeChild(h)):Et.removeChild(h.stateNode));break;case 18:Et!==null&&(In?(s=Et,h=h.stateNode,s.nodeType===8?Eu(s.parentNode,h):s.nodeType===1&&Eu(s,h),nl(s)):Eu(Et,h.stateNode));break;case 4:d=Et,g=In,Et=h.stateNode.containerInfo,In=!0,Jr(s,o,h),Et=d,In=g;break;case 0:case 11:case 14:case 15:if(!Ht&&(d=h.updateQueue,d!==null&&(d=d.lastEffect,d!==null))){g=d=d.next;do{var x=g,k=x.destroy;x=x.tag,k!==void 0&&((x&2)!==0||(x&4)!==0)&&g0(h,o,k),g=g.next}while(g!==d)}Jr(s,o,h);break;case 1:if(!Ht&&(hs(h,o),d=h.stateNode,typeof d.componentWillUnmount=="function"))try{d.props=h.memoizedProps,d.state=h.memoizedState,d.componentWillUnmount()}catch(A){dt(h,o,A)}Jr(s,o,h);break;case 21:Jr(s,o,h);break;case 22:h.mode&1?(Ht=(d=Ht)||h.memoizedState!==null,Jr(s,o,h),Ht=d):Jr(s,o,h);break;default:Jr(s,o,h)}}function Cp(s){var o=s.updateQueue;if(o!==null){s.updateQueue=null;var h=s.stateNode;h===null&&(h=s.stateNode=new py),o.forEach(function(d){var g=by.bind(null,s,d);h.has(d)||(h.add(d),d.then(g,g))})}}function Yn(s,o){var h=o.deletions;if(h!==null)for(var d=0;d<h.length;d++){var g=h[d];try{var x=s,k=o,A=k;e:for(;A!==null;){switch(A.tag){case 5:Et=A.stateNode,In=!1;break e;case 3:Et=A.stateNode.containerInfo,In=!0;break e;case 4:Et=A.stateNode.containerInfo,In=!0;break e}A=A.return}if(Et===null)throw Error(t(160));Ap(x,k,g),Et=null,In=!1;var T=g.alternate;T!==null&&(T.return=null),g.return=null}catch(W){dt(g,o,W)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Zp(o,s),o=o.sibling}function Zp(s,o){var h=s.alternate,d=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:if(Yn(o,s),lr(s),d&4){try{bl(3,s,s.return),aa(3,s)}catch(ke){dt(s,s.return,ke)}try{bl(5,s,s.return)}catch(ke){dt(s,s.return,ke)}}break;case 1:Yn(o,s),lr(s),d&512&&h!==null&&hs(h,h.return);break;case 5:if(Yn(o,s),lr(s),d&512&&h!==null&&hs(h,h.return),s.flags&32){var g=s.stateNode;try{he(g,"")}catch(ke){dt(s,s.return,ke)}}if(d&4&&(g=s.stateNode,g!=null)){var x=s.memoizedProps,k=h!==null?h.memoizedProps:x,A=s.type,T=s.updateQueue;if(s.updateQueue=null,T!==null)try{A==="input"&&x.type==="radio"&&x.name!=null&&Ne(g,x),xi(A,k);var W=xi(A,x);for(k=0;k<T.length;k+=2){var ne=T[k],ie=T[k+1];ne==="style"?Gt(g,ie):ne==="dangerouslySetInnerHTML"?H(g,ie):ne==="children"?he(g,ie):P(g,ne,ie,W)}switch(A){case"input":Me(g,x);break;case"textarea":Nn(g,x);break;case"select":var te=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!x.multiple;var me=x.value;me!=null?vt(g,!!x.multiple,me,!1):te!==!!x.multiple&&(x.defaultValue!=null?vt(g,!!x.multiple,x.defaultValue,!0):vt(g,!!x.multiple,x.multiple?[]:"",!1))}g[dl]=x}catch(ke){dt(s,s.return,ke)}}break;case 6:if(Yn(o,s),lr(s),d&4){if(s.stateNode===null)throw Error(t(162));g=s.stateNode,x=s.memoizedProps;try{g.nodeValue=x}catch(ke){dt(s,s.return,ke)}}break;case 3:if(Yn(o,s),lr(s),d&4&&h!==null&&h.memoizedState.isDehydrated)try{nl(o.containerInfo)}catch(ke){dt(s,s.return,ke)}break;case 4:Yn(o,s),lr(s);break;case 13:Yn(o,s),lr(s),g=s.child,g.flags&8192&&(x=g.memoizedState!==null,g.stateNode.isHidden=x,!x||g.alternate!==null&&g.alternate.memoizedState!==null||(k0=mt())),d&4&&Cp(s);break;case 22:if(ne=h!==null&&h.memoizedState!==null,s.mode&1?(Ht=(W=Ht)||ne,Yn(o,s),Ht=W):Yn(o,s),lr(s),d&8192){if(W=s.memoizedState!==null,(s.stateNode.isHidden=W)&&!ne&&(s.mode&1)!==0)for(ge=s,ne=s.child;ne!==null;){for(ie=ge=ne;ge!==null;){switch(te=ge,me=te.child,te.tag){case 0:case 11:case 14:case 15:bl(4,te,te.return);break;case 1:hs(te,te.return);var xe=te.stateNode;if(typeof xe.componentWillUnmount=="function"){d=te,h=te.return;try{o=d,xe.props=o.memoizedProps,xe.state=o.memoizedState,xe.componentWillUnmount()}catch(ke){dt(d,h,ke)}}break;case 5:hs(te,te.return);break;case 22:if(te.memoizedState!==null){Ep(ie);continue}}me!==null?(me.return=te,ge=me):Ep(ie)}ne=ne.sibling}e:for(ne=null,ie=s;;){if(ie.tag===5){if(ne===null){ne=ie;try{g=ie.stateNode,W?(x=g.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(A=ie.stateNode,T=ie.memoizedProps.style,k=T!=null&&T.hasOwnProperty("display")?T.display:null,A.style.display=Pe("display",k))}catch(ke){dt(s,s.return,ke)}}}else if(ie.tag===6){if(ne===null)try{ie.stateNode.nodeValue=W?"":ie.memoizedProps}catch(ke){dt(s,s.return,ke)}}else if((ie.tag!==22&&ie.tag!==23||ie.memoizedState===null||ie===s)&&ie.child!==null){ie.child.return=ie,ie=ie.child;continue}if(ie===s)break e;for(;ie.sibling===null;){if(ie.return===null||ie.return===s)break e;ne===ie&&(ne=null),ie=ie.return}ne===ie&&(ne=null),ie.sibling.return=ie.return,ie=ie.sibling}}break;case 19:Yn(o,s),lr(s),d&4&&Cp(s);break;case 21:break;default:Yn(o,s),lr(s)}}function lr(s){var o=s.flags;if(o&2){try{e:{for(var h=s.return;h!==null;){if($p(h)){var d=h;break e}h=h.return}throw Error(t(160))}switch(d.tag){case 5:var g=d.stateNode;d.flags&32&&(he(g,""),d.flags&=-33);var x=Pp(s);v0(s,x,g);break;case 3:case 4:var k=d.stateNode.containerInfo,A=Pp(s);x0(s,A,k);break;default:throw Error(t(161))}}catch(T){dt(s,s.return,T)}s.flags&=-3}o&4096&&(s.flags&=-4097)}function Oy(s,o,h){ge=s,Tp(s)}function Tp(s,o,h){for(var d=(s.mode&1)!==0;ge!==null;){var g=ge,x=g.child;if(g.tag===22&&d){var k=g.memoizedState!==null||oa;if(!k){var A=g.alternate,T=A!==null&&A.memoizedState!==null||Ht;A=oa;var W=Ht;if(oa=k,(Ht=T)&&!W)for(ge=g;ge!==null;)k=ge,T=k.child,k.tag===22&&k.memoizedState!==null?jp(g):T!==null?(T.return=k,ge=T):jp(g);for(;x!==null;)ge=x,Tp(x),x=x.sibling;ge=g,oa=A,Ht=W}Mp(s)}else(g.subtreeFlags&8772)!==0&&x!==null?(x.return=g,ge=x):Mp(s)}}function Mp(s){for(;ge!==null;){var o=ge;if((o.flags&8772)!==0){var h=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Ht||aa(5,o);break;case 1:var d=o.stateNode;if(o.flags&4&&!Ht)if(h===null)d.componentDidMount();else{var g=o.elementType===o.type?h.memoizedProps:Hn(o.type,h.memoizedProps);d.componentDidUpdate(g,h.memoizedState,d.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&Ed(o,x,d);break;case 3:var k=o.updateQueue;if(k!==null){if(h=null,o.child!==null)switch(o.child.tag){case 5:h=o.child.stateNode;break;case 1:h=o.child.stateNode}Ed(o,k,h)}break;case 5:var A=o.stateNode;if(h===null&&o.flags&4){h=A;var T=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":T.autoFocus&&h.focus();break;case"img":T.src&&(h.src=T.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var W=o.alternate;if(W!==null){var ne=W.memoizedState;if(ne!==null){var ie=ne.dehydrated;ie!==null&&nl(ie)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(t(163))}Ht||o.flags&512&&y0(o)}catch(te){dt(o,o.return,te)}}if(o===s){ge=null;break}if(h=o.sibling,h!==null){h.return=o.return,ge=h;break}ge=o.return}}function Ep(s){for(;ge!==null;){var o=ge;if(o===s){ge=null;break}var h=o.sibling;if(h!==null){h.return=o.return,ge=h;break}ge=o.return}}function jp(s){for(;ge!==null;){var o=ge;try{switch(o.tag){case 0:case 11:case 15:var h=o.return;try{aa(4,o)}catch(T){dt(o,h,T)}break;case 1:var d=o.stateNode;if(typeof d.componentDidMount=="function"){var g=o.return;try{d.componentDidMount()}catch(T){dt(o,g,T)}}var x=o.return;try{y0(o)}catch(T){dt(o,x,T)}break;case 5:var k=o.return;try{y0(o)}catch(T){dt(o,k,T)}}}catch(T){dt(o,o.return,T)}if(o===s){ge=null;break}var A=o.sibling;if(A!==null){A.return=o.return,ge=A;break}ge=o.return}}var gy=Math.ceil,ca=Z.ReactCurrentDispatcher,S0=Z.ReactCurrentOwner,Mn=Z.ReactCurrentBatchConfig,He=0,At=null,wt=null,jt=0,Sn=0,fs=Br(0),Qt=0,Ql=null,Ai=0,ua=0,w0=0,$l=null,on=null,k0=0,ds=1/0,Ar=null,ha=!1,b0=null,ei=null,fa=!1,ti=null,da=0,Pl=0,Q0=null,pa=-1,ma=0;function Jt(){return(He&6)!==0?mt():pa!==-1?pa:pa=mt()}function ni(s){return(s.mode&1)===0?1:(He&2)!==0&&jt!==0?jt&-jt:ey.transition!==null?(ma===0&&(ma=Pf()),ma):(s=Je,s!==0||(s=window.event,s=s===void 0?16:Rf(s.type)),s)}function Fn(s,o,h,d){if(50<Pl)throw Pl=0,Q0=null,Error(t(185));Gs(s,h,d),((He&2)===0||s!==At)&&(s===At&&((He&2)===0&&(ua|=h),Qt===4&&ri(s,jt)),an(s,d),h===1&&He===0&&(o.mode&1)===0&&(ds=mt()+500,Wo&&Ur()))}function an(s,o){var h=s.callbackNode;e5(s,o);var d=bo(s,s===At?jt:0);if(d===0)h!==null&&bf(h),s.callbackNode=null,s.callbackPriority=0;else if(o=d&-d,s.callbackPriority!==o){if(h!=null&&bf(h),o===1)s.tag===0?J5(Rp.bind(null,s)):Sd(Rp.bind(null,s)),q5(function(){(He&6)===0&&Ur()}),h=null;else{switch(Af(d)){case 1:h=iu;break;case 4:h=Qf;break;case 16:h=vo;break;case 536870912:h=$f;break;default:h=vo}h=Hp(h,Vp.bind(null,s))}s.callbackPriority=o,s.callbackNode=h}}function Vp(s,o){if(pa=-1,ma=0,(He&6)!==0)throw Error(t(327));var h=s.callbackNode;if(ps()&&s.callbackNode!==h)return null;var d=bo(s,s===At?jt:0);if(d===0)return null;if((d&30)!==0||(d&s.expiredLanes)!==0||o)o=Oa(s,d);else{o=d;var g=He;He|=2;var x=Xp();(At!==s||jt!==o)&&(Ar=null,ds=mt()+500,Zi(s,o));do try{vy();break}catch(A){Lp(s,A)}while(!0);Wu(),ca.current=x,He=g,wt!==null?o=0:(At=null,jt=0,o=Qt)}if(o!==0){if(o===2&&(g=su(s),g!==0&&(d=g,o=$0(s,g))),o===1)throw h=Ql,Zi(s,0),ri(s,d),an(s,mt()),h;if(o===6)ri(s,d);else{if(g=s.current.alternate,(d&30)===0&&!yy(g)&&(o=Oa(s,d),o===2&&(x=su(s),x!==0&&(d=x,o=$0(s,x))),o===1))throw h=Ql,Zi(s,0),ri(s,d),an(s,mt()),h;switch(s.finishedWork=g,s.finishedLanes=d,o){case 0:case 1:throw Error(t(345));case 2:Ti(s,on,Ar);break;case 3:if(ri(s,d),(d&130023424)===d&&(o=k0+500-mt(),10<o)){if(bo(s,0)!==0)break;if(g=s.suspendedLanes,(g&d)!==d){Jt(),s.pingedLanes|=s.suspendedLanes&g;break}s.timeoutHandle=Mu(Ti.bind(null,s,on,Ar),o);break}Ti(s,on,Ar);break;case 4:if(ri(s,d),(d&4194240)===d)break;for(o=s.eventTimes,g=-1;0<d;){var k=31-zn(d);x=1<<k,k=o[k],k>g&&(g=k),d&=~x}if(d=g,d=mt()-d,d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3e3>d?3e3:4320>d?4320:1960*gy(d/1960))-d,10<d){s.timeoutHandle=Mu(Ti.bind(null,s,on,Ar),d);break}Ti(s,on,Ar);break;case 5:Ti(s,on,Ar);break;default:throw Error(t(329))}}}return an(s,mt()),s.callbackNode===h?Vp.bind(null,s):null}function $0(s,o){var h=$l;return s.current.memoizedState.isDehydrated&&(Zi(s,o).flags|=256),s=Oa(s,o),s!==2&&(o=on,on=h,o!==null&&P0(o)),s}function P0(s){on===null?on=s:on.push.apply(on,s)}function yy(s){for(var o=s;;){if(o.flags&16384){var h=o.updateQueue;if(h!==null&&(h=h.stores,h!==null))for(var d=0;d<h.length;d++){var g=h[d],x=g.getSnapshot;g=g.value;try{if(!Dn(x(),g))return!1}catch{return!1}}}if(h=o.child,o.subtreeFlags&16384&&h!==null)h.return=o,o=h;else{if(o===s)break;for(;o.sibling===null;){if(o.return===null||o.return===s)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function ri(s,o){for(o&=~w0,o&=~ua,s.suspendedLanes|=o,s.pingedLanes&=~o,s=s.expirationTimes;0<o;){var h=31-zn(o),d=1<<h;s[h]=-1,o&=~d}}function Rp(s){if((He&6)!==0)throw Error(t(327));ps();var o=bo(s,0);if((o&1)===0)return an(s,mt()),null;var h=Oa(s,o);if(s.tag!==0&&h===2){var d=su(s);d!==0&&(o=d,h=$0(s,d))}if(h===1)throw h=Ql,Zi(s,0),ri(s,o),an(s,mt()),h;if(h===6)throw Error(t(345));return s.finishedWork=s.current.alternate,s.finishedLanes=o,Ti(s,on,Ar),an(s,mt()),null}function A0(s,o){var h=He;He|=1;try{return s(o)}finally{He=h,He===0&&(ds=mt()+500,Wo&&Ur())}}function Ci(s){ti!==null&&ti.tag===0&&(He&6)===0&&ps();var o=He;He|=1;var h=Mn.transition,d=Je;try{if(Mn.transition=null,Je=1,s)return s()}finally{Je=d,Mn.transition=h,He=o,(He&6)===0&&Ur()}}function C0(){Sn=fs.current,it(fs)}function Zi(s,o){s.finishedWork=null,s.finishedLanes=0;var h=s.timeoutHandle;if(h!==-1&&(s.timeoutHandle=-1,B5(h)),wt!==null)for(h=wt.return;h!==null;){var d=h;switch(Xu(d),d.tag){case 1:d=d.type.childContextTypes,d!=null&&zo();break;case 3:cs(),it(rn),it(zt),Gu();break;case 5:qu(d);break;case 4:cs();break;case 13:it(ct);break;case 19:it(ct);break;case 10:Hu(d.type._context);break;case 22:case 23:C0()}h=h.return}if(At=s,wt=s=ii(s.current,null),jt=Sn=o,Qt=0,Ql=null,w0=ua=Ai=0,on=$l=null,Qi!==null){for(o=0;o<Qi.length;o++)if(h=Qi[o],d=h.interleaved,d!==null){h.interleaved=null;var g=d.next,x=h.pending;if(x!==null){var k=x.next;x.next=g,d.next=k}h.pending=d}Qi=null}return s}function Lp(s,o){do{var h=wt;try{if(Wu(),Jo.current=ra,ea){for(var d=ut.memoizedState;d!==null;){var g=d.queue;g!==null&&(g.pending=null),d=d.next}ea=!1}if(Pi=0,Pt=bt=ut=null,xl=!1,vl=0,S0.current=null,h===null||h.return===null){Qt=1,Ql=o,wt=null;break}e:{var x=s,k=h.return,A=h,T=o;if(o=jt,A.flags|=32768,T!==null&&typeof T=="object"&&typeof T.then=="function"){var W=T,ne=A,ie=ne.tag;if((ne.mode&1)===0&&(ie===0||ie===11||ie===15)){var te=ne.alternate;te?(ne.updateQueue=te.updateQueue,ne.memoizedState=te.memoizedState,ne.lanes=te.lanes):(ne.updateQueue=null,ne.memoizedState=null)}var me=ap(k);if(me!==null){me.flags&=-257,cp(me,k,A,x,o),me.mode&1&&op(x,W,o),o=me,T=W;var xe=o.updateQueue;if(xe===null){var ke=new Set;ke.add(T),o.updateQueue=ke}else xe.add(T);break e}else{if((o&1)===0){op(x,W,o),Z0();break e}T=Error(t(426))}}else if(lt&&A.mode&1){var Ot=ap(k);if(Ot!==null){(Ot.flags&65536)===0&&(Ot.flags|=256),cp(Ot,k,A,x,o),zu(us(T,A));break e}}x=T=us(T,A),Qt!==4&&(Qt=2),$l===null?$l=[x]:$l.push(x),x=k;do{switch(x.tag){case 3:x.flags|=65536,o&=-o,x.lanes|=o;var N=sp(x,T,o);Md(x,N);break e;case 1:A=T;var V=x.type,D=x.stateNode;if((x.flags&128)===0&&(typeof V.getDerivedStateFromError=="function"||D!==null&&typeof D.componentDidCatch=="function"&&(ei===null||!ei.has(D)))){x.flags|=65536,o&=-o,x.lanes|=o;var oe=lp(x,A,o);Md(x,oe);break e}}x=x.return}while(x!==null)}_p(h)}catch(be){o=be,wt===h&&h!==null&&(wt=h=h.return);continue}break}while(!0)}function Xp(){var s=ca.current;return ca.current=ra,s===null?ra:s}function Z0(){(Qt===0||Qt===3||Qt===2)&&(Qt=4),At===null||(Ai&268435455)===0&&(ua&268435455)===0||ri(At,jt)}function Oa(s,o){var h=He;He|=2;var d=Xp();(At!==s||jt!==o)&&(Ar=null,Zi(s,o));do try{xy();break}catch(g){Lp(s,g)}while(!0);if(Wu(),He=h,ca.current=d,wt!==null)throw Error(t(261));return At=null,jt=0,Qt}function xy(){for(;wt!==null;)Np(wt)}function vy(){for(;wt!==null&&!I6();)Np(wt)}function Np(s){var o=Wp(s.alternate,s,Sn);s.memoizedProps=s.pendingProps,o===null?_p(s):wt=o,S0.current=null}function _p(s){var o=s;do{var h=o.alternate;if(s=o.return,(o.flags&32768)===0){if(h=fy(h,o,Sn),h!==null){wt=h;return}}else{if(h=dy(h,o),h!==null){h.flags&=32767,wt=h;return}if(s!==null)s.flags|=32768,s.subtreeFlags=0,s.deletions=null;else{Qt=6,wt=null;return}}if(o=o.sibling,o!==null){wt=o;return}wt=o=s}while(o!==null);Qt===0&&(Qt=5)}function Ti(s,o,h){var d=Je,g=Mn.transition;try{Mn.transition=null,Je=1,Sy(s,o,h,d)}finally{Mn.transition=g,Je=d}return null}function Sy(s,o,h,d){do ps();while(ti!==null);if((He&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 x=h.lanes|h.childLanes;if(t5(s,x),s===At&&(wt=At=null,jt=0),(h.subtreeFlags&2064)===0&&(h.flags&2064)===0||fa||(fa=!0,Hp(vo,function(){return ps(),null})),x=(h.flags&15990)!==0,(h.subtreeFlags&15990)!==0||x){x=Mn.transition,Mn.transition=null;var k=Je;Je=1;var A=He;He|=4,S0.current=null,my(s,h),Zp(h,s),z5(Zu),Po=!!Cu,Zu=Cu=null,s.current=h,Oy(h),Y6(),He=A,Je=k,Mn.transition=x}else s.current=h;if(fa&&(fa=!1,ti=s,da=g),x=s.pendingLanes,x===0&&(ei=null),q6(h.stateNode),an(s,mt()),o!==null)for(d=s.onRecoverableError,h=0;h<o.length;h++)g=o[h],d(g.value,{componentStack:g.stack,digest:g.digest});if(ha)throw ha=!1,s=b0,b0=null,s;return(da&1)!==0&&s.tag!==0&&ps(),x=s.pendingLanes,(x&1)!==0?s===Q0?Pl++:(Pl=0,Q0=s):Pl=0,Ur(),null}function ps(){if(ti!==null){var s=Af(da),o=Mn.transition,h=Je;try{if(Mn.transition=null,Je=16>s?16:s,ti===null)var d=!1;else{if(s=ti,ti=null,da=0,(He&6)!==0)throw Error(t(331));var g=He;for(He|=4,ge=s.current;ge!==null;){var x=ge,k=x.child;if((ge.flags&16)!==0){var A=x.deletions;if(A!==null){for(var T=0;T<A.length;T++){var W=A[T];for(ge=W;ge!==null;){var ne=ge;switch(ne.tag){case 0:case 11:case 15:bl(8,ne,x)}var ie=ne.child;if(ie!==null)ie.return=ne,ge=ie;else for(;ge!==null;){ne=ge;var te=ne.sibling,me=ne.return;if(Qp(ne),ne===W){ge=null;break}if(te!==null){te.return=me,ge=te;break}ge=me}}}var xe=x.alternate;if(xe!==null){var ke=xe.child;if(ke!==null){xe.child=null;do{var Ot=ke.sibling;ke.sibling=null,ke=Ot}while(ke!==null)}}ge=x}}if((x.subtreeFlags&2064)!==0&&k!==null)k.return=x,ge=k;else e:for(;ge!==null;){if(x=ge,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:bl(9,x,x.return)}var N=x.sibling;if(N!==null){N.return=x.return,ge=N;break e}ge=x.return}}var V=s.current;for(ge=V;ge!==null;){k=ge;var D=k.child;if((k.subtreeFlags&2064)!==0&&D!==null)D.return=k,ge=D;else e:for(k=V;ge!==null;){if(A=ge,(A.flags&2048)!==0)try{switch(A.tag){case 0:case 11:case 15:aa(9,A)}}catch(be){dt(A,A.return,be)}if(A===k){ge=null;break e}var oe=A.sibling;if(oe!==null){oe.return=A.return,ge=oe;break e}ge=A.return}}if(He=g,Ur(),nr&&typeof nr.onPostCommitFiberRoot=="function")try{nr.onPostCommitFiberRoot(So,s)}catch{}d=!0}return d}finally{Je=h,Mn.transition=o}}return!1}function zp(s,o,h){o=us(h,o),o=sp(s,o,1),s=Kr(s,o,1),o=Jt(),s!==null&&(Gs(s,1,o),an(s,o))}function dt(s,o,h){if(s.tag===3)zp(s,s,h);else for(;o!==null;){if(o.tag===3){zp(o,s,h);break}else if(o.tag===1){var d=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof d.componentDidCatch=="function"&&(ei===null||!ei.has(d))){s=us(h,s),s=lp(o,s,1),o=Kr(o,s,1),s=Jt(),o!==null&&(Gs(o,1,s),an(o,s));break}}o=o.return}}function wy(s,o,h){var d=s.pingCache;d!==null&&d.delete(o),o=Jt(),s.pingedLanes|=s.suspendedLanes&h,At===s&&(jt&h)===h&&(Qt===4||Qt===3&&(jt&130023424)===jt&&500>mt()-k0?Zi(s,0):w0|=h),an(s,o)}function Dp(s,o){o===0&&((s.mode&1)===0?o=1:(o=ko,ko<<=1,(ko&130023424)===0&&(ko=4194304)));var h=Jt();s=Qr(s,o),s!==null&&(Gs(s,o,h),an(s,h))}function ky(s){var o=s.memoizedState,h=0;o!==null&&(h=o.retryLane),Dp(s,h)}function by(s,o){var h=0;switch(s.tag){case 13:var d=s.stateNode,g=s.memoizedState;g!==null&&(h=g.retryLane);break;case 19:d=s.stateNode;break;default:throw Error(t(314))}d!==null&&d.delete(o),Dp(s,h)}var Wp;Wp=function(s,o,h){if(s!==null)if(s.memoizedProps!==o.pendingProps||rn.current)ln=!0;else{if((s.lanes&h)===0&&(o.flags&128)===0)return ln=!1,hy(s,o,h);ln=(s.flags&131072)!==0}else ln=!1,lt&&(o.flags&1048576)!==0&&wd(o,Io,o.index);switch(o.lanes=0,o.tag){case 2:var d=o.type;la(s,o),s=o.pendingProps;var g=ns(o,zt.current);as(o,h),g=e0(null,o,d,s,g,h);var x=t0();return o.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,sn(d)?(x=!0,Do(o)):x=!1,o.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Fu(o),g.updater=ia,o.stateNode=g,g._reactInternals=o,o0(o,d,s,h),o=h0(null,o,d,!0,x,h)):(o.tag=0,lt&&x&&Lu(o),Kt(null,o,g,h),o=o.child),o;case 16:d=o.elementType;e:{switch(la(s,o),s=o.pendingProps,g=d._init,d=g(d._payload),o.type=d,g=o.tag=$y(d),s=Hn(d,s),g){case 0:o=u0(null,o,d,s,h);break e;case 1:o=mp(null,o,d,s,h);break e;case 11:o=up(null,o,d,s,h);break e;case 14:o=hp(null,o,d,Hn(d.type,s),h);break e}throw Error(t(306,d,""))}return o;case 0:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Hn(d,g),u0(s,o,d,g,h);case 1:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Hn(d,g),mp(s,o,d,g,h);case 3:e:{if(Op(o),s===null)throw Error(t(387));d=o.pendingProps,x=o.memoizedState,g=x.element,Td(s,o),Go(o,d,null,h);var k=o.memoizedState;if(d=k.element,x.isDehydrated)if(x={element:d,isDehydrated:!1,cache:k.cache,pendingSuspenseBoundaries:k.pendingSuspenseBoundaries,transitions:k.transitions},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){g=us(Error(t(423)),o),o=gp(s,o,d,h,g);break e}else if(d!==g){g=us(Error(t(424)),o),o=gp(s,o,d,h,g);break e}else for(vn=Fr(o.stateNode.containerInfo.firstChild),xn=o,lt=!0,Wn=null,h=Cd(o,null,d,h),o.child=h;h;)h.flags=h.flags&-3|4096,h=h.sibling;else{if(ss(),d===g){o=Pr(s,o,h);break e}Kt(s,o,d,h)}o=o.child}return o;case 5:return jd(o),s===null&&_u(o),d=o.type,g=o.pendingProps,x=s!==null?s.memoizedProps:null,k=g.children,Tu(d,g)?k=null:x!==null&&Tu(d,x)&&(o.flags|=32),pp(s,o),Kt(s,o,k,h),o.child;case 6:return s===null&&_u(o),null;case 13:return yp(s,o,h);case 4:return Bu(o,o.stateNode.containerInfo),d=o.pendingProps,s===null?o.child=ls(o,null,d,h):Kt(s,o,d,h),o.child;case 11:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Hn(d,g),up(s,o,d,g,h);case 7:return Kt(s,o,o.pendingProps,h),o.child;case 8:return Kt(s,o,o.pendingProps.children,h),o.child;case 12:return Kt(s,o,o.pendingProps.children,h),o.child;case 10:e:{if(d=o.type._context,g=o.pendingProps,x=o.memoizedProps,k=g.value,tt(Bo,d._currentValue),d._currentValue=k,x!==null)if(Dn(x.value,k)){if(x.children===g.children&&!rn.current){o=Pr(s,o,h);break e}}else for(x=o.child,x!==null&&(x.return=o);x!==null;){var A=x.dependencies;if(A!==null){k=x.child;for(var T=A.firstContext;T!==null;){if(T.context===d){if(x.tag===1){T=$r(-1,h&-h),T.tag=2;var W=x.updateQueue;if(W!==null){W=W.shared;var ne=W.pending;ne===null?T.next=T:(T.next=ne.next,ne.next=T),W.pending=T}}x.lanes|=h,T=x.alternate,T!==null&&(T.lanes|=h),Iu(x.return,h,o),A.lanes|=h;break}T=T.next}}else if(x.tag===10)k=x.type===o.type?null:x.child;else if(x.tag===18){if(k=x.return,k===null)throw Error(t(341));k.lanes|=h,A=k.alternate,A!==null&&(A.lanes|=h),Iu(k,h,o),k=x.sibling}else k=x.child;if(k!==null)k.return=x;else for(k=x;k!==null;){if(k===o){k=null;break}if(x=k.sibling,x!==null){x.return=k.return,k=x;break}k=k.return}x=k}Kt(s,o,g.children,h),o=o.child}return o;case 9:return g=o.type,d=o.pendingProps.children,as(o,h),g=Zn(g),d=d(g),o.flags|=1,Kt(s,o,d,h),o.child;case 14:return d=o.type,g=Hn(d,o.pendingProps),g=Hn(d.type,g),hp(s,o,d,g,h);case 15:return fp(s,o,o.type,o.pendingProps,h);case 17:return d=o.type,g=o.pendingProps,g=o.elementType===d?g:Hn(d,g),la(s,o),o.tag=1,sn(d)?(s=!0,Do(o)):s=!1,as(o,h),rp(o,d,g),o0(o,d,g,h),h0(null,o,d,!0,s,h);case 19:return vp(s,o,h);case 22:return dp(s,o,h)}throw Error(t(156,o.tag))};function Hp(s,o){return kf(s,o)}function Qy(s,o,h,d){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=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=d,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function En(s,o,h,d){return new Qy(s,o,h,d)}function T0(s){return s=s.prototype,!(!s||!s.isReactComponent)}function $y(s){if(typeof s=="function")return T0(s)?1:0;if(s!=null){if(s=s.$$typeof,s===z)return 11;if(s===K)return 14}return 2}function ii(s,o){var h=s.alternate;return h===null?(h=En(s.tag,o,s.key,s.mode),h.elementType=s.elementType,h.type=s.type,h.stateNode=s.stateNode,h.alternate=s,s.alternate=h):(h.pendingProps=o,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,o=s.dependencies,h.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},h.sibling=s.sibling,h.index=s.index,h.ref=s.ref,h}function ga(s,o,h,d,g,x){var k=2;if(d=s,typeof s=="function")T0(s)&&(k=1);else if(typeof s=="string")k=5;else e:switch(s){case E:return Mi(h.children,g,x,o);case R:k=8,g|=8;break;case Y:return s=En(12,h,o,g|2),s.elementType=Y,s.lanes=x,s;case U:return s=En(13,h,o,g),s.elementType=U,s.lanes=x,s;case re:return s=En(19,h,o,g),s.elementType=re,s.lanes=x,s;case ce:return ya(h,g,x,o);default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case le:k=10;break e;case J:k=9;break e;case z:k=11;break e;case K:k=14;break e;case ae:k=16,d=null;break e}throw Error(t(130,s==null?s:typeof s,""))}return o=En(k,h,o,g),o.elementType=s,o.type=d,o.lanes=x,o}function Mi(s,o,h,d){return s=En(7,s,d,o),s.lanes=h,s}function ya(s,o,h,d){return s=En(22,s,d,o),s.elementType=ce,s.lanes=h,s.stateNode={isHidden:!1},s}function M0(s,o,h){return s=En(6,s,null,o),s.lanes=h,s}function E0(s,o,h){return o=En(4,s.children!==null?s.children:[],s.key,o),o.lanes=h,o.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},o}function Py(s,o,h,d,g){this.tag=o,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=lu(0),this.expirationTimes=lu(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=lu(0),this.identifierPrefix=d,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function j0(s,o,h,d,g,x,k,A,T){return s=new Py(s,o,h,A,T),o===1?(o=1,x===!0&&(o|=8)):o=0,x=En(3,null,null,o),s.current=x,x.stateNode=s,x.memoizedState={element:d,isDehydrated:h,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fu(x),s}function Ay(s,o,h){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:_,key:d==null?null:""+d,children:s,containerInfo:o,implementation:h}}function Ip(s){if(!s)return qr;s=s._reactInternals;e:{if(vi(s)!==s||s.tag!==1)throw Error(t(170));var o=s;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(sn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(t(171))}if(s.tag===1){var h=s.type;if(sn(h))return xd(s,h,o)}return o}function Yp(s,o,h,d,g,x,k,A,T){return s=j0(h,d,!0,s,g,x,k,A,T),s.context=Ip(null),h=s.current,d=Jt(),g=ni(h),x=$r(d,g),x.callback=o??null,Kr(h,x,g),s.current.lanes=g,Gs(s,g,d),an(s,d),s}function xa(s,o,h,d){var g=o.current,x=Jt(),k=ni(g);return h=Ip(h),o.context===null?o.context=h:o.pendingContext=h,o=$r(x,k),o.payload={element:s},d=d===void 0?null:d,d!==null&&(o.callback=d),s=Kr(g,o,k),s!==null&&(Fn(s,g,k,x),Uo(s,g,k)),k}function va(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 Fp(s,o){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var h=s.retryLane;s.retryLane=h!==0&&h<o?h:o}}function V0(s,o){Fp(s,o),(s=s.alternate)&&Fp(s,o)}function Cy(){return null}var Bp=typeof reportError=="function"?reportError:function(s){console.error(s)};function R0(s){this._internalRoot=s}Sa.prototype.render=R0.prototype.render=function(s){var o=this._internalRoot;if(o===null)throw Error(t(409));xa(s,o,null,null)},Sa.prototype.unmount=R0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var o=s.containerInfo;Ci(function(){xa(null,s,null,null)}),o[Sr]=null}};function Sa(s){this._internalRoot=s}Sa.prototype.unstable_scheduleHydration=function(s){if(s){var o=Tf();s={blockedOn:null,target:s,priority:o};for(var h=0;h<Hr.length&&o!==0&&o<Hr[h].priority;h++);Hr.splice(h,0,s),h===0&&jf(s)}};function L0(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function wa(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11&&(s.nodeType!==8||s.nodeValue!==" react-mount-point-unstable "))}function qp(){}function Zy(s,o,h,d,g){if(g){if(typeof d=="function"){var x=d;d=function(){var W=va(k);x.call(W)}}var k=Yp(o,d,s,0,null,!1,!1,"",qp);return s._reactRootContainer=k,s[Sr]=k.current,hl(s.nodeType===8?s.parentNode:s),Ci(),k}for(;g=s.lastChild;)s.removeChild(g);if(typeof d=="function"){var A=d;d=function(){var W=va(T);A.call(W)}}var T=j0(s,0,!1,null,null,!1,!1,"",qp);return s._reactRootContainer=T,s[Sr]=T.current,hl(s.nodeType===8?s.parentNode:s),Ci(function(){xa(o,T,h,d)}),T}function ka(s,o,h,d,g){var x=h._reactRootContainer;if(x){var k=x;if(typeof g=="function"){var A=g;g=function(){var T=va(k);A.call(T)}}xa(o,k,s,g)}else k=Zy(h,o,s,g,d);return va(k)}Cf=function(s){switch(s.tag){case 3:var o=s.stateNode;if(o.current.memoizedState.isDehydrated){var h=Us(o.pendingLanes);h!==0&&(ou(o,h|1),an(o,mt()),(He&6)===0&&(ds=mt()+500,Ur()))}break;case 13:Ci(function(){var d=Qr(s,1);if(d!==null){var g=Jt();Fn(d,s,1,g)}}),V0(s,1)}},au=function(s){if(s.tag===13){var o=Qr(s,134217728);if(o!==null){var h=Jt();Fn(o,s,134217728,h)}V0(s,134217728)}},Zf=function(s){if(s.tag===13){var o=ni(s),h=Qr(s,o);if(h!==null){var d=Jt();Fn(h,s,o,d)}V0(s,o)}},Tf=function(){return Je},Mf=function(s,o){var h=Je;try{return Je=s,o()}finally{Je=h}},ft=function(s,o,h){switch(o){case"input":if(Me(s,h),o=h.name,h.type==="radio"&&o!=null){for(h=s;h.parentNode;)h=h.parentNode;for(h=h.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<h.length;o++){var d=h[o];if(d!==s&&d.form===s.form){var g=_o(d);if(!g)throw Error(t(90));De(d),Me(d,g)}}}break;case"textarea":Nn(s,h);break;case"select":o=h.value,o!=null&&vt(s,!!h.multiple,o,!1)}},Of=A0,gf=Ci;var Ty={usingClientEntryPoint:!1,Events:[pl,es,_o,Ys,Yi,A0]},Al={findFiberByHostInstance:Si,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},My={bundleType:Al.bundleType,version:Al.version,rendererPackageName:Al.rendererPackageName,rendererConfig:Al.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Z.ReactCurrentDispatcher,findHostInstanceByFiber:function(s){return s=Sf(s),s===null?null:s.stateNode},findFiberByHostInstance:Al.findFiberByHostInstance||Cy,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 ba=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ba.isDisabled&&ba.supportsFiber)try{So=ba.inject(My),nr=ba}catch{}}return cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ty,cn.createPortal=function(s,o){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!L0(o))throw Error(t(200));return Ay(s,o,null,h)},cn.createRoot=function(s,o){if(!L0(s))throw Error(t(299));var h=!1,d="",g=Bp;return o!=null&&(o.unstable_strictMode===!0&&(h=!0),o.identifierPrefix!==void 0&&(d=o.identifierPrefix),o.onRecoverableError!==void 0&&(g=o.onRecoverableError)),o=j0(s,1,!1,null,null,h,!1,d,g),s[Sr]=o.current,hl(s.nodeType===8?s.parentNode:s),new R0(o)},cn.findDOMNode=function(s){if(s==null)return null;if(s.nodeType===1)return s;var o=s._reactInternals;if(o===void 0)throw typeof s.render=="function"?Error(t(188)):(s=Object.keys(s).join(","),Error(t(268,s)));return s=Sf(o),s=s===null?null:s.stateNode,s},cn.flushSync=function(s){return Ci(s)},cn.hydrate=function(s,o,h){if(!wa(o))throw Error(t(200));return ka(null,s,o,!0,h)},cn.hydrateRoot=function(s,o,h){if(!L0(s))throw Error(t(405));var d=h!=null&&h.hydratedSources||null,g=!1,x="",k=Bp;if(h!=null&&(h.unstable_strictMode===!0&&(g=!0),h.identifierPrefix!==void 0&&(x=h.identifierPrefix),h.onRecoverableError!==void 0&&(k=h.onRecoverableError)),o=Yp(o,null,s,1,h??null,g,!1,x,k),s[Sr]=o.current,hl(s),d)for(s=0;s<d.length;s++)h=d[s],g=h._getVersion,g=g(h._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[h,g]:o.mutableSourceEagerHydrationData.push(h,g);return new Sa(o)},cn.render=function(s,o,h){if(!wa(o))throw Error(t(200));return ka(null,s,o,!1,h)},cn.unmountComponentAtNode=function(s){if(!wa(s))throw Error(t(40));return s._reactRootContainer?(Ci(function(){ka(null,null,s,!1,function(){s._reactRootContainer=null,s[Sr]=null})}),!0):!1},cn.unstable_batchedUpdates=A0,cn.unstable_renderSubtreeIntoContainer=function(s,o,h,d){if(!wa(h))throw Error(t(200));if(s==null||s._reactInternals===void 0)throw Error(t(38));return ka(s,o,h,!1,d)},cn.version="18.3.1-next-f1338f8080-20240426",cn}var rm;function zy(){if(rm)return _0.exports;rm=1;function r(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(r)}catch(e){console.error(e)}}return r(),_0.exports=_y(),_0.exports}var im;function Dy(){if(im)return $a;im=1;var r=zy();return $a.createRoot=r.createRoot,$a.hydrateRoot=r.hydrateRoot,$a}var Wy=Dy();function Ft(r){p.useEffect(r,[])}const Hy="modulepreload",Iy=function(r){return"/"+r},sm={},Yy=function(e,t,n){let i=Promise.resolve();if(t&&t.length>0){let a=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=a(t.map(f=>{if(f=Iy(f),f in sm)return;sm[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":Hy,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(a){const c=new Event("vite:preloadError",{cancelable:!0});if(c.payload=a,window.dispatchEvent(c),!c.defaultPrevented)throw a}return i.then(a=>{for(const c of a||[])c.status==="rejected"&&l(c.reason);return e().catch(l)})};function Fy(r){if(typeof r!="object"||r===null)return!0;const e=r;return e.isLoaded===!0||typeof e.totalFrames=="number"&&e.totalFrames>0}function lm(r,e){try{const t=r.contentWindow,n=r.contentDocument;if(!t||!n)return e;for(const l of n.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(!Fy(l))return!0}return!1}catch{return e}}const j2=p.forwardRef(({projectId:r,directUrl:e,onLoad:t,portrait:n},i)=>{const l=p.useRef(null),a=p.useRef(0),c=p.useRef(null),[u,f]=p.useState(!1);return Ft(()=>{const m=l.current;if(!m)return;let O=!1,y;return Yy(()=>import("./hyperframes-player-5iD9BZnx.js"),[]).then(()=>{if(O)return;const S=document.createElement("hyperframes-player"),w=e||`/api/projects/${r}/preview`;S.setAttribute("src",w),S.setAttribute("width",String(n?1080:1920)),S.setAttribute("height",String(n?1920:1080)),S.style.width="100%",S.style.height="100%",S.style.display="block",m.appendChild(S);const b=S.iframeElement;typeof i=="function"?i(b):i&&(i.current=b);const Q=j=>j.stopImmediatePropagation();S.addEventListener("click",Q,{capture:!0});const C=()=>{if(a.current++,a.current>1){m.classList.remove("preview-revealing"),m.offsetWidth,m.classList.add("preview-revealing");const P=()=>m.classList.remove("preview-revealing");m.addEventListener("animationend",P,{once:!0})}t(),c.current&&clearInterval(c.current);let j=lm(b,!1);if(j){f(!0);let P=0;c.current=setInterval(()=>{P+=1,j=lm(b,j),(!j||P>100)&&(c.current&&clearInterval(c.current),c.current=null,f(!1),j&&console.debug("[Player] Asset-loading overlay timed out after 10s; hiding anyway. Check network or asset integrity."))},100)}else f(!1)};b.addEventListener("load",C),y=()=>{b.removeEventListener("load",C),S.removeEventListener("click",Q,{capture:!0}),c.current&&clearInterval(c.current),c.current=null,m.removeChild(S),typeof i=="function"?i(null):i&&(i.current=null)}}),()=>{O=!0,y==null||y()}}),v.jsxs("div",{className:"relative w-full h-full max-w-full max-h-full overflow-hidden bg-black flex items-center justify-center",children:[v.jsx("div",{ref:l,className:"w-full h-full"}),u&&v.jsxs("div",{className:"absolute inset-0 bg-black/80 flex flex-col items-center justify-center z-20 pointer-events-none",children:[v.jsx("div",{className:"w-8 h-8 border-2 border-white/20 border-t-white rounded-full animate-spin"}),v.jsx("span",{className:"text-white/60 text-xs mt-3",children:"Loading assets…"})]})]})});j2.displayName="Player";function hr(r){if(!Number.isFinite(r)||r<0)return"0:00";const e=Math.floor(r/60),t=Math.floor(r%60);return`${e}:${t.toString().padStart(2,"0")}`}const om=r=>{let e;const t=new Set,n=(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:n,getState:i,getInitialState:()=>u,subscribe:f=>(t.add(f),()=>t.delete(f))},u=e=r(n,i,c);return c},By=(r=>r?om(r):om),qy=r=>r;function Uy(r,e=qy){const t=Qa.useSyncExternalStore(r.subscribe,Qa.useCallback(()=>e(r.getState()),[r,e]),Qa.useCallback(()=>e(r.getInitialState()),[r,e]));return Qa.useDebugValue(t),t}const am=r=>{const e=By(r),t=n=>Uy(e,n);return Object.assign(t,e),t},V2=(r=>r?am(r):am),W0=new Set,Bl={notify:r=>W0.forEach(e=>e(r)),subscribe:r=>(W0.add(r),()=>W0.delete(r))},Re=V2(r=>({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null,playbackRate:1,zoomMode:"fit",pixelsPerSecond:100,setIsPlaying:e=>r({isPlaying:e}),setPlaybackRate:e=>r({playbackRate:e}),setZoomMode:e=>r({zoomMode:e}),setPixelsPerSecond:e=>r({pixelsPerSecond:Math.max(10,e)}),setCurrentTime:e=>r({currentTime:Number.isFinite(e)?e:0}),setDuration:e=>r({duration:Number.isFinite(e)?e:0}),setTimelineReady:e=>r({timelineReady:e}),setElements:e=>r({elements:e}),setSelectedElementId:e=>r({selectedElementId:e}),updateElement:(e,t)=>r(n=>({elements:n.elements.map(i=>i.id===e?{...i,...t}:i)})),reset:()=>r({isPlaying:!1,currentTime:0,duration:0,timelineReady:!1,elements:[],selectedElementId:null})})),Gy=[.25,.5,1,1.5,2],Ky=p.memo(function({onTogglePlay:e,onSeek:t,timelineVisible:n,onToggleTimeline:i}){const l=Re(R=>R.isPlaying),a=Re(R=>R.duration),c=Re(R=>R.timelineReady),u=Re(R=>R.playbackRate),f=Re.getState().setPlaybackRate,[m,O]=p.useState(!1),y=p.useRef(null),S=p.useRef(null),w=p.useRef(null),b=p.useRef(null),Q=p.useRef(null),C=p.useRef(null),j=p.useRef(!1),P=p.useRef(0),Z=p.useRef(a);Z.current=a,Ft(()=>{const R=J=>{P.current=J;const z=Z.current,U=z>0?Math.min(100,J/z*100):0;y.current&&(y.current.style.width=`${U}%`),S.current&&(S.current.style.left=`${U}%`),w.current&&(w.current.textContent=hr(J)),Q.current&&Q.current.setAttribute("aria-valuenow",String(Math.round(J)))},Y=Bl.subscribe(R);R(Re.getState().currentTime);const le=setInterval(()=>{const J=Re.getState().currentTime,z=Re.getState().duration;if(z>0&&J>0){const U=Math.min(100,J/z*100);y.current&&(y.current.style.width=`${U}%`),S.current&&(S.current.style.left=`${U}%`)}},500);return()=>{Y(),clearInterval(le)}}),p.useEffect(()=>{if(!m)return;const R=Y=>{C.current&&!C.current.contains(Y.target)&&O(!1)};return document.addEventListener("mousedown",R),()=>{document.removeEventListener("mousedown",R)}},[m]);const X=p.useCallback(R=>{const Y=b.current;if(!Y||a<=0)return;const le=Y.getBoundingClientRect(),J=Math.max(0,Math.min(1,(R-le.left)/le.width)),z=J*100;y.current&&(y.current.style.width=`${z}%`),S.current&&(S.current.style.left=`${z}%`),t(J*a)},[a,t]),_=p.useCallback(R=>{if(R.button!==0)return;R.preventDefault(),R.currentTarget.focus(),j.current=!0;const Y=R.currentTarget,le=R.pointerId;try{Y.setPointerCapture(le)}catch{}X(R.clientX);const J=K=>{K.pointerId===le&&j.current&&X(K.clientX)},z=()=>{j.current=!1;try{Y.releasePointerCapture(le)}catch{}Y.removeEventListener("pointermove",J),Y.removeEventListener("pointerup",U),Y.removeEventListener("pointercancel",U),window.removeEventListener("pointerup",U),window.removeEventListener("pointercancel",U),document.removeEventListener("visibilitychange",re),window.removeEventListener("blur",z)},U=K=>{K.pointerId===le&&z()},re=()=>{document.visibilityState==="hidden"&&z()};Y.addEventListener("pointermove",J),Y.addEventListener("pointerup",U),Y.addEventListener("pointercancel",U),window.addEventListener("pointerup",U),window.addEventListener("pointercancel",U),document.addEventListener("visibilitychange",re),window.addEventListener("blur",z)},[X]),E=p.useCallback(R=>{if(!c||a<=0)return;const Y=R.shiftKey?5:1;R.key==="ArrowLeft"?(R.preventDefault(),t(Math.max(0,P.current-Y))):R.key==="ArrowRight"&&(R.preventDefault(),t(Math.min(a,P.current+Y)))},[c,a,t]);return v.jsxs("div",{className:"px-4 py-2 flex items-center gap-3",style:{borderTop:"1px solid rgba(255,255,255,0.04)",paddingBottom:"calc(0.5rem + env(safe-area-inset-bottom))"},children:[v.jsx("button",{type:"button","aria-label":l?"Pause":"Play",onClick:e,disabled:!c,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:l?v.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:[v.jsx("rect",{x:"6",y:"4",width:"4",height:"16",rx:"1"}),v.jsx("rect",{x:"14",y:"4",width:"4",height:"16",rx:"1"})]}):v.jsx("svg",{width:"12",height:"12",viewBox:"0 0 24 24",fill:"#FAFAFA","aria-hidden":"true",children:v.jsx("polygon",{points:"6,3 20,12 6,21"})})}),v.jsxs("span",{className:"font-mono text-[11px] tabular-nums flex-shrink-0 min-w-[72px]",style:{color:"#A1A1AA"},children:[v.jsx("span",{ref:w,children:hr(0)}),v.jsx("span",{style:{color:"#3F3F46",margin:"0 2px"},children:"/"}),v.jsx("span",{style:{color:"#52525B"},children:hr(a)})]}),v.jsx("div",{ref:R=>{b.current=R,Q.current=R},role:"slider",tabIndex:0,"aria-label":"Seek","aria-valuemin":0,"aria-valuemax":Math.round(a),"aria-valuenow":0,className:"flex-1 h-6 flex items-center cursor-pointer group",style:{touchAction:"none"},onPointerDown:_,onKeyDown:E,children:v.jsxs("div",{className:"w-full rounded-full relative",style:{background:"rgba(255,255,255,0.15)",height:"3px"},children:[v.jsx("div",{ref:y,className:"absolute top-0 bottom-0 left-0 z-[1] rounded-full",style:{background:"linear-gradient(90deg, var(--hf-accent, #3CE6AC), #2BBFA0)"}}),v.jsx("div",{ref:S,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)"}})]})}),v.jsxs("div",{ref:C,className:"relative flex-shrink-0",children:[v.jsx("button",{type:"button",onClick:()=>O(R=>!R),className:"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:u===1?"1x":`${u}x`}),m&&v.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:Gy.map(R=>v.jsxs("button",{onClick:()=>{f(R),O(!1)},className:"block w-full px-3 py-1.5 text-[11px] text-left font-mono tabular-nums transition-colors",style:{color:R===u?"#FAFAFA":"#71717A",background:R===u?"rgba(255,255,255,0.06)":"transparent"},onMouseEnter:Y=>{R!==u&&(Y.currentTarget.style.background="rgba(255,255,255,0.04)")},onMouseLeave:Y=>{R!==u&&(Y.currentTarget.style.background="transparent")},children:[R,"x"]},R))})]}),i!==void 0&&v.jsx("button",{onClick:i,className:`w-7 h-7 flex items-center justify-center rounded-md border transition-colors ${n?"text-studio-accent bg-studio-accent/10 border-studio-accent/30":"border-neutral-700 text-neutral-500 hover:text-neutral-300 hover:bg-neutral-800"}`,title:n?"Hide timeline":"Show timeline",children:v.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",children:[v.jsx("rect",{x:"3",y:"13",width:"18",height:"8",rx:"1"}),v.jsx("line",{x1:"3",y1:"9",x2:"21",y2:"9"}),v.jsx("line",{x1:"3",y1:"5",x2:"21",y2:"5"})]})})]})}),Jy=p.memo(function({el:e,pps:t,clipY:n,isSelected:i,isHovered:l,hasCustomContent:a,style:c,isComposition:u,onHoverStart:f,onHoverEnd:m,onClick:O,onDoubleClick:y,children:S}){const w=e.start*t,b=Math.max(e.duration*t,4);return v.jsx("div",{"data-clip":"true",className:a?"absolute":"absolute flex items-center",style:{left:w,width:b,top:n,bottom:n,borderRadius:5,backgroundColor:a&&u?"#111":c.clip,backgroundImage:u&&!a?"repeating-linear-gradient(135deg, transparent, transparent 3px, rgba(255,255,255,0.08) 3px, rgba(255,255,255,0.08) 6px)":void 0,border:i?"2px solid rgba(255,255,255,0.9)":`1px solid rgba(255,255,255,${l?.3:.15})`,boxShadow:i?`0 0 0 1px ${c.clip}, 0 2px 8px rgba(0,0,0,0.4)`:l?"0 1px 4px rgba(0,0,0,0.3)":"none",transition:"border-color 120ms, box-shadow 120ms",zIndex:i?10:l?5:1},title:u?`${e.compositionSrc} • Double-click to open`:`${e.id||e.tag} • ${e.start.toFixed(1)}s – ${(e.start+e.duration).toFixed(1)}s`,onPointerEnter:f,onPointerLeave:m,onClick:O,onDoubleClick:y,children:S})});function ex({rangeStart:r,rangeEnd:e,anchorX:t,anchorY:n,onClose:i}){const l=Re(j=>j.elements),[a,c]=p.useState(""),[u,f]=p.useState(!1),m=p.useRef(null),O=p.useRef(null),y=Math.min(r,e),S=Math.max(r,e),w=p.useMemo(()=>l.filter(j=>{const P=j.start+j.duration;return j.start<S&&P>y}),[l,y,S]);Ft(()=>{setTimeout(()=>{var j;return(j=O.current)==null?void 0:j.focus()},50)}),Ft(()=>{const j=P=>{P.key==="Escape"&&i()};return window.addEventListener("keydown",j),()=>window.removeEventListener("keydown",j)}),Ft(()=>{const j=P=>{m.current&&!m.current.contains(P.target)&&i()};return setTimeout(()=>window.addEventListener("mousedown",j),100),()=>window.removeEventListener("mousedown",j)});const b=p.useCallback(()=>{const j=w.map(P=>`- #${P.id} (${P.tag}) — ${hr(P.start)} to ${hr(P.start+P.duration)}, track ${P.track}`).join(`
41
41
  `);return`Edit the following HyperFrames composition:
42
42
 
43
43
  Time range: ${hr(y)} — ${hr(S)}
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-FSgUtn41.js"></script>
7
+ <script type="module" crossorigin src="/assets/index-CVDXfFQ6.js"></script>
8
8
  <link rel="stylesheet" crossorigin href="/assets/index-jmDaI2F7.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.4.11",
3
+ "version": "0.4.12",
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.4.11",
36
- "@hyperframes/player": "0.4.11"
35
+ "@hyperframes/core": "0.4.12",
36
+ "@hyperframes/player": "0.4.12"
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.4.11"
50
+ "@hyperframes/producer": "0.4.12"
51
51
  },
52
52
  "peerDependencies": {
53
53
  "react": "^18.0.0 || ^19.0.0",
@@ -1,198 +0,0 @@
1
- var S=Object.defineProperty;var R=(u,b,e)=>b in u?S(u,b,{enumerable:!0,configurable:!0,writable:!0,value:e}):u[b]=e;var h=(u,b,e)=>R(u,typeof b!="symbol"?b+"":b,e);var N=`
2
- :host {
3
- display: block;
4
- position: relative;
5
- overflow: hidden;
6
- background: #000;
7
- contain: layout style;
8
- }
9
-
10
- .hfp-container {
11
- position: absolute;
12
- inset: 0;
13
- overflow: hidden;
14
- pointer-events: none;
15
- }
16
-
17
-
18
- .hfp-iframe {
19
- position: absolute;
20
- top: 50%;
21
- left: 50%;
22
- border: none;
23
- pointer-events: none;
24
- }
25
-
26
- .hfp-poster {
27
- position: absolute;
28
- inset: 0;
29
- object-fit: contain;
30
- z-index: 1;
31
- pointer-events: none;
32
- }
33
-
34
- /* ── Theming via CSS custom properties ──
35
- *
36
- * Override from outside the shadow DOM:
37
- * hyperframes-player {
38
- * --hfp-controls-bg: linear-gradient(transparent, rgba(0,0,0,0.9));
39
- * --hfp-accent: #ff6b6b;
40
- * --hfp-font: "Inter", sans-serif;
41
- * }
42
- */
43
-
44
- .hfp-controls {
45
- position: absolute;
46
- bottom: 0;
47
- left: 0;
48
- right: 0;
49
- display: flex;
50
- align-items: center;
51
- gap: var(--hfp-controls-gap, 12px);
52
- padding: var(--hfp-controls-padding, 8px 16px);
53
- background: var(--hfp-controls-bg, linear-gradient(transparent, rgba(0, 0, 0, 0.7)));
54
- color: var(--hfp-color, #fff);
55
- font-family: var(--hfp-font, system-ui, -apple-system, sans-serif);
56
- font-size: var(--hfp-font-size, 13px);
57
- z-index: 10;
58
- pointer-events: auto;
59
- opacity: 1;
60
- transition: opacity 0.3s ease;
61
- user-select: none;
62
- }
63
-
64
- .hfp-controls.hfp-hidden {
65
- opacity: 0;
66
- pointer-events: none;
67
- }
68
-
69
- .hfp-play-btn {
70
- background: none;
71
- border: none;
72
- color: var(--hfp-color, #fff);
73
- cursor: pointer;
74
- padding: 8px;
75
- display: flex;
76
- align-items: center;
77
- justify-content: center;
78
- width: 40px;
79
- height: 40px;
80
- flex-shrink: 0;
81
- z-index: 10;
82
- }
83
-
84
- .hfp-play-btn:hover {
85
- opacity: 0.8;
86
- }
87
-
88
- .hfp-play-btn svg,
89
- .hfp-play-btn svg * {
90
- pointer-events: none;
91
- }
92
-
93
- .hfp-scrubber {
94
- flex: 1;
95
- height: var(--hfp-scrubber-height, 4px);
96
- background: var(--hfp-scrubber-bg, rgba(255, 255, 255, 0.3));
97
- border-radius: var(--hfp-scrubber-radius, 2px);
98
- cursor: pointer;
99
- position: relative;
100
- }
101
-
102
- .hfp-scrubber:hover {
103
- height: var(--hfp-scrubber-height-hover, 6px);
104
- }
105
-
106
- .hfp-progress {
107
- position: absolute;
108
- top: 0;
109
- left: 0;
110
- height: 100%;
111
- background: var(--hfp-accent, #fff);
112
- border-radius: var(--hfp-scrubber-radius, 2px);
113
- pointer-events: none;
114
- }
115
-
116
- .hfp-time {
117
- flex-shrink: 0;
118
- font-variant-numeric: tabular-nums;
119
- opacity: 0.9;
120
- }
121
-
122
- .hfp-speed-wrap {
123
- position: relative;
124
- flex-shrink: 0;
125
- }
126
-
127
- .hfp-speed-btn {
128
- background: var(--hfp-speed-btn-bg, rgba(255, 255, 255, 0.15));
129
- border: none;
130
- border-radius: var(--hfp-speed-btn-radius, 4px);
131
- color: var(--hfp-color, #fff);
132
- cursor: pointer;
133
- font-family: var(--hfp-font, system-ui, -apple-system, sans-serif);
134
- font-size: 12px;
135
- font-variant-numeric: tabular-nums;
136
- font-weight: 600;
137
- padding: 4px 8px;
138
- min-width: 40px;
139
- text-align: center;
140
- transition: background 0.15s ease;
141
- }
142
-
143
- .hfp-speed-btn:hover {
144
- background: var(--hfp-speed-btn-bg-hover, rgba(255, 255, 255, 0.3));
145
- }
146
-
147
- .hfp-speed-menu {
148
- position: absolute;
149
- bottom: calc(100% + 8px);
150
- right: 0;
151
- background: var(--hfp-menu-bg, rgba(20, 20, 20, 0.95));
152
- backdrop-filter: blur(12px);
153
- -webkit-backdrop-filter: blur(12px);
154
- border: 1px solid var(--hfp-menu-border, rgba(255, 255, 255, 0.1));
155
- border-radius: var(--hfp-menu-radius, 8px);
156
- padding: 4px;
157
- display: flex;
158
- flex-direction: column;
159
- gap: 2px;
160
- min-width: 80px;
161
- opacity: 0;
162
- visibility: hidden;
163
- transform: translateY(4px);
164
- transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
165
- box-shadow: var(--hfp-menu-shadow, 0 8px 24px rgba(0, 0, 0, 0.4));
166
- }
167
-
168
- .hfp-speed-menu.hfp-open {
169
- opacity: 1;
170
- visibility: visible;
171
- transform: translateY(0);
172
- }
173
-
174
- .hfp-speed-option {
175
- background: none;
176
- border: none;
177
- border-radius: 4px;
178
- color: var(--hfp-menu-color, rgba(255, 255, 255, 0.7));
179
- cursor: pointer;
180
- font-family: var(--hfp-font, system-ui, -apple-system, sans-serif);
181
- font-size: 13px;
182
- font-variant-numeric: tabular-nums;
183
- padding: 6px 12px;
184
- text-align: left;
185
- transition: background 0.1s ease, color 0.1s ease;
186
- white-space: nowrap;
187
- }
188
-
189
- .hfp-speed-option:hover {
190
- background: var(--hfp-menu-hover-bg, rgba(255, 255, 255, 0.1));
191
- color: var(--hfp-color, #fff);
192
- }
193
-
194
- .hfp-speed-option.hfp-active {
195
- color: var(--hfp-accent, #fff);
196
- font-weight: 600;
197
- }
198
- `,T='<svg width="24" height="24" viewBox="0 0 18 18" fill="currentColor"><polygon points="4,2 16,9 4,16"/></svg>',D='<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>',H=[.25,.5,1,1.5,2,4];function x(u){return Number.isInteger(u)?`${u}x`:`${u}x`}function O(u){if(!Number.isFinite(u)||u<0)return"0:00";let b=Math.floor(u),e=Math.floor(b/60),t=b%60;return`${e}:${t.toString().padStart(2,"0")}`}function F(u,b,e={}){let t=e.speedPresets??H,i=document.createElement("div");i.className="hfp-controls",i.addEventListener("click",n=>{n.stopPropagation()});let a=document.createElement("button");a.className="hfp-play-btn",a.type="button",a.innerHTML=T,a.setAttribute("aria-label","Play");let r=document.createElement("div");r.className="hfp-scrubber";let o=document.createElement("div");o.className="hfp-progress",o.style.width="0%",r.appendChild(o);let p=document.createElement("span");p.className="hfp-time",p.textContent="0:00 / 0:00";let c=document.createElement("div");c.className="hfp-speed-wrap";let s=document.createElement("button");s.className="hfp-speed-btn",s.type="button",s.textContent="1x",s.setAttribute("aria-label","Playback speed");let l=document.createElement("div");l.className="hfp-speed-menu",l.setAttribute("role","menu");for(let n of t){let d=document.createElement("button");d.className="hfp-speed-option",d.type="button",d.setAttribute("role","menuitem"),d.dataset.speed=String(n),d.textContent=x(n),n===1&&d.classList.add("hfp-active"),l.appendChild(d)}c.appendChild(l),c.appendChild(s),i.appendChild(a),i.appendChild(r),i.appendChild(p),i.appendChild(c),u.appendChild(i);let m=!1,f=null;t.indexOf(1),a.addEventListener("click",n=>{n.stopPropagation(),m?b.onPause():b.onPlay()});let y=n=>{for(let d of l.querySelectorAll(".hfp-speed-option"))d.classList.toggle("hfp-active",d.dataset.speed===String(n))};s.addEventListener("click",n=>{n.stopPropagation();let d=l.classList.toggle("hfp-open");s.setAttribute("aria-expanded",String(d))}),l.addEventListener("click",n=>{n.stopPropagation();let d=n.target.closest(".hfp-speed-option");if(!d)return;let _=parseFloat(d.dataset.speed);t.indexOf(_),s.textContent=x(_),y(_),l.classList.remove("hfp-open"),s.setAttribute("aria-expanded","false"),b.onSpeedChange(_)});let E=()=>{l.classList.remove("hfp-open"),s.setAttribute("aria-expanded","false")};document.addEventListener("click",E);let w=n=>{let d=r.getBoundingClientRect(),_=Math.max(0,Math.min(1,(n-d.left)/d.width));b.onSeek(_)},g=!1;r.addEventListener("mousedown",n=>{n.stopPropagation(),g=!0,w(n.clientX)});let M=n=>{g&&w(n.clientX)},P=()=>{g=!1};document.addEventListener("mousemove",M),document.addEventListener("mouseup",P),r.addEventListener("touchstart",n=>{g=!0;let d=n.touches[0];d&&w(d.clientX)},{passive:!0});let A=n=>{if(g){let d=n.touches[0];d&&w(d.clientX)}},C=()=>{g=!1};document.addEventListener("touchmove",A,{passive:!0}),document.addEventListener("touchend",C);let L=()=>{f&&clearTimeout(f),f=setTimeout(()=>{m&&i.classList.add("hfp-hidden")},3e3)},I=u instanceof ShadowRoot?u.host:u;return I.addEventListener("mousemove",()=>{i.classList.remove("hfp-hidden"),L()}),I.addEventListener("mouseleave",()=>{m&&i.classList.add("hfp-hidden")}),{updateTime(n,d){let _=d>0?n/d*100:0;o.style.width=`${_}%`,p.textContent=`${O(n)} / ${O(d)}`},updatePlaying(n){m=n,a.innerHTML=n?D:T,a.setAttribute("aria-label",n?"Pause":"Play"),n?L():i.classList.remove("hfp-hidden")},updateSpeed(n){t.indexOf(n),s.textContent=x(n),y(n)},show(){i.style.display=""},hide(){i.style.display="none"},destroy(){document.removeEventListener("mousemove",M),document.removeEventListener("mouseup",P),document.removeEventListener("touchmove",A),document.removeEventListener("touchend",C),document.removeEventListener("click",E),f&&clearTimeout(f)}}}var k=30,j="https://cdn.jsdelivr.net/npm/@hyperframes/core/dist/hyperframe.runtime.iife.js",v,z=(v=class extends HTMLElement{constructor(){super();h(this,"shadow");h(this,"container");h(this,"iframe");h(this,"posterEl",null);h(this,"controlsApi",null);h(this,"resizeObserver");h(this,"_ready",!1);h(this,"_duration",0);h(this,"_currentTime",0);h(this,"_paused",!0);h(this,"_compositionWidth",1920);h(this,"_compositionHeight",1080);h(this,"_probeInterval",null);h(this,"_lastUpdateMs",0);h(this,"_parentMedia",[]);h(this,"_audioOwner","runtime");h(this,"_mediaObserver");h(this,"_playbackErrorPosted",!1);h(this,"_runtimeInjected",!1);this.shadow=this.attachShadow({mode:"open"});let e=document.createElement("style");e.textContent=N,this.shadow.appendChild(e),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),this.addEventListener("click",t=>{this._isControlsClick(t)||(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","width","height","controls","muted","poster","playback-rate","audio-src"]}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("src")&&(this.iframe.src=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._teardownMediaObserver(),(e=this.controlsApi)==null||e.destroy();for(let t of this._parentMedia)t.el.pause(),t.el.src="";this._parentMedia=[]}attributeChangedCallback(e,t,i){var a,r;switch(e){case"src":i&&(this._ready=!1,this.iframe.src=i);break;case"width":this._compositionWidth=parseInt(i||"1920",10),this._updateScale();break;case"height":this._compositionHeight=parseInt(i||"1080",10),this._updateScale();break;case"controls":i!==null?this._setupControls():((a=this.controlsApi)==null||a.destroy(),this.controlsApi=null);break;case"poster":this._setupPoster();break;case"playback-rate":{let o=parseFloat(i||"1");for(let p of this._parentMedia)p.el.playbackRate=o;this._sendControl("set-playback-rate",{playbackRate:o}),(r=this.controlsApi)==null||r.updateSpeed(o),this.dispatchEvent(new Event("ratechange"));break}case"muted":for(let o of this._parentMedia)o.el.muted=i!==null;this._sendControl("set-muted",{muted:i!==null});break;case"audio-src":i&&this._setupParentAudioFromUrl(i);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 i,a;let t=Math.round(e*k);if(this._sendControl("seek",{frame:t}),this._currentTime=e,this._audioOwner==="parent")for(let r of this._parentMedia){let o=e-r.start;o>=0&&o<r.duration&&(r.el.currentTime=o)}this._paused=!0,(i=this.controlsApi)==null||i.updatePlaying(!1),(a=this.controlsApi)==null||a.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 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 i;try{(i=this.iframe.contentWindow)==null||i.postMessage({source:"hf-parent",type:"control",action:e,...t},"*")}catch{}}_isControlsClick(e){return e.composedPath().some(t=>t instanceof HTMLElement&&t.classList.contains("hfp-controls"))}_onMessage(e){var i,a,r,o;if(e.source!==this.iframe.contentWindow)return;let t=e.data;if(!(!t||t.source!=="hf-preview")){if(t.type==="state"){this._currentTime=(t.frame??0)/k;let p=!this._paused;this._paused=!t.isPlaying,this._audioOwner==="parent"&&(p&&this._paused?this._pauseParentMedia():!p&&!this._paused&&this._playParentMedia(),this._mirrorParentMediaTime(this._currentTime));let c=performance.now();(c-this._lastUpdateMs>100||this._paused!==p)&&(this._lastUpdateMs=c,(i=this.controlsApi)==null||i.updateTime(this._currentTime,this._duration),(a=this.controlsApi)==null||a.updatePlaying(!this._paused),this.dispatchEvent(new CustomEvent("timeupdate",{detail:{currentTime:this._currentTime}}))),this._currentTime>=this._duration&&!this._paused&&(this._audioOwner==="parent"&&this._pauseParentMedia(),this.loop?(this.seek(0),this.play()):(this._paused=!0,(r=this.controlsApi)==null||r.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/k,(o=this.controlsApi)==null||o.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;let 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 i,a;e++;try{let r=this.iframe.contentWindow;if(!r)return;let o=!!(r.__hf||r.__player),p=!!(r.__timelines&&Object.keys(r.__timelines).length>0);if(!o&&p&&!this._runtimeInjected&&e>=5){this._injectRuntime();return}if(this._runtimeInjected&&!o)return;let c=(()=>{var s,l;if(r.__player&&typeof r.__player.getDuration=="function")return r.__player;if(r.__timelines){let m=Object.keys(r.__timelines);if(m.length>0){let f=(l=(s=this.iframe.contentDocument)==null?void 0:s.querySelector("[data-composition-id]"))==null?void 0:l.getAttribute("data-composition-id"),y=f&&f in r.__timelines?f:m[m.length-1],E=r.__timelines[y];return{getDuration:()=>E.duration()}}}return null})();if(c&&c.getDuration()>0){clearInterval(this._probeInterval),this._duration=c.getDuration(),this._ready=!0,(i=this.controlsApi)==null||i.updateTime(0,this._duration),this.dispatchEvent(new CustomEvent("ready",{detail:{duration:this._duration}}));let s=(a=this.iframe.contentDocument)==null?void 0:a.querySelector("[data-composition-id]");if(s){let l=parseInt(s.getAttribute("data-width")||"0",10),m=parseInt(s.getAttribute("data-height")||"0",10);l>0&&m>0&&(this._compositionWidth=l,this._compositionHeight=m,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{let e=this.iframe.contentDocument;if(!e)return;let t=e.createElement("script");t.src=j,t.onload=()=>{},t.onerror=()=>{},(e.head||e.documentElement).appendChild(t)}catch{}}_updateScale(){let e=this.getBoundingClientRect();if(e.width===0||e.height===0)return;let 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;let e={onPlay:()=>this.play(),onPause:()=>this.pause(),onSeek:a=>this.seek(a*this._duration),onSpeedChange:a=>{this.playbackRate=a}},t=this.getAttribute("speed-presets"),i=t?t.split(",").map(Number).filter(a=>!isNaN(a)&&a>0):void 0;this.controlsApi=F(this.shadow,e,{speedPresets:i})}_setupPoster(){var t;let 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(let 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(let e of this._parentMedia)e.el.pause()}_mirrorParentMediaTime(e){for(let t of this._parentMedia){let i=e-t.start;i<0||i>=t.duration||Math.abs(t.el.currentTime-i)>v.MIRROR_DRIFT_THRESHOLD_SECONDS&&(t.el.currentTime=i)}}_promoteToParentProxy(){this._audioOwner!=="parent"&&(this._audioOwner="parent",this._sendControl("set-media-output-muted",{muted:!0}),this._mirrorParentMediaTime(this._currentTime),this._paused||this._playParentMedia(),this.dispatchEvent(new CustomEvent("audioownershipchange",{detail:{owner:"parent",reason:"autoplay-blocked"}})))}_createParentMedia(e,t,i,a){if(this._parentMedia.some(p=>p.el.src===e))return null;let r=t==="video"?document.createElement("video"):new Audio;r.preload="auto",r.src=e,r.load(),r.muted=this.muted,this.playbackRate!==1&&(r.playbackRate=this.playbackRate);let o={el:r,start:i,duration:a};return this._parentMedia.push(o),o}_setupParentAudioFromUrl(e){this._createParentMedia(e,"audio",0,1/0)}_setupParentMedia(){try{let e=this.iframe.contentDocument;if(!e)return;let t=e.querySelectorAll("audio[data-start], video[data-start]");for(let i of t)this._adoptIframeMedia(i);this._observeDynamicMedia(e)}catch{}}_adoptIframeMedia(e){var c;let t=e.getAttribute("src")||((c=e.querySelector("source"))==null?void 0:c.getAttribute("src"));if(!t)return;let i=new URL(t,e.ownerDocument.baseURI).href,a=parseFloat(e.getAttribute("data-start")||"0"),r=parseFloat(e.getAttribute("data-duration")||"Infinity"),o=e.tagName==="VIDEO"?"video":"audio",p=this._createParentMedia(i,o,a,r);p&&this._audioOwner==="parent"&&(this._mirrorParentMediaTime(this._currentTime),!this._paused&&p.el.src&&p.el.play().catch(s=>this._reportPlaybackError(s)))}_observeDynamicMedia(e){if(this._teardownMediaObserver(),typeof MutationObserver>"u"||!e.body)return;let t=new MutationObserver(i=>{var a,r,o,p;for(let c of i){for(let s of c.addedNodes){if(!(s instanceof Element))continue;let l=[];(a=s.matches)!=null&&a.call(s,"audio[data-start], video[data-start]")&&l.push(s);let m=(r=s.querySelectorAll)==null?void 0:r.call(s,"audio[data-start], video[data-start]");if(m)for(let f of m)l.push(f);for(let f of l)this._adoptIframeMedia(f)}for(let s of c.removedNodes){if(!(s instanceof Element))continue;let l=[];(o=s.matches)!=null&&o.call(s,"audio[data-start], video[data-start]")&&l.push(s);let m=(p=s.querySelectorAll)==null?void 0:p.call(s,"audio[data-start], video[data-start]");if(m)for(let f of m)l.push(f);for(let f of l)this._detachIframeMedia(f)}}});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 o;let t=e.getAttribute("src")||((o=e.querySelector("source"))==null?void 0:o.getAttribute("src"));if(!t)return;let i=new URL(t,e.ownerDocument.baseURI).href,a=this._parentMedia.findIndex(p=>p.el.src===i);if(a===-1)return;let r=this._parentMedia[a];r.el.pause(),r.el.src="",this._parentMedia.splice(a,1)}_hidePoster(){var e;(e=this.posterEl)==null||e.remove(),this.posterEl=null}},h(v,"MIRROR_DRIFT_THRESHOLD_SECONDS",.05),v);customElements.get("hyperframes-player")||customElements.define("hyperframes-player",z);export{z as HyperframesPlayer,H as SPEED_PRESETS,x as formatSpeed,O as formatTime};